@openfin/fdc3-api 41.83.3 → 41.100.18

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.
@@ -590,6 +590,23 @@ declare class Application extends EmitterBase<OpenFin.ApplicationEvent> {
590
590
  * ```
591
591
  */
592
592
  setTrayIcon(icon: string): Promise<void>;
593
+ /**
594
+ * Set hover text for this application's system tray icon.
595
+ * Note: Application must first set a tray icon with {@link Application.setTrayIcon}.
596
+ * @param toolTip
597
+ *
598
+ * @example
599
+ *
600
+ * ```js
601
+ * const app = fin.Application.getCurrentSync();
602
+ * const iconUrl = "http://cdn.openfin.co/assets/testing/icons/circled-digit-one.png";
603
+ *
604
+ * await app.setTrayIcon(iconUrl);
605
+ *
606
+ * await app.setTrayIconToolTip('My Application');
607
+ * ```
608
+ */
609
+ setTrayIconToolTip(toolTip: string): Promise<void>;
593
610
  /**
594
611
  * Sets new application's shortcut configuration. Windows only.
595
612
  * @param config New application's shortcut configuration.
@@ -1661,6 +1678,8 @@ declare type BaseConfig = {
1661
1678
  timeout?: number;
1662
1679
  };
1663
1680
 
1681
+ declare type BaseContentBehavior = 'allow' | 'block';
1682
+
1664
1683
  /**
1665
1684
  * Properties shared by all content creation rules, regardless of context.
1666
1685
  *
@@ -1804,6 +1823,10 @@ declare type BaseLoadFailedEvent = NamedEvent & {
1804
1823
  isMainFrame: boolean;
1805
1824
  };
1806
1825
 
1826
+ declare type BaseStructuredContentBehavior = {
1827
+ behavior: BaseContentBehavior;
1828
+ };
1829
+
1807
1830
  declare type BaseUrlEvent = NamedEvent & {
1808
1831
  type: 'url-changed';
1809
1832
  url: string;
@@ -1904,6 +1927,15 @@ declare type BoundsDidChangeEvent = BoundsChangeEvent & {
1904
1927
 
1905
1928
  declare type BoundsEvent = BaseEvent_5 & OpenFin.Bounds;
1906
1929
 
1930
+ declare type BrowserContentBehavior = {
1931
+ behavior: 'browser';
1932
+ /**
1933
+ * Additional property that can be specified when setting the behavior to browser.
1934
+ * When set to true will close the Window or View that tried to navigate or redirect to the blocked URL.
1935
+ */
1936
+ closeExisting?: boolean;
1937
+ };
1938
+
1907
1939
  /**
1908
1940
  * A rule prescribing content creation in the browser.
1909
1941
  *
@@ -3670,6 +3702,13 @@ declare type ConstWindowOptions = {
3670
3702
  * @deprecated - use `icon` instead.
3671
3703
  */
3672
3704
  taskbarIcon: string;
3705
+ /**
3706
+ * Specify a taskbar group for the window.
3707
+ * _Can be shared across applications._
3708
+ * _If omitted from a main window, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
3709
+ * _Use `platform.defaultWindowOptions.taskbarIconGroup` to set a default for platform applications._
3710
+ */
3711
+ taskbarIconGroup: string;
3673
3712
  /**
3674
3713
  * @defaultValue "about:blank"
3675
3714
  *
@@ -3720,6 +3759,15 @@ declare type ContainerCreatedEvent = LayoutDOMEvent & {
3720
3759
  type: 'container-created';
3721
3760
  };
3722
3761
 
3762
+ /**
3763
+ * Sets the behavior for when a Window or View navigates or redirects to a matching URL
3764
+ *
3765
+ * 'allow': The content url is allowed.
3766
+ * 'block': The content url is blocked.
3767
+ * 'browser': The content url is blocked and it is opened in the system's default web browser.
3768
+ */
3769
+ declare type ContentBehavior = BaseContentBehavior | 'browser';
3770
+
3723
3771
  /**
3724
3772
  * Generated when content navigation or redirection is blocked by {@link OpenFin.DomainSettings}.
3725
3773
  * @interface
@@ -3807,12 +3855,9 @@ declare type ContentCreationRulesEvent = NamedEvent & {
3807
3855
  declare type ContentNavigation = NavigationRules;
3808
3856
 
3809
3857
  /**
3810
- * Whether a content url is allowed or blocked for navigation or redirection.
3811
- *
3812
- * * 'allow': The content url is allowed.
3813
- * * 'block': The content url is blocked.
3858
+ * Controls whether a content url is allowed or blocked for navigation in Windows and Views or redirection for Windows, Views and iframes.
3814
3859
  */
3815
- declare type ContentPermission = 'allow' | 'block';
3860
+ declare type ContentPermission = ContentBehavior | StructuredContentBehavior | StructuredContentPermissions;
3816
3861
 
3817
3862
  /**
3818
3863
  * Restrict redirects to URLs that match an allowed pattern.
@@ -9387,6 +9432,10 @@ declare type MutableWindowOptions = {
9387
9432
  showTaskbarIcon: boolean;
9388
9433
  /**
9389
9434
  * Specify a taskbar group for the window.
9435
+ * _Can be shared across applications._
9436
+ *
9437
+ * _If omitted from a main window, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
9438
+ * _Use `platform.defaultWindowOptions.taskbarIconGroup` to set a default for platform applications._
9390
9439
  * _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
9391
9440
  * @remarks It's only updatable when `enableJumpList` is set to false.
9392
9441
  */
@@ -9426,13 +9475,14 @@ declare type NativeWindowIntegrationProviderAuthorization = {
9426
9475
  };
9427
9476
 
9428
9477
  /**
9429
- * Generated when view navigation is rejected as per contentNavigation allowlist/denylist rules.
9478
+ * Generated when view navigation is rejected as per contentNavigation allowlist/denylist rules or when blocked by a domain-based permission content rule.
9430
9479
  * @interface
9431
9480
  */
9432
9481
  declare type NavigationRejectedEvent = NamedEvent & {
9433
9482
  type: 'navigation-rejected';
9434
9483
  sourceName?: string;
9435
9484
  url: string;
9485
+ contentRule?: OpenFin.ContentPermission | undefined;
9436
9486
  };
9437
9487
 
9438
9488
  /**
@@ -9794,6 +9844,12 @@ declare namespace OpenFin {
9794
9844
  DomainSettings,
9795
9845
  ApiInjection,
9796
9846
  DomainApiSettings,
9847
+ BaseContentBehavior,
9848
+ ContentBehavior,
9849
+ BaseStructuredContentBehavior,
9850
+ BrowserContentBehavior,
9851
+ StructuredContentBehavior,
9852
+ StructuredContentPermissions,
9797
9853
  ContentPermission,
9798
9854
  PerDomainSettings,
9799
9855
  DomainSettingsRule,
@@ -12112,6 +12168,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
12112
12168
  'set-tray-icon': ApplicationIdentityCall<{
12113
12169
  enabledIcon: string;
12114
12170
  }, void>;
12171
+ 'set-tray-icon-tooltip': ApplicationIdentityCall<{
12172
+ toolTip: string;
12173
+ }>;
12115
12174
  'set-shortcuts': ApplicationIdentityCall<{
12116
12175
  data: OpenFin.ShortCutConfig;
12117
12176
  }, void>;
@@ -13735,6 +13794,29 @@ declare type StartedEvent = BaseEvents.IdentityEvent & {
13735
13794
  type: 'started';
13736
13795
  };
13737
13796
 
13797
+ /**
13798
+ * Allows more control over content behaviors
13799
+ */
13800
+ declare type StructuredContentBehavior = BaseStructuredContentBehavior | BrowserContentBehavior;
13801
+
13802
+ /**
13803
+ * Specify rules for specific actions.
13804
+ */
13805
+ declare type StructuredContentPermissions = {
13806
+ /**
13807
+ * Controls the behavior for navigations
13808
+ */
13809
+ navigate?: ContentBehavior | StructuredContentBehavior;
13810
+ /**
13811
+ * Controls the behavior for redirects
13812
+ */
13813
+ redirect?: ContentBehavior | StructuredContentBehavior;
13814
+ /**
13815
+ * Controls the behavior for when iframes try to redirect
13816
+ */
13817
+ iframe?: BaseContentBehavior;
13818
+ };
13819
+
13738
13820
  /**
13739
13821
  * @interface
13740
13822
  */
@@ -17244,7 +17326,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17244
17326
  * bounds: {top: 10, left: 10, width: 200, height: 200}
17245
17327
  * });
17246
17328
  *
17247
- * await view.navigate('http://mdn.github.io/simple-shared-worker/index2.html');
17329
+ * await view.navigate('https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/');
17248
17330
  *
17249
17331
  * const sharedWorkers = await view.getSharedWorkers();
17250
17332
  * ```
@@ -17255,7 +17337,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17255
17337
  * name:'child',
17256
17338
  * defaultWidth: 300,
17257
17339
  * defaultHeight: 300,
17258
- * url: 'http://mdn.github.io/simple-shared-worker/index2.html',
17340
+ * url: 'https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/',
17259
17341
  * frame: true,
17260
17342
  * autoShow: true
17261
17343
  * };
