@sassoftware/vi-api 1.48.0 → 1.51.2
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/README.md +1 -1
- package/alert-reps/index.d.ts +15 -6
- package/alert-reps/package.json +1 -1
- package/api.module.js +7 -0
- package/component/bindings.d.ts +26 -15
- package/component/bindings.js +23 -0
- package/config/config-api.d.ts +2 -2
- package/config/control-attribute-types.d.ts +3 -0
- package/config/standardPropertyTypes.d.ts +2 -0
- package/config/standardPropertyTypes.js +2 -0
- package/control/client-field-properties.d.ts +11 -0
- package/control/client-field-properties.js +1 -0
- package/control/control-api.d.ts +67 -25
- package/control/events.d.ts +1 -0
- package/control/file.d.ts +18 -5
- package/control/index.d.ts +1 -0
- package/control/index.js +1 -0
- package/control/masking-api.d.ts +2 -2
- package/event/event-api.d.ts +2 -1
- package/event/event-api.js +1 -0
- package/file/file-api.d.ts +2 -0
- package/object/object-api.d.ts +3 -3
- package/package.json +1 -1
- package/page-model/page-model-api.d.ts +3 -1
- package/page-state/page-state-api.d.ts +2 -2
- package/page-template/page-template-api.d.ts +1 -1
- package/property/property-api.d.ts +1 -1
- package/score-reps/index.d.ts +1 -1
- package/score-reps/package.json +1 -1
- package/search/client/client-search-api.d.ts +9 -10
- package/shell-tabs/shell-tabs-api.d.ts +58 -58
- package/shell-tabs/shell-tabs-lifecycle-api.d.ts +7 -7
- package/svi-datahub/index.d.ts +68 -21
- package/svi-datahub/package.json +1 -1
- package/svi-sand/index.d.ts +23 -14
- package/svi-sand/package.json +1 -1
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ import { FileOperation, SASObjectAttachedFile } from "../file/file-api";
|
|
|
4
4
|
import { ObjectFieldRestrictions } from "../object/object-api";
|
|
5
5
|
import { PathsRepresentation } from "../svi-sand";
|
|
6
6
|
import { TemplateFileCategoryAssociationDTO } from "../svi-datahub";
|
|
7
|
+
import { ClientFieldProperties } from "../control/client-field-properties";
|
|
7
8
|
export declare enum PageMode {
|
|
8
9
|
Create = "create",
|
|
9
10
|
Edit = "edit",
|
|
@@ -47,6 +48,7 @@ export interface PageModelObjectData {
|
|
|
47
48
|
displayLabel?: string;
|
|
48
49
|
fieldRestrictions?: ObjectFieldRestrictions;
|
|
49
50
|
fileRestrictions?: Record<string, Record<string, FileRestrictions>>;
|
|
51
|
+
clientFieldProperties?: Record<string, Record<string, ClientFieldProperties>>;
|
|
50
52
|
id?: string;
|
|
51
53
|
linkedPages?: LinkedPage[];
|
|
52
54
|
mode?: PageMode;
|
|
@@ -170,7 +172,7 @@ export interface IPageEvent<T extends IPageEventData> {
|
|
|
170
172
|
addPostHook(hook: IPostPageEventHook<T>): PageEventHookRemove;
|
|
171
173
|
/**
|
|
172
174
|
* @method
|
|
173
|
-
* @description
|
|
175
|
+
* @description Run pre-hooks, execute the action, run post hooks.
|
|
174
176
|
* @param payload is passed as input for any event hooks.
|
|
175
177
|
* @param action the action to perform.
|
|
176
178
|
*/
|
|
@@ -12,7 +12,7 @@ export interface ObjectPageDesignerState {
|
|
|
12
12
|
primaryDataSource: StoredObjectDTO;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* This API provides functionality that
|
|
15
|
+
* This API provides functionality that relates to the page state.
|
|
16
16
|
* Accessed from the window at `window.sas.vi.pageState`.
|
|
17
17
|
*
|
|
18
18
|
* @example window.sas.vi.pageState.getCurrent();
|
|
@@ -51,7 +51,7 @@ export interface PageStateApi {
|
|
|
51
51
|
*/
|
|
52
52
|
getCurrentHomepageDesigner(): HomepageDesignerState | undefined;
|
|
53
53
|
/**
|
|
54
|
-
* Gives the currently active object
|
|
54
|
+
* Gives the currently active object page's state, or undefined if an object page
|
|
55
55
|
* designer tab is not active.
|
|
56
56
|
*/
|
|
57
57
|
getCurrentObjectPageDesigner(): ObjectPageDesignerState | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Template, TemplateResourceSummary } from "../svi-datahub";
|
|
2
2
|
import { ApplicationType, TemplateType } from "../page-admin/page-admin-api";
|
|
3
3
|
/**
|
|
4
|
-
* This API provides functionality that
|
|
4
|
+
* This API provides functionality that relates to the page templates.
|
|
5
5
|
*
|
|
6
6
|
* Accessed from the window at `window.sas.vi.pageTemplate`.
|
|
7
7
|
*
|
|
@@ -92,7 +92,7 @@ export interface EditorApi {
|
|
|
92
92
|
onPropertyChange(handler: (category: string, property: string, currentValue: any, previousValue: any) => void): () => void;
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
95
|
-
* This API
|
|
95
|
+
* This API relates to page/toolbar control properties in SAS Visual Investigator.
|
|
96
96
|
*
|
|
97
97
|
* Accessed from the window at `window.sas.vi.property`.
|
|
98
98
|
*
|
package/score-reps/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
// Generated using typescript-generator version 2.15.527 on 2025-
|
|
3
|
+
// Generated using typescript-generator version 2.15.527 on 2025-09-03 08:54:03.
|
|
4
4
|
|
|
5
5
|
export interface BaseRep extends TrackedResource {
|
|
6
6
|
links?: Link[];
|
package/score-reps/package.json
CHANGED
|
@@ -40,8 +40,7 @@ export interface NetworkData {
|
|
|
40
40
|
};
|
|
41
41
|
numNodes: number;
|
|
42
42
|
}
|
|
43
|
-
export
|
|
44
|
-
}
|
|
43
|
+
export type SearchAndCreateDialogModel = CreateRelationshipDialogModel<SearchAndCreateResponse>;
|
|
45
44
|
export interface SearchDialogModel extends SearchOrCreateAndLinkDialogBase<SearchDialogResponse> {
|
|
46
45
|
canCreate?: boolean;
|
|
47
46
|
}
|
|
@@ -61,7 +60,7 @@ export interface SearchAndCreateResponse {
|
|
|
61
60
|
relateToModel?: SearchAndCreateRelateToModel;
|
|
62
61
|
}
|
|
63
62
|
/**
|
|
64
|
-
* {@link SearchApi} extension
|
|
63
|
+
* {@link SearchApi} extension relates to functionality related to SAS Visual Investigator's search capabilities.
|
|
65
64
|
* These additional methods are available only in the SAS Visual Investigator Investigate and Search interface.
|
|
66
65
|
*
|
|
67
66
|
* Accessed from the window at `window.sas.vi.search`.
|
|
@@ -83,13 +82,13 @@ export interface ClientSearchApi extends SearchApi {
|
|
|
83
82
|
* @description Performs a search against the svi-sand service and navigates the user to the Search Results page.
|
|
84
83
|
* @param queryText {string} Text used to form the query.
|
|
85
84
|
* @param visualizationName {"summary" | "map" | "table"} Visualization to query for and then display to the user.
|
|
86
|
-
* @param [mapFilters] {MapFilter[]} The map filter object to include with the search query. This can consist of MapBoundedPolygonFilter, MapRadiusFilter, MapBoundedBoxFilter or MapShapeFilter.
|
|
85
|
+
* @param [mapFilters] {MapFilter[]} The map filter object to include with the search query. This can consist of MapBoundedPolygonFilter, MapRadiusFilter, MapBoundedBoxFilter, or MapShapeFilter.
|
|
87
86
|
* @param [queryMode] {"standard" | "phonetic" | "synonym"} Used to perform phonetic and synonym searches. Default: "standard".
|
|
88
87
|
*/
|
|
89
88
|
navigateSearch(queryText: string, visualizationName: SearchVisualization, mapFilters?: MapFilter[], queryMode?: QueryMode[]): Promise<void>;
|
|
90
89
|
/**
|
|
91
90
|
* @method
|
|
92
|
-
* @description Gets the current search query if one exists. Otherwise undefined.
|
|
91
|
+
* @description Gets the current search query if one exists. Otherwise, undefined.
|
|
93
92
|
*/
|
|
94
93
|
getCurrentSearchQuery(): SearchQuery | undefined;
|
|
95
94
|
/**
|
|
@@ -127,7 +126,7 @@ export interface ClientSearchApi extends SearchApi {
|
|
|
127
126
|
* @method
|
|
128
127
|
* @description Adds an image to the Insights selected in the "Add image to Insights" dialog.
|
|
129
128
|
* @param imageData {Uint8Array} Image to add.
|
|
130
|
-
* @param contentType {string} This is used in the content-type header when the file is uploaded. For example 'image/png'.
|
|
129
|
+
* @param contentType {string} This is used in the content-type header when the file is uploaded. For example, 'image/png'.
|
|
131
130
|
* @param [height] {string} Height of the Insights cell.
|
|
132
131
|
* @param [width] {string} Width of the Insights cell.
|
|
133
132
|
*/
|
|
@@ -146,18 +145,18 @@ export interface ClientSearchApi extends SearchApi {
|
|
|
146
145
|
addToNewWorkspace(objectsToAdd: ObjectIdentifier[], targetObjectType: string, targetObjectId?: string, visualization?: Visualization, workspaceName?: string, networkData?: NetworkData): Promise<void>;
|
|
147
146
|
/**
|
|
148
147
|
* @method
|
|
149
|
-
* @description Launches a wizard allowing users to search
|
|
148
|
+
* @description Launches a wizard allowing users to search before creating an object/relationship.
|
|
150
149
|
* The relationship wizard is determined by the relateToParentLabel or relateToParentName defined in the wizardValues parameter.
|
|
151
150
|
* @param wizardValues {SearchAndCreateDialogModel} Object containing entity and relationship data.
|
|
152
|
-
* @returns A Promise
|
|
151
|
+
* @returns A Promise that resolves when the dialog box is closed.
|
|
153
152
|
*/
|
|
154
153
|
openSearchAndCreateDialog(wizardValues: SearchAndCreateDialogModel): Promise<SearchAndCreateDialogModel>;
|
|
155
154
|
/**
|
|
156
155
|
* @method
|
|
157
|
-
* @description Launches a wizard allowing users to search
|
|
156
|
+
* @description Launches a wizard allowing users to search before creating an object/relationship.
|
|
158
157
|
* The relationship wizard is determined by the relateToParentLabel or relateToParentName defined in the wizardValues parameter.
|
|
159
158
|
* @param wizardValues {SearchDialogModel} Object containing entity and relationship data.
|
|
160
|
-
* @returns A Promise
|
|
159
|
+
* @returns A Promise that resolves when the dialog box is closed.
|
|
161
160
|
*/
|
|
162
161
|
openSearchAndCreateDialog(wizardValues: SearchDialogModel): Promise<SearchDialogModel>;
|
|
163
162
|
/**
|
|
@@ -12,45 +12,45 @@ export interface INavigationBarTabs<D1 = any, D2 = D1> {
|
|
|
12
12
|
export interface INavigationBarTab<D = {
|
|
13
13
|
[key: string]: any;
|
|
14
14
|
}, SecondaryData = D> {
|
|
15
|
-
/**
|
|
15
|
+
/** Unique tab identifier */
|
|
16
16
|
id: string;
|
|
17
|
-
/**
|
|
17
|
+
/** URL relative to shell root (e.g., /user/123) - must start with a forward slash */
|
|
18
18
|
routeUrl: string;
|
|
19
|
-
/**
|
|
19
|
+
/** Label for the tab, can be a string or resource key (if isLabelResourceKey is true) */
|
|
20
20
|
label: string;
|
|
21
|
-
/**
|
|
22
|
-
* doesn't
|
|
23
|
-
|
|
21
|
+
/** Weight used during sorting to order the tabs; defaults to the order in which tabs were added.
|
|
22
|
+
* This doesn't refer to array index, as many tabs can have the same value, including negatives and fractions.
|
|
23
|
+
*/
|
|
24
24
|
sortIndex?: number;
|
|
25
|
-
/**
|
|
25
|
+
/** When true, uses resourceService.get to resolve INavigationBarTab.label */
|
|
26
26
|
isLabelResourceKey?: boolean;
|
|
27
|
-
/**
|
|
27
|
+
/** Font icon */
|
|
28
28
|
icon?: string;
|
|
29
|
-
/**
|
|
29
|
+
/** Image URL */
|
|
30
30
|
img?: string;
|
|
31
|
-
/** aria-controls
|
|
31
|
+
/** aria-controls ID */
|
|
32
32
|
controlsId?: string;
|
|
33
|
-
/**
|
|
33
|
+
/** List of secondary tabs displayed under the top-level tab */
|
|
34
34
|
secondaryTabs?: Array<ISecondaryNavigationBarTab<SecondaryData>>;
|
|
35
|
-
/**
|
|
35
|
+
/** Currently selected secondary tab */
|
|
36
36
|
selectedSecondaryTab?: ISecondaryNavigationBarTab<SecondaryData>;
|
|
37
|
-
/**
|
|
37
|
+
/** Callback to configure save confirmation actions on close */
|
|
38
38
|
getSaveOptions?(tab: INavigationBarTab): INavigationBarTabSaveOptions | undefined;
|
|
39
|
-
/**
|
|
39
|
+
/** Callback executed when tab is removed */
|
|
40
40
|
onClose?(tab: INavigationBarTab): Promise<boolean> | Observable<boolean> | boolean;
|
|
41
|
-
/**
|
|
41
|
+
/** Mark tab as having unsaved changes */
|
|
42
42
|
dirty?: boolean;
|
|
43
|
-
/**
|
|
43
|
+
/** Visually disable and make tab unselectable */
|
|
44
44
|
disabled?: boolean;
|
|
45
|
-
/**
|
|
45
|
+
/** Visually hide tab and make it unselectable */
|
|
46
46
|
hidden?: boolean;
|
|
47
|
-
/**
|
|
47
|
+
/** Exclude tab from appearing in the navigation bar system tab menu */
|
|
48
48
|
excludedFromSystemMenu?: boolean;
|
|
49
|
-
/**
|
|
49
|
+
/** Visually hide secondary tabs bar for this tab */
|
|
50
50
|
hideSecondaryTabs?: boolean;
|
|
51
|
-
/**
|
|
51
|
+
/** Indicate that the tab is associated with a new object being created */
|
|
52
52
|
creating?: boolean;
|
|
53
|
-
/**
|
|
53
|
+
/** Any additional data to be associated with the tab */
|
|
54
54
|
data?: D;
|
|
55
55
|
}
|
|
56
56
|
export type ISecondaryNavigationBarTab<D = {
|
|
@@ -58,15 +58,15 @@ export type ISecondaryNavigationBarTab<D = {
|
|
|
58
58
|
}> = Omit<INavigationBarTab<D>, "secondaryTabs" | "selectedSecondaryTab">;
|
|
59
59
|
export interface SviShellTabData {
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
61
|
+
* Required user capabilities for the tab.
|
|
62
|
+
* If unmet, the tab is hidden and cannot be navigated to.
|
|
63
63
|
* @example
|
|
64
64
|
* { or: ["svi.administration.alerts", "svi.vsd.flow.view"] }
|
|
65
65
|
*/
|
|
66
66
|
requiredCapabilities?: RequiredResourcesExpression;
|
|
67
67
|
/**
|
|
68
68
|
* REST APIs required by the tab's content.
|
|
69
|
-
*
|
|
69
|
+
* If unavailable, the tab is hidden and cannot be navigated to.
|
|
70
70
|
* @example
|
|
71
71
|
* { and: ["svi-alert", "documentGeneratorAdapter"] }
|
|
72
72
|
*/
|
|
@@ -82,41 +82,41 @@ export interface SviShellTabData {
|
|
|
82
82
|
}
|
|
83
83
|
export interface ExternalTabConfig<T = SviShellTabData, P = any> {
|
|
84
84
|
/**
|
|
85
|
-
*
|
|
85
|
+
* Will try to place at this index, can be negative, fraction, etc. to put before/between existing tabs.
|
|
86
86
|
*/
|
|
87
87
|
sortIndex?: number;
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
89
|
+
* Finds TabId, and adds this as a secondaryTab to that tab.
|
|
90
90
|
*/
|
|
91
91
|
mainTabId?: string;
|
|
92
92
|
/**
|
|
93
|
-
*
|
|
93
|
+
* This is the element/tag name that will be presented.
|
|
94
94
|
*/
|
|
95
95
|
elementName: string;
|
|
96
96
|
/**
|
|
97
|
-
*
|
|
98
|
-
*
|
|
97
|
+
* This is the URL that the tab will be registered under.
|
|
98
|
+
* Technically it's just a unique ID as this will be used to unregister a route and close any related tab(s).
|
|
99
99
|
*/
|
|
100
100
|
configUrl: string;
|
|
101
101
|
/**
|
|
102
|
-
*
|
|
103
|
-
* fullUrl is the full URL that relates to the tab, useful when catching wildcards
|
|
104
|
-
* params is constructed as of /:param1/:param2, so {param1: string, param2: string}
|
|
105
|
-
*
|
|
102
|
+
* Function to return {@link INavigationBarTab}. Remember routeUrl is from baseURL with a leading /.
|
|
103
|
+
* fullUrl is the full URL that relates to the tab, useful when catching wildcards.
|
|
104
|
+
* params is constructed as of /:param1/:param2, so {param1: string, param2: string}.
|
|
105
|
+
* Be aware fullUrl/params will be undefined if buildOnRegister is true.
|
|
106
106
|
*/
|
|
107
107
|
buildTab: (fullUrl?: string, params?: P) => INavigationBarTab<T>;
|
|
108
108
|
/**
|
|
109
|
-
*
|
|
109
|
+
* Add as a system tab. If left out will default to application tab, ignored if mainTabId is defined.
|
|
110
110
|
*/
|
|
111
111
|
systemTab?: boolean;
|
|
112
112
|
/**
|
|
113
|
-
*
|
|
113
|
+
* Set this to true if you want the component to reset every time you navigate away.
|
|
114
114
|
*/
|
|
115
115
|
doNotReuse?: boolean;
|
|
116
116
|
/**
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
117
|
+
* Set this to true if you want buildTab to run when registered (e.g. for a system tab that's always there).
|
|
118
|
+
* If your buildTab takes params, this cannot be provided and must be assumed undefined.
|
|
119
|
+
* A secondaryTab (one that has mainTabId) will be created regardless of this flag.
|
|
120
120
|
*/
|
|
121
121
|
buildOnRegister?: boolean;
|
|
122
122
|
}
|
|
@@ -132,27 +132,27 @@ export interface ShellTabsApi<T = SviShellTabData> {
|
|
|
132
132
|
/**
|
|
133
133
|
* @method
|
|
134
134
|
* @description This is used to expose any {@link PotentialTabItem} hooks on a component up to the Tab Service.
|
|
135
|
-
* @param {any} context
|
|
136
|
-
* @param {HTMLElement} nativeElement This will pass the ElementRef for the component
|
|
135
|
+
* @param {any} context Pass "this".
|
|
136
|
+
* @param {HTMLElement} nativeElement This will pass the ElementRef for the component.
|
|
137
137
|
*
|
|
138
|
-
* onTabClose {@link OnTabClose}, optional, can be used to prevent closing of a tab or close async
|
|
139
|
-
* onAttachTab {@link OnAttachTab}, will always trigger when currentNavigationBarTab
|
|
140
|
-
* onAttachToolbar {@link TabWithToolbar}, optional, will set currentToolbar if there was a toolbar in the VI Router
|
|
141
|
-
* onTabEnter {@link OnTabEnter}, optional, will trigger when tab is entered
|
|
142
|
-
* onTabLeave {@link OnTabLeave}, optional, will trigger when tab is left
|
|
143
|
-
* onTabSaveConfirm {@link OnTabSaveConfirm}, optional, basic dialog box can be created
|
|
138
|
+
* onTabClose {@link OnTabClose}, optional, can be used to prevent closing of a tab or close async.
|
|
139
|
+
* onAttachTab {@link OnAttachTab}, will always trigger when currentNavigationBarTab is set.
|
|
140
|
+
* onAttachToolbar {@link TabWithToolbar}, optional, will set currentToolbar if there was a toolbar in the VI Router.
|
|
141
|
+
* onTabEnter {@link OnTabEnter}, optional, will trigger when tab is entered.
|
|
142
|
+
* onTabLeave {@link OnTabLeave}, optional, will trigger when tab is left.
|
|
143
|
+
* onTabSaveConfirm {@link OnTabSaveConfirm}, optional, basic dialog box can be created when closing a dirty tab.
|
|
144
144
|
*/
|
|
145
145
|
createTabApiForElement: (context: any, nativeElement: HTMLElement) => void;
|
|
146
146
|
/**
|
|
147
147
|
* @method
|
|
148
148
|
* @description Use this function to register new routes for tabs.
|
|
149
|
-
* @param {ExternalTabConfig[]} tab See {@link ExternalTabConfig}
|
|
149
|
+
* @param {ExternalTabConfig[]} tab See {@link ExternalTabConfig}.
|
|
150
150
|
*/
|
|
151
151
|
registerExternalTabs: (tab: Array<ExternalTabConfig<T>>) => void;
|
|
152
152
|
/**
|
|
153
153
|
* @method
|
|
154
154
|
* @description Use this function to remove routes added via registerTabFn.
|
|
155
|
-
* @param {ExternalTabConfig[]} tabsToRemove See {@link ExternalTabConfig}
|
|
155
|
+
* @param {ExternalTabConfig[]} tabsToRemove See {@link ExternalTabConfig}.
|
|
156
156
|
*/
|
|
157
157
|
unregisterExternalTabs: (tabsToRemove: Array<ExternalTabConfig<T>>) => void;
|
|
158
158
|
/**
|
|
@@ -165,12 +165,12 @@ export interface ShellTabsApi<T = SviShellTabData> {
|
|
|
165
165
|
};
|
|
166
166
|
/**
|
|
167
167
|
* @method
|
|
168
|
-
* @description This stream will track the current top
|
|
168
|
+
* @description This stream will track the current top-level tab.
|
|
169
169
|
*/
|
|
170
170
|
selectedPrimaryTabChanged$: Observable<INavigationBarTab>;
|
|
171
171
|
/**
|
|
172
172
|
* @method
|
|
173
|
-
* @description This stream will track the current second
|
|
173
|
+
* @description This stream will track the current second-level tab.
|
|
174
174
|
*/
|
|
175
175
|
selectedSecondaryTabChanged$: Observable<INavigationBarTab | undefined>;
|
|
176
176
|
/**
|
|
@@ -188,7 +188,7 @@ export interface ShellTabsApi<T = SviShellTabData> {
|
|
|
188
188
|
tabRemoved$: Observable<INavigationBarTab>;
|
|
189
189
|
/**
|
|
190
190
|
* @method
|
|
191
|
-
* @description
|
|
191
|
+
* @description Get Tab by ID.
|
|
192
192
|
* @param [tabId] {string} This will be ID of an existing tab.
|
|
193
193
|
*/
|
|
194
194
|
getTabById: (tabId: string) => INavigationBarTab | undefined;
|
|
@@ -207,10 +207,10 @@ export interface ShellTabsApi<T = SviShellTabData> {
|
|
|
207
207
|
selectDefaultTab: () => Promise<boolean>;
|
|
208
208
|
/**
|
|
209
209
|
* @method
|
|
210
|
-
* @description This will attempt to open+select a matching INavigationBarTab and optional secondaryTab, returning false on failure
|
|
211
|
-
*
|
|
212
|
-
* @param [tabToSelect] {INavigationBarTab} See {@link INavigationBarTab}
|
|
213
|
-
* @param [secondaryTab] {INavigationBarTab} See {@link INavigationBarTab}
|
|
210
|
+
* @description This will attempt to open+select a matching INavigationBarTab and optional secondaryTab, returning false on failure.
|
|
211
|
+
* In the event the tab doesn't exist already, it will add the tab assuming an appropriate route has been registered for it.
|
|
212
|
+
* @param [tabToSelect] {INavigationBarTab} See {@link INavigationBarTab}.
|
|
213
|
+
* @param [secondaryTab] {INavigationBarTab} See {@link INavigationBarTab}. If left undefined, this will select the previously
|
|
214
214
|
* selected secondary tab of the primary tab or its first index secondary tab.
|
|
215
215
|
*/
|
|
216
216
|
openTab: (tabToSelect: INavigationBarTab, secondaryTab?: INavigationBarTab) => Promise<boolean>;
|
|
@@ -229,10 +229,10 @@ export interface ShellTabsApi<T = SviShellTabData> {
|
|
|
229
229
|
removeApplicationTabById: (tabIdToRemove: string, suppressNavigation?: boolean) => Promise<boolean>;
|
|
230
230
|
/**
|
|
231
231
|
* @method
|
|
232
|
-
* @description This will remove an existing application tab then replace with another
|
|
233
|
-
*
|
|
232
|
+
* @description This will remove an existing application tab then replace with another. If {@link removeApplicationTabById} is unsuccessful this will fail.
|
|
233
|
+
* Use case can be saving a tab which has a temporary ID, and reopening it with a saved payload.
|
|
234
234
|
* @param [tabId] {string} This will be ID of an existing tab.
|
|
235
|
-
* @param [newTab] {INavigationBarTab} See {@link INavigationBarTab}
|
|
235
|
+
* @param [newTab] {INavigationBarTab} See {@link INavigationBarTab}.
|
|
236
236
|
*
|
|
237
237
|
*/
|
|
238
238
|
replaceApplicationTab: (tabId: string, newTab: INavigationBarTab) => Promise<boolean>;
|
|
@@ -20,16 +20,16 @@ export interface OnTabEnterParams {
|
|
|
20
20
|
export type OnTabLeaveParams = Omit<OnTabEnterParams, "recycled">;
|
|
21
21
|
export interface OnTabEnter {
|
|
22
22
|
/**
|
|
23
|
-
* Function to run when the
|
|
24
|
-
* @param params - from is previous tab (possibly undefined on first load), to is always this tab;
|
|
25
|
-
* type {@link INavigationBarTab}, recycled
|
|
23
|
+
* Function to run when the tab is entered. This happens on first load as well.
|
|
24
|
+
* @param params - from is the previous tab (possibly undefined on first load), to is always this tab;
|
|
25
|
+
* type {@link INavigationBarTab}, recycled indicates whether the component was recycled or not.
|
|
26
26
|
*/
|
|
27
27
|
onTabEnter(params: OnTabEnterParams): void;
|
|
28
28
|
}
|
|
29
29
|
export interface OnTabLeave {
|
|
30
30
|
/**
|
|
31
|
-
* Function to run when the
|
|
32
|
-
* @param params - from is always this tab, to is where the user is going; type {@link INavigationBarTab}
|
|
31
|
+
* Function to run when the tab is left.
|
|
32
|
+
* @param params - from is always this tab, to is where the user is going; type {@link INavigationBarTab}.
|
|
33
33
|
*/
|
|
34
34
|
onTabLeave(params: OnTabLeaveParams): void;
|
|
35
35
|
}
|
|
@@ -46,13 +46,13 @@ export interface TabWithToolbar<T> {
|
|
|
46
46
|
}
|
|
47
47
|
export interface OnTabClose {
|
|
48
48
|
/**
|
|
49
|
-
* @param tab
|
|
49
|
+
* @param tab The current tab model that is closing.
|
|
50
50
|
*/
|
|
51
51
|
onTabClose(tab: INavigationBarTab): boolean | Promise<boolean> | Observable<boolean>;
|
|
52
52
|
}
|
|
53
53
|
export interface OnTabSaveConfirm {
|
|
54
54
|
/**
|
|
55
|
-
* @param tab
|
|
55
|
+
* @param tab The current tab model that is closing.
|
|
56
56
|
*/
|
|
57
57
|
onTabSaveConfirm(tab: INavigationBarTab): INavigationBarTabSaveOptions | undefined;
|
|
58
58
|
}
|