@openfin/core 43.100.105 → 43.100.109
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 +148 -19
- package/out/mock-beta.d.ts +148 -19
- package/out/mock-public.d.ts +148 -19
- package/out/stub.d.ts +148 -19
- 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
|
*/
|
|
@@ -6232,7 +6282,28 @@ declare type Hotkey = {
|
|
|
6232
6282
|
*/
|
|
6233
6283
|
keys: string;
|
|
6234
6284
|
/**
|
|
6235
|
-
*
|
|
6285
|
+
* Controls the event phase at which the hotkey is triggered.
|
|
6286
|
+
*
|
|
6287
|
+
* - `'capture'`: The hotkey fires **before** the event is sent to the renderer/page.
|
|
6288
|
+
* This is the only phase where the `preventDefault` property is effective.
|
|
6289
|
+
*
|
|
6290
|
+
* - `'bubble'`: The hotkey fires **after** the page has processed the key event.
|
|
6291
|
+
* This behaves exactly like a standard JavaScript event listener attached to the window:
|
|
6292
|
+
* 1. If the page calls `event.preventDefault()` (on either **keydown** or **keyup**), this hotkey will **not** fire.
|
|
6293
|
+
* 2. If the hotkey is browser-reserved (e.g. `Ctrl+Tab` to switch tabs for which keyup/keydown do not fire in a web browser), that action takes precedence and this hotkey will **not** fire.
|
|
6294
|
+
*
|
|
6295
|
+
* @default 'capture'
|
|
6296
|
+
*/
|
|
6297
|
+
phase?: 'capture' | 'bubble';
|
|
6298
|
+
/**
|
|
6299
|
+
* Determines if the event should continue to the renderer.
|
|
6300
|
+
*
|
|
6301
|
+
* - `true`: The event is consumed immediately. It will **never** reach the renderer/page.
|
|
6302
|
+
* - `false`: The event is sent to the renderer after this hotkey executes.
|
|
6303
|
+
*
|
|
6304
|
+
* @remarks
|
|
6305
|
+
* This property is **only valid** when `phase` is set to `'capture'`.
|
|
6306
|
+
* If `phase` is `'bubble'`, this property is ignored (as the renderer has already received and processed the event).
|
|
6236
6307
|
*
|
|
6237
6308
|
* @default false
|
|
6238
6309
|
*/
|
|
@@ -8811,6 +8882,12 @@ declare type LogInfo = {
|
|
|
8811
8882
|
*/
|
|
8812
8883
|
declare type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
|
|
8813
8884
|
|
|
8885
|
+
declare type LogPath = 'debug.log' | 'app.log';
|
|
8886
|
+
|
|
8887
|
+
declare type LogTarget = {
|
|
8888
|
+
type: LogPath;
|
|
8889
|
+
};
|
|
8890
|
+
|
|
8814
8891
|
/**
|
|
8815
8892
|
* Log types
|
|
8816
8893
|
*
|
|
@@ -9331,10 +9408,9 @@ declare type MutableViewOptions = {
|
|
|
9331
9408
|
*/
|
|
9332
9409
|
chromiumPolicies: ChromiumPolicies;
|
|
9333
9410
|
/**
|
|
9334
|
-
*
|
|
9335
|
-
* When omitted, inherits from the parent application.
|
|
9411
|
+
* Specifies the AppLogLevel for the specified View. See {@link AppLogLevel} for more information.
|
|
9336
9412
|
*/
|
|
9337
|
-
|
|
9413
|
+
appLogLevel?: AppLogLevel;
|
|
9338
9414
|
};
|
|
9339
9415
|
|
|
9340
9416
|
/**
|
|
@@ -9610,11 +9686,9 @@ declare type MutableWindowOptions = {
|
|
|
9610
9686
|
*/
|
|
9611
9687
|
chromiumPolicies: ChromiumPolicies;
|
|
9612
9688
|
/**
|
|
9613
|
-
*
|
|
9614
|
-
* When omitted, inherits from the parent application.
|
|
9615
|
-
*
|
|
9689
|
+
* Specifies the AppLogLevel for the Window. See {@link AppLogLevel} for more information.
|
|
9616
9690
|
*/
|
|
9617
|
-
|
|
9691
|
+
appLogLevel?: AppLogLevel;
|
|
9618
9692
|
};
|
|
9619
9693
|
|
|
9620
9694
|
declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
|
|
@@ -10013,6 +10087,9 @@ declare namespace OpenFin_2 {
|
|
|
10013
10087
|
InheritableOptions,
|
|
10014
10088
|
PolicyOptions,
|
|
10015
10089
|
ChromiumPolicies,
|
|
10090
|
+
AppLogLevel,
|
|
10091
|
+
LogPath,
|
|
10092
|
+
LogTarget,
|
|
10016
10093
|
MutableWindowOptions,
|
|
10017
10094
|
WorkspacePlatformOptions,
|
|
10018
10095
|
WebRequestHeader,
|
|
@@ -10595,10 +10672,10 @@ declare type PerDomainSettings = {
|
|
|
10595
10672
|
drag?: 'allow' | 'block';
|
|
10596
10673
|
};
|
|
10597
10674
|
/**
|
|
10598
|
-
*
|
|
10599
|
-
*
|
|
10675
|
+
* Allows the app log level of any matching content to be overriden.
|
|
10676
|
+
* See also {@link AppLogLevel} for more information.
|
|
10600
10677
|
*/
|
|
10601
|
-
|
|
10678
|
+
appLogLevel?: AppLogLevel;
|
|
10602
10679
|
};
|
|
10603
10680
|
|
|
10604
10681
|
/**
|
|
@@ -12935,10 +13012,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
|
|
|
12935
13012
|
'get-current-window': VoidCall;
|
|
12936
13013
|
'get-current-window-sync': VoidCall;
|
|
12937
13014
|
'show-download-bubble': IdentityCall<{
|
|
12938
|
-
|
|
13015
|
+
anchor?: OpenFin_2.Anchor;
|
|
12939
13016
|
}, void>;
|
|
12940
13017
|
'update-download-bubble-anchor': IdentityCall<{
|
|
12941
|
-
|
|
13018
|
+
anchor: OpenFin_2.Anchor;
|
|
12942
13019
|
}, void>;
|
|
12943
13020
|
'get-external-application-info': ApiCall<OpenFin_2.ApplicationIdentity, OpenFin_2.ExternalApplicationInfo>;
|
|
12944
13021
|
'external-application-wrap': VoidCall;
|
|
@@ -15353,16 +15430,14 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
|
15353
15430
|
* Writes the passed message into both the log file and the console.
|
|
15354
15431
|
* @param level The log level for the entry. Can be either "info", "warning" or "error"
|
|
15355
15432
|
* @param message The log message text
|
|
15356
|
-
* @param target
|
|
15433
|
+
* @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
15434
|
*
|
|
15358
15435
|
* @example
|
|
15359
15436
|
* ```js
|
|
15360
15437
|
* fin.System.log("info", "An example log message", { type: 'debug.log' }).then(() => console.log('Log info message')).catch(err => console.log(err));
|
|
15361
15438
|
* ```
|
|
15362
15439
|
*/
|
|
15363
|
-
log(level: string, message: string,
|
|
15364
|
-
type?: 'app.log' | 'debug.log';
|
|
15365
|
-
}): Promise<void>;
|
|
15440
|
+
log(level: string, message: string, target?: OpenFin_2.LogTarget): Promise<void>;
|
|
15366
15441
|
/**
|
|
15367
15442
|
* Opens the passed URL in the default web browser.
|
|
15368
15443
|
*
|
|
@@ -16187,11 +16262,35 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
|
16187
16262
|
/**
|
|
16188
16263
|
* Overrides original Chromium theme color providers matching key (currently except high contrast ones). Only colors passed in the map will be overridden.
|
|
16189
16264
|
* @param overrides - Array of ColorProviderOverrides objects
|
|
16265
|
+
* @example
|
|
16266
|
+
* ```ts
|
|
16267
|
+
* await fin.System.setThemePalette([
|
|
16268
|
+
* {
|
|
16269
|
+
* colorProviderKey: { colorMode: 'light' },
|
|
16270
|
+
* colorsMap: {
|
|
16271
|
+
* kColorLabelForeground: 4278190080,
|
|
16272
|
+
* kColorBubbleBackground: 4293980400
|
|
16273
|
+
* }
|
|
16274
|
+
* },
|
|
16275
|
+
* {
|
|
16276
|
+
* colorProviderKey: { colorMode: 'dark' },
|
|
16277
|
+
* colorsMap: {
|
|
16278
|
+
* kColorLabelForeground: 4293980400,
|
|
16279
|
+
* kColorBubbleBackground: 4293980400
|
|
16280
|
+
* }
|
|
16281
|
+
* }
|
|
16282
|
+
* ]);
|
|
16283
|
+
* ```
|
|
16190
16284
|
*/
|
|
16191
16285
|
setThemePalette(themePalette: Array<OpenFin_2.ThemePalette>): Promise<void>;
|
|
16192
16286
|
/**
|
|
16193
16287
|
* Retrieves currently used color overrides
|
|
16194
16288
|
* @returns Array of ColorProviderOverrides objects
|
|
16289
|
+
* @example
|
|
16290
|
+
* ```ts
|
|
16291
|
+
* const themePalette = await fin.System.getThemePalette();
|
|
16292
|
+
* console.log(themePalette);
|
|
16293
|
+
* ```
|
|
16195
16294
|
*/
|
|
16196
16295
|
getThemePalette(): Promise<Array<OpenFin_2.ThemePalette>>;
|
|
16197
16296
|
}
|
|
@@ -19805,8 +19904,19 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
|
19805
19904
|
* @returns {Promise<void>}
|
|
19806
19905
|
* A promise that resolves once the request to show the download bubble
|
|
19807
19906
|
* has been processed.
|
|
19907
|
+
* @example
|
|
19908
|
+
* ```js
|
|
19909
|
+
* const w = fin.Window.getCurrentSync();
|
|
19910
|
+
* const el = document.getElementById("download-bubble-button");
|
|
19911
|
+
* const rect = el.getBoundingClientRect();
|
|
19912
|
+
* const anchor = {
|
|
19913
|
+
* bounds: rect,
|
|
19914
|
+
* location: "topRight"
|
|
19915
|
+
* };
|
|
19916
|
+
* w.showDownloadBubble(anchor);
|
|
19917
|
+
* ```
|
|
19808
19918
|
*/
|
|
19809
|
-
showDownloadBubble(
|
|
19919
|
+
showDownloadBubble(anchor?: OpenFin_2.Anchor): Promise<void>;
|
|
19810
19920
|
/**
|
|
19811
19921
|
* Updates the anchor used for positioning the download bubble. This allows
|
|
19812
19922
|
* moving the bubble reactively—for example, in response to window resizes,
|
|
@@ -19818,8 +19928,27 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
|
19818
19928
|
*
|
|
19819
19929
|
* @returns {Promise<void>}
|
|
19820
19930
|
* A promise that resolves once the anchor update has been applied.
|
|
19931
|
+
* @example
|
|
19932
|
+
* ```js
|
|
19933
|
+
* var w = fin.Window.getCurrentSync();
|
|
19934
|
+
* w.on('download-button-visibility-changed', (evt) => {
|
|
19935
|
+
* if (evt.visible) {
|
|
19936
|
+
* const el = document.getElementById("download-bubble-button");
|
|
19937
|
+
* //We show our button and get it's bounding rect
|
|
19938
|
+
* el.classList.remove("hidden");
|
|
19939
|
+
* const rect = el.getBoundingClientRect();
|
|
19940
|
+
* const anchor = {
|
|
19941
|
+
* bounds: rect,
|
|
19942
|
+
* location: "topRight"
|
|
19943
|
+
* }
|
|
19944
|
+
* w.updateDownloadBubbleAnchor(anchor);
|
|
19945
|
+
* } else {
|
|
19946
|
+
* //We hide our button
|
|
19947
|
+
* document.getElementById("download-bubble-button")?.classList.add("hidden");
|
|
19948
|
+
* }
|
|
19949
|
+
});
|
|
19821
19950
|
*/
|
|
19822
|
-
updateDownloadBubbleAnchor(
|
|
19951
|
+
updateDownloadBubbleAnchor(anchor: OpenFin_2.Anchor): Promise<void>;
|
|
19823
19952
|
}
|
|
19824
19953
|
|
|
19825
19954
|
/**
|
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
|
*/
|
|
@@ -6232,7 +6282,28 @@ declare type Hotkey = {
|
|
|
6232
6282
|
*/
|
|
6233
6283
|
keys: string;
|
|
6234
6284
|
/**
|
|
6235
|
-
*
|
|
6285
|
+
* Controls the event phase at which the hotkey is triggered.
|
|
6286
|
+
*
|
|
6287
|
+
* - `'capture'`: The hotkey fires **before** the event is sent to the renderer/page.
|
|
6288
|
+
* This is the only phase where the `preventDefault` property is effective.
|
|
6289
|
+
*
|
|
6290
|
+
* - `'bubble'`: The hotkey fires **after** the page has processed the key event.
|
|
6291
|
+
* This behaves exactly like a standard JavaScript event listener attached to the window:
|
|
6292
|
+
* 1. If the page calls `event.preventDefault()` (on either **keydown** or **keyup**), this hotkey will **not** fire.
|
|
6293
|
+
* 2. If the hotkey is browser-reserved (e.g. `Ctrl+Tab` to switch tabs for which keyup/keydown do not fire in a web browser), that action takes precedence and this hotkey will **not** fire.
|
|
6294
|
+
*
|
|
6295
|
+
* @default 'capture'
|
|
6296
|
+
*/
|
|
6297
|
+
phase?: 'capture' | 'bubble';
|
|
6298
|
+
/**
|
|
6299
|
+
* Determines if the event should continue to the renderer.
|
|
6300
|
+
*
|
|
6301
|
+
* - `true`: The event is consumed immediately. It will **never** reach the renderer/page.
|
|
6302
|
+
* - `false`: The event is sent to the renderer after this hotkey executes.
|
|
6303
|
+
*
|
|
6304
|
+
* @remarks
|
|
6305
|
+
* This property is **only valid** when `phase` is set to `'capture'`.
|
|
6306
|
+
* If `phase` is `'bubble'`, this property is ignored (as the renderer has already received and processed the event).
|
|
6236
6307
|
*
|
|
6237
6308
|
* @default false
|
|
6238
6309
|
*/
|
|
@@ -8811,6 +8882,12 @@ declare type LogInfo = {
|
|
|
8811
8882
|
*/
|
|
8812
8883
|
declare type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
|
|
8813
8884
|
|
|
8885
|
+
declare type LogPath = 'debug.log' | 'app.log';
|
|
8886
|
+
|
|
8887
|
+
declare type LogTarget = {
|
|
8888
|
+
type: LogPath;
|
|
8889
|
+
};
|
|
8890
|
+
|
|
8814
8891
|
/**
|
|
8815
8892
|
* Log types
|
|
8816
8893
|
*
|
|
@@ -9331,10 +9408,9 @@ declare type MutableViewOptions = {
|
|
|
9331
9408
|
*/
|
|
9332
9409
|
chromiumPolicies: ChromiumPolicies;
|
|
9333
9410
|
/**
|
|
9334
|
-
*
|
|
9335
|
-
* When omitted, inherits from the parent application.
|
|
9411
|
+
* Specifies the AppLogLevel for the specified View. See {@link AppLogLevel} for more information.
|
|
9336
9412
|
*/
|
|
9337
|
-
|
|
9413
|
+
appLogLevel?: AppLogLevel;
|
|
9338
9414
|
};
|
|
9339
9415
|
|
|
9340
9416
|
/**
|
|
@@ -9610,11 +9686,9 @@ declare type MutableWindowOptions = {
|
|
|
9610
9686
|
*/
|
|
9611
9687
|
chromiumPolicies: ChromiumPolicies;
|
|
9612
9688
|
/**
|
|
9613
|
-
*
|
|
9614
|
-
* When omitted, inherits from the parent application.
|
|
9615
|
-
*
|
|
9689
|
+
* Specifies the AppLogLevel for the Window. See {@link AppLogLevel} for more information.
|
|
9616
9690
|
*/
|
|
9617
|
-
|
|
9691
|
+
appLogLevel?: AppLogLevel;
|
|
9618
9692
|
};
|
|
9619
9693
|
|
|
9620
9694
|
declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
|
|
@@ -10013,6 +10087,9 @@ declare namespace OpenFin_2 {
|
|
|
10013
10087
|
InheritableOptions,
|
|
10014
10088
|
PolicyOptions,
|
|
10015
10089
|
ChromiumPolicies,
|
|
10090
|
+
AppLogLevel,
|
|
10091
|
+
LogPath,
|
|
10092
|
+
LogTarget,
|
|
10016
10093
|
MutableWindowOptions,
|
|
10017
10094
|
WorkspacePlatformOptions,
|
|
10018
10095
|
WebRequestHeader,
|
|
@@ -10595,10 +10672,10 @@ declare type PerDomainSettings = {
|
|
|
10595
10672
|
drag?: 'allow' | 'block';
|
|
10596
10673
|
};
|
|
10597
10674
|
/**
|
|
10598
|
-
*
|
|
10599
|
-
*
|
|
10675
|
+
* Allows the app log level of any matching content to be overriden.
|
|
10676
|
+
* See also {@link AppLogLevel} for more information.
|
|
10600
10677
|
*/
|
|
10601
|
-
|
|
10678
|
+
appLogLevel?: AppLogLevel;
|
|
10602
10679
|
};
|
|
10603
10680
|
|
|
10604
10681
|
/**
|
|
@@ -12935,10 +13012,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
|
|
|
12935
13012
|
'get-current-window': VoidCall;
|
|
12936
13013
|
'get-current-window-sync': VoidCall;
|
|
12937
13014
|
'show-download-bubble': IdentityCall<{
|
|
12938
|
-
|
|
13015
|
+
anchor?: OpenFin_2.Anchor;
|
|
12939
13016
|
}, void>;
|
|
12940
13017
|
'update-download-bubble-anchor': IdentityCall<{
|
|
12941
|
-
|
|
13018
|
+
anchor: OpenFin_2.Anchor;
|
|
12942
13019
|
}, void>;
|
|
12943
13020
|
'get-external-application-info': ApiCall<OpenFin_2.ApplicationIdentity, OpenFin_2.ExternalApplicationInfo>;
|
|
12944
13021
|
'external-application-wrap': VoidCall;
|
|
@@ -15353,16 +15430,14 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
|
15353
15430
|
* Writes the passed message into both the log file and the console.
|
|
15354
15431
|
* @param level The log level for the entry. Can be either "info", "warning" or "error"
|
|
15355
15432
|
* @param message The log message text
|
|
15356
|
-
* @param target
|
|
15433
|
+
* @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
15434
|
*
|
|
15358
15435
|
* @example
|
|
15359
15436
|
* ```js
|
|
15360
15437
|
* fin.System.log("info", "An example log message", { type: 'debug.log' }).then(() => console.log('Log info message')).catch(err => console.log(err));
|
|
15361
15438
|
* ```
|
|
15362
15439
|
*/
|
|
15363
|
-
log(level: string, message: string,
|
|
15364
|
-
type?: 'app.log' | 'debug.log';
|
|
15365
|
-
}): Promise<void>;
|
|
15440
|
+
log(level: string, message: string, target?: OpenFin_2.LogTarget): Promise<void>;
|
|
15366
15441
|
/**
|
|
15367
15442
|
* Opens the passed URL in the default web browser.
|
|
15368
15443
|
*
|
|
@@ -16187,11 +16262,35 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
|
16187
16262
|
/**
|
|
16188
16263
|
* Overrides original Chromium theme color providers matching key (currently except high contrast ones). Only colors passed in the map will be overridden.
|
|
16189
16264
|
* @param overrides - Array of ColorProviderOverrides objects
|
|
16265
|
+
* @example
|
|
16266
|
+
* ```ts
|
|
16267
|
+
* await fin.System.setThemePalette([
|
|
16268
|
+
* {
|
|
16269
|
+
* colorProviderKey: { colorMode: 'light' },
|
|
16270
|
+
* colorsMap: {
|
|
16271
|
+
* kColorLabelForeground: 4278190080,
|
|
16272
|
+
* kColorBubbleBackground: 4293980400
|
|
16273
|
+
* }
|
|
16274
|
+
* },
|
|
16275
|
+
* {
|
|
16276
|
+
* colorProviderKey: { colorMode: 'dark' },
|
|
16277
|
+
* colorsMap: {
|
|
16278
|
+
* kColorLabelForeground: 4293980400,
|
|
16279
|
+
* kColorBubbleBackground: 4293980400
|
|
16280
|
+
* }
|
|
16281
|
+
* }
|
|
16282
|
+
* ]);
|
|
16283
|
+
* ```
|
|
16190
16284
|
*/
|
|
16191
16285
|
setThemePalette(themePalette: Array<OpenFin_2.ThemePalette>): Promise<void>;
|
|
16192
16286
|
/**
|
|
16193
16287
|
* Retrieves currently used color overrides
|
|
16194
16288
|
* @returns Array of ColorProviderOverrides objects
|
|
16289
|
+
* @example
|
|
16290
|
+
* ```ts
|
|
16291
|
+
* const themePalette = await fin.System.getThemePalette();
|
|
16292
|
+
* console.log(themePalette);
|
|
16293
|
+
* ```
|
|
16195
16294
|
*/
|
|
16196
16295
|
getThemePalette(): Promise<Array<OpenFin_2.ThemePalette>>;
|
|
16197
16296
|
}
|
|
@@ -19805,8 +19904,19 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
|
19805
19904
|
* @returns {Promise<void>}
|
|
19806
19905
|
* A promise that resolves once the request to show the download bubble
|
|
19807
19906
|
* has been processed.
|
|
19907
|
+
* @example
|
|
19908
|
+
* ```js
|
|
19909
|
+
* const w = fin.Window.getCurrentSync();
|
|
19910
|
+
* const el = document.getElementById("download-bubble-button");
|
|
19911
|
+
* const rect = el.getBoundingClientRect();
|
|
19912
|
+
* const anchor = {
|
|
19913
|
+
* bounds: rect,
|
|
19914
|
+
* location: "topRight"
|
|
19915
|
+
* };
|
|
19916
|
+
* w.showDownloadBubble(anchor);
|
|
19917
|
+
* ```
|
|
19808
19918
|
*/
|
|
19809
|
-
showDownloadBubble(
|
|
19919
|
+
showDownloadBubble(anchor?: OpenFin_2.Anchor): Promise<void>;
|
|
19810
19920
|
/**
|
|
19811
19921
|
* Updates the anchor used for positioning the download bubble. This allows
|
|
19812
19922
|
* moving the bubble reactively—for example, in response to window resizes,
|
|
@@ -19818,8 +19928,27 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
|
19818
19928
|
*
|
|
19819
19929
|
* @returns {Promise<void>}
|
|
19820
19930
|
* A promise that resolves once the anchor update has been applied.
|
|
19931
|
+
* @example
|
|
19932
|
+
* ```js
|
|
19933
|
+
* var w = fin.Window.getCurrentSync();
|
|
19934
|
+
* w.on('download-button-visibility-changed', (evt) => {
|
|
19935
|
+
* if (evt.visible) {
|
|
19936
|
+
* const el = document.getElementById("download-bubble-button");
|
|
19937
|
+
* //We show our button and get it's bounding rect
|
|
19938
|
+
* el.classList.remove("hidden");
|
|
19939
|
+
* const rect = el.getBoundingClientRect();
|
|
19940
|
+
* const anchor = {
|
|
19941
|
+
* bounds: rect,
|
|
19942
|
+
* location: "topRight"
|
|
19943
|
+
* }
|
|
19944
|
+
* w.updateDownloadBubbleAnchor(anchor);
|
|
19945
|
+
* } else {
|
|
19946
|
+
* //We hide our button
|
|
19947
|
+
* document.getElementById("download-bubble-button")?.classList.add("hidden");
|
|
19948
|
+
* }
|
|
19949
|
+
});
|
|
19821
19950
|
*/
|
|
19822
|
-
updateDownloadBubbleAnchor(
|
|
19951
|
+
updateDownloadBubbleAnchor(anchor: OpenFin_2.Anchor): Promise<void>;
|
|
19823
19952
|
}
|
|
19824
19953
|
|
|
19825
19954
|
/**
|
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
|
*/
|
|
@@ -6232,7 +6282,28 @@ declare type Hotkey = {
|
|
|
6232
6282
|
*/
|
|
6233
6283
|
keys: string;
|
|
6234
6284
|
/**
|
|
6235
|
-
*
|
|
6285
|
+
* Controls the event phase at which the hotkey is triggered.
|
|
6286
|
+
*
|
|
6287
|
+
* - `'capture'`: The hotkey fires **before** the event is sent to the renderer/page.
|
|
6288
|
+
* This is the only phase where the `preventDefault` property is effective.
|
|
6289
|
+
*
|
|
6290
|
+
* - `'bubble'`: The hotkey fires **after** the page has processed the key event.
|
|
6291
|
+
* This behaves exactly like a standard JavaScript event listener attached to the window:
|
|
6292
|
+
* 1. If the page calls `event.preventDefault()` (on either **keydown** or **keyup**), this hotkey will **not** fire.
|
|
6293
|
+
* 2. If the hotkey is browser-reserved (e.g. `Ctrl+Tab` to switch tabs for which keyup/keydown do not fire in a web browser), that action takes precedence and this hotkey will **not** fire.
|
|
6294
|
+
*
|
|
6295
|
+
* @default 'capture'
|
|
6296
|
+
*/
|
|
6297
|
+
phase?: 'capture' | 'bubble';
|
|
6298
|
+
/**
|
|
6299
|
+
* Determines if the event should continue to the renderer.
|
|
6300
|
+
*
|
|
6301
|
+
* - `true`: The event is consumed immediately. It will **never** reach the renderer/page.
|
|
6302
|
+
* - `false`: The event is sent to the renderer after this hotkey executes.
|
|
6303
|
+
*
|
|
6304
|
+
* @remarks
|
|
6305
|
+
* This property is **only valid** when `phase` is set to `'capture'`.
|
|
6306
|
+
* If `phase` is `'bubble'`, this property is ignored (as the renderer has already received and processed the event).
|
|
6236
6307
|
*
|
|
6237
6308
|
* @default false
|
|
6238
6309
|
*/
|
|
@@ -8811,6 +8882,12 @@ declare type LogInfo = {
|
|
|
8811
8882
|
*/
|
|
8812
8883
|
declare type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
|
|
8813
8884
|
|
|
8885
|
+
declare type LogPath = 'debug.log' | 'app.log';
|
|
8886
|
+
|
|
8887
|
+
declare type LogTarget = {
|
|
8888
|
+
type: LogPath;
|
|
8889
|
+
};
|
|
8890
|
+
|
|
8814
8891
|
/**
|
|
8815
8892
|
* Log types
|
|
8816
8893
|
*
|
|
@@ -9331,10 +9408,9 @@ declare type MutableViewOptions = {
|
|
|
9331
9408
|
*/
|
|
9332
9409
|
chromiumPolicies: ChromiumPolicies;
|
|
9333
9410
|
/**
|
|
9334
|
-
*
|
|
9335
|
-
* When omitted, inherits from the parent application.
|
|
9411
|
+
* Specifies the AppLogLevel for the specified View. See {@link AppLogLevel} for more information.
|
|
9336
9412
|
*/
|
|
9337
|
-
|
|
9413
|
+
appLogLevel?: AppLogLevel;
|
|
9338
9414
|
};
|
|
9339
9415
|
|
|
9340
9416
|
/**
|
|
@@ -9610,11 +9686,9 @@ declare type MutableWindowOptions = {
|
|
|
9610
9686
|
*/
|
|
9611
9687
|
chromiumPolicies: ChromiumPolicies;
|
|
9612
9688
|
/**
|
|
9613
|
-
*
|
|
9614
|
-
* When omitted, inherits from the parent application.
|
|
9615
|
-
*
|
|
9689
|
+
* Specifies the AppLogLevel for the Window. See {@link AppLogLevel} for more information.
|
|
9616
9690
|
*/
|
|
9617
|
-
|
|
9691
|
+
appLogLevel?: AppLogLevel;
|
|
9618
9692
|
};
|
|
9619
9693
|
|
|
9620
9694
|
declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
|
|
@@ -10013,6 +10087,9 @@ declare namespace OpenFin_2 {
|
|
|
10013
10087
|
InheritableOptions,
|
|
10014
10088
|
PolicyOptions,
|
|
10015
10089
|
ChromiumPolicies,
|
|
10090
|
+
AppLogLevel,
|
|
10091
|
+
LogPath,
|
|
10092
|
+
LogTarget,
|
|
10016
10093
|
MutableWindowOptions,
|
|
10017
10094
|
WorkspacePlatformOptions,
|
|
10018
10095
|
WebRequestHeader,
|
|
@@ -10595,10 +10672,10 @@ declare type PerDomainSettings = {
|
|
|
10595
10672
|
drag?: 'allow' | 'block';
|
|
10596
10673
|
};
|
|
10597
10674
|
/**
|
|
10598
|
-
*
|
|
10599
|
-
*
|
|
10675
|
+
* Allows the app log level of any matching content to be overriden.
|
|
10676
|
+
* See also {@link AppLogLevel} for more information.
|
|
10600
10677
|
*/
|
|
10601
|
-
|
|
10678
|
+
appLogLevel?: AppLogLevel;
|
|
10602
10679
|
};
|
|
10603
10680
|
|
|
10604
10681
|
/**
|
|
@@ -12935,10 +13012,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
|
|
|
12935
13012
|
'get-current-window': VoidCall;
|
|
12936
13013
|
'get-current-window-sync': VoidCall;
|
|
12937
13014
|
'show-download-bubble': IdentityCall<{
|
|
12938
|
-
|
|
13015
|
+
anchor?: OpenFin_2.Anchor;
|
|
12939
13016
|
}, void>;
|
|
12940
13017
|
'update-download-bubble-anchor': IdentityCall<{
|
|
12941
|
-
|
|
13018
|
+
anchor: OpenFin_2.Anchor;
|
|
12942
13019
|
}, void>;
|
|
12943
13020
|
'get-external-application-info': ApiCall<OpenFin_2.ApplicationIdentity, OpenFin_2.ExternalApplicationInfo>;
|
|
12944
13021
|
'external-application-wrap': VoidCall;
|
|
@@ -15353,16 +15430,14 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
|
15353
15430
|
* Writes the passed message into both the log file and the console.
|
|
15354
15431
|
* @param level The log level for the entry. Can be either "info", "warning" or "error"
|
|
15355
15432
|
* @param message The log message text
|
|
15356
|
-
* @param target
|
|
15433
|
+
* @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
15434
|
*
|
|
15358
15435
|
* @example
|
|
15359
15436
|
* ```js
|
|
15360
15437
|
* fin.System.log("info", "An example log message", { type: 'debug.log' }).then(() => console.log('Log info message')).catch(err => console.log(err));
|
|
15361
15438
|
* ```
|
|
15362
15439
|
*/
|
|
15363
|
-
log(level: string, message: string,
|
|
15364
|
-
type?: 'app.log' | 'debug.log';
|
|
15365
|
-
}): Promise<void>;
|
|
15440
|
+
log(level: string, message: string, target?: OpenFin_2.LogTarget): Promise<void>;
|
|
15366
15441
|
/**
|
|
15367
15442
|
* Opens the passed URL in the default web browser.
|
|
15368
15443
|
*
|
|
@@ -16187,11 +16262,35 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
|
16187
16262
|
/**
|
|
16188
16263
|
* Overrides original Chromium theme color providers matching key (currently except high contrast ones). Only colors passed in the map will be overridden.
|
|
16189
16264
|
* @param overrides - Array of ColorProviderOverrides objects
|
|
16265
|
+
* @example
|
|
16266
|
+
* ```ts
|
|
16267
|
+
* await fin.System.setThemePalette([
|
|
16268
|
+
* {
|
|
16269
|
+
* colorProviderKey: { colorMode: 'light' },
|
|
16270
|
+
* colorsMap: {
|
|
16271
|
+
* kColorLabelForeground: 4278190080,
|
|
16272
|
+
* kColorBubbleBackground: 4293980400
|
|
16273
|
+
* }
|
|
16274
|
+
* },
|
|
16275
|
+
* {
|
|
16276
|
+
* colorProviderKey: { colorMode: 'dark' },
|
|
16277
|
+
* colorsMap: {
|
|
16278
|
+
* kColorLabelForeground: 4293980400,
|
|
16279
|
+
* kColorBubbleBackground: 4293980400
|
|
16280
|
+
* }
|
|
16281
|
+
* }
|
|
16282
|
+
* ]);
|
|
16283
|
+
* ```
|
|
16190
16284
|
*/
|
|
16191
16285
|
setThemePalette(themePalette: Array<OpenFin_2.ThemePalette>): Promise<void>;
|
|
16192
16286
|
/**
|
|
16193
16287
|
* Retrieves currently used color overrides
|
|
16194
16288
|
* @returns Array of ColorProviderOverrides objects
|
|
16289
|
+
* @example
|
|
16290
|
+
* ```ts
|
|
16291
|
+
* const themePalette = await fin.System.getThemePalette();
|
|
16292
|
+
* console.log(themePalette);
|
|
16293
|
+
* ```
|
|
16195
16294
|
*/
|
|
16196
16295
|
getThemePalette(): Promise<Array<OpenFin_2.ThemePalette>>;
|
|
16197
16296
|
}
|
|
@@ -19805,8 +19904,19 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
|
19805
19904
|
* @returns {Promise<void>}
|
|
19806
19905
|
* A promise that resolves once the request to show the download bubble
|
|
19807
19906
|
* has been processed.
|
|
19907
|
+
* @example
|
|
19908
|
+
* ```js
|
|
19909
|
+
* const w = fin.Window.getCurrentSync();
|
|
19910
|
+
* const el = document.getElementById("download-bubble-button");
|
|
19911
|
+
* const rect = el.getBoundingClientRect();
|
|
19912
|
+
* const anchor = {
|
|
19913
|
+
* bounds: rect,
|
|
19914
|
+
* location: "topRight"
|
|
19915
|
+
* };
|
|
19916
|
+
* w.showDownloadBubble(anchor);
|
|
19917
|
+
* ```
|
|
19808
19918
|
*/
|
|
19809
|
-
showDownloadBubble(
|
|
19919
|
+
showDownloadBubble(anchor?: OpenFin_2.Anchor): Promise<void>;
|
|
19810
19920
|
/**
|
|
19811
19921
|
* Updates the anchor used for positioning the download bubble. This allows
|
|
19812
19922
|
* moving the bubble reactively—for example, in response to window resizes,
|
|
@@ -19818,8 +19928,27 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
|
19818
19928
|
*
|
|
19819
19929
|
* @returns {Promise<void>}
|
|
19820
19930
|
* A promise that resolves once the anchor update has been applied.
|
|
19931
|
+
* @example
|
|
19932
|
+
* ```js
|
|
19933
|
+
* var w = fin.Window.getCurrentSync();
|
|
19934
|
+
* w.on('download-button-visibility-changed', (evt) => {
|
|
19935
|
+
* if (evt.visible) {
|
|
19936
|
+
* const el = document.getElementById("download-bubble-button");
|
|
19937
|
+
* //We show our button and get it's bounding rect
|
|
19938
|
+
* el.classList.remove("hidden");
|
|
19939
|
+
* const rect = el.getBoundingClientRect();
|
|
19940
|
+
* const anchor = {
|
|
19941
|
+
* bounds: rect,
|
|
19942
|
+
* location: "topRight"
|
|
19943
|
+
* }
|
|
19944
|
+
* w.updateDownloadBubbleAnchor(anchor);
|
|
19945
|
+
* } else {
|
|
19946
|
+
* //We hide our button
|
|
19947
|
+
* document.getElementById("download-bubble-button")?.classList.add("hidden");
|
|
19948
|
+
* }
|
|
19949
|
+
});
|
|
19821
19950
|
*/
|
|
19822
|
-
updateDownloadBubbleAnchor(
|
|
19951
|
+
updateDownloadBubbleAnchor(anchor: OpenFin_2.Anchor): Promise<void>;
|
|
19823
19952
|
}
|
|
19824
19953
|
|
|
19825
19954
|
/**
|
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
|
*/
|
|
@@ -6323,7 +6373,28 @@ declare type Hotkey = {
|
|
|
6323
6373
|
*/
|
|
6324
6374
|
keys: string;
|
|
6325
6375
|
/**
|
|
6326
|
-
*
|
|
6376
|
+
* Controls the event phase at which the hotkey is triggered.
|
|
6377
|
+
*
|
|
6378
|
+
* - `'capture'`: The hotkey fires **before** the event is sent to the renderer/page.
|
|
6379
|
+
* This is the only phase where the `preventDefault` property is effective.
|
|
6380
|
+
*
|
|
6381
|
+
* - `'bubble'`: The hotkey fires **after** the page has processed the key event.
|
|
6382
|
+
* This behaves exactly like a standard JavaScript event listener attached to the window:
|
|
6383
|
+
* 1. If the page calls `event.preventDefault()` (on either **keydown** or **keyup**), this hotkey will **not** fire.
|
|
6384
|
+
* 2. If the hotkey is browser-reserved (e.g. `Ctrl+Tab` to switch tabs for which keyup/keydown do not fire in a web browser), that action takes precedence and this hotkey will **not** fire.
|
|
6385
|
+
*
|
|
6386
|
+
* @default 'capture'
|
|
6387
|
+
*/
|
|
6388
|
+
phase?: 'capture' | 'bubble';
|
|
6389
|
+
/**
|
|
6390
|
+
* Determines if the event should continue to the renderer.
|
|
6391
|
+
*
|
|
6392
|
+
* - `true`: The event is consumed immediately. It will **never** reach the renderer/page.
|
|
6393
|
+
* - `false`: The event is sent to the renderer after this hotkey executes.
|
|
6394
|
+
*
|
|
6395
|
+
* @remarks
|
|
6396
|
+
* This property is **only valid** when `phase` is set to `'capture'`.
|
|
6397
|
+
* If `phase` is `'bubble'`, this property is ignored (as the renderer has already received and processed the event).
|
|
6327
6398
|
*
|
|
6328
6399
|
* @default false
|
|
6329
6400
|
*/
|
|
@@ -9120,6 +9191,12 @@ declare type LogInfo = {
|
|
|
9120
9191
|
*/
|
|
9121
9192
|
declare type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
|
|
9122
9193
|
|
|
9194
|
+
declare type LogPath = 'debug.log' | 'app.log';
|
|
9195
|
+
|
|
9196
|
+
declare type LogTarget = {
|
|
9197
|
+
type: LogPath;
|
|
9198
|
+
};
|
|
9199
|
+
|
|
9123
9200
|
/**
|
|
9124
9201
|
* Log types
|
|
9125
9202
|
*
|
|
@@ -9644,10 +9721,9 @@ declare type MutableViewOptions = {
|
|
|
9644
9721
|
*/
|
|
9645
9722
|
chromiumPolicies: ChromiumPolicies;
|
|
9646
9723
|
/**
|
|
9647
|
-
*
|
|
9648
|
-
* When omitted, inherits from the parent application.
|
|
9724
|
+
* Specifies the AppLogLevel for the specified View. See {@link AppLogLevel} for more information.
|
|
9649
9725
|
*/
|
|
9650
|
-
|
|
9726
|
+
appLogLevel?: AppLogLevel;
|
|
9651
9727
|
};
|
|
9652
9728
|
|
|
9653
9729
|
/**
|
|
@@ -9931,11 +10007,9 @@ declare type MutableWindowOptions = {
|
|
|
9931
10007
|
*/
|
|
9932
10008
|
chromiumPolicies: ChromiumPolicies;
|
|
9933
10009
|
/**
|
|
9934
|
-
*
|
|
9935
|
-
* When omitted, inherits from the parent application.
|
|
9936
|
-
*
|
|
10010
|
+
* Specifies the AppLogLevel for the Window. See {@link AppLogLevel} for more information.
|
|
9937
10011
|
*/
|
|
9938
|
-
|
|
10012
|
+
appLogLevel?: AppLogLevel;
|
|
9939
10013
|
};
|
|
9940
10014
|
|
|
9941
10015
|
declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
|
|
@@ -10347,6 +10421,9 @@ declare namespace OpenFin_2 {
|
|
|
10347
10421
|
InheritableOptions,
|
|
10348
10422
|
PolicyOptions,
|
|
10349
10423
|
ChromiumPolicies,
|
|
10424
|
+
AppLogLevel,
|
|
10425
|
+
LogPath,
|
|
10426
|
+
LogTarget,
|
|
10350
10427
|
MutableWindowOptions,
|
|
10351
10428
|
WorkspacePlatformOptions,
|
|
10352
10429
|
WebRequestHeader,
|
|
@@ -10929,10 +11006,10 @@ declare type PerDomainSettings = {
|
|
|
10929
11006
|
drag?: 'allow' | 'block';
|
|
10930
11007
|
};
|
|
10931
11008
|
/**
|
|
10932
|
-
*
|
|
10933
|
-
*
|
|
11009
|
+
* Allows the app log level of any matching content to be overriden.
|
|
11010
|
+
* See also {@link AppLogLevel} for more information.
|
|
10934
11011
|
*/
|
|
10935
|
-
|
|
11012
|
+
appLogLevel?: AppLogLevel;
|
|
10936
11013
|
};
|
|
10937
11014
|
|
|
10938
11015
|
/**
|
|
@@ -13352,10 +13429,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
|
|
|
13352
13429
|
'get-current-window': VoidCall;
|
|
13353
13430
|
'get-current-window-sync': VoidCall;
|
|
13354
13431
|
'show-download-bubble': IdentityCall<{
|
|
13355
|
-
|
|
13432
|
+
anchor?: OpenFin_2.Anchor;
|
|
13356
13433
|
}, void>;
|
|
13357
13434
|
'update-download-bubble-anchor': IdentityCall<{
|
|
13358
|
-
|
|
13435
|
+
anchor: OpenFin_2.Anchor;
|
|
13359
13436
|
}, void>;
|
|
13360
13437
|
'get-external-application-info': ApiCall<OpenFin_2.ApplicationIdentity, OpenFin_2.ExternalApplicationInfo>;
|
|
13361
13438
|
'external-application-wrap': VoidCall;
|
|
@@ -15776,16 +15853,14 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
|
15776
15853
|
* Writes the passed message into both the log file and the console.
|
|
15777
15854
|
* @param level The log level for the entry. Can be either "info", "warning" or "error"
|
|
15778
15855
|
* @param message The log message text
|
|
15779
|
-
* @param target
|
|
15856
|
+
* @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
15857
|
*
|
|
15781
15858
|
* @example
|
|
15782
15859
|
* ```js
|
|
15783
15860
|
* fin.System.log("info", "An example log message", { type: 'debug.log' }).then(() => console.log('Log info message')).catch(err => console.log(err));
|
|
15784
15861
|
* ```
|
|
15785
15862
|
*/
|
|
15786
|
-
log(level: string, message: string,
|
|
15787
|
-
type?: 'app.log' | 'debug.log';
|
|
15788
|
-
}): Promise<void>;
|
|
15863
|
+
log(level: string, message: string, target?: OpenFin_2.LogTarget): Promise<void>;
|
|
15789
15864
|
/**
|
|
15790
15865
|
* Opens the passed URL in the default web browser.
|
|
15791
15866
|
*
|
|
@@ -16610,11 +16685,35 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
|
16610
16685
|
/**
|
|
16611
16686
|
* Overrides original Chromium theme color providers matching key (currently except high contrast ones). Only colors passed in the map will be overridden.
|
|
16612
16687
|
* @param overrides - Array of ColorProviderOverrides objects
|
|
16688
|
+
* @example
|
|
16689
|
+
* ```ts
|
|
16690
|
+
* await fin.System.setThemePalette([
|
|
16691
|
+
* {
|
|
16692
|
+
* colorProviderKey: { colorMode: 'light' },
|
|
16693
|
+
* colorsMap: {
|
|
16694
|
+
* kColorLabelForeground: 4278190080,
|
|
16695
|
+
* kColorBubbleBackground: 4293980400
|
|
16696
|
+
* }
|
|
16697
|
+
* },
|
|
16698
|
+
* {
|
|
16699
|
+
* colorProviderKey: { colorMode: 'dark' },
|
|
16700
|
+
* colorsMap: {
|
|
16701
|
+
* kColorLabelForeground: 4293980400,
|
|
16702
|
+
* kColorBubbleBackground: 4293980400
|
|
16703
|
+
* }
|
|
16704
|
+
* }
|
|
16705
|
+
* ]);
|
|
16706
|
+
* ```
|
|
16613
16707
|
*/
|
|
16614
16708
|
setThemePalette(themePalette: Array<OpenFin_2.ThemePalette>): Promise<void>;
|
|
16615
16709
|
/**
|
|
16616
16710
|
* Retrieves currently used color overrides
|
|
16617
16711
|
* @returns Array of ColorProviderOverrides objects
|
|
16712
|
+
* @example
|
|
16713
|
+
* ```ts
|
|
16714
|
+
* const themePalette = await fin.System.getThemePalette();
|
|
16715
|
+
* console.log(themePalette);
|
|
16716
|
+
* ```
|
|
16618
16717
|
*/
|
|
16619
16718
|
getThemePalette(): Promise<Array<OpenFin_2.ThemePalette>>;
|
|
16620
16719
|
}
|
|
@@ -20275,8 +20374,19 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
|
20275
20374
|
* @returns {Promise<void>}
|
|
20276
20375
|
* A promise that resolves once the request to show the download bubble
|
|
20277
20376
|
* has been processed.
|
|
20377
|
+
* @example
|
|
20378
|
+
* ```js
|
|
20379
|
+
* const w = fin.Window.getCurrentSync();
|
|
20380
|
+
* const el = document.getElementById("download-bubble-button");
|
|
20381
|
+
* const rect = el.getBoundingClientRect();
|
|
20382
|
+
* const anchor = {
|
|
20383
|
+
* bounds: rect,
|
|
20384
|
+
* location: "topRight"
|
|
20385
|
+
* };
|
|
20386
|
+
* w.showDownloadBubble(anchor);
|
|
20387
|
+
* ```
|
|
20278
20388
|
*/
|
|
20279
|
-
showDownloadBubble(
|
|
20389
|
+
showDownloadBubble(anchor?: OpenFin_2.Anchor): Promise<void>;
|
|
20280
20390
|
/**
|
|
20281
20391
|
* Updates the anchor used for positioning the download bubble. This allows
|
|
20282
20392
|
* moving the bubble reactively—for example, in response to window resizes,
|
|
@@ -20288,8 +20398,27 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
|
20288
20398
|
*
|
|
20289
20399
|
* @returns {Promise<void>}
|
|
20290
20400
|
* A promise that resolves once the anchor update has been applied.
|
|
20401
|
+
* @example
|
|
20402
|
+
* ```js
|
|
20403
|
+
* var w = fin.Window.getCurrentSync();
|
|
20404
|
+
* w.on('download-button-visibility-changed', (evt) => {
|
|
20405
|
+
* if (evt.visible) {
|
|
20406
|
+
* const el = document.getElementById("download-bubble-button");
|
|
20407
|
+
* //We show our button and get it's bounding rect
|
|
20408
|
+
* el.classList.remove("hidden");
|
|
20409
|
+
* const rect = el.getBoundingClientRect();
|
|
20410
|
+
* const anchor = {
|
|
20411
|
+
* bounds: rect,
|
|
20412
|
+
* location: "topRight"
|
|
20413
|
+
* }
|
|
20414
|
+
* w.updateDownloadBubbleAnchor(anchor);
|
|
20415
|
+
* } else {
|
|
20416
|
+
* //We hide our button
|
|
20417
|
+
* document.getElementById("download-bubble-button")?.classList.add("hidden");
|
|
20418
|
+
* }
|
|
20419
|
+
});
|
|
20291
20420
|
*/
|
|
20292
|
-
updateDownloadBubbleAnchor(
|
|
20421
|
+
updateDownloadBubbleAnchor(anchor: OpenFin_2.Anchor): Promise<void>;
|
|
20293
20422
|
}
|
|
20294
20423
|
|
|
20295
20424
|
/**
|
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');
|