@sassoftware/vi-api 1.15.3 → 1.40.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/alert-reps/index.d.ts +8 -8
- package/alert-reps/package.json +1 -1
- package/api.module.js +2 -0
- package/component/bindings.d.ts +5 -1
- package/component/index.d.ts +3 -1
- package/component/index.js +1 -0
- package/config/config-api.d.ts +50 -17
- package/control/control-api.d.ts +11 -0
- package/control/data-types.d.ts +7 -6
- package/control/data-types.js +1 -1
- package/control/events.d.ts +2 -2
- package/control/restrictions.d.ts +2 -2
- package/event/event-api.d.ts +3 -0
- package/event/event-api.js +4 -0
- package/index.d.ts +4 -2
- package/localization/localization-api.d.ts +38 -24
- package/metadata/metadata-api.d.ts +2 -2
- package/object/object-api.d.ts +38 -3
- package/package.json +1 -1
- package/page-model/page-model-api.d.ts +11 -6
- package/page-template/package.json +9 -0
- package/page-template/page-template-api.d.ts +40 -0
- package/page-template/page-template-api.js +1 -0
- package/page-template/public-api.d.ts +1 -0
- package/page-template/public-api.js +1 -0
- package/property/property-api.d.ts +2 -2
- package/score-reps/index.d.ts +1 -1
- package/score-reps/package.json +1 -1
- package/search/client/client-search-api.d.ts +17 -16
- package/sheet/sheet-api.d.ts +1 -1
- package/shell-tabs/shell-tabs-api.d.ts +76 -36
- package/shell-tabs/shell-tabs-lifecycle-api.d.ts +4 -4
- package/svi-datahub/index.d.ts +71 -186
- package/svi-datahub/package.json +1 -1
- package/svi-sand/index.d.ts +4 -2
- package/svi-sand/package.json +1 -1
- package/tab/tab-api.d.ts +9 -0
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
|
|
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,18 +106,18 @@ export interface AlertRep extends BaseRep {
|
|
|
106
106
|
autoActivateScore?: number;
|
|
107
107
|
strategyRangeLow?: number;
|
|
108
108
|
strategyRangeHigh?: number;
|
|
109
|
-
|
|
109
|
+
suppressionEndTimestamp?: string;
|
|
110
|
+
holdEndTimestamp?: string;
|
|
111
|
+
queueEntryTimestamp?: string;
|
|
112
|
+
assignmentTimestamp?: string;
|
|
113
|
+
checkoutTimestamp?: string;
|
|
110
114
|
userServiceTimestamp?: string;
|
|
111
115
|
systemServiceTimestamp?: string;
|
|
112
116
|
autoCloseTimestamp?: string;
|
|
113
117
|
autoActivateTimestamp?: string;
|
|
118
|
+
alertVersionTimestamp?: string;
|
|
114
119
|
statusTimestamp?: string;
|
|
115
120
|
dispositionTimestamp?: string;
|
|
116
|
-
suppressionEndTimestamp?: string;
|
|
117
|
-
holdEndTimestamp?: string;
|
|
118
|
-
queueEntryTimestamp?: string;
|
|
119
|
-
assignmentTimestamp?: string;
|
|
120
|
-
checkoutTimestamp?: string;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
export interface AlertVersionSummaryRep {
|
|
@@ -630,8 +630,8 @@ export interface Link extends Serializable {
|
|
|
630
630
|
}
|
|
631
631
|
|
|
632
632
|
export interface TypedPayload {
|
|
633
|
-
payloadType?: string;
|
|
634
633
|
eventType?: string;
|
|
634
|
+
payloadType?: string;
|
|
635
635
|
}
|
|
636
636
|
|
|
637
637
|
export interface TrackedResource extends Serializable, ETaggable, TimeTrackedResource, ETagAndLastModifiedProvider {
|
package/alert-reps/package.json
CHANGED
package/api.module.js
CHANGED
|
@@ -27,6 +27,7 @@ import { SheetApiService } from "./sheet/sheet-api.service";
|
|
|
27
27
|
import { TabApiService } from "./tab/tab-api.service";
|
|
28
28
|
import { ThemeApiService } from "./theme/theme-api.service";
|
|
29
29
|
import { TraversalApiService } from "./traversal/traversal-api.service";
|
|
30
|
+
import { PageTemplateApiService } from "./page-template/page-template-api.service";
|
|
30
31
|
let ApiModule = class ApiModule {
|
|
31
32
|
};
|
|
32
33
|
ApiModule = __decorate([
|
|
@@ -45,6 +46,7 @@ ApiModule = __decorate([
|
|
|
45
46
|
ObjectApiService,
|
|
46
47
|
PageAdminApiService,
|
|
47
48
|
PageModelApiService,
|
|
49
|
+
PageTemplateApiService,
|
|
48
50
|
PageStateApiService,
|
|
49
51
|
PropertyApiService,
|
|
50
52
|
RefDataApiService,
|
package/component/bindings.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export interface PageBindings {
|
|
|
27
27
|
showToolbar?: boolean;
|
|
28
28
|
tempCreateId?: string;
|
|
29
29
|
containerClass?: string;
|
|
30
|
+
fitToContainerHeight?: boolean;
|
|
30
31
|
pageClass?: string;
|
|
31
32
|
enableSheets?: string;
|
|
32
33
|
pageModel?: PageModel;
|
|
@@ -37,6 +38,9 @@ export interface PageBindings {
|
|
|
37
38
|
onDirty?: (isDirty: boolean) => void;
|
|
38
39
|
onChange?: (change: PageDataChange | PageModeChange) => void;
|
|
39
40
|
}
|
|
41
|
+
export interface PagePreviewBindings {
|
|
42
|
+
templateUuid: string;
|
|
43
|
+
}
|
|
40
44
|
export interface ControlCollectionBindings {
|
|
41
45
|
controlContainer?: ControlContainer;
|
|
42
46
|
pageModel?: PageModel;
|
|
@@ -134,4 +138,4 @@ export interface TimeSliderBindings extends TimeSliderInputBindings {
|
|
|
134
138
|
onLoad?: () => void;
|
|
135
139
|
close?: () => void;
|
|
136
140
|
}
|
|
137
|
-
export
|
|
141
|
+
export type SviComponentBindings = ControlCollectionBindings | RelationshipDetailsBindings | SearchInputBindings | PageBindings | SearchAndSelectWithPreviewBindings | TimeSliderBindings;
|
package/component/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { ControlCollectionBindings, PageBindings, RelationshipDetailsBindings, SearchAndSelectWithPreviewBindings, SearchInputBindings, SviComponentBindings, TimeSliderBindings } from "./bindings";
|
|
1
|
+
import { ControlCollectionBindings, PageBindings, PagePreviewBindings, RelationshipDetailsBindings, SearchAndSelectWithPreviewBindings, SearchInputBindings, SviComponentBindings, TimeSliderBindings } from "./bindings";
|
|
2
2
|
export declare enum SviComponent {
|
|
3
3
|
ControlCollection = "svi-control-collection",
|
|
4
4
|
RelationshipDetails = "svi-relationship-details",
|
|
5
5
|
SearchInput = "svi-search-input",
|
|
6
6
|
Page = "svi-page",
|
|
7
|
+
PagePreview = "svi-page-preview",
|
|
7
8
|
SearchAndSelectWithPreview = "svi-search-and-select-with-preview",
|
|
8
9
|
TimeSlider = "svi-time-slider"
|
|
9
10
|
}
|
|
@@ -20,6 +21,7 @@ export interface ComponentCreationResult<T> {
|
|
|
20
21
|
export interface ComponentApi {
|
|
21
22
|
create(component: SviComponent.ControlCollection, target: HTMLElement, bindings?: ControlCollectionBindings): Promise<ComponentCreationResult<ControlCollectionBindings>>;
|
|
22
23
|
create(component: SviComponent.Page, target: HTMLElement, bindings?: PageBindings): Promise<ComponentCreationResult<PageBindings>>;
|
|
24
|
+
create(component: SviComponent.PagePreview, target: HTMLElement, bindings?: PagePreviewBindings): Promise<ComponentCreationResult<PagePreviewBindings>>;
|
|
23
25
|
create(component: SviComponent.RelationshipDetails, target: HTMLElement, bindings?: RelationshipDetailsBindings): Promise<ComponentCreationResult<RelationshipDetailsBindings>>;
|
|
24
26
|
create(component: SviComponent.SearchInput, target: HTMLElement, bindings?: SearchInputBindings): Promise<ComponentCreationResult<SearchInputBindings>>;
|
|
25
27
|
create(component: SviComponent.SearchAndSelectWithPreview, target: HTMLElement, bindings?: SearchAndSelectWithPreviewBindings): Promise<ComponentCreationResult<SearchAndSelectWithPreviewBindings>>;
|
package/component/index.js
CHANGED
|
@@ -5,6 +5,7 @@ export var SviComponent;
|
|
|
5
5
|
SviComponent["RelationshipDetails"] = "svi-relationship-details";
|
|
6
6
|
SviComponent["SearchInput"] = "svi-search-input";
|
|
7
7
|
SviComponent["Page"] = "svi-page";
|
|
8
|
+
SviComponent["PagePreview"] = "svi-page-preview";
|
|
8
9
|
SviComponent["SearchAndSelectWithPreview"] = "svi-search-and-select-with-preview";
|
|
9
10
|
SviComponent["TimeSlider"] = "svi-time-slider";
|
|
10
11
|
})(SviComponent || (SviComponent = {}));
|
package/config/config-api.d.ts
CHANGED
|
@@ -11,8 +11,11 @@ export interface Solution {
|
|
|
11
11
|
}
|
|
12
12
|
export interface SolutionExtension extends ControlMetadata {
|
|
13
13
|
controlAttributes?: SolutionExtensionConfigTypeAttributes;
|
|
14
|
+
/** refers to controlAttributes.metadata, populated upon registration */
|
|
14
15
|
metadata?: SolutionExtensionMetadata;
|
|
16
|
+
/** resolved displayName resource string, populated upon registration */
|
|
15
17
|
resolvedDisplayName?: string;
|
|
18
|
+
/** resolved description resource string, populated upon registration */
|
|
16
19
|
resolvedDescription?: string;
|
|
17
20
|
clientApplication?: string;
|
|
18
21
|
name: string;
|
|
@@ -44,8 +47,9 @@ export interface SolutionExtensionMetadata {
|
|
|
44
47
|
path?: string;
|
|
45
48
|
showInToolbox?: "true" | "false";
|
|
46
49
|
mainDocumentOnly?: boolean;
|
|
50
|
+
requiredServices?: RequiredResourcesExpression;
|
|
47
51
|
}
|
|
48
|
-
export
|
|
52
|
+
export type SviDocumentManager = {
|
|
49
53
|
key: string;
|
|
50
54
|
displayName: string;
|
|
51
55
|
onClick: (onFilesAdded: (files: SviLinkedFile[]) => void) => void;
|
|
@@ -88,20 +92,36 @@ export interface AppConfigBundle<T> {
|
|
|
88
92
|
solutionName?: string;
|
|
89
93
|
}
|
|
90
94
|
/**
|
|
91
|
-
*
|
|
95
|
+
* A boolean expression to specify required resources by string identifier.
|
|
96
|
+
*/
|
|
97
|
+
export type RequiredResourcesExpression = string | RequiredResourcesAndExpression | RequiredResourcesOrExpression;
|
|
98
|
+
export type RequiredResourcesOrExpression = {
|
|
99
|
+
or: RequiredResourcesExpression[];
|
|
100
|
+
and?: never;
|
|
101
|
+
};
|
|
102
|
+
export type RequiredResourcesAndExpression = {
|
|
103
|
+
and: RequiredResourcesExpression[];
|
|
104
|
+
or?: never;
|
|
105
|
+
};
|
|
106
|
+
export interface VersionSummary {
|
|
107
|
+
softwareVersionNumber: string;
|
|
108
|
+
apiVersionNumber: string;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Configuration-related functionality.
|
|
92
112
|
* Accessed from the window at window.sas.vi.config.
|
|
93
113
|
*/
|
|
94
114
|
export interface ConfigApi {
|
|
95
115
|
/**
|
|
96
116
|
* @method
|
|
97
117
|
* @description Gets the soft expansion limit of the network nodes.
|
|
98
|
-
* @returns Promise containing the soft expansion limit.
|
|
118
|
+
* @returns A Promise containing the soft expansion limit.
|
|
99
119
|
*/
|
|
100
120
|
getSoftExpansionLimit(): Promise<number>;
|
|
101
121
|
/**
|
|
102
122
|
* @method
|
|
103
123
|
* @description Gets the hard expansion limit of the network nodes.
|
|
104
|
-
* @returns Promise containing the hard expansion limit.
|
|
124
|
+
* @returns A Promise containing the hard expansion limit.
|
|
105
125
|
*/
|
|
106
126
|
getHardExpansionLimit(): Promise<number>;
|
|
107
127
|
/**
|
|
@@ -112,10 +132,10 @@ export interface ConfigApi {
|
|
|
112
132
|
getSolutions(): Map<string, Solution>;
|
|
113
133
|
/**
|
|
114
134
|
* @method
|
|
115
|
-
* @description Registers a new solution and version in the SAS Visual Investigator
|
|
135
|
+
* @description Registers a new solution and version in the SAS Visual Investigator About dialog box.
|
|
116
136
|
* If a solution with that key already exists, it will not be overwritten.
|
|
117
137
|
* @param key {string} Unique identifier for the solution.
|
|
118
|
-
* @param label {string}
|
|
138
|
+
* @param label {string} Localized name of the solution to be shown to the user.
|
|
119
139
|
* @param [version] {string} Version of the solution.
|
|
120
140
|
*/
|
|
121
141
|
registerSolution(key: string, label: string, version?: string): void;
|
|
@@ -141,28 +161,41 @@ export interface ConfigApi {
|
|
|
141
161
|
registerDocumentManager(config: SviDocumentManager): void;
|
|
142
162
|
/**
|
|
143
163
|
* @method
|
|
144
|
-
* @description Register a callback to override the default action when selecting the
|
|
145
|
-
* @param bundleName
|
|
146
|
-
* @param callback
|
|
164
|
+
* @description Register a callback to override the default action when selecting the configuration bundle in the administration application.
|
|
165
|
+
* @param bundleName {string} The name of the configuration bundle.
|
|
166
|
+
* @param callback {function(): void} A function which should open a view to
|
|
147
167
|
* allow the user to modify the given configuration bundle.
|
|
148
168
|
*/
|
|
149
169
|
registerOpenConfigurationCallback(bundleName: string, callback: () => void): void;
|
|
150
170
|
/**
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
* @param appConfigId
|
|
154
|
-
* @param bundleName The name of the configuration bundle.
|
|
171
|
+
* @method
|
|
172
|
+
* @description Send a GET request to retrieve an application configuration bundle.
|
|
173
|
+
* @param appConfigId {string} The identifier for the application configuration that the bundle belongs to.
|
|
174
|
+
* @param bundleName {string} The name of the configuration bundle.
|
|
155
175
|
*/
|
|
156
176
|
getAppConfigBundle<T extends object>(appConfigId: string, bundleName: string): Promise<AppConfigBundle<T>>;
|
|
157
177
|
/**
|
|
158
|
-
*
|
|
159
|
-
* @
|
|
160
|
-
* @
|
|
178
|
+
* @method
|
|
179
|
+
* @description Send a PUT request to save an application configuration bundle.
|
|
180
|
+
* @param bundle {AppConfigBundle} The updated application configuration bundle.
|
|
181
|
+
* @returns A Promise resolving to the saved configuration bundle.
|
|
161
182
|
*/
|
|
162
183
|
updateAppConfigBundle<T extends object>(bundle: AppConfigBundle<T>): Promise<AppConfigBundle<T>>;
|
|
163
184
|
/**
|
|
164
185
|
* @method
|
|
165
|
-
* @returns
|
|
186
|
+
* @returns A reference to the HTML element that is the default container for modal dialog boxes to be spawned within the application.
|
|
166
187
|
*/
|
|
167
188
|
getSharedDialogContainer(): HTMLElement;
|
|
189
|
+
/**
|
|
190
|
+
* @method
|
|
191
|
+
* @description Get the services which are an optional part of the SAS Visual Investigator deployment.
|
|
192
|
+
* @returns A map of service identifiers to their enabled status (true or false).
|
|
193
|
+
*/
|
|
194
|
+
getEnabledOptionalServices(): Record<string, boolean>;
|
|
195
|
+
/**
|
|
196
|
+
* @method
|
|
197
|
+
* @description Gets the current software version number and API version of the application.
|
|
198
|
+
* @returns The software version number and the installed version of the API.
|
|
199
|
+
*/
|
|
200
|
+
getCurrentVersions(): VersionSummary;
|
|
168
201
|
}
|
package/control/control-api.d.ts
CHANGED
|
@@ -307,6 +307,12 @@ export interface ControlPageApi extends ControlPageApiBase {
|
|
|
307
307
|
* @returns True, if the toolbar is disabled. Otherwise false.
|
|
308
308
|
*/
|
|
309
309
|
isToolbarDisabled(): boolean;
|
|
310
|
+
/**
|
|
311
|
+
* Sets the toolbar control to be disabled.
|
|
312
|
+
* @param control {Control} The control to be disabled.
|
|
313
|
+
* @method
|
|
314
|
+
*/
|
|
315
|
+
setToolbarItemDisabled(actionName: string, setDisabled: boolean): void;
|
|
310
316
|
/**
|
|
311
317
|
* Triggers a certain type of notification for users.
|
|
312
318
|
* For example, a type EDIT_FAIL notification if a sheet has failed to be added to a workspace.
|
|
@@ -339,6 +345,11 @@ export interface ControlPageApi extends ControlPageApiBase {
|
|
|
339
345
|
* @param [controlToRefresh] {Control} Individual control to be refreshed.
|
|
340
346
|
*/
|
|
341
347
|
reloadRefreshableControls(categoryToRefresh?: string, controlToRefresh?: Control): void;
|
|
348
|
+
/**
|
|
349
|
+
* @method
|
|
350
|
+
* @returns True if any RefreshableControls have options.requiresIndex present. Otherwise False
|
|
351
|
+
*/
|
|
352
|
+
hasAnyRefreshableControlRequiresIndex(): boolean;
|
|
342
353
|
/**
|
|
343
354
|
* Sets a page to be dirty, that is, when it has been edited and not saved.
|
|
344
355
|
* @method
|
package/control/data-types.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export type FieldType = "STRING" | "BOOLEAN" | "REFERENCEDATA" | "USER_GROUP" | "JSON" | DateDataType | NumberDataType;
|
|
2
|
+
export type NumberDataType = "SMALLINT" | "INTEGER" | "LONG" | "FLOAT" | "DOUBLE" | "NUMERIC";
|
|
3
|
+
export type DateDataType = "DATE" | "TIMESTAMP" | "TIMESTAMP_WITH_TIME_ZONE";
|
|
4
|
+
export declare const isFieldDataTypeDate: (field?: string) => boolean;
|
|
4
5
|
export interface UserGroup {
|
|
5
6
|
id: string;
|
|
6
7
|
type: "user" | "group";
|
|
7
8
|
}
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
9
|
+
export type FieldTypeToValue<Type extends FieldType> = Type extends "BOOLEAN" ? boolean : Type extends "STRING" | DateDataType | "REFERENCEDATA" ? string : Type extends NumberDataType ? number : Type extends "JSON" ? object : Type extends "USER_GROUP" ? UserGroup[] : never;
|
|
10
|
+
export type FieldValue = undefined | string | number | boolean | object | UserGroup | Date | ChildObject[] | null;
|
|
11
|
+
export type ChildObject = {
|
|
11
12
|
id?: string;
|
|
12
13
|
isNew?: boolean;
|
|
13
14
|
fieldValues: Record<string, FieldValue>;
|
package/control/data-types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const isFieldDataTypeDate = (field) => field ? ["DATE", "TIMESTAMP", "TIMESTAMP_WITH_TIME_ZONE"].includes(field) : false;
|
package/control/events.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export interface ControlConfigChange<ControlTypeAttributes extends TypeAttribute
|
|
|
28
28
|
type: "controlConfig";
|
|
29
29
|
config: TypeAttributesChange<ControlTypeAttributes> | ConfigStateChange;
|
|
30
30
|
}
|
|
31
|
-
export
|
|
31
|
+
export type TypeAttributesChange<ControlTypeAttributes extends TypeAttributes, Property extends keyof ControlTypeAttributes = keyof ControlTypeAttributes> = Property extends any ? {
|
|
32
32
|
type: "typeAttributes";
|
|
33
33
|
value: {
|
|
34
34
|
new: ControlTypeAttributes[Property];
|
|
@@ -48,7 +48,7 @@ export interface PageModelData {
|
|
|
48
48
|
[property: string]: any;
|
|
49
49
|
}
|
|
50
50
|
export declare enum ChangeType {
|
|
51
|
-
PAGE_MODE = "mode"
|
|
51
|
+
PAGE_MODE = "mode",// aligned with Mobile API
|
|
52
52
|
PAGE_DATA = "pageData"
|
|
53
53
|
}
|
|
54
54
|
export interface PageDataChange {
|
|
@@ -26,7 +26,7 @@ export interface ReferenceDataRestrictions extends FieldRestrictions {
|
|
|
26
26
|
cascadingReferenceDataFilterByCode?: string;
|
|
27
27
|
cascadingReferenceDataFilterByField?: string;
|
|
28
28
|
}
|
|
29
|
-
export
|
|
29
|
+
export type UserGroupStrategy = "USERS" | "GROUPS" | "USERS_AND_GROUPS";
|
|
30
30
|
export interface UserGroupRestrictions extends FieldRestrictions {
|
|
31
31
|
allowMultipleSelections: boolean;
|
|
32
32
|
userSelectionStrategy: UserGroupStrategy;
|
|
@@ -34,4 +34,4 @@ export interface UserGroupRestrictions extends FieldRestrictions {
|
|
|
34
34
|
export interface FileRestrictions extends RequirableRestriction {
|
|
35
35
|
allowMultipleFiles: boolean;
|
|
36
36
|
}
|
|
37
|
-
export
|
|
37
|
+
export type FieldTypeToRestrictions<Type extends FieldType> = Type extends "STRING" ? StringRestrictions : Type extends "NUMERIC" ? NumericRestrictions : Type extends "REFERENCEDATA" ? ReferenceDataRestrictions : Type extends "USER_GROUP" ? UserGroupRestrictions : FieldRestrictions;
|
package/event/event-api.d.ts
CHANGED
|
@@ -20,6 +20,9 @@ export declare enum PageEvents {
|
|
|
20
20
|
MaskToggleEvent = "spb::mask-toggle",
|
|
21
21
|
MaskAllEvent = "spb::mask-all"
|
|
22
22
|
}
|
|
23
|
+
export declare enum DocumentGeneratorEvents {
|
|
24
|
+
AfterDocumentGenerated = "docgen::after-document-generated"
|
|
25
|
+
}
|
|
23
26
|
export interface Subscription {
|
|
24
27
|
unsubscribe(): void;
|
|
25
28
|
}
|
package/event/event-api.js
CHANGED
|
@@ -21,6 +21,10 @@ export var PageEvents;
|
|
|
21
21
|
PageEvents["MaskToggleEvent"] = "spb::mask-toggle";
|
|
22
22
|
PageEvents["MaskAllEvent"] = "spb::mask-all";
|
|
23
23
|
})(PageEvents || (PageEvents = {}));
|
|
24
|
+
export var DocumentGeneratorEvents;
|
|
25
|
+
(function (DocumentGeneratorEvents) {
|
|
26
|
+
DocumentGeneratorEvents["AfterDocumentGenerated"] = "docgen::after-document-generated";
|
|
27
|
+
})(DocumentGeneratorEvents || (DocumentGeneratorEvents = {}));
|
|
24
28
|
/**
|
|
25
29
|
* Callback function executed when subscription is triggered by an event.
|
|
26
30
|
* @callback EventApi~subscriptionCallback
|
package/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ import { TabApi } from "./tab/tab-api";
|
|
|
21
21
|
import { ThemeApi } from "./theme/theme-api";
|
|
22
22
|
import { TraversalApi } from "./traversal/traversal-api";
|
|
23
23
|
import { ShellTabsApi } from "./shell-tabs/shell-tabs-api";
|
|
24
|
+
import { PageTemplateApi } from "./page-template/page-template-api";
|
|
24
25
|
import { InitApi } from "./init";
|
|
25
26
|
/**
|
|
26
27
|
* Common API Functions.
|
|
@@ -36,6 +37,7 @@ export interface SviCommonApi {
|
|
|
36
37
|
pageAdmin: PageAdminApi;
|
|
37
38
|
pageModel: PageModelApi;
|
|
38
39
|
pageState: PageStateApi;
|
|
40
|
+
pageTemplate: PageTemplateApi;
|
|
39
41
|
property: PropertyApi;
|
|
40
42
|
refData: RefDataApi;
|
|
41
43
|
/** @deprecated Use window.sas.viInit.registerResourceBundle to register resources before the rest of the Visual Investigator API is ready. */
|
|
@@ -61,8 +63,8 @@ export interface SviClientApi extends SviCommonApi {
|
|
|
61
63
|
export interface SviAdminApi extends SviCommonApi {
|
|
62
64
|
metadata: AdminMetadataApi;
|
|
63
65
|
}
|
|
64
|
-
export
|
|
65
|
-
export
|
|
66
|
+
export type SviApi = SviClientApi | SviAdminApi;
|
|
67
|
+
export type SviWindow = typeof window & {
|
|
66
68
|
sas: {
|
|
67
69
|
vi: SviApi;
|
|
68
70
|
viInit: InitApi;
|
|
@@ -24,54 +24,68 @@ export interface LocalizationApi {
|
|
|
24
24
|
*/
|
|
25
25
|
getDirection(): "ltr" | "rtl";
|
|
26
26
|
/**
|
|
27
|
-
* Methods related to
|
|
27
|
+
* Methods related to solution content localization.
|
|
28
28
|
*/
|
|
29
29
|
solution: SolutionLocalizationApi;
|
|
30
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* This API is used for solution content localization.
|
|
33
|
+
* Accessed from the window at window.sas.vi.localization.solution.
|
|
34
|
+
*/
|
|
31
35
|
export interface SolutionLocalizationApi {
|
|
32
36
|
/**
|
|
33
|
-
*
|
|
37
|
+
* @method
|
|
38
|
+
* @returns The {@link SolutionLocalizationBundle} used to lookup translations if solution localization is enabled, else undefined.
|
|
34
39
|
*/
|
|
35
40
|
getLocalizationBundle(): SolutionLocalizationBundle | undefined;
|
|
36
41
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
42
|
+
* @method
|
|
43
|
+
* @description
|
|
44
|
+
* Check that solution localization is enabled.
|
|
45
|
+
* Localization methods will return unmodified inputs if isEnabled returns false.
|
|
46
|
+
* Solution localization is not available in the administration application.
|
|
47
|
+
* @returns True if solution localization is enabled, else false.
|
|
40
48
|
*/
|
|
41
49
|
isEnabled(): boolean;
|
|
42
50
|
/**
|
|
43
|
-
*
|
|
44
|
-
* @
|
|
51
|
+
* @method
|
|
52
|
+
* @returns The localized value for the given resource key, else undefined.
|
|
53
|
+
* @param resourceKey {string} A resource key used to lookup the localized value.
|
|
54
|
+
* @example
|
|
55
|
+
* getLocalizedResource("colours.red.txt") === "rouge"
|
|
45
56
|
*/
|
|
46
57
|
getLocalizedResource(resourceKey: string): string | undefined;
|
|
47
58
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* @param
|
|
53
|
-
* @
|
|
59
|
+
* @method
|
|
60
|
+
* @description
|
|
61
|
+
* Localize a string using a resourceKey.
|
|
62
|
+
* Fallback to lookup by value if the resourceKey is not found or not supplied.
|
|
63
|
+
* @param str {string} The string to localize.
|
|
64
|
+
* @param resourceKey {string} A resource key used to lookup the localized value.
|
|
65
|
+
* @returns The localized string.
|
|
54
66
|
* @example
|
|
55
67
|
* localize("red", "colours.red.txt") === "rouge"
|
|
56
68
|
*/
|
|
57
69
|
localize(str: string, resourceKey?: string): string;
|
|
58
70
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* @param
|
|
64
|
-
* @
|
|
71
|
+
* @method
|
|
72
|
+
* @description
|
|
73
|
+
* Localize string properties of an object.
|
|
74
|
+
* Properties are provided as a map of property keys to resource keys, deep property keys are accepted.
|
|
75
|
+
* @param obj {T} The source object to localize.
|
|
76
|
+
* @param props {Record<string, string | undefined>} The properties to localize and their resource keys.
|
|
77
|
+
* @returns The localized object.
|
|
65
78
|
* @example
|
|
66
79
|
* localizeObject({ label: "red" }, { "label": "colours.red.txt" }) === { label: "rouge" }
|
|
67
80
|
*/
|
|
68
81
|
localizeObject<T extends object>(obj: T, props: Record<string, string | undefined>): T;
|
|
69
82
|
/**
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
* @param
|
|
74
|
-
* @
|
|
83
|
+
* @method
|
|
84
|
+
* @description
|
|
85
|
+
* Localize a list of objects.
|
|
86
|
+
* @param list {T[]} The objects to translate.
|
|
87
|
+
* @param getProps {function(T): Record<string, string | undefined>} A callback to return a map of properties and resource keys for the given list element.
|
|
88
|
+
* @returns The localized list.
|
|
75
89
|
* @example
|
|
76
90
|
* localizeList(
|
|
77
91
|
* [{ id: "red", label: "Red" }, { id: "blue", label: "Blue"} ],
|
|
@@ -137,7 +137,7 @@ export interface ReferenceDataItem {
|
|
|
137
137
|
displayText: string;
|
|
138
138
|
value: string | null;
|
|
139
139
|
}
|
|
140
|
-
export
|
|
140
|
+
export type Picklist = ReferenceDataItem[];
|
|
141
141
|
export interface RelationshipWithLabel extends RelationshipDTO {
|
|
142
142
|
relationshipLabel?: string;
|
|
143
143
|
}
|
|
@@ -159,7 +159,7 @@ export interface MetadataApi {
|
|
|
159
159
|
getEntityAccessRules(objectType: string): EntityAccessRules;
|
|
160
160
|
/**
|
|
161
161
|
* @method
|
|
162
|
-
* @description Gets create, read, and update access rights for the provided entities via
|
|
162
|
+
* @description Gets create, read, and update access rights for the provided entities via batch call.
|
|
163
163
|
* @param objectType {string[]} Entity name(s).
|
|
164
164
|
* @returns Object with a Promise of type EntityAccessRule[] for each rule, where EntityAccessRule maps to the access rule of a given entity name.
|
|
165
165
|
*/
|
package/object/object-api.d.ts
CHANGED
|
@@ -216,6 +216,14 @@ export interface ObjectApi {
|
|
|
216
216
|
* @return An observable that resolves to an array of validation results.
|
|
217
217
|
*/
|
|
218
218
|
validate(model: PageModel, childObject: StoredObjectMetadata): Promise<ValidationResult[]>;
|
|
219
|
+
/**
|
|
220
|
+
* @method
|
|
221
|
+
* @description Launches a wizard allowing users to create an object/relationship.
|
|
222
|
+
* The relationship wizard is determined by the relateToParentLabel or relateToParentName defined in the wizardValues parameter.
|
|
223
|
+
* @param wizardValues {CreateDialogModel} Object containing entity and relationship data.
|
|
224
|
+
* @returns A Promise which resolves when the dialog box is closed.
|
|
225
|
+
*/
|
|
226
|
+
openCreateAndLinkDialog(wizardValues: CreateDialogModel): Promise<CreateDialogModel>;
|
|
219
227
|
}
|
|
220
228
|
export interface PageData {
|
|
221
229
|
fieldValues: FieldValues;
|
|
@@ -247,8 +255,8 @@ export interface VIObject {
|
|
|
247
255
|
id: string;
|
|
248
256
|
title?: string;
|
|
249
257
|
}
|
|
250
|
-
export
|
|
251
|
-
export
|
|
258
|
+
export type LinkObject = Pick<VIObject, "id" | "objectTypeName">;
|
|
259
|
+
export type NewLinkObject = Pick<VIObject, "objectTypeName" | "fieldValues" | "fileOperations">;
|
|
252
260
|
export interface ValidationResult {
|
|
253
261
|
isValid: boolean;
|
|
254
262
|
message?: string;
|
|
@@ -260,7 +268,7 @@ export interface PageAction {
|
|
|
260
268
|
attributes: {
|
|
261
269
|
[property: string]: any;
|
|
262
270
|
displayName: string;
|
|
263
|
-
disabled:
|
|
271
|
+
disabled: boolean;
|
|
264
272
|
};
|
|
265
273
|
controlId?: number;
|
|
266
274
|
displayName: string;
|
|
@@ -520,4 +528,31 @@ export interface DisplayTextFields {
|
|
|
520
528
|
name: string;
|
|
521
529
|
displayIndex: number;
|
|
522
530
|
}
|
|
531
|
+
export interface SearchOrCreateAndLinkDialogBase<T> {
|
|
532
|
+
entityName: string;
|
|
533
|
+
entityLabel: string;
|
|
534
|
+
onClose?: (result?: T) => Promise<boolean>;
|
|
535
|
+
/**
|
|
536
|
+
* Values returned on the close of the dialog box. May be undefined when dialog box is cancelled.
|
|
537
|
+
*/
|
|
538
|
+
result?: T;
|
|
539
|
+
}
|
|
540
|
+
export interface CreateRelationshipDialogModel<T> extends SearchOrCreateAndLinkDialogBase<T> {
|
|
541
|
+
relateToParentName: string;
|
|
542
|
+
relateToParentLabel: string;
|
|
543
|
+
linkReasons?: Relationship[];
|
|
544
|
+
}
|
|
545
|
+
export interface CreateDialogModel extends CreateRelationshipDialogModel<CreateDialogResponse> {
|
|
546
|
+
}
|
|
547
|
+
export interface CreateDialogResponse {
|
|
548
|
+
relateToModel?: CreateRelateToModel;
|
|
549
|
+
}
|
|
550
|
+
export interface CreateReleationshipDialogResultModel {
|
|
551
|
+
linkReason?: Relationship;
|
|
552
|
+
}
|
|
553
|
+
export interface CreateRelateToModel extends CreateReleationshipDialogResultModel {
|
|
554
|
+
newPageModel?: {
|
|
555
|
+
model: PageModel;
|
|
556
|
+
};
|
|
557
|
+
}
|
|
523
558
|
export {};
|
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@ import { Control } from "../control/page";
|
|
|
3
3
|
import { FileOperation, SASObjectAttachedFile } from "../file/file-api";
|
|
4
4
|
import { ObjectFieldRestrictions } from "../object/object-api";
|
|
5
5
|
import { PathsRepresentation } from "../svi-sand";
|
|
6
|
+
import { TemplateFileCategoryAssociationDTO } from "../svi-datahub";
|
|
6
7
|
export declare enum PageMode {
|
|
7
8
|
Create = "create",
|
|
8
9
|
Edit = "edit",
|
|
@@ -25,7 +26,7 @@ export interface PageAction {
|
|
|
25
26
|
attributes: {
|
|
26
27
|
[property: string]: any;
|
|
27
28
|
displayName?: string;
|
|
28
|
-
disabled?:
|
|
29
|
+
disabled?: boolean;
|
|
29
30
|
};
|
|
30
31
|
controlId?: number;
|
|
31
32
|
displayName: string;
|
|
@@ -87,9 +88,13 @@ export interface PageTemplate {
|
|
|
87
88
|
}
|
|
88
89
|
export interface PageTemplateMetadata {
|
|
89
90
|
dataSources: PageTemplateMetadataDataSource[];
|
|
91
|
+
fileCategories?: TemplateFileCategoryAssociationDTO[];
|
|
90
92
|
insightsCreationEnabled: boolean;
|
|
91
93
|
insightsEnabled: boolean;
|
|
92
|
-
linkedTemplates:
|
|
94
|
+
linkedTemplates: Array<{
|
|
95
|
+
templateUuid: string;
|
|
96
|
+
traversalUuid: string;
|
|
97
|
+
}>;
|
|
93
98
|
resources: {
|
|
94
99
|
[property: string]: string;
|
|
95
100
|
};
|
|
@@ -123,8 +128,8 @@ export interface IPageEventHook<T extends IPageEventData, R extends IPageEventHo
|
|
|
123
128
|
*/
|
|
124
129
|
order?: number;
|
|
125
130
|
}
|
|
126
|
-
export
|
|
127
|
-
export
|
|
131
|
+
export type IPrePageEventHook<T extends IPageEventData> = Omit<IPageEventHook<T, IPrePageEventHookResponse>, "onFail">;
|
|
132
|
+
export type IPostPageEventHook<T extends IPageEventData> = IPageEventHook<T, IPostPageEventHookResponse>;
|
|
128
133
|
export interface IPageEventHookResponse {
|
|
129
134
|
message: string;
|
|
130
135
|
messages?: string[];
|
|
@@ -132,12 +137,12 @@ export interface IPageEventHookResponse {
|
|
|
132
137
|
export interface IPrePageEventHookResponse extends IPageEventHookResponse {
|
|
133
138
|
abort: boolean;
|
|
134
139
|
}
|
|
135
|
-
export
|
|
140
|
+
export type IPostPageEventHookResponse = IPageEventHookResponse;
|
|
136
141
|
/**
|
|
137
142
|
* A callback to unregister a page event hook.
|
|
138
143
|
* @returns true if the hook was removed, false if it was already removed.
|
|
139
144
|
*/
|
|
140
|
-
export
|
|
145
|
+
export type PageEventHookRemove = () => boolean;
|
|
141
146
|
export interface IPageEventData {
|
|
142
147
|
pageModel: PageModel;
|
|
143
148
|
}
|