@adaptabletools/adaptable-cjs 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 +2 -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 +2 -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 +2 -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 +2 -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 +17 -1
- package/src/Redux/ActionsReducers/UserInterfaceRedux.d.ts +11 -0
- package/src/Redux/ActionsReducers/UserInterfaceRedux.js +26 -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 +47 -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 +35 -0
- 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.cjs.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
|
+
}
|
|
@@ -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
|
+
}
|
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;
|
|
@@ -11,6 +11,7 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectF
|
|
|
11
11
|
const AdaptableAlert_1 = require("../../AdaptableState/Common/AdaptableAlert");
|
|
12
12
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
13
13
|
const AlertInternalApi_1 = require("../Internal/AlertInternalApi");
|
|
14
|
+
const resolveContainerElement_1 = require("../../Utilities/resolveContainerElement");
|
|
14
15
|
class AlertApiImpl extends ApiBase_1.ApiBase {
|
|
15
16
|
internalApi;
|
|
16
17
|
constructor(_adaptable) {
|
|
@@ -36,6 +37,9 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
|
|
|
36
37
|
getAlertDefinitionById(id, config) {
|
|
37
38
|
return this.getAlertDefinitions(config).find((alert) => alert?.Uuid === id);
|
|
38
39
|
}
|
|
40
|
+
getAlertDefinitionByName(name) {
|
|
41
|
+
return this.getAlertDefinitions().find((alertDefinition) => alertDefinition.Name === name);
|
|
42
|
+
}
|
|
39
43
|
addAlertDefinition(alertDefinition) {
|
|
40
44
|
this.addUidToAdaptableObject(alertDefinition);
|
|
41
45
|
this.dispatchAction(AlertRedux.AlertDefinitionAdd(alertDefinition));
|
|
@@ -63,12 +67,7 @@ class AlertApiImpl extends ApiBase_1.ApiBase {
|
|
|
63
67
|
}
|
|
64
68
|
// Show Alert in a Div (if one has been set)
|
|
65
69
|
if (alertProperties.ShowInDiv) {
|
|
66
|
-
|
|
67
|
-
let optionsDiv = this.getContainerOptions().alertContainer;
|
|
68
|
-
if (optionsDiv) {
|
|
69
|
-
alertDiv =
|
|
70
|
-
typeof optionsDiv === 'string' ? document.getElementById(optionsDiv) : optionsDiv;
|
|
71
|
-
}
|
|
70
|
+
const alertDiv = (0, resolveContainerElement_1.resolveContainerElement)(this.getContainerOptions().alertContainer, this.getAdaptableInternalApi().buildBaseContext());
|
|
72
71
|
if (alertDiv) {
|
|
73
72
|
let alertString = alertToShow.header + ': ' + alertToShow.message;
|
|
74
73
|
alertDiv.innerHTML = alertString;
|
|
@@ -126,8 +126,8 @@ class ChartingApiImpl extends ApiBase_1.ApiBase {
|
|
|
126
126
|
else {
|
|
127
127
|
const alert = {
|
|
128
128
|
alertType: 'generic',
|
|
129
|
-
header: 'Save
|
|
130
|
-
message: '
|
|
129
|
+
header: 'Save Chart',
|
|
130
|
+
message: 'Would you like to save this chart?',
|
|
131
131
|
alertDefinition: {
|
|
132
132
|
...ObjectFactory_1.default.CreateEmptyAlertDefinition(),
|
|
133
133
|
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[];
|
|
@@ -21,6 +21,9 @@ class CustomSortApiImpl extends ApiBase_1.ApiBase {
|
|
|
21
21
|
getCustomSortById(id, config) {
|
|
22
22
|
return this.getCustomSorts(config).find((customSort) => customSort.Uuid === id);
|
|
23
23
|
}
|
|
24
|
+
getCustomSortByName(name) {
|
|
25
|
+
return this.getCustomSorts().find((customSort) => customSort.Name === name);
|
|
26
|
+
}
|
|
24
27
|
getLiveCustomSorts() {
|
|
25
28
|
let returnVals = [];
|
|
26
29
|
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'];
|
|
@@ -23,6 +23,9 @@ class FlashingCellApiImpl extends ApiBase_1.ApiBase {
|
|
|
23
23
|
getFlashingCellDefinitionById(id, config) {
|
|
24
24
|
return this.getFlashingCellDefinitions(config)?.find((fc) => fc?.Uuid === id);
|
|
25
25
|
}
|
|
26
|
+
getFlashingCellDefinitionByName(name) {
|
|
27
|
+
return this.getFlashingCellDefinitions().find((fc) => fc.Name === name);
|
|
28
|
+
}
|
|
26
29
|
getActiveFlashingCellDefinitions(config) {
|
|
27
30
|
return this.getFlashingCellDefinitions(config).filter((fc) => !fc.IsSuspended);
|
|
28
31
|
}
|
|
@@ -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[];
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.FormatColumnApiImpl = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const FormatColumnRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/FormatColumnRedux"));
|
|
6
|
-
const ApiBase_1 = require("./ApiBase");
|
|
7
6
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
8
|
-
const FormatColumnInternalApi_1 = require("../Internal/FormatColumnInternalApi");
|
|
9
7
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
|
|
8
|
+
const FormatColumnInternalApi_1 = require("../Internal/FormatColumnInternalApi");
|
|
9
|
+
const ApiBase_1 = require("./ApiBase");
|
|
10
10
|
class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
11
11
|
internalApi;
|
|
12
12
|
constructor(_adaptable) {
|
|
@@ -22,6 +22,9 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
22
22
|
getFormatColumnByUuId(id, config) {
|
|
23
23
|
return this.getFormatColumns(config).find((formatColumn) => formatColumn.Uuid === id);
|
|
24
24
|
}
|
|
25
|
+
getFormatColumnByName(name) {
|
|
26
|
+
return this.getFormatColumns().find((formatColumn) => formatColumn.Name === name);
|
|
27
|
+
}
|
|
25
28
|
getActiveFormatColumns(config) {
|
|
26
29
|
return this.getFormatColumns(config).filter((formatColumn) => !formatColumn.IsSuspended);
|
|
27
30
|
}
|
|
@@ -42,9 +45,7 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
42
45
|
return this.getFormatColumnByUuId(formatColumn.Uuid);
|
|
43
46
|
}
|
|
44
47
|
addFormatColumns(formatColumns) {
|
|
45
|
-
|
|
46
|
-
this.addFormatColumn(fc);
|
|
47
|
-
});
|
|
48
|
+
this.dispatchAction(FormatColumnRedux.FormatColumnsAdd(formatColumns));
|
|
48
49
|
return formatColumns?.map((formatColumn) => this.getFormatColumnByUuId(formatColumn.Uuid));
|
|
49
50
|
}
|
|
50
51
|
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[];
|
|
@@ -99,18 +99,18 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
99
99
|
}
|
|
100
100
|
return [];
|
|
101
101
|
}
|
|
102
|
-
async manageGridData(
|
|
103
|
-
const transactionResult = await this._adaptable.manageGridRows(
|
|
102
|
+
async manageGridData(dataRowConfig, dataUpdateConfig) {
|
|
103
|
+
const transactionResult = await this._adaptable.manageGridRows(dataRowConfig, dataUpdateConfig);
|
|
104
104
|
if (Array.isArray(transactionResult.removedRows) && transactionResult.removedRows.length) {
|
|
105
|
-
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRows.delete, transactionResult.removedRows, 'Delete');
|
|
105
|
+
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.dataRows.delete, transactionResult.removedRows, 'Delete');
|
|
106
106
|
this.getAdaptableInternalApi().getDataService().CreateRowDataChangedEvent(rowDataChangedInfo);
|
|
107
107
|
}
|
|
108
108
|
if (Array.isArray(transactionResult.updatedRows) && transactionResult.updatedRows.length) {
|
|
109
|
-
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRows.update, transactionResult.updatedRows, 'Update');
|
|
109
|
+
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.dataRows.update, transactionResult.updatedRows, 'Update');
|
|
110
110
|
this.getAdaptableInternalApi().getDataService().CreateRowDataChangedEvent(rowDataChangedInfo);
|
|
111
111
|
}
|
|
112
112
|
if (Array.isArray(transactionResult.addedRows) && transactionResult.addedRows.length) {
|
|
113
|
-
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRows.add, transactionResult.addedRows, 'Add');
|
|
113
|
+
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.dataRows.add, transactionResult.addedRows, 'Add');
|
|
114
114
|
this.getAdaptableInternalApi().getDataService().CreateRowDataChangedEvent(rowDataChangedInfo);
|
|
115
115
|
}
|
|
116
116
|
return transactionResult;
|
|
@@ -611,9 +611,9 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
611
611
|
showTransposedView(transposeConfig = {}) {
|
|
612
612
|
const transposedColumnId = transposeConfig.transposedColumnId ?? this.getOptionsApi().getPrimaryKey();
|
|
613
613
|
const hideTransposedColumn = transposeConfig.hideTransposedColumn ?? true;
|
|
614
|
-
const visibleColumns = transposeConfig.visibleColumns ?? false;
|
|
615
|
-
const visibleRows = transposeConfig.visibleRows ?? false;
|
|
616
614
|
const autosize = transposeConfig.autosize ?? true;
|
|
615
|
+
const columnsToTranspose = transposeConfig.columnsToTranspose;
|
|
616
|
+
const rowsToTranspose = transposeConfig.rowsToTranspose;
|
|
617
617
|
this.getAdaptableInternalApi().showPopupWindow({
|
|
618
618
|
id: windowFactory_1.WINDOW_SHOW_TRANSPOSED_VIEW,
|
|
619
619
|
factoryId: windowFactory_1.WINDOW_SHOW_TRANSPOSED_VIEW,
|
|
@@ -622,9 +622,9 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
622
622
|
popupProps: {
|
|
623
623
|
transposedColumnId,
|
|
624
624
|
hideTransposedColumn,
|
|
625
|
-
visibleColumns,
|
|
626
|
-
visibleRows,
|
|
627
625
|
autosize,
|
|
626
|
+
columnsToTranspose,
|
|
627
|
+
rowsToTranspose,
|
|
628
628
|
},
|
|
629
629
|
});
|
|
630
630
|
}
|
|
@@ -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;
|
|
@@ -94,6 +94,9 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
+
setExtendedLayout(extendedLayout) {
|
|
98
|
+
this.setLayout(extendedLayout.Layout.Name);
|
|
99
|
+
}
|
|
97
100
|
createOrUpdateExtendedLayout(extendedLayoutInfo) {
|
|
98
101
|
const config = {
|
|
99
102
|
includeLayoutNotExtendedObjects: true,
|
|
@@ -407,7 +410,7 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
407
410
|
const currentLayout = this.getCurrentLayout();
|
|
408
411
|
const customHeader = currentLayout.ColumnHeaders?.[column.columnId] ?? column.friendlyName;
|
|
409
412
|
this.dispatchAction((0, PopupRedux_1.PopupShowPrompt)({
|
|
410
|
-
Header: `Change
|
|
413
|
+
Header: `Change Caption for "${column.friendlyName}"`,
|
|
411
414
|
Msg: '',
|
|
412
415
|
DefaultValue: customHeader,
|
|
413
416
|
ConfirmActionCreator: (inputText) => {
|
|
@@ -30,14 +30,14 @@ class NamedQueryApiImpl extends ApiBase_1.ApiBase {
|
|
|
30
30
|
}
|
|
31
31
|
isValidNamedQuery(namedQuery) {
|
|
32
32
|
if ((0, StringExtensions_1.IsNullOrEmptyOrWhiteSpace)(namedQuery?.Name)) {
|
|
33
|
-
return { valid: false, message: '
|
|
33
|
+
return { valid: false, message: 'A name is required for the Named Query.' };
|
|
34
34
|
}
|
|
35
35
|
// check that there is no other existing named query with the same name
|
|
36
36
|
const duplicate = this.getNamedQueries().find((q) => q.Name === namedQuery.Name && q.Uuid !== namedQuery.Uuid);
|
|
37
37
|
if (duplicate) {
|
|
38
38
|
return {
|
|
39
39
|
valid: false,
|
|
40
|
-
message: 'A Named Query
|
|
40
|
+
message: 'A Named Query with this name already exists.',
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
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;
|
|
@@ -16,6 +16,9 @@ class PlusMinusApiImpl extends ApiBase_1.ApiBase {
|
|
|
16
16
|
getPlusMinusById(id, config) {
|
|
17
17
|
return this.getAllPlusMinus(config).find((plusMinus) => plusMinus?.Uuid === id);
|
|
18
18
|
}
|
|
19
|
+
getPlusMinusNudgeByName(name) {
|
|
20
|
+
return this.getAllPlusMinus().find((plusMinus) => plusMinus.Name === name);
|
|
21
|
+
}
|
|
19
22
|
getAllActivePlusMinus(config) {
|
|
20
23
|
return this.getAllPlusMinus(config).filter((plusMinusNudge) => !plusMinusNudge.IsSuspended);
|
|
21
24
|
}
|
|
@@ -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[];
|
|
@@ -20,6 +20,9 @@ class ScheduleApiImpl extends ApiBase_1.ApiBase {
|
|
|
20
20
|
allSchedules.push(...this.getOpenFinSchedules(config));
|
|
21
21
|
return allSchedules;
|
|
22
22
|
}
|
|
23
|
+
getScheduleByName(name) {
|
|
24
|
+
return this.getSchedules().find((schedule) => schedule.Name === name);
|
|
25
|
+
}
|
|
23
26
|
getReminderSchedules(config) {
|
|
24
27
|
return (this.handleLayoutExtensionObjects(this.getScheduleState().Reminders, 'Schedule', config) ?? []);
|
|
25
28
|
}
|
|
@@ -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;
|
|
@@ -15,6 +15,9 @@ class ShortcutApiImpl extends ApiBase_1.ApiBase {
|
|
|
15
15
|
getShortcutById(id, config) {
|
|
16
16
|
return this.getShortcuts(config).find((shortcut) => shortcut?.Uuid === id);
|
|
17
17
|
}
|
|
18
|
+
getShortcutByName(name) {
|
|
19
|
+
return this.getShortcuts().find((shortcut) => shortcut.Name === name);
|
|
20
|
+
}
|
|
18
21
|
getActiveShortcuts(config) {
|
|
19
22
|
return this.getShortcuts(config).filter((shortcut) => !shortcut.IsSuspended);
|
|
20
23
|
}
|