{"version":3,"sources":["../node_modules/@ionic/core/dist/esm-es5 lazy /^/.//.*/.entry/.js$/ groupOptions: {} namespace object","../node_modules/ionicons/dist/esm-es5 lazy /^/.//.*/.entry/.js$/ groupOptions: {} namespace object","app/ticketsCore.ts","app/hooks.ts","features/CommonActions/SettingsAndStorageActions.ts","app/Services/StringFunctions.ts","features/Events/LargeCard.tsx","data/user/tickets-auth-api.ts","app/Services/ArrayFunctions.ts","features/Events/EventList.tsx","data/user/tickets-http-requests.ts","app/ticketsCore.Tooling.ts","features/Events/useEventHeaderDataComponent.tsx","app/environmentFunctions.ts","features/Login/LoginSlice.ts","features/Login/LoadingShortStateIndicator.tsx","features/Login/UseIsLoggedIn.tsx","features/Login/LoginPage.tsx","app/ticketsCore.pageSettings.ts","features/Settings/SettingsPage.tsx","features/Checkin/CheckinScanner.tsx","features/Home/HomePage.tsx","features/CompanySeletions/CompanySelectPage.tsx","features/EventScanner/EventScannerPage.tsx","features/Login/Logout.tsx","components/Menu.tsx","features/Settings/settingsSlice.ts","features/Checkin/CheckInCard2.tsx","features/Checkin/CheckInList.tsx","features/Checkin/CheckInPage.tsx","features/Checkin/EventSalesDetails.tsx","pages/Page.tsx","Routes.tsx","app/startup.ts","features/Storage/storageSlice.ts","App.tsx","serviceWorkerRegistration.ts","reportWebVitals.ts","features/LearningReactPatterns/PingPong/PingPongSlice.ts","features/LearningReactPatterns/Counter/counterAPI.ts","features/LearningReactPatterns/Counter/counterSlice.ts","app/store.ts","index.tsx"],"names":["map","webpackAsyncContext","req","__webpack_require__","o","Promise","resolve","then","e","Error","code","ids","id","keys","Object","module","exports","LoggedInStatus","useAppDispatch","useDispatch","useAppSelector","useSelector","stateRetrievedFromStorage","createAction","setEnvironment","setCompanyId","setDarkMode","processUserDetailsFromServer","storageKey","Singleton","storage","prefixImageHttps","source","substr","LargeCard","event","history","useHistory","className","onClick","push","src","thumbnailUrl","replace","role","formattedStartDate","eventName","ticketCount","onRejected","r","response","status","statusText","message","AxiosRequest$","environmentSettings","p","f","dispatch","Observable","s","api","TicketsAPI","isRight","next","right","complete","left","error","isSome","value","userData","none","environment","axiosCancellationSource","cancel","axiosConfig","TCExample","httpCode","TE","axios","get","this","CancelToken","proxy","pipe","O","x","headers","bearerToken","Authorization","selectedCompany","CompanyId","cancelToken","token","defaults","adapter","require","EventPageModes","GetBearerTokenWithDetail","baseUrl","shortCode","historicEmails","paramName","undefined","length","ArrayEmpty","join","data","SearchEventHeaders","post","GetTicketTypeIds","eventId","SearchTickets","CheckInTicket","ticketId","checkedIn","GetCheckinOrderFromOrderNumber","orderNumber","GetCheckinOrderFromQrCode","qrCode","GetTicketsCheckedIn","EventList","activeEnvironment","searchMode","All","showActive","showArchived","Current","useState","segment","setSegment","searchParams","settingsSlice","mode","requestPayload","setRequestPayload","lastPageLoaded","setLastPageLoaded","isLoading","setIsLoading","allLoaded","setAllLoaded","setError","responseEventHeaders","setResponseEventHeaders","content","useRef","eventPage","PageSettings","PageName","events","params","useEffect","sub","some","subscribe","pageSize","pageIndex","unsubscribe","useEventHeaderData","reset","trackScrollInternal","debounce","a","elem","current","getScrollElement","scrollElement","scrollPosition","detail","scrollTop","totalContentHeight","scrollHeight","viewportHeight","getBoundingClientRect","top","offsetHeight","onIonChange","e2","Archived","searchTerm","searchText","ref","scrollEvents","onIonScroll","collapse","size","title","type","EnvironmentFunctions","Environment","shortCodeLoadingStates","initialEnvironment","production","defaultEnvironment","local","fromNullable","handleSelfSignedCerts","GetEnvironmentSettings","development","localFiddler","port","host","MergeEnvironmentWithUserData","state","selectedCompanies","pd","initialState","userDetails","selectedCompaniesPerEnvironment","activeUserDetails","shortCodeLoadingState","notLoading","loginSessionId","uuidv4","developerModeEnabled","companyCountForUser","recentlyTriedEmails","LoginSlice","createSlice","name","reducers","tapLogoForSecretCode","action","toggleDeveloperMode","requestShortCodeToEmail","maxLength","t","Proxy","set","target","property","receiver","isNaN","parseInt","find","payload","unshift","processShortCode","finishedProcessShortCode","startProcessShortCode","loading","extraReducers","builder","addCase","console","log","fptspipe","ud","companyDetails","companyId","env","isNone","actions","epics","action$","state$","ofType","filter","switchMap","loginSlice","mergeMap","i","catchError","rxjs","startWith","endWith","bufferToggle","interval","raceWith","bufferCount","tapsToTrigger","mapTo","LoadingShortStateIndicator","useIsLoggedIn","LoginLabel","forwardRef","props","visible","_setVisible","text","_setText","useImperativeHandle","setVisible","setText","color","selectOptions","CheckInScannerPageMode","defaultSecurePage","isSecure","showIfLoggedOn","showIfNotLoggedOn","defaultPageTemplate","developerModeOnly","optionalDisplayFunction","defaultUnsecuredPage","login","pageName","$Template","isLoggedIn","useIonToast","toastPresent","toastDismiss","requestingEmail","setRequestingEmail","setShortCode","emailErrorLabel","shortTokenErrorLabel","activeApi","isDeveloperMode","recentEmailsArray","recentEmails","emailCapturedText","BehaviorSubject","b","shortCodeCapturedText","requestEmail","emailState","emailAddress","email","test","d","buttons","handler","onDidDismiss","onWillDismiss","duration","catch","finally","to","class","lines","position","spellCheck","autocapitalize","expand","disabled","url","iosIcon","key","mdIcon","settings","slot","icon","airplane","interfaceOptions","$enum","toString","cog","home","selectCompany","forceRedirect","setforceRedirect","companies","companyName","briefcase","eventScanner","result","setResult","format","setFormat","setCancelled","showScanner","setShowScanner","window","cordova","plugins","barcodeScanner","scan","cancelled","err","showFlipCameraButton","showTorchButton","torchOn","saveHistory","prompt","resultDisplayDuration","orientation","disableAnimations","disableSuccessBeep","Logout","menuController","confirmMode","setConfirmMode","exit","fill","close","happy","LoggedInEmailComponent","SelectedCompanyComponent","x2","Menu","location","useLocation","darkMode","companyCount","getConfig","isDarkModeEnabled","renderCheckProp","toggleDarkMode","contentId","index","pathname","routerLink","routerDirection","ios","md","moonOutline","checked","selectedEnvironment","setPhoneMode","ap","CheckInCard2","person","isCheckedIn","setIsCheckedIn","style","margin","displayString","ticketNumber","ticketCancelled","checkboxOutline","squareOutline","ticketTypeName","CheckInList","includePeopleCheckedIn","setIncludePeopleCheckedIn","searchOnNameOnly","showCheckedIn","showNotCheckedIn","ticketTypeIds","toggleShowCheckiedIn","_","ticketTypeId","people","CheckInPageModes","OrderNumberErrorLabel","CheckInScanner","globalError","setGlobalError","orderModel","setOrderModel","setOrderNumber","orderNumberErrorLabel","scannerResult","setScannerResult","setScannerWasCancelled","checkOrderForErrors","model","errorMessage","trim","ShowingOrder","NotShowingOrder","defaultPerson","rowNumber","emailOnOrder","check","width","search","tickets","EventSalesDetails","setTime","ticketsCheckedInModel","setTicketsCheckedInModel","now","Date","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","startDate","sum","items","notCheckedIn","CheckInPage","Scan","arrowBackCircle","Search","Details","Page","pageSettings","ps","fullscreen","Routes","animation","baseEl","opts","enteringAnimation","createAnimation","addElement","enteringEl","fromTo","leavingAnimation","leavingEl","addAnimation","path","exact","render","match","appPage","k","currentDbVersion","clear","Storage","driverOrder","CordovaSQLiteDriver","Drivers","IndexedDB","LocalStorage","create","storageInitialised","savingState","loadingState","storageSlice","storageError","stateSaved","stateLoaded","flushStateToStorage","loadStateFromStorage","mergeMapTo","from","core","messages","App","matchMedia","addListener","mediaQuery","document","body","classList","toggle","toggleDarkTheme","matches","RunSetup","ClearDataBaseOnToken","Boolean","hostname","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","delayTime","pingSlice","isStarted","count","setPing","setPong","tap","delay","fetchCount","amount","setTimeout","incrementAsync","createAsyncThunk","counterSlice","counterValue","increment","decrement","incrementByAmount","pending","fulfilled","rejected","rxjsEpicMiddleware","createEpicMiddleware","store","configureStore","reducer","pingPong","StorageSlice","devTools","middleware","getDefaultMiddleware","concat","rootEpic","combineEpics","pingPongEpics","loginEpics","storageEpics","run","ReactDOM","StrictMode","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"2GAAA,IAAIA,EAAM,CACT,8BAA+B,CAC9B,IACA,GAED,uBAAwB,CACvB,IACA,GAED,uBAAwB,CACvB,IACA,GAED,0BAA2B,CAC1B,IACA,IAED,6BA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KhB,GAAoD4f,GAAajT,QAmBzDiT,IAnBR,GAAQE,UAAR,GAAmBC,UAAnB,GAA8BC,kBAmBtBJ,GAAf,SC1EMQ,GAAqBC,eAGdC,GAAQC,YAAe,CAChCC,QAAS,CACLtb,cAAgBA,GAChBub,SAAUzB,GACVY,aAAcA,GACd1S,WAAa1C,GACbuS,aAAe2D,IAEnBC,UAAgD,EAChDC,WAAY,SAAAC,GAOR,OALaA,IAAuBC,OAAOV,OAqB5C,IAAMW,GAAWC,KAAY,WAAZ,cAEhBC,IAFgB,mBAGhBC,IAHgB,YAIhBC,MAERf,GAAmBgB,IAAIL,IC3CvBM,IAAStF,OACP,cAAC,IAAMuF,WAAP,UACI,cAAC,IAAD,CAAUhB,MAAOA,GAAjB,SACA,cAAC,GAAD,QAGJzC,SAAS0D,eAAe,SNsHpB,kBAAmBC,WACrBA,UAAUC,cAAcC,MACrBtkB,MAAK,SAACukB,GACLA,EAAaC,gBAEdvQ,OAAM,SAACpQ,GACNkL,QAAQlL,MAAMA,EAAMf,YMjH5Bqe,O","file":"static/js/main.99ab18fe.chunk.js","sourcesContent":["var map = {\n\t\"./ion-action-sheet.entry.js\": [\n\t\t178,\n\t\t5\n\t],\n\t\"./ion-alert.entry.js\": [\n\t\t179,\n\t\t6\n\t],\n\t\"./ion-app_8.entry.js\": [\n\t\t180,\n\t\t7\n\t],\n\t\"./ion-avatar_3.entry.js\": [\n\t\t181,\n\t\t17\n\t],\n\t\"./ion-back-button.entry.js\": [\n\t\t182,\n\t\t18\n\t],\n\t\"./ion-backdrop.entry.js\": [\n\t\t183,\n\t\t43\n\t],\n\t\"./ion-button_2.entry.js\": [\n\t\t184,\n\t\t19\n\t],\n\t\"./ion-card_5.entry.js\": [\n\t\t185,\n\t\t20\n\t],\n\t\"./ion-checkbox.entry.js\": [\n\t\t186,\n\t\t21\n\t],\n\t\"./ion-chip.entry.js\": [\n\t\t187,\n\t\t22\n\t],\n\t\"./ion-col_3.entry.js\": [\n\t\t188,\n\t\t44\n\t],\n\t\"./ion-datetime_3.entry.js\": [\n\t\t189,\n\t\t10\n\t],\n\t\"./ion-fab_3.entry.js\": [\n\t\t190,\n\t\t23\n\t],\n\t\"./ion-img.entry.js\": [\n\t\t191,\n\t\t45\n\t],\n\t\"./ion-infinite-scroll_2.entry.js\": [\n\t\t192,\n\t\t46\n\t],\n\t\"./ion-input.entry.js\": [\n\t\t193,\n\t\t24\n\t],\n\t\"./ion-item-option_3.entry.js\": [\n\t\t194,\n\t\t25\n\t],\n\t\"./ion-item_8.entry.js\": [\n\t\t195,\n\t\t26\n\t],\n\t\"./ion-loading.entry.js\": [\n\t\t196,\n\t\t27\n\t],\n\t\"./ion-menu_3.entry.js\": [\n\t\t197,\n\t\t28\n\t],\n\t\"./ion-modal.entry.js\": [\n\t\t198,\n\t\t8\n\t],\n\t\"./ion-nav_2.entry.js\": [\n\t\t199,\n\t\t14\n\t],\n\t\"./ion-popover.entry.js\": [\n\t\t200,\n\t\t9\n\t],\n\t\"./ion-progress-bar.entry.js\": [\n\t\t201,\n\t\t29\n\t],\n\t\"./ion-radio_2.entry.js\": [\n\t\t202,\n\t\t30\n\t],\n\t\"./ion-range.entry.js\": [\n\t\t203,\n\t\t31\n\t],\n\t\"./ion-refresher_2.entry.js\": [\n\t\t204,\n\t\t11\n\t],\n\t\"./ion-reorder_2.entry.js\": [\n\t\t205,\n\t\t16\n\t],\n\t\"./ion-ripple-effect.entry.js\": [\n\t\t206,\n\t\t47\n\t],\n\t\"./ion-route_4.entry.js\": [\n\t\t207,\n\t\t32\n\t],\n\t\"./ion-searchbar.entry.js\": [\n\t\t208,\n\t\t33\n\t],\n\t\"./ion-segment_2.entry.js\": [\n\t\t209,\n\t\t34\n\t],\n\t\"./ion-select_3.entry.js\": [\n\t\t210,\n\t\t35\n\t],\n\t\"./ion-slide_2.entry.js\": [\n\t\t211,\n\t\t48\n\t],\n\t\"./ion-spinner.entry.js\": [\n\t\t212,\n\t\t13\n\t],\n\t\"./ion-split-pane.entry.js\": [\n\t\t213,\n\t\t49\n\t],\n\t\"./ion-tab-bar_2.entry.js\": [\n\t\t214,\n\t\t36\n\t],\n\t\"./ion-tab_2.entry.js\": [\n\t\t215,\n\t\t15\n\t],\n\t\"./ion-text.entry.js\": [\n\t\t216,\n\t\t37\n\t],\n\t\"./ion-textarea.entry.js\": [\n\t\t217,\n\t\t38\n\t],\n\t\"./ion-toast.entry.js\": [\n\t\t218,\n\t\t39\n\t],\n\t\"./ion-toggle.entry.js\": [\n\t\t219,\n\t\t12\n\t],\n\t\"./ion-virtual-scroll.entry.js\": [\n\t\t220,\n\t\t50\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(function() {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn __webpack_require__.e(ids[1]).then(function() {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = function webpackAsyncContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackAsyncContext.id = 129;\nmodule.exports = webpackAsyncContext;","var map = {\n\t\"./ion-icon.entry.js\": [\n\t\t221,\n\t\t57\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(function() {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn __webpack_require__.e(ids[1]).then(function() {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = function webpackAsyncContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackAsyncContext.id = 131;\nmodule.exports = webpackAsyncContext;","// https://www.typescriptlang.org/docs/handbook/modules.html\r\nimport {Storage} from '@ionic/storage';\r\nimport {pipe} from \"fp-ts/function\";\r\nimport {fromNullable, none, Option} from \"fp-ts/Option\";\r\nimport * as O from \"fp-ts/Option\";\r\nimport {Environment} from \"./environmentFunctions\";\r\nimport {EnumDictionary, EnvironmentSettings} from \"./ticketsCore.Tooling\";\r\n\r\nexport const nameof = (name: keyof T) => name; // ... not quite what you think https://schneidenbach.gitbooks.io/typescript-cookbook/content/nameof-operator.html\r\nexport const storageKey = 'ticketsStore'\r\n\r\nexport const TestSettings = {\r\n RunIntegratorTests: true,\r\n}\r\n/** optionally Runs API tests */\r\nexport const itIfAPI = () => TestSettings.RunIntegratorTests ? it : it.skip;\r\n\r\nexport type TicketsSingletons =\r\n {\r\n storage: Storage\r\n }\r\n\r\nexport let Singleton: TicketsSingletons = {storage: null!}!\r\n\r\nexport enum LoggedInStatus {\r\n loggedOut,\r\n loggedIn\r\n}\r\n\r\n\r\nexport const ValueOrEmpty = (o: Option) => pipe(o, O.match(() => '', b => b)) ","import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux';\r\nimport type { RootState, AppDispatch } from './store';\r\n\r\n// Use throughout your app instead of plain `useDispatch` and `useSelector`\r\nexport const useAppDispatch = () => useDispatch();\r\nexport const useAppSelector: TypedUseSelectorHook = useSelector;\r\n","import {createAction, PayloadAction} from \"@reduxjs/toolkit\";\r\nimport {Environment} from \"../../app/environmentFunctions\";\r\nimport {fromNullable, match, none, Option} from \"fp-ts/Option\";\r\nimport {pipe, pipe as fptsPipe} from \"fp-ts/function\";\r\nimport {EnumDictionary, EnvironmentFunctions} from \"../../app/ticketsCore.Tooling\";\r\nimport {UserDetails} from \"../../data/ticketsAPI/Models/userDetails\";\r\nimport * as O from 'fp-ts/Option'\r\nexport type StoredData = {\r\n environment: Environment,\r\n darkMode: darkModeValues,\r\n selectedCompany: DictionaryOfOptions\r\n userDetails: EnumDictionary>,\r\n recentlyTriedEmails:string[] // will be limitedArrayProxy (search for that)\r\n}\r\n\r\n//export type DictionaryOfOptionalUserDetails = EnumDictionary>\r\nexport type DictionaryOfOptions = EnumDictionary>\r\n\r\nexport const extractBearerFromUserDetails = (details:Option) => pipe(details, O.map(pd => pd.bearerToken)) \r\nexport type darkModeValues = 'light' | 'dark'\r\n\r\nexport const stateRetrievedFromStorage = createAction>('STATE_RETRIEVED_FROM_STORAGE')\r\nexport const setEnvironment = createAction('SET_ENVIRONMENT')\r\nexport const setCompanyId = createAction<{ companyId:Option}>('SET_COMPANY_ID')\r\nexport const setDarkMode = createAction('SET_DARK_MODE')\r\n\r\nexport const processUserDetailsFromServer = createAction<{ userData: Option, environment: Environment }>('PROCESS_USER_DETAILS_FROM_SERVER')\r\n\r\n","\r\nexport const smlToLgeImage =(source:string) => source.replace('_sml.','_lge.')\r\n\r\nexport const prefixImageHttps = (source: string) =>\r\nsource.substr(0,2) == '//' ? `https:${source}` : source\r\n\r\n \r\n","import {IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle, IonImg, IonRippleEffect} from '@ionic/react';\nimport {useState} from \"react\";\nimport {useHistory} from \"react-router-dom\";\nimport {prefixImageHttps, smlToLgeImage} from \"../../app/Services/StringFunctions\";\nimport {EventHeaderModel} from \"../../data/ticketsAPI/Models/EventModels\";\nimport './LargeCard.css'\n\ntype largeCardProps = { event: EventHeaderModel }\nexport const LargeCard = ({event}: largeCardProps) => {\n const history = useHistory()\n return <>\n history.push(`/page/Checkin/${event.id}`)}>\n \n \n \n {event.formattedStartDate}\n {event.eventName}\n \n \n Tickets Sold:{event.ticketCount}\n \n \n \n}","// https://welcomemat.com/phoneapi/PhoneAPISamples/getnumbers?count=10 \nimport axios, {AxiosRequestConfig, CancelTokenSource} from \"axios\";\nimport {isRight} from \"fp-ts/Either\";\nimport {pipe} from \"fp-ts/function\";\nimport * as O from \"fp-ts/Option\";\nimport {isSome, none, Option} from \"fp-ts/Option\";\nimport * as TE from \"fp-ts/TaskEither\";\nimport {TaskEither} from \"fp-ts/TaskEither\";\nimport {Observable} from \"rxjs\";\nimport {AppDispatch} from \"../../app/store\";\nimport {EnvironmentSettings} from \"../../app/ticketsCore.Tooling\";\nimport {processUserDetailsFromServer} from \"../../features/CommonActions/SettingsAndStorageActions\";\n\nexport const onRejected: (reason: unknown) => AxiosError = (r: any) => !!r.response\n ? {status: r.response.status, statusText: r.response.statusText, message:r.message}\n : {code: r.code, message: r.message}\n\nexport const onRejectedSimple: (reason: unknown) => AxiosError = (r: any) => r\n\n\nexport interface AxiosErrorWithStatusCode {\n /**The status code returned with the error. Eg 403 */\n status: number,\n statusText: string,\n message : string\n}\n\n/** Get these when you get the host wrong etc. */\nexport interface AxiosErrorWithNoStatusCode {\n code: number,\n message : string\n}\n\n/** Type Guard to ascertain error type*/\nexport function isStatusCodeError(axiosError: AxiosError): axiosError is AxiosErrorWithStatusCode {\n return !!(axiosError as AxiosErrorWithStatusCode).status;\n}\n\nexport type AxiosError = AxiosErrorWithStatusCode | AxiosErrorWithNoStatusCode\nexport type ticketsQuery = (e: TicketsAPI, p: TProps) => TaskEither\n\n/**Wraps an axios query in an observable. If the Observable is cancelled (eg, by a SwitchMap), then the http request is cancelled too. If you pass an App Disaptch, will issue a logout action if we get 403 from server */\nexport const AxiosRequest$ = (environmentSettings: EnvironmentSettings, p: TProps, f: ticketsQuery, dispatch: Option): Observable =>\n new Observable((s) => {\n let api = new TicketsAPI(environmentSettings)\n f(api, p)().then(r => {\n\n if (isRight(r)) {\n s.next(r.right)\n s.complete()\n } else {\n if (isStatusCodeError(r.left)) {\n if (r.left.status === 404)\n s.error(`That item could not be found`)\n else\n s.error(`${r.left.message}`)\n if (r.left.status === 403 && isSome(dispatch))\n dispatch.value(processUserDetailsFromServer({userData: none, environment: environmentSettings.environment})) // log out\n\n } else {\n s.error(`${r.left.message}`)\n }\n }\n })\n return () => {\n api.axiosCancellationSource.cancel()\n };\n });\n\n\n/**Wraps an axios query in an observable. If the Observable is cancelled (eg, by a SwitchMap), then the http request is cancelled too */\n// export const AxiosRequest$ = (environmentSettings: EnvironmentSettings, p: TProps, f: ticketsQuery): Observable =>\n// new Observable((s) => {\n// let api = new TicketsAPI(environmentSettings)\n// f(api, p)().then(r => {\n//\n// if (isRight(r)) {\n// s.next(r.right)\n// s.complete()\n// } else {\n// if (isStatusCodeError(r.left))\n// s.error(`${r.left.status} ${r.left.statusText}`)\n// else\n// s.error(`error from http call ${r.left.code}`)\n// }\n// })\n// return () => {\n// api.axiosCancellationSource.cancel()\n// };\n// });\n\n\nexport class TicketsAPI {\n public axiosConfig: AxiosRequestConfig;\n public axiosCancellationSource: CancelTokenSource;\n\n constructor(/**This comes from redux*/ public environmentSettings: EnvironmentSettings) {\n\n this.axiosCancellationSource = axios.CancelToken.source();\n // can run the Ionic dev as ssl with Ionic serve --https (https://github.com/ionic-team/ionic-cli/issues/3305#issuecomment-649213731)\n this.axiosConfig = {\n proxy: (isSome(environmentSettings.proxy) && pipe(environmentSettings.proxy, O.match(() => undefined, x => x))), // possibly don't need to pipe if && is short-circuiting\n // see https://github.com/axios/axios/issues/606#issuecomment-269648154\n headers: {\n ...(isSome(environmentSettings.bearerToken) && {Authorization: `Bearer ${environmentSettings.bearerToken.value}`}),\n // I SPENT AN AFTERNOON ON THIS. If you add a custom header here, then you have to add it in web.config under Access-Control-Allow-Headers (and possibly Access-Control-Expose-Headers)\n ...(isSome(environmentSettings.selectedCompany) && {CompanyId: `${environmentSettings.selectedCompany.value}`}),\n // 'Hello':'World',\n // 'Accept-Encoding': 'gzip, deflate, br',\n // 'Sec-Fetch-Mode': 'cors',\n // 'Host': 'localhost:8100'\n // 'Goodbye':'Bugs'\n\n },\n //httpsAgent: true || environmentSettings.handleSelfSignedCerts ? new Agent({rejectUnauthorized: false}) : new Agent({rejectUnauthorized: false}),\n cancelToken: this.axiosCancellationSource.token\n\n };\n axios.defaults.adapter = require('axios/lib/adapters/http'); // search for \"configure axios adapter\" from wallaby support in gmail. https://github.com/axios/axios/issues/1754#issuecomment-572778305 \n }\n\n\n public TCExample = (httpCode: number) => TE.tryCatch(() => axios.get(`https://httpstat.us/${httpCode}`), onRejected)\n}\n\n\n//https://dev.tickets.org.au/phoneapi/PhoneAPISamples/GetEnvironmentDetails\n\n ","import {join} from 'lodash'\r\nexport const sum = (i:number,j:number) => i + j\r\n\r\n// This is crazy cool. \"Proxy\" Allows modification of an existing object \r\n// Really interesting!! https://stackoverflow.com/a/53179170/494635\r\n// This is another cool use of proxies https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy#validation\r\nexport function limitedArrayProxy (maxLength:number){return {\r\n set: function(target:any, property:any, value:any, receiver:any) {\r\n if (!isNaN(property)){\r\n if(parseInt(property) < maxLength){\r\n target[property] = value;\r\n }\r\n }\r\n return true;\r\n }\r\n}}\r\n\r\nexport const ArrayEmpty = (source:T[]) => (source === undefined || source.length ===0)\r\n\r\nexport const arrayToUriParamString = (source: string[], paramName:string) =>\r\n ArrayEmpty(source) \r\n ? `${paramName}=[]` \r\n : `${paramName}=` + join(source, `&${paramName}=`)\r\n\r\n","import {ScrollDetail, SearchbarChangeEventDetail} from \"@ionic/core\";\nimport {IonContent, IonHeader, IonProgressBar, IonSearchbar, IonSegment, IonSegmentButton, IonTitle, IonToolbar} from \"@ionic/react\";\nimport {isSome, none, Option} from \"fp-ts/Option\";\nimport {debounce} from 'lodash'\nimport React, {useRef, useState} from \"react\";\nimport {useAppSelector} from \"../../app/hooks\";\nimport {PageName, PageSettings} from \"../../app/ticketsCore.pageSettings\";\nimport {EnvironmentSettings} from \"../../app/ticketsCore.Tooling\";\nimport {EventHeaderModel, SearchEventsParams} from \"../../data/ticketsAPI/Models/EventModels\";\nimport {LargeCard} from \"../Events/LargeCard\";\nimport {useEventHeaderData} from \"../Events/useEventHeaderDataComponent\";\nimport './EventList.css'\n\n// https://upmostly.com/tutorials/build-an-infinite-scroll-component-in-react-using-react-hooks\n// https://www.digitalocean.com/community/tutorials/react-react-infinite-scroll\ntype eventListProps = { activeEnvironment: EnvironmentSettings }\n\nexport enum EventPageModes {\n Current = \"Current\",\n Archived = 'Archived',\n All = 'All'\n}\n\ntype displayModes = EventPageModes.Current | EventPageModes.All | EventPageModes.Archived\n\nexport const EventList = ({activeEnvironment}: eventListProps) => {\n const pageSize = 10\n const searchMode = (s: displayModes): { showActive: boolean, showArchived: boolean } => (\n s === EventPageModes.All\n ? {showActive: true, showArchived: true}\n : s === EventPageModes.Current\n ? {showActive: true, showArchived: false}\n : {showActive: false, showArchived: true})\n const [segment, setSegment] = useState(EventPageModes.Current);\n const ios = useAppSelector(x => x.settingsSlice.mode) === 'ios';\n const searchParams: SearchEventsParams = {\"pageSize\": pageSize, \"pageIndex\": 1, \"searchTerm\": \"\", ...searchMode(segment)}\n const [requestPayload, setRequestPayload] = useState(searchParams)\n const [lastPageLoaded, setLastPageLoaded] = useState(0)\n const [isLoading, setIsLoading] = useState(true)\n //const [searchText, setSearchText] = useState('')\n const [allLoaded, setAllLoaded] = useState(false)\n const [error, setError] = useState>(none)\n const [responseEventHeaders, setResponseEventHeaders] = useState([])\n\n const content = useRef(null) //https://linguinecode.com/post/how-to-use-react-useref-with-typescript\n const eventPage = PageSettings[PageName.events]\n let a = useEventHeaderData({params: requestPayload, setResponseEventHeaders, setLastPageLoaded, setIsLoading, setAllLoaded, setError, activeEnvironment, error})\n\n\n function reset() {\n setResponseEventHeaders([])\n setIsLoading(true)\n setLastPageLoaded(1)\n setAllLoaded(false)\n }\n\n let searchText = (e: CustomEvent) => {\n reset()\n setRequestPayload(e2 => ({...e2, searchTerm: e.detail.value!, pageIndex: 1}))\n }\n\n const trackScrollInternal = debounce(async (e: CustomEvent) => {\n //https://stackoverflow.com/questions/61886891/how-to-get-maximum-scroll-height-for-ion-content\n const elem = content.current!\n const scrollElement = await (elem as any).getScrollElement()\n const scrollPosition = e.detail.scrollTop;\n const totalContentHeight = scrollElement.scrollHeight;\n const viewportHeight = elem.getBoundingClientRect().top + elem.offsetHeight; // I think that elem.ClientHeight returns the same\n const percentage = scrollPosition / (totalContentHeight - viewportHeight);\n const distanceFromBottom = (totalContentHeight - viewportHeight) - scrollPosition\n\n if (distanceFromBottom < 1000 && lastPageLoaded === requestPayload.pageIndex && !allLoaded) {\n setIsLoading(true)\n setRequestPayload(e => ({...e, pageIndex: e.pageIndex + 1}))\n }\n }, 100) \n\n\n return <>\n \n {\n reset()\n setSegment(e.detail.value as any)\n setRequestPayload(e2 => ({...e2, pageIndex: 1, ...searchMode(e.detail.value as EventPageModes)}))\n }}>\n \n {EventPageModes.Current}\n \n \n {EventPageModes.All}\n \n \n {EventPageModes.Archived}\n \n \n \n\n\n searchText(e)}/>\n {/*{`${lastPageLoaded} ${requestPayload.pageIndex} ${requestPayload.searchTerm} ${allLoaded}`}*/}\n trackScrollInternal(e)} className=\"event-content\">\n \n \n {eventPage.title}\n \n \n
\n {isSome(error)\n ?
{error.value}
\n : (<>\n {responseEventHeaders.map(e => ())}\n {isLoading && }\n\n )}\n
\n
\n \n}\n","import * as TE from \"fp-ts/TaskEither\";\r\nimport axios from \"axios\";\r\nimport {ArrayEmpty, arrayToUriParamString} from \"../../app/Services/ArrayFunctions\";\r\nimport {CheckInOrderModel} from \"../ticketsAPI/Models/CheckInOrderModels\";\r\nimport {EventHeaderModel, SearchEventsParams, SearchTicketCheckInModel, SearchTicketsParams} from \"../ticketsAPI/Models/EventModels\";\r\nimport {TicketsCheckedInPhoneModel, TicketSoldPhoneModel} from \"../ticketsAPI/Models/TicketsSoldModel\";\r\nimport {AxiosError, TicketsAPI, ticketsQuery, onRejected, onRejectedSimple} from \"./tickets-auth-api\";\r\nimport {UserDetails} from \"../ticketsAPI/Models/userDetails\";\r\n\r\nexport const GetBearerToken: ticketsQuery = (e: TicketsAPI, shortCode: string) =>\r\n TE.tryCatch(() => axios.get(`${e.environmentSettings.baseUrl}/phoneapi/apisecuritytokens/GetBearerFromToken?shorttoken=${shortCode}`, e.axiosConfig).then(r => r.data.value), onRejected)\r\n\r\nexport type GetBearerTokenWithDetailPayload = {shortCode: string, historicEmails:string[]}\r\nexport const GetBearerTokenWithDetail: ticketsQuery = (e: TicketsAPI, s:GetBearerTokenWithDetailPayload) =>\r\n TE.tryCatch(() => axios.get(`${e.environmentSettings.baseUrl}/phoneapi/apisecuritytokens/GetBearerAndDetailsFromToken?shorttoken=${s.shortCode}&${arrayToUriParamString(s.historicEmails, 'historicEmail')}`, e.axiosConfig).then(r => r.data), onRejected)\r\n\r\nexport const RequestShortCodeToEmail: ticketsQuery = (e: TicketsAPI, emailAddress: string) =>\r\n TE.tryCatch(() => axios.post(`${e.environmentSettings.baseUrl}/phoneapi/apisecuritytokens/SendShortTokenToEmail?email=${emailAddress}`, e.axiosConfig).then(r => r.data), onRejected)\r\n\r\nexport const GetEnvironmentDetails: ticketsQuery = (e: TicketsAPI) =>\r\n TE.tryCatch(() => axios.get(`${e.environmentSettings.baseUrl}/phoneapi/PhoneAPISamples/GetEnvironmentDetails`, e.axiosConfig).then(r => r.data), onRejected)\r\n\r\n\r\nexport const SearchEventHeaders: ticketsQuery = (e: TicketsAPI, data) =>\r\n TE.tryCatch(() => axios.post(`${e.environmentSettings.baseUrl}/phoneapi/eventsapi/SearchEventHeaders`,data, e.axiosConfig).then(r => r.data), onRejected)\r\n\r\nexport type TicketTypes = {ticketTypeId:string, ticketName:String}\r\nexport const GetTicketTypeIds: ticketsQuery<{eventId:string}, TicketTypes[]> = (e: TicketsAPI, data) =>\r\n TE.tryCatch(() => axios.get(`${e.environmentSettings.baseUrl}/phoneapi/eventsapi/GetTicketTypeIds?eventId=${data.eventId}`, e.axiosConfig).then(r => r.data), onRejected)\r\n\r\nexport const SearchTickets: ticketsQuery = (e: TicketsAPI, data) =>\r\n TE.tryCatch(() => axios.post(`${e.environmentSettings.baseUrl}/phoneapi/eventsapi/SearchTickets`,data, e.axiosConfig).then(r => r.data), onRejected)\r\n\r\n\r\nexport type CheckInTicketParam = {ticketId:string, checkedIn:boolean}\r\nexport const CheckInTicket: ticketsQuery = (e: TicketsAPI, data) =>\r\n TE.tryCatch(() => axios.post(`${e.environmentSettings.baseUrl}/phoneapi/eventsapi/CheckInticket?ticketId=${data.ticketId}&checkedIn=${data.checkedIn ? 'true' : 'false'}`,null, e.axiosConfig).then(r => r.data), onRejected)\r\n\r\n\r\nexport const GetCheckinOrderFromOrderNumber: ticketsQuery = (e: TicketsAPI, orderNumber) =>\r\n TE.tryCatch(() => axios.get(`${e.environmentSettings.baseUrl}/phoneapi/eventsapi/OrderCheckInDetailsFromOrderNumber?ordernumber=${orderNumber}`,e.axiosConfig).then(r => r.data), onRejected)\r\n\r\nexport const GetCheckinOrderFromQrCode: ticketsQuery = (e: TicketsAPI, qrCode) =>\r\n TE.tryCatch(() => axios.get(`${e.environmentSettings.baseUrl}/phoneapi/eventsapi/GetOrderDetailsFromQRCode?qrcode=${qrCode}`,e.axiosConfig).then(r => r.data), onRejected)\r\n\r\nexport const GetTicketsSold: ticketsQuery = (e: TicketsAPI, eventId) =>\r\n TE.tryCatch(() => axios.get(`${e.environmentSettings.baseUrl}/phoneapi/eventsapi/GetTicketsSold?eventId=${eventId}`,e.axiosConfig).then(r => r.data), onRejected)\r\n\r\nexport const GetTicketsCheckedIn: ticketsQuery = (e: TicketsAPI, eventId) =>\r\n TE.tryCatch(() => axios.get(`${e.environmentSettings.baseUrl}/phoneapi/eventsapi/GetTicketsCheckedIn?eventId=${eventId}`,e.axiosConfig).then(r => r.data), onRejected)\r\n\r\n","import {fromNullable, isNone, isSome, Option} from \"fp-ts/Option\";\nimport {Environment} from \"./environmentFunctions\";\n\nexport {$enum} from 'ts-enum-util'; // https://stackoverflow.com/a/49205982/494635 \n\n\nexport interface IDictionary {\n [id: string]: TValue;\n}\n\n\nexport type EnumDictionary = {\n [K in T]: U;\n};\n\nexport type EnvironmentSettings = {\n environment: Environment,\n baseUrl: string,\n proxy: Option<{ host: string, port: number }>,\n selectedCompany:Option,\n bearerToken: Option,\n handleSelfSignedCerts: boolean, // This is needed to point to local. Note that, if you're going through fiddler, you're good.\n}\n\nexport module EnvironmentFunctions {\n // is this still needed?\n // export const isLoggedIn\n // = (e: LoggedInEnvironment) => {\n // return isSome(e.bearerToken)\n // }\n}\n\nexport function validateEmail(email:string) {\n // eslint-disable-next-line\n let re = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n return re.test(email);\n}\n\n","import {isSome, Option, some} from \"fp-ts/Option\";\r\nimport React, {useEffect} from \"react\";\r\nimport {useAppDispatch} from \"../../app/hooks\";\r\nimport {EnvironmentSettings} from \"../../app/ticketsCore.Tooling\";\r\nimport {EventHeaderModel, SearchEventsParams} from \"../../data/ticketsAPI/Models/EventModels\";\r\nimport {AxiosRequest$} from \"../../data/user/tickets-auth-api\";\r\nimport {SearchEventHeaders} from \"../../data/user/tickets-http-requests\";\r\n\r\n\r\ntype useEventHeaderDataProps = {\r\n params: SearchEventsParams,\r\n setResponseEventHeaders: React.Dispatch>,\r\n setLastPageLoaded: React.Dispatch>,\r\n setIsLoading: React.Dispatch>,\r\n setAllLoaded: React.Dispatch>,\r\n setError: React.Dispatch>>,\r\n activeEnvironment: EnvironmentSettings,\r\n error:Option\r\n}\r\nexport const useEventHeaderData = ({params, setResponseEventHeaders, setLastPageLoaded, setAllLoaded, setError, setIsLoading, activeEnvironment, error}: useEventHeaderDataProps) => {\r\n const dispatch = useAppDispatch()\r\n useEffect(function () {\r\n if (isSome(error)) return\r\n const sub = AxiosRequest$(activeEnvironment, params, SearchEventHeaders, some(dispatch))\r\n .subscribe({\r\n next: next => {\r\n setResponseEventHeaders(x=>[...x, ...next])\r\n if (next.length < params.pageSize) setAllLoaded(true)\r\n setLastPageLoaded(params.pageIndex)\r\n },\r\n error: e => {\r\n setError(some(e))\r\n },\r\n complete: () => {\r\n setIsLoading(false)\r\n }\r\n })\r\n\r\n return () => {\r\n sub.unsubscribe()\r\n };\r\n }, [params, activeEnvironment, setAllLoaded, setError, setIsLoading, setLastPageLoaded, setResponseEventHeaders, error]) // put these in because of a tslint warning. Not sure if it's right. \r\n return useEffect\r\n \r\n}","import {pipe} from \"fp-ts/function\";\nimport {fromNullable, none} from \"fp-ts/Option\";\nimport * as O from \"fp-ts/Option\";\nimport {UserDetails} from \"../data/ticketsAPI/Models/userDetails\";\nimport { DictionaryOfOptions} from \"../features/CommonActions/SettingsAndStorageActions\";\nimport {EnumDictionary, EnvironmentSettings} from \"./ticketsCore.Tooling\";\nexport enum Environment {\n production = \"Production\",\n development = \"Development\",\n local = \"Localhost\",\n localFiddler = \"Local Fiddler\"\n}\n\nexport const IsProduction = () => !(!process.env.NODE_ENV || process.env.NODE_ENV === 'development')\nexport const initialEnvironment = Environment.production\nexport const defaultEnvironment: EnvironmentSettings = {\n baseUrl: \"\",\n environment: Environment.local,\n selectedCompany:none,\n proxy: fromNullable(undefined),\n bearerToken:none,\n handleSelfSignedCerts: false\n}\n\nexport const GetEnvironmentSettings: EnumDictionary = {\n [Environment.development]: {...defaultEnvironment, environment: Environment.development, baseUrl: 'https://dev.tickets.org.au'},\n [Environment.production]: {...defaultEnvironment, environment: Environment.production, baseUrl: 'https://app.tickets.org.au'},\n [Environment.local]: {...defaultEnvironment, environment: Environment.local, baseUrl: 'https://welcomemat.com', handleSelfSignedCerts: false},\n [Environment.localFiddler]: {...defaultEnvironment, environment: Environment.localFiddler, baseUrl: 'https://welcomemat.com', proxy: fromNullable({port: 8888, host: 'localhost'})},\n}\n\n/**Take the data we receive from the server on login and an environment. Will merge the default environment settings with things like bearer tokens that can be used to make API calls */\nexport const MergeEnvironmentWithUserData= (state: DictionaryOfOptions,selectedCompanies:DictionaryOfOptions, environment: Environment):EnvironmentSettings =>\n ({\n ...GetEnvironmentSettings[environment],\n bearerToken: pipe(state[environment], O.map(pd => pd.bearerToken)),\n selectedCompany:selectedCompanies[environment]\n })\n\n export const ClearEnvironmentOfUserData = (state: DictionaryOfOptions, environment: Environment) =>({...GetEnvironmentSettings[environment]})","import {createSlice, current, PayloadAction} from \"@reduxjs/toolkit\";\r\nimport {pipe as fptspipe} from \"fp-ts/function\";\r\nimport * as O from \"fp-ts/Option\";\r\nimport {fromNullable, isNone, isSome, none, Option, some} from \"fp-ts/Option\";\r\nimport {ofType, StateObservable} from \"redux-observable\";\r\nimport * as rxjs from \"rxjs\"\r\nimport {interval, Observable, pipe} from \"rxjs\"\r\nimport {bufferCount, bufferToggle, catchError, endWith, filter, mapTo, mergeMap, raceWith, startWith, switchMap} from \"rxjs/operators\";\r\nimport {v4 as uuidv4} from 'uuid';\r\nimport {ClearEnvironmentOfUserData, Environment, GetEnvironmentSettings, initialEnvironment, MergeEnvironmentWithUserData} from \"../../app/environmentFunctions\";\r\nimport {limitedArrayProxy} from \"../../app/Services/ArrayFunctions\";\r\nimport {RootState} from \"../../app/store\";\r\nimport {EnvironmentSettings} from \"../../app/ticketsCore.Tooling\";\r\nimport {UserDetails} from \"../../data/ticketsAPI/Models/userDetails\";\r\nimport {AxiosRequest$} from \"../../data/user/tickets-auth-api\";\r\nimport {GetBearerTokenWithDetail, GetBearerTokenWithDetailPayload} from \"../../data/user/tickets-http-requests\";\r\nimport {DictionaryOfOptions, processUserDetailsFromServer, setCompanyId, setEnvironment, stateRetrievedFromStorage, StoredData} from \"../CommonActions/SettingsAndStorageActions\";\r\n\r\nexport enum shortCodeLoadingStates {loading, notLoading}\r\n\r\nexport interface LoginState {\r\n userDetails: DictionaryOfOptions,\r\n selectedCompaniesPerEnvironment: DictionaryOfOptions\r\n activeEnvironment: EnvironmentSettings,\r\n /**stores the selected company id for a given environment*/\r\n activeUserDetails: Option,\r\n shortCodeLoadingState: shortCodeLoadingStates,\r\n developerModeEnabled: boolean,\r\n companyCountForUser:number,\r\n // set a uuid when they log in. This can be used as keys to render components so that, when they log in and out, React refreshes all the components\r\n // !!! Didn't end up actually using this in anger... but leave it here because might come in handy for something. \r\n loginSessionId: string,\r\n recentlyTriedEmails: string[]\r\n}\r\n\r\nconst minShortCodeLength = 1 // need to keep this is sync with the back end. Will use so that they don't have to press enter. Search for CreateShortToken() in c# \r\n\r\nexport const initialState: LoginState = {\r\n userDetails: {\r\n [Environment.production]: fromNullable(null),\r\n [Environment.development]: fromNullable(null),\r\n [Environment.local]: fromNullable(null),\r\n [Environment.localFiddler]: fromNullable(null)\r\n },\r\n selectedCompaniesPerEnvironment: {\r\n [Environment.production]: fromNullable(null),\r\n [Environment.development]: fromNullable(null),\r\n [Environment.local]: fromNullable(null),\r\n [Environment.localFiddler]: fromNullable(null)\r\n },\r\n activeEnvironment: GetEnvironmentSettings[initialEnvironment],\r\n activeUserDetails: none,\r\n shortCodeLoadingState: shortCodeLoadingStates.notLoading,\r\n loginSessionId: uuidv4(),\r\n developerModeEnabled: false,\r\n companyCountForUser:0,\r\n recentlyTriedEmails: []\r\n\r\n};\r\nexport const LoginSlice = createSlice({\r\n name: 'Login',\r\n initialState,\r\n reducers: {\r\n tapLogoForSecretCode: (state, action: PayloadAction) => {\r\n },\r\n toggleDeveloperMode: (state, action: PayloadAction) => {\r\n state.developerModeEnabled = !state.developerModeEnabled\r\n },\r\n requestShortCodeToEmail: (state, action: PayloadAction) => {\r\n let t = new Proxy( state.recentlyTriedEmails, limitedArrayProxy(10))\r\n if (!t.find((x:string)=>x===action.payload)) {\r\n t.unshift(action.payload)\r\n state.recentlyTriedEmails = t\r\n }\r\n },\r\n processShortCode: (state, action: PayloadAction) => {\r\n },\r\n finishedProcessShortCode: (state) => {\r\n state.shortCodeLoadingState = shortCodeLoadingStates.notLoading\r\n },\r\n startProcessShortCode: (state) => {\r\n state.shortCodeLoadingState = shortCodeLoadingStates.loading\r\n }\r\n },\r\n extraReducers: (builder) => {\r\n\r\n builder.addCase(setEnvironment, (state, action: PayloadAction) => {\r\n console.log(`setting environment: selectedCompanies`, current(state.selectedCompaniesPerEnvironment))\r\n state.activeEnvironment = MergeEnvironmentWithUserData(state.userDetails, state.selectedCompaniesPerEnvironment, action.payload)\r\n state.activeUserDetails = state.userDetails[action.payload]\r\n state.companyCountForUser = fptspipe(state.activeUserDetails, O.match(() => [], ud => ud.companyDetails)).length\r\n\r\n // The line below didn't work: https://stackoverflow.com/a/54413951/494635\r\n //state.activeEnvironment.bearerToken = state.bearerTokens[action.payload]\r\n // use this instead\r\n // //state.activeEnvironment = {...core.GetEnvironmentSettings[action.payload], bearerToken: pipe(state.userDetails[action.payload], O.map(pd => pd.bearerToken))}\r\n\r\n })\r\n builder.addCase(setCompanyId, (state, action: PayloadAction<{ companyId: Option }>) => {\r\n console.log(`setting environment: selectedCompanies`, current(state.selectedCompaniesPerEnvironment))\r\n state.selectedCompaniesPerEnvironment[state.activeEnvironment.environment] = action.payload.companyId\r\n state.activeEnvironment = MergeEnvironmentWithUserData(state.userDetails, state.selectedCompaniesPerEnvironment, state.activeEnvironment.environment)\r\n })\r\n\r\n builder.addCase(processUserDetailsFromServer, (state, action: PayloadAction<{ userData: Option, environment: Environment }>) => {\r\n let p = action.payload\r\n const env = action.payload.environment\r\n state.userDetails[p.environment] = p.userData\r\n\r\n if (isNone(p.userData)) {\r\n if (state.activeEnvironment.environment === env) {\r\n state.activeEnvironment = ClearEnvironmentOfUserData(state.userDetails, env)\r\n state.selectedCompaniesPerEnvironment[action.payload.environment] = none\r\n state.activeUserDetails = none\r\n state.companyCountForUser = 0\r\n }\r\n } else {\r\n state.loginSessionId = uuidv4() // only give them a new id when they get a new session, otherwise you get in an endless loop\r\n if (state.activeEnvironment.environment === env) {\r\n state.selectedCompaniesPerEnvironment[action.payload.environment] = !!p.userData.value.companyDetails ? some(p.userData.value.companyDetails[0]!.companyId) : none\r\n state.activeEnvironment = MergeEnvironmentWithUserData(state.userDetails, state.selectedCompaniesPerEnvironment, env)\r\n state.activeUserDetails = p.userData\r\n state.companyCountForUser = fptspipe(state.activeUserDetails, O.match(() => [], ud => ud.companyDetails)).length\r\n\r\n }\r\n }\r\n })\r\n\r\n builder.addCase(stateRetrievedFromStorage, (state, action: PayloadAction>) => {\r\n\r\n if (isSome(action.payload)) {\r\n const env = action.payload.value.environment\r\n state.userDetails = action.payload.value.userDetails\r\n state.selectedCompaniesPerEnvironment = action.payload.value.selectedCompany\r\n state.activeUserDetails = state.userDetails[env]\r\n state.companyCountForUser = fptspipe(state.activeUserDetails, O.match(() => [], ud => ud.companyDetails)).length\r\n state.activeEnvironment = MergeEnvironmentWithUserData(state.userDetails, state.selectedCompaniesPerEnvironment, env)\r\n state.recentlyTriedEmails = action.payload.value.recentlyTriedEmails\r\n }\r\n }\r\n )\r\n }\r\n});\r\n\r\nexport const convertShortCodeToBearerEpic = (action$: Observable, state$: StateObservable) => // action$ is a stream of actions\r\n action$.pipe(\r\n ofType(processShortCode),\r\n filter((x: PayloadAction) => x.payload.shortCode.length >= minShortCodeLength),\r\n switchMap((x: PayloadAction) =>\r\n AxiosRequest$(state$.value.loginSlice.activeEnvironment, {shortCode: x.payload.shortCode, historicEmails:x.payload.historicEmails}, GetBearerTokenWithDetail, none)\r\n .pipe(\r\n // https://stackoverflow.com/questions/47965184/how-to-dispatch-multiple-actions-from-redux-observable\r\n\r\n //map((i: string) => setBearerToken({token: i, environment: (state$).value.loginSlice.activeEnvironment.environment})),\r\n mergeMap((i) => [\r\n processUserDetailsFromServer({userData: fromNullable(i), environment: (state$).value.loginSlice.activeEnvironment.environment})\r\n ]\r\n ),\r\n catchError(error => rxjs.of(processUserDetailsFromServer({userData: none, environment: (state$).value.loginSlice.activeEnvironment.environment}))),\r\n //https://www.gitmemory.com/issue/ReactiveX/rxjs/4772/491553380\r\n startWith(startProcessShortCode()), // could probably do something like this to defer emitting until after a second? https://ncjamieson.com/how-to-write-delayuntil/\r\n endWith(finishedProcessShortCode()) // Can yield multiple actions as well. //endWith(finishedProcessShortCode(), finishedProcessShortCode()) \r\n )\r\n ))\r\n\r\n\r\nconst tapsToTrigger = 5\r\nexport const enableDeveloperModerEpic = (action$: any, state: any) => action$.pipe(\r\n ofType(tapLogoForSecretCode),\r\n pipe(\r\n bufferToggle(action$.pipe(ofType(tapLogoForSecretCode)), // This obs is the start of a window. \r\n // This obs triggers the closing of a window. Either after the time has elapsed or we receive the specified number of taps. Note that the subscription for the 'raced' observable is added with each window. \r\n () => interval(2000).pipe(raceWith(\r\n action$.pipe(ofType(toggleDeveloperMode)), // When we actually toggle, then reset all teh buffers. Otherwise, after you toggle, immediately subsequent taps inside the timer window will toggle back.\r\n action$.pipe(ofType(tapLogoForSecretCode), bufferCount(tapsToTrigger - 1) // -1 because we needed one to trigger it. This is buffering the taps since the window started. \r\n ))\r\n )),\r\n // after the observable closes, filter on the clicks inside the window which triggered it. \r\n filter(x => x.length >= tapsToTrigger)),\r\n mapTo(toggleDeveloperMode())\r\n);\r\n\r\n\r\n// Export the actionCreators\r\nexport const {startProcessShortCode, finishedProcessShortCode, requestShortCodeToEmail, processShortCode, tapLogoForSecretCode, toggleDeveloperMode} = LoginSlice.actions;\r\nexport const epics = [convertShortCodeToBearerEpic, enableDeveloperModerEpic]\r\n\r\n// export the reducer\r\nexport default LoginSlice.reducer;\r\n","import {IonProgressBar} from \"@ionic/react\";\nimport {useAppSelector} from \"../../app/hooks\";\nimport {shortCodeLoadingStates} from \"./LoginSlice\";\n\nexport const LoadingShortStateIndicator = () => {\n const isProcessingShortCode = useAppSelector(x => x.loginSlice.shortCodeLoadingState)\n return isProcessingShortCode === shortCodeLoadingStates.loading ? : null\n}","import {isSome} from \"fp-ts/Option\";\nimport {useAppSelector} from \"../../app/hooks\";\n\nexport function useIsLoggedIn() {\n return useAppSelector(x => isSome(x.loginSlice.activeUserDetails))\n}","import {join} from 'lodash'\r\nimport {IonButton, IonCard, IonCardHeader, IonCardTitle, IonCol, IonImg, IonInput, IonItem, IonLabel, IonList, IonRow, IonText, useIonToast} from \"@ionic/react\";\r\nimport {fromNullable, isNone, isSome} from \"fp-ts/Option\";\r\nimport {ChangeEvent, ChangeEventHandler, forwardRef, useEffect, useImperativeHandle, useRef, useState} from \"react\";\r\n//import {routeState} from \"../../Routes\";\r\nimport {Redirect, useHistory} from \"react-router-dom\";\r\nimport {BehaviorSubject} from \"rxjs\";\r\nimport {filter} from \"rxjs/operators\";\r\nimport {useAppDispatch, useAppSelector} from \"../../app/hooks\";\r\nimport {validateEmail} from \"../../app/ticketsCore.Tooling\";\r\nimport {TicketsAPI} from \"../../data/user/tickets-auth-api\";\r\nimport {RequestShortCodeToEmail} from \"../../data/user/tickets-http-requests\";\r\nimport {LoadingShortStateIndicator} from \"./LoadingShortStateIndicator\";\r\n\r\nimport {processShortCode, requestShortCodeToEmail} from './LoginSlice';\r\nimport {useIsLoggedIn} from \"./UseIsLoggedIn\";\r\n// The type returned. https://stackoverflow.com/a/65301990/494635 \r\ntype ErrorLabelRef = {\r\n setVisible: (status: boolean) => void\r\n setText: (text: string) => void\r\n} | null;\r\n\r\ntype ErrorLabelProps = {\r\n children?: React.ReactNode | null;\r\n};\r\n\r\n\r\n// https://stackoverflow.com/a/55889638/494635\r\n// https://www.tutorialspoint.com/reactjs-useimperativehandle-hook\r\n// Need to do this so that we can render only the child component without rendering the parent. \r\nconst LoginLabel = forwardRef((props, ref) => {\r\n const [visible, _setVisible] = useState(false);\r\n const [text, _setText] = useState('');\r\n\r\n useImperativeHandle(ref, () => {\r\n return {\r\n setVisible: _setVisible,\r\n setText: _setText\r\n }\r\n });\r\n return visible ? {text} :  \r\n});\r\n\r\n\r\nexport const LoginPage = () => {\r\n const isLoggedIn = useIsLoggedIn()\r\n\r\n const [toastPresent, toastDismiss] = useIonToast(); // https://ionicframework.com/docs/api/toast\r\n const dispatch = useAppDispatch();\r\n const [requestingEmail, setRequestingEmail] = useState(false)\r\n const [shortCode, setShortCode] = useState('')\r\n const emailErrorLabel = useRef(null);\r\n const shortTokenErrorLabel = useRef(null);\r\n const activeEnvironment = useAppSelector(x => x.loginSlice.activeEnvironment)\r\n const history = useHistory() // typing from https://stackoverflow.com/questions/49342390/typescript-how-to-add-type-check-for-history-object-in-react\r\n const activeApi = new TicketsAPI(activeEnvironment) // need to pass param to show when to redo??\r\n const [name1,setName1] = useState('');\r\n const [name2,setName2] = useState('');\r\n const isDeveloperMode = useAppSelector(x=>x.loginSlice.developerModeEnabled)\r\n\r\n const recentEmailsArray = useAppSelector(x=>x.loginSlice.recentlyTriedEmails)\r\n const recentEmails = useAppSelector(x=>join(x.loginSlice.recentlyTriedEmails, ', '))\r\n \r\n // https://felixgerschau.com/react-typescript-events/\r\n // Sample of handler. Link above\r\n // const handleChange1 = (e: ChangeEvent)=>{setName1(e.target.value ); }\r\n\r\n useEffect(() => () => {\r\n activeApi.axiosCancellationSource.cancel() // causes cancellation when the component unloads\r\n })\r\n\r\n let emailCapturedText = new BehaviorSubject('')\r\n emailCapturedText.pipe(filter(b => b !== '')).subscribe(x => emailErrorLabel.current!.setVisible(false))\r\n let shortCodeCapturedText = new BehaviorSubject('')\r\n\r\n shortCodeCapturedText.pipe(filter(b => b !== '')).subscribe(x => {\r\n setShortCode(x)\r\n dispatch(processShortCode({shortCode:x, historicEmails:recentEmailsArray}))\r\n shortTokenErrorLabel.current!.setVisible(false)\r\n }\r\n )\r\n\r\n const requestEmail = (emailState: (state: boolean) => void) => {\r\n let data = fromNullable(emailCapturedText.value)\r\n if (isNone(data) || data.value === '' || !validateEmail(data.value)) {\r\n emailErrorLabel.current!.setVisible(true)\r\n emailErrorLabel.current!.setText('please enter a valid email')\r\n } else {\r\n let d = data.value // TypeScript didn't like referring to data.value below\r\n dispatch(requestShortCodeToEmail(d))\r\n emailErrorLabel.current!.setVisible(false)\r\n emailState(true)\r\n RequestShortCodeToEmail(activeApi, data.value)()\r\n .then(x => {\r\n toastPresent({\r\n buttons: [{text: 'hide', handler: () => toastDismiss()}],\r\n message: `Requested short code be emailed to ${d}`,\r\n onDidDismiss: () => console.log('dismissed'),\r\n onWillDismiss: () => console.log('will dismiss'),\r\n duration: 3000\r\n })\r\n // emailCapturedText.next('') // don't think this will work. Need a ref to the textbox.\r\n })\r\n .catch(x => {\r\n })\r\n .finally(() => emailState(false))\r\n // dispatch(requestShortCodeToEmail(data.value))\r\n\r\n }\r\n }\r\n return !isLoggedIn ? <>\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n Step 1\r\n

Please enter the email linked to your tickets.org.au account. If you logged in with Google or Facebook,\r\n use the email from that account. We will email you a login code which you can enter below.

\r\n\r\n
\r\n \r\n \r\n \r\n {isDeveloperMode &&\r\n Recent Email Requests\r\n
{recentEmails}
\r\n
}\r\n \r\n \r\n Email Address\r\n emailCapturedText.next(e.detail.value!)}/>\r\n \r\n \r\n\r\n \r\n \r\n requestEmail(setRequestingEmail)}>{requestingEmail ? 'Requesting Login Code....' : 'Send Login Code'}\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n \r\n Step 2\r\n