@@ -17280,7 +17362,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17280
17362
  * bounds: {top: 10, left: 10, width: 200, height: 200}
17281
17363
  * });
17282
17364
  *
17283
- * await view.navigate('http://mdn.github.io/simple-shared-worker/index2.html');
17365
+ * await view.navigate('https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/');
17284
17366
  *
17285
17367
  * await view.inspectSharedWorker();
17286
17368
  * ```
@@ -17291,7 +17373,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17291
17373
  * name:'child',
17292
17374
  * defaultWidth: 300,
17293
17375
  * defaultHeight: 300,
17294
- * url: 'http://mdn.github.io/simple-shared-worker/index2.html',
17376
+ * url: 'https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/',
17295
17377
  * frame: true,
17296
17378
  * autoShow: true
17297
17379
  * };
@@ -17317,7 +17399,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17317
17399
  * bounds: {top: 10, left: 10, width: 200, height: 200}
17318
17400
  * });
17319
17401
  *
17320
- * await view.navigate('http://mdn.github.io/simple-shared-worker/index2.html');
17402
+ * await view.navigate('https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/');
17321
17403
  *
17322
17404
  * const sharedWorkers = await view.getSharedWorkers();
17323
17405
  * await view.inspectSharedWorkerById(sharedWorkers[0].id);
@@ -17329,7 +17411,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17329
17411
  * name:'child',
17330
17412
  * defaultWidth: 300,
17331
17413
  * defaultHeight: 300,
17332
- * url: 'http://mdn.github.io/simple-shared-worker/index2.html',
17414
+ * url: 'https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/',
17333
17415
  * frame: true,
17334
17416
  * autoShow: true
17335
17417
  * };
@@ -590,6 +590,23 @@ declare class Application extends EmitterBase<OpenFin.ApplicationEvent> {
590
590
  * ```
