{"version":3,"file":"state.js","sources":["../../Trilogy.Bundler.Site.ClientApp/src/common/useFetch.tsx","../../Trilogy.Bundler.Site.ClientApp/src/common/date.tsx","../../Trilogy.Bundler.Site.ClientApp/src/common/date-range-select.tsx","../../Trilogy.Bundler.Site.ClientApp/src/admin/state.ts","../../Trilogy.Bundler.Site.ClientApp/src/my-account/state.ts"],"sourcesContent":["import { useState } from \"react\";\r\nimport { ApiError } from \"./api-error\";\r\n\r\nexport interface FetchOptions\r\n{\r\n method?: \"POST\" | \"GET\" | \"PUT\" | \"DELETE\" | \"PATCH\";\r\n body?: any;\r\n path?: string;\r\n query?: { [key: string]: any};\r\n}\r\n\r\nexport interface CustomFetch {\r\n get: (id?: any) => Promise;\r\n getQuery: (id?: any, query?: any) => Promise;\r\n post: (body: any, query?: any) => Promise;\r\n postPath: (path: string, body: any, query?: any) => Promise;\r\n put: (id: string, body: any) => Promise;\r\n del: (id: string) => Promise;\r\n isLoading: boolean;\r\n}\r\n\r\nexport interface FetchResponse {\r\n status: number;\r\n success: boolean;\r\n result: any;\r\n errors: ApiError[]\r\n}\r\n\r\nexport const useFetch = (endpoint: string): CustomFetch => {\r\n const [isLoading, setIsLoading] = useState(false);\r\n\r\n const defaultHeader: any = {\r\n Accept: \"application/json\",\r\n \"Content-type\": \"application/json; charset=UTF-8\"\r\n };\r\n\r\n const customFetch = async (fetchOptions: FetchOptions, headers = defaultHeader) => {\r\n setIsLoading(true);\r\n\r\n const options: RequestInit = {\r\n method: fetchOptions.method ?? (fetchOptions.body ? \"POST\" : \"GET\"),\r\n body: fetchOptions.body,\r\n headers,\r\n };\r\n\r\n const requestVerificationTokenElement = document.querySelector(\"meta[name=RequestVerificationToken]\");\r\n const token = requestVerificationTokenElement?.getAttribute(\"content\") || \"\";\r\n\r\n options.headers = {\r\n ...options.headers,\r\n RequestVerificationToken: token\r\n };\r\n\r\n if (fetchOptions.body) {\r\n options.body = JSON.stringify(fetchOptions.body);\r\n }\r\n\r\n let url = buildUrl(fetchOptions);\r\n \r\n return await fetch(url, options)\r\n .then(async (response: Response) => {\r\n let fetchResponse: FetchResponse = {\r\n success: response.ok,\r\n status: response.status,\r\n result: {},\r\n errors: []\r\n };\r\n\r\n if (response.ok && response.status != 204) {\r\n fetchResponse.result = await response.json();\r\n } else if (response.status == 422 || response.status == 400) {\r\n fetchResponse.errors = await response.json();\r\n } else if (response.status == 404 || response.status == 204) {\r\n // No changes needed\r\n }\r\n\r\n setIsLoading(false);\r\n\r\n return fetchResponse;\r\n })\r\n .catch(error => {\r\n console.error(\"Error fetching data\", error);\r\n setIsLoading(false);\r\n throw new Error(error);\r\n });\r\n };\r\n\r\n\r\n function buildUrl (options: FetchOptions): string {\r\n // Remove leading slash from path\r\n let path = (options.path ?? \"\").replace(/^\\/+/, \"\");\r\n // Remove trailing slash from base\r\n let base = endpoint.replace(/\\/+$/, \"\");\r\n let url = `${base}${path ? `/${path}` : \"\"}`;\r\n let queryString = \"\";\r\n const keys = Object.keys(options.query ?? {});\r\n if (keys.length > 0) {\r\n const query = options.query!;\r\n const queryParts = keys\r\n .map(key => {\r\n const value = (query[key] instanceof Date) ? query[key].toISOString() : query[key].toString();\r\n return `${key}=${value}`;\r\n });\r\n queryString = `?${queryParts.join(\"&\")}`;\r\n }\r\n\r\n url = `${url}${queryString}`\r\n return url;\r\n }\r\n\r\n const get = (id: any = null) : Promise => {\r\n return customFetch({ method: \"GET\", path: id });\r\n };\r\n\r\n const getQuery = (id: any = null, query: any = null) : Promise => {\r\n return customFetch({ method: \"GET\", path: id, query: query });\r\n };\r\n\r\n const post = (body: any, query: any = null) : Promise => {\r\n if (!body) {\r\n throw new Error(\"to make a post you must provide a body\");\r\n }\r\n return customFetch({ method: \"POST\", body: body, query: query });\r\n };\r\n\r\n const postPath = (path: string, body: any, query: any = null) : Promise => {\r\n if (!body) {\r\n throw new Error(\"to make a post you must provide a body\");\r\n }\r\n return customFetch({ method: \"POST\", path: path, body: body, query: query });\r\n };\r\n\r\n const put = (id: string, body: any) : Promise => {\r\n if (!id || !body) {\r\n throw new Error(\"to make a put you must provide the id and the body\");\r\n }\r\n return customFetch({ method: \"PUT\", body: body, path: id});\r\n };\r\n\r\n const del = (id: string) : Promise => {\r\n if (!id) {\r\n throw new Error(\"to make a delete you must provide the id and the body\");\r\n }\r\n return customFetch({ method: \"DELETE\", path: id });\r\n };\r\n\r\n return {\r\n get,\r\n getQuery,\r\n post,\r\n postPath,\r\n put,\r\n del,\r\n isLoading\r\n };\r\n};","import { ZonedDate } from '@progress/kendo-date-math';\r\n\r\nimport '@progress/kendo-date-math/tz/US/Eastern';\r\nimport '@progress/kendo-date-math/tz/America/New_York';\r\n\r\nimport '@progress/kendo-date-math/tz/US/Central';\r\nimport '@progress/kendo-date-math/tz/America/Chicago';\r\n\r\nimport '@progress/kendo-date-math/tz/US/Mountain';\r\nimport '@progress/kendo-date-math/tz/America/Denver';\r\n\r\nimport '@progress/kendo-date-math/tz/US/Pacific';\r\nimport '@progress/kendo-date-math/tz/America/Los_Angeles';\r\n\r\nconst timeZoneMap = new Map();\r\ntimeZoneMap.set(\"Eastern Standard Time\", \"US/Eastern\");\r\ntimeZoneMap.set(\"Central Standard Time\", \"US/Central\");\r\ntimeZoneMap.set(\"Mountain Standard Time\", \"US/Mountain\");\r\ntimeZoneMap.set(\"Pacific Standard Time\", \"US/Pacific\");\r\n\r\nexport const convertUtcToTimeZone = (dateInput: string, timeZone: string): Date | null => {\r\n if (!dateInput) {\r\n return null;\r\n }\r\n var date = new Date(dateInput);\r\n var tzDate = ZonedDate.fromLocalDate(date, timeZoneMap.get(timeZone));\r\n\r\n return tzDate.toUTCDate();\r\n};\r\n\r\nexport const getEndOfDayDate = (date: Date): Date => {\r\n let endDate = new Date(date);\r\n endDate.setHours(23, 59, 59);\r\n return endDate;\r\n};\r\n\r\nexport const DateFormatter =\r\n new Intl.DateTimeFormat(\"en-US\");","import * as React from \"react\";\r\nimport { useState } from \"react\";\r\n\r\nimport { DropDownList } from \"@progress/kendo-react-dropdowns\";\r\nimport { DatePicker, DatePickerChangeEvent } from \"@progress/kendo-react-dateinputs\";\r\n\r\nimport { getEndOfDayDate } from \"./date\";\r\n\r\nexport enum DateRangePeriod {\r\n ThisCycle = \"ThisCycle\",\r\n LastCycle = \"LastCycle\",\r\n All = \"All\",\r\n Custom = \"Custom\",\r\n Today = \"Today\",\r\n Yesterday = \"Yesterday\",\r\n ThisWeek = \"ThisWeek\",\r\n ThisMonth = \"ThisMonth\",\r\n ThisQuarter = \"ThisQuarter\",\r\n ThisYear = \"ThisYear\",\r\n LastWeek = \"LastWeek\",\r\n LastMonth = \"LastMonth\",\r\n LastQuarter = \"LastQuarter\",\r\n LastYear = \"LastYear\",\r\n PastTwentyFourHours = \"PastTwentyFourHours\",\r\n PastFourtyEightHours = \"PastFourtyEightHours\",\r\n PastSeventyTwoHours = \"PastSeventyTwoHours\",\r\n PastSevenDays = \"PastSevenDays\",\r\n PastThirtyDays = \"PastThirtyDays\",\r\n PastSixtyDays = \"PastSixtyDays\",\r\n PastNinetyDays = \"PastNinetyDays\"\r\n}\r\n\r\nexport interface DateRange {\r\n period: DateRangePeriod,\r\n customStartDate?: Date | null,\r\n customEndDate?: Date | null\r\n}\r\n\r\nexport interface DateRangeOption {\r\n value: DateRangePeriod,\r\n text: string\r\n}\r\n\r\nconst dateRangeOptions: DateRangeOption[] = [\r\n {\r\n value: DateRangePeriod.All,\r\n text: \"All Dates\"\r\n },\r\n {\r\n value: DateRangePeriod.Custom,\r\n text: \"Choose Dates...\"\r\n },\r\n {\r\n value: DateRangePeriod.Today,\r\n text: \"Today\"\r\n },\r\n {\r\n value: DateRangePeriod.Yesterday,\r\n text: \"Yesterday\"\r\n },\r\n {\r\n value: DateRangePeriod.ThisWeek,\r\n text: \"This Week\"\r\n },\r\n {\r\n value: DateRangePeriod.ThisMonth,\r\n text: \"This Month\"\r\n },\r\n {\r\n value: DateRangePeriod.ThisQuarter,\r\n text: \"This Quarter\"\r\n },\r\n {\r\n value: DateRangePeriod.ThisYear,\r\n text: \"This Year\"\r\n },\r\n {\r\n value: DateRangePeriod.ThisCycle,\r\n text: \"This Cycle\"\r\n },\r\n {\r\n value: DateRangePeriod.LastWeek,\r\n text: \"Last Week\"\r\n },\r\n {\r\n value: DateRangePeriod.LastMonth,\r\n text: \"Last Month\"\r\n },\r\n {\r\n value: DateRangePeriod.LastQuarter,\r\n text: \"Last Quarter\"\r\n },\r\n {\r\n value: DateRangePeriod.LastYear,\r\n text: \"Last Year\"\r\n },\r\n {\r\n value: DateRangePeriod.LastCycle,\r\n text: \"Last Cycle\"\r\n },\r\n {\r\n value: DateRangePeriod.PastTwentyFourHours,\r\n text: \"Past 24 Hours\"\r\n },\r\n {\r\n value: DateRangePeriod.PastFourtyEightHours,\r\n text: \"Past 48 Hours\"\r\n },\r\n {\r\n value: DateRangePeriod.PastSeventyTwoHours,\r\n text: \"Past 72 Hours\"\r\n },\r\n {\r\n value: DateRangePeriod.PastSevenDays,\r\n text: \"Past 7 Days\"\r\n },\r\n {\r\n value: DateRangePeriod.PastThirtyDays,\r\n text: \"Past 30 Days\"\r\n },\r\n {\r\n value: DateRangePeriod.PastSixtyDays,\r\n text: \"Past 60 Days\"\r\n },\r\n {\r\n value: DateRangePeriod.PastNinetyDays,\r\n text: \"Past 90 Days\"\r\n }\r\n];\r\n\r\nexport interface DateRangeSelectProps {\r\n onChange: (dateRange: DateRange) => void,\r\n dateRange?: DateRange,\r\n useFilterButton?: boolean\r\n}\r\n\r\nexport const DateRangeSelect = ({ onChange, dateRange, useFilterButton }: DateRangeSelectProps) => {\r\n useFilterButton = useFilterButton ?? true;\r\n const defaultDateRange = dateRange || { period: DateRangePeriod.All };\r\n\r\n const defaultDateRangeIndex = dateRangeOptions.findIndex(d => d.value == defaultDateRange.period);\r\n const [selected, setSelected] = useState({ value: dateRangeOptions[defaultDateRangeIndex] });\r\n\r\n const [startDate, setStartDate] = useState(null);\r\n const [endDate, setEndDate] = useState(null);\r\n\r\n const handleChange = (event: any) => {\r\n const selectedDateRangeOption: DateRangeOption = event.target.value;\r\n\r\n const newValue = {\r\n value: selectedDateRangeOption\r\n };\r\n\r\n if (newValue.value.value == selected.value.value) {\r\n return;\r\n }\r\n\r\n setSelected(newValue);\r\n\r\n if (selectedDateRangeOption.value != DateRangePeriod.Custom) {\r\n onChange({ period: selectedDateRangeOption.value });\r\n }\r\n };\r\n\r\n const applyCustomDateRange = () => {\r\n if (endDate) {\r\n onChange({\r\n period: DateRangePeriod.Custom,\r\n customStartDate: startDate,\r\n customEndDate: getEndOfDayDate(endDate)\r\n });\r\n }\r\n }\r\n\r\n const handleSetStartDate = (e: DatePickerChangeEvent) => {\r\n setStartDate(e.value);\r\n if(!useFilterButton && endDate) {\r\n onChange({\r\n period: DateRangePeriod.Custom,\r\n customStartDate: e.value,\r\n customEndDate: endDate\r\n });\r\n }\r\n }\r\n\r\n const handleSetEndDate = (e: DatePickerChangeEvent) => {\r\n setEndDate(e.value);\r\n if(!useFilterButton && startDate) {\r\n onChange({\r\n period: DateRangePeriod.Custom,\r\n customStartDate: startDate,\r\n customEndDate: e.value\r\n });\r\n }\r\n };\r\n\r\n\r\n return (
\r\n \r\n {\r\n selected.value.value == DateRangePeriod.Custom &&\r\n
\r\n
Start Date: handleSetStartDate(e)} />
\r\n
End Date: handleSetEndDate(e)} />
\r\n { useFilterButton && }\r\n
\r\n }\r\n
);\r\n}","import { createContext, Dispatch } from \"react\";\r\nimport { DateRangePeriod } from \"../common\";\r\nimport { Action } from \"./actions\";\r\n\r\n// STATE\r\nexport interface AdminState {\r\n initialized: boolean,\r\n defaultReportDateRangePeriod: DateRangePeriod,\r\n eventPagesEnabled: boolean,\r\n pacDonationsFeatureEnabled: boolean,\r\n paymentPageCheckboxEnabled: boolean,\r\n politicalPartiesEnabled: boolean,\r\n subscriptionsEnabled: boolean,\r\n timeZone: string\r\n timeZoneDisplay: string,\r\n virtualRecipientsEnabled: boolean\r\n fundraisersEnabled: boolean\r\n}\r\n\r\n// INITIAL STATE\r\nexport const initialAdminState: AdminState = {\r\n initialized: false,\r\n defaultReportDateRangePeriod: DateRangePeriod.All,\r\n eventPagesEnabled: false,\r\n pacDonationsFeatureEnabled: false,\r\n paymentPageCheckboxEnabled: false,\r\n politicalPartiesEnabled: false,\r\n subscriptionsEnabled: false,\r\n timeZone: \"\",\r\n timeZoneDisplay: \"\",\r\n virtualRecipientsEnabled: false,\r\n fundraisersEnabled: false\r\n}\r\n\r\n// CONTEXTS\r\nlet initialAdminStateContext = { state: initialAdminState, dispatch: (action: Action) => { } }\r\nexport const AdminStateContext = createContext<{ state: AdminState, dispatch: Dispatch }>(initialAdminStateContext);","import { createContext, Dispatch } from \"react\";\r\nimport { Action } from \"./actions\";\r\n\r\n// STATE\r\nexport interface MyAccountState {\r\n initialized: boolean,\r\n baseUrl: string,\r\n defaultSuggestedDonationAmounts: string,\r\n email: string,\r\n emailConfirmed: boolean,\r\n pacDonationsFeatureEnabled: boolean,\r\n pageClosingEnabled: boolean,\r\n paymentPageCheckboxEnabled: boolean,\r\n politicalPartiesEnabled: boolean,\r\n recipients: Recipient[],\r\n subscriptionsEnabled: boolean,\r\n contextualHelpClickEnabled: boolean,\r\n eventPagesEnabled: boolean,\r\n timeZone: string\r\n}\r\n\r\n// ToDo recipientId vs identifier\r\nexport interface Recipient {\r\n availableToFundraisers: boolean;\r\n id: string;\r\n identifier: string;\r\n displayName: string;\r\n district: string;\r\n office: string;\r\n politicalParty: string;\r\n status: string;\r\n}\r\n\r\n// INITIAL STATE\r\nexport const initialMyPageState: MyAccountState = {\r\n initialized: false,\r\n baseUrl: \"\",\r\n defaultSuggestedDonationAmounts: \"\",\r\n email: \"\",\r\n emailConfirmed: false,\r\n pacDonationsFeatureEnabled: false,\r\n pageClosingEnabled: false,\r\n paymentPageCheckboxEnabled: false,\r\n politicalPartiesEnabled: false,\r\n recipients: [],\r\n subscriptionsEnabled: false,\r\n contextualHelpClickEnabled: false,\r\n eventPagesEnabled: false,\r\n timeZone: \"\"\r\n}\r\n\r\n// CONTEXTS\r\nlet initialMyAccountStateContext = { state: initialMyPageState, dispatch: (action: Action) => { } }\r\nexport const MyAccountStateContext = createContext<{ state: MyAccountState, dispatch: Dispatch }>(initialMyAccountStateContext);"],"names":["useFetch","endpoint","isLoading","setIsLoading","useState","defaultHeader","Accept","customFetch","fetchOptions","headers","options","method","body","requestVerificationTokenElement","document","querySelector","token","getAttribute","RequestVerificationToken","JSON","stringify","url","buildUrl","fetch","then","response","fetchResponse","success","ok","status","result","errors","json","catch","error","Error","path","replace","queryString","keys","Object","query","length","map","key","value","Date","toISOString","toString","join","get","id","getQuery","post","postPath","put","del","timeZoneMap","Map","set","convertUtcToTimeZone","dateInput","timeZone","date","tzDate","ZonedDate","fromLocalDate","toUTCDate","getEndOfDayDate","endDate","setHours","DateRangePeriod","ThisCycle","LastCycle","All","Custom","Today","Yesterday","ThisWeek","ThisMonth","ThisQuarter","ThisYear","LastWeek","LastMonth","LastQuarter","LastYear","PastTwentyFourHours","PastFourtyEightHours","PastSeventyTwoHours","PastSevenDays","PastThirtyDays","PastSixtyDays","PastNinetyDays","dateRangeOptions","text","DateRangeSelect","onChange","dateRange","useFilterButton","defaultDateRange","period","defaultDateRangeIndex","findIndex","d","selected","setSelected","startDate","setStartDate","setEndDate","handleChange","event","selectedDateRangeOption","target","newValue","applyCustomDateRange","customStartDate","customEndDate","handleSetStartDate","e","handleSetEndDate","className","children","_jsx","DropDownList","data","textField","dataItemKey","_jsxs","DatePicker","type","disabled","onClick","initialAdminState","initialAdminStateContext","action","AdminStateContext","createContext","initialMyPageState","initialMyAccountStateContext","MyAccountStateContext"],"mappings":"mEA4BaA,MAAAA,EAAYC,GAAkC,CACvD,KAAM,CAACC,EAAWC,CAAY,EAAIC,mBAAS,EAAK,EAE1CC,EAAqB,CACvBC,OAAQ,mBACR,eAAgB,iCAAA,EAGdC,EAAc,MAAOC,EAA4BC,EAAUJ,IAAkB,OAC/EF,EAAa,EAAI,EAEjB,MAAMO,EAAuB,CAC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