@forge/bridge 5.17.0-next.4 → 5.17.0-next.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @forge/bridge
2
2
 
3
+ ## 5.17.0-next.6
4
+
5
+ ### Minor Changes
6
+
7
+ - fc55c83: Add `getFrameDispatch` method to `view` module. The method fetches the dispatch prop passed to Frame inside the frame resource.
8
+
9
+ ## 5.17.0-next.5
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [b7b1f36]
14
+ - @forge/manifest@12.8.1-next.2
15
+
3
16
  ## 5.17.0-next.4
4
17
 
5
18
  ### Minor Changes
@@ -0,0 +1,4 @@
1
+ declare type DispatchFunction = (...args: any[]) => any;
2
+ export declare const getFrameDispatch: <T extends DispatchFunction>() => Promise<T | undefined>;
3
+ export {};
4
+ //# sourceMappingURL=getFrameDispatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFrameDispatch.d.ts","sourceRoot":"","sources":["../../src/view/getFrameDispatch.ts"],"names":[],"mappings":"AAEA,aAAK,gBAAgB,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAIhD,eAAO,MAAM,gBAAgB,0DAE5B,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFrameDispatch = void 0;
4
+ const bridge_1 = require("../bridge");
5
+ const callBridge = (0, bridge_1.getCallBridge)();
6
+ const getFrameDispatch = async () => {
7
+ return await callBridge('getFrameDispatch');
8
+ };
9
+ exports.getFrameDispatch = getFrameDispatch;
@@ -6,6 +6,7 @@ export declare const view: {
6
6
  refresh: (payload?: any) => Promise<void>;
7
7
  createHistory: () => Promise<import("history").History>;
8
8
  getContext: () => Promise<import("../types").FullContext>;
9
+ getFrameDispatch: <T extends (...args: any[]) => any>() => Promise<T | undefined>;
9
10
  theme: {
10
11
  enable: () => Promise<void>;
11
12
  };
@@ -1 +1 @@
1
- {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../src/view/view.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;CAYhB,CAAC"}
1
+ {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../src/view/view.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;CAahB,CAAC"}
package/out/view/view.js CHANGED
@@ -12,6 +12,7 @@ const theme_1 = require("./theme");
12
12
  const emitReadyEvent_1 = require("./emitReadyEvent");
13
13
  const adf_renderer_1 = require("./adf-renderer");
14
14
  const onClose_1 = require("./onClose");
15
+ const getFrameDispatch_1 = require("./getFrameDispatch");
15
16
  exports.view = {
16
17
  submit: submit_1.submit,
17
18
  close: close_1.close,
@@ -20,6 +21,7 @@ exports.view = {
20
21
  refresh: refresh_1.refresh,
21
22
  createHistory: createHistory_1.createHistory,
22
23
  getContext: getContext_1.getContext,
24
+ getFrameDispatch: getFrameDispatch_1.getFrameDispatch,
23
25
  theme: theme_1.theme,
24
26
  changeWindowTitle: changeWindowTitle_1.changeWindowTitle,
25
27
  emitReadyEvent: emitReadyEvent_1.emitReadyEvent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/bridge",
3
- "version": "5.17.0-next.4",
3
+ "version": "5.17.0-next.6",
4
4
  "description": "Forge bridge API for custom UI apps",
5
5
  "author": "Atlassian",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",
@@ -19,7 +19,7 @@
19
19
  "@forge/i18n": "0.0.7",
20
20
  "@forge/resolver": "1.8.0",
21
21
  "@types/history": "^4.7.11",
22
- "@forge/manifest": "12.8.1-next.1",
22
+ "@forge/manifest": "12.8.1-next.2",
23
23
  "@types/iframe-resizer": "^3.5.8",
24
24
  "iframe-resizer": "^4.4.5"
25
25
  },