@@ -12,6 +12,7 @@ import { useConfigureSSO } from '../../../ConfigureSSOContext';
1212import { Step } from '../../../elements/Step' ;
1313import { useWizard , Wizard } from '../../../elements/Wizard' ;
1414import { InnerStepCounter } from '../../../elements/Wizard/InnerStepCounter' ;
15+ import { AttributeMappingTable , type AttributeMappingTableConfig } from './shared/AttributeMappingTable' ;
1516import {
1617 applySamlSubmitError ,
1718 buildSamlConfigurationPayload ,
@@ -57,6 +58,16 @@ export const SamlGoogleConfigureSteps = (): JSX.Element => {
5758 </ Step . Header >
5859 < SamlGoogleServiceProviderStep />
5960 </ Wizard . Step >
61+
62+ < Wizard . Step id = 'attribute-mapping' >
63+ < Step . Header
64+ title = { localizationKeys ( 'configureSSO.configureStep.samlGoogle.mainHeaderTitle' ) }
65+ description = { localizationKeys ( 'configureSSO.configureStep.samlGoogle.attributeMappingStep.headerSubtitle' ) }
66+ >
67+ < InnerStepCounter />
68+ </ Step . Header >
69+ < SamlGoogleAttributeMappingStep />
70+ </ Wizard . Step >
6071 </ >
6172 ) ;
6273} ;
@@ -452,3 +463,101 @@ const SamlGoogleServiceProviderStep = (): JSX.Element => {
452463 </ >
453464 ) ;
454465} ;
466+
467+ const GOOGLE_ATTRIBUTE_MAPPING : AttributeMappingTableConfig = {
468+ columns : {
469+ first : localizationKeys (
470+ 'configureSSO.configureStep.samlGoogle.attributeMappingStep.attributeMappingTable.columns.googleAttribute' ,
471+ ) ,
472+ second : localizationKeys (
473+ 'configureSSO.configureStep.samlGoogle.attributeMappingStep.attributeMappingTable.columns.appAttribute' ,
474+ ) ,
475+ } ,
476+ rows : [
477+ {
478+ id : 'email' ,
479+ isRequired : true ,
480+ first : localizationKeys (
481+ 'configureSSO.configureStep.samlGoogle.attributeMappingStep.attributeMappingTable.rows.email.googleAttribute' ,
482+ ) ,
483+ second : localizationKeys (
484+ 'configureSSO.configureStep.samlGoogle.attributeMappingStep.attributeMappingTable.rows.email.appAttribute' ,
485+ ) ,
486+ } ,
487+ {
488+ id : 'firstName' ,
489+ isRequired : false ,
490+ first : localizationKeys (
491+ 'configureSSO.configureStep.samlGoogle.attributeMappingStep.attributeMappingTable.rows.firstName.googleAttribute' ,
492+ ) ,
493+ second : localizationKeys (
494+ 'configureSSO.configureStep.samlGoogle.attributeMappingStep.attributeMappingTable.rows.firstName.appAttribute' ,
495+ ) ,
496+ } ,
497+ {
498+ id : 'lastName' ,
499+ isRequired : false ,
500+ first : localizationKeys (
501+ 'configureSSO.configureStep.samlGoogle.attributeMappingStep.attributeMappingTable.rows.lastName.googleAttribute' ,
502+ ) ,
503+ second : localizationKeys (
504+ 'configureSSO.configureStep.samlGoogle.attributeMappingStep.attributeMappingTable.rows.lastName.appAttribute' ,
505+ ) ,
506+ } ,
507+ ] ,
508+ } ;
509+
510+ const SamlGoogleAttributeMappingStep = ( ) : JSX . Element => {
511+ const { goNext, goPrev, isFirstStep, isLastStep } = useWizard ( ) ;
512+
513+ return (
514+ < >
515+ < Step . Body >
516+ < Step . Section sx = { theme => ( { gap : theme . space . $3 } ) } >
517+ < Text
518+ as = 'p'
519+ colorScheme = 'secondary'
520+ localizationKey = { localizationKeys ( 'configureSSO.configureStep.samlGoogle.attributeMappingStep.paragraph' ) }
521+ />
522+
523+ < Col
524+ elementDescriptor = { descriptors . configureSSOInstructionsList }
525+ as = 'ol'
526+ sx = { theme => ( {
527+ gap : theme . space . $1x5 ,
528+ margin : 0 ,
529+ paddingInlineStart : theme . space . $5 ,
530+ listStyleType : 'decimal' ,
531+ } ) }
532+ >
533+ < Text
534+ elementDescriptor = { descriptors . configureSSOInstructionsListItem }
535+ as = 'li'
536+ colorScheme = 'secondary'
537+ localizationKey = { localizationKeys ( 'configureSSO.configureStep.samlGoogle.attributeMappingStep.step1' ) }
538+ />
539+ < Text
540+ elementDescriptor = { descriptors . configureSSOInstructionsListItem }
541+ as = 'li'
542+ colorScheme = 'secondary'
543+ localizationKey = { localizationKeys ( 'configureSSO.configureStep.samlGoogle.attributeMappingStep.step2' ) }
544+ />
545+ </ Col >
546+
547+ < AttributeMappingTable config = { GOOGLE_ATTRIBUTE_MAPPING } />
548+ </ Step . Section >
549+ </ Step . Body >
550+
551+ < Step . Footer >
552+ < Step . Footer . Previous
553+ onClick = { ( ) => goPrev ( ) }
554+ isDisabled = { isFirstStep }
555+ />
556+ < Step . Footer . Continue
557+ onClick = { ( ) => goNext ( ) }
558+ isDisabled = { isLastStep }
559+ />
560+ </ Step . Footer >
561+ </ >
562+ ) ;
563+ } ;
0 commit comments