{"version":3,"sources":["../configs.ts","../InsertableFieldChips.tsx","../account.store.ts","../common-types.ts","../message.store.ts","../messages.store.ts","../TrialUpgradeMessage.tsx","../configureStore.ts","../Layout.tsx","utils.js","../Account.tsx","../index.ts","components/NavMenu.tsx","components/Footer.tsx","../authProvider.ts","../SendsRemainingBadge.tsx","components/Home.tsx","components/GoogleReviewTemplateCurrent.tsx","components/GoogleReviewTemplateDeprecated.tsx","components/Message.tsx","components/MessagesHistory.tsx","App.tsx","registerServiceWorker.ts","index.tsx","auth/apiConfig.js","auth/policies.js","auth/authConfig.js","auth/api.js","auth/authRedirect.js","store/common-impl.ts","../LearnMorePopover.tsx","../PageHeading.tsx","store/message-settings.store.ts","../LoadingBackdrop.tsx","../QuickLinks.tsx","../client-command.store.ts"],"names":["InsertableVariableValues","AccountActionTypes","MessageActionTypes","configs_1","auth","MessagesActionTypes","React","exports","default","isEmpty","str","length","isEmptyObject","obj","x","reloadPage","form","document","createElement","method","action","body","appendChild","submit","pluralize","number","singularWord","toLowerCase","endsWith","InsertableDelimiters","constructor","startDelimiter","endDelimiter","this","insertIntoString","target","insertionString","insertionIndex","arr","split","splice","join","spliceOutOfString","startIndex","count","capitalize","words","map","w","substring","toUpperCase","getUrlHash","window","location","hash","substr","setState","gettingAccount","props","getAccount","_this","NavMenu","state","isOpen","logout","isSettingsMenuOpen","anchorEl","handleMenu","event","currentTarget","handleMenuClose","handleLogout","toggleNavbar","render","to","pathname","userDisplayName","className","light","tag","Link","title","src","onClick","navbar","aria-label","aria-controls","aria-haspopup","color","anchorOrigin","vertical","horizontal","keepMounted","transformOrigin","open","Boolean","onClose","component","href","TRIBLEY_CONTACT_URL","Footer","Date","getFullYear","style","float","Configs","badgeWidth","_a","_b","Home","requestMessageSettings","messageSettingsEntity","dateUpdated","targetPlatforms","accountEntity","dateCreated","applyDepcrecatedGoogleReviewsTemplate","googlePlaceId","componentPaths","subtitle","Grid","container","direction","justify","alignItems","spacing","item","xs","md","Card","minHeight","position","CardContent","display","paddingRight","paddingTop","transform","Typography","gutterBottom","variant","paddingBottom","CUSTOMER_LABEL_PLURAL","CardActions","Button","RouterLink","size","marginTop","connect","FieldType","messageSettings","account","MessageSettingsStore","GoogleReviewTemplateCurrent","showSuccessAlert","showFailAlert","focusedField","insertableFieldsDisabled","showPlaceIdConfirm","googleBusinessName","googlePlaceIdAddress","fetchGooglePlaceId","googlePlaceIdQuery","userCity","googlePlaceIdApiCall","encodeURI","GOOGLE_PLACEID_API_URI","axios","get","then","response","candidates","Error","name","place_id","formatted_address","catch","error","alert","message","console","log","handleShowAlert","success","setTimeout","handleFocusChange","field","componentDidMount","ensureDataFetched","componentDidUpdate","prevProps","isMissingGoogleSetup","defaultValidationSchema","Yup","shape","max","required","messageBody","min","messageFooter","notRequired","nullable","messageFooterLink","url","handlePlaceIdConfirmClose","setFieldValue","values","setGoogleSetupValue","submitMessageSettings","handlePlaceIdReport","TRIBELY_SUPPORT_PHONE","TRIBELY_SUPPORT_EMAIL","handlePlaceIdCancel","handleGetGoogleBusinessName","handleRemoveGoogleBusinessName","Alert","titleIcon","pageIcons","pageName","enableReinitialize","validateOnChange","validateOnBlur","initialValues","id","uri","shortName","onSubmit","setSubmitting","resetForm","validationSchema","errors","touched","handleChange","handleBlur","handleSubmit","isValid","handleReset","isSubmitting","setTouched","validateForm","Form","FormGroup","Chip","icon","label","onChange","onBlur","onFocus","googleBusinessNameField","Dialog","DialogTitle","DialogContent","DialogContentText","DialogActions","autoFocus","delimiters","defaultInsertableDelimiters","disabled","messageBodyField","inputId","insertableFieldNames","labels","setInput","fieldName","value","TextField","type","placeholder","e","helperText","fullWidth","messageFooterField","outline","pointerEvents","cursor","Object","keys","every","k","isLoading","Spinner","animation","role","history","push","marginRight","pageNames","linkLabels","GoogleReviewTemplateDeprecated","shortNameField","Storage","prototype","setObject","key","setItem","JSON","stringify","getObject","parse","getItem","Message","mobilePhoneSuggestions","mobilePhoneHelpPopoverAnchor","messageHelpPopoverAnchor","messagePreviewPopoverAnchor","messagePreviewText","mobilePhoneFetchBlocked","lastKeyStroke","suggestContactOptions","mobilePhoneStart","overrideThrottle","isNaN","findIndex","mobilePhone","startsWith","fetchContactsWithThrottle","showTimedSuccessAlert","resetIsSentFlag","isSent","BASE_API_URI","headers","QUERY_API_KEY","result","data","contact","firstName","lastName","setMessageContactsRequestFailed","trim","matches","blockSending","undefined","remainingSends","isTemplateNotComplete","handleMessagePreviewOpen","previewText","fillInsertedVariableValues","handleMessagePreviewClose","handleInsertableVariableFieldChange","setField","sendButtonTitle","accountNumber","TRIAL_ACCOUNT_NUMBER","faExclamationTriangle","noBottomPadding","messageView","contactId","sendMessage","setFieldTouched","CUSTOMER_LABEL_SINGULAR","Autocomplete","options","freeSolo","getOptionLabel","option","renderInput","params","onKeyDown","keyCode","text","phoneField","getElementById","setMobilePhoneField","blurOnSelect","clearOnEscape","onInputChange","newValue","FormFeedback","multiline","InputProps","readOnly","zIndex","marginLeft","fontSize","border","resize","background","width","height","userSelect","WebkitUserSelect","MozUserSelect","msUserSelect","MessageStore","MessagesHistory","_maxPageCount","cmd","match","parseInt","requestMessages","totalMessagesCount","enablePagination","badgeText","toString","messageEntities","renderMessagesHistoryPagination","IconButton","transition","renderMessagesHistoryList","counter","TableContainer","Paper","Table","TableHead","TableRow","TableCell","align","TableBody","scope","local","format","displayType","userId","totalCount","pagesCount","Math","floor","currentPageNumber","Pagination","page","siblingCount","boundaryCount","newPage","messages","MessagesHistoryStore","muiTheme","createMuiTheme","palette","primary","main","secondary","shouldExecuteClientCommand","clientCommandEntity","clientCommandType","existingMessageId","getLastClientCommandMessageId","messageId","clientCommand","dismissClientCommandMessageAndExecuteAction","saveLastClientCommandMessageId","clientCommandShowPromptRefresh","ClientCommandTypes","PROMPT_REFRESH","clientCommandShowInfo","SHOW_INFO","ERROR_ACCOUNT_NOT_CREATED","promptActionText","toggle","faInfoCircle","ThemeProvider","theme","exact","path","Account","isLocalhost","hostname","register","navigator","URL","process","origin","addEventListener","swUrl","fetch","contentType","status","indexOf","serviceWorker","ready","registration","unregister","reload","registerValidSW","checkValidServiceWorker","onupdatefound","installingWorker","installing","onstatechange","controller","baseUrl","getElementsByTagName","getAttribute","createBrowserHistory","basename","store","configureStore","pollForClientCommands","getClientCommand","dispatch","getState","authenticate","ReactDOM","submitAccount","setInterval","registerServiceWorker","b2cScopes","webApi","b2cPolicies","signUpSignIn","signUp","forgotPassword","authority","msalConfig","clientId","APP_ID","validateAuthority","cache","cacheLocation","storeAuthStateInCookie","msalConfigSignUpOnly","loginRequest","scopes","tokenRequest","apiConfig","callApiWithAccessToken","endpoint","token","Headers","bearer","append","authPolicy","msalUserAgent","Msal","getUserAccount","accessToken","initializeAuth","handleRedirectCallback","authRedirectCallBack","errorMessage","loginRedirect","err","tokenType","idToken","claims","launchApp","signIn","getTokenRedirect","request","acquireTokenSilent","acquireTokenRedirect","passTokenToApi","handleErrors","ok","localStorage","CLIENT_COMMAND_LOCAL_STORAGE_KEY","dateAccountCreated","MessageSettingsActionTypes","actionCreators","entryDateUpdated","appState","tenantId","REQUEST_STARTED","json","BuildMessageSettings","REQUEST_SUCCEEDED","settings","errorText","REQUEST_FAILED","ERROR_GENERIC_MESSAGE","ApiSubmitTypes","SETTINGS","targetPlatformIdx","SUBMIT_STARTED","WRITE_API_KEY","responseData","SUBMIT_SUCCEEDED","SUBMIT_FAILED","targetPlatformId","unloadedState","reducer","incomingAction","Typography_1","i","ClientCommandActionTypes"],"mappings":"wuBAAA,aACA,SACA,SACI,EAAJ,OACI,EAAJ,OACI,EAAJ,MAGA,EAAQ,KAAU,SAEL,gBAAwB,8CACxB,gBAAwB,8CACxB,eAAuB,yBACvB,yBAAiC,ycAAY,mDAC7C,SAAiB,uCACjB,cAAsB,aACtB,wBAAgC,qBAChC,wBAAgC,iBAChC,qBAA4B,gCAC5B,sBAA8B,iCAC9B,yBAAiC,uCACjC,4BAAoC,OACpC,wBAAgC,kDAChC,cAAsB,aACtB,0BAAkC,WAClC,wBAAgC,YAChC,mC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AAyB,4BAC1B,MAAO,CACH,WAAW,EACX,oBAAqB,EAAM,oBAC3B,MAAO,MAEf,KAAK,EAAyB,8BAC1B,MAAO,CACH,WAAW,EACX,oBAAqB,EAAO,cAC5B,MAAO,MAEf,KAAK,EAAyB,2BAC1B,MAAO,CACH,WAAW,EACX,oBAAqB,EAAM,oBAC3B,MAAO,EAAO,OAEtB,QACI,OAAO,M","file":"static/js/main.b786429a.chunk.js","sourcesContent":["\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.componentPaths = exports.pageIcons = exports.defaultInsertableDelimiters = exports.InsertableVariableValues = exports.fillInsertedVariableValues = exports.insertableTemplateVariables = exports.ACCOUNT_CANCELED_BACKEND_VALUE = exports.TRIAL_ACCOUNT_NUMBER = exports.CLIENT_COMMAND_LOCAL_STORAGE_KEY = exports.CUSTOMER_LABEL_PLURAL = exports.CUSTOMER_LABEL_SINGULAR = exports.APP_VERSION = exports.ERROR_GENERIC_MESSAGE = exports.ERROR_ACCOUNT_NOT_CREATED = exports.GOOGLE_PLACEID_API_URI = exports.TRIBLEY_CONTACT_URL = exports.TRIBELY_SIGNUP_URL = exports.TRIBELY_SUPPORT_PHONE = exports.TRIBELY_SUPPORT_EMAIL = exports.ENVIRONMENT = exports.APP_ID = exports.GOOGLE_PLACEID_API_KEY = exports.BASE_API_URI = exports.WRITE_API_KEY = exports.QUERY_API_KEY = void 0;\r\nvar Send_1 = require(\"@material-ui/icons/Send\");\r\nvar History_1 = require(\"@material-ui/icons/History\");\r\nvar AccountCircle_1 = require(\"@material-ui/icons/AccountCircle\");\r\nvar Tune_1 = require(\"@material-ui/icons/Tune\");\r\nvar Home_1 = require(\"@material-ui/icons/Home\");\r\nvar utils_1 = require(\"./utils\");\r\nrequire('dotenv').config();\r\nexports.QUERY_API_KEY = process.env.REACT_APP_TRIBELY_MESSAGING_QUERY_API_KEY;\r\nexports.WRITE_API_KEY = process.env.REACT_APP_TRIBELY_MESSAGING_WRITE_API_KEY;\r\nexports.BASE_API_URI = process.env.REACT_APP_TRIBELY_MESSAGING_API_URI;\r\nexports.GOOGLE_PLACEID_API_KEY = process.env.REACT_APP_TRIBELY_MESSAGING_GOOGLE_PLACEID_API_KEY;\r\nexports.APP_ID = process.env.REACT_APP_TRIBELY_MESSAGING_APP_ID;\r\nexports.ENVIRONMENT = process.env.NODE_ENV;\r\nexports.TRIBELY_SUPPORT_EMAIL = 'support@tribely.io';\r\nexports.TRIBELY_SUPPORT_PHONE = '(800) 965-4963';\r\nexports.TRIBELY_SIGNUP_URL = 'https://www.tribely.io/signup';\r\nexports.TRIBLEY_CONTACT_URL = 'https://www.tribely.io/contact';\r\nexports.GOOGLE_PLACEID_API_URI = 'https://api.tribely.io/google/places';\r\nexports.ERROR_ACCOUNT_NOT_CREATED = '5001';\r\nexports.ERROR_GENERIC_MESSAGE = 'Something went wrong. Try refreshing your page.';\r\nexports.APP_VERSION = process.env.REACT_APP_VERSION;\r\nexports.CUSTOMER_LABEL_SINGULAR = 'customer';\r\nexports.CUSTOMER_LABEL_PLURAL = 'customers';\r\nexports.CLIENT_COMMAND_LOCAL_STORAGE_KEY = 'tribelyReviews_lastClientCommand';\r\nexports.TRIAL_ACCOUNT_NUMBER = '00000000';\r\nexports.ACCOUNT_CANCELED_BACKEND_VALUE = \"canceled\";\r\nexports.insertableTemplateVariables = [\"firstName\", \"lastName\"];\r\nvar fillInsertedVariableValues = function (text, values) {\r\n if (values === void 0) { values = InsertableVariableValues.Empty(); }\r\n var result = text;\r\n for (var i = 0; i < Object.keys(values).length; i++) {\r\n result = result.replace(new RegExp(exports.defaultInsertableDelimiters.startDelimiter + exports.insertableTemplateVariables[i] + exports.defaultInsertableDelimiters.endDelimiter, 'g'), values[exports.insertableTemplateVariables[i]]);\r\n }\r\n return result;\r\n};\r\nexports.fillInsertedVariableValues = fillInsertedVariableValues;\r\nvar InsertableVariableValues = /** @class */ (function () {\r\n function InsertableVariableValues(firstName, lastName) {\r\n this.firstName = firstName;\r\n this.lastName = lastName;\r\n if (firstName == \"\") {\r\n this.firstName = InsertableVariableValues.Empty().firstName;\r\n }\r\n if (lastName == \"\") {\r\n this.lastName = InsertableVariableValues.Empty().lastName;\r\n }\r\n }\r\n InsertableVariableValues.Empty = function () {\r\n return new InsertableVariableValues(exports.defaultInsertableDelimiters.startDelimiter + \"firstName\" + exports.defaultInsertableDelimiters.endDelimiter, exports.defaultInsertableDelimiters.startDelimiter + \"lastName\" + exports.defaultInsertableDelimiters.endDelimiter);\r\n };\r\n return InsertableVariableValues;\r\n}());\r\nexports.InsertableVariableValues = InsertableVariableValues;\r\nexports.defaultInsertableDelimiters = new utils_1.InsertableDelimiters(\"{\", \"}\");\r\nexports.pageIcons = {\r\n Home: Home_1.default,\r\n GoogleReviewTemplate: Tune_1.default,\r\n Message: Send_1.default,\r\n MessagesHistory: History_1.default,\r\n Account: AccountCircle_1.default\r\n};\r\nexports.componentPaths = {\r\n Home: '/',\r\n GoogleReviewTemplate: '/google-review-template',\r\n Message: '/message',\r\n MessagesHistory: '/messages-history',\r\n Account: '/account'\r\n};\r\n//# sourceMappingURL=configs.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar Chip_1 = require(\"@material-ui/core/Chip\");\r\nvar React = require(\"react\");\r\nvar configs_1 = require(\"../configs\");\r\nvar utils_1 = require(\"../utils\");\r\nvar InsertableFieldChips = function (props) {\r\n var appendInsertableToFocusedInput = function (insertableName) {\r\n var inputElement = document.getElementById(props.inputId);\r\n var selectionStartIndex = inputElement.selectionStart;\r\n //If something is highlighted within the input, delete it first before continuing\r\n if (inputElement.selectionStart != inputElement.selectionEnd) {\r\n inputElement.value = utils_1.spliceOutOfString(inputElement.value, inputElement.selectionStart, inputElement.selectionEnd - inputElement.selectionStart);\r\n }\r\n var insertionWithDelimeters = configs_1.defaultInsertableDelimiters.startDelimiter + insertableName + configs_1.defaultInsertableDelimiters.endDelimiter;\r\n props.setInput(props.inputId, utils_1.insertIntoString(inputElement.value, insertionWithDelimeters, selectionStartIndex));\r\n inputElement.focus();\r\n inputElement.setSelectionRange(selectionStartIndex + insertionWithDelimeters.length, selectionStartIndex + insertionWithDelimeters.length);\r\n };\r\n var chips = props.insertableFieldNames.map(function (name, index) {\r\n return React.createElement(Chip_1.default, { key: index, style: { marginRight: \"3px\" }, disabled: props.disabled, onClick: function () { }, label: props.labels[index], onMouseDown: function (e) { e.preventDefault(); appendInsertableToFocusedInput(name); } });\r\n });\r\n return (React.createElement(React.Fragment, null, chips));\r\n};\r\nexports.default = InsertableFieldChips;\r\n//# sourceMappingURL=InsertableFieldChips.js.map","\"use strict\";\r\nvar __assign = (this && this.__assign) || function () {\r\n __assign = Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.reducer = exports.actionCreators = exports.AccountActionTypes = void 0;\r\nvar common_impl_1 = require(\"./common-impl\");\r\nvar common_types_1 = require(\"./common-types\");\r\nvar configs_1 = require(\"../configs\");\r\nvar auth = require(\"../authProvider\");\r\nvar Configs = require(\"../configs\");\r\n// -----------------\r\n// STATE - This defines the type of data maintained in the Redux store.\r\nvar AccountActionTypes;\r\n(function (AccountActionTypes) {\r\n AccountActionTypes[\"ACCOUNT_SUBMIT_STARTED\"] = \"ACCOUNT_SUBMIT_STARTED\";\r\n AccountActionTypes[\"ACCOUNT_SUBMIT_SUCCEEDED\"] = \"ACCOUNT_SUBMIT_SUCCEEDED\";\r\n AccountActionTypes[\"ACCOUNT_SUBMIT_FAILED\"] = \"ACCOUNT_SUBMIT_FAILED\";\r\n AccountActionTypes[\"ACCOUNT_UPDATE_REMAINING_SENDS\"] = \"ACCOUNT_UPDATE_REMAINING_SENDS\";\r\n AccountActionTypes[\"ACCOUNT_QUERY_STARTED\"] = \"ACCOUNT_QUERY_STARTED\";\r\n AccountActionTypes[\"ACCOUNT_QUERY_SUCCEEDED\"] = \"ACCOUNT_QUERY_SUCCEEDED\";\r\n AccountActionTypes[\"ACCOUNT_QUERY_FAILED\"] = \"ACCOUNT_QUERY_FAILED\";\r\n AccountActionTypes[\"SUBSCRIPTION_CANCEL_REQUEST_STARTED\"] = \"SUBSCRIPTION_CANCEL_REQUEST_STARTED\";\r\n AccountActionTypes[\"SUBSCRIPTION_CANCEL_REQUEST_SUCCEEDED\"] = \"SUBSCRIPTION_CANCEL_REQUEST_SUCCEEDED\";\r\n AccountActionTypes[\"SUBSCRIPTION_CANCEL_REQUEST_FAILED\"] = \"SUBSCRIPTION_CANCEL_REQUEST_FAILED\";\r\n AccountActionTypes[\"RESET_CANCEL_SUBSCRIPTION_FLAG\"] = \"RESET_CANCEL_SUBSCRIPTION_FLAG\";\r\n AccountActionTypes[\"SUBSCRIPTION_CANCEL_FAIL\"] = \"SUBSCRIPTION_CANCEL_FAIL\";\r\n})(AccountActionTypes = exports.AccountActionTypes || (exports.AccountActionTypes = {}));\r\n// ----------------\r\n// ACTION CREATORS - These are functions exposed to UI components that will trigger a state transition.\r\n// They don't directly mutate state, but they can have external side-effects (such as loading data).\r\nexports.actionCreators = {\r\n setSubscriptionCancelError: function () { return function (dispatch, getState) {\r\n dispatch({\r\n type: AccountActionTypes.SUBSCRIPTION_CANCEL_FAIL, error: \"Failed to cancel your subscription. Please contact support at \" + Configs.TRIBELY_SUPPORT_EMAIL + \"\"\r\n });\r\n }; },\r\n getAccount: function (accountNumber) {\r\n if (accountNumber === void 0) { accountNumber = null; }\r\n return function (dispatch, getState) {\r\n var _a, _b;\r\n var account = buildAccount(getState());\r\n // Set the account number if passed in\r\n if (accountNumber) {\r\n account.accountNumber = accountNumber.toUpperCase();\r\n }\r\n var accountApiSubmitEnvelope = {\r\n id: account.id,\r\n tenantId: account.tenantId,\r\n type: common_types_1.ApiSubmitTypes.ACCOUNT,\r\n userId: account.id,\r\n account: account\r\n };\r\n dispatch({ type: AccountActionTypes.ACCOUNT_QUERY_STARTED });\r\n if (account.accountNumber !== undefined) {\r\n fetch(configs_1.BASE_API_URI + \"/accounts/\" + ((_a = getState().account) === null || _a === void 0 ? void 0 : _a.accountEntity.id) + \"?tenantId=\" + ((_b = getState().account) === null || _b === void 0 ? void 0 : _b.accountEntity.tenantId), {\r\n 'headers': {\r\n 'x-api-key': Configs.QUERY_API_KEY,\r\n 'Content-Type': 'application/json'\r\n },\r\n 'method': 'GET'\r\n })\r\n .then(common_impl_1.handleErrors)\r\n .then(function (response) { return response.json(); })\r\n .then(function (responseData) {\r\n dispatch({ type: AccountActionTypes.ACCOUNT_QUERY_SUCCEEDED, account: responseData });\r\n })\r\n .catch(function (error) {\r\n if (error.text) {\r\n error.text().then(function (errorText) {\r\n return dispatch({\r\n type: AccountActionTypes.ACCOUNT_QUERY_FAILED, error: errorText\r\n });\r\n });\r\n }\r\n else {\r\n dispatch({\r\n type: AccountActionTypes.ACCOUNT_QUERY_FAILED, error: configs_1.ERROR_GENERIC_MESSAGE\r\n });\r\n }\r\n });\r\n }\r\n };\r\n },\r\n cancelSubscription: function () { return function (dispatch, getState) {\r\n var _a;\r\n var state = getState();\r\n var subscriptionCancellationRequest = {\r\n id: (_a = state.account) === null || _a === void 0 ? void 0 : _a.accountEntity.id,\r\n type: 'cancelSubscription',\r\n tenantId: auth.getTenantId(),\r\n userId: auth.getUserId()\r\n };\r\n dispatch({ type: AccountActionTypes.SUBSCRIPTION_CANCEL_REQUEST_STARTED });\r\n fetch(configs_1.BASE_API_URI + \"/accounts\", {\r\n 'headers': {\r\n 'x-api-key': configs_1.WRITE_API_KEY,\r\n 'Content-Type': 'application/json'\r\n },\r\n 'method': 'POST',\r\n 'body': JSON.stringify(subscriptionCancellationRequest)\r\n })\r\n .then(common_impl_1.handleErrors)\r\n .then(function (response) { return response.text(); })\r\n .then(function (response) {\r\n dispatch({ type: AccountActionTypes.SUBSCRIPTION_CANCEL_REQUEST_SUCCEEDED });\r\n })\r\n .catch(function (error) {\r\n if (error.text) {\r\n error.text().then(function (errorText) {\r\n dispatch({\r\n type: AccountActionTypes.SUBSCRIPTION_CANCEL_REQUEST_FAILED, error: errorText\r\n });\r\n });\r\n }\r\n else {\r\n dispatch({\r\n type: AccountActionTypes.SUBSCRIPTION_CANCEL_REQUEST_FAILED, error: configs_1.ERROR_GENERIC_MESSAGE\r\n });\r\n }\r\n });\r\n }; },\r\n submitAccount: function (accountNumber) {\r\n if (accountNumber === void 0) { accountNumber = null; }\r\n return function (dispatch, getState) {\r\n var account = buildAccount(getState());\r\n // Set the account number if passed in\r\n if (accountNumber) {\r\n account.accountNumber = accountNumber.toUpperCase();\r\n }\r\n var accountApiSubmitEnvelope = {\r\n id: account.id,\r\n tenantId: account.tenantId,\r\n type: common_types_1.ApiSubmitTypes.ACCOUNT,\r\n userId: account.id,\r\n account: account\r\n };\r\n dispatch({ type: AccountActionTypes.ACCOUNT_SUBMIT_STARTED });\r\n fetch(configs_1.BASE_API_URI + \"/accounts\", {\r\n 'headers': {\r\n 'x-api-key': configs_1.WRITE_API_KEY,\r\n 'Content-Type': 'application/json'\r\n },\r\n 'method': 'POST',\r\n 'body': JSON.stringify(accountApiSubmitEnvelope)\r\n })\r\n .then(common_impl_1.handleErrors)\r\n .then(function (response) { return response.json(); })\r\n .then(function (responseData) {\r\n dispatch({ type: AccountActionTypes.ACCOUNT_SUBMIT_SUCCEEDED, account: responseData });\r\n })\r\n .catch(function (error) {\r\n if (error.text) {\r\n error.text().then(function (errorText) {\r\n return dispatch({\r\n type: AccountActionTypes.ACCOUNT_SUBMIT_FAILED, error: errorText\r\n });\r\n });\r\n }\r\n else {\r\n dispatch({\r\n type: AccountActionTypes.ACCOUNT_SUBMIT_FAILED, error: configs_1.ERROR_GENERIC_MESSAGE\r\n });\r\n }\r\n });\r\n };\r\n },\r\n resetSubscriptionCancelledFlag: function () { return function (dispatch, getState) {\r\n dispatch({ type: AccountActionTypes.RESET_CANCEL_SUBSCRIPTION_FLAG, error: null });\r\n }; }\r\n};\r\nvar buildAccount = function (state) {\r\n var _a, _b, _c, _d, _e;\r\n return ({\r\n id: auth.getUserId(),\r\n idpIssuer: auth.getIssuer(),\r\n objectId: auth.getObjectId(),\r\n tenantId: auth.getTenantId(),\r\n dateCreated: '',\r\n userCity: auth.getCity(),\r\n userCountry: auth.getCountry(),\r\n userDisplayName: auth.getDisplayName(),\r\n userEmail: auth.getEmail(),\r\n userFirstName: auth.getFirstName(),\r\n userLastName: auth.getLastName(),\r\n clientVersion: Configs.APP_VERSION,\r\n lastClientCommandMessageId: common_impl_1.getLastClientCommandMessageId(),\r\n isNewUser: !auth.isNewUser() ? false : true,\r\n billingEmail: (_a = state.account) === null || _a === void 0 ? void 0 : _a.accountEntity.billingEmail,\r\n subscriptionName: (_b = state.account) === null || _b === void 0 ? void 0 : _b.accountEntity.subscriptionName,\r\n subscriptionStatus: (_c = state.account) === null || _c === void 0 ? void 0 : _c.accountEntity.subscriptionStatus,\r\n accountNumber: (_d = state.account) === null || _d === void 0 ? void 0 : _d.accountEntity.accountNumber,\r\n validUntil: (_e = state.account) === null || _e === void 0 ? void 0 : _e.accountEntity.validUntil\r\n });\r\n};\r\n// ----------------\r\n// REDUCER - For a given state and action, returns the new state. To support time travel, this must not mutate the old state.\r\nvar unloadedState = {\r\n isLoading: false,\r\n error: null,\r\n didCancelSubscriptionRequested: false,\r\n accountEntity: {}\r\n};\r\nvar reducer = function (state, incomingAction) {\r\n if (state === undefined) {\r\n return unloadedState;\r\n }\r\n var action = incomingAction;\r\n switch (action.type) {\r\n case AccountActionTypes.ACCOUNT_SUBMIT_STARTED:\r\n return {\r\n isLoading: true,\r\n accountEntity: state.accountEntity,\r\n didCancelSubscriptionRequested: false,\r\n error: null\r\n };\r\n case AccountActionTypes.ACCOUNT_SUBMIT_SUCCEEDED:\r\n return {\r\n isLoading: false,\r\n accountEntity: action.account,\r\n error: null\r\n };\r\n case AccountActionTypes.ACCOUNT_SUBMIT_FAILED:\r\n return {\r\n isLoading: false,\r\n accountEntity: state.accountEntity,\r\n error: action.error\r\n };\r\n case AccountActionTypes.ACCOUNT_QUERY_STARTED:\r\n return {\r\n isLoading: true,\r\n accountEntity: state.accountEntity,\r\n error: null\r\n };\r\n case AccountActionTypes.ACCOUNT_QUERY_SUCCEEDED:\r\n return {\r\n isLoading: false,\r\n accountEntity: action.account,\r\n error: null\r\n };\r\n case AccountActionTypes.ACCOUNT_QUERY_FAILED:\r\n return {\r\n isLoading: false,\r\n accountEntity: state.accountEntity,\r\n error: action.error\r\n };\r\n case AccountActionTypes.ACCOUNT_UPDATE_REMAINING_SENDS:\r\n return {\r\n isLoading: false,\r\n accountEntity: __assign(__assign({}, state.accountEntity), { remainingSends: action.remainingSends }),\r\n error: null\r\n };\r\n case AccountActionTypes.SUBSCRIPTION_CANCEL_REQUEST_STARTED:\r\n return {\r\n isLoading: true,\r\n accountEntity: state.accountEntity,\r\n didCancelSubscriptionRequested: false,\r\n error: null\r\n };\r\n case AccountActionTypes.SUBSCRIPTION_CANCEL_REQUEST_SUCCEEDED:\r\n return {\r\n isLoading: false,\r\n accountEntity: state.accountEntity,\r\n didCancelSubscriptionRequested: true,\r\n error: null\r\n };\r\n case AccountActionTypes.SUBSCRIPTION_CANCEL_REQUEST_FAILED:\r\n return {\r\n isLoading: false,\r\n accountEntity: state.accountEntity,\r\n didCancelSubscriptionRequested: false,\r\n error: action.error\r\n };\r\n case AccountActionTypes.RESET_CANCEL_SUBSCRIPTION_FLAG:\r\n return {\r\n isLoading: false,\r\n accountEntity: state.accountEntity,\r\n didCancelSubscriptionRequested: false,\r\n error: null\r\n };\r\n case AccountActionTypes.SUBSCRIPTION_CANCEL_FAIL:\r\n return {\r\n isLoading: false,\r\n accountEntity: state.accountEntity,\r\n error: action.error\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\nexports.reducer = reducer;\r\n//# sourceMappingURL=account.store.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ApiSubmitTypes = void 0;\r\nvar ApiSubmitTypes;\r\n(function (ApiSubmitTypes) {\r\n ApiSubmitTypes[\"MESSAGE\"] = \"message\";\r\n ApiSubmitTypes[\"SETTINGS\"] = \"settings\";\r\n ApiSubmitTypes[\"ACCOUNT\"] = \"account\";\r\n ApiSubmitTypes[\"CONTACT\"] = \"contact\";\r\n})(ApiSubmitTypes = exports.ApiSubmitTypes || (exports.ApiSubmitTypes = {}));\r\n//# sourceMappingURL=common-types.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.reducer = exports.actionCreators = void 0;\r\nvar common_impl_1 = require(\"./common-impl\");\r\nvar common_types_1 = require(\"./common-types\");\r\nvar configs_1 = require(\"../configs\");\r\nvar AccountStore = require(\"./account.store\");\r\nvar auth = require(\"../authProvider\");\r\n// -----------------\r\n// STATE - This defines the type of data maintained in the Redux store.\r\nvar MessageActionTypes;\r\n(function (MessageActionTypes) {\r\n MessageActionTypes[\"SUBMIT_STARTED\"] = \"MESSAGE_SUBMIT_STARTED\";\r\n MessageActionTypes[\"SUBMIT_SUCCEEDED\"] = \"MESSAGE_SUBMIT_SUCCEEDED\";\r\n MessageActionTypes[\"SUBMIT_FAILED\"] = \"MESSAGE_SUBMIT_FAILED\";\r\n MessageActionTypes[\"CONTACTS_REQUEST_FAILED\"] = \"MESSAGE_CONTACTS_REQUEST_FAILED\";\r\n MessageActionTypes[\"RESET_ISSENT\"] = \"MESSAGE_RESET_ISSENT\";\r\n})(MessageActionTypes || (MessageActionTypes = {}));\r\n// ----------------\r\n// ACTION CREATORS - These are functions exposed to UI components that will trigger a state transition.\r\n// They don't directly mutate state, but they can have external side-effects (such as loading data).\r\nexports.actionCreators = {\r\n sendMessage: function (values, targetPlatformId) { return function (dispatch, getState) {\r\n var appState = getState();\r\n if (!appState.messageSettings) {\r\n throw new Error('Failed to send message because there were no settings loaded');\r\n }\r\n if (appState && appState.message) {\r\n dispatch({ type: MessageActionTypes.SUBMIT_STARTED });\r\n var message = mapToMessage(values, targetPlatformId, appState);\r\n fetch(configs_1.BASE_API_URI + \"/messages\", {\r\n 'headers': {\r\n 'x-api-key': configs_1.WRITE_API_KEY,\r\n 'Content-Type': 'application/json'\r\n },\r\n 'method': 'POST',\r\n 'body': JSON.stringify(message)\r\n })\r\n .then(common_impl_1.handleErrors)\r\n .then(function (response) { return response.json(); })\r\n .then(function (result) {\r\n var response = result;\r\n dispatch({ type: MessageActionTypes.SUBMIT_SUCCEEDED, result: response });\r\n // Update remaining sends in the account store\r\n dispatch({ type: AccountStore.AccountActionTypes.ACCOUNT_UPDATE_REMAINING_SENDS, remainingSends: response.remainingSends });\r\n })\r\n .catch(function (error) {\r\n if (error.text) {\r\n error.text().then(function (errorText) {\r\n return dispatch({\r\n type: MessageActionTypes.SUBMIT_FAILED, error: errorText\r\n });\r\n });\r\n }\r\n else {\r\n dispatch({\r\n type: MessageActionTypes.SUBMIT_FAILED, error: configs_1.ERROR_GENERIC_MESSAGE\r\n });\r\n }\r\n });\r\n }\r\n }; },\r\n resetIsSentFlag: function () { return function (dispatch, getState) {\r\n dispatch({ type: MessageActionTypes.RESET_ISSENT });\r\n }; },\r\n setMessageContactsRequestFailed: function (errorMsg) { return function (dispatch, getState) {\r\n dispatch({ type: MessageActionTypes.CONTACTS_REQUEST_FAILED, error: errorMsg });\r\n }; }\r\n};\r\nvar mapToMessage = function (values, targetPlatformId, appState) {\r\n if (!appState.messageSettings || !appState.message) {\r\n throw new Error('Failed to send message because there were no settings loaded');\r\n }\r\n var message = {\r\n id: values.id,\r\n tenantId: auth.getTenantId(),\r\n type: common_types_1.ApiSubmitTypes.MESSAGE,\r\n targetPlatformId: targetPlatformId,\r\n mediumId: 'SMS',\r\n frequencyId: 'Once',\r\n sendDateTime: new Date().toISOString(),\r\n userId: auth.getEmail(),\r\n contact: {\r\n id: values.contactId ? values.contactId : null,\r\n tenantId: auth.getTenantId(),\r\n type: common_types_1.ApiSubmitTypes.CONTACT,\r\n firstName: values.firstName,\r\n lastName: values.lastName,\r\n mobilePhone: values.mobilePhone,\r\n dateCreated: appState.message.messageEntity.contact ? appState.message.messageEntity.contact.dateCreated : null\r\n },\r\n message: {\r\n body: configs_1.fillInsertedVariableValues(values.message, new configs_1.InsertableVariableValues(values.firstName, values.lastName)),\r\n footerLink: appState.messageSettings.messageSettingsEntity.targetPlatforms[0].messageFooterLink,\r\n footerText: configs_1.fillInsertedVariableValues(appState.messageSettings.messageSettingsEntity.targetPlatforms[0].messageFooter, new configs_1.InsertableVariableValues(values.firstName, values.lastName))\r\n }\r\n };\r\n switch (targetPlatformId) {\r\n case 'GMB':\r\n message.targetPlatformUri = appState.messageSettings.messageSettingsEntity.targetPlatforms[0].uri;\r\n break;\r\n case 'NON':\r\n break;\r\n default:\r\n }\r\n return message;\r\n};\r\n// ----------------\r\n// REDUCER - For a given state and action, returns the new state. To support time travel, this must not mutate the old state.\r\nvar unloadedState = {\r\n isLoading: false,\r\n messageEntity: {},\r\n error: null,\r\n isSent: false,\r\n result: {}\r\n};\r\nvar reducer = function (state, incomingAction) {\r\n if (state === undefined) {\r\n return unloadedState;\r\n }\r\n var action = incomingAction;\r\n switch (action.type) {\r\n case MessageActionTypes.SUBMIT_STARTED:\r\n return {\r\n isLoading: true,\r\n messageEntity: state.messageEntity,\r\n error: null,\r\n isSent: false,\r\n result: {},\r\n };\r\n case MessageActionTypes.SUBMIT_SUCCEEDED:\r\n return {\r\n isLoading: false,\r\n messageEntity: state.messageEntity,\r\n result: action.result,\r\n error: null,\r\n isSent: true,\r\n };\r\n case MessageActionTypes.SUBMIT_FAILED:\r\n return {\r\n isLoading: false,\r\n messageEntity: state.messageEntity,\r\n error: action.error,\r\n isSent: false,\r\n result: {},\r\n };\r\n case MessageActionTypes.RESET_ISSENT:\r\n return {\r\n isLoading: false,\r\n messageEntity: state.messageEntity,\r\n error: null,\r\n isSent: false,\r\n result: state.result,\r\n };\r\n case MessageActionTypes.CONTACTS_REQUEST_FAILED:\r\n return {\r\n isLoading: false,\r\n messageEntity: state.messageEntity,\r\n error: action.error,\r\n isSent: false,\r\n result: {},\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\nexports.reducer = reducer;\r\n//# sourceMappingURL=message.store.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.reducer = exports.actionCreators = void 0;\r\nvar common_impl_1 = require(\"./common-impl\");\r\nvar configs_1 = require(\"../configs\");\r\nvar auth = require(\"../authProvider\");\r\n// -----------------\r\n// STATE - This defines the type of data maintained in the Redux store.\r\nvar MessagesActionTypes;\r\n(function (MessagesActionTypes) {\r\n MessagesActionTypes[\"REQUEST_STARTED\"] = \"MESSAGES_REQUEST_STARTED\";\r\n MessagesActionTypes[\"REQUEST_SUCCEEDED\"] = \"MESSAGES_REQUEST_SUCCEEDED\";\r\n MessagesActionTypes[\"REQUEST_FAILED\"] = \"MESSAGES_REQUEST_FAILED\";\r\n})(MessagesActionTypes || (MessagesActionTypes = {}));\r\n// ----------------\r\n// ACTION CREATORS - These are functions exposed to UI components that will trigger a state transition.\r\n// They don't directly mutate state, but they can have external side-effects (such as loading data).\r\nexports.actionCreators = {\r\n requestMessages: function (startIndex, maxCount, cmd) { return function (dispatch, getState) {\r\n var appState = getState();\r\n if (cmd === 'f' || (appState && appState.messages && startIndex !== appState.messages.startIndex)) {\r\n var tenantId = auth.getTenantId();\r\n dispatch({ type: MessagesActionTypes.REQUEST_STARTED });\r\n fetch(configs_1.BASE_API_URI + \"/messages/\" + tenantId + \"?startIndex=\" + startIndex + \"&maxCount=\" + maxCount, {\r\n 'headers': {\r\n 'x-api-key': configs_1.QUERY_API_KEY\r\n },\r\n 'method': 'GET'\r\n })\r\n .then(common_impl_1.handleErrors)\r\n .then(function (response) { return response.json(); })\r\n .then(function (result) {\r\n dispatch({ type: MessagesActionTypes.REQUEST_SUCCEEDED, messages: result.messages, startIndex: startIndex, totalMessagesCount: result.totalMessagesCount });\r\n })\r\n .catch(function (error) {\r\n if (error.text) {\r\n error.text().then(function (errorText) {\r\n return dispatch({\r\n type: MessagesActionTypes.REQUEST_FAILED, error: errorText\r\n });\r\n });\r\n }\r\n else {\r\n dispatch({\r\n type: MessagesActionTypes.REQUEST_FAILED, error: configs_1.ERROR_GENERIC_MESSAGE\r\n });\r\n }\r\n });\r\n }\r\n }; }\r\n};\r\n// ----------------\r\n// REDUCER - For a given state and action, returns the new state. To support time travel, this must not mutate the old state.\r\nvar unloadedState = {\r\n isLoading: false,\r\n messageEntities: [],\r\n error: null,\r\n totalMessagesCount: 0\r\n};\r\nvar reducer = function (state, incomingAction) {\r\n if (state === undefined) {\r\n return unloadedState;\r\n }\r\n var action = incomingAction;\r\n switch (action.type) {\r\n case MessagesActionTypes.REQUEST_STARTED:\r\n return {\r\n isLoading: true,\r\n messageEntities: state.messageEntities,\r\n error: null,\r\n startIndex: state.startIndex,\r\n totalMessagesCount: 0\r\n };\r\n case MessagesActionTypes.REQUEST_SUCCEEDED:\r\n return {\r\n isLoading: false,\r\n messageEntities: action.messages,\r\n error: null,\r\n startIndex: action.startIndex,\r\n totalMessagesCount: action.totalMessagesCount\r\n };\r\n case MessagesActionTypes.REQUEST_FAILED:\r\n return {\r\n isLoading: false,\r\n messageEntities: state.messageEntities,\r\n error: action.error,\r\n startIndex: state.startIndex,\r\n totalMessagesCount: state.totalMessagesCount\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\nexports.reducer = reducer;\r\n//# sourceMappingURL=messages.store.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar React = require(\"react\");\r\nvar Typography_1 = require(\"@material-ui/core/Typography\");\r\nvar SendsRemainingBadge_1 = require(\"./SendsRemainingBadge\");\r\nvar configs_1 = require(\"../configs\");\r\nvar utils_1 = require(\"../utils\");\r\nvar TrialUpgradeMessage = function (props) {\r\n return (React.createElement(\"div\", { style: { display: \"inline-flex\", alignItems: \"center\" } },\r\n React.createElement(SendsRemainingBadge_1.default, { sendsRemaining: props.remainingSends }),\r\n React.createElement(Typography_1.default, { color: \"textSecondary\", style: { paddingLeft: \"5px\" }, variant: \"body1\" },\r\n \"review \",\r\n utils_1.pluralize(props.remainingSends, 'request'),\r\n \" remaining in your free trial. Click \",\r\n React.createElement(\"a\", { href: configs_1.TRIBELY_SIGNUP_URL, target: \"_blank\" }, \" here \"),\r\n \" to upgrade to a paid plan.\")));\r\n};\r\nexports.default = TrialUpgradeMessage;\r\n//# sourceMappingURL=TrialUpgradeMessage.js.map","\"use strict\";\r\nvar __assign = (this && this.__assign) || function () {\r\n __assign = Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\nvar __spreadArrays = (this && this.__spreadArrays) || function () {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar redux_1 = require(\"redux\");\r\nvar redux_thunk_1 = require(\"redux-thunk\");\r\nvar connected_react_router_1 = require(\"connected-react-router\");\r\nvar _1 = require(\"./\");\r\nfunction configureStore(history, initialState) {\r\n var middleware = [\r\n redux_thunk_1.default,\r\n connected_react_router_1.routerMiddleware(history)\r\n ];\r\n var rootReducer = redux_1.combineReducers(__assign(__assign({}, _1.reducers), { router: connected_react_router_1.connectRouter(history) }));\r\n var enhancers = [];\r\n var windowIfDefined = typeof window === 'undefined' ? null : window;\r\n if (windowIfDefined && windowIfDefined.__REDUX_DEVTOOLS_EXTENSION__) {\r\n enhancers.push(windowIfDefined.__REDUX_DEVTOOLS_EXTENSION__());\r\n }\r\n return redux_1.createStore(rootReducer, initialState, redux_1.compose.apply(void 0, __spreadArrays([redux_1.applyMiddleware.apply(void 0, middleware)], enhancers)));\r\n}\r\nexports.default = configureStore;\r\n//# sourceMappingURL=configureStore.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar React = require(\"react\");\r\nvar reactstrap_1 = require(\"reactstrap\");\r\nvar NavMenu_1 = require(\"./NavMenu\");\r\nvar Footer_1 = require(\"./Footer\");\r\nvar styles_1 = require(\"@material-ui/styles\");\r\nvar styles_2 = require(\"@material-ui/core/styles\");\r\nvar theme = styles_2.createMuiTheme({\r\n palette: {\r\n primary: {\r\n main: \"#28a745\",\r\n },\r\n secondary: {\r\n main: \"#6c757d\"\r\n }\r\n }\r\n});\r\nexports.default = (function (props) { return (React.createElement(styles_1.ThemeProvider, { theme: theme },\r\n React.createElement(NavMenu_1.default, null),\r\n React.createElement(reactstrap_1.Container, null, props.children),\r\n React.createElement(Footer_1.default, null))); });\r\n//# sourceMappingURL=Layout.js.map","//import { start } from \"repl\";\r\n\r\nexport const isEmpty = (str) => {\r\n return (!str || str.length === 0);\r\n}\r\n\r\nexport const isEmptyObject = (obj) => {\r\n for (var x in obj) { return false; }\r\n\r\n return true;\r\n}\r\n\r\nexport const reloadPage = () => {\r\n // Force reload from the server\r\n const form = document.createElement('form');\r\n form.method = \"POST\";\r\n form.action = \"https://api.tribely.io/reload\";\r\n document.body.appendChild(form);\r\n form.submit();\r\n}\r\n\r\nexport const pluralize = (number, singularWord) => {\r\n\r\n if (number === 1) {\r\n return singularWord;\r\n }\r\n\r\n if (singularWord.toLowerCase() === 'was') {\r\n return 'were';\r\n }\r\n\r\n return singularWord.toLowerCase().endsWith('y') ? `${singularWord}ies` : `${singularWord}s`;\r\n}\r\n\r\nexport class InsertableDelimiters {\r\n startDelimiter;\r\n endDelimiter;\r\n\r\n constructor(startDelimiter, endDelimiter) {\r\n this.startDelimiter = startDelimiter;\r\n this.endDelimiter = endDelimiter;\r\n }\r\n}\r\n\r\nexport const insertIntoString = (target, insertionString, insertionIndex) => {\r\n let arr = target.split('');\r\n arr.splice(insertionIndex, 0, insertionString);\r\n return arr.join('');\r\n}\r\n\r\nexport const spliceOutOfString = (target, startIndex, count) => {\r\n let arr = target.split('');\r\n arr.splice(startIndex, count);\r\n return arr.join('');\r\n}\r\n\r\nexport const capitalize = words => words.split(' ').map(w => w.substring(0, 1).toUpperCase() + w.substring(1)).join(' ');\r\n\r\nexport const getUrlHash = () => {\r\n if (window.location.hash) {\r\n return window.location.hash.substr(1);\r\n }\r\n\r\n return null;\r\n}","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar React = require(\"react\");\r\nvar react_redux_1 = require(\"react-redux\");\r\nvar formik_1 = require(\"formik\");\r\nvar reactstrap_1 = require(\"reactstrap\");\r\nvar configs_1 = require(\"../configs\");\r\nvar Yup = require(\"yup\");\r\nvar PageHeading_1 = require(\"./PageHeading\");\r\nvar AccountStore = require(\"../store/account.store\");\r\nvar TextField_1 = require(\"@material-ui/core/TextField\");\r\nvar Button_1 = require(\"@material-ui/core/Button\");\r\nrequire(\"./Account.css\");\r\nvar LoadingBackdrop_1 = require(\"./LoadingBackdrop\");\r\nvar LearnMorePopover_1 = require(\"./LearnMorePopover\");\r\nvar TrialUpgradeMessage_1 = require(\"./TrialUpgradeMessage\");\r\nvar Dialog_1 = require(\"@material-ui/core/Dialog\");\r\nvar DialogActions_1 = require(\"@material-ui/core/DialogActions\");\r\nvar DialogContent_1 = require(\"@material-ui/core/DialogContent\");\r\nvar DialogContentText_1 = require(\"@material-ui/core/DialogContentText\");\r\nvar DialogTitle_1 = require(\"@material-ui/core/DialogTitle\");\r\nvar QuickLinks_1 = require(\"./QuickLinks\");\r\nvar configs_2 = require(\"../configs\");\r\nvar DisabledCancelSubscriptionButton = function (props) {\r\n return (React.createElement(Button_1.default, { variant: \"contained\", color: \"primary\", disabled: true, style: { paddingLeft: \"17px\", paddingRight: \"17px\", pointerEvents: \"all\", cursor: \"not-allowed\" } }, \"Cancel Subscription\"));\r\n};\r\nvar Account = /** @class */ (function (_super) {\r\n __extends(Account, _super);\r\n function Account() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.state = { showSuccessAlert: false, showCancelSubscriptionRequestedAlert: false, cancelSubscriptionDialogOpen: false, gettingAccount: false };\r\n return _this;\r\n }\r\n Account.prototype.showTimedSuccessAlert = function () {\r\n var _this = this;\r\n this.setState({ showSuccessAlert: true });\r\n setTimeout(function () { return _this.setState({ showSuccessAlert: false }); }, 5000);\r\n };\r\n Account.prototype.componentDidUpdate = function () {\r\n if (this.props.didCancelSubscriptionRequested) {\r\n this.setState({ showCancelSubscriptionRequestedAlert: true });\r\n }\r\n };\r\n Account.prototype.componentWillMount = function () {\r\n this.setState({ gettingAccount: true });\r\n this.props.getAccount();\r\n this.setState({ gettingAccount: false });\r\n };\r\n Account.prototype.render = function () {\r\n var _this = this;\r\n var defaultValidationSchema = Yup.object().shape({\r\n accountNumber: Yup.string()\r\n .trim()\r\n .length(8, 'Account number is 8 digits alpha-numberic')\r\n .matches(/^[a-zA-Z0-9]{8}$/, 'Account number is alpha-numeric')\r\n .required(\"Required\"),\r\n });\r\n var htmlDecode = function (input) {\r\n var div = document.createElement('div');\r\n div.innerHTML = input;\r\n var decodedHtml = div.textContent || div.innerText;\r\n div.remove();\r\n return decodedHtml;\r\n };\r\n var handleCancelSubscriptionDialogOpen = function () {\r\n _this.setState({ cancelSubscriptionDialogOpen: true });\r\n };\r\n var handleCancelSubscription = function () {\r\n handleCancelSubscriptionDialogClose();\r\n _this.props.cancelSubscription();\r\n };\r\n var handleCancelSubscriptionDialogClose = function () {\r\n _this.setState({ cancelSubscriptionDialogOpen: false });\r\n };\r\n return (React.createElement(React.Fragment, null,\r\n React.createElement(reactstrap_1.Alert, { color: \"success\", isOpen: this.state.showSuccessAlert }, \"Account details saved successfully\"),\r\n React.createElement(reactstrap_1.Alert, { color: \"warning\", isOpen: this.state.showCancelSubscriptionRequestedAlert || this.props.accountEntity.subscriptionStatus === \"cancel-pending\" }, \"Subscription cancellation has been requested\"),\r\n React.createElement(reactstrap_1.Alert, { color: \"danger\", isOpen: this.props.accountEntity.subscriptionStatus === configs_1.ACCOUNT_CANCELED_BACKEND_VALUE }, \"Your subscription is cancelled\"),\r\n React.createElement(reactstrap_1.Alert, { color: \"danger\", isOpen: this.props.error !== null }, this.props.error),\r\n React.createElement(PageHeading_1.default, { title: \"Account\", titleIcon: configs_2.pageIcons[Account.pageName], subtitle: \"Your account details\" }),\r\n React.createElement(reactstrap_1.Alert, { isOpen: this.props.accountEntity.accountNumber === configs_1.TRIAL_ACCOUNT_NUMBER, color: \"warning\" },\r\n \"You are currently on a trial account with \",\r\n ' ',\r\n React.createElement(TrialUpgradeMessage_1.default, { remainingSends: this.props.accountEntity.remainingSends })),\r\n this.props.accountEntity.userEmail ? (React.createElement(formik_1.Formik, { enableReinitialize: true, initialValues: {\r\n accountNumber: this.props.accountEntity.accountNumber,\r\n subscriptionName: this.props.accountEntity.subscriptionName,\r\n subscriptionStatus: this.props.accountEntity.subscriptionStatus,\r\n userEmail: this.props.accountEntity.userEmail,\r\n billingEmail: this.props.accountEntity.billingEmail,\r\n validUntil: this.props.accountEntity.validUntil,\r\n userDisplayName: this.props.accountEntity.userDisplayName\r\n }, onSubmit: function (values, _a) {\r\n var setSubmitting = _a.setSubmitting;\r\n setSubmitting(true);\r\n _this.props.submitAccount(values.accountNumber);\r\n _this.showTimedSuccessAlert();\r\n setSubmitting(false);\r\n }, validationSchema: defaultValidationSchema }, function (props) {\r\n var values = props.values, errors = props.errors, touched = props.touched, handleChange = props.handleChange, handleBlur = props.handleBlur, handleSubmit = props.handleSubmit, isSubmitting = props.isSubmitting, setFieldValue = props.setFieldValue, setFieldTouched = props.setFieldTouched, isValid = props.isValid, validateForm = props.validateForm;\r\n return (React.createElement(React.Fragment, null,\r\n React.createElement(Dialog_1.default, { open: _this.state.cancelSubscriptionDialogOpen, onClose: handleCancelSubscriptionDialogClose },\r\n React.createElement(DialogTitle_1.default, { id: \"alert-dialog-title\" }, \"Cancel Subscription?\"),\r\n React.createElement(DialogContent_1.default, null,\r\n React.createElement(DialogContentText_1.default, { id: \"alert-dialog-description\" }, \"Are you sure you want to cancel your subscription?\")),\r\n React.createElement(DialogActions_1.default, null,\r\n React.createElement(Button_1.default, { onClick: handleCancelSubscriptionDialogClose, style: { color: \"#3084d7\" }, autoFocus: true }, \"Back\"),\r\n React.createElement(Button_1.default, { onClick: handleCancelSubscription, style: { color: \"#ff0800\" } }, \"Cancel Subscription\"))),\r\n React.createElement(reactstrap_1.Form, { onSubmit: handleSubmit },\r\n React.createElement(reactstrap_1.FormGroup, null,\r\n React.createElement(LearnMorePopover_1.default, null,\r\n \"This account number is normally sent to you via email once you subscribe to a paid plan. To activate your plan, copy/paste the account number from the email to this box. If you have subscribed and have not received an email, please contact support at \",\r\n React.createElement(\"a\", { href: \"mailto:\" + configs_1.TRIBELY_SUPPORT_EMAIL }, configs_1.TRIBELY_SUPPORT_EMAIL)),\r\n React.createElement(TextField_1.default, { variant: \"outlined\", type: \"text\", name: \"accountNumber\", placeholder: \"Your subscription account number\", id: \"accountNumber\", label: \"Account #\", value: values.accountNumber, onChange: handleChange, onBlur: handleBlur, error: !!errors.accountNumber, helperText: errors.accountNumber, fullWidth: true }),\r\n React.createElement(reactstrap_1.FormFeedback, null, errors.accountNumber)),\r\n React.createElement(reactstrap_1.FormGroup, null,\r\n React.createElement(TextField_1.default, { variant: \"filled\", type: \"text\", name: \"subscriptionName\", id: \"subscriptionName\", label: \"Subscription\", value: htmlDecode(values.subscriptionName), fullWidth: true, InputProps: {\r\n readOnly: true\r\n } })),\r\n React.createElement(reactstrap_1.FormGroup, null,\r\n React.createElement(TextField_1.default, { variant: \"filled\", type: \"text\", name: \"subscriptionStatus\", id: \"subscriptionStatus\", label: \"Status\", value: values.subscriptionStatus, fullWidth: true, InputProps: {\r\n readOnly: true\r\n } })),\r\n React.createElement(reactstrap_1.FormGroup, null,\r\n React.createElement(TextField_1.default, { variant: \"filled\", type: \"text\", name: \"validUntil\", id: \"validUntil\", label: \"Valid Until\", value: values.validUntil, fullWidth: true, InputProps: {\r\n readOnly: true\r\n } })),\r\n React.createElement(reactstrap_1.FormGroup, null,\r\n React.createElement(TextField_1.default, { variant: \"filled\", type: \"text\", name: \"userDisplayName\", id: \"userDisplayName\", label: \"Display Name\", value: values.userDisplayName, fullWidth: true, InputProps: {\r\n readOnly: true\r\n } })),\r\n React.createElement(reactstrap_1.FormGroup, null,\r\n React.createElement(TextField_1.default, { variant: \"filled\", type: \"text\", name: \"userEmail\", id: \"userEmail\", label: \"User Email\", value: values.userEmail, fullWidth: true, InputProps: {\r\n readOnly: true\r\n } })),\r\n React.createElement(reactstrap_1.FormGroup, null,\r\n React.createElement(TextField_1.default, { variant: \"filled\", type: \"text\", name: \"billingEmail\", id: \"billingEmail\", label: \"Billing Email\", value: values.billingEmail, fullWidth: true, InputProps: {\r\n readOnly: true\r\n } })),\r\n React.createElement(\"hr\", null),\r\n React.createElement(Button_1.default, { variant: \"contained\", type: \"submit\", color: \"primary\", style: { pointerEvents: \"all\", cursor: (!isValid || isSubmitting || Object.keys(touched).every(function (k) { return touched[k] === false; })) ? \"not-allowed\" : \"pointer\" }, disabled: !isValid || isSubmitting || Object.keys(touched).every(function (k) { return touched[k] === false; }), title: \"Save\" },\r\n _this.props.isLoading && React.createElement(reactstrap_1.Spinner, { animation: \"border\", variant: \"success\", size: \"sm\", role: \"status\" }),\r\n \" Save\"),\r\n ' ',\r\n React.createElement(Button_1.default, { variant: \"contained\", style: { marginRight: \"20px\" }, color: \"secondary\", onClick: function () { return _this.props.history.push('/'); } }, \"Close\"),\r\n React.createElement(QuickLinks_1.default, { pageNames: [\"Message\", \"GoogleReviewTemplate\"], linkLabels: [\"Request a review\", \"Configure GMB template\"] }),\r\n (_this.props.accountEntity.subscriptionStatus === \"canceled\" || _this.props.accountEntity.subscriptionStatus === \"cancel-pending\" || _this.props.accountEntity.accountNumber === configs_1.TRIAL_ACCOUNT_NUMBER || _this.props.didCancelSubscriptionRequested) ? React.createElement(DisabledCancelSubscriptionButton, null) : React.createElement(Button_1.default, { className: \"muiError\", onClick: handleCancelSubscriptionDialogOpen, style: { paddingLeft: \"17px\", paddingRight: \"17px\" } }, \"Cancel Subscription\")),\r\n React.createElement(LoadingBackdrop_1.default, { open: _this.props.isLoading })));\r\n })) :\r\n React.createElement(LoadingBackdrop_1.default, { open: true })));\r\n };\r\n Account.pageName = \"Account\";\r\n return Account;\r\n}(React.PureComponent));\r\nexports.default = react_redux_1.connect(function (state) { return state.account; }, AccountStore.actionCreators)(Account);\r\n//# sourceMappingURL=Account.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.reducers = void 0;\r\nvar MessageSettings = require(\"./message-settings.store\");\r\nvar Message = require(\"./message.store\");\r\nvar Messages = require(\"./messages.store\");\r\nvar Account = require(\"./account.store\");\r\nvar ClientCommand = require(\"./client-command.store\");\r\n// Whenever an action is dispatched, Redux will update each top-level application state property using\r\n// the reducer with the matching name. It's important that the names match exactly, and that the reducer\r\n// acts on the corresponding ApplicationState property type.\r\nexports.reducers = {\r\n messageSettings: MessageSettings.reducer,\r\n message: Message.reducer,\r\n messages: Messages.reducer,\r\n account: Account.reducer,\r\n clientCommand: ClientCommand.reducer\r\n};\r\n//# sourceMappingURL=index.js.map","import * as React from 'react';\r\nimport { Collapse, Container, Navbar, NavbarBrand, NavbarToggler, NavbarText } from 'reactstrap';\r\nimport { Link } from 'react-router-dom';\r\nimport { Redirect } from 'react-router';\r\nimport './NavMenu.css';\r\nimport * as auth from '../authProvider';\r\nimport IconButton from \"@material-ui/core/IconButton\";\r\nimport SettingsIcon from \"@material-ui/icons/Settings\";\r\nimport LogOutIcon from \"@material-ui/icons/ExitToApp\";\r\nimport Menu from \"@material-ui/core/Menu\";\r\nimport MenuItem from \"@material-ui/core/MenuItem\";\r\nimport { TRIBLEY_CONTACT_URL } from '../configs';\r\nimport { Divider } from '@material-ui/core';\r\n\r\nclass NavMenu extends React.PureComponent<{}, { isOpen: boolean, logout: boolean, isSettingsMenuOpen: boolean, anchorEl }> {\r\n public state = {\r\n isOpen: false,\r\n logout: false,\r\n isSettingsMenuOpen: false,\r\n anchorEl: null\r\n };\r\n\r\n handleMenu = (event) => {\r\n this.setState({ anchorEl: event.currentTarget });\r\n }\r\n\r\n handleMenuClose = () => {\r\n this.setState({ anchorEl: null})\r\n }\r\n\r\n handleLogout = () => {\r\n this.setState({ logout: true });\r\n }\r\n\r\n public render() {\r\n if (this.state.logout) {\r\n return ();\r\n }\r\n\r\n const userDisplayName = auth.getDisplayName();\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n \r\n \r\n Google Review Template\r\n My Account\r\n \r\n Feedback\r\n \r\n \r\n \r\n \r\n
\r\n {userDisplayName}\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n private toggleNavbar = () => {\r\n this.setState({\r\n isOpen: !this.state.isOpen\r\n });\r\n }\r\n}\r\n{/*\r\n \r\n \r\n \r\n \r\n \r\n Settings\r\n \r\n \r\n \r\n \r\n Google Review Template\r\n \r\n \r\n \r\n \r\n Account\r\n \r\n \r\n \r\n\r\n \r\n this.handleLogout()}>\r\n \r\n \r\n */}\r\n\r\nexport default NavMenu;\r\n","import * as React from 'react';\r\nimport * as Configs from '../configs';\r\n\r\nconst Footer = () => (\r\n \r\n
\r\n
\r\n
\r\n
\r\n © 2020 - { new Date().getFullYear() } WebNova, Inc. All rights reserved. {Configs.APP_VERSION}\r\n
\r\n
\r\n);\r\n\r\nexport default Footer;","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar authRedirect_1 = require(\"./auth/authRedirect\");\r\nexports.authenticate = function (launchApp) {\r\n if (exports.isAuthenticated() && launchApp) {\r\n launchApp();\r\n }\r\n else {\r\n authRedirect_1.signIn(launchApp);\r\n }\r\n};\r\nexports.isAuthenticated = function () { return authRedirect_1.getUserAccount() ? true : false; };\r\nexports.isNewUser = function () { var _a; return ((_a = authRedirect_1.getUserAccount().idToken) === null || _a === void 0 ? void 0 : _a.newUser) === true; };\r\nexports.signOut = function () { return authRedirect_1.logout(); };\r\nexports.getUserId = function () { return authRedirect_1.getUserAccount().accountIdentifier; };\r\nexports.getTenantId = function () { return authRedirect_1.getUserAccount().accountIdentifier; };\r\nexports.getEmail = function () { return authRedirect_1.getUserAccount().idToken.emails[0]; };\r\nexports.getFirstName = function () { return authRedirect_1.getUserAccount().idToken.given_name; };\r\nexports.getLastName = function () { return authRedirect_1.getUserAccount().idToken.family_name; };\r\nexports.getDisplayName = function () { return authRedirect_1.getUserAccount().name; };\r\nexports.getCity = function () { return authRedirect_1.getUserAccount().idToken.city; };\r\nexports.getCountry = function () { return authRedirect_1.getUserAccount().idToken.country; };\r\nexports.getIssuer = function () { return authRedirect_1.getUserAccount().idToken.iss; };\r\nexports.getObjectId = function () { return authRedirect_1.getUserAccount().idToken.oid; };\r\n//# sourceMappingURL=authProvider.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar React = require(\"react\");\r\nvar SendsRemainingBadge = function (props) {\r\n var _a, _b;\r\n var color = \"\";\r\n if (props.sendsRemaining !== undefined) {\r\n color = props.sendsRemaining > 2 ? \"#28a745\" : props.sendsRemaining > 1 ? \"#ff7900\" : \"#ff0000\";\r\n }\r\n var badgeWidth = 20;\r\n if (((_a = props.sendsRemaining) === null || _a === void 0 ? void 0 : _a.toString().length) !== undefined) {\r\n badgeWidth += ((((_b = props.sendsRemaining) === null || _b === void 0 ? void 0 : _b.toString().length) - 1) * 7);\r\n }\r\n return (React.createElement(\"span\", { style: { display: \"inline-flex\", justifyContent: \"center\", alignItems: \"center\", minWidth: \"30px\", width: badgeWidth + \"px\", height: \"30px\", borderRadius: \"100px\", color: \"white\", backgroundColor: color, fontSize: \"1.1rem\", fontWeight: 500 } }, props.sendsRemaining));\r\n};\r\nexports.default = SendsRemainingBadge;\r\n//# sourceMappingURL=SendsRemainingBadge.js.map","import * as React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport Button from '@material-ui/core/Button';\r\nimport Card from \"@material-ui/core/Card\";\r\nimport CardActions from \"@material-ui/core/CardActions\";\r\nimport CardContent from \"@material-ui/core/CardContent\";\r\nimport Grid from \"@material-ui/core/Grid\";\r\nimport Typography from \"@material-ui/core/Typography\";\r\nimport HistoryIcon from '@material-ui/icons/History';\r\nimport StarHalfIcon from '@material-ui/icons/StarHalf';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { Link, Link as RouterLink } from 'react-router-dom';\r\nimport * as auth from '../authProvider';\r\nimport { CUSTOMER_LABEL_PLURAL } from '../configs';\r\nimport * as AccountStore from '../store/account.store';\r\nimport * as MessageSettingsStore from '../store/message-settings.store';\r\nimport PageHeading from \"./PageHeading\";\r\nimport { ApplicationState } from '../store';\r\nimport { componentPaths } from \"../configs\";\r\nimport { Redirect } from 'react-router-dom';\r\nimport { isEmpty } from '../utils';\r\nimport { applyDepcrecatedGoogleReviewsTemplate } from '../store/common-impl';\r\n\r\nexport const path: string = \"/\";\r\n\r\ntype MessageSettingsProps =\r\n MessageSettingsStore.MessageSettingsState &\r\n AccountStore.AccountState &\r\n typeof MessageSettingsStore.actionCreators &\r\n RouteComponentProps<{}>;\r\n\r\nclass Home extends React.PureComponent {\r\n\r\n public render() {\r\n\r\n // Were we redirected by the nav menu to logout? (We can only sign out from home)\r\n if (this.props && this.props.location?.state) {\r\n const { logout } = this.props.location.state;\r\n\r\n if (logout) {\r\n auth.signOut();\r\n }\r\n }\r\n\r\n this.props.requestMessageSettings(this.props.messageSettingsEntity.dateUpdated);\r\n\r\n return (\r\n \r\n {\r\n this.props.messageSettingsEntity.targetPlatforms &&\r\n this.props.accountEntity.dateCreated &&\r\n applyDepcrecatedGoogleReviewsTemplate(this.props.accountEntity.dateCreated) === false &&\r\n isEmpty(this.props.messageSettingsEntity.targetPlatforms[0].googlePlaceId) ?\r\n :\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n Request a Google Review\r\n \r\n
\r\n \r\n Ask your {CUSTOMER_LABEL_PLURAL} to share their feedback by directing them to a reivew site such as Google My Business Reviews. You must first create a message template\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n Recent Requests\r\n \r\n
\r\n \r\n View the most recent requests that have been sent out to your {CUSTOMER_LABEL_PLURAL}.\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
}\r\n
);\r\n }\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => {\r\n return { ...state.messageSettings, ...state.account }\r\n },\r\n MessageSettingsStore.actionCreators\r\n)(Home as any);\r\n","import * as React from 'react';\r\nimport { CardContent } from '@material-ui/core';\r\nimport Button from \"@material-ui/core/Button\";\r\nimport Card from '@material-ui/core/Card';\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport TextField from \"@material-ui/core/TextField\";\r\nimport Typography from \"@material-ui/core/Typography\";\r\nimport Chip from \"@material-ui/core/Chip\";\r\nimport Clear from '@material-ui/icons/Clear';\r\nimport axios from 'axios';\r\nimport { Formik } from 'formik';\r\nimport { connect } from 'react-redux';\r\nimport { Alert, Form, FormGroup, Spinner } from 'reactstrap';\r\nimport * as Yup from 'yup';\r\nimport { CUSTOMER_LABEL_PLURAL, defaultInsertableDelimiters, GOOGLE_PLACEID_API_URI, pageIcons, TRIBELY_SUPPORT_EMAIL, TRIBELY_SUPPORT_PHONE } from '../configs';\r\nimport { ApplicationState } from '../store';\r\nimport * as AccountStore from '../store/account.store';\r\nimport * as MessageSettingsStore from '../store/message-settings.store';\r\nimport InsertableFieldChips from './InsertableFieldChips';\r\nimport LearnMorePopover from \"./LearnMorePopover\";\r\nimport LoadingBackdrop from \"./LoadingBackdrop\";\r\nimport PageHeading from \"./PageHeading\";\r\nimport QuickLinks from './QuickLinks';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { isEmpty } from '../utils';\r\n\r\ntype MessageSettingsProps =\r\n MessageSettingsStore.MessageSettingsState &\r\n AccountStore.AccountState &\r\n typeof MessageSettingsStore.actionCreators &\r\n RouteComponentProps<{}>;\r\n\r\ninterface SettingsComponentState {\r\n showSuccessAlert: boolean;\r\n showFailAlert: boolean;\r\n focusedField: number;\r\n insertableFieldsDisabled: boolean;\r\n showPlaceIdConfirm: boolean;\r\n googleBusinessName: string;\r\n googlePlaceId: string;\r\n googlePlaceIdAddress: string\r\n\r\n}\r\n\r\nenum FieldType {\r\n googleBusinessNameField,\r\n messageBodyField,\r\n messageFooterField\r\n}\r\n\r\ninterface GooglePlaceIdCandidateResponse {\r\n formatted_address: string,\r\n name: string,\r\n place_id: string\r\n}\r\n\r\ninterface GooglePlaceIdResponse {\r\n candidates: GooglePlaceIdCandidateResponse[],\r\n status: string\r\n}\r\n\r\n\r\nclass GoogleReviewTemplateCurrent extends React.PureComponent {\r\n\r\n state = {\r\n showSuccessAlert: false,\r\n showFailAlert: false,\r\n focusedField: -1,\r\n insertableFieldsDisabled: true,\r\n showPlaceIdConfirm: false,\r\n googleBusinessName: \"\",\r\n googlePlaceId: \"\",\r\n googlePlaceIdAddress: \"\"\r\n }\r\n \r\n private fetchGooglePlaceId() {\r\n\r\n const googlePlaceIdQuery = `${this.props.accountEntity.userDisplayName} ${this.props.accountEntity.userCity}`;\r\n const googlePlaceIdApiCall = encodeURI(`${GOOGLE_PLACEID_API_URI}/${googlePlaceIdQuery}`);\r\n\r\n axios.get(googlePlaceIdApiCall)\r\n .then((response) => {\r\n var candidates = response['data']['candidates'] as unknown as GooglePlaceIdResponse; \r\n\r\n if (response && candidates) {\r\n this.setState({\r\n googleBusinessName: candidates[0].name,\r\n googlePlaceId: candidates[0].place_id,\r\n googlePlaceIdAddress: candidates[0].formatted_address,\r\n showPlaceIdConfirm: true\r\n });\r\n }\r\n else {\r\n throw new Error('Failed to fetch place id');\r\n }\r\n })\r\n .catch((error) => {\r\n alert(error.message);\r\n console.log(error);\r\n })\r\n }\r\n\r\n public static pageName: string = \"GoogleReviewTemplate\";\r\n\r\n public handleShowAlert(success: boolean) {\r\n const duration: number = 5000;\r\n\r\n if (success) {\r\n this.setState({ showSuccessAlert: true });\r\n setTimeout(() => this.setState({ showSuccessAlert: false }), duration);\r\n }\r\n else {\r\n this.setState({ showFailAlert: true });\r\n setTimeout(() => this.setState({ showFailAlert: false }), duration);\r\n }\r\n }\r\n\r\n handleFocusChange(field: FieldType) {\r\n this.setState({ focusedField: field });\r\n }\r\n\r\n public componentDidMount() {\r\n this.ensureDataFetched();\r\n }\r\n\r\n public componentDidUpdate(prevProps) {\r\n if (prevProps.messageSettingsEntity.dateUpdated &&\r\n this.props.messageSettingsEntity.dateUpdated !== prevProps.messageSettingsEntity.dateUpdated) {\r\n this.handleShowAlert(true);\r\n }\r\n }\r\n\r\n private isMissingGoogleSetup() {\r\n return isEmpty(this.props.messageSettingsEntity.targetPlatforms[0].googlePlaceId);\r\n }\r\n\r\n public render() {\r\n const defaultValidationSchema = Yup.object().shape({\r\n googleBusinessName: Yup.string().\r\n max(80, \"Google business name too long\").\r\n required(\"Your Google business name is required\"),\r\n messageBody: Yup.string().\r\n max(512, \"Message too long\").\r\n min(2, \"Message too short\").\r\n required(\"Required\"),\r\n messageFooter: Yup.string().\r\n max(20).\r\n min(2, \"Footer too long\").\r\n notRequired().\r\n nullable(),\r\n messageFooterLink: Yup.string().\r\n url().\r\n notRequired().\r\n nullable()\r\n });\r\n const findYourBusinessOnGoogleLabel = \"Find Your Business on Google\";\r\n\r\n const handlePlaceIdConfirmClose = (setFieldValue, values) => {\r\n setGoogleSetupValue(this.state.googlePlaceId, this.state.googleBusinessName, this.state.googlePlaceIdAddress, setFieldValue, values);\r\n this.setState({ showPlaceIdConfirm: false });\r\n this.props.submitMessageSettings(values);\r\n };\r\n\r\n const handlePlaceIdReport = () => {\r\n alert(`To help you get your correct business from Google, please contact Tribely at ${TRIBELY_SUPPORT_PHONE} or send an email to ${TRIBELY_SUPPORT_EMAIL}.`);\r\n\r\n this.setState({ showPlaceIdConfirm: false });\r\n };\r\n\r\n const handlePlaceIdCancel = () => {\r\n this.setState({ showPlaceIdConfirm: false });\r\n };\r\n\r\n const handleGetGoogleBusinessName = () => {\r\n this.fetchGooglePlaceId();\r\n };\r\n\r\n const handleRemoveGoogleBusinessName = (setFieldValue, values) => {\r\n setGoogleSetupValue('', '', '', setFieldValue, values);\r\n\r\n this.props.submitMessageSettings(values);\r\n };\r\n\r\n const setGoogleSetupValue = (googlePlaceId, googleBusinessName, googlePlaceIdAddress, setFieldValue, values) => {\r\n setFieldValue('googleBusinessName', googleBusinessName, true);\r\n setFieldValue('googlePlaceId', googlePlaceId, true);\r\n setFieldValue('googlePlaceIdAddress', googlePlaceIdAddress, true);\r\n this.props.messageSettingsEntity.targetPlatforms[0].googlePlaceId = googlePlaceId;\r\n this.props.messageSettingsEntity.targetPlatforms[0].googlePlaceIdAddress = googlePlaceIdAddress;\r\n this.props.messageSettingsEntity.targetPlatforms[0].googleBusinessName = googleBusinessName;\r\n values.googleBusinessName = googleBusinessName;\r\n values.googlePlaceIdAddress = googlePlaceIdAddress;\r\n values.googlePlaceId = googlePlaceId;\r\n }\r\n\r\n return (\r\n \r\n \r\n Message template has been saved successfully\r\n \r\n \r\n {this.props.error}\r\n \r\n \r\n {this.props.messageSettingsEntity.targetPlatforms ? (\r\n {\r\n setSubmitting(true);\r\n this.props.submitMessageSettings(values);\r\n this.setState({ showSuccessAlert: true });\r\n setSubmitting(false);\r\n resetForm();\r\n }}\r\n validationSchema={defaultValidationSchema}\r\n >\r\n {({\r\n values,\r\n errors,\r\n touched,\r\n handleChange,\r\n handleBlur,\r\n handleSubmit,\r\n isValid,\r\n handleReset,\r\n isSubmitting,\r\n setFieldValue,\r\n setTouched,\r\n validateForm\r\n }) => (\r\n
\r\n \r\n \r\n

