@forge/dashboards-bridge 0.2.1-next.0-experimental-2e302e1 → 0.2.2-experimental-04cc2b9
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 +39 -2
- package/out/bridge.d.ts +1 -1
- package/out/widgets/edit/onProductSave.js +1 -2
- package/out/widgets/edit/onSave.js +1 -2
- package/out/widgets/edit/onSaveError.js +1 -2
- package/out/widgets/edit/updateConfig.js +1 -2
- package/out/widgets/edit/utils/get-context-extension.d.ts +1 -1
- package/out/widgets/edit/utils/get-context-extension.d.ts.map +1 -1
- package/out/widgets/edit/utils/get-widget-edit-bridge.d.ts +1 -1
- package/out/widgets/types.d.ts +11 -11
- package/out/widgets/types.d.ts.map +1 -1
- package/out/widgets/view/setPreviewConfig.js +1 -2
- package/out/widgets/view/utils/get-widget-bridge.d.ts +1 -1
- package/package.json +13 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,49 @@
|
|
|
1
1
|
# @forge/dashboards-bridge
|
|
2
2
|
|
|
3
|
-
## 0.2.
|
|
3
|
+
## 0.2.2-experimental-04cc2b9
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- d9ef926: Adds support for TypeScript 5
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [b0b69a2]
|
|
12
|
+
- Updated dependencies [561f8f4]
|
|
13
|
+
- Updated dependencies [d9ef926]
|
|
14
|
+
- @forge/bridge@5.17.0-experimental-04cc2b9
|
|
15
|
+
|
|
16
|
+
## 0.2.2
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [3cf97c3]
|
|
21
|
+
- Updated dependencies [f7f06c8]
|
|
22
|
+
- Updated dependencies [dba5074]
|
|
23
|
+
- Updated dependencies [fc55c83]
|
|
24
|
+
- @forge/bridge@5.17.0
|
|
25
|
+
|
|
26
|
+
## 0.2.2-next.1
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- Updated dependencies [3cf97c3]
|
|
31
|
+
- @forge/bridge@5.17.0-next.1
|
|
32
|
+
|
|
33
|
+
## 0.2.2-next.0
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- Updated dependencies [dba5074]
|
|
38
|
+
- @forge/bridge@5.16.3-next.0
|
|
39
|
+
|
|
40
|
+
## 0.2.1
|
|
4
41
|
|
|
5
42
|
### Patch Changes
|
|
6
43
|
|
|
7
44
|
- Updated dependencies [7a300a9]
|
|
8
45
|
- Updated dependencies [951fcca]
|
|
9
|
-
- @forge/bridge@5.16.2
|
|
46
|
+
- @forge/bridge@5.16.2
|
|
10
47
|
|
|
11
48
|
## 0.2.1-next.0
|
|
12
49
|
|
package/out/bridge.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const getCallBridge: () => Window[
|
|
1
|
+
export declare const getCallBridge: () => Window["__bridge"]["callBridge"];
|
|
2
2
|
//# sourceMappingURL=bridge.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.onProductSave =
|
|
3
|
+
exports.onProductSave = onProductSave;
|
|
4
4
|
const errors_1 = require("../../errors");
|
|
5
5
|
const get_widget_edit_bridge_1 = require("./utils/get-widget-edit-bridge");
|
|
6
6
|
const get_context_extension_1 = require("./utils/get-context-extension");
|
|
@@ -14,4 +14,3 @@ async function onProductSave(onProductSave) {
|
|
|
14
14
|
throw new errors_1.BridgeAPIError('Unable to set widgetEdit.onProductSave: ' + err.message);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
exports.onProductSave = onProductSave;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.onSave =
|
|
3
|
+
exports.onSave = onSave;
|
|
4
4
|
const errors_1 = require("../../errors");
|
|
5
5
|
const get_widget_edit_bridge_1 = require("./utils/get-widget-edit-bridge");
|
|
6
6
|
const get_context_extension_1 = require("./utils/get-context-extension");
|
|
@@ -17,4 +17,3 @@ async function onSave(onSave) {
|
|
|
17
17
|
throw new errors_1.BridgeAPIError('Unable to set widgetEdit.onSave: ' + err.message);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
exports.onSave = onSave;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.onSaveError =
|
|
3
|
+
exports.onSaveError = onSaveError;
|
|
4
4
|
const errors_1 = require("../../errors");
|
|
5
5
|
const get_widget_edit_bridge_1 = require("./utils/get-widget-edit-bridge");
|
|
6
6
|
const get_context_extension_1 = require("./utils/get-context-extension");
|
|
@@ -14,4 +14,3 @@ async function onSaveError(onSaveError) {
|
|
|
14
14
|
throw new errors_1.BridgeAPIError('Unable to set widgetEdit.onSaveError: ' + err.message);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
exports.onSaveError = onSaveError;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateConfig =
|
|
3
|
+
exports.updateConfig = updateConfig;
|
|
4
4
|
const errors_1 = require("../../errors");
|
|
5
5
|
const get_widget_edit_bridge_1 = require("./utils/get-widget-edit-bridge");
|
|
6
6
|
async function updateConfig(config) {
|
|
@@ -12,4 +12,3 @@ async function updateConfig(config) {
|
|
|
12
12
|
throw new errors_1.BridgeAPIError('Unable to update config: ' + err.message);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
exports.updateConfig = updateConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Layout, WidgetConfig, WidgetContext, WidgetPlacement, Context } from '../../types';
|
|
2
|
-
export
|
|
2
|
+
export type WidgetContextExtension<Config extends WidgetConfig = WidgetConfig> = {
|
|
3
3
|
layout: Layout;
|
|
4
4
|
context: WidgetContext;
|
|
5
5
|
placement: WidgetPlacement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-context-extension.d.ts","sourceRoot":"","sources":["../../../../src/widgets/edit/utils/get-context-extension.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAGjG,
|
|
1
|
+
{"version":3,"file":"get-context-extension.d.ts","sourceRoot":"","sources":["../../../../src/widgets/edit/utils/get-context-extension.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAGjG,MAAM,MAAM,sBAAsB,CAAC,MAAM,SAAS,YAAY,GAAG,YAAY,IAAI;IAC/E,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,aAAa,CAAC;IACvB,SAAS,EAAE,eAAe,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAU,MAAM,SAAS,YAAY,OAAK,OAAO,CAAC;IACrF,SAAS,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAC1C,OAAO,EAAE,OAAO,CAAC;CAClB,CAMA,CAAC"}
|
|
@@ -2,6 +2,6 @@ export declare const getWidgetEditBridge: () => Promise<{
|
|
|
2
2
|
onSave: (onSave: import("../../types").OnSaveBridge) => void;
|
|
3
3
|
onProductSave: (onProductSave: import("../../types").OnProductSaveBridge) => void;
|
|
4
4
|
onSaveError: (onSaveError: import("../../types").OnSaveErrorBridge) => void;
|
|
5
|
-
updateConfig: (config: import("
|
|
5
|
+
updateConfig: (config: import("../..").WidgetConfig) => void;
|
|
6
6
|
}>;
|
|
7
7
|
//# sourceMappingURL=get-widget-edit-bridge.d.ts.map
|
package/out/widgets/types.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type WidgetConfig = Record<string, unknown>;
|
|
2
|
+
export type Layout = {
|
|
3
3
|
width: number;
|
|
4
4
|
height: number;
|
|
5
5
|
rowSpan?: 'xsmall' | 'small' | 'medium' | 'large';
|
|
6
6
|
columnSpan?: 3 | 4 | 6 | 8 | 12;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type WidgetContext = {
|
|
9
9
|
widgetId?: string;
|
|
10
10
|
dashboardId: string;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
12
|
+
export type WidgetPlacement = 'DASHBOARD_EDIT' | 'DASHBOARD_VIEW' | 'WIDGET_EDIT' | 'WIDGET_CREATE' | 'WIDGET_PREVIEW';
|
|
13
|
+
export type Context = Record<string, unknown>;
|
|
14
|
+
export type OnSave = (config: WidgetConfig, widgetContext: Omit<WidgetContext, 'widgetId'> & {
|
|
15
15
|
widgetId: string;
|
|
16
16
|
}, context: Context) => Promise<void>;
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
17
|
+
export type OnSaveBridge = (config: WidgetConfig, widgetId: string, context: Context) => Promise<void>;
|
|
18
|
+
export type OnProductSave = (config: WidgetConfig, widgetContext: WidgetContext, context: Context) => Promise<WidgetConfig | null | undefined>;
|
|
19
|
+
export type OnProductSaveBridge = (config: WidgetConfig) => Promise<WidgetConfig | null | undefined>;
|
|
20
|
+
export type OnSaveError = (error: Error, widgetContext: WidgetContext, context: Context) => void;
|
|
21
|
+
export type OnSaveErrorBridge = (error: Error) => void;
|
|
22
22
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/widgets/types.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/widgets/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEnD,MAAM,MAAM,MAAM,GAAG;IAInB,KAAK,EAAE,MAAM,CAAC;IAId,MAAM,EAAE,MAAM,CAAC;IAIf,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IAIlD,UAAU,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAK1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAIlB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAWF,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,aAAa,GAAG,eAAe,GAAG,gBAAgB,CAAC;AAEvH,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE9C,MAAM,MAAM,MAAM,GAAG,CACnB,MAAM,EAAE,YAAY,EACpB,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,EACrE,OAAO,EAAE,OAAO,KACb,OAAO,CAAC,IAAI,CAAC,CAAC;AACnB,MAAM,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAEvG,MAAM,MAAM,aAAa,GAAG,CAC1B,MAAM,EAAE,YAAY,EACpB,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,OAAO,KACb,OAAO,CAAC,YAAY,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAC9C,MAAM,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,YAAY,KAAK,OAAO,CAAC,YAAY,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAErG,MAAM,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;AACjG,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setPreviewConfig =
|
|
3
|
+
exports.setPreviewConfig = setPreviewConfig;
|
|
4
4
|
const errors_1 = require("../../errors");
|
|
5
5
|
const get_widget_bridge_1 = require("./utils/get-widget-bridge");
|
|
6
6
|
async function setPreviewConfig(previewConfig) {
|
|
@@ -12,4 +12,3 @@ async function setPreviewConfig(previewConfig) {
|
|
|
12
12
|
throw new errors_1.BridgeAPIError('Unable to set preview config: ' + err.message);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
exports.setPreviewConfig = setPreviewConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/dashboards-bridge",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2-experimental-04cc2b9",
|
|
4
4
|
"description": "Forge Dashboards custom bridge API",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
@@ -15,6 +15,17 @@
|
|
|
15
15
|
"registry": "https://packages.atlassian.com/api/npm/npm-public/"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@forge/bridge": "^5.
|
|
18
|
+
"@forge/bridge": "^5.17.0-experimental-04cc2b9"
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"typescript": ">=5.0.0"
|
|
22
|
+
},
|
|
23
|
+
"peerDependenciesMeta": {
|
|
24
|
+
"typescript": {
|
|
25
|
+
"optional": true
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"typescript": "5.9.2"
|
|
19
30
|
}
|
|
20
31
|
}
|