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GACrDwL,EAAIgI,EAASlY,OAAQkQ,IACzB+J,EAAU/B,EAAShI,GAChBnX,EAAoBC,EAAEghB,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOlhB,EAAoBkf,EAAE5Z,EAAO,EAGjCkc,EAAqBC,KAAmB,aAAIA,KAAmB,cAAK,GACxED,EAAmBha,QAAQ2Z,EAAqB5F,KAAK,KAAM,IAC3DiG,EAAmBnK,KAAO8J,EAAqB5F,KAAK,KAAMiG,EAAmBnK,KAAKkE,KAAKiG,QC7CvFxhB,EAAoBkf,OAAElN,EAAW,CAAC,KAAK,IAAOhS,EAAoB,SAClE,IAAI0hB,EAAsB1hB,EAAoBkf,OAAElN,EAAW,CAAC,KAAK,IAAOhS,EAAoB,SAC5F0hB,EAAsB1hB,EAAoBkf,EAAEwC","sources":["webpack:///webpack/runtime/chunk loaded","webpack:///webpack/runtime/create fake namespace object","webpack:///../node_modules/moment/locale/ sync ^\\.\\/.*$","webpack:///./components/App.tsx","webpack:///./components/Campaign.tsx","webpack:///./components/Debugger.tsx","webpack:///./plugin.tsx","webpack:///./util.ts","webpack:///./views/CampaignStart.tsx","webpack:///./views/CampaignView.tsx","webpack:///./views/FileUploadButton.tsx","webpack:///./views/Message.tsx","webpack:///./views/Progress.tsx","webpack:///./views/Setup.tsx","webpack:///./views/SignIn.tsx","webpack:///./views/Wrapper.tsx","webpack:///webpack/bootstrap","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/global","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///webpack/runtime/node module decorator","webpack:///webpack/runtime/runtimeId","webpack:///webpack/runtime/jsonp chunk loading","webpack:///webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","var map = {\n\t\"./af\": 99805,\n\t\"./af.js\": 99805,\n\t\"./ar\": 94449,\n\t\"./ar-dz\": 44468,\n\t\"./ar-dz.js\": 44468,\n\t\"./ar-kw\": 63480,\n\t\"./ar-kw.js\": 63480,\n\t\"./ar-ly\": 64197,\n\t\"./ar-ly.js\": 64197,\n\t\"./ar-ma\": 62180,\n\t\"./ar-ma.js\": 62180,\n\t\"./ar-sa\": 50230,\n\t\"./ar-sa.js\": 50230,\n\t\"./ar-tn\": 72808,\n\t\"./ar-tn.js\": 72808,\n\t\"./ar.js\": 94449,\n\t\"./az\": 45865,\n\t\"./az.js\": 45865,\n\t\"./be\": 86627,\n\t\"./be.js\": 86627,\n\t\"./bg\": 60901,\n\t\"./bg.js\": 60901,\n\t\"./bm\": 63179,\n\t\"./bm.js\": 63179,\n\t\"./bn\": 61966,\n\t\"./bn.js\": 61966,\n\t\"./bo\": 6317,\n\t\"./bo.js\": 6317,\n\t\"./br\": 46474,\n\t\"./br.js\": 46474,\n\t\"./bs\": 35961,\n\t\"./bs.js\": 35961,\n\t\"./ca\": 77270,\n\t\"./ca.js\": 77270,\n\t\"./cs\": 61564,\n\t\"./cs.js\": 61564,\n\t\"./cv\": 43239,\n\t\"./cv.js\": 43239,\n\t\"./cy\": 92366,\n\t\"./cy.js\": 92366,\n\t\"./da\": 82453,\n\t\"./da.js\": 82453,\n\t\"./de\": 76601,\n\t\"./de-at\": 25027,\n\t\"./de-at.js\": 25027,\n\t\"./de-ch\": 8101,\n\t\"./de-ch.js\": 8101,\n\t\"./de.js\": 76601,\n\t\"./dv\": 96080,\n\t\"./dv.js\": 96080,\n\t\"./el\": 12655,\n\t\"./el.js\": 12655,\n\t\"./en-SG\": 11392,\n\t\"./en-SG.js\": 11392,\n\t\"./en-au\": 46836,\n\t\"./en-au.js\": 46836,\n\t\"./en-ca\": 22086,\n\t\"./en-ca.js\": 22086,\n\t\"./en-gb\": 2103,\n\t\"./en-gb.js\": 2103,\n\t\"./en-ie\": 35964,\n\t\"./en-ie.js\": 35964,\n\t\"./en-il\": 74379,\n\t\"./en-il.js\": 74379,\n\t\"./en-nz\": 71502,\n\t\"./en-nz.js\": 71502,\n\t\"./eo\": 90050,\n\t\"./eo.js\": 90050,\n\t\"./es\": 43350,\n\t\"./es-do\": 49338,\n\t\"./es-do.js\": 49338,\n\t\"./es-us\": 89947,\n\t\"./es-us.js\": 89947,\n\t\"./es.js\": 43350,\n\t\"./et\": 18231,\n\t\"./et.js\": 18231,\n\t\"./eu\": 28512,\n\t\"./eu.js\": 28512,\n\t\"./fa\": 59083,\n\t\"./fa.js\": 59083,\n\t\"./fi\": 25059,\n\t\"./fi.js\": 25059,\n\t\"./fo\": 83369,\n\t\"./fo.js\": 83369,\n\t\"./fr\": 27390,\n\t\"./fr-ca\": 66711,\n\t\"./fr-ca.js\": 66711,\n\t\"./fr-ch\": 6152,\n\t\"./fr-ch.js\": 6152,\n\t\"./fr.js\": 27390,\n\t\"./fy\": 62419,\n\t\"./fy.js\": 62419,\n\t\"./ga\": 3002,\n\t\"./ga.js\": 3002,\n\t\"./gd\": 82533,\n\t\"./gd.js\": 82533,\n\t\"./gl\": 16557,\n\t\"./gl.js\": 16557,\n\t\"./gom-latn\": 25387,\n\t\"./gom-latn.js\": 25387,\n\t\"./gu\": 17462,\n\t\"./gu.js\": 17462,\n\t\"./he\": 39237,\n\t\"./he.js\": 39237,\n\t\"./hi\": 49617,\n\t\"./hi.js\": 49617,\n\t\"./hr\": 36544,\n\t\"./hr.js\": 36544,\n\t\"./hu\": 60341,\n\t\"./hu.js\": 60341,\n\t\"./hy-am\": 41388,\n\t\"./hy-am.js\": 41388,\n\t\"./id\": 75251,\n\t\"./id.js\": 75251,\n\t\"./is\": 41146,\n\t\"./is.js\": 41146,\n\t\"./it\": 37891,\n\t\"./it-ch\": 80007,\n\t\"./it-ch.js\": 80007,\n\t\"./it.js\": 37891,\n\t\"./ja\": 73727,\n\t\"./ja.js\": 73727,\n\t\"./jv\": 5198,\n\t\"./jv.js\": 5198,\n\t\"./ka\": 28974,\n\t\"./ka.js\": 28974,\n\t\"./kk\": 37308,\n\t\"./kk.js\": 37308,\n\t\"./km\": 57786,\n\t\"./km.js\": 57786,\n\t\"./kn\": 84807,\n\t\"./kn.js\": 84807,\n\t\"./ko\": 61584,\n\t\"./ko.js\": 61584,\n\t\"./ku\": 61906,\n\t\"./ku.js\": 61906,\n\t\"./ky\": 79190,\n\t\"./ky.js\": 79190,\n\t\"./lb\": 7396,\n\t\"./lb.js\": 7396,\n\t\"./lo\": 38503,\n\t\"./lo.js\": 38503,\n\t\"./lt\": 33010,\n\t\"./lt.js\": 33010,\n\t\"./lv\": 5192,\n\t\"./lv.js\": 5192,\n\t\"./me\": 51944,\n\t\"./me.js\": 51944,\n\t\"./mi\": 56492,\n\t\"./mi.js\": 56492,\n\t\"./mk\": 2934,\n\t\"./mk.js\": 2934,\n\t\"./ml\": 61463,\n\t\"./ml.js\": 61463,\n\t\"./mn\": 8377,\n\t\"./mn.js\": 8377,\n\t\"./mr\": 78733,\n\t\"./mr.js\": 78733,\n\t\"./ms\": 18030,\n\t\"./ms-my\": 39445,\n\t\"./ms-my.js\": 39445,\n\t\"./ms.js\": 18030,\n\t\"./mt\": 55887,\n\t\"./mt.js\": 55887,\n\t\"./my\": 87228,\n\t\"./my.js\": 87228,\n\t\"./nb\": 48294,\n\t\"./nb.js\": 48294,\n\t\"./ne\": 19559,\n\t\"./ne.js\": 19559,\n\t\"./nl\": 20600,\n\t\"./nl-be\": 78796,\n\t\"./nl-be.js\": 78796,\n\t\"./nl.js\": 20600,\n\t\"./nn\": 9570,\n\t\"./nn.js\": 9570,\n\t\"./pa-in\": 87101,\n\t\"./pa-in.js\": 87101,\n\t\"./pl\": 56118,\n\t\"./pl.js\": 56118,\n\t\"./pt\": 29198,\n\t\"./pt-br\": 7203,\n\t\"./pt-br.js\": 7203,\n\t\"./pt.js\": 29198,\n\t\"./ro\": 45565,\n\t\"./ro.js\": 45565,\n\t\"./ru\": 33315,\n\t\"./ru.js\": 33315,\n\t\"./sd\": 58473,\n\t\"./sd.js\": 58473,\n\t\"./se\": 11258,\n\t\"./se.js\": 11258,\n\t\"./si\": 98798,\n\t\"./si.js\": 98798,\n\t\"./sk\": 26404,\n\t\"./sk.js\": 26404,\n\t\"./sl\": 7057,\n\t\"./sl.js\": 7057,\n\t\"./sq\": 25718,\n\t\"./sq.js\": 25718,\n\t\"./sr\": 45363,\n\t\"./sr-cyrl\": 20478,\n\t\"./sr-cyrl.js\": 20478,\n\t\"./sr.js\": 45363,\n\t\"./ss\": 37260,\n\t\"./ss.js\": 37260,\n\t\"./sv\": 42231,\n\t\"./sv.js\": 42231,\n\t\"./sw\": 27104,\n\t\"./sw.js\": 27104,\n\t\"./ta\": 47493,\n\t\"./ta.js\": 47493,\n\t\"./te\": 57705,\n\t\"./te.js\": 57705,\n\t\"./tet\": 94457,\n\t\"./tet.js\": 94457,\n\t\"./tg\": 22727,\n\t\"./tg.js\": 22727,\n\t\"./th\": 32206,\n\t\"./th.js\": 32206,\n\t\"./tl-ph\": 77243,\n\t\"./tl-ph.js\": 77243,\n\t\"./tlh\": 60016,\n\t\"./tlh.js\": 60016,\n\t\"./tr\": 87020,\n\t\"./tr.js\": 87020,\n\t\"./tzl\": 8026,\n\t\"./tzl.js\": 8026,\n\t\"./tzm\": 78537,\n\t\"./tzm-latn\": 87899,\n\t\"./tzm-latn.js\": 87899,\n\t\"./tzm.js\": 78537,\n\t\"./ug-cn\": 40818,\n\t\"./ug-cn.js\": 40818,\n\t\"./uk\": 48478,\n\t\"./uk.js\": 48478,\n\t\"./ur\": 77893,\n\t\"./ur.js\": 77893,\n\t\"./uz\": 89133,\n\t\"./uz-latn\": 20311,\n\t\"./uz-latn.js\": 20311,\n\t\"./uz.js\": 89133,\n\t\"./vi\": 52179,\n\t\"./vi.js\": 52179,\n\t\"./x-pseudo\": 92455,\n\t\"./x-pseudo.js\": 92455,\n\t\"./yo\": 3310,\n\t\"./yo.js\": 3310,\n\t\"./zh-cn\": 27244,\n\t\"./zh-cn.js\": 27244,\n\t\"./zh-hk\": 40076,\n\t\"./zh-hk.js\": 40076,\n\t\"./zh-tw\": 88588,\n\t\"./zh-tw.js\": 88588\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 61738;","import * as React from 'react';\r\nimport * as _ from 'lodash'\r\nimport * as moment from 'moment';\r\nimport * as Cookies from 'js-cookie';\r\nimport Progress from '../views/Progress';\r\nimport Message from '../views/Message';\r\nimport Setup from '../views/Setup';\r\nimport SignIn from '../views/SignIn';\r\nimport Campaign from './Campaign';\r\nimport { apiGetAccount, clientLog } from '../util'\r\n\r\nexport interface AppProps {\r\n apiLinked: boolean;\r\n title: string;\r\n isOfficeInitialized: boolean;\r\n initMustSetup: boolean;\r\n itemID: string;\r\n userIdentityToken: string;\r\n initError: string;\r\n initEx: string;\r\n onReset: () => void;\r\n}\r\n\r\nexport interface AppState {\r\n account: any;\r\n signedOut: boolean;\r\n}\r\n\r\nconst COOKIE_AUTOSIGNINDISABLED = \"mm365-autosignindisabled\";\r\nconst TRUE = \"1\";\r\n\r\nexport default class App extends React.Component {\r\n\r\n constructor(props, context) {\r\n super(props, context);\r\n this.state = {\r\n account: null,\r\n signedOut: false,\r\n };\r\n\r\n }\r\n\r\n async componentDidMount() {\r\n \r\n }\r\n\r\n async componentWillReceiveProps(nextProps: AppProps) {\r\n var autoSignIn = !this.isAutoSignInDisabled();\r\n if (autoSignIn) {\r\n clientLog(\"Automatic sign-in enabled\")\r\n } else {\r\n clientLog(\"Automatic sign-in disabled\")\r\n }\r\n if (nextProps.apiLinked === true && this.props.apiLinked === false) {\r\n // Linking occurred\r\n if (autoSignIn) {\r\n await this.signIn();\r\n } else {\r\n this.setState({ signedOut: true });\r\n }\r\n }\r\n }\r\n\r\n isAutoSignInDisabled = () => {\r\n return Cookies.get(COOKIE_AUTOSIGNINDISABLED) === TRUE;\r\n }\r\n\r\n setAutoSignInDisabledCookie = (autoSignInDisabled: boolean) => {\r\n if (autoSignInDisabled) {\r\n clientLog(\"Deactivating automatic sign-in\")\r\n Cookies.set(COOKIE_AUTOSIGNINDISABLED, TRUE, { secure: true, sameSite: 'None', expires: 365 });\r\n } else {\r\n clientLog(\"Re-enabling automatic sign-in\")\r\n Cookies.remove(COOKIE_AUTOSIGNINDISABLED);\r\n }\r\n }\r\n\r\n signIn = async () => {\r\n this.setAutoSignInDisabledCookie(false);\r\n\r\n this.setState({ account: null, signedOut: false }, async () => {\r\n clientLog(\"Account null and signedOut false\");\r\n\r\n var account = await apiGetAccount();\r\n\r\n clientLog(\"Current Plan: \" + account.plan);\r\n this.setState({ account });\r\n\r\n });\r\n }\r\n\r\n autoLogin = (account: any, url: string) => {\r\n const prefix = \"https://applink.mailmerge365.com\";\r\n if (url[0] != \"/\") return url;\r\n return `${account.appLink}/autologin?${account.autoLogin}&redirectUri=${encodeURIComponent(url)}`;\r\n };\r\n\r\n reset = async () => {\r\n this.setState({ account: null, signedOut: false }, () => this.props.onReset());\r\n }\r\n\r\n click = async () => {\r\n /**\r\n * Insert your Outlook code here\r\n */\r\n }\r\n\r\n render() {\r\n const {\r\n title,\r\n isOfficeInitialized,\r\n initMustSetup,\r\n initError,\r\n initEx,\r\n itemID,\r\n userIdentityToken\r\n } = this.props;\r\n\r\n const {\r\n account,\r\n signedOut,\r\n } = this.state;\r\n\r\n //return { }}\r\n ///>\r\n if (initMustSetup && (account == null || account.setupComplete == false)) {\r\n return (\r\n this.setState({ account })} userIdentityToken={userIdentityToken } />\r\n );\r\n }\r\n\r\n if (initError != null) {\r\n return (\r\n {\r\n this.setAutoSignInDisabledCookie(true);\r\n this.setState({ signedOut: true, account: null })\r\n }}\r\n title={'There was a problem starting MailMerge365'}\r\n message={initError + \" As a first step try clicking in the white space below this message (to focus the add-in) and pressing CTRL + R (or CMD + R) to refresh the add-in cache.\"}\r\n additional={initEx}\r\n dismissButtonTitle={null}\r\n />\r\n );\r\n }\r\n\r\n if (!isOfficeInitialized) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n if (account == null && signedOut == true) {\r\n return (\r\n {\r\n this.setAutoSignInDisabledCookie(false);\r\n this.reset();\r\n }}\r\n />\r\n );\r\n }\r\n\r\n if (account == null) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n if (itemID == null) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n return {\r\n this.setAutoSignInDisabledCookie(true);\r\n this.setState({ signedOut: true, account: null })\r\n }}\r\n firstRun={initMustSetup}\r\n title={title}\r\n exchangeItemID={itemID}\r\n />\r\n\r\n //return (\r\n //
\r\n //
\r\n\r\n //

