Skip to content

Commit

Permalink
pnp#1763 Fix wrong FluentUI imports
Browse files Browse the repository at this point in the history
  • Loading branch information
raclettierer committed Mar 19, 2024
1 parent 534189f commit 8b94213
Show file tree
Hide file tree
Showing 23 changed files with 39 additions and 44 deletions.
2 changes: 1 addition & 1 deletion src/common/telemetry/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version: string = "3.17.0";
export const version: string = "3.17.0";
2 changes: 1 addition & 1 deletion src/controls/dynamicForm/dynamicField/DynamicField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { sp } from '@pnp/sp/presets/all';
import '@pnp/sp/webs';
import * as strings from 'ControlStrings';
import { ActionButton } from '@fluentui/react/lib/Button';
import { Dropdown, IDropdownOption, IDropdownProps } from '@fluentui/react/lib/components/Dropdown';
import { Dropdown, IDropdownOption, IDropdownProps } from '@fluentui/react/lib/Dropdown';
import { DatePicker } from '@fluentui/react/lib/DatePicker';
import { Icon } from '@fluentui/react/lib/Icon';
import { Image } from '@fluentui/react/lib/Image';
Expand Down
4 changes: 2 additions & 2 deletions src/controls/fieldCollectionData/FieldCollectionData.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from 'react';
import * as telemetry from '../../common/telemetry';
import { DefaultButton } from '@fluentui/react/lib/Button';
import { Panel, PanelType } from '@fluentui/react/lib/components/Panel';
import { Label } from '@fluentui/react/lib/components/Label';
import { Panel, PanelType } from '@fluentui/react/lib/Panel';
import { Label } from '@fluentui/react/lib/Label';
import { CollectionDataViewer } from './collectionDataViewer';
import { IFieldCollectionDataProps, IFieldCollectionDataState } from "./IFieldCollectionData";
import * as strings from 'ControlStrings';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import * as React from 'react';
import styles from '../FieldCollectionData.module.scss';
import { ICollectionDataItemProps } from './ICollectionDataItemProps';
import { ICollectionDataItemState } from './ICollectionDataItemState';
import { TextField } from '@fluentui/react/lib/components/TextField';
import { Icon } from '@fluentui/react/lib/components/Icon';
import { Link } from '@fluentui/react/lib/components/Link';
import { Checkbox } from '@fluentui/react/lib/components/Checkbox';
import { TextField } from '@fluentui/react/lib/TextField';
import { Icon } from '@fluentui/react/lib/Icon';
import { Link } from '@fluentui/react/lib/Link';
import { Checkbox } from '@fluentui/react/lib/Checkbox';
import * as strings from 'ControlStrings';
import { CustomCollectionFieldType, ICustomCollectionField } from '../ICustomCollectionField';
import { Dropdown, IDropdownOption } from '@fluentui/react/lib/components/Dropdown';
import { ComboBox, IComboBoxOption } from '@fluentui/react/lib/components/ComboBox';
import { Dropdown, IDropdownOption } from '@fluentui/react/lib/Dropdown';
import { ComboBox, IComboBoxOption } from '@fluentui/react/lib/ComboBox';
import { PeoplePicker, PrincipalType } from "../../peoplepicker";
import { Callout, DirectionalHint } from '@fluentui/react/lib/components/Callout';
import { Callout, DirectionalHint } from '@fluentui/react/lib/Callout';
import { CollectionIconField } from '../collectionIconField';
import { clone, findIndex, sortBy } from '@microsoft/sp-lodash-subset';
import { Guid } from '@microsoft/sp-core-library';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { ICollectionDataViewerProps } from './ICollectionDataViewerProps';
import { ICollectionDataViewerState } from './ICollectionDataViewerState';
import { CollectionDataItem } from '../collectionDataItem';
import { PrimaryButton, DefaultButton } from '@fluentui/react/lib/Button';
import { Icon } from '@fluentui/react/lib/components/Icon';
import { Icon } from '@fluentui/react/lib/Icon';
import * as strings from 'ControlStrings';
import { cloneDeep, sortBy, isEmpty, findIndex } from '@microsoft/sp-lodash-subset';
import { Pagination } from '../../pagination';
import { SearchBox } from '@fluentui/react/lib/components/SearchBox';
import { SearchBox } from '@fluentui/react/lib/SearchBox';
import { Guid } from '@microsoft/sp-core-library';

