Skip to content

Commit 4c85c4f

Browse files
committed
Merge branch 'main' into feat/recharts-v3
2 parents 84f7776 + dd5e5d9 commit 4c85c4f

File tree

380 files changed

+5950
-4543
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

380 files changed

+5950
-4543
lines changed

.github/ISSUE_TEMPLATE/documentation.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,4 @@ body:
4646
description: By submitting this issue, I confirm to follow the recommendation not to disclose any internal or sensitive information.
4747
options:
4848
- label: I’m not disclosing any internal or sensitive information.
49-
validations:
50-
required: true
49+
required: true

.github/ISSUE_TEMPLATE/feature-request.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,4 @@ body:
5454
description: By submitting this issue, I confirm to follow the recommendation not to disclose any internal or sensitive information.
5555
options:
5656
- label: I’m not disclosing any internal or sensitive information.
57-
validations:
58-
required: true
57+
required: true

.github/workflows/open-source-security.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ jobs:
1616
- uses: actions/checkout@v4
1717

1818
- name: artifactPrepareVersion
19-
uses: SAP/[email protected].0
19+
uses: SAP/[email protected].1
2020
with:
2121
step-name: artifactPrepareVersion
2222
flags: --versioningType cloud_noTag
2323

2424
- name: detectExecuteScan
25-
uses: SAP/[email protected].0
25+
uses: SAP/[email protected].1
2626
with:
2727
step-name: detectExecuteScan
2828
flags: '--token ${{ secrets.DETECT_TOKEN }}'

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ on:
1313
description: 'pre-release'
1414
required: false
1515
default: false
16+
skip_versioning:
17+
type: boolean
18+
description: 'Skip lerna version step'
19+
required: false
20+
default: false
1621

1722
jobs:
1823
test:
@@ -81,6 +86,7 @@ jobs:
8186
yarn install --immutable
8287
8388
- name: version
89+
if: github.event.inputs.skip_versioning != 'true'
8490
run: |
8591
npm config set //registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}
8692

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,8 @@ packages/main/scripts/wrapperGeneration/json
2626
packages/main/tmp
2727
packages/*/src/generated/
2828

29+
cypress/downloads
30+
2931
.nx
32+
33+
debug-storybook.log

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22.17.0
1+
22.18.0

.storybook/components/ArgTypesWithNote.tsx

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { ArgTypes } from '@storybook/blocks';
1+
import { DomRefTable } from '@sb/components/DomRefTable.js';
2+
import { ArgTypes, type Controls } from '@storybook/addon-docs/blocks';
23
import MessageStripDesign from '@ui5/webcomponents/dist/types/MessageStripDesign.js';
34
import { MessageStrip } from '@ui5/webcomponents-react';
45
import type { ComponentProps, ReactNode } from 'react';
@@ -12,20 +13,34 @@ interface ArgTypesWithNotePropTypes {
1213
* Defaults to: "This component supports all HTML attributes."
1314
*/
1415
noteText?: ReactNode | ReactNode[];
16+
/**
17+
* If `true` all headings are rendered as `Heading`s instead of `Subheading`s.
18+
*/
19+
isHeading?: boolean;
20+
/**
21+
* Story meta module.
22+
*/
23+
metaOf: ComponentProps<typeof Controls>['of'];
1524
}
1625

1726
export function ArgTypesWithNote(props: ComponentProps<typeof ArgTypes> & ArgTypesWithNotePropTypes) {
18-
const { hideHTMLPropsNote, noteText, ...rest } = props;
27+
const { hideHTMLPropsNote, noteText, isHeading, metaOf, ...rest } = props;
1928

2029
if (hideHTMLPropsNote) {
21-
return <ArgTypes {...rest} />;
30+
return (
31+
<>
32+
<ArgTypes {...rest} />
33+
<DomRefTable of={rest.of} metaOf={metaOf} isSubheading={!isHeading} />
34+
</>
35+
);
2236
}
2337
return (
2438
<div className={classes.tableContainer}>
2539
<MessageStrip design={MessageStripDesign.Information} hideCloseButton className={classes.strip}>
2640
{noteText ?? 'This component supports all HTML attributes.'}
2741
</MessageStrip>
2842
<ArgTypes {...rest} />
43+
<DomRefTable of={rest.of} metaOf={metaOf} isSubheading={!isHeading} />
2944
</div>
3045
);
3146
}

.storybook/components/CommandsAndQueries.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Heading, Markdown } from '@storybook/blocks';
1+
import { Heading, Markdown } from '@storybook/addon-docs/blocks';
22
import { Tag as WCRTag } from '@ui5/webcomponents-react';
33
import dedent from 'dedent';
44
import { Fragment } from 'react';

.storybook/components/ControlsWithNote.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Controls } from '@storybook/blocks';
1+
import { Controls } from '@storybook/addon-docs/blocks';
22
import MessageStripDesign from '@ui5/webcomponents/dist/types/MessageStripDesign.js';
33
import { MessageStrip } from '@ui5/webcomponents-react';
44
import type { ComponentProps, ReactNode } from 'react';
@@ -26,7 +26,7 @@ export function ControlsWithNote(props: ComponentProps<typeof Controls> & Contro
2626
</MessageStrip>
2727
)}
2828
<Controls {...rest} />
29-
<DomRefTable />
29+
<DomRefTable of={props.of} />
3030
</div>
3131
);
3232
}

