@openfin/core 44.100.54 → 44.100.58
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/out/mock-alpha.d.ts +126 -18
- package/out/mock-beta.d.ts +126 -18
- package/out/mock-public.d.ts +126 -18
- package/out/stub.d.ts +126 -18
- package/out/stub.js +61 -7
- package/package.json +1 -1
package/out/mock-alpha.d.ts
CHANGED
|
@@ -1420,6 +1420,56 @@ declare type ApplicationWindowInfo = {
|
|
|
1420
1420
|
uuid: string;
|
|
1421
1421
|
};
|
|
1422
1422
|
|
|
1423
|
+
/**
|
|
1424
|
+
* `appLogLevel` allows the verbosity of app logs that are collected for a Window or View to be controlled when the app logging feature is enabled for its application.
|
|
1425
|
+
*
|
|
1426
|
+
* Please note, `enableAppLogging` must be specified in the application manifest's `platform` or `startup_app` key for this feature to be activated.
|
|
1427
|
+
*
|
|
1428
|
+
* If not specified, and `enableAppLogging` is true for the application, the default level will be 'silent'.
|
|
1429
|
+
*
|
|
1430
|
+
* This setting can also be specified in a Domain Setting Rule, allowing per url exceptions to the default behavior to be made. Please note, when a domain setting is actively
|
|
1431
|
+
* controlling a url's appLogLevel, its options will be ignored.
|
|
1432
|
+
*
|
|
1433
|
+
* @default 'debug'
|
|
1434
|
+
*
|
|
1435
|
+
* @example Controlling App Logs With DefaultViewOptions + Domain Settings
|
|
1436
|
+
*
|
|
1437
|
+
* In this example manifest, we use `defaultViewOptions to set the default verbosity to 'warn'.
|
|
1438
|
+
*
|
|
1439
|
+
* We also use domain settings to suppress logs entirely for an example URL, and to lower verbosity to 'debug' for another.
|
|
1440
|
+
*
|
|
1441
|
+
* ```ts
|
|
1442
|
+
* {
|
|
1443
|
+
* <rest of settings>
|
|
1444
|
+
* "platform": {
|
|
1445
|
+
* <rest of settings>
|
|
1446
|
+
* "enableAppLogging": "true",
|
|
1447
|
+
* "defaultViewOptions": {
|
|
1448
|
+
* "appLogLevel": "warn"
|
|
1449
|
+
* },
|
|
1450
|
+
* "domainSettings": {
|
|
1451
|
+
* "default": { <rest of settings> }
|
|
1452
|
+
* "rules": [
|
|
1453
|
+
* <rest of rules>
|
|
1454
|
+
* {
|
|
1455
|
+
* "match": ["*://*?app-logging-level=silent"],
|
|
1456
|
+
* "options": {
|
|
1457
|
+
* "appLogLevel": "silent"
|
|
1458
|
+
* }
|
|
1459
|
+
* },
|
|
1460
|
+
* {
|
|
1461
|
+
* "match": ["*://*?app-logging-level=debug"],
|
|
1462
|
+
* "options": {
|
|
1463
|
+
* "appLogLevel": "debug"
|
|
1464
|
+
* }
|
|
1465
|
+
* },
|
|
1466
|
+
* ]
|
|
1467
|
+
* }
|
|
1468
|
+
* }
|
|
1469
|
+
* }
|
|
1470
|
+
*/
|
|
1471
|
+
declare type AppLogLevel = 'silent' | 'debug' | 'info' | 'warn' | 'error';
|
|
1472
|
+
|
|
1423
1473
|
/**
|
|
1424
1474
|
* @interface
|
|
1425
1475
|
*/
|
|
@@ -8811,6 +8861,12 @@ declare type LogInfo = {
|
|
|
8811
8861
|
*/
|
|
8812
8862
|
declare type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
|
|
8813
8863
|
|
|
8864
|
+
declare type LogPath = 'debug.log' | 'app.log';
|
|
8865
|
+
|
|
8866
|
+
declare type LogTarget = {
|
|
8867
|
+
type: LogPath;
|
|
8868
|
+
};
|
|
8869
|
+
|
|
8814
8870
|
/**
|
|
8815
8871
|
* Log types
|
|
8816
8872
|
*
|
|
@@ -9331,10 +9387,9 @@ declare type MutableViewOptions = {
|
|
|
9331
9387
|
*/
|
|
9332
9388
|
chromiumPolicies: ChromiumPolicies;
|
|
9333
9389
|
/**
|
|
9334
|
-
*
|
|
9335
|
-
* When omitted, inherits from the parent application.
|
|
9390
|
+
* Specifies the AppLogLevel for the specified View. See {@link AppLogLevel} for more information.
|
|
9336
9391
|
*/
|
|
9337
|
-
|
|
9392
|
+
appLogLevel?: AppLogLevel;
|
|
9338
9393
|
};
|
|
9339
9394
|
|
|
9340
9395
|
/**
|
|
@@ -9610,11 +9665,9 @@ declare type MutableWindowOptions = {
|
|
|
9610
9665
|
*/
|
|
9611
9666
|
chromiumPolicies: ChromiumPolicies;
|
|
9612
9667
|
/**
|
|
9613
|
-
*
|
|
9614
|
-
* When omitted, inherits from the parent application.
|
|
9615
|
-
*
|
|
9668
|
+
* Specifies the AppLogLevel for the Window. See {@link AppLogLevel} for more information.
|
|
9616
9669
|
*/
|
|
9617
|
-
|
|
9670
|
+
appLogLevel?: AppLogLevel;
|
|
9618
9671
|
};
|
|
9619
9672
|
|
|
9620
9673
|
declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
|
|
@@ -10013,6 +10066,9 @@ declare namespace OpenFin_2 {
|
|
|
10013
10066
|
InheritableOptions,
|
|
10014
10067
|
PolicyOptions,
|
|
10015
10068
|
ChromiumPolicies,
|
|
10069
|
+
AppLogLevel,
|
|
10070
|
+
LogPath,
|
|
10071
|
+
LogTarget,
|
|
10016
10072
|
MutableWindowOptions,
|
|
10017
10073
|
WorkspacePlatformOptions,
|
|
10018
10074
|
WebRequestHeader,
|
|
@@ -10595,10 +10651,10 @@ declare type PerDomainSettings = {
|
|
|
10595
10651
|
drag?: 'allow' | 'block';
|
|
10596
10652
|
};
|
|
10597
10653
|
/**
|
|
10598
|
-
*
|
|
10599
|
-
*
|
|
10654
|
+
* Allows the app log level of any matching content to be overriden.
|
|
10655
|
+
* See also {@link AppLogLevel} for more information.
|
|
10600
10656
|
*/
|
|
10601
|
-
|
|
10657
|
+
appLogLevel?: AppLogLevel;
|
|
10602
10658
|
};
|
|
10603
10659
|
|
|
10604
10660
|
/**
|
|
@@ -12935,10 +12991,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
|
|
|
12935
12991
|
'get-current-window': VoidCall;
|
|
12936
12992
|
'get-current-window-sync': VoidCall;
|
|
12937
12993
|
'show-download-bubble': IdentityCall<{
|
|
12938
|
-
|
|
12994
|
+
anchor?: OpenFin_2.Anchor;
|
|
12939
12995
|
}, void>;
|
|
12940
12996
|
'update-download-bubble-anchor': IdentityCall<{
|
|
12941
|
-
|
|
12997
|
+
anchor: OpenFin_2.Anchor;
|
|
12942
12998
|
}, void>;
|
|
12943
12999
|
'get-external-application-info': ApiCall<OpenFin_2.ApplicationIdentity, OpenFin_2.ExternalApplicationInfo>;
|
|
12944
13000
|
'external-application-wrap': VoidCall;
|
|
@@ -15353,16 +15409,14 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
|
15353
15409
|
* Writes the passed message into both the log file and the console.
|
|
15354
15410
|
* @param level The log level for the entry. Can be either "info", "warning" or "error"
|
|
15355
15411
|
* @param message The log message text
|
|
15356
|
-
* @param target
|
|
15412
|
+
* @param target The log stream this message will be sent to, defaults to 'debug.log'. Specify 'app.log' to log to the app log of the sending View / Window. Note, when using `app.log`, it will always log to app.log irrespective of the `enableAppLogging` setting for the sender. This is particularly useful if you wish to log certain things from a View / Window but ignore generic console logs.
|
|
15357
15413
|
*
|
|
15358
15414
|
* @example
|
|
15359
15415
|
* ```js
|
|
15360
15416
|
* fin.System.log("info", "An example log message", { type: 'debug.log' }).then(() => console.log('Log info message')).catch(err => console.log(err));
|
|
15361
15417
|
* ```
|
|
15362
15418
|
*/
|
|
15363
|
-
log(level: string, message: string,
|
|
15364
|
-
type?: 'app.log' | 'debug.log';
|
|
15365
|
-
}): Promise<void>;
|
|
15419
|
+
log(level: string, message: string, target?: OpenFin_2.LogTarget): Promise<void>;
|
|
15366
15420
|
/**
|
|
15367
15421
|
* Opens the passed URL in the default web browser.
|
|
15368
15422
|
*
|
|
@@ -16187,11 +16241,35 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
|
16187
16241
|
/**
|
|
16188
16242
|
* Overrides original Chromium theme color providers matching key (currently except high contrast ones). Only colors passed in the map will be overridden.
|
|
16189
16243
|
* @param overrides - Array of ColorProviderOverrides objects
|
|
16244
|
+
* @example
|
|
16245
|
+
* ```ts
|
|
16246
|
+
* await fin.System.setThemePalette([
|
|
16247
|
+
* {
|
|
16248
|
+
* colorProviderKey: { colorMode: 'light' },
|
|
16249
|
+
* colorsMap: {
|
|
16250
|
+
* kColorLabelForeground: 4278190080,
|
|
16251
|
+
* kColorBubbleBackground: 4293980400
|
|
16252
|
+
* }
|
|
16253
|
+
* },
|
|
16254
|
+
* {
|
|
16255
|
+
* colorProviderKey: { colorMode: 'dark' },
|
|
16256
|
+
* colorsMap: {
|
|
16257
|
+
* kColorLabelForeground: 4293980400,
|
|
16258
|
+
* kColorBubbleBackground: 4293980400
|
|
16259
|
+
* }
|
|
16260
|
+
* }
|
|
16261
|
+
* ]);
|
|
16262
|
+
* ```
|
|
16190
16263
|
*/
|
|
16191
16264
|
setThemePalette(themePalette: Array<OpenFin_2.ThemePalette>): Promise<void>;
|
|
16192
16265
|
/**
|
|
16193
16266
|
* Retrieves currently used color overrides
|
|
16194
16267
|
* @returns Array of ColorProviderOverrides objects
|
|
16268
|
+
* @example
|
|
16269
|
+
* ```ts
|
|
16270
|
+
* const themePalette = await fin.System.getThemePalette();
|
|
16271
|
+
* console.log(themePalette);
|
|
16272
|
+
* ```
|
|
16195
16273
|
*/
|
|
16196
16274
|
getThemePalette(): Promise<Array<OpenFin_2.ThemePalette>>;
|
|
16197
16275
|
}
|
|
@@ -19805,8 +19883,19 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
|
19805
19883
|
* @returns {Promise<void>}
|
|
19806
19884
|
* A promise that resolves once the request to show the download bubble
|
|
19807
19885
|
* has been processed.
|
|
19886
|
+
* @example
|
|
19887
|
+
* ```js
|
|
19888
|
+
* const w = fin.Window.getCurrentSync();
|
|
19889
|
+
* const el = document.getElementById("download-bubble-button");
|
|
19890
|
+
* const rect = el.getBoundingClientRect();
|
|
19891
|
+
* const anchor = {
|
|
19892
|
+
* bounds: rect,
|
|
19893
|
+
* location: "topRight"
|
|
19894
|
+
* };
|
|
19895
|
+
* w.showDownloadBubble(anchor);
|
|
19896
|
+
* ```
|
|
19808
19897
|
*/
|
|
19809
|
-
showDownloadBubble(
|
|
19898
|
+
showDownloadBubble(anchor?: OpenFin_2.Anchor): Promise<void>;
|
|
19810
19899
|
/**
|
|
19811
19900
|
* Updates the anchor used for positioning the download bubble. This allows
|
|
19812
19901
|
* moving the bubble reactively—for example, in response to window resizes,
|
|
@@ -19818,8 +19907,27 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
|
19818
19907
|
*
|
|
19819
19908
|
* @returns {Promise<void>}
|
|
19820
19909
|
* A promise that resolves once the anchor update has been applied.
|
|
19910
|
+
* @example
|
|
19911
|
+
* ```js
|
|
19912
|
+
* var w = fin.Window.getCurrentSync();
|
|
19913
|
+
* w.on('download-button-visibility-changed', (evt) => {
|
|
19914
|
+
* if (evt.visible) {
|
|
19915
|
+
* const el = document.getElementById("download-bubble-button");
|
|
19916
|
+
* //We show our button and get it's bounding rect
|
|
19917
|
+
* el.classList.remove("hidden");
|
|
19918
|
+
* const rect = el.getBoundingClientRect();
|
|
19919
|
+
* const anchor = {
|
|
19920
|
+
* bounds: rect,
|
|
19921
|
+
* location: "topRight"
|
|
19922
|
+
* }
|
|
19923
|
+
* w.updateDownloadBubbleAnchor(anchor);
|
|
19924
|
+
* } else {
|
|
19925
|
+
* //We hide our button
|
|
19926
|
+
* document.getElementById("download-bubble-button")?.classList.add("hidden");
|
|
19927
|
+
* }
|
|
19928
|
+
});
|
|
19821
19929
|
*/
|
|
19822
|
-
updateDownloadBubbleAnchor(
|
|
19930
|
+
updateDownloadBubbleAnchor(anchor: OpenFin_2.Anchor): Promise<void>;
|
|
19823
19931
|
}
|
|
19824
19932
|
|
|
19825
19933
|
/**
|
package/out/mock-beta.d.ts
CHANGED
|
@@ -1420,6 +1420,56 @@ declare type ApplicationWindowInfo = {
|
|
|
1420
1420
|
uuid: string;
|
|
1421
1421
|
};
|
|
1422
1422
|
|
|
1423
|
+
/**
|
|
1424
|
+
* `appLogLevel` allows the verbosity of app logs that are collected for a Window or View to be controlled when the app logging feature is enabled for its application.
|
|
1425
|
+
*
|
|
1426
|
+
* Please note, `enableAppLogging` must be specified in the application manifest's `platform` or `startup_app` key for this feature to be activated.
|
|
1427
|
+
*
|
|
1428
|
+
* If not specified, and `enableAppLogging` is true for the application, the default level will be 'silent'.
|
|
1429
|
+
*
|
|
1430
|
+
* This setting can also be specified in a Domain Setting Rule, allowing per url exceptions to the default behavior to be made. Please note, when a domain setting is actively
|
|
1431
|
+
* controlling a url's appLogLevel, its options will be ignored.
|
|
1432
|
+
*
|
|
1433
|
+
* @default 'debug'
|
|
1434
|
+
*
|
|
1435
|
+
* @example Controlling App Logs With DefaultViewOptions + Domain Settings
|
|
1436
|
+
*
|
|
1437
|
+
* In this example manifest, we use `defaultViewOptions to set the default verbosity to 'warn'.
|
|
1438
|
+
*
|
|
1439
|
+
* We also use domain settings to suppress logs entirely for an example URL, and to lower verbosity to 'debug' for another.
|
|
1440
|
+
*
|
|
1441
|
+
* ```ts
|
|
1442
|
+
* {
|
|
1443
|
+
* <rest of settings>
|
|
1444
|
+
* "platform": {
|
|
1445
|
+
* <rest of settings>
|
|
1446
|
+
* "enableAppLogging": "true",
|
|
1447
|
+
* "defaultViewOptions": {
|
|
1448
|
+
* "appLogLevel": "warn"
|
|
1449
|
+
* },
|
|
1450
|
+
* "domainSettings": {
|
|
1451
|
+
* "default": { <rest of settings> }
|
|
1452
|
+
* "rules": [
|
|
1453
|
+
* <rest of rules>
|
|
1454
|
+
* {
|
|
1455
|
+
* "match": ["*://*?app-logging-level=silent"],
|
|
1456
|
+
* "options": {
|
|
1457
|
+
* "appLogLevel": "silent"
|
|
1458
|
+
* }
|
|
1459
|
+
* },
|
|
1460
|
+
* {
|
|
1461
|
+
* "match": ["*://*?app-logging-level=debug"],
|
|
1462
|
+
* "options": {
|
|
1463
|
+
* "appLogLevel": "debug"
|
|
1464
|
+
* }
|
|
1465
|
+
* },
|
|
1466
|
+
* ]
|
|
1467
|
+
* }
|
|
1468
|
+
* }
|
|
1469
|
+
* }
|
|
1470
|
+
*/
|
|
1471
|
+
declare type AppLogLevel = 'silent' | 'debug' | 'info' | 'warn' | 'error';
|
|
1472
|
+
|
|
1423
1473
|
/**
|
|
1424
1474
|
* @interface
|
|
1425
1475
|
*/
|
|
@@ -8811,6 +8861,12 @@ declare type LogInfo = {
|
|
|
8811
8861
|
*/
|
|
8812
8862
|
declare type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
|
|
8813
8863
|
|
|
8864
|
+
declare type LogPath = 'debug.log' | 'app.log';
|
|
8865
|
+
|
|
8866
|
+
declare type LogTarget = {
|
|
8867
|
+
type: LogPath;
|
|
8868
|
+
};
|
|
8869
|
+
|
|
8814
8870
|
/**
|
|
8815
8871
|
* Log types
|
|
8816
8872
|
*
|
|
@@ -9331,10 +9387,9 @@ declare type MutableViewOptions = {
|
|
|
9331
9387
|
*/
|
|
9332
9388
|
chromiumPolicies: ChromiumPolicies;
|
|
9333
9389
|
/**
|
|
9334
|
-
*
|
|
9335
|
-
* When omitted, inherits from the parent application.
|
|
9390
|
+
* Specifies the AppLogLevel for the specified View. See {@link AppLogLevel} for more information.
|
|
9336
9391
|
*/
|
|
9337
|
-
|
|
9392
|
+
appLogLevel?: AppLogLevel;
|
|
9338
9393
|
};
|
|
9339
9394
|
|
|
9340
9395
|
/**
|
|
@@ -9610,11 +9665,9 @@ declare type MutableWindowOptions = {
|
|
|
9610
9665
|
*/
|
|
9611
9666
|
chromiumPolicies: ChromiumPolicies;
|
|
9612
9667
|
/**
|
|
9613
|
-
*
|
|
9614
|
-
* When omitted, inherits from the parent application.
|
|
9615
|
-
*
|
|
9668
|
+
* Specifies the AppLogLevel for the Window. See {@link AppLogLevel} for more information.
|
|
9616
9669
|
*/
|
|
9617
|
-
|
|
9670
|
+
appLogLevel?: AppLogLevel;
|
|
9618
9671
|
};
|
|
9619
9672
|
|
|
9620
9673
|
declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
|
|
@@ -10013,6 +10066,9 @@ declare namespace OpenFin_2 {
|
|
|
10013
10066
|
InheritableOptions,
|
|
10014
10067
|
PolicyOptions,
|
|
10015
10068
|
ChromiumPolicies,
|
|
10069
|
+
AppLogLevel,
|
|
10070
|
+
LogPath,
|
|
10071
|
+
LogTarget,
|
|
10016
10072
|
MutableWindowOptions,
|
|
10017
10073
|
WorkspacePlatformOptions,
|
|
10018
10074
|
WebRequestHeader,
|
|
@@ -10595,10 +10651,10 @@ declare type PerDomainSettings = {
|
|
|
10595
10651
|
drag?: 'allow' | 'block';
|
|
10596
10652
|
};
|
|
10597
10653
|
/**
|
|
10598
|
-
*
|
|
10599
|
-
*
|
|
10654
|
+
* Allows the app log level of any matching content to be overriden.
|
|
10655
|
+
* See also {@link AppLogLevel} for more information.
|
|
10600
10656
|
*/
|
|
10601
|
-
|
|
10657
|
+
appLogLevel?: AppLogLevel;
|
|
10602
10658
|
};
|
|
10603
10659
|
|
|
10604
10660
|
/**
|
|
@@ -12935,10 +12991,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
|
|
|
12935
12991
|
'get-current-window': VoidCall;
|
|
12936
12992
|
'get-current-window-sync': VoidCall;
|
|
12937
12993
|
'show-download-bubble': IdentityCall<{
|
|
12938
|
-
|
|
12994
|
+
anchor?: OpenFin_2.Anchor;
|
|
12939
12995
|
}, void>;
|
|
12940
12996
|
'update-download-bubble-anchor': IdentityCall<{
|
|
12941
|
-
|
|
12997
|
+
anchor: OpenFin_2.Anchor;
|
|
12942
12998
|
}, void>;
|
|
12943
12999
|
'get-external-application-info': ApiCall<OpenFin_2.ApplicationIdentity, OpenFin_2.ExternalApplicationInfo>;
|
|
12944
13000
|
'external-application-wrap': VoidCall;
|
|
@@ -15353,16 +15409,14 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
|
15353
15409
|
* Writes the passed message into both the log file and the console.
|
|
15354
15410
|
* @param level The log level for the entry. Can be either "info", "warning" or "error"
|
|
15355
15411
|
* @param message The log message text
|
|
15356
|
-
* @param target
|
|
15412
|
+
* @param target The log stream this message will be sent to, defaults to 'debug.log'. Specify 'app.log' to log to the app log of the sending View / Window. Note, when using `app.log`, it will always log to app.log irrespective of the `enableAppLogging` setting for the sender. This is particularly useful if you wish to log certain things from a View / Window but ignore generic console logs.
|
|
15357
15413
|
*
|
|
15358
15414
|
* @example
|
|
15359
15415
|
* ```js
|
|
15360
15416
|
* fin.System.log("info", "An example log message", { type: 'debug.log' }).then(() => console.log('Log info message')).catch(err => console.log(err));
|
|
15361
15417
|
* ```
|
|
15362
15418
|
*/
|
|
15363
|
-
log(level: string, message: string,
|
|
15364
|
-
type?: 'app.log' | 'debug.log';
|
|
15365
|
-
}): Promise<void>;
|
|
15419
|
+
log(level: string, message: string, target?: OpenFin_2.LogTarget): Promise<void>;
|
|
15366
15420
|
/**
|
|
15367
15421
|
* Opens the passed URL in the default web browser.
|
|
15368
15422
|
*
|
|
@@ -16187,11 +16241,35 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
|
16187
16241
|
/**
|
|
16188
16242
|
* Overrides original Chromium theme color providers matching key (currently except high contrast ones). Only colors passed in the map will be overridden.
|
|
16189
16243
|
* @param overrides - Array of ColorProviderOverrides objects
|
|
16244
|
+
* @example
|
|
16245
|
+
* ```ts
|
|
16246
|
+
* await fin.System.setThemePalette([
|
|
16247
|
+
* {
|
|
16248
|
+
* colorProviderKey: { colorMode: 'light' },
|
|
16249
|
+
* colorsMap: {
|
|
16250
|
+
* kColorLabelForeground: 4278190080,
|
|
16251
|
+
* kColorBubbleBackground: 4293980400
|
|
16252
|
+
* }
|
|
16253
|
+
* },
|
|
16254
|
+
* {
|
|
16255
|
+
* colorProviderKey: { colorMode: 'dark' },
|
|
16256
|
+
* colorsMap: {
|
|
16257
|
+
* kColorLabelForeground: 4293980400,
|
|
16258
|
+
* kColorBubbleBackground: 4293980400
|
|
16259
|
+
* }
|
|
16260
|
+
* }
|
|
16261
|
+
* ]);
|
|
16262
|
+
* ```
|
|
16190
16263
|
*/
|
|
16191
16264
|
setThemePalette(themePalette: Array<OpenFin_2.ThemePalette>): Promise<void>;
|
|
16192
16265
|
/**
|
|
16193
16266
|
* Retrieves currently used color overrides
|
|
16194
16267
|
* @returns Array of ColorProviderOverrides objects
|
|
16268
|
+
* @example
|
|
16269
|
+
* ```ts
|
|
16270
|
+
* const themePalette = await fin.System.getThemePalette();
|
|
16271
|
+
* console.log(themePalette);
|
|
16272
|
+
* ```
|
|
16195
16273
|
*/
|
|
16196
16274
|
getThemePalette(): Promise<Array<OpenFin_2.ThemePalette>>;
|
|
16197
16275
|
}
|
|
@@ -19805,8 +19883,19 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
|
19805
19883
|
* @returns {Promise<void>}
|
|
19806
19884
|
* A promise that resolves once the request to show the download bubble
|
|
19807
19885
|
* has been processed.
|
|
19886
|
+
* @example
|
|
19887
|
+
* ```js
|
|
19888
|
+
* const w = fin.Window.getCurrentSync();
|
|
19889
|
+
* const el = document.getElementById("download-bubble-button");
|
|
19890
|
+
* const rect = el.getBoundingClientRect();
|
|
19891
|
+
* const anchor = {
|
|
19892
|
+
* bounds: rect,
|
|
19893
|
+
* location: "topRight"
|
|
19894
|
+
* };
|
|
19895
|
+
* w.showDownloadBubble(anchor);
|
|
19896
|
+
* ```
|
|
19808
19897
|
*/
|
|
19809
|
-
showDownloadBubble(
|
|
19898
|
+
showDownloadBubble(anchor?: OpenFin_2.Anchor): Promise<void>;
|
|
19810
19899
|
/**
|
|
19811
19900
|
* Updates the anchor used for positioning the download bubble. This allows
|
|
19812
19901
|
* moving the bubble reactively—for example, in response to window resizes,
|
|
@@ -19818,8 +19907,27 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
|
19818
19907
|
*
|
|
19819
19908
|
* @returns {Promise<void>}
|
|
19820
19909
|
* A promise that resolves once the anchor update has been applied.
|
|
19910
|
+
* @example
|
|
19911
|
+
* ```js
|
|
19912
|
+
* var w = fin.Window.getCurrentSync();
|
|
19913
|
+
* w.on('download-button-visibility-changed', (evt) => {
|
|
19914
|
+
* if (evt.visible) {
|
|
19915
|
+
* const el = document.getElementById("download-bubble-button");
|
|
19916
|
+
* //We show our button and get it's bounding rect
|
|
19917
|
+
* el.classList.remove("hidden");
|
|
19918
|
+
* const rect = el.getBoundingClientRect();
|
|
19919
|
+
* const anchor = {
|
|
19920
|
+
* bounds: rect,
|
|
19921
|
+
* location: "topRight"
|
|
19922
|
+
* }
|
|
19923
|
+
* w.updateDownloadBubbleAnchor(anchor);
|
|
19924
|
+
* } else {
|
|
19925
|
+
* //We hide our button
|
|
19926
|
+
* document.getElementById("download-bubble-button")?.classList.add("hidden");
|
|
19927
|
+
* }
|
|
19928
|
+
});
|
|
19821
19929
|
*/
|
|
19822
|
-
updateDownloadBubbleAnchor(
|
|
19930
|
+
updateDownloadBubbleAnchor(anchor: OpenFin_2.Anchor): Promise<void>;
|
|
19823
19931
|
}
|
|
19824
19932
|
|
|
19825
19933
|
/**
|
package/out/mock-public.d.ts
CHANGED
|
@@ -1420,6 +1420,56 @@ declare type ApplicationWindowInfo = {
|
|
|
1420
1420
|
uuid: string;
|
|
1421
1421
|
};
|
|
1422
1422
|
|
|
1423
|
+
/**
|
|
1424
|
+
* `appLogLevel` allows the verbosity of app logs that are collected for a Window or View to be controlled when the app logging feature is enabled for its application.
|
|
1425
|
+
*
|
|
1426
|
+
* Please note, `enableAppLogging` must be specified in the application manifest's `platform` or `startup_app` key for this feature to be activated.
|
|
1427
|
+
*
|
|
1428
|
+
* If not specified, and `enableAppLogging` is true for the application, the default level will be 'silent'.
|
|
1429
|
+
*
|
|
1430
|
+
* This setting can also be specified in a Domain Setting Rule, allowing per url exceptions to the default behavior to be made. Please note, when a domain setting is actively
|
|
1431
|
+
* controlling a url's appLogLevel, its options will be ignored.
|
|
1432
|
+
*
|
|
1433
|
+
* @default 'debug'
|
|
1434
|
+
*
|
|
1435
|
+
* @example Controlling App Logs With DefaultViewOptions + Domain Settings
|
|
1436
|
+
*
|
|
1437
|
+
* In this example manifest, we use `defaultViewOptions to set the default verbosity to 'warn'.
|
|
1438
|
+
*
|
|
1439
|
+
* We also use domain settings to suppress logs entirely for an example URL, and to lower verbosity to 'debug' for another.
|
|
1440
|
+
*
|
|
1441
|
+
* ```ts
|
|
1442
|
+
* {
|
|
1443
|
+
* <rest of settings>
|
|
1444
|
+
* "platform": {
|
|
1445
|
+
* <rest of settings>
|
|
1446
|
+
* "enableAppLogging": "true",
|
|
1447
|
+
* "defaultViewOptions": {
|
|
1448
|
+
* "appLogLevel": "warn"
|
|
1449
|
+
* },
|
|
1450
|
+
* "domainSettings": {
|
|
1451
|
+
* "default": { <rest of settings> }
|
|
1452
|
+
* "rules": [
|
|
1453
|
+
* <rest of rules>
|
|
1454
|
+
* {
|
|
1455
|
+
* "match": ["*://*?app-logging-level=silent"],
|
|
1456
|
+
* "options": {
|
|
1457
|
+
* "appLogLevel": "silent"
|
|
1458
|
+
* }
|
|
1459
|
+
* },
|
|
1460
|
+
* {
|
|
1461
|
+
* "match": ["*://*?app-logging-level=debug"],
|
|
1462
|
+
* "options": {
|
|
1463
|
+
* "appLogLevel": "debug"
|
|
1464
|
+
* }
|
|
1465
|
+
* },
|
|
1466
|
+
* ]
|
|
1467
|
+
* }
|
|
1468
|
+
* }
|
|
1469
|
+
* }
|
|
1470
|
+
*/
|
|
1471
|
+
declare type AppLogLevel = 'silent' | 'debug' | 'info' | 'warn' | 'error';
|
|
1472
|
+
|
|
1423
1473
|
/**
|
|
1424
1474
|
* @interface
|
|
1425
1475
|
*/
|
|
@@ -8811,6 +8861,12 @@ declare type LogInfo = {
|
|
|
8811
8861
|
*/
|
|
8812
8862
|
declare type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
|
|
8813
8863
|
|
|
8864
|
+
declare type LogPath = 'debug.log' | 'app.log';
|
|
8865
|
+
|
|
8866
|
+
declare type LogTarget = {
|
|
8867
|
+
type: LogPath;
|
|
8868
|
+
};
|
|
8869
|
+
|
|
8814
8870
|
/**
|
|
8815
8871
|
* Log types
|
|
8816
8872
|
*
|
|
@@ -9331,10 +9387,9 @@ declare type MutableViewOptions = {
|
|
|
9331
9387
|
*/
|
|
9332
9388
|
chromiumPolicies: ChromiumPolicies;
|
|
9333
9389
|
/**
|
|
9334
|
-
*
|
|
9335
|
-
* When omitted, inherits from the parent application.
|
|
9390
|
+
* Specifies the AppLogLevel for the specified View. See {@link AppLogLevel} for more information.
|
|
9336
9391
|
*/
|
|
9337
|
-
|
|
9392
|
+
appLogLevel?: AppLogLevel;
|
|
9338
9393
|
};
|
|
9339
9394
|
|
|
9340
9395
|
/**
|
|
@@ -9610,11 +9665,9 @@ declare type MutableWindowOptions = {
|
|
|
9610
9665
|
*/
|
|
9611
9666
|
chromiumPolicies: ChromiumPolicies;
|
|
9612
9667
|
/**
|
|
9613
|
-
*
|
|
9614
|
-
* When omitted, inherits from the parent application.
|
|
9615
|
-
*
|
|
9668
|
+
* Specifies the AppLogLevel for the Window. See {@link AppLogLevel} for more information.
|
|
9616
9669
|
*/
|
|
9617
|
-
|
|
9670
|
+
appLogLevel?: AppLogLevel;
|
|
9618
9671
|
};
|
|
9619
9672
|
|
|
9620
9673
|
declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
|
|
@@ -10013,6 +10066,9 @@ declare namespace OpenFin_2 {
|
|
|
10013
10066
|
InheritableOptions,
|
|
10014
10067
|
PolicyOptions,
|
|
10015
10068
|
ChromiumPolicies,
|
|
10069
|
+
AppLogLevel,
|
|
10070
|
+
LogPath,
|
|
10071
|
+
LogTarget,
|
|
10016
10072
|
MutableWindowOptions,
|
|
10017
10073
|
WorkspacePlatformOptions,
|
|
10018
10074
|
WebRequestHeader,
|
|
@@ -10595,10 +10651,10 @@ declare type PerDomainSettings = {
|
|
|
10595
10651
|
drag?: 'allow' | 'block';
|
|
10596
10652
|
};
|
|
10597
10653
|
/**
|
|
10598
|
-
*
|
|
10599
|
-
*
|
|
10654
|
+
* Allows the app log level of any matching content to be overriden.
|
|
10655
|
+
* See also {@link AppLogLevel} for more information.
|
|
10600
10656
|
*/
|
|
10601
|
-
|
|
10657
|
+
appLogLevel?: AppLogLevel;
|
|
10602
10658
|
};
|
|
10603
10659
|
|
|
10604
10660
|
/**
|
|
@@ -12935,10 +12991,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
|
|
|
12935
12991
|
'get-current-window': VoidCall;
|
|
12936
12992
|
'get-current-window-sync': VoidCall;
|
|
12937
12993
|
'show-download-bubble': IdentityCall<{
|
|
12938
|
-
|
|
12994
|
+
anchor?: OpenFin_2.Anchor;
|
|
12939
12995
|
}, void>;
|
|
12940
12996
|
'update-download-bubble-anchor': IdentityCall<{
|
|
12941
|
-
|
|
12997
|
+
anchor: OpenFin_2.Anchor;
|
|
12942
12998
|
}, void>;
|
|
12943
12999
|
'get-external-application-info': ApiCall<OpenFin_2.ApplicationIdentity, OpenFin_2.ExternalApplicationInfo>;
|
|
12944
13000
|
'external-application-wrap': VoidCall;
|
|
@@ -15353,16 +15409,14 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
|
15353
15409
|
* Writes the passed message into both the log file and the console.
|
|
15354
15410
|
* @param level The log level for the entry. Can be either "info", "warning" or "error"
|
|
15355
15411
|
* @param message The log message text
|
|
15356
|
-
* @param target
|
|
15412
|
+
* @param target The log stream this message will be sent to, defaults to 'debug.log'. Specify 'app.log' to log to the app log of the sending View / Window. Note, when using `app.log`, it will always log to app.log irrespective of the `enableAppLogging` setting for the sender. This is particularly useful if you wish to log certain things from a View / Window but ignore generic console logs.
|
|
15357
15413
|
*
|
|
15358
15414
|
* @example
|
|
15359
15415
|
* ```js
|
|
15360
15416
|
* fin.System.log("info", "An example log message", { type: 'debug.log' }).then(() => console.log('Log info message')).catch(err => console.log(err));
|
|
15361
15417
|
* ```
|
|
15362
15418
|
*/
|
|
15363
|
-
log(level: string, message: string,
|
|
15364
|
-
type?: 'app.log' | 'debug.log';
|
|
15365
|
-
}): Promise<void>;
|
|
15419
|
+
log(level: string, message: string, target?: OpenFin_2.LogTarget): Promise<void>;
|
|
15366
15420
|
/**
|
|
15367
15421
|
* Opens the passed URL in the default web browser.
|
|
15368
15422
|
*
|
|
@@ -16187,11 +16241,35 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
|
16187
16241
|
/**
|
|
16188
16242
|
* Overrides original Chromium theme color providers matching key (currently except high contrast ones). Only colors passed in the map will be overridden.
|
|
16189
16243
|
* @param overrides - Array of ColorProviderOverrides objects
|
|
16244
|
+
* @example
|
|
16245
|
+
* ```ts
|
|
16246
|
+
* await fin.System.setThemePalette([
|
|
16247
|
+
* {
|
|
16248
|
+
* colorProviderKey: { colorMode: 'light' },
|
|
16249
|
+
* colorsMap: {
|
|
16250
|
+
* kColorLabelForeground: 4278190080,
|
|
16251
|
+
* kColorBubbleBackground: 4293980400
|
|
16252
|
+
* }
|
|
16253
|
+
* },
|
|
16254
|
+
* {
|
|
16255
|
+
* colorProviderKey: { colorMode: 'dark' },
|
|
16256
|
+
* colorsMap: {
|
|
16257
|
+
* kColorLabelForeground: 4293980400,
|
|
16258
|
+
* kColorBubbleBackground: 4293980400
|
|
16259
|
+
* }
|
|
16260
|
+
* }
|
|
16261
|
+
* ]);
|
|
16262
|
+
* ```
|
|
16190
16263
|
*/
|
|
16191
16264
|
setThemePalette(themePalette: Array<OpenFin_2.ThemePalette>): Promise<void>;
|
|
16192
16265
|
/**
|
|
16193
16266
|
* Retrieves currently used color overrides
|
|
16194
16267
|
* @returns Array of ColorProviderOverrides objects
|
|
16268
|
+
* @example
|
|
16269
|
+
* ```ts
|
|
16270
|
+
* const themePalette = await fin.System.getThemePalette();
|
|
16271
|
+
* console.log(themePalette);
|
|
16272
|
+
* ```
|
|
16195
16273
|
*/
|
|
16196
16274
|
getThemePalette(): Promise<Array<OpenFin_2.ThemePalette>>;
|
|
16197
16275
|
}
|
|
@@ -19805,8 +19883,19 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
|
19805
19883
|
* @returns {Promise<void>}
|
|
19806
19884
|
* A promise that resolves once the request to show the download bubble
|
|
19807
19885
|
* has been processed.
|
|
19886
|
+
* @example
|
|
19887
|
+
* ```js
|
|
19888
|
+
* const w = fin.Window.getCurrentSync();
|
|
19889
|
+
* const el = document.getElementById("download-bubble-button");
|
|
19890
|
+
* const rect = el.getBoundingClientRect();
|
|
19891
|
+
* const anchor = {
|
|
19892
|
+
* bounds: rect,
|
|
19893
|
+
* location: "topRight"
|
|
19894
|
+
* };
|
|
19895
|
+
* w.showDownloadBubble(anchor);
|
|
19896
|
+
* ```
|
|
19808
19897
|
*/
|
|
19809
|
-
showDownloadBubble(
|
|
19898
|
+
showDownloadBubble(anchor?: OpenFin_2.Anchor): Promise<void>;
|
|
19810
19899
|
/**
|
|
19811
19900
|
* Updates the anchor used for positioning the download bubble. This allows
|
|
19812
19901
|
* moving the bubble reactively—for example, in response to window resizes,
|
|
@@ -19818,8 +19907,27 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
|
19818
19907
|
*
|
|
19819
19908
|
* @returns {Promise<void>}
|
|
19820
19909
|
* A promise that resolves once the anchor update has been applied.
|
|
19910
|
+
* @example
|
|
19911
|
+
* ```js
|
|
19912
|
+
* var w = fin.Window.getCurrentSync();
|
|
19913
|
+
* w.on('download-button-visibility-changed', (evt) => {
|
|
19914
|
+
* if (evt.visible) {
|
|
19915
|
+
* const el = document.getElementById("download-bubble-button");
|
|
19916
|
+
* //We show our button and get it's bounding rect
|
|
19917
|
+
* el.classList.remove("hidden");
|
|
19918
|
+
* const rect = el.getBoundingClientRect();
|
|
19919
|
+
* const anchor = {
|
|
19920
|
+
* bounds: rect,
|
|
19921
|
+
* location: "topRight"
|
|
19922
|
+
* }
|
|
19923
|
+
* w.updateDownloadBubbleAnchor(anchor);
|
|
19924
|
+
* } else {
|
|
19925
|
+
* //We hide our button
|
|
19926
|
+
* document.getElementById("download-bubble-button")?.classList.add("hidden");
|
|
19927
|
+
* }
|
|
19928
|
+
});
|
|
19821
19929
|
*/
|
|
19822
|
-
updateDownloadBubbleAnchor(
|
|
19930
|
+
updateDownloadBubbleAnchor(anchor: OpenFin_2.Anchor): Promise<void>;
|
|
19823
19931
|
}
|
|
19824
19932
|
|
|
19825
19933
|
/**
|
package/out/stub.d.ts
CHANGED
|
@@ -1426,6 +1426,56 @@ declare type ApplicationWindowInfo = {
|
|
|
1426
1426
|
uuid: string;
|
|
1427
1427
|
};
|
|
1428
1428
|
|
|
1429
|
+
/**
|
|
1430
|
+
* `appLogLevel` allows the verbosity of app logs that are collected for a Window or View to be controlled when the app logging feature is enabled for its application.
|
|
1431
|
+
*
|
|
1432
|
+
* Please note, `enableAppLogging` must be specified in the application manifest's `platform` or `startup_app` key for this feature to be activated.
|
|
1433
|
+
*
|
|
1434
|
+
* If not specified, and `enableAppLogging` is true for the application, the default level will be 'silent'.
|
|
1435
|
+
*
|
|
1436
|
+
* This setting can also be specified in a Domain Setting Rule, allowing per url exceptions to the default behavior to be made. Please note, when a domain setting is actively
|
|
1437
|
+
* controlling a url's appLogLevel, its options will be ignored.
|
|
1438
|
+
*
|
|
1439
|
+
* @default 'debug'
|
|
1440
|
+
*
|
|
1441
|
+
* @example Controlling App Logs With DefaultViewOptions + Domain Settings
|
|
1442
|
+
*
|
|
1443
|
+
* In this example manifest, we use `defaultViewOptions to set the default verbosity to 'warn'.
|
|
1444
|
+
*
|
|
1445
|
+
* We also use domain settings to suppress logs entirely for an example URL, and to lower verbosity to 'debug' for another.
|
|
1446
|
+
*
|
|
1447
|
+
* ```ts
|
|
1448
|
+
* {
|
|
1449
|
+
* <rest of settings>
|
|
1450
|
+
* "platform": {
|
|
1451
|
+
* <rest of settings>
|
|
1452
|
+
* "enableAppLogging": "true",
|
|
1453
|
+
* "defaultViewOptions": {
|
|
1454
|
+
* "appLogLevel": "warn"
|
|
1455
|
+
* },
|
|
1456
|
+
* "domainSettings": {
|
|
1457
|
+
* "default": { <rest of settings> }
|
|
1458
|
+
* "rules": [
|
|
1459
|
+
* <rest of rules>
|
|
1460
|
+
* {
|
|
1461
|
+
* "match": ["*://*?app-logging-level=silent"],
|
|
1462
|
+
* "options": {
|
|
1463
|
+
* "appLogLevel": "silent"
|
|
1464
|
+
* }
|
|
1465
|
+
* },
|
|
1466
|
+
* {
|
|
1467
|
+
* "match": ["*://*?app-logging-level=debug"],
|
|
1468
|
+
* "options": {
|
|
1469
|
+
* "appLogLevel": "debug"
|
|
1470
|
+
* }
|
|
1471
|
+
* },
|
|
1472
|
+
* ]
|
|
1473
|
+
* }
|
|
1474
|
+
* }
|
|
1475
|
+
* }
|
|
1476
|
+
*/
|
|
1477
|
+
declare type AppLogLevel = 'silent' | 'debug' | 'info' | 'warn' | 'error';
|
|
1478
|
+
|
|
1429
1479
|
/**
|
|
1430
1480
|
* @interface
|
|
1431
1481
|
*/
|
|
@@ -9120,6 +9170,12 @@ declare type LogInfo = {
|
|
|
9120
9170
|
*/
|
|
9121
9171
|
declare type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
|
|
9122
9172
|
|
|
9173
|
+
declare type LogPath = 'debug.log' | 'app.log';
|
|
9174
|
+
|
|
9175
|
+
declare type LogTarget = {
|
|
9176
|
+
type: LogPath;
|
|
9177
|
+
};
|
|
9178
|
+
|
|
9123
9179
|
/**
|
|
9124
9180
|
* Log types
|
|
9125
9181
|
*
|
|
@@ -9644,10 +9700,9 @@ declare type MutableViewOptions = {
|
|
|
9644
9700
|
*/
|
|
9645
9701
|
chromiumPolicies: ChromiumPolicies;
|
|
9646
9702
|
/**
|
|
9647
|
-
*
|
|
9648
|
-
* When omitted, inherits from the parent application.
|
|
9703
|
+
* Specifies the AppLogLevel for the specified View. See {@link AppLogLevel} for more information.
|
|
9649
9704
|
*/
|
|
9650
|
-
|
|
9705
|
+
appLogLevel?: AppLogLevel;
|
|
9651
9706
|
};
|
|
9652
9707
|
|
|
9653
9708
|
/**
|
|
@@ -9931,11 +9986,9 @@ declare type MutableWindowOptions = {
|
|
|
9931
9986
|
*/
|
|
9932
9987
|
chromiumPolicies: ChromiumPolicies;
|
|
9933
9988
|
/**
|
|
9934
|
-
*
|
|
9935
|
-
* When omitted, inherits from the parent application.
|
|
9936
|
-
*
|
|
9989
|
+
* Specifies the AppLogLevel for the Window. See {@link AppLogLevel} for more information.
|
|
9937
9990
|
*/
|
|
9938
|
-
|
|
9991
|
+
appLogLevel?: AppLogLevel;
|
|
9939
9992
|
};
|
|
9940
9993
|
|
|
9941
9994
|
declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
|
|
@@ -10347,6 +10400,9 @@ declare namespace OpenFin_2 {
|
|
|
10347
10400
|
InheritableOptions,
|
|
10348
10401
|
PolicyOptions,
|
|
10349
10402
|
ChromiumPolicies,
|
|
10403
|
+
AppLogLevel,
|
|
10404
|
+
LogPath,
|
|
10405
|
+
LogTarget,
|
|
10350
10406
|
MutableWindowOptions,
|
|
10351
10407
|
WorkspacePlatformOptions,
|
|
10352
10408
|
WebRequestHeader,
|
|
@@ -10929,10 +10985,10 @@ declare type PerDomainSettings = {
|
|
|
10929
10985
|
drag?: 'allow' | 'block';
|
|
10930
10986
|
};
|
|
10931
10987
|
/**
|
|
10932
|
-
*
|
|
10933
|
-
*
|
|
10988
|
+
* Allows the app log level of any matching content to be overriden.
|
|
10989
|
+
* See also {@link AppLogLevel} for more information.
|
|
10934
10990
|
*/
|
|
10935
|
-
|
|
10991
|
+
appLogLevel?: AppLogLevel;
|
|
10936
10992
|
};
|
|
10937
10993
|
|
|
10938
10994
|
/**
|
|
@@ -13352,10 +13408,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
|
|
|
13352
13408
|
'get-current-window': VoidCall;
|
|
13353
13409
|
'get-current-window-sync': VoidCall;
|
|
13354
13410
|
'show-download-bubble': IdentityCall<{
|
|
13355
|
-
|
|
13411
|
+
anchor?: OpenFin_2.Anchor;
|
|
13356
13412
|
}, void>;
|
|
13357
13413
|
'update-download-bubble-anchor': IdentityCall<{
|
|
13358
|
-
|
|
13414
|
+
anchor: OpenFin_2.Anchor;
|
|
13359
13415
|
}, void>;
|
|
13360
13416
|
'get-external-application-info': ApiCall<OpenFin_2.ApplicationIdentity, OpenFin_2.ExternalApplicationInfo>;
|
|
13361
13417
|
'external-application-wrap': VoidCall;
|
|
@@ -15776,16 +15832,14 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
|
15776
15832
|
* Writes the passed message into both the log file and the console.
|
|
15777
15833
|
* @param level The log level for the entry. Can be either "info", "warning" or "error"
|
|
15778
15834
|
* @param message The log message text
|
|
15779
|
-
* @param target
|
|
15835
|
+
* @param target The log stream this message will be sent to, defaults to 'debug.log'. Specify 'app.log' to log to the app log of the sending View / Window. Note, when using `app.log`, it will always log to app.log irrespective of the `enableAppLogging` setting for the sender. This is particularly useful if you wish to log certain things from a View / Window but ignore generic console logs.
|
|
15780
15836
|
*
|
|
15781
15837
|
* @example
|
|
15782
15838
|
* ```js
|
|
15783
15839
|
* fin.System.log("info", "An example log message", { type: 'debug.log' }).then(() => console.log('Log info message')).catch(err => console.log(err));
|
|
15784
15840
|
* ```
|
|
15785
15841
|
*/
|
|
15786
|
-
log(level: string, message: string,
|
|
15787
|
-
type?: 'app.log' | 'debug.log';
|
|
15788
|
-
}): Promise<void>;
|
|
15842
|
+
log(level: string, message: string, target?: OpenFin_2.LogTarget): Promise<void>;
|
|
15789
15843
|
/**
|
|
15790
15844
|
* Opens the passed URL in the default web browser.
|
|
15791
15845
|
*
|
|
@@ -16610,11 +16664,35 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
|
16610
16664
|
/**
|
|
16611
16665
|
* Overrides original Chromium theme color providers matching key (currently except high contrast ones). Only colors passed in the map will be overridden.
|
|
16612
16666
|
* @param overrides - Array of ColorProviderOverrides objects
|
|
16667
|
+
* @example
|
|
16668
|
+
* ```ts
|
|
16669
|
+
* await fin.System.setThemePalette([
|
|
16670
|
+
* {
|
|
16671
|
+
* colorProviderKey: { colorMode: 'light' },
|
|
16672
|
+
* colorsMap: {
|
|
16673
|
+
* kColorLabelForeground: 4278190080,
|
|
16674
|
+
* kColorBubbleBackground: 4293980400
|
|
16675
|
+
* }
|
|
16676
|
+
* },
|
|
16677
|
+
* {
|
|
16678
|
+
* colorProviderKey: { colorMode: 'dark' },
|
|
16679
|
+
* colorsMap: {
|
|
16680
|
+
* kColorLabelForeground: 4293980400,
|
|
16681
|
+
* kColorBubbleBackground: 4293980400
|
|
16682
|
+
* }
|
|
16683
|
+
* }
|
|
16684
|
+
* ]);
|
|
16685
|
+
* ```
|
|
16613
16686
|
*/
|
|
16614
16687
|
setThemePalette(themePalette: Array<OpenFin_2.ThemePalette>): Promise<void>;
|
|
16615
16688
|
/**
|
|
16616
16689
|
* Retrieves currently used color overrides
|
|
16617
16690
|
* @returns Array of ColorProviderOverrides objects
|
|
16691
|
+
* @example
|
|
16692
|
+
* ```ts
|
|
16693
|
+
* const themePalette = await fin.System.getThemePalette();
|
|
16694
|
+
* console.log(themePalette);
|
|
16695
|
+
* ```
|
|
16618
16696
|
*/
|
|
16619
16697
|
getThemePalette(): Promise<Array<OpenFin_2.ThemePalette>>;
|
|
16620
16698
|
}
|
|
@@ -20275,8 +20353,19 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
|
20275
20353
|
* @returns {Promise<void>}
|
|
20276
20354
|
* A promise that resolves once the request to show the download bubble
|
|
20277
20355
|
* has been processed.
|
|
20356
|
+
* @example
|
|
20357
|
+
* ```js
|
|
20358
|
+
* const w = fin.Window.getCurrentSync();
|
|
20359
|
+
* const el = document.getElementById("download-bubble-button");
|
|
20360
|
+
* const rect = el.getBoundingClientRect();
|
|
20361
|
+
* const anchor = {
|
|
20362
|
+
* bounds: rect,
|
|
20363
|
+
* location: "topRight"
|
|
20364
|
+
* };
|
|
20365
|
+
* w.showDownloadBubble(anchor);
|
|
20366
|
+
* ```
|
|
20278
20367
|
*/
|
|
20279
|
-
showDownloadBubble(
|
|
20368
|
+
showDownloadBubble(anchor?: OpenFin_2.Anchor): Promise<void>;
|
|
20280
20369
|
/**
|
|
20281
20370
|
* Updates the anchor used for positioning the download bubble. This allows
|
|
20282
20371
|
* moving the bubble reactively—for example, in response to window resizes,
|
|
@@ -20288,8 +20377,27 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
|
20288
20377
|
*
|
|
20289
20378
|
* @returns {Promise<void>}
|
|
20290
20379
|
* A promise that resolves once the anchor update has been applied.
|
|
20380
|
+
* @example
|
|
20381
|
+
* ```js
|
|
20382
|
+
* var w = fin.Window.getCurrentSync();
|
|
20383
|
+
* w.on('download-button-visibility-changed', (evt) => {
|
|
20384
|
+
* if (evt.visible) {
|
|
20385
|
+
* const el = document.getElementById("download-bubble-button");
|
|
20386
|
+
* //We show our button and get it's bounding rect
|
|
20387
|
+
* el.classList.remove("hidden");
|
|
20388
|
+
* const rect = el.getBoundingClientRect();
|
|
20389
|
+
* const anchor = {
|
|
20390
|
+
* bounds: rect,
|
|
20391
|
+
* location: "topRight"
|
|
20392
|
+
* }
|
|
20393
|
+
* w.updateDownloadBubbleAnchor(anchor);
|
|
20394
|
+
* } else {
|
|
20395
|
+
* //We hide our button
|
|
20396
|
+
* document.getElementById("download-bubble-button")?.classList.add("hidden");
|
|
20397
|
+
* }
|
|
20398
|
+
});
|
|
20291
20399
|
*/
|
|
20292
|
-
updateDownloadBubbleAnchor(
|
|
20400
|
+
updateDownloadBubbleAnchor(anchor: OpenFin_2.Anchor): Promise<void>;
|
|
20293
20401
|
}
|
|
20294
20402
|
|
|
20295
20403
|
/**
|
package/out/stub.js
CHANGED
|
@@ -5190,9 +5190,20 @@ function requireInstance () {
|
|
|
5190
5190
|
* @returns {Promise<void>}
|
|
5191
5191
|
* A promise that resolves once the request to show the download bubble
|
|
5192
5192
|
* has been processed.
|
|
5193
|
+
* @example
|
|
5194
|
+
* ```js
|
|
5195
|
+
* const w = fin.Window.getCurrentSync();
|
|
5196
|
+
* const el = document.getElementById("download-bubble-button");
|
|
5197
|
+
* const rect = el.getBoundingClientRect();
|
|
5198
|
+
* const anchor = {
|
|
5199
|
+
* bounds: rect,
|
|
5200
|
+
* location: "topRight"
|
|
5201
|
+
* };
|
|
5202
|
+
* w.showDownloadBubble(anchor);
|
|
5203
|
+
* ```
|
|
5193
5204
|
*/
|
|
5194
|
-
async showDownloadBubble(
|
|
5195
|
-
return this.wire.sendAction('show-download-bubble', { ...this.identity,
|
|
5205
|
+
async showDownloadBubble(anchor) {
|
|
5206
|
+
return this.wire.sendAction('show-download-bubble', { ...this.identity, anchor }).then(() => undefined);
|
|
5196
5207
|
}
|
|
5197
5208
|
/**
|
|
5198
5209
|
* Updates the anchor used for positioning the download bubble. This allows
|
|
@@ -5205,10 +5216,29 @@ function requireInstance () {
|
|
|
5205
5216
|
*
|
|
5206
5217
|
* @returns {Promise<void>}
|
|
5207
5218
|
* A promise that resolves once the anchor update has been applied.
|
|
5219
|
+
* @example
|
|
5220
|
+
* ```js
|
|
5221
|
+
* var w = fin.Window.getCurrentSync();
|
|
5222
|
+
* w.on('download-button-visibility-changed', (evt) => {
|
|
5223
|
+
* if (evt.visible) {
|
|
5224
|
+
* const el = document.getElementById("download-bubble-button");
|
|
5225
|
+
* //We show our button and get it's bounding rect
|
|
5226
|
+
* el.classList.remove("hidden");
|
|
5227
|
+
* const rect = el.getBoundingClientRect();
|
|
5228
|
+
* const anchor = {
|
|
5229
|
+
* bounds: rect,
|
|
5230
|
+
* location: "topRight"
|
|
5231
|
+
* }
|
|
5232
|
+
* w.updateDownloadBubbleAnchor(anchor);
|
|
5233
|
+
* } else {
|
|
5234
|
+
* //We hide our button
|
|
5235
|
+
* document.getElementById("download-bubble-button")?.classList.add("hidden");
|
|
5236
|
+
* }
|
|
5237
|
+
});
|
|
5208
5238
|
*/
|
|
5209
|
-
async updateDownloadBubbleAnchor(
|
|
5239
|
+
async updateDownloadBubbleAnchor(anchor) {
|
|
5210
5240
|
return this.wire
|
|
5211
|
-
.sendAction('update-download-bubble-anchor', { ...this.identity,
|
|
5241
|
+
.sendAction('update-download-bubble-anchor', { ...this.identity, anchor })
|
|
5212
5242
|
.then(() => undefined);
|
|
5213
5243
|
}
|
|
5214
5244
|
}
|
|
@@ -6296,15 +6326,15 @@ class System extends base_1$m.EmitterBase {
|
|
|
6296
6326
|
* Writes the passed message into both the log file and the console.
|
|
6297
6327
|
* @param level The log level for the entry. Can be either "info", "warning" or "error"
|
|
6298
6328
|
* @param message The log message text
|
|
6299
|
-
* @param target
|
|
6329
|
+
* @param target The log stream this message will be sent to, defaults to 'debug.log'. Specify 'app.log' to log to the app log of the sending View / Window. Note, when using `app.log`, it will always log to app.log irrespective of the `enableAppLogging` setting for the sender. This is particularly useful if you wish to log certain things from a View / Window but ignore generic console logs.
|
|
6300
6330
|
*
|
|
6301
6331
|
* @example
|
|
6302
6332
|
* ```js
|
|
6303
6333
|
* fin.System.log("info", "An example log message", { type: 'debug.log' }).then(() => console.log('Log info message')).catch(err => console.log(err));
|
|
6304
6334
|
* ```
|
|
6305
6335
|
*/
|
|
6306
|
-
log(level, message,
|
|
6307
|
-
return this.wire.sendAction('write-to-log', { level, message, target:
|
|
6336
|
+
log(level, message, target) {
|
|
6337
|
+
return this.wire.sendAction('write-to-log', { level, message, target: target ?? {} }).then(() => undefined);
|
|
6308
6338
|
}
|
|
6309
6339
|
/**
|
|
6310
6340
|
* Opens the passed URL in the default web browser.
|
|
@@ -7412,6 +7442,25 @@ class System extends base_1$m.EmitterBase {
|
|
|
7412
7442
|
/**
|
|
7413
7443
|
* Overrides original Chromium theme color providers matching key (currently except high contrast ones). Only colors passed in the map will be overridden.
|
|
7414
7444
|
* @param overrides - Array of ColorProviderOverrides objects
|
|
7445
|
+
* @example
|
|
7446
|
+
* ```ts
|
|
7447
|
+
* await fin.System.setThemePalette([
|
|
7448
|
+
* {
|
|
7449
|
+
* colorProviderKey: { colorMode: 'light' },
|
|
7450
|
+
* colorsMap: {
|
|
7451
|
+
* kColorLabelForeground: 4278190080,
|
|
7452
|
+
* kColorBubbleBackground: 4293980400
|
|
7453
|
+
* }
|
|
7454
|
+
* },
|
|
7455
|
+
* {
|
|
7456
|
+
* colorProviderKey: { colorMode: 'dark' },
|
|
7457
|
+
* colorsMap: {
|
|
7458
|
+
* kColorLabelForeground: 4293980400,
|
|
7459
|
+
* kColorBubbleBackground: 4293980400
|
|
7460
|
+
* }
|
|
7461
|
+
* }
|
|
7462
|
+
* ]);
|
|
7463
|
+
* ```
|
|
7415
7464
|
*/
|
|
7416
7465
|
async setThemePalette(themePalette) {
|
|
7417
7466
|
return (await this.wire.sendAction('set-theme-palette', { themePalette })).payload.data;
|
|
@@ -7419,6 +7468,11 @@ class System extends base_1$m.EmitterBase {
|
|
|
7419
7468
|
/**
|
|
7420
7469
|
* Retrieves currently used color overrides
|
|
7421
7470
|
* @returns Array of ColorProviderOverrides objects
|
|
7471
|
+
* @example
|
|
7472
|
+
* ```ts
|
|
7473
|
+
* const themePalette = await fin.System.getThemePalette();
|
|
7474
|
+
* console.log(themePalette);
|
|
7475
|
+
* ```
|
|
7422
7476
|
*/
|
|
7423
7477
|
async getThemePalette() {
|
|
7424
7478
|
const { payload } = await this.wire.sendAction('get-theme-palette');
|