Please enter the login code you received via email in step 1

\r\n
\r\n\r\n \r\n \r\n Login Code\r\n shortCodeCapturedText.next(e.detail.value!)}/>\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n \r\n // todo - replace this with a custom component which wraps the path etc. \r\n // Hmmm.. you know, you could also just optionally render this in any components that were private as opposed to messing about with private routes.\r\n : \r\n};","import {Option} from \"fp-ts/Option\";\nimport {briefcase, cog, home, key, qrCode} from \"ionicons/icons\"; // https://ionic.io/ionicons/v4\nimport {FC} from \"react\";\nimport {CompanySelectPage} from \"../features/CompanySeletions/CompanySelectPage\";\nimport {EventScannerPage} from \"../features/EventScanner/EventScannerPage\";\nimport {HomePage} from \"../features/Home/HomePage\";\nimport {LoginPage} from \"../features/Login/LoginPage\";\nimport {SettingsPage} from \"../features/Settings/SettingsPage\";\nimport {EnumDictionary} from \"./ticketsCore.Tooling\";\n\n// Just a way for us to show and hide menu items base on other data. Add mode stuff. \nexport type OptionalPropertiesForMenuRendering\n= {\n companyCountForUser:number\n}\n\nexport enum PageName {\n events = \"Events\",\n settings = \"Settings\",\n login = \"Login\",\n //checkIn = \"CheckIn\",\n // counter = \"Counter\",\n // pingPong = \"PingPong\",\n selectCompany = \"Select Company\",\n eventScanner = \"Event Scanner\",\n //logOut = \"Logout\"\n}\n\ninterface PageSettingsBase {\n isSecure: boolean,\n url: string,\n iosIcon: string,\n mdIcon: string,\n title: string,\n showIfLoggedOn: boolean\n showIfNotLoggedOn: boolean,\n defaultPageTemplate:boolean,\n developerModeOnly:boolean,\n optionalDisplayFunction:(s:OptionalPropertiesForMenuRendering)=>boolean \n}\n\ninterface IPageSettings extends PageSettingsBase {\n pageName: PageName,\n $Template: FC<{}> // a non alpha first character lets you render it in JSX https://gist.github.com/mikeyamadeo/6bdbbfde7ff0e1c3cf3c \n}\n\n//const defaultPage: Pick = {requireLogin:true, title:'blah'} // demo for using multiple keys \ntype partialPages = 'isSecure' | 'showIfLoggedOn' | 'showIfNotLoggedOn' | 'defaultPageTemplate' | 'developerModeOnly' | 'optionalDisplayFunction'\nconst defaultSecurePage: Pick = {isSecure: true, showIfLoggedOn:true, showIfNotLoggedOn:false, defaultPageTemplate:true, developerModeOnly:false, optionalDisplayFunction:() => true}\nconst defaultUnsecuredPage: Pick = {isSecure: false, showIfLoggedOn:true, showIfNotLoggedOn:true, defaultPageTemplate:true, developerModeOnly:false, optionalDisplayFunction:()=>true}\n\nexport const PageSettings: EnumDictionary = {\n [PageName.login]: {...defaultUnsecuredPage, pageName: PageName.login, $Template: LoginPage, url:'/page/Login', iosIcon:key, mdIcon:key ,title:'Login', showIfLoggedOn:false},\n [PageName.settings]: {...defaultUnsecuredPage,...{pageName: PageName.settings, $Template: SettingsPage, url:'/page/Settings', iosIcon:cog, mdIcon:cog ,title:'Settings', developerModeOnly:true} },\n [PageName.events]: {...defaultSecurePage, ...{pageName: PageName.events, $Template: HomePage, url:'/page/Home', iosIcon:home, mdIcon:home ,title:'Events', defaultPageTemplate:false}},\n [PageName.selectCompany]: {...defaultSecurePage,...{pageName: PageName.selectCompany, $Template: CompanySelectPage, url:'/page/Company', iosIcon:briefcase, mdIcon:briefcase ,title:'Select Company'}, optionalDisplayFunction:(x)=>x.companyCountForUser > 1},\n [PageName.eventScanner]: {...defaultSecurePage,...{pageName: PageName.eventScanner, $Template: EventScannerPage, url:'/page/EventScanner', iosIcon:qrCode, mdIcon:qrCode ,title:'Scanner', developerModeOnly:true}},\n //[PageName.checkIn]: {...defaultSecurePage,...{pageName: PageName.checkIn, $Template: () => CheckIn({eventId:''}), url:'/page/Checkin/:eventId', iosIcon:briefcase, mdIcon:briefcase ,title:'Check In'}}\n // [PageName.counter]: {...defaultSecurePage,...{pageName: PageName.counter, $Template: Counter, url:'/page/Counter', iosIcon:calendarNumber, mdIcon:calendarNumber ,title:'Counter'}},\n // [PageName.pingPong]: { ...defaultSecurePage...{pageName: PageName.pingPong, $Template: PingPong, url:'/page/PingPong', iosIcon:calendarNumber, mdIcon:calendarNumber ,title:'Ping Pong'}},\n}\n\n","import {useParams} from 'react-router';\r\nimport React, {useState} from \"react\";\r\nimport {IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle, IonChip, IonDatetime, IonIcon, IonItem, IonLabel, IonList, IonSelect, IonSelectOption, IonToggle} from \"@ionic/react\";\r\nimport {$enum} from \"ts-enum-util\";\r\nimport {bookmarkOutline, mailOutline, mailSharp, moonOutline, calendarNumber, airplane} from 'ionicons/icons';\r\nimport {useAppDispatch, useAppSelector} from \"../../app/hooks\";\r\n\r\n\r\nimport {Environment} from \"../../app/environmentFunctions\";\r\nimport {setEnvironment} from \"../CommonActions/SettingsAndStorageActions\";\r\n\r\nconst selectOptions = {\r\n //header: 'Select a Location'\r\n};\r\n\r\nexport const SettingsPage: React.FC = (b) => {\r\n let activeEnvironment = (useAppSelector(x => x.loginSlice.activeEnvironment.environment))\r\n let dispatch = useAppDispatch()\r\n return (\r\n <>\r\n \r\n \r\n \r\n Note that some of these settings will just be for testing. I'll hide non appropraite ones away for production builds\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n dispatch(setEnvironment(e.detail.value))}>\r\n {$enum(Environment).map(x => (\r\n {x.toString()}\r\n\r\n ))}\r\n \r\n \r\n\r\n \r\n \r\n )\r\n}","import {IonButton, IonCard, IonCardContent, IonCol, IonContent, IonHeader, IonIcon, IonInput, IonLabel, IonProgressBar, IonRow, IonText, IonTitle, IonToolbar} from \"@ionic/react\";\nimport {isNone, isSome, none, Option, some} from \"fp-ts/Option\";\nimport {checkboxOutline, scan, search, squareOutline} from \"ionicons/icons\";\nimport React, {forwardRef, useEffect, useImperativeHandle, useRef, useState} from \"react\";\nimport {useHistory} from \"react-router-dom\";\nimport {BehaviorSubject} from \"rxjs\";\nimport {useAppDispatch, useAppSelector} from \"../../app/hooks\";\nimport {EnvironmentSettings} from \"../../app/ticketsCore.Tooling\";\nimport {CheckInOrderModel} from \"../../data/ticketsAPI/Models/CheckInOrderModels\";\nimport {SearchTicketCheckInModel} from \"../../data/ticketsAPI/Models/EventModels\";\nimport {AxiosRequest$} from \"../../data/user/tickets-auth-api\";\nimport {GetCheckinOrderFromOrderNumber, GetCheckinOrderFromQrCode} from \"../../data/user/tickets-http-requests\";\nimport {CheckInCard} from \"./CheckInCard\";\nimport {CheckInCard2} from \"./CheckInCard2\";\n\ndeclare let window: any;\n\nexport enum CheckInScannerPageMode {\n ShowingOrder = \"ShowingOrder\",\n NotShowingOrder = 'NotShowingOrder'\n}\n\n\ntype ErrorLabelRef = {\n setVisible: (status: boolean) => void\n setText: (text: string) => void\n} | null;\n\ntype ErrorLabelProps = {\n children?: React.ReactNode | null;\n};\n\n\n// https://stackoverflow.com/a/55889638/494635\n// https://www.tutorialspoint.com/reactjs-useimperativehandle-hook\n// Need to do this so that we can render only the child component without rendering the parent. \nconst OrderNumberErrorLabel = forwardRef((props, ref) => {\n const [visible, _setVisible] = useState(false);\n const [text, _setText] = useState('');\n\n useImperativeHandle(ref, () => {\n return {\n setVisible: _setVisible,\n setText: _setText\n }\n });\n return visible ? {text} :  \n});\n\n\n\ntype checkinProps = { eventId: string, activeEnvironment: EnvironmentSettings }\ntype displayModes = CheckInScannerPageMode.ShowingOrder | CheckInScannerPageMode.NotShowingOrder\nexport const CheckInScanner = ({eventId, activeEnvironment}: checkinProps) => {\n const isDeveloperMode = useAppSelector(x=>x.loginSlice.developerModeEnabled)\n const history = useHistory()\n const [isLoading, setIsLoading] = useState(false)\n const [globalError, setGlobalError] = useState>(none)\n const [orderSearchError, setOrderSearchError] = useState>(none) // because order text fires http on type, have a special error display. \n const dispatch = useAppDispatch()\n const [orderModel, setOrderModel] = useState>(none);\n const [orderNumber, setOrderNumber] = useState('')\n const shortCodeCapturedText = useRef(new BehaviorSubject('')) // if you don't useRef you get a new one on every render and it keeps resetting\n\n const orderNumberErrorLabel = useRef(null);\n const [scannerResult, setScannerResult] = useState('')\n const [scannerWasCancelled, setScannerWasCancelled] = useState('')\n const [showScanner, setShowScanner] = useState(false)\n\n const checkOrderForErrors = (model: CheckInOrderModel): { errorMessage: Option } => {\n if (model.eventId !== eventId) return {errorMessage: some('Order returned is for a different event')}\n return {errorMessage: none}\n }\n\n if (showScanner) {\n window.cordova.plugins.barcodeScanner.scan(\n (result: any) => {\n console.log(result)\n setShowScanner(false)\n setScannerResult(result.text)\n setScannerWasCancelled(result.cancelled)\n },\n (err: any) => console.error(err),\n {\n //preferFrontCamera: true, // iOS and Android\n showFlipCameraButton: true, // iOS and Android\n showTorchButton: true, // iOS and Android\n torchOn: false, // Android, launch with the torch switched on (if available)\n saveHistory: true, // Android, save scan history (default false)\n prompt: \"Place a barcode inside the scan area\", // Android\n resultDisplayDuration: 0, // Android, display scanned text for X ms. 0 suppresses it entirely, default 1500\n //formats : \"QR_CODE,PDF_417\", // default: all but PDF_417 and RSS_EXPANDED\n //formats:'all',\n orientation: \"portrait\", // Android only (portrait|landscape), default unset so it rotates with the device\n disableAnimations: true, // iOS\n disableSuccessBeep: false // iOS and Android\n }\n )\n }\n\n\n // In hindsight, could probably have just use setState for these, not rx. \n shortCodeCapturedText.current.subscribe(x => {\n if (!!orderNumberErrorLabel.current) orderNumberErrorLabel.current.setVisible(false)\n \n if (x.trim() !== orderNumber) {\n setOrderNumber(x)\n }\n })\n const mode = isSome(orderModel) ? CheckInScannerPageMode.ShowingOrder : CheckInScannerPageMode.NotShowingOrder\n const reset = () => {\n setScannerResult('')\n shortCodeCapturedText.current.next('')\n setOrderModel(none)\n setIsLoading(false)\n }\n \n const defaultPerson:SearchTicketCheckInModel = { ticketId: '',\n ticketTypeId: '',\n checkedIn: false,\n ticketTypeName: '',\n displayString: '',\n orderNumber: 0,\n rowNumber: 0,\n ticketNumber: '',\n emailOnOrder: '',\n ticketCancelled:false} // to do... need to populate for the individual search query (maybe... check) \n\n // scanner\n useEffect(() => {\n console.log('processing scanner', scannerResult)\n \n if (scannerResult.trim() === '') return\n //setIsLoading(true)\n const sub = AxiosRequest$(activeEnvironment, scannerResult, GetCheckinOrderFromQrCode, some(dispatch))\n .subscribe({\n next: next => {\n const check = checkOrderForErrors(next)\n setGlobalError(check.errorMessage) // both are Options\n if (isNone(check.errorMessage))\n setOrderModel(some(next))\n else\n setOrderModel(none)\n },\n error: e => {\n setGlobalError(some(e))\n setOrderModel(none)\n setIsLoading(false) \n },\n complete: () => {\n setIsLoading(false)\n }\n })\n\n return () => {\n sub.unsubscribe()\n };\n }, [scannerResult])\n\n // order number\n useEffect(() => {\n \n setGlobalError(none)\n if (orderNumber.trim() === '') return\n setIsLoading(true)\n const sub = AxiosRequest$(activeEnvironment, orderNumber, GetCheckinOrderFromOrderNumber, some(dispatch))\n .subscribe({\n next: next => {\n const check = checkOrderForErrors(next)\n if (isNone(check.errorMessage))\n setOrderModel(some(next))\n else\n setOrderModel(none)\n\n setIsLoading(false)\n },\n error: e => {\n setIsLoading(false) // don't know why... but the complete handler didn't catch it.\n orderNumberErrorLabel.current!.setVisible(true)\n orderNumberErrorLabel.current!.setText(`Unable to find order ${orderNumber}`)\n \n },\n complete: () => {\n setIsLoading(false)\n }\n })\n\n return () => {\n sub.unsubscribe()\n };\n }, [orderNumber])\n\n\n return \n \n {/**/}\n {/* Check In*/}\n {/**/}\n \n {isSome(globalError) && <>\n \n \n {globalError.value}\n \n {\n setGlobalError(none)\n }} color={'tertiary'}>\n \n Scan Again\n \n \n\n\n }\n {isNone(globalError) && mode === CheckInScannerPageMode.ShowingOrder &&
\n\n

