@interopio/desktop 6.5.0 → 6.6.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Tick42
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/changelog.md CHANGED
@@ -1,3 +1,8 @@
1
+ 6.6.0
2
+ - feat: layouts - add new methods - reset, getRestoredLayoutsInfo
3
+ - feat: layouts - resume/restore methods now returns the restored instances
4
+ 6.5.1
5
+ - chore: unified repo bump
1
6
  6.5.0
2
7
  - feat: contexts - add new methods - setPath,setPaths
3
8
  - fix: windows - activate/focus never resolves in certain cases
package/desktop.d.ts CHANGED
@@ -2008,7 +2008,13 @@ export declare namespace IOConnectDesktop {
2008
2008
  * Restores a Layout.
2009
2009
  * @param options Options for restoring a Layout.
2010
2010
  */
2011
- restore(options: RestoreOptions): Promise<void>;
2011
+ restore(options: RestoreOptions): Promise<RestoreResumeResult>;
2012
+
2013
+ /**
2014
+ * Resets a Layout.
2015
+ * @param options Options for resetting a Layout.
2016
+ */
2017
+ reset(options: ResetLayoutOptions): Promise<RestoreResumeResult>;
2012
2018
 
2013
2019
  /**
2014
2020
  * Removes a Layout
@@ -2035,6 +2041,11 @@ export declare namespace IOConnectDesktop {
2035
2041
  */
2036
2042
  getCurrentLayout(): Promise<Layout | undefined>;
2037
2043
 
2044
+ /**
2045
+ * Retrieves info about the currently active Layout (ID, type, name, participating app instances), as well as about any previously active Layouts that still have running instances of their participating apps.
2046
+ */
2047
+ getRestoredLayoutsInfo(): Promise<GetRestoredLayoutsInfoResult | undefined>;
2048
+
2038
2049
  /**
2039
2050
  * Hibernates a Layout.
2040
2051
  * @param name Name of the Layout to hibernate.
@@ -2048,7 +2059,7 @@ export declare namespace IOConnectDesktop {
2048
2059
  * @param context Context for the Layout.
2049
2060
  * @param options Options for resuming a Layout.
2050
2061
  */
2051
- resume(name: string, context?: any, options?: IOConnectDesktop.Layouts.ResumeOptions): Promise<ResumeResult>;
2062
+ resume(name: string, context?: any, options?: IOConnectDesktop.Layouts.ResumeOptions): Promise<RestoreResumeResult>;
2052
2063
 
2053
2064
  /**
2054
2065
  * Updates the context saved for your app in the currently loaded Layout.
@@ -2196,17 +2207,37 @@ export declare namespace IOConnectDesktop {
2196
2207
  }
2197
2208
 
2198
2209
  /**
2199
- * Describes the result returned from resuming a Layout.
2210
+ * Describes the result returned from restoring or resuming a Layout.
2200
2211
  */
2201
- export interface ResumeResult extends LayoutResult {
2212
+ export interface RestoreResumeResult extends LayoutResult {
2202
2213
  /**
2203
- * Array of objects describing all resumed app instances participating in the Layout.
2204
- * Each object contains the instance ID and the app name of the resumed app instance.
2214
+ * Status of the Layout restore or resume operation.
2205
2215
  */
2206
- instances: {
2207
- instanceId: string,
2208
- appName: string
2209
- }[];
2216
+ status: "Success" | "Failed";
2217
+
2218
+ /**
2219
+ * ID of the Layout that was restored or resumed.
2220
+ */
2221
+ layoutId: string;
2222
+
2223
+ /**
2224
+ * List of objects describing the app instances participating in the restored or resumed Layout.
2225
+ */
2226
+ instances: RestoredInstance[];
2227
+ }
2228
+
2229
+ /**
2230
+ * Describes an app instance participating in a restored or resumed Layout.
2231
+ */
2232
+ export interface RestoredInstance {
2233
+ /**
2234
+ * Name of the app within the io.Connect framework.
2235
+ */
2236
+ appName: string;
2237
+ /**
2238
+ * Unique ID of the app instance within the io.Connect framework.
2239
+ */
2240
+ instanceId: string;
2210
2241
  }
2211
2242
 
2212
2243
  /**
@@ -2223,6 +2254,48 @@ export declare namespace IOConnectDesktop {
2223
2254
  }[];
2224
2255
  }
2225
2256
 
2257
+ /**
2258
+ * Describes the currently active Layout (ID, type, name and participating app instances), as well as any previously active Layouts that still have running instances of their participating apps.
2259
+ */
2260
+ export interface GetRestoredLayoutsInfoResult {
2261
+ /**
2262
+ * List of objects each describing the currently active Layout or any previously active Layouts.
2263
+ */
2264
+ layoutInfo: RestoredLayoutDetails[];
2265
+ }
2266
+
2267
+ /**
2268
+ * Describes a currently active Layout, or a previously active Layout that may still have running instances of its participating apps.
2269
+ */
2270
+ export interface RestoredLayoutDetails {
2271
+ /**
2272
+ * ID of the Layout.
2273
+ */
2274
+ id: string;
2275
+ /**
2276
+ * Type of the Layout.
2277
+ */
2278
+ type: string;
2279
+ /**
2280
+ * Name of the Layout.
2281
+ */
2282
+ name: string;
2283
+ /**
2284
+ * List of objects each describing the app instances participating in the Layout.
2285
+ */
2286
+ instances: RestoredLayoutInstanceInfo[];
2287
+ }
2288
+
2289
+ /**
2290
+ * Describes an app instance participating in a Layout.
2291
+ */
2292
+ export interface RestoredLayoutInstanceInfo extends RestoredInstance {
2293
+ /**
2294
+ * Flag indicating whether the app instance has been stopped.
2295
+ */
2296
+ stopped: boolean;
2297
+ }
2298
+
2226
2299
  /**
2227
2300
  * Type of the Layout component - an activity or an app.
2228
2301
  * @ignore
@@ -2409,6 +2482,31 @@ export declare namespace IOConnectDesktop {
2409
2482
  splash?: RestoreSplashOptions;
2410
2483
  }
2411
2484
 
2485
+ /**
2486
+ * Options for resetting a Layout.
2487
+ */
2488
+ export interface ResetLayoutOptions {
2489
+ /**
2490
+ * ID of the Layout to reset.
2491
+ */
2492
+ layoutId: string
2493
+ /**
2494
+ * If `true`, will reset only the visible apps. Any apps that may have been hidden programmatically won't be included in the Layout reset process.
2495
+ * @default false
2496
+ */
2497
+ visibleOnly?: boolean;
2498
+ /**
2499
+ * If `true`, will create any missing apps that may have been closed by the user or programmatically.
2500
+ * @default true
2501
+ */
2502
+ createMissing?: boolean;
2503
+ /**
2504
+ * If `true`, will reset the Layout to its default state. Set to `false` to preserve any current app context or Channel selection.
2505
+ * @default true
2506
+ */
2507
+ resetState?: boolean;
2508
+ }
2509
+
2412
2510
  /**
2413
2511
  * Options for hibernating Layouts.
2414
2512
  */
@@ -5112,6 +5210,11 @@ export declare namespace IOConnectDesktop {
5112
5210
  */
5113
5211
  jumpList: IOConnectDesktop.Windows.JumpList;
5114
5212
 
5213
+ /**
5214
+ * If `true`, the user is able to drop the current window in a Workspace.
5215
+ */
5216
+ allowWorkspaceDrop: boolean;
5217
+
5115
5218
  /**
5116
5219
  * Attaches a tab window to the current tab window.
5117
5220
  * @param tab The instance or the name of the tab window to attach.
@@ -5525,6 +5628,12 @@ export declare namespace IOConnectDesktop {
5525
5628
  */
5526
5629
  setSticky(isSticky: boolean, success?: (window: IOConnectWindow) => void, error?: (error: string) => void): Promise<IOConnectWindow>;
5527
5630
 
5631
+ /**
5632
+ * Specifies whether the user will able to drop the current window in a Workspace.
5633
+ * @param allow Flag indicating whether the user will be able to drop the window in a Workspace.
5634
+ */
5635
+ setAllowWorkspaceDrop(allow: boolean): Promise<IOConnectWindow>;
5636
+
5528
5637
  /**
5529
5638
  * Refreshes the current window.
5530
5639
  * @param ignoreCache Flag indicating whether to use the Chromium cache (if `false`), or the server cache (if `true`) when refreshing the web page. Defaults to `false`.