591
591
  */
592
592
  setTrayIcon(icon: string): Promise<void>;
593
+ /**
594
+ * Set hover text for this application's system tray icon.
595
+ * Note: Application must first set a tray icon with {@link Application.setTrayIcon}.
596
+ * @param toolTip
597
+ *
598
+ * @example
599
+ *
600
+ * ```js
601
+ * const app = fin.Application.getCurrentSync();
602
+ * const iconUrl = "http://cdn.openfin.co/assets/testing/icons/circled-digit-one.png";
603
+ *
604
+ * await app.setTrayIcon(iconUrl);
605
+ *
606
+ * await app.setTrayIconToolTip('My Application');
607
+ * ```
608
+ */
609
+ setTrayIconToolTip(toolTip: string): Promise<void>;
593
610
  /**
594
611
  * Sets new application's shortcut configuration. Windows only.
595
612
  * @param config New application's shortcut configuration.
@@ -1661,6 +1678,8 @@ declare type BaseConfig = {
1661
1678
  timeout?: number;
1662
1679
  };
1663
1680
 
1681
+ declare type BaseContentBehavior = 'allow' | 'block';
1682
+
1664
1683
  /**
1665
1684
  * Properties shared by all content creation rules, regardless of context.
1666
1685
  *
@@ -1804,6 +1823,10 @@ declare type BaseLoadFailedEvent = NamedEvent & {
1804
1823
  isMainFrame: boolean;
1805
1824
  };
1806
1825
 
1826
+ declare type BaseStructuredContentBehavior = {
1827
+ behavior: BaseContentBehavior;
1828
+ };
1829
+
1807
1830
  declare type BaseUrlEvent = NamedEvent & {
1808
1831
  type: 'url-changed';
1809
1832
  url: string;
@@ -1904,6 +1927,15 @@ declare type BoundsDidChangeEvent = BoundsChangeEvent & {
1904
1927
 
1905
1928
  declare type BoundsEvent = BaseEvent_5 & OpenFin.Bounds;
1906
1929
 
1930
+ declare type BrowserContentBehavior = {
1931
+ behavior: 'browser';
1932
+ /**
1933
+ * Additional property that can be specified when setting the behavior to browser.
1934
+ * When set to true will close the Window or View that tried to navigate or redirect to the blocked URL.
1935
+ */
1936
+ closeExisting?: boolean;
1937
+ };
1938
+
1907
1939
  /**
1908
1940
  * A rule prescribing content creation in the browser.
1909
1941
  *
@@ -3670,6 +3702,13 @@ declare type ConstWindowOptions = {
3670
3702
  * @deprecated - use `icon` instead.
3671
3703
  */
3672
3704
  taskbarIcon: string;
3705
+ /**
3706
+ * Specify a taskbar group for the window.
3707
+ * _Can be shared across applications._
3708
+ * _If omitted from a main window, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
3709
+ * _Use `platform.defaultWindowOptions.taskbarIconGroup` to set a default for platform applications._
3710
+ */
3711
+ taskbarIconGroup: string;
3673
3712
  /**
3674
3713
  * @defaultValue "about:blank"
3675
3714
  *
@@ -3720,6 +3759,15 @@ declare type ContainerCreatedEvent = LayoutDOMEvent & {
3720
3759
  type: 'container-created';
3721
3760
  };
3722
3761
 
3762
+ /**
3763
+ * Sets the behavior for when a Window or View navigates or redirects to a matching URL
3764
+ *
3765
+ * 'allow': The content url is allowed.
3766
+ * 'block': The content url is blocked.
3767
+ * 'browser': The content url is blocked and it is opened in the system's default web browser.
3768
+ */
3769
+ declare type ContentBehavior = BaseContentBehavior | 'browser';
3770
+
3723
3771
  /**
3724
3772
  * Generated when content navigation or redirection is blocked by {@link OpenFin.DomainSettings}.
3725
3773
  * @interface
@@ -3807,12 +3855,9 @@ declare type ContentCreationRulesEvent = NamedEvent & {
3807
3855
  declare type ContentNavigation = NavigationRules;
3808
3856
 
3809
3857
  /**
3810
- * Whether a content url is allowed or blocked for navigation or redirection.
3811
- *
3812
- * * 'allow': The content url is allowed.
3813
- * * 'block': The content url is blocked.
3858
+ * Controls whether a content url is allowed or blocked for navigation in Windows and Views or redirection for Windows, Views and iframes.
3814
3859
  */
3815
- declare type ContentPermission = 'allow' | 'block';
3860
+ declare type ContentPermission = ContentBehavior | StructuredContentBehavior | StructuredContentPermissions;
3816
3861
 
3817
3862
  /**
3818
3863
  * Restrict redirects to URLs that match an allowed pattern.
@@ -9387,6 +9432,10 @@ declare type MutableWindowOptions = {
9387
9432
  showTaskbarIcon: boolean;
9388
9433
  /**
9389
9434
  * Specify a taskbar group for the window.
9435
+ * _Can be shared across applications._
9436
+ *
9437
+ * _If omitted from a main window, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
9438
+ * _Use `platform.defaultWindowOptions.taskbarIconGroup` to set a default for platform applications._
9390
9439
  * _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
9391
9440
  * @remarks It's only updatable when `enableJumpList` is set to false.
9392
9441
  */
@@ -9426,13 +9475,14 @@ declare type NativeWindowIntegrationProviderAuthorization = {
9426
9475
  };
9427
9476
 