\n \n \n Scan Again\n \n

\n {/*

*/}\n {/* */}\n {/* */}\n {/* Check In All*/}\n {/* */}\n {/*

*/}\n\n {isSome(orderModel) &&\n <>\n

{orderModel.value.eventName}

\n

Order: {orderModel.value.orderNumber}

\n\n {orderModel.value.tickets.map(t => <>\n\n \n )}\n \n }\n\n
}\n\n {isNone(globalError) && mode === CheckInScannerPageMode.NotShowingOrder &&
\n\n {\n setShowScanner(true)\n }} color={'primary'}>\n \n Scan QR Code\n \n\n\n \n\n {isDeveloperMode && {\n shortCodeCapturedText.current.next('77563')\n }} color={'secondary'}>\n Load Temp Order\n }\n \n \n {isDeveloperMode && {\n setScannerResult('Ydbjrru8ZEi_JxONL-OIEQ')\n }} color={'secondary'}>\n Test Scan Fake BarCode\n }\n\n {isDeveloperMode && <>\n

Or

\n

\n Enter Order Number\n shortCodeCapturedText.current.next(e.detail.value!)}/>\n

\n\n \n }\n \n
\n \n }\n {isLoading && }\n\n
\n}\n\n","import React from \"react\";\nimport {useAppSelector} from \"../../app/hooks\";\nimport {ValueOrEmpty} from \"../../app/ticketsCore\";\nimport {EventList} from \"../Events/EventList\";\n// https://upmostly.com/tutorials/build-an-infinite-scroll-component-in-react-using-react-hooks\n// https://www.digitalocean.com/community/tutorials/react-react-infinite-scroll\n\nexport const HomePage = () => {\n const activeEnvironment = useAppSelector(x => x.loginSlice.activeEnvironment)\n return \n}\n","import {IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle, IonIcon, IonItem, IonList, IonSelect, IonSelectOption} from \"@ionic/react\";\r\nimport {pipe} from \"fp-ts/function\";\r\nimport {fromNullable} from \"fp-ts/Option\";\r\nimport * as O from \"fp-ts/Option\";\r\nimport {briefcase, moonOutline} from \"ionicons/icons\";\r\nimport React, {MouseEventHandler, useState} from \"react\";\r\nimport {useHistory} from \"react-router-dom\";\r\nimport {useAppDispatch, useAppSelector} from \"../../app/hooks\";\r\nimport {setCompanyId} from \"../CommonActions/SettingsAndStorageActions\";\r\n\r\nexport const CompanySelectPage: React.FC = (b) => {\r\n let dispatch = useAppDispatch()\r\n let [forceRedirect, setforceRedirect] = useState(false)\r\n //const storageInitialised = useAppSelector(x => x.storageSlice.storageInitialised) \r\n const companies = useAppSelector(x => pipe(x.loginSlice.activeUserDetails, O.map(x => x.companyDetails), O.match(() => [], a => a)))\r\n const history = useHistory()\r\n if (forceRedirect) {\r\n history.push('/page/Home')\r\n setforceRedirect(false)\r\n }\r\n\r\n let dispatch1 = (companyId: string) => {\r\n dispatch(setCompanyId({companyId: fromNullable(companyId)}));\r\n setforceRedirect(true)\r\n\r\n }\r\n return <>\r\n {companies.map(x => (\r\n dispatch1(x.companyId)}>\r\n\r\n \r\n {x.companyName}\r\n {/* Could possibly put something here like a summary of your access level*/}\r\n \r\n\r\n\r\n \r\n\r\n ))}\r\n\r\n \r\n}","import {IonButton} from \"@ionic/react\";\nimport React, {useState} from \"react\";\nimport {useAppSelector} from \"../../app/hooks\";\n\ndeclare let window: any;\ntype checkinPageProps = {}\nexport const EventScannerPage = () => {\n const activeEnvironment = useAppSelector(x => x.loginSlice.activeEnvironment)\n const [result, setResult] = useState('')\n const [format, setFormat] = useState('')\n const [cancelled, setCancelled] = useState('')\n const [showScanner, setShowScanner] = useState(false)\n if (showScanner) {\n window.cordova.plugins.barcodeScanner.scan(\n (result: any) => {\n console.log(result)\n setShowScanner(false)\n setResult(result.text)\n setFormat(result.format)\n setCancelled(result.cancelled)\n\n },\n (err: any) => console.error(err),\n {\n //preferFrontCamera: true, // iOS and Android\n showFlipCameraButton: true, // iOS and Android\n showTorchButton: true, // iOS and Android\n torchOn: false, // Android, launch with the torch switched on (if available)\n saveHistory: true, // Android, save scan history (default false)\n prompt: \"Place a barcode inside the scan area\", // Android\n resultDisplayDuration: 0, // Android, display scanned text for X ms. 0 suppresses it entirely, default 1500\n //formats : \"QR_CODE,PDF_417\", // default: all but PDF_417 and RSS_EXPANDED\n //formats:'all',\n orientation: \"portrait\", // Android only (portrait|landscape), default unset so it rotates with the device\n disableAnimations: true, // iOS\n disableSuccessBeep: false // iOS and Android\n }\n )\n }\n\n return <>\n
Event Scanner
\n