.storybook/components/DocsHeader.tsx

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { Description, DocsContext, Subtitle, Title } from '@storybook/addon-docs';
1+
import type { Controls } from '@storybook/addon-docs/blocks';
2+
import { Description, Subtitle, Title, useOf } from '@storybook/addon-docs/blocks';
23
import ButtonDesign from '@ui5/webcomponents/dist/types/ButtonDesign.js';
34
import MessageStripDesign from '@ui5/webcomponents/dist/types/MessageStripDesign.js';
45
import copyIcon from '@ui5/webcomponents-icons/dist/copy.js';
@@ -13,21 +14,14 @@ import {
1314
ThemeProvider,
1415
} from '@ui5/webcomponents-react';
1516
import { clsx } from 'clsx';
16-
import { useContext } from 'react';
17+
import type { ComponentProps } from 'react';
1718
import { useGetSubComponentsOfModule } from '../utils';
1819
import classes from './DocsHeader.module.css';
1920
import { GitHubLogo } from './GitHub-Mark';
2021
import { Import } from './Import';
2122
import { TableOfContent } from './TableOfContent';
2223

23-
const Links = () => {
24-
const docsContext = useContext(DocsContext);
25-
const isChart = docsContext.componentStories().at(0).id.startsWith('charts-');
26-
27-
// const filePath = docsContext.parameters.fileName.replace(/^\.\//, '');
28-
// const folderPath = filePath.substr(0, filePath.lastIndexOf('/'));
29-
30-
// const githubUrl = `https://github.com/SAP/ui5-webcomponents-react/tree/main/${folderPath}`;
24+
const Links = ({ isChart }: { isChart?: boolean }) => {
3125
const githubUrl = `https://github.com/SAP/ui5-webcomponents-react`;
3226

3327
const packageName = `@ui5/webcomponents-react${isChart ? '-charts' : ''}`;
@@ -50,14 +44,15 @@ interface InfoTableProps {
5044
mergeSubComponents?: boolean;
5145
isChart?: boolean;
5246
experimental?: boolean;
47+
of: ComponentProps<typeof Controls>['of'];
5348
}
5449

55-
export const InfoTable = ({ since, subComponents, mergeSubComponents }: InfoTableProps) => {
56-
const context = useContext(DocsContext);
57-
const groups = context.componentStories().at(0).kind.split('/');
58-
const moduleName = groups[groups.length - 1].replace('(experimental)', '').trim();
50+
export const InfoTable = ({ of, since, subComponents, mergeSubComponents }: InfoTableProps) => {
51+
const context = useOf<'meta'>(of);
52+
const { csfFile, preparedMeta } = context;
53+
const moduleName = csfFile.meta.component.displayName;
5954

60-
const wcSubComponents = useGetSubComponentsOfModule(moduleName.replace('V2', ''));
55+
const wcSubComponents = useGetSubComponentsOfModule(moduleName.replace('V2', ''), preparedMeta.tags);
6156
const subComps = mergeSubComponents
6257
? [...(subComponents ?? []), ...(wcSubComponents ?? [])]
6358
: (subComponents ?? wcSubComponents);
@@ -81,7 +76,7 @@ export const InfoTable = ({ since, subComponents, mergeSubComponents }: InfoTabl
8176
<Label>Usage</Label>
8277
</th>
8378
<td data-import-cell={supportsClipboardApi}>
84-
<Import />
79+
<Import moduleNames={[moduleName]} componentId={preparedMeta.componentId} />
8580
{supportsClipboardApi && (
8681
<Button
8782
design={ButtonDesign.Transparent}
@@ -110,7 +105,7 @@ export const InfoTable = ({ since, subComponents, mergeSubComponents }: InfoTabl
110105
<Label>Subcomponents</Label>
111106
</th>
112107
<td data-import-cell={supportsClipboardApi}>
113-
<Import moduleNames={subComps} />
108+
<Import moduleNames={subComps} componentId={preparedMeta.componentId} />
114109
{supportsClipboardApi && (
115110
<Button
116111
design={ButtonDesign.Transparent}
@@ -129,17 +124,17 @@ export const InfoTable = ({ since, subComponents, mergeSubComponents }: InfoTabl
129124
);
130125
};
131126

132-
export const DocsHeader = ({ since, subComponents, mergeSubComponents, isChart, experimental }: InfoTableProps) => {
127+
export const DocsHeader = ({ of, since, subComponents, mergeSubComponents, isChart, experimental }: InfoTableProps) => {
133128
return (
134129
<ThemeProvider>
135130
<FlexBox alignItems={FlexBoxAlignItems.Center} className={classes.titleRow}>
136131
<Title />
137132
{experimental && <Label className={classes.experimentalLabel}>experimental</Label>}
138133
<span style={{ flexGrow: 1 }} />
139-
<Links />
134+
<Links isChart={isChart} />
140135
</FlexBox>
141136
<Subtitle />
142-
<InfoTable since={since} subComponents={subComponents} mergeSubComponents={mergeSubComponents} />
137+
<InfoTable of={of} since={since} subComponents={subComponents} mergeSubComponents={mergeSubComponents} />
143138
<TableOfContent />
144139
<Description />
145140
{isChart && (

0 commit comments

Comments
 (0)