@ -35,16 +35,16 @@ export function buildConfirmDelete(
dom ( 'div' , ` Are you sure you want to delete ${ single ? 'this' : 'these' } record ${ single ? '' : 's' } ? ` ,
dom ( 'div' , ` Are you sure you want to delete ${ single ? 'this' : 'these' } record ${ single ? '' : 's' } ? ` ,
dom . style ( 'margin-bottom' , '10px' ) ,
dom . style ( 'margin-bottom' , '10px' ) ,
) ,
) ,
dom ( 'div' ,
labeledSquareCheckbox ( remember , "Don't ask again." , testId ( 'confirm-remember' ) ) ,
dom . style ( 'margin-bottom' , '10px' ) ,
) ,
cssButtons (
cssButtons (
dom . style ( 'margin-bottom' , '12px' ) ,
primaryButton ( 'Delete' , testId ( 'confirm-save' ) , dom . on ( 'click' , ( ) = > {
primaryButton ( 'Delete' , testId ( 'confirm-save' ) , dom . on ( 'click' , ( ) = > {
onSave ( remember . get ( ) ) ;
onSave ( remember . get ( ) ) ;
ctl . close ( ) ;
ctl . close ( ) ;
} ) ) ,
} ) ) ,
basicButton ( 'Cancel' , testId ( 'confirm-cancel' ) , dom . on ( 'click' , ( ) = > ctl . close ( ) ) )
basicButton ( 'Cancel' , testId ( 'confirm-cancel' ) , dom . on ( 'click' , ( ) = > ctl . close ( ) ) )
) ,
dom ( 'div' ,
labeledSquareCheckbox ( remember , "Don't ask again." , testId ( 'confirm-remember' ) ) ,
)
)
) , { }
) , { }
) ;
) ;
@ -60,21 +60,29 @@ export function buildConfirmDelete(
export function showDeprecatedWarning (
export function showDeprecatedWarning (
refElement : Element ,
refElement : Element ,
content : DomContents
content : DomContents ,
onClose : ( checked : boolean ) = > void ,
) {
) {
const remember = observable ( false ) ;
const tooltip = modalTooltip ( refElement , ( ctl ) = >
const tooltip = modalTooltip ( refElement , ( ctl ) = >
cssWideContainer (
cssWideContainer (
testId ( 'popup-warning-deprecated' ) ,
testId ( 'popup-warning-deprecated' ) ,
elem = > { FocusLayer . create ( ctl , { defaultFocusElem : elem , pauseMousetrap : true } ) ; } ,
elem = > { FocusLayer . create ( ctl , { defaultFocusElem : elem , pauseMousetrap : true } ) ; } ,
dom . onKeyDown ( {
dom . onKeyDown ( {
Escape : ( ) = > ctl . close ( ) ,
Escape : ( ) = > { ctl . close ( ) ; onClose ( remember . get ( ) ) ; } ,
Enter : ( ) = > ctl . close ( ) ,
Enter : ( ) = > { ctl . close ( ) ; onClose ( remember . get ( ) ) ; } ,
} ) ,
} ) ,
content ,
content ,
cssButtons (
cssButtons (
dom . style ( 'margin-top' , '12px' ) ,
dom . style ( 'margin-top' , '12px' ) ,
dom . style ( 'justify-content' , 'right' ) ,
dom . style ( 'justify-content' , 'space-between' ) ,
basicButton ( 'Close' , testId ( 'confirm-cancel' ) , dom . on ( 'click' , ( ) = > ctl . close ( ) ) )
dom . style ( 'align-items' , 'center' ) ,
dom ( 'div' ,
labeledSquareCheckbox ( remember , "Don't show again." , testId ( 'confirm-remember' ) ) ,
) ,
basicButton ( 'Dismiss' , testId ( 'confirm-save' ) ,
dom . on ( 'click' , ( ) = > { ctl . close ( ) ; onClose ( remember . get ( ) ) ; } )
)
) ,
) ,
)
)
) ;
) ;
@ -133,7 +141,7 @@ const cssButtons = styled('div', `
` );
` );
const cssContainer = styled ( cssTheme , `
const cssContainer = styled ( cssTheme , `
max - width : 2 1 0px;
max - width : 2 7 0px;
` );
` );
const cssWideContainer = styled ( cssTheme , `
const cssWideContainer = styled ( cssTheme , `