@adaptabletools/adaptable 22.0.0-canary.6 → 22.0.0-canary.8
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/index.css +63 -74
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +6 -6
- package/src/AdaptableOptions/ContainerOptions.d.ts +55 -15
- package/src/AdaptableState/AdaptableState.d.ts +2 -0
- package/src/AdaptableState/AlertState.d.ts +1 -2
- package/src/AdaptableState/Common/AdaptableColumnContext.d.ts +9 -0
- package/src/AdaptableState/Common/AdaptableObject.d.ts +4 -0
- package/src/AdaptableState/Common/AdaptableRowContext.d.ts +11 -0
- package/src/AdaptableState/Common/AdaptableRowContext.js +1 -0
- package/src/AdaptableState/Common/BaseContext.d.ts +2 -0
- package/src/AdaptableState/Common/DataUpdateConfig.d.ts +7 -0
- package/src/AdaptableState/Common/NamedObject.d.ts +10 -0
- package/src/AdaptableState/Common/NamedObject.js +1 -0
- package/src/AdaptableState/Common/RowSummary.d.ts +1 -1
- package/src/AdaptableState/Common/Schedule.d.ts +2 -2
- package/src/AdaptableState/Common/SuspendableObject.d.ts +10 -0
- package/src/AdaptableState/Common/SuspendableObject.js +1 -0
- package/src/AdaptableState/Common/TransposeConfig.d.ts +11 -9
- package/src/AdaptableState/CustomSortState.d.ts +1 -1
- package/src/AdaptableState/FormatColumnState.d.ts +1 -1
- package/src/AdaptableState/InitialState.d.ts +9 -0
- package/src/AdaptableState/LayoutState.d.ts +2 -3
- package/src/AdaptableState/PlusMinusState.d.ts +1 -1
- package/src/AdaptableState/ShortcutState.d.ts +1 -1
- package/src/AdaptableState/StyledColumnState.d.ts +1 -1
- package/src/AdaptableState/UserInterfaceState.d.ts +14 -0
- package/src/AdaptableState/UserInterfaceState.js +1 -0
- package/src/Api/AlertApi.d.ts +6 -0
- package/src/Api/CustomSortApi.d.ts +6 -0
- package/src/Api/FlashingCellApi.d.ts +6 -0
- package/src/Api/FormatColumnApi.d.ts +10 -4
- package/src/Api/GridApi.d.ts +5 -9
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -0
- package/src/Api/Implementation/AlertApiImpl.js +5 -6
- package/src/Api/Implementation/ChartingApiImpl.js +2 -2
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +1 -0
- package/src/Api/Implementation/CustomSortApiImpl.js +3 -0
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -0
- package/src/Api/Implementation/FlashingCellApiImpl.js +3 -0
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +6 -5
- package/src/Api/Implementation/FormatColumnApiImpl.js +6 -5
- package/src/Api/Implementation/GridApiImpl.d.ts +2 -6
- package/src/Api/Implementation/GridApiImpl.js +9 -9
- package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -0
- package/src/Api/Implementation/LayoutApiImpl.js +4 -1
- package/src/Api/Implementation/NamedQueryApiImpl.js +2 -2
- package/src/Api/Implementation/PlusMinusApiImpl.d.ts +1 -0
- package/src/Api/Implementation/PlusMinusApiImpl.js +3 -0
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ScheduleApiImpl.js +3 -0
- package/src/Api/Implementation/ShortcutApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ShortcutApiImpl.js +3 -0
- package/src/Api/Implementation/SystemStatusApiImpl.js +6 -9
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +5 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.js +13 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +2 -2
- package/src/Api/Internal/FreeTextColumnInternalApi.js +2 -2
- package/src/Api/Internal/LayoutInternalApi.js +1 -1
- package/src/Api/Internal/NamedQueryInternalApi.js +4 -4
- package/src/Api/LayoutApi.d.ts +6 -0
- package/src/Api/PlusMinusApi.d.ts +6 -0
- package/src/Api/ScheduleApi.d.ts +6 -0
- package/src/Api/ShortcutApi.d.ts +6 -0
- package/src/Api/UserInterfaceApi.d.ts +17 -0
- package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +8 -0
- package/src/Redux/ActionsReducers/FormatColumnRedux.js +15 -0
- package/src/Redux/ActionsReducers/UserInterfaceRedux.d.ts +11 -0
- package/src/Redux/ActionsReducers/UserInterfaceRedux.js +21 -0
- package/src/Redux/Store/AdaptableStore.js +45 -16
- package/src/Strategy/BulkUpdateModule.js +8 -8
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/QuickSearchModule.js +1 -1
- package/src/Strategy/SettingsPanelModule.js +11 -7
- package/src/Strategy/SmartEditModule.js +10 -10
- package/src/Utilities/Services/DataService.js +1 -1
- package/src/Utilities/Services/Fdc3Service.js +4 -4
- package/src/Utilities/Services/ModuleService.js +1 -3
- package/src/Utilities/Services/ThemeService.js +2 -6
- package/src/Utilities/Services/ValidationService.js +1 -1
- package/src/Utilities/logDeprecation.js +3 -4
- package/src/Utilities/resolveContainerElement.d.ts +23 -0
- package/src/Utilities/resolveContainerElement.js +44 -0
- package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +2 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +2 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
- package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +2 -2
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +2 -2
- package/src/View/Components/CellPopup/index.js +1 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +1 -1
- package/src/View/Components/EntityRulesEditor/Utilities.js +5 -5
- package/src/View/Components/NewScopeComponent.js +3 -3
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +2 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +1 -8
- package/src/View/Components/Popups/AdaptablePopupConfirmation.js +1 -1
- package/src/View/Components/Popups/WindowPopups/WindowPopups.js +36 -1
- package/src/View/Components/WizardSummaryPage.js +1 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +3 -3
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +1 -1
- package/src/View/Dashboard/CustomToolbar.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +1 -1
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +3 -3
- package/src/View/Layout/LayoutViewPanel.js +1 -1
- package/src/View/Layout/TransposedPopup.js +144 -138
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
- package/src/View/Layout/Wizard/sections/GridFilterSection.js +1 -1
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +3 -3
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +1 -1
- package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +2 -2
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +5 -5
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.d.ts +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +11 -11
- package/src/View/StateManagement/handleExportState.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
- package/src/View/UIHelper.d.ts +2 -1
- package/src/View/UIHelper.js +8 -14
- package/src/agGrid/Adaptable.js +11 -11
- package/src/agGrid/AdaptableAgGrid.d.ts +12 -8
- package/src/agGrid/AdaptableAgGrid.js +150 -82
- package/src/agGrid/AgGridAdapter.js +8 -8
- package/src/agGrid/AgGridColumnAdapter.js +1 -1
- package/src/agGrid/AgGridExportAdapter.js +5 -5
- package/src/agGrid/AgGridFloatingFilterAdapter.js +1 -1
- package/src/agGrid/AgGridMenuAdapter.js +9 -1
- package/src/agGrid/AgGridThemeAdapter.js +2 -2
- package/src/components/CheckBox/index.js +1 -1
- package/src/components/Dropdown/Arrows.js +1 -1
- package/src/components/ExpressionEditor/DataTableEditor.js +3 -3
- package/src/components/FormLayout/index.js +1 -1
- package/src/components/OverlayTrigger/index.js +1 -1
- package/src/components/Select/Select.js +1 -1
- package/src/components/Tree/TreeDropdown/index.js +1 -1
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +62 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/AdaptableUpgradeHelper.js +2 -2
- package/src/migration/VersionUpgrade17.js +4 -4
- package/src/migration/VersionUpgrade20.js +4 -4
- package/src/types.d.ts +5 -2
- package/themes/dark.css +30 -29
- package/themes/light.css +4 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdaptableObject, SuspendableObject } from '
|
|
1
|
+
import { AdaptableObject, SuspendableObject } from '../../types';
|
|
2
2
|
/**
|
|
3
3
|
* Defines when an action will be run - either one-off or recurring
|
|
4
4
|
*/
|
|
@@ -21,7 +21,7 @@ export interface Schedule {
|
|
|
21
21
|
DaysOfWeek?: Weekdays;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* Base Schedule object
|
|
24
|
+
* Base Schedule object
|
|
25
25
|
*/
|
|
26
26
|
export interface BaseSchedule extends AdaptableObject, SuspendableObject {
|
|
27
27
|
/**
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AdaptableObject } from './AdaptableObject';
|
|
2
|
+
/**
|
|
3
|
+
* Interface that extends Adaptable Object for those config items that can be suspended at run-time
|
|
4
|
+
*/
|
|
5
|
+
export interface SuspendableObject extends AdaptableObject {
|
|
6
|
+
/**
|
|
7
|
+
* Suspends (i.e. turns off) an Adaptable Object
|
|
8
|
+
*/
|
|
9
|
+
IsSuspended?: boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { AdaptableColumnsContext } from '../../types';
|
|
2
|
+
import type { TypeHint } from './Types';
|
|
1
3
|
/**
|
|
2
4
|
* Config used when transposing a Grid
|
|
3
5
|
*/
|
|
@@ -13,18 +15,18 @@ export interface TransposeConfig {
|
|
|
13
15
|
*/
|
|
14
16
|
hideTransposedColumn?: boolean;
|
|
15
17
|
/**
|
|
16
|
-
*
|
|
17
|
-
* @defaultValue
|
|
18
|
+
* Autosize columns in transposed view
|
|
19
|
+
* @defaultValue true
|
|
18
20
|
*/
|
|
19
|
-
|
|
21
|
+
autosize?: boolean;
|
|
20
22
|
/**
|
|
21
|
-
*
|
|
22
|
-
* @defaultValue
|
|
23
|
+
* ColumnIds of Columns to Transpose
|
|
24
|
+
* @defaultValue all Columns in Grid
|
|
23
25
|
*/
|
|
24
|
-
|
|
26
|
+
columnsToTranspose?: string[] | ((context: AdaptableColumnsContext) => string[]);
|
|
25
27
|
/**
|
|
26
|
-
*
|
|
27
|
-
* @defaultValue
|
|
28
|
+
* Rows to Transpose: All, VisibleOnly or via an Expression
|
|
29
|
+
* @defaultValue All
|
|
28
30
|
*/
|
|
29
|
-
|
|
31
|
+
rowsToTranspose?: TypeHint<string, 'VisibleOnly' | 'All'>;
|
|
30
32
|
}
|
|
@@ -7,7 +7,7 @@ import { XOR } from '../Utilities/Extensions/TypeExtensions';
|
|
|
7
7
|
import { TypeHint } from './Common/Types';
|
|
8
8
|
import { AdaptableBooleanQuery, LayoutExtendedConfig } from '../types';
|
|
9
9
|
import { AdaptableColumnPredicate } from './Common/AdaptablePredicate';
|
|
10
|
-
import { SuspendableObject } from '
|
|
10
|
+
import { SuspendableObject } from '../types';
|
|
11
11
|
/**
|
|
12
12
|
* Adaptable State Section for Format Column Module
|
|
13
13
|
*/
|
|
@@ -19,6 +19,7 @@ import { StatusBarState } from './StatusBarState';
|
|
|
19
19
|
import { StyledColumnState } from './StyledColumnState';
|
|
20
20
|
import { ThemeState } from './ThemeState';
|
|
21
21
|
import { ToolPanelState } from './ToolPanelState';
|
|
22
|
+
import { UserInterfaceState } from './UserInterfaceState';
|
|
22
23
|
/**
|
|
23
24
|
* The initial state of Adaptable which is populated at design-time and used to create the Adaptable State - must include at least one Layout.
|
|
24
25
|
*/
|
|
@@ -107,6 +108,10 @@ export interface InitialState {
|
|
|
107
108
|
* Sets order & visibility of Tool Panel controls in AdapTable ToolPanel (on right of grid)
|
|
108
109
|
*/
|
|
109
110
|
ToolPanel?: ToolPanelState;
|
|
111
|
+
/**
|
|
112
|
+
* Controls the visibility of AdapTable UI elements (Dashboard, Tool Panel, Status Bar, Menus etc.)
|
|
113
|
+
*/
|
|
114
|
+
UserInterface?: UserInterfaceState;
|
|
110
115
|
}
|
|
111
116
|
/**
|
|
112
117
|
* Deprecated initial state object (now replaced by InitialState)
|
|
@@ -197,4 +202,8 @@ export interface PredefinedConfig {
|
|
|
197
202
|
* Sets the order and visibility of the Tool Panel controls in the AdapTable ToolPanel (on right of grid)
|
|
198
203
|
*/
|
|
199
204
|
ToolPanel?: ToolPanelState;
|
|
205
|
+
/**
|
|
206
|
+
* Controls the visibility of AdapTable UI elements (Dashboard, Tool Panel, Status Bar, Menus etc.)
|
|
207
|
+
*/
|
|
208
|
+
UserInterface?: UserInterfaceState;
|
|
200
209
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseState } from './BaseState';
|
|
2
|
-
import { AdaptableObject } from '
|
|
2
|
+
import { AdaptableObject } from '../types';
|
|
3
3
|
import { ColumnSort } from './Common/ColumnSort';
|
|
4
4
|
import { ColumnFilter, GridFilter } from '../types';
|
|
5
5
|
import { PivotAggregationColumns, TableAggregationColumns } from './Common/AggregationColumns';
|
|
@@ -166,8 +166,7 @@ export interface PivotLayout extends LayoutBase {
|
|
|
166
166
|
*/
|
|
167
167
|
PivotColumnTotal?: PivotTotalPosition;
|
|
168
168
|
/**
|
|
169
|
-
* Ordered list of Pivot Result
|
|
170
|
-
* Set to `true` to enable tracking the current display order (will be populated automatically).
|
|
169
|
+
* Ordered list of Pivot Result Columns; set to `true` to track current display order, or provide custom list
|
|
171
170
|
*/
|
|
172
171
|
PivotResultColumnsOrder?: string[] | boolean;
|
|
173
172
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseState } from './BaseState';
|
|
2
2
|
import { ColumnScope } from './Common/ColumnScope';
|
|
3
3
|
import { AdaptableBooleanQuery } from './Common/AdaptableQuery';
|
|
4
|
-
import { SuspendableObject } from '
|
|
4
|
+
import { SuspendableObject } from '../types';
|
|
5
5
|
/**
|
|
6
6
|
* Adaptable State Section for Plus Minus Module
|
|
7
7
|
*/
|
|
@@ -3,7 +3,7 @@ import { AdaptablePredicate, AdaptableStyle, AdaptableBooleanQuery, AdaptableIco
|
|
|
3
3
|
import { TypeHint } from './Common/Types';
|
|
4
4
|
import { RowScope } from './Common/RowScope';
|
|
5
5
|
import { AgSparklineOptions } from 'ag-charts-types';
|
|
6
|
-
import { SuspendableObject } from './Common/
|
|
6
|
+
import { SuspendableObject } from './Common/SuspendableObject';
|
|
7
7
|
/**
|
|
8
8
|
* Adaptable State Section for Styled Column Module
|
|
9
9
|
*/
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseState } from './BaseState';
|
|
2
|
+
/**
|
|
3
|
+
* Adaptable State Section for the User Interface
|
|
4
|
+
*
|
|
5
|
+
* Controls the visibility and behaviour of AdapTable UI elements
|
|
6
|
+
*/
|
|
7
|
+
export interface UserInterfaceState extends BaseState {
|
|
8
|
+
/**
|
|
9
|
+
* Whether to hide all AdapTable UI elements (Dashboard, Tool Panel, Status Bar, Column and Context Menus etc.)
|
|
10
|
+
*
|
|
11
|
+
* @defaultValue false
|
|
12
|
+
*/
|
|
13
|
+
HideAdaptableUI?: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/src/Api/AlertApi.d.ts
CHANGED
|
@@ -34,6 +34,12 @@ export interface AlertApi {
|
|
|
34
34
|
* @returns alert definition
|
|
35
35
|
*/
|
|
36
36
|
getAlertDefinitionById(id: AlertDefinition['Uuid'], config?: LayoutExtendedConfig): AlertDefinition;
|
|
37
|
+
/**
|
|
38
|
+
* Retrieves an Alert Definition by its Name
|
|
39
|
+
* @param name Name of the Alert Definition
|
|
40
|
+
* @returns Alert Definition or undefined if not found
|
|
41
|
+
*/
|
|
42
|
+
getAlertDefinitionByName(name: string): AlertDefinition | undefined;
|
|
37
43
|
/**
|
|
38
44
|
* Adds given Alert Definition to Adaptable State
|
|
39
45
|
* @param alertDefinition AlertDefinition to add
|
|
@@ -19,6 +19,12 @@ export interface CustomSortApi {
|
|
|
19
19
|
* @returns Custom Sort
|
|
20
20
|
*/
|
|
21
21
|
getCustomSortById(id: CustomSort['Uuid'], config?: LayoutExtendedConfig): CustomSort;
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves a Custom Sort by its Name
|
|
24
|
+
* @param name Name of the Custom Sort
|
|
25
|
+
* @returns Custom Sort or undefined if not found
|
|
26
|
+
*/
|
|
27
|
+
getCustomSortByName(name: string): CustomSort | undefined;
|
|
22
28
|
/**
|
|
23
29
|
* Retrieves all Custom Sorts in Adaptable State that are currently applied
|
|
24
30
|
* @returns Custom Sorts
|
|
@@ -23,6 +23,12 @@ export interface FlashingCellApi {
|
|
|
23
23
|
* @returns Flashing Cell Definition
|
|
24
24
|
*/
|
|
25
25
|
getFlashingCellDefinitionById(id: FlashingCellDefinition['Uuid'], config?: LayoutExtendedConfig): FlashingCellDefinition;
|
|
26
|
+
/**
|
|
27
|
+
* Retrieves a Flashing Cell Definition by its Name
|
|
28
|
+
* @param name Name of the Flashing Cell Definition
|
|
29
|
+
* @returns Flashing Cell Definition or undefined if not found
|
|
30
|
+
*/
|
|
31
|
+
getFlashingCellDefinitionByName(name: string): FlashingCellDefinition | undefined;
|
|
26
32
|
/**
|
|
27
33
|
* Retrieves all active (non-suspended) cell Definitions in Flashing Cell State
|
|
28
34
|
* @returns flashing cell definitions
|
|
@@ -19,6 +19,12 @@ export interface FormatColumnApi {
|
|
|
19
19
|
* @returns format column
|
|
20
20
|
*/
|
|
21
21
|
getFormatColumnByUuId(id: FormatColumn['Uuid'], config?: FormatColumnConfig): FormatColumn;
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves a Format Column by its Name
|
|
24
|
+
* @param name Name of the Format Column
|
|
25
|
+
* @returns Format Column or undefined if not found
|
|
26
|
+
*/
|
|
27
|
+
getFormatColumnByName(name: string): FormatColumn | undefined;
|
|
22
28
|
/**
|
|
23
29
|
* Retrieves all active (not-suspended) Format Columns in Adaptable State
|
|
24
30
|
* @returns format columns
|
|
@@ -41,10 +47,10 @@ export interface FormatColumnApi {
|
|
|
41
47
|
*/
|
|
42
48
|
addFormatColumn(formatColumn: FormatColumn): FormatColumn;
|
|
43
49
|
/**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
50
|
+
* Adds Format Columns to Format Column State
|
|
51
|
+
* @param formatColumn Format Columns to Add
|
|
52
|
+
* @returns format columns
|
|
53
|
+
*/
|
|
48
54
|
addFormatColumns(formatColumns: FormatColumn[]): FormatColumn[];
|
|
49
55
|
/**
|
|
50
56
|
* Edits the Format Column
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { SelectedCellInfo } from '../AdaptableState/Selection/SelectedCellInfo';
|
|
|
2
2
|
import { SelectedRowInfo } from '../AdaptableState/Selection/SelectedRowInfo';
|
|
3
3
|
import { ColumnSort } from '../AdaptableState/Common/ColumnSort';
|
|
4
4
|
import { CellUpdateRequest, GridCell } from '../AdaptableState/Selection/GridCell';
|
|
5
|
-
import { DataUpdateConfig } from '../AdaptableState/Common/DataUpdateConfig';
|
|
5
|
+
import { DataRowConfig, DataUpdateConfig } from '../AdaptableState/Common/DataUpdateConfig';
|
|
6
6
|
import { CellDataChangedInfo } from '../AdaptableState/Common/CellDataChangedInfo';
|
|
7
7
|
import { CellHighlightInfo } from '../AdaptableState/Common/CellHighlightInfo';
|
|
8
8
|
import { RowHighlightInfo } from '../AdaptableState/Common/RowHighlightInfo';
|
|
@@ -71,15 +71,11 @@ export interface GridApi {
|
|
|
71
71
|
*/
|
|
72
72
|
deleteGridData(dataRows: any[], config?: DataUpdateConfig): Promise<IRowNode[]>;
|
|
73
73
|
/**
|
|
74
|
-
*
|
|
75
|
-
* @param
|
|
76
|
-
* @param
|
|
74
|
+
* Adds, Updates or Deletes rows in AdapTable (and AG Grid) in single transaction
|
|
75
|
+
* @param dataRowConfig - Rows to add, update or remove
|
|
76
|
+
* @param dataUpdateConfig - batch option and callback function to run post transaction
|
|
77
77
|
*/
|
|
78
|
-
manageGridData(
|
|
79
|
-
add?: any[];
|
|
80
|
-
update?: any[];
|
|
81
|
-
delete?: any[];
|
|
82
|
-
}, config?: DataUpdateConfig): Promise<{
|
|
78
|
+
manageGridData(dataRowConfig: DataRowConfig, dataUpdateConfig?: DataUpdateConfig): Promise<{
|
|
83
79
|
addedRows: IRowNode[];
|
|
84
80
|
updatedRows: IRowNode[];
|
|
85
81
|
removedRows: IRowNode[];
|
|
@@ -16,6 +16,7 @@ export declare class AlertApiImpl extends ApiBase implements AlertApi {
|
|
|
16
16
|
getActiveAlertDefinitions(config?: LayoutExtendedConfig): AlertDefinition[];
|
|
17
17
|
deleteAlertDefinition(alertDefinition: AlertDefinition): void;
|
|
18
18
|
getAlertDefinitionById(id: AlertDefinition['Uuid'], config?: LayoutExtendedConfig): AlertDefinition;
|
|
19
|
+
getAlertDefinitionByName(name: string): AlertDefinition | undefined;
|
|
19
20
|
addAlertDefinition(alertDefinition: AlertDefinition): AlertDefinition;
|
|
20
21
|
displayAdaptableAlert(alertToShow: AdaptableAlert): Promise<void>;
|
|
21
22
|
displayAdaptableAlertNotification(alert: AdaptableAlert): void;
|
|
@@ -7,6 +7,7 @@ import ObjectFactory from '../../Utilities/ObjectFactory';
|
|
|
7
7
|
import { isAdaptableCellChangedAlert, isAdaptableRowChangedAlert, } from '../../AdaptableState/Common/AdaptableAlert';
|
|
8
8
|
import StringExtensions from '../../Utilities/Extensions/StringExtensions';
|
|
9
9
|
import { AlertInternalApi } from '../Internal/AlertInternalApi';
|
|
10
|
+
import { resolveContainerElement } from '../../Utilities/resolveContainerElement';
|
|
10
11
|
export class AlertApiImpl extends ApiBase {
|
|
11
12
|
internalApi;
|
|
12
13
|
constructor(_adaptable) {
|
|
@@ -32,6 +33,9 @@ export class AlertApiImpl extends ApiBase {
|
|
|
32
33
|
getAlertDefinitionById(id, config) {
|
|
33
34
|
return this.getAlertDefinitions(config).find((alert) => alert?.Uuid === id);
|
|
34
35
|
}
|
|
36
|
+
getAlertDefinitionByName(name) {
|
|
37
|
+
return this.getAlertDefinitions().find((alertDefinition) => alertDefinition.Name === name);
|
|
38
|
+
}
|
|
35
39
|
addAlertDefinition(alertDefinition) {
|
|
36
40
|
this.addUidToAdaptableObject(alertDefinition);
|
|
37
41
|
this.dispatchAction(AlertRedux.AlertDefinitionAdd(alertDefinition));
|
|
@@ -59,12 +63,7 @@ export class AlertApiImpl extends ApiBase {
|
|
|
59
63
|
}
|
|
60
64
|
// Show Alert in a Div (if one has been set)
|
|
61
65
|
if (alertProperties.ShowInDiv) {
|
|
62
|
-
|
|
63
|
-
let optionsDiv = this.getContainerOptions().alertContainer;
|
|
64
|
-
if (optionsDiv) {
|
|
65
|
-
alertDiv =
|
|
66
|
-
typeof optionsDiv === 'string' ? document.getElementById(optionsDiv) : optionsDiv;
|
|
67
|
-
}
|
|
66
|
+
const alertDiv = resolveContainerElement(this.getContainerOptions().alertContainer, this.getAdaptableInternalApi().buildBaseContext());
|
|
68
67
|
if (alertDiv) {
|
|
69
68
|
let alertString = alertToShow.header + ': ' + alertToShow.message;
|
|
70
69
|
alertDiv.innerHTML = alertString;
|
|
@@ -122,8 +122,8 @@ export class ChartingApiImpl extends ApiBase {
|
|
|
122
122
|
else {
|
|
123
123
|
const alert = {
|
|
124
124
|
alertType: 'generic',
|
|
125
|
-
header: 'Save
|
|
126
|
-
message: '
|
|
125
|
+
header: 'Save Chart',
|
|
126
|
+
message: 'Would you like to save this chart?',
|
|
127
127
|
alertDefinition: {
|
|
128
128
|
...ObjectFactory.CreateEmptyAlertDefinition(),
|
|
129
129
|
MessageType: 'Info',
|
|
@@ -11,6 +11,7 @@ export declare class CustomSortApiImpl extends ApiBase implements CustomSortApi
|
|
|
11
11
|
getCustomSortState(): CustomSortState;
|
|
12
12
|
getCustomSorts(config?: LayoutExtendedConfig): CustomSort[];
|
|
13
13
|
getCustomSortById(id: CustomSort['Uuid'], config?: LayoutExtendedConfig): CustomSort;
|
|
14
|
+
getCustomSortByName(name: string): CustomSort | undefined;
|
|
14
15
|
getLiveCustomSorts(): CustomSort[];
|
|
15
16
|
getLiveCustomSortComparers(): ColumnValuesComparer[];
|
|
16
17
|
getActiveCustomSorts(config?: LayoutExtendedConfig): CustomSort[];
|
|
@@ -17,6 +17,9 @@ export class CustomSortApiImpl extends ApiBase {
|
|
|
17
17
|
getCustomSortById(id, config) {
|
|
18
18
|
return this.getCustomSorts(config).find((customSort) => customSort.Uuid === id);
|
|
19
19
|
}
|
|
20
|
+
getCustomSortByName(name) {
|
|
21
|
+
return this.getCustomSorts().find((customSort) => customSort.Name === name);
|
|
22
|
+
}
|
|
20
23
|
getLiveCustomSorts() {
|
|
21
24
|
let returnVals = [];
|
|
22
25
|
const sortedColIds = this.getGridApi()
|
|
@@ -13,6 +13,7 @@ export declare class FlashingCellApiImpl extends ApiBase implements FlashingCell
|
|
|
13
13
|
getFlashingCellState(): FlashingCellState;
|
|
14
14
|
getFlashingCellDefinitions(config?: LayoutExtendedConfig): FlashingCellDefinition[];
|
|
15
15
|
getFlashingCellDefinitionById(id: FlashingCellDefinition['Uuid'], config?: LayoutExtendedConfig): FlashingCellDefinition;
|
|
16
|
+
getFlashingCellDefinitionByName(name: string): FlashingCellDefinition | undefined;
|
|
16
17
|
getActiveFlashingCellDefinitions(config?: LayoutExtendedConfig): FlashingCellDefinition[];
|
|
17
18
|
getSuspendedFlashingCellDefinitions(config?: LayoutExtendedConfig): FlashingCellDefinition[];
|
|
18
19
|
getFlashingCellFlashTarget(flashingCellDefinition: FlashingCellDefinition): FlashingCellDefinition['FlashTarget'];
|
|
@@ -19,6 +19,9 @@ export class FlashingCellApiImpl extends ApiBase {
|
|
|
19
19
|
getFlashingCellDefinitionById(id, config) {
|
|
20
20
|
return this.getFlashingCellDefinitions(config)?.find((fc) => fc?.Uuid === id);
|
|
21
21
|
}
|
|
22
|
+
getFlashingCellDefinitionByName(name) {
|
|
23
|
+
return this.getFlashingCellDefinitions().find((fc) => fc.Name === name);
|
|
24
|
+
}
|
|
22
25
|
getActiveFlashingCellDefinitions(config) {
|
|
23
26
|
return this.getFlashingCellDefinitions(config).filter((fc) => !fc.IsSuspended);
|
|
24
27
|
}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
+
import { AdaptableObjectLookupCriteria, FormatColumnConfig } from '../../../types';
|
|
2
|
+
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
3
|
+
import { AdaptableColumn } from '../../AdaptableState/Common/AdaptableColumn';
|
|
1
4
|
import { AdaptableStyle } from '../../AdaptableState/Common/AdaptableStyle';
|
|
2
|
-
import { ApiBase } from './ApiBase';
|
|
3
|
-
import { FormatColumnApi } from '../FormatColumnApi';
|
|
4
5
|
import { FormatColumn, FormatColumnState } from '../../AdaptableState/FormatColumnState';
|
|
5
|
-
import { AdaptableColumn } from '../../AdaptableState/Common/AdaptableColumn';
|
|
6
6
|
import { AdaptableFormat } from '../../types';
|
|
7
|
-
import {
|
|
7
|
+
import { FormatColumnApi } from '../FormatColumnApi';
|
|
8
8
|
import { FormatColumnInternalApi } from '../Internal/FormatColumnInternalApi';
|
|
9
|
-
import {
|
|
9
|
+
import { ApiBase } from './ApiBase';
|
|
10
10
|
export declare class FormatColumnApiImpl extends ApiBase implements FormatColumnApi {
|
|
11
11
|
internalApi: FormatColumnInternalApi;
|
|
12
12
|
constructor(_adaptable: IAdaptable);
|
|
13
13
|
getFormatColumnState(): FormatColumnState;
|
|
14
14
|
getFormatColumns(config?: FormatColumnConfig): FormatColumn[];
|
|
15
15
|
getFormatColumnByUuId(id: FormatColumn['Uuid'], config?: FormatColumnConfig): FormatColumn;
|
|
16
|
+
getFormatColumnByName(name: string): FormatColumn | undefined;
|
|
16
17
|
getActiveFormatColumns(config?: FormatColumnConfig): FormatColumn[];
|
|
17
18
|
getDisplayFormatForColumn(column: AdaptableColumn, config?: FormatColumnConfig): AdaptableFormat | undefined;
|
|
18
19
|
getSuspendedFormatColumns(config?: FormatColumnConfig): FormatColumn[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as FormatColumnRedux from '../../Redux/ActionsReducers/FormatColumnRedux';
|
|
2
|
-
import { ApiBase } from './ApiBase';
|
|
3
2
|
import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
|
|
4
|
-
import { FormatColumnInternalApi } from '../Internal/FormatColumnInternalApi';
|
|
5
3
|
import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
|
|
4
|
+
import { FormatColumnInternalApi } from '../Internal/FormatColumnInternalApi';
|
|
5
|
+
import { ApiBase } from './ApiBase';
|
|
6
6
|
export class FormatColumnApiImpl extends ApiBase {
|
|
7
7
|
internalApi;
|
|
8
8
|
constructor(_adaptable) {
|
|
@@ -18,6 +18,9 @@ export class FormatColumnApiImpl extends ApiBase {
|
|
|
18
18
|
getFormatColumnByUuId(id, config) {
|
|
19
19
|
return this.getFormatColumns(config).find((formatColumn) => formatColumn.Uuid === id);
|
|
20
20
|
}
|
|
21
|
+
getFormatColumnByName(name) {
|
|
22
|
+
return this.getFormatColumns().find((formatColumn) => formatColumn.Name === name);
|
|
23
|
+
}
|
|
21
24
|
getActiveFormatColumns(config) {
|
|
22
25
|
return this.getFormatColumns(config).filter((formatColumn) => !formatColumn.IsSuspended);
|
|
23
26
|
}
|
|
@@ -38,9 +41,7 @@ export class FormatColumnApiImpl extends ApiBase {
|
|
|
38
41
|
return this.getFormatColumnByUuId(formatColumn.Uuid);
|
|
39
42
|
}
|
|
40
43
|
addFormatColumns(formatColumns) {
|
|
41
|
-
|
|
42
|
-
this.addFormatColumn(fc);
|
|
43
|
-
});
|
|
44
|
+
this.dispatchAction(FormatColumnRedux.FormatColumnsAdd(formatColumns));
|
|
44
45
|
return formatColumns?.map((formatColumn) => this.getFormatColumnByUuId(formatColumn.Uuid));
|
|
45
46
|
}
|
|
46
47
|
editFormatColumn(formatColumn) {
|
|
@@ -4,7 +4,7 @@ import { SelectedCellInfo } from '../../AdaptableState/Selection/SelectedCellInf
|
|
|
4
4
|
import { SelectedRowInfo } from '../../AdaptableState/Selection/SelectedRowInfo';
|
|
5
5
|
import { CellUpdateRequest, GridCell } from '../../AdaptableState/Selection/GridCell';
|
|
6
6
|
import { ColumnSort } from '../../AdaptableState/Common/ColumnSort';
|
|
7
|
-
import { DataUpdateConfig } from '../../AdaptableState/Common/DataUpdateConfig';
|
|
7
|
+
import { DataRowConfig, DataUpdateConfig } from '../../AdaptableState/Common/DataUpdateConfig';
|
|
8
8
|
import { CellHighlightInfo } from '../../AdaptableState/Common/CellHighlightInfo';
|
|
9
9
|
import { RowHighlightInfo } from '../../AdaptableState/Common/RowHighlightInfo';
|
|
10
10
|
import { ColDef, ColGroupDef, Column, ColumnState, IRowNode, RowModelType } from 'ag-grid-enterprise';
|
|
@@ -35,11 +35,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
35
35
|
addGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
|
|
36
36
|
undoCellEdit(cellDataChangedInfo: CellDataChangedInfo): boolean;
|
|
37
37
|
deleteGridData(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
|
|
38
|
-
manageGridData(
|
|
39
|
-
add?: any[];
|
|
40
|
-
update?: any[];
|
|
41
|
-
delete?: any[];
|
|
42
|
-
}, config?: DataUpdateConfig): Promise<{
|
|
38
|
+
manageGridData(dataRowConfig: DataRowConfig, dataUpdateConfig?: DataUpdateConfig): Promise<{
|
|
43
39
|
addedRows: IRowNode[];
|
|
44
40
|
updatedRows: IRowNode[];
|
|
45
41
|
removedRows: IRowNode[];
|
|
@@ -95,18 +95,18 @@ export class GridApiImpl extends ApiBase {
|
|
|
95
95
|
}
|
|
96
96
|
return [];
|
|
97
97
|
}
|
|
98
|
-
async manageGridData(
|
|
99
|
-
const transactionResult = await this._adaptable.manageGridRows(
|
|
98
|
+
async manageGridData(dataRowConfig, dataUpdateConfig) {
|
|
99
|
+
const transactionResult = await this._adaptable.manageGridRows(dataRowConfig, dataUpdateConfig);
|
|
100
100
|
if (Array.isArray(transactionResult.removedRows) && transactionResult.removedRows.length) {
|
|
101
|
-
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRows.delete, transactionResult.removedRows, 'Delete');
|
|
101
|
+
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.dataRows.delete, transactionResult.removedRows, 'Delete');
|
|
102
102
|
this.getAdaptableInternalApi().getDataService().CreateRowDataChangedEvent(rowDataChangedInfo);
|
|
103
103
|
}
|
|
104
104
|
if (Array.isArray(transactionResult.updatedRows) && transactionResult.updatedRows.length) {
|
|
105
|
-
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRows.update, transactionResult.updatedRows, 'Update');
|
|
105
|
+
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.dataRows.update, transactionResult.updatedRows, 'Update');
|
|
106
106
|
this.getAdaptableInternalApi().getDataService().CreateRowDataChangedEvent(rowDataChangedInfo);
|
|
107
107
|
}
|
|
108
108
|
if (Array.isArray(transactionResult.addedRows) && transactionResult.addedRows.length) {
|
|
109
|
-
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRows.add, transactionResult.addedRows, 'Add');
|
|
109
|
+
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.dataRows.add, transactionResult.addedRows, 'Add');
|
|
110
110
|
this.getAdaptableInternalApi().getDataService().CreateRowDataChangedEvent(rowDataChangedInfo);
|
|
111
111
|
}
|
|
112
112
|
return transactionResult;
|
|
@@ -607,9 +607,9 @@ export class GridApiImpl extends ApiBase {
|
|
|
607
607
|
showTransposedView(transposeConfig = {}) {
|
|
608
608
|
const transposedColumnId = transposeConfig.transposedColumnId ?? this.getOptionsApi().getPrimaryKey();
|
|
609
609
|
const hideTransposedColumn = transposeConfig.hideTransposedColumn ?? true;
|
|
610
|
-
const visibleColumns = transposeConfig.visibleColumns ?? false;
|
|
611
|
-
const visibleRows = transposeConfig.visibleRows ?? false;
|
|
612
610
|
const autosize = transposeConfig.autosize ?? true;
|
|
611
|
+
const columnsToTranspose = transposeConfig.columnsToTranspose;
|
|
612
|
+
const rowsToTranspose = transposeConfig.rowsToTranspose;
|
|
613
613
|
this.getAdaptableInternalApi().showPopupWindow({
|
|
614
614
|
id: WINDOW_SHOW_TRANSPOSED_VIEW,
|
|
615
615
|
factoryId: WINDOW_SHOW_TRANSPOSED_VIEW,
|
|
@@ -618,9 +618,9 @@ export class GridApiImpl extends ApiBase {
|
|
|
618
618
|
popupProps: {
|
|
619
619
|
transposedColumnId,
|
|
620
620
|
hideTransposedColumn,
|
|
621
|
-
visibleColumns,
|
|
622
|
-
visibleRows,
|
|
623
621
|
autosize,
|
|
622
|
+
columnsToTranspose,
|
|
623
|
+
rowsToTranspose,
|
|
624
624
|
},
|
|
625
625
|
});
|
|
626
626
|
}
|
|
@@ -24,6 +24,7 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
|
24
24
|
getCurrentLayoutColumnSort(columnId: string): ColumnSort['SortOrder'] | null;
|
|
25
25
|
getCurrentLayoutName(): string;
|
|
26
26
|
getLayoutByName(layoutName: string): Layout | null;
|
|
27
|
+
setExtendedLayout(extendedLayout: ExtendedLayout): void;
|
|
27
28
|
createOrUpdateExtendedLayout(extendedLayoutInfo: ExtendedLayout): void;
|
|
28
29
|
getExtendedLayoutByName(layoutName: string): ExtendedLayout | undefined;
|
|
29
30
|
cloneExtendedLayout(extendedLayoutToClone: ExtendedLayout, layoutName: string): ExtendedLayout | false;
|
|
@@ -90,6 +90,9 @@ export class LayoutApiImpl extends ApiBase {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
+
setExtendedLayout(extendedLayout) {
|
|
94
|
+
this.setLayout(extendedLayout.Layout.Name);
|
|
95
|
+
}
|
|
93
96
|
createOrUpdateExtendedLayout(extendedLayoutInfo) {
|
|
94
97
|
const config = {
|
|
95
98
|
includeLayoutNotExtendedObjects: true,
|
|
@@ -403,7 +406,7 @@ export class LayoutApiImpl extends ApiBase {
|
|
|
403
406
|
const currentLayout = this.getCurrentLayout();
|
|
404
407
|
const customHeader = currentLayout.ColumnHeaders?.[column.columnId] ?? column.friendlyName;
|
|
405
408
|
this.dispatchAction(PopupShowPrompt({
|
|
406
|
-
Header: `Change
|
|
409
|
+
Header: `Change Caption for "${column.friendlyName}"`,
|
|
407
410
|
Msg: '',
|
|
408
411
|
DefaultValue: customHeader,
|
|
409
412
|
ConfirmActionCreator: (inputText) => {
|
|
@@ -26,14 +26,14 @@ export class NamedQueryApiImpl extends ApiBase {
|
|
|
26
26
|
}
|
|
27
27
|
isValidNamedQuery(namedQuery) {
|
|
28
28
|
if (IsNullOrEmptyOrWhiteSpace(namedQuery?.Name)) {
|
|
29
|
-
return { valid: false, message: '
|
|
29
|
+
return { valid: false, message: 'A name is required for the Named Query.' };
|
|
30
30
|
}
|
|
31
31
|
// check that there is no other existing named query with the same name
|
|
32
32
|
const duplicate = this.getNamedQueries().find((q) => q.Name === namedQuery.Name && q.Uuid !== namedQuery.Uuid);
|
|
33
33
|
if (duplicate) {
|
|
34
34
|
return {
|
|
35
35
|
valid: false,
|
|
36
|
-
message: 'A Named Query
|
|
36
|
+
message: 'A Named Query with this name already exists.',
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
return { valid: true, message: '' };
|
|
@@ -7,6 +7,7 @@ export declare class PlusMinusApiImpl extends ApiBase implements PlusMinusApi {
|
|
|
7
7
|
getPlusMinusState(): PlusMinusState;
|
|
8
8
|
getAllPlusMinus(config?: LayoutExtendedConfig): PlusMinusNudge[];
|
|
9
9
|
getPlusMinusById(id: PlusMinusNudge['Uuid'], config?: LayoutExtendedConfig): PlusMinusNudge;
|
|
10
|
+
getPlusMinusNudgeByName(name: string): PlusMinusNudge | undefined;
|
|
10
11
|
getAllActivePlusMinus(config?: LayoutExtendedConfig): PlusMinusNudge[];
|
|
11
12
|
getAllSuspendedPlusMinus(config?: LayoutExtendedConfig): PlusMinusNudge[];
|
|
12
13
|
runPlusMinusNudge(plusMinusNudge: PlusMinusNudge, cellsToUpdate: GridCell[], direction: 'up' | 'down'): void;
|
|
@@ -12,6 +12,9 @@ export class PlusMinusApiImpl extends ApiBase {
|
|
|
12
12
|
getPlusMinusById(id, config) {
|
|
13
13
|
return this.getAllPlusMinus(config).find((plusMinus) => plusMinus?.Uuid === id);
|
|
14
14
|
}
|
|
15
|
+
getPlusMinusNudgeByName(name) {
|
|
16
|
+
return this.getAllPlusMinus().find((plusMinus) => plusMinus.Name === name);
|
|
17
|
+
}
|
|
15
18
|
getAllActivePlusMinus(config) {
|
|
16
19
|
return this.getAllPlusMinus(config).filter((plusMinusNudge) => !plusMinusNudge.IsSuspended);
|
|
17
20
|
}
|
|
@@ -11,6 +11,7 @@ export declare class ScheduleApiImpl extends ApiBase implements ScheduleApi {
|
|
|
11
11
|
constructor(_adaptable: IAdaptable);
|
|
12
12
|
getScheduleState(): ScheduleState;
|
|
13
13
|
getSchedules(config?: LayoutExtendedConfig): BaseSchedule[];
|
|
14
|
+
getScheduleByName(name: string): BaseSchedule | undefined;
|
|
14
15
|
getReminderSchedules(config?: LayoutExtendedConfig): ReminderSchedule[];
|
|
15
16
|
getScheduleById(id: BaseSchedule['Uuid'], config?: LayoutExtendedConfig): BaseSchedule;
|
|
16
17
|
getActiveReminderSchedules(config?: LayoutExtendedConfig): ReminderSchedule[];
|
|
@@ -16,6 +16,9 @@ export class ScheduleApiImpl extends ApiBase {
|
|
|
16
16
|
allSchedules.push(...this.getOpenFinSchedules(config));
|
|
17
17
|
return allSchedules;
|
|
18
18
|
}
|
|
19
|
+
getScheduleByName(name) {
|
|
20
|
+
return this.getSchedules().find((schedule) => schedule.Name === name);
|
|
21
|
+
}
|
|
19
22
|
getReminderSchedules(config) {
|
|
20
23
|
return (this.handleLayoutExtensionObjects(this.getScheduleState().Reminders, 'Schedule', config) ?? []);
|
|
21
24
|
}
|
|
@@ -6,6 +6,7 @@ export declare class ShortcutApiImpl extends ApiBase implements ShortcutApi {
|
|
|
6
6
|
getShortcutState(): ShortcutState;
|
|
7
7
|
getShortcuts(config?: LayoutExtendedConfig): Shortcut[];
|
|
8
8
|
getShortcutById(id: Shortcut['Uuid'], config?: LayoutExtendedConfig): Shortcut;
|
|
9
|
+
getShortcutByName(name: string): Shortcut | undefined;
|
|
9
10
|
getActiveShortcuts(config?: LayoutExtendedConfig): Shortcut[];
|
|
10
11
|
getSuspendedShortcuts(config?: LayoutExtendedConfig): Shortcut[];
|
|
11
12
|
addShortcut(shortcut: Shortcut): Shortcut;
|
|
@@ -11,6 +11,9 @@ export class ShortcutApiImpl extends ApiBase {
|
|
|
11
11
|
getShortcutById(id, config) {
|
|
12
12
|
return this.getShortcuts(config).find((shortcut) => shortcut?.Uuid === id);
|
|
13
13
|
}
|
|
14
|
+
getShortcutByName(name) {
|
|
15
|
+
return this.getShortcuts().find((shortcut) => shortcut.Name === name);
|
|
16
|
+
}
|
|
14
17
|
getActiveShortcuts(config) {
|
|
15
18
|
return this.getShortcuts(config).filter((shortcut) => !shortcut.IsSuspended);
|
|
16
19
|
}
|