export class CollectionDataViewer extends React.Component<ICollectionDataViewerProps, ICollectionDataViewerState> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from 'react';
import styles from '../FieldCollectionData.module.scss';
import { ICollectionIconFieldProps } from '.';
import { TextField } from '@fluentui/react/lib/components/TextField';
import { Icon } from '@fluentui/react/lib/components/Icon';
import { TextField } from '@fluentui/react/lib/TextField';
import { Icon } from '@fluentui/react/lib/Icon';

export class CollectionIconField extends React.Component<ICollectionIconFieldProps, {}> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { css } from '@fluentui/react/lib/Utilities';
import clone from 'lodash/clone';
import { IExpandingCardProps } from '@fluentui/react/lib/HoverCard';
import { DirectionalHint } from '@fluentui/react/lib/common/DirectionalHint';
import { DirectionalHint } from '@fluentui/react/lib/Callout';
import { Persona, PersonaSize } from '@fluentui/react/lib/Persona';
import { IconButton, Button, ButtonType } from '@fluentui/react/lib/Button';
import { Spinner, SpinnerSize } from '@fluentui/react/lib/Spinner';
Expand Down
2 changes: 1 addition & 1 deletion src/controls/fileTypeIcon/FileTypeIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { findIndex } from '@microsoft/sp-lodash-subset';
import { IFileTypeIconProps, ApplicationType, ApplicationIconList, IconType, IconSizes, ImageSize, IImageResult, ICON_GENERIC_16, ICON_GENERIC_48, ICON_GENERIC_96, ImageInformation } from './IFileTypeIcon';
import * as telemetry from '../../common/telemetry';
import { Icon } from '@fluentui/react/lib/components/Icon';
import { Icon } from '@fluentui/react/lib/Icon';
import { ICON_GENERIC_20 } from '.';

const ICON_GENERIC = 'Page';
Expand Down
3 changes: 1 addition & 2 deletions src/controls/listItemPicker/ListItemPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import * as strings from 'ControlStrings';
import * as React from "react";
import SPservice from "../../services/SPService";
import { TagPicker } from '@fluentui/react/lib/Pickers';
import { ITag, TagPicker } from '@fluentui/react/lib/Pickers';
import { Label } from "@fluentui/react/lib/Label";
import { getId } from '@fluentui/react/lib/Utilities';
import { IListItemPickerProps } from "./IListItemPickerProps";
import { IListItemPickerState } from "./IListItemPickerState";
import * as telemetry from '../../common/telemetry';
import isEqual from 'lodash/isEqual';
import { ITag } from '@fluentui/react/lib/components/pickers/TagPicker/TagPicker.types';
import { SPHelper } from '../../common/utilities/SPHelper';
import { Guid } from "@microsoft/sp-core-library"

Expand Down
4 changes: 2 additions & 2 deletions src/controls/listPicker/ListPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { cloneDeep } from '@microsoft/sp-lodash-subset';
import { Dropdown, IDropdownOption, IDropdownProps } from '@fluentui/react/lib/components/Dropdown';
import { Spinner, SpinnerSize } from '@fluentui/react/lib/components/Spinner';
import { Dropdown, IDropdownOption, IDropdownProps } from '@fluentui/react/lib/Dropdown';
import { Spinner, SpinnerSize } from '@fluentui/react/lib/Spinner';
import * as React from 'react';

import * as telemetry from '../../common/telemetry';
Expand Down
2 changes: 1 addition & 1 deletion src/controls/listView/IListView.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IColumn, IGroup, SelectionMode, IDetailsRowProps } from '@fluentui/react/lib/components/DetailsList';
import { IColumn, IGroup, SelectionMode, IDetailsRowProps } from '@fluentui/react/lib/DetailsList';

export { SelectionMode };