Welcome to MailMerge365

\r\n //

To start setting up your mail merge campaign upload a file containing at least a list of email addresses. You can add up to 50 additional columns to personalize the email.

\r\n\r\n //
\r\n //);\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport * as _ from 'lodash'\r\nimport * as moment from 'moment'\r\nimport { Button, ButtonType } from 'office-ui-fabric-react';\r\nimport Progress from '../views/Progress';\r\nimport Message from '../views/Message';\r\nimport CampaignStart from '../views/CampaignStart';\r\nimport CampaignView from '../views/CampaignView';\r\nimport {\r\n clientLog,\r\n apiUnlink,\r\n apiCreateCampaign,\r\n apiDeleteCampaign,\r\n apiGetCampaign,\r\n apiSetCampaignSettings,\r\n apiUploadSourceData,\r\n apiUploadSourceDataDirect,\r\n apiContinueSourceData,\r\n apiSetCampaignPreview,\r\n apiCheckSourceData\r\n} from '../util'\r\n\r\nexport interface Props {\r\n firstRun: boolean;\r\n title: string;\r\n exchangeItemID: string;\r\n account: any;\r\n autoLogin: (any, string) => string;\r\n onSignout: () => void,\r\n}\r\n\r\nexport interface State {\r\n hasSentPreviousCampaign: boolean;\r\n loaded: boolean;\r\n working: boolean;\r\n newCampaign: boolean;\r\n campaign: any;\r\n error: string;\r\n files: FileList;\r\n directData: string;\r\n errorDismissable: boolean;\r\n mailType: Office.CoercionType;\r\n attachmentWarning: boolean;\r\n warning: string;\r\n warningCancelAction: () => void;\r\n warningContinueAction: () => void;\r\n}\r\n\r\nexport default class Campaign extends React.Component {\r\n constructor(props, context) {\r\n super(props, context);\r\n this.state = this.emptyState();\r\n }\r\n\r\n emptyState = () => ({\r\n hasSentPreviousCampaign: false,\r\n loaded: false,\r\n campaign: null,\r\n newCampaign: false,\r\n error: null,\r\n errorDismissable: false,\r\n files: null,\r\n directData: null,\r\n mailType: null,\r\n attachmentWarning: false,\r\n working: false,\r\n warning: null,\r\n warningCancelAction: null,\r\n warningContinueAction: null,\r\n })\r\n\r\n async componentDidMount() {\r\n await this.getCampaign();\r\n await this.getItemType();\r\n\r\n setInterval(async () => await this.getItemType(), 3000);\r\n setInterval(async () => await this.checkCampaignRecipient(), 2500);\r\n }\r\n\r\n getItemType = async () => {\r\n Office.context.mailbox.item.body.getTypeAsync({}, this.onGetItemType);\r\n }\r\n\r\n onGetItemType = async (result: Office.AsyncResult) => {\r\n if (result.status == Office.AsyncResultStatus.Failed) {\r\n clientLog(`Error in onGetItemType: ${result.error}`);\r\n this.setState({ error: \"There was a problem establishing the type of e-mail: \" + result.error });\r\n }\r\n else {\r\n if (this.state.mailType !== result.value) {\r\n clientLog(\"Mail type has changed from \" + this.state.mailType + \" to \" + result.value);\r\n this.setState({ mailType: result.value });\r\n }\r\n }\r\n }\r\n\r\n\r\n getCampaign = async () => {\r\n let campaignResult = await apiGetCampaign(this.props.exchangeItemID);\r\n if (campaignResult.success) {\r\n clientLog(`getCampaign: OK - ${campaignResult.campaign && campaignResult.campaign.campaignID}`);\r\n this.setState({ hasSentPreviousCampaign: campaignResult.hasSentPreviousCampaign });\r\n this.loadCampaign(campaignResult.campaign, false);\r\n\r\n } else {\r\n clientLog(`Error in getCampaign: ${campaignResult.reason}`);\r\n this.setState({ error: campaignResult.reason })\r\n\r\n }\r\n }\r\n\r\n createCampaign = async (cloneBodyAndSubjectFromCampaignID?: string, createSourceFromCampaignID?: string, createSourceFromCriteria?: string) => {\r\n this.setState({ working: true });\r\n\r\n let campaignResult = await apiCreateCampaign(\r\n this.props.exchangeItemID,\r\n null,\r\n cloneBodyAndSubjectFromCampaignID,\r\n createSourceFromCampaignID,\r\n createSourceFromCriteria);\r\n\r\n if (campaignResult.success) {\r\n clientLog(`createCampaign: OK - ${campaignResult.campaign && campaignResult.campaign.campaignID}`);\r\n this.setState({ hasSentPreviousCampaign: campaignResult.hasSentPreviousCampaign });\r\n\r\n console.log(campaignResult.campaign);\r\n\r\n this.loadCampaign(campaignResult.campaign, true)\r\n\r\n await this.onSetSettings({\r\n readTrackingEnabled: null,\r\n linkTrackingEnabled: null,\r\n unsubscribeEnabled: null,\r\n bcc: campaignResult.campaign.bcc,\r\n replyTo: campaignResult.campaign.replyTo,\r\n delayInSecondsForEachCampaignMail: campaignResult.campaign.delayInSecondsForEachCampaignMail\r\n });\r\n\r\n const {\r\n mailType\r\n } = this.state;\r\n\r\n const item = Office.context.mailbox.item;\r\n if (campaignResult.subject && campaignResult.subject.length > 0) {\r\n item.subject.getAsync((exisingSubject) => {\r\n if (!exisingSubject || !exisingSubject.value || exisingSubject.value.length == 0) {\r\n item.subject.setAsync(\r\n campaignResult.subject,\r\n {\r\n asyncContext: {}\r\n },\r\n (asyncResult) => {\r\n if (asyncResult.status == Office.AsyncResultStatus.Failed) {\r\n clientLog(\"Error in createCampaign-setSubject: \" + asyncResult.error.message)\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n campaignResult.attachments.forEach(obj => {\r\n if (obj.contentID && obj.contentID.length > 0 && obj.name && obj.name.length > 0 && obj.name.indexOf(\".\") >= 0) {\r\n var nameParts = obj.name.split(\".\");\r\n var extension = nameParts[nameParts.length - 1];\r\n\r\n var oldContentID = obj.contentID;\r\n obj.contentID = obj.contentID + \".\" + extension;\r\n var reg = new RegExp('cid:' + oldContentID, 'gi');\r\n\r\n if (campaignResult.htmlBody && campaignResult.htmlBody.length > 0) {\r\n campaignResult.htmlBody = campaignResult.htmlBody.replace(reg, \"cid:\" + obj.contentID);\r\n }\r\n if (campaignResult.textBody && campaignResult.textBody.length > 0) {\r\n campaignResult.textBody = campaignResult.textBody.replace(reg, \"cid:\" + obj.contentID);\r\n }\r\n }\r\n });\r\n\r\n var loadContents = () => {\r\n if (mailType == Office.CoercionType.Html) {\r\n if (campaignResult.htmlBody && campaignResult.htmlBody.length > 0) {\r\n item.body.getAsync(Office.CoercionType.Html, (existingBodyResult) => {\r\n\r\n var existingBodyValue = (existingBodyResult.value || '').trim();\r\n\r\n if (existingBodyValue.endsWith(\"
\")) {\r\n existingBodyValue = existingBodyValue.substring(0, existingBodyValue.length - \"
\".length);\r\n }\r\n\r\n existingBodyValue = existingBodyValue.substring(Math.max(0, existingBodyValue.toLowerCase().indexOf(\"\")+1));\r\n console.log('existing body2:' + existingBodyValue + '|')\r\n\r\n if (existingBodyValue.toLowerCase().indexOf(\"\") >= 0) {\r\n existingBodyValue = existingBodyValue.substring(0, existingBodyValue.toLowerCase().indexOf(\"\"));\r\n console.log('existing body3:' + existingBodyValue + '|')\r\n }\r\n\r\n console.log('existing body:' + existingBodyValue + '|')\r\n\r\n var newBody = existingBodyValue;\r\n if (newBody.toLowerCase().indexOf('') >= 0) {\r\n var searchMask = \"\";\r\n var regEx = new RegExp(searchMask, \"ig\");\r\n var replaceMask = existingBodyValue+ \"\";\r\n\r\n newBody = newBody.replace(regEx, replaceMask);\r\n } else {\r\n newBody = campaignResult.htmlBody;\r\n }\r\n\r\n console.log('campaign body:' + newBody + '|')\r\n\r\n item.body.setAsync(\r\n newBody,\r\n {\r\n coercionType: Office.CoercionType.Html,\r\n asyncContext: {}\r\n },\r\n (asyncResult) => {\r\n if (asyncResult.status == Office.AsyncResultStatus.Failed) {\r\n clientLog(\"Error in createCampaign-setHtmlBody: \" + asyncResult.error.message)\r\n }\r\n\r\n console.log(\"body set\", asyncResult);\r\n });\r\n });\r\n }\r\n }\r\n else {\r\n if (campaignResult.textBody && campaignResult.textBody.length > 0) {\r\n item.body.getAsync(Office.CoercionType.Text, (existingBodyResult) => {\r\n\r\n var exisingBodyValue = (existingBodyResult.value || '') + \"\\n\\n\";\r\n\r\n item.body.setAsync(\r\n exisingBodyValue + campaignResult.textBody,\r\n {\r\n coercionType: Office.CoercionType.Text,\r\n asyncContext: {}\r\n },\r\n (asyncResult) => {\r\n if (asyncResult.status == Office.AsyncResultStatus.Failed) {\r\n clientLog(\"Error in createCampaign-setTextBody: \" + asyncResult.error.message)\r\n }\r\n });\r\n });\r\n }\r\n }\r\n }\r\n\r\n if (campaignResult.attachments && campaignResult.attachments.length > 0) {\r\n\r\n var baseUrl = window.location.protocol + \"//\" + window.location.host;\r\n clientLog(\"Using base Url: \" + baseUrl);\r\n var attachmentCount = campaignResult.attachments.length;\r\n campaignResult.attachments.forEach(obj => {\r\n if (obj != null) {\r\n //baseUrl = \"https://b0ba177607d2.ngrok.io\"; // Use NGROK for DEV\r\n var fullUrl = baseUrl + obj.url;\r\n clientLog(\"Adding attachment: \" + fullUrl);\r\n\r\n var isInline = obj.contentID && obj.contentID.length > 0;\r\n var opts = { isInline };\r\n item.addFileAttachmentAsync(fullUrl,\r\n isInline ? obj.contentID : obj.name,\r\n opts,\r\n (asyncResult) => {\r\n if (asyncResult.status == Office.AsyncResultStatus.Failed) {\r\n clientLog(\"Error in createCampaign-addAttachment: \" + JSON.stringify(asyncResult.error))\r\n }\r\n attachmentCount--;\r\n\r\n if (attachmentCount <= 0) {\r\n loadContents();\r\n }\r\n })\r\n }\r\n });\r\n }\r\n else {\r\n loadContents();\r\n }\r\n\r\n\r\n\r\n\r\n\r\n } else {\r\n clientLog(`Error in createCampaign: ${campaignResult.reason}`);\r\n this.setState({ error: campaignResult.reason, working: false })\r\n\r\n }\r\n }\r\n\r\n cancelCampaign = async () => {\r\n let campaignResult = await apiDeleteCampaign(this.state.campaign.campaignID);\r\n if (campaignResult.success) {\r\n this.setState(this.emptyState(), () => this.loadCampaign(null, null));\r\n clientLog(\"Resetting recipient to remove campaign email address\");\r\n await Office.context.mailbox.item.to.setAsync([], null, async () => { });\r\n }\r\n else {\r\n clientLog(`Error in cancelCampaign: ${campaignResult.reason}`);\r\n this.setState({ error: campaignResult.reason, working: false })\r\n\r\n }\r\n }\r\n\r\n loadCampaign = async (campaign, newCampaign) => {\r\n if (campaign != null) {\r\n \r\n let {\r\n files,\r\n directData\r\n } = this.state;\r\n\r\n if (files != null) {\r\n this.setState({ campaign, newCampaign, loaded: true, files: null, directData: null }, () => this.uploadFile(files));\r\n }\r\n else if (directData != null) {\r\n this.setState({ campaign, newCampaign, loaded: true, files: null }, () => this.uploadDirectData(directData));\r\n }\r\n else {\r\n this.setState({ campaign, newCampaign, loaded: true, working: false });\r\n }\r\n } else {\r\n this.setState({ campaign: null, loaded: true, working: false });\r\n }\r\n }\r\n\r\n checkCampaignRecipient = async () => {\r\n\r\n let campaign = this.state.campaign;\r\n if (campaign == null ||\r\n campaign.campaignToEmailAddress == null ||\r\n campaign.campaignToEmailAddress.length == 0) {\r\n return;\r\n }\r\n\r\n Office.context.mailbox.item.to.getAsync({}, async (result) => {\r\n\r\n if (result.error) {\r\n console.error(\"Fetching recipients failed\", result.error);\r\n }\r\n\r\n const emailParts = campaign.campaignToEmailAddress.split('@');\r\n const domain = emailParts[1].toLowerCase();\r\n const toRecipients = result.value;\r\n let correctCampaignEmailOrNonCampaignEmails = _.filter(toRecipients, toEntry =>\r\n toEntry.emailAddress.toLowerCase() === campaign.campaignToEmailAddress.toLowerCase() ||\r\n toEntry.emailAddress.toLowerCase().split('@')[1] !== domain);\r\n\r\n const correctCampaignEmailFound = _.find(toRecipients, toEntry => toEntry.emailAddress.toLowerCase() === campaign.campaignToEmailAddress.toLowerCase());\r\n\r\n if (!correctCampaignEmailFound) {\r\n correctCampaignEmailOrNonCampaignEmails = [\r\n {\r\n displayName: `MailMerge365 Campaign`,\r\n emailAddress: campaign.campaignToEmailAddress,\r\n },\r\n ...correctCampaignEmailOrNonCampaignEmails];\r\n }\r\n\r\n if (!!toRecipients && !!correctCampaignEmailOrNonCampaignEmails) {\r\n if (this.areSameRecipients(toRecipients, correctCampaignEmailOrNonCampaignEmails)) {\r\n\r\n } else {\r\n clientLog(\"Setting recipients: \" + JSON.stringify(correctCampaignEmailOrNonCampaignEmails));\r\n\r\n Office.context.mailbox.item.to.setAsync(correctCampaignEmailOrNonCampaignEmails, null, (result) => {\r\n if (result.error) {\r\n clientLog(\"Setting recipient failed: \" + result.error);\r\n }\r\n });\r\n }\r\n } else {\r\n clientLog(\"Cannot check recipients - probably dialog open.\");\r\n }\r\n })\r\n }\r\n\r\n areSameRecipients = (array1, array2) => {\r\n if (array1.length === array2.length) {\r\n return array1.every((element, index) => {\r\n if (element.emailAddress === array2[index].emailAddress) {\r\n return true;\r\n }\r\n\r\n return false;\r\n });\r\n }\r\n\r\n return false;\r\n }\r\n\r\n\r\n openWindowWithPost = async (url, data) => {\r\n var form = document.createElement(\"form\");\r\n form.target = \"_blank\";\r\n form.method = \"POST\";\r\n form.action = url;\r\n form.style.display = \"none\";\r\n\r\n for (var key in data) {\r\n var input = document.createElement(\"input\");\r\n input.type = \"hidden\";\r\n input.name = key;\r\n input.value = data[key];\r\n form.appendChild(input);\r\n }\r\n\r\n //var btn = document.createElement(\"button\");\r\n //form.appendChild(btn);\r\n\r\n document.body.appendChild(form);\r\n form.submit();\r\n document.body.removeChild(form);\r\n }\r\n\r\n previewCampaign = async () => {\r\n Office.context.mailbox.item.body.getAsync(this.state.mailType, {}, async (bodyResult) => {\r\n var body = bodyResult.value;\r\n\r\n Office.context.mailbox.item.subject.getAsync({}, async (subjectResult) => {\r\n var subject = subjectResult.value;\r\n\r\n await apiSetCampaignPreview(this.state.campaign.campaignID, {\r\n subject,\r\n email: body,\r\n isHtml: (this.state.mailType == Office.CoercionType.Html)\r\n });\r\n\r\n //this.openWindowWithPost(`/campaigns/${this.state.campaign.campaignID}/preview`, {\r\n // email: body,\r\n // subject: subject\r\n //})\r\n\r\n })\r\n })\r\n }\r\n\r\n onFileSelected = async (files: FileList, cloneBodyAndSubjectFromCampaignID?: string) => {\r\n\r\n const {\r\n campaign,\r\n } = this.state;\r\n\r\n if (campaign == null) {\r\n // create the campaign first, then upload files\r\n this.setState({ files, directData: null }, () => this.createCampaign(cloneBodyAndSubjectFromCampaignID));\r\n } else {\r\n this.uploadFile(files);\r\n }\r\n }\r\n\r\n onDataProvided = async (directData: string, cloneBodyAndSubjectFromCampaignID?: string) => {\r\n\r\n const {\r\n campaign,\r\n } = this.state;\r\n\r\n if (campaign == null) {\r\n // create the campaign first, then upload files\r\n this.setState({ directData, files: null }, () => this.createCampaign(cloneBodyAndSubjectFromCampaignID));\r\n } else {\r\n this.setState({ directData }, () => this.uploadDirectData(directData));\r\n }\r\n }\r\n\r\n uploadFile = async (files) => {\r\n const {\r\n campaign,\r\n } = this.state;\r\n\r\n try {\r\n var result = await apiUploadSourceData(campaign.campaignID, files);\r\n if (!result.success) {\r\n clientLog(`Error in uploadFile: ${result.reason}`);\r\n\r\n this.setState({\r\n error: \"Could not upload file: \" + result.reason,\r\n errorDismissable: true,\r\n working: false,\r\n })\r\n\r\n } else {\r\n this.setState({\r\n campaign: { ...this.state.campaign, ...result.campaign },\r\n working: false,\r\n })\r\n\r\n await this.checkUploadProgress();\r\n }\r\n } catch (ex) {\r\n clientLog(`Error in uploadFile: ${ex}`);\r\n\r\n this.setState({\r\n error: \"Could not upload file. \" + ex,\r\n errorDismissable: true,\r\n working: false,\r\n })\r\n }\r\n }\r\n\r\n uploadDirectData = async (data) => {\r\n const {\r\n campaign,\r\n } = this.state;\r\n\r\n try {\r\n var result = await apiUploadSourceDataDirect(campaign.campaignID, data);\r\n if (!result.success) {\r\n clientLog(`Error in uploadDirectData: ${result.reason}`);\r\n\r\n this.setState({\r\n error: \"Could not upload data: \" + result.reason,\r\n errorDismissable: true,\r\n working: false,\r\n })\r\n\r\n } else {\r\n this.setState({\r\n campaign: { ...this.state.campaign, ...result.campaign },\r\n working: false,\r\n })\r\n\r\n await this.checkUploadProgress();\r\n }\r\n } catch (ex) {\r\n clientLog(`Error in uploadDirectData: ${ex}`);\r\n\r\n this.setState({\r\n error: \"Could not upload data. \" + ex,\r\n errorDismissable: true,\r\n working: false,\r\n })\r\n }\r\n }\r\n\r\n checkUploadProgress = async () => {\r\n\r\n const {\r\n campaign,\r\n files,\r\n } = this.state;\r\n\r\n if (campaign == null) return; // cancelled \r\n\r\n var result = await apiCheckSourceData(campaign.campaignID);\r\n if (!result.success) {\r\n clientLog(`Error in onFileUpload: ${result.reason}`);\r\n if (result.canContinue) {\r\n this.setState({\r\n warning: result.reason,\r\n warningCancelAction: () => this.setState({\r\n warning: null,\r\n campaign: { ...this.state.campaign, sourceDataRows: null }\r\n }),\r\n warningContinueAction: async () => {\r\n await apiContinueSourceData(campaign.campaignID);\r\n this.setState({ warning: null }, () => {\r\n setTimeout(this.checkUploadProgress, 2000);\r\n });\r\n }\r\n })\r\n } else {\r\n this.setState({\r\n error: \"Could not upload file: \" + result.reason,\r\n errorDismissable: true,\r\n campaign: {\r\n ...this.state.campaign,\r\n sourceDataUploadedOn: null,\r\n sourceDataRows: null\r\n },\r\n })\r\n }\r\n\r\n\r\n } else {\r\n\r\n clientLog(\"Waiting ... \" + result.sourceProcessedRows + \"/\" + result.sourceDataRows + \" rows\");\r\n\r\n if (!result.complete) {\r\n this.setState({\r\n campaign: { ...this.state.campaign, ...result },\r\n })\r\n\r\n setTimeout(this.checkUploadProgress, 2000);\r\n } else {\r\n clientLog(\"Upload complete.\")\r\n\r\n this.setState({\r\n loaded: true,\r\n campaign: {\r\n ...this.state.campaign,\r\n ...result\r\n }\r\n })\r\n }\r\n }\r\n }\r\n\r\n onFileClick = (event) => {\r\n event.target.value = null\r\n }\r\n\r\n onAddTemplateToken = (tokenKey: string, toSubject: boolean) => {\r\n const {\r\n mailType\r\n } = this.state;\r\n\r\n const item = Office.context.mailbox.item;\r\n const tokenValue = `{{${tokenKey}}}`\r\n\r\n const addToSubject = () => {\r\n item.subject.getAsync((subjectResult) => {\r\n item.subject.setAsync(subjectResult.value + tokenValue);\r\n })\r\n }\r\n\r\n const addToBody = () => {\r\n if (mailType == Office.CoercionType.Html) {\r\n item.body.setSelectedDataAsync(\r\n tokenValue,\r\n {\r\n coercionType: Office.CoercionType.Html,\r\n asyncContext: {}\r\n },\r\n (asyncResult) => {\r\n if (asyncResult.status == Office.AsyncResultStatus.Failed) {\r\n clientLog(\"Error in onAddTemplateToken: \" + asyncResult.error.message)\r\n }\r\n });\r\n }\r\n else {\r\n item.body.setSelectedDataAsync(\r\n tokenValue,\r\n {\r\n coercionType: Office.CoercionType.Text,\r\n asyncContext: {}\r\n },\r\n (asyncResult) => {\r\n if (asyncResult.status == Office.AsyncResultStatus.Failed) {\r\n clientLog(\"Error in onAddTemplateToken: \" + asyncResult.error.message)\r\n }\r\n });\r\n }\r\n }\r\n\r\n if (toSubject) {\r\n addToSubject();\r\n } else {\r\n addToBody();\r\n }\r\n //Waiting for bug fix from Microsoft\r\n //var isSubjectSelected = false;\r\n //item.getSelectedDataAsync(mailType, (asyncResult) => {\r\n // isSubjectSelected = asyncResult.value && asyncResult.value.sourceProperty == \"subject\";\r\n\r\n // if (isSubjectSelected) {\r\n // addToSubject();\r\n // } else {\r\n // addToBody();\r\n // }\r\n //});\r\n\r\n\r\n\r\n }\r\n\r\n onAddUnsubscribeLink = () => {\r\n const {\r\n mailType\r\n } = this.state;\r\n\r\n const item = Office.context.mailbox.item;\r\n const tokenValue = `{{unsubscribelink}}`\r\n if (mailType == Office.CoercionType.Html) {\r\n item.body.setSelectedDataAsync(\r\n `If you prefer not to receive any further emails from me, please click here.`,\r\n {\r\n coercionType: Office.CoercionType.Html,\r\n asyncContext: {}\r\n },\r\n (asyncResult) => {\r\n if (asyncResult.status == Office.AsyncResultStatus.Failed) {\r\n clientLog(\"Error in onAddUnsubscribeLink: \" + asyncResult.error.message)\r\n }\r\n });\r\n }\r\n else {\r\n item.body.setSelectedDataAsync(\r\n `If you prefer not to receive any further emails from me, please click this link:\\n${tokenValue}`,\r\n {\r\n coercionType: Office.CoercionType.Text,\r\n asyncContext: {}\r\n },\r\n (asyncResult) => {\r\n if (asyncResult.status == Office.AsyncResultStatus.Failed) {\r\n clientLog(\"Error in onAddUnsubscribeLink: \" + asyncResult.error.message)\r\n }\r\n });\r\n }\r\n }\r\n\r\n onSetSettings = async (settings: {\r\n readTrackingEnabled?: boolean,\r\n linkTrackingEnabled?: boolean,\r\n unsubscribeEnabled?: boolean,\r\n name?: string,\r\n bcc?: string,\r\n replyTo?: string,\r\n delayInSecondsForEachCampaignMail?: number,\r\n }) => {\r\n const {\r\n campaign\r\n } = this.state;\r\n\r\n var result = await apiSetCampaignSettings(campaign.campaignID, settings);\r\n\r\n if (!result.success) {\r\n clientLog(`Error in onSetSettings: ${result.reason}`);\r\n this.setState({ error: result.reason });\r\n } else {\r\n var newCampaign = {\r\n ...campaign,\r\n readTrackingEnabled: settings.readTrackingEnabled == null ? campaign.readTrackingEnabled : settings.readTrackingEnabled,\r\n linkTrackingEnabled: settings.linkTrackingEnabled == null ? campaign.linkTrackingEnabled : settings.linkTrackingEnabled,\r\n unsubscribeEnabled: settings.unsubscribeEnabled == null ? campaign.unsubscribeEnabled : settings.unsubscribeEnabled,\r\n name: settings.name == null ? campaign.name : settings.name,\r\n bcc: settings.bcc == null ? campaign.bcc : settings.bcc,\r\n replyTo: settings.replyTo == null ? campaign.replyTo : settings.replyTo,\r\n delayInSecondsForEachCampaignMail: settings.delayInSecondsForEachCampaignMail == null ? campaign.delayInSecondsForEachCampaignMail : settings.delayInSecondsForEachCampaignMail,\r\n };\r\n\r\n this.setState({\r\n campaign: newCampaign\r\n })\r\n }\r\n }\r\n\r\n onReadTrackingEnabledChanged = async (value: boolean) => await this.onSetSettings({ readTrackingEnabled: value });\r\n\r\n onLinkTrackingEnabledChanged = async (value: boolean) => await this.onSetSettings({ linkTrackingEnabled: value });\r\n\r\n onUnsubscribeEnabledChanged = async (value: boolean) => await this.onSetSettings({ unsubscribeEnabled: value });\r\n\r\n onNameChanged = async (value: string) => await this.onSetSettings({ name: value });\r\n\r\n onBccChanged = async (value: string) => await this.onSetSettings({ bcc: value });\r\n\r\n onReplyToChanged = async (value: string) => await this.onSetSettings({ replyTo: value });\r\n\r\n onDelayChanged = async (value: number) => await this.onSetSettings({ delayInSecondsForEachCampaignMail: value });\r\n\r\n render() {\r\n const {\r\n title,\r\n account,\r\n onSignout,\r\n firstRun,\r\n autoLogin,\r\n } = this.props;\r\n\r\n const {\r\n hasSentPreviousCampaign,\r\n error,\r\n errorDismissable,\r\n warning,\r\n warningCancelAction,\r\n warningContinueAction,\r\n campaign,\r\n loaded,\r\n newCampaign,\r\n attachmentWarning,\r\n working,\r\n directData,\r\n } = this.state;\r\n\r\n if (error) {\r\n return this.setState({ error: null, errorDismissable: false })}\r\n />\r\n }\r\n\r\n\r\n if (warning) {\r\n return \r\n }\r\n\r\n if (working) {\r\n return \r\n }\r\n\r\n if (loaded) {\r\n\r\n const campaignCreated = campaign != null;\r\n if (campaignCreated && campaign.sourceDataUploadedOn != null) {\r\n return \r\n } else {\r\n return {\r\n apiUnlink();\r\n onSignout();\r\n }}\r\n firstRun={firstRun}\r\n account={account}\r\n autoLogin={autoLogin}\r\n defaultDirectData={directData}\r\n onFileUpload={this.onFileSelected}\r\n onDirectDataUpload={this.onDataProvided}\r\n onCreateFollowUp={(createSourceFromCampaignID, createSourceFromCriteria) => this.createCampaign(null, createSourceFromCampaignID, createSourceFromCriteria)}\r\n />\r\n }\r\n\r\n } else {\r\n return \r\n }\r\n\r\n //return (\r\n //
\r\n //

