{"version":3,"sources":["components/Backend/BackendTypes.tsx","lib/Utils.ts","LogConfiguration.ts","components/Attachment/AttachmentConfirmable.tsx","components/Attachment/AttachmentDlp.tsx","components/Dlp/ClientKeywordDomainResultsList.tsx","components/Dlp/ContentScanningResultsList.tsx","components/Persona/PersonaConfirmable.tsx","components/GroupRecipient/GroupRecipients.tsx","lib/Logger.ts","components/Confirmable/ConfirmableList.tsx","RestClient.ts","components/Login/LoginTypes.ts","components/LostConnectionPage.tsx","components/OfficeDialog.tsx","components/App/AppUtils.ts","components/ForbiddenRecipientDialog.tsx","components/OutlookSpinner.tsx","lib/NotificationMessage.ts","lib/AddIn.ts","components/App/App.tsx","components/WarningMessage.tsx","components/LandingPage.tsx","components/Login/LoginPage.tsx","index.tsx"],"names":["TriggerEncryptionMode","TriggerEncryptionDefaultOption","LicenseKeyStatus","UnprotectedAttachmentsMode","RecipientSendType","SignalRUIHubMethods","SignalRAddInHubMethods","DlpResultSourceTypeEnum","ActionOnMatch","DlpItemStatus","MailItemTypeEnum","cleanseAssertionOperators","parsedName","replace","nameof","nameFunction","options","fnStr","toString","startsWith","substring","length","indexOf","includes","es5Match","match","lastProp","Error","WebBrowser","StorageDatatype","SignalRHubType","stringFormat","str","args","_match","index","InjectLinkToString","separator","source","link","parts","split","startLink","concat","replaceColorTagToStyle","regexp","RegExp","colors","exec","push","forEach","color","Modules","storageUtils","sesssionStorageDatatype","window","sessionStorage","getItem","sessionStorageDatatype","value","setItem","removeItem","clear","storageDatatype","localStorage","classNames","mergeStyleSets","fileIconImg","align","width","height","padding","AttachmentConfirmable","props","state","stateUpdate","checked","handleChange","bind","e","target","this","setState","onChange","id","Stack","reversed","alignRightToLeft","horizontal","disableShrink","showCheckBox","Item","Checkbox","disabled","filename","Icon","className","getFileTypeIconProps","extension","pop","imageFileType","Text","variant","nowrap","nextProps","prevState","React","AttachmentDlp","files","useTooltip","TooltipHost","tooltipProps","onRenderContent","map","key","_checked","pointCursorText","horizontalAlign","textFieldStyles","root","position","paddingLeft","detailsHeaderStyles","paddingTop","_onRenderDetailsHeader","DetailsHeader","styles","confirmationStackTokens","childrenGap","stackTableStyles","border","stackTextFieldStyles","clientKeywordDomainResultsList","columns","name","columnName1","fieldName","c","sourceTypeString","minWidth","maxWidth","isRowHeader","isResizable","data","isPadded","cellTitle","flexDirection","onRender","item","style","textAlign","columnName2","attachmentPath","alignItems","groupBy","sourceType","Attachment","Filename","Body","tooLong","tooLongText","columnName3","clientKeyword","columnName4","matchCount","columnName5","allowedDomain","hasAttachments","results","some","r","splice","DetailsList","items","reverse","compact","checkboxVisibility","CheckboxVisibility","hidden","disableSelectionZone","selectionMode","SelectionMode","none","onRenderDetailsHeader","showTextField","tokens","Label","confirmText","TextField","required","autoComplete","denySend","onChangeAction","contentScanningResultsList","ruleName","firstMatch","labelTextField","onChangeTextField","showCheckbox","boxSide","label","labelCheckbox","checkboxChecked","onChangeCheckbox","stackTokens","PersonaConfirmable","verticalAlign","colorDomains","text","stackTokensPersonaLeft","stackTokensPersonaRigth","GroupRecipients","toggle","expanded","handleToggle","handleChangePersonaConfirmable","_e","single","wrap","IconButton","onClick","iconProps","iconName","title","ariaLabel","recipients","x","displayName","LogLevel","logging","minLevels","consoleLoggerRegistered","Object","assign","module","minLevel","Logger","listener","on","onLogEntry","logEntry","msg","Date","toLocaleString","level","message","location","TRACE","console","trace","DEBUG","debug","INFO","info","WARN","warn","ERROR","error","log","EventEmitter","logManager","levels","levelToInt","toLowerCase","logLevel","stack","cla","idx","slice","emit","safeSendLogging","minLevelsTemp","configJson","mod","configure","getMinLevels","registerConsoleLogger","getLogger","logger","SafeSend_ConfirmableList","stackTokensRecipientsCheck","stackTokensFilesCheck","iconClass","mergeStyles","fontSize","maxHeight","domainColors","colorByDomain","cursor","warning","completed","ConfirmableList","toConfirmableList","ccConfirmableList","bccConfirmableList","attachmentConfirmableList","allChecked","updatedDlpstatus","handleChangeSelectAll","handleChangeConfirmable","notFound","every","apiResponse","onSendProcessContex","settings","_disableSelectAll","unsafeRecipientsCount","unsafeAttachmentsCount","_disableSelectAllForLessThanXCheckboxes","_stringMainSelectAll","_stringMainEmailTO","childrens","confirmationFlags","_expandListsByDefault","_stringMainEmailCC","_stringMainEmailBCC","_showAttachmentsSeparator","Separator","_stringMainFilesAttachedHeader","dlp","status","Unsupported","content","statusString","FontIcon","Scanning","scanTimedOut","Spinner","type","SpinnerType","normal","PasswordProtected","ProtectedDocument","SensitiveDataFound","Success","dlps","keys","precheckRecipients","_precheckRecipients","singleColorIndex","confirmableListTo","unsafeRecipients","to","recipient","domain","confirmableListCc","cc","confirmableListBcc","bcc","colorIndex","confirmableListToGroup","toGroup","confirmableListCcGroup","ccGroup","confirmableListBccGroup","bccGroup","confirmableAttachments","unsafeAttachments","scanStarted","contentType","ScanNotStarted","_stringAttachmentStatusUnsupported","_stringAttachmentStatusScanning","_stringAttachmentStatusScanNotStarted","SafeSend_App","axiosRetry","axios","retries","retryOptions","retryDelay","retryCount","retryCondition","a","response","retryErrorCode","LoginResultStatus","restClient","login","outlookToken","headers","post","getApiResponse","getApiResponseError","getPlatformInfo","platformType","get","processMail","authToken","emailInfo","getHeaders","cancelDlp","delete","postProcess","SendConfirmed","patch","sendAttachmentPassword","password","sendAttachmentContent","outlookAttachment","getAppInfo","getAppSettings","authorization","statusCode","errorMessage","errorContent","isSuccessStatusCode","UnauthorizedError","ConnectionError","box","display","justifyContent","LostConnectionPage","block","osName","osVersion","browserName","fullBrowserVersion","engineName","engineVersion","SafeSend_OfficeDialog","stringMainPolicySpaces","messageBarStylesRigth","innerText","iconNotificationClass","wrapper","pane","sticky","textContent","progressIndicator","notificationArea","notificationAreaStackTokens","scrollablePaneStyles","panelStyles","minHeight","margin","header","OfficeDialog","context","mailboxItem","sendEvent","isConnectionLost","enabledSend","defaultValuesSettingUp","showAttachmentPasswordPrompt","hasShownPassowrdPrompt","enabledSubmitPassword","confirmableAllSelected","bccWarningIfMoreThanX","showConfirmContentScanningText","confirmContentScanningText","showConfirmContentScanningCheck","confirmContentScanningCheck","showConfirmClientKeywordsText","confirmClientKeywordsText","encryptNoSelected","encryptYesSelected","showEncryptPrompt","attachmentPassword","confirmUnprotectedAttachmentsCheck","closeDialog","attachmentPasswordRequest","attachmentSendPassword","setSendEnabled","isBccWarningVisible","isEncryptVisible","setEncryptVisibility","isProcessMaxNrRecipients","validateEncryptionSelection","setDialogTimeout","onRef","addEventListener","dialogId","localGet","DialogId","undefined","dialogOptions","Office","ui","messageParent","JSON","stringify","apiResponseView","showBccWarning","encrypt","option","isDefault","countUnprotectedAttachments","_unprotectedAttachmentsMode","Notify","Deny","Confirm","isDlpWaiting","attachmentPasswordRequested","result","tooManyRecipientsCount","timeoutSeconds","setTimeout","dialogValues","send","SafeSendToken","contentScanningAction","ConfirmText","clientKeywordDomainResults","_clientKeywordDisableConfirm","enabled","Inform","Ignore","entries","_triggerEncryptionMode","AskWhenFoundSensitiveContent","contentScanningResults","Panel","isOpen","PanelType","smallFluid","onRenderFooterContent","Image","src","logoBytes","alt","PrimaryButton","_stringMainSendButton","vertical","DefaultButton","_stringMainCancelButton","hasCloseButton","headerText","mainTitle","isFooterAtBottom","_stringMainBCCWarning","_showFromAddress","fromAddress","displaySubject","subjectText","ChoiceGroup","defaultSelectedKey","_triggerEncryptionDefaultOption","flexContainer","_stringMainTriggerEncryptionQuestion","_stringMainTriggerEncryptionOptionYes","field","marginRight","_stringMainTriggerEncryptionOptionNo","isUnprotectedAttachmentsNotificationVisible","unprotectedAttachmentMessage","isUnprotectedAttachmentsComfirmationVisible","paddingBottom","confirmationRequired","Safari","WebKit","ScrollablePane","scrollContainerFocus","scrollContainerAriaLabel","Sticky","stickyPosition","StickyPositionType","Both","role","aria-level","isGroupByDomain","MessageBar","messageBarType","MessageBarType","isMultiline","dangerouslySetInnerHTML","__html","_stringMainMessageManyRecipients","_stringMainMessageMultipleDomainRecipients","_stringMainMessageSingleDomainRecipient","_stringMainMessageMultipleRecipients","_stringMainMessageSingleRecipient","severeWarning","_disableConfirmAttachments","_stringMainFilesAttached","_stringMainFilesAttachedConfirmed","_stringMainFileAttachedConfirmed","allSelected","_stringContentScanningWrongClientWarning","_stringContentScanningTimedOutShort","_stringContentScanningSendingNotAllowed","groupByAttachments","groupByClientKeywordAttachments","groupByClientKeywordAttachmentsText","ClientKeywordDomainResultsList","_stringContentScanningConfirmContentText","_stringContentScanningSource","_stringContentScanningEmailAttachment","_stringContentScanningClientData","_stringContentScanningTotalMatches","_stringContentScanningAllowedDomains","mailItem","attachmentCount","_stringContentScanningPointCursorHere","_stringContentScanningTooLongToDisplay","_stringContentScanningSensitiveContentFound","groupByContentScanningAttachments","groupByContentScanningAttachmentsText","ContentScanningResultsList","_stringContentScanningRule","_stringContentScanningFirstMatch","_stringContentScanningConfirmContent","isPasswordPromptVisible","_stringPasswordRequired","autoFocus","onKeyDown","event","preventDefault","stopPropagation","_stringPasswordSubmit","ProgressIndicator","_stringContentScanningScanningContent","_stringContentScanningComplete","_stringContentScanningTimedOutLong","showPolicyText","_stringMainPolicy","_policyLink","appUtils","isContentScanning","copyResults","group","filterFiles","filter","elem","self","join","sort","b","currentAction","newAction","currentContentScanningAction","groupClientKeywordAttachments","groupContentScanningAttachments","dlpItemResults","dlpItemResult","processedContentScanningResults","getProcessedContentScanningResults","contentScanResults","actionOnMatch","contentScanningResultView","processedClientKeywordDomainResults","getProcessedClientKeywordDomainResults","isAttachment","containsUnprotectedAttachment","_stringNotEncryptedAttachmentConfirm","_stringNotEncryptedAttachmentDeny","_stringNotEncryptedAttachmentNotify","_stringNotEncryptedAttachmentsConfirm","_stringNotEncryptedAttachmentsDeny","_stringNotEncryptedAttachmentsNotify","getGroupAttachment","copyAndSort","columnKey","isSortedDescending","clientKeywordDomainResult","_stringContentScanningEmailContent","_stringContentScanningEmailFileName","Subject","_stringContentScanningEmailSubject","contentScanningResult","getContentScanningAction","countTotalAttachmentsScanned","countTotalClientKeyword","ck","countTotalClientKeywordMatches","countTotalContentScanning","cs","countTotalContentScanningMatches","_contentScanningMaxNrMatchesBeforeTryingToGroupByAttachment","_stringContentScanningTooManyMatches","stackToken","ForbiddenRecipientDialog","i","forbiddenRecipients","isList","_stringMainListIdentifier","_stringForbiddenRecipientTitle","_stringForbiddenRecipient","_stringForbiddenRecipients","fr","mainSpinner","OutlookSpinner","size","SpinnerSize","large","notificationLogger","notificationMessages","replaceAsync","getJsonMessage","MailboxEnums","ItemNotificationMessageType","InformationalMessage","ErrorMessage","removeAsync","icon","persistent","globalMailboxItem","globalAppInfo","globalEmailData","globalSendEvent","globalApiResponseView","SafeSend_AddIn","globalAddInDialogInstance","globalLoginDialogInstance","globalRetryAttempt","globalIsCurrentWorkflowRestarting","globalPlatformConfig","attachmentSizeThreshold","isOffice365","retryOnServerConnectionReset","setSubjectAsync","newSubject","Promise","resolve","reject","subject","setAsync","asyncContext","asyncResult","AsyncResultStatus","Succeeded","setBodyAsync","newBody","coercionType","body","processOnSendEvent","Math","random","substr","localSet","platform","responsePlatform","processSendEmail","infoReplace","saveItemAndGetOutlookTokenAsync","success","getOutlookTokenAsync","localExists","OutlookAccessToken","outlookAccesToken","splits","expiration","parse","atob","exp","round","getTime","processEmail","showLoginDialog","workflowOnConnectionError","onConnectionError","getSignalRConnection","signalRHubType","connection","signalR","withUrl","accessTokenFactory","build","start","isAddInDialogOpen","tryCloseDialogs","sendingEmailBecauseOfError","retryConnection","remove","progressReplace","close","displayDialogAsync","origin","loginDialogCallback","Failed","code","errorReplace","addEventHandler","EventType","DialogMessageReceived","loginDialogEventHandler","DialogEventReceived","arg","isError","loginResults","accessToken","getAuthenticationToken","isClientSideGetAttachmentSupported","isSetSupported","getEmailInfo","itemId","isDlpLicenseValid","attachments","token","AddinHub","addInSignalRConnection","connectionAddInId","connectionId","configureAddInSignalR","responseMail","showAddInDialog","scanCompleted","localRemove","ApiResponse","getAddInDialogOptions","addInDialogCallback","forbiddenRecipientsLength","displayInIframe","promptBeforeOpen","addInDialogEventHandler","confirmInfo","getConfirmInfo","onSendPostProcessContextView","_footerEnabled","shouldCancelSendEvent","PlatformType","OfficeOnline","PC","hasHtmlBody","htmlBody","footerText","CoercionType","Html","textBody","subjectPrefix","clientLanguage","displayLanguage","sendConfirmed","shouldTriggerEncryption","hasForbiddenRecipients","sendCanceled","mailItemType","itemType","onclose","ReceiveGetAttachmentContent","attachment","getAttachmentContentAsync","bodyType","toEmails","ccEmails","bccEmails","toTemp","getRecipientsFromMailboxItem","TO","ccTemp","CC","bccTemp","BCC","getRecipientsAsync","getAttachmentsAsync","getBodyTypeAsync","all","getSubjectAsync","getBodyAsync","embeddedAttachments","getEmbeddedAttachments","responseLogin","unauthorizedError","licenseKeyStatus","Invalid","TrialExpired","LicenseExpired","allowEvent","set","requirements","recipientType","ItemType","Message","requiredAttendees","optionalAttendees","getAsync","recipientTemp","emailAddress","isAddressTypeSupported","isExchangeDistributionList","RecipientType","DistributionList","isOutlookDistributionList","members","sendable","sendType","getTypeAsync","bodyContent","bodyasElement","document","createElement","innerHTML","embImgs","getElementsByTagName","attachmentsTemp","attributes","getNamedItem","sizestr","parseInt","mailbox","convertToRestId","RestVersion","v2_0","jsId","attachmentType","contentBytes","isInline","AttachmentType","b64","paddingFound","btoa","saveAsync","emailSettings","getCallbackTokenAsync","isRest","allowSignInPrompt","allowConsentPrompt","forMSGraphAccess","OfficeRuntime","auth","getAccessToken","ssoOutlookToken","onReady","App","officeDialog","chunksManager","chunkSize","chunkProcessedCount","isOfficeInitialized","dialogInstance","configureSignalR","updateDialogUI","getGroupByAttachments","newAppState","getStateForUpdateUI","UIHub","ReceiveDlpItemResults","ReceiveFinishingContenScanning","_isCancellationRequested","ReceiveAttachmentPasswordRequest","host","localStorageData","dlpScanResults","estimatedDlpItemsCount","ref","localeCompare","WarningMessage","backgroundColor","alignContent","LandingPage","isWaiting","appInfo","responseAppInfo","product","version","description","copyright","LoginPage","loginresult","tokenType","LoggedIn","safeSendToken","appSettings","msalConfig","clientId","authority","redirectUri","navigateToLoginRequestUrl","cache","cacheLocation","storeAuthStateInCookie","userAgentApp","Msal","requestObj","scopes","handleRedirectCallback","authCallback","acquireTokenRedirect","loginRedirect","initializeIcons","initializeFileTypeIcons","onSendEvent","routing","exact","path","component","ReactDOM","getElementById"],"mappings":"8MAOYA,EAOAC,EAMAC,EAOAC,EA8CAC,EAQAC,EAMAC,EAsCAC,EAOAC,EAOAC,EA8TAC,E,wPAlcAV,O,uBAAAA,I,qDAAAA,I,+DAAAA,I,0BAAAA,M,cAOAC,O,uCAAAA,I,qBAAAA,I,gCAAAA,M,cAMAC,K,cAAAA,E,kBAAAA,E,4BAAAA,E,iCAAAA,M,cAOAC,O,mBAAAA,I,mBAAAA,I,qBAAAA,I,gBAAAA,M,cA8CAC,O,WAAAA,I,WAAAA,I,aAAAA,I,oBAAAA,M,cAQAC,K,8CAAAA,E,gEAAAA,E,qEAAAA,M,cAMAC,K,2DAAAA,M,cAsCAC,K,oBAAAA,E,wBAAAA,E,YAAAA,E,mBAAAA,M,cAOAC,K,kBAAAA,E,gBAAAA,E,YAAAA,E,2BAAAA,M,cAOAC,K,0BAAAA,E,oBAAAA,E,cAAAA,E,sCAAAA,E,sCAAAA,E,wCAAAA,E,kBAAAA,E,kBAAAA,E,gCAAAA,E,6BAAAA,M,cA8TAC,K,kBAAAA,E,YAAAA,E,0BAAAA,E,mBAAAA,M,2CCzcZ,SAASC,EAA0BC,GAC/B,OAAOA,EAAWC,QAAQ,QAAS,IAUhC,SAASC,EAAyBC,EAAgEC,GACrG,IAAMC,EAAQF,EAAaG,WAI3B,GACID,EAAME,WAAW,YAEbF,EAAME,WAAW,YAErB,OAAOR,EACHM,EAAMG,UACF,SAASC,OACTJ,EAAMK,QAAQ,QAO1B,GAAIL,EAAMM,SAAS,MACf,OAAOZ,EACHM,EAAMG,UACFH,EAAMK,QAAQ,KAAO,IAWjC,IAEME,EAAWP,EAAMQ,MAFJ,kEAInB,GAAID,EACA,OAAQR,GAAWA,EAAQU,SACrBF,EAAS,GACTA,EAAS,GAKnB,GAAIP,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GAAS7F,SAASkG,eAAe,e","file":"static/js/main.855e849f.chunk.js","sourcesContent":["//Other API models\nexport interface LoginModel {\n\ttoken: string;\n\tlicenseKeyStatus: LicenseKeyStatus;\n\tisDlpLicenseValid: boolean;\n}\n\nexport enum TriggerEncryptionMode {\n\tDisabled = 0,\n\tAskWhenFilesAreAttached = 1,\n\tAskWhenFoundSensitiveContent = 2,\n\tAlwaysAsk = 3\n}\n\nexport enum TriggerEncryptionDefaultOption {\n\tRequireUserInput = 0,\n\tEncrypt = 1,\n\tDoNotEncrypt = 2\n}\n\nexport enum LicenseKeyStatus {\n\tValid = \"Valid\",\n\tInvalid = \"Invalid\",\n\tTrialExpired = \"TrialExpired\",\n\tLicenseExpired = \"LicenseExpired\",\n}\n\nexport enum UnprotectedAttachmentsMode {\n\tIgnore = 0,\n\tNotify = 1,\n\tConfirm = 2,\n\tDeny = 3\n}\n\nexport interface EmailInfo {\n\titemId: string;\n\titemType: Office.MailboxEnums.ItemType | string | undefined;\n\tsubject: string | null;\n\tbodyType: Office.CoercionType | string;\n\tbody: string | null;\n\ttoEmails: EmailRecipient[];\n\tccEmails: EmailRecipient[];\n\tbccEmails: EmailRecipient[];\n\tattachments: OutlookAttachment[] | null;\n\tclientLanguage: string;\n\tplatformType: Office.PlatformType;\n\tconnectionAddInId: string | null;\n\tisClientSideGetAttachmentSupported: boolean;\n}\n\nexport interface EmailRecipient {\n\tid: number;\n\temailAddress: string;\n\tsendType: RecipientSendType;\n\tisAddressTypeSupported: boolean;\n\tsendable: boolean;\n\tname: string;\n\tisExchangeDistributionList: boolean;\n\tisOutlookDistributionList: boolean;\n\tmembers: EmailRecipient[];\n}\n\nexport interface OutlookAttachment {\n\tid: string;\n\tjsId: string;\n\tname: string;\n\tcontentType: string;\n\tsize: number;\n\tattachmentType: string;\n\tisInline: boolean;\n\tcontentBytes: string | null;\n}\n\nexport enum RecipientSendType {\n\tTO = 0,\n\tCC = 1,\n\tBCC = 2,\n\tSender = 3\n}\n\n//SignalR methods ==========================================================\nexport enum SignalRUIHubMethods {\n\tReceiveDlpItemResults = \"ReceiveDlpItemResults\",\n\tReceiveFinishingContenScanning = \"ReceiveFinishingContenScanning\",\n\tReceiveAttachmentPasswordRequest = \"ReceiveAttachmentPasswordRequest\",\n}\n\nexport enum SignalRAddInHubMethods {\n\tReceiveGetAttachmentContent = \"ReceiveGetAttachmentContent\"\n}\n\n//SignalR models ==========================================================\nexport interface DlpItemResultView {\n\tid: string;\n\tisAttachment: boolean;\n\tstatus: DlpItemStatus;\n\tstatusString: string;\n\tcontainsUnprotectedAttachment: boolean;\n\tcontentScanResults: ContentScanningResultView[];\n\tclientKeywordDomainResults: ClientKeywordDomainResultView[];\n}\n\nexport interface DlpResultView {\n\tkey: string;\n\tsourceType: DlpResultSourceTypeEnum;\n\tsourceTypeString: string;\n\tattachmentPath: string;\n\tmatchCount: number;\n\tclientKeyword: string;\n\tfirstMatch: string;\n\tfiles: string[];\n\tgroupBy: boolean;\n\tuseTooltip: boolean;\n\ttooLong: boolean;\n}\n\nexport interface ContentScanningResultView extends DlpResultView {\n\truleName: string;\n\tactionOnMatch: ActionOnMatch;\n}\n\nexport interface ClientKeywordDomainResultView extends DlpResultView {\n\tallowedDomain: string;\n}\n\nexport enum DlpResultSourceTypeEnum {\n\tFilename = \"Filename\",\n\tAttachment = \"Attachment\",\n\tBody = \"Body\",\n\tSubject = \"Subject\"\n}\n\nexport enum ActionOnMatch {\n\tConfirm = \"Confirm\",\n\tInform = \"Inform\",\n\tDeny = \"Deny\",\n\tConfirmText = \"ConfirmText\"\n}\n\nexport enum DlpItemStatus {\n\tUnsupported = \"Unsupported\",\n\tScanning = \"Scanning\",\n\tError = \"Error\",\n\tProtectedDocument = \"ProtectedDocument\",\n\tPasswordProtected = \"PasswordProtected\",\n\tSensitiveDataFound = \"SensitiveDataFound\",\n\tSuccess = \"Success\",\n\tUnknown = \"Unknown\",\n\tScanNotStarted = \"ScanNotStarted\",\n\tScanTimedOut = \"ScanTimedOut\"\n}\n\n//Backend API response ==========================================================\nexport interface AppInfo {\n\tproduct: string;\n\tversion: string;\n\tdescription: string;\n\tcopyright: string;\n}\n\nexport interface PlatformConfig {\n\tenabled: boolean;\n\tattachmentSizeThreshold: number;\n\tisOffice365: boolean;\n\tretryOnServerConnectionReset: number;\n}\n\nexport interface SettingsView {\n\temailProviderUrl: string;\n\t_unresolvedRecipientRetryCount: number;\n\t_unresolvedRecipientRetryInitialDelay: number;\n\t_useDomainColorCoding: boolean;\n\t_useLocalizedLanguage: boolean;\n\t_useLocalizedLanguageGPOOverrideLanguage: string;\n\t_useLocalizedLanguageForceLanguage: string;\n\t_localizationXlsxPath: string;\n\t_useSafeDomainsAsBlacklist: boolean;\n\t_useQuickLookupForOutlookContacts: boolean;\n\t_warnUserIfMoreThanXEmailsInThread: number;\n\t_DLPKeyStatusStringValid: string;\n\t_DLPKeyStatusStringInvalid: string;\n\t_logo: string;\n\t_logoFilePath: string;\n\tlogoBytes: string;\n\t_windowMinimumHeight: number;\n\t_windowMinimumWidth: number;\n\t_version: string;\n\t_triggerEncryptionXHeader: string;\n\t_triggerEncryptionSubjectString: string;\n\t_treatMatchingEmailsAsExternal: string;\n\t_treatMatchingExchangeDLNamesAsExternal: string;\n\t_treatMatchingEmailsAsUnsafe: string;\n\t_treatMatchingExchangeDLNamesAsUnsafe: string;\n\t_treatMatchingUnresolvedRecipientsAsInternal: string;\n\t_treatUnmatchedGALEntriesAsSafe: boolean;\n\t_contentScanningMaxNrMatchesBeforeTryingToGroupByAttachment: number;\n\t_contentScanningTimeoutMS: number;\n\t_debugLogging: boolean;\n\t_debugLoggingCopyADXLoaderLog: boolean;\n\t_detectBulkEmailing: boolean;\n\t_detectBulkEmailingDetectionPeriod: number;\n\t_disableConfirmAttachments: boolean;\n\t_disableConfirmationForTheseSendingEmailAddresses: string;\n\t_confirmReplyToRecipients: boolean;\n\t_disableInternalSave: boolean;\n\t_disableOpenAttachmentsLink: boolean;\n\t_disableSelectAll: boolean;\n\t_disableSelectAllForLessThanXCheckboxes: number;\n\t_dlpScanSequential: boolean;\n\t_expandListsByDefault: boolean;\n\t_enableRecipientAttachmentRemoval: boolean;\n\t_forceWindowTopMost: boolean;\n\t_footerEnabled: boolean;\n\t_footerText: string;\n\t_disableMarkMsgFilesAsAttachments: boolean;\n\t_groupByDomain: boolean;\n\t_confirmExternalRecipients: boolean;\n\t_classificationXHeaderValues: string;\n\t_debugSimulateUnresolvedExchangeRecipients: boolean;\n\t_debugShowLanguageSelector: boolean;\n\t_confirmAndSendOnCtrlEnter: boolean;\n\t_debugSimulateUncaughtException: boolean;\n\t_addXHeader: boolean;\n\t_BCCWarningIfMoreThanX_TOCC_Recipients: number;\n\t_checkAutoForwardedEmails: boolean;\n\t_checkRepliesToExternalMeetings: boolean;\n\t_clientKeywordDisableConfirm: boolean;\n\t_classificationXHeader: string;\n\t_debugSimulateClassificationXHeader: string;\n\t_hideRecipientDisplayName: boolean;\n\t_loggingFileLogMaxSizeMB: number;\n\t_resolveWithAddressBook: boolean;\n\t_showAttachmentsSeparator: boolean;\n\t_showFromAddress: boolean;\n\t_sortRecipientsAndFiles: boolean;\n\t_resolveDLEmail: boolean;\n\t_loggingFileLogEnabled: boolean;\n\t_readSettingsEveryXMinutes: number;\n\t_loggingWindowsEventLogEnabled: boolean;\n\t_loggingEventTypeFilter: number;\n\t_loggingSyslogHostname: string;\n\t_loggingSyslogPort: number;\n\t_loggingSyslogUseStrictRFC5424Format: boolean;\n\t_markEmbeddedImagesAsAttachments: boolean;\n\t_markEmbeddedImagesAsAttachmentsFileSizeLimitKB: number;\n\t_onlyPopupForAttachments: boolean;\n\t_onlyPopupForAttachmentsOrDLPMatch: boolean;\n\t_onlyPopupForNewEmailThreads: boolean;\n\t_onlyPopupForNewEmailThreadsDaysOfHistory: number;\n\t_onlyPopupForDLPMatch: boolean;\n\t_checkDistributionListMembers: boolean;\n\t_policyLink: string;\n\t_precheckRecipients: boolean;\n\t_processMaxNrRecipients: number;\n\t_onlyPopupForMultipleExternalDomains: boolean;\n\t_triggerEncryptionMode: number;\n\t_triggerEncryptionDefaultOption: number;\n\t_unprotectedAttachmentsMode: number;\n\n\t_stringAttachmentStatusError: string;\n\t_stringAttachmentStatusPasswordProtected: string;\n\t_stringAttachmentStatusProtectedDocument: string;\n\t_stringAttachmentStatusScanning: string;\n\t_stringAttachmentStatusScanNotStarted: string;\n\t_stringAttachmentStatusScanTimedOut: string;\n\t_stringAttachmentStatusSensitiveDataFound: string;\n\t_stringAttachmentStatusSuccess: string;\n\t_stringAttachmentStatusUnknown: string;\n\t_stringAttachmentStatusUnsupported: string;\n\t_stringBulkEmailQuestion: string;\n\t_stringContentScanningAllowedDomains: string;\n\t_stringContentScanningClientData: string;\n\t_stringContentScanningComplete: string;\n\t_stringContentScanningConfirmContent: string;\n\t_stringContentScanningConfirmContentText: string;\n\t_stringContentScanningEmailAttachment: string;\n\t_stringContentScanningEmailContent: string;\n\t_stringContentScanningEmailFileName: string;\n\t_stringContentScanningEmailSubject: string;\n\t_stringContentScanningFirstMatch: string;\n\t_stringContentScanningPointCursorHere: string;\n\t_stringContentScanningReleaseWindow: string;\n\t_stringContentScanningRule: string;\n\t_stringContentScanningScanningContent: string;\n\t_stringContentScanningSendingNotAllowed: string;\n\t_stringContentScanningSensitiveContentFound: string;\n\t_stringContentScanningSource: string;\n\t_stringContentScanningTimedOutLong: string;\n\t_stringContentScanningTimedOutShort: string;\n\t_stringContentScanningTooLongToDisplay: string;\n\t_stringContentScanningTooManyMatches: string;\n\t_stringContentScanningTotalMatches: string;\n\t_stringContentScanningWrongClientWarning: string;\n\t_stringContentScanningZipHeader: string;\n\t_stringErrorMessage: string;\n\t_stringErrorTitle: string;\n\t_stringForbiddenRecipient: string;\n\t_stringForbiddenRecipients: string;\n\t_stringForbiddenRecipientTitle: string;\n\t_stringMainAllRecipientsNumber: string;\n\t_stringMainBCCWarning: string;\n\t_stringMainCancelButton: string;\n\t_stringMainEmailBCC: string;\n\t_stringMainEmailCC: string;\n\t_stringMainEmailFrom: string;\n\t_stringMainEmailTO: string;\n\t_stringMainEmailReplyTo: string;\n\t_stringMainFileAttachedConfirmed: string;\n\t_stringMainFilesAttached: string;\n\t_stringMainFilesAttachedConfirmed: string;\n\t_stringMainFilesAttachedHeader: string;\n\t_stringMainFilesAttachedOpen: string;\n\t_stringMainFilesAttachedOpenFailed: string;\n\t_stringMainListIdentifier: string;\n\t_stringMainMessageManyRecipients: string;\n\t_stringMainMessageMultipleDomainRecipients: string;\n\t_stringMainMessageMultipleRecipients: string;\n\t_stringMainMessageSingleDomainRecipient: string;\n\t_stringMainMessageSingleRecipient: string;\n\t_stringMainPolicy: string;\n\t_stringMainSelectAll: string;\n\t_stringMainSelectedRecipients: string;\n\t_stringMainSendButton: string;\n\t_stringMainSubject: string;\n\t_stringMainTitleUnsafeClassified: string;\n\t_stringMainTriggerEncryptionOptionYes: string;\n\t_stringMainTriggerEncryptionQuestion: string;\n\t_stringMainTitleExternal: string;\n\t_stringMainTitleExternalClassified: string;\n\t_stringMainTitleUnsafe: string;\n\t_stringMainTriggerEncryptionOptionNo: string;\n\t_stringMainUnresolvableIdentifier: string;\n\t_stringNotEncryptedAttachmentConfirm: string;\n\t_stringNotEncryptedAttachmentDeny: string;\n\t_stringNotEncryptedAttachmentNotify: string;\n\t_stringNotEncryptedAttachmentsConfirm: string;\n\t_stringNotEncryptedAttachmentsDeny: string;\n\t_stringNotEncryptedAttachmentsNotify: string;\n\t_stringPasswordRequired: string;\n\t_stringPasswordSubmit: string;\n\t_stringReplyAllBlock: string;\n\t_stringReplyAllTitle: string;\n\t_stringReplyAllWarning: string;\n\t_stringReplyAllWarningDistributionList: string;\n\t_stringUnexpectedErrorCancel: string;\n\t_stringUnexpectedErrorMessage: string;\n\t_stringUnexpectedErrorSendAnyway: string;\n\t_stringWarnUserIfLongEmailThreadMessage: string;\n\t_stringWarnUserIfLongEmailThreadTitle: string;\n}\n\nexport interface ApiResponseView {\n\tunsafeRecipientsCount: number;\n\tunsafeAttachmentsCount: number;\n\tfromAddress: string;\n\tsubjectText: string;\n\talignRightToLeft: boolean;\n\tattachmentPasswordRequested: boolean;\n\tonSendProcessContex: OnSendProcessContextView;\n\tunsafeRecipients: UnsafeRecipientsView;\n\tunsafeAttachments: AttachmentView[];\n\tdlpScanResults: DlpItemResultView[];\n}\n\nexport interface OnSendPostProcessContextView {\n\tshouldCancelSendEvent: boolean;\n\tfooterText: string;\n\tsubjectPrefix: string;\n}\n\nexport interface OnSendProcessContextView {\n\tisLicensed: boolean;\n\tisDlpLicenseValid: boolean;\n\tconfirmationRequired: boolean;\n\tscanStarted: boolean;\n\tscanCompleted: boolean;\n\tscanTimedOut: boolean;\n\thasForbiddenRecipients: boolean;\n\tsendCanceled: boolean;\n\tmailItem: MailItemView;\n\tconfirmationFlags: ConfirmationFlagsView;\n\tsettings: SettingsView;\n\tforbiddenRecipients: UnsafeRecipientView[];\n}\n\nexport interface MailItemView {\n\titemId: string;\n\tattachmentCount: number;\n\tsubject: string;\n\thasHtmlBody: boolean;\n\thtmlBody: string;\n\tbody: string;\n\titemType: MailItemTypeEnum;\n}\n\nexport interface AttachmentView {\n\tid: string;\n\tfilename: string;\n\tsize: number;\n\tcontentType: string;\n}\n\nexport interface ConfirmationFlagsView {\n\tshowBccWarning: boolean;\n\tshowEncryptPrompt: boolean;\n\tshowFromAddress: boolean;\n\tshowSelectAll: boolean;\n\tshowRecipientAttachmentSeparator: boolean;\n\tshowAttachmentLinks: boolean;\n\tshowPolicyText: boolean;\n\tshowTrialSettings: boolean;\n\tcolorDomains: boolean;\n\tdisplaySubject: boolean;\n\tshowAttachments: boolean;\n\tshowLanguageSelector: boolean;\n\tmainTitle: string;\n}\n\nexport interface UnsafeRecipientsView {\n\tisGroupByDomain: boolean;\n\ttoGroup: UnsafeGroupRecipientsView[];\n\tccGroup: UnsafeGroupRecipientsView[];\n\tbccGroup: UnsafeGroupRecipientsView[];\n\tto: UnsafeRecipientView[];\n\tcc: UnsafeRecipientView[];\n\tbcc: UnsafeRecipientView[];\n}\n\nexport interface UnsafeGroupRecipientsView {\n\tid: string;\n\tdomain: string;\n\trecipients: UnsafeRecipientView[];\n}\n\nexport interface UnsafeRecipientView {\n\tid: string;\n\tdisplayName: string;\n\tname: string;\n\temail: string;\n\tdomain: string;\n\tisList: boolean;\n\ttooManyRecipientsCount: number;\n}\n\nexport interface ConfirmInfo {\n\titemId: string;\n\tsendConfirmed: boolean;\n\tshouldTriggerEncryption: boolean;\n\tshowEncryptPrompt: boolean;\n\tconfirmationRequired: boolean;\n\thasForbiddenRecipients: boolean;\n\tmailItemType: MailItemTypeEnum;\n\tsendCanceled: boolean;\n\tclientLanguage: string;\n\thasHtmlBody: boolean;\n}\n\nexport enum MailItemTypeEnum {\n\tUnknown = \"Unknown\",\n\tMail = \"Mail\",\n\tTaskRequest = \"TaskRequest\",\n\tMeeting = \"Meeting\"\n}","function cleanseAssertionOperators(parsedName: string): string {\n return parsedName.replace(/[?!]/g, \"\");\n}\n\nexport interface NameofOptions {\n /**\n * Take only the last property of nested properties.\n */\n lastProp?: boolean;\n}\n\nexport function nameof(nameFunction: ((obj: T) => any) | { new(...params: any[]): T }, options?: NameofOptions): string {\n const fnStr = nameFunction.toString();\n\n // ES6 class name:\n // \"class ClassName { ...\"\n if (\n fnStr.startsWith(\"class \")\n // Theoretically could, for some ill-advised reason, be \"class => class.prop\".\n && !fnStr.startsWith(\"class =>\")\n ) {\n return cleanseAssertionOperators(\n fnStr.substring(\n \"class \".length,\n fnStr.indexOf(\" {\")\n )\n );\n }\n\n // ES6 prop selector:\n // \"x => x.prop\"\n if (fnStr.includes(\"=>\")) {\n return cleanseAssertionOperators(\n fnStr.substring(\n fnStr.indexOf(\".\") + 1\n )\n );\n }\n\n // ES5 prop selector:\n // \"function (x) { return x.prop; }\"\n // webpack production build excludes the spaces and optional trailing semicolon:\n // \"function(x){return x.prop}\"\n // FYI - during local dev testing i observed carriage returns after the curly brackets as well\n // Note by maintainer: See https://github.com/IRCraziestTaxi/ts-simple-nameof/pull/13#issuecomment-567171802 for explanation of this regex.\n const matchRegex = /function\\s*\\(\\w+\\)\\s*\\{[\\r\\n\\s]*return\\s+\\w+\\.((\\w+\\.)*(\\w+))/i;\n\n const es5Match = fnStr.match(matchRegex);\n\n if (es5Match) {\n return (options && options.lastProp)\n ? es5Match[3]\n : es5Match[1];\n }\n\n // ES5 class name:\n // \"function ClassName() { ...\"\n if (fnStr.startsWith(\"function \")) {\n return cleanseAssertionOperators(\n fnStr.substring(\n \"function \".length,\n fnStr.indexOf(\"(\")\n )\n );\n }\n\n // Invalid function.\n throw new Error(\"ts-simple-nameof: Invalid function.\");\n}\n\nexport const stringFormat = (str: string, ...args: string[]) => str.replace(/{(\\d+)}/g, (_match, index) => args[index] || '')\n\nexport enum WebBrowser {\n Safari = \"Safari\",\n WebKit = \"WebKit\"\n}\n\nexport enum StorageDatatype {\n DialogId,\n ApiResponse,\n\tSafeSendToken,\n\tLoggedIn,\n\tOutlookAccessToken\n}\n\nexport enum SignalRHubType {\n\tAddinHub = \"/addinhub\",\n\tUIHub = \"/uihub\"\n}\n\nexport class StorageUtils {\n public sessionExists(sesssionStorageDatatype: StorageDatatype): boolean {\n let sessionStorageData = window.sessionStorage.getItem(StorageDatatype[sesssionStorageDatatype]);\n\n return sessionStorageData !== null;\n }\n\n public sessionGet(sessionStorageDatatype: StorageDatatype): any {\n return window.sessionStorage.getItem(StorageDatatype[sessionStorageDatatype]);\n }\n\n public sessionSet(sessionStorageDatatype: StorageDatatype, value: string): void {\n window.sessionStorage.setItem(StorageDatatype[sessionStorageDatatype], value);\n }\n\n public sessionRemove(sessionStorageDatatype: StorageDatatype): void {\n window.sessionStorage.removeItem(StorageDatatype[sessionStorageDatatype]);\n }\n\n public sessionClear(): void {\n window.sessionStorage.clear();\n }\n\n public localExists(storageDatatype: StorageDatatype): boolean {\n let storageData = window.localStorage.getItem(StorageDatatype[storageDatatype]);\n return storageData !== null;\n }\n\n public localGet(storageDatatype: StorageDatatype): any {\n return window.localStorage.getItem(StorageDatatype[storageDatatype]);\n }\n\n public localSet(storageDatatype: StorageDatatype, value: string): void {\n window.localStorage.setItem(StorageDatatype[storageDatatype], value);\n }\n\n public localRemove(storageDatatype: StorageDatatype): void {\n window.localStorage.removeItem(StorageDatatype[storageDatatype]);\n }\n\n public localClear(): void {\n window.localStorage.clear();\n }\n}\n\nexport function InjectLinkToString(separator: string, source: string, link: string): string {\n let parts = source.split(separator);\n let startLink = ``;\n let endLink = '';\n\n return parts[0].concat(startLink).concat(parts[1]).concat(endLink).concat(parts[2]);\n}\n\nexport function replaceColorTagToStyle(source: string): string {\n // search for color tags\n const regexp = new RegExp(\"color=(.+?)(?=>)\", \"g\");\n let colors: string[] = [];\n let match;\n while ((match = regexp.exec(source)) !== null) {\n colors.push(match[0].replace(\"color=\", \"\"));\n }\n\n // Replace style instead of tag\n colors.forEach((color) => {\n if (color.includes(',')) {\n source = source.replace(\"color=\" + color, 'div style=\"color:rgb(' + color + ')\"');\n } else {\n source = source.replace(\"color=\" + color, 'div style=\"color:' + color + '\"');\n }\n source = source.replace(\"/color\", \"/div\");\n });\n\n return source;\n}\n\nexport const storageUtils = new StorageUtils();","//Add new modules here\nexport enum Modules { \n SafeSend_Index,\n SafeSend_App,\n SafeSend_ConfirmableList,\n SafeSend_OfficeDialog,\n SafeSend_AddIn\n}","import { Checkbox, mergeStyleSets, Stack } from '@fluentui/react';\nimport * as React from 'react';\nimport { AttachmentConfirmableProps, AttachmentConfirmableStates } from './AttachmentTypes';\nimport { ITextProps, Text } from '@fluentui/react/lib/Text';\nimport { Icon } from '@fluentui/react';\nimport { getFileTypeIconProps } from '@fluentui/react-file-type-icons';\n\nconst classNames = mergeStyleSets({\n fileIconImg: {\n align: \"middle\",\n width: 20,\n height: 20,\n padding: '0px 4px 0px 4px',\n },\n});\n\nexport default class AttachmentConfirmable extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n stateUpdate: false,\n checked: false\n };\n this.handleChange = this.handleChange.bind(this);\n }\n\n static getDerivedStateFromProps(nextProps: AttachmentConfirmableProps, prevState: AttachmentConfirmableStates) {\n if (prevState.stateUpdate) {\n return ({ stateUpdate: false })\n }\n\n if (nextProps.checked !== prevState.checked) {\n return ({ checked: nextProps.checked })\n }\n\n return null\n }\n\n handleChange(e) {\n let checked = (e?.target as HTMLInputElement).checked;\n this.setState({\n checked: checked,\n stateUpdate: true\n });\n this.props.onChange(this.props.id, checked);\n }\n\n render() {\n return (\n \n {\n this.props.showCheckBox &&\n \n \n \n }\n { this.props.filename !== null &&\n \n \n \n }\n \n <>\n \n {this.props.filename}\n \n \n \n \n );\n }\n}","import { ITooltipProps, Stack, TooltipHost } from '@fluentui/react';\nimport * as React from 'react';\nimport AttachmentConfirmable from './AttachmentConfirmable';\nimport { AttachmentDlpProps } from \"./AttachmentTypes\";\n\nconst tooltipProps = (files: string[], alignRightToLeft: boolean) => {\n let attachments: ITooltipProps = {\n onRenderContent: () => (\n \n {\n files.map((filename, index) => (\n { }}>\n \n ))\n }\n \n )\n }\n\n return attachments;\n};\n\nexport default class AttachmentDlp extends React.Component {\n render() {\n return (\n <>\n {\n this.props.useTooltip &&\n \n {`[${this.props.pointCursorText}]`}\n \n }\n {\n !this.props.useTooltip &&\n \n {\n this.props.files.map((filename, index) => (\n { }}>\n \n ))\n }\n \n }\n \n );\n }\n}","import * as React from \"react\";\nimport { DetailsList, IColumn, SelectionMode, CheckboxVisibility, IDetailsHeaderStyles, IDetailsListProps, DetailsHeader} from '@fluentui/react/lib/DetailsList';\nimport { ITextFieldStyles, TextField } from '@fluentui/react/lib/TextField';\nimport { Stack, Label, IStackStyles, IStackTokens } from \"@fluentui/react\";\nimport { ClientKeywordDomainResultView, DlpResultSourceTypeEnum } from \"../Backend/BackendTypes\";\nimport { nameof } from '../../lib/Utils'\nimport AttachmentDlp from \"../Attachment/AttachmentDlp\";\nimport AttachmentConfirmable from \"../Attachment/AttachmentConfirmable\";\n\nconst textFieldStyles: Partial = { root: { width: 80, position: 'relative', paddingLeft: '5px' } };\nconst detailsHeaderStyles: Partial = { root: { height: '35px', paddingTop: '2px' } };\nconst _onRenderDetailsHeader: IDetailsListProps['onRenderDetailsHeader'] = props => {\n if (props) {\n return ;\n }\n\n return null;\n};\n\nconst confirmationStackTokens: IStackTokens = {\n childrenGap: 5,\n};\n\nconst stackTableStyles: Partial = {\n root: {\n border: '1px solid #ccc'\n }\n};\nconst stackTextFieldStyles: Partial = {\n root: {\n paddingTop: '15px'\n }\n};\n\nconst clientKeywordDomainResultsList = (props:\n {\n columnName1: string,\n columnName2: string,\n columnName3: string,\n columnName4: string,\n columnName5: string,\n confirmText: string,\n\t\tresults: ClientKeywordDomainResultView[],\n\t\tshowTextField: boolean,\n denySend: boolean,\n hasAttachments: boolean,\n onChangeAction: any,\n alignRightToLeft: boolean,\n pointCursorText: string,\n tooLongText: string\n }) => {\n let columns: IColumn[] = [\n {\n key: 'column1',\n name: props.columnName1,\n fieldName: `${nameof(c => c.sourceTypeString)}`,\n minWidth: 80,\n maxWidth: 80,\n isRowHeader: true,\n isResizable: true,\n data: 'string',\n isPadded: true,\n styles: {\n cellTitle: props.alignRightToLeft ? { flexDirection: \"row-reverse\" } : {}\n },\n onRender: (item: ClientKeywordDomainResultView) => (\n \n {item.sourceTypeString}\n \n )\n },\n {\n key: 'column2',\n name: props.columnName2,\n fieldName: `${nameof(c => c.attachmentPath)}`,\n minWidth: 100,\n maxWidth: 500,\n isRowHeader: true,\n isResizable: true,\n data: 'string',\n isPadded: true,\n styles: {\n cellTitle: props.alignRightToLeft ? { flexDirection: \"row-reverse\" } : {}\n },\n onRender: (item: ClientKeywordDomainResultView) => (\n \n {\n !item.groupBy && (item.sourceType === DlpResultSourceTypeEnum.Attachment || item.sourceType === DlpResultSourceTypeEnum.Filename || item.sourceType === DlpResultSourceTypeEnum.Body) &&\n { }}>\n \n }\n {\n item.groupBy && !item.tooLong &&\n \n \n }\n {\n item.groupBy && item.tooLong &&\n [{props.tooLongText}]\n }\n \n )\n },\n {\n key: 'column3',\n name: props.columnName3,\n fieldName: `${nameof(c => c.clientKeyword)}`,\n minWidth: 100,\n maxWidth: 150,\n isRowHeader: true,\n isResizable: true,\n data: 'string',\n isPadded: true,\n styles: {\n cellTitle: props.alignRightToLeft ? { flexDirection: \"row-reverse\" } : {}\n },\n onRender: (item: ClientKeywordDomainResultView) => (\n \n {item.clientKeyword}\n \n )\n },\n {\n key: 'column4',\n name: props.columnName4,\n fieldName: `${nameof(c => c.matchCount)}`,\n minWidth: 80,\n maxWidth: 80,\n isRowHeader: true,\n isResizable: true,\n data: 'string',\n isPadded: true,\n styles: {\n cellTitle: props.alignRightToLeft ? { flexDirection: \"row-reverse\" } : {}\n },\n onRender: (item: ClientKeywordDomainResultView) => (\n \n {item.matchCount}\n \n )\n },\n {\n key: 'column5',\n name: props.columnName5,\n fieldName: `${nameof(c => c.allowedDomain)}`,\n minWidth: 100,\n maxWidth: 200,\n isRowHeader: true,\n isResizable: true,\n data: 'string',\n isPadded: true,\n styles: {\n cellTitle: props.alignRightToLeft ? { flexDirection: \"row-reverse\" } : {}\n },\n onRender: (item: ClientKeywordDomainResultView) => (\n \n {item.allowedDomain}\n \n )\n }, \n ];\n\n if (!props.hasAttachments) {\n columns.splice(1, 1);\n } else {\n if (!props.results.some(r => r.attachmentPath !== null)) {\n columns.splice(1, 1);\n }\n }\n\n return (\n <>\n \n \n \n\t\t\t\n\t\t\t{\n\t\t\t\tprops.showTextField &&\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t}\n \n );\n}\n\nexport default clientKeywordDomainResultsList;","import * as React from \"react\";\nimport { Checkbox, CheckboxVisibility, DetailsHeader, DetailsList, IColumn, IDetailsHeaderStyles, IDetailsListProps, IStackStyles, IStackTokens, ITextFieldStyles, Label, SelectionMode, Stack, TextField } from \"@fluentui/react\";\nimport { ContentScanningResultView, DlpResultSourceTypeEnum } from \"../Backend/BackendTypes\";\nimport { nameof } from '../../lib/Utils'\nimport AttachmentConfirmable from \"../Attachment/AttachmentConfirmable\";\nimport AttachmentDlp from \"../Attachment/AttachmentDlp\";\n\nconst detailsHeaderStyles: Partial = { root: { height: '35px', paddingTop: '2px' } }\nconst textFieldStyles: Partial = { root: { width: 80, position: 'relative', paddingLeft: '5px' } };\n\nconst confirmationStackTokens: IStackTokens = {\n childrenGap: 5,\n};\n\nconst stackTextFieldStyles: Partial = {\n root: {\n paddingTop: '15px'\n }\n};\nconst stackTableStyles: Partial = {\n root: {\n border: '1px solid #ccc'\n }\n};\nconst _onRenderDetailsHeader: IDetailsListProps['onRenderDetailsHeader'] = props => {\n if (props) {\n return ;\n }\n return null;\n};\n\nconst contentScanningResultsList = (props:\n {\n columnName1: string,\n columnName2: string,\n columnName3: string,\n columnName4: string,\n columnName5: string,\n results: ContentScanningResultView[],\n denySend: boolean,\n hasAttachments: boolean,\n checkboxChecked: boolean,\n showTextField: boolean, \n showCheckbox: boolean,\n labelTextField: string,\n labelCheckbox: string,\n onChangeTextField: any\n onChangeCheckbox: any,\n alignRightToLeft: boolean,\n pointCursorText: string,\n tooLongText: string\n }) => {\n let columns: IColumn[] = [\n {\n key: 'column1',\n name: props.columnName1,\n fieldName: `${nameof(c => c.ruleName)}`,\n minWidth: 80,\n maxWidth: 80,\n isRowHeader: true,\n isResizable: true,\n data: 'string',\n isPadded: true,\n styles: {\n cellTitle: props.alignRightToLeft ? { flexDirection: \"row-reverse\" } : {}\n },\n onRender: (item: ContentScanningResultView) => (\n \n {item.ruleName}\n \n )\n },\n {\n key: 'column2',\n name: props.columnName2,\n fieldName: `${nameof(c => c.sourceTypeString)}`,\n minWidth: 80,\n maxWidth: 80,\n isRowHeader: true,\n isResizable: true,\n data: 'string',\n isPadded: true,\n styles: {\n cellTitle: props.alignRightToLeft ? { flexDirection: \"row-reverse\" } : {}\n },\n onRender: (item: ContentScanningResultView) => (\n \n {item.sourceTypeString}\n \n )\n },\n {\n key: 'column3',\n name: props.columnName3,\n fieldName: `${nameof(c => c.attachmentPath)}`,\n minWidth: 100,\n maxWidth: 500,\n isRowHeader: true,\n isResizable: true,\n data: 'string',\n isPadded: true,\n styles: {\n cellTitle: props.alignRightToLeft ? { flexDirection: \"row-reverse\" } : {}\n },\n onRender: (item: ContentScanningResultView) => (\n \n {\n !item.groupBy && (item.sourceType === DlpResultSourceTypeEnum.Attachment || item.sourceType === DlpResultSourceTypeEnum.Filename || item.sourceType === DlpResultSourceTypeEnum.Body) &&\n { }}>\n \n }\n {\n item.groupBy && !item.tooLong &&\n \n \n }\n {\n item.groupBy && item.tooLong &&\n [{props.tooLongText}]\n }\n \n )\n },\n {\n key: 'column4',\n name: props.columnName4,\n fieldName: `${nameof(c => c.firstMatch)}`,\n minWidth: 80,\n maxWidth: 210,\n isRowHeader: true,\n isResizable: true,\n data: 'string',\n isPadded: true,\n styles: {\n cellTitle: props.alignRightToLeft ? { flexDirection: \"row-reverse\" } : {}\n },\n onRender: (item: ContentScanningResultView) => (\n \n {item.firstMatch}\n \n )\n },\n {\n key: 'column5',\n name: props.columnName5,\n fieldName: `${nameof(c => c.matchCount)}`,\n minWidth: 80,\n maxWidth: 80,\n isRowHeader: true,\n isResizable: true,\n data: 'string',\n isPadded: true,\n styles: {\n cellTitle: props.alignRightToLeft ? { flexDirection: \"row-reverse\" } : {}\n },\n onRender: (item: ContentScanningResultView) => (\n \n {item.matchCount}\n \n )\n },\n ];\n\n if (!props.hasAttachments) {\n columns.splice(2, 1);\n } else {\n if (!props.results.some(r => r.attachmentPath !== null)) {\n columns.splice(2, 1);\n\t\t}\n }\n\n return (\n <>\n \n \n \n \n {\n props.showTextField &&\n \n \n \n \n }\n {\n props.showCheckbox &&\n \n \n \n }\n \n );\n}\n\nexport default contentScanningResultsList;\n","import * as React from 'react';\nimport { Checkbox, IStackTokens, Label, Stack } from '@fluentui/react';\nimport { IPersonaConfirmableProps, IPersonaConfirmableStates } from './PersonaConfirmableTypes';\n\nconst stackTokens: IStackTokens = {\n padding: `${0}px ${0}px ${5}px ${0}px`,\n};\n\nexport default class PersonaConfirmable extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n stateUpdate: false,\n checked: false\n };\n this.handleChange = this.handleChange.bind(this);\n }\n\n static getDerivedStateFromProps(nextProps: IPersonaConfirmableProps, prevState: IPersonaConfirmableStates) {\n if (prevState.stateUpdate) {\n return ({ stateUpdate: false })\n }\n\n if (nextProps.checked !== prevState.checked) {\n return ({ checked: nextProps.checked })\n }\n\n return null\n }\n\n handleChange(e) {\n let checked = (e?.target as HTMLInputElement).checked;\n this.setState({\n checked: checked,\n stateUpdate: true\n });\n this.props.onChange(this.props.id, checked);\n }\n\n render() {\n return (\n \n { \n this.props.showCheckBox &&\n \n }\n {\n this.props.colorDomains &&\n \n }\n {\n !this.props.colorDomains &&\n \n }\n \n );\n }\n}","import { Checkbox, IconButton, IStackTokens, Label, Stack } from '@fluentui/react';\nimport * as React from 'react';\nimport PersonaConfirmable from '../Persona/PersonaConfirmable';\nimport { IGroupRecipientsProps, IGroupRecipientsStates } from \"./GroupRecipientsTypes\";\n\nconst stackTokensPersonaLeft: IStackTokens = {\n padding: `${0}px ${0}px ${0}px ${54}px`,\n};\n\nconst stackTokensPersonaRigth: IStackTokens = {\n padding: `${0}px ${47}px ${0}px ${0}px`,\n};\n\nexport default class GroupRecipients extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n stateUpdate: false,\n checked: false,\n toggle: props.expanded\n };\n this.handleChange = this.handleChange.bind(this);\n this.handleToggle = this.handleToggle.bind(this);\n this.handleChangePersonaConfirmable = this.handleChangePersonaConfirmable.bind(this);\n }\n\n static getDerivedStateFromProps(nextProps: IGroupRecipientsProps, prevState: IGroupRecipientsStates) {\n if (prevState.stateUpdate) {\n return ({ stateUpdate: false })\n }\n\n if (nextProps.checked !== prevState.checked) {\n return ({ checked: nextProps.checked })\n }\n\n return null\n }\n\n handleToggle(_e) {\n this.setState({\n toggle: !this.state.toggle\n })\n }\n\n handleChange(e) {\n let checked = (e?.target as HTMLInputElement).checked;\n this.setState({\n checked: checked,\n stateUpdate: true\n });\n this.props.onChange(this.props.id, checked);\n }\n\n handleChangePersonaConfirmable(id: string, checked: boolean) {\n this.setState({\n checked: checked,\n stateUpdate: true\n });\n this.props.onChange(id, checked);\n }\n\n render() {\n return (\n <>\n { this.props.single &&\n \n \n }\n { !this.props.single &&\n \n \n \n \n \n \n {\n !this.state.toggle && \n }\n {\n this.state.toggle && \n }\n \n \n \n \n \n {\n this.state.toggle &&\n \n \n {\n this.props.colorDomains &&\n this.props.recipients.map(x => )\n }\n {\n !this.props.colorDomains &&\n this.props.recipients.map(x => )\n }\n \n \n }\n \n }\n \n );\n }\n}","import { EventEmitter } from 'events';\nimport { Modules } from '../LogConfiguration';\nimport configJson from '../config.json';\n\n\n//based on https://adrianhall.github.io/cloud/2019/06/30/building-an-efficient-logger-in-typescript/\nexport enum LogLevel {\n TRACE = 'TRACE',\n DEBUG = 'DEBUG',\n INFO = 'INFO',\n WARN = 'WARN',\n ERROR = 'ERROR'\n}\n\nexport class LogManager extends EventEmitter {\n private options: LogOptions = {\n minLevels: {\n }\n };\n\n // Prevent the console logger from being added twice\n private consoleLoggerRegistered: boolean = false;\n\n public configure(options: LogOptions): LogManager {\n this.options = Object.assign(this.options, options);\n return this;\n }\n\n public getLogger(module: string): Logger {\n let minLevel = 'none';\n let match = '';\n for (const key in this.options.minLevels) {\n if (module.startsWith(key) && key.length >= match.length) {\n minLevel = this.options.minLevels[key];\n match = key;\n }\n }\n\n return new Logger(this, module, minLevel);\n }\n\n public onLogEntry(listener: (logEntry: LogEntry) => void): LogManager {\n this.on('log', listener);\n return this;\n }\n\n public registerConsoleLogger(): LogManager {\n if (this.consoleLoggerRegistered) return this;\n\n this.onLogEntry((logEntry) => {\n const msg = `[${new Date().toLocaleString()}] [${logEntry.level}] [${logEntry.module}] ${logEntry.message} [${logEntry.location}]`;\n switch (logEntry.level) {\n case LogLevel.TRACE:\n console.trace(msg);\n break;\n case LogLevel.DEBUG:\n console.debug(msg);\n break;\n case LogLevel.INFO:\n console.info(msg);\n break;\n case LogLevel.WARN:\n console.warn(msg);\n break;\n case LogLevel.ERROR:\n console.error(msg);\n break;\n default:\n console.log(`{${logEntry.level}} ${msg}`);\n }\n });\n\n this.consoleLoggerRegistered = true;\n return this;\n }\n}\n\nexport interface LogEntry {\n level: LogLevel;\n module: string;\n location?: string;\n message: string;\n}\n\nexport interface LogOptions {\n minLevels: { [module: string]: string }\n}\n\nexport const logging = new LogManager();\n\nexport class Logger {\n private logManager: EventEmitter;\n private minLevel: number;\n private module: string;\n private readonly levels: { [key: string]: number } = {\n 'trace': 1,\n 'debug': 2,\n 'info': 3,\n 'warn': 4,\n 'error': 5\n };\n\n constructor(logManager: EventEmitter, module: string, minLevel: string) {\n this.logManager = logManager;\n this.module = module;\n this.minLevel = this.levelToInt(minLevel);\n }\n\n /**\n * Converts a string level (trace/debug/info/warn/error) into a number \n * \n * @param minLevel \n */\n private levelToInt(minLevel: string): number {\n if (minLevel.toLowerCase() in this.levels)\n return this.levels[minLevel.toLowerCase()];\n else\n return 99;\n }\n\n /**\n * Central logging method.\n * @param logLevel \n * @param message \n */\n public log(logLevel: LogLevel, message: string): void {\n const level = this.levelToInt(logLevel);\n if (level < this.minLevel) return;\n const logEntry: LogEntry = { level: logLevel, module: this.module, message };\n // Obtain the line/file through a thoroughly hacky method\n // This creates a new stack trace and pulls the caller from it. If the caller\n // if .trace()\n const error = new Error(\"\");\n if (error.stack) {\n const cla = error.stack.split(\"\\n\");\n var idx = 1;\n while (idx < cla.length && cla[idx].includes(\"at Logger.\")) idx++;\n if (idx < cla.length) {\n logEntry.location = cla[idx].slice(cla[idx].indexOf(\"at \") + 3, cla[idx].length);\n }\n }\n this.logManager.emit('log', logEntry);\n }\n\n public trace(message: string): void { this.log(LogLevel.TRACE, message); }\n public debug(message: string): void { this.log(LogLevel.DEBUG, message); }\n public info(message: string): void { this.log(LogLevel.INFO, message); }\n public warn(message: string): void { this.log(LogLevel.WARN, message); }\n public error(message: string): void { this.log(LogLevel.ERROR, message); }\n}\n\n//Custom Implementation\nexport class SafeSendLogging {\n private getMinLevels(): { [module: string]: string } {\n let minLevelsTemp = {}\n let logLevel: LogLevel = configJson.logLevel as LogLevel;\n for (let mod in Modules) {\n minLevelsTemp[Modules[mod]] = logLevel;\n }\n\n return minLevelsTemp;\n }\n\n public getLogger(module: Modules): Logger {\n logging.configure({\n minLevels: this.getMinLevels()\n }).registerConsoleLogger();\n\n return logging.getLogger(Modules[module]);\n }\n}\n\nexport const safeSendLogging = new SafeSendLogging();","import * as React from 'react';\nimport { Checkbox, FontIcon, IStackTokens, Label, mergeStyles, mergeStyleSets, Separator, Spinner, SpinnerType, Stack, TooltipHost } from '@fluentui/react';\nimport { IConfirmableProps, IConfirmableStates, IRecipientConfirmable, IAttachmentConfirmable } from './ConfirmableTypes';\nimport GroupRecipients from '../GroupRecipient/GroupRecipients';\nimport AttachmentConfirmable from '../Attachment/AttachmentConfirmable';\nimport { DlpItemStatus } from '../Backend/BackendTypes';\nimport { Modules } from '../../LogConfiguration';\nimport { safeSendLogging } from '../../lib/Logger';\n\nconst logger = safeSendLogging.getLogger(Modules.SafeSend_ConfirmableList);\n\nconst stackTokensRecipientsCheck: IStackTokens = {\n padding: `${0}px ${30}px ${0}px ${30}px`,\n};\n\nconst stackTokensFilesCheck: IStackTokens = {\n padding: `${0}px ${24}px ${0}px ${28}px`,\n};\n\nconst iconClass = mergeStyles({\n padding: 0,\n fontSize: '16px',\n verticalAlign: 'middle',\n maxHeight: '16px',\n maxWidth: '16px',\n});\n\nconst domainColors = [\"#69797E\", \"#A4262C\", \"#004E8C\", \"#0B6A0B\", \"#986F0B\"];\nconst colorByDomain = {};\n\nconst classNames = mergeStyleSets({\n error: [{ color: 'red', cursor: 'default' }, iconClass],\n warning: [{ color: '#ffc107', cursor: 'default' }, iconClass],\n info: [{ color: '#6c757d', cursor: 'default' }, iconClass],\n completed: [{ color: 'green', cursor: 'default' }, iconClass],\n});\n\nexport default class ConfirmableList extends React.Component {\n constructor(props) {\n super(props);\n this.state = { toConfirmableList: [], ccConfirmableList: [], bccConfirmableList: [], attachmentConfirmableList: [], allChecked: false, checked: false, updatedDlpstatus: false };\n this.handleChangeSelectAll = this.handleChangeSelectAll.bind(this);\n this.handleChangeConfirmable = this.handleChangeConfirmable.bind(this);\n }\n\n static getDerivedStateFromProps(nextProps: IConfirmableProps, prevState: IConfirmableStates) {\n if (prevState.updatedDlpstatus) {\n return ({ updatedDlpstatus: false })\n }\n\n if (nextProps.dlps.length > 0 && !prevState.updatedDlpstatus) {\n logger.debug('Fill from DLP items');\n nextProps.dlps.forEach(dlp => {\n prevState.attachmentConfirmableList.every(item => {\n if (item.dlp.id === dlp.id) {\n item.dlp.status = dlp.status;\n item.dlp.statusString = dlp.statusString;\n return false;\n }\n\n return true;\n });\n });\n\n return ({ attachmentConfirmableList: prevState.attachmentConfirmableList, updatedDlpstatus: true });\n }\n\n if (Object.keys(nextProps.apiResponse).length > 0 && prevState.toConfirmableList.length === 0 && prevState.ccConfirmableList.length === 0 && prevState.bccConfirmableList.length === 0) {\n logger.debug('Fill from API response');\n let precheckRecipients = nextProps.apiResponse.onSendProcessContex.settings._precheckRecipients;\n let singleColorIndex = 0;\n\n let confirmableListTo: IRecipientConfirmable[] = nextProps.apiResponse.unsafeRecipients?.to.map((recipient) => {\n if (!colorByDomain[recipient.domain]) {\n colorByDomain[recipient.domain] = domainColors[singleColorIndex];\n singleColorIndex++;\n if (singleColorIndex >= domainColors.length) {\n singleColorIndex -= domainColors.length;\n }\n\t\t\t\t}\n return (\n {\n id: recipient.id,\n single: true,\n checked: precheckRecipients,\n displayName: recipient.displayName,\n color: colorByDomain[recipient.domain],\n childrens: []\n }\n )\n })\n\n let confirmableListCc: IRecipientConfirmable[] = nextProps.apiResponse.unsafeRecipients?.cc.map((recipient) => {\n if (!colorByDomain[recipient.domain]) {\n colorByDomain[recipient.domain] = domainColors[singleColorIndex];\n singleColorIndex++;\n if (singleColorIndex >= domainColors.length) {\n singleColorIndex -= domainColors.length;\n }\n }\n return (\n {\n id: recipient.id,\n single: true,\n checked: precheckRecipients,\n displayName: recipient.displayName,\n color: colorByDomain[recipient.domain],\n childrens: []\n }\n )\n })\n\n let confirmableListBcc: IRecipientConfirmable[] = nextProps.apiResponse.unsafeRecipients?.bcc.map((recipient) => {\n if (!colorByDomain[recipient.domain]) {\n colorByDomain[recipient.domain] = domainColors[singleColorIndex];\n singleColorIndex++;\n if (singleColorIndex >= domainColors.length) {\n singleColorIndex -= domainColors.length;\n }\n }\n return (\n {\n id: recipient.id,\n single: true,\n checked: precheckRecipients,\n displayName: recipient.displayName,\n color: colorByDomain[recipient.domain],\n childrens: []\n }\n )\n })\n\n let colorIndex = 0;\n\n let confirmableListToGroup: IRecipientConfirmable[] = nextProps.apiResponse.unsafeRecipients?.toGroup.map((item) => {\n colorIndex++;\n if (colorIndex >= domainColors.length) {\n colorIndex -= domainColors.length;\n }\n return (\n {\n id: item.id,\n single: false,\n checked: precheckRecipients,\n displayName: item.domain,\n color: domainColors[colorIndex],\n childrens: item.recipients.map((recipient) => ({ id: recipient.id, displayName: recipient.displayName }))\n }\n )\n })\n\n let confirmableListCcGroup: IRecipientConfirmable[] = nextProps.apiResponse.unsafeRecipients?.ccGroup.map((item) => {\n colorIndex++;\n if (colorIndex >= domainColors.length) {\n colorIndex -= domainColors.length;\n }\n return (\n {\n id: item.id,\n single: false,\n checked: precheckRecipients,\n displayName: item.domain,\n color: domainColors[colorIndex],\n childrens: item.recipients.map((recipient) => ({ id: recipient.id, displayName: recipient.displayName }))\n }\n )\n })\n\n let confirmableListBccGroup: IRecipientConfirmable[] = nextProps.apiResponse.unsafeRecipients?.bccGroup.map((item) => {\n colorIndex++;\n if (colorIndex >= domainColors.length) {\n colorIndex -= domainColors.length;\n }\n return (\n {\n id: item.id,\n single: false,\n checked: precheckRecipients,\n displayName: item.domain,\n color: domainColors[colorIndex],\n childrens: item.recipients.map((recipient) => ({ id: recipient.id, displayName: recipient.displayName }))\n }\n )\n })\n\n let settings = nextProps.apiResponse.onSendProcessContex.settings;\n let confirmableAttachments: IAttachmentConfirmable[] = nextProps.apiResponse.unsafeAttachments?.map((item) => (\n {\n id: item.id,\n checked: precheckRecipients,\n displayName: item.filename,\n dlp: {\n id: item.id,\n status: nextProps.apiResponse.onSendProcessContex.scanStarted ? (item.contentType === \"none\" ? DlpItemStatus.Unsupported : DlpItemStatus.Scanning) : DlpItemStatus.ScanNotStarted,\n statusString: nextProps.apiResponse.onSendProcessContex.scanStarted ? (item.contentType === \"none\" ? settings._stringAttachmentStatusUnsupported : settings._stringAttachmentStatusScanning) : settings._stringAttachmentStatusScanNotStarted\n }\n }\n ))\n\n nextProps.onChange(precheckRecipients);\n\n return ({\n allChecked: precheckRecipients,\n checked: precheckRecipients,\n toConfirmableList: confirmableListTo.concat(confirmableListToGroup),\n ccConfirmableList: confirmableListCc.concat(confirmableListCcGroup),\n bccConfirmableList: confirmableListBcc.concat(confirmableListBccGroup),\n attachmentConfirmableList: confirmableAttachments\n })\n } \n\n return null\n }\n\n async handleChangeSelectAll(e) {\n let checked: boolean = (e?.target as HTMLInputElement).checked;\n\n this.state.toConfirmableList.forEach(item => { item.checked = checked; });\n this.state.ccConfirmableList.forEach(item => { item.checked = checked; });\n this.state.bccConfirmableList.forEach(item => { item.checked = checked; });\n this.state.attachmentConfirmableList.forEach(item => { item.checked = checked; });\n\n await this.setState({\n allChecked: checked,\n checked: checked,\n toConfirmableList: this.state.toConfirmableList,\n ccConfirmableList: this.state.ccConfirmableList,\n bccConfirmableList: this.state.bccConfirmableList,\n attachmentConfirmableList: this.state.attachmentConfirmableList\n });\n\n this.props.onChange(this.state.allChecked);\n }\n\n async handleChangeConfirmable(id: string, checked: boolean) {\n let notFound = false;\n notFound = this.state.toConfirmableList.every(item => {\n if (item.id === id) {\n item.checked = checked;\n return false;\n }\n\n return true;\n });\n\n if (notFound) {\n notFound = this.state.ccConfirmableList.every(item => {\n if (item.id === id) {\n item.checked = checked;\n return false;\n }\n\n return true;\n });\n } \n\n if (notFound) {\n notFound = this.state.bccConfirmableList.every(item => {\n if (item.id === id) {\n item.checked = checked;\n return false;\n }\n\n return true;\n });\n }\n\n if (notFound) {\n this.state.attachmentConfirmableList.every(item => {\n if (item.id === id) {\n item.checked = checked;\n return false;\n }\n\n return true;\n });\n }\n\n let allChecked = this.state.toConfirmableList.every(item => { return item.checked; });\n if (allChecked) {\n allChecked = this.state.ccConfirmableList.every(item => { return item.checked; });\n if (allChecked) {\n allChecked = this.state.bccConfirmableList.every(item => { return item.checked; });\n if (allChecked) {\n allChecked = this.state.attachmentConfirmableList.every(item => { return item.checked; });\n }\n }\n }\n\n await this.setState({\n allChecked: allChecked,\n checked: allChecked,\n toConfirmableList: this.state.toConfirmableList,\n ccConfirmableList: this.state.ccConfirmableList,\n bccConfirmableList: this.state.bccConfirmableList,\n attachmentConfirmableList: this.state.attachmentConfirmableList\n });\n\n this.props.onChange(this.state.allChecked);\n }\n\n render() {\n return (\n \n {\n !this.props.apiResponse.onSendProcessContex?.settings._disableSelectAll &&\n (this.props.apiResponse.unsafeRecipientsCount > 1 || this.props.apiResponse.unsafeAttachmentsCount > 0) &&\n this.props.apiResponse.unsafeRecipientsCount + this.props.apiResponse.unsafeAttachmentsCount >= this.props.apiResponse.onSendProcessContex?.settings._disableSelectAllForLessThanXCheckboxes &&\n \n }\n \n {\n this.state.toConfirmableList.length > 0 &&\n <>\n \n \n {\n this.state.toConfirmableList.map(item =>\n \n \n )\n }\n \n \n }\n {\n this.state.ccConfirmableList.length > 0 &&\n <>\n \n \n {\n this.state.ccConfirmableList.map(item => \n \n \n )\n }\n \n \n }\n {\n this.state.bccConfirmableList.length > 0 &&\n <>\n \n \n {\n this.state.bccConfirmableList.map(item =>\n \n \n )\n }\n \n \n }\n {\n this.state.attachmentConfirmableList.length > 0 &&\n <>\n { \n this.props.apiResponse.onSendProcessContex?.settings._showAttachmentsSeparator &&\n \n }\n \n \n \n \n \n \n \n \n \n \n \n {this.state.attachmentConfirmableList.map(item =>\n \n {\n !this.props.alignRightToLeft &&\n \n }\n \n {\n this.props.alignRightToLeft &&\n \n }\n {\n !this.props.alignRightToLeft &&\n \n }\n \n )}\n \n
\n \n \n \n {\n item.dlp.status === DlpItemStatus.Unsupported &&\n \n \n \n }\n {\n item.dlp.status === DlpItemStatus.Scanning && !this.props.scanTimedOut &&\n \n \n \n }\n {\n item.dlp.status === DlpItemStatus.Scanning && this.props.scanTimedOut &&\n \n \n \n }\n {\n item.dlp.status === DlpItemStatus.Error &&\n \n \n \n }\n {\n item.dlp.status === DlpItemStatus.PasswordProtected &&\n \n \n \n }\n {\n item.dlp.status === DlpItemStatus.ProtectedDocument &&\n \n \n \n }\n {\n item.dlp.status === DlpItemStatus.SensitiveDataFound &&\n \n \n \n }\n {\n item.dlp.status === DlpItemStatus.Success &&\n \n \n \n } \n \n \n \n \n
\n
\n \n }\n
\n
\n );\n }\n}","import axios, { AxiosError, AxiosResponse } from \"axios\";\nimport axiosRetry from \"axios-retry\";\nimport { OnSendPostProcessContextView, ApiResponseView, AppInfo, ConfirmInfo, EmailInfo, LoginModel, OutlookAttachment, PlatformConfig } from \"./components/Backend/BackendTypes\";\nimport configJson from \"./config.json\";\nimport { safeSendLogging } from \"./lib/Logger\";\nimport { Modules } from \"./LogConfiguration\";\n\nconst logger = safeSendLogging.getLogger(Modules.SafeSend_App);\n\nexport interface ApiResponse {\n\tstatusCode: number,\n\tcontent: T | null,\n\terrorMessage: string\n\terrorContent: any,\n\tisSuccessStatusCode: boolean\n}\n\naxiosRetry(axios, {\n\tretries: configJson.retryOptions.retries,\n\tretryDelay: (retryCount: number, error: AxiosError) => {\n\t\tlogger.error(`Retry attempt: (${retryCount} of ${configJson.retryOptions.retries}), Error Found: ${error.message}`);\n\t\treturn configJson.retryOptions.retryDelay\n\t},\n\tretryCondition: async (error: AxiosError) => {\n\t\tif (error.response?.status === 401) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (configJson.retryOptions.retryErrorCode === 200) {\n\t\t\treturn error.response?.status !== configJson.retryOptions.retryErrorCode\n\t\t}\n\t\telse {\n\t\t\treturn error.response?.status === configJson.retryOptions.retryErrorCode;\n\t\t}\n\t}\n});\n\nexport class RestClient {\n\tprivate getHeaders(authToken: string) {\n\t\tvar headers = { authorization: `Bearer ${authToken}` };\n\t\treturn { headers: headers };\n\t}\n\n\tprivate getApiResponse(statusCode: number, content: T): ApiResponse {\n\t\treturn { statusCode: statusCode, content: content, errorMessage: \"\", errorContent: {}, isSuccessStatusCode: statusCode === 200 }\n\t}\n\n\tprivate getApiResponseError(error: AxiosError): Error {\n\t\tif (error.response?.status === 401) {\n\t\t\treturn new UnauthorizedError(error.message, error.response);\n\t\t}\n\n\t\treturn new ConnectionError(error.message, error.response);\n\t}\n\n\tpublic login = async (outlookToken: string): Promise> => {\n\t\tvar headers = { outlookToken: outlookToken };\n\t\ttry {\n\t\t\tlet response = await axios.post(\"/api/login/\", {}, { headers: headers });\n\t\t\treturn this.getApiResponse(response.status, response.data);\n\t\t} catch (error) {\n\t\t\tthrow this.getApiResponseError(error as AxiosError);\n\t\t}\n\t}\n\n\tpublic getPlatformInfo = async (platformType: Office.PlatformType): Promise> => {\n\t\ttry {\n\t\t\tlet response = await axios.get(`api/settings/platform/${platformType}`);\n\t\t\treturn this.getApiResponse(response.status, response.data);\n\t\t} catch (error) {\n\t\t\tthrow this.getApiResponseError(error as AxiosError);\n\t\t}\n\t}\n\n\tpublic processMail = async (authToken: string, emailInfo: EmailInfo): Promise> => {\n\t\ttry {\n\t\t\tlet response = await axios.post(\"/api/mail\", emailInfo, this.getHeaders(authToken));\n\t\t\treturn this.getApiResponse(response.status, response.data);\n\t\t} catch (error) {\n\t\t\tthrow this.getApiResponseError(error as AxiosError);\n\t\t}\n\t}\n\n\tpublic cancelDlp = async (authToken: string): Promise> => {\n\t\ttry {\n\t\t\tlet response = await axios.delete(\"/api/mail/dlp\", this.getHeaders(authToken));\n\t\t\treturn this.getApiResponse(response.status, true);\n\t\t} catch (error) {\n\t\t\tthrow this.getApiResponseError(error as AxiosError);\n\t\t}\n\t}\n\n\tpublic postProcess = async (authToken: string, SendConfirmed: ConfirmInfo): Promise> => {\n\t\ttry {\n\t\t\tlet response = await axios.patch(\"/api/mail\", SendConfirmed, this.getHeaders(authToken));\n\t\t\treturn this.getApiResponse(response.status, response.data);\n\t\t} catch (error) {\n\t\t\tthrow this.getApiResponseError(error as AxiosError);\n\t\t}\n\t}\n\n\tpublic sendAttachmentPassword = async (authToken: string, password: string): Promise> => {\n\t\ttry {\n\t\t\tlet response = await axios.patch(\"/api/mail/dlp/attachments\", { password: password }, this.getHeaders(authToken));\n\t\t\treturn this.getApiResponse(response.status, true);\n\t\t} catch (error) {\n\t\t\tthrow this.getApiResponseError(error as AxiosError);\n\t\t}\n\t}\n\n\tpublic sendAttachmentContent = async (authToken: string, outlookAttachment: OutlookAttachment): Promise> => {\n\t\ttry {\n\t\t\tlet response = await axios.patch(\"/api/mail/dlp/attachment\", outlookAttachment, this.getHeaders(authToken));\n\t\t\treturn this.getApiResponse(response.status, true);\n\t\t} catch (error) {\n\t\t\tthrow this.getApiResponseError(error as AxiosError);\n\t\t}\n\t}\n\n\tpublic getAppInfo = async (): Promise> => {\n\t\ttry {\n\t\t\tlet response = await axios.get(\"/api/settings/version\");\n\t\t\treturn this.getApiResponse(response.status, response.data);\n\t\t} catch (error) {\n\t\t\tthrow this.getApiResponseError(error as AxiosError);\n\t\t}\n\t};\n\n\tpublic getAppSettings = async (authToken: string): Promise> => {\n\t\ttry {\n\t\t\tlet response = await axios.get(\"/api/settings\", this.getHeaders(authToken));\n\t\t\treturn this.getApiResponse(response.status, response.data);\n\t\t} catch (error) {\n\t\t\tthrow this.getApiResponseError(error as AxiosError);\n\t\t}\n\t};\n}\n\nexport const restClient = new RestClient();\n\nexport class ConnectionError extends Error {\n\tpublic response: AxiosResponse | null;\n\tconstructor(message: string, response: AxiosResponse | null = null) {\n\t\tsuper(message);\n\t\tthis.message = message;\n\t\tthis.name = \"ConnectionError\";\n\t\tthis.response = response;\n\t}\n}\n\nexport class UnauthorizedError extends Error {\n\tpublic response: AxiosResponse | null;\n\tconstructor(message: string, response: AxiosResponse | null = null) {\n\t\tsuper(message);\n\t\tthis.message = message;\n\t\tthis.name = \"UnauthorizedError\";\n\t\tthis.response = response;\n\t}\n}","export interface LoginResult {\n\tstatus: LoginResultStatus;\n\taccessToken: string;\n\terror: any;\n}\n\nexport enum LoginResultStatus {\n\tFailed,\n\tSucceeded\n}","import * as React from 'react';\nimport { FontIcon, Label, mergeStyles, mergeStyleSets, Stack } from '@fluentui/react';\nimport { browserName, engineName, engineVersion, fullBrowserVersion, osName, osVersion } from 'react-device-detect';\nimport { Text } from '@fluentui/react/lib/Text';\n\nconst iconClass = mergeStyles({\n padding: 0,\n fontSize: '48px',\n verticalAlign: 'middle',\n maxHeight: '48px',\n maxWidth: '48px',\n});\n\nconst classNames = mergeStyleSets({\n box: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: '100%'\n },\n info: [{ color: '#6c757d', cursor: 'default' }, iconClass],\n});\n\nexport default class LostConnectionPage extends React.Component {\n render() {\n return (\n \n \n \n\t\t\t\t{osName} {osVersion} - {browserName} {fullBrowserVersion} - {engineName} {engineVersion}\n \n );\n }\n}","/*global Office */ //Required for this to be found. see: https://github.com/OfficeDev/office-js-docs-pr/issues/691\n\nimport 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\nimport '@fluentui/react/dist/css/fabric.min.css';\nimport { Image } from '@fluentui/react/lib/Image';\nimport * as React from 'react';\nimport { Checkbox, ChoiceGroup, DefaultButton, FontIcon, IChoiceGroupOption, IMessageBarStyles, IPanelStyles, IScrollablePaneStyles, ITextFieldStyles, Label, MessageBar, MessageBarType, Panel, PanelType, PrimaryButton, ProgressIndicator, ScrollablePane, Separator, Sticky, StickyPositionType, TextField } from '@fluentui/react';\nimport { Stack, IStackTokens, IStackStyles } from '@fluentui/react/lib/Stack';\nimport { mergeStyles, mergeStyleSets } from '@fluentui/react/lib/Styling';\nimport { ApiResponseView, ActionOnMatch, ContentScanningResultView, ClientKeywordDomainResultView, TriggerEncryptionMode, UnprotectedAttachmentsMode } from './Backend/BackendTypes'\nimport ClientKeywordDomainResultsList from './Dlp/ClientKeywordDomainResultsList';\nimport ContentScanningResultsList from './Dlp/ContentScanningResultsList';\nimport ConfirmableList from './Confirmable/ConfirmableList';\nimport { IDlp } from './Confirmable/ConfirmableTypes';\nimport { Modules } from '../LogConfiguration';\nimport { safeSendLogging } from '../lib/Logger';\nimport { GroupByAttachments } from './App/AppTypes';\nimport { browserName } from 'react-device-detect';\nimport { WebBrowser, InjectLinkToString, replaceColorTagToStyle, storageUtils, StorageDatatype } from '../lib/Utils';\nimport { restClient } from '../RestClient';\nimport LostConnectionPage from './LostConnectionPage';\n\nconst logger = safeSendLogging.getLogger(Modules.SafeSend_OfficeDialog);\nconst textFieldStyles: Partial = { root: { position: 'relative', paddingLeft: '5px' } };\n\nconst stackTextFieldStyles: Partial = {\n\troot: {\n\t\tpaddingTop: '15px'\n\t}\n};\n\nconst confirmationStackTokens: IStackTokens = {\n\tchildrenGap: 5,\n};\n\nconst stringMainPolicySpaces: IStackTokens = {\n\tchildrenGap: 5,\n\tpadding: 5,\n};\n\nconst messageBarStylesRigth: IMessageBarStyles = {\n\tcontent: {\n\t\tflexDirection: \"row-reverse\",\n\t\ttextAlign: \"right\",\n\t},\n\tinnerText: {\n\t\twidth: \"100%\"\n\t}\n}\n\nconst stackTokens: IStackTokens = {\n\tpadding: 20,\n};\n\nconst iconNotificationClass = mergeStyles({\n\tpadding: '0px 0px 0px 5px',\n\tfontSize: '20px',\n\tverticalAlign: 'middle',\n\tmaxHeight: '20px',\n\tmaxWidth: '20px',\n});\n\nconst classNames = mergeStyleSets({\n\twrapper: {\n\t\theight: '100%',\n\t\tposition: 'relative',\n\t\tmaxHeight: 'inherit',\n\t},\n\tpane: {\n\t\tmaxWidth: '100%',\n\t\tborder: '1px solid #ccc',\n\t},\n\tsticky: {\n\t\tborder: '1px solid #ccc',\n\t\tpadding: '1px 0px 1px 0px',\n\t\tfontSize: '13px',\n\t},\n\ttextContent: {\n\t\tpadding: '15px 10px',\n\t},\n\tcontent: {\n\t\theight: '100%',\n\t},\n\tprogressIndicator: {\n\t\twidth: \"100%\",\n\t},\n\tnotificationArea: {\n\t\tdisplay: 'flex',\n\t},\n\terror: [{ color: 'red', cursor: 'default' }, iconNotificationClass],\n\twarning: [{ color: '#ffc107', cursor: 'default' }, iconNotificationClass],\n\tinfo: [{ color: '#6c757d', cursor: 'default' }, iconNotificationClass],\n\tcompleted: [{ color: 'green', cursor: 'default' }, iconNotificationClass],\n});\n\nconst notificationAreaStackTokens: IStackTokens = {\n\tchildrenGap: 5,\n\tpadding: '5px 0px 0px 0px',\n};\n\nconst scrollablePaneStyles: Partial = {\n\troot: classNames.pane,\n};\n\nconst panelStyles: Partial = {\n\tcontent: { height: \"100%\", minHeight: \"100%\", padding: \"0px 20px 0px 20px\", margin: \"0px\" },\n\theader: { padding: \"0px 0px 10px 19px\", margin: \"0px\" }\n}\n\ninterface ISettings {\n\tconfirmableAllSelected: boolean,\n\tbccWarningIfMoreThanX: boolean,\n\tshowConfirmContentScanningText: boolean,\n\tconfirmContentScanningText: string,\n\tshowConfirmContentScanningCheck: boolean,\n\tconfirmContentScanningCheck: boolean,\n\tshowConfirmClientKeywordsText: boolean,\n\tconfirmClientKeywordsText: string,\n\tdenySend: boolean,\n\tencryptYesSelected: boolean,\n\tencryptNoSelected: boolean,\n\tshowEncryptPrompt: boolean,\n\tconfirmUnprotectedAttachmentsCheck: boolean,\n\tattachmentPassword: string\n}\n\nexport interface DialogValues {\n\tsend: boolean;\n\tencrypt: boolean;\n\tshowEncryptPrompt: boolean;\n}\n\nexport interface DialogProps {\n\tdialogId: string,\n\tapiResponseView: ApiResponseView,\n\tdlps: IDlp[],\n\tconfirmationRequired: boolean;\n\tisDlpWaiting: boolean;\n\tscanTimedOut: boolean;\n\tcountUnprotectedAttachments: number;\n\tunprotectedAttachmentMessage: string;\n\tcontentScanningAction: ActionOnMatch;\n\tonRef: any;\n\tcontentScanningResults: ContentScanningResultView[];\n\tclientKeywordDomainResults: ClientKeywordDomainResultView[];\n\tgroupByAttachments: GroupByAttachments;\n}\n\nexport interface DialogState {\n\tisConnectionLost: boolean;\n\tenabledSend: boolean;\n\tdefaultValuesSettingUp: boolean;\n\tshowAttachmentPasswordPrompt: boolean;\n\thasShownPassowrdPrompt: boolean;\n\tenabledSubmitPassword: boolean;\n}\n\nexport default class OfficeDialog extends React.Component{\n\tsettings: ISettings;\n\tmailboxItem: any;\n\tsendEvent: any;\n\tconstructor(props, context) {\n\t\tsuper(props, context);\n\t\tthis.state = {\n\t\t\tisConnectionLost: false,\n\t\t\tenabledSend: false,\n\t\t\tdefaultValuesSettingUp: false,\n\t\t\tshowAttachmentPasswordPrompt: false,\n\t\t\thasShownPassowrdPrompt: false,\n\t\t\tenabledSubmitPassword: false\n\t\t}\n\n\t\tthis.settings = {\n\t\t\tconfirmableAllSelected: false,\n\t\t\tbccWarningIfMoreThanX: false,\n\t\t\tshowConfirmContentScanningText: false,\n\t\t\tconfirmContentScanningText: '',\n\t\t\tshowConfirmContentScanningCheck: false,\n\t\t\tconfirmContentScanningCheck: false,\n\t\t\tshowConfirmClientKeywordsText: false,\n\t\t\tconfirmClientKeywordsText: '',\n\t\t\tdenySend: false,\n\t\t\tencryptNoSelected: false,\n\t\t\tencryptYesSelected: false,\n\t\t\tshowEncryptPrompt: false,\n\t\t\tattachmentPassword: \"\",\n\t\t\tconfirmUnprotectedAttachmentsCheck: false\n\t\t}\n\n\t\tthis.closeDialog = this.closeDialog.bind(this);\n\t\tthis.attachmentPasswordRequest = this.attachmentPasswordRequest.bind(this);\n\t\tthis.attachmentSendPassword = this.attachmentSendPassword.bind(this);\n\t\tthis.setSendEnabled = this.setSendEnabled.bind(this);\n\t\tthis.isBccWarningVisible = this.isBccWarningVisible.bind(this);\n\t\tthis.isEncryptVisible = this.isEncryptVisible.bind(this);\n\t\tthis.setEncryptVisibility = this.setEncryptVisibility.bind(this);\n\t\tthis.isProcessMaxNrRecipients = this.isProcessMaxNrRecipients.bind(this);\n\t\tthis.validateEncryptionSelection = this.validateEncryptionSelection.bind(this);\n\t}\n\t\n\tcomponentDidMount() {\n\t\tthis.setDialogTimeout(240);\n\t\tthis.props.onRef(this);\n\n\t\twindow.addEventListener(\"storage\", () => {\n\t\t\tlet dialogId = storageUtils.localGet(StorageDatatype.DialogId) as string;\n\t\t\tif (this.props.dialogId !== dialogId) {\n\t\t\t\tlogger.warn(\"Dialog connection lost\");\n\t\t\t\tthis.setState({\n\t\t\t\t\tisConnectionLost: true\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.props.onRef(undefined)\n\t}\n\n\tcloseDialog(dialogOptions: DialogValues) {\n\t\tOffice.context.ui.messageParent(JSON.stringify(dialogOptions));\n\t}\n\n\tisBccWarningVisible() {\n\t\treturn this.props.apiResponseView.onSendProcessContex.confirmationFlags.showBccWarning;\n\t}\n\n\tisEncryptVisible() {\n\t\treturn this.settings.showEncryptPrompt;\n\t}\n\n\tsetEncryptVisibility(encrypt: boolean) {\n\t\tthis.settings.showEncryptPrompt = encrypt;\n\t}\n\n\tvalidateEncryptionSelection(option: string | undefined, isDefault: boolean): string | undefined {\n\t\tif (!this.state.defaultValuesSettingUp && isDefault) {\n\t\t\tthis.setState({\n\t\t\t\tdefaultValuesSettingUp: true,\n\t\t\t});\n\t\t}\n\n\t\tif (this.state.defaultValuesSettingUp && isDefault) {\n\t\t\treturn option;\n\t\t}\n\n\t\tif (option === 'Yes') {\n\t\t\tthis.settings.encryptYesSelected = true;\n\t\t\tthis.settings.encryptNoSelected = false;\n\t\t} else if (option === 'No') {\n\t\t\tthis.settings.encryptNoSelected = true;\n\t\t\tthis.settings.encryptYesSelected = false;\n\t\t}\n\t\tthis.setSendEnabled();\n\t\treturn option;\n\t}\n\n\tisUnprotectedAttachmentsNotificationVisible() {\n\t\treturn this.props.countUnprotectedAttachments > 0 &&\n\t\t\t(this.props.apiResponseView.onSendProcessContex.settings._unprotectedAttachmentsMode === UnprotectedAttachmentsMode.Notify\n\t\t\t\t|| this.props.apiResponseView.onSendProcessContex.settings._unprotectedAttachmentsMode === UnprotectedAttachmentsMode.Deny);\n\t}\n\n\tisUnprotectedAttachmentsComfirmationVisible() {\n\t\treturn this.props.countUnprotectedAttachments > 0 &&\n\t\t\tthis.props.apiResponseView.onSendProcessContex.settings._unprotectedAttachmentsMode === UnprotectedAttachmentsMode.Confirm;\n\t}\n\n\tisPasswordPromptVisible() {\n\t\treturn this.props.isDlpWaiting && ((this.props.apiResponseView.attachmentPasswordRequested && !this.state.hasShownPassowrdPrompt) || this.state.showAttachmentPasswordPrompt);\n\t}\n\n\tisProcessMaxNrRecipients(): boolean {\n\t\tlet recipients = this.props.apiResponseView.unsafeRecipients.to.concat(this.props.apiResponseView.unsafeRecipients.cc).concat(this.props.apiResponseView.unsafeRecipients.bcc);\n\t\tlet result = false;\n\t\trecipients.forEach((recipient) => {\n\t\t\tif (recipient.tooManyRecipientsCount > 0) {\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t});\n\t\treturn result;\n\t}\n\n\tsetDialogTimeout(timeoutSeconds: number) {\n\t\tvar timeoutMs = timeoutSeconds * 1000;\n\t\tsetTimeout(dialogTimeout, timeoutMs);\n\t\tfunction dialogTimeout() {\n\t\t\tlogger.info(\"Dialog timeout reached, closing dialog.\");\n\t\t\tlet dialogValues = JSON.stringify({ send: false, encrypt: false });\n\t\t\tOffice.context.ui.messageParent(dialogValues);\n\t\t}\n\t}\n\n\tattachmentPasswordRequest() {\n\t\tthis.setState({\n\t\t\tshowAttachmentPasswordPrompt: true\n\t\t});\n\t}\n\n\tasync attachmentSendPassword(password: string) {\n\t\tthis.setState({\n\t\t\thasShownPassowrdPrompt: true,\n\t\t\tshowAttachmentPasswordPrompt: false,\n\t\t\tenabledSubmitPassword: false\n\t\t});\n\n\t\tlet authToken = storageUtils.localGet(StorageDatatype.SafeSendToken) as string;\n\t\tawait restClient.sendAttachmentPassword(authToken, password);\n\t}\n\n\tsetSendEnabled() {\n\t\tthis.settings.denySend = this.props.contentScanningAction === ActionOnMatch.Deny\n\t\t\t|| (this.props.countUnprotectedAttachments !== 0 && this.props.apiResponseView.onSendProcessContex.settings._unprotectedAttachmentsMode === UnprotectedAttachmentsMode.Deny);\n\t\tthis.settings.showConfirmContentScanningCheck = this.props.contentScanningAction === ActionOnMatch.Confirm;\n\t\tthis.settings.showConfirmContentScanningText = this.props.contentScanningAction === ActionOnMatch.ConfirmText;\n\t\tthis.settings.showConfirmClientKeywordsText = this.props.clientKeywordDomainResults.length > 0 && !this.props.apiResponseView.onSendProcessContex.settings._clientKeywordDisableConfirm;\n\t\tlet enabled = this.settings.confirmableAllSelected && !this.props.isDlpWaiting && (this.isBccWarningVisible() ? this.settings.bccWarningIfMoreThanX : true)\n\t\t\t&& (this.props.contentScanningAction === ActionOnMatch.Inform\n\t\t\t\t|| (this.props.contentScanningAction === ActionOnMatch.Confirm && this.settings.confirmContentScanningCheck)\n\t\t\t\t|| (this.props.contentScanningAction === ActionOnMatch.ConfirmText && this.settings.confirmContentScanningText.toLowerCase() === \"confirm\"))\n\t\t\t&& (!this.settings.showConfirmClientKeywordsText || this.settings.confirmClientKeywordsText.toLowerCase() === \"confirm\")\n\t\t\t&& (!this.isEncryptVisible() || this.settings.encryptYesSelected || this.settings.encryptNoSelected)\n\t\t\t&& (this.props.countUnprotectedAttachments === 0\n\t\t\t\t|| this.props.apiResponseView.onSendProcessContex.settings._unprotectedAttachmentsMode === UnprotectedAttachmentsMode.Ignore\n\t\t\t\t|| this.props.apiResponseView.onSendProcessContex.settings._unprotectedAttachmentsMode === UnprotectedAttachmentsMode.Notify\n\t\t\t\t|| (this.props.apiResponseView.onSendProcessContex.settings._unprotectedAttachmentsMode === UnprotectedAttachmentsMode.Confirm\n\t\t\t\t\t&& this.settings.confirmUnprotectedAttachmentsCheck)\n\t\t\t)\n\t\t\t;\n\t\tthis.setState({\n\t\t\tenabledSend: enabled\n\t\t});\n\t}\n\n\trender() {\n\t\tif (this.props.apiResponseView.onSendProcessContex) {\n\t\t\tthis.setEncryptVisibility(this.props.apiResponseView.onSendProcessContex.confirmationFlags.showEncryptPrompt);\n\t\t}\n\t\tconst onRenderFooterContent = () => (\n\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t this.closeDialog({ send: true, encrypt: this.settings.encryptYesSelected, showEncryptPrompt: this.isEncryptVisible() })}\n\t\t\t\t\t\ttext={this.props.apiResponseView.onSendProcessContex?.settings._stringMainSendButton} disabled={!this.state.enabledSend} />\n\t\t\t\t\t\n\t\t\t\t\t this.closeDialog({ send: false, encrypt: false, showEncryptPrompt: this.isEncryptVisible() })}\n\t\t\t\t\t\ttext={this.props.apiResponseView.onSendProcessContex?.settings._stringMainCancelButton} />\n\t\t\t\t\n\t\t\t\n\t\t)\n\n\t\tconst isConnectionLost = Object.entries(this.props.apiResponseView).length === 0;\n\t\tif (this.props.apiResponseView.onSendProcessContex?.settings._triggerEncryptionMode === TriggerEncryptionMode.AskWhenFoundSensitiveContent\n\t\t\t&& this.props.contentScanningResults.length > 0) {\n\t\t\tlogger.debug(\"Asking to encrypt because sensitive content found\");\n\t\t\tthis.setEncryptVisibility(true);\n\t\t}\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{\n\t\t\t\t\t(isConnectionLost || this.state.isConnectionLost) &&\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t{\n\t\t\t\t\t!isConnectionLost && !this.state.isConnectionLost &&\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.isBccWarningVisible() &&\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t { this.settings.bccWarningIfMoreThanX = (e?.target as HTMLInputElement).checked; this.setSendEnabled(); }}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.props.apiResponseView.onSendProcessContex?.settings._showFromAddress &&\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.props.apiResponseView.onSendProcessContex?.confirmationFlags.displaySubject &&\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.isEncryptVisible() &&\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t | undefined, option: IChoiceGroupOption | undefined) => {\n\t\t\t\t\t\t\t\t\t\t\tif (option !== undefined) {\n\t\t\t\t\t\t\t\t\t\t\t\tthis.validateEncryptionSelection(option?.key, false);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tlabel={this.props.apiResponseView.onSendProcessContex?.settings._stringMainTriggerEncryptionQuestion}\n\t\t\t\t\t\t\t\t\t\toptions={[\n\t\t\t\t\t\t\t\t\t\t\t{ key: 'Yes', text: this.props.apiResponseView.onSendProcessContex?.settings._stringMainTriggerEncryptionOptionYes, styles: { field: { marginRight: \"15px\" } } },\n\t\t\t\t\t\t\t\t\t\t\t{ key: 'No', text: this.props.apiResponseView.onSendProcessContex?.settings._stringMainTriggerEncryptionOptionNo }]} >\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.isUnprotectedAttachmentsNotificationVisible() &&\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.isUnprotectedAttachmentsComfirmationVisible() &&\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t { this.settings.confirmUnprotectedAttachmentsCheck = (e?.target as HTMLInputElement).checked; this.setSendEnabled(); }}\n\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.props.confirmationRequired &&\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.apiResponseView.unsafeRecipients.isGroupByDomain &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.isProcessMaxNrRecipients()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? < div dangerouslySetInnerHTML={{ __html: replaceColorTagToStyle(this.props.apiResponseView.onSendProcessContex?.settings._stringMainMessageManyRecipients) }} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: this.props.apiResponseView.unsafeRecipients.toGroup.length > 1 || this.props.apiResponseView.unsafeRecipients.ccGroup.length > 1 || this.props.apiResponseView.unsafeRecipients.bccGroup.length > 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t?
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t:
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t!this.props.apiResponseView.unsafeRecipients.isGroupByDomain &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.isProcessMaxNrRecipients()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? < div dangerouslySetInnerHTML={{ __html: replaceColorTagToStyle(this.props.apiResponseView.onSendProcessContex?.settings._stringMainMessageManyRecipients) }} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: this.props.apiResponseView.unsafeRecipientsCount > 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? < div dangerouslySetInnerHTML={{ __html: replaceColorTagToStyle(this.props.apiResponseView.onSendProcessContex?.settings._stringMainMessageMultipleRecipients) }} />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t:
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.apiResponseView.unsafeAttachmentsCount > 0 &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.apiResponseView.onSendProcessContex?.settings._disableConfirmAttachments ?\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.apiResponseView.onSendProcessContex?.settings._stringMainFilesAttached :\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(this.props.apiResponseView.unsafeAttachmentsCount > 1 ?\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.apiResponseView.onSendProcessContex?.settings._stringMainFilesAttachedConfirmed :\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.apiResponseView.onSendProcessContex?.settings._stringMainFileAttachedConfirmed)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t { this.settings.confirmableAllSelected = allSelected; this.setSendEnabled(); }}\n\t\t\t\t\t\t\t\t\t\t\t\t\tapiResponse={this.props.apiResponseView}\n\t\t\t\t\t\t\t\t\t\t\t\t\tdenySend={this.settings.denySend}\n\t\t\t\t\t\t\t\t\t\t\t\t\tscanTimedOut={this.props.scanTimedOut}\n\t\t\t\t\t\t\t\t\t\t\t\t\tdlps={this.props.dlps}\n\t\t\t\t\t\t\t\t\t\t\t\t\talignRightToLeft={this.props.apiResponseView.alignRightToLeft}>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!this.props.scanTimedOut && !this.settings.denySend &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.props.apiResponseView.onSendProcessContex?.settings._stringContentScanningWrongClientWarning}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.scanTimedOut && this.settings.denySend &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.props.apiResponseView.onSendProcessContex?.settings._stringContentScanningWrongClientWarning} - {this.props.apiResponseView.onSendProcessContex?.settings._stringContentScanningTimedOutShort}, {this.props.apiResponseView.onSendProcessContex?.settings._stringContentScanningSendingNotAllowed}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.scanTimedOut && !this.settings.denySend &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.props.apiResponseView.onSendProcessContex?.settings._stringContentScanningWrongClientWarning} - {this.props.apiResponseView.onSendProcessContex?.settings._stringContentScanningTimedOutShort}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!this.props.scanTimedOut && this.settings.denySend &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.props.apiResponseView.onSendProcessContex?.settings._stringContentScanningWrongClientWarning} - {this.props.apiResponseView.onSendProcessContex?.settings._stringContentScanningSendingNotAllowed}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.groupByAttachments.groupByClientKeywordAttachments &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.props.groupByAttachments.groupByClientKeywordAttachmentsText}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tthis.props.clientKeywordDomainResults.length !== 0 &&\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t 0}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChangeAction={e => { this.settings.confirmClientKeywordsText = (e.target as HTMLInputElement).value; this.setSendEnabled(); }}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\talignRightToLeft={this.props.apiResponseView.alignRightToLeft}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpointCursorText={this.props.apiResponseView.onSendProcessContex?.settings._stringContentScanningPointCursorHere}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttooLongText={this.props.apiResponseView.onSendProcessContex?.settings._stringContentScanningTooLongToDisplay}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!this.props.scanTimedOut && !this.settings.denySend &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.props.apiResponseView.onSendProcessContex?.settings._stringContentScanningSensitiveContentFound}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.scanTimedOut && this.settings.denySend &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.props.apiResponseView.onSendProcessContex?.settings._stringContentScanningSensitiveContentFound} - {this.props.apiResponseView.onSendProcessContex?.settings._stringContentScanningTimedOutShort}, {this.props.apiResponseView.onSendProcessContex?.settings._stringContentScanningSendingNotAllowed}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.scanTimedOut && !this.settings.denySend &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.props.apiResponseView.onSendProcessContex?.settings._stringContentScanningSensitiveContentFound} - {this.props.apiResponseView.onSendProcessContex?.settings._stringContentScanningTimedOutShort}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!this.props.scanTimedOut && this.settings.denySend &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.props.apiResponseView.onSendProcessContex?.settings._stringContentScanningSensitiveContentFound} - {this.props.apiResponseView.onSendProcessContex?.settings._stringContentScanningSendingNotAllowed}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.groupByAttachments.groupByContentScanningAttachments &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{this.props.groupByAttachments.groupByContentScanningAttachmentsText}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tthis.props.contentScanningResults.length !== 0 &&\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t 0}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChangeCheckbox={(e) => { this.settings.confirmContentScanningCheck = (e?.target as HTMLInputElement).checked; this.setSendEnabled(); }}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChangeTextField={e => { this.settings.confirmContentScanningText = (e.target as HTMLInputElement).value; this.setSendEnabled(); }}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\talignRightToLeft={this.props.apiResponseView.alignRightToLeft}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpointCursorText={this.props.apiResponseView.onSendProcessContex?.settings._stringContentScanningPointCursorHere}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttooLongText={this.props.apiResponseView.onSendProcessContex?.settings._stringContentScanningTooLongToDisplay}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.isPasswordPromptVisible() &&\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tthis.settings.attachmentPassword = (e.target as HTMLInputElement).value;\n\t\t\t\t\t\t\t\t\t\t\tif (this.settings.attachmentPassword !== \"\") {\n\t\t\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\t\t\tenabledSubmitPassword: true\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\t\t\tenabledSubmitPassword: false\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tonKeyDown={e => {\n\t\t\t\t\t\t\t\t\t\t\tlet event = (e as React.KeyboardEvent);\n\t\t\t\t\t\t\t\t\t\t\tif (event.key === 'Enter') {\n\t\t\t\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\t\t\t\t\tthis.attachmentSendPassword(this.settings.attachmentPassword);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t this.attachmentSendPassword(this.settings.attachmentPassword)}\n\t\t\t\t\t\t\t\t\t\ttext={this.props.apiResponseView.onSendProcessContex?.settings._stringPasswordSubmit} disabled={!this.state.enabledSubmitPassword} />\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\tthis.props.apiResponseView.onSendProcessContex.scanStarted && this.props.isDlpWaiting &&\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tthis.props.apiResponseView.onSendProcessContex.scanStarted && !this.props.isDlpWaiting && !this.props.scanTimedOut &&\n\t\t\t\t\t\t\t\t\tthis.props.clientKeywordDomainResults.length === 0 && this.props.contentScanningResults.length === 0 &&\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tthis.props.apiResponseView.onSendProcessContex.scanStarted && !this.props.isDlpWaiting && this.props.scanTimedOut &&\n\t\t\t\t\t\t\t\t\tthis.props.clientKeywordDomainResults.length === 0 && this.props.contentScanningResults.length === 0 &&\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tthis.props.apiResponseView.onSendProcessContex?.confirmationFlags.showPolicyText &&\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t);\n\t}\n}\n","import { ActionOnMatch, ClientKeywordDomainResultView, ContentScanningResultView, DlpItemResultView, DlpResultSourceTypeEnum, DlpResultView, SettingsView, UnprotectedAttachmentsMode } from \"../Backend/BackendTypes\";\nimport { IDlp } from \"../Confirmable/ConfirmableTypes\";\nimport { AppStateUI, GroupByAttachments, IProcessedContentScanningResults } from \"./AppTypes\";\nimport { stringFormat, nameof } from \"../../lib/Utils\";\n\nexport class AppUtils {\n private getGroupAttachment(results: T[], isContentScanning: boolean): T[] {\n let copyResults: T[] = [];\n let groupBy = {}; \n results.forEach((item) => {\n if (item.sourceType === DlpResultSourceTypeEnum.Attachment) {\n let key: string = isContentScanning ? item.firstMatch : item.clientKeyword;\n let group = groupBy[key] as T;\n if (group) {\n group.matchCount += item.matchCount;\n group.files.push(item.attachmentPath)\n } else {\n item.files.push(item.attachmentPath);\n item.groupBy = true;\n groupBy[key] = item;\n }\n } else {\n copyResults.push(item);\n }\n });\n\n for (let key in groupBy) {\n var item = groupBy[key] as T;\n var filterFiles = item.files.filter((elem, index, self) => {\n return index === self.indexOf(elem);\n })\n\n item.files = filterFiles;\n let length = item.files.join().length;\n item.tooLong = false;\n if (length > 60) {\n if (length <= 5000) {\n item.useTooltip = true;\n } else {\n item.tooLong = true;\n item.files = [];\n }\n } else {\n item.useTooltip = false;\n }\n\n item.files = item.files.sort(function (a, b) {\n return a > b ? 1 : -1;\n })\n\n copyResults.push(item);\n }\n\n return copyResults;\n }\n\n private getContentScanningAction(currentAction: ActionOnMatch, newAction: ActionOnMatch): ActionOnMatch {\n switch (currentAction) {\n case ActionOnMatch.Confirm:\n if (newAction === ActionOnMatch.Inform) {\n return currentAction;\n }\n break;\n case ActionOnMatch.ConfirmText:\n if (newAction === ActionOnMatch.Inform || newAction === ActionOnMatch.Confirm) {\n return currentAction;\n }\n break;\n case ActionOnMatch.Deny:\n return currentAction;\n }\n\n return newAction;\n }\n\n public getStateForUpdateUI(\n settings: SettingsView,\n clientKeywordDomainResults: ClientKeywordDomainResultView[],\n contentScanningResults: ContentScanningResultView[],\n currentContentScanningAction: ActionOnMatch,\n groupClientKeywordAttachments: boolean,\n groupContentScanningAttachments: boolean,\n dlpItemResults: DlpItemResultView[],\n isDlpWaiting: boolean,\n scanTimedOut: boolean,\n countUnprotectedAttachments: number\n ): AppStateUI {\n let dlps: IDlp[] = [];\n dlpItemResults.forEach((dlpItemResult) => {\n let processedContentScanningResults = this.getProcessedContentScanningResults(settings, currentContentScanningAction, dlpItemResult.contentScanResults);\n currentContentScanningAction = processedContentScanningResults.actionOnMatch;\n contentScanningResults = contentScanningResults.concat(processedContentScanningResults.contentScanningResultView);\n\n let processedClientKeywordDomainResults = this.getProcessedClientKeywordDomainResults(settings, dlpItemResult.clientKeywordDomainResults);\n clientKeywordDomainResults = clientKeywordDomainResults.concat(processedClientKeywordDomainResults);\n\n if (dlpItemResult.isAttachment) {\n dlps.push({ id: dlpItemResult.id, status: dlpItemResult.status, statusString: dlpItemResult.statusString });\n if (dlpItemResult.containsUnprotectedAttachment) {\n countUnprotectedAttachments++;\n }\n }\n });\n\n let unprotectedAttachmentMessage = \"\";\n if (countUnprotectedAttachments === 1) {\n switch (settings._unprotectedAttachmentsMode) {\n case UnprotectedAttachmentsMode.Confirm:\n unprotectedAttachmentMessage = settings._stringNotEncryptedAttachmentConfirm;\n break;\n case UnprotectedAttachmentsMode.Deny:\n unprotectedAttachmentMessage = settings._stringNotEncryptedAttachmentDeny;\n break;\n default:\n unprotectedAttachmentMessage = settings._stringNotEncryptedAttachmentNotify;\n break;\n }\n }\n else {\n switch (settings._unprotectedAttachmentsMode) {\n case UnprotectedAttachmentsMode.Confirm:\n unprotectedAttachmentMessage = settings._stringNotEncryptedAttachmentsConfirm;\n break;\n case UnprotectedAttachmentsMode.Deny:\n unprotectedAttachmentMessage = settings._stringNotEncryptedAttachmentsDeny;\n break;\n default:\n unprotectedAttachmentMessage = settings._stringNotEncryptedAttachmentsNotify;\n break;\n }\n }\n\n\n if (groupClientKeywordAttachments) {\n clientKeywordDomainResults = this.getGroupAttachment(clientKeywordDomainResults, false);\n }\n\n if (groupContentScanningAttachments)\n {\n contentScanningResults = this.getGroupAttachment(contentScanningResults, true);\n }\n\n clientKeywordDomainResults = this.copyAndSort(clientKeywordDomainResults, `${nameof(c => c.attachmentPath)}`, false);\n\n contentScanningResults = this.copyAndSort(contentScanningResults, `${nameof(c => c.attachmentPath)}`, false);\n\n return {\n isDlpWaiting: isDlpWaiting,\n scanTimedOut: scanTimedOut,\n clientKeywordDomainResults: clientKeywordDomainResults,\n contentScanningResults: contentScanningResults,\n contentScanningAction: currentContentScanningAction,\n dlps: dlps,\n countUnprotectedAttachments: countUnprotectedAttachments,\n unprotectedAttachmentMessage: unprotectedAttachmentMessage\n };\n }\n\n public copyAndSort(items: T[], columnKey: string, isSortedDescending?: boolean): T[] {\n const key = columnKey as keyof T;\n return items.slice(0).sort((a: T, b: T) => ((isSortedDescending ? a[key] < b[key] : a[key] > b[key]) ? 1 : -1));\n }\n\n public getProcessedClientKeywordDomainResults(settings: SettingsView, clientKeywordDomainResults: ClientKeywordDomainResultView[]): ClientKeywordDomainResultView[] {\n clientKeywordDomainResults.forEach((clientKeywordDomainResult) => {\n switch (clientKeywordDomainResult.sourceType) {\n case DlpResultSourceTypeEnum.Attachment:\n clientKeywordDomainResult.sourceTypeString = settings._stringContentScanningEmailAttachment;\n break;\n case DlpResultSourceTypeEnum.Body:\n clientKeywordDomainResult.sourceTypeString = settings._stringContentScanningEmailContent;\n break;\n case DlpResultSourceTypeEnum.Filename:\n clientKeywordDomainResult.sourceTypeString = settings._stringContentScanningEmailFileName;\n break;\n case DlpResultSourceTypeEnum.Subject:\n clientKeywordDomainResult.sourceTypeString = settings._stringContentScanningEmailSubject;\n break;\n }\n });\n\n return clientKeywordDomainResults;\n }\n\n public getProcessedContentScanningResults(settings: SettingsView, currentAction: ActionOnMatch, contentScanResults: ContentScanningResultView[]): IProcessedContentScanningResults {\n contentScanResults.forEach((contentScanningResult) => {\n currentAction = this.getContentScanningAction(currentAction, contentScanningResult.actionOnMatch);\n switch (contentScanningResult.sourceType) {\n case DlpResultSourceTypeEnum.Attachment:\n contentScanningResult.sourceTypeString = settings._stringContentScanningEmailAttachment;\n break;\n case DlpResultSourceTypeEnum.Body:\n contentScanningResult.sourceTypeString = settings._stringContentScanningEmailContent;\n break;\n case DlpResultSourceTypeEnum.Filename:\n contentScanningResult.sourceTypeString = settings._stringContentScanningEmailFileName;\n break;\n case DlpResultSourceTypeEnum.Subject:\n contentScanningResult.sourceTypeString = settings._stringContentScanningEmailSubject;\n break;\n }\n });\n\n return {\n contentScanningResultView: contentScanResults,\n actionOnMatch: currentAction\n };\n }\n\n public getGroupByAttachments(\n settings: SettingsView,\n groupByAttachments: GroupByAttachments,\n dlpItemResults: DlpItemResultView[]\n ): GroupByAttachments {\n dlpItemResults.forEach((item) => {\n if (item.isAttachment) {\n groupByAttachments.countTotalAttachmentsScanned++;\n }\n\n groupByAttachments.countTotalClientKeyword += item.clientKeywordDomainResults.length;\n item.clientKeywordDomainResults.forEach((ck) => {\n groupByAttachments.countTotalClientKeywordMatches += ck.matchCount;\n });\n\n groupByAttachments.countTotalContentScanning += item.contentScanResults.length;\n item.contentScanResults.forEach((cs) => {\n groupByAttachments.countTotalContentScanningMatches += cs.matchCount;\n });\n });\n\n groupByAttachments.groupByClientKeywordAttachments = groupByAttachments.groupByClientKeywordAttachments ? true : groupByAttachments.countTotalClientKeyword > settings._contentScanningMaxNrMatchesBeforeTryingToGroupByAttachment;\n groupByAttachments.groupByContentScanningAttachments = groupByAttachments.groupByContentScanningAttachments ? true : groupByAttachments.countTotalContentScanning > settings._contentScanningMaxNrMatchesBeforeTryingToGroupByAttachment;\n\n if (groupByAttachments.groupByClientKeywordAttachments) {\n groupByAttachments.groupByClientKeywordAttachmentsText = stringFormat(settings._stringContentScanningTooManyMatches, `${groupByAttachments.countTotalClientKeywordMatches}`, `${groupByAttachments.countTotalAttachmentsScanned}`);\n }\n\n if (groupByAttachments.groupByContentScanningAttachments) {\n groupByAttachments.groupByContentScanningAttachmentsText = stringFormat(settings._stringContentScanningTooManyMatches, `${groupByAttachments.countTotalContentScanningMatches}`, `${groupByAttachments.countTotalAttachmentsScanned}`);\n }\n\n return groupByAttachments;\n }\n}\n\nexport const appUtils = new AppUtils();","/*global Office */ //Required for this to be found. see: https://github.com/OfficeDev/office-js-docs-pr/issues/691\n\nimport 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\nimport '@fluentui/react/dist/css/fabric.min.css';\nimport * as React from 'react';\nimport { Label } from '@fluentui/react/lib/Label';\nimport { DefaultButton } from '@fluentui/react/lib/Button';\nimport { ApiResponseView } from './Backend/BackendTypes'\nimport { Modules } from '../LogConfiguration';\nimport { safeSendLogging } from '../lib/Logger';\nimport { IStackTokens, Panel, PanelType, Separator, Stack } from '@fluentui/react';\nimport { StorageDatatype, storageUtils } from '../lib/Utils';\nimport LostConnectionPage from './LostConnectionPage';\n\nconst logger = safeSendLogging.getLogger(Modules.SafeSend_OfficeDialog);\n\nconst stackToken: IStackTokens = {\n padding: \"0px 0px 0px 50px\",\n};\n\nexport interface ForbiddenRecipientDialogProps {\n dialogId: string;\n apiResponseView: ApiResponseView;\n}\n\nexport interface ForbiddenRecipientDialogState {\n isConnectionLost: boolean;\n}\n\nexport default class ForbiddenRecipientDialog extends React.Component{\n sendEvent: any;\n constructor(props, context) {\n super(props, context);\n this.state = {\n isConnectionLost: false\n }\n this.closeDialog = this.closeDialog.bind(this);\n }\n\n componentDidMount() {\n this.setDialogTimeout(240);\n\n window.addEventListener(\"storage\", () => {\n let dialogId = storageUtils.localGet(StorageDatatype.DialogId) as string;\n if (this.props.dialogId !== dialogId) {\n this.setState({\n isConnectionLost: true\n });\n }\n });\n }\n\n closeDialog() {\n let dialogValues = JSON.stringify({ send: false, encrypt: false });\n Office.context.ui.messageParent(dialogValues);\n }\n\n setDialogTimeout(timeoutSeconds: number) {\n var timeoutMs = timeoutSeconds * 1000;\n setTimeout(dialogTimeout, timeoutMs);\n function dialogTimeout() {\n logger.info(\"Dialog timeout reached, closing dialog.\");\n Office.context.ui.messageParent(JSON.stringify({ send: false, encrypt: false }));\n }\n }\n\n render() {\n let recipients: string[] = [];\n let i = 0;\n for (; i++; i < this.props.apiResponseView.onSendProcessContex.forbiddenRecipients.length && i < 10) {\n let x = this.props.apiResponseView.onSendProcessContex.forbiddenRecipients[i];\n let name = x.name + (x.isList ? \" (\" + this.props.apiResponseView.onSendProcessContex.settings._stringMainListIdentifier + \")\" : \"\");\n recipients.push(name);\n }\n\n const onRenderFooterContent = () => (\n \n \n \n \n \n this.closeDialog()}\n text={this.props.apiResponseView.onSendProcessContex?.settings._stringMainCancelButton} />\n \n \n )\n\n return (\n <>\n {\n\t\t\t\t\tthis.state.isConnectionLost &&\n\t\t\t\t\t\n }\n {\n !this.state.isConnectionLost &&\n \n \n {\n this.props.apiResponseView.onSendProcessContex.forbiddenRecipients.length === 1 && \n \n }\n {\n this.props.apiResponseView.onSendProcessContex.forbiddenRecipients.length !== 1 &&\n \n }\n {\n \n {\n this.props.apiResponseView.onSendProcessContex.forbiddenRecipients.slice(0, 10).map((fr, i) => {\n return ()\n })\n }\n {\n this.props.apiResponseView.onSendProcessContex.forbiddenRecipients.length > 10 &&\n \n }\n \n }\n \n }\n \n );\n }\n}\n","import * as React from 'react';\nimport { mergeStyleSets, Spinner, SpinnerSize, Stack } from '@fluentui/react';\nimport { Text } from '@fluentui/react/lib/Text';\n\nconst classNames = mergeStyleSets({\n mainSpinner: {\n width: '100px',\n height: '100px'\n },\n box: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: '100%'\n }\n});\n\nexport interface OutlookSpinnerProps {\n message: string\n}\n\nexport default class OutlookSpinner extends React.Component {\n render() {\n return (\n <>\n \n
\n\t\t\t\t\t\n\t\t\t\t\t{this.props.message}\n
\n \n );\n }\n}","var prefix = \"SafeSend:\";\n\nexport class NotificationLogger {\n public infoReplace(mailboxItem: (Office.Item & Office.ItemCompose & Office.ItemRead & Office.Message & Office.MessageCompose & Office.MessageRead & Office.Appointment & Office.AppointmentCompose & Office.AppointmentRead) | undefined, id: string, message: string): void {\n mailboxItem?.notificationMessages.replaceAsync(id, this.getJsonMessage(Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage, message));\n }\n\n public errorReplace(mailboxItem: (Office.Item & Office.ItemCompose & Office.ItemRead & Office.Message & Office.MessageCompose & Office.MessageRead & Office.Appointment & Office.AppointmentCompose & Office.AppointmentRead) | undefined, id: string, message: string): void {\n mailboxItem?.notificationMessages.replaceAsync(id, this.getJsonMessage(Office.MailboxEnums.ItemNotificationMessageType.ErrorMessage, message));\n }\n\n public progressReplace(mailboxItem: (Office.Item & Office.ItemCompose & Office.ItemRead & Office.Message & Office.MessageCompose & Office.MessageRead & Office.Appointment & Office.AppointmentCompose & Office.AppointmentRead) | undefined, id: string, message: string): void {\n mailboxItem?.notificationMessages.replaceAsync(id, this.getJsonMessage(Office.MailboxEnums.ItemNotificationMessageType.ProgressIndicator, message));\n }\n\n public remove(mailboxItem: (Office.Item & Office.ItemCompose & Office.ItemRead & Office.Message & Office.MessageCompose & Office.MessageRead & Office.Appointment & Office.AppointmentCompose & Office.AppointmentRead) | undefined, id: string): void {\n mailboxItem?.notificationMessages.removeAsync(id);\n }\n\n private getJsonMessage(type: Office.MailboxEnums.ItemNotificationMessageType, message: string): Office.NotificationMessageDetails {\n if (type === Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage) {\n return { type: type, message: `${prefix} ${message}`, icon: \"iconid\", persistent: false }\n }\n\n return { type: type, message: `${prefix} ${message}` }\n }\n}\n\nexport const notificationLogger = new NotificationLogger();","/* global Office */ //Required for this to be found. see: https://github.com/OfficeDev/office-js-docs-pr/issues/691\n//import 'office-js';\nimport * as signalR from '@microsoft/signalr';\nimport { notificationLogger } from './NotificationMessage';\nimport { Modules } from '../LogConfiguration';\nimport { safeSendLogging } from './Logger';\nimport { ConnectionError, restClient, UnauthorizedError } from '../RestClient';\nimport { ApiResponseView, ConfirmInfo, EmailInfo, EmailRecipient, LicenseKeyStatus, LoginModel, OutlookAttachment, PlatformConfig, RecipientSendType, SignalRAddInHubMethods } from '../components/Backend/BackendTypes';\nimport { SignalRHubType, StorageDatatype, storageUtils } from './Utils';\nimport { DialogValues } from '../components/OfficeDialog';\nimport { LoginResult, LoginResultStatus } from '../components/Login/LoginTypes';\n\nconst logger = safeSendLogging.getLogger(Modules.SafeSend_AddIn);\nvar globalMailboxItem: (Office.Item & Office.ItemCompose & Office.ItemRead & Office.Message & Office.MessageCompose & Office.MessageRead & Office.Appointment & Office.AppointmentCompose & Office.AppointmentRead) | undefined\nvar globalAppInfo: { host: Office.HostType, platform: Office.PlatformType };\nvar globalEmailData: IEmailSettings;\nvar globalSendEvent: any;\nvar globalAddInDialogInstance: Office.Dialog | null = null;\nvar globalLoginDialogInstance: Office.Dialog | null = null;\nvar globalRetryAttempt: number = 0;\nvar globalMaxRetryAttempt: number = 1;\nvar globalApiResponseView: ApiResponseView;\nvar globalIsCurrentWorkflowRestarting = false;\nvar globalPlatformConfig: PlatformConfig = {\n\tattachmentSizeThreshold: 0,\n\tenabled: false,\n\tisOffice365: false,\n\tretryOnServerConnectionReset: 0\n}\n\n//Initialization of the Office.js library\nOffice.onReady(function (info) {\n\tif (Office.context.mailbox === undefined) {\n\t\treturn;\n\t}\n\n\tglobalAppInfo = info;\n\tglobalMailboxItem = Office.context.mailbox.item;\n\tnotificationLogger.infoReplace(globalMailboxItem, \"i1\", \"Initialized\");\n});\n\ninterface IEmailSettings {\n\titemId: string,\n\toutlookToken: string;\n}\n\nexport function setSubjectAsync(\n\tmailboxItem: (Office.Item & Office.ItemCompose & Office.ItemRead & Office.Message & Office.MessageCompose & Office.MessageRead & Office.Appointment & Office.AppointmentCompose & Office.AppointmentRead) | undefined,\n\tnewSubject: string,\n): Promise {\n\treturn new Promise((resolve, reject) => {\n\t\tmailboxItem?.subject.setAsync(newSubject, { asyncContext: {} }, (asyncResult) => {\n\t\t\tif (asyncResult.status === Office.AsyncResultStatus.Succeeded) {\n\t\t\t\tresolve();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treject();\n\t\t\t}\n\t\t});\n\t});\n}\n\nexport function setBodyAsync(\n\tmailboxItem: (Office.Item & Office.ItemCompose & Office.ItemRead & Office.Message & Office.MessageCompose & Office.MessageRead & Office.Appointment & Office.AppointmentCompose & Office.AppointmentRead) | undefined,\n\tnewBody: string,\n\tcoercionType: Office.CoercionType\n): Promise {\n\treturn new Promise((resolve, reject) => {\n\t\tmailboxItem?.body.setAsync(newBody, { coercionType: coercionType, asyncContext: {} }, (asyncResult) => {\n\t\t\tif (asyncResult.status === Office.AsyncResultStatus.Succeeded) {\n\t\t\t\tresolve();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlogger.error(JSON.stringify(asyncResult.error));\n\t\t\t\treject();\n\t\t\t}\n\t\t});\n\t});\n}\n\nexport async function processOnSendEvent(sendEvent) {\n\ttry {\n\t\tglobalSendEvent = sendEvent;\n\t\tlet dialogId = Math.random().toString(36).substr(2, 9);\n\t\tstorageUtils.localSet(StorageDatatype.DialogId, dialogId);\n\t\tlogger.debug(\"1. On-Send throwed\");\n\n\t\tlet responsePlatform = await restClient.getPlatformInfo(globalAppInfo.platform);\n\t\tif (responsePlatform.content == null) {\n\t\t\tlogger.info(`responsePlatform.content is null`);\n\t\t\treturn;\n\t\t}\n\n\t\tglobalPlatformConfig = responsePlatform.content;\n\t\tif (!globalPlatformConfig?.enabled) {\n\t\t\tlogger.info(`${globalAppInfo.platform} platform disabled`);\n\t\t\tprocessSendEmail(sendEvent);\n\t\t\treturn;\n\t\t}\n\n\t\tnotificationLogger.infoReplace(globalMailboxItem, \"i1\", \"Verifying...\");\n\t\tglobalEmailData = await saveItemAndGetOutlookTokenAsync(responsePlatform.content.isOffice365, globalMailboxItem);\n\t\tlet success = true;\n\t\tif (responsePlatform.content.isOffice365) {\n\t\t\ttry {\n\t\t\t\tglobalEmailData.outlookToken = await getOutlookTokenAsync();\n\t\t\t\tlogger.info(\"Authenticating...\");\n\t\t\t} catch (e) {\n\t\t\t\tlogger.error(JSON.stringify(e));\n\t\t\t\tsuccess = false;\n\t\t\t\tif (storageUtils.localExists(StorageDatatype.OutlookAccessToken)) {\n\t\t\t\t\tlet outlookAccesToken: string = storageUtils.localGet(StorageDatatype.OutlookAccessToken);\n\t\t\t\t\tvar splits = outlookAccesToken.split(\".\");\n\t\t\t\t\tlet expiration: number = JSON.parse(atob(splits[1])).exp;\n\t\t\t\t\tlet current: number = Math.round(new Date().getTime() / 1000);\n\t\t\t\t\tif (current < expiration) {\n\t\t\t\t\t\tlogger.info(\"Authenticating (cache)...\");\n\t\t\t\t\t\tglobalEmailData.outlookToken = outlookAccesToken;\n\t\t\t\t\t\tawait processEmail();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlogger.info(\"Authenticating (dialog)...\");\n\t\t\t\t\t\tshowLoginDialog();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tshowLoginDialog();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (success) {\n\t\t\tawait processEmail();\n\t\t}\n\t} catch (e) {\n\t\tlogger.error(JSON.stringify(e));\n\t\tif (e instanceof UnauthorizedError) {\n\t\t\tawait workflowOnConnectionError();\n\t\t} else {\n\t\t\tawait onConnectionError();\n\t\t}\n\t}\n}\n\nexport async function getSignalRConnection(authToken: string, signalRHubType: SignalRHubType): Promise {\n\tvar connection = new signalR.HubConnectionBuilder().withUrl(signalRHubType, { accessTokenFactory: () => authToken }).build();\n\tawait connection.start();\n\tlogger.info(`${signalRHubType} communication started`);\n\n\treturn connection;\n}\n\nexport async function workflowOnConnectionError() {\n\tif (globalIsCurrentWorkflowRestarting) {\n\t\tlogger.info(\"Current workflow is restarting...\");\n\t\treturn;\n\t} else {\n\t\tglobalIsCurrentWorkflowRestarting = true;\n\t\tawait onConnectionError();\n\t}\n}\n\nasync function onConnectionError() {\n\tlet isAddInDialogOpen = globalAddInDialogInstance !== null;\n\ttryCloseDialogs();\n\tif (globalRetryAttempt < globalMaxRetryAttempt) {\n\t\tswitch (globalPlatformConfig.retryOnServerConnectionReset) {\n\t\t\tcase 0:\n\t\t\t\tsendingEmailBecauseOfError();\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tif (isAddInDialogOpen) {\n\t\t\t\t\tsendingEmailBecauseOfError();\n\t\t\t\t} else {\n\t\t\t\t\tawait retryConnection();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tawait retryConnection();\n\t\t\t\tbreak;\n\t\t}\n\t} else {\n\t\tsendingEmailBecauseOfError();\n\t}\n}\n\nasync function retryConnection() {\n\tglobalRetryAttempt++;\n\tlogger.warn(`Connectivity issues, retry connection attempt: (${globalRetryAttempt} of ${globalMaxRetryAttempt})`);\n\tnotificationLogger.remove(globalMailboxItem, \"i1\");\n\tnotificationLogger.progressReplace(globalMailboxItem, \"p1\", \"We are experiencing connectivity issues. Retrying.\");\n\tawait processOnSendEvent(globalSendEvent);\n}\n\nfunction tryCloseDialogs() {\n\tif (globalLoginDialogInstance !== null) {\n\t\tglobalLoginDialogInstance.close();\n\t\tglobalLoginDialogInstance = null;\n\t}\n\n\tif (globalAddInDialogInstance !== null) {\n\t\tglobalAddInDialogInstance.close();\n\t\tglobalAddInDialogInstance = null;\n\t}\n}\n\nfunction showLoginDialog() {\n\tOffice.context.ui.displayDialogAsync(`${window.location.origin}/login`, { height: 60, width: 30 }, loginDialogCallback);\n}\n\nfunction loginDialogCallback(asyncResult: Office.AsyncResult) {\n\tif (asyncResult.status === Office.AsyncResultStatus.Failed) {\n\t\tswitch (asyncResult.error.code) {\n\t\t\tcase 12004:\n\t\t\t\tlogger.info(\"Domain is not trusted\");\n\t\t\t\tbreak;\n\t\t\tcase 12005:\n\t\t\t\tlogger.info(\"HTTPS is required\");\n\t\t\t\tbreak;\n\t\t\tcase 12007:\n\t\t\t\tlogger.info(\"A dialog is already opened.\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlogger.error(asyncResult.error.message);\n\t\t\t\tbreak;\n\t\t}\n\n\t\tnotificationLogger.remove(globalMailboxItem, \"i1\");\n\t\tnotificationLogger.errorReplace(globalMailboxItem, \"e1\", \"Unable to successfully authenticate user\");\n\t\tprocessSendEmail(globalSendEvent, false);\n\t}\n\telse {\n\t\tglobalLoginDialogInstance = asyncResult.value;\n\t\tglobalLoginDialogInstance.addEventHandler(Office.EventType.DialogMessageReceived, loginDialogEventHandler);\n\t\tglobalLoginDialogInstance.addEventHandler(Office.EventType.DialogEventReceived, loginDialogEventHandler);\n\t}\n}\n\nasync function loginDialogEventHandler(arg) {\n\tglobalLoginDialogInstance?.close();\n\tlet isError: boolean = arg.error\t\n\tswitch (arg.error) {\n\t\tcase 12002:\n\t\t\tlogger.warn(\"Cannot load URL, no such page or bad URL syntax.\");\n\t\t\tbreak;\n\t\tcase 12003:\n\t\t\tlogger.warn(\"HTTPS is required.\");\n\t\t\tbreak;\n\t\tcase 12006:\n\t\t\t// The dialog was closed, typically because the user the pressed X button.\n\t\t\tlogger.info(\"Dialog closed by user\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\n\tif (isError) {\n\t\tnotificationLogger.remove(globalMailboxItem, \"i1\");\n\t\tnotificationLogger.errorReplace(globalMailboxItem, \"e1\", \"Unable to successfully authenticate user\");\n\t\tprocessSendEmail(globalSendEvent, false);\n\t} else {\n\t\tlet loginResults = JSON.parse(arg.message) as LoginResult;\n\t\tif (loginResults.status === LoginResultStatus.Succeeded) {\n\t\t\tglobalEmailData.outlookToken = loginResults.accessToken\n\t\t\tstorageUtils.localSet(StorageDatatype.OutlookAccessToken, globalEmailData.outlookToken);\n\n\t\t\tawait processEmail();\n\t\t} else {\n\t\t\tlogger.error(loginResults.error);\n\t\t\tnotificationLogger.remove(globalMailboxItem, \"i1\");\n\t\t\tnotificationLogger.errorReplace(globalMailboxItem, \"e1\", \"Unable to successfully authenticate user\");\n\t\t\tprocessSendEmail(globalSendEvent, false);\n\t\t}\n\t}\n}\n\nasync function processEmail() {\n\tlet login = await getAuthenticationToken(globalSendEvent, globalEmailData.outlookToken);\n\tif (login == null) {\n\t\treturn;\n\t}\n\n\tlet isClientSideGetAttachmentSupported = isSetSupported(\"1.8\");\n\tlet emailInfo = await getEmailInfo(globalEmailData.itemId, isClientSideGetAttachmentSupported, globalAppInfo.platform);\n\tif (isClientSideGetAttachmentSupported && login.isDlpLicenseValid && emailInfo.attachments !== null && emailInfo.attachments.length > 0) {\n\t\ttry {\n\t\t\tlet addInSignalRConnection = await getSignalRConnection(login.token, SignalRHubType.AddinHub);\n\t\t\temailInfo.connectionAddInId = addInSignalRConnection.connectionId;\n\t\t\tawait configureAddInSignalR(globalMailboxItem, login.token, addInSignalRConnection);\n\t\t} catch (error) {\n\t\t\tthrow new ConnectionError(`${SignalRHubType.AddinHub} error: ${JSON.stringify(error)}`);\n\t\t}\n\t}\n\n\tlet responseMail = await restClient.processMail(login.token, emailInfo);\n\tif (responseMail.content === null) {\n\t\tprocessSendEmail(globalSendEvent);\n\t\treturn;\n\t}\n\n\tglobalApiResponseView = responseMail.content\n\tshowAddInDialog(globalMailboxItem, globalSendEvent, globalApiResponseView, login.token);\n}\n\nasync function showAddInDialog(\n\tmailboxItem: (Office.Item & Office.ItemCompose & Office.ItemRead & Office.Message & Office.MessageCompose & Office.MessageRead & Office.Appointment & Office.AppointmentCompose & Office.AppointmentRead) | undefined,\n\tsendEvent: any,\n\tapiResponse: ApiResponseView,\n\tauthToken: string\n) {\n\tlogger.debug(\"2. Add-In callback\");\n\tif (apiResponse.onSendProcessContex?.forbiddenRecipients?.length > 0) {\n\t\tnotificationLogger.infoReplace(mailboxItem, \"i1\", 'Forbidden recipients found');\n\t}\n\telse {\n\t\tif (!(apiResponse.onSendProcessContex?.confirmationRequired || (apiResponse.onSendProcessContex?.scanStarted && !apiResponse.onSendProcessContex?.scanCompleted))) {\n\t\t\tstorageUtils.localRemove(StorageDatatype.ApiResponse);\n\t\t\tawait postProcess(mailboxItem, sendEvent, authToken, { send: true, encrypt: false, showEncryptPrompt: false });\n\t\t\tlogger.info(\"Email sent, no unsafe items found\");\n\t\t\treturn;\n\t\t}\n\n\t\tnotificationLogger.infoReplace(mailboxItem, \"i1\", 'External recipients found');\n\t}\n\n\tstorageUtils.localSet(StorageDatatype.ApiResponse, JSON.stringify(apiResponse));\n\tstorageUtils.localSet(StorageDatatype.SafeSendToken, authToken);\n\n\tlogger.debug(`3. Show SafeSend dialog`);\n\tOffice.context.ui.displayDialogAsync(window.location.origin + \"/dialog\", getAddInDialogOptions(apiResponse), addInDialogCallback)\n}\n\nfunction getAddInDialogOptions(apiResponse: ApiResponseView): Office.DialogOptions {\n\tlet maxWidth = 80;\n\tlet maxHeight = 70;\n\tlet forbiddenRecipientsLength = apiResponse.onSendProcessContex?.forbiddenRecipients?.length;\n\tif (forbiddenRecipientsLength > 0) {\n\t\tmaxWidth = 40;\n\t\tmaxHeight = forbiddenRecipientsLength > 10 ? 40 : forbiddenRecipientsLength * 3;\n\t\tmaxHeight = maxHeight + 25;\n\t}\n\n\treturn {\n\t\tasyncContext: apiResponse,\n\t\tdisplayInIframe: true,\n\t\theight: maxHeight,\n\t\tpromptBeforeOpen: false,\n\t\twidth: maxWidth\n\t}\n}\n\nfunction addInDialogCallback(asyncResult: Office.AsyncResult) {\n\tlogger.debug(\"4. SafeSend dialog callback\");\n\tif (asyncResult.status === Office.AsyncResultStatus.Failed) {\n\t\t// In addition to general system errors, there are 3 specific errors for \n\t\t// displayDialogAsync that you can handle individually.\n\t\tswitch (asyncResult.error.code) {\n\t\t\tcase 12004:\n\t\t\t\tlogger.info(\"Domain is not trusted\");\n\t\t\t\tbreak;\n\t\t\tcase 12005:\n\t\t\t\tlogger.info(\"HTTPS is required\");\n\t\t\t\tbreak;\n\t\t\tcase 12007:\n\t\t\t\tlogger.info(\"A dialog is already opened.\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlogger.error(asyncResult.error.message);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\telse {\n\t\tglobalAddInDialogInstance = asyncResult.value;\n\t\tglobalApiResponseView = asyncResult.asyncContext as ApiResponseView;\n\n\t\t/*Messages are sent by developers programatically from the dialog using office.context.ui.messageParent(...)*/\n\t\tglobalAddInDialogInstance.addEventHandler(Office.EventType.DialogMessageReceived, addInDialogEventHandler);\n\n\t\t/*Events are sent by the platform in response to user actions or errors. For example, the dialog is closed via the 'x' button*/\n\t\tglobalAddInDialogInstance.addEventHandler(Office.EventType.DialogEventReceived, addInDialogEventHandler);\n\t}\n}\n\nasync function addInDialogEventHandler(arg) {\n\tlogger.debug(\"5. SafeSend dialog event handler\");\n\tglobalAddInDialogInstance?.close();\n\tlet authToken: string = storageUtils.localGet(StorageDatatype.SafeSendToken) as string;\n\t// In addition to general system errors, there are 2 specific errors \n\t// and one event that you can handle individually.\n\tswitch (arg.error) {\n\t\tcase 12002:\n\t\t\tlogger.warn(\"Cannot load URL, no such page or bad URL syntax.\");\n\t\t\tbreak;\n\t\tcase 12003:\n\t\t\tlogger.warn(\"HTTPS is required.\");\n\t\t\tbreak;\n\t\tcase 12006:\n\t\t\t// The dialog was closed, typically because the user the pressed X button.\n\t\t\tlogger.info(\"Dialog closed by user\");\n\t\t\ttry {\n\t\t\t\tawait postProcess(globalMailboxItem, globalSendEvent, authToken, { send: false, encrypt: false, showEncryptPrompt: false });\n\t\t\t} catch (e) {\n\t\t\t\tlogger.error(JSON.stringify(e));\n\t\t\t\tsendingEmailBecauseOfError();\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tlet dialogValues = JSON.parse(arg.message) as DialogValues;\n\t\t\ttry {\n\t\t\t\tawait postProcess(globalMailboxItem, globalSendEvent, authToken, dialogValues);\n\t\t\t} catch (e) {\n\t\t\t\tlogger.error(JSON.stringify(e));\n\t\t\t\tsendingEmailBecauseOfError();\n\t\t\t}\n\t\t\tbreak;\n\t}\n\n\tstorageUtils.localRemove(StorageDatatype.SafeSendToken);\n\tif (globalApiResponseView.onSendProcessContex.scanStarted && !globalApiResponseView.onSendProcessContex.scanCompleted) {\n\t\tlet response = await restClient.cancelDlp(authToken);\n\t\tif (!response.isSuccessStatusCode) {\n\t\t\tsendingEmailBecauseOfError();\n\t\t}\n\t}\n}\n\nasync function postProcess(\n\tmailboxItem: (Office.Item & Office.ItemCompose & Office.ItemRead & Office.Message & Office.MessageCompose & Office.MessageRead & Office.Appointment & Office.AppointmentCompose & Office.AppointmentRead) | undefined,\n\tsendEvent: any,\n\tauthToken: string,\n\tdialogValues: DialogValues\n): Promise {\n\tnotificationLogger.remove(mailboxItem, \"i1\");\n\tlet confirmInfo = getConfirmInfo(dialogValues);\n\tif (dialogValues.send) {\n\t\tnotificationLogger.progressReplace(mailboxItem, \"i1\", \"Sending the email.\");\n\t\tlet response = await restClient.postProcess(authToken, confirmInfo);\n\n\t\tlet onSendPostProcessContextView = response.content;\n\t\tif (onSendPostProcessContextView !== null) {\n\t\t\tif (globalApiResponseView.onSendProcessContex.settings._footerEnabled && !onSendPostProcessContextView.shouldCancelSendEvent && (globalAppInfo.platform === Office.PlatformType.OfficeOnline || globalAppInfo.platform === Office.PlatformType.PC)) {\n\t\t\t\tif (globalApiResponseView.onSendProcessContex.mailItem.hasHtmlBody) {\n\t\t\t\t\tlet htmlBody: string = globalApiResponseView.onSendProcessContex.mailItem.htmlBody;\n\t\t\t\t\tif (htmlBody.includes(\"\")) {\n\t\t\t\t\t\tonSendPostProcessContextView.footerText += \"\";\n\t\t\t\t\t\thtmlBody = htmlBody.replace(\"\", onSendPostProcessContextView.footerText);\n\t\t\t\t\t} else {\n\t\t\t\t\t\thtmlBody += onSendPostProcessContextView.footerText;\n\t\t\t\t\t}\n\n\t\t\t\t\tawait setBodyAsync(mailboxItem, htmlBody, Office.CoercionType.Html);\n\t\t\t\t} else {\n\t\t\t\t\tlet textBody: string = globalApiResponseView.onSendProcessContex.mailItem.body;\n\t\t\t\t\ttextBody += onSendPostProcessContextView.footerText;\n\t\t\t\t\tawait setBodyAsync(mailboxItem, textBody, Office.CoercionType.Text);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (onSendPostProcessContextView.subjectPrefix != null) {\n\t\t\t\tawait setSubjectAsync(mailboxItem, `${onSendPostProcessContextView.subjectPrefix} ${globalApiResponseView.onSendProcessContex.mailItem.subject}`);\n\t\t\t}\n\t\t\t\n\t\t\tprocessSendEmail(sendEvent, !onSendPostProcessContextView.shouldCancelSendEvent);\n\t\t}\n\t} else {\t\t\n\t\tprocessSendEmail(sendEvent, false);\n\t\tlet response = await restClient.postProcess(authToken, confirmInfo);\n\t\tif (!response.isSuccessStatusCode) {\n\t\t\tlogger.error(response.errorMessage);\n\t\t}\n\t}\n}\n\nfunction getConfirmInfo(dialogValues: DialogValues): ConfirmInfo {\n\tlet confirmInfo: ConfirmInfo = {\n\t\titemId: globalApiResponseView.onSendProcessContex.mailItem.itemId,\n\t\tclientLanguage: Office.context.displayLanguage,\n\t\tsendConfirmed: dialogValues.send,\n\t\tshouldTriggerEncryption: dialogValues.encrypt,\n\t\tshowEncryptPrompt: dialogValues.showEncryptPrompt,\n\t\tconfirmationRequired: globalApiResponseView.onSendProcessContex.confirmationRequired,\n\t\thasForbiddenRecipients: globalApiResponseView.onSendProcessContex.hasForbiddenRecipients,\n\t\tsendCanceled: globalApiResponseView.onSendProcessContex.sendCanceled,\n\t\tmailItemType: globalApiResponseView.onSendProcessContex.mailItem.itemType,\n\t\thasHtmlBody: globalApiResponseView.onSendProcessContex.mailItem.hasHtmlBody\n\t}\n\n\treturn confirmInfo;\n}\n\nfunction configureAddInSignalR(\n\tmailboxItem: (Office.Item & Office.ItemCompose & Office.ItemRead & Office.Message & Office.MessageCompose & Office.MessageRead & Office.Appointment & Office.AppointmentCompose & Office.AppointmentRead) | undefined,\n\tauthToken: string,\n\tconnection: signalR.HubConnection\n): void {\n\tconnection.onclose(async error => {\n\t\tlogger.error(`${SignalRHubType.AddinHub} error: ${JSON.stringify(error)}`);\n\t\tawait workflowOnConnectionError();\n\t});\n\n\tconnection.on(SignalRAddInHubMethods.ReceiveGetAttachmentContent, async (attachment: OutlookAttachment) => {\n\t\tlogger.debug(`${SignalRAddInHubMethods.ReceiveGetAttachmentContent} \"${attachment.name}\"`);\n\t\tattachment = await getAttachmentContentAsync(mailboxItem, attachment)\n\t\tawait restClient.sendAttachmentContent(authToken, attachment);\n\t});\n}\n\nfunction sendingEmailBecauseOfError() {\n\tlet message = \"We are experiencing connectivity issues. Sending the email.\";\n\tlogger.error(message);\n\tnotificationLogger.remove(globalMailboxItem, \"i1\");\n\tnotificationLogger.remove(globalMailboxItem, \"p1\");\n\tnotificationLogger.errorReplace(globalMailboxItem, \"e1\", message);\n\tsetTimeout(() => { processSendEmail(globalSendEvent, true); }, 3000);\n}\n\nasync function getEmailInfo(itemId: string, isClientSideGetAttachmentSupported: boolean, platformType: Office.PlatformType): Promise {\n\tnotificationLogger.infoReplace(globalMailboxItem, \"i1\", \"Validating email...\");\n\tlet emailInfo: EmailInfo = {\n\t\titemId: itemId,\n\t\titemType: globalMailboxItem?.itemType,\n\t\tsubject: null,\n\t\tbodyType: \"\",\n\t\tbody: null,\n\t\ttoEmails: [],\n\t\tccEmails: [],\n\t\tbccEmails: [],\n\t\tattachments: null,\n\t\tclientLanguage: Office.context.displayLanguage,\n\t\tplatformType: platformType,\n\t\tconnectionAddInId: \"\",\n\t\tisClientSideGetAttachmentSupported: isClientSideGetAttachmentSupported\n\t}\n\n\tlet toTemp = getRecipientsFromMailboxItem(globalMailboxItem, RecipientSendType.TO) as Office.Recipients | Office.Recipients & Office.EmailAddressDetails[];\n\tlet ccTemp = getRecipientsFromMailboxItem(globalMailboxItem, RecipientSendType.CC) as Office.Recipients | Office.Recipients & Office.EmailAddressDetails[];\n\tlet bccTemp = getRecipientsFromMailboxItem(globalMailboxItem, RecipientSendType.BCC) as Office.Recipients | Office.Recipients & Office.EmailAddressDetails[];\n\tif (bccTemp !== null) {\n\t\temailInfo.bccEmails = await getRecipientsAsync(bccTemp, RecipientSendType.BCC);\n\t}\n\n\tif (isClientSideGetAttachmentSupported) {\n\t\temailInfo.attachments = await getAttachmentsAsync(globalMailboxItem);\n\t}\n\n\temailInfo.bodyType = await getBodyTypeAsync(globalMailboxItem);\n\tlet [to, cc, subject, body] = await Promise.all([\n\t\tgetRecipientsAsync(toTemp, RecipientSendType.TO),\n\t\tgetRecipientsAsync(ccTemp, RecipientSendType.CC),\n\t\tgetSubjectAsync(globalMailboxItem),\n\t\tgetBodyAsync(globalMailboxItem, emailInfo.bodyType)\n\t]);\n\n\temailInfo.toEmails = to;\n\temailInfo.ccEmails = cc;\n\temailInfo.subject = subject;\n\temailInfo.body = body;\n\tlet embeddedAttachments = getEmbeddedAttachments(emailInfo.body);\n\temailInfo.attachments = emailInfo.attachments?.concat(embeddedAttachments)!;\n\n\treturn emailInfo;\n}\n\nasync function getAuthenticationToken(sendEvent, outlookToken: string): Promise{\n\ttry {\n\t\tlet responseLogin = await restClient.login(outlookToken);\n\t\treturn responseLogin.content;\n\t} catch (error) {\n\t\tlogger.error(JSON.stringify(error));\n\t\tif (error instanceof UnauthorizedError) {\n\t\t\tlet unauthorizedError = error as UnauthorizedError\t\t\t\n\t\t\tswitch (unauthorizedError.response?.data.licenseKeyStatus) {\n\t\t\t\tcase LicenseKeyStatus.Invalid:\n\t\t\t\t\tnotificationLogger.errorReplace(globalMailboxItem, \"i1\", \"Invalid license\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase LicenseKeyStatus.TrialExpired:\n\t\t\t\t\tnotificationLogger.errorReplace(globalMailboxItem, \"i1\", \"Expired trial license\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase LicenseKeyStatus.LicenseExpired:\n\t\t\t\t\tnotificationLogger.errorReplace(globalMailboxItem, \"i1\", \"Expired license\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tsetTimeout(() => { processSendEmail(sendEvent); }, 2000);\n\t\t} else {\n\t\t\tthrow (error);\n\t\t}\n\t}\n\n\treturn null;\n}\n\nfunction processSendEmail(sendEvent: any, send: boolean = true) {\n\tsendEvent.completed({ allowEvent: send });\n}\n\nfunction isSetSupported(set: string): boolean {\n\tlet isSetSupported = Office.context.requirements.isSetSupported(\"Mailbox\", set);\n\tlogger.info(`Set ${set} ${isSetSupported ? \"is supported\" : \"is NOT supported\"}`);\n\n\treturn isSetSupported;\n}\n\nfunction getRecipientsFromMailboxItem(\n\tmailboxItem: (Office.Item & Office.ItemCompose & Office.ItemRead & Office.Message & Office.MessageCompose & Office.MessageRead & Office.Appointment & Office.AppointmentCompose & Office.AppointmentRead) | undefined,\n\trecipientType: RecipientSendType\n): Office.Recipients | Office.Recipients & Office.EmailAddressDetails[] | null | undefined {\n\tswitch (recipientType) {\n\t\tcase RecipientSendType.TO:\n\t\t\treturn mailboxItem?.itemType === Office.MailboxEnums.ItemType.Message ? mailboxItem.to : mailboxItem?.requiredAttendees;\n\t\tcase RecipientSendType.CC:\n\t\t\treturn mailboxItem?.itemType === Office.MailboxEnums.ItemType.Message ? mailboxItem.cc : mailboxItem?.optionalAttendees;\n\t\tcase RecipientSendType.BCC:\n\t\t\treturn mailboxItem?.itemType === Office.MailboxEnums.ItemType.Message ? mailboxItem.bcc : null;\n\t}\n\n\treturn undefined;\n}\n\nfunction getRecipientsAsync(\n\trecipients: Office.Recipients | Office.Recipients & Office.EmailAddressDetails[],\n\trecipientType: RecipientSendType\n): Promise {\n\treturn new Promise((resolve, reject) => {\n\t\trecipients.getAsync((asyncResult) => {\n\t\t\tif (asyncResult.status === Office.AsyncResultStatus.Succeeded) {\n\t\t\t\tlet recipientTemp: EmailRecipient[] = asyncResult.value.map((recipient) => (\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 0,\n\t\t\t\t\t\temailAddress: recipient.emailAddress,\n\t\t\t\t\t\tname: recipient.displayName,\n\t\t\t\t\t\tisAddressTypeSupported: false,\n\t\t\t\t\t\tisExchangeDistributionList: recipient.recipientType === Office.MailboxEnums.RecipientType.DistributionList,\n\t\t\t\t\t\tisOutlookDistributionList: false,\n\t\t\t\t\t\tmembers: [],\n\t\t\t\t\t\tsendable: true,\n\t\t\t\t\t\tsendType: recipientType\n\t\t\t\t\t}\n\t\t\t\t))\n\n\t\t\t\tresolve(recipientTemp);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treject(asyncResult.error.message);\n\t\t\t}\n\t\t});\n\t});\n}\n\nfunction getSubjectAsync(\n\tmailboxItem: (Office.Item & Office.ItemCompose & Office.ItemRead & Office.Message & Office.MessageCompose & Office.MessageRead & Office.Appointment & Office.AppointmentCompose & Office.AppointmentRead) | undefined\n): Promise {\n\treturn new Promise((resolve, reject) => {\n\t\tmailboxItem?.subject.getAsync((asyncResult) => {\n\t\t\tif (asyncResult.status === Office.AsyncResultStatus.Succeeded) {\n\t\t\t\tresolve(asyncResult.value);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treject(asyncResult.error.message);\n\t\t\t}\n\t\t});\n\t});\n}\n\nfunction getBodyTypeAsync(\n\tmailboxItem: (Office.Item & Office.ItemCompose & Office.ItemRead & Office.Message & Office.MessageCompose & Office.MessageRead & Office.Appointment & Office.AppointmentCompose & Office.AppointmentRead) | undefined\n): Promise {\n\treturn new Promise((resolve, reject) => {\n\t\tmailboxItem?.body.getTypeAsync({ asyncContext: null }, function (asyncResult) {\n\t\t\tif (asyncResult.status === Office.AsyncResultStatus.Succeeded) {\n\t\t\t\tresolve(asyncResult.value);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treject(asyncResult.error.message);\n\t\t\t}\n\t\t});\n\t});\n}\n\nfunction getEmbeddedAttachments(\n\tbodyContent: string\n):OutlookAttachment[] {\n\tlet bodyasElement = document.createElement('html');\n\tbodyasElement.innerHTML = bodyContent;\n\tlet embImgs = bodyasElement.getElementsByTagName(\"img\");\n\tlet attachmentsTemp: OutlookAttachment[] = [] as OutlookAttachment[];\n\tif (embImgs !== null) {\n\t\tfor (var i = 0; i < embImgs.length; i++) {\n\t\t\tlet itemId = embImgs[i].attributes.getNamedItem(\"data-custom\")?.value;\n\t\t\tif (itemId) {\n\t\t\t\tlet extension = embImgs[i].src.split(',')[0].replace(\"data:image/\", \"\").split(\";\")[0];\n\t\t\t\tlet prefix = i < 10 ? \"000\" : i < 100 ? \"00\" : i < 1000 ? \"0\" : \"\";\n\t\t\t\tlet name = prefix + i + \".\" + extension;\n\t\t\t\tlet content = embImgs[i].src.split(',')[1];\n\t\t\t\tlet sizestr = embImgs[i].attributes.getNamedItem(\"size\")?.value!;\n\t\t\t\tlet size = parseInt(sizestr !== 'undefined' ? sizestr : \"0\");\n\n\t\t\t\tattachmentsTemp.push({\n\t\t\t\t\tid: Office.context.mailbox.convertToRestId(itemId, Office.MailboxEnums.RestVersion.v2_0),\n\t\t\t\t\tjsId: itemId,\n\t\t\t\t\tname: name,\n\t\t\t\t\tattachmentType: 'Embedded',\n\t\t\t\t\tcontentBytes: content,\n\t\t\t\t\tcontentType: \"\",\n\t\t\t\t\tisInline: true,\n\t\t\t\t\tsize: size\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\n\treturn attachmentsTemp;\n}\n\nfunction getBodyAsync(\n\tmailboxItem: (Office.Item & Office.ItemCompose & Office.ItemRead & Office.Message & Office.MessageCompose & Office.MessageRead & Office.Appointment & Office.AppointmentCompose & Office.AppointmentRead) | undefined,\n\tcoercionType: Office.CoercionType\n): Promise {\n\treturn new Promise((resolve, reject) => {\n\t\tmailboxItem?.body.getAsync(coercionType, { asyncContext: null }, (asyncResult) => {\n\t\t\tif (asyncResult.status === Office.AsyncResultStatus.Succeeded) {\n\t\t\t\tresolve(asyncResult.value);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treject(asyncResult.error.message);\n\t\t\t}\n\t\t});\n\t});\n}\n\nfunction getAttachmentsAsync(\n\tmailboxItem: (Office.Item & Office.ItemCompose & Office.ItemRead & Office.Message & Office.MessageCompose & Office.MessageRead & Office.Appointment & Office.AppointmentCompose & Office.AppointmentRead) | undefined\n): Promise {\n\treturn new Promise((resolve) => {\n\t\tmailboxItem?.getAttachmentsAsync({}, (asyncResult) => {\n\t\t\tif (asyncResult.status === Office.AsyncResultStatus.Succeeded) {\n\t\t\t\tlet attachments: OutlookAttachment[] = asyncResult.value.map((attachment) => (\n\t\t\t\t\t{\n\t\t\t\t\t\tid: Office.context.mailbox.convertToRestId(attachment.id, Office.MailboxEnums.RestVersion.v2_0),\n\t\t\t\t\t\tjsId: attachment.id,\n\t\t\t\t\t\tname: !attachment.name.includes(\".\") && attachment.attachmentType === Office.MailboxEnums.AttachmentType.Item ? `${attachment.name}.eml` : attachment.name,\n\t\t\t\t\t\tisInline: attachment.isInline,\n\t\t\t\t\t\tsize: attachment.size,\n\t\t\t\t\t\tattachmentType: attachment.attachmentType,\n\t\t\t\t\t\tcontentBytes: null,\n\t\t\t\t\t\tcontentType: \"\"\n\t\t\t\t\t}\n\t\t\t\t))\n\n\t\t\t\tresolve(attachments);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlogger.error(asyncResult?.error?.message);\n\t\t\t\tresolve([] as OutlookAttachment[]);\n\t\t\t}\n\t\t});\n\t});\n}\n\nfunction getAttachmentContentAsync(\n\tmailboxItem: (Office.Item & Office.ItemCompose & Office.ItemRead & Office.Message & Office.MessageCompose & Office.MessageRead & Office.Appointment & Office.AppointmentCompose & Office.AppointmentRead) | undefined,\n\tattachment: OutlookAttachment\n): Promise {\n\treturn new Promise((resolve) => {\n\t\tmailboxItem?.getAttachmentContentAsync(attachment.jsId, {}, (asyncResult) => {\n\t\t\tif (asyncResult.status === Office.AsyncResultStatus.Succeeded) {\n\t\t\t\tlet b64 = true;\n\t\t\t\tlet paddingFound = false;\n\t\t\t\tfor (let c of asyncResult.value.content) {\n\t\t\t\t\tif (c === '=') {\n\t\t\t\t\t\tpaddingFound = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!((!paddingFound && (c === '+' || ('/' <= c && c <= '9') || ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z'))) || (c === '='))) {\n\t\t\t\t\t\tb64 = false;\n\t\t\t\t\t\tlogger.info(\"Found non-b64 character \" + c);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (b64) {\n\t\t\t\t\tattachment.contentBytes = asyncResult.value.content;\n\t\t\t\t} else {\n\t\t\t\t\tattachment.contentBytes = btoa(asyncResult.value.content);\n\t\t\t\t\tif (attachment.attachmentType === \"item\") {\n\t\t\t\t\t\tattachment.name += \".eml\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tresolve(attachment);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlogger.error(\"getAttachmentContentAsync error: \" + asyncResult.error.message);\n\t\t\t\tresolve(attachment);\n\t\t\t}\n\t\t})\n\t});\n}\n\nfunction saveItemAndGetOutlookTokenAsync(\n\tisOffice365: boolean,\n\tmailboxItem: (Office.Item & Office.ItemCompose & Office.ItemRead & Office.Message & Office.MessageCompose & Office.MessageRead & Office.Appointment & Office.AppointmentCompose & Office.AppointmentRead) | undefined\n): Promise {\n\treturn new Promise((resolve, reject) => {\n\t\tmailboxItem?.saveAsync(async (asyncResult) => {\n\t\t\tlet id = asyncResult.value;\n\t\t\tlet itemId = Office.context.mailbox.convertToRestId(id, Office.MailboxEnums.RestVersion.v2_0);\n\t\t\tlet emailSettings: IEmailSettings = {\n\t\t\t\titemId: itemId,\n\t\t\t\toutlookToken: \"\"\n\t\t\t}\n\n\t\t\tif (!isOffice365) {\n\t\t\t\tOffice.context.mailbox.getCallbackTokenAsync({ isRest: true }, (asyncResult) => {\n\t\t\t\t\tif (asyncResult.status === Office.AsyncResultStatus.Succeeded) {\n\t\t\t\t\t\temailSettings.outlookToken = asyncResult.value;\n\t\t\t\t\t\tresolve(emailSettings);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treject(asyncResult.error);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tresolve(emailSettings);\n\t\t\t}\n\n\t\t\t\n\t\t});\n\t});\n}\n\nfunction getOutlookTokenAsync(\n): Promise {\n\treturn new Promise(async (resolve, reject) => {\n\t\ttry {\n\t\t\t//throw new MockSSOError(\"13012\");\n\t\t\tlet options: OfficeRuntime.AuthOptions = { allowSignInPrompt: true, allowConsentPrompt: true, forMSGraphAccess: true };\n\t\t\tlet ssoOutlookToken = await OfficeRuntime.auth.getAccessToken(options);\n\t\t\tresolve(ssoOutlookToken);\n\t\t} catch (e) {\n\t\t\treject(e);\n\t\t}\n\t});\n}\n\n//For SSO testing purposes only\n//function MockSSOError(code) {\n//\tthis.name = \"API Not Supported\";\n//\tthis.message = \"API is not supported in this platform.\";\n//\tthis.code = code;\n//}\n","/* global Office */ //Required for this to be found. see: https://github.com/OfficeDev/office-js-docs-pr/issues/691\n\nimport * as React from 'react';\nimport OfficeDialog from '../OfficeDialog';\nimport { ApiResponseView, ActionOnMatch, DlpItemResultView, ContentScanningResultView, ClientKeywordDomainResultView, SignalRUIHubMethods } from '../Backend/BackendTypes'\nimport { AppProps, AppState, AppStateUI, GroupByAttachments, IChunksManager } from './AppTypes';\nimport { Modules } from '../../LogConfiguration';\nimport { safeSendLogging } from '../../lib/Logger';\nimport { SignalRHubType, StorageDatatype, storageUtils } from '../../lib/Utils';\nimport { appUtils } from './AppUtils';\nimport ForbiddenRecipientDialog from '../ForbiddenRecipientDialog';\nimport OutlookSpinner from '../OutlookSpinner';\nimport { getSignalRConnection } from '../../lib/AddIn';\n\nconst logger = safeSendLogging.getLogger(Modules.SafeSend_App);\n\nexport default class App extends React.Component {\n sendEvent: any;\n mailboxItem: Office.Item & Office.ItemCompose & Office.ItemRead & Office.Message & Office.MessageCompose & Office.MessageRead & Office.Appointment & Office.AppointmentCompose & Office.AppointmentRead = {} as Office.Item & Office.ItemCompose & Office.ItemRead & Office.Message & Office.MessageCompose & Office.MessageRead & Office.Appointment & Office.AppointmentCompose & Office.AppointmentRead;\n officeDialog: OfficeDialog;\n chunksManager: IChunksManager = { chunkSize: 0, chunkProcessedCount: 0, dlpItemResults: [] };\n constructor(props, context) {\n super(props, context);\n this.state = {\n\t\t\tdialogId: \"\",\n\t\t\tisOfficeInitialized: false,\n apiResponseView: ({} as any) as ApiResponseView,\n dlps: [],\n contentScanningResults: [],\n clientKeywordDomainResults: [],\n contentScanningAction: ActionOnMatch.Inform,\n countUnprotectedAttachments: 0,\n unprotectedAttachmentMessage: \"\",\n isDlpWaiting: false,\n scanTimedOut: false,\n dialogInstance: {} as Office.Dialog,\n groupByAttachments: {\n countTotalAttachmentsScanned: 0,\n countTotalClientKeyword: 0,\n countTotalClientKeywordMatches: 0,\n countTotalContentScanning: 0,\n countTotalContentScanningMatches: 0,\n groupByClientKeywordAttachments: false,\n groupByClientKeywordAttachmentsText: \"\",\n groupByContentScanningAttachments: false,\n groupByContentScanningAttachmentsText: \"\"\n },\n confirmationRequired: false\n };\n this.officeDialog = {} as OfficeDialog;\n this.configureSignalR = this.configureSignalR.bind(this);\n this.updateDialogUI = this.updateDialogUI.bind(this);\n }\n\n updateDialogUI(dlpItemResults: DlpItemResultView[], isDlpWaiting: boolean, scanTimedOut: boolean, confirmationRequired: boolean) {\n logger.debug('Update dialog UI');\n let groupByAttachments: GroupByAttachments = appUtils.getGroupByAttachments(this.state.apiResponseView.onSendProcessContex.settings, this.state.groupByAttachments, dlpItemResults);\n var newAppState: AppStateUI = appUtils.getStateForUpdateUI(\n this.state.apiResponseView.onSendProcessContex.settings,\n this.state.clientKeywordDomainResults,\n this.state.contentScanningResults,\n this.state.contentScanningAction,\n groupByAttachments.groupByClientKeywordAttachments,\n groupByAttachments.groupByContentScanningAttachments,\n dlpItemResults,\n isDlpWaiting,\n scanTimedOut,\n this.state.countUnprotectedAttachments\n );\n\n if (!this.state.confirmationRequired && confirmationRequired) {\n this.setState({ confirmationRequired: confirmationRequired });\n\t\t }\n\n this.setState({\n isDlpWaiting: newAppState.isDlpWaiting,\n scanTimedOut: newAppState.scanTimedOut,\n clientKeywordDomainResults: newAppState.clientKeywordDomainResults,\n contentScanningResults: newAppState.contentScanningResults,\n contentScanningAction: newAppState.contentScanningAction,\n dlps: newAppState.dlps,\n groupByAttachments: groupByAttachments,\n countUnprotectedAttachments: newAppState.countUnprotectedAttachments,\n unprotectedAttachmentMessage: newAppState.unprotectedAttachmentMessage\n });\n\n this.chunksManager.dlpItemResults = [];\n this.chunksManager.chunkProcessedCount = 0;\n this.officeDialog.setSendEnabled();\n }\n\n async configureSignalR(authToken: string) {\n\t\ttry {\n\t\t\tlet connection = await getSignalRConnection(authToken, SignalRHubType.UIHub);\n\t\t\tconnection.onclose(async error => {\n\t\t\t\tlogger.error(`${SignalRHubType.UIHub} error: ${JSON.stringify(error)}`);\n\t\t\t});\n\n\t\t\tconnection.on(SignalRUIHubMethods.ReceiveDlpItemResults, (dlpItemResult: DlpItemResultView, confirmationRequired: boolean) => {\n\t\t\t\tlogger.debug(SignalRUIHubMethods.ReceiveDlpItemResults);\n\t\t\t\tthis.chunksManager.dlpItemResults.push(dlpItemResult);\n\t\t\t\tthis.chunksManager.chunkProcessedCount++;\n\n\t\t\t\tif (this.state.confirmationRequired !== confirmationRequired) {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\tconfirmationRequired: confirmationRequired\n\t\t\t\t\t});\n\n\t\t\t\t\tif (this.chunksManager.chunkProcessedCount === this.chunksManager.chunkSize) {\n\t\t\t\t\tthis.updateDialogUI(this.chunksManager.dlpItemResults, true, false, confirmationRequired);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tconnection.on(SignalRUIHubMethods.ReceiveFinishingContenScanning, (_isCancellationRequested: boolean, confirmationRequired: boolean, scanTimedOut: boolean) => {\n\t\t\t\tlogger.debug(SignalRUIHubMethods.ReceiveFinishingContenScanning);\n\t\t\t\tif (!this.state.confirmationRequired) {\n\t\t\t\t\tthis.officeDialog.closeDialog({ send: true, encrypt: false, showEncryptPrompt: false });\n\t\t\t } else {\n\t\t\t\t\tthis.updateDialogUI(this.chunksManager.dlpItemResults, false, scanTimedOut, confirmationRequired);\n\t\t\t }\n\t\t\t});\n\n\t\t\tconnection.on(SignalRUIHubMethods.ReceiveAttachmentPasswordRequest, () => {\n\t\t\t\tlogger.debug(SignalRUIHubMethods.ReceiveAttachmentPasswordRequest);\n\t\t\t\tthis.officeDialog.attachmentPasswordRequest();\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tlogger.error(`${SignalRHubType.UIHub} error: ${JSON.stringify(error)}`);\n\t\t}\n }\n\n\tcomponentDidMount() {\n\t\tOffice.onReady(async (info) => {\n\t\t\tif (info.host !== null) {\n\t\t\t\tlogger.debug(\"Load data from local storage\");\n\t\t\t\tlet dialogId = storageUtils.localGet(StorageDatatype.DialogId) as string;\n\t\t\t\tlet localStorageData = storageUtils.localGet(StorageDatatype.ApiResponse);\n\t\t\t\tlet apiResponseView = JSON.parse(localStorageData) as ApiResponseView\n\t\t\t\tstorageUtils.localRemove(StorageDatatype.ApiResponse);\n\n\t\t\t\tlet isDlpWaiting = apiResponseView.onSendProcessContex.isDlpLicenseValid &&\n\t\t\t\t\tapiResponseView.onSendProcessContex.scanStarted &&\n\t\t\t\t\t!apiResponseView.onSendProcessContex.scanCompleted;\n\n\t\t\t\tawait this.setState({\n\t\t\t\t\tdialogId: dialogId,\n\t\t\t\t\tisOfficeInitialized: true,\n\t\t\t\t\tisDlpWaiting: isDlpWaiting,\n\t\t\t\t\tapiResponseView: apiResponseView,\n\t\t\t\t\tconfirmationRequired: apiResponseView.onSendProcessContex.confirmationRequired\n\t\t\t\t});\n\n\t\t\t\tif (apiResponseView.onSendProcessContex?.forbiddenRecipients?.length === 0) {\n\t\t\t\t\tthis.updateDialogUI(apiResponseView.dlpScanResults, isDlpWaiting, apiResponseView.onSendProcessContex.scanTimedOut, apiResponseView.onSendProcessContex.confirmationRequired);\n\t\t\t\t\tif (isDlpWaiting) {\n\t\t\t\t\t\tlet estimatedDlpItemsCount = apiResponseView.unsafeAttachmentsCount - apiResponseView.dlpScanResults.length + 2;\n\t\t\t\t\t\tthis.chunksManager.chunkSize = Math.round(estimatedDlpItemsCount / 2);\n\t\t\t\t\t\tlet authToken: string = storageUtils.localGet(StorageDatatype.SafeSendToken) as string;\n\t\t\t\t\t\tawait this.configureSignalR(authToken);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n }\n\n render() {\n if (!this.state.isOfficeInitialized) {\n\t\t return (\n\t\t\t \n );\n } else if (this.state.apiResponseView.onSendProcessContex?.forbiddenRecipients?.length > 0) {\n return ();\n }\n\n return (\n (this.officeDialog = ref)}\n dialogId={this.state.dialogId}\n apiResponseView={this.state.apiResponseView}\n dlps={this.state.dlps}\n isDlpWaiting={this.state.isDlpWaiting}\n confirmationRequired={this.state.confirmationRequired}\n scanTimedOut={this.state.scanTimedOut}\n contentScanningAction={this.state.contentScanningAction}\n contentScanningResults={this.state.contentScanningResults.length > 0 ? this.state.contentScanningResults.sort((a: ContentScanningResultView, b: ContentScanningResultView) => ((a.attachmentPath??'').localeCompare(b.attachmentPath??''))) : this.state.contentScanningResults}\n clientKeywordDomainResults={this.state.clientKeywordDomainResults.length > 0 ? this.state.clientKeywordDomainResults.sort((a: ClientKeywordDomainResultView, b: ClientKeywordDomainResultView) => ((a.attachmentPath??'').localeCompare(b.attachmentPath??''))) : this.state.clientKeywordDomainResults}\n groupByAttachments={this.state.groupByAttachments}\n countUnprotectedAttachments={this.state.countUnprotectedAttachments}\n unprotectedAttachmentMessage={this.state.unprotectedAttachmentMessage}\n />\n );\n }\n}","import { Separator } from \"@fluentui/react\";\nimport * as React from \"react\";\n\nexport interface WarningMessageProps {\n message: string;\n}\n\nexport default class WarningMessage extends React.Component {\n render() {\n const { message } = this.props;\n\n return (\n <>\n {message}\n \n );\n }\n}","import * as React from 'react';\nimport WarningMessage from './WarningMessage';\nimport { browserName, engineName, engineVersion, fullBrowserVersion, osName, osVersion } from 'react-device-detect';\nimport { restClient } from '../RestClient';\nimport OutlookSpinner from './OutlookSpinner';\nimport { AppInfo } from './Backend/BackendTypes';\nimport { Text } from '@fluentui/react/lib/Text';\nimport { Separator } from '@fluentui/react';\n\nexport interface LandingState {\n\tisWaiting: boolean;\n\tappInfo: AppInfo;\n}\n\nexport default class LandingPage extends React.Component<{}, LandingState> {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tisWaiting: true,\n\t\t\tappInfo: {} as AppInfo\n\t\t}\n\t}\n\n\tasync componentDidMount() {\n\t\tlet responseAppInfo = await restClient.getAppInfo();\n\t\tawait this.setState({\n\t\t\tisWaiting: false,\n\t\t\tappInfo: responseAppInfo.content != null ? responseAppInfo.content : {} as AppInfo\n\t\t});\n\t}\n\n\tcomponentWillUnmount() {\n\t\t// fix Warning: Can't perform a React state update on an unmounted component\n\t\tthis.setState = () => {\n\t\t\treturn;\n\t\t};\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tisWaiting,\n appInfo,\n } = this.state;\n\n return (\n\t\t\t<>\n\t\t\t\t{\n\t\t\t\t\tisWaiting &&\n\t\t\t\t\t\n\t\t\t\t}\n {\n !isWaiting &&\n
\n \n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{appInfo.product} v{appInfo.version}\n\t\t\t\t\t\t\t\n
\n\t\t\t\t\t\t
\t\t\t\t\t\n\t\t\t\t\t\t\t{appInfo.description}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{appInfo.copyright}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{osName} {osVersion} - {browserName} {fullBrowserVersion} - {engineName} {engineVersion}\n
\n
\n }\n \n );\n }\n}\n","import * as React from 'react';\nimport * as Msal from \"msal\";\nimport OutlookSpinner from '../OutlookSpinner';\nimport { LoginResult, LoginResultStatus } from './LoginTypes';\nimport { StorageDatatype, storageUtils } from '../../lib/Utils';\nimport { restClient } from '../../RestClient';\n\nexport default class LoginPage extends React.Component {\n\tauthCallback(error, response) {\n\t\tlet loginresult: LoginResult = {\n\t\t\tstatus: LoginResultStatus.Failed,\n\t\t\taccessToken: \"\",\n\t\t\terror: null\n\t\t}\n\n\t\tif (error) {\n\t\t\tloginresult.error = error;\n\t\t\tOffice.context.ui.messageParent(JSON.stringify(loginresult));\n } else {\n\t\t\tif (response.tokenType === \"id_token\") {\n\t\t\t\tstorageUtils.localSet(StorageDatatype.LoggedIn, \"yes\");\n } else {\n\t\t\t\tloginresult.status = LoginResultStatus.Succeeded;\n\t\t\t\tloginresult.accessToken = response.accessToken;\n\t\t\t\tOffice.context.ui.messageParent(JSON.stringify(loginresult));\n }\n }\n }\n\n\tcomponentDidMount() {\n\t\tOffice.onReady(async (info) => {\n\t\t\tif (info.host !== null) {\n\t\t\t\tlet safeSendToken = storageUtils.localGet(StorageDatatype.SafeSendToken);\n\t\t\t\tlet appSettings = await restClient.getAppSettings(safeSendToken);\n\n\t\t\t\tlet msalConfig: Msal.Configuration = {\n\t\t\t\t\tauth: {\n\t\t\t\t\t\tclientId: appSettings.content != null ? appSettings.content : \"\",\n\t\t\t\t\t\tauthority: \"https://login.microsoftonline.com/common\",\n\t\t\t\t\t\tredirectUri: `${window.location.origin}/login`,\n\t\t\t\t\t\tnavigateToLoginRequestUrl: false\n\t\t\t\t\t},\n\t\t\t\t\tcache: {\n\t\t\t\t\t\tcacheLocation: \"localStorage\", // Needed to avoid \"User login is required\" error.\n\t\t\t\t\t\tstoreAuthStateInCookie: true // Recommended to avoid certain IE/Edge issues.\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tlet userAgentApp = new Msal.UserAgentApplication(msalConfig);\n\t\t\t\tlet requestObj = {\n\t\t\t\t\tscopes: [\"https://graph.microsoft.com/Files.ReadWrite\", \"https://graph.microsoft.com/Mail.ReadWrite.Shared\", \"https://graph.microsoft.com/Calendars.ReadWrite.Shared\"]\n\t\t\t\t};\n\t\t\t\tuserAgentApp.handleRedirectCallback(this.authCallback);\n\n\t\t\t\t// The very first time the add-in runs on a developer's computer, msal.js hasn't yet\n\t\t\t\t// stored login data in localStorage. So a direct call of acquireTokenRedirect \n\t\t\t\t// causes the error \"User login is required\". Once the user is logged in successfully\n\t\t\t\t// the first time, msal data in localStorage will prevent this error from ever hap-\n\t\t\t\t// pening again; but the error must be blocked here, so that the user can login \n\t\t\t\t// successfully the first time. To do that, call loginRedirect first instead of \n\t\t\t\t// acquireTokenRedirect.\n\t\t\t\tif (storageUtils.localGet(StorageDatatype.LoggedIn) === \"yes\") {\n\t\t\t\t\tuserAgentApp.acquireTokenRedirect(requestObj);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// This will login the user and then the (response.tokenType === \"id_token\")\n\t\t\t\t\t// path in authCallback below will run, which sets localStorage.loggedIn to \"yes\"\n\t\t\t\t\t// and then the dialog is redirected back to this script, so the \n\t\t\t\t\t// acquireTokenRedirect above runs.\n\t\t\t\t\tuserAgentApp.loginRedirect(requestObj);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n render() {\n\t\treturn (\n\t\t\t\n );\n }\n}","import 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\nimport '@fluentui/react/dist/css/fabric.min.css';\nimport App from './components/App/App';\nimport { initializeIcons } from '@fluentui/react/lib/Icons';\nimport { initializeFileTypeIcons } from '@fluentui/react-file-type-icons';\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport LandingPage from './components/LandingPage';\nimport { processOnSendEvent } from './lib/AddIn';\nimport { BrowserRouter as Router, Switch, Route, } from \"react-router-dom\";\nimport LoginPage from './components/Login/LoginPage';\n\ninitializeIcons();\ninitializeFileTypeIcons();\n\ndeclare global {\n\tinterface Window { onSendEvent: any; }\n}\n\nwindow.onSendEvent = function onSendEvent(sendEvent) {\n\tprocessOnSendEvent(sendEvent);\n}\n\nconst routing = (\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t{/**/}\n\t\t\n\t\n)\n\nReactDOM.render(routing, document.getElementById('container'));"],"sourceRoot":""}