{result}

\n

{format}

\n setShowScanner(true)}>Show Scanner\n \n}\n\n/*\n\nhttps://capacitorjs.com/docs/v2/cordova/known-incompatible-plugins\nhttps://github.com/ionic-team/capacitor/issues/1213\n\nlooks like you have to use a PhoneGap Scanner\nhttps://github.com/ionic-team/capacitor/issues/1213#issuecomment-461858292\n\nRead this. \nhttps://enappd.com/blog/qr-code-and-barcode-scanning-with-ionic-capacitor/127/\n\n\n */\n","import {menuController} from '@ionic/core'\r\nimport {IonButton, IonIcon, IonItem} from \"@ionic/react\";\r\nimport {none} from \"fp-ts/Option\";\r\nimport {exit, happy} from \"ionicons/icons\";\r\nimport React, {useState} from \"react\";\r\nimport {useHistory} from \"react-router-dom\";\r\nimport {useAppDispatch, useAppSelector} from \"../../app/hooks\";\r\nimport {processUserDetailsFromServer} from \"../CommonActions/SettingsAndStorageActions\";\r\nimport {useIsLoggedIn} from \"./UseIsLoggedIn\";\r\n\r\ntype logoutProps = {menuController:typeof menuController}\r\n\r\n// I don't think that this menuController is actually passing down an instance. I suspect that it's ambient. There's this https://github.com/ionic-team/ionic-framework/blob/8e0e5da7407adecb7471b3a6b0ac059337761355/angular/src/providers/menu-controller.ts\r\n// but I'm not sure if that's for Angular only....\r\n// Looks like you can get instances with this menuController.getMenus().then(console.log) \r\nexport const Logout = ({menuController}:logoutProps) => {\r\n const isLoggedIn = useIsLoggedIn()\r\n const activeEnvironment = useAppSelector(x=>x.loginSlice.activeEnvironment.environment)\r\n const [confirmMode, setConfirmMode] = useState(false)\r\n const history = useHistory() // typing from https://stackoverflow.com/questions/49342390/typescript-how-to-add-type-check-for-history-object-in-react\r\n const dispatch = useAppDispatch();\r\n \r\n\r\n return confirmMode\r\n ? <>\r\n \r\n \r\n {\r\n dispatch(processUserDetailsFromServer({userData: none, environment:activeEnvironment}))\r\n setConfirmMode(false)\r\n history.push('/page/Login')\r\n menuController.close().then()\r\n }}>Confirm Log Out?\r\n \r\n \r\n \r\n {\r\n setConfirmMode(false)\r\n }}>Stay Logged In\r\n \r\n\r\n \r\n : <>\r\n \r\n \r\n {\r\n setConfirmMode(true)\r\n }}>Log out\r\n \r\n \r\n\r\n};\r\n","//import {appPages} from \"./AppPages\";\r\nimport {menuController} from '@ionic/core'\r\nimport {getConfig, IonContent, IonIcon, IonImg, IonItem, IonLabel, IonList, IonMenu, IonNote, IonToggle,} from '@ionic/react';\r\nimport {pipe} from \"fp-ts/function\";\r\nimport * as O from \"fp-ts/Option\";\r\nimport {moonOutline} from 'ionicons/icons';\r\nimport React from \"react\";\r\nimport {useLocation} from 'react-router-dom';\r\nimport {$enum} from \"ts-enum-util\";\r\nimport {filter} from 'lodash'\r\nimport {useAppDispatch, useAppSelector} from '../app/hooks'\r\nimport {OptionalPropertiesForMenuRendering, PageName, PageSettings} from \"../app/ticketsCore.pageSettings\"\r\nimport {EnvironmentSettings} from \"../app/ticketsCore.Tooling\";\r\nimport {setDarkMode} from \"../features/CommonActions/SettingsAndStorageActions\";\r\nimport {tapLogoForSecretCode} from \"../features/Login/LoginSlice\";\r\nimport {Logout} from \"../features/Login/Logout\";\r\nimport {CompanySelector} from \"../features/Settings/CompanySelector\";\r\nimport './Menu.css';\r\nimport {phoneModes} from \"../features/Settings/settingsSlice\";\r\n\r\nexport const LoggedInEmailComponent = () => {\r\n const userDetails = useAppSelector(x => x.loginSlice.activeUserDetails)\r\n const email = pipe(userDetails, O.match(() => 'Not Logged In', a => a.email))\r\n return {email}\r\n}\r\n\r\nexport const SelectedCompanyComponent = () => {\r\n \r\n const activeUserDetails = useAppSelector(x => x.loginSlice.activeUserDetails)\r\n const companies = pipe(activeUserDetails, O.match(() => [], ud => ud.companyDetails))\r\n const selectedCompany = useAppSelector(x => pipe(x.loginSlice.activeEnvironment.selectedCompany, O.match(() => '', x2 => filter(companies, x=>x.companyId == x2)[0]?.companyName ?? 'not found')))\r\n return {selectedCompany}\r\n}\r\n\r\ntype MenuProps = { isLoggedIn: boolean, environment:EnvironmentSettings }\r\nconst Menu = ({isLoggedIn, environment}: MenuProps) => {\r\n const location = useLocation();\r\n const darkMode = useAppSelector(x => x.settingsSlice.darkMode)\r\n const companyCount =useAppSelector(x => x.loginSlice.companyCountForUser)\r\n let mode = getConfig()?.get('mode') || 'md' as phoneModes\r\n const isDarkModeEnabled = () => darkMode === 'dark'\r\n const dispatch = useAppDispatch();\r\n const renderCheckProp = {companyCountForUser:companyCount} as OptionalPropertiesForMenuRendering\r\n const toggleDarkMode = () => {\r\n menuController.close().then()\r\n isDarkModeEnabled() ? dispatch(setDarkMode('light')) : dispatch(setDarkMode('dark'))\r\n }\r\n const isDeveloperMode = useAppSelector(x=>x.loginSlice.developerModeEnabled)\r\n return (\r\n \r\n \r\n \r\n dispatch(tapLogoForSecretCode())} />\r\n \r\n\r\n {/* I took this out so that the menu didn't auto close when I clicked the logout button */}\r\n\r\n \r\n

