@frontify/guideline-blocks-settings 0.31.0 → 0.31.1

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,14 @@
1
1
  # @frontify/guideline-blocks-settings
2
2
 
3
+ ## 0.31.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#708](https://github.com/Frontify/brand-sdk/pull/708) [`e2a0023`](https://github.com/Frontify/brand-sdk/commit/e2a0023256001dcc64a597f6dcd9df66a1c9f186) Thanks [@ragi96](https://github.com/ragi96)! - feat: add support for @frontify/app-bridge 4.0.0-alpha.0
8
+
9
+ - Updated dependencies [[`c98d8c4`](https://github.com/Frontify/brand-sdk/commit/c98d8c414b2cdd00d4945f0c29581370b0a7daa0)]:
10
+ - @frontify/app-bridge@3.0.4
11
+
3
12
  ## 0.31.0
4
13
 
5
14
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontify/guideline-blocks-settings",
3
- "version": "0.31.0",
3
+ "version": "0.31.1",
4
4
  "description": "Provides types and helpers for the guideline block development",
5
5
  "sideEffects": false,
6
6
  "main": "dist/index.umd.js",
@@ -43,6 +43,12 @@ const isPre302Stub = async (appBridge: AppBridgeBlock): Promise<boolean> => {
43
43
  return context === undefined;
44
44
  };
45
45
 
46
+ const hasOpenAssetChooser = (
47
+ appBridge: AppBridgeBlock,
48
+ ): appBridge is AppBridgeBlock & { openAssetChooser: SinonStub } => {
49
+ return 'openAssetChooser' in appBridge;
50
+ };
51
+
46
52
  describe('Attachments', () => {
47
53
  it('renders attachments flyout if it is in edit mode', () => {
48
54
  mount(<Attachments appBridge={getAppBridgeBlockStub({ editorState: true })} />);
@@ -94,7 +100,7 @@ describe('Attachments', () => {
94
100
  editorState: true,
95
101
  });
96
102
 
97
- if (await isPre302Stub(appBridge)) {
103
+ if ((await isPre302Stub(appBridge)) && hasOpenAssetChooser(appBridge)) {
98
104
  (appBridge.openAssetChooser as SinonStub) = cy.stub().callsArgWith(0, AssetDummy.with(4));
99
105
  }
100
106