CampaignID: {campaignID}

\r\n // {campaignID != null && }\r\n // Start campaign\r\n //
\r\n //);\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport * as _ from 'lodash'\r\nimport * as moment from 'moment'\r\nimport { Button, ButtonType } from 'office-ui-fabric-react';\r\nimport Progress from '../views/Progress';\r\nimport Message from '../views/Message';\r\nimport CampaignStart from '../views/CampaignStart';\r\nimport CampaignView from '../views/CampaignView';\r\nimport { clientLog, apiCreateCampaign, apiGetCampaign, apiSetCampaignSettings, apiUploadSourceData, apiSetCampaignPreview } from '../util'\r\n\r\nexport interface Props {\r\n\r\n}\r\n\r\nexport interface State {\r\n\r\n}\r\n\r\nexport default class Debugger extends React.Component {\r\n\r\n static log = \"\";\r\n\r\n static appendLog = (msg: string) => {\r\n Debugger.log = Debugger.log + msg + \"\\n\";\r\n }\r\n\r\n dump = () => {\r\n Office.context.mailbox.item.to.getAsync({}, async (result) => {\r\n\r\n if (result.error) {\r\n console.error(result.error);\r\n } else {\r\n console.log(result);\r\n }\r\n\r\n });\r\n }\r\n\r\n set = () => {\r\n Office.context.mailbox.item.to.addAsync([{\r\n displayName: `MailMerge365 Campaign`,\r\n emailAddress: \"test@example.com\",\r\n }], (result) => {\r\n console.log(result);\r\n });\r\n }\r\n\r\n\r\n render() {\r\n return <>\r\n Debug
\r\n \r\n \r\n \r\n \r\n }\r\n}\r\n","import * as React from 'react';\r\nimport * as ReactDOM from 'react-dom';\r\nimport { AppContainer } from 'react-hot-loader';\r\nimport { initializeIcons } from 'office-ui-fabric-react/lib/Icons';\r\nimport { log } from 'util';\r\nimport * as moment from 'moment';\r\nimport { clientLog, serverLog, apiLink, apiGetAccount } from './util';\r\nimport { BrowserAuthError, createNestablePublicClientApplication } from \"@azure/msal-browser\";\r\nimport { createLocalUrl } from \"./util\";\r\n\r\nimport App from './components/App';\r\nimport Debugger from './components/Debugger';\r\n\r\nimport 'office-ui-fabric-react/dist/css/fabric.min.css';\r\nimport './styles.less';\r\n\r\nconst title = 'MailMerge365';\r\n\r\nlet isOfficeInitialized = false;\r\nlet initError = null;\r\nlet initEx = null;\r\nlet apiLinked = false;\r\nlet initMustSetup = false;\r\nlet exchangeItemID = null;\r\nlet userIdentityToken = null;\r\nlet userAccessToken = null;\r\n\r\nfunction getUrlParameter(name) {\r\n\tname = name.replace(/[\\[]/, '\\\\[').replace(/[\\]]/, '\\\\]');\r\n\tvar regex = new RegExp('[\\\\?&]' + name + '=([^&#]*)');\r\n\tvar results = regex.exec(location.search);\r\n\treturn results === null ? '' : decodeURIComponent(results[1].replace(/\\+/g, ' '));\r\n};\r\n\r\nfunction getCookie(name) {\r\n\tvar match = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)'));\r\n\tif (match) {\r\n\t\treturn match[2];\r\n\t}\r\n\treturn null;\r\n}\r\n\r\nfunction setCookie(cname, cvalue) {\r\n\tvar d = new Date();\r\n\td.setTime(d.getTime() + (30 * 24 * 60 * 60 * 1000));\r\n\tvar expires = \"expires=\" + d.toUTCString();\r\n\tdocument.cookie = cname + \"=\" + cvalue + \";\" + expires + \";secure=true;path=/;SameSite=Lax;\";\r\n}\r\n\r\nconst onReset = () => {\r\n\tclientLog(\"Reseting\")\r\n\tinitEx = null;\r\n\tinitError = null;\r\n\tinitMustSetup = false;\r\n\tapiLinked = false;\r\n\texchangeItemID = null;\r\n\tuserIdentityToken = null;\r\n\tuserAccessToken = null;\r\n\trender(App);\r\n\tonSignIn();\r\n}\r\n\r\nconst render = (Component) => {\r\n\tReactDOM.render(\r\n\t\t\r\n\t\t\t\r\n\t\t,\r\n\t\tdocument.getElementById('container')\r\n\t);\r\n};\r\n\r\nconst defaultInitErrorMessage = \"There was an error starting the plugin. Client could not get token.\";\r\n\r\nconst handleErrors = (method: string, result: Office.AsyncResult, action: () => void) => {\r\n\tif (result.status != Office.AsyncResultStatus.Succeeded) {\r\n\t\tinitError = defaultInitErrorMessage;\r\n\t\trender(App);\r\n\t}\r\n\telse {\r\n\t\ttry {\r\n\t\t\tclientLog(`${method}: OK`);\r\n\t\t\taction();\r\n\t\t}\r\n\t\tcatch (ex) {\r\n\t\t\tinitError = defaultInitErrorMessage;\r\n\t\t\trender(App);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nlet pca = undefined;\r\nconst onSignIn = async () => {\r\n\r\n\ttry {\r\n\r\n\t\tclientLog(\"Starting\")\r\n\r\n\t\trender(App);\r\n\r\n\t\tlet idToken = null;\r\n\r\n\t\t// Initialize the public client application\r\n\t\tpca = await createNestablePublicClientApplication({\r\n\t\t\tauth: {\r\n\t\t\t\tclientId: \"d87015f3-71a7-42c3-80cb-5e0f636703ae\",\r\n\t\t\t\tauthority: \"https://login.microsoftonline.com/organizations\"\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\tconst tokenRequest = {\r\n\t\t\tscopes: [\"openid\", \"profile\", \"User.Read\"], // copied in fallback\r\n\t\t};\r\n\r\n\t\ttry {\r\n\t\t\tclientLog(\"[MSAL] Trying to acquire token silently...\");\r\n\t\t\tconst userAccount = await pca.acquireTokenSilent(tokenRequest);\r\n\t\t\tclientLog(\"[MSAL] Acquired token silently.\");\r\n\t\t\tidToken = userAccount.idToken;\r\n\t\t} catch (error) {\r\n\t\t\tclientLog(`Unable to acquire token silently: ${JSON.stringify(error)}` /* this is not a client error */);\r\n\t\t}\r\n\r\n\t\tif (idToken === null) {\r\n\t\t\t// Acquire token silent failure. Send an interactive request via popup.\r\n\t\t\ttry {\r\n\t\t\t\tclientLog(\"[MSAL] Trying to acquire token interactively...\");\r\n\t\t\t\tconst userAccount = await pca.acquireTokenPopup(tokenRequest);\r\n\t\t\t\tclientLog(\"[MSAL] Acquired token interactively.\");\r\n\t\t\t\tidToken = userAccount.idToken;\r\n\t\t\t} catch (popupError) {\r\n\r\n\t\t\t\t// Optional fallback if about:blank popup should not be shown\r\n\t\t\t\tif (popupError instanceof BrowserAuthError && popupError.errorCode === \"popup_window_error\") {\r\n\t\t\t\t\tidToken = await getTokenWithDialogApi();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Acquire token interactive failure.\r\n\t\t\t\t\tclientLog(initError = `Unable to acquire token interactively: ${JSON.stringify(popupError)}`);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Log error if both silent and popup requests failed.\r\n\t\tif (idToken === null) {\r\n\t\t\tinitError = initError || `Unable to acquire access token.`;\r\n\t\t\trender(App);\r\n\t\t} else {\r\n\r\n\t\t\tuserIdentityToken = idToken;\r\n\t\t\tOffice.context.mailbox.item.saveAsync(onAfterSaveItem);\r\n\t\t}\r\n\r\n\t} catch (ex) {\r\n\t\tclientLog(\"Error onSignIn\")\r\n\t\tclientLog(ex)\r\n\t\tinitError = defaultInitErrorMessage;\r\n\t\tinitEx = JSON.stringify(ex);\r\n\t\trender(App);\r\n\t}\r\n};\r\n\r\n/** FALLBACK FOR NAA */\r\nexport type AuthDialogResult = {\r\n\tidToken?: string;\r\n\terror?: string;\r\n};\r\n\r\nvar _dialogApiResult: Promise | null = null;\r\n\r\ntype DialogEventMessage = { message: string; origin: string | undefined };\r\ntype DialogEventError = { error: number };\r\ntype DialogEventArg = DialogEventMessage | DialogEventError;\r\n\r\nconst getTokenWithDialogApi: () => Promise = () => {\r\n\t_dialogApiResult = new Promise((resolve, reject) => {\r\n\t\tOffice.context.ui.displayDialogAsync(createLocalUrl(`dialog.html`), { height: 60, width: 30 }, (result) => {\r\n\t\t\tresult.value.addEventHandler(Office.EventType.DialogEventReceived, (arg: DialogEventArg) => {\r\n\t\t\t\tconst errorArg = arg as DialogEventError;\r\n\t\t\t\tif (errorArg.error == 12006) {\r\n\t\t\t\t\t_dialogApiResult = null;\r\n\t\t\t\t\treject(\"Login window closed\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tresult.value.addEventHandler(Office.EventType.DialogMessageReceived, (arg: DialogEventArg) => {\r\n\t\t\t\tconst messageArg = arg as DialogEventMessage;\r\n\t\t\t\tconst parsedMessage = JSON.parse(messageArg.message);\r\n\t\t\t\tresult.value.close();\r\n\r\n\t\t\t\tif (parsedMessage.error) {\r\n\t\t\t\t\treject(parsedMessage.error);\r\n\t\t\t\t\t_dialogApiResult = null;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresolve(parsedMessage.idToken);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t});\r\n\treturn _dialogApiResult;\r\n}\r\n/** END FALLBACK FOR NAA */\r\n\r\nconst onAfterSaveItem = (result: Office.AsyncResult) => {\r\n\thandleErrors(\"onAfterSaveItem\", result, () => {\r\n\t\texchangeItemID = result.value\r\n\t\tDebugger.appendLog(\"exchangeItemID:\" + exchangeItemID);\r\n\t\tlinkToApi();\r\n\t});\r\n}\r\n\r\nconst linkToApi = () => {\r\n\ttry {\r\n\t\t// Ready for deprecation\r\n\t\tvar restUrl = \"\";\r\n\t\ttry {\r\n\t\t\trestUrl = Office.context.mailbox.restUrl;\r\n\t\t} catch { }\r\n\r\n\t\tapiLink(\r\n\t\t\twindow.location.href,\r\n\t\t\tuserIdentityToken,\r\n\t\t\tuserAccessToken,\r\n\t\t\trestUrl,\r\n\t\t\tOffice.context.mailbox.diagnostics.hostName\r\n\t\t)\r\n\t\t\t.then(onAfterServerLink)\r\n\t\t\t.catch((ex) => {\r\n\t\t\t\tinitEx = JSON.stringify(ex);\r\n\t\t\t\tinitError = defaultInitErrorMessage;\r\n\t\t\t\trender(App);\r\n\t\t\t})\r\n\t}\r\n\tcatch (ex) {\r\n\t\tinitEx = JSON.stringify(ex);\r\n\t\tinitError = defaultInitErrorMessage;\r\n\t\trender(App);\r\n\t}\r\n}\r\n\r\nconst onAfterServerLink = async (linkResult) => {\r\n\r\n\tif (linkResult.success === true) {\r\n\t\tclientLog(\"onAfterServerLink: OK\");\r\n\t\tapiLinked = true;\r\n\t}\r\n\telse {\r\n\t\tif (linkResult.completeSetup) {\r\n\t\t\tclientLog(\"Account problem in onAfterServerLink: \" + linkResult.reason);\r\n\t\t\tinitMustSetup = true;\r\n\t\t\tapiLinked = true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tclientLog(\"Error in onAfterServerLink: \" + linkResult.reason);\r\n\t\t\tinitEx = JSON.stringify(linkResult);\r\n\t\t\tinitError = \"There was a problem signing-in to your account. \" + linkResult.reason;\r\n\t\t}\r\n\t}\r\n\r\n\trender(App);\r\n}\r\n\r\ntry {\r\n\tvar locale = (window.navigator as any).userLanguage || window.navigator.language;\r\n\tmoment.locale(locale)\r\n\r\n\tinitializeIcons();\r\n\r\n\tvar utm_source = getUrlParameter(\"utm_source\");\r\n\tvar utm_medium = getUrlParameter(\"utm_medium\");\r\n\tvar utm_content = getUrlParameter(\"utm_content\");\r\n\tvar utm_campaign = getUrlParameter(\"utm_campaign\");\r\n\tvar utm_term = getUrlParameter(\"utm_term\");\r\n\tvar referer_qs = getUrlParameter(\"referer\");\r\n\tvar referer_doc = (document.referrer && encodeURIComponent(document.referrer));\r\n\r\n\tif (utm_source && utm_source.length > 0) setCookie(\"utm_source\", utm_source);\r\n\tif (utm_medium && utm_medium.length > 0) setCookie(\"utm_medium\", utm_medium);\r\n\tif (utm_content && utm_content.length > 0) setCookie(\"utm_content\", utm_content);\r\n\tif (utm_campaign && utm_campaign.length > 0) setCookie(\"utm_campaign\", utm_campaign);\r\n\tif (utm_term && utm_term.length > 0) setCookie(\"utm_term\", utm_term);\r\n\tif (referer_qs && referer_qs.length > 0) {\r\n\t\tsetCookie(\"referer\", referer_qs);\r\n\t} else if ((getCookie('referer') || '').length == 0 && referer_doc && referer_doc.length > 0) {\r\n\t\tsetCookie(\"referer\", referer_doc);\r\n\t}\r\n\r\n\t/* Render application after Office initializes */\r\n\tOffice.initialize = () => { };\r\n\r\n\tOffice.onReady(function (info) {\r\n\t\tisOfficeInitialized = true;\r\n\t\tonSignIn();\r\n\t});\r\n\r\n\r\n\t/* Initial render showing a progress bar */\r\n\trender(App);\r\n\r\n\t//if ((module as any).hot) {\r\n\t// (module as any).hot.accept('./components/App', () => {\r\n\t// const NextApp = require('./components/App').default;\r\n\t// render(NextApp);\r\n\t// });\r\n\t//}\r\n\r\n} catch (ex) {\r\n\tvar body = document.querySelector(\"body\");\r\n\tvar errContent = \"
Error:\" + ex + \"
\";\r\n\tif (body) {\r\n\t\tbody.innerHTML = errContent;\r\n\t} else {\r\n\t\tdocument.write(errContent)\r\n\t}\r\n}","import axios from \"axios\";\r\n\r\naxios.defaults.headers.common[\"Accept\"] = \"application/json\";\r\naxios.defaults.headers.post[\"Content-Type\"] = \"application/json\";\r\n// axios.defaults.withCredentials = true;\r\n\r\nconst clientLog = (text: string) => {\r\n console.log(\"[MailMerge365] \" + text);\r\n return text;\r\n};\r\n\r\nconst serverLog = async (text: string) => {\r\n await serverPost(\"/api/log\", { text });\r\n};\r\n\r\nconst serverFilePost = async (url: string, data: any) => {\r\n return await axios.request({\r\n method: \"post\",\r\n url,\r\n data,\r\n headers: {\r\n \"Content-Type\": \"multipart/form-data\",\r\n },\r\n });\r\n};\r\n\r\nconst serverPost = async (url: string, payload: any) => {\r\n return await axios.request({\r\n method: \"post\",\r\n url,\r\n data: payload,\r\n withCredentials: true,\r\n responseType: \"json\",\r\n responseEncoding: \"utf-8\",\r\n });\r\n};\r\n\r\nconst serverDelete = async (url: string, payload: any) => {\r\n return await axios.request({\r\n method: \"delete\",\r\n url,\r\n data: payload,\r\n withCredentials: true,\r\n });\r\n};\r\n\r\nconst toQueryString = (obj) => {\r\n var parts = [];\r\n for (var i in obj) {\r\n if (obj.hasOwnProperty(i)) {\r\n parts.push(encodeURIComponent(i) + \"=\" + encodeURIComponent(obj[i]));\r\n }\r\n }\r\n return parts.join(\"&\");\r\n};\r\n\r\nconst serverGet = async (url: string, params: any) => {\r\n return await axios.request({\r\n url:\r\n url +\r\n \"?\" +\r\n toQueryString({\r\n ...params,\r\n ts: new Date().getTime(),\r\n }),\r\n withCredentials: true,\r\n });\r\n};\r\n\r\nconst apiLink = async (\r\n pluginVersion: string,\r\n idJwt: string,\r\n restToken: string,\r\n restUrl: string,\r\n hostname: string\r\n) => {\r\n var result = await serverPost(\"/api/link\", {\r\n idJwt,\r\n restToken,\r\n restUrl,\r\n pluginVersion,\r\n hostname,\r\n });\r\n\r\n return result.data;\r\n};\r\n\r\nconst apiUnlink = async () => {\r\n await serverPost(\"/api/unlink\", {});\r\n};\r\n\r\nconst apiGetCampaign = async (exchangeItemID: string) => {\r\n var result = await serverGet(\"/api/campaign\", {\r\n exchangeItemID,\r\n });\r\n\r\n return result.data;\r\n};\r\n\r\nconst apiGetAccount = async () => {\r\n var result = await serverGet(`/api/account`, {});\r\n\r\n return result.data;\r\n};\r\n\r\nconst apiCreateCampaign = async (\r\n exchangeItemID: string,\r\n name: string,\r\n cloneBodyAndSubjectFromCampaignID?: string,\r\n createSourceFromCampaignID?: string,\r\n createSourceFromCriteria?: string\r\n) => {\r\n var result = await serverPost(\"/api/campaign\", {\r\n exchangeItemID,\r\n name,\r\n cloneBodyAndSubjectFromCampaignID,\r\n createSourceFromCampaignID,\r\n createSourceFromCriteria,\r\n });\r\n\r\n return result.data;\r\n};\r\n\r\nconst apiDeleteCampaign = async (campaignID: string) => {\r\n var result = await serverDelete(`/api/campaign/${campaignID}`, {});\r\n return result.data;\r\n};\r\n\r\nconst apiSetCampaignSettings = async (campaignID: string, payload: any) => {\r\n var result = await serverPost(`/api/campaign/${campaignID}/settings`, {\r\n ...payload,\r\n campaignID,\r\n });\r\n\r\n return result.data;\r\n};\r\n\r\nconst apiSetCampaignPreview = async (campaignID: string, payload: any) => {\r\n var result = await serverPost(`/api/campaign/${campaignID}/preview`, {\r\n ...payload,\r\n campaignID,\r\n });\r\n\r\n return result.data;\r\n};\r\n\r\nconst apiUploadSourceData = async (campaignID: string, files: any) => {\r\n let formData = new FormData();\r\n formData.append(\"campaignID\", campaignID);\r\n formData.append(\"files\", files[0]);\r\n\r\n var result = await serverFilePost(\"/api/sourcedata\", formData);\r\n return result.data;\r\n};\r\n\r\nconst apiUploadSourceDataDirect = async (campaignID: string, data: string) => {\r\n let formData = new FormData();\r\n formData.append(\"campaignID\", campaignID);\r\n formData.append(\"data\", data);\r\n\r\n var result = await serverFilePost(\"/api/sourcedata/direct\", formData);\r\n return result.data;\r\n};\r\n\r\nconst apiCheckSourceData = async (campaignID: string) => {\r\n var result = await serverGet(\"/api/sourcedata\", { campaignID });\r\n return result.data;\r\n};\r\n\r\nconst apiContinueSourceData = async (campaignID: string) => {\r\n var result = await serverPost(\r\n \"/api/sourcedata/continue?campaignID=\" + campaignID,\r\n {}\r\n );\r\n return result.data;\r\n};\r\n\r\nexport {\r\n clientLog,\r\n serverLog,\r\n serverPost,\r\n apiLink,\r\n apiUnlink,\r\n serverGet,\r\n apiGetCampaign,\r\n apiCreateCampaign,\r\n apiDeleteCampaign,\r\n apiUploadSourceData,\r\n apiUploadSourceDataDirect,\r\n apiContinueSourceData,\r\n apiCheckSourceData,\r\n apiSetCampaignSettings,\r\n apiGetAccount,\r\n apiSetCampaignPreview,\r\n};\r\n\r\n\r\n/* global window */\r\n\r\n/**\r\n * Constructs a local URL for the web page for the given path.\r\n * @param path The path to construct a local URL for.\r\n * @returns\r\n */\r\nexport function createLocalUrl(path: string) {\r\n return `${window.location.origin}/${path}`;\r\n}\r\n\r\nexport function getVersion() {\r\n return \"2025-02-05-B\";\r\n}","import * as React from 'react';\r\nimport * as _ from 'lodash'\r\nimport * as moment from 'moment';\r\nimport classnames from 'classnames'\r\nimport Wrapper from './Wrapper'\r\nimport { PrimaryButton, DefaultButton } from 'office-ui-fabric-react/lib/Button';\r\nimport FileUploadButton from './FileUploadButton';\r\nimport { Toggle, Link, TextField } from 'office-ui-fabric-react/lib/index';\r\nimport { Dropdown, DropdownMenuItemType, IDropdownStyles, IDropdownOption } from 'office-ui-fabric-react/lib/Dropdown';\r\nimport { apiGetAccount, clientLog } from '../util'\r\n\r\nexport interface AppProps {\r\n onFileUpload: (files: FileList, cloneBodyAndSubjectFromCampaignID?: string) => void,\r\n onDirectDataUpload: (data: any, cloneBodyAndSubjectFromCampaignID?: string) => void,\r\n onCreateFollowUp: (createSourceFromCampaignID?: string, createSourceFromCriteria?: string) => void,\r\n account: any,\r\n onSignout: () => void,\r\n autoLogin: (any, string) => string,\r\n}\r\n\r\nexport interface Props extends AppProps {\r\n firstRun: boolean,\r\n defaultDirectData?: string,\r\n}\r\n\r\nexport interface State {\r\n isTeachingBubbleVisible: boolean;\r\n followUpToCampaignID: string;\r\n cloneCampaignID: string;\r\n followUpToCriteria: string;\r\n directData: string;\r\n showDirectData: boolean;\r\n toEmailAddresses: string[];\r\n\r\n}\r\n\r\nexport default class CampaignStart extends React.Component {\r\n constructor(props, context) {\r\n super(props, context);\r\n this.state = {\r\n isTeachingBubbleVisible: props.firstRun,\r\n followUpToCampaignID: null,\r\n cloneCampaignID: '',\r\n followUpToCriteria: null,\r\n directData: props.defaultDirectData,\r\n showDirectData: props.defaultDirectData != null,\r\n toEmailAddresses: []\r\n }\r\n }\r\n\r\n async componentDidMount() {\r\n await this.getToAddresses();\r\n setInterval(async () => await this.getToAddresses(), 1000);\r\n\r\n }\r\n\r\n getToAddresses = async () => {\r\n Office.context.mailbox.item.to.getAsync({}, this.onGetToAddresses);\r\n }\r\n\r\n onGetToAddresses = async (result: Office.AsyncResult) => {\r\n if (result.status == Office.AsyncResultStatus.Failed) {\r\n clientLog(`Error in onGetToAddresses: ${result.error}`);\r\n }\r\n else {\r\n const toEmailAddresses = _.sortBy(_.map(\r\n _.filter(\r\n result.value,\r\n toEntry => toEntry.emailAddress.toLowerCase().split('@')[1] !== 'campaign.mailmerge365.com'),\r\n toEntry => toEntry.emailAddress.toLowerCase()));\r\n\r\n if (!_.isEqual(toEmailAddresses, this.state.toEmailAddresses)) {\r\n this.setState({ toEmailAddresses });\r\n }\r\n }\r\n }\r\n\r\n clearToAddresses = async () => {\r\n clientLog(\"Clearing addresses\")\r\n await Office.context.mailbox.item.to.setAsync([], null, async () => { clientLog(\"Cleared addresses\") });\r\n };\r\n\r\n onDismissTeachingBubble = (event) => {\r\n this.setState({\r\n isTeachingBubbleVisible: !this.state.isTeachingBubbleVisible\r\n });\r\n }\r\n\r\n render() {\r\n const {\r\n account,\r\n autoLogin,\r\n onSignout,\r\n } = this.props;\r\n const {\r\n isTeachingBubbleVisible,\r\n followUpToCampaignID,\r\n followUpToCriteria,\r\n directData,\r\n showDirectData,\r\n toEmailAddresses\r\n } = this.state;\r\n\r\n const campaigns = account.campaigns;\r\n const hasExistingCampaigns = campaigns && campaigns.length > 0;\r\n\r\n const dropdownStyles: Partial = {\r\n };\r\n\r\n const options: IDropdownOption[] = campaigns && _.sortBy(\r\n campaigns.map(c => ({\r\n key: c.id.toString(),\r\n text: `${c.name.toString()} (${moment.utc(c.sentOn).format('L')})`\r\n })),\r\n x => 'text'\r\n );\r\n\r\n const canSendFollowUpCampaign = followUpToCampaignID != null && followUpToCampaignID.length > 0 &&\r\n followUpToCriteria != null && followUpToCriteria.length > 0;\r\n\r\n const cloneOptions = [{\r\n key: '',\r\n text: 'Blank campaign'\r\n }, ...(options||[])];\r\n\r\n return (\r\n <>\r\n {isTeachingBubbleVisible ?\r\n
\r\n
\r\n