\r\n

\r\n {/**/}\r\n {$enum(PageName)\r\n .map(x => PageSettings[x])\r\n .filter(x => ((isLoggedIn && x.showIfLoggedOn) \r\n || (!isLoggedIn && x.showIfNotLoggedOn))\r\n && (!x.developerModeOnly || isDeveloperMode)\r\n && x.optionalDisplayFunction(renderCheckProp)\r\n )\r\n .map((s, index) =>\r\n menuController.close()}\r\n >\r\n \r\n {`${s.title}`}\r\n \r\n )}\r\n\r\n \r\n {/*Hook into the dark mode OS level setting on IOS. See app.tsx and https://ionicframework.com/docs/theming/dark-mode*/}\r\n {mode == 'md' && \r\n \r\n toggleDarkMode()}>Dark Mode\r\n toggleDarkMode()}/>\r\n }\r\n\r\n {isLoggedIn && }\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 Menu;\r\n\r\n\r\n","import {getConfig} from '@ionic/react'\r\nimport {createSlice, PayloadAction} from \"@reduxjs/toolkit\";\r\nimport {isSome, Option} from \"fp-ts/Option\";\r\nimport {Environment, GetEnvironmentSettings, initialEnvironment} from \"../../app/environmentFunctions\";\r\nimport {EnvironmentFunctions, EnvironmentSettings} from \"../../app/ticketsCore.Tooling\";\r\nimport {darkModeValues, setDarkMode, setEnvironment, stateRetrievedFromStorage, StoredData} from \"../CommonActions/SettingsAndStorageActions\";\r\n\r\nexport type phoneModes = 'ios' | 'md'\r\n\r\nexport interface SettingsState {\r\n selectedEnvironment: Environment,\r\n darkMode: darkModeValues,\r\n mode: phoneModes\r\n}\r\n\r\nexport const initialState: SettingsState = {\r\n selectedEnvironment: initialEnvironment,\r\n darkMode: \"dark\",\r\n mode: 'md'\r\n};\r\n\r\nexport const settingsSlice = createSlice({\r\n name: 'settings',\r\n initialState,\r\n reducers: {\r\n setPhoneMode: (state, action: PayloadAction) => {\r\n state.mode = action.payload\r\n },\r\n },\r\n\r\n extraReducers: (builder) => {\r\n\r\n builder.addCase(setDarkMode, (state, action: PayloadAction) => {\r\n state.darkMode = action.payload\r\n })\r\n\r\n builder.addCase(setEnvironment, (state, action: PayloadAction) => {\r\n state.selectedEnvironment = action.payload\r\n })\r\n\r\n builder.addCase(stateRetrievedFromStorage, (state, action: PayloadAction>) => {\r\n if (isSome(action.payload)) {\r\n let ap = action.payload.value\r\n state.darkMode = ap.darkMode\r\n state.selectedEnvironment = ap.environment\r\n } else\r\n state = {...initialState}\r\n })\r\n }\r\n});\r\n\r\n// Export the actionCreators\r\nexport const {setPhoneMode} = settingsSlice.actions;\r\n// export const epics = [pingEpic, pongEpic]\r\n\r\n// export the reducer\r\nexport default settingsSlice.reducer;\r\n","import {IonCard, IonCardContent, IonCardHeader, IonCardTitle, IonCol, IonIcon, IonLabel, IonProgressBar, IonRippleEffect, IonRow} from '@ionic/react';\nimport {some} from \"fp-ts/Option\";\nimport {checkboxOutline, squareOutline} from \"ionicons/icons\";\nimport React, {useState} from \"react\";\nimport {useHistory} from \"react-router-dom\";\nimport {useAppDispatch} from \"../../app/hooks\";\nimport {EnvironmentSettings} from \"../../app/ticketsCore.Tooling\";\nimport {SearchTicketCheckInModel} from \"../../data/ticketsAPI/Models/EventModels\";\nimport {AxiosRequest$} from \"../../data/user/tickets-auth-api\";\nimport {CheckInTicket} from \"../../data/user/tickets-http-requests\";\nimport './CheckInCard.css'\n\ntype checkinCardProps = { person: SearchTicketCheckInModel, activeEnvironment: EnvironmentSettings }\nexport const CheckInCard2 = ({person, activeEnvironment}: checkinCardProps) => {\n const history = useHistory()\n const [isLoading, setIsLoading] = useState(false)\n const [isCheckedIn, setIsCheckedIn] = useState(person.checkedIn)\n const dispatch = useAppDispatch()\n const processClick = (p: SearchTicketCheckInModel) => {\n if (isLoading) return\n setIsLoading(true)\n AxiosRequest$(activeEnvironment, {ticketId: person.ticketId, checkedIn: !isCheckedIn}, CheckInTicket, some(dispatch)).subscribe({\n next: x => {\n setIsLoading(false)\n setIsCheckedIn(x => !x)\n }, error: () => {\n setIsLoading(false)\n }, complete: () => {\n }\n })\n }\n return <>\n {\n processClick(person)\n }}>\n \n \n \n