9428
9477
  /**
9429
- * Generated when view navigation is rejected as per contentNavigation allowlist/denylist rules.
9478
+ * Generated when view navigation is rejected as per contentNavigation allowlist/denylist rules or when blocked by a domain-based permission content rule.
9430
9479
  * @interface
9431
9480
  */
9432
9481
  declare type NavigationRejectedEvent = NamedEvent & {
9433
9482
  type: 'navigation-rejected';
9434
9483
  sourceName?: string;
9435
9484
  url: string;
9485
+ contentRule?: OpenFin.ContentPermission | undefined;
9436
9486
  };
9437
9487
 
9438
9488
  /**
@@ -9794,6 +9844,12 @@ declare namespace OpenFin {
9794
9844
  DomainSettings,
9795
9845
  ApiInjection,
9796
9846
  DomainApiSettings,
9847
+ BaseContentBehavior,
9848
+ ContentBehavior,
9849
+ BaseStructuredContentBehavior,
9850
+ BrowserContentBehavior,
9851
+ StructuredContentBehavior,
9852
+ StructuredContentPermissions,
9797
9853
  ContentPermission,
9798
9854
  PerDomainSettings,
9799
9855
  DomainSettingsRule,
@@ -12112,6 +12168,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
12112
12168
  'set-tray-icon': ApplicationIdentityCall<{
12113
12169
  enabledIcon: string;
12114
12170
  }, void>;
12171
+ 'set-tray-icon-tooltip': ApplicationIdentityCall<{
12172
+ toolTip: string;
12173
+ }>;
12115
12174
  'set-shortcuts': ApplicationIdentityCall<{
12116
12175
  data: OpenFin.ShortCutConfig;
12117
12176
  }, void>;
@@ -13735,6 +13794,29 @@ declare type StartedEvent = BaseEvents.IdentityEvent & {
13735
13794
  type: 'started';
13736
13795
  };
13737
13796
 
13797
+ /**
13798
+ * Allows more control over content behaviors
13799
+ */
13800
+ declare type StructuredContentBehavior = BaseStructuredContentBehavior | BrowserContentBehavior;
13801
+
13802
+ /**
13803
+ * Specify rules for specific actions.
13804
+ */
13805
+ declare type StructuredContentPermissions = {
13806
+ /**
13807
+ * Controls the behavior for navigations
13808
+ */
13809
+ navigate?: ContentBehavior | StructuredContentBehavior;
13810
+ /**
13811
+ * Controls the behavior for redirects
13812
+ */
13813
+ redirect?: ContentBehavior | StructuredContentBehavior;
13814
+ /**
13815
+ * Controls the behavior for when iframes try to redirect
13816
+ */
13817
+ iframe?: BaseContentBehavior;
13818
+ };
13819
+
13738
13820
  /**
13739
13821
  * @interface
13740
13822
  */
@@ -17244,7 +17326,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17244
17326
  * bounds: {top: 10, left: 10, width: 200, height: 200}
17245
17327
  * });
17246
17328
  *
17247
- * await view.navigate('http://mdn.github.io/simple-shared-worker/index2.html');
17329
+ * await view.navigate('https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/');
17248
17330
  *
17249
17331
  * const sharedWorkers = await view.getSharedWorkers();
17250
17332
  * ```
@@ -17255,7 +17337,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17255
17337
  * name:'child',
17256
17338
  * defaultWidth: 300,
17257
17339
  * defaultHeight: 300,
17258
- * url: 'http://mdn.github.io/simple-shared-worker/index2.html',
17340
+ * url: 'https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/',
17259
17341
  * frame: true,
17260
17342
  * autoShow: true
17261
17343
  * };
@@ -17280,7 +17362,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17280
17362
  * bounds: {top: 10, left: 10, width: 200, height: 200}
17281
17363
  * });
17282
17364
  *
17283
- * await view.navigate('http://mdn.github.io/simple-shared-worker/index2.html');
17365
+ * await view.navigate('https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/');
17284
17366
  *
17285
17367
  * await view.inspectSharedWorker();
17286
17368
  * ```
@@ -17291,7 +17373,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17291
17373
  * name:'child',
17292
17374
  * defaultWidth: 300,
17293
17375
  * defaultHeight: 300,
17294
- * url: 'http://mdn.github.io/simple-shared-worker/index2.html',
17376
+ * url: 'https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/',
17295
17377
  * frame: true,
17296
17378
  * autoShow: true
17297
17379
  * };
@@ -17317,7 +17399,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17317
17399
  * bounds: {top: 10, left: 10, width: 200, height: 200}
17318
17400
  * });
17319
17401
  *
17320
- * await view.navigate('http://mdn.github.io/simple-shared-worker/index2.html');
17402
+ * await view.navigate('https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/');
17321
17403
  *
17322
17404
  * const sharedWorkers = await view.getSharedWorkers();
17323
17405
  * await view.inspectSharedWorkerById(sharedWorkers[0].id);
@@ -17329,7 +17411,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17329
17411
  * name:'child',
17330
17412
  * defaultWidth: 300,
17331
17413
  * defaultHeight: 300,
17332
- * url: 'http://mdn.github.io/simple-shared-worker/index2.html',
17414
+ * url: 'https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/',
17333
17415
  * frame: true,
17334
17416
  * autoShow: true
17335
17417
  * };
