From f43be17e1536e007d1a37d800a72570d8f04bfc2 Mon Sep 17 00:00:00 2001 From: Sean Monahan Date: Thu, 1 Sep 2022 13:23:54 -0700 Subject: [PATCH] Mark GroupedListV2 as unstable --- .../GroupedListV2.Basic.Example.tsx | 3 +- .../GroupedListV2.Custom.Example.tsx | 3 +- .../GroupedListV2.CustomCheckbox.Example.tsx | 2 +- packages/react/etc/react.api.md | 53 ------------------- packages/react/package.json | 5 ++ packages/react/src/GroupedListV2.ts | 2 +- .../components/GroupedList/GroupedListV2.ts | 4 +- .../react/src/components/GroupedList/index.ts | 3 -- 8 files changed, 14 insertions(+), 61 deletions(-) diff --git a/packages/react-examples/src/react/GroupedList/GroupedListV2.Basic.Example.tsx b/packages/react-examples/src/react/GroupedList/GroupedListV2.Basic.Example.tsx index 6e42daf6b20678..8528c6e4b02465 100644 --- a/packages/react-examples/src/react/GroupedList/GroupedListV2.Basic.Example.tsx +++ b/packages/react-examples/src/react/GroupedList/GroupedListV2.Basic.Example.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; -import { GroupedListV2, IGroup } from '@fluentui/react/lib/GroupedList'; +import { IGroup } from '@fluentui/react/lib/GroupedList'; +import { GroupedListV2_unstable as GroupedListV2 } from '@fluentui/react/lib/GroupedListV2'; import { IColumn, DetailsRow } from '@fluentui/react/lib/DetailsList'; import { Selection, SelectionMode, SelectionZone } from '@fluentui/react/lib/Selection'; import { Toggle, IToggleStyles } from '@fluentui/react/lib/Toggle'; diff --git a/packages/react-examples/src/react/GroupedList/GroupedListV2.Custom.Example.tsx b/packages/react-examples/src/react/GroupedList/GroupedListV2.Custom.Example.tsx index 9554250a929035..1b9c9840411274 100644 --- a/packages/react-examples/src/react/GroupedList/GroupedListV2.Custom.Example.tsx +++ b/packages/react-examples/src/react/GroupedList/GroupedListV2.Custom.Example.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; -import { GroupedListV2, IGroup, IGroupHeaderProps, IGroupFooterProps } from '@fluentui/react/lib/GroupedList'; +import { IGroup, IGroupHeaderProps, IGroupFooterProps } from '@fluentui/react/lib/GroupedList'; +import { GroupedListV2_unstable as GroupedListV2 } from '@fluentui/react/lib/GroupedListV2'; import { Link } from '@fluentui/react/lib/Link'; import { createListItems, createGroups, IExampleItem } from '@fluentui/example-data'; import { getTheme, mergeStyleSets, IRawStyle } from '@fluentui/react/lib/Styling'; diff --git a/packages/react-examples/src/react/GroupedList/GroupedListV2.CustomCheckbox.Example.tsx b/packages/react-examples/src/react/GroupedList/GroupedListV2.CustomCheckbox.Example.tsx index 3140675bfab0d2..fc71599f6083c8 100644 --- a/packages/react-examples/src/react/GroupedList/GroupedListV2.CustomCheckbox.Example.tsx +++ b/packages/react-examples/src/react/GroupedList/GroupedListV2.CustomCheckbox.Example.tsx @@ -1,12 +1,12 @@ import * as React from 'react'; import { GroupHeader, - GroupedListV2, IGroupHeaderCheckboxProps, IGroupHeaderProps, IGroupRenderProps, IGroup, } from '@fluentui/react/lib/GroupedList'; +import { GroupedListV2_unstable as GroupedListV2 } from '@fluentui/react/lib/GroupedListV2'; import { IColumn, IObjectWithKey, DetailsRow } from '@fluentui/react/lib/DetailsList'; import { FocusZone } from '@fluentui/react/lib/FocusZone'; import { Selection, SelectionMode, SelectionZone } from '@fluentui/react/lib/Selection'; diff --git a/packages/react/etc/react.api.md b/packages/react/etc/react.api.md index 560007c37ee535..b9659f9fbbd293 100644 --- a/packages/react/etc/react.api.md +++ b/packages/react/etc/react.api.md @@ -2012,31 +2012,6 @@ export class GroupedListSection extends React_2.Component; - -// @public (undocumented) -export const GroupedListV2FC: React_2.FC; - -// @public (undocumented) -export class GroupedListV2Wrapper extends React_2.Component implements IGroupedList { - constructor(props: IGroupedListProps); - // (undocumented) - static displayName: string; - // (undocumented) - forceUpdate(): void; - // (undocumented) - static getDerivedStateFromProps(nextProps: IGroupedListProps, previousState: IGroupedListV2State): IGroupedListV2State; - // (undocumented) - getStartItemIndexInView(): number; - // (undocumented) - render(): JSX.Element; - // (undocumented) - scrollToIndex(index: number, measureItem?: (itemIndex: number) => number, scrollToMode?: ScrollToMode): void; - // (undocumented) - toggleCollapseAll(allCollapsed: boolean): void; -} - // @public (undocumented) export const GroupFooter: React_2.FunctionComponent; @@ -6142,34 +6117,6 @@ export interface IGroupedListStyles { root: IStyle; } -// @public (undocumented) -export interface IGroupedListV2Props extends IGroupedListProps { - // (undocumented) - groupExpandedVersion: {}; - // (undocumented) - listRef: React_2.Ref; - // (undocumented) - version: {}; -} - -// @public (undocumented) -export interface IGroupedListV2State { - // (undocumented) - compact?: IGroupedListProps['compact']; - // (undocumented) - groupExpandedVersion: {}; - // (undocumented) - groups?: IGroup[]; - // (undocumented) - items?: IGroupedListProps['items']; - // (undocumented) - listProps?: IGroupedListProps['listProps']; - // (undocumented) - selectionMode?: IGroupedListProps['selectionMode']; - // (undocumented) - version: {}; -} - // @public (undocumented) export interface IGroupFooterProps extends IGroupDividerProps { styles?: IStyleFunctionOrObject; diff --git a/packages/react/package.json b/packages/react/package.json index 58f25078f2724f..d3ff60af4bae85 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -507,6 +507,11 @@ "import": "./lib/components/GroupedList/GroupShowAll.styles.js", "require": "./lib-commonjs/components/GroupedList/GroupShowAll.styles.js" }, + "./lib/GroupedListV2": { + "types": "./lib/GroupedList.d.ts", + "import": "./lib/GroupedListV2.js", + "require": "./lib-commonjs/GroupedListV2.js" + }, "./lib/HoverCard": { "types": "./lib/HoverCard.d.ts", "import": "./lib/HoverCard.js", diff --git a/packages/react/src/GroupedListV2.ts b/packages/react/src/GroupedListV2.ts index c55c281b2c37c2..6c257b794af247 100644 --- a/packages/react/src/GroupedListV2.ts +++ b/packages/react/src/GroupedListV2.ts @@ -1 +1 @@ -export * from './components/GroupedList/index'; +export * from './components/GroupedList/GroupedListV2'; diff --git a/packages/react/src/components/GroupedList/GroupedListV2.ts b/packages/react/src/components/GroupedList/GroupedListV2.ts index 1007927900e01c..a80913cac28594 100644 --- a/packages/react/src/components/GroupedList/GroupedListV2.ts +++ b/packages/react/src/components/GroupedList/GroupedListV2.ts @@ -4,7 +4,7 @@ import { getStyles } from './GroupedList.styles'; import { GroupedListV2Wrapper } from './GroupedListV2.base'; import type { IGroupedListProps, IGroupedListStyles, IGroupedListStyleProps } from './GroupedList.types'; -export const GroupedListV2: React.FunctionComponent = styled< +const GroupedListV2: React.FunctionComponent = styled< IGroupedListProps, IGroupedListStyleProps, IGroupedListStyles @@ -12,4 +12,6 @@ export const GroupedListV2: React.FunctionComponent = styled< scope: 'GroupedListV2', }); +export { GroupedListV2 as GroupedListV2_unstable }; + export type { IGroupedListProps }; diff --git a/packages/react/src/components/GroupedList/index.ts b/packages/react/src/components/GroupedList/index.ts index 9aa720d297d2ba..b012ba695051b1 100644 --- a/packages/react/src/components/GroupedList/index.ts +++ b/packages/react/src/components/GroupedList/index.ts @@ -10,6 +10,3 @@ export * from './GroupedListSection'; export type { IGroupHeaderStyleProps, IGroupHeaderStyles, IGroupHeaderCheckboxProps } from './GroupHeader.types'; export type { IGroupFooterStyleProps, IGroupFooterStyles } from './GroupFooter.types'; export type { IGroupShowAllStyleProps, IGroupShowAllStyles } from './GroupShowAll.types'; - -export * from './GroupedListV2'; -export * from './GroupedListV2.base';