{person.displayString} - {person.ticketNumber}

\n
\n\n \n {person.ticketCancelled ? 'Cancelled' : ''}\n \n\n \n {isCheckedIn ? : }\n \n
\n \n \n {person.ticketTypeName}\n \n \n {isLoading && }\n
\n
\n\n \n}","import {menuController, ScrollDetail, SearchbarChangeEventDetail} from \"@ionic/core\";\r\nimport {IonButton, IonButtons, IonContent, IonHeader, IonIcon, IonItem, IonLabel, IonMenuButton, IonPage, IonProgressBar, IonSearchbar, IonTitle, IonToggle, IonToolbar} from \"@ionic/react\";\r\nimport {isSome, none, Option, some} from \"fp-ts/Option\";\r\nimport {arrowBackCircle, moonOutline, people, search} from \"ionicons/icons\";\r\nimport _, {debounce} from \"lodash\";\r\nimport React, {useEffect, useRef, useState} from \"react\";\r\nimport {useHistory} from \"react-router-dom\";\r\nimport {mergeMap} from \"rxjs/operators\";\r\nimport {useAppDispatch, useAppSelector} from \"../../app/hooks\";\r\nimport {PageName, PageSettings} from \"../../app/ticketsCore.pageSettings\";\r\nimport {EnvironmentSettings} from \"../../app/ticketsCore.Tooling\";\r\nimport {SearchTicketCheckInModel, SearchTicketsParams} from \"../../data/ticketsAPI/Models/EventModels\";\r\nimport {AxiosRequest$} from \"../../data/user/tickets-auth-api\";\r\nimport {GetTicketTypeIds, SearchTickets} from \"../../data/user/tickets-http-requests\";\r\nimport {setDarkMode} from \"../CommonActions/SettingsAndStorageActions\";\r\nimport {CheckInCard} from \"./CheckInCard\";\r\nimport {CheckInCard2} from \"./CheckInCard2\";\r\n\r\ntype checkinProps = { eventId: string, activeEnvironment: EnvironmentSettings }\r\nexport const CheckInList = ({eventId, activeEnvironment}: checkinProps) => {\r\n const history = useHistory()\r\n const pageSize = 10\r\n console.log('event list')\r\n const ios = useAppSelector(x => x.settingsSlice.mode) === 'ios';\r\n \r\n const [isLoading, setIsLoading] = useState(true)\r\n //const [searchText, setSearchText] = useState('')\r\n const [allLoaded, setAllLoaded] = useState(false)\r\n const [error, setError] = useState>(none)\r\n const [includePeopleCheckedIn, setIncludePeopleCheckedIn] = useState(true)\r\n const searchParams: SearchTicketsParams = {\"pageSize\": pageSize, \"pageIndex\": 1, \"searchTerm\": \"\", eventId: eventId, searchOnNameOnly: true, showCheckedIn: includePeopleCheckedIn, showNotCheckedIn: true, ticketTypeIds: []}\r\n const [responseEventHeaders, setResponseEventHeaders] = useState([])\r\n const dispatch = useAppDispatch()\r\n const [requestPayload, setRequestPayload] = useState(searchParams)\r\n const [lastPageLoaded, setLastPageLoaded] = useState(0)\r\n const content = useRef(null) //https://linguinecode.com/post/how-to-use-react-useref-with-typescript\r\n const homePage = PageSettings[PageName.events]\r\n\r\n\r\n const toggleShowCheckiedIn = () => {\r\n reset()\r\n setIncludePeopleCheckedIn(x=>!x)\r\n setRequestPayload(x => ({...x, showCheckedIn:!x.showCheckedIn, pageIndex: 1}))\r\n }\r\n \r\n function reset() {\r\n setResponseEventHeaders([])\r\n setIsLoading(true)\r\n setLastPageLoaded(1)\r\n setAllLoaded(false)\r\n }\r\n\r\n let searchText = (e: CustomEvent) => {\r\n reset()\r\n setRequestPayload(e2 => ({...e2, searchTerm: e.detail.value!, pageIndex: 1}))\r\n }\r\n\r\n const trackScrollInternal = debounce(async (e: CustomEvent) => {\r\n //https://stackoverflow.com/questions/61886891/how-to-get-maximum-scroll-height-for-ion-content\r\n const elem = content.current!\r\n const scrollElement = await (elem as any).getScrollElement()\r\n const scrollPosition = e.detail.scrollTop;\r\n const totalContentHeight = scrollElement.scrollHeight;\r\n const viewportHeight = elem.getBoundingClientRect().top + elem.offsetHeight; // I think that elem.ClientHeight returns the same\r\n const percentage = scrollPosition / (totalContentHeight - viewportHeight);\r\n const distanceFromBottom = (totalContentHeight - viewportHeight) - scrollPosition\r\n\r\n if (distanceFromBottom < 1000 && lastPageLoaded === requestPayload.pageIndex && !allLoaded) {\r\n setIsLoading(true)\r\n setRequestPayload(e => ({...e, pageIndex: e.pageIndex + 1}))\r\n }\r\n }, 100)\r\n\r\n\r\n useEffect(function () {\r\n if (isSome(error)) return\r\n console.log('i will be there', includePeopleCheckedIn, requestPayload)\r\n const sub = AxiosRequest$(activeEnvironment, {eventId: eventId}, GetTicketTypeIds, some(dispatch))\r\n .pipe(mergeMap(x => AxiosRequest$(activeEnvironment, {...requestPayload, ticketTypeIds: _.map(x, x2 => x2.ticketTypeId)}, SearchTickets, some(dispatch))))\r\n .subscribe({\r\n next: next => {\r\n setResponseEventHeaders(x => [...x, ...next])\r\n if (next.length < requestPayload.pageSize) setAllLoaded(true)\r\n setLastPageLoaded(requestPayload.pageIndex)\r\n },\r\n error: e => {\r\n setError(some(e))\r\n },\r\n complete: () => {\r\n setIsLoading(false)\r\n }\r\n })\r\n\r\n return () => {\r\n sub.unsubscribe()\r\n };\r\n }, [requestPayload, activeEnvironment, eventId, error])\r\n\r\n return <>\r\n searchText(e)}/>\r\n \r\n \r\n toggleShowCheckiedIn()}>Include People Checked In \r\n toggleShowCheckiedIn()}/>\r\n \r\n \r\n \r\n trackScrollInternal(e)} className=\"\">\r\n {/*See https://ionicframework.com/docs/api/header for details on passing undefined vs 'collapse'. This affects the headings. */}\r\n \r\n \r\n Check In\r\n \r\n \r\n
\r\n {isSome(error)\r\n ?
{error.value}
\r\n : (<>\r\n {responseEventHeaders.map(e => ())}\r\n {isLoading && }\r\n\r\n )}\r\n
\r\n
\r\n \r\n}\r\n\r\n","import {getConfig, IonButton, IonButtons, IonHeader, IonIcon, IonPage, IonSearchbar, IonSegment, IonSegmentButton, IonTitle, IonToolbar} from \"@ionic/react\";\nimport {arrowBackCircle} from \"ionicons/icons\";\nimport React, {useState} from \"react\";\nimport {useHistory} from \"react-router-dom\";\nimport {useAppSelector} from \"../../app/hooks\";\nimport {PageName, PageSettings} from \"../../app/ticketsCore.pageSettings\";\nimport {EventPageModes} from \"../Events/EventList\";\nimport {phoneModes} from \"../Settings/settingsSlice\";\nimport {CheckInList} from \"./CheckInList\";\nimport {CheckInScanner} from \"./CheckinScanner\";\nimport {EventSalesDetails} from \"./EventSalesDetails\";\n// https://upmostly.com/tutorials/build-an-infinite-scroll-component-in-react-using-react-hooks\n// https://www.digitalocean.com/community/tutorials/react-react-infinite-scroll\ntype checkinPageProps = { eventId: string }\n\n\nexport enum CheckInPageModes {\n Search = \"Search\",\n Scan = 'Scan',\n Details= 'Details'\n \n \n}\n\ntype displayModes = CheckInPageModes.Search | CheckInPageModes.Scan | CheckInPageModes.Details\nexport const CheckInPage = ({eventId}: checkinPageProps) => {\n const activeEnvironment = useAppSelector(x => x.loginSlice.activeEnvironment)\n const [segment, setSegment] = useState(CheckInPageModes.Scan);\n const history = useHistory()\n let mode = getConfig()?.get('mode') || 'md' as phoneModes\n\n return \n \n \n \n \n history.push(`/page/Home`)}>\n \n \n \n {mode == 'md' && Check In} \n {\n setSegment(e.detail.value as any)\n }}>\n \n {CheckInPageModes.Search}\n \n \n {CheckInPageModes.Scan}\n \n \n {CheckInPageModes.Details}\n \n \n \n \n\n \n\n \n {segment === CheckInPageModes.Search && }\n {segment === CheckInPageModes.Scan && }\n {segment === CheckInPageModes.Details && }\n \n \n}\n\n","import {sum} from 'lodash'\nimport {IonCard, IonCardHeader, IonCardSubtitle, IonCardTitle, IonContent, IonHeader, IonProgressBar, IonTitle, IonToolbar} from \"@ionic/react\";\nimport {isSome, none, Option, some,fromNullable} from \"fp-ts/Option\";\nimport React, {useEffect, useRef, useState} from \"react\";\nimport {useHistory} from \"react-router-dom\";\nimport {useAppDispatch, useAppSelector} from \"../../app/hooks\";\nimport {PageName, PageSettings} from \"../../app/ticketsCore.pageSettings\";\nimport {EnvironmentSettings} from \"../../app/ticketsCore.Tooling\";\nimport {SearchTicketsParams} from \"../../data/ticketsAPI/Models/EventModels\";\nimport {TicketsCheckedInPhoneModel, TicketSoldPhoneModel} from \"../../data/ticketsAPI/Models/TicketsSoldModel\";\nimport {AxiosRequest$} from \"../../data/user/tickets-auth-api\";\nimport {GetTicketsCheckedIn, GetTicketsSold} from \"../../data/user/tickets-http-requests\";\n\ntype checkinProps = { eventId: string, activeEnvironment: EnvironmentSettings }\nexport const EventSalesDetails = ({eventId, activeEnvironment}: checkinProps) => {\n const history = useHistory()\n const pageSize = 10\n console.log('event list')\n const ios = useAppSelector(x => x.settingsSlice.mode) === 'ios';\n const searchParams: SearchTicketsParams = {\"pageSize\": pageSize, \"pageIndex\": 1, \"searchTerm\": \"\", eventId: eventId, searchOnNameOnly: true, showCheckedIn: true, showNotCheckedIn: true, ticketTypeIds: []}\n const [isLoading, setIsLoading] = useState(true)\n const [time, setTime] = useState('')\n const [error, setError] = useState>(none)\n const [ticketsCheckedInModel, setTicketsCheckedInModel] = useState>(none)\n const dispatch = useAppDispatch()\n const now = new Date()\n\n\n useEffect(function () {\n if (isSome(error)) return\n setTime(`in use effect ${now.getUTCHours()} ${now.getUTCMinutes()} ${now.getUTCSeconds()} ${now.getUTCMilliseconds()}`)\n const sub = AxiosRequest$(activeEnvironment, eventId, GetTicketsCheckedIn, some(dispatch))\n .subscribe({\n next: next => {\n setTicketsCheckedInModel(x => fromNullable(next))\n },\n error: e => {\n setError(some(e))\n },\n complete: () => {\n setIsLoading(false)\n }\n })\n\n return () => {\n sub.unsubscribe()\n };\n }, [activeEnvironment, eventId, error])\n\n\n const content = useRef(null) //https://linguinecode.com/post/how-to-use-react-useref-with-typescript\n const homePage = PageSettings[PageName.events]\n\n if (isSome(ticketsCheckedInModel))\n return \n

