@interopio/workspaces-api 4.1.1 → 4.1.3
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/LICENSE +21 -21
- package/changelog.md +174 -172
- package/dist/workspaces.es.js +49 -2
- package/dist/workspaces.es.js.map +1 -1
- package/dist/workspaces.umd.js +49 -2
- package/dist/workspaces.umd.js.map +1 -1
- package/dist/workspaces.umd.min.js +1 -1
- package/package.json +3 -3
- package/workspaces.d.ts +203 -8
package/workspaces.d.ts
CHANGED
|
@@ -195,14 +195,38 @@ export namespace IOConnectWorkspaces {
|
|
|
195
195
|
activate?: boolean;
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
/**
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
198
|
+
/**
|
|
199
|
+
* Describes the size of an io.Connect window.
|
|
200
|
+
*/
|
|
201
|
+
export interface Size {
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Window width in pixels.
|
|
205
|
+
*/
|
|
202
206
|
width: number;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Window height in pixels.
|
|
210
|
+
*/
|
|
203
211
|
height: number;
|
|
204
212
|
}
|
|
205
213
|
|
|
214
|
+
/**
|
|
215
|
+
* Describes the bounds of a Workspaces Frame.
|
|
216
|
+
*/
|
|
217
|
+
export interface FrameBounds extends Size {
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Distance of the top left window corner from the top edge of the screen in pixels.
|
|
221
|
+
*/
|
|
222
|
+
top: number;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Distance of the top left window corner from the left edge of the screen in pixels.
|
|
226
|
+
*/
|
|
227
|
+
left: number;
|
|
228
|
+
}
|
|
229
|
+
|
|
206
230
|
/** An object describing the possible settings when defining a new frame. */
|
|
207
231
|
export interface NewFrameConfig {
|
|
208
232
|
|
|
@@ -252,7 +276,7 @@ export namespace IOConnectWorkspaces {
|
|
|
252
276
|
|
|
253
277
|
/**
|
|
254
278
|
* Options for closing a Frame.
|
|
255
|
-
* *Available only
|
|
279
|
+
* *Available only in **io.Connect Desktop**.*
|
|
256
280
|
* @since io.Connect Desktop 9.9
|
|
257
281
|
*/
|
|
258
282
|
export interface FrameCloseOptions {
|
|
@@ -853,6 +877,170 @@ export namespace IOConnectWorkspaces {
|
|
|
853
877
|
isInitialized: boolean;
|
|
854
878
|
}
|
|
855
879
|
|
|
880
|
+
/**
|
|
881
|
+
* Type of the dialog to show. Can be either a predefined io.Connect dialog type, or a custom one.
|
|
882
|
+
*
|
|
883
|
+
* - `YesNo` - dialog with "Yes" and "No" buttons;
|
|
884
|
+
* - `YesNoCancel` - dialog with "Yes", "No" and "Cancel" buttons;
|
|
885
|
+
* - `OkCancel` - dialog with "OK" and "Cancel" buttons;
|
|
886
|
+
* - `Ok` - dialog with an "OK" button;
|
|
887
|
+
* - `Custom` - custom dialog;
|
|
888
|
+
* - `SingleInputDialog` - dialog with a text input field;
|
|
889
|
+
*/
|
|
890
|
+
export const enum DialogType {
|
|
891
|
+
YesNo = "YesNo",
|
|
892
|
+
YesNoCancel = "YesNoCancel",
|
|
893
|
+
OkCancel = "OkCancel",
|
|
894
|
+
Ok = "Ok",
|
|
895
|
+
Custom = "Custom",
|
|
896
|
+
SingleInputDialog = "SingleInputDialog"
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
/**
|
|
900
|
+
* Mode for the dialog.
|
|
901
|
+
*
|
|
902
|
+
* - `WindowContainer` - only the container (e.g., the Workspaces Frame) of the window that is showing the dialog will be blocked for user interaction.
|
|
903
|
+
* - `Global` - all visible containers (including frameless io.Connect Windows) will be blocked. All windows within a blocked container will be blocked too.
|
|
904
|
+
*/
|
|
905
|
+
export const enum DialogMode {
|
|
906
|
+
WindowContainer = "WindowContainer",
|
|
907
|
+
Global = "Global"
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
/**
|
|
911
|
+
* Options for showing a dialog from the Workspaces Frame.
|
|
912
|
+
*/
|
|
913
|
+
export interface FrameDialogOptions {
|
|
914
|
+
|
|
915
|
+
/**
|
|
916
|
+
* Mode for the dialog.
|
|
917
|
+
*/
|
|
918
|
+
mode?: DialogMode;
|
|
919
|
+
|
|
920
|
+
/**
|
|
921
|
+
* Type of the dialog to show. Can be either a predefined io.Connect dialog type, or a custom one.
|
|
922
|
+
*/
|
|
923
|
+
type: DialogType | string;
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* Size for the dialog to show.
|
|
927
|
+
*/
|
|
928
|
+
size?: Size;
|
|
929
|
+
|
|
930
|
+
/**
|
|
931
|
+
* Message to the user that the dialog will contain.
|
|
932
|
+
*/
|
|
933
|
+
message: string;
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
* Title for the message that will be displayed in the dialog.
|
|
937
|
+
*/
|
|
938
|
+
messageTitle?: string;
|
|
939
|
+
|
|
940
|
+
/**
|
|
941
|
+
* If `true`, the user will be able to move the dialog.
|
|
942
|
+
* @default true
|
|
943
|
+
*/
|
|
944
|
+
movable?: boolean;
|
|
945
|
+
|
|
946
|
+
/**
|
|
947
|
+
* If `true`, the io.Connect Window containing the dialog will be transparent.
|
|
948
|
+
* @default false
|
|
949
|
+
*/
|
|
950
|
+
transparent?: boolean;
|
|
951
|
+
|
|
952
|
+
/**
|
|
953
|
+
* Title for the dialog that will be displayed in the dialog header.
|
|
954
|
+
*/
|
|
955
|
+
title?: string;
|
|
956
|
+
|
|
957
|
+
/**
|
|
958
|
+
* Context data that can be used by a custom dialog.
|
|
959
|
+
*/
|
|
960
|
+
context?: unknown;
|
|
961
|
+
|
|
962
|
+
/**
|
|
963
|
+
* Name for the affirmative response button.
|
|
964
|
+
*/
|
|
965
|
+
affirmativeButtonName?: string;
|
|
966
|
+
|
|
967
|
+
/**
|
|
968
|
+
* If `true`, the affirmative response button will be shown in the dialog.
|
|
969
|
+
* The default value is for custom dialogs, as predefined dialog types have different defaults.
|
|
970
|
+
* @default false
|
|
971
|
+
*/
|
|
972
|
+
showAffirmativeButton?: boolean;
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* Name for the canceling button.
|
|
976
|
+
*/
|
|
977
|
+
cancelButtonName?: string;
|
|
978
|
+
|
|
979
|
+
/**
|
|
980
|
+
* If `true`, the canceling button will be shown in the dialog.
|
|
981
|
+
* The default value is for custom dialogs, as predefined dialog types have different defaults.
|
|
982
|
+
* @default false
|
|
983
|
+
*/
|
|
984
|
+
showCancelButton?: boolean;
|
|
985
|
+
|
|
986
|
+
/**
|
|
987
|
+
* Name for the negative response button.
|
|
988
|
+
*/
|
|
989
|
+
negativeButtonName?: string;
|
|
990
|
+
|
|
991
|
+
/**
|
|
992
|
+
* If `true`, the negative response button will be shown in the dialog.
|
|
993
|
+
* The default value is for custom dialogs, predefined dialog types have different defaults.
|
|
994
|
+
* @default false
|
|
995
|
+
*/
|
|
996
|
+
showNegativeButton?: boolean;
|
|
997
|
+
|
|
998
|
+
/**
|
|
999
|
+
* Determines which dialog button to be the default one.
|
|
1000
|
+
* The action tied to the default button will be executed when the user presses `ENTER` when no button is active
|
|
1001
|
+
* (i.e., when the buttons aren't on focus and none is selected).
|
|
1002
|
+
*/
|
|
1003
|
+
defaultAction?: "affirmative" | "negative" | "cancel";
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* Interval in seconds after which the dialog will close automatically.
|
|
1007
|
+
* If `showTimer` is set to `true`, a countdown timer will be displayed in the dialog,
|
|
1008
|
+
* otherwise the dialog will close silently without a warning for the user.
|
|
1009
|
+
* If the user doesn't interact with the dialog before the timer expires,
|
|
1010
|
+
* the `action` property of the `DialogResult` object will be set to `"expired"`.
|
|
1011
|
+
*/
|
|
1012
|
+
timerDuration?: number;
|
|
1013
|
+
|
|
1014
|
+
/**
|
|
1015
|
+
* If `true`, a countdown timer will be shown in the dialog, warning the user that the dialog will close automatically after the specified time.
|
|
1016
|
+
* You must also specify a value for `timerDuration`, otherwise a timer won't be shown.
|
|
1017
|
+
* @default false
|
|
1018
|
+
*/
|
|
1019
|
+
showTimer?: boolean;
|
|
1020
|
+
|
|
1021
|
+
/**
|
|
1022
|
+
* The amount of characters that can be entered in the input field of a `SingleInputDialog`.
|
|
1023
|
+
*/
|
|
1024
|
+
inputMaxLength?: number;
|
|
1025
|
+
|
|
1026
|
+
/**
|
|
1027
|
+
* String pattern that serves as a regular expression for validating the input from the user in a `SingleInputDialog`.
|
|
1028
|
+
* If such pattern is specified and the input doesn't match it, an error will be displayed and the input field
|
|
1029
|
+
* will indicate visually that the user input is invalid.
|
|
1030
|
+
*/
|
|
1031
|
+
inputPattern?: string;
|
|
1032
|
+
|
|
1033
|
+
/**
|
|
1034
|
+
* Error message to be displayed if the user input doesn't match the specified validation pattern for a `SingleInputDialog`.
|
|
1035
|
+
*/
|
|
1036
|
+
inputPatternErrorMessage?: string;
|
|
1037
|
+
|
|
1038
|
+
/**
|
|
1039
|
+
* Placeholder that will be displayed in the input field of a `SingleInputDialog`.
|
|
1040
|
+
*/
|
|
1041
|
+
inputPlaceholder?: string;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
856
1044
|
/**
|
|
857
1045
|
* Describes a Frame (a Workspaces App instance).
|
|
858
1046
|
*/
|
|
@@ -927,14 +1115,14 @@ export namespace IOConnectWorkspaces {
|
|
|
927
1115
|
|
|
928
1116
|
/**
|
|
929
1117
|
* Retrieves the taskbar icon of the `Frame` instance.
|
|
930
|
-
* *Available only
|
|
1118
|
+
* *Available only in **io.Connect Desktop**.*
|
|
931
1119
|
* @since io.Connect Desktop 9.9
|
|
932
1120
|
*/
|
|
933
1121
|
getIcon(): Promise<Icon>;
|
|
934
1122
|
|
|
935
1123
|
/**
|
|
936
1124
|
* Sets the taskbar icon of the `Frame` instance.
|
|
937
|
-
* *Available only
|
|
1125
|
+
* *Available only in **io.Connect Desktop**.*
|
|
938
1126
|
* @param icon New icon to be displayed in the taskbar for the `Frame` instance. The icon must be encoded as a Base64 string.
|
|
939
1127
|
* @since io.Connect Desktop 9.9
|
|
940
1128
|
*/
|
|
@@ -990,9 +1178,16 @@ export namespace IOConnectWorkspaces {
|
|
|
990
1178
|
*/
|
|
991
1179
|
createWorkspace(definition: WorkspaceDefinition, config?: WorkspaceCreateConfig): Promise<Workspace>;
|
|
992
1180
|
|
|
1181
|
+
/**
|
|
1182
|
+
* Shows a dialog with a title, message, and response buttons to the user.
|
|
1183
|
+
* *Available only in **io.Connect Desktop**.*
|
|
1184
|
+
* @since io.Connect Desktop 10.0
|
|
1185
|
+
*/
|
|
1186
|
+
showDialog<T>(options: FrameDialogOptions): Promise<T>;
|
|
1187
|
+
|
|
993
1188
|
/**
|
|
994
1189
|
* Notifies when the Frame is about to be closed.
|
|
995
|
-
* *Available only
|
|
1190
|
+
* *Available only in **io.Connect Desktop**.*
|
|
996
1191
|
* @param callback Callback function for handling the event. Receives as an argument an object with options for closing the Frame.
|
|
997
1192
|
* @since io.Connect Desktop 9.9
|
|
998
1193
|
*/
|