@adaptabletools/adaptable 19.1.0 → 19.1.2-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -5
- package/src/AdaptableOptions/AlertOptions.d.ts +3 -0
- package/src/AdaptableOptions/ColumnMenuOptions.d.ts +1 -1
- package/src/AdaptableOptions/CommentOptions.d.ts +2 -2
- package/src/AdaptableOptions/NoteOptions.d.ts +2 -2
- package/src/Api/AdaptableApi.d.ts +21 -11
- package/src/Api/Events/GridDataChanged.d.ts +3 -0
- package/src/Api/GridApi.d.ts +8 -3
- package/src/Api/Implementation/ActionColumnApiImpl.d.ts +0 -2
- package/src/Api/Implementation/ActionColumnApiImpl.js +1 -4
- package/src/Api/Implementation/ActionRowApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ActionRowApiImpl.js +4 -4
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +5 -6
- package/src/Api/Implementation/AdaptableApiImpl.js +7 -1
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -1
- package/src/Api/Implementation/AlertApiImpl.js +16 -15
- package/src/Api/Implementation/ApiBase.d.ts +12 -3
- package/src/Api/Implementation/ApiBase.js +39 -24
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +3 -3
- package/src/Api/Implementation/CalendarApiImpl.js +1 -1
- package/src/Api/Implementation/ChartingApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ChartingApiImpl.js +9 -9
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ColumnApiImpl.js +18 -18
- package/src/Api/Implementation/ColumnFilterApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ColumnFilterApiImpl.js +7 -7
- package/src/Api/Implementation/ColumnMenuApiImpl.d.ts +0 -2
- package/src/Api/Implementation/ColumnMenuApiImpl.js +2 -5
- package/src/Api/Implementation/CommentsApiImpl.d.ts +1 -1
- package/src/Api/Implementation/CommentsApiImpl.js +6 -4
- package/src/Api/Implementation/ConfigApiImpl.js +23 -24
- package/src/Api/Implementation/ContextMenuApiImpl.d.ts +0 -2
- package/src/Api/Implementation/ContextMenuApiImpl.js +1 -4
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +1 -1
- package/src/Api/Implementation/CustomSortApiImpl.js +3 -3
- package/src/Api/Implementation/DashboardApiImpl.d.ts +1 -1
- package/src/Api/Implementation/DashboardApiImpl.js +5 -5
- package/src/Api/Implementation/DataImportApiImpl.d.ts +1 -1
- package/src/Api/Implementation/DataImportApiImpl.js +3 -3
- package/src/Api/Implementation/DataSetApiImpl.d.ts +1 -1
- package/src/Api/Implementation/DataSetApiImpl.js +5 -5
- package/src/Api/Implementation/EntitlementApiImpl.d.ts +1 -1
- package/src/Api/Implementation/EntitlementApiImpl.js +5 -5
- package/src/Api/Implementation/EventApiImpl.d.ts +1 -1
- package/src/Api/Implementation/EventApiImpl.js +2 -2
- package/src/Api/Implementation/ExportApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ExportApiImpl.js +7 -7
- package/src/Api/Implementation/ExpressionApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ExpressionApiImpl.js +5 -5
- package/src/Api/Implementation/Fdc3ApiImpl.d.ts +1 -1
- package/src/Api/Implementation/Fdc3ApiImpl.js +4 -4
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -1
- package/src/Api/Implementation/FlashingCellApiImpl.js +7 -7
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/FormatColumnApiImpl.js +4 -4
- package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +4 -4
- package/src/Api/Implementation/GridApiImpl.d.ts +3 -2
- package/src/Api/Implementation/GridApiImpl.js +108 -103
- package/src/Api/Implementation/GridFilterApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridFilterApiImpl.js +4 -4
- package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -1
- package/src/Api/Implementation/LayoutApiImpl.js +3 -3
- package/src/Api/Implementation/NamedQueryApiImpl.d.ts +1 -1
- package/src/Api/Implementation/NamedQueryApiImpl.js +3 -3
- package/src/Api/Implementation/NoteApiImpl.d.ts +1 -1
- package/src/Api/Implementation/NoteApiImpl.js +3 -3
- package/src/Api/Implementation/OptionsApiImpl.js +7 -7
- package/src/Api/Implementation/PluginsApiImpl.js +1 -1
- package/src/Api/Implementation/PlusMinusApiImpl.js +1 -1
- package/src/Api/Implementation/PredicateApiImpl.d.ts +1 -1
- package/src/Api/Implementation/PredicateApiImpl.js +4 -4
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ScheduleApiImpl.js +3 -3
- package/src/Api/Implementation/SettingsPanelApiImpl.js +1 -1
- package/src/Api/Implementation/StatusBarApiImpl.js +1 -1
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/StyledColumnApiImpl.js +4 -4
- package/src/Api/Implementation/SystemStatusApiImpl.d.ts +1 -1
- package/src/Api/Implementation/SystemStatusApiImpl.js +4 -4
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +1 -1
- package/src/Api/Implementation/TeamSharingApiImpl.js +11 -11
- package/src/Api/Implementation/ThemeApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ThemeApiImpl.js +8 -8
- package/src/Api/Implementation/ToolPanelApiImpl.js +2 -2
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.js +5 -5
- package/src/Api/Internal/ActionRowInternalApi.js +8 -8
- package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -0
- package/src/Api/Internal/AdaptableInternalApi.js +55 -50
- package/src/Api/Internal/AlertInternalApi.js +9 -9
- package/src/Api/Internal/CalculatedColumnInternalApi.js +11 -9
- package/src/Api/Internal/ChartingInternalApi.js +1 -1
- package/src/Api/Internal/ColumnFilterInternalApi.js +7 -9
- package/src/Api/Internal/ColumnInternalApi.js +3 -3
- package/src/Api/Internal/CommentsInternalApi.d.ts +1 -0
- package/src/Api/Internal/CommentsInternalApi.js +4 -0
- package/src/Api/Internal/CustomSortInternalApi.js +3 -3
- package/src/Api/Internal/DashboardInternalApi.js +4 -3
- package/src/Api/Internal/DataImportInternalApi.js +2 -2
- package/src/Api/Internal/DataSetInternalApi.js +2 -2
- package/src/Api/Internal/ExportInternalApi.js +21 -22
- package/src/Api/Internal/ExpressionInternalApi.js +4 -4
- package/src/Api/Internal/Fdc3InternalApi.d.ts +0 -1
- package/src/Api/Internal/Fdc3InternalApi.js +9 -12
- package/src/Api/Internal/FlashingCellInternalApi.js +2 -2
- package/src/Api/Internal/FormatColumnInternalApi.js +2 -3
- package/src/Api/Internal/FreeTextColumnInternalApi.js +5 -2
- package/src/Api/Internal/GridFilterInternalApi.js +2 -2
- package/src/Api/Internal/GridInternalApi.js +26 -26
- package/src/Api/Internal/LayoutInternalApi.js +6 -5
- package/src/Api/Internal/NamedQueryInternalApi.js +2 -2
- package/src/Api/Internal/NoteInternalApi.d.ts +1 -0
- package/src/Api/Internal/NoteInternalApi.js +4 -0
- package/src/Api/Internal/PredicateInternalApi.js +5 -5
- package/src/Api/Internal/ScheduleInternalApi.js +1 -1
- package/src/Api/Internal/StyledColumnInternalApi.js +2 -2
- package/src/Api/Internal/SystemStatusInternalApi.js +1 -1
- package/src/Api/Internal/TeamSharingInternalApi.js +2 -2
- package/src/Api/Internal/ThemeInternalApi.js +1 -1
- package/src/PredefinedConfig/Common/ExtendedLayoutInfo.d.ts +15 -0
- package/src/PredefinedConfig/Common/FilterActionOnDataChange.d.ts +3 -0
- package/src/Strategy/NoteModule.d.ts +0 -1
- package/src/Strategy/NoteModule.js +4 -5
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +1 -1
- package/src/Utilities/Services/CellPopupService.js +4 -4
- package/src/Utilities/Services/Fdc3Service.js +1 -3
- package/src/Utilities/Services/FlashingCellService.d.ts +0 -2
- package/src/Utilities/Services/FlashingCellService.js +2 -3
- package/src/Utilities/Services/RowEditService.js +3 -5
- package/src/View/Alert/AlertStatusSubPanel.js +4 -4
- package/src/View/Charting/ShowChartButton.js +4 -4
- package/src/View/Comments/CommentsEditor.js +2 -2
- package/src/View/Comments/CommentsPopup.js +1 -4
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
- package/src/View/DataImport/DataImportWizard/DataImportWizard.js +14 -13
- package/src/View/Layout/TransposedPopup.js +2 -2
- package/src/View/Note/NotePopup.js +1 -4
- package/src/agGrid/AdaptableAgGrid.d.ts +2 -5
- package/src/agGrid/AdaptableAgGrid.js +47 -26
- package/src/agGrid/AgGridAdapter.js +3 -3
- package/src/agGrid/FloatingFilterWrapper.js +4 -3
- package/src/agGrid/defaultAdaptableOptions.js +100 -96
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/ExpressionEditor/DataTableEditor.js +3 -3
- package/src/components/ExpressionEditor/ExpressionPreview.js +4 -4
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +32 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -18,7 +18,7 @@ export class PredicateInternalApi extends ApiBase {
|
|
|
18
18
|
getSystemFilterPredicateIds(scope) {
|
|
19
19
|
const systemFilterPredicates = this.getPredicateOptions().systemFilterPredicates;
|
|
20
20
|
if (typeof systemFilterPredicates === 'function') {
|
|
21
|
-
const systemPredicateContext = Object.assign(Object.assign({}, this.
|
|
21
|
+
const systemPredicateContext = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { systemPredicateDefs: this.getPredicateApi().getSystemPredicateDefsByModuleScope('columnFilter'), moduleScope: 'columnFilter', columnScope: scope });
|
|
22
22
|
return systemFilterPredicates(systemPredicateContext);
|
|
23
23
|
}
|
|
24
24
|
return systemFilterPredicates;
|
|
@@ -33,7 +33,7 @@ export class PredicateInternalApi extends ApiBase {
|
|
|
33
33
|
getSystemAlertPredicateIds(scope) {
|
|
34
34
|
const systemAlertPredicates = this.getPredicateOptions().systemAlertPredicates;
|
|
35
35
|
if (typeof systemAlertPredicates === 'function') {
|
|
36
|
-
const systemPredicateContext = Object.assign(Object.assign({}, this.
|
|
36
|
+
const systemPredicateContext = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { systemPredicateDefs: this.getPredicateApi().getSystemPredicateDefsByModuleScope('alert'), moduleScope: 'alert', columnScope: scope });
|
|
37
37
|
return systemAlertPredicates(systemPredicateContext);
|
|
38
38
|
}
|
|
39
39
|
return systemAlertPredicates;
|
|
@@ -41,7 +41,7 @@ export class PredicateInternalApi extends ApiBase {
|
|
|
41
41
|
getSystemBadgeStylePredicateIds(scope) {
|
|
42
42
|
const systemBadgeStylePredicates = this.getPredicateOptions().systemBadgeStylePredicates;
|
|
43
43
|
if (typeof systemBadgeStylePredicates === 'function') {
|
|
44
|
-
const systemPredicateContext = Object.assign(Object.assign({}, this.
|
|
44
|
+
const systemPredicateContext = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { systemPredicateDefs: this.getPredicateApi().getSystemPredicateDefsByModuleScope('badgeStyle'), moduleScope: 'badgeStyle', columnScope: scope });
|
|
45
45
|
return systemBadgeStylePredicates(systemPredicateContext);
|
|
46
46
|
}
|
|
47
47
|
return systemBadgeStylePredicates;
|
|
@@ -56,7 +56,7 @@ export class PredicateInternalApi extends ApiBase {
|
|
|
56
56
|
getSystemFormatColumnPredicateIds(scope) {
|
|
57
57
|
const systemFormatColumnPredicates = this.getPredicateOptions().systemFormatColumnPredicates;
|
|
58
58
|
if (typeof systemFormatColumnPredicates === 'function') {
|
|
59
|
-
const systemPredicateContext = Object.assign(Object.assign({}, this.
|
|
59
|
+
const systemPredicateContext = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { systemPredicateDefs: this.getPredicateApi().getSystemPredicateDefsByModuleScope('formatColumn'), moduleScope: 'formatColumn', columnScope: scope });
|
|
60
60
|
return systemFormatColumnPredicates(systemPredicateContext);
|
|
61
61
|
}
|
|
62
62
|
return systemFormatColumnPredicates;
|
|
@@ -71,7 +71,7 @@ export class PredicateInternalApi extends ApiBase {
|
|
|
71
71
|
getSystemFlashingCellPredicateIds(scope) {
|
|
72
72
|
const systemFlashingCellPredicates = this.getPredicateOptions().systemFlashingCellPredicates;
|
|
73
73
|
if (typeof systemFlashingCellPredicates === 'function') {
|
|
74
|
-
const systemPredicateContext = Object.assign({ systemPredicateDefs: this.getPredicateApi().getSystemPredicateDefsByModuleScope('flashingcell'), moduleScope: 'flashingcell', columnScope: scope }, this.
|
|
74
|
+
const systemPredicateContext = Object.assign({ systemPredicateDefs: this.getPredicateApi().getSystemPredicateDefsByModuleScope('flashingcell'), moduleScope: 'flashingcell', columnScope: scope }, this.getAdaptableInternalApi().buildBaseContext());
|
|
75
75
|
return systemFlashingCellPredicates(systemPredicateContext);
|
|
76
76
|
}
|
|
77
77
|
return systemFlashingCellPredicates;
|
|
@@ -5,7 +5,7 @@ export class ScheduleInternalApi extends ApiBase {
|
|
|
5
5
|
*/
|
|
6
6
|
fireScheduleTriggeredEvent(schedule) {
|
|
7
7
|
const adaptableApi = this.getAdaptableApi();
|
|
8
|
-
const scheduleTriggeredInfo = Object.assign(Object.assign({}, this.
|
|
8
|
+
const scheduleTriggeredInfo = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { schedule: schedule });
|
|
9
9
|
adaptableApi.eventApi.emit('ScheduleTriggered', scheduleTriggeredInfo);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
@@ -5,13 +5,13 @@ export class StyledColumnInternalApi extends ApiBase {
|
|
|
5
5
|
if (column.dataType !== 'Number') {
|
|
6
6
|
return undefined;
|
|
7
7
|
}
|
|
8
|
-
return this.
|
|
8
|
+
return this._adaptable.getMinMaxCachedValueForColumn(column, 'min');
|
|
9
9
|
}
|
|
10
10
|
getMaxValueForNumericColumn(column) {
|
|
11
11
|
if (column.dataType !== 'Number') {
|
|
12
12
|
return undefined;
|
|
13
13
|
}
|
|
14
|
-
return this.
|
|
14
|
+
return this._adaptable.getMinMaxCachedValueForColumn(column, 'max');
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Gets the Minimum Value to display for a Styled Column
|
|
@@ -6,7 +6,7 @@ export class SystemStatusInternalApi extends ApiBase {
|
|
|
6
6
|
* @param systemStatusMessageInfo Info about new System Status Message
|
|
7
7
|
*/
|
|
8
8
|
fireSystemStatusMessageDisplayedEvent(systemStatusMessageInfo) {
|
|
9
|
-
const systemStatusMessageDisplayedInfo = Object.assign({ systemStatusMessageInfo: systemStatusMessageInfo }, this.
|
|
9
|
+
const systemStatusMessageDisplayedInfo = Object.assign({ systemStatusMessageInfo: systemStatusMessageInfo }, this.getAdaptableInternalApi().buildBaseContext());
|
|
10
10
|
this.getAdaptableApi().eventApi.emit('SystemStatusMessageDisplayed', systemStatusMessageDisplayedInfo);
|
|
11
11
|
}
|
|
12
12
|
addSystemStatusMessageInfo(systemStatusMessageInfo) {
|
|
@@ -5,8 +5,8 @@ export class TeamSharingInternalApi extends ApiBase {
|
|
|
5
5
|
* @param sharedEntity Entity that has been changed
|
|
6
6
|
*/
|
|
7
7
|
fireTeamSharingEntityChangedEvent(sharedEntity) {
|
|
8
|
-
if (this.
|
|
9
|
-
const teamSharingEntityChangedInfo = Object.assign(Object.assign({}, this.
|
|
8
|
+
if (this.isAdapTableReady()) {
|
|
9
|
+
const teamSharingEntityChangedInfo = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { sharedEntity: sharedEntity });
|
|
10
10
|
this.getAdaptableApi().eventApi.emit('TeamSharingEntityChanged', teamSharingEntityChangedInfo);
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -10,7 +10,7 @@ export class ThemeInternalApi extends ApiBase {
|
|
|
10
10
|
return `ab--theme-${theme}`;
|
|
11
11
|
}
|
|
12
12
|
openInWindow() {
|
|
13
|
-
this.
|
|
13
|
+
this.getAdaptableInternalApi().showPopupWindow({
|
|
14
14
|
id: SHOW_THEME_EDITOR,
|
|
15
15
|
title: 'Theme',
|
|
16
16
|
icon: 'theme',
|
|
@@ -3,10 +3,25 @@ import { AdaptableModule, AdaptableObject, Layout } from '../../types';
|
|
|
3
3
|
* Defines an Extended Layout - provides a Layout and all objects that refer to it
|
|
4
4
|
*/
|
|
5
5
|
export interface ExtendedLayoutInfo {
|
|
6
|
+
/**
|
|
7
|
+
* Layout being extended
|
|
8
|
+
*/
|
|
6
9
|
Layout: Layout;
|
|
10
|
+
/**
|
|
11
|
+
* Object to be included in the Layout
|
|
12
|
+
*/
|
|
7
13
|
Extensions: LayoutExtension[];
|
|
8
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Defines an object being extended in a Layout
|
|
17
|
+
*/
|
|
9
18
|
export interface LayoutExtension {
|
|
19
|
+
/**
|
|
20
|
+
* Module to which Extended Object belongs
|
|
21
|
+
*/
|
|
10
22
|
Module: AdaptableModule;
|
|
23
|
+
/**
|
|
24
|
+
* Object being Extended
|
|
25
|
+
*/
|
|
11
26
|
Object: AdaptableObject;
|
|
12
27
|
}
|
|
@@ -3,7 +3,6 @@ import { ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
|
3
3
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
4
4
|
import { IModule } from './Interface/IModule';
|
|
5
5
|
export declare class NoteModule extends AdaptableModuleBase implements IModule {
|
|
6
|
-
private adaptable;
|
|
7
6
|
constructor(api: AdaptableApi);
|
|
8
7
|
isModuleAvailable(): boolean;
|
|
9
8
|
createContextMenuItems(menuContext: ContextMenuContext): import("../Utilities/MenuItem").MenuItemDoClickFunction<"calculated-column-edit" | "cell-summary-show" | "column-group" | "column-filter-group" | "column-filter-clear" | "column-filter-suspend" | "column-filter-unsuspend" | "column-info-show" | "dashboard-group" | "dashboard-collapse" | "dashboard-configure" | "dashboard-dock" | "dashboard-expand" | "dashboard-float" | "dashboard-hide" | "dashboard-show" | "data-import" | "grid-group" | "grid-info-show" | "layout-edit" | "settings-panel-open" | "system-status-show" | "menu-group" | "alert-clear" | "bulk-update-apply" | "column-filter-on-cell-value" | "comment-add" | "comment-remove" | "edit-group" | "export-group" | "export-visual-data" | "export-visual-data-excel" | "export-all-data-excel" | "export-all-data" | "export-all-data-csv" | "export-all-data-clipboard" | "export-all-data-json" | "export-all-data-table" | "export-current-data" | "export-current-data-excel" | "export-current-data-csv" | "export-current-data-clipboard" | "export-current-data-json" | "export-current-data-table" | "export-selected-cells" | "export-selected-cells-excel" | "export-selected-cells-csv" | "export-selected-cells-clipboard" | "export-selected-cells-json" | "export-selected-cells-table" | "export-selected-rows" | "export-selected-rows-excel" | "export-selected-rows-csv" | "export-selected-rows-clipboard" | "export-selected-rows-json" | "export-selected-rows-table" | "fdc3-broadcast" | "fdc3-raise-intent" | "flashing-cell-clear" | "flashing-row-clear" | "layout-aggregated-view" | "layout-auto-size" | "layout-clear-selection" | "layout-select-all" | "note-add" | "note-remove" | "smart-edit-apply">[];
|
|
@@ -4,7 +4,6 @@ import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
|
4
4
|
export class NoteModule extends AdaptableModuleBase {
|
|
5
5
|
constructor(api) {
|
|
6
6
|
super(ModuleConstants.NoteModuleId, ModuleConstants.NoteFriendlyName, 'note', 'NotePopup', 'Notes', api);
|
|
7
|
-
this.adaptable = api.internalApi.getAdaptableInstance();
|
|
8
7
|
}
|
|
9
8
|
isModuleAvailable() {
|
|
10
9
|
// Note module doesn't support autogenerated primary keys
|
|
@@ -21,17 +20,17 @@ export class NoteModule extends AdaptableModuleBase {
|
|
|
21
20
|
if (menuContext.isRowGroupColumn || menuContext.isGroupedNode) {
|
|
22
21
|
return;
|
|
23
22
|
}
|
|
24
|
-
const isReadOnly = this.
|
|
23
|
+
const isReadOnly = this.api.entitlementApi.getEntitlementAccessLevelForModule(this.moduleInfo.ModuleName) === 'ReadOnly';
|
|
25
24
|
if (isReadOnly) {
|
|
26
25
|
return undefined;
|
|
27
26
|
}
|
|
28
|
-
const isCellNotable = typeof ((_b = (_a = this.
|
|
29
|
-
? this.
|
|
27
|
+
const isCellNotable = typeof ((_b = (_a = this.api.optionsApi) === null || _a === void 0 ? void 0 : _a.getNoteOptions()) === null || _b === void 0 ? void 0 : _b.isCellNotable) === 'function'
|
|
28
|
+
? this.api.optionsApi.getNoteOptions().isCellNotable(Object.assign({ gridCell: menuContext.gridCell }, createBaseContext(this.api)))
|
|
30
29
|
: true;
|
|
31
30
|
if (!isCellNotable) {
|
|
32
31
|
return;
|
|
33
32
|
}
|
|
34
|
-
const note = this.
|
|
33
|
+
const note = this.api.noteApi.getNoteForCell({
|
|
35
34
|
PrimaryKeyValue: menuContext.primaryKeyValue,
|
|
36
35
|
ColumnId: menuContext.adaptableColumn.columnId,
|
|
37
36
|
});
|
|
@@ -241,7 +241,7 @@ export const scalarExpressionFunctions = {
|
|
|
241
241
|
// expression is syntactically valid, but operates with incompatible values
|
|
242
242
|
return;
|
|
243
243
|
}
|
|
244
|
-
return sanitizedArguments.reduce((a, b) => a + b) /
|
|
244
|
+
return sanitizedArguments.reduce((a, b) => a + b) / sanitizedArguments.length;
|
|
245
245
|
},
|
|
246
246
|
description: 'Returns the average of inputted numbers',
|
|
247
247
|
signatures: ['AVG(number, number, ...number)'],
|
|
@@ -39,7 +39,7 @@ export class AggregatedScalarLiveValue {
|
|
|
39
39
|
const aggregationValue = this.getAggregationValue(rowNode);
|
|
40
40
|
if (aggregationValue == undefined) {
|
|
41
41
|
logOnce(`${this.aggregatedScalarExpression} :: aggregation value is NOT available!`, (message) => {
|
|
42
|
-
this.adaptableApi.
|
|
42
|
+
this.adaptableApi.logWarn(message);
|
|
43
43
|
});
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
@@ -74,8 +74,8 @@ export class CellPopupService {
|
|
|
74
74
|
this.hidePopup();
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
|
-
const cellNote = this.
|
|
78
|
-
const cellComments = this.
|
|
77
|
+
const cellNote = this.api.noteApi.getNoteForCell(cellPosition);
|
|
78
|
+
const cellComments = this.api.commentApi.getCommentThread(cellPosition);
|
|
79
79
|
const hasNotesOrComments = cellNote || cellComments;
|
|
80
80
|
// call only if it is different
|
|
81
81
|
if (CellPopupService.isSameAddress(openCellAddress, cellPosition)) {
|
|
@@ -92,8 +92,8 @@ export class CellPopupService {
|
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
94
|
// if open but this has no note, close
|
|
95
|
-
const cellNote = this.
|
|
96
|
-
const cellComments = this.
|
|
95
|
+
const cellNote = this.api.noteApi.getNoteForCell(cellAddress);
|
|
96
|
+
const cellComments = this.api.commentApi.getCommentThread(cellAddress);
|
|
97
97
|
const hasNotesOrComments = cellNote || cellComments;
|
|
98
98
|
if (openCellAddress && !hasNotesOrComments) {
|
|
99
99
|
// hide only if in edit mode
|
|
@@ -122,9 +122,7 @@ export class Fdc3Service {
|
|
|
122
122
|
if (!this.getFdc3Options().enableLogging) {
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
|
-
this.adaptableApi.
|
|
126
|
-
.getAdaptableInstance()
|
|
127
|
-
.logger.consoleLog(`FDC3::${type} - `, params.join(' : '));
|
|
125
|
+
this.adaptableApi.consoleLog(`FDC3::${type} - `, params.join(' : '));
|
|
128
126
|
}
|
|
129
127
|
logFdc3Error(error) {
|
|
130
128
|
this.adaptableApi.consoleError(`FDC3 error`, error);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
2
1
|
import { AdaptableApi, AdaptableFlashingCell } from '../../types';
|
|
3
2
|
import { TypeUuid } from '../../PredefinedConfig/Uuid';
|
|
4
3
|
import { IAdaptableService } from './Interface/IAdaptableService';
|
|
@@ -8,7 +7,6 @@ export declare const FLASHING_CELL_ROW_KEY = "__ROW";
|
|
|
8
7
|
*/
|
|
9
8
|
export declare class FlashingCellService implements IAdaptableService {
|
|
10
9
|
private api;
|
|
11
|
-
adaptable: IAdaptable;
|
|
12
10
|
gridCellsCurrentlyFlashing: Record<string, Record<string, TypeUuid>>;
|
|
13
11
|
flashingCellsMapping: Record<TypeUuid, AdaptableFlashingCell>;
|
|
14
12
|
constructor(api: AdaptableApi);
|
|
@@ -5,7 +5,6 @@ export const FLASHING_CELL_ROW_KEY = '__ROW';
|
|
|
5
5
|
export class FlashingCellService {
|
|
6
6
|
constructor(api) {
|
|
7
7
|
this.api = api;
|
|
8
|
-
this.adaptable = api.internalApi.getAdaptableInstance();
|
|
9
8
|
this.gridCellsCurrentlyFlashing = {};
|
|
10
9
|
this.flashingCellsMapping = {};
|
|
11
10
|
}
|
|
@@ -50,7 +49,7 @@ export class FlashingCellService {
|
|
|
50
49
|
clearAllGridCellFlashes() {
|
|
51
50
|
this.gridCellsCurrentlyFlashing = {};
|
|
52
51
|
this.flashingCellsMapping = {};
|
|
53
|
-
this.
|
|
52
|
+
this.api.gridApi.refreshAllCells(true);
|
|
54
53
|
}
|
|
55
54
|
isAnyFlashingCellActive() {
|
|
56
55
|
return Object.keys(this.gridCellsCurrentlyFlashing).length > 0;
|
|
@@ -60,6 +59,6 @@ export class FlashingCellService {
|
|
|
60
59
|
if (!cellDataChangedInfo) {
|
|
61
60
|
return;
|
|
62
61
|
}
|
|
63
|
-
this.
|
|
62
|
+
this.api.gridApi.refreshCells([cellDataChangedInfo.rowNode], Object.keys(flashingCell.flashColumnIds), true);
|
|
64
63
|
}
|
|
65
64
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
export class RowEditService {
|
|
2
2
|
constructor(adaptableApi) {
|
|
3
3
|
this.adaptableApi = adaptableApi;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
adaptableInstance.api.eventApi.on('ActionRowSubmitted', (eventInfo) => this.autoHandleActionRowButtons(eventInfo));
|
|
4
|
+
if (adaptableApi.optionsApi.getActionRowOptions().autoHandle) {
|
|
5
|
+
adaptableApi.eventApi.on('ActionRowSubmitted', (eventInfo) => this.autoHandleActionRowButtons(eventInfo));
|
|
7
6
|
}
|
|
8
7
|
}
|
|
9
8
|
autoHandleActionRowButtons(actionRowSubmittedInfo) {
|
|
@@ -20,8 +19,7 @@ export class RowEditService {
|
|
|
20
19
|
}
|
|
21
20
|
if (actionRowSubmittedInfo.type === 'rowCreated') {
|
|
22
21
|
const { formData } = actionRowSubmittedInfo;
|
|
23
|
-
const setPrimaryKeyValueFunction = adaptableApi.
|
|
24
|
-
.setPrimaryKeyValue;
|
|
22
|
+
const setPrimaryKeyValueFunction = adaptableApi.optionsApi.getActionRowOptions().setPrimaryKeyValue;
|
|
25
23
|
const newRowData = typeof setPrimaryKeyValueFunction === 'function'
|
|
26
24
|
? setPrimaryKeyValueFunction(Object.assign({ rowData: formData }, adaptableApi.internalApi.buildBaseContext()))
|
|
27
25
|
: Object.assign({}, formData);
|
|
@@ -7,16 +7,16 @@ import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
|
|
|
7
7
|
import { ActiveAlertsPanel } from './ActiveAlertsPanel';
|
|
8
8
|
const initialStyle = { color: '', background: '' };
|
|
9
9
|
export const AlertStatusPanel = () => {
|
|
10
|
-
const
|
|
10
|
+
const adaptableApi = useAdaptable().api;
|
|
11
11
|
const [style, setStyle] = React.useState(initialStyle);
|
|
12
|
-
const module =
|
|
13
|
-
const statusbarHighlightDuration =
|
|
12
|
+
const module = adaptableApi.internalApi.getModuleService().getModuleById(ModuleConstants.AlertModuleId);
|
|
13
|
+
const statusbarHighlightDuration = adaptableApi.optionsApi.getAlertOptions().statusbarHighlightDuration;
|
|
14
14
|
/**
|
|
15
15
|
* Using a selector to so the component updates each time an alert is triggered.
|
|
16
16
|
*/
|
|
17
17
|
const alerts = useSelector((state) => state.System.AdaptableAlerts);
|
|
18
18
|
const text = alerts.length == 0 ? '0 Alerts' : alerts.length == 1 ? '1 Alert' : alerts.length + ' Alerts';
|
|
19
|
-
const handleAction = React.useCallback(() =>
|
|
19
|
+
const handleAction = React.useCallback(() => adaptableApi.alertApi.openAlertSettingsPanel(), []);
|
|
20
20
|
// blinking logic
|
|
21
21
|
const previousAlerts = React.useRef(alerts);
|
|
22
22
|
const timeoutId = React.useRef();
|
|
@@ -21,13 +21,13 @@ const BaseShowChartButton = (props) => {
|
|
|
21
21
|
React.createElement(SimpleButton, { variant: "raised", tone: "success" }, "Open")));
|
|
22
22
|
};
|
|
23
23
|
const ShowAgChartButton = (props) => {
|
|
24
|
-
var _a
|
|
25
|
-
const
|
|
26
|
-
const chartingOptions = (
|
|
24
|
+
var _a;
|
|
25
|
+
const adaptableApi = useAdaptable().api;
|
|
26
|
+
const chartingOptions = adaptableApi.optionsApi.getChartingOptions();
|
|
27
27
|
const chartContainers = chartingOptions === null || chartingOptions === void 0 ? void 0 : chartingOptions.chartContainers;
|
|
28
28
|
const { isOpen, showChart, closeChart } = useAgChartState(props.chartDefinition);
|
|
29
29
|
const containerOptions = [
|
|
30
|
-
Object.assign({ label: (
|
|
30
|
+
Object.assign({ label: (_a = chartingOptions.agGridContainerName) !== null && _a !== void 0 ? _a : AG_GRID_CHART_WINDOW, onClick: () => {
|
|
31
31
|
showChart(null);
|
|
32
32
|
} }, (chartContainers
|
|
33
33
|
? chartContainers === null || chartContainers === void 0 ? void 0 : chartContainers.map((contianerDef) => ({
|
|
@@ -6,9 +6,9 @@ import Panel from '../../components/Panel';
|
|
|
6
6
|
import SimpleButton from '../../components/SimpleButton';
|
|
7
7
|
import * as CommentsRedux from '../../Redux/ActionsReducers/CommentsRedux';
|
|
8
8
|
import { SystemCommentsAndNotesSelector } from '../../Redux/ActionsReducers/SystemRedux';
|
|
9
|
-
import { formatDate } from '../../Utilities/ExpressionFunctions/dateUtils';
|
|
10
9
|
import { useAdaptable } from '../AdaptableContext';
|
|
11
10
|
import AdaptableInput from '../Components/AdaptableInput';
|
|
11
|
+
import dateFnsFormat from 'date-fns/format';
|
|
12
12
|
// Edit Mode
|
|
13
13
|
// [author] [edit, delete]
|
|
14
14
|
// [text-editor] * this is different
|
|
@@ -78,7 +78,7 @@ export const CommentsEditor = (props) => {
|
|
|
78
78
|
React.createElement(Flex, { mb: 2, alignItems: "center" },
|
|
79
79
|
React.createElement(Box, null,
|
|
80
80
|
React.createElement(Box, { "data-name": "comment-username", fontSize: 3, fontWeight: "bold" }, (_d = comment === null || comment === void 0 ? void 0 : comment.Author) === null || _d === void 0 ? void 0 : _d.UserName),
|
|
81
|
-
comment.Timestamp && (React.createElement(Box, { "data-name": "comment-timestamp", fontSize: 2 },
|
|
81
|
+
comment.Timestamp && (React.createElement(Box, { "data-name": "comment-timestamp", fontSize: 2 }, dateFnsFormat(comment.Timestamp, adaptable.api.commentApi.internalApi.getCommentsDateFormat())))),
|
|
82
82
|
React.createElement(Box, { flex: 1 }),
|
|
83
83
|
React.createElement(SimpleButton, { variant: "text", icon: "edit", disabled: !isOwnComment || isReadOnlyModule, onClick: () => setActiveEditingComment(comment.Uuid) }),
|
|
84
84
|
React.createElement(SimpleButton, { variant: "text", icon: "delete", disabled: !isOwnComment || isReadOnlyModule, onClick: () => {
|
|
@@ -7,7 +7,6 @@ import dateFnsFormat from 'date-fns/format';
|
|
|
7
7
|
import { useAdaptable } from '../AdaptableContext';
|
|
8
8
|
import { PopupPanel } from '../Components/Popups/AdaptablePopup/PopupPanel';
|
|
9
9
|
import { AdaptableButtonComponent } from '../Components/AdaptableButton';
|
|
10
|
-
import { DEFAULT_DATE_FORMAT_PATTERN_WITH_TIME } from '../../Utilities/Constants/GeneralConstants';
|
|
11
10
|
const tableDOMProps = {
|
|
12
11
|
style: {
|
|
13
12
|
minHeight: 160,
|
|
@@ -15,9 +14,7 @@ const tableDOMProps = {
|
|
|
15
14
|
},
|
|
16
15
|
};
|
|
17
16
|
const CellComments = (props) => {
|
|
18
|
-
var _a;
|
|
19
17
|
const adaptable = useAdaptable();
|
|
20
|
-
const dateFormat = (_a = adaptable.api.optionsApi.getCommentOptions().dateFormat) !== null && _a !== void 0 ? _a : DEFAULT_DATE_FORMAT_PATTERN_WITH_TIME;
|
|
21
18
|
const isReadOnlyModule = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule('Comment') === 'ReadOnly';
|
|
22
19
|
const columnsMap = React.useMemo(() => {
|
|
23
20
|
const columns = {
|
|
@@ -30,7 +27,7 @@ const CellComments = (props) => {
|
|
|
30
27
|
field: 'Timestamp',
|
|
31
28
|
maxWidth: 150,
|
|
32
29
|
valueGetter: (params) => {
|
|
33
|
-
return dateFnsFormat(params.data.Timestamp,
|
|
30
|
+
return dateFnsFormat(params.data.Timestamp, adaptable.api.commentApi.internalApi.getCommentsDateFormat());
|
|
34
31
|
},
|
|
35
32
|
},
|
|
36
33
|
text: {
|
|
@@ -31,7 +31,7 @@ export const DataChangeHistoryGrid = (props) => {
|
|
|
31
31
|
return () => {
|
|
32
32
|
requestAnimationFrame(() => {
|
|
33
33
|
var _a;
|
|
34
|
-
(_a = adaptableApiRef.current) === null || _a === void 0 ? void 0 : _a.internalApi.getAdaptableInstance().destroy({ unmount: true,
|
|
34
|
+
(_a = adaptableApiRef.current) === null || _a === void 0 ? void 0 : _a.internalApi.getAdaptableInstance().destroy({ unmount: true, destroyAgGrid: true });
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
37
|
}, []);
|
|
@@ -11,8 +11,9 @@ import { ValidationSection } from './sections/ValidationSection';
|
|
|
11
11
|
export const DataImportWizard = (props) => {
|
|
12
12
|
var _a;
|
|
13
13
|
const adaptable = useAdaptable();
|
|
14
|
-
const
|
|
15
|
-
const
|
|
14
|
+
const adaptableApi = adaptable.api;
|
|
15
|
+
const dataImportOptions = adaptableApi.optionsApi.getDataImportOptions();
|
|
16
|
+
const module = adaptableApi.internalApi.getModuleService().getModuleById('DataImport');
|
|
16
17
|
const [rowData, setRowData] = React.useState(null);
|
|
17
18
|
const [file, setFile] = React.useState(null);
|
|
18
19
|
const [text, setText] = React.useState('');
|
|
@@ -20,17 +21,17 @@ export const DataImportWizard = (props) => {
|
|
|
20
21
|
// - columnsMap changes
|
|
21
22
|
// - new data is loaded
|
|
22
23
|
const [importType, setImportType] = React.useState('file');
|
|
23
|
-
const primaryKey =
|
|
24
|
+
const primaryKey = adaptableApi.optionsApi.getPrimaryKey();
|
|
24
25
|
const hasDynamicallyAddedPrimaryKey = typeof dataImportOptions._getPrimaryKeyValue === 'function';
|
|
25
26
|
const getPrimaryKeyValue = (rowData) => {
|
|
26
27
|
if (hasDynamicallyAddedPrimaryKey) {
|
|
27
|
-
return dataImportOptions._getPrimaryKeyValue(Object.assign(Object.assign({}, createBaseContext(
|
|
28
|
+
return dataImportOptions._getPrimaryKeyValue(Object.assign(Object.assign({}, createBaseContext(adaptableApi)), { rowData }));
|
|
28
29
|
}
|
|
29
30
|
return rowData[primaryKey];
|
|
30
31
|
};
|
|
31
32
|
const preprocessRowData = (rowData) => {
|
|
32
33
|
if (typeof (dataImportOptions === null || dataImportOptions === void 0 ? void 0 : dataImportOptions._preprocessRowData) === 'function') {
|
|
33
|
-
return dataImportOptions._preprocessRowData(Object.assign(Object.assign({}, createBaseContext(
|
|
34
|
+
return dataImportOptions._preprocessRowData(Object.assign(Object.assign({}, createBaseContext(adaptableApi)), { rowData }));
|
|
34
35
|
}
|
|
35
36
|
// by default just trim the keys
|
|
36
37
|
let processedRowData = {};
|
|
@@ -75,7 +76,7 @@ export const DataImportWizard = (props) => {
|
|
|
75
76
|
fields.add(field);
|
|
76
77
|
});
|
|
77
78
|
});
|
|
78
|
-
const allAbColumns =
|
|
79
|
+
const allAbColumns = adaptableApi.columnApi.getColumns();
|
|
79
80
|
const columnsMap = Array.from(fields).map((field) => {
|
|
80
81
|
const abColumn = allAbColumns.find((c) => {
|
|
81
82
|
// exact field match
|
|
@@ -128,7 +129,7 @@ export const DataImportWizard = (props) => {
|
|
|
128
129
|
// ---- FILE HANDLERS ----
|
|
129
130
|
const fileHandlers = React.useMemo(() => {
|
|
130
131
|
var _a, _b;
|
|
131
|
-
const userDefinedHandlers = (_b = (_a =
|
|
132
|
+
const userDefinedHandlers = (_b = (_a = adaptableApi.optionsApi.getDataImportOptions()) === null || _a === void 0 ? void 0 : _a.fileHandlers) !== null && _b !== void 0 ? _b : [];
|
|
132
133
|
return [...userDefinedHandlers, ...systemFileHandlers];
|
|
133
134
|
}, []);
|
|
134
135
|
const supportedFileFormats = React.useMemo(() => {
|
|
@@ -136,11 +137,11 @@ export const DataImportWizard = (props) => {
|
|
|
136
137
|
}, [fileHandlers]);
|
|
137
138
|
const readFile = React.useCallback(async (file) => {
|
|
138
139
|
var _a, _b;
|
|
139
|
-
const userDefinedFileHandlers = (_b = (_a =
|
|
140
|
+
const userDefinedFileHandlers = (_b = (_a = adaptableApi.optionsApi.getDataImportOptions()) === null || _a === void 0 ? void 0 : _a.fileHandlers) !== null && _b !== void 0 ? _b : [];
|
|
140
141
|
const fileExtension = `.${file.name.split('.').pop()}`;
|
|
141
142
|
const handler = [...userDefinedFileHandlers, ...systemFileHandlers].find((fh) => fh.fileExtension === fileExtension);
|
|
142
143
|
if (!handler) {
|
|
143
|
-
|
|
144
|
+
adaptableApi.logError(`No file handler found for file extension ${fileExtension}. Please provide a file handler in Data Import Options.`);
|
|
144
145
|
return;
|
|
145
146
|
}
|
|
146
147
|
try {
|
|
@@ -150,7 +151,7 @@ export const DataImportWizard = (props) => {
|
|
|
150
151
|
return data;
|
|
151
152
|
}
|
|
152
153
|
catch (_c) {
|
|
153
|
-
|
|
154
|
+
adaptableApi.logError(`Error reading file ${file.name}. Please check the file is valid.`);
|
|
154
155
|
}
|
|
155
156
|
}, [adaptable]);
|
|
156
157
|
const fileMessage = file ? (React.createElement(HelpBlock, { mb: 2 },
|
|
@@ -164,7 +165,7 @@ export const DataImportWizard = (props) => {
|
|
|
164
165
|
const handleTextChange = React.useCallback(async (text) => {
|
|
165
166
|
var _a;
|
|
166
167
|
//
|
|
167
|
-
let textHandler = (_a =
|
|
168
|
+
let textHandler = (_a = adaptableApi.optionsApi.getDataImportOptions()) === null || _a === void 0 ? void 0 : _a.textHandler;
|
|
168
169
|
if (!textHandler) {
|
|
169
170
|
// regex to test for json
|
|
170
171
|
const jsonRegex = /^\s*[\[{]/;
|
|
@@ -208,7 +209,7 @@ export const DataImportWizard = (props) => {
|
|
|
208
209
|
return null;
|
|
209
210
|
}
|
|
210
211
|
return (_a = rowData === null || rowData === void 0 ? void 0 : rowData.reduce) === null || _a === void 0 ? void 0 : _a.call(rowData, (acc, rowData) => {
|
|
211
|
-
const error = dataImportOptions.validate(Object.assign({ rowData }, createBaseContext(
|
|
212
|
+
const error = dataImportOptions.validate(Object.assign({ rowData }, createBaseContext(adaptableApi)));
|
|
212
213
|
const primaryKeyValue = getPrimaryKeyValue(rowData);
|
|
213
214
|
if (error && primaryKeyValue && error.length) {
|
|
214
215
|
acc[primaryKeyValue] = error;
|
|
@@ -222,7 +223,7 @@ export const DataImportWizard = (props) => {
|
|
|
222
223
|
const rowErrors = errors[getPrimaryKeyValue(row)];
|
|
223
224
|
return !rowErrors || rowErrors.length === 0;
|
|
224
225
|
});
|
|
225
|
-
|
|
226
|
+
adaptableApi.dataImportApi.internalApi.importData(validData);
|
|
226
227
|
};
|
|
227
228
|
return (React.createElement(OnePageAdaptableWizard, { data: null, moduleInfo: module.moduleInfo, finishText: "Import", onFinish: () => {
|
|
228
229
|
handleFinish();
|
|
@@ -21,7 +21,7 @@ export const TransposedPopup = (props) => {
|
|
|
21
21
|
const [syntheticTransposedByColumnId, doSetSyntheticTransposedByColumnId] = React.useState(transposedColumnId);
|
|
22
22
|
const setSyntheticTransposedByColumnId = (syntheticTransposedByColumnId) => {
|
|
23
23
|
var _a;
|
|
24
|
-
(_a = transposedAdaptableApiRef.current) === null || _a === void 0 ? void 0 : _a.destroy({ unmount: true,
|
|
24
|
+
(_a = transposedAdaptableApiRef.current) === null || _a === void 0 ? void 0 : _a.destroy({ unmount: true, destroyAgGrid: true });
|
|
25
25
|
doSetSyntheticTransposedByColumnId(syntheticTransposedByColumnId);
|
|
26
26
|
};
|
|
27
27
|
const transposedAdaptableApiRef = React.useRef(null);
|
|
@@ -181,7 +181,7 @@ export const TransposedPopup = (props) => {
|
|
|
181
181
|
return () => {
|
|
182
182
|
requestAnimationFrame(() => {
|
|
183
183
|
var _a;
|
|
184
|
-
(_a = transposedAdaptableApiRef.current) === null || _a === void 0 ? void 0 : _a.destroy({ unmount: true,
|
|
184
|
+
(_a = transposedAdaptableApiRef.current) === null || _a === void 0 ? void 0 : _a.destroy({ unmount: true, destroyAgGrid: true });
|
|
185
185
|
});
|
|
186
186
|
};
|
|
187
187
|
}, []);
|
|
@@ -6,7 +6,6 @@ import dateFnsFormat from 'date-fns/format';
|
|
|
6
6
|
import { useAdaptable } from '../AdaptableContext';
|
|
7
7
|
import { AdaptableButtonComponent } from '../Components/AdaptableButton';
|
|
8
8
|
import { PopupPanel } from '../Components/Popups/AdaptablePopup/PopupPanel';
|
|
9
|
-
import { DEFAULT_DATE_FORMAT_PATTERN_WITH_TIME } from '../../Utilities/Constants/GeneralConstants';
|
|
10
9
|
import StringExtensions from '../../Utilities/Extensions/StringExtensions';
|
|
11
10
|
const tableDOMProps = {
|
|
12
11
|
style: {
|
|
@@ -16,12 +15,10 @@ const tableDOMProps = {
|
|
|
16
15
|
},
|
|
17
16
|
};
|
|
18
17
|
export const NotePopup = (props) => {
|
|
19
|
-
var _a, _b, _c, _d;
|
|
20
18
|
const adaptable = useAdaptable();
|
|
21
19
|
const primaryKeyHeader = adaptable.api.columnApi.getPrimaryKeyColumn()
|
|
22
20
|
? adaptable.api.columnApi.getFriendlyNameForColumnId(adaptable.api.columnApi.getPrimaryKeyColumn().columnId)
|
|
23
21
|
: StringExtensions.Humanize(adaptable.adaptableOptions.primaryKey);
|
|
24
|
-
const dateFormat = (_d = (_c = (_b = (_a = adaptable.api.optionsApi) === null || _a === void 0 ? void 0 : _a.getNoteOptions) === null || _b === void 0 ? void 0 : _b.call(_a)) === null || _c === void 0 ? void 0 : _c.dateFormat) !== null && _d !== void 0 ? _d : DEFAULT_DATE_FORMAT_PATTERN_WITH_TIME;
|
|
25
22
|
const allNotes = useSelector((state) => GetAllNotesSelector(state.Note));
|
|
26
23
|
const isReadOnlyModule = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule('Note') === 'ReadOnly';
|
|
27
24
|
const columnsMap = React.useMemo(() => {
|
|
@@ -46,7 +43,7 @@ export const NotePopup = (props) => {
|
|
|
46
43
|
timestamp: {
|
|
47
44
|
field: 'Timestamp',
|
|
48
45
|
valueGetter: (params) => {
|
|
49
|
-
return dateFnsFormat(params.data.Timestamp,
|
|
46
|
+
return dateFnsFormat(params.data.Timestamp, adaptable.api.noteApi.internalApi.getNotesDateFormat());
|
|
50
47
|
},
|
|
51
48
|
},
|
|
52
49
|
delete: {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { AdaptableOptions } from '../AdaptableOptions/AdaptableOptions';
|
|
3
3
|
import { ChartRef, Column, GridApi, GridOptions, IRowNode, Module, RowModelType } from '@ag-grid-community/core';
|
|
4
4
|
import { AdaptableLogger } from './AdaptableLogger';
|
|
5
|
-
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
5
|
+
import { AdaptableApi, DestroyConfig } from '../Api/AdaptableApi';
|
|
6
6
|
import { AdaptableVariant, DistinctColumnValuesParams, IAdaptable, NormalizeAdaptableStateOptions } from '../AdaptableInterfaces/IAdaptable';
|
|
7
7
|
import { EmitterCallback } from '../Utilities/Emitter';
|
|
8
8
|
import { AdaptablePlugin } from '../AdaptableOptions/AdaptablePlugin';
|
|
@@ -308,10 +308,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
308
308
|
getAgGridColumnForColumnId(columnId: string): Column;
|
|
309
309
|
getMinMaxCachedValueForColumn(column: AdaptableColumn, minMax: 'min' | 'max'): number;
|
|
310
310
|
getAgGridRegisteredModules(): Module[];
|
|
311
|
-
destroy(config?:
|
|
312
|
-
unmount: boolean;
|
|
313
|
-
destroyApi?: boolean;
|
|
314
|
-
}): void;
|
|
311
|
+
destroy(config?: DestroyConfig): void;
|
|
315
312
|
canExportToExcel(): boolean;
|
|
316
313
|
exportToExcel(reportData: ReportData, fileName: string): void;
|
|
317
314
|
exportVisualDataToExcel(): void;
|