@sassoftware/vi-api 1.40.4 → 1.44.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 +16 -3
- 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 +23 -3
- package/config/config-api.js +10 -0
- package/config/package.json +2 -2
- package/control/control-api.d.ts +40 -8
- package/control/events.d.ts +1 -1
- package/control/masking-api.d.ts +187 -0
- package/control/masking-api.js +3 -0
- package/control/package.json +2 -2
- package/control/restrictions.d.ts +7 -1
- package/current-user/currentUser-api.d.ts +7 -2
- package/current-user/package.json +2 -2
- package/elements/bindings.d.ts +25 -0
- package/elements/identity-select.d.ts +274 -0
- package/elements/identity-select.js +24 -0
- package/elements/index.d.ts +49 -0
- package/elements/index.js +50 -0
- package/elements/labelled-control.d.ts +47 -0
- package/elements/labelled-control.js +1 -0
- package/elements/mask-toggle-button.d.ts +37 -0
- package/elements/mask-toggle-button.js +1 -0
- package/elements/package.json +9 -0
- package/event/event-api.d.ts +10 -5
- package/event/event-api.js +3 -2
- 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 +15 -9
- 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 +7 -6
- package/page-model/page-model-api.js +10 -0
- 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 +11 -2
- 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 +266 -231
- package/svi-datahub/package.json +1 -1
- package/svi-sand/index.d.ts +29 -2
- 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/bindings.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
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { SASInputBindings } from ".";
|
|
2
|
+
import { IdentitySummary } from "../current-user";
|
|
3
|
+
/**
|
|
4
|
+
* Properties for {@link SVICustomElement.IdentitySelect}.
|
|
5
|
+
*
|
|
6
|
+
* @category Properties
|
|
7
|
+
*
|
|
8
|
+
* @example HTML Example #1 - Provide a custom set of User/Group identities to display in dialog
|
|
9
|
+
* ```html
|
|
10
|
+
* <svi-identity-select
|
|
11
|
+
* [model]="selectedIdentities"
|
|
12
|
+
* [identities]="myIdentitiesList"
|
|
13
|
+
* [selectionMode]="SelectionMode.UsersAndGroups"
|
|
14
|
+
* [selfSelectBtn]="true"
|
|
15
|
+
* [filter]="{ byGroups: ['alpha', 'bravo'] }"
|
|
16
|
+
* (modelChanged)="onSelectionChange($event)"
|
|
17
|
+
* ></svi-identity-select>
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @example HTML Example #2 - Retrieve a list of users from the identities service in dialog
|
|
21
|
+
* ```html
|
|
22
|
+
* <svi-identity-select
|
|
23
|
+
* [model]="selectedIdentities"
|
|
24
|
+
* [ariaLabel]="'Select Users'"
|
|
25
|
+
* [selectionMode]="SelectionMode.Users"
|
|
26
|
+
* [selfSelectBtn]="true"
|
|
27
|
+
* (modelChanged)="onSelectionChange($event)"
|
|
28
|
+
* ></svi-identity-select>
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @example Create element via document.createElement:
|
|
32
|
+
* ```ts
|
|
33
|
+
* const identitySelect = document.createElement(SVICustomElement.IdentitySelect);
|
|
34
|
+
* identitySelect.identities = this.myIdentitiesList;
|
|
35
|
+
* identitySelect.ariaLabel = "My label";
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export interface IdentitySelectProperties extends SASInputBindings {
|
|
39
|
+
/** ARIA label for identifying the list. */
|
|
40
|
+
ariaLabel?: string;
|
|
41
|
+
/** The available users and groups to select from. If not provided, the identities are retrieved from the identities microservice. */
|
|
42
|
+
identities?: IIdentityOption[];
|
|
43
|
+
/** Does the input allow the selection of only a user, users, a group, groups, or both? (default: {@link SelectionMode.UsersAndGroups}) */
|
|
44
|
+
selectionMode?: SelectionMode;
|
|
45
|
+
/** Determines whether the select current user button is displayed. (default: false) */
|
|
46
|
+
selfSelectBtn?: boolean;
|
|
47
|
+
/** Determines if the current user button is displayed above or to the left/right of the identity-select control. (default: false) */
|
|
48
|
+
inlineSelectCurrentUserBtn?: boolean;
|
|
49
|
+
/** The filtering options used when the available identities are retrieved from the identities microservice. (default: false) */
|
|
50
|
+
filter?: IIdentitySelectFilterOptions;
|
|
51
|
+
/**
|
|
52
|
+
* Only members of the given group will be valid and selectable. If inclusive if true,
|
|
53
|
+
* the group itself is treated as a valid selection.
|
|
54
|
+
*
|
|
55
|
+
* Accepts the group id as a string, or as part of configuration object.
|
|
56
|
+
*/
|
|
57
|
+
limitSelectionToMembersOf?: string | ILimitSelectionToConfig;
|
|
58
|
+
/** Optional title that can be used to override the default dialog title. */
|
|
59
|
+
title?: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Properties for {@link SVICustomElement.IdentitySelectAction}.
|
|
63
|
+
*
|
|
64
|
+
* @category Properties
|
|
65
|
+
*
|
|
66
|
+
* @example HTML Example #1 - Select Users and Groups
|
|
67
|
+
* ```html
|
|
68
|
+
* <svi-identity-select-action
|
|
69
|
+
* [model]="selectedIdentities"
|
|
70
|
+
* [title]="'Multiple Users and Groups from Button'"
|
|
71
|
+
* [hideLabel]="true"
|
|
72
|
+
* (selectionDialogClose)="onDialogClose($event)"
|
|
73
|
+
* (modelChanged)="onSelectionChange($event)"
|
|
74
|
+
* ></svi-identity-select-action>
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* @example HTML Example #1 - Select Users Only
|
|
78
|
+
* ```html
|
|
79
|
+
* <svi-identity-select-action
|
|
80
|
+
* [model]="selectedIdentities"
|
|
81
|
+
* [title]="'Multiple Users from Button'"
|
|
82
|
+
* [hideLabel]="true"
|
|
83
|
+
* [selectionMode]="selectionMode.Users"
|
|
84
|
+
* (selectionDialogClose)="onDialogClose($event)"
|
|
85
|
+
* (modelChanged)="onSelectionChange($event)"
|
|
86
|
+
* ></svi-identity-select-action>
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
* @example Create element via document.createElement:
|
|
90
|
+
* ```ts
|
|
91
|
+
* const identityAvatar = document.createElement(SVICustomElement.IdentitySelectAction);
|
|
92
|
+
* identitySelect.title = this.title;
|
|
93
|
+
* identitySelect.actionMode = this.actionMode;
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
export interface IdentitySelectActionProperties {
|
|
97
|
+
/** Determines if the action is rendered as a Button or MenuItem (default: {@link ActionMode.Button}). */
|
|
98
|
+
actionMode?: ActionMode;
|
|
99
|
+
/** The tabIndex for the button (default: {@link TabIndex.Tabbable}). */
|
|
100
|
+
tabIndex?: string;
|
|
101
|
+
/** Optional title that can be used to override the default dialog title. */
|
|
102
|
+
title?: string;
|
|
103
|
+
/** Optional label that can be used to override the default button label. */
|
|
104
|
+
label?: string;
|
|
105
|
+
/** Defines if the label will be hidden. (default: false). */
|
|
106
|
+
hideLabel?: boolean;
|
|
107
|
+
/** Label for the identity select dialog "ok" button. (default: "ok") */
|
|
108
|
+
okButtonLabel?: string;
|
|
109
|
+
/** Optional icon class that can be used to override the default button icon. */
|
|
110
|
+
iconClass?: string;
|
|
111
|
+
/** Disables the component's controls. (default: false) */
|
|
112
|
+
disabled?: boolean;
|
|
113
|
+
/** The available users and groups to select from. If not provided, the identities are retrieved from the identities microservice. */
|
|
114
|
+
identities?: IIdentityOption[];
|
|
115
|
+
/** Does the input allow the selection of only a user, users, a group, groups, or both? (default: {@link SelectionMode.UsersAndGroups}) */
|
|
116
|
+
selectionMode?: SelectionMode;
|
|
117
|
+
/** Pre-select Identities. */
|
|
118
|
+
selectedIdentities?: IIdentityOption[];
|
|
119
|
+
/** The filtering options used when the available identities are retrieved from the identities microservice. */
|
|
120
|
+
filter?: IIdentitySelectFilterOptions;
|
|
121
|
+
/**
|
|
122
|
+
* Only members of the given group will be valid and selectable. If inclusive if true,
|
|
123
|
+
* the group itself is treated as a valid selection.
|
|
124
|
+
*
|
|
125
|
+
* Accepts the group id as a string, or as part of configuration object.
|
|
126
|
+
*/
|
|
127
|
+
limitSelectionToMembersOf?: string | ILimitSelectionToConfig;
|
|
128
|
+
/** Emits the selected identities when the dialog's ok button is clicked. */
|
|
129
|
+
selectionDialogClose?: (event: CustomEvent) => void;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Properties for {@link SVICustomElement.Avatar}.
|
|
133
|
+
*
|
|
134
|
+
* @category Properties
|
|
135
|
+
*
|
|
136
|
+
* @example HTML Example
|
|
137
|
+
* ```html
|
|
138
|
+
* <svi-avatar
|
|
139
|
+
* [identity]="identity"
|
|
140
|
+
* [size]="SizeType.XLarge"
|
|
141
|
+
* [isIcon]="true"
|
|
142
|
+
* [isButton]="true"
|
|
143
|
+
* ></svi-avatar>
|
|
144
|
+
* ```
|
|
145
|
+
*
|
|
146
|
+
* @example Create element via document.createElement:
|
|
147
|
+
* ```ts
|
|
148
|
+
* const identityAvatar = document.createElement(SVICustomElement.IdentityAvatar);
|
|
149
|
+
* identitySelect.identity = this.identity;
|
|
150
|
+
* identitySelect.size = SizeType.XLarge;
|
|
151
|
+
* identitySelect.isButton = true;
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
export interface AvatarProperties {
|
|
155
|
+
/** The identity of the user, including name, userID, user type, and any tooltips. (required) */
|
|
156
|
+
identity: AvatarData;
|
|
157
|
+
/** Specifies the size styling the avatar should use. */
|
|
158
|
+
size?: SizeType;
|
|
159
|
+
/** Specifies if the avatar is a clickable button. */
|
|
160
|
+
isButton?: boolean;
|
|
161
|
+
/** The user's photo, if provided. */
|
|
162
|
+
imgSrcUrl?: string;
|
|
163
|
+
/** Specifies whether the avatar displays an icon (user or group) or a non-icon (initial or image). */
|
|
164
|
+
isIcon?: boolean;
|
|
165
|
+
}
|
|
166
|
+
/** @category Identities Types */
|
|
167
|
+
export declare enum SizeType {
|
|
168
|
+
Small = "small",
|
|
169
|
+
Medium = "medium",
|
|
170
|
+
XLarge = "x-large"
|
|
171
|
+
}
|
|
172
|
+
/** @category Identities Types */
|
|
173
|
+
export declare enum TabIndex {
|
|
174
|
+
Tabbable = "0",
|
|
175
|
+
NotTabbable = "-1"
|
|
176
|
+
}
|
|
177
|
+
/** @category Identities Types */
|
|
178
|
+
export declare enum IdentityType {
|
|
179
|
+
User = "user",
|
|
180
|
+
Group = "group"
|
|
181
|
+
}
|
|
182
|
+
/** @category Identities Types */
|
|
183
|
+
export declare enum IdentityState {
|
|
184
|
+
Active = "active",
|
|
185
|
+
Inactive = "inactive",
|
|
186
|
+
Locked = "locked"
|
|
187
|
+
}
|
|
188
|
+
/** @category Identities Types */
|
|
189
|
+
export interface GroupSummary extends IdentitySummary {
|
|
190
|
+
/** The value of "group" */
|
|
191
|
+
readonly type: IdentityType.Group;
|
|
192
|
+
}
|
|
193
|
+
/** @category Identities Types */
|
|
194
|
+
export interface UserSummary extends IdentitySummary {
|
|
195
|
+
/** The value of "user" */
|
|
196
|
+
readonly type: IdentityType.User;
|
|
197
|
+
}
|
|
198
|
+
/** @category Identities Types */
|
|
199
|
+
export interface AvatarData {
|
|
200
|
+
/** The name of the avatar file */
|
|
201
|
+
name?: string;
|
|
202
|
+
/** The content-type of the avatar file. */
|
|
203
|
+
type?: string;
|
|
204
|
+
/** Describes whether or not the avatar file for this identity is a default image. */
|
|
205
|
+
default?: boolean;
|
|
206
|
+
/** The uri location of the avatar file only if stored externally. */
|
|
207
|
+
uri?: string;
|
|
208
|
+
/** Timestamp of avatar data creation */
|
|
209
|
+
creationTimeStamp?: Date;
|
|
210
|
+
/** Timestamp of last avatar data modification */
|
|
211
|
+
modifiedTimeStamp?: Date;
|
|
212
|
+
}
|
|
213
|
+
/** @category Identities Types */
|
|
214
|
+
export declare enum ActionMode {
|
|
215
|
+
Button = "button",
|
|
216
|
+
MenuItem = "menuItem"
|
|
217
|
+
}
|
|
218
|
+
/** @category Identities Types */
|
|
219
|
+
export declare enum SelectionMode {
|
|
220
|
+
User = "user",
|
|
221
|
+
Group = "group",
|
|
222
|
+
Users = "users",
|
|
223
|
+
Groups = "groups",
|
|
224
|
+
UserOrGroup = "userOrGroup",
|
|
225
|
+
UsersAndGroups = "usersAndGroups"
|
|
226
|
+
}
|
|
227
|
+
/** @category Identities Types */
|
|
228
|
+
export type IdentitySelection = Array<{
|
|
229
|
+
id: string;
|
|
230
|
+
type: IdentityType;
|
|
231
|
+
}>;
|
|
232
|
+
/** @category Identities Types */
|
|
233
|
+
export interface IIdentitySelectDialogData {
|
|
234
|
+
identities?: IIdentityOption[];
|
|
235
|
+
selection?: IdentitySelection;
|
|
236
|
+
selectionMode: SelectionMode;
|
|
237
|
+
filter?: IIdentitySelectFilterOptions;
|
|
238
|
+
limitSelectionToMembersOf?: string | ILimitSelectionToConfig;
|
|
239
|
+
title?: string;
|
|
240
|
+
okButtonLabel?: string;
|
|
241
|
+
showSelectCurrentUserButton?: boolean;
|
|
242
|
+
}
|
|
243
|
+
/** @category Identities Types */
|
|
244
|
+
export interface IIdentityOption {
|
|
245
|
+
label?: string;
|
|
246
|
+
icon?: string;
|
|
247
|
+
}
|
|
248
|
+
/** @category Identities Types */
|
|
249
|
+
export declare const enum IdentityTypeIcon {
|
|
250
|
+
User = "userIcon",
|
|
251
|
+
Group = "userGroupIcon",
|
|
252
|
+
UserAndGroup = "userGroupLimitIcon"
|
|
253
|
+
}
|
|
254
|
+
/** @category Identities Types */
|
|
255
|
+
export interface IIdentitySelectFilterOptions {
|
|
256
|
+
byGroups: string[];
|
|
257
|
+
includeNestedMembers?: boolean;
|
|
258
|
+
includeFilteredGroups?: boolean;
|
|
259
|
+
term?: string;
|
|
260
|
+
start?: number;
|
|
261
|
+
limit?: number;
|
|
262
|
+
cache?: number;
|
|
263
|
+
}
|
|
264
|
+
/** @category Identities Types */
|
|
265
|
+
export interface IFilterGroup {
|
|
266
|
+
id: string;
|
|
267
|
+
name?: string;
|
|
268
|
+
members: IdentitySummary[];
|
|
269
|
+
}
|
|
270
|
+
/** @category Identities Types */
|
|
271
|
+
export interface ILimitSelectionToConfig {
|
|
272
|
+
id: string;
|
|
273
|
+
inclusive?: boolean;
|
|
274
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { expectType } from "../../shared/util/helper-functions";
|
|
2
|
+
/** @category Identities Types */
|
|
3
|
+
export var SizeType;
|
|
4
|
+
(function (SizeType) {
|
|
5
|
+
SizeType["Small"] = "small";
|
|
6
|
+
SizeType["Medium"] = "medium";
|
|
7
|
+
SizeType["XLarge"] = "x-large";
|
|
8
|
+
})(SizeType || (SizeType = {}));
|
|
9
|
+
/** @category Identities Types */
|
|
10
|
+
export var IdentityType;
|
|
11
|
+
(function (IdentityType) {
|
|
12
|
+
IdentityType["User"] = "user";
|
|
13
|
+
IdentityType["Group"] = "group";
|
|
14
|
+
})(IdentityType || (IdentityType = {}));
|
|
15
|
+
/** @category Identities Types */
|
|
16
|
+
export var IdentityState;
|
|
17
|
+
(function (IdentityState) {
|
|
18
|
+
IdentityState["Active"] = "active";
|
|
19
|
+
IdentityState["Inactive"] = "inactive";
|
|
20
|
+
IdentityState["Locked"] = "locked";
|
|
21
|
+
})(IdentityState || (IdentityState = {}));
|
|
22
|
+
expectType(true);
|
|
23
|
+
expectType(true);
|
|
24
|
+
expectType(true);
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
/**
|
|
7
|
+
* This enumeration list contains the tag names of all SVI custom elements.
|
|
8
|
+
*
|
|
9
|
+
* @category Properties
|
|
10
|
+
*/
|
|
11
|
+
export declare enum SVICustomElement {
|
|
12
|
+
/**
|
|
13
|
+
* Wrap a given control in an SVI control label.
|
|
14
|
+
*
|
|
15
|
+
* By default, the label will include a {@link MaskToggleButton | mask-toggle-button}
|
|
16
|
+
* for toggling the masked state of the control's dataSource, if configured for masking.
|
|
17
|
+
*
|
|
18
|
+
* See {@link LabelledControlProperties} for supported input bindings.
|
|
19
|
+
*/
|
|
20
|
+
LabelledControl = "svi-labelled-control",
|
|
21
|
+
/**
|
|
22
|
+
* Toggle a given dataSource between it's masked and unmasked state, if configured for masking.
|
|
23
|
+
*
|
|
24
|
+
* See {@link MaskToggleButtonProperties} for supported input bindings.
|
|
25
|
+
*/
|
|
26
|
+
MaskToggleButton = "svi-mask-toggle-button",
|
|
27
|
+
/**
|
|
28
|
+
* A token input that spawns a dialog for selecting a set of users, a set of groups, or a set of users and groups.
|
|
29
|
+
*
|
|
30
|
+
* See {@link IdentitySelectProperties} for supported input bindings.
|
|
31
|
+
*/
|
|
32
|
+
IdentitySelect = "svi-identity-select",
|
|
33
|
+
/**
|
|
34
|
+
* A button for selecting a set of users, a set of groups, or a set of users and groups.
|
|
35
|
+
*
|
|
36
|
+
* See {@link IdentitySelectActionProperties} for supported input bindings.
|
|
37
|
+
*/
|
|
38
|
+
IdentitySelectAction = "svi-identity-select-action",
|
|
39
|
+
/**
|
|
40
|
+
* An input to select a set of users, a set of groups, or a set of users and groups.
|
|
41
|
+
*
|
|
42
|
+
* See {@link AvatarProperties} for supported input bindings.
|
|
43
|
+
*/
|
|
44
|
+
Avatar = "svi-avatar"
|
|
45
|
+
}
|
|
46
|
+
export * from "./bindings";
|
|
47
|
+
export * from "./identity-select";
|
|
48
|
+
export * from "./labelled-control";
|
|
49
|
+
export * from "./mask-toggle-button";
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
/**
|
|
7
|
+
* This enumeration list contains the tag names of all SVI custom elements.
|
|
8
|
+
*
|
|
9
|
+
* @category Properties
|
|
10
|
+
*/
|
|
11
|
+
export var SVICustomElement;
|
|
12
|
+
(function (SVICustomElement) {
|
|
13
|
+
/**
|
|
14
|
+
* Wrap a given control in an SVI control label.
|
|
15
|
+
*
|
|
16
|
+
* By default, the label will include a {@link MaskToggleButton | mask-toggle-button}
|
|
17
|
+
* for toggling the masked state of the control's dataSource, if configured for masking.
|
|
18
|
+
*
|
|
19
|
+
* See {@link LabelledControlProperties} for supported input bindings.
|
|
20
|
+
*/
|
|
21
|
+
SVICustomElement["LabelledControl"] = "svi-labelled-control";
|
|
22
|
+
/**
|
|
23
|
+
* Toggle a given dataSource between it's masked and unmasked state, if configured for masking.
|
|
24
|
+
*
|
|
25
|
+
* See {@link MaskToggleButtonProperties} for supported input bindings.
|
|
26
|
+
*/
|
|
27
|
+
SVICustomElement["MaskToggleButton"] = "svi-mask-toggle-button";
|
|
28
|
+
/**
|
|
29
|
+
* A token input that spawns a dialog for selecting a set of users, a set of groups, or a set of users and groups.
|
|
30
|
+
*
|
|
31
|
+
* See {@link IdentitySelectProperties} for supported input bindings.
|
|
32
|
+
*/
|
|
33
|
+
SVICustomElement["IdentitySelect"] = "svi-identity-select";
|
|
34
|
+
/**
|
|
35
|
+
* A button for selecting a set of users, a set of groups, or a set of users and groups.
|
|
36
|
+
*
|
|
37
|
+
* See {@link IdentitySelectActionProperties} for supported input bindings.
|
|
38
|
+
*/
|
|
39
|
+
SVICustomElement["IdentitySelectAction"] = "svi-identity-select-action";
|
|
40
|
+
/**
|
|
41
|
+
* An input to select a set of users, a set of groups, or a set of users and groups.
|
|
42
|
+
*
|
|
43
|
+
* See {@link AvatarProperties} for supported input bindings.
|
|
44
|
+
*/
|
|
45
|
+
SVICustomElement["Avatar"] = "svi-avatar";
|
|
46
|
+
})(SVICustomElement || (SVICustomElement = {}));
|
|
47
|
+
export * from "./bindings";
|
|
48
|
+
export * from "./identity-select";
|
|
49
|
+
export * from "./labelled-control";
|
|
50
|
+
export * from "./mask-toggle-button";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { PageControlBindings } from ".";
|
|
2
|
+
/**
|
|
3
|
+
* Properties for {@link SVICustomElement.LabelledControl}.
|
|
4
|
+
*
|
|
5
|
+
* @category Properties
|
|
6
|
+
*
|
|
7
|
+
* @example HTML Example:
|
|
8
|
+
* ```html
|
|
9
|
+
* <svi-labelled-control
|
|
10
|
+
* [childNode]="childNode"
|
|
11
|
+
* [pageModel]="pageModel"
|
|
12
|
+
* >
|
|
13
|
+
* <!-- my control -->
|
|
14
|
+
* </svi-labelled-control>
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @example Create the element via document.createElement:
|
|
18
|
+
* ```ts
|
|
19
|
+
* const labelledControl = document.createElement(SVICustomElement.LabelledControl);
|
|
20
|
+
* labelledControl.pageModel = this.pageModel;
|
|
21
|
+
* labelledControl.childNode = this.childNode;
|
|
22
|
+
* labelledControl.appendChild(myControlElement)
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export interface LabelledControlProperties extends PageControlBindings {
|
|
26
|
+
/** Set the label as required. */
|
|
27
|
+
isRequired?: boolean;
|
|
28
|
+
/** Set the label as disabled. */
|
|
29
|
+
isDisabled?: boolean;
|
|
30
|
+
/** Override the text displayed in the label. */
|
|
31
|
+
overrideLabel?: string;
|
|
32
|
+
/** Add css classes to the label element. */
|
|
33
|
+
labelClass?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Specify which dataSource the label's mask-toggle-button will toggle.
|
|
36
|
+
*
|
|
37
|
+
* If no {@link MaskToggleButtonProperties.dataSource | dataSource} is specified,
|
|
38
|
+
* the mask-toggle-button will toggle the dataSource(s) defined in the childNode's typeAttributes.
|
|
39
|
+
*/
|
|
40
|
+
dataSource?: string;
|
|
41
|
+
/** Disable the label's mask toggle button. */
|
|
42
|
+
disableMaskToggle?: boolean;
|
|
43
|
+
/** Hide the label's mask toggle button. */
|
|
44
|
+
hideMaskToggle?: boolean;
|
|
45
|
+
/** Set the label's `for` attribute. */
|
|
46
|
+
for?: string;
|
|
47
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PageControlBindings } from ".";
|
|
2
|
+
/**
|
|
3
|
+
* Properties for {@link SVICustomElement.MaskToggleButton}.
|
|
4
|
+
*
|
|
5
|
+
* @category Properties
|
|
6
|
+
*
|
|
7
|
+
* @example HTML Example
|
|
8
|
+
* ```html
|
|
9
|
+
* <svi-mask-toggle-button
|
|
10
|
+
* [childNode]="childNode"
|
|
11
|
+
* [pageModel]="pageModel"
|
|
12
|
+
* >
|
|
13
|
+
* </svi-mask-toggle-button>
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @example Create element via document.createElement:
|
|
17
|
+
* ```ts
|
|
18
|
+
* const maskToggleBtn = document.createElement(SVICustomElement.MaskToggleButton);
|
|
19
|
+
* maskToggleBtn.pageModel = this.pageModel;
|
|
20
|
+
* maskToggleBtn.childNode = this.childNode;
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export interface MaskToggleButtonProperties extends PageControlBindings {
|
|
24
|
+
/**
|
|
25
|
+
* Specify which dataSource will be toggled.
|
|
26
|
+
*
|
|
27
|
+
* If no {@link MaskToggleButtonProperties.dataSource | dataSource} is specified,
|
|
28
|
+
* the mask-toggle-button will toggle the dataSource(s) defined in the childNode's typeAttributes.
|
|
29
|
+
*/
|
|
30
|
+
dataSource?: string;
|
|
31
|
+
/** Disable the mask toggle button. */
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
/** Hide the mask toggle button. */
|
|
34
|
+
hidden?: boolean;
|
|
35
|
+
/** Override the control name displayed in the authorization dialog. */
|
|
36
|
+
controlName?: string;
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/event/event-api.d.ts
CHANGED
|
@@ -17,8 +17,9 @@ export declare enum PageEvents {
|
|
|
17
17
|
UpdateSubDocumentTypeEvent = "spb::updateSubDocumentType",
|
|
18
18
|
TabSelectedEvent = "spb::tabSelected",
|
|
19
19
|
VisitAllTabs = "spb::mark-all-tabs-visited",
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
MaskEvent = "spb::mask",
|
|
21
|
+
UnmaskEvent = "spb::unmask",
|
|
22
|
+
MaskResetEvent = "spb::mask-reset",
|
|
22
23
|
ClearDateFieldEvent = "spb::clear-date-field"
|
|
23
24
|
}
|
|
24
25
|
export declare enum DocumentGeneratorEvents {
|
|
@@ -29,7 +30,11 @@ export interface Subscription {
|
|
|
29
30
|
}
|
|
30
31
|
/**
|
|
31
32
|
* This API provides the details and functionality associated with publishing and subscribing to events.
|
|
32
|
-
*
|
|
33
|
+
*
|
|
34
|
+
* Accessed from the window at `window.sas.vi.event`.
|
|
35
|
+
*
|
|
36
|
+
* @example window.sas.vi.event.publish("eventName", payload);
|
|
37
|
+
* @category API
|
|
33
38
|
*/
|
|
34
39
|
export interface EventApi {
|
|
35
40
|
/**
|
|
@@ -43,8 +48,8 @@ export interface EventApi {
|
|
|
43
48
|
* @method
|
|
44
49
|
* @description Subscribes to an event and registers a function to be called on any future published events.
|
|
45
50
|
* If the eventName does not exist, it is created.
|
|
46
|
-
* @param
|
|
47
|
-
* @param {EventApi~subscriptionCallback}
|
|
51
|
+
* @param {string} eventName Name of the event to subscribe to.
|
|
52
|
+
* @param {EventApi~subscriptionCallback} observer Invoked when the subscription is triggered by an event.
|
|
48
53
|
* Has access to the event's payload.
|
|
49
54
|
* @returns The subscription being made to the event.
|
|
50
55
|
*/
|
package/event/event-api.js
CHANGED
|
@@ -18,8 +18,9 @@ export var PageEvents;
|
|
|
18
18
|
PageEvents["UpdateSubDocumentTypeEvent"] = "spb::updateSubDocumentType";
|
|
19
19
|
PageEvents["TabSelectedEvent"] = "spb::tabSelected";
|
|
20
20
|
PageEvents["VisitAllTabs"] = "spb::mark-all-tabs-visited";
|
|
21
|
-
PageEvents["
|
|
22
|
-
PageEvents["
|
|
21
|
+
PageEvents["MaskEvent"] = "spb::mask";
|
|
22
|
+
PageEvents["UnmaskEvent"] = "spb::unmask";
|
|
23
|
+
PageEvents["MaskResetEvent"] = "spb::mask-reset";
|
|
23
24
|
PageEvents["ClearDateFieldEvent"] = "spb::clear-date-field";
|
|
24
25
|
})(PageEvents || (PageEvents = {}));
|
|
25
26
|
export var DocumentGeneratorEvents;
|
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 */
|