@sassoftware/vi-api 1.40.4 → 1.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -5
- package/alert-reps/index.d.ts +4 -4
- package/alert-reps/package.json +1 -1
- package/component/index.d.ts +5 -1
- package/component/package.json +2 -2
- package/config/config-api.d.ts +5 -1
- package/config/package.json +2 -2
- package/control/control-api.d.ts +12 -1
- package/control/package.json +2 -2
- package/current-user/currentUser-api.d.ts +5 -1
- package/current-user/package.json +2 -2
- package/elements/index.d.ts +30 -0
- package/elements/index.js +31 -0
- package/elements/package.json +9 -0
- package/elements/properties.d.ts +89 -0
- package/event/event-api.d.ts +7 -3
- package/event/package.json +2 -2
- package/file/file-api.d.ts +5 -1
- package/file/package.json +2 -2
- package/http/index.d.ts +5 -1
- package/http/package.json +2 -2
- package/index.d.ts +3 -1
- package/init/index.d.ts +12 -7
- package/init/index.js +3 -2
- package/init/package.json +2 -2
- package/localization/localization-api.d.ts +24 -9
- package/localization/package.json +2 -2
- package/metadata/admin/admin-metadata-api.d.ts +5 -1
- package/metadata/admin/index.d.ts +1 -0
- package/metadata/admin/index.js +1 -0
- package/metadata/metadata-api.d.ts +9 -5
- package/metadata/package.json +2 -2
- package/object/object-api.d.ts +9 -5
- package/object/package.json +2 -2
- package/package.json +3 -3
- package/page-admin/package.json +2 -2
- package/page-admin/page-admin-api.d.ts +5 -1
- package/page-model/package.json +2 -2
- package/page-model/page-model-api.d.ts +6 -5
- package/page-state/package.json +2 -2
- package/page-state/page-state-api.d.ts +4 -1
- package/page-template/package.json +2 -2
- package/page-template/page-template-api.d.ts +5 -1
- package/property/package.json +2 -2
- package/property/property-api.d.ts +6 -2
- package/reference-data/package.json +2 -2
- package/reference-data/refData.d.ts +4 -1
- package/resource/package.json +2 -2
- package/resource/resource-api.d.ts +5 -1
- package/score-reps/index.d.ts +1 -1
- package/score-reps/package.json +1 -1
- package/search/client/client-search-api.d.ts +7 -3
- package/search/client/index.d.ts +1 -0
- package/search/client/index.js +1 -0
- package/search/package.json +2 -2
- package/search/search-api.d.ts +5 -1
- package/sheet/package.json +2 -2
- package/sheet/sheet-api.d.ts +5 -1
- package/shell-tabs/package.json +2 -2
- package/shell-tabs/shell-tabs-api.d.ts +11 -7
- package/svi-datahub/index.d.ts +73 -73
- package/svi-datahub/package.json +1 -1
- package/svi-sand/index.d.ts +1 -1
- package/svi-sand/package.json +1 -1
- package/tab/package.json +2 -2
- package/tab/tab-api.d.ts +5 -1
- package/theme/package.json +2 -2
- package/theme/theme-api.d.ts +6 -2
- package/traversal/package.json +2 -2
- package/traversal/traversal-api.d.ts +5 -1
- package/component/public-api.d.ts +0 -1
- package/component/public-api.js +0 -1
- package/http/public-api.d.ts +0 -1
- package/http/public-api.js +0 -1
- package/init/public-api.d.ts +0 -1
- package/init/public-api.js +0 -1
- package/public-api.d.ts +0 -1
- /package/config/{public-api.d.ts → index.d.ts} +0 -0
- /package/config/{public-api.js → index.js} +0 -0
- /package/control/{public-api.d.ts → index.d.ts} +0 -0
- /package/control/{public-api.js → index.js} +0 -0
- /package/current-user/{public-api.d.ts → index.d.ts} +0 -0
- /package/current-user/{public-api.js → index.js} +0 -0
- /package/{public-api.js → elements/properties.js} +0 -0
- /package/event/{public-api.d.ts → index.d.ts} +0 -0
- /package/event/{public-api.js → index.js} +0 -0
- /package/file/{public-api.d.ts → index.d.ts} +0 -0
- /package/file/{public-api.js → index.js} +0 -0
- /package/localization/{public-api.d.ts → index.d.ts} +0 -0
- /package/localization/{public-api.js → index.js} +0 -0
- /package/metadata/{public-api.d.ts → index.d.ts} +0 -0
- /package/metadata/{public-api.js → index.js} +0 -0
- /package/object/{public-api.d.ts → index.d.ts} +0 -0
- /package/object/{public-api.js → index.js} +0 -0
- /package/page-admin/{public-api.d.ts → index.d.ts} +0 -0
- /package/page-admin/{public-api.js → index.js} +0 -0
- /package/page-model/{public-api.d.ts → index.d.ts} +0 -0
- /package/page-model/{public-api.js → index.js} +0 -0
- /package/page-state/{public-api.d.ts → index.d.ts} +0 -0
- /package/page-state/{public-api.js → index.js} +0 -0
- /package/page-template/{public-api.d.ts → index.d.ts} +0 -0
- /package/page-template/{public-api.js → index.js} +0 -0
- /package/property/{public-api.d.ts → index.d.ts} +0 -0
- /package/property/{public-api.js → index.js} +0 -0
- /package/reference-data/{public-api.d.ts → index.d.ts} +0 -0
- /package/reference-data/{public-api.js → index.js} +0 -0
- /package/resource/{public-api.d.ts → index.d.ts} +0 -0
- /package/resource/{public-api.js → index.js} +0 -0
- /package/search/{public-api.d.ts → index.d.ts} +0 -0
- /package/search/{public-api.js → index.js} +0 -0
- /package/sheet/{public-api.d.ts → index.d.ts} +0 -0
- /package/sheet/{public-api.js → index.js} +0 -0
- /package/shell-tabs/{public-api.d.ts → index.d.ts} +0 -0
- /package/shell-tabs/{public-api.js → index.js} +0 -0
- /package/tab/{public-api.d.ts → index.d.ts} +0 -0
- /package/tab/{public-api.js → index.js} +0 -0
- /package/theme/{public-api.d.ts → index.d.ts} +0 -0
- /package/theme/{public-api.js → index.js} +0 -0
- /package/traversal/{public-api.d.ts → index.d.ts} +0 -0
- /package/traversal/{public-api.js → index.js} +0 -0
package/README.md
CHANGED
|
@@ -1,9 +1,40 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Visual Investigator API
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
A package containing TypeScript type definitions to be used with the Visual Investigator Client API.
|
|
3
|
+
The [SAS Visual Investigator](https://www.sas.com/en_us/software/intelligence-analytics-visual-investigator.html) API provides a set of components and service methods that enable developers to create customized solutions within the application.
|
|
6
4
|
|
|
7
5
|
## Getting Started
|
|
8
6
|
|
|
9
|
-
For documentation and examples please see our [Solution Extension GitHub](https://github.com/sassoftware/vi-solution-extensions)
|
|
7
|
+
For documentation and examples please see our [Solution Extension GitHub](https://github.com/sassoftware/vi-solution-extensions).
|
|
8
|
+
|
|
9
|
+
### Installation
|
|
10
|
+
To use the API, install the NPM package [@sassoftware/vi-api](https://www.npmjs.com/package/@sassoftware/vi-api):
|
|
11
|
+
```bash
|
|
12
|
+
npm install @sassoftware/vi-api
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### API
|
|
16
|
+
|
|
17
|
+
The SVI API is available through the JavaScript window object:
|
|
18
|
+
```javascript
|
|
19
|
+
window.sas.vi.metadata.getEntity("person");
|
|
20
|
+
```
|
|
21
|
+
### Typings
|
|
22
|
+
|
|
23
|
+
To complement the API, solution developers can download the API typings package.
|
|
24
|
+
Run the following command in your project:
|
|
25
|
+
```
|
|
26
|
+
npm install @sassoftware/vi-api
|
|
27
|
+
```
|
|
28
|
+
The types can be used to help with autocompletion of API spaces, methods, and expected return types.
|
|
29
|
+
```typescript
|
|
30
|
+
import { SviWindow } from "@sassoftware/vi-api";
|
|
31
|
+
import { StoredObjectDTO } from "@sassoftware/vi-api/svi-datahub";
|
|
32
|
+
|
|
33
|
+
const sviWindow = window as SviWindow;
|
|
34
|
+
sviWindow.sas.vi.metadata.getEntity("person").then((entity: StoredObjectDTO | undefined) => {
|
|
35
|
+
if (entity) {
|
|
36
|
+
console.log("Retrieved entity:", entity.label);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
```
|
|
40
|
+
|
package/alert-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 2024-05
|
|
3
|
+
// Generated using typescript-generator version 2.15.527 on 2024-04-05 10:39:48.
|
|
4
4
|
|
|
5
5
|
export interface ActionRequestRep {
|
|
6
6
|
version?: number;
|
|
@@ -106,9 +106,6 @@ export interface AlertRep extends BaseRep {
|
|
|
106
106
|
autoActivateScore?: number;
|
|
107
107
|
strategyRangeLow?: number;
|
|
108
108
|
strategyRangeHigh?: number;
|
|
109
|
-
alertVersionTimestamp?: string;
|
|
110
|
-
statusTimestamp?: string;
|
|
111
|
-
dispositionTimestamp?: string;
|
|
112
109
|
suppressionEndTimestamp?: string;
|
|
113
110
|
holdEndTimestamp?: string;
|
|
114
111
|
queueEntryTimestamp?: string;
|
|
@@ -118,6 +115,9 @@ export interface AlertRep extends BaseRep {
|
|
|
118
115
|
systemServiceTimestamp?: string;
|
|
119
116
|
autoCloseTimestamp?: string;
|
|
120
117
|
autoActivateTimestamp?: string;
|
|
118
|
+
alertVersionTimestamp?: string;
|
|
119
|
+
statusTimestamp?: string;
|
|
120
|
+
dispositionTimestamp?: string;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
export interface AlertVersionSummaryRep {
|
package/alert-reps/package.json
CHANGED
package/component/index.d.ts
CHANGED
|
@@ -16,7 +16,11 @@ export interface ComponentCreationResult<T> {
|
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Functionality related to dynamically creating SAS Visual Investigator user interface components.
|
|
19
|
-
*
|
|
19
|
+
*
|
|
20
|
+
* Accessed from the window at `window.sas.vi.component`.
|
|
21
|
+
*
|
|
22
|
+
* @example window.sas.vi.component.create(SviComponent.Page, targetElement, bindings);
|
|
23
|
+
* @category API
|
|
20
24
|
*/
|
|
21
25
|
export interface ComponentApi {
|
|
22
26
|
create(component: SviComponent.ControlCollection, target: HTMLElement, bindings?: ControlCollectionBindings): Promise<ComponentCreationResult<ControlCollectionBindings>>;
|
package/component/package.json
CHANGED
package/config/config-api.d.ts
CHANGED
|
@@ -109,7 +109,11 @@ export interface VersionSummary {
|
|
|
109
109
|
}
|
|
110
110
|
/**
|
|
111
111
|
* Configuration-related functionality.
|
|
112
|
-
*
|
|
112
|
+
*
|
|
113
|
+
* Accessed from the window at `window.sas.vi.config`.
|
|
114
|
+
*
|
|
115
|
+
* @example window.sas.vi.config.getSolutions();
|
|
116
|
+
* @category API
|
|
113
117
|
*/
|
|
114
118
|
export interface ConfigApi {
|
|
115
119
|
/**
|
package/config/package.json
CHANGED
package/control/control-api.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export interface ControlMemberApiBase<ControlTypeAttributes extends TypeAttribut
|
|
|
21
21
|
/**
|
|
22
22
|
* {@link ControlMemberApiBase} extension that provides more functionality.
|
|
23
23
|
* @extends ControlMemberApiBase
|
|
24
|
+
* @category API
|
|
24
25
|
*/
|
|
25
26
|
export interface ControlMemberApi<ControlTypeAttributes extends TypeAttributes = TypeAttributes, ControlFieldType extends FieldType = any> extends ControlMemberApiBase<ControlTypeAttributes, ControlFieldType> {
|
|
26
27
|
/**
|
|
@@ -87,6 +88,8 @@ export interface ControlApiBase<ControlTypeAttributes extends TypeAttributes = T
|
|
|
87
88
|
}
|
|
88
89
|
/**
|
|
89
90
|
* This API pertains to administration functionality for controls, for example registering resources.
|
|
91
|
+
*
|
|
92
|
+
* @category API
|
|
90
93
|
*/
|
|
91
94
|
export interface ControlAdminApi {
|
|
92
95
|
/**
|
|
@@ -100,6 +103,7 @@ export interface ControlAdminApi {
|
|
|
100
103
|
/**
|
|
101
104
|
* Extension of {@link ControlApiBase} supplied by SAS Visual Investigator to provide more functionality.
|
|
102
105
|
* @extends ControlApiBase
|
|
106
|
+
* @category API
|
|
103
107
|
*/
|
|
104
108
|
export interface ControlApi<ControlTypeAttributes extends TypeAttributes = TypeAttributes, ControlFieldType extends FieldType = never> extends ControlApiBase<ControlTypeAttributes, ControlFieldType> {
|
|
105
109
|
/**
|
|
@@ -138,6 +142,8 @@ export interface ControlApi<ControlTypeAttributes extends TypeAttributes = TypeA
|
|
|
138
142
|
}
|
|
139
143
|
/**
|
|
140
144
|
* Methods and properties related to the state of the control.
|
|
145
|
+
*
|
|
146
|
+
* @category API
|
|
141
147
|
*/
|
|
142
148
|
export interface ControlStateApi {
|
|
143
149
|
/**
|
|
@@ -197,6 +203,8 @@ export interface ControlStateApi {
|
|
|
197
203
|
}
|
|
198
204
|
/**
|
|
199
205
|
* API methods related to object fields associated with a page.
|
|
206
|
+
*
|
|
207
|
+
* @category API
|
|
200
208
|
*/
|
|
201
209
|
export interface ControlPageFieldApi {
|
|
202
210
|
/**
|
|
@@ -277,6 +285,7 @@ export interface ControlPageApiBase {
|
|
|
277
285
|
/**
|
|
278
286
|
* {@link ControlPageApiBase} extension that provides more functionality.
|
|
279
287
|
* @extends ControlPageApiBase
|
|
288
|
+
* @category API
|
|
280
289
|
*/
|
|
281
290
|
export interface ControlPageApi extends ControlPageApiBase {
|
|
282
291
|
/**
|
|
@@ -309,7 +318,8 @@ export interface ControlPageApi extends ControlPageApiBase {
|
|
|
309
318
|
isToolbarDisabled(): boolean;
|
|
310
319
|
/**
|
|
311
320
|
* Sets the toolbar control to be disabled.
|
|
312
|
-
* @param
|
|
321
|
+
* @param {string} actionName the toolbar action name.
|
|
322
|
+
* @param {boolean} setDisabled disable the toolbar item.
|
|
313
323
|
* @method
|
|
314
324
|
*/
|
|
315
325
|
setToolbarItemDisabled(actionName: string, setDisabled: boolean): void;
|
|
@@ -429,6 +439,7 @@ export interface ControlFileApiBase {
|
|
|
429
439
|
/**
|
|
430
440
|
* {@link ControlFileApiBase} extension that provides more functionality.
|
|
431
441
|
* @extends ControlFileApiBase
|
|
442
|
+
* @category API
|
|
432
443
|
*/
|
|
433
444
|
export interface ControlFileApi extends ControlFileApiBase {
|
|
434
445
|
/**
|
package/control/package.json
CHANGED
|
@@ -28,7 +28,11 @@ export interface SessionDetails {
|
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* This API is used to get the details and functionality associated with the current user.
|
|
31
|
-
*
|
|
31
|
+
*
|
|
32
|
+
* Accessed from the window at `window.sas.vi.currentUser`.
|
|
33
|
+
*
|
|
34
|
+
* @example window.sas.vi.currentUser.getSessionDetails();
|
|
35
|
+
* @category API
|
|
32
36
|
*/
|
|
33
37
|
export interface CurrentUserApi {
|
|
34
38
|
/**
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SAS Visual Investigator exposes a number of controls within the DOM as Custom Elements.
|
|
3
|
+
*
|
|
4
|
+
* See {@link SVICustomElement} for the list of available SVI Custom Elements.
|
|
5
|
+
*
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* This enumeration list contains the tag names of all SVI custom elements.
|
|
10
|
+
*
|
|
11
|
+
* @category CustomElement
|
|
12
|
+
*/
|
|
13
|
+
export declare enum SVICustomElement {
|
|
14
|
+
/**
|
|
15
|
+
* Wrap a given control in an SVI control label.
|
|
16
|
+
*
|
|
17
|
+
* By default, the label will include a {@link MaskToggleButton | mask-toggle-button}
|
|
18
|
+
* for toggling the masked state of the control's dataSource, if configured for masking.
|
|
19
|
+
*
|
|
20
|
+
* See {@link LabelledControlProperties} for supported input bindings.
|
|
21
|
+
*/
|
|
22
|
+
LabelledControl = "svi-labelled-control",
|
|
23
|
+
/**
|
|
24
|
+
* Toggle a given dataSource between it's masked and unmasked state, if configured for masking.
|
|
25
|
+
*
|
|
26
|
+
* See {@link MaskToggleButtonProperties} for supported input bindings.
|
|
27
|
+
*/
|
|
28
|
+
MaskToggleButton = "svi-mask-toggle-button"
|
|
29
|
+
}
|
|
30
|
+
export * from "./properties";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SAS Visual Investigator exposes a number of controls within the DOM as Custom Elements.
|
|
3
|
+
*
|
|
4
|
+
* See {@link SVICustomElement} for the list of available SVI Custom Elements.
|
|
5
|
+
*
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* This enumeration list contains the tag names of all SVI custom elements.
|
|
10
|
+
*
|
|
11
|
+
* @category CustomElement
|
|
12
|
+
*/
|
|
13
|
+
export var SVICustomElement;
|
|
14
|
+
(function (SVICustomElement) {
|
|
15
|
+
/**
|
|
16
|
+
* Wrap a given control in an SVI control label.
|
|
17
|
+
*
|
|
18
|
+
* By default, the label will include a {@link MaskToggleButton | mask-toggle-button}
|
|
19
|
+
* for toggling the masked state of the control's dataSource, if configured for masking.
|
|
20
|
+
*
|
|
21
|
+
* See {@link LabelledControlProperties} for supported input bindings.
|
|
22
|
+
*/
|
|
23
|
+
SVICustomElement["LabelledControl"] = "svi-labelled-control";
|
|
24
|
+
/**
|
|
25
|
+
* Toggle a given dataSource between it's masked and unmasked state, if configured for masking.
|
|
26
|
+
*
|
|
27
|
+
* See {@link MaskToggleButtonProperties} for supported input bindings.
|
|
28
|
+
*/
|
|
29
|
+
SVICustomElement["MaskToggleButton"] = "svi-mask-toggle-button";
|
|
30
|
+
})(SVICustomElement || (SVICustomElement = {}));
|
|
31
|
+
export * from "./properties";
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { PageModel } from "../page-model";
|
|
2
|
+
import { Control } from "../control";
|
|
3
|
+
/** Page Controls require a valid {@link Control | childNode} and {@link PageModel | pageModel}.</strong> */
|
|
4
|
+
export interface PageControlBindings {
|
|
5
|
+
childNode: Control;
|
|
6
|
+
pageModel: PageModel;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Properties for {@link SVICustomElement.LabelledControl}.
|
|
10
|
+
*
|
|
11
|
+
* @category CustomElement
|
|
12
|
+
*
|
|
13
|
+
* @example HTML Example:
|
|
14
|
+
* ```html
|
|
15
|
+
* <svi-labelled-control
|
|
16
|
+
* [childNode]="childNode"
|
|
17
|
+
* [pageModel]="pageModel"
|
|
18
|
+
* >
|
|
19
|
+
* <!-- my control -->
|
|
20
|
+
* </svi-labelled-control>
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @example Create the element via document.createElement:
|
|
24
|
+
* ```ts
|
|
25
|
+
* const labelledControl = document.createElement(SVICustomElement.LabelledControl);
|
|
26
|
+
* labelledControl.pageModel = this.pageModel;
|
|
27
|
+
* labelledControl.childNode = this.childNode;
|
|
28
|
+
* labelledControl.appendChild(myControlElement)
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export interface LabelledControlProperties extends PageControlBindings {
|
|
32
|
+
/** Set the label as required. */
|
|
33
|
+
isRequired?: boolean;
|
|
34
|
+
/** Set the label as disabled. */
|
|
35
|
+
isDisabled?: boolean;
|
|
36
|
+
/** Override the text displayed in the label. */
|
|
37
|
+
overrideLabel?: string;
|
|
38
|
+
/** Add css classes to the label element. */
|
|
39
|
+
labelClass?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Specify which dataSource the label's mask-toggle-button will toggle.
|
|
42
|
+
*
|
|
43
|
+
* If no {@link MaskToggleButtonProperties.dataSource | dataSource} is specified,
|
|
44
|
+
* the mask-toggle-button will toggle the dataSource(s) defined in the childNode's {@link Control.typeAttributes | typeAttributes}.
|
|
45
|
+
*/
|
|
46
|
+
dataSource?: string;
|
|
47
|
+
/** Disable the label's mask toggle button. */
|
|
48
|
+
disableMaskToggle?: boolean;
|
|
49
|
+
/** Hide the label's mask toggle button. */
|
|
50
|
+
hideMaskToggle?: boolean;
|
|
51
|
+
/** Set the label's `for` attribute. */
|
|
52
|
+
for?: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Properties for {@link SVICustomElement.MaskToggleButton}.
|
|
56
|
+
*
|
|
57
|
+
* @category CustomElement
|
|
58
|
+
*
|
|
59
|
+
* @example HTML Example
|
|
60
|
+
* ```html
|
|
61
|
+
* <svi-mask-toggle-button
|
|
62
|
+
* [childNode]="childNode"
|
|
63
|
+
* [pageModel]="pageModel"
|
|
64
|
+
* >
|
|
65
|
+
* </svi-mask-toggle-button>
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* @example Create element via document.createElement:
|
|
69
|
+
* ```ts
|
|
70
|
+
* const maskToggleBtn = document.createElement(SVICustomElement.MaskToggleButton);
|
|
71
|
+
* maskToggleBtn.pageModel = this.pageModel;
|
|
72
|
+
* maskToggleBtn.childNode = this.childNode;
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
export interface MaskToggleButtonProperties extends PageControlBindings {
|
|
76
|
+
/**
|
|
77
|
+
* Specify which dataSource will be toggled.
|
|
78
|
+
*
|
|
79
|
+
* If no {@link MaskToggleButtonProperties.dataSource | dataSource} is specified,
|
|
80
|
+
* the mask-toggle-button will toggle the dataSource(s) defined in the childNode's {@link Control.typeAttributes | typeAttributes}.
|
|
81
|
+
*/
|
|
82
|
+
dataSource?: string;
|
|
83
|
+
/** Disable the mask toggle button. */
|
|
84
|
+
disabled?: boolean;
|
|
85
|
+
/** Hide the mask toggle button. */
|
|
86
|
+
hidden?: boolean;
|
|
87
|
+
/** Override the control name displayed in the authorization dialog. */
|
|
88
|
+
controlName?: string;
|
|
89
|
+
}
|
package/event/event-api.d.ts
CHANGED
|
@@ -29,7 +29,11 @@ export interface Subscription {
|
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
31
|
* This API provides the details and functionality associated with publishing and subscribing to events.
|
|
32
|
-
*
|
|
32
|
+
*
|
|
33
|
+
* Accessed from the window at `window.sas.vi.event`.
|
|
34
|
+
*
|
|
35
|
+
* @example window.sas.vi.event.publish("eventName", payload);
|
|
36
|
+
* @category API
|
|
33
37
|
*/
|
|
34
38
|
export interface EventApi {
|
|
35
39
|
/**
|
|
@@ -43,8 +47,8 @@ export interface EventApi {
|
|
|
43
47
|
* @method
|
|
44
48
|
* @description Subscribes to an event and registers a function to be called on any future published events.
|
|
45
49
|
* If the eventName does not exist, it is created.
|
|
46
|
-
* @param
|
|
47
|
-
* @param {EventApi~subscriptionCallback}
|
|
50
|
+
* @param {string} eventName Name of the event to subscribe to.
|
|
51
|
+
* @param {EventApi~subscriptionCallback} observer Invoked when the subscription is triggered by an event.
|
|
48
52
|
* Has access to the event's payload.
|
|
49
53
|
* @returns The subscription being made to the event.
|
|
50
54
|
*/
|
package/event/package.json
CHANGED
package/file/file-api.d.ts
CHANGED
|
@@ -30,7 +30,11 @@ export interface FileOperation {
|
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* This API provides functionality related to uploading files.
|
|
33
|
-
*
|
|
33
|
+
*
|
|
34
|
+
* Accessed from the window at `window.sas.vi.file`.
|
|
35
|
+
*
|
|
36
|
+
* @example window.sas.vi.file.uploadToVIFolder(file, "fileName")
|
|
37
|
+
* @category API
|
|
34
38
|
*/
|
|
35
39
|
export interface FileApi {
|
|
36
40
|
/**
|
package/file/package.json
CHANGED
package/http/index.d.ts
CHANGED
|
@@ -7,7 +7,11 @@ export interface HttpResponse<R> {
|
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* This API provides functionality for making REST requests.
|
|
10
|
-
*
|
|
10
|
+
*
|
|
11
|
+
* Accessed from the window at `window.sas.vi.http`
|
|
12
|
+
*
|
|
13
|
+
* @example window.sas.vi.http.get("example_url", {...})
|
|
14
|
+
* @category API
|
|
11
15
|
*/
|
|
12
16
|
export interface HttpApi {
|
|
13
17
|
/**
|
package/http/package.json
CHANGED
package/index.d.ts
CHANGED
|
@@ -24,7 +24,9 @@ import { ShellTabsApi } from "./shell-tabs/shell-tabs-api";
|
|
|
24
24
|
import { PageTemplateApi } from "./page-template/page-template-api";
|
|
25
25
|
import { InitApi } from "./init";
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* The SVI API contains common API functions and can be accessed directly from the window via `window.sas.vi`
|
|
28
|
+
*
|
|
29
|
+
* @module
|
|
28
30
|
*/
|
|
29
31
|
export interface SviCommonApi {
|
|
30
32
|
component: ComponentApi;
|
package/init/index.d.ts
CHANGED
|
@@ -3,21 +3,25 @@ export declare const ERR_EXISTING_APP_DECLARED: (appName: string) => string;
|
|
|
3
3
|
export declare const ERR_EXISTING_RESOURCE_BUNDLE_DECLARED: (appName: string) => string;
|
|
4
4
|
export declare const ERR_INIT_TIMEOUT: (name: string, timeout?: number) => string;
|
|
5
5
|
/**
|
|
6
|
-
* An API to manage the asynchronous
|
|
7
|
-
*
|
|
6
|
+
* An API to manage the asynchronous initialization of solution applications before the
|
|
7
|
+
* Visual Investigator application is fully initialized.
|
|
8
|
+
*
|
|
9
|
+
* Accessed from the window at `window.sas.viInit`
|
|
10
|
+
* @example window.sas.viInit.registerResourceBundle(bundleName, resources);
|
|
11
|
+
* @category API
|
|
8
12
|
*/
|
|
9
13
|
export interface InitApi {
|
|
10
14
|
/**
|
|
11
15
|
* Declare an application.
|
|
12
|
-
* Visual Investigator will await whenReady for each before continuing its own app
|
|
13
|
-
* notifyAppReady should be called to indicate when the app
|
|
16
|
+
* Visual Investigator will await whenReady for each before continuing its own app initialization.
|
|
17
|
+
* notifyAppReady should be called to indicate when the app initialization is complete.
|
|
14
18
|
* if provided, registerResourceBundle should be called to indicate when the I18n resource bundle is ready.
|
|
15
19
|
* @param appName appName of the app configuration.
|
|
16
20
|
* @param i18nResourceBundleName I18n resource bundle name of the app configuration.
|
|
17
21
|
*/
|
|
18
22
|
declareApp(appName: string, i18nResourceBundleName?: string): void;
|
|
19
23
|
/**
|
|
20
|
-
* Notify listeners that the app has been
|
|
24
|
+
* Notify listeners that the app has been initialized.
|
|
21
25
|
* @param appName appName of the app configuration.
|
|
22
26
|
*/
|
|
23
27
|
notifyAppReady(appName: string): void;
|
|
@@ -38,8 +42,9 @@ export interface InitApi {
|
|
|
38
42
|
registerResourceBundle(bundleName: string, resources: I18nResources): void;
|
|
39
43
|
}
|
|
40
44
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
45
|
+
* Initialization events for the Visual Investigator application.
|
|
46
|
+
*
|
|
47
|
+
* These can be awaited using `window.sas.viInit.whenReady`
|
|
43
48
|
*/
|
|
44
49
|
export declare enum SviInitEvent {
|
|
45
50
|
/** all apps which were declared through window.sas.viInit */
|
package/init/index.js
CHANGED
|
@@ -3,8 +3,9 @@ export const ERR_EXISTING_APP_DECLARED = (appName) => `App: '${appName}' has alr
|
|
|
3
3
|
export const ERR_EXISTING_RESOURCE_BUNDLE_DECLARED = (appName) => `I18n resource bundle: '${appName}' has already been declared.`;
|
|
4
4
|
export const ERR_INIT_TIMEOUT = (name, timeout) => `Ready check for '${name}' timed out after ${timeout ?? APP_INIT_TIMEOUT_MS}ms.`;
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* Initialization events for the Visual Investigator application.
|
|
7
|
+
*
|
|
8
|
+
* These can be awaited using `window.sas.viInit.whenReady`
|
|
8
9
|
*/
|
|
9
10
|
export var SviInitEvent;
|
|
10
11
|
(function (SviInitEvent) {
|
package/init/package.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This API is used for the localization methods.
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
|
+
* Accessed from the window at `window.sas.vi.localization`.
|
|
5
|
+
*
|
|
6
|
+
* @example window.sas.vi.localization.getLocale();
|
|
7
|
+
* @category API
|
|
4
8
|
*/
|
|
5
9
|
export interface LocalizationApi {
|
|
6
10
|
/**
|
|
@@ -16,6 +20,13 @@ export interface LocalizationApi {
|
|
|
16
20
|
* @returns The current application locale.
|
|
17
21
|
*/
|
|
18
22
|
getLocale(): string;
|
|
23
|
+
/**
|
|
24
|
+
* @method
|
|
25
|
+
* @description Gets user's preferred locale format in BCP 47 format. This should be used
|
|
26
|
+
* to format dates\numbers in VI extensions but not to drive the language.
|
|
27
|
+
* @returns The user's preferred locale format.
|
|
28
|
+
*/
|
|
29
|
+
getFormatLocale(): string;
|
|
19
30
|
/**
|
|
20
31
|
* @method
|
|
21
32
|
* @description Gets the application display direction.
|
|
@@ -30,7 +41,11 @@ export interface LocalizationApi {
|
|
|
30
41
|
}
|
|
31
42
|
/**
|
|
32
43
|
* This API is used for solution content localization.
|
|
33
|
-
*
|
|
44
|
+
*
|
|
45
|
+
* Accessed from the window at `window.sas.vi.localization.solution`.
|
|
46
|
+
*
|
|
47
|
+
* @example window.sas.vi.metadata.getLocalizationBundle();
|
|
48
|
+
* @category API
|
|
34
49
|
*/
|
|
35
50
|
export interface SolutionLocalizationApi {
|
|
36
51
|
/**
|
|
@@ -52,7 +67,7 @@ export interface SolutionLocalizationApi {
|
|
|
52
67
|
* @returns The localized value for the given resource key, else undefined.
|
|
53
68
|
* @param resourceKey {string} A resource key used to lookup the localized value.
|
|
54
69
|
* @example
|
|
55
|
-
* getLocalizedResource("
|
|
70
|
+
* getLocalizedResource("colors.red.txt") === "rouge"
|
|
56
71
|
*/
|
|
57
72
|
getLocalizedResource(resourceKey: string): string | undefined;
|
|
58
73
|
/**
|
|
@@ -64,7 +79,7 @@ export interface SolutionLocalizationApi {
|
|
|
64
79
|
* @param resourceKey {string} A resource key used to lookup the localized value.
|
|
65
80
|
* @returns The localized string.
|
|
66
81
|
* @example
|
|
67
|
-
* localize("red", "
|
|
82
|
+
* localize("red", "colors.red.txt") === "rouge"
|
|
68
83
|
*/
|
|
69
84
|
localize(str: string, resourceKey?: string): string;
|
|
70
85
|
/**
|
|
@@ -76,7 +91,7 @@ export interface SolutionLocalizationApi {
|
|
|
76
91
|
* @param props {Record<string, string | undefined>} The properties to localize and their resource keys.
|
|
77
92
|
* @returns The localized object.
|
|
78
93
|
* @example
|
|
79
|
-
* localizeObject({ label: "red" }, { "label": "
|
|
94
|
+
* localizeObject({ label: "red" }, { "label": "colors.red.txt" }) === { label: "rouge" }
|
|
80
95
|
*/
|
|
81
96
|
localizeObject<T extends object>(obj: T, props: Record<string, string | undefined>): T;
|
|
82
97
|
/**
|
|
@@ -89,7 +104,7 @@ export interface SolutionLocalizationApi {
|
|
|
89
104
|
* @example
|
|
90
105
|
* localizeList(
|
|
91
106
|
* [{ id: "red", label: "Red" }, { id: "blue", label: "Blue"} ],
|
|
92
|
-
* (item) => ({ "label": `
|
|
107
|
+
* (item) => ({ "label": `colors.${item.id}.title` })
|
|
93
108
|
* ) === [{ id: "red", label: "Rouge" }, { id: "blue", label: "Bleu"} ]
|
|
94
109
|
*/
|
|
95
110
|
localizeList<T extends object>(list: T[], getProps: (obj: T) => Record<string, string | undefined>): T[];
|
|
@@ -98,9 +113,9 @@ export interface SolutionLocalizationApi {
|
|
|
98
113
|
* Stores localized strings by key and value.
|
|
99
114
|
* @example
|
|
100
115
|
* {
|
|
101
|
-
*
|
|
102
|
-
* "
|
|
103
|
-
* "
|
|
116
|
+
* byKey: {
|
|
117
|
+
* "colors.red.label": "rouge",
|
|
118
|
+
* "colors.blue.label": "bleu"
|
|
104
119
|
* },
|
|
105
120
|
* byValue: {
|
|
106
121
|
* "red": "rouge",
|