@adaptabletools/adaptable 10.0.3 → 10.0.4-canary.3
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/LICENSE.md +1 -1
- package/README.md +1 -1
- package/base.css +16 -6
- package/bundle.cjs.js +350 -0
- package/index.css +20 -6
- package/package.json +1 -5
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +14 -12
- package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -3
- package/src/AdaptableOptions/ContainerOptions.d.ts +4 -5
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +1 -1
- package/src/AdaptableOptions/DateInputOptions.d.ts +5 -1
- package/src/AdaptableOptions/EditOptions.d.ts +2 -3
- package/src/AdaptableOptions/FilterOptions.d.ts +8 -8
- package/src/AdaptableOptions/GeneralOptions.d.ts +3 -2
- package/src/AdaptableOptions/MenuOptions.d.ts +11 -11
- package/src/AdaptableOptions/NotificationsOptions.d.ts +11 -1
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +29 -12
- package/src/Api/AdaptableApi.d.ts +12 -12
- package/src/Api/CalculatedColumnApi.d.ts +15 -0
- package/src/Api/ColumnApi.d.ts +16 -5
- package/src/Api/EventApi.d.ts +1 -1
- package/src/Api/Events/AdaptableReady.d.ts +5 -8
- package/src/Api/Events/AdaptableStateChanged.d.ts +2 -1
- package/src/Api/Events/AlertFired.d.ts +2 -1
- package/src/Api/Events/BaseEventInfo.d.ts +10 -0
- package/src/Api/Events/BaseEventInfo.js +2 -0
- package/src/Api/Events/CellChanged.d.ts +2 -1
- package/src/Api/Events/ChexboxColumnClicked.d.ts +2 -1
- package/src/Api/Events/CustomToolbarConfigured.d.ts +2 -1
- package/src/Api/Events/DashboardChanged.d.ts +2 -1
- package/src/Api/Events/FlashingAlertFired.d.ts +2 -1
- package/src/Api/Events/GridDataChanged.d.ts +2 -1
- package/src/Api/Events/LayoutChanged.d.ts +2 -1
- package/src/Api/Events/LiveDataChanged.d.ts +2 -1
- package/src/Api/Events/SearchChanged.d.ts +2 -1
- package/src/Api/Events/SelectionChanged.d.ts +2 -1
- package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +2 -1
- package/src/Api/Events/TeamSharingEntityChanged.d.ts +2 -1
- package/src/Api/Events/ThemeChanged.d.ts +2 -1
- package/src/Api/GridApi.d.ts +10 -10
- package/src/Api/Implementation/AlertApiImpl.js +17 -17
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +3 -0
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +23 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +5 -3
- package/src/Api/Implementation/ColumnApiImpl.js +43 -44
- package/src/Api/Implementation/ConfigApiImpl.js +0 -24
- package/src/Api/Implementation/DashboardApiImpl.js +2 -1
- package/src/Api/Implementation/ExportApiImpl.js +4 -4
- package/src/Api/Implementation/FormatColumnApiImpl.js +2 -1
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +7 -2
- package/src/Api/Implementation/GridApiImpl.d.ts +2 -2
- package/src/Api/Implementation/GridApiImpl.js +14 -13
- package/src/Api/Implementation/InternalApiImpl.d.ts +2 -2
- package/src/Api/Implementation/InternalApiImpl.js +5 -5
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
- package/src/Api/Implementation/LayoutApiImpl.js +19 -3
- package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -2
- package/src/Api/Implementation/PluginsApiImpl.js +1 -1
- package/src/Api/Implementation/ScheduleApiImpl.js +6 -6
- package/src/Api/Implementation/ScopeApiImpl.js +11 -11
- package/src/Api/Implementation/SystemStatusApiImpl.js +1 -0
- package/src/Api/Implementation/TeamSharingApiImpl.js +1 -0
- package/src/Api/Implementation/ThemeApiImpl.js +1 -0
- package/src/Api/Implementation/ToolPanelApiImpl.js +1 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +5 -4
- package/src/Api/Implementation/UserInterfaceApiImpl.js +18 -13
- package/src/Api/InternalApi.d.ts +2 -2
- package/src/Api/LayoutApi.d.ts +7 -0
- package/src/Api/PluginsApi.d.ts +1 -7
- package/src/Api/TeamSharingApi.d.ts +1 -1
- package/src/Api/ThemeApi.d.ts +2 -2
- package/src/Api/UserInterfaceApi.d.ts +6 -5
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -10
- package/src/PredefinedConfig/AlertState.d.ts +2 -3
- package/src/PredefinedConfig/ApplicationState.d.ts +1 -1
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableButton.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +36 -36
- package/src/PredefinedConfig/Common/AdaptableColumn.js +5 -5
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +4 -4
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +3 -3
- package/src/PredefinedConfig/Common/AdaptableStyle.d.ts +7 -7
- package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +4 -3
- package/src/PredefinedConfig/Common/Menu.d.ts +40 -17
- package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +1 -1
- package/src/PredefinedConfig/Common/Types.d.ts +5 -5
- package/src/PredefinedConfig/Common/Types.js +9 -7
- package/src/PredefinedConfig/ConditionalStyleState.d.ts +1 -1
- package/src/PredefinedConfig/CustomSortState.d.ts +1 -1
- package/src/PredefinedConfig/DataSourceState.d.ts +1 -1
- package/src/PredefinedConfig/ExportState.d.ts +3 -3
- package/src/PredefinedConfig/FilterState.d.ts +2 -2
- package/src/PredefinedConfig/FormatColumnState.d.ts +1 -1
- package/src/PredefinedConfig/FreeTextColumnState.d.ts +1 -1
- package/src/PredefinedConfig/LayoutState.d.ts +1 -1
- package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -40
- package/src/PredefinedConfig/QuickSearchState.d.ts +3 -3
- package/src/PredefinedConfig/ScheduleState.d.ts +1 -1
- package/src/PredefinedConfig/Selection/GridCell.d.ts +2 -1
- package/src/PredefinedConfig/ThemeState.d.ts +5 -1
- package/src/Redux/ActionsReducers/DashboardRedux.js +2 -1
- package/src/Redux/ActionsReducers/GridRedux.d.ts +3 -2
- package/src/Redux/ActionsReducers/GridRedux.js +2 -2
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +12 -2
- package/src/Redux/ActionsReducers/LayoutRedux.js +24 -1
- package/src/Redux/ActionsReducers/SystemRedux.js +1 -1
- package/src/Redux/DeadRedux.d.ts +4 -8
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +6 -1
- package/src/Redux/Store/AdaptableStore.d.ts +3 -3
- package/src/Redux/Store/AdaptableStore.js +21 -16
- package/src/Strategy/AdaptableModuleBase.d.ts +2 -2
- package/src/Strategy/AdaptableModuleBase.js +8 -8
- package/src/Strategy/AlertModule.d.ts +2 -2
- package/src/Strategy/AlertModule.js +13 -105
- package/src/Strategy/BulkUpdateModule.d.ts +2 -2
- package/src/Strategy/BulkUpdateModule.js +7 -7
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/CellSummaryModule.d.ts +2 -2
- package/src/Strategy/CellSummaryModule.js +3 -3
- package/src/Strategy/ConditionalStyleModule.js +3 -3
- package/src/Strategy/CustomSortModule.js +2 -2
- package/src/Strategy/DashboardModule.d.ts +2 -2
- package/src/Strategy/DataChangeHistoryModule.js +2 -2
- package/src/Strategy/ExportModule.d.ts +2 -2
- package/src/Strategy/ExportModule.js +1 -1
- package/src/Strategy/FilterModule.d.ts +2 -2
- package/src/Strategy/FilterModule.js +4 -4
- package/src/Strategy/FormatColumnModule.js +6 -6
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/GridInfoModule.d.ts +2 -2
- package/src/Strategy/Interface/IModule.d.ts +2 -2
- package/src/Strategy/LayoutModule.d.ts +2 -2
- package/src/Strategy/LayoutModule.js +22 -9
- package/src/Strategy/PlusMinusModule.js +8 -9
- package/src/Strategy/SmartEditModule.d.ts +2 -2
- package/src/Strategy/SmartEditModule.js +8 -9
- package/src/Strategy/SystemStatusModule.d.ts +2 -2
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +2 -1
- package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
- package/src/Utilities/Constants/ModuleConstants.js +7 -7
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +8 -7
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -2
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -2
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
- package/src/Utilities/Helpers/PreviewHelper.js +2 -2
- package/src/Utilities/Interface/Preview.d.ts +2 -1
- package/src/Utilities/ObjectFactory.js +1 -1
- package/src/Utilities/Services/DataService.js +5 -5
- package/src/Utilities/Services/LicenseService.js +16 -2
- package/src/Utilities/Services/MetamodelService.js +0 -1
- package/src/Utilities/Services/ReportService.js +12 -11
- package/src/Utilities/Services/ValidationService.js +4 -5
- package/src/View/AdaptableViewFactory.d.ts +2 -1
- package/src/View/AdaptableViewFactory.js +2 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +7 -7
- package/src/View/Alert/AlertPopup.js +1 -1
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +3 -3
- package/src/View/CalculatedColumn/CalculatedColumnPopup.js +1 -1
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
- package/src/View/CellSummary/CellSummaryViewPanel.js +2 -2
- package/src/View/Components/ColumnSelector/index.js +2 -2
- package/src/View/Components/FilterForm/FilterForm.js +18 -20
- package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +1 -1
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +7 -7
- package/src/View/Components/FilterForm/QuickFilterForm.js +15 -17
- package/src/View/Components/NewScopeComponent.js +1 -1
- package/src/View/Components/Panels/FilterFormPanel.d.ts +1 -1
- package/src/View/Components/Panels/PanelWithImage.d.ts +423 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.js +23 -10
- package/src/View/Components/PreviewResultsPanel.js +1 -1
- package/src/View/Components/RangesComponent.js +2 -2
- package/src/View/Components/Selectors/ColumnSelector.js +5 -5
- package/src/View/Components/Selectors/ColumnValueSelector.js +4 -4
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +10 -11
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +2 -3
- package/src/View/ConditionalStyle/ConditionalStylePopup.js +1 -1
- package/src/View/ConditionalStyle/ConditionalStyleSummary.js +1 -1
- package/src/View/CustomSort/CustomSortEntityRow.d.ts +3 -1
- package/src/View/CustomSort/CustomSortEntityRow.js +3 -3
- package/src/View/CustomSort/CustomSortPopup.js +2 -2
- package/src/View/CustomSort/CustomSortSummary.js +3 -3
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +4 -4
- package/src/View/Dashboard/CustomToolbarWrapper.js +2 -1
- package/src/View/Dashboard/Dashboard.js +2 -3
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +11 -10
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +6 -6
- package/src/View/Export/ExportCustomDestinationDialog.js +1 -1
- package/src/View/Export/ExportViewPanel.js +6 -6
- package/src/View/Filter/FilterSummary.js +2 -2
- package/src/View/FormatColumn/FormatColumnPopup.js +1 -1
- package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
- package/src/View/FreeTextColumn/FreeTextColumnPopup.js +1 -1
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +2 -2
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
- package/src/View/GridInfo/ColumnInfoComponent.js +16 -16
- package/src/View/GridInfo/GridOptionsComponent.js +1 -1
- package/src/View/Layout/LayoutViewPanel.js +2 -2
- package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +6 -6
- package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +2 -2
- package/src/View/Layout/Wizard/LayoutEditor/index.js +41 -41
- package/src/View/PlusMinus/PlusMinusPopup.js +1 -1
- package/src/View/PlusMinus/PlusMinusSummary.js +1 -1
- package/src/View/Query/QueryViewPanel.js +3 -3
- package/src/View/QuickSearch/useQuickSearchDebounced.js +2 -3
- package/src/View/Schedule/SchedulePopup.js +3 -3
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +1 -1
- package/src/View/SmartEdit/SmartEditPopup.js +1 -1
- package/src/View/StateManagement/StateManagementPopup.d.ts +2 -12
- package/src/View/StateManagement/StateManagementPopup.js +21 -114
- package/src/View/StateManagement/StateManagementViewPanel.d.ts +5 -0
- package/src/View/StateManagement/StateManagementViewPanel.js +22 -0
- package/src/View/StateManagement/components/ClearButton.d.ts +6 -0
- package/src/View/StateManagement/components/ClearButton.js +9 -0
- package/src/View/StateManagement/components/ExportDropdown.d.ts +8 -0
- package/src/View/StateManagement/components/ExportDropdown.js +43 -0
- package/src/View/StateManagement/components/LoadButton.d.ts +7 -0
- package/src/View/StateManagement/components/LoadButton.js +38 -0
- package/src/View/StateManagement/handleExportState.d.ts +1 -0
- package/src/View/StateManagement/handleExportState.js +22 -0
- package/src/View/Theme/ThemeViewPanel.js +1 -1
- package/src/agGrid/ActionColumnRenderer.js +1 -1
- package/src/agGrid/Adaptable.d.ts +9 -8
- package/src/agGrid/Adaptable.js +174 -132
- package/src/agGrid/agGridHelper.d.ts +4 -4
- package/src/agGrid/agGridHelper.js +46 -46
- package/src/agGrid/agGridMenuHelper.d.ts +15 -13
- package/src/agGrid/agGridMenuHelper.js +55 -47
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.d.ts +1 -1
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.js +11 -6
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +3 -2
- package/src/agGrid/editors/AdaptableDateEditor/index.js +16 -6
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +1 -0
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +7 -2
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +3 -3
- package/src/components/Datepicker/DatepickerContext.d.ts +2 -2
- package/src/components/Datepicker/index.js +9 -5
- package/src/components/ExpressionEditor/index.js +7 -7
- package/src/components/Modal/index.d.ts +1 -1
- package/src/components/OverlayTrigger/index.js +3 -3
- package/src/components/OverlayTrigger/useAgGridClassName.d.ts +2 -0
- package/src/components/OverlayTrigger/{useVendorClassName.js → useAgGridClassName.js} +3 -3
- package/src/components/ProgressIndicator/ProgressIndicator.js +1 -1
- package/src/components/icons/index.js +2 -0
- package/src/components/icons/upload.d.ts +3 -0
- package/src/components/icons/upload.js +8 -0
- package/src/metamodel/adaptable.metamodel.d.ts +104 -50
- package/src/metamodel/adaptable.metamodel.js +358 -300
- package/src/types.d.ts +2 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/PredefinedConfig/DeprecatedState.d.ts +0 -82
- package/src/PredefinedConfig/DeprecatedState.js +0 -5
- package/src/components/OverlayTrigger/useVendorClassName.d.ts +0 -2
|
@@ -22,12 +22,12 @@ class ColumnValueSelector extends React.Component {
|
|
|
22
22
|
super(props);
|
|
23
23
|
this.loadPermittedValues = async () => {
|
|
24
24
|
var _a;
|
|
25
|
-
if (!((_a = this.props.selectedColumn) === null || _a === void 0 ? void 0 : _a.
|
|
25
|
+
if (!((_a = this.props.selectedColumn) === null || _a === void 0 ? void 0 : _a.columnId)) {
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
// JW "fixed" this by replacing display values with raw values but really we should do it nicer in some way
|
|
29
29
|
// so that you we show the display value but we work on the raw value
|
|
30
|
-
const columnDisplayValuePairs = await runIfNotResolvedIn_1.runIfNotResolvedIn(this.props.api.columnApi.getDistinctBulkUpdateDisplayValuesForColumn(this.props.selectedColumn.
|
|
30
|
+
const columnDisplayValuePairs = await runIfNotResolvedIn_1.runIfNotResolvedIn(this.props.api.columnApi.getDistinctBulkUpdateDisplayValuesForColumn(this.props.selectedColumn.columnId, this.props.selectedGridCells), () => this.setState({ isDistinctColumnValuesLoading: true }));
|
|
31
31
|
this.setState({ isDistinctColumnValuesLoading: false });
|
|
32
32
|
const newSortedColumnValues = ArrayExtensions_1.ArrayExtensions.sortArray(columnDisplayValuePairs, Enums_1.SortOrder.Asc).map((v) => ({
|
|
33
33
|
label: v,
|
|
@@ -76,9 +76,9 @@ class ColumnValueSelector extends React.Component {
|
|
|
76
76
|
const dd = (React.createElement("div", null,
|
|
77
77
|
React.createElement(DropdownButton_1.default, { className: className, columns: ['label'], variant: "text", showClearButton: true, onClear: () => this.onSelectedValueChange([]), style: { fontSize: 'small' }, disabled: this.props.disabled, items: items, onExpand: this.handleSelectedValueExpand }, this.props.selectedColumnValue ? this.props.selectedColumnValue : placeholderText)));
|
|
78
78
|
const input = (React.createElement(AdaptableInput_1.default, { type: this.props.selectedColumn
|
|
79
|
-
? UIHelper_1.default.getDescriptionForDataType(this.props.selectedColumn.
|
|
79
|
+
? UIHelper_1.default.getDescriptionForDataType(this.props.selectedColumn.dataType)
|
|
80
80
|
: 'text', placeholder: this.props.selectedColumn
|
|
81
|
-
? UIHelper_1.default.getPlaceHolderforDataType(this.props.selectedColumn.
|
|
81
|
+
? UIHelper_1.default.getPlaceHolderforDataType(this.props.selectedColumn.dataType)
|
|
82
82
|
: 'Enter Value', autoFocus: true, disabled: this.props.disabled, style: { width: fieldWidth }, value: this.props.selectedColumnValue, onChange: (e) => {
|
|
83
83
|
this.onSelectedValueChange([
|
|
84
84
|
{ customOption: true, DisplayValue: e.target.value },
|
|
@@ -41,7 +41,7 @@ const AdaptableToolPanelComponent = (props) => {
|
|
|
41
41
|
if (!entitlementService.isModuleHiddenEntitlement('Dashboard')) {
|
|
42
42
|
availableModules.push('Dashboard');
|
|
43
43
|
}
|
|
44
|
-
if (props.api.pluginsApi.
|
|
44
|
+
if (props.api.pluginsApi.getipushpullPluginApi() &&
|
|
45
45
|
!entitlementService.isModuleHiddenEntitlement('IPushPull')) {
|
|
46
46
|
availableModules.push('IPushPull');
|
|
47
47
|
}
|
|
@@ -154,11 +154,11 @@ const AdaptableToolPanelComponent = (props) => {
|
|
|
154
154
|
];
|
|
155
155
|
props.Columns.forEach((col, index) => {
|
|
156
156
|
colItems.push({
|
|
157
|
-
id: col.
|
|
157
|
+
id: col.columnId,
|
|
158
158
|
onClick: () => {
|
|
159
|
-
onSetColumnVisibility(col.
|
|
159
|
+
onSetColumnVisibility(col.columnId);
|
|
160
160
|
},
|
|
161
|
-
label: (React.createElement(CheckBox_1.CheckBox, { as: "div", className: "ab-dd-checkbox", variant: "agGrid", my: 0, value: col.
|
|
161
|
+
label: (React.createElement(CheckBox_1.CheckBox, { as: "div", className: "ab-dd-checkbox", variant: "agGrid", my: 0, value: col.columnId, key: col.columnId, checked: col.visible, onMouseDown: preventDefault }, col.friendlyName)),
|
|
162
162
|
});
|
|
163
163
|
});
|
|
164
164
|
return (React.createElement(DropdownButton_1.default, { listMinWidth: 150, variant: "text", tone: "none", collapseOnItemClick: false, items: colItems, columns: ['label'], className: "ab-Toolpanel__columns", key: 'dropdown-cols', id: 'dropdown-cols', tooltip: "Select Columns" }, colsGlyph));
|
|
@@ -180,7 +180,7 @@ const AdaptableToolPanelComponent = (props) => {
|
|
|
180
180
|
};
|
|
181
181
|
const iconProps = button.icon && Object.assign({}, defaultIconProps, button.icon);
|
|
182
182
|
const toolPanelContext = {
|
|
183
|
-
|
|
183
|
+
adaptableApi: props.api,
|
|
184
184
|
toolPanelState: props.api.toolPanelApi.getToolPanelState(),
|
|
185
185
|
};
|
|
186
186
|
let buttonStyle = props.api.internalApi.getStyleForButton(button, toolPanelContext);
|
|
@@ -213,11 +213,11 @@ const AdaptableToolPanelComponent = (props) => {
|
|
|
213
213
|
let changedColumn = props.api.columnApi.getColumnFromId(name);
|
|
214
214
|
let columns = [].concat(props.Columns);
|
|
215
215
|
changedColumn = Object.assign({}, changedColumn, {
|
|
216
|
-
Visible: !changedColumn.
|
|
216
|
+
Visible: !changedColumn.visible,
|
|
217
217
|
});
|
|
218
|
-
let index = columns.findIndex((x) => x.
|
|
218
|
+
let index = columns.findIndex((x) => x.columnId == name);
|
|
219
219
|
columns[index] = changedColumn;
|
|
220
|
-
props.onNewColumnListOrder(columns.filter((c) => c.
|
|
220
|
+
props.onNewColumnListOrder(columns.filter((c) => c.visible).map((c) => c.columnId));
|
|
221
221
|
};
|
|
222
222
|
const onSetToolPanelVisibility = (name, checked) => {
|
|
223
223
|
if (checked) {
|
|
@@ -238,7 +238,6 @@ const AdaptableToolPanelComponent = (props) => {
|
|
|
238
238
|
const toolPanelButtons = renderToolPanelButtons();
|
|
239
239
|
return (React.createElement(rebass_1.Flex, { className: "ab-ToolPanel", "data-name": "adaptable-tool-panel", flexDirection: "column", justifyContent: "center", padding: 2, style: {
|
|
240
240
|
width: '100%',
|
|
241
|
-
minWidth: 'var(--ab-cmp-toolpanel__width)',
|
|
242
241
|
} },
|
|
243
242
|
React.createElement(rebass_1.Flex, { className: "ab-ToolPanel__header", flexDirection: "row", justifyContent: "left", padding: 1, style: { width: '100%' } },
|
|
244
243
|
renderModuleDropdowns(),
|
|
@@ -271,8 +270,8 @@ exports.ConnectedAdaptableToolPanel = react_redux_1.connect(mapStateToProps, map
|
|
|
271
270
|
exports.getAdaptableToolPanelAgGridComponent = (adaptable) => {
|
|
272
271
|
return class AdaptableToolPanelAgGridComponent {
|
|
273
272
|
init(params) {
|
|
274
|
-
const
|
|
275
|
-
const Adaptable =
|
|
273
|
+
const agGridApi = params.api;
|
|
274
|
+
const Adaptable = agGridApi.__adaptable || adaptable;
|
|
276
275
|
const api = Adaptable.api;
|
|
277
276
|
this.gui = document.createElement('div');
|
|
278
277
|
this.gui.id = 'adaptable-tool-panel_' + Adaptable.adaptableOptions.adaptableId;
|
|
@@ -48,7 +48,7 @@ exports.CustomToolPanelContent = (props) => {
|
|
|
48
48
|
};
|
|
49
49
|
const iconProps = button.icon && Object.assign({}, defaultIconProps, button.icon);
|
|
50
50
|
const toolPanelContext = {
|
|
51
|
-
api,
|
|
51
|
+
adaptableApi: api,
|
|
52
52
|
toolPanelState: api.toolPanelApi.getToolPanelState(),
|
|
53
53
|
customToolPanel: customToolPanel,
|
|
54
54
|
};
|
|
@@ -45,7 +45,7 @@ class ToolPanelPopupComponent extends React.Component {
|
|
|
45
45
|
if (!entitlementService.isModuleHiddenEntitlement('Dashboard')) {
|
|
46
46
|
availableModules.push('Dashboard');
|
|
47
47
|
}
|
|
48
|
-
if (this.props.api.pluginsApi.
|
|
48
|
+
if (this.props.api.pluginsApi.getipushpullPluginApi() &&
|
|
49
49
|
!entitlementService.isModuleHiddenEntitlement('IPushPull')) {
|
|
50
50
|
availableModules.push('IPushPull');
|
|
51
51
|
}
|
|
@@ -81,8 +81,7 @@ class ToolPanelPopupComponent extends React.Component {
|
|
|
81
81
|
this.setState({ ToolPanelConfigView: ToolPanelConfigView });
|
|
82
82
|
}
|
|
83
83
|
onToolPanelToolPanelsChanged(selectedValues) {
|
|
84
|
-
const currentSelectedToolPanelDefinitions = this.props
|
|
85
|
-
.ToolPanelState.ToolPanels;
|
|
84
|
+
const currentSelectedToolPanelDefinitions = this.props.ToolPanelState.ToolPanels;
|
|
86
85
|
// try to return the pre-existing definition (to maintain the previous collapsed state)
|
|
87
86
|
// otherwise select the new toolPanel with the default 'collapsed' state
|
|
88
87
|
let newSelectedToolPanelDefinitions = selectedValues.map((selectedToolPanel) => {
|
|
@@ -61,7 +61,7 @@ class ConditionalStylePopupComponent extends React.Component {
|
|
|
61
61
|
if (this.props.popupParams.action == 'New') {
|
|
62
62
|
_editedConditionalStyle = ObjectFactory_1.ObjectFactory.CreateEmptyConditionalStyle();
|
|
63
63
|
_editedConditionalStyle.Scope = {
|
|
64
|
-
ColumnIds: [column.
|
|
64
|
+
ColumnIds: [column.columnId],
|
|
65
65
|
};
|
|
66
66
|
this.setState({
|
|
67
67
|
editedAdaptableObject: _editedConditionalStyle,
|
|
@@ -57,7 +57,7 @@ class ConditionalStyleSummaryComponent extends React.Component {
|
|
|
57
57
|
onNew() {
|
|
58
58
|
let configEntity = ObjectFactory_1.ObjectFactory.CreateEmptyConditionalStyle();
|
|
59
59
|
configEntity.Scope = {
|
|
60
|
-
ColumnIds: [this.props.summarisedColumn.
|
|
60
|
+
ColumnIds: [this.props.summarisedColumn.columnId],
|
|
61
61
|
};
|
|
62
62
|
this.setState({
|
|
63
63
|
editedAdaptableObject: configEntity,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SharedEntityRowProps } from '../Components/SharedProps/ConfigEntityRowProps';
|
|
3
3
|
import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
4
|
+
import { AdaptableScope } from '../../../types';
|
|
4
5
|
export interface CustomSortEntityRowProps extends SharedEntityRowProps<CustomSortEntityRow> {
|
|
5
|
-
column
|
|
6
|
+
column?: AdaptableColumn;
|
|
7
|
+
scope?: AdaptableScope;
|
|
6
8
|
}
|
|
7
9
|
export declare class CustomSortEntityRow extends React.Component<CustomSortEntityRowProps, {}> {
|
|
8
10
|
render(): any;
|
|
@@ -11,13 +11,13 @@ const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Exten
|
|
|
11
11
|
const Helper_1 = require("../../Utilities/Helpers/Helper");
|
|
12
12
|
class CustomSortEntityRow extends React.Component {
|
|
13
13
|
render() {
|
|
14
|
+
var _a;
|
|
14
15
|
let customSort = this.props.adaptableObject;
|
|
15
16
|
const columnSortComparer = this.props.api.internalApi.getCustomSortComparer(this.props.column);
|
|
16
17
|
let colItems = Helper_1.cloneObject(this.props.colItems);
|
|
17
|
-
colItems[0].Content = React.createElement(EntityRowItem_1.EntityRowItem, { Content: this.props.column.
|
|
18
|
+
colItems[0].Content = this.props.column ? (React.createElement(EntityRowItem_1.EntityRowItem, { Content: this.props.column.friendlyName })) : this.props.scope ? (React.createElement(EntityRowItem_1.EntityRowItem, { Content: this.props.api.scopeApi.getScopeToString(this.props.scope) })) : (React.createElement("p", null, "Nothing"));
|
|
18
19
|
colItems[1].Content = (React.createElement(EntityRowItem_1.EntityRowItem, { Content: customSort ? this.getCustomSortedValues(customSort) : 'Custom Sort Function' }));
|
|
19
|
-
colItems[2].Content = (React.createElement(EntityListActionButtons_1.EntityListActionButtons, { showSuspend: true, suspendableObject: customSort, confirmDeleteAction: this.props.onDeleteConfirm, editClick: () => this.props.onEdit(customSort), shareClick: (config) => this.props.onShare(config), showShare: this.props.teamSharingActivated, overrideDisableEdit: columnSortComparer != undefined ||
|
|
20
|
-
this.props.column.FriendlyName.includes(GeneralConstants.MISSING_COLUMN), entityType: this.props.moduleInfo.FriendlyName, accessLevel: this.props.accessLevel, onSuspend: this.props.onSuspend, onUnSuspend: this.props.onUnSuspend }));
|
|
20
|
+
colItems[2].Content = (React.createElement(EntityListActionButtons_1.EntityListActionButtons, { showSuspend: true, suspendableObject: customSort, confirmDeleteAction: this.props.onDeleteConfirm, editClick: () => this.props.onEdit(customSort), shareClick: (config) => this.props.onShare(config), showShare: this.props.teamSharingActivated, overrideDisableEdit: columnSortComparer != undefined || ((_a = this.props.column) === null || _a === void 0 ? void 0 : _a.friendlyName.includes(GeneralConstants.MISSING_COLUMN)), entityType: this.props.moduleInfo.FriendlyName, accessLevel: this.props.accessLevel, onSuspend: this.props.onSuspend, onUnSuspend: this.props.onUnSuspend }));
|
|
21
21
|
return React.createElement(AdaptableObjectRow_1.AdaptableObjectRow, { isSuspended: customSort.IsSuspended, colItems: colItems });
|
|
22
22
|
}
|
|
23
23
|
getCustomSortedValues(customSort) {
|
|
@@ -53,7 +53,7 @@ class CustomSortPopupComponent extends React.Component {
|
|
|
53
53
|
componentDidMount() {
|
|
54
54
|
if (this.props.popupParams) {
|
|
55
55
|
if (this.props.popupParams.action && this.props.popupParams.column) {
|
|
56
|
-
let columnId = this.props.popupParams.column.
|
|
56
|
+
let columnId = this.props.popupParams.column.columnId;
|
|
57
57
|
if (this.props.popupParams.action == 'New') {
|
|
58
58
|
let newCustomSort = ObjectFactory_1.ObjectFactory.CreateEmptyCustomSort();
|
|
59
59
|
newCustomSort.ColumnId = columnId;
|
|
@@ -82,7 +82,7 @@ class CustomSortPopupComponent extends React.Component {
|
|
|
82
82
|
const columnSortComparers = (_a = this.props.api.internalApi
|
|
83
83
|
.getAdaptableOptions()
|
|
84
84
|
.generalOptions.customSortComparers) === null || _a === void 0 ? void 0 : _a.map((comparer, index) => {
|
|
85
|
-
return (React.createElement(CustomSortEntityRow_1.CustomSortEntityRow, { colItems: colItems, api: this.props.api, adaptableObject: comparer, moduleInfo: this.props.moduleInfo, key:
|
|
85
|
+
return (React.createElement(CustomSortEntityRow_1.CustomSortEntityRow, { colItems: colItems, api: this.props.api, adaptableObject: comparer, moduleInfo: this.props.moduleInfo, key: 'columnValuesComparer' + index, teamSharingActivated: this.props.teamSharingActivated, onShare: null, onEdit: null, onDeleteConfirm: null, scope: comparer.scope, accessLevel: 'ReadOnly' }));
|
|
86
86
|
});
|
|
87
87
|
let newButton = (React.createElement(ButtonNew_1.ButtonNew, { onClick: () => this.onNew(), tooltip: "Create Custom Sort", accessLevel: this.props.accessLevel, style: {
|
|
88
88
|
color: 'var(--ab-color-text-on-add)',
|
|
@@ -36,11 +36,11 @@ class CustomSortSummaryComponent extends React.Component {
|
|
|
36
36
|
this.state = UIHelper_1.UIHelper.getEmptyConfigState();
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
|
-
const customSort = this.props.CustomSorts.find((c) => c.ColumnId == this.props.summarisedColumn.
|
|
39
|
+
const customSort = this.props.CustomSorts.find((c) => c.ColumnId == this.props.summarisedColumn.columnId);
|
|
40
40
|
const columnSortComparer = this.props.api.internalApi.getCustomSortComparer(this.props.summarisedColumn);
|
|
41
41
|
let noCustomSort = customSort == null && columnSortComparer == null;
|
|
42
42
|
let customSortRow;
|
|
43
|
-
if (!this.props.summarisedColumn.
|
|
43
|
+
if (!this.props.summarisedColumn.sortable) {
|
|
44
44
|
customSortRow = (React.createElement(ModuleHeader_1.ModuleHeader, { key: this.props.moduleInfo.FriendlyName, moduleInfo: this.props.moduleInfo, moduleSummary: 'Column is not sortable', newButtonDisabled: true, onNew: () => this.onNew(), newButtonTooltip: this.props.moduleInfo.FriendlyName, accessLevel: this.props.accessLevel }));
|
|
45
45
|
}
|
|
46
46
|
else if (noCustomSort) {
|
|
@@ -59,7 +59,7 @@ class CustomSortSummaryComponent extends React.Component {
|
|
|
59
59
|
}
|
|
60
60
|
onNew() {
|
|
61
61
|
let configEntity = ObjectFactory_1.ObjectFactory.CreateEmptyCustomSort();
|
|
62
|
-
configEntity.ColumnId = this.props.summarisedColumn.
|
|
62
|
+
configEntity.ColumnId = this.props.summarisedColumn.columnId;
|
|
63
63
|
this.setState({
|
|
64
64
|
editedAdaptableObject: configEntity,
|
|
65
65
|
wizardStartIndex: 1,
|
|
@@ -29,16 +29,16 @@ exports.CustomSortColumnWizardSection = (props) => {
|
|
|
29
29
|
const customSorts = api.customSortApi.getAllCustomSort();
|
|
30
30
|
const columnSortComparers = ((_b = (_a = api.internalApi.getAdaptableOptions()) === null || _a === void 0 ? void 0 : _a.generalOptions) === null || _b === void 0 ? void 0 : _b.customSortComparers) || [];
|
|
31
31
|
const usedColumnIds = [
|
|
32
|
-
...customSorts.map((
|
|
33
|
-
...columnSortComparers.map((comparer) => comparer.
|
|
32
|
+
...customSorts.map((customSort) => customSort.ColumnId),
|
|
33
|
+
...columnSortComparers.map((comparer) => api.scopeApi.getColumnIdsInScope(comparer.scope)),
|
|
34
34
|
];
|
|
35
35
|
// filter out used colum ids, but include the current one
|
|
36
36
|
return sortableColumns.filter((column) => {
|
|
37
|
-
if (!props.isNew && column.
|
|
37
|
+
if (!props.isNew && column.columnId === (data === null || data === void 0 ? void 0 : data.ColumnId)) {
|
|
38
38
|
return true;
|
|
39
39
|
}
|
|
40
40
|
return usedColumnIds.every((usedColumnId) => {
|
|
41
|
-
return column.
|
|
41
|
+
return column.columnId !== usedColumnId;
|
|
42
42
|
});
|
|
43
43
|
});
|
|
44
44
|
}, []);
|
|
@@ -35,6 +35,7 @@ exports.CustomToolbarWrapper = (props) => {
|
|
|
35
35
|
return (React.createElement(PanelDashboard_1.PanelDashboard, { className: `ab-CustomToolbar ab-DashboardToolbar__${props.customToolbar.name}`, "data-name": `ab-CustomToolbar ab-DashboardToolbar__${props.customToolbar.name}`, headerText: props.customToolbar.title ? props.customToolbar.title : '', showConfigureButton: props.customToolbar.showConfigureButton != null &&
|
|
36
36
|
props.customToolbar.showConfigureButton == true, showCloseButton: props.customToolbar.showCloseButton != null && props.customToolbar.showCloseButton == true, onConfigure: () => {
|
|
37
37
|
const customToolbarConfiguredInfo = {
|
|
38
|
+
adaptableApi: api,
|
|
38
39
|
customToolbar: props.customToolbar,
|
|
39
40
|
};
|
|
40
41
|
api.eventApi.emit('CustomToolbarConfigured', customToolbarConfiguredInfo);
|
|
@@ -48,7 +49,7 @@ exports.CustomToolbarWrapper = (props) => {
|
|
|
48
49
|
// with the next opportunity we should abstract it
|
|
49
50
|
const dashboardContext = {
|
|
50
51
|
customToolbar: props.customToolbar,
|
|
51
|
-
api,
|
|
52
|
+
adaptableApi: api,
|
|
52
53
|
dashboardState: api.dashboardApi.getDashboardState(),
|
|
53
54
|
};
|
|
54
55
|
let buttonStyle = api.internalApi.getStyleForButton(button, dashboardContext);
|
|
@@ -103,7 +103,7 @@ const DashboardComponent = (props) => {
|
|
|
103
103
|
// delete iconProps.Uuid;
|
|
104
104
|
// }
|
|
105
105
|
const dashboardContext = {
|
|
106
|
-
|
|
106
|
+
adaptableApi: props.api,
|
|
107
107
|
dashboardState: props.api.dashboardApi.getDashboardState(),
|
|
108
108
|
};
|
|
109
109
|
let buttonStyle = props.api.internalApi.getStyleForButton(button, dashboardContext);
|
|
@@ -141,8 +141,7 @@ const DashboardComponent = (props) => {
|
|
|
141
141
|
label: menuItem.label,
|
|
142
142
|
};
|
|
143
143
|
});
|
|
144
|
-
let dashboardOptions = props.api.internalApi.getAdaptableOptions()
|
|
145
|
-
.dashboardOptions;
|
|
144
|
+
let dashboardOptions = props.api.internalApi.getAdaptableOptions().dashboardOptions;
|
|
146
145
|
if (dashboardAccessLevel == 'Full' || dashboardAccessLevel == 'ReadOnly') {
|
|
147
146
|
menuItems.unshift(dashboardAccessLevel == 'Full'
|
|
148
147
|
? {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { DataChangedInfo } from '../../PredefinedConfig/Common/DataChangedInfo';
|
|
3
3
|
export interface DataChangeHistoryGridProps {
|
|
4
4
|
adaptableContainerId: string;
|
|
5
|
-
|
|
5
|
+
agGridContainerId: string;
|
|
6
6
|
changeHistoryLog: Record<string, DataChangedInfo>;
|
|
7
7
|
onUndoChange: (changeKey: string) => void;
|
|
8
8
|
}
|
|
@@ -9,7 +9,7 @@ const react_1 = require("react");
|
|
|
9
9
|
const usePrevious_1 = tslib_1.__importDefault(require("../../components/utils/usePrevious"));
|
|
10
10
|
const ModuleConstants_1 = require("../../Utilities/Constants/ModuleConstants");
|
|
11
11
|
exports.DataChangeHistoryGrid = (props) => {
|
|
12
|
-
const { changeHistoryLog, adaptableContainerId,
|
|
12
|
+
const { changeHistoryLog, adaptableContainerId, agGridContainerId, onUndoChange } = props;
|
|
13
13
|
const mainAdaptableInstance = AdaptableContext_1.useAdaptable();
|
|
14
14
|
const [_adaptableApi, setAdaptableApi] = react_1.useState(null);
|
|
15
15
|
const adaptableApiRef = react_1.useRef(null);
|
|
@@ -22,7 +22,7 @@ exports.DataChangeHistoryGrid = (props) => {
|
|
|
22
22
|
react_1.useEffect(() => {
|
|
23
23
|
const initializeAdaptableGrid = async () => {
|
|
24
24
|
const gridOptions = buildGridOptions(mainAdaptableInstance, changeHistoryLog);
|
|
25
|
-
const adaptableOptions = buildAdaptableOptions(mainAdaptableInstance, gridOptions, adaptableContainerId,
|
|
25
|
+
const adaptableOptions = buildAdaptableOptions(mainAdaptableInstance, gridOptions, adaptableContainerId, agGridContainerId, undoChangeEnabled, onUndoChange);
|
|
26
26
|
// to avoid direct dependency to Adaptable.ts and thus creating a circular dependency;
|
|
27
27
|
const adaptableInitFn = Object.getPrototypeOf(mainAdaptableInstance).constructor.init;
|
|
28
28
|
const dataChangeHistoryAdaptableApi = await adaptableInitFn(adaptableOptions);
|
|
@@ -71,7 +71,7 @@ exports.DataChangeHistoryGrid = (props) => {
|
|
|
71
71
|
}, [changeHistoryLog]);
|
|
72
72
|
return React.createElement(React.Fragment, null);
|
|
73
73
|
};
|
|
74
|
-
const buildAdaptableOptions = (mainAdaptableInstance, gridOptions, adaptableContainerId,
|
|
74
|
+
const buildAdaptableOptions = (mainAdaptableInstance, gridOptions, adaptableContainerId, agGridContainerId, undoChangeEnabled, onUndoChange) => {
|
|
75
75
|
var _a, _b;
|
|
76
76
|
const mainAdaptableOptions = mainAdaptableInstance.adaptableOptions;
|
|
77
77
|
const mainAdaptableTheme = mainAdaptableInstance.api.themeApi.getCurrentTheme();
|
|
@@ -88,7 +88,7 @@ const buildAdaptableOptions = (mainAdaptableInstance, gridOptions, adaptableCont
|
|
|
88
88
|
adaptableId: `${mainAdaptableOptions.adaptableId}::DataChangeHistory`,
|
|
89
89
|
containerOptions: {
|
|
90
90
|
adaptableContainer: adaptableContainerId,
|
|
91
|
-
|
|
91
|
+
agGridContainer: agGridContainerId,
|
|
92
92
|
},
|
|
93
93
|
entitlementOptions: {
|
|
94
94
|
defaultAccessLevel: 'Hidden',
|
|
@@ -104,7 +104,7 @@ const buildAdaptableOptions = (mainAdaptableInstance, gridOptions, adaptableCont
|
|
|
104
104
|
includeGroupedRows: true,
|
|
105
105
|
actionColumnButton: {
|
|
106
106
|
label: (button, context) => {
|
|
107
|
-
if (context.
|
|
107
|
+
if (context.adaptableApi.gridApi.isGroupRowNode(context.rowNode)) {
|
|
108
108
|
return 'Undo Group';
|
|
109
109
|
}
|
|
110
110
|
return 'Undo Change';
|
|
@@ -112,7 +112,7 @@ const buildAdaptableOptions = (mainAdaptableInstance, gridOptions, adaptableCont
|
|
|
112
112
|
onClick: (button, context) => {
|
|
113
113
|
var _a;
|
|
114
114
|
const rowNode = context.rowNode;
|
|
115
|
-
if (context.
|
|
115
|
+
if (context.adaptableApi.gridApi.isGroupRowNode(rowNode)) {
|
|
116
116
|
// undo all children
|
|
117
117
|
const childrenNodes = (_a = context.rowNode) === null || _a === void 0 ? void 0 : _a.childrenAfterFilter;
|
|
118
118
|
if (childrenNodes) {
|
|
@@ -188,14 +188,15 @@ const buildAdaptableOptions = (mainAdaptableInstance, gridOptions, adaptableCont
|
|
|
188
188
|
const layoutColumns = options.predefinedConfig.Layout.Layouts[0].Columns;
|
|
189
189
|
if (layoutColumns.includes('undoActionColumn')) {
|
|
190
190
|
// remove action column from layout
|
|
191
|
-
options.predefinedConfig.Layout.Layouts[0].Columns =
|
|
191
|
+
options.predefinedConfig.Layout.Layouts[0].Columns =
|
|
192
|
+
layoutColumns.filter((columnId) => columnId !== 'undoActionColumn');
|
|
192
193
|
}
|
|
193
194
|
}
|
|
194
195
|
return options;
|
|
195
196
|
};
|
|
196
197
|
const buildGridOptions = (mainAdaptableInstance, changeHistoryLog) => {
|
|
197
198
|
var _a, _b;
|
|
198
|
-
const mainPrimaryKeyColumnHeader = (_b = (_a = mainAdaptableInstance.api.columnApi.getPrimaryKeyColumn()) === null || _a === void 0 ? void 0 : _a.
|
|
199
|
+
const mainPrimaryKeyColumnHeader = (_b = (_a = mainAdaptableInstance.api.columnApi.getPrimaryKeyColumn()) === null || _a === void 0 ? void 0 : _a.friendlyName) !== null && _b !== void 0 ? _b : 'Row ID';
|
|
199
200
|
const options = {
|
|
200
201
|
suppressLoadingOverlay: true,
|
|
201
202
|
overlayNoRowsTemplate: '<div style="font-size: var(--ab-font-size-2);color: var(--ab-color-text-on-primary);">No Data Changes</div>',
|
|
@@ -295,7 +296,7 @@ const mapChangeHistoryRowData = (changeHistoryLog = {}, mainAdaptableInstance) =
|
|
|
295
296
|
primaryKey: `${changeKey}::${changeInfo.changedAt}`,
|
|
296
297
|
changeKey,
|
|
297
298
|
changeTriggerLabel: getChangeTriggerLabel(changeInfo),
|
|
298
|
-
changedColumnLabel: getColumnHeaderLabel(changeInfo.columnId, mainAdaptableInstance),
|
|
299
|
+
changedColumnLabel: getColumnHeaderLabel(changeInfo.column.columnId, mainAdaptableInstance),
|
|
299
300
|
changeInfo,
|
|
300
301
|
};
|
|
301
302
|
});
|
|
@@ -305,7 +306,7 @@ const headerMap = new Map();
|
|
|
305
306
|
const getColumnHeaderLabel = (columnId, mainAdaptableInstance) => {
|
|
306
307
|
var _a, _b;
|
|
307
308
|
if (!headerMap.has(columnId)) {
|
|
308
|
-
headerMap.set(columnId, (_b = (_a = mainAdaptableInstance.api.columnApi.getColumnFromId(columnId)) === null || _a === void 0 ? void 0 : _a.
|
|
309
|
+
headerMap.set(columnId, (_b = (_a = mainAdaptableInstance.api.columnApi.getColumnFromId(columnId)) === null || _a === void 0 ? void 0 : _a.friendlyName) !== null && _b !== void 0 ? _b : columnId);
|
|
309
310
|
}
|
|
310
311
|
return headerMap.get(columnId);
|
|
311
312
|
};
|
|
@@ -21,8 +21,8 @@ class DataChangeHistoryPopupComponent extends React.Component {
|
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
23
|
const { changeHistoryMode, activationTime, suspensionTime, onChangeHistoryEnable, onChangeHistoryDisable, onChangeHistorySuspend, onChangeHistoryResume, } = this.props;
|
|
24
|
-
const adaptableContainerId = '
|
|
25
|
-
const
|
|
24
|
+
const adaptableContainerId = 'dataChangeHistoryAdaptableContainer';
|
|
25
|
+
const agGridContainerId = 'dataChangeHistoryAgGridContainer';
|
|
26
26
|
const enabled = changeHistoryMode === 'ACTIVE';
|
|
27
27
|
const disabled = changeHistoryMode === 'INACTIVE';
|
|
28
28
|
const suspended = changeHistoryMode === 'SUSPENDED';
|
|
@@ -53,9 +53,9 @@ class DataChangeHistoryPopupComponent extends React.Component {
|
|
|
53
53
|
this.props.api.dataChangeHistoryApi.undoDataChangeHistoryEntry(changeToBeUndone);
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
|
-
const
|
|
56
|
+
const currentAgGridTheme = this.props.api.internalApi
|
|
57
57
|
.getAdaptableInstance()
|
|
58
|
-
.
|
|
58
|
+
.getAgGridCurrentThemeName();
|
|
59
59
|
return (React.createElement(PanelWithButton_1.PanelWithButton, { headerText: this.props.moduleInfo.FriendlyName, glyphicon: this.props.moduleInfo.Glyph, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed(), border: "none", bodyProps: { padding: 0 } },
|
|
60
60
|
React.createElement(rebass_1.Flex, { className: "ab-DataChangeHistoryPopup", flexDirection: "column", style: { height: '100%' } },
|
|
61
61
|
React.createElement(rebass_1.Flex, { style: {
|
|
@@ -67,8 +67,8 @@ class DataChangeHistoryPopupComponent extends React.Component {
|
|
|
67
67
|
statusPanel)),
|
|
68
68
|
React.createElement(rebass_1.Flex, { className: "ab-DataChangeHistoryPopup--grid", "data-name": 'data-change-history--grid', flex: 1, alignSelf: 'stretch', flexDirection: 'column' },
|
|
69
69
|
React.createElement("div", { id: adaptableContainerId }),
|
|
70
|
-
React.createElement("div", { id:
|
|
71
|
-
React.createElement(DataChangeHistoryGrid_1.DataChangeHistoryGrid, { adaptableContainerId: adaptableContainerId,
|
|
70
|
+
React.createElement("div", { id: agGridContainerId, className: currentAgGridTheme, style: { height: '100%', width: '1000px' } }),
|
|
71
|
+
React.createElement(DataChangeHistoryGrid_1.DataChangeHistoryGrid, { adaptableContainerId: adaptableContainerId, agGridContainerId: agGridContainerId, changeHistoryLog: this.props.changeHistoryLog, onUndoChange: handleChangeUndo })))));
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
function mapStateToProps(state, ownProps) {
|
|
@@ -92,12 +92,12 @@ class ExportViewPanelComponent extends React.Component {
|
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
94
|
const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
95
|
-
return (React.createElement(rebass_1.Flex, { flexDirection: "row", className: `ab-${elementType}__Export__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
|
|
96
|
-
React.createElement(rebass_1.Flex,
|
|
97
|
-
React.createElement(DropdownButton_1.default, { disabled: allReportNames.length == 0, style: {
|
|
98
|
-
React.createElement(rebass_1.Flex,
|
|
99
|
-
React.createElement(DropdownButton_1.default, { disabled: currentReportId === SELECT_REPORT_STRING, style: {
|
|
100
|
-
React.createElement(rebass_1.Flex, { className: join_1.default(accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__Export__controls`), style: {
|
|
95
|
+
return (React.createElement(rebass_1.Flex, { style: { gap: 5 }, flexDirection: "row", className: `ab-${elementType}__Export__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
|
|
96
|
+
React.createElement(rebass_1.Flex, { flex: 1 },
|
|
97
|
+
React.createElement(DropdownButton_1.default, { disabled: allReportNames.length == 0, style: { width: '100%', fontSize: 'small' }, items: reportItems, columns: ['label'], className: `ab-${elementType}__Export__select`, onClear: () => this.onSelectedReportChanged(null), showClearButton: !!currentReport, variant: "outlined", marginRight: 2 }, currentReportId)),
|
|
98
|
+
React.createElement(rebass_1.Flex, { flex: 1 },
|
|
99
|
+
React.createElement(DropdownButton_1.default, { disabled: currentReportId === SELECT_REPORT_STRING, style: { width: '100%', fontSize: 'small' }, items: destinationItems, columns: ['label'], className: `ab-${elementType}__Export__export`, onClear: () => this.onSelectedDestinationChanged(null), showClearButton: !!currentDestination, variant: "outlined", marginRight: 2 }, currentDestinationId)),
|
|
100
|
+
React.createElement(rebass_1.Flex, { className: join_1.default(accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__Export__controls`), style: { width: '100%' } },
|
|
101
101
|
React.createElement(ButtonExport_1.ButtonExport, { onClick: () => onApplyExport(), tooltip: "Export Report", className: `ab-${elementType}__Export__export`, disabled: currentReport == null || currentDestination == null }),
|
|
102
102
|
React.createElement(ButtonEdit_1.ButtonEdit, { onClick: () => this.props.onEditReport(this.props.moduleInfo.Popup), tooltip: "Edit Report", className: `ab-${elementType}__Export__edit`, disabled: currentReport == null || currentReport.ReportColumnScope == 'CustomColumns', accessLevel: accessLevel }),
|
|
103
103
|
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 }),
|
|
@@ -18,7 +18,7 @@ class FilterSummaryComponent extends React.Component {
|
|
|
18
18
|
this.state = UIHelper_1.UIHelper.getEmptyConfigState();
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
let columnFilter = this.props.ColumnFilters.find((c) => c.ColumnId == this.props.summarisedColumn.
|
|
21
|
+
let columnFilter = this.props.ColumnFilters.find((c) => c.ColumnId == this.props.summarisedColumn.columnId);
|
|
22
22
|
let description = this.getDescription(columnFilter);
|
|
23
23
|
let summaryItems = [];
|
|
24
24
|
summaryItems.push(React.createElement("b", null, React.createElement(ModuleProfile_1.ModuleProfile, { moduleInfo: this.props.moduleInfo })));
|
|
@@ -27,7 +27,7 @@ class FilterSummaryComponent extends React.Component {
|
|
|
27
27
|
return React.createElement(SummaryRowItem_1.SummaryRowItem, { SummaryItems: summaryItems });
|
|
28
28
|
}
|
|
29
29
|
getDescription(columnFilter) {
|
|
30
|
-
if (this.props.summarisedColumn && !this.props.summarisedColumn.
|
|
30
|
+
if (this.props.summarisedColumn && !this.props.summarisedColumn.filterable) {
|
|
31
31
|
return 'Column is not filterable';
|
|
32
32
|
}
|
|
33
33
|
if (columnFilter == null) {
|
|
@@ -55,7 +55,7 @@ class FormatColumnPopupComponent extends React.Component {
|
|
|
55
55
|
if (this.props.popupParams.action == 'New') {
|
|
56
56
|
let newFormatColumn = ObjectFactory_1.ObjectFactory.CreateEmptyFormatColumn();
|
|
57
57
|
newFormatColumn.Scope = {
|
|
58
|
-
ColumnIds: [column.
|
|
58
|
+
ColumnIds: [column.columnId],
|
|
59
59
|
};
|
|
60
60
|
this.onNewFromColumn(newFormatColumn);
|
|
61
61
|
}
|
|
@@ -51,7 +51,7 @@ class FormatColumnSummaryComponent extends React.Component {
|
|
|
51
51
|
onNew() {
|
|
52
52
|
let configEntity = ObjectFactory_1.ObjectFactory.CreateEmptyFormatColumn();
|
|
53
53
|
configEntity.Scope = {
|
|
54
|
-
ColumnIds: [this.props.summarisedColumn.
|
|
54
|
+
ColumnIds: [this.props.summarisedColumn.columnId],
|
|
55
55
|
};
|
|
56
56
|
this.setState({
|
|
57
57
|
editedAdaptableObject: configEntity,
|
|
@@ -104,7 +104,7 @@ exports.getFormatDisplayTypeForScope = (scope, api) => {
|
|
|
104
104
|
// need to see if all columns are numeric or date
|
|
105
105
|
if ('ColumnIds' in scope) {
|
|
106
106
|
const columns = scope.ColumnIds.map((c) => api.columnApi.getColumnFromId(c));
|
|
107
|
-
const columnDataTypes = uniq_1.default(columns.map((c) => c.
|
|
107
|
+
const columnDataTypes = uniq_1.default(columns.map((c) => c.dataType));
|
|
108
108
|
if (columnDataTypes.length == 1 && columnDataTypes[0] == 'Number') {
|
|
109
109
|
return 'Number';
|
|
110
110
|
}
|
|
@@ -44,7 +44,7 @@ class FreeTextColumnPopupComponent extends React.Component {
|
|
|
44
44
|
if (this.props.popupParams) {
|
|
45
45
|
if (this.props.popupParams.action && this.props.popupParams.column) {
|
|
46
46
|
if (this.props.popupParams.action == 'Edit') {
|
|
47
|
-
let editFreeTextColumn = this.props.FreeTextColumns.find((x) => x.ColumnId == this.props.popupParams.column.
|
|
47
|
+
let editFreeTextColumn = this.props.FreeTextColumns.find((x) => x.ColumnId == this.props.popupParams.column.columnId);
|
|
48
48
|
let index = this.props.FreeTextColumns.indexOf(editFreeTextColumn);
|
|
49
49
|
this.onEdit(editFreeTextColumn);
|
|
50
50
|
}
|
|
@@ -35,7 +35,7 @@ class FreeTextColumnSummaryComponent extends React.Component {
|
|
|
35
35
|
this.state = UIHelper_1.UIHelper.getEmptyConfigState();
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
|
-
let freeTextColumn = this.props.FreeTextColumns.find((c) => c.ColumnId == this.props.summarisedColumn.
|
|
38
|
+
let freeTextColumn = this.props.FreeTextColumns.find((c) => c.ColumnId == this.props.summarisedColumn.columnId);
|
|
39
39
|
let noFreeTextColumn = freeTextColumn == null;
|
|
40
40
|
let FreeTextColumnRow;
|
|
41
41
|
if (!noFreeTextColumn) {
|
|
@@ -52,7 +52,7 @@ class FreeTextColumnSummaryComponent extends React.Component {
|
|
|
52
52
|
const specialColumnsAreFilterable = this.props.api.internalApi.getAdaptableOptions()
|
|
53
53
|
.filterOptions.enableFilterOnSpecialColumns;
|
|
54
54
|
let configEntity = ObjectFactory_1.ObjectFactory.CreateEmptyFreeTextColumn(specialColumnsAreFilterable);
|
|
55
|
-
configEntity.ColumnId = this.props.summarisedColumn.
|
|
55
|
+
configEntity.ColumnId = this.props.summarisedColumn.columnId;
|
|
56
56
|
this.setState({
|
|
57
57
|
editedAdaptableObject: configEntity,
|
|
58
58
|
wizardStartIndex: 1,
|
|
@@ -47,7 +47,7 @@ exports.isValidFreeTextColumn = (data, api) => {
|
|
|
47
47
|
if (!data.ColumnId) {
|
|
48
48
|
return 'Column id cannot be empty';
|
|
49
49
|
}
|
|
50
|
-
const columnsWithSameIdCount = columns.filter((c) => c.
|
|
50
|
+
const columnsWithSameIdCount = columns.filter((c) => c.columnId === data.ColumnId).length;
|
|
51
51
|
const hasAlreadyExistingId = data.Uuid ? columnsWithSameIdCount > 1 : columnsWithSameIdCount > 0;
|
|
52
52
|
if (hasAlreadyExistingId) {
|
|
53
53
|
return 'A Column already exists with that id';
|