{ticketsCheckedInModel.value.eventName}

\n

{ticketsCheckedInModel.value.startDate}

\n
Total Attendees: {sum(ticketsCheckedInModel.value.items.map(x=> x.checkedIn + x.notCheckedIn))}
\n
Checked In: {sum(ticketsCheckedInModel.value.items.map(x=> x.checkedIn))}
\n
Not Checked In: {sum(ticketsCheckedInModel.value.items.map(x=> x.notCheckedIn))}
\n \n {ticketsCheckedInModel.value.items.map(x =>\n \n \n \n {x.name}\n \n Checked In: {x.checkedIn}\n Remaining: { x.notCheckedIn}\n Total: {x.checkedIn + x.notCheckedIn}\n \n \n )}\n\n {isLoading && }\n
\n else\n return \n {isLoading &&
\n

Getting Check In Details

\n
}\n
\n}\n\n\n// dispatch1(x.companyId)}>\n//\n// \n// {x.companyName}\n// {/* Could possibly put something here like a summary of your access level*/}\n// \n//\n//\n// ","import {IonButton, IonButtons, IonContent, IonHeader, IonIcon, IonMenuButton, IonPage, IonSearchbar, IonTitle, IonToolbar} from '@ionic/react';\nimport {search} from \"ionicons/icons\";\nimport React, {useRef} from \"react\";\nimport {useHistory} from \"react-router-dom\";\nimport * as ps from \"../app/ticketsCore.pageSettings\";\nimport {useIsLoggedIn} from \"../features/Login/UseIsLoggedIn\";\nimport './Page.css';\n\n\ntype PageProps = { pageName: string }\n\n//const Page: React.FC = () => {\nexport const Page = ({pageName}: PageProps) => {\n const pageSettings = ps.PageSettings[pageName as ps.PageName]\n const isLoggedIn = useIsLoggedIn()\n const content = useRef(null)\n const history = useHistory() // typing from https://stackoverflow.com/questions/49342390/typescript-how-to-add-type-check-for-history-object-in-react\n\n if (!isLoggedIn && pageSettings.isSecure)\n history.push('/page/Login')\n \n return (\n \n \n \n \n \n \n {pageSettings.pageName}\n \n \n\n {pageSettings.defaultPageTemplate\n ? \n \n \n {pageSettings.pageName}\n \n \n\n\n
\n \n
\n
\n : \n }\n
\n );\n};\n\nexport default Page;\n","import {createAnimation, getConfig, IonRouterOutlet} from \"@ionic/react\";\nimport {Redirect, Route} from \"react-router-dom\";\nimport {CheckInList} from \"./features/Checkin/CheckInList\";\nimport {CheckInPage} from \"./features/Checkin/CheckInPage\";\nimport {phoneModes} from \"./features/Settings/settingsSlice\";\nimport Page from \"./pages/Page\";\nimport LearningPageWrapper, {TestPages} from \"./features/LearningReactPatterns/LearningPageWrapper\";\nimport {useAppSelector} from \"./app/hooks\";\nimport {PageName, PageSettings} from \"./app/ticketsCore.pageSettings\"\nimport {$enum} from \"ts-enum-util\";\nimport {home} from \"ionicons/icons\";\nimport {HomePage} from \"./features/Home/HomePage\";\nimport {LoginPage} from \"./features/Login/LoginPage\";\nimport {LocationState} from \"@ionic/react-router/dist/types/ReactRouter/IonRouter\";\n\n// export type routeState = { fromLocation: LocationState }\ntype privateRouteProps = { path: string, exact: boolean, isLoggedIn: boolean }\n// A wrapper for that redirects to the login screen if you're not yet authenticated.\n// Do not delete.... didn't get this working... yet... but need to get something similar going.\n// What's more, not sure if this works with Ionic's implementation of the router, or is better for later versions of standard react router. \n// See my question here https://forum.ionicframework.com/t/routerlink-not-firing-redirects/211412\nconst PrivateRoute: React.FC = ({isLoggedIn, children, ...rest}) => {\n return ( {\n // This totally did my head in. I was passing location to Redirect and it was causing an enedless loop. https://stackoverflow.com/questions/68030679/error-maximum-update-depth-exceeded-again\n // Note also that this PrivateRoute is still being called for non private routes. I think because of this https://reactrouter.com/web/api/match/null-matches.\n return isLoggedIn\n ? children\n : \n }}\n />)\n};\n\n\nexport type routeProps = { isLoggedIn: boolean }\nexport const Routes = ({isLoggedIn}: routeProps) => {\n // https://medium.com/nerd-for-tech/ionic-react-implementing-custom-page-transition-animation-48aa3086e9da\n const animationBuilder = (baseEl:unknown, opts:any) => {\n const enteringAnimation = createAnimation()\n .addElement(opts.enteringEl)\n .fromTo('opacity', 0, 1)\n .duration(250);\n\n const leavingAnimation = createAnimation()\n .addElement(opts.leavingEl)\n .fromTo('opacity', 1, 0)\n .duration(250);\n\n const animation = createAnimation()\n .addAnimation(enteringAnimation)\n .addAnimation(leavingAnimation);\n\n return animation;\n };\n // https://ionicframework.com/docs/react/navigation \n // https://forum.ionicframework.com/t/best-practice-for-react-routing/192100/14\n let mode = getConfig()?.get('mode') || 'md' as phoneModes\n // IOS didn't really work well with the sliding animation (but it was great on Android).\n return (\n \n \n \n\n {/*Dear future me. */}\n {/*I believe that you have to route to a component with a full IonPage, IonHeader etc... if you don't then the url updates but it doesn't navigate on click. */}\n \n \n (\n \n )} />\n \n {$enum(PageName)\n .map(x => PageSettings[x])\n .map((appPage, index) =>\n {\n //let k = `${appPage.url}-${isLoggedIn}`\n let k = `${appPage.url}`\n // THIS IS HACKAGE AND IS INSCURE IN THE BROWSER\n // After days of trying I couldn't get the secure routes to work. they worked first pass through, then after I logged out and in they failed. \n // Seing as we're deploying to a phone, it doesn't really matter because there is no url bar. So, just enable all routes for now, and hide the menus when they're not logged in \n // :-(\n // PATCH: Have a look at the top of Page.tsx. I put in a simple check that re-routes to login if required. This works, without us having to adjust the routes. That is, \n // this is using 'dynamic' routes instead of 'static'. \n // Note that seems really buggy. Manually calling functions on the history object seems ok though. \n return appPage.isSecure && false\n // See my comments on PrivateRoute. I'm going to leave this in, but also hide the links to private routes \n ? \n \n \n : \n // return \n \n })\n }\n \n \n\n )\n}\n","import {fromNullable, isNone} from \"fp-ts/Option\";\r\nimport {phoneModes, setPhoneMode} from \"../features/Settings/settingsSlice\";\r\nimport {useAppDispatch} from \"./hooks\";\r\nimport {TicketsSingletons} from \"./ticketsCore\";\r\nimport {Drivers, Storage} from '@ionic/storage';\r\nimport * as CordovaSQLiteDriver from 'localforage-cordovasqlitedriver';\r\nimport {getConfig} from '@ionic/react'\r\n\r\nconst currentDbVersion = '65AD52F1-C470-4013-BF01-77DF3940B62F'\r\n\r\nexport async function ClearDataBaseOnToken(storage: Storage)\r\n{\r\n const k = 'dbVersion'\r\n const current = fromNullable(await storage.get(k))\r\n if (isNone(current) || current.value !== currentDbVersion)\r\n {\r\n await storage.clear()\r\n await storage.set(k, currentDbVersion)\r\n }\r\n}\r\n\r\nexport async function RunSetup(): Promise {\r\n \r\n let result: TicketsSingletons = {\r\n storage: new Storage({\r\n name: '__tickets_org_db',\r\n driverOrder: [CordovaSQLiteDriver._driver,Drivers.IndexedDB, Drivers.LocalStorage]\r\n })\r\n }\r\n try {\r\n \r\n \r\n result.storage = await result.storage.create()\r\n\r\n } catch (error) {\r\n console.log('ERROR!!!!', error)\r\n }\r\n return result\r\n\r\n\r\n //Singletons = result\r\n\r\n // to do... put a catch?\r\n\r\n //SplashScreen.hide().finally();\r\n //axios.defaults.adapter = require('axios/lib/adapters/http');\r\n\r\n\r\n /// perhaps don't use redux to load initial state?\r\n\r\n\r\n}\r\n\r\n","import {createSlice, PayloadAction} from \"@reduxjs/toolkit\";\r\nimport {fromNullable, none, Option} from \"fp-ts/Option\";\r\nimport {ofType, StateObservable} from \"redux-observable\";\r\nimport * as rxjs from \"rxjs\";\r\nimport {from, Observable} from \"rxjs\";\r\nimport {catchError, endWith, map, mapTo, mergeMapTo, startWith, switchMap, tap} from \"rxjs/operators\";\r\nimport {RootState} from \"../../app/store\";\r\nimport {processUserDetailsFromServer, setCompanyId, setDarkMode, setEnvironment, stateRetrievedFromStorage, StoredData} from \"../CommonActions/SettingsAndStorageActions\";\r\nimport {requestShortCodeToEmail} from \"../Login/LoginSlice\";\r\nimport {storageKey} from \"./../../app/ticketsCore\";\r\nimport * as core from './../../app/ticketsCore'\r\n\r\n\r\nexport interface StorageState {\r\n storageInitialised: boolean\r\n savingState: boolean\r\n loadingState: boolean\r\n}\r\n\r\n\r\nexport const initialState: StorageState = {\r\n storageInitialised: false,\r\n savingState: false,\r\n loadingState: false,\r\n};\r\n\r\nexport const storageSlice = createSlice({\r\n name: 'storage',\r\n initialState,\r\n reducers: {\r\n\r\n storageError: (state, a: PayloadAction) => {\r\n state = {...initialState}\r\n },\r\n savingState: (state) => {\r\n state.savingState = true\r\n },\r\n stateSaved: (state) => {\r\n state.savingState = false\r\n },\r\n loadingState: (state) => {\r\n state.loadingState = true\r\n },\r\n stateLoaded: (state) => {\r\n state.loadingState = false\r\n },\r\n flushStateToStorage: (state) => {\r\n },\r\n loadStateFromStorage: (state) => {\r\n }\r\n },\r\n extraReducers: (builder) => {\r\n builder.addCase(stateRetrievedFromStorage, (state, action: PayloadAction>) => {\r\n state.storageInitialised = true;\r\n })\r\n }\r\n})\r\n\r\nexport const saveStateToStorageEpic = (action$: Observable, state$: StateObservable) =>\r\n action$.pipe(ofType(\r\n setEnvironment.toString(),\r\n setDarkMode.toString(),\r\n processUserDetailsFromServer.toString(),\r\n setCompanyId.toString(),\r\n requestShortCodeToEmail.toString()\r\n ), //mapTo(flushStateToStorage())) // note that mapTo differs to Map. It always yields the same. \r\n mergeMapTo([flushStateToStorage()]))\r\n\r\nexport const trackSettingsChangesEpic = (action$: Observable, state$: StateObservable) =>\r\n action$.pipe(\r\n ofType(flushStateToStorage),\r\n switchMap(x =>\r\n from(core.Singleton.storage.set(storageKey,\r\n {\r\n userDetails: state$.value.loginSlice.userDetails,\r\n selectedCompany: state$.value.loginSlice.selectedCompaniesPerEnvironment,\r\n environment: state$.value.loginSlice.activeEnvironment.environment,\r\n darkMode: state$.value.settingsSlice.darkMode,\r\n recentlyTriedEmails:state$.value.loginSlice.recentlyTriedEmails || []\r\n } as StoredData\r\n ))\r\n .pipe(\r\n mapTo(stateSaved()),\r\n startWith(savingState()),\r\n\r\n catchError(error => rxjs.of(storageError(error.messages))),\r\n ),\r\n )\r\n )\r\n\r\nexport const loadStateFromStorageEpic = (action$: Observable, state$: StateObservable) =>\r\n action$.pipe(\r\n ofType(loadStateFromStorage),\r\n switchMap(x =>\r\n from(core.Singleton.storage.get(storageKey))\r\n .pipe(\r\n //tap(t => console.log('GOT FROM DB', t)),\r\n map((i: StoredData) => stateRetrievedFromStorage(fromNullable(i))),\r\n startWith(loadingState()),\r\n endWith(stateLoaded()),\r\n catchError(error => rxjs.of(storageError(error.messages)))\r\n )\r\n ))\r\n\r\n\r\nexport const {savingState, stateSaved, flushStateToStorage, loadStateFromStorage, loadingState, stateLoaded, storageError} = storageSlice.actions;\r\nexport const epics = [saveStateToStorageEpic, trackSettingsChangesEpic, loadStateFromStorageEpic]\r\nexport default storageSlice.reducer;\r\n//export {}","import {IonApp, IonSplitPane, getConfig} from '@ionic/react'\r\nimport {IonReactRouter} from '@ionic/react-router'\r\nimport Menu from './components/Menu'\r\n\r\n/* Core CSS required for Ionic components to work properly */\r\nimport '@ionic/react/css/core.css'\r\n\r\n/* Basic CSS for apps built with Ionic */\r\nimport '@ionic/react/css/normalize.css'\r\nimport '@ionic/react/css/structure.css'\r\nimport '@ionic/react/css/typography.css'\r\n\r\n/* Optional CSS utils that can be commented out */\r\nimport '@ionic/react/css/padding.css'\r\nimport '@ionic/react/css/float-elements.css'\r\nimport '@ionic/react/css/text-alignment.css'\r\nimport '@ionic/react/css/text-transformation.css'\r\nimport '@ionic/react/css/flex-utils.css'\r\nimport '@ionic/react/css/display.css'\r\n\r\n/* Theme variables */\r\nimport './theme/variables.css'\r\n\r\nimport {useAppDispatch, useAppSelector} from './app/hooks'\r\nimport * as core from \"./app/ticketsCore\"\r\nimport React, {useEffect, useState} from \"react\"\r\nimport {setDarkMode} from \"./features/CommonActions/SettingsAndStorageActions\";\r\nimport {useIsLoggedIn} from \"./features/Login/UseIsLoggedIn\"\r\nimport {phoneModes, setPhoneMode} from \"./features/Settings/settingsSlice\";\r\nimport {Routes} from \"./Routes\"\r\nimport {ClearDataBaseOnToken, RunSetup} from \"./app/startup\"\r\nimport {loadStateFromStorage} from \"./features/Storage/storageSlice\"\r\n\r\nconst App: React.FC = () => {\r\n\r\n const [isLoading, setIsLoading] = useState(true)\r\n const dispatch = useAppDispatch()\r\n const storageInitialised = useAppSelector(x => x.storageSlice.storageInitialised)\r\n const environment = useAppSelector(x => x.loginSlice.activeEnvironment)\r\n\r\n const prefersDark = window.matchMedia('(prefers-color-scheme: dark)');\r\n // Listen for changes to the prefers-color-scheme media query\r\n function toggleDarkTheme(darkMode:boolean) {\r\n document.body.classList.toggle('dark-theme', darkMode);\r\n darkMode ? dispatch(setDarkMode('dark')) : dispatch(setDarkMode('light'))\r\n }\r\n prefersDark.addListener((mediaQuery) => toggleDarkTheme(mediaQuery.matches));\r\n \r\n \r\n useEffect(() => {\r\n RunSetup().then((x) => {\r\n core.Singleton.storage = x.storage\r\n setIsLoading(false)\r\n return x.storage\r\n })\r\n .then(x => {\r\n return ClearDataBaseOnToken(x)\r\n })\r\n }, [])\r\n\r\n if (!isLoading && !storageInitialised)\r\n dispatch(loadStateFromStorage())\r\n\r\n //const config = getConfig()\r\n\r\n const isLoggedIn = useIsLoggedIn()\r\n // console.log(`running APP loggedOn: ${isLoggedIn}`)\r\n const darkMode = useAppSelector(x => x.settingsSlice.darkMode)\r\n //let dispatch = useAppDispatch()\r\n let mode = getConfig()?.get('mode') || 'md' as phoneModes\r\n dispatch(setPhoneMode(mode))\r\n\r\n return (\r\n isLoading || !storageInitialised\r\n ?
Loading...
\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 App\r\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://cra.link/PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://cra.link/PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then((registration) => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://cra.link/PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch((error) => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' },\n })\n .then((response) => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log('No internet connection found. App is running in offline mode.');\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then((registration) => {\n registration.unregister();\n })\n .catch((error) => {\n console.error(error.message);\n });\n }\n}\n","import { ReportHandler } from 'web-vitals';\n\nconst reportWebVitals = (onPerfEntry?: ReportHandler) => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","/*\r\n Demonstration of using redux-observable with React Toolkit for async. \r\n Note that there's no reason that you couldn't combine this with the redux-thunk example used in Counter.tsx. Redux thunk with Redux Toolkit can do some cool things, including generating action types in response to sucess/fail/complete states on promises. \r\n */\r\n\r\nimport {delay, mapTo, tap} from 'rxjs/operators';\r\nimport {ofType} from 'redux-observable';\r\nimport { createSlice } from '@reduxjs/toolkit';\r\nimport {EMPTY} from \"rxjs\";\r\nimport {RootState} from \"../../../app/store\";\r\n\r\nconst delayTime = 200000\r\nexport type pingValues = 'PING' | 'PONG'\r\n\r\nexport interface PingState {\r\n value: pingValues,\r\n isStarted: boolean,\r\n count: number\r\n}\r\n\r\nconst initialState: PingState = {\r\n value: 'PING',\r\n isStarted: false,\r\n count: 0\r\n};\r\n\r\nconst pingSlice = createSlice({\r\n name: 'ping',\r\n initialState,\r\n reducers: {\r\n // createSlice does some cool things here. It creates an Action Create function (setPing()) and an Action Type, with a type property 'ping/setPing'. It adds that string as ToString() on the function as well which we can use in the ofType() calls with rxjs\r\n setPing: (state => {\r\n state.value = 'PING'\r\n state.isStarted = true\r\n state.count++;\r\n }),\r\n setPong: (state => {\r\n state.value = 'PONG';\r\n state.isStarted = true;\r\n state.count++;\r\n })\r\n },\r\n});\r\n\r\n// export const trackStateEpic = (action$: any, state: any) =>\r\n//\r\n// \r\n//\r\n// {\r\n// console.log(`Tracking State ${state}`, state)\r\n// return EMPTY;\r\n// }\r\n//\r\n\r\nexport const pingEpic = (action$: any, state: any) => action$.pipe(\r\n ofType(setPing), // Pulling out the string 'ping/setPing' from the action creator \r\n tap(()=>console.log(`ping state:`), state),\r\n delay(delayTime),// Asynchronously wait 1000ms then continue\r\n mapTo(setPong()) // here we're executing the action creator to create an action Type 'plain old javascript object' \r\n);\r\n\r\nexport const pongEpic = (action$: any, state:any) => action$.pipe(\r\n ofType(setPong),\r\n tap(()=>console.log(`pong state:`, state)),\r\n delay(delayTime),\r\n mapTo(setPing())\r\n);\r\n\r\n\r\n// Export the actionCreators\r\nexport const {setPing, setPong} = pingSlice.actions;\r\nexport const epics = [pingEpic, pongEpic]\r\n\r\n// export the reducer\r\nexport default pingSlice.reducer;\r\n","// A mock function to mimic making an async request for data\r\nexport function fetchCount(amount = 1) {\r\n return new Promise<{ data: number }>((resolve) =>\r\n setTimeout(() => resolve({ data: amount }), 500)\r\n );\r\n}\r\n","import { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit';\r\nimport { RootState, AppThunk } from '../../../app/store';\r\nimport { fetchCount } from './counterAPI';\r\n\r\nexport interface CounterState {\r\n counterValue: number;\r\n status: 'idle' | 'loading' | 'failed';\r\n}\r\n\r\nconst initialState: CounterState = {\r\n counterValue: 0,\r\n status: 'idle',\r\n};\r\n\r\n// The function below is called a thunk and allows us to perform async logic. It\r\n// can be dispatched like a regular action: `dispatch(incrementAsync(10))`. This\r\n// will call the thunk with the `dispatch` function as the first argument. Async\r\n// code can then be executed and other actions can be dispatched. Thunks are\r\n// typically used to make async requests.\r\nexport const incrementAsync = createAsyncThunk(\r\n 'counter/fetchCount',\r\n async (amount: number) => {\r\n const response = await fetchCount(amount);\r\n // The value we return becomes the `fulfilled` action payload\r\n return response.data;\r\n }\r\n);\r\n\r\nexport const counterSlice = createSlice({\r\n name: 'counter',\r\n initialState,\r\n // The `reducers` field lets us define reducers and generate associated actions\r\n reducers: {\r\n increment: (state) => {\r\n // Redux Toolkit allows us to write \"mutating\" logic in reducers. It\r\n // doesn't actually mutate the state because it uses the Immer library,\r\n // which detects changes to a \"draft state\" and produces a brand new\r\n // immutable state based off those changes\r\n state.counterValue += 1;\r\n },\r\n decrement: (state) => {\r\n state.counterValue -= 1;\r\n },\r\n // Use the PayloadAction type to declare the contents of `action.payload`\r\n incrementByAmount: (state, action: PayloadAction) => {\r\n state.counterValue += action.payload;\r\n },\r\n },\r\n // The `extraReducers` field lets the slice handle actions defined elsewhere,\r\n // including actions generated by createAsyncThunk or in other slices.\r\n extraReducers: (builder) => {\r\n builder\r\n .addCase(incrementAsync.pending, (state) => {\r\n state.status = 'loading';\r\n })\r\n .addCase(incrementAsync.fulfilled, (state, action) => {\r\n state.status = 'idle';\r\n state.counterValue += action.payload;\r\n })\r\n .addCase(incrementAsync.rejected, (state, action) =>{\r\n state.status = 'failed'\r\n });\r\n },\r\n});\r\n\r\nexport const { increment, decrement, incrementByAmount } = counterSlice.actions;\r\n\r\n// The function below is called a selector and allows us to select a value from\r\n// the state. Selectors can also be defined inline where they're used instead of\r\n// in the slice file. For example: `useSelector((state: RootState) => state.counter.value)`\r\nexport const selectCount = (state: RootState) => state.counterSlice.counterValue;\r\n\r\n// We can also write thunks by hand, which may contain both sync and async logic.\r\n// Here's an example of conditionally dispatching actions based on current state.\r\nexport const incrementIfOdd = (amount: number): AppThunk => (\r\n dispatch,\r\n getState\r\n) => {\r\n const currentValue = selectCount(getState());\r\n if (currentValue % 2 === 1) {\r\n dispatch(incrementByAmount(amount));\r\n }\r\n};\r\n\r\nexport default counterSlice.reducer;\r\n","import {configureStore, ThunkAction, Action} from '@reduxjs/toolkit';\r\nimport settingsSlice from './../features/Settings/settingsSlice'\r\nimport pingSlice, {epics as pingPongEpics} from \"../features/LearningReactPatterns/PingPong/PingPongSlice\"\r\nimport {combineEpics, createEpicMiddleware} from 'redux-observable';\r\nimport {ignoreElements, tap} from \"rxjs/operators\";\r\nimport counterSlice from \"../features/LearningReactPatterns/Counter/counterSlice\";\r\nimport * as EnvironmentFunctions from \"./environmentFunctions\";\r\nimport LoginSlice, {epics as loginEpics} from \"../features/Login/LoginSlice\";\r\nimport { Storage } from '@ionic/storage';\r\nimport StorageSlice,{epics as storageEpics} from \"../features/Storage/storageSlice\";\r\nconst rxjsEpicMiddleware = createEpicMiddleware();\r\n\r\n\r\nexport const store = configureStore({\r\n reducer: {\r\n settingsSlice : settingsSlice,\r\n pingPong: pingSlice,\r\n counterSlice: counterSlice,\r\n loginSlice : LoginSlice, \r\n storageSlice : StorageSlice\r\n },\r\n devTools: EnvironmentFunctions.IsProduction() ? false : true, // is is the redux devtools integration ENHANCEMENT\r\n middleware: getDefaultMiddleware => {\r\n // https://redux-toolkit.js.org/api/getDefaultMiddleware does different defaults for dev and prod. Includes redux-thunk in all\r\n let result = getDefaultMiddleware().concat(rxjsEpicMiddleware)\r\n if (!EnvironmentFunctions.IsProduction()) {\r\n // don't need the redux-logger if you're using the redux devtools above... but wanted to show how to do an optional middlewear inclusion\r\n //result = result.concat(logger) // This is redux logger which is MIDDLEWEAR. It logs previous and next state to the console on every change. \r\n }\r\n return result\r\n }\r\n\r\n})\r\n\r\nasync function configureStorage(){\r\n let storage = new Storage()\r\n await storage.create()\r\n}\r\n\r\n/* eslint-disable-next-line */\r\nfunction logEpic(actions: any) {\r\n return actions.pipe(tap(console.log), ignoreElements())\r\n}\r\n\r\n\r\nexport const rootEpic = combineEpics(\r\n //logEpic, \r\n ...(pingPongEpics as any),\r\n ...(loginEpics as any),\r\n ...(storageEpics as any),\r\n);\r\nrxjsEpicMiddleware.run(rootEpic)\r\n\r\nexport type AppDispatch = typeof store.dispatch;\r\nexport type RootState = ReturnType;\r\nexport type AppThunk = ThunkAction>;\r\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport App from './App';\nimport * as serviceWorkerRegistration from './serviceWorkerRegistration';\nimport reportWebVitals from './reportWebVitals';\nimport {Provider} from \"react-redux\";\nimport {store} from \"./app/store\";\n\nReactDOM.render(\n \n \n \n \n ,\n document.getElementById('root')\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://cra.link/PWA\nserviceWorkerRegistration.unregister();\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals();\n"],"sourceRoot":""}