@@ -590,6 +590,23 @@ declare class Application extends EmitterBase<OpenFin.ApplicationEvent> {
590
590
  * ```
591
591
  */
592
592
  setTrayIcon(icon: string): Promise<void>;
593
+ /**
594
+ * Set hover text for this application's system tray icon.
595
+ * Note: Application must first set a tray icon with {@link Application.setTrayIcon}.
596
+ * @param toolTip
597
+ *
598
+ * @example
599
+ *
600
+ * ```js
601
+ * const app = fin.Application.getCurrentSync();
602
+ * const iconUrl = "http://cdn.openfin.co/assets/testing/icons/circled-digit-one.png";
603
+ *
604
+ * await app.setTrayIcon(iconUrl);
605
+ *
606
+ * await app.setTrayIconToolTip('My Application');
607
+ * ```
608
+ */
609
+ setTrayIconToolTip(toolTip: string): Promise<void>;
593
610
  /**
594
611
  * Sets new application's shortcut configuration. Windows only.
595
612
  * @param config New application's shortcut configuration.
@@ -1661,6 +1678,8 @@ declare type BaseConfig = {
1661
1678
  timeout?: number;
1662
1679
  };
1663
1680
 
1681
+ declare type BaseContentBehavior = 'allow' | 'block';
1682
+
1664
1683
  /**
1665
1684
  * Properties shared by all content creation rules, regardless of context.
1666
1685
  *
@@ -1804,6 +1823,10 @@ declare type BaseLoadFailedEvent = NamedEvent & {
1804
1823
  isMainFrame: boolean;
1805
1824
  };
1806
1825
 
1826
+ declare type BaseStructuredContentBehavior = {
1827
+ behavior: BaseContentBehavior;
1828
+ };
1829
+
1807
1830
  declare type BaseUrlEvent = NamedEvent & {
1808
1831
  type: 'url-changed';
1809
1832
  url: string;
@@ -1904,6 +1927,15 @@ declare type BoundsDidChangeEvent = BoundsChangeEvent & {
1904
1927
 
1905
1928
  declare type BoundsEvent = BaseEvent_5 & OpenFin.Bounds;
1906
1929
 
1930
+ declare type BrowserContentBehavior = {
1931
+ behavior: 'browser';
1932
+ /**
1933
+ * Additional property that can be specified when setting the behavior to browser.
1934
+ * When set to true will close the Window or View that tried to navigate or redirect to the blocked URL.
1935
+ */
1936
+ closeExisting?: boolean;
1937
+ };
1938
+
1907
1939
  /**
1908
1940
  * A rule prescribing content creation in the browser.
1909
1941
  *
@@ -3670,6 +3702,13 @@ declare type ConstWindowOptions = {
3670
3702
  * @deprecated - use `icon` instead.
3671
3703
  */
3672
3704
  taskbarIcon: string;
3705
+ /**
3706
+ * Specify a taskbar group for the window.
3707
+ * _Can be shared across applications._
3708
+ * _If omitted from a main window, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
3709
+ * _Use `platform.defaultWindowOptions.taskbarIconGroup` to set a default for platform applications._
3710
+ */
3711
+ taskbarIconGroup: string;
3673
3712
  /**
3674
3713
  * @defaultValue "about:blank"
3675
3714
  *
@@ -3720,6 +3759,15 @@ declare type ContainerCreatedEvent = LayoutDOMEvent & {
3720
3759
  type: 'container-created';
3721
3760
  };
3722
3761
 
3762
+ /**
3763
+ * Sets the behavior for when a Window or View navigates or redirects to a matching URL
3764
+ *
3765
+ * 'allow': The content url is allowed.
3766
+ * 'block': The content url is blocked.
3767
+ * 'browser': The content url is blocked and it is opened in the system's default web browser.
3768
+ */
3769
+ declare type ContentBehavior = BaseContentBehavior | 'browser';
3770
+
3723
3771
  /**
3724
3772
  * Generated when content navigation or redirection is blocked by {@link OpenFin.DomainSettings}.
3725
3773
  * @interface
@@ -3807,12 +3855,9 @@ declare type ContentCreationRulesEvent = NamedEvent & {
3807
3855
  declare type ContentNavigation = NavigationRules;
3808
3856
 
3809
3857
  /**
3810
- * Whether a content url is allowed or blocked for navigation or redirection.
3811
- *
3812
- * * 'allow': The content url is allowed.
3813
- * * 'block': The content url is blocked.
3858
+ * Controls whether a content url is allowed or blocked for navigation in Windows and Views or redirection for Windows, Views and iframes.
3814
3859
  */
3815
- declare type ContentPermission = 'allow' | 'block';
3860
+ declare type ContentPermission = ContentBehavior | StructuredContentBehavior | StructuredContentPermissions;
3816
3861
 
3817
3862
  /**
3818
3863
  * Restrict redirects to URLs that match an allowed pattern.
@@ -9387,6 +9432,10 @@ declare type MutableWindowOptions = {
9387
9432
  showTaskbarIcon: boolean;
9388
9433
  /**
9389
9434
  * Specify a taskbar group for the window.
9435
+ * _Can be shared across applications._
9436
+ *
9437
+ * _If omitted from a main window, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
9438
+ * _Use `platform.defaultWindowOptions.taskbarIconGroup` to set a default for platform applications._
9390
9439
  * _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
9391
9440
  * @remarks It's only updatable when `enableJumpList` is set to false.
9392
9441
  */
@@ -9426,13 +9475,14 @@ declare type NativeWindowIntegrationProviderAuthorization = {
9426
9475
  };
9427
9476
 
9428
9477
  /**
9429
- * Generated when view navigation is rejected as per contentNavigation allowlist/denylist rules.
9478
+ * Generated when view navigation is rejected as per contentNavigation allowlist/denylist rules or when blocked by a domain-based permission content rule.
9430
9479
  * @interface
9431
9480
  */
9432
9481
  declare type NavigationRejectedEvent = NamedEvent & {
9433
9482
  type: 'navigation-rejected';
9434
9483
  sourceName?: string;
9435
9484
  url: string;
9485
+ contentRule?: OpenFin.ContentPermission | undefined;
9436
9486
  };
9437
9487
 
9438
9488
  /**
@@ -9794,6 +9844,12 @@ declare namespace OpenFin {
9794
9844
  DomainSettings,
9795
9845
  ApiInjection,
9796
9846
  DomainApiSettings,
9847
+ BaseContentBehavior,
9848
+ ContentBehavior,
9849
+ BaseStructuredContentBehavior,
9850
+ BrowserContentBehavior,
9851
+ StructuredContentBehavior,
9852
+ StructuredContentPermissions,
9797
9853
  ContentPermission,
9798
9854
  PerDomainSettings,
9799
9855
  DomainSettingsRule,
@@ -12112,6 +12168,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
12112
12168
  'set-tray-icon': ApplicationIdentityCall<{
12113
12169
  enabledIcon: string;
12114
12170
  }, void>;
12171
+ 'set-tray-icon-tooltip': ApplicationIdentityCall<{
12172
+ toolTip: string;
12173
+ }>;
12115
12174
  'set-shortcuts': ApplicationIdentityCall<{
12116
12175
  data: OpenFin.ShortCutConfig;
12117
12176
  }, void>;
@@ -13735,6 +13794,29 @@ declare type StartedEvent = BaseEvents.IdentityEvent & {
13735
13794
  type: 'started';
13736
13795
  };
13737
13796
 
13797
+ /**
13798
+ * Allows more control over content behaviors
13799
+ */
13800
+ declare type StructuredContentBehavior = BaseStructuredContentBehavior | BrowserContentBehavior;
13801
+
13802
+ /**
13803
+ * Specify rules for specific actions.
13804
+ */
13805
+ declare type StructuredContentPermissions = {
13806
+ /**
13807
+ * Controls the behavior for navigations
13808
+ */
13809
+ navigate?: ContentBehavior | StructuredContentBehavior;
13810
+ /**
13811
+ * Controls the behavior for redirects
13812
+ */
13813
+ redirect?: ContentBehavior | StructuredContentBehavior;
13814
+ /**
13815
+ * Controls the behavior for when iframes try to redirect
13816
+ */
13817
+ iframe?: BaseContentBehavior;
13818
+ };
13819
+
13738
13820
  /**
13739
13821
  * @interface
13740
13822
  */
@@ -17244,7 +17326,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17244
17326
  * bounds: {top: 10, left: 10, width: 200, height: 200}
17245
17327
  * });
17246
17328
  *
17247
- * await view.navigate('http://mdn.github.io/simple-shared-worker/index2.html');
17329
+ * await view.navigate('https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/');
17248
17330
  *
17249
17331
  * const sharedWorkers = await view.getSharedWorkers();
17250
17332
  * ```
@@ -17255,7 +17337,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17255
17337
  * name:'child',
17256
17338
  * defaultWidth: 300,
17257
17339
  * defaultHeight: 300,
17258
- * url: 'http://mdn.github.io/simple-shared-worker/index2.html',
17340
+ * url: 'https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/',
17259
17341
  * frame: true,
17260
17342
  * autoShow: true
17261
17343
  * };