This is your business name that receives the reviews under Google Reviews. If this is not accurate, you need to contact {TRIBELY_SUPPORT_PHONE} or email us at {TRIBELY_SUPPORT_EMAIL} to fix this.

.\r\n
\r\n {this.isMissingGoogleSetup() ?\r\n :\r\n }\r\n variant=\"outlined\"\r\n id=\"googleBusinessName\"\r\n size=\"medium\"\r\n label={values.googleBusinessName}\r\n onChange={handleChange}\r\n onBlur={handleBlur}\r\n onFocus={() => { this.handleFocusChange(FieldType.googleBusinessNameField) }}\r\n onClick={() => handleRemoveGoogleBusinessName(setFieldValue, values)}\r\n />\r\n }\r\n
\r\n \r\n Is this your business?\r\n \r\n \r\n {this.state.googleBusinessName}\r\n {this.state.googlePlaceIdAddress}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n This is the message nudging your {CUSTOMER_LABEL_PLURAL} to rate and enter a review for your business. Do not put any links here.\r\n \r\n \r\n Message Body\r\n \r\n \r\n { setFieldValue(fieldName, value, true) }} />\r\n { handleBlur(e); this.state.focusedField = -1; }}\r\n error={!!errors.messageBody}\r\n helperText={errors.messageBody}\r\n onFocus={() => { this.handleFocusChange(FieldType.messageBodyField) }}\r\n style={{marginTop: \"1.5rem\"}}\r\n fullWidth={true}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n The message footer is usually a short thank you or something to that effect. This is optional.\r\n \r\n \r\n Message Footer\r\n \r\n \r\n { setFieldValue(fieldName, value, true) }} />\r\n {\r\n handleBlur(e); this.state.focusedField = -1; }}\r\n error={!!errors.messageFooter}\r\n helperText={errors.messageFooter}\r\n onFocus={() => { this.handleFocusChange(FieldType.messageFooterField); }}\r\n style={{ marginTop: \"1.5rem\" }}\r\n fullWidth={true}\r\n />\r\n \r\n \r\n \r\n
\r\n {' '}\r\n \r\n \r\n \r\n )\r\n\r\n }\r\n ) :\r\n \r\n }\r\n
\r\n );\r\n }\r\n\r\n private ensureDataFetched() {\r\n this.props.requestMessageSettings(this.props.messageSettingsEntity.dateUpdated);\r\n }\r\n};\r\n\r\nexport default connect(\r\n (state: ApplicationState) => {\r\n return { ...state.messageSettings, ...state.account }\r\n },\r\n MessageSettingsStore.actionCreators\r\n)(GoogleReviewTemplateCurrent as any);\r\n","import * as React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { Formik } from 'formik';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport * as Yup from 'yup';\r\nimport { ApplicationState } from '../store';\r\nimport { Form, FormGroup, Spinner, Alert } from 'reactstrap';\r\nimport * as MessageSettingsStore from '../store/message-settings.store';\r\nimport { CUSTOMER_LABEL_PLURAL, TRIBELY_SUPPORT_PHONE, TRIBELY_SUPPORT_EMAIL } from '../configs';\r\nimport TextField from \"@material-ui/core/TextField\";\r\nimport Button from \"@material-ui/core/Button\";\r\nimport Typography from \"@material-ui/core/Typography\";\r\nimport LoadingBackdrop from \"./LoadingBackdrop\";\r\nimport LearnMorePopover from \"./LearnMorePopover\";\r\nimport PageHeading from \"./PageHeading\";\r\nimport QuickLinks from './QuickLinks';\r\nimport { insertIntoString, spliceOutOfString } from \"../utils\";\r\nimport { pageIcons, insertableTemplateVariables, defaultInsertableDelimiters } from '../configs';\r\nimport InsertableFieldChips from './InsertableFieldChips';\r\nimport Card from '@material-ui/core/Card';\r\nimport { CardContent } from '@material-ui/core';\r\n\r\ntype MessageSettingsProps =\r\n MessageSettingsStore.MessageSettingsState &\r\n typeof MessageSettingsStore.actionCreators &\r\n RouteComponentProps<{}>;\r\n\r\ninterface SettingsComponentState {\r\n showSuccessAlert: boolean;\r\n showFailAlert: boolean;\r\n focusedField: number;\r\n insertableFieldsDisabled: boolean;\r\n}\r\n\r\nenum FieldType {\r\n shortNameField,\r\n messageBodyField,\r\n messageFooterField\r\n}\r\n\r\nclass GoogleReviewTemplateDeprecated extends React.PureComponent {\r\n\r\n state = {\r\n showSuccessAlert: false, showFailAlert: false, focusedField: -1, insertableFieldsDisabled: true\r\n }\r\n\r\n public static pageName: string = \"GoogleReviewTemplate\";\r\n\r\n public handleShowAlert(success: boolean) {\r\n const duration: number = 5000;\r\n\r\n if (success) {\r\n this.setState({ showSuccessAlert: true });\r\n setTimeout(() => this.setState({ showSuccessAlert: false }), duration);\r\n }\r\n else {\r\n this.setState({ showFailAlert: true });\r\n setTimeout(() => this.setState({ showFailAlert: false }), duration);\r\n }\r\n }\r\n\r\n handleFocusChange(field: FieldType) {\r\n this.setState({ focusedField: field });\r\n }\r\n\r\n public componentDidMount() {\r\n this.ensureDataFetched();\r\n }\r\n\r\n public componentDidUpdate(prevProps) {\r\n if (prevProps.messageSettingsEntity.dateUpdated &&\r\n this.props.messageSettingsEntity.dateUpdated !== prevProps.messageSettingsEntity.dateUpdated) {\r\n this.handleShowAlert(true);\r\n }\r\n }\r\n\r\n public render() {\r\n const defaultValidationSchema = Yup.object().shape({\r\n shortName: Yup.string().\r\n max(32, \"Shortname too long\").\r\n required(\"Your Google short name is required\"),\r\n messageBody: Yup.string().\r\n max(512, \"Message too long\").\r\n min(2, \"Message too short\").\r\n required(\"Required\"),\r\n messageFooter: Yup.string().\r\n max(20).\r\n min(2, \"Footer too long\").\r\n notRequired().\r\n nullable(),\r\n messageFooterLink: Yup.string().\r\n url().\r\n notRequired().\r\n nullable()\r\n });\r\n\r\n return (\r\n \r\n \r\n Message template has been saved successfully\r\n \r\n \r\n {this.props.error}\r\n \r\n \r\n {this.props.messageSettingsEntity.targetPlatforms ? (\r\n {\r\n setSubmitting(true);\r\n this.props.submitMessageSettings(values);\r\n this.setState({ showSuccessAlert: true });\r\n setSubmitting(false);\r\n resetForm();\r\n }}\r\n validationSchema={defaultValidationSchema}\r\n >\r\n {({\r\n values,\r\n errors,\r\n touched,\r\n handleChange,\r\n handleBlur,\r\n handleSubmit,\r\n isValid,\r\n handleReset,\r\n isSubmitting,\r\n setFieldValue\r\n }) => (\r\n
\r\n \r\n \r\n

