{"version":3,"sources":["shared/components/headings.tsx","components/AdminPanel/adminPanel/TD.tsx","ducks/products/selectors.ts","shared/components/buttons.tsx","shared/components/index.ts","components/shared/SelectField/SelectOption.tsx","components/shared/SelectField/SelectField.tsx","icons/SortDownIcon.tsx","media/svg/udm_logo.svg","ducks/records/frequency/selectors.ts","components/AdminPanel/adminPanel/HeaderCell.tsx","utils/toPrecision.ts","utils/language.ts","utils/formatValue.ts","ducks/productPage/reducers.ts","components/AdminPanel/adminPanel/Table.tsx","components/shared/Spinner/Spinner.tsx","icons/SummaryIcon.tsx","icons/EventNoteIcon.tsx","icons/SortUpIcon.tsx","icons/RightArrowIcon.tsx","icons/LeftArrowIcon.tsx","components/shared/Pagination/Pagination.tsx","utils/emptyFunc.ts","icons/SettingsIcon.tsx","icons/GraphIcon.tsx","icons/CubesIcon.tsx","icons/UsersEditIcon.tsx","scenes/EducationsAndAnnouncements/utils/educationalVideos.types.ts","components/AdminPanel/adminPanel/C.tsx","components/AdminPanel/adminPanel/SelectSection.tsx","components/AdminPanel/adminPanel/Input.tsx","ducks/fromPropsSelector.ts","icons/AngleDownIcon.tsx","icons/LongArrowDown.tsx","icons/LongArrowUp.tsx","components/Skeletons/AdminPanelSkeleton.tsx","components/shared/SwitchButton/SwitchButton.tsx","icons/MinusIcon.tsx","media/svg/calendar-regular.svg","media/svg/sub-hero.svg","media/svg/search.svg","media/images/no-section-selected.png","media/images/dairy-section.png","media/images/grain-feed-section.png","media/images/livestock-section.png","utils/enums.ts","services/organizationServices.ts","ducks/records/actions.ts","ducks/productPage/actions.ts","ducks/authentication/reducers.ts","utils/containsString.ts","ducks/authentication/actions.ts","components/shared/ContentLoaders/ContentLoaderRectangle.tsx","utils/createUniqueArray.ts","ducks/educationsAndAnnouncements/actions.ts","components/Skeletons/ProductPageSkeleton.tsx","scenes/Product/ProductScene.tsx","components/shared/InputField/InputField.tsx","containers/LoginContainer/LoginContainer.tsx","scenes/LoginPage/LoginPageScene.tsx","ducks/menu/selectors.ts","icons/UserIcon.tsx","icons/LogoutIcon.tsx","components/Menu/NavMenuHeader/NavMenuHeader.tsx","components/Menu/NavBarContent/NavBarContent.tsx","containers/NavBarContainer/PublicNavLinks.tsx","containers/NavBarContainer/NavBarContainer.tsx","ducks/products/utils/getFrequencyID.ts","services/dataServices.ts","ducks/menu/sagas.ts","ducks/records/frequency/utils/createFrequencyRecord.ts","ducks/records/frequency/utils/mapFrequencyRecordsDtoToFrequencyRecords.ts","ducks/records/revision/utils/createRevisionRecord.ts","ducks/records/frequency/sagas.ts","ducks/records/futures/utils/createFuturesRecord.ts","ducks/records/futures/utils/mapFuturesRecordsDtoToFuturesRecords.ts","ducks/records/futures/sagas.ts","ducks/records/revision/sagas.ts","ducks/records/sagas.ts","ducks/charts/utils/mapChartDtoToChart.ts","ducks/products/utils/mapProductDtoToProduct.ts","ducks/contextTable/actions.ts","ducks/products/sagas.ts","ducks/units/utils/mapUnitDtoToUnit.ts","ducks/units/sagas.ts","ducks/productPage/sagas.ts","utils/api.ts","ducks/authentication/sagas.ts","ducks/authentication/getAuthStatus.ts","ducks/admin/organization/sagas.ts","ducks/admin/users/utils/mapUserDtoToUser.ts","ducks/admin/users/sagas.ts","ducks/admin/organizationReports/sagas.ts","ducks/admin/report/utils/mapReportDtoToReport.ts","utils/db.ts","services/directServices.ts","ducks/admin/report/sagas.ts","ducks/admin/view/utils/mapViewDtoToView.ts","ducks/admin/view/sagas.ts","ducks/admin/organizationViews/sagas.ts","ducks/admin/calendarReports/sagas.ts","services/adminServices.ts","ducks/admin/subscriptions/sagas.ts","ducks/admin/sagas.ts","ducks/landingPage/actions.ts","ducks/landingPage/utils/mapTreeMapDataDtoToTreeMapData.ts","ducks/landingPage/sagas.ts","ducks/admin/calendars/sagas.ts","ducks/admin/organizationUsers/sagas.ts","ducks/contextTable/utils/mapSeriesContextDtoToSeriesContext.ts","ducks/contextTable/utils/mapContextTableDtoToContextTable.ts","ducks/contextTable/sagas.ts","ducks/catalog/actions.ts","ducks/catalog/utils/mapPublishersDtoToPublishers.ts","ducks/catalog/utils/mapCatalogReportsDtoToCatalogReports.ts","ducks/catalog/utils/mapCatalogAreasDtoToCatalogAreas.ts","ducks/catalog/utils/mapCatalogCategoriesDtoToCatalogCategory.ts","ducks/catalog/utils/mapCatalogMeasureDtoToCatalogMeasure.ts","ducks/catalog/utils/mapCatalogCountryDtoToCatalogCountry.ts","ducks/catalog/sagas.ts","ducks/educationsAndAnnouncements/sagas.ts","ducks/rootSaga.ts","ducks/menu/reducers.ts","ducks/records/frequency/reducers.ts","ducks/records/futures/reducers.ts","ducks/records/revision/reducers.ts","ducks/records/reducers.ts","ducks/products/reducers.ts","ducks/units/reducers.ts","ducks/charts/reducers.ts","ducks/admin/organization/reducers.ts","ducks/admin/users/reducers.ts","ducks/admin/organizationReports/reducers.ts","ducks/admin/report/reducers.ts","ducks/admin/view/reducers.ts","ducks/admin/calendars/reducers.ts","ducks/admin/calendarReports/reducers.ts","ducks/admin/organizationUsers/reducers.ts","ducks/admin/subscriptions/reducers.ts","ducks/admin/reducers.ts","ducks/landingPage/reducers.ts","ducks/adminPage/reducers.ts","ducks/contextTable/reducers.ts","ducks/catalog/reducers.ts","ducks/educationsAndAnnouncements/reducers.ts","ducks/store.ts","ducks/authentication/userManager.ts","scenes/Dashboard/DashboardScene.tsx","components/Menu/MenuComponents/CatalogHome/CatalogMenuHomeItem.tsx","components/Menu/MenuComponents/CatalogHome/CatalogMenuHome.tsx","icons/UnfoldMore.tsx","components/Menu/MenuComponents/SortByFilter/SortByFilter.tsx","icons/FilterIcon.tsx","components/Menu/MenuComponents/FilterBy/FilterBy.tsx","scenes/Menu/CatalogMenuScene.tsx","icons/AngleRightIcon.tsx","components/shared/Tooltip/Tooltip.tsx","components/Menu/MenuComponents/BrowseDataItems/BrowseDataItem.tsx","icons/SearchIcon.tsx","components/Menu/MenuComponents/BrowseDataItems/BrowseData.tsx","components/Menu/MenuComponents/ReportItem/ReportItem.tsx","icons/MinExpandIcon.tsx","icons/MidExpandIcon.tsx","components/Menu/MenuComponents/MenuContent/MenuContent.tsx","scenes/Menu/MenuScene.tsx","scenes/LandingPage/LandingPageScene.tsx","components/Catalog/CatalogMenu/CatalogMenu.tsx","ducks/catalog/selectors.ts","containers/CatalogSortContainer/CatalogSortContainer.tsx","services/catalogServices.ts","components/shared/Modal/CatalogSelectModal.tsx","containers/catalog/PublishersCatalogContainer/PublishersCatalogContainer.tsx","containers/catalog/ReportsCatalogContainer/ReportsCatalogContainer.tsx","containers/catalog/AreasCatalogContainer/AreasCatalogContainer.tsx","containers/catalog/CategoriesCatalogContainer/CategoriesCatalogContainer.tsx","containers/catalog/MeasuresCatalogContainer/MeasuresCatalogContainer.tsx","components/Catalog/styles/ClearFilterContainer/ClearFilterContainer.tsx","components/Catalog/styles/FilterContent/FilterContent.tsx","components/Catalog/styles/PaginationContainer/PaginationContainer.tsx","components/Catalog/styles/PaginationBox/PaginationBox.tsx","components/Catalog/styles/SeriesLink/SeriesLink.tsx","components/Catalog/styles/FilterContent/FilterButton.ts","components/Catalog/styles/FilterContent/FilterTabs.ts","components/Catalog/styles/FilterContent/ModalContentWrapper.ts","scenes/Catalog/CatalogSeriesScene.tsx","containers/catalog/CountriesCatalogContainer/CountriesCatalogContainer.tsx","scenes/Catalog/CatalogReports/CatalogReportsScene.tsx","scenes/Catalog/CatalogReports/CatalogReportsSeriesScene.tsx","scenes/Catalog/CatalogPublishers/CatalogPublishersScene.tsx","scenes/Catalog/CatalogPublishers/CatalogPublishersReportsScene.tsx","scenes/Catalog/CatalogScene.tsx","components/RevenuePrediction/Accordion/Accordion.tsx","components/shared/Slider/Slider.tsx","components/RevenuePrediction/InputContainer/InputContainer.tsx","components/RevenuePrediction/TableHeader/TableHeader.tsx","containers/RevenuePredictionContainer/stateCodeList.ts","containers/RevenuePredictionContainer/practiceCodeList.ts","services/riskPremiumService.ts","containers/RevenuePredictionContainer/apiData.ts","containers/RevenuePredictionContainer/SelectOption.tsx","containers/RevenuePredictionContainer/SelectField.tsx","containers/RevenuePredictionContainer/RevenuePredictionContainer.tsx","scenes/DairyRevenuePrediction/RevenuePredictionScene.tsx","scenes/ViewMailNotifications/ViewMailNotificationsTable.tsx","scenes/ViewMailNotifications/ViewMailNotificationsScene.tsx","scenes/LandingPage/UdmApiSubscriptionScene.tsx","scenes/LandingPage/ContactUsScene.tsx","scenes/LandingPage/utils/validateContactUsFormEmail.ts","scenes/LandingPage/AboutUsScene.tsx","callback.tsx","router/layout.ts","router/PublicRoute.tsx","router/PrivateRoute.tsx","router/NotFound.tsx","scenes/EducationsAndAnnouncements/EduAndAnnSkeleton.tsx","App.tsx","registerServiceWorker.ts","index.tsx","ducks/productPage/selectors.ts","ducks/menu/actions.ts","utils/color.ts","utils/sortObjectStringsByKey.ts","ducks/records/frequency/utils/timeFunctions.ts","ducks/adminPage/selectors.ts","ducks/authentication/selectors.ts","components/shared/Button/Button.tsx","utils/numberRange.ts","components/shared/Pagination/perPage.tsx","components/AdminPanel/adminPanel/PaginationWrapper.tsx","ducks/units/actions.ts","components/shared/LangPicker/LangPicker.tsx","ducks/admin/actions.ts","ducks/products/actions.ts","icons/CheckIcon.tsx","icons/BoxIcon.tsx","icons/CheckboxIcon.tsx","components/shared/Checkbox/Checkbox.tsx","ducks/adminPage/actions.ts","shared/hooks/useOverlay.ts","shared/hooks/useSpinner.ts","shared/hooks/index.ts","ducks/admin/selectors.ts","shared/components/overlay.tsx","components/AdminPanel/adminPanel/ContentSearch.tsx","media/svg/arrowDropDown.svg","ducks/charts/actions.ts","components/Product/Module/Module.tsx","ducks/units/selectors.ts"],"names":["__webpack_require__","d","__webpack_exports__","Heading3","Heading4","styled_components__WEBPACK_IMPORTED_MODULE_0__","h3","h4","_utils_color__WEBPACK_IMPORTED_MODULE_1__","TD","td","TEXT_PRIMARY","maxWidth","trim","NEUTRAL","getProduct","getProductFromProduct","getReportFromProduct","getPublisherFromProduct","getSummaryFromProduct","getUnitFromProduct","getUpdatesFromProduct","getMetaFieldsFromProduct","getDefaultScaleFromProduct","getDefaultAreaFromProduct","getProductFirstReportPeriod","getProductLastReportPeriod","getFrequencyAreas","getAvailableProductFrequencies","getAreaInfo","reselect__WEBPACK_IMPORTED_MODULE_0__","_fromPropsSelector__WEBPACK_IMPORTED_MODULE_1__","Object","state","product","productById","productID","allProducts","Number","report","publisher","summary","unit","getAreasFromProduct","areas","updates","metaFields","defaultScale","defaultArea","firstReportPeriod","lastReportPeriod","frequency","availableFrequencies","areaID","find","area","id","name","Button","styled_components_browser_esm","button","variant","color","NEUTRAL_DARK","PRIMARY","BACKGROUND","NEGATIVE","IconButton","ActionButton","headings","SelectOptionWrapper","div","Dot","ActiveDot","onClickHandler","value","onClick","SelectField_SelectOption","type","checked","label","react","SelectFieldWrapper","Select","width","arrowDropDown_default","a","fontWeight","textColor","SelectDropDown","isOpened","NEUTRAL_LIGHT","Input","input","[object Object]","this","filter","onInputChange","event","setState","target","handleSelectDropDown","handleMouseLeave","options","onChange","props","SelectOptions","option","toLowerCase","includes","map","key","undefined","onMouseLeave","placeholder","autoFocus","lib_default","hideTracksWhenNotNeeded","autoHeightMax","autoHeight","react_icons_fa__WEBPACK_IMPORTED_MODULE_0__","module","exports","p","getAllFrequencyRecords","getFrequencyRecord","getFrequencyAreaRecords","records","productsById","allRecords","productId","HeaderCell","th","textAlign","Language","utils_toPrecision","scale","toFixed","locale","DEFAULT","toLocaleString","minimumFractionDigits","maximumFractionDigits","ComparisonPeriod","ContractMonthRange","pageState","productPageReducer","immer__WEBPACK_IMPORTED_MODULE_0__","_actions__WEBPACK_IMPORTED_MODULE_1__","typesafe_actions__WEBPACK_IMPORTED_MODULE_2__","_utils_enums__WEBPACK_IMPORTED_MODULE_3__","date_fns__WEBPACK_IMPORTED_MODULE_4__","initialState","INITIALIZING","unitID","chartID","futuresTradingDate","Date","contextTable","comparisonPeriod","None","contractMonthRange","exploreDataView","TIME_ENDING","displayDateRange","from","getFullYear","to","getMonth","translated","futuresDisplayType","futuresContractMonth","futuresNearbyIndex","action","setProduct","payload","meta","pageStatus","loading","LOADING","loaded","LOADED","setSelectedChart","setDisplayDateRange","setExploreDataTo","timeChange","TIME_CHANGE","timeEnding","timeOnTime","TIME_ON_TIME","yearOnYear","YEAR_ON_YEAR","changeUnitID","changeScale","setContextTable","setSorting","contextSorting","by","direction","reinitializeState","changeComparisonPeriod","changeContractMonth","toggleTranslation","setFuturesTradingDate","setFuturesDisplayType","setFuturesContractMonth","setFuturesNearbyIndex","Table","table","Spinner","react__WEBPACK_IMPORTED_MODULE_0__","styled_components__WEBPACK_IMPORTED_MODULE_1__","src_utils_color__WEBPACK_IMPORTED_MODULE_2__","SpinnerContainer","height","left","afterWidth","afterHeight","react_icons_md__WEBPACK_IMPORTED_MODULE_0__","RightArrowIcon","index_esm","LeftArrowIcon","NumberBoxWrapper","NumberBox","isSelected","ICONS_HEADER","isNumber","BACKGROUND_SECONDARY","IconsWrapper","lastPage","Math","ceil","dataLength","perPage","arrows","leftSide","activePage","dots","firstPage","pageNumbers","pageNumberRange","numberRange","pages","pageNumber","index","prevProps","EEducationalVideoRole","EEducationalVideoCategory","C","SelectSection","error","getProductIDFromProps","getFrequencyFromProps","getDisplayDateRangeFromProps","getAreaIDFromProps","getExploreDataViewFromProps","getProductFromProps","getUnitIDFromProps","getSelectedUnitIDFromProps","getUnitConversionFunctionFromProps","getChartIDFromProps","getActivePageFromProps","getPerPageFromProps","getSelectedCalendarFromProps","getSearchFromProps","getOrganizationNameFromProps","getSortFromProps","getDirectionFromProps","getMenuIDFromProps","getIsTranslatedFromProps","getIsCandlestickFromProps","getShowTranslatedNameFromProps","getVideoCategoryFromProps","_","fromDate","toDate","selectedUnitID","unitConversionFunction","selectedCalendar","search","selectedOrganization","sort","match","params","isTranslated","isCandlestick","showTranslatedName","category","_shared_ContentLoaders_ContentLoaderRectangle__WEBPACK_IMPORTED_MODULE_2__","_utils_color__WEBPACK_IMPORTED_MODULE_3__","_utils_numberRange__WEBPACK_IMPORTED_MODULE_4__","Root","Content","List","Menu","MenuHeader","Header","HeaderWrapper","Footer","OrganizationSelectContainer","TableName","Row","HeaderText","MenuItem","_utils_color__WEBPACK_IMPORTED_MODULE_2__","size","Switch","active","passiveColor","floor","ExploreData","SortOrder","monthsByName","DateStatus","axios__WEBPACK_IMPORTED_MODULE_0__","axios__WEBPACK_IMPORTED_MODULE_0___default","n","api","create","baseURL","timeout","newAdminApi","organizationAPI","fetchOrganizations","get","deleteOrganization","delete","createOrganization","organization","post","updateOrganization","organizationName","put","fetchOrganizationReports","addOrganizationReport","reportName","encodeURIComponent","removeOrganizationReport","requestReportAccess","fetchOrganizationUsers","addOrganizationUser","userName","deleteOrganizationUser","addUserRole","role","removeUserRole","fetchOrganizationViews","addOrganizationView","viewName","removeOrganizationView","requestViewAccess","addAllViews","fetchUsers","deleteUser","createUser","data","updateUser","userId","getCalendarReports","calendarName","addCalendarReport","deleteCalendarReport","fetchCalendars","org","createCalendar","deleteCalendar","updateCalendar","oldName","fetchVerificationUrl","resendInvitation","recordsActions","typesafe_actions__WEBPACK_IMPORTED_MODULE_0__","initializeFrequency","initializeUnitsForFrequency","fetchFrequency","addFrequency","futures","initializeFutures","fetchFuturesByReportPeriod","fetchFuturesByContractMonth","fetchFuturesByNearbyIndex","setFutures","revision","addRevision","productPageActions","UDM_AUTH_STATE_LS_ID","AuthState","authenticationPageReducer","typesafe_actions__WEBPACK_IMPORTED_MODULE_1__","_actions__WEBPACK_IMPORTED_MODULE_2__","authState","sessionStorage","getItem","String","initialization","expiresAt","set","setItem","sentence","word","RegExp","replace","test","authActions","signIn","signOut","token","expired","expiring","update","Loader","svg","array","Set","newArray","forEach","element","push","educationsAndAnnouncementsActions","announcements","fetch","populate","add","remove","edit","educationalVideos","createVideo","deleteVideo","removeVideo","editVideo","updateVideo","ProductHeader","utils_color","IconContainer","CubesIcon","ICONS_PRIMARY","SettingsRowWrapper","SummaryCalendarContainer","ChartContainer","ChartPicker","ChartContents","MiniChart","ChartSelectWrapper","ChartSelectItem","Skeletons_ProductPageSkeleton","ContentLoaderRectangle","Module","icon","GraphIcon","title","gridArea","style","SummaryIcon","EventNoteIcon","SettingsIcon","disableLastLine","Frequency","lib","loader","Promise","all","e","then","bind","delay","Futures","mapDispatchToProps","initializeProductScene","actions","initialize","changeArea","changeProductArea","Product_ProductScene","es","productSceneType","selectors","location","document","documentElement","scrollTop","body","InputField_InputField","ErrorMessage","containers_LoginContainer_LoginContainer","username","password","onChangeHandler","newState","Container","LoginFieldName","LoginFieldContainer","RegisterField","LoginPage_LoginPageScene","href","getNavMenuItems","menu","navMenu","getSelectedNavMenuContent","reselect_lib","fromPropsSelector","navMenuItems","selectedNavMenuID","selectedNavMenuItem","navMenuItem","children","getSelectedSubmenu","selectedMenu","selectedMenuID","selectedSubmenu","findIndex","getMenuReports","menuById","allMenus","UserIcon","LogoutIcon","DropDownWrapper","DropDownItem","UserIconWrapper","LogoutIconWrapper","AdminPanelIcon","UsersEditIcon","Menu_NavMenuHeader_NavMenuHeader","es_withRouter","onMouseLeaveHandler","adminPanelClickHandler","history","logoutClickHandler","removeItem","reducers","iconClickHandler","auth","administrator","moderator","ButtonContainer","ModuleButton","NavBarContent_mapDispatchToProps","menu_actions","setSelectedMenu","Menu_NavBarContent_NavBarContent","authentication_selectors","selectedMenuItem","onCatalogClick","length","onViewMailNotifsClick","selectedMenuItemHandler","item","separatedURL","pathname","split","catalogBetaIndex","viewMailNotifsIndex","className","nmi","text","NavBarContainer_PublicNavLinks","NavBarLinkWrapper","LandingPageNavBarLink","activeClassName","NavLink","POSITIVE","NavBarHeaderContainer","HeaderContent","NavBar","isLoggedIn","LogoImg","img","LandingPageNavigationContainer","PrivateNavLinksWrapper","FlexCC","EduAndAnnLink","NavBarContainer_mapDispatchToProps","authentication_actions","connectedNavBarContainer","Link","src","udm_logo_default","alt","filled","NavBarContainer_NavBarContainer","withRouter","utils_getFrequencyID","axios_default","dataServices","fetchNavigationMenu","fetchMenu","menuID","fetchProduct","URI","fetchFrequencyRecord","fetchUsaFrequencyRecord","fetchRecordsForUnitConversion","fetchFuturesRecordWithTradeDate","fromTradingDate","toTradingDate","fetchFuturesRecordWithContractMonth","fetchFuturesRecordWithNearbyIndex","fetchUnits","getPublishers","getReports","getAreas","getCategories","getMeasures","getCounties","getDashboards","getSources","getTables","getUnits","navMenuDto","redux_saga_effects_npm_proxy_esm","console","sagas","index_umd","utils_createFrequencyRecord","result","allAreas","record","reportPeriodTimestamp","weekEnding","timeFunctions","reportPeriod","recordValues","year","date","timestamp","collectionDate","keys","utils_mapFrequencyRecordsDtoToFrequencyRecords","AreaID","Value","ReportPeriod","CollectionDate","WeekEnding","utils_createRevisionRecord","initializeFrequencyRecord","DateDisplayRange","toDateString","toISOString","slice","fromDateString","recordsDto","rawRecords","records_actions","hasUsaMap","usaRecordsDto","rawUsaRecords","usaRecords","usaRevision","toYear","initializeUnitsForUnitConversion","recordDto","frequency_sagas","utils_createFuturesRecord","futuresRecordsRaw","futuresRecords","contractMonth","volume","lowPrice","openPrice","highPrice","closePrice","openInterest","formattedDate","padStart","formatDate","utils_mapFuturesRecordsDtoToFuturesRecords","Volume","LowPrice","OpenPrice","HighPrice","ClosePrice","ContractMonth","OpenInterest","initializeFuturesRecords","date_fns","futuresRecordsDto","latestTradingDate","productPage_actions","recordsData","fetchFuturesRecords","now","toString","react_toastify_lib","toContractMonth","fromContractMonth","futures_sagas","revision_sagas","redux_saga_effects_esm","recordsRootSaga","utils_mapChartDtoToChart","chartDto","transformationsList","transformations","normalizationsList","normalizations","selectedTransformation","selectedNormalization","filterAreaFrequencies","areaDto","mapAreaFrequencies","utils_mapProductDtoToProduct","nameTranslated","attributes","updateSchedule","areaFrequencys","Error","yoYChange","yoYChangePercentage","ytDChange","ytDPercentageChange","doDChange","doDChangePercentage","woWChange","woWPercentageChange","moMChange","moMChangePercentage","qoQChange","qoQChangePercentage","lastReport","lastReportValue","frequencies","Daily","Weekly","Monthly","Quarterly","Annual","description","calendarUrl","field","releaseID","releaseId","releaseTime","contextTableActions","series","addProduct","productData","addChart","rawCharts","charts","chart","charts_actions","productInfo","productMeta","setProductData","rawChartObject","reduce","chartList","concat","baseChart","transformationRaw","normalizationsRaw","t","initFrequencyData","productDto","allProductData","some","units_actions","message","position","autoClose","changeProductFrequency","products_sagas","utils_mapUnitDtoToUnit","fromUnit","toUnit","conversionFactor","factor","conversionFunction","function","conversionSeriesID","unitDto","units","units_sagas","fetchConversionSeriesProductForUnitConversion","units_selectors","allUnits","frequency_selectors","fetchFrequencyData","currentDate","twoMonthsOlderDate","selectedFromDate","selectedToDate","frequencyData","oldestFrequencyDataDate","newestFrequencyDataDate","productPage_sagas","api_api","setAccessToken","authToken","defaults","headers","common","Authorization","orgApi","directApi","getUser","async","authentication_userManager","signInRequest","signinRedirect","signOutRequest","signoutRedirect","tokenExpired","signinSilent","updateToken","user","token_type","access_token","expires_at","sagas_getAuthState","profile","Array","isArray","member","guest","authentication_sagas","authSaga","saga","getAuthStatus","resolve","ducks_store","getState","expiresAtState","isExpired","timeoutTimer","setTimeout","unsubscribe","subscribe","subscribeState","subscribeExpiresAtState","isActive","clearTimeout","getOrganizations","organizations","organizationServices","admin_actions","addAll","adminPage_actions","setOrganization","organizationReports","removeOrganization","organizationView","calendars","organizationUsers","calendarReports","success","createdOrganization","response","status","Name","updateOrganizationName","cb","organization_sagas","new","mapUserDtoToUser","dto","utils_mapUserDtoToUser","getUsers","usersDto","users","addOne","users_sagas","getOrganizationReports","organizationsReports","newOrganizationReport","reportNameCode","deleteOrganizationReport","organizationReports_sagas","utils_mapReportDtoToReport","NameTranslated","Code","RequestAccess","code","requestAccess","b","db","dexie_es","super","getAllViews","views","toArray","clearAllViews","clear","bulkPut","getAllReports","reports","clearAllReports","addAllReports","version","stores","directServices_api","directServices","fetchAllViews","fetchReports","fetchLandingPageTreeMapData","fetchSeriesContext","seriesId","fetchTableContext","tableId","getReportsFirstError","cachedData","sagas_getReports","cache","mappedReports","timeoutError","report_sagas","mapViewDtoToView","DisplayName","DateCreated","displayName","dateCreated","getTime","getViewsFirstError","sagas_cachedData","view","viewsDto","view_sagas","getOrganizationViews","organizationViews","addAllViewsToOrganization","saveAllViews","organizationViewSagaWatcher","createCalendarReport","calendarReports_sagas","adminServices_api","adminServices","fetchSubscriptions","subscribeToView","unsubscribeToView","fetchAnnouncements","createAnnouncement","deleteAnnouncement","announcement","editAnnouncement","fetchEducationalVideos","createEducationalVideo","fileName","completeUploadEducationalVideo","createEducationalVideoThumbnail","videoId","completeUploadEducationalVideoThumbnail","deleteEducationalVideo","video","editEducationalVideo","getEducationVideoThumbnail","deleteEducationVideoThumbnail","guid","getViews","subscriptionsAndViews","populateViews","getSubscriptions","subscriptions","populateSubs","newSub","addSub","removeSub","subscriptions_sagas","getSubs","adminRootSaga","landingPageActions","getTreeMapData","addTreeMapData","utils_mapTreeMapDataDtoToTreeMapData","products","codeName","Areas","Year","yoYChangePct","YoYChangePercentage","initializeTreeMapData","treeMapDataDto","treeMapData","landingPageSagaWatcher","getCalendars","createdCalendar","removeCalendar","calendars_sagas","getOrganizationUsers","saveUsers","saveUser","addAdminUserRole","removeAdminUserRole","addAdminUser","organizationUsers_sagas","addUser","removeUser","pyToJSDateFormats","freeze","%A","%a","%B","%b","%c","%d","%f","%H","%I","%j","%M","%m","%p","%S","%U","%W","%w","%X","%x","%Y","%y","%Z","%z","%%","convertPYDateFormatToJS","formatStr","join","utils_mapSeriesContextDtoToSeriesContext","Type","Id","DateFormat","IncludeYTDSum","IncludeYTDAvg","ColumnHeaderText","headerText","dateFormat","includeYTDSum","includeYTDAvg","columnHeaderText","utils_mapContextTableDtoToContextTable","Order","Series","Area","Indent","Bold","Footnote","Values","values","valueTimestamps","ValuesReportPeriod","order","principalAreaId","PrincipalAreaId","Scale","principal","Principal","indent","bold","footnote","Unit","initSeriesContext","seriesContextDto","seriesContext","fetchContextTable","log","contextTableDto","contextTable_sagas","catalogActions","setSort","setSortOrder","setPublishers","setReports","setAreas","setCategories","setMeasures","setCounties","clearAll","addPublisher","addAllPublisher","removePublisher","removeAllPublisher","addReport","removeReport","removeAllReports","addArea","addAllAreas","removeArea","removeAllAreas","addCategory","addAllCategories","removeCategory","removeAllCategories","addMeasure","addAllMeasures","removeMeasure","removeAllMeasures","addCountry","addAllCounties","removeCountry","removeAllCounties","filterUtils","setSearch","reset","utils_mapPublishersDtoToPublishers","Active","PublisherID","PublisherName","PublisherNameShort","PublisherNameTranslated","PublisherUrl","nameShort","url","utils_mapCatalogReportsDtoToCatalogReports","ReportName","ReportNameCode","ReportNameTranslated","ReportUrl","utils_mapCatalogAreasDtoToCatalogAreas","AreaName","AreaNameCode","AreaNameTranslated","nameCode","utils_mapCatalogCategoriesDtoToCatalogCategory","CategoryID","CategoryName","utils_mapCatalogMeasureDtoToCatalogMeasure","MeasureID","MeasureName","utils_mapCatalogCountryDtoToCatalogCountry","fetchPublishers","publishersDto","publishers","reportsDto","fetchAreas","areasDto","fetchCategories","categoriesDto","fetchMeasures","measuresDto","measure","fetchCounties","countiesDto","counties","catalog_sagas","storeBlockBlob","blockBlobClient","file","upload","educationsAndAnnouncements_actions","uploadEducationalVideo","Clients","uploadUri","credential","videoFile","uploadEducationalVideoThumbnail","videoGuid","thumbnailFile","duration","roles","educationalVideos_types","videoDate","AnonymousCredential","thumbnail","thumbnailResponse","thumbnailUri","educationsAndAnnouncementsSagaWatcher","menuReducer","immer_module","menuIds","createUniqueArray","frequency_reducers","futures_reducers","revision_reducers","recordsRootReducer","redux","productReducer","unitReducer","allIDs","chartReducer","allCharts","chartById","changeNormalization","selectedNormalizationID","changeTransformation","selectedTransformationID","organizationReducer","deleteIndex","splice","userReducer","email","firstName","lastName","emailConfirmed","isInvitationExpired","organizationReportsReducer","reportsReducer","viewReducer","allViews","orgName","allViewsWithoutRequestAccess","calendarsReducer","updateIndex","calendarReportsReducer","organizationUsersReducer","organizationUser","isAdmin","subscriptionReducer","sub","adminRootReducer","landingPageReducer","adminPageReducer","contextTableReducer","allSeriesTables","seriesTableById","allTables","tablesById","catalog_reducers_initialState","sortOrder","enums","DESCENDING","filterItems","publisherId","reportCode","areaId","categoryId","measureId","countryId","categories","countries","catalogReducer","educationsAndAnnouncementsReducer","fetchedAnnouncements","createdAt","deletedAnnouncement","deletedAnnouncementIndex","updatedAnnouncement","fetchedVideos","created","deletedVideo","deletedVideoIndex","ev","updatedVideo","sagaMiddleware","redux_saga_core_npm_proxy_esm","middleware","rootReducer","productPage","productPage_reducers","admin","landingPage","adminPage","authentication","catalog","educationsAndAnnouncements","window","__REDUX_DEVTOOLS_EXTENSION__","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","run","origin","userManager","oidc_client_min","authority","client_id","redirect_uri","silent_redirect_uri","post_logout_redirect_uri","automaticSilentRenew","response_type","scope","events","addAccessTokenExpired","dispatch","addAccessTokenExpiring","addUserLoaded","Dashboard_DashboardScene","Redirect","ItemContainer","ItemHeader","ItemData","ItemContentWrapper","CatalogHome_CatalogMenuHomeItem","reportTitle","publisherName","country","releaseDate","datePeriod","items","CatalogMenuHomeWrapper","CatalogHomeHeader","CatalogHome_CatalogMenuHome","UnfoldMore","SortByHeader","SortIconWrapper","CheckboxWrapper","SortByFilter_SortByFilter","Checkbox","selected","FilterIcon","FilterByHeader","FilterIconWrapper","FilterBy_FilterBy","CatalogMenuScene_Root","FiltersContainer","MenuContentContainer","Menu_CatalogMenuScene","AngleRightIcon","TooltipContent","isVisible","SelectedArrow","Tooltip_Tooltip","Submenu","ArrowContainer","ItemWrapper","hasChildren","TextContainer","BrowseDataItem_BrowseDataItem","isExpanded","isHovered","onDownIconClickHandler","onRightIconClickHandler","onMouseInHandler","getElementById","isOverflown","onMouseOutHandler","scrollHeight","clientHeight","scrollWidth","clientWidth","onSubmenuClickHandler","submenu","getMenu","handleSubmenuExpansion","addEventListener","removeEventListener","AngleDownIcon","onMouseOver","onMouseOut","submenuItem","BrowseDataItems_BrowseDataItem","SearchIcon","BrowseDataHeader","SearchIconWrapper","BrowseData_mapDispatchToProps","BrowseDataItems_BrowseData","ReportItem_Root","StyledLink","ReportItem_Header","ReportItem_Content","Label","Item","YearOnYearValue","span","isNegative","ArrowDown","LongArrowDown","ArrowUp","LongArrowUp","ReportItem_ReportItem","formatValue","MinExpandIcon","MidExpandIcon","Text","MenuContent_Content","HeaderTextWrapper","SubmenuWrapper","SubmenuBorderWrapper","SubmenuText","ReportsWrapper","MenuContent_Header","CollapseIcon","ExpandIcon","MenuContent_mapDispatchToProps","MenuComponents_MenuContent_MenuContent","onMenuSelectHandler","dispatchEvent","CustomEvent","onMenuExpansionHandler","onMenuCollapseHandler","MenuScene_Root","MenuScene_FiltersContainer","MenuScene_MenuContentContainer","Menu_MenuScene","browseDataItems","menuContentItems","menuReports","Hero","Section","LandingPageScene_Content","Title","h1","Description","DataCategoriesWrapper","section","DataCategory","SubHero","SubHeroImageWrapper","Image","SubHeroDescriptionWrapper","SubHeroDescription","h2","SubHeroBulletsWrapper","SubHeroBullet","LandingPage_LandingPageScene","handleCategoryClick","categoryRouteState","fontSize","lineHeight","lu_index_esm","gi_index_esm","fa6_index_esm","sub_hero_default","CatalogMenu_Root","CatalogMenu_Item","CatalogMenu_Link","catalogList","CatalogMenu_CatalogMenu","onMenuClick","getCatalogSort","getCatalogFilterSortOrder","getCatalogFilterSearch","getPublisherIds","getCatalogPublishersList","ids","getFilteredCatalogPublishersList","list","newList","containsString","sortObjectStringsByKey","ASCENDING","reverse","getReportCode","getCatalogReportsList","reportCodes","getFilteredCatalogReportsList","publisherIds","getAreaId","getCatalogAreasList","getFilteredCatalogAreasList","getCategoryId","getCatalogCategoryList","getFilteredCatalogCategoryList","getMeasureId","getCatalogMeasuresList","getFilteredCatalogMeasuresList","getCountryId","getCatalogCountriesList","getFilteredCatalogCountriesList","CatalogSortContainer_mapDispatchToProps","CatalogSortContainer_CatalogSortContainer","sortable","setCatalogSort","CatalogSortContainer_Root","SortItem","SortDownIcon","letters","letter","i","fromCharCode","catalogServices_api","addQueryParameter","currentParams","query","param","createSearchSeriesQuery","searchCriteria","page","pageSize","startsWith","contains","createSearchCriteriaQuery","catalogServices","searchSeries","catalogSeries","Data","hasNext","HasNext","searchReports","searchPublishers","HeaderContainer","CatalogSelectModal_Header","SearchContainer","CatalogSelectModal_ButtonContainer","ListTitleContainer","ListTitle","ClearSelect","ListContainer","ListItem","Modal_CatalogSelectModal","onClose","onSearchChange","onListItemClick","onClearSelectClick","onSortClick","LocalContentSearch","SortUpIcon","MinusIcon","itemName","ContentSearch","PublishersCatalogContainer_mapDispatchToProps","PublishersCatalogContainer_PublishersCatalogContainer","filteredList","selectedList","ReportsCatalogContainer_mapDispatchToProps","ReportsCatalogContainer_ReportsCatalogContainer","AreasCatalogContainer_mapDispatchToProps","AreasCatalogContainer_AreasCatalogContainer","CategoriesCatalogContainer_mapDispatchToProps","CategoriesCatalogContainer_CategoriesCatalogContainer","MeasuresCatalogContainer_mapDispatchToProps","MeasuresCatalogContainer_MeasuresCatalogContainer","ClearFilterContainer_ClearFilterContainer","FilterContent_FilterContent","PaginationContainer_PaginationContainer","PaginationBox_PaginationBox","SeriesLink_SeriesLink","FilterContent_FilterButton","components","FilterTabsWrapper","FilterTab","FilterIndicator","ModalView","FilterContent_ModalContentWrapper","CatalogSeriesScene_mapDispatchToProps","resetFilterSearch","Catalog_CatalogSeriesScene","publisherIdList","reportsList","areaList","categoryList","measureList","locationState","setTranslation","setPageSize","setPage","seriesList","setList","setHasNext","modalView","setModalView","none","filtersOverlay","hooks","onFilterClick","err","handleOpen","display","LangPicker","PaginationWrapper","Pagination_perPage","perPageClickHandler","overlay","isOpen","handleClose","measures","modalProps","getModalView","CountriesCatalogContainer_mapDispatchToProps","CatalogReportsScene_ModalView","CountriesCatalogContainer_CountriesCatalogContainer","CatalogReportsScene_mapDispatchToProps","CatalogReports_CatalogReportsScene","countryList","prevValues","nested","forName","CatalogPublishersScene_ModalView","CatalogReports_CatalogReportsSeriesScene","CatalogPublishersScene_mapDispatchToProps","CatalogPublishers_CatalogPublishersScene","CatalogPublishers_CatalogPublishersReportsScene","CatalogScene_Root","CatalogScene_Content","ContentHeader","ContentTitle","CatalogScene_Link","MetaContainer","MetaTitle","MetaText","CatalogScene_mapDispatchToProps","clearAllFilters","Catalog_CatalogScene","selectedCatalog","setSelectedCatalog","CatalogView","Accordion_HeaderContainer","Accordion_Accordion","visible","Slider_Input","DRP_INPUT","Slider_Slider","InputContainer_HeaderWrapper","calendar_regular_default","SECONDARY","LabelWrapper","InputContainer_Label","InputContainer_Value","InputContainer_InputContainer","TableHead","TableHeader_TableHeader","RevenuePredictionContainer_stateCodeList","RevenuePredictionContainer_practiceCodeList","riskPremiumService_api","riskPremiumService_addQueryParameter","riskPremiumService","reinsuranceYear","stateCode","practiceCode","salesEffectiveDate","butterfatTest","proteinTest","classPriceWeightingFactor","coverageLevel","coveredMilkProduction","protectionFactor","share","apiData","Component","ButterPrice","ExpectedPrice","ActualPrice","MonthPrices","Sigma","CheesePrice","DryWheyPrice","ButterfatPrice","ProteinPrice","OtherSolidsPrice","NonfatDryMilk","ExpectedRevenue","ExpectedRevenueCwt","ActualRevenue","ActualRevenueCwt","RevenueGuarantee","RevenueGuaranteeCwt","Premium","PremiumCwt","Subsidy","SubsidyCwt","ProducerPreimum","ProducerPreimumCwt","ProbabilityOfPostiveIndemnity","ProbabilityOfPositiveNetBenefit","GrossIndemnity","GrossIndemnityCwt","Class","ClassIIIPrice","ClassIVPrice","MilkProduction","RevenuePredictionContainer_SelectOption","SelectField_Input","RevenuePredictionContainer_SelectField","react_custom_scrollbars_lib_default","RevenuePredictionContainer_Root","RevenuePredictionContainer_ContentHeader","SettingContainer","SettingsRow","WhatIfContainer","WhatIfInputContainer","WhatIfResultContainer","Column","ColumnExpected","ColumnMonth","ColumnLabel","ColumnImportant","ColumnImportantLabel","TableInput","DMPInput","RevenuePredictionContainer_RevenuePredictionContainer","isWhatIfOpen","setWhatIfOpenStatus","setCoverageLevel","setButterfatTest","setProtectionFactor","setProteinTest","setClassPriceWeightingFactor","setSalesEffectiveDate","setCoveredMilkProduction","setStateCode","stateCodeName","setStateCodeName","setPracticeCode","practiceCodeName","setPracticeCodeName","inputFields","mutateInputFields","butter","c","cheese","dryWhey","noFatDryMilk","milkProd","updateInputField","fieldName","object","returnToZero","num","roundOn","decimals","parseFloat","roundOn4","results","mutateResults","actualCalculatedPrices","butterfat","protein","otherSolids","nonfatSolid","classIIIMilk","classIVMilk","revenue","guaranteeDPRPerCwt","class","actual","actualPerCwt","grossIndemnity","grossIndemnityPerCwt","class3","class4","calculateClassIIIActual","month","butterfatPrice","calculateButterfatPrices","calculateProteinPrices","calculateOtherSolidPrices","calculateClassIVActual","price","calculateNonfatSolidsPrices","max","setData","DayPickerInput_default","onDayChange","format","s","o","dayPickerProps","selectedDays","min","step","borderBottom","rowSpan","DairyRevenuePrediction_RevenuePredictionScene","ViewMailNotificationsTable_mapDispatchToProps","ViewMailNotifications_ViewMailNotificationsTable","subsAndViews","admin_selectors","activeSubscriptions","displayViews","getNotifSelectedStatus","organizationViewName","onReceiveClickHandler","existingSubscription","adminPanel_Table","skipmarginright","PageHeaderWrapper","PageHeader","ViewMailNotificationsScene_mapDispatchToProps","setAdminSearch","ViewMailNotifications_ViewMailNotificationsScene","searchParameter","adminPage_selectors","setPerPage","setActivePage","sortBy","setSortBy","margin","shared_SelectField_SelectField","sortingOptions","newSortBy","so","Pagination","v","UdmApiSubscriptionScene_Root","HeadingWrapper","Heading","HeadingDescription","Highlight","InfoSectionWrapper","SubHeading","InfoSection","ServicesWrapper","ServicesDescriptionContainer","ServicesImageContainer","ServicesImage","WhatWeCoverDescription","CoveredServicesWrapper","FooterActionsWrapper","FooterNote","LANDING_PAGE_SECONDARY","DEFAULT_ACTIVE_SECTION","dairy-markets","grain-feed-markets","livestock-markets","UdmApiSubscriptionScene","activeSection","setActiveSection","current","activeSectionDOM","scrollIntoView","behavior","block","inline","marginTop","CoveredServicesContainer","handleServiceClick","service","dairy_section_default","grain_feed_section_default","livestock_section_default","no_section_selected_default","coveredServices","cs","Service","coveredService","CoveredService","ServiceButton","ServiceDescription","CoveredServiceTitle","io_index_esm","publicApi","ContactUsScene_Root","ContactUsScene_Header","ContactUsScene_Heading","ContactUsScene_InfoSection","ContactUsScene","ContactUsFormContainerWithRouter","FormWrapper","ContactUsForm","form","FormHeading","FormInput","adminPanel_Input","FormLabel","INIT_FORM_VALUES","companyName","MAX_MSG_CHAR_LENGTH","MessageTextArea","textarea","TooManyCharsError","formValues","setFormValues","isSubmitting","setIsSubmitting","tooManyMessageChars","invalidForm","handleInputChange","formProp","persist","onSubmit","preventDefault","trimmedEmail","validateEmail","warn","businessEmail","disabled","maxLength","marginBottom","AboutUsScene_Root","AboutUsScene_Heading","AboutUsContainer","MemberWrapper","MemberName","MemberRole","MemberInfo","WhoWeServeContainer","Grid","AboutUsScene","whoWeServe","wws","GridItem","gridItem","GridItemContainer","GridItemIconWrapper","GridItemIcon","GridItemTitle","GridItemDescription","info","pi_index_esm","bs_index_esm","vsc_index_esm","io5_index_esm","callback_Root","callback_NavBar","callback_Container","callback_mapDispatchToProps","getAuthState","setExpireAt","src_callback","signinRedirectCallback","finally","catch","signinSilentCallback","signoutRedirectCallback","layout_Root","ContainerWrapper","layout_Container","layout_Content","PublicRoute","component","isAuthenticated","rest","Route","render","es_Redirect","LandingPageScenesWrapper","PrivateRoute","router_NotFound","routerHistory","NotFound_Root","NotFound_LogoImg","ButtonsWrapper","goBack","EduAndAnnSkeleton_Root","AdminPanel","AdminPanelSkeleton","EduAndAnn","App_mapDispatchToProps","src_App","BrowserRouter","path","exact","isLocalhost","Boolean","hostname","registerValidSW","swUrl","navigator","serviceWorker","register","registration","onupdatefound","installingWorker","installing","onstatechange","controller","reload","react_dom","store","URL","indexOf","ready","unregister","checkValidServiceWorker","getProductPageProductID","getProductPageAreaID","getExploreDataView","getUnitID","getChartID","getDisplayDateRange","getPageState","getComparisonPeriod","getContractMonthRange","getScale","getSelectedContextTable","getContextSorting","getFuturesTradingDate","getFuturesDisplayType","getFuturesContractMonth","getFuturesNearbyIndex","getProductPageFrequency","getChartUnitName","_units_selectors__WEBPACK_IMPORTED_MODULE_1__","_products_selectors__WEBPACK_IMPORTED_MODULE_2__","defaultUnit","selectedUnit","menuActions","dataA","dataB","getTimeIndexFromTimestamp","getYearFromTimestamp","getFrequencyTimestamp","date_fns__WEBPACK_IMPORTED_MODULE_0__","dayNumber","week","getAdminPageSearch","getAdminPageOrganization","getExpiresAt","backgroundColor","start","end","positiveStart","positiveEnd","fill","_media_svg_arrowDropDown_svg__WEBPACK_IMPORTED_MODULE_3__","_media_svg_arrowDropDown_svg__WEBPACK_IMPORTED_MODULE_3___default","select","unitsActions","_SwitchButton_SwitchButton__WEBPACK_IMPORTED_MODULE_1__","styled_components__WEBPACK_IMPORTED_MODULE_2__","adminActions","productActions","CheckIcon","BoxIcon","icons_CheckboxIcon","adminPageActions","useOverlay","setIsOpen","useSpinner","isSpinning","setIsSpinning","startSpin","endSpin","getSubsAndViews","getActiveSubscriptions","getViewsForDisplay","getFilteredOrganizations","getETLReports","getFilteredOrganizationViews","getSlicedOrganizationViews","getFilteredUsers","getModalFilteredUsers","getModalSlicedUsers","getDataLength","_utils_containsString__WEBPACK_IMPORTED_MODULE_2__","_adminPage_selectors__WEBPACK_IMPORTED_MODULE_3__","_utils_sortObjectStringsByKey__WEBPACK_IMPORTED_MODULE_4__","_authentication_selectors__WEBPACK_IMPORTED_MODULE_5__","_authentication_reducers__WEBPACK_IMPORTED_MODULE_6__","activeSubsSet","localeCompare","getSelectedOrganizationCalendars","allCalendars","paginationActivePage","paginationPerPage","calendar","getAllOrganizationViews","getFilteredRecords","allCalendarReports","added","calendarReport","sortDirection","sortedOrganizations","fullName","selectedOrg","orgReports","mappedOrganizationReports","orgReport","sortedReports","selectedOrganizationViews","mappedOrganizationViews","orgView","sortedViews","getMemberOrganizationViews","memberOrgViews","mov","filteredMemberOrganizationViews","filteredOrganizationViews","getUsersDisplayed","orgUsers","userList","ou","u","ul","sorted","filteredUsers","filteredUser","orgUser","usersLength","organizationsLength","reportsLength","viewsLength","calendarsLength","Overlay","_headings__WEBPACK_IMPORTED_MODULE_2__","src_utils_color__WEBPACK_IMPORTED_MODULE_3__","Wrapper","stopPropagation","HeadWrapper","CloseButton","_media_svg_search_svg__WEBPACK_IMPORTED_MODULE_2__","_media_svg_search_svg__WEBPACK_IMPORTED_MODULE_2___default","chartActions","_utils_emptyFunc__WEBPACK_IMPORTED_MODULE_3__","_shared_SelectField_SelectField__WEBPACK_IMPORTED_MODULE_4__","RightContainer","buttons","buttonTitle","getAllUnits","getUnitByID","getAllUnitIDs","getSelectedUnit","getAllProductUnits","defaultProductUnit","unitsByID"],"mappings":"0FAAAA,EAAAC,EAAAC,EAAA,sBAAAC,IAAAH,EAAAC,EAAAC,EAAA,sBAAAE,IAAA,IAAAC,EAAAL,EAAA,GAEO,MAAMG,EAAWE,EAAA,EAAOC;;;EAKlBF,EAAWC,EAAA,EAAOE;;;oCCP/B,IAAAF,EAAAL,EAAA,GAAAQ,EAAAR,EAAA,GAKA,MAAMS,EAAKJ,EAAA,EAAOK;;WAEPF,EAAA,EAAMG;eACF,EAAGC,cAAgBA,EAAWA,EAASC,OAAS;;mBAE5CL,EAAA,EAAMM;EAGVZ,EAAA,sCCZfF,EAAAC,EAAAC,EAAA,sBAAAa,IAAAf,EAAAC,EAAAC,EAAA,sBAAAc,IAAAhB,EAAAC,EAAAC,EAAA,sBAAAe,IAAAjB,EAAAC,EAAAC,EAAA,sBAAAgB,IAAAlB,EAAAC,EAAAC,EAAA,sBAAAiB,IAAAnB,EAAAC,EAAAC,EAAA,sBAAAkB,IAAApB,EAAAC,EAAAC,EAAA,sBAAAmB,IAAArB,EAAAC,EAAAC,EAAA,sBAAAoB,IAAAtB,EAAAC,EAAAC,EAAA,sBAAAqB,IAAAvB,EAAAC,EAAAC,EAAA,sBAAAsB,IAAAxB,EAAAC,EAAAC,EAAA,sBAAAuB,IAAAzB,EAAAC,EAAAC,EAAA,sBAAAwB,IAAA1B,EAAAC,EAAA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,EACH,MAAO,CAAC,CAAE79D,GAAI49D,EAAmB59D,GAAIC,KAAM29D,EAAmB39D,OAEhE,MAAMysB,EAAuB,GAC7BmxC,EAAUz4B,OAAO7uB,QAASrQ,IACpBA,IAAW03D,EAAmB59D,IAChC0sB,EAAMjW,KAAK,CACTzW,GAAI69D,EAAU33D,GAAQlG,GACtBC,KAAM49D,EAAU33D,GAAQjG,KACxB+E,MAAO64D,EAAU33D,GAAQlB,UAK/B,MAAMqxD,EAAc,CAAEr2D,GAAI49D,EAAmB59D,GAAIC,KAAM29D,EAAmB39D,MAE1E,OADAysB,EAAMjW,KAAK4/C,GACJ3pC","file":"static/js/main.f57a7e8c.chunk.js","sourcesContent":["import styled from \"styled-components\";\r\n\r\nexport const Heading3 = styled.h3`\r\n margin: 0;\r\n padding: 0.5rem 0;\r\n`;\r\n\r\nexport const Heading4 = styled.h4`\r\n margin: 0;\r\n padding: 0.35rem 0;\r\n`;\r\n","import styled from \"styled-components\";\r\nimport color from \"../../../utils/color\";\r\n\r\ntype Props = { maxWidth?: string };\r\n\r\nconst TD = styled.td`\r\n padding: 10px 20px 10px 0;\r\n color: ${color.TEXT_PRIMARY};\r\n max-width: ${({ maxWidth }) => (maxWidth ? maxWidth.trim() : \"550px\")};\r\n word-wrap: break-word;\r\n border-bottom: ${color.NEUTRAL} solid 1px;\r\n`;\r\n\r\nexport default TD;\r\n","import { RootState } from \"../store\";\r\nimport { createSelector } from \"reselect\";\r\nimport { Product } from \"../../types/Product\";\r\nimport {\r\n getProductIDFromProps,\r\n getFrequencyFromProps,\r\n getAreaIDFromProps,\r\n} from \"../fromPropsSelector\";\r\n\r\nexport const getAllProducts = (state: RootState) => state.product.productById;\r\nexport const getAllProductIDs = (state: RootState) => state.product.allProducts;\r\n\r\nexport const getProduct = createSelector(\r\n getProductIDFromProps,\r\n getAllProducts,\r\n (productID, allProducts): Product | null => {\r\n if (!productID) {\r\n return null;\r\n }\r\n if (!allProducts[Number(productID)]) {\r\n return null;\r\n }\r\n return allProducts[Number(productID)];\r\n }\r\n);\r\n\r\nexport const getProductFromProduct = createSelector(getProduct, (product) =>\r\n product !== null ? product.product : null\r\n);\r\n\r\nexport const getReportFromProduct = createSelector(getProduct, (product) =>\r\n product !== null ? product.report : null\r\n);\r\n\r\nexport const getPublisherFromProduct = createSelector(getProduct, (product) =>\r\n product !== null ? product.publisher : null\r\n);\r\n\r\nexport const getSummaryFromProduct = createSelector(getProduct, (product) =>\r\n product !== null ? product.summary : null\r\n);\r\n\r\nexport const getUnitFromProduct = createSelector(getProduct, (product) =>\r\n product !== null ? product.unit : null\r\n);\r\n\r\nexport const getAreasFromProduct = createSelector(getProduct, (product) =>\r\n product !== null ? product.areas : null\r\n);\r\n\r\nexport const getUpdatesFromProduct = createSelector(getProduct, (product) =>\r\n product !== null ? product.updates : null\r\n);\r\n\r\nexport const getMetaFieldsFromProduct = createSelector(getProduct, (product) =>\r\n product !== null ? product.metaFields : null\r\n);\r\n\r\nexport const getDefaultScaleFromProduct = createSelector(\r\n getProduct,\r\n (product) => (product !== null ? product.defaultScale : null)\r\n);\r\n\r\nexport const getDefaultAreaFromProduct = createSelector(\r\n getAreasFromProduct,\r\n (areas) => (areas !== null ? areas.defaultArea : null)\r\n);\r\n\r\nexport const getProductFirstReportPeriod = createSelector(\r\n getProduct,\r\n (product) => (product !== null ? product.summary.firstReportPeriod : null)\r\n);\r\n\r\nexport const getProductLastReportPeriod = createSelector(\r\n getProduct,\r\n (product) => (product !== null ? product.summary.lastReportPeriod : null)\r\n);\r\n\r\nexport const getFrequencyAreas = createSelector(\r\n getAreasFromProduct,\r\n getFrequencyFromProps,\r\n (areas, frequency) => {\r\n if (areas === null) {\r\n return [];\r\n }\r\n return areas[frequency];\r\n }\r\n);\r\n\r\nexport const getAvailableProductFrequencies = createSelector(\r\n getAreasFromProduct,\r\n (areas) => {\r\n if (!areas) {\r\n return [];\r\n }\r\n return areas.availableFrequencies;\r\n }\r\n);\r\n\r\nexport const getAreaInfo = createSelector(\r\n getAreasFromProduct,\r\n getFrequencyFromProps,\r\n getAreaIDFromProps,\r\n (areas, frequency, areaID) => {\r\n if (\r\n areas &&\r\n frequency &&\r\n areaID &&\r\n (areas.defaultArea.frequency as any) !== \"Futures\"\r\n ) {\r\n return areas[frequency].find((area) => area.id === areaID) || null;\r\n }\r\n return { name: \"Futures\" };\r\n }\r\n);\r\n","import color from \"src/utils/color\";\r\nimport styled from \"styled-components\";\r\n\r\nexport const Button = styled.button<{\r\n variant?: \"primary\" | \"secondary\" | \"danger\";\r\n}>`\r\n cursor: pointer;\r\n padding: 0.5rem 1rem;\r\n color: ${({ variant }) => {\r\n switch (variant) {\r\n case \"danger\":\r\n case \"primary\":\r\n return \"white\";\r\n case \"secondary\":\r\n return color.NEUTRAL_DARK;\r\n default:\r\n return color.TEXT_PRIMARY;\r\n }\r\n }};\r\n background-color: ${({ variant }) => {\r\n switch (variant) {\r\n case \"primary\":\r\n return color.PRIMARY;\r\n case \"secondary\":\r\n return color.BACKGROUND;\r\n case \"danger\":\r\n return color.NEGATIVE;\r\n default:\r\n return color.BACKGROUND;\r\n }\r\n }};\r\n border: ${({ variant }) => {\r\n switch (variant) {\r\n case \"primary\":\r\n return `1px solid ${color.PRIMARY}`;\r\n case \"secondary\":\r\n return `1px solid ${color.NEUTRAL_DARK}`;\r\n default:\r\n return \"none\";\r\n }\r\n }};\r\n border-radius: 2rem;\r\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);\r\n transition: transform 0.1s linear;\r\n text-transform: ${({ variant }) =>\r\n variant === \"danger\" ? \"uppercase\" : \"none\"};\r\n\r\n &:hover {\r\n transform: translateY(0.075rem);\r\n }\r\n\r\n &:disabled {\r\n cursor: not-allowed;\r\n opacity: 0.5;\r\n transform: none;\r\n }\r\n`;\r\n\r\nexport const IconButton = styled.button`\r\n font-size: 1.25rem;\r\n padding: 0.25rem;\r\n border: none;\r\n background-color: transparent;\r\n display: flex;\r\n border-radius: 50%;\r\n cursor: pointer;\r\n transition: background-color 0.125s linear;\r\n\r\n &:hover {\r\n background-color: rgba(110, 178, 63, 0.175);\r\n }\r\n`;\r\n\r\nexport const ActionButton = styled.button`\r\n color: ${color.PRIMARY};\r\n border: none;\r\n background-color: transparent;\r\n font-size: 0.95rem;\r\n cursor: pointer;\r\n display: flex;\r\n align-items: center;\r\n column-gap: 0.125rem;\r\n padding: 0;\r\n\r\n &:hover {\r\n text-decoration: underline;\r\n }\r\n`;\r\n","export { Button, IconButton, ActionButton } from \"./buttons\";\r\nexport { Heading3, Heading4 } from \"./headings\";\r\n","import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport color from '../../../utils/color';\r\n\r\nconst SelectOptionWrapper = styled.div`\r\n display: flex;\r\n font-size: 14px;\r\n font-weight: lighter;\r\n padding: 5px 0 5px 0;\r\n color: ${color.TEXT_PRIMARY};\r\n`;\r\n\r\nconst Dot = styled.div`\r\n height: 13px;\r\n width: 13px;\r\n margin-right: 10px;\r\n border-radius: 50%;\r\n border: ${color.NEUTRAL_DARK} solid 1px;\r\n`;\r\n\r\nconst ActiveDot = styled.div`\r\n margin: 1px;\r\n height: 11px;\r\n width: 11px;\r\n border-radius: 50%;\r\n background-color: ${color.PRIMARY};\r\n`;\r\n\r\ninterface Props {\r\n type: string,\r\n name: string,\r\n checked: boolean,\r\n value: string | number,\r\n label?: string,\r\n onClick?(value: string | number): void,\r\n}\r\n\r\nfunction onClickHandler(value: string | number, onClick?: (value: string | number) => void ) {\r\n return () => onClick ? onClick(value) : null;\r\n}\r\nconst SelectOption: React.FC = ({ type, name, checked, value, label, onClick }) => (\r\n \r\n { checked && }{label}\r\n \r\n);\r\n\r\nexport default SelectOption;\r\n","import * as React from \"react\";\r\nimport styled from \"styled-components\";\r\nimport color from \"../../../utils/color\";\r\nimport dropDownIcon from \"src/media/svg/arrowDropDown.svg\";\r\nimport SelectOption from \"./SelectOption\";\r\nimport Scrollbars from \"react-custom-scrollbars\";\r\n\r\nconst SelectFieldWrapper = styled.div`\r\n display: inline-block;\r\n z-index: 10;\r\n`;\r\n\r\nconst Select = styled.div<{\r\n width?: number;\r\n textColor: string;\r\n fontWeight: number;\r\n}>`\r\n border: 1px solid ${color.PRIMARY};\r\n border-radius: 1.5rem;\r\n display: inline-block;\r\n position: relative;\r\n padding: 5px 20px 5px 15px;\r\n width: calc(${({ width = 185 }) => width}px - 20px);\r\n line-height: 27px;\r\n appearance: none;\r\n background: transparent url(\"${dropDownIcon}\") no-repeat right;\r\n font-weight: ${({ fontWeight }) => fontWeight};\r\n font-size: 14px;\r\n cursor: pointer;\r\n color: ${({ textColor }) => textColor};\r\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25 );\r\n`;\r\n\r\nconst SelectDropDown = styled.div<{ isOpened: boolean; width?: number }>`\r\n display: ${({ isOpened }) => (isOpened ? \"block\" : \"none\")};\r\n position: absolute;\r\n padding-left: 5px;\r\n border: 1px solid ${color.NEUTRAL_LIGHT};\r\n background-color: ${color.BACKGROUND};\r\n border-radius: 6px;\r\n width: ${({ width = 185 }) => width}px;\r\n z-index: 20;\r\n cursor: pointer;\r\n`;\r\n\r\nconst Input = styled.input<{\r\n width?: number;\r\n textColor: string;\r\n fontWeight: number;\r\n}>`\r\n font-family: \"Open Sans\", sans-serif;\r\n border: none;\r\n outline: none;\r\n font-size: 14px;\r\n font-weight: ${({ fontWeight }) => fontWeight};\r\n color: ${({ textColor }) => textColor};\r\n margin: 0 0 0 -1px;\r\n cursor: pointer;\r\n caret-color: transparent;\r\n width: calc(${({ width = 185 }) => width}px - 30px);\r\n\r\n &::placeholder {\r\n color: ${({ textColor }) => textColor};\r\n }\r\n`;\r\n\r\ntype Props = {\r\n options: Array<{\r\n id: number | string;\r\n name: string;\r\n }>;\r\n value: string;\r\n width?: number;\r\n textColor?: string;\r\n fontWeight?: number;\r\n onChange: (value: string | number) => void;\r\n};\r\n\r\ntype State = {\r\n isOpened: boolean;\r\n filter: string;\r\n};\r\n\r\nclass SelectField extends React.Component {\r\n public state = {\r\n isOpened: false,\r\n filter: \"\",\r\n };\r\n\r\n public render() {\r\n const { filter, isOpened } = this.state;\r\n const {\r\n value,\r\n options,\r\n width,\r\n onChange,\r\n textColor = color.TEXT_PRIMARY,\r\n fontWeight = 400,\r\n } = this.props;\r\n\r\n const SelectOptions = options\r\n .filter((option) =>\r\n option.name.toLowerCase().includes(filter.toLowerCase())\r\n )\r\n .map((option) => (\r\n \r\n ));\r\n\r\n return (\r\n \r\n \r\n {!isOpened ? (\r\n value\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n
{SelectOptions}
\r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n private onInputChange = (event: React.ChangeEvent) => {\r\n this.setState({ filter: event.target.value });\r\n };\r\n\r\n private handleSelectDropDown = () => {\r\n this.setState({ isOpened: !this.state.isOpened, filter: \"\" });\r\n };\r\n\r\n private handleMouseLeave = () => {\r\n this.setState({ isOpened: false, filter: \"\" });\r\n };\r\n}\r\n\r\nexport default SelectField;\r\n","import { FaSortAlphaDown as SortDownIcon } from 'react-icons/fa';\r\n\r\nexport default SortDownIcon;\r\n","module.exports = __webpack_public_path__ + \"static/media/udm_logo.ef3df371.svg\";","import { RootState } from '../../store';\r\nimport { FrequencyRecordProduct } from './reducers';\r\nimport { createSelector } from 'reselect';\r\nimport { getAreaIDFromProps, getFrequencyFromProps, getProductIDFromProps } from '../../fromPropsSelector';\r\n\r\nexport const getFrequencyRecordsProductList = (state: RootState): number[] => state.records.frequency.allProducts;\r\nexport const getAllFrequencyRecords = (state: RootState): FrequencyRecordProduct => state.records.frequency.productsById;\r\n\r\nexport const getFrequencyRecord = createSelector(\r\n getAllFrequencyRecords,\r\n getProductIDFromProps,\r\n getFrequencyFromProps,\r\n (allRecords, productId, frequency) => {\r\n if (allRecords[productId] && allRecords[productId][frequency]) {\r\n return allRecords[productId][frequency];\r\n }\r\n return null;\r\n },\r\n);\r\n\r\nexport const getFrequencyAreaRecords = createSelector(\r\n getFrequencyRecord,\r\n getAreaIDFromProps,\r\n (records, areaID) => {\r\n if (records && records[areaID] ) {\r\n return records[areaID];\r\n }\r\n return null;\r\n },\r\n);\r\n","import styled from \"styled-components\";\r\nimport color from \"../../../utils/color\";\r\n\r\nconst HeaderCell = styled.th<{\r\n width?: string;\r\n textAlign?: \"right\" | \"left\" | \"center\";\r\n}>`\r\n text-align: ${({ textAlign }) => (textAlign ? textAlign : \"left\")};\r\n padding: 0.25rem 0;\r\n border-bottom: 2px solid ${color.NEUTRAL};\r\n width: ${({ width = \"auto\" }) => width};\r\n\r\n svg {\r\n width: 25px;\r\n color: ${color.PRIMARY};\r\n }\r\n`;\r\n\r\nexport default HeaderCell;\r\n","const toPrecision = (value: number, scale: number = 0): number => {\r\n if (value % 1 === 0 || scale < 0) {\r\n return value;\r\n }\r\n return Number(value.toFixed(scale));\r\n};\r\n\r\nexport default toPrecision;\r\n","export enum Language {\r\n DEFAULT = 'en-US',\r\n EN_US = 'en-US',\r\n}\r\n","import toPrecision from './toPrecision';\r\nimport { Language } from './language';\r\n\r\nconst formatValue = (scale: number, locale: string = Language.DEFAULT) => (value: number) =>\r\n toPrecision(value, scale).toLocaleString(locale, {minimumFractionDigits: scale, maximumFractionDigits: scale});\r\n\r\nexport default formatValue;\r\n","import produce from 'immer';\r\nimport { PeriodFrequency } from '../../types/PeriodFrequency';\r\nimport { productPageActions, ProductPageActions } from './actions';\r\nimport { getType } from 'typesafe-actions';\r\nimport { ExploreData } from '../../utils/enums';\r\nimport { ContextTablesConfigIDs } from '../contextTable/contextTables.config';\r\nimport { endOfMonth } from 'date-fns';\r\n\r\nexport enum ComparisonPeriod {\r\n None = 0,\r\n Day = 1,\r\n Week = 2,\r\n Month = 3,\r\n}\r\n\r\nexport enum ContractMonthRange {\r\n '1M' = 1,\r\n '3M' = 3,\r\n '6M' = 6,\r\n '1YR' = 12,\r\n // TODO: find better solution!\r\n ALL = 999,\r\n}\r\n\r\nexport interface ProductPageState {\r\n pageState: pageState,\r\n productID: number | null,\r\n areaID: number | null,\r\n unitID: number | null,\r\n chartID: number | null,\r\n scale: number,\r\n futuresTradingDate: Date,\r\n frequency?: PeriodFrequency,\r\n contextTable: ContextTablesConfigIDs,\r\n exploreDataView: ExploreData,\r\n displayDateRange: DisplayDateRange,\r\n comparisonPeriod?: ComparisonPeriod,\r\n contractMonthRange?: ContractMonthRange,\r\n contextSorting?: { by: string, direction: 'ascending' | 'descending' },\r\n translated: boolean,\r\n futuresDisplayType: string,\r\n futuresContractMonth: Date,\r\n futuresNearbyIndex: number,\r\n}\r\n\r\nexport interface DisplayDateRange {\r\n from: Date,\r\n to: Date,\r\n}\r\n\r\nexport enum pageState {\r\n INITIALIZING = 'initializing',\r\n LOADING = 'loading',\r\n LOADED = 'loaded',\r\n}\r\n\r\nexport const initialState: ProductPageState = {\r\n pageState: pageState.INITIALIZING,\r\n productID: null,\r\n areaID: null,\r\n unitID: null,\r\n chartID: null,\r\n scale: 0,\r\n futuresTradingDate: new Date(),\r\n contextTable: 0,\r\n comparisonPeriod: ComparisonPeriod.None,\r\n contractMonthRange: ContractMonthRange['6M'],\r\n exploreDataView: ExploreData.TIME_ENDING,\r\n displayDateRange: {\r\n from: new Date(new Date().getFullYear() - 5, 0),\r\n to: new Date(new Date().getFullYear(), new Date().getMonth()),\r\n },\r\n translated: false,\r\n futuresDisplayType: 'TradeDate',\r\n futuresContractMonth: endOfMonth(new Date()),\r\n futuresNearbyIndex: 1,\r\n};\r\n\r\nexport const productPageReducer = produce(\r\n (state: ProductPageState, action) => {\r\n switch (action.type) {\r\n case getType(productPageActions.setProduct):\r\n state.productID = action.payload.productID;\r\n state.areaID = action.payload.areaID;\r\n state.chartID = action.payload.chartID;\r\n state.frequency = action.meta.frequency;\r\n state.unitID = action.meta.unitID;\r\n state.scale = action.meta.scale;\r\n state.contextTable = 0;\r\n if (action.meta.lastReportPeriod) {\r\n state.displayDateRange.to = action.meta.lastReportPeriod;\r\n state.displayDateRange.from = new Date(action.meta.lastReportPeriod.getFullYear() - 5, action.meta.lastReportPeriod.getMonth());\r\n }\r\n return;\r\n case getType(productPageActions.pageStatus.loading):\r\n state.pageState = pageState.LOADING;\r\n return;\r\n case getType(productPageActions.pageStatus.loaded):\r\n state.pageState = pageState.LOADED;\r\n return;\r\n case getType(productPageActions.setSelectedChart):\r\n state.chartID = action.payload;\r\n return;\r\n case getType(productPageActions.setDisplayDateRange):\r\n state.displayDateRange.from = action.payload.from;\r\n state.displayDateRange.to = action.payload.to;\r\n return;\r\n case getType(productPageActions.setExploreDataTo.timeChange):\r\n state.exploreDataView = ExploreData.TIME_CHANGE;\r\n return;\r\n case getType(productPageActions.setExploreDataTo.timeEnding):\r\n state.exploreDataView = ExploreData.TIME_ENDING;\r\n return;\r\n case getType(productPageActions.setExploreDataTo.timeOnTime):\r\n state.exploreDataView = ExploreData.TIME_ON_TIME;\r\n return;\r\n case getType(productPageActions.setExploreDataTo.yearOnYear):\r\n state.exploreDataView = ExploreData.YEAR_ON_YEAR;\r\n return;\r\n case getType(productPageActions.changeUnitID):\r\n state.unitID = action.payload;\r\n return;\r\n case getType(productPageActions.changeScale):\r\n state.scale = action.payload;\r\n return;\r\n case getType(productPageActions.setContextTable):\r\n state.contextTable = action.payload;\r\n return;\r\n case getType(productPageActions.setSorting):\r\n state.contextSorting = { by: action.payload, direction: action.meta };\r\n return;\r\n case getType(productPageActions.reinitializeState):\r\n state.pageState = pageState.INITIALIZING;\r\n state.productID = null;\r\n state.areaID = null;\r\n state.unitID = null;\r\n state.chartID = null;\r\n state.contextTable = 0;\r\n state.exploreDataView = ExploreData.TIME_ENDING;\r\n state.displayDateRange = {\r\n from: new Date(new Date().getFullYear() - 5, 0),\r\n to: new Date(new Date().getFullYear(), new Date().getMonth()),\r\n };\r\n delete state.frequency;\r\n delete state.contextSorting;\r\n return;\r\n case getType(productPageActions.changeComparisonPeriod):\r\n state.comparisonPeriod = action.payload;\r\n return;\r\n case getType(productPageActions.changeContractMonth):\r\n state.contractMonthRange = action.payload;\r\n return;\r\n case getType(productPageActions.toggleTranslation):\r\n state.translated = !state.translated;\r\n return;\r\n case getType(productPageActions.setFuturesTradingDate):\r\n state.futuresTradingDate = action.payload;\r\n return;\r\n case getType(productPageActions.setFuturesDisplayType):\r\n state.futuresDisplayType = action.payload;\r\n return;\r\n case getType(productPageActions.setFuturesContractMonth):\r\n state.futuresContractMonth = action.payload;\r\n return;\r\n case getType(productPageActions.setFuturesNearbyIndex):\r\n state.futuresNearbyIndex = action.payload;\r\n return;\r\n }\r\n }, initialState,\r\n);\r\n","import styled from \"styled-components\";\r\n\r\nconst Table = styled.table`\r\n width: 100%;\r\n border-collapse: collapse;\r\n font-size: 14px;\r\n`;\r\n\r\nexport default Table;\r\n","import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport color from 'src/utils/color';\r\n\r\nconst SpinnerContainer = styled.div<{ width?: number, height?: number, afterWidth?: number, afterHeight?: number, left?: number }>`\r\n color: ${color.NEGATIVE};\r\n display: inline-block;\r\n position: relative;\r\n width: ${({ width }) => width ? width : 64}px;\r\n height: ${({ width }) => width ? width : 64}px;\r\n div {\r\n transform-origin: ${({ width }) => width ? width / 2 : 32}px ${({ height }) => height ? height / 2 : 32}px;\r\n animation: lds-spinner 1.2s linear infinite;\r\n }\r\n div:after {\r\n content: \" \";\r\n display: block;\r\n position: absolute;\r\n top: 3px;\r\n left: ${({ left }) => left ? left : 29}px;\r\n width: ${({ afterWidth }) => afterWidth ? afterWidth : 5}px;\r\n height: ${({ afterHeight }) => afterHeight ? afterHeight : 14}px;\r\n border-radius: 20%;\r\n background: ${color.NEUTRAL};\r\n }\r\n div:nth-child(1) {\r\n transform: rotate(0deg);\r\n animation-delay: -1.1s;\r\n }\r\n div:nth-child(2) {\r\n transform: rotate(30deg);\r\n animation-delay: -1s;\r\n }\r\n div:nth-child(3) {\r\n transform: rotate(60deg);\r\n animation-delay: -0.9s;\r\n }\r\n div:nth-child(4) {\r\n transform: rotate(90deg);\r\n animation-delay: -0.8s;\r\n }\r\n div:nth-child(5) {\r\n transform: rotate(120deg);\r\n animation-delay: -0.7s;\r\n }\r\n div:nth-child(6) {\r\n transform: rotate(150deg);\r\n animation-delay: -0.6s;\r\n }\r\n div:nth-child(7) {\r\n transform: rotate(180deg);\r\n animation-delay: -0.5s;\r\n }\r\n div:nth-child(8) {\r\n transform: rotate(210deg);\r\n animation-delay: -0.4s;\r\n }\r\n div:nth-child(9) {\r\n transform: rotate(240deg);\r\n animation-delay: -0.3s;\r\n }\r\n div:nth-child(10) {\r\n transform: rotate(270deg);\r\n animation-delay: -0.2s;\r\n }\r\n div:nth-child(11) {\r\n transform: rotate(300deg);\r\n animation-delay: -0.1s;\r\n }\r\n div:nth-child(12) {\r\n transform: rotate(330deg);\r\n animation-delay: 0s;\r\n }\r\n @keyframes lds-spinner {\r\n 0% {\r\n opacity: 1;\r\n }\r\n 100% {\r\n opacity: 0;\r\n }\r\n }\r\n`;\r\n\r\ninterface Props {\r\n width?: number,\r\n height?: number,\r\n afterWidth?: number,\r\n afterHeight?: number,\r\n left?: number,\r\n}\r\n\r\nexport const Spinner: React.FC = ({ width, height, afterHeight, afterWidth, left }) => (\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n);\r\n","import { MdAssignment as SummaryIcon } from 'react-icons/md';\r\n\r\nexport default SummaryIcon;\r\n","import { MdEventNote as EventNoteIcon } from 'react-icons/md';\r\n\r\nexport default EventNoteIcon;\r\n","import { FaSortAlphaUp as SortUpIcon } from 'react-icons/fa';\r\n\r\nexport default SortUpIcon;\r\n","import { MdKeyboardArrowRight as RightArrowIcon } from 'react-icons/md'\r\n\r\nexport default RightArrowIcon;\r\n","import { MdKeyboardArrowLeft as LeftArrowIcon } from 'react-icons/md'\r\n\r\nexport default LeftArrowIcon;\r\n","import * as React from \"react\";\r\nimport styled from \"styled-components\";\r\nimport color from \"../../../utils/color\";\r\nimport RightArrowIcon from \"src/icons/RightArrowIcon\";\r\nimport LeftArrowIcon from \"src/icons/LeftArrowIcon\";\r\nimport numberRange from \"../../../utils/numberRange\";\r\n\r\nconst NumberBoxWrapper = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n`;\r\n\r\nconst NumberBox = styled.div<{ isSelected?: boolean; isNumber?: boolean }>`\r\n height: 35px;\r\n text-align: center;\r\n line-height: 35px;\r\n color: ${({ isSelected }) =>\r\n isSelected ? color.PRIMARY : color.ICONS_HEADER};\r\n font-size: 14px;\r\n width: 35px;\r\n font-weight: 600;\r\n background-color: ${({ isNumber }) =>\r\n isNumber ? color.BACKGROUND_SECONDARY : color.BACKGROUND};\r\n border-radius: 3px;\r\n margin-right: 5px;\r\n cursor: ${({ isNumber, isSelected }) =>\r\n isSelected ? \"default\" : isNumber ? \"pointer\" : \"default\"};\r\n\r\n &:last-child {\r\n margin-right: 0;\r\n }\r\n`;\r\n\r\nconst IconsWrapper = styled.div`\r\n height: 35px;\r\n width: 35px;\r\n transform: translateY(3px);\r\n color: ${color.NEUTRAL};\r\n font-size: 30px;\r\n cursor: pointer;\r\n`;\r\n\r\ntype Props = {\r\n dataLength: number;\r\n perPage: number;\r\n activePage: number;\r\n onClick(value: number): () => void;\r\n};\r\n\r\ntype State = { lastPage: number };\r\n\r\nclass Pagination extends React.Component {\r\n public state = {\r\n lastPage: Math.ceil(this.props.dataLength / this.props.perPage),\r\n };\r\n\r\n public componentDidUpdate(prevProps: Props) {\r\n if (\r\n prevProps.dataLength !== this.props.dataLength ||\r\n prevProps.perPage !== this.props.perPage\r\n ) {\r\n this.setState({\r\n lastPage: Math.ceil(this.props.dataLength / this.props.perPage),\r\n });\r\n }\r\n }\r\n\r\n public render() {\r\n const { dataLength, perPage } = this.props;\r\n\r\n return (\r\n dataLength > perPage && (\r\n \r\n {this.arrows(true)}\r\n {this.firstPage()}\r\n {this.dots(true)}\r\n {this.pageNumbers()}\r\n {this.dots(false)}\r\n {this.lastPage()}\r\n {this.arrows(false)}\r\n \r\n )\r\n );\r\n }\r\n\r\n private arrows = (leftSide: boolean) => {\r\n const { activePage, onClick } = this.props;\r\n const { lastPage } = this.state;\r\n if (activePage > 1 && leftSide) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n if (activePage < lastPage && !leftSide) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n return ;\r\n };\r\n\r\n private dots = (leftSide: boolean) => {\r\n const { activePage, dataLength, perPage } = this.props;\r\n const { lastPage } = this.state;\r\n if (!leftSide && activePage + 4 <= lastPage && dataLength / perPage > 5) {\r\n return ...;\r\n }\r\n if (leftSide && activePage > 4 && lastPage !== 5) {\r\n return ...;\r\n }\r\n return null;\r\n };\r\n\r\n private firstPage = () => {\r\n const { lastPage } = this.state;\r\n const { activePage, onClick } = this.props;\r\n if (activePage > 4 && lastPage !== 5) {\r\n const firstPage = 1;\r\n return (\r\n \r\n {firstPage}\r\n \r\n );\r\n }\r\n return null;\r\n };\r\n\r\n private lastPage = () => {\r\n const { activePage, onClick, dataLength, perPage } = this.props;\r\n const { lastPage } = this.state;\r\n if (activePage + 4 <= lastPage && dataLength / perPage > 5) {\r\n return (\r\n \r\n {lastPage}\r\n \r\n );\r\n }\r\n return null;\r\n };\r\n\r\n private pageNumbers = () => {\r\n const { lastPage } = this.state;\r\n const { onClick, dataLength, perPage, activePage } = this.props;\r\n let pageNumberRange: number[] = [];\r\n if (\r\n activePage > 4 &&\r\n activePage + 4 <= lastPage &&\r\n dataLength / perPage > 5\r\n ) {\r\n pageNumberRange = numberRange(activePage - 1, activePage + 2);\r\n } else if (activePage <= 4) {\r\n let pages = dataLength / perPage;\r\n if (pages >= 5) {\r\n pageNumberRange = numberRange(1, 6);\r\n } else if (dataLength % perPage !== 0) {\r\n pages = pages + 1;\r\n pageNumberRange = numberRange(1, Math.ceil(pages));\r\n }\r\n } else if (activePage + 4 >= lastPage) {\r\n pageNumberRange = numberRange(lastPage - 4, lastPage + 1);\r\n }\r\n return pageNumberRange.map((pageNumber, index) => (\r\n \r\n {pageNumber}\r\n \r\n ));\r\n };\r\n}\r\n\r\nexport default Pagination;\r\n","const emptyFunc = () => null;\r\n\r\nexport default emptyFunc;\r\n","import { MdSettings as SettingsIcon } from 'react-icons/md';\r\n\r\nexport default SettingsIcon;\r\n","import { MdTimeline as GraphIcon } from 'react-icons/md';\r\n\r\nexport default GraphIcon;\r\n","import { FaCubes as CubesIcon } from 'react-icons/fa';\r\n\r\nexport default CubesIcon;\r\n","import { FaUsersCog as UsersEditIcon } from 'react-icons/fa';\r\n\r\nexport default UsersEditIcon;\r\n","export enum EEducationalVideoRole {\r\n None = \"None\",\r\n Administrator = \"Administrator\",\r\n Moderator = \"Moderator\",\r\n Producer = \"Producer\",\r\n Agent = \"Agent\",\r\n Member = \"Member\",\r\n}\r\n\r\nexport enum EEducationalVideoCategory {\r\n SetupAndWeb = \"SetupAndWeb\",\r\n Excel = \"Excel\",\r\n DataTransformation = \"DataTransformation\",\r\n Api = \"Api\",\r\n Misc = \"Misc\",\r\n}\r\n\r\nexport type ActiveCategory = keyof typeof EEducationalVideoCategory | null;\r\n\r\nexport type EducationalVideo = {\r\n id: string;\r\n fileName: string;\r\n filePath: string;\r\n uploadUri: string;\r\n created: string;\r\n createdBy: string;\r\n roles: Array;\r\n title: string;\r\n ordinal: number;\r\n category: EEducationalVideoCategory;\r\n timesPlayed: number;\r\n description: string;\r\n duration: number;\r\n thumbnailUri: string;\r\n videoDate: string;\r\n};\r\n\r\nexport type EducationalVideoAttachment = {\r\n id: string;\r\n videoId: string;\r\n fileName: string;\r\n filePath: string;\r\n uploadUri: string;\r\n completed: boolean;\r\n created: string;\r\n deleted: boolean;\r\n};\r\n\r\nexport type EducationalVideoThumbnail = {\r\n id: string;\r\n videoId: string;\r\n fileName: string;\r\n filePath: string;\r\n uploadUri: string;\r\n completed: boolean;\r\n created: string;\r\n};\r\n\r\nexport type CreateEducationalVideoPayload = {\r\n title: string | null;\r\n duration: number;\r\n description: string | null;\r\n roles: Array;\r\n videoDate: string;\r\n category: EEducationalVideoCategory;\r\n};\r\n\r\nexport type VideosDisplayMode = \"Grid\" | \"List\";\r\n\r\nexport type VideosViewType = VideosDisplayMode | \"Summary\";\r\n","import styled from \"styled-components\";\r\n\r\nconst C = styled.div`\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n`;\r\n\r\nexport default C;\r\n","import styled from \"styled-components\";\r\nimport color from \"../../../utils/color\";\r\n\r\nconst SelectSection = styled.div`\r\n display: flex;\r\n align-items: baseline;\r\n padding: 8px 0;\r\n margin: 30px 0;\r\n color: ${color.PRIMARY};\r\n\r\n span {\r\n width: 70px;\r\n }\r\n`;\r\n\r\nexport default SelectSection;\r\n","import styled from \"styled-components\";\r\nimport color from \"../../../utils/color\";\r\n\r\nconst Input = styled.input<{ error?: boolean }>`\r\n width: calc(100% - 10px);\r\n font-size: 15px;\r\n border-radius: 1rem;\r\n padding: 5px 10px;\r\n transform: translateY(3px);\r\n border: ${({ error = false }) =>\r\n error ? `1px solid ${color.NEGATIVE}` : `1px solid ${color.PRIMARY}`};\r\n outline: none;\r\n\r\n &:focus {\r\n outline: none;\r\n box-shadow: ${({ error }) =>\r\n error ? null : `0 0 4px 1px ${color.PRIMARY}`};\r\n }\r\n`;\r\n\r\nexport default Input;\r\n","import { PeriodFrequency } from \"../types/PeriodFrequency\";\r\nimport { ExploreData } from \"../utils/enums\";\r\nimport { Product } from \"../types/Product\";\r\nimport { DisplayDateRange } from \"./productPage/reducers\";\r\nimport { UnitConversionFunction } from \"../utils/createUnitConversionFunction\";\r\nimport { match } from \"react-router\";\r\nimport { EEducationalVideoCategory } from \"src/scenes/EducationsAndAnnouncements/utils/educationalVideos.types\";\r\n\r\nexport const getProductIDFromProps =

(\r\n _: any,\r\n props: P & { productID: string }\r\n): string => props.productID;\r\n\r\nexport const getFrequencyFromProps =

(\r\n _: any,\r\n props: P & { frequency: PeriodFrequency }\r\n): PeriodFrequency => props.frequency;\r\n\r\nexport const getDisplayDateRangeFromProps =

(\r\n _: any,\r\n props: P & { fromDate: Date; toDate: Date }\r\n): DisplayDateRange => ({ from: props.fromDate, to: props.toDate });\r\n\r\nexport const getAreaIDFromProps =

(\r\n _: any,\r\n props: P & { areaID: number }\r\n): number => props.areaID;\r\n\r\nexport const getExploreDataViewFromProps =

(\r\n _: any,\r\n props: P & { exploreDataView: ExploreData }\r\n): ExploreData => props.exploreDataView;\r\n\r\nexport const getProductFromProps =

(\r\n _: any,\r\n props: P & { product: Product }\r\n): Product => props.product;\r\n\r\nexport const getUnitIDFromProps =

(\r\n _: any,\r\n props: P & { unitID: number }\r\n): number => props.unitID;\r\n\r\nexport const getSelectedUnitIDFromProps =

(\r\n _: any,\r\n props: P & { selectedUnitID: number }\r\n): number => props.selectedUnitID;\r\n\r\nexport const getUnitConversionFunctionFromProps =

(\r\n _: any,\r\n props: P & { unitConversionFunction: UnitConversionFunction }\r\n): UnitConversionFunction => props.unitConversionFunction;\r\n\r\nexport const getChartIDFromProps =

(\r\n _: any,\r\n props: P & { chartID: number }\r\n): number => props.chartID;\r\n\r\nexport const getActivePageFromProps =

(\r\n _: any,\r\n props: P & { activePage: number }\r\n): number => props.activePage;\r\n\r\nexport const getPerPageFromProps =

(\r\n _: any,\r\n props: P & { perPage: number }\r\n): number => props.perPage;\r\n\r\nexport const getSelectedCalendarFromProps =

(\r\n _: any,\r\n props: P & { selectedCalendar: string }\r\n): string => props.selectedCalendar;\r\n\r\nexport const getSearchFromProps =

(\r\n _: any,\r\n props: P & { search: string }\r\n): string => props.search;\r\n\r\nexport const getOrganizationNameFromProps =

(\r\n _: any,\r\n props: P & { selectedOrganization: string }\r\n): string => props.selectedOrganization;\r\n\r\nexport const getSortFromProps =

(\r\n _: any,\r\n props: P & { sort: string }\r\n): string => props.sort;\r\n\r\nexport const getDirectionFromProps =

(\r\n _: any,\r\n props: P & { direction: string }\r\n): string => props.direction;\r\n\r\nexport const getMenuIDFromProps =

(\r\n _: any,\r\n props: P & { match: match<{ id: string }> }\r\n): string => props.match.params.id;\r\n\r\nexport const getIsTranslatedFromProps =

(\r\n _: any,\r\n props: P & { isTranslated: boolean }\r\n): boolean => props.isTranslated;\r\n\r\nexport const getIsCandlestickFromProps =

(\r\n _: any,\r\n props: P & { isCandlestick: boolean }\r\n): boolean => props.isCandlestick;\r\n\r\nexport const getShowTranslatedNameFromProps =

(\r\n _: any,\r\n props: P & { showTranslatedName: boolean }\r\n): boolean => props.showTranslatedName;\r\n\r\nexport const getVideoCategoryFromProps =

(\r\n _: any,\r\n props: P & { category: keyof typeof EEducationalVideoCategory }\r\n) => props.category;\r\n","import { FaAngleDown as AngleDownIcon } from 'react-icons/fa';\r\n\r\nexport default AngleDownIcon;\r\n","import { FaLongArrowAltDown as LongArrowDown } from 'react-icons/fa';\r\n\r\nexport default LongArrowDown;\r\n","import { FaLongArrowAltUp as LongArrowUp } from 'react-icons/fa';\r\n\r\nexport default LongArrowUp;\r\n","import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport ContentLoaderRectangle from '../shared/ContentLoaders/ContentLoaderRectangle';\r\nimport color from '../../utils/color';\r\nimport numberRange from '../../utils/numberRange';\r\n\r\nconst Root = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n padding: 8px 50px 50px 50px;\r\n`;\r\n\r\nconst Content = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n width: 100%;\r\n justify-content: space-between;\r\n`;\r\n\r\nconst List = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n width: 73%;\r\n`;\r\n\r\nconst Menu = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n width: 22%;\r\n`;\r\n\r\nconst MenuHeader = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: flex-start;\r\n width: 100%;\r\n border-bottom: ${color.NEUTRAL} solid 2px;\r\n`;\r\n\r\nconst Header = styled.div`\r\n margin-bottom: 30px;\r\n border-bottom: ${color.NEUTRAL} solid 2px;\r\n`;\r\n\r\nconst HeaderWrapper = styled.div`\r\n margin-bottom: 4px;\r\n display: flex;\r\n justify-content: space-between;\r\n`;\r\n\r\nconst Footer = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n margin-top: 30px;\r\n`;\r\n\r\nconst OrganizationSelectContainer = styled.div`\r\n width: 100%;\r\n margin-bottom: 40px;\r\n border-bottom: ${color.NEUTRAL} solid 2px;\r\n`;\r\n\r\nconst TableName = styled.div`\r\n width: 100%;\r\n margin-bottom: 20px;\r\n border-bottom: ${color.NEUTRAL} solid 2px;\r\n`;\r\n\r\nconst Row = styled.div`\r\n margin: 5px 0;\r\n`;\r\n\r\nconst HeaderText = styled.div`\r\n margin: 0 0 0 5px;\r\n`;\r\n\r\nconst MenuItem = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: space-between;\r\n padding: 10px 15px 5px 5px;\r\n border-bottom: ${color.NEUTRAL} solid 2px;\r\n`;\r\n\r\nconst AdminPanelSkeleton: React.FC = () => (\r\n \r\n \r\n \r\n \r\n \r\n

\r\n \r\n \r\n \r\n \r\n {numberRange(0, 4).map((key: number) =>\r\n \r\n \r\n \r\n )\r\n }\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n {numberRange(1, 11).map((key: number) => )}\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n);\r\n\r\nexport default AdminPanelSkeleton;\r\n","import * as React from \"react\";\r\nimport styled from \"styled-components\";\r\nimport colorPalette from \"../../../utils/color\";\r\n\r\nconst Root = styled.div<{ size: number }>`\r\n position: relative;\r\n display: inline-block;\r\n width: ${({ size }) => size * 2}px;\r\n height: ${({ size }) => size}px;\r\n`;\r\n\r\nconst Switch = styled.div<{\r\n active: boolean;\r\n size: number;\r\n color: string;\r\n passiveColor: string;\r\n}>`\r\n position: absolute;\r\n cursor: pointer;\r\n border-radius: 34px;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: ${({ active, color, passiveColor }) =>\r\n active ? color : passiveColor};\r\n box-shadow: 0 0 1px\r\n ${({ active, color, passiveColor }) => (active ? color : passiveColor)};\r\n transition: 0.4s;\r\n\r\n &:before {\r\n position: absolute;\r\n border-radius: 50%;\r\n content: \"\";\r\n width: ${({ size }) => size - Math.floor(size / 10) || 1}px;\r\n height: ${({ size }) => size - Math.floor(size / 10) || 1}px;\r\n left: ${({ size }) => Math.floor((Math.floor(size / 10) || 1) / 2)}px;\r\n bottom: ${({ size }) => Math.floor((Math.floor(size / 10) || 1) / 2)}px;\r\n background-color: white;\r\n transition: 0.4s;\r\n transform: translateX(\r\n ${({ active, size }) =>\r\n active ? size - (Math.floor(size / 10) || 1) : 0}px\r\n );\r\n }\r\n`;\r\n\r\ntype Props = {\r\n onClick?: (event?: React.MouseEvent) => void;\r\n active?: boolean;\r\n size?: number;\r\n color?: string;\r\n passiveColor?: string;\r\n};\r\n\r\n// TODO: Fix active dot position\r\nconst SwitchButton: React.FC = ({\r\n active = false,\r\n size = 22,\r\n color = colorPalette.PRIMARY,\r\n passiveColor = colorPalette.NEUTRAL,\r\n onClick,\r\n}) => (\r\n \r\n \r\n \r\n);\r\n\r\nexport default SwitchButton;\r\n","import { FaMinus as MinusIcon } from 'react-icons/fa'\r\n\r\nexport default MinusIcon;\r\n","module.exports = __webpack_public_path__ + \"static/media/calendar-regular.3b052ba8.svg\";","module.exports = __webpack_public_path__ + \"static/media/sub-hero.e5a18b95.svg\";","module.exports = __webpack_public_path__ + \"static/media/search.f123d7ab.svg\";","module.exports = __webpack_public_path__ + \"static/media/no-section-selected.b1e98a22.png\";","module.exports = __webpack_public_path__ + \"static/media/dairy-section.2a49c625.png\";","module.exports = __webpack_public_path__ + \"static/media/grain-feed-section.7ffa9d64.png\";","module.exports = __webpack_public_path__ + \"static/media/livestock-section.31045d73.png\";","export enum ExploreData {\r\n TIME_ENDING = 'TIME_ENDING',\r\n TIME_CHANGE = 'TIME_CHANGE',\r\n YEAR_ON_YEAR = 'YEAR_ON_YEAR',\r\n TIME_ON_TIME = 'TIME_ON_TIME',\r\n}\r\n\r\nexport enum SortOrder {\r\n DESCENDING = 'DESCENDING',\r\n ASCENDING = 'ASCENDING',\r\n}\r\n\r\nexport enum monthsByName {\r\n JANUARY = 0,\r\n FEBRUARY = 1,\r\n MARCH = 2,\r\n APRIL = 3,\r\n MAY = 4,\r\n JUNE = 5,\r\n JULY = 6,\r\n AUGUST = 7,\r\n SEPTEMBER = 8,\r\n OCTOBER = 9,\r\n NOVEMBER = 10,\r\n DECEMBER = 11,\r\n}\r\n\r\nexport enum DateStatus {\r\n OUTSIDE = 'DayPicker-Day--outside',\r\n START = 'DayPicker-Day--selected DayPicker-Day--start',\r\n END = 'DayPicker-Day--selected DayPicker-Day--end',\r\n INSIDE = 'DayPicker-Day--selected',\r\n DISABLED = 'DayPicker-Day--disabled',\r\n}\r\n","import axios from \"axios\";\r\nimport { Organization } from \"../types/Organization\";\r\nimport { UserData } from \"../ducks/admin/users/sagas\";\r\n\r\nconst api = axios.create({\r\n baseURL: `${process.env.REACT_APP_ADMIN_API_URL}/organization/`,\r\n timeout: 20000,\r\n});\r\n\r\nconst newAdminApi = axios.create({\r\n baseURL: `${process.env.REACT_APP_ADMIN_API_URL}/admin/`,\r\n timeout: 20000,\r\n});\r\n\r\nconst organizationAPI = {\r\n fetchOrganizations: () => api.get(\"?isOrganizationAdmin=true\"),\r\n\r\n deleteOrganization: (name: string) => api.delete(name),\r\n\r\n createOrganization: (organization: Organization) =>\r\n api.post(\"\", organization),\r\n\r\n updateOrganization: (organization: Organization, organizationName: string) =>\r\n api.put(organizationName, organization),\r\n\r\n fetchOrganizationReports: (organizationName: string) =>\r\n api.get(`${organizationName}/reports`),\r\n\r\n addOrganizationReport: (organizationName: string, reportName: string) =>\r\n api.post(`${organizationName}/reports/${encodeURIComponent(reportName)}`),\r\n\r\n removeOrganizationReport: (organizationName: string, reportName: string) =>\r\n api.delete(`${organizationName}/reports/${encodeURIComponent(reportName)}`),\r\n\r\n requestReportAccess: (organizationName: string, reportName: string) =>\r\n newAdminApi.post(\r\n `/organization/${organizationName}/reports/${reportName}/request`\r\n ),\r\n\r\n fetchOrganizationUsers: (organizationName: string) =>\r\n api.get(`${organizationName}/users`),\r\n\r\n addOrganizationUser: (organizationName: string, userName: string) =>\r\n api.post(`${organizationName}/users/${userName}`),\r\n\r\n deleteOrganizationUser: (organizationName: string, userName: string) =>\r\n api.delete(`${organizationName}/users/${userName}`),\r\n\r\n addUserRole: (organizationName: string, userName: string, role: string) =>\r\n api.post(`${organizationName}/users/${userName}/roles/${role}`),\r\n\r\n removeUserRole: (organizationName: string, userName: string, role: string) =>\r\n api.delete(`${organizationName}/users/${userName}/roles/${role}`),\r\n\r\n fetchOrganizationViews: (organizationName: string) =>\r\n api.get(`/${organizationName}/views`),\r\n\r\n addOrganizationView: (organizationName: string, viewName: string) =>\r\n api.post(`/${organizationName}/views/${viewName}`),\r\n\r\n removeOrganizationView: (organizationName: string, viewName: string) =>\r\n api.delete(`/${organizationName}/views/${viewName}`),\r\n\r\n requestViewAccess: (organizationName: string, viewName: string) =>\r\n newAdminApi.post(\r\n `/organization/${organizationName}/views/${viewName}/request`\r\n ),\r\n\r\n addAllViews: (organizationName: string) => {\r\n api.post(`/${organizationName}/views/all`);\r\n },\r\n\r\n fetchUsers: () => api.get(\"user\"),\r\n\r\n deleteUser: (id: string) => api.delete(`user?userId=${id}`),\r\n\r\n createUser: (data: UserData) => newAdminApi.post(\"user\", data),\r\n\r\n updateUser: (userId: string, data: UserData) =>\r\n api.put(`user?userId=${userId}`, data),\r\n\r\n getCalendarReports: (organization: string, calendarName: string) =>\r\n api.get(`${organization}/calendars/${calendarName}/reports`),\r\n\r\n addCalendarReport: (\r\n organization: string,\r\n calendarName: string,\r\n report: string\r\n ) => api.post(`${organization}/calendars/${calendarName}/reports/${report}`),\r\n\r\n deleteCalendarReport: (\r\n organization: string,\r\n calendarName: string,\r\n report: string\r\n ) =>\r\n api.delete(`${organization}/calendars/${calendarName}/reports/${report}`),\r\n\r\n fetchCalendars: (org: string) => api.get(`${org}/calendars`),\r\n\r\n createCalendar: (organizationName: string, name: string) =>\r\n api.post(`${organizationName}/calendars`, { organizationName, name }),\r\n\r\n deleteCalendar: (organizationName: string, name: string) =>\r\n api.delete(`${organizationName}/calendars/${name}`),\r\n\r\n updateCalendar: (organizationName: string, oldName: string, name: string) =>\r\n api.put(`${organizationName}/calendars/${oldName}`, {\r\n organizationName,\r\n name,\r\n }),\r\n\r\n fetchVerificationUrl: (userId: string) =>\r\n api.get(`/user/${encodeURIComponent(userId)}/verification/url`),\r\n\r\n resendInvitation: (userId: string) =>\r\n newAdminApi.get(`/account/${userId}/verification/resend`),\r\n};\r\n\r\nexport default organizationAPI;\r\n","import { ActionType, createStandardAction } from 'typesafe-actions';\r\nimport { PeriodFrequency } from '../../types/PeriodFrequency';\r\nimport { FrequencyRecord } from '../../types/FrequencyRecord';\r\nimport { FuturesRaw, FuturesRecords } from '../../types/FuturesRecord';\r\nimport { RevisionRecord } from '../../types/RevisionRecord';\r\n\r\ninterface RecordsFrequencyMeta {\r\n frequency: PeriodFrequency,\r\n productID: string,\r\n}\r\n\r\nexport interface InitializeFrequencyMeta {\r\n frequency: PeriodFrequency,\r\n areaID: number,\r\n hasUsaMap?: boolean,\r\n}\r\n\r\nexport const recordsActions = {\r\n frequency: {\r\n initializeFrequency: createStandardAction('@records_frequency/INITIALIZE_FREQUENCY')(),\r\n initializeUnitsForFrequency: createStandardAction('@records_frequency/INITIALIZE_UNITS_FOR_FREQUENCY')(),\r\n fetchFrequency: createStandardAction('@records_frequency/FETCH_FREQUENCY')(),\r\n addFrequency: createStandardAction('@records_frequency/ADD_FREQUENCY_TO_RECORDS')(),\r\n },\r\n futures: {\r\n initializeFutures: createStandardAction('@records_futures/INITIALIZE')(),\r\n fetchFuturesByReportPeriod: createStandardAction('@records_futures/FETCH_FUTURES_BY_REPORT_PERIOD')(),\r\n fetchFuturesByContractMonth: createStandardAction('@records_futures/FETCH_FUTURES_BY_CONTRACT_MONTH')(),\r\n fetchFuturesByNearbyIndex: createStandardAction('@records_futures/FETCH_FUTURES_BY_NEARBY_INDEX')(),\r\n setFutures: createStandardAction('@records_futures/SET_FUTURES')(),\r\n },\r\n revision: {\r\n addRevision: createStandardAction('@records_revision/ADD_REVISION_TO_RECORDS')(),\r\n },\r\n};\r\n\r\nexport type RecordsActions = ActionType;\r\n","import { ActionType, createStandardAction } from 'typesafe-actions';\r\nimport { PeriodFrequency } from '../../types/PeriodFrequency';\r\nimport { ComparisonPeriod, ContractMonthRange, DisplayDateRange } from './reducers';\r\nimport { ContextTablesConfigIDs } from '../contextTable/contextTables.config';\r\n\r\ninterface SetProductPayload {\r\n productID: number,\r\n areaID: number,\r\n chartID: number,\r\n}\r\n\r\ninterface SetProductMeta {\r\n frequency: PeriodFrequency,\r\n unitID: number,\r\n lastReportPeriod?: Date,\r\n scale: number,\r\n}\r\n\r\nexport const productPageActions = {\r\n reinitializeState: createStandardAction('@productPage/REINITIALIZE_STATE')(),\r\n setProduct: createStandardAction('@productPage/SET_PRODUCT')(),\r\n setContextTable: createStandardAction('@productPage/SET_CONTEXT_TABLE')(),\r\n setExploreDataTo: {\r\n timeEnding: createStandardAction('@productPage_exploreDataView/TIME_ENDING')(),\r\n timeChange: createStandardAction('@productPage_exploreDataView/TIME_CHANGE')(),\r\n yearOnYear: createStandardAction('@productPage_exploreDataView/YEAR_ON_YEAR')(),\r\n timeOnTime: createStandardAction('@productPage_exploreDataView/TIME_ON_TIME')(),\r\n },\r\n setSelectedChart: createStandardAction('@productPage_chartID/SET')(),\r\n setDisplayDateRange: createStandardAction('@productPage_displayDateRange/SET')(),\r\n changeUnitID: createStandardAction('@productPage_unitID/CHANGE_UNIT_ID')(),\r\n pageStatus: {\r\n loading: createStandardAction('@productPage_pageStatus/LOADING')(),\r\n loaded: createStandardAction('@productPage_pageStatus/LOADED')(),\r\n },\r\n changeComparisonPeriod: createStandardAction('@productPage/CHANGE_COMPARISON_PERIOD')(),\r\n changeContractMonth: createStandardAction('@productPage/CHANGE_CONTRACT_MONTH')(),\r\n changeScale: createStandardAction('@productPage/CHANGE_SCALE')(),\r\n setSorting: createStandardAction('@productPage/SET_SORTING')(),\r\n toggleTranslation: createStandardAction('@productPage/TOGGLE_TRANSLATION')(),\r\n setFuturesTradingDate: createStandardAction('@productPage/SET_TRADING_DATE')(),\r\n setFuturesDisplayType: createStandardAction('@productPage/SET_FUTURES_DISPLAY_TYPE')<'ContractMonth' | 'TradeDate' | 'NearbyIndex'>(),\r\n setFuturesContractMonth: createStandardAction('@productPage/SET_FUTURES_CONTRACT_MONTH')(),\r\n setFuturesNearbyIndex: createStandardAction('@productPage/SET_FUTURES_NEARBY_INDEX')(),\r\n};\r\n\r\nexport type ProductPageActions = ActionType;\r\n","import produce from \"immer\";\r\nimport { getType } from \"typesafe-actions\";\r\nimport { authActions, AuthActions } from \"./actions\";\r\n\r\nexport const UDM_AUTH_STATE_LS_ID = \"udm-auth-state\";\r\n\r\ntype AuthenticationState = {\r\n authState: AuthState;\r\n expiresAt: number | null;\r\n};\r\n\r\nexport enum AuthState {\r\n initialization = \"initialization\",\r\n guest = \"guest\",\r\n member = \"member\",\r\n moderator = \"moderator\",\r\n administrator = \"administrator\",\r\n expired = \"expired\",\r\n}\r\n\r\nconst initialState: AuthenticationState = {\r\n authState: sessionStorage.getItem(UDM_AUTH_STATE_LS_ID)\r\n ? (String(sessionStorage.getItem(UDM_AUTH_STATE_LS_ID)) as AuthState)\r\n : AuthState.initialization,\r\n expiresAt: null,\r\n};\r\n\r\nexport const authenticationPageReducer = produce<\r\n AuthenticationState,\r\n AuthActions\r\n>((state, action) => {\r\n switch (action.type) {\r\n case getType(authActions.set.authState):\r\n state.authState = action.payload;\r\n sessionStorage.setItem(UDM_AUTH_STATE_LS_ID, action.payload);\r\n return;\r\n case getType(authActions.set.expiresAt):\r\n state.expiresAt = action.payload;\r\n return;\r\n }\r\n}, initialState);\r\n","const containsString = (sentence: string, word: string): boolean =>\r\n new RegExp(word.trim().replace(/(\\W)/g, '\\\\$1'), 'gi').test(sentence);\r\n\r\nexport default containsString;\r\n","import { ActionType, createStandardAction } from 'typesafe-actions';\r\nimport { AuthState } from './reducers';\r\n\r\nexport const authActions = {\r\n signIn: createStandardAction('@auth/SIGN_IN_REQUEST')(),\r\n signOut: createStandardAction('@auth/SIGN_OUT_REQUEST')(),\r\n token: {\r\n expired: createStandardAction('@auth_token/EXPIRED')(),\r\n expiring: createStandardAction('@auth_token/EXPIRING')(),\r\n update: createStandardAction('@auth_token/UPDATED')(),\r\n },\r\n get: {\r\n authState: createStandardAction('@auth_get/AUTHENTICATION_STATE')(),\r\n },\r\n set: {\r\n authState: createStandardAction('@auth_set/AUTHENTICATION_STATE')(),\r\n expiresAt: createStandardAction('@auth_set/EXPIRES_AT')(),\r\n },\r\n};\r\n\r\nexport type AuthActions = ActionType;\r\n","import * as React from 'react';\r\nimport styled from 'styled-components';\r\n\r\ninterface Props {\r\n height: number | string,\r\n width: number | string,\r\n}\r\n\r\nconst Loader = styled.svg<{ width: number | string, height: number | string }>`\r\n width: ${({width}) => width ? width : '100px'};\r\n height: ${({height}) => height ? height : '30px'};\r\n border-radius: 5px;\r\n background-image: linear-gradient(90deg, #f3f3f3, #f3f3f3, #f3f3f3, #f3f3f3, #ecebeb, #f3f3f3, #f3f3f3, #f3f3f3, #f3f3f3);\r\n background-size: 300% 100%;\r\n animation: progress 1s ease-out infinite;\r\n\r\n @keyframes progress {\r\n 100%{background-position:0 20%}\r\n 75%{background-position:20% 40%}\r\n 50%{background-position:40% 60%}\r\n 25%{background-position:60% 80%}\r\n 0%{background-position: 80% 100%}\r\n }\r\n`;\r\n\r\nconst ContentLoaderRectangle: React.FC = ({ height, width }) =>\r\n ;\r\n\r\nexport default ContentLoaderRectangle;\r\n","// get array and return only unique values\r\nconst createUniqueArray = (array: T[]): T[] => {\r\n const set = new Set(array);\r\n const newArray: T[] = [];\r\n set.forEach((element) => { newArray.push(element); });\r\n return newArray;\r\n};\r\n\r\nexport default createUniqueArray;\r\n","import {\r\n Announcement,\r\n AnnouncementPayload,\r\n} from \"src/scenes/EducationsAndAnnouncements/utils/announcements.types\";\r\nimport {\r\n EducationalVideo,\r\n EEducationalVideoCategory,\r\n} from \"src/scenes/EducationsAndAnnouncements/utils/educationalVideos.types\";\r\nimport { ActionType, createStandardAction } from \"typesafe-actions\";\r\n\r\nexport const educationsAndAnnouncementsActions = {\r\n announcements: {\r\n fetch: createStandardAction(\"@announcements/FETCH\")(),\r\n populate: createStandardAction(\"@announcements/POPULATE\")<\r\n Array\r\n >(),\r\n create: createStandardAction(\"@announcements/CREATE\")<\r\n Partial,\r\n () => void\r\n >(),\r\n add: createStandardAction(\"@announcements/ADD\")(),\r\n delete: createStandardAction(\"@announcements/DELETE\")(),\r\n remove: createStandardAction(\"@announcements/REMOVE\")(),\r\n edit: createStandardAction(\"@announcements/EDIT\")<\r\n { id: number; payload: Partial },\r\n () => void\r\n >(),\r\n update: createStandardAction(\"@announcements/UPDATE\")<{\r\n id: number;\r\n payload: Partial;\r\n }>(),\r\n },\r\n educationalVideos: {\r\n fetch: createStandardAction(\"@educational_videos/FETCH\")(),\r\n populate: createStandardAction(\"@educational_videos/POPULATE\")<\r\n Array\r\n >(),\r\n createVideo: createStandardAction(\"@educational_videos/CREATE\")<\r\n {\r\n title: string;\r\n category: EEducationalVideoCategory;\r\n file: File;\r\n thumbnail: File;\r\n description: string;\r\n duration: number;\r\n },\r\n () => void\r\n >(),\r\n deleteVideo: createStandardAction(\"@educational_videos/DELETE\")<\r\n EducationalVideo\r\n >(),\r\n removeVideo: createStandardAction(\"@educational_videos/REMOVE\")<\r\n EducationalVideo\r\n >(),\r\n editVideo: createStandardAction(\"@educational_videos/EDIT\")<\r\n {\r\n video: EducationalVideo;\r\n thumbnail: File | null;\r\n },\r\n () => void\r\n >(),\r\n updateVideo: createStandardAction(\"@educational_videos/UPDATE\")<\r\n EducationalVideo\r\n >(),\r\n },\r\n};\r\n\r\nexport type EducationsAndAnnouncementsActions = ActionType<\r\n typeof educationsAndAnnouncementsActions\r\n>;\r\n","import * as React from \"react\";\r\nimport styled from \"styled-components\";\r\nimport color from \"../../utils/color\";\r\nimport ContentLoaderRectangle from \"../shared/ContentLoaders/ContentLoaderRectangle\";\r\nimport SummaryIcon from \"../../icons/SummaryIcon\";\r\nimport Module from \"../Product/Module/Module\";\r\nimport EventNoteIcon from \"../../icons/EventNoteIcon\";\r\nimport SettingsIcon from \"../../icons/SettingsIcon\";\r\nimport GraphIcon from \"../../icons/GraphIcon\";\r\nimport numberRange from \"../../utils/numberRange\";\r\nimport CubesIcon from \"src/icons/CubesIcon\";\r\n\r\nconst Root = styled.div`\r\n padding-top: 14px;\r\n`;\r\n\r\nconst ProductHeader = styled.div`\r\n margin-bottom: 30px;\r\n border-bottom: ${color.NEUTRAL} solid 2px;\r\n`;\r\n\r\nconst Header = styled.div`\r\n margin-bottom: 10px;\r\n`;\r\n\r\nconst IconContainer = styled(CubesIcon)`\r\n color: ${color.ICONS_PRIMARY};\r\n font-size: 25px;\r\n`;\r\n\r\nconst Content = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n flex-direction: column;\r\n width: 100%;\r\n margin-bottom: 10px;\r\n`;\r\n\r\nconst Row = styled.div`\r\n margin-bottom: 5px;\r\n display: flex;\r\n justify-content: space-between;\r\n flex-direction: row;\r\n`;\r\n\r\nconst SettingsRowWrapper = styled.div`\r\n display: flex;\r\n justify-content: space-evenly;\r\n flex-direction: row;\r\n width: 80%;\r\n margin-top: 20px;\r\n margin-bottom: 37px;\r\n`;\r\n\r\nconst SummaryCalendarContainer = styled.div`\r\n margin-bottom: 30px;\r\n display: flex;\r\n justify-content: space-between;\r\n flex-direction: row;\r\n height: 194px;\r\n`;\r\n\r\nconst ChartContainer = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n flex-direction: row;\r\n padding: 15px 0 0 80px;\r\n`;\r\n\r\nconst ChartPicker = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n padding: 40px 10px 0 0;\r\n`;\r\n\r\nconst ChartContents = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n flex-direction: column;\r\n width: 70%;\r\n`;\r\n\r\nconst MiniChart = styled.div`\r\n padding: 7px;\r\n`;\r\n\r\nconst ChartSelectWrapper = styled.div`\r\n display: flex;\r\n width: 100%;\r\n flex-direction: row;\r\n`;\r\n\r\nconst ChartSelectItem = styled.div`\r\n margin: 15px 15px 10px 20px;\r\n width: 30%;\r\n`;\r\n\r\nconst ProductPageSkeleton = () => (\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n } title=\"Charts\" gridArea=\"chartFullView\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {numberRange(0, 3).map((chartID: number) => (\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n } title=\"Summary\" gridArea=\"summary\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {numberRange(0, 3).map((key: number) => (\r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n } title=\"Calendar\" gridArea=\"calendar\">\r\n \r\n {numberRange(0, 5).map((key: number) => (\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n }\r\n title=\"Settings\"\r\n gridArea=\"settings\"\r\n disableLastLine\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 ProductPageSkeleton;\r\n","import * as React from \"react\";\r\nimport * as Loadable from \"react-loadable\";\r\nimport { RouteComponentProps } from \"react-router\";\r\nimport { connect } from \"react-redux\";\r\nimport { productActions } from \"../../ducks/products/actions\";\r\nimport { RootState } from \"../../ducks/store\";\r\nimport { getProductPageFrequency } from \"../../ducks/productPage/selectors\";\r\nimport ProductPageSkeleton from \"../../components/Skeletons/ProductPageSkeleton\";\r\n\r\nconst Frequency = Loadable({\r\n loader: () =>\r\n import(\r\n /* webpackChunkName: \"frequency-products\" */ \"./FrequencyProductScene\"\r\n ),\r\n loading: () => ,\r\n delay: 200,\r\n timeout: 10000,\r\n});\r\n\r\nconst Futures = Loadable({\r\n loader: () =>\r\n import(/* webpackChunkName: \"futures-products\" */ \"./FuturesProductScene\"),\r\n loading: () => ,\r\n delay: 200,\r\n timeout: 10000,\r\n});\r\n\r\ntype Props = ReturnType & typeof mapDispatchToProps;\r\n\r\nclass ProductScene extends React.Component<\r\n Props & RouteComponentProps<{ id: string }, {}, { area?: number }>,\r\n {}\r\n> {\r\n public componentDidMount() {\r\n const { state } = this.props.location;\r\n const { id } = this.props.match.params;\r\n this.props.initializeProductScene(\r\n id,\r\n state && state.area ? { area: state.area } : {}\r\n );\r\n }\r\n\r\n public componentDidUpdate(\r\n prevProps: RouteComponentProps<{ id: string }, {}, { area?: number }>\r\n ) {\r\n const { state } = this.props.location;\r\n if (this.props.match.params.id !== prevProps.match.params.id) {\r\n const { id } = this.props.match.params;\r\n this.props.initializeProductScene(\r\n id,\r\n state && state.area ? { area: state.area } : {}\r\n );\r\n if (document.documentElement && state) {\r\n document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera\r\n document.body.scrollTop = 0; // For Safari\r\n }\r\n } else if (\r\n state &&\r\n prevProps.location.state &&\r\n state.area !== prevProps.location.state.area\r\n ) {\r\n const { id } = this.props.match.params;\r\n this.props.changeArea(\r\n id,\r\n state && state.area ? { area: state.area } : {}\r\n );\r\n document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera\r\n document.body.scrollTop = 0; // For Safari\r\n }\r\n }\r\n\r\n public render() {\r\n switch (this.props.productSceneType as any) {\r\n case \"Daily\":\r\n case \"Weekly\":\r\n case \"Monthly\":\r\n case \"Quarterly\":\r\n case \"Annual\":\r\n return ;\r\n case \"Futures\":\r\n return ;\r\n default:\r\n return ;\r\n }\r\n }\r\n}\r\n\r\nconst mapStateToProps = (state: RootState) => ({\r\n productSceneType: getProductPageFrequency(state),\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n initializeProductScene: productActions.initialize,\r\n changeArea: productActions.changeProductArea,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(ProductScene);\r\n","import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport color from '../../../utils/color';\r\nimport { ChangeEvent } from 'react';\r\n\r\ninterface InputProps {\r\n error: boolean,\r\n}\r\n\r\nconst Input = styled.input`\r\n width: calc(100% - 20px);\r\n background-color: ${color.BACKGROUND_SECONDARY};\r\n color: ${color.NEUTRAL_DARK};\r\n border-radius: 4px;\r\n padding: 5px 10px;\r\n border: ${({error}: InputProps) => error ? `${color.NEGATIVE} solid 1px` : 'none'};\r\n`;\r\n\r\ninterface Props {\r\n type: 'number' | 'text' | 'password' | 'email',\r\n value: string | number,\r\n placeholder: string,\r\n error?: boolean,\r\n name: string,\r\n onChange: (event: ChangeEvent) => void;\r\n}\r\n\r\nconst InputField: React.FC = ({ type, name, value, placeholder, error = false, onChange }) => (\r\n \r\n);\r\n\r\nexport default InputField;\r\n","import * as React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport InputField from '../../components/shared/InputField/InputField';\r\nimport { ChangeEvent } from 'react';\r\nimport styled from 'styled-components';\r\nimport color from '../../utils/color';\r\n\r\nconst ErrorMessage = styled.p`\r\n color: ${color.NEGATIVE};\r\n`;\r\n\r\ninterface State {\r\n username: string,\r\n password: string,\r\n}\r\n\r\n// TODO: implement submit button and checkbox for 'Keep me logged in' and everything else\r\nclass LoginContainer extends React.Component<{}, State> {\r\n public state = {\r\n username: '',\r\n password: '',\r\n };\r\n\r\n public render() {\r\n const { username, password } = this.state;\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n\r\n private onChangeHandler = (event: ChangeEvent) => {\r\n const newState = {[event.target.name]: event.target.value};\r\n this.setState(newState as any)\r\n };\r\n}\r\n\r\nexport default connect(null)(LoginContainer);\r\n","import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport color from '../../utils/color';\r\nimport LoginContainer from '../../containers/LoginContainer/LoginContainer';\r\n\r\nconst Container = styled.div`\r\n width: 300px;\r\n margin: auto;\r\n`;\r\n\r\nconst LoginFieldName = styled.p`\r\n margin: 0;\r\n color: ${color.NEUTRAL_DARK};\r\n font-size: 14px;\r\n font-weight: normal;\r\n`;\r\n\r\nconst LoginFieldContainer = styled.div`\r\n border-bottom: ${color.NEUTRAL} solid 2px;\r\n border-top: ${color.NEUTRAL} solid 2px;\r\n padding: 30px 0 15px 0;\r\n`;\r\n\r\nconst RegisterField = styled.p`\r\n margin: 10px 0 0 0;\r\n color: ${color.NEUTRAL_DARK};\r\n font-size: 10px;\r\n`;\r\n\r\n// TODO: finish login scene\r\nconst LoginPageScene = () => (\r\n \r\n Log in to Your Account\r\n \r\n \r\n \r\n \r\n Not a member? Request Access\r\n \r\n \r\n);\r\n\r\nexport default LoginPageScene;\r\n","import { RootState } from '../store';\r\nimport { createSelector } from 'reselect';\r\nimport { getMenuIDFromProps } from '../fromPropsSelector';\r\n\r\nexport const getNavMenuItems = (state: RootState) => state.menu.navMenu;\r\n\r\nexport const getSelectedMenu = (state: RootState) => state.menu.selectedMenu;\r\n\r\nexport const getAllMenus = (state: RootState) => state.menu.menuById;\r\n\r\nexport const getSelectedNavMenuContent = createSelector(\r\n getNavMenuItems,\r\n getMenuIDFromProps,\r\n (navMenuItems, selectedNavMenuID) => {\r\n if (!getNavMenuItems) {\r\n return [];\r\n }\r\n const selectedNavMenuItem = navMenuItems.find((navMenuItem) => navMenuItem.id === Number(selectedNavMenuID));\r\n if (!selectedNavMenuItem) {\r\n return [];\r\n }\r\n\r\n return selectedNavMenuItem.children;\r\n },\r\n);\r\n\r\nexport const getSelectedSubmenu = createSelector(\r\n getNavMenuItems,\r\n getMenuIDFromProps,\r\n getSelectedMenu,\r\n (navMenuItems, selectedMenuID, selectedSubmenu) => {\r\n if (selectedSubmenu) {\r\n return selectedSubmenu;\r\n }\r\n const selectedNavMenuItem = navMenuItems.findIndex((navMenuItem) => navMenuItem.id === Number(selectedMenuID));\r\n\r\n return navMenuItems[selectedNavMenuItem];\r\n },\r\n);\r\n\r\nexport const getMenuReports = createSelector(\r\n getAllMenus,\r\n getSelectedSubmenu,\r\n (allMenus, selectedMenu) => {\r\n if (!allMenus || !selectedMenu) {\r\n return null;\r\n }\r\n\r\n if (!allMenus[selectedMenu.id]) {\r\n return null;\r\n }\r\n return allMenus[selectedMenu.id];\r\n },\r\n);\r\n","import { FaUserAlt as UserIcon } from 'react-icons/fa';\r\n\r\nexport default UserIcon;\r\n","import { FaPowerOff as LogoutIcon } from 'react-icons/fa';\r\n\r\nexport default LogoutIcon;\r\n","import * as React from \"react\";\r\nimport styled from \"styled-components\";\r\nimport UserIcon from \"src/icons/UserIcon\";\r\nimport color from \"../../../utils/color\";\r\nimport { authActions } from \"../../../ducks/authentication/actions\";\r\nimport { RouteComponentProps, withRouter } from \"react-router\";\r\nimport UsersEditIcon from \"src/icons/UsersEditIcon\";\r\nimport LogoutIcon from \"src/icons/LogoutIcon\";\r\nimport {\r\n AuthState,\r\n UDM_AUTH_STATE_LS_ID,\r\n} from \"../../../ducks/authentication/reducers\";\r\n\r\nconst HeaderWrapper = styled.div`\r\n display: flex;\r\n position: relative;\r\n`;\r\n\r\nconst DropDownWrapper = styled.div`\r\n width: 160px;\r\n position: absolute;\r\n right: -20px;\r\n top: 20px;\r\n background-color: ${color.BACKGROUND};\r\n box-shadow: 0 2px 3px 1px ${color.NEUTRAL};\r\n`;\r\n\r\nconst DropDownItem = styled.div<{ textColor?: string }>`\r\n height: 40px;\r\n width: calc(100% - 10px);\r\n font-size: 14px;\r\n color: ${({ textColor }) => (textColor ? textColor : color.TEXT_PRIMARY)};\r\n line-height: 40px;\r\n padding-left: 10px;\r\n font-weight: 600;\r\n cursor: pointer;\r\n\r\n &:hover {\r\n background-color: ${color.BACKGROUND_SECONDARY};\r\n }\r\n`;\r\n\r\nconst UserIconWrapper = styled(UserIcon)`\r\n color: ${color.ICONS_HEADER}\r\n cursor: pointer;\r\n`;\r\n\r\nconst LogoutIconWrapper = styled(LogoutIcon)`\r\n transform: translateY(3px);\r\n padding-right: 10px;\r\n font-size: 14px;\r\n`;\r\n\r\nconst AdminPanelIcon = styled(UsersEditIcon)`\r\n transform: translateY(2px);\r\n padding-right: 10px;\r\n font-size: 16px;\r\n`;\r\n\r\ntype Props = {\r\n signOut: typeof authActions.signOut;\r\n auth: AuthState;\r\n};\r\n\r\ntype State = { isOpened: boolean };\r\n\r\nclass NavMenuHeader extends React.Component<\r\n Props & RouteComponentProps,\r\n State\r\n> {\r\n public state = { isOpened: false };\r\n\r\n public render() {\r\n const { isOpened } = this.state;\r\n\r\n return (\r\n \r\n \r\n {isOpened && (\r\n \r\n {this.props.auth === AuthState.administrator ||\r\n this.props.auth === AuthState.moderator ? (\r\n \r\n \r\n Admin Panel\r\n \r\n ) : null}\r\n \r\n \r\n Logout\r\n \r\n \r\n )}\r\n \r\n );\r\n }\r\n\r\n private onMouseLeaveHandler = () => {\r\n this.setState({ isOpened: false });\r\n };\r\n\r\n private adminPanelClickHandler = () => {\r\n this.props.history.push(\"/admin\");\r\n this.setState({ isOpened: false });\r\n };\r\n\r\n private logoutClickHandler = () => {\r\n this.props.signOut();\r\n sessionStorage.removeItem(UDM_AUTH_STATE_LS_ID);\r\n this.setState({ isOpened: false });\r\n };\r\n\r\n private iconClickHandler = () => {\r\n this.setState({ isOpened: !this.state.isOpened });\r\n };\r\n}\r\n\r\nexport default withRouter(NavMenuHeader);\r\n","import * as React from \"react\";\r\nimport styled from \"styled-components\";\r\nimport color from \"src/utils/color\";\r\nimport { connect } from \"react-redux\";\r\nimport { menuActions } from \"../../../ducks/menu/actions\";\r\nimport { RootState } from \"../../../ducks/store\";\r\nimport { getNavMenuItems } from \"../../../ducks/menu/selectors\";\r\nimport { RouteComponentProps, withRouter } from \"react-router\";\r\nimport { NavMenuDto } from \"../../../types/dto/NavMenuDto\";\r\nimport { getAuthState } from \"src/ducks/authentication/selectors\";\r\n\r\nconst ButtonContainer = styled.div`\r\n display: flex;\r\n gap: 2.5rem;\r\n`;\r\n\r\nconst ModuleButton = styled.div<{ isSelected: boolean }>`\r\n font-size: 0.9rem;\r\n text-align: center;\r\n cursor: pointer;\r\n border-bottom: ${({ isSelected }) =>\r\n isSelected && `${color.PRIMARY} solid 2px`};\r\n box-shadow: ${({ isSelected }) =>\r\n isSelected && `0 5px 5px -4px ${color.PRIMARY}`};\r\n margin-bottom: ${({ isSelected }) => isSelected && \"-2px\"};\r\n\r\n &:hover {\r\n border-bottom: ${color.PRIMARY} solid 2px;\r\n box-shadow: 0 5px 5px -4px ${color.PRIMARY};\r\n margin-bottom: -2px;\r\n }\r\n`;\r\n\r\ntype State = { selectedMenuItem: number };\r\n\r\ntype Props = RouteComponentProps &\r\n ReturnType &\r\n typeof mapDispatchToProps;\r\n\r\nclass NavBarContent extends React.Component {\r\n public state = { selectedMenuItem: -1 };\r\n\r\n public componentDidMount() {\r\n this.props.getNavMenuItems();\r\n const separatedURL = this.props.location.pathname.split(\"/\");\r\n if (\r\n this.props.location.pathname === \"/menu\" ||\r\n this.props.location.pathname === \"/menu/\"\r\n ) {\r\n this.setState({ selectedMenuItem: 1 });\r\n this.props.history.push(\"/menu/1\");\r\n } else if (this.props.location.pathname === \"/catalog\") {\r\n this.setState({ selectedMenuItem: this.props.navMenuItems.length });\r\n } else if (this.props.location.pathname === \"/view-mail-notifications\") {\r\n this.setState({ selectedMenuItem: this.props.navMenuItems.length + 1 });\r\n } else if (separatedURL[1] === \"menu\") {\r\n this.setState({ selectedMenuItem: Number(separatedURL[2]) });\r\n }\r\n }\r\n\r\n public componentDidUpdate(prevProps: Props) {\r\n if (\r\n prevProps !== this.props &&\r\n !(\r\n this.props.location.pathname.includes(\"/menu\") ||\r\n this.props.location.pathname.includes(\"/catalog\") ||\r\n this.props.location.pathname.includes(\"/view-mail-notifications\")\r\n )\r\n ) {\r\n this.setState({ selectedMenuItem: -1 });\r\n }\r\n if (\r\n prevProps.navMenuItems.length !== this.props.navMenuItems.length &&\r\n this.props.location.pathname.includes(\"/catalog\")\r\n ) {\r\n this.setState({ selectedMenuItem: this.props.navMenuItems.length });\r\n }\r\n if (\r\n prevProps.navMenuItems.length !== this.props.navMenuItems.length &&\r\n this.props.location.pathname.includes(\"/view-mail-notifications\")\r\n ) {\r\n this.setState({ selectedMenuItem: this.props.navMenuItems.length + 1 });\r\n }\r\n }\r\n\r\n public render() {\r\n const { selectedMenuItem } = this.state;\r\n const { navMenuItems } = this.props;\r\n\r\n const catalogBetaIndex = navMenuItems.length;\r\n const viewMailNotifsIndex = catalogBetaIndex + 1;\r\n\r\n return (\r\n \r\n {navMenuItems.map((nmi) => (\r\n \r\n {nmi.text}\r\n \r\n ))}\r\n \r\n Catalog Beta\r\n \r\n \r\n View Mail Notifications\r\n \r\n \r\n );\r\n }\r\n\r\n private onCatalogClick = () => {\r\n this.setState({ selectedMenuItem: this.props.navMenuItems.length });\r\n this.props.history.push(`/catalog`);\r\n };\r\n\r\n private onViewMailNotifsClick = () => {\r\n this.setState({ selectedMenuItem: this.props.navMenuItems.length + 1 });\r\n this.props.history.push(`/view-mail-notifications`);\r\n };\r\n\r\n private selectedMenuItemHandler = (item: NavMenuDto) => () => {\r\n this.setState({ selectedMenuItem: item.id });\r\n this.props.setSelectedMenu(item);\r\n this.props.history.push(`/menu/${item.id}`);\r\n };\r\n}\r\n\r\nconst mapStateToProps = (state: RootState) => ({\r\n auth: getAuthState(state),\r\n navMenuItems: getNavMenuItems(state),\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n getNavMenuItems: menuActions.navMenu.initialize,\r\n setSelectedMenu: menuActions.navMenu.setSelectedMenu,\r\n};\r\n\r\nexport default withRouter(\r\n connect(mapStateToProps, mapDispatchToProps)(NavBarContent)\r\n);\r\n","import * as React from \"react\";\r\nimport { NavLink } from \"react-router-dom\";\r\nimport color from \"src/utils/color\";\r\nimport styled from \"styled-components\";\r\n\r\nconst PublicNavLinks = () => (\r\n \r\n \r\n UDM API Subscription\r\n \r\n \r\n Contact Us\r\n \r\n \r\n About Us\r\n \r\n \r\n);\r\n\r\nexport default PublicNavLinks;\r\n\r\nconst NavBarLinkWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n column-gap: 2rem;\r\n\r\n .active-route {\r\n color: ${color.PRIMARY};\r\n }\r\n`;\r\n\r\nconst LandingPageNavBarLink = styled(NavLink)`\r\n text-decoration: none;\r\n color: ${color.TEXT_PRIMARY};\r\n font-size: 1rem;\r\n font-weight: bold;\r\n\r\n &:hover {\r\n color: ${color.PRIMARY};\r\n }\r\n\r\n &:active {\r\n color: ${color.POSITIVE};\r\n }\r\n`;\r\n","import * as React from \"react\";\r\nimport styled from \"styled-components\";\r\nimport color from \"../../utils/color\";\r\nimport {\r\n Link,\r\n RouteComponentProps,\r\n withRouter,\r\n NavLink,\r\n} from \"react-router-dom\";\r\nimport Logo from \"../../media/svg/udm_logo.svg\";\r\nimport { RootState } from \"../../ducks/store\";\r\nimport { getNavMenuItems } from \"../../ducks/menu/selectors\";\r\nimport { connect } from \"react-redux\";\r\nimport { authActions } from \"../../ducks/authentication/actions\";\r\nimport NavMenuHeader from \"../../components/Menu/NavMenuHeader/NavMenuHeader\";\r\nimport Button from \"../../components/shared/Button/Button\";\r\nimport { getAuthState } from \"../../ducks/authentication/selectors\";\r\nimport NavBarContent from \"../../components/Menu/NavBarContent/NavBarContent\";\r\nimport PublicNavLinks from \"./PublicNavLinks\";\r\n\r\nconst NavBarHeaderContainer = styled.div`\r\n background-color: ${color.BACKGROUND};\r\n z-index: 100;\r\n`;\r\n\r\nconst HeaderContent = styled.div`\r\n padding: 13px 2rem;\r\n font-size: 20px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n`;\r\n\r\nconst NavBar = styled.div<{ isLoggedIn: boolean }>`\r\n position: fixed;\r\n top: 0;\r\n width: 100%;\r\n height: auto;\r\n z-index: 9999;\r\n background-color: transparent;\r\n padding-left: 0;\r\n box-shadow: ${({ isLoggedIn }) =>\r\n isLoggedIn ? \"0 0.1rem 0.25rem rgba(0, 0, 0, 0.25)\" : \"none\"};\r\n`;\r\n\r\nconst LogoImg = styled.img`\r\n height: 36px;\r\n cursor: pointer;\r\n`;\r\n\r\nconst LandingPageNavigationContainer = styled.div`\r\n display: flex;\r\n align-items: center;\r\n column-gap: 3rem;\r\n`;\r\n\r\nconst PrivateNavLinksWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n column-gap: 5rem;\r\n`;\r\n\r\nconst FlexCC = styled.div`\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n column-gap: 2rem;\r\n\r\n a.active {\r\n border-bottom: ${color.PRIMARY} solid 2px;\r\n box-shadow: 0 5px 5px -4px ${color.PRIMARY};\r\n margin-bottom: -2px;\r\n }\r\n`;\r\n\r\nconst EduAndAnnLink = styled(NavLink)`\r\n font-size: 0.9rem;\r\n text-decoration: none;\r\n color: inherit;\r\n\r\n &:hover {\r\n border-bottom: ${color.PRIMARY} solid 2px;\r\n box-shadow: 0 5px 5px -4px ${color.PRIMARY};\r\n margin-bottom: -2px;\r\n }\r\n`;\r\n\r\ntype OwnProps = { isLoggedIn: boolean };\r\n\r\ntype Props = RouteComponentProps &\r\n OwnProps &\r\n ReturnType &\r\n typeof mapDispatchToProps;\r\n\r\nconst NavBarContainer: React.FC = ({\r\n signIn,\r\n isLoggedIn,\r\n signOut,\r\n auth,\r\n}) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {!isLoggedIn && }\r\n \r\n {isLoggedIn ? (\r\n \r\n {!(location.pathname === \"/\") && }\r\n \r\n \r\n Announcements & Videos\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\nconst mapStateToProps = (state: RootState) => ({\r\n navMenuItems: getNavMenuItems(state),\r\n auth: getAuthState(state),\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n signIn: authActions.signIn,\r\n signOut: authActions.signOut,\r\n};\r\n\r\nconst connectedNavBarContainer = connect(\r\n mapStateToProps,\r\n mapDispatchToProps\r\n)(NavBarContainer);\r\n\r\nexport default withRouter(connectedNavBarContainer);\r\n","import { PeriodFrequency } from '../../../types/PeriodFrequency';\r\n\r\nconst getFrequencyID = (frequency: PeriodFrequency): number => {\r\n switch (frequency) {\r\n case 'Daily': return 1;\r\n case 'Weekly': return 2;\r\n case 'Monthly': return 3;\r\n case 'Quarterly': return 4;\r\n case 'Annual': return 5;\r\n default: return 0;\r\n }\r\n};\r\n\r\nexport default getFrequencyID;\r\n","import axios from 'axios';\r\nimport { PeriodFrequency } from '../types/PeriodFrequency';\r\nimport getFrequencyID from '../ducks/products/utils/getFrequencyID';\r\n\r\nexport const api = axios.create({\r\n baseURL: process.env.REACT_APP_API_URL,\r\n timeout: 20000,\r\n});\r\n\r\nconst dataAPI = {\r\n fetchNavigationMenu: () => api.get('Menu'),\r\n\r\n fetchMenu: (menuID: number) => api.get(`Product?menuItemId=${menuID}`),\r\n\r\n fetchProduct: (\r\n productID: string,\r\n options?: { frequency?: PeriodFrequency, area?: number },\r\n ) => {\r\n let URI = `Product/${productID}`;\r\n if (options) {\r\n if (options.frequency && options.area) {\r\n const frequencyID = getFrequencyID(options.frequency);\r\n URI = `Product/${productID}?frequencyID=${frequencyID}&areaID=${options.area}`;\r\n } else if (options.area) {\r\n URI = `Product/${productID}?areaID=${options.area}`;\r\n } else if (options.frequency) {\r\n const frequencyID = getFrequencyID(options.frequency);\r\n URI = `Product/${productID}?frequencyID=${frequencyID}`;\r\n }\r\n }\r\n return api.get(URI);\r\n },\r\n\r\n fetchFrequencyRecord: (productID: string, frequency: PeriodFrequency, from: string, to: string, areaID: string | number) =>\r\n api.get(`Value_${frequency}?$filter=ProductID eq ${productID} and AreaID eq ${areaID} and Active eq 1 and\r\n ReportPeriod ge datetime'${from}' and ReportPeriod le datetime'${to}'\r\n &$select=AreaID,Value,ReportPeriod,CollectionDate${frequency === 'Weekly' ? ',WeekEnding' : ''}\r\n &$orderby=ReportPeriod asc, CollectionDate desc`),\r\n\r\n fetchUsaFrequencyRecord: (productID: string, frequency: PeriodFrequency, from: string, to: string) =>\r\n api.get(`Value_${frequency}?$filter=ProductID eq ${productID} and AreaID le 53 and Active eq 1 and\r\n ReportPeriod ge datetime'${from}' and ReportPeriod le datetime'${to}'\r\n &$select=AreaID,Value,ReportPeriod,CollectionDate&$orderby=ReportPeriod asc, CollectionDate desc`),\r\n\r\n fetchRecordsForUnitConversion: (productID: string, frequency: PeriodFrequency) =>\r\n api.get(`Value_${frequency}?$filter=ProductID eq ${productID}\r\n &$select=AreaID,Value,ReportPeriod&$orderby=ReportPeriod asc, CollectionDate desc`),\r\n\r\n fetchFuturesRecordWithTradeDate: (productID: string, from: string, to: string, fromTradingDate: string, toTradingDate: string) =>\r\n api.get(`Value_Futures?$filter=ContractMonth\r\n ge datetime'${from}' and ContractMonth le datetime'${to}' and ProductID eq\r\n ${productID} and ReportPeriod ge datetime'${fromTradingDate}' and ReportPeriod le datetime'${toTradingDate}'\r\n &$select=ProductID,AreaID,OpenPrice,HighPrice,LowPrice,ClosePrice,Volume,ReportPeriod,\r\n ContractMonth,SourceID,OpenInterest&$orderby=ContractMonth, ReportPeriod asc`),\r\n\r\n fetchFuturesRecordWithContractMonth: (productID: string, from: string, to: string) =>\r\n api.get(`Value_Futures?$filter=ContractMonth\r\n ge datetime'${from}' and ContractMonth le datetime'${to}' and ProductID eq\r\n ${productID}&$select=ProductID,AreaID,OpenPrice,HighPrice,LowPrice,ClosePrice,Volume,ReportPeriod,\r\n ContractMonth,SourceID,OpenInterest&$orderby=ContractMonth asc, ReportPeriod asc`),\r\n\r\n fetchFuturesRecordWithNearbyIndex: (productID: string, from: string, to: string, index: number) =>\r\n api.get(`Value_Futures?$filter=ContractMonth\r\n ge datetime'${from}' and ContractMonth le datetime'${to}' and ProductID eq ${productID} and NearbyIndex eq ${index}\r\n &$select=ProductID,AreaID,OpenPrice,HighPrice,LowPrice,ClosePrice,Volume,ReportPeriod,\r\n ContractMonth,SourceID,OpenInterest&$orderby=ContractMonth asc, ReportPeriod asc`),\r\n\r\n fetchUnits: () => api.get('unit/conversion'),\r\n\r\n // filters\r\n getPublishers: () => api.get('UDM_Catalog_Publishers'),\r\n getReports: () => api.get('UDM_Catalog_Reports'),\r\n getAreas: () => api.get('UDM_Catalog_Areas'),\r\n getCategories: () => api.get('UDM_Catalog_Categories'),\r\n getMeasures: () => api.get('UDM_Catalog_Measures'),\r\n // https://udmdirect-odata-develop.azurewebsites.net/web/area/classification\r\n getCounties: () => api.get('area/ISO 3166-1'),\r\n // Maybe for later :D\r\n getDashboards: () => api.get('UDM_Catalog_Dashboards'),\r\n getSources: () => api.get('UDM_Catalog_Sources'),\r\n getTables: () => api.get('UDM_Catalog_Tables'),\r\n getUnits: () => api.get('UDM_Catalog_Units'),\r\n};\r\n\r\nexport default dataAPI;\r\n","import { all, call, put, takeLatest } from 'redux-saga/effects';\r\nimport { menuActions } from './actions';\r\nimport { ActionType, getType } from 'typesafe-actions';\r\nimport { NavMenuDto } from '../../types/dto/NavMenuDto';\r\nimport { MenuDto } from '../../types/dto/MenuDto';\r\nimport dataAPI from '../../services/dataServices';\r\nimport { AxiosResponse } from 'axios';\r\n\r\nexport function* fetchNavigationMenu() {\r\n try {\r\n const navMenuDto: AxiosResponse = yield call(dataAPI.fetchNavigationMenu);\r\n yield put(menuActions.navMenu.add(navMenuDto.data));\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n}\r\n\r\nexport function* fetchMenu(action: ActionType) {\r\n try {\r\n const menu: AxiosResponse = yield call(dataAPI.fetchMenu, action.payload);\r\n yield put(menuActions.menu.add(menu.data, action.payload));\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n}\r\n\r\nfunction* menuSagaWatcher() {\r\n yield all([\r\n takeLatest(getType(menuActions.navMenu.initialize), fetchNavigationMenu),\r\n takeLatest(getType(menuActions.menu.get), fetchMenu),\r\n ]);\r\n}\r\n\r\nexport default menuSagaWatcher;\r\n","import { FrequencyRecord, FrequencyRecordRaw } from '../../../../types/FrequencyRecord';\r\nimport { PeriodFrequency } from '../../../../types/PeriodFrequency';\r\nimport { getFrequencyTimestamp, getTimeIndexFromTimestamp, getYearFromTimestamp } from './timeFunctions';\r\n\r\nconst createFrequencyRecord = (records: FrequencyRecordRaw[], frequency: PeriodFrequency): FrequencyRecord => {\r\n const result: FrequencyRecord = { allAreas: [] };\r\n records.forEach((record: FrequencyRecordRaw) => {\r\n if (!result[record.areaID]) {\r\n result[record.areaID] = { allRecords: [] };\r\n }\r\n const reportPeriodTimestamp = frequency === 'Weekly' && record.weekEnding\r\n ? getFrequencyTimestamp(record.weekEnding, frequency)\r\n : getFrequencyTimestamp(record.reportPeriod, frequency);\r\n\r\n const recordValues = {\r\n value: record.value,\r\n index: getTimeIndexFromTimestamp(reportPeriodTimestamp),\r\n year: getYearFromTimestamp(reportPeriodTimestamp),\r\n date: record.reportPeriod,\r\n timestamp: reportPeriodTimestamp,\r\n };\r\n\r\n if (!result[record.areaID][reportPeriodTimestamp]) {\r\n result[record.areaID][reportPeriodTimestamp] = {\r\n ...recordValues,\r\n collectionDate: record.collectionDate,\r\n }\r\n }\r\n else {\r\n if (result[record.areaID][reportPeriodTimestamp].collectionDate < record.collectionDate) {\r\n result[record.areaID][reportPeriodTimestamp] = {\r\n ...recordValues,\r\n collectionDate: record.collectionDate,\r\n }\r\n }\r\n }\r\n });\r\n result.allAreas = Object.keys(result).filter(value => value !== 'allAreas').map(Number);\r\n result.allAreas.forEach((area: number) => {\r\n result[area].allRecords = Object.keys(result[area]).filter(value => value !== 'allRecords').map(Number);\r\n });\r\n return result;\r\n};\r\n\r\nexport default createFrequencyRecord;\r\n","import { AxiosResponse } from 'axios';\r\nimport { FrequencyRecordDto } from '../../../../types/dto/FrequencyRecordDto';\r\nimport { FrequencyRecordRaw } from '../../../../types/FrequencyRecord';\r\n\r\nconst mapFrequencyRecordsDtoToFrequencyRecords = ({data}: AxiosResponse): FrequencyRecordRaw[] =>\r\n data.value.map(({AreaID, Value, ReportPeriod, CollectionDate, WeekEnding}) =>\r\n ({ areaID: AreaID, value: Number(Value), reportPeriod: new Date(ReportPeriod), collectionDate: new Date(CollectionDate),\r\n weekEnding: WeekEnding ? new Date(WeekEnding) : undefined }));\r\n\r\nexport default mapFrequencyRecordsDtoToFrequencyRecords;\r\n","import { FrequencyRecordRaw } from '../../../../types/FrequencyRecord';\r\nimport { PeriodFrequency } from '../../../../types/PeriodFrequency';\r\nimport { getFrequencyTimestamp, getTimeIndexFromTimestamp, getYearFromTimestamp } from '../../frequency/utils/timeFunctions';\r\nimport { RevisionRecord } from '../../../../types/RevisionRecord';\r\n\r\nconst createRevisionRecord = (records: FrequencyRecordRaw[], frequency: PeriodFrequency): RevisionRecord => {\r\n const result: RevisionRecord = { allAreas: [] };\r\n records.forEach((record: FrequencyRecordRaw) => {\r\n if (!result[record.areaID]) {\r\n result[record.areaID] = { allRecords: [] };\r\n }\r\n const reportPeriodTimestamp = getFrequencyTimestamp(record.reportPeriod, frequency);\r\n const recordValues = {\r\n value: record.value,\r\n index: getTimeIndexFromTimestamp(reportPeriodTimestamp),\r\n year: getYearFromTimestamp(reportPeriodTimestamp),\r\n date: record.reportPeriod,\r\n timestamp: reportPeriodTimestamp,\r\n };\r\n\r\n if (!result[record.areaID][reportPeriodTimestamp]) {\r\n result[record.areaID][reportPeriodTimestamp] = [{\r\n ...recordValues,\r\n collectionDate: record.collectionDate,\r\n }];\r\n } else {\r\n result[record.areaID][reportPeriodTimestamp].push({\r\n ...recordValues,\r\n collectionDate: record.collectionDate,\r\n });\r\n }\r\n });\r\n result.allAreas = Object.keys(result).filter(value => value !== 'allAreas').map(Number);\r\n result.allAreas.forEach((area: number) => {\r\n result[area].allRecords = Object.keys(result[area]).filter(value => value !== 'allRecords').map(Number);\r\n });\r\n return result;\r\n};\r\n\r\nexport default createRevisionRecord;\r\n","import { all, call, put, select, takeEvery } from 'redux-saga/effects';\r\nimport { recordsActions } from '../actions';\r\nimport { ActionType, getType } from 'typesafe-actions';\r\nimport { FrequencyRecord, FrequencyRecordRaw } from '../../../types/FrequencyRecord';\r\nimport createFrequencyRecord from './utils/createFrequencyRecord';\r\nimport { getDisplayDateRange } from '../../productPage/selectors';\r\nimport dataAPI from '../../../services/dataServices';\r\nimport { AxiosResponse } from 'axios';\r\nimport mapFrequencyRecordsDtoToFrequencyRecords from './utils/mapFrequencyRecordsDtoToFrequencyRecords';\r\nimport { FrequencyRecordDto } from '../../../types/dto/FrequencyRecordDto';\r\nimport createRevisionRecord from '../revision/utils/createRevisionRecord';\r\nimport { RevisionRecord } from '../../../types/RevisionRecord';\r\n\r\nexport function* initializeFrequencyRecord(action: ActionType) {\r\n try {\r\n const DateDisplayRange = yield select(getDisplayDateRange);\r\n const toDateString = new Date().toISOString().slice(0, 10);\r\n const fromDateString = new Date(DateDisplayRange.to.getFullYear() - 12, DateDisplayRange.to.getMonth()).toISOString().slice(0, 10);\r\n\r\n const meta = {\r\n productID: action.payload,\r\n frequency: action.meta.frequency,\r\n };\r\n\r\n const recordsDto: AxiosResponse =\r\n yield call(dataAPI.fetchFrequencyRecord, action.payload, action.meta.frequency, fromDateString, toDateString, action.meta.areaID);\r\n const rawRecords: FrequencyRecordRaw[] = yield mapFrequencyRecordsDtoToFrequencyRecords(recordsDto);\r\n const records: FrequencyRecord = yield call(createFrequencyRecord, rawRecords, action.meta.frequency);\r\n yield put(recordsActions.frequency.addFrequency(records, meta));\r\n\r\n const revision: RevisionRecord = yield call(createRevisionRecord, rawRecords, action.meta.frequency);\r\n yield put(recordsActions.revision.addRevision(revision, meta));\r\n\r\n if (action.meta.hasUsaMap) {\r\n const usaRecordsDto: AxiosResponse =\r\n yield call(dataAPI.fetchUsaFrequencyRecord, action.payload, action.meta.frequency, fromDateString, toDateString);\r\n\r\n const rawUsaRecords: FrequencyRecordRaw[] = yield mapFrequencyRecordsDtoToFrequencyRecords(usaRecordsDto);\r\n const usaRecords: FrequencyRecord = yield call(createFrequencyRecord, rawUsaRecords, action.meta.frequency);\r\n yield put(recordsActions.frequency.addFrequency(usaRecords, meta));\r\n\r\n const usaRevision: RevisionRecord = yield call(createRevisionRecord, rawUsaRecords, action.meta.frequency);\r\n yield put(recordsActions.revision.addRevision(usaRevision, meta));\r\n }\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n}\r\n\r\nexport function* fetchFrequencyRecord(action: ActionType) {\r\n try {\r\n const DateDisplayRange = yield select(getDisplayDateRange);\r\n let from = DateDisplayRange.from;\r\n let to = DateDisplayRange.to;\r\n const toYear = DateDisplayRange.to.getFullYear();\r\n const fromYear = DateDisplayRange.from.getFullYear();\r\n if ((toYear - fromYear) < 12) {\r\n to = to.toISOString().slice(0, 10);\r\n from = new Date(toYear - 12, DateDisplayRange.to.getMonth()).toISOString().slice(0, 10);\r\n }\r\n else {\r\n from = from.toISOString().slice(0, 10);\r\n to = to.toISOString().slice(0, 10);\r\n }\r\n\r\n const meta = {\r\n productID: action.payload,\r\n frequency: action.meta.frequency,\r\n };\r\n\r\n const recordsDto: AxiosResponse = yield call(dataAPI.fetchFrequencyRecord,\r\n action.payload, action.meta.frequency, from, to, action.meta.areaID);\r\n const rawRecords: FrequencyRecordRaw[] = yield mapFrequencyRecordsDtoToFrequencyRecords(recordsDto);\r\n const records: FrequencyRecord = yield call(createFrequencyRecord, rawRecords, action.meta.frequency);\r\n yield put(recordsActions.frequency.addFrequency(records, meta));\r\n\r\n const revision: RevisionRecord = yield call(createRevisionRecord, rawRecords, action.meta.frequency);\r\n yield put(recordsActions.revision.addRevision(revision, meta));\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n}\r\n\r\nexport function* initializeUnitsForUnitConversion(action: ActionType) {\r\n try {\r\n const recordDto: AxiosResponse = yield call(dataAPI.fetchRecordsForUnitConversion, action.payload, action.meta);\r\n const rawRecords = yield mapFrequencyRecordsDtoToFrequencyRecords(recordDto);\r\n const records: FrequencyRecord = yield call(createFrequencyRecord, rawRecords, action.meta);\r\n yield put(recordsActions.frequency.addFrequency(records, { productID: action.payload, frequency: action.meta }));\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n}\r\n\r\nfunction* frequencyRecordWatcher() {\r\n yield all([\r\n takeEvery(getType(recordsActions.frequency.initializeFrequency), initializeFrequencyRecord),\r\n takeEvery(getType(recordsActions.frequency.initializeUnitsForFrequency), initializeUnitsForUnitConversion),\r\n takeEvery(getType(recordsActions.frequency.fetchFrequency), fetchFrequencyRecord),\r\n ]);\r\n}\r\n\r\nexport default frequencyRecordWatcher;\r\n","import { FuturesRaw, FuturesRecords } from '../../../../types/FuturesRecord';\r\n\r\nconst createFuturesRecord = (futuresRecordsRaw: FuturesRaw[]): FuturesRecords => {\r\n const futuresRecords: FuturesRecords = { allAreas: [] };\r\n const formatDate = (date: Date) =>\r\n Number(`${date.getFullYear()}${String(date.getMonth()).padStart(2, '0')}`);\r\n\r\n futuresRecordsRaw.forEach((record) => {\r\n const {\r\n areaID, contractMonth, volume, lowPrice, openPrice, highPrice, closePrice, reportPeriod, openInterest,\r\n } = record;\r\n const formattedDate = formatDate(new Date(contractMonth));\r\n if (!futuresRecords[areaID]) {\r\n futuresRecords[areaID] = {};\r\n }\r\n if (!futuresRecords[areaID][formattedDate]) {\r\n futuresRecords[areaID][formattedDate] = [];\r\n }\r\n futuresRecords[areaID][formattedDate].push({\r\n volume,\r\n lowPrice: Number(lowPrice),\r\n openPrice: Number(openPrice),\r\n highPrice: Number(highPrice),\r\n closePrice: Number(closePrice),\r\n contractMonth: new Date(contractMonth),\r\n reportPeriod: new Date(reportPeriod),\r\n openInterest,\r\n });\r\n });\r\n futuresRecords.allAreas = Object.keys(futuresRecords).filter(value => value !== 'allAreas').map(Number);\r\n return futuresRecords;\r\n};\r\n\r\nexport default createFuturesRecord;\r\n","import { AxiosResponse } from 'axios';\r\nimport { FuturesRecordDto } from '../../../../types/dto/FuturesRecordDto';\r\nimport { FuturesRaw } from '../../../../types/FuturesRecord';\r\n\r\nconst mapFuturesRecordsDtoToFuturesRecords = ({data}: AxiosResponse): FuturesRaw[] =>\r\n data.value.map(({AreaID, Volume, LowPrice, OpenPrice, HighPrice, ClosePrice, ContractMonth, ReportPeriod, OpenInterest}) =>\r\n ({\r\n areaID: AreaID,\r\n volume: Volume,\r\n lowPrice: Number(LowPrice),\r\n openPrice: Number(OpenPrice),\r\n highPrice: Number(HighPrice),\r\n closePrice: Number(ClosePrice),\r\n contractMonth: new Date(ContractMonth),\r\n reportPeriod: new Date(ReportPeriod),\r\n openInterest: OpenInterest,\r\n }\r\n ));\r\n\r\nexport default mapFuturesRecordsDtoToFuturesRecords;\r\n","import { all, call, put, select, takeEvery, takeLatest } from 'redux-saga/effects';\r\nimport { ActionType, getType } from 'typesafe-actions';\r\nimport { recordsActions } from '../actions';\r\nimport { getProductPageProductID } from '../../productPage/selectors';\r\nimport createFuturesRecord from './utils/createFuturesRecord';\r\nimport dataAPI from '../../../services/dataServices';\r\nimport mapFuturesRecordsDtoToFuturesRecords from './utils/mapFuturesRecordsDtoToFuturesRecords';\r\nimport { AxiosResponse } from 'axios';\r\nimport { FuturesRecordDto } from '../../../types/dto/FuturesRecordDto';\r\nimport { FuturesRecords } from '../../../types/FuturesRecord';\r\nimport { addYears, endOfMonth, format, isSameDay, startOfMonth, subDays, subMonths } from 'date-fns';\r\nimport { toast } from 'react-toastify';\r\nimport { productPageActions } from '../../productPage/actions';\r\n\r\nfunction* initializeFuturesRecords() {\r\n try {\r\n const productID = yield select(getProductPageProductID);\r\n const date = new Date();\r\n const from = new Date(date.getFullYear(), date.getMonth()).toISOString().slice(0, 10);\r\n const to = new Date(date.getFullYear() + 2, date.getMonth()).toISOString().slice(0, 10);\r\n const toTradingDate = new Date().toISOString().slice(0, 10);\r\n const fromTradingDate = subMonths(new Date(), 2).toISOString().slice(0, 10);\r\n const futuresRecordsDto: AxiosResponse = yield call(dataAPI.fetchFuturesRecordWithTradeDate,\r\n productID, from, to, fromTradingDate, toTradingDate);\r\n const futuresRecords = yield mapFuturesRecordsDtoToFuturesRecords(futuresRecordsDto);\r\n const latestTradingDate = futuresRecordsDto.data.value[futuresRecordsDto.data.value.length - 1].ReportPeriod;\r\n yield put(productPageActions.setFuturesTradingDate(new Date(latestTradingDate)));\r\n const records = yield call(createFuturesRecord, futuresRecords);\r\n yield put(recordsActions.futures.setFutures(productID, { recordsData: records, rawRecords: futuresRecords }));\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n}\r\n\r\nfunction* fetchFuturesRecords(action: ActionType) {\r\n try {\r\n const productID = yield select(getProductPageProductID);\r\n const toTradingDate = format(action.payload, 'YYYY-MM-DD');\r\n const fromTradingDate = format(subDays(action.payload, 35), 'YYYY-MM-DD');\r\n const date = new Date(Date.now());\r\n const from = format(new Date(), 'YYYY-MM-DD');\r\n const to = format(new Date(date.getFullYear() + 2, date.getMonth()), 'YYYY-MM-DD');\r\n const futuresRecordsDto: AxiosResponse =\r\n yield call(dataAPI.fetchFuturesRecordWithTradeDate, productID, from, to, fromTradingDate, toTradingDate);\r\n const toTradingDateFutures = futuresRecordsDto.data.value.filter(record => isSameDay(record.ReportPeriod, toTradingDate));\r\n if (toTradingDateFutures.length !== 0) {\r\n yield put(productPageActions.setFuturesTradingDate(new Date((action.payload).toString() + 'z')));\r\n const futuresRecords = yield mapFuturesRecordsDtoToFuturesRecords(futuresRecordsDto);\r\n const records: FuturesRecords = yield call(createFuturesRecord, futuresRecords);\r\n yield put(recordsActions.futures.setFutures(productID, { recordsData: records, rawRecords: futuresRecords }));\r\n } else {\r\n const records: FuturesRecords = yield call(createFuturesRecord, []);\r\n yield put(recordsActions.futures.setFutures(productID, { recordsData: records, rawRecords: [] }));\r\n toast.error(`Trade date ${format(toTradingDate, 'MMM DD, YYYY')} is not available.`);\r\n }\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n}\r\n\r\nfunction* fetchFuturesByContractMonth(action: ActionType) {\r\n const productID = yield select(getProductPageProductID);\r\n const toContractMonth = format(endOfMonth(action.payload), 'YYYY-MM-DD');\r\n const fromContractMonth = format(startOfMonth(action.payload), 'YYYY-MM-DD');\r\n try {\r\n const futuresRecordsDto: AxiosResponse =\r\n yield call(dataAPI.fetchFuturesRecordWithContractMonth, productID, fromContractMonth, toContractMonth);\r\n const futuresRecords = yield mapFuturesRecordsDtoToFuturesRecords(futuresRecordsDto);\r\n const records: FuturesRecords = yield call(createFuturesRecord, futuresRecords);\r\n yield put(recordsActions.futures.setFutures(productID, { recordsData: records, rawRecords: futuresRecords }));\r\n yield put(productPageActions.setFuturesContractMonth(endOfMonth(action.payload)));\r\n } catch (e) {\r\n toast.error(`Trade date ${format(action.payload, 'MMM DD, YYYY')} is not available.`);\r\n }\r\n}\r\n\r\nfunction* fetchFuturesByNearbyIndex(action: ActionType) {\r\n try {\r\n const productID = yield select(getProductPageProductID);\r\n const date = new Date(Date.now());\r\n const from = format(date, 'YYYY-MM-DD');\r\n const to = format(addYears(date, 2), 'YYYY-MM-DD');\r\n\r\n const futuresRecordsDto: AxiosResponse =\r\n yield call(dataAPI.fetchFuturesRecordWithNearbyIndex, productID, from, to, action.payload);\r\n const futuresRecords = yield mapFuturesRecordsDtoToFuturesRecords(futuresRecordsDto);\r\n const records = yield call(createFuturesRecord, futuresRecords);\r\n yield put(recordsActions.futures.setFutures(productID, { recordsData: records, rawRecords: futuresRecords }));\r\n\r\n yield put(productPageActions.setFuturesNearbyIndex(action.payload));\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n}\r\n\r\nfunction* futuresRecordWatcher() {\r\n yield all([\r\n takeEvery(getType(recordsActions.futures.initializeFutures), initializeFuturesRecords),\r\n takeLatest(getType(recordsActions.futures.fetchFuturesByReportPeriod), fetchFuturesRecords),\r\n takeLatest(getType(recordsActions.futures.fetchFuturesByContractMonth), fetchFuturesByContractMonth),\r\n takeLatest(getType(recordsActions.futures.fetchFuturesByNearbyIndex), fetchFuturesByNearbyIndex),\r\n ]);\r\n}\r\n\r\nexport default futuresRecordWatcher;\r\n","import { all } from '@redux-saga/core/effects';\r\n\r\nfunction* frequencyRevisionWatcher() {\r\n yield all([]);\r\n}\r\n\r\nexport default frequencyRevisionWatcher;\r\n","import { all } from 'redux-saga/effects';\r\nimport frequencyRecordWatcher from './frequency/sagas';\r\nimport futuresRecordWatcher from './futures/sagas';\r\nimport frequencyRevisionWatcher from './revision/sagas';\r\n\r\nexport default function* recordsRootSaga() {\r\n yield all([\r\n frequencyRecordWatcher(),\r\n futuresRecordWatcher(),\r\n frequencyRevisionWatcher(),\r\n ]);\r\n}\r\n","import { ChartDto } from '../../../types/dto/ChartDto';\r\nimport { Chart } from '../../../types/Chart';\r\n\r\nconst mapChartDtoToChart = (chartDto: ChartDto): Chart => ({\r\n ...chartDto,\r\n transformationsList: chartDto.transformations.map(value => value.id),\r\n normalizationsList: chartDto.normalizations.map(value => value.id),\r\n selectedTransformation: chartDto.transformations[0].id,\r\n selectedNormalization: chartDto.normalizations[0].id,\r\n});\r\n\r\nexport default mapChartDtoToChart;\r\n","import { PeriodFrequency } from \"../../../types/PeriodFrequency\";\r\nimport { ProductDto } from \"../../../types/dto/ProductDto\";\r\nimport { AxiosResponse } from \"axios\";\r\n\r\nconst filterAreaFrequencies = (frequency: PeriodFrequency) => (areaDto: any) =>\r\n areaDto.frequency.name === frequency;\r\n\r\nconst mapAreaFrequencies = ({ area: { id, name } }: any) => ({ id, name });\r\n\r\nconst mapProductDtoToProduct = ({ data }: AxiosResponse) => {\r\n const {\r\n unit,\r\n report,\r\n id,\r\n name,\r\n nameTranslated,\r\n attributes,\r\n updateSchedule,\r\n areaFrequencys: areas,\r\n scale,\r\n } = data;\r\n\r\n if (process.env.NODE_ENV !== \"production\") {\r\n if (!report) {\r\n throw new Error(`\"report\" is missing in \"product\" data`);\r\n }\r\n if (!areas.length) {\r\n throw new Error(`\"areaFrequencys\" are missing in \"product\" data`);\r\n }\r\n if (!attributes.length) {\r\n throw new Error(`\"attributes\" are missing in \"product\" data`);\r\n }\r\n } else {\r\n if (!report || !areas.length || !attributes.length) {\r\n throw new Error(`No data available for selected report.`);\r\n }\r\n }\r\n\r\n const {\r\n yoYChange,\r\n yoYChangePercentage,\r\n ytDChange,\r\n ytDPercentageChange,\r\n doDChange,\r\n doDChangePercentage,\r\n woWChange,\r\n woWPercentageChange,\r\n moMChange,\r\n moMChangePercentage,\r\n qoQChange,\r\n qoQChangePercentage,\r\n metaFields,\r\n lastReport,\r\n lastReportValue,\r\n lastReportPeriod,\r\n firstReportPeriod,\r\n } = report;\r\n\r\n const frequencies = {\r\n Daily: areas.filter(filterAreaFrequencies(\"Daily\")).map(mapAreaFrequencies),\r\n Weekly: areas\r\n .filter(filterAreaFrequencies(\"Weekly\"))\r\n .map(mapAreaFrequencies),\r\n Monthly: areas\r\n .filter(filterAreaFrequencies(\"Monthly\"))\r\n .map(mapAreaFrequencies),\r\n Quarterly: areas\r\n .filter(filterAreaFrequencies(\"Quarterly\"))\r\n .map(mapAreaFrequencies),\r\n Annual: areas\r\n .filter(filterAreaFrequencies(\"Annual\"))\r\n .map(mapAreaFrequencies),\r\n };\r\n\r\n return {\r\n product: { id, name, nameTranslated },\r\n scale,\r\n report: {\r\n id: report.id,\r\n name: report.name,\r\n nameTranslated: report.nameTranslated,\r\n },\r\n publisher: report.publisher,\r\n summary: {\r\n lastReportValue,\r\n lastReport: new Date(lastReport),\r\n lastReportPeriod: new Date(lastReportPeriod),\r\n firstReportPeriod: new Date(firstReportPeriod),\r\n yoYChange,\r\n yoYChangePercentage,\r\n ytDChange,\r\n ytDPercentageChange,\r\n doDChange,\r\n doDChangePercentage,\r\n woWChange,\r\n woWPercentageChange,\r\n moMChange,\r\n moMChangePercentage,\r\n qoQChange,\r\n qoQChangePercentage,\r\n },\r\n areas: {\r\n defaultArea: {\r\n id: report.areaFrequencys[0].area.id,\r\n name: report.areaFrequencys[0].area.name,\r\n frequency: report.areaFrequencys[0].frequency.name,\r\n },\r\n ...frequencies,\r\n availableFrequencies: Object.keys(frequencies).filter(\r\n (key) => frequencies[key as keyof typeof frequencies].length\r\n ),\r\n },\r\n metaFields,\r\n unit: { id: unit.id, name: unit.unit, description: unit.description },\r\n updates: {\r\n calendarUrl: report.calendarUrl,\r\n updateSchedule: updateSchedule.map((field) => ({\r\n releaseID: field.releaseId,\r\n date: new Date(field.releaseTime),\r\n })),\r\n },\r\n // non changed values\r\n attributes,\r\n // data,\r\n };\r\n};\r\n\r\nexport default mapProductDtoToProduct;\r\n","import { ActionType, createStandardAction } from 'typesafe-actions';\r\nimport { SeriesContext } from '../../types/SeriesContext';\r\nimport { TableContext } from '../../types/TableContext';\r\nimport { PeriodFrequency } from '../../types/PeriodFrequency';\r\n\r\nexport const contextTableActions = {\r\n series: {\r\n get: createStandardAction('@contextTable_series/GET')(),\r\n add: createStandardAction('@contextTable_series/ADD')(),\r\n },\r\n table: {\r\n get: createStandardAction('@contextTable_table/GET')(),\r\n add: createStandardAction('@contextTable_table/ADD')(),\r\n },\r\n};\r\n\r\nexport type ContextTableActions = ActionType;\r\n","import { all, call, put, select, takeLatest } from 'redux-saga/effects';\r\nimport { PeriodFrequency } from '../../types/PeriodFrequency';\r\nimport { productActions } from './actions';\r\nimport { ActionType, getType } from 'typesafe-actions';\r\nimport { productPageActions } from '../productPage/actions';\r\nimport { Product, ProductWithAttributes, Chart } from '../../types/Product';\r\nimport { recordsActions } from '../records/actions';\r\nimport { unitsActions } from '../units/actions';\r\nimport { chartActions } from '../charts/actions';\r\nimport mapChartDtoToChart from '../charts/utils/mapChartDtoToChart';\r\nimport { ChartDto } from '../../types/dto/ChartDto';\r\nimport { toast } from 'react-toastify';\r\nimport dataAPI from '../../services/dataServices';\r\nimport { AxiosResponse } from 'axios';\r\nimport mapProductDtoToProduct from './utils/mapProductDtoToProduct';\r\nimport { ProductDto } from '../../types/dto/ProductDto';\r\nimport { contextTableActions } from '../contextTable/actions';\r\nimport { getProductPageAreaID, getProductPageFrequency } from '../productPage/selectors';\r\n\r\nexport function* addProduct(productData: ProductWithAttributes) {\r\n yield put(productActions.addProduct(productData));\r\n}\r\n\r\nexport function* addChart(rawCharts: ChartDto[], productData: Product) {\r\n const charts = rawCharts.map(mapChartDtoToChart).filter(chart => chart.id !== 12 && chart.id !== 13);\r\n yield put(chartActions.add(charts, {\r\n productID: productData.product.id,\r\n frequency: productData.areas.defaultArea.frequency,\r\n }));\r\n}\r\n\r\nexport interface ProductInfo {\r\n productID: number,\r\n areaID: number,\r\n chartID: number,\r\n}\r\n\r\nexport interface ProductMeta {\r\n frequency: PeriodFrequency,\r\n unitID: number,\r\n lastReportPeriod: Date,\r\n scale: number,\r\n}\r\n\r\nexport function* setProduct(productInfo: ProductInfo, productMeta: ProductMeta) {\r\n yield put(productPageActions.setProduct(productInfo, productMeta));\r\n}\r\n\r\nexport interface InitFrequencyData {\r\n frequency: PeriodFrequency,\r\n areaID: number,\r\n}\r\n\r\nexport interface AllProductData {\r\n productData: ProductWithAttributes,\r\n productInfo: ProductInfo,\r\n productMeta: ProductMeta,\r\n rawCharts: ChartDto[],\r\n initFrequencyData: InitFrequencyData,\r\n}\r\n\r\nexport const setProductData = (productData: ProductWithAttributes): AllProductData => {\r\n const rawChartObject = {};\r\n productData.attributes.reduce((chartList: Chart[], { charts }) => chartList.concat(charts), []).forEach((chart: Chart) => {\r\n if (!rawChartObject[chart.id]) {\r\n rawChartObject[chart.id] = chart;\r\n } else {\r\n const baseChart = rawChartObject[chart.id];\r\n const transformationRaw = {};\r\n const normalizationsRaw = {};\r\n [...baseChart.transformations, ...chart.transformations].forEach((t) => transformationRaw[t.id] = t);\r\n [...baseChart.normalizations, ...chart.normalizations].forEach((n) => normalizationsRaw[n.id] = n);\r\n rawChartObject[chart.id] = {\r\n ...baseChart,\r\n transformations: Object.keys(transformationRaw).map(id => transformationRaw[id]),\r\n normalizations: Object.keys(normalizationsRaw).map(id => normalizationsRaw[id]),\r\n }\r\n }\r\n });\r\n const rawCharts = Object.keys(rawChartObject).map(id => rawChartObject[id]);\r\n const productMeta = {\r\n frequency: productData.areas.defaultArea.frequency,\r\n unitID: productData.unit.id,\r\n scale: productData.scale,\r\n lastReportPeriod: productData.summary.lastReportPeriod,\r\n };\r\n const productInfo = {\r\n productID: productData.product.id,\r\n areaID: productData.areas.defaultArea.id,\r\n chartID: rawCharts[0].id,\r\n };\r\n const initFrequencyData = {\r\n frequency: productData.areas.defaultArea.frequency,\r\n areaID: productData.areas.defaultArea.id,\r\n };\r\n return {productData, productInfo, productMeta, rawCharts, initFrequencyData};\r\n};\r\n\r\nexport function* fetchProduct(action: ActionType) {\r\n try {\r\n yield put(productPageActions.pageStatus.loading());\r\n const productDto: AxiosResponse = yield call(dataAPI.fetchProduct, action.payload, action.meta);\r\n const productData: ProductWithAttributes = yield mapProductDtoToProduct(productDto);\r\n const allProductData: AllProductData = yield setProductData(productData);\r\n yield addProduct(allProductData.productData);\r\n yield put(contextTableActions.series.get(action.payload, allProductData.productMeta.frequency));\r\n yield setProduct(allProductData.productInfo, {\r\n frequency: allProductData.productMeta.frequency,\r\n unitID: allProductData.productMeta.unitID,\r\n lastReportPeriod: allProductData.productData.summary.lastReportPeriod,\r\n scale: allProductData.productData.scale,\r\n });\r\n yield addChart(allProductData.rawCharts, allProductData.productData);\r\n if (allProductData.productMeta.frequency as any === 'Futures') {\r\n yield put(recordsActions.futures.initializeFutures());\r\n } else if (allProductData.rawCharts.some(({ id }) => id === 6)) {\r\n yield put(recordsActions.frequency.initializeFrequency(action.payload, { ...allProductData.initFrequencyData, hasUsaMap: true }));\r\n } else {\r\n yield put(recordsActions.frequency.initializeFrequency(action.payload, allProductData.initFrequencyData));\r\n }\r\n\r\n yield put(unitsActions.update());\r\n yield put(productPageActions.pageStatus.loaded());\r\n } catch (error) {\r\n if (error.message.slice(0, 7) === 'timeout') {\r\n toast.error('Connection to server timed out. Please try again later.', {\r\n position: 'top-center',\r\n autoClose: 10000,\r\n });\r\n } else {\r\n toast.error(error.message, {\r\n position: 'top-center',\r\n });\r\n }\r\n }\r\n}\r\n\r\nexport function* changeProductFrequency(action: ActionType) {\r\n const areaID = yield select(getProductPageAreaID);\r\n try {\r\n const productDto: AxiosResponse = yield call(dataAPI.fetchProduct, action.payload, { ...action.meta, area: areaID });\r\n const productData: ProductWithAttributes = yield mapProductDtoToProduct(productDto);\r\n const allProductData: AllProductData = yield setProductData(productData);\r\n yield addProduct(allProductData.productData);\r\n yield setProduct(allProductData.productInfo, allProductData.productMeta);\r\n yield addChart(allProductData.rawCharts, allProductData.productData);\r\n yield put(recordsActions.frequency.fetchFrequency(action.payload, allProductData.initFrequencyData));\r\n yield put(unitsActions.update());\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n}\r\n\r\nexport function* changeProductArea(action: ActionType) {\r\n const frequency = yield select(getProductPageFrequency);\r\n try {\r\n const productDto: AxiosResponse = yield call(dataAPI.fetchProduct, action.payload, { ...action.meta, frequency });\r\n const productData: ProductWithAttributes = yield mapProductDtoToProduct(productDto);\r\n const allProductData: AllProductData = yield setProductData(productData);\r\n yield addProduct(allProductData.productData);\r\n yield setProduct(allProductData.productInfo, allProductData.productMeta);\r\n yield addChart(allProductData.rawCharts, allProductData.productData);\r\n yield put(recordsActions.frequency.fetchFrequency(action.payload, allProductData.initFrequencyData));\r\n yield put(unitsActions.update());\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n}\r\n\r\nfunction* productSagaWatcher() {\r\n yield all([\r\n takeLatest(getType(productActions.initialize), fetchProduct),\r\n takeLatest(getType(productActions.changeProductFrequency), changeProductFrequency),\r\n takeLatest(getType(productActions.changeProductArea), changeProductArea),\r\n ]);\r\n}\r\n\r\nexport default productSagaWatcher;\r\n","import { AxiosResponse } from 'axios';\r\nimport { UnitDto } from '../../../types/dto/UnitDto';\r\nimport { Units } from '../../../types/Units';\r\n\r\nconst mapUnitDtoToUnit = ({data}: AxiosResponse): Units => {\r\n const result = {};\r\n data.forEach((unit: UnitDto) => {\r\n if (!result[unit.fromUnit.id]) {\r\n result[unit.fromUnit.id] = {};\r\n }\r\n result[unit.fromUnit.id][unit.toUnit.id] = {\r\n id: unit.toUnit.id,\r\n name: unit.toUnit.unit,\r\n conversionFactor: Number(unit.factor),\r\n conversionFunction: unit.function.id,\r\n conversionSeriesID: unit.series ? unit.series.id : null,\r\n scale: unit.toUnit.scale,\r\n };\r\n });\r\n return result;\r\n};\r\n\r\nexport default mapUnitDtoToUnit;\r\n","import { all, call, put, takeLatest } from 'redux-saga/effects';\r\nimport { getType } from 'typesafe-actions';\r\nimport { unitsActions } from './actions';\r\nimport { Units } from '../../types/Units';\r\nimport dataAPI from '../../services/dataServices';\r\nimport mapUnitDtoToUnit from './utils/mapUnitDtoToUnit';\r\nimport { AxiosResponse } from 'axios';\r\nimport { UnitDto } from '../../types/dto/UnitDto';\r\n\r\nexport function* fetchUnits() {\r\n try {\r\n const unitDto: AxiosResponse = yield call(dataAPI.fetchUnits);\r\n const units: Units = yield mapUnitDtoToUnit(unitDto);\r\n yield put(unitsActions.add(units));\r\n yield put(unitsActions.update());\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n}\r\n\r\nfunction* unitSagaWatcher() {\r\n yield all([\r\n takeLatest(getType(unitsActions.initialize), fetchUnits),\r\n ]);\r\n}\r\n\r\nexport default unitSagaWatcher;\r\n","import { all, put, select, takeLatest } from 'redux-saga/effects';\r\nimport { ActionType, getType } from 'typesafe-actions';\r\nimport { getProductPageAreaID, getProductPageFrequency, getProductPageProductID, getUnitID } from './selectors';\r\nimport { getAllUnitIDs, getUnitByID } from '../units/selectors';\r\nimport { PeriodFrequency } from '../../types/PeriodFrequency';\r\nimport { recordsActions } from '../records/actions';\r\nimport { unitsActions } from '../units/actions';\r\nimport { getFrequencyRecord, getAllFrequencyRecords } from '../records/frequency/selectors';\r\nimport { productPageActions } from './actions';\r\nimport { getFrequencyTimestamp } from '../records/frequency/utils/timeFunctions';\r\nimport { UnitState } from '../../types/Units';\r\n\r\nexport function* fetchConversionSeriesProductForUnitConversion() {\r\n const unitID: number = yield select(getUnitID);\r\n const frequency: PeriodFrequency = yield select(getProductPageFrequency);\r\n if (unitID && frequency && frequency !== 'Futures' as any) {\r\n const units: UnitState = yield select(getUnitByID, { unitID });\r\n if (units) {\r\n const allUnits: number[] = yield select(getAllUnitIDs, { unitID });\r\n const allRecords = yield select(getAllFrequencyRecords);\r\n yield all(allUnits.map(unit => {\r\n const conversionSeriesID = units[unit].conversionSeriesID;\r\n if (conversionSeriesID) {\r\n if (allRecords[conversionSeriesID]) {\r\n if (!allRecords[conversionSeriesID][frequency]) {\r\n return put(recordsActions.frequency.initializeUnitsForFrequency(String(units[unit].conversionSeriesID), frequency));\r\n }\r\n return null;\r\n }\r\n return put(recordsActions.frequency.initializeUnitsForFrequency(String(units[unit].conversionSeriesID), frequency));\r\n }\r\n return null;\r\n }).filter((value) => value !== null));\r\n }\r\n }\r\n}\r\n\r\nexport function* fetchFrequencyData(action: ActionType) {\r\n const productID: number = yield select(getProductPageProductID);\r\n const frequency: PeriodFrequency = yield select(getProductPageFrequency);\r\n const currentDate = action.payload.from;\r\n const twoMonthsOlderDate = new Date(currentDate.getFullYear(), currentDate.getMonth() - 2);\r\n const selectedFromDate: number = getFrequencyTimestamp(twoMonthsOlderDate, frequency);\r\n const selectedToDate: number = getFrequencyTimestamp(action.payload.to, frequency);\r\n const areaID: number = yield select(getProductPageAreaID);\r\n const frequencyData = yield select(getFrequencyRecord, {productID, frequency});\r\n const oldestFrequencyDataDate: number = frequencyData[areaID].allRecords[0];\r\n const newestFrequencyDataDate: number = frequencyData[areaID].allRecords[frequencyData[areaID].allRecords.length - 1];\r\n if (oldestFrequencyDataDate > selectedFromDate || newestFrequencyDataDate < selectedToDate) {\r\n yield put(recordsActions.frequency.fetchFrequency(String(productID), {frequency, areaID}));\r\n }\r\n}\r\n\r\nfunction* productPageSagaWatcher() {\r\n yield all([\r\n takeLatest(getType(unitsActions.update), fetchConversionSeriesProductForUnitConversion),\r\n takeLatest(getType(productPageActions.setDisplayDateRange), fetchFrequencyData),\r\n ]);\r\n}\r\n\r\nexport default productPageSagaWatcher;\r\n","import axios from 'axios';\r\n\r\nexport const api = axios.create({\r\n baseURL: process.env.REACT_APP_API_URL,\r\n timeout: 20000,\r\n});\r\n\r\nexport const setAccessToken = (type: string, token: string) => {\r\n const authToken = `${type} ${token}`;\r\n api.defaults.headers.common.Authorization = authToken;\r\n orgApi.defaults.headers.common.Authorization = authToken;\r\n directApi.defaults.headers.common.Authorization = authToken;\r\n};\r\n\r\nexport const orgApi = axios.create({\r\n baseURL: `${process.env.REACT_APP_ADMIN_API_URL}/organization/`,\r\n timeout: 20000,\r\n});\r\n\r\nexport const directApi = axios.create({\r\n baseURL: `${process.env.REACT_APP_ADMIN_API_URL}/direct/`,\r\n timeout: 20000,\r\n});\r\n","import { all, call, put, takeLatest } from \"redux-saga/effects\";\r\nimport { getType } from \"typesafe-actions\";\r\nimport { authActions } from \"./actions\";\r\nimport userManager from \"./userManager\";\r\nimport { setAccessToken } from \"../../utils/api\";\r\nimport { AuthState } from \"./reducers\";\r\nimport { User } from \"oidc-client\";\r\n\r\nexport const getUser = async () => await userManager.getUser();\r\n\r\nexport function signInRequest() {\r\n userManager.signinRedirect();\r\n}\r\n\r\nexport function signOutRequest() {\r\n userManager.signoutRedirect();\r\n}\r\n\r\nexport function tokenExpired() {\r\n userManager.signinSilent();\r\n}\r\n\r\nexport function* updateToken() {\r\n const user: User | null = yield call(getUser);\r\n if (user) {\r\n yield setAccessToken(user.token_type, user.access_token);\r\n yield put(authActions.get.authState());\r\n yield put(authActions.set.expiresAt(user.expires_at));\r\n }\r\n}\r\n\r\nexport function* getAuthState() {\r\n const user: User | null = yield call(getUser);\r\n if (user) {\r\n if (\r\n (user.profile.role &&\r\n typeof user.profile.role === \"string\" &&\r\n user.profile.role === \"Administrator\") ||\r\n (Array.isArray(user.profile.role) &&\r\n user.profile.role.findIndex(\r\n (role: string) => role === \"Administrator\"\r\n ) !== -1)\r\n ) {\r\n yield put(authActions.set.authState(AuthState.administrator));\r\n } else if (\r\n (user.profile.role &&\r\n typeof user.profile.role === \"string\" &&\r\n user.profile.role === \"Moderator\") ||\r\n (Array.isArray(user.profile.role) &&\r\n user.profile.role.findIndex((role: string) => role === \"Moderator\") !==\r\n -1)\r\n ) {\r\n yield put(authActions.set.authState(AuthState.moderator));\r\n } else {\r\n yield put(authActions.set.authState(AuthState.member));\r\n }\r\n } else {\r\n authActions.set.authState(AuthState.guest);\r\n }\r\n}\r\n\r\nfunction* authSagaWatcher() {\r\n yield all([\r\n takeLatest(getType(authActions.signIn), signInRequest),\r\n takeLatest(getType(authActions.signOut), signOutRequest),\r\n takeLatest(getType(authActions.token.expired), tokenExpired),\r\n takeLatest(getType(authActions.token.update), updateToken),\r\n takeLatest(getType(authActions.get.authState), getAuthState),\r\n ]);\r\n}\r\n\r\nexport default authSagaWatcher;\r\n","import { getAuthState, getExpiresAt } from './selectors';\r\nimport store from '../store';\r\nimport { AuthState } from './reducers';\r\nimport userManager from './userManager';\r\nimport { call } from 'redux-saga/effects';\r\n\r\ntype HelperFunc = (action: A) => any;\r\n\r\nexport const authSaga = (saga: HelperFunc) => function* (action: Action) {\r\n const result = yield call(getAuthStatus);\r\n if (result === AuthState.administrator || result === AuthState.moderator || result === AuthState.member) {\r\n yield* saga(action);\r\n }\r\n};\r\n\r\nconst getAuthStatus = () => new Promise((resolve) => {\r\n const authState = getAuthState(store.getState());\r\n const expiresAtState = getExpiresAt(store.getState());\r\n const isExpired = expiresAtState ? expiresAtState < Math.floor(Date.now() / 1000) : true;\r\n if (((authState === AuthState.administrator || authState === AuthState.moderator || authState === AuthState.member) &&\r\n !isExpired) || authState === AuthState.guest) {\r\n resolve(authState);\r\n }\r\n\r\n const timeoutTimer = setTimeout(() => {\r\n unsubscribe();\r\n // store.dispatch(authActions.set.authState(AuthState.guest));\r\n // store.dispatch(authActions.set.expiresAt(null));\r\n resolve(AuthState.guest);\r\n }, 10000);\r\n\r\n if (authState === AuthState.expired || (isExpired && expiresAtState)) {\r\n userManager.signinSilent();\r\n }\r\n\r\n const unsubscribe = store.subscribe(() => {\r\n const subscribeState = getAuthState(store.getState());\r\n const subscribeExpiresAtState = getExpiresAt(store.getState());\r\n const isActive = subscribeExpiresAtState ? subscribeExpiresAtState > Math.floor(Date.now() / 1000) : false;\r\n\r\n if (((subscribeState === AuthState.administrator || subscribeState === AuthState.moderator || subscribeState === AuthState.member ) &&\r\n isActive) || subscribeState === AuthState.guest) {\r\n clearTimeout(timeoutTimer);\r\n resolve(subscribeState);\r\n }\r\n });\r\n});\r\n\r\nexport default getAuthStatus;\r\n","import { all, call, put, takeLatest } from 'redux-saga/effects';\r\nimport { ActionType, getType } from 'typesafe-actions';\r\nimport { adminActions } from '../actions';\r\nimport { OrganizationDto, OrganizationsDto } from '../../../types/dto/OrganizationsDto';\r\nimport { toast } from 'react-toastify';\r\nimport { adminPageActions } from '../../adminPage/actions';\r\nimport { authSaga } from '../../authentication/getAuthStatus';\r\nimport organizationAPI from '../../../services/organizationServices';\r\nimport { AxiosResponse } from 'axios';\r\n\r\nexport function* getOrganizations() {\r\n try {\r\n const organizations: AxiosResponse = yield call(organizationAPI.fetchOrganizations);\r\n yield put(adminActions.organization.addAll(organizations.data));\r\n if (organizations.data.length > 0) {\r\n yield put(adminPageActions.setOrganization(organizations.data[0].name))\r\n }\r\n } catch (error) {\r\n toast.error(error.message, {\r\n position: 'top-center',\r\n });\r\n }\r\n}\r\n\r\nexport function* deleteOrganization(action: ActionType) {\r\n try {\r\n yield call(organizationAPI.deleteOrganization, action.payload);\r\n yield put(adminActions.organization.remove(action.payload));\r\n yield put(adminActions.organizationReports.removeOrganization(action.payload));\r\n yield put(adminActions.organizationView.removeOrganization(action.payload));\r\n yield put(adminActions.calendars.removeOrganization(action.payload));\r\n yield put(adminActions.organizationUsers.removeOrganization(action.payload));\r\n yield put(adminActions.calendarReports.removeOrganization(action.payload));\r\n yield toast.success('Delete successful');\r\n } catch (error) {\r\n toast.error(error.message);\r\n }\r\n}\r\n\r\nexport function* createOrganization(action: ActionType) {\r\n try {\r\n const createdOrganization: AxiosResponse = yield call(organizationAPI.createOrganization, action.payload);\r\n yield put(adminActions.organization.add(createdOrganization.data));\r\n yield action.meta();\r\n yield toast.success('Organization successfully created');\r\n } catch (error) {\r\n if (error.response && error.response.status === 409 ||\r\n error.response && error.response.status === 400) {\r\n action.meta(error.response.data.Name[0]);\r\n } else {\r\n toast.error(error.message);\r\n }\r\n }\r\n}\r\n\r\nexport function* updateOrganizationName(action: ActionType) {\r\n try {\r\n yield call(organizationAPI.updateOrganization, action.payload, action.meta.name);\r\n yield put(adminActions.organization.update(action.payload, action.meta.name));\r\n yield action.meta.cb();\r\n } catch (e) {\r\n if (e.response && e.response.status === 409 ||\r\n e.response && e.response.status === 400) {\r\n action.meta.cb(e.response.data.Name[0]);\r\n } else {\r\n console.error(e.response);\r\n }\r\n }\r\n}\r\n\r\nexport function* organizationSagaWatcher() {\r\n yield all([\r\n takeLatest(getType(adminActions.organization.get), authSaga(getOrganizations)),\r\n takeLatest(getType(adminActions.organization.new), authSaga(createOrganization)),\r\n takeLatest(getType(adminActions.organization.edit), authSaga(updateOrganizationName)),\r\n takeLatest(getType(adminActions.organization.delete), authSaga(deleteOrganization)),\r\n ]);\r\n}\r\n\r\nexport default organizationSagaWatcher;\r\n","import { UserDto } from \"../../../../types/dto/UserDto\";\r\nimport { User } from \"../../../../types/User\";\r\n\r\nexport const mapUserDtoToUser = (dto: UserDto): User => ({ ...dto });\r\n\r\nconst mapUsersDtoToUsers = (data: Array): Array =>\r\n data.map(mapUserDtoToUser);\r\n\r\nexport default mapUsersDtoToUsers;\r\n","import { all, call, takeLatest, put } from \"redux-saga/effects\";\r\nimport { ActionType, getType } from \"typesafe-actions\";\r\nimport { adminActions } from \"../actions\";\r\nimport { UserDto } from \"../../../types/dto/UserDto\";\r\nimport mapUsersDtoToUsers, { mapUserDtoToUser } from \"./utils/mapUserDtoToUser\";\r\nimport { toast } from \"react-toastify\";\r\nimport { authSaga } from \"../../authentication/getAuthStatus\";\r\nimport organizationAPI from \"../../../services/organizationServices\";\r\nimport { AxiosResponse } from \"axios\";\r\nimport { User } from \"src/types/User\";\r\n\r\nexport function* getUsers() {\r\n try {\r\n const usersDto: AxiosResponse = yield call(\r\n organizationAPI.fetchUsers\r\n );\r\n const users: Array = yield call(mapUsersDtoToUsers, usersDto.data);\r\n yield put(adminActions.users.add(users));\r\n } catch (error) {\r\n toast.error(error.message, { position: \"top-center\" });\r\n }\r\n}\r\n\r\nexport function* deleteUser(\r\n action: ActionType\r\n) {\r\n try {\r\n yield call(organizationAPI.deleteUser, action.payload);\r\n yield put(adminActions.users.remove(action.payload));\r\n yield toast.success(\"Delete successful\");\r\n } catch (error) {\r\n toast.error(error.message);\r\n }\r\n}\r\n\r\nexport type UserData = {\r\n firstName: string;\r\n lastName: string;\r\n email: string;\r\n};\r\n\r\nexport function* createUser(action: ActionType) {\r\n try {\r\n const response: AxiosResponse = yield call(\r\n organizationAPI.createUser,\r\n action.payload\r\n );\r\n yield put(adminActions.users.addOne(mapUserDtoToUser(response.data)));\r\n yield put(\r\n adminActions.organizationUsers.getUsers(action.payload.organizationName)\r\n );\r\n action.meta();\r\n toast.success(\"User successfully created\");\r\n } catch (error) {\r\n if (\r\n (error.response && error.response.status === 409) ||\r\n (error.response && error.response.status === 400)\r\n ) {\r\n action.meta(error.response.data);\r\n } else {\r\n toast.error(error.message);\r\n }\r\n }\r\n}\r\n\r\nexport function* updateUser(\r\n action: ActionType\r\n) {\r\n try {\r\n // TODO: fix `user` type\r\n const user: AxiosResponse = yield call(\r\n organizationAPI.updateUser,\r\n action.meta.userId,\r\n action.payload\r\n );\r\n action.meta.cb();\r\n yield put(\r\n adminActions.users.edit(mapUserDtoToUser(user.data), action.meta.userId)\r\n );\r\n } catch (error) {\r\n if (\r\n (error.response && error.response.status === 409) ||\r\n (error.response && error.response.status === 400)\r\n ) {\r\n action.meta.cb(error.response.data);\r\n } else {\r\n toast.error(error.message);\r\n }\r\n }\r\n}\r\n\r\nexport function* usersSagaWatcher() {\r\n yield all([\r\n takeLatest(getType(adminActions.users.get), authSaga(getUsers)),\r\n takeLatest(getType(adminActions.users.delete), authSaga(deleteUser)),\r\n takeLatest(getType(adminActions.users.update), authSaga(updateUser)),\r\n takeLatest(getType(adminActions.users.new), authSaga(createUser)),\r\n ]);\r\n}\r\n\r\nexport default usersSagaWatcher;\r\n","import { all, call, put, takeLatest } from \"redux-saga/effects\";\r\nimport { ActionType, getType } from \"typesafe-actions\";\r\nimport { adminActions } from \"../actions\";\r\nimport { OrganizationReportDto } from \"../../../types/dto/OrganizationReportDto\";\r\nimport { toast } from \"react-toastify\";\r\nimport { authSaga } from \"../../authentication/getAuthStatus\";\r\nimport organizationAPI from \"../../../services/organizationServices\";\r\nimport { AxiosResponse } from \"axios\";\r\n\r\nexport function* getOrganizationReports(\r\n action: ActionType\r\n) {\r\n try {\r\n const organizationsReports: AxiosResponse = yield call(\r\n organizationAPI.fetchOrganizationReports,\r\n action.payload\r\n );\r\n yield put(\r\n adminActions.organizationReports.add(\r\n organizationsReports.data,\r\n action.payload\r\n )\r\n );\r\n } catch (error) {\r\n toast.error(error.message, { position: \"top-center\" });\r\n }\r\n}\r\n\r\nexport function* newOrganizationReport(\r\n action: ActionType\r\n) {\r\n try {\r\n yield call(\r\n organizationAPI.addOrganizationReport,\r\n action.payload.organizationName,\r\n action.payload.reportNameCode\r\n );\r\n yield put(\r\n adminActions.organizationReports.update(\r\n action.payload,\r\n action.payload.organizationName\r\n )\r\n );\r\n } catch (error) {\r\n toast.error(error.message);\r\n }\r\n yield action.meta.cb();\r\n}\r\n\r\nexport function* deleteOrganizationReport(\r\n action: ActionType\r\n) {\r\n try {\r\n yield call(\r\n organizationAPI.removeOrganizationReport,\r\n action.payload.organizationName,\r\n action.payload.reportName\r\n );\r\n yield put(\r\n adminActions.organizationReports.remove(\r\n action.payload.organizationName,\r\n action.payload.reportName\r\n )\r\n );\r\n } catch (error) {\r\n toast.error(error.message);\r\n }\r\n yield action.meta();\r\n}\r\n\r\nexport function* requestReportAccess(\r\n action: ActionType<\r\n typeof adminActions.organizationReports.requestReportAccess\r\n >\r\n) {\r\n try {\r\n yield call(\r\n organizationAPI.requestReportAccess,\r\n action.payload.organizationName,\r\n action.payload.reportName\r\n );\r\n yield toast.success(\"Access has been requested!\");\r\n } catch (error) {\r\n toast.error(error.message);\r\n }\r\n}\r\n\r\nfunction* organizationReportsSagaWatcher() {\r\n yield all([\r\n takeLatest(\r\n getType(adminActions.organizationReports.get),\r\n authSaga(getOrganizationReports)\r\n ),\r\n takeLatest(\r\n getType(adminActions.organizationReports.new),\r\n authSaga(newOrganizationReport)\r\n ),\r\n takeLatest(\r\n getType(adminActions.organizationReports.delete),\r\n authSaga(deleteOrganizationReport)\r\n ),\r\n takeLatest(\r\n getType(adminActions.organizationReports.requestReportAccess),\r\n authSaga(requestReportAccess)\r\n ),\r\n ]);\r\n}\r\n\r\nexport default organizationReportsSagaWatcher;\r\n","import { ReportDto } from '../../../../types/dto/ReportDto';\r\nimport { Report } from '../../../../types/Report';\r\n\r\nconst mapReportDtoToReport = (data: ReportDto[]): Report[] =>\r\n data.map(({ Name, NameTranslated, Code, RequestAccess }) => ({\r\n name: Name, nameTranslated: NameTranslated, code: Code || '', requestAccess: RequestAccess,\r\n })).sort((a, b) => {\r\n if (a.name.toLowerCase() < b.name.toLowerCase()) {\r\n return -1;\r\n }\r\n if ( a.name.toLowerCase() > b.name.toLowerCase()) {\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n\r\nexport default mapReportDtoToReport;\r\n","import Dexie from 'dexie';\r\nimport { View } from '../types/View';\r\nimport { Report } from '../types/Report';\r\n\r\nclass UdmDB extends Dexie {\r\n private views: Dexie.Table;\r\n private reports: Dexie.Table;\r\n\r\n constructor() {\r\n super('UdmDB');\r\n this.version(0.1).stores({\r\n views: 'name',\r\n reports: 'name',\r\n });\r\n\r\n this.views = this.table('views');\r\n this.reports = this.table('reports');\r\n }\r\n\r\n // Views CRUD\r\n public getAllViews = async () => await this.views.toArray();\r\n\r\n public clearAllViews = async () => await this.views.clear();\r\n\r\n public addAllViews = async (views: View[]) => await this.views.bulkPut(views);\r\n\r\n // Reports CRUD\r\n public getAllReports = async () => await this.reports.toArray();\r\n\r\n public clearAllReports = async () => await this.reports.clear();\r\n\r\n public addAllReports = async (reports: Report[]) => await this.reports.bulkPut(reports);\r\n}\r\n\r\nexport default new UdmDB();\r\n","import axios from 'axios';\r\nimport { PeriodFrequency } from '../types/PeriodFrequency';\r\n\r\nconst api = axios.create({\r\n baseURL: `${process.env.REACT_APP_ADMIN_API_URL}/direct/`,\r\n timeout: 20000,\r\n});\r\n\r\nconst directAPI = {\r\n fetchAllViews: () => api.get('view'),\r\n\r\n fetchReports: () => api.get('/report'),\r\n\r\n fetchLandingPageTreeMapData: () => api.get('/product/map'),\r\n\r\n fetchSeriesContext: (seriesId: string) => api.get(`/context/series/${seriesId}`),\r\n\r\n fetchTableContext: (tableId: number, frequency: PeriodFrequency) => api.get(`/context/table/${tableId}/${frequency}`),\r\n};\r\n\r\nexport default directAPI;\r\n","import { all, call, put, takeLatest, delay } from 'redux-saga/effects';\r\nimport { getType } from 'typesafe-actions';\r\nimport { adminActions } from '../actions';\r\nimport mapReportDtoToReport from './utils/mapReportDtoToReport';\r\nimport { toast } from 'react-toastify';\r\nimport { authSaga } from '../../authentication/getAuthStatus';\r\nimport UdmDB from '../../../utils/db';\r\nimport directAPI from '../../../services/directServices';\r\nimport { AxiosResponse } from 'axios';\r\nimport { ReportDto } from '../../../types/dto/ReportDto';\r\n\r\nlet getReportsFirstError = true;\r\nlet cachedData = false;\r\n\r\nexport function* getReports() {\r\n try {\r\n const cache = yield call(UdmDB.getAllReports);\r\n if (cache.length !== 0) {\r\n cachedData = true;\r\n }\r\n yield put(adminActions.report.add(cache));\r\n\r\n const reports: AxiosResponse = yield call(directAPI.fetchReports);\r\n const mappedReports = yield mapReportDtoToReport(reports.data);\r\n yield call(UdmDB.clearAllReports);\r\n yield call(UdmDB.addAllReports, mappedReports);\r\n getReportsFirstError = true;\r\n\r\n // find duplicates in array...\r\n // const uniq = mappedReports\r\n // .map((c: any) => ({count: 1, name: c.name}))\r\n // .reduce((a: any, b: any) => {\r\n // a[b.name] = (a[b.name] || 0) + b.count;\r\n // return a\r\n // }, {});\r\n //\r\n // console.log('d', Object.keys(uniq).filter((a) => uniq[a] > 1));\r\n yield put(adminActions.report.add(mappedReports));\r\n } catch (error) {\r\n const timeoutError = error.message.split(' ')[0] === 'timeout';\r\n if (timeoutError && getReportsFirstError) {\r\n getReportsFirstError = false;\r\n yield delay(40000);\r\n yield put(adminActions.report.get());\r\n } else if (!cachedData || !timeoutError) {\r\n toast.error(error.message, {\r\n position: 'top-center',\r\n });\r\n }\r\n }\r\n}\r\n\r\nfunction* reportSagaWatcher() {\r\n yield all([\r\n takeLatest(getType(adminActions.report.get), authSaga(getReports)),\r\n ]);\r\n}\r\n\r\nexport default reportSagaWatcher;\r\n","import { ViewDto } from '../../../../types/dto/ViewDto';\r\nimport { View } from '../../../../types/View';\r\n\r\nexport const mapViewDtoToView = (views: ViewDto[]): View[] => views.map(({Name, DisplayName, DateCreated, RequestAccess}) =>\r\n ({ name: Name, displayName: DisplayName, dateCreated: new Date(DateCreated).getTime(), requestAccess: RequestAccess }));\r\n","import { all, call, put, takeLatest, delay } from 'redux-saga/effects';\r\nimport { getType } from 'typesafe-actions';\r\nimport { adminActions } from '../actions';\r\nimport { toast } from 'react-toastify';\r\nimport { authSaga } from '../../authentication/getAuthStatus';\r\nimport UdmDB from 'src/utils/db';\r\nimport directAPI from '../../../services/directServices';\r\nimport { AxiosResponse } from 'axios';\r\nimport { ViewDto } from '../../../types/dto/ViewDto';\r\nimport { mapViewDtoToView } from './utils/mapViewDtoToView';\r\n\r\nlet getViewsFirstError = true;\r\nlet cachedData = false;\r\n\r\nexport function* getAllViews() {\r\n try {\r\n const cache = yield call(UdmDB.getAllViews);\r\n if (cache.length !== 0) {\r\n cachedData = true;\r\n }\r\n yield put(adminActions.view.add(cache));\r\n\r\n const viewsDto: AxiosResponse = yield call(directAPI.fetchAllViews);\r\n const views = yield call(mapViewDtoToView, viewsDto.data);\r\n yield call(UdmDB.clearAllViews);\r\n yield call(UdmDB.addAllViews, views);\r\n getViewsFirstError = true;\r\n yield put(adminActions.view.add(views));\r\n } catch (error) {\r\n const timeoutError = error.message.split(' ')[0] === 'timeout';\r\n if (timeoutError && getViewsFirstError) {\r\n getViewsFirstError = false;\r\n yield delay(40000);\r\n yield put(adminActions.view.get())\r\n } else if (!cachedData || !timeoutError) {\r\n toast.error(error.message, {\r\n position: 'top-center',\r\n });\r\n }\r\n }\r\n}\r\n\r\nexport function* viewSagaWatcher() {\r\n yield all([\r\n takeLatest(getType(adminActions.view.get), authSaga(getAllViews)),\r\n ]);\r\n}\r\n\r\nexport default viewSagaWatcher;\r\n","import { all, call, put, takeLatest } from \"redux-saga/effects\";\r\nimport { adminActions } from \"../actions\";\r\nimport { ActionType, getType } from \"typesafe-actions\";\r\nimport { toast } from \"react-toastify\";\r\nimport { authSaga } from \"../../authentication/getAuthStatus\";\r\nimport organizationAPI from \"../../../services/organizationServices\";\r\nimport { AxiosResponse } from \"axios\";\r\nimport { OrganizationView } from \"../../../types/OrganizationView\";\r\n\r\nexport function* getOrganizationViews(\r\n action: ActionType\r\n) {\r\n try {\r\n const organizationViews: AxiosResponse = yield call(\r\n organizationAPI.fetchOrganizationViews,\r\n action.payload\r\n );\r\n yield put(\r\n adminActions.organizationView.addAll({\r\n organizationName: action.payload,\r\n view: organizationViews.data,\r\n })\r\n );\r\n } catch (error) {\r\n toast.error(error.message);\r\n }\r\n}\r\n\r\nexport function* addOrganizationView(\r\n action: ActionType\r\n) {\r\n try {\r\n yield put(\r\n adminActions.organizationView.add({\r\n organizationName: action.payload.organizationName,\r\n view: action.payload.view,\r\n })\r\n );\r\n yield call(\r\n organizationAPI.addOrganizationView,\r\n action.payload.organizationName,\r\n action.payload.view.name\r\n );\r\n } catch (error) {\r\n yield put(\r\n adminActions.organizationView.remove({\r\n organizationName: action.payload.organizationName,\r\n view: action.payload.view,\r\n })\r\n );\r\n toast.error(error.message);\r\n }\r\n}\r\n\r\nexport function* removeOrganizationView(\r\n action: ActionType\r\n) {\r\n try {\r\n yield put(\r\n adminActions.organizationView.remove({\r\n organizationName: action.payload.organizationName,\r\n view: action.payload.view,\r\n })\r\n );\r\n yield call(\r\n organizationAPI.removeOrganizationView,\r\n action.payload.organizationName,\r\n action.payload.view.name\r\n );\r\n } catch (error) {\r\n yield put(\r\n adminActions.organizationView.add({\r\n organizationName: action.payload.organizationName,\r\n view: action.payload.view,\r\n })\r\n );\r\n toast.error(error.message);\r\n }\r\n}\r\n\r\nexport function* addAllViewsToOrganization(\r\n action: ActionType\r\n) {\r\n yield call(organizationAPI.addAllViews, action.payload);\r\n yield put(adminActions.organizationView.saveAllViews(action.payload));\r\n}\r\n\r\nexport function* requestViewAccess(\r\n action: ActionType\r\n) {\r\n try {\r\n yield call(\r\n organizationAPI.requestViewAccess,\r\n action.payload.organizationName,\r\n action.payload.view.name\r\n );\r\n yield toast.success(\"Access has been requested!\");\r\n } catch (error) {\r\n toast.error(error.message);\r\n }\r\n}\r\n\r\nexport function* organizationViewSagaWatcher() {\r\n yield all([\r\n takeLatest(\r\n getType(adminActions.organizationView.get),\r\n authSaga(getOrganizationViews)\r\n ),\r\n takeLatest(\r\n getType(adminActions.organizationView.new),\r\n authSaga(addOrganizationView)\r\n ),\r\n takeLatest(\r\n getType(adminActions.organizationView.delete),\r\n authSaga(removeOrganizationView)\r\n ),\r\n takeLatest(\r\n getType(adminActions.organizationView.addAllViews),\r\n authSaga(addAllViewsToOrganization)\r\n ),\r\n takeLatest(\r\n getType(adminActions.organizationView.requestViewAccess),\r\n authSaga(requestViewAccess)\r\n ),\r\n ]);\r\n}\r\n","import { all, call, put, takeLatest } from 'redux-saga/effects';\r\nimport { ActionType, getType } from 'typesafe-actions';\r\nimport { adminActions } from '../actions';\r\nimport { toast } from 'react-toastify';\r\nimport { CalendarReportDto } from '../../../types/dto/CalendarReportDto';\r\nimport { authSaga } from '../../authentication/getAuthStatus';\r\nimport organizationAPI from '../../../services/organizationServices';\r\nimport { AxiosResponse } from 'axios';\r\n\r\nfunction* getCalendarReports(action: ActionType) {\r\n try {\r\n const calendarReports: AxiosResponse =\r\n yield call(organizationAPI.getCalendarReports, action.payload.organization, action.payload.calendarName);\r\n yield put(adminActions.calendarReports.addAll(action.payload, calendarReports.data));\r\n } catch (error) {\r\n toast.error(error.message, {\r\n position: 'top-center',\r\n });\r\n }\r\n}\r\n\r\nfunction* createCalendarReport(action: ActionType) {\r\n try {\r\n yield call(organizationAPI.addCalendarReport, action.payload.organization, action.payload.calendarName, action.meta);\r\n yield put(adminActions.calendarReports.add(action.payload, action.meta));\r\n } catch (error) {\r\n toast.error(error.message);\r\n }\r\n}\r\n\r\nfunction* deleteCalendarReport(action: ActionType) {\r\n try {\r\n yield call(organizationAPI.deleteCalendarReport, action.payload.organization, action.payload.calendarName, action.meta);\r\n yield put(adminActions.calendarReports.remove(action.payload, action.meta));\r\n } catch (error) {\r\n toast.error(error.message);\r\n }\r\n}\r\n\r\nfunction* calendarReportsSagaWatcher() {\r\n yield all([\r\n takeLatest(getType(adminActions.calendarReports.get), authSaga(getCalendarReports)),\r\n takeLatest(getType(adminActions.calendarReports.new), authSaga(createCalendarReport)),\r\n takeLatest(getType(adminActions.calendarReports.delete), authSaga(deleteCalendarReport)),\r\n ]);\r\n}\r\n\r\nexport default calendarReportsSagaWatcher;\r\n","import Axios from \"axios\";\r\nimport {\r\n Announcement,\r\n AnnouncementPayload,\r\n} from \"src/scenes/EducationsAndAnnouncements/utils/announcements.types\";\r\nimport {\r\n CreateEducationalVideoPayload,\r\n EducationalVideo,\r\n} from \"src/scenes/EducationsAndAnnouncements/utils/educationalVideos.types\";\r\n\r\nconst api = Axios.create({\r\n baseURL: `${process.env.REACT_APP_ADMIN_API_URL}/admin/`,\r\n timeout: 20000,\r\n});\r\n\r\nconst adminAPI = {\r\n fetchSubscriptions: () =>\r\n api.get(\"/notification/view/subscription\", { params: { active: true } }),\r\n fetchAllViews: () => api.get(\"/notification/view\"),\r\n subscribeToView: (viewName: string) =>\r\n api.post(\"/notification/view/subscription\", { viewName }),\r\n unsubscribeToView: (viewName: string) =>\r\n api.delete(`/notification/view/subscription/${viewName}`),\r\n // Announcements\r\n fetchAnnouncements: async () => await api.get(\"/education/announcement/web\"),\r\n createAnnouncement: async (payload: Partial) =>\r\n await api.post(\"/education/announcement\", payload),\r\n deleteAnnouncement: async (announcement: Announcement) =>\r\n await api.delete(`/education/announcement/${announcement.id}`),\r\n editAnnouncement: async (params: {\r\n id: number;\r\n payload: Partial;\r\n }) => await api.put(`/education/announcement/${params.id}`, params.payload),\r\n // Educational Videos\r\n fetchEducationalVideos: async () => await api.get(\"/education/video\"),\r\n createEducationalVideo: async (params: {\r\n fileName: string;\r\n payload: CreateEducationalVideoPayload;\r\n }) =>\r\n await api.post(\r\n `/education/video/upload/${params.fileName}/uri`,\r\n params.payload\r\n ),\r\n completeUploadEducationalVideo: async (id: string) =>\r\n await api.put(`/education/video/${id}/upload/complete`),\r\n createEducationalVideoThumbnail: async (params: {\r\n videoId: string;\r\n fileName: string;\r\n }) =>\r\n await api.post(\r\n `/education/video/${params.videoId}/thumbnail/upload/${params.fileName}/uri`\r\n ),\r\n completeUploadEducationalVideoThumbnail: async (id: string) =>\r\n await api.put(`/education/video/thumbnail/${id}/upload/complete`),\r\n deleteEducationalVideo: async (video: EducationalVideo) =>\r\n await api.delete(`/education/video/${video.id}`),\r\n editEducationalVideo: async (payload: EducationalVideo) =>\r\n await api.put(\"/education/video\", payload),\r\n getEducationVideoThumbnail: async (videoId: string) =>\r\n await api.get(`/education/video/${videoId}/thumbnail`),\r\n deleteEducationVideoThumbnail: async (guid: string) =>\r\n await api.delete(`/education/video/thumbnail/${guid}`),\r\n};\r\n\r\nexport default adminAPI;\r\n","import { AxiosResponse } from \"axios\";\r\nimport { toast } from \"react-toastify\";\r\nimport { all, call, put, takeLatest } from \"redux-saga/effects\";\r\nimport adminAPI from \"src/services/adminServices\";\r\nimport { Subscription } from \"src/types/Subscription\";\r\nimport { adminActions } from \"../actions\";\r\nimport { ActionType, getType } from \"typesafe-actions\";\r\nimport { authSaga } from \"src/ducks/authentication/getAuthStatus\";\r\n\r\nexport function* getViews() {\r\n try {\r\n const views: AxiosResponse> = yield call(\r\n adminAPI.fetchAllViews\r\n );\r\n yield put(adminActions.subscriptionsAndViews.populateViews(views.data));\r\n } catch (error) {\r\n toast.error(`${error.message}: Failed to fetch views.`);\r\n }\r\n}\r\n\r\nexport function* getSubscriptions() {\r\n try {\r\n const subscriptions: AxiosResponse> = yield call(\r\n adminAPI.fetchSubscriptions\r\n );\r\n yield put(\r\n adminActions.subscriptionsAndViews.populateSubs(subscriptions.data)\r\n );\r\n } catch (error) {\r\n toast.error(`${error.message}: Failed to fetch subscriptions.`);\r\n }\r\n}\r\n\r\nexport function* subscribeToView(\r\n action: ActionType\r\n) {\r\n const viewName = action.payload.viewName;\r\n try {\r\n const newSub: AxiosResponse = yield call(\r\n adminAPI.subscribeToView,\r\n viewName\r\n );\r\n yield put(adminActions.subscriptionsAndViews.addSub(newSub.data));\r\n } catch (error) {\r\n yield put(adminActions.subscriptionsAndViews.removeSub(viewName));\r\n toast.error(error.message);\r\n }\r\n}\r\n\r\nexport function* unsubscribeToView(\r\n action: ActionType\r\n) {\r\n try {\r\n yield put(\r\n adminActions.subscriptionsAndViews.removeSub(action.payload.viewName)\r\n );\r\n yield call(adminAPI.unsubscribeToView, action.payload.viewName);\r\n } catch (error) {\r\n yield put(adminActions.subscriptionsAndViews.addSub(action.payload));\r\n toast.error(error.message);\r\n }\r\n}\r\n\r\nexport function* subscriptionSagaWatcher() {\r\n yield all([\r\n takeLatest(\r\n getType(adminActions.subscriptionsAndViews.getSubs),\r\n authSaga(getSubscriptions)\r\n ),\r\n takeLatest(\r\n getType(adminActions.subscriptionsAndViews.subscribe),\r\n authSaga(subscribeToView)\r\n ),\r\n takeLatest(\r\n getType(adminActions.subscriptionsAndViews.unsubscribe),\r\n authSaga(unsubscribeToView)\r\n ),\r\n takeLatest(\r\n getType(adminActions.subscriptionsAndViews.getViews),\r\n authSaga(getViews)\r\n ),\r\n ]);\r\n}\r\n\r\nexport default subscriptionSagaWatcher;\r\n","import { all } from \"redux-saga/effects\";\r\nimport organizationSagaWatcher from \"./organization/sagas\";\r\nimport usersSagaWatcher from \"./users/sagas\";\r\nimport organizationReportsSagaWatcher from \"./organizationReports/sagas\";\r\nimport reportSagaWatcher from \"./report/sagas\";\r\nimport viewSagaWatcher from \"./view/sagas\";\r\nimport { organizationViewSagaWatcher } from \"./organizationViews/sagas\";\r\nimport calendarReportsSagaWatcher from \"./calendarReports/sagas\";\r\nimport subscriptionSagaWatcher from \"./subscriptions/sagas\";\r\n\r\nexport default function* adminRootSaga() {\r\n yield all([\r\n organizationSagaWatcher(),\r\n usersSagaWatcher(),\r\n organizationReportsSagaWatcher(),\r\n reportSagaWatcher(),\r\n viewSagaWatcher(),\r\n organizationViewSagaWatcher(),\r\n calendarReportsSagaWatcher(),\r\n subscriptionSagaWatcher(),\r\n ]);\r\n}\r\n","import { ActionType, createStandardAction } from 'typesafe-actions';\r\nimport { TreeMapData } from '../../types/TreeMapData';\r\n\r\nexport const landingPageActions = {\r\n getTreeMapData: createStandardAction('@landingPage_treeMap/GET')(),\r\n addTreeMapData: createStandardAction('@landingPage_treeMap/ADD')(),\r\n};\r\n\r\nexport type LandingPageActions = ActionType;\r\n","import { Area as AreaDto, TreeMapDataDto } from '../../../types/dto/TreeMapDataDto';\r\nimport { Area, Product, TreeMapData } from '../../../types/TreeMapData';\r\n\r\nconst mapTreeMapDataDtoToTreeMapData = (data: TreeMapDataDto[]): TreeMapData => {\r\n const products: Product[] = data.map((productDto): Product => ({\r\n codeName: productDto.Name.replace(/[^a-zA-Z0-9]/g, ''),\r\n name: productDto.Name.slice(42),\r\n size: Number(String(productDto.Areas.reduce((value, area) => area.Value + value, 0)).slice(0, 3)),\r\n areas: productDto.Areas.map((area: AreaDto): Area => ({\r\n id: area.Name, value: area.Value, year: area.Year,\r\n yoYChangePct: Number((area.YoYChangePercentage * 100).toFixed(2)),\r\n })),\r\n }));\r\n return {name: 'data', products};\r\n};\r\n\r\nexport default mapTreeMapDataDtoToTreeMapData;\r\n","import { all, call, put, takeLatest } from 'redux-saga/effects';\r\nimport { getType } from 'typesafe-actions';\r\nimport { landingPageActions } from './actions';\r\nimport { TreeMapDataDto } from '../../types/dto/TreeMapDataDto';\r\nimport mapTreeMapDataDtoToTreeMapData from './utils/mapTreeMapDataDtoToTreeMapData';\r\nimport directAPI from '../../services/directServices';\r\nimport { AxiosResponse } from 'axios';\r\n\r\nexport function* initializeTreeMapData() {\r\n try {\r\n const treeMapDataDto: AxiosResponse = yield call(directAPI.fetchLandingPageTreeMapData);\r\n const treeMapData = yield mapTreeMapDataDtoToTreeMapData(treeMapDataDto.data);\r\n yield put(landingPageActions.addTreeMapData(treeMapData));\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n}\r\n\r\nexport default function* landingPageSagaWatcher() {\r\n yield all([\r\n takeLatest(getType(landingPageActions.getTreeMapData), initializeTreeMapData),\r\n ]);\r\n}\r\n","import { all, call, put, takeLatest } from 'redux-saga/effects';\r\nimport { adminActions } from '../actions';\r\nimport { ActionType, getType } from 'typesafe-actions';\r\nimport { CalendarDto } from 'src/types/dto/CalendarDto';\r\nimport { toast } from 'react-toastify';\r\nimport organizationAPI from '../../../services/organizationServices';\r\nimport { AxiosResponse } from 'axios';\r\n\r\nfunction* getCalendars(action: ActionType) {\r\n try {\r\n const calendars: AxiosResponse = yield call(organizationAPI.fetchCalendars, action.payload);\r\n yield put(adminActions.calendars.addAll(action.payload, calendars.data));\r\n } catch (error) {\r\n toast.error(error.message, {\r\n position: 'top-center',\r\n });\r\n }\r\n}\r\n\r\nfunction* createCalendar(action: ActionType) {\r\n try {\r\n const createdCalendar: AxiosResponse\r\n = yield call(organizationAPI.createCalendar, action.payload.organizationName, action.payload.name);\r\n yield put(adminActions.calendars.add(action.payload.organizationName, createdCalendar.data));\r\n yield action.meta();\r\n yield toast.success('Calendar successful created');\r\n } catch (error) {\r\n if (error.response && error.response.status === 409 ||\r\n error.response && error.response.status === 400) {\r\n action.meta(error.response.data.Name[0]);\r\n } else {\r\n toast.error(error.message);\r\n }\r\n }\r\n}\r\n\r\nfunction* deleteCalendar(action: ActionType) {\r\n try {\r\n yield call(organizationAPI.deleteCalendar, action.payload, action.meta);\r\n yield put(adminActions.calendars.remove(action.payload, action.meta));\r\n yield put(adminActions.calendarReports.removeCalendar(action.payload, action.meta));\r\n yield toast.success('Delete successful');\r\n } catch (error) {\r\n toast.error(error.message);\r\n }\r\n}\r\n\r\nfunction* updateCalendar(action: ActionType) {\r\n try {\r\n yield call(organizationAPI.updateCalendar, action.payload.organizationName, action.payload.name, action.meta.name);\r\n yield put(adminActions.calendars.update(action.payload, action.meta.name));\r\n yield action.meta.cb();\r\n } catch (error) {\r\n if (error.response && error.response.status === 409 ||\r\n error.response && error.response.status === 400) {\r\n if (error.response.data.Name) {\r\n action.meta.cb(error.response.data.Name[0]);\r\n } else if (error.response.data.calendarName) {\r\n action.meta.cb(error.response.data.calendarName[0]);\r\n }\r\n } else {\r\n toast.error(error.message);\r\n }\r\n }\r\n}\r\n\r\nfunction* calendarsSagaWatcher() {\r\n yield all([\r\n takeLatest(getType(adminActions.calendars.get), getCalendars),\r\n takeLatest(getType(adminActions.calendars.new), createCalendar),\r\n takeLatest(getType(adminActions.calendars.delete), deleteCalendar),\r\n takeLatest(getType(adminActions.calendars.edit), updateCalendar),\r\n ]);\r\n}\r\n\r\nexport default calendarsSagaWatcher;\r\n","import { ActionType, getType } from \"typesafe-actions\";\r\nimport { adminActions } from \"../actions\";\r\nimport { all, call, put, takeLatest } from \"redux-saga/effects\";\r\nimport { toast } from \"react-toastify\";\r\nimport organizationAPI from \"../../../services/organizationServices\";\r\nimport { AxiosResponse } from \"axios\";\r\nimport { OrganizationUserDto } from \"../../../types/dto/OrganizationUserDto\";\r\n\r\nexport function* getOrganizationUsers(\r\n action: ActionType\r\n) {\r\n try {\r\n const users: AxiosResponse = yield call(\r\n organizationAPI.fetchOrganizationUsers,\r\n action.payload\r\n );\r\n yield put(\r\n adminActions.organizationUsers.saveUsers({\r\n organizationName: action.payload,\r\n users: users.data,\r\n })\r\n );\r\n } catch (error) {\r\n toast.error(error.message, { position: \"top-center\" });\r\n }\r\n}\r\n\r\nexport function* addOrganizationUser(\r\n action: ActionType\r\n) {\r\n try {\r\n const { organizationName, user } = action.payload;\r\n yield call(\r\n organizationAPI.addOrganizationUser,\r\n organizationName,\r\n user.userName\r\n );\r\n yield put(\r\n adminActions.organizationUsers.saveUser({ organizationName, user })\r\n );\r\n } catch (error) {\r\n toast.error(error.message, { position: \"top-right\" });\r\n }\r\n}\r\n\r\nexport function* deleteOrganizationUser(\r\n action: ActionType\r\n) {\r\n try {\r\n const { organizationName, userName } = action.payload;\r\n yield call(\r\n organizationAPI.deleteOrganizationUser,\r\n organizationName,\r\n userName\r\n );\r\n yield put(\r\n adminActions.organizationUsers.deleteUser({ organizationName, userName })\r\n );\r\n } catch (error) {\r\n toast.error(error.message, { position: \"top-right\" });\r\n }\r\n}\r\n\r\nexport function* addUserRole(\r\n action: ActionType\r\n) {\r\n try {\r\n const { organizationName, userName, role } = action.payload;\r\n yield call(organizationAPI.addUserRole, organizationName, userName, role);\r\n yield put(\r\n adminActions.organizationUsers.addAdminUserRole({\r\n organizationName,\r\n userName,\r\n role,\r\n })\r\n );\r\n yield put(\r\n adminActions.organizationUsers.getUsers(action.payload.organizationName)\r\n );\r\n } catch (error) {\r\n toast.error(error.message, { position: \"top-right\" });\r\n }\r\n}\r\n\r\nexport function* removeUserRole(\r\n action: ActionType\r\n) {\r\n try {\r\n const { organizationName, userName, role } = action.payload;\r\n yield call(\r\n organizationAPI.removeUserRole,\r\n organizationName,\r\n userName,\r\n role\r\n );\r\n yield put(\r\n adminActions.organizationUsers.removeAdminUserRole({\r\n organizationName,\r\n userName,\r\n })\r\n );\r\n yield put(\r\n adminActions.organizationUsers.getUsers(action.payload.organizationName)\r\n );\r\n } catch (error) {\r\n toast.error(error.message, { position: \"top-right\" });\r\n }\r\n}\r\n\r\nexport function* addAdminUser(\r\n action: ActionType\r\n) {\r\n try {\r\n const { organizationName, user } = action.payload;\r\n yield call(\r\n organizationAPI.addOrganizationUser,\r\n organizationName,\r\n user.userName\r\n );\r\n yield call(\r\n organizationAPI.addUserRole,\r\n organizationName,\r\n user.userName,\r\n \"admin\"\r\n );\r\n yield put(adminActions.organizationUsers.saveUser(action.payload));\r\n yield put(adminActions.organizationUsers.getUsers(organizationName));\r\n } catch (error) {\r\n toast.error(error.message, { position: \"top-right\" });\r\n }\r\n}\r\n\r\nexport function* organizationUsersSagaWatcher() {\r\n yield all([\r\n takeLatest(\r\n getType(adminActions.organizationUsers.getUsers),\r\n getOrganizationUsers\r\n ),\r\n takeLatest(\r\n getType(adminActions.organizationUsers.addUser),\r\n addOrganizationUser\r\n ),\r\n takeLatest(\r\n getType(adminActions.organizationUsers.removeUser),\r\n deleteOrganizationUser\r\n ),\r\n takeLatest(\r\n getType(adminActions.organizationUsers.addUserRole),\r\n addUserRole\r\n ),\r\n takeLatest(\r\n getType(adminActions.organizationUsers.removeUserRole),\r\n removeUserRole\r\n ),\r\n takeLatest(\r\n getType(adminActions.organizationUsers.addAdminUser),\r\n addAdminUser\r\n ),\r\n ]);\r\n}\r\n\r\nexport default organizationUsersSagaWatcher;\r\n","import { SeriesContextDto } from '../../../types/dto/SeriesContextDto';\r\nimport { SeriesContext } from 'src/types/SeriesContext';\r\n\r\n/* Key: Python format\r\n * Value: Javascript format\r\n * Source: https://gist.github.com/jamesguan/5d54454c1a88f63c30cf3c5fb4d0fc20\r\n */\r\nconst pyToJSDateFormats = Object.freeze({\r\n '%A': 'dddd', // Weekday as locale’s full name: (In English: Sunday, .., Saturday)(Auf Deutsch: Sonntag, .., Samstag)\r\n '%a': 'ddd', // Weekday abbreivated: (In English: Sun, .., Sat)(Auf Deutsch: So, .., Sa)\r\n '%B': 'MMMM', // Month name: (In English: January, .., December)(Auf Deutsch: Januar, .., Dezember)\r\n '%b': 'MMM', // Month name abbreviated: (In English: Jan, .., Dec)(Auf Deutsch: Jan, .., Dez)\r\n '%c': 'ddd MMM DD HH:mm:ss YYYY',\r\n // Locale’s appropriate date and time representation: (English: Sun Oct 13 23:30:00 1996)(Deutsch: So 13 Oct 22:30:00 1996)\r\n '%d': 'DD', // Day 0 padded: (01, .., 31)\r\n '%f': 'SSS', // Microseconds 0 padded: (000000, .., 999999)\r\n '%H': 'HH', // Hour (24-Hour) 0 padded: (00, .., 23)\r\n '%I': 'hh', // Hour (12-Hour) 0 padded: (01, .., 12)\r\n '%j': 'DDDD', // Day of Year 0 padded: (001, .., 366)\r\n '%M': 'mm', // Minute 0 padded: (01, .. 59)\r\n '%m': 'MM', // Month 0 padded: (01, .., 12)\r\n '%p': 'A', // Locale equivalent of AM/PM: (EN: AM, PM)(DE: am, pm)\r\n '%S': 'ss', // Second 0 padded: (00, .., 59)\r\n '%U': 'ww',\r\n // Week # of Year (Sunday): (00, .., 53) All days in a new year preceding the first Sunday are considered to be in week 0.\r\n '%W': 'ww',\r\n // Week # of Year (Monday): (00, .., 53) All days in a new year preceding the first Monday are considered to be in week 0.\r\n '%w': 'd', // Weekday as #: (0, 6)\r\n '%X': 'HH:mm:ss', // Locale's appropriate time representation: (EN: 23:30:00)(DE: 23:30:00)\r\n '%x': 'MM/DD/YYYY', // Locale's appropriate date representation: (None: 02/14/16)(EN: 02/14/16)(DE: 14.02.16)\r\n '%Y': 'YYYY', // Year as #: (1970, 2000, 2038, 292,277,026,596)\r\n '%y': 'YY', // Year without century 0 padded: (00, .., 99)\r\n '%Z': 'z', // Time zone name: ((empty), UTC, EST, CST) (empty string if the object is naive).\r\n '%z': 'ZZ',\r\n // UTC offset in the form +HHMM or -HHMM: ((empty), +0000, -0400, +1030) Empty string if the the object is naive.\r\n '%%': '%', // A literal '%' character: (%)\r\n});\r\n\r\nconst keys = Object.keys(pyToJSDateFormats);\r\n\r\n/*\r\n * Description: Convert a python format string to javascript format string\r\n * Example: \"%m/%d/%Y\" to \"MM/DD/YYYY\"\r\n * @param: formatStr is the python format string\r\n * @return: the javascript format string\r\n */\r\nconst convertPYDateFormatToJS = (formatStr: string) => {\r\n keys.forEach((key) => {\r\n formatStr = formatStr.split(key).join(pyToJSDateFormats[key]);\r\n });\r\n return formatStr;\r\n};\r\n\r\nconst mapSeriesContextDtoToSeriesContext = (data: SeriesContextDto[]): SeriesContext[] => data.map(({\r\n Type, Id, Name, HeaderText, DateFormat, IncludeYTDSum, IncludeYTDAvg, ColumnHeaderText, NameTranslated,\r\n}) => ({\r\ntype: { id: Type.Id, name: Type.Name, nameTranslated: Type.NameTranslated },\r\n id: Id,\r\n name: Name,\r\n nameTranslated: NameTranslated,\r\n headerText: HeaderText,\r\n dateFormat: convertPYDateFormatToJS(DateFormat),\r\n includeYTDSum: IncludeYTDSum,\r\n includeYTDAvg: IncludeYTDAvg,\r\n columnHeaderText: ColumnHeaderText || '',\r\n}));\r\n\r\nexport default mapSeriesContextDtoToSeriesContext;\r\n","import { TableContext } from '../../../types/TableContext';\r\nimport { TableContextDto } from '../../../types/dto/TableContextDto';\r\nimport { getFrequencyTimestamp, getTimeIndexFromTimestamp, getYearFromTimestamp } from '../../records/frequency/utils/timeFunctions';\r\n\r\nconst mapContextTableDtoToContextTable = (data: TableContextDto[]): TableContext[] => data.map(({\r\n Name, Order, Series, Area, Indent, Bold, Footnote, Values, ReportPeriod,\r\n}) => {\r\n const values = {};\r\n const valueTimestamps: number[] = [];\r\n Values.forEach(({ Value, ReportPeriod: ValuesReportPeriod }) => {\r\n const date = new Date(ValuesReportPeriod);\r\n const timestamp = getFrequencyTimestamp(date, 'Monthly');\r\n values[timestamp] = {\r\n value: Value,\r\n index: getTimeIndexFromTimestamp(timestamp),\r\n year: getYearFromTimestamp(timestamp),\r\n date, timestamp,\r\n };\r\n valueTimestamps.push(timestamp);\r\n });\r\n return {\r\n name: Name,\r\n order: Order,\r\n series: Series ? {\r\n id: Series.Id,\r\n name: Series.Name,\r\n nameTranslated: Series.NameTranslated,\r\n principalAreaId: Series.PrincipalAreaId,\r\n scale: Series.Scale,\r\n } : null,\r\n area: Area ? { id: Area.Id, name: Area.Name, principal: Area.Principal } : null,\r\n indent: Indent,\r\n bold: Bold,\r\n footnote: Footnote,\r\n unitID: Series && Series.Unit ? Series.Unit.Id : null,\r\n reportPeriod: new Date(ReportPeriod),\r\n reportPeriodTimestamp: getFrequencyTimestamp(new Date(ReportPeriod), 'Monthly'),\r\n values, valueTimestamps,\r\n }\r\n});\r\n\r\nexport default mapContextTableDtoToContextTable;\r\n","import { all, call, takeLatest, put } from 'redux-saga/effects';\r\nimport { ActionType, getType } from 'typesafe-actions';\r\nimport { contextTableActions } from './actions';\r\nimport directAPI from 'src/services/directServices';\r\nimport { AxiosResponse } from 'axios';\r\nimport { SeriesContextDto } from '../../types/dto/SeriesContextDto';\r\nimport mapSeriesContextDtoToSeriesContext from './utils/mapSeriesContextDtoToSeriesContext';\r\nimport { TableContextDto } from 'src/types/dto/TableContextDto';\r\nimport mapContextTableDtoToContextTable from './utils/mapContextTableDtoToContextTable';\r\nimport { productPageActions } from '../productPage/actions';\r\nimport { PeriodFrequency } from '../../types/PeriodFrequency';\r\n\r\nexport function* initSeriesContext(action: ActionType) {\r\n try {\r\n const seriesContextDto: AxiosResponse = yield call(directAPI.fetchSeriesContext, action.payload);\r\n const seriesContext = mapSeriesContextDtoToSeriesContext(seriesContextDto.data);\r\n yield put(contextTableActions.series.add(seriesContext, action.payload));\r\n\r\n if (seriesContext.length !== 0) {\r\n yield put(productPageActions.setContextTable(seriesContext[0].type.id));\r\n }\r\n\r\n yield all(seriesContext.map(({ id }) => call(fetchContextTable, id, action.meta)));\r\n } catch (e) {\r\n console.log(e);\r\n }\r\n}\r\n\r\nexport function* fetchContextTable(tableId: number, frequency: PeriodFrequency) {\r\n try {\r\n const contextTableDto: AxiosResponse = yield call(directAPI.fetchTableContext, tableId, frequency);\r\n const contextTable = mapContextTableDtoToContextTable(contextTableDto.data);\r\n yield put(contextTableActions.table.add(contextTable, tableId));\r\n } catch (e) {\r\n console.log(e);\r\n }\r\n}\r\n\r\nfunction* contextTableSagaWatcher() {\r\n yield all([\r\n takeLatest(getType(contextTableActions.series.get), initSeriesContext),\r\n ]);\r\n}\r\n\r\nexport default contextTableSagaWatcher;\r\n","import { ActionType, createStandardAction } from 'typesafe-actions';\r\nimport { SortOrder } from '../../utils/enums';\r\nimport { Publisher } from '../../types/Publisher';\r\nimport { CatalogReport } from '../../types/CatalogReport';\r\nimport { CatalogArea } from '../../types/CatalogArea';\r\nimport { CatalogCategory } from '../../types/CatalogCategory';\r\nimport { CatalogMeasure } from '../../types/CatalogMeasure';\r\nimport { CatalogCountry } from '../../types/CatalogCountry';\r\n\r\nexport const catalogActions = {\r\n setSort: createStandardAction('@catalog/SET_SORT')(),\r\n setSortOrder: createStandardAction('@catalog/SET_SORT_ORDER')(),\r\n setPublishers: createStandardAction('@catalog/SET_PUBLISHERS')(),\r\n getPublishers: createStandardAction('@catalog/GET_PUBLISHERS')(),\r\n setReports: createStandardAction('@catalog/SET_REPORTS')(),\r\n getReports: createStandardAction('@catalog/GET_REPORTS')(),\r\n setAreas: createStandardAction('@catalog/SET_AREAS')(),\r\n getAreas: createStandardAction('@catalog/GET_AREAS')(),\r\n setCategories: createStandardAction('@catalog/SET_CATEGORIES')(),\r\n getCategories: createStandardAction('@catalog/GET_CATEGORIES')(),\r\n setMeasures: createStandardAction('@catalog/SET_MEASURES')(),\r\n getMeasures: createStandardAction('@catalog/GET_MEASURES')(),\r\n setCounties: createStandardAction('@catalog/SET_COUNTIES')(),\r\n getCounties: createStandardAction('@catalog/GET_COUNTIES')(),\r\n filter: {\r\n clearAll: createStandardAction('@catalog_filter/CLEAR_ALL')(),\r\n // Publishers\r\n addPublisher: createStandardAction('@catalog_filter/ADD_PUBLISHER')(),\r\n addAllPublisher: createStandardAction('@catalog_filter/ADD_ALL_PUBLISHER')(),\r\n removePublisher: createStandardAction('@catalog_filter/REMOVE_PUBLISHER')(),\r\n removeAllPublisher: createStandardAction('@catalog_filter/REMOVE_ALL_PUBLISHER')(),\r\n // Reports\r\n addReport: createStandardAction('@catalog_filter/ADD_REPORTS')(),\r\n addAllReports: createStandardAction('@catalog_filter/ADD_ALL_REPORTS')(),\r\n removeReport: createStandardAction('@catalog_filter/REMOVE_REPORTS')(),\r\n removeAllReports: createStandardAction('@catalog_filter/REMOVE_ALL_REPORTS')(),\r\n // Areas\r\n addArea: createStandardAction('@catalog_filter/ADD_AREAS')(),\r\n addAllAreas: createStandardAction('@catalog_filter/ADD_ALL_AREAS')(),\r\n removeArea: createStandardAction('@catalog_filter/REMOVE_AREAS')(),\r\n removeAllAreas: createStandardAction('@catalog_filter/REMOVE_ALL_AREAS')(),\r\n // Categories\r\n addCategory: createStandardAction('@catalog_filter/ADD_CATEGORIES')(),\r\n addAllCategories: createStandardAction('@catalog_filter/ADD_ALL_CATEGORIES')(),\r\n removeCategory: createStandardAction('@catalog_filter/REMOVE_CATEGORIES')(),\r\n removeAllCategories: createStandardAction('@catalog_filter/REMOVE_ALL_CATEGORIES')(),\r\n // Measures\r\n addMeasure: createStandardAction('@catalog_filter/ADD_MEASURES')(),\r\n addAllMeasures: createStandardAction('@catalog_filter/ADD_ALL_MEASURES')(),\r\n removeMeasure: createStandardAction('@catalog_filter/REMOVE_MEASURES')(),\r\n removeAllMeasures: createStandardAction('@catalog_filter/REMOVE_ALL_MEASURES')(),\r\n // Counties\r\n addCountry: createStandardAction('@catalog_filter/ADD_COUNTIES')(),\r\n addAllCounties: createStandardAction('@catalog_filter/ADD_ALL_COUNTIES')(),\r\n removeCountry: createStandardAction('@catalog_filter/REMOVE_COUNTIES')(),\r\n removeAllCounties: createStandardAction('@catalog_filter/REMOVE_ALL_COUNTIES')(),\r\n },\r\n filterUtils: {\r\n setSortOrder: createStandardAction('@catalog_filterUtils/SET_SORT')(),\r\n setSearch: createStandardAction('@catalog_filterUtils/SET_SEARCH')(),\r\n reset: createStandardAction('@catalog_filterUtils/RESET')(),\r\n },\r\n};\r\n\r\nexport type CatalogActions = ActionType;\r\n","import { CatalogPublishersDto } from '../../../types/dto/CatalogPublishersDto';\r\nimport { AxiosResponse } from 'axios';\r\nimport { Publisher } from '../../../types/Publisher';\r\n\r\nconst mapPublishersDtoToPublishers = ({ data }: AxiosResponse): Publisher[] => data.value\r\n .filter(({ Active }) => Active)\r\n .map(({ PublisherID, PublisherName, PublisherNameShort, PublisherNameTranslated, PublisherUrl }) =>\r\n ({ id: PublisherID, name: PublisherName, nameShort: PublisherNameShort, nameTranslated: PublisherNameTranslated, url: PublisherUrl }));\r\n\r\nexport default mapPublishersDtoToPublishers;\r\n","import { AxiosResponse } from 'axios';\r\nimport { CatalogReportsDto } from '../../../types/dto/CatalogReportsDto';\r\nimport { CatalogReport } from '../../../types/CatalogReport';\r\n\r\nconst mapCatalogReportsDtoToCatalogReports = ({ data }: AxiosResponse): CatalogReport[] => data.value\r\n .filter(({ Active }) => Active)\r\n .map(({ ReportName, ReportNameCode, ReportNameTranslated, ReportUrl, PublisherID }) =>\r\n ({ publisher: PublisherID, id: ReportNameCode, name: ReportName, nameTranslated: ReportNameTranslated, url: ReportUrl }));\r\n\r\nexport default mapCatalogReportsDtoToCatalogReports;\r\n","import { AxiosResponse } from 'axios';\r\nimport { CatalogArea } from '../../../types/CatalogArea';\r\nimport { CatalogAreasDto } from 'src/types/dto/CatalogAreasDto';\r\n\r\nconst mapCatalogAreasDtoToCatalogAreas = ({ data }: AxiosResponse): CatalogArea[] => data.value\r\n .filter(({ Active }) => Active)\r\n .map(({ AreaID, AreaName, AreaNameCode, AreaNameTranslated }) =>\r\n ({ id: AreaID, name: AreaName, nameCode: AreaNameCode, nameTranslated: AreaNameTranslated }));\r\n\r\nexport default mapCatalogAreasDtoToCatalogAreas;\r\n","import { AxiosResponse } from 'axios';\r\nimport { CatalogCategoriesDto } from '../../../types/dto/CatalogCategoriesDto';\r\nimport { CatalogCategory } from '../../../types/CatalogCategory';\r\n\r\nconst mapCatalogCategoriesDtoToCatalogCategory = ({ data }: AxiosResponse): CatalogCategory[] => data.value\r\n .filter(({ Active }) => Active)\r\n .map(({ CategoryID, CategoryName }) => ({ id: CategoryID, name: CategoryName }));\r\n\r\nexport default mapCatalogCategoriesDtoToCatalogCategory;\r\n","import { AxiosResponse } from 'axios';\r\nimport { CatalogMeasure } from '../../../types/CatalogMeasure';\r\nimport { CatalogMeasuresDto } from '../../../types/dto/CatalogMeasuresDto';\r\n\r\nconst mapCatalogMeasureDtoToCatalogMeasure = ({ data }: AxiosResponse): CatalogMeasure[] => data.value\r\n .filter(({ Active }) => Active)\r\n .map(({ MeasureID, MeasureName }) => ({ id: MeasureID, name: MeasureName }));\r\n\r\nexport default mapCatalogMeasureDtoToCatalogMeasure;\r\n","import { AxiosResponse } from 'axios';\r\nimport { CatalogCountryDto } from '../../../types/dto/CatalogCountryDto';\r\nimport { CatalogCountry } from '../../../types/CatalogCountry';\r\n\r\nconst mapCatalogCountryDtoToCatalogCountry = ({ data }: AxiosResponse): CatalogCountry[] =>\r\n data.map(({ id, name }) => ({ id, name }));\r\n\r\nexport default mapCatalogCountryDtoToCatalogCountry;\r\n","import { all, takeLatest, call, put } from 'redux-saga/effects';\r\nimport { getType } from 'typesafe-actions';\r\nimport { catalogActions } from './actions';\r\nimport dataAPI from '../../services/dataServices';\r\nimport { AxiosResponse } from 'axios';\r\nimport { CatalogPublishersDto } from '../../types/dto/CatalogPublishersDto';\r\nimport mapPublishersDtoToPublishers from './utils/mapPublishersDtoToPublishers';\r\nimport mapCatalogReportsDtoToCatalogReports from './utils/mapCatalogReportsDtoToCatalogReports';\r\nimport { CatalogReportsDto } from '../../types/dto/CatalogReportsDto';\r\nimport mapCatalogAreasDtoToCatalogAreas from './utils/mapCatalogAreasDtoToCatalogAreas';\r\nimport { CatalogAreasDto } from '../../types/dto/CatalogAreasDto';\r\nimport { CatalogCategoriesDto } from '../../types/dto/CatalogCategoriesDto';\r\nimport mapCatalogCategoriesDtoToCatalogCategory from './utils/mapCatalogCategoriesDtoToCatalogCategory';\r\nimport { CatalogMeasuresDto } from '../../types/dto/CatalogMeasuresDto';\r\nimport mapCatalogMeasureDtoToCatalogMeasure from './utils/mapCatalogMeasureDtoToCatalogMeasure';\r\nimport { CatalogCountryDto } from '../../types/dto/CatalogCountryDto';\r\nimport mapCatalogCountryDtoToCatalogCountry from './utils/mapCatalogCountryDtoToCatalogCountry';\r\n\r\nfunction* fetchPublishers() {\r\n try {\r\n const publishersDto: AxiosResponse = yield call(dataAPI.getPublishers);\r\n const publishers = mapPublishersDtoToPublishers(publishersDto);\r\n yield put(catalogActions.setPublishers(publishers));\r\n } catch (e) {\r\n console.log(e);\r\n }\r\n}\r\n\r\nfunction* fetchReports() {\r\n try {\r\n const reportsDto: AxiosResponse = yield call(dataAPI.getReports);\r\n const reports = mapCatalogReportsDtoToCatalogReports(reportsDto);\r\n yield put(catalogActions.setReports(reports));\r\n } catch (e) {\r\n console.log(e);\r\n }\r\n}\r\n\r\nfunction* fetchAreas() {\r\n try {\r\n const areasDto: AxiosResponse = yield call(dataAPI.getAreas);\r\n const areas = mapCatalogAreasDtoToCatalogAreas(areasDto);\r\n yield put(catalogActions.setAreas(areas));\r\n } catch (e) {\r\n console.log(e);\r\n }\r\n}\r\n\r\nfunction* fetchCategories() {\r\n try {\r\n const categoriesDto: AxiosResponse = yield call(dataAPI.getCategories);\r\n const category = mapCatalogCategoriesDtoToCatalogCategory(categoriesDto);\r\n yield put(catalogActions.setCategories(category));\r\n } catch (e) {\r\n console.log(e);\r\n }\r\n}\r\n\r\nfunction* fetchMeasures() {\r\n try {\r\n const measuresDto: AxiosResponse = yield call(dataAPI.getMeasures);\r\n const measure = mapCatalogMeasureDtoToCatalogMeasure(measuresDto);\r\n yield put(catalogActions.setMeasures(measure));\r\n } catch (e) {\r\n console.log(e);\r\n }\r\n}\r\n\r\nfunction* fetchCounties() {\r\n try {\r\n const countiesDto: AxiosResponse = yield call(dataAPI.getCounties);\r\n const counties = mapCatalogCountryDtoToCatalogCountry(countiesDto);\r\n yield put(catalogActions.setCounties(counties));\r\n } catch (e) {\r\n console.log(e);\r\n }\r\n}\r\n\r\nfunction* catalogSagaWatcher() {\r\n yield all([\r\n takeLatest(getType(catalogActions.getPublishers), fetchPublishers),\r\n takeLatest(getType(catalogActions.getReports), fetchReports),\r\n takeLatest(getType(catalogActions.getAreas), fetchAreas),\r\n takeLatest(getType(catalogActions.getCategories), fetchCategories),\r\n takeLatest(getType(catalogActions.getMeasures), fetchMeasures),\r\n takeLatest(getType(catalogActions.getMeasures), fetchMeasures),\r\n takeLatest(getType(catalogActions.getCounties), fetchCounties),\r\n ]);\r\n}\r\n\r\nexport default catalogSagaWatcher;\r\n","import * as Azure from \"@azure/storage-blob\";\r\nimport { all, call, put, takeLatest } from \"redux-saga/effects\";\r\nimport { ActionType, getType } from \"typesafe-actions\";\r\nimport { educationsAndAnnouncementsActions } from \"./actions\";\r\nimport { AxiosResponse } from \"axios\";\r\nimport { Announcement } from \"src/scenes/EducationsAndAnnouncements/utils/announcements.types\";\r\nimport adminAPI from \"src/services/adminServices\";\r\nimport { toast } from \"react-toastify\";\r\nimport {\r\n EducationalVideo,\r\n EEducationalVideoRole,\r\n} from \"src/scenes/EducationsAndAnnouncements/utils/educationalVideos.types\";\r\n\r\nasync function storeBlockBlob(\r\n blockBlobClient: Azure.BlockBlobClient,\r\n file: File\r\n) {\r\n return await blockBlobClient.upload(file, file.size);\r\n}\r\n\r\nfunction* fetchAnnouncements() {\r\n try {\r\n const response: AxiosResponse> = yield call(\r\n adminAPI.fetchAnnouncements\r\n );\r\n yield put(\r\n educationsAndAnnouncementsActions.announcements.populate(response.data)\r\n );\r\n } catch (error) {\r\n toast.error(\"Failed to fetch announcements.\");\r\n console.error(\"Saga\", error);\r\n }\r\n}\r\n\r\nfunction* createAnnouncement(\r\n action: ActionType<\r\n typeof educationsAndAnnouncementsActions.announcements.create\r\n >\r\n) {\r\n try {\r\n yield call(adminAPI.createAnnouncement, action.payload);\r\n } catch (error) {\r\n toast.error(\"Failed to create announcement.\");\r\n console.error(\"Saga\", { error, action });\r\n } finally {\r\n yield call(fetchAnnouncements);\r\n action.meta();\r\n }\r\n}\r\n\r\nfunction* deleteAnnouncement(\r\n action: ActionType<\r\n typeof educationsAndAnnouncementsActions.announcements.delete\r\n >\r\n) {\r\n try {\r\n yield call(adminAPI.deleteAnnouncement, action.payload);\r\n yield put(\r\n educationsAndAnnouncementsActions.announcements.remove(action.payload)\r\n );\r\n } catch (error) {\r\n toast.error(\"Failed to delete announcement.\");\r\n console.error(\"Saga\", { error, action });\r\n yield put(\r\n educationsAndAnnouncementsActions.announcements.add(action.payload)\r\n );\r\n }\r\n}\r\n\r\nfunction* editAnnouncement(\r\n action: ActionType<\r\n typeof educationsAndAnnouncementsActions.announcements.edit\r\n >\r\n) {\r\n try {\r\n yield call(adminAPI.editAnnouncement, action.payload);\r\n yield put(\r\n educationsAndAnnouncementsActions.announcements.update(action.payload)\r\n );\r\n } catch (error) {\r\n toast.error(\"Failed to edit announcement.\");\r\n console.error(\"Saga\", { error, action });\r\n yield call(fetchAnnouncements);\r\n } finally {\r\n action.meta();\r\n }\r\n}\r\n\r\nfunction* fetchEducationalVideos() {\r\n try {\r\n const response: AxiosResponse> = yield call(\r\n adminAPI.fetchEducationalVideos\r\n );\r\n yield put(\r\n educationsAndAnnouncementsActions.educationalVideos.populate(\r\n response.data\r\n )\r\n );\r\n } catch (error) {\r\n toast.error(\"Failed to fetch educational videos.\");\r\n console.error(\"Saga\", error);\r\n }\r\n}\r\n\r\nfunction* uploadEducationalVideo(params: {\r\n videoFile: File;\r\n credential: Azure.AnonymousCredential;\r\n uploadUri: string;\r\n guid: string;\r\n}) {\r\n try {\r\n const blockBlobClient = new Azure.BlockBlobClient(\r\n params.uploadUri,\r\n params.credential\r\n );\r\n yield storeBlockBlob(blockBlobClient, params.videoFile);\r\n yield call(adminAPI.completeUploadEducationalVideo, params.guid);\r\n } catch (error) {\r\n console.error(\"Saga\", { error, params });\r\n toast.error(\"Failed to upload video.\");\r\n }\r\n}\r\n\r\nfunction* uploadEducationalVideoThumbnail(params: {\r\n thumbnailFile: File;\r\n credential: Azure.AnonymousCredential;\r\n videoGuid: string;\r\n}) {\r\n try {\r\n const response: AxiosResponse<{\r\n guid: string;\r\n uploadUri: string;\r\n }> = yield call(adminAPI.createEducationalVideoThumbnail, {\r\n videoId: params.videoGuid,\r\n fileName: params.thumbnailFile.name,\r\n });\r\n const blockBlobClient = new Azure.BlockBlobClient(\r\n response.data.uploadUri,\r\n params.credential\r\n );\r\n yield storeBlockBlob(blockBlobClient, params.thumbnailFile);\r\n yield call(\r\n adminAPI.completeUploadEducationalVideoThumbnail,\r\n response.data.guid\r\n );\r\n } catch (error) {\r\n console.error(\"Saga\", { error, params });\r\n toast.error(\"Failed to upload thumbnail.\");\r\n }\r\n}\r\n\r\nfunction* createEducationalVideo(\r\n action: ActionType<\r\n typeof educationsAndAnnouncementsActions.educationalVideos.createVideo\r\n >\r\n) {\r\n try {\r\n const response: AxiosResponse<{\r\n guid: string;\r\n uploadUri: string;\r\n }> = yield call(adminAPI.createEducationalVideo, {\r\n fileName: action.payload.file.name,\r\n payload: {\r\n category: action.payload.category,\r\n description: action.payload.description,\r\n duration: action.payload.duration,\r\n roles: [EEducationalVideoRole.None],\r\n title: action.payload.title,\r\n videoDate: new Date().toISOString(),\r\n },\r\n });\r\n const { guid, uploadUri } = response.data;\r\n const credential = new Azure.AnonymousCredential();\r\n yield all([\r\n call(uploadEducationalVideo, {\r\n credential,\r\n guid,\r\n uploadUri,\r\n videoFile: action.payload.file,\r\n }),\r\n call(uploadEducationalVideoThumbnail, {\r\n credential,\r\n thumbnailFile: action.payload.thumbnail,\r\n videoGuid: guid,\r\n }),\r\n ]);\r\n } catch (error) {\r\n toast.error(\"Failed to create educational video.\");\r\n console.error(\"Saga\", { error, action });\r\n } finally {\r\n yield call(fetchEducationalVideos);\r\n action.meta();\r\n }\r\n}\r\n\r\nfunction* deleteEducationalVideo(\r\n action: ActionType<\r\n typeof educationsAndAnnouncementsActions.educationalVideos.deleteVideo\r\n >\r\n) {\r\n try {\r\n yield call(adminAPI.deleteEducationalVideo, action.payload);\r\n yield put(\r\n educationsAndAnnouncementsActions.educationalVideos.removeVideo(\r\n action.payload\r\n )\r\n );\r\n } catch (error) {\r\n toast.error(\"Failed to delete educational video.\");\r\n console.error(\"Saga\", { error, action });\r\n }\r\n}\r\n\r\nfunction* deleteEducationVideoThumbnail(videoId: string) {\r\n try {\r\n const response: AxiosResponse = yield call(\r\n adminAPI.getEducationVideoThumbnail,\r\n videoId\r\n );\r\n yield call(adminAPI.deleteEducationVideoThumbnail, response.data.id);\r\n } catch (error) {\r\n toast.error(\"Failed to delete video thumbnail.\");\r\n console.error(\"Saga\", { error });\r\n }\r\n}\r\n\r\nfunction* editEducationalVideo(\r\n action: ActionType<\r\n typeof educationsAndAnnouncementsActions.educationalVideos.editVideo\r\n >\r\n) {\r\n const credential = new Azure.AnonymousCredential();\r\n try {\r\n yield call(adminAPI.editEducationalVideo, action.payload.video);\r\n if (action.payload.thumbnail) {\r\n yield all([\r\n uploadEducationalVideoThumbnail({\r\n credential,\r\n thumbnailFile: action.payload.thumbnail,\r\n videoGuid: action.payload.video.id,\r\n }),\r\n deleteEducationVideoThumbnail(action.payload.video.id),\r\n ]);\r\n }\r\n const thumbnailResponse: AxiosResponse<{\r\n id: string;\r\n videoId: string;\r\n fileName: string;\r\n filePath: string;\r\n uploadUri: string;\r\n completed: boolean;\r\n created: string;\r\n deleted: boolean;\r\n }> = yield call(\r\n adminAPI.getEducationVideoThumbnail,\r\n action.payload.video.id\r\n );\r\n yield put(\r\n educationsAndAnnouncementsActions.educationalVideos.updateVideo({\r\n ...action.payload.video,\r\n thumbnailUri: thumbnailResponse.data.uploadUri,\r\n })\r\n );\r\n } catch (error) {\r\n toast.error(\"Failed to edit educational video.\");\r\n console.error(\"Saga\", { error, action });\r\n } finally {\r\n action.meta();\r\n }\r\n}\r\n\r\nexport default function* educationsAndAnnouncementsSagaWatcher() {\r\n yield all([\r\n takeLatest(\r\n getType(educationsAndAnnouncementsActions.announcements.fetch),\r\n fetchAnnouncements\r\n ),\r\n takeLatest(\r\n getType(educationsAndAnnouncementsActions.announcements.create),\r\n createAnnouncement\r\n ),\r\n takeLatest(\r\n getType(educationsAndAnnouncementsActions.announcements.delete),\r\n deleteAnnouncement\r\n ),\r\n takeLatest(\r\n getType(educationsAndAnnouncementsActions.announcements.edit),\r\n editAnnouncement\r\n ),\r\n takeLatest(\r\n getType(educationsAndAnnouncementsActions.educationalVideos.fetch),\r\n fetchEducationalVideos\r\n ),\r\n takeLatest(\r\n getType(educationsAndAnnouncementsActions.educationalVideos.createVideo),\r\n createEducationalVideo\r\n ),\r\n takeLatest(\r\n getType(educationsAndAnnouncementsActions.educationalVideos.deleteVideo),\r\n deleteEducationalVideo\r\n ),\r\n takeLatest(\r\n getType(educationsAndAnnouncementsActions.educationalVideos.editVideo),\r\n editEducationalVideo\r\n ),\r\n ]);\r\n}\r\n","import { all } from \"redux-saga/effects\";\r\nimport menuSagaWatcher from \"./menu/sagas\";\r\nimport recordsRootSaga from \"./records/sagas\";\r\nimport productSagaWatcher from \"./products/sagas\";\r\nimport unitSagaWatcher from \"./units/sagas\";\r\nimport productPageSagaWatcher from \"./productPage/sagas\";\r\nimport authSagaWatcher from \"./authentication/sagas\";\r\nimport adminRootSaga from \"./admin/sagas\";\r\nimport landingPageSagaWatcher from \"./landingPage/sagas\";\r\nimport calendarsSagaWatcher from \"./admin/calendars/sagas\";\r\nimport organizationUsersSagaWatcher from \"./admin/organizationUsers/sagas\";\r\nimport contextTableSagaWatcher from \"./contextTable/sagas\";\r\nimport catalogSagaWatcher from \"./catalog/sagas\";\r\nimport educationsAndAnnouncementsSagaWatcher from \"./educationsAndAnnouncements/sagas\";\r\n\r\nexport default function*() {\r\n yield all([\r\n menuSagaWatcher(),\r\n productSagaWatcher(),\r\n recordsRootSaga(),\r\n unitSagaWatcher(),\r\n productPageSagaWatcher(),\r\n authSagaWatcher(),\r\n adminRootSaga(),\r\n landingPageSagaWatcher(),\r\n calendarsSagaWatcher(),\r\n organizationUsersSagaWatcher(),\r\n contextTableSagaWatcher(),\r\n catalogSagaWatcher(),\r\n educationsAndAnnouncementsSagaWatcher(),\r\n ]);\r\n}\r\n","import produce from 'immer';\r\nimport { menuActions, MenuActions } from './actions';\r\nimport { getType } from 'typesafe-actions';\r\nimport { NavMenuDto } from '../../types/dto/NavMenuDto';\r\nimport { Menu } from '../../types/Menu';\r\nimport createUniqueArray from '../../utils/createUniqueArray';\r\n\r\nexport interface MenuState {\r\n navMenu: NavMenuDto[],\r\n selectedMenu?: NavMenuDto,\r\n menuById: {\r\n [id: number] : Menu[],\r\n },\r\n menuIds: number[],\r\n}\r\n\r\nexport const initialState: MenuState = {\r\n navMenu: [],\r\n menuById: {},\r\n menuIds: [],\r\n};\r\n\r\nexport const menuReducer = produce(\r\n (state, action) => {\r\n switch (action.type) {\r\n case getType(menuActions.navMenu.add):\r\n state.navMenu = action.payload;\r\n return;\r\n case getType(menuActions.menu.add):\r\n state.menuIds = createUniqueArray([...state.menuIds, action.meta]);\r\n state.menuById[action.meta] = action.payload;\r\n return;\r\n case getType(menuActions.navMenu.setSelectedMenu):\r\n state.selectedMenu = action.payload;\r\n return;\r\n }\r\n }, initialState,\r\n);\r\n","import produce from 'immer';\r\nimport { getType } from 'typesafe-actions';\r\nimport { recordsActions, RecordsActions } from '../actions';\r\nimport createUniqueArray from '../../../utils/createUniqueArray';\r\nimport { FrequencyRecord } from '../../../types/FrequencyRecord';\r\n\r\nexport interface FrequencyRecordsState {\r\n allProducts: number[],\r\n productsById: FrequencyRecordProduct,\r\n}\r\n\r\nexport interface FrequencyRecordProduct {\r\n [productID: string] : FrequencyRecords,\r\n}\r\n\r\ninterface FrequencyRecords {\r\n [frequency: string] : FrequencyRecord,\r\n}\r\n\r\nexport const initialState: FrequencyRecordsState = {\r\n allProducts: [],\r\n productsById: {},\r\n};\r\n\r\nexport const frequencyRecordsReducer = produce(\r\n (state, action) => {\r\n switch (action.type) {\r\n case getType(recordsActions.frequency.addFrequency):\r\n const { payload: records } = action;\r\n const { frequency, productID } = action.meta;\r\n state.allProducts =\r\n createUniqueArray([...state.allProducts, Number(productID)]);\r\n if (!state.productsById[action.meta.productID]) {\r\n state.productsById[productID] = { [frequency]: records };\r\n } else if (!state.productsById[action.meta.productID][frequency]) {\r\n state.productsById[productID][frequency] = records;\r\n } else {\r\n state.productsById[productID][frequency].allAreas =\r\n createUniqueArray([...state.productsById[productID][frequency].allAreas, ...records.allAreas]);\r\n records.allAreas.forEach((area: number) => {\r\n state.productsById[productID][frequency][area] = { ...state.productsById[productID][frequency][area], ...records[area] };\r\n state.productsById[productID][frequency][area].allRecords = createUniqueArray(\r\n [...state.productsById[productID][frequency][area].allRecords, ...records[area].allRecords]);\r\n });\r\n }\r\n return;\r\n }\r\n }, initialState,\r\n);\r\n\r\nexport default frequencyRecordsReducer;\r\n","import produce from 'immer';\r\nimport { FuturesRaw, FuturesRecords } from '../../../types/FuturesRecord';\r\nimport { recordsActions, RecordsActions } from '../actions';\r\nimport { getType } from 'typesafe-actions';\r\nimport createUniqueArray from '../../../utils/createUniqueArray';\r\n\r\ninterface FuturesRecordsState {\r\n allProducts: number[],\r\n productsById: FuturesRecordProduct,\r\n}\r\n\r\ninterface FuturesRecordProduct {\r\n records: { [productID: string] : FuturesRecords },\r\n rawRecords: { [productID: string] : FuturesRaw[] },\r\n}\r\n\r\nconst initialState: FuturesRecordsState = {\r\n allProducts: [],\r\n productsById: {\r\n records: {},\r\n rawRecords: {},\r\n },\r\n};\r\n\r\nexport const futuresRecordReducer = produce((state, action) => {\r\n switch (action.type) {\r\n case getType(recordsActions.futures.setFutures): {\r\n const { payload: productID } = action;\r\n state.allProducts =\r\n createUniqueArray([...state.allProducts, Number(productID)]);\r\n state.productsById.records = {[productID]: action.meta.recordsData};\r\n state.productsById.rawRecords = {[productID]: action.meta.rawRecords};\r\n return;\r\n }\r\n }\r\n}, initialState);\r\n\r\nexport default futuresRecordReducer;\r\n","import produce from 'immer';\r\nimport { getType } from 'typesafe-actions';\r\nimport { recordsActions, RecordsActions } from '../actions';\r\nimport createUniqueArray from '../../../utils/createUniqueArray';\r\nimport { RevisionRecord } from '../../../types/RevisionRecord';\r\n\r\nexport interface RevisionRecordsState {\r\n allProducts: number[],\r\n productsById: RevisionRecordProduct,\r\n}\r\n\r\nexport interface RevisionRecordProduct {\r\n [productID: string] : RevisionRecords,\r\n}\r\n\r\ninterface RevisionRecords {\r\n [frequency: string] : RevisionRecord,\r\n}\r\n\r\nexport const initialState: RevisionRecordsState = {\r\n allProducts: [],\r\n productsById: {},\r\n};\r\n\r\nexport const revisionRecordsReducer = produce(\r\n (state, action) => {\r\n switch (action.type) {\r\n case getType(recordsActions.revision.addRevision):\r\n const { payload: records } = action;\r\n const { frequency, productID } = action.meta;\r\n state.allProducts =\r\n createUniqueArray([...state.allProducts, Number(productID)]);\r\n if (!state.productsById[action.meta.productID]) {\r\n state.productsById[productID] = { [frequency]: records };\r\n } else if (!state.productsById[action.meta.productID][frequency]) {\r\n state.productsById[productID][frequency] = records;\r\n } else {\r\n state.productsById[productID][frequency].allAreas =\r\n createUniqueArray([...state.productsById[productID][frequency].allAreas, ...records.allAreas]);\r\n records.allAreas.forEach((area: number) => {\r\n state.productsById[productID][frequency][area] = { ...state.productsById[productID][frequency][area], ...records[area] };\r\n state.productsById[productID][frequency][area].allRecords = createUniqueArray(\r\n [...state.productsById[productID][frequency][area].allRecords, ...records[area].allRecords]);\r\n });\r\n }\r\n return;\r\n }\r\n }, initialState,\r\n);\r\n\r\nexport default revisionRecordsReducer;\r\n","import { combineReducers } from 'redux';\r\nimport frequencyRecordsReducer from './frequency/reducers';\r\nimport futuresRecordReducer from './futures/reducers';\r\nimport revisionRecordsReducer from './revision/reducers';\r\n\r\nexport const recordsRootReducer = combineReducers({\r\n frequency: frequencyRecordsReducer,\r\n futures: futuresRecordReducer,\r\n revision: revisionRecordsReducer,\r\n});\r\n","import produce from 'immer';\r\nimport { getType } from 'typesafe-actions';\r\nimport createUniqueArray from '../../utils/createUniqueArray';\r\nimport { ProductActions, productActions } from './actions';\r\nimport { Product } from '../../types/Product';\r\n\r\nexport interface ProductState {\r\n allProducts: number[],\r\n productById: { [id: number] : Product }\r\n}\r\n\r\nexport const initialState: ProductState = {\r\n allProducts: [],\r\n productById: {},\r\n};\r\n\r\nexport const productReducer = produce(\r\n (state, action) => {\r\n switch (action.type) {\r\n case getType(productActions.addProduct):\r\n state.allProducts =\r\n createUniqueArray([...state.allProducts, action.payload.product.id]);\r\n const { areas, metaFields, product, publisher, report, summary, unit, updates, scale } = action.payload;\r\n state.productById[action.payload.product.id] = { areas, metaFields, product, publisher,\r\n report, summary, unit, updates, defaultScale: scale};\r\n return;\r\n }\r\n }, initialState,\r\n);\r\n","import produce from 'immer';\r\nimport { getType } from 'typesafe-actions';\r\nimport { UnitsState } from '../../types/Units';\r\nimport { UnitsActions, unitsActions } from './actions';\r\nimport createUniqueArray from '../../utils/createUniqueArray';\r\n\r\nexport const unitReducer = produce(\r\n (state, action) => {\r\n switch (action.type) {\r\n case getType(unitsActions.add):\r\n Object.keys(action.payload).forEach((key) => {\r\n if (!state[key]) {\r\n state[key] = { allIDs: [] };\r\n }\r\n state[key] = {\r\n ...state[key],\r\n ...action.payload[key],\r\n };\r\n state[key].allIDs = createUniqueArray([...state[key].allIDs, ...Object.keys(action.payload[key]).map(Number)]);\r\n });\r\n return;\r\n }\r\n }, {},\r\n);\r\n"," import produce from 'immer';\r\nimport { getType } from 'typesafe-actions';\r\nimport { chartActions, ChartActions } from './actions';\r\nimport createUniqueArray from '../../utils/createUniqueArray';\r\nimport { Chart } from '../../types/Chart';\r\n\r\nexport interface ChartState {\r\n allCharts: number[],\r\n chartById: ProductCharts,\r\n}\r\n\r\nexport interface ProductCharts {\r\n [productID: number] : ProductChart,\r\n}\r\n\r\ninterface ProductChart {\r\n [frequency: string] : Charts,\r\n}\r\n\r\ninterface Charts {\r\n [chartID: number] : Chart,\r\n\r\n chartList: number[],\r\n}\r\n\r\nexport const initialState: ChartState = {\r\n allCharts: [],\r\n chartById: {},\r\n};\r\n\r\nexport const chartReducer = produce(\r\n (state: ChartState, action) => {\r\n switch (action.type) {\r\n case getType(chartActions.add): {\r\n const chartList = createUniqueArray(action.payload.map(chart => chart.id));\r\n const {productID, frequency} = action.meta;\r\n\r\n state.allCharts = createUniqueArray([...state.allCharts, productID]);\r\n if (!state.chartById[productID]) {\r\n state.chartById[productID] = {};\r\n }\r\n if (!state.chartById[productID][frequency]) {\r\n state.chartById[productID][frequency] = {chartList};\r\n } else {\r\n state.chartById[productID][frequency].chartList = createUniqueArray([...state.chartById[productID][frequency].chartList, ...chartList]);\r\n }\r\n\r\n action.payload.forEach(chart => {\r\n state.chartById[productID][frequency][chart.id] = chart;\r\n });\r\n return;\r\n }\r\n case getType(chartActions.changeNormalization): {\r\n const {productID, frequency, chartID, selectedNormalizationID} = action.payload;\r\n state.chartById[productID][frequency][chartID].selectedNormalization = selectedNormalizationID;\r\n return;\r\n }\r\n case getType(chartActions.changeTransformation): {\r\n const {productID, frequency, chartID, selectedTransformationID} = action.payload;\r\n state.chartById[productID][frequency][chartID].selectedTransformation = selectedTransformationID;\r\n return;\r\n }\r\n }\r\n }, initialState,\r\n);\r\n","import produce from 'immer';\r\nimport { adminActions, AdminActions } from '../actions';\r\nimport { getType } from 'typesafe-actions';\r\nimport { Organization } from '../../../types/Organization';\r\n\r\nconst initialState: Organization[] = [];\r\n\r\nexport const organizationReducer = produce(\r\n (state, action) => {\r\n switch (action.type) {\r\n case getType(adminActions.organization.addAll):\r\n return action.payload;\r\n case getType(adminActions.organization.add):\r\n state.push(action.payload);\r\n return;\r\n case getType(adminActions.organization.remove):\r\n const deleteIndex = state.findIndex(({name}) => name === action.payload);\r\n if (deleteIndex === -1) {\r\n return;\r\n }\r\n state.splice(deleteIndex, 1);\r\n return;\r\n case getType(adminActions.organization.update):\r\n const index = state.findIndex(({name}) => name === action.meta);\r\n if (index === -1) {\r\n return;\r\n }\r\n state[index] = action.payload;\r\n return;\r\n default:\r\n return state;\r\n }\r\n }, initialState,\r\n);\r\n","import produce from 'immer';\r\nimport { User } from '../../../types/User';\r\nimport { adminActions, AdminActions } from '../actions';\r\nimport { getType } from 'typesafe-actions';\r\n\r\nconst initialState: User[] = [];\r\n\r\nexport const userReducer = produce(\r\n (state, action) => {\r\n switch (action.type) {\r\n case getType(adminActions.users.add):\r\n return action.payload;\r\n case getType(adminActions.users.remove): {\r\n const index = state.findIndex(user => user.userName === action.payload);\r\n if (index !== -1) {\r\n state.splice(index, 1);\r\n }\r\n return;\r\n }\r\n case getType(adminActions.users.addOne):\r\n state.push({\r\n userId: action.payload.email,\r\n userName: action.payload.email,\r\n firstName: action.payload.firstName,\r\n lastName: action.payload.lastName,\r\n email: action.payload.email,\r\n emailConfirmed: action.payload.emailConfirmed,\r\n isInvitationExpired: action.payload.isInvitationExpired,\r\n });\r\n return;\r\n case getType(adminActions.users.edit): {\r\n const index = state.findIndex(user => user.userName === action.meta);\r\n if (index !== -1) {\r\n state[index] = {\r\n ...state[index],\r\n firstName: action.payload.firstName,\r\n lastName: action.payload.lastName,\r\n email: action.payload.email,\r\n };\r\n }\r\n return;\r\n }\r\n default:\r\n return state;\r\n }\r\n }, initialState,\r\n);\r\n","import produce from 'immer';\r\nimport { adminActions, AdminActions } from '../actions';\r\nimport { OrganizationReport } from 'src/types/OrganizationReport';\r\nimport { getType } from 'typesafe-actions';\r\n\r\ninterface OrganizationReportState {\r\n [org: string] : OrganizationReport[];\r\n}\r\n\r\nconst initialState: OrganizationReportState = {};\r\n\r\nexport const organizationReportsReducer = produce(\r\n (state, action) => {\r\n switch (action.type) {\r\n case getType(adminActions.organizationReports.add):\r\n state[action.meta] = action.payload;\r\n return;\r\n case getType(adminActions.organizationReports.update):\r\n state[action.meta].push(action.payload);\r\n return;\r\n case getType(adminActions.organizationReports.removeOrganization):\r\n delete state[action.payload];\r\n return;\r\n case getType(adminActions.organizationReports.remove):\r\n const index = state[action.payload].findIndex(e => e.reportNameCode === action.meta);\r\n if (index !== -1) {\r\n state[action.payload].splice(index, 1);\r\n }\r\n return;\r\n }\r\n }, initialState,\r\n);\r\n","import produce from 'immer';\r\nimport { adminActions, AdminActions } from '../actions';\r\nimport { getType } from 'typesafe-actions';\r\nimport { Report } from '../../../types/Report';\r\n\r\nconst initialState: Report[] = [];\r\n\r\nexport const reportsReducer = produce(\r\n (state, action) => {\r\n switch (action.type) {\r\n case getType(adminActions.report.add):\r\n return action.payload;\r\n default:\r\n return;\r\n }\r\n }, initialState,\r\n);\r\n","import produce from \"immer\";\r\nimport { adminActions, AdminActions } from \"../actions\";\r\nimport { getType } from \"typesafe-actions\";\r\nimport { View } from \"../../../types/View\";\r\nimport { OrganizationView } from \"../../../types/OrganizationView\";\r\nimport createUniqueArray from \"../../../utils/createUniqueArray\";\r\n\r\ntype InitialState = {\r\n allViews: View[];\r\n organizationViews: {\r\n [key: string]: OrganizationView[];\r\n };\r\n};\r\n\r\nconst initialState: InitialState = {\r\n allViews: [],\r\n organizationViews: {},\r\n};\r\n\r\nexport const viewReducer = produce(\r\n (state, action) => {\r\n switch (action.type) {\r\n case getType(adminActions.view.add):\r\n state.allViews = action.payload;\r\n return;\r\n case getType(adminActions.organizationView.addAll):\r\n state.organizationViews[action.payload.organizationName] =\r\n action.payload.view;\r\n return;\r\n case getType(adminActions.organizationView.add):\r\n const { organizationName } = action.payload;\r\n state.organizationViews[organizationName] = [\r\n ...state.organizationViews[organizationName],\r\n {\r\n organizationName: action.payload.organizationName,\r\n viewName: action.payload.view.name,\r\n },\r\n ];\r\n return;\r\n case getType(adminActions.organizationView.remove):\r\n const orgName = action.payload.organizationName;\r\n state.organizationViews[orgName] = state.organizationViews[\r\n orgName\r\n ].filter((view) => view.viewName !== action.payload.view.name);\r\n return;\r\n case getType(adminActions.organizationView.removeOrganization):\r\n delete state.organizationViews[action.payload];\r\n return;\r\n case getType(adminActions.organizationView.saveAllViews):\r\n const allViewsWithoutRequestAccess: OrganizationView[] = [];\r\n state.allViews.forEach((view) => {\r\n if (!view.requestAccess) {\r\n allViewsWithoutRequestAccess.push({\r\n organizationName: action.payload,\r\n viewName: view.name,\r\n });\r\n }\r\n state.organizationViews[action.payload] = createUniqueArray<\r\n OrganizationView\r\n >([\r\n ...allViewsWithoutRequestAccess,\r\n ...state.organizationViews[action.payload],\r\n ]);\r\n });\r\n return;\r\n default:\r\n return;\r\n }\r\n },\r\n initialState\r\n);\r\n","import produce from 'immer';\r\nimport { adminActions, AdminActions } from '../actions';\r\nimport { getType } from 'typesafe-actions';\r\nimport { Calendar } from '../../../types/Calendar';\r\n\r\ninterface CalendarState {\r\n [organization: string] : Calendar[],\r\n}\r\n\r\nconst initialState: CalendarState = {};\r\n\r\nexport const calendarsReducer = produce(\r\n (state, action) => {\r\n switch (action.type) {\r\n case getType(adminActions.calendars.addAll):\r\n state[action.payload] = action.meta;\r\n return;\r\n case getType(adminActions.calendars.remove):\r\n const deleteIndex = state[action.payload].findIndex(({name}) => name === action.meta);\r\n if (deleteIndex === -1) {\r\n return;\r\n }\r\n state[action.payload].splice(deleteIndex, 1);\r\n return;\r\n case getType(adminActions.calendars.add):\r\n state[action.payload].push(action.meta);\r\n return;\r\n case getType(adminActions.calendars.update):\r\n const updateIndex = state[action.payload.organizationName].findIndex(({name}) => name === action.payload.name);\r\n if (updateIndex === -1) {\r\n return;\r\n }\r\n state[action.payload.organizationName][updateIndex].name = action.meta;\r\n return;\r\n case getType(adminActions.calendars.removeOrganization):\r\n delete state[action.payload];\r\n return;\r\n }\r\n }, initialState,\r\n);\r\n","import produce from 'immer';\r\nimport { adminActions, AdminActions } from '../actions';\r\nimport { getType } from 'typesafe-actions';\r\nimport { CalendarReport } from '../../../types/CalendarReport';\r\n\r\ninterface CalendarReportState {\r\n [organization: string] : {\r\n [calendar: string] : CalendarReport[];\r\n };\r\n}\r\n\r\nconst initialState: CalendarReportState = {};\r\n\r\nexport const calendarReportsReducer = produce(\r\n (state, action) => {\r\n switch (action.type) {\r\n case getType(adminActions.calendarReports.addAll):\r\n if (!state[action.payload.organization]) {\r\n state[action.payload.organization] = {};\r\n }\r\n state[action.payload.organization][action.payload.calendarName] = action.meta;\r\n return;\r\n case getType(adminActions.calendarReports.remove):\r\n const deleteIndex = state[action.payload.organization][action.payload.calendarName].findIndex(({name}) => name === action.meta);\r\n if (deleteIndex === -1) {\r\n return;\r\n }\r\n state[action.payload.organization][action.payload.calendarName].splice(deleteIndex, 1);\r\n return;\r\n case getType(adminActions.calendarReports.add):\r\n state[action.payload.organization][action.payload.calendarName].push({ name: action.meta });\r\n return;\r\n case getType(adminActions.calendarReports.removeCalendar):\r\n delete state[action.payload][action.meta];\r\n return;\r\n case getType(adminActions.calendarReports.removeOrganization):\r\n delete state[action.payload];\r\n return;\r\n }\r\n }, initialState,\r\n);\r\n","import produce from \"immer\";\r\nimport { OrganizationUserDto } from \"../../../types/dto/OrganizationUserDto\";\r\nimport { adminActions, AdminActions } from \"../actions\";\r\nimport { getType } from \"typesafe-actions\";\r\n\r\ntype OrganizationUsers = {\r\n [organizationName: string]: OrganizationUserDto[];\r\n};\r\n\r\nconst initialState = {};\r\n\r\nexport const organizationUsersReducer = produce<\r\n OrganizationUsers,\r\n AdminActions\r\n>((state, action) => {\r\n switch (action.type) {\r\n case getType(adminActions.organizationUsers.saveUsers): {\r\n const { users, organizationName } = action.payload;\r\n state[organizationName] = users;\r\n return;\r\n }\r\n case getType(adminActions.organizationUsers.saveUser): {\r\n const { user, organizationName } = action.payload;\r\n const organizationUser: OrganizationUserDto = {\r\n organizationName,\r\n isAdmin: user.isAdmin,\r\n userName: user.userName,\r\n firstName: user.firstName,\r\n lastName: user.lastName,\r\n userId: user.userId,\r\n email: user.email,\r\n };\r\n state[organizationName] = [...state[organizationName], organizationUser];\r\n return;\r\n }\r\n case getType(adminActions.organizationUsers.deleteUser): {\r\n const { userName, organizationName } = action.payload;\r\n const deleteIndex = state[organizationName].findIndex(\r\n (user) => user.userId === userName\r\n );\r\n if (deleteIndex === -1) {\r\n return;\r\n }\r\n state[organizationName].splice(deleteIndex, 1);\r\n return;\r\n }\r\n case getType(adminActions.organizationUsers.removeOrganization):\r\n delete state[action.payload];\r\n return;\r\n case getType(adminActions.organizationUsers.addAdminUserRole): {\r\n const { userName, organizationName, role } = action.payload;\r\n state[organizationName] = state[organizationName].map((user) => {\r\n if (user.userName === userName) {\r\n user.isAdmin = role === \"admin\";\r\n }\r\n return user;\r\n });\r\n return;\r\n }\r\n case getType(adminActions.organizationUsers.removeAdminUserRole): {\r\n const { userName, organizationName } = action.payload;\r\n state[organizationName] = state[organizationName].map((user) => {\r\n if (user.userName === userName) {\r\n user.isAdmin = false;\r\n }\r\n return user;\r\n });\r\n return;\r\n }\r\n }\r\n}, initialState);\r\n","import produce from \"immer\";\r\nimport { adminActions, AdminActions } from \"../actions\";\r\nimport { Subscription } from \"src/types/Subscription\";\r\nimport { getType } from \"typesafe-actions\";\r\n\r\ntype ViewsAndSubs = {\r\n views: Array;\r\n subscriptions: Array;\r\n};\r\n\r\nconst initialState: ViewsAndSubs = {\r\n views: [],\r\n subscriptions: [],\r\n};\r\n\r\nexport const subscriptionReducer = produce(\r\n (state, action) => {\r\n switch (action.type) {\r\n case getType(adminActions.subscriptionsAndViews.populateSubs): {\r\n const newState = { ...state };\r\n newState.subscriptions = action.payload;\r\n return newState;\r\n }\r\n case getType(adminActions.subscriptionsAndViews.populateViews): {\r\n const newState = { ...state };\r\n newState.views = action.payload;\r\n return newState;\r\n }\r\n case getType(adminActions.subscriptionsAndViews.removeSub): {\r\n const newState = { ...state };\r\n newState.subscriptions = state.subscriptions.filter(\r\n (sub) => sub.viewName !== action.payload\r\n );\r\n return newState;\r\n }\r\n case getType(adminActions.subscriptionsAndViews.addSub): {\r\n const newState = { ...state };\r\n newState.subscriptions = [...state.subscriptions, action.payload];\r\n return newState;\r\n }\r\n default:\r\n return state;\r\n }\r\n },\r\n initialState\r\n);\r\n","import { combineReducers } from \"redux\";\r\nimport { organizationReducer } from \"./organization/reducers\";\r\nimport { userReducer } from \"./users/reducers\";\r\nimport { organizationReportsReducer } from \"./organizationReports/reducers\";\r\nimport { reportsReducer } from \"./report/reducers\";\r\nimport { viewReducer } from \"./view/reducers\";\r\nimport { calendarsReducer } from \"./calendars/reducers\";\r\nimport { calendarReportsReducer } from \"./calendarReports/reducers\";\r\nimport { organizationUsersReducer } from \"./organizationUsers/reducers\";\r\nimport { subscriptionReducer } from \"./subscriptions/reducers\";\r\n\r\nexport const adminRootReducer = combineReducers({\r\n organization: organizationReducer,\r\n user: userReducer,\r\n organizationReports: organizationReportsReducer,\r\n report: reportsReducer,\r\n view: viewReducer,\r\n calendars: calendarsReducer,\r\n calendarReports: calendarReportsReducer,\r\n organizationUsers: organizationUsersReducer,\r\n subscriptions: subscriptionReducer,\r\n});\r\n","import produce from 'immer';\r\nimport { getType } from 'typesafe-actions';\r\nimport { TreeMapData } from '../../types/TreeMapData';\r\nimport { landingPageActions, LandingPageActions } from './actions';\r\n\r\ninterface LandingPageState {\r\n treeMapData: TreeMapData,\r\n}\r\n\r\nconst initialState: LandingPageState = {\r\n treeMapData: {name: 'data', products: []},\r\n};\r\n\r\nexport const landingPageReducer = produce(\r\n (state, action) => {\r\n switch (action.type) {\r\n case getType(landingPageActions.addTreeMapData):\r\n state.treeMapData = action.payload;\r\n return;\r\n }\r\n }, initialState,\r\n);\r\n","import produce from \"immer\";\r\nimport { adminPageActions, AdminPageActions } from \"./actions\";\r\nimport { getType } from \"typesafe-actions\";\r\n\r\ntype AdminPageState = {\r\n search: string;\r\n organization: string;\r\n};\r\n\r\nconst initialState = {\r\n search: \"\",\r\n organization: \"\",\r\n};\r\n\r\nexport const adminPageReducer = produce(\r\n (state, action) => {\r\n switch (action.type) {\r\n case getType(adminPageActions.setSearch):\r\n state.search = action.payload;\r\n return;\r\n case getType(adminPageActions.setOrganization):\r\n state.organization = action.payload;\r\n return;\r\n }\r\n },\r\n initialState\r\n);\r\n","import produce from 'immer';\r\nimport { getType } from 'typesafe-actions';\r\nimport { ContextTableActions, contextTableActions } from './actions';\r\nimport { SeriesContext } from '../../types/SeriesContext';\r\nimport createUniqueArray from '../../utils/createUniqueArray';\r\nimport { TableContext } from '../../types/TableContext';\r\n\r\nexport interface ContextTableState {\r\n allSeriesTables: number[],\r\n seriesTableById: { [seriesID: string] : SeriesContext[] },\r\n allTables: number[],\r\n tablesById: { [tableID: number] : TableContext[] },\r\n}\r\n\r\nexport const initialState: ContextTableState = {\r\n allSeriesTables: [],\r\n seriesTableById: {},\r\n allTables: [],\r\n tablesById: {},\r\n};\r\n\r\nexport const contextTableReducer = produce(\r\n (state, action) => {\r\n switch (action.type) {\r\n case getType(contextTableActions.series.add):\r\n state.allSeriesTables =\r\n createUniqueArray([...state.allSeriesTables, Number(action.meta)]);\r\n state.seriesTableById[action.meta] = action.payload;\r\n return;\r\n case getType(contextTableActions.table.add):\r\n state.allTables =\r\n createUniqueArray([...state.allTables, action.meta]);\r\n state.tablesById[action.meta] = action.payload;\r\n return;\r\n }\r\n }, initialState,\r\n);\r\n","import { SortOrder } from '../../utils/enums';\r\nimport produce from 'immer';\r\nimport { catalogActions, CatalogActions } from './actions';\r\nimport { getType } from 'typesafe-actions';\r\nimport { Publisher } from '../../types/Publisher';\r\nimport { CatalogReport } from '../../types/CatalogReport';\r\nimport { CatalogArea } from '../../types/CatalogArea';\r\nimport { CatalogCategory } from '../../types/CatalogCategory';\r\nimport { CatalogCountry } from '../../types/CatalogCountry';\r\n\r\nexport interface CatalogState {\r\n sort: string,\r\n sortOrder: SortOrder,\r\n filterItems: {\r\n publisherId: number[],\r\n reportCode: string[],\r\n areaId: number[],\r\n categoryId: number[],\r\n measureId: number[],\r\n countryId: number[],\r\n },\r\n filterUtils: {\r\n sortOrder: SortOrder,\r\n search: string,\r\n },\r\n publishers: Publisher[],\r\n reports: CatalogReport[],\r\n areas: CatalogArea[];\r\n categories: CatalogCategory[];\r\n measure: CatalogCategory[];\r\n countries: CatalogCountry[];\r\n}\r\n\r\nexport const initialState: CatalogState = {\r\n sort: 'All',\r\n sortOrder: SortOrder.DESCENDING,\r\n filterItems: {\r\n publisherId: [],\r\n reportCode: [],\r\n areaId: [],\r\n categoryId: [],\r\n measureId: [],\r\n countryId: [],\r\n },\r\n filterUtils: {\r\n sortOrder: SortOrder.DESCENDING,\r\n search: '',\r\n },\r\n publishers: [],\r\n reports: [],\r\n areas: [],\r\n categories: [],\r\n measure: [],\r\n countries: [],\r\n};\r\n\r\nexport const catalogReducer = produce((state, action) => {\r\n switch (action.type) {\r\n case getType(catalogActions.setSort):\r\n state.sort = action.payload;\r\n return;\r\n case getType(catalogActions.setSortOrder):\r\n state.sortOrder = action.payload;\r\n return;\r\n case getType(catalogActions.filterUtils.setSortOrder):\r\n state.filterUtils.sortOrder = action.payload;\r\n return;\r\n case getType(catalogActions.filterUtils.setSearch):\r\n state.filterUtils.search = action.payload;\r\n return;\r\n case getType(catalogActions.filterUtils.reset):\r\n state.filterUtils.search = '';\r\n state.filterUtils.sortOrder = SortOrder.DESCENDING;\r\n return;\r\n case getType(catalogActions.filter.clearAll):\r\n state.filterItems = { publisherId: [], reportCode: [], areaId: [], categoryId: [], measureId: [], countryId: [] };\r\n return;\r\n // Publishers\r\n case getType(catalogActions.setPublishers):\r\n state.publishers = action.payload;\r\n return;\r\n case getType(catalogActions.filter.addPublisher):\r\n state.filterItems.publisherId.push(action.payload);\r\n return;\r\n case getType(catalogActions.filter.addAllPublisher):\r\n state.filterItems.publisherId = state.publishers.map(({ id }) => id);\r\n return;\r\n case getType(catalogActions.filter.removePublisher):\r\n state.filterItems.publisherId.splice(state.filterItems.publisherId.findIndex((id) => id === action.payload), 1);\r\n return;\r\n case getType(catalogActions.filter.removeAllPublisher):\r\n state.filterItems.publisherId = [];\r\n return;\r\n // Reports\r\n case getType(catalogActions.setReports):\r\n state.reports = action.payload;\r\n return;\r\n case getType(catalogActions.filter.addReport):\r\n state.filterItems.reportCode.push(action.payload);\r\n return;\r\n case getType(catalogActions.filter.addAllReports):\r\n state.filterItems.reportCode = state.reports.map(({ id }) => id);\r\n return;\r\n case getType(catalogActions.filter.removeReport):\r\n state.filterItems.reportCode.splice(state.filterItems.reportCode.findIndex((id) => id === action.payload), 1);\r\n return;\r\n case getType(catalogActions.filter.removeAllReports):\r\n state.filterItems.reportCode = [];\r\n return;\r\n // Areas\r\n case getType(catalogActions.setAreas):\r\n state.areas = action.payload;\r\n return;\r\n case getType(catalogActions.filter.addArea):\r\n state.filterItems.areaId.push(action.payload);\r\n return;\r\n case getType(catalogActions.filter.addAllAreas):\r\n state.filterItems.areaId = state.areas.map(({ id }) => id);\r\n return;\r\n case getType(catalogActions.filter.removeArea):\r\n state.filterItems.areaId.splice(state.filterItems.areaId.findIndex((id) => id === action.payload), 1);\r\n return;\r\n case getType(catalogActions.filter.removeAllAreas):\r\n state.filterItems.areaId = [];\r\n return;\r\n // Categories\r\n case getType(catalogActions.setCategories):\r\n state.categories = action.payload;\r\n return;\r\n case getType(catalogActions.filter.addCategory):\r\n state.filterItems.categoryId.push(action.payload);\r\n return;\r\n case getType(catalogActions.filter.addAllCategories):\r\n state.filterItems.categoryId = state.categories.map(({ id }) => id);\r\n return;\r\n case getType(catalogActions.filter.removeCategory):\r\n state.filterItems.categoryId.splice(state.filterItems.categoryId.findIndex((id) => id === action.payload), 1);\r\n return;\r\n case getType(catalogActions.filter.removeAllCategories):\r\n state.filterItems.categoryId = [];\r\n return;\r\n // Measures\r\n case getType(catalogActions.setMeasures):\r\n state.measure = action.payload;\r\n return;\r\n case getType(catalogActions.filter.addMeasure):\r\n state.filterItems.measureId.push(action.payload);\r\n return;\r\n case getType(catalogActions.filter.addAllMeasures):\r\n state.filterItems.measureId = state.measure.map(({ id }) => id);\r\n return;\r\n case getType(catalogActions.filter.removeMeasure):\r\n state.filterItems.measureId.splice(state.filterItems.measureId.findIndex((id) => id === action.payload), 1);\r\n return;\r\n case getType(catalogActions.filter.removeAllMeasures):\r\n state.filterItems.measureId = [];\r\n return;\r\n // Counties\r\n case getType(catalogActions.setCounties):\r\n state.countries = action.payload;\r\n return;\r\n case getType(catalogActions.filter.addCountry):\r\n state.filterItems.countryId.push(action.payload);\r\n return;\r\n case getType(catalogActions.filter.addAllCounties):\r\n state.filterItems.countryId = state.countries.map(({ id }) => id);\r\n return;\r\n case getType(catalogActions.filter.removeCountry):\r\n state.filterItems.countryId.splice(state.filterItems.countryId.findIndex((id) => id === action.payload), 1);\r\n return;\r\n case getType(catalogActions.filter.removeAllCounties):\r\n state.filterItems.countryId = [];\r\n return;\r\n }\r\n}, initialState);\r\n","import produce from \"immer\";\r\nimport { Announcement } from \"src/scenes/EducationsAndAnnouncements/utils/announcements.types\";\r\nimport { EducationalVideo } from \"src/scenes/EducationsAndAnnouncements/utils/educationalVideos.types\";\r\nimport {\r\n educationsAndAnnouncementsActions,\r\n EducationsAndAnnouncementsActions,\r\n} from \"./actions\";\r\nimport { getType } from \"typesafe-actions\";\r\n\r\ntype EduAndAnn = {\r\n educationalVideos: Array;\r\n announcements: Array;\r\n};\r\n\r\nconst initialState: EduAndAnn = {\r\n announcements: [],\r\n educationalVideos: [],\r\n};\r\n\r\nexport const educationsAndAnnouncementsReducer = produce<\r\n EduAndAnn,\r\n EducationsAndAnnouncementsActions\r\n>((state, action) => {\r\n switch (action.type) {\r\n case getType(educationsAndAnnouncementsActions.announcements.populate): {\r\n const fetchedAnnouncements = action.payload;\r\n state.announcements = fetchedAnnouncements.sort(\r\n (a, b) =>\r\n new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()\r\n );\r\n return;\r\n }\r\n case getType(educationsAndAnnouncementsActions.announcements.add): {\r\n const announcement = action.payload;\r\n state.announcements.push(announcement);\r\n return;\r\n }\r\n case getType(educationsAndAnnouncementsActions.announcements.remove): {\r\n const deletedAnnouncement = action.payload;\r\n const deletedAnnouncementIndex = state.announcements.findIndex(\r\n (a) => a.id === deletedAnnouncement.id\r\n );\r\n if (deletedAnnouncementIndex !== -1) {\r\n state.announcements.splice(deletedAnnouncementIndex, 1);\r\n }\r\n return;\r\n }\r\n case getType(educationsAndAnnouncementsActions.announcements.update): {\r\n const updatedAnnouncement = state.announcements.find(\r\n (a) => a.id === action.payload.id\r\n );\r\n if (updatedAnnouncement) {\r\n updatedAnnouncement.title = String(action.payload.payload.title);\r\n updatedAnnouncement.description = String(\r\n action.payload.payload.description\r\n );\r\n }\r\n return;\r\n }\r\n case getType(\r\n educationsAndAnnouncementsActions.educationalVideos.populate\r\n ): {\r\n const fetchedVideos = action.payload;\r\n state.educationalVideos = fetchedVideos.sort(\r\n (a, b) => new Date(b.created).getTime() - new Date(a.created).getTime()\r\n );\r\n return;\r\n }\r\n case getType(\r\n educationsAndAnnouncementsActions.educationalVideos.removeVideo\r\n ): {\r\n const deletedVideo = action.payload;\r\n const deletedVideoIndex = state.educationalVideos.findIndex(\r\n (ev) => ev.id === deletedVideo.id\r\n );\r\n if (deletedVideoIndex !== -1) {\r\n state.educationalVideos.splice(deletedVideoIndex, 1);\r\n }\r\n return;\r\n }\r\n case getType(\r\n educationsAndAnnouncementsActions.educationalVideos.updateVideo\r\n ): {\r\n const updatedVideo = state.educationalVideos.find(\r\n (ev) => ev.id === action.payload.id\r\n );\r\n if (updatedVideo) {\r\n updatedVideo.title = action.payload.title;\r\n updatedVideo.category = action.payload.category;\r\n updatedVideo.description = action.payload.description;\r\n updatedVideo.thumbnailUri = action.payload.thumbnailUri;\r\n }\r\n return;\r\n }\r\n default:\r\n return state;\r\n }\r\n}, initialState);\r\n","import reduxSaga from \"redux-saga\";\r\nimport { combineReducers, createStore, applyMiddleware, compose } from \"redux\";\r\nimport { StateType } from \"typesafe-actions\";\r\nimport rootSaga from \"./rootSaga\";\r\nimport { menuReducer } from \"./menu/reducers\";\r\nimport { recordsRootReducer } from \"./records/reducers\";\r\nimport { productReducer } from \"./products/reducers\";\r\nimport { productPageReducer } from \"./productPage/reducers\";\r\nimport { unitReducer } from \"./units/reducers\";\r\nimport { chartReducer } from \"./charts/reducers\";\r\nimport { adminRootReducer } from \"./admin/reducers\";\r\nimport { landingPageReducer } from \"./landingPage/reducers\";\r\nimport { adminPageReducer } from \"./adminPage/reducers\";\r\nimport { authenticationPageReducer } from \"./authentication/reducers\";\r\nimport { contextTableReducer } from \"./contextTable/reducers\";\r\nimport { catalogReducer } from \"./catalog/reducers\";\r\nimport { educationsAndAnnouncementsReducer } from \"./educationsAndAnnouncements/reducers\";\r\n\r\nconst sagaMiddleware = reduxSaga();\r\n\r\nconst middleware = [sagaMiddleware];\r\n\r\nexport const rootReducer = combineReducers({\r\n menu: menuReducer,\r\n records: recordsRootReducer,\r\n product: productReducer,\r\n productPage: productPageReducer,\r\n units: unitReducer,\r\n charts: chartReducer,\r\n admin: adminRootReducer,\r\n landingPage: landingPageReducer,\r\n adminPage: adminPageReducer,\r\n authentication: authenticationPageReducer,\r\n contextTable: contextTableReducer,\r\n catalog: catalogReducer,\r\n educationsAndAnnouncements: educationsAndAnnouncementsReducer,\r\n});\r\n\r\nconst composeEnhancers =\r\n ((window as any).__REDUX_DEVTOOLS_EXTENSION__ &&\r\n (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) ||\r\n compose;\r\n\r\nexport type RootState = StateType;\r\n\r\nconst store = createStore(\r\n rootReducer,\r\n process.env.NODE_ENV === \"production\"\r\n ? applyMiddleware(...middleware)\r\n : composeEnhancers(applyMiddleware(...middleware))\r\n);\r\n\r\nexport default store;\r\n\r\nsagaMiddleware.run(rootSaga);\r\n","import * as oidc from 'oidc-client';\r\nimport store from '../store';\r\nimport { authActions } from './actions';\r\nimport { AuthState } from './reducers';\r\n\r\n// TODO: set ENV file....\r\nconst url = window.location.origin;\r\n\r\nconst userManager = new oidc.UserManager({\r\n authority: `${process.env.REACT_APP_ADMIN_API_URL}/identity`,\r\n // authority: 'https://identityserver4-udm-dev.azurewebsites.net',\r\n client_id: 'udmjs',\r\n // redirect_uri: 'http://localhost:3000/callback.html',\r\n redirect_uri: `${url}/callback/login`,\r\n silent_redirect_uri: `${url}/callback/refresh`,\r\n post_logout_redirect_uri: `${url}/callback/logout`,\r\n automaticSilentRenew: true,\r\n response_type: 'id_token token',\r\n scope: 'openid profile roles dairymarkets_organization_api dairymarkets_identity_api dairymarkets_direct_api dairymarkets_admin_api',\r\n});\r\n\r\nuserManager.events.addAccessTokenExpired( () => {\r\n store.dispatch(authActions.token.expired());\r\n store.dispatch(authActions.set.authState(AuthState.expired));\r\n});\r\n\r\nuserManager.events.addAccessTokenExpiring( () => {\r\n store.dispatch(authActions.token.expiring());\r\n});\r\n\r\nuserManager.events.addUserLoaded(() => {\r\n store.dispatch(authActions.token.update());\r\n});\r\n\r\nexport default userManager;\r\n","import * as React from \"react\";\r\nimport { Redirect } from \"react-router\";\r\n\r\nclass DashboardScene extends React.Component {\r\n public render() {\r\n return (\r\n <>\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default DashboardScene;\r\n","import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport color from '../../../../utils/color';\r\n\r\nconst ItemContainer = styled.div`\r\n margin: 15px 0;\r\n`;\r\n\r\nconst ItemHeader = styled.div`\r\n color: ${color.PRIMARY};\r\n font-size: 18px;\r\n padding-bottom: 10px;\r\n border-bottom: ${color.NEUTRAL} solid 1px;\r\n margin-bottom: 10px;\r\n`;\r\n\r\nconst ItemData = styled.div`\r\n padding: 2px 0;\r\n`;\r\nconst ItemContentWrapper = styled.div`\r\n padding-top: 5px;\r\n font-size: 12px;\r\n`;\r\n\r\ninterface Item {\r\n reportTitle: string,\r\n reportName: string,\r\n publisherName: string,\r\n country: string,\r\n url?: string,\r\n releaseDate: string,\r\n datePeriod: string,\r\n}\r\n\r\ninterface Props {\r\n item: Item,\r\n}\r\n\r\nconst CatalogMenuHomeItem: React.FC = ({item}) => (\r\n \r\n {item.reportTitle}\r\n \r\n Report Name: {item.reportName}\r\n Publisher Name: {item.publisherName}\r\n Country: {item.country}\r\n {item.url ? URL: {item.url} : null}\r\n Next Release Date: {item.releaseDate}\r\n Date Period: {item.datePeriod}\r\n \r\n \r\n);\r\n\r\nexport default CatalogMenuHomeItem;\r\n","import * as React from 'react';\r\nimport CatalogMenuHomeItem from './CatalogMenuHomeItem';\r\nimport styled from 'styled-components';\r\nimport color from '../../../../utils/color';\r\n\r\nconst items = [\r\n {\r\n reportTitle: 'Production of major industrial products',\r\n reportName: 'Produkcja wazniejszych wyrobow przemyslowyxh',\r\n publisherName: 'Glowny Urzad Statystyczny',\r\n country: 'Poland',\r\n url: 'http://loremipsum.com',\r\n releaseDate: 'October 27. 2018',\r\n datePeriod: '1/1/2004 - 10/18/2018',\r\n },\r\n {\r\n reportTitle: 'Processed Dairy Product Prices',\r\n reportName: 'Prix des produits laitiers industriels',\r\n publisherName: 'L’ Etablissement national des produits de l’ agriculture et de la mer (FranceAgriMer)',\r\n country: 'France',\r\n releaseDate: 'October 28, 2018',\r\n datePeriod: '1/1/2016 - 10/18/2018',\r\n },\r\n {\r\n reportTitle: 'UK Wholesale Prices',\r\n reportName: 'Uk Wholesale Prices',\r\n publisherName: 'Agriculture & Horticulture Development Board',\r\n country: 'United Kingdom',\r\n releaseDate: 'October 29, 2018',\r\n datePeriod: '1/1/2016 - 10/18/2018',\r\n },\r\n];\r\n\r\nconst CatalogMenuHomeWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst CatalogHomeHeader = styled.div`\r\n font-size: 20px;\r\n padding-bottom: 9px;\r\n border-bottom: ${color.NEUTRAL} solid 2px;\r\n margin-bottom: 15px;\r\n`;\r\n\r\nconst CatalogMenuHome: React.FC = () => (\r\n \r\n \r\n Recently Added Reports\r\n \r\n {items.map((item) => )}\r\n \r\n);\r\n\r\nexport default CatalogMenuHome;\r\n","import { FaSort as SortIcon } from 'react-icons/fa';\r\n\r\nexport default SortIcon;\r\n","import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport color from '../../../../utils/color';\r\nimport SortIcon from 'src/icons/UnfoldMore';\r\nimport Checkbox from '../../../shared/Checkbox/Checkbox';\r\n\r\nconst SortByHeader = styled.div`\r\n font-size: 20px;\r\n padding-bottom: 9px;\r\n border-bottom: ${color.NEUTRAL} solid 2px;\r\n margin-bottom: 15px;\r\n margin-top: 25px;\r\n`;\r\n\r\nconst SortIconWrapper = styled(SortIcon)`\r\n color: ${color.NEUTRAL};\r\n transform: translateY(2px);\r\n font-size: 28px;\r\n margin-right: 10px;\r\n`;\r\n\r\nconst CheckboxWrapper = styled.div`\r\n padding: 3px 0;\r\n`;\r\n\r\nconst SortByFilter: React.FC = () => (\r\n <>\r\n Sort By\r\n Original Names\r\n Translated Names\r\n \r\n);\r\n\r\nexport default SortByFilter;\r\n","import { FaFilter as FilterIcon } from 'react-icons/fa';\r\n\r\nexport default FilterIcon;\r\n","import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport color from '../../../../utils/color';\r\nimport FilterIcon from 'src/icons/FilterIcon';\r\n\r\nconst FilterByHeader = styled.div`\r\n margin-top: 30px;\r\n font-size: 20px;\r\n padding-bottom: 9px;\r\n border-bottom: ${color.NEUTRAL} solid 2px;\r\n margin-bottom: 15px;\r\n`;\r\n\r\nconst FilterIconWrapper = styled(FilterIcon)`\r\n color: ${color.NEUTRAL};\r\n transform: translateY(2px);\r\n margin-right: 10px;\r\n`;\r\n\r\nconst FilterBy: React.FC = () => (\r\n <>\r\n \r\n \r\n Filter By\r\n \r\n \r\n);\r\n\r\nexport default FilterBy;\r\n","import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport CatalogMenuHome from '../../components/Menu/MenuComponents/CatalogHome/CatalogMenuHome';\r\nimport SortByFilter from '../../components/Menu/MenuComponents/SortByFilter/SortByFilter';\r\nimport FilterBy from '../../components/Menu/MenuComponents/FilterBy/FilterBy';\r\nimport { RouteComponentProps } from 'react-router';\r\n\r\nconst Root = styled.div`\r\n margin-top: 50px;\r\n display: flex;\r\n width: 100%;\r\n justify-content: space-between;\r\n`;\r\n\r\nconst FiltersContainer = styled.div`\r\n width: 25%;\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst MenuContentContainer = styled.div`\r\n width: 70%;\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\ntype Props = RouteComponentProps<{id: string}>;\r\n\r\nclass CatalogMenuScene extends React.Component {\r\n public render () {\r\n return (\r\n \r\n \r\n {/**/}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n}\r\n\r\nexport default CatalogMenuScene;\r\n","import { FaAngleRight as AngleRightIcon } from 'react-icons/fa';\r\n\r\nexport default AngleRightIcon;\r\n","import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport color from '../../../utils/color';\r\n\r\nconst TooltipContent = styled.div<{ isVisible: boolean }>`\r\n display: ${({ isVisible }) => isVisible ? 'block' : 'none'};\r\n position: absolute;\r\n left: 30px;\r\n bottom: 35px;\r\n z-index: 9000;\r\n padding: 10px;\r\n color: ${color.NEUTRAL_DARK};\r\n font-weight: 400;\r\n background-color: ${color.BACKGROUND_SECONDARY};\r\n box-shadow: 2px 2px 2px ${color.NEUTRAL};\r\n border-radius: 10px;\r\n`;\r\n\r\nconst SelectedArrow = styled.div`\r\n position: absolute;\r\n width: 0;\r\n height: 0;\r\n z-index: 9999;\r\n bottom: -15px;\r\n left: calc(50% - 10px);\r\n transform: translateY(-55%);\r\n border-left: 7px solid transparent;\r\n border-right: 7px solid transparent;\r\n border-top: 10px solid ${color.BACKGROUND_SECONDARY};\r\n filter: drop-shadow(2px 3px 1px ${color.NEUTRAL});\r\n`;\r\n\r\ninterface Props {\r\n isVisible: boolean\r\n}\r\n\r\nconst Tooltip: React.FC = ({ isVisible, children }) => (\r\n \r\n {children}\r\n \r\n \r\n);\r\n\r\nexport default Tooltip;\r\n","import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport AngleRightIcon from '../../../../icons/AngleRightIcon';\r\nimport AngleDownIcon from 'src/icons/AngleDownIcon';\r\nimport color from '../../../../utils/color';\r\nimport { NavMenuDto } from '../../../../types/dto/NavMenuDto';\r\nimport { menuActions } from '../../../../ducks/menu/actions';\r\nimport Tooltip from '../../../shared/Tooltip/Tooltip';\r\n\r\nconst Submenu = styled.div`\r\n margin-left: 20px;\r\n`;\r\n\r\nconst ArrowContainer = styled.div`\r\n color: ${color.PRIMARY};\r\n margin-right: 10px;\r\n transform: translateY(3px);\r\n`;\r\n\r\nconst ItemWrapper = styled.div<{hasChildren: boolean, isSelected: boolean}>`\r\n display: flex;\r\n position: relative;\r\n font-size: 14px;\r\n font-weight: ${({ isSelected }) => isSelected ? 600 : 400};\r\n cursor: pointer;\r\n padding: 10px 0;\r\n margin-left: ${({ hasChildren }) => hasChildren ? '0' : '15px'};\r\n`;\r\n\r\nconst TextContainer = styled.div`\r\n display: inline;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n`;\r\n\r\ninterface Props {\r\n item: NavMenuDto,\r\n selectedMenuID: number,\r\n setSelectedMenu: typeof menuActions.navMenu.setSelectedMenu,\r\n getMenu: typeof menuActions.menu.get,\r\n}\r\n\r\ninterface State {\r\n isExpanded: boolean\r\n isHovered: boolean,\r\n}\r\n\r\nclass BrowseDataItem extends React.Component {\r\n public state = {\r\n isExpanded: false,\r\n isHovered: false,\r\n };\r\n\r\n public componentDidMount() {\r\n window.addEventListener(`expandSubmenu-${this.props.item.id}`, this.handleSubmenuExpansion);\r\n }\r\n\r\n public componentWillUnmount() {\r\n window.removeEventListener(`expandSubmenu-${this.props.item.id}`, this.handleSubmenuExpansion);\r\n }\r\n\r\n public render() {\r\n const { item, setSelectedMenu, selectedMenuID, getMenu } = this.props;\r\n const { isExpanded, isHovered } = this.state;\r\n return (\r\n <>\r\n \r\n {item.children.length ? isExpanded\r\n ? \r\n : \r\n : null}\r\n \r\n {item.text}\r\n \r\n \r\n {item.text}\r\n \r\n {isExpanded &&\r\n (item.children.length\r\n ? {item.children.map((submenuItem) =>\r\n )}\r\n \r\n : null)\r\n }\r\n \r\n )\r\n }\r\n\r\n private onDownIconClickHandler = () => {this.setState({ isExpanded: false })};\r\n\r\n private onRightIconClickHandler = () => {this.setState({ isExpanded: true })};\r\n\r\n private onMouseInHandler = (menuID: number) => () => {\r\n const element = document.getElementById(`submenu-${menuID}`);\r\n if (this.isOverflown(element)) {\r\n this.setState({isHovered: true})\r\n }\r\n };\r\n\r\n private onMouseOutHandler = () => {this.setState({ isHovered: false })};\r\n\r\n private isOverflown = (element: HTMLElement | null) =>\r\n element && (element.scrollHeight > element.clientHeight || element.scrollWidth > element.clientWidth);\r\n\r\n private onSubmenuClickHandler = (submenu: NavMenuDto) => () => {\r\n this.setState({isExpanded: true});\r\n this.props.setSelectedMenu(submenu);\r\n if (!submenu.children.length) {\r\n this.props.getMenu(submenu.id);\r\n }\r\n };\r\n\r\n private handleSubmenuExpansion = () => {\r\n this.setState({isExpanded: !this.state.isExpanded});\r\n };\r\n}\r\n\r\nexport default BrowseDataItem;\r\n","import { FaSearch as SearchIcon } from 'react-icons/fa';\r\n\r\nexport default SearchIcon;\r\n","import * as React from 'react';\r\nimport BrowseDataItem from './BrowseDataItem';\r\nimport styled from 'styled-components';\r\nimport color from '../../../../utils/color';\r\nimport SearchIcon from '../../../../icons/SearchIcon';\r\nimport { connect } from 'react-redux';\r\nimport { NavMenuDto } from '../../../../types/dto/NavMenuDto';\r\nimport { menuActions } from '../../../../ducks/menu/actions';\r\n\r\nconst BrowseDataHeader = styled.div`\r\n font-size: 20px;\r\n padding-bottom: 9px;\r\n border-bottom: ${color.NEUTRAL} solid 2px;\r\n margin-bottom: 15px;\r\n`;\r\n\r\nconst SearchIconWrapper = styled(SearchIcon)`\r\n color: ${color.NEUTRAL};\r\n transform: translateY(2px);\r\n margin-right: 10px;\r\n`;\r\n\r\ninterface OwnProps {\r\n data: NavMenuDto[],\r\n selectedMenuID: number,\r\n}\r\n\r\ntype Props = OwnProps & typeof mapDispatchToProps;\r\n\r\nclass BrowseData extends React.Component {\r\n public render() {\r\n const { data , setSelectedMenu, selectedMenuID, getMenu } = this.props;\r\n return (\r\n <>\r\n Browse Data\r\n {data.map((item: NavMenuDto) =>\r\n )}\r\n \r\n )\r\n }\r\n}\r\n\r\nconst mapDispatchToProps = {\r\n setSelectedMenu: menuActions.navMenu.setSelectedMenu,\r\n getMenu: menuActions.menu.get,\r\n};\r\n\r\nexport default connect(null, mapDispatchToProps)(BrowseData);\r\n","import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport { Menu } from '../../../../types/Menu';\r\nimport color from '../../../../utils/color';\r\nimport { format } from 'date-fns';\r\nimport { Link } from 'react-router-dom';\r\nimport formatValue from '../../../../utils/formatValue';\r\nimport LongArrowDown from 'src/icons/LongArrowDown';\r\nimport LongArrowUp from 'src/icons/LongArrowUp';\r\n\r\nconst Root = styled.div<{ isExpanded: boolean }>`\r\n width: 100%;\r\n margin-bottom: ${({ isExpanded }) => isExpanded ? '40px' : '25px'};\r\n`;\r\n\r\nconst StyledLink = styled(Link)`\r\n text-decoration: none;\r\n`;\r\n\r\nconst Header = styled.div`\r\n border-bottom: 1px solid ${color.NEUTRAL};\r\n`;\r\n\r\nconst HeaderText = styled.div`\r\n font-size: 16px;\r\n font-weight: 600;\r\n color: ${color.PRIMARY};\r\n margin-bottom: 3px;\r\n`;\r\n\r\nconst Content = styled.div`\r\n display: flex;\r\n margin-top: 10px;\r\n justify-content: space-between;\r\n width: 100%;\r\n`;\r\n\r\nconst Label = styled.div`\r\n font-weight: 600;\r\n display: inline;\r\n`;\r\n\r\nconst Item = styled.div`\r\n padding: 5px;\r\n font-size: 13px;\r\n`;\r\n\r\nconst YearOnYearValue = styled.span<{ isNegative: boolean }>`\r\n color: ${({ isNegative }) => isNegative ? color.NEGATIVE : color.POSITIVE};\r\n`;\r\n\r\nconst ArrowDown = styled(LongArrowDown)`\r\n transform: translateY(2px);\r\n`;\r\n\r\nconst ArrowUp = styled(LongArrowUp)`\r\n transform: translateY(2px);\r\n`;\r\n\r\ninterface Props {\r\n item: Menu,\r\n isExpanded: boolean,\r\n}\r\n\r\nconst ReportItem: React.FC = ({ item, isExpanded }) => {\r\n const { name, nameTranslated, report, unit, id, scale } = item;\r\n const { description } = unit;\r\n return (\r\n \r\n
{nameTranslated}
\r\n { isExpanded &&\r\n \r\n
\r\n {name && {name}}\r\n {description && {description}}\r\n {report && report.areaFrequencys && {report.areaFrequencys[0].area.name}}\r\n
\r\n
\r\n {report && report.lastReportPeriod\r\n && {format(new Date(report.lastReportPeriod), 'MMMM YYYY')}}\r\n {report && report.lastReportValue && {formatValue(scale)(report.lastReportValue)}}\r\n {report && report.yoYChangePercentage &&\r\n \r\n \r\n \r\n {report.yoYChangePercentage.toFixed(2)}%\r\n {report.yoYChangePercentage < 0 ? : }\r\n \r\n }\r\n
\r\n
\r\n }\r\n
\r\n );\r\n};\r\n\r\nexport default ReportItem;\r\n","import { FaEquals as MinExpandIcon } from 'react-icons/fa';\r\n\r\nexport default MinExpandIcon;\r\n","import { FaBars as MidExpandIcon } from 'react-icons/fa';\r\n\r\nexport default MidExpandIcon;\r\n","import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport color from '../../../../utils/color';\r\nimport { connect } from 'react-redux';\r\nimport { menuActions } from '../../../../ducks/menu/actions';\r\nimport { NavMenuDto } from '../../../../types/dto/NavMenuDto';\r\nimport { Menu } from '../../../../types/Menu';\r\nimport ReportItem from '../ReportItem/ReportItem';\r\nimport MinExpandIcon from 'src/icons/MinExpandIcon';\r\nimport MidExpandIcon from 'src/icons/MidExpandIcon';\r\n\r\nconst Text = styled.div`\r\n font-size: 20px;\r\n margin: 0 0 10px 5px;\r\n font-weight: 400;\r\n color: ${color.TEXT_PRIMARY};\r\n`;\r\n\r\nconst Content = styled.div`\r\n width: 100%;\r\n`;\r\n\r\nconst HeaderTextWrapper = styled.div`\r\n border-bottom: ${color.NEUTRAL} solid 2px;\r\n width: 100%;\r\n`;\r\n\r\nconst IconsWrapper = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n margin-left: 30px;\r\n padding: 0 10px;\r\n border-bottom: ${color.NEUTRAL} solid 2px;\r\n`;\r\n\r\nconst SubmenuWrapper = styled.div`\r\n margin-top: 20px;\r\n cursor: pointer;\r\n`;\r\n\r\nconst SubmenuBorderWrapper = styled.div`\r\n border-bottom: ${color.NEUTRAL} solid 1px;\r\n`;\r\n\r\nconst SubmenuText = styled.div`\r\n font-size: 16px;\r\n margin: 15px 0 5px 0;\r\n font-weight: 600;\r\n color: ${color.PRIMARY};\r\n`;\r\n\r\nconst ReportsWrapper = styled.div`\r\n margin-top: 30px;\r\n`;\r\n\r\nconst Header = styled.div`\r\n display: flex;\r\n width: 100%;\r\n justify-content: space-between;\r\n`;\r\n\r\nconst CollapseIcon = styled(MinExpandIcon)<{ isExpanded: boolean }>`\r\n color: ${({ isExpanded }) => isExpanded ? color.NEUTRAL : color.PRIMARY};\r\n font-size: 16px;\r\n cursor: pointer;\r\n transform: translateY(5px);\r\n padding-right: 3px;\r\n`;\r\n\r\nconst ExpandIcon = styled(MidExpandIcon)<{ isExpanded: boolean }>`\r\n color: ${({ isExpanded }) => isExpanded ? color.PRIMARY : color.NEUTRAL};\r\n cursor: pointer;\r\n font-size: 20px;\r\n`;\r\n\r\ninterface OwnProps {\r\n data: NavMenuDto,\r\n reports: Menu[] | null,\r\n}\r\n\r\ntype Props = OwnProps & typeof mapDispatchToProps;\r\n\r\ninterface State {\r\n isExpanded: boolean,\r\n}\r\n\r\nclass MenuContent extends React.Component {\r\n public state = {\r\n isExpanded: false,\r\n };\r\n\r\n public render() {\r\n const { data, reports } = this.props;\r\n const { isExpanded } = this.state;\r\n return (\r\n \r\n
\r\n {data && data.text}\r\n {reports &&\r\n \r\n \r\n \r\n \r\n }\r\n
\r\n {reports && {reports.map((report) => )}}\r\n \r\n {!reports && data && data.children.map((submenuItem) =>\r\n \r\n {submenuItem.text}\r\n )}\r\n \r\n
\r\n );\r\n }\r\n\r\n private onMenuSelectHandler = (submenuItem: NavMenuDto) => () => {\r\n this.props.setSelectedMenu(submenuItem);\r\n if (!submenuItem.children.length) {\r\n this.props.getMenu(submenuItem.id);\r\n }\r\n\r\n window.dispatchEvent(new CustomEvent(`expandSubmenu-${submenuItem.id}`));\r\n };\r\n\r\n private onMenuExpansionHandler = () => {this.setState({ isExpanded: true })};\r\n\r\n private onMenuCollapseHandler = () => {this.setState({ isExpanded: false })};\r\n}\r\n\r\nconst mapDispatchToProps = {\r\n setSelectedMenu: menuActions.navMenu.setSelectedMenu,\r\n getMenu: menuActions.menu.get,\r\n};\r\n\r\nexport default connect(null, mapDispatchToProps)(MenuContent);\r\n","import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport BrowseData from '../../components/Menu/MenuComponents/BrowseDataItems/BrowseData';\r\nimport { RouteComponentProps } from 'react-router';\r\nimport MenuContent from '../../components/Menu/MenuComponents/MenuContent/MenuContent';\r\nimport { connect } from 'react-redux';\r\nimport { RootState } from '../../ducks/store';\r\nimport { getMenuReports, getSelectedNavMenuContent, getSelectedSubmenu } from '../../ducks/menu/selectors';\r\n\r\nconst Root = styled.div`\r\n display: flex;\r\n width: 100%;\r\n justify-content: space-between;\r\n`;\r\n\r\nconst FiltersContainer = styled.div`\r\n width: 25%;\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst MenuContentContainer = styled.div`\r\n width: 70%;\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\ntype OwnProps = RouteComponentProps<{id: string}>;\r\n\r\ntype Props = OwnProps & ReturnType;\r\n\r\nclass MenuScene extends React.Component {\r\n public render () {\r\n const { browseDataItems, menuContentItems, menuReports } = this.props;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n}\r\n\r\nconst mapStateToProps = (state: RootState, props: OwnProps) => ({\r\n browseDataItems: getSelectedNavMenuContent(state, props),\r\n menuContentItems: getSelectedSubmenu(state, props),\r\n menuReports: getMenuReports(state, props),\r\n }\r\n);\r\n\r\nexport default connect(mapStateToProps)(MenuScene);\r\n","import * as React from \"react\";\r\nimport Button from \"src/components/shared/Button/Button\";\r\nimport color from \"src/utils/color\";\r\nimport styled from \"styled-components\";\r\nimport subHeroSvg from \"../../media/svg/sub-hero.svg\";\r\nimport { FaCheckCircle } from \"react-icons/fa\";\r\nimport { LuMilk } from \"react-icons/lu\";\r\nimport { GiGrainBundle } from \"react-icons/gi\";\r\nimport { FaCow } from \"react-icons/fa6\";\r\nimport { RouteComponentProps, Link } from \"react-router-dom\";\r\nimport { CategoryRouteState, RouteCategories } from \"./landingPage.types\";\r\n\r\ntype Props = RouteComponentProps;\r\n\r\nconst Hero = styled.div`\r\n height: calc(100vh - 100px);\r\n padding-top: 100px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n color: ${color.TEXT_PRIMARY};\r\n background-color: ${color.BACKGROUND};\r\n`;\r\n\r\nconst Section = styled.div`\r\n text-align: center;\r\n`;\r\n\r\nconst Content = styled.div`\r\n > * + * {\r\n margin-top: 2.5rem;\r\n }\r\n`;\r\n\r\nconst Title = styled.h1`\r\n margin: 0;\r\n font-size: 3rem;\r\n font-weight: 700;\r\n line-height: 3.65rem\r\n font-family: \"Open Sans\", sans-serif;\r\n`;\r\n\r\nconst Description = styled.p`\r\n font-weight: 600;\r\n font-size: 1rem;\r\n line-height: 1.2rem;\r\n`;\r\n\r\nconst DataCategoriesWrapper = styled.section`\r\n display: flex;\r\n justify-content: space-between;\r\n gap: 0.75rem;\r\n\r\n @media (max-width: 565px) {\r\n flex-direction: column;\r\n align-items: center;\r\n }\r\n`;\r\nconst DataCategory = styled.button`\r\n border: 1px solid ${color.PRIMARY};\r\n border-radius: 1rem;\r\n padding: 0.25rem 1rem;\r\n display: flex;\r\n align-items: center;\r\n column-gap: 0.5rem;\r\n font-weight: 600;\r\n font-size: 0.75rem;\r\n line-height: 0.9rem;\r\n color: ${color.TEXT_PRIMARY};\r\n background-color: ${color.BACKGROUND};\r\n cursor: pointer;\r\n\r\n &:hover {\r\n box-shadow: 2px 2px 2px rgba(128, 128, 128, 0.5);\r\n transform: perspective(1px) translateZ(0);\r\n transition-duration: 0.3s;\r\n transition-property: box-shadow;\r\n }\r\n`;\r\n\r\nconst SubHero = styled.section`\r\n background-color: #6eb23f1a;\r\n display: flex;\r\n padding: 10rem 2.5rem;\r\n color: ${color.TEXT_PRIMARY};\r\n\r\n @media (max-width: 855px) {\r\n flex-direction: column;\r\n text-align: center;\r\n padding: 2.5rem;\r\n }\r\n`;\r\nconst SubHeroImageWrapper = styled.div`\r\n flex: 1 1 0%;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n`;\r\nconst Image = styled.img`\r\n width: 75%;\r\n\r\n @media (max-width: 565px) {\r\n width: 50%%;\r\n }\r\n`;\r\nconst SubHeroDescriptionWrapper = styled.div`\r\n flex: 1 1 0%;\r\n padding: 2rem;\r\n`;\r\nconst SubHeroDescription = styled.h2`\r\n font-size: 2.625rem;\r\n font-weight: 700;\r\n line-height: 3.2rem;\r\n`;\r\nconst SubHeroBulletsWrapper = styled.div`\r\n > * + * {\r\n margin-top: 1.5rem;\r\n }\r\n\r\n @media (max-width: 855px) {\r\n text-align: left;\r\n }\r\n`;\r\nconst SubHeroBullet = styled.div`\r\n display: flex;\r\n align-items: center;\r\n column-gap: 1rem;\r\n font-weight: 600;\r\n font-size: 1rem;\r\n line-height: 1.2rem;\r\n\r\n @media (max-width: 565px) {\r\n font-size: 0.75rem;\r\n }\r\n`;\r\n\r\nconst LandingPageScene: React.FC = ({ history }) => {\r\n function handleCategoryClick(category: RouteCategories) {\r\n const categoryRouteState: CategoryRouteState = { section: category };\r\n history.push(\"/udm-api-subscription\", categoryRouteState);\r\n }\r\n\r\n return (\r\n <>\r\n \r\n
\r\n \r\n
\r\n \r\n Making <span style={{ color: color.PRIMARY }}>Data</span> Fun.\r\n \r\n \r\n in a serious way\r\n \r\n
\r\n \r\n UDM is a one-stop shop for all things data.\r\n
\r\n Explore our data categories:\r\n
\r\n \r\n handleCategoryClick(\"dairy-markets\")}\r\n >\r\n \r\n Dairy Markets\r\n \r\n handleCategoryClick(\"grain-feed-markets\")}\r\n >\r\n \r\n Grain/Feed Markets\r\n \r\n handleCategoryClick(\"livestock-markets\")}\r\n >\r\n \r\n Livestock Markets\r\n \r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n One hub for dairy and\r\n livestock market data\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n Aggregate large amounts of data from global sources\r\n
\r\n \r\n
\r\n \r\n
\r\n Data is cleaned and cataloged into relevant formats for use in\r\n Excel or ingestion to internal database\r\n
\r\n \r\n
\r\n \r\n
\r\n Saves time and hassle for organizations by creating one hub for\r\n market data\r\n
\r\n \r\n
\r\n \r\n
\r\n Consolidate even more data easily\r\n
\r\n
\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nexport default LandingPageScene;\r\n","import * as React from \"react\";\r\nimport styled from \"styled-components\";\r\nimport color from \"../../../utils/color\";\r\nimport AngleRightIcon from \"src/icons/AngleRightIcon\";\r\nimport { Link as RouterLink } from \"react-router-dom\";\r\n\r\nconst Root = styled.div`\r\n width: 185px;\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst Item = styled.div<{ isSelected: boolean }>`\r\n display: flex;\r\n align-items: center;\r\n font-weight: ${({ isSelected }) => (isSelected ? 600 : 400)};\r\n cursor: pointer;\r\n padding: 10px 0;\r\n\r\n svg {\r\n color: ${color.PRIMARY};\r\n }\r\n`;\r\n\r\nconst Link = styled(RouterLink)`\r\n text-decoration: none;\r\n color: ${color.TEXT_PRIMARY};\r\n`;\r\n\r\ntype Props = {\r\n selected: string;\r\n onChange: (name: string) => void;\r\n};\r\n\r\nconst catalogList = [\r\n { name: \"Publishers\" },\r\n { name: \"Reports\" },\r\n { name: \"Series\" },\r\n];\r\n\r\nconst CatalogMenu: React.FC = ({ selected, onChange }) => {\r\n const onMenuClick = (name: string) => () => {\r\n if (selected !== name) onChange(name);\r\n };\r\n\r\n return (\r\n \r\n {catalogList.map(({ name }) => (\r\n \r\n \r\n {name}\r\n \r\n ))}\r\n \r\n );\r\n};\r\n\r\nexport default CatalogMenu;\r\n","import { RootState } from '../store';\r\nimport { createSelector } from 'reselect';\r\nimport { getIsTranslatedFromProps } from '../fromPropsSelector';\r\nimport containsString from '../../utils/containsString';\r\nimport { SortOrder } from '../../utils/enums';\r\nimport sortObjectStringsByKey from '../../utils/sortObjectStringsByKey';\r\n\r\nexport const getCatalogSort = (state: RootState) => state.catalog.sort;\r\nexport const getCatalogSortOrder = (state: RootState) => state.catalog.sortOrder;\r\nexport const getCatalogFilterSortOrder = (state: RootState) => state.catalog.filterUtils.sortOrder;\r\nexport const getCatalogFilterSearch = (state: RootState) => state.catalog.filterUtils.search;\r\n\r\n// Publisher\r\nexport const getPublisherIds = (state: RootState) => state.catalog.filterItems.publisherId;\r\nexport const getAllCatalogPublishers = (state: RootState) => state.catalog.publishers;\r\nexport const getCatalogPublishersList = createSelector(\r\n getAllCatalogPublishers,\r\n getPublisherIds,\r\n getIsTranslatedFromProps,\r\n (publishers, ids, isTranslated) =>\r\n publishers.map(({name, nameTranslated, id}) => ({ name: isTranslated ? nameTranslated : name, id, selected: ids.includes(id) })),\r\n);\r\nexport const getFilteredCatalogPublishersList = createSelector(\r\n getCatalogPublishersList,\r\n getCatalogFilterSearch,\r\n getCatalogFilterSortOrder,\r\n (list, search, sort) => {\r\n const newList = list.filter(({ name }) => containsString(name, search)).sort(sortObjectStringsByKey('name'));\r\n if (sort === SortOrder.ASCENDING) {\r\n newList.reverse();\r\n }\r\n return newList;\r\n },\r\n);\r\n\r\n// Report\r\nexport const getReportCode = (state: RootState) => state.catalog.filterItems.reportCode;\r\nexport const getAllCatalogReports = (state: RootState) => state.catalog.reports;\r\nexport const getCatalogReportsList = createSelector(\r\n getAllCatalogReports,\r\n getReportCode,\r\n getIsTranslatedFromProps,\r\n (reports, reportCodes, isTranslated) =>\r\n reports.map(({name, nameTranslated, id, publisher}) =>\r\n ({ name: isTranslated ? nameTranslated : name, id, selected: reportCodes.includes(id), publisher })),\r\n);\r\n\r\nexport const getFilteredCatalogReportsList = createSelector(\r\n getCatalogReportsList,\r\n getCatalogFilterSearch,\r\n getCatalogFilterSortOrder,\r\n getPublisherIds,\r\n (list, search, sort, publisherIds) => {\r\n const newList = list\r\n // .filter(({ publisher }) => publisherIds.length > 0 ? publisherIds.includes(publisher) : true )\r\n .filter(({ name }) => containsString(name, search)).sort(sortObjectStringsByKey('name'));\r\n if (sort === SortOrder.ASCENDING) {\r\n newList.reverse();\r\n }\r\n return newList;\r\n },\r\n);\r\n\r\n// Area\r\nexport const getAreaId = (state: RootState) => state.catalog.filterItems.areaId;\r\nexport const getAllCatalogAreas = (state: RootState) => state.catalog.areas;\r\nexport const getCatalogAreasList = createSelector(\r\n getAllCatalogAreas,\r\n getAreaId,\r\n getIsTranslatedFromProps,\r\n (areas, areaId, isTranslated) =>\r\n areas.map(({name, nameTranslated, id}) => ({ name: isTranslated ? nameTranslated : name, id, selected: areaId.includes(id) })),\r\n);\r\n\r\nexport const getFilteredCatalogAreasList = createSelector(\r\n getCatalogAreasList,\r\n getCatalogFilterSearch,\r\n getCatalogFilterSortOrder,\r\n (list, search, sort) => {\r\n const newList = list.filter(({ name }) => containsString(name, search)).sort(sortObjectStringsByKey('name'));\r\n if (sort === SortOrder.ASCENDING) {\r\n newList.reverse();\r\n }\r\n return newList;\r\n },\r\n);\r\n\r\n// Category\r\nexport const getCategoryId = (state: RootState) => state.catalog.filterItems.categoryId;\r\nexport const getAllCatalogCategories = (state: RootState) => state.catalog.categories;\r\nexport const getCatalogCategoryList = createSelector(\r\n getAllCatalogCategories,\r\n getCategoryId,\r\n getIsTranslatedFromProps,\r\n (categories, categoryId, isTranslated) =>\r\n categories.map(({name, id}) => ({ name, id, selected: categoryId.includes(id) })),\r\n);\r\n\r\nexport const getFilteredCatalogCategoryList = createSelector(\r\n getCatalogCategoryList,\r\n getCatalogFilterSearch,\r\n getCatalogFilterSortOrder,\r\n (list, search, sort) => {\r\n const newList = list.filter(({ name }) => containsString(name, search)).sort(sortObjectStringsByKey('name'));\r\n if (sort === SortOrder.ASCENDING) {\r\n newList.reverse();\r\n }\r\n return newList;\r\n },\r\n);\r\n\r\n// Category\r\nexport const getMeasureId = (state: RootState) => state.catalog.filterItems.measureId;\r\nexport const getAllCatalogMeasures = (state: RootState) => state.catalog.measure;\r\nexport const getCatalogMeasuresList = createSelector(\r\n getAllCatalogMeasures,\r\n getMeasureId,\r\n getIsTranslatedFromProps,\r\n (measure, measureId, isTranslated) =>\r\n measure.map(({name, id}) => ({ name, id, selected: measureId.includes(id) })),\r\n);\r\n\r\nexport const getFilteredCatalogMeasuresList = createSelector(\r\n getCatalogMeasuresList,\r\n getCatalogFilterSearch,\r\n getCatalogFilterSortOrder,\r\n (list, search, sort) => {\r\n const newList = list.filter(({ name }) => containsString(name, search)).sort(sortObjectStringsByKey('name'));\r\n if (sort === SortOrder.ASCENDING) {\r\n newList.reverse();\r\n }\r\n return newList;\r\n },\r\n);\r\n\r\n// Country\r\nexport const getCountryId = (state: RootState) => state.catalog.filterItems.countryId;\r\nexport const getAllCatalogCountries = (state: RootState) => state.catalog.countries;\r\nexport const getCatalogCountriesList = createSelector(\r\n getAllCatalogCountries,\r\n getCountryId,\r\n getIsTranslatedFromProps,\r\n (countries, countryId, isTranslated) =>\r\n countries.map(({name, id}) => ({ name, id, selected: countryId.includes(id) })),\r\n);\r\n\r\nexport const getFilteredCatalogCountriesList = createSelector(\r\n getCatalogCountriesList,\r\n getCatalogFilterSearch,\r\n getCatalogFilterSortOrder,\r\n (list, search, sort) => {\r\n const newList = list.filter(({ name }) => containsString(name, search)).sort(sortObjectStringsByKey('name'));\r\n if (sort === SortOrder.ASCENDING) {\r\n newList.reverse();\r\n }\r\n return newList;\r\n },\r\n);\r\n","import * as React from \"react\";\r\nimport styled from \"styled-components\";\r\nimport color from \"../../utils/color\";\r\nimport SortDownIcon from \"src/icons/SortDownIcon\";\r\nimport { connect } from \"react-redux\";\r\nimport { catalogActions } from \"../../ducks/catalog/actions\";\r\nimport { RootState } from \"../../ducks/store\";\r\nimport { getCatalogSort } from \"../../ducks/catalog/selectors\";\r\n\r\ntype OwnProps = { sortable?: boolean };\r\n\r\ntype Props = OwnProps &\r\n typeof mapDispatchToProps &\r\n ReturnType;\r\n\r\nconst CatalogSortContainer: React.FC = ({\r\n sortable = false,\r\n setSort,\r\n sort,\r\n}) => {\r\n const setCatalogSort = (by: string) => () => {\r\n if (sort !== by) setSort(by);\r\n };\r\n\r\n return (\r\n \r\n {/* \r\n Recent {sortable && }\r\n */}\r\n \r\n All {sortable && }\r\n \r\n {letters.map((letter) => (\r\n \r\n {letter}\r\n \r\n ))}\r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = (state: RootState) => ({ sort: getCatalogSort(state) });\r\n\r\nconst mapDispatchToProps = { setSort: catalogActions.setSort };\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps\r\n)(CatalogSortContainer);\r\n\r\nconst Root = styled.div`\r\n width: 100%;\r\n display: flex;\r\n justify-content: space-between;\r\n color: ${color.PRIMARY};\r\n font-size: 14px;\r\n padding-bottom: 10px;\r\n\r\n svg {\r\n transform: translateY(2px);\r\n }\r\n`;\r\n\r\nconst SortItem = styled.div<{ selected: boolean }>`\r\n cursor: pointer;\r\n font-weight: ${({ selected }) => (selected ? \"bold\" : \"lighter\")};\r\n`;\r\n\r\nconst letters = Array.from({ length: 26 }, (_, i) =>\r\n String.fromCharCode(65 + i)\r\n);\r\n","import axios, { AxiosResponse } from 'axios';\r\n\r\nconst api = axios.create({\r\n baseURL: `${process.env.REACT_APP_ADMIN_API_URL}/direct/catalog/`,\r\n timeout: 20000,\r\n});\r\n\r\nconst addQueryParameter = (currentParams: string, query: string, param: string | number | boolean | number[]) =>\r\n `${currentParams && `${currentParams}&`}${query}=${param}`;\r\n\r\nconst createSearchCriteriaQuery = ({page, pageSize, translated, startsWith, contains}: SearchCriteria) => {\r\n let query = '';\r\n if (page) { query = addQueryParameter(query, 'searchCriteria.page', page); }\r\n if (pageSize) { query = addQueryParameter(query, 'searchCriteria.pageSize', pageSize); }\r\n if (translated !== undefined) { query = addQueryParameter(query, 'searchCriteria.translated', translated); }\r\n if (startsWith) { query = addQueryParameter(query, 'searchCriteria.startsWith', startsWith); }\r\n if (contains) { query = addQueryParameter(query, 'searchCriteria.contains', contains); }\r\n return query ? `?${query}` : '';\r\n};\r\n\r\nconst createSearchSeriesQuery =\r\n (searchCriteria: SearchCriteria, {publisherId, areaId, categoryId, measureId, reportCode, countryId}: CatalogFilters) => {\r\n let query = createSearchCriteriaQuery(searchCriteria);\r\n if (publisherId && publisherId.length > 0) { query = addQueryParameter(query, 'publisherId', publisherId.toString()); }\r\n if (areaId && areaId.length > 0) { query = addQueryParameter(query, 'areaId', areaId.toString()); }\r\n if (categoryId && categoryId.length > 0) { query = addQueryParameter(query, 'categoryId', categoryId.toString()); }\r\n if (measureId && measureId.length > 0) { query = addQueryParameter(query, 'measureId', measureId.toString()); }\r\n if (reportCode && reportCode.length > 0) { query = addQueryParameter(query, 'reportCode', reportCode.toString()); }\r\n if (countryId && countryId.length > 0) { query = addQueryParameter(query, 'countryId', countryId.toString()); }\r\n return query ? query : '';\r\n};\r\n\r\ninterface CatalogFilters {\r\n publisherId?: number[],\r\n areaId?: number[],\r\n categoryId?: number[],\r\n measureId?: number[],\r\n reportCode?: string[],\r\n countryId?: number[],\r\n}\r\n\r\ninterface SearchCriteria {\r\n page?: number,\r\n pageSize?: number,\r\n translated?: boolean,\r\n contains?: string,\r\n startsWith?: string,\r\n}\r\n\r\nconst catalogAPI = {\r\n searchSeries: async (searchCriteria: SearchCriteria, catalogSeries: CatalogFilters) =>\r\n api.get(`series${createSearchSeriesQuery(searchCriteria, catalogSeries)}`)\r\n .then((response: AxiosResponse<{ HasNext: boolean, Data: Array<{ Id: number, Name: string }> }>) => ({\r\n data: response.data.Data ? response.data.Data.map(({Id, Name}: {Id: number, Name: string}) => ({id: Id, name: Name})) : [],\r\n hasNext: response.data.HasNext,\r\n })),\r\n searchReports: async (searchCriteria: SearchCriteria, catalogSeries: CatalogFilters) =>\r\n api.get(`report${createSearchSeriesQuery(searchCriteria, catalogSeries)}`)\r\n .then((response: AxiosResponse<{ HasNext: boolean, Data: Array<{ Id: number, Name: string, Code: string }> }>) => ({\r\n data: response.data.Data ? response.data.Data.map(({Code, Name}: {Code: string, Name: string}) => ({id: Code, name: Name})) : [],\r\n hasNext: response.data.HasNext,\r\n })),\r\n searchPublishers: async (searchCriteria: SearchCriteria, catalogSeries: CatalogFilters) =>\r\n api.get(`publisher${createSearchSeriesQuery(searchCriteria, catalogSeries)}`)\r\n .then((response: AxiosResponse<{ HasNext: boolean, Data: Array<{ Id: number, Name: string }> }>) => ({\r\n data: response.data.Data ? response.data.Data.map(({Id, Name}: {Id: number, Name: string}) => ({id: Id, name: Name})) : [],\r\n hasNext: response.data.HasNext,\r\n })),\r\n};\r\n\r\nexport default catalogAPI;\r\n","import * as React from \"react\";\r\nimport styled from \"styled-components\";\r\nimport color from \"../../../utils/color\";\r\nimport Button from \"../Button/Button\";\r\nimport Checkbox from \"../Checkbox/Checkbox\";\r\nimport ContentSearch from \"../../AdminPanel/adminPanel/ContentSearch\";\r\nimport { SortOrder } from \"../../../utils/enums\";\r\nimport SortUpIcon from \"../../../icons/SortUpIcon\";\r\nimport SortDownIcon from \"../../../icons/SortDownIcon\";\r\nimport MinusIcon from \"../../../icons/MinusIcon\";\r\n\r\nconst HeaderContainer = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n padding: 0.25rem 0.5rem;\r\n`;\r\n\r\nconst Header = styled.div`\r\n font-size: 20px;\r\n color: ${color.TEXT_PRIMARY};\r\n`;\r\n\r\nconst SearchContainer = styled.div`\r\n display: flex;\r\n align-items: center;\r\n column-gap: 0.5rem;\r\n font-size: 16px;\r\n font-weight: lighter;\r\n`;\r\n\r\nconst ButtonContainer = styled.div`\r\n display: flex;\r\n flex-wrap: nowrap;\r\n flex-direction: row-reverse;\r\n margin: 20px 10px 10px 10px;\r\n\r\n & > button {\r\n margin-left: 7px;\r\n }\r\n`;\r\n\r\nconst ListTitleContainer = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n`;\r\n\r\nconst ListTitle = styled.div`\r\n margin: 0 15px 5px 15px;\r\n font-size: 18px;\r\n\r\n svg {\r\n color: ${color.PRIMARY};\r\n font-size: 16px;\r\n }\r\n`;\r\n\r\nconst ClearSelect = styled.div`\r\n font-size: 14px;\r\n color: ${color.PRIMARY};\r\n font-weight: 400;\r\n margin-bottom: 5px;\r\n margin-right: 15px;\r\n cursor: pointer;\r\n\r\n svg {\r\n transform: translateY(2px);\r\n }\r\n`;\r\n\r\nconst ListContainer = styled.div`\r\n padding-top: 5px;\r\n border-top: ${color.NEUTRAL} solid 1px;\r\n border-bottom: ${color.NEUTRAL} solid 1px;\r\n margin: 0 15px;\r\n height: 40vh;\r\n overflow-y: auto;\r\n font-weight: lighter;\r\n`;\r\n\r\nconst ListItem = styled.div`\r\n display: flex;\r\n align-items: flex-start;\r\n margin-top: 5px;\r\n\r\n &:last-child {\r\n margin-bottom: 5px;\r\n }\r\n\r\n p {\r\n font-size: 16px;\r\n padding-right: 10px;\r\n }\r\n\r\n div {\r\n transform: translateY(-3px);\r\n }\r\n`;\r\n\r\ntype Props = {\r\n name: string;\r\n onClose: () => void;\r\n onListItemClick: (id: string | number) => () => void;\r\n list: Array<{\r\n selected: boolean;\r\n name: string;\r\n id: string | number;\r\n }>;\r\n onClearSelectClick: () => void;\r\n search: string;\r\n onSearchChange: (event: React.ChangeEvent) => void;\r\n sortOrder: SortOrder;\r\n onSortClick: () => void;\r\n};\r\n\r\nconst CatalogSelectModal: React.FC = ({\r\n onClose,\r\n name,\r\n list,\r\n search,\r\n onSearchChange,\r\n onListItemClick,\r\n onClearSelectClick,\r\n sortOrder,\r\n onSortClick,\r\n}) => (\r\n <>\r\n \r\n
Select {name}
\r\n \r\n {name}:\r\n \r\n \r\n
\r\n \r\n \r\n List of {name}{\" \"}\r\n {sortOrder === SortOrder.ASCENDING ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n \r\n Clear Select\r\n \r\n \r\n \r\n {list.map(({ selected, name: itemName, id }) => (\r\n \r\n
\r\n \r\n
\r\n

{itemName}

\r\n
\r\n ))}\r\n
\r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default CatalogSelectModal;\r\n\r\nconst LocalContentSearch = styled(ContentSearch)`\r\n margin: 0;\r\n`;\r\n","import * as React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { catalogActions } from 'src/ducks/catalog/actions';\r\nimport CatalogSelectModal from '../../../components/shared/Modal/CatalogSelectModal';\r\nimport { RootState } from '../../../ducks/store';\r\nimport {\r\n getCatalogFilterSortOrder, getPublisherIds, getCatalogFilterSearch, getFilteredCatalogPublishersList,\r\n} from '../../../ducks/catalog/selectors';\r\nimport { SortOrder } from '../../../utils/enums';\r\n\r\ninterface OwnProps {\r\n onClose: () => void,\r\n isTranslated: boolean,\r\n}\r\n\r\ntype Props = OwnProps & typeof mapDispatchToProps & ReturnType;\r\n\r\nconst PublishersCatalogContainer: React.FC = ({\r\n getPublishers, onClose, selectedList, addPublisher, removePublisher, removeAllPublisher, setSortOrder, sortOrder, setSearch, search, filteredList,\r\n}) => {\r\n React.useEffect(() => {\r\n getPublishers();\r\n }, []);\r\n\r\n const onListItemClick = (id: number) => () => {\r\n if (selectedList.includes(id)) {\r\n removePublisher(id);\r\n } else {\r\n addPublisher(id);\r\n }\r\n };\r\n\r\n const onClearClick = () => {\r\n removeAllPublisher();\r\n };\r\n\r\n const onSortClick = () => {\r\n if (sortOrder === SortOrder.DESCENDING) {\r\n setSortOrder(SortOrder.ASCENDING)\r\n } else {\r\n setSortOrder(SortOrder.DESCENDING)\r\n }\r\n };\r\n\r\n const onSearchChange = (event: React.ChangeEvent) => {\r\n setSearch(event.target.value);\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = (state: RootState, props: OwnProps) => ({\r\n filteredList: getFilteredCatalogPublishersList(state, props),\r\n selectedList: getPublisherIds(state),\r\n sortOrder: getCatalogFilterSortOrder(state),\r\n search: getCatalogFilterSearch(state),\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n getPublishers: catalogActions.getPublishers,\r\n addPublisher: catalogActions.filter.addPublisher,\r\n removePublisher: catalogActions.filter.removePublisher,\r\n removeAllPublisher: catalogActions.filter.removeAllPublisher,\r\n setSortOrder: catalogActions.filterUtils.setSortOrder,\r\n setSearch: catalogActions.filterUtils.setSearch,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(PublishersCatalogContainer);\r\n","import * as React from 'react';\r\nimport CatalogSelectModal from '../../../components/shared/Modal/CatalogSelectModal';\r\nimport { RootState } from '../../../ducks/store';\r\nimport { connect } from 'react-redux';\r\nimport { catalogActions } from '../../../ducks/catalog/actions';\r\nimport { SortOrder } from '../../../utils/enums';\r\nimport { getCatalogFilterSearch, getCatalogFilterSortOrder, getReportCode, getFilteredCatalogReportsList } from '../../../ducks/catalog/selectors';\r\n\r\ninterface OwnProps {\r\n onClose: () => void,\r\n isTranslated: boolean,\r\n}\r\n\r\ntype Props = OwnProps & typeof mapDispatchToProps & ReturnType;\r\n\r\nconst ReportsCatalogContainer: React.FC = ({\r\n onClose, selectedList, getReports, addReport, removeReport, removeAllReports, setSortOrder, setSearch, sortOrder, search, filteredList,\r\n}) => {\r\n React.useEffect(() => {\r\n getReports();\r\n }, []);\r\n\r\n const onListItemClick = (id: string) => () => {\r\n if (selectedList.includes(id)) {\r\n removeReport(id);\r\n } else {\r\n addReport(id);\r\n }\r\n };\r\n\r\n const onClearClick = () => {\r\n removeAllReports();\r\n };\r\n\r\n const onSortClick = () => {\r\n if (sortOrder === SortOrder.DESCENDING) {\r\n setSortOrder(SortOrder.ASCENDING)\r\n } else {\r\n setSortOrder(SortOrder.DESCENDING)\r\n }\r\n };\r\n\r\n const onSearchChange = (event: React.ChangeEvent) => {\r\n setSearch(event.target.value);\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = (state: RootState, props: OwnProps) => ({\r\n filteredList: getFilteredCatalogReportsList(state, props),\r\n selectedList: getReportCode(state),\r\n sortOrder: getCatalogFilterSortOrder(state),\r\n search: getCatalogFilterSearch(state),\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n getReports: catalogActions.getReports,\r\n addReport: catalogActions.filter.addReport,\r\n removeReport: catalogActions.filter.removeReport,\r\n removeAllReports: catalogActions.filter.removeAllReports,\r\n setSortOrder: catalogActions.filterUtils.setSortOrder,\r\n setSearch: catalogActions.filterUtils.setSearch,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(ReportsCatalogContainer);\r\n","import * as React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { catalogActions } from '../../../ducks/catalog/actions';\r\nimport { getCatalogFilterSearch, getCatalogFilterSortOrder, getFilteredCatalogAreasList, getAreaId } from 'src/ducks/catalog/selectors';\r\nimport { SortOrder } from '../../../utils/enums';\r\nimport { RootState } from '../../../ducks/store';\r\nimport CatalogSelectModal from '../../../components/shared/Modal/CatalogSelectModal';\r\n\r\ninterface OwnProps {\r\n onClose: () => void,\r\n isTranslated: boolean,\r\n}\r\n\r\ntype Props = OwnProps & typeof mapDispatchToProps & ReturnType;\r\n\r\nconst AreasCatalogContainer: React.FC = ({\r\n getAreas, addArea, removeArea, removeAllAreas, setSortOrder, sortOrder, setSearch, search, filteredList, selectedList, onClose,\r\n}) => {\r\n React.useEffect(() => {\r\n getAreas();\r\n }, []);\r\n\r\n const onListItemClick = (id: number) => () => {\r\n if (selectedList.includes(id)) {\r\n removeArea(id);\r\n } else {\r\n addArea(id);\r\n }\r\n };\r\n\r\n const onClearClick = () => {\r\n removeAllAreas();\r\n };\r\n\r\n const onSortClick = () => {\r\n if (sortOrder === SortOrder.DESCENDING) {\r\n setSortOrder(SortOrder.ASCENDING)\r\n } else {\r\n setSortOrder(SortOrder.DESCENDING)\r\n }\r\n };\r\n\r\n const onSearchChange = (event: React.ChangeEvent) => {\r\n setSearch(event.target.value);\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = (state: RootState, props: OwnProps) => ({\r\n filteredList: getFilteredCatalogAreasList(state, props),\r\n selectedList: getAreaId(state),\r\n sortOrder: getCatalogFilterSortOrder(state),\r\n search: getCatalogFilterSearch(state),\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n getAreas: catalogActions.getAreas,\r\n addArea: catalogActions.filter.addArea,\r\n removeArea: catalogActions.filter.removeArea,\r\n removeAllAreas: catalogActions.filter.removeAllAreas,\r\n setSortOrder: catalogActions.filterUtils.setSortOrder,\r\n setSearch: catalogActions.filterUtils.setSearch,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(AreasCatalogContainer);\r\n","import * as React from \"react\";\r\nimport { SortOrder } from \"../../../utils/enums\";\r\nimport CatalogSelectModal from \"../../../components/shared/Modal/CatalogSelectModal\";\r\nimport { RootState } from \"../../../ducks/store\";\r\nimport {\r\n getCatalogFilterSearch,\r\n getCatalogFilterSortOrder,\r\n getFilteredCatalogCategoryList,\r\n getCategoryId,\r\n} from \"../../../ducks/catalog/selectors\";\r\nimport { catalogActions } from \"../../../ducks/catalog/actions\";\r\nimport { connect } from \"react-redux\";\r\n\r\ntype OwnProps = {\r\n onClose: () => void;\r\n isTranslated: boolean;\r\n};\r\n\r\ntype Props = OwnProps &\r\n typeof mapDispatchToProps &\r\n ReturnType;\r\n\r\nconst CategoriesCatalogContainer: React.FC = ({\r\n onClose,\r\n selectedList,\r\n getCategories,\r\n addCategory,\r\n removeCategory,\r\n removeAllCategories,\r\n setSortOrder,\r\n setSearch,\r\n sortOrder,\r\n search,\r\n filteredList,\r\n}) => {\r\n React.useEffect(() => {\r\n getCategories();\r\n }, []);\r\n\r\n const onListItemClick = (id: number) => () => {\r\n if (selectedList.includes(id)) {\r\n removeCategory(id);\r\n } else {\r\n addCategory(id);\r\n }\r\n };\r\n\r\n const onClearClick = () => {\r\n removeAllCategories();\r\n };\r\n\r\n const onSortClick = () => {\r\n if (sortOrder === SortOrder.DESCENDING) {\r\n setSortOrder(SortOrder.ASCENDING);\r\n } else {\r\n setSortOrder(SortOrder.DESCENDING);\r\n }\r\n };\r\n\r\n const onSearchChange = (event: React.ChangeEvent) => {\r\n setSearch(event.target.value);\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = (state: RootState, props: OwnProps) => ({\r\n filteredList: getFilteredCatalogCategoryList(state, props),\r\n selectedList: getCategoryId(state),\r\n sortOrder: getCatalogFilterSortOrder(state),\r\n search: getCatalogFilterSearch(state),\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n getCategories: catalogActions.getCategories,\r\n addCategory: catalogActions.filter.addCategory,\r\n removeCategory: catalogActions.filter.removeCategory,\r\n removeAllCategories: catalogActions.filter.removeAllCategories,\r\n setSortOrder: catalogActions.filterUtils.setSortOrder,\r\n setSearch: catalogActions.filterUtils.setSearch,\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps\r\n)(CategoriesCatalogContainer);\r\n","import * as React from \"react\";\r\nimport { SortOrder } from \"../../../utils/enums\";\r\nimport CatalogSelectModal from \"../../../components/shared/Modal/CatalogSelectModal\";\r\nimport { RootState } from \"../../../ducks/store\";\r\nimport {\r\n getCatalogFilterSearch,\r\n getCatalogFilterSortOrder,\r\n getFilteredCatalogMeasuresList,\r\n getMeasureId,\r\n} from \"../../../ducks/catalog/selectors\";\r\nimport { catalogActions } from \"../../../ducks/catalog/actions\";\r\nimport { connect } from \"react-redux\";\r\n\r\ntype OwnProps = {\r\n onClose: () => void;\r\n isTranslated: boolean;\r\n};\r\n\r\ntype Props = OwnProps &\r\n typeof mapDispatchToProps &\r\n ReturnType;\r\n\r\nconst MeasuresCatalogContainer: React.FC = ({\r\n onClose,\r\n selectedList,\r\n getMeasures,\r\n addMeasure,\r\n removeMeasure,\r\n removeAllMeasures,\r\n setSortOrder,\r\n setSearch,\r\n sortOrder,\r\n search,\r\n filteredList,\r\n}) => {\r\n React.useEffect(() => {\r\n getMeasures();\r\n }, []);\r\n\r\n const onListItemClick = (id: number) => () => {\r\n if (selectedList.includes(id)) {\r\n removeMeasure(id);\r\n } else {\r\n addMeasure(id);\r\n }\r\n };\r\n\r\n const onClearClick = () => {\r\n removeAllMeasures();\r\n };\r\n\r\n const onSortClick = () => {\r\n if (sortOrder === SortOrder.DESCENDING) {\r\n setSortOrder(SortOrder.ASCENDING);\r\n } else {\r\n setSortOrder(SortOrder.DESCENDING);\r\n }\r\n };\r\n\r\n const onSearchChange = (event: React.ChangeEvent) => {\r\n setSearch(event.target.value);\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = (state: RootState, props: OwnProps) => ({\r\n filteredList: getFilteredCatalogMeasuresList(state, props),\r\n selectedList: getMeasureId(state),\r\n sortOrder: getCatalogFilterSortOrder(state),\r\n search: getCatalogFilterSearch(state),\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n getMeasures: catalogActions.getMeasures,\r\n addMeasure: catalogActions.filter.addMeasure,\r\n removeMeasure: catalogActions.filter.removeMeasure,\r\n removeAllMeasures: catalogActions.filter.removeAllMeasures,\r\n setSortOrder: catalogActions.filterUtils.setSortOrder,\r\n setSearch: catalogActions.filterUtils.setSearch,\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps\r\n)(MeasuresCatalogContainer);\r\n","import styled from 'styled-components';\r\nimport color from '../../../../utils/color';\r\n\r\nconst ClearFilterContainer = styled.div`\r\n font-size: 14px;\r\n color: ${color.PRIMARY};\r\n font-weight: 400;\r\n margin-top: 10px;\r\n cursor: pointer;\r\n\r\n svg {transform: translateY(2px);}\r\n`;\r\n\r\nexport default ClearFilterContainer;\r\n","import styled from \"styled-components\";\r\nimport color from \"../../../../utils/color\";\r\n\r\nconst FilterContent = styled.div`\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n margin-bottom: 10px;\r\n border-bottom: ${color.NEUTRAL} solid 2px;\r\n padding-bottom: 10px;\r\n`;\r\n\r\nexport default FilterContent;\r\n","import styled from 'styled-components';\r\n\r\nconst PaginationContainer = styled.div`\r\n display: flex;\r\n`;\r\n\r\nexport default PaginationContainer;\r\n","import styled from \"styled-components\";\r\nimport color from \"../../../../utils/color\";\r\n\r\nconst PaginationBox = styled.div`\r\n height: 35px;\r\n text-align: center;\r\n line-height: 35px;\r\n color: white;\r\n font-size: 14px;\r\n width: 65px;\r\n font-weight: 600;\r\n background-color: ${color.PRIMARY};\r\n border-radius: 1.5rem;\r\n margin-right: 5px;\r\n cursor: pointer;\r\n padding: 0 0.5rem;\r\n`;\r\n\r\nexport default PaginationBox;\r\n","import styled from 'styled-components';\r\nimport color from '../../../../utils/color';\r\n\r\nconst SeriesLink = styled.div`\r\n margin-top: 8px;\r\n\r\n a {\r\n font-weight: lighter;\r\n color: ${color.PRIMARY};\r\n font-size: 18px;\r\n text-decoration: none;\r\n }\r\n`;\r\n\r\nexport default SeriesLink;\r\n","import { IconButton } from \"src/shared/components\";\r\nimport color from \"src/utils/color\";\r\nimport styled from \"styled-components\";\r\n\r\nconst FilterButton = styled(IconButton)`\r\n border: 1px solid ${color.NEUTRAL_LIGHT};\r\n border-radius: 0.5rem;\r\n box-shadow: none;\r\n padding: 0.5rem 1.5rem;\r\n transition: transform 0.1s linear;\r\n font-size: 0.85rem;\r\n align-items: center;\r\n column-gap: 0.5rem;\r\n\r\n svg {\r\n font-size: 0.75rem;\r\n color: ${color.NEUTRAL};\r\n }\r\n\r\n &:hover {\r\n background-color: transparent;\r\n transform: translateY(0.075rem);\r\n }\r\n`;\r\n\r\nexport default FilterButton;\r\n","import { ActionButton } from \"src/shared/components\";\r\nimport color from \"src/utils/color\";\r\nimport styled from \"styled-components\";\r\n\r\nexport const FilterTabsWrapper = styled.div`\r\n display: flex;\r\n background-color: ${color.BACKGROUND_SECONDARY};\r\n padding: 0.25rem 0.75rem;\r\n column-gap: 1rem;\r\n border: 1px solid ${color.NEUTRAL_LIGHT};\r\n border-bottom: 0;\r\n border-top-left-radius: 1rem;\r\n border-top-right-radius: 1rem;\r\n`;\r\n\r\nexport const FilterTab = styled(ActionButton)<{ isActive: boolean }>`\r\n color: ${(props) => (props.isActive ? color.PRIMARY : \"black\")};\r\n`;\r\n\r\nexport const FilterIndicator = styled.sub`\r\n color: ${color.PRIMARY};\r\n font: 0.5rem;\r\n`;\r\n","import color from \"src/utils/color\";\r\nimport styled from \"styled-components\";\r\n\r\nconst ModalContentWrapper = styled.div`\r\n border: 1px solid ${color.NEUTRAL_LIGHT};\r\n border-bottom-left-radius: 5px;\r\n border-bottom-right-radius: 5px;\r\n`;\r\n\r\nexport default ModalContentWrapper;\r\n","import * as React from \"react\";\r\nimport CatalogSortContainer from \"../../containers/CatalogSortContainer/CatalogSortContainer\";\r\nimport LangPicker from \"../../components/shared/LangPicker/LangPicker\";\r\nimport catalogAPI from \"../../services/catalogServices\";\r\nimport { Link } from \"react-router-dom\";\r\nimport PerPage from \"../../components/shared/Pagination/perPage\";\r\nimport PaginationWrapper from \"../../components/AdminPanel/adminPanel/PaginationWrapper\";\r\nimport { RootState } from \"../../ducks/store\";\r\nimport {\r\n getAreaId,\r\n getCatalogSort,\r\n getCategoryId,\r\n getMeasureId,\r\n getPublisherIds,\r\n getReportCode,\r\n} from \"../../ducks/catalog/selectors\";\r\nimport { connect } from \"react-redux\";\r\nimport PublishersCatalogContainer from \"src/containers/catalog/PublishersCatalogContainer/PublishersCatalogContainer\";\r\nimport ReportsCatalogContainer from \"../../containers/catalog/ReportsCatalogContainer/ReportsCatalogContainer\";\r\nimport AreasCatalogContainer from \"../../containers/catalog/AreasCatalogContainer/AreasCatalogContainer\";\r\nimport CategoriesCatalogContainer from \"../../containers/catalog/CategoriesCatalogContainer/CategoriesCatalogContainer\";\r\nimport MeasuresCatalogContainer from \"../../containers/catalog/MeasuresCatalogContainer/MeasuresCatalogContainer\";\r\nimport { catalogActions } from \"../../ducks/catalog/actions\";\r\nimport ClearFilterContainer from \"../../components/Catalog/styles/ClearFilterContainer/ClearFilterContainer\";\r\nimport FilterContent from \"../../components/Catalog/styles/FilterContent/FilterContent\";\r\nimport PaginationContainer from \"src/components/Catalog/styles/PaginationContainer/PaginationContainer\";\r\nimport PaginationBox from \"../../components/Catalog/styles/PaginationBox/PaginationBox\";\r\nimport SeriesLink from \"../../components/Catalog/styles/SeriesLink/SeriesLink\";\r\nimport { RouterState } from \"./CatalogScene\";\r\nimport { useOverlay } from \"src/shared/hooks\";\r\nimport FilterButton from \"src/components/Catalog/styles/FilterContent/FilterButton\";\r\nimport { FaFilter } from \"react-icons/fa\";\r\nimport { Overlay } from \"src/shared/components/overlay\";\r\nimport {\r\n FilterIndicator,\r\n FilterTab,\r\n FilterTabsWrapper,\r\n} from \"src/components/Catalog/styles/FilterContent/FilterTabs\";\r\nimport ModalContentWrapper from \"src/components/Catalog/styles/FilterContent/ModalContentWrapper\";\r\n\r\nenum ModalView {\r\n none,\r\n publishers,\r\n reports,\r\n areas,\r\n categories,\r\n measures,\r\n}\r\n\r\ntype OwnProps = {\r\n search: string;\r\n locationState: RouterState;\r\n};\r\n\r\ntype Props = OwnProps &\r\n ReturnType &\r\n typeof mapDispatchToProps;\r\n\r\nconst CatalogSeriesScene: React.FC = ({\r\n search,\r\n sort,\r\n publisherIdList,\r\n reportsList,\r\n areaList,\r\n categoryList,\r\n measureList,\r\n clearAll,\r\n resetFilterSearch,\r\n locationState,\r\n}) => {\r\n const [translated, setTranslation] = React.useState(\r\n locationState && locationState.translated ? locationState.translated : false\r\n );\r\n const [pageSize, setPageSize] = React.useState(25);\r\n const [page, setPage] = React.useState(1);\r\n const [seriesList, setList] = React.useState<\r\n Array<{ id: number; name: string }>\r\n >([]);\r\n const [hasNext, setHasNext] = React.useState(false);\r\n const [modalView, setModalView] = React.useState(ModalView.none);\r\n const filtersOverlay = useOverlay();\r\n\r\n const switchClick = () => setTranslation(!translated);\r\n\r\n const onPageSizeChange = (event: React.ChangeEvent) =>\r\n setPageSize(Number(event.target.value));\r\n\r\n const setNextPage = () => setPage(page - 1);\r\n const setPreviousPage = () => setPage(page + 1);\r\n\r\n const onFilterClick = (filter: ModalView) => () => {\r\n resetFilterSearch();\r\n setModalView(filter);\r\n };\r\n\r\n const getModalView = () => {\r\n const modalProps = {\r\n onClose: () => {\r\n filtersOverlay.handleClose();\r\n setModalView(ModalView.none);\r\n },\r\n isTranslated: translated,\r\n };\r\n\r\n switch (modalView) {\r\n case ModalView.publishers:\r\n return ;\r\n case ModalView.reports:\r\n return ;\r\n case ModalView.areas:\r\n return ;\r\n case ModalView.categories:\r\n return ;\r\n case ModalView.measures:\r\n return ;\r\n default:\r\n return null;\r\n }\r\n };\r\n\r\n const clearAllFilters = () => {\r\n clearAll();\r\n };\r\n\r\n React.useEffect(() => {\r\n if (modalView === ModalView.none) {\r\n (async () => {\r\n try {\r\n const response = await catalogAPI.searchSeries(\r\n {\r\n pageSize,\r\n translated,\r\n page: page - 1,\r\n contains: search.length >= 3 ? search : \"\",\r\n startsWith: sort === \"All\" || sort === \"Recent\" ? \"\" : sort,\r\n },\r\n {\r\n publisherId: publisherIdList,\r\n reportCode: reportsList,\r\n areaId: areaList,\r\n categoryId: categoryList,\r\n measureId: measureList,\r\n }\r\n );\r\n setList(response.data);\r\n setHasNext(response.hasNext);\r\n } catch (err) {\r\n console.error(\"Error: catalogAPI.searchSeries failed!\", err);\r\n }\r\n })();\r\n }\r\n }, [\r\n translated,\r\n search,\r\n pageSize,\r\n page,\r\n sort,\r\n modalView,\r\n publisherIdList,\r\n reportsList,\r\n areaList,\r\n categoryList,\r\n measureList,\r\n ]);\r\n\r\n return (\r\n <>\r\n \r\n {\r\n onFilterClick(ModalView.publishers)();\r\n filtersOverlay.handleOpen();\r\n }}\r\n >\r\n \r\n Filters\r\n \r\n \r\n Clear all Filters\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n {seriesList.map(({ id, name }) => (\r\n \r\n {name}\r\n \r\n ))}\r\n \r\n {/*TODO: use dataLength from backend*/}\r\n \r\n \r\n {page > 1 && (\r\n Previous\r\n )}\r\n {hasNext && (\r\n Next\r\n )}\r\n \r\n \r\n {\r\n filtersOverlay.handleClose();\r\n setModalView(ModalView.none);\r\n }}\r\n title=\"Catalog Filters\"\r\n >\r\n <>\r\n \r\n \r\n Publishers\r\n {publisherIdList.length > 0 && (\r\n ({publisherIdList.length})\r\n )}\r\n \r\n \r\n Reports\r\n {reportsList.length > 0 && (\r\n ({reportsList.length})\r\n )}\r\n \r\n \r\n Areas\r\n {areaList.length > 0 && (\r\n ({areaList.length})\r\n )}\r\n \r\n \r\n Categories\r\n {categoryList.length > 0 && (\r\n ({categoryList.length})\r\n )}\r\n \r\n \r\n Measures\r\n {measureList.length > 0 && (\r\n ({measureList.length})\r\n )}\r\n \r\n \r\n {getModalView()}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = (state: RootState) => ({\r\n sort: getCatalogSort(state),\r\n publisherIdList: getPublisherIds(state),\r\n reportsList: getReportCode(state),\r\n areaList: getAreaId(state),\r\n categoryList: getCategoryId(state),\r\n measureList: getMeasureId(state),\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n clearAll: catalogActions.filter.clearAll,\r\n resetFilterSearch: catalogActions.filterUtils.reset,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(CatalogSeriesScene);\r\n","import * as React from \"react\";\r\nimport { connect } from \"react-redux\";\r\nimport { catalogActions } from \"../../../ducks/catalog/actions\";\r\nimport {\r\n getCatalogFilterSearch,\r\n getCatalogFilterSortOrder,\r\n getFilteredCatalogCountriesList,\r\n getCountryId,\r\n} from \"src/ducks/catalog/selectors\";\r\nimport { SortOrder } from \"../../../utils/enums\";\r\nimport { RootState } from \"../../../ducks/store\";\r\nimport CatalogSelectModal from \"../../../components/shared/Modal/CatalogSelectModal\";\r\n\r\ntype OwnProps = {\r\n onClose: () => void;\r\n isTranslated: boolean;\r\n};\r\n\r\ntype Props = OwnProps &\r\n typeof mapDispatchToProps &\r\n ReturnType;\r\n\r\nconst CountriesCatalogContainer: React.FC = ({\r\n getCounties,\r\n addCountry,\r\n removeAllCounties,\r\n removeCountry,\r\n setSortOrder,\r\n sortOrder,\r\n setSearch,\r\n search,\r\n filteredList,\r\n selectedList,\r\n onClose,\r\n}) => {\r\n React.useEffect(() => {\r\n getCounties();\r\n }, []);\r\n\r\n const onListItemClick = (id: number) => () => {\r\n if (selectedList.includes(id)) {\r\n removeCountry(id);\r\n } else {\r\n addCountry(id);\r\n }\r\n };\r\n\r\n const onClearClick = () => {\r\n removeAllCounties();\r\n };\r\n\r\n const onSortClick = () => {\r\n if (sortOrder === SortOrder.DESCENDING) {\r\n setSortOrder(SortOrder.ASCENDING);\r\n } else {\r\n setSortOrder(SortOrder.DESCENDING);\r\n }\r\n };\r\n\r\n const onSearchChange = (event: React.ChangeEvent) => {\r\n setSearch(event.target.value);\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = (state: RootState, props: OwnProps) => ({\r\n filteredList: getFilteredCatalogCountriesList(state, props),\r\n selectedList: getCountryId(state),\r\n sortOrder: getCatalogFilterSortOrder(state),\r\n search: getCatalogFilterSearch(state),\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n getCounties: catalogActions.getCounties,\r\n addCountry: catalogActions.filter.addCountry,\r\n removeCountry: catalogActions.filter.removeCountry,\r\n removeAllCounties: catalogActions.filter.removeAllCounties,\r\n setSortOrder: catalogActions.filterUtils.setSortOrder,\r\n setSearch: catalogActions.filterUtils.setSearch,\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps\r\n)(CountriesCatalogContainer);\r\n","import * as React from \"react\";\r\nimport ClearFilterContainer from \"../../../components/Catalog/styles/ClearFilterContainer/ClearFilterContainer\";\r\nimport FilterContent from \"../../../components/Catalog/styles/FilterContent/FilterContent\";\r\nimport { RootState } from \"../../../ducks/store\";\r\nimport {\r\n getCatalogSort,\r\n getCategoryId,\r\n getCountryId,\r\n getMeasureId,\r\n getPublisherIds,\r\n getReportCode,\r\n} from \"../../../ducks/catalog/selectors\";\r\nimport { catalogActions } from \"../../../ducks/catalog/actions\";\r\nimport { connect } from \"react-redux\";\r\nimport CatalogSortContainer from \"../../../containers/CatalogSortContainer/CatalogSortContainer\";\r\nimport LangPicker from \"../../../components/shared/LangPicker/LangPicker\";\r\nimport PaginationWrapper from \"../../../components/AdminPanel/adminPanel/PaginationWrapper\";\r\nimport PerPage from \"../../../components/shared/Pagination/perPage\";\r\nimport PaginationContainer from \"../../../components/Catalog/styles/PaginationContainer/PaginationContainer\";\r\nimport PaginationBox from \"../../../components/Catalog/styles/PaginationBox/PaginationBox\";\r\nimport PublishersCatalogContainer from \"../../../containers/catalog/PublishersCatalogContainer/PublishersCatalogContainer\";\r\nimport CategoriesCatalogContainer from \"../../../containers/catalog/CategoriesCatalogContainer/CategoriesCatalogContainer\";\r\nimport MeasuresCatalogContainer from \"../../../containers/catalog/MeasuresCatalogContainer/MeasuresCatalogContainer\";\r\nimport catalogAPI from \"../../../services/catalogServices\";\r\nimport SeriesLink from \"../../../components/Catalog/styles/SeriesLink/SeriesLink\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { RouterState } from \"../CatalogScene\";\r\nimport CountriesCatalogContainer from \"../../../containers/catalog/CountriesCatalogContainer/CountriesCatalogContainer\";\r\nimport { useOverlay } from \"src/shared/hooks\";\r\nimport { FaFilter } from \"react-icons/fa\";\r\nimport FilterButton from \"src/components/Catalog/styles/FilterContent/FilterButton\";\r\nimport { Overlay } from \"src/shared/components/overlay\";\r\nimport {\r\n FilterIndicator,\r\n FilterTab,\r\n FilterTabsWrapper,\r\n} from \"src/components/Catalog/styles/FilterContent/FilterTabs\";\r\nimport ModalContentWrapper from \"src/components/Catalog/styles/FilterContent/ModalContentWrapper\";\r\n\r\nenum ModalView {\r\n none,\r\n publishers,\r\n countries,\r\n categories,\r\n measures,\r\n}\r\n\r\ntype OwnProps = {\r\n search: string;\r\n locationState: RouterState;\r\n};\r\n\r\ntype Props = OwnProps &\r\n ReturnType &\r\n typeof mapDispatchToProps;\r\n\r\nconst CatalogReportsScene: React.FC = ({\r\n search,\r\n sort,\r\n publisherIdList,\r\n countryList,\r\n categoryList,\r\n measureList,\r\n clearAll,\r\n resetFilterSearch,\r\n locationState,\r\n}) => {\r\n const [translated, setTranslation] = React.useState(\r\n locationState && locationState.translated ? locationState.translated : false\r\n );\r\n const [pageSize, setPageSize] = React.useState(25);\r\n const [page, setPage] = React.useState(1);\r\n const [seriesList, setList] = React.useState<\r\n Array<{ id: string; name: string }>\r\n >([]);\r\n const [hasNext, setHasNext] = React.useState(false);\r\n const [modalView, setModalView] = React.useState(ModalView.none);\r\n const filtersOverlay = useOverlay();\r\n\r\n const switchClick = () => setTranslation(!translated);\r\n\r\n const onPageSizeChange = (event: React.ChangeEvent) =>\r\n setPageSize(Number(event.target.value));\r\n\r\n const setNextPage = () => setPage(page - 1);\r\n const setPreviousPage = () => setPage(page + 1);\r\n\r\n const onFilterClick = (filter: ModalView) => () => {\r\n resetFilterSearch();\r\n setModalView(filter);\r\n };\r\n\r\n const getModalView = () => {\r\n const modalProps = {\r\n onClose: () => {\r\n filtersOverlay.handleClose();\r\n setModalView(ModalView.none);\r\n },\r\n isTranslated: translated,\r\n };\r\n\r\n switch (modalView) {\r\n case ModalView.publishers:\r\n return ;\r\n case ModalView.countries:\r\n return ;\r\n case ModalView.categories:\r\n return ;\r\n case ModalView.measures:\r\n return ;\r\n default:\r\n return null;\r\n }\r\n };\r\n\r\n const clearAllFilters = () => {\r\n clearAll();\r\n };\r\n\r\n React.useEffect(() => {\r\n if (modalView === ModalView.none) {\r\n (async () => {\r\n try {\r\n const response = await catalogAPI.searchReports(\r\n {\r\n pageSize,\r\n translated,\r\n page: page - 1,\r\n contains: search.length >= 3 ? search : \"\",\r\n startsWith: sort === \"All\" || sort === \"Recent\" ? \"\" : sort,\r\n },\r\n {\r\n publisherId: publisherIdList,\r\n countryId: countryList,\r\n categoryId: categoryList,\r\n measureId: measureList,\r\n }\r\n );\r\n setList(response.data);\r\n setHasNext(response.hasNext);\r\n } catch (err) {\r\n console.error(\"Error: catalogAPI.searchReports failed!\", err);\r\n }\r\n })();\r\n }\r\n }, [\r\n translated,\r\n search,\r\n pageSize,\r\n page,\r\n sort,\r\n modalView,\r\n publisherIdList,\r\n countryList,\r\n categoryList,\r\n measureList,\r\n ]);\r\n\r\n const prevValues =\r\n locationState && locationState.nested ? locationState.nested : [];\r\n\r\n return (\r\n <>\r\n \r\n {\r\n onFilterClick(ModalView.countries)();\r\n filtersOverlay.handleOpen();\r\n }}\r\n >\r\n \r\n Filters\r\n \r\n \r\n Clear all Filters\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n {seriesList.map(({ id, name }) => (\r\n \r\n \r\n {name}\r\n \r\n \r\n ))}\r\n \r\n {/*TODO: use dataLength from backend*/}\r\n \r\n \r\n {page > 1 && (\r\n Previous\r\n )}\r\n {hasNext && (\r\n Next\r\n )}\r\n \r\n \r\n {\r\n filtersOverlay.handleClose();\r\n setModalView(ModalView.none);\r\n }}\r\n title=\"Catalog Filters\"\r\n >\r\n <>\r\n \r\n \r\n Publishers\r\n {publisherIdList.length > 0 && (\r\n ({publisherIdList.length})\r\n )}\r\n \r\n \r\n Countries\r\n {countryList.length > 0 && (\r\n ({countryList.length})\r\n )}\r\n \r\n \r\n Categories\r\n {categoryList.length > 0 && (\r\n ({categoryList.length})\r\n )}\r\n \r\n \r\n Measures\r\n {measureList.length > 0 && (\r\n ({measureList.length})\r\n )}\r\n \r\n \r\n {getModalView()}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = (state: RootState) => ({\r\n sort: getCatalogSort(state),\r\n publisherIdList: getPublisherIds(state),\r\n reportsList: getReportCode(state),\r\n countryList: getCountryId(state),\r\n categoryList: getCategoryId(state),\r\n measureList: getMeasureId(state),\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n clearAll: catalogActions.filter.clearAll,\r\n resetFilterSearch: catalogActions.filterUtils.reset,\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps\r\n)(CatalogReportsScene);\r\n","import * as React from \"react\";\r\nimport { RouterState } from \"../CatalogScene\";\r\nimport catalogAPI from \"src/services/catalogServices\";\r\nimport CatalogSortContainer from \"../../../containers/CatalogSortContainer/CatalogSortContainer\";\r\nimport LangPicker from \"../../../components/shared/LangPicker/LangPicker\";\r\nimport SeriesLink from \"../../../components/Catalog/styles/SeriesLink/SeriesLink\";\r\nimport { Link } from \"react-router-dom\";\r\nimport PaginationWrapper from \"src/components/AdminPanel/adminPanel/PaginationWrapper\";\r\nimport PerPage from \"../../../components/shared/Pagination/perPage\";\r\nimport PaginationContainer from \"../../../components/Catalog/styles/PaginationContainer/PaginationContainer\";\r\nimport PaginationBox from \"../../../components/Catalog/styles/PaginationBox/PaginationBox\";\r\nimport { RootState } from \"src/ducks/store\";\r\nimport { connect } from \"react-redux\";\r\nimport { getCatalogSort } from \"../../../ducks/catalog/selectors\";\r\n\r\ntype OwnProps = {\r\n search: string;\r\n locationState: RouterState;\r\n};\r\n\r\ntype Props = OwnProps & ReturnType;\r\n\r\nconst CatalogReportsSeriesScene: React.FC = ({\r\n search,\r\n sort,\r\n locationState,\r\n}) => {\r\n const [translated, setTranslation] = React.useState(\r\n locationState && locationState.translated ? locationState.translated : false\r\n );\r\n const [pageSize, setPageSize] = React.useState(25);\r\n const [page, setPage] = React.useState(1);\r\n const [seriesList, setList] = React.useState<\r\n Array<{ id: number; name: string }>\r\n >([]);\r\n const [hasNext, setHasNext] = React.useState(false);\r\n\r\n const switchClick = () => setTranslation(!translated);\r\n\r\n const onPageSizeChange = (event: React.ChangeEvent) =>\r\n setPageSize(Number(event.target.value));\r\n\r\n const setNextPage = () => setPage(page - 1);\r\n const setPreviousPage = () => setPage(page + 1);\r\n\r\n React.useEffect(() => {\r\n (async () => {\r\n const reportCode =\r\n locationState && locationState.nested\r\n ? [\r\n locationState &&\r\n String(\r\n locationState.nested[\r\n locationState && locationState.nested.length - 1\r\n ].id\r\n ),\r\n ]\r\n : [];\r\n try {\r\n const response = await catalogAPI.searchSeries(\r\n {\r\n pageSize,\r\n translated,\r\n page: page - 1,\r\n contains: search.length >= 3 ? search : \"\",\r\n startsWith: sort === \"All\" || sort === \"Recent\" ? \"\" : sort,\r\n },\r\n { reportCode }\r\n );\r\n setList(response.data);\r\n setHasNext(response.hasNext);\r\n } catch (err) {\r\n console.error(\"Error: catalogAPI.searchSeries failed!\", err);\r\n }\r\n })();\r\n }, [translated, search, pageSize, page, sort]);\r\n\r\n return (\r\n <>\r\n
\r\n \r\n \r\n
\r\n {seriesList.map(({ id, name }) => (\r\n \r\n {name}\r\n \r\n ))}\r\n \r\n {/*TODO: use dataLength from backend*/}\r\n \r\n \r\n {page > 1 && (\r\n Previous\r\n )}\r\n {hasNext && (\r\n Next\r\n )}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = (state: RootState) => ({ sort: getCatalogSort(state) });\r\n\r\nexport default connect(mapStateToProps)(CatalogReportsSeriesScene);\r\n","import * as React from \"react\";\r\nimport ClearFilterContainer from \"../../../components/Catalog/styles/ClearFilterContainer/ClearFilterContainer\";\r\nimport FilterContent from \"../../../components/Catalog/styles/FilterContent/FilterContent\";\r\nimport { RootState } from \"../../../ducks/store\";\r\nimport {\r\n getCatalogSort,\r\n getCategoryId,\r\n getCountryId,\r\n getMeasureId,\r\n} from \"../../../ducks/catalog/selectors\";\r\nimport { catalogActions } from \"../../../ducks/catalog/actions\";\r\nimport { connect } from \"react-redux\";\r\nimport CatalogSortContainer from \"../../../containers/CatalogSortContainer/CatalogSortContainer\";\r\nimport PaginationWrapper from \"../../../components/AdminPanel/adminPanel/PaginationWrapper\";\r\nimport PerPage from \"../../../components/shared/Pagination/perPage\";\r\nimport PaginationContainer from \"../../../components/Catalog/styles/PaginationContainer/PaginationContainer\";\r\nimport PaginationBox from \"../../../components/Catalog/styles/PaginationBox/PaginationBox\";\r\nimport CategoriesCatalogContainer from \"../../../containers/catalog/CategoriesCatalogContainer/CategoriesCatalogContainer\";\r\nimport MeasuresCatalogContainer from \"../../../containers/catalog/MeasuresCatalogContainer/MeasuresCatalogContainer\";\r\nimport catalogAPI from \"../../../services/catalogServices\";\r\nimport SeriesLink from \"../../../components/Catalog/styles/SeriesLink/SeriesLink\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { RouterState } from \"../CatalogScene\";\r\nimport CountriesCatalogContainer from \"../../../containers/catalog/CountriesCatalogContainer/CountriesCatalogContainer\";\r\nimport LangPicker from \"../../../components/shared/LangPicker/LangPicker\";\r\nimport { useOverlay } from \"src/shared/hooks\";\r\nimport { Overlay } from \"src/shared/components/overlay\";\r\nimport { FaFilter } from \"react-icons/fa\";\r\nimport FilterButton from \"src/components/Catalog/styles/FilterContent/FilterButton\";\r\nimport {\r\n FilterIndicator,\r\n FilterTab,\r\n FilterTabsWrapper,\r\n} from \"src/components/Catalog/styles/FilterContent/FilterTabs\";\r\nimport ModalContentWrapper from \"src/components/Catalog/styles/FilterContent/ModalContentWrapper\";\r\n\r\nenum ModalView {\r\n none,\r\n countries,\r\n categories,\r\n measures,\r\n}\r\n\r\ntype OwnProps = {\r\n search: string;\r\n locationState: RouterState;\r\n};\r\n\r\ntype Props = OwnProps &\r\n ReturnType &\r\n typeof mapDispatchToProps;\r\n\r\nconst CatalogPublishersScene: React.FC = ({\r\n search,\r\n sort,\r\n countryList,\r\n categoryList,\r\n measureList,\r\n clearAll,\r\n resetFilterSearch,\r\n locationState,\r\n}) => {\r\n const [translated, setTranslation] = React.useState(\r\n locationState && locationState.translated ? locationState.translated : false\r\n );\r\n const [pageSize, setPageSize] = React.useState(25);\r\n const [page, setPage] = React.useState(1);\r\n const [seriesList, setList] = React.useState<\r\n Array<{ id: number; name: string }>\r\n >([]);\r\n const [hasNext, setHasNext] = React.useState(false);\r\n const [modalView, setModalView] = React.useState(ModalView.none);\r\n const filtersOverlay = useOverlay();\r\n\r\n const switchClick = () => setTranslation(!translated);\r\n\r\n const onPageSizeChange = (event: React.ChangeEvent) =>\r\n setPageSize(Number(event.target.value));\r\n\r\n const setNextPage = () => setPage(page - 1);\r\n const setPreviousPage = () => setPage(page + 1);\r\n\r\n const onFilterClick = (filter: ModalView) => () => {\r\n resetFilterSearch();\r\n setModalView(filter);\r\n };\r\n\r\n const getModalView = () => {\r\n const modalProps = {\r\n onClose: () => {\r\n filtersOverlay.handleClose();\r\n setModalView(ModalView.none);\r\n },\r\n isTranslated: translated,\r\n };\r\n\r\n switch (modalView) {\r\n case ModalView.countries:\r\n return ;\r\n case ModalView.categories:\r\n return ;\r\n case ModalView.measures:\r\n return ;\r\n default:\r\n return null;\r\n }\r\n };\r\n\r\n const clearAllFilters = () => {\r\n clearAll();\r\n };\r\n\r\n React.useEffect(() => {\r\n if (modalView === ModalView.none) {\r\n (async () => {\r\n try {\r\n const response = await catalogAPI.searchPublishers(\r\n {\r\n pageSize,\r\n translated,\r\n page: page - 1,\r\n contains: search.length >= 3 ? search : \"\",\r\n startsWith: sort === \"All\" || sort === \"Recent\" ? \"\" : sort,\r\n },\r\n {\r\n countryId: countryList,\r\n categoryId: categoryList,\r\n measureId: measureList,\r\n }\r\n );\r\n setList(response.data);\r\n setHasNext(response.hasNext);\r\n } catch (err) {\r\n console.error(\"Error: catalogAPI.searchPublishers failed!\", err);\r\n }\r\n })();\r\n }\r\n }, [\r\n translated,\r\n search,\r\n pageSize,\r\n page,\r\n sort,\r\n modalView,\r\n countryList,\r\n categoryList,\r\n measureList,\r\n ]);\r\n\r\n return (\r\n <>\r\n \r\n {\r\n onFilterClick(ModalView.countries)();\r\n filtersOverlay.handleOpen();\r\n }}\r\n >\r\n \r\n Filters\r\n \r\n \r\n Clear all Filters\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n {seriesList.map(({ id, name }) => (\r\n \r\n \r\n {name}\r\n \r\n \r\n ))}\r\n \r\n {/*TODO: use dataLength from backend*/}\r\n \r\n \r\n {page > 1 && (\r\n Previous\r\n )}\r\n {hasNext && (\r\n Next\r\n )}\r\n \r\n \r\n {\r\n filtersOverlay.handleClose();\r\n setModalView(ModalView.none);\r\n }}\r\n title=\"Catalog Filters\"\r\n >\r\n <>\r\n \r\n \r\n Countries\r\n {countryList.length > 0 && (\r\n ({countryList.length})\r\n )}\r\n \r\n \r\n Categories\r\n {categoryList.length > 0 && (\r\n ({categoryList.length})\r\n )}\r\n \r\n \r\n Measures\r\n {measureList.length > 0 && (\r\n ({measureList.length})\r\n )}\r\n \r\n \r\n {getModalView()}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = (state: RootState) => ({\r\n sort: getCatalogSort(state),\r\n countryList: getCountryId(state),\r\n categoryList: getCategoryId(state),\r\n measureList: getMeasureId(state),\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n clearAll: catalogActions.filter.clearAll,\r\n resetFilterSearch: catalogActions.filterUtils.reset,\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps\r\n)(CatalogPublishersScene);\r\n","import * as React from \"react\";\r\nimport { RouterState } from \"../CatalogScene\";\r\nimport catalogAPI from \"src/services/catalogServices\";\r\nimport CatalogSortContainer from \"../../../containers/CatalogSortContainer/CatalogSortContainer\";\r\nimport SeriesLink from \"../../../components/Catalog/styles/SeriesLink/SeriesLink\";\r\nimport { Link } from \"react-router-dom\";\r\nimport PaginationWrapper from \"src/components/AdminPanel/adminPanel/PaginationWrapper\";\r\nimport PerPage from \"../../../components/shared/Pagination/perPage\";\r\nimport PaginationContainer from \"../../../components/Catalog/styles/PaginationContainer/PaginationContainer\";\r\nimport PaginationBox from \"../../../components/Catalog/styles/PaginationBox/PaginationBox\";\r\nimport { RootState } from \"src/ducks/store\";\r\nimport { connect } from \"react-redux\";\r\nimport {\r\n getCatalogSort,\r\n getReportCode,\r\n} from \"../../../ducks/catalog/selectors\";\r\nimport LangPicker from \"src/components/shared/LangPicker/LangPicker\";\r\n\r\ntype OwnProps = {\r\n search: string;\r\n locationState: RouterState;\r\n};\r\n\r\ntype Props = OwnProps & ReturnType;\r\n\r\nconst CatalogPublishersReportsScene: React.FC = ({\r\n search,\r\n sort,\r\n // reportsList,\r\n locationState,\r\n}) => {\r\n const [translated, setTranslation] = React.useState(\r\n locationState && locationState.translated ? locationState.translated : false\r\n );\r\n const [pageSize, setPageSize] = React.useState(25);\r\n const [page, setPage] = React.useState(1);\r\n const [seriesList, setList] = React.useState<\r\n Array<{ id: string; name: string }>\r\n >([]);\r\n const [hasNext, setHasNext] = React.useState(false);\r\n\r\n const switchClick = () => setTranslation(!translated);\r\n\r\n const onPageSizeChange = (event: React.ChangeEvent) =>\r\n setPageSize(Number(event.target.value));\r\n\r\n const setNextPage = () => setPage(page - 1);\r\n const setPreviousPage = () => setPage(page + 1);\r\n\r\n React.useEffect(() => {\r\n (async () => {\r\n const publisherId =\r\n locationState && locationState.nested\r\n ? [\r\n locationState &&\r\n Number(\r\n locationState.nested[\r\n locationState && locationState.nested.length - 1\r\n ].id\r\n ),\r\n ]\r\n : [];\r\n try {\r\n const response = await catalogAPI.searchReports(\r\n {\r\n pageSize,\r\n translated,\r\n page: page - 1,\r\n contains: search.length >= 3 ? search : \"\",\r\n startsWith: sort === \"All\" || sort === \"Recent\" ? \"\" : sort,\r\n },\r\n { publisherId }\r\n );\r\n setList(response.data);\r\n setHasNext(response.hasNext);\r\n } catch (err) {\r\n console.error(\"Error: catalogAPI.searchReports failed!\", err);\r\n }\r\n })();\r\n }, [translated, search, pageSize, page, sort]);\r\n\r\n const prevValues =\r\n locationState && locationState.nested ? locationState.nested : [];\r\n\r\n return (\r\n <>\r\n
\r\n \r\n \r\n
\r\n {seriesList.map(({ id, name }) => (\r\n \r\n \r\n {name}\r\n \r\n \r\n ))}\r\n \r\n {/*TODO: use dataLength from backend*/}\r\n \r\n \r\n {page > 1 && (\r\n Previous\r\n )}\r\n {hasNext && (\r\n Next\r\n )}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = (state: RootState) => ({\r\n sort: getCatalogSort(state),\r\n reportsList: getReportCode(state),\r\n});\r\n\r\nexport default connect(mapStateToProps)(CatalogPublishersReportsScene);\r\n","import * as React from \"react\";\r\nimport styled from \"styled-components\";\r\nimport CatalogMenu from \"../../components/Catalog/CatalogMenu/CatalogMenu\";\r\nimport { RouteComponentProps } from \"react-router\";\r\nimport ContentSearch from \"../../components/AdminPanel/adminPanel/ContentSearch\";\r\nimport color from \"../../utils/color\";\r\nimport CatalogSeriesScene from \"./CatalogSeriesScene\";\r\nimport CatalogReportsScene from \"./CatalogReports/CatalogReportsScene\";\r\nimport AngleRightIcon from \"src/icons/AngleRightIcon\";\r\nimport { Link as RouterLink } from \"react-router-dom\";\r\nimport CatalogReportsSeriesScene from \"./CatalogReports/CatalogReportsSeriesScene\";\r\nimport CatalogPublishersScene from \"./CatalogPublishers/CatalogPublishersScene\";\r\nimport CatalogPublishersReportsScene from \"./CatalogPublishers/CatalogPublishersReportsScene\";\r\nimport { catalogActions } from \"../../ducks/catalog/actions\";\r\nimport { connect } from \"react-redux\";\r\n\r\nconst Root = styled.div`\r\n display: flex;\r\n`;\r\n\r\nconst Content = styled.div`\r\n flex: 1 1 0%;\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst ContentHeader = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n margin-bottom: 20px;\r\n border-bottom: ${color.NEUTRAL} solid 2px;\r\n`;\r\n\r\nconst ContentTitle = styled.div`\r\n display: flex;\r\n\r\n h2 {\r\n margin: 0 0 10px 5px;\r\n font-weight: 400;\r\n color: ${color.TEXT_PRIMARY};\r\n\r\n svg {\r\n color: ${color.PRIMARY};\r\n margin-left: 5px;\r\n margin-right: 2px;\r\n transform: translateY(3px);\r\n }\r\n\r\n span:last-child {\r\n color: ${color.PRIMARY};\r\n }\r\n }\r\n`;\r\n\r\nconst Link = styled(RouterLink)`\r\n text-decoration: none;\r\n color: ${color.TEXT_PRIMARY};\r\n`;\r\n\r\nconst MetaContainer = styled.table`\r\n padding-bottom: 10px;\r\n width: 100%;\r\n border-bottom: ${color.NEUTRAL} solid 2px;\r\n margin-bottom: 15px;\r\n\r\n tr {\r\n padding-bottom: 15px;\r\n }\r\n\r\n tr:last-child {\r\n padding-bottom: 0;\r\n }\r\n`;\r\n\r\nconst MetaTitle = styled.td`\r\n vertical-align: top;\r\n font-weight: bold;\r\n`;\r\n\r\nconst MetaText = styled.td`\r\n width: 100%;\r\n padding-left: 10px;\r\n`;\r\n\r\nexport type RouterState = {\r\n nested?: Array<{\r\n name: string;\r\n forName: string;\r\n description: string;\r\n id: number | string;\r\n }>;\r\n translated?: boolean;\r\n};\r\n\r\ntype Props = RouteComponentProps<{}, {}, RouterState> &\r\n typeof mapDispatchToProps;\r\n\r\nconst CatalogScene: React.FC = ({ location, clearAllFilters }) => {\r\n const [search, setSearch] = React.useState(\"\");\r\n const [selectedCatalog, setSelectedCatalog] = React.useState(\"Publishers\");\r\n\r\n const onSearchChange = (event: React.ChangeEvent) =>\r\n setSearch(event.target.value);\r\n\r\n const onCatalogChange = (name: string) => {\r\n setSelectedCatalog(name);\r\n clearAllFilters();\r\n setSearch(\"\");\r\n };\r\n\r\n const CatalogView = (() => {\r\n switch (selectedCatalog) {\r\n case \"Publishers\": {\r\n if (location.state && location.state.nested) {\r\n return location.state.nested.length === 1\r\n ? CatalogPublishersReportsScene\r\n : CatalogReportsSeriesScene;\r\n } else {\r\n return CatalogPublishersScene;\r\n }\r\n }\r\n case \"Reports\":\r\n return location.state ? CatalogReportsSeriesScene : CatalogReportsScene;\r\n case \"Series\":\r\n return CatalogSeriesScene;\r\n default:\r\n return CatalogSeriesScene;\r\n }\r\n })();\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n

\r\n {selectedCatalog}\r\n {location.state &&\r\n location.state.nested &&\r\n selectedCatalog !== \"Series\" &&\r\n location.state.nested.map(({ forName }, index, array) => (\r\n \r\n \r\n \r\n {index + 1 !== array.length ? (\r\n \r\n {forName}\r\n \r\n ) : (\r\n forName\r\n )}\r\n \r\n \r\n ))}\r\n

\r\n
\r\n \r\n
\r\n {location.state &&\r\n location.state.nested &&\r\n selectedCatalog !== \"Series\" && (\r\n \r\n \r\n {location.state.nested.map(({ name, description }) => (\r\n \r\n {name}:\r\n {description}\r\n \r\n ))}\r\n \r\n \r\n )}\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nconst mapDispatchToProps = { clearAllFilters: catalogActions.filter.clearAll };\r\n\r\nexport default connect(null, mapDispatchToProps)(CatalogScene);\r\n","import * as React from 'react';\r\nimport pallet from '../../../utils/color';\r\nimport styled from 'styled-components';\r\nimport { FaAngleDown as AngleDownIcon, FaAngleUp as AngleUpIcon } from 'react-icons/fa';\r\n\r\nconst HeaderContainer = styled.div<{ color: string }>`\r\n display: flex;\r\n justify-content: space-between;\r\n background-color: ${({ color }) => color};\r\n color: ${pallet.BACKGROUND};\r\n padding: 5px;\r\n font-size: 16px;\r\n font-weight: normal;\r\n margin-bottom: 10px;\r\n`;\r\n\r\ninterface Props {\r\n visible?: boolean\r\n color?: string,\r\n onClick?: () => void,\r\n title: string,\r\n}\r\n\r\nconst Accordion: React.FC = ({ color = pallet.PRIMARY, visible = false, children, title, onClick }) =>\r\n (<>\r\n \r\n {title}\r\n {visible ? : }\r\n \r\n {visible && children}\r\n );\r\n\r\nexport default Accordion;\r\n","import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport color from 'src/utils/color';\r\n\r\nconst Input = styled.input`\r\n -webkit-appearance: none;\r\n height: 5px;\r\n background: ${color.BACKGROUND_SECONDARY};\r\n outline: none;\r\n border-radius: 6px;\r\n width: 100%;\r\n\r\n &::-webkit-slider-thumb {\r\n appearance: none;\r\n width: 14px;\r\n height: 14px;\r\n background: ${color.DRP_INPUT};\r\n cursor: pointer;\r\n border-radius: 50%;\r\n }\r\n\r\n &::-moz-range-thumb {\r\n width: 14px;\r\n height: 14px;\r\n background: ${color.DRP_INPUT};\r\n cursor: pointer;\r\n border-radius: 50%;\r\n }\r\n`;\r\n\r\ninterface Props {\r\n onChange: (event: React.ChangeEvent) => void;\r\n value: number,\r\n min?: number,\r\n max?: number,\r\n step?: number,\r\n}\r\n\r\n// TODO: add background color behind slider (like in progress bar)\r\nconst Slider: React.FC = (props) => ;\r\n\r\nexport default Slider;\r\n","import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport color from '../../../utils/color';\r\nimport calendar from 'src/media/svg/calendar-regular.svg';\r\n\r\nconst HeaderWrapper = styled.div`\r\n display: inline-block;\r\n flex-grow: 1;\r\n margin: 20px;\r\n width: 100%;\r\n\r\n &:first-child {\r\n margin-left: 0;\r\n }\r\n\r\n &:last-child {\r\n margin-right: 0;\r\n }\r\n\r\n .DayPickerInput input {\r\n border: none;\r\n width: 195px;\r\n align-self: center;\r\n height: 27px;\r\n background-color: ${color.BACKGROUND_SECONDARY};\r\n color: ${color.DRP_INPUT};\r\n font-weight: lighter;\r\n font-size: 16px;\r\n border-radius: 6px;\r\n cursor: pointer;\r\n padding-left: 10px;\r\n margin-top: 2px;\r\n\r\n background-color: ${color.BACKGROUND_SECONDARY};\r\n background-image: url(${calendar});\r\n background-position: 180px 5px;\r\n background-repeat: no-repeat;\r\n\r\n &:focus {\r\n outline: none;\r\n }\r\n }\r\n\r\n .DayPicker-Day--today {\r\n color: ${color.SECONDARY} !important;\r\n }\r\n\r\n .DayPicker-Day--selected {\r\n color: ${color.DRP_INPUT} !important;\r\n background-color: white !important;\r\n font-weight: bolder;\r\n }\r\n`;\r\n\r\nconst LabelWrapper = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n font-size: 14px;\r\n`;\r\n\r\nconst Label = styled.span`\r\n color: ${color.TEXT_PRIMARY};\r\n font-weight: normal;\r\n`;\r\n\r\nconst Value = styled.span`\r\n color: ${color.DRP_INPUT};\r\n font-weight: bolder;\r\n`;\r\n\r\ninterface Props {\r\n label: string,\r\n value?: string | number,\r\n}\r\n\r\nconst InputContainer: React.FC = ({ label, children, value }) => (\r\n \r\n {value !== undefined && {value}}\r\n {children}\r\n \r\n);\r\n\r\nexport default InputContainer;\r\n","import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport pallet from '../../../utils/color';\r\n\r\nconst TableHead = styled.th<{ color: string }>`\r\n background-color: ${({ color }) => color}23;\r\n border-bottom: solid 2px ${({ color }) => color};\r\n text-align: right;\r\n\r\n &:first-child {\r\n text-align: left;\r\n }\r\n`;\r\n\r\ninterface Props {\r\n color?: string,\r\n}\r\n\r\nconst TableHeader: React.FC = ({ color = pallet.PRIMARY, children }) => {children};\r\n\r\nexport default TableHeader;\r\n","const stateCodeList = [\r\n { name: 'Alabama', id: 1 },\r\n { name: 'Alaska', id: 2 },\r\n { name: 'Arizona', id: 4 },\r\n { name: 'Arkansas', id: 5 },\r\n { name: 'California', id: 6 },\r\n { name: 'Colorado', id: 8 },\r\n { name: 'Connecticut', id: 9 },\r\n { name: 'Delaware', id: 10 },\r\n { name: 'Florida', id: 12 },\r\n { name: 'Georgia', id: 13 },\r\n { name: 'Hawaii', id: 15 },\r\n { name: 'Idaho', id: 16 },\r\n { name: 'Illinois', id: 17 },\r\n { name: 'Indiana', id: 18 },\r\n { name: 'Iowa', id: 19 },\r\n { name: 'Kansas', id: 20 },\r\n { name: 'Kentucky', id: 21 },\r\n { name: 'Louisiana', id: 22 },\r\n { name: 'Maine', id: 23 },\r\n { name: 'Maryland', id: 24 },\r\n { name: 'Massachusetts', id: 25 },\r\n { name: 'Michigan', id: 26 },\r\n { name: 'Minnesota', id: 27 },\r\n { name: 'Mississippi', id: 28 },\r\n { name: 'Missouri', id: 29 },\r\n { name: 'Montana', id: 30 },\r\n { name: 'Nebraska', id: 31 },\r\n { name: 'Nevada', id: 32 },\r\n { name: 'New Hampshire', id: 33 },\r\n { name: 'New Jersey', id: 34 },\r\n { name: 'New Mexico', id: 35 },\r\n { name: 'New York', id: 36 },\r\n { name: 'North Carolina', id: 37 },\r\n { name: 'North Dakota', id: 38 },\r\n { name: 'Ohio', id: 39 },\r\n { name: 'Oklahoma', id: 40 },\r\n { name: 'Oregon', id: 41 },\r\n { name: 'Pennsylvania', id: 42 },\r\n { name: 'Rhode Island', id: 44 },\r\n { name: 'South Carolina', id: 45 },\r\n { name: 'South Dakota', id: 46 },\r\n { name: 'Tennessee', id: 47 },\r\n { name: 'Texas', id: 48 },\r\n { name: 'Utah', id: 49 },\r\n { name: 'Vermont', id: 50 },\r\n { name: 'Virginia', id: 51 },\r\n { name: 'Washington', id: 53 },\r\n { name: 'West Virginia', id: 54 },\r\n { name: 'Wisconsin', id: 55 },\r\n { name: 'Wyoming', id: 56 },\r\n];\r\n\r\nexport default stateCodeList;\r\n","const practiceCodeList = [\r\n // { name: 'Oct - Dec, 2018', id: 801 },\r\n // { name: 'Jan - Mar, 2019', id: 802 },\r\n // { name: 'Apr - Jun, 2019', id: 803 },\r\n { name: 'Jul - Sep, 2019', id: 804 },\r\n { name: 'Oct - Dec, 2019', id: 805 },\r\n { name: 'Jan - Mar, 2020', id: 806 },\r\n { name: 'Apr - Jun, 2020', id: 807 },\r\n // { name: 'Jul - Sep, 2020', id: 808 },\r\n];\r\n\r\nexport default practiceCodeList;\r\n","import axios from 'axios';\r\nimport { format } from 'date-fns';\r\n\r\nconst api = axios.create({\r\n baseURL: `${process.env.REACT_APP_ADMIN_API_URL}/direct/`,\r\n timeout: 20000,\r\n});\r\n\r\nconst addQueryParameter = (currentParams: string, query: string, param: string | number | boolean | number[]) =>\r\n `${currentParams && `${currentParams}&`}${query}=${param}`;\r\n\r\ninterface RiskPremiumService {\r\n reinsuranceYear: number,\r\n stateCode: number,\r\n practiceCode: number,\r\n salesEffectiveDate: Date,\r\n butterfatTest: number,\r\n proteinTest: number,\r\n classPriceWeightingFactor: number,\r\n coverageLevel: number,\r\n coveredMilkProduction: number,\r\n protectionFactor: number,\r\n share: number,\r\n}\r\n\r\nconst riskPremiumAPI = {\r\n get: async ({reinsuranceYear, stateCode, practiceCode, salesEffectiveDate, butterfatTest, proteinTest, classPriceWeightingFactor,\r\n coverageLevel, coveredMilkProduction, protectionFactor, share }: RiskPremiumService) => {\r\n let query = '';\r\n query = addQueryParameter(query, 'reinsuranceYear', reinsuranceYear);\r\n query = addQueryParameter(query, 'stateCode', String(stateCode).padStart(2, '0'));\r\n query = addQueryParameter(query, 'practiceCode', practiceCode);\r\n query = addQueryParameter(query, 'salesEffectiveDate', format(salesEffectiveDate, 'YYYY-MM-DD'));\r\n query = addQueryParameter(query, 'calculationParameters.butterfatTest', butterfatTest);\r\n query = addQueryParameter(query, 'calculationParameters.proteinTest', proteinTest);\r\n query = addQueryParameter(query, 'calculationParameters.classPriceWeightingFactor', classPriceWeightingFactor);\r\n query = addQueryParameter(query, 'calculationParameters.coverageLevel', coverageLevel);\r\n query = addQueryParameter(query, 'calculationParameters.coveredMilkProduction', coveredMilkProduction);\r\n query = addQueryParameter(query, 'calculationParameters.protectionFactor', protectionFactor);\r\n query = addQueryParameter(query, 'calculationParameters.share', share);\r\n return await api.get(query ? 'riskpremium?' + query : '');\r\n },\r\n};\r\n\r\nexport default riskPremiumAPI;\r\n","export default {\r\n 'Component': {\r\n 'ButterPrice': {\r\n 'ExpectedPrice': 2.3024,\r\n 'ActualPrice': 2.3024,\r\n 'MonthPrices': [\r\n {'Sigma': 0.0, 'Date': '2019-04-01T00:00:00', 'ExpectedPrice': 2.282, 'ActualPrice': 2.282},\r\n {'Sigma': 0.0, 'Date': '2019-05-01T00:00:00', 'ExpectedPrice': 2.3073, 'ActualPrice': 2.3073},\r\n {'Sigma': 0.0, 'Date': '2019-06-01T00:00:00', 'ExpectedPrice': 2.3178, 'ActualPrice': 2.3178}],\r\n },\r\n 'CheesePrice': {\r\n 'ExpectedPrice': 1.5667,\r\n 'ActualPrice': 1.5667,\r\n 'MonthPrices': [\r\n {'Sigma': 0.0, 'Date': '2019-04-01T00:00:00', 'ExpectedPrice': 1.539, 'ActualPrice': 1.539},\r\n {'Sigma': 0.0, 'Date': '2019-05-01T00:00:00', 'ExpectedPrice': 1.561, 'ActualPrice': 1.561},\r\n {'Sigma': 0.0, 'Date': '2019-06-01T00:00:00', 'ExpectedPrice': 1.6, 'ActualPrice': 1.6}],\r\n },\r\n 'DryWheyPrice': {\r\n 'ExpectedPrice': 0.3818,\r\n 'ActualPrice': 0.3818,\r\n 'MonthPrices': [\r\n {'Sigma': 0.0, 'Date': '2019-04-01T00:00:00', 'ExpectedPrice': 0.3828, 'ActualPrice': 0.3828},\r\n {'Sigma': 0.0, 'Date': '2019-05-01T00:00:00', 'ExpectedPrice': 0.385, 'ActualPrice': 0.385},\r\n {'Sigma': 0.0, 'Date': '2019-06-01T00:00:00', 'ExpectedPrice': 0.3775, 'ActualPrice': 0.3775}],\r\n },\r\n 'ButterfatPrice': {\r\n 'ExpectedPrice': 2.5804,\r\n 'ActualPrice': 2.5805,\r\n 'MonthPrices': [\r\n {'Sigma': 0.0, 'Date': '2019-04-01T00:00:00', 'ExpectedPrice': 2.5558, 'ActualPrice': 2.5558},\r\n {'Sigma': 0.0, 'Date': '2019-05-01T00:00:00', 'ExpectedPrice': 2.5865, 'ActualPrice': 2.5865},\r\n {'Sigma': 0.0, 'Date': '2019-06-01T00:00:00', 'ExpectedPrice': 2.5992, 'ActualPrice': 2.5992}],\r\n },\r\n 'ProteinPrice': {\r\n 'ExpectedPrice': 1.6857,\r\n 'ActualPrice': 1.6854,\r\n 'MonthPrices': [\r\n {'Sigma': 0.0, 'Date': '2019-04-01T00:00:00', 'ExpectedPrice': 0.0, 'ActualPrice': 1.6223},\r\n {'Sigma': 0.0, 'Date': '2019-05-01T00:00:00', 'ExpectedPrice': 0.0, 'ActualPrice': 1.6608},\r\n {'Sigma': 0.0, 'Date': '2019-06-01T00:00:00', 'ExpectedPrice': 0.0, 'ActualPrice': 1.7732}],\r\n },\r\n 'OtherSolidsPrice': {\r\n 'ExpectedPrice': 0.1881,\r\n 'ActualPrice': 0.1882,\r\n 'MonthPrices': [\r\n {'Sigma': 0.0, 'Date': '2019-04-01T00:00:00', 'ExpectedPrice': 0.0, 'ActualPrice': 0.1892},\r\n {'Sigma': 0.0, 'Date': '2019-05-01T00:00:00', 'ExpectedPrice': 0.0, 'ActualPrice': 0.1915},\r\n {'Sigma': 0.0, 'Date': '2019-06-01T00:00:00', 'ExpectedPrice': 0.0, 'ActualPrice': 0.1838}],\r\n }, 'NonfatDryMilk': {\r\n 'ExpectedPrice': 0.0,\r\n 'ActualPrice': 0.0,\r\n 'MonthPrices': [\r\n {'Sigma': 0.0, 'Date': '2019-04-01T00:00:00', 'ExpectedPrice': 0.9743, 'ActualPrice': 1.1005},\r\n {'Sigma': 0.0, 'Date': '2019-05-01T00:00:00', 'ExpectedPrice': 0.9711, 'ActualPrice': 1.111},\r\n {'Sigma': 0.0, 'Date': '2019-06-01T00:00:00', 'ExpectedPrice': 1.002, 'ActualPrice': 1.1205}],\r\n },\r\n 'ExpectedRevenue': 165300.0,\r\n 'ExpectedRevenueCwt': 16.53,\r\n 'ActualRevenue': 165300.0,\r\n 'ActualRevenueCwt': 16.53,\r\n 'RevenueGuarantee': 157035.0,\r\n 'RevenueGuaranteeCwt': 15.7,\r\n 'Premium': 1051.0,\r\n 'PremiumCwt': 0.1051,\r\n 'Subsidy': 462.0,\r\n 'SubsidyCwt': 0.0462,\r\n 'ProducerPreimum': 589.0,\r\n 'ProducerPreimumCwt': 0.06,\r\n 'ProbabilityOfPostiveIndemnity': 0.2,\r\n 'ProbabilityOfPositiveNetBenefit': 0.18,\r\n 'GrossIndemnity': 0.0,\r\n 'GrossIndemnityCwt': 0.0,\r\n },\r\n 'Class': {\r\n 'ClassIIIPrice': {\r\n 'ExpectedPrice': 15.14,\r\n 'ActualPrice': 15.15,\r\n 'MonthPrices': [\r\n {'Sigma': 0.0, 'Date': '2019-04-01T00:00:00', 'ExpectedPrice': 14.88, 'ActualPrice': 14.88},\r\n {'Sigma': 0.0, 'Date': '2019-05-01T00:00:00', 'ExpectedPrice': 15.11, 'ActualPrice': 15.11},\r\n {'Sigma': 0.0, 'Date': '2019-06-01T00:00:00', 'ExpectedPrice': 15.44, 'ActualPrice': 15.45}],\r\n },\r\n 'ClassIVPrice': {\r\n 'ExpectedPrice': 16.04,\r\n 'ActualPrice': 17.14,\r\n 'MonthPrices': [\r\n {'Sigma': 0.0, 'Date': '2019-04-01T00:00:00', 'ExpectedPrice': 15.88, 'ActualPrice': 16.96},\r\n {'Sigma': 0.0, 'Date': '2019-05-01T00:00:00', 'ExpectedPrice': 15.96, 'ActualPrice': 17.16},\r\n {'Sigma': 0.0, 'Date': '2019-06-01T00:00:00', 'ExpectedPrice': 16.27, 'ActualPrice': 17.29}],\r\n },\r\n 'ExpectedRevenue': 151400.0,\r\n 'ExpectedRevenueCwt': 15.14,\r\n 'ActualRevenue': 151500.0,\r\n 'ActualRevenueCwt': 15.15,\r\n 'RevenueGuarantee': 143830.0,\r\n 'RevenueGuaranteeCwt': 14.38,\r\n 'Premium': 799.0,\r\n 'PremiumCwt': 0.0799,\r\n 'Subsidy': 352.0,\r\n 'SubsidyCwt': 0.0352,\r\n 'ProducerPreimum': 447.0,\r\n 'ProducerPreimumCwt': 0.04,\r\n 'ProbabilityOfPostiveIndemnity': 0.18,\r\n 'ProbabilityOfPositiveNetBenefit': 0.17,\r\n 'GrossIndemnity': 0.0,\r\n 'GrossIndemnityCwt': 0.0,\r\n },\r\n 'MilkProduction': {\r\n 'ExpectedPrice': 5315,\r\n 'ActualPrice': 5315,\r\n },\r\n};\r\n","import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport color from 'src/utils/color';\r\n\r\nconst SelectOptionWrapper = styled.div`\r\n display: flex;\r\n font-size: 14px;\r\n font-weight: lighter;\r\n padding: 5px 0 5px 0;\r\n color: ${color.TEXT_PRIMARY};\r\n`;\r\n\r\nconst Dot = styled.div`\r\n height: 13px;\r\n width: 13px;\r\n margin-right: 10px;\r\n border-radius: 50%;\r\n border: ${color.NEUTRAL_DARK} solid 1px;\r\n`;\r\n\r\nconst ActiveDot = styled.div`\r\n margin: 1px;\r\n height: 11px;\r\n width: 11px;\r\n border-radius: 50%;\r\n background-color: ${color.DRP_INPUT};\r\n`;\r\n\r\ninterface Props {\r\n type: string,\r\n name: string,\r\n checked: boolean,\r\n value: string | number,\r\n label?: string,\r\n onClick?(value: string | number): void,\r\n}\r\n\r\nfunction onClickHandler(value: string | number, onClick?: (value: string | number) => void ) {\r\n return () => onClick ? onClick(value) : null;\r\n}\r\nconst SelectOption: React.FC = ({ type, name, checked, value, label, onClick }) => (\r\n \r\n { checked && }{label}\r\n \r\n);\r\n\r\nexport default SelectOption;\r\n","import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport dropDownIcon from 'src/media/svg/arrowDropDown.svg';\r\nimport SelectOption from './SelectOption';\r\nimport Scrollbars from 'react-custom-scrollbars';\r\nimport color from '../../utils/color';\r\n\r\nconst Select = styled.div<{width?: number}>`\r\n border-radius: 6px;\r\n display: inline-block;\r\n position: relative;\r\n padding: 0 15px 0 10px;\r\n width: calc(${({ width = 185 }) => width}px - 20px);\r\n line-height: 29px;\r\n appearance: none;\r\n background: transparent url(\"${dropDownIcon}\") no-repeat right;\r\n margin-top: 3px;\r\n margin-right: 10px;\r\n font-weight: lighter;\r\n font-size: 16px;\r\n cursor: pointer;\r\n color: ${color.DRP_INPUT};\r\n background-color: ${color.BACKGROUND_SECONDARY};\r\n`;\r\n\r\nconst SelectDropDown = styled.div<{isOpened: boolean, width?: number}>`\r\n display: ${({isOpened}) => isOpened ? 'block' : 'none'};\r\n position: absolute;\r\n padding-left: 5px;\r\n border: 1px solid ${color.NEUTRAL_LIGHT};\r\n background-color: ${color.BACKGROUND_SECONDARY};\r\n border-radius: 6px;\r\n width: ${({ width = 185 }) => width}px;\r\n z-index: 20;\r\n cursor: pointer;\r\n`;\r\n\r\nconst SelectFieldWrapper = styled.div`\r\n display: inline-block;\r\n z-index: 10;\r\n`;\r\n\r\nconst Input = styled.input<{ width?: number }>`\r\n font-family: 'Open Sans', sans-serif;\r\n border: none;\r\n outline: none;\r\n font-size: 16px;\r\n font-weight: lighter;\r\n color: ${color.DRP_INPUT};\r\n margin: 0 0 0 -1px;\r\n cursor: pointer;\r\n caret-color: transparent;\r\n width: calc(${({ width = 185 }) => width}px - 30px);\r\n background-color: ${color.BACKGROUND_SECONDARY};\r\n\r\n &::placeholder {\r\n color: ${color.DRP_INPUT};\r\n }\r\n`;\r\n\r\ninterface Props {\r\n options: Array<{ id: number | string, name: string }>,\r\n value: string,\r\n width?: number,\r\n onChange: (value: string | number) => void,\r\n}\r\n\r\ninterface State {\r\n isOpened: boolean,\r\n filter: string,\r\n}\r\n\r\nclass SelectField extends React.Component {\r\n public state = {\r\n isOpened: false,\r\n filter: '',\r\n };\r\n\r\n public render() {\r\n const { filter, isOpened } = this.state;\r\n const { value, options, width, onChange } = this.props;\r\n const SelectOptions = options\r\n .filter(option => option.name.toLowerCase().includes(filter.toLowerCase()))\r\n .map((option) =>\r\n );\r\n\r\n return (\r\n \r\n }\r\n \r\n \r\n \r\n
\r\n {SelectOptions}\r\n
\r\n
\r\n
\r\n
\r\n )\r\n }\r\n\r\n private onInputChange = (event: React.ChangeEvent) => {\r\n this.setState({ filter: event.target.value });\r\n };\r\n\r\n private handleSelectDropDown = () => {\r\n this.setState({isOpened: !this.state.isOpened, filter: ''});\r\n };\r\n\r\n private handleMouseLeave = () => {\r\n this.setState({isOpened: false, filter: ''});\r\n };\r\n}\r\n\r\nexport default SelectField;\r\n","import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport color from '../../utils/color';\r\nimport Accordion from '../../components/RevenuePrediction/Accordion/Accordion';\r\nimport Slider from '../../components/shared/Slider/Slider';\r\nimport InputContainer from '../../components/RevenuePrediction/InputContainer/InputContainer';\r\nimport DayPickerInput from 'react-day-picker/DayPickerInput';\r\nimport 'react-day-picker/lib/style.css';\r\nimport TableHeader from 'src/components/RevenuePrediction/TableHeader/TableHeader';\r\nimport stateCodeList from './stateCodeList';\r\nimport practiceCodeList from './practiceCodeList';\r\nimport riskPremiumAPI from '../../services/riskPremiumService';\r\nimport apiData from './apiData';\r\nimport { format } from 'date-fns';\r\nimport formatValue from '../../utils/formatValue';\r\nimport SelectField from './SelectField';\r\n\r\nconst Root = styled.div``;\r\n\r\nconst ContentHeader = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n margin-bottom: 20px;\r\n font-size: 25px;\r\n width: 100%;\r\n border-bottom: ${color.NEUTRAL} solid 2px;\r\n`;\r\n\r\nconst SettingContainer = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n padding-bottom: 20px;\r\n margin-bottom: 40px;\r\n width: 100%;\r\n border-bottom: ${color.NEUTRAL} solid 2px;\r\n`;\r\n\r\nconst SettingsRow = styled.div`\r\n display: flex;\r\n`;\r\n\r\nconst WhatIfContainer = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n margin-top: 20px;\r\n`;\r\n\r\nconst WhatIfInputContainer = styled.div`\r\n flex-grow: 1;\r\n margin-right: 20px;\r\n width: 100%;\r\n`;\r\n\r\nconst WhatIfResultContainer = styled.div`\r\n flex-grow: 1;\r\n margin-left: 20px;\r\n width: 100%;\r\n`;\r\n\r\nconst Table = styled.table`\r\n border-collapse: collapse;\r\n width: 100%;\r\n margin-bottom: 30px;\r\n`;\r\n\r\nconst Column = styled.td`\r\n text-align: right;\r\n padding: 5px 0;\r\n color: ${color.PRIMARY}\r\n`;\r\n\r\nconst ColumnExpected = styled(Column)`\r\n color: ${color.SECONDARY};\r\n padding: 8px 0;\r\n`;\r\n\r\nconst ColumnMonth = styled(Column)`\r\n color: ${color.TEXT_PRIMARY};\r\n`;\r\n\r\nconst ColumnLabel = styled(Column)`\r\n text-align: left;\r\n color: ${color.TEXT_PRIMARY};\r\n`;\r\n\r\nconst ColumnImportant = styled(Column)`\r\n font-weight: bolder;\r\n color: ${color.PRIMARY};\r\n font-size: 18px;\r\n`;\r\n\r\nconst ColumnImportantLabel = styled(ColumnImportant)`\r\n text-align: left;\r\n`;\r\n\r\nconst TableInput = styled.input`\r\n color: ${color.DRP_INPUT};\r\n background-color: ${color.BACKGROUND_SECONDARY};\r\n border-radius: 6px;\r\n font-size: 16px;\r\n line-height: 27px;\r\n font-weight: lighter;\r\n border: none;\r\n text-align: right;\r\n width: 100px;\r\n\r\n -moz-appearance:textfield;\r\n &::-webkit-outer-spin-button,\r\n &::-webkit-inner-spin-button {\r\n -webkit-appearance: none;\r\n margin: 0;\r\n }\r\n`;\r\n\r\nconst DMPInput = styled(TableInput)`\r\n margin-top: 2px;\r\n width: 200px;\r\n padding-right: 5px;\r\n`;\r\n\r\nconst RevenuePredictionContainer: React.FC = () => {\r\n // const [ isHistoricalAccordionOpen, setHistoricalAccordionOpenStatus ] = React.useState(false);\r\n // const onHistoricalAccordionClick = () => {\r\n // setHistoricalAccordionOpenStatus(!isHistoricalAccordionOpen);\r\n // };\r\n const [ isWhatIfOpen, setWhatIfOpenStatus ] = React.useState(true);\r\n const onWhatIfAccordionClick = () => {\r\n setWhatIfOpenStatus(!isWhatIfOpen);\r\n };\r\n\r\n const [ coverageLevel, setCoverageLevel ] = React.useState(0.95);\r\n const onCoverageLevelChange = (event: React.ChangeEvent) => { setCoverageLevel(Number(event.target.value)) };\r\n const [ butterfatTest, setButterfatTest ] = React.useState(3.9);\r\n const onButterfatTestChange = (event: React.ChangeEvent) => { setButterfatTest(Number(event.target.value)) };\r\n const [ protectionFactor, setProtectionFactor ] = React.useState(1);\r\n const onProtectionFactorChange = (event: React.ChangeEvent) => { setProtectionFactor(Number(event.target.value)) };\r\n const [ proteinTest, setProteinTest ] = React.useState(3.2);\r\n const onProteinTestChange = (event: React.ChangeEvent) => { setProteinTest(Number(event.target.value)) };\r\n const [ classPriceWeightingFactor, setClassPriceWeightingFactor ] = React.useState(1);\r\n const onClassPriceWeightingFactorChange = (e: React.ChangeEvent) => { setClassPriceWeightingFactor(Number(e.target.value)) };\r\n\r\n const [ salesEffectiveDate, setSalesEffectiveDate ] = React.useState(new Date('June 07, 2019'));\r\n const onDateChange = (date: Date) => { setSalesEffectiveDate(date) };\r\n const [ coveredMilkProduction, setCoveredMilkProduction ] = React.useState(10000000);\r\n const onCoveredMilkProductionChange = (event: React.ChangeEvent) => { setCoveredMilkProduction(Number(event.target.value))};\r\n const [ stateCode, setStateCode ] = React.useState(stateCodeList[0].id);\r\n const [ stateCodeName, setStateCodeName ] = React.useState(stateCodeList[0].name);\r\n const onStateCodeChange = (value: number) => {\r\n const index = stateCodeList.findIndex(({ id }) => id === value);\r\n if (index !== -1) {\r\n setStateCode(stateCodeList[index].id);\r\n setStateCodeName(stateCodeList[index].name);\r\n }\r\n };\r\n const [ practiceCode, setPracticeCode ] = React.useState(practiceCodeList[0].id);\r\n const [ practiceCodeName, setPracticeCodeName ] = React.useState(practiceCodeList[0].name);\r\n const onPracticeCodeChange = (value: number) => {\r\n const index = practiceCodeList.findIndex(({ id }) => id === value);\r\n if (index !== -1) {\r\n setPracticeCode(practiceCodeList[index].id);\r\n setPracticeCodeName(practiceCodeList[index].name);\r\n }\r\n };\r\n\r\n const [ inputFields, mutateInputFields ] = React.useState({\r\n butter: { a: 0, b: 0, c: 0 },\r\n cheese: { a: 0, b: 0, c: 0 },\r\n dryWhey: { a: 0, b: 0, c: 0 },\r\n noFatDryMilk: { a: 0, b: 0, c: 0 },\r\n milkProd: { a: 0 },\r\n });\r\n const updateInputField = (fieldName: string, field: string) => (event: React.ChangeEvent) => {\r\n const object = {...inputFields};\r\n object[fieldName][field] = Number(event.target.value);\r\n mutateInputFields(object);\r\n };\r\n\r\n const returnToZero = (num: number) => num < 0 ? 0 : num;\r\n const roundOn = (num: number, decimals: number) => parseFloat(num.toFixed(decimals));\r\n const roundOn4 = (num: number) => roundOn(num, 4);\r\n const [ results, mutateResults ] = React.useState({\r\n actualCalculatedPrices: { butterfat: 0, protein: 0, otherSolids: 0, nonfatSolid: 0, classIIIMilk: 0, classIVMilk: 0, dryWhey: 0 },\r\n revenue: {\r\n guaranteeDPRPerCwt: { components: 0, class: 0 },\r\n actual: { components: 0, class: 0 },\r\n actualPerCwt: { components: 0, class: 0 },\r\n grossIndemnity: { components: 0, class: 0 },\r\n grossIndemnityPerCwt: { components: 0, class: 0 },\r\n },\r\n table: {\r\n class3: { a: 0, b: 0, c: 0 },\r\n class4: { a: 0, b: 0, c: 0 },\r\n },\r\n });\r\n const calculateResults = () => {\r\n const object = {...results};\r\n\r\n const calculateClassIIIActual = (month: string) => {\r\n const butterfatPrice = calculateButterfatPrices(inputFields.butter[month]);\r\n return roundOn(\r\n 3.5 * butterfatPrice + 0.965 * (calculateProteinPrices(inputFields.cheese[month], butterfatPrice)\r\n * 3.1 + calculateOtherSolidPrices(inputFields.dryWhey[month]) * 5.9), 2);\r\n };\r\n const calculateNonfatSolidsPrices = (price: number) => roundOn4((price - 0.1678) * 0.99);\r\n const calculateClassIVActual = (month: string) => roundOn(\r\n roundOn((calculateNonfatSolidsPrices(inputFields.noFatDryMilk[month]) * 9), 2)\r\n * 0.965 + calculateButterfatPrices(inputFields.butter[month]) * 3.5, 2);\r\n\r\n const calculateButterfatPrices = (price: number) => (price - 0.1715) * 1.211;\r\n const calculateOtherSolidPrices = (price: number) => roundOn4((price - 0.1991) * 1.03);\r\n const calculateProteinPrices = (price: number, butterfatPrice: number) =>\r\n roundOn4((price - 0.2003) * 1.383) + roundOn4(roundOn4(roundOn4((price - 0.2003) * 1.572) - butterfatPrice * 0.9) * 1.17);\r\n\r\n object.actualCalculatedPrices.butterfat = roundOn4((\r\n calculateButterfatPrices(inputFields.butter.a) +\r\n calculateButterfatPrices(inputFields.butter.b) +\r\n calculateButterfatPrices(inputFields.butter.c)) / 3);\r\n object.actualCalculatedPrices.protein = roundOn4((\r\n calculateProteinPrices(inputFields.cheese.a, object.actualCalculatedPrices.butterfat) +\r\n calculateProteinPrices(inputFields.cheese.b, object.actualCalculatedPrices.butterfat) +\r\n calculateProteinPrices(inputFields.cheese.c, object.actualCalculatedPrices.butterfat)) / 3);\r\n object.actualCalculatedPrices.otherSolids = roundOn4((\r\n calculateOtherSolidPrices(inputFields.dryWhey.a) +\r\n calculateOtherSolidPrices(inputFields.dryWhey.b) +\r\n calculateOtherSolidPrices(inputFields.dryWhey.c)) / 3);\r\n\r\n object.table.class3.a = calculateClassIIIActual('a');\r\n object.table.class3.b = calculateClassIIIActual('b');\r\n object.table.class3.c = calculateClassIIIActual('c');\r\n object.actualCalculatedPrices.classIIIMilk = roundOn4((object.table.class3.a + object.table.class3.b + object.table.class3.c) / 3);\r\n\r\n object.table.class4.a = calculateClassIVActual('a');\r\n object.table.class4.b = calculateClassIVActual('b');\r\n object.table.class4.c = calculateClassIVActual('c');\r\n object.actualCalculatedPrices.classIVMilk = roundOn4((object.table.class4.a + object.table.class4.b + object.table.class4.c) / 3);\r\n\r\n object.revenue.guaranteeDPRPerCwt.components = data.Component.RevenueGuarantee / (coveredMilkProduction / 100);\r\n object.revenue.guaranteeDPRPerCwt.class = data.Class.RevenueGuarantee / (coveredMilkProduction / 100);\r\n\r\n object.revenue.actual.components = roundOn(\r\n roundOn(object.actualCalculatedPrices.butterfat * butterfatTest + object.actualCalculatedPrices.protein\r\n * proteinTest + object.actualCalculatedPrices.otherSolids * 5.7, 2)\r\n * coveredMilkProduction / 100 * inputFields.milkProd.a / data.MilkProduction.ExpectedPrice, 0);\r\n object.revenue.actual.class = roundOn(roundOn(\r\n object.actualCalculatedPrices.classIIIMilk * classPriceWeightingFactor + object.actualCalculatedPrices.classIVMilk\r\n * (1 - classPriceWeightingFactor), 2) * coveredMilkProduction\r\n / 100 * inputFields.milkProd.a / data.MilkProduction.ExpectedPrice, 0);\r\n\r\n object.revenue.actualPerCwt.components = object.revenue.actual.components / ( coveredMilkProduction / 100 );\r\n object.revenue.actualPerCwt.class = object.revenue.actual.class / ( coveredMilkProduction / 100 );\r\n\r\n object.revenue.grossIndemnity.components = returnToZero(\r\n roundOn(Math.max(data.Component.RevenueGuarantee - object.revenue.actual.components), 0));\r\n object.revenue.grossIndemnity.class = returnToZero(roundOn(Math.max(data.Class.RevenueGuarantee - object.revenue.actual.class), 0));\r\n\r\n object.revenue.grossIndemnityPerCwt.components = returnToZero(object.revenue.grossIndemnity.components / (coveredMilkProduction / 100));\r\n object.revenue.grossIndemnityPerCwt.class = returnToZero(object.revenue.grossIndemnity.class / (coveredMilkProduction / 100));\r\n\r\n mutateResults(object);\r\n };\r\n React.useEffect(calculateResults, [inputFields]);\r\n\r\n const [ data, setData ] = React.useState(apiData);\r\n React.useEffect(() => {\r\n (async () => {\r\n const response = await riskPremiumAPI.get({\r\n reinsuranceYear: 2019, share: 1,\r\n stateCode, practiceCode, salesEffectiveDate, butterfatTest, proteinTest, classPriceWeightingFactor,\r\n coverageLevel, coveredMilkProduction, protectionFactor,\r\n });\r\n setData(response.data as any);\r\n mutateInputFields({\r\n butter: {\r\n a: response.data.Component.ButterPrice.MonthPrices[0].ActualPrice,\r\n b: response.data.Component.ButterPrice.MonthPrices[1].ActualPrice,\r\n c: response.data.Component.ButterPrice.MonthPrices[2].ActualPrice,\r\n },\r\n cheese: {\r\n a: response.data.Component.CheesePrice.MonthPrices[0].ActualPrice,\r\n b: response.data.Component.CheesePrice.MonthPrices[1].ActualPrice,\r\n c: response.data.Component.CheesePrice.MonthPrices[2].ActualPrice,\r\n },\r\n dryWhey: {\r\n a: response.data.Component.DryWheyPrice.MonthPrices[0].ActualPrice,\r\n b: response.data.Component.DryWheyPrice.MonthPrices[1].ActualPrice,\r\n c: response.data.Component.DryWheyPrice.MonthPrices[2].ActualPrice,\r\n },\r\n noFatDryMilk: {\r\n a: response.data.Component.NonfatDryMilk.MonthPrices[0].ActualPrice,\r\n b: response.data.Component.NonfatDryMilk.MonthPrices[1].ActualPrice,\r\n c: response.data.Component.NonfatDryMilk.MonthPrices[2].ActualPrice,\r\n },\r\n milkProd: { a: response.data.MilkProduction.ActualPrice },\r\n });\r\n })();\r\n }, [\r\n stateCode, practiceCode, salesEffectiveDate, butterfatTest, proteinTest, classPriceWeightingFactor,\r\n coverageLevel, coveredMilkProduction, protectionFactor,\r\n ]);\r\n const formatDate = (d: any, s: any, o: any ) => format(d, s);\r\n\r\n return (\r\n \r\n Dairy Revenue Protection\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {/**/}\r\n {/* */}\r\n {/* */}\r\n {/* Premiums*/}\r\n {/* Components (4.0% BF, 3.2% PR)*/}\r\n {/* Class III*/}\r\n {/* Class IV*/}\r\n {/* Class Blend (75% Class III, 25% Class IV)*/}\r\n {/* */}\r\n {/* */}\r\n {/* */}\r\n {/* */}\r\n {/* */}\r\n {/* b*/}\r\n {/* c*/}\r\n {/* d*/}\r\n {/* d*/}\r\n {/* */}\r\n\r\n {/* */}\r\n {/* */}\r\n {/* b*/}\r\n {/* c*/}\r\n {/* d*/}\r\n {/* d*/}\r\n {/* */}\r\n\r\n {/* */}\r\n {/* */}\r\n {/* b*/}\r\n {/* c*/}\r\n {/* d*/}\r\n {/* d*/}\r\n {/* */}\r\n\r\n {/* */}\r\n {/* */}\r\n {/* b*/}\r\n {/* c*/}\r\n {/* d*/}\r\n {/* d*/}\r\n {/* */}\r\n\r\n {/* */}\r\n {/* */}\r\n {/* b*/}\r\n {/* c*/}\r\n {/* d*/}\r\n {/* d*/}\r\n {/* */}\r\n {/* */}\r\n {/*
Protected Pounds
Revenue Guarantee
Expected Basis
Protected Revenue
Premium
*/}\r\n\r\n \r\n \r\n \r\n Price\r\n Components\r\n Class III & IV\r\n \r\n \r\n \r\n \r\n Expected Revenue\r\n ${formatValue(0)(data.Component.ExpectedRevenue)}\r\n ${formatValue(0)(data.Class.ExpectedRevenue)}\r\n \r\n\r\n \r\n Revenue Guarantee ($)\r\n ${formatValue(0)(data.Component.RevenueGuarantee)}\r\n ${formatValue(0)(data.Class.RevenueGuarantee)}\r\n \r\n\r\n \r\n Revenue Guarantee (per cwt)\r\n ${formatValue(2)(data.Component.RevenueGuaranteeCwt)}\r\n ${formatValue(2)(data.Class.RevenueGuaranteeCwt)}\r\n \r\n\r\n \r\n Premium before Subsidy ($)\r\n ${formatValue(0)(data.Component.Premium)}\r\n ${formatValue(0)(data.Class.Premium)}\r\n \r\n\r\n \r\n Premium before Subsidy (per cwt)\r\n ${formatValue(4)(data.Component.PremiumCwt)}\r\n ${formatValue(4)(data.Class.PremiumCwt)}\r\n \r\n\r\n \r\n Subsidy ($)\r\n ${formatValue(0)(data.Component.Subsidy)}\r\n ${formatValue(0)(data.Class.Subsidy)}\r\n \r\n\r\n \r\n Subsidy (per cwt)\r\n ${formatValue(4)(data.Component.SubsidyCwt)}\r\n ${formatValue(4)(data.Class.SubsidyCwt)}\r\n \r\n\r\n \r\n Producer Premium Amount ($)\r\n ${formatValue(0)(data.Component.ProducerPreimum)}\r\n ${formatValue(0)(data.Class.ProducerPreimum)}\r\n \r\n\r\n \r\n Producer Premium Amount (per cwt)\r\n ${formatValue(2)(data.Component.ProducerPreimumCwt)}\r\n ${formatValue(2)(data.Class.ProducerPreimumCwt)}\r\n \r\n\r\n \r\n Probability of Positive Indemnity\r\n {formatValue(2)(data.Component.ProbabilityOfPostiveIndemnity)}%\r\n {formatValue(2)(data.Class.ProbabilityOfPostiveIndemnity)}%\r\n \r\n\r\n \r\n Probability of Positive Net Benefit\r\n {formatValue(2)(data.Component.ProbabilityOfPositiveNetBenefit)}%\r\n {formatValue(2)(data.Class.ProbabilityOfPositiveNetBenefit)}%\r\n \r\n \r\n
\r\n\r\n {/**/}\r\n {/* Testing Component*/}\r\n {/**/}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Dairy\r\n Month\r\n Expected\r\n Actual\r\n \r\n \r\n \r\n \r\n \r\n {format(data.Component.ButterPrice.MonthPrices[0].Date, 'MMM-YY')}\r\n ${formatValue(4)(data.Component.ButterPrice.MonthPrices[0].ExpectedPrice)}\r\n \r\n \r\n \r\n \r\n \r\n {format(data.Component.ButterPrice.MonthPrices[1].Date, 'MMM-YY')}\r\n ${formatValue(4)(data.Component.ButterPrice.MonthPrices[1].ExpectedPrice)}\r\n \r\n \r\n \r\n \r\n \r\n {format(data.Component.ButterPrice.MonthPrices[2].Date, 'MMM-YY')}\r\n ${formatValue(4)(data.Component.ButterPrice.MonthPrices[2].ExpectedPrice)}\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {format(data.Component.CheesePrice.MonthPrices[0].Date, 'MMM-YY')}\r\n ${formatValue(4)(data.Component.CheesePrice.MonthPrices[0].ExpectedPrice)}\r\n \r\n \r\n \r\n \r\n \r\n {format(data.Component.CheesePrice.MonthPrices[1].Date, 'MMM-YY')}\r\n ${formatValue(4)(data.Component.CheesePrice.MonthPrices[1].ExpectedPrice)}\r\n \r\n \r\n \r\n \r\n \r\n {format(data.Component.CheesePrice.MonthPrices[2].Date, 'MMM-YY')}\r\n ${formatValue(4)(data.Component.CheesePrice.MonthPrices[2].ExpectedPrice)}\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {format(data.Component.DryWheyPrice.MonthPrices[0].Date, 'MMM-YY')}\r\n ${formatValue(4)(data.Component.DryWheyPrice.MonthPrices[0].ExpectedPrice)}\r\n \r\n \r\n \r\n \r\n \r\n {format(data.Component.DryWheyPrice.MonthPrices[1].Date, 'MMM-YY')}\r\n ${formatValue(4)(data.Component.DryWheyPrice.MonthPrices[1].ExpectedPrice)}\r\n \r\n \r\n \r\n \r\n \r\n {format(data.Component.DryWheyPrice.MonthPrices[2].Date, 'MMM-YY')}\r\n ${formatValue(4)(data.Component.DryWheyPrice.MonthPrices[2].ExpectedPrice)}\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {format(data.Component.NonfatDryMilk.MonthPrices[0].Date, 'MMM-YY')}\r\n ${formatValue(4)(data.Component.NonfatDryMilk.MonthPrices[0].ExpectedPrice)}\r\n \r\n \r\n \r\n \r\n \r\n {format(data.Component.NonfatDryMilk.MonthPrices[1].Date, 'MMM-YY')}\r\n ${formatValue(4)(data.Component.NonfatDryMilk.MonthPrices[1].ExpectedPrice)}\r\n \r\n \r\n \r\n \r\n \r\n {format(data.Component.NonfatDryMilk.MonthPrices[2].Date, 'MMM-YY')}\r\n ${formatValue(4)(data.Component.NonfatDryMilk.MonthPrices[2].ExpectedPrice)}\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {format(data.Class.ClassIIIPrice.MonthPrices[0].Date, 'MMM-YY')}\r\n ${formatValue(2)(data.Class.ClassIIIPrice.MonthPrices[0].ExpectedPrice)}\r\n ${formatValue(2)(results.table.class3.a)}\r\n \r\n \r\n {format(data.Class.ClassIIIPrice.MonthPrices[1].Date, 'MMM-YY')}\r\n ${formatValue(2)(data.Class.ClassIIIPrice.MonthPrices[1].ExpectedPrice)}\r\n ${formatValue(2)(results.table.class3.b)}\r\n \r\n \r\n {format(data.Class.ClassIIIPrice.MonthPrices[2].Date, 'MMM-YY')}\r\n ${formatValue(2)(data.Class.ClassIIIPrice.MonthPrices[2].ExpectedPrice)}\r\n ${formatValue(2)(results.table.class3.c)}\r\n \r\n\r\n \r\n \r\n {format(data.Class.ClassIVPrice.MonthPrices[0].Date, 'MMM-YY')}\r\n ${formatValue(2)(data.Class.ClassIVPrice.MonthPrices[0].ExpectedPrice)}\r\n ${formatValue(2)(results.table.class4.a)}\r\n \r\n \r\n {format(data.Class.ClassIVPrice.MonthPrices[1].Date, 'MMM-YY')}\r\n ${formatValue(2)(data.Class.ClassIVPrice.MonthPrices[1].ExpectedPrice)}\r\n ${formatValue(2)(results.table.class4.b)}\r\n \r\n \r\n {format(data.Class.ClassIVPrice.MonthPrices[2].Date, 'MMM-YY')}\r\n ${formatValue(2)(data.Class.ClassIVPrice.MonthPrices[2].ExpectedPrice)}\r\n ${formatValue(2)(results.table.class4.c)}\r\n \r\n\r\n \r\n Milk Production
Per Cow
\r\n Oct - Dec,
2019
\r\n {formatValue(0)(data.MilkProduction.ExpectedPrice)}\r\n \r\n \r\n \r\n \r\n \r\n
Butter
Cheese
Dry Whey
Nonfat Dry Milk
Class III Milk
Class IV Milk
\r\n
\r\n \r\n \r\n \r\n \r\n Price\r\n Expected\r\n Actual\r\n \r\n \r\n \r\n \r\n Butterfat\r\n ${formatValue(4)(data.Component.ButterfatPrice.ExpectedPrice)}\r\n ${formatValue(4)(results.actualCalculatedPrices.butterfat)}\r\n \r\n\r\n \r\n Protein\r\n ${formatValue(4)(data.Component.ProteinPrice.ExpectedPrice)}\r\n ${formatValue(4)(results.actualCalculatedPrices.protein)}\r\n \r\n\r\n \r\n Other Solids Price\r\n ${formatValue(4)(data.Component.OtherSolidsPrice.ExpectedPrice)}\r\n ${formatValue(4)(results.actualCalculatedPrices.otherSolids)}\r\n \r\n\r\n \r\n Class III Price\r\n ${formatValue(2)(data.Class.ClassIIIPrice.ExpectedPrice)}\r\n ${formatValue(2)(results.actualCalculatedPrices.classIIIMilk)}\r\n \r\n\r\n \r\n Class IV Price\r\n ${formatValue(2)(data.Class.ClassIVPrice.ExpectedPrice)}\r\n ${formatValue(2)(results.actualCalculatedPrices.classIVMilk)}\r\n \r\n \r\n
\r\n\r\n \r\n \r\n \r\n Price\r\n Components\r\n Class III & IV\r\n \r\n \r\n \r\n \r\n Expected DRP
Revenue (per cwt)
\r\n ${formatValue(2)(data.Component.ExpectedRevenueCwt)}\r\n ${formatValue(2)(data.Class.ExpectedRevenueCwt)}\r\n \r\n\r\n \r\n DRP Revenue
Guarantee ($)
\r\n ${formatValue(0)(data.Component.RevenueGuarantee)}\r\n ${formatValue(0)(data.Class.RevenueGuarantee)}\r\n \r\n\r\n \r\n DRP Revenue
Guarantee (per cwt)
\r\n ${formatValue(2)(results.revenue.guaranteeDPRPerCwt.components)}\r\n ${formatValue(2)(results.revenue.guaranteeDPRPerCwt.class)}\r\n \r\n\r\n \r\n Actual Revenue
($)
\r\n ${formatValue(0)(results.revenue.actual.components)}\r\n ${formatValue(0)(results.revenue.actual.class)}\r\n \r\n\r\n \r\n Actual Revenue
(per cwt)
\r\n ${formatValue(2)(results.revenue.actualPerCwt.components)}\r\n ${formatValue(2)(results.revenue.actualPerCwt.class)}\r\n \r\n\r\n \r\n Gross Indemnity
($)
\r\n ${formatValue(0)(results.revenue.grossIndemnity.components)}\r\n ${formatValue(0)(results.revenue.grossIndemnity.class)}\r\n \r\n\r\n \r\n Gross Indemnity
(per cwt)
\r\n ${formatValue(2)(results.revenue.grossIndemnityPerCwt.components)}\r\n ${formatValue(2)(results.revenue.grossIndemnityPerCwt.class)}\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default RevenuePredictionContainer;\r\n","import * as React from 'react';\r\nimport RevenuePredictionContainer from '../../containers/RevenuePredictionContainer/RevenuePredictionContainer';\r\n\r\nconst RevenuePredictionScene: React.FC = () => ;\r\n\r\nexport default RevenuePredictionScene;\r\n","import * as React from \"react\";\r\nimport { connect } from \"react-redux\";\r\nimport C from \"src/components/AdminPanel/adminPanel/C\";\r\nimport HeaderCell from \"src/components/AdminPanel/adminPanel/HeaderCell\";\r\nimport Table from \"src/components/AdminPanel/adminPanel/Table\";\r\nimport TD from \"src/components/AdminPanel/adminPanel/TD\";\r\nimport Checkbox from \"src/components/shared/Checkbox/Checkbox\";\r\nimport { adminActions } from \"src/ducks/admin/actions\";\r\nimport {\r\n getActiveSubscriptions,\r\n getSubsAndViews,\r\n getViewsForDisplay,\r\n} from \"src/ducks/admin/selectors\";\r\nimport { RootState } from \"src/ducks/store\";\r\n\r\ntype OwnProps = {\r\n perPage: number;\r\n activePage: number;\r\n sort: string;\r\n};\r\n\r\ntype Props = ReturnType &\r\n typeof mapDispatchToProps &\r\n OwnProps;\r\n\r\nfunction ViewMailNotificationsTable(props: Props) {\r\n function getNotifSelectedStatus(organizationViewName: string) {\r\n return props.activeSubscriptions.includes(organizationViewName);\r\n }\r\n\r\n function onReceiveClickHandler(\r\n organizationViewName: string,\r\n isSelected: boolean\r\n ) {\r\n return () => {\r\n if (isSelected) {\r\n const existingSubscription = props.subsAndViews.subscriptions.find(\r\n (sub) => sub.viewName === organizationViewName\r\n );\r\n if (!existingSubscription) return;\r\n props.unsubscribeToView(existingSubscription);\r\n } else props.subscribeToView({ viewName: organizationViewName });\r\n };\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n Name\r\n Receive Notification\r\n \r\n \r\n \r\n {props.displayViews.length ? (\r\n props.displayViews.map((viewName) => (\r\n \r\n \r\n \r\n \r\n ))\r\n ) : (\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n
{viewName}\r\n \r\n \r\n \r\n
No views.
\r\n );\r\n}\r\n\r\nconst mapStateToProps = (state: RootState, props: OwnProps) => ({\r\n subsAndViews: getSubsAndViews(state),\r\n activeSubscriptions: getActiveSubscriptions(state),\r\n displayViews: getViewsForDisplay(state, props),\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n subscribeToView: adminActions.subscriptionsAndViews.subscribe,\r\n unsubscribeToView: adminActions.subscriptionsAndViews.unsubscribe,\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps\r\n)(ViewMailNotificationsTable);\r\n","import * as React from \"react\";\r\nimport { connect } from \"react-redux\";\r\nimport PaginationWrapper from \"src/components/AdminPanel/adminPanel/PaginationWrapper\";\r\nimport Pagination from \"src/components/shared/Pagination/Pagination\";\r\nimport PerPage from \"src/components/shared/Pagination/perPage\";\r\nimport { adminActions } from \"src/ducks/admin/actions\";\r\nimport { getAdminPageSearch } from \"src/ducks/adminPage/selectors\";\r\nimport { RootState } from \"src/ducks/store\";\r\nimport styled from \"styled-components\";\r\nimport ViewMailNotificationsTable from \"./ViewMailNotificationsTable\";\r\nimport ContentSearch from \"src/components/AdminPanel/adminPanel/ContentSearch\";\r\nimport { adminPageActions } from \"src/ducks/adminPage/actions\";\r\nimport color from \"src/utils/color\";\r\nimport { getSubsAndViews } from \"src/ducks/admin/selectors\";\r\nimport SelectSection from \"src/components/AdminPanel/adminPanel/SelectSection\";\r\nimport SelectField from \"src/components/shared/SelectField/SelectField\";\r\nimport containsString from \"src/utils/containsString\";\r\n\r\nconst PageHeaderWrapper = styled.div`\r\n color: ${color.PRIMARY};\r\n margin-bottom: 1.5rem;\r\n`;\r\n\r\nconst PageHeader = styled.div`\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n`;\r\n\r\ntype Props = ReturnType & typeof mapDispatchToProps;\r\n\r\nfunction ViewMailNotificationsScene(props: Props) {\r\n const [perPage, setPerPage] = React.useState(10);\r\n const [activePage, setActivePage] = React.useState(1);\r\n const [sortBy, setSortBy] = React.useState(\"A - Z\");\r\n\r\n function onPerPageSelect(event: React.ChangeEvent) {\r\n const dataLength = props.subsAndViews.views.length;\r\n const lastPage = Math.ceil(dataLength / Number(event.target.value));\r\n if (activePage > lastPage) setActivePage(lastPage);\r\n setPerPage(Number(event.target.value));\r\n }\r\n\r\n function onPageSelect(value: number) {\r\n return () => setActivePage(value);\r\n }\r\n\r\n function handleOnSearchChange(e: React.ChangeEvent) {\r\n props.setAdminSearch(e.target.value);\r\n setActivePage(1);\r\n }\r\n\r\n function onSortChange(value: number) {\r\n const newSortBy = sortingOptions.find((so) => so.id === value);\r\n if (newSortBy) setSortBy(newSortBy.name);\r\n }\r\n\r\n function getPaginationLength() {\r\n if (!props.searchParameter.length) {\r\n return props.subsAndViews.views.length;\r\n }\r\n return props.subsAndViews.views.filter((v) =>\r\n containsString(v, props.searchParameter)\r\n ).length;\r\n }\r\n\r\n React.useEffect(function initRender() {\r\n props.setAdminSearch(\"\");\r\n props.getViews();\r\n props.getSubscriptions();\r\n\r\n return () => {\r\n props.setAdminSearch(\"\");\r\n };\r\n }, []);\r\n\r\n return (\r\n
\r\n \r\n \r\n

View Mail Notifications

\r\n \r\n
\r\n
\r\n \r\n Sort By:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n\r\nconst mapStateToProps = (state: RootState) => ({\r\n subsAndViews: getSubsAndViews(state),\r\n searchParameter: getAdminPageSearch(state),\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n getViews: adminActions.subscriptionsAndViews.getViews,\r\n getSubscriptions: adminActions.subscriptionsAndViews.getSubs,\r\n setAdminSearch: adminPageActions.setSearch,\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps\r\n)(ViewMailNotificationsScene);\r\n\r\nconst sortingOptions = [\r\n { id: 3, name: \"A - Z\" },\r\n { id: 4, name: \"Z - A\" },\r\n];\r\n","import * as React from \"react\";\r\nimport color from \"src/utils/color\";\r\nimport styled from \"styled-components\";\r\nimport {\r\n IoIosArrowDropdownCircle,\r\n IoIosArrowDropupCircle,\r\n} from \"react-icons/io\";\r\nimport Button from \"src/components/shared/Button/Button\";\r\nimport { Link, RouteComponentProps } from \"react-router-dom\";\r\nimport { CategoryRouteState, RouteCategories } from \"./landingPage.types\";\r\nimport noSectionImg from \"../../media/images/no-section-selected.png\";\r\nimport dairySectionImg from \"../../media/images/dairy-section.png\";\r\nimport grainFeedSectionImg from \"../../media/images/grain-feed-section.png\";\r\nimport livestockSectionImg from \"../../media/images/livestock-section.png\";\r\n\r\ntype PageProps = RouteComponentProps<{}, {}, CategoryRouteState | undefined>;\r\n\r\nconst Root = styled.section`\r\n color: ${color.TEXT_PRIMARY};\r\n\r\n > * + * {\r\n margin-top: 5rem;\r\n }\r\n`;\r\n\r\nconst HeadingWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n`;\r\nconst Heading = styled.h1`\r\n font-size: 48px;\r\n line-height: 58.51px;\r\n margin-top: 0;\r\n`;\r\nconst HeadingDescription = styled.p`\r\n width: 675px;\r\n text-align: center;\r\n font-weight: 500;\r\n font-size: 16px;\r\n line-height: 1.5rem;\r\n letter-spacing: 0.025rem;\r\n\r\n @media (max-width: 675px) {\r\n width: 100%;\r\n }\r\n`;\r\n\r\nconst Highlight = styled.span`\r\n color: ${color.PRIMARY};\r\n`;\r\n\r\nconst InfoSectionWrapper = styled.div``;\r\nconst SubHeading = styled.h2`\r\n font-weight: 700;\r\n font-size: 2.25rem;\r\n line-height: 2.75rem;\r\n`;\r\nconst InfoSection = styled.p`\r\n line-height: 1.5rem;\r\n font-weight: 500;\r\n font-size: 1rem;\r\n\r\n @media (min-width: 1024px) {\r\n width: 75%;\r\n }\r\n`;\r\n\r\nconst ServicesWrapper = styled.div`\r\n display: flex;\r\n column-gap: 10rem;\r\n\r\n @media (max-width: 870px) {\r\n flex-direction: column;\r\n row-gap: 5rem;\r\n }\r\n`;\r\nconst ServicesDescriptionContainer = styled.section`\r\n flex: 1 1 0%;\r\n`;\r\nconst ServicesImageContainer = styled.div`\r\n flex: 1 1 0%;\r\n\r\n @media (max-width: 870px) {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n }\r\n`;\r\nconst ServicesImage = styled.img`\r\n max-width: 100%;\r\n height: auto;\r\n border-radius: 0.5rem;\r\n`;\r\nconst WhatWeCoverDescription = styled.p`\r\n font-weight: 600;\r\n font-size: 1rem;\r\n line-height: 1.2rem;\r\n`;\r\n\r\nconst CoveredServicesWrapper = styled.section`\r\n padding-top: 2rem;\r\n\r\n > * + * {\r\n margin-top: 0.5rem;\r\n }\r\n`;\r\n\r\nconst FooterActionsWrapper = styled.div`\r\n display: flex;\r\n justify-content: center;\r\n column-gap: 2.5rem;\r\n margin-bottom: 5rem;\r\n`;\r\nconst FooterNote = styled.p`\r\n font-weight: 400;\r\n font-size: 0.625rem;\r\n line-height: 0.75rem;\r\n color: ${color.LANDING_PAGE_SECONDARY};\r\n`;\r\n\r\ntype ActiveSections = {\r\n \"dairy-markets\": boolean;\r\n \"grain-feed-markets\": boolean;\r\n \"livestock-markets\": boolean;\r\n};\r\nconst DEFAULT_ACTIVE_SECTION: ActiveSections = {\r\n \"dairy-markets\": false,\r\n \"grain-feed-markets\": false,\r\n \"livestock-markets\": false,\r\n};\r\n\r\nexport default function UdmApiSubscriptionScene({ location }: PageProps) {\r\n const [activeSection, setActiveSection] = React.useState(\r\n DEFAULT_ACTIVE_SECTION\r\n );\r\n\r\n function getSectionImageSource() {\r\n if (activeSection[\"dairy-markets\"]) return dairySectionImg;\r\n if (activeSection[\"grain-feed-markets\"]) return grainFeedSectionImg;\r\n if (activeSection[\"livestock-markets\"]) return livestockSectionImg;\r\n return noSectionImg;\r\n }\r\n\r\n function handleServiceClick(service: RouteCategories) {\r\n setActiveSection((current) => {\r\n const newState = { ...DEFAULT_ACTIVE_SECTION };\r\n newState[service] = !current[service];\r\n return newState;\r\n });\r\n }\r\n\r\n React.useEffect(() => {\r\n if (location.state) {\r\n const { section } = location.state;\r\n setActiveSection((current) => ({ ...current, [section]: true }));\r\n const activeSectionDOM = document.getElementById(section);\r\n if (activeSectionDOM) {\r\n activeSectionDOM.scrollIntoView({\r\n behavior: \"smooth\",\r\n block: \"center\",\r\n inline: \"nearest\",\r\n });\r\n }\r\n }\r\n }, []);\r\n\r\n return (\r\n \r\n \r\n \r\n UDM API Subscription\r\n \r\n \r\n Navigate the markets with unmatched accuracy. UDM eliminates data\r\n hassles by aggregating and streamlining the process of cleaning and\r\n collecting information from a broad range of global sources. Our\r\n service delivers timely data, empowering you to make informed\r\n decisions and stay ahead.\r\n \r\n \r\n \r\n What we do\r\n \r\n This annual subscription-based service provides users with access to a\r\n comprehensive database covering dairy, livestock, and grain markets,\r\n agricultural insurance data, and macroeconomic data aggregated from\r\n over 700 reports worldwide. It serves as a one-stop shop for\r\n agricultural market data, saving time, money, and hassle for a wide\r\n range of industry participants.\r\n \r\n \r\n \r\n \r\n What we cover\r\n \r\n Explore the different markets for which we provide our API data\r\n service. Users can also interact with the data in Microsoft Excel\r\n and Power BI, creating customized dashboards to meet their specific\r\n needs\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n *If you're a student, faculty member, or part of a governmental agency\r\n you could be provided with a UDM subscription at no cost\r\n \r\n
\r\n
\r\n );\r\n}\r\n\r\ntype CoveredServicesContainerProps = {\r\n activeSection: ActiveSections;\r\n handleServiceClick(service: RouteCategories): void;\r\n};\r\nfunction CoveredServicesContainer({\r\n activeSection,\r\n handleServiceClick,\r\n}: CoveredServicesContainerProps) {\r\n return (\r\n \r\n {coveredServices.map((cs) => (\r\n \r\n ))}\r\n \r\n );\r\n}\r\n\r\nconst CoveredService = styled.div`\r\n border-bottom: 2px solid black;\r\n padding-bottom: 0.5rem;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n`;\r\nconst ServiceButton = styled.button`\r\n border: none;\r\n background-color: transparent;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n color: ${color.PRIMARY};\r\n transition: color 300ms linear;\r\n cursor: pointer;\r\n\r\n &:hover {\r\n color: ${color.POSITIVE};\r\n }\r\n`;\r\nconst ServiceDescription = styled.p`\r\n font-weight: 400;\r\n font-size: 0.875rem;\r\n line-height: 1rem;\r\n`;\r\nconst CoveredServiceTitle = styled.span`\r\n font-weight: 600;\r\n font-size: 1.25rem;\r\n line-height: 1.5rem;\r\n`;\r\n\r\ntype TCoveredService = {\r\n id: number;\r\n title: string;\r\n description: string;\r\n category: RouteCategories;\r\n};\r\ntype ServiceProps = {\r\n coveredService: TCoveredService;\r\n isOpen: boolean;\r\n handleServiceClick(service: RouteCategories): void;\r\n};\r\nfunction Service({ coveredService, isOpen, handleServiceClick }: ServiceProps) {\r\n return (\r\n <>\r\n \r\n {coveredService.title}\r\n handleServiceClick(coveredService.category)}\r\n >\r\n {isOpen ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n \r\n {isOpen && (\r\n {coveredService.description}\r\n )}\r\n \r\n );\r\n}\r\n\r\nconst coveredServices: Array = [\r\n {\r\n id: 1,\r\n title: \"Dairy Markets\",\r\n description:\r\n \"UDM was developed to address the dairy industry's need for a reliable hub for dairy market data. UDM offers a comprehensive range of dairy market information, including milk production, global trade flows, futures, options, cash market prices, stocks, and various other indicators.\",\r\n category: \"dairy-markets\",\r\n },\r\n {\r\n id: 2,\r\n title: \"Grain & Feed Markets\",\r\n description:\r\n \"UDM has a wide range of grain information ranging from supply, demand, exports, futures, options, exports, feedstuff prices, and many more indicators.\",\r\n category: \"grain-feed-markets\",\r\n },\r\n {\r\n id: 3,\r\n title: \"Livestock Markets\",\r\n description:\r\n \"UDM offers cattle and swine market information and livestock insurance related market data for DRP, LRP, and LGM.\",\r\n category: \"livestock-markets\",\r\n },\r\n];\r\n","import * as React from \"react\";\r\nimport Input from \"src/components/AdminPanel/adminPanel/Input\";\r\nimport Button from \"src/components/shared/Button/Button\";\r\nimport color from \"src/utils/color\";\r\nimport styled from \"styled-components\";\r\nimport {\r\n ContactUsFormValues,\r\n ContactUsRequestPayload,\r\n} from \"./landingPage.types\";\r\nimport { validateEmail } from \"./utils\";\r\nimport { toast } from \"react-toastify\";\r\nimport Axios from \"axios\";\r\nimport { withRouter, RouteComponentProps } from \"react-router-dom\";\r\n\r\nconst publicApi = Axios.create({\r\n baseURL: `${process.env.REACT_APP_ADMIN_API_URL}/admin/`,\r\n});\r\n\r\nconst Root = styled.section`\r\n color: ${color.TEXT_PRIMARY};\r\n\r\n > * + * {\r\n margin-top: 5rem;\r\n }\r\n`;\r\n\r\nconst Header = styled.section`\r\n > * + * {\r\n margin-top: 1rem;\r\n }\r\n`;\r\n\r\nconst Heading = styled.h2`\r\n font-weight: 700;\r\n font-size: 2.5rem;\r\n line-height: 3rem;\r\n color: ${color.PRIMARY};\r\n border-bottom: 1px solid ${color.PRIMARY};\r\n width: 23rem;\r\n margin: 0;\r\n`;\r\n\r\nconst InfoSection = styled.p`\r\n font-weight: 600;\r\n font-size: 1.25rem;\r\n line-height: 1.5rem;\r\n width: 29rem;\r\n`;\r\n\r\nexport default function ContactUsScene() {\r\n return (\r\n \r\n
\r\n Contact Us\r\n \r\n Talk to an expert to find out if UDM is the right fit for your company\r\n \r\n
\r\n \r\n
\r\n );\r\n}\r\n\r\nconst FormWrapper = styled.section`\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n`;\r\nconst ContactUsForm = styled.form`\r\n background-color: #6eb23f1a;\r\n padding: 1rem 5rem;\r\n width: 37.5%;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n\r\n > * + * {\r\n margin-top: 1.25rem;\r\n }\r\n\r\n @media (max-width: 1240px) {\r\n width: 50%;\r\n }\r\n\r\n @media (max-width: 825px) {\r\n width: 100%;\r\n padding: 1rem 2.5rem;\r\n }\r\n`;\r\nconst FormHeading = styled.h3`\r\n font-weight: 600;\r\n font-size: 1.25rem;\r\n line-height: 1.5rem;\r\n`;\r\n\r\nconst FormInput = styled(Input)`\r\n background-color: ${color.BACKGROUND};\r\n`;\r\nconst FormLabel = styled.label`\r\n width: 75%;\r\n font-weight: 500;\r\n font-size: 0.75rem;\r\n line-height: 0.9rem;\r\n\r\n @media (max-width: 600px) {\r\n width: 100%;\r\n }\r\n`;\r\n\r\ntype FormValuesProp = keyof ContactUsFormValues;\r\n\r\nconst INIT_FORM_VALUES: ContactUsFormValues = {\r\n firstName: \"\",\r\n lastName: \"\",\r\n email: \"\",\r\n companyName: \"\",\r\n message: \"\",\r\n};\r\nconst MAX_MSG_CHAR_LENGTH = 500;\r\n\r\nfunction ContactUsFormContainer({ history }: RouteComponentProps) {\r\n const [formValues, setFormValues] = React.useState(\r\n INIT_FORM_VALUES\r\n );\r\n const [isSubmitting, setIsSubmitting] = React.useState(false);\r\n\r\n const tooManyMessageChars =\r\n formValues.message.length > 0 &&\r\n formValues.message.length > MAX_MSG_CHAR_LENGTH;\r\n const invalidForm =\r\n !formValues.firstName.trim() ||\r\n !formValues.lastName.trim() ||\r\n !formValues.email.trim() ||\r\n !formValues.companyName.trim() ||\r\n tooManyMessageChars;\r\n\r\n async function handleSubmit(event: React.FormEvent) {\r\n event.preventDefault();\r\n if (isSubmitting) return;\r\n const { firstName, lastName, email, companyName, message } = formValues;\r\n const trimmedEmail = email.trim();\r\n const isEmailValid = validateEmail(trimmedEmail);\r\n if (!isEmailValid) {\r\n toast.warn(\"Please input valid email address\", {\r\n position: \"top-center\",\r\n });\r\n return;\r\n }\r\n if (tooManyMessageChars) {\r\n toast.warn(\r\n `Message cannot exceed ${MAX_MSG_CHAR_LENGTH} characters. Characters used: ${message.length}.`,\r\n { position: \"top-center\" }\r\n );\r\n return;\r\n }\r\n try {\r\n setIsSubmitting(true);\r\n const payload: ContactUsRequestPayload = {\r\n firstName: firstName.trim(),\r\n lastName: lastName.trim(),\r\n businessEmail: trimmedEmail,\r\n companyName: companyName.trim(),\r\n message: message.length ? message.trim() : null,\r\n };\r\n await publicApi.post(\"/contact-us\", payload);\r\n setFormValues(INIT_FORM_VALUES);\r\n toast.success(\"E-mail successfully sent! Redirecting to home page...\", {\r\n position: \"top-center\",\r\n onClose: () => {\r\n setIsSubmitting(false);\r\n history.push(\"/\");\r\n },\r\n });\r\n } catch {\r\n setIsSubmitting(false);\r\n toast.error(\"Error occurred while submitting! Please try again.\", {\r\n position: \"top-center\",\r\n });\r\n }\r\n }\r\n\r\n function handleInputChange(formProp: FormValuesProp) {\r\n return function(\r\n event: React.ChangeEvent\r\n ) {\r\n event.persist();\r\n setFormValues((current) => ({\r\n ...current,\r\n [formProp]: event.target.value,\r\n }));\r\n };\r\n }\r\n\r\n return (\r\n \r\n \r\n Contact Us\r\n \r\n First name *\r\n \r\n \r\n \r\n Last name *\r\n \r\n \r\n \r\n Business Email *\r\n \r\n \r\n \r\n Company name *\r\n \r\n \r\n \r\n Message\r\n \r\n {formValues.message.length === MAX_MSG_CHAR_LENGTH && (\r\n \r\n You've reached maximum number of characters allowed (\r\n {MAX_MSG_CHAR_LENGTH}).\r\n \r\n )}\r\n \r\n \r\n Submit\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nconst MessageTextArea = styled.textarea`\r\n height: 100px;\r\n resize: none;\r\n width: 100%;\r\n font-size: 15px;\r\n border-radius: 1rem;\r\n padding: 5px 10px;\r\n transform: translateY(3px);\r\n border: 1px solid ${color.PRIMARY};\r\n background-color: ${color.BACKGROUND};\r\n\r\n &:focus {\r\n outline: none;\r\n box-shadow: 0 0 4px 1px ${color.PRIMARY};\r\n }\r\n`;\r\n\r\nconst TooManyCharsError = styled.p`\r\n margin-top: 0.25rem;\r\n color: ${color.NEGATIVE};\r\n font-weight: 250;\r\n`;\r\n\r\nconst ContactUsFormContainerWithRouter = withRouter(ContactUsFormContainer);\r\n","export function validateEmail(email: string) {\r\n const regex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\r\n return regex.test(email);\r\n}\r\n","import * as React from \"react\";\r\nimport color from \"src/utils/color\";\r\nimport styled from \"styled-components\";\r\nimport { FaCog, FaFileContract, FaStore } from \"react-icons/fa\";\r\nimport { PiBank, PiFactory } from \"react-icons/pi\";\r\nimport { LuGraduationCap } from \"react-icons/lu\";\r\nimport { GiTrade } from \"react-icons/gi\";\r\nimport { BsBank } from \"react-icons/bs\";\r\nimport { VscGraph } from \"react-icons/vsc\";\r\nimport { IoShieldCheckmark } from \"react-icons/io5\";\r\n\r\nconst Root = styled.section`\r\n color: ${color.TEXT_PRIMARY};\r\n\r\n > * + * {\r\n margin-top: 5rem;\r\n }\r\n`;\r\n\r\nconst Heading = styled.h2`\r\n font-weight: 700;\r\n font-size: 2.5rem;\r\n line-height: 3rem;\r\n color: ${color.PRIMARY};\r\n border-bottom: 1px solid ${color.PRIMARY};\r\n width: 23rem;\r\n`;\r\n\r\nconst AboutUsContainer = styled.section`\r\n > * + * {\r\n margin-top: 2.5rem;\r\n }\r\n`;\r\n\r\nconst MemberWrapper = styled.div`\r\n width: 75%;\r\n text-align: justify;\r\n\r\n @media (max-width: 815px) {\r\n width: 100%;\r\n }\r\n`;\r\nconst MemberName = styled.div`\r\n color: ${color.PRIMARY};\r\n font-weight: 700;\r\n font-size: 1.25rem;\r\n line-height: 1.5rem;\r\n`;\r\nconst MemberRole = styled.div`\r\n color: black;\r\n font-weight: 600;\r\n font-size: 1rem;\r\n line-height: 1.2rem;\r\n`;\r\nconst MemberInfo = styled.div`\r\n margin-top: 0.5rem;\r\n`;\r\n\r\nconst WhoWeServeContainer = styled.section``;\r\nconst Grid = styled.div`\r\n display: grid;\r\n grid-template-columns: repeat(5, minmax(0, 1fr));\r\n gap: 2.5rem;\r\n\r\n @media (max-width: 825px) {\r\n grid-template-columns: repeat(2, minmax(0, 1fr));\r\n gap: 1.25rem;\r\n }\r\n`;\r\n\r\nexport default function AboutUsScene() {\r\n return (\r\n \r\n \r\n About us\r\n \r\n Dr. Marin Bozic\r\n Founder\r\n \r\n Dr. Marin Bozic is the founder and CEO of Bozic LLC, a global\r\n provider of technology solutions for commodity markets analytics and\r\n designer of three major livestock insurance programs in the United\r\n States - Dairy Revenue Protection, Livestock Gross Margin and\r\n Livestock Risk Protection. In addition, Dr. Bozic is a board advisor\r\n to Edge Dairy Farmer Cooperative and a nationally popular consultant\r\n and speaker on economics of dairy markets and policy issues.\r\n \r\n \r\n \r\n Brian Walton\r\n Lead Economist\r\n \r\n Brian Walton is an economics and research specialist with Bozic LLC.\r\n Brian's research specializes in data analysis, consulting and risk\r\n management in the dairy and grain sectors. He leads UDM business\r\n development, consulting, and customer service efforts for UDM. Brian\r\n earned his undergraduate degree from the University of Minnesota in\r\n applied economics.\r\n \r\n \r\n \r\n Ivan Roic\r\n Lead Developer\r\n \r\n Ivan Roic is the lead developer for UDM, assisting in data\r\n collection processes and the seamless performance of the UDM\r\n database/API. Ivan has over a decade of experience with procuring\r\n data, managing IT systems, and organizing large databases.\r\n \r\n \r\n \r\n \r\n Who we serve\r\n \r\n {whoWeServe.map((wws) => (\r\n \r\n ))}\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nconst GridItemContainer = styled.div`\r\n > * + * {\r\n margin-top: 1.25rem;\r\n }\r\n`;\r\nconst GridItemIconWrapper = styled.div`\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n`;\r\nconst GridItemIcon = styled.div`\r\n background-color: ${color.PRIMARY};\r\n color: white;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n border-radius: 0.5rem;\r\n font-size: 3rem;\r\n padding: 1.5rem;\r\n\r\n @media (max-width: 815px) {\r\n font-size: 1.5rem;\r\n padding: 1rem;\r\n }\r\n`;\r\nconst GridItemTitle = styled.div`\r\n text-align: center;\r\n font-weight: 600;\r\n font-size: 1rem;\r\n line-height: 1.2rem;\r\n`;\r\nconst GridItemDescription = styled.div`\r\n text-align: center;\r\n font-weight: 400;\r\n font-size: 0.875rem;\r\n line-height: 1rem;\r\n\r\n @media (max-width: 815px) {\r\n text-align: left;\r\n }\r\n`;\r\n\r\ntype TGridItem = {\r\n icon: React.ReactNode;\r\n title: string;\r\n info: string;\r\n};\r\nfunction GridItem({ gridItem }: { gridItem: TGridItem }) {\r\n return (\r\n \r\n \r\n {gridItem.icon}\r\n \r\n {gridItem.title}\r\n {gridItem.info}\r\n \r\n );\r\n}\r\n\r\nconst whoWeServe: Array = [\r\n {\r\n icon: ,\r\n title: \"Processors\",\r\n info:\r\n \"Many processors use UDM because of the convenience of a one stop hub for relevant market data that helps drive better decisions\",\r\n },\r\n {\r\n icon: ,\r\n title: \"Banks & Lenders\",\r\n info:\r\n \"Banks and agricultural lenders use UDM to help with fundamental market analysis and while performing stress testing scenarios\",\r\n },\r\n {\r\n icon: ,\r\n title: \"Procurement Staff\",\r\n info:\r\n \"End users, buyers and procurement staff view UDM as integral to make more informed purchasing decisions\",\r\n },\r\n {\r\n icon: ,\r\n title: \"Cooperatives / Producers\",\r\n info:\r\n \"Many of the nations cooperatives rely on UDM for help in making important business decisions\",\r\n },\r\n {\r\n icon: ,\r\n title: \"Universities\",\r\n info:\r\n \"Universities and governmental agencies utilize UDM to enrich research and policy decisions\",\r\n },\r\n {\r\n icon: ,\r\n title: \"Traders\",\r\n info:\r\n \"Traders, exporters, and brokers use UDM to assist in fundamental analysis and aid trading decisions across the globe\",\r\n },\r\n {\r\n icon: ,\r\n title: \"Hedge Funds\",\r\n info:\r\n \"Proprietary trading groups, market makers, CTA's, and hedge funds rely on UDM for data needs in order to save time on data cleaning and collection while they focus on getting the edge in markets\",\r\n },\r\n {\r\n icon: ,\r\n title: \"Research / Advisory Firms\",\r\n info:\r\n \"Research firms use UDM to help automate research reports and provide data analytics and insights to their customers\",\r\n },\r\n {\r\n icon: ,\r\n title: \"Insurance Companies\",\r\n info:\r\n \"Insurance companies and agencies use UDM to help sales and manage risk around livestock insurance related offerings\",\r\n },\r\n {\r\n icon: ,\r\n title: \"Retail Chains / Grocers\",\r\n info:\r\n \"Retail chains and grocery chains use UDM to assist with planning and budgeting, allowing them to spend more time on core business activities\",\r\n },\r\n];\r\n","import * as React from \"react\";\r\nimport * as oidc from \"oidc-client\";\r\nimport { RouteComponentProps, withRouter } from \"react-router\";\r\nimport styled from \"styled-components\";\r\nimport color from \"./utils/color\";\r\nimport { authActions } from \"./ducks/authentication/actions\";\r\nimport { connect } from \"react-redux\";\r\nimport userManager from \"./ducks/authentication/userManager\";\r\nimport { setAccessToken } from \"./utils/api\";\r\n\r\ntype Props = RouteComponentProps<{ type: string }> & typeof mapDispatchToProps;\r\n\r\nconst Root = styled.div`\r\n background-color: ${color.BACKGROUND_SECONDARY};\r\n`;\r\n\r\nconst NavBar = styled.div`\r\n box-shadow: 0 3px 6px ${color.NEUTRAL};\r\n background-color: ${color.BACKGROUND};\r\n width: 100%;\r\n text-align: center;\r\n margin-bottom: 6px;\r\n height: 36px;\r\n`;\r\n\r\nconst Container = styled.div`\r\n width: 100%;\r\n margin: auto;\r\n max-width: 1400px;\r\n min-height: 100vh;\r\n background-color: ${color.BACKGROUND};\r\n`;\r\n\r\nconst callback: React.FC = ({\r\n match,\r\n history,\r\n getAuthState,\r\n setExpireAt,\r\n}) => {\r\n switch (match.params.type) {\r\n case \"login\":\r\n new oidc.UserManager({})\r\n .signinRedirectCallback()\r\n .then(() => {\r\n userManager\r\n .getUser()\r\n .then((user) => {\r\n if (user) {\r\n setAccessToken(user.token_type, user.access_token);\r\n getAuthState();\r\n setExpireAt(user.expires_at);\r\n }\r\n })\r\n .finally(() => {\r\n history.push(\"/\");\r\n });\r\n })\r\n .catch((e: any) => {\r\n console.error(e);\r\n });\r\n break;\r\n case \"refresh\":\r\n new oidc.UserManager({}).signinSilentCallback().catch((e: any) => {\r\n console.error(e);\r\n });\r\n break;\r\n case \"logout\":\r\n new oidc.UserManager({})\r\n .signoutRedirectCallback()\r\n .then(() => {\r\n history.push(\"/\");\r\n })\r\n .catch((e: any) => {\r\n console.error(e);\r\n });\r\n break;\r\n default:\r\n console.error(\"no callback case\");\r\n history.push(\"/\");\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n
loading...
\r\n
\r\n
\r\n );\r\n};\r\n\r\nconst mapDispatchToProps = {\r\n getAuthState: authActions.get.authState,\r\n setExpireAt: authActions.set.expiresAt,\r\n};\r\n\r\nexport default withRouter(connect(null, mapDispatchToProps)(callback));\r\n","import color from \"src/utils/color\";\r\nimport styled from \"styled-components\";\r\n\r\nexport const Root = styled.div`\r\n background-color: ${color.BACKGROUND_SECONDARY};\r\n`;\r\n\r\nexport const ContainerWrapper = styled.div`\r\n padding-left: 0;\r\n`;\r\n\r\nexport const Container = styled.div`\r\n width: 100%;\r\n margin: 0 auto 0 auto;\r\n max-width: 1400px;\r\n min-height: 100vh;\r\n background-color: ${color.BACKGROUND};\r\n`;\r\n\r\nexport const Content = styled.div`\r\n width: 100%;\r\n margin: 0 auto;\r\n padding-top: 90px;\r\n padding-bottom: 40px;\r\n max-width: 1100px;\r\n`;\r\n","import * as React from \"react\";\r\nimport { CustomRouteProps } from \"./router.types\";\r\nimport { Redirect, Route } from \"react-router-dom\";\r\nimport NavBarContainer from \"src/containers/NavBarContainer/NavBarContainer\";\r\nimport styled from \"styled-components\";\r\n\r\nexport default function PublicRoute({\r\n component: Component,\r\n isAuthenticated,\r\n ...rest\r\n}: CustomRouteProps) {\r\n return (\r\n \r\n isAuthenticated ? (\r\n \r\n ) : (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n />\r\n );\r\n}\r\n\r\nconst LandingPageScenesWrapper = styled.div`\r\n padding: 10rem 5rem 2.5rem;\r\n\r\n @media (max-width: 550px) {\r\n padding: 5rem 2.5rem 1.25rem;\r\n }\r\n`;\r\n","import * as React from \"react\";\r\nimport { CustomRouteProps } from \"./router.types\";\r\nimport { Redirect, Route } from \"react-router-dom\";\r\nimport NavBarContainer from \"src/containers/NavBarContainer/NavBarContainer\";\r\nimport { Container, ContainerWrapper, Content, Root } from \"./layout\";\r\n\r\nexport default function PrivateRoute({\r\n component: Component,\r\n isAuthenticated,\r\n ...rest\r\n}: CustomRouteProps) {\r\n return (\r\n \r\n isAuthenticated ? (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ) : (\r\n \r\n )\r\n }\r\n />\r\n );\r\n}\r\n","import * as React from \"react\";\r\nimport Button from \"src/components/shared/Button/Button\";\r\nimport styled from \"styled-components\";\r\nimport Logo from \"../media/svg/udm_logo.svg\";\r\nimport { Link, withRouter, RouteComponentProps } from \"react-router-dom\";\r\n\r\ntype Props = RouteComponentProps;\r\n\r\nfunction NotFound({ history: routerHistory }: Props) {\r\n function goBack() {\r\n routerHistory.goBack();\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n

404 - Page Not Found

\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n\r\nexport default withRouter(NotFound);\r\n\r\nconst Root = styled.div`\r\n height: 100vh;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n flex-direction: column;\r\n row-gap: 1rem;\r\n`;\r\n\r\nconst ButtonsWrapper = styled.div`\r\n display: flex;\r\n column-gap: 1rem;\r\n`;\r\n\r\nconst LogoImg = styled.img`\r\n height: 5rem;\r\n`;\r\n","import * as React from \"react\";\r\nimport { Spinner } from \"src/components/shared/Spinner/Spinner\";\r\nimport styled from \"styled-components\";\r\n\r\nconst Root = styled.div`\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n padding: 2.5rem 0;\r\n`;\r\n\r\nexport default function EduAndAnnSkeleton() {\r\n return (\r\n \r\n \r\n \r\n );\r\n}\r\n","import * as React from \"react\";\r\nimport ProductScene from \"./scenes/Product/ProductScene\";\r\nimport { BrowserRouter, Route, Switch } from \"react-router-dom\";\r\nimport LoginPageScene from \"./scenes/LoginPage/LoginPageScene\";\r\nimport NavBarContainer from \"./containers/NavBarContainer/NavBarContainer\";\r\nimport userManager from \"./ducks/authentication/userManager\";\r\nimport { setAccessToken } from \"./utils/api\";\r\nimport DashboardScene from \"./scenes/Dashboard/DashboardScene\";\r\nimport CatalogMenuScene from \"./scenes/Menu/CatalogMenuScene\";\r\nimport MenuScene from \"./scenes/Menu/MenuScene\";\r\nimport * as Loadable from \"react-loadable\";\r\nimport { authActions } from \"./ducks/authentication/actions\";\r\nimport { AuthState } from \"./ducks/authentication/reducers\";\r\nimport { connect } from \"react-redux\";\r\nimport LandingPageScene from \"./scenes/LandingPage/LandingPageScene\";\r\nimport { RootState } from \"./ducks/store\";\r\nimport { getAuthState } from \"./ducks/authentication/selectors\";\r\nimport AdminPanelSkeleton from \"./components/Skeletons/AdminPanelSkeleton\";\r\nimport CatalogScene from \"./scenes/Catalog/CatalogScene\";\r\nimport RevenuePredictionScene from \"./scenes/DairyRevenuePrediction/RevenuePredictionScene\";\r\nimport ViewMailNotificationsScene from \"./scenes/ViewMailNotifications/ViewMailNotificationsScene\";\r\nimport UdmApiSubscriptionScene from \"./scenes/LandingPage/UdmApiSubscriptionScene\";\r\nimport ContactUsScene from \"./scenes/LandingPage/ContactUsScene\";\r\nimport AboutUsScene from \"./scenes/LandingPage/AboutUsScene\";\r\nimport callback from \"./callback\";\r\nimport { Container, ContainerWrapper, Content, Root } from \"./router/layout\";\r\nimport PublicRoute from \"./router/PublicRoute\";\r\nimport PrivateRoute from \"./router/PrivateRoute\";\r\nimport NotFound from \"./router/NotFound\";\r\nimport EduAndAnnSkeleton from \"./scenes/EducationsAndAnnouncements/EduAndAnnSkeleton\";\r\n\r\nconst AdminPanel = Loadable({\r\n loader: () =>\r\n import(\"./scenes/ProfileAdministration/ProfileAdministrationScene\"),\r\n loading: AdminPanelSkeleton,\r\n delay: 200,\r\n timeout: 10000,\r\n});\r\n\r\nconst EduAndAnn = Loadable({\r\n loader: () =>\r\n import(\"./scenes/EducationsAndAnnouncements/EduAndAnnSceneContainer\"),\r\n loading: EduAndAnnSkeleton,\r\n delay: 200,\r\n timeout: 10000,\r\n});\r\n\r\ntype Props = typeof mapDispatchToProps & ReturnType;\r\n\r\nclass App extends React.Component {\r\n public componentDidMount() {\r\n userManager.getUser().then((user) => {\r\n if (user) {\r\n setAccessToken(user.token_type, user.access_token);\r\n this.props.getAuthState();\r\n this.props.setExpireAt(user.expires_at);\r\n }\r\n });\r\n }\r\n\r\n public render() {\r\n const isAuthenticated = !(\r\n this.props.auth === AuthState.initialization ||\r\n this.props.auth === AuthState.guest\r\n );\r\n\r\n return (\r\n \r\n \r\n \r\n isAuthenticated ? (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ) : (\r\n <>\r\n \r\n \r\n \r\n )\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nconst mapDispatchToProps = {\r\n getAuthState: authActions.get.authState,\r\n setExpireAt: authActions.set.expiresAt,\r\n};\r\n\r\nconst mapStateToProps = (state: RootState) => ({ auth: getAuthState(state) });\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(App);\r\n","// tslint:disable:no-console\r\n// In production, we register a service worker to serve assets from local cache.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on the 'N+1' visit to a page, since previously\r\n// cached resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\r\n// This link also includes instructions on opting out of this behavior.\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.1/8 is considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/,\r\n ),\r\n);\r\n\r\nexport default function register() {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(\r\n process.env.PUBLIC_URL!,\r\n window.location.toString(),\r\n );\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Lets check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit https://goo.gl/SC7cgQ',\r\n );\r\n });\r\n } else {\r\n // Is not local host. Just register service worker\r\n registerValidSW(swUrl);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl: string) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker) {\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the old content will have been purged and\r\n // the fresh content will have been added to the cache.\r\n // It's the perfect time to display a 'New content is\r\n // available; please refresh.' message in your web app.\r\n window.location.reload();\r\n console.log('New content is available; please refresh.');\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // 'Content is cached for offline use.' message.\r\n console.log('Content is cached for offline use.');\r\n }\r\n }\r\n };\r\n }\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl: string) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl)\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n if (\r\n response.status === 404 ||\r\n response.headers.get('content-type')!.indexOf('javascript') === -1\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.',\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister();\r\n });\r\n }\r\n}\r\n","import * as React from \"react\";\r\nimport * as ReactDOM from \"react-dom\";\r\nimport App from \"./App\";\r\nimport \"./index.css\";\r\nimport registerServiceWorker from \"./registerServiceWorker\";\r\nimport { Provider } from \"react-redux\";\r\nimport store from \"./ducks/store\";\r\nimport { ToastContainer } from \"react-toastify\";\r\nimport \"react-toastify/dist/ReactToastify.css\";\r\n\r\nReactDOM.render(\r\n \r\n \r\n \r\n ,\r\n document.getElementById(\"root\") as HTMLElement\r\n);\r\n\r\nregisterServiceWorker();\r\n","import { RootState } from \"../store\";\r\nimport { PeriodFrequency } from \"../../types/PeriodFrequency\";\r\nimport { ExploreData } from \"../../utils/enums\";\r\nimport { DisplayDateRange, pageState } from \"./reducers\";\r\nimport { ChartConfigIDs } from \"../charts/utils/charts.config\";\r\nimport { createSelector } from \"reselect\";\r\nimport { getSelectedUnit } from \"../units/selectors\";\r\nimport { getUnitFromProduct } from \"../products/selectors\";\r\n\r\nexport const getProductPageProductID = (state: RootState): number | null =>\r\n state.productPage.productID;\r\nexport const getProductPageAreaID = (state: RootState): number | null =>\r\n state.productPage.areaID;\r\nexport const getExploreDataView = (state: RootState): ExploreData =>\r\n state.productPage.exploreDataView;\r\nexport const getUnitID = (state: RootState): number | null =>\r\n state.productPage.unitID;\r\nexport const getChartID = (state: RootState): ChartConfigIDs | null =>\r\n state.productPage.chartID as any;\r\nexport const getDisplayDateRange = (state: RootState): DisplayDateRange =>\r\n state.productPage.displayDateRange;\r\nexport const getPageState = (state: RootState): pageState =>\r\n state.productPage.pageState;\r\nexport const getComparisonPeriod = (state: RootState) =>\r\n state.productPage.comparisonPeriod;\r\nexport const getContractMonthRange = (state: RootState) =>\r\n state.productPage.contractMonthRange;\r\nexport const getScale = (state: RootState) => state.productPage.scale;\r\nexport const getSelectedContextTable = (state: RootState) =>\r\n state.productPage.contextTable;\r\nexport const getContextSorting = (state: RootState) =>\r\n state.productPage.contextSorting;\r\nexport const getFuturesTradingDate = (state: RootState) =>\r\n state.productPage.futuresTradingDate;\r\nexport const getFuturesDisplayType = (state: RootState) =>\r\n state.productPage.futuresDisplayType;\r\nexport const getFuturesContractMonth = (state: RootState) =>\r\n state.productPage.futuresContractMonth;\r\nexport const getFuturesNearbyIndex = (state: RootState) =>\r\n state.productPage.futuresNearbyIndex;\r\n\r\nexport const getProductPageFrequency = (\r\n state: RootState\r\n): PeriodFrequency | null =>\r\n state.productPage.frequency !== undefined\r\n ? state.productPage.frequency\r\n : null;\r\n\r\nexport const getChartUnitName = createSelector(\r\n getUnitFromProduct,\r\n getSelectedUnit,\r\n (defaultUnit, selectedUnit) => {\r\n if (!defaultUnit) {\r\n return \"\";\r\n }\r\n if (!selectedUnit) {\r\n return defaultUnit.name;\r\n }\r\n return selectedUnit.name;\r\n }\r\n);\r\n","import { ActionType, createStandardAction } from 'typesafe-actions';\r\nimport { NavMenuDto } from '../../types/dto/NavMenuDto';\r\nimport { Menu } from '../../types/Menu';\r\n\r\nexport const menuActions = {\r\n navMenu: {\r\n initialize: createStandardAction('@navMenu/INITIALIZE_NAV_MENU_ITEMS')(),\r\n add: createStandardAction('@navMenu/ADD_NAV_MENU_ITEMS')(),\r\n setSelectedMenu: createStandardAction('@navMenu/SET_SELECTED_MENU')(),\r\n },\r\n menu: {\r\n get: createStandardAction('@menu/GET')(),\r\n add: createStandardAction('@menu/ADD')(),\r\n },\r\n};\r\n\r\nexport type MenuActions = ActionType;\r\n","enum color {\r\n PRIMARY = \"#6EB23F\",\r\n SECONDARY = \"#F8B335\",\r\n NEGATIVE = \"#F03\",\r\n POSITIVE = \"#29a45c\",\r\n\r\n DRP_INPUT = \"#749CFD\",\r\n\r\n CHART_RED = \"#ff335c\",\r\n NEUTRAL_DARKEST = \"#333\",\r\n NEUTRAL_DARK = \"#909090\",\r\n NEUTRAL = \"#CCC\",\r\n NEUTRAL_LIGHT = \"#DDD\",\r\n BACKGROUND = \"#FFF\",\r\n BACKGROUND_SECONDARY = \"#F3F4F8\",\r\n TEXT_PRIMARY = \"#333\",\r\n ICONS_PRIMARY = \"#DADCE7\",\r\n LANDING_PAGE_SECONDARY = \"#777777\",\r\n ICONS_SECONDARY = \"#D4E5F6\",\r\n ICONS_HEADER = \"#707070\",\r\n TABLE_POSITIVE = \"#00ac4e\",\r\n}\r\n\r\nexport const treeMapColors = {\r\n 0: \"#df0d3f\",\r\n 1: \"#ea5f80\",\r\n 2: \"#f4afbf\",\r\n 3: \"#a7a7a7\",\r\n 4: \"#9ae5b9\",\r\n 5: \"#34cc73\",\r\n 6: \"#29a45c\",\r\n};\r\n\r\nexport default color;\r\n","const sortObjectStringsByKey = (key: string) => (dataA: T, dataB: T) => {\r\n const a = typeof dataA[key] === 'string' ? dataA[key].toLowerCase() : dataA[key];\r\n const b = typeof dataB[key] === 'string' ? dataB[key].toLowerCase() : dataB[key];\r\n\r\n if (a === '' || a === null) { return 1; }\r\n if (b === '' || b === null) { return -1; }\r\n if (a === b) { return 0; }\r\n return a < b ? -1 : 1;\r\n};\r\n\r\nexport default sortObjectStringsByKey;\r\n","import { PeriodFrequency } from '../../../../types/PeriodFrequency';\r\nimport { format } from 'date-fns';\r\n\r\nexport const getTimeIndexFromTimestamp = (timestamp: number): number =>\r\n Number(String(timestamp).slice(4));\r\n\r\nexport const getYearFromTimestamp = (timestamp: number): number =>\r\n Number(String(timestamp).slice(0, 4));\r\n\r\nexport const getFrequencyTimestamp = (date: Date, frequency: PeriodFrequency): number => {\r\n switch (frequency) {\r\n case 'Daily':\r\n // TODO change daily timestamp to start from 0\r\n return Number(format(date, 'YYYYDDDD'));\r\n case 'Weekly': {\r\n // TODO change weekly timestamp to start from 00\r\n const dayNumber = Number(format(date, 'DDD'));\r\n let week = 0;\r\n if (dayNumber === 366) {\r\n week = Math.floor(1 / 7 + 1);\r\n } else {\r\n week = Math.floor(dayNumber / 7 + 1);\r\n }\r\n return Number(format(date, 'YYYY') + String(week).padStart(2, '0'));\r\n }\r\n case 'Monthly':\r\n return Number(format(date, `YYYYMM`)) - 1;\r\n case 'Quarterly':\r\n return Number(format(date, 'YYYYQ')) - 1;\r\n case 'Annual':\r\n return Number(format(date, 'YYYY'));\r\n default: return 0;\r\n }\r\n};\r\n","import { RootState } from \"../store\";\r\n\r\nexport const getAdminPageSearch = (state: RootState) => state.adminPage.search;\r\n\r\nexport const getAdminPageOrganization = (state: RootState) =>\r\n state.adminPage.organization;\r\n","import { RootState } from '../store';\r\n\r\nexport const getAuthState = (state: RootState) => state.authentication.authState;\r\n\r\nexport const getExpiresAt = (state: RootState) => state.authentication.expiresAt;\r\n","import styled from \"styled-components\";\r\nimport palette from \"../../../utils/color\";\r\n\r\ntype Props = {\r\n width?: number;\r\n height?: number;\r\n color?: string;\r\n backgroundColor?: string;\r\n fontSize?: number;\r\n filled?: boolean;\r\n};\r\n\r\nconst Button = styled.button`\r\n width: ${({ width = 120 }) => `${width}px`};\r\n height: ${({ height = 30 }) => `${height}px`};\r\n color: ${({\r\n color = palette.PRIMARY,\r\n filled = false,\r\n backgroundColor = palette.BACKGROUND,\r\n }) => (filled ? backgroundColor : color)};\r\n background-color: ${({\r\n backgroundColor = palette.BACKGROUND,\r\n filled = false,\r\n color = palette.PRIMARY,\r\n }) => (filled ? color : backgroundColor)};\r\n border-radius: 28px;\r\n font-size: ${({ height = 30, fontSize }) =>\r\n fontSize ? fontSize : height / 2}px;\r\n cursor: pointer;\r\n font-weight: 500;\r\n border: 1px solid ${({ color = palette.PRIMARY }) => color}};\r\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);\r\n\r\n &:hover {\r\n box-shadow: 2px 2px 2px rgba(128, 128, 128, 0.5);\r\n transform: perspective(1px) translateZ(0);\r\n transition-duration: 0.3s;\r\n transition-property: box-shadow;\r\n }\r\n\r\n &:focus {\r\n outline: none;\r\n }\r\n\r\n &:disabled {\r\n cursor: not-allowed;\r\n border: 1px solid ${palette.NEUTRAL};\r\n color: ${palette.NEUTRAL};\r\n }\r\n`;\r\n\r\nexport default Button;\r\n","function numberRange(start: number = 0, end: number = 0) {\r\n const positiveStart = start * -1;\r\n const positiveEnd = end * -1;\r\n if (start < 0 && end >= 0) {\r\n return new Array(end + positiveStart).fill(null).map((d, i) => i + start);\r\n }\r\n if (start >= 0 && end < 0) {\r\n return new Array(start + positiveEnd)\r\n .fill(null)\r\n .map((d, i) => i + end + 1)\r\n .reverse();\r\n }\r\n if (start < 0 && end < 0 && start <= end) {\r\n return new Array(positiveStart - positiveEnd)\r\n .fill(null)\r\n .map((d, i) => i + start);\r\n }\r\n if (start < 0 && end < 0 && !(start <= end)) {\r\n return new Array(positiveEnd - positiveStart)\r\n .fill(null)\r\n .map((d, i) => i + end + 1)\r\n .reverse();\r\n }\r\n if (start <= end) {\r\n return new Array(end - start).fill(null).map((d, i) => i + start);\r\n }\r\n return new Array(start - end)\r\n .fill(null)\r\n .map((d, i) => i + end + 1)\r\n .reverse();\r\n}\r\n\r\nexport default numberRange;\r\n","import * as React from \"react\";\r\nimport styled from \"styled-components\";\r\nimport color from \"../../../utils/color\";\r\nimport dropDownIcon from \"../../../media/svg/arrowDropDown.svg\";\r\nimport { ChangeEvent } from \"react\";\r\n\r\nconst Root = styled.div`\r\n display: flex;\r\n align-items: center;\r\n column-gap: 0.5rem;\r\n`;\r\n\r\nconst Select = styled.select`\r\n border: 1px solid ${color.PRIMARY};\r\n border-radius: 1rem;\r\n display: inline-block;\r\n width: 55px;\r\n line-height: 1.75rem;\r\n appearance: none;\r\n background-color: ${color.BACKGROUND_SECONDARY};\r\n background: transparent url(\"${dropDownIcon}\") no-repeat right;\r\n font-weight: lighter;\r\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);\r\n font-size: 0.75rem;\r\n padding-left: 0.85rem;\r\n cursor: pointer;\r\n`;\r\n\r\ntype Props = {\r\n dataLength: number;\r\n perPage: number;\r\n perPageClickHandler(event: ChangeEvent): void;\r\n};\r\n\r\nconst PerPage: React.FC = ({\r\n dataLength,\r\n perPage,\r\n perPageClickHandler,\r\n}) =>\r\n dataLength > 10 ? (\r\n \r\n Show\r\n \r\n per page\r\n \r\n ) : null;\r\n\r\nexport default PerPage;\r\n","import styled from \"styled-components\";\r\n\r\nconst PaginationWrapper = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n margin-top: 30px;\r\n`;\r\n\r\nexport default PaginationWrapper;\r\n","import { ActionType, createStandardAction } from 'typesafe-actions';\r\nimport { Units } from '../../types/Units';\r\n\r\nexport const unitsActions = {\r\n initialize: createStandardAction('@unit/INITIALIZE_UNITS')(),\r\n add: createStandardAction('@unit/ADD')(),\r\n update: createStandardAction('@unit/UPDATE')(),\r\n};\r\n\r\nexport type UnitsActions = ActionType;\r\n","import * as React from \"react\";\r\nimport SwitchButton from \"../SwitchButton/SwitchButton\";\r\nimport styled from \"styled-components\";\r\nimport color from \"../../../utils/color\";\r\n\r\ntype Props = {\r\n onClick: (event?: React.MouseEvent) => void;\r\n active: boolean;\r\n};\r\n\r\nconst LangPicker: React.FC = ({ onClick, active }) => (\r\n \r\n Original\r\n \r\n English\r\n \r\n);\r\n\r\nexport default LangPicker;\r\n\r\nconst Root = styled.div<{ active: boolean }>`\r\n display: flex;\r\n margin-left: 50px;\r\n font-size: 14px;\r\n padding-bottom: 10px;\r\n\r\n span:first-child {\r\n color: ${({ active }) => (active ? color.TEXT_PRIMARY : color.PRIMARY)};\r\n margin-right: 10px;\r\n }\r\n\r\n span:last-child {\r\n color: ${({ active }) => (!active ? color.TEXT_PRIMARY : color.PRIMARY)};\r\n margin-left: 10px;\r\n }\r\n`;\r\n","import { ActionType, createStandardAction } from \"typesafe-actions\";\r\nimport { Organization } from \"../../types/Organization\";\r\nimport { OrganizationUser, User } from \"../../types/User\";\r\nimport { OrganizationReport } from \"../../types/OrganizationReport\";\r\nimport { Report } from \"../../types/Report\";\r\nimport { RequestView, View } from \"../../types/View\";\r\nimport { OrganizationView } from \"../../types/OrganizationView\";\r\nimport { Calendar } from \"../../types/Calendar\";\r\nimport { CalendarReport } from \"../../types/CalendarReport\";\r\nimport { OrganizationUserDto } from \"../../types/dto/OrganizationUserDto\";\r\nimport { Subscription } from \"src/types/Subscription\";\r\n\r\ntype UserPayload = {\r\n firstName: string;\r\n lastName: string;\r\n email: string;\r\n};\r\n\r\ntype CalendarReportsPayload = {\r\n organization: string;\r\n calendarName: string;\r\n};\r\n\r\nexport type UserErrors = {\r\n Email?: string[];\r\n FirstName?: string[];\r\n LastName?: string[];\r\n Password?: string[];\r\n};\r\n\r\nexport type CreateUserErrors = {\r\n errors?: {\r\n Email?: Array;\r\n FirstName?: Array;\r\n LastName?: Array;\r\n };\r\n status?: number;\r\n title?: string;\r\n traceId?: string;\r\n type?: string;\r\n User?: Array;\r\n};\r\n\r\nexport const adminActions = {\r\n organization: {\r\n get: createStandardAction(\"@admin_organization/GET\")(),\r\n add: createStandardAction(\"@admin_organization/ADD\")(),\r\n addAll: createStandardAction(\"@admin_organization/ADD_ALL\")<\r\n Organization[]\r\n >(),\r\n delete: createStandardAction(\"@admin_organization/DELETE\")(),\r\n remove: createStandardAction(\"@admin_organization/REMOVE\")(),\r\n new: createStandardAction(\"@admin_organization/NEW\")<\r\n Organization,\r\n (error?: string) => void\r\n >(),\r\n edit: createStandardAction(\"@admin_organization/EDIT\")<\r\n Organization,\r\n { name: string; cb: (error?: string) => void }\r\n >(),\r\n update: createStandardAction(\"@admin_organization/UPDATE\")<\r\n Organization,\r\n string\r\n >(),\r\n },\r\n organizationUsers: {\r\n getUsers: createStandardAction(\"@admin_organization_users/GET\")(),\r\n saveUsers: createStandardAction(\"@admin_organization_users/SAVE\")<{\r\n organizationName: string;\r\n users: OrganizationUserDto[];\r\n }>(),\r\n addUser: createStandardAction(\"@admin_organization_users/ADD\")<{\r\n organizationName: string;\r\n user: OrganizationUser;\r\n }>(),\r\n saveUser: createStandardAction(\"@admin_organization_users/SAVE_USER\")<{\r\n organizationName: string;\r\n user: OrganizationUser;\r\n }>(),\r\n getUser: createStandardAction(`@admin_organization_users/GET`)<{\r\n organizationName: string;\r\n userName: string;\r\n }>(),\r\n removeUser: createStandardAction(\"@admin_organization_users/REMOVE\")<{\r\n organizationName: string;\r\n userName: string;\r\n }>(),\r\n deleteUser: createStandardAction(\"@admin_organization_users/DELETE\")<{\r\n organizationName: string;\r\n userName: string;\r\n }>(),\r\n removeOrganization: createStandardAction(\r\n \"@admin_organization_users/REMOVE_ORGANIZATION\"\r\n )(),\r\n addAdminUser: createStandardAction(\r\n \"@admin_organization_users/ADD_ADMIN_USER\"\r\n )<{ organizationName: string; user: OrganizationUser }>(),\r\n addUserRole: createStandardAction(\r\n \"@admin_organization_users/ADD_USER_ROLE\"\r\n )<{ organizationName: string; userName: string; role: string }>(),\r\n addAdminUserRole: createStandardAction(\r\n \"@admin_organization_users/EDIT_USER_ROLE\"\r\n )<{ organizationName: string; userName: string; role: string }>(),\r\n removeUserRole: createStandardAction(\r\n \"@admin_organization_users/REMOVE_USER_ROLE\"\r\n )<{ organizationName: string; userName: string; role: string }>(),\r\n removeAdminUserRole: createStandardAction(\r\n \"@admin_organization_users/REMOVE_ADMIN_USER_ROLE\"\r\n )<{ organizationName: string; userName: string }>(),\r\n },\r\n users: {\r\n get: createStandardAction(\"@admin_users/GET\")(),\r\n add: createStandardAction(\"@admin_users/ADD\")(),\r\n addOne: createStandardAction(\"@admin_users/ADD_ONE\")(),\r\n delete: createStandardAction(\"@admin_users/DELETE\")(),\r\n remove: createStandardAction(\"@admin_users/REMOVE\")(),\r\n new: createStandardAction(\"@admin_users/NEW\")<\r\n UserPayload & { organizationName: string },\r\n (error?: CreateUserErrors) => void\r\n >(),\r\n edit: createStandardAction(\"@admin_users/EDIT\")(),\r\n update: createStandardAction(\"@admin_users/UPDATE\")<\r\n UserPayload,\r\n { userId: string; cb: (error?: UserErrors) => void }\r\n >(),\r\n },\r\n organizationReports: {\r\n get: createStandardAction(\"@admin_organizationReports/GET\")(),\r\n add: createStandardAction(\"@admin_organizationReports/ADD\")<\r\n OrganizationReport[],\r\n string\r\n >(),\r\n update: createStandardAction(\"@admin_organizationReports/UPDATE\")<\r\n OrganizationReport,\r\n string\r\n >(),\r\n delete: createStandardAction(\"@admin_organizationReports/DELETE\")<\r\n { organizationName: string; reportName: string },\r\n () => void\r\n >(),\r\n remove: createStandardAction(\"@admin_organizationReports/REMOVE\")<\r\n string,\r\n string\r\n >(),\r\n new: createStandardAction(\"@admin_organizationReports/NEW\")<\r\n OrganizationReport,\r\n { e: (error?: string) => void; cb: () => void }\r\n >(),\r\n removeOrganization: createStandardAction(\r\n \"admin_organizationReports/REMOVE_ORGANIZATION\"\r\n )(),\r\n requestReportAccess: createStandardAction(\r\n `@admin_organizationReports/REQUEST_ACCESS`\r\n )<{ organizationName: string; reportName: string }>(),\r\n },\r\n report: {\r\n get: createStandardAction(\"@admin_report/GET\")(),\r\n add: createStandardAction(\"@admin_report/ADD\")(),\r\n },\r\n view: {\r\n get: createStandardAction(\"@admin_view/GET\")(),\r\n add: createStandardAction(\"@admin_view/ADD\")(),\r\n },\r\n organizationView: {\r\n get: createStandardAction(\"@admin_organization_view/GET\")(),\r\n addAll: createStandardAction(\"@admin_organization_view/ADD_ALL\")<{\r\n organizationName: string;\r\n view: OrganizationView[];\r\n }>(),\r\n new: createStandardAction(\"@admin_organization_view/NEW\")<{\r\n organizationName: string;\r\n view: RequestView;\r\n }>(),\r\n add: createStandardAction(\"@admin_organization_view/ADD\")<{\r\n organizationName: string;\r\n view: RequestView;\r\n }>(),\r\n remove: createStandardAction(\"@admin_organization_view/REMOVE\")<{\r\n organizationName: string;\r\n view: RequestView;\r\n }>(),\r\n delete: createStandardAction(\"@admin_organization_view/DELETE\")<{\r\n organizationName: string;\r\n view: RequestView;\r\n }>(),\r\n removeOrganization: createStandardAction(\r\n \"admin_organization_view/REMOVE_ORGANIZATION\"\r\n )(),\r\n addAllViews: createStandardAction(\"@admin_Organization_view/ADD_ALL_VIEWS\")<\r\n string\r\n >(),\r\n saveAllViews: createStandardAction(\r\n \"@admin_Organization_view/SAVE_ALL_VIEWS\"\r\n )(),\r\n requestViewAccess: createStandardAction(\r\n `@admin_organization_view/REQUEST_ACCESS`\r\n )<{ organizationName: string; view: RequestView }>(),\r\n },\r\n calendars: {\r\n get: createStandardAction(\"@admin_calendars/GET\")(),\r\n addAll: createStandardAction(\"@admin_calendars/ADD_ALL\")<\r\n string,\r\n Calendar[]\r\n >(),\r\n add: createStandardAction(\"@admin_calendars/ADD\")(),\r\n delete: createStandardAction(\"@admin_calendars/DELETE\")(),\r\n remove: createStandardAction(\"@admin_calendars/REMOVE\")(),\r\n new: createStandardAction(\"@admin_calendars/NEW\")<\r\n Calendar,\r\n (error?: string) => void\r\n >(),\r\n edit: createStandardAction(\"@admin_calendars/EDIT\")<\r\n Calendar,\r\n { name: string; cb: (error?: string) => void }\r\n >(),\r\n update: createStandardAction(\"@admin_calendars/UPDATE\")(),\r\n removeOrganization: createStandardAction(\r\n \"admin_calendars/REMOVE_ORGANIZATION\"\r\n )(),\r\n },\r\n calendarReports: {\r\n get: createStandardAction(\"@admin_calendarReports/GET\")<\r\n CalendarReportsPayload\r\n >(),\r\n addAll: createStandardAction(\"@admin_calendarReports/ADD_ALL\")<\r\n CalendarReportsPayload,\r\n CalendarReport[]\r\n >(),\r\n add: createStandardAction(\"@admin_calendarReports/ADD\")<\r\n CalendarReportsPayload,\r\n string\r\n >(),\r\n new: createStandardAction(\"@admin_calendarReports/NEW\")<\r\n CalendarReportsPayload,\r\n string\r\n >(),\r\n delete: createStandardAction(\"@admin_calendarReports/DELETE\")<\r\n CalendarReportsPayload,\r\n string\r\n >(),\r\n remove: createStandardAction(\"@admin_calendarReports/REMOVE\")<\r\n CalendarReportsPayload,\r\n string\r\n >(),\r\n removeCalendar: createStandardAction(\r\n \"@admin_calendarReports/DELETE_CALENDAR\"\r\n )(),\r\n removeOrganization: createStandardAction(\r\n \"@admin_calendarReports/DELETE_ORGANIZATION\"\r\n )(),\r\n },\r\n subscriptionsAndViews: {\r\n getSubs: createStandardAction(\"@admin_subscriptions/GET\")(),\r\n populateSubs: createStandardAction(\"@admin_subscriptions/POPULATE\")<\r\n Array\r\n >(),\r\n getViews: createStandardAction(\"@admin_views/GET\")(),\r\n populateViews: createStandardAction(\"@admin_views/POPULATE\")<\r\n Array\r\n >(),\r\n addSub: createStandardAction(\"@admin_subscriptions/ADD_SUB\")<\r\n Subscription\r\n >(),\r\n subscribe: createStandardAction(\"@admin_subscriptions/SUBSCRIBE\")<{\r\n viewName: string;\r\n }>(),\r\n removeSub: createStandardAction(\"@admin_subscriptions/REMOVE_SUB\")<\r\n string\r\n >(),\r\n unsubscribe: createStandardAction(\"@admin_subscriptions/UNSUBSCRIBE\")<\r\n Subscription\r\n >(),\r\n },\r\n};\r\n\r\nexport type AdminActions = ActionType;\r\n","import { ActionType, createStandardAction } from 'typesafe-actions';\r\nimport { ProductWithAttributes } from '../../types/Product';\r\nimport { PeriodFrequency } from '../../types/PeriodFrequency';\r\n\r\ninterface Meta {\r\n frequency?: PeriodFrequency,\r\n area?: number\r\n}\r\n\r\nexport const productActions = {\r\n initialize: createStandardAction('@product/INITIALIZE_PRODUCT_SCENE')(),\r\n changeProductFrequency: createStandardAction('@product/CHANGE_PRODUCT_FREQUENCY')(),\r\n changeProductArea: createStandardAction('@product/CHANGE_PRODUCT_AREA')(),\r\n addProduct: createStandardAction('@product/ADD_PRODUCT')(),\r\n};\r\n\r\nexport type ProductActions = ActionType;\r\n","import { FaCheckSquare as CheckIcon } from 'react-icons/fa';\r\n\r\nexport default CheckIcon;\r\n","import { FaRegSquare as BoxIcon } from 'react-icons/fa';\r\n\r\nexport default BoxIcon;\r\n","import * as React from 'react';\r\nimport CheckIcon from './CheckIcon';\r\nimport BoxIcon from './BoxIcon';\r\n\r\ninterface Props extends React.SVGAttributes {\r\n selected?: boolean;\r\n size?: string | number;\r\n color?: string;\r\n}\r\n\r\nconst CheckboxIcon: React.FC = ({ selected = false, children, ...props}) =>\r\n selected ? : ;\r\n\r\nexport default CheckboxIcon;\r\n","import styled from \"styled-components\";\r\nimport CheckboxIcon from \"../../../icons/CheckboxIcon\";\r\nimport color from \"../../../utils/color\";\r\n\r\ntype Props = {\r\n selected?: boolean;\r\n skipmarginright?: \"true\" | \"false\";\r\n disabled?: boolean;\r\n};\r\n\r\nconst Checkbox = styled(CheckboxIcon)`\r\n &&& {\r\n color: ${({ selected = false }) =>\r\n selected ? color.PRIMARY : color.NEUTRAL_DARK};\r\n font-size: 20px;\r\n transform: translateY(4px);\r\n margin-right: ${({ skipmarginright = \"false\" }) =>\r\n skipmarginright === \"true\" ? \"0\" : \"15px\"};\r\n cursor: ${(props) => (props.disabled ? \"not-allowed\" : \"pointer\")};\r\n opacity: ${(props) => (props.disabled ? \"0.5\" : \"1\")};\r\n }\r\n`;\r\n\r\nexport default Checkbox;\r\n","import { ActionType, createStandardAction } from \"typesafe-actions\";\r\n\r\nexport const adminPageActions = {\r\n setSearch: createStandardAction(\"@adminPage/SET_SEARCH\")(),\r\n setOrganization: createStandardAction(\"@adminPage/SET_ORGANIZATION\")<\r\n string\r\n >(),\r\n};\r\n\r\nexport type AdminPageActions = ActionType;\r\n","import { useState } from \"react\";\r\n\r\n/**\r\n * Custom hook for controlling overlays.\r\n * Can be used for pop-ups, dialogs, modals, etc...\r\n * @param initialState overlay initial state (open/closed)\r\n * @returns Overlay controls\r\n */\r\nexport const useOverlay = (initialState = false) => {\r\n const [isOpen, setIsOpen] = useState(initialState);\r\n\r\n const handleOpen = () => setIsOpen(true);\r\n const handleClose = () => setIsOpen(false);\r\n\r\n return { isOpen, handleOpen, handleClose };\r\n};\r\n\r\nexport type UseOverlay = ReturnType;\r\n","import { useState } from \"react\";\r\n\r\n/**\r\n * Custom hook for handling async UI.\r\n * e.g. Displaying spinner (loader) while async request is executing.\r\n * @param initialState spinner initial state\r\n * @returns Spinner controls\r\n */\r\nexport const useSpinner = (initialState = false) => {\r\n const [isSpinning, setIsSpinning] = useState(initialState);\r\n\r\n const startSpin = () => setIsSpinning(true);\r\n const endSpin = () => setIsSpinning(false);\r\n\r\n return { isSpinning, startSpin, endSpin };\r\n};\r\n\r\nexport type UseSpinner = ReturnType;\r\n","export { useOverlay } from \"./useOverlay\";\r\nexport { useSpinner } from \"./useSpinner\";\r\n","import { RootState } from \"../store\";\r\nimport { Organization } from \"../../types/Organization\";\r\nimport { User } from \"../../types/User\";\r\nimport { createSelector } from \"reselect\";\r\nimport {\r\n getActivePageFromProps,\r\n getSelectedCalendarFromProps,\r\n getPerPageFromProps,\r\n getSearchFromProps,\r\n getOrganizationNameFromProps,\r\n getSortFromProps,\r\n getDirectionFromProps,\r\n getShowTranslatedNameFromProps,\r\n} from \"../fromPropsSelector\";\r\nimport containsString from \"../../utils/containsString\";\r\nimport {\r\n getAdminPageOrganization,\r\n getAdminPageSearch,\r\n} from \"../adminPage/selectors\";\r\nimport sortObjectStringsByKey from \"../../utils/sortObjectStringsByKey\";\r\nimport { getAuthState } from \"../authentication/selectors\";\r\nimport { AuthState } from \"../authentication/reducers\";\r\n\r\nexport const getOrganizations = (state: RootState): Organization[] =>\r\n state.admin.organization;\r\n\r\nexport const getUsers = (state: RootState): User[] => state.admin.user;\r\n\r\nexport const getOrganizationReports = (state: RootState) =>\r\n state.admin.organizationReports;\r\n\r\nexport const getReports = (state: RootState) => state.admin.report;\r\n\r\nexport const getAllCalendars = (state: RootState) => state.admin.calendars;\r\n\r\nexport const getAllCalendarReport = (state: RootState) =>\r\n state.admin.calendarReports;\r\n\r\nexport const getAllOrganizationsUsers = (state: RootState) =>\r\n state.admin.organizationUsers;\r\n\r\nexport const getSubsAndViews = (state: RootState) => state.admin.subscriptions;\r\n\r\nexport const getActiveSubscriptions = createSelector(\r\n getSubsAndViews,\r\n (subsAndViews) => {\r\n const activeSubsSet = new Set();\r\n subsAndViews.subscriptions.forEach(({ viewName }) => {\r\n activeSubsSet.add(viewName);\r\n });\r\n return [...activeSubsSet];\r\n }\r\n);\r\n\r\nexport const getViewsForDisplay = createSelector(\r\n getSubsAndViews,\r\n getActivePageFromProps,\r\n getPerPageFromProps,\r\n getAdminPageSearch,\r\n getSortFromProps,\r\n (subsAndViews, activePage, perPage, search, sortBy) => {\r\n const filteredViews = subsAndViews.views.filter((v) =>\r\n containsString(v, search)\r\n );\r\n const sortedViews = filteredViews.sort(\r\n sortBy === \"A - Z\"\r\n ? (a, b) => a.localeCompare(b)\r\n : (a, b) => b.localeCompare(a)\r\n );\r\n return sortedViews.slice((activePage - 1) * perPage, perPage * activePage);\r\n }\r\n);\r\n\r\nexport const getSelectedOrganizationCalendars = createSelector(\r\n getAllCalendars,\r\n getAdminPageOrganization,\r\n (allCalendars, selectedOrganization) =>\r\n allCalendars[selectedOrganization] || []\r\n);\r\n\r\nexport const getOrganizationCalendars = createSelector(\r\n getSelectedOrganizationCalendars,\r\n getActivePageFromProps,\r\n getPerPageFromProps,\r\n getAdminPageSearch,\r\n (calendars, paginationActivePage, paginationPerPage, search) => {\r\n const filteredCalendars = calendars.filter((calendar) =>\r\n containsString(calendar.name, search)\r\n );\r\n return filteredCalendars.slice(\r\n (paginationActivePage - 1) * paginationPerPage,\r\n paginationPerPage * paginationActivePage\r\n );\r\n }\r\n);\r\n\r\nexport const getAllViews = (state: RootState) => state.admin.view.allViews;\r\n\r\nexport const getAllOrganizationViews = (state: RootState) =>\r\n state.admin.view.organizationViews;\r\n\r\nexport const getOrganizationViews = createSelector(\r\n getAllOrganizationViews,\r\n getAdminPageOrganization,\r\n (organizationViews, organizationName) =>\r\n organizationViews[organizationName]\r\n ? organizationViews[organizationName]\r\n : []\r\n);\r\n\r\nexport const getFilteredRecords = createSelector(\r\n getReports,\r\n getSearchFromProps,\r\n (reports, search) =>\r\n reports.filter(({ name }) => containsString(name, search))\r\n);\r\n\r\nexport const getCalendarReports = createSelector(\r\n getAllCalendarReport,\r\n getFilteredRecords,\r\n getSelectedCalendarFromProps,\r\n getAdminPageOrganization,\r\n getActivePageFromProps,\r\n getPerPageFromProps,\r\n (\r\n allCalendarReports,\r\n reports,\r\n calendarName,\r\n organization,\r\n paginationActivePage,\r\n paginationPerPage\r\n ) => {\r\n if (\r\n !calendarName ||\r\n !organization ||\r\n !allCalendarReports[organization] ||\r\n !allCalendarReports[organization][calendarName]\r\n ) {\r\n return [];\r\n }\r\n const calendarReports = allCalendarReports[organization][calendarName];\r\n\r\n return reports\r\n .slice(\r\n (paginationActivePage - 1) * paginationPerPage,\r\n paginationPerPage * paginationActivePage\r\n )\r\n .map(({ name }) => ({\r\n name,\r\n added:\r\n calendarReports.findIndex(\r\n (calendarReport) => calendarReport.name === name\r\n ) !== -1,\r\n }));\r\n }\r\n);\r\n\r\nexport const getFilteredOrganizations = createSelector(\r\n getOrganizations,\r\n getActivePageFromProps,\r\n getPerPageFromProps,\r\n getAdminPageSearch,\r\n getSortFromProps,\r\n getDirectionFromProps,\r\n (\r\n organizations,\r\n paginationActivePage,\r\n paginationPerPage,\r\n search,\r\n sortBy,\r\n sortDirection\r\n ) => {\r\n let sortedOrganizations: Organization[] = [];\r\n if (\r\n organizations.length &&\r\n organizations[0][sortBy as keyof Organization] !== undefined\r\n ) {\r\n sortedOrganizations = [...organizations].sort(\r\n sortObjectStringsByKey(sortBy)\r\n );\r\n } else {\r\n sortedOrganizations = [...organizations].sort(\r\n sortObjectStringsByKey(\"fullName\")\r\n );\r\n }\r\n if (sortDirection === \"descending\") {\r\n sortedOrganizations.reverse();\r\n }\r\n const filteredOrganizations = sortedOrganizations.filter(\r\n (organization) =>\r\n containsString(organization.name, search) ||\r\n containsString(organization.fullName, search)\r\n );\r\n return filteredOrganizations.slice(\r\n (paginationActivePage - 1) * paginationPerPage,\r\n paginationPerPage * paginationActivePage\r\n );\r\n }\r\n);\r\n\r\nexport const getETLReports = createSelector(\r\n getOrganizationReports,\r\n getReports,\r\n getActivePageFromProps,\r\n getPerPageFromProps,\r\n getAdminPageOrganization,\r\n getAdminPageSearch,\r\n getSortFromProps,\r\n getDirectionFromProps,\r\n getShowTranslatedNameFromProps,\r\n (\r\n organizationReports,\r\n reports,\r\n paginationActivePage,\r\n paginationPerPage,\r\n selectedOrg,\r\n search,\r\n sortBy,\r\n sortDirection,\r\n showTranslatedName\r\n ) => {\r\n if (!selectedOrg) {\r\n return [];\r\n }\r\n const orgReports = organizationReports[selectedOrg];\r\n if (!orgReports) {\r\n return [];\r\n }\r\n const filteredReports = reports.filter(({ name, nameTranslated }) =>\r\n containsString(showTranslatedName ? nameTranslated : name, search)\r\n );\r\n\r\n const mappedOrganizationReports = filteredReports.map(\r\n ({ code, name, requestAccess, nameTranslated }) => ({\r\n nameTranslated,\r\n code,\r\n name,\r\n requestAccess,\r\n added:\r\n orgReports.findIndex(\r\n (orgReport) => orgReport.reportNameCode === code\r\n ) !== -1,\r\n })\r\n );\r\n\r\n let sortedReports: Array<{\r\n code: string;\r\n name: string;\r\n requestAccess: boolean;\r\n added: boolean;\r\n nameTranslated: string;\r\n }> = [];\r\n\r\n if (sortBy.length !== 0) {\r\n sortedReports = [...mappedOrganizationReports].sort(\r\n sortObjectStringsByKey(sortBy)\r\n );\r\n } else {\r\n sortedReports = [...mappedOrganizationReports].sort(\r\n sortObjectStringsByKey(\"name\")\r\n );\r\n }\r\n if (\r\n (sortDirection === \"descending\" &&\r\n !(sortBy === \"dateCreated\" || sortBy === \"added\")) ||\r\n ((sortBy === \"dateCreated\" || sortBy === \"added\") &&\r\n sortDirection !== \"descending\")\r\n ) {\r\n sortedReports.reverse();\r\n }\r\n\r\n return sortedReports.slice(\r\n (paginationActivePage - 1) * paginationPerPage,\r\n paginationPerPage * paginationActivePage\r\n );\r\n }\r\n);\r\n\r\nexport const getFilteredOrganizationViews = createSelector(\r\n getAllViews,\r\n getAllOrganizationViews,\r\n getAdminPageOrganization,\r\n getAdminPageSearch,\r\n getSortFromProps,\r\n getDirectionFromProps,\r\n (\r\n allViews,\r\n organizationViews,\r\n selectedOrganization,\r\n search,\r\n sortBy = \"\",\r\n sortDirection\r\n ) => {\r\n if (!organizationViews || !selectedOrganization) {\r\n return [];\r\n }\r\n const selectedOrganizationViews = organizationViews[selectedOrganization];\r\n if (!selectedOrganizationViews) {\r\n return [];\r\n }\r\n\r\n const filteredViews = allViews.filter(({ displayName }) =>\r\n containsString(displayName, search)\r\n );\r\n const mappedOrganizationViews = filteredViews.map(\r\n ({ name, displayName, dateCreated, requestAccess }) => ({\r\n name,\r\n displayName,\r\n dateCreated,\r\n requestAccess,\r\n added:\r\n selectedOrganizationViews.findIndex(\r\n (orgView) => orgView.viewName === name\r\n ) !== -1,\r\n })\r\n );\r\n let sortedViews: Array<{\r\n name: string;\r\n displayName: string;\r\n added: boolean;\r\n requestAccess: boolean;\r\n }> = [];\r\n if (sortBy.length !== 0) {\r\n sortedViews = [...mappedOrganizationViews].sort(\r\n sortObjectStringsByKey(sortBy)\r\n );\r\n } else {\r\n sortedViews = [...mappedOrganizationViews].sort(\r\n sortObjectStringsByKey(\"dateCreated\")\r\n );\r\n }\r\n if (\r\n (sortDirection === \"descending\" &&\r\n !(sortBy === \"dateCreated\") &&\r\n !(sortBy === \"added\")) ||\r\n ((sortBy === \"dateCreated\" || sortBy === \"added\") &&\r\n sortDirection !== \"descending\") ||\r\n !sortBy.length\r\n ) {\r\n sortedViews.reverse();\r\n }\r\n return sortedViews;\r\n }\r\n);\r\n\r\nexport const getMemberOrganizationViews = createSelector(\r\n getFilteredOrganizationViews,\r\n (memberOrgViews) => memberOrgViews.filter((mov) => mov.added)\r\n);\r\n\r\nexport const getSlicedMemberOrganizationViews = createSelector(\r\n getMemberOrganizationViews,\r\n getActivePageFromProps,\r\n getPerPageFromProps,\r\n (filteredMemberOrganizationViews, paginationActivePage, paginationPerPage) =>\r\n filteredMemberOrganizationViews.slice(\r\n (paginationActivePage - 1) * paginationPerPage,\r\n paginationPerPage * paginationActivePage\r\n )\r\n);\r\n\r\nexport const getSlicedOrganizationViews = createSelector(\r\n getFilteredOrganizationViews,\r\n getActivePageFromProps,\r\n getPerPageFromProps,\r\n (filteredOrganizationViews, paginationActivePage, paginationPerPage) =>\r\n filteredOrganizationViews.slice(\r\n (paginationActivePage - 1) * paginationPerPage,\r\n paginationPerPage * paginationActivePage\r\n )\r\n);\r\n\r\nexport const getOrganizationUsers = createSelector(\r\n getOrganizationNameFromProps,\r\n getAllOrganizationsUsers,\r\n (organizationName, organizationUsers) =>\r\n organizationUsers[organizationName] || []\r\n);\r\n\r\nexport const getUsersDisplayed = createSelector(\r\n getUsers,\r\n getOrganizationUsers,\r\n getAuthState,\r\n getAdminPageOrganization,\r\n (users, orgUsers, auth, selectedOrganization) => {\r\n if (auth === AuthState.administrator) {\r\n return users;\r\n }\r\n const userList = orgUsers.filter(\r\n (ou) => ou.organizationName === selectedOrganization\r\n );\r\n return users.filter((u) => userList.some((ul) => u.userId === ul.userId));\r\n }\r\n);\r\n\r\nexport const getFilteredUsers = createSelector(\r\n getUsersDisplayed,\r\n getActivePageFromProps,\r\n getPerPageFromProps,\r\n getAdminPageSearch,\r\n getSortFromProps,\r\n getDirectionFromProps,\r\n (\r\n users,\r\n paginationActivePage,\r\n paginationPerPage,\r\n search,\r\n sortBy,\r\n sortDirection\r\n ) => {\r\n let sorted = [];\r\n if (users.length && users[0][sortBy as keyof User] !== undefined) {\r\n sorted = [...users].sort(sortObjectStringsByKey(sortBy));\r\n } else {\r\n sorted = [...users].sort(sortObjectStringsByKey(\"firstName\"));\r\n }\r\n if (sortDirection === \"descending\") {\r\n sorted.reverse();\r\n }\r\n const filteredUsers = sorted.filter(\r\n ({ firstName, lastName, email }) =>\r\n containsString(firstName, search) ||\r\n containsString(lastName, search) ||\r\n containsString(email, search)\r\n );\r\n return filteredUsers.slice(\r\n (paginationActivePage - 1) * paginationPerPage,\r\n paginationPerPage * paginationActivePage\r\n );\r\n }\r\n);\r\n\r\nexport const getModalFilteredUsers = createSelector(\r\n getUsers,\r\n getSearchFromProps,\r\n (users, search) =>\r\n users.filter(\r\n ({ firstName, lastName, email }) =>\r\n containsString(firstName, search) ||\r\n containsString(lastName, search) ||\r\n containsString(email, search)\r\n )\r\n);\r\n\r\nexport const getModalSlicedUsers = createSelector(\r\n getModalFilteredUsers,\r\n getOrganizationUsers,\r\n getActivePageFromProps,\r\n getPerPageFromProps,\r\n getSortFromProps,\r\n getDirectionFromProps,\r\n (\r\n filteredUsers,\r\n organizationUsers,\r\n paginationActivePage,\r\n paginationPerPage,\r\n sortBy,\r\n sortDirection\r\n ) => {\r\n const users = filteredUsers.map((filteredUser) => {\r\n const organizationUser = organizationUsers.find(\r\n (orgUser) =>\r\n orgUser.userId.toLowerCase() === filteredUser.userId.toLowerCase()\r\n );\r\n return {\r\n ...filteredUser,\r\n isAdmin: organizationUser ? organizationUser.isAdmin : false,\r\n added: !!organizationUser,\r\n };\r\n });\r\n if (users.length && users[0][sortBy as keyof User] !== undefined) {\r\n users.sort(sortObjectStringsByKey(sortBy));\r\n } else {\r\n users.sort(sortObjectStringsByKey(\"fullName\"));\r\n }\r\n if (sortDirection === \"descending\") {\r\n users.reverse();\r\n }\r\n return users.slice(\r\n (paginationActivePage - 1) * paginationPerPage,\r\n paginationPerPage * paginationActivePage\r\n );\r\n }\r\n);\r\n\r\n// TODO: get better way to get data length\r\nexport const getDataLength = createSelector(\r\n getUsersDisplayed,\r\n getOrganizations,\r\n getReports,\r\n getAllViews,\r\n getSelectedOrganizationCalendars,\r\n getAdminPageSearch,\r\n (users, organizations, reports, views, calendars, search) => ({\r\n usersLength: users.filter(\r\n ({ firstName, lastName, email }) =>\r\n containsString(firstName, search) ||\r\n containsString(lastName, search) ||\r\n containsString(email, search)\r\n ).length,\r\n organizationsLength: organizations.filter((organization) =>\r\n containsString(organization.name, search)\r\n ).length,\r\n reportsLength: reports.filter(({ name }) => containsString(name, search))\r\n .length,\r\n viewsLength: views.filter(({ displayName }) =>\r\n containsString(displayName, search)\r\n ).length,\r\n calendarsLength: calendars.filter(({ name }) =>\r\n containsString(name, search)\r\n ).length,\r\n })\r\n);\r\n","import * as React from \"react\";\r\nimport styled from \"styled-components\";\r\nimport { Heading3 } from \"./headings\";\r\nimport color from \"src/utils/color\";\r\n\r\ntype Props = {\r\n isVisible: boolean;\r\n onClose: () => void;\r\n children: React.ReactNode;\r\n title: string;\r\n};\r\n\r\nexport const Overlay: React.FC = ({\r\n isVisible,\r\n onClose,\r\n children,\r\n title,\r\n}) => {\r\n if (!isVisible) return null;\r\n\r\n return (\r\n \r\n e.stopPropagation()}>\r\n \r\n {title}\r\n ×\r\n \r\n {children}\r\n \r\n \r\n );\r\n};\r\n\r\nconst Wrapper = styled.div`\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: rgba(0, 0, 0, 0.25);\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n z-index: 10000;\r\n backdrop-filter: blur(0.2rem);\r\n`;\r\n\r\nconst Content = styled.div`\r\n background-color: #fff;\r\n padding: 20px;\r\n width: 50%;\r\n max-width: 90%;\r\n border-radius: 8px;\r\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\r\n position: relative;\r\n max-height: 75%;\r\n overflow-y: auto;\r\n`;\r\n\r\nconst HeadWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n margin-bottom: 1rem;\r\n`;\r\n\r\nconst CloseButton = styled.button`\r\n background: none;\r\n border: none;\r\n font-size: 2rem;\r\n cursor: pointer;\r\n transition: color 125ms linear;\r\n\r\n &:hover {\r\n color: ${color.PRIMARY};\r\n }\r\n`;\r\n","import styled from \"styled-components\";\r\nimport color from \"../../../utils/color\";\r\nimport search from \"../../../media/svg/search.svg\";\r\n\r\nconst ContentSearch = styled.input<{ width?: number }>`\r\n width: ${({ width = 250 }) => width}px;\r\n margin-bottom: 10px;\r\n border: 1px solid ${color.PRIMARY};\r\n border-radius: 16px;\r\n font-size: 15px;\r\n color: ${color.NEUTRAL_DARK};\r\n background-image: url(${search});\r\n background-position: 5px 5px;\r\n background-repeat: no-repeat;\r\n padding: 5px 10px 5px 35px;\r\n\r\n &:focus {\r\n outline: none;\r\n box-shadow: 0 0 4px 1px ${color.PRIMARY};\r\n }\r\n`;\r\n\r\nexport default ContentSearch;\r\n","module.exports = __webpack_public_path__ + \"static/media/arrowDropDown.453e259e.svg\";","import { ActionType, createStandardAction } from 'typesafe-actions';\r\nimport { PeriodFrequency } from '../../types/PeriodFrequency';\r\nimport { Chart } from '../../types/Chart';\r\nimport { ChartConfigIDs } from './utils/charts.config';\r\n\r\nexport interface AddChartMeta {\r\n frequency: PeriodFrequency,\r\n productID: number,\r\n}\r\n\r\nexport interface ChangeChartTransformationData extends ChangeChartData {\r\n selectedTransformationID: number,\r\n}\r\n\r\nexport interface ChangeChartNormalizationData extends ChangeChartData {\r\n selectedNormalizationID: number,\r\n}\r\n\r\ninterface ChangeChartData {\r\n productID: number,\r\n frequency: PeriodFrequency,\r\n chartID: ChartConfigIDs,\r\n}\r\n\r\nexport const chartActions = {\r\n add: createStandardAction('@chart/ADD')(),\r\n changeTransformation: createStandardAction('@charts/CHANGE_TRANSFORMATION')(),\r\n changeNormalization: createStandardAction('@charts/CHANGE_NORMALIZATION')(),\r\n};\r\n\r\nexport type ChartActions = ActionType;\r\n","import * as React from \"react\";\r\nimport color from \"../../../utils/color\";\r\nimport styled from \"styled-components\";\r\nimport emptyFunc from \"../../../utils/emptyFunc\";\r\nimport SelectField from \"../../shared/SelectField/SelectField\";\r\n\r\nconst Root = styled.div<{ area: string; disableLastLine: boolean }>`\r\n grid-area: ${({ area }) => area};\r\n ${({ disableLastLine }) =>\r\n disableLastLine ? \"\" : `border-bottom: ${color.NEUTRAL} solid 2px;`}\r\n`;\r\n\r\nconst Header = styled.div`\r\n display: flex;\r\n`;\r\n\r\nconst TextContainer = styled.div`\r\n flex-grow: 1;\r\n display: flex;\r\n margin-bottom: 15px;\r\n border-bottom: ${color.NEUTRAL} solid 2px;\r\n`;\r\n\r\nconst RightContainer = styled.div`\r\n display: flex;\r\n margin: 0 0 15px 25px;\r\n`;\r\n\r\nconst SelectSection = styled.div`\r\n border-bottom: ${color.NEUTRAL} solid 2px;\r\n padding-left: 15px;\r\n`;\r\n\r\nconst ModuleButton = styled.div<{ active: boolean }>`\r\n padding: 5px 15px 10px 15px;\r\n border-bottom:\r\n ${({ active }) => (active ? color.PRIMARY : color.NEUTRAL)} solid 2px;\r\n ${({ active }) =>\r\n active ? `box-shadow: 0 5px 5px -4px ${color.PRIMARY};` : \"\"}\r\n\r\n &:hover {\r\n box-shadow: 0 5px 5px -4px ${({ active }) =>\r\n active ? color.PRIMARY : color.NEUTRAL}\r\n cursor: ${({ active }) => (active ? \"default\" : \"pointer\")}\r\n`;\r\n\r\nconst Text = styled.h3`\r\n margin: 0 0 10px 5px;\r\n padding-right: 25px;\r\n color: ${color.TEXT_PRIMARY};\r\n`;\r\n\r\nconst IconContainer = styled.div`\r\n color: ${color.ICONS_PRIMARY};\r\n font-size: 25px;\r\n transform: translateY(-3px);\r\n`;\r\n\r\ntype Button = {\r\n onClick: () => void;\r\n title: string;\r\n active?: boolean;\r\n};\r\n\r\ntype Select = {\r\n onChange: (value: string | number) => void;\r\n options: Array<{\r\n id: number | string;\r\n name: string;\r\n }>;\r\n selected: string;\r\n};\r\n\r\ntype Props = {\r\n icon?: React.ReactElement;\r\n title: string | number;\r\n children: React.ReactNode;\r\n gridArea: string;\r\n buttons?: Button[];\r\n select?: Select;\r\n disableLastLine?: boolean;\r\n};\r\n\r\nconst Module: React.FC = ({\r\n icon,\r\n title,\r\n children,\r\n buttons,\r\n select,\r\n gridArea,\r\n disableLastLine = false,\r\n}) => (\r\n \r\n
\r\n \r\n {icon && {icon}}\r\n {title}\r\n \r\n {buttons || select ? (\r\n \r\n {select && (\r\n \r\n \r\n \r\n )}\r\n {buttons &&\r\n buttons.map(\r\n ({ title: buttonTitle, onClick: onClickHandler, active }) => (\r\n \r\n {buttonTitle}\r\n \r\n )\r\n )}\r\n \r\n ) : null}\r\n
\r\n {children}\r\n
\r\n);\r\n\r\nexport default Module;\r\n","import { RootState } from '../store';\r\nimport { ProductUnit, UnitsState } from '../../types/Units';\r\nimport { createSelector } from 'reselect';\r\nimport { getSelectedUnitIDFromProps, getUnitIDFromProps } from '../fromPropsSelector';\r\nimport { getUnitFromProduct } from '../products/selectors';\r\n\r\nexport const getAllUnits = (state: RootState): UnitsState => state.units;\r\n\r\nexport const getUnitByID = createSelector(\r\n getAllUnits,\r\n getUnitIDFromProps,\r\n (units, selectedUnit) => units[selectedUnit] || null,\r\n);\r\n\r\nexport const getAllUnitIDs = createSelector(\r\n getUnitByID,\r\n (units) => {\r\n if (!units) {\r\n return [];\r\n }\r\n return units.allIDs;\r\n },\r\n);\r\n\r\nexport const getSelectedUnit = createSelector(\r\n getUnitByID,\r\n getSelectedUnitIDFromProps,\r\n (units, selected) => units !== null ? units[selected] || null : null,\r\n);\r\n\r\nexport const getTranslatedFlag = (state: RootState): boolean => state.productPage.translated;\r\n\r\nexport const getAllProductUnits = createSelector(\r\n getUnitFromProduct,\r\n getUnitByID,\r\n (defaultProductUnit, unitsByID): ProductUnit[] => {\r\n if (!defaultProductUnit) {\r\n return [];\r\n }\r\n\r\n if (!unitsByID) {\r\n return [{ id: defaultProductUnit.id, name: defaultProductUnit.name }];\r\n }\r\n const units: ProductUnit[] = [];\r\n unitsByID.allIDs.forEach((unitID) => {\r\n if (unitID !== defaultProductUnit.id) {\r\n units.push({\r\n id: unitsByID[unitID].id,\r\n name: unitsByID[unitID].name,\r\n scale: unitsByID[unitID].scale,\r\n });\r\n }\r\n });\r\n\r\n const defaultUnit = { id: defaultProductUnit.id, name: defaultProductUnit.name };\r\n units.push(defaultUnit);\r\n return units;\r\n },\r\n);\r\n"],"sourceRoot":""}