diff --git a/SharePointFramework/PortfolioWebParts/src/components/ProjectProvision/ProjectProvision.tsx b/SharePointFramework/PortfolioWebParts/src/components/ProjectProvision/ProjectProvision.tsx index d200f9d31..45ec182c6 100644 --- a/SharePointFramework/PortfolioWebParts/src/components/ProjectProvision/ProjectProvision.tsx +++ b/SharePointFramework/PortfolioWebParts/src/components/ProjectProvision/ProjectProvision.tsx @@ -1,4 +1,6 @@ import { + FluentProvider, + IdPrefixProvider, Menu, MenuButtonProps, MenuItem, @@ -9,23 +11,23 @@ import { SkeletonItem, SplitButton, Toaster, - useId, useRestoreFocusTarget, useToastController } from '@fluentui/react-components' import React, { FC } from 'react' import { IProjectProvisionProps } from './types' -import { getFluentIcon } from 'pp365-shared-library' +import { customLightTheme, getFluentIcon } from 'pp365-shared-library' import { ProvisionStatus } from './ProvisionStatus' import { useProjectProvision } from './useProjectProvision' import { ProjectProvisionContext } from './context' import { ProvisionDrawer } from './ProvisionDrawer' import strings from 'PortfolioWebPartsStrings' +import { ProvisionSettings } from './ProvisionSettings' export const ProjectProvision: FC = (props) => { - const { state, setState, column, setColumn } = useProjectProvision(props) + const { state, setState, column, setColumn, toasterId, fluentProviderId } = + useProjectProvision(props) const restoreFocusTargetAttribute = useRestoreFocusTarget() - const toasterId = useId('saveToaster') const { dispatchToast } = useToastController(toasterId) if (state.loading) { @@ -38,39 +40,52 @@ export const ProjectProvision: FC = (props) => { return ( - - - - {(triggerProps: MenuButtonProps) => ( - setState({ showProvisionDrawer: true }) - }} - icon={getFluentIcon('Add')} - appearance='primary' - size='large' - > - {strings.Provision.ProvisionButtonLabel} - - )} - - - - { - setState({ showProvisionStatus: true }) - }} - > - {strings.Provision.StatusMenuLabel} - - {strings.Provision.IdeaMenuLabel} - - - - - + + + + + + {(triggerProps: MenuButtonProps) => ( + setState({ showProvisionDrawer: true }) + }} + icon={getFluentIcon('Add')} + appearance='primary' + size='large' + > + {strings.Provision.ProvisionButtonLabel} + + )} + + + + { + setState({ showProvisionStatus: true }) + }} + > + {strings.Provision.StatusMenuLabel} + + { + setState({ showProvisionSettings: true }) + }} + > + {strings.Provision.SettingsMenuLabel} + + {strings.Provision.IdeaMenuLabel} + + + + + + + + ) } diff --git a/SharePointFramework/PortfolioWebParts/src/components/ProjectProvision/ProvisionDrawer/ProvisionDrawer.tsx b/SharePointFramework/PortfolioWebParts/src/components/ProjectProvision/ProvisionDrawer/ProvisionDrawer.tsx index e8a85490e..f1b53e72a 100644 --- a/SharePointFramework/PortfolioWebParts/src/components/ProjectProvision/ProvisionDrawer/ProvisionDrawer.tsx +++ b/SharePointFramework/PortfolioWebParts/src/components/ProjectProvision/ProvisionDrawer/ProvisionDrawer.tsx @@ -21,7 +21,9 @@ import { Tooltip, Toast, ToastBody, - ToastTitle + ToastTitle, + IdPrefixProvider, + FluentProvider } from '@fluentui/react-components' import { ArrowLeft24Regular, @@ -30,13 +32,12 @@ import { Dismiss24Regular } from '@fluentui/react-icons' import strings from 'PortfolioWebPartsStrings' -import { FieldContainer } from 'pp365-shared-library' +import { FieldContainer, customLightTheme } from 'pp365-shared-library' import { SiteType } from './SiteType' import { useProvisionDrawer } from './useProvisionDrawer' import styles from './ProvisionDrawer.module.scss' import { User } from './User' import { Guest } from './Guest' -import { DebugModel } from './DebugModel' export const ProvisionDrawer = (props: { toast: any }) => { const { @@ -50,346 +51,392 @@ export const ProvisionDrawer = (props: { toast: any }) => { context, onSave, isSaveDisabled, + siteExists, + setSiteExists, namingConvention, urlPrefix, - aliasSuffix + aliasSuffix, + fluentProviderId } = useProvisionDrawer() return ( - context.setState({ showProvisionDrawer: open })} - > - - - - - {toolbarBackIconMotion.canRender && ( - + + context.setState({ showProvisionDrawer: open })} + > + + + + + {toolbarBackIconMotion.canRender && ( + } + onClick={() => setLevel2(false)} + /> )} - title={strings.Aria.Back} - appearance='subtle' - icon={} - onClick={() => setLevel2(false)} - /> - )} - - - {toolbarCalendarIconMotion.canRender && ( - + + {toolbarCalendarIconMotion.canRender && ( + } + onClick={() => setLevel2(true)} + /> )} - appearance='subtle' - icon={} - onClick={() => setLevel2(true)} - /> - )} - } - /> - } - onClick={() => context.setState({ showProvisionDrawer: false })} - /> - - - - -
- {level1Motion.canRender && ( - - {strings.Provision.DrawerLevel1HeaderText} -

{strings.Provision.DrawerLevel1DescriptionText}

-
- {/* {DEBUG && } */} - -
- {context.state.types.map((type) => ( - - ))} -
-
- - { - context.setColumn('name', data.value) - }} - contentBefore={ - namingConvention.prefixText && ( - - {namingConvention.prefixText} - - ) - } - contentAfter={ - namingConvention.suffixText && ( - - {namingConvention.suffixText} - - ) - } - placeholder={strings.Placeholder.SiteName} - /> - - -