@openfin/core 44.101.2 → 44.101.4
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 +204 -4
- package/out/mock-beta.d.ts +204 -4
- package/out/mock-public.d.ts +204 -4
- package/out/stub.d.ts +204 -4
- package/out/stub.js +8 -2
- package/out/stub.mjs +17028 -0
- package/package.json +16 -1
package/out/mock-public.d.ts
CHANGED
|
@@ -45,6 +45,16 @@ declare type Accelerator = {
|
|
|
45
45
|
zoom: boolean;
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* @interface
|
|
50
|
+
* Shared context available to all aria label functions.
|
|
51
|
+
*/
|
|
52
|
+
declare type AccessibilityContext = {
|
|
53
|
+
arrowNavigationEnabled: boolean;
|
|
54
|
+
deleteKeyCloseEnabled: boolean;
|
|
55
|
+
homeEndNavigationEnabled: boolean;
|
|
56
|
+
};
|
|
57
|
+
|
|
48
58
|
/**
|
|
49
59
|
* Generated when a View is added to a layout.
|
|
50
60
|
* @interface
|
|
@@ -54,6 +64,14 @@ declare type AddedToLayoutEvent = BaseEvent_4 & {
|
|
|
54
64
|
layoutIdentity: OpenFin_2.LayoutIdentity;
|
|
55
65
|
};
|
|
56
66
|
|
|
67
|
+
/**
|
|
68
|
+
* @interface
|
|
69
|
+
* Context for add tab button aria-label functions.
|
|
70
|
+
*/
|
|
71
|
+
declare type AddTabButtonAriaLabelContext = AccessibilityContext & {
|
|
72
|
+
tabCount: number;
|
|
73
|
+
};
|
|
74
|
+
|
|
57
75
|
/**
|
|
58
76
|
* Options to use when adding a view to a {@link TabStack}.
|
|
59
77
|
*
|
|
@@ -1599,6 +1617,17 @@ declare type AppVersionRuntimeStatusEvent = {
|
|
|
1599
1617
|
|
|
1600
1618
|
/* Excluded from this release type: AppVersionTypeFromIdEvent */
|
|
1601
1619
|
|
|
1620
|
+
/**
|
|
1621
|
+
* @interface
|
|
1622
|
+
* Custom aria-label providers for accessibility.
|
|
1623
|
+
*/
|
|
1624
|
+
declare type AriaLabelOptions = {
|
|
1625
|
+
activeTab?: string | ((ctx: TabAriaLabelContext) => string);
|
|
1626
|
+
inactiveTab?: string | ((ctx: TabAriaLabelContext) => string);
|
|
1627
|
+
closeButton?: string | ((ctx: CloseButtonAriaLabelContext) => string);
|
|
1628
|
+
addTabButton?: string | ((ctx: AddTabButtonAriaLabelContext) => string);
|
|
1629
|
+
};
|
|
1630
|
+
|
|
1602
1631
|
declare interface AuthorizationPayload {
|
|
1603
1632
|
token: string;
|
|
1604
1633
|
file: string;
|
|
@@ -3115,6 +3144,11 @@ declare type ClearCacheOption = {
|
|
|
3115
3144
|
* browser data that can be used across sessions
|
|
3116
3145
|
*/
|
|
3117
3146
|
localStorage?: boolean;
|
|
3147
|
+
/**
|
|
3148
|
+
* Clears saved window-state data written for windows that use `saveWindowState`.
|
|
3149
|
+
* After this data is cleared, previously persisted bounds and state (Maximized/Minimized) will not be restored until new state is written again.
|
|
3150
|
+
*/
|
|
3151
|
+
windowState?: boolean;
|
|
3118
3152
|
};
|
|
3119
3153
|
|
|
3120
3154
|
/**
|
|
@@ -3157,6 +3191,11 @@ declare type ClearDataOptions = {
|
|
|
3157
3191
|
* - `origin-in-all-contexts` - Storage is matched on origin only in all contexts.
|
|
3158
3192
|
*/
|
|
3159
3193
|
originMatchingMode?: 'third-parties-included' | 'origin-in-all-contexts';
|
|
3194
|
+
/**
|
|
3195
|
+
* Clears saved window-state data written for windows that use `saveWindowState`.
|
|
3196
|
+
* After this data is cleared, previously persisted bounds and state (Maximized/Minimized) will not be restored until new state is written again.
|
|
3197
|
+
*/
|
|
3198
|
+
windowState?: boolean;
|
|
3160
3199
|
};
|
|
3161
3200
|
|
|
3162
3201
|
/**
|
|
@@ -3444,6 +3483,15 @@ declare type ClipboardPermissions = {
|
|
|
3444
3483
|
*/
|
|
3445
3484
|
declare type ClipboardSelectionType = 'clipboard' | 'selection';
|
|
3446
3485
|
|
|
3486
|
+
/**
|
|
3487
|
+
* @interface
|
|
3488
|
+
* Context for close button aria-label functions.
|
|
3489
|
+
*/
|
|
3490
|
+
declare type CloseButtonAriaLabelContext = AccessibilityContext & {
|
|
3491
|
+
title: string;
|
|
3492
|
+
isActive: boolean;
|
|
3493
|
+
};
|
|
3494
|
+
|
|
3447
3495
|
/**
|
|
3448
3496
|
* Generated when an application is closed.
|
|
3449
3497
|
* @interface
|
|
@@ -4456,6 +4504,10 @@ declare type CreateLayoutOptions = {
|
|
|
4456
4504
|
* @experimental
|
|
4457
4505
|
*/
|
|
4458
4506
|
renderCustomHeaderControls?: (controlsElement: HTMLElement, context: HeaderControlsContext) => (() => void) | void;
|
|
4507
|
+
/**
|
|
4508
|
+
* Accessibility options for the layout. Controls ARIA attributes and keyboard navigation.
|
|
4509
|
+
*/
|
|
4510
|
+
accessibilityOptions?: LayoutAccessibilityOptions;
|
|
4459
4511
|
};
|
|
4460
4512
|
|
|
4461
4513
|
/**
|
|
@@ -5139,7 +5191,7 @@ declare interface Environment {
|
|
|
5139
5191
|
layoutAllowedInContext(fin: OpenFin_2.Fin<OpenFin_2.EntityType>): boolean;
|
|
5140
5192
|
initLayoutManager(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, options: OpenFin_2.InitLayoutOptions): Promise<OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>>;
|
|
5141
5193
|
applyLayoutSnapshot(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, options: OpenFin_2.InitLayoutOptions): Promise<void>;
|
|
5142
|
-
createLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, options: OpenFin_2.CreateLayoutOptions): Promise<
|
|
5194
|
+
createLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, options: OpenFin_2.CreateLayoutOptions): Promise<OpenFin_2.LayoutSyncApi>;
|
|
5143
5195
|
destroyLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<void>;
|
|
5144
5196
|
resolveLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<any>;
|
|
5145
5197
|
initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
|
|
@@ -8392,6 +8444,27 @@ declare class Layout extends Base {
|
|
|
8392
8444
|
closeView(viewIdentity: OpenFin_2.Identity): Promise<void>;
|
|
8393
8445
|
}
|
|
8394
8446
|
|
|
8447
|
+
/**
|
|
8448
|
+
* @interface
|
|
8449
|
+
* Accessibility options for layout tab navigation and ARIA support.
|
|
8450
|
+
*/
|
|
8451
|
+
declare type LayoutAccessibilityOptions = {
|
|
8452
|
+
viewTabOptions?: ViewTabAccessibilityOptions;
|
|
8453
|
+
/**
|
|
8454
|
+
* Keyboard shortcut used to move focus from a tab header element into the active tab's web content.
|
|
8455
|
+
*
|
|
8456
|
+
* - Accepts an accelerator-like string, e.g. `'Ctrl+Enter'`, `'Meta+Enter'`, `'Alt+Enter'`, `'Mod+Enter'`.
|
|
8457
|
+
* - `'Mod'`/`'CmdOrCtrl'`/`'CtrlOrMeta'` means Ctrl on Windows/Linux or Meta on macOS.
|
|
8458
|
+
* - Set to `false` to disable this shortcut.
|
|
8459
|
+
* - In core-web, reverse focus transfer (from iframe web content back to tab header) is not reliably supportable
|
|
8460
|
+
* due to browser iframe security and cross-origin focus restrictions. This hotkey is intentionally one-way:
|
|
8461
|
+
* tab header -> web content.
|
|
8462
|
+
*
|
|
8463
|
+
* @defaultValue 'Mod+Enter'
|
|
8464
|
+
*/
|
|
8465
|
+
focusContentHotkey?: string | false;
|
|
8466
|
+
};
|
|
8467
|
+
|
|
8395
8468
|
/**
|
|
8396
8469
|
* @interface
|
|
8397
8470
|
*/
|
|
@@ -8775,7 +8848,7 @@ declare class LayoutModule extends Base {
|
|
|
8775
8848
|
* @returns
|
|
8776
8849
|
*/
|
|
8777
8850
|
getCurrentLayoutManagerSync: <UserSnapshotType extends OpenFin_2.LayoutSnapshot>() => OpenFin_2.LayoutManager<UserSnapshotType>;
|
|
8778
|
-
create: (options: OpenFin_2.CreateLayoutOptions) => Promise<
|
|
8851
|
+
create: (options: OpenFin_2.CreateLayoutOptions) => Promise<OpenFin_2.LayoutSyncApi>;
|
|
8779
8852
|
destroy: (layoutIdentity: OpenFin_2.LayoutIdentity) => Promise<void>;
|
|
8780
8853
|
}
|
|
8781
8854
|
|
|
@@ -8977,6 +9050,19 @@ declare type LayoutStateChangedEvent = LayoutDOMEvent & {
|
|
|
8977
9050
|
type: 'layout-state-changed';
|
|
8978
9051
|
};
|
|
8979
9052
|
|
|
9053
|
+
/**
|
|
9054
|
+
* @interface
|
|
9055
|
+
* Sync API returned from Layout.create() for operations that don't require IPC.
|
|
9056
|
+
* Only available in the window context that owns the layout.
|
|
9057
|
+
*/
|
|
9058
|
+
declare type LayoutSyncApi = {
|
|
9059
|
+
/**
|
|
9060
|
+
* Updates accessibility options at runtime without recreating the layout.
|
|
9061
|
+
* @param options Partial accessibility options to merge with existing options
|
|
9062
|
+
*/
|
|
9063
|
+
updateAccessibilityOptions(options: Partial<LayoutAccessibilityOptions>): void;
|
|
9064
|
+
};
|
|
9065
|
+
|
|
8980
9066
|
/**
|
|
8981
9067
|
* @interface
|
|
8982
9068
|
*/
|
|
@@ -9126,6 +9212,15 @@ declare type LogUploadOptions = {
|
|
|
9126
9212
|
* Max file size limit in Megabytes for the logs archive.
|
|
9127
9213
|
*/
|
|
9128
9214
|
sizeLimit?: number;
|
|
9215
|
+
/**
|
|
9216
|
+
* HTTP method used to upload the log archive.
|
|
9217
|
+
* Accepted values are `'POST'` and `'PUT'` (case-insensitive; values are normalised to uppercase before validation).
|
|
9218
|
+
* - `POST` sends a multipart `FormData` request (current behaviour).
|
|
9219
|
+
* - `PUT` sends the raw zip binary with an explicit `Content-Length` and no `Content-Type` header,
|
|
9220
|
+
* suitable for endpoints that expect a raw body (e.g. pre-signed upload URLs).
|
|
9221
|
+
* @defaultValue 'POST'
|
|
9222
|
+
*/
|
|
9223
|
+
method?: 'POST' | 'PUT';
|
|
9129
9224
|
};
|
|
9130
9225
|
|
|
9131
9226
|
/**
|
|
@@ -10490,6 +10585,15 @@ declare namespace OpenFin_2 {
|
|
|
10490
10585
|
HeaderControlsContext,
|
|
10491
10586
|
CreateLayoutOptions,
|
|
10492
10587
|
MultiInstanceViewBehavior,
|
|
10588
|
+
LayoutAccessibilityOptions,
|
|
10589
|
+
ViewTabElements,
|
|
10590
|
+
ViewTabAccessibilityOptions,
|
|
10591
|
+
AccessibilityContext,
|
|
10592
|
+
TabAriaLabelContext,
|
|
10593
|
+
CloseButtonAriaLabelContext,
|
|
10594
|
+
AddTabButtonAriaLabelContext,
|
|
10595
|
+
AriaLabelOptions,
|
|
10596
|
+
LayoutSyncApi,
|
|
10493
10597
|
PresetLayoutOptions_2 as PresetLayoutOptions,
|
|
10494
10598
|
ResultBehavior,
|
|
10495
10599
|
PopupBaseBehavior,
|
|
@@ -12223,6 +12327,38 @@ declare interface PlatformProvider {
|
|
|
12223
12327
|
* @returns A promise resolving to `true` if the window should prevent the app from quitting, otherwise `false`.
|
|
12224
12328
|
*/
|
|
12225
12329
|
shouldWindowPreventQuit(windowIdentity: OpenFin_2.Identity): Promise<boolean>;
|
|
12330
|
+
/**
|
|
12331
|
+
* Returns the platform's keyboard commands. Default implementation returns the manifest's
|
|
12332
|
+
* `platform.commands`. Override to inject additional default commands.
|
|
12333
|
+
* Called once during Platform.init; the result is cached for the lifetime
|
|
12334
|
+
* of the platform.
|
|
12335
|
+
*
|
|
12336
|
+
* @remarks
|
|
12337
|
+
* The returned commands are merged with core's built-in default commands
|
|
12338
|
+
* (unless `disableDefaultCommands` is set).
|
|
12339
|
+
* Overriders receive the raw manifest commands from `super` and can prepend
|
|
12340
|
+
* their own defaults — returned commands override default commands by command name.
|
|
12341
|
+
*
|
|
12342
|
+
* @example
|
|
12343
|
+
* ```js
|
|
12344
|
+
* const overrideCallback = (PlatformProvider) => {
|
|
12345
|
+
* class Override extends PlatformProvider {
|
|
12346
|
+
* getKeyboardCommands() {
|
|
12347
|
+
* const manifestCommands = super.getKeyboardCommands();
|
|
12348
|
+
* const myCommands = [{ command: 'myApp.search', keys: 'Ctrl+K' }];
|
|
12349
|
+
* return [
|
|
12350
|
+
* ...myCommands,
|
|
12351
|
+
* ...manifestCommands
|
|
12352
|
+
* ];
|
|
12353
|
+
* }
|
|
12354
|
+
* }
|
|
12355
|
+
* return new Override();
|
|
12356
|
+
* }
|
|
12357
|
+
*
|
|
12358
|
+
* fin.Platform.init({ overrideCallback });
|
|
12359
|
+
* ```
|
|
12360
|
+
*/
|
|
12361
|
+
getKeyboardCommands(): OpenFin_2.ShortcutOverride[];
|
|
12226
12362
|
/**
|
|
12227
12363
|
* Method that is called every time an error occurs when processing an action in the Platform Provider. It is meant to be overriden, as a means to debug Platform applications
|
|
12228
12364
|
*/
|
|
@@ -14830,13 +14966,15 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
|
14830
14966
|
* * cookies: browser [cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies)
|
|
14831
14967
|
* * localStorage: browser data that can be used across sessions ([local storage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage))
|
|
14832
14968
|
* * appcache: html5 [application cache](https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache)
|
|
14969
|
+
* * windowState: clears data written for windows using `saveWindowState`; after clearing, previously saved bounds and state will not be restored until new state is written
|
|
14833
14970
|
* @example
|
|
14834
14971
|
* ```js
|
|
14835
14972
|
* const clearCacheOptions = {
|
|
14836
14973
|
* appcache: true,
|
|
14837
14974
|
* cache: true,
|
|
14838
14975
|
* cookies: true,
|
|
14839
|
-
* localStorage: true
|
|
14976
|
+
* localStorage: true,
|
|
14977
|
+
* windowState: true
|
|
14840
14978
|
* };
|
|
14841
14979
|
* fin.System.clearCache(clearCacheOptions).then(() => console.log('Cache cleared')).catch(err => console.log(err));
|
|
14842
14980
|
* ```
|
|
@@ -14861,12 +14999,16 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
|
14861
14999
|
*
|
|
14862
15000
|
* @param options - Optional configuration for what data to clear
|
|
14863
15001
|
*
|
|
15002
|
+
* @remarks Set `windowState: true` to also clear data written for windows using `saveWindowState`.
|
|
15003
|
+
* After this data is cleared, previously saved bounds and state will not be restored until new state is written again.
|
|
15004
|
+
*
|
|
14864
15005
|
* @example
|
|
14865
15006
|
* ```js
|
|
14866
15007
|
* // Clear only cookies and localStorage for a specific origin
|
|
14867
15008
|
* await fin.System.clearCacheData({
|
|
14868
15009
|
* dataTypes: ['cookies', 'localStorage'],
|
|
14869
|
-
* origins: ['http://localhost:8081']
|
|
15010
|
+
* origins: ['http://localhost:8081'],
|
|
15011
|
+
* windowState: true
|
|
14870
15012
|
* });
|
|
14871
15013
|
*
|
|
14872
15014
|
* // Clear everything except for a specific origin
|
|
@@ -16635,6 +16777,17 @@ declare type SystemShutdownHandler = (shutdownEvent: {
|
|
|
16635
16777
|
proceed: () => void;
|
|
16636
16778
|
}) => void;
|
|
16637
16779
|
|
|
16780
|
+
/**
|
|
16781
|
+
* @interface
|
|
16782
|
+
* Context for tab aria-label functions.
|
|
16783
|
+
*/
|
|
16784
|
+
declare type TabAriaLabelContext = AccessibilityContext & {
|
|
16785
|
+
title: string;
|
|
16786
|
+
isActive: boolean;
|
|
16787
|
+
tabIndex: number;
|
|
16788
|
+
tabCount: number;
|
|
16789
|
+
};
|
|
16790
|
+
|
|
16638
16791
|
/**
|
|
16639
16792
|
* Generated when a Layout Tab Component was closed.
|
|
16640
16793
|
* @interface
|
|
@@ -18003,6 +18156,53 @@ declare interface ViewStatuses {
|
|
|
18003
18156
|
viewsNotPreventingUnload: Identity_4[];
|
|
18004
18157
|
}
|
|
18005
18158
|
|
|
18159
|
+
/**
|
|
18160
|
+
* @interface
|
|
18161
|
+
* Accessibility options for view tab navigation.
|
|
18162
|
+
*/
|
|
18163
|
+
declare type ViewTabAccessibilityOptions = {
|
|
18164
|
+
/**
|
|
18165
|
+
* Controls which elements are reachable via Tab key navigation.
|
|
18166
|
+
* Uses roving tabindex pattern - only one element focusable at a time.
|
|
18167
|
+
* @default ['active-tab', 'add-tab-button']
|
|
18168
|
+
*/
|
|
18169
|
+
tabNavigation?: ViewTabElements[];
|
|
18170
|
+
/**
|
|
18171
|
+
* Controls which elements are navigable via Arrow keys.
|
|
18172
|
+
* @default ['inactive-tab', 'active-tab', 'active-tab-close-button', 'inactive-tab-close-button', 'add-tab-button']
|
|
18173
|
+
*/
|
|
18174
|
+
arrowNavigation?: ViewTabElements[];
|
|
18175
|
+
/**
|
|
18176
|
+
* Whether Delete/Backspace keys close the focused tab.
|
|
18177
|
+
* @default false
|
|
18178
|
+
*/
|
|
18179
|
+
enableDeleteKeyClose?: boolean;
|
|
18180
|
+
/**
|
|
18181
|
+
* Whether Home/End keys jump to first/last navigable element.
|
|
18182
|
+
* @default false
|
|
18183
|
+
*/
|
|
18184
|
+
enableHomeEndNavigation?: boolean;
|
|
18185
|
+
/**
|
|
18186
|
+
* Custom aria-label providers. Can be a static string or a function receiving context.
|
|
18187
|
+
*/
|
|
18188
|
+
ariaLabels?: AriaLabelOptions;
|
|
18189
|
+
/**
|
|
18190
|
+
* Whether to announce tab changes via aria-live.
|
|
18191
|
+
* @default true
|
|
18192
|
+
*/
|
|
18193
|
+
announceTabChanges?: boolean;
|
|
18194
|
+
/**
|
|
18195
|
+
* Focus behavior when a tab is closed via keyboard.
|
|
18196
|
+
* @default 'next'
|
|
18197
|
+
*/
|
|
18198
|
+
focusOnCloseStrategy?: 'next' | 'previous' | 'active';
|
|
18199
|
+
};
|
|
18200
|
+
|
|
18201
|
+
/**
|
|
18202
|
+
* Elements that can be navigated in view tabs.
|
|
18203
|
+
*/
|
|
18204
|
+
declare type ViewTabElements = 'active-tab' | 'inactive-tab' | 'active-tab-close-button' | 'inactive-tab-close-button' | 'add-tab-button';
|
|
18205
|
+
|
|
18006
18206
|
/**
|
|
18007
18207
|
* View throttling state.
|
|
18008
18208
|
*
|
package/out/stub.d.ts
CHANGED
|
@@ -45,6 +45,16 @@ declare type Accelerator = {
|
|
|
45
45
|
zoom: boolean;
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* @interface
|
|
50
|
+
* Shared context available to all aria label functions.
|
|
51
|
+
*/
|
|
52
|
+
declare type AccessibilityContext = {
|
|
53
|
+
arrowNavigationEnabled: boolean;
|
|
54
|
+
deleteKeyCloseEnabled: boolean;
|
|
55
|
+
homeEndNavigationEnabled: boolean;
|
|
56
|
+
};
|
|
57
|
+
|
|
48
58
|
/**
|
|
49
59
|
* Generated when a View is added to a layout.
|
|
50
60
|
* @interface
|
|
@@ -54,6 +64,14 @@ declare type AddedToLayoutEvent = BaseEvent_4 & {
|
|
|
54
64
|
layoutIdentity: OpenFin_2.LayoutIdentity;
|
|
55
65
|
};
|
|
56
66
|
|
|
67
|
+
/**
|
|
68
|
+
* @interface
|
|
69
|
+
* Context for add tab button aria-label functions.
|
|
70
|
+
*/
|
|
71
|
+
declare type AddTabButtonAriaLabelContext = AccessibilityContext & {
|
|
72
|
+
tabCount: number;
|
|
73
|
+
};
|
|
74
|
+
|
|
57
75
|
/**
|
|
58
76
|
* Options to use when adding a view to a {@link TabStack}.
|
|
59
77
|
*
|
|
@@ -1613,6 +1631,17 @@ declare type AppVersionTypeFromIdEvent<T extends IdEventType> = Extract<AppVersi
|
|
|
1613
1631
|
type: WithoutId<T>;
|
|
1614
1632
|
}>;
|
|
1615
1633
|
|
|
1634
|
+
/**
|
|
1635
|
+
* @interface
|
|
1636
|
+
* Custom aria-label providers for accessibility.
|
|
1637
|
+
*/
|
|
1638
|
+
declare type AriaLabelOptions = {
|
|
1639
|
+
activeTab?: string | ((ctx: TabAriaLabelContext) => string);
|
|
1640
|
+
inactiveTab?: string | ((ctx: TabAriaLabelContext) => string);
|
|
1641
|
+
closeButton?: string | ((ctx: CloseButtonAriaLabelContext) => string);
|
|
1642
|
+
addTabButton?: string | ((ctx: AddTabButtonAriaLabelContext) => string);
|
|
1643
|
+
};
|
|
1644
|
+
|
|
1616
1645
|
declare interface AuthorizationPayload {
|
|
1617
1646
|
token: string;
|
|
1618
1647
|
file: string;
|
|
@@ -3171,6 +3200,11 @@ declare type ClearCacheOption = {
|
|
|
3171
3200
|
* browser data that can be used across sessions
|
|
3172
3201
|
*/
|
|
3173
3202
|
localStorage?: boolean;
|
|
3203
|
+
/**
|
|
3204
|
+
* Clears saved window-state data written for windows that use `saveWindowState`.
|
|
3205
|
+
* After this data is cleared, previously persisted bounds and state (Maximized/Minimized) will not be restored until new state is written again.
|
|
3206
|
+
*/
|
|
3207
|
+
windowState?: boolean;
|
|
3174
3208
|
};
|
|
3175
3209
|
|
|
3176
3210
|
/**
|
|
@@ -3213,6 +3247,11 @@ declare type ClearDataOptions = {
|
|
|
3213
3247
|
* - `origin-in-all-contexts` - Storage is matched on origin only in all contexts.
|
|
3214
3248
|
*/
|
|
3215
3249
|
originMatchingMode?: 'third-parties-included' | 'origin-in-all-contexts';
|
|
3250
|
+
/**
|
|
3251
|
+
* Clears saved window-state data written for windows that use `saveWindowState`.
|
|
3252
|
+
* After this data is cleared, previously persisted bounds and state (Maximized/Minimized) will not be restored until new state is written again.
|
|
3253
|
+
*/
|
|
3254
|
+
windowState?: boolean;
|
|
3216
3255
|
};
|
|
3217
3256
|
|
|
3218
3257
|
/**
|
|
@@ -3500,6 +3539,15 @@ declare type ClipboardPermissions = {
|
|
|
3500
3539
|
*/
|
|
3501
3540
|
declare type ClipboardSelectionType = 'clipboard' | 'selection';
|
|
3502
3541
|
|
|
3542
|
+
/**
|
|
3543
|
+
* @interface
|
|
3544
|
+
* Context for close button aria-label functions.
|
|
3545
|
+
*/
|
|
3546
|
+
declare type CloseButtonAriaLabelContext = AccessibilityContext & {
|
|
3547
|
+
title: string;
|
|
3548
|
+
isActive: boolean;
|
|
3549
|
+
};
|
|
3550
|
+
|
|
3503
3551
|
/**
|
|
3504
3552
|
* Generated when an application is closed.
|
|
3505
3553
|
* @interface
|
|
@@ -4515,6 +4563,10 @@ declare type CreateLayoutOptions = {
|
|
|
4515
4563
|
* @experimental
|
|
4516
4564
|
*/
|
|
4517
4565
|
renderCustomHeaderControls?: (controlsElement: HTMLElement, context: HeaderControlsContext) => (() => void) | void;
|
|
4566
|
+
/**
|
|
4567
|
+
* Accessibility options for the layout. Controls ARIA attributes and keyboard navigation.
|
|
4568
|
+
*/
|
|
4569
|
+
accessibilityOptions?: LayoutAccessibilityOptions;
|
|
4518
4570
|
};
|
|
4519
4571
|
|
|
4520
4572
|
/**
|
|
@@ -5203,7 +5255,7 @@ declare interface Environment {
|
|
|
5203
5255
|
layoutAllowedInContext(fin: OpenFin_2.Fin<OpenFin_2.EntityType>): boolean;
|
|
5204
5256
|
initLayoutManager(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, options: OpenFin_2.InitLayoutOptions): Promise<OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>>;
|
|
5205
5257
|
applyLayoutSnapshot(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, options: OpenFin_2.InitLayoutOptions): Promise<void>;
|
|
5206
|
-
createLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, options: OpenFin_2.CreateLayoutOptions): Promise<
|
|
5258
|
+
createLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, options: OpenFin_2.CreateLayoutOptions): Promise<OpenFin_2.LayoutSyncApi>;
|
|
5207
5259
|
destroyLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<void>;
|
|
5208
5260
|
resolveLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<any>;
|
|
5209
5261
|
initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
|
|
@@ -8518,6 +8570,27 @@ declare class Layout extends Base {
|
|
|
8518
8570
|
closeView(viewIdentity: OpenFin_2.Identity): Promise<void>;
|
|
8519
8571
|
}
|
|
8520
8572
|
|
|
8573
|
+
/**
|
|
8574
|
+
* @interface
|
|
8575
|
+
* Accessibility options for layout tab navigation and ARIA support.
|
|
8576
|
+
*/
|
|
8577
|
+
declare type LayoutAccessibilityOptions = {
|
|
8578
|
+
viewTabOptions?: ViewTabAccessibilityOptions;
|
|
8579
|
+
/**
|
|
8580
|
+
* Keyboard shortcut used to move focus from a tab header element into the active tab's web content.
|
|
8581
|
+
*
|
|
8582
|
+
* - Accepts an accelerator-like string, e.g. `'Ctrl+Enter'`, `'Meta+Enter'`, `'Alt+Enter'`, `'Mod+Enter'`.
|
|
8583
|
+
* - `'Mod'`/`'CmdOrCtrl'`/`'CtrlOrMeta'` means Ctrl on Windows/Linux or Meta on macOS.
|
|
8584
|
+
* - Set to `false` to disable this shortcut.
|
|
8585
|
+
* - In core-web, reverse focus transfer (from iframe web content back to tab header) is not reliably supportable
|
|
8586
|
+
* due to browser iframe security and cross-origin focus restrictions. This hotkey is intentionally one-way:
|
|
8587
|
+
* tab header -> web content.
|
|
8588
|
+
*
|
|
8589
|
+
* @defaultValue 'Mod+Enter'
|
|
8590
|
+
*/
|
|
8591
|
+
focusContentHotkey?: string | false;
|
|
8592
|
+
};
|
|
8593
|
+
|
|
8521
8594
|
/**
|
|
8522
8595
|
* @interface
|
|
8523
8596
|
*/
|
|
@@ -8901,7 +8974,7 @@ declare class LayoutModule extends Base {
|
|
|
8901
8974
|
* @returns
|
|
8902
8975
|
*/
|
|
8903
8976
|
getCurrentLayoutManagerSync: <UserSnapshotType extends OpenFin_2.LayoutSnapshot>() => OpenFin_2.LayoutManager<UserSnapshotType>;
|
|
8904
|
-
create: (options: OpenFin_2.CreateLayoutOptions) => Promise<
|
|
8977
|
+
create: (options: OpenFin_2.CreateLayoutOptions) => Promise<OpenFin_2.LayoutSyncApi>;
|
|
8905
8978
|
destroy: (layoutIdentity: OpenFin_2.LayoutIdentity) => Promise<void>;
|
|
8906
8979
|
}
|
|
8907
8980
|
|
|
@@ -9286,6 +9359,19 @@ declare type LayoutStateChangedEvent = LayoutDOMEvent & {
|
|
|
9286
9359
|
type: 'layout-state-changed';
|
|
9287
9360
|
};
|
|
9288
9361
|
|
|
9362
|
+
/**
|
|
9363
|
+
* @interface
|
|
9364
|
+
* Sync API returned from Layout.create() for operations that don't require IPC.
|
|
9365
|
+
* Only available in the window context that owns the layout.
|
|
9366
|
+
*/
|
|
9367
|
+
declare type LayoutSyncApi = {
|
|
9368
|
+
/**
|
|
9369
|
+
* Updates accessibility options at runtime without recreating the layout.
|
|
9370
|
+
* @param options Partial accessibility options to merge with existing options
|
|
9371
|
+
*/
|
|
9372
|
+
updateAccessibilityOptions(options: Partial<LayoutAccessibilityOptions>): void;
|
|
9373
|
+
};
|
|
9374
|
+
|
|
9289
9375
|
/**
|
|
9290
9376
|
* @interface
|
|
9291
9377
|
*/
|
|
@@ -9435,6 +9521,15 @@ declare type LogUploadOptions = {
|
|
|
9435
9521
|
* Max file size limit in Megabytes for the logs archive.
|
|
9436
9522
|
*/
|
|
9437
9523
|
sizeLimit?: number;
|
|
9524
|
+
/**
|
|
9525
|
+
* HTTP method used to upload the log archive.
|
|
9526
|
+
* Accepted values are `'POST'` and `'PUT'` (case-insensitive; values are normalised to uppercase before validation).
|
|
9527
|
+
* - `POST` sends a multipart `FormData` request (current behaviour).
|
|
9528
|
+
* - `PUT` sends the raw zip binary with an explicit `Content-Length` and no `Content-Type` header,
|
|
9529
|
+
* suitable for endpoints that expect a raw body (e.g. pre-signed upload URLs).
|
|
9530
|
+
* @defaultValue 'POST'
|
|
9531
|
+
*/
|
|
9532
|
+
method?: 'POST' | 'PUT';
|
|
9438
9533
|
};
|
|
9439
9534
|
|
|
9440
9535
|
/**
|
|
@@ -10824,6 +10919,15 @@ declare namespace OpenFin_2 {
|
|
|
10824
10919
|
HeaderControlsContext,
|
|
10825
10920
|
CreateLayoutOptions,
|
|
10826
10921
|
MultiInstanceViewBehavior,
|
|
10922
|
+
LayoutAccessibilityOptions,
|
|
10923
|
+
ViewTabElements,
|
|
10924
|
+
ViewTabAccessibilityOptions,
|
|
10925
|
+
AccessibilityContext,
|
|
10926
|
+
TabAriaLabelContext,
|
|
10927
|
+
CloseButtonAriaLabelContext,
|
|
10928
|
+
AddTabButtonAriaLabelContext,
|
|
10929
|
+
AriaLabelOptions,
|
|
10930
|
+
LayoutSyncApi,
|
|
10827
10931
|
PresetLayoutOptions_2 as PresetLayoutOptions,
|
|
10828
10932
|
ResultBehavior,
|
|
10829
10933
|
PopupBaseBehavior,
|
|
@@ -12640,6 +12744,38 @@ declare interface PlatformProvider {
|
|
|
12640
12744
|
* @returns A promise resolving to `true` if the window should prevent the app from quitting, otherwise `false`.
|
|
12641
12745
|
*/
|
|
12642
12746
|
shouldWindowPreventQuit(windowIdentity: OpenFin_2.Identity): Promise<boolean>;
|
|
12747
|
+
/**
|
|
12748
|
+
* Returns the platform's keyboard commands. Default implementation returns the manifest's
|
|
12749
|
+
* `platform.commands`. Override to inject additional default commands.
|
|
12750
|
+
* Called once during Platform.init; the result is cached for the lifetime
|
|
12751
|
+
* of the platform.
|
|
12752
|
+
*
|
|
12753
|
+
* @remarks
|
|
12754
|
+
* The returned commands are merged with core's built-in default commands
|
|
12755
|
+
* (unless `disableDefaultCommands` is set).
|
|
12756
|
+
* Overriders receive the raw manifest commands from `super` and can prepend
|
|
12757
|
+
* their own defaults — returned commands override default commands by command name.
|
|
12758
|
+
*
|
|
12759
|
+
* @example
|
|
12760
|
+
* ```js
|
|
12761
|
+
* const overrideCallback = (PlatformProvider) => {
|
|
12762
|
+
* class Override extends PlatformProvider {
|
|
12763
|
+
* getKeyboardCommands() {
|
|
12764
|
+
* const manifestCommands = super.getKeyboardCommands();
|
|
12765
|
+
* const myCommands = [{ command: 'myApp.search', keys: 'Ctrl+K' }];
|
|
12766
|
+
* return [
|
|
12767
|
+
* ...myCommands,
|
|
12768
|
+
* ...manifestCommands
|
|
12769
|
+
* ];
|
|
12770
|
+
* }
|
|
12771
|
+
* }
|
|
12772
|
+
* return new Override();
|
|
12773
|
+
* }
|
|
12774
|
+
*
|
|
12775
|
+
* fin.Platform.init({ overrideCallback });
|
|
12776
|
+
* ```
|
|
12777
|
+
*/
|
|
12778
|
+
getKeyboardCommands(): OpenFin_2.ShortcutOverride[];
|
|
12643
12779
|
/**
|
|
12644
12780
|
* Method that is called every time an error occurs when processing an action in the Platform Provider. It is meant to be overriden, as a means to debug Platform applications
|
|
12645
12781
|
*/
|
|
@@ -15253,13 +15389,15 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
|
15253
15389
|
* * cookies: browser [cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies)
|
|
15254
15390
|
* * localStorage: browser data that can be used across sessions ([local storage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage))
|
|
15255
15391
|
* * appcache: html5 [application cache](https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache)
|
|
15392
|
+
* * windowState: clears data written for windows using `saveWindowState`; after clearing, previously saved bounds and state will not be restored until new state is written
|
|
15256
15393
|
* @example
|
|
15257
15394
|
* ```js
|
|
15258
15395
|
* const clearCacheOptions = {
|
|
15259
15396
|
* appcache: true,
|
|
15260
15397
|
* cache: true,
|
|
15261
15398
|
* cookies: true,
|
|
15262
|
-
* localStorage: true
|
|
15399
|
+
* localStorage: true,
|
|
15400
|
+
* windowState: true
|
|
15263
15401
|
* };
|
|
15264
15402
|
* fin.System.clearCache(clearCacheOptions).then(() => console.log('Cache cleared')).catch(err => console.log(err));
|
|
15265
15403
|
* ```
|
|
@@ -15284,12 +15422,16 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
|
|
|
15284
15422
|
*
|
|
15285
15423
|
* @param options - Optional configuration for what data to clear
|
|
15286
15424
|
*
|
|
15425
|
+
* @remarks Set `windowState: true` to also clear data written for windows using `saveWindowState`.
|
|
15426
|
+
* After this data is cleared, previously saved bounds and state will not be restored until new state is written again.
|
|
15427
|
+
*
|
|
15287
15428
|
* @example
|
|
15288
15429
|
* ```js
|
|
15289
15430
|
* // Clear only cookies and localStorage for a specific origin
|
|
15290
15431
|
* await fin.System.clearCacheData({
|
|
15291
15432
|
* dataTypes: ['cookies', 'localStorage'],
|
|
15292
|
-
* origins: ['http://localhost:8081']
|
|
15433
|
+
* origins: ['http://localhost:8081'],
|
|
15434
|
+
* windowState: true
|
|
15293
15435
|
* });
|
|
15294
15436
|
*
|
|
15295
15437
|
* // Clear everything except for a specific origin
|
|
@@ -17064,6 +17206,17 @@ declare type SystemShutdownHandler = (shutdownEvent: {
|
|
|
17064
17206
|
proceed: () => void;
|
|
17065
17207
|
}) => void;
|
|
17066
17208
|
|
|
17209
|
+
/**
|
|
17210
|
+
* @interface
|
|
17211
|
+
* Context for tab aria-label functions.
|
|
17212
|
+
*/
|
|
17213
|
+
declare type TabAriaLabelContext = AccessibilityContext & {
|
|
17214
|
+
title: string;
|
|
17215
|
+
isActive: boolean;
|
|
17216
|
+
tabIndex: number;
|
|
17217
|
+
tabCount: number;
|
|
17218
|
+
};
|
|
17219
|
+
|
|
17067
17220
|
/**
|
|
17068
17221
|
* Generated when a Layout Tab Component was closed.
|
|
17069
17222
|
* @interface
|
|
@@ -18470,6 +18623,53 @@ declare interface ViewStatuses {
|
|
|
18470
18623
|
viewsNotPreventingUnload: Identity_4[];
|
|
18471
18624
|
}
|
|
18472
18625
|
|
|
18626
|
+
/**
|
|
18627
|
+
* @interface
|
|
18628
|
+
* Accessibility options for view tab navigation.
|
|
18629
|
+
*/
|
|
18630
|
+
declare type ViewTabAccessibilityOptions = {
|
|
18631
|
+
/**
|
|
18632
|
+
* Controls which elements are reachable via Tab key navigation.
|
|
18633
|
+
* Uses roving tabindex pattern - only one element focusable at a time.
|
|
18634
|
+
* @default ['active-tab', 'add-tab-button']
|
|
18635
|
+
*/
|
|
18636
|
+
tabNavigation?: ViewTabElements[];
|
|
18637
|
+
/**
|
|
18638
|
+
* Controls which elements are navigable via Arrow keys.
|
|
18639
|
+
* @default ['inactive-tab', 'active-tab', 'active-tab-close-button', 'inactive-tab-close-button', 'add-tab-button']
|
|
18640
|
+
*/
|
|
18641
|
+
arrowNavigation?: ViewTabElements[];
|
|
18642
|
+
/**
|
|
18643
|
+
* Whether Delete/Backspace keys close the focused tab.
|
|
18644
|
+
* @default false
|
|
18645
|
+
*/
|
|
18646
|
+
enableDeleteKeyClose?: boolean;
|
|
18647
|
+
/**
|
|
18648
|
+
* Whether Home/End keys jump to first/last navigable element.
|
|
18649
|
+
* @default false
|
|
18650
|
+
*/
|
|
18651
|
+
enableHomeEndNavigation?: boolean;
|
|
18652
|
+
/**
|
|
18653
|
+
* Custom aria-label providers. Can be a static string or a function receiving context.
|
|
18654
|
+
*/
|
|
18655
|
+
ariaLabels?: AriaLabelOptions;
|
|
18656
|
+
/**
|
|
18657
|
+
* Whether to announce tab changes via aria-live.
|
|
18658
|
+
* @default true
|
|
18659
|
+
*/
|
|
18660
|
+
announceTabChanges?: boolean;
|
|
18661
|
+
/**
|
|
18662
|
+
* Focus behavior when a tab is closed via keyboard.
|
|
18663
|
+
* @default 'next'
|
|
18664
|
+
*/
|
|
18665
|
+
focusOnCloseStrategy?: 'next' | 'previous' | 'active';
|
|
18666
|
+
};
|
|
18667
|
+
|
|
18668
|
+
/**
|
|
18669
|
+
* Elements that can be navigated in view tabs.
|
|
18670
|
+
*/
|
|
18671
|
+
declare type ViewTabElements = 'active-tab' | 'inactive-tab' | 'active-tab-close-button' | 'inactive-tab-close-button' | 'add-tab-button';
|
|
18672
|
+
|
|
18473
18673
|
/**
|
|
18474
18674
|
* View throttling state.
|
|
18475
18675
|
*
|