@enplug/sdk-dashboard 5.4.0 → 5.4.2-2.1-dev
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 +83 -0
- package/dist/dashboard.js +1857 -1464
- package/dist/dashboard.js.map +1 -1
- package/index.d.ts +6 -6
- package/package.json +96 -89
- package/types/account.d.ts +303 -159
- package/types/bridge/bridge-base.d.ts +21 -21
- package/types/dashboard.d.ts +375 -196
- package/types/external-types.d.ts +660 -526
- package/types/index.ts +2 -2
- package/types/internal-types.d.ts +167 -161
- package/types/sdk.d.ts +8 -8
- package/types/social.d.ts +52 -39
- package/types/utils.d.ts +5 -5
package/types/dashboard.d.ts
CHANGED
|
@@ -1,196 +1,375 @@
|
|
|
1
|
-
import { Asset, Button, DisplaySelectorCallback, FeedData, Layout, OpenConfirmOptions, ThemeAsset, EncodingStatusResult, UploaderOptions, UploadedFileResult, ApiDataConnectorOptions, DataConnectionConfig, AssetPreviewRequest, AssetPreviewData } from './external-types';
|
|
2
|
-
import { BridgeBase } from './bridge/bridge-base';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
* of
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
*
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*/
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
*
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
*
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
*
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
*
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
* @
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
*
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
*
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
*
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
*
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
* @
|
|
151
|
-
*/
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
*
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
*
|
|
159
|
-
* @
|
|
160
|
-
*/
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
*
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
* @
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
*
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
*
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
*
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*/
|
|
195
|
-
|
|
196
|
-
|
|
1
|
+
import { Asset, Button, DisplaySelectorCallback, FeedData, Layout, OpenConfirmOptions, ThemeAsset, EncodingStatusResult, UploaderOptions, UploadedFileResult, ApiDataConnectorOptions, DataConnectionConfig, AssetPreviewRequest, AssetPreviewData } from './external-types';
|
|
2
|
+
import { BridgeBase } from './bridge/bridge-base';
|
|
3
|
+
/**
|
|
4
|
+
* Dashboard API is a part of the Dashboard SDK. It can be used to present standardized User Interface elements.
|
|
5
|
+
* Use global `enplug.dashboard` object to access these methods.
|
|
6
|
+
*
|
|
7
|
+
* ```typescript title="Example usage of the Dashboard API"
|
|
8
|
+
* enplug.dashboard.pageLoading(false);
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* **Useful commands**
|
|
12
|
+
*
|
|
13
|
+
* Header section:
|
|
14
|
+
* - {@link setHeaderTitle|`enplug.dashboard.setHeaderTitle()`} - sets header title
|
|
15
|
+
* - {@link setHeaderButtons|`enplug.dashboard.setHeaderButtons()`} - sets header buttons
|
|
16
|
+
* - {@link setDisplaySelectorCallback|`enplug.dashboard.setDisplaySelectorCallback()`} - sets Display Group selector callback
|
|
17
|
+
* - {@link setDisplaySelectorVisibility|`enplug.dashboard.setDisplaySelectorVisibility()`} - sets Display Group selector visibility
|
|
18
|
+
*
|
|
19
|
+
* Progress indicator:
|
|
20
|
+
* - {@link pageLoading|`enplug.dashboard.pageLoading()`} - sets the app's loader visibility
|
|
21
|
+
* - {@link loadingIndicator|`enplug.dashboard.loadingIndicator()`} - shows **Loading** indicator
|
|
22
|
+
* - {@link successIndicator|`enplug.dashboard.successIndicator()`} - shows **Success** indicator
|
|
23
|
+
* - {@link errorIndicator|`enplug.dashboard.errorIndicator()`} - shows **Error** indicator
|
|
24
|
+
*
|
|
25
|
+
* Dialogs:
|
|
26
|
+
* - {@link previewAsset|`enplug.dashboard.previewAsset()`} - shows asset preview
|
|
27
|
+
* - {@link upload|`enplug.dashboard.upload()`} - shows upload dialog
|
|
28
|
+
* - {@link openConfirm|`enplug.dashboard.openConfirm()`} - shows custom confirmation dialog
|
|
29
|
+
* - {@link confirmUnsavedChanges|`enplug.dashboard.confirmUnsavedChanges()`} - shows unsaved changes dialog
|
|
30
|
+
* - {@link setAppHasUnsavedChanges|`enplug.dashboard.setAppHasUnsavedChanges()`} - sets dashboard's navigation guard
|
|
31
|
+
*/
|
|
32
|
+
export declare class Dashboard {
|
|
33
|
+
private bridge;
|
|
34
|
+
/**
|
|
35
|
+
* The buttons most recently registered with the dashboard header.
|
|
36
|
+
* Stored locally so that we can respond to click events
|
|
37
|
+
*/
|
|
38
|
+
private currentButtons;
|
|
39
|
+
/**
|
|
40
|
+
* Keeps track of whether the dashboard is loading mode so clients can check.
|
|
41
|
+
*/
|
|
42
|
+
private isLoadingCache;
|
|
43
|
+
/** @internal */
|
|
44
|
+
constructor(bridge: BridgeBase);
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
* Notifies the parent dashboard of a click in the child iframe. Used to close
|
|
48
|
+
* dropdown windows, etc. which were opened in parent window and are unable to
|
|
49
|
+
* respond to click events in child iframe.
|
|
50
|
+
*
|
|
51
|
+
* Event handler is automatically bound when the SDK is created.
|
|
52
|
+
*/
|
|
53
|
+
click(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Opens a confirm window asking the user to confirm their unsaved changes.
|
|
56
|
+
*
|
|
57
|
+
* ```typescript title="Presenting Unsaved Changes dialog"
|
|
58
|
+
* try {
|
|
59
|
+
* await enplug.dashboard.confirmUnsavedChanges();
|
|
60
|
+
* // user confirmed - take action
|
|
61
|
+
* } catch {
|
|
62
|
+
* // user cancelled
|
|
63
|
+
* }
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* <br />
|
|
67
|
+
* *Unsaved Changes dialog*
|
|
68
|
+
*
|
|
69
|
+
* @returns Resolves if dialog was confirmed, rejects otherwise.
|
|
70
|
+
*/
|
|
71
|
+
confirmUnsavedChanges(): Promise<any>;
|
|
72
|
+
/**
|
|
73
|
+
* Shows the error indicator.
|
|
74
|
+
*
|
|
75
|
+
* ```typescript title="Presenting the error indicator"
|
|
76
|
+
* enplug.dashboard.errorIndicator('Asset could not be removed');
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* 
|
|
80
|
+
* *Error indicator*
|
|
81
|
+
*
|
|
82
|
+
* @param message - A message to show in the error toast.
|
|
83
|
+
*
|
|
84
|
+
* @returns Resolves after the error indicator shows up on screen.
|
|
85
|
+
*/
|
|
86
|
+
errorIndicator(message: string): Promise<any>;
|
|
87
|
+
/**
|
|
88
|
+
* Synchronously returns the current loading state.
|
|
89
|
+
* Updated asynchronously when this sender receives an acknowledgement
|
|
90
|
+
* of successful SDK call from the dashboard.
|
|
91
|
+
*
|
|
92
|
+
* @see {@link pageLoading} to update the page loading state.
|
|
93
|
+
*
|
|
94
|
+
* @returns Current page loading state.
|
|
95
|
+
*/
|
|
96
|
+
isLoading(): boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Turns on the progress indicator, typically used during asynchronous actions.
|
|
99
|
+
*
|
|
100
|
+
* :::note
|
|
101
|
+
* Note that the progress indicator will continue until a call is made to the
|
|
102
|
+
* {@link errorIndicator} or {@link successIndicator} APIs.
|
|
103
|
+
* :::
|
|
104
|
+
*
|
|
105
|
+
* ```typescript title="Presenting the loading indicator"
|
|
106
|
+
* enplug.dashboard.loadingIndicator('Removing asset');
|
|
107
|
+
* ```
|
|
108
|
+
*
|
|
109
|
+
* 
|
|
110
|
+
* *Loading indicator*
|
|
111
|
+
*
|
|
112
|
+
* @param message - A message to show in the loading toast.
|
|
113
|
+
*
|
|
114
|
+
* @returns Resolves after the loading indicator shows up on screen.
|
|
115
|
+
*/
|
|
116
|
+
loadingIndicator(message: string): Promise<void>;
|
|
117
|
+
/**
|
|
118
|
+
* Navigate to given relative dashboard URL.
|
|
119
|
+
*/
|
|
120
|
+
navigateToUrl(url: string): Promise<any>;
|
|
121
|
+
/**
|
|
122
|
+
* Navigate back to zoning from widget.
|
|
123
|
+
* @param assetId - optional, fallback parameter for v1-\>v2 transition phase
|
|
124
|
+
*/
|
|
125
|
+
navigateToZoning(assetId?: string): Promise<any>;
|
|
126
|
+
/**
|
|
127
|
+
* Opens a confirm window with Yes/No buttons and configurable messages.
|
|
128
|
+
*
|
|
129
|
+
* ```typescript title="Presenting confirmation dialog"
|
|
130
|
+
* try {
|
|
131
|
+
* await enplug.dashboard.openConfirm({
|
|
132
|
+
* title: 'Delete asset?',
|
|
133
|
+
* text: 'Are you sure you want to delete this asset? This action cannot be undone.',
|
|
134
|
+
* cancelText: 'Cancel',
|
|
135
|
+
* confirmText: 'Delete',
|
|
136
|
+
* confirmClass: 'btn-danger'
|
|
137
|
+
* });
|
|
138
|
+
*
|
|
139
|
+
* // remove the asset
|
|
140
|
+
* } catch {
|
|
141
|
+
* // user cancelled
|
|
142
|
+
* }
|
|
143
|
+
* ```
|
|
144
|
+
*
|
|
145
|
+
* <br />
|
|
146
|
+
* *Confirm dialog*
|
|
147
|
+
*
|
|
148
|
+
* @param options - Confirm dialog options.
|
|
149
|
+
*
|
|
150
|
+
* @returns Resolves if Confirm button was clicked, rejects otherwise.
|
|
151
|
+
*/
|
|
152
|
+
openConfirm(options: OpenConfirmOptions): Promise<any>;
|
|
153
|
+
/**
|
|
154
|
+
* Puts the page into error state.
|
|
155
|
+
*
|
|
156
|
+
* <br />
|
|
157
|
+
* *Page error*
|
|
158
|
+
*
|
|
159
|
+
* @returns Resolves after the Dashboard shows the page error.
|
|
160
|
+
*/
|
|
161
|
+
pageError(): Promise<void>;
|
|
162
|
+
/**
|
|
163
|
+
* Controls the loading state for the entire page. Every application starts off in
|
|
164
|
+
* loading state, and must set `pageLoading(false)` to notify the dashboard that it
|
|
165
|
+
* has successfully loaded.
|
|
166
|
+
*
|
|
167
|
+
* ```typescript title="Turning off the loading spinner after app has started"
|
|
168
|
+
* enplug.dashboard.pageLoading(false);
|
|
169
|
+
* ```
|
|
170
|
+
*
|
|
171
|
+
* <br />
|
|
172
|
+
* *Page Loading spinner*
|
|
173
|
+
*
|
|
174
|
+
* @param isLoading - Page loading state:<br />
|
|
175
|
+
* `false` - hides the loader and shows the app,<br />
|
|
176
|
+
* `true` - shows the loader and hides the app.
|
|
177
|
+
*
|
|
178
|
+
* @returns Resolves after the loading state has been updated by the Dashboard.
|
|
179
|
+
*/
|
|
180
|
+
pageLoading(isLoading: boolean): Promise<boolean>;
|
|
181
|
+
/**
|
|
182
|
+
* Puts the page into not found (404) state.
|
|
183
|
+
*
|
|
184
|
+
* <br />
|
|
185
|
+
* *Page not available*
|
|
186
|
+
*
|
|
187
|
+
* @returns Resolves when after the Dashboard shows the page not found error.
|
|
188
|
+
*/
|
|
189
|
+
pageNotFound(): Promise<void>;
|
|
190
|
+
/**
|
|
191
|
+
* @deprecated use {@link previewAsset}
|
|
192
|
+
*
|
|
193
|
+
* Opens app preview modal.
|
|
194
|
+
*/
|
|
195
|
+
preview<AssetValue, ThemeValue, FeedType>(url: string, asset: Asset<AssetValue>, theme: ThemeAsset<ThemeValue>, layout?: Layout, feedData?: FeedData<FeedType>): Promise<any>;
|
|
196
|
+
/**
|
|
197
|
+
* Opens asset preview modal.
|
|
198
|
+
*
|
|
199
|
+
* <br />
|
|
200
|
+
* *Asset preview modal*
|
|
201
|
+
*
|
|
202
|
+
* ```typescript title="Previewing an asset"
|
|
203
|
+
* function showPreview(asset: Asset<AssetModel>) {
|
|
204
|
+
* enplug.dashboard.previewAsset({ asset });
|
|
205
|
+
* }
|
|
206
|
+
* ```
|
|
207
|
+
*
|
|
208
|
+
* The above code opens the preview dialog with provided data.
|
|
209
|
+
* This method allows many preview customizations, see {@link AssetPreviewRequest}.
|
|
210
|
+
*
|
|
211
|
+
* :::note
|
|
212
|
+
* The app inside of the preview modal is presented in an iframe and the app is provided with basic SDK functionalities
|
|
213
|
+
* needed to display the asset only. The app's Player URL from app's definition will be used.
|
|
214
|
+
* The app is not run in a WebPlayer environment, so the behavior might be different.
|
|
215
|
+
* Most SDK calls will have no effect.
|
|
216
|
+
* :::
|
|
217
|
+
*
|
|
218
|
+
* @param TAssetValue - Model of asset's value
|
|
219
|
+
* @param TThemeValue - Model of theme's value (optional)
|
|
220
|
+
* @param TFeedType - Model of the feed (used for social apps)
|
|
221
|
+
*
|
|
222
|
+
* @returns Resolves after the preview modal gets closed.
|
|
223
|
+
*/
|
|
224
|
+
previewAsset<TAssetValue = any, TThemeValue = any, TFeedType = any>(request: AssetPreviewRequest<TAssetValue, TThemeValue, TFeedType>): Promise<void>;
|
|
225
|
+
/**
|
|
226
|
+
* @internal
|
|
227
|
+
* Get preview parameters for an app asset for custom preview handling.
|
|
228
|
+
* @param origin - (default: true) - custom origin url, when omitted or falsy, `window.location.origin` will be attached
|
|
229
|
+
*/
|
|
230
|
+
getAssetPreviewData(appId: string, asset: Asset<any>, origin?: string | boolean): Promise<AssetPreviewData>;
|
|
231
|
+
/**
|
|
232
|
+
* Sets the current callback for the title bar breadcrumb Display Group selector dropdown.
|
|
233
|
+
* Attaching a callback enables the dropdown and resets the title.
|
|
234
|
+
*
|
|
235
|
+
* The callback is fired when a Display Group is selected from the dropdown, the callback will get the ID
|
|
236
|
+
* value when a single display is fired, or null when the whole 'Library' selection.
|
|
237
|
+
*
|
|
238
|
+
* ```typescript title="Setting up the Display Group selector"
|
|
239
|
+
* enplug.dashboard.setDisplaySelectorCallback(async () => {
|
|
240
|
+
* // update your asset list using enplug.account.getAssets() which will return
|
|
241
|
+
* // the assets assigned to the selected Display Group only
|
|
242
|
+
* yourAssetList = await enplug.account.getAssets();
|
|
243
|
+
* });
|
|
244
|
+
* ```
|
|
245
|
+
*
|
|
246
|
+
* <br />
|
|
247
|
+
* *Display Group selector dropdown*
|
|
248
|
+
*
|
|
249
|
+
* @param callback - A function to be called every time a user changes current Display Group
|
|
250
|
+
* with the dropdown selector. The callback should reload the asset list to get the filtered version.
|
|
251
|
+
*
|
|
252
|
+
* @returns Promise which resolves after the command gets executed by the Dashboard.
|
|
253
|
+
*/
|
|
254
|
+
setDisplaySelectorCallback(callback: DisplaySelectorCallback): Promise<void>;
|
|
255
|
+
/**
|
|
256
|
+
* Hides or shows the Display Group dropdown selector in the page title breadcrumb bar.
|
|
257
|
+
* Send true to show the selector, false to hide it.
|
|
258
|
+
*
|
|
259
|
+
* The Display Group selector dropdown can be used to filter assets currently deployed to a specific Display Group.
|
|
260
|
+
* You can view all the saved assets by account for your app by selecting the 'Library' view from the dropdown on the upper left.
|
|
261
|
+
*
|
|
262
|
+
* 
|
|
263
|
+
* *Display Group selector dropdown*
|
|
264
|
+
*
|
|
265
|
+
* @returns Promise which resolves after the command gets executed by the Dashboard.
|
|
266
|
+
*/
|
|
267
|
+
setDisplaySelectorVisibility(show: boolean): Promise<void>;
|
|
268
|
+
/**
|
|
269
|
+
* Sets the action buttons for a page in the titlebar.
|
|
270
|
+
*
|
|
271
|
+
* Accepts either a single button object, or an array of buttons.
|
|
272
|
+
* Each button must have a button.action callback.
|
|
273
|
+
*
|
|
274
|
+
* ```typescript title="Updating the buttons"
|
|
275
|
+
* function updateButtons(hasUnsavedChanges: boolean) {
|
|
276
|
+
* enplug.dashboard.setHeaderButtons([{
|
|
277
|
+
* text: 'My Signs',
|
|
278
|
+
* action: () => { \/* your code to navigate back to the Asset list *\/ },
|
|
279
|
+
* class: 'btn-default'
|
|
280
|
+
* }, {
|
|
281
|
+
* text: 'Save',
|
|
282
|
+
* action: () => { \/* your code saving the asset *\/ },
|
|
283
|
+
* class: 'btn-primary',
|
|
284
|
+
* disabled: !hasUnsavedChanges // this will disable the button if there are no unsaved changes
|
|
285
|
+
* }]);
|
|
286
|
+
* }
|
|
287
|
+
* ```
|
|
288
|
+
*
|
|
289
|
+
* <br />
|
|
290
|
+
* *Header buttons*
|
|
291
|
+
*
|
|
292
|
+
* @param buttons - A button (single or array) to set on a header.
|
|
293
|
+
*
|
|
294
|
+
* @returns Resolves after the buttons get updated.
|
|
295
|
+
*/
|
|
296
|
+
setHeaderButtons(buttons: Button[] | Button): Promise<void>;
|
|
297
|
+
/**
|
|
298
|
+
* Sets the last part of the title bar breadcrumb.
|
|
299
|
+
* Set an empty title '' to clear the title.
|
|
300
|
+
* Re-setting this value wipes out the old one.
|
|
301
|
+
*
|
|
302
|
+
* The home/default page for an app should have no title set.
|
|
303
|
+
*
|
|
304
|
+
* ```typescript title="Updating header's title"
|
|
305
|
+
* enplug.dashboard.setHeaderTitle('Setup');
|
|
306
|
+
* ```
|
|
307
|
+
*
|
|
308
|
+
* 
|
|
309
|
+
* *Header title section*
|
|
310
|
+
*
|
|
311
|
+
* @param title - A title to set.
|
|
312
|
+
*
|
|
313
|
+
* @returns Resolves after the title has been modified.
|
|
314
|
+
*/
|
|
315
|
+
setHeaderTitle(title: string): Promise<void>;
|
|
316
|
+
/**
|
|
317
|
+
* Shows the success indicator.
|
|
318
|
+
*
|
|
319
|
+
* ```typescript title="Presenting the success indicator"
|
|
320
|
+
* enplug.dashboard.successIndicator('Asset removed');
|
|
321
|
+
* ```
|
|
322
|
+
*
|
|
323
|
+
* 
|
|
324
|
+
* *Success indicator*
|
|
325
|
+
*
|
|
326
|
+
* @param message - A message to show in the success toast.
|
|
327
|
+
*
|
|
328
|
+
* @returns Resolves after the success indicator shows up on screen.
|
|
329
|
+
*/
|
|
330
|
+
successIndicator(message: string): Promise<void>;
|
|
331
|
+
/**
|
|
332
|
+
* Switches to account view "Library"/All selection of instance selector or Display Group view.
|
|
333
|
+
*/
|
|
334
|
+
switchToView(displayGroupId: string, displayGroupName: string): Promise<any>;
|
|
335
|
+
/**
|
|
336
|
+
* Uses upload interface and Enplug encoding service, returns uploaded object
|
|
337
|
+
* @param options - Filepicker options
|
|
338
|
+
*/
|
|
339
|
+
upload(options: UploaderOptions): Promise<UploadedFileResult[]>;
|
|
340
|
+
/**
|
|
341
|
+
* Uses connect data interface, returns connection configuration object.
|
|
342
|
+
* @param options - API Data Connector configuration options.
|
|
343
|
+
*/
|
|
344
|
+
connectData(options: ApiDataConnectorOptions | ApiDataConnectorOptions[]): Promise<DataConnectionConfig>;
|
|
345
|
+
/**
|
|
346
|
+
* @internal
|
|
347
|
+
* Returns current encoding status of an asset.
|
|
348
|
+
* @deprecated legacy FileStack upload flow
|
|
349
|
+
* @see resourcesEncodingStatus
|
|
350
|
+
*/
|
|
351
|
+
encodeStatus(url: string): Promise<any>;
|
|
352
|
+
/**
|
|
353
|
+
* Returns current encoding statuses of resources or asset IDs.
|
|
354
|
+
* @param byAssetId - If `true`, the provided IDs are interpreted as asset IDs, otherwise they are resource IDs.
|
|
355
|
+
*/
|
|
356
|
+
resourcesEncodingStatus(ids: string[], byAssetId?: boolean): Promise<EncodingStatusResult[]>;
|
|
357
|
+
/**
|
|
358
|
+
* Opens content interval settings dialog for Ad Scheduler app.
|
|
359
|
+
*/
|
|
360
|
+
openContentIntervalSettingsDialog(appName: string, level: string, levelId: string): Promise<any>;
|
|
361
|
+
/**
|
|
362
|
+
* Lets dashboard know that the state of user changes in the app changed.
|
|
363
|
+
*
|
|
364
|
+
* @param hasUnsavedChanges - Whether the app has unsaved changes.
|
|
365
|
+
*/
|
|
366
|
+
setAppHasUnsavedChanges(hasUnsavedChanges: boolean): Promise<any>;
|
|
367
|
+
/**
|
|
368
|
+
* The last callback registered with the dashboard title bar.
|
|
369
|
+
*/
|
|
370
|
+
private currentDisplayCallback;
|
|
371
|
+
/**
|
|
372
|
+
* Closes current window, used in templates after user has successfully authenticated with sharepoint user.
|
|
373
|
+
*/
|
|
374
|
+
closeWindow(): Promise<any>;
|
|
375
|
+
}
|