@@ -17280,7 +17362,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17280
17362
  * bounds: {top: 10, left: 10, width: 200, height: 200}
17281
17363
  * });
17282
17364
  *
17283
- * await view.navigate('http://mdn.github.io/simple-shared-worker/index2.html');
17365
+ * await view.navigate('https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/');
17284
17366
  *
17285
17367
  * await view.inspectSharedWorker();
17286
17368
  * ```
@@ -17291,7 +17373,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17291
17373
  * name:'child',
17292
17374
  * defaultWidth: 300,
17293
17375
  * defaultHeight: 300,
17294
- * url: 'http://mdn.github.io/simple-shared-worker/index2.html',
17376
+ * url: 'https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/',
17295
17377
  * frame: true,
17296
17378
  * autoShow: true
17297
17379
  * };
@@ -17317,7 +17399,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17317
17399
  * bounds: {top: 10, left: 10, width: 200, height: 200}
17318
17400
  * });
17319
17401
  *
17320
- * await view.navigate('http://mdn.github.io/simple-shared-worker/index2.html');
17402
+ * await view.navigate('https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/');
17321
17403
  *
17322
17404
  * const sharedWorkers = await view.getSharedWorkers();
17323
17405
  * await view.inspectSharedWorkerById(sharedWorkers[0].id);
@@ -17329,7 +17411,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17329
17411
  * name:'child',
17330
17412
  * defaultWidth: 300,
17331
17413
  * defaultHeight: 300,
17332
- * url: 'http://mdn.github.io/simple-shared-worker/index2.html',
17414
+ * url: 'https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/',
17333
17415
  * frame: true,
17334
17416
  * autoShow: true
17335
17417
  * };
package/out/fdc3-api.d.ts CHANGED
@@ -596,6 +596,23 @@ declare class Application extends EmitterBase<OpenFin.ApplicationEvent> {
596
596
  * ```
597
597
  */
598
598
  setTrayIcon(icon: string): Promise<void>;
