@interopio/browser 4.4.1 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser.d.ts +86 -11
- package/changelog.md +8 -0
- package/dist/browser.es.js +91 -44
- package/dist/browser.es.js.map +1 -1
- package/dist/browser.umd.js +91 -44
- package/dist/browser.umd.js.map +1 -1
- package/dist/browser.umd.min.js +3 -3
- package/package.json +7 -8
package/browser.d.ts
CHANGED
|
@@ -871,6 +871,17 @@ export namespace IOConnectBrowser {
|
|
|
871
871
|
*/
|
|
872
872
|
getAll(type: LayoutType): Promise<LayoutSummary[]>;
|
|
873
873
|
|
|
874
|
+
/**
|
|
875
|
+
* Retrieves the contents of a Global Layout or a Workspace Layout depending on the specified options.
|
|
876
|
+
* When used for retrieving the contents of a Global Layout, the returned result will contain all components participating in the Global Layout:
|
|
877
|
+
* individual app instances (including all Workspaces App instances), all Workspace instances hosted in all Workspaces App instances,
|
|
878
|
+
* and all windows participating in all Workspaces.
|
|
879
|
+
* When used for retrieving the contents of a Workspace Layout, the returned result will contain only the windows participating in the Workspace.
|
|
880
|
+
* @param options Options for retrieving the Layout contents.
|
|
881
|
+
* @since io.Connect Browser 4.5
|
|
882
|
+
*/
|
|
883
|
+
getLayoutContents(options: GetContentsOptions): Promise<LayoutContents>;
|
|
884
|
+
|
|
874
885
|
/**
|
|
875
886
|
* Returns a collection of all available `Layout` objects of the provided type.
|
|
876
887
|
* @param type Type of the Layouts to export.
|
|
@@ -1026,6 +1037,44 @@ export namespace IOConnectBrowser {
|
|
|
1026
1037
|
version?: number;
|
|
1027
1038
|
}
|
|
1028
1039
|
|
|
1040
|
+
/**
|
|
1041
|
+
* Options for retrieving the contents of Global or Workspace Layouts via the `getLayoutContents()` method.
|
|
1042
|
+
*/
|
|
1043
|
+
export interface GetContentsOptions {
|
|
1044
|
+
/**
|
|
1045
|
+
* Name of the Layout whose contents to retrieve.
|
|
1046
|
+
*/
|
|
1047
|
+
name: string;
|
|
1048
|
+
|
|
1049
|
+
/**
|
|
1050
|
+
* Type of the Layout. The supported types for this operation are `"Global"` and `"Workspace"`.
|
|
1051
|
+
*/
|
|
1052
|
+
type: LayoutType;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
/**
|
|
1056
|
+
* Describes the contents of Global or Workspace Layouts retrieved via the `getLayoutContents()` method.
|
|
1057
|
+
*/
|
|
1058
|
+
export interface LayoutContents {
|
|
1059
|
+
/**
|
|
1060
|
+
* Individual app instances (including Workspaces App instances) participating in the Global Layout.
|
|
1061
|
+
* When retrieving the contents of a Workspace Layout, this property will always be an empty array.
|
|
1062
|
+
*/
|
|
1063
|
+
appComponents: Array<WindowComponent | WorkspaceFrameComponent | IOConnectWorkspaces.WorkspaceComponent>;
|
|
1064
|
+
|
|
1065
|
+
/**
|
|
1066
|
+
* Workspaces (from all Workspaces App instances) participating in the Global Layout.
|
|
1067
|
+
* When retrieving the contents of a Workspace Layout, this property will always be an empty array.
|
|
1068
|
+
*/
|
|
1069
|
+
workspaceComponents: IOConnectWorkspaces.WorkspaceLayoutComponentState[];
|
|
1070
|
+
|
|
1071
|
+
/**
|
|
1072
|
+
* All window instances from all Workspaces participating in the Global Layout (when retrieving the contents of a Global Layout),
|
|
1073
|
+
* or all window instances participating in the Workspace (when retrieving the contents of a Workspace Layout).
|
|
1074
|
+
*/
|
|
1075
|
+
workspaceWindows: IOConnectWorkspaces.WindowLayoutItem[];
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1029
1078
|
/**
|
|
1030
1079
|
* @ignore
|
|
1031
1080
|
*/
|
|
@@ -1334,7 +1383,7 @@ export namespace IOConnectBrowser {
|
|
|
1334
1383
|
* Configures the Global notification settings.
|
|
1335
1384
|
* @param options configuration options
|
|
1336
1385
|
*/
|
|
1337
|
-
configure(options: Configuration): Promise<
|
|
1386
|
+
configure(options: Configuration): Promise<Configuration>;
|
|
1338
1387
|
|
|
1339
1388
|
/** Retrieves the current global notification settings. */
|
|
1340
1389
|
getConfiguration(): Promise<Configuration>;
|
|
@@ -1536,9 +1585,10 @@ export namespace IOConnectBrowser {
|
|
|
1536
1585
|
/**
|
|
1537
1586
|
* Retrieves a list with the contexts of the current Channels. Can be used both in single and in multi Channel mode.
|
|
1538
1587
|
* If used in single Channel mode, the returned array will always contain a single member if the window is joined to a Channel, or will be empty otherwise.
|
|
1588
|
+
* @param options Settings for retrieving FDC3 contexts published in the io.Connect Channels. *Available since io.Connect Browser 4.5.*
|
|
1539
1589
|
* @since io.Connect Browser 3.5
|
|
1540
1590
|
*/
|
|
1541
|
-
getMyChannels(): Promise<ChannelContext[]>;
|
|
1591
|
+
getMyChannels(options?: FDC3Options): Promise<ChannelContext[]>;
|
|
1542
1592
|
|
|
1543
1593
|
/**
|
|
1544
1594
|
* Retrieves a list with the names of the current Channels. Can be used both in single and in multi Channel mode.
|
|
@@ -1557,9 +1607,12 @@ export namespace IOConnectBrowser {
|
|
|
1557
1607
|
|
|
1558
1608
|
/**
|
|
1559
1609
|
* Removes the current or a specified window from the current or a specified Channel.
|
|
1560
|
-
*
|
|
1610
|
+
* If you don't provide an argument, the current window will be removed from the current Channel if in single Channel mode,
|
|
1611
|
+
* or from all currently joined Channels if in multi Channel mode.
|
|
1612
|
+
* @param options Object with options which you can use to remove any window from any Channel,
|
|
1613
|
+
* or a string with the ID of a window to remove from the currently joined Channel or Channels.
|
|
1561
1614
|
*/
|
|
1562
|
-
leave(options?: LeaveOptions): Promise<void>;
|
|
1615
|
+
leave(options?: string | LeaveOptions): Promise<void>;
|
|
1563
1616
|
|
|
1564
1617
|
/**
|
|
1565
1618
|
* Returns the name of the current channel.
|
|
@@ -1699,8 +1752,6 @@ export namespace IOConnectBrowser {
|
|
|
1699
1752
|
* If only a window ID is provided, the specified window will be removed from the current Channel if in single Channel mode,
|
|
1700
1753
|
* or from all currently joined Channels if in multi Channel mode.
|
|
1701
1754
|
* If you provide only the name of the Channel to leave, the current window will be removed from the specified Channel.
|
|
1702
|
-
* If you don't provide an argument, the current window will be removed from the current Channel if in single Channel mode,
|
|
1703
|
-
* or from all currently joined Channels if in multi Channel mode.
|
|
1704
1755
|
* @since io.Connect Browser 3.5
|
|
1705
1756
|
*/
|
|
1706
1757
|
export interface LeaveOptions {
|
|
@@ -2014,11 +2065,25 @@ export namespace IOConnectBrowser {
|
|
|
2014
2065
|
}
|
|
2015
2066
|
|
|
2016
2067
|
/**
|
|
2017
|
-
*
|
|
2068
|
+
* Configuration for the `allow` attribute of the `<iframe>` element in which the app will be started.
|
|
2069
|
+
* This applies when the app is loaded in a Workspace as well as when it's opened as a standalone `<iframe>` via the io.Connect IFrames API.
|
|
2018
2070
|
*/
|
|
2019
2071
|
export interface IFramePermissionsPolicyConfig {
|
|
2020
2072
|
/**
|
|
2021
|
-
*
|
|
2073
|
+
* Collection of flags that will be applied to the `allow` attribute of the `<iframe>` element.
|
|
2074
|
+
* Provide the flags as a single string and use spaces to separate them.
|
|
2075
|
+
*/
|
|
2076
|
+
flags: string;
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
/**
|
|
2080
|
+
* Configuration for the `sandbox` attribute of the `<iframe>` element in which the app will be started.
|
|
2081
|
+
* This applies when the app is loaded in a Workspace as well as when it's opened as a standalone `<iframe>` via the io.Connect IFrames API.
|
|
2082
|
+
*/
|
|
2083
|
+
export interface IFrameSandboxConfig {
|
|
2084
|
+
/**
|
|
2085
|
+
* Collection of flags that will be applied to the `sandbox` attribute of the `<iframe>` element.
|
|
2086
|
+
* Provide the flags as a single string and use spaces to separate them.
|
|
2022
2087
|
*/
|
|
2023
2088
|
flags: string;
|
|
2024
2089
|
}
|
|
@@ -2052,6 +2117,7 @@ export namespace IOConnectBrowser {
|
|
|
2052
2117
|
|
|
2053
2118
|
/**
|
|
2054
2119
|
* Configuration for the `sandbox` attribute of the `<iframe>` element in which the app will be started when opened in a Workspace.
|
|
2120
|
+
* @deprecated Will be removed in **io.Connect Browser** 5.0. Use the `iframeSandbox` property instead.
|
|
2055
2121
|
*/
|
|
2056
2122
|
workspacesSandbox?: WorkspacesSandbox;
|
|
2057
2123
|
|
|
@@ -2061,9 +2127,17 @@ export namespace IOConnectBrowser {
|
|
|
2061
2127
|
channelSelector?: ChannelSelector;
|
|
2062
2128
|
|
|
2063
2129
|
/**
|
|
2064
|
-
* Configuration for the `
|
|
2130
|
+
* Configuration for the `allow` attribute of the `<iframe>` element in which the app will be started.
|
|
2131
|
+
* This applies when the app is loaded in a Workspace as well as when it's opened as a standalone `<iframe>` via the io.Connect IFrames API.
|
|
2065
2132
|
*/
|
|
2066
2133
|
iframePermissionsPolicy?: IFramePermissionsPolicyConfig;
|
|
2134
|
+
|
|
2135
|
+
/**
|
|
2136
|
+
* Configuration for the `sandbox` attribute of the `<iframe>` element in which the app will be started.
|
|
2137
|
+
* This applies when the app is loaded in a Workspace as well as when it's opened as a standalone `<iframe>` via the io.Connect IFrames API.
|
|
2138
|
+
* @since io.Connect Browser 4.5
|
|
2139
|
+
*/
|
|
2140
|
+
iframeSandbox?: IFrameSandboxConfig;
|
|
2067
2141
|
}
|
|
2068
2142
|
|
|
2069
2143
|
/**
|
|
@@ -2415,7 +2489,8 @@ export namespace IOConnectBrowser {
|
|
|
2415
2489
|
}
|
|
2416
2490
|
|
|
2417
2491
|
interface InteropAppChannelV2 {
|
|
2418
|
-
name
|
|
2492
|
+
name?: string;
|
|
2493
|
+
id?: string;
|
|
2419
2494
|
description?: string;
|
|
2420
2495
|
broadcasts?: string[];
|
|
2421
2496
|
listensFor?: string[];
|
|
@@ -2811,7 +2886,7 @@ export namespace IOConnectBrowser {
|
|
|
2811
2886
|
/**
|
|
2812
2887
|
* Provides additional information about an Intent (e.g., when an Intent is retrieved via the `getIntents()` method).
|
|
2813
2888
|
*/
|
|
2814
|
-
export interface IntentInfo extends AddIntentListenerRequest {}
|
|
2889
|
+
export interface IntentInfo extends AddIntentListenerRequest { }
|
|
2815
2890
|
|
|
2816
2891
|
/**
|
|
2817
2892
|
* Criteria for excluding Intent handlers from the results when using the `filterHandlers()` method.
|
package/changelog.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
4.5.0
|
|
2
|
+
feat: G4E-10515 add support for iframes-api
|
|
3
|
+
feat: G4E-10030 Add a layouts API method that returns lists of applications, workspaces and workspace windows
|
|
4
|
+
feat: G4E-10759 Added support for passing a string to io.channels.leave() as a shortcut for { windowId } and consistency with io.CD.
|
|
5
|
+
feat: G4E-10757 Add 'options' argument to io.channels.getMyChannels() method
|
|
6
|
+
fix: G4E-10767 notifications.configure() to resolve with the updated notification configuration instead of undefined.
|
|
7
|
+
fix: G4E-10762 channels restrictAll() now resolves with undefined instead of an empty object, aligning its return contract with io.CD.
|
|
8
|
+
fix: G4E-10635 Enforced stricter URL validation for app definitions and io.windows.open() URLs. URLs with unsafe protocols ("data:", "javascript:", "vbscript:") are now rejected.
|
|
1
9
|
4.4.1
|
|
2
10
|
chore: update interopio/insights packages
|
|
3
11
|
4.4.0
|
package/dist/browser.es.js
CHANGED
|
@@ -1798,22 +1798,26 @@ Decoder$1.valueAt;
|
|
|
1798
1798
|
/** See `Decoder.succeed` */
|
|
1799
1799
|
Decoder$1.succeed;
|
|
1800
1800
|
/** See `Decoder.fail` */
|
|
1801
|
-
Decoder$1.fail;
|
|
1801
|
+
var fail$1 = Decoder$1.fail;
|
|
1802
1802
|
/** See `Decoder.lazy` */
|
|
1803
1803
|
Decoder$1.lazy;
|
|
1804
1804
|
|
|
1805
1805
|
const nonEmptyStringDecoder$3 = string$1().where((s) => s.length > 0, "Expected a non-empty string");
|
|
1806
1806
|
const nonNegativeNumberDecoder$3 = number$1().where((num) => num >= 0, "Expected a non-negative number");
|
|
1807
1807
|
const regexDecoder = anyJson$1().andThen((value) => {
|
|
1808
|
-
return value instanceof RegExp ? anyJson$1() : fail(`expected a regex, got a ${typeof value}`);
|
|
1808
|
+
return value instanceof RegExp ? anyJson$1() : fail$1(`expected a regex, got a ${typeof value}`);
|
|
1809
1809
|
});
|
|
1810
|
-
const urlDecoder = nonEmptyStringDecoder$3.andThen((url) => {
|
|
1810
|
+
const urlDecoder$1 = nonEmptyStringDecoder$3.andThen((url) => {
|
|
1811
1811
|
try {
|
|
1812
|
-
new URL(url);
|
|
1812
|
+
const { protocol } = new URL(url);
|
|
1813
|
+
const disallowedProtocols = ["data:", "javascript:", "vbscript:"];
|
|
1814
|
+
if (disallowedProtocols.includes(protocol)) {
|
|
1815
|
+
return fail$1(`Expected a URL with a safe protocol, got: ${protocol} (disallowed protocols: ${disallowedProtocols.join(", ")})`);
|
|
1816
|
+
}
|
|
1813
1817
|
return nonEmptyStringDecoder$3;
|
|
1814
1818
|
}
|
|
1815
1819
|
catch {
|
|
1816
|
-
return fail("
|
|
1820
|
+
return fail$1("Expected a valid URL");
|
|
1817
1821
|
}
|
|
1818
1822
|
});
|
|
1819
1823
|
|
|
@@ -1825,7 +1829,7 @@ const intentDefinitionDecoder$1 = object$1({
|
|
|
1825
1829
|
});
|
|
1826
1830
|
const v2TypeDecoder = oneOf(constant$1("web"), constant$1("native"), constant$1("citrix"), constant$1("onlineNative"), constant$1("other"));
|
|
1827
1831
|
const v2DetailsDecoder = object$1({
|
|
1828
|
-
url:
|
|
1832
|
+
url: urlDecoder$1
|
|
1829
1833
|
});
|
|
1830
1834
|
const v2IconDecoder = object$1({
|
|
1831
1835
|
src: nonEmptyStringDecoder$3,
|
|
@@ -1853,18 +1857,19 @@ const v2UserChannelDecoder = object$1({
|
|
|
1853
1857
|
listensFor: optional$1(array$1(nonEmptyStringDecoder$3))
|
|
1854
1858
|
});
|
|
1855
1859
|
const v2AppChannelDecoder = object$1({
|
|
1856
|
-
name: nonEmptyStringDecoder$3,
|
|
1860
|
+
name: optional$1(nonEmptyStringDecoder$3),
|
|
1861
|
+
id: optional$1(nonEmptyStringDecoder$3),
|
|
1857
1862
|
description: optional$1(nonEmptyStringDecoder$3),
|
|
1858
1863
|
broadcasts: optional$1(array$1(nonEmptyStringDecoder$3)),
|
|
1859
1864
|
listensFor: optional$1(array$1(nonEmptyStringDecoder$3))
|
|
1860
|
-
});
|
|
1865
|
+
}).where((appChannel) => Boolean(appChannel.name || appChannel.id), "Expected at least a name or an id property to be present in the app channel definition");
|
|
1861
1866
|
const v2InteropDecoder = object$1({
|
|
1862
1867
|
intents: optional$1(v2IntentsDecoder),
|
|
1863
1868
|
userChannels: optional$1(v2UserChannelDecoder),
|
|
1864
1869
|
appChannels: optional$1(array$1(v2AppChannelDecoder))
|
|
1865
1870
|
});
|
|
1866
1871
|
const glue42ApplicationDetailsDecoder = object$1({
|
|
1867
|
-
url: optional$1(
|
|
1872
|
+
url: optional$1(urlDecoder$1),
|
|
1868
1873
|
top: optional$1(number$1()),
|
|
1869
1874
|
left: optional$1(number$1()),
|
|
1870
1875
|
width: optional$1(nonNegativeNumberDecoder$3),
|
|
@@ -2144,7 +2149,7 @@ const decoders$1 = {
|
|
|
2144
2149
|
nonEmptyStringDecoder: nonEmptyStringDecoder$3,
|
|
2145
2150
|
nonNegativeNumberDecoder: nonNegativeNumberDecoder$3,
|
|
2146
2151
|
regexDecoder,
|
|
2147
|
-
urlDecoder
|
|
2152
|
+
urlDecoder: urlDecoder$1
|
|
2148
2153
|
},
|
|
2149
2154
|
fdc3: {
|
|
2150
2155
|
allDefinitionsDecoder,
|
|
@@ -2193,13 +2198,14 @@ ioc.fdc3;
|
|
|
2193
2198
|
const decoders = ioc.decoders;
|
|
2194
2199
|
ioc.errors;
|
|
2195
2200
|
|
|
2196
|
-
const nonEmptyStringDecoder$2 =
|
|
2197
|
-
const nonNegativeNumberDecoder$2 =
|
|
2201
|
+
const nonEmptyStringDecoder$2 = decoders.common.nonEmptyStringDecoder;
|
|
2202
|
+
const nonNegativeNumberDecoder$2 = decoders.common.nonNegativeNumberDecoder;
|
|
2198
2203
|
const optionalNonEmptyStringDecoder = optional$2(nonEmptyStringDecoder$2);
|
|
2204
|
+
const urlDecoder = decoders.common.urlDecoder;
|
|
2199
2205
|
const libDomainDecoder = oneOf$1(constant$2("system"), constant$2("windows"), constant$2("appManager"), constant$2("layouts"), constant$2("intents"), constant$2("notifications"), constant$2("channels"), constant$2("extension"), constant$2("themes"), constant$2("prefs"), constant$2("ui"));
|
|
2200
2206
|
const windowOperationTypesDecoder = oneOf$1(constant$2("openWindow"), constant$2("windowHello"), constant$2("windowAdded"), constant$2("windowRemoved"), constant$2("getBounds"), constant$2("getFrameBounds"), constant$2("getUrl"), constant$2("moveResize"), constant$2("focus"), constant$2("close"), constant$2("getTitle"), constant$2("setTitle"), constant$2("focusChange"), constant$2("getChannel"), constant$2("notifyChannelsChanged"), constant$2("setZoomFactor"), constant$2("zoomFactorChange"), constant$2("refresh"), constant$2("operationCheck"));
|
|
2201
2207
|
const appManagerOperationTypesDecoder = oneOf$1(constant$2("appHello"), constant$2("appDirectoryStateChange"), constant$2("instanceStarted"), constant$2("instanceStopped"), constant$2("applicationStart"), constant$2("instanceStop"), constant$2("clear"), constant$2("operationCheck"));
|
|
2202
|
-
const layoutsOperationTypesDecoder = oneOf$1(constant$2("layoutAdded"), constant$2("layoutChanged"), constant$2("layoutRemoved"), constant$2("layoutRenamed"), constant$2("get"), constant$2("getAll"), constant$2("export"), constant$2("import"), constant$2("remove"), constant$2("rename"), constant$2("clientSaveRequest"), constant$2("getGlobalPermissionState"), constant$2("checkGlobalActivated"), constant$2("requestGlobalPermission"), constant$2("getDefaultGlobal"), constant$2("setDefaultGlobal"), constant$2("clearDefaultGlobal"), constant$2("updateMetadata"), constant$2("operationCheck"), constant$2("getCurrent"), constant$2("defaultLayoutChanged"), constant$2("layoutRestored"));
|
|
2208
|
+
const layoutsOperationTypesDecoder = oneOf$1(constant$2("layoutAdded"), constant$2("layoutChanged"), constant$2("layoutRemoved"), constant$2("layoutRenamed"), constant$2("get"), constant$2("getAll"), constant$2("getLayoutContents"), constant$2("export"), constant$2("import"), constant$2("remove"), constant$2("rename"), constant$2("clientSaveRequest"), constant$2("getGlobalPermissionState"), constant$2("checkGlobalActivated"), constant$2("requestGlobalPermission"), constant$2("getDefaultGlobal"), constant$2("setDefaultGlobal"), constant$2("clearDefaultGlobal"), constant$2("updateMetadata"), constant$2("operationCheck"), constant$2("getCurrent"), constant$2("defaultLayoutChanged"), constant$2("layoutRestored"));
|
|
2203
2209
|
const notificationsOperationTypesDecoder = oneOf$1(constant$2("raiseNotification"), constant$2("requestPermission"), constant$2("notificationShow"), constant$2("notificationClick"), constant$2("getPermission"), constant$2("list"), constant$2("notificationRaised"), constant$2("notificationClosed"), constant$2("click"), constant$2("clear"), constant$2("clearAll"), constant$2("configure"), constant$2("getConfiguration"), constant$2("configurationChanged"), constant$2("setState"), constant$2("clearOld"), constant$2("activeCountChange"), constant$2("stateChange"), constant$2("operationCheck"), constant$2("getActiveCount"));
|
|
2204
2210
|
const systemOperationTypesDecoder = oneOf$1(constant$2("getEnvironment"), constant$2("getBase"), constant$2("platformShutdown"), constant$2("isFdc3DataWrappingSupported"), constant$2("clientError"), constant$2("systemHello"), constant$2("operationCheck"));
|
|
2205
2211
|
const windowRelativeDirectionDecoder = oneOf$1(constant$2("top"), constant$2("left"), constant$2("right"), constant$2("bottom"));
|
|
@@ -2222,7 +2228,7 @@ const windowOpenSettingsDecoder = optional$2(object$2({
|
|
|
2222
2228
|
}));
|
|
2223
2229
|
const openWindowConfigDecoder = object$2({
|
|
2224
2230
|
name: nonEmptyStringDecoder$2,
|
|
2225
|
-
url:
|
|
2231
|
+
url: urlDecoder,
|
|
2226
2232
|
options: windowOpenSettingsDecoder
|
|
2227
2233
|
});
|
|
2228
2234
|
const windowHelloDecoder = object$2({
|
|
@@ -2274,7 +2280,7 @@ const frameWindowBoundsResultDecoder = object$2({
|
|
|
2274
2280
|
});
|
|
2275
2281
|
const windowUrlResultDecoder = object$2({
|
|
2276
2282
|
windowId: nonEmptyStringDecoder$2,
|
|
2277
|
-
url:
|
|
2283
|
+
url: urlDecoder
|
|
2278
2284
|
});
|
|
2279
2285
|
const windowZoomFactorConfigDecoder = object$2({
|
|
2280
2286
|
windowId: nonEmptyStringDecoder$2,
|
|
@@ -2294,6 +2300,9 @@ const instanceDataDecoder = object$2({
|
|
|
2294
2300
|
const iframePermissionsPolicyConfigDecoder = object$2({
|
|
2295
2301
|
flags: string$2()
|
|
2296
2302
|
});
|
|
2303
|
+
const iframeSandboxConfigDecoder = object$2({
|
|
2304
|
+
flags: string$2()
|
|
2305
|
+
});
|
|
2297
2306
|
const workspacesSandboxDecoder = object$2({
|
|
2298
2307
|
flags: string$2()
|
|
2299
2308
|
});
|
|
@@ -2305,14 +2314,15 @@ const channelSelectorDecoder$1 = object$2({
|
|
|
2305
2314
|
enabled: boolean$2(),
|
|
2306
2315
|
});
|
|
2307
2316
|
const applicationDetailsDecoder = object$2({
|
|
2308
|
-
url:
|
|
2317
|
+
url: urlDecoder,
|
|
2309
2318
|
top: optional$2(number$2()),
|
|
2310
2319
|
left: optional$2(number$2()),
|
|
2311
2320
|
width: optional$2(nonNegativeNumberDecoder$2),
|
|
2312
2321
|
height: optional$2(nonNegativeNumberDecoder$2),
|
|
2313
2322
|
workspacesSandbox: optional$2(workspacesSandboxDecoder),
|
|
2314
2323
|
channelSelector: optional$2(channelSelectorDecoder$1),
|
|
2315
|
-
iframePermissionsPolicy: optional$2(iframePermissionsPolicyConfigDecoder)
|
|
2324
|
+
iframePermissionsPolicy: optional$2(iframePermissionsPolicyConfigDecoder),
|
|
2325
|
+
iframeSandbox: optional$2(iframeSandboxConfigDecoder)
|
|
2316
2326
|
});
|
|
2317
2327
|
const intentDefinitionDecoder = object$2({
|
|
2318
2328
|
name: nonEmptyStringDecoder$2,
|
|
@@ -2380,7 +2390,7 @@ const windowComponentStateDecoder = object$2({
|
|
|
2380
2390
|
bounds: windowBoundsDecoder,
|
|
2381
2391
|
createArgs: object$2({
|
|
2382
2392
|
name: optional$2(nonEmptyStringDecoder$2),
|
|
2383
|
-
url: optional$2(
|
|
2393
|
+
url: optional$2(urlDecoder),
|
|
2384
2394
|
context: optional$2(anyJson$2())
|
|
2385
2395
|
}),
|
|
2386
2396
|
windowState: optional$2(nonEmptyStringDecoder$2),
|
|
@@ -2404,7 +2414,7 @@ const windowLayoutItemDecoder = object$2({
|
|
|
2404
2414
|
type: constant$2("window"),
|
|
2405
2415
|
config: object$2({
|
|
2406
2416
|
appName: nonEmptyStringDecoder$2,
|
|
2407
|
-
url: optional$2(
|
|
2417
|
+
url: optional$2(urlDecoder),
|
|
2408
2418
|
title: optional$2(string$2()),
|
|
2409
2419
|
allowExtract: optional$2(boolean$2()),
|
|
2410
2420
|
allowReorder: optional$2(boolean$2()),
|
|
@@ -2489,6 +2499,17 @@ const restoreOptionsDecoder = object$2({
|
|
|
2489
2499
|
closeMe: optional$2(boolean$2()),
|
|
2490
2500
|
timeout: optional$2(nonNegativeNumberDecoder$2)
|
|
2491
2501
|
});
|
|
2502
|
+
const getContentsOptionsDecoder = object$2({
|
|
2503
|
+
name: nonEmptyStringDecoder$2,
|
|
2504
|
+
type: layoutTypeDecoder
|
|
2505
|
+
});
|
|
2506
|
+
const layoutContentsResultDecoder = object$2({
|
|
2507
|
+
contents: object$2({
|
|
2508
|
+
appComponents: array$2(oneOf$1(windowLayoutComponentDecoder, workspaceLayoutComponentDecoder, workspaceFrameComponentDecoder)),
|
|
2509
|
+
workspaceComponents: array$2(workspaceLayoutComponentStateDecoder),
|
|
2510
|
+
workspaceWindows: array$2(windowLayoutItemDecoder)
|
|
2511
|
+
})
|
|
2512
|
+
});
|
|
2492
2513
|
const layoutSummaryDecoder = object$2({
|
|
2493
2514
|
name: nonEmptyStringDecoder$2,
|
|
2494
2515
|
type: layoutTypeDecoder,
|
|
@@ -2710,10 +2731,10 @@ const publishOptionsDecoder = optional$2(oneOf$1(nonEmptyStringDecoder$2, object
|
|
|
2710
2731
|
name: optional$2(nonEmptyStringDecoder$2),
|
|
2711
2732
|
fdc3: optional$2(boolean$2())
|
|
2712
2733
|
})));
|
|
2713
|
-
const
|
|
2734
|
+
const leaveChannelsConfigDecoder = oneOf$1(nonEmptyStringDecoder$2, object$2({
|
|
2714
2735
|
windowId: optionalNonEmptyStringDecoder,
|
|
2715
2736
|
channel: optionalNonEmptyStringDecoder
|
|
2716
|
-
});
|
|
2737
|
+
}));
|
|
2717
2738
|
const fdc3ContextDecoder = anyJson$2().where((value) => typeof value.type === "string", "Expected a valid FDC3 Context with compulsory 'type' field");
|
|
2718
2739
|
const interopActionSettingsDecoder = object$2({
|
|
2719
2740
|
method: nonEmptyStringDecoder$2,
|
|
@@ -2867,7 +2888,8 @@ const strictNotificationsConfigurationProtocolDecoder = object$2({
|
|
|
2867
2888
|
sourceFilter: object$2({
|
|
2868
2889
|
allowed: array$2(nonEmptyStringDecoder$2),
|
|
2869
2890
|
blocked: array$2(nonEmptyStringDecoder$2)
|
|
2870
|
-
})
|
|
2891
|
+
}),
|
|
2892
|
+
showNotificationBadge: optional$2(boolean$2())
|
|
2871
2893
|
})
|
|
2872
2894
|
});
|
|
2873
2895
|
const platformSaveRequestConfigDecoder = object$2({
|
|
@@ -3806,7 +3828,7 @@ class WindowsController {
|
|
|
3806
3828
|
}
|
|
3807
3829
|
async open(name, url, options) {
|
|
3808
3830
|
runDecoderWithIOError(nonEmptyStringDecoder$2, name);
|
|
3809
|
-
runDecoderWithIOError(
|
|
3831
|
+
runDecoderWithIOError(urlDecoder, url);
|
|
3810
3832
|
const settings = runDecoderWithIOError(windowOpenSettingsDecoder, options);
|
|
3811
3833
|
const windowSuccess = await this.bridge.send("windows", operations$a.openWindow, { name, url, options: settings });
|
|
3812
3834
|
return this.waitForWindowAdded(windowSuccess.windowId);
|
|
@@ -4354,7 +4376,12 @@ class AppManagerController {
|
|
|
4354
4376
|
}
|
|
4355
4377
|
getApplication(name) {
|
|
4356
4378
|
const verifiedName = runDecoderWithIOError(nonEmptyStringDecoder$2, name);
|
|
4357
|
-
|
|
4379
|
+
const application = this.applications.find((app) => app.name === verifiedName);
|
|
4380
|
+
const iframeSandbox = application?.userProperties?.details?.iframeSandbox;
|
|
4381
|
+
if (iframeSandbox) {
|
|
4382
|
+
application.userProperties.details.workspacesSandbox = iframeSandbox;
|
|
4383
|
+
}
|
|
4384
|
+
return application;
|
|
4358
4385
|
}
|
|
4359
4386
|
getInstances() {
|
|
4360
4387
|
return this.instances.slice();
|
|
@@ -4664,6 +4691,7 @@ const operations$8 = {
|
|
|
4664
4691
|
layoutRenamed: { name: "layoutRenamed", dataDecoder: renamedLayoutNotificationDecoder },
|
|
4665
4692
|
get: { name: "get", dataDecoder: simpleLayoutConfigDecoder, resultDecoder: optionalSimpleLayoutResult },
|
|
4666
4693
|
getAll: { name: "getAll", dataDecoder: getAllLayoutsConfigDecoder, resultDecoder: allLayoutsSummariesResultDecoder },
|
|
4694
|
+
getLayoutContents: { name: "getLayoutContents", dataDecoder: getContentsOptionsDecoder, resultDecoder: layoutContentsResultDecoder },
|
|
4667
4695
|
export: { name: "export", dataDecoder: getAllLayoutsConfigDecoder, resultDecoder: allLayoutsFullConfigDecoder },
|
|
4668
4696
|
import: { name: "import", dataDecoder: layoutsImportConfigDecoder },
|
|
4669
4697
|
remove: { name: "remove", dataDecoder: simpleLayoutConfigDecoder },
|
|
@@ -4719,6 +4747,7 @@ class LayoutsController {
|
|
|
4719
4747
|
const api = {
|
|
4720
4748
|
get: this.get.bind(this),
|
|
4721
4749
|
getAll: this.getAll.bind(this),
|
|
4750
|
+
getLayoutContents: this.getLayoutContents.bind(this),
|
|
4722
4751
|
getCurrentLayout: this.getCurrentLayout.bind(this),
|
|
4723
4752
|
export: this.exportLayouts.bind(this),
|
|
4724
4753
|
import: this.importLayouts.bind(this),
|
|
@@ -4769,6 +4798,15 @@ class LayoutsController {
|
|
|
4769
4798
|
const result = await this.bridge.send("layouts", operations$8.getAll, { type });
|
|
4770
4799
|
return result.summaries;
|
|
4771
4800
|
}
|
|
4801
|
+
async getLayoutContents(options) {
|
|
4802
|
+
runDecoderWithIOError(getContentsOptionsDecoder, options);
|
|
4803
|
+
const { name, type } = options;
|
|
4804
|
+
if (type !== "Workspace" && type !== "Global") {
|
|
4805
|
+
return ioError.raiseError(`getLayoutContents is only supported for Workspace and Global layouts, but got type "${type}"`);
|
|
4806
|
+
}
|
|
4807
|
+
const result = await this.bridge.send("layouts", operations$8.getLayoutContents, { name, type }, undefined, { includeOperationCheck: true });
|
|
4808
|
+
return result.contents;
|
|
4809
|
+
}
|
|
4772
4810
|
async exportLayouts(type) {
|
|
4773
4811
|
runDecoderWithIOError(layoutTypeDecoder, type);
|
|
4774
4812
|
const result = await this.bridge.send("layouts", operations$8.export, { type });
|
|
@@ -4948,7 +4986,7 @@ const operations$7 = {
|
|
|
4948
4986
|
clear: { name: "clear" },
|
|
4949
4987
|
clearAll: { name: "clearAll" },
|
|
4950
4988
|
clearOld: { name: "clearOld" },
|
|
4951
|
-
configure: { name: "configure", dataDecoder: notificationsConfigurationProtocolDecoder },
|
|
4989
|
+
configure: { name: "configure", dataDecoder: notificationsConfigurationProtocolDecoder, resultDecoder: strictNotificationsConfigurationProtocolDecoder },
|
|
4952
4990
|
getConfiguration: { name: "getConfiguration", resultDecoder: strictNotificationsConfigurationProtocolDecoder },
|
|
4953
4991
|
getActiveCount: { name: "getActiveCount", resultDecoder: activeNotificationsCountChangeDecoder },
|
|
4954
4992
|
configurationChanged: { name: "configurationChanged", resultDecoder: strictNotificationsConfigurationProtocolDecoder },
|
|
@@ -5092,7 +5130,8 @@ class NotificationsController {
|
|
|
5092
5130
|
}
|
|
5093
5131
|
async configure(config) {
|
|
5094
5132
|
const verifiedConfig = runDecoderWithIOError(notificationsConfigurationDecoder, config);
|
|
5095
|
-
await this.bridge.send("notifications", operations$7.configure, { configuration: verifiedConfig }, undefined, { includeOperationCheck: true });
|
|
5133
|
+
const response = await this.bridge.send("notifications", operations$7.configure, { configuration: verifiedConfig }, undefined, { includeOperationCheck: true });
|
|
5134
|
+
return response.configuration;
|
|
5096
5135
|
}
|
|
5097
5136
|
async getConfiguration() {
|
|
5098
5137
|
const response = await this.bridge.send("notifications", operations$7.getConfiguration, undefined, undefined, { includeOperationCheck: true });
|
|
@@ -5748,12 +5787,14 @@ class ChannelsController {
|
|
|
5748
5787
|
return this.changed(callback);
|
|
5749
5788
|
}
|
|
5750
5789
|
async leave(config = {}) {
|
|
5751
|
-
runDecoderWithIOError(
|
|
5752
|
-
|
|
5790
|
+
const decodedConfig = runDecoderWithIOError(leaveChannelsConfigDecoder, config);
|
|
5791
|
+
const channelName = typeof decodedConfig === "string" ? undefined : decodedConfig.channel;
|
|
5792
|
+
const windowId = typeof decodedConfig === "string" ? decodedConfig : decodedConfig.windowId;
|
|
5793
|
+
if (channelName) {
|
|
5753
5794
|
const channelNames = this.getAllChannelNames();
|
|
5754
|
-
runDecoderWithIOError(channelNameDecoder(channelNames),
|
|
5795
|
+
runDecoderWithIOError(channelNameDecoder(channelNames), channelName);
|
|
5755
5796
|
}
|
|
5756
|
-
const leaveData = { channelName
|
|
5797
|
+
const leaveData = { channelName, windowId: windowId ?? this.myWindowId };
|
|
5757
5798
|
await this.bridge.send("channels", operations$5.leaveChannel, leaveData, undefined, { includeOperationCheck: true });
|
|
5758
5799
|
}
|
|
5759
5800
|
async handleAppManagerInitialChannelId(channel) {
|
|
@@ -5967,11 +6008,8 @@ class ChannelsController {
|
|
|
5967
6008
|
}
|
|
5968
6009
|
return channelContext;
|
|
5969
6010
|
}
|
|
5970
|
-
async getMyChannels() {
|
|
5971
|
-
return Promise.all(this.storage.channels.map((channelName) =>
|
|
5972
|
-
const contextName = this.createContextName(channelName);
|
|
5973
|
-
return this.contexts.get(contextName);
|
|
5974
|
-
}));
|
|
6011
|
+
async getMyChannels(options) {
|
|
6012
|
+
return Promise.all(this.storage.channels.map((channelName) => this.get(channelName, options)));
|
|
5975
6013
|
}
|
|
5976
6014
|
myChannels() {
|
|
5977
6015
|
return this.storage.channels;
|
|
@@ -6139,12 +6177,13 @@ class ChannelsController {
|
|
|
6139
6177
|
windowId: restrictions.windowId ?? this.myWindowId
|
|
6140
6178
|
}
|
|
6141
6179
|
};
|
|
6142
|
-
|
|
6180
|
+
await this.bridge.send("channels", operations$5.restrictAll, configData, undefined, { includeOperationCheck: true });
|
|
6143
6181
|
}
|
|
6144
6182
|
async handleRestrictAll({ restrictions }) {
|
|
6145
6183
|
const currentChannel = await this.getMy();
|
|
6146
6184
|
if (!currentChannel) {
|
|
6147
|
-
|
|
6185
|
+
this.updateAllRestrictions(restrictions);
|
|
6186
|
+
return;
|
|
6148
6187
|
}
|
|
6149
6188
|
const prevReadAllowed = this.isAllowedByRestrictions(currentChannel.name, "read");
|
|
6150
6189
|
this.updateAllRestrictions(restrictions);
|
|
@@ -7777,7 +7816,7 @@ class IoC {
|
|
|
7777
7816
|
}
|
|
7778
7817
|
}
|
|
7779
7818
|
|
|
7780
|
-
var version$1 = "4.
|
|
7819
|
+
var version$1 = "4.5.0";
|
|
7781
7820
|
|
|
7782
7821
|
const setupGlobalSystem = (io, bridge) => {
|
|
7783
7822
|
return {
|
|
@@ -9210,9 +9249,9 @@ class MessageReplayerImpl {
|
|
|
9210
9249
|
}
|
|
9211
9250
|
}
|
|
9212
9251
|
|
|
9213
|
-
/* @ts-self-types="./index.d.ts" */
|
|
9214
9252
|
let urlAlphabet =
|
|
9215
9253
|
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
|
|
9254
|
+
|
|
9216
9255
|
let nanoid = (size = 21) => {
|
|
9217
9256
|
let id = '';
|
|
9218
9257
|
let i = size | 0;
|
|
@@ -9766,6 +9805,10 @@ class WebPlatformTransport {
|
|
|
9766
9805
|
return window.name.substring(0, window.name.indexOf("#wsp"));
|
|
9767
9806
|
}
|
|
9768
9807
|
if (window !== window.top) {
|
|
9808
|
+
const ifrIndex = window.name.indexOf("#ifr");
|
|
9809
|
+
if (ifrIndex !== -1) {
|
|
9810
|
+
return window.name.substring(0, ifrIndex);
|
|
9811
|
+
}
|
|
9769
9812
|
return;
|
|
9770
9813
|
}
|
|
9771
9814
|
if (window.name?.includes("g42")) {
|
|
@@ -10974,7 +11017,7 @@ const ContextMessageReplaySpec = {
|
|
|
10974
11017
|
}
|
|
10975
11018
|
};
|
|
10976
11019
|
|
|
10977
|
-
var version = "6.
|
|
11020
|
+
var version = "6.11.0";
|
|
10978
11021
|
|
|
10979
11022
|
/*!
|
|
10980
11023
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
@@ -15549,7 +15592,7 @@ class GW3Bridge {
|
|
|
15549
15592
|
distExports.Traces.currentTracingState = ts;
|
|
15550
15593
|
}
|
|
15551
15594
|
const contextData = this._contextNameToData[name];
|
|
15552
|
-
ts.addData("DIAGNOSTIC", { data
|
|
15595
|
+
ts.addData("DIAGNOSTIC", { data });
|
|
15553
15596
|
ts.injectPropagationInfo(data);
|
|
15554
15597
|
if (!contextData || !contextData.isAnnounced) {
|
|
15555
15598
|
return this.createContext(name, data);
|
|
@@ -15951,6 +15994,10 @@ class GW3Bridge {
|
|
|
15951
15994
|
}
|
|
15952
15995
|
}
|
|
15953
15996
|
}
|
|
15997
|
+
const pi = distExports.Traces.extractPropagationInfo(delta, true) ||
|
|
15998
|
+
distExports.Traces.extractPropagationInfo(delta?.added, true) ||
|
|
15999
|
+
distExports.Traces.extractPropagationInfo(delta?.updated, true) ||
|
|
16000
|
+
distExports.Traces.extractPropagationInfo(delta?.reset, true);
|
|
15954
16001
|
for (const updateCallbackIndex in contextData.updateCallbacks) {
|
|
15955
16002
|
if (contextData.updateCallbacks.hasOwnProperty(updateCallbackIndex)) {
|
|
15956
16003
|
try {
|
|
@@ -15960,7 +16007,7 @@ class GW3Bridge {
|
|
|
15960
16007
|
...delta.updated,
|
|
15961
16008
|
...delta.reset
|
|
15962
16009
|
});
|
|
15963
|
-
updateCallback(deepClone(contextData.context), deltaArg, delta.removed, parseInt(updateCallbackIndex, 10), extraData,
|
|
16010
|
+
updateCallback(deepClone(contextData.context), deltaArg, delta.removed, parseInt(updateCallbackIndex, 10), extraData, pi);
|
|
15964
16011
|
}
|
|
15965
16012
|
catch (err) {
|
|
15966
16013
|
this._logger.debug("callback error: " + JSON.stringify(err));
|
|
@@ -17073,7 +17120,7 @@ Decoder.valueAt;
|
|
|
17073
17120
|
/** See `Decoder.succeed` */
|
|
17074
17121
|
Decoder.succeed;
|
|
17075
17122
|
/** See `Decoder.fail` */
|
|
17076
|
-
var fail
|
|
17123
|
+
var fail = Decoder.fail;
|
|
17077
17124
|
/** See `Decoder.lazy` */
|
|
17078
17125
|
Decoder.lazy;
|
|
17079
17126
|
|
|
@@ -17081,7 +17128,7 @@ const functionCheck = (input, propDescription) => {
|
|
|
17081
17128
|
const providedType = typeof input;
|
|
17082
17129
|
return providedType === "function" ?
|
|
17083
17130
|
anyJson() :
|
|
17084
|
-
fail
|
|
17131
|
+
fail(`The provided argument as ${propDescription} should be of type function, provided: ${providedType}`);
|
|
17085
17132
|
};
|
|
17086
17133
|
const nonEmptyStringDecoder = string().where((s) => s.length > 0, "Expected a non-empty string");
|
|
17087
17134
|
const nonNegativeNumberDecoder = number().where((num) => num >= 0, "Expected a non-negative number or 0");
|