@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/README.md
CHANGED
|
@@ -4,7 +4,7 @@ The [SAS Visual Investigator](https://www.sas.com/en_us/software/intelligence-an
|
|
|
4
4
|
|
|
5
5
|
## Getting Started
|
|
6
6
|
|
|
7
|
-
For documentation and examples
|
|
7
|
+
For documentation and examples, see the SAS [Solution Extension GitHub](https://github.com/sassoftware/vi-solution-extensions).
|
|
8
8
|
|
|
9
9
|
### Installation
|
|
10
10
|
To use the API, install the NPM package [@sassoftware/vi-api](https://www.npmjs.com/package/@sassoftware/vi-api):
|
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 2025-
|
|
3
|
+
// Generated using typescript-generator version 2.15.527 on 2025-09-03 08:54:51.
|
|
4
4
|
|
|
5
5
|
export interface ActionRequestRep {
|
|
6
6
|
version?: number;
|
|
@@ -17,6 +17,15 @@ export interface ActionResponseRep {
|
|
|
17
17
|
alertChanged?: boolean;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
export interface ActiveScenarioFiredEventRep extends ExtendedScenarioFiredEventRep {
|
|
21
|
+
queueId?: string;
|
|
22
|
+
assignedUserId?: string;
|
|
23
|
+
strategyId?: string;
|
|
24
|
+
actionableEntityId?: string;
|
|
25
|
+
actionableEntityType?: string;
|
|
26
|
+
actionableEntityLabel?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
20
29
|
export interface AlertConstants {
|
|
21
30
|
}
|
|
22
31
|
|
|
@@ -115,6 +124,11 @@ export interface AlertRep extends BaseRep {
|
|
|
115
124
|
autoActivateScore?: number;
|
|
116
125
|
strategyRangeLow?: number;
|
|
117
126
|
strategyRangeHigh?: number;
|
|
127
|
+
systemServiceTimestamp?: string;
|
|
128
|
+
autoCloseTimestamp?: string;
|
|
129
|
+
autoActivateTimestamp?: string;
|
|
130
|
+
alertVersionTimestamp?: string;
|
|
131
|
+
statusTimestamp?: string;
|
|
118
132
|
dispositionTimestamp?: string;
|
|
119
133
|
suppressionEndTimestamp?: string;
|
|
120
134
|
holdEndTimestamp?: string;
|
|
@@ -122,11 +136,6 @@ export interface AlertRep extends BaseRep {
|
|
|
122
136
|
assignmentTimestamp?: string;
|
|
123
137
|
checkoutTimestamp?: string;
|
|
124
138
|
userServiceTimestamp?: string;
|
|
125
|
-
systemServiceTimestamp?: string;
|
|
126
|
-
autoCloseTimestamp?: string;
|
|
127
|
-
autoActivateTimestamp?: string;
|
|
128
|
-
alertVersionTimestamp?: string;
|
|
129
|
-
statusTimestamp?: string;
|
|
130
139
|
}
|
|
131
140
|
|
|
132
141
|
export interface AlertVersionSummaryRep {
|
package/alert-reps/package.json
CHANGED
package/api.module.js
CHANGED
|
@@ -28,6 +28,8 @@ 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
30
|
import { PageTemplateApiService } from "./page-template/page-template-api.service";
|
|
31
|
+
import { PageSharedModule } from "../spb/shared/spb-shared.module";
|
|
32
|
+
import { HubCommonsModule } from "../fdh/hub-commons/hub-commons.module";
|
|
31
33
|
let ApiModule = class ApiModule {
|
|
32
34
|
};
|
|
33
35
|
ApiModule = __decorate([
|
|
@@ -56,6 +58,11 @@ ApiModule = __decorate([
|
|
|
56
58
|
TabApiService,
|
|
57
59
|
ThemeApiService,
|
|
58
60
|
TraversalApiService
|
|
61
|
+
],
|
|
62
|
+
// Import modules which bootstrap used AngularJs injectables
|
|
63
|
+
imports: [
|
|
64
|
+
PageSharedModule,
|
|
65
|
+
HubCommonsModule
|
|
59
66
|
]
|
|
60
67
|
})
|
|
61
68
|
], ApiModule);
|
package/component/bindings.d.ts
CHANGED
|
@@ -44,8 +44,8 @@ export interface CreateObjectPageBindings extends CommonPageViewerBindings {
|
|
|
44
44
|
* Optionally provide a pageModel using window.sas.vi.pageModel.createFromObject.
|
|
45
45
|
* The pageModel type must match docType.
|
|
46
46
|
* The pageModel data will be populated with initialCreateData.
|
|
47
|
-
* The pageModel can be used to inspect current data and validity
|
|
48
|
-
* but the reference to this model will be broken if a new template is
|
|
47
|
+
* The pageModel can be used to inspect current data and validity,
|
|
48
|
+
* but the reference to this model will be broken if a new template is loaded due to a mode transition or other condition.
|
|
49
49
|
* Prefer using setApi and onChange to interact with the page.
|
|
50
50
|
*/
|
|
51
51
|
pageModel?: PageModel;
|
|
@@ -65,11 +65,11 @@ export interface EditObjectPageBindings extends CommonPageViewerBindings {
|
|
|
65
65
|
templateUuid?: string;
|
|
66
66
|
/**
|
|
67
67
|
* Optionally provide a pageModel using window.sas.vi.pageModel.createFromObject.
|
|
68
|
-
* The pageModel type must match docType
|
|
69
|
-
* The
|
|
70
|
-
* The pageModel can be used to inspect current data and validity
|
|
71
|
-
* but the reference to this model will be broken if a new template is
|
|
72
|
-
* Prefer using setApi and onChange to interact with the page.
|
|
68
|
+
* The pageModel type must match `docType`.
|
|
69
|
+
* The `docType` and `docId` are used to fetch the document page, and `pageModel.data` is set using the field values from this response.
|
|
70
|
+
* The pageModel can be used to inspect current data and validity,
|
|
71
|
+
* but the reference to this model will be broken if a new template is loaded due to a mode transition or other condition.
|
|
72
|
+
* Prefer using `setApi` and `onChange` to interact with the page.
|
|
73
73
|
*/
|
|
74
74
|
pageModel?: PageModel;
|
|
75
75
|
}
|
|
@@ -96,32 +96,32 @@ export interface StaticDataPageBindings extends CommonPageViewerBindings {
|
|
|
96
96
|
staticDocumentData: VIObject;
|
|
97
97
|
}
|
|
98
98
|
export interface CommonPageViewerBindings {
|
|
99
|
-
/** Show the page toolbar. This contains the toolbar actions associated with the object's
|
|
99
|
+
/** Show the page toolbar. This contains the toolbar actions associated with the object's entity type. */
|
|
100
100
|
showToolbar?: boolean;
|
|
101
101
|
/**
|
|
102
102
|
* Assign the given CSS classes to the page viewer's container.
|
|
103
|
-
* This
|
|
103
|
+
* This element encompasses the main document view and the toolbar.
|
|
104
104
|
*/
|
|
105
105
|
containerClass?: string;
|
|
106
106
|
/** If true, the page viewer will fill its parent element's height. */
|
|
107
107
|
fitToContainerHeight?: boolean;
|
|
108
108
|
/**
|
|
109
109
|
* Assign the given CSS classes to the page viewer's main section.
|
|
110
|
-
* This
|
|
110
|
+
* This element displays the main document, excluding toolbar.
|
|
111
111
|
*/
|
|
112
112
|
pageClass?: string;
|
|
113
113
|
/**
|
|
114
|
-
* Enable workspace and insight tabs to be rendered.
|
|
114
|
+
* Enable the workspace and insight tabs to be rendered.
|
|
115
115
|
*/
|
|
116
116
|
enableSheets?: boolean;
|
|
117
117
|
/**
|
|
118
|
-
* A callback
|
|
119
|
-
* It provides an API
|
|
118
|
+
* A callback that is called when the page viewer is initialized.
|
|
119
|
+
* It provides an API that can be used to check the page viewer state and save the document.
|
|
120
120
|
*/
|
|
121
121
|
setApi?: (api: PageViewerApi) => void;
|
|
122
|
-
/** A callback
|
|
122
|
+
/** A callback that is called when the page viewer dirty state changes. */
|
|
123
123
|
onDirty?: (isDirty: boolean) => void;
|
|
124
|
-
/** A callback
|
|
124
|
+
/** A callback that is called when the pageModel's mode or data changes. */
|
|
125
125
|
onChange?: (change: PageDataChange | PageModeChange) => void;
|
|
126
126
|
}
|
|
127
127
|
/** @deprecated use {@link PageViewerBindings} */
|
|
@@ -232,6 +232,10 @@ export interface RelationshipDetailsBindings {
|
|
|
232
232
|
* @param previous - The previous relationship values, if available.
|
|
233
233
|
*/
|
|
234
234
|
onRelationshipValuesChange?: (current: Record<string, any>, previous?: Record<string, any>) => void;
|
|
235
|
+
/**
|
|
236
|
+
* Callback invoked when the related page is loading is complete.
|
|
237
|
+
*/
|
|
238
|
+
onRelatedPageLoad?: () => void;
|
|
235
239
|
}
|
|
236
240
|
export interface SearchInputInputBindings {
|
|
237
241
|
entityName: string;
|
|
@@ -306,3 +310,10 @@ export interface TimeSliderBindings extends TimeSliderInputBindings {
|
|
|
306
310
|
close?: () => void;
|
|
307
311
|
}
|
|
308
312
|
export type SviComponentBindings = ControlCollectionBindings | RelationshipDetailsBindings | SearchInputBindings | PageViewerBindings | PagePreviewBindings | SearchAndSelectWithPreviewBindings | TimeSliderBindings;
|
|
313
|
+
/**
|
|
314
|
+
* Merges provided bindings with default bindings. If both are functions, wraps them so both are called.
|
|
315
|
+
* @param provided The provided bindings.
|
|
316
|
+
* @param defaults The default bindings.
|
|
317
|
+
* @returns The merged bindings object.
|
|
318
|
+
*/
|
|
319
|
+
export declare function mergeBindings<T extends object>(provided?: T, defaults?: Partial<T>): T;
|
package/component/bindings.js
CHANGED
|
@@ -5,3 +5,26 @@ export var PageViewerBindingsType;
|
|
|
5
5
|
PageViewerBindingsType["ViewObject"] = "VIEW";
|
|
6
6
|
PageViewerBindingsType["StaticData"] = "STATIC";
|
|
7
7
|
})(PageViewerBindingsType || (PageViewerBindingsType = {}));
|
|
8
|
+
/**
|
|
9
|
+
* Merges provided bindings with default bindings. If both are functions, wraps them so both are called.
|
|
10
|
+
* @param provided The provided bindings.
|
|
11
|
+
* @param defaults The default bindings.
|
|
12
|
+
* @returns The merged bindings object.
|
|
13
|
+
*/
|
|
14
|
+
export function mergeBindings(provided = {}, defaults = {}) {
|
|
15
|
+
const merged = { ...provided };
|
|
16
|
+
Object.entries(defaults || {}).forEach(([name, defaultBinding]) => {
|
|
17
|
+
// Use index signature to avoid 'any' and 'Function' types
|
|
18
|
+
const providedValue = merged[name];
|
|
19
|
+
if (typeof defaultBinding === "function" && typeof providedValue === "function") {
|
|
20
|
+
merged[name] = (...args) => {
|
|
21
|
+
defaultBinding(...args);
|
|
22
|
+
return providedValue(...args);
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
else if (providedValue === undefined) {
|
|
26
|
+
merged[name] = defaultBinding;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return merged;
|
|
30
|
+
}
|
package/config/config-api.d.ts
CHANGED
|
@@ -172,7 +172,7 @@ export interface ConfigApi {
|
|
|
172
172
|
* @method
|
|
173
173
|
* @description Register a callback to override the default action when selecting the configuration bundle in the administration application.
|
|
174
174
|
* @param bundleName {string} The name of the configuration bundle.
|
|
175
|
-
* @param callback {function(): void} A function
|
|
175
|
+
* @param callback {function(): void} A function that should open a view to
|
|
176
176
|
* allow the user to modify the given configuration bundle.
|
|
177
177
|
*/
|
|
178
178
|
registerOpenConfigurationCallback(bundleName: string, callback: () => void): void;
|
|
@@ -197,7 +197,7 @@ export interface ConfigApi {
|
|
|
197
197
|
getSharedDialogContainer(): HTMLElement;
|
|
198
198
|
/**
|
|
199
199
|
* @method
|
|
200
|
-
* @description Get the services
|
|
200
|
+
* @description Get the services that are an optional part of the SAS Visual Investigator deployment.
|
|
201
201
|
* @returns A map of service identifiers to their enabled status (true or false).
|
|
202
202
|
*/
|
|
203
203
|
getEnabledOptionalServices(): Record<string, boolean>;
|
|
@@ -28,6 +28,7 @@ export interface IBaseControlAttribute {
|
|
|
28
28
|
displayName: ResourcedString;
|
|
29
29
|
order?: number;
|
|
30
30
|
required?: boolean | string;
|
|
31
|
+
requiredExpression?: string;
|
|
31
32
|
description?: ResourcedString;
|
|
32
33
|
localizable?: boolean | string;
|
|
33
34
|
defaultValue?: any;
|
|
@@ -37,6 +38,7 @@ export interface IBaseControlAttribute {
|
|
|
37
38
|
hideOnDisable?: boolean;
|
|
38
39
|
cssClass?: string;
|
|
39
40
|
triggerResizeOnChange?: boolean;
|
|
41
|
+
featureFlagId?: string;
|
|
40
42
|
}
|
|
41
43
|
type BaseControlAttribute = Omit<IBaseControlAttribute, "type">;
|
|
42
44
|
export interface IGenericControlAttribute extends BaseControlAttribute {
|
|
@@ -142,6 +144,7 @@ export interface IControlAttributeRelationshipSummary extends Omit<BaseControlAt
|
|
|
142
144
|
export interface IControlAttributeTextInput extends BaseControlAttribute {
|
|
143
145
|
type: StandardPropertyTypes.TextInput | `${StandardPropertyTypes.TextInput}`;
|
|
144
146
|
defaultValue?: ResourcedString | string;
|
|
147
|
+
multiLine?: boolean;
|
|
145
148
|
}
|
|
146
149
|
export interface IControlAttributeInterpolatedTextInput extends Omit<IControlAttributeTextInput, "type"> {
|
|
147
150
|
type: StandardPropertyTypes.InterpolatedTextInput | `${StandardPropertyTypes.InterpolatedTextInput}`;
|
|
@@ -44,6 +44,8 @@ export declare enum StandardPropertyTypes {
|
|
|
44
44
|
UserGroupChooser = "UserGroupChooser",
|
|
45
45
|
TileProviderChooser = "TileProviderChooser",
|
|
46
46
|
StatusThresholdPicker = "StatusThresholdPicker",
|
|
47
|
+
NetworkNodeSelector = "NetworkNodeSelector",
|
|
48
|
+
NetworkLinkSelector = "NetworkLinkSelector",
|
|
47
49
|
Hidden = "Hidden",
|
|
48
50
|
Disabled = "Disabled",
|
|
49
51
|
Condition = "Condition"
|
|
@@ -46,6 +46,8 @@ export var StandardPropertyTypes;
|
|
|
46
46
|
StandardPropertyTypes["UserGroupChooser"] = "UserGroupChooser";
|
|
47
47
|
StandardPropertyTypes["TileProviderChooser"] = "TileProviderChooser";
|
|
48
48
|
StandardPropertyTypes["StatusThresholdPicker"] = "StatusThresholdPicker";
|
|
49
|
+
StandardPropertyTypes["NetworkNodeSelector"] = "NetworkNodeSelector";
|
|
50
|
+
StandardPropertyTypes["NetworkLinkSelector"] = "NetworkLinkSelector";
|
|
49
51
|
StandardPropertyTypes["Hidden"] = "Hidden";
|
|
50
52
|
StandardPropertyTypes["Disabled"] = "Disabled";
|
|
51
53
|
StandardPropertyTypes["Condition"] = "Condition";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FieldType, NumberDataType } from "./data-types";
|
|
2
|
+
interface BaseFieldProperties {
|
|
3
|
+
type: string;
|
|
4
|
+
}
|
|
5
|
+
export interface NumberFieldProperties extends BaseFieldProperties {
|
|
6
|
+
type: "numberField";
|
|
7
|
+
disableThousandsSeparator?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export type ClientFieldProperties = NumberFieldProperties | undefined;
|
|
10
|
+
export type FieldTypeToClientFieldProperties<Type extends FieldType> = Type extends NumberDataType ? NumberFieldProperties : ClientFieldProperties;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/control/control-api.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { PageEventsApiBase, PageMode, PageModel } from "../page-model/page-model
|
|
|
3
3
|
import { FieldType, FieldTypeToValue } from "./data-types";
|
|
4
4
|
import { PageDataChange, PageModeChange, StateChange } from "./events";
|
|
5
5
|
import { Control, RefreshablePageControlOptions, SlidingPanelContent, SlidingPanelProperties, TypeAttributes } from "./page";
|
|
6
|
+
import { FieldTypeToClientFieldProperties } from "./client-field-properties";
|
|
6
7
|
import { FieldTypeToRestrictions, FileRestrictions } from "./restrictions";
|
|
7
8
|
import { AttachmentFormData } from "./file";
|
|
8
9
|
import { MaskingControlApi, MaskingPageApi } from "./masking-api";
|
|
@@ -39,7 +40,7 @@ export interface ControlMemberApi<ControlTypeAttributes extends TypeAttributes =
|
|
|
39
40
|
readonly admin: ControlAdminApi;
|
|
40
41
|
}
|
|
41
42
|
/**
|
|
42
|
-
* This Control API
|
|
43
|
+
* This Control API relates to functionality that checks the state, registers event handlers, and so on.
|
|
43
44
|
*/
|
|
44
45
|
export interface ControlApiBase<ControlTypeAttributes extends TypeAttributes = TypeAttributes, ControlFieldType extends FieldType = never> {
|
|
45
46
|
/**
|
|
@@ -50,12 +51,13 @@ export interface ControlApiBase<ControlTypeAttributes extends TypeAttributes = T
|
|
|
50
51
|
readonly type: string;
|
|
51
52
|
/**
|
|
52
53
|
* Control Mask
|
|
53
|
-
* @deprecated
|
|
54
|
-
|
|
54
|
+
* @deprecated Use `api.control.masking.isConfiguredForMasking` instead.
|
|
55
|
+
*/
|
|
55
56
|
isMaskedControl(): boolean;
|
|
56
|
-
/**
|
|
57
|
-
*
|
|
58
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Control Mask Authorization
|
|
59
|
+
* @deprecated Use `api.control.masking.isAuthorizedToUnmask` instead.
|
|
60
|
+
*/
|
|
59
61
|
isAuthorizedToUnmask(): boolean;
|
|
60
62
|
/**
|
|
61
63
|
* Sets the value of the control's field.
|
|
@@ -71,6 +73,20 @@ export interface ControlApiBase<ControlTypeAttributes extends TypeAttributes = T
|
|
|
71
73
|
* @returns The value of the control's field.
|
|
72
74
|
*/
|
|
73
75
|
getFieldValue(): FieldTypeToValue<ControlFieldType>;
|
|
76
|
+
/**
|
|
77
|
+
* Returns the formatted value of the control's field.
|
|
78
|
+
* Field must be configured as dataSource in the control's typeAttributes.
|
|
79
|
+
* @method
|
|
80
|
+
* @returns A promise that resolves to the formatted field value, or undefined if the field is not found.
|
|
81
|
+
*/
|
|
82
|
+
getFormattedDisplayValue(): Promise<string | undefined>;
|
|
83
|
+
/**
|
|
84
|
+
* Returns the client field properties that are associated with the calling control.
|
|
85
|
+
* Field must be configured as dataSource in the control's typeAttributes.
|
|
86
|
+
* @method
|
|
87
|
+
* @returns The client field properties that should be applied.
|
|
88
|
+
*/
|
|
89
|
+
getClientFieldProperties(): FieldTypeToClientFieldProperties<ControlFieldType> | undefined;
|
|
74
90
|
/**
|
|
75
91
|
* Returns the field restrictions that are associated with the calling control.
|
|
76
92
|
* Field must be configured as dataSource in the control's typeAttributes.
|
|
@@ -92,12 +108,12 @@ export interface ControlApiBase<ControlTypeAttributes extends TypeAttributes = T
|
|
|
92
108
|
*/
|
|
93
109
|
getControl(): Control<ControlTypeAttributes>;
|
|
94
110
|
/**
|
|
95
|
-
* Access the Control Data Masking API
|
|
111
|
+
* Access the Control Data Masking API.
|
|
96
112
|
*/
|
|
97
113
|
masking: MaskingControlApi;
|
|
98
114
|
}
|
|
99
115
|
/**
|
|
100
|
-
* This API
|
|
116
|
+
* This API relates to administration functionality for controls, for example registering resources.
|
|
101
117
|
*
|
|
102
118
|
* @category API
|
|
103
119
|
*/
|
|
@@ -194,7 +210,7 @@ export interface ControlStateApi {
|
|
|
194
210
|
/**
|
|
195
211
|
* Returns the masked state of the calling control.
|
|
196
212
|
* True if the control is masked, otherwise false.
|
|
197
|
-
* @deprecated
|
|
213
|
+
* @deprecated Use `api.control.masking.isMasked` instead.
|
|
198
214
|
*/
|
|
199
215
|
readonly maskActive: boolean;
|
|
200
216
|
/**
|
|
@@ -218,6 +234,11 @@ export interface ControlStateApi {
|
|
|
218
234
|
* @method
|
|
219
235
|
*/
|
|
220
236
|
update(): void;
|
|
237
|
+
/**
|
|
238
|
+
* Cleans up any resources held by the ControlStateApi instance.
|
|
239
|
+
* @ignore
|
|
240
|
+
*/
|
|
241
|
+
destroy(): void;
|
|
221
242
|
}
|
|
222
243
|
/**
|
|
223
244
|
* API methods related to object fields associated with a page.
|
|
@@ -243,6 +264,22 @@ export interface ControlPageFieldApi {
|
|
|
243
264
|
* @param field {string} Field name.
|
|
244
265
|
*/
|
|
245
266
|
getFieldValue<Type extends FieldType>(field: string): FieldTypeToValue<Type>;
|
|
267
|
+
/**
|
|
268
|
+
* Returns the formatted value of the supplied field.
|
|
269
|
+
* This works only with fields for the current object with which the control is associated.
|
|
270
|
+
* @method
|
|
271
|
+
* @param field {string} Field name.
|
|
272
|
+
* @returns A promise that resolves to the formatted field value, or undefined if the field is not found.
|
|
273
|
+
*/
|
|
274
|
+
getFormattedDisplayValue(field: string): Promise<string | undefined>;
|
|
275
|
+
/**
|
|
276
|
+
* Returns the client field properties that are associated with the calling control.
|
|
277
|
+
* @method
|
|
278
|
+
* @template {FieldType} Field type.
|
|
279
|
+
* @param field {string} Field name to get client field properties for.
|
|
280
|
+
* @returns Configured client field properties.
|
|
281
|
+
*/
|
|
282
|
+
getClientFieldProperties<Type extends FieldType>(field: string): FieldTypeToClientFieldProperties<Type> | undefined;
|
|
246
283
|
/**
|
|
247
284
|
* Returns the field restrictions that are associated with the calling control.
|
|
248
285
|
* @method
|
|
@@ -262,11 +299,11 @@ export interface ControlPageApiBase {
|
|
|
262
299
|
*/
|
|
263
300
|
readonly file: ControlFileApiBase;
|
|
264
301
|
/**
|
|
265
|
-
* The object ID
|
|
302
|
+
* The object ID. Returns an empty string ("") if not applicable.
|
|
266
303
|
*/
|
|
267
304
|
readonly objectId: string;
|
|
268
305
|
/**
|
|
269
|
-
* The object name
|
|
306
|
+
* The object name. Returns an empty string ("") if not applicable.
|
|
270
307
|
*/
|
|
271
308
|
readonly objectName: string;
|
|
272
309
|
/**
|
|
@@ -375,7 +412,7 @@ export interface ControlPageApi extends ControlPageApiBase {
|
|
|
375
412
|
reloadRefreshableControls(categoryToRefresh?: string, controlToRefresh?: Control): void;
|
|
376
413
|
/**
|
|
377
414
|
* @method
|
|
378
|
-
* @returns True if any RefreshableControls have options.requiresIndex present. Otherwise
|
|
415
|
+
* @returns True if any RefreshableControls have options.requiresIndex present. Otherwise, false.
|
|
379
416
|
*/
|
|
380
417
|
hasAnyRefreshableControlRequiresIndex(): boolean;
|
|
381
418
|
/**
|
|
@@ -392,10 +429,10 @@ export interface ControlPageApi extends ControlPageApiBase {
|
|
|
392
429
|
* Toggle the page-level sliding panel. This panel should be used to contain information that is
|
|
393
430
|
* supplementary to the document, for example attachments or workflow tasks.
|
|
394
431
|
* @method
|
|
395
|
-
* @param [sectionLabel] {string} Describes the section
|
|
432
|
+
* @param [sectionLabel] {string} Describes the section; this should be internationalized.
|
|
396
433
|
* @param [content] {SlidingPanelContent} The content of the sliding panel.
|
|
397
434
|
* @param [panelProperties] {SlidingPanelProperties} Properties for the panel.
|
|
398
|
-
* When providing a
|
|
435
|
+
* When providing a URL for content: the panel properties will be available on the controller's "slidingPanel" object.
|
|
399
436
|
* When providing a selector for content: the properties will be set on the element to be created.
|
|
400
437
|
* @param [onClose] {function} A callback function invoked when the panel is dismissed. There are no parameters. Returns void.
|
|
401
438
|
* @param [focusPreviousActiveElementOnClose] {boolean} Toggle for whether the app should apply focus to the last active element before the panel was opened.
|
|
@@ -404,15 +441,15 @@ export interface ControlPageApi extends ControlPageApiBase {
|
|
|
404
441
|
/**
|
|
405
442
|
* Checks if a page is in edit mode.
|
|
406
443
|
* @method
|
|
407
|
-
* @returns A boolean value that checks
|
|
444
|
+
* @returns A boolean value that checks if a page is in edit mode. Undefined if there is no page model.
|
|
408
445
|
*/
|
|
409
446
|
isInEditMode(): boolean | undefined;
|
|
410
447
|
/**
|
|
411
448
|
* Takes a page out of edit mode. Promise resolves with a boolean value to determine if the user has saved or not.
|
|
412
449
|
* If the user has not saved, the user is prompted to do so.
|
|
413
450
|
* @method
|
|
414
|
-
* @param closeTab {boolean} Checks if the tab should close after edit mode is
|
|
415
|
-
* @returns A Promise that resolves when the edit has been
|
|
451
|
+
* @param closeTab {boolean} Checks if the tab should close after edit mode is canceled.
|
|
452
|
+
* @returns A Promise that resolves when the edit has been canceled.
|
|
416
453
|
*/
|
|
417
454
|
cancelEdit(closeTab: boolean): Promise<{
|
|
418
455
|
userSaved: boolean;
|
|
@@ -439,16 +476,22 @@ export interface ControlPageApi extends ControlPageApiBase {
|
|
|
439
476
|
* @method
|
|
440
477
|
* @param stopEditing {boolean} Checks if the page should leave edit mode after it is saved.
|
|
441
478
|
* @param closeObject {boolean} Checks if the page should be closed after it is saved.
|
|
442
|
-
* @returns A Promise
|
|
479
|
+
* @returns A Promise that resolves when the page has been saved.
|
|
443
480
|
*/
|
|
444
481
|
save(stopEditing: boolean, closeObject: boolean): Promise<void>;
|
|
445
482
|
/**
|
|
446
|
-
* Access the Page Data Masking API
|
|
483
|
+
* Access the Page Data Masking API.
|
|
447
484
|
*/
|
|
448
485
|
masking: MaskingPageApi;
|
|
486
|
+
/**
|
|
487
|
+
* Register a callback function that is invoked when the page that contains the current control is navigated back to.
|
|
488
|
+
* Useful for updating homepage controls whose config sets "reuse" to true and need to update when the homepage is reloaded.
|
|
489
|
+
* @method
|
|
490
|
+
* @param callback {function} The function to be invoked.
|
|
491
|
+
*/
|
|
449
492
|
onNavigationStart(callback: () => void): void;
|
|
450
493
|
/**
|
|
451
|
-
* Checks if the sliding panel is pinned
|
|
494
|
+
* Checks if the sliding panel is pinned.
|
|
452
495
|
* @returns A boolean value that checks whether the sliding panel is pinned.
|
|
453
496
|
*/
|
|
454
497
|
isSlidingPanelPinned(): boolean | undefined;
|
|
@@ -476,7 +519,7 @@ export interface ControlFileApi extends ControlFileApiBase {
|
|
|
476
519
|
*
|
|
477
520
|
* @method
|
|
478
521
|
* @param {IAttachmentFormData} options Additional options to pass to the file upload dialog box.
|
|
479
|
-
* @returns {Promise<SASObjectAttachedFile[]>} Promise
|
|
522
|
+
* @returns {Promise<SASObjectAttachedFile[]>} Promise that resolves to an array of uploaded files.
|
|
480
523
|
*/
|
|
481
524
|
openFileUploadDialog(options: AttachmentFormData): Promise<SASObjectAttachedFile[]>;
|
|
482
525
|
/**
|
|
@@ -485,7 +528,7 @@ export interface ControlFileApi extends ControlFileApiBase {
|
|
|
485
528
|
* @method
|
|
486
529
|
* @param {boolean} allowMultiple Determines if multiple files can be uploaded at once.
|
|
487
530
|
* @param {number} [maxSize=] Maximum size of the image to be uploaded, in bytes.
|
|
488
|
-
* @returns {Promise<SASObjectAttachedFile[]>} A Promise
|
|
531
|
+
* @returns {Promise<SASObjectAttachedFile[]>} A Promise that resolves to an array of uploaded files.
|
|
489
532
|
*/
|
|
490
533
|
openImageUploadDialog(allowMultiple: boolean, maxSize?: number): Promise<SASObjectAttachedFile[]>;
|
|
491
534
|
/**
|
|
@@ -493,7 +536,7 @@ export interface ControlFileApi extends ControlFileApiBase {
|
|
|
493
536
|
*
|
|
494
537
|
* @method
|
|
495
538
|
* @param {string} [category=] An optional file category to filter by.
|
|
496
|
-
* @returns {Promise<SASObjectAttachedFile[]>} A Promise
|
|
539
|
+
* @returns {Promise<SASObjectAttachedFile[]>} A Promise that resolves to an array of files.
|
|
497
540
|
*/
|
|
498
541
|
getFiles(category?: string): Promise<SASObjectAttachedFile[]>;
|
|
499
542
|
/**
|
|
@@ -533,8 +576,7 @@ export interface ControlFileApi extends ControlFileApiBase {
|
|
|
533
576
|
* Equivalent to {@link PageEventsApiBase} with the exception that event hooks will be scoped to the page on which the calling control resides.
|
|
534
577
|
* @extends PageEventsApiBase
|
|
535
578
|
*/
|
|
536
|
-
export
|
|
537
|
-
}
|
|
579
|
+
export type ControlPageEventsApi = PageEventsApiBase;
|
|
538
580
|
export interface FieldNotOnPageError {
|
|
539
581
|
name: "FieldNotOnPageError";
|
|
540
582
|
message: string;
|
package/control/events.d.ts
CHANGED
package/control/file.d.ts
CHANGED
|
@@ -1,14 +1,27 @@
|
|
|
1
|
+
import { Control } from ".";
|
|
2
|
+
import { PageModel } from "../page-model/page-model-api";
|
|
1
3
|
export interface AttachmentFormData {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use AttachmentDialogOptions.dialogTitle instead.
|
|
6
|
+
*/
|
|
7
|
+
title?: string;
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use AttachmentDialogOptions.filesLabel instead.
|
|
10
|
+
*/
|
|
11
|
+
label?: string;
|
|
12
|
+
options?: AttachmentDialogOptions;
|
|
13
|
+
pageModel?: PageModel | {
|
|
14
|
+
id: string;
|
|
7
15
|
type: string;
|
|
8
16
|
};
|
|
17
|
+
childNode?: Control;
|
|
9
18
|
}
|
|
10
19
|
export interface AttachmentDialogOptions {
|
|
11
20
|
maxSize?: number;
|
|
12
21
|
allowMultiple?: boolean;
|
|
22
|
+
allowInput?: boolean;
|
|
13
23
|
fileExtensions?: string;
|
|
24
|
+
filesLabel?: string;
|
|
25
|
+
addFilesLabel?: string;
|
|
26
|
+
dialogTitle?: string;
|
|
14
27
|
}
|
package/control/index.d.ts
CHANGED
package/control/index.js
CHANGED
package/control/masking-api.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ export interface MaskingPageApi {
|
|
|
73
73
|
/**
|
|
74
74
|
* Invokes the callback whenever any field value is masked.
|
|
75
75
|
* When an individual field is masked via a mask call, the callback will be invoked once.
|
|
76
|
-
* When multiple fields are masked via a single mask/mask all call, the callback will
|
|
76
|
+
* When multiple fields are masked via a single mask/mask all call, the callback will be invoked once.
|
|
77
77
|
* @param callback The callback function.
|
|
78
78
|
* @returns A function that removes the callback.
|
|
79
79
|
*/
|
|
@@ -91,7 +91,7 @@ export interface MaskingPageApi {
|
|
|
91
91
|
/**
|
|
92
92
|
* Invokes the callback whenever any field value is unmasked.
|
|
93
93
|
* When an individual field is unmasked via an unmask call, the callback will be invoked once.
|
|
94
|
-
* When multiple fields are unmasked via a single unmask/unmask all call, the callback will
|
|
94
|
+
* When multiple fields are unmasked via a single unmask/unmask all call, the callback will be invoked once.
|
|
95
95
|
* @param callback The callback function.
|
|
96
96
|
* @returns A function that removes the callback.
|
|
97
97
|
*/
|
package/event/event-api.d.ts
CHANGED
|
@@ -20,7 +20,8 @@ export declare enum PageEvents {
|
|
|
20
20
|
MaskEvent = "spb::mask",
|
|
21
21
|
UnmaskEvent = "spb::unmask",
|
|
22
22
|
MaskResetEvent = "spb::mask-reset",
|
|
23
|
-
ClearDateFieldEvent = "spb::clear-date-field"
|
|
23
|
+
ClearDateFieldEvent = "spb::clear-date-field",
|
|
24
|
+
BroadcastControlEvent = "spb::broadcast-control-change"
|
|
24
25
|
}
|
|
25
26
|
export declare enum DocumentGeneratorEvents {
|
|
26
27
|
AfterDocumentGenerated = "docgen::after-document-generated"
|
package/event/event-api.js
CHANGED
|
@@ -22,6 +22,7 @@ export var PageEvents;
|
|
|
22
22
|
PageEvents["UnmaskEvent"] = "spb::unmask";
|
|
23
23
|
PageEvents["MaskResetEvent"] = "spb::mask-reset";
|
|
24
24
|
PageEvents["ClearDateFieldEvent"] = "spb::clear-date-field";
|
|
25
|
+
PageEvents["BroadcastControlEvent"] = "spb::broadcast-control-change";
|
|
25
26
|
})(PageEvents || (PageEvents = {}));
|
|
26
27
|
export var DocumentGeneratorEvents;
|
|
27
28
|
(function (DocumentGeneratorEvents) {
|
package/file/file-api.d.ts
CHANGED
package/object/object-api.d.ts
CHANGED
|
@@ -86,7 +86,7 @@ export interface ObjectApi {
|
|
|
86
86
|
* @param objectTypeVersion {number} Object type version.
|
|
87
87
|
* @param fieldValues {FieldValues} Field values of the object.
|
|
88
88
|
* @param [options] {UpdateObjectOptions} Optional extra parameters.
|
|
89
|
-
* @return A Promise that resolves to the updated object when the object
|
|
89
|
+
* @return A Promise that resolves to the updated object when the object been successfully updated.
|
|
90
90
|
*/
|
|
91
91
|
updateObject(objectType: string, objectId: string, objectTypeId: number, objectTypeVersion: number, fieldValues: FieldValues, options?: UpdateObjectOptions): Promise<VIObject>;
|
|
92
92
|
/**
|
|
@@ -100,7 +100,7 @@ export interface ObjectApi {
|
|
|
100
100
|
* @param newFieldValues {FieldValues} Field values after the object was edited
|
|
101
101
|
* @param objectVersion {number} Object Version
|
|
102
102
|
* @param [options] {UpdateObjectOptions} Optional extra parameters.
|
|
103
|
-
* @return A Promise that resolves to the updated object when the object has successfully
|
|
103
|
+
* @return A Promise that resolves to the updated object when the object has been successfully updated.
|
|
104
104
|
*/
|
|
105
105
|
patchObject(objectType: string, objectId: string, objectTypeId: number, objectTypeVersion: number, originalFieldValues: FieldValues, newFieldValues: FieldValues, objectVersion: number, options?: UpdateObjectOptions): Promise<VIObject>;
|
|
106
106
|
/**
|
|
@@ -227,7 +227,7 @@ export interface ObjectApi {
|
|
|
227
227
|
* @description Launches a wizard allowing users to create an object/relationship.
|
|
228
228
|
* The relationship wizard is determined by the relateToParentLabel or relateToParentName defined in the wizardValues parameter.
|
|
229
229
|
* @param wizardValues {CreateDialogModel} Object containing entity and relationship data.
|
|
230
|
-
* @returns A Promise
|
|
230
|
+
* @returns A Promise that resolves when the dialog box is closed.
|
|
231
231
|
*/
|
|
232
232
|
openCreateAndLinkDialog(wizardValues: CreateDialogModel): Promise<CreateDialogModel>;
|
|
233
233
|
}
|