599
+ /**
600
+ * Set hover text for this application's system tray icon.
601
+ * Note: Application must first set a tray icon with {@link Application.setTrayIcon}.
602
+ * @param toolTip
603
+ *
604
+ * @example
605
+ *
606
+ * ```js
607
+ * const app = fin.Application.getCurrentSync();
608
+ * const iconUrl = "http://cdn.openfin.co/assets/testing/icons/circled-digit-one.png";
609
+ *
610
+ * await app.setTrayIcon(iconUrl);
611
+ *
612
+ * await app.setTrayIconToolTip('My Application');
613
+ * ```
614
+ */
615
+ setTrayIconToolTip(toolTip: string): Promise<void>;
599
616
  /**
600
617
  * Sets new application's shortcut configuration. Windows only.
601
618
  * @param config New application's shortcut configuration.
@@ -1693,6 +1710,8 @@ declare type BaseConfig = {
1693
1710
  timeout?: number;
1694
1711
  };
1695
1712
 
1713
+ declare type BaseContentBehavior = 'allow' | 'block';
1714
+
1696
1715
  /**
1697
1716
  * Properties shared by all content creation rules, regardless of context.
1698
1717
  *
@@ -1836,6 +1855,10 @@ declare type BaseLoadFailedEvent = NamedEvent & {
1836
1855
  isMainFrame: boolean;
1837
1856
  };
1838
1857
 
1858
+ declare type BaseStructuredContentBehavior = {
1859
+ behavior: BaseContentBehavior;
1860
+ };
1861
+
1839
1862
  declare type BaseUrlEvent = NamedEvent & {
1840
1863
  type: 'url-changed';
1841
1864
  url: string;
@@ -1936,6 +1959,15 @@ declare type BoundsDidChangeEvent = BoundsChangeEvent & {
1936
1959
 
1937
1960
  declare type BoundsEvent = BaseEvent_5 & OpenFin.Bounds;
1938
1961
 
1962
+ declare type BrowserContentBehavior = {
1963
+ behavior: 'browser';
1964
+ /**
1965
+ * Additional property that can be specified when setting the behavior to browser.
1966
+ * When set to true will close the Window or View that tried to navigate or redirect to the blocked URL.
1967
+ */
1968
+ closeExisting?: boolean;
1969
+ };
1970
+
1939
1971
  /**
1940
1972
  * A rule prescribing content creation in the browser.
1941
1973
  *
@@ -3729,6 +3761,13 @@ declare type ConstWindowOptions = {
3729
3761
  * @deprecated - use `icon` instead.
3730
3762
  */
3731
3763
  taskbarIcon: string;
3764
+ /**
3765
+ * Specify a taskbar group for the window.
3766
+ * _Can be shared across applications._
3767
+ * _If omitted from a main window, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
3768
+ * _Use `platform.defaultWindowOptions.taskbarIconGroup` to set a default for platform applications._
3769
+ */
3770
+ taskbarIconGroup: string;
3732
3771
  /**
3733
3772
  * @defaultValue "about:blank"
3734
3773
  *
@@ -3779,6 +3818,15 @@ declare type ContainerCreatedEvent = LayoutDOMEvent & {
3779
3818
  type: 'container-created';
3780
3819
  };
3781
3820
 
3821
+ /**
3822
+ * Sets the behavior for when a Window or View navigates or redirects to a matching URL
3823
+ *
3824
+ * 'allow': The content url is allowed.
3825
+ * 'block': The content url is blocked.
3826
+ * 'browser': The content url is blocked and it is opened in the system's default web browser.
3827
+ */
3828
+ declare type ContentBehavior = BaseContentBehavior | 'browser';
3829
+
3782
3830
  /**
3783
3831
  * Generated when content navigation or redirection is blocked by {@link OpenFin.DomainSettings}.
3784
3832
  * @interface
@@ -3866,12 +3914,9 @@ declare type ContentCreationRulesEvent = NamedEvent & {
3866
3914
  declare type ContentNavigation = NavigationRules;
3867
3915
 
3868
3916
  /**
3869
- * Whether a content url is allowed or blocked for navigation or redirection.
3870
- *
3871
- * * 'allow': The content url is allowed.
3872
- * * 'block': The content url is blocked.
3917
+ * Controls whether a content url is allowed or blocked for navigation in Windows and Views or redirection for Windows, Views and iframes.
3873
3918
  */
3874
- declare type ContentPermission = 'allow' | 'block';
3919
+ declare type ContentPermission = ContentBehavior | StructuredContentBehavior | StructuredContentPermissions;
3875
3920
 
3876
3921
  /**
3877
3922
  * Restrict redirects to URLs that match an allowed pattern.
@@ -9687,6 +9732,10 @@ declare type MutableWindowOptions = {
9687
9732
  showTaskbarIcon: boolean;
9688
9733
  /**
9689
9734
  * Specify a taskbar group for the window.
9735
+ * _Can be shared across applications._
9736
+ *
9737
+ * _If omitted from a main window, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
9738
+ * _Use `platform.defaultWindowOptions.taskbarIconGroup` to set a default for platform applications._
9690
9739
  * _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
9691
9740
  * @remarks It's only updatable when `enableJumpList` is set to false.
9692
9741
  */
@@ -9734,13 +9783,14 @@ declare type NativeWindowIntegrationProviderAuthorization = {
9734
9783
  };
9735
9784
 
9736
9785
  /**
9737
- * Generated when view navigation is rejected as per contentNavigation allowlist/denylist rules.
9786
+ * Generated when view navigation is rejected as per contentNavigation allowlist/denylist rules or when blocked by a domain-based permission content rule.
9738
9787
  * @interface
9739
9788
  */
