@interopio/desktop 6.0.2 → 6.1.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/changelog.md CHANGED
@@ -1,18 +1,24 @@
1
- 6.0.2
2
- - fix: windows - memory leak
3
- - chore: remove postinstall script
1
+ 6.1.0
2
+ - feat: layouts - when saving a layout, setAsCurrent option is added
3
+ - feat: intens - pass caller as a second arg to io.intents.register handler
4
+ - feat: windows - introduce dock method and onDockingChanged
5
+ - feat: windows - introduce autoArrange method
6
+ - feat: notifications - add support for updating notification data field and listening for updates
7
+ - fix: windows - fix isHibernated to return the correct value
8
+ - fix: windows - memory leak
9
+ - chore: notifications - add prefix to the logger
4
10
  6.0.1
5
- - fix: version 6 should work with Glue42 3.X
11
+ - fix: version 6 should work with Glue42 3.X
6
12
  6.0.0
7
- - chore: Rebranding to interop.io
8
- - fix: layouts - check for old methods for calling the new ones
9
- - fix: notifications - click interop method doesn't work if the raiser is closed
13
+ - chore: Rebranding to interop.io
14
+ - fix: layouts - check for old methods for calling the new ones
15
+ - fix: notifications - click interop method doesn't work if the raiser is closed
10
16
  5.23.1
11
- - fix: windows - update types for DialogResult
12
- - fix: windows - autoSave is optional in ExitOpts interface
13
- - fix: channels - subscribe throws error in particular case
14
- - fix: notifications - click action is working even if the raiser of the notification is closed
15
- - fix: notifications - expose toasts option in the configure method
17
+ - fix: windows - update types for DialogResult
18
+ - fix: windows - autoSave is optional in ExitOpts interface
19
+ - fix: channels - subscribe throws error in particular case
20
+ - fix: notifications - click action is working even if the raiser of the notification is closed
21
+ - fix: notifications - expose toasts option in the configure method
16
22
  5.23.0
17
23
  - fix: intents - fix for intents resolver to work from a hidden window
18
24
  - fix: notifications - add validation when raising a notification - severity, panelExpiry and toastExpiry
