@adaptabletools/adaptable 16.0.0-canary.1 → 16.0.0-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/base.css +31 -31
- package/base.css.map +1 -1
- package/bundle.cjs.js +155 -155
- package/index.css +39 -39
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +12 -1
- package/src/AdaptableOptions/ActionRowOptions.d.ts +8 -5
- package/src/AdaptableOptions/AdaptableOptions.d.ts +7 -2
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +6 -2
- package/src/AdaptableOptions/FilterOptions.d.ts +1 -0
- package/src/AdaptableOptions/FormatColumnOptions.d.ts +51 -0
- package/src/AdaptableOptions/GroupingOptions.d.ts +0 -13
- package/src/AdaptableOptions/{SearchOptions.d.ts → QuickSearchOptions.d.ts} +3 -3
- package/src/AdaptableOptions/QuickSearchOptions.js +2 -0
- package/src/AdaptableOptions/TeamSharingOptions.d.ts +5 -0
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +8 -41
- package/src/Api/ColumnApi.d.ts +18 -7
- package/src/Api/DataChangeHistoryApi.d.ts +6 -0
- package/src/Api/EventApi.d.ts +19 -6
- package/src/Api/Events/ChexboxColumnClicked.d.ts +1 -0
- package/src/Api/Events/ScheduleTriggered.d.ts +11 -0
- package/src/Api/Events/ScheduleTriggered.js +2 -0
- package/src/Api/Implementation/ActionRowApiImpl.js +7 -5
- package/src/Api/Implementation/ApiBase.d.ts +3 -2
- package/src/Api/Implementation/ApiBase.js +5 -2
- package/src/Api/Implementation/ChartingApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ChartingApiImpl.js +4 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +4 -1
- package/src/Api/Implementation/ColumnApiImpl.js +22 -3
- package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +1 -0
- package/src/Api/Implementation/DataChangeHistoryApiImpl.js +3 -0
- package/src/Api/Implementation/OptionsApiImpl.d.ts +3 -2
- package/src/Api/Implementation/OptionsApiImpl.js +5 -2
- package/src/Api/Implementation/PredicateApiImpl.d.ts +5 -5
- package/src/Api/Implementation/PredicateApiImpl.js +8 -8
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +4 -0
- package/src/Api/Implementation/ScheduleApiImpl.js +5 -0
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +0 -3
- package/src/Api/Implementation/StyledColumnApiImpl.js +0 -26
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +5 -4
- package/src/Api/Implementation/UserInterfaceApiImpl.js +5 -0
- package/src/Api/Internal/AdaptableInternalApi.js +2 -2
- package/src/Api/Internal/AlertInternalApi.js +7 -2
- package/src/Api/Internal/FilterInternalApi.js +8 -4
- package/src/Api/Internal/FormatColumnInternalApi.js +12 -14
- package/src/Api/Internal/ScheduleInternalApi.d.ts +8 -0
- package/src/Api/Internal/ScheduleInternalApi.js +20 -0
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +5 -2
- package/src/Api/Internal/StyledColumnInternalApi.js +29 -2
- package/src/Api/Internal/UserInterfaceInternalApi.d.ts +5 -0
- package/src/Api/Internal/UserInterfaceInternalApi.js +18 -0
- package/src/Api/OptionsApi.d.ts +7 -3
- package/src/Api/PredicateApi.d.ts +5 -5
- package/src/Api/StyledColumnApi.d.ts +0 -14
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +7 -7
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +8 -15
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +65 -41
- package/src/PredefinedConfig/Common/Types.d.ts +1 -1
- package/src/PredefinedConfig/StyledColumnState.d.ts +3 -2
- package/src/PredefinedConfig/TeamSharingState.d.ts +1 -1
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -0
- package/src/Redux/ActionsReducers/SystemRedux.js +17 -3
- package/src/Redux/Store/AdaptableStore.js +2 -3
- package/src/Strategy/AdaptableModuleBase.d.ts +6 -6
- package/src/Strategy/FlashingCellModule.js +6 -2
- package/src/Strategy/Interface/IModule.d.ts +2 -2
- package/src/Strategy/ScheduleModule.js +3 -2
- package/src/Strategy/StyledColumnModule.js +24 -15
- package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +7 -3
- package/src/Utilities/Helpers/AdaptableHelper.js +1 -1
- package/src/Utilities/MenuItem.d.ts +4 -4
- package/src/Utilities/Services/MetamodelService.js +5 -1
- package/src/Utilities/Services/ModuleService.js +1 -1
- package/src/Utilities/Services/QueryLanguageService.js +1 -1
- package/src/Utilities/Services/RowEditService.js +1 -1
- package/src/Utilities/Services/TeamSharingService.d.ts +2 -0
- package/src/Utilities/Services/TeamSharingService.js +60 -3
- package/src/Utilities/Services/ValidationService.js +6 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.d.ts +6 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.js +2 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.d.ts +6 -6
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +32 -23
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.d.ts +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js +5 -5
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +11 -11
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.d.ts +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +11 -21
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.d.ts +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js +6 -7
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.d.ts +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.d.ts +4 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +3 -4
- package/src/View/AdaptableWizardView/Wizard.d.ts +4 -1
- package/src/View/AdaptableWizardView/Wizard.js +11 -10
- package/src/View/Charting/useChartingElements.js +1 -1
- package/src/View/Components/AdaptableButton/index.d.ts +3 -0
- package/src/View/Components/AdaptableButton/index.js +18 -0
- package/src/View/Components/AdaptableIconComponent/index.d.ts +7 -0
- package/src/View/Components/AdaptableIconComponent/index.js +16 -0
- package/src/View/Components/AdaptableIconComponent/useCustomIcon.d.ts +2 -0
- package/src/View/Components/AdaptableIconComponent/useCustomIcon.js +12 -0
- package/src/{components → View/Components}/Badge/index.d.ts +1 -1
- package/src/{components → View/Components}/Badge/index.js +1 -1
- package/src/View/Components/FilterForm/FilterForm.js +1 -1
- package/src/View/Components/FilterForm/ListBoxMenu.js +2 -2
- package/src/View/Components/FilterForm/QuickFilterForm.js +3 -2
- package/src/View/Components/Panels/PanelWithButton.d.ts +2 -2
- package/src/View/Components/Panels/PanelWithImage.d.ts +3 -3
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/TopBar.js +2 -3
- package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -1
- package/src/View/Components/PredicateEditor/PredicateEditor.js +4 -4
- package/src/View/Dashboard/CustomToolbarWrapper.js +2 -2
- package/src/View/Dashboard/Dashboard.js +4 -4
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +1 -0
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +13 -7
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +7 -1
- package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +1 -1
- package/src/View/DataChangeHistory/buildActionColumnButton.js +9 -2
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
- package/src/View/QuickSearch/QuickSearchPopup.js +3 -3
- package/src/View/QuickSearch/QuickSearchStatusBarContent.js +1 -1
- package/src/View/QuickSearch/QuickSearchViewPanel.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +2 -9
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +0 -1
- package/src/View/UIHelper.d.ts +2 -2
- package/src/agGrid/ActionColumnRenderer.d.ts +0 -2
- package/src/agGrid/ActionColumnRenderer.js +20 -5
- package/src/agGrid/Adaptable.d.ts +5 -2
- package/src/agGrid/Adaptable.js +61 -25
- package/src/agGrid/BadgeRenderer.js +19 -20
- package/src/agGrid/CheckboxRenderer.js +1 -1
- package/src/agGrid/agGridHelper.js +4 -2
- package/src/agGrid/agGridMenuHelper.js +11 -4
- package/src/agGrid/attachAddaptableColumnTypes.d.ts +1 -0
- package/src/agGrid/attachAddaptableColumnTypes.js +5 -4
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +1 -1
- package/src/components/Icon/index.d.ts +11 -0
- package/src/components/{AdaptableIconComponent → Icon}/index.js +10 -10
- package/src/components/IconSelector/IconSelector.js +3 -3
- package/src/components/SimpleButton/index.js +10 -10
- package/src/components/Toggle/Toggle.d.ts +2 -2
- package/src/components/Toggle/Toggle.js +2 -2
- package/src/components/icons/index.d.ts +4 -4
- package/src/components/icons/index.js +6 -6
- package/src/metamodel/adaptable.metamodel.d.ts +125 -57
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +9 -6
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/View/Components/AdaptableViewIcon/index.d.ts +0 -10
- package/src/View/Components/AdaptableViewIcon/index.js +0 -18
- package/src/components/AdaptableIconComponent/index.d.ts +0 -11
- /package/src/AdaptableOptions/{SearchOptions.js → FormatColumnOptions.js} +0 -0
|
@@ -107,10 +107,10 @@ exports.DefaultAdaptableOptions = {
|
|
|
107
107
|
actionRowButtons: undefined,
|
|
108
108
|
autoHandle: true,
|
|
109
109
|
disableInlineEditing: false,
|
|
110
|
+
setPrimaryKeyValue: undefined,
|
|
110
111
|
actionRowButtonOptions: {
|
|
111
112
|
customConfiguration: undefined,
|
|
112
113
|
position: 'pinnedLeft',
|
|
113
|
-
setPrimaryKeyValue: undefined,
|
|
114
114
|
},
|
|
115
115
|
actionRowFormOptions: {
|
|
116
116
|
formTitle: undefined,
|
|
@@ -158,6 +158,9 @@ exports.DefaultAdaptableOptions = {
|
|
|
158
158
|
unbalancedGroupsKey: undefined,
|
|
159
159
|
restoreUngroupedColumns: false,
|
|
160
160
|
},
|
|
161
|
+
formatColumnOptions: {
|
|
162
|
+
customDisplayFormatters: undefined,
|
|
163
|
+
},
|
|
161
164
|
layoutOptions: {
|
|
162
165
|
displayRowGroups: 'closed',
|
|
163
166
|
autoSaveLayouts: true,
|
|
@@ -209,6 +212,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
209
212
|
defaultDateColumnFilter: 'On',
|
|
210
213
|
defaultFilterFormTab: 'Values',
|
|
211
214
|
enableFilterOnSpecialColumns: true,
|
|
215
|
+
filterUsingTime: false,
|
|
212
216
|
maxFilterValuesToDisplay: 2000,
|
|
213
217
|
showQuickFilter: true,
|
|
214
218
|
showDistinctFilteredValuesOnly: false,
|
|
@@ -218,7 +222,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
218
222
|
showValuesCount: undefined,
|
|
219
223
|
quickFilterValuesWidth: 180,
|
|
220
224
|
},
|
|
221
|
-
|
|
225
|
+
quickSearchOptions: {
|
|
222
226
|
excludeColumnFromQuickSearch: undefined,
|
|
223
227
|
runQuickSearchOnRowGroups: false,
|
|
224
228
|
clearSearchesOnStartUp: false,
|
|
@@ -242,6 +246,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
242
246
|
updateInterval: 0,
|
|
243
247
|
updateNotification: undefined,
|
|
244
248
|
suppressOverrideConfigWarning: false,
|
|
249
|
+
showUpdateNotificationOncePerUpdate: false,
|
|
245
250
|
},
|
|
246
251
|
userInterfaceOptions: {
|
|
247
252
|
alternativeModuleNames: undefined,
|
|
@@ -263,7 +268,6 @@ exports.DefaultAdaptableOptions = {
|
|
|
263
268
|
styleClassNames: GeneralConstants_1.EMPTY_ARRAY,
|
|
264
269
|
permittedValues: undefined,
|
|
265
270
|
editLookUpItems: undefined,
|
|
266
|
-
customDisplayFormatters: undefined,
|
|
267
271
|
showDocumentationLinks: true,
|
|
268
272
|
gridInfoSections: ['GridSummary', 'AdaptableOptions', 'ColumnInfo', 'AdaptableObjects'],
|
|
269
273
|
showAdapTableVersion: true,
|
|
@@ -34,7 +34,7 @@ function assignAdaptableOptions(adaptableOptions) {
|
|
|
34
34
|
Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.actionRowOptions.actionRowFormOptions, returnedAdaptableOptions.actionRowOptions.actionRowFormOptions);
|
|
35
35
|
returnedAdaptableOptions.containerOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.containerOptions, adaptableOptions.containerOptions);
|
|
36
36
|
returnedAdaptableOptions.groupingOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.groupingOptions, adaptableOptions.groupingOptions);
|
|
37
|
-
returnedAdaptableOptions.
|
|
37
|
+
returnedAdaptableOptions.quickSearchOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.quickSearchOptions, adaptableOptions.quickSearchOptions);
|
|
38
38
|
returnedAdaptableOptions.filterOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.filterOptions, adaptableOptions.filterOptions);
|
|
39
39
|
returnedAdaptableOptions.userInterfaceOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.userInterfaceOptions, adaptableOptions.userInterfaceOptions);
|
|
40
40
|
returnedAdaptableOptions.userInterfaceOptions.dateInputOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.userInterfaceOptions.dateInputOptions, returnedAdaptableOptions.userInterfaceOptions.dateInputOptions);
|
|
@@ -2,9 +2,9 @@ import * as Redux from 'redux';
|
|
|
2
2
|
import { ModuleParams } from '../View/Components/SharedProps/ModuleViewPopupProps';
|
|
3
3
|
import { AdaptableMenuItem } from '../PredefinedConfig/Common/Menu';
|
|
4
4
|
import { AdaptableModule } from '../PredefinedConfig/Common/Types';
|
|
5
|
-
import { AdaptableIcon,
|
|
5
|
+
import { AdaptableIcon, AdaptableSystemIconName } from '../PredefinedConfig/Common/AdaptableIcon';
|
|
6
6
|
export declare class MenuItemDoReduxAction implements AdaptableMenuItem {
|
|
7
|
-
constructor(label: string, module: AdaptableModule, reduxAction: Redux.Action, icon:
|
|
7
|
+
constructor(label: string, module: AdaptableModule, reduxAction: Redux.Action, icon: AdaptableSystemIconName, isVisible: boolean);
|
|
8
8
|
reduxAction: Redux.Action;
|
|
9
9
|
label: string;
|
|
10
10
|
module: AdaptableModule;
|
|
@@ -12,7 +12,7 @@ export declare class MenuItemDoReduxAction implements AdaptableMenuItem {
|
|
|
12
12
|
icon: AdaptableIcon;
|
|
13
13
|
}
|
|
14
14
|
export declare class MenuItemDoClickFunction implements AdaptableMenuItem {
|
|
15
|
-
constructor(label: string, module: AdaptableModule, clickFunction: () => void, icon:
|
|
15
|
+
constructor(label: string, module: AdaptableModule, clickFunction: () => void, icon: AdaptableSystemIconName, isVisible: boolean);
|
|
16
16
|
onClick: () => void;
|
|
17
17
|
label: string;
|
|
18
18
|
module: AdaptableModule;
|
|
@@ -20,7 +20,7 @@ export declare class MenuItemDoClickFunction implements AdaptableMenuItem {
|
|
|
20
20
|
icon: AdaptableIcon;
|
|
21
21
|
}
|
|
22
22
|
export declare class MenuItemShowPopup implements AdaptableMenuItem {
|
|
23
|
-
constructor(label: string, module: AdaptableModule, componentName: string, icon:
|
|
23
|
+
constructor(label: string, module: AdaptableModule, componentName: string, icon: AdaptableSystemIconName, isVisible: boolean, popupParams?: ModuleParams);
|
|
24
24
|
reduxAction: Redux.Action;
|
|
25
25
|
label: string;
|
|
26
26
|
module: AdaptableModule;
|
|
@@ -50,7 +50,11 @@ class MetamodelService {
|
|
|
50
50
|
Object.entries(optionsObject).forEach(([optionKey, optionValue]) => {
|
|
51
51
|
var _a;
|
|
52
52
|
if (optionKey === 'gridOptions') {
|
|
53
|
-
|
|
53
|
+
validationErrors.push('gridOptions was removed from AdapTable Options in Version 16 and is no longer used');
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (optionKey === '_gridOptions') {
|
|
57
|
+
// gridOptions is a special case as it's NOT a public property, but we set and use it internally
|
|
54
58
|
return;
|
|
55
59
|
}
|
|
56
60
|
const optionMetamodel = (_a = optionsObjectMetamodel === null || optionsObjectMetamodel === void 0 ? void 0 : optionsObjectMetamodel.props) === null || _a === void 0 ? void 0 : _a.find((metamodelProperty) => metamodelProperty.name === optionKey);
|
|
@@ -140,7 +140,7 @@ class ModuleService {
|
|
|
140
140
|
case 'OpenFin':
|
|
141
141
|
return learnUrl + 'integrations-openfin';
|
|
142
142
|
case 'StyledColumn':
|
|
143
|
-
return learnUrl + 'handbook-styled-
|
|
143
|
+
return learnUrl + 'handbook-column-formatting#styled-columns';
|
|
144
144
|
case 'Charting':
|
|
145
145
|
return learnUrl + 'handbook-charts';
|
|
146
146
|
default:
|
|
@@ -92,7 +92,7 @@ class QueryLanguageService {
|
|
|
92
92
|
return result;
|
|
93
93
|
}
|
|
94
94
|
const force = (_a = config === null || config === void 0 ? void 0 : config.force) !== null && _a !== void 0 ? _a : false;
|
|
95
|
-
//
|
|
95
|
+
// see if validation should be performed
|
|
96
96
|
if (!this.adaptableApi.optionsApi.getAdaptableQLOptions().expressionOptions
|
|
97
97
|
.performExpressionValidation &&
|
|
98
98
|
!force) {
|
|
@@ -25,7 +25,7 @@ class RowEditService {
|
|
|
25
25
|
if (actionRowSubmittedInfo.type === 'rowCreated') {
|
|
26
26
|
const { formData } = actionRowSubmittedInfo;
|
|
27
27
|
const setPrimaryKeyValueFunction = adaptableApi.internalApi.getAdaptableInstance().adaptableOptions.actionRowOptions
|
|
28
|
-
.
|
|
28
|
+
.setPrimaryKeyValue;
|
|
29
29
|
const newRowData = typeof setPrimaryKeyValueFunction === 'function'
|
|
30
30
|
? setPrimaryKeyValueFunction({
|
|
31
31
|
rowData: formData,
|
|
@@ -6,6 +6,7 @@ import { TypeUuid } from '../../PredefinedConfig/Uuid';
|
|
|
6
6
|
import { AdaptableApi } from '../../../types';
|
|
7
7
|
export declare class TeamSharingService implements ITeamSharingService {
|
|
8
8
|
private adaptableApi;
|
|
9
|
+
private dismissedNotifications;
|
|
9
10
|
private updateCheckTimerId;
|
|
10
11
|
constructor(adaptableApi: AdaptableApi);
|
|
11
12
|
buildCustomSharedEntity(Entity: any, Configuration: CustomSharedEntityConfig): CustomSharedEntity;
|
|
@@ -16,6 +17,7 @@ export declare class TeamSharingService implements ITeamSharingService {
|
|
|
16
17
|
getSharedEntityLocalAndRemoteRevisions(changedAdaptableObjectId: TypeUuid, remoteSharedEntities: AdaptableSharedEntity[]): [number, number];
|
|
17
18
|
getStaleActiveSharedEntities(): SharedEntityActiveStatus;
|
|
18
19
|
showUpdateNotifications(): void;
|
|
20
|
+
private showUpdateNotificationAlert;
|
|
19
21
|
destroy(): void;
|
|
20
22
|
private createSharedEntity;
|
|
21
23
|
private getSharedEntityDependencyTree;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TeamSharingService = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const Uuid_1 = require("../../PredefinedConfig/Uuid");
|
|
6
|
+
const ObjectFactory_1 = tslib_1.__importDefault(require("../ObjectFactory"));
|
|
5
7
|
class TeamSharingService {
|
|
6
8
|
constructor(adaptableApi) {
|
|
7
9
|
this.adaptableApi = adaptableApi;
|
|
10
|
+
this.dismissedNotifications = [];
|
|
8
11
|
const teamSharingOptions = adaptableApi.optionsApi.getTeamSharingOptions();
|
|
9
12
|
if (teamSharingOptions.updateInterval > 0) {
|
|
10
13
|
// convert minutes to millis
|
|
@@ -132,9 +135,7 @@ class TeamSharingService {
|
|
|
132
135
|
Object.values(this.getStaleActiveSharedEntities()).forEach((sharedEntityActiveInfo) => {
|
|
133
136
|
const notificationMessage = `Active share ${sharedEntityActiveInfo.sharedEntity.Module} has a new Revision: ${sharedEntityActiveInfo.sharedEntity.Revision}`;
|
|
134
137
|
if (updateNotification === 'Alert' || updateNotification === 'AlertWithNotification') {
|
|
135
|
-
this.
|
|
136
|
-
DisplayNotification: updateNotification === 'AlertWithNotification',
|
|
137
|
-
});
|
|
138
|
+
this.showUpdateNotificationAlert(sharedEntityActiveInfo, notificationMessage);
|
|
138
139
|
}
|
|
139
140
|
if (updateNotification === 'SystemStatus') {
|
|
140
141
|
this.adaptableApi.systemStatusApi.setInfoSystemStatus(`TeamSharing: ${notificationMessage}`);
|
|
@@ -142,6 +143,62 @@ class TeamSharingService {
|
|
|
142
143
|
this.adaptableApi.teamSharingApi.internalApi.fireTeamSharingEntityChangedEvent(sharedEntityActiveInfo.sharedEntity);
|
|
143
144
|
});
|
|
144
145
|
}
|
|
146
|
+
showUpdateNotificationAlert(sharedEntityActiveInfo, message) {
|
|
147
|
+
const { updateNotification, showUpdateNotificationOncePerUpdate } = this.adaptableApi.optionsApi.getTeamSharingOptions();
|
|
148
|
+
if (this.dismissedNotifications.some((notification) => notification.entityUuid === sharedEntityActiveInfo.sharedEntity.Uuid)) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
const buttons = [
|
|
152
|
+
{
|
|
153
|
+
Label: 'Ok',
|
|
154
|
+
ButtonStyle: {
|
|
155
|
+
tone: 'neutral',
|
|
156
|
+
variant: 'raised',
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
Label: 'Import',
|
|
161
|
+
Action: (context) => {
|
|
162
|
+
this.adaptableApi.teamSharingApi.importSharedEntry(sharedEntityActiveInfo.sharedEntity);
|
|
163
|
+
},
|
|
164
|
+
ButtonStyle: {
|
|
165
|
+
tone: 'info',
|
|
166
|
+
variant: 'raised',
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
];
|
|
170
|
+
if (!showUpdateNotificationOncePerUpdate) {
|
|
171
|
+
buttons.push({
|
|
172
|
+
Label: 'Dismiss',
|
|
173
|
+
ButtonStyle: {
|
|
174
|
+
tone: 'error',
|
|
175
|
+
variant: 'raised',
|
|
176
|
+
},
|
|
177
|
+
Action: () => {
|
|
178
|
+
this.dismissedNotifications.push({
|
|
179
|
+
entityUuid: sharedEntityActiveInfo.sharedEntity.Uuid,
|
|
180
|
+
});
|
|
181
|
+
},
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
const alert = {
|
|
185
|
+
alertType: 'generic',
|
|
186
|
+
header: 'Team Sharing Update',
|
|
187
|
+
message: message,
|
|
188
|
+
alertDefinition: Object.assign(Object.assign({}, ObjectFactory_1.default.CreateEmptyAlertDefinition()), { MessageType: 'Info', AlertProperties: {
|
|
189
|
+
DisplayNotification: updateNotification === 'AlertWithNotification',
|
|
190
|
+
NotificationDuration: 'always',
|
|
191
|
+
}, AlertForm: {
|
|
192
|
+
Buttons: buttons,
|
|
193
|
+
} }),
|
|
194
|
+
};
|
|
195
|
+
this.adaptableApi.alertApi.showAdaptableAlert(alert);
|
|
196
|
+
if (showUpdateNotificationOncePerUpdate) {
|
|
197
|
+
this.dismissedNotifications.push({
|
|
198
|
+
entityUuid: sharedEntityActiveInfo.sharedEntity.Uuid,
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
}
|
|
145
202
|
destroy() {
|
|
146
203
|
clearTimeout(this.updateCheckTimerId);
|
|
147
204
|
}
|
|
@@ -64,13 +64,17 @@ class ValidationService {
|
|
|
64
64
|
IsAlertDefinitionTriggered(alertDefinition, dataChangedEvent) {
|
|
65
65
|
var _a;
|
|
66
66
|
const displayValue = this.adaptableApi.gridApi.getDisplayValueFromRowNode(dataChangedEvent.rowNode, dataChangedEvent.column.columnId);
|
|
67
|
-
|
|
67
|
+
const predicateDefHandlerContext = {
|
|
68
68
|
value: dataChangedEvent.newValue,
|
|
69
69
|
oldValue: dataChangedEvent.oldValue,
|
|
70
70
|
displayValue,
|
|
71
71
|
node: dataChangedEvent.rowNode,
|
|
72
72
|
column: dataChangedEvent.column,
|
|
73
|
-
|
|
73
|
+
adaptableApi: this.adaptableApi,
|
|
74
|
+
userName: this.adaptableApi.optionsApi.getUserName(),
|
|
75
|
+
adaptableId: this.adaptableApi.optionsApi.getAdaptableId(),
|
|
76
|
+
};
|
|
77
|
+
return this.adaptableApi.predicateApi.handlePredicates((_a = alertDefinition.Rule) === null || _a === void 0 ? void 0 : _a.Predicates, predicateDefHandlerContext, false);
|
|
74
78
|
}
|
|
75
79
|
performServerValidation(cellDataChangedInfo, config) {
|
|
76
80
|
const serverValidationContext = {
|
|
@@ -2,5 +2,5 @@ import * as React from 'react';
|
|
|
2
2
|
import { AdaptableOptions } from '../../../types';
|
|
3
3
|
export declare const AdaptableOptionsForm: React.FunctionComponent<{
|
|
4
4
|
adaptableOptions: AdaptableOptions;
|
|
5
|
-
|
|
5
|
+
onChangedAdaptableOptions: (adaptableOptions: AdaptableOptions) => void;
|
|
6
6
|
}>;
|
|
@@ -103,7 +103,7 @@ const AdaptableOptionsForm = (props) => {
|
|
|
103
103
|
// @ts-ignore
|
|
104
104
|
adaptableOptions[sectionName] = Object.assign(Object.assign({}, adaptableOptions[sectionName]), { [option.name]: option.value });
|
|
105
105
|
}
|
|
106
|
-
props.
|
|
106
|
+
props.onChangedAdaptableOptions(adaptableOptions);
|
|
107
107
|
};
|
|
108
108
|
return (React.createElement(rebass_1.Box, { p: 2 }, nocodeOptions.map(([sectionName, { containerLabel, items }]) => {
|
|
109
109
|
return (React.createElement(OptionsSection, { onChange: handleOptionChange(sectionName), key: sectionName, id: sectionName, name: containerLabel, options: items }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { AdaptableOptions } from '../../../types';
|
|
3
2
|
import { OnePageWizardSection } from '../../Wizard/OnePageWizards';
|
|
4
3
|
import { AdaptableFrameworkComponent } from '../../../../types';
|
|
4
|
+
import { AdaptableConfig } from './AdaptableConfig';
|
|
5
5
|
export interface CustomSection<T> {
|
|
6
6
|
title: OnePageWizardSection<T>['title'];
|
|
7
7
|
details?: AdaptableFrameworkComponent;
|
|
@@ -11,20 +11,20 @@ export interface CustomSection<T> {
|
|
|
11
11
|
/**
|
|
12
12
|
* Internal state of adaptableOptions.
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
adaptableConfig: AdaptableConfig,
|
|
15
15
|
/**
|
|
16
16
|
* With this callback adaptableOptions can be changed.
|
|
17
17
|
*/
|
|
18
|
-
onChange: (
|
|
18
|
+
onChange: (newAdaptableConfig: AdaptableConfig) => void,
|
|
19
19
|
/**
|
|
20
20
|
* Set the selected columns.
|
|
21
21
|
*/
|
|
22
22
|
setSelectedColumns: (selectedColumn: Record<string, boolean>) => void) => React.ReactNode;
|
|
23
23
|
}
|
|
24
24
|
export interface ConfigurationWizardProps {
|
|
25
|
-
|
|
26
|
-
onFinish: (
|
|
25
|
+
adaptableConfig: AdaptableConfig;
|
|
26
|
+
onFinish: (adaptableConfig: AdaptableConfig) => void;
|
|
27
27
|
onCancel: () => void;
|
|
28
|
-
startSections?: CustomSection<
|
|
28
|
+
startSections?: CustomSection<AdaptableConfig>[];
|
|
29
29
|
}
|
|
30
30
|
export declare const ConfigurationWizard: React.FunctionComponent<ConfigurationWizardProps>;
|
|
@@ -16,44 +16,47 @@ const AdaptableHelper_1 = tslib_1.__importDefault(require("../../../Utilities/He
|
|
|
16
16
|
const ConfigurationWizard = (props) => {
|
|
17
17
|
var _a, _b;
|
|
18
18
|
const [isPrimaryKeySelected, setIsValid] = React.useState(true);
|
|
19
|
-
const [
|
|
20
|
-
var _a;
|
|
19
|
+
const [adaptableConfig, setAdaptableConfig] = (0, react_1.useState)(() => {
|
|
21
20
|
const gridOptionDefaults = {
|
|
22
21
|
sideBar: {
|
|
23
22
|
toolPanels: ['columns', 'filters', 'adaptable'],
|
|
24
23
|
},
|
|
25
24
|
};
|
|
26
|
-
const
|
|
27
|
-
|
|
25
|
+
const gridOptions = Object.assign(Object.assign({}, gridOptionDefaults), props.adaptableConfig.gridOptions);
|
|
26
|
+
const adaptableOptions = AdaptableHelper_1.default.assignAdaptableOptions(props.adaptableConfig.adaptableOptions);
|
|
27
|
+
return { gridOptions, adaptableOptions };
|
|
28
28
|
});
|
|
29
29
|
const [selectedColumns, setSelectedColumns] = (0, react_1.useState)(() => {
|
|
30
|
-
|
|
30
|
+
var _a, _b;
|
|
31
|
+
return (_b = (_a = props.adaptableConfig.gridOptions) === null || _a === void 0 ? void 0 : _a.columnDefs) === null || _b === void 0 ? void 0 : _b.reduce((acc, col) => {
|
|
31
32
|
acc[col.field] = true;
|
|
32
33
|
return acc;
|
|
33
34
|
}, {});
|
|
34
35
|
});
|
|
35
36
|
const columnsHandle = React.useRef();
|
|
36
37
|
const handleFinish = () => {
|
|
37
|
-
const newAdaptableOptions = Object.assign({}, adaptableOptions);
|
|
38
|
-
|
|
38
|
+
const newAdaptableOptions = Object.assign({}, adaptableConfig.adaptableOptions);
|
|
39
|
+
const newGridOptions = Object.assign({}, adaptableConfig.gridOptions);
|
|
39
40
|
if (columnsHandle.current) {
|
|
40
|
-
|
|
41
|
-
.current.getColumns()
|
|
42
|
-
.map((column) => {
|
|
41
|
+
adaptableConfig.gridOptions.columnDefs = columnsHandle.current.getColumns().map((column) => {
|
|
43
42
|
const newColumn = Object.assign(Object.assign({}, column), { headerName: column.caption || StringExtensions_1.default.Humanize(column.field) });
|
|
44
43
|
delete newColumn.caption;
|
|
45
44
|
return newColumn;
|
|
46
45
|
});
|
|
47
46
|
newAdaptableOptions.primaryKey = columnsHandle.current.getPrimaryKey();
|
|
48
47
|
}
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
const newAdaptableConfig = {
|
|
49
|
+
adaptableOptions: newAdaptableOptions,
|
|
50
|
+
gridOptions: newGridOptions,
|
|
51
|
+
};
|
|
52
|
+
setAdaptableConfig(newAdaptableConfig);
|
|
53
|
+
props.onFinish(newAdaptableConfig);
|
|
51
54
|
};
|
|
52
55
|
const handlePrimaryKeyColumnIsNotSelected = React.useCallback((newIsValid) => {
|
|
53
56
|
setIsValid(newIsValid);
|
|
54
57
|
}, []);
|
|
55
58
|
const handleColumnsChange = React.useCallback((columns) => {
|
|
56
|
-
|
|
59
|
+
setAdaptableConfig((adaptableConfig) => (Object.assign(Object.assign({}, adaptableConfig), { gridOptions: Object.assign(Object.assign({}, adaptableConfig.gridOptions), { columnDefs: columns }) })));
|
|
57
60
|
}, []);
|
|
58
61
|
const handleColumnSelectionChange = React.useCallback((col, flag) => {
|
|
59
62
|
setSelectedColumns((selectedColumns) => {
|
|
@@ -62,7 +65,13 @@ const ConfigurationWizard = (props) => {
|
|
|
62
65
|
return newSelectedColumns;
|
|
63
66
|
});
|
|
64
67
|
}, []);
|
|
65
|
-
const
|
|
68
|
+
const handleAdaptableOptionsChange = React.useCallback((adaptableOptions) => {
|
|
69
|
+
setAdaptableConfig((adaptableConfig) => (Object.assign(Object.assign({}, adaptableConfig), { adaptableOptions: adaptableOptions })));
|
|
70
|
+
}, []);
|
|
71
|
+
const handleGridOptionsChange = React.useCallback((gridOptions) => {
|
|
72
|
+
setAdaptableConfig((adaptableConfig) => (Object.assign(Object.assign({}, adaptableConfig), { gridOptions: gridOptions })));
|
|
73
|
+
}, []);
|
|
74
|
+
const financePlugin = (_b = (_a = adaptableConfig.adaptableOptions.plugins) === null || _a === void 0 ? void 0 : _a.find) === null || _b === void 0 ? void 0 : _b.call(_a, (plugin) => plugin.pluginId === 'finance');
|
|
66
75
|
let sections = [
|
|
67
76
|
{
|
|
68
77
|
title: 'Columns',
|
|
@@ -73,33 +82,33 @@ const ConfigurationWizard = (props) => {
|
|
|
73
82
|
}
|
|
74
83
|
return true;
|
|
75
84
|
},
|
|
76
|
-
render: () => (React.createElement(ConfigurationWizardColumnsStep_1.ConfigurationWizardColumnsStep, {
|
|
85
|
+
render: () => (React.createElement(ConfigurationWizardColumnsStep_1.ConfigurationWizardColumnsStep, { adaptableConfig: adaptableConfig, setPrimaryKeyIsNotSelected: handlePrimaryKeyColumnIsNotSelected, onChange: setAdaptableConfig, selectedColumns: selectedColumns, onSelectionChange: handleColumnSelectionChange, onColumnChange: handleColumnsChange, columnsHandle: columnsHandle })),
|
|
77
86
|
},
|
|
78
87
|
{
|
|
79
88
|
title: 'AdapTable Options',
|
|
80
89
|
details: 'Configure Adaptable Options',
|
|
81
|
-
isValid: () =>
|
|
82
|
-
render: () => (React.createElement(AdaptableOptionsForm_1.AdaptableOptionsForm, { adaptableOptions: adaptableOptions,
|
|
90
|
+
isValid: () => adaptableConfig.adaptableOptions.adaptableId ? true : 'Adaptable ID is required',
|
|
91
|
+
render: () => (React.createElement(AdaptableOptionsForm_1.AdaptableOptionsForm, { adaptableOptions: adaptableConfig.adaptableOptions, onChangedAdaptableOptions: handleAdaptableOptionsChange })),
|
|
83
92
|
},
|
|
84
93
|
{
|
|
85
94
|
title: 'AG Grid Options',
|
|
86
95
|
details: 'Configure AG Grid Options',
|
|
87
|
-
render: () => (React.createElement(GridOptionsForm_1.default, {
|
|
96
|
+
render: () => (React.createElement(GridOptionsForm_1.default, { gridOptions: adaptableConfig.gridOptions, onChangedGridOptions: handleGridOptionsChange })),
|
|
88
97
|
},
|
|
89
98
|
{
|
|
90
99
|
title: 'UI Elements',
|
|
91
100
|
details: 'Configure UI Elements',
|
|
92
|
-
render: () => (React.createElement(UiOptionsForm_1.UIElementsForm, { adaptableOptions: adaptableOptions,
|
|
101
|
+
render: () => (React.createElement(UiOptionsForm_1.UIElementsForm, { adaptableOptions: adaptableConfig.adaptableOptions, gridOptions: adaptableConfig.gridOptions, onChangedAdaptableOptions: handleAdaptableOptionsChange, onChangedGridOptions: handleGridOptionsChange })),
|
|
93
102
|
},
|
|
94
103
|
{
|
|
95
104
|
title: 'Entitlements',
|
|
96
105
|
details: 'Configure Entitlements',
|
|
97
|
-
render: () => (React.createElement(EntitlementsForm_1.default, { adaptableOptions: adaptableOptions,
|
|
106
|
+
render: () => (React.createElement(EntitlementsForm_1.default, { adaptableOptions: adaptableConfig.adaptableOptions, onChangedAptableOptions: handleAdaptableOptionsChange })),
|
|
98
107
|
},
|
|
99
108
|
financePlugin && {
|
|
100
109
|
title: 'Finance',
|
|
101
110
|
details: 'Finance Options',
|
|
102
|
-
render: () => (React.createElement(FinanceForm_1.FinanceForm, {
|
|
111
|
+
render: () => (React.createElement(FinanceForm_1.FinanceForm, { adaptableConfig: adaptableConfig, onChangedAdaptableConfig: setAdaptableConfig })),
|
|
103
112
|
},
|
|
104
113
|
].filter(Boolean);
|
|
105
114
|
if (props.startSections) {
|
|
@@ -110,13 +119,13 @@ const ConfigurationWizard = (props) => {
|
|
|
110
119
|
isValid: section.isValid,
|
|
111
120
|
isVisible: section.isVisible,
|
|
112
121
|
render: () => {
|
|
113
|
-
return section.render(
|
|
122
|
+
return section.render(adaptableConfig, setAdaptableConfig, setSelectedColumns);
|
|
114
123
|
},
|
|
115
124
|
};
|
|
116
125
|
}),
|
|
117
126
|
...sections,
|
|
118
127
|
];
|
|
119
128
|
}
|
|
120
|
-
return (React.createElement(OnePageWizards_1.OnePageWizard, { data:
|
|
129
|
+
return (React.createElement(OnePageWizards_1.OnePageWizard, { data: adaptableConfig, name: "Configure", defaultCurrentSectionName: 'default section name', onHide: () => null, onFinish: handleFinish, sections: sections }));
|
|
121
130
|
};
|
|
122
131
|
exports.ConfigurationWizard = ConfigurationWizard;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { NocodeColumn } from './ColumnsList';
|
|
3
|
-
import {
|
|
3
|
+
import { AdaptableConfig } from './AdaptableConfig';
|
|
4
4
|
export interface ConfigurationWizardColumnsStepProps {
|
|
5
|
-
|
|
6
|
-
onChange: (
|
|
5
|
+
adaptableConfig: AdaptableConfig;
|
|
6
|
+
onChange: (newConfig: AdaptableConfig) => void;
|
|
7
7
|
columnsHandle: React.MutableRefObject<{
|
|
8
8
|
getColumns: () => any[];
|
|
9
9
|
getPrimaryKey: () => string;
|
package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js
CHANGED
|
@@ -5,14 +5,14 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const ColumnsList_1 = tslib_1.__importDefault(require("./ColumnsList"));
|
|
7
7
|
const ConfigurationWizardColumnsStep = (props) => {
|
|
8
|
-
var _a, _b
|
|
8
|
+
var _a, _b;
|
|
9
9
|
let theme = 'light';
|
|
10
|
-
if (typeof props.adaptableOptions.predefinedConfig === 'object' &&
|
|
11
|
-
((_a = props.adaptableOptions.predefinedConfig.Theme) === null || _a === void 0 ? void 0 : _a.CurrentTheme)) {
|
|
12
|
-
theme = props.adaptableOptions.predefinedConfig.Theme.CurrentTheme;
|
|
10
|
+
if (typeof props.adaptableConfig.adaptableOptions.predefinedConfig === 'object' &&
|
|
11
|
+
((_a = props.adaptableConfig.adaptableOptions.predefinedConfig.Theme) === null || _a === void 0 ? void 0 : _a.CurrentTheme)) {
|
|
12
|
+
theme = props.adaptableConfig.adaptableOptions.predefinedConfig.Theme.CurrentTheme;
|
|
13
13
|
}
|
|
14
14
|
return (React.createElement(ColumnsList_1.default, { theme: theme, handle: props.columnsHandle, onValidityChange: (valid) => {
|
|
15
15
|
props.setPrimaryKeyIsNotSelected(valid);
|
|
16
|
-
}, selectedColumns: props.selectedColumns, onChange: props.onColumnChange, onSelectionChange: props.onSelectionChange, columns: (
|
|
16
|
+
}, selectedColumns: props.selectedColumns, onChange: props.onColumnChange, onSelectionChange: props.onSelectionChange, columns: (_b = props.adaptableConfig.gridOptions) === null || _b === void 0 ? void 0 : _b.columnDefs }));
|
|
17
17
|
};
|
|
18
18
|
exports.ConfigurationWizardColumnsStep = ConfigurationWizardColumnsStep;
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { AdaptableOptions } from '../../../types';
|
|
3
3
|
interface EntitlementsFormOptions {
|
|
4
4
|
adaptableOptions: AdaptableOptions;
|
|
5
|
-
|
|
5
|
+
onChangedAptableOptions: (adaptableOptions: AdaptableOptions) => void;
|
|
6
6
|
}
|
|
7
7
|
declare const EntitlementsForm: React.FunctionComponent<EntitlementsFormOptions>;
|
|
8
8
|
export default EntitlementsForm;
|
|
@@ -48,7 +48,7 @@ const EntitlementsListForm = (props) => {
|
|
|
48
48
|
{ adaptableModule: module, accessLevel: accessLevel },
|
|
49
49
|
];
|
|
50
50
|
}
|
|
51
|
-
props.
|
|
51
|
+
props.onChangedAptableOptions(Object.assign(Object.assign({}, abOptions), { entitlementOptions: Object.assign(Object.assign({}, abOptions.entitlementOptions), { moduleEntitlements: newEntitlements }) }));
|
|
52
52
|
}, [abOptions === null || abOptions === void 0 ? void 0 : abOptions.entitlementOptions]);
|
|
53
53
|
if (typeof entitlements === 'function') {
|
|
54
54
|
return (React.createElement(HelpBlock_1.default, { mb: 2 }, "Entitlements cannot be customized, they are handled by a custom function."));
|
|
@@ -113,7 +113,7 @@ const DefaultEntitlementForm = (props) => {
|
|
|
113
113
|
return React.createElement(HelpBlock_1.default, { mb: 2 }, "Default Entitlement is controlled by a custom function");
|
|
114
114
|
}
|
|
115
115
|
const handleDefaultEntitlementChange = React.useCallback((accessLevel) => {
|
|
116
|
-
props.
|
|
116
|
+
props.onChangedAptableOptions(Object.assign(Object.assign({}, abOptions), { entitlementOptions: Object.assign(Object.assign({}, abOptions.entitlementOptions), { defaultAccessLevel: accessLevel }) }));
|
|
117
117
|
}, [(_b = abOptions === null || abOptions === void 0 ? void 0 : abOptions.entitlementOptions) === null || _b === void 0 ? void 0 : _b.defaultAccessLevel]);
|
|
118
118
|
return (React.createElement(FormLayout_1.default, { mb: 2 },
|
|
119
119
|
React.createElement(FormLayout_1.FormRow, { label: "Default Entitlement:" },
|
package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { AdaptableConfig } from '../../../../types';
|
|
3
3
|
export interface FinanceFormProps {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
adaptableConfig: AdaptableConfig;
|
|
5
|
+
onChangedAdaptableConfig: (adaptableConfig: AdaptableConfig) => void;
|
|
6
6
|
}
|
|
7
7
|
export declare const FinanceForm: React.FunctionComponent<React.PropsWithChildren<FinanceFormProps>>;
|
package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js
CHANGED
|
@@ -216,17 +216,17 @@ const FDC3ColumnCreator = (props) => {
|
|
|
216
216
|
const FinanceFormSectionTitle = (props) => (React.createElement(rebass_1.Box, Object.assign({}, props, { mb: 2 }),
|
|
217
217
|
React.createElement(HelpBlock_1.default, null, props.children)));
|
|
218
218
|
const FinanceForm = (props) => {
|
|
219
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m
|
|
220
|
-
const columnOptions = (
|
|
219
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
220
|
+
const columnOptions = (_c = (_b = (_a = props.adaptableConfig.gridOptions) === null || _a === void 0 ? void 0 : _a.columnDefs) === null || _b === void 0 ? void 0 : _b.map) === null || _c === void 0 ? void 0 : _c.call(_b, (item) => {
|
|
221
221
|
var _a;
|
|
222
222
|
return ({
|
|
223
223
|
label: StringExtensions_1.default.Humanize((_a = item.headerName) !== null && _a !== void 0 ? _a : item.field),
|
|
224
224
|
value: item.field,
|
|
225
225
|
});
|
|
226
226
|
});
|
|
227
|
-
const financePlugin = (
|
|
228
|
-
const financePluginOptions = ((
|
|
229
|
-
const fdc3Columns = (
|
|
227
|
+
const financePlugin = (_e = (_d = props.adaptableConfig.adaptableOptions) === null || _d === void 0 ? void 0 : _d.plugins) === null || _e === void 0 ? void 0 : _e.find((item) => item.pluginId === 'finance');
|
|
228
|
+
const financePluginOptions = ((_f = financePlugin === null || financePlugin === void 0 ? void 0 : financePlugin.options) !== null && _f !== void 0 ? _f : {});
|
|
229
|
+
const fdc3Columns = (_g = financePluginOptions === null || financePluginOptions === void 0 ? void 0 : financePluginOptions.fdc3Columns) !== null && _g !== void 0 ? _g : {};
|
|
230
230
|
const handleSetFdc3Columns = (key, newFDC3Columns) => {
|
|
231
231
|
var _a;
|
|
232
232
|
// Unfurtunatly finance plugin options need to be mutated.
|
|
@@ -235,7 +235,7 @@ const FinanceForm = (props) => {
|
|
|
235
235
|
financePluginOptions.fdc3Columns = (_a = financePluginOptions.fdc3Columns) !== null && _a !== void 0 ? _a : {};
|
|
236
236
|
financePluginOptions.fdc3Columns[key] = newFDC3Columns;
|
|
237
237
|
// on change is called with a new array of plugins so the component refreshes.
|
|
238
|
-
props.
|
|
238
|
+
props.onChangedAdaptableConfig(Object.assign(Object.assign({}, props.adaptableConfig), { adaptableOptions: Object.assign(Object.assign({}, props.adaptableConfig.adaptableOptions), { plugins: [...props.adaptableConfig.adaptableOptions.plugins] }) }));
|
|
239
239
|
};
|
|
240
240
|
const renderEditor = (fdc3ColumnType, fdc3ColumnsItems) => {
|
|
241
241
|
return fdc3ColumnsItems.map((fdc3Column, currentFDCColumnId) => (React.createElement(rebass_1.Box, { key: currentFDCColumnId, mb: 3 },
|
|
@@ -261,19 +261,19 @@ const FinanceForm = (props) => {
|
|
|
261
261
|
var _a;
|
|
262
262
|
handleSetFdc3Columns(type, [...((_a = fdc3Columns[type]) !== null && _a !== void 0 ? _a : []), fdc3Column]);
|
|
263
263
|
} })),
|
|
264
|
-
Boolean((
|
|
264
|
+
Boolean((_h = fdc3Columns.instrumentColumns) === null || _h === void 0 ? void 0 : _h.length) && (React.createElement(rebass_1.Box, null,
|
|
265
265
|
React.createElement(FinanceFormSectionTitle, null, "Instrument Columns"),
|
|
266
266
|
renderEditor('instrumentColumns', fdc3Columns.instrumentColumns))),
|
|
267
|
-
Boolean((
|
|
267
|
+
Boolean((_j = fdc3Columns.positionColumns) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement(rebass_1.Box, null,
|
|
268
268
|
React.createElement(FinanceFormSectionTitle, null, "Position Columns"),
|
|
269
269
|
renderEditor('positionColumns', fdc3Columns.positionColumns))),
|
|
270
|
-
Boolean((
|
|
270
|
+
Boolean((_k = fdc3Columns.contactColumns) === null || _k === void 0 ? void 0 : _k.length) && (React.createElement(rebass_1.Box, null,
|
|
271
271
|
React.createElement(FinanceFormSectionTitle, null, "Contact Columns"),
|
|
272
272
|
renderEditor('contactColumns', fdc3Columns.contactColumns))),
|
|
273
|
-
Boolean((
|
|
273
|
+
Boolean((_l = fdc3Columns.countryColumns) === null || _l === void 0 ? void 0 : _l.length) && (React.createElement(rebass_1.Box, null,
|
|
274
274
|
React.createElement(FinanceFormSectionTitle, null, "Country Columns"),
|
|
275
275
|
renderEditor('countryColumns', fdc3Columns.countryColumns))),
|
|
276
|
-
Boolean((
|
|
276
|
+
Boolean((_m = fdc3Columns.organizationColumns) === null || _m === void 0 ? void 0 : _m.length) && (React.createElement(rebass_1.Box, null,
|
|
277
277
|
React.createElement(FinanceFormSectionTitle, null, "Organization Columns"),
|
|
278
278
|
renderEditor('organizationColumns', fdc3Columns.organizationColumns)))));
|
|
279
279
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { GridOptions } from '@ag-grid-community/core';
|
|
3
3
|
interface GridOptionsFormOptions {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
gridOptions: GridOptions;
|
|
5
|
+
onChangedGridOptions: (gridOptions: GridOptions) => void;
|
|
6
6
|
}
|
|
7
7
|
declare const GridOptionsForm: (props: GridOptionsFormOptions) => JSX.Element;
|
|
8
8
|
export default GridOptionsForm;
|