Congratulations, you're ready to go

\r\n
\r\n
\r\n

We recommend checking out some of our tutorials, but if you can't wait just close this message and upload your first spreadsheet or text file.

\r\n
\r\n
\r\n Close\r\n More Information\r\n
\r\n
: null}\r\n \r\n

Start a new campaign

\r\n\r\n {!showDirectData ?\r\n <>\r\n {hasExistingCampaigns && <>\r\n
\r\n this.setState({ cloneCampaignID: item.key.toString() })}\r\n selectedKey={this.state.cloneCampaignID}\r\n />\r\n
\r\n

Next, choose the data source to start the campaign.

\r\n\r\n \r\n }\r\n {!hasExistingCampaigns &&\r\n

To start setting up your mail merge campaign upload a file containing at least a list of email addresses. You can add up to 50 additional columns to personalize the email.

\r\n }\r\n
\r\n this.props.onFileUpload(files, this.state.cloneCampaignID)} />\r\n this.setState({ showDirectData: true })}>Manually add a list of recipients\r\n\r\n {toEmailAddresses && toEmailAddresses.length > 0 &&\r\n {\r\n this.clearToAddresses();\r\n this.props.onDirectDataUpload(toEmailAddresses.join('\\n'));\r\n }}>Use current list of email recipients\r\n }\r\n
\r\n
    \r\n
  • \r\n Tutorial for new users
  • \r\n
  • \r\n FAQ about file formats
  • \r\n