Expand Down
2 changes: 1 addition & 1 deletion src/controls/listView/ListView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { IRenderFunction } from '@fluentui/react/lib/Utilities';
import { mergeStyleSets } from '@fluentui/react/lib/Styling';
import { DetailsList, DetailsListLayoutMode, Selection, SelectionMode, IGroup, IDetailsHeaderProps } from '@fluentui/react/lib/DetailsList';
import { IListViewProps, IListViewState, IViewField, IGrouping, GroupOrder } from './IListView';
import { IColumn, IGroupRenderProps } from '@fluentui/react/lib/components/DetailsList';
import { IColumn, IGroupRenderProps } from '@fluentui/react/lib/DetailsList';
import { findIndex, has, sortBy, isEqual, cloneDeep } from '@microsoft/sp-lodash-subset';
import { FileTypeIcon, IconType } from '../fileTypeIcon/index';
import * as strings from 'ControlStrings';
Expand Down
2 changes: 1 addition & 1 deletion src/controls/map/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import styles from './Maps.module.scss';
import { IMapProps } from './IMapProps';
import { IMapState } from './IMapState';
import { ICoordinates, MapType, LocationInfo } from './IMap';
import { Label } from '@fluentui/react/lib/components/Label';
import { Label } from '@fluentui/react/lib/Label';
import { Spinner, SpinnerSize } from '@fluentui/react/lib/Spinner';
import { Icon } from "@fluentui/react/lib/Icon";
import { PrimaryButton } from "@fluentui/react/lib/Button";
Expand Down
2 changes: 1 addition & 1 deletion src/controls/modernTaxonomyPicker/ModernTaxonomyPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import * as strings from 'ControlStrings';
import {
DefaultButton, IButtonStyles, IconButton, PrimaryButton
} from '@fluentui/react/lib/Button';
import { IIconProps } from '@fluentui/react/lib/components/Icon';
import { IIconProps } from '@fluentui/react/lib/Icon';
import { Label } from '@fluentui/react/lib/Label';
import {
Panel,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import React from 'react';
import { BasePicker } from '@fluentui/react/lib/components/pickers/BasePicker';
import { IModernTermPickerProps,
ITermItemProps
} from './ModernTermPicker.types';
import { TermItem } from '../termItem/TermItem';
import { TermItemSuggestion } from '../termItem/TermItemSuggestion';
import { IBasePickerStyleProps,
IBasePickerStyles
} from '@fluentui/react/lib/components/pickers/BasePicker.types';
import { getStyles } from '@fluentui/react/lib/components/pickers/BasePicker.styles';

import { initializeComponentRef,
styled
} from '@fluentui/react/lib/Utilities';
import { ISuggestionItemProps } from '@fluentui/react/lib/components/pickers/Suggestions/SuggestionsItem.types';

import { ITermInfo } from '@pnp/sp/taxonomy';
import { BasePicker, IBasePickerStyleProps, IBasePickerStyles, ISuggestionItemProps } from '@fluentui/react/lib/Pickers';
import { getStyles } from '@fluentui/react/lib/components/pickers/BasePicker.styles';

export class ModernTermPickerBase extends BasePicker<ITermInfo, IModernTermPickerProps> {
public static defaultProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { ITermInfo, ITermStoreInfo } from '@pnp/sp/taxonomy';
import { IBasePickerProps } from '@fluentui/react/lib/components/pickers/BasePicker.types';
import { IPickerItemProps } from '@fluentui/react/lib/components/pickers/PickerItem.types';
import { IStyle, ITheme } from '@fluentui/react/lib/Styling';
import { IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';
import { IReadonlyTheme } from '@microsoft/sp-component-base';
import { IBasePickerProps, IPickerItemProps } from '@fluentui/react/lib/Pickers';

export interface IModernTermPickerProps extends IBasePickerProps<ITermInfo> {
themeVariant?: IReadonlyTheme;
Expand Down
3 changes: 2 additions & 1 deletion src/controls/modernTaxonomyPicker/termItem/TermItem.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { IconButton } from '@fluentui/react/lib/components/Button/IconButton/IconButton';

import { classNamesFunction, styled } from '@fluentui/react/lib/Utilities';
import * as React from 'react';
import { ITermItemProps, ITermItemStyleProps, ITermItemStyles } from '../modernTermPicker/ModernTermPicker.types';
import { getStyles } from './TermItem.styles';
import { IconButton } from '@fluentui/react/lib/Button';

const getClassNames = classNamesFunction<ITermItemStyleProps, ITermItemStyles>();

Expand Down
2 changes: 1 addition & 1 deletion src/controls/peoplepicker/IPeoplePicker.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BaseComponentContext } from '@microsoft/sp-component-base';
import { IBasePickerStyles, IPersonaProps } from "@fluentui/react";
import { DirectionalHint } from "@fluentui/react/lib/common/DirectionalHint";
import { DirectionalHint } from '@fluentui/react/lib/Callout';
import { PrincipalType } from ".";

/**
Expand Down
5 changes: 2 additions & 3 deletions src/controls/peoplepicker/PeoplePickerComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ import SPPeopleSearchService from "../../services/PeopleSearchService";
import { IPeoplePickerProps, IPeoplePickerState } from './IPeoplePicker';
import { TooltipHost } from '@fluentui/react/lib/Tooltip';
import { DirectionalHint } from '@fluentui/react/lib/Callout';
import { NormalPeoplePicker } from '@fluentui/react/lib/components/pickers/PeoplePicker/PeoplePicker';
import { Label } from '@fluentui/react/lib/components/Label';
import { Label } from '@fluentui/react/lib/Label';
import FieldErrorMessage from '../errorMessage/ErrorMessage';
import isEqual from 'lodash/isEqual';
import uniqBy from 'lodash/uniqBy';
import { IPersonaProps } from '@fluentui/react/lib/Persona';
import { IBasePickerSuggestionsProps } from '@fluentui/react/lib/Pickers';
import { IBasePickerSuggestionsProps, NormalPeoplePicker} from '@fluentui/react/lib/Pickers';

/**
* PeoplePicker component
Expand Down
2 changes: 1 addition & 1 deletion src/controls/placeholder/PlaceholderComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ThemeContext } from '@fluentui/react-theme-provider/lib/ThemeContext';
import { Theme } from '@fluentui/react-theme-provider/lib/types';
import { PrimaryButton } from '@fluentui/react/lib/Button';
import { Icon } from '@fluentui/react/lib/components/Icon';
import { Icon } from '@fluentui/react/lib/Icon';
import * as React from 'react';
import { IPlaceholderState } from '.';
import * as telemetry from '../../common/telemetry';
Expand Down
2 changes: 1 addition & 1 deletion src/controls/taxonomyPicker/TaxonomyPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as React from 'react';
import { PrimaryButton, DefaultButton, IconButton } from '@fluentui/react/lib/Button';
import { Panel, PanelType } from '@fluentui/react/lib/Panel';
import { Spinner, SpinnerSize } from '@fluentui/react/lib/Spinner';
import { Autofill } from '@fluentui/react/lib/components/Autofill/Autofill';
import { Label } from '@fluentui/react/lib/Label';
import TermPicker from './TermPicker';
import { IPickerTerms, IPickerTerm } from './ITermPicker';
Expand All @@ -18,6 +17,7 @@ import FieldErrorMessage from '../errorMessage/ErrorMessage';
import { initializeIcons } from '@uifabric/icons';
import * as telemetry from '../../common/telemetry';
import { EmptyGuid } from '../../common/Constants';
import { Autofill } from '@fluentui/react/lib/Autofill';

/**
* Image URLs / Base64
Expand Down
3 changes: 1 addition & 2 deletions src/controls/taxonomyPicker/TermPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { BasePicker, IBasePickerProps, IInputProps, IPickerItemProps } from '@fluentui/react/lib/Pickers';
import { Autofill, BasePicker, IBasePickerProps, IInputProps, IPickerItemProps } from '@fluentui/react/lib/Pickers';
import { IPickerTerm, IPickerTerms } from './ITermPicker';
import SPTermStorePickerService from './../../services/SPTermStorePickerService';
import styles from './TaxonomyPicker.module.scss';
Expand All @@ -8,7 +8,6 @@ import { BaseComponentContext } from '@microsoft/sp-component-base';
import * as strings from 'ControlStrings';
import { Icon } from '@fluentui/react/lib/Icon';
import { ITermSet } from "../../services/ISPTermStorePickerService";
import { Autofill } from '@fluentui/react/lib/components/Autofill/Autofill';
import { LegacyRef, KeyboardEvent } from 'react';

export class TermBasePicker extends BasePicker<IPickerTerm, IBasePickerProps<IPickerTerm>>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { Dropdown, IDropdownOption } from '@fluentui/react/lib/components/Dropdown';
import { Spinner } from '@fluentui/react/lib/components/Spinner';
import { Dropdown, IDropdownOption } from '@fluentui/react/lib/Dropdown';
import { Spinner } from '@fluentui/react/lib/Spinner';
import { SPHttpClient } from "@microsoft/sp-http";
import { WebPartContext } from '@microsoft/sp-webpart-base';
import { ISPList } from '../../../../common/SPEntities';
Expand Down

0 comments on commit 8b94213

Please sign in to comment.