A Google My Business (GMB) short name is a name that you can claim and reserve from Google to uniquely identify your business.

You need a GMB short name to direct your {CUSTOMER_LABEL_PLURAL} straight to your Google's reviews page. Click here to learn more and create your GMB short name.

If you need help doing this feel free to call us at {TRIBELY_SUPPORT_PHONE} or email us at {TRIBELY_SUPPORT_EMAIL}

.\r\n
\r\n { this.handleFocusChange(FieldType.shortNameField) }}\r\n fullWidth={true}\r\n />\r\n\r\n
\r\n \r\n \r\n \r\n This is the message nudging your {CUSTOMER_LABEL_PLURAL} to rate and enter a review for your business. Do not put any links here.\r\n \r\n \r\n Message Body\r\n \r\n \r\n { setFieldValue(fieldName, value, true) }} />\r\n { handleBlur(e); this.state.focusedField = -1; }}\r\n error={!!errors.messageBody}\r\n helperText={errors.messageBody}\r\n onFocus={() => { this.handleFocusChange(FieldType.messageBodyField) }}\r\n style={{marginTop: \"1.5rem\"}}\r\n fullWidth={true}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n The message footer is usually a short thank you or something to that effect. This is optional.\r\n \r\n \r\n Message Footer\r\n \r\n \r\n { setFieldValue(fieldName, value, true) }} />\r\n { handleBlur(e); this.state.focusedField = -1; }}\r\n error={!!errors.messageFooter}\r\n helperText={errors.messageFooter}\r\n onFocus={() => { this.handleFocusChange(FieldType.messageFooterField) }}\r\n style={{ marginTop: \"1.5rem\" }}\r\n fullWidth={true}\r\n />\r\n \r\n \r\n \r\n
\r\n {' '}\r\n \r\n \r\n \r\n\r\n )\r\n\r\n }\r\n ) :\r\n \r\n }\r\n
\r\n );\r\n }\r\n\r\n private ensureDataFetched() {\r\n this.props.requestMessageSettings(this.props.messageSettingsEntity.dateUpdated);\r\n }\r\n};\r\n\r\nexport default connect(\r\n (state: ApplicationState) => state.messageSettings,\r\n MessageSettingsStore.actionCreators\r\n)(GoogleReviewTemplateDeprecated as any);\r\n","import * as React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport axios from 'axios';\r\nimport { Formik } from 'formik';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport * as Yup from 'yup';\r\nimport { ApplicationState } from '../store';\r\nimport { Form, FormGroup, FormFeedback, Alert, Spinner } from 'reactstrap';\r\nimport * as MessageStore from '../store/message.store';\r\nimport * as MessageSettingsStore from '../store/message-settings.store';\r\nimport * as auth from '../authProvider';\r\nimport { QUERY_API_KEY, BASE_API_URI, CUSTOMER_LABEL_SINGULAR, TRIAL_ACCOUNT_NUMBER } from '../configs';\r\nimport * as AccountStore from '../store/account.store';\r\nimport { capitalize } from '../utils';\r\nimport { Link } from 'react-router-dom';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';\r\nimport { CUSTOMER_LABEL_PLURAL } from '../configs';\r\nimport Autocomplete from \"@material-ui/lab/Autocomplete\";\r\nimport TextField from \"@material-ui/core/TextField\";\r\nimport Button from \"@material-ui/core/Button\";\r\nimport \"./Message.css\";\r\nimport LoadingBackdrop from \"./LoadingBackdrop\";\r\nimport LearnMorePopover from \"./LearnMorePopover\";\r\nimport PageHeading from \"./PageHeading\";\r\nimport TrialUpgradeMessage from './TrialUpgradeMessage';\r\nimport QuickLinks from \"./QuickLinks\";\r\nimport { pageIcons, fillInsertedVariableValues, InsertableVariableValues } from '../configs';\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\n\r\nconst BACKSPACE_KEYCODE: number = 8;\r\n\r\nwindow.Storage.prototype.setObject = function (key: string, value) {\r\n this.setItem(key, JSON.stringify(value));\r\n}\r\n\r\nwindow.Storage.prototype.getObject = function (key: string) {\r\n return JSON.parse(this.getItem(key) || '');\r\n}\r\n\r\ntype MessageProps = MessageStore.MessageState &\r\n typeof MessageStore.actionCreators &\r\n MessageSettingsStore.MessageSettingsState &\r\n AccountStore.AccountState &\r\n typeof MessageSettingsStore.actionCreators &\r\n RouteComponentProps<{}>;\r\n\r\ninterface MessageComponentState {\r\n showSuccessAlert: boolean;\r\n showFailAlert: boolean;\r\n mobilePhoneSuggestions: Array;\r\n mobilePhoneHelpPopoverAnchor: any;\r\n messageHelpPopoverAnchor: any;\r\n messagePreviewPopoverAnchor: boolean;\r\n messagePreviewText: string;\r\n}\r\n\r\n\r\ninterface SelectRecord {\r\n id: string | null;\r\n label: string;\r\n value: string;\r\n firstName: string;\r\n lastName: string;\r\n}\r\n\r\nclass Message extends React.PureComponent {\r\n\r\n state = {\r\n showSuccessAlert: false, showFailAlert: false, mobilePhoneSuggestions: [], mobilePhoneHelpPopoverAnchor: null, messageHelpPopoverAnchor: null, messagePreviewPopoverAnchor: false, messagePreviewText: \"\"\r\n }\r\n\r\n public static pageName: string = \"Message\";\r\n\r\n\r\n public showTimedSuccessAlert() {\r\n this.props.resetIsSentFlag();\r\n\r\n this.setState({ showSuccessAlert: true });\r\n setTimeout(() => this.setState({ showSuccessAlert: false }), 5000);\r\n }\r\n\r\n public componentDidMount() {\r\n this.ensureDataFetched();\r\n }\r\n\r\n public componentDidUpdate() {\r\n if (this.props.isSent) {\r\n this.showTimedSuccessAlert();\r\n }\r\n }\r\n\r\n private mobilePhoneFetchBlocked: boolean = true;\r\n\r\n // Tracks last key stroke. We're interested in backspace (8)\r\n private lastKeyStroke: number = 0;\r\n\r\n private suggestContactOptions = (mobilePhoneStart, overrideThrottle: boolean) => {\r\n // No need to fetch if not a number \r\n if (!mobilePhoneStart || isNaN(mobilePhoneStart)) {\r\n return;\r\n }\r\n\r\n // Try to find it in the cached list first before fetching from the server, unless if the user is backspacing, \r\n // then skip and go straight to the server to get matching items to the shirking mobilePhone,\r\n // otherwise, it will always match the start of what's in the cached list\r\n if (this.lastKeyStroke !== BACKSPACE_KEYCODE) {\r\n const existingIdx = (this.state.mobilePhoneSuggestions as unknown as Array)\r\n .findIndex((mobilePhone) => (mobilePhone.value.startsWith(mobilePhoneStart)));\r\n\r\n // Found it, return \r\n if (existingIdx === 0)\r\n return;\r\n }\r\n\r\n // Go fetch from the server \r\n this.fetchContactsWithThrottle(mobilePhoneStart, overrideThrottle);\r\n }\r\n\r\n private fetchContactsWithThrottle(mobilePhoneStart: string, overrideThrottle: boolean) {\r\n\r\n const throttleTime: number = 150; // milliseconds of blocking between calls\r\n\r\n // Block first to throttle this function execution\r\n // Before we hit the network and fetch on every key stroke, pace or slow down the fetching to be for a few keystrokes at a time instead of on every keystroke\r\n if (this.mobilePhoneFetchBlocked && !overrideThrottle) {\r\n setTimeout(() => { this.mobilePhoneFetchBlocked = false; }, throttleTime);\r\n return;\r\n }\r\n this.mobilePhoneFetchBlocked = true;\r\n\r\n // Fetch matching contacts that start with the entry from the server\r\n const url = `${BASE_API_URI}/contacts/${mobilePhoneStart}/?tenantId=${auth.getTenantId()}`;\r\n\r\n axios.get(url, { headers: { 'x-api-key': QUERY_API_KEY } })\r\n .then((result) => {\r\n this.setState({\r\n mobilePhoneSuggestions: result.data.map((contact) => ({ id: `${contact.id}`, label: `${contact.mobilePhone} (${contact.firstName} ${contact.lastName})`, value: contact.mobilePhone, firstName: `${contact.firstName}`, lastName: `${contact.lastName}` }))\r\n });\r\n })\r\n .catch((error) => {\r\n this.props.setMessageContactsRequestFailed(error.message);\r\n })\r\n }\r\n\r\n public render() {\r\n\r\n const defaultValidationSchema = Yup.object().shape({\r\n mobilePhone: Yup.object().shape({\r\n label: Yup.string().required(),\r\n value: Yup.string()\r\n .trim()\r\n .length(10, 'Mobile phone number must be exactly 10 digits and all numbers')\r\n .matches(/^[0-9]{10}$/, 'Mobile phone number must be exactly 10 digits and all numbers')\r\n .required(\"Required\")\r\n .nullable()\r\n }),\r\n firstName: Yup.string()\r\n .min(2, \"Too short\")\r\n .max(25, \"Too long\")\r\n .required(\"Required\"),\r\n lastName: Yup.string()\r\n .min(2, \"Invalid name\")\r\n .max(25, \"Too long\")\r\n .required(\"Required\"),\r\n message: Yup.string()\r\n .min(2, \"Too short\")\r\n .max(512, \"Too long\")\r\n .required(\"Message cannot be empty\")\r\n });\r\n\r\n const { title, subtitle } = {\r\n title: 'Request a Google Review',\r\n subtitle: `Text your ${CUSTOMER_LABEL_PLURAL} to leave a Google review`\r\n };\r\n\r\n const targetPlatformId = 'GMB';\r\n\r\n const setMobilePhoneField = (text) => {\r\n const phoneField = document.getElementById(\"mobilePhone\");\r\n if (phoneField) {\r\n phoneField[\"value\"] = text;\r\n }\r\n };\r\n\r\n const blockSending: boolean =\r\n this.props.accountEntity.remainingSends === undefined ? false : this.props.accountEntity.remainingSends <= 0;\r\n\r\n var isTemplateNotComplete: boolean = this.props.messageSettingsEntity.targetPlatforms &&\r\n (!this.props.messageSettingsEntity?.targetPlatforms[0].googlePlaceId ||\r\n this.props.messageSettingsEntity?.targetPlatforms[0].googlePlaceId.trim().length === 0);\r\n\r\n // See if it's complete according to legacy shortname\r\n if (isTemplateNotComplete) {\r\n isTemplateNotComplete = !(this.props.messageSettingsEntity?.targetPlatforms[0].shortName &&\r\n this.props.messageSettingsEntity?.targetPlatforms[0].shortName.trim().length !== 0);\r\n }\r\n\r\n const handleMessagePreviewOpen = (values: InsertableVariableValues) => {\r\n let previewText: string = fillInsertedVariableValues(this.props.messageSettingsEntity.targetPlatforms[0].messageBody, values) + \": \" + this.props.messageSettingsEntity.targetPlatforms[0].uri + \"\\n\\n\" + fillInsertedVariableValues(this.props.messageSettingsEntity.targetPlatforms[0].messageFooter, values);\r\n this.setState({ messagePreviewPopoverAnchor: true, messagePreviewText: previewText });\r\n };\r\n\r\n const handleMessagePreviewClose = () => {\r\n this.setState({ messagePreviewPopoverAnchor: false });\r\n };\r\n\r\n const handleInsertableVariableFieldChange = (values: InsertableVariableValues, setField) => {\r\n setField(\"message\", fillInsertedVariableValues(this.props.messageSettingsEntity.targetPlatforms[0].messageBody, values), false);\r\n }\r\n\r\n const sendButtonTitle = blockSending ? \"Your remaining messages balance is insufficient\" :\r\n isTemplateNotComplete ? \"Complete the Google Review Template first.\" : \"\";\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n Before sending a request, you need to complete filling out the Google Review template first. Go to Settings/Google Review Template or simply click here to complete.\r\n \r\n \r\n Message has been sent\r\n \r\n \r\n {this.props.error}\r\n \r\n \r\n \r\n {this.props.messageSettingsEntity.targetPlatforms ? (\r\n {\r\n setSubmitting(true);\r\n\r\n const messageView: MessageStore.MessageView = {\r\n id: values.id,\r\n contactId: (values.mobilePhone as unknown as SelectRecord).id,\r\n firstName: values.firstName,\r\n lastName: values.lastName,\r\n message: values.message,\r\n mobilePhone: (values.mobilePhone as unknown as SelectRecord).value\r\n };\r\n\r\n this.props.sendMessage(messageView, targetPlatformId);\r\n\r\n\r\n\r\n setSubmitting(false);\r\n resetForm();\r\n }}\r\n validationSchema={defaultValidationSchema}\r\n >\r\n {props => {\r\n const {\r\n values,\r\n errors,\r\n touched,\r\n handleChange,\r\n handleBlur,\r\n handleSubmit,\r\n isSubmitting,\r\n setFieldValue,\r\n setFieldTouched,\r\n isValid,\r\n validateForm\r\n } = props;\r\n\r\n return (\r\n
\r\n \r\n \r\n This is the mobile phone number of your {CUSTOMER_LABEL_SINGULAR} to send your review request to. Enter it as a 10-digit all-numbers including the area code (no hyphens, brackets or parentheses). Example: 5554444444\r\n \r\n { return option[\"label\"] !== undefined ? option[\"label\"] : \"\"; }}\r\n renderInput={(params) => this.lastKeyStroke = event.keyCode}\r\n variant=\"outlined\"\r\n\r\n />\r\n }\r\n onFocus={() => {\r\n if (values.mobilePhone !== \"\") {\r\n setMobilePhoneField(values.mobilePhone[\"value\"].split(\" \")[0]);\r\n\r\n }\r\n }\r\n }\r\n blurOnSelect={true}\r\n clearOnEscape={true}\r\n onBlur={() => {\r\n setFieldTouched('mobilePhone', true, true);\r\n }}\r\n onInputChange={(event, newValue) => {\r\n setFieldValue('mobilePhone', { label: \"l\", value: newValue }, true);\r\n if (newValue.length === 10) {\r\n this.suggestContactOptions(newValue, true);\r\n }\r\n else {\r\n this.suggestContactOptions(newValue, false);\r\n }\r\n }}\r\n\r\n onChange={(event, newValue) => {\r\n if (newValue !== null) {\r\n setFieldValue('mobilePhone', newValue, true);\r\n setFieldValue('firstName', newValue[\"firstName\"], false);\r\n setFieldValue('lastName', newValue[\"lastName\"], false);\r\n handleInsertableVariableFieldChange(new InsertableVariableValues(newValue[\"firstName\"], newValue[\"lastName\"]), setFieldValue);\r\n setTimeout(() => {\r\n validateForm();\r\n }, 100);\r\n }\r\n }}\r\n />\r\n\r\n \r\n\r\n \r\n { handleChange(event); handleInsertableVariableFieldChange(new InsertableVariableValues(event.target.value, values.lastName), setFieldValue)}}\r\n onBlur={handleBlur}\r\n error={!!errors.firstName}\r\n helperText={errors.firstName}\r\n fullWidth={true}\r\n />\r\n {errors.firstName}\r\n \r\n \r\n { handleChange(event); handleInsertableVariableFieldChange(new InsertableVariableValues(values.firstName, event.target.value), setFieldValue) }}\r\n onBlur={handleBlur}\r\n error={!!errors.lastName}\r\n helperText={errors.lastName}\r\n fullWidth={true}\r\n />\r\n {errors.lastName}\r\n \r\n \r\n \r\n This message is coming from the template here.\r\n \r\n \r\n {errors.message}\r\n \r\n \r\n {\"Preview\"}\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n
\r\n {' '}\r\n \r\n \r\n \r\n );\r\n }}\r\n ) :\r\n \r\n }\r\n
\r\n );\r\n }\r\n\r\n private ensureDataFetched() {\r\n this.props.requestMessageSettings(this.props.messageSettingsEntity.dateUpdated);\r\n }\r\n};\r\n\r\nexport default connect(\r\n // Since we're merging states here, order matters! Because they share common base properties, e.g., isLoading. The last one to the right trumps all to the left.\r\n (state: ApplicationState) => { return { ...state.messageSettings, ...state.account, ...state.message } },\r\n { ...MessageSettingsStore.actionCreators, ...MessageStore.actionCreators }\r\n)(Message as any);","import * as React from 'react';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport { Link } from 'react-router-dom';\r\nimport { connect } from 'react-redux';\r\nimport Moment from 'react-moment';\r\nimport NumberFormat from 'react-number-format';\r\nimport { ApplicationState } from '../store';\r\nimport * as MessagesHistoryStore from '../store/messages.store';\r\nimport \"./MessagesHistory.css\";\r\nimport Table from '@material-ui/core/Table';\r\nimport TableBody from '@material-ui/core/TableBody';\r\nimport TableCell from '@material-ui/core/TableCell';\r\nimport TableContainer from '@material-ui/core/TableContainer';\r\nimport TableHead from '@material-ui/core/TableHead';\r\nimport TableRow from '@material-ui/core/TableRow';\r\nimport Paper from '@material-ui/core/Paper';\r\nimport RefreshIcon from '@material-ui/icons/Refresh';\r\nimport IconButton from \"@material-ui/core/IconButton\";\r\nimport Pagination from \"@material-ui/lab/Pagination\";\r\nimport Grid from \"@material-ui/core/Grid\";\r\nimport LoadingBackdrop from \"./LoadingBackdrop\";\r\nimport { pluralize } from '../utils';\r\nimport PageHeading from \"./PageHeading\";\r\nimport QuickLinks from './QuickLinks';\r\nimport { pageIcons } from \"../configs\";\r\n\r\ntype MessagesHistoryProps = MessagesHistoryStore.MessagesState &\r\n typeof MessagesHistoryStore.actionCreators &\r\n RouteComponentProps<{ startIndex: string, cmd: string }>;\r\n\r\n\r\n\r\nclass MessagesHistory extends React.PureComponent {\r\n readonly _maxPageCount: number = 8;\r\n\r\n public componentDidMount() {\r\n this.ensureDataFetched();\r\n }\r\n\r\n public componentDidUpdate() {\r\n this.ensureDataFetched();\r\n }\r\n\r\n public static pageName: string = \"MessagesHistory\";\r\n\r\n private ensureDataFetched() {\r\n const cmd = this.props.match.params.cmd;\r\n\r\n // Remove the force-refresh param and reset the URL so it doesn't keep refreshing in an endless loop\r\n if (cmd === 'f') {\r\n this.props.history.push('/messages-history/0');\r\n }\r\n\r\n const startIndex = parseInt(this.props.match.params.startIndex, 10) || 0;\r\n this.props.requestMessages(startIndex, this._maxPageCount, cmd);\r\n }\r\n\r\n public render() {\r\n const totalMessagesCount: number = this.props.totalMessagesCount;\r\n const enablePagination: boolean = totalMessagesCount > this._maxPageCount;\r\n\r\n return (\r\n \r\n \r\n {this.props.isLoading && }\r\n \r\n \r\n \r\n {enablePagination && this.props.messageEntities && this.renderMessagesHistoryPagination(totalMessagesCount, this.props.history)}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {this.props.messageEntities?.length > 0 ? this.renderMessagesHistoryList() :
There are no messages to show
}\r\n
\r\n \r\n
\r\n );\r\n }\r\n\r\n private renderMessagesHistoryList() {\r\n let counter = this.props.startIndex || 0;\r\n counter = (counter < 0 ? 0 : counter);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n #\r\n Date Sent\r\n Mobile Phone\r\n First Name\r\n Last Name\r\n Message\r\n Sent by\r\n \r\n \r\n \r\n {this.props.messageEntities.map((message: MessagesHistoryStore.Message) => {\r\n counter++;\r\n return (\r\n {counter}\r\n {message.dateCreated}\r\n \r\n {message.contact.firstName}\r\n {message.contact.lastName}\r\n {message.message.body}\r\n {message.userId}\r\n );\r\n })}\r\n \r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n private renderMessagesHistoryPagination(totalCount: number, history) {\r\n\r\n const pagesCount: number = Math.floor(totalCount / this._maxPageCount);\r\n\r\n const currentPageNumber: number = Math.floor((this.props.startIndex || 0) / this._maxPageCount) + 1;\r\n\r\n // Build the page numbers bar\r\n //let pages: Array = [];\r\n //for (let i = 0, j = totalCount; j >= 0; j = j - this._maxPageCount, i++) {\r\n // const pageSize: number = i * this._maxPageCount;\r\n // const pageIndex: number = pageSize > totalCount ? ((--i) * (this._maxPageCount)) + remainder : pageSize;\r\n // pages.push({i + 1});\r\n //}\r\n\r\n return ( history.push(\"/messages-history/\" + ((newPage * this._maxPageCount) - this._maxPageCount))} />);\r\n }\r\n\r\n}\r\n\r\nexport default connect(\r\n (state: ApplicationState) => state.messages,\r\n MessagesHistoryStore.actionCreators\r\n)(MessagesHistory as any)","import * as React from 'react';\r\nimport { getLastClientCommandMessageId, saveLastClientCommandMessageId, applyDepcrecatedGoogleReviewsTemplate } from './store/common-impl';\r\nimport { Route, Switch } from 'react-router-dom';\r\nimport { connect } from 'react-redux';\r\nimport { Alert } from 'reactstrap';\r\nimport Layout from './components/Layout';\r\nimport Home from './components/Home';\r\nimport GoogleReviewTemplateCurrent from './components/GoogleReviewTemplateCurrent';\r\nimport GoogleReviewTemplateDeprecated from './components/GoogleReviewTemplateDeprecated';\r\nimport Message from './components/Message';\r\nimport Account from './components/Account';\r\nimport MessagesHistory from './components/MessagesHistory';\r\nimport './custom.css';\r\nimport { TRIBELY_SUPPORT_EMAIL, ERROR_ACCOUNT_NOT_CREATED } from './configs';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faExclamationTriangle, faInfoCircle } from '@fortawesome/free-solid-svg-icons';\r\nimport { ClientCommandTypes, ClientCommand } from './store/client-command.store';\r\nimport { Button } from 'reactstrap';\r\nimport { reloadPage } from './utils';\r\nimport { ThemeProvider } from \"@material-ui/styles\";\r\nimport { createMuiTheme } from \"@material-ui/core/styles\";\r\nimport { componentPaths } from \"./configs\";\r\n\r\nconst muiTheme = createMuiTheme({\r\n palette: {\r\n primary: {\r\n main: \"#3d5afe\"\r\n },\r\n secondary: {\r\n main: \"#009688\"\r\n }\r\n }\r\n});\r\n\r\n\r\nconst App = (props) => {\r\n\r\n const clientCommandShowPromptRefresh: boolean = shouldExecuteClientCommand(props.clientCommandEntity, ClientCommandTypes.PROMPT_REFRESH);\r\n const clientCommandShowInfo: boolean = shouldExecuteClientCommand(props.clientCommandEntity, ClientCommandTypes.SHOW_INFO);\r\n\r\n return (\r\n \r\n {props.error} with your account. Contact support at {TRIBELY_SUPPORT_EMAIL} with reference code {ERROR_ACCOUNT_NOT_CREATED}.\r\n \r\n \r\n {clientCommandShowPromptRefresh && props.clientCommandEntity.params.message} \r\n \r\n dismissClientCommandMessageAndExecuteAction(props.clientCommandEntity.messageId)}>\r\n {clientCommandShowInfo && props.clientCommandEntity.params.message} \r\n \r\n \r\n \r\n \r\n \r\n {applyDepcrecatedGoogleReviewsTemplate(props.accountEntity.dateCreated) === true ? :}\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst shouldExecuteClientCommand = (clientCommandEntity: ClientCommand | undefined, clientCommandType: ClientCommandTypes): boolean => {\r\n if (!clientCommandEntity) {\r\n return false;\r\n }\r\n\r\n // Have we already executed this message? If yes, don't show it again.\r\n const existingMessageId = getLastClientCommandMessageId();\r\n if (existingMessageId !== null && existingMessageId === clientCommandEntity?.messageId) {\r\n return false;\r\n }\r\n\r\n // Finally, if the requested command matches the incoming command then execute\r\n return (clientCommandEntity.clientCommand === clientCommandType);\r\n}\r\n\r\nconst dismissClientCommandMessageAndExecuteAction = (messageId: string, action: Function | undefined = undefined) => {\r\n saveLastClientCommandMessageId(messageId);\r\n if (action) {\r\n action();\r\n }\r\n}\r\n\r\nconst mapStateToProps = (state) => {\r\n return {\r\n error: state.account.error,\r\n clientCommandEntity: state.clientCommand.clientCommandEntity,\r\n accountEntity: state.account.accountEntity\r\n }\r\n};\r\n\r\nexport default connect(mapStateToProps, null)(App);\r\n","// In production, we register a service worker to serve assets from local cache.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on the \"N+1\" visit to a page, since previously\r\n// cached resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\r\n// This link also includes instructions on opting out of this behavior.\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.1/8 is considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport default function register() {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const url = process.env.PUBLIC_URL as string;\r\n const publicUrl = new URL(url, window.location.toString());\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Lets check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl);\r\n } else {\r\n // Is not local host. Just register service worker\r\n registerValidSW(swUrl);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl: string) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing as ServiceWorker;\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the old content will have been purged and\r\n // the fresh content will have been added to the cache.\r\n // It's the perfect time to display a \"New content is\r\n // available; please refresh.\" message in your web app.\r\n console.log('New content is available; please refresh.');\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl: string) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl)\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (response.status === 404 || (contentType && contentType.indexOf('javascript') === -1)) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl);\r\n }\r\n })\r\n .catch(() => {\r\n console.log('No internet connection found. App is running in offline mode.');\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister();\r\n });\r\n }\r\n}\r\n","import 'bootstrap/dist/css/bootstrap.css';\r\nimport * as React from 'react';\r\nimport * as ReactDOM from 'react-dom';\r\nimport { Provider } from 'react-redux';\r\nimport { ConnectedRouter } from 'connected-react-router';\r\nimport { createBrowserHistory } from 'history';\r\nimport { authenticate } from './authProvider';\r\nimport configureStore from './store/configureStore';\r\nimport App from './App';\r\nimport registerServiceWorker from './registerServiceWorker';\r\nimport * as account from './store/account.store';\r\nimport * as clientCommand from './store/client-command.store';\r\n\r\n\r\n// Create browser history to use in the Redux store\r\nconst baseUrl = document.getElementsByTagName('base')[0].getAttribute('href') as string;\r\nconst history = createBrowserHistory({ basename: baseUrl });\r\n\r\n// Get the application-wide store instance, prepopulating with state from the server where available.\r\nconst store = configureStore(history);\r\n\r\nconst pollForClientCommands = () => {\r\n clientCommand.actionCreators.getClientCommand()(store.dispatch, store.getState);\r\n}\r\n\r\nauthenticate(() => {\r\n ReactDOM.render(\r\n \r\n \r\n \r\n \r\n ,\r\n document.getElementById('root'));\r\n\r\n account.actionCreators.submitAccount()(store.dispatch, store.getState);\r\n setInterval(pollForClientCommands, 7200000); // Every two hours 7200000 (1 hour = 3,600,000 ms)\r\n registerServiceWorker();\r\n});\r\n","// The current application coordinates were pre-registered in a B2C tenant.\r\nexport default {\r\n b2cScopes: [\"https://tribely.onmicrosoft.com/003db36e-616e-4a8f-a7e6-c23d13244ff6/Messages.Send\"],\r\n webApi: \"https://tribely.onmicrosoft.com/003db36e-616e-4a8f-a7e6-c23d13244ff6\"\r\n};","// Enter here the user flows and custom policies for your B2C application\r\n// To learn more about user flows, visit https://docs.microsoft.com/en-us/azure/active-directory-b2c/user-flow-overview\r\n// To learn more about custom policies, visit https://docs.microsoft.com/en-us/azure/active-directory-b2c/custom-policy-overview\r\n\r\nexport const b2cPolicies = {\r\n names: {\r\n signUpSignIn: \"B2C_1_TRIBELY_SUSI\",\r\n signUp: \"B2C_1_TRIBELY_SU\",\r\n forgotPassword: \"B2C_1_TRIBELY_RESET\"\r\n },\r\n authorities: {\r\n signUpSignIn: {\r\n authority: \"https://tribely.b2clogin.com/tribely.onmicrosoft.com/B2C_1_TRIBELY_SUSI\",\r\n },\r\n signUp: {\r\n authority: \"https://tribely.b2clogin.com/tribely.onmicrosoft.com/B2C_1_TRIBELY_SU\",\r\n },\r\n forgotPassword: {\r\n authority: \"https://tribely.b2clogin.com/tribely.onmicrosoft.com/B2C_1_TRIBELY_RESET\",\r\n },\r\n },\r\n}","import apiConfig from './apiConfig';\r\nimport { b2cPolicies } from './policies';\r\nimport { APP_ID } from '../configs';\r\n\r\n/**\r\n * Config object to be passed to MSAL on creation.\r\n * For a full list of msal.js configuration parameters, \r\n * visit https://azuread.github.io/microsoft-authentication-library-for-js/docs/msal/modules/_configuration_.html\r\n * */\r\nexport const msalConfig = {\r\n auth: {\r\n clientId: APP_ID,\r\n authority: b2cPolicies.authorities.signUpSignIn.authority,\r\n validateAuthority: false\r\n },\r\n cache: {\r\n cacheLocation: 'localStorage', // This configures where your cache will be stored\r\n storeAuthStateInCookie: false // Set this to \"true\" to save cache in cookies to address trusted zones limitations in IE (see: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/Known-issues-on-IE-and-Edge-Browser)\r\n }\r\n};\r\n\r\nexport const msalConfigSignUpOnly = {\r\n auth: {\r\n clientId: APP_ID,\r\n authority: b2cPolicies.authorities.signUp.authority,\r\n validateAuthority: false\r\n },\r\n cache: {\r\n cacheLocation: 'localStorage', // This configures where your cache will be stored\r\n storeAuthStateInCookie: false // Set this to \"true\" to save cache in cookies to address trusted zones limitations in IE (see: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/Known-issues-on-IE-and-Edge-Browser)\r\n }\r\n};\r\n\r\n/** \r\n * Scopes you enter here will be consented once you authenticate. For a full list of available authentication parameters, \r\n * visit https://azuread.github.io/microsoft-authentication-library-for-js/docs/msal/modules/_authenticationparameters_.html\r\n */\r\nexport const loginRequest = {\r\n scopes: ['openid', 'profile'],\r\n};\r\n\r\n// Add here scopes for access token to be used at the API endpoints.\r\nexport const tokenRequest = {\r\n scopes: apiConfig.b2cScopes, // e.g. [\"https://fabrikamb2c.onmicrosoft.com/helloapi/demo.read\"]\r\n};\r\n","// helper function to access the resource with the token\r\nexport const callApiWithAccessToken = (endpoint, token) => {\r\n const headers = new Headers();\r\n const bearer = `Bearer ${token}`;\r\n\r\n headers.append(\"Authorization\", bearer);\r\n\r\n const options = {\r\n method: \"GET\",\r\n headers: headers\r\n };\r\n\r\n //fetch(endpoint, options)\r\n // .then(response => response.json())\r\n // .then(response => {\r\n // }).catch(error => {\r\n // });\r\n}","import * as Msal from 'msal';\r\nimport apiConfig from './apiConfig';\r\nimport { msalConfig, msalConfigSignUpOnly, tokenRequest, loginRequest } from './authConfig';\r\nimport { b2cPolicies } from './policies'\r\nimport { callApiWithAccessToken } from './api';\r\nimport { getUrlHash } from '../utils';\r\n\r\n// Create the main myMSALObj instance\r\n// configuration parameters are located at authConfig.js\r\nlet authPolicy = msalConfig;\r\nif (getUrlHash() === 'signup') {\r\n authPolicy = msalConfigSignUpOnly;\r\n}\r\n\r\nconst msalUserAgent = new Msal.UserAgentApplication(authPolicy);\r\n\r\n\r\nexport const getUserAccount = () => msalUserAgent.getAccount();\r\n\r\nlet accessToken;\r\nlet launchApp;\r\n\r\n// Register Callbacks for Redirect flow\r\nexport const initializeAuth = () => {\r\n msalUserAgent.handleRedirectCallback(authRedirectCallBack);\r\n}\r\n\r\nconst authRedirectCallBack = (error, response) => {\r\n // Error handling\r\n if (error) {\r\n console.log(error);\r\n\r\n // Check for forgot password error\r\n // Learn more about AAD error codes at https://docs.microsoft.com/en-us/azure/active-directory/develop/reference-aadsts-error-codes\r\n if (error.errorMessage.indexOf(\"AADB2C90118\") > -1) {\r\n try {\r\n // Password reset policy/authority\r\n msalUserAgent.loginRedirect(b2cPolicies.authorities.forgotPassword);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n } else {\r\n // We need to reject id tokens that were not issued with the default sign-in policy.\r\n // \"acr\" claim in the token tells us what policy is used (NOTE: for new policies (v2.0), use \"tfp\" instead of \"acr\")\r\n // To learn more about b2c tokens, visit https://docs.microsoft.com/en-us/azure/active-directory-b2c/tokens-overview\r\n if (response.tokenType === \"id_token\" && response.idToken.claims['acr'] !== b2cPolicies.names.signUpSignIn) {\r\n msalUserAgent.logout();\r\n window.alert(\"Password has been reset successfully. \\nPlease sign-in with your new password.\");\r\n } else if (response.tokenType === \"id_token\" && response.idToken.claims['acr'] === b2cPolicies.names.signUpSignIn) {\r\n console.log(\"id_token acquired at: \" + new Date().toString());\r\n\r\n if (msalUserAgent.getAccount()) {\r\n launchApp();\r\n }\r\n\r\n } else if (response.tokenType === \"access_token\") {\r\n console.log(\"access_token acquired at: \" + new Date().toString());\r\n accessToken = response.accessToken;\r\n if (accessToken) {\r\n try {\r\n callApiWithAccessToken(apiConfig.webApi, accessToken);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n } else {\r\n console.log(\"Token type is: \" + response.tokenType);\r\n }\r\n }\r\n}\r\n\r\nexport const signIn = (launchApp) => {\r\n launchApp = launchApp;\r\n msalUserAgent.loginRedirect(loginRequest);\r\n}\r\n\r\n// sign-out the user\r\nexport const logout = () => {\r\n // Removes all sessions, need to call AAD endpoint to do full logout\r\n msalUserAgent.logout();\r\n}\r\n\r\n// main method to get token with redirect flow\r\nexport const getTokenRedirect = (request) => {\r\n return msalUserAgent.acquireTokenSilent(request)\r\n .then((response) => {\r\n if (response.accessToken) {\r\n accessToken = response.accessToken;\r\n\r\n if (accessToken) {\r\n try {\r\n callApiWithAccessToken(apiConfig.webApi, accessToken);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n }\r\n }).catch(error => {\r\n console.log(\"Silent token acquisition fails. Acquiring token using redirect\");\r\n console.log(error);\r\n // fallback to interaction when silent call fails\r\n return msalUserAgent.acquireTokenRedirect(request);\r\n });\r\n}\r\n\r\n\r\n// calls the resource API with the token\r\nexport const passTokenToApi = () => {\r\n if (!accessToken) {\r\n getTokenRedirect(tokenRequest);\r\n } else {\r\n try {\r\n callApiWithAccessToken(apiConfig.webApi, accessToken);\r\n } catch (err) {\r\n console.log(err);\r\n }\r\n }\r\n}\r\n","import { CLIENT_COMMAND_LOCAL_STORAGE_KEY } from '../configs';\r\n\r\nexport const handleErrors = (response) => {\r\n if (!response.ok) {\r\n throw response;\r\n }\r\n\r\n return response;\r\n}\r\n\r\nexport const getLastClientCommandMessageId = ():string | null => {\r\n return window.localStorage.getItem(CLIENT_COMMAND_LOCAL_STORAGE_KEY);\r\n}\r\n\r\nexport const saveLastClientCommandMessageId = (messageId: string) => {\r\n window.localStorage.setItem(CLIENT_COMMAND_LOCAL_STORAGE_KEY, messageId);\r\n}\r\n\r\nexport const applyDepcrecatedGoogleReviewsTemplate = (dateAccountCreated: string): boolean => {\r\n\r\n var isOldAccount = new Date(dateAccountCreated) <= new Date('2020-10-10T00:00:00.0000000Z');\r\n\r\n return (isOldAccount);\r\n}\r\n\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar React = require(\"react\");\r\nvar Popover_1 = require(\"@material-ui/core/Popover\");\r\nvar Typography_1 = require(\"@material-ui/core/Typography\");\r\nvar HelpOutlineRounded_1 = require(\"@material-ui/icons/HelpOutlineRounded\");\r\nvar LearnMorePopover = function (props) {\r\n var _a = React.useState(null), anchor = _a[0], setAnchor = _a[1];\r\n var handleOpen = function (event) {\r\n setAnchor(event.currentTarget);\r\n };\r\n var handleClose = function () {\r\n setAnchor(null);\r\n };\r\n var open = Boolean(anchor);\r\n return (React.createElement(\"div\", { onMouseEnter: handleOpen },\r\n React.createElement(HelpOutlineRounded_1.default, { style: { float: \"right\", paddingRight: \"0px\" } }),\r\n React.createElement(Popover_1.default, { open: open, anchorEl: anchor, onClose: handleClose, anchorOrigin: {\r\n vertical: \"center\",\r\n horizontal: \"right\"\r\n }, transformOrigin: {\r\n vertical: \"top\",\r\n horizontal: \"left\"\r\n } },\r\n React.createElement(Typography_1.default, { style: { padding: \"20px\", maxWidth: \"300px\" } }, props.children)),\r\n React.createElement(\"div\", { style: { float: \"right\", paddingRight: \"5px\" } }, \"Learn More\")));\r\n};\r\nexports.default = LearnMorePopover;\r\n//# sourceMappingURL=LearnMorePopover.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar React = require(\"react\");\r\nvar Typography_1 = require(\"@material-ui/core/Typography\");\r\nvar Divider_1 = require(\"@material-ui/core/Divider\");\r\nvar react_number_format_1 = require(\"react-number-format\");\r\nvar Badge = function (props) {\r\n var _a, _b;\r\n var badgeWidth = 30;\r\n if (((_a = props.text) === null || _a === void 0 ? void 0 : _a.toString().length) !== undefined) {\r\n badgeWidth += ((((_b = props.text) === null || _b === void 0 ? void 0 : _b.toString().length) - 1) * 14);\r\n }\r\n return (React.createElement(\"div\", { style: { display: \"inline-flex\", justifyContent: \"center\", alignItems: \"center\", minWidth: \"20px\", width: badgeWidth + \"px\", height: \"30px\", borderRadius: \"100px\", color: \"white\", backgroundColor: \"#28a745\", fontSize: \"1.3rem\", fontWeight: 500 } },\r\n React.createElement(react_number_format_1.default, { value: props.text, thousandSeparator: true, displayType: 'text' })));\r\n};\r\nfunction PageHeading(props) {\r\n return (React.createElement(React.Fragment, null,\r\n React.createElement(Typography_1.default, { variant: \"h3\", gutterBottom: true, style: { paddingTop: \"1rem\", display: \"inline-flex\", alignItems: \"center\" } },\r\n props.titleIcon && React.createElement(props.titleIcon, { style: { transform: \"scale(1.9)\" } }),\r\n React.createElement(\"span\", { style: { paddingLeft: props.titleIcon ? \"15px\" : \"0px\" } }, props.title)),\r\n React.createElement(Divider_1.default, null),\r\n React.createElement(Typography_1.default, { style: { paddingTop: \"0.35em\", paddingBottom: props.noBottomPadding ? \"none\" : \"3rem\" }, color: \"textSecondary\", variant: \"h5\" },\r\n props.badgeText && React.createElement(Badge, { text: props.badgeText }),\r\n \" \",\r\n props.subtitle)));\r\n}\r\nexports.default = PageHeading;\r\n//# sourceMappingURL=PageHeading.js.map","import { Action, Reducer } from 'redux';\r\nimport { AppThunkAction } from './';\r\nimport { handleErrors } from './common-impl';\r\nimport { StateBase, ApiSubmitTypes } from './common-types';\r\nimport { QUERY_API_KEY, WRITE_API_KEY, BASE_API_URI, ERROR_GENERIC_MESSAGE, GOOGLE_PLACEID_API_URI, GOOGLE_PLACEID_API_KEY } from '../configs';\r\nimport * as auth from '../authProvider';\r\nimport { TargetPlatformId } from './message.store';\r\nimport { isEmpty, isEmptyObject } from '../utils';\r\n\r\n// -----------------\r\n// STATE - This defines the type of data maintained in the Redux store.\r\n\r\nenum MessageSettingsActionTypes {\r\n REQUEST_STARTED = \"MESSAGESETTINGS_REQUEST_STARTED\",\r\n REQUEST_SUCCEEDED = \"MESSAGESETTINGS_REQUEST_SUCCEEDED\",\r\n REQUEST_FAILED = \"MESSAGESETTINGS_REQUEST_FAILED\",\r\n REQUEST_GOOGLE_PLACEID_STARTED = \"MESSAGESETTINGS_REQUEST_GOOGLE_PLACEID_STARTED\",\r\n REQUEST_GOOGLE_PLACEID_SUCCEEDED = \"MESSAGESETTINGS_REQUEST_GOOGLE_PLACEID_SUCCEEDED\",\r\n REQUEST_GOOGLE_PLACEID_FAILED = \"MESSAGESETTINGS_REQUEST_GOOGLE_PLACEID_FAILED\",\r\n SUBMIT_STARTED = \"MESSAGESETTINGS_SUBMIT_STARTED\",\r\n SUBMIT_SUCCEEDED = \"MESSAGESETTINGS_SUBMIT_SUCCEEDED\",\r\n SUBMIT_FAILED = \"MESSAGESETTINGS_SUBMIT_FAILED\"\r\n}\r\n\r\nexport interface MessageSettingsState extends StateBase {\r\n messageSettingsEntity: MessageSettings;\r\n}\r\n\r\nexport interface MessageSettings {\r\n id: string | null,\r\n targetPlatforms: TargetPlatformSetting[],\r\n tenantId: string,\r\n type: string,\r\n userId: string,\r\n dateUpdated: string\r\n}\r\n\r\nexport interface TargetPlatformSetting {\r\n id: string,\r\n uri: string,\r\n shortName: string,\r\n googleBusinessName: string,\r\n googlePlaceId: string,\r\n googlePlaceIdAddress: string,\r\n messageBody: string,\r\n messageFooter: string,\r\n messageFooterLink: string\r\n}\r\n\r\n// -----------------\r\n// ACTIONS - These are serializable (hence replayable) descriptions of state transitions.\r\n// They do not themselves have any side-effects; they just describe something that is going to happen.\r\n\r\n// Fetch actions \r\ninterface MessageSettingsRequestStartedAction {\r\n type: MessageSettingsActionTypes.REQUEST_STARTED;\r\n}\r\n\r\ninterface MessageSettingsRequestSucceededAction {\r\n type: MessageSettingsActionTypes.REQUEST_SUCCEEDED;\r\n settings: MessageSettings;\r\n}\r\n\r\ninterface MessageSettingsRequestFailedAction {\r\n type: MessageSettingsActionTypes.REQUEST_FAILED;\r\n error: any;\r\n}\r\n\r\n\r\n// Submit actions\r\ninterface MessageSettingsSubmitStartedAction {\r\n type: MessageSettingsActionTypes.SUBMIT_STARTED;\r\n}\r\n\r\ninterface MessageSettingsSubmitSucceededAction {\r\n type: MessageSettingsActionTypes.SUBMIT_SUCCEEDED;\r\n settings: MessageSettings;\r\n}\r\n\r\ninterface MessageSettingsSubmitFailedAction {\r\n type: MessageSettingsActionTypes.SUBMIT_FAILED;\r\n error: any;\r\n}\r\n\r\n\r\n// Declare a 'discriminated union' type. This guarantees that all references to 'type' properties contain one of the\r\n// declared type strings (and not any other arbitrary string).\r\ntype KnownAction = MessageSettingsRequestStartedAction |\r\n MessageSettingsRequestSucceededAction |\r\n MessageSettingsRequestFailedAction |\r\n MessageSettingsSubmitStartedAction | \r\n MessageSettingsSubmitSucceededAction |\r\n MessageSettingsSubmitFailedAction;\r\n\r\n// ----------------\r\n// ACTION CREATORS - These are functions exposed to UI components that will trigger a state transition.\r\n// They don't directly mutate state, but they can have external side-effects (such as loading data).\r\n\r\nexport const actionCreators = {\r\n\r\n requestMessageSettings: (entryDateUpdated: string | undefined): AppThunkAction => (dispatch, getState) => {\r\n\r\n const appState = getState();\r\n if (appState && appState.messageSettings &&\r\n (!entryDateUpdated ||\r\n appState.messageSettings.messageSettingsEntity.dateUpdated !== entryDateUpdated)) {\r\n const tenantId: string = auth.getTenantId();\r\n dispatch({ type: MessageSettingsActionTypes.REQUEST_STARTED });\r\n\r\n fetch(`${BASE_API_URI}/settings/${tenantId}`,\r\n {\r\n 'headers': { 'x-api-key': QUERY_API_KEY },\r\n 'method': 'GET'\r\n })\r\n .then(handleErrors)\r\n .then(response => response.json() as Promise)\r\n .then(data => {\r\n if (isEmptyObject(data)) {\r\n data = BuildMessageSettings(tenantId, 'GMB');\r\n }\r\n dispatch({ type: MessageSettingsActionTypes.REQUEST_SUCCEEDED, settings: data });\r\n })\r\n .catch(error => {\r\n\r\n if (error.text) {\r\n error.text().then(errorText =>\r\n dispatch({\r\n type: MessageSettingsActionTypes.REQUEST_FAILED, error: errorText\r\n }));\r\n } else {\r\n dispatch({\r\n type: MessageSettingsActionTypes.REQUEST_FAILED, error: ERROR_GENERIC_MESSAGE\r\n });\r\n }\r\n });\r\n }\r\n },\r\n submitMessageSettings: (values: TargetPlatformSetting): AppThunkAction => (dispatch, getState) => {\r\n\r\n const appState = getState();\r\n\r\n if (appState && appState.messageSettings) {\r\n const messageSettings = { ...appState.messageSettings.messageSettingsEntity };\r\n messageSettings.userId = auth.getEmail();\r\n messageSettings.tenantId = auth.getTenantId();\r\n messageSettings.type = ApiSubmitTypes.SETTINGS;\r\n\r\n const targetPlatformIdx = (messageSettings.targetPlatforms).findIndex((item) => item.id === values.id);\r\n\r\n messageSettings.targetPlatforms[targetPlatformIdx] = values;\r\n\r\n // Always update the google uri unless it's the deprecated g.page, then keep it for old customers of GMB with shorname\r\n messageSettings.targetPlatforms[targetPlatformIdx].uri = isEmpty(values.uri) || !values.uri.startsWith('https://g.page') ? `https://search.google.com/local/writereview?placeid=${values.googlePlaceId}` : values.uri;\r\n \r\n dispatch({ type: MessageSettingsActionTypes.SUBMIT_STARTED });\r\n\r\n fetch(`${BASE_API_URI}/settings`,\r\n {\r\n 'headers': {\r\n 'x-api-key': WRITE_API_KEY,\r\n 'Content-Type': 'application/json'},\r\n 'method': 'POST',\r\n 'body': JSON.stringify(messageSettings)\r\n })\r\n .then(handleErrors)\r\n .then(response => response.json() as Promise)\r\n .then(responseData => {\r\n dispatch({ type: MessageSettingsActionTypes.SUBMIT_SUCCEEDED, settings: responseData });\r\n })\r\n .catch(error => {\r\n\r\n if (error.text) {\r\n error.text().then(errorText =>\r\n dispatch({\r\n type: MessageSettingsActionTypes.SUBMIT_FAILED, error: errorText\r\n }));\r\n } else {\r\n dispatch({\r\n type: MessageSettingsActionTypes.SUBMIT_FAILED, error: ERROR_GENERIC_MESSAGE\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n};\r\n\r\nconst BuildMessageSettings = (tenantId: string, targetPlatformId: TargetPlatformId): MessageSettings => {\r\n const targetPlatforms: Array = [\r\n {\r\n id: targetPlatformId,\r\n uri: '',\r\n shortName: '',\r\n googleBusinessName: '',\r\n googlePlaceId: '',\r\n googlePlaceIdAddress: '',\r\n messageBody: '',\r\n messageFooter: '',\r\n messageFooterLink: ''\r\n }\r\n ];\r\n\r\n return {\r\n id: null,\r\n targetPlatforms: targetPlatforms,\r\n tenantId: tenantId,\r\n type: ApiSubmitTypes.SETTINGS,\r\n userId: '',\r\n dateUpdated: ''\r\n };\r\n};\r\n\r\n// ----------------\r\n// REDUCER - For a given state and action, returns the new state. To support time travel, this must not mutate the old state.\r\n\r\nconst unloadedState: MessageSettingsState = {\r\n isLoading: false,\r\n messageSettingsEntity: {},\r\n error: null\r\n};\r\n\r\nexport const reducer: Reducer = (state: MessageSettingsState | undefined, incomingAction: Action): MessageSettingsState => {\r\n if (state === undefined) {\r\n return unloadedState;\r\n }\r\n\r\n const action = incomingAction as KnownAction;\r\n switch (action.type) {\r\n case MessageSettingsActionTypes.REQUEST_STARTED:\r\n return {\r\n isLoading: true,\r\n messageSettingsEntity: state.messageSettingsEntity,\r\n error: null\r\n };\r\n case MessageSettingsActionTypes.REQUEST_SUCCEEDED:\r\n return {\r\n isLoading: false,\r\n messageSettingsEntity: action.settings,\r\n error: null\r\n };\r\n case MessageSettingsActionTypes.REQUEST_FAILED:\r\n return {\r\n isLoading: false,\r\n messageSettingsEntity: state.messageSettingsEntity,\r\n error: action.error\r\n };\r\n case MessageSettingsActionTypes.SUBMIT_STARTED:\r\n return {\r\n isLoading: true,\r\n messageSettingsEntity: state.messageSettingsEntity,\r\n error: null\r\n };\r\n case MessageSettingsActionTypes.SUBMIT_SUCCEEDED:\r\n return {\r\n isLoading: false,\r\n messageSettingsEntity: action.settings,\r\n error: null\r\n };\r\n case MessageSettingsActionTypes.SUBMIT_FAILED:\r\n return {\r\n isLoading: false,\r\n messageSettingsEntity: state.messageSettingsEntity,\r\n error: action.error\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar React = require(\"react\");\r\nvar Backdrop_1 = require(\"@material-ui/core/Backdrop\");\r\nvar CircularProgress_1 = require(\"@material-ui/core/CircularProgress\");\r\nvar styles_1 = require(\"@material-ui/core/styles\");\r\nvar useStyles = styles_1.makeStyles(function (theme) { return ({\r\n backdrop: {\r\n zIndex: 1,\r\n color: '#fff',\r\n },\r\n}); });\r\nvar LoadingBackdrop = function (props) {\r\n var classes = useStyles();\r\n return (React.createElement(Backdrop_1.default, { className: classes.backdrop, open: props.open },\r\n React.createElement(CircularProgress_1.default, { color: \"inherit\" })));\r\n};\r\nexports.default = LoadingBackdrop;\r\n//# sourceMappingURL=LoadingBackdrop.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar React = require(\"react\");\r\nrequire(\"./QuickLinks.css\");\r\nvar react_router_dom_1 = require(\"react-router-dom\");\r\nvar Link_1 = require(\"@material-ui/core/Link\");\r\nvar configs_1 = require(\"../configs\");\r\nvar configs_2 = require(\"../configs\");\r\nvar Typography_1 = require(\"@material-ui/core/Typography\");\r\nvar QuickLinkSplitter = function (props) {\r\n return (React.createElement(\"span\", { style: { color: \"#1976d2\", paddingLeft: \"15px\", paddingRight: \"15px\", height: \"20px\", marginBottom: props.smallScreen ? \"\" : \"10px\", marginTop: props.smallScreen ? \"15px\" : \"\" } }, \"|\"));\r\n};\r\nexports.default = (function (props) {\r\n var links = [];\r\n var smallScreen = window.screen.width < 768;\r\n for (var i = 0; i < props.pageNames.length; i++) {\r\n var icon = configs_1.pageIcons[props.pageNames[i]];\r\n links.push(React.createElement(\"span\", { key: i, style: { display: \"inline-flex\", alignItems: \"center\", paddingBottom: smallScreen ? \"40px\" : \"0\" } },\r\n React.createElement(Link_1.default, { component: react_router_dom_1.Link, to: configs_2.componentPaths[props.pageNames[i]], style: { color: \"#1976d2\", paddingTop: smallScreen ? \"20px\" : \"0\" } },\r\n React.createElement(Typography_1.default, { className: \"quickLinkText\", variant: \"body1\", style: { display: \"inline-block\" } },\r\n React.createElement(icon, { style: { marginBottom: \"3px\" } }, \"\"),\r\n props.linkLabels[i])),\r\n (i + 1) < props.pageNames.length && React.createElement(QuickLinkSplitter, { smallScreen: smallScreen })));\r\n }\r\n return (React.createElement(\"div\", { style: { display: \"inline-flex\", alignItems: \"center\", float: \"right\" } },\r\n React.createElement(Typography_1.default, { variant: \"body1\", style: { paddingRight: \"15px\", paddingTop: smallScreen ? \"20px\" : \"0\", paddingBottom: smallScreen ? \"40px\" : \"0\" } }, \"Quick Links:\"),\r\n \" \",\r\n links));\r\n});\r\n//links.push(\r\n//
\r\n// {props.quickLinks[i].linkLabel}\r\n//
\r\n//)\r\n{ /*\r\n
\r\n \r\n {links}\r\n \r\n )\r\n }}\r\n />\r\n
\r\n
\r\n */\r\n}\r\n//# sourceMappingURL=QuickLinks.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.reducer = exports.actionCreators = exports.ClientCommandTypes = exports.ClientCommandActionTypes = void 0;\r\nvar common_impl_1 = require(\"./common-impl\");\r\nvar configs_1 = require(\"../configs\");\r\nvar auth = require(\"../authProvider\");\r\nvar ClientCommandActionTypes;\r\n(function (ClientCommandActionTypes) {\r\n ClientCommandActionTypes[\"CLIENT_COMMAND_POLL_STARTED\"] = \"CLIENT_COMMAND_POLL_STARTED\";\r\n ClientCommandActionTypes[\"CLIENT_COMMAND_POLL_SUCCEEDED\"] = \"CLIENT_COMMAND_POLL_SUCCEEDED\";\r\n ClientCommandActionTypes[\"CLIENT_COMMAND_POLL_FAILED\"] = \"CLIENT_COMMAND_POLL_FAILED\";\r\n})(ClientCommandActionTypes = exports.ClientCommandActionTypes || (exports.ClientCommandActionTypes = {}));\r\nvar ClientCommandTypes;\r\n(function (ClientCommandTypes) {\r\n ClientCommandTypes[\"PROMPT_REFRESH\"] = \"PROMPT_REFRESH\";\r\n ClientCommandTypes[\"REFRESH_SILENT\"] = \"REFRESH_SILENT\";\r\n ClientCommandTypes[\"SHOW_INFO\"] = \"SHOW_INFO\";\r\n ClientCommandTypes[\"SHOW_WARNING\"] = \"SHOW_WARNING\";\r\n ClientCommandTypes[\"LOGOUT\"] = \"LOGOUT\";\r\n})(ClientCommandTypes = exports.ClientCommandTypes || (exports.ClientCommandTypes = {}));\r\nexports.actionCreators = {\r\n getClientCommand: function () { return function (dispatch, getState) {\r\n var tenantId = auth.getTenantId();\r\n dispatch({ type: ClientCommandActionTypes.CLIENT_COMMAND_POLL_STARTED });\r\n fetch(configs_1.BASE_API_URI + \"/client-commands/\" + tenantId, {\r\n 'headers': {\r\n 'x-api-key': configs_1.QUERY_API_KEY\r\n },\r\n 'method': 'GET'\r\n })\r\n .then(common_impl_1.handleErrors)\r\n .then(function (response) { return response.json(); })\r\n .then(function (result) {\r\n dispatch({ type: ClientCommandActionTypes.CLIENT_COMMAND_POLL_SUCCEEDED, clientCommand: result });\r\n })\r\n .catch(function (error) {\r\n if (error.text) {\r\n error.text().then(function (errorText) {\r\n return dispatch({\r\n type: ClientCommandActionTypes.CLIENT_COMMAND_POLL_FAILED, error: errorText\r\n });\r\n });\r\n }\r\n else {\r\n dispatch({\r\n type: ClientCommandActionTypes.CLIENT_COMMAND_POLL_FAILED, error: configs_1.ERROR_GENERIC_MESSAGE\r\n });\r\n }\r\n });\r\n }; }\r\n};\r\n// ----------------\r\n// REDUCER - For a given state and action, returns the new state. To support time travel, this must not mutate the old state.\r\nvar unloadedState = {\r\n isLoading: false,\r\n error: null,\r\n clientCommandEntity: {}\r\n};\r\nvar reducer = function (state, incomingAction) {\r\n if (state === undefined) {\r\n return unloadedState;\r\n }\r\n var action = incomingAction;\r\n switch (action.type) {\r\n case ClientCommandActionTypes.CLIENT_COMMAND_POLL_STARTED:\r\n return {\r\n isLoading: true,\r\n clientCommandEntity: state.clientCommandEntity,\r\n error: null\r\n };\r\n case ClientCommandActionTypes.CLIENT_COMMAND_POLL_SUCCEEDED:\r\n return {\r\n isLoading: false,\r\n clientCommandEntity: action.clientCommand,\r\n error: null\r\n };\r\n case ClientCommandActionTypes.CLIENT_COMMAND_POLL_FAILED:\r\n return {\r\n isLoading: false,\r\n clientCommandEntity: state.clientCommandEntity,\r\n error: action.error\r\n };\r\n default:\r\n return state;\r\n }\r\n};\r\nexports.reducer = reducer;\r\n//# sourceMappingURL=client-command.store.js.map"],"sourceRoot":""}