\r\n\r\n
\r\n
\r\n : <>\r\n

Type or paste either a list of email addresses here (no header needed) or comma separated data values (including a header line)

\r\n
\r\n {\r\n var txt = e.clipboardData.getData('Text');\r\n if (txt.indexOf(\"\\n\")<0) {\r\n // single line\r\n var splitIntoEmails = txt.replace(',',';').split(';');\r\n if (splitIntoEmails.length > 0) {\r\n console.log(splitIntoEmails);\r\n this.setState({ directData: splitIntoEmails.join(\"\\n\") });\r\n e.preventDefault();\r\n }\r\n }\r\n }}\r\n onChange={(e, newText) => this.setState({ directData: newText })} />\r\n
\r\n
\r\n this.props.onDirectDataUpload(directData, this.state.cloneCampaignID)}\r\n title=\"Add email addresses into the text field above to start a campaign based on those recipients\"\r\n disabled={!directData || directData.trim().length == 0} >Start campaign\r\n
\r\n
\r\n this.setState({ showDirectData: false })}>Back to file upload\r\n
\r\n \r\n }\r\n {!showDirectData && hasExistingCampaigns && this.props.onCreateFollowUp &&\r\n \r\n
\r\n

Start a follow-up campaign

\r\n

To start a follow-up campaign, select a previous campaign and which segment of recipients to send to.

\r\n\r\n
\r\n this.setState({ followUpToCampaignID: item.key.toString() })}\r\n selectedKey={this.state.followUpToCampaignID}\r\n />\r\n this.setState({ followUpToCriteria: item.key.toString() })}\r\n selectedKey={this.state.followUpToCriteria}\r\n\r\n />\r\n\r\n
\r\n
\r\n this.props.onCreateFollowUp(followUpToCampaignID, followUpToCriteria)}\r\n style={{ width: \"100%\" }}\r\n disabled={!canSendFollowUpCampaign}>\r\n Start follow-up campaign\r\n \r\n
    \r\n
    \r\n
  • \r\n FAQ about follow-up campaigns
  • \r\n
    \r\n
\r\n
\r\n
}\r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport classnames from 'classnames'\r\nimport * as moment from 'moment'\r\nimport * as _ from 'lodash'\r\nimport { ComboBox, Toggle, TextField, TooltipHost, Link } from 'office-ui-fabric-react/lib/index';\r\nimport { PrimaryButton, DefaultButton } from 'office-ui-fabric-react/lib/Button';\r\nimport { getId } from 'office-ui-fabric-react/lib/Utilities';\r\nimport { log } from 'util'\r\nimport Wrapper, { DEFAULT_HELP_LINKS } from './Wrapper'\r\nimport FileUploadButton from './FileUploadButton'\r\nimport { MessageBar, MessageBarType } from 'office-ui-fabric-react/lib/MessageBar';\r\nimport { clientLog } from '../util'\r\n\r\nexport interface Props {\r\n account: any,\r\n campaign: any,\r\n showIntro: boolean,\r\n filename: string,\r\n fileRows: number,\r\n fileDownloadUrl: string,\r\n fileUploaded: moment.Moment,\r\n columns: string[],\r\n onFileUpload: (files: FileList) => void,\r\n onAddTemplateToken: (tokenKey: string, toSubject: boolean) => void,\r\n onAddUnsubscribeLink: () => void,\r\n onPreview: () => void,\r\n onSignout: () => void,\r\n readTrackingEnabled: boolean,\r\n linkTrackingEnabled: boolean,\r\n unsubscribeEnabled: boolean,\r\n onReadTrackingEnabledChanged: (value: boolean) => void,\r\n onLinkTrackingEnabledChanged: (value: boolean) => void,\r\n onUnsubscribeEnabledChanged: (value: boolean) => void,\r\n onBccChanged: (value: string) => void,\r\n onNameChanged: (value: string) => void,\r\n onReplyToChanged: (value: string) => void,\r\n onDelayChanged: (value: number) => void,\r\n onCancelCampaign: () => void,\r\n attachmentWarning: boolean,\r\n autoLogin: (any, string) => string,\r\n}\r\n\r\nexport interface State {\r\n isTeachingBubbleVisible: boolean;\r\n selectedTokenKey: string;\r\n}\r\n\r\nexport default class CampaignView extends React.Component {\r\n private campaignDataPara: HTMLElement;\r\n private toggleID1: string = getId('tooltipHost-toggle1');\r\n private toggleID2: string = getId('tooltipHost-toggle2');\r\n private toggleID3: string = getId('tooltipHost-toggle3');\r\n\r\n constructor(props, context) {\r\n super(props, context);\r\n this.state = {\r\n isTeachingBubbleVisible: props.showIntro,\r\n selectedTokenKey: null\r\n };\r\n\r\n this.onDismissTeachingBubble = this.onDismissTeachingBubble.bind(this);\r\n\r\n }\r\n\r\n async componentDidMount() {\r\n }\r\n\r\n onDismissTeachingBubble = (event) => {\r\n this.setState({\r\n isTeachingBubbleVisible: !this.state.isTeachingBubbleVisible\r\n });\r\n }\r\n\r\n render() {\r\n const {\r\n account,\r\n filename,\r\n fileDownloadUrl,\r\n fileUploaded,\r\n fileRows,\r\n columns,\r\n onAddTemplateToken,\r\n onAddUnsubscribeLink,\r\n readTrackingEnabled,\r\n linkTrackingEnabled,\r\n unsubscribeEnabled,\r\n onReadTrackingEnabledChanged,\r\n onLinkTrackingEnabledChanged,\r\n onUnsubscribeEnabledChanged,\r\n onBccChanged,\r\n onNameChanged,\r\n onReplyToChanged,\r\n onDelayChanged,\r\n onCancelCampaign,\r\n onPreview,\r\n onSignout,\r\n campaign,\r\n attachmentWarning,\r\n autoLogin,\r\n } = this.props;\r\n const {\r\n isTeachingBubbleVisible,\r\n selectedTokenKey,\r\n } = this.state;\r\n\r\n return (<>\r\n {isTeachingBubbleVisible ?\r\n
\r\n
\r\n

Congratulations, you've created your new campaign

\r\n
\r\n
\r\n

You've uploaded your campaign data. Next, you can compose your email and add personalization fields. When you're ready, check your campaign options and send the email.

\r\n
\r\n
\r\n OK\r\n More Information\r\n
\r\n
: null}\r\n {attachmentWarning && \r\n Message size may not exceed 3MB in total (incl. all attachments).{' '}\r\n Visit the help page.\r\n }\r\n \r\n\r\n\r\n {fileRows == 0 && <>
\r\n
(this.campaignDataPara = e!)}>Campaign data
\r\n\r\n
Please wait. File is being processed.
\r\n
}\r\n {fileRows > 0 && <>\r\n\r\n
\r\n
(this.campaignDataPara = e!)}>Campaign data
\r\n\r\n
Using {filename} with {fileRows} rows of recipients uploaded {fileUploaded.fromNow()}.
\r\n
\r\n\r\n {columns && columns.length > 0 &&
\r\n
Add personalization field to email
\r\n
\r\n ({ key: c, text: c }))}\r\n onChange={(event, option, index, value) => {\r\n if (option != null) {\r\n this.setState({ selectedTokenKey: option.key.toString() })\r\n }\r\n }}\r\n selectedKey={selectedTokenKey}\r\n />\r\n
\r\n Add to\r\n selectedTokenKey != null && onAddTemplateToken(selectedTokenKey, true)}\r\n disabled={selectedTokenKey == null || selectedTokenKey.length == 0}\r\n >subject\r\n\r\n or\r\n selectedTokenKey != null && onAddTemplateToken(selectedTokenKey, false)}\r\n disabled={selectedTokenKey == null || selectedTokenKey.length == 0}\r\n >message\r\n
\r\n
\r\n
\r\n Preview Email\r\n
\r\n
}\r\n }\r\n\r\n {campaign && fileRows > 0 && \r\n
\r\n
Options
\r\n {campaign && campaign.multipleToOrCc &&\r\n
\r\n Your campaign contains multiple recipients (either To or Cc) for at least one email. We recommend turning off tracking as this can lead to unintended consequences. Read more here.\r\n
\r\n }\r\n\r\n
\r\n onReadTrackingEnabledChanged(!readTrackingEnabled)}\r\n />\r\n
\r\n\r\n
\r\n\r\n onLinkTrackingEnabledChanged(!linkTrackingEnabled)}\r\n />\r\n
\r\n\r\n
\r\n\r\n
\r\n onUnsubscribeEnabledChanged(!unsubscribeEnabled)}\r\n />\r\n {unsubscribeEnabled && <>\r\n
\r\n \r\n onAddUnsubscribeLink()}\r\n >Add unsubscribe link to email\r\n
\r\n
\r\n \r\n Unsubscription page settings\r\n
\r\n }\r\n
\r\n
\r\n
\r\n onNameChanged(event.target.value)} />\r\n
\r\n\r\n\r\n
\r\n onBccChanged(event.target.value)} />\r\n
\r\n\r\n
\r\n onReplyToChanged(event.target.value)} />\r\n
\r\n\r\n
\r\n onDelayChanged(Number.isNaN(parseInt(event.target.value)) ? null : parseInt(event.target.value))} />\r\n
\r\n\r\n\r\n
\r\n }\r\n
\r\n
\r\n \r\n Cancel and delete campaign\r\n
\r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { PrimaryButton, DefaultButton } from 'office-ui-fabric-react/lib/Button';\r\n\r\nexport interface Props {\r\n small?: boolean,\r\n onFileUpload: (files: FileList) => void,\r\n}\r\n\r\nexport interface State {\r\n disabled: boolean;\r\n}\r\n\r\nexport default class FileUploadButton extends React.Component {\r\n constructor(props, context) {\r\n super(props, context);\r\n this.state = {\r\n disabled: false\r\n }\r\n\r\n this.onFileClick = this.onFileClick.bind(this);\r\n this.onFileUpload = this.onFileUpload.bind(this);\r\n\r\n }\r\n\r\n async componentDidMount() {\r\n }\r\n \r\n onFileUpload = async (event) => {\r\n\r\n let files = event.target.files;\r\n\r\n this.setState({ disabled: true }, async () => {\r\n\r\n\r\n if (files.length != 1) {\r\n return;\r\n }\r\n \r\n await this.props.onFileUpload(files);\r\n\r\n // component will be re-created\r\n // this.setState({ disabled: false });\r\n });\r\n }\r\n\r\n onFileClick = (event) => {\r\n event.target.value = null\r\n }\r\n\r\n render() {\r\n const {\r\n small,\r\n } = this.props;\r\n const {\r\n disabled,\r\n } = this.state;\r\n\r\n const largeStyle = {\r\n \"width\": \"100%\",\r\n \"height\": \"30px\",\r\n \r\n };\r\n\r\n const largeStyleInput = {\r\n ...largeStyle,\r\n \"overflow\":\"hidden\"\r\n }\r\n\r\n const smallStyle = {\r\n \"width\": \"80px\",\r\n \"height\": \"25px\",\r\n \"fontSize\": \"12px\",\r\n \"padding\": \"0\",\r\n \"overflow\": \"hidden\",\r\n };\r\n\r\n const smallStyleDiv = {\r\n ...smallStyle,\r\n \"marginTop\": \".25rem\",\r\n }\r\n\r\n const buttonContent = {disabled ? \"Please wait...\" : (small ? \"Replace file\" : \"Upload a spreadsheet to start\")}\r\n\r\n\r\n return (\r\n
\r\n \r\n {small ?\r\n \r\n {buttonContent}\r\n :\r\n \r\n {buttonContent}\r\n \r\n }\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { PrimaryButton, DefaultButton, Link } from 'office-ui-fabric-react/lib/index';\r\nimport classnames from 'classnames'\r\nimport Wrapper, { DEFAULT_HELP_LINKS } from './Wrapper'\r\nimport { getVersion } from '../util';\r\n\r\nexport interface ProgressProps {\r\n\terror?: boolean;\r\n\ttitle: string;\r\n\tmessage: string;\r\n\tadditional?: string;\r\n\tdismissButtonTitle?: string;\r\n\tonDismiss?: () => void;\r\n\taccount?: any,\r\n\tautoLogin?: (any, string) => string,\r\n\tonSignout?: () => void,\r\n\tcancelButtonTitle?: string;\r\n\tcontinueButtonTitle?: string;\r\n\tonCancel?: () => void,\r\n\tonContinue?: () => void,\r\n}\r\n\r\nexport default class Progress extends React.Component {\r\n\trender() {\r\n\t\tconst {\r\n\t\t\terror,\r\n\t\t\ttitle,\r\n\t\t\tmessage,\r\n\t\t\tadditional,\r\n\t\t\tdismissButtonTitle,\r\n\t\t\tcancelButtonTitle,\r\n\t\t\tcontinueButtonTitle,\r\n\t\t\tonCancel,\r\n\t\t\tonContinue,\r\n\t\t\tonDismiss,\r\n\t\t\taccount,\r\n\t\t\tonSignout,\r\n\t\t\tautoLogin\r\n\t\t} = this.props;\r\n\r\n\t\tvar finalMessage = message;\r\n\r\n\t\tvar link = null;\r\n\r\n\t\tif (finalMessage.indexOf('##faq-multiplerecipients##')) {\r\n\t\t\tfinalMessage = finalMessage.replace('##faq-multiplerecipients##', '');\r\n\t\t\tlink = 'https://mm365.me/faq-multiplerecipients';\r\n\t\t}\r\n\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t

{title}

\r\n\t\t\t\t

{finalMessage}

\r\n\r\n\r\n\t\t\t\t{onDismiss &&\r\n\t\t\t\t\t

\r\n\t\t\t\t\t\t onDismiss()}>{dismissButtonTitle || 'OK'}\r\n\t\t\t\t\t

}\r\n\r\n\r\n\r\n\t\t\t\t{(onCancel || onContinue) &&\r\n\t\t\t\t\t

\r\n\t\t\t\t\t\t{onCancel &&\r\n\t\t\t\t\t\t\t onCancel()}>{cancelButtonTitle || 'Cancel'}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t{onContinue &&\r\n\t\t\t\t\t\t\t onContinue()} style={{ marginLeft: '10px' }}>{continueButtonTitle || 'Continue'}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t

\r\n\t\t\t\t}\r\n\r\n\t\t\t\tVersion :{getVersion()}\r\n\r\n\t\t\t\t{additional && }\r\n\r\n\t\t\t\t{link &&
\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t
  • \r\n\t\t\t\t\t\t\tMore information in our FAQ
  • \r\n\t\t\t\t\t
\r\n\t\t\t\t
}\r\n\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n}\r\n","import * as React from 'react';\r\nimport { Spinner, SpinnerType } from 'office-ui-fabric-react';\r\n\r\nexport interface ProgressProps {\r\n logo: string;\r\n message: string;\r\n title: string;\r\n}\r\n\r\nexport default class Progress extends React.Component {\r\n render() {\r\n const {\r\n logo,\r\n message,\r\n title,\r\n } = this.props;\r\n\r\n return (\r\n
\r\n {title}\r\n

{title}

\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { PrimaryButton, Link } from 'office-ui-fabric-react/lib/index';\r\nimport classnames from 'classnames'\r\nimport Wrapper from './Wrapper'\r\nimport { clientLog, apiLink, apiGetAccount } from '../util'\r\n\r\nexport interface Props {\r\n\terror?: boolean;\r\n\tonDone: (account: any) => void;\r\n\tuserIdentityToken: string;\r\n\r\n}\r\n\r\nexport interface State {\r\n\ttrying: boolean;\r\n}\r\n\r\nexport default class Setup extends React.Component {\r\n\tconstructor(props, context) {\r\n\t\tsuper(props, context);\r\n\t\tthis.state = {\r\n\t\t\ttrying: false\r\n\t\t};\r\n\t}\r\n\r\n\tstartChecking = async () => {\r\n\t\tsetTimeout(this.doCheck, 2500);\r\n\r\n\t}\r\n\r\n\tdoCheck = async () => {\r\n\t\tif (!this.state.trying) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tclientLog(\"Waiting for set up to complete\");\r\n\r\n\t\tvar linkResult = await apiLink(\r\n\t\t\twindow.location.href,\r\n\t\t\tthis.props.userIdentityToken,\r\n\t\t\tnull,\r\n\t\t\tnull,\r\n\t\t\tOffice.context.mailbox.diagnostics.hostName\r\n\t\t);\r\n\r\n\t\tif (linkResult.success && !linkResult.completeSetup) {\r\n\r\n\t\t\tvar account = await apiGetAccount();\r\n\r\n\t\t\tif (account.setupComplete) {\r\n\t\t\t\tclientLog(\"Account set up is complete\");\r\n\t\t\t\tthis.setState({ trying: false });\r\n\t\t\t\tthis.props.onDone(account);\r\n\t\t\t} else {\r\n\t\t\t\tif (this.state.trying) {\r\n\t\t\t\t\tsetTimeout(this.doCheck, 2500);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this.state.trying) {\r\n\t\t\t\tsetTimeout(this.doCheck, 2500);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\trender() {\r\n\t\tconst {\r\n\t\t\terror,\r\n\t\t\tuserIdentityToken\r\n\t\t} = this.props;\r\n\r\n\t\tconst {\r\n\t\t\ttrying,\r\n\t\t} = this.state;\r\n\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t

Set up your account

\r\n\t\t\t\t

Welcome to MailMerge365. Let's get you set up and ready to send your first campaign.

\r\n\t\t\t\t

In order to schedule and send emails on your behalf, we are going to connect to your Office365 account and mailbox.

\r\n\r\n\t\t\t\t
\r\n\t\t\t\t\t{!trying && this.setState({ trying: true }, () => this.startChecking())}\r\n\t\t\t\t\t>Connect with Microsoft 365}\r\n\t\t\t\t\t{trying && this.doCheck()}\r\n\t\t\t\t\t>Waiting for set up to complete}\r\n\t\t\t\t
\r\n\r\n\t\t\t\t

Once you click the button a new page will open asking you to sign-in with your Microsoft 365 account. When you've completed that step you can return to this window and start working with MailMerge365.

\r\n\r\n\t\t\t\t

More Information

\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n}\r\n","import * as React from 'react';\r\nimport { PrimaryButton, Link } from 'office-ui-fabric-react/lib/index';\r\nimport classnames from 'classnames'\r\nimport Wrapper from './Wrapper'\r\nimport { clientLog, apiGetAccount } from '../util'\r\n\r\nexport interface Props {\r\n onSignIn: () => void;\r\n}\r\n\r\nexport interface State {\r\n}\r\n\r\nexport default class Setup extends React.Component {\r\n constructor(props, context) {\r\n super(props, context);\r\n this.state = {\r\n };\r\n }\r\n\r\n render() {\r\n const {\r\n onSignIn\r\n } = this.props;\r\n\r\n const {\r\n } = this.state;\r\n\r\n return (\r\n \r\n

Sign in to your account

\r\n

Welcome to MailMerge365. You are currently signed-out. Click the button below to sign-in.

\r\n\r\n onSignIn()}\r\n >Sign in\r\n\r\n

More Information

\r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport classnames from 'classnames'\r\nimport { Link } from 'office-ui-fabric-react/lib/Link';\r\nimport { debug } from 'util';\r\nimport Debugger from '../components/Debugger';\r\n\r\nexport interface Props {\r\n campaignID?: string,\r\n className: string,\r\n //links?: { [url: string]: string },\r\n account?: any,\r\n autoLogin?: (any, string) => string,\r\n onSignout?: () => void,\r\n}\r\n\r\nexport const DEFAULT_ACCOUNT_LINKS = {\r\n \"/campaigns/{campaignID}\": \"Open this campaign's dashboard\",\r\n \"/campaigns\": \"View all your campaigns\",\r\n\r\n}\r\n\r\nexport const DEFAULT_HELP_LINKS = {\r\n \"https://mm365.me/tutorials\": \"View tutorials\",\r\n \"https://mm365.me/help\": \"Open help center\",\r\n}\r\nexport class State {\r\n debug: boolean;\r\n}\r\n\r\nexport default class Wrapper extends React.Component {\r\n\r\n\r\n constructor(props, context) {\r\n super(props, context);\r\n this.state = {\r\n debug: false,\r\n };\r\n }\r\n\r\n onToggleDebug = (event) => {\r\n this.setState({\r\n debug: !this.state.debug\r\n });\r\n }\r\n\r\n\r\n render() {\r\n const {\r\n className,\r\n account,\r\n autoLogin,\r\n onSignout,\r\n } = this.props;\r\n\r\n const {\r\n debug\r\n } = this.state;\r\n\r\n let links = account ? {\r\n ...DEFAULT_ACCOUNT_LINKS,\r\n \"/account\": \"Manage your account\",\r\n ...DEFAULT_HELP_LINKS\r\n } : DEFAULT_HELP_LINKS;\r\n\r\n\r\n\r\n return (\r\n
\r\n
\r\n {this.props.children}\r\n
\r\n {debug &&
\r\n \r\n
}\r\n
\r\n {account &&\r\n \r\n

Account: {account.email}

\r\n

{account.plan}

\r\n
\r\n }\r\n {!account &&\r\n

MailMerge365 Links

}\r\n\r\n\r\n
\r\n
    \r\n {Object.keys(links).filter(key => this.props.campaignID || key.indexOf('{campaignID}') < 0).map(key =>\r\n
  • {links[key]}
  • \r\n\r\n )}\r\n {onSignout &&\r\n
  • Sign out
  • \r\n }\r\n {account && account.debug &&\r\n <>\r\n
  • Debug
  • \r\n \r\n }\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 524;","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t524: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunk\"] = self[\"webpackChunk\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\n__webpack_require__.O(undefined, [96], () => (__webpack_require__(91764)))\nvar __webpack_exports__ = __webpack_require__.O(undefined, [96], () => (__webpack_require__(41497)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","leafPrototypes","getProto","map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","module","exports","COOKIE_AUTOSIGNINDISABLED","props","context","isAutoSignInDisabled","Cookies","get","setAutoSignInDisabledCookie","autoSignInDisabled","clientLog","set","secure","sameSite","expires","remove","signIn","this","setState","account","signedOut","apiGetAccount","plan","autoLogin","url","appLink","encodeURIComponent","reset","onReset","click","state","componentDidMount","componentWillReceiveProps","nextProps","autoSignIn","apiLinked","render","title","isOfficeInitialized","initMustSetup","initError","initEx","itemID","userIdentityToken","setupComplete","onSignout","message","additional","dismissButtonTitle","onSignIn","logo","firstRun","exchangeItemID","onDone","React","Component","emptyState","hasSentPreviousCampaign","loaded","campaign","newCampaign","error","errorDismissable","files","directData","mailType","attachmentWarning","working","warning","warningCancelAction","warningContinueAction","getItemType","Office","mailbox","item","body","getTypeAsync","onGetItemType","result","status","AsyncResultStatus","Failed","value","getCampaign","apiGetCampaign","campaignResult","success","campaignID","loadCampaign","reason","createCampaign","cloneBodyAndSubjectFromCampaignID","createSourceFromCampaignID","createSourceFromCriteria","apiCreateCampaign","console","log","onSetSettings","readTrackingEnabled","linkTrackingEnabled","unsubscribeEnabled","bcc","replyTo","delayInSecondsForEachCampaignMail","subject","length","getAsync","exisingSubject","setAsync","asyncContext","asyncResult","attachments","forEach","obj","contentID","name","indexOf","nameParts","split","extension","oldContentID","reg","RegExp","htmlBody","replace","textBody","loadContents","CoercionType","Html","existingBodyResult","existingBodyValue","trim","endsWith","substring","Math","max","toLowerCase","newBody","regEx","replaceMask","coercionType","Text","exisingBodyValue","baseUrl","window","location","protocol","host","attachmentCount","fullUrl","isInline","opts","addFileAttachmentAsync","JSON","stringify","cancelCampaign","apiDeleteCampaign","to","uploadFile","uploadDirectData","checkCampaignRecipient","campaignToEmailAddress","emailParts","domain","toRecipients","correctCampaignEmailOrNonCampaignEmails","_","filter","toEntry","emailAddress","find","displayName","areSameRecipients","array1","array2","every","element","index","openWindowWithPost","data","key","form","document","createElement","target","method","action","style","display","input","type","appendChild","submit","removeChild","previewCampaign","bodyResult","subjectResult","apiSetCampaignPreview","email","isHtml","onFileSelected","onDataProvided","apiUploadSourceData","checkUploadProgress","apiUploadSourceDataDirect","apiCheckSourceData","sourceProcessedRows","sourceDataRows","complete","setTimeout","canContinue","apiContinueSourceData","sourceDataUploadedOn","onFileClick","event","onAddTemplateToken","tokenKey","toSubject","tokenValue","setSelectedDataAsync","onAddUnsubscribeLink","settings","apiSetCampaignSettings","onReadTrackingEnabledChanged","onLinkTrackingEnabledChanged","onUnsubscribeEnabledChanged","onNameChanged","onBccChanged","onReplyToChanged","onDelayChanged","setInterval","onDismiss","cancelButtonTitle","continueButtonTitle","onCancel","onContinue","showIntro","fileDownloadUrl","filename","sourceDataFilename","fileRows","fileUploaded","moment","utc","onFileUpload","columns","sourceDataKeys","onCancelCampaign","onPreview","apiUnlink","defaultDirectData","onDirectDataUpload","onCreateFollowUp","dump","addAsync","Debugger","onClick","appendLog","msg","userAccessToken","getUrlParameter","results","exec","search","decodeURIComponent","setCookie","cname","cvalue","d","Date","setTime","getTime","toUTCString","cookie","match","ReactDOM","AppContainer","getElementById","defaultInitErrorMessage","pca","undefined","idToken","createNestablePublicClientApplication","auth","clientId","authority","tokenRequest","scopes","acquireTokenSilent","userAccount","acquireTokenPopup","BrowserAuthError","errorCode","getTokenWithDialogApi","saveAsync","onAfterSaveItem","Promise","reject","ui","displayDialogAsync","createLocalUrl","height","width","addEventHandler","EventType","DialogEventReceived","arg","DialogMessageReceived","messageArg","parsedMessage","parse","close","Succeeded","ex","handleErrors","linkToApi","restUrl","apiLink","href","diagnostics","hostName","then","onAfterServerLink","catch","linkResult","completeSetup","locale","navigator","userLanguage","language","initializeIcons","utm_source","utm_medium","utm_content","utm_campaign","utm_term","referer_qs","referer_doc","referrer","initialize","onReady","info","querySelector","errContent","innerHTML","write","path","origin","defaults","headers","common","post","text","serverLog","serverPost","serverFilePost","request","payload","withCredentials","responseType","responseEncoding","toQueryString","parts","i","hasOwnProperty","push","join","serverGet","params","ts","pluginVersion","idJwt","restToken","hostname","formData","FormData","append","getToAddresses","onGetToAddresses","toEmailAddresses","sortBy","isEqual","clearToAddresses","onDismissTeachingBubble","isTeachingBubbleVisible","followUpToCampaignID","cloneCampaignID","followUpToCriteria","showDirectData","campaigns","hasExistingCampaigns","dropdownStyles","options","c","toString","sentOn","format","x","canSendFollowUpCampaign","cloneOptions","className","PrimaryButton","DefaultButton","marginTop","fontWeight","TextField","multiline","rows","placeholder","onPaste","txt","clipboardData","getData","splitIntoEmails","preventDefault","onChange","newText","disabled","Dropdown","label","styles","selectedKey","Link","Fragment","border","borderBottom","toggleID1","getId","toggleID2","toggleID3","selectedTokenKey","bind","MessageBar","messageBarType","MessageBarType","severeWarning","ref","campaignDataPara","fromNow","valueOf","small","ComboBox","allowFreeform","autoComplete","option","marginLeft","onMouseEnter","multipleToOrCc","Toggle","defaultChecked","onText","offText","defaultValue","onBlur","min","Number","isNaN","parseInt","largeStyle","largeStyleInput","smallStyle","smallStyleDiv","buttonContent","finalMessage","link","paddingTop","paddingBottom","getVersion","fontSize","src","alt","Spinner","SpinnerType","large","startChecking","doCheck","trying","DEFAULT_ACCOUNT_LINKS","DEFAULT_HELP_LINKS","State","onToggleDebug","debug","links","children","__webpack_module_cache__","moduleId","cachedModule","__webpack_modules__","call","m","O","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","j","splice","r","getPrototypeOf","t","mode","__esModule","ns","create","def","current","getOwnPropertyNames","definition","defineProperty","enumerable","g","globalThis","Function","prop","prototype","Symbol","toStringTag","nmd","paths","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","self","__webpack_exports__"],"sourceRoot":""}