@adaptabletools/adaptable 15.4.3 → 16.0.0-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +1 -1
- package/base.css.map +1 -1
- package/bundle.cjs.js +234 -228
- package/index.css +1 -1
- package/index.css.map +1 -1
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +8 -2
- package/src/AdaptableOptions/ActionColumnOptions.d.ts +82 -0
- package/src/AdaptableOptions/{ActionOptions.d.ts → ActionRowOptions.d.ts} +15 -90
- package/src/AdaptableOptions/AdaptableOptions.d.ts +32 -12
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +1 -12
- package/src/AdaptableOptions/AlertOptions.d.ts +9 -0
- package/src/AdaptableOptions/CalendarOptions.d.ts +11 -0
- package/src/AdaptableOptions/CellSummaryOptions.d.ts +10 -0
- package/src/AdaptableOptions/ColumnOptions.d.ts +0 -4
- package/src/AdaptableOptions/CustomSortOptions.d.ts +24 -0
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +5 -1
- package/src/AdaptableOptions/DataSetOptions.d.ts +41 -0
- package/src/AdaptableOptions/DataSetOptions.js +2 -0
- package/src/AdaptableOptions/EditOptions.d.ts +4 -4
- package/src/AdaptableOptions/EntitlementOptions.d.ts +0 -16
- package/src/AdaptableOptions/ExportOptions.d.ts +2 -4
- package/src/AdaptableOptions/ExpressionOptions.d.ts +7 -0
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +1 -1
- package/src/AdaptableOptions/GroupingOptions.d.ts +50 -0
- package/src/AdaptableOptions/GroupingOptions.js +2 -0
- package/src/AdaptableOptions/MasterDetailPluginOptions.d.ts +9 -0
- package/src/AdaptableOptions/PredicateOptions.d.ts +4 -0
- package/src/AdaptableOptions/TeamSharingOptions.d.ts +0 -8
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +30 -1
- package/src/Api/ActionColumnApi.d.ts +10 -0
- package/src/Api/ActionColumnApi.js +2 -0
- package/src/Api/{ActionApi.d.ts → ActionRowApi.d.ts} +4 -15
- package/src/Api/ActionRowApi.js +2 -0
- package/src/Api/AdaptableApi.d.ts +11 -6
- package/src/Api/AlertApi.d.ts +2 -111
- package/src/Api/BulkUpdateApi.d.ts +0 -7
- package/src/Api/CalculatedColumnApi.d.ts +0 -31
- package/src/Api/CalendarApi.d.ts +1 -1
- package/src/Api/CellSummaryApi.d.ts +0 -7
- package/src/Api/ChartingApi.d.ts +0 -7
- package/src/Api/ColumnApi.d.ts +1 -131
- package/src/Api/ConfigApi.d.ts +1 -7
- package/src/Api/CustomSortApi.d.ts +0 -25
- package/src/Api/DashboardApi.d.ts +0 -16
- package/src/Api/DataChangeHistoryApi.d.ts +0 -7
- package/src/Api/DataSetApi.d.ts +1 -16
- package/src/Api/EventApi.d.ts +1 -9
- package/src/Api/Events/AdaptableStateChanged.d.ts +0 -8
- package/src/Api/Events/AdaptableStateReloaded.d.ts +0 -4
- package/src/Api/Events/BaseEventInfo.d.ts +9 -1
- package/src/Api/Events/LiveDataChanged.d.ts +3 -7
- package/src/Api/ExportApi.d.ts +7 -31
- package/src/Api/{QueryLanguageApi.d.ts → ExpressionApi.d.ts} +2 -2
- package/src/Api/ExpressionApi.js +2 -0
- package/src/Api/FilterApi.d.ts +1 -59
- package/src/Api/FlashingCellApi.d.ts +0 -15
- package/src/Api/FormatColumnApi.d.ts +1 -91
- package/src/Api/FreeTextColumnApi.d.ts +0 -39
- package/src/Api/GridApi.d.ts +0 -31
- package/src/Api/Implementation/ActionColumnApiImpl.d.ts +7 -0
- package/src/Api/Implementation/ActionColumnApiImpl.js +14 -0
- package/src/Api/Implementation/ActionRowApiImpl.d.ts +12 -0
- package/src/Api/Implementation/{ActionApiImpl.js → ActionRowApiImpl.js} +8 -15
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +6 -4
- package/src/Api/Implementation/AdaptableApiImpl.js +7 -5
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -43
- package/src/Api/Implementation/AlertApiImpl.js +4 -94
- package/src/Api/Implementation/ApiBase.d.ts +15 -5
- package/src/Api/Implementation/ApiBase.js +26 -8
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +0 -7
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +0 -32
- package/src/Api/Implementation/CalendarApiImpl.d.ts +1 -0
- package/src/Api/Implementation/CalendarApiImpl.js +20 -17
- package/src/Api/Implementation/CellSummaryApiImpl.d.ts +0 -1
- package/src/Api/Implementation/CellSummaryApiImpl.js +3 -6
- package/src/Api/Implementation/ChartingApiImpl.d.ts +0 -1
- package/src/Api/Implementation/ChartingApiImpl.js +0 -5
- package/src/Api/Implementation/ColumnApiImpl.d.ts +0 -35
- package/src/Api/Implementation/ColumnApiImpl.js +1 -138
- package/src/Api/Implementation/ConfigApiImpl.js +2 -1
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +1 -5
- package/src/Api/Implementation/CustomSortApiImpl.js +0 -16
- package/src/Api/Implementation/DashboardApiImpl.d.ts +0 -4
- package/src/Api/Implementation/DashboardApiImpl.js +2 -24
- package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +0 -1
- package/src/Api/Implementation/DataChangeHistoryApiImpl.js +0 -5
- package/src/Api/Implementation/DataSetApiImpl.d.ts +1 -4
- package/src/Api/Implementation/DataSetApiImpl.js +1 -14
- package/src/Api/Implementation/ExportApiImpl.d.ts +4 -10
- package/src/Api/Implementation/ExportApiImpl.js +15 -34
- package/src/Api/Implementation/{QueryLanguageApiImpl.d.ts → ExpressionApiImpl.d.ts} +4 -4
- package/src/Api/Implementation/{QueryLanguageApiImpl.js → ExpressionApiImpl.js} +7 -5
- package/src/Api/Implementation/FilterApiImpl.d.ts +1 -17
- package/src/Api/Implementation/FilterApiImpl.js +0 -53
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +0 -3
- package/src/Api/Implementation/FlashingCellApiImpl.js +2 -13
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +2 -34
- package/src/Api/Implementation/FormatColumnApiImpl.js +0 -73
- package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +0 -8
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +0 -29
- package/src/Api/Implementation/GridApiImpl.d.ts +0 -7
- package/src/Api/Implementation/GridApiImpl.js +3 -32
- package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -6
- package/src/Api/Implementation/LayoutApiImpl.js +2 -27
- package/src/Api/Implementation/OptionsApiImpl.d.ts +10 -5
- package/src/Api/Implementation/OptionsApiImpl.js +19 -7
- package/src/Api/Implementation/PlusMinusApiImpl.d.ts +0 -1
- package/src/Api/Implementation/PlusMinusApiImpl.js +0 -5
- package/src/Api/Implementation/PredicateApiImpl.d.ts +1 -8
- package/src/Api/Implementation/PredicateApiImpl.js +2 -30
- package/src/Api/Implementation/QueryApiImpl.d.ts +0 -5
- package/src/Api/Implementation/QueryApiImpl.js +0 -21
- package/src/Api/Implementation/QuickSearchApiImpl.d.ts +0 -1
- package/src/Api/Implementation/QuickSearchApiImpl.js +0 -5
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -18
- package/src/Api/Implementation/ScheduleApiImpl.js +0 -69
- package/src/Api/Implementation/ScopeApiImpl.js +1 -1
- package/src/Api/Implementation/SettingsPanelApiImpl.d.ts +0 -2
- package/src/Api/Implementation/SettingsPanelApiImpl.js +0 -9
- package/src/Api/Implementation/ShortcutApiImpl.d.ts +1 -6
- package/src/Api/Implementation/ShortcutApiImpl.js +0 -21
- package/src/Api/Implementation/SmartEditApiImpl.d.ts +0 -1
- package/src/Api/Implementation/SmartEditApiImpl.js +0 -5
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +1 -5
- package/src/Api/Implementation/StyledColumnApiImpl.js +2 -17
- package/src/Api/Implementation/SystemStatusApiImpl.d.ts +0 -2
- package/src/Api/Implementation/SystemStatusApiImpl.js +0 -9
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +0 -5
- package/src/Api/Implementation/TeamSharingApiImpl.js +0 -21
- package/src/Api/Implementation/ThemeApiImpl.d.ts +0 -4
- package/src/Api/Implementation/ThemeApiImpl.js +2 -17
- package/src/Api/Implementation/ToolPanelApiImpl.js +2 -2
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +4 -2
- package/src/Api/Implementation/UserInterfaceApiImpl.js +17 -10
- package/src/Api/Internal/{ActionInternalApi.d.ts → ActionRowInternalApi.d.ts} +2 -2
- package/src/Api/Internal/{ActionInternalApi.js → ActionRowInternalApi.js} +12 -5
- package/src/Api/Internal/AdaptableInternalApi.d.ts +1 -10
- package/src/Api/Internal/AdaptableInternalApi.js +9 -20
- package/src/Api/Internal/AlertInternalApi.js +9 -6
- package/src/Api/Internal/CalculatedColumnInternalApi.js +2 -2
- package/src/Api/Internal/CustomSortInternalApi.d.ts +1 -1
- package/src/Api/Internal/CustomSortInternalApi.js +1 -1
- package/src/Api/Internal/DashboardInternalApi.js +2 -0
- package/src/Api/Internal/DataSetInternalApi.d.ts +1 -1
- package/src/Api/Internal/DataSetInternalApi.js +2 -1
- package/src/Api/Internal/ExportInternalApi.js +1 -1
- package/src/Api/Internal/{QueryLanguageInternalApi.d.ts → ExpressionnternalApi.d.ts} +1 -1
- package/src/Api/Internal/{QueryLanguageInternalApi.js → ExpressionnternalApi.js} +9 -5
- package/src/Api/Internal/FilterInternalApi.js +4 -1
- package/src/Api/Internal/FormatColumnInternalApi.js +1 -1
- package/src/Api/Internal/GridInternalApi.js +8 -0
- package/src/Api/Internal/LayoutInternalApi.js +6 -1
- package/src/Api/Internal/PredicateInternalApi.js +10 -0
- package/src/Api/Internal/QueryInternalApi.js +3 -1
- package/src/Api/Internal/SystemStatusInternalApi.js +4 -1
- package/src/Api/Internal/TeamSharingInternalApi.js +2 -0
- package/src/Api/LayoutApi.d.ts +3 -27
- package/src/Api/OptionsApi.d.ts +28 -10
- package/src/Api/PlusMinusApi.d.ts +0 -7
- package/src/Api/PredicateApi.d.ts +1 -32
- package/src/Api/QueryApi.d.ts +0 -23
- package/src/Api/QuickSearchApi.d.ts +0 -4
- package/src/Api/ScheduleApi.d.ts +0 -81
- package/src/Api/SettingsPanelApi.d.ts +0 -11
- package/src/Api/ShortcutApi.d.ts +0 -25
- package/src/Api/SmartEditApi.d.ts +0 -7
- package/src/Api/StyledColumnApi.d.ts +0 -21
- package/src/Api/SystemStatusApi.d.ts +0 -11
- package/src/Api/TeamSharingApi.d.ts +0 -23
- package/src/Api/ThemeApi.d.ts +0 -19
- package/src/Api/UserInterfaceApi.d.ts +4 -9
- package/src/PredefinedConfig/AlertState.d.ts +4 -1
- package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +3 -3
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +4 -1
- package/src/PredefinedConfig/Common/AggregationColumns.d.ts +3 -0
- package/src/PredefinedConfig/Common/BaseContext.d.ts +8 -0
- package/src/PredefinedConfig/Common/CellSummary.d.ts +1 -0
- package/src/PredefinedConfig/Common/DataChangedScope.d.ts +9 -0
- package/src/PredefinedConfig/Common/Entitlement.d.ts +1 -1
- package/src/PredefinedConfig/Common/Enums.d.ts +2 -1
- package/src/PredefinedConfig/Common/Enums.js +1 -0
- package/src/PredefinedConfig/LayoutState.d.ts +0 -6
- package/src/PredefinedConfig/SystemState.d.ts +1 -1
- package/src/PredefinedConfig/TeamSharingState.d.ts +1 -1
- package/src/PredefinedConfig/ThemeState.d.ts +3 -0
- package/src/Strategy/AdaptableModuleBase.js +3 -3
- package/src/Strategy/AlertModule.js +3 -3
- package/src/Strategy/CalculatedColumnModule.js +2 -2
- package/src/Strategy/CellSummaryModule.js +3 -0
- package/src/Strategy/DataSetModule.d.ts +1 -1
- package/src/Strategy/DataSetModule.js +1 -1
- package/src/Strategy/ExportModule.js +4 -0
- package/src/Strategy/FlashingCellModule.js +4 -4
- package/src/Strategy/FormatColumnModule.js +3 -3
- package/src/Strategy/QueryModule.js +1 -1
- package/src/Strategy/SmartEditModule.js +2 -0
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +25 -23
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +4 -0
- package/src/Utilities/Helpers/AdaptableHelper.js +12 -6
- package/src/Utilities/Helpers/FormatHelper.js +7 -0
- package/src/Utilities/ObjectFactory.d.ts +2 -2
- package/src/Utilities/ObjectFactory.js +7 -4
- package/src/Utilities/Services/AlertService.js +1 -1
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +2 -2
- package/src/Utilities/Services/ChartingService.js +2 -0
- package/src/Utilities/Services/EntitlementService.js +2 -2
- package/src/Utilities/Services/MetamodelService.js +4 -0
- package/src/Utilities/Services/ModuleService.js +10 -10
- package/src/Utilities/Services/QueryLanguageService.js +16 -0
- package/src/Utilities/Services/ReportService.js +8 -6
- package/src/Utilities/Services/RowEditService.js +4 -2
- package/src/Utilities/Services/ValidationService.js +2 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +5 -5
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +9 -9
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsActionColumnsForm.js +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js +4 -4
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +3 -3
- package/src/View/AdaptableWizardView/Wizard.js +2 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -1
- package/src/View/CellSummary/CellSummaryStatusPanel.js +1 -1
- package/src/View/Components/AdaptableIconSelector/index.d.ts +6 -0
- package/src/View/Components/AdaptableIconSelector/index.js +18 -0
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +2 -2
- package/src/View/Components/AdaptableViewIcon/index.d.ts +10 -0
- package/src/View/Components/AdaptableViewIcon/index.js +18 -0
- package/src/View/Components/EntityRulesEditor/Utilities.js +3 -3
- package/src/View/Components/ExternalRenderer.js +14 -2
- package/src/View/Components/FilterForm/QuickFilterForm.js +4 -0
- package/src/View/Components/Popups/AdaptablePopupAlert.js +2 -0
- package/src/View/Components/RangesComponent.d.ts +4 -4
- package/src/View/Components/RangesComponent.js +13 -22
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +2 -0
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +11 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +1 -1
- package/src/View/Dashboard/CustomDashboardButton.js +2 -0
- package/src/View/Dashboard/CustomToolbarWrapper.js +13 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +11 -7
- package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +2 -2
- package/src/View/DataChangeHistory/buildActionColumnButton.js +3 -2
- package/src/View/Export/ExportViewPanel.d.ts +1 -1
- package/src/View/Export/ExportViewPanel.js +4 -4
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +3 -1
- package/src/View/GridInfo/GridInfoPopup.d.ts +0 -1
- package/src/View/GridInfo/GridInfoPopup.js +1 -2
- package/src/View/GridInfo/GridOptionsComponent.js +1 -1
- package/src/View/Layout/LayoutViewPanel.js +1 -1
- package/src/View/Layout/PivotDetailsPopoup.js +2 -0
- package/src/View/Layout/SaveLayoutButton.js +1 -1
- package/src/View/Layout/Wizard/LayoutWizard.js +1 -1
- package/src/View/Query/Wizard/NamedQueryExpressionWizardSection.js +1 -1
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +8 -1
- package/src/agGrid/ActionColumnRenderer.d.ts +1 -1
- package/src/agGrid/ActionColumnRenderer.js +5 -1
- package/src/agGrid/Adaptable.d.ts +21 -10
- package/src/agGrid/Adaptable.js +164 -63
- package/src/agGrid/BadgeRenderer.js +10 -2
- package/src/agGrid/CheckboxRenderer.d.ts +1 -2
- package/src/agGrid/agGridHelper.js +4 -5
- package/src/agGrid/agGridMenuHelper.js +4 -0
- package/src/agGrid/attachAddaptableColumnTypes.d.ts +11 -11
- package/src/agGrid/editors/AdaptableDateEditor/index.js +2 -0
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +2 -2
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +6 -3
- package/src/components/AdaptableIconComponent/index.js +6 -3
- package/src/components/ExpressionEditor/BaseEditorInput.js +2 -0
- package/src/components/ExpressionEditor/index.js +1 -1
- package/src/components/IconSelector/IconSelector.d.ts +2 -0
- package/src/components/IconSelector/IconSelector.js +21 -5
- package/src/components/Input/NumberInput.d.ts +10 -0
- package/src/components/Input/NumberInput.js +46 -0
- package/src/metamodel/adaptable.metamodel.d.ts +230 -145
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +14 -8
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/AdaptableOptions/GeneralOptions.d.ts +0 -159
- package/src/Api/Events/SearchChanged.d.ts +0 -12
- package/src/Api/Implementation/ActionApiImpl.d.ts +0 -14
- /package/src/AdaptableOptions/{ActionOptions.js → ActionColumnOptions.js} +0 -0
- /package/src/AdaptableOptions/{GeneralOptions.js → ActionRowOptions.js} +0 -0
- /package/src/{Api/ActionApi.js → AdaptableOptions/CalendarOptions.js} +0 -0
- /package/src/{Api/Events/SearchChanged.js → AdaptableOptions/CellSummaryOptions.js} +0 -0
- /package/src/{Api/QueryLanguageApi.js → AdaptableOptions/CustomSortOptions.js} +0 -0
|
@@ -21,7 +21,7 @@ exports.renderCalculatedColumnExpressionSummary = renderCalculatedColumnExpressi
|
|
|
21
21
|
const isValidCalculatedColumnExpression = (data, api) => {
|
|
22
22
|
var _a;
|
|
23
23
|
const calculatedColumnExpressionService = api.internalApi.getCalculatedColumnExpressionService();
|
|
24
|
-
const expression = (_a = api.
|
|
24
|
+
const expression = (_a = api.expressionApi.getAdaptableQueryExpression(data.Query)) === null || _a === void 0 ? void 0 : _a.trim();
|
|
25
25
|
if (!expression) {
|
|
26
26
|
return 'Calculated column expression cannot be empty';
|
|
27
27
|
}
|
|
@@ -17,7 +17,7 @@ const CellSummaryStatusPanel = () => {
|
|
|
17
17
|
const module = adaptable.ModuleService.getModuleById(ModuleConstants.CellSummaryModuleId);
|
|
18
18
|
const text = `${cellSummaryApi.getCurrentCellSummaryOperation()}: ${(_a = cellSummaryApi.getCurrentCellSummaryOperationValue()) !== null && _a !== void 0 ? _a : 'N/A'}`;
|
|
19
19
|
const onAction = () => {
|
|
20
|
-
adaptable.api.cellSummaryApi.
|
|
20
|
+
adaptable.api.cellSummaryApi.openCellSummaryPopupSettingsPanel();
|
|
21
21
|
};
|
|
22
22
|
React.useEffect(() => {
|
|
23
23
|
let cleanupEvent = () => null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IconSelectorProps } from '../../../components/IconSelector';
|
|
3
|
+
/**
|
|
4
|
+
* This component connects to adaptable to retrieve custom icons
|
|
5
|
+
*/
|
|
6
|
+
export declare const AdaptableIconSelector: React.FunctionComponent<IconSelectorProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdaptableIconSelector = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const IconSelector_1 = require("../../../components/IconSelector");
|
|
7
|
+
const AdaptableContext_1 = require("../../AdaptableContext");
|
|
8
|
+
/**
|
|
9
|
+
* This component connects to adaptable to retrieve custom icons
|
|
10
|
+
*/
|
|
11
|
+
const AdaptableIconSelector = (props) => {
|
|
12
|
+
var _a, _b;
|
|
13
|
+
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
14
|
+
const userInterfaceOptions = (_a = adaptable.api.optionsApi.getAdaptableOptions()) === null || _a === void 0 ? void 0 : _a.userInterfaceOptions;
|
|
15
|
+
const customDefinedIcons = (_b = userInterfaceOptions.customIcons) !== null && _b !== void 0 ? _b : [];
|
|
16
|
+
return React.createElement(IconSelector_1.IconSelector, Object.assign({ customIcons: customDefinedIcons }, props));
|
|
17
|
+
};
|
|
18
|
+
exports.AdaptableIconSelector = AdaptableIconSelector;
|
|
@@ -126,9 +126,9 @@ const AdaptableObjectListItem = (props) => {
|
|
|
126
126
|
const showEditButton = Boolean(EditWizard);
|
|
127
127
|
const adaptableOpttions = adaptable.api.optionsApi.getAdaptableOptions();
|
|
128
128
|
const disableDeleteConfirmationState = (0, react_redux_1.useSelector)((adaptableState) => SystemRedux.SystemDisableDeleteConfirmationSelector(adaptableState.System));
|
|
129
|
-
const disableDeleteConfirmation = disableDeleteConfirmationState || ((_h = adaptableOpttions === null || adaptableOpttions === void 0 ? void 0 : adaptableOpttions.
|
|
129
|
+
const disableDeleteConfirmation = disableDeleteConfirmationState || ((_h = adaptableOpttions === null || adaptableOpttions === void 0 ? void 0 : adaptableOpttions.userInterfaceOptions) === null || _h === void 0 ? void 0 : _h.disableDeleteConfirmation);
|
|
130
130
|
return (React.createElement(React.Fragment, null,
|
|
131
|
-
React.createElement(exports.AdaptableObjectListItemView, { module: props.module, disableDeleteConfirmation: disableDeleteConfirmation, abObject: props.data.abObject, accessLevel: accessLevel, actions: actions, className: itemClassName, handleOnEdit: handleOnEdit, items: props.data.items, showActions: showActions, showEditButton: showEditButton, style: props.data.style, teamSharingActivated: teamSharingActivated, onShare: (config) => adaptable.api.teamSharingApi.
|
|
131
|
+
React.createElement(exports.AdaptableObjectListItemView, { module: props.module, disableDeleteConfirmation: disableDeleteConfirmation, abObject: props.data.abObject, accessLevel: accessLevel, actions: actions, className: itemClassName, handleOnEdit: handleOnEdit, items: props.data.items, showActions: showActions, showEditButton: showEditButton, style: props.data.style, teamSharingActivated: teamSharingActivated, onShare: (config) => adaptable.api.teamSharingApi.shareAdaptableEntity(props.data.abObject, props.module.moduleInfo.ModuleName, config), entityType: entityType, deleteAction: deleteAction, deleteDisabled: props.deleteDisabled, deleteTooltip: props.deleteTooltip, editDisabled: isEditDisabled, suspendedEnabled: hasSuspend, onSuspend: () => dispatch(viewOptions.getSuspendAction(props.data.abObject)), onUnSuspend: () => dispatch(viewOptions.getUnSuspendAction(props.data.abObject)) }),
|
|
132
132
|
isEditWizardVisible && EditWizard && (React.createElement(EditWizard, { defaultCurrentSectionName: wizardStepName, moduleInfo: props.module.moduleInfo, data: props.data.abObject, configEntities: null, onCloseWizard: handleCloseWizard, onFinishWizard: handleCloseWizard }))));
|
|
133
133
|
};
|
|
134
134
|
exports.AdaptableObjectListItem = AdaptableObjectListItem;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AdaptableIconComponentProps } from '../../../components/AdaptableIconComponent';
|
|
3
|
+
export interface AdaptableViewIconProps extends AdaptableIconComponentProps {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* This component is a wrapper around AdaptableIconComponent
|
|
7
|
+
* It connects to adaptable and handles custom icons
|
|
8
|
+
* @param props
|
|
9
|
+
*/
|
|
10
|
+
export declare const AdaptableViewIcon: React.FunctionComponent<AdaptableViewIconProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdaptableViewIcon = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const AdaptableIconComponent_1 = require("../../../components/AdaptableIconComponent");
|
|
7
|
+
const AdaptableContext_1 = require("../../AdaptableContext");
|
|
8
|
+
/**
|
|
9
|
+
* This component is a wrapper around AdaptableIconComponent
|
|
10
|
+
* It connects to adaptable and handles custom icons
|
|
11
|
+
* @param props
|
|
12
|
+
*/
|
|
13
|
+
const AdaptableViewIcon = (_a) => {
|
|
14
|
+
var iconProps = tslib_1.__rest(_a, []);
|
|
15
|
+
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
16
|
+
return React.createElement(AdaptableIconComponent_1.AdaptableIconComponent, Object.assign({}, iconProps));
|
|
17
|
+
};
|
|
18
|
+
exports.AdaptableViewIcon = AdaptableViewIcon;
|
|
@@ -9,17 +9,17 @@ const isAdaptableRuleValid = (abObject, api, context) => {
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
if ((_f = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _f === void 0 ? void 0 : _f.BooleanExpression) {
|
|
12
|
-
if (!api.
|
|
12
|
+
if (!api.expressionApi.isValidBooleanExpression((_g = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _g === void 0 ? void 0 : _g.BooleanExpression, context.moduleInfo.ModuleName)) {
|
|
13
13
|
return 'The Expression is not a valid Boolean Expression';
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
if ((_h = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _h === void 0 ? void 0 : _h.ObservableExpression) {
|
|
17
|
-
if (!api.
|
|
17
|
+
if (!api.expressionApi.isValidObservableExpression((_j = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _j === void 0 ? void 0 : _j.ObservableExpression, context.moduleInfo.ModuleName)) {
|
|
18
18
|
return 'The Expression is not a valid Observable Expression';
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
if ((_k = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _k === void 0 ? void 0 : _k.AggregatedBooleanExpression) {
|
|
22
|
-
if (!api.
|
|
22
|
+
if (!api.expressionApi.isValidAggregatedBooleanExpression((_l = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _l === void 0 ? void 0 : _l.AggregatedBooleanExpression, context.moduleInfo.ModuleName)) {
|
|
23
23
|
return 'The Expression is not a valid Aggregated Boolean Expression';
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -13,7 +13,13 @@ const ExternalRenderer = (_a) => {
|
|
|
13
13
|
const element = ref.current;
|
|
14
14
|
const adaptableApi = adaptable.api;
|
|
15
15
|
if (render) {
|
|
16
|
-
const html = render({
|
|
16
|
+
const html = render({
|
|
17
|
+
visible: true,
|
|
18
|
+
element,
|
|
19
|
+
adaptableApi,
|
|
20
|
+
userName: adaptableApi.optionsApi.getUserName(),
|
|
21
|
+
adaptableId: adaptableApi.optionsApi.getAdaptableId(),
|
|
22
|
+
});
|
|
17
23
|
setContentsHTML(html);
|
|
18
24
|
}
|
|
19
25
|
else if (frameworkComponent) {
|
|
@@ -21,7 +27,13 @@ const ExternalRenderer = (_a) => {
|
|
|
21
27
|
}
|
|
22
28
|
return () => {
|
|
23
29
|
if (render) {
|
|
24
|
-
render({
|
|
30
|
+
render({
|
|
31
|
+
visible: false,
|
|
32
|
+
element: element,
|
|
33
|
+
adaptableApi,
|
|
34
|
+
userName: adaptableApi.optionsApi.getUserName(),
|
|
35
|
+
adaptableId: adaptableApi.optionsApi.getAdaptableId(),
|
|
36
|
+
});
|
|
25
37
|
}
|
|
26
38
|
else if (frameworkComponent) {
|
|
27
39
|
adaptableApi.internalApi.destroyFrameworkComponent(element, frameworkComponent,
|
|
@@ -61,6 +61,8 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
61
61
|
const filterContext = {
|
|
62
62
|
column: this.props.currentColumn,
|
|
63
63
|
adaptableApi: this.props.api,
|
|
64
|
+
userName: this.props.api.optionsApi.getUserName(),
|
|
65
|
+
adaptableId: this.props.api.optionsApi.getAdaptableId(),
|
|
64
66
|
};
|
|
65
67
|
showQuickFilterDropdown = !hideQuickFilterDropdownFunction(filterContext);
|
|
66
68
|
}
|
|
@@ -70,6 +72,8 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
70
72
|
const filterContext = {
|
|
71
73
|
column: this.props.currentColumn,
|
|
72
74
|
adaptableApi: this.props.api,
|
|
75
|
+
userName: this.props.api.optionsApi.getUserName(),
|
|
76
|
+
adaptableId: this.props.api.optionsApi.getAdaptableId(),
|
|
73
77
|
};
|
|
74
78
|
showQuickFilterInput = !hideQuickFilterInputFunction(filterContext);
|
|
75
79
|
}
|
|
@@ -41,6 +41,8 @@ const AdaptablePopupAlert = (props) => {
|
|
|
41
41
|
alert: props.adaptableAlert,
|
|
42
42
|
adaptableApi: api,
|
|
43
43
|
formData: formData,
|
|
44
|
+
userName: api.optionsApi.getUserName(),
|
|
45
|
+
adaptableId: api.optionsApi.getAdaptableId(),
|
|
44
46
|
};
|
|
45
47
|
}, [JSON.stringify(formData), props.adaptableAlert]);
|
|
46
48
|
const adaptableForm = React.useMemo(() => {
|
|
@@ -26,17 +26,17 @@ export declare class RangesComponent extends React.Component<RangesComponentProp
|
|
|
26
26
|
render(): JSX.Element;
|
|
27
27
|
private onRangesTypeChanged;
|
|
28
28
|
private handleRangeValueTypeChange;
|
|
29
|
-
changeRangeMin(index: number, value:
|
|
30
|
-
changeRangeMax(index: number, value:
|
|
29
|
+
changeRangeMin(index: number, value: number): void;
|
|
30
|
+
changeRangeMax(index: number, value: number): void;
|
|
31
31
|
changeRangeColor(index: number, value: string): void;
|
|
32
32
|
changeRangeDirectionUp(index: number, checked: boolean): void;
|
|
33
33
|
removeRange(index: number): void;
|
|
34
34
|
setRangeColMin(range: CellColorRange): void;
|
|
35
35
|
setRangeColMax(range: CellColorRange): void;
|
|
36
36
|
addRange(): void;
|
|
37
|
-
changeColumnComparisonMinValue(
|
|
37
|
+
changeColumnComparisonMinValue(value: number): void;
|
|
38
38
|
private onMinColumnSelectedChanged;
|
|
39
|
-
changeColumnComparisonMaxValue(
|
|
39
|
+
changeColumnComparisonMaxValue(value: number): void;
|
|
40
40
|
private onMaxColumnSelectedChanged;
|
|
41
41
|
changeColumnComparisonColor(value: string): void;
|
|
42
42
|
}
|
|
@@ -6,10 +6,9 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const rebass_1 = require("rebass");
|
|
7
7
|
const ColorPicker_1 = require("../../components/ColorPicker");
|
|
8
8
|
const clamp_1 = tslib_1.__importDefault(require("lodash/clamp"));
|
|
9
|
-
const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
|
|
10
9
|
const CheckBox_1 = require("../../components/CheckBox");
|
|
11
10
|
const FormLayout_1 = tslib_1.__importStar(require("../../components/FormLayout"));
|
|
12
|
-
const
|
|
11
|
+
const NumberInput_1 = require("../../components/Input/NumberInput");
|
|
13
12
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
14
13
|
const UIHelper_1 = require("../UIHelper");
|
|
15
14
|
const ColumnSelector_1 = require("./Selectors/ColumnSelector");
|
|
@@ -62,18 +61,16 @@ class RangesComponent extends React.Component {
|
|
|
62
61
|
_b.map((range, index, list) => (React.createElement(rebass_1.Flex, { key: index, alignItems: "end", mb: 2, "data-name": "percent-bar-range" },
|
|
63
62
|
React.createElement(rebass_1.Flex, { flexDirection: "column" },
|
|
64
63
|
isRangeValueTypeNumber && index === 0 && (React.createElement(CheckBox_1.CheckBox, { onClick: () => this.setRangeColMin(range), checked: range.Min === 'Col-Min', mt: 0, mb: 1, fontSize: 3, disabled: this.props.disabled }, "Col Min")),
|
|
65
|
-
React.createElement(
|
|
64
|
+
React.createElement(NumberInput_1.NumberInput, { disabled: this.props.disabled ||
|
|
66
65
|
range.Min === 'Col-Min' ||
|
|
67
|
-
(index === 0 && !isRangeValueTypeNumber), value: range.Min, onChange: (
|
|
68
|
-
const { value } = event.target;
|
|
66
|
+
(index === 0 && !isRangeValueTypeNumber), value: range.Min, onChange: (value) => {
|
|
69
67
|
this.changeRangeMin(index, value);
|
|
70
68
|
}, mr: 2 })),
|
|
71
69
|
React.createElement(rebass_1.Flex, { flexDirection: "column" },
|
|
72
70
|
isRangeValueTypeNumber && index === list.length - 1 && (React.createElement(CheckBox_1.CheckBox, { mt: 0, mb: 1, onClick: () => this.setRangeColMax(range), checked: range.Max === 'Col-Max', fontSize: 3, disabled: this.props.disabled }, "Col Max")),
|
|
73
|
-
React.createElement(
|
|
71
|
+
React.createElement(NumberInput_1.NumberInput, { value: range.Max, disabled: this.props.disabled ||
|
|
74
72
|
range.Max === 'Col-Max' ||
|
|
75
|
-
(index === list.length - 1 && !isRangeValueTypeNumber), onChange: (
|
|
76
|
-
const { value } = event.target;
|
|
73
|
+
(index === list.length - 1 && !isRangeValueTypeNumber), onChange: (value) => {
|
|
77
74
|
this.changeRangeMax(index, value);
|
|
78
75
|
}, mr: 2 })),
|
|
79
76
|
React.createElement(rebass_1.Flex, { alignItems: "center", height: "100%" },
|
|
@@ -94,12 +91,12 @@ class RangesComponent extends React.Component {
|
|
|
94
91
|
this.props.api.internalApi.getCorrectEnglishVariant('Colour'),
|
|
95
92
|
" for the Bar."),
|
|
96
93
|
React.createElement(FormLayout_1.default, { columns: ['label', 'first', 'or', 'second'], sizes: ['auto', 'auto', 'auto', '1fr'] },
|
|
97
|
-
React.createElement(FormLayout_1.FormRow, { label: "Min Value:", first: React.createElement(
|
|
98
|
-
this.changeColumnComparisonMinValue(
|
|
94
|
+
React.createElement(FormLayout_1.FormRow, { label: "Min Value:", first: React.createElement(NumberInput_1.NumberInput, { disabled: this.props.disabled, type: "number", value: comparisonMinValueNumber, onChange: (value) => {
|
|
95
|
+
this.changeColumnComparisonMinValue(value);
|
|
99
96
|
} }), or: "OR", second: React.createElement(ColumnSelector_1.ColumnSelector, { disabled: this.props.disabled, style: { maxWidth: '15rem' }, SelectedColumnIds: [comparisonMinValueColumnId], ColumnList: this.props.api.columnApi.getNumericColumns(), onColumnChange: (columns) => this.onMinColumnSelectedChanged(columns), SelectionMode: Enums_1.SelectionMode.Single }) }),
|
|
100
97
|
' ',
|
|
101
|
-
React.createElement(FormLayout_1.FormRow, { label: "Max Value:", first: React.createElement(
|
|
102
|
-
this.changeColumnComparisonMaxValue(
|
|
98
|
+
React.createElement(FormLayout_1.FormRow, { label: "Max Value:", first: React.createElement(NumberInput_1.NumberInput, { disabled: this.props.disabled, type: "number", value: comparisonMaxValueNumber, onChange: (value) => {
|
|
99
|
+
this.changeColumnComparisonMaxValue(value);
|
|
103
100
|
} }), or: "OR", second: React.createElement(ColumnSelector_1.ColumnSelector, { disabled: this.props.disabled, style: { maxWidth: '15rem' }, SelectedColumnIds: [comparisonMaxValueColumnId], ColumnList: this.props.api.columnApi.getNumericColumns(), onColumnChange: (columns) => this.onMaxColumnSelectedChanged(columns), SelectionMode: Enums_1.SelectionMode.Single }) }),
|
|
104
101
|
React.createElement(FormLayout_1.FormRow, { label: `Bar ${this.props.api.internalApi.getCorrectEnglishVariant('Colour')}`, first: React.createElement(ColorPicker_1.ColorPicker, { disabled: this.props.disabled, api: this.props.api, value: comparisonColor, onChange: (color) => {
|
|
105
102
|
this.changeColumnComparisonColor(color);
|
|
@@ -210,12 +207,9 @@ class RangesComponent extends React.Component {
|
|
|
210
207
|
const newRanges = [...this.props.ranges.slice(0, -1), previousRange, newRange];
|
|
211
208
|
this.props.updateRanges(newRanges);
|
|
212
209
|
}
|
|
213
|
-
changeColumnComparisonMinValue(
|
|
214
|
-
let e = event.target;
|
|
210
|
+
changeColumnComparisonMinValue(value) {
|
|
215
211
|
const { columnComparison } = this.props;
|
|
216
|
-
columnComparison.MinValue =
|
|
217
|
-
? Number(e.value)
|
|
218
|
-
: undefined;
|
|
212
|
+
columnComparison.MinValue = value;
|
|
219
213
|
this.props.updateColumnComparison(columnComparison);
|
|
220
214
|
}
|
|
221
215
|
onMinColumnSelectedChanged(columns) {
|
|
@@ -223,12 +217,9 @@ class RangesComponent extends React.Component {
|
|
|
223
217
|
columnComparison.MinValue = columns.length > 0 ? columns[0].columnId : undefined;
|
|
224
218
|
this.props.updateColumnComparison(columnComparison);
|
|
225
219
|
}
|
|
226
|
-
changeColumnComparisonMaxValue(
|
|
227
|
-
let e = event.target;
|
|
220
|
+
changeColumnComparisonMaxValue(value) {
|
|
228
221
|
const { columnComparison } = this.props;
|
|
229
|
-
columnComparison.MaxValue =
|
|
230
|
-
? Number(e.value)
|
|
231
|
-
: undefined;
|
|
222
|
+
columnComparison.MaxValue = value;
|
|
232
223
|
this.props.updateColumnComparison(columnComparison);
|
|
233
224
|
}
|
|
234
225
|
onMaxColumnSelectedChanged(columns) {
|
|
@@ -149,6 +149,8 @@ const AdaptableToolPanelComponent = (props) => {
|
|
|
149
149
|
// with the next opportunity we should abstract it
|
|
150
150
|
const toolPanelContext = {
|
|
151
151
|
adaptableApi: props.api,
|
|
152
|
+
userName: props.api.optionsApi.getUserName(),
|
|
153
|
+
adaptableId: props.api.optionsApi.getAdaptableId(),
|
|
152
154
|
toolPanelState: props.api.toolPanelApi.getToolPanelState(),
|
|
153
155
|
};
|
|
154
156
|
const buttonIcon = props.api.internalApi.getIconForButton(button, toolPanelContext);
|
|
@@ -23,6 +23,8 @@ const CustomToolPanelContent = (props) => {
|
|
|
23
23
|
visible: true,
|
|
24
24
|
element,
|
|
25
25
|
adaptableApi: api,
|
|
26
|
+
userName: api.optionsApi.getUserName(),
|
|
27
|
+
adaptableId: api.optionsApi.getAdaptableId(),
|
|
26
28
|
};
|
|
27
29
|
const html = customToolPanel.render(customRenderContext);
|
|
28
30
|
setContentsHTML(html);
|
|
@@ -32,7 +34,13 @@ const CustomToolPanelContent = (props) => {
|
|
|
32
34
|
}
|
|
33
35
|
return () => {
|
|
34
36
|
if (hasCustomRenderFn(customToolPanel)) {
|
|
35
|
-
customToolPanel.render({
|
|
37
|
+
customToolPanel.render({
|
|
38
|
+
visible: false,
|
|
39
|
+
element,
|
|
40
|
+
adaptableApi: api,
|
|
41
|
+
userName: api.optionsApi.getUserName(),
|
|
42
|
+
adaptableId: api.optionsApi.getAdaptableId(),
|
|
43
|
+
});
|
|
36
44
|
}
|
|
37
45
|
else if (hasCustomFrameworkComponent(customToolPanel) && !api.isDestroyed()) {
|
|
38
46
|
api.internalApi.destroyFrameworkComponent(element, customToolPanel.frameworkComponent, 'toolPanel');
|
|
@@ -46,6 +54,8 @@ const CustomToolPanelContent = (props) => {
|
|
|
46
54
|
// with the next opportunity we should abstract it
|
|
47
55
|
const toolPanelContext = {
|
|
48
56
|
adaptableApi: api,
|
|
57
|
+
userName: api.optionsApi.getUserName(),
|
|
58
|
+
adaptableId: api.optionsApi.getAdaptableId(),
|
|
49
59
|
toolPanelState: api.toolPanelApi.getToolPanelState(),
|
|
50
60
|
customToolPanel: customToolPanel,
|
|
51
61
|
};
|
|
@@ -27,7 +27,7 @@ const CustomSortColumnWizardSection = (props) => {
|
|
|
27
27
|
const sortableCols = React.useMemo(() => {
|
|
28
28
|
const sortableColumns = api.columnApi.getSortableColumns();
|
|
29
29
|
const customSorts = api.customSortApi.getCustomSorts();
|
|
30
|
-
const columnSortComparers = api.optionsApi.
|
|
30
|
+
const columnSortComparers = api.optionsApi.getCustomSortOptions().customSortComparers || [];
|
|
31
31
|
const usedColumnIds = [
|
|
32
32
|
...customSorts.map((customSort) => customSort.ColumnId),
|
|
33
33
|
...columnSortComparers.map((comparer) => api.scopeApi.getColumnIdsInScope(comparer.scope)),
|
|
@@ -13,6 +13,8 @@ const CustomDashboardButton = (props) => {
|
|
|
13
13
|
// with the next opportunity we should abstract it
|
|
14
14
|
const dashboardContext = {
|
|
15
15
|
adaptableApi: props.api,
|
|
16
|
+
userName: props.api.optionsApi.getUserName(),
|
|
17
|
+
adaptableId: props.api.optionsApi.getAdaptableId(),
|
|
16
18
|
dashboardState: props.api.dashboardApi.getDashboardState(),
|
|
17
19
|
};
|
|
18
20
|
const buttonIcon = props.api.internalApi.getIconForButton(button, dashboardContext);
|
|
@@ -23,6 +23,8 @@ const CustomToolbarWrapper = (props) => {
|
|
|
23
23
|
visible: true,
|
|
24
24
|
element,
|
|
25
25
|
adaptableApi,
|
|
26
|
+
userName: adaptableApi.optionsApi.getUserName(),
|
|
27
|
+
adaptableId: adaptableApi.optionsApi.getAdaptableId(),
|
|
26
28
|
});
|
|
27
29
|
setContentsHTML(html);
|
|
28
30
|
}
|
|
@@ -33,7 +35,13 @@ const CustomToolbarWrapper = (props) => {
|
|
|
33
35
|
// cleanup runs in a separate effect, this way it's executed only once on unmount
|
|
34
36
|
return () => {
|
|
35
37
|
if (props.customToolbar.render) {
|
|
36
|
-
props.customToolbar.render({
|
|
38
|
+
props.customToolbar.render({
|
|
39
|
+
visible: false,
|
|
40
|
+
element,
|
|
41
|
+
adaptableApi,
|
|
42
|
+
userName: adaptableApi.optionsApi.getUserName(),
|
|
43
|
+
adaptableId: adaptableApi.optionsApi.getAdaptableId(),
|
|
44
|
+
});
|
|
37
45
|
}
|
|
38
46
|
};
|
|
39
47
|
}, []);
|
|
@@ -60,6 +68,8 @@ const CustomToolbarWrapper = (props) => {
|
|
|
60
68
|
const customToolbarConfiguredInfo = {
|
|
61
69
|
adaptableApi: api,
|
|
62
70
|
customToolbar: props.customToolbar,
|
|
71
|
+
userName: api.optionsApi.getUserName(),
|
|
72
|
+
adaptableId: api.optionsApi.getAdaptableId(),
|
|
63
73
|
};
|
|
64
74
|
api.eventApi.emit('CustomToolbarConfigured', customToolbarConfiguredInfo);
|
|
65
75
|
}, accessLevel: api.internalApi
|
|
@@ -73,6 +83,8 @@ const CustomToolbarWrapper = (props) => {
|
|
|
73
83
|
const dashboardContext = {
|
|
74
84
|
customToolbar: props.customToolbar,
|
|
75
85
|
adaptableApi: api,
|
|
86
|
+
userName: api.optionsApi.getUserName(),
|
|
87
|
+
adaptableId: api.optionsApi.getAdaptableId(),
|
|
76
88
|
dashboardState: api.dashboardApi.getDashboardState(),
|
|
77
89
|
};
|
|
78
90
|
const buttonIcon = api.internalApi.getIconForButton(button, dashboardContext);
|
|
@@ -23,9 +23,13 @@ const DataChangeHistoryGrid = (props) => {
|
|
|
23
23
|
const initializeAdaptableGrid = async () => {
|
|
24
24
|
const gridOptions = buildGridOptions(mainAdaptableInstance, changeHistoryLog);
|
|
25
25
|
const adaptableOptions = buildAdaptableOptions(mainAdaptableInstance, gridOptions, adaptableContainerId, agGridContainerId, undoChangeEnabled, onUndoChange);
|
|
26
|
+
const agGridOptions = {
|
|
27
|
+
gridOptions,
|
|
28
|
+
modules: mainAdaptableInstance.getAgGridRegisteredModules(),
|
|
29
|
+
};
|
|
26
30
|
// to avoid direct dependency to Adaptable.ts and thus creating a circular dependency;
|
|
27
31
|
const adaptableInitFn = Object.getPrototypeOf(mainAdaptableInstance).constructor.init;
|
|
28
|
-
const dataChangeHistoryAdaptableApi = await adaptableInitFn(adaptableOptions);
|
|
32
|
+
const dataChangeHistoryAdaptableApi = await adaptableInitFn(adaptableOptions, agGridOptions);
|
|
29
33
|
setAdaptableApi(dataChangeHistoryAdaptableApi);
|
|
30
34
|
};
|
|
31
35
|
initializeAdaptableGrid();
|
|
@@ -64,7 +68,7 @@ const DataChangeHistoryGrid = (props) => {
|
|
|
64
68
|
// 2. this UI will be reimplemented with Infinite Table anyway
|
|
65
69
|
const addedRows = mapChangeHistoryRowData(addedChangeHistoryLogs, mainAdaptableInstance);
|
|
66
70
|
const removedRows = mapChangeHistoryRowData(removedChangeHistoryLogs, mainAdaptableInstance);
|
|
67
|
-
adaptableApi.
|
|
71
|
+
adaptableApi.gridApi.getAgGridInstance().api.applyTransactionAsync({
|
|
68
72
|
add: addedRows,
|
|
69
73
|
remove: removedRows,
|
|
70
74
|
});
|
|
@@ -81,10 +85,10 @@ const buildAdaptableOptions = (mainAdaptableInstance, gridOptions, adaptableCont
|
|
|
81
85
|
const changeKey = rowData === null || rowData === void 0 ? void 0 : rowData['changeKey'];
|
|
82
86
|
changeKey && onUndoChange(changeKey);
|
|
83
87
|
};
|
|
84
|
-
const actionColumnButton = (0, buildActionColumnButton_1.buildActionColumnButton)((_a = mainAdaptableInstance.adaptableOptions) === null || _a === void 0 ? void 0 : _a.dataChangeHistoryOptions, undoRowNode);
|
|
85
|
-
let
|
|
88
|
+
const actionColumnButton = (0, buildActionColumnButton_1.buildActionColumnButton)((_a = mainAdaptableInstance.adaptableOptions) === null || _a === void 0 ? void 0 : _a.dataChangeHistoryOptions, mainAdaptableInstance.api, undoRowNode);
|
|
89
|
+
let actionColumnOptions = undefined;
|
|
86
90
|
if (actionColumnButton) {
|
|
87
|
-
|
|
91
|
+
actionColumnOptions = {
|
|
88
92
|
actionColumns: [
|
|
89
93
|
{
|
|
90
94
|
columnId: 'undoActionColumn',
|
|
@@ -97,7 +101,7 @@ const buildAdaptableOptions = (mainAdaptableInstance, gridOptions, adaptableCont
|
|
|
97
101
|
};
|
|
98
102
|
}
|
|
99
103
|
const options = {
|
|
100
|
-
|
|
104
|
+
_gridOptions: gridOptions,
|
|
101
105
|
primaryKey: 'primaryKey',
|
|
102
106
|
licenseKey: mainAdaptableOptions.licenseKey,
|
|
103
107
|
userName: `${mainAdaptableOptions.userName}`,
|
|
@@ -116,7 +120,7 @@ const buildAdaptableOptions = (mainAdaptableInstance, gridOptions, adaptableCont
|
|
|
116
120
|
createDefaultLayout: false,
|
|
117
121
|
autoSizeColumnsInLayout: true,
|
|
118
122
|
},
|
|
119
|
-
|
|
123
|
+
actionColumnOptions: actionColumnOptions,
|
|
120
124
|
predefinedConfig: {
|
|
121
125
|
Layout: {
|
|
122
126
|
Revision: Date.now(),
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IRowNode } from '@ag-grid-community/core';
|
|
2
|
-
import { ActionColumnContext, AdaptableButton, DataChangeHistoryOptions } from '../../types';
|
|
3
|
-
export declare const buildActionColumnButton: (options: DataChangeHistoryOptions, undoRowNode: (rowNode: IRowNode) => void) => AdaptableButton<ActionColumnContext<any>>[];
|
|
2
|
+
import { ActionColumnContext, AdaptableApi, AdaptableButton, DataChangeHistoryOptions } from '../../types';
|
|
3
|
+
export declare const buildActionColumnButton: (options: DataChangeHistoryOptions, parentAdapTableApi: AdaptableApi, undoRowNode: (rowNode: IRowNode) => void) => AdaptableButton<ActionColumnContext<any>>[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildActionColumnButton = void 0;
|
|
4
|
-
const buildActionColumnButton = (options, undoRowNode) => {
|
|
4
|
+
const buildActionColumnButton = (options, parentAdapTableApi, undoRowNode) => {
|
|
5
5
|
let changeHistoryButtons = options.changeHistoryButton;
|
|
6
6
|
if (!changeHistoryButtons ||
|
|
7
7
|
(Array.isArray(changeHistoryButtons) && changeHistoryButtons.length === 0)) {
|
|
@@ -27,7 +27,8 @@ const buildActionColumnButton = (options, undoRowNode) => {
|
|
|
27
27
|
};
|
|
28
28
|
const buildContext = (context) => {
|
|
29
29
|
const dataChangedInfo = context.rowNode.data.changeInfo;
|
|
30
|
-
return Object.assign(Object.assign({}, context), { isGroupNode: isGroupNode(context), undoDataChange: () => onUndo(context), dataChangedInfo
|
|
30
|
+
return Object.assign(Object.assign({}, context), { isGroupNode: isGroupNode(context), undoDataChange: () => onUndo(context), dataChangedInfo,
|
|
31
|
+
parentAdapTableApi });
|
|
31
32
|
};
|
|
32
33
|
return changeHistoryButtons.map((actionColumnOption) => ({
|
|
33
34
|
label: (button, context) => {
|
|
@@ -25,5 +25,5 @@ declare class ExportViewPanelComponent extends React.Component<ExportViewPanelCo
|
|
|
25
25
|
private isCustomDestination;
|
|
26
26
|
private onNewReportSchedule;
|
|
27
27
|
}
|
|
28
|
-
export declare let ExportViewPanelControl: import("react-redux").ConnectedComponent<typeof ExportViewPanelComponent, import("react-redux").Omit<React.ClassAttributes<ExportViewPanelComponent> & ExportViewPanelComponentProps, "api" | "accessLevel" | "moduleInfo" | "
|
|
28
|
+
export declare let ExportViewPanelControl: import("react-redux").ConnectedComponent<typeof ExportViewPanelComponent, import("react-redux").Omit<React.ClassAttributes<ExportViewPanelComponent> & ExportViewPanelComponentProps, "api" | "accessLevel" | "moduleInfo" | "Columns" | "CurrentReport" | "CurrentDestination" | "viewType" | "onApplyExport" | "onSelectReport" | "onSelectDestination" | "onNewReport" | "onEditReport" | "onNewReportSchedule" | "UserReports">>;
|
|
29
29
|
export {};
|
|
@@ -85,7 +85,7 @@ class ExportViewPanelComponent extends React.Component {
|
|
|
85
85
|
React.createElement(DropdownButton_1.default, { disabled: currentReportId === constants_1.SELECT_REPORT_STRING, width: "100%", fontSize: "small", items: destinationItems, columns: ['label'], className: `ab-${elementType}__Export__export`, onClear: () => this.onSelectedDestinationChanged(null), showClearButton: !!currentDestination, variant: "outlined", marginRight: 2 }, currentDestinationId)),
|
|
86
86
|
React.createElement(rebass_1.Flex, { className: (0, join_1.default)(accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__Export__controls`), style: { width: '100%' } },
|
|
87
87
|
React.createElement(ButtonExport_1.ButtonExport, { onClick: () => onApplyExport(), tooltip: "Export Report", className: `ab-${elementType}__Export__export`, disabled: currentReport == null || currentDestination == null }),
|
|
88
|
-
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.
|
|
88
|
+
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 }),
|
|
89
89
|
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 }),
|
|
90
90
|
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 }),
|
|
91
91
|
this.props.api.internalApi
|
|
@@ -103,9 +103,9 @@ class ExportViewPanelComponent extends React.Component {
|
|
|
103
103
|
...this.props.api.exportApi.getAvailableSystemReports(),
|
|
104
104
|
...this.props.UserReports.map((r) => r.Name),
|
|
105
105
|
];
|
|
106
|
-
const
|
|
107
|
-
if (ArrayExtensions_1.default.IsNotNullOrEmpty(
|
|
108
|
-
reportNames.push(...
|
|
106
|
+
const externalReports = this.props.api.exportApi.getExternalReports();
|
|
107
|
+
if (ArrayExtensions_1.default.IsNotNullOrEmpty(externalReports)) {
|
|
108
|
+
reportNames.push(...externalReports.map((r) => r.name));
|
|
109
109
|
}
|
|
110
110
|
return reportNames;
|
|
111
111
|
}
|
|
@@ -278,7 +278,9 @@ const renderNumberFormat = (data, onChange, setFormatOption, scopedCustomFormatt
|
|
|
278
278
|
? (0, clamp_1.default)(Number(e.currentTarget.value), 0, 20)
|
|
279
279
|
: undefined) })),
|
|
280
280
|
React.createElement(FormLayout_1.FormRow, { label: "Integer Digits" },
|
|
281
|
-
React.createElement(Input_1.default, { "data-name": "integer-digits", type: "number", min: "0", value: data.DisplayFormat.Options.IntegerDigits, onChange: (e) => setFormatOption('IntegerDigits',
|
|
281
|
+
React.createElement(Input_1.default, { "data-name": "integer-digits", type: "number", min: "0", value: data.DisplayFormat.Options.IntegerDigits, onChange: (e) => setFormatOption('IntegerDigits', StringExtensions_1.default.IsNumeric(e.currentTarget.value)
|
|
282
|
+
? (0, clamp_1.default)(Number(e.currentTarget.value), 0, 20)
|
|
283
|
+
: undefined) })),
|
|
282
284
|
React.createElement(FormLayout_1.FormRow, { label: "Multiplier" },
|
|
283
285
|
React.createElement(Input_1.default, { "data-name": "multiplier", type: "number", value: data.DisplayFormat.Options.Multiplier, onChange: (e) => setFormatOption('Multiplier', Number(e.currentTarget.value)) })),
|
|
284
286
|
' ',
|
|
@@ -11,7 +11,6 @@ export interface AdaptableGridInfoState {
|
|
|
11
11
|
IsContainerOptionsMinimised: boolean;
|
|
12
12
|
IsSearchOptionsMinimised: boolean;
|
|
13
13
|
IsLayoutOptionsMinimised: boolean;
|
|
14
|
-
IsGeneralOptionsMinimised: boolean;
|
|
15
14
|
}
|
|
16
15
|
export declare const GridInfoPopup: (props: GridInfoPopupProps) => JSX.Element;
|
|
17
16
|
export {};
|
|
@@ -39,7 +39,6 @@ const GridInfoPopup = (props) => {
|
|
|
39
39
|
IsContainerOptionsMinimised: true,
|
|
40
40
|
IsSearchOptionsMinimised: true,
|
|
41
41
|
IsLayoutOptionsMinimised: true,
|
|
42
|
-
IsGeneralOptionsMinimised: true,
|
|
43
42
|
});
|
|
44
43
|
const updateState = (partialState) => {
|
|
45
44
|
setState((state) => {
|
|
@@ -52,7 +51,7 @@ const GridInfoPopup = (props) => {
|
|
|
52
51
|
const calcColumns = props.api.calculatedColumnApi
|
|
53
52
|
.getCalculatedColumns()
|
|
54
53
|
.map((c) => c.ColumnId);
|
|
55
|
-
const actionColumns = props.api.
|
|
54
|
+
const actionColumns = props.api.actionColumnApi
|
|
56
55
|
.getActionColumns()
|
|
57
56
|
.map((ac) => ac.columnId);
|
|
58
57
|
const freeTextColumns = props.api.freeTextColumnApi
|
|
@@ -9,7 +9,7 @@ const CheckBox_1 = require("../../components/CheckBox");
|
|
|
9
9
|
class GridOptionsComponent extends React.Component {
|
|
10
10
|
constructor(props) {
|
|
11
11
|
super(props);
|
|
12
|
-
const gridOptions = props.api.
|
|
12
|
+
const gridOptions = props.api.gridApi.getAgGridInstance();
|
|
13
13
|
this.state = {
|
|
14
14
|
showTotalFooter: gridOptions.groupIncludeTotalFooter,
|
|
15
15
|
showGroupFooter: gridOptions.groupIncludeFooter,
|
|
@@ -24,7 +24,7 @@ class LayoutViewPanelComponent extends React.Component {
|
|
|
24
24
|
const cloneAccessLevel = this.props.accessLevel;
|
|
25
25
|
const newAccessLevel = this.props.accessLevel;
|
|
26
26
|
const accessLevel = AdaptableHelper_1.default.getAppropriateAccessLevel(layoutEntity, this.props.accessLevel);
|
|
27
|
-
const isManualSaveLayout = !this.props.api.layoutApi.
|
|
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) });
|
|
30
30
|
});
|
|
@@ -28,6 +28,8 @@ const PivotDetailsPopoup = (props) => {
|
|
|
28
28
|
layout: layout,
|
|
29
29
|
columnId: columnId,
|
|
30
30
|
adaptableApi: adaptableApi,
|
|
31
|
+
userName: adaptableApi.optionsApi.getUserName(),
|
|
32
|
+
adaptableId: adaptableApi.optionsApi.getAdaptableId(),
|
|
31
33
|
};
|
|
32
34
|
pivotPreviewExtraColumns = pivotPreviewOptionColumn(pivotPreviewColumnsContext);
|
|
33
35
|
}
|
|
@@ -16,7 +16,7 @@ const SaveLayoutButton = () => {
|
|
|
16
16
|
.getEntitlementAccessLevelForModule(ModuleConstants.LayoutModuleId);
|
|
17
17
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
18
18
|
const currentDraftLayout = (0, react_redux_1.useSelector)((state) => state.Grid.CurrentLayout);
|
|
19
|
-
const isManualSaveLayout = !adaptable.api.layoutApi.
|
|
19
|
+
const isManualSaveLayout = !adaptable.api.layoutApi.shouldAutoSaveLayouts();
|
|
20
20
|
const handleSave = React.useCallback((layout) => {
|
|
21
21
|
dispatch(LayoutRedux.LayoutSave(layout));
|
|
22
22
|
dispatch(GridRedux.LayoutUpdateCurrentDraft(null));
|
|
@@ -37,7 +37,7 @@ const LayoutWizard = (props) => {
|
|
|
37
37
|
}
|
|
38
38
|
if (preparedLayout.SuppressAggFuncInHeader === undefined) {
|
|
39
39
|
preparedLayout.SuppressAggFuncInHeader =
|
|
40
|
-
!!adaptable.api.
|
|
40
|
+
!!adaptable.api.gridApi.getAgGridInstance().suppressAggFuncInHeader;
|
|
41
41
|
}
|
|
42
42
|
return preparedLayout;
|
|
43
43
|
});
|
|
@@ -13,7 +13,7 @@ const isValidNamedQueryExpression = (data, api) => {
|
|
|
13
13
|
if (!data.BooleanExpression) {
|
|
14
14
|
return 'Expression is empty';
|
|
15
15
|
}
|
|
16
|
-
const valid = api.
|
|
16
|
+
const valid = api.expressionApi.isValidBooleanExpression(data.BooleanExpression, ModuleConstants_1.QueryModuleId);
|
|
17
17
|
if (!valid) {
|
|
18
18
|
return 'Query is not a valid Boolean Query';
|
|
19
19
|
}
|