Skip to content

Commit 15c403c

Browse files
authored
feat(bp-assets): Bump BP assets to 4.39.0 (#4095)
* feat(bp-assets): Bump BP assets to 4.39.0 * feat(bp-assets): Update test snapshot * feat(bp-assets): Fix flow issue * feat(bp-assets): Fix flow error * feat(bp-assets): Fix test
1 parent 37c9cf0 commit 15c403c

File tree

16 files changed

+91
-41
lines changed

16 files changed

+91
-41
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
"@babel/template": "^7.24.7",
127127
"@babel/types": "^7.24.7",
128128
"@box/blueprint-web": "^10.3.1",
129-
"@box/blueprint-web-assets": "4.36.0",
129+
"@box/blueprint-web-assets": "^4.39.0",
130130
"@box/box-ai-agent-selector": "^0.31.0",
131131
"@box/box-ai-content-answers": "^0.124.1",
132132
"@box/cldr-data": "^34.2.0",

src/elements/content-explorer/stories/tests/MetadataView-visual.stories.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { http, HttpResponse } from 'msw';
2+
import type { Meta, StoryObj } from '@storybook/react';
23
import ContentExplorer from '../../ContentExplorer';
34
import { DEFAULT_HOSTNAME_API } from '../../../../constants';
45
import { mockMetadata, mockSchema } from '../../../common/__mocks__/mockMetadata';
@@ -34,15 +35,17 @@ const fieldsToShow = [
3435
];
3536
const defaultView = 'metadata'; // Required prop to paint the metadata view. If not provided, you'll get regular folder view.
3637

37-
export const metadataView = {
38+
type Story = StoryObj<typeof ContentExplorer>;
39+
40+
export const metadataView: Story = {
3841
args: {
3942
metadataQuery,
4043
fieldsToShow,
4144
defaultView,
4245
},
4346
};
4447

45-
export const withNewMetadataView = {
48+
export const withNewMetadataView: Story = {
4649
args: {
4750
metadataQuery,
4851
fieldsToShow,
@@ -55,7 +58,7 @@ export const withNewMetadataView = {
5558
},
5659
};
5760

58-
export default {
61+
const meta: Meta<typeof ContentExplorer> = {
5962
title: 'Elements/ContentExplorer/tests/ContentExplorer/visual/MetadataView',
6063
component: ContentExplorer,
6164
args: {
@@ -76,3 +79,5 @@ export default {
7679
},
7780
},
7881
};
82+
83+
export default meta;

src/elements/content-sidebar/MetadataInstanceEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
type JSONPatchOperations,
55
type MetadataTemplateInstance,
66
} from '@box/metadata-editor';
7-
import { type TaxonomyOptionsFetcher } from '@box/metadata-editor/dist/types/lib/components/metadata-editor-fields/components/metadata-taxonomy-field/types';
7+
import { TaxonomyOptionsFetcher } from '@box/metadata-editor/lib/components/metadata-editor-fields/components/metadata-taxonomy-field/types.js';
88
import React from 'react';
99
import {
1010
ERROR_CODE_METADATA_AUTOFILL_TIMEOUT,

src/elements/content-sidebar/SidebarNav.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import * as React from 'react';
88
import { injectIntl } from 'react-intl';
99
import type { IntlShape } from 'react-intl';
1010
import noop from 'lodash/noop';
11+
// $FlowFixMe
1112
import { BoxAiLogo } from '@box/blueprint-web-assets/icons/Logo';
13+
// $FlowFixMe
1214
import { Size6 } from '@box/blueprint-web-assets/tokens/tokens';
1315
import { usePromptFocus } from '@box/box-ai-content-answers';
1416
import AdditionalTabs from './additional-tabs';

src/elements/content-sidebar/additional-tabs/__tests__/__snapshots__/AdditionalTab.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ exports[`elements/content-sidebar/additional-tabs/AdditionalTab should render ic
4141
onClick={[Function]}
4242
type="button"
4343
>
44-
<SvgPlus />
44+
<ForwardRef(SvgPlus) />
4545
</PlainButton>
4646
</AdditionalTabTooltip>
4747
`;

src/elements/content-sidebar/stories/MetadataSidebarRedesign.stories.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import { type StoryObj } from '@storybook/react';
1+
import { type StoryObj, Meta } from '@storybook/react';
22
import { fn, userEvent, within } from '@storybook/test';
33
import React, { type ComponentProps } from 'react';
44
import { http, HttpResponse } from 'msw';
5+
import type { HttpHandler } from 'msw';
56
import MetadataSidebarRedesign from '../MetadataSidebarRedesign';
67
import ContentSidebar from '../ContentSidebar';
78
import {
@@ -32,7 +33,7 @@ const defaultMetadataSidebarProps: ComponentProps<typeof MetadataSidebarRedesign
3233
onSuccess: fn(),
3334
};
3435

35-
export default {
36+
const meta: Meta<typeof ContentSidebar> & { parameters: { msw: { handlers: HttpHandler[] } } } = {
3637
title: 'Elements/ContentSidebar/MetadataSidebarRedesign',
3738
component: ContentSidebar,
3839
args: {
@@ -66,6 +67,8 @@ export default {
6667
},
6768
};
6869

70+
export default meta;
71+
6972
export const Basic: StoryObj<typeof MetadataSidebarRedesign> = {
7073
play: async ({ canvasElement }) => {
7174
const canvas = within(canvasElement);

src/elements/content-sidebar/stories/__mocks__/TaxonomyMocks.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { http, HttpResponse } from 'msw';
2+
import type { HttpHandler } from 'msw';
23

34
import { DEFAULT_HOSTNAME_API } from '../../../../constants';
45
import { fileIdWithMetadata, mockFileRequest } from './MetadataSidebarRedesignedMocks';
@@ -395,7 +396,7 @@ export const mockSinglelevelTaxonomyNodes = {
395396
},
396397
};
397398

398-
export const taxonomyMockHandlers = [
399+
export const taxonomyMockHandlers: HttpHandler[] = [
399400
http.get(mockFileRequest.url, () => {
400401
return HttpResponse.json(mockFileRequest.response);
401402
}),

src/elements/content-sidebar/stories/tests/BoxAISidebar-visual.stories.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { expect, within } from '@storybook/test';
2-
import { type StoryObj } from '@storybook/react';
2+
import { type StoryObj, type Meta } from '@storybook/react';
33
import { http, HttpResponse } from 'msw';
4+
import type { HttpHandler } from 'msw';
45
import ContentSidebar from '../../ContentSidebar';
56
import BoxAISidebar from '../../BoxAISidebar';
67
import { mockFileRequest, mockUserRequest } from '../../../common/__mocks__/mockRequests';
@@ -25,7 +26,7 @@ export const basic: StoryObj<typeof BoxAISidebar> = {
2526
},
2627
};
2728

28-
export default {
29+
const meta: Meta<typeof ContentSidebar> & { parameters: { msw: { handlers: HttpHandler[] } } } = {
2930
title: 'Elements/ContentSidebar/BoxAISidebar/tests/visual-regression-tests',
3031
component: ContentSidebar,
3132
args: {
@@ -90,3 +91,5 @@ export default {
9091
},
9192
},
9293
};
94+
95+
export default meta;

src/elements/content-sidebar/stories/tests/ContentSidebar-e2e.stories.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// @flow
22
import { http, HttpResponse } from 'msw';
3+
import type { HttpHandler } from 'msw';
4+
import type { Meta } from '@storybook/react';
35
import ContentSidebar from '../../ContentSidebar';
46
import { mockFileRequest } from '../__mocks__/ContentSidebarMocks';
57
import { testFileIds } from '../../../../../test/support/constants';
@@ -33,7 +35,7 @@ export const fileVersion = {
3335
},
3436
};
3537

36-
export default {
38+
const meta: Meta<typeof ContentSidebar> & { parameters: { msw: { handlers: HttpHandler[] } } } = {
3739
title: 'Elements/ContentSidebar/tests/e2e',
3840
component: ContentSidebar,
3941
args: defaultArgs,
@@ -47,3 +49,5 @@ export default {
4749
},
4850
},
4951
};
52+
53+
export default meta;

src/elements/content-sidebar/stories/tests/MetadataSidebarRedesign-visual.stories.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { act, type ComponentProps } from 'react';
22
import { http, HttpResponse } from 'msw';
33
import { expect, userEvent, waitFor, within, fn, screen } from '@storybook/test';
4-
import { type StoryObj } from '@storybook/react';
4+
import { type StoryObj, Meta } from '@storybook/react';
5+
import type { HttpHandler } from 'msw';
56
import ContentSidebar from '../../ContentSidebar';
67
import MetadataSidebarRedesign from '../../MetadataSidebarRedesign';
78
import {
@@ -720,7 +721,7 @@ export const EditSinglelevelTaxonomy: StoryObj<typeof MetadataSidebarRedesign> =
720721
},
721722
};
722723

723-
export default {
724+
const meta: Meta<typeof ContentSidebar> & { parameters: { msw: { handlers: HttpHandler[] } } } = {
724725
title: 'Elements/ContentSidebar/MetadataSidebarRedesign/tests/visual-regression-tests',
725726
component: ContentSidebar,
726727
args: {
@@ -739,3 +740,5 @@ export default {
739740
},
740741
},
741742
};
743+
744+
export default meta;

0 commit comments

Comments
 (0)