9740
9789
  declare type NavigationRejectedEvent = NamedEvent & {
9741
9790
  type: 'navigation-rejected';
9742
9791
  sourceName?: string;
9743
9792
  url: string;
9793
+ contentRule?: OpenFin.ContentPermission | undefined;
9744
9794
  };
9745
9795
 
9746
9796
  /**
@@ -10112,6 +10162,12 @@ declare namespace OpenFin {
10112
10162
  DomainSettings,
10113
10163
  ApiInjection,
10114
10164
  DomainApiSettings,
10165
+ BaseContentBehavior,
10166
+ ContentBehavior,
10167
+ BaseStructuredContentBehavior,
10168
+ BrowserContentBehavior,
10169
+ StructuredContentBehavior,
10170
+ StructuredContentPermissions,
10115
10171
  ContentPermission,
10116
10172
  PerDomainSettings,
10117
10173
  DomainSettingsRule,
@@ -12513,6 +12569,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
12513
12569
  'set-tray-icon': ApplicationIdentityCall<{
12514
12570
  enabledIcon: string;
12515
12571
  }, void>;
12572
+ 'set-tray-icon-tooltip': ApplicationIdentityCall<{
12573
+ toolTip: string;
12574
+ }>;
12516
12575
  'set-shortcuts': ApplicationIdentityCall<{
12517
12576
  data: OpenFin.ShortCutConfig;
12518
12577
  }, void>;
@@ -14139,6 +14198,29 @@ declare type StartedEvent = BaseEvents.IdentityEvent & {
14139
14198
  type: 'started';
14140
14199
  };
14141
14200
 
14201
+ /**
14202
+ * Allows more control over content behaviors
14203
+ */
14204
+ declare type StructuredContentBehavior = BaseStructuredContentBehavior | BrowserContentBehavior;
14205
+
14206
+ /**
14207
+ * Specify rules for specific actions.
14208
+ */
14209
+ declare type StructuredContentPermissions = {
14210
+ /**
14211
+ * Controls the behavior for navigations
14212
+ */
14213
+ navigate?: ContentBehavior | StructuredContentBehavior;
14214
+ /**
14215
+ * Controls the behavior for redirects
14216
+ */
14217
+ redirect?: ContentBehavior | StructuredContentBehavior;
14218
+ /**
14219
+ * Controls the behavior for when iframes try to redirect
14220
+ */
14221
+ iframe?: BaseContentBehavior;
14222
+ };
14223
+
14142
14224
  /**
14143
14225
  * @interface
14144
14226
  */
@@ -17695,7 +17777,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17695
17777
  * bounds: {top: 10, left: 10, width: 200, height: 200}
17696
17778
  * });
17697
17779
  *
17698
- * await view.navigate('http://mdn.github.io/simple-shared-worker/index2.html');
17780
+ * await view.navigate('https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/');
17699
17781
  *
17700
17782
  * const sharedWorkers = await view.getSharedWorkers();
17701
17783
  * ```
@@ -17706,7 +17788,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17706
17788
  * name:'child',
17707
17789
  * defaultWidth: 300,
17708
17790
  * defaultHeight: 300,
17709
- * url: 'http://mdn.github.io/simple-shared-worker/index2.html',
17791
+ * url: 'https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/',
17710
17792
  * frame: true,
17711
17793
  * autoShow: true
17712
17794
  * };
@@ -17731,7 +17813,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17731
17813
  * bounds: {top: 10, left: 10, width: 200, height: 200}
17732
17814
  * });
17733
17815
  *
17734
- * await view.navigate('http://mdn.github.io/simple-shared-worker/index2.html');
17816
+ * await view.navigate('https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/');
17735
17817
  *
17736
17818
  * await view.inspectSharedWorker();
17737
17819
  * ```
@@ -17742,7 +17824,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17742
17824
  * name:'child',
17743
17825
  * defaultWidth: 300,
17744
17826
  * defaultHeight: 300,
17745
- * url: 'http://mdn.github.io/simple-shared-worker/index2.html',
17827
+ * url: 'https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/',
17746
17828
  * frame: true,
17747
17829
  * autoShow: true
17748
17830
  * };
@@ -17768,7 +17850,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17768
17850
  * bounds: {top: 10, left: 10, width: 200, height: 200}
17769
17851
  * });
17770
17852
  *
17771
- * await view.navigate('http://mdn.github.io/simple-shared-worker/index2.html');
17853
+ * await view.navigate('https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/');
17772
17854
  *
17773
17855
  * const sharedWorkers = await view.getSharedWorkers();
17774
17856
  * await view.inspectSharedWorkerById(sharedWorkers[0].id);
@@ -17780,7 +17862,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17780
17862
  * name:'child',
17781
17863
  * defaultWidth: 300,
17782
17864
  * defaultHeight: 300,
17783
- * url: 'http://mdn.github.io/simple-shared-worker/index2.html',
17865
+ * url: 'https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/',
17784
17866
  * frame: true,
17785
17867
  * autoShow: true
17786
17868
  * };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/fdc3-api",
3
- "version": "41.83.3",
3
+ "version": "41.100.18",
4
4
  "description": "OpenFin fdc3 module utilities and types.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "private": false,
@@ -16,7 +16,8 @@
16
16
  "watch": "npm run dev -- --watch",
17
17
  "ci:prepublish": "of-npm prepublish",
18
18
  "ci:postpublish": "of-npm postpublish",
19
- "ci:publish": "npm publish"
19
+ "ci:publish": "npm publish",
20
+ "version:update": "of-npm version --allow-same-version '$RMAJOR.$RMINOR.$RPATCH'"
20
21
  },
21
22
  "author": "OpenFin",
22
23
  "dependencies": {