package/desktop.d.ts CHANGED
@@ -76,6 +76,7 @@ export declare namespace IOConnectDesktop {
76
76
  export import Logger = IOConnectCore.Logger;
77
77
  export import Metrics = IOConnectCore.Metrics;
78
78
  export import Auth = IOConnectCore.Auth;
79
+ export import FeedbackInfo = IOConnectCore.FeedbackInfo;
79
80
  export import Channels = IOConnectDesktop.Channels.API;
80
81
  export import ChannelContext = IOConnectDesktop.Channels.ChannelContext;
81
82
  export import Interop = IOConnectCore.Interop;
@@ -1455,7 +1456,7 @@ export declare namespace IOConnectDesktop {
1455
1456
  /**
1456
1457
  * Title of the app instance.
1457
1458
  */
1458
- title: string;
1459
+ title: string | undefined;
1459
1460
 
1460
1461
  /**
1461
1462
  * Whether the app instance is an activity instance.
@@ -2232,6 +2233,11 @@ export declare namespace IOConnectDesktop {
2232
2233
  */
2233
2234
  type?: LayoutType;
2234
2235
 
2236
+ /**
2237
+ * If `true`, will set the saved Layout as the current Global Layout.
2238
+ */
2239
+ setAsCurrent?: boolean;
2240
+
2235
2241
  /**
2236
2242
  * Context to be saved with the Layout.
2237
2243
  */
@@ -4372,6 +4378,38 @@ export declare namespace IOConnectDesktop {
4372
4378
  value?: string;
4373
4379
  }
4374
4380
 
4381
+ /**
4382
+ * Describes a docked window.
4383
+ */
4384
+ export interface DockingPlacement {
4385
+ /**
4386
+ * If `true`, the window is docked.
4387
+ */
4388
+ docked: boolean;
4389
+ /**
4390
+ * Position of the docked window on the screen - top, bottom, left or right.
4391
+ */
4392
+ position?: string;
4393
+ /**
4394
+ * If `true`, the docked window claims the area it occupies on the screen, in effect, reducing the working area of the screen.
4395
+ */
4396
+ claimScreenArea?: boolean;
4397
+ }
4398
+
4399
+ /**
4400
+ * Options for docking a window.
4401
+ */
4402
+ export interface DockingOptions {
4403
+ /**
4404
+ * Position of the docked window on the screen - top, bottom, left or right.
4405
+ */
4406
+ position: "top" | "bottom" | "left" | "right";
4407
+ /**
4408
+ * If `true`, the docked window will claim the area it occupies on the screen, in effect, reducing the working area of the screen.
4409
+ */
4410
+ claimScreenArea?: boolean;
4411
+ }
4412
+
4375
4413
  /**
4376
4414
  * Describes a window group.
4377
4415
  */
@@ -4558,6 +4596,14 @@ export declare namespace IOConnectDesktop {
4558
4596
  */
4559
4597
  configure(options: WindowsConfiguration): Promise<void>;
4560
4598
 
4599
+ /**
4600
+ * Arranges the io.Connect Windows automatically in a grid on the specified display using the entire working area of the display.
4601
+ * If called a second time, and the user hasn't broken manually the window arrangement, the windows will be restored to their previous state.
4602
+ * @param displayId ID of the display on which to arrange the windows.
4603
+ */
4604
+ autoArrange(displayId?: number): Promise<void>;
4605
+
4606
+
4561
4607
  /**
4562
4608
  * Notifies when the Window Management library has been fully initialized.
4563
4609
  */
@@ -4619,6 +4665,15 @@ export declare namespace IOConnectDesktop {
4619
4665
  */
4620
4666
  onWindowLostFocus(callback: (window: IOConnectWindow) => void): UnsubscribeFunction;
4621
4667
 
4668
+ /**
4669
+ * Notifies when io.Connect Windows are arranged automatically or restored to their previous state using the `autoArrange()` method.
4670
+ * The event will fire also when the user manually breaks the automatic window arrangement.
4671
+ * @param callback Callback function for handling the event. Receives an object with `areWindowsArranged` and `displayId` properties.
4672
+ * The `areWindowsArranged` flag will be set to `true` if the `autoArrange()` method is called initially for arranging the windows.
4673
+ * When the method is called a second time for restoring the windows to their previous state, or the user manually breaks the window arrangement, the flag will be `false`.
4674
+ */
4675
+ onArrangementChanged(callback: (data: { areWindowsArranged: boolean; displayId: number; }) => void): UnsubscribeFunction;
4676
+
4622
4677
  /**
4623
4678
  * Generic event handler.
4624
4679
  * @ignore
@@ -5374,6 +5429,19 @@ export declare namespace IOConnectDesktop {
5374
5429
  */
5375
5430
  showDialog<T>(options: DialogOptions): Promise<T | DialogResult>
5376
5431
 
5432
+ /**
5433
+ * Retrieves the docking placement information for the current window.
5434
+ * @since io.Connect Desktop 9.1.0
5435
+ */
5436
+ getDockingPlacement(): Promise<DockingPlacement>;
5437
+
5438
+ /**
5439
+ * Docks the window at the specified position.
5440
+ * @param options Options for docking the window.
5441
+ * @since io.Connect Desktop 9.1.0
5442
+ */
5443
+ dock(options: DockingOptions): Promise<DockingPlacement>;
5444
+
5377
5445
  /**
5378
5446
  * Notifies when a window is attached to the current window.
5379
5447
  * @param callback Callback function for handling the event.
@@ -5563,6 +5631,13 @@ export declare namespace IOConnectDesktop {
5563
5631
  * @param callback Callback function for handling the event.
5564
5632
  */
5565
5633
  onNavigating(callback: (args: { newUrl: string }) => Promise<void>): void;
5634
+
5635
+ /**
5636
+ * Notifies when the window docking placement is changed.
5637
+ * @param callback Callback function for handling the event.
5638
+ * @since io.Connect Desktop 9.1.0
5639
+ */
5640
+ onDockingChanged(callback: (window: IOConnectDesktop.Windows.IOConnectWindow, dockingPlacement: DockingPlacement) => void): UnsubscribeFunction
5566
5641
  }
5567
5642
 
5568
5643
  /**
@@ -5932,9 +6007,9 @@ export declare namespace IOConnectDesktop {
5932
6007
  * use this method to supply a handler for the specified Intent. Otherwise, you can use it to register your app as an Intent handler
5933
6008
  * dynamically at runtime. Dynamically registered Intent handlers share the life span of the respective app instance.
5934
6009
  * @param intent The name of the Intent to be handled, or an object specifying the Intent name and additional settings for handling the Intent.
5935
- * @param handler Handler function for the raised Intent.
6010
+ * @param handler The callback that will handle a raised intent. Will be called with an IntentContext if it is provided by the raising application and caller - the Interop Instance which raised the intent
5936
6011
  */
5937
- register(intent: string | AddIntentListenerRequest, handler: (context: IntentContext) => any): Promise<{ unsubscribe: UnsubscribeFunction }>;
6012
+ register(intent: string | AddIntentListenerRequest, handler: (context: IntentContext, caller?: IOConnectDesktop.Interop.Instance) => any): Promise<{ unsubscribe: UnsubscribeFunction }>;
5938
6013
 
5939
6014
  /**
5940
6015
  * Retrieves Intents by a specified filter. If no filter is supplied, all available Intents will be retrieved.
@@ -6320,6 +6395,13 @@ export declare namespace IOConnectDesktop {
6320
6395
  */
6321
6396
  setState(id: string, state: State): Promise<void>;
6322
6397
 
6398
+ /**
6399
+ * Sets or updates the arbitrary data associated with the notification which is available in the `data` property of the notification.
6400
+ * @param id ID of the notification whose data to update.
6401
+ * @param data New notification data.
6402
+ */
6403
+ updateData(id: string, data: unknown): Promise<void>;
6404
+
6323
6405
  /**
6324
6406
  * Notifies when a new notification is raised.
6325
6407
  * @param callback Callback function for handling the event.
@@ -6342,13 +6424,19 @@ export declare namespace IOConnectDesktop {
6342
6424
  * Notifies when the global notification settings are changed.
6343
6425
  * @param callback Callback function for handling the event.
6344
6426
  */
6345
- onConfigurationChanged(callback: (config: Configuration, apps: number) => void): UnsubscribeFunction;
6427
+ onConfigurationChanged(callback: (config: Configuration) => void): UnsubscribeFunction;
6346
6428
 
6347
6429
  /**
6348
6430
  * Notifies when the notification counter is changed.
6349
6431
  * @param callback Callback function for handling the event.
6350
6432
  */
6351
6433
  onCounterChanged(callback: (info: { count: number }) => void): UnsubscribeFunction;
6434
+
6435
+ /**
6436
+ * Notifies when the arbitrary data associated with the notification (available in the `data` property of the notification) is changed.
6437
+ * @param callback Callback function for handling the event.
6438
+ */
6439
+ onDataChanged<T>(callback: (data: T) => void): UnsubscribeFunction
6352
6440
  }
6353
6441
 
6354
6442
  /**
@@ -6454,7 +6542,7 @@ export declare namespace IOConnectDesktop {
6454
6542
  */
6455
6543
  export interface NotificationData extends IOConnectNotificationOptions {
6456
6544
  /**
6457
- * ID of the notification.
6545
+ * ID for the notification.
6458
6546
  */
6459
6547
  id: string;
6460
6548
 
@@ -6592,6 +6680,11 @@ export declare namespace IOConnectDesktop {
6592
6680
  * Options for raising an io.Connect notification.
6593
6681
  */
6594
6682
  export interface IOConnectNotificationOptions extends NotificationDefinition {
6683
+ /**
6684
+ * Id for the notification.
6685
+ */
6686
+ id?: string;
6687
+
6595
6688
  /**
6596
6689
  * Title for the notification.
6597
6690
  */
@@ -6617,6 +6710,12 @@ export declare namespace IOConnectDesktop {
6617
6710
  */
6618
6711
  severity?: "Low" | "Medium" | "High" | "Critical" | "None";
6619
6712
 
6713
+ /**
6714
+ * Notification state.
6715
+ * @default "Active"
6716
+ */
6717
+ state?: State;
6718
+
6620
6719
  /**
6621
6720
  * Can be used for overwriting the name of the actual notification source.
6622
6721
  */