{"version":3,"sources":["../../../packages/inspinia/dist/img/eset-logo-67x26.png","../../../packages/navigation/components/Icon.js","../../../packages/navigation/components/Link.js","../../../packages/navigation/components/LinkItem.js","../../../packages/navigation/NavigationContext.js","../../../packages/navigation/useNavigation.js","../../../packages/navigation/useNavigationLink.js","../../../packages/navigation/components/NavigationItem.js","../../../packages/navigation/components/TextItem.js","../../../packages/utils/handleClick.js","../../../packages/navigation/components/CollapseItem.js","../../../packages/navigation/useMenuItems.js","../../../packages/navigation/menu/index.js","../../../packages/navigation/components/Menu.js","../../../packages/navigation/useNavigationMenu.js","../../../packages/utils/parseQueryString.js","../../../packages/navigation/useQueryParams.js","../../../packages/navigation/components/PageParams.js","components/Navigation/Toolbar/Toolbar.js","../../../packages/api/createActionNames.js","../../../packages/utils/stringifyObjectKeyAndValues.js","../../../packages/api/reducers.js","../../../packages/api/createRequestState.js","../../../packages/utils/wrapAsyncCallForDispatch.js","../../../packages/api/resourceAsyncCallAction.js","../../../packages/api/selectors.js","../../../packages/api/useResourceSelector.js","../../../packages/model/ModelContext.js","../../../packages/model/ModelProvider.js","../../../packages/model/promiseWrapper.js","../../../packages/model/useModel.js","../../../packages/model/useResourceContext.js","../../../packages/utils/useReducerWithThunk.js","../../../packages/cms/useCmsArticlesFeeds.js","../../../packages/loading/components/Spinner.js","../../../packages/loading/components/LoadingOverlay.js","../../../packages/loading/LoadingContext.js","../../../packages/loading/useLoading.js","../../../packages/loading/components/LoadingProvider.js","../../../packages/loading/useLoadingContext.js","../../../packages/loading/components/LoadingSpinnerOverlay.js","../../../packages/loading/useHookToLoading.js","../../../packages/loading/components/LoadingInfo.js","../../../packages/loading/components/SpinnerCircle.js","../../../packages/components/ui/Box/Box.js","../../../packages/components/ui/Button/Button.js","../../../packages/components/ui/Date/DateTime.js","../../../packages/components/ui/Date/Date.js","../../../packages/components/ui/DownloadLink/DownloadLink.js","../../../packages/components/ui/Email/Email.js","../../../packages/components/ui/EnumValue/EnumValue.js","../../../packages/components/ui/Errors/Errors.js","../../../packages/components/ui/FilterBar/FilterBar.js","../../../packages/components/ui/Number/Number.js","../../../packages/components/ui/Paginator/Paginator.js","../../../packages/components/ui/Phone/Phone.js","../../../packages/components/ui/WithoutCode/WithoutCode.js","../../../packages/components/ui/Price/Price.js","../../../packages/components/ui/Adress/Address.js","../../../packages/components/ui/FileSize/FileSize.js","../../../packages/utils/formatBytes.js","../../../packages/components/ui/Modal/Modal.js","../../../packages/components/ui/Modal/useModal.js","../../../packages/utils/useEventListener.js","../../../packages/components/ui/DropDown/useDropDown.js","../../../packages/components/ui/DisabledOverlay/DisabledOverlay.js","../../../packages/components/ui/Row/Row.js","../../../packages/components/ui/Col/Col.js","../../../packages/cms/components/ArticlesList.js","../../../packages/cms/components/ArticlesFeed.js","../../../packages/cms/useCmsFiles.js","../../../packages/components/FileManager/FileManagerContext.js","../../../packages/components/FileManager/FileDownload.js","../../../packages/components/FileManager/FileBox.js","../../../packages/components/FileManager/FileManager.js","../../../packages/cms/components/Downloads.js","../../../packages/cms/useCmsPage.js","../../../packages/page/PageContext.js","../../../packages/page/usePageContext.js","../../../packages/page/usePageBlocks.js","../../../packages/page/components/PageBlock.js","../../../packages/page/components/PageRoute.js","../../../packages/page/usePage.js","../../../packages/page/useSetPageInfo.js","../../../packages/page/useSetPageLocation.js","../../../packages/page/usePageInfo.js","../../../packages/page/useNavigate.js","../../../packages/cms/CmsNavigationContext.js","../../../packages/cms/useCmsNavigationRef.js","../../../packages/cms/components/TextPage.js","../../../packages/cms/components/Page.js","../../../packages/cms/useCmsArticle.js","../../../packages/cms/useCmsMenu.js","../../../packages/cms/useCmsPageBlocks.js","components/Navigation/Sidebar/Sidebar.js","components/Navigation/PageHeader/PageHeader.js","components/Navigation/Footer/FooterText.js","components/Navigation/Footer/Footer.js","components/Layout/Layout.js","components/Profile/Salesman/Salesman.js","components/Profile/ResellerInfo/ResellerInfo.js","../../../packages/entity/actions.js","../../../packages/entity/useResourceEntitySelector.js","../../../packages/entity/useCallRequestEnetity.js","../../../packages/entity/usePureEntity.js","../../../packages/entity/useEntity.js","../../../packages/entity/useEntityAction.js","components/Profile/ContactEmailsSubscriptions/ContactEmailsSubscriptions.js","../../../packages/components/components/AddressBookForm/AddressBookForm.js","../../../packages/components/components/BranchOfficeForm/BranchOfficeForm.js","../../../packages/components/components/CertificationRequestForm/CertificationRequestForm.js","../../../packages/components/Table/Table.js","../../../packages/components/Table/TableRow.js","../../../packages/components/Table/ToggleRowDetailButton.js","../../../packages/utils/arrayRemoveAny.js","../../../packages/components/Table/useRowDetail.js","../../../packages/components/components/CertificationsList/CertificationsList.js","../../../packages/components/components/Channel/Channel.js","../../../packages/components/components/ChannelName/ChannelName.js","../../../packages/components/components/ChannelContact/ChannelContact.js","../../../packages/dials/useDials.js","../../../packages/components/components/ContactForm/ContactForm.js","../../../packages/components/Form/DatePicker.js","../../../packages/components/Form/index.js","../../../packages/components/components/PasswordForm/PasswordForm.js","../../../packages/components/components/RenewBox/RenewLicenseShortcut.js","../../../packages/components/components/RenewForm/RenewForm.js","../../../packages/components/components/AddressFields/AddressFields.js","../../../packages/components/components/ContactFields/ContactFields.js","../../../packages/components/components/ChannelPicker/ChannelPickList.js","../../../packages/components/components/ChannelPicker/ChannelPicker.js","../../../packages/components/components/BranchOfficeSelector.js","../../../packages/components/components/ContactSelector.js","../../../packages/components/Document/AddressBook.js","../../../packages/components/Document/BranchOffice.js","../../../packages/components/Document/Channel.js","../../../packages/components/Document/Contact.js","../../../packages/components/Document/Status.js","../../../packages/components/Document/Type.js","../../../packages/components/evidenceItem/EvidenceItemAmount.js","../../../packages/components/evidenceItem/EvidenceItemBonusCode.js","../../../packages/components/evidenceItem/EvidenceItemDiscount.js","../../../packages/components/evidenceItem/EvidenceItemName.js","../../../packages/components/evidenceItem/EvidenceItemPrice.js","../../../packages/components/evidenceItem/EvidenceItemPromo.js","../../../packages/utils/arrayToDictionary.js","../../../packages/components/evidenceItem/EvidenceItemPromoWithName.js","../../../packages/utils/isEmptyChannel.js","../../../packages/documentEdit/useDocument.js","../../../packages/documentEdit/DocumentContext.js","../../../packages/documentEdit/useDocumentContext.js","../../../packages/documentEdit/useDocumentOperation.js","../../../packages/documentEdit/useDocumentSave.js","../../../packages/documentEdit/useDocumentValidator.js","../../../packages/documentEdit/documentViews.js","../../../packages/model/createEvidenceItemModel.js","../../../packages/documentEdit/useDocumentEditEvidenceItems.js","../../../packages/customerEdit/useCompanyRegistrySearch.js","../../../packages/customerEdit/components/CompaniesDropDown.js","../../../packages/customerEdit/components/CompanyFields.js","../../../packages/customerEdit/components/CustomerForm.js","../../../packages/utils/useRefOn.js","../../../packages/customerEdit/useCustomerEdit.js","../../../packages/customerEdit/components/CustomerSearchForm.js","../../../packages/customerEdit/components/CustomerType.js","../../../packages/customerEdit/components/CustomerEdit.js","../../../packages/customerEdit/components/CustomerProvider.js","../../../packages/customerEdit/CustomerContext.js","../../../packages/customerEdit/useCustomerContext.js","../../../packages/documentEdit/partner/usePartner.js","../../../packages/documentEdit/useDocumentEditView.js","../../../packages/documentEdit/useDocumentInit.js","../../../packages/documentEdit/useDocumentEdit.js","../../../packages/documentEdit/components/DocumentProvider.js","../../../packages/documentEdit/components/DocumentSaved.js","../../../packages/documentEdit/components/DocumentAdditionalInfo.js","../../../packages/documentEdit/components/DocumentCustomer.js","../../../packages/documentEdit/components/DocumentCustomerContainer.js","../../../packages/documentEdit/components/DocumentEvidenceItems.js","../../../packages/calculator/components/Discount.js","../../../packages/calculator/components/Preview.js","../../../packages/calculator/components/Promo.js","../../../packages/calculator/components/Selector.js","../../../packages/calculator/components/Ransom.js","../../../packages/calculator/components/DiscountCompetitors.js","../../../packages/calculator/useCompetitors.js","../../../packages/calculator/components/Calculator.js","../../../packages/calculator/useCalculator.js","../../../packages/calculator/useEvidenceItemCalculator.js","../../../packages/storage/src/FakeStorage.js","../../../packages/storage/src/useStorage.js","../../../packages/storage/src/useLocalStorage.js","../../../packages/storage/src/useSessionStorage.js","../../../packages/storage/src/useAppStorage.js","../../../packages/storage/src/AppStorageContext.js","../../../packages/storage/src/components/AppStorageProvider.js","../../../packages/auth/IdentityContext.js","../../../packages/auth/useIdentity.js","../../../packages/calculator/useEvidenceItemsStorage.js","../../../packages/documentEdit/components/DocumentEvidenceItem.js","../../../packages/documentEdit/components/DocumentAttachments.js","../../../packages/documentEdit/components/DocumentChekboxes.js","../../../packages/documentEdit/components/DocumentBranchOffice.js","../../../packages/documentEdit/partner/PartnerContext.js","../../../packages/documentEdit/partner/PartnerProvider.js","../../../packages/documentEdit/partner/usePartnerContext.js","../../../packages/documentEdit/partner/PartnerEdit.js","../../../packages/resellerEdit/useResellerEdit.js","../../../packages/resellerEdit/ResellerByRidFinder/ResellerRidForm.js","../../../packages/resellerEdit/ResellerByRidFinder/ResellerByRidFinder.js","../../../packages/documentEdit/components/DocumentPartner.js","../../../packages/documentEdit/components/DocumentPartnerContainer.js","../../../packages/dataSource/reducers/dataSource.js","../../../packages/dataSource/reducers/index.js","../../../packages/dataSource/selectors.js","../../../packages/dataSource/actions.js","../../../packages/dataSource/usePureDataSource.js","../../../packages/urlQuery/src/QueryParamsContext.js","../../../packages/urlQuery/src/useQueryParamsContext.js","../../../packages/urlQuery/src/components/QueryParamsProvider.js","../../../packages/urlQuery/src/useQueryParams.js","../../../packages/dataSource/useDataSourceWithQueryParams.js","../../../packages/documentEdit/components/DocumentEdit.js","../../../packages/documentEdit/containers/DocumentEntityCreate.js","../../../packages/components/evidenceItem/EvidenceItems.js","../../../packages/components/Document/Document.js","../../../packages/components/Document/Table/index.js","../../../packages/components/components/AddressBookDetail.js","../../../packages/components/components/BranchOfficeDetail.js","../../../packages/components/components/ContactDetail.js","components/ResellerDashboard/ResellerDashboard.js","containers/Homepage/HomapagePopup.js","containers/Homepage/Homepage.js","../../../packages/auth/actionTypes.js","../../../packages/auth/actions.js","../../../packages/auth/useAuth.js","containers/Auth/Auth.js","../../../packages/auth/components/Logout.js","../../../packages/auth/components/AuthIdentityProvider.js","../../../packages/components/Offer/OfferLink.js","../../../packages/utils/deepShallowEqueal.js","../../../packages/components/Opportunity/src/OpportunitiesFilter.js","../../../packages/components/Opportunity/src/useOpportunities.js","../../../packages/components/Offer/OfferDocument.js","../../../packages/components/Offer/OffersFilter.js","../../../packages/components/Offer/OffersTableRowDetail.js","../../../packages/components/Offer/OffersTable.js","../../../packages/components/Offer/OffersList.js","../../../packages/components/Offer/index.js","useIsEpc.js","containers/Offers/Offers.js","../../../packages/components/Deal/DealResponsiblePerson.js","../../../packages/components/Deal/DealFormDetailNew.js","../../../packages/components/Deal/DealFormDetailRenew.js","../../../packages/components/Deal/DealBusinessStatus.js","../../../packages/components/Deal/DealForm.js","../../../packages/components/Deal/DealFormDetail.js","../../../packages/components/Deal/SolutionFields.js","../../../packages/components/Deal/SolutionsContainer.js","../../../packages/components/Deal/DealFormSolutions.js","../../../packages/components/Deal/DealLink.js","../../../packages/components/Deal/DealsTable.js","components/DealsPanel.js","containers/Deals/Deals.js","containers/ProjectPrices/ProjectPrices.js","../../../packages/components/Invoice/EvidenceItems.js","../../../packages/components/Invoice/InvoiceDetail.js","../../../packages/components/Invoice/InvoicesTable.js","containers/Invoices/Invoices.js","containers/Profile/Settings/AddressBook/AddressBook.js","containers/Profile/Settings/BranchOffice/BranchOffice.js","containers/Profile/Settings/Settings.js","containers/Contact/ContactList/ContactList.js","containers/Profile/Contacts/Contacts.js","containers/Profile/Reports/ReportTable/ReportTable.js","containers/Profile/Reports/Reports.js","../../../packages/components/Order/OrderDocument.js","../../../packages/components/Order/OrderLink.js","../../../packages/components/Order/OrdersTableRowDetail.js","../../../packages/components/Order/OrdersTable.js","../../../packages/components/Order/index.js","containers/Orders/Orders.js","containers/Offers/ConfirmOrderModal.js","containers/Offers/Offer.js","containers/Orders/Order.js","containers/Invoices/Invoice.js","containers/Orders/OrderCreate.js","containers/CalculatorAndPriceLists/CalculatorAndPriceLists.js","containers/Offers/OfferCreate.js","containers/ProjectPrices/ProjectPriceCreate.js","components/NfrOrder/NfrOrderForm.js","components/NfrOrder/NfrCreditInfo.js","containers/OrderNfr.js","../../../packages/eshop/useCart.js","../../../packages/eshop/components/Cart.js","../../../packages/eshop/components/ShipmentForm.js","../../../packages/eshop/components/Product.js","../../../packages/eshop/components/ProductsGrid.js","../../../packages/eshop/components/Eshop.js","containers/BoxEshop.js","containers/MarketingEshop.js","containers/Deals/NewDeal.js","containers/Article/Article.js","containers/Deals/EditDeal.js","containers/License/LicensesDownload.js","containers/EsetContacts/EsetContacts.js","containers/Contact/ContactEdit/ContactEdit.js","containers/Contact/ContactCreate/ContactCreate.js","containers/Contact/CertificationRequest/CertificationRequest.js","containers/Profile/Password/Password.js","containers/CertificationDownload/CertificationDownload.js","containers/Profile/Certifications/Certifications.js","../../../packages/components/License/LeakedInfo.js","../../../packages/components/License/LicenseLink.js","../../../packages/components/License/LicenseOfferLink.js","../../../packages/components/License/LicenseOrderLink.js","../../../packages/components/License/LicenseResetCredentialsButton.js","../../../packages/components/License/Detail/LicenseNote.js","../../../packages/components/License/LicensesTable.js","../../../packages/components/License/LicensesFilter.js","../../../packages/components/License/Licenses.js","../../../packages/components/License/Detail/LicenseIdentification.js","../../../packages/components/License/Detail/LicenseInfoSend.js","../../../packages/components/License/Detail/LicenseSolution.js","../../../packages/components/License/Detail/LicenseUser.js","containers/License/ResellerLicenses.js","containers/License/ExpiringLicenses.js","containers/License/LeakedLicenses.js","containers/License/ResellerNfrLicenses.js","containers/License/NewestLicenses.js","containers/License/License.js","../../../packages/auth/useIsAuthenticated.js","../../../packages/auth/useIsAuthInitialized.js","containers/Consignment/Consignment.js","components/Library/Category.js","components/Library/Categories.js","components/Library/GridItemYouTube.js","components/Library/GridItemCourse.js","components/Library/GridItem.js","components/Library/Grid.js","components/Library/Header.js","components/Library/YouTubeDetail.js","components/Library/Detail.js","components/Library/Library.js","components/Faqs/FaqQuestion.js","components/Faqs/FaqAnswer.js","components/Faqs/FaqItem.js","components/Faqs/Faqs.js","components/DataPage.js","containers/Contact/ContactEdit/SelfContact.js","containers/ProcessedCourses/ProcessedCourses.js","containers/Auth/AuthToken.js","containers/License/LeakedLicensesInfo.js","containers/License/ExpiringLicensesInfo.js","containers/License/NewestLicensesInfo.js","containers/License/ExpiredLicenses.js","components/CmsNavigationProvider.js","components/FileManagerProvider.js","containers/License/ExpiredLicensesInfo.js","containers/ForgotPassword/ForgotPassword.js","components/MinimalLayout/MinimalLayout.js","containers/PasswordSet/PasswordSet.js","containers/Sso.js","containers/EshopDone.js","containers/Orders/OrderInfo.js","containers/ResellerPlan.js","containers/License/Expiring90dLicensesInfo.js","containers/License/Expiring90dLicenses.js","App.js","serviceWorker.js","../../../packages/utils/updateObject.js","../../../packages/auth/reducer.js","../../../packages/auth/authMiddleware.js","../../../packages/model/createResourcesReducers.js","../../../packages/auth/rootReducer.js","store/index.js","../../../packages/model/createDialsModel.js","../../../packages/model/createEntityModel.js","../../../packages/model/createDocumentModel.js","../../../packages/model/createCmsModel.js","../../../packages/auth/authStorage.js","../../../packages/auth/createAuthenticationModel.js","../../../packages/model/createDataSourceModel.js","resellerzone/navigation.js","resellerzone/sidebarMenu.js","resellerzone/models.js","resellerzone/index.js","ResellerzoneNavigationProvider.js","components/ResellerzonePageProvider.js","resellerzone/adapter.js","locale/cs.js","../../../packages/auth/redirectAuthenticator.js","index.js"],"names":["module","exports","Icon","icon","className","Link","props","exact","activeClassName","to","link","children","LinkItem","label","NavigationContext","React","createContext","useNavigation","navigation","useContext","paths","useMemo","byPaths","getItemOnPath","useCallback","path","getOnPath","isString","split","routes","getByUrlPath","urlPath","prefix","Object","entries","reduce","a","key","value","useNavigationLink","params","anchor","query","generatePath","queryString","stringify","error","console","log","NavigationItem","Container","content","indexOf","href","TextItem","onClick","event","preventDefault","handleClick","callback","args","apply","CollapseItem","currentPath","isActive","button","useMenuItems","useState","activeItem","setActiveItem","menuItems","setMenuItems","useEffect","filter","item","map","index","itemProps","MenuItem","navigationToMenuItem","navigationItem","title","atIndex","matchActiveContent","acc","currentLocation","child","matchPath","activeItemIndex","Menu","handleItemClick","result","useNavigationMenu","menu","parseQueryString","string","allowedParams","parse","obj","useQueryParams","location","useLocation","search","PageParams","allowed","routeMatch","useRouteMatch","queryParams","Error","propTypes","PropTypes","func","array","Toolbar","username","userId","drawerToggleClicked","style","alt","width","height","src","logo","id","createActionNames","Array","isArray","join","FETCH_INIT","FETCH_SUCCESS","FETCH_FAILURE","FETCH_RESET","stringifyObjectKeyAndValues","sort","concat","setLastUpdate","state","lastUpdateTime","Date","now","setResult","action","newState","defaultState","isFetching","isSuccess","isFailed","isRefreshing","results","resetResultIfNeeded","reset","initialResultState","getPath","method","emptyState","responseReducer","types","resetResult","typesArray","values","initialState","type","currentState","res","withChangeOnPath","payload","createReducer","resource","reducer","createRequestState","actions","wrapAsyncCallForDispatch","fce","shouldCallback","dispatch","getState","Promise","resolve","length","response","data","resourceAsyncCallAction","storeName","name","subAction","isError","selectResourceState","selector","selectedState","getParamsState","getMethodState","getStoreResourceState","getLoading","getLoaded","getFailed","getResults","getRefreshing","getLastUpdateTime","useResourceSelector","deps","useSelector","selectSimpleResourceState","ModelContext","ModelProvider","model","Provider","promiseWrapper","promise","then","useModel","callbackMemo","useResourceContext","resources","useReducerWithThunk","initialArgs","initialize","setState","stateRef","useRef","reducerRef","getCurrentState","current","setCurrentState","getCurrentReducer","feedsActions","SELECT_CATEGORY","feedsReducer","feeds","tags","push","tag","code","items","selected","selectCurrentTag","selectCurrentArticles","hasSelectedTag","useCmsArticlesFeeds","group","loadFeeds","cms","getFeeds","selectCategory","categories","articles","Spinner","minWidth","minHeight","LoadingOverlay","isLoading","LoadingContext","fetching","currentlyLoading","useLoading","useReducer","changeLoadingState","LoadingProvider","loading","useLoadingContext","LoadingSpinnerOverlay","useHookToLoading","loadingState","LoadingInfo","show","SpinnerCircle","Box","header","tools","options","contentClassName","Button","classNames","btnType","disabled","clicked","DateTime","date","format","moment","DownloadLink","createDownloadLink","target","rel","Email","email","EnumValue","ErrorSeverityMessage","message","severity","text","ErrorTypeMessage","Errors","messages","EMPTY_RULES","FilterBar","onSubmitSearch","onChange","controls","render","handleFormSubmit","valid","validationRules","onSubmit","defaultGroupClass","Number","number","decimalLength","wholePartLength","whole_part_length","sectionsDelimiter","sections_delimiter","decimalDelimiter","decimal_delimiter","isEmpty","re","numStr","toFixed","Math","max","Fragment","replace","RegExp","usePaginator","page","count","limit","start","end","pagination","pageCount","ceil","pages","lastPage","firstPage","itemPerPage","min","from","v","k","q","i","round","b","Set","Paginator","onPageChange","paginator","setPage","Phone","phone","WithoutCode","Price","price","currency","Address","street","zipCode","city","FileSize","decimals","bytes","dm","sizes","floor","parseFloat","pow","formatBytes","Modal","visible","hide","renderHeader","renderFooter","bodyClassName","dialogClassName","ReactDOM","createPortal","tabIndex","role","aria-hidden","document","body","useModal","setIsVisible","toggle","useEventListener","eventName","handler","element","window","savedHandler","addEventListener","eventListener","passive","removeEventListener","useDropdown","isOpen","setIsOpen","classList","add","remove","handleMouseDown","DisabledOverlay","on","Row","DEVICE_SIZES","VARIANTS","convertSizeToStyle","forEach","size","variant","property","properties","hasOwnProperty","newProperties","undefined","popProperty","charAt","toUpperCase","slice","newProps","Col","ArticlesList","author","short","isExternalLink","ArticlesFeed","handelClickOnCategory","offset","handlePrevPage","handleNextPage","data-bind","filesActions","filesReducer","filesTree","useCmsFiles","loadCmsFiles","getFiles","FileManagerContext","FileDownloadLink","fileManagerContext","filePath","createPath","FileBox","file","folder","FileDownload","FileManager","currentFolder","setCurrentFolder","padding","files","Downloads","pageActions","pageReducer","useCmsPage","category","loadPage","getPage","PageContext","usePageContext","usePageBlock","blocks","PageBlock","container","block","html","PageRoute","section","setPageLocation","useSetPageLocation","pathname","PAGE_ACTIONS","usePage","def","setPageInfo","info","useSetPageInfo","pageContext","usePageInfo","useNavigate","history","useHistory","CmsNavigationContext","useCmsNavigationRef","onContentChange","ref","navigate","cmsNavigationContext","getAttribute","onNavigationClick","startsWith","querySelectorAll","TextPage","init","dangerouslySetInnerHTML","__html","tabClickHandler","e","$","this","tab","contentElement","jQuery","require","find","click","ibox","closest","slideToggle","toggleClass","setTimeout","resize","youtube","source","dataset","embed","image","Image","appendChild","iframe","createElement","setAttribute","innerHTML","Page","createContents","contents","createdContents","articleActions","useCmsArticle","load","getArticle","menuActions","UPDATE_MENU","mergeMenu","loadedMenu","newLoadedMenu","categoryMap","o","row","newMenu","splice","prototype","menuReducer","mapCmsMenuToMenu","menuItem","visibleName","encodeURIComponent","systemName","isSingle","singlePage","currentMenu","useCmsMenu","loadCmsMenu","getMenu","pageBlockActions","pageBlocksReducer","useCmsPageBlocks","getPageBlocks","Sidebar","sidebarMenu","pageInfo","PageHeader","lg","FooterText","getFullYear","Footer","BannerContainer","paddingBottom","marginBottom","paddingTop","Layout","renderInfo","showSidebar","setShowSidebar","handleDrawToggleClicked","auth","scrollTo","position","zIndex","top","left","right","margin","maxWidth","border","lineHeight","Salesman","salesman","moreLink","imagePath","staffProfileImage","sm","staffFullName","staffCompanyName","staffStreet","staffZipCode","staffCity","staffMobile","staffEmail","RowContainer","RowLabel","RowContent","RowWideContent","colSpan","ResellerAddressBookRow","ResellerBranchOfficeRow","ResellerCategoryRow","commission","ResellerPrivilegeStatusRow","privilegeStatus","ResellerTurnoversRow","amount","subtitle","ResellerLoyaltyRow","loyalties","ResellerRidRow","addressBook","branchOffice","rid","publicExternalId","ResellerCertificationMessage","status","ResellerCertificationRow","certInfo","ResellerPlanRow","ResellerInfo","reseller","categoryInfo","resellerPlanEnabled","stats","shouldUpdateEntity","timeToRefresh","selectApiState","loaded","isTimeToRefresh","prevTime","diff","useResourceEntitySelector","context","selectorCallback","entity","shallowEqual","useResourceSelectorWithParams","paramsOrEmptyObject","useCallRequestEntity","defaultParams","validate","useDispatch","currentParams","setCurrentParams","defaultParamsRef","changeDefaultParams","newParams","isObject","createCurrentParams","resourceSelection","usePureEntity","actionCallback","actionParams","alwaysFetch","getEntity","requestGetEntity","memoizedParams","useEntity","inputParams","memoizedAllParams","callRequest","actionNames","entityActionReducer","useEntityAction","wrappedModelActionCall","request","ContactEmailsSubscriptions","checked","rulesForMainAddress","rules","mainAddress","VALIDATION_RULES","required","minLength","maxLength","postName","postStreet","postCity","postZipCode","mobile","web","AddressBookForm","setValidationRules","handleChange","newRules","elementType","elementConfig","placeholder","touched","autoComplete","groupClass","invalidate","store","sendOrderToCustomer","postAddress","form","validation","BranchOfficeForm","CertificationBranch","branchId","setValue","CertificationRequestForm","certificationBranches","contactId","Cell","column","primaryValue","renderCellProps","filterVisible","Cells","columns","onRowClick","rowContent","renderRowMessages","columnsLength","TableHead","Table","tableClasses","striped","bordered","condensed","hover","containerClasses","containerClassName","responsive","renderRow","getChildren","isValidElement","headerClassName","cloneElement","rows","primary","TableRow","ToggleRowDetailButton","isVisibleRow","toggleRow","closeIcon","openIcon","arrayRemoveAny","useRowDetail","visibleRows","setVisibleRows","newlyVisible","course","color","actual","contactName","endOn","actualPoints","maximumPoints","verdictPercent","verdict","certTestVerdictId","CertificationList","Channel","companyId","ChannelName","addressBookId","ChannelContact","contact","contactSurname","contactFirstname","contactEmail","useDials","TagGroupCheckboxes","usedTags","getValue","setChecked","currentValue","tagCode","tagDescription","contactPhone","pattern","ContactForm","onResendLoginRequested","selfEdit","dials","roles","others","newsletters","DataPickerWrapper","input","focused","setFocused","customInputIcon","inputIconPosition","small","numberOfMonths","displayFormat","onDateChange","keepFocusOnInput","onFocusChange","openDirection","hideKeyboardShortcutsPanel","isOutsideRange","DatePicker","renderInputElement","elementProps","SelectInput","TextArea","TextInput","PasswordInput","NumberInput","valueType","Checkbox","PasswordForm","handleSubmit","setValues","password","oldPassword","passwordCheck","RenewLicenseShortcut","box","identificator","idType","order","create","RenewForm","setIdType","match","renderAppend","AddressFields","ContactFields","NameRow","handleOptionChange","ChannelPickList","onPick","setSelected","changeEvent","parseInt","ChannelPicker","entityContext","handlePick","BranchOfficeSelector","branchOffices","branchOfficeId","ContactSelector","contacts","AddressBook","BranchOffice","viewType","isCustomer","Contact","Status","Type","EvidenceItemAmount","itemAmount","EvidenceItemBonusCode","itemBonusCode","EvidenceItemDiscount","itemDiscount","itemDiscountName","itemDiscountCompetitor","itemDiscountCompetitorName","itemDiscountCompetitorPrice","EvidenceItemName","itemCode","itemName","itemLicenseIdCodes","itemRansomExpirationDate","itemExpirationDate","itemExtraDays","EvidenceItemPrice","channel","itemCurrency","itemPrice","EvidenceItemPromo","itemPromoDiscount","arrayToDictionary","EvidenceItemPromoWithName","itemPromoId","promos","itemPromoName","enum","isEmptyChannel","channelValues","shouldValidate","initialized","existing","emptyDocument","owner","potentialOwner","replaceDocumentEvidenceItem","oldItem","newItem","evidenceItems","changeDocumentWithShouldValidateCheck","newDocumentValues","documentReducer","newOwner","newPartner","partner","evidenceItem","attachments","attachment","currentAttachments","currentEvidenceItems","useDocument","isEpc","confirmCustomerChange","confirmPartnerChange","setDocument","resetCustomer","addEvidenceItem","removeExitingEvidenceItem","changeValues","addAttachment","removeAttachment","addAttachments","replaceEvidenceItem","initialDocument","isCustomerFilled","isPartnerFilled","DocumentContext","useDocumentContext","actionTypes","documentType","useDocumentOperation","operation","dispatchOperation","documentModel","perform","saveActions","saveReducer","useDocumentSave","save","saveDocument","isSaving","isSaved","validateActions","buttons","availableButtons","possibleDocumentTypes","isLimitedByCredit","projectPrice","resellerDocument","validationReducer","documentTypes","available","useDocumentValidator","createValidate","validateDocument","attachmentContent","validationMessages","documentViews","EDIT_CUSTOMER","EDIT_CUSTOMER_PICK","EDIT_CUSTOMER_EDIT","PICK_PARTNER","EDIT_PARTNER","EDIT_EVIDENCE_ITEMS","VIEW","emptyItem","itemProductTypeId","itemProductFamilyId","itemProductPeriodId","itemDiscountId","itemBasePrice","itemMessages","epc","createEvidenceItemModel","adapter","select","get","recalculate","selection","post","EMPTY_CONTEXT","useDocumentEditEvidenceItems","isCompany","setView","evidenceItemEditContext","setEvidenceItemEditContext","editEvidenceItem","startEditNewEvidenceItem","selectType","startEditNewRenewEvidenceItem","startEditExistingEvidenceItem","leaveEvidenceItemEdit","confirmEvidenceItemEdit","licenseCode","cancelEvidenceItemEdit","useCompanyRegistrySearch","CompaniesDropDown","onSelect","onClose","canBeClosed","setCanBeClosed","handleSelect","COMPANY_FIELDS","vatId","CompanyFields","onSearchRegistry","registrySearchResult","searchRegistry","setPath","handleSearchRegistry","handleSelectCompany","handleClose","renderPrepend","Controls","useFormContainer","CustomerCompanyControls","useIsCompany","companyValidationRules","mergeDeep","isCompanyRef","CustomerForm","onReset","useRefOn","views","DEFAULT_VIEWS","initialValues","previousViewType","prefilledValue","emptyValues","zipcode","prepareValues","isOnOneOfCustomerEditView","view","documentCustomerReducer","customerType","useCustomerEdit","onViewChange","cancelEdit","confirmEdit","edit","pickNewHomeUser","pickNewCompany","pickNewExisting","existingChoosed","refOnViewChange","isEditingCustomer","customer","CustomerSearchForm","CustomerType","visibleViews","pickerContext","CustomerEdit","useCustomerContext","CustomerProvider","CustomerContext","PARTNER_VIEWS","ACTION","INITIAL_STATE","usePartner","onPartnerChange","cancel","pick","confirmChange","useDocumentEditView","defaultView","handleCustomerViewChange","customerView","isEdit","newView","CUSTOMER_VIEWS","handlePartnerViewChange","partnerView","currentView","enableAttachment","enableBranchOffice","enableEvidenceItem","enableCustomer","enablePartner","enableButtons","useDocumentEditInit","evidenceItemEdit","useDocumentEdit","modelProps","saving","DocumentProvider","DocumentSaved","ProjectPriceSaved","offerId","ProjectPriceInfo","DocumentAdditionalInfo","handleValuesChanges","note","customContractId","DocumentCustomer","DocumentCustomerContainer","memoVisibleViews","DocumentEvidenceItems","evidenceItemsMessages","itemMenu","Discount","discounts","productDiscountId","productDiscountName","Preview","Promo","promoId","promoName","Selector","products","periods","minimum","maximum","Ransom","ransom","DiscountCompetitors","competitors","useCompetitors","setCompetitors","discount","prevState","Calculator","confirm","calculationData","onEvidenceItemChange","useEvidenceItemCalculator","possibleDiscounts","possiblePromos","handleConfirm","promoAutoSelected","selectActions","recalculateActions","useCalculator","initialSelection","channels","currentSelection","evidenceItemsModel","finalProduct","changeSelectionCallback","changeValueCallback","productDiscountValue","changeSelection","changeValue","selectPartner","useForm","onValueChange","FakeStorage","clear","isNaN","_data","getItem","setItem","toString","removeItem","useStorage","storage","defaultValue","defaultValueRef","setCurrentValue","prevValue","JSON","newValue","Function","useLocalStorage","localStorage","sessionStorage","useAppStorage","AppStorageContext","AppStorageProvider","IdentityContext","useIdentity","useEvidenceItemsStorage","identity","setEvidenceItems","clearEvidenceItems","removeEvidenceItem","newItems","DocumentEvidenceItem","setChannels","processFiles","all","reject","reader","FileReader","onabort","onerror","abort","onload","attachmentName","attachmentSize","attachmentContentType","readAsDataURL","processFile","DocumentAttachments","onDrop","acceptedFiles","useDropzone","accept","maxSize","getRootProps","getInputProps","isDragActive","DocumentCheckboxes","generateVariants","dealConsent","visibleElements","setVisibleElements","DocumentBranchOffice","PartnerContext","PartnerProvider","usePartnerContext","PartnerEdit","changePartner","ResellerRidForm","ResellerByRidFinder","onConfirm","autoConfirm","resellerProfile","confirmProfileChange","DocumentPartner","onCancel","DocumentPartnerContainer","filtersKey","pageData","setCount","PAGE_COMMON_KEYS","getIncludesFromBody","getCurrentPage","filterKey","updateFor","searchParams","pageInitialState","elements","includes","setCountAndLastUpdateIfCount","setCountAndLastUpdate","dataSourceReducer","COUNT_FETCH_SUCCESS","COUNT_FETCH_INIT","COUNT_FETCH_FAILURE","createDataSourceReducer","countActionNames","selectCurrentBySearchParams","defaults","getPages","getCount","pageNumber","getPageElements","getPageIncludes","getPageIsLoading","shouldUpdateDataSource","searchParamsState","selectedPage","loadDataSource","dataSource","getDataSource","usePureDataSource","initialSearchParams","dataSourceResource","setSearchParams","useDataSourceSelector","getDataSourceCount","loadDataSourceCount","refresh","QueryParamsContext","useQueryParamsContext","QueryParamsProvider","urlSearchParams","returnParams","searchParamsToObject","URLSearchParams","currentSearchParams","newSearchParams","reload","setReload","change","locationSearchParams","append","getSearchParams","queryParamsContext","setQuery","PAGINATION","useDataSourceWithQueryParams","setQueryParams","paginationQueryParams","setPaginationQueryParams","queryParamsProcessed","setQueryParamsProcessed","paginationQueryParamsProcessed","setPaginationQueryParamsProcessed","firstRun","setFirstRun","handleSearch","handlePageChange","DocumentEdit","resourceName","DocumentEntityCreate","licensePublicId","licenseEPLI","licenseKey","licenseUsername","EvidenceItems","visibleDiscounts","visiblePrices","ownerPrice","partnerPrice","epcPrice","Document","states","statesDict","typesDict","businessStatus","dateCreated","basePrice","vatPrice","DocumentOwner","DocumentEPC","DocumentType","DocumentStatus","BusinessStatus","DocumentBasePrice","DocumentCreatedDate","DocumentResellerContact","AddressBookDetail","BranchOfficeDetail","ContactDetail","ResellerDashboardContent","turnovers","staff","process","ResellerDashboard","ID","HomepagePopup","modal","popup","useSessionStorage","popupSeen","setPopupSeen","popupDismissed","setPopupDismissed","checkDate","dismiss","expire","setDate","getDate","days","data-dismiss","Homepage","HomapagePopup","AUTH_INIT","AUTH_LOGOUT","authSuccess","authFailed","authenticate","credentials","checkOfTimeout","authInit","returnSecureToken","logOut","expirationTime","useAuth","handleAuthenticate","isAuthenticated","token","redirectPath","Auth","md","Logout","AuthIdentityProvider","authentication","authStorage","getAccessToken","OfferLink","staffId","resellerStaffId","tiers","phase","solution","businessType","tier","OfferDocument","isOrdered","createVariants","isVariantsCreated","handleOrder","isPdf","expirationDate","OffersFilter","fulltext","OffersTableRowDetail","offer","OffersTable","epcVisible","partnerVisible","OffersList","OfferExpirationDate","OfferTodayDate","todayDate","OfferViewMenu","useIsEpc","DEFAULT_PARAMS","Offers","contactPosition","DealResponsiblePerson","isSubmitted","responsiblePersonIsSameAsContact","isSameAsContact","setIsSameAsContact","handleCheck","responsiblePerson","DealFormDetailNew","notePosition","noteImplementation","MultiChoice","choices","setTouched","choice","SingleChoice","RenewElements","formContainer","DealFormDetailRenew","renewData","DealBusinessStatus","localValidationRules","dateExpected","phaseId","successProbability","expectedSolutions","DealForm","formType","propabilities","phases","solutions","renew","setIsSubmitted","responsiblePersonValidationRules","currentSolutions","minAmount","getValidationRules","before","validationResult","validateObject","handleSave","DealFormDetail","SolutionFields","unit","SolutionContainer","isChecked","SolutionsContainer","collectionContainer","useFormCollection","defaultValues","pathMemo","addItem","collection","setValueAt","currentIndex","updateValue","validator","useValidator","currentValidation","pathWithChildren","solutionsValidationRules","fromEntries","DealFormSolutionsWithDocument","initialSolutions","setInitialSolutions","lastSolutions","setLastSolutions","documentExpectedSolutions","newOne","a1","a2","formValidationRules","DealFormSolutions","DealLink","DealsTable","dealPhase","dateExpiration","DealsPanel","VIEWS","Deals","data-toggle","ProjectPrices","itemType","itemUnitPrice","itemVat","InvoiceDetail","variableSym","paymentMethod","paymentStatus","paymentStatusDict","companyName","dueDate","dateTaxableSupply","leftToPay","InvoicesTable","InvoiceState","canceled","overdue","isPaid","Invoices","Settings","tagsMap","Tag","ContactList","contactTags","Contacts","months","reportTable","year","month","formatValue","Reports","turnoversTable","ownerPrices","previousYear","groupedOwnerPrice","thisYear","ReportTable","percent","OrderDocument","OrderLink","OrdersTableRowDetail","OrdersTable","OrderMenu","INITIAL_SEARCH_PARAMS","Orders","OrdersFilter","ConfirmOrderModal","orderOffer","Offer","Order","Invoice","invoice","OrderCreate","CalculatorAndPriceLists","setCalculationData","handleShowCalculator","setEvidenceItem","orderEvidenceItem","setOrderEvidenceItem","handleOrderEvidenceItem","handleEvidenceItem","xs","lgOffset","OfferCreate","ProjectPriceCreate","defaultProps","NfrOrderForm","handleChangeReseller","NfrCreditInfo","OrderNfr","total","productPrice","product","productBasePrice","quantity","productsSum","sum","useCart","newProducts","changedProducts","addProduct","existingIndex","findIndex","productId","removeProduct","changeQuantity","clearBasket","Cart","onChangeQuantity","onRemoveProduct","productName","ShipmentForm","onValuesChange","Product","onAddProduct","attachmentPath","productUnit","setQuantity","onAddButtonClick","srcSet","toLowerCase","ProductsGrid","CategoryContent","cart","level","subNodes","Category","Heading","Eshop","onLoading","onSaved","resellerProfileLoading","rootCategory","productTreeLoading","setValid","profile","setProfile","handleValuesChange","newValues","isValid","BoxEshop","setIsSaved","handleSaved","boxEshopOrdered","MarketingEshop","marketingEshopOrdered","defaultDocument","statusId","closedId","opportunityId","dealClosed","dealStatus","opportunity","NewDeal","initialFormType","setFormType","Article","article","EditDeal","deal","LicensesDownload","requestLicenses","EsetContacts","data-app-module","frameBorder","ContactEdit","saveResult","resendLogin","EMPTY_CONTACT","ContactCreate","CertificationRequestResult","CertificationRequest","certificationRequestResult","fontStyle","Password","resetPassword","CertificationDownload","Certifications","CertificationsList","LeakedInfo","leakedInfo","hwf","LicenseLink","LicenseOfferLink","LicenseOrderLink","LicenseResetCredentialsButton","resetCredentials","handleResetCredentials","confirmAlert","LicenseNote","resellerNote","onSave","saveNote","handleNoteSave","filterChannel","licenseChannels","pop","LicensesTable","onInvalidate","license","licenseId","LicenseIdColumn","licenseMainId","LicenseIdWithNoteColumn","LicenseCustomerInfo","licensePrimaryName","licenseEmail","LicensePartner","channelName","LicenseEPC","LicenseChannel","LicenseProduct","licenseProductName","licensePackProductName","licenseTypeName","licenseBusinessType","licenseQuantity","LicenseDate","licenseDate","licenseExpiration","LicenseStatus","licenseBusinessStatusLabelStyle","licenseBusinessStatus","LicenseOrder","orderInfo","licenseOrder","orderClass","licenseOrderId","substr","LicenseDownload","licenseStatusId","LicensesFilter","statuses","typesList","statusesList","c","ago","Licenses","LicenseIdentification","licensePassword","licenseDeslockProductId","licenseProductKey","licenseProxyId","NormalLicense","DeslockLicense","licenseDeslockProductKey","LicenseInfoSend","sendedToEmail","resendCredentials","handleResendCredentials","LicenseSolution","licensePackQuantity","LicenseUser","licensePhone","ResellerLicenses","ExpiringLicenses","LeakedLicenses","LicenseNfrSpend","nfrPrice","ResellerNfrLicenses","NewestLicenses","License","resellerResetAllowed","useIsAuthenticated","useIsAuthInitialized","Consignment","cols","sn","onSelectCategory","sublabel","handleCategoryClick","aria-expanded","Categories","GridItemYouTube","description","GridItemCourse","blockFactory","GridItem","Grid","onSelectItem","colsNumber","attrs","Header","opts","playerVars","autoplay","enablejsapi","YouTubeDetail","YouTube","videoId","detailFactory","Detail","Library","defaultCategory","selectedCategory","setSelectedCategory","selectedItem","setSelectedItem","handleSelectCategory","categoryKey","handleSelectItem","FaqQuestion","question","FaqAnswer","answer","FaqItem","Faqs","DatePage","SelfContact","ProcessedCourses","LessonName","LessonStatus","lessonName","CreatedDate","created","ModifiedDate","modified","lessonStatus","AuthToken","access_token","LeakedLicensesInfo","ExpiringLicensesInfo","NewestLicensesInfo","ExpiredLicenses","CmsNavigationProvider","handleNavigationClick","url","parseUrl","open","FileManagerProvider","ExpiredLicensesInfo","VALIDATION","RequestSendForUsername","ForgotPassword","MinimalLayout","validatePassword","s","normalizeToString","PasswordSetForm","PasswordSetContent","validateResetPassword","ErrorPage","PasswordSet","Sso","protocol","hostname","EshopDone","OrderInfo","ResellerPlan","resellerPlanStats","isProfileLoaded","hasActivePlan","plan","Expiring90dLicensesInfo","Expiring90dLicenses","appRuleSet","defaultRuleSet","homepage","LICENSES_ALLOWED_KEYS","createPageContents","DataPage","App","isAuthReady","layout","expiring","component","expired","leaked","expiring90d","newest","list","signToken","decodeURIComponent","signIn","signOut","sso","detail","calculator","createNewLicence","createRenewLicence","nfr","download","settings","createContact","editContact","editSelfContact","certificationRequest","reports","partnerstvi","resellerPlan","certification","certificationDownload","processedCourses","nfrOrder","boxEshop","downloads","marketingEshop","consignment","old","forgottenPassword","passwordSet","basename","ruleSet","Boolean","updateObject","oldObject","newObject","clearAuthorizationHeader","authenticationModel","setAuthorizationToken","expiresIn","authCheck","authTokenCheck","getCredentials","createSpecificReducer","definition","initialResultsState","createResponseReducer","createResourcesReducers","definitions","reducers","resourceConfig","combineReducers","createResourceReducers","rootReducer","appReducer","composeEnhancers","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","prepareStore","createStore","authReducer","applyMiddleware","next","authMiddleware","thunk","createDialsModel","getDialsFor","DOCUMENT_RESOURCES","createEntityModel","adapters","defaultAdapter","actionsModel","getAdapter","adapterName","postEntity","putEntity","put","deleteEntity","createDocumentModel","createAllOfferVariants","createCmsModel","feedGroupId","createAndSaveNonce","possible","random","nonce","clearLocalStorage","createAuthStorage","getUserName","getExpireAt","getUserId","getNonce","getIdentity","createNonce","clearStorage","persistAuthResponse","expireAt","getTime","accessToken","persistInLocalStorage","createAuthenticationModel","tokenCheck","forgotPassword","createDataSourceModel","orderNfr","sideBarMenu","salesMenuItems","models","resendLicenseEmail","saveResellerNote","saveAddressBook","saveBranchOffice","contactCertificationRequest","createResellerZoneModel","baseURL","authenticationAdapters","cmsAdapter","dataSourceAdapter","identityAdapter","resourceAdapter","axiosInstance","axios","resellerzoneResourceAdapter","endsWith","productTree","processedCourse","esetEvidenceItem","getTags","ResellerzoneNavigationProvider","ResellerzonePageProvider","initPage","isInvalidResponse","success","mapResponse","axiosRequest","requestParameters","resourceRequestConfig","requestParams","mapResourceParamsToRequestParams","stored","wrapWithStore","getUserByToken","headers","common","monthsShort","plural","n","translate","withoutSuffix","isFuture","defineLocale","monthsParse","_monthsParse","weekdays","weekdaysShort","weekdaysMin","longDateFormat","LT","L","LL","LLL","LLLL","calendar","sameDay","nextDay","nextWeek","day","lastDay","lastWeek","sameElse","relativeTime","future","past","m","mm","h","hh","d","dd","M","MM","y","yy","ordinal","week","dow","doy","moment_init_cs","checkoutHash","savedNonce","hash","expires_in","refresh_token","user_id","stateParts","refreshToken","locale","response_type","clientId","scope","redirectUrl","initImplicitFlow","userUrl","additionalState","createLoginUrl","createRedirectAuthenticator","origin","REACT_APP_SSO_URL","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"iHAAAA,EAAOC,QAAU,0tF,ogBCIFC,EAFF,SAAC,GAAD,IAAEC,EAAF,EAAEA,KAAF,OAAaA,EAAQ,uBAAGC,UAAWD,IAAW,MCmB5CE,EAhBF,SAACC,GAAD,OACT,kBAAC,IAAD,CACIC,MAAOD,EAAMC,MACbC,gBAAgB,SAChBJ,UAAWE,EAAMF,UACjBK,GAAIH,EAAMI,MACZJ,EAAMK,W,OCAGC,EAP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awqrvLXVcBjaALXQ7t0niuBlsBM97PC9LNNVNzdRYtPihoT291D5h9H3M6+ngmrp+0rhnGMzn+BKQ5mEZuWrMFuNZ2wzr7bLMdLGSyfVhpW2Sjk+mZq5atJVtBCexin8Y0DJ4LY398/jbxwDpzt5CcAGcZTC9xIDd5vHMFAbKy+r8NBNCkZ9GC3VbhBaTZdwjoo5v+wj0aSEVlf+1CEzUwuDNKDfTdc5eUGOk+PmWMb/QVWLVPQeJVxuKw/IaDHGWpaV6LEX6geKff3DWB5mPRGglvytZSXHPgRfBk+Axj6VQ4tEaIz7Y2lrGoU7O8oNgKo+F3DgowwmpDw5bBHq05kA9A6JZDWrLCFKxu8E+rumuO8r9XgW1atwClUu4bQIVfFO5YCGxWUU89iEi8jHdPJlmEfjByBCfVueLaBUuh5Q1tfMF5UVPgFtU4gArxJQY/iwKzVHnh4z+1/k+ASr+XByU0Rui2Us9n2cROGrM4pfgZc5YmSHboGb4CjdNpBWxZG6iJZUa4w57pOOlfH4KFTofPAV+A6eMIF8SB2XckGVnO5eWTjDOsrzu8LEsNRtjynwmXfUxMtDyGAlUGrNUWytUctk+3mW7pLarGAvc3a1Wi9ZkVl6hf0/hLN6gVcnKccAyZhaTnBzGgFS6jSy7v4Kdhnl71SY/gW/Y5/DZk2gNS6PUIR+B8+yXmPNGDMtYLcqYSNOT4udrsCpJlWO0Qi3R7S8wU7TWC+p4cSV4bQxuDtfd0YPyqaG7LHjijVS+A0nY2Blyywy9B1rAYi2odpKlONrDTPG2kWXGs/VwNTs7ym4SYbrQ6m7u6M4iZoN5Y8A1pOquBC0jiZTHn0gvgGqu4WFVjCWyOYxfwwnYAnQTtF4WddvALlPoPwEGAB/dQ8+erjybAAAAAElFTkSuQmCC\"","import React from \"react\";\n\nconst Icon = ({icon}) => (icon ? (<i className={icon}/>) : null);\n\nexport default Icon;","import React from 'react';\nimport PropTypes from \"prop-types\";\n\nimport {NavLink} from \"react-router-dom\";\n\nconst Link = (props) => (\n <NavLink\n exact={props.exact}\n activeClassName='active'\n className={props.className}\n to={props.link}\n >{props.children}</NavLink>\n);\n\nLink.propTypes = {\n link: PropTypes.string.isRequired,\n active: PropTypes.bool,\n className: PropTypes.string\n};\n\n\nexport default Link;\n","import Link from \"./Link\";\nimport React from \"react\";\nimport Icon from \"./Icon\";\n\nconst LinkItem = ({to, icon, label, children, ...props}) => (<Link link={to} {...props}>\n {icon ? <Icon icon={icon}/> : null}\n {label || null}\n {children || null}\n</Link>);\n\n\nexport default LinkItem;","import React from \"react\";\n\nconst NavigationContext = React.createContext(null);\n\nexport default NavigationContext;","import {useCallback, useContext, useMemo} from \"react\";\nimport {getOnPath, isString} from \"@mouseover/js-utils/src\";\nimport NavigationContext from \"./NavigationContext\";\n\nconst useNavigation = () => {\n const {navigation} = useContext(NavigationContext);\n const paths = useMemo(() => byPaths(navigation), [navigation]);\n const getItemOnPath = useCallback((path) => getOnPath(navigation, isString(path) ? path.split(':') : path) || null, [navigation]);\n return {\n routes: useMemo(() => navigation, [navigation]),\n paths,\n getByUrlPath: useCallback((urlPath) => {\n const path = getOnPath(paths, [urlPath]);\n return path ? getItemOnPath(path) : null;\n }, [paths, getItemOnPath]),\n getItemOnPath\n }\n};\n\nexport default useNavigation;\n\n\nconst byPaths = (navigation, prefix = '') =>\n navigation\n ? Object.entries(navigation).reduce(\n (a, [key, value]) => (\n {\n ...a,\n ...(value && value.path ? {[value.path]: prefix + key} : byPaths(value, key + ':'))\n }\n ),\n []\n ) : {};","import {generatePath} from \"react-router-dom\";\nimport {useMemo} from \"react\";\nimport useNavigation from \"./useNavigation\";\nimport queryString from \"query-string\";\n\nconst useNavigationLink = ({to, params, anchor, query}) => {\n const {getItemOnPath} = useNavigation();\n return useMemo(() => {\n const navigation = getItemOnPath(to);\n if (navigation && navigation.path) {\n try {\n return generatePath(navigation.path, params) + (anchor ? '#' + anchor : '') + (query ? '?' + queryString.stringify(query) : '');\n } catch (error) {\n console.log(params, error);\n return '#not-created';\n }\n }\n return null;\n }, [getItemOnPath, to, params, anchor, query]);\n};\n\nexport default useNavigationLink;","import React from \"react\";\nimport LinkItem from \"./LinkItem\";\nimport useNavigationLink from \"../useNavigationLink\";\n\nconst NavigationItem = ({to, params, anchor, query, Container = null, ...props}) => {\n const path = useNavigationLink({to, params, anchor, query});\n\n if (!path) {\n return props.label || props.children || null;\n }\n\n const content = path.indexOf('http') === 0 ? <a href={path} {...props} /> : <LinkItem to={path} {...props}/>;\n return Container ? <Container path={path}>{content}</Container> : content;\n};\n\n\nexport default NavigationItem;","import React from \"react\";\nimport Icon from \"./Icon\";\n\nconst TextItem = ({icon, label}) => (\n <a href='#' onClick={(event => event.preventDefault())}>\n {icon ? <Icon icon={icon}/> : null}\n {label}\n </a>);\n\nexport default TextItem;","const handleClick = (callback, ...args) => (event) => {\n if (event && typeof event.preventDefault === 'function') {\n event.preventDefault();\n }\n\n callback.apply(null, args);\n};\n\nexport default handleClick;\n\n","import React from \"react\";\nimport Menu from \"./Menu\";\nimport Icon from \"./Icon\";\n\nconst CollapseItem = ({onClick, currentPath, icon = null, label, isActive = false, content}) => {\n const button = <a href='#' onClick={onClick}>{icon ? <Icon icon={icon}/>: null}{label}</a>;\n\n return (<>\n {button}\n <Menu content={content} currentPath={currentPath} className={'nav nav-second-level collapse' + (isActive ? ' in' : '')}/>\n </>)\n};\n\nexport default CollapseItem;","import {useEffect, useState} from \"react\";\nimport CollapseItem from \"./components/CollapseItem\";\nimport LinkItem from \"./components/LinkItem\";\nimport TextItem from \"./components/TextItem\";\n\nconst useMenuItems = (content) => {\n const [activeItem, setActiveItem] = useState(null);\n const [menuItems, setMenuItems] = useState([]);\n\n useEffect(() => {\n const menuItems = content.filter((item) => item.label).map((item, index) => {\n const itemProps = {\n ...item,\n MenuItem: null\n };\n\n if (item.content) {\n itemProps.MenuItem = CollapseItem;\n } else if (item.path) {\n itemProps.MenuItem = LinkItem;\n } else if (item.to) {\n itemProps.MenuItem = LinkItem;\n } else {\n itemProps.MenuItem = TextItem;\n }\n\n return itemProps;\n });\n\n setMenuItems(menuItems);\n }, [content, activeItem]);\n\n return [menuItems, activeItem, setActiveItem];\n}\n\nexport default useMenuItems;","import {matchPath} from \"react-router-dom\";\n\nexport const navigationToMenuItem = (navigationItem) => ({\n to: navigationItem.path,\n label: navigationItem.title,\n atIndex: navigationItem.atIndex\n});\n\nconst isMatching = (currentLocation, to) => currentLocation ? matchPath(currentLocation, to) : null;\n\nexport const matchActiveContent = (content, path) => content.reduce((acc, item, index) => {\n const content = item.content || item.child;\n if (isMatching(path, item.to) || (content && matchActiveContent(content, path).isActive)) {\n acc.isActive = true;\n acc.activeItemIndex = index;\n }\n return acc;\n}, {isActive: false, activeItemIndex: null});","import React, {useCallback, useEffect} from \"react\";\nimport handleClick from \"@fik/utils/handleClick\";\nimport useMenuItems from \"../useMenuItems\";\nimport {matchActiveContent} from \"../menu\";\n\nconst Menu = ({content = [], className = 'nav', currentPath}) => {\n const [menuItems, activeItem, setActiveItem] = useMenuItems(content);\n\n const handleItemClick = useCallback((index) => {\n setActiveItem(index);\n }, [setActiveItem]);\n\n useEffect(() => {\n if (currentPath) {\n const result = matchActiveContent(content, currentPath);\n if (result.activeItemIndex !== null) {\n setActiveItem(result.activeItemIndex);\n }\n }\n }, [content, currentPath, setActiveItem]);\n\n return (\n <ul className={className}>\n {menuItems.map(({MenuItem, ...itemProps}, index) => (<li key={index} className={activeItem === index ? 'active' : ''}>\n <MenuItem onClick={handleClick(() => handleItemClick(index))} currentPath={currentPath} {...itemProps} isActive={activeItem === index}/>\n </li>))}\n </ul>\n );\n};\n\nexport default Menu;","import {useContext, useMemo} from \"react\";\nimport {getOnPath, isString} from \"@mouseover/js-utils/src\";\nimport NavigationContext from \"./NavigationContext\";\n\nconst useNavigationMenu = (path) => {\n const {menu} = useContext(NavigationContext);\n return useMemo(() => getOnPath(menu, isString(path) ? path.split('/') : path) || [], [menu, path]);\n};\n\nexport default useNavigationMenu;","import queryString from 'query-string'\n\nconst parseQueryString = (string, allowedParams) => {\n const params = queryString.parse(string);\n if (allowedParams) {\n return Object.entries(params).reduce((obj, [key, value]) => {\n if (allowedParams.indexOf(key) >= 0) {\n obj[key] = value;\n }\n return obj;\n }, {})\n }\n return params;\n};\n\nexport default parseQueryString;","import parseQueryString from \"@fik/utils/parseQueryString\";\nimport {useLocation} from 'react-router-dom';\nimport {useMemo} from \"react\";\n\nconst useQueryParams = (allowedParams) => {\n const location = useLocation();\n return useMemo(() => parseQueryString(location.search, allowedParams), [allowedParams, location.search]);\n};\n\nexport default useQueryParams;\n","import {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {useRouteMatch} from 'react-router-dom';\nimport useQueryParams from \"./../useQueryParams\";\n\nconst PageParams = ({children, allowed}) => {\n const routeMatch = useRouteMatch();\n const queryParams = useQueryParams(allowed);\n\n const props = useMemo(() => ({...(routeMatch.params || {}), ...queryParams}), [queryParams, routeMatch]);\n\n if (typeof children === \"function\" ) {\n return children(props);\n } else {\n throw Error('PageParams accept only render function as child!');\n }\n};\n\nPageParams.propTypes = {\n children: PropTypes.func,\n allowed: PropTypes.array\n};\n\nexport default PageParams;","import React from 'react';\nimport logo from '@fik/inspinia/dist/img/eset-logo-67x26.png';\nimport {NavigationItem} from \"@fik/navigation\";\nimport handleClick from \"@fik/utils/handleClick\";\n\nconst Toolbar = ({username, userId, drawerToggleClicked}) => (\n <nav className=\"navbar navbar-fixed-top white-bg\" style={{'marginBottom': 0}}>\n <NavigationItem className=\"navbar-brand\" to=\"homepage\">\n <img title=\"ESET :: Partnerská zóna\"\n alt=\"Logo ESET software\"\n width=\"67\"\n height=\"26\"\n src={logo}/><span>Partnerská zóna</span>\n </NavigationItem>\n\n <div className=\"navbar-header\">\n <button\n className=\"navbar-minimalize minimalize-styl-2 btn btn-primary visible-xs\"\n onClick={handleClick(drawerToggleClicked)}>\n <i className=\"fa fa-bars\"/></button>\n </div>\n\n <ul className=\"nav navbar-top-links navbar-right\">\n <li>\n <NavigationItem className=\"header-profile-name\" to=\"profile:editContact\" params={{id: userId}}>\n <i className=\"fa fa-user\"/><strong className=\"hidden-xs\">{username}</strong>\n </NavigationItem>\n </li>\n <li>\n <NavigationItem to=\"signOut\">\n <i className=\"fa fa-sign-out\"/> <span className=\"hidden-xs\">Odhlásit se</span>\n </NavigationItem>\n </li>\n </ul>\n </nav>\n);\n\nexport default Toolbar;","export const createActionNames = (path) => {\n const prefix = (Array.isArray(path) ? path.join('/') : path) + '/';\n return {\n FETCH_INIT: `${prefix}FETCH_INIT`,\n FETCH_SUCCESS: `${prefix}FETCH_SUCCESS`,\n FETCH_FAILURE: `${prefix}FETCH_FAILURE`,\n FETCH_RESET: `${prefix}FETCH_RESET`,\n }\n};\n\nexport default createActionNames;","import {isString} from \"@mouseover/js-utils\";\n\nexport const stringifyObjectKeyAndValues = (obj) => {\n if (isString(obj)) {\n return obj;\n }\n return Object.entries(obj).sort().reduce(\n (result, [key, value]) => result.concat(key, '_', value, '_'),\n '_'\n );\n};\n\nexport default stringifyObjectKeyAndValues;\n","import {createActionNames} from \"./createActionNames\";\nimport stringifyObjectKeyAndValues from \"@fik/utils/stringifyObjectKeyAndValues\";\nimport {getOnPath, withChangeOnPath} from \"@mouseover/js-utils\";\n\nconst setLastUpdate = (state) => ({\n ...state,\n lastUpdateTime: Date.now()\n});\n\nconst setResult = (state, action, newState) => ({\n ...state,\n ...newState\n});\n\nconst defaultState = {\n isFetching: false,\n isSuccess: false,\n isFailed: false,\n isRefreshing: false,\n lastUpdateTime: null,\n results: null\n};\n\nconst resetResultIfNeeded = (state, reset, initialResultState = null) => {\n if (reset) {\n return {\n ...state,\n results: initialResultState\n }\n } else {\n return state;\n }\n};\n\nconst getPath = (action) => {\n const method = action.method || 'get';\n const key = stringifyObjectKeyAndValues(action.params || {});\n return [method, key];\n};\n\nconst emptyState = {};\n\nexport const responseReducer = (types, resetResult = true, initialResultState = null) => {\n const {FETCH_INIT, FETCH_SUCCESS, FETCH_FAILURE} = types;\n const typesArray = Object.values(types);\n const initialState = {...defaultState, results: initialResultState};\n\n return (state = emptyState, action) => {\n if (typesArray.indexOf(action.type) === -1) {\n return state;\n }\n\n const path = getPath(action);\n const currentState = getOnPath(state, path) || initialState;\n\n switch (action.type) {\n case FETCH_INIT:\n const res = withChangeOnPath(\n state,\n path,\n setResult(\n resetResultIfNeeded(setLastUpdate(currentState, action), !(currentState && currentState.isSuccess) && resetResult, initialResultState),\n action,\n {\n isRefreshing: currentState && currentState.isSuccess,\n isFetching: true,\n isSuccess: false,\n isFailed: false,\n lastUpdateTime: Date.now(),\n }));\n\n return res;\n case FETCH_SUCCESS:\n return withChangeOnPath(\n state,\n path,\n setResult(\n setLastUpdate(currentState, action),\n action,\n {\n isFetching: false,\n isSuccess: true,\n isFailed: false,\n isRefreshing: false,\n lastUpdateTime: Date.now(),\n results: action.payload\n }));\n\n case FETCH_FAILURE:\n return withChangeOnPath(\n state,\n path,\n setResult(\n setLastUpdate(currentState, action),\n action,\n {\n isFetching: false,\n isSuccess: false,\n isFailed: true,\n isRefreshing: false,\n lastUpdateTime: Date.now(),\n results: initialResultState\n }));\n\n default:\n return state;\n }\n }\n};\n\nexport const createReducer = (resource, reducer) => ({[resource]: reducer});\n\nexport const createResponseReducer = (storeName, resource = null, initialResultsState = null, resetResult = true) => {\n const actionNames = createActionNames([storeName, resource]);\n return createReducer(resource, responseReducer(actionNames, resetResult, initialResultsState));\n};","export const createRequestState = (actions, type) => {\n switch (type) {\n case actions.FETCH_INIT:\n return {\n isFetching: true,\n isSuccess: false,\n isFailed: false\n };\n\n case actions.FETCH_SUCCESS:\n return {\n isFetching: false,\n isSuccess: true,\n isFailed: false\n };\n\n case actions.FETCH_FAILURE:\n return {\n isFetching: false,\n isSuccess: false,\n isFailed: true,\n };\n\n case actions.FETCH_RESET:\n return {\n isFetching: false,\n isSuccess: false,\n isFailed: false,\n };\n\n default:\n return {};\n }\n};","const wrapAsyncCallForDispatch = (fce, method) => (actions, shouldCallback) => (...args) => async (dispatch, getState) => {\n if (typeof shouldCallback=== 'function' && !shouldCallback(args, getState)){\n return Promise.resolve();\n }\n\n let params = null;\n\n if (method === 'put' || method === 'post') {\n params = args[0] || null;\n } else {\n params = args.length === 1 && typeof args === 'object' ? args[0] : args;\n }\n\n dispatch({type: actions.FETCH_INIT, params, method});\n let payload;\n try {\n payload = await fce(...args);\n } catch (error) {\n dispatch({type: actions.FETCH_FAILURE, params, method, error: error.response && error.response.data ? error.response.data : error});\n return;\n }\n dispatch({type: actions.FETCH_SUCCESS, payload, params, method});\n};\n\nexport default wrapAsyncCallForDispatch;","import wrapAsyncCallForDispatch from \"@fik/utils/wrapAsyncCallForDispatch\";\nimport {createActionNames} from \"./createActionNames\";\n\nexport const resourceAsyncCallAction = ({storeName, name: resource, subAction}, shouldCallback, method = 'get') => (fce) => {\n return wrapAsyncCallForDispatch(fce, method)(\n createActionNames(subAction ? [storeName, resource, subAction] : [storeName, resource]),\n shouldCallback\n );\n};","import {getOnPath} from \"@mouseover/js-utils/src\";\nimport stringifyObjectKeyAndValues from \"@fik/utils/stringifyObjectKeyAndValues\";\n\nexport const selectApiState = (storeName, resource, params, method = 'get') => selectResourceState(storeName, resource, params, method)((state) => {\n return [\n getLoading(state),\n getLoaded(state),\n getResults(state),\n getLastUpdateTime(state)\n ]\n});\n\nconst defaultState = {isFetching: false, isSuccess: false, isError: false, results: null};\n\nexport const selectSimpleResourceState = (storeName, resource) => (selector) => state => selector(getStoreResourceState(storeName, resource)(state));\n\nexport const selectResourceState = (storeName, resource, params, method = 'get') => (selector) => state => {\n const selectedState = getParamsState(\n params,\n getMethodState(method, getStoreResourceState(storeName, resource, params, method)(state))\n );\n return selector(selectedState || defaultState);\n};\n\nexport const getParamsState = (params, state) => {\n if (params) {\n const key = stringifyObjectKeyAndValues(params || {});\n return state && state[key] ? state[key]: null;\n }\n return state;\n};\n\nexport const getMethodState = (method, state) => {\n return state && state[method] ? state[method]: null;\n};\n\nexport const getStoreResourceState = (storeName, resource) => (state) => getOnPath(state, [storeName, resource]);\n\nexport const getLoading = (state) => {\n return state.isFetching;\n};\n\nexport const getLoaded = (state) => {\n return state.isSuccess;\n};\n\nexport const getFailed = (state) => {\n return state.isFailed;\n};\n\nexport const getResults = (state) => {\n return state.results;\n};\n\nexport const getRefreshing = (state) => {\n return state.isRefreshing;\n};\n\nexport const getLastUpdateTime = (state) => {\n return state.lastUpdateTime;\n};","import {shallowEqual, useSelector} from \"react-redux\";\nimport {selectResourceState, selectSimpleResourceState} from \"./selectors\";\n\nexport const useResourceSelector = ({storeName, name: resource}, callback, deps) => useSelector(\n selectSimpleResourceState(storeName, resource)(callback),\n deps\n);\nexport const useResourceSelectorWithParams = ({storeName, name: resource}, params, callback, method) => useSelector(\n selectResourceState(storeName, resource, params, method)(callback),\n shallowEqual\n);","import React from 'react';\n\nexport const ModelContext = React.createContext(null);","import React from 'react';\nimport {ModelContext} from \"./ModelContext\";\n\nconst ModelProvider = ({model, ...props}) => {\n return <ModelContext.Provider value={model} {...props} />;\n};\n\nexport default ModelProvider;","const promiseWrapper = (promise, ...args) => {\n return promise(...args)\n .then(data => ({isSuccess: true, data: data}))\n .catch(error => ({isSuccess: false, data: error.response && error.response.data ? error.response.data : error}))\n};\n\nexport default promiseWrapper;\n","import {useContext, useMemo} from 'react';\nimport {ModelContext} from \"./ModelContext\";\n\nconst useModel = (callback, deps) => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const callbackMemo = useMemo(() => callback, deps);\n const model = useContext(ModelContext);\n return useMemo(() => callbackMemo(model), [callbackMemo, model]);\n};\n\nexport default useModel;","import {useContext} from \"react\";\nimport {ModelContext} from \"./ModelContext\";\n\nconst useResourceContext = (resource) => {\n const model = useContext(ModelContext);\n return model.resources[resource];\n};\n\nexport default useResourceContext;","import {useCallback, useEffect, useRef, useState} from \"react\";\n\nexport const useReducerWithThunk = (reducer, initialArgs, initialize = (state) => state) => {\n const [state, setState] = useState(initialize(initialArgs));\n\n //- referenced state for getCurrentState\n const stateRef = useRef(state);\n const reducerRef = useRef(reducer);\n\n const getCurrentState = useCallback(() => stateRef.current, [stateRef]);\n const setCurrentState = useCallback((newState) => {\n stateRef.current = newState;\n setState(newState);\n }, [stateRef, setState]);\n\n const getCurrentReducer = useCallback(() => reducerRef.current, [reducerRef]);\n useEffect(() => {\n reducerRef.current = reducer;\n }, [reducer]);\n\n const reduce = useCallback((action) => getCurrentReducer()(getCurrentState(), action), [getCurrentState, getCurrentReducer]);\n\n const dispatch = useCallback((action) => typeof action === 'function'\n ? action(dispatch, getCurrentState)\n : setCurrentState(reduce(action))\n , [getCurrentState, setCurrentState, reduce]);\n\n return [state, dispatch];\n};","import {useCallback, useEffect} from 'react';\nimport {createActionNames, createRequestState} from \"@fik/api\";\nimport wrapAsyncCallForDispatch from \"@fik/utils/wrapAsyncCallForDispatch\";\nimport {useModel} from \"@fik/model\";\nimport {useReducerWithThunk} from \"@fik/utils/useReducerWithThunk\";\n\nconst feedsActions = createActionNames('cmsFiles');\nfeedsActions.SELECT_CATEGORY = 'SELECT_CATEGORY';\n\nconst feedsReducer = (state, action) => {\n switch (action.type) {\n case feedsActions.FETCH_INIT:\n return {\n ...state,\n ...createRequestState(feedsActions, action.type),\n };\n case feedsActions.FETCH_SUCCESS:\n const feedsState = {tags: [], feeds: {}};\n\n const feeds = action.payload.reduce((obj, item) => {\n obj.tags.push(item.tag);\n obj.feeds[item.tag.code] = item.items;\n return obj;\n }, feedsState);\n\n return {\n ...state,\n ...feeds,\n selected: feeds.tags.length > 0 ? 0 : null,\n ...createRequestState(feedsActions, action.type),\n };\n case feedsActions.FETCH_FAILURE:\n return {\n ...state,\n ...createRequestState(feedsActions, action.type),\n };\n\n case feedsActions.SELECT_CATEGORY:\n return {\n ...state,\n selected: action.index\n };\n default:\n return state;\n }\n};\n\nconst useCmsArticlesFeeds = (group) => {\n\n const loadFeeds = useModel(\n (model) => wrapAsyncCallForDispatch(model.cms().getFeeds)(feedsActions),\n []\n );\n\n const [state, dispatch] = useReducerWithThunk(feedsReducer, {\n isFetching: false,\n isSuccess: false,\n isFailed: false,\n tags: null,\n feeds: null,\n selected: null\n }\n );\n\n useEffect(() => {\n dispatch(loadFeeds(group));\n }, [loadFeeds, dispatch, group]);\n\n const selectCategory = useCallback((index) => {\n dispatch({type: feedsActions.SELECT_CATEGORY, index});\n }, [dispatch]);\n\n return {\n categories: state.tags,\n selected: selectCurrentTag(state),\n articles: selectCurrentArticles(state),\n selectCategory\n };\n};\n\nconst hasSelectedTag = (state) => state.selected !== null;\nconst selectCurrentTag = (state) => state.selected !== null ? state.tags[state.selected] : null;\n\nconst selectCurrentArticles = (state) => {\n if (hasSelectedTag(state)) {\n return state.feeds[selectCurrentTag(state).code];\n }\n return null;\n};\n\n\n\nexport default useCmsArticlesFeeds;","import React from 'react';\n\nconst Spinner = () => <div className=\"sk-spinner sk-spinner-three-bounce\" style={{minWidth: '100px', minHeight: '100px'}}>\n <div className=\"sk-bounce1\"/>\n <div className=\"sk-bounce2\"/>\n <div className=\"sk-bounce3\"/>\n</div>;\n\nexport default Spinner","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Spinner from \"./Spinner\";\n\nconst LoadingOverlay = ({className, isLoading, children, ...props}) => <div\n className={\"loading-overlay \" + (className ? ' ' + className : '') + (isLoading ? ' sk-loading' : '')} {...props}>\n {isLoading ? <Spinner/> : null}\n {children}\n</div>;\n\nLoadingOverlay.propTypes = {\n className: PropTypes.string,\n isLoading: PropTypes.bool,\n children: PropTypes.oneOfType([PropTypes.array,PropTypes.object,PropTypes.string])\n};\n\nexport default LoadingOverlay;","import React from 'react';\n\nexport const LoadingContext = React.createContext({});","import {useCallback, useReducer} from \"react\";\n\nconst reducer = (state, action) => {\n const newState = {...state, resources: {...state.resources, [action.resource]: action.state}};\n const fetching = Object.entries(newState.resources).filter(([, item]) => item.isFetching);\n newState.currentlyLoading = fetching.map(([resource]) => resource);\n newState.isLoading = false;\n newState.isRefreshing = false;\n return fetching.reduce((acc, [, item]) => {\n if (item.isFetching && !item.isRefreshing) {\n acc.isLoading = true;\n }\n if (item.isRefreshing) {\n acc.isRefreshing = true;\n }\n\n return acc;\n }, newState);\n};\n\nconst initialState = {\n resources: {},\n isLoading: false,\n isRefreshing: false\n};\n\nconst useLoading = () => {\n const [state, dispatch] = useReducer(reducer, initialState);\n const changeLoadingState = useCallback((resource, state) => {\n dispatch({resource, state});\n }, []);\n\n return {\n isLoading: state.isLoading,\n isRefreshing: state.isRefreshing,\n resources: state.resources,\n changeLoadingState\n }\n};\n\nexport default useLoading;","import React from \"react\";\nimport PropTypes from 'prop-types';\nimport {LoadingContext} from \"./../LoadingContext\";\nimport useLoading from \"./../useLoading\";\n\nconst LoadingProvider = (props) => {\n const loading = useLoading();\n\n if (props.children && typeof props.children === 'function') {\n props = {...props, children: props.children(loading.isLoading)};\n }\n return <LoadingContext.Provider value={loading} {...props}/>;\n};\n\nLoadingProvider.propTypes = {\n children: PropTypes.oneOfType([PropTypes.array, PropTypes.object, PropTypes.func, PropTypes.string])\n};\n\nexport default LoadingProvider;\n","import {useContext} from \"react\";\nimport {LoadingContext} from \"./LoadingContext\";\n\nconst useLoadingContext = () => useContext(LoadingContext);\n\nexport default useLoadingContext;","import React from \"react\";\nimport useLoadingContext from \"./../useLoadingContext\";\nimport LoadingOverlay from \"./LoadingOverlay\";\n\nconst LoadingSpinnerOverlay = (props) => {\n const {isLoading} = useLoadingContext();\n return <LoadingOverlay isLoading={isLoading} {...props} />\n};\n\nexport default LoadingSpinnerOverlay;","import {useEffect} from \"react\";\nimport useLoadingContext from \"./useLoadingContext\";\n\nconst useHookToLoading = (resource,loadingState) => {\n\n const {\n isFetching,\n isSuccess,\n isFailed,\n isRefreshing\n }= loadingState;\n\n const {changeLoadingState} = useLoadingContext();\n\n useEffect(() => {\n if (changeLoadingState) {\n changeLoadingState(resource, {isFetching, isSuccess, isFailed, isRefreshing});\n }\n return () => changeLoadingState && changeLoadingState(resource, {isFetching: false, isSuccess: false, isFailed: false, isRefreshing: false})\n }, [isFetching, isSuccess, isFailed, isRefreshing, changeLoadingState, resource]);\n};\n\nexport default useHookToLoading;","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst LoadingInfo = ({show, children, ...props}) => show ? <div {...props}>{children}</div> : null;\n\nLoadingInfo.propTypes = {\n className: PropTypes.string,\n show: PropTypes.bool,\n children: PropTypes.oneOfType([PropTypes.array,PropTypes.object,PropTypes.string])\n};\n\nexport default LoadingInfo;","import React from \"react\";\n\nconst SpinnerCircle = ({className}) => (<div className={\"sk-spinner sk-spinner-circle\" + (className ? ' ' + className : '')}>\n <div className=\"sk-circle1 sk-circle\"></div>\n <div className=\"sk-circle2 sk-circle\"></div>\n <div className=\"sk-circle3 sk-circle\"></div>\n <div className=\"sk-circle4 sk-circle\"></div>\n <div className=\"sk-circle5 sk-circle\"></div>\n <div className=\"sk-circle6 sk-circle\"></div>\n <div className=\"sk-circle7 sk-circle\"></div>\n <div className=\"sk-circle8 sk-circle\"></div>\n <div className=\"sk-circle9 sk-circle\"></div>\n <div className=\"sk-circle10 sk-circle\"></div>\n <div className=\"sk-circle11 sk-circle\"></div>\n <div className=\"sk-circle12 sk-circle\"></div>\n</div>);\n\nexport default SpinnerCircle;","import React from 'react';\nimport {LoadingOverlay} from \"@fik/loading\";\nimport PropTypes from 'prop-types';\n\nconst Box = (props) => {\n let header = null;\n if (props.title || props.tools) {\n let tools = null;\n if (props.tools) {\n tools = <div className=\"ibox-tools\">{typeof props.tools === 'function' ? props.tools() : props.tools}</div>\n }\n header = <div className=\"ibox-title border-bottom\"><h5>{props.title}</h5>{tools}</div>;\n }\n const options = props.options || {};\n return (\n <div className={\"ibox\" + (props.className ? ' ' + props.className : '')} {...options}>\n {header}\n {props.children && <LoadingOverlay className={\"ibox-content\" + (props.contentClassName ? ' ' + props.contentClassName : '')}\n isLoading={props.isLoading}>\n {props.children}<div className=\"clearfix\" />\n </LoadingOverlay>}\n </div>\n );\n};\n\nBox.propTypes = {\n title: PropTypes.string,\n className: PropTypes.string,\n children: PropTypes.oneOfType([PropTypes.array, PropTypes.object, PropTypes.string, PropTypes.func]),\n contentClassName: PropTypes.string,\n isLoading: PropTypes.bool,\n tools: PropTypes.oneOfType([PropTypes.array, PropTypes.object, PropTypes.string, PropTypes.func]),\n options: PropTypes.object\n};\n\nexport default Box;","import React from 'react';\nimport PropTypes from \"prop-types\";\n\nconst Button = (props) => {\n const classNames = ['btn-' + props.btnType, 'btn'];\n if (props.className) {\n classNames.push(props.className);\n }\n return <button\n disabled={props.disabled}\n className={classNames.join(' ')}\n onClick={props.clicked || props.onClick}\n >{props.children}</button>;\n};\n\nButton.propTypes = {\n className: PropTypes.string,\n btnType: PropTypes.string.isRequired,\n clicked: PropTypes.func\n};\n\nexport default Button;","import React from 'react';\nimport moment from \"moment\";\n\nconst DateTime = ({date, format = 'DD. MM. YYYY HH:mm'}) => {\n\n if (date instanceof Object && date.date) {\n date = date.date;\n }\n\n return (\n <>\n {date ? moment(date).format(format) : '-'}\n </>\n );\n};\n\nexport default DateTime;","import React from 'react';\nimport DateTime from \"./DateTime\";\n\nconst Date = (props) => <DateTime {...props} format='DD. MM. YYYY' /> ;\n\nexport default Date;","import React, {useContext} from 'react';\nimport PropTypes from \"prop-types\";\nimport {ModelContext} from \"@fik/model\";\n\nconst DownloadLink = ({resource, params, children, ...props}) => {\n const {createDownloadLink} = useContext(ModelContext);\n return (\n <a href={createDownloadLink(resource, params)} target='_blank' rel='noopener noreferrer'\n {...props}\n >{children}</a>\n );\n};\n\nDownloadLink.propTypes = {\n resource: PropTypes.string.isRequired,\n params: PropTypes.object,\n children: PropTypes.oneOfType([PropTypes.array, PropTypes.object, PropTypes.func, PropTypes.string])\n};\n\n\nexport default DownloadLink;\n","import React from 'react';\n\nconst Email = ({email}) => {\n return (<>{email || '--'}</>);\n};\n\nexport default Email;","import React from 'react';\n\nconst EnumValue = (props) => {\n if (!props.enum) {\n return (<>{props.value || '--'}</>);\n }\n\n return (<>{(props.enum[props.value] || props.value) || '--'}</>);\n};\n\nexport default EnumValue;","import React from 'react';\n\nconst ErrorSeverityMessage = ({message}) => <div className={\"p-w-xs m-xs alert alert-\"+(message.severity || \"info\")}>\n <p>\n {message.text}\n </p>\n</div>;\n\nconst ErrorTypeMessage = ({message}) => <div className={\"p-w-xs m-xs alert alert-\"+(message.type || \"info\")}>\n <p>\n {message.message}\n </p>\n</div>;\n\nconst Errors = ({messages, className}) => {\n return <div className={className}>{messages.map((message, index) => (message.text ? <ErrorSeverityMessage key={index} message={message}/> : <ErrorTypeMessage key={index} message={message}/>))}</div>;\n};\n\nexport default Errors;","import React, {useCallback} from 'react';\nimport PropTypes from \"prop-types\";\n\nimport {Form} from \"@mouseover/react-form\";\n\nconst EMPTY_RULES = {};\n\nconst FilterBar = ({onSubmitSearch, onChange, controls, render, button = true, values}) => {\n\n const handleFormSubmit = useCallback((values, valid) => {\n if (onSubmitSearch && valid) {\n onSubmitSearch(values, valid);\n }\n }, [onSubmitSearch]);\n\n return (\n <Form\n values={values}\n validationRules={EMPTY_RULES}\n className=\"row no-padding m-l-n-sm m-r-n-sm\"\n onSubmit={handleFormSubmit}\n onChange={onChange}\n defaultGroupClass='form-group col-sm-3'\n controls={controls}\n render={render}>\n\n {button\n ? <div className=\"col-sm-3\">\n <button type=\"submit\" className=\"btn btn-primary block full-width m-b\">Filtrovat</button>\n </div>\n : null}\n </Form>\n );\n};\n\nFilterBar.propTypes = {\n onSubmitSearch: PropTypes.func,\n onChange: PropTypes.func,\n controls: PropTypes.object,\n render: PropTypes.func,\n};\n\n\nexport default FilterBar;","import React from 'react';\nimport {isEmpty} from \"@mouseover/js-utils\";\n\nconst Number = (props) => {\n let {number, decimalLength = 2, wholePartLength:whole_part_length = 3, sectionsDelimiter:sections_delimiter = ' ', decimalDelimiter:decimal_delimiter = ','} = props;\n\n if (isEmpty(number)) {\n return null;\n }\n\n let re = '\\\\d(?=(\\\\d{' + (whole_part_length || 3) + '})+' + (decimalLength > 0 ? '\\\\D' : '$') + ')';\n let numStr = number.toFixed(Math.max(0, ~~decimalLength));\n return <React.Fragment>{(decimal_delimiter ? numStr.replace('.', decimal_delimiter) : numStr).replace(new RegExp(re, 'g'), '$&' + (sections_delimiter || ' '))}</React.Fragment>;\n};\n\n\nexport default Number;","import React, {Component, useCallback, useMemo} from 'react';\nimport handleClick from \"@fik/utils/handleClick\";\n\n\nconst rangexy = (start, end) => Array.from({length: (end - start)}, (v, k) => k + start);\n\nconst usePaginator = ({page, count, limit}) => useMemo(() => {\n const pagination = {\n page,\n pageCount: !count ? null : Math.ceil(count / limit),\n pages: null,\n lastPage: null,\n firstPage: 1,\n itemPerPage: limit,\n };\n\n pagination.lastPage = !count ? null : 1 + Math.max(0, pagination.pageCount - 1);\n pagination.pages = rangexy(Math.max(1, page - 3), Math.min(pagination.lastPage, page + 3));\n\n let btnsCount = 4;\n let q = (pagination.pageCount - 1) / btnsCount;\n for (let i = 1; i < btnsCount; i++) {\n pagination.pages.push(Math.round(q * i) + pagination.firstPage);\n }\n\n pagination.pages.sort((a, b) => (a - b));\n pagination.pages = [...new Set(pagination.pages)];\n\n return pagination;\n}, [page, count, limit]);\n\nconst Paginator = ({onPageChange, ...props}) => {\n const paginator = usePaginator(props);\n const setPage = useCallback((page) => {\n if (onPageChange) {\n onPageChange(page);\n }\n }, [onPageChange]);\n\n if (paginator.pageCount <= 1) {\n return null;\n }\n\n return <ul className=\"pagination\">\n <li className={paginator.page === paginator.firstPage ? \"disabled\" : null}>\n <a onClick={handleClick(() => setPage(paginator.firstPage))}>«</a>\n </li>\n\n <li className={\"footable-page-arrow\" + ( paginator.page === paginator.firstPage ? \" disabled\" : null)}><a onClick={handleClick(() => setPage(paginator.page - 1))}>‹</a></li>\n\n {paginator.pages.map((page) => (\n <li key={page} className={page === paginator.page ? \"active\" : null}>\n <a onClick={handleClick(() => setPage(page))}>{page}</a>\n </li>\n ))}\n\n <li className={\"footable-page-arrow\" + (paginator.page === paginator.lastPage ? \" disabled\" : null)}><a onClick={handleClick(() => setPage(paginator.page + 1))}>›</a></li>\n\n <li className={paginator.page === paginator.lastPage ? \"disabled\" : null}>\n <a onClick={handleClick(() => setPage(paginator.lastPage))}>»</a>\n </li>\n </ul>\n}\n\nexport default Paginator;","import React from 'react';\n\nconst Phone = (props) => {\n return (<>{props.phone || '--'}</>);\n};\n\nexport default Phone;","\nconst WithoutCode = ({children}) => children ? children.replace('code:', '') : null;\n\nexport default WithoutCode;","import React from 'react';\nimport Number from \"../Number/Number\";\nimport WithoutCode from \"../WithoutCode/WithoutCode\";\nimport {isEmpty} from \"@mouseover/js-utils\";\n\nconst Price = ({price, currency, ...props}) => {\n if (isEmpty(price)) {\n return (<>-</>);\n }\n return (\n <>\n <Number number={price} {...props} /> {currency && <WithoutCode>{currency}</WithoutCode>}\n </>\n )\n};\n\nexport default Price;","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst Address = ({street, zipCode, city}) => {\n if (!street && !zipCode && !city) {\n return null;\n }\n\n return (<>\n {street ? (<><span>{street}</span><br /></>): null}\n {zipCode ? <span>{zipCode}</span> : null} {city ? <span>{city}</span>: null}{zipCode || city ? <br /> : null}\n </>);\n};\n\nAddress.propTypes = {\n street: PropTypes.string,\n zipCode: PropTypes.string,\n city: PropTypes.string\n};\nexport default Address;","import formatBytes from \"@fik/utils/formatBytes\";\n\nconst FileSize = ({children, decimals=2}) => formatBytes(children, decimals);\n\nexport default FileSize;","export default function formatBytes(bytes, decimals = 2) {\n if (bytes === 0) return '0 Bytes';\n\n const k = 1024;\n const dm = decimals < 0 ? 0 : decimals;\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\n}\n\n","import React from \"react\";\nimport ReactDOM from 'react-dom';\nimport handleClick from \"@fik/utils/handleClick\";\n\nconst Modal = ({visible, hide, children, renderHeader, renderFooter, bodyClassName, dialogClassName, ...props}) => {\n return visible ? ReactDOM.createPortal(<>\n <div className='modal in visible-modal' tabIndex=\"-1\" role=\"dialog\" aria-hidden=\"true\">\n <div className={'modal-dialog'+(dialogClassName ? ' ' + dialogClassName : '') + ' modal-dialog-scrollable'} role=\"document\">\n <div className='modal-content'>\n {renderHeader ? <div className='modal-header'>{renderHeader()}</div> : null}\n <div className={'modal-body'+(bodyClassName ? ' ' + bodyClassName : '')}>{children}</div>\n {renderFooter ? <div className='modal-footer'>{renderFooter()}</div> : null}\n </div>\n </div>\n </div>\n {hide ? <div className=\"modal-backdrop in\" onClick={handleClick(hide)}/> : null}\n </>, document.body) : null;\n};\n\nexport default Modal;","import {useCallback, useMemo, useState} from 'react';\n\nconst useModal = (id) => {\n const [visible, setIsVisible] = useState(false);\n\n const toggle = useCallback(() => {\n setIsVisible(visible => !visible);\n }, [setIsVisible]);\n\n const show = useCallback(() => {\n setIsVisible(true);\n }, [setIsVisible]);\n\n const hide = useCallback(() => {\n setIsVisible(false);\n }, [setIsVisible]);\n\n return useMemo(() => ({\n visible,\n toggle,\n show,\n hide\n }), [visible, toggle, show, hide]);\n};\n\nexport default useModal;","import {useEffect, useRef} from 'react'\n// Hook https://usehooks.com/useEventListener/\n// https://github.com/donavon/use-event-listener\nfunction useEventListener(eventName, handler, element = window){\n // Create a ref that stores handler\n const savedHandler = useRef();\n\n // Update ref.current value if handler changes.\n // This allows our effect below to always get latest handler ...\n // ... without us needing to pass it in effect deps array ...\n // ... and potentially cause effect to re-run every render.\n useEffect(() => {\n savedHandler.current = handler;\n }, [handler]);\n\n useEffect(\n () => {\n // Make sure element supports addEventListener\n // On\n const isSupported = element && element.addEventListener;\n if (!isSupported) return;\n\n // Create event listener that calls handler function stored in ref\n const eventListener = event => savedHandler.current(event);\n\n // Add event listener\n element.addEventListener(eventName, eventListener, {passive: true});\n\n // Remove event listener on cleanup\n return () => {\n element.removeEventListener(eventName, eventListener);\n };\n },\n [eventName, element] // Re-run if eventName or element changes\n );\n}\n\nexport default useEventListener;","import {useCallback, useEffect, useRef, useState} from \"react\";\nimport {getOnPath} from \"@mouseover/js-utils\";\nimport useEventListener from \"@fik/utils/useEventListener\";\n\nconst useDropdown = () => {\n const element = useRef(null);\n const [isOpen, setIsOpen] = useState(false);\n\n const toggle = useCallback(() => {\n setIsOpen(!isOpen);\n }, [isOpen, setIsOpen]);\n\n useEffect(() => {\n if (element.current) {\n const classList = getOnPath(element, ['current', 'parentElement', 'classList']);\n if (classList) {\n classList.add('dropdown');\n if (isOpen) {\n classList.add('open');\n } else {\n classList.remove('open');\n }\n }\n }\n }, [isOpen, element]);\n\n const handleMouseDown = useCallback((event) => {\n if (getOnPath(event, ['target', 'parentElement', 'parentElement']) !== element.current) {\n setIsOpen(false);\n }\n return true;\n }, [setIsOpen, element]);\n\n useEventListener('mouseup', handleMouseDown, document);\n\n return {\n element,\n setIsOpen,\n isOpen,\n toggle\n }\n}\n\nexport default useDropdown;","import React from 'react';\n\nconst DisabledOverlay = ({on, children, className}) => <div className={'disabled-overlay' + (on ? ' on' : '') + (className ? ' ' + className : '')}>{children}</div>;\n\nexport default DisabledOverlay;","import React from \"react\";\n\nconst Row = ({className, ...props}) => <div className={'row' + (className ? ' ' + className : '')} {...props} />;\n\nexport default Row;","import React from \"react\";\n\nconst DEVICE_SIZES = ['lg', 'md', 'sm', 'xs'];\nconst VARIANTS = ['', 'offset', 'push', 'pull'];\n\nconst popProperty = (property, properties) => {\n if (properties.hasOwnProperty(property)) {\n const newProperties = {...properties};\n delete newProperties[property];\n return [newProperties, properties[property]];\n }\n return [properties, undefined];\n}\nconst convertSizeToStyle = (props) => {\n const classNames = [];\n DEVICE_SIZES.forEach((size) => {\n VARIANTS.forEach((variant) => {\n const [newProps, value] = popProperty(size + (variant ? variant.charAt(0).toUpperCase() + variant.slice(1) : ''), props);\n if (value !== undefined) {\n classNames.push('col-' + size + (variant ? '-' + variant : '') + '-' + value);\n props = newProps;\n }\n })\n })\n return [props, classNames];\n};\nconst Col = ({className, ...props}) => {\n const [newProps, classNames] = convertSizeToStyle(props);\n return <div className={classNames.join(' ') + (className ? ' ' + className : '')} {...newProps} />;\n}\n\nexport default Col;","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport {NavigationItem} from \"@fik/navigation\";\nimport {DateTime} from \"@fik/ui\";\n\nconst ArticlesList = ({articles}) => {\n return articles.map(({id, author, title, short, date, isExternalLink, link}) => <div key={'article_' + id} className=\"chat-element\">\n <div className=\"media-body\">\n <small className=\"pull-right text-navy feed-author\">{author}</small>\n {isExternalLink ? <a href={link} target=\"_blank\" rel=\"noopener noreferrer\">\n <strong>{title}</strong>\n </a> : <NavigationItem to=\"article:detail\" params={{id}}><strong>{title}</strong></NavigationItem>}\n\n <p className=\"m-b-xs\">{short ? short.replace(/(<([^>]+)>)/ig).replace(/\\ /g, '') : ''}</p>\n <small className=\"text-muted\"><DateTime date={date}/></small>\n <hr/>\n </div>\n </div>)\n};\n\nArticlesList.propTypes = {\n articles: PropTypes.array\n};\n\nexport default ArticlesList;\n","import React, {useCallback, useState} from \"react\";\nimport PropTypes from 'prop-types';\nimport useCmsArticlesFeeds from \"./../useCmsArticlesFeeds\";\nimport ArticlesList from \"./ArticlesList\";\nimport handleClick from \"@fik/utils/handleClick\";\n\n\nconst ArticlesFeed = ({group, limit = 5}) => {\n const {articles, categories, selectCategory, selected} = useCmsArticlesFeeds(group);\n const [page, setPage] = useState(1);\n\n const handelClickOnCategory = useCallback((index) => {\n selectCategory(index);\n setPage(1);\n }, [selectCategory]);\n\n const offset = limit * (page - 1);\n\n const handlePrevPage = useCallback(() => {\n if (page > 1) {\n setPage(page - 1);\n }\n }, [page]);\n\n const handleNextPage = useCallback(() => {\n if (page <= articles.length/limit - 1) {\n setPage(page + 1);\n }\n }, [articles, limit, page]);\n\n if (!categories) {\n return null;\n }\n\n return <div className=\"panel blank-panel\">\n <div className=\"ibox-content\">\n <div className=\"panel-heading\">\n <div className=\"panel-options\">\n <ul className=\"nav nav-tabs\" data-bind=\"foreach: feeds\">\n {categories.map((item, index) => <li key={item.code} className={item.code === selected.code ? 'active' : null}>\n <a onClick={handleClick(() => handelClickOnCategory(index))}>{item.label}</a>\n </li>)}\n </ul>\n </div>\n </div>\n <div className=\"panel-body\">\n <div className=\"tab-content\">\n {articles ? <ArticlesList articles={articles.slice(offset, offset + limit)}/> : null}\n {articles ? <div className=\"btn-group\">\n <button className=\"btn btn-info btn-xs\"\n disabled={page <= 1}\n onClick={handleClick(handlePrevPage)}\n >Novější</button>\n <button className=\"btn btn-info btn-xs\"\n disabled={page > articles.length/limit - 1}\n onClick={handleClick(handleNextPage)}\n >Starší</button>\n </div> : null}\n </div>\n </div>\n </div>\n </div>;\n};\n\nArticlesFeed.propTypes = {\n group: PropTypes.number,\n limit: PropTypes.number\n};\n\nexport default ArticlesFeed;","import {useEffect} from 'react';\nimport {createActionNames, createRequestState} from \"@fik/api\";\nimport wrapAsyncCallForDispatch from \"@fik/utils/wrapAsyncCallForDispatch\";\nimport {useModel} from \"@fik/model\";\nimport {useReducerWithThunk} from \"@fik/utils/useReducerWithThunk\";\n\nconst filesActions = createActionNames('cmsFiles');\n\nconst filesReducer = (state, action) => {\n switch (action.type) {\n case filesActions.FETCH_INIT:\n return {\n ...state,\n ...createRequestState(filesActions, action.type),\n };\n case filesActions.FETCH_SUCCESS:\n\n return {\n ...state,\n filesTree: action.payload,\n ...createRequestState(filesActions, action.type),\n };\n case filesActions.FETCH_FAILURE:\n return {\n ...state,\n ...createRequestState(filesActions, action.type),\n };\n default:\n return state;\n }\n};\n\nconst useCmsFiles = () => {\n\n const loadCmsFiles = useModel(\n (model) => wrapAsyncCallForDispatch(model.cms().getFiles)(filesActions),\n []\n );\n\n const [state, dispatch] = useReducerWithThunk(filesReducer, {\n isFetching: false,\n isSuccess: false,\n isFailed: false,\n filesTree: null\n }\n );\n\n useEffect(() => {\n dispatch(loadCmsFiles());\n }, [loadCmsFiles, dispatch]);\n\n return state;\n};\n\nexport default useCmsFiles;","import React from \"react\";\n\nconst FileManagerContext = React.createContext(null);\n\nexport default FileManagerContext;","import React, {useContext, useEffect, useMemo} from \"react\";\nimport FileManagerContext from \"./FileManagerContext\";\n\nconst FileDownloadLink = ({path, children, ...props}) => {\n const fileManagerContext = useContext(FileManagerContext);\n const filePath = useMemo(() => {\n return fileManagerContext ? fileManagerContext.createPath(path) : `/files/download/${path}`;\n }, [fileManagerContext, path]);\n return <a {...props} href={filePath}>{children}</a>;\n}\n\nexport default FileDownloadLink;","import React from 'react';\nimport FileDownloadLink from \"./FileDownload\";\n\nconst FileBox = ({file, folder}) => {\n const {icon, title, date} = file;\n\n return <div className=\"file-box\">\n <div className=\"file\">\n <FileDownloadLink path={folder.path +file.file}>\n <span className=\"corner\"/>\n <div className=\"icon\">\n <i className={\"fa \" + icon} />\n </div>\n <div className=\"file-name\">\n {title}\n <br/>\n <small>{date}</small>\n </div>\n </FileDownloadLink>\n </div>\n </div>;\n};\n\nexport default FileBox;","import React, {useState} from 'react';\nimport handleClick from \"@fik/utils/handleClick\";\nimport FileBox from \"./FileBox\";\nimport PropTypes from 'prop-types';\n\nconst FileManager = ({filesTree}) => {\n const [currentFolder, setCurrentFolder] = useState(filesTree.length > 0 ? filesTree[0] : 0);\n return <div className=\"row\">\n <div className=\"col-lg-3\">\n <div className=\"file-manager\">\n <ul className=\"folder-list\" style={{padding: 0}}>\n {filesTree.map((folder) => <li key={folder.name}\n className={(currentFolder && folder.name === currentFolder.name ? \"active\" : \"\")}>\n <a href={\"#\" + folder.name} onClick={handleClick(() => setCurrentFolder(folder))}><i\n className=\"fa fa-folder\"/> {folder.title}</a>\n </li>\n )}\n </ul>\n <div className=\"clearfix\"/>\n </div>\n </div>\n <div className=\"col-lg-9\">\n <div className=\"row\">\n <div className=\"col-lg-12\">\n {currentFolder ? currentFolder.files.map((file) => <FileBox key={file.file} file={file} folder={currentFolder} />) : null}\n </div>\n </div>\n </div>\n </div>\n};\n\nFileManager.propTypes = {\n filesTree: PropTypes.array.isRequired\n};\n\nexport default FileManager;","import React from 'react';\nimport useCmsFiles from \"./../useCmsFiles\";\nimport {FileManager} from \"@fik/file-manager\";\n\nconst Downloads = () => {\n const {filesTree, isSuccess} = useCmsFiles();\n\n if (!isSuccess) {\n return null;\n }\n\n return <FileManager filesTree={filesTree} />\n};\n\nexport default Downloads;","import {useEffect} from 'react';\nimport {createActionNames, createRequestState} from \"@fik/api\";\nimport wrapAsyncCallForDispatch from \"@fik/utils/wrapAsyncCallForDispatch\";\nimport {useModel} from \"@fik/model\";\nimport {useReducerWithThunk} from \"@fik/utils/useReducerWithThunk\";\n\nconst pageActions = createActionNames('cmsMenu');\n\nconst pageReducer = (state, action) => {\n switch (action.type) {\n case pageActions.FETCH_INIT:\n return {\n ...state,\n result: null,\n ...createRequestState(pageActions, action.type),\n };\n case pageActions.FETCH_SUCCESS:\n return {\n ...state,\n result: action.payload,\n ...createRequestState(pageActions, action.type),\n };\n case pageActions.FETCH_FAILURE:\n return {\n ...state,\n result: null,\n ...createRequestState(pageActions, action.type),\n };\n default:\n return state;\n }\n};\n\nconst useCmsPage = (category, page) => {\n const loadPage = useModel(\n (model) => wrapAsyncCallForDispatch(model.cms().getPage)(pageActions),\n []\n );\n\n const [state, dispatch] = useReducerWithThunk(pageReducer, {\n isFetching: false,\n isSuccess: false,\n isFailed: false,\n result: null\n }\n );\n\n useEffect(() => {\n dispatch(loadPage(category, page));\n }, [loadPage, dispatch, category, page]);\n\n return state;\n};\n\nexport default useCmsPage;","import React from 'react';\n\nconst PageContext = React.createContext(null);\n\nexport default PageContext;","import {useContext} from \"react\";\nimport PageContext from \"./PageContext\";\n\nconst usePageContext = () => {\n return useContext(PageContext);\n};\n\nexport default usePageContext;","import usePageContext from \"./usePageContext\";\n\nconst usePageBlock = (name) => {\n const {blocks} = usePageContext();\n return blocks && blocks.result && blocks.result[name] ? blocks.result[name] : null;\n};\n\nexport default usePageBlock;","import React from \"react\";\nimport PropTypes from 'prop-types';\nimport usePageBlock from \"./../usePageBlocks\";\nimport {TextPage} from \"@fik/cms\";\n\nconst PageBlock = ({name, container:Container = React.Fragment}) => {\n const block = usePageBlock(name);\n return block ? <Container><TextPage html={block} /></Container> : null;\n};\n\nPageBlock.propTypes = {\n name: PropTypes.string.isRequired,\n container: PropTypes.func\n};\n\nexport default PageBlock;","import React, {useEffect} from 'react';\nimport PropTypes from 'prop-types';\nimport {Route, useLocation} from 'react-router-dom';\nimport {useSetPageLocation} from \"../index\";\n\nconst PageRoute = ({title, section, blocks, ...props}) => {\n const setPageLocation = useSetPageLocation();\n const location = useLocation();\n useEffect(() => {\n setPageLocation({title, section, blocks, path: location.pathname});\n }, [title, section, setPageLocation, location.pathname, blocks]);\n\n return <Route {...props}/>\n};\n\nPageRoute.propTypes = {\n title: PropTypes.string,\n section: PropTypes.string,\n blocks: PropTypes.array\n};\n\nexport default PageRoute;","import {useCallback, useReducer} from \"react\";\nimport {useNavigation} from \"@fik/navigation\";\n\nconst PAGE_ACTIONS = {\n CHANGE_LOCATION: 'CHANGE_LOCATION',\n SET_INFO: 'CHANGE_INFO',\n};\n\nconst reducer = (state, action) => {\n switch (action.type) {\n case PAGE_ACTIONS.CHANGE_LOCATION:\n return {\n ...defaultState,\n ...action.payload\n }\n case PAGE_ACTIONS.SET_INFO:\n return {\n ...state,\n ...action.payload\n }\n default:\n return state;\n }\n}\nconst defaultState = {\n title: null,\n section: null,\n path: null\n}\nconst usePage = () => {\n const [state, dispatch] = useReducer(reducer, defaultState);\n const {getByUrlPath} = useNavigation();\n const handleChangePage = useCallback((current) => {\n\n if (current.path) {\n const def = getByUrlPath(current.path);\n dispatch({type: PAGE_ACTIONS.CHANGE_LOCATION, payload: def || current});\n } else {\n dispatch({type: PAGE_ACTIONS.SET_INFO, payload: current});\n }\n\n }, [dispatch, getByUrlPath]);\n\n const setInfo = useCallback((info) => {\n dispatch({type: PAGE_ACTIONS.SET_INFO, payload: info});\n }, [dispatch]);\n\n return {\n page: state,\n setPageLocation: handleChangePage,\n setPageInfo: setInfo\n }\n};\n\nexport default usePage;","import usePageContext from \"./usePageContext\";\n\nconst useSetPageInfo = () => {\n const pageContext = usePageContext();\n return pageContext ? pageContext.setPageInfo : null;\n};\n\nexport default useSetPageInfo;","import usePageContext from \"./usePageContext\";\n\nconst useSetPageLocation = () => {\n const pageContext = usePageContext();\n return pageContext ? pageContext.setPageLocation : null;\n};\n\nexport default useSetPageLocation;","import usePageContext from \"./usePageContext\";\n\nconst usePageInfo = () => {\n const pageContext = usePageContext();\n return pageContext.page;\n};\n\nexport default usePageInfo;\n","import {useHistory} from \"react-router-dom\";\nimport {useCallback} from \"react\";\n\nconst useNavigate = () => {\n const history = useHistory();\n return useCallback((to) => {\n history.push(to);\n }, [history]);\n};\n\nexport default useNavigate;","import React from \"react\";\n\nconst CmsNavigationContext = React.createContext(null);\n\nexport default CmsNavigationContext;","import {useCallback, useContext, useEffect, useRef} from \"react\";\nimport {useNavigate} from \"@fik/page\";\nimport CmsNavigationContext from \"./CmsNavigationContext\";\n\nconst useCmsNavigationRef = ({onContentChange}) => {\n const ref = useRef(null);\n\n const navigate = useNavigate();\n const cmsNavigationContext = useContext(CmsNavigationContext);\n\n const handleClick = useCallback((event) => {\n const href = event.target.getAttribute('href');\n if (cmsNavigationContext && cmsNavigationContext.onNavigationClick) {\n cmsNavigationContext.onNavigationClick(event);\n } else if (href && !href.startsWith('http') && !href.startsWith('/files') && !href.startsWith('/lms')) {\n event.preventDefault();\n navigate(href);\n }\n }, [navigate]);\n\n useEffect(() => {\n const current = ref.current;\n if (current) {\n current.querySelectorAll('a').forEach(a => {\n a.addEventListener('click', handleClick);\n });\n\n if (onContentChange) {\n onContentChange(current);\n }\n }\n return () => {\n if (current) {\n current.querySelectorAll('a').forEach(a => {\n a.removeEventListener('click', handleClick);\n });\n }\n }\n }, [handleClick, onContentChange]);\n\n return ref;\n};\n\nexport default useCmsNavigationRef;","import React from 'react';\nimport PropTypes from 'prop-types';\n\n// aby slo pouzit bootstrap tabs\nimport $ from 'jquery';\nimport useCmsNavigationRef from \"../useCmsNavigationRef\";\n\n\nconst TextPage = ({html}) => {\n\n const content = useCmsNavigationRef({onContentChange: init});\n\n if (html) {\n return <div ref={content} dangerouslySetInnerHTML={{__html: html}} />\n }\n return null;\n};\n\nTextPage.propTypes = {\n html: PropTypes.string\n};\n\nexport default TextPage;\n\n\nconst tabClickHandler = function (e) {\n e.preventDefault();\n $(this).tab('show');\n};\n\nconst init = function (contentElement) {\n if (!window.jQuery) {\n window.jQuery = $;\n window.$ = $;\n require('bootstrap');\n }\n\n // Collapse ibox function\n $(contentElement).find('.collapse-link').click(function () {\n const ibox = $(this).closest('div.ibox');\n const button = $(this).find('i');\n const content = ibox.find('div.ibox-content');\n content.slideToggle(200);\n button.toggleClass('fa-chevron-up').toggleClass('fa-chevron-down');\n ibox.toggleClass('').toggleClass('border-bottom');\n setTimeout(function () {\n ibox.resize();\n ibox.find('[id^=map-]').resize();\n }, 50);\n });\n\n // tabs\n $(contentElement)\n .on('click.bs.tab.data-api', '[data-toggle=\"tab\"]', tabClickHandler)\n .on('click.bs.tab.data-api', '[data-toggle=\"pill\"]', tabClickHandler);\n\n\n // youtube\n const youtube = contentElement.querySelectorAll(\".youtube\");\n\n for (let i = 0; i < youtube.length; i++) {\n\n const source = \"https://img.youtube.com/vi/\"+ youtube[i].dataset.embed +\"/sddefault.jpg\";\n\n const image = new Image();\n image.src = source;\n image.addEventListener( \"load\", function() {\n youtube[ i ].appendChild( image );\n }( i ) );\n\n youtube[i].addEventListener( \"click\", function() {\n\n const iframe = document.createElement( \"iframe\" );\n\n iframe.setAttribute( \"frameborder\", \"0\" );\n iframe.setAttribute( \"allowfullscreen\", \"\" );\n iframe.setAttribute( \"src\", \"https://www.youtube.com/embed/\"+ this.dataset.embed +\"?rel=0&showinfo=0&autoplay=1\" );\n\n this.innerHTML = \"\";\n this.appendChild( iframe );\n } );\n }\n};\n","import React, {useEffect} from 'react';\nimport useCmsPage from \"./../useCmsPage\";\nimport TextPage from \"./TextPage\";\n\nconst Page = ({category, page, setPageInfo, createContents = null}) => {\n const {result, isSuccess} = useCmsPage(category, page);\n useEffect(() => {\n if (result && result.title) {\n setPageInfo({title: result.title, section: result.section});\n }\n }, [isSuccess, result, setPageInfo]);\n\n if (!isSuccess) {\n return null;\n }\n\n const contents = [];\n\n if (result.page) {\n contents.push(<TextPage key=\"page\" html={result.page}/>);\n }\n\n if (createContents) {\n const createdContents = createContents(result);\n if (createdContents) {\n contents.push(...createdContents);\n }\n }\n\n return contents;\n};\n\nexport default Page;","import {useEffect} from 'react';\nimport {createActionNames, createRequestState} from \"@fik/api\";\nimport wrapAsyncCallForDispatch from \"@fik/utils/wrapAsyncCallForDispatch\";\nimport {useModel} from \"@fik/model\";\nimport {useReducerWithThunk} from \"@fik/utils/useReducerWithThunk\";\n\nconst articleActions = createActionNames('cmsMenu');\n\n\nconst pageReducer = (state, action) => {\n switch (action.type) {\n case articleActions.FETCH_INIT:\n return {\n ...state,\n result: null,\n ...createRequestState(articleActions, action.type),\n };\n case articleActions.FETCH_SUCCESS:\n return {\n ...state,\n result: action.payload,\n ...createRequestState(articleActions, action.type),\n };\n case articleActions.FETCH_FAILURE:\n return {\n ...state,\n result: null,\n ...createRequestState(articleActions, action.type),\n };\n default:\n return state;\n }\n};\n\nconst useCmsArticle = (id) => {\n const load = useModel(\n (model) => wrapAsyncCallForDispatch(model.cms().getArticle)(articleActions),\n []\n );\n\n const [state, dispatch] = useReducerWithThunk(pageReducer, {\n isFetching: false,\n isSuccess: false,\n isFailed: false,\n result: null\n }\n );\n\n useEffect(() => {\n dispatch(load(id));\n }, [load, dispatch, id]);\n\n return state;\n};\n\nexport default useCmsArticle;","import {useEffect} from 'react';\nimport {createActionNames, createRequestState} from \"@fik/api\";\nimport wrapAsyncCallForDispatch from \"@fik/utils/wrapAsyncCallForDispatch\";\nimport {useModel} from \"@fik/model\";\nimport {useReducerWithThunk} from \"@fik/utils/useReducerWithThunk\";\n\nconst menuActions = createActionNames('cmsMenu');\n\nmenuActions.UPDATE_MENU = 'UPDATE_MENU';\n\nconst mapCmsMenuToMenu = (content, category = null) => {\n return content.map((item) => {\n\n const menuItem = {\n label: item.visibleName\n };\n\n if (category) {\n menuItem.to = '/p/' + encodeURIComponent(category) + '/' + encodeURIComponent(item.systemName);\n } else {\n\n menuItem.icon = 'fa ' + item.icon;\n\n if (!item.isSingle && item.pages) {\n menuItem.content = mapCmsMenuToMenu(item.pages, item.systemName);\n }\n\n if (item.isSingle && item.singlePage) {\n menuItem.to = '/p/' + encodeURIComponent(item.systemName) + '/' + encodeURIComponent(item.singlePage.systemName);\n }\n }\n\n return menuItem;\n });\n};\n\nconst mergeMenu = (menu, loadedMenu) => {\n if (!loadedMenu) {\n return menu;\n }\n\n const newLoadedMenu = [...loadedMenu];\n const categoryMap = newLoadedMenu.reduce((o, row, index) => ({...o,[row.label]:index}), {});\n const newMenu = menu.filter((element) => {\n if (!categoryMap.hasOwnProperty(element.label)) {\n return true;\n }\n\n element.content.forEach((item) => {\n if (item.atIndex) {\n if (newLoadedMenu[categoryMap[element.label]].content[item.atIndex].to !== item.to) {\n newLoadedMenu[categoryMap[element.label]].content.splice(item.atIndex, 0, item);\n }\n } else {\n newLoadedMenu[categoryMap[element.label]].content.push(item);\n }\n });\n\n return false;\n });\n\n Array.prototype.splice.apply(newMenu, [3, 0, ...newLoadedMenu])\n\n return newMenu;\n};\n\nconst menuReducer = (state, action) => {\n switch (action.type) {\n case menuActions.FETCH_INIT:\n return {\n ...state,\n ...createRequestState(menuActions, action.type),\n };\n case menuActions.FETCH_SUCCESS:\n const loadedMenu = mapCmsMenuToMenu(action.payload);\n return {\n ...state,\n loadedMenu,\n currentMenu: mergeMenu(state.menu, loadedMenu),\n ...createRequestState(menuActions, action.type),\n };\n case menuActions.UPDATE_MENU:\n return {\n ...state,\n menu: action.menu,\n currentMenu: mergeMenu(action.menu, state.loadedMenu),\n };\n case menuActions.FETCH_FAILURE:\n return {\n ...state,\n ...createRequestState(menuActions, action.type),\n };\n default:\n return state;\n }\n};\n\nconst useCmsMenu = (menu) => {\n const loadCmsMenu = useModel(\n (model) => wrapAsyncCallForDispatch(model.cms().getMenu)(menuActions),\n []\n );\n\n const [state, dispatch] = useReducerWithThunk(menuReducer, {\n isFetching: false,\n isSuccess: false,\n isFailed: false,\n currentMenu: menu,\n loadedMenu: [],\n menu\n }\n );\n\n useEffect(() => {\n dispatch(loadCmsMenu());\n }, [loadCmsMenu, dispatch]);\n\n useEffect(() => {\n dispatch({type: menuActions.UPDATE_MENU, menu});\n }, [menu, dispatch]);\n\n return state.currentMenu;\n};\n\nexport default useCmsMenu;","import {useCallback} from 'react';\nimport {createActionNames, createRequestState} from \"@fik/api\";\nimport wrapAsyncCallForDispatch from \"@fik/utils/wrapAsyncCallForDispatch\";\nimport {useModel} from \"@fik/model\";\nimport {useReducerWithThunk} from \"@fik/utils/useReducerWithThunk\";\nimport {useHookToLoading} from \"@fik/loading\";\n\nconst pageBlockActions = createActionNames('cmsMenu');\n\nconst pageBlocksReducer = (state, action) => {\n switch (action.type) {\n case pageBlockActions.FETCH_INIT:\n return {\n ...state,\n result: null,\n ...createRequestState(pageBlockActions, action.type),\n };\n case pageBlockActions.FETCH_SUCCESS:\n return {\n ...state,\n result: action.payload,\n ...createRequestState(pageBlockActions, action.type),\n };\n case pageBlockActions.FETCH_FAILURE:\n return {\n ...state,\n result: null,\n ...createRequestState(pageBlockActions, action.type),\n };\n case 'RESET':\n return {\n ...state,\n isFetching: false,\n isSuccess: false,\n isFailed: false,\n result: null\n };\n default:\n return state;\n }\n};\n\nconst useCmsPageBlocks = () => {\n const load = useModel(\n (model) => wrapAsyncCallForDispatch(model.cms().getPageBlocks)(pageBlockActions),\n []\n );\n\n const [state, dispatch] = useReducerWithThunk(pageBlocksReducer, {\n isFetching: false,\n isSuccess: false,\n isFailed: false,\n result: null\n }\n );\n\n useHookToLoading('banners', state);\n\n const initPage = useCallback((path, blocks) => {\n if (path && blocks) {\n if (path === '/') {\n path = 'homepage';\n }\n const [category, page = 'default'] = path.replace(/^(\\/p\\/)|(\\/)/i, '').split('/');\n if (category && page) {\n dispatch(load(category, page, blocks));\n } else {\n dispatch({type: 'RESET'});\n }\n } else {\n dispatch({type: 'RESET'});\n }\n }, [dispatch, load]);\n\n return [state, initPage];\n};\n\nexport default useCmsPageBlocks;","import React from 'react';\nimport {useCmsMenu} from \"@fik/cms\";\nimport {useNavigationMenu, Menu} from \"@fik/navigation\";\nimport {usePageInfo} from \"@fik/page\";\n\n\nconst Sidebar = ({visible}) => {\n const sidebarMenu = useNavigationMenu('sideBarMenu');\n const menu = useCmsMenu(sidebarMenu);\n const pageInfo = usePageInfo();\n\n return (\n <nav className={\"navbar-default navbar-static-side menu-opened\" + (visible ? ' open' : '')}>\n <div className=\"sidebar-collapse\">\n <Menu content={menu} currentPath={pageInfo.path}/>\n </div>\n </nav>\n );\n};\n\nexport default Sidebar;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {NavigationItem} from \"@fik/navigation\";\nimport {Col, Row} from \"@fik/ui\";\n\nconst PageHeader = ({title, section, children}) => {\n if (!title) {\n return null;\n }\n return (\n <Row className=\"wrapper border-bottom white-bg page-heading\">\n <Col lg={4}>\n <h2>{title}</h2>\n <ol className=\"breadcrumb\">\n <li>\n <NavigationItem to=\"homepage\">Home</NavigationItem>\n </li>\n {section ? <li>{section}</li> : null}\n <li className=\"active\">\n <strong>{title}</strong>\n </li>\n </ol>\n </Col>\n <Col lg={8}>\n {children}\n </Col>\n </Row>\n );\n};\n\nPageHeader.propTypes = {\n title: PropTypes.string,\n section: PropTypes.string,\n children: PropTypes.oneOfType([PropTypes.array, PropTypes.object, PropTypes.func])\n};\n\nexport default PageHeader;","import React from 'react';\n\nconst FooterText = () => {\n const date = new Date();\n return (<>© {date.getFullYear()} <a href=\"https://www.eset.com/cz\">ESET software spol. s r.o.</a></>);\n};\n\nexport default FooterText;","import React from 'react';\nimport FooterText from \"./FooterText\";\n\nconst Footer = () => {\n const date = new Date();\n return (\n <div className=\"footer\">\n <div>\n <FooterText />\n </div>\n </div>\n );\n};\n\nexport default Footer;","import React, {useCallback, useEffect, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport Toolbar from '../Navigation/Toolbar/Toolbar';\nimport Sidebar from \"../Navigation/Sidebar/Sidebar\";\nimport PageHeader from \"../Navigation/PageHeader/PageHeader\";\n\nimport {useSelector} from \"react-redux\";\nimport {usePageInfo, PageBlock} from \"@fik/page\";\nimport {LoadingSpinnerOverlay, LoadingProvider, RefreshingInfo, useLoadingContext, SpinnerCircle} from \"@fik/loading\";\nimport Footer from \"../Navigation/Footer/Footer\";\n\nconst BannerContainer = ({children}) => <div className='wrapper-content row' style={{paddingBottom: '0', marginBottom: '-10px', paddingTop: '20px'}}><div className='col-lg-12 no-padding'>{children}</div></div>;\n\nBannerContainer.propTypes = {\n children: PropTypes.oneOfType([PropTypes.array, PropTypes.object, PropTypes.func])\n};\n\n\nconst Layout = ({children, header = null, renderInfo = null}) => {\n\n const [showSidebar, setShowSidebar] = useState(false);\n\n const handleDrawToggleClicked = useCallback(() => {\n setShowSidebar(!showSidebar);\n }, [showSidebar, setShowSidebar]);\n\n const {title, section} = usePageInfo();\n\n const {username,userId} = useSelector(state => state.auth);\n\n const {isLoading, isRefreshing, resources} = useLoadingContext();\n\n useEffect(() => {\n setShowSidebar(false);\n }, [setShowSidebar, title]);\n\n useEffect(() => {\n if (showSidebar) {\n window.scrollTo(0, 0);\n }\n }, [showSidebar]);\n return (\n <>\n <RefreshingInfo show={isLoading || isRefreshing} style={{position: 'fixed', zIndex: 9999999, top: '5px', left: 0, right: 0}}>\n <div className='bg-muted clearfix text-center' style={{margin: 'auto', maxWidth: '120px', border: '1px solid black', padding: '5px 10px', lineHeight: '22px'}} >\n <div className='pull-left m-r-xs'><SpinnerCircle/></div> Načítá se{process.env.NODE_ENV === 'development'\n ? Object.entries(resources).filter(([key, item]) => item.isFetching).reduce((acc,[key, item]) => acc + (acc ? ', ' : ' ') + key, '')\n : '...'}\n </div>\n </RefreshingInfo>\n\n <Sidebar visible={showSidebar}/>\n <div id=\"page-wrapper\" className=\"gray-bg\">\n <div id=\"page-header\">\n <Toolbar drawerToggleClicked={handleDrawToggleClicked} username={username} userId={userId}/>\n </div>\n <PageHeader title={title} section={section}>{renderInfo}</PageHeader>\n <LoadingProvider>\n <LoadingSpinnerOverlay>\n <PageBlock name='banners' container={BannerContainer} />\n </LoadingSpinnerOverlay>\n </LoadingProvider>\n <main>\n {header}\n <div className=\"wrapper wrapper-content\">\n {children}\n </div>\n </main>\n <Footer/>\n </div>\n </>\n );\n};\n\nLayout.propTypes = {\n children: PropTypes.oneOfType([PropTypes.array, PropTypes.object, PropTypes.func]),\n header: PropTypes.oneOfType([PropTypes.array, PropTypes.object, PropTypes.func])\n};\n\nexport default Layout;","import React, {useMemo} from 'react';\nimport {NavigationItem} from \"@fik/navigation\";\nimport {Col, Row} from \"@fik/ui\";\n\n\nconst Salesman = ({salesman: data, path, moreLink = true}) => {\n\n const imagePath = useMemo(() => data ? (path === \"/\" ? \"\" : path) + \"/img/profiles/\" + data.staffProfileImage : null, [path, data]);\n\n if (!data) {\n return null;\n }\n\n return (\n <div className=\"contact-box no-borders\" style={{minHeight: '200px'}}>\n <Row>\n <Col sm={4} className=\"no-padding no-margins no-padding\">\n <div className=\"text-center\">\n <img className=\"img-thumbnail m-t-xs img-responsive\" src={imagePath}\n alt=\"obrázek obchodníka\"/>\n </div>\n </Col>\n <Col sm={8}>\n <strong className=\"h4\">{data.staffFullName}</strong>\n <address>\n <strong>{data.staffCompanyName}</strong><br/>\n {data.staffStreet}<br/>\n {data.staffZipCode} {data.staffCity}<br/>\n <strong>Mobil/Tel:</strong> {data.staffMobile}<br/>\n <strong>E-mail:</strong> <a href={'mailto:' + data.staffEmail}>{data.staffEmail}</a>\n </address>\n\n {moreLink\n ? <div className=\"text-right\">\n <NavigationItem\n className=\"btn btn-sm btn-primary\"\n to=\"contacts\">Další kontakty</NavigationItem>\n </div>\n : null}\n </Col>\n </Row>\n </div>\n );\n};\n\nexport default Salesman;","import React from 'react';\nimport {getOnPath} from \"@mouseover/js-utils/src\";\nimport {Price} from \"@fik/ui\";\nimport arraySort from \"@fik/utils/arraySort\";\nimport PropTypes from \"prop-types\";\nimport {NavigationItem} from \"@fik/navigation\";\n\nconst RowContainer = ({children}) => <tr>{children}</tr>;\nconst RowLabel = ({children}) => <td><strong>{children}</strong></td>;\nconst RowContent = ({children}) => <td>{children}</td>;\nconst RowWideContent = ({children}) => <td colSpan=\"2\">{children}</td>;\n\nconst ResellerAddressBookRow = ({name}) => <RowContainer>\n <RowLabel>Firma</RowLabel>\n <RowContent>{name} (<NavigationItem to=\"profile:settings\">nastavení profilu</NavigationItem>)</RowContent>\n</RowContainer>;\n\nconst ResellerBranchOfficeRow = ({name}) => <RowContainer>\n <RowLabel>Pobočka</RowLabel>\n <RowContent>{name}</RowContent>\n</RowContainer>;\n\nconst ResellerCategoryRow = ({name, commission}) => <RowContainer>\n <RowLabel>Kategorie</RowLabel>\n <RowContent>{name} ({commission})</RowContent>\n</RowContainer>;\n\nconst ResellerNfrCreditRow = ({nfrCredit}) => <RowContainer>\n <RowLabel>Výše NFR kreditu</RowLabel>\n <RowContent>{nfrCredit}</RowContent>\n</RowContainer>;\n\nconst ResellerPrivilegeStatusRow = ({privilegeStatus}) => <RowContainer>\n <RowLabel>Režim přihlášení</RowLabel>\n <RowContent>{privilegeStatus}</RowContent>\n</RowContainer>;\n\nconst ResellerTurnoversRow = ({amount, subtitle}) => <RowContainer>\n <RowLabel><abbr title=\"Obrat je v doporučených koncových cenách bez DPH\">Obrat</abbr> - {subtitle}</RowLabel>\n <RowContent><Price price={amount}/></RowContent>\n</RowContainer>;\n\nconst ResellerLoyaltyRow = ({loyalties}) => <RowContainer>\n <RowLabel>Věrnost</RowLabel>\n <RowContent><NavigationItem to=\"profile:reports\">přehledy</NavigationItem></RowContent>\n</RowContainer>;\n\nconst ResellerRidRow = ({addressBook, branchOffice}) => {\n let rid = addressBook.publicExternalId;\n\n if (branchOffice && branchOffice.publicExternalId) {\n rid = branchOffice.publicExternalId + ' ' + rid;\n }\n return <RowContainer>\n <RowLabel>RID</RowLabel>\n <RowContent>{rid}</RowContent>\n </RowContainer>;\n};\n\nconst ResellerCertificationMessage = ({status, message}) => {\n switch (status) {\n case 'red':\n return <div className=\"alert alert-danger\">{message}</div>;\n case 'yellow':\n return <div className=\"alert alert-warning\">{message}</div>;\n case 'green':\n default:\n return null;\n }\n};\n\nconst ResellerCertificationRow = ({certInfo}) => <RowContainer>\n <RowWideContent>\n {certInfo.map((item, index) => <ResellerCertificationMessage key={index} {...item} />)}\n </RowWideContent>\n</RowContainer>;\n\nconst ResellerPlanRow = ({certInfo}) => <RowContainer>\n <RowLabel>Individuální plán</RowLabel>\n <RowContent><NavigationItem to=\"partnerstvi:resellerPlan\">AKTIVNÍ</NavigationItem></RowContent>\n</RowContainer>;\n\n\nconst ResellerLoyalties = ({loyalties}) => {\n if (loyalties) {\n // sort by years and return last year\n const lastYear = arraySort(Object.values(loyalties), (a, b) => parseInt(a.year) - parseInt(b.year)).pop();\n // sort by months and return last month\n const lastMonth = lastYear ? arraySort(Object.values(lastYear), (a, b) => parseInt(a.month) - parseInt(b.month)).pop() : null;\n // return percentage of lastMoth\n if (lastMonth && lastMonth.percent !== undefined) {\n return lastMonth.percent + '%';\n }\n }\n return 'n/a';\n};\n\nconst ResellerInfo = ({reseller}) => <table className=\"table table-striped\">\n <tbody>\n\n <ResellerAddressBookRow {...reseller.addressBook}/>\n {reseller.branchOffice ? <ResellerBranchOfficeRow {...reseller.branchOffice} /> : null}\n <ResellerPrivilegeStatusRow privilegeStatus={reseller.privilegeStatus}/>\n {reseller.categoryInfo ? <ResellerCategoryRow {...reseller.categoryInfo} /> : null}\n <ResellerTurnoversRow amount={getOnPath(reseller, ['stats', 'turnovers', 'ownerPrices', 'thisYear', 'sumOwnerPrice'])}\n subtitle='tento rok'/>\n <ResellerTurnoversRow amount={getOnPath(reseller, ['stats', 'turnovers', 'ownerPrices', 'previousYear', 'sumOwnerPrice'])}\n subtitle='předchozí rok'/>\n {reseller.resellerPlanEnabled && <ResellerPlanRow />}\n {reseller.stats\n ? <>\n <ResellerLoyaltyRow {...reseller.stats}/>\n </>\n : null}\n <ResellerRidRow addressBook={reseller.addressBook} branchOffice={reseller.branchOffice}/>\n <ResellerCertificationRow certInfo={reseller.certInfo}/>\n </tbody>\n</table>;\n\nResellerInfo.propTypes = {\n addressBook: PropTypes.object,\n branchOffice: PropTypes.object,\n categoryInfo: PropTypes.object,\n privilegeStatus: PropTypes.string,\n turnovers: PropTypes.object,\n certInfo: PropTypes.object,\n stats: PropTypes.object\n};\n\n\nexport default ResellerInfo;","import {selectApiState} from \"@fik/api/selectors\";\nimport {resourceAsyncCallAction} from \"@fik/api\";\n\nconst shouldUpdateEntity = ({storeName, name: resource, timeToRefresh = 60}) => ([params], getState) => {\n const [loading, loaded, results, lastUpdateTime] = selectApiState(storeName, resource, params)(getState());\n if (!loading) {\n if (!params) {\n return !loaded;\n }\n\n if (!params.id) {\n if (!loaded) {\n return true;\n }\n } else if (params.id) {\n if (!loaded || (loaded && params.id !== results.id)) {\n return true;\n }\n }\n }\n\n return timeToRefresh < 0 ? isTimeToRefresh(lastUpdateTime,timeToRefresh * 1000) : false;\n};\n\n\nexport const requestGetEntity = (model) => (context, alwaysFetch = false) => {\n return resourceAsyncCallAction(\n {...context},\n alwaysFetch !== true ? shouldUpdateEntity(context) : null,\n 'get')\n ((...args) => model.entity().getEntity(context, ...args));\n};\n\nexport const requestPostEntity = (model) => (context) => {\n return resourceAsyncCallAction(context, null, 'post')((...args) => {\n return model.entity().postEntity(context, ...args)\n });\n};\n\nexport const requestPutEntity = (model) => (context) => {\n return resourceAsyncCallAction(context, null, 'put')((...args) => {\n return model.entity().putEntity(context, ...args)\n });\n};\n\nexport const requestDeleteEntity = (model) => (context) => {\n return resourceAsyncCallAction(context, null, 'delete')((...args) => model.entity().deleteEntity(context, ...args));\n};\n\nexport const requestEntityAction = (model) => (context) => {\n return resourceAsyncCallAction(context, null, 'action')((...args) => {\n return model.entity().action(context, ...args)\n });\n};\n\nconst isTimeToRefresh = (prevTime, diff) => {\n return Date.now() - prevTime > diff;\n};","import {useCallback} from \"react\";\nimport {getFailed, getLoaded, getLoading, getRefreshing, getResults} from \"@fik/api/selectors\";\nimport {useResourceSelectorWithParams} from \"@fik/api\";\n\nconst useResourceEntitySelector = (context, params, method, deps) => {\n const selectorCallback = useCallback((state) => {\n const entity = getResults(state);\n return {\n loadingState: {\n isFetching: getLoading(state),\n isSuccess: getLoaded(state),\n isFailed: getFailed(state),\n isRefreshing: getRefreshing(state),\n },\n loading: getLoading(state),\n [context.name]: entity,\n entity\n };\n }, [context]);\n\n return useResourceSelectorWithParams(context, params, selectorCallback, method);\n};\n\nexport default useResourceEntitySelector;","import {useResourceContext} from \"@fik/model\";\nimport {useDispatch} from \"react-redux\";\nimport {useCallback, useRef, useState} from \"react\";\nimport {useHookToLoading} from \"@fik/loading\";\nimport useResourceEntitySelector from \"./useResourceEntitySelector\";\nimport {isObject} from \"@mouseover/js-utils\";\n\nfunction paramsOrEmptyObject(params) {\n return params || {};\n}\n\nfunction createCurrentParams(defaultParamsRef, params) {\n if (!isObject(params) && params) {\n return params;\n }\n return defaultParamsRef.current\n ? {...defaultParamsRef.current, ...paramsOrEmptyObject(params)}\n : paramsOrEmptyObject(params);\n}\n\nconst useCallRequestEntity = ({name, validate, method, ...props}, action, defaultParams) => {\n const context = useResourceContext(name);\n const dispatch = useDispatch();\n const [currentParams, setCurrentParams] = useState(null);\n\n //- ref to default params - their should not change! only on purpose with changeDefaultParams\n const defaultParamsRef = useRef(defaultParams);\n const changeDefaultParams = useCallback((newParams) => defaultParamsRef.current = newParams, []);\n\n const callback = useCallback((params, content) => {\n const newParams = createCurrentParams(defaultParamsRef, params);\n if (!validate || validate(newParams)) {\n setCurrentParams(newParams);\n dispatch(action({entity: name, ...context, ...props}, newParams, content));\n }\n }, [action, context, dispatch, validate]);\n\n const resourceSelection = useResourceEntitySelector(context, currentParams, method, []);\n\n useHookToLoading(name, resourceSelection.loadingState);\n\n return [resourceSelection, callback, changeDefaultParams];\n};\n\nexport default useCallRequestEntity;","import {useCallback, useContext, useMemo} from 'react';\nimport {requestGetEntity} from \"./actions\";\nimport {ModelContext} from \"@fik/model\";\nimport useCallRequestEntity from \"./useCallRequestEnetity\";\n\nexport const usePureEntity = ({params:defaultParams, ...props}) => {\n\n const model = useContext(ModelContext);\n\n const actionCallback = useCallback((context, actionParams) => {\n return requestGetEntity(model)(context)(actionParams)\n }, [model]);\n\n const memoizedParams = useMemo(() => (defaultParams || {}), [defaultParams]);\n\n const [resourceSelection, callRequest] = useCallRequestEntity(\n {...props, method: 'get'},\n actionCallback,\n memoizedParams\n );\n\n return [resourceSelection, callRequest];\n};\n\nexport default usePureEntity;","import {useEffect, useMemo} from 'react';\nimport {usePureEntity} from \"./index\";\n\nexport const useEntity = (props, id, inputParams, deps = []) => {\n\n //- memoize params - their should not change!\n const memoizedAllParams = useMemo(() => (id ? {...inputParams, id} : {...inputParams}), deps);\n\n const [resourceSelection, callRequest] = usePureEntity(props);\n\n useEffect(() => {\n callRequest(memoizedAllParams);\n }, [memoizedAllParams, callRequest]);\n\n return resourceSelection;\n};\n\nexport default useEntity;","import {useCallback, useContext} from \"react\";\nimport {ModelContext, useModel, useResourceContext} from \"@fik/model\";\nimport {createActionNames, createRequestState} from \"@fik/api\";\nimport {useReducerWithThunk} from \"@fik/utils/useReducerWithThunk\";\nimport wrapAsyncCallForDispatch from \"@fik/utils/wrapAsyncCallForDispatch\";\nimport {useHookToLoading} from \"@fik/loading\";\n\nconst actionNames = createActionNames('useEntityAction');\n\nconst entityActionReducer = (state, action) => {\n switch (action.type) {\n case actionNames.FETCH_INIT:\n return {\n ...state,\n result: null,\n error: null,\n ...createRequestState(actionNames, action.type),\n };\n case actionNames.FETCH_SUCCESS:\n return {\n ...state,\n result: action.payload,\n ...createRequestState(actionNames, action.type),\n };\n case actionNames.FETCH_FAILURE:\n return {\n ...state,\n result: null,\n error: action.error,\n ...createRequestState(actionNames, action.type),\n };\n case actionNames.FETCH_RESET:\n return {\n ...state,\n result: null,\n error: null,\n ...createRequestState(actionNames, action.type),\n };\n default:\n return state;\n }\n};\nexport const useEntityAction = ({name, action, params: defaultParams, validate}) => {\n const model = useContext(ModelContext);\n\n const wrappedModelActionCall = useModel(\n (model) => wrapAsyncCallForDispatch(model.entity().action)(actionNames),\n []\n );\n\n const [state, dispatch] = useReducerWithThunk(entityActionReducer, {\n isFetching: false,\n isSuccess: false,\n isFailed: false,\n result: null,\n error: null\n }\n );\n\n const context = useResourceContext(name);\n const request = useCallback((params) => {\n dispatch(wrappedModelActionCall(\n {entity: name, ...context},\n action,\n defaultParams ? {...defaultParams, ...params} : params\n ));\n }, [dispatch, wrappedModelActionCall]);\n\n const reset = useCallback(() => {\n dispatch({type: actionNames.FETCH_RESET});\n },[dispatch]);\n\n useHookToLoading(name, state);\n\n return [state, request, reset];\n};\n\nexport default useEntityAction;","import React from 'react';\nimport {useEntity} from \"@fik/entity\";\n\nconst ContactEmailsSubscriptions = () => {\n const {entity} = useEntity({name: 'contact', params: {action: 'newsletters-subscription'}, timeToRefresh: -1});\n\n if (!entity) {\n return null;\n }\n\n return <table className='table'>\n <tbody>\n {Object.entries(entity).map(([name, checked], index) => <tr key={index}>\n <td><button className={\"btn btn-circle \" + (checked ? \"btn-success\" : \"btn-warning\")} type=\"button\" style={{marginBottom: '2px'}}><i className={\"fa \" + (checked ? \"fa-check\" : \"fa-times\")}></i></button> {name}</td>\n </tr>)}\n </tbody>\n </table>;\n};\n\nexport default ContactEmailsSubscriptions;\n","import React, {useCallback, useState} from 'react';\nimport {Button} from \"@fik/ui\";\nimport {Form} from \"@mouseover/react-form\";\n\nconst rulesForMainAddress = (rules) => {\n return (values) => {\n return !values.mainAddress ? rules : {};\n }\n};\n\nconst VALIDATION_RULES = {\n name: {\n required: true,\n minLength: 4\n },\n street: {\n required: true,\n minLength: 4\n },\n city: {\n required: true,\n minLength: 4\n },\n zipCode: {\n required: true,\n minLength: 5,\n maxLength: 5\n },\n postName: rulesForMainAddress({\n required: true,\n minLength: 4\n }),\n postStreet:rulesForMainAddress({\n required: true,\n minLength: 4\n }),\n postCity: rulesForMainAddress({\n required: true,\n minLength: 4\n }),\n postZipCode: rulesForMainAddress({\n required: true,\n minLength: 5,\n maxLength: 5\n }),\n email: {\n required: true,\n minLength: 4\n },\n phone: {\n required: true,\n minLength: 9\n },\n mobile: {\n required: false,\n minLength: 9\n },\n web: {\n required: false,\n minLength: 3\n },\n};\n\nconst AddressBookForm = ({addressBook, onSubmit}) => {\n const [validationRules, setValidationRules] = useState(VALIDATION_RULES);\n const handleChange = useCallback((values, valid) => {\n const newRules = {...VALIDATION_RULES};\n if (values.mainAddress) {\n delete newRules.postName;\n delete newRules.postStreet;\n delete newRules.postCity;\n delete newRules.postZipCode;\n }\n\n if (newRules.postName !== validationRules.postName) {\n setValidationRules(newRules);\n }\n }, [validationRules, setValidationRules]);\n\n if (!addressBook) {\n return null;\n }\n\n return <Form\n validationRules={validationRules}\n onChange={handleChange}\n controls={{\n name: {\n label: 'Název',\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'Název',\n },\n value: '',\n valid: false,\n touched: false\n },\n street: {\n label: 'Ulice',\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'Ulice',\n },\n value: '',\n valid: false,\n touched: false\n },\n city: {\n label: 'Město',\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'Město',\n },\n value: '',\n valid: false,\n touched: false\n },\n zipCode: {\n label: 'PSČ',\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'PSČ',\n },\n value: '',\n valid: false,\n touched: false\n },\n mainAddress: {\n elementType: 'checkbox',\n elementConfig: {autoComplete: 'off'},\n label: 'Dodací adresa shodná jako fakturační',\n groupClass: 'form-group m-b-xs m-t-m',\n value: false,\n valid: false,\n touched: false,\n invalidate: ['postAddress', 'postName', 'postStreet', 'postCity', 'postZipCode']\n },\n store: {\n elementType: 'checkbox',\n elementConfig: {autoComplete: 'off'},\n label: 'Kamenná prodejna',\n groupClass: 'form-group m-b-xs m-t-m',\n value: false,\n valid: false,\n touched: false,\n },\n sendOrderToCustomer: {\n elementType: 'checkbox',\n elementConfig: {autoComplete: 'off'},\n label: 'Odesílat licenční e-mail i na koncového uživatele',\n groupClass: 'form-group m-b-xs m-t-m',\n value: false,\n valid: false,\n touched: false,\n },\n postAddress: {\n label: 'Dodací adresa',\n elementType: 'heading',\n visible: (results) => (!results.mainAddress)\n },\n postName: {\n label: 'Název',\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'Název',\n },\n value: '',\n valid: false,\n touched: false,\n visible: (results) => (!results.mainAddress)\n },\n postStreet: {\n label: 'Ulice',\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'Ulice',\n },\n value: '',\n valid: false,\n touched: false,\n visible: (results) => (!results.mainAddress)\n },\n postCity: {\n label: 'Město',\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'Město',\n },\n value: '',\n valid: false,\n touched: false,\n visible: (results) => (!results.mainAddress)\n },\n postZipCode: {\n label: 'PSČ',\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'PSČ',\n },\n value: '',\n valid: false,\n touched: false,\n visible: (results) => (!results.mainAddress)\n },\n email: {\n label: 'E-mail',\n elementType: 'input',\n elementConfig: {\n type: 'email',\n placeholder: 'E-mail',\n },\n value: '',\n valid: false,\n touched: false\n },\n phone: {\n label: 'Telefon 1',\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'Telefon 1',\n },\n value: '',\n valid: false,\n touched: false\n },\n mobile: {\n label: 'Telefon 2',\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'Telefon 2',\n },\n value: '',\n valid: false,\n touched: false\n },\n web: {\n label: 'Webová adresa',\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'Webová adresa',\n },\n value: '',\n valid: false,\n touched: false\n },\n }}\n onSubmit={onSubmit}\n values={addressBook}\n render={(form) => {\n return (\n <Button\n btnType=\"primary\"\n type=\"submit\"\n disabled={!form.validation.valid}\n >Uložit</Button>\n )\n }} />;\n};\n\nexport default AddressBookForm;","import React from 'react';\n\nimport {Button} from \"@fik/ui\";\nimport {Form} from \"@mouseover/react-form\";\n\nconst BranchOfficeForm = ({branchOffice, onSubmit}) => {\n\n if (!branchOffice) {\n return null;\n }\n\n return <Form\n controls={{\n name: {\n label: 'Název',\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'Název',\n },\n value: '',\n valid: false,\n touched: false,\n validation: {\n required: true,\n minLength: 4\n }\n },\n street: {\n label: 'Ulice',\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'Ulice',\n },\n value: '',\n valid: false,\n touched: false,\n validation: {\n required: true,\n minLength: 4\n }\n },\n city: {\n label: 'Město',\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'Město',\n },\n value: '',\n valid: false,\n touched: false,\n validation: {\n required: true,\n minLength: 4\n }\n },\n zipCode: {\n label: 'PSČ',\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'PSČ',\n },\n value: '',\n valid: false,\n touched: false,\n validation: {\n required: true,\n minLength: 5,\n maxLength: 5\n }\n },\n email: {\n label: 'E-mail',\n elementType: 'input',\n elementConfig: {\n type: 'email',\n placeholder: 'E-mail',\n },\n value: '',\n valid: false,\n touched: false,\n validation: {\n required: true,\n minLength: 4\n }\n },\n phone: {\n label: 'Telefon 1',\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'Telefon 1',\n },\n value: '',\n valid: false,\n touched: false,\n validation: {\n required: true,\n minLength: 9\n }\n },\n mobile: {\n label: 'Telefon 2',\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'Telefon 2',\n },\n value: '',\n valid: false,\n touched: false,\n validation: {\n required: false,\n minLength: 9\n }\n },\n web: {\n label: 'Webová adresa',\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'Webová adresa',\n },\n value: '',\n valid: false,\n touched: false,\n validation: {\n required: false,\n minLength: 3\n }\n },\n store: {\n elementType: 'checkbox',\n elementConfig: {autoComplete: 'off'},\n label: 'Kamenná prodejna',\n groupClass: 'form-group m-b-xs m-t-m'\n },\n sendOrderToCustomer: {\n elementType: 'checkbox',\n elementConfig: {autoComplete: 'off'},\n label: 'Odesílat licenční e-mail i na koncového uživatele',\n groupClass: 'form-group m-b-xs m-t-m'\n },\n }}\n onSubmit={onSubmit}\n values={branchOffice}\n render={(form) => (\n <Button\n btnType=\"primary\"\n type=\"submit\"\n disabled={!form.validation.valid}>Uložit</Button>\n )}/>;\n};\n\nexport default BranchOfficeForm;","import React from \"react\";\nimport {Form} from \"@mouseover/react-form\";\n\nconst CertificationBranch = ({item, form}) => (\n <div className=\"radio\">\n <label>\n <input type=\"radio\" className=\"i-checks\"\n checked={item.id === form.values.branchId}\n onChange={() => form.setValue(item.id, 'branchId')}\n /> {item.name}\n </label>\n </div>\n);\n\nconst CertificationRequestForm = ({certificationBranches, contactId, onSubmit}) => (<Form\n values={{contactId: contactId, branchId: null}}\n validationRules={{}}\n onSubmit={onSubmit}\n render={(form) => certificationBranches.map((item, index) => <CertificationBranch key={index} item={item} form={form}/>)}\n>\n <button type='submit' className=\"btn btn-primary block m-b\">Zažádat</button>\n</Form>);\n\nexport default CertificationRequestForm;","import React from 'react';\nimport PropTypes from \"prop-types\";\nimport handleClick from \"@fik/utils/handleClick\";\n\nconst Cell = ({column, row, primaryValue, renderCellProps, index}) => {\n\n let content = null;\n if (column.render) {\n content = column.render({...renderCellProps, row, primaryValue, column, index});\n } else if (row.hasOwnProperty(column.key)) {\n content = row[column.key];\n }\n\n return (\n <td className={column.className || null}>\n {content}\n </td>\n );\n};\n\nconst filterVisible = column => {\n if (!column.hasOwnProperty('visible')) {\n return true;\n }\n\n if (typeof column.visible === 'function') {\n return column.visible();\n }\n\n return column.visible;\n};\n\nconst Cells = ({columns, ...props}) => {\n return columns\n .filter(filterVisible)\n .map((column, key) => (<Cell key={key} column={column} {...props}/>))\n};\n\nconst Row = props => {\n const {row, columns, primaryValue, index, renderCellProps = {}, onRowClick} = props;\n const rowContent = props.render({row, columns, primaryValue, renderCellProps, index}) || <tr onClick={onRowClick ? handleClick(() => onRowClick(row)) : null}><Cells columns={columns} row={row} primaryValue={primaryValue} index={index} renderCellProps={renderCellProps}/></tr>;\n if (props.renderRowMessages) {\n return <>\n {rowContent}\n {props.renderRowMessages({...props, columnsLength: columns.length})}\n </>\n }\n return rowContent;\n};\n\nconst getChildren = (children) => React.isValidElement(children) ? getChildren(children.props.children) : children;\n\nconst Table = (props) => {\n const tableClasses = ['table'];\n\n if (props.striped) {\n tableClasses.push('table-striped');\n }\n\n if (props.bordered) {\n tableClasses.push('table-bordered');\n }\n\n if (props.condensed) {\n tableClasses.push('table-condensed');\n }\n\n if (props.hover) {\n tableClasses.push('table-hover');\n }\n const containerClasses = [];\n\n if (props.containerClassName) {\n containerClasses.push(props.containerClassName);\n }\n\n if (props.responsive) {\n containerClasses.push('table-responsive');\n }\n\n const renderRow = props.renderRow || (() => null);\n\n let columns = props.columns;\n\n if (props.children) {\n const children = getChildren(props.children);\n if (children) {\n columns = children.filter(child => React.isValidElement(child)).map((child, index) => ({\n key: index,\n title: child.props.title,\n header: child.props.header,\n className: child.props.headerClassName,\n render: ({row, ...props}) => React.cloneElement(child, {row, ...row, ...props})\n }))\n }\n }\n\n const rows = props.rows\n ? (props.rows.map((row, index) => {\n const primaryValue = props.primary ? (typeof props.primary === 'function' ? props.primary(row) : row[props.primary]) : index;\n\n return (<Row\n key={'row-' + index + '-' + (primaryValue || index)}\n index={index}\n primaryValue={primaryValue}\n onRowClick={props.onRowClick}\n row={row}\n columns={columns}\n renderCellProps={props.renderCellProps}\n render={renderRow}\n renderRowMessages={props.renderRowMessages} />);\n })) : null;\n\n\n\n return (\n <div className={containerClasses.join(' ')}>\n <table className={tableClasses.join(' ')}>\n <TableHead columns={columns} filterVisible={filterVisible} />\n <tbody>\n {rows}\n </tbody>\n </table>\n </div>\n )\n};\nconst TableHead = ({columns, filterVisible}) => <thead>\n<tr>\n {columns\n .filter(filterVisible)\n .map(item => (<th key={item.key} className={item.className || null} title={item.title || null}>{item.header ? (typeof item.header === 'function' ? item.header() : item.header): item.title}</th>))}\n</tr>\n</thead>;\n\nTable.propTypes = {\n striped: PropTypes.bool,\n bordered: PropTypes.bool,\n condensed: PropTypes.bool,\n hover: PropTypes.bool,\n responsive: PropTypes.bool,\n columns: PropTypes.array,\n rows: PropTypes.array,\n primary: PropTypes.string,\n renderRow: PropTypes.func,\n renderRowMessages: PropTypes.func,\n};\n\nexport default Table;","const TableRow = ({children, render, ...props}) => {\n if (children) {\n return children(props);\n }\n\n if (render) {\n return render(props);\n }\n\n return null;\n}\n\nexport default TableRow;","import React from \"react\";\nimport handleClick from \"@fik/utils/handleClick\";\n\nconst ToggleRowDetailButton = ({primaryValue, isVisibleRow, toggleRow, closeIcon='fa-level-up', openIcon='fa-info-circle', ...props}) =>\n <button\n className=\"btn btn-sm btn-default\" {...props}\n title={ (!isVisibleRow(primaryValue) ? 'Rychlý detail' : 'Schovat rychlý detail')}\n onClick={handleClick(() => toggleRow(primaryValue))}>\n <i className={\"fa \" + (!isVisibleRow(primaryValue) ? openIcon : closeIcon)}/>\n </button>;\n\nexport default ToggleRowDetailButton;","const arrayRemoveAny = (array, value) => {\n return array.filter((item) => item !== value);\n};\n\nexport default arrayRemoveAny;","import {useCallback, useState} from \"react\";\nimport arrayRemoveAny from \"@fik/utils/arrayRemoveAny\";\n\nconst useRowDetail = () => {\n const [visibleRows, setVisibleRows] = useState([]);\n\n const toggleRow = useCallback((key) => {\n let newlyVisible;\n if (visibleRows.indexOf(key) !== -1) {\n newlyVisible = arrayRemoveAny(visibleRows, key);\n } else {\n newlyVisible = [...visibleRows, key];\n }\n setVisibleRows(newlyVisible);\n }, [setVisibleRows,visibleRows]);\n\n return {\n toggleRow,\n isVisibleRow: useCallback((row) => visibleRows.indexOf(row) !== -1, [visibleRows])\n }\n};\n\nexport default useRowDetail;","import React from \"react\";\n\nimport {DownloadLink, Paginator} from \"@fik/ui\";\nimport {Table} from \"@fik/table\";\nimport {DateTime} from \"@fik/ui\";\n\nconst columns = [\n {\n key: 'type',\n title: 'Typ certifikace',\n render: ({row: {course}}) => (course ? <strong style={{color: course.actual ? '#333333' : 'red'}}>{course.name}</strong> : '-')\n },\n {\n key: 'contactName',\n title: 'Jméno',\n render: ({row: {contactName}}) => contactName\n },\n {\n key: 'endOn',\n title: 'Dokončení testu',\n render: ({row: {endOn}}) => <DateTime date={endOn}/>\n },\n {\n key: 'points',\n title: 'Body',\n render: ({row: {actualPoints, maximumPoints}}) => <>{actualPoints}/{maximumPoints}</>\n },\n {\n key: 'verdictPercent',\n title: 'Dosažených procent',\n render: ({row: {verdictPercent}}) => <>{verdictPercent} %</>\n },\n {\n key: 'verdict',\n title: 'Splněno',\n render: ({row: {verdict}}) => <span className={\"label \" + (verdict ? \"label-success\" : \"label-danger\")}>{verdict ? 'ANO' : 'NE'}</span>\n },\n {\n key: 'pdf',\n title: 'PDF',\n render: ({row: {verdict, id}}) => verdict\n ? <DownloadLink resource='certification-pdf'\n params={{certTestVerdictId:id}}\n className='btn btn-success btn-xs'><i className=\"fa fa-file-pdf-o\"/></DownloadLink>\n : null\n }\n];\n\nconst CertificationList = ({items = [], pagination = {}, onPageChange}) => (<>\n <Table striped responsive\n columns={columns}\n rows={items}\n primary='id'/>\n\n <Paginator {...pagination}\n onPageChange={onPageChange}/>\n</>);\n\nexport default CertificationList;","import React from 'react';\nimport {ChannelName} from \"../index\";\n\nconst Channel = ({addressBook}) => {\n if (!addressBook) {\n return null;\n }\n\n const {companyId, email} = addressBook;\n\n return (\n <React.Fragment>\n <div className=\"text-bold\"><ChannelName {...addressBook} /></div>\n <div className=\"description\">\n {companyId ? <div>IČ: {companyId}</div> : null}\n {email\n ? (<div className=\"icon-nowrap-block inline\"><i className=\"fa fa-envelope\"/> <span>{email}</span></div>)\n : null}\n </div>\n </React.Fragment>\n );\n};\n\nexport default Channel;","import React from \"react\";\nimport {NavigationItem} from \"@fik/navigation\";\n\nconst ChannelName = ({name, addressBookId, id}) => <>{addressBookId || id ?\n <NavigationItem to='addressBook:view' params={{id: addressBookId || id}}>{name}</NavigationItem> : name}</>;\n\nexport default ChannelName;","import React from 'react';\n\nconst ChannelContact = ({contact}) => {\n if (!contact) {\n return null;\n }\n\n const {contactSurname, contactFirstname, contactEmail} = contact;\n return (\n <>\n <div className=\"text-bold\">{contactSurname} {contactFirstname}</div>\n <div>{contactEmail}</div>\n </>\n );\n};\n\nexport default ChannelContact;","import {useEntity} from \"@fik/entity\";\n\nexport const useDials = ({name, params}) => {\n const {entity} = useEntity({name, params: {action: 'dials'}}, null, params);\n return entity || {};\n};\n\nexport default useDials;\n","import React, {useCallback, useMemo} from \"react\";\nimport {Form, FormField} from \"@mouseover/react-form\";\nimport {useDials} from \"@fik/dials\";\nimport {getValue} from \"@mouseover/js-utils\";\nimport handleClick from \"@fik/utils/handleClick\";\nimport {NavigationItem} from \"@fik/navigation\";\nimport arrayRemoveAny from \"@fik/utils/arrayRemoveAny\";\n\nconst TagGroupCheckboxes = ({tags, name, form, disabled = false}) => {\n\n const usedTags = useMemo(() => getValue(form.values, name) || [], [form.values, name]);\n\n const setChecked = useCallback((tag, checked) => {\n\n let currentValue = [...usedTags];\n if (checked) {\n currentValue.push(tag.tagCode);\n } else {\n currentValue = arrayRemoveAny(currentValue, tag.tagCode);\n }\n form.setValue(currentValue, name);\n }, [form, name, usedTags]);\n return tags.map((item, index) => (\n <div className='checkbox' key={index}><label><input disabled={disabled} key={index} checked={usedTags.indexOf(item.tagCode) !== -1}\n type=\"checkbox\"\n onChange={(event) => setChecked(item, event.target.checked)}/> {item.tagDescription}\n </label></div>))\n};\nconst VALIDATION_RULES = {\n contactSurname: {\n required: {\n params: true,\n message: \"Vyplňte prosím příjmení.\"\n },\n minLength: 2\n }, contactFirstname: {\n required: {\n params: true,\n message: \"Vyplňte prosím jméno.\"\n },\n minLength: 2\n }, contactPhone: {\n required: {\n params: true,\n message: \"Vyplňte prosím telefon.\"\n },\n minLength: 9,\n pattern: {\n message: 'Vyplňte prosím telefon ve formátu +420XXXXXXXXX.',\n params: '(^[\\+][0-9]{12}$)'\n }\n }, contactEmail: {\n required: {\n params: true,\n message: \"Vyplňte prosím e-mailovou adresu.\"\n },\n email: true\n }\n};\n\nconst ContactForm = ({values, onSubmit, onResendLoginRequested, selfEdit = false}) => {\n const dials = useDials({name: 'contact'});\n\n if (!values || !dials.roles) {\n return null;\n }\n\n return <Form\n values={values}\n validationRules={VALIDATION_RULES}\n onSubmit={onSubmit}\n render={(form) => (\n <>\n <div className=\"row\">\n <div className=\"col-sm-6\">\n <FormField form={form}\n label=\"Příjmení\"\n elementConfig={{disabled: !selfEdit}}\n name='contactSurname'\n elementType='input'\n />\n </div>\n <div className=\"col-sm-6\">\n <FormField form={form}\n label=\"Jméno\"\n elementConfig={{disabled: !selfEdit}}\n name='contactFirstname'\n elementType='input'\n />\n </div>\n </div>\n <div className=\"row\">\n <div className=\"col-sm-6\">\n <FormField form={form}\n label=\"Telefon\"\n elementConfig={{disabled: !selfEdit}}\n name='contactPhone'\n elementType='input'\n />\n </div>\n <div className=\"col-sm-6\">\n <FormField form={form}\n label=\"E-mail\"\n elementConfig={{disabled: !selfEdit}}\n name='contactEmail'\n elementType='input'\n />\n </div>\n </div>\n <div className=\"row\">\n <div className=\"col-sm-6\">\n <h3 className=\"font-bold\">Role kontaktu</h3>\n <TagGroupCheckboxes form={form} name='contactTags' tags={dials.roles}/>\n <h3 className=\"font-bold\">Další nastavení</h3>\n <p>\n Pokud je volba zatržena, kontakt se nebude moci přihlásit do zóny.\n </p>\n <TagGroupCheckboxes form={form} name='contactTags' tags={dials.others}/>\n </div>\n <div className=\"col-sm-6\">\n <h3 className=\"font-bold\">Odběr novinek</h3>\n <p>\n Zatrhněte prosím kategorie novinek, které chcete posílat e-mailem. Více informací k jednotlivým sekcím obsahu\n najdete <NavigationItem to=\"page\" params={{category: 'napoveda', page: 'faq'}}\n anchor=\"faq28\">zde</NavigationItem>.\n </p>\n <TagGroupCheckboxes form={form} name='contactTags' disabled={!selfEdit} tags={dials.newsletters}/>\n </div>\n </div>\n\n <div className=\"row\">\n <div className=\"col-lg-2\">\n <button type='submit' className=\"btn btn-primary block m-b\">Uložit</button>\n </div>\n {onResendLoginRequested\n ? <div className=\"col-lg-2\">\n <button type='button' onClick={handleClick(onResendLoginRequested)} className=\"btn btn-warning block m-b\">Znovu\n zaslat\n přihlašovací údaje\n </button>\n </div>\n : null}\n </div>\n </>\n )}/>;\n};\n\nexport default ContactForm;","import 'react-dates/initialize';\nimport {FormField} from \"@mouseover/react-form\";\nimport PropTypes from 'prop-types';\nimport React, {useMemo, useState} from \"react\";\nimport {SingleDatePicker} from \"react-dates\";\nimport moment from \"moment\";\nimport {isObject} from \"@mouseover/js-utils\";\n\nconst DataPickerWrapper = ({input}) => {\n const [focused, setFocused] = useState(false);\n const date = useMemo(() => input && input.value ? moment(isObject(input.value) ? input.value.date : input.value) : null, [input]);\n return <div>\n <SingleDatePicker\n // showClearDate={true}\n customInputIcon={\n <i className=\"fa fa-calendar\"/>\n }\n inputIconPosition=\"after\"\n small={true}\n block={false}\n numberOfMonths={1}\n displayFormat=\"DD.MM.YYYY\"\n date={date}\n onDateChange={(date) => input.setValue(date ? date.format('YYYY-MM-DD') : null)}\n focused={focused}\n keepFocusOnInput={false}\n onFocusChange={({focused}) => setFocused(focused)}\n openDirection=\"down\"\n hideKeyboardShortcutsPanel={true}\n isOutsideRange={() => false}\n placeholder=\"\"\n />\n </div>\n};\n\nDataPickerWrapper.propTypes = {\n input: PropTypes.object\n};\n\nexport const DatePicker = (props) => <FormField {...props} renderInputElement={(props, elementProps, input) => <DataPickerWrapper input={input}/>}/>;","import React from 'react';\nimport {FormField} from \"@mouseover/react-form\";\n\nexport const SelectInput = (props) => <FormField {...props} elementType='select'/>;\nexport const TextArea = (props) => <FormField {...props} elementType='textarea'/>;\nexport const TextInput = (props) => <FormField {...props} elementType='input'/>;\nexport const PasswordInput = (props) => <FormField {...props} elementType='input' elementConfig={{type: 'password'}}/>;\nexport const NumberInput = (props) => <FormField {...props} elementType='input' valueType=\"number\"/>;\nexport const Checkbox = (props) => <FormField {...props} elementType='checkbox'/>;\nexport {DatePicker} from './DatePicker';","import React, {useCallback} from \"react\";\nimport {Form} from \"@mouseover/react-form\";\nimport {PasswordInput, TextInput} from \"@fik/form\";\n\n\nconst PasswordForm = ({username, onSubmit}) => {\n const handleSubmit = useCallback((values, valid, form) => {\n if (valid) {\n onSubmit(values);\n form.setValues({password: null, oldPassword: null, passwordCheck: null});\n }\n }, [onSubmit]);\n\n return <Form\n values={{username: username, password: null, oldPassword: null, passwordCheck: null}}\n validationRules={{}}\n onSubmit={handleSubmit}\n render={(form) => (<>\n <TextInput label=\"Uživatelské jméno\" elementConfig={{disabled: true}} form={form} name=\"username\" />\n <PasswordInput label=\"Současné heslo\" form={form} name=\"oldPassword\" />\n <PasswordInput label=\"Nové heslo\" form={form} name=\"password\" />\n <PasswordInput label=\"Nové heslo pro kontrolu\" form={form} name=\"passwordCheck\" />\n </>)}\n >\n <button type='submit' className=\"btn btn-primary block m-b\">Změnit heslo</button>\n </Form>;\n};\n\nexport default PasswordForm;","import React, {useState, useCallback} from 'react';\nimport {Redirect} from \"react-router-dom\";\nimport {RenewForm} from \"@fik/components\";\nimport {useNavigation} from \"@fik/navigation\";\n\nconst RenewLicenseShortcut = ({box = true}) => {\n const [result, setResult] = useState(null);\n const {routes} = useNavigation();\n\n const handleSubmit = useCallback((result) => {\n setResult(result);\n }, [setResult]);\n\n if (result && result.identificator && result.idType) {\n return <Redirect to={`${routes.order.create.path}?${result.idType}=${encodeURIComponent(result.identificator)}`}/>\n }\n\n return <RenewForm onSubmit={handleSubmit}/>\n};\n\nexport default RenewLicenseShortcut;","import React, {useCallback, useState} from \"react\";\nimport PropTypes from 'prop-types';\nimport {Form} from \"@mouseover/react-form\";\n\nconst ID_TYPE_KEY = 'licenseKey';\nconst ID_TYPE_PUBLIC_ID = 'licensePublicId';\nconst ID_TYPE_EPLI = 'licenseEPLI';\nconst ID_TYPE_DESLOCK = 'licenseDeslockId';\nconst ID_TYPE_USERNAME = 'licenseUsername';\n\nconst RenewForm = ({onSubmit}) => {\n const [idType, setIdType] = useState(null);\n\n const handleChange = useCallback(({identificator}) => {\n if (!identificator) {\n setIdType(null);\n return;\n }\n if (identificator.match(/\\b((AV|EAV|DEV|TRIAL)-[0-9]{6,})\\b/)) {\n setIdType(ID_TYPE_USERNAME);\n } else if (identificator.match(/\\b([a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4})\\b/)) {\n setIdType(ID_TYPE_KEY);\n } else if (identificator.match(/\\b([a-zA-Z0-9]{5}-[a-zA-Z0-9]{5}-[a-zA-Z0-9]{5}-[a-zA-Z0-9]{5})\\b/)) {\n setIdType(ID_TYPE_DESLOCK);\n } else if (identificator.match(/\\b([a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12})\\b/)) {\n setIdType(ID_TYPE_EPLI);\n } else if (identificator.match(/\\b([a-zA-Z0-9]{3}-[a-zA-Z0-9]{3}-[a-zA-Z0-9]{3})\\b/)) {\n setIdType(ID_TYPE_PUBLIC_ID);\n } else {\n setIdType(null);\n }\n }, [setIdType]);\n\n const handleSubmit = useCallback(({identificator}) => {\n onSubmit({identificator, idType});\n }, [onSubmit, idType]);\n\n return <Form className='form'\n onChange={handleChange}\n onSubmit={handleSubmit}\n controls={{\n identificator: {\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'Zadejte ID licence',\n },\n value: '',\n valid: false,\n touched: false,\n validation: {\n required: true,\n },\n renderAppend: () => <span className='input-group-btn'>\n <button\n type=\"submit\"\n disabled={!idType}\n className=\"btn btn-primary\"\n >Provést\n </button>\n </span>\n }\n }}\n >\n\n </Form>\n};\n\nRenewForm.propTypes = {\n onSubmit: PropTypes.func\n};\n\nexport default RenewForm;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {FormField} from \"@mouseover/react-form\";\n\nconst AddressFields = ({form}) => (<>\n <FormField form={form}\n name='street'\n label='Ulice'\n elementType='input'\n />\n <FormField form={form}\n name='city'\n label='Město'\n elementType='input'\n />\n <FormField form={form}\n name='zipCode'\n label='PSČ'\n elementType='input'\n />\n</>);\n\nAddressFields.propTypes = {\n form: PropTypes.object\n};\n\nexport default AddressFields;","import React from 'react';\nimport {FormField} from \"@mouseover/react-form\";\nimport PropTypes from \"prop-types\";\n\nconst ContactFields = ({form}) => (<>\n <FormField form={form}\n name='contactFirstname'\n label='Jméno'\n elementType='input'\n />\n <FormField form={form}\n name='contactSurname'\n label='Příjmení'\n elementType='input'\n />\n <FormField form={form}\n name='contactEmail'\n label='Email'\n elementType='input'\n />\n <FormField form={form}\n name='contactPhone'\n label='Telefon'\n elementType='input'\n />\n</>);\n\nContactFields.propTypes = {\n form: PropTypes.object\n};\n\nexport default ContactFields;","import React, {useCallback, useState} from \"react\";\nimport PropTypes from 'prop-types';\nimport {Table} from \"@fik/table\";\n\nconst NameRow = ({item, primary, handleOptionChange, selected}) => (\n <div className=\"radio\">\n <label>\n <input type=\"radio\" className=\"i-checks\"\n value={primary}\n checked={selected === primary}\n onChange={handleOptionChange}\n name=\"selected\"/> {item.addressBook.name}\n </label>\n </div>\n);\n\nNameRow.propTypes = {\n item: PropTypes.object,\n primary: PropTypes.number,\n handleOptionChange: PropTypes.func,\n selected: PropTypes.number\n};\n\n\nconst ChannelPickList = ({items, onPick}) => {\n\n const [selected, setSelected] = useState(null);\n\n const handleOptionChange = useCallback((changeEvent) => {\n const index = parseInt(changeEvent.target.value);\n setSelected(index);\n if (onPick) {\n onPick(items[index], index);\n }\n }, [onPick, items]);\n\n return items\n ? <Table striped responsive\n columns={[\n {\n key: 'name',\n title: 'Název',\n render: ({row:item, primaryValue}) => (<NameRow item={item} primary={primaryValue} selected={selected}\n handleOptionChange={handleOptionChange}/>)\n },\n {\n key: 'companyId',\n title: 'IČ',\n render: ({row:item}) => (item.addressBook.companyId)\n },\n {\n key: 'street',\n title: 'Ulice',\n render: ({row:item}) => (item.addressBook.street)\n },\n {\n key: 'city',\n title: 'Město',\n render: ({row:item}) => (item.addressBook.city)\n },\n {\n key: 'email',\n title: 'E-mail',\n render: ({row:item}) => (item.addressBook.email)\n },\n {\n key: 'phone',\n title: 'Telefon',\n render: ({row:item}) => (item.addressBook.phone)\n }\n ]}\n rows={items}/>\n : null\n\n};\n\nChannelPickList.propTypes = {\n items: PropTypes.array,\n onPick: PropTypes.func\n};\n\nexport default ChannelPickList;","import React, {useCallback, useEffect} from \"react\";\nimport PropTypes from 'prop-types';\nimport {usePureEntity} from \"@fik/entity\";\nimport ChannelPickList from \"./ChannelPickList\";\n\nexport const ChannelPicker = ({entityContext, onPick, params}) => {\n\n const [{entity: items}, load] = usePureEntity(entityContext);\n\n const handlePick = useCallback((values) => {\n onPick(values);\n }, [onPick]);\n\n useEffect(() => {\n load(params);\n }, [params, load]);\n\n return <>\n {items ? <ChannelPickList items={items} onPick={handlePick}/> : null}\n </>;\n};\n\nChannelPicker.propTypes = {\n onPick: PropTypes.func,\n params: PropTypes.shape({\n pattern: PropTypes.string\n })\n};\n\nexport default ChannelPicker;","import React from \"react\";\nimport {SelectInput} from \"@fik/form\";\n\nconst BranchOfficeSelector = ({name, branchOffices, form}) => {\n return <SelectInput label=\"Pobočka\" name={name} form={form}\n options={[{value: '', label: '---'}, ...(branchOffices ? branchOffices.map((item) => ({\n label: item.name,\n value: item.branchOfficeId\n })) : [])]}/>\n}\n\nexport default BranchOfficeSelector;","import React from \"react\";\nimport {SelectInput} from \"@fik/form\";\n\nconst ContactSelector = ({name, contacts, form}) => {\n return <SelectInput label=\"Kontakt\" name={name} form={form}\n options={[{value: '', label: '---'}, ...(contacts ? contacts.map((item) => ({\n label: item.contactSurname + \" \" + item.contactFirstname,\n value: item.contactId\n })) : [])]}/>\n}\n\nexport default ContactSelector;","import React from 'react';\nimport {Address} from '@fik/ui';\nimport PropTypes from \"prop-types\";\n\nconst AddressBook = ({name, ...props}) => {\n return (<React.Fragment>\n <span>{name}</span><br />\n <Address {...props}/>\n </React.Fragment>);\n};\n\nAddressBook.propTypes = {\n name: PropTypes.string,\n street: PropTypes.string,\n zipCode: PropTypes.string,\n city: PropTypes.string\n};\n\nexport default AddressBook;","import React from 'react';\nimport {Address} from '@fik/ui';\n\nconst BranchOffice = (props) => {\n return (<React.Fragment>\n <span>{props.name}</span><br />\n <Address {...props}></Address>\n </React.Fragment>);\n};\n\nexport default BranchOffice;","import React from 'react';\nimport PropTypes from \"prop-types\";\nimport {AddressBookDetail, BranchOfficeDetail, ContactDetail} from \"@fik/components\";\n\nconst Channel = ({addressBook, contact, branchOffice, categoryInfo, viewType, isCustomer}) => {\n return (<div className=\"row\">\n <AddressBookDetail viewType={viewType} isCustomer={isCustomer} addressBook={addressBook} label={isCustomer ? 'Adresa' : 'Firma'}/>\n {branchOffice || !isCustomer ? <BranchOfficeDetail viewType={viewType} branchOffice={branchOffice}/> : null}\n <ContactDetail viewType={viewType} contact={contact} label={isCustomer ? 'Kontakt' : 'Obchodník'} />\n {categoryInfo ? <div className=\"col-sm-4\">{categoryInfo.name}<br/>{categoryInfo.commission}</div> : null}\n </div>);\n};\n\nChannel.propTypes = {\n viewType: PropTypes.string,\n isCustomer: PropTypes.bool,\n addressBook: PropTypes.object,\n categoryInfo: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\n branchOffice: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\n contact: PropTypes.object,\n};\n\nexport default Channel;","import React from 'react';\nimport {Email, Phone} from \"@fik/ui\";\n\nconst Contact = (props) => {\n return (<React.Fragment>\n <div>{props.contactSurname} {props.contactFirstname}</div>\n {props.contactEmail ? (<div><Email email={props.contactEmail} /></div>) : null}\n {props.contactPhone ? (<div><Phone phone={props.contactPhone} /></div>) : null}\n </React.Fragment>);\n};\n\nexport default Contact;","import React from 'react';\nimport {EnumValue} from \"@fik/ui\";\n\nconst Status = (props) => {\n return (<EnumValue {...props} />);\n};\n\nexport default Status;","import React from 'react';\nimport {EnumValue} from \"@fik/ui\";\n\nconst Type = (props) => {\n return (<EnumValue {...props} />);\n};\n\nexport default Type;","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nconst EvidenceItemAmount = ({itemAmount}) => <>{itemAmount || '--'}</>;\n\nEvidenceItemAmount.propTypes = {\n itemAmount: PropTypes.number\n};\n\nexport default EvidenceItemAmount;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nconst EvidenceItemBonusCode = ({itemBonusCode}) => <>{itemBonusCode || '--'}</>;\n\nEvidenceItemBonusCode.propTypes = {\n itemBonusCode: PropTypes.string\n};\n\nexport default EvidenceItemBonusCode;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport {Price} from \"@fik/ui\";\n\nconst EvidenceItemDiscount = ({itemDiscount, itemDiscountName, itemDiscountCompetitor, itemDiscountCompetitorName, itemDiscountCompetitorPrice}) => <>\n {itemDiscount ? <>\n <div>{itemDiscountName} {itemDiscount}%</div>\n {itemDiscountCompetitor && <>\n <div className=\"row\">\n <div className=\"col-sm-12 font-bold\">Informace o současném řešení</div>\n </div>\n <div className='row'>\n <div className=\"col-xs-4 order-item-value-label\">Výrobce řešení:</div>\n <div className=\"col-xs-8 order-item-value\">{itemDiscountCompetitor}</div>\n </div>\n <div className='row'>\n <div className=\"col-xs-4 order-item-value-label\">Název produktu:</div>\n <div className=\"col-xs-8 order-item-value\">{itemDiscountCompetitorName}</div>\n </div>\n <div className='row'>\n <div className=\"col-xs-4 order-item-value-label\">Cena:</div>\n <div className=\"col-xs-8 order-item-value\">{itemDiscountCompetitorPrice ? <Price price={parseFloat(itemDiscountCompetitorPrice)} /> : null}</div>\n </div>\n </>}\n </> : '--'}\n</>;\n\nEvidenceItemDiscount.propTypes = {\n itemDiscount: PropTypes.number\n};\n\nexport default EvidenceItemDiscount;\n","import React from \"react\";\nimport {Date} from \"@fik/ui\";\nimport PropTypes from \"prop-types\";\n\nconst EvidenceItemName = ({itemCode, itemName, itemLicenseIdCodes, itemRansomExpirationDate, itemExpirationDate, itemExtraDays}) => <>\n <div>{itemCode} {itemName}</div>\n {itemLicenseIdCodes ? (<div>{itemLicenseIdCodes}</div>) : null}\n {itemRansomExpirationDate ? (<div>ESET výkupné do: <Date date={itemRansomExpirationDate}/></div>) : null}\n {itemExpirationDate ? (<div>Datum expirace: <Date date={itemExpirationDate}/></div>) : null}\n {itemExtraDays ? (<div>Dny navíc: {itemExtraDays}</div>) : null}\n</>;\n\nEvidenceItemName.propTypes = {\n itemCode: PropTypes.string,\n itemLicenseIdCodes: PropTypes.string,\n itemRansomExpirationDate: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n itemExpirationDate: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n itemExtraDays: PropTypes.oneOfType([PropTypes.string, PropTypes.object])\n};\n\nexport default EvidenceItemName;\n","import React from \"react\";\nimport {Price} from \"@fik/ui\";\nimport PropTypes from \"prop-types\";\n\nconst EvidenceItemPrice = ({channel, itemCurrency, ...props}) => <>\n {props[channel] ? (<Price price={props[channel].itemPrice} currency={itemCurrency}/>) : '--'}\n</>;\n\nEvidenceItemPrice.propTypes = {\n itemPrice: PropTypes.number,\n itemCurrency: PropTypes.string,\n channel: PropTypes.string\n};\n\n\nexport default EvidenceItemPrice;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nconst EvidenceItemPromo = ({itemPromoDiscount}) => <>\n {itemPromoDiscount || '--'}\n</>;\n\nEvidenceItemPromo.propTypes = {\n itemPromoDiscount: PropTypes.number\n};\n\nexport default EvidenceItemPromo;\n","export const arrayToDictionary = (array, key, label) => {\n return array && Array.isArray(array)\n ? array.reduce(\n (obj, item) => {\n obj[item[key]] = item[label];\n return obj;\n },\n {}\n ) : {};\n};\n\nexport default arrayToDictionary;","import React from \"react\";\nimport {useDials} from \"@fik/dials\";\nimport {EnumValue} from \"@fik/ui\";\nimport arrayToDictionary from \"@fik/utils/arrayToDictionary\";\n\nconst EvidenceItemPromoWithName = ({itemPromoDiscount, itemPromoId, itemPromoName}) => {\n const {promos} = useDials({name: 'esetEvidenceItem'});\n return itemPromoId ? <div>\n {itemPromoDiscount && <div className='pull-right'>{itemPromoDiscount} %</div>}\n <EnumValue value={itemPromoId} enum={arrayToDictionary(promos, 'promoId', 'promoName')} />\n </div>: null;\n}\n\nexport default EvidenceItemPromoWithName;\n","function isEmptyChannel(channelValues) {\n return !(channelValues && channelValues.addressBook && channelValues.addressBook.name);\n}\n\nexport default isEmptyChannel;","import {useReducer, useCallback} from 'react';\nimport shallowEqual from \"react-redux/es/utils/shallowEqual\";\nimport isEmptyChannel from \"../utils/isEmptyChannel\";\n\n/**\n * User confirm changes after owner/customer edit\n *\n * @type {string}\n */\nconst CONFIRM_CUSTOMER_CHANGE = 'CONFIRM_CUSTOMER_CHANGE';\n\n/**\n * User confirm changes after partner edit\n *\n * @type {string}\n */\nconst CONFIRM_PARTNER_CHANGE = 'CONFIRM_PARTNER_CHANGE';\n\n/**\n * Sets initial document values\n *\n * @type {string}\n */\nconst SET_DOCUMENT = 'SET_DOCUMENT';\n\n/**\n * Reset customer to initial values (from SET_DOCUMENT action values)\n *\n * @type {string}\n */\nconst RESET_CUSTOMER = 'RESET_CUSTOMER';\n\n/**\n * Some document values was changed by user\n *\n * @type {string}\n */\nconst CHANGE_VALUES = 'CHANGE_VALUES';\n\n/**\n * User invokes concrete item removal\n *\n * @type {string}\n */\nconst REMOVE_EXISTING_EVIDENCE_ITEM = 'REMOVE_EXISTING_EVIDENCE_ITEM';\n\n/**\n * User confirm existing evidence item new values\n *\n * @type {string}\n */\nconst REPLACE_EVIDENCE_ITEM = 'REPLACE_EVIDENCE_ITEM';\n\n/**\n * User confirm new evidence item values\n *\n * @type {string}\n */\nconst ADD_EVIDENCE_ITEM = 'ADD_EVIDENCE_ITEM';\n\n/**\n * User adds attachment\n *\n * @type {string}\n */\nconst ADD_ATTACHMENT = 'ADD_ATTACHMENT';\n\n/**\n * User adds attachments\n *\n * @type {string}\n */\nconst ADD_ATTACHMENTS = 'ADD_ATTACHMENTS';\n\n/**\n * User removes attachment\n *\n * @type {string}\n */\nconst REMOVE_ATTACHMENT = 'REMOVE_ATTACHMENT';\n\nconst initialState = {\n shouldValidate: false,\n document: null,\n initialized: false,\n existing: false,\n emptyDocument: {owner: {}},\n potentialOwner: false\n};\n\nconst replaceDocumentEvidenceItem = (document, oldItem, newItem) => {\n const evidenceItems = Array.isArray(document.evidenceItems) ? [...document.evidenceItems] : [];\n const index = evidenceItems.indexOf(oldItem);\n if (index >= 0) {\n evidenceItems[index] = newItem;\n }\n return {...document, evidenceItems};\n};\n\n/**\n * Checks if new document values actualy change state.\n * If so return new state. If not return old (no state changes, no refresh, no render, no validation)\n *\n * @param state\n * @param newDocumentValues\n * @returns {{document, shouldValidate: boolean}|*}\n */\nconst changeDocumentWithShouldValidateCheck = (state, newDocumentValues) => {\n const document = {...state.document, ...newDocumentValues};\n if (!shallowEqual(state.document, document)) {\n return {\n ...state,\n shouldValidate: !newDocumentValues.hasOwnProperty('customContractId'),\n document\n }\n }\n\n return state;\n};\n\nconst documentReducer = (state, action) => {\n switch (action.type) {\n case SET_DOCUMENT:\n return {\n ...state,\n initialized: true,\n shouldValidate: !!action.existing,\n existing: !!action.existing,\n document: {...action.document},\n potentialOwner: false,\n emptyDocument: {...action.document} // TODO with prefiled licence etc is not true\n };\n\n case CONFIRM_CUSTOMER_CHANGE:\n const newOwner = {...action.owner};\n if (newOwner.addressBook && newOwner.contact) {\n //- pokud to neni firma nevyplnuje se name\n if (!newOwner.addressBook.companyId) {\n newOwner.addressBook.email = newOwner.contact.contactEmail;\n newOwner.addressBook.phone = newOwner.contact.contactPhone;\n newOwner.addressBook.name = newOwner.contact.contactSurname + ' ' + newOwner.contact.contactFirstname;\n } else if (!newOwner.addressBook.addressBookId) {\n newOwner.addressBook.email = newOwner.contact.contactEmail;\n newOwner.addressBook.phone = newOwner.contact.contactPhone;\n }\n }\n const newState = changeDocumentWithShouldValidateCheck(state, {owner: newOwner});\n newState.potentialOwner = false;\n if (newState === state && !state.existing) {\n return {\n ...newState,\n existing: true\n }\n }\n return newState;\n\n case CONFIRM_PARTNER_CHANGE:\n const newPartner = {...action.partner};\n return changeDocumentWithShouldValidateCheck(state, {partner: newPartner});\n\n case RESET_CUSTOMER:\n return {\n ...state,\n existing: false,\n potentialOwner: false,\n document: {...state.document, owner: state.emptyDocument.owner},\n };\n\n case ADD_EVIDENCE_ITEM:\n const evidenceItems = Array.isArray(state.document.evidenceItems) ? [...state.document.evidenceItems] : [];\n evidenceItems.push(action.evidenceItem);\n return {\n ...state,\n shouldValidate: true,\n potentialOwner: isEmptyChannel(state.document.owner) && evidenceItems.length === 1 && action.evidenceItem.itemLicenseIdCodes,\n document: {...state.document, evidenceItems},\n };\n\n case ADD_ATTACHMENT:\n const attachments = Array.isArray(state.document.attachments) ? [...state.document.attachments] : [];\n attachments.push(action.attachment);\n return {\n ...state,\n shouldValidate: true,\n document: {...state.document, attachments},\n };\n\n case ADD_ATTACHMENTS:\n\n return {\n ...state,\n shouldValidate: true,\n document: {\n ...state.document,\n //- kdyz uz nejake ma tak se spoji jinak se jen pridaji\n attachments: Array.isArray(state.document.attachments) ? [...state.document.attachments, ...action.attachments] : action.attachments\n },\n };\n\n case REMOVE_ATTACHMENT:\n const currentAttachments = [...state.document.attachments];\n currentAttachments.splice(currentAttachments.indexOf(action.attachment), 1);\n\n return {\n ...state,\n shouldValidate: true,\n document: {\n ...state.document,\n attachments: currentAttachments\n }\n };\n\n\n case REPLACE_EVIDENCE_ITEM:\n return {\n ...state,\n shouldValidate: true,\n document: replaceDocumentEvidenceItem(state.document, action.oldItem, action.newItem),\n };\n\n case CHANGE_VALUES:\n return changeDocumentWithShouldValidateCheck(state, action.values);\n\n case REMOVE_EXISTING_EVIDENCE_ITEM:\n const currentEvidenceItems = [...state.document.evidenceItems];\n currentEvidenceItems.splice(currentEvidenceItems.indexOf(action.evidenceItem), 1);\n\n return {\n ...state,\n shouldValidate: true,\n document: {\n ...state.document,\n evidenceItems: currentEvidenceItems\n }\n };\n\n default:\n return state;\n }\n};\n\nexport const useDocument = ({validate, isEpc}) => {\n const [state, dispatch] = useReducer(documentReducer, initialState);\n\n const confirmCustomerChange = useCallback((owner) => {\n dispatch({type: CONFIRM_CUSTOMER_CHANGE, owner});\n }, [dispatch]);\n\n const confirmPartnerChange = useCallback((partner) => {\n dispatch({type: CONFIRM_PARTNER_CHANGE, partner});\n }, [dispatch]);\n\n const setDocument = useCallback((document, existing = false) => {\n dispatch({type: SET_DOCUMENT, document, existing});\n }, [dispatch]);\n\n const resetCustomer = useCallback(() => {\n dispatch({type: RESET_CUSTOMER});\n }, [dispatch]);\n\n const addEvidenceItem = useCallback((evidenceItem) => {\n dispatch({type: ADD_EVIDENCE_ITEM, evidenceItem});\n }, [dispatch]);\n\n const removeExitingEvidenceItem = useCallback((evidenceItem) => {\n dispatch({type: REMOVE_EXISTING_EVIDENCE_ITEM, evidenceItem});\n }, [dispatch]);\n\n const changeValues = useCallback((values) => {\n dispatch({type: CHANGE_VALUES, values});\n }, [dispatch]);\n\n const addAttachment = useCallback((attachment) => {\n dispatch({type: ADD_ATTACHMENT, attachment});\n }, [dispatch]);\n\n const removeAttachment = useCallback((attachment) => {\n dispatch({type: REMOVE_ATTACHMENT, attachment});\n }, [dispatch]);\n\n const addAttachments = useCallback((attachments) => {\n dispatch({type: ADD_ATTACHMENTS, attachments});\n }, [dispatch]);\n\n const replaceEvidenceItem = useCallback((oldItem, newItem) => {\n dispatch({type: REPLACE_EVIDENCE_ITEM, oldItem, newItem});\n }, [dispatch]);\n\n return {\n initialDocument: state.emptyDocument,\n document: state.document,\n isCustomerFilled: state.document && !isEmptyChannel(state.document.owner),\n isPartnerFilled: state.document && !isEmptyChannel(state.document.partner),\n existing: state.existing,\n initialized: state.initialized,\n shouldValidate: validate === true ? state.shouldValidate : false,\n setDocument,\n confirmCustomerChange,\n confirmPartnerChange,\n resetCustomer,\n changeValues,\n addAttachment,\n addAttachments,\n removeAttachment,\n removeExitingEvidenceItem,\n replaceEvidenceItem,\n addEvidenceItem,\n potentialOwner: state.potentialOwner,\n isEpc\n }\n};\n\nexport default useDocument;","import React from 'react';\n\nexport const DocumentContext = React.createContext(null);","import {useContext} from \"react\";\nimport {DocumentContext} from \"./DocumentContext\";\n\nexport const useDocumentContext = () => useContext(DocumentContext);","import {useCallback, useReducer} from 'react';\nimport {createActionNames, createRequestState} from \"@fik/api\";\nimport {useModel, promiseWrapper} from \"@fik/model\";\nimport {useHookToLoading} from \"@fik/loading\";\n\nconst actionTypes = createActionNames('save');\n\nconst initialState = {\n result: null,\n args: null,\n isFetching: false,\n isSuccess: false,\n isFailed: false,\n};\n\nconst reducer = (state, action) => {\n switch (action.type) {\n case actionTypes.FETCH_INIT:\n return {\n ...state,\n result: null,\n documentType: action.documentType,\n ...createRequestState(actionTypes, action.type)\n\n };\n\n case actionTypes.FETCH_SUCCESS:\n return {\n ...state,\n result: {\n ...action.payload,\n },\n ...createRequestState(actionTypes, action.type)\n\n };\n\n case actionTypes.FETCH_FAILURE:\n return {\n ...state,\n result: {\n ...action.payload,\n },\n ...createRequestState(actionTypes, action.type)\n };\n\n default:\n return state;\n }\n};\n\nconst createDocumentOperation = (documentModel) => async (operation, dispatch, ...args) => {\n dispatch({type: actionTypes.FETCH_INIT, args});\n\n const {isSuccess, data} = await promiseWrapper(documentModel[operation], ...args);\n\n if (isSuccess) {\n dispatch({type: actionTypes.FETCH_SUCCESS, payload: data, args});\n } else {\n dispatch({type: actionTypes.FETCH_FAILURE, payload: data, args});\n }\n};\n\nexport const useDocumentOperation = (operation) => {\n const dispatchOperation = useModel(\n (model) => createDocumentOperation(model.document()),\n []\n );\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n useHookToLoading(`documentOperation-${operation}`, state);\n\n const perform = useCallback((...args) => {\n dispatchOperation(operation, dispatch, ...args);\n }, [dispatchOperation, operation, dispatch]);\n\n return {\n isFetching: state.isFetching,\n isSuccess: state.isSuccess,\n isFailed: state.isFailed,\n result: state.result,\n perform\n }\n};\n\nexport default useDocumentOperation;","import {useCallback, useReducer} from 'react';\nimport {createActionNames, createRequestState} from \"@fik/api\";\nimport {useModel, promiseWrapper} from \"@fik/model\";\nimport {useHookToLoading} from \"@fik/loading\";\n\nconst saveActions = createActionNames('save');\n\nconst initialState = {\n result: null,\n documentType: null,\n isFetching: false,\n isSuccess: false,\n isFailed: false,\n};\n\nconst saveReducer = (state, action) => {\n switch (action.type) {\n case saveActions.FETCH_INIT:\n return {\n ...state,\n result: null,\n documentType: action.documentType,\n ...createRequestState(saveActions, action.type)\n\n };\n\n case saveActions.FETCH_SUCCESS:\n return {\n ...state,\n result: {\n ...action.payload,\n },\n ...createRequestState(saveActions, action.type)\n\n };\n\n case saveActions.FETCH_FAILURE:\n return {\n ...state,\n result: {\n ...action.payload,\n },\n ...createRequestState(saveActions, action.type)\n };\n\n default:\n return state;\n }\n};\n\nconst createDocumentSave = (documentModel) => async (document, documentType, dispatch) => {\n dispatch({type: saveActions.FETCH_INIT, document, documentType});\n const {isSuccess, data} = await promiseWrapper(documentModel.save, documentType, document);\n\n if (isSuccess) {\n dispatch({type: saveActions.FETCH_SUCCESS, payload: data, document});\n } else {\n dispatch({type: saveActions.FETCH_FAILURE, payload: data, document});\n }\n};\n\nexport const useDocumentSave = () => {\n const save = useModel(\n (model) => createDocumentSave(model.document()),\n []\n );\n\n const [state, dispatch] = useReducer(saveReducer, initialState);\n\n const saveDocument = useCallback((documentType, document) => {\n save(document, documentType, dispatch);\n }, [save, dispatch]);\n\n useHookToLoading(`${state.documentType}-save`, state);\n\n return {\n isSaving: state.isFetching,\n isSaved: state.isSuccess,\n isFailed: state.isFailed,\n documentType: state.documentType,\n messages: state.result && state.result.messages ? state.result.messages : [],\n result: state.result,\n saveDocument\n }\n};\n\nexport default useDocumentSave;","import {useEffect, useReducer, useCallback} from 'react';\nimport {createActionNames, createRequestState} from \"@fik/api\";\nimport {useModel} from \"@fik/model\";\nimport {useHookToLoading} from \"@fik/loading\";\n\nconst validateActions = createActionNames('validate');\n\nconst createValidate = (documentModel, documentType) => async (document, dispatch) => {\n dispatch({type: validateActions.FETCH_INIT, document});\n try {\n const payload = await documentModel.validate(documentType, document);\n dispatch({type: validateActions.FETCH_SUCCESS, payload, document});\n } catch (error) {\n dispatch({type: validateActions.FETCH_FAILURE, document});\n }\n};\n\nconst filterAvailableButtons = (documentTypes, buttons) => {\n return buttons.reduce((available, button) => {\n if (documentTypes.indexOf(button.documentType) >= 0) {\n available.push(button);\n }\n return available;\n }, []);\n};\n\nconst buttons = [\n {\n documentType: 'order',\n label: 'Objednat'\n },\n {\n documentType: 'offer',\n label: 'Nabídnout'\n },\n {\n documentType: 'projectPrice',\n label: 'Zažádat o projektovou cenu'\n }\n];\n\nconst initialState = {\n document: null,\n availableButtons: [],\n result: {\n valid: false,\n messages: [],\n possibleDocumentTypes: [],\n isLimitedByCredit: false,\n projectPrice: false,\n resellerDocument: true,\n },\n isFetching: false,\n isSuccess: false,\n isFailed: false,\n};\n\nconst validationReducer = (state, action) => {\n switch (action.type) {\n case validateActions.FETCH_INIT:\n return {\n ...initialState,\n document: action.document,\n ...createRequestState(validateActions, action.type)\n };\n\n case validateActions.FETCH_SUCCESS:\n return {\n ...state,\n result: {\n ...action.payload,\n },\n ...createRequestState(validateActions, action.type),\n availableButtons: filterAvailableButtons(action.payload.possibleDocumentTypes, buttons)\n };\n\n case validateActions.FETCH_FAILURE:\n return {\n ...state,\n ...createRequestState(validateActions, action.type),\n availableButtons: []\n };\n default:\n return state;\n }\n};\n\nconst useDocumentValidator = ({document, shouldValidate, documentType}) => {\n\n const validate = useModel(\n (model) => createValidate(model.document(), documentType),\n []\n );\n\n const [state, dispatch] = useReducer(validationReducer, initialState);\n\n useHookToLoading('document-validate', state);\n\n const validateDocument = useCallback((document) => {\n validate({\n ...document,\n // je nutne odstranit obsah priloh - tzn neposilat je k validaci s kazdou zmenou (maji az 2mb povolene)\n attachments: document.attachments.map(attachment => ({...attachment, attachmentContent: null}))\n }, dispatch);\n }, [validate, dispatch]);\n\n useEffect(() => {\n if (shouldValidate) {\n validateDocument(document);\n }\n }, [document, shouldValidate, validateDocument]);\n\n return {\n validateDocument,\n availableButtons: state.availableButtons,\n valid: state.result.valid,\n validationMessages: state.result.messages || [],\n }\n};\n\nexport default useDocumentValidator;\n","const documentViews = {\n EDIT_CUSTOMER: 'EDIT_CUSTOMER',\n EDIT_CUSTOMER_PICK: 'EDIT_CUSTOMER_PICK',\n EDIT_CUSTOMER_EDIT: 'EDIT_CUSTOMER_EDIT',\n PICK_PARTNER: 'PICK_PARTNER',\n EDIT_PARTNER: 'EDIT_PARTNER',\n EDIT_EVIDENCE_ITEMS: 'EDIT_EVIDENCE_ITEMS',\n VIEW: 'VIEW'\n};\n\nexport default documentViews;\n","export const emptyItem = {\n itemName: null,\n itemProductTypeId: null,\n itemProductFamilyId: null,\n itemProductPeriodId: null,\n itemAmount: null,\n itemDiscount: null,\n itemDiscountId: null,\n itemDiscountCompetitor: null,\n itemDiscountCompetitorName: null,\n itemDiscountCompetitorPrice: null,\n itemExtraDays: null,\n itemPromoId: null,\n itemBonusCode: null,\n itemBasePrice: null,\n itemMessages: [],\n owner: {\n itemPrice: null\n },\n partner: {\n itemPrice: null,\n addressBookId: null\n },\n epc: {\n itemPrice: null,\n addressBookId: null\n },\n itemLicenseIdCodes: null\n};\n\nconst createEvidenceItemModel = (adapter) => {\n\n return {\n select:(params)=> {\n return adapter().get({...params, action: 'selector'});\n },\n recalculate: (selection) => {\n return adapter().post({action: 'recalculate'}, selection);\n },\n emptyItem\n }\n};\n\nexport default createEvidenceItemModel;","import {useCallback, useEffect, useState} from \"react\";\nimport documentViews from \"./documentViews\";\nimport {emptyItem} from \"@fik/model/createEvidenceItemModel\";\n\nconst SELECT_TYPE_NEW = 'new';\nconst SELECT_TYPE_RENEW = 'renew';\nconst EMPTY_CONTEXT = {selection: null, evidenceItem: null};\n\nconst useDocumentEditEvidenceItems = ({isCompany, setView, documentModel}) => {\n const [evidenceItemEditContext, setEvidenceItemEditContext] = useState({type: null, evidenceItem: null});\n\n const editEvidenceItem = useCallback((context) => {\n setEvidenceItemEditContext(context);\n setView(documentViews.EDIT_EVIDENCE_ITEMS);\n }, [setView]);\n\n const startEditNewEvidenceItem = useCallback((evidenceItem) => {\n editEvidenceItem({\n selection: {\n ...(evidenceItem || emptyItem),\n selectType: SELECT_TYPE_NEW,\n isCompany: isCompany\n }\n });\n }, [editEvidenceItem, isCompany]);\n\n const startEditNewRenewEvidenceItem = useCallback((evidenceItem = {}) => {\n editEvidenceItem({\n selection: {\n ...emptyItem,\n ...evidenceItem,\n selectType: SELECT_TYPE_RENEW,\n isCompany: isCompany\n }\n });\n }, [editEvidenceItem, isCompany]);\n\n const startEditExistingEvidenceItem = useCallback((evidenceItem) => {\n editEvidenceItem({\n evidenceItem,\n selection: {\n ...evidenceItem,\n selectType: evidenceItem.itemLicenseIdCodes ? SELECT_TYPE_RENEW : SELECT_TYPE_NEW,\n isCompany: isCompany\n }\n });\n }, [editEvidenceItem, isCompany]);\n\n const leaveEvidenceItemEdit = useCallback(() => {\n setEvidenceItemEditContext({selection: null, evidenceItem: null});\n setView(documentViews.VIEW);\n }, [setView]);\n\n const confirmEvidenceItemEdit = useCallback((evidenceItem) => {\n\n if (evidenceItemEditContext.evidenceItem) {\n documentModel.replaceEvidenceItem(evidenceItemEditContext.evidenceItem, evidenceItem);\n leaveEvidenceItemEdit();\n } else {\n documentModel.addEvidenceItem(evidenceItem);\n }\n\n setEvidenceItemEditContext({...EMPTY_CONTEXT});\n setView(documentViews.VIEW);\n\n }, [evidenceItemEditContext.evidenceItem, leaveEvidenceItemEdit, documentModel, setView]);\n\n useEffect (() => {\n if (documentModel.document && documentModel.document.owner) {\n const owner = documentModel.document.owner;\n if (owner.licenseCode && documentModel.document.evidenceItems && documentModel.document.evidenceItems.length < 1) {\n startEditNewRenewEvidenceItem({itemLicenseIdCodes: owner.licenseCode});\n setView(documentViews.EDIT_EVIDENCE_ITEMS);\n }\n }\n }, [documentModel.document, startEditNewRenewEvidenceItem]);\n\n return {\n ...evidenceItemEditContext,\n startEditNewEvidenceItem,\n startEditNewRenewEvidenceItem,\n startEditExistingEvidenceItem,\n confirmEvidenceItemEdit,\n cancelEvidenceItemEdit: leaveEvidenceItemEdit\n }\n};\n\nexport default useDocumentEditEvidenceItems;","import {usePureEntity} from \"@fik/entity\";\nimport {useCallback, useEffect} from \"react\";\n\n\nconst useCompanyRegistrySearch = () => {\n const [{entity:results}, load] = usePureEntity({name: 'customer', params: {action: 'search-registry'}});\n\n const search = useCallback((pattern, source) => {\n load({pattern, source});\n }, [load])\n\n return [results, search];\n}\n\nexport default useCompanyRegistrySearch;","import React, {useCallback, useEffect, useRef, useState} from \"react\";\nimport handleClick from \"@fik/utils/handleClick\";\nimport useDropdown from \"@fik/ui/DropDown/useDropDown\";\n\nconst CompaniesDropDown = ({items, onSelect, onClose}) => {\n const {element, isOpen, setIsOpen, toggle} = useDropdown();\n const [canBeClosed, setCanBeClosed] = useState();\n\n useEffect(() => {\n setIsOpen((items && items.length > 0) || false);\n setCanBeClosed(true);\n }, [items, setCanBeClosed]);\n\n useEffect(()=> {\n console.log('[isOpen]', isOpen);\n if (onClose && !isOpen && canBeClosed) {\n onClose();\n }\n }, [onClose, isOpen, canBeClosed]);\n\n const handleSelect = useCallback((item) => {\n setIsOpen(false);\n if (onSelect) {\n onSelect(item);\n }\n }, [onSelect, setIsOpen]);\n\n return isOpen && items ? <ul ref={element} className='dropdown-menu open' style={{zIndex: 9999991}} role=\"menu\">\n {items.map((item, index) => {\n const {name, city, companyId} = item;\n return <li key={index}>\n <a href=\"#\" onClick={handleClick(() => handleSelect(item))}>{name}, {companyId}, {city}</a>\n </li>;\n })}\n </ul> : null;\n}\n\nexport default CompaniesDropDown;","import React, {useCallback, useState} from 'react';\nimport {FormField} from \"@mouseover/react-form\";\nimport PropTypes from \"prop-types\";\nimport handleClick from \"@fik/utils/handleClick\";\nimport useCompanyRegistrySearch from \"../useCompanyRegistrySearch\";\nimport {getOnPath} from \"@mouseover/js-utils/src\";\nimport CompaniesDropDown from \"./CompaniesDropDown\";\n\nconst COMPANY_FIELDS = {name: '', companyId: '', vatId: '', street: '', city: '', zipCode: ''};\n\nconst CompanyFields = ({form, onSearchRegistry}) => {\n const [registrySearchResult, searchRegistry] = useCompanyRegistrySearch();\n const [path, setPath] = useState();\n\n const handleSearchRegistry = useCallback((source) => {\n setPath(source);\n searchRegistry(getOnPath(form, ['values', source]), source);\n }, [form, searchRegistry, setPath]);\n\n const handleSelectCompany = useCallback((addressBook) => {\n\n form.setValues({\n ...COMPANY_FIELDS,\n ...{\n name: addressBook.name,\n companyId: addressBook.companyId,\n vatId: addressBook.vatId,\n street: addressBook.street,\n city: addressBook.city,\n zipCode: addressBook.zipCode\n }\n });\n }, [form]);\n\n const handleClose = useCallback(() => {\n if (path) {\n setPath(null);\n }\n }, [path, setPath]);\n\n return (<>\n <div className=\"col-sm-6\">\n <FormField form={form}\n renderPrepend={() => <span className='input-group-btn'>\n <button className='btn btn-default' onClick={handleClick(() => handleSearchRegistry('name'))}><i className='fa fa-search' /></button>\n </span>}\n name='name'\n label='Název'\n elementType='input'\n elementConfig={{'autoComplete': 'nope'}}\n />\n {registrySearchResult && path === 'name' ? <CompaniesDropDown items={registrySearchResult} onSelect={handleSelectCompany} onClose={handleClose} /> : null}\n </div>\n <div className=\"col-sm-3\">\n <FormField form={form}\n renderPrepend={() => <span className='input-group-btn'>\n <button className='btn btn-default' onClick={handleClick(() => handleSearchRegistry('companyId'))}><i className='fa fa-search' /></button>\n </span>}\n name='companyId'\n label='IČ'\n elementType='input'\n elementConfig={{'autoComplete': 'nope'}}\n />\n {registrySearchResult && path === 'companyId' ? <CompaniesDropDown items={registrySearchResult} onSelect={handleSelectCompany} onClose={handleClose} /> : null}\n </div>\n <div className=\"col-sm-3\">\n <FormField form={form}\n name='vatId'\n label='DIČ'\n elementType='input'\n elementConfig={{'autoComplete': 'nope'}}\n />\n </div>\n </>);\n}\n\nCompanyFields.propTypes = {\n form: PropTypes.object\n};\n\nexport default CompanyFields;","import React, {useCallback, useEffect, useMemo, useRef} from 'react';\nimport {useFormContainer, Form} from \"@mouseover/react-form\";\nimport {ContactFields, AddressFields} from \"@fik/components\";\nimport {mergeDeep} from \"@mouseover/js-utils\";\nimport handleClick from \"@fik/utils/handleClick\";\nimport PropTypes from \"prop-types\";\nimport CompanyFields from \"./CompanyFields\";\nimport {Col, Row} from \"@fik/ui\";\n\nconst Controls = ({form}) => {\n const contact = useFormContainer('contact', form);\n const addressBook = useFormContainer('addressBook', form);\n\n useEffect(() => {\n if (contact.values.contactEmail !== addressBook.values.email) {\n addressBook.setValue(contact.values.contactEmail, 'email');\n }\n if (contact.values.contactPhone !== addressBook.values.phone) {\n addressBook.setValue(contact.values.contactPhone, 'phone');\n }\n }, [contact.values, addressBook]);\n\n return (\n <>\n <div className=\"row\">\n <div className=\"col-sm-6\">\n <h3>Kontakt</h3>\n <ContactFields form={contact}/>\n </div>\n <div className=\"col-sm-6\">\n <h3>Adresa</h3>\n <AddressFields form={addressBook}/>\n </div>\n </div>\n </>\n )\n};\n\nControls.propTypes = {\n form: PropTypes.object\n};\n\nconst CustomerCompanyControls = ({form, isCompany}) => {\n const addressBook = useFormContainer('addressBook', form);\n\n useIsCompany({form, isCompany});\n\n return form.values && form.values.isCompany ? <>\n <Row>\n <Col lg={12}>\n <h3>Firma</h3>\n </Col>\n </Row>\n <div className='row'>\n <CompanyFields form={addressBook}/>\n </div>\n </>\n : null;\n};\n\nCustomerCompanyControls.propTypes = {\n form: PropTypes.shape({\n values: PropTypes.object\n }),\n isCompany: PropTypes.bool\n};\n\nconst validationRules = {\n contact: {\n children: {\n contactFirstname: {\n required: true\n },\n contactSurname: {\n required: true\n },\n contactEmail: {\n required: true,\n email: true\n },\n contactPhone: {\n required: false,\n pattern: {\n message: 'Špatný formát telefonu (+420...)',\n params: '^(\\\\+420)[0-9]{9}$'\n }\n }\n }\n },\n addressBook: {\n children: {\n zipCode: {\n required: false,\n minLength: 5,\n maxLength: 5,\n pattern: {\n message: 'PSČ musí být číslo',\n params: '([0-9]\\s*){5}'\n }\n }\n }\n }\n};\n\nconst companyValidationRules = mergeDeep(\n validationRules, {\n addressBook: {\n children: {\n name: {\n required: true\n },\n companyId: {\n required: true\n },\n }\n }\n });\n\n\nconst useIsCompany = ({form, isCompany}) => {\n const {values, setValue} = form;\n const isCompanyRef = useRef(values.isCompany);\n\n useEffect(() => {\n isCompanyRef.current = values.isCompany;\n }, [values]);\n\n useEffect(() => {\n if (isCompanyRef.current !== isCompany) {\n setValue(isCompany, 'isCompany');\n }\n }, [isCompanyRef, setValue, isCompany]);\n};\n\nconst CustomerForm = ({values, onChange, onSubmit, onReset, isCompany}) => {\n const handleSubmit = useCallback((values, valid) => {\n if (valid) {\n onSubmit(values, valid);\n }\n }, [onSubmit]);\n\n return (<div>\n <Form\n autoComplete='off'\n values={values}\n validationRules={useMemo(() => isCompany ? companyValidationRules : validationRules, [isCompany])}\n onChange={onChange}\n onSubmit={handleSubmit}\n render={(form) => (<>\n <CustomerCompanyControls form={form} isCompany={isCompany}/>\n <Controls form={form}/>\n <div className='form-group'>\n <div className='pull-right'>\n <button onClick={handleClick(onReset)} className=\"btn btn-danger m-r-sm\">Zrušit</button>\n <button\n type=\"submit\"\n className={\"btn \" + (!form.validation.valid ? \"btn-warning\" : \"btn-success\")}\n >Pokračovat\n </button>\n </div>\n <div className='clearfix'/>\n </div>\n </>)}/>\n </div>)\n};\nCustomerForm.propTypes = {\n values: PropTypes.object,\n isCompany: PropTypes.bool,\n onChange: PropTypes.func,\n onSubmit: PropTypes.func,\n onReset: PropTypes.func,\n};\n\nexport default CustomerForm;","import {useEffect, useRef} from \"react\";\n\nconst useRefOn = (value) => {\n const ref = useRef(value);\n useEffect(() => {\n ref.current = value;\n }, [value]);\n\n return ref;\n};\n\nexport default useRefOn;","import {useReducer, useCallback, useEffect, useMemo, useRef} from 'react';\nimport useRefOn from \"@fik/utils/useRefOn\";\nimport isEmptyChannel from \"@fik/utils/isEmptyChannel\";\n\nconst actions = {\n CANCEL_EDIT: 'CANCEL_EDIT',\n CONFIRM_EDIT: 'CONFIRM_EDIT',\n DOCUMENT_INITIALIZED: 'DOCUMENT_INITIALIZED',\n PICK_NEW_HOME_USER: 'PICK_NEW_HOME_USER',\n PICK_NEW_COMPANY: 'PICK_NEW_COMPANY',\n CUSTOMER_IS_HOME_USER: 'CUSTOMER_IS_HOME_USER',\n CUSTOMER_IS_COMPANY: 'CUSTOMER_IS_COMPANY',\n PICK_NEW_EXISTING: 'PICK_NEW_EXISTING',\n EXISTING_CHOOSED: 'EXISTING_CHOOSED',\n EDIT: 'EDIT'\n};\n\nexport const views = {\n PICK: 'pick',\n VIEW: 'view',\n HOME: 'homeUser',\n COMPANY: 'company',\n EDIT: 'edit',\n EXISTING: 'existing',\n PREPARING: 'none'\n};\n\nexport const DEFAULT_VIEWS = [views.HOME, views.COMPANY, views.EXISTING];\n\nconst initialState = {\n initialValues: null,\n values: null,\n previousViewType: views.PREPARING,\n viewType: views.PREPARING,\n params: null,\n prefilledValue: null\n};\n\nconst emptyValues = {\n addressBook: {name: null, street: null, city: null, zipcode: null, companyId: null},\n contact: {contactFirstname: null, contactSurname: null, contactEmail: null, contactPhone: null}\n};\n\nfunction prepareValues(channelValues) {\n return channelValues ? {\n ...emptyValues,\n ...channelValues,\n contact: channelValues && channelValues.contact ? channelValues.contact : emptyValues.contact\n } : {...emptyValues};\n}\n\nfunction isOnOneOfCustomerEditView(view) {\n return view === views.EDIT || view === views.PICK || view === views.EXISTING || view === views.HOME || view === views.COMPANY;\n}\n\nconst documentCustomerReducer = (state, action) => {\n switch (action.type) {\n case actions.PICK_NEW_HOME_USER:\n return {\n ...state,\n values: {...emptyValues},\n previousViewType: state.viewType,\n viewType: views.EDIT,\n customerType: views.HOME,\n params: null\n };\n\n case actions.PICK_NEW_COMPANY:\n return {\n ...state,\n values: {...emptyValues},\n previousViewType: state.viewType,\n viewType: views.EDIT,\n customerType: views.COMPANY,\n params: null\n };\n\n case actions.CUSTOMER_IS_HOME_USER:\n return {\n ...state,\n customerType: views.HOME,\n };\n\n case actions.CUSTOMER_IS_COMPANY:\n return {\n ...state,\n customerType: views.COMPANY,\n params: null\n };\n\n case actions.EDIT:\n return {\n ...state,\n viewType: views.EDIT,\n values: action.values ? action.values : state.values\n };\n\n\n case actions.PICK_NEW_EXISTING:\n return {\n ...state,\n values: null,\n previousViewType: state.viewType,\n viewType: views.EXISTING,\n customerType: null,\n params: action.params\n };\n\n case actions.EXISTING_CHOOSED:\n return {\n ...state,\n values: action.values,\n previousViewType: state.viewType,\n viewType: views.EDIT,\n customerType: action.values.addressBook && action.values.addressBook.companyId ? views.COMPANY : views.HOME,\n params: null\n };\n\n case actions.CANCEL_EDIT:\n return {\n ...state,\n values: null,\n viewType: views.PICK,\n customerType: null,\n params: null\n };\n\n case actions.CONFIRM_EDIT:\n return {\n ...state,\n values: action.values,\n previousViewType: state.viewType,\n viewType: views.VIEW,\n customerType: action.values.addressBook && action.values.addressBook.companyId ? views.COMPANY : views.HOME,\n params: null\n };\n\n case actions.DOCUMENT_INITIALIZED:\n return {\n ...state,\n previousViewType: action.viewType,\n viewType: action.viewType,\n customerType: action.viewType === views.EDIT ? action.values.addressBook && action.values.addressBook.companyId ? views.COMPANY : views.HOME : null,\n params: null,\n values: action.values,\n initialValues: action.initialValues,\n prefilledValue: action.prefilledValue\n };\n\n default:\n return state;\n }\n};\n\n\nconst useCustomerEdit = ({channelValues, confirmCustomerChange, itemLicenseIdCodes, onViewChange}) => {\n\n const [state, dispatch] = useReducer(documentCustomerReducer, initialState);\n\n const cancelEdit = useCallback(() => {\n dispatch({type: actions.CANCEL_EDIT});\n }, [dispatch]);\n\n const confirmEdit = useCallback((values) => {\n confirmCustomerChange(values);\n dispatch({type: actions.CONFIRM_EDIT, values});\n }, [dispatch, confirmCustomerChange]);\n\n const edit = useCallback((values) => {\n dispatch({type: actions.EDIT, values});\n }, [dispatch, confirmCustomerChange]);\n\n const pickNewHomeUser = useCallback(() => {\n dispatch({type: state.viewType === views.EDIT ? actions.CUSTOMER_IS_HOME_USER : actions.PICK_NEW_HOME_USER});\n }, [dispatch, state.viewType]);\n\n const pickNewCompany = useCallback(() => {\n dispatch({type: state.viewType === views.EDIT ? actions.CUSTOMER_IS_COMPANY : actions.PICK_NEW_COMPANY});\n }, [dispatch, state.viewType]);\n\n const pickNewExisting = useCallback((params) => dispatch({type: actions.PICK_NEW_EXISTING, params}), [dispatch]);\n const existingChoosed = useCallback((values) => dispatch({type: actions.EXISTING_CHOOSED, values}), [dispatch]);\n\n useEffect(() => {\n if (state.viewType === views.PREPARING) {\n dispatch({\n type: actions.DOCUMENT_INITIALIZED,\n initialValues: channelValues,\n values: prepareValues(channelValues),\n prefilledValue: itemLicenseIdCodes || null,\n viewType: isEmptyChannel(channelValues) ? views.PICK : views.EDIT});\n\n if (itemLicenseIdCodes) {\n pickNewExisting({pattern: itemLicenseIdCodes});\n }\n }\n }, [channelValues, itemLicenseIdCodes, state.viewType, pickNewExisting]);\n\n useEffect(() => {\n if (itemLicenseIdCodes && state.viewType === views.PICK && isEmptyChannel(channelValues)) {\n pickNewExisting({pattern: itemLicenseIdCodes});\n }\n }, [itemLicenseIdCodes, pickNewExisting, state.viewType, channelValues]);\n\n const isCustomerFilled = useMemo(() => !isEmptyChannel(channelValues), [channelValues]);\n\n const refOnViewChange = useRefOn(onViewChange);\n\n useEffect(() => {\n if (refOnViewChange.current) {\n refOnViewChange.current(state.viewType, isOnOneOfCustomerEditView(state.viewType));\n }\n }, [refOnViewChange, state.viewType]);\n\n\n return {\n edit,\n cancelEdit,\n confirmEdit,\n pickNewHomeUser,\n pickNewCompany,\n pickNewExisting,\n existingChoosed,\n viewType: state.viewType,\n customerType: state.customerType,\n values: state.values,\n params: state.params,\n prefilledValue: state.prefilledValue,\n isEditingCustomer: useMemo(\n () => isOnOneOfCustomerEditView(state.viewType) || !isCustomerFilled,\n [state.viewType, isCustomerFilled]\n ),\n isCustomerFilled,\n customer: channelValues\n }\n};\n\nexport default useCustomerEdit;","import React from \"react\";\nimport PropTypes from 'prop-types';\nimport {Form, FormField} from \"@mouseover/react-form\";\n\nconst CustomerSearchForm = ({onSubmit, children, values}) => {\n return <Form\n values={values}\n validationRules={{}}\n onSubmit={onSubmit}\n render={(form) => (\n <>\n <div className=\"row\">\n <div className=\"col-sm-12\">\n <FormField form={form}\n name='pattern'\n elementType='input'\n elementConfig={{\n placeholder: 'Název, e-mail, IČ nebo ID licence'\n }}\n //message='Pokud hledáte podle NÁZVU subjektu, hledáte pouze nad vlastními zákazníky. Pokud je to pro vás nový subjekt, je potřeba hledat podle IČ nebo ID licence.'\n renderPrepend={() => <span className='input-group-addon'><i className='fa fa-search' /> Existující</span>}\n renderAppend={() => (<span className=\"input-group-btn\">\n <button type=\"submit\" className=\"btn btn-primary\">Hledat</button>\n </span>)}\n />\n </div>\n </div>\n {children}\n </>\n )}/>;\n};\n\nCustomerSearchForm.propTypes = {\n onSubmit:PropTypes.func,\n children: PropTypes.oneOfType([PropTypes.array, PropTypes.object, PropTypes.func]),\n values: PropTypes.object\n};\n\nexport default CustomerSearchForm;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport handleClick from \"@fik/utils/handleClick\";\nimport {views} from \"./../useCustomerEdit\";\nimport CustomerSearchForm from \"./CustomerSearchForm\";\n\nconst CustomerType = ({customerType, pickNewHomeUser, pickNewCompany, pickNewExisting, visibleViews, pattern}) => {\n\n return (\n <div className=\"row\">\n <div className='col-sm-4'>\n <div className='btn-group btn-group-justified'>\n {visibleViews.indexOf(views.HOME) !== -1 ?\n <a title=\"Domácnost\"\n onClick={handleClick(pickNewHomeUser)}\n className={'btn ' + (customerType === views.HOME ? 'btn-primary' : 'btn-default')}>\n <i className='fa fa-home'/> Domácnost\n </a> : null}\n {visibleViews.indexOf(views.COMPANY) !== -1 ?\n <a title=\"Firma\"\n onClick={handleClick(pickNewCompany)}\n className={'btn ' + (customerType === views.COMPANY ? 'btn-primary' : 'btn-default')}>\n <i className='fa fa-suitcase'/> Firma\n </a> : null}\n </div>\n </div>\n\n {visibleViews.indexOf(views.EXISTING) !== -1 ? <div className=\"col-sm-8\">\n <CustomerSearchForm values={{pattern}} onSubmit={pickNewExisting}/>\n </div> : null}\n </div>\n )\n};\n\nCustomerType.propTypes = {\n pickNewHomeUser: PropTypes.func,\n pickNewCompany: PropTypes.func,\n pickNewExisting: PropTypes.func,\n visibleViews: PropTypes.array,\n customerType: PropTypes.string\n};\n\nexport default CustomerType;","import React, {useEffect} from \"react\";\nimport PropTypes from 'prop-types';\nimport {ChannelPicker} from \"@fik/components\";\nimport CustomerForm from \"./CustomerForm\";\nimport useCustomerEdit, {views} from \"./../useCustomerEdit\";\nimport CustomerType from \"./CustomerType\";\nimport {isEmpty} from \"@mouseover/js-utils\";\nimport {useCustomerContext} from \"../index\";\n\nconst validateParams = (params) => {\n return params.pattern && !isEmpty(params.pattern);\n};\n\nconst pickerContext = {name: 'customer', params: {action: 'search'}, validate: validateParams};\n\nconst CustomerEdit = ({visibleViews}) => {\n\n const {\n viewType,\n values,\n customerType,\n pickNewCompany,\n pickNewExisting,\n pickNewHomeUser,\n confirmEdit,\n cancelEdit,\n params,\n existingChoosed,\n prefilledValue\n } = useCustomerContext();\n\n return <>\n <CustomerType\n pattern={prefilledValue}\n visibleViews={visibleViews}\n customerType={customerType}\n pickNewCompany={pickNewCompany}\n pickNewExisting={pickNewExisting}\n pickNewHomeUser={pickNewHomeUser}\n />\n\n {viewType === views.EXISTING || viewType === views.PREPARING ? <ChannelPicker entityContext={pickerContext} params={params} onPick={existingChoosed}/> : null}\n {viewType === views.EDIT\n ? <CustomerForm\n isCompany={customerType === views.COMPANY}\n values={values}\n onSubmit={confirmEdit}\n onReset={cancelEdit}\n /> : null}\n </>;\n};\n\nCustomerEdit.propTypes = {\n visibleViews: PropTypes.array,\n channelValues: PropTypes.object,\n confirmCustomerChange: PropTypes.func,\n cancelCustomerEdit: PropTypes.func\n};\n\nexport default CustomerEdit;","import React from \"react\";\nimport {useCustomerEdit, CustomerContext} from \"../index\";\n\nconst CustomerProvider = ({children, ...props}) => <CustomerContext.Provider value={useCustomerEdit(props)}>{children}</CustomerContext.Provider>;\n\nexport default CustomerProvider;","import React from \"react\";\n\nconst CustomerContext = React.createContext(null);\n\nexport default CustomerContext;","import {useContext} from \"react\";\nimport CustomerContext from \"./CustomerContext\";\n\nconst useCustomerContext = () => useContext(CustomerContext);\n\nexport default useCustomerContext;","import {useCallback, useEffect, useMemo, useReducer} from \"react\";\nimport useRefOn from \"@fik/utils/useRefOn\";\n\nexport const PARTNER_VIEWS = {\n VIEW: 'partner.view',\n PICK: 'partner.pick',\n EDIT: 'partner.edit'\n};\n\nconst ACTION = {\n CANCEL: 'CANCEL',\n PICK: 'PICK',\n EDIT: 'EDIT',\n SET_PARTNER: 'SET_PARTNER'\n};\n\nconst INITIAL_STATE = {\n view: PARTNER_VIEWS.PICK,\n partner: null,\n isPartnerFilled: false\n};\n\nconst reducer = (state, action) => {\n switch (action.type) {\n case ACTION.PICK:\n return {...state, view: PARTNER_VIEWS.PICK};\n case ACTION.CANCEL:\n return {...state, view: PARTNER_VIEWS.VIEW};\n case ACTION.EDIT:\n return {...state, view: PARTNER_VIEWS.EDIT};\n case ACTION.SET_PARTNER:\n const isPartnerFilled = action.partner && action.partner.addressBook && action.partner.addressBook.name;\n return {\n ...state,\n view: isPartnerFilled ? PARTNER_VIEWS.VIEW : PARTNER_VIEWS.PICK,\n partner: action.partner,\n isPartnerFilled\n };\n }\n return state;\n}\n\nconst usePartner = ({onPartnerChange, onViewChange, channel}) => {\n const [state, dispatch] = useReducer(reducer, INITIAL_STATE);\n\n useEffect(() => {\n dispatch({type: ACTION.SET_PARTNER, partner: channel});\n }, [channel]);\n\n\n const cancel = useCallback(() => {\n dispatch({type: ACTION.CANCEL});\n }, []);\n\n const pick = useCallback(() => {\n dispatch({type: ACTION.PICK});\n }, []);\n\n const edit = useCallback(() => {\n dispatch({type: ACTION.EDIT});\n }, []);\n\n const confirmChange = useCallback((values) => {\n if (onPartnerChange) {\n onPartnerChange(values);\n }\n }, [onPartnerChange]);\n\n const refOnViewChange = useRefOn(onViewChange);\n\n useEffect(() => {\n if (refOnViewChange.current) {\n refOnViewChange.current(state.view, state.view !== PARTNER_VIEWS.VIEW);\n }\n }, [refOnViewChange, state.view]);\n\n return useMemo(() => ({\n ...state,\n confirmChange,\n cancel,\n pick,\n edit\n }), [onPartnerChange, cancel, pick, edit, state]);\n}\n\nexport default usePartner;","import {useCallback, useState} from \"react\";\nimport documentViews from \"./documentViews\";\nimport {CUSTOMER_VIEWS} from \"@fik/customer-edit\";\nimport {PARTNER_VIEWS} from \"./partner/usePartner\";\nimport isEmptyChannel from \"@fik/utils/isEmptyChannel\";\n\nconst useDocumentEditView = ({document, defaultView}) => {\n const [view, setView] = useState(defaultView);\n\n const handleCustomerViewChange = useCallback((customerView, isEdit) => {\n let newView = view;\n if (isEdit && view === documentViews.VIEW) {\n newView = isEmptyChannel(document.owner) && customerView === CUSTOMER_VIEWS.PICK ? documentViews.VIEW : documentViews.EDIT_CUSTOMER;\n } else if (!isEdit && view === documentViews.EDIT_CUSTOMER) {\n newView = documentViews.VIEW;\n }\n\n if (view !== newView) {\n setView(newView);\n }\n }, [setView, view, document]);\n\n const handlePartnerViewChange = useCallback((partnerView, isEdit) => {\n let newView = view;\n if (isEdit && view === documentViews.VIEW) {\n newView = isEmptyChannel(document.partner) && partnerView === PARTNER_VIEWS.PICK ? documentViews.VIEW : documentViews.EDIT_PARTNER;\n } else if (!isEdit && view === documentViews.EDIT_PARTNER) {\n newView = documentViews.VIEW;\n }\n\n if (view !== newView) {\n setView(newView);\n }\n }, [setView, view, document]);\n\n return {\n currentView: view,\n setView,\n enableAttachment: view === documentViews.VIEW,\n enableBranchOffice: view === documentViews.VIEW,\n enableEvidenceItem: view === documentViews.VIEW || view === documentViews.EDIT_EVIDENCE_ITEMS,\n enableCustomer: view === documentViews.VIEW || view === documentViews.EDIT_CUSTOMER,\n enablePartner: view === documentViews.VIEW || view === documentViews.EDIT_PARTNER || view === documentViews.EDIT_CUSTOMER,\n enableButtons: view === documentViews.VIEW,\n handleCustomerViewChange,\n handlePartnerViewChange\n };\n}\n\nexport default useDocumentEditView;","import {useEffect} from \"react\";\nimport documentViews from \"./documentViews\";\n\n/**\n *\n * @param {object} document Document instance\n * @param {boolean} existing True if document already exists\n * @param {object} documentModel\n * @param {object} evidenceItem Initial evidence item\n */\nconst useDocumentEditInit = ({document, existing, documentModel, evidenceItem}) => useEffect(() => {\n if (document) {\n documentModel.setDocument(document, existing);\n\n if (!existing) {\n documentModel.view.setView(documentViews.EDIT_CUSTOMER);\n }\n\n if (evidenceItem) {\n documentModel.evidenceItemEdit.startEditNewEvidenceItem(evidenceItem);\n }\n }\n}, [\n document,\n documentModel.evidenceItemEdit,\n documentModel.setDocument,\n documentModel.view.setView,\n existing,\n evidenceItem\n]);\n\nexport default useDocumentEditInit;","import {useMemo} from \"react\";\nimport useDocument from \"./useDocument\";\nimport useDocumentValidator from \"./useDocumentValidator\";\nimport useDocumentSave from \"./useDocumentSave\";\nimport useDocumentEditEvidenceItems from \"./useDocumentEditEvidenceItems\";\nimport documentViews from \"./documentViews\";\nimport useDocumentEditView from \"./useDocumentEditView\";\nimport useDocumentEditInit from \"./useDocumentInit\";\n\nconst useDocumentEdit = ({validate, documentType, document, evidenceItem, existing, isEpc, defaultView = documentViews.VIEW}) => {\n const modelProps = useMemo(() => ({\n validate: validate !== undefined ? validate : true,\n isEpc\n }), [validate, isEpc]);\n\n const documentModel = useDocument(modelProps);\n const {setDocument} = documentModel;\n\n documentModel.documentType = documentType;\n documentModel.validation = useDocumentValidator(documentModel);\n documentModel.saving = useDocumentSave();\n documentModel.view = useDocumentEditView({document: documentModel.document, defaultView});\n\n useDocumentEditInit({document, existing, documentModel, evidenceItem});\n\n documentModel.evidenceItemEdit = useDocumentEditEvidenceItems({\n setView: documentModel.view.setView,\n isCompany: !!(document && document.owner && document.owner.addressBook && document.owner.addressBook.companyId),\n documentModel\n });\n\n return documentModel;\n};\n\nexport default useDocumentEdit;","import PropTypes from 'prop-types';\nimport React from \"react\";\nimport {DocumentContext} from \"./../DocumentContext\";\nimport useDocumentEdit from \"./../useDocumentEdit\";\n\nexport const DocumentProvider = (props) => {\n const documentModel = useDocumentEdit(props);\n return <DocumentContext.Provider value={documentModel} {...props}/>\n};\n\nDocumentProvider.propTypes = {\n document: PropTypes.object,\n existing: PropTypes.bool,\n validate: PropTypes.bool,\n};\n","import React, {useMemo} from 'react';\nimport PropTypes from \"prop-types\";\nimport {NavigationItem} from \"@fik/navigation\";\n\nconst DocumentSaved = ({documentType, document}) => {\n switch (documentType) {\n case 'order':\n case 'nfr-order':\n return <div className=\"alert alert-success\">\n <i className=\"fa fa-check-circle\"/> Váš požadavek byl úspěšně odeslán ke zpracování. Během několika minut naleznete\n příslušné licence v sekci <NavigationItem to=\"license:newest\">Licence</NavigationItem>.\n </div>;\n\n case 'offer':\n return <div className=\"alert alert-success\">\n <i className=\"fa fa-check-circle\"/> Váš požadavek byl úspěšně odeslán ke zpracování. Nabídku naleznete v sekci <NavigationItem to=\"offer:list\">Cenové nabídky</NavigationItem>.\n <br />\n <br />\n <strong>Nabídka s aplikovanou slevou podléhá ručnímu schválení, aktuální stav najdete v sekci <NavigationItem to=\"offer:list\">Cenové nabídky</NavigationItem>.</strong>\n </div>;\n\n case 'offers':\n return <div className=\"alert alert-success\">\n <i className=\"fa fa-check-circle\"/> Váš požadavek byl úspěšně odeslán ke zpracování. Nabídky naleznete v sekci <NavigationItem to=\"offer:list\">Cenové nabídky</NavigationItem>.\n <br />\n <br />\n <strong>Nabídka s aplikovanou slevou podléhá ručnímu schválení, aktuální stav najdete v sekci <NavigationItem to=\"offer:list\">Cenové nabídky</NavigationItem>.</strong>\n </div>;\n\n case 'projectPrice':\n return <ProjectPriceSaved document={document} />;\n\n\n case 'deal':\n return <div className=\"alert alert-success\">\n <i className=\"fa fa-check-circle\"/> Váš požadavek byl úspěšně odeslán ke zpracování. Svou žádost a její stav naleznete v sekci <NavigationItem to=\"deal:list\">Obchodní případy</NavigationItem>.\n </div>;\n\n default:\n return <div className=\"alert alert-success\">\n <i className=\"fa fa-check-circle\"/> Váš požadavek byl úspěšně odeslán ke zpracování.\n </div>;\n }\n};\n\nDocumentSaved.propTypes = {\n documentType: PropTypes.string,\n document: PropTypes.object\n};\n\nexport default DocumentSaved;\n\nconst ProjectPriceSaved = ({document}) => {\n\n const hasNewItem = useMemo(() => {\n return document && document.evidenceItems && document.evidenceItems.find((item) => item.itemProductTypeId === 1) !== undefined;\n }, [document]);\n\n if (hasNewItem) {\n return <div className=\"alert alert-success\">\n <i className=\"fa fa-check-circle\"/> Váš požadavek byl úspěšně odeslán ke zpracování.\n Pokud jste ještě nezažádali o registraci obchodního případu, učiňte tak prosím nyní <NavigationItem to=\"deal:createNewLicence\" query={{offerId: document.id}}>ZDE</NavigationItem>.\n <ProjectPriceInfo />\n </div>;\n } else {\n return <div className=\"alert alert-success\">\n <i className=\"fa fa-check-circle\"/> Váš požadavek byl úspěšně odeslán ke zpracování.\n Pokud jste ještě nezažádali o registraci obchodního případu, učiňte tak prosím nyní <NavigationItem to=\"deal:createRenewLicence\" query={{offerId: document.id}}>ZDE</NavigationItem>.\n <ProjectPriceInfo />\n </div>;\n }\n}\n\nconst ProjectPriceInfo = () => <>\n <br />\n <br />\n <strong>Přidělení projektové ceny probíhá do 10ti dnů společně s vyhodnocením registrace obchodního případu. Stav Vaší žádosti je možné ověřit v sekci <NavigationItem to=\"offer:list\">Projektové ceny</NavigationItem>.</strong>\n </>;","import React, {useCallback} from 'react';\nimport {Form} from \"@mouseover/react-form\";\nimport {useDocumentContext} from \"../useDocumentContext\";\n\nconst DocumentAdditionalInfo = () => {\n const {\n document,\n changeValues,\n } = useDocumentContext();\n\n const handleValuesChanges = useCallback((values, valid) => {\n if (valid) {\n changeValues(values);\n }\n }, [changeValues]);\n\n return document && document.note !== undefined\n ? <Form\n values={{\n note: document.note,\n customContractId: document.customContractId\n }}\n onChange={handleValuesChanges}\n controls={{\n customContractId: {\n label: 'Číslo partnerské objednávky',\n elementType: 'input'\n },\n note: {\n label: 'Poznámka',\n elementType: 'textarea'\n }\n }}/>\n : null;\n};\n\n\nexport default DocumentAdditionalInfo;","import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {Box} from \"@fik/ui\";\nimport handleClick from \"@fik/utils/handleClick\";\nimport {Errors} from \"@fik/ui\";\nimport {CustomerEdit, DEFAULT_VIEWS, useCustomerContext} from \"@fik/customer-edit\";\nimport {Channel} from \"@fik/document\";\n\nconst DocumentCustomer = ({visibleViews, messages}) => {\n\n const {isCustomerFilled, isEditingCustomer, customer, edit, cancelEdit} = useCustomerContext();\n\n return <Box title=\"Zákazník\"\n tools={() => (!isEditingCustomer ?\n <>\n <button onClick={handleClick(edit)} className='btn btn-xs btn-primary m-r-xs'>\n Upravit <i className='fa fa-pencil'/>\n </button>\n </>\n : (isCustomerFilled\n ? <button onClick={handleClick(cancelEdit)} className='btn btn-xs btn-danger m-r-xs'>\n Zrušit <i className='fa fa-trash'/>\n </button>\n : null)\n )}>\n\n {isEditingCustomer\n ? <CustomerEdit visibleViews={visibleViews} /> : <>\n <Errors messages={messages}/>\n <Channel {...customer} isCustomer={true}/>\n </>}\n </Box>;\n};\n\nDocumentCustomer.propTypes = {\n visibleViews: PropTypes.array\n};\n\nexport default DocumentCustomer;","import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {Box} from \"@fik/ui\";\nimport handleClick from \"@fik/utils/handleClick\";\nimport {Errors} from \"@fik/ui\";\nimport {useDocumentContext} from \"../useDocumentContext\";\nimport {CustomerEdit, CustomerProvider, DEFAULT_VIEWS} from \"@fik/customer-edit\";\nimport {DisabledOverlay} from \"@fik/ui\";\nimport {Channel} from \"@fik/document\";\nimport DocumentCustomer from \"./DocumentCustomer\";\n\nconst DocumentCustomerContainer = ({visibleViews}) => {\n\n const memoVisibleViews = useMemo(() => visibleViews || DEFAULT_VIEWS, [visibleViews]);\n\n const {\n view: {enableCustomer, handleCustomerViewChange},\n document,\n potentialOwner,\n isCustomerFilled,\n confirmCustomerChange,\n validation: {validationMessages}\n } = useDocumentContext();\n\n if (!document) {\n return null;\n }\n\n return <CustomerProvider\n itemLicenseIdCodes={potentialOwner}\n channelValues={document.owner}\n confirmCustomerChange={confirmCustomerChange}\n onViewChange={handleCustomerViewChange}\n >\n <DisabledOverlay on={!enableCustomer}>\n <DocumentCustomer\n visibleViews={memoVisibleViews}\n messages={validationMessages.filter(message => message.path.indexOf('owner') === 0)}\n />\n </DisabledOverlay>\n </CustomerProvider>;\n\n};\n\nDocumentCustomerContainer.propTypes = {\n visibleViews: PropTypes.array\n};\n\nexport default DocumentCustomerContainer;","import React from 'react';\nimport handleClick from \"@fik/utils/handleClick\";\nimport {Errors} from \"@fik/ui\";\nimport {EvidenceItems} from \"@fik/evidence-item\";\nimport {Box} from \"@fik/ui\";\nimport {useDocumentContext} from \"../useDocumentContext\";\n\nconst DocumentEvidenceItems = () => {\n\n const {\n document,\n validation: {validationMessages},\n evidenceItemEdit,\n removeExitingEvidenceItem,\n } = useDocumentContext();\n\n const {\n startEditNewEvidenceItem,\n startEditNewRenewEvidenceItem,\n startEditExistingEvidenceItem,\n } = evidenceItemEdit;\n\n\n\n const evidenceItemsMessages = validationMessages.filter(message => message.path.indexOf('evidenceItems') === 0);\n\n return <Box\n title=\"Položky\"\n tools={() => <>\n <button onClick={handleClick(startEditNewEvidenceItem)} className='btn btn-xs btn-primary m-r-xs'>\n <i className=\"fa fa-plus\"/> Nová licence\n </button>\n <button onClick={handleClick(startEditNewRenewEvidenceItem)} className='btn btn-xs btn-primary'>\n <i className=\"fa fa-search\"/> Existující licence\n </button>\n </>\n }>\n <Errors messages={evidenceItemsMessages.filter(message => message.path.indexOf('evidenceItems') !== 0)}/>\n <EvidenceItems\n evidenceItems={document.evidenceItems}\n itemMenu={(item) => (\n <>\n <button onClick={handleClick(removeExitingEvidenceItem, item.row)}\n className='btn btn-xs btn-warning m-r-xs'> Odebrat\n </button>\n <button onClick={handleClick(startEditExistingEvidenceItem, item.row)} className='btn btn-xs btn-primary'>Upravit</button>\n </>\n )}\n renderRowMessages={({columns, index}) => {\n const messages = evidenceItemsMessages.filter(message => message.path.indexOf(index) === 1);\n if (messages.length > 0) {\n return <tr>\n <td colSpan={columns.length} className=\"no-padding no-borders\">\n <div className=\"m-l-lg\"><Errors messages={messages}/></div>\n </td>\n </tr>\n }\n return null;\n }}\n /> </Box>\n};\n\nexport default DocumentEvidenceItems;","import React from 'react';\nimport {FormField} from \"@mouseover/react-form\";\nimport PropTypes from \"prop-types\";\n\nconst Discount = ({discounts = [], form}) => {\n return (<div className=\"row\">\n <div className=\"col-sm-8\">\n <FormField\n name='itemDiscountId'\n form={form}\n label=\"Sleva\"\n elementType=\"select\"\n options={[{value: '', label: 'Žádná sleva'}, ...discounts.map(item => ({\n value: item.productDiscountId,\n label: item.productDiscountName\n }))]}\n valueType=\"integer\"\n />\n </div>\n <div className=\"col-sm-4\">\n <FormField\n label=\"Výše slevy\"\n name='itemDiscount'\n form={form}\n elementType=\"input\"\n elementConfig={{\n type: 'number',\n placeholder: 'Výše slevy',\n }}\n valueType=\"number\"\n />\n </div>\n </div>);\n};\n\nDiscount.propTypes = {\n discounts: PropTypes.array,\n form: PropTypes.object\n};\n\nexport default Discount;","import React from 'react';\nimport {Price} from \"@fik/ui\";\nimport PropTypes from \"prop-types\";\nimport {Date} from \"@fik/ui\";\n\nconst Preview = ({evidenceItem}) => {\n\n if (!evidenceItem) {\n return null;\n }\n\n return (<React.Fragment>\n <ul className=\"list-group clear-list m-t\">\n <li className=\"list-group-item fist-item\">\n <strong>{evidenceItem.itemName}</strong> <div className=\"pull-right\">{evidenceItem.itemAmount || '--'}x</div>\n {evidenceItem.itemLicenseIdCodes ? (<div>{evidenceItem.itemLicenseIdCodes}</div>) : null}\n {evidenceItem.itemRansomExpirationDate ? (<div>ESET výkupné do: <Date date={evidenceItem.itemRansomExpirationDate}/></div>) : null}\n {evidenceItem.itemExpirationDate ? (<div>Datum expirace: <Date date={evidenceItem.itemExpirationDate}/></div>) : null}\n {evidenceItem.itemExtraDays ? (<div>Dny navíc: {evidenceItem.itemExtraDays}</div>) : null}\n </li>\n {evidenceItem.itemDiscountId\n ? <li className=\"list-group-item\">\n <React.Fragment>Sleva</React.Fragment>\n <div className=\"pull-right\">{evidenceItem.itemDiscount}%</div>\n </li> : null}\n {evidenceItem.owner\n ? <li className=\"list-group-item\">\n <React.Fragment>Doporučená <abbr title=\"Doporučená koncová cena\">EUP</abbr> bez DPH</React.Fragment>\n <div className=\"pull-right\"><Price price={evidenceItem.owner.itemPrice} currency={evidenceItem.itemCurrency}/></div>\n </li> : null}\n {evidenceItem.partner ?\n <li className=\"list-group-item\">\n <React.Fragment>Cena partner bez DPH</React.Fragment>\n <div className=\"pull-right\"><Price price={evidenceItem.partner.itemPrice} currency={evidenceItem.itemCurrency}/></div>\n </li> : null}\n {evidenceItem.epc ?\n <li className=\"list-group-item\">\n <React.Fragment>Cena EPC bez DPH</React.Fragment>\n <div className=\"pull-right\"><Price price={evidenceItem.epc.itemPrice} currency={evidenceItem.itemCurrency}/></div>\n </li> : null}\n </ul>\n </React.Fragment>);\n};\n\nPreview.propTypes = {\n evidenceItem: PropTypes.object\n};\n\n\nexport default Preview;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {FormField} from \"@mouseover/react-form\";\n\n\nconst Promo = ({promos = [], form}) => {\n return (<div className=\"row\">\n <div className=\"col-sm-8\">\n <FormField\n name='itemPromoId'\n form={form}\n label=\"Promo\"\n elementType=\"select\"\n options={[{value: '', label: 'Žádné promo'}, ...promos.map(item => ({\n value: item.promoId,\n label: item.promoName\n }))]}\n valueType=\"integer\"\n />\n </div>\n <div className=\"col-sm-4\">\n <FormField\n name='itemBonusCode'\n form={form}\n label=\"Bonus kód\"\n elementType=\"input\"\n elementConfig={{\n type: 'text'\n }}\n />\n </div>\n </div>);\n};\n\nPromo.propTypes = {\n promos: PropTypes.array,\n form: PropTypes.object\n};\n\nexport default Promo;","import React from 'react';\nimport {FormField} from \"@mouseover/react-form\";\nimport PropTypes from \"prop-types\";\n\nconst Selector = ({types = [], products = [], periods = [], selectType, minimum, maximum, form}) => {\n\n return (\n <div className=\"row\">\n {selectType === 'renew' ?\n <div className=\"col-sm-12\">\n <FormField\n name='itemLicenseIdCodes'\n form={form}\n label=\"ID licence\"\n elementType=\"text\"\n />\n </div> : null}\n <div className=\"col-sm-12\">\n <FormField\n name='itemProductTypeId'\n form={form}\n label=\"Typ licence\"\n elementType=\"select\"\n options={[{value: '', label: 'Vyberte typ licence'}, ...types.map(item => ({value: item.id, label: item.name}))]}\n valueType=\"integer\"\n />\n </div>\n <div className=\"col-sm-12\">\n <FormField\n name='itemProductFamilyId'\n form={form}\n label=\"Produkt\"\n elementType=\"select\"\n options={[{value: '', label: 'Vyberte produkt'}, ...products.map(item => ({value: item.id, label: item.name}))]}\n valueType=\"integer\"\n />\n </div>\n <div className=\"col-sm-8\">\n <FormField\n label=\"Délka licence\"\n form={form}\n name='itemProductPeriodId'\n elementType=\"select\"\n options={[{value: '', label: 'Vyberte délku licence'}, ...periods.map(item => ({\n value: item.id,\n label: item.name\n }))]}\n valueType=\"integer\"\n />\n </div>\n <div className=\"col-sm-4\">\n <FormField\n label=\"Počet licencí\"\n form={form}\n name='itemAmount'\n elementType=\"input\"\n elementConfig={{\n type: 'number',\n placeholder: 'Zadejte počet',\n min: minimum || 1,\n max: maximum || 9999\n }}\n valueType=\"number\"\n />\n </div>\n </div>\n );\n};\n\nSelector.propTypes = {\n types: PropTypes.array,\n products: PropTypes.array,\n periods: PropTypes.array,\n selectType: PropTypes.string,\n form: PropTypes.object\n};\n\nexport default Selector;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {DatePicker} from \"@fik/form\";\n\n\nconst Ransom = ({ransom = [], form}) => {\n return (ransom === true ? <div className=\"row\">\n <div className=\"col-sm-12\">\n <DatePicker label=\"ESET výkupné - datum expirace konkurenčního řešení\" name=\"itemRansomExpirationDate\" form={form}/>\n </div>\n </div> : null);\n};\n\nRansom.propTypes = {\n ransom: PropTypes.bool,\n form: PropTypes.object\n};\n\nexport default Ransom;","import React from \"react\";\nimport {FormField} from \"@mouseover/react-form\";\n\nconst DiscountCompetitors = ({competitors = [], form}) => {\n return (<div className=\"row border-bottom m-b-sm\">\n <div className=\"col-sm-12 border-bottom m-b-sm\"><strong>Informace o současném řešení</strong></div>\n <div className=\"col-sm-12 col-md-12 col-xl-3\">\n <FormField\n label=\"Název produktu\"\n name='itemDiscountCompetitorName'\n form={form}\n elementType=\"input\"\n elementConfig={{\n type: 'text'\n }}\n valueType=\"text\"\n />\n </div>\n <div className=\"col-sm-12 col-md-6 col-xl-3\">\n <FormField\n name='itemDiscountCompetitor'\n form={form}\n label=\"Výrobce řešení\"\n elementType=\"select\"\n options={[{value: '', label: 'Vyberte konkurenci'}, ...competitors.map(item => ({\n value: item,\n label: item\n }))]}\n valueType=\"text\"\n />\n </div>\n <div className=\"col-sm-12 col-md-6 col-xl-3\">\n <FormField\n label=\"Cena\"\n name='itemDiscountCompetitorPrice'\n form={form}\n elementType=\"input\"\n elementConfig={{\n type: 'number',\n placeholder: 'Cena',\n }}\n valueType=\"number\"\n />\n </div>\n </div>);\n};\n\nexport default DiscountCompetitors;","import {useEffect, useState} from \"react\";\n\nconst useCompetitors = ({evidenceItem, discounts}) => {\n const [competitors, setCompetitors] = useState();\n\n useEffect(() => {\n let current = null;\n if (evidenceItem && evidenceItem.itemDiscountId) {\n const discount = discounts.find(element => element.productDiscountId === evidenceItem.itemDiscountId);\n if (discount && discount.competitors) {\n current = discount.competitors;\n }\n }\n setCompetitors((prevState) => prevState !== current ? current : prevState);\n }, [evidenceItem, discounts, setCompetitors]);\n\n return competitors;\n}\n\nexport default useCompetitors;","import React, {useCallback} from 'react';\nimport {useEvidenceItemCalculator, Selector, Discount, Promo, Preview, Ransom} from \"./../index\";\nimport {Errors} from \"@fik/ui\";\nimport PropTypes from 'prop-types';\nimport handleClick from \"@fik/utils/handleClick\";\nimport DiscountCompetitors from \"./DiscountCompetitors\";\nimport useCompetitors from \"../useCompetitors\";\nconst Calculator = ({confirm, cancel, calculationData, onEvidenceItemChange}) => {\n\n const {\n types,\n products,\n periods,\n possibleDiscounts,\n possiblePromos,\n evidenceItem,\n form,\n loading,\n selectType,\n minimum,\n maximum,\n itemMessages,\n ransom\n } = useEvidenceItemCalculator({...calculationData, onEvidenceItemChange});\n\n const handleConfirm = useCallback(() => {\n confirm(evidenceItem);\n }, [confirm, evidenceItem]);\n\n const competitors = useCompetitors({evidenceItem,discounts:possibleDiscounts});\n\n return (\n <form>\n <Errors className=\"m-l-n m-r-n m-b-xs\" messages={itemMessages ? itemMessages : []}/>\n <div className=\"row row-flex\">\n <div className=\"col-sm-4 b-r\">\n <Selector\n form={form}\n selectType={selectType}\n types={types}\n products={products}\n periods={periods}\n minimum={minimum}\n maximum={maximum}\n />\n </div>\n <div className=\"col-sm-4 b-r\">\n <Discount\n form={form}\n discounts={possibleDiscounts}\n />\n\n {competitors && <DiscountCompetitors\n form={form}\n competitors={competitors} />}\n\n <Promo\n form={form}\n promos={possiblePromos}\n />\n\n <Ransom\n form={form}\n ransom={ransom}\n />\n\n </div>\n <div className=\"col-sm-4\">\n {loading ? (<div>Loading...</div>) :\n (<Preview\n evidenceItem={evidenceItem}\n />)}\n </div>\n </div>\n {confirm || cancel ?\n <div className='row row-flex'>\n <div className='col-sm-12'>\n <div className='form-group'>\n <div className='pull-right'>\n {cancel ? <button onClick={handleClick(cancel)} className=\"btn btn-white m-r-sm\">Zrušit</button> : null}\n {confirm ? <button onClick={handleClick(handleConfirm)}\n disabled={!evidenceItem}\n className=\"btn btn-primary\">Potvrdit</button> : null}\n </div>\n </div>\n </div>\n </div> : null}\n </form>\n )\n};\n\n\nCalculator.propTypes = {\n initialSelection: PropTypes.object,\n onEvidenceItemChange: PropTypes.func,\n onLoading: PropTypes.func,\n confirm: PropTypes.func,\n cancel: PropTypes.func\n};\n\nexport default Calculator;","import {useEffect, useCallback, useMemo, useState} from 'react';\nimport {createActionNames} from \"@fik/api\";\nimport shallowEqual from \"react-redux/es/utils/shallowEqual\";\nimport {createRequestState} from \"@fik/api\";\nimport wrapAsyncCallForDispatch from \"@fik/utils/wrapAsyncCallForDispatch\";\nimport {useModel} from \"@fik/model\";\nimport {useReducerWithThunk} from \"@fik/utils/useReducerWithThunk\";\nimport {useHookToLoading} from \"@fik/loading\";\nimport {getOnPath} from \"@mouseover/js-utils/src\";\n\nconst initialState = {\n selector: {\n isFetching: false,\n isSuccess: false,\n isFailed: false,\n selectType: 'new',\n results: {\n selection: {\n isCompany: false,\n selectType: 'new',\n itemProductTypeId: null,\n itemProductFamilyId: null,\n itemProductPeriodId: null,\n itemAmount: null,\n itemBonusCode: null,\n itemDiscount: null,\n itemDiscountId: null,\n itemDiscountCompetitor: null,\n itemDiscountCompetitorName: null,\n itemDiscountCompetitorPrice: null,\n itemMessages: [],\n },\n types: [],\n products: [],\n periods: [],\n possibleDiscounts: [],\n possiblePromos: [],\n itemPromoId: null\n }\n },\n promoAutoSelected: false,\n recalculate: {\n isFetching: false,\n isSuccess: false,\n isFailed: false,\n results: {}\n }\n};\n\n\nconst selectActions = createActionNames('select');\nconst recalculateActions = createActionNames('recalculate');\nconst RESET_EVIDENCE_ITEM = 'reset_evidence_item';\n\nconst createReducer = (initialState) => (state = initialState, action) => {\n switch (action.type) {\n case selectActions.FETCH_INIT:\n return {\n ...state,\n selector: {\n ...state.selector,\n selectType: action.params.selectType,\n results: {...state.selector.results, selection: {...state.selector.results.selection, ...action.params}},\n ...createRequestState(selectActions, action.type),\n }\n };\n\n case selectActions.FETCH_SUCCESS:\n const currentSelection = {...state.selector.results.selection, ...action.payload.selection};\n let promoAutoSelected = state.promoAutoSelected;\n if (!promoAutoSelected && action.payload.itemPromoId) {\n currentSelection.itemPromoId = action.payload.itemPromoId;\n promoAutoSelected = true;\n }\n return {\n ...state,\n promoAutoSelected,\n selector: {\n ...state.selector,\n results: {...action.payload, selection: currentSelection},\n ...createRequestState(selectActions, action.type),\n }\n };\n\n case selectActions.FETCH_FAILURE:\n return {\n ...state,\n selector: {\n ...state.selector,\n ...createRequestState(selectActions, action.type)\n }\n };\n\n case recalculateActions.FETCH_INIT:\n return {\n ...state,\n recalculate: {\n ...state.recalculate,\n selection: action.params,\n ...createRequestState(recalculateActions, action.type),\n }\n };\n\n case recalculateActions.FETCH_SUCCESS:\n return {\n ...state,\n recalculate: {\n ...state.recalculate,\n selection: action.params,\n results: action.payload,\n ...createRequestState(recalculateActions, action.type),\n }\n };\n\n case recalculateActions.FETCH_FAILURE:\n return {\n ...state,\n recalculate: {\n ...state.recalculate,\n selection: action.params,\n ...createRequestState(recalculateActions, action.type),\n },\n };\n\n case RESET_EVIDENCE_ITEM:\n return {\n ...state,\n promoAutoSelected: false,\n recalculate: {\n ...state.recalculate,\n evidenceItem: null\n }\n };\n default:\n return state;\n }\n};\n\nconst useCalculator = (initialSelection, channels) => {\n\n const [state, dispatch] = useReducerWithThunk(createReducer(initialState), initialState);\n const [select, recalculate] = useModel((model) => {\n const evidenceItemsModel = model.evidenceItems();\n return [\n wrapAsyncCallForDispatch(evidenceItemsModel.select)(selectActions),\n wrapAsyncCallForDispatch(evidenceItemsModel.recalculate)(recalculateActions)\n ]\n }, []);\n\n //- initial select - fetch from api to get\n useEffect(() => {\n dispatch(select(initialSelection || {}));\n }, [select, initialSelection, dispatch]);\n\n const {selection, possibleDiscounts, finalProduct} = state.selector.results;\n\n const changeSelectionCallback = useCallback((params) => {\n if (!shallowEqual(params, selection)) {\n dispatch(select(params));\n }\n }, [select, selection, dispatch]);\n\n useEffect(() => {\n if (!shallowEqual(selection, getOnPath(state.recalculate.selection, ['item']))) {\n if (finalProduct) {\n dispatch(recalculate({item: selection, channels}));\n } else {\n dispatch({type: RESET_EVIDENCE_ITEM});\n }\n }\n }, [recalculate, selection, finalProduct, dispatch, state.recalculate.selection, channels]);\n\n const changeValueCallback = useCallback((name, value) => {\n\n if (value === selection[name]) {\n return;\n }\n\n switch (name) {\n case 'itemProductTypeId':\n changeSelectionCallback({\n ...selection,\n itemProductTypeId: value\n });\n break;\n\n case 'itemProductFamilyId':\n changeSelectionCallback({\n ...selection,\n itemProductFamilyId: value // set current value\n });\n break;\n\n case 'itemProductPeriodId':\n changeSelectionCallback({\n ...selection,\n itemProductPeriodId: value,\n });\n break;\n\n case 'itemAmount':\n changeSelectionCallback({\n ...selection,\n itemAmount: value\n });\n break;\n\n case 'itemDiscountId':\n if (value !== selection.itemDiscountId) {\n const discount = possibleDiscounts ? possibleDiscounts.find((item) => item.productDiscountId === value) : null;\n changeSelectionCallback({...selection, [name]: value, itemDiscount: discount ? discount.productDiscountValue : null});\n } else {\n changeSelectionCallback({...selection, [name]: value, itemDiscount: null});\n }\n break;\n\n default:\n changeSelectionCallback({...selection, [name]: value});\n break;\n }\n\n }, [changeSelectionCallback, selection, possibleDiscounts]);\n\n useHookToLoading('evidence-item-selector', state.selector);\n useHookToLoading('evidence-item-recalculate', state.recalculate);\n\n return {\n ...state.selector.results,\n selectType: state.selector.selectType,\n evidenceItem: state.recalculate.results,\n loading: state.selector.isFetching || state.recalculate.isFetching,\n changeSelection: changeSelectionCallback,\n changeValue: changeValueCallback\n };\n};\n\nexport default useCalculator;\n","import useCalculator from \"./useCalculator\";\nimport {useForm} from \"@mouseover/react-form\";\nimport {useEffect, useMemo} from \"react\";\n\nconst useEvidenceItemCalculator = ({initialSelection, onEvidenceItemChange, channels}) => {\n\n const {\n selection,\n selectPartner,\n evidenceItem,\n changeValue,\n loading,\n ...props\n } = useCalculator(initialSelection, channels);\n\n const form = useForm({\n values: selection,\n onValueChange: changeValue,\n validationRules: useMemo(() => ({\n itemAmount: {min: 1},\n itemDiscount: {\n min: 1,\n max: 100\n }\n }), [])\n }\n );\n\n useEffect(() => {\n if (typeof onEvidenceItemChange === 'function') {\n onEvidenceItemChange(evidenceItem && evidenceItem.itemName ? evidenceItem : null);\n }\n }, [evidenceItem, onEvidenceItemChange]);\n\n return {\n ...props,\n selectPartner,\n form,\n evidenceItem: evidenceItem && evidenceItem.itemName ? evidenceItem : null,\n itemMessages: evidenceItem && evidenceItem.itemMessages ? evidenceItem.itemMessages : null,\n loading\n };\n};\n\nexport default useEvidenceItemCalculator;","function FakeStorage () {\n this.clear();\n}\n\nFakeStorage.prototype = {\n key: function(index) {\n // sanitise index as int\n index = parseInt(index);\n // return early if index isn't a positive number or larger than length\n if (isNaN(index) || index < 0 || index >= this.length) {\n return null;\n }\n // loop through data object until at nth key\n var i = 0;\n for (var key in this._data) {\n if (this._data.hasOwnProperty(key)) {\n if (i === index) {\n return key;\n }\n i++;\n }\n }\n // otherwise return null\n return null;\n },\n\n getItem: function(key) {\n // only get if there's something to get\n return this._data.hasOwnProperty(key) ? this._data[key] : null;\n },\n\n setItem: function(key, value) {\n // if we're adding a new item, incriment the length\n if (!this._data.hasOwnProperty(key)) {\n this.length++;\n }\n // always store the value as a string\n this._data[key] = value.toString();\n },\n\n removeItem: function(key) {\n // only remove if there's something to remove\n if (this._data.hasOwnProperty(key)) {\n delete this._data[key];\n this.length--;\n }\n },\n\n clear: function() {\n this._data = {};\n this.length = 0;\n }\n};\n\nexport default FakeStorage;","// Hook\nimport {useCallback, useEffect, useRef, useState} from \"react\";\n\nfunction useStorage(storage, key, defaultValue) {\n\n // defaultValue is never used directly, only as ref (change of it will not trigger refresh of effect below)\n const defaultValueRef = useRef(defaultValue);\n\n const [currentValue, setCurrentValue] = useState(defaultValueRef.current);\n\n // triggers when key change\n useEffect(() => {\n const item = storage.getItem(key);\n setCurrentValue((prevValue) => item ? JSON.parse(item) : defaultValueRef.current);\n }, [key, storage, defaultValueRef]);\n\n const setValue = useCallback(value => {\n try {\n // mimic useState api\n setCurrentValue((prevValue) => {\n // determine new value\n const newValue = value instanceof Function ? value(prevValue) : value;\n\n // store in storage\n storage.setItem(key, JSON.stringify(newValue));\n\n return newValue;\n })\n } catch (error) {\n // A more advanced implementation would handle the error case\n console.log(error);\n }\n }, [setCurrentValue, storage]);\n\n return [currentValue, setValue];\n}\n\nexport default useStorage;","import useStorage from \"./useStorage\";\n\nfunction useLocalStorage(key, defaultValue) {\n return useStorage(window.localStorage, key, defaultValue);\n}\n\nexport default useLocalStorage;","import useStorage from \"./useStorage\";\n\nfunction useLocalStorage(key, defaultValue) {\n return useStorage(window.sessionStorage, key, defaultValue);\n}\n\nexport default useLocalStorage;","import useStorage from \"./useStorage\";\nimport {useContext} from \"react\";\nimport {AppStorageContext} from \"./index\";\n\nfunction useAppStorage(key, defaultValue) {\n const storage = useContext(AppStorageContext);\n return useStorage(storage, key, defaultValue);\n}\n\nexport default useAppStorage;","import React from \"react\";\n\nconst AppStorageContext = React.createContext(null);\n\nexport default AppStorageContext;","import React from 'react';\nimport AppStorageContext from \"../AppStorageContext\";\n\nconst AppStorageProvider = ({storage, ...props}) => {\n return <AppStorageContext.Provider value={storage} {...props} />;\n};\n\nexport default AppStorageProvider;","import React from \"react\";\n\nconst IdentityContext = React.createContext(null);\n\nexport default IdentityContext;","import {useContext} from \"react\";\nimport IdentityContext from \"./IdentityContext\";\n\nconst useIdentity = () => useContext(IdentityContext);\n\nexport default useIdentity;","import {useAppStorage} from \"@fik/storage\";\nimport {useCallback, useMemo} from \"react\";\nimport useIdentity from \"@fik/auth/useIdentity\";\n\nconst useEvidenceItemsStorage = () => {\n const identity = useIdentity();\n const key = useMemo(() => identity ? identity.contactId : null, [identity]);\n const [evidenceItems, setEvidenceItems] = useAppStorage('calculator/' + key, []);\n\n const clearEvidenceItems = useCallback(() => {\n setEvidenceItems([]);\n }, [setEvidenceItems])\n\n const addEvidenceItem = useCallback((item) => {\n if (item) {\n setEvidenceItems(items => [item, ...items]);\n }\n }, [setEvidenceItems]);\n\n const removeEvidenceItem = useCallback((item) => {\n if (item) {\n setEvidenceItems(items => {\n const index = items.indexOf(item);\n if (index > -1) {\n const newItems = [...items];\n newItems.splice(index, 1);\n return newItems;\n }\n return items;\n });\n }\n }, [setEvidenceItems]);\n\n return useMemo(() => (\n {\n evidenceItems,\n clearEvidenceItems,\n addEvidenceItem,\n removeEvidenceItem\n }\n ), [clearEvidenceItems, addEvidenceItem, removeEvidenceItem, evidenceItems]);\n}\n\nexport default useEvidenceItemsStorage;","import React, {useEffect, useMemo, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport {Calculator} from \"@fik/calculator\";\nimport {Box} from \"@fik/ui\";\nimport {LoadingProvider} from \"@fik/loading\";\n\nconst DocumentEvidenceItem = ({confirm, cancel, selection, document}) => {\n const [channels, setChannels] = useState(null);\n useEffect(()=> {\n if (document) {\n setChannels({\n owner: document.owner,\n partner: document.partner,\n epc: document.epc\n })\n } else {\n setChannels(null);\n }\n }, [document]);\n\n const calculationData = useMemo(() => {\n return {initialSelection: selection, channels};\n }, [selection, channels]);\n\n return <LoadingProvider>\n {(isLoading) => <Box isLoading={isLoading} title=\"Položka\">\n <Calculator calculationData={calculationData}\n cancel={cancel}\n confirm={confirm}\n />\n </Box>}\n </LoadingProvider>;\n}\n\nDocumentEvidenceItem.propTypes = {\n confirm: PropTypes.func.isRequired,\n cancel: PropTypes.func.isRequired,\n selection: PropTypes.object.isRequired\n};\n\nexport default DocumentEvidenceItem;","import React, {useCallback} from \"react\";\nimport {useDropzone} from \"react-dropzone\";\nimport {useDocumentContext} from \"..//useDocumentContext\";\nimport {useLoadingContext} from \"@fik/loading\";\nimport handleClick from \"@fik/utils/handleClick\";\nimport {FileSize} from \"@fik/ui\";\n\nconst processFile = (file) => {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n\n reader.onabort = () => {\n reject();\n };\n\n reader.onerror = () => {\n reader.abort();\n reject();\n };\n\n reader.onload = (event) => {\n resolve({\n attachmentName: file.name,\n attachmentSize: file.size,\n attachmentContentType: file.type,\n attachmentContent: event.target.result\n });\n };\n\n reader.readAsDataURL(file);\n });\n};\n\nconst processFiles = (files) => Promise.all(files.map(file => processFile(file)));\n\nconst DocumentAttachments = () => {\n\n const {\n document: {attachments},\n addAttachments,\n removeAttachment\n } = useDocumentContext();\n\n const {changeLoadingState} = useLoadingContext();\n\n const onDrop = useCallback(acceptedFiles => {\n\n changeLoadingState('attachments', {isFetching: true, isSuccess: false, isFailed: false});\n processFiles(acceptedFiles)\n .then((attachments) => {\n changeLoadingState('attachments', {isFetching: false, isSuccess: true, isFailed: false});\n addAttachments(attachments);\n return attachments;\n }).catch(() => changeLoadingState('attachments', {isFetching: false, isSuccess: false, isFailed: true}));\n\n\n }, [addAttachments, changeLoadingState]);\n\n const {getRootProps, getInputProps, isDragActive} = useDropzone({\n onDrop,\n accept: 'image/jpeg, image/png, application/pdf',\n maxSize: 5242880\n });\n\n\n if (!document) {\n return null;\n }\n\n return (\n <>\n <div {...getRootProps({className: 'dropzone', style: {minHeight: '40px'}})}>\n <div className=\"fallback\">\n <input {...getInputProps()} />\n </div>\n {\n isDragActive ?\n <p>Přetáhněte sem soubory ...</p> :\n <p>Přetáhněte sem soubory, nebo klikněte pro výběr</p>\n }\n </div>\n <div className=\"table table-striped files files-previews\">\n\n {attachments\n ? attachments.map((attachment, index) => <div key={index} className=\"file-row files-template\">\n <div>\n <p className=\"name\">{attachment.attachmentName}</p>\n </div>\n <div>\n <p className=\"size\"><FileSize>{attachment.attachmentSize}</FileSize></p>\n </div>\n <div>\n <button className=\"btn btn-danger delete pull-right\" onClick={handleClick(() => removeAttachment(attachment))}>\n <i className=\"glyphicon glyphicon-trash\"/>\n <span>Odebrat</span>\n </button>\n </div>\n </div>)\n : null}\n </div>\n </>\n )\n};\n\nexport default DocumentAttachments;","import React, {useCallback, useEffect, useState} from 'react';\nimport {Form} from \"@mouseover/react-form\";\nimport {useDocumentContext} from \"../useDocumentContext\";\n\nconst DocumentCheckboxes = () => {\n const {\n document,\n changeValues,\n validation: {availableButtons}\n } = useDocumentContext();\n\n const [visibleElements, setVisibleElements] = useState({sendOrderToCustomer: false, generateVariants: false, dealConsent: false});\n\n useEffect(() => {\n setVisibleElements({\n sendOrderToCustomer: availableButtons.find(({documentType}) => documentType === 'order'),\n generateVariants: availableButtons.find(({documentType}) => documentType === 'offer' || documentType === 'projectPrice' || documentType === 'project-price' ),\n dealConsent: availableButtons.find(({documentType}) => documentType === 'projectPrice' || documentType === 'project-price' ),\n })\n }, [availableButtons]);\n\n const handleValuesChanges = useCallback((values, valid) => {\n if (valid) {\n changeValues(values);\n }\n }, [changeValues]);\n\n return document && document.note !== undefined\n ? <Form\n values={{\n note: document.note,\n customContractId: document.customContractId\n }}\n onChange={handleValuesChanges}\n controls={{\n sendOrderToCustomer: {\n label: 'Odeslat licenční e-mail i na koncového uživatele',\n elementType: 'checkbox',\n groupClass: 'checkbox',\n renderInputElement: (props, elementProps) => <input {...elementProps} type='checkbox' checked={elementProps.value}\n value={'ODESLAT_LIC_UZIVATEL'}/>,\n visible: () => visibleElements.sendOrderToCustomer\n },\n generateVariants: {\n label: 'V případě nabídky vytvořit automaticky i na 1, 2, 3 roky',\n elementType: 'checkbox',\n groupClass: 'checkbox',\n renderInputElement: (props, elementProps) => <input {...elementProps} type='checkbox' checked={elementProps.value}\n value={'GENEROVAT_VARIANTY'}/>,\n visible: () => visibleElements.generateVariants\n },\n dealConsent: {\n label: 'Beru na vědomí, že pro zpracování projektové ceny a možnosti získání maximální možné provize dle partnerské kategorie, je nutné řádně vyplnit registraci obchodního případu.',\n elementType: 'checkbox',\n groupClass: 'checkbox',\n renderInputElement: (props, elementProps) => <input {...elementProps} type='checkbox' checked={elementProps.value}\n value={'DEAL_CONFIRM'}/>,\n visible: () => visibleElements.dealConsent\n }\n }}/>\n : null;\n};\n\n\nexport default DocumentCheckboxes;","import React, {useCallback, useMemo} from \"react\";\nimport {Box} from \"@fik/ui\";\nimport {SelectInput} from \"@fik/form\";\nimport {Form} from \"@mouseover/react-form\";\nimport {useDocumentContext} from \"../useDocumentContext\";\n\nconst DocumentBranchOffice = ({branchOffices}) => {\n const {\n document,\n changeValues,\n } = useDocumentContext();\n\n const values = useMemo(() => document.partner, [document]);\n\n const handleValuesChanges = useCallback(({branchOfficeId}, valid) => {\n if (valid && values.branchOfficeId !== branchOfficeId) {\n changeValues({partner: {...values, branchOfficeId: branchOfficeId, branchOffice: {branchOfficeId}}});\n }\n }, [changeValues, values]);\n\n return <Box title=\"Pobočka\">\n <Form\n values={values}\n validationRules={{}}\n onChange={handleValuesChanges}\n render={(form => {\n return <SelectInput\n name={['branchOfficeId']}\n form={form}\n options={[{value: '', label: '---'}, ...(branchOffices ? branchOffices.map((item) => ({\n label: item.name,\n value: item.branchOfficeId\n })) : [])]}/>\n })} />\n </Box>;\n}\n\nexport default DocumentBranchOffice;","import React from \"react\";\n\nconst PartnerContext = React.createContext(null);\n\nexport default PartnerContext;","import React from \"react\";\nimport PartnerContext from \"./PartnerContext\";\nimport usePartner from \"./usePartner\";\n\nconst PartnerProvider = ({children, ...props}) => <PartnerContext.Provider value={usePartner(props)}>{children}</PartnerContext.Provider>;\n\nexport default PartnerProvider;","import {useContext} from \"react\";\nimport PartnerContext from \"./PartnerContext\";\n\nconst usePartnerContext = () => useContext(PartnerContext);\n\nexport default usePartnerContext;","import React, {useCallback, useMemo} from 'react';\nimport {AddressBookDetail, BranchSelector, ContactSelector} from \"@fik/components\";\nimport {Form} from \"@mouseover/react-form\";\nimport {Col, Row} from \"@fik/ui\";\n\nconst VALIDATION_RULES = {};\n\nconst PartnerEdit = ({partner, viewType, changePartner}) => {\n const {addressBook, contact, branchOffice, contacts, branchOffices, categoryInfo} = partner;\n\n const handleSubmit = useCallback(({contactId, branchOfficeId}, valid) => {\n if (valid) {\n changePartner({\n ...partner,\n contact: contactId ? contacts.find((element) => element.contactId === contactId) : null,\n branchOffice: branchOfficeId ? branchOffices.find((element) => element.branchOfficeId === branchOfficeId) : null\n })\n }\n }, [branchOffices, contacts, changePartner, addressBook]);\n\n const initialValues = useMemo(() => ({\n contactId: contact ? contact.contactId : null,\n branchOfficeId: branchOffice ? branchOffice.branchOfficeId : null\n }), [contact, branchOffice]);\n\n return (\n <Form\n onSubmit={handleSubmit}\n validationRules={VALIDATION_RULES}\n values={initialValues}\n render={(form) => {\n return <>\n <Row>\n <AddressBookDetail viewType={viewType} addressBook={addressBook} label='Firma'/>\n <Col sm={4}>\n <BranchSelector name='branchOfficeId' branchOffices={branchOffices} form={form}/>\n </Col>\n <Col sm={4}>\n <ContactSelector name='contactId' contacts={contacts} form={form}/>\n </Col>\n {categoryInfo ? <div className=\"col-sm-4\">{categoryInfo.name}<br/>{categoryInfo.commission}</div> : null}\n\n </Row>\n <Row>\n <Col sm={12} className='text-right'>\n <button type='submit' className=\"btn btn-success\" disabled={!form.validation.valid}>Nastavit</button>\n </Col>\n </Row>\n </>\n }}>\n\n </Form>\n );\n};\n\nexport default PartnerEdit;","import {useReducer, useCallback, useEffect, useMemo} from 'react';\n\nconst CANCEL = 'CANCEL';\nconst CONFIRM = 'CONFIRM';\nconst DOCUMENT_INITIALIZED = 'DOCUMENT_INITIALIZED';\nconst PICK = 'PICK';\n\nexport const views = {\n PICK: 'pick',\n VIEW: 'view',\n EXISTING: 'existing',\n PREPARING: 'none'\n};\n\nconst initialState = {\n initialValues: null,\n values: null,\n valid: false,\n previousViewType: views.PREPARING,\n viewType: views.PREPARING,\n params: null\n};\n\nconst emptyValues = {\n addressBook: {name: null, street: null, city: null, zipcode: null, companyId: null},\n contact: {contactFirstname: null, contactSurname: null, contactEmail: null, contactPhone: null}\n};\n\nfunction prepareValues(channelValues) {\n return channelValues ? {\n ...emptyValues,\n ...channelValues,\n contact: channelValues && channelValues.contact ? channelValues.contact : emptyValues.contact\n } : {...emptyValues};\n}\n\nfunction isEmptyChannel(channelValues) {\n return !(channelValues && channelValues.addressBook && channelValues.addressBook.name);\n}\n\nconst reducer = (state, action) => {\n switch (action.type) {\n\n case PICK:\n return {\n ...state,\n values: null,\n valid: false,\n previousViewType: state.viewType,\n viewType: views.EXISTING,\n params: action.params\n };\n\n case CONFIRM:\n return {\n ...state,\n values: action.values,\n valid: true,\n previousViewType: null,\n viewType: views.VIEW,\n params: null\n };\n\n case CANCEL:\n return {\n ...state,\n values: null,\n valid: false,\n viewType: state.previousViewType,\n params: null\n };\n\n case DOCUMENT_INITIALIZED:\n return {\n ...state,\n previousViewType: action.viewType,\n viewType: action.viewType,\n params: null,\n values: action.values,\n initialValues: action.initialValues,\n valid: false\n };\n\n default:\n return state;\n }\n};\n\n\nconst useResellerEdit = ({channelValues, onConfirm, onCancel, onChange}) => {\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n const cancel = useCallback(() => {\n onCancel();\n dispatch({type: CANCEL});\n }, [onCancel]);\n\n const confirm = useCallback((values) => {\n if (onConfirm) {\n onConfirm(values);\n }\n dispatch({type: CONFIRM, values});\n }, [dispatch, onConfirm]);\n\n const pick = useCallback((params) => dispatch({type: PICK, params}), [dispatch]);\n\n useEffect(() => {\n if (state.viewType === views.PREPARING) {\n dispatch({\n type: DOCUMENT_INITIALIZED,\n initialValues: channelValues,\n values: prepareValues(channelValues),\n viewType: isEmptyChannel(channelValues) ? views.PICK : views.VIEW});\n }\n }, [channelValues, state.viewType]);\n\n useEffect(() => {\n if (onChange) {\n onChange(state.values);\n }\n }, [state.values, onChange]);\n\n return useMemo(() => ({\n cancel,\n confirm,\n pick,\n viewType: state.viewType,\n values: state.values,\n params: state.params\n }), [cancel, confirm, pick, state]);\n};\n\nexport default useResellerEdit;","import React from \"react\";\nimport PropTypes from 'prop-types';\nimport {Form, FormField} from \"@mouseover/react-form\";\n\nconst ResellerRidForm = ({onSubmit, children, values}) => {\n return <Form\n values={values}\n validationRules={{}}\n onSubmit={onSubmit}\n render={(form) => (\n <>\n <div className=\"row\">\n <div className=\"col-sm-12\">\n <FormField form={form}\n name='id'\n elementType='input'\n elementConfig={{\n placeholder: 'RID partnera'\n }}\n renderAppend={() => (<span className=\"input-group-btn\">\n <button type=\"submit\" className=\"btn btn-primary\">Hledat</button>\n </span>)}\n />\n </div>\n </div>\n {children}\n </>\n )}/>;\n};\n\nResellerRidForm.propTypes = {\n onSubmit:PropTypes.func,\n children: PropTypes.oneOfType([PropTypes.array, PropTypes.object, PropTypes.func]),\n values: PropTypes.object\n};\n\nexport default ResellerRidForm;","import React, {useCallback, useEffect} from \"react\";\nimport PropTypes from 'prop-types';\nimport ResellerRidForm from \"./ResellerRidForm\";\nimport {usePureEntity} from \"@fik/entity\";\nimport {Channel} from \"@fik/document\";\nimport {Col, Row} from \"@fik/ui\";\nimport handleClick from \"@fik/utils/handleClick\";\n\nconst ResellerByRidFinder = ({channelValues, onConfirm, autoConfirm}) => {\n const [{entity: resellerProfile}, load] = usePureEntity({name: 'resellerProfile', params: {action: 'profile'}});\n\n const find = useCallback((params) => {\n load(params);\n }, [load]);\n\n useEffect(() => {\n if (autoConfirm && resellerProfile) {\n onConfirm(resellerProfile);\n }\n }, [resellerProfile, onConfirm, autoConfirm]);\n\n const confirmProfileChange = useCallback(() => {\n onConfirm(resellerProfile);\n }, [onConfirm, resellerProfile]);\n\n return <>\n <ResellerRidForm onSubmit={find}/>\n {resellerProfile ? <Channel {...resellerProfile} /> : null}\n {channelValues && resellerProfile ? <Row>\n <Col sm={12} className='text-right'>\n <button className=\"btn btn-success\" onClick={handleClick(confirmProfileChange)} disabled={!resellerProfile}>Nastavit</button>\n </Col>\n </Row> : null}\n </>;\n};\n\nResellerByRidFinder.propTypes = {\n channelValues: PropTypes.object,\n confirmCustomerChange: PropTypes.func,\n cancelCustomerEdit: PropTypes.func\n};\n\nexport default ResellerByRidFinder;","import React from \"react\";\nimport {Box, Errors} from \"@fik/ui\";\nimport {Channel} from \"@fik/document\";\nimport handleClick from \"@fik/utils/handleClick\";\nimport usePartnerContext from \"../partner/usePartnerContext\";\nimport {PARTNER_VIEWS} from \"../partner/usePartner\";\nimport PartnerEdit from \"../partner/PartnerEdit\";\nimport {ResellerByRidFinder} from \"@fik/reseller-edit\";\n\nconst DocumentPartner = ({messages}) => {\n\n const {partner, isPartnerFilled, view, pick, edit, cancel, confirmChange} = usePartnerContext();\n\n const buttons = [];\n\n if ((view === PARTNER_VIEWS.PICK) || view === PARTNER_VIEWS.EDIT) {\n buttons.push(<button key=\"cancel\" onClick={handleClick(cancel)} className='btn btn-xs btn-danger m-r-xs'>Zrušit <i className='fa fa-trash'/></button>);\n } else if (isPartnerFilled) {\n buttons.push(<button key=\"pick\" onClick={handleClick(pick)} className='btn btn-xs btn-primary m-r-xs'>Vybrat <i className='fa fa-search'/></button>);\n buttons.push(<button key=\"edit\" onClick={handleClick(edit)} className='btn btn-xs btn-primary m-r-xs'>Upravit <i className='fa fa-pencil'/></button>);\n }\n\n return <Box title=\"Partner\"\n tools={buttons}>\n {messages && <Errors messages={messages}/>}\n {(view === PARTNER_VIEWS.PICK) && <ResellerByRidFinder\n autoConfirm={!isPartnerFilled}\n channelValues={partner}\n onConfirm={confirmChange}\n onCancel={cancel}\n />}\n {view === PARTNER_VIEWS.VIEW && <Channel {...partner} isCustomer={false}/>}\n {view === PARTNER_VIEWS.EDIT && <PartnerEdit partner={partner} changePartner={confirmChange} isCustomer={false}/>}\n </Box>;\n};\n\nexport default DocumentPartner;\n","import React from \"react\";\nimport PartnerProvider from \"../partner/PartnerProvider\";\nimport {DisabledOverlay} from \"@fik/ui\";\nimport DocumentPartner from \"./DocumentPartner\";\nimport {useDocumentContext} from \"../useDocumentContext\";\n\nconst DocumentPartnerContainer = () => {\n const {\n document,\n view: {enablePartner, handlePartnerViewChange},\n validation: {validationMessages},\n isEpc,\n confirmPartnerChange\n } = useDocumentContext();\n\n return document && isEpc && <PartnerProvider channel={document.partner} onPartnerChange={confirmPartnerChange} onViewChange={handlePartnerViewChange}>\n <DisabledOverlay on={!enablePartner}>\n <DocumentPartner messages={validationMessages.filter(message => message.path.indexOf('partner') === 0)}/>\n </DisabledOverlay>\n </PartnerProvider>;\n}\n\nexport default DocumentPartnerContainer;","import stringifyObjectKeyAndValues from \"@fik/utils/stringifyObjectKeyAndValues\";\nimport {getOnPath} from \"@mouseover/js-utils\";\n\nconst setLastUpdate = (filtersKey) => (state) => ({\n ...state,\n [filtersKey]: {\n ...state[filtersKey],\n lastUpdateTime: Date.now()\n }\n});\n\nconst setPage = (filtersKey, page) => (state, action, pageData) => ({\n ...state,\n [filtersKey]: {\n ...state[filtersKey],\n pages: {\n ...state[filtersKey].pages,\n [page]: pageData\n }\n }\n});\n\nconst setCount = (filtersKey) => (state, action) => ({\n ...state,\n [filtersKey]: {\n ...state[filtersKey],\n count: action.payload.count,\n }\n});\n\nconst PAGE_COMMON_KEYS = ['items', 'page', 'count', 'limit'];\n\nconst getIncludesFromBody = (action) => Object.entries(action.payload).reduce((o, [key, value]) => {\n if (PAGE_COMMON_KEYS.indexOf(key) === -1) {\n o[key] = value;\n }\n return o;\n}, {});\n\nconst getCurrentPage = (filterKey, page) => (state) => getOnPath(state, [filterKey, 'pages', page]);\n\nconst updateFor = (action, callback) => {\n const {page, ...searchParams} = {...action.params[1]};\n delete searchParams.page;\n const filtersKey = stringifyObjectKeyAndValues(searchParams);\n\n return callback({\n setLastUpdate: setLastUpdate(filtersKey),\n setPage: setPage(filtersKey, page),\n setCount: setCount(filtersKey),\n getCurrentPage: getCurrentPage(filtersKey, page)\n });\n};\n\nconst pageInitialState = {\n isFetching: false,\n isRefreshing: false,\n isSuccess: false,\n isFailed: false,\n lastUpdateTime: null,\n elements: [],\n includes: {}\n};\n\nconst setCountAndLastUpdate = (context, state, action) => context.setCount(context.setLastUpdate(state), action);\nconst setCountAndLastUpdateIfCount = (context, state, action) => (action.params[1].count !== false)\n ? setCountAndLastUpdate(context, state, action)\n : context.setLastUpdate(state);\n\nconst isRefreshing = (state) => state && state.isSuccess === true;\n\nexport const dataSourceReducer = (types, initialState = {}) => {\n const {\n FETCH_INIT,\n FETCH_SUCCESS,\n FETCH_FAILURE,\n FETCH_RESET,\n COUNT_FETCH_INIT,\n COUNT_FETCH_SUCCESS,\n COUNT_FETCH_FAILURE,\n } = types;\n\n const typesArray = Object.values(types);\n\n return (state = initialState, action) => {\n if (typesArray.indexOf(action.type) === -1) {\n return state;\n }\n\n switch (action.type) {\n case FETCH_INIT:\n return updateFor(action, (context) => {\n const current = context.getCurrentPage(state);\n return context.setPage(\n context.setLastUpdate(state),\n action,\n {\n ...pageInitialState,\n isRefreshing: current && current.isSuccess,\n isFetching: true,\n lastUpdateTime: Date.now(),\n elements: current ? current.elements : []\n });\n });\n\n case FETCH_SUCCESS:\n return updateFor(action, (context) => context.setPage(\n setCountAndLastUpdateIfCount(context, state, action),\n action,\n {\n ...pageInitialState,\n isSuccess: true,\n lastUpdateTime: Date.now(),\n elements: action.payload.items,\n includes: getIncludesFromBody(action)\n }));\n\n case COUNT_FETCH_SUCCESS:\n return updateFor(action, (context) => context.setCount(\n context.setLastUpdate(state),\n action\n ));\n case FETCH_FAILURE:\n return updateFor(action, (context) => context.setPage(\n context.setLastUpdate(state),\n action,\n {\n ...pageInitialState,\n isFailed: true,\n lastUpdateTime: Date.now(),\n elements: []\n }));\n\n case FETCH_RESET:\n return {};\n\n default:\n return state;\n }\n }\n};","import {dataSourceReducer} from \"./dataSource\";\nimport {createActionNames} from \"@fik/api\";\n\nexport const createDataSourceReducer = (storeName, resource = 'data-source') => {\n const actionNames = createActionNames([storeName, resource]);\n const countActionNames = createActionNames([storeName, resource, 'count']);\n return {\n [resource]: dataSourceReducer({\n ...actionNames,\n COUNT_FETCH_INIT: countActionNames.FETCH_INIT,\n COUNT_FETCH_SUCCESS: countActionNames.FETCH_SUCCESS,\n COUNT_FETCH_FAILURE: countActionNames.FETCH_FAILURE,\n }, {})\n }\n};\n\nexport default createDataSourceReducer;","import stringifyObjectKeyAndValues from \"@fik/utils/stringifyObjectKeyAndValues\";\n\nexport const selectCurrentBySearchParams = (state, params, defaults = null) => {\n const searchParams = {...params};\n delete searchParams.page;\n const filtersKey = stringifyObjectKeyAndValues(searchParams);\n return state && state[filtersKey] ? state[filtersKey] : defaults;\n};\n\nexport const getPages = (state, defaults = {}) => state.pages || defaults;\nexport const getCount = (state, defaults = null) => state.count || defaults;\nexport const getPage = (pages, pageNumber, defaults = {}) => pages[pageNumber] || defaults;\nexport const getPageElements = (page) => page.elements;\nexport const getPageIncludes = (page) => page.includes || {};\nexport const getPageIsLoading = (page) => page.isFetching;\nexport const getPageLoadingState = (page) => ({isFetching: page.isFetching, isFailed: page.isFailed, isSuccess: page.isSuccess, isRefreshing: page.isRefreshing});\n\n\n","import {getPage, getPages, selectCurrentBySearchParams} from \"./selectors\";\nimport {resourceAsyncCallAction} from \"@fik/api\";\nimport {getStoreResourceState} from \"@fik/api/selectors\";\n\nconst shouldUpdateDataSource = ({storeName}, timeToRefresh = 300) => ([resource, params], getState) => {\n const searchParamsState = selectCurrentBySearchParams(getStoreResourceState(storeName, 'data-source')(getState()), params, {});\n const pages = getPages(searchParamsState);\n const selectedPage = getPage(pages, params.page, false);\n\n if (selectedPage === false) {\n //- not defined at all\n return true;\n }\n\n if (selectedPage.isFetching) {\n //- already fetching\n return false;\n }\n\n if (timeToRefresh === 0) {\n return true;\n }\n\n return isTimeToRefresh(selectedPage.lastUpdateTime, timeToRefresh * 1000);\n};\n\nconst isTimeToRefresh = (prevTime, diff) => {\n return Date.now() - prevTime > diff;\n};\n\nexport const loadDataSource = (model, timeToRefresh = 300) => (context) => {\n return resourceAsyncCallAction(context, shouldUpdateDataSource(context, timeToRefresh))(model.dataSource(context.name).getDataSource);\n};\n\nexport const loadDataSourceCount = (model) => (context) => {\n return resourceAsyncCallAction(context)(model.dataSource(context.name).getDataSourceCount);\n};","import {useCallback, useContext, useMemo, useState} from 'react';\nimport {\n getCount,\n getPage,\n getPageElements,\n getPageIsLoading,\n getPages,\n selectCurrentBySearchParams,\n getPageLoadingState, getPageIncludes\n} from \"./selectors\";\nimport {useDispatch} from \"react-redux\";\nimport {useResourceContext, ModelContext} from \"@fik/model\";\nimport {createActionNames, useResourceSelector} from \"@fik/api\";\nimport {loadDataSource, loadDataSourceCount} from \"./actions\";\nimport {useHookToLoading} from \"@fik/loading\";\n\nexport const ELEMENTS_PER_PAGE = 20;\n\nconst useDataSourceSelector = (context, {searchParams, pageNumber, limit, params}) => {\n return useResourceSelector(context, (state) => {\n const searchParamsState = selectCurrentBySearchParams(state, {\n page: pageNumber,\n limit: limit || ELEMENTS_PER_PAGE, ...params, ...searchParams\n }, {});\n const pages = getPages(searchParamsState);\n const selectedPage = getPage(pages, pageNumber);\n return {\n loadingState: getPageLoadingState(selectedPage),\n page: pageNumber,\n items: getPageElements(selectedPage),\n loading: getPageIsLoading(selectedPage),\n includes: getPageIncludes(selectedPage),\n pagination: {\n page: pageNumber,\n count: getCount(searchParamsState),\n limit: limit\n }\n }\n }, [searchParams, pageNumber, limit, params]);\n};\n\nexport const usePureDataSource = ({name, limit, initialSearchParams, dataSourceResource = 'data-source', params}) => {\n\n const {storeName, name: resource} = useResourceContext(name);\n\n const dispatch = useDispatch();\n const model = useContext(ModelContext);\n\n const [searchParams, setSearchParams] = useState(initialSearchParams);\n const [page, setPage] = useState(1);\n\n const {loadingState, ...selectedState} = useDataSourceSelector(\n {storeName, name: dataSourceResource},\n {searchParams, pageNumber: page, limit: limit || ELEMENTS_PER_PAGE, params: params || {}}\n );\n\n const memoizedParams = useMemo(() => params ? params : {}, [params]);\n\n const load = useCallback((timeToRefresh = 3) => {\n dispatch(\n loadDataSource(model, timeToRefresh)({storeName, name: dataSourceResource})\n (\n resource,\n {page, limit: limit || ELEMENTS_PER_PAGE, ...memoizedParams, ...searchParams}\n )\n );\n }, [dataSourceResource, dispatch, limit, model, page, resource, searchParams, storeName, memoizedParams]);\n\n const count = useCallback(() => {\n dispatch(\n loadDataSourceCount(model, 0)({storeName, name: dataSourceResource, subAction: 'count'})\n (\n resource,\n {page, limit: limit || ELEMENTS_PER_PAGE, ...memoizedParams, ...searchParams}\n )\n );\n }, [dataSourceResource, dispatch, limit, model, page, resource, searchParams, storeName, memoizedParams]);\n\n const reset = useCallback(() => {\n const actions = createActionNames([storeName, dataSourceResource]);\n dispatch({type: actions.FETCH_RESET});\n }, [dispatch, storeName, dataSourceResource]);\n\n useHookToLoading(`${name}-date-source`, loadingState);\n\n // const handleSetPage = useCallback((page) => {\n // setPage();\n // }, [setPage]);\n\n return {\n ...selectedState,\n loadingState,\n page,\n searchParams,\n setPage,\n setSearchParams: useCallback((params) => {\n setPage(1);\n setSearchParams(params);\n }, [setSearchParams, setPage]),\n load,\n count,\n reset,\n refresh: load // for backward compatibility\n };\n};\n\nexport default usePureDataSource;","import React from \"react\";\n\nconst QueryParamsContext = React.createContext(null);\n\nexport default QueryParamsContext;","import {useContext} from \"react\";\nimport QueryParamsContext from \"./QueryParamsContext\";\n\nconst useQueryParamsContext = () => useContext(QueryParamsContext);\n\nexport default useQueryParamsContext;\n","import React, {useCallback, useEffect, useMemo, useRef, useState} from \"react\";\nimport {useHistory, useLocation} from \"react-router-dom\";\nimport QueryParamsContext from \"../QueryParamsContext\";\nimport {shallowEqual} from \"@mouseover/js-utils\";\n\nexport const searchParamsToObject = (urlSearchParams) => {\n if (!urlSearchParams) {\n return {};\n }\n const returnParams = {};\n urlSearchParams.forEach(function(value, key) {\n returnParams[key] = value;\n });\n return returnParams;\n}\n\n/**\n * Poskytuje jednotne api pro zmenu url query parametru\n *\n * @param props\n * @returns {JSX.Element}\n * @constructor\n */\nconst QueryParamsProvider = (props) => {\n const history = useHistory();\n const location = useLocation();\n const searchParams = useMemo(() => searchParamsToObject(new URLSearchParams(location.search)), [location.search]);\n\n const currentSearchParams = useRef(searchParams);\n const newSearchParams = useRef(searchParams);\n\n const [reload, setReload] = useState(false);\n\n const change = useCallback((args) => {\n setReload(true);\n newSearchParams.current = typeof args === 'function' ? args(newSearchParams.current) : args;\n }, [newSearchParams, setReload]);\n\n useEffect(() => {\n if (reload) {\n setReload(false);\n }\n }, [reload, setReload]);\n\n useEffect(() => {\n return () => {\n const params = newSearchParams.current;\n if (!shallowEqual(currentSearchParams.current, params)) {\n const locationSearchParams = new URLSearchParams();\n for (const key in params) {\n if (params.hasOwnProperty(key)) {\n locationSearchParams.append(key, params[key]);\n }\n }\n history.push({search: locationSearchParams.toString()});\n currentSearchParams.current = params;\n }\n }\n });\n\n const getSearchParams = useCallback(() => currentSearchParams.current, [currentSearchParams]);\n const value = useMemo(() => ({getSearchParams, change, searchParams}), [history, searchParams, getSearchParams]);\n return <QueryParamsContext.Provider value={value} {...props}/>;\n}\n\nexport default QueryParamsProvider;\n\n","import {useLocation} from \"react-router-dom\";\nimport {useCallback, useMemo} from \"react\";\nimport useQueryParamsContext from \"./useQueryParamsContext\";\nimport {searchParamsToObject} from \"./components/QueryParamsProvider\";\n\nconst useQueryParams = (defaultParams) => {\n const queryParamsContext = useQueryParamsContext();\n\n const urlSearchParams = useMemo(()=> {\n const returnParams = {...defaultParams};\n if (queryParamsContext.searchParams) {\n Object.entries(queryParamsContext.searchParams).forEach(([key, value]) => {\n if (defaultParams && defaultParams.hasOwnProperty(key)) {\n returnParams[key] = value;\n }\n })\n }\n return returnParams;\n }, [queryParamsContext.searchParams, defaultParams]);\n\n const setQuery = useCallback((args) => {\n const params = typeof args === 'function' ? args(urlSearchParams) : args;\n queryParamsContext.change((current) => {\n const newParams = {...current};\n for (const [key, value] of Object.entries(params)) {\n if (!defaultParams || defaultParams.hasOwnProperty(key)) {\n if (value !== defaultParams[key]) {\n newParams[key] = value;\n } else if (newParams.hasOwnProperty(key)) {\n delete newParams[key];\n }\n }\n }\n return newParams;\n });\n }, [queryParamsContext, defaultParams, urlSearchParams]);\n\n return [\n urlSearchParams,\n setQuery\n ];\n}\n\nexport default useQueryParams;","import {useDataSource} from \"./useDataSource\";\nimport {useCallback, useEffect, useMemo, useState} from \"react\";\nimport {shallowEqual} from \"@mouseover/js-utils\";\nimport {useQueryParams} from \"@fik/url-query\";\nimport usePureDataSource from \"./usePureDataSource\";\n\nconst PAGINATION = {\n page: 1\n}\n\nconst useDataSourceWithQueryParams = ({initialSearchParams, defaultParams, ...props}) => {\n const [queryParams, setQueryParams] = useQueryParams(defaultParams);\n const [paginationQueryParams, setPaginationQueryParams] = useQueryParams(PAGINATION);\n const [queryParamsProcessed, setQueryParamsProcessed] = useState(false);\n const [paginationQueryParamsProcessed, setPaginationQueryParamsProcessed] = useState(false);\n const [firstRun, setFirstRun] = useState(true);\n\n //- je nutne zaznamenat ze se zmenilo url query\n useEffect(() => {\n setQueryParamsProcessed(false);\n }, [setQueryParamsProcessed, queryParams]);\n\n //- je nutne zaznamenat ze se zmenilo page\n useEffect(() => {\n setPaginationQueryParamsProcessed(false);\n }, [setPaginationQueryParamsProcessed, paginationQueryParams]);\n\n const dataSource = usePureDataSource(\n {...props, initialSearchParams: queryParams}\n );\n\n const {pagination, setSearchParams, setPage, searchParams} = dataSource;\n\n // zmena filtrovani\n dataSource.handleSearch = useCallback((values, valid) => {\n if (valid) {\n const params = {...searchParams, ...values};\n setSearchParams(params);\n setQueryParams({...params});\n }\n }, [searchParams, setSearchParams, setQueryParams]);\n\n // zmena stranky\n dataSource.handlePageChange = useCallback((page) => {\n setPage(page);\n setPaginationQueryParams({page})\n }, [setPaginationQueryParams, setPage]);\n\n // osetreni zmeny query vyhledavani\n useEffect(() => {\n if (!queryParamsProcessed) {\n const newParams = firstRun ? Object.entries(queryParams).reduce((o, [key, value])=> {\n if (!defaultParams.hasOwnProperty(key) || defaultParams[key] !== value) {\n o[key] = value;\n }\n return o;\n }, {...initialSearchParams}) : {...initialSearchParams, ...queryParams};\n\n if (!shallowEqual(searchParams, newParams)) {\n setSearchParams(newParams);\n }\n setFirstRun(false);\n setQueryParamsProcessed(true);\n }\n }, [searchParams, firstRun, queryParams, setFirstRun, setSearchParams, queryParamsProcessed, setQueryParamsProcessed]);\n\n // osetreni query page\n useEffect(() => {\n if (!paginationQueryParamsProcessed) {\n const page = parseInt(paginationQueryParams.page);\n if (pagination.page !== page) {\n setPage(page);\n }\n setPaginationQueryParamsProcessed(true);\n }\n }, [pagination, paginationQueryParams, setPage, paginationQueryParamsProcessed, setPaginationQueryParamsProcessed]);\n\n useEffect(() => {\n if (queryParamsProcessed) {\n dataSource.load();\n }\n }, [queryParamsProcessed, paginationQueryParamsProcessed, dataSource.load]);\n\n dataSource.queryParams = useMemo(() => ({...initialSearchParams, ...queryParams}), [initialSearchParams, queryParams]);\n return dataSource;\n}\n\nexport default useDataSourceWithQueryParams;","import React, {useEffect} from 'react';\nimport {Box, Errors} from \"@fik/ui\";\nimport DocumentSaved from \"./DocumentSaved\";\nimport DocumentAdditionalInfo from \"./DocumentAdditionalInfo\";\nimport {useDocumentContext} from \"../useDocumentContext\";\nimport DocumentCustomerContainer from \"./DocumentCustomerContainer\";\nimport DocumentEvidenceItems from \"./DocumentEvidenceItems\";\nimport DocumentEvidenceItem from \"./DocumentEvidenceItem\";\nimport documentViews from \"./../documentViews\";\nimport DocumentAttachments from \"./DocumentAttachments\";\nimport {DisabledOverlay} from \"@fik/ui\";\nimport DocumentCheckboxes from \"./DocumentChekboxes\";\nimport DocumentBranchOffice from \"./DocumentBranchOffice\";\nimport DocumentPartnerContainer from \"./DocumentPartnerContainer\";\nimport {useDataSource} from \"@fik/data-source\";\nimport usePureDataSource from \"@fik/data-source/usePureDataSource\";\n\nconst DocumentEdit = ({dials}) => {\n\n const {\n document,\n view: {currentView, enableEvidenceItem, enableAttachment, enablePartner, enableBranchOffice, enableButtons},\n initialized,\n saving: {saveDocument, isSaved, documentType},\n evidenceItemEdit,\n validation: {availableButtons, validationMessages},\n isEpc,\n confirmPartnerChange,\n documentType: resourceName\n } = useDocumentContext();\n\n const {reset} = usePureDataSource({name: documentType || resourceName});\n\n useEffect(() => {\n if (isSaved) {\n reset();\n }\n }, [reset, isSaved]);\n\n if (!document || !initialized) {\n return null;\n }\n\n let content;\n\n if (isSaved) {\n content = <div className='row'>\n <div className=\"col-sm-12\">\n <Box>\n <h1>Úspěšně odesláno</h1>\n <DocumentSaved documentType={documentType} document={document}/>\n </Box>\n </div>\n </div>;\n } else {\n content = <>\n <div className='row'>\n <div className='col-sm-12'>\n <Errors messages={validationMessages.filter(message => message.path.indexOf('owner') !== 0 && message.path.indexOf('partner') !== 0 && message.path.indexOf('evidenceItems') !== 0)}/>\n <DisabledOverlay on={!enableBranchOffice}>\n {dials.branchOffices && dials.branchOffices.length > 0 ? <DocumentBranchOffice branchOffices={dials.branchOffices} /> : null}\n </DisabledOverlay>\n <DocumentPartnerContainer />\n <DocumentCustomerContainer />\n <DisabledOverlay on={!enableEvidenceItem}>\n {currentView === documentViews.EDIT_EVIDENCE_ITEMS\n ? <DocumentEvidenceItem\n document={document}\n confirm={evidenceItemEdit.confirmEvidenceItemEdit}\n cancel={evidenceItemEdit.cancelEvidenceItemEdit}\n selection={evidenceItemEdit.selection}/> : <DocumentEvidenceItems/>}\n </DisabledOverlay>\n </div>\n </div>\n\n <div className='row'>\n <div className='col-sm-12'>\n <DisabledOverlay on={!enableAttachment}>\n <Box title=\"Poznámka a přílohy (nepovinné)\">\n <div className='row'>\n <div className='col-sm-12 col-md-6'>\n <DocumentAdditionalInfo/>\n </div>\n <div className='col-sm-12 col-md-6'>\n <DocumentAttachments/>\n </div>\n </div>\n </Box>\n </DisabledOverlay>\n </div>\n </div>\n\n <div className=\"text-right m-t-md\">\n <DisabledOverlay on={!enableButtons}>\n <DocumentCheckboxes/>\n {availableButtons.map(({documentType, label}) => (\n <button key={documentType} onClick={() => saveDocument(documentType, document)} type=\"button\"\n className={\"btn btn-lg btn-success m-l-sm btn-\" + documentType}>{label}</button>))}\n </DisabledOverlay>\n </div>\n </>\n }\n\n return content;\n};\n\nexport default DocumentEdit;\n","import React from 'react';\nimport {useDials} from \"@fik/dials\";\nimport DocumentEdit from \"./../components/DocumentEdit\";\nimport {useEntity} from \"@fik/entity\";\nimport {DocumentProvider} from \"./../components/DocumentProvider\";\nimport {isEmpty} from \"@mouseover/js-utils/src\";\nimport PropTypes from \"prop-types\";\nimport {useEvidenceItemsStorage} from \"@fik/calculator\";\n\n\nconst DocumentEntityCreate = ({name, isEpc, params}) => {\n\n const existing = !isEmpty(params.licensePublicId || params.licenseEPLI || params.licenseKey || params.licenseUsername);\n const {entity} = useEntity({name, params: {action: 'new'}}, null, params);\n const dials = useDials({name});\n const {evidenceItems} = useEvidenceItemsStorage();\n\n return (\n entity ? <DocumentProvider document={entity}\n documentType={name}\n isEpc={isEpc}\n evidenceItem={params.evidenceItem && evidenceItems[params.evidenceItem] ? evidenceItems[params.evidenceItem] : null}\n existing={existing}>\n <DocumentEdit dials={dials} />\n </DocumentProvider> : null\n )\n};\n\nDocumentEntityCreate.propTypes = {\n name: PropTypes.string,\n params: PropTypes.shape({\n licensePublicId: PropTypes.string,\n licenseKey: PropTypes.string,\n licenseUsername: PropTypes.string,\n licenseEPLI: PropTypes.string\n })\n};\n\n\nexport default DocumentEntityCreate;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {Table, TableRow} from \"@fik/table\";\nimport EvidenceItemName from \"./EvidenceItemName\";\nimport EvidenceItemAmount from \"./EvidenceItemAmount\";\nimport EvidenceItemDiscount from \"./EvidenceItemDiscount\";\nimport EvidenceItemBonusCode from \"./EvidenceItemBonusCode\";\nimport EvidenceItemPromoWithName from \"./EvidenceItemPromoWithName\";\nimport EvidenceItemPrice from \"./EvidenceItemPrice\";\n\nconst EvidenceItems = (props) => {\n\n const visibleDiscounts = props.visibleDiscounts || true;\n const visiblePrices = props.visiblePrices || true;\n const ownerPrice = props.ownerPrice || true;\n const partnerPrice = props.partnerPrice || true;\n const epcPrice = props.epcPrice || false;\n\n return <Table responsive\n containerClassName=\"m-t\"\n rows={props.evidenceItems}\n renderRow={props.renderRow}\n renderRowMessages={props.renderRowMessages}\n primary='licenseId'>\n <EvidenceItemName header='Položka'/>\n <EvidenceItemAmount header='Počet'/>\n {visibleDiscounts && <EvidenceItemDiscount header='Sleva'/>}\n {visibleDiscounts && <EvidenceItemBonusCode header='Bonus kód'/>}\n {visibleDiscounts && <EvidenceItemPromoWithName header='Promo'/>}\n {visiblePrices && ownerPrice &&\n <EvidenceItemPrice header={() => <>Doporučená <abbr title=\"Doporučená koncová cena\">EUP</abbr> bez DPH</>} channel='owner'/>}\n {visiblePrices && partnerPrice && <EvidenceItemPrice header='Cena partner' channel='partner'/>}\n {visiblePrices && epcPrice && <EvidenceItemPrice header='Cena EPC' channel='epc'/>}\n {props.itemMenu && <TableRow className='text-right' render={props.itemMenu}/>}\n </Table>;\n};\n\n\nEvidenceItems.propTypes = {\n visibleDiscounts: PropTypes.bool,\n visiblePrices: PropTypes.bool,\n ownerPrice: PropTypes.bool,\n partnerPrice: PropTypes.bool,\n epcPrice: PropTypes.bool,\n evidenceItems: PropTypes.array,\n itemMenu: PropTypes.func,\n renderRow: PropTypes.func,\n renderRowMessages: PropTypes.func,\n};\n\n\nexport default EvidenceItems;","import React from 'react';\nimport {Channel, ChannelContact} from \"@fik/components\";\nimport Status from './Status';\nimport {EvidenceItems} from '@fik/evidence-item';\nimport Type from './Type';\nimport {Price, Box, Date} from \"@fik/ui\";\nimport arrayToDictionary from \"@fik/utils/arrayToDictionary\";\n\nconst Document = ({entity, dials, renderInfo, isEpc}) => {\n const {types, states} = dials;\n\n const statesDict = arrayToDictionary(states, 'id', 'label');\n const typesDict = arrayToDictionary(types, 'id', 'label');\n\n return (<Box>\n <div className=\"row\">\n <div className=\"col-sm-2\">\n <h3 className=\"border-bottom\">{entity.code}</h3>\n <div><strong>Typ:</strong> <Type value={entity.documentType} enum={typesDict}/></div>\n <div><strong>Stav:</strong> {entity.businessStatus ? entity.businessStatus : <Status value={entity.status} enum={statesDict}/>}</div>\n <div><strong>Vytvořeno:</strong> <Date date={entity.dateCreated}/></div>\n {renderInfo ? renderInfo(entity) : null}\n </div>\n <div className=\"col-sm-5\">\n <h3 className=\"border-bottom\">Partner</h3>\n {entity.partner ? <Channel {...entity.partner} isCustomer={false}/> : null}\n <br />\n <h4 className=\"border-bottom\">Obchodník</h4>\n <ChannelContact {...entity.partner} />\n </div>\n <div className=\"col-sm-5\">\n <h3 className=\"border-bottom\">Zákazník</h3>\n {entity.owner ? <Channel {...entity.owner} isCustomer={true}/> : null}\n </div>\n </div>\n <div className=\"row\">\n <div className=\"col-lg-12\">\n <EvidenceItems evidenceItems={entity.evidenceItems} epcPrice={isEpc}/>\n <Box>\n <table className=\"table invoice-total\">\n <tbody>\n <tr>\n <td><strong>Cena bez DPH :</strong></td>\n <td><Price price={entity.basePrice}/></td>\n </tr>\n <tr>\n <td><strong>Cena s DPH :</strong></td>\n <td><Price price={entity.vatPrice}/></td>\n </tr>\n </tbody>\n </table>\n </Box>\n </div>\n </div>\n </Box>)\n};\n\nexport default Document;\n","import {Date, Price} from \"@fik/ui\";\nimport React from \"react\";\nimport {Status, Type} from \"../index\";\nimport Channel from \"@fik/components/Channel/Channel\";\nimport {ChannelContact, ChannelName, StaffName} from \"@fik/components\";\n\nexport const DocumentOwner = ({owner}) => owner ? <Channel {...owner} /> : null;\nexport const DocumentPartner = ({partner}) => partner ? <Channel {...partner} /> : null;\nexport const DocumentEPC = ({epc}) => epc ? <Channel {...epc} /> : null;\nexport const DocumentType = ({documentType, typesDict}) => <Type value={documentType} enum={typesDict}/>;\nexport const DocumentStatus = ({status, statesDict}) => <Status value={status} enum={statesDict}/>;\nexport const BusinessStatus = ({businessStatus}) => <div>{businessStatus}</div>;\nexport const DocumentBasePrice = ({basePrice}) => <Price price={basePrice}/>;\nexport const DocumentPrices = ({partner, owner, epc}) => <>\n {owner ? <div className='font-bold' title='Cena klient'><Price price={owner.basePrice}/></div> : null}\n {partner ? <div title='Cena partner'><Price price={partner.basePrice}/></div> : null}\n {epc ? <div title='Cena EPC'><Price price={epc.basePrice}/></div> : null}\n</>;\nexport const DocumentCreatedDate = ({dateCreated}) => <Date date={dateCreated}/>;\nexport const DocumentResellerContact = ({partner, epc}) => <ChannelContact {...(epc||partner)} />;\nexport const DocumentPartnerAndEpc = ({partner, epc}) => <>\n <div>{partner ? <ChannelName {...partner.addressBook} /> : null}</div>\n <div>{epc ? <ChannelName {...epc.addressBook} /> : null}</div>\n</>;\n\nexport const DocumentStaff = ({staffId}) => {\n return <StaffName>{staffId}</StaffName>\n};\n","import {AddressBook} from \"@fik/document\";\nimport React from \"react\";\n\nconst AddressBookDetail = ({viewType, addressBook, label}) => <address\n className={\"col-sm-4\" + (viewType === 'vertical' ? \" col-lg-12\" : \"\")}>\n <h4 className=\"m-b-xs\">{label || 'Adresa'}</h4>\n {addressBook && addressBook.name ? <AddressBook {...addressBook}/> : '-'}\n</address>;\n\nexport default AddressBookDetail;","import {BranchOffice} from \"@fik/document\";\nimport React from \"react\";\n\nconst BranchOfficeDetail = ({branchOffice, viewType, label}) => <address\n className={\"col-sm-4\" + (viewType === 'vertical' ? \" col-lg-12\" : \"\")}>\n <h4 className=\"m-b-xs\">{label || 'Pobočka'}</h4>\n {branchOffice ? <BranchOffice {...branchOffice}/> : '-'}\n</address>;\n\nexport default BranchOfficeDetail;","import {Contact} from \"@fik/document\";\nimport React from \"react\";\n\nconst ContactDetail = ({viewType, contact, label}) => <address className={\"col-sm-4\" + (viewType === 'vertical' ? \" col-lg-12\" : \"\")}>\n <h4 className=\"m-b-xs\">{label || 'Kontakt'}</h4>\n {contact ? <Contact {...contact}/> : '-'}\n</address>;\n\nexport default ContactDetail;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Salesman from \"../../components/Profile/Salesman/Salesman\";\nimport ResellerInfo from '../../components/Profile/ResellerInfo/ResellerInfo';\nimport {useEntity} from \"@fik/entity\";\nimport {Box, Col, Row} from \"@fik/ui\";\nimport ContactEmailsSubscriptions from \"../Profile/ContactEmailsSubscriptions/ContactEmailsSubscriptions\";\nimport {useSelector} from \"react-redux\";\nimport {NavigationItem} from \"@fik/navigation\";\nimport {RenewLicenseShortcut} from \"@fik/components\";\n\nconst ResellerDashboardContent = ({\n addressBook,\n branchOffice,\n categoryInfo,\n privilegeStatus,\n turnovers,\n certInfo,\n staff,\n stats,\n resellerPlanEnabled\n }) => {\n\n const {userId} = useSelector(state => state.auth);\n\n return (<Row>\n <Col lg={4}>\n <h3 className=\"border-bottom\">Váš obchodník</h3>\n <Salesman salesman={staff} path={process.env.REACT_APP_API_URL}/>\n <h3 className=\"border-bottom\">Prodloužení / rozšíření stávající licence</h3>\n <RenewLicenseShortcut />\n </Col>\n <Col lg={4}>\n <h3 className=\"border-bottom\">Partnerství</h3>\n <ResellerInfo reseller={{\n addressBook,\n branchOffice,\n categoryInfo,\n privilegeStatus,\n turnovers,\n certInfo,\n stats,\n resellerPlanEnabled\n }}/>\n </Col>\n <Col lg={4}>\n <h3 className=\"border-bottom\">Jaké zprávy dostáváte aktuálně do e-mailu?</h3>\n <ContactEmailsSubscriptions/>\n <h4>Nastavte si odběr <NavigationItem\n to=\"profile:editContact\"\n params={{id:userId}}>ve Vašem profilu</NavigationItem>!</h4>\n </Col>\n </Row>);\n};\n\nResellerDashboardContent.propTypes = {\n addressBook: PropTypes.object,\n branchOffice: PropTypes.object,\n categoryInfo: PropTypes.object,\n privilegeStatus: PropTypes.string,\n turnovers: PropTypes.object,\n certInfo: PropTypes.array,\n staff: PropTypes.object,\n stats: PropTypes.object\n};\n\nconst ResellerDashboard = () => {\n const {\n entity: resellerProfile\n } = useEntity({name: 'profile'}, null);\n\n return (<Box className=\"border-bottom\">\n {resellerProfile && resellerProfile.addressBook ? <ResellerDashboardContent {...resellerProfile} />: null}\n </Box>);\n};\n\nexport default ResellerDashboard;","import React, {useCallback, useEffect} from \"react\";\nimport {Modal, useModal} from \"@fik/ui\";\nimport handleClick from \"@fik/utils/handleClick\";\nimport {LoadingProvider} from \"@fik/loading\";\nimport {useCmsPageBlocks} from \"@fik/cms\";\nimport {useLocalStorage, useSessionStorage} from \"@fik/storage\";\nimport usePageBlock from \"@fik/page/usePageBlocks\";\n\nconst ID = 'homepage-popup';\nconst BLOCK = 'popup';\n\nconst HomepagePopup = () => {\n const modal = useModal(ID);\n const popup = usePageBlock(BLOCK);\n const [popupSeen, setPopupSeen] = useSessionStorage('popus_seen_' + ID, false);\n const [popupDismissed, setPopupDismissed] = useLocalStorage('popup_dismiss_' + ID, false);\n\n useEffect(() => {\n const checkDate = popupDismissed ? Date.parse(popupDismissed) : null;\n if (popup && !popupSeen && (!checkDate || checkDate <= new Date())) {\n modal.show();\n setPopupSeen(true);\n }\n }, [popup, modal.show, popupSeen, popupDismissed, setPopupSeen]);\n\n const dismiss = useCallback(() => {\n modal.hide();\n let expire = new Date();\n expire.setDate(expire.getDate() + popup.dismiss.days);\n setPopupDismissed(expire);\n }, [modal.hide, popup, setPopupDismissed]);\n\n if (!popup) {\n return null;\n }\n\n const {message, title} = popup;\n\n return <Modal\n {...modal}\n bodyClassName='p-sm'\n renderHeader={() => <>\n <button type=\"button\" className=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\"\n onClick={handleClick(modal.hide)}>×\n </button>\n <h4 className=\"modal-title\">{title}</h4>\n <div className='clearfix'/>\n </>}\n renderFooter={() => <>\n <button type=\"button\" className=\"btn btn-white\" data-dismiss=\"modal\" onClick={handleClick(modal.hide)}>Ok</button>\n <button type=\"button\" className=\"btn btn-primary\" onClick={handleClick(dismiss)}>Nezobrazovat</button>\n </>}>\n <LoadingProvider>\n {modal.visible ? <div dangerouslySetInnerHTML={{__html: message}}/> : null}\n </LoadingProvider>\n </Modal>;\n}\n\nexport default HomepagePopup;","import React from 'react';\nimport {ArticlesFeed} from \"@fik/cms\";\nimport ResellerDashboard from \"../../components/ResellerDashboard/ResellerDashboard\";\nimport {Col, Row} from \"@fik/ui\";\nimport HomapagePopup from \"./HomapagePopup\";\n\nconst Homepage = () => {\n return (<>\n <HomapagePopup />\n <Row>\n <Col lg={12}>\n <ResellerDashboard/>\n </Col>\n </Row>\n <Row>\n <Col lg={12}>\n <ArticlesFeed group={1}/>\n </Col>\n </Row>\n </>);\n};\n\nexport default Homepage;","export const AUTH_INIT = 'user/AUTH_INIT';\nexport const AUTH_SUCCESS = 'user/AUTH_SUCCESS';\nexport const AUTH_DONE = 'user/AUTH_DONE';\nexport const AUTH_FAILED = 'user/AUTH_FAILED';\nexport const AUTH_LOGOUT = 'user/AUTH_LOGOUT';\nexport const AUTH_CHECK = 'user/AUTH_CHECK';\nexport const AUTH_SET_REDIRECT_PATH = 'user/AUTH_SET_REDIRECT_PATH';","import * as actionTypes from './actionTypes';\n\nexport const authInit = (credentials) => {\n return {\n type: actionTypes.AUTH_INIT,\n payload: {\n error: false,\n loading: true,\n credentials\n },\n actions: [authSuccess, checkOfTimeout, authFailed]\n }\n};\nexport const authSuccess = (payload) => {\n return {\n type: actionTypes.AUTH_SUCCESS,\n payload: {\n ...payload,\n error: false,\n loading: false\n }\n }\n};\nexport const authFailed = (error) => {\n return {\n type: actionTypes.AUTH_FAILED,\n payload: {\n error: error,\n loading: false\n }\n }\n};\n\nexport const authenticate = (credentials) => {\n return dispatch => {\n const authData = {\n ...credentials,\n returnSecureToken: true\n };\n\n dispatch(authInit(authData));\n }\n};\n\nexport const logOut = () => {\n return {\n type: actionTypes.AUTH_LOGOUT\n }\n};\n\nexport const checkOfTimeout = (expirationTime) => {\n return dispatch => {\n setTimeout(() => {\n dispatch(logOut());\n }, expirationTime * 1000)\n }\n};\n\nexport const setRedirectPath = (path) => {\n return {\n type: actionTypes.AUTH_SET_REDIRECT_PATH,\n payload: {\n path: path\n }\n };\n};\n\nexport const checkState = () => {\n return {\n type: actionTypes.AUTH_CHECK,\n actions: [logOut, authSuccess, checkOfTimeout]\n };\n};","import {useDispatch, useSelector} from \"react-redux\";\nimport {useCallback} from \"react\";\nimport {authenticate} from \"./actions\";\n\nconst useAuth = () => {\n const dispatch = useDispatch();\n\n const handleAuthenticate = useCallback((credentials) => {\n dispatch(authenticate(credentials));\n }, [dispatch]);\n\n const selection = useSelector(state => ({\n loading: state.auth.loading,\n error: state.auth.error,\n isAuthenticated: state.auth.token !== null,\n redirectPath: state.auth.redirectPath\n }));\n\n return {\n authenticate: handleAuthenticate,\n ...selection\n }\n};\n\nexport default useAuth;","import React, {useCallback} from 'react';\nimport {Form} from \"@mouseover/react-form\";\nimport {Redirect} from \"react-router-dom\";\nimport {Box, Row, Col} from \"@fik/ui\";\nimport useAuth from \"@fik/auth/useAuth\";\nimport {NavigationItem} from \"@fik/navigation\";\n\nconst controls = {\n username: {\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'Jméno',\n },\n value: '',\n valid: false,\n touched: false,\n validation: {\n required: true,\n minLength: 4\n }\n },\n password: {\n elementType: 'input',\n elementConfig: {\n type: 'password',\n placeholder: 'Heslo',\n },\n\n value: '',\n valid: false,\n touched: false,\n validation: {\n required: true,\n minLength: 4,\n placeholder: 'Heslo',\n }\n },\n // 'remember': {\n // elementType: 'checkbox',\n // elementConfig: {autoComplete: 'off'},\n // label: 'Zapamatovat si mě',\n // groupClass: 'form-group m-b-xs m-t-m'\n // },\n 'clientMode': {\n elementType: 'checkbox',\n elementConfig: {autoComplete: 'off'},\n label: 'Režim u klienta',\n groupClass: null\n }\n};\n\nfunction Auth() {\n\n const {authenticate, isAuthenticated, redirectPath, error, loading} = useAuth();\n\n const handleSubmit = useCallback((values, valid) => {\n if (valid) {\n authenticate(values);\n }\n }, [authenticate]);\n\n const date = new Date();\n\n if (isAuthenticated) {\n return <Redirect to={redirectPath}/>;\n }\n\n return (<div className=\"loginColumns\">\n <Row>\n <Col lg={12}>\n <h2 className=\"font-bold\">Vítejte na partnerské zóně ESET!</h2>\n </Col>\n <Col md={6}>\n <div className=\"alert alert-success\">\n Nejste partnerem ESETu? <br/><a href=\"https://www.eset.com/cz/prodejci/o-partnerstvi/\" target=\"_blank\"\n rel=\"noopener noreferrer\">Seznamte se s výhodami\n partnerství</a>.\n </div>\n\n </Col>\n <Col md={6}>\n <Box isLoading={loading}>\n {error ? <div className=\"p-w-xs m-xs alert alert-error\"><p>Nepodařilo se přihlásit</p></div> : null}\n <Form controls={controls} onSubmit={handleSubmit}>\n <button type=\"submit\" className=\"btn btn-primary block full-width m-b\"\n id=\"test_dotd0\">Přihlásit se\n </button>\n </Form>\n\n <div className=\"row\">\n <div className=\"col-lg-6 col-lg-offset-6 text-right\">\n <NavigationItem to=\"forgottenPassword\">\n <small>Zapomněli jste heslo?</small>\n </NavigationItem>\n </div>\n </div>\n </Box>\n </Col>\n </Row>\n <hr/>\n <Row>\n <Col md={12} className=\"text-center\">\n <span>© {date.getFullYear()} - <a href=\"https://www.eset.com/cz\">ESET software spol. s r.o.</a></span>\n </Col>\n </Row>\n </div>);\n}\n\nexport default Auth;\n","import React, {useEffect} from 'react';\nimport {useDispatch} from \"react-redux\";\nimport {Redirect} from \"react-router-dom\";\nimport {logOut} from \"./../actions\";\n\nconst Logout = () => {\n const dispatch = useDispatch();\n\n useEffect(() => {\n dispatch(logOut());\n }, [dispatch]);\n\n return (<Redirect to=\"/\"/>);\n};\n\nexport default Logout;","import React, {useEffect} from \"react\";\nimport IdentityContext from \"../IdentityContext\";\nimport {usePureEntity} from \"@fik/entity\";\nimport {useSelector} from \"react-redux\";\nimport {useModel} from \"@fik/model\";\nimport {SpinnerCircle} from \"@fik/loading\";\n\nconst AuthIdentityProvider = ({children,...props}) => {\n\n const [{entity: identity}, load] = usePureEntity({name: 'identity'});\n const isAuthenticated = useSelector(state => state.auth.token !== null);\n\n const token = useModel(\n (model) => isAuthenticated ? model.authentication().authStorage.getAccessToken() : null,\n [isAuthenticated]\n );\n\n useEffect(() => {\n if (token) {\n load(token);\n }\n }, [token, load]);\n\n return <IdentityContext.Provider value={identity} {...props}>{children}</IdentityContext.Provider>;\n};\n\nexport default AuthIdentityProvider;","import React from 'react';\nimport {NavigationItem} from \"@fik/navigation\";\n\nconst OfferLink = ({id, code, children, ...props}) => {\n return (<NavigationItem {...props}\n to=\"offer:detail\"\n params={{id: encodeURIComponent(id)}}>{children || code}</NavigationItem>);\n};\n\nexport default OfferLink;","import {shallowEqual} from \"@mouseover/js-utils/src\";\n\nconst hasOwn = Object.prototype.hasOwnProperty;\n\nfunction is(x, y) {\n if (x === y) {\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n}\n\nfunction deepShallowEqueal(objA, objB) {\n if (is(objA, objB)) return true;\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n const keysA = Object.keys(objA);\n const keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) return false;\n\n for (let i = 0; i < keysA.length; i++) {\n if (!hasOwn.call(objB, keysA[i])) {\n return false;\n }\n if (typeof objA[keysA[i]] === 'object') {\n if (!shallowEqual(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n } else if (!is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}\n\nexport default deepShallowEqueal;","import React, {useCallback, useEffect, useMemo, useState} from 'react';\nimport {FilterBar} from \"@fik/ui\";\nimport {SelectInput} from \"@fik/form\";\nimport {useFormContainer} from \"@mouseover/react-form\";\nimport {useEntity} from \"@fik/entity\";\nimport {StaffInput} from \"@fik/components\";\nimport useIdentity from \"@fik/auth/useIdentity\";\nimport {isString, shallowEqual} from \"@mouseover/js-utils\";\nimport {INITIAL_SEARCH_PARAMS} from \"./useOpportunities\";\nimport deepShallowEqueal from \"@fik/utils/deepShallowEqueal\";\n\nconst renderLabel = ({label}) => <><small>{label}</small><br/></>;\n\nconst FilterSelect = (props) => <SelectInput renderLabelElement={renderLabel}\n groupContainer={CustomGroupContainer}\n elementConfig={{className: 'input-sm form-control input-s-sm inline'}} {...props}/>;\n\nconst CustomGroupContainer = ({children}) => <label className='inline'>{children}</label>;\n\nconst TagsContainer = ({form: parentForm, channels, tiers, solutionList, operationList, phaseList, businessTypes, visibleFilters}) => {\n const form = useFormContainer('tags', parentForm);\n return <>\n {visibleFilters.phase ? <FilterSelect label=\"Fáze přiležitosti\"\n name='phase'\n form={form}\n options={phaseList\n ? [{value: '', label: 'Všechny'}, ...phaseList.map(item => ({\n value: item.tagId,\n label: item.tagDescription\n }))]\n : []}/> : null}\n {visibleFilters.operation ? <FilterSelect label=\"Typ licence\"\n name='operation'\n form={form}\n options={operationList\n ? [{value: '', label: 'Všechny'}, ...operationList.map(item => ({\n value: item.tagId,\n label: item.tagDescription\n }))]\n : []}/> : null}\n {visibleFilters.solution ? <FilterSelect label=\"Skupina produktů\"\n name='solution'\n form={form}\n options={solutionList\n ? [{value: '', label: 'Všechny'}, ...solutionList.map(item => ({\n value: item.tagId,\n label: item.tagDescription\n }))]\n : []}/> : null}\n {visibleFilters.businessType ? <FilterSelect label=\"Obchodní typ\"\n name='businessType'\n form={form}\n options={businessTypes\n ? [{value: '', label: 'Všechny'}, ...businessTypes.map(item => ({\n value: item.tagId,\n label: item.tagDescription\n }))]\n : []}/> : null}\n {visibleFilters.tier ? <FilterSelect label=\"Velikost / tier\"\n name='tier'\n form={form}\n options={tiers\n ? [{value: '', label: 'Všechny'}, ...tiers.map(item => ({\n value: item.tagId,\n label: item.tagDescription\n }))]\n : []}/> : null}\n {visibleFilters.channel ? <FilterSelect label=\"Kanál\"\n name='channel'\n form={form}\n options={channels\n ? [{value: '', label: 'Všechny'}, ...channels.map(item => ({\n value: item.tagId,\n label: item.tagDescription\n }))]\n : []}/> : null}\n </>;\n};\n\nexport const VISIBLE_FILTERS = {\n status: true,\n type: true,\n staffId: true,\n resellerStaffId: true,\n phase: true,\n operation: true,\n solution: true,\n businessType: true,\n tier: true,\n channel: true\n};\n\nconst TAG_GROUP_MAP = {\n 'code:PRILEZITOST_FAZE':'phase',\n 'code:PRILEZITOST_OPERACE':'operation',\n 'code:PRILEZITOST_SKUPINY':'solution',\n 'code:PRILEZITOST_TYP':'businessType',\n 'code:TIERY':'tier',\n 'code:PRILEZITOST_KANAL':'channel'\n};\n\nfunction toTagTagGroupMap(list, map) {\n return list ? list.reduce((current, item) => ({...current, [item.tagId]: TAG_GROUP_MAP[item.tagGroup] || item.tagGroup}), map) : map;\n}\n\nfunction filterNull(object) {\n return Object.entries(object).reduce((o, [key, value]) => {\n if (value) {\n return {...o, [key]: value};\n }\n return o;\n }, {});\n}\n\nfunction filterManaged(object, allowed) {\n return Object.entries(object).reduce((o, [key, value]) => {\n if (allowed.hasOwnProperty(key)) {\n return {...o, [key]: value};\n }\n return o;\n }, {});\n}\n\nconst EMPTY_VALUES = {...INITIAL_SEARCH_PARAMS, tags: {phase: null, operation: null, solution: null, businessType: null, tier: null, channel: null}};\n\nconst OpportunitiesFilter = ({onSubmitSearch, statuses, types, visibleFilters = {}, singleStaffOnly, values, ...props}) => {\n\n const identity = useIdentity();\n const {id:currentStaff} = identity || {};\n const [currentValues, setCurrentValues] = useState(EMPTY_VALUES);\n const {phaseList, operationList, solutionList, businessTypes, tiers, channels} = props;\n const tagPropsMap = useMemo(() => {\n let map = {};\n map = toTagTagGroupMap(phaseList, map);\n map = toTagTagGroupMap(operationList, map);\n map = toTagTagGroupMap(solutionList, map);\n map = toTagTagGroupMap(businessTypes, map);\n map = toTagTagGroupMap(tiers, map);\n map = toTagTagGroupMap(channels, map);\n return map;\n }, [phaseList, operationList, solutionList, businessTypes, tiers, channels]);\n\n const currentVisibleFilters = useMemo(() => ({...VISIBLE_FILTERS, ...visibleFilters}), [visibleFilters]);\n\n useEffect(() => {\n if (values) {\n let newValues = {...EMPTY_VALUES, ...filterManaged(values, EMPTY_VALUES)};\n if (newValues.tags && isString(newValues.tags)) {\n newValues.tags = newValues.tags.split(',');\n }\n if (Array.isArray(newValues.tags)) {\n const tags = newValues.tags.reduce((o, tag) => {\n if (tagPropsMap[tag]) {\n return ({...o, [tagPropsMap[tag]]: tag})\n } else {\n return o;\n }\n }, {...EMPTY_VALUES.tags});\n\n newValues = Object.entries({...newValues, tags}).reduce((o, [key, value]) => {\n if (o.hasOwnProperty(key)) {\n return {...o, [key]: value};\n }\n return o;\n }, EMPTY_VALUES);\n } else {\n newValues.tags = {...EMPTY_VALUES.tags};\n }\n\n if (!deepShallowEqueal(newValues, currentValues)) {\n setCurrentValues(newValues);\n }\n }\n }, [values, tagPropsMap, setCurrentValues, currentValues])\n\n const handleChange = useCallback((changedValues, valid) => {\n if (onSubmitSearch && !deepShallowEqueal(changedValues, currentValues)) {\n const newCurrentValues = (\n {\n ...EMPTY_VALUES,\n ...changedValues,\n tags: (changedValues.tags && Object.values(changedValues.tags).length > 0 ? Object.values(changedValues.tags).filter(item => item) : []).join(',') || null\n }\n );\n setCurrentValues(changedValues);\n onSubmitSearch(newCurrentValues, valid);\n }\n }, [onSubmitSearch, currentValues, setCurrentValues]);\n\n const {entity: staffList} = useEntity({name: 'staff', params: {action: 'staff-list'}});\n\n if (!staffList) {\n return null;\n }\n\n return (\n <FilterBar onChange={handleChange}\n values={currentValues}\n button={false}\n render={(form) => {\n return <>\n <div className='col-sm-4 m-b-xs form form-inline'>\n {currentVisibleFilters.status ? <StatusFilter form={form} statuses={statuses} /> : null}\n {currentVisibleFilters.type ? <TypesFilter form={form} types={types} /> : null}\n {currentVisibleFilters.staffId ? <StaffInput\n renderLabelElement={renderLabel}\n groupContainer={CustomGroupContainer}\n elementConfig={{className: 'input-sm form-control input-s-sm inline'}}\n singleStaffOnly={singleStaffOnly}\n label=\"Zodpovědná osoba\"\n name='staffId'\n form={form}\n staffList={staffList}\n currentStaff={currentStaff}\n options={staffList\n ? [{value: '', label: 'Všichni'}, ...staffList.map(item => ({\n value: item.id,\n label: item.name\n }))]\n : []}/> : null}\n {currentVisibleFilters.resellerStaffId ? <StaffInput\n renderLabelElement={renderLabel}\n groupContainer={CustomGroupContainer}\n elementConfig={{className: 'input-sm form-control input-s-sm inline'}}\n label=\"Obchodník partnera\"\n name='resellerStaffId'\n form={form}\n staffList={staffList}\n currentStaff={currentStaff}\n options={staffList\n ? [{value: '', label: 'Všichni'}, ...staffList.map(item => ({\n value: item.id,\n label: item.name\n }))]\n : []}/> : null}\n </div>\n <div className='col-sm-8 m-b-xs form form-inline'>\n <div className='pull-right'>\n <TagsContainer visibleFilters={currentVisibleFilters} form={form} {...props} />\n </div>\n </div>\n </>\n }}\n />\n );\n};\n\nexport default OpportunitiesFilter;\n\nconst StatusFilter = ({statuses, form}) => <FilterSelect label=\"Status\"\n name='status'\n form={form}\n options={useMemo(() => statuses\n ? [{value: '', label: 'Všechny stavy'}, ...statuses.map(item => ({\n value: item.id,\n label: item.name\n }))]\n : [], [statuses])}/>;\n\nconst TypesFilter = ({types, form}) => <FilterSelect label=\"Typ\"\n name='type'\n form={form}\n options={useMemo(() => types\n ? [{value: '', label: 'Všechny'}, ...types.map(item => ({\n value: item.filter,\n label: item.name\n }))]\n : [], [types])}/>;","import {useOpportunityDials} from \"./index\";\nimport {useEffect, useMemo} from \"react\";\nimport {useDataSourceWithQueryParams} from \"@fik/data-source\";\n\nconst DEFAULT_PARAMS = {status: null, tags: null, type: null, resellerStaffId: null, tiers: null, staffId: null, source: null, includes: 'counts'};\nexport const INITIAL_SEARCH_PARAMS = {tags: null, status: null, type: null, staffId: null, resellerStaffId: null, tiers: null, source: null};\n\nconst useOpportunities = ({source = null, status = null, template = null, limit = 20, staffId = null, partnerId = null, ownerId = null, epcId = null}) => {\n\n const dials = useOpportunityDials();\n\n const {\n load,\n pagination,\n items,\n setSearchParams,\n handlePageChange,\n handleSearch,\n queryParams,\n searchParams,\n includes: {counts},\n loadingState\n } = useDataSourceWithQueryParams({\n name: 'opportunity',\n limit,\n defaultParams: useMemo(() => {\n return ({...DEFAULT_PARAMS})\n }, []),\n initialSearchParams: useMemo(() => ({...DEFAULT_PARAMS,\n staffId: staffId || null,\n source: source || null,\n status: status || null,\n template: template || null,\n partnerId: partnerId || null,\n ownerId: ownerId || null,\n epcId: epcId || null\n }), [staffId, source, status, template])\n });\n\n const {statusesDict, typesDict, phaseList} = dials;\n\n return {\n load,\n dials,\n pagination,\n items,\n statusesDict,\n typesDict,\n phaseList,\n counts,\n handlePageChange,\n handleSearch,\n queryParams,\n searchParams\n }\n};\n\nexport default useOpportunities;","import React, {useCallback, useEffect} from 'react';\nimport {Document} from \"@fik/document\";\nimport {Box, Date} from \"@fik/ui\";\nimport {useDocumentOperation} from \"@fik/document-edit\";\nimport handleClick from \"@fik/utils/handleClick\";\nimport {DownloadLink} from \"@fik/ui\";\nimport DocumentSaved from \"@fik/document-edit/components/DocumentSaved\";\nimport usePureDataSource from \"@fik/data-source/usePureDataSource\";\n\nconst OfferDocument = (props) => {\n const {entity, modal, isOrdered} = props;\n const {perform: createVariants, isSuccess: isVariantsCreated} = useDocumentOperation('createAllOfferVariants');\n const {reset} = usePureDataSource({name: 'offer'});\n\n useEffect(() => {\n if (isVariantsCreated) {\n reset();\n }\n }, [reset, isVariantsCreated]);\n\n const handleOrder = useCallback(() => {\n modal.show();\n }, [modal]);\n\n if (isOrdered) {\n return <div className='row'>\n <div className=\"col-sm-12\">\n <Box>\n <h1>Úspěšně odesláno</h1>\n <DocumentSaved documentType='order'/>\n </Box>\n </div>\n </div>;\n }\n\n if (isVariantsCreated) {\n return <div className='row'>\n <div className=\"col-sm-12\">\n <Box>\n <h1>Varianty vytvořeny</h1>\n <DocumentSaved documentType='offers'/>\n </Box>\n </div>\n </div>;\n }\n\n if (!entity) {\n return null;\n }\n\n const {actions = {}, isPdf, expirationDate} = entity;\n\n return <>\n <Document\n {...props}\n renderInfo={() => <>\n <div><strong>Platnost:</strong> <Date date={expirationDate}/></div>\n </>}\n />\n <div className='btn-group-spaces'>\n {actions.order ? <>\n <button className=\"btn btn-primary btn-lg\" onClick={handleClick(handleOrder)}>Objednat hned</button>\n </> : null}\n {actions.createVariants ? <>\n <button className=\"btn btn-primary btn-lg\" onClick={handleClick(() => createVariants(entity.id))}>Vygenerovat varianty</button>\n </> : null}\n {isPdf ? <>\n <DownloadLink resource='offer' params={{id: entity.id, type: 'partner'}} className=\"btn btn-primary btn-lg\"><i className=\"fa fa-file-pdf-o\"/> PDF pro zákazníka</DownloadLink>\n <DownloadLink resource='offer' params={{id: entity.id, type: 'partnerInternal'}} className=\"btn btn-primary btn-lg\"><i className=\"fa fa-file-pdf-o\"/> PDF s nákupními</DownloadLink>\n </> : null}\n </div>\n </>;\n};\n\nexport default OfferDocument;","import React from 'react';\nimport {FilterBar} from \"@fik/ui\";\n\nconst OffersFilter = (props) => {\n return (\n <FilterBar onSubmitSearch={props.onSubmitSearch}\n controls={{\n fulltext: {\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'Zadejte název, IČ, e-mail, ...',\n },\n value: '',\n valid: false,\n touched: false,\n validation: {\n minLength: 3,\n }\n },\n state: {\n elementType: 'select',\n options: props.states\n ? [{value: '', label: 'Všechny stavy'}, ...props.states.map(item => ({value: item.id, label: item.label}))]\n : [],\n value: '',\n valid: true,\n touched: false,\n },\n }}\n />\n );\n};\n\nexport default OffersFilter;","import React from \"react\";\nimport {EvidenceItems} from '@fik/evidence-item';\n\nconst OffersTableRowDetail = ({offer: {evidenceItems}}) => {\n return <>\n <div className=\"table-responsive m-l-lg m-r-md\">\n {evidenceItems ? <EvidenceItems evidenceItems={evidenceItems}/> : null}\n </div>\n </>\n};\n\nexport default OffersTableRowDetail;","import React from 'react';\nimport {Table, useRowDetail} from \"@fik/table\";\nimport {\n DocumentBasePrice, DocumentCreatedDate,\n DocumentEPC,\n DocumentOwner,\n DocumentPartner,\n DocumentResellerContact,\n BusinessStatus, DocumentType,\n} from '@fik/document';\n\nimport OfferLink from \"./OfferLink\";\nimport OffersTableRowDetail from \"./OffersTableRowDetail\";\nimport {OfferExpirationDate, OfferTodayDate, OfferViewMenu} from \"./index\";\n\nconst OffersTable = ({statesDict, typesDict, rows, epcVisible = false, partnerVisible = true}) => {\n const {toggleRow, isVisibleRow} = useRowDetail();\n\n return <Table striped responsive\n renderCellProps={{statesDict, typesDict}}\n rows={rows}\n renderRowMessages={({row, primaryValue})=>(isVisibleRow(primaryValue) ?\n <tr>\n <td colSpan='11div c' className=\"no-padding no-borders\">\n <OffersTableRowDetail offer={row} />\n </td>\n </tr> : null)}\n primary='id'>\n <OfferLink header='ID' />\n <DocumentOwner header='Klient' />\n {partnerVisible && <DocumentPartner header='Partner' />}\n {epcVisible && <DocumentEPC header='EPC' />}\n <DocumentResellerContact header='Obchodník'/>\n <DocumentType header='Typ' />\n {/*<DocumentStatus header='Stav' />*/}\n <BusinessStatus header='Stav' />\n <DocumentBasePrice header='Cena' />\n <DocumentCreatedDate header='Vytvořeno' />\n <OfferExpirationDate header='Platnost' />\n <OfferTodayDate header='K budoucímu datu' />\n <OfferViewMenu toggleRow={toggleRow} isVisibleRow={isVisibleRow} />\n </Table>;\n};\n\nexport default OffersTable;","import React from 'react';\nimport {Paginator} from \"@fik/ui\";\nimport OffersTable from \"./OffersTable\";\n\nconst OffersList = ({statesDict = {}, typesDict = {}, items = [], pagination = {}, onPageChange}) => (<React.Fragment>\n <OffersTable striped responsive\n statesDict={statesDict}\n typesDict={typesDict}\n rows={items}\n />\n\n <Paginator {...pagination}\n onPageChange={onPageChange}/>\n</React.Fragment>);\n\nexport default OffersList;","import {Date} from \"@fik/ui\";\nimport React from \"react\";\nimport {ToggleRowDetailButton} from \"@fik/table\";\nimport OfferLink from \"./OfferLink\";\nimport {OpportunityId} from \"@fik/opportunity\";\nimport {DocumentStatus} from \"@fik/document\";\nimport OfferSettingsDropdown from \"./OfferSettingsDropdown\";\nimport OfferPreviewPdf from \"./OfferPreviewPdf\";\nimport OfferSend from \"./OfferSend\";\nimport OfferCancelButton from \"./OfferCancelButton\";\nimport OfferNotesCount from \"./OfferNotesCount\";\nimport OfferEventsCount from \"./OfferEventsCount\";\n\nexport {default as OfferDocument} from \"./OfferDocument\";\nexport {default as OfferLink} from \"./OfferLink\";\nexport {default as OfferNewVariant} from \"./OfferNewVariant\";\nexport {default as OffersFilter} from \"./OffersFilter\";\nexport {default as OffersList} from \"./OffersList\";\nexport {default as OffersTable} from \"./OffersTable\";\nexport {default as OffersTableRowDetail} from \"./OffersTableRowDetail\";\nexport {default as OfferTogglePrimary} from \"./OfferTogglePrimary\";\n\nexport const OfferExpirationDate = ({expirationDate}) => <Date date={expirationDate}/>;\nexport const OfferTodayDate = ({todayDate}) => <Date date={todayDate}/>;\nexport const OfferViewMenu = ({id, primaryValue, isVisibleRow, toggleRow}) => <div className='btn-group btn-group-sm pull-right'>\n <ToggleRowDetailButton className=\"btn btn-default\"\n isVisibleRow={isVisibleRow}\n primaryValue={primaryValue}\n toggleRow={toggleRow}/>\n <OfferLink className=\"btn btn-default\" id={id}>Zobrazit</OfferLink>\n</div>;\n\nexport const OfferActionsMenu = ({id, row, counts, actions, isResellerDocument, primaryValue, isVisibleRow, toggleRow}) =>\n <>\n\n <div className='btn-group btn-group-xs text-left'>\n <ToggleRowDetailButton className=\"btn btn-default\"\n isVisibleRow={isVisibleRow}\n primaryValue={primaryValue}\n toggleRow={toggleRow}/>\n </div>\n <OfferSettingsDropdown id={id}/>\n <OfferPreviewPdf id={id} isResellerDocument={isResellerDocument}/>\n <OfferSend id={id} isResellerDocument={isResellerDocument}/>\n <div>\n {counts ? <>\n <OfferNotesCount id={id} counts={counts} showEmpty={false}/>\n {/*<OfferEventsCount offer={row} counts={counts}/>*/}\n </> : null}\n\n {!actions.edit ? <OfferLink title=\"Detail\" className=\"btn btn-default\" id={id}><i className=\"fa fa-eye\"/></OfferLink> : null}\n {actions.edit ? <OfferLink title=\"Upravit\" className=\"btn btn-primary\" id={id}><i className=\"fa fa-edit\"/></OfferLink> : null}\n {actions.cancel ? <OfferCancelButton className=\"btn btn-danger\" id={id} title=\"Storno\"><i\n className=\"fa fa-trash-o\"/></OfferCancelButton> : null}\n </div>\n </>;\n\nexport const OfferLinkWithOpportunity = ({id, code, opportunityId}) => <>\n <div><OfferLink id={id} code={code}/></div>\n {opportunityId ? <div><OpportunityId id={opportunityId} code={opportunityId.replace('code:', '')}/></div> : null}\n</>;\n\nexport const OfferStatus = ({businessStatusLabelStyle, businessStatus}) => <div className={'label label-' + businessStatusLabelStyle}>{businessStatus}</div>\n\n","import useIdentity from \"@fik/auth/useIdentity\";\nimport {useMemo} from \"react\";\n\nconst useIsEpc = () => {\n const identity = useIdentity();\n return useMemo(() => identity && identity.roles.indexOf('CONTACT_EPC') > -1, [identity]);\n};\n\nexport default useIsEpc;","import React, {useMemo} from 'react';\nimport {Paginator} from \"@fik/ui\";\nimport {Box} from \"@fik/ui\";\nimport {OffersTable, OffersFilter} from \"@fik/offer\";\nimport {useDials} from \"@fik/dials\";\nimport {useDataSource, useDataSourceWithQueryParams} from \"@fik/data-source\";\nimport arrayToDictionary from \"@fik/utils/arrayToDictionary\";\nimport useIsEpc from \"../../useIsEpc\";\n\nconst DEFAULT_PARAMS = {\n fulltext: null,\n state: null,\n type: 'all'\n};\n\nconst Offers = () => {\n\n const {types, states} = useDials({name: 'offer'});\n\n const {pagination, items, setSearchParams, handlePageChange, queryParams, refresh, handleSearch} = useDataSourceWithQueryParams(\n {\n name: 'offer',\n defaultParams: DEFAULT_PARAMS\n }\n );\n\n const submitSearchHandler = (values, valid) => {\n if (valid) {\n values.type = 'all';\n setSearchParams(values);\n }\n };\n\n return (\n <Box>\n <OffersFilter onSubmitSearch={handleSearch}\n states={states}\n />\n\n <OffersTable striped responsive\n partnerVisible={useIsEpc()}\n statesDict={arrayToDictionary(states, 'id', 'label')}\n typesDict={arrayToDictionary(types, 'id', 'label')}\n rows={items}\n />\n\n <Paginator {...pagination}\n onPageChange={handlePageChange}/>\n\n </Box>\n );\n};\n\nexport default Offers;","import React, {useCallback, useEffect, useMemo, useState} from \"react\";\nimport handleClick from \"@fik/utils/handleClick\";\nimport {Box} from \"@fik/ui\";\nimport {Form, FormField} from \"@mouseover/react-form\";\nimport {useDocumentContext} from \"@fik/document-edit\";\nexport const validationRules = {\n contactFirstname: {\n required: true\n },\n contactSurname: {\n required: true\n },\n contactPosition: {\n required: true\n },\n contactEmail: {\n required: true,\n email: true\n },\n contactPhone: {\n required: false,\n pattern: {\n message: 'Špatný formát telefonu (+420...)',\n params: '^(\\\\+420)[0-9]{9}$'\n }\n }\n};\nconst DealResponsiblePerson = ({isSubmitted}) => {\n const {\n document,\n initialDocument,\n changeValues,\n } = useDocumentContext();\n\n const [isSameAsContact, setIsSameAsContact] = useState(initialDocument.responsiblePersonIsSameAsContact);\n\n useEffect(() => {\n if (initialDocument && initialDocument.responsiblePersonIsSameAsContact !== undefined) {\n setIsSameAsContact(initialDocument.responsiblePersonIsSameAsContact);\n }\n }, [initialDocument]);\n\n const handleCheck = useCallback(() => {\n setIsSameAsContact((current) => !current);\n }, [setIsSameAsContact]);\n\n\n\n const values = useMemo(() => document && document.responsiblePerson, [document]);\n\n const handleValuesChanges = useCallback((responsiblePerson, valid) => {\n if (valid) {\n changeValues({responsiblePerson});\n }\n }, [changeValues, values]);\n\n useEffect(() => {\n if (isSameAsContact) {\n changeValues({responsiblePerson: null});\n } else {\n changeValues({responsiblePerson: {contactFirstname: null, contactSurname: null, contactEmail: null, contactPhone: null}});\n }\n }, [isSameAsContact, changeValues])\n\n\n return <Box title=\"Osoba s rozhodujicí pravomocí\"\n tools={() => <>\n <button onClick={handleClick(handleCheck)} className='btn btn-md btn-white m-r-xs no-borders'>\n <i className={'fa ' + (isSameAsContact ? 'fa-check-square-o' : 'fa-square-o')}/> Shodná jako kontaktní\n </button>\n </>}>\n {!isSameAsContact ? <Form\n values={values}\n validationRules={validationRules}\n onChange={handleValuesChanges}\n isSubmitted={isSubmitted}\n render={(form => {\n return <>\n <div className=\"row\">\n <div className=\"col-sm-4\">\n <FormField form={form}\n name='contactFirstname'\n label='Jméno'\n elementType='input'\n />\n </div>\n <div className=\"col-sm-4\">\n <FormField form={form}\n name='contactSurname'\n label='Příjmení'\n elementType='input'\n />\n </div>\n <div className=\"col-sm-4\">\n <FormField form={form}\n name='contactPosition'\n label='Pozice'\n elementType='input'\n />\n </div>\n </div>\n <div className=\"row\">\n <div className=\"col-sm-4\">\n <FormField form={form}\n name='contactEmail'\n label='Email'\n elementType='input'\n />\n </div>\n <div className=\"col-sm-4\">\n <FormField form={form}\n name='contactPhone'\n label='Telefon'\n elementType='input'\n />\n </div>\n </div>\n </>\n })}/> : null}\n </Box>;\n}\n\nexport default DealResponsiblePerson;","import React, {useCallback, useMemo} from \"react\";\nimport PropTypes from 'prop-types';\nimport {useDocumentContext} from \"@fik/document-edit\";\nimport {Form} from \"@mouseover/react-form\";\nimport {DatePicker, SelectInput, TextArea} from \"@fik/form\";\nimport {shallowEqual} from \"@mouseover/js-utils\";\n\n\nconst DealFormDetailNew = ({validation, isSubmitted}) => {\n const {\n document,\n initialDocument: {note, notePosition, noteImplementation},\n changeValues,\n } = useDocumentContext();\n\n const handleValuesChanges = useCallback((values, valid) => {\n const {note} = document;\n if (!shallowEqual({note, notePosition, noteImplementation}, values)) {\n changeValues(values);\n }\n }, [document, changeValues]);\n\n const validationRules = useMemo(() => ({\n note: validation.note,\n notePosition: validation.notePosition,\n noteImplementation: validation.noteImplementation\n }), [validation]);\n\n return document\n ? <Form\n values={{note, notePosition, noteImplementation}}\n validationRules={validationRules}\n onChange={handleValuesChanges}\n isSubmitted={isSubmitted}\n render={(form) => <>\n <div className=\"row\">\n <div className=\"col-sm-12\">\n <TextArea\n label=\"Podrobnosti k projektu\" name=\"note\" form={form}\n elementConfig={{placeholder: 'Např.: Projekt bude financován z vlastních zdrojů/IROP projektů... Aktuálně se nacházíme ve fázi průzkumu trhu... Další kroky očekáváme během následujících X měsíců...'}}\n />\n </div>\n </div>\n <div className=\"row\">\n <div className=\"col-sm-12\">\n <TextArea\n label=\"Podrobnosti k Vaší pozici v projektu\" name=\"notePosition\" form={form}\n elementConfig={{placeholder: 'Např.: Akviziční zákazník u kterého nedodáváme žádné služby... Náš stávající zákazník, u kterého dodáváma licence X, firewall Y včetně kompletní správy obou řešení...'}}\n />\n </div>\n </div>\n <div className=\"row\">\n <div className=\"col-sm-12\">\n <TextArea\n label=\"Návrh implementace řešení v prostředí zákazníka\" name=\"noteImplementation\" form={form}\n elementConfig={{placeholder: 'Např.: EP konzole bude nasazena v prostředí zákazníka... EP konzole bude outsourcovaná... Nastavení produktu již provede zákazník sám...'}}\n />\n </div>\n </div>\n </>}/>\n : null;\n};\n\nexport default DealFormDetailNew;","import React, {useCallback, useMemo, useState} from \"react\";\nimport {useDocumentContext} from \"@fik/document-edit\";\nimport {Form, useFormContainer} from \"@mouseover/react-form\";\nimport {TextArea} from \"@fik/form\";\nimport {getValue, shallowEqual} from \"@mouseover/js-utils\";\nimport arrayRemoveAny from \"@fik/utils/arrayRemoveAny\";\n\nconst MultiChoice = ({name, label, choices, form}) => {\n const {values = {}, validation = {}, setValue} = form;\n const checked = getValue(values, name) || [];\n const [touched, setTouched] = useState(false);\n const messages = getValue(validation, ['children', name, 'messages']);\n const handleChange = (choice) => {\n if (!touched) {\n setTouched(true);\n }\n\n if (checked.indexOf(choice) === -1) {\n setValue([...checked, choice], name);\n } else {\n const newValue = arrayRemoveAny(checked, choice);\n setValue(newValue.length === 0 ? null : newValue, name);\n }\n }\n\n return <>\n <label>{label}</label>\n {touched && messages && messages.map((message) => <p className='alert-warning'>{message}</p>)}\n {choices.map((choice) => <div key={choice} className='form-group' key={choice}><label className=\"btn btn-sm no-padding text-normal\"> <input\n type=\"checkbox\" onChange={() => handleChange(choice)} checked={checked.indexOf(choice) !== -1}/> {choice}</label></div>)}\n </>\n}\n\nconst SingleChoice = ({name, label, choices, form}) => {\n const {values = {}, validation = {}, setValue} = form;\n const checked = getValue(values, name);\n const [touched, setTouched] = useState(false);\n const messages = getValue(validation, ['children', name, 'messages']);\n const handleChange = (choice) => {\n if (!touched) {\n setTouched(true);\n }\n\n if (checked !== choice) {\n setValue(choice, name);\n } else {\n setValue(null, name);\n }\n }\n\n return <>\n <label>{label}</label>\n {touched && messages && messages.map((message) => <p key={message} className='alert-warning'>{message}</p>)}\n {choices.map((choice) => <div key={choice} className='form-group' key={choice}><label className=\"btn btn-sm no-padding text-normal\"> <input\n type=\"radio\" onChange={() => handleChange(choice)} checked={checked === choice}/> {choice}</label></div>)}\n </>\n}\n\nconst RenewElements = ({elements, form}) => {\n const formContainer = useFormContainer('renewData', form);\n return <div className=\"row\">\n {elements && elements.map(({name, label, placeholder, type, choices}) =>\n <div key={name} className=\"col-sm-12\">\n {type === 'text' && <TextArea\n label={label} name={name} form={formContainer}\n elementConfig={{placeholder: placeholder ?? ''}}\n />}\n {type === 'multiChoice' && <MultiChoice name={name} label={label} choices={choices} form={formContainer}/>}\n {type === 'singleChoice' && <SingleChoice name={name} label={label} choices={choices} form={formContainer}/>}\n </div>)}\n </div>\n}\n\nconst DealFormDetailRenew = ({validation, isSubmitted, elements}) => {\n const {\n document,\n initialDocument: {renewData = {}},\n changeValues,\n } = useDocumentContext();\n\n const handleValuesChanges = useCallback((values, valid) => {\n const {note} = document;\n if (!shallowEqual({renewData}, values)) {\n changeValues(values);\n }\n }, [document, changeValues]);\n\n const validationRules = useMemo(() => ({\n renewData: {\n children: elements?.reduce((acc, {name}) => ({...acc, [name]: {required: true}}), {}) ?? {}\n }\n }), [validation, elements]);\n\n return document\n ? <Form\n values={{renewData}}\n validationRules={validationRules}\n onChange={handleValuesChanges}\n isSubmitted={isSubmitted}\n render={(form) => <RenewElements elements={elements} form={form}/>}/>\n : null;\n};\n\nexport default DealFormDetailRenew;","import React, {useCallback, useEffect, useMemo, useState} from \"react\";\nimport handleClick from \"@fik/utils/handleClick\";\nimport {Box} from \"@fik/ui\";\nimport {Form, FormField} from \"@mouseover/react-form\";\nimport {useDocumentContext} from \"@fik/document-edit\";\n\nconst validationRules = {\n contactFirstname: {\n required: true\n },\n contactSurname: {\n required: true\n },\n contactPosition: {\n required: true\n },\n contactEmail: {\n required: true,\n email: true\n },\n contactPhone: {\n required: false,\n pattern: {\n message: 'Špatný formát telefonu (+420...)',\n params: '^(\\\\+420)[0-9]{9}$'\n }\n }\n};\nconst DealBusinessStatus = () => {\n const {\n document,\n initialDocument,\n changeValues,\n } = useDocumentContext();\n\n\n return document ? <Box title=\"Stav\"\n tools={() => <>\n <div>{document.businessStatus}</div>\n </>} /> : null;\n}\n\nexport default DealBusinessStatus;","import React, {useCallback, useEffect, useMemo, useState} from \"react\";\nimport {Box, Errors} from \"@fik/ui\";\nimport {useDocumentContext, DocumentSaved, DocumentCustomer} from \"@fik/document-edit\";\nimport {DealFormDetail, DealFormSolutions} from \"@fik/deal\";\nimport {useDials} from \"@fik/dials\";\nimport {CUSTOMER_VIEWS} from \"@fik/customer-edit\";\nimport {validateObject} from \"@mouseover/js-validation/src\";\nimport handleClick from \"../../utils/handleClick\";\nimport DocumentPartnerContainer from \"../../documentEdit/components/DocumentPartnerContainer\";\nimport usePureDataSource from \"@fik/data-source/usePureDataSource\";\nimport {shallowEqual} from \"@mouseover/js-utils\";\nimport DealResponsiblePerson, {validationRules as responsiblePersonValidationRules} from \"./DealResponsiblePerson\";\nimport DealFormDetailNew from \"./DealFormDetailNew\";\nimport DealFormDetailRenew from \"./DealFormDetailRenew\";\nimport DealBusinessStatus from \"./DealBusinessStatus\";\n\nconst localValidationRules = {\n owner: {\n required: {message: 'Není zadán koncový zákazník'},\n },\n dateExpected: {\n required: true\n },\n phaseId: {\n required: true,\n },\n successProbability: {\n required: true,\n },\n expectedSolutions: {\n required: true,\n },\n note: {\n minLength: 50\n },\n notePosition: {\n minLength: 50\n },\n noteImplementation: {\n minLength: 50\n }\n};\n\nconst solutionsValidationRules = (solutions, currentSolutions) => currentSolutions\n ? currentSolutions.reduce((rules, item, index) => {\n rules[index] = {\n children: {\n value: {\n required: true,\n min: item.minAmount\n }\n },\n id: item.id\n }\n return rules;\n }, {}) : {};\n\n\nfunction getValidationRules(validationRules, solutions, document, formType) {\n return {\n ...validationRules,\n note: {\n minLength: 50,\n required: formType === 'new'\n },\n notePosition: {\n minLength: 50,\n required: formType === 'new'\n },\n noteImplementation: {\n minLength: 50,\n required: formType === 'new'\n },\n responsiblePerson: document && document.responsiblePerson ? { required: true, children: responsiblePersonValidationRules } : {},\n expectedSolutions: {...validationRules.expectedSolutions, children: solutionsValidationRules(solutions, document.expectedSolutions)}\n };\n}\n\nconst DealForm = ({formType = 'new'}) => {\n const {products, propabilities, phases, contacts, solutions, renew} = useDials({name: 'deal', params: {contacts: true}});\n const [isSubmitted, setIsSubmitted] = useState(false);\n\n const {\n document,\n validation: {valid, validationMessages},\n saving: {saveDocument, isSaved, messages}\n } = useDocumentContext();\n\n const [validationRules, setValidationRules] = useState({});\n\n useEffect(() => {\n const current = getValidationRules(localValidationRules, solutions, document || {}, formType);\n setValidationRules((before) => shallowEqual(before, current) ? before : current);\n }, [setValidationRules, solutions, document, formType]);\n\n const validationResult = useMemo(() => validateObject(document || {}, validationRules), [document, validationRules]);\n\n const handleSave = useCallback(() => {\n setIsSubmitted(true);\n if (validationResult && validationResult.valid) {\n saveDocument('deal', document);\n }\n }, [saveDocument, document, validationResult, setIsSubmitted]);\n\n const {reset} = usePureDataSource({name: 'deal'});\n\n useEffect(() => {\n if (isSaved) {\n reset();\n }\n }, [reset, isSaved]);\n\n if (isSaved) {\n return <Box>\n <h1>Úspěšně odesláno</h1>\n <DocumentSaved documentType=\"deal\"/>\n </Box>;\n }\n\n return <>\n {messages && <Errors messages={messages}/>}\n <DocumentPartnerContainer/>\n <DocumentCustomer\n visibleViews={[CUSTOMER_VIEWS.COMPANY, CUSTOMER_VIEWS.EXISTING]}\n isSubmitted={isSubmitted}\n />\n <DealResponsiblePerson isSubmitted={isSubmitted}/>\n <DealBusinessStatus/>\n <Box title=\"Detail registrace\">\n <DealFormDetail\n contacts={contacts}\n phases={phases}\n propabilities={propabilities}\n validation={validationRules}\n isSubmitted={isSubmitted}\n />\n {formType === 'new' && <DealFormDetailNew isSubmitted={isSubmitted} validation={validationRules}/>}\n {formType === 'renew' && renew &&\n <DealFormDetailRenew isSubmitted={isSubmitted} validation={validationRules} elements={renew}/>}\n </Box>\n <Box title=\"Poptávaná řešení\">\n <DealFormSolutions\n solutions={solutions}\n products={products}\n validationRules={validationRules}\n isSubmitted={isSubmitted}\n />\n </Box>\n <div className=\"row\">\n <div className=\"col-sm-12 text-right\">\n <button type=\"button\" onClick={handleClick(handleSave)}\n className={\"btn btn-lg \" + (!validationResult || !validationResult.valid ? \"btn-warning\" : \"btn-success\")}>Odeslat\n </button>\n </div>\n </div>\n </>\n};\n\nexport default DealForm;","import React, {useCallback, useMemo} from \"react\";\nimport PropTypes from 'prop-types';\nimport {useDocumentContext} from \"@fik/document-edit\";\nimport {Form} from \"@mouseover/react-form\";\nimport {DatePicker, SelectInput, TextArea} from \"@fik/form\";\nimport {shallowEqual} from \"@mouseover/js-utils\";\n\n\nconst DealFormDetail = ({contacts, phases, propabilities, validation, isSubmitted, children}) => {\n const {\n document,\n initialDocument: {dateExpected, partner, phaseId, successProbability},\n changeValues,\n } = useDocumentContext();\n\n const handleValuesChanges = useCallback((values, valid) => {\n const {dateExpected,partner,phaseId,successProbability,note} = document;\n if (!shallowEqual({dateExpected,partner,phaseId,successProbability,}, values)) {\n changeValues(values);\n }\n }, [document, changeValues]);\n\n const validationRules = useMemo(() => ({\n dateExpected: validation.dateExpected,\n phaseId: validation.phaseId,\n successProbability: validation.successProbability,\n }), [validation]);\n\n return document\n ? <Form\n values={{dateExpected, partner, phaseId, successProbability}}\n validationRules={validationRules}\n onChange={handleValuesChanges}\n isSubmitted={isSubmitted}\n render={(form) => <div className=\"row form\">\n <div className=\"col-sm-4\">\n <DatePicker label=\"Očekávaný termín realizace\" name=\"dateExpected\" form={form}/>\n <SelectInput label=\"Obchodník\" name={['partner', 'contact', 'contactId']} form={form}\n options={[{value: '', label: '---'}, ...(contacts ? contacts.map((item) => ({\n label: item.name,\n value: item.id\n })) : [])]}/>\n </div>\n <div className=\"col-sm-8\">\n <div className=\"row\">\n <div className=\"col-sm-7\">\n <SelectInput label=\"Fáze projektu\" name=\"phaseId\" valueType=\"number\" form={form}\n options={[{value: '', label: '---'}, ...(phases ? phases.map((item) => ({\n label: item.name,\n value: item.id\n })) : [])]}/>\n </div>\n <div className=\"col-sm-5\">\n <SelectInput label=\"Pravděpodobnost úspěchu\" name=\"successProbability\" valueType=\"number\" form={form} options={[{\n value: '',\n label: '---'\n }, ...(propabilities ? propabilities.map((item) => ({label: item.label, value: item.value})) : [])]}/>\n </div>\n </div>\n {children}\n </div>\n\n </div>}/>\n : null;\n};\n\nDealFormDetail.propTypes = {\n propabilities: PropTypes.array,\n phases: PropTypes.array,\n contacts: PropTypes.array\n};\n\nexport default DealFormDetail;","import {Checkbox, DatePicker, NumberInput, SelectInput} from \"@fik/form\";\nimport React, {useEffect, useMemo} from \"react\";\n\nconst SolutionFields = ({name, unit, id, products, minAmount, form, onChange}) => {\n const checked = useMemo(() => form.values.checked, [form.values]);\n useEffect(() => {\n if (!checked && form.values.value) {\n form.setValue(null, 'value');\n }\n }, [checked, form.values.value, form.setValue]);\n return <div className=\"row\">\n <div className=\"col-sm-3 m-b-xs\">\n <Checkbox form={form} label={form.values.name} name='checked' />\n </div>\n\n {checked\n ? <>\n <div className=\"col-sm-3 m-b-xs form-inline\">\n <div className=\"form-group\">\n <NumberInput\n elementConfig={{style: {maxWidth: '80px'}, type: 'number', min: minAmount || 0}}\n name='value'\n form={form}/>\n <label className='m-l-xs'>{unit}</label>\n </div>\n </div>\n <div className=\"col-sm-3 m-b-xs\">\n <SelectInput\n name='product'\n form={form}\n options={[{value: '', label: '---'}, ...(products ? products.map((item) => ({\n label: item.name,\n value: item.name\n })) : [])]}/>\n </div>\n <div className=\"col-sm-3 m-b-xs\">\n <DatePicker name=\"expiration\" form={form}/>\n </div>\n </>\n : null\n }\n\n </div>;\n}\n\nexport default SolutionFields;","import React from \"react\";\nimport {useCallback, useMemo} from \"react\";\nimport {getValue, pathWithChildren} from \"@mouseover/js-utils\";\nimport {updateValue} from \"@mouseover/js-utils/src\";\nimport {useFormContainer} from \"@mouseover/react-form\";\nimport SolutionFields from \"./SolutionFields\";\nimport {useValidator} from \"@mouseover/js-validation-hook\";\n\nconst SolutionContainer = ({path, form, ...props}) => {\n const container = useFormContainer(path, form);\n const isChecked = useMemo(() => form.values[path].checked, [form.values[path]])\n return <SolutionFields form={container} {...props} isChecked={isChecked}/>\n}\n\nconst SolutionsContainer = ({form, validationRules, ...props}) => {\n const collectionContainer = useFormCollection('expectedSolutions', form, validationRules);\n return <>{\n collectionContainer.values && collectionContainer.values.map(\n (item, index) => <SolutionContainer\n {...props}\n key={index}\n form={collectionContainer}\n path={index}/>)\n }</>;\n}\n\nexport default SolutionsContainer;\n\n\nconst useFormCollection = (path, form, validationRules) => {\n const {values = {}, validation = {}, defaultValues = {}, setValue, handleSubmit} = form;\n const pathMemo = useMemo(() => Array.isArray(path) ? path : [path], [path]);\n\n const addItem = useCallback((item) => {\n const collection = getValue(values, pathMemo) || [];\n setValue([...collection, item], pathMemo);\n }, [setValue, values, pathMemo]);\n\n const setValueAt = useCallback((value, index) => {\n const collection = [...(getValue(values, pathMemo) || [])];\n if (Array.isArray(index)) {\n const [currentIndex, ...currentPath] = index;\n collection.splice(currentIndex, 1, updateValue(collection[currentIndex], currentPath, value));\n } else {\n collection.splice(index, 1, value);\n }\n\n setValue(collection, pathMemo);\n }, [values, pathMemo, setValue]);\n\n const validator = useValidator(validationRules);\n const currentValidation = useMemo(() => validator.validateObject(values), [values, validator]);\n\n return {\n isSubmitted: form.isSubmitted,\n values: getValue(values, pathMemo) || [],\n setValue: setValueAt,\n addItem,\n validation: getValue(currentValidation, pathWithChildren(pathMemo)) || {children: {}, valid: true},\n defaultValues: getValue(defaultValues, pathMemo) || [],\n setValues: useCallback((values) => {\n setValue(values, pathMemo);\n }, [setValue, pathMemo]),\n handleSubmit\n }\n};\n","import React, {useCallback, useEffect, useMemo, useState} from \"react\";\nimport PropTypes from 'prop-types';\nimport {useDocumentContext} from \"@fik/document-edit\";\nimport {Form} from \"@mouseover/react-form\";\nimport {getValue, shallowEqual} from \"@mouseover/js-utils\";\nimport SolutionsContainer from \"./SolutionsContainer\";\n\n\nconst solutionsValidationRules = (solutions, validationRules) => {\n const current = validationRules && validationRules.children ? Object.fromEntries(Object.entries(validationRules.children).map(([,item]) => [item.id, item])) : {};\n return {...validationRules, children: Object.fromEntries(solutions.map((item, index) => [index, current.hasOwnProperty(item.id) ? current[item.id] : {}]))};\n};\n\nconst shallowEqualArray = (a1, a2) => {\n if (!Array.isArray(a1) || !Array.isArray(a2)) {\n return a1 !== a2;\n }\n if (a1.length !== a2.length) {\n return false;\n }\n return a1.reduce((valid, current, currentIndex) => {\n if (valid) {\n valid = shallowEqual(current, a2[currentIndex]);\n }\n return valid;\n }, true);\n}\n\nconst DealFormSolutionsWithDocument = ({solutions, products, validationRules, isSubmitted, document, changeValues}) => {\n const [initialSolutions, setInitialSolutions] = useState(null);\n const [lastSolutions, setLastSolutions] = useState(null);\n useEffect(() => {\n if (!initialSolutions) {\n const documentExpectedSolutions = getValue(document, ['expectedSolutions']) || [];\n const current = Object.fromEntries(documentExpectedSolutions.map((item) => [item.id, item]));\n const newOne = solutions.map((item) => {\n if (current.hasOwnProperty(item.id)) {\n return {\n ...current[item.id],\n checked: current.hasOwnProperty(item.id),\n name: item.name,\n minAmount: item.minAmount,\n unit: item.unit,\n };\n } else {\n return {...item, checked: false, value: null};\n }\n });\n setInitialSolutions(newOne);\n setLastSolutions(newOne);\n }\n }, [document, initialSolutions, setInitialSolutions, setLastSolutions]);\n\n const handleValuesChanges = useCallback((values, valid) => {\n const expectedSolutions = values && values.expectedSolutions ? values.expectedSolutions.filter((item) => item.checked).map(({checked, ...item}) => item) : null;\n if (!shallowEqualArray(values.expectedSolutions, lastSolutions)) {\n changeValues({expectedSolutions: expectedSolutions});\n setLastSolutions(values.expectedSolutions);\n }\n }, [changeValues, lastSolutions, setLastSolutions]);\n\n const formValidationRules = useMemo(() => ({expectedSolutions: solutionsValidationRules(solutions, validationRules.expectedSolutions)}), [solutions, validationRules]);\n\n return document\n ? <Form\n values={{expectedSolutions: initialSolutions}}\n validationRules={formValidationRules}\n onChange={handleValuesChanges}\n isSubmitted={isSubmitted}\n render={(form) => <>\n <div className=\"row\">\n <div className=\"col-sm-3 col-sm-offset-3\"><strong>Počet</strong></div>\n <div className=\"col-sm-3\"><strong>Současné řešení</strong></div>\n <div className=\"col-sm-3\"><strong>Expirace současného řešení</strong></div>\n </div>\n <SolutionsContainer validationRules={formValidationRules} form={form} solutions={solutions} products={products} currentSolutions={initialSolutions} />\n </>}/>\n : null;\n}\n\nconst DealFormSolutions = (props) => {\n const {\n document,\n initialDocument: {expectedSolutions},\n changeValues,\n } = useDocumentContext();\n\n return document && props.solutions ? <DealFormSolutionsWithDocument {...props} document={document} changeValues={changeValues} /> : null;\n};\n\nDealFormSolutions.propTypes = {\n solutions: PropTypes.array,\n products: PropTypes.array\n};\n\n\nexport default DealFormSolutions;\n\n\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {NavigationItem} from \"@fik/navigation\";\n\nconst DealLink = ({item, children, className}) => {\n return (<NavigationItem className={className} to=\"deal:detail\" params={item}>{children}</NavigationItem>);\n};\n\nDealLink.propTypes = {\n item: PropTypes.shape({\n id: PropTypes.number\n }),\n children: PropTypes.oneOfType([PropTypes.array,PropTypes.object,PropTypes.string]),\n className: PropTypes.string\n};\n\nexport default DealLink;","import React from 'react';\nimport {Table} from \"@fik/table\";\nimport {Channel} from \"@fik/components\";\nimport {Date} from \"@fik/ui\";\nimport DealLink from \"./DealLink\";\n\nconst DealsTable = (props) => {\n const columns = [\n {\n key: 'id',\n title: 'ID',\n render: ({row:item}) => (\n <span>{item.id}</span>\n )\n },\n {\n key: 'owner',\n title: 'Klient',\n render: ({row:item}) => (item.owner ? <Channel {...item.owner} /> : null)\n },\n {\n key: 'partner',\n title: 'Partner',\n render: ({row:item}) => (item.partner ? <Channel {...item.partner} /> : null)\n },\n {\n key: 'epc',\n title: 'EPC',\n render: ({row:item}) => (item.epc ? <Channel {...item.epc} /> : null)\n },\n {\n key: 'dealPhaseName',\n title: 'Fáze',\n render: ({row:item}) => (\n <span>{item.dealPhase && item.dealPhase.name}</span>\n )\n },\n {\n key: 'dealStatusName',\n title: 'Stav',\n render: ({row:item}) => (\n <span>{item.businessStatus}</span>\n )\n },\n {\n key: 'successProbability',\n title: 'Pravděpodobnost',\n render: ({row:item}) => ( <span>{item.successProbability} %</span>)\n },\n {\n key: 'dates',\n title: 'Datum',\n render: ({row:item}) => (\n <React.Fragment>\n <Date date={item.dateCreated}/><br />\n <Date date={item.dateExpected}/><br />\n <Date date={item.dateExpiration}/>\n </React.Fragment>\n )\n },\n {\n key: 'menu',\n title: '',\n render: ({row:item}) => {\n return (\n <React.Fragment>\n <DealLink item={item}\n className=\"btn btn-default btn-sm m-r-sm\">\n Zobrazit\n </DealLink>\n </React.Fragment>\n )\n }\n }\n ];\n\n return <Table striped responsive\n columns={columns}\n rows={props.rows}\n primary='id'/>;\n};\n\nexport default DealsTable;","import React, {useMemo} from 'react';\nimport {DealsTable} from \"@fik/deal\";\nimport {Paginator} from \"@fik/ui\";\nimport {Box} from \"@fik/ui\";\nimport {useDataSource, useDataSourceWithQueryParams} from \"@fik/data-source\";\n\nconst DealsPanel = ({renew = false}) => {\n const {pagination, items, handlePageChange} = useDataSourceWithQueryParams(\n {name: 'deal', initialSearchParams: {renew}}\n );\n\n return (\n <Box>\n <DealsTable striped responsive rows={items} primary='id'/>\n <Paginator {...pagination}\n onPageChange={handlePageChange}/>\n </Box>\n )\n};\n\nexport default DealsPanel;","import React, {useState} from 'react';\nimport DealsPanel from \"../../components/DealsPanel\";\nimport handleClick from \"@fik/utils/handleClick\";\n\nconst VIEWS = {\n NEW: 'NEW',\n RENEW: 'RENEW'\n};\n\nconst Deals = () => {\n const [view, setView] = useState(VIEWS.NEW);\n return (\n <>\n <div className=\"tabs-container\">\n <ul className=\"nav nav-tabs\">\n <li className={view === VIEWS.NEW ? 'active' : ''}>\n <a data-toggle=\"tab\" className='nav-link'\n onClick={handleClick(() => setView(VIEWS.NEW))}>Nové licence</a>\n </li>\n <li className={view === VIEWS.RENEW ? 'active' : ''}>\n <a data-toggle=\"tab\" className='nav-link'\n onClick={handleClick(() => setView(VIEWS.RENEW))}>Existující licence</a></li>\n </ul>\n <div className=\"tab-content no-padding no-margins\">\n {view === VIEWS.NEW ? <div id=\"tab-new\" className=\"tab-pane active\">\n <DealsPanel renew={false}/>\n </div> : null}\n {view === VIEWS.RENEW ? <div id=\"tab-renew\" className=\"tab-pane active\">\n <DealsPanel renew={true}/>\n </div> : null}\n </div>\n </div>\n <div className=\"clearfix\"/>\n </>\n )\n};\n\nexport default Deals;","import React from 'react';\nimport {Box} from \"@fik/ui\";\nimport {OffersList, OffersFilter} from \"@fik/offer\";\nimport {useDials} from \"@fik/dials\";\nimport {useDataSource, useDataSourceWithQueryParams} from \"@fik/data-source\";\nimport arrayToDictionary from \"@fik/utils/arrayToDictionary\";\n\nconst DEFAULT_PARAMS = {\n fulltext: null,\n state: null\n};\n\nconst ProjectPrices = () => {\n\n const {types, states} = useDials({name: 'projectPrice'});\n const {pagination, items, setSearchParams, handlePageChange, queryParams, refresh, handleSearch} = useDataSourceWithQueryParams(\n {\n name: 'ProjectPrice',\n initialSearchParams: {type: 'all'},\n defaultParams: DEFAULT_PARAMS\n }\n );\n\n return (\n <Box>\n <OffersFilter onSubmitSearch={handleSearch}\n states={states}\n />\n\n <OffersList\n statesDict={arrayToDictionary(states, 'id', 'label')}\n typesDict={arrayToDictionary(types, 'id', 'label')}\n items={items}\n\n pagination={pagination}\n onPageChange={handlePageChange}/>\n\n </Box>\n );\n};\n\n\nexport default ProjectPrices;","import React from 'react';\nimport {Table} from \"@fik/table\";\nimport {Price} from \"@fik/ui\";\n\nconst renderRow = (props) => {\n const {row} = props;\n if (row && row.itemType === 'typPolozky.text') {\n return <tr><td colSpan={6}><strong>{row.itemName}</strong></td></tr>\n }\n return null;\n};\n\nconst EvidenceItems = (props) => {\n\n const visiblePrices = props.visiblePrices || true;\n\n const columns = [\n {\n key: 'item',\n title: 'Označení',\n render: ({row:item}) => (\n <React.Fragment>\n {item.itemCode} {item.itemName}\n </React.Fragment>\n )\n },\n {\n key: 'itemAmount',\n title: 'Množství',\n render: ({row:item}) => (\n <React.Fragment>{item.itemAmount || '--'}</React.Fragment>\n )\n },\n {\n key: 'itemUnitPrice',\n title: 'Cena za MJ',\n className: 'text-right',\n render: ({row:item}) => (<Price price={item.itemUnitPrice}/>),\n visible: visiblePrices\n },\n {\n key: 'itemBasePrice',\n title: 'Základ',\n className: 'text-right',\n render: ({row:item}) => (<Price price={item.itemBasePrice}/>),\n visible: visiblePrices\n },\n {\n key: 'itemVat',\n title: 'DPH',\n className: 'text-right',\n render: ({row:item}) => (<Price price={item.itemVat}/>),\n visible: visiblePrices\n },\n {\n key: 'itemPrice',\n title: 'Celkem',\n className: 'text-right',\n render: ({row:item}) => (<Price price={item.itemVat + item.itemBasePrice}/>),\n visible: visiblePrices\n }\n ];\n\n return <Table responsive\n containerClassName=\"m-t\"\n columns={columns}\n rows={props.evidenceItems}\n renderRow={renderRow}\n primary='itemId'/>;\n};\n\n\nexport default EvidenceItems;","import React from 'react';\nimport EvidenceItems from \"./EvidenceItems\";\nimport {Date} from \"@fik/ui\";\nimport {Status} from \"@fik/document\";\nimport {Price} from \"@fik/ui\";\nimport {Box} from \"@fik/ui\";\n\nconst InvoiceDetail = ({entity, dials}) => {\n\n if (!entity) {\n return null;\n }\n\n return (<>\n <h3 className=\"border-bottom\">{entity.code}</h3>\n <div className=\"row\">\n <div className=\"col-sm-3\">\n <div><strong>Typ:</strong> {entity.documentType}</div>\n <div><strong>VS:</strong> {entity.variableSym}</div>\n <div><strong>Typ platby:</strong> {entity.paymentMethod}</div>\n <div><strong>Stav:</strong> <Status value={entity.paymentStatus} enum={dials.paymentStatusDict}/></div>\n </div>\n <div className=\"col-sm-4\">\n <div>{entity.companyName}</div>\n <div>{entity.companyId}</div>\n <div>{entity.contactEmail}</div>\n </div>\n <div className=\"col-sm-5 text-right\">\n <div><strong>Vystaveno:</strong> <Date date={entity.dateCreated}/></div>\n <div><strong>Datum splatnosti:</strong> <Date date={entity.dueDate}/></div>\n <div><strong>Datum uskutečnění zdanitelného plnění:</strong> <Date date={entity.dateTaxableSupply}/></div>\n </div>\n </div>\n <div className=\"row\">\n <div className=\"col-lg-12\">\n <EvidenceItems evidenceItems={entity.evidenceItems}/>\n <Box>\n <table className=\"table invoice-total\">\n <tbody>\n <tr>\n <td><strong>Cena bez DPH :</strong></td>\n <td><Price price={entity.basePrice}/></td>\n </tr>\n <tr>\n <td><strong>Cena s DPH :</strong></td>\n <td><Price price={entity.vatPrice}/></td>\n </tr>\n <tr>\n <td><strong>Zbývá uhradit:</strong></td>\n <td><Price price={entity.leftToPay}/></td>\n </tr>\n </tbody>\n </table>\n </Box>\n </div>\n </div>\n </>)\n};\n\nexport default InvoiceDetail;","import React from 'react';\nimport {Table} from '@fik/table';\nimport {Date, Price} from \"@fik/ui\";\nimport {DownloadLink} from \"@fik/ui\";\n\nconst InvoicesTable = (props) => {\n const columns = [\n {\n key: 'code',\n title: 'ID',\n render: ({row:item}) => item.code\n },\n {\n key: 'variableSym',\n title: 'VS',\n render: ({row:item}) => (\n <span>{item.variableSym}</span>\n )\n },\n {\n key: 'companyName',\n title: 'Klient',\n render: ({row:item}) => (\n <React.Fragment>\n <strong>\n {item.companyName}\n </strong>\n {item.contactEmail ? (<div className=\"description\">\n <i className=\"fa fa-envelope\"/> {item.contactEmail}\n </div>) : null}\n </React.Fragment>\n )\n },\n\n {\n key: 'dueDate',\n title: 'Splatnost',\n render: ({row:item}) => (\n <Date date={item.dueDate}/>\n )\n },\n {\n key: 'dateCreated',\n title: 'Vystaveno',\n render: ({row:item}) => (\n <Date date={item.dateCreated}/>\n )\n },\n {\n key: 'basePrice',\n title: 'Celkem bez DPH',\n render: ({row:item}) => (<Price price={item.basePrice}/>)\n },\n {\n key: 'leftToPay',\n title: 'Zbývá uhradit',\n render: ({row:item}) => (<Price price={item.leftToPay}/>)\n },\n {\n key: 'state',\n title: 'Stav',\n render: ({row:item}) => (<InvoiceState {...item}/>)\n },\n {\n key: 'menu',\n title: '',\n className: 'text-right',\n render: ({row:item}) => {\n return (\n <>\n <DownloadLink\n resource='invoice'\n params={{id: item.id}}\n className=\"btn btn-default btn-sm\">\n <i className=\"fa fa-file-pdf-o\" /> Stáhnout\n </DownloadLink>\n </>\n )\n }\n }\n ];\n\n return <Table striped responsive\n columns={columns}\n rows={props.rows}\n primary='id'/>;\n};\n\nexport default InvoicesTable;\n\nconst InvoiceState = ({canceled, overdue, isPaid}) => {\n\n let className = 'label ';\n let label = '';\n\n if (canceled) {\n label = 'Zrušená';\n className += 'label-default';\n } else if (isPaid) {\n label = 'Uhrazeno';\n className += 'label-success';\n } else if (!isPaid && !overdue) {\n label = 'Neuhrazeno';\n className += 'label-info';\n } else if (!isPaid && overdue) {\n label = 'Po splatnosti';\n className += 'label-danger';\n }\n\n return <span className={className}>{label}</span>;\n}","import React from 'react';\nimport {InvoicesTable} from \"@fik/invoice\";\nimport {Paginator, Box} from \"@fik/ui\";\nimport {useDataSource, useDataSourceWithQueryParams} from \"@fik/data-source\";\n\nconst Invoices = () => {\n const {pagination, items, handlePageChange} = useDataSourceWithQueryParams(\n {name: 'invoice', initialSearchParams: {}}\n );\n\n return (\n <Box>\n <InvoicesTable striped responsive rows={items} primary='code'/>\n <Paginator {...pagination}\n onPageChange={handlePageChange}/>\n </Box>\n );\n};\n\nexport default Invoices;","import React, {useCallback, useEffect} from 'react';\nimport {AddressBookForm} from \"@fik/components\";\nimport {useEntityAction, usePureEntity} from \"@fik/entity\";\n\nconst AddressBook = () => {\n\n // contact to edit\n const [{entity: addressBook}, load] = usePureEntity({name: 'resellerProfile', params: {action: 'address-book'}});\n\n // save\n const [{isSuccess}, save] = useEntityAction({name: 'resellerProfile', action: 'saveAddressBook'});\n\n //- load on first render (load callback should not change)\n useEffect(() => load(), [load]);\n\n //- refresh after save\n useEffect(() => {\n if (isSuccess) {\n load();\n }\n }, [load, isSuccess]);\n\n const handleSubmit = useCallback((values) => {\n save({values});\n }, [save]);\n\n if (!addressBook) {\n return null;\n }\n\n return <AddressBookForm addressBook={addressBook} onSubmit={handleSubmit}/>;\n};\n\nexport default AddressBook;","import React, {useCallback, useEffect} from 'react';\nimport {BranchOfficeForm} from \"@fik/components\";\nimport {useEntityAction, usePureEntity} from \"@fik/entity\";\n\nconst BranchOffice = () => {\n // contact to edit\n const [{entity: branchOffice}, load] = usePureEntity({name: 'resellerProfile', params: {action: 'branch-office'}});\n // save\n const [{isSuccess}, save] = useEntityAction({name: 'resellerProfile', action: 'saveBranchOffice'});\n\n //- load on first render (load callback should not change)\n useEffect(() => load(), [load]);\n\n //- refresh after save\n useEffect(() => {\n if (isSuccess) {\n load();\n }\n }, [load, isSuccess]);\n\n const handleSubmit = useCallback((values) => {\n save({values});\n }, [save]);\n\n if (!branchOffice) {\n return null;\n }\n\n return <BranchOfficeForm branchOffice={branchOffice} onSubmit={handleSubmit} />;\n};\n\nexport default BranchOffice;","import React from 'react';\nimport {Box, Col, Row} from \"@fik/ui\";\nimport AddressBook from \"./AddressBook/AddressBook\";\nimport BranchOffice from \"./BranchOffice/BranchOffice\";\nimport {useEntity} from \"@fik/entity\";\n\nconst Settings = () => {\n const {\n entity: resellerProfile\n } = useEntity({name: 'profile'}, null);\n\n if (!resellerProfile) {\n return null;\n }\n\n return (\n <Row>\n <Col lg={6}>\n {resellerProfile.branchOffice && resellerProfile.branchOffice.branchOfficeId\n ? <Box title=\"Úprava pobočky\"><BranchOffice/></Box>\n : <Box><AddressBook/></Box>}\n </Col>\n </Row>\n );\n};\n\nexport default Settings;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {Table} from \"@fik/table\";\nimport {useEntity} from \"@fik/entity\";\nimport {NavigationItem} from \"@fik/navigation\";\n\nconst tagsMap = {\n 'ROLE_OBCHODNIK': {label: 'obchodník', className: 'default'},\n 'ROLE_FAKTURACE': {label: 'fakturace', className: 'default'},\n 'ROLE_TECHNIK': {label: 'technik', className: 'default'},\n 'ROLE_NOTALLOWED_RZ': {label: 'zakázané přihlášení do PZ', className: 'warning'},\n 'NEAKTIVNI': {label: 'neaktivní', className: 'danger'},\n};\n\nconst Tag = ({tag}) => {\n const def = tagsMap[tag] || null;\n return (def ? (<span className={\"btn btn-rounded btn-xs btn-\" + def.className}>{def.label}</span>) : null);\n};\n\nTag.propTypes = {\n tag: PropTypes.string\n};\n\n\nconst ContactList = () => {\n\n const {contact: contacts} = useEntity({name: 'contact'}, null);\n\n if (!contacts) {\n return null;\n }\n\n return <Table striped responsive\n columns={[\n {\n key: 'username',\n title: 'Přihlašovací jméno',\n },\n {\n key: 'contactSurname',\n title: 'Příjmení',\n },\n {\n key: 'contactFirstname',\n title: 'Jméno',\n },\n {\n key: 'contactPhone',\n title: 'Telefon',\n },\n {\n key: 'contactEmail',\n title: 'E-mail',\n },\n {\n key: 'tags',\n title: 'Role / Stav',\n render: ({row}) => (row.contactTags.map((tag) => (<Tag key={tag} tag={tag}/>))),\n },\n {\n key: 'menu',\n render: function renderMenu({row: {contactId}}) {\n return (\n contactId ? <>\n <NavigationItem\n className=\"btn btn-success btn-xs m-r-xs\"\n to=\"profile:editContact\"\n params={{id: contactId}}>\n <i className=\"fa fa-paste\"/> Upravit\n </NavigationItem>\n\n <NavigationItem\n className=\"btn btn-success btn-xs\"\n to=\"profile:certificationRequest\"\n params={{id: contactId}}>\n <i className=\"fa fa-certificate\"/> Zažádat o certifikaci\n </NavigationItem>\n\n </> : null\n );\n }\n },\n ]}\n rows={contacts}\n primary='username'/>;\n};\n\nexport default ContactList;","import React from 'react';\nimport {Box, Col, Row} from \"@fik/ui\";\nimport ContactList from \"../../Contact/ContactList/ContactList\";\nimport {NavigationItem} from \"@fik/navigation\";\n\nconst Contacts = () => (\n <Row>\n <Col lg={12}>\n <Box>\n <ContactList />\n </Box>\n <NavigationItem\n to=\"profile:createContact\"\n className='btn btn-info'><i className=\"fa fa-plus\"/> Přidat nového obchodníka</NavigationItem>\n </Col>\n </Row>\n);\n\nexport default Contacts;","import React from 'react';\n\nconst months = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'];\n\nconst reportTable = (props) => {\n const data = [];\n for (let key in props.stats) {\n if (props.stats.hasOwnProperty(key)) {\n data.push({year: key, months: props.stats[key]});\n }\n }\n\n return (\n <table className=\"table table-hover no-margins table-responsive table-graph\">\n <thead>\n <tr>\n <th> </th>\n {months.map(month => (<th key={month}>{month}</th>))}\n </tr>\n </thead>\n <tbody>\n {data.map((row) => (\n <tr key={row.year}>\n <td>{row.year}</td>\n {months.map(month => (<td key={row.year + '-' + month}>{props.formatValue(row.months[month]) || '-'}</td>))}\n </tr>\n ))}\n </tbody>\n </table>\n )\n};\n\nexport default reportTable;","import React from 'react';\nimport {Bar} from 'react-chartjs-2'\nimport {Box, Col, Price, Row} from \"@fik/ui\";\nimport ReportTable from \"./ReportTable/ReportTable\";\nimport {useEntity} from \"@fik/entity\";\n\nconst Reports = () => {\n\n const {\n entity: resellerProfile\n } = useEntity({name: 'profile'}, null);\n\n const {entity:loyalties} = useEntity({name: 'loyalties'});\n\n\n if (!resellerProfile && !loyalties) {\n return null;\n }\n\n const {\n stats,\n turnovers\n } = resellerProfile;\n\n let turnoversTable = {};\n if (stats && stats.turnovers && stats.turnovers.ownerPrices) {\n if (stats.turnovers.ownerPrices.previousYear) {\n turnoversTable = {...turnoversTable, ...stats.turnovers.ownerPrices.previousYear.groupedOwnerPrice};\n }\n\n if (stats.turnovers.ownerPrices.thisYear) {\n turnoversTable = {...turnoversTable, ...stats.turnovers.ownerPrices.thisYear.groupedOwnerPrice};\n }\n }\n\n return (\n <>\n <Row className=\"m-b-md\">\n <Col lg={8}>\n <Box title='Věrnost zákazníků v rámci vašeho subjektu (%)'>\n {loyalties ? <Bar data={loyalties}/> : null}\n {stats ? (\n <ReportTable stats={stats.loyalties}\n formatValue={(month) => (<span>{month && month.percent ? month.percent : '-'}</span>)}/>\n ) : null}\n </Box>\n </Col>\n </Row>\n\n <Row>\n <Col lg={8}>\n <Box title='Obraty v doporučených koncových cenách (Kč bez DPH)'>\n {turnovers ? <Bar data={turnovers}/> : null}\n {turnoversTable ? (\n <ReportTable stats={turnoversTable} formatValue={(value) => (<span>{value ? <Price price={value} decimalLength={0} /> : '-'}</span>)}/>\n ) : null}\n </Box>\n </Col>\n </Row>\n </>\n )\n};\n\nexport default Reports;","import React from 'react';\nimport {Document} from \"@fik/document\";\nimport {Spinner} from \"@fik/loading\";\n\nconst OrderDocument = (props) => (<React.Fragment>{props.entity ? <Document {...props} /> : <Spinner />}</React.Fragment>);\n\nexport default OrderDocument;","import React from 'react';\nimport {NavigationItem} from \"@fik/navigation\";\n\nconst OrderLink = ({id, code, children, ...props}) => {\n return (<NavigationItem {...props}\n to=\"order:detail\"\n params={{id}}>{children || code}</NavigationItem>);\n};\n\nexport default OrderLink;","import {EvidenceItems} from '@fik/evidence-item';\nimport React from \"react\";\n\nconst OrdersTableRowDetail = ({order: {evidenceItems}}) => {\n return <>\n <div className=\"table-responsive m-l-lg m-r-md\">\n {evidenceItems ? <EvidenceItems evidenceItems={evidenceItems}/> : null}\n </div>\n </>\n};\n\nexport default OrdersTableRowDetail;","import React from 'react';\nimport {Table, useRowDetail} from \"@fik/table\";\nimport {\n DocumentBasePrice,\n DocumentCreatedDate,\n DocumentEPC, DocumentOwner,\n DocumentPartner,\n DocumentStatus,\n DocumentType,\n DocumentResellerContact\n} from \"@fik/document\";\nimport OrderLink from \"./OrderLink\";\nimport OrdersTableRowDetail from \"./OrdersTableRowDetail\";\nimport {OrderMenu} from \"./index\";\n\n\n\nconst OrdersTable = ({rows, statesDict, typesDict}) => {\n const {toggleRow, isVisibleRow} = useRowDetail();\n\n return <Table striped responsive\n rows={rows}\n renderCellProps={{statesDict, typesDict}}\n renderRowMessages={({row, primaryValue})=>(isVisibleRow(primaryValue) ?\n <tr>\n <td colSpan='9' className=\"no-padding no-borders\">\n <OrdersTableRowDetail order={row} />\n </td>\n </tr> : null)}\n primary='id'>\n\n <OrderLink header='ID' />\n <DocumentOwner header='Klient' />\n <DocumentPartner header='Partner' />\n <DocumentEPC header='EPC' />\n <DocumentResellerContact header='Obchodník'/>\n <DocumentType header='Typ objednávky' />\n <DocumentStatus header='Stav' />\n <DocumentBasePrice header='Cena' />\n <DocumentCreatedDate header='Vytvořeno' />\n <OrderMenu toggleRow={toggleRow} isVisibleRow={isVisibleRow}/>\n\n </Table>;\n};\n\nexport default OrdersTable;","import React from \"react\";\nimport {ToggleRowDetailButton} from \"@fik/table\";\n\nexport {default as OrderDocument} from \"./OrderDocument\";\nexport {default as OrderLink} from \"./OrderLink\";\nexport {default as OrdersFilter} from \"./OrdersFilter\";\nexport {default as OrdersTable} from \"./OrdersTable\";\nexport {default as OrdersTableRowDetail} from \"./OrdersTableRowDetail\";\n\nexport const OrderMenu = ({primaryValue, isVisibleRow, toggleRow}) => <ToggleRowDetailButton isVisibleRow={isVisibleRow} primaryValue={primaryValue} toggleRow={toggleRow} />;","import React from 'react';\nimport {OrdersTable} from \"@fik/order\";\nimport {FilterBar, Paginator} from \"@fik/ui\";\nimport {Box} from \"@fik/ui\";\nimport {useDials} from \"@fik/dials\";\nimport {useDataSourceWithQueryParams} from \"@fik/data-source\";\nimport arrayToDictionary from \"@fik/utils/arrayToDictionary\";\n\nconst DEFAULT_PARAMS = {\n fulltext: null,\n state: 'stavDoklObch.schvaleno'\n};\n\nconst INITIAL_SEARCH_PARAMS = {};\n\nconst Orders = () => {\n\n const {types, states} = useDials({name: 'order'});\n const {pagination, items, setSearchParams, handlePageChange, queryParams, refresh, handleSearch} = useDataSourceWithQueryParams(\n {\n name: 'order',\n initialSearchParams: INITIAL_SEARCH_PARAMS,\n defaultParams: DEFAULT_PARAMS\n }\n );\n\n return (\n <Box>\n <OrdersFilter onSubmitSearch={handleSearch}\n states={states}\n />\n <OrdersTable striped responsive\n statesDict={arrayToDictionary(states, 'id', 'label')}\n typesDict={arrayToDictionary(types, 'id', 'label')}\n rows={items}\n />\n\n <Paginator {...pagination}\n onPageChange={handlePageChange}/>\n </Box>\n );\n};\n\nexport default Orders;\n\nconst OrdersFilter = (props) => {\n return (\n <FilterBar onSubmitSearch={props.onSubmitSearch}\n controls={{\n fulltext: {\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'Zadejte název, IČ, e-mail, ...',\n },\n value: '',\n valid: false,\n touched: false,\n validation: {\n minLength: 3,\n }\n }\n }}\n />\n );\n};","import {Modal} from \"@fik/ui\";\nimport handleClick from \"@fik/utils/handleClick\";\nimport React, {useCallback, useMemo} from \"react\";\nimport {Form} from \"@mouseover/react-form\";\nimport {TextInput} from \"@fik/form\";\n\nconst ConfirmOrderModal = ({entity, modal, orderOffer}) => {\n\n const handleSubmit = useCallback((values, valid) => {\n if (valid) {\n orderOffer(entity.id, values);\n modal.hide();\n }\n }, [orderOffer, modal, entity]);\n\n const values = useMemo(() => ({customContractId: entity.customContractId}), [entity]);\n\n return <Modal {...modal}\n renderHeader={() => <>\n <button type=\"button\" className=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\"\n onClick={handleClick(modal.hide)}>×\n </button>\n <h4 className=\"modal-title\">Objednat</h4>\n </>}\n >\n <Form\n values={values}\n validationRules={{}}\n onSubmit={handleSubmit}\n render={(form =>\n <TextInput form={form}\n name='customContractId'\n label='(NEPOVINNÉ) Zadejte případné číslo objednávky, které se propíše na fakturu'\n />\n )}>\n <button onClick={handleClick(modal.hide)} className='btn btn-warning block pull-left m-b'>Zpět</button>\n <button type='submit' className='btn btn-primary block pull-right m-b'>OBJEDNAT</button>\n <div className='clearfix' />\n </Form>\n </Modal>\n};\n\nexport default ConfirmOrderModal;\n\n","import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {OfferDocument} from '@fik/offer';\nimport {useEntity} from \"@fik/entity\";\nimport {useDials} from \"@fik/dials\";\nimport ConfirmOrderModal from \"./ConfirmOrderModal\";\nimport {useModal} from \"@fik/ui\";\nimport {useDocumentOperation} from \"@fik/document-edit\";\nimport useIsEpc from \"../../useIsEpc\";\n\nconst Offer = ({id}) => {\n const {offer} = useEntity({name: 'offer'}, id);\n const dials = useDials({name: 'offer'});\n const modal = useModal();\n const {perform: orderOffer, isSuccess: isOrdered} = useDocumentOperation('orderOffer');\n\n return <>\n {offer ? <ConfirmOrderModal orderOffer={orderOffer} entity={offer} modal={modal}/> : null}\n <OfferDocument\n isEpc={useIsEpc()}\n isOrdered={isOrdered}\n modal={modal}\n entity={offer}\n dials={dials}\n />\n\n </>;\n};\n\nOffer.propTypes = {\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n};\n\nexport default Offer;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {Box} from \"@fik/ui\";\n\nimport {useEntity} from \"@fik/entity\";\nimport {useDials} from \"@fik/dials\";\nimport {OrderDocument} from \"@fik/order\";\nimport useIsEpc from \"../../useIsEpc\";\n\nconst Order = ({id}) => {\n\n const {order} = useEntity({name: 'order'}, id);\n const dials = useDials({name: 'order'});\n\n return (\n <Box>\n <OrderDocument\n isEpc={useIsEpc()}\n entity={order}\n dials={dials}\n />\n </Box>\n )\n};\n\nOrder.propTypes = {\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n};\n\nexport default Order;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {Box} from \"@fik/ui\";\nimport {InvoiceDetail} from \"@fik/invoice\";\nimport {useDials} from \"@fik/dials\";\nimport {useEntity} from \"@fik/entity\";\n\nconst Invoice = ({id}) => {\n const {invoice} = useEntity({name: 'invoice'}, id);\n const dials = useDials({name: 'invoice'});\n\n return (\n <Box>\n <InvoiceDetail\n entity={invoice}\n dials={dials}\n />\n </Box>\n )\n};\n\nInvoice.propTypes = {\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n};\n\n\nexport default Invoice;","import React from 'react';\nimport {DocumentEntityCreate} from \"@fik/document-edit\";\nimport useIsEpc from \"../../useIsEpc\";\n\nconst OrderCreate = (props) => <DocumentEntityCreate name=\"order\" isEpc={useIsEpc()} params={props} />;\n\nexport default OrderCreate;","import React, {useState, useCallback, useEffect} from 'react';\nimport {Box, Col, Row} from \"@fik/ui\";\nimport {Calculator, useEvidenceItemsStorage} from \"@fik/calculator\";\nimport handleClick from \"@fik/utils/handleClick\";\nimport {emptyItem} from \"@fik/model/createEvidenceItemModel\";\nimport {NavigationItem} from \"@fik/navigation\";\nimport {EvidenceItems} from \"@fik/evidence-item\";\nimport {useNavigate} from \"@fik/page\";\nimport {Redirect} from \"react-router-dom\";\nimport {isEmpty} from \"@mouseover/js-utils/src\";\n\nconst CalculatorAndPriceLists = () => {\n const [calculationData, setCalculationData] = useState(null);\n\n const handleShowCalculator = useCallback((selectType) => {\n setCalculationData({\n initialSelection: {\n ...emptyItem,\n selectType\n }\n });\n }, [setCalculationData]);\n\n const [evidenceItem, setEvidenceItem] = useState(null);\n const [orderEvidenceItem, setOrderEvidenceItem] = useState(null);\n const {addEvidenceItem, removeEvidenceItem, clearEvidenceItems, evidenceItems} = useEvidenceItemsStorage();\n\n useEffect(() => {\n clearEvidenceItems();\n }, [clearEvidenceItems])\n\n const navigate = useNavigate();\n\n const handleOrderEvidenceItem = useCallback((item) => {\n if (item) {\n let index = evidenceItems.indexOf(item);\n if (index < 0) {\n addEvidenceItem(item);\n index = 0;\n }\n\n setOrderEvidenceItem(index);\n }\n }, [evidenceItems]);\n\n const handleEvidenceItem = useCallback((evidenceItem) => {\n setEvidenceItem(evidenceItem);\n }, [setEvidenceItem]);\n\n if (!isEmpty(orderEvidenceItem)) {\n return <Redirect to={'/sales/create-order?evidenceItem=' + orderEvidenceItem} />\n }\n\n return <>\n <Box title='Kalkulator'>\n <Row>\n <Col lg={4}>\n <div className=\"widget style1 navy-bg calc-click-box\" onClick={handleClick(handleShowCalculator, 'new')}\n id=\"test_2c81w\">\n <div className=\"row\">\n <div className=\"col-xs-4\">\n <i className=\"fa fa-plus fa-5x\"/>\n </div>\n <div className=\"col-xs-8 text-right\">\n <span> Vypočítat cenu nové licence </span>\n <h2 className=\"font-bold\">Nová licence</h2>\n </div>\n </div>\n </div>\n </Col>\n <Col lg={4}>\n <div className=\"widget style1 lazur-bg calc-click-box\" onClick={handleClick(handleShowCalculator, 'renew')}\n id=\"test_oxmof\">\n <Row>\n <Col xs={4}>\n <i className=\"fa fa-search fa-5x\"/>\n </Col>\n <Col xs={8} className=\"text-right\">\n <span> Update, enlarge, upgrade stávající licence </span>\n <h2 className=\"font-bold\">Existující licence</h2>\n </Col>\n </Row>\n </div>\n </Col>\n <Col lg={4}>\n <NavigationItem to='page' params={{category: 'ceniky', page: 'aktualni-ceniky'}}>\n <div className=\"widget style1 yellow-bg calc-click-box\" id=\"test_2qhwt\">\n <div className=\"row\">\n <div className=\"col-xs-4\">\n <i className=\"fa fa-download fa-5x\"/>\n </div>\n <div className=\"col-xs-8 text-right\">\n <span>Ceníky ve formátu PDF a XLS ke stažení</span>\n <h2 className=\"font-bold\">Všechny ceníky</h2>\n </div>\n </div>\n </div>\n </NavigationItem>\n </Col>\n </Row>\n {calculationData ?\n <Calculator onEvidenceItemChange={handleEvidenceItem} calculationData={calculationData}/> : null}\n <Row>\n <Col lg={4} lgOffset={8} className='text-right'>\n {evidenceItem ? <div className='btn-group'>\n <button className='btn btn-success' onClick={handleClick(addEvidenceItem, evidenceItem)}>Do porovnání</button>\n <button className='btn btn-info' onClick={handleClick(handleOrderEvidenceItem, evidenceItem)}>Objednat</button>\n </div> : null}\n </Col>\n </Row>\n </Box>\n\n {evidenceItems.length > 0 ?\n <Box\n title='Porovnání'\n tools={() => <button className='btn btn-danger btn-xs' onClick={handleClick(clearEvidenceItems)}>Vyprázdnit</button>}\n >\n <EvidenceItems\n evidenceItems={evidenceItems}\n itemMenu={(item) => (\n <>\n <button onClick={handleClick(removeEvidenceItem, item.row)}\n className='btn btn-xs btn-warning m-r-xs'> Odebrat\n </button>\n <button onClick={handleClick(handleOrderEvidenceItem, item.row, item.index)}\n className='btn btn-xs btn-primary'>Objednat\n </button>\n </>\n )}\n />\n </Box> : null}\n </>;\n};\n\nexport default CalculatorAndPriceLists;","import React from 'react';\nimport {DocumentEntityCreate} from \"@fik/document-edit\";\nimport useIsEpc from \"../../useIsEpc\";\n\nconst OfferCreate = (props) => <DocumentEntityCreate name=\"offer\" isEpc={useIsEpc()} params={props} />;\n\nexport default OfferCreate;","import React from 'react';\nimport {DocumentEntityCreate} from \"@fik/document-edit\";\nimport useIsEpc from \"../../useIsEpc\";\n\nconst ProjectPriceCreate = (props) => <DocumentEntityCreate name=\"projectPrice\" isEpc={useIsEpc()} params={props} />;\n\nexport default ProjectPriceCreate;","import React, {useCallback, useEffect, useState} from 'react';\nimport {Selector, useEvidenceItemCalculator} from \"@fik/calculator\";\nimport {useDocumentSave} from \"@fik/document-edit\";\nimport {Box, Col, Errors, Row} from \"@fik/ui\";\nimport {ResellerByRidFinder} from \"@fik/reseller-edit\";\nimport DocumentSaved from \"@fik/document-edit/components/DocumentSaved\";\n\nconst defaultProps = {initialSelection: {selectType: 'nfr'}};\n\nconst NfrOrderForm = () => {\n const [document, setDocument] = useState({documentType: 'nfr-order', evidenceItems: []});\n\n const {\n types,\n products,\n periods,\n evidenceItem,\n form,\n selectPartner,\n minimum,\n maximum,\n itemMessages\n } = useEvidenceItemCalculator(defaultProps);\n\n const {\n saveDocument,\n isSaved,\n messages,\n documentType\n } = useDocumentSave();\n\n useEffect(() => {\n setDocument((current) => {\n if (evidenceItem && (current.evidenceItems.length === 0 || current.evidenceItems[0] !== evidenceItem)) {\n return {...current, evidenceItems: [evidenceItem]};\n } else if (!evidenceItem && current.evidenceItems.length > 0) {\n return {...current, evidenceItems: []};\n }\n return current;\n });\n }, [evidenceItem, document]);\n\n const handleSave = useCallback(() => {\n saveDocument(document.documentType, document);\n }, [document, saveDocument]);\n\n const handleChangeReseller = useCallback((partner) => {\n setDocument(current => ({...current, partner}));\n }, []);\n\n if (isSaved) {\n return <Row>\n <Col sm={12}>\n <Box>\n <h1>Úspěšně odesláno</h1>\n <DocumentSaved documentType={documentType}/>\n </Box>\n </Col>\n </Row>;\n }\n\n return <>\n {messages ? <Errors messages={messages}/> : null}\n <div className='row'>\n {selectPartner\n ? <div className='col-sm-6'>\n <Box title=\"Partner\">\n <ResellerByRidFinder onChange={handleChangeReseller} />\n </Box>\n </div>\n : null}\n <div className='col-sm-6'>\n\n <Box title=\"Výběr licence\">\n {itemMessages ? <Errors messages={itemMessages}/> : null}\n <Selector\n form={form}\n selectType='nfr'\n types={types} isFailed\n products={products}\n periods={periods}\n minimum={minimum}\n maximum={maximum}\n />\n {evidenceItem ? <button onClick={handleSave} className=\"btn btn-success btn-block btn-lg\">Objednat</button> : null}\n <div className=\"panel panel-warning m-t-md\">\n <div className=\"panel-heading\">\n <i className=\"fa fa-info-circle\"/> NFR licenci produktu ESET PROTECT Advanced, ESET Secure Authetication, nebo ESET Endpoint Encryption generujeme v maximálním počtu odpovídající partnerské kategorii.\n Nelze tedy objednat více menších licencí. V případě že požadujete pro vlastní ochranu, nebo testy využívat vyšší firemní řešení, nebo vyšší počet licencí, než je určeno pro partnerskou kategorii,\n informace o podmínkách <a href=\"https://resellerzone.eset.cz/p/partnerstvi/licence-zdarma\" target=\"_blank\">najdete zde</a>. Po odeslání vašeho požadavku vás budeme kontaktovat do dvou pracovních dnů.\n </div>\n </div>\n </Box>\n </div>\n </div>\n </>;\n};\n\nexport default NfrOrderForm;","import React from 'react';\nimport {useEntity} from \"@fik/entity\";\nimport {NavigationItem} from \"@fik/navigation\";\n\nconst NfrCreditInfo = () => {\n const {\n entity: nfrCredit\n } = useEntity({name: 'resellerProfile', alwaysFetch: true, params: {action: 'nfr-credit'}, timeToRefresh: -1}, null);\n\n if (nfrCredit) {\n return <div></div>\n }\n return null;\n\n};\n\nexport default NfrCreditInfo;","import React from 'react';\nimport NfrOrderForm from \"../components/NfrOrder/NfrOrderForm\";\nimport NfrCreditInfo from \"../components/NfrOrder/NfrCreditInfo\";\n\nconst OrderNfr = () => <>\n <NfrCreditInfo/>\n <NfrOrderForm/>\n</>;\n\nexport default OrderNfr;","import {useReducer, useCallback} from 'react';\n\nconst ADD_PRODUCT = 'ADD_PRODUCT';\nconst REMOVE_PRODUCT = 'REMOVE_PRODUCT';\nconst REMOVE_ALL = 'REMOVE_ALL';\nconst CHANGE_QUANTITY = 'CHANGE_QUANTITY';\n\nconst initialState = {\n products: [],\n total: 0\n};\n\nconst productPrice = (product) => product.productBasePrice * product.quantity;\nconst productsSum = (products) => products.reduce((sum, product) => sum + productPrice(product), 0);\n\nconst basketReducer = (initialState) => (state = initialState, action) => {\n switch (action.type) {\n case ADD_PRODUCT:\n\n return {\n ...state,\n products: [...state.products, action.product],\n total: state.total + productPrice(action.product)\n };\n case REMOVE_PRODUCT:\n const newProducts = [...state.products];\n newProducts.splice(action.index, 1);\n return {\n ...state,\n products: newProducts,\n total: productsSum(newProducts)\n };\n case CHANGE_QUANTITY:\n const changedProducts = [...state.products];\n changedProducts[action.index] = {...changedProducts[action.index], quantity: action.quantity};\n return {\n ...state,\n products: changedProducts,\n total: productsSum(changedProducts)\n };\n\n case REMOVE_ALL:\n return {\n ...initialState\n };\n\n default:\n return state;\n }\n};\n\nconst useCart = () => {\n const [state, dispatch] = useReducer(basketReducer(initialState), initialState);\n\n const addProduct = useCallback((product) => {\n const existingIndex = state.products.findIndex((current) => current.productId === product.productId);\n if (existingIndex !== -1) {\n dispatch({type: CHANGE_QUANTITY, index:existingIndex, quantity: state.products[existingIndex].quantity + product.quantity});\n } else {\n dispatch({type: ADD_PRODUCT, product});\n }\n }, [dispatch, state]);\n\n const removeProduct = useCallback((index) => {\n dispatch({type: REMOVE_PRODUCT, index});\n }, [dispatch]);\n\n const changeQuantity = useCallback((index, quantity) => {\n dispatch({type: CHANGE_QUANTITY, index, quantity});\n // if (Number(quantity) === 0) {\n // dispatch({type: REMOVE_PRODUCT, index});\n // } else {\n // dispatch({type: CHANGE_QUANTITY, index, quantity});\n // }\n }, [dispatch]);\n\n const clearBasket = useCallback((index) => {\n dispatch({type: REMOVE_PRODUCT, index});\n }, [dispatch]);\n\n return {\n addProduct,\n removeProduct,\n changeQuantity,\n clearBasket,\n products: state.products,\n total: state.total\n }\n};\n\nexport default useCart;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {Price} from \"@fik/ui\";\n\nconst Cart = ({products, onChangeQuantity, onRemoveProduct, total}) => {\n\n if (!products) {\n return null;\n }\n\n return <div className=\"table-responsive\">\n <table className=\"table shopping-cart-table\">\n <thead>\n <tr>\n <th>Název</th>\n <th className=\"text-right\">Jednotková cena [Kč]</th>\n <th className=\"col-sm-1 text-right\">Množství</th>\n <th className=\"col-sm-1 text-right\">Celkem [Kč]</th>\n <th className=\"text-right\"/>\n </tr>\n </thead>\n <tbody>\n {products.map(({productName, productBasePrice, quantity}, index) => (<tr key={index}>\n <td className=\"desc\">\n <h3>{productName}</h3>\n </td>\n <td className=\"text-right\"><Price price={productBasePrice}/></td>\n <td className=\"text-right\">\n <input className=\"form-control\" type=\"number\" min=\"1\" placeholder=\"1\" value={quantity}\n onChange={(event) => onChangeQuantity(index, parseInt(event.target.value))}/>\n </td>\n <td className=\"text-right text-bold\">\n <Price price={quantity * productBasePrice}/>\n </td>\n <td>\n <button className=\"btn btn-md btn-outline btn-danger\" title=\"Odstranit z košíku\"\n onClick={() => onRemoveProduct(index)}><i className=\"fa fa-remove\"/></button>\n </td>\n </tr>))}\n\n <tr>\n\n <td colSpan=\"3\" className=\"text-right\">\n <h4>Celkem:</h4>\n </td>\n <td className=\"text-right\">\n <h4><Price price={total}/></h4>\n </td>\n <td> </td>\n </tr>\n </tbody>\n </table>\n </div>\n};\n\nCart.propTypes = {\n products: PropTypes.array,\n onChangeQuantity: PropTypes.func,\n onRemoveProduct: PropTypes.func,\n total: PropTypes.number\n};\n\nexport default Cart;","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport {Form, FormField} from \"@mouseover/react-form\";\nimport {AddressFields, ContactFields} from \"@fik/components\";\n\nconst validationRules= {\n\n};\n\nconst ShipmentForm = ({values, onValuesChange}) => {\n return <Form\n values={values}\n validationRules={validationRules}\n onChange={onValuesChange}\n render={(form =>\n <>\n <div className=\"row\">\n <div className=\"col-lg-6\">\n <h3>Dodací adresa</h3>\n <FormField form={form}\n name='name'\n label='Název'\n elementType='input'\n />\n <AddressFields form={form}/>\n </div>\n <div className=\"col-lg-6\">\n <h3>Kontaktní osoba</h3>\n <ContactFields form={form}/>\n </div>\n </div>\n <div className=\"row\">\n <div className=\"col-lg-12\">\n <FormField form={form}\n name='note'\n label='Poznámka'\n elementType='textarea'\n />\n </div>\n </div>\n </>\n )}>\n </Form>\n};\n\nShipmentForm.propTypes = {\n values: PropTypes.object,\n onValuesChange: PropTypes.func\n};\n\nexport default ShipmentForm;","import React, {useCallback, useState} from \"react\";\nimport PropTypes from 'prop-types';\nimport {Price, WithoutCode} from \"@fik/ui\";\nimport handleClick from \"@fik/utils/handleClick\";\nimport {useSelector} from \"react-redux\";\n\n\nconst Product = ({product, onAddProduct}) => {\n const {attachmentPath, productBasePrice, productUnit, productName} = product;\n const [quantity, setQuantity] = useState(1);\n\n const onAddButtonClick = useCallback(() => {\n if (onAddProduct) {\n onAddProduct({...product, quantity});\n }\n setQuantity(1);\n }, [onAddProduct, product, quantity]);\n\n const token = useSelector((state) => {\n return state.auth.token;\n },\n []);\n\n return <div className=\"col-md-3\">\n <div className=\"ibox\">\n <div className=\"ibox-content product-box\">\n {attachmentPath\n ? <div className=\"cart-product-imitation\"><img srcSet={(process.env.REACT_APP_API_URL === \"/\" ? \"\" : process.env.REACT_APP_API_URL)+ attachmentPath + '?token=' + token} alt={productName}/></div>\n : <div className=\"cart-product-imitation\"><i>náhled není k dispozici</i></div>}\n\n <div className=\"product-desc\">\n <div className=\"product-price\">\n <Price price={productBasePrice}/> / <WithoutCode>{productUnit ? productUnit.toLowerCase() : productUnit}</WithoutCode>\n </div>\n <div style={{height: '46px'}}>\n <p className=\"product-name\">{productName}</p>\n </div>\n <div className=\"small m-t-xs\">\n <div className=\"row\">\n <div className=\"col-md-6\">\n Počet:<br/><input className=\"form-control\" type=\"number\" min=\"1\" placeholder=\"1\"\n value={quantity} onChange={(event) => setQuantity(parseInt(event.target.value))}/>\n </div>\n <div className=\"col-md-6\">\n <div className=\"m-t text-righ\">\n <button className=\"btn btn-success\"\n onClick={handleClick(onAddButtonClick)}><i\n className=\"fa fa-shopping-basket\"/> Přidat do košíku\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>;\n};\n\nProduct.propTypes = {\n product: PropTypes.object,\n onAddProduct: PropTypes.func\n};\n\nexport default Product;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Product from \"./Product\";\n\nconst ProductsGrid = ({products, onAddProduct}) => {\n return <div className=\"row\">\n {products.map((product) => <Product key={product.productId} product={product} onAddProduct={onAddProduct}/>)}\n </div>;\n};\n\nProductsGrid.propTypes = {\n products: PropTypes.array,\n onAddProduct: PropTypes.func\n};\n\nexport default ProductsGrid;","import React, {useCallback, useEffect, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport ShipmentForm from \"./ShipmentForm\";\nimport {Box} from \"@fik/ui\";\nimport Cart from \"./Cart\";\nimport useCart from \"./../useCart\";\nimport {useEntity} from \"@fik/entity\";\nimport ProductsGrid from \"./ProductsGrid\";\nimport {useDocumentSave} from \"@fik/document-edit\";\nimport {Errors} from \"@fik/ui\";\n\nconst CategoryContent = ({category, cart, level}) => {\n if (category) {\n let products = null;\n let categories = null;\n if (category.products) {\n products = <ProductsGrid products={category.products} onAddProduct={cart.addProduct}/>\n }\n if (category.subNodes) {\n categories = category.subNodes.map((category) => <Category key={\"category-\" + category.id} level={level + 1} cart={cart}\n category={category}/>);\n }\n return <>\n {products}\n {categories}\n </>;\n }\n return null;\n};\n\nCategoryContent.propTypes = {\n category: PropTypes.shape({\n products: PropTypes.array,\n subNodes: PropTypes.array,\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n }),\n cart: PropTypes.object,\n level: PropTypes.number\n};\n\nconst Category = ({category, cart, level}) => {\n if (category) {\n const Heading = `h${level}`;\n return <>\n <Heading>{category.name}</Heading>\n <CategoryContent cart={cart} level={level} category={category}/>\n </>;\n }\n return null;\n};\n\nCategory.propTypes = {\n category: PropTypes.object,\n cart: PropTypes.object,\n level: PropTypes.number\n};\n\nconst Eshop = ({code, onLoading, onSaved}) => {\n const {\n entity: resellerProfile,\n loading: resellerProfileLoading\n } = useEntity({name: 'resellerProfile', params: {action: 'reseller-profile-for-eshop'}}, null);\n\n const {entity: rootCategory, loading: productTreeLoading} = useEntity({\n name: 'productTree',\n }, code);\n\n const cart = useCart();\n const [valid, setValid] = useState(false);\n const [profile, setProfile] = useState(null);\n\n const {\n saveDocument,\n isSaving,\n isSaved,\n messages\n } = useDocumentSave();\n\n useEffect(() => {\n if (isSaved && onSaved) {\n onSaved();\n }\n }, [isSaved, onSaved]);\n\n const handleSave = useCallback(() => {\n saveDocument('eshop-order', {cart: cart.products, profile: profile});\n }, [cart.products, profile, saveDocument]);\n\n const handleValuesChange = useCallback((newValues, isValid) => {\n setValid(isValid);\n setProfile(newValues);\n }, [setValid]);\n\n useEffect(() => {\n if (!profile && resellerProfile) {\n setValid(true);\n setProfile(resellerProfile)\n }\n }, [resellerProfile, profile]);\n\n useEffect(() => {\n if (onLoading) {\n onLoading(isSaving || productTreeLoading || resellerProfileLoading);\n }\n }, [onLoading, isSaving, productTreeLoading, resellerProfileLoading]);\n\n return <div className='estore'>\n {messages ? <Errors messages={messages}/> : null}\n <CategoryContent category={rootCategory} level={1} cart={cart}/>\n <Box title=\"Košík\">\n {cart.products && cart.products.length > 0\n ? <Cart products={cart.products} onChangeQuantity={cart.changeQuantity} onRemoveProduct={cart.removeProduct}\n total={cart.total}/>\n : <div className=\"alert alert-info\">Pusto a prázdno.</div>}\n </Box>\n\n <Box title=\"Údaje pro doručení\">\n {resellerProfile ? <ShipmentForm values={resellerProfile} onValuesChange={handleValuesChange}/> : null}\n </Box>\n\n {valid && cart.products && cart.products.length > 0 ?\n <button className=\"btn btn-success btn-block btn-lg\" onClick={handleSave}>Objednat</button> : null}\n </div>\n};\n\nEshop.propTypes = {\n code: PropTypes.string.isRequired,\n onLoading: PropTypes.func\n};\n\nexport default Eshop;","import React, {useCallback, useState} from 'react';\nimport {Eshop} from \"@fik/eshop\";\nimport {Redirect} from \"react-router-dom\";\nimport {useNavigation} from \"@fik/navigation\";\n\nconst BoxEshop = () => {\n const {routes} = useNavigation();\n const [isSaved, setIsSaved] = useState(false);\n const handleSaved = useCallback(() => {\n setIsSaved(true);\n }, [setIsSaved]);\n\n return isSaved ? <Redirect to={routes.boxEshopOrdered.path} /> : <Eshop code=\"KRABICE\" onSaved={handleSaved} />;\n}\n\nexport default BoxEshop;","import React, {useCallback, useState} from 'react';\nimport {Eshop} from \"@fik/eshop\";\nimport {useNavigation} from \"@fik/navigation\";\nimport {Redirect} from \"react-router-dom\";\n\nconst MarketingEshop = () => {\n const {routes} = useNavigation();\n const [isSaved, setIsSaved] = useState(false);\n const handleSaved = useCallback(() => {\n setIsSaved(true);\n }, [setIsSaved]);\n\n return isSaved ? <Redirect to={routes.marketingEshopOrdered.path} /> : <Eshop code=\"ALLINONE\" onSaved={handleSaved} />;\n}\n\nexport default MarketingEshop;","import React, {useEffect, useMemo, useState} from \"react\";\nimport {DealForm} from \"@fik/deal\";\nimport {DocumentProvider} from \"@fik/document-edit\";\nimport useIsEpc from \"../../useIsEpc\";\nimport {Col, Row} from \"@fik/ui\";\nimport {useEntity, usePureEntity} from \"@fik/entity\";\nimport handleClick from \"@fik/utils/handleClick\";\n\nconst defaultDocument = {\n id: null,\n dateCreated: null,\n dateExpected: null,\n dateExpiration: null,\n phaseId: null,\n successProbability: null,\n statusId: null,\n closedId: null,\n opportunityId: null,\n dealClosed: null,\n dealPhase: null,\n dealStatus: null,\n staffId: null,\n note: null,\n opportunity: null,\n owner: null,\n partner: null,\n epc: null,\n documentType: 'deal',\n expectedSolutions: null,\n businessStatus: null,\n responsiblePerson: {\n contactFirstname: null,\n contactSurname: null,\n contactPosition: null,\n contactEmail: null,\n contactPhone: null\n }\n};\n\n\nconst NewDeal = ({offerId, initialFormType = null}) => {\n\n const isEpc = useIsEpc();\n const [{entity: offer}, load] = usePureEntity({name: 'offer'});\n const [formType, setFormType] = useState(initialFormType);\n\n useEffect(() => {\n if (offerId) {\n load({id: offerId});\n }\n }, [offerId, load]);\n\n const document = useMemo(() => ({...defaultDocument, owner: offer ? offer.owner : null, renew: formType === 'renew'}), [offer, formType]);\n\n if (offerId && !offer) {\n return null;\n }\n return <DocumentProvider document={document} isEpc={isEpc} validate={false}>\n <Row className=\"row\">\n {formType === null && <>\n <Col lg={6}>\n <div className=\"widget style1 navy-bg calc-click-box\" onClick={handleClick(setFormType, 'new')}\n id=\"test_2c81w\">\n <div className=\"row\">\n <div className=\"col-xs-4\">\n <i className=\"fa fa-plus fa-5x\"/>\n </div>\n <div className=\"col-xs-8 text-right\">\n <h2 className=\"font-bold\">Registrace NOVÉ<br /> licence</h2>\n </div>\n </div>\n </div>\n </Col>\n <Col lg={6}>\n <div className=\"widget style1 lazur-bg calc-click-box\" onClick={handleClick(setFormType, 'renew')}\n id=\"test_oxmof\">\n <Row>\n <Col xs={4}>\n <i className=\"fa fa-search fa-5x\"/>\n </Col>\n <Col xs={8} className=\"text-right\">\n <h2 className=\"font-bold\">Registrace EXISTUJÍCÍ<br /> licence</h2>\n </Col>\n </Row>\n </div>\n </Col>\n </>}\n {formType && <Col sm={12} lg={9}><DealForm formType={formType}/></Col>}\n </Row>\n </DocumentProvider>;\n};\n\nexport default NewDeal;","import React from 'react';\nimport ProptTypes from 'prop-types';\nimport {useCmsArticle, TextPage} from \"@fik/cms\";\nimport {DateTime} from \"@fik/ui\";\n\nconst Article = ({id}) => {\n const {result: article} = useCmsArticle(id);\n\n if (!article){\n return null;\n }\n\n const {title, date, author, html} = article;\n\n return <div className=\"col-lg-6\" >\n <div className=\"ibox float-e-margins\">\n <div className=\"ibox-title\">\n <h5>{title}</h5>\n </div>\n <div className=\"ibox-content\">\n <div>\n <div className=\"chat-activity-list\">\n <div className=\"chat-element\">\n <div className=\"media-body \">\n <TextPage html={html} />\n <small className=\"text-muted\"><DateTime date={date}/></small>\n <small className=\"pull-right text-navy\">{author}</small>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>;\n};\n\nArticle.propTypes = {\n id: ProptTypes.string\n};\n\nexport default Article;","import React from \"react\";\nimport PropTypes from 'prop-types';\nimport {DealForm} from \"@fik/deal\";\nimport {DocumentProvider} from \"@fik/document-edit\";\nimport {useEntity} from \"@fik/entity\";\nimport useIsEpc from \"../../useIsEpc\";\nimport {Col, Row} from \"@fik/ui\";\n\n\nconst EditDeal = ({id}) => {\n\n const {deal} = useEntity({name: 'deal'}, id);\n const isEpc = useIsEpc();\n\n return deal ? <DocumentProvider document={deal} isEpc={isEpc} validate={false} existing={true}>\n <Row>\n <Col sm={12} lg={9}><DealForm formType={deal.renew ? 'renew' : 'new'}/></Col>\n </Row>\n </DocumentProvider> : null;\n};\n\nEditDeal.propTypes = {\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n};\n\nexport default EditDeal;","import React from \"react\";\nimport {useEntityAction} from \"@fik/entity\";\nimport {Box} from \"@fik/ui\";\nimport handleClick from \"@fik/utils/handleClick\";\n\nconst LicensesDownload = () => {\n const [{isSuccess}, requestLicenses] = useEntityAction({name: 'license', action: 'requestLicenses'});\n return <Box>\n {isSuccess\n ? <div className='alert alert-info'>Přehled licencí Vám bude zaslán e-mailem. Zpracování probíhá na pozadí, může to pár minut trvat.</div>\n : <button className='btn btn-primary' onClick={handleClick(requestLicenses)}>Vyžádat zaslání licencí</button>\n }\n </Box>\n};\n\nexport default LicensesDownload;","import React from 'react';\nimport {useEntity} from \"@fik/entity\";\nimport Salesman from \"../../components/Profile/Salesman/Salesman\";\nimport {Col, Row} from \"@fik/ui\";\n\nconst EsetContacts = () => {\n const {\n entity: resellerProfile\n } = useEntity({name: 'profile'}, null);\n\n return (\n <div className=\"wrapper wrapper-content animated fadeInRight\" data-app-module=\"modules/app\">\n <Row>\n <Col lg={6}>\n <div className=\"contact-box contact-box-main no-borders\">\n <div>\n <h3>\n <strong>Váš obchodník</strong>\n </h3>\n <Row>\n <Col sm={7} className=\"no-padding no-margins no-padding\">\n {resellerProfile && resellerProfile.staff ?\n <Salesman moreLink={false} salesman={resellerProfile.staff} path={process.env.REACT_APP_API_URL}/> : null}\n </Col>\n <Col sm={5}>\n <iframe style={{border: 'none'}} src=\"https://frame.mapy.cz/s/fovakajade\" width=\"100%\" height=\"200\" frameBorder=\"0\"></iframe>\n </Col>\n </Row>\n </div>\n </div>\n </Col>\n\n <Col lg={6}>\n <div className=\"contact-box contact-box-main no-borders\">\n <h3>\n <strong>Obecné informace</strong>\n </h3>\n <Row>\n <Col lg={6}>\n <address>\n <strong>ESET software spol. s r.o.</strong><br/>\n Classic 7 Business Park<br/>\n Jankovcova 1037/49<br/>\n 170 00 Praha 7\n </address>\n </Col>\n <Col lg={6}>\n <address>\n <strong>IČ: </strong>26467593, <strong>DIČ: </strong>CZ26467593<br/>\n <br/>\n <strong>Tel:</strong> +420 233 090 233<br/>\n <strong>E-mail:</strong> <a href=\"mailto:info@eset.cz\">info@eset.cz</a>\n </address>\n </Col>\n </Row>\n </div>\n </Col>\n </Row>\n\n <Row>\n <Col lg={3}>\n <div className=\"contact-box contact-box-department\">\n <h3>\n <strong>Obchodní oddělení</strong>\n </h3>\n <address>\n <strong>Telefon:</strong> +420 222 811 135<br/>\n <strong>E-mail:</strong> <a href=\"mailto:partner@eset.cz\">partner@eset.cz</a>\n </address>\n V pracovní dny od 8:30 do 17:00\n </div>\n </Col>\n <Col lg={3}>\n <div className=\"contact-box contact-box-department\">\n <h3>\n <strong>Technické oddělení</strong>\n </h3>\n <address>\n <strong>Telefon:</strong> +420 233 090 233<br/>\n <strong>Kontaktní formulář:</strong> <a\n href=\"https://www.eset.com/cz/podpora/kontakt/\"\n rel=\"noopener noreferrer\"\n target=\"_blank\">ZDE</a>\n </address>\n V pracovní dny od 8:30 do 17:00\n </div>\n </Col>\n <Col lg={3}>\n <div className=\"contact-box contact-box-department\">\n <h3>\n <strong>Marketingové oddělení</strong>\n </h3>\n <address>\n <strong>Telefon:</strong> +420 233 090 253<br/>\n <strong>E-mail:</strong> <a href=\"mailto:marketing@eset.cz\">marketing@eset.cz</a>\n </address>\n V pracovní dny od 8:30 do 17:00\n </div>\n </Col>\n <Col lg={3}>\n <div className=\"contact-box contact-box-department\">\n <h3>\n <strong>Fakturace a finanční oddělení</strong>\n </h3>\n <address>\n <strong>Telefon:</strong> + 420 233 090 269<br/>\n <strong>E-mail:</strong> <a href=\"mailto:fakturace@eset.cz\">fakturace@eset.cz</a>\n </address>\n V pracovní dny od 8:30 do 17:00\n </div>\n </Col>\n </Row>\n\n <Row>\n <Col lg={3}>\n <div className=\"contact-box contact-box-department\">\n <h3>\n <strong>Dotazy na GDPR</strong>\n </h3>\n <address>\n <strong>E-mail:</strong> <a href=\"mailto:dpo@eset.cz\">dpo@eset.cz</a>\n </address>\n V pracovní dny od 8:30 do 17:00\n </div>\n </Col>\n </Row>\n </div>\n );\n};\n\nexport default EsetContacts;","import React, {useCallback, useEffect} from \"react\";\nimport {Box, Col, Row} from \"@fik/ui\";\nimport {useEntityAction, usePureEntity} from \"@fik/entity\";\nimport {ContactForm} from \"@fik/components\";\nimport {useSelector} from \"react-redux\";\n\nconst ContactEdit = ({id}) => {\n\n // contact to edit\n const [{entity: values}, load] = usePureEntity({name: 'contact', params: {id}});\n // save\n const [saveResult, save] = useEntityAction({name: 'contact', action: 'save', params: {id}});\n // resend login\n const [, resendLogin] = useEntityAction({name: 'contact', params: {id}, action: 'resendLogin'});\n\n //- needed for checking if edited contact is current user\n const {userId} = useSelector(state => state.auth);\n\n //- load on first render (load callback should not change)\n useEffect(() => load(), [load]);\n\n //- refresh after save\n useEffect(() => {\n if (saveResult.isSuccess) {\n load();\n }\n }, [load, saveResult.isSuccess]);\n\n const onSubmit = useCallback((values, valid) => {\n save({values});\n }, [save]);\n\n return <Row>\n <Col lg={6} sm={12}>\n <Box>\n {saveResult.isSuccess ? <div className='alert alert-info'>Uloženo</div> : null}\n {saveResult.isFailed ? <div className='alert alert-error'>Nepodařilo se uložit</div> : null}\n <ContactForm\n values={values}\n selfEdit={values && userId === values.contactId}\n onResendLoginRequested={resendLogin}\n onSubmit={onSubmit}/>\n </Box>\n </Col>\n </Row>;\n};\n\nexport default ContactEdit;","import React, {useCallback} from \"react\";\nimport {Box, Col, Row} from \"@fik/ui\";\nimport {useEntityAction} from \"@fik/entity\";\nimport {ContactForm} from \"@fik/components\";\nimport {Redirect} from \"react-router-dom\";\n\nconst EMPTY_CONTACT = {};\n\nconst ContactCreate = () => {\n\n // contact\n const values = EMPTY_CONTACT;\n\n // save\n const [{isSuccess}, save] = useEntityAction({name: 'contact', action: 'create'});\n\n const onSubmit = useCallback((values, valid) => {\n if (valid) {\n save({values});\n }\n }, [save]);\n\n if (isSuccess) {\n return <Redirect to='/profile/contacts'/>;\n }\n\n return <Row>\n <Col lg={6} md={12}>\n <Box>\n <ContactForm\n values={values}\n selfEdit={true}\n onSubmit={onSubmit}/>\n </Box>\n </Col>\n </Row>;\n};\n\nexport default ContactCreate;","import React, {useCallback} from \"react\";\nimport {useEntity, useEntityAction} from \"@fik/entity\";\nimport {Box} from \"@fik/ui\";\nimport {CertificationRequestForm} from \"@fik/components\";\n\nconst CertificationRequestResult = ({isSuccess, entity}) => {\n return isSuccess ? <div className={'alert alert-' + entity.type}>{entity.message}</div> : null;\n};\n\nconst CertificationRequest = ({contactId}) => {\n const {entity:certificationBranches} = useEntity({name: 'resellerProfile', params: {action: 'certification-branches'}});\n\n // save\n const [{isSuccess, result: certificationRequestResult}, request] = useEntityAction({name: 'resellerProfile', action: 'contactCertificationRequest'});\n\n const handleSubmit = useCallback((values) => {\n request({values});\n }, [request]);\n\n return <>\n <CertificationRequestResult isSuccess={isSuccess} entity={certificationRequestResult} />\n <Box title=\"Vyberte typ certifikace\">\n {certificationBranches ? <CertificationRequestForm\n certificationBranches={certificationBranches}\n contactId={contactId}\n onSubmit={handleSubmit}\n /> : null}\n <p style={{fontStyle: 'italic'}}>* Informace pro přihlášení Vám budou zaslány na email uvedený v profilu osoby.</p>\n <p style={{fontStyle: 'italic'}}>** Splněním certifikace ESET Endpoint Encryption či ESET Secure Authentication nevzniká automaticky nárok k přidělení kategorie ESET Security Partner.</p>\n </Box>\n </>;\n};\n\nexport default CertificationRequest;","import React, {useCallback} from \"react\";\nimport {Box, Col, Row} from \"@fik/ui\";\nimport {useEntityAction} from \"@fik/entity\";\nimport {PasswordForm} from \"@fik/components\";\nimport {useSelector} from \"react-redux\";\n\nconst Password = () => {\n const {username} = useSelector(state => state.auth);\n\n // save\n const [{isSuccess, isFailed}, resetPassword] = useEntityAction({name: 'resellerProfile', action: 'resetPassword'});\n\n const handleSubmit = useCallback((values) => {\n resetPassword({values});\n }, [resetPassword]);\n\n return <Row>\n <Col sm={12} md={4}>\n {isFailed ? <div className={'alert alert-error'}>Nepodařilo se změnit heslo!</div> : null}\n {isSuccess ? <div className={'alert alert-info'}>Heslo změněno.</div> : null}\n <Box>\n {username ? <PasswordForm\n username={username}\n onSubmit={handleSubmit}\n /> : null}\n </Box>\n </Col>\n </Row>;\n};\n\nexport default Password;","import React from \"react\";\nimport {Box, DownloadLink} from \"@fik/ui\";\n\nconst CertificationDownload = () => <Box>\n <DownloadLink resource={'reseller-certificate'} className='btn btn-primary'>Stáhnout</DownloadLink>\n</Box>;\n\nexport default CertificationDownload;","import React from \"react\";\nimport {useDataSource, useDataSourceWithQueryParams} from \"@fik/data-source\";\nimport {Box} from \"@fik/ui\";\nimport {CertificationsList} from \"@fik/components\";\n\nconst Certifications = () => {\n const {pagination, items, handlePageChange, refresh} = useDataSourceWithQueryParams(\n {name: 'resellerProfile', initialSearchParams: {}, dataSourceResource: 'certification-data-source'}\n );\n\n return (\n <Box>\n <CertificationsList\n items={items}\n pagination={pagination}\n onPageChange={handlePageChange}/>\n </Box>\n );\n};\n\nexport default Certifications;","import React from \"react\";\n\nconst LeakedInfo = ({leakedInfo}) => leakedInfo ? <div>\n <span className=\"badge badge-danger\">Zneužitá licence!</span><br/>\n <span className=\"badge badge-danger\">Běží na PC: {leakedInfo.hwf}</span>\n</div> : null;\n\nexport default LeakedInfo;","import React from 'react';\nimport {NavigationItem} from \"@fik/navigation\";\n\nconst LicenseLink = ({item, children, ...props}) => {\n return (<NavigationItem {...props}\n to=\"license:detail\"\n params={{id:item.licenseEPLI}}>{children || item.licenseUsername}</NavigationItem>);\n};\n\nexport default LicenseLink;","import React from 'react';\nimport {NavigationItem} from \"@fik/navigation\";\n\nconst LicenseOfferLink = ({item, children, ...props}) =>\n <NavigationItem {...props}\n to=\"offer:create\"\n query={{licenseEPLI: item.licenseEPLI}}>\n {children || \"Nabídnout\"}\n </NavigationItem>;\n\nexport default LicenseOfferLink;","import React from 'react';\nimport {NavigationItem} from \"@fik/navigation\";\n\nconst LicenseOrderLink = ({item, children, ...props}) =>\n <NavigationItem {...props}\n to=\"order:create\"\n query={{licenseEPLI: item.licenseEPLI}}>\n {children || \"Objednat\"}\n </NavigationItem>;\n\nexport default LicenseOrderLink;","import React, {useCallback, useEffect} from \"react\";\nimport {useEntityAction} from \"@fik/entity\";\nimport handleClick from \"@fik/utils/handleClick\";\nimport { confirmAlert } from 'react-confirm-alert'; // Import\nimport 'react-confirm-alert/src/react-confirm-alert.css'; // Import css\n\nconst LicenseResetCredentialsButton = ({id, onReset}) => {\n //- reset credentials hook\n const [{isSuccess}, resetCredentials] = useEntityAction({name: 'license', action: 'resetCredentials', params: {id}});\n\n //- resend credentials\n const handleResetCredentials = useCallback(() => {\n\n confirmAlert({\n title: \"\",\n message: \"Skutečně chcete přegenerovat licenční údaje? Dojde k nevratné změně licenčních údajů a tím i odříznutí klientů od nových aktualizací!\",\n buttons: [\n {\n label: 'Ano',\n onClick: resetCredentials\n },\n {\n label: 'Ne'\n }\n ]\n });\n\n }, [resetCredentials]);\n\n useEffect(() => {\n if (onReset && isSuccess) {\n onReset();\n }\n }, [onReset, isSuccess]);\n\n return <button className=\"btn btn-warning btn-block\" onClick={handleClick(handleResetCredentials)}>Přegenerovat licenční údaje</button>\n};\n\nexport default LicenseResetCredentialsButton;","import React, {useCallback, useEffect} from \"react\";\nimport {Form} from \"@mouseover/react-form\";\nimport {useEntityAction} from \"@fik/entity\";\n\nconst LicenseNote = ({id, resellerNote, onSave}) => {\n //- save note hook\n const [{isSuccess}, saveNote] = useEntityAction({name: 'license', params: {id}, action: 'saveResellerNote'});\n\n //- save note\n const handleNoteSave = useCallback((values, valid) => {\n if (valid) {\n saveNote({\n id,\n values\n });\n }\n }, [id, saveNote]);\n\n //- refresh after save\n useEffect(() => {\n if (onSave && isSuccess) {\n onSave();\n }\n }, [onSave, isSuccess]);\n\n return <Form className='form'\n onSubmit={handleNoteSave}\n values={{resellerNote}}\n controls={{\n resellerNote: {\n elementType: 'textarea',\n elementConfig: {\n rows: 8\n },\n validation: {\n required: false,\n }\n }\n }}\n >\n <button\n type=\"submit\"\n className=\"btn btn-primary\"\n >Uložit</button>\n </Form>;\n};\n\nexport default LicenseNote;","import React, {useCallback} from 'react';\nimport {Table, useRowDetail, ToggleRowDetailButton} from \"@fik/table\";\nimport {Channel, ChannelName} from \"@fik/components\";\nimport {Date} from \"@fik/ui\";\nimport LicenseOrderLink from \"./LicenseOrderLink\";\nimport LicenseOfferLink from \"./LicenseOfferLink\";\nimport LicenseLink from \"./LicenseLink\";\nimport LicenseNote from \"./Detail/LicenseNote\";\nimport LeakedInfo from \"./LeakedInfo\";\nimport {Icon, NavigationItem} from \"@fik/navigation\";\n\nconst filterChannel = (item, type) => item.licenseChannels.filter((item) => item.type === type).pop();\n\nconst LicensesTable = ({rows, onInvalidate, epcVisible = false, partnerVisible = true, children}) => {\n const {toggleRow, isVisibleRow} = useRowDetail();\n const handleNoteSave = useCallback((primaryValue) => {\n if (onInvalidate) {\n onInvalidate();\n toggleRow(primaryValue);\n }\n }, [onInvalidate, toggleRow]);\n\n return <Table striped responsive\n rows={rows}\n renderCellProps={{toggleRow, isVisibleRow}}\n renderRowMessages={({row: license, primaryValue, columnsLength}) => (isVisibleRow(primaryValue) ?\n <tr>\n <td colSpan={columnsLength} className=\"no-borders\">\n <LicenseNote onSave={() => handleNoteSave(primaryValue)} resellerNote={license.resellerNote}\n id={license.licenseId}/>\n </td>\n </tr> : null)}\n primary='licenseId'>\n\n {children ? children : <>\n <LicenseIdWithNoteColumn title='ID' headerClassName='col-md-1' />\n <LicenseCustomerInfo title='Klient' headerClassName='col-md-3' />\n {partnerVisible !== false && <LicensePartner title='Partner' />}\n {epcVisible && <LicenseEPC title='EPC' />}\n <LicenseProduct title='Produkt' />\n <LicenseDate title='Platnost od/do' />\n <LicenseStatus title='Stav' />\n <LicenseOrder />\n <LicenseDownload title='' headerClassName='col-md-2' />\n </>}\n\n </Table>;\n};\n\n\nexport default LicensesTable;\n\nexport const LicenseIdColumn = ({row: item}) => (<>\n <LicenseLink item={item}>\n {item.licenseMainId ? (<div className=\"text-bold\">{item.licenseMainId}</div>) : null}\n </LicenseLink>\n {item.leakedInfo ? <LeakedInfo leakedInfo={item.leakedInfo}/> : null}\n</>);\n\nexport const LicenseIdWithNoteColumn = ({row: item, primaryValue, isVisibleRow, toggleRow}) => (<>\n <ToggleRowDetailButton\n isVisibleRow={isVisibleRow}\n primaryValue={primaryValue}\n toggleRow={toggleRow}\n openIcon=\"fa-list-alt\"\n closeIcon=\"fa-list-alt\"\n title={item.resellerNote}\n className={\"btn btn-xs pull-right \" + (item.resellerNote ? 'btn-success' : 'btn-default')}>\n </ToggleRowDetailButton>\n <LicenseIdColumn row={item} />\n</>);\n\nexport const LicenseCustomerInfo = ({row: item}) => (\n <>\n {item.licensePrimaryName ? (<div className=\"text-bold\">{item.licensePrimaryName}</div>) : null}\n {item.licenseEmail ? (\n <div className=\"icon-nowrap-block\"><i className=\"fa fa-envelope\"/> {item.licenseEmail}</div>) : null}\n </>\n);\n\nexport const LicenseOwner = ({row}) => {\n const channel = filterChannel(row, 'owner');\n return <>\n <ChannelName name={row.licensePrimaryName} addressBookId={channel ? channel.addressBookId : null} />\n {row.licenseEmail ? <div className='description'>\n <Icon icon='fa fa-envelope' /> {row.licenseEmail}\n </div> : null}\n </>;\n};\n\nexport const LicensePartner = ({row}) => <LicenseChannel row={row} channelName='partner'/>;\n\nexport const LicenseEPC = ({row}) => <LicenseChannel row={row} channelName='epc'/>;\n\nconst LicenseChannel = ({row, channelName}) => {\n const channel = filterChannel(row, channelName);\n return (channel ? <Channel {...channel} /> : null);\n}\n\nexport const LicenseProduct = ({row: item}) => (\n <>\n <div>{item.licenseProductName}</div>\n <div className=\"description\">\n {item.licensePackProductName ? (<strong>{item.licensePackProductName}, </strong>) : null}\n {item.licenseTypeName ? (<span>{item.licenseTypeName}, </span>) : null}\n {item.licenseBusinessType ? (<span>{item.licenseBusinessType.name}</span>) : null}\n {item.licenseQuantity ? (\n <> množství: <strong>{item.licenseQuantity}</strong></>) : null}\n </div>\n </>\n);\n\nexport const LicenseDate = ({row: item}) => (<>\n <div><Date date={item.licenseDate}/></div>\n <div><Date date={item.licenseExpiration}/></div>\n </>\n);\n\nexport const LicenseStatus = ({row: item}) => (\n <span className={'label label-default label-' + item.licenseBusinessStatusLabelStyle}\n >{item.licenseBusinessStatus}</span>\n);\n\nexport const LicenseOrder = ({row: item}) => {\n let orderInfo = null;\n if (item.licenseOrder) {\n let orderClass;\n switch (item.licenseOrder.status) {\n case 'stavDoklObch.pripraveno':\n orderClass = 'label-info';\n break;\n case 'stavDoklObch.schvaleno':\n orderClass = 'label-warning';\n break;\n case 'stavDoklObch.hotovo':\n orderClass = 'label-success';\n break;\n case 'stavDoklObch.storno':\n orderClass = 'label-danger';\n break;\n default:\n orderClass = 'label-default';\n break;\n }\n orderInfo = (\n <span className={'label ' + orderClass}>{item.licenseOrder.status}</span>\n );\n }\n return (\n <>\n {item.licenseOrderId ? (<NavigationItem to=\"order:detail\"\n params={{id: item.licenseOrderId}}>{item.licenseOrderId.substr(5)}</NavigationItem>) : null}\n {orderInfo}\n </>\n );\n};\n\nexport const LicenseDownload = ({row: item, primaryValue}) => {\n if (item.licenseStatusId !== 1) {\n return null;\n }\n return (\n <>\n <LicenseLink\n item={item}\n className=\"btn btn-default btn-sm m-r-sm\">\n Zobrazit\n </LicenseLink>\n <LicenseOrderLink className=\"btn btn-success btn-sm m-r-sm\" item={item}/>\n <LicenseOfferLink className=\"btn btn-warning btn-sm\" item={item}/>\n </>\n )\n};","import React, {useMemo} from 'react';\nimport {FilterBar} from \"@fik/ui\";\n\nconst LicensesFilter = ({types, onSubmitSearch, statuses, queryParams}) => {\n const typesList = types ? types.map(item => ({value: item.id, label: item.name})) : [];\n const statusesList = statuses ? [{value: '', label: 'Vše'}, ...statuses.map(item => ({value: item.id, label: item.name}))] : [];\n const {query} = queryParams;\n\n const controls = useMemo(() => {\n const c = {\n fulltext: {\n elementType: 'input',\n elementConfig: {\n type: 'text',\n placeholder: 'Zadejte ID licence, jméno zákazníka, ...',\n },\n value: '',\n valid: false,\n touched: false,\n validation: {\n minLength: 3,\n }\n },\n type: {\n elementType: 'select',\n options: typesList,\n value: '',\n valid: true,\n touched: false,\n }\n };\n\n if (query === 'expired') {\n c.ago = {\n elementType: 'select',\n options: [\n {value: 'all', label: 'všechny'},\n {value: 'year', label: 'expirovaly přibližně 1 rok dozadu'},\n {value: 'two_years', label: 'expirovaly přibližně 2 roky dozadu'},\n {value: 'three_years', label: 'expirovaly přibližně 3 roky dozadu'},\n ],\n value: '',\n valid: true,\n touched: false,\n };\n } else {\n c.status = {\n elementType: 'select',\n options: statusesList,\n value: '',\n valid: true,\n touched: false,\n };\n }\n\n return c;\n }, [query, typesList, statusesList]);\n\n return (\n <FilterBar onSubmitSearch={onSubmitSearch}\n values={queryParams}\n controls={controls}\n />\n );\n};\n\nexport default LicensesFilter;","import React, {useCallback, useEffect, useMemo} from 'react';\nimport LicensesTable from './LicensesTable';\nimport {Paginator} from \"@fik/ui\";\nimport {Box} from \"@fik/ui\";\nimport LicensesFilter from \"./LicensesFilter\";\nimport {useDials} from \"@fik/dials\";\nimport {useDataSourceWithQueryParams} from \"@fik/data-source\";\n\nconst DEFAULT_PARAMS = {\n fulltext: null,\n type: \"0\",\n ago: null,\n status: null\n};\n\nconst Licenses = ({partnerVisible, query}) => {\n const {statuses, types} = useDials({name: 'license'});\n\n const {pagination, items, setSearchParams, handlePageChange, queryParams, refresh, handleSearch} = useDataSourceWithQueryParams(\n {\n name: 'license',\n initialSearchParams: useMemo(() => ({query}), [query]),\n defaultParams: DEFAULT_PARAMS\n }\n );\n\n return (\n <Box>\n <LicensesFilter onSubmitSearch={handleSearch}\n statuses={statuses}\n types={types}\n queryParams={queryParams}\n />\n\n <LicensesTable striped responsive\n onInvalidate={refresh}\n partnerVisible={partnerVisible}\n rows={items}\n />\n\n <Paginator {...pagination}\n onPageChange={handlePageChange}/>\n </Box>\n );\n};\n\nexport default Licenses;","import React from \"react\";\nimport {NavigationItem} from \"@fik/navigation\";\nimport {WithoutCode} from \"@fik/ui\";\n\nconst LicenseIdentification = ({license}) => {\n if (!license) {\n return null;\n }\n\n const {\n licenseMainId,\n licenseKey,\n licenseUsername,\n licensePassword,\n licenseOrderId,\n licenseProductKey,\n licenseProxyId,\n licenseDeslockProductId\n } = license;\n\n return <table className=\"table\">\n <thead>\n <tr>\n <td>ID licence</td>\n <td>{licenseMainId}</td>\n </tr>\n {licenseDeslockProductId ? <DeslockLicense {...license}/> : <NormalLicense {...license} />}\n </thead>\n <tbody>\n {licenseOrderId\n ? <tr>\n <td>Objednávka</td>\n <td>\n <NavigationItem to=\"order:detail\" params={{id: licenseOrderId}}>\n <WithoutCode>{licenseOrderId}</WithoutCode>\n </NavigationItem>\n </td>\n </tr>\n : null}\n </tbody>\n </table>;\n};\n\nexport default LicenseIdentification;\n\nconst NormalLicense = ({licenseKey, licenseProductKey, licenseProxyId, licenseUsername, licensePassword}) => <>\n {licenseKey ? <tr>\n <td>Licenční klíč</td>\n <td>{licenseKey}</td>\n </tr> : null}\n {licenseProductKey ? <tr>\n <td>Product Key</td>\n <td>{licenseProductKey}</td>\n </tr> : null}\n {licenseProxyId ? <tr>\n <td>Proxy ID</td>\n <td>{licenseProxyId}</td>\n </tr> : null}\n <tr>\n <td><i>Uživatelské jméno</i></td>\n <td><i>{licenseUsername}</i></td>\n </tr>\n <tr>\n <td><i>Heslo</i></td>\n <td><i>{licensePassword}</i></td>\n </tr>\n</>;\n\nconst DeslockLicense = ({licenseDeslockProductId, licenseDeslockProductKey}) => <>\n {licenseDeslockProductId ? <tr>\n <td>Product ID</td>\n <td>{licenseDeslockProductId}</td>\n </tr> : null}\n {licenseDeslockProductKey ? <tr>\n <td>Product Key </td>\n <td>{licenseDeslockProductKey}</td>\n </tr> : null}\n</>;","import React, {useCallback} from \"react\";\nimport {Form} from \"@mouseover/react-form\";\nimport {useEntityAction} from \"@fik/entity\";\n\nconst LicenseInfoSend = ({id, email}) => {\n\n //- resend credentials hook\n const [{isSuccess, isFailed, result: sendedToEmail}, resendCredentials] = useEntityAction({name: 'license', action: 'resendLicenseEmail', params: {id}});\n\n //- resend credentials\n const handleResendCredentials = useCallback((values, valid) => {\n if (valid) {\n resendCredentials({\n id,\n values\n });\n }\n }, [id, resendCredentials]);\n\n\n if (!id) {\n return null;\n }\n\n return <>\n {isSuccess ? <div className='alert alert-info'>Odesláno na {sendedToEmail}</div> : null}\n {isFailed ? <div className='alert alert-error'>Nepodařilo se odeslat</div> : null}\n <Form className='form'\n onSubmit={handleResendCredentials}\n values={{email}}\n controls={{\n email: {\n elementType: 'input',\n validation: {\n required: true,\n },\n renderAppend: () => <span className='input-group-btn'>\n <button\n type=\"submit\"\n className=\"btn btn-primary\"\n >Odeslat\n </button>\n </span>\n }\n }}\n >\n </Form>\n </>;\n};\n\nexport default LicenseInfoSend;","import React from \"react\";\nimport {Date} from \"@fik/ui\";\n\nconst LicenseSolution = ({license}) => {\n if (!license) {\n return null;\n }\n\n const {\n licenseBusinessStatus,\n licenseBusinessStatusLabelStyle,\n licenseTypeName,\n licenseProductName,\n licenseQuantity,\n licenseDate,\n licenseExpiration,\n licensePackProductName,\n licensePackQuantity\n } = license;\n\n return <table className=\"table\">\n <thead>\n <tr>\n <td>Stav</td>\n <td><span className={`label label-default label-${licenseBusinessStatusLabelStyle}`}>{licenseBusinessStatus}</span>\n </td>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Typ</td>\n <td>{licenseTypeName}</td>\n </tr>\n <tr>\n <td>Produkt</td>\n <td>{licenseProductName}</td>\n </tr>\n <tr>\n <td>Počet</td>\n <td>{licenseQuantity}</td>\n </tr>\n <tr>\n <td>Od</td>\n <td><Date date={licenseDate}/></td>\n </tr>\n <tr>\n <td>Do (expirace)</td>\n <td><Date date={licenseExpiration}/></td>\n </tr>\n {licensePackProductName\n ? <tr>\n <td>Název bundlu</td>\n <td>{licensePackProductName}</td>\n </tr> : null}\n {licensePackQuantity\n ? <tr>\n <td>Velikost bundlu</td>\n <td>{licensePackQuantity}</td>\n </tr> : null}\n </tbody>\n </table>;\n\n};\n\nexport default LicenseSolution;","import React from \"react\";\n\nconst LicenseUser = ({license}) => {\n if (!license) {\n return null;\n }\n\n const {licensePrimaryName, licenseEmail, licensePhone} = license;\n\n return <table className=\"table\">\n <thead>\n <tr>\n <td>Subjekt</td>\n <td>{licensePrimaryName}</td>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>E-mail</td>\n <td>{licenseEmail}</td>\n </tr>\n <tr>\n <td>Telefon</td>\n <td>{licensePhone}</td>\n </tr>\n </tbody>\n </table>;\n};\n\nexport default LicenseUser;","import {Licenses} from \"@fik/license\";\nimport React from \"react\";\nimport useIsEpc from \"../../useIsEpc\";\n\nconst ResellerLicenses = ({query}) => <Licenses query={query} partnerVisible={useIsEpc()}/>;\n\nexport default ResellerLicenses;","import React from \"react\";\nimport ResellerLicenses from \"./ResellerLicenses\";\nconst EXPIRING = 'expiring';\n\nconst ExpiringLicenses = () => <ResellerLicenses query={EXPIRING}/>;\n\nexport default ExpiringLicenses;","import React from \"react\";\nimport ResellerLicenses from \"./ResellerLicenses\";\n\nconst LeakedLicenses = () => <ResellerLicenses query='leaked'/>;\n\nexport default LeakedLicenses;","import React from \"react\";\nimport NfrCreditInfo from \"../../components/NfrOrder/NfrCreditInfo\";\nimport LicensesTable, {\n LicenseDate,\n LicenseEPC,\n LicenseIdWithNoteColumn, LicenseOrder,\n LicenseCustomerInfo,\n LicensePartner,\n LicenseProduct, LicenseStatus\n} from \"@fik/license/LicensesTable\";\nimport {Box, Paginator} from \"@fik/ui\";\nimport {useDataSource, useDataSourceWithQueryParams} from \"@fik/data-source\";\nimport useIsEpc from \"../../useIsEpc\";\n\nconst LicenseNfrSpend = ({row}) => row.nfrPrice;\n\nconst ResellerNfrLicenses = ({epcVisible = false}) => {\n const {pagination, items, handlePageChange, refresh} = useDataSourceWithQueryParams(\n {name: 'license', initialSearchParams: {query: 'nfr'}}\n );\n\n return <>\n <NfrCreditInfo/>\n <Box>\n <LicensesTable striped responsive\n onInvalidate={refresh}\n rows={items}\n >\n <LicenseIdWithNoteColumn title='ID' />\n <LicenseCustomerInfo title='Klient' />\n {useIsEpc() && <LicensePartner title='Partner' />}\n {epcVisible ? <LicenseEPC title='EPC' /> : null}\n <LicenseProduct title='Produkt' />\n <LicenseDate title='Platnost od/do' />\n <LicenseStatus title='Stav' />\n <LicenseNfrSpend title='Odčerpáno z NFR kreditu' />\n </LicensesTable>\n\n <Paginator {...pagination}\n onPageChange={handlePageChange}/>\n </Box>\n </>;\n};\n\nexport default ResellerNfrLicenses;\n","import React from \"react\";\nimport ResellerLicenses from \"./ResellerLicenses\";\n\nconst NewestLicenses = () => <ResellerLicenses query={null}/>;\n\nexport default NewestLicenses;\n","import React, {useEffect} from \"react\";\nimport {\n LicenseSolution,\n LicenseIdentification,\n LicenseUser,\n LicenseNote,\n LicenseOrderLink,\n LicenseOfferLink,\n LicenseInfoSend,\n LicenseResetCredentialsButton\n} from \"@fik/license\";\nimport {Box, Col, Row} from \"@fik/ui\";\nimport {usePureEntity} from \"@fik/entity\";\n\nconst License = ({id}) => {\n const [{license}, load] = usePureEntity({name: 'license', params: {action: 'by-epli'}});\n\n //- load on first render (load callback should not change)\n useEffect(() => load({id}), [load, id]);\n\n return license ? <Row>\n <Col sm={12} md={4}>\n <Box title=\"Identifikační údaje\">\n <LicenseIdentification license={license}/>\n {license.resellerResetAllowed && license.leakedInfo ?\n <LicenseResetCredentialsButton id={license.licenseId} onReset={load}/> : null}\n </Box>\n <Box title=\"Znovu zaslat informace o licenci e-mailem\">\n <LicenseInfoSend id={license.licenseEPLI} email={license.licenseEmail}/>\n </Box>\n </Col>\n <Col sm={12} md={4}>\n <Box title=\"Řešení\">\n <LicenseSolution license={license}/>\n <LicenseOrderLink className=\"btn btn-success btn-sm m-r-sm\" item={license}/>\n <LicenseOfferLink className=\"btn btn-warning btn-sm\" item={license}/>\n </Box>\n </Col>\n <Col sm={12} md={4}>\n <Box title=\"Vlastník\">\n <LicenseUser license={license}/>\n </Box>\n <Box title=\"Poznámka\">\n <LicenseNote id={license.licenseId} resellerNote={license.resellerNote} onSave={load}/>\n </Box>\n </Col>\n </Row> : null;\n};\n\nexport default License;","import {useSelector} from \"react-redux\";\n\nconst useIsAuthenticated = () => useSelector(state => state.auth.token !== null);\n\nexport default useIsAuthenticated;","import {useSelector} from \"react-redux\";\n\nconst useIsAuthInitialized = () => useSelector(state => state.auth.initialized);\n\nexport default useIsAuthInitialized;","import React, {useCallback} from 'react';\nimport Box from \"@fik/ui/Box/Box\";\nimport {TextArea} from \"@fik/form\";\nimport {Form} from \"@mouseover/react-form\";\nimport {useEntityAction} from \"@fik/entity\";\nimport {Col, Row} from \"@fik/ui\";\n\nconst Consignment = () => {\n const [{result}, save] = useEntityAction({name: 'resellerProfile', action: 'consignment'});\n const handleSubmit = useCallback((values) => {\n save(values);\n }, [save]);\n\n return <Row>\n <Col sm={12} md={6}>\n <Box title='Komisní prodej'>\n <Form\n onSubmit={handleSubmit}\n render={(form =>\n <TextArea form={form}\n name='serialNumbers'\n label='Vložte sériová čísla krabic, které byly prodány zákazníkům'\n elementConfig={{\n cols: 10,\n rows: 10\n }}\n />\n )}>\n <button type='submit' className='btn btn-primary block m-b'>Uložit</button>\n </Form>\n </Box>\n </Col>\n {result\n ? <Col sm={12} md={6}>\n <Box title='Výsledek'>\n <div className=\"table-responsive\">\n <table className=\"table\" id=\"test_u7z5f\">\n <thead>\n <tr>\n <th>#</th>\n <th>Sériové číslo</th>\n <th>Stav</th>\n </tr>\n </thead>\n <tbody id=\"test_l2w5k\">\n {result.map(({sn, status}, index) => (<tr key={index}>\n <td>{index+1}</td>\n <td>{sn}</td>\n <td>{status}</td>\n </tr>))}\n </tbody>\n </table>\n </div>\n </Box>\n </Col>\n : null}\n </Row>;\n};\n\nexport default Consignment;","import React, {useCallback} from 'react';\nimport handleClick from \"@fik/utils/handleClick\";\n\nconst Category = ({category, label, onSelectCategory, selected, sublabel}) => {\n\n const handleCategoryClick = useCallback(() => onSelectCategory(category), [category, onSelectCategory]);\n\n return <li className={\"list-group-item padding-l-sm\" + (selected === category ? ' active' : '')}>\n <a aria-expanded=\"true\" href={'#' + category} onClick={handleClick(handleCategoryClick)}>{label}{sublabel ? <small><br /> {sublabel}</small> : null}</a>\n </li>;\n\n};\n\nexport default Category;","import React from 'react';\nimport Category from \"../Library/Category\";\n\nconst Categories = ({categories, selected, onSelectCategory}) => {\n return <ul className=\"list-group elements-list\">{categories.map((category) =>\n <Category\n category={category.key}\n selected={selected}\n onSelectCategory={onSelectCategory}\n key={category.key} {...category}\n />)}\n </ul>;\n};\n\nexport default Categories;","import React from 'react';\nimport {Box} from \"@fik/ui\";\n\nconst GridItemYouTube = ({label, date, description, youtube}) => {\n\n return <Box contentClassName=\"product-box product-youtube\">\n <div className=\"youtube\">\n <img alt={label} src={\"https://img.youtube.com/vi/\"+ youtube +\"/sddefault.jpg\"} />\n <div className=\"play-button\" />\n </div>\n <div className=\"product-desc\">\n <div className=\"product-name\">{label}</div>\n <div className=\"small m-t-xs\">\n {description}\n </div>\n <small className=\"text-muted\">{date}</small>\n </div>\n </Box>;\n\n};\n\nexport default GridItemYouTube;","import React from 'react';\n\nconst GridItemCourse = ({label, date, description, link}) => {\n return <div className=\"ibox\">\n <div className=\"ibox-content product-box product-course\">\n <div className=\"product-desc\">\n <small className=\"text-muted\">{date}</small>\n <a href={link} target=\"_blank\" rel=\"noopener noreferrer\" className=\"product-name\"> {label}</a>\n <div className=\"small m-t-xs\">\n {description}\n </div>\n {/*<div className=\"m-t text-righ\">*/}\n\n {/* <a href=\"#\" className=\"btn btn-xs btn-outline btn-primary\">Info <i className=\"fa fa-long-arrow-right\"></i> </a>*/}\n {/*</div>*/}\n </div>\n </div>\n </div>;\n};\n\nexport default GridItemCourse;","import React from 'react';\nimport GridItemYouTube from \"../Library/GridItemYouTube\";\nimport GridItemCourse from \"../Library/GridItemCourse\";\n\nconst blockFactory = {\n youtube: (item) => <GridItemYouTube {...item} />,\n course: (item) => <GridItemCourse {...item} />\n};\n\n\nconst GridItem = (item) => {\n return blockFactory[item.type](item);\n};\n\nexport default GridItem;","import React from 'react';\nimport handleClick from \"@fik/utils/handleClick\";\nimport GridItem from \"../Library/GridItem\";\nimport {Col, Row} from \"@fik/ui\";\n\nconst Grid = ({items, onSelectItem, colsNumber = 2}) => {\n\n return <Row>{\n items.map((item, index) => {\n const attrs = {};\n if (!item.link) {\n attrs.onClick = handleClick(() => onSelectItem(item))\n }\n return <Col key={\"grid-item-\" + index} className={\"col-lg-\" + (12 / colsNumber)} {...attrs}>\n <GridItem {...item} />\n </Col>\n }\n )}\n </Row>;\n};\n\nexport default Grid;","import React from 'react';\n\nconst Header = ({category}) => {\n if (category) {\n return <h3>{category.label}{category.sublabel ? <><br/>\n <small>{category.sublabel}</small>\n </> : null}</h3>;\n }\n return null;\n\n};\n\nexport default Header;","import React from 'react';\nimport YouTube from \"react-youtube\";\n\nconst opts = {\n position: \"absolute\",\n top: 0,\n left: 0,\n width: \"100%\",\n height: \"100%\",\n playerVars: { // https://developers.google.com/youtube/player_parameters\n autoplay: 1,\n enablejsapi: '1'\n }\n};\n\nconst YouTubeDetail = (item) => {\n const {label, date, description, youtube} = item;\n return <div className=\"m-b-md\">\n <YouTube\n containerClassName=\"youtube-detail\"\n videoId={youtube}\n opts={opts}\n />\n <h4>{label}</h4>\n <p><em>{date}</em> | {description}</p>\n <hr />\n </div>;\n};\nexport default YouTubeDetail;","import React from 'react';\nimport YouTubeDetail from \"../Library/YouTubeDetail\";\n\nconst detailFactory = {\n youtube: (item) => <YouTubeDetail {...item} />\n};\n\n\n\nconst Detail = ({item}) => {\n return detailFactory[item.type](item);\n};\n\nexport default Detail;","import React, {useState, useCallback} from 'react';\nimport Categories from \"../Library/Categories\";\nimport {Box, Col, Row} from \"@fik/ui\";\nimport Grid from \"../Library/Grid\";\nimport Header from \"../Library/Header\";\nimport Detail from \"../Library/Detail\";\n\nconst Library = ({categories, items, defaultCategory, colsNumber = 2}) => {\n const [selectedCategory, setSelectedCategory] = useState(defaultCategory);\n const [selectedItem, setSelectedItem] = useState(null);\n\n const handleSelectCategory = useCallback((categoryKey) => {\n setSelectedCategory(categoryKey);\n setSelectedItem(null);\n }, [setSelectedItem, setSelectedCategory]);\n\n const handleSelectItem = useCallback((item) => {\n setSelectedItem(item);\n window.scrollTo(0, 0);\n }, [setSelectedItem]);\n\n return <Box>\n <Row>\n <Col sm={12} md={3} className=\"no-padding m-l-n-xs m-t-n-xs\">\n <Categories categories={categories} selected={selectedCategory} onSelectCategory={handleSelectCategory}/>\n </Col>\n <Col sm={12} md={9}>\n <div>\n <Header category={selectedCategory ? categories.find((category) => category.key === selectedCategory) : null}/>\n {selectedItem ? <Detail item={selectedItem} items={items}/> : null}\n </div>\n\n <Grid\n colsNumber={colsNumber}\n onSelectItem={handleSelectItem}\n category={selectedCategory}\n items={items.filter((item) => (item.category === selectedCategory))}\n />\n </Col>\n </Row>\n </Box>;\n};\n\nexport default Library;","import React from 'react';\nimport {Col, Row} from \"@fik/ui\";\n\nconst FaqQuestion = ({question, ...props}) => {\n return <Row>\n <Col md={12}>\n <a data-toggle=\"collapse\" className=\"faq-question\" {...props}>{question}</a>\n </Col>\n </Row>;\n};\n\nexport default FaqQuestion;","import React from 'react';\nimport {isObject} from \"@mouseover/js-utils\";\nimport {Col, Row} from \"@fik/ui\";\n\nconst FaqAnswer = ({answer, isOpen}) => {\n return <Row>\n <Col lg={12}>\n <div className={\"panel-collapse collapse\" + (isOpen ? \" in\" : \"\")}>\n {isObject(answer) && answer.html\n ? <div className=\"faq-answer\" dangerouslySetInnerHTML={{__html: answer.html}}/>\n : <div className=\"faq-answer\">{answer}</div>\n }\n </div>\n </Col>\n </Row>;\n};\n\nexport default FaqAnswer;","import React, {useState, useCallback} from 'react';\nimport FaqQuestion from \"./FaqQuestion\";\nimport FaqAnswer from \"./FaqAnswer\";\n\nconst FaqItem = ({question, answer}) => {\n const [isOpen, setIsOpen] = useState(false);\n const toggle = useCallback(() => {\n setIsOpen(!isOpen);\n }, [isOpen, setIsOpen]);\n\n return <div className=\"faq-item\">\n <FaqQuestion question={question} onClick={toggle}/>\n <FaqAnswer answer={answer} isOpen={isOpen}/>\n </div>\n};\n\nexport default FaqItem;","import React from 'react';\nimport FaqItem from \"./FaqItem\";\n\nconst Faqs = ({items}) => {\n return items.map((item, index) => <FaqItem key={\"faq-item-\"+index} {...item}/>)\n};\n\nexport default Faqs;","import React from 'react';\nimport Library from \"./Library/Library\";\nimport Faqs from \"./Faqs/Faqs\";\n\nconst DatePage = ({type, ...props}) => {\n\n switch (type) {\n case 'library':\n return <Library {...props} />;\n case 'faqs':\n return <Faqs {...props} />;\n default:\n return null;\n }\n\n};\n\nexport default DatePage;","import React from 'react';\nimport ContactEdit from \"./ContactEdit\";\nimport {useSelector} from \"react-redux\";\n\nconst SelfContact = () => {\n const {userId} = useSelector(state => state.auth);\n return userId ? <ContactEdit id={userId}/> : null;\n};\n\nexport default SelfContact;","import React from 'react';\nimport {useDataSource, useDataSourceWithQueryParams} from \"@fik/data-source\";\nimport {Box, DateTime, Paginator} from \"@fik/ui\";\nimport {Table} from \"@fik/table\";\n\nconst ProcessedCourses = () => {\n const {pagination, items, handlePageChange, refresh} = useDataSourceWithQueryParams(\n {name: 'processedCourse', initialSearchParams: {}}\n );\n\n return <Box>\n <Table striped responsive\n rows={items}\n primary='id'>\n <LessonName header='Kurz'/>\n <Contact header='Osoba'/>\n <CreatedDate header='Datum spuštění'/>\n <ModifiedDate header='Datum ukončení'/>\n <LessonStatus header='Status'/>\n </Table>\n <Paginator {...pagination}\n onPageChange={handlePageChange}/>\n </Box>;\n};\n\n\nexport default ProcessedCourses;\n\nconst LessonName = ({lessonName}) => lessonName;\nconst Contact = ({contact}) => contact ? <>{contact.contactFirstname} {contact.contactSurname}</> : null;\nconst CreatedDate = ({created}) => <DateTime date={created}/>;\nconst ModifiedDate = ({modified}) => <DateTime date={modified}/>;\nconst LessonStatus = ({lessonStatus}) => lessonStatus;","import React, {useCallback, useEffect} from \"react\";\nimport useAuth from \"@fik/auth/useAuth\";\nimport {Redirect} from \"react-router-dom\";\n\nconst AuthToken = ({token}) => {\n const {authenticate, isAuthenticated, redirectPath, error, loading} = useAuth();\n\n useEffect(() => {\n authenticate({access_token: token})\n }, [token,authenticate]);\n\n if (isAuthenticated) {\n return <Redirect to={redirectPath} />;\n }\n\n return null;\n};\n\nexport default AuthToken;\n\n","import React from \"react\";\nimport {NavigationItem} from \"@fik/navigation\";\n\nconst LeakedLicensesInfo = () => <p className='m-t-md'>\n <i className=\"fa fa-info-circle\"></i> Níže uvedený výpis obsahuje licence, které jsou pravděpodobně zneužity. Hodnota \"Běží na PC: xx\"\n uvádí, na kolika stanicích se licence používá, vůči původnímu zakoupenému počtu. Výpis zneužitých licencí je aktualizován jednou týdně\n (stanice, které během 14 dnů nestáhnou aktualizaci, nejsou v seznamu zahrnuty). Na detailu licence je možné přístupové údaje\n přegenerovat. <NavigationItem to=\"page\" params={{category: 'partnerstvi', page: 'zneuzite-licence'}}>Více informací</NavigationItem>.<br/>\n</p>;\n\nexport default LeakedLicensesInfo;","import React from \"react\";\nimport {NavigationItem} from \"@fik/navigation\";\n\nconst ExpiringLicensesInfo = () => <p className='m-t-md'>\n <i className=\"fa fa-info-circle\"/> Níže uvedený výpis obsahuje licence, které již expirovaly a nebo budou expirovat v následujících\n dnech a dosud nebyly prodlouženy. Výpis licencí je omezen v rozsahu -30 až +30 dní od data expirace. Bližší informace o celém expiračním\n procesu naleznete <NavigationItem to=\"page\" params={{category: 'partnerstvi', page: 'exspiracni-proces'}}>zde</NavigationItem>.<br/>\n <i className=\"fa fa-info-circle\"/> Kliknutím na tlačítko <button type=\"button\" className=\"btn btn-xs btn-default\"><span\n className=\"glyphicon glyphicon-list-alt\"/></button> si můžete k licenci zapsat libovolnou poznámku. Pro zobrazení poznámky stačí\n najet myší na zelenou podobu tlačítka: <button type=\"button\" className=\"btn btn-xs btn-success\"><span\n className=\"glyphicon glyphicon-list-alt\"/></button>\n</p>;\n\nexport default ExpiringLicensesInfo;","import React from \"react\";\n\nconst NewestLicensesInfo = () => <p className='m-t-md'>\n <i className=\"fa fa-info-circle\"/> Kliknutím na tlačítko <button type=\"button\" className=\"btn btn-xs btn-default\"><span\n className=\"glyphicon glyphicon-list-alt\"/></button> si můžete k licenci zapsat libovolnou poznámku. Pro zobrazení poznámky stačí\n najet myší na zelenou podobu tlačítka: <button type=\"button\" className=\"btn btn-xs btn-success\"><span\n className=\"glyphicon glyphicon-list-alt\"/></button>\n</p>;\n\nexport default NewestLicensesInfo;","import React from \"react\";\nimport ResellerLicenses from \"./ResellerLicenses\";\nconst EXPIRED = 'expired';\n\nconst ExpiredLicenses = () => <ResellerLicenses query={EXPIRED}/>;\n\nexport default ExpiredLicenses;","import React, {useCallback, useMemo} from \"react\";\nimport {CmsNavigationContext} from \"@fik/cms\";\nimport {useSelector} from \"react-redux\";\nimport {useNavigate} from \"@fik/page\";\nimport {parseUrl, stringify} from \"query-string\";\n\nconst CmsNavigationProvider = (props) => {\n const token = useSelector((state) => state.auth.token, []);\n const navigate = useNavigate();\n const handleNavigationClick = useCallback((event) => {\n let href = event.target.getAttribute('href');\n if (href && !href.startsWith('http')){// && !href.startsWith('/files')) {\n event.preventDefault();\n\n if (href.startsWith('/lms') || href.startsWith('/files')) {\n const url = parseUrl(href);\n url.query.token = token;\n window.open(url.url + '?' + stringify(url.query), '_blank');\n } else {\n navigate(href);\n }\n }\n }, [token]);\n const cms = useMemo(() => ({onNavigationClick: handleNavigationClick}), [token]);\n return <CmsNavigationContext.Provider value={cms} {...props} />\n}\n\nexport default CmsNavigationProvider;","import React, {useMemo} from \"react\";\nimport {FileManagerContext} from \"@fik/file-manager\";\nimport {useSelector} from \"react-redux\";\n\nconst FileManagerProvider = (props) => {\n const token = useSelector((state) => state.auth.token, []);\n const model = useMemo(() => ({\n createPath: (path) => `/files/download/${path}?token=${token}`\n })\n , [token]);\n return <FileManagerContext.Provider value={model} {...props} />\n}\n\nexport default FileManagerProvider;","import React from \"react\";\nimport {NavigationItem} from \"@fik/navigation\";\nconst ExpiredLicensesInfo = () => <p className='m-t-md'>\n <i className=\"fa fa-info-circle\"/> Tento výpis obsahuje licence, které expirovaly před více než 30 dny a nedošlo k jejich prodloužení. Výpis lze filtrovat i na licence, které expirovaly přibližně před rokem, 2 roky či 3 roky.<br />\n Lze tak teoreticky oslovit bývalé zákazníky, u nichž lze očekávat, že jim bude expirovat konkurenční produkt.<br />\n <i className=\"fa fa-info-circle\"/> Kliknutím na tlačítko <button type=\"button\" className=\"btn btn-xs btn-default\"><span\n className=\"glyphicon glyphicon-list-alt\"/></button> si můžete k licenci zapsat libovolnou poznámku. Pro zobrazení poznámky stačí\n najet myší na zelenou podobu tlačítka: <button type=\"button\" className=\"btn btn-xs btn-success\"><span\n className=\"glyphicon glyphicon-list-alt\"/></button>\n</p>;\nexport default ExpiredLicensesInfo;","import React, {useCallback} from \"react\";\nimport {NavigationItem} from \"@fik/navigation\";\nimport {Form} from \"@mouseover/react-form\";\nimport {Button} from \"@fik/ui\";\nimport {TextInput} from \"@fik/form\";\nimport FooterText from \"../../components/Navigation/Footer/FooterText\";\nimport {useEntityAction} from \"@fik/entity\";\n\nconst VALIDATION = {\n username: {\n required: {\n params: true,\n message: \"Vyplňte prosím uživatelské jméno.\"\n },\n minLength: 3\n }\n};\n\nconst RequestSendForUsername = ({onSubmit}) => <>\n <p>Zadejte Vaše uživatelské jméno. Na e-mail asociovaný s Vaším účtem zašleme další instrukce pro přihlášení.</p>\n\n <div className=\"row\">\n <div className=\"col-lg-12\">\n <Form\n validationRules={VALIDATION}\n id=\"frm-forgotPassword\"\n className=\"m-t\"\n onSubmit={onSubmit}\n render={(form) => (<>\n <TextInput label=\"Uživatelské jméno\" form={form} name=\"username\"/>\n <Button\n btnType=\"primary\"\n className=\"block full-width m-b\"\n type=\"submit\"\n disabled={!form.validation.valid}\n >Zaslat nové heslo</Button>\n </>)}\n >\n </Form>\n\n </div>\n </div>\n</>;\n\nconst ForgotPassword = () => {\n const [{isSuccess, isFetching, isFailed, error}, resetPassword] = useEntityAction({name: 'authentication', action: 'forgotPassword'});\n\n const handleSubmit = useCallback((values) => {\n resetPassword(values);\n }, [resetPassword]);\n\n return <div className=\"passwordBox animated fadeInDown\">\n <div className=\"row\">\n <div className=\"col-md-12\">\n <div className=\"ibox-content\">\n <h2 className=\"font-bold\">Zapomenuté heslo</h2>\n {isFailed && error && <p className='alert alert-error'>{error.message}</p>}\n {!isFetching && !isSuccess && <RequestSendForUsername onSubmit={handleSubmit}/>}\n {isSuccess &&\n <p>Jednorázové heslo bylo odesláno na Váš e-mail.<br/> Pokračujte prosím dle instrukcí v e-mailu.<br/> Toto okno\n můžete nyní zavřít.</p>}\n <div className=\"row\">\n <div className=\"col-lg-12\">\n <NavigationItem to=\"signIn\">\n <small>Zpět na úvodní stránku</small>\n </NavigationItem>\n </div>\n </div>\n </div>\n </div>\n </div>\n <hr/>\n <div className=\"row\">\n <div className=\"col-md-12\">\n <div>\n <FooterText/>\n </div>\n </div>\n </div>\n </div>;\n}\n\nexport default ForgotPassword;","import React from \"react\";\n\nconst MinimalLayout = ({children}) => <>\n <img className=\"ppcz-login__logo\" src=\"/img/eset_logo.png\" alt='ESET'/>\n {children}\n</>;\n\nexport default MinimalLayout;","import React, {useCallback, useEffect} from \"react\";\nimport FooterText from \"../../components/Navigation/Footer/FooterText\";\nimport {useEntityAction} from \"@fik/entity\";\nimport {Form} from \"@mouseover/react-form\";\nimport {PasswordInput, TextInput} from \"@fik/form\";\nimport {NavigationItem} from \"@fik/navigation\";\nimport {Errors} from \"@fik/ui\";\nimport {isString, normalizeToString} from \"@mouseover/js-utils\";\n\nconst validatePassword = (value) => {\n const s = normalizeToString(value);\n return isString(s) && s.match(/^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{7,}$/) !== null;\n};\n\nconst VALIDATION = {\n username: {\n required: {\n params: true,\n message: \"Vyplňte prosím uživatelské jméno.\"\n },\n minLength: 3\n },\n password: {\n required: {\n params: true,\n message: \"Vyplňte heslo.\"\n },\n minLength: 7,\n password: {\n validate: validatePassword,\n message: \"Heslo musí obsahovat číslici, velká a malá písmena\"\n }\n },\n passwordCheck: {\n required: {\n params: true,\n message: \"Vyplňte heslo pro kontrolu.\"\n },\n minLength: 7,\n password: {\n validate: validatePassword,\n message: \"Heslo musí obsahovat číslici, velká a malá písmena\"\n }\n }\n};\n\nconst PasswordForm = ({onSubmit}) => {\n const handleSubmit = useCallback((values, valid, form) => {\n if (valid) {\n onSubmit(values);\n form.setValues({password: null, passwordCheck: null});\n }\n }, [onSubmit]);\n\n return <Form\n values={{username: null, password: null, passwordCheck: null}}\n validationRules={VALIDATION}\n onSubmit={handleSubmit}\n render={(form) => (<>\n <TextInput label=\"Uživatelské jméno\" form={form} name=\"username\"/>\n <PasswordInput label=\"Nové heslo\" form={form} name=\"password\"/>\n <PasswordInput label=\"Nové heslo pro kontrolu\" form={form} name=\"passwordCheck\"/>\n </>)}\n >\n <button type='submit' className=\"btn btn-primary block m-b\">Změnit heslo</button>\n </Form>;\n};\n\n\nconst PasswordSetForm = ({id}) => {\n // save\n const [{isSuccess, isFailed, isFetching, error}, resetPassword] = useEntityAction({name: 'authentication', action: 'resetPassword'});\n\n const handleSubmit = useCallback((values) => {\n resetPassword({...values, id});\n }, [resetPassword, id]);\n\n return <>\n <div className=\"row\">\n <div className=\"col-lg-12\">\n {isFailed && <div className={'alert alert-error'}>Nepodařilo se změnit heslo!</div>}\n {error && error.messages && <Errors messages={error.messages.map((item) => ({message: item, type: 'error'}))} />}\n {isSuccess && <>\n <div className={'alert alert-info'}>Heslo změněno.</div>\n <NavigationItem to=\"signIn\">\n <small>Přihlásit</small>\n </NavigationItem>\n </>}\n {id && !isFetching && !isSuccess && <PasswordForm onSubmit={handleSubmit} />}\n </div>\n </div>\n </>;\n};\n\nconst PasswordSetContent = ({id}) => {\n const [{isSuccess, isFailed}, validateResetPassword] = useEntityAction({name: 'authentication', action: 'validateResetPassword'});\n useEffect(() => {\n validateResetPassword({id});\n }, [id, validateResetPassword]);\n return <>\n {isSuccess && <PasswordSetForm id={id}/>}\n {isFailed && <ErrorPage>Neplatný reset hesla!</ErrorPage>}\n </>;\n};\n\nconst ErrorPage = ({children}) => <p className='alert alert-error'>{children}</p>\n\nconst PasswordSet = ({id}) => <div className=\"passwordBox animated fadeInDown\">\n <div className=\"row\">\n <div className=\"col-md-12\">\n <div className=\"ibox-content\">\n <h2 className=\"font-bold\">Nastavení hesla</h2>\n {id ? <PasswordSetContent id={id}/> : <ErrorPage>Neplatný reset hesla!</ErrorPage>}\n </div>\n </div>\n </div>\n <hr/>\n <div className=\"row\">\n <div className=\"col-md-12\">\n <div>\n <FooterText/>\n </div>\n </div>\n </div>\n</div>;\n\nexport default PasswordSet;","import React, {useEffect} from \"react\";\nimport Auth from \"./Auth/Auth\";\nimport {useSelector} from \"react-redux\";\n\nconst Sso = ({path}) =>{\n const token = useSelector((state) => state.auth.token, []);\n useEffect(() => {\n if (token && path) {\n window.location = window.location.protocol + '//' +window.location.hostname + path + \"?token=\" + token;\n }\n }, [token, path]);\n\n return <>\n {!token && <Auth />}\n </>;\n}\n\nexport default Sso;","import React from \"react\";\nimport {Box} from \"@fik/ui\";\n\nconst EshopDone = () => <div className=\"col-sm-12\">\n <Box>\n <h1>Úspěšně odesláno</h1>\n </Box>\n</div>\n\nexport default EshopDone;","import React from \"react\";\nimport {NavigationItem} from \"@fik/navigation\";\n\nconst OrderInfo = () => <p className='m-t-md'>\n <i className=\"fa fa-info-circle\"></i> Níže uvedený výpis obsahuje objednávky, které čekají na naší straně.\n Může to být způsobeno vlivem nějakého technického problému či nutnosti fyzického vyskladnění (objednávka krabic).\n Jinak řečeno, objednávky, které vidíte zde, nemusíte znovu opakovaně objednávat, ale spíše jen vyčkat.\n</p>;\n\nexport default OrderInfo;","import React, {useEffect, useMemo} from \"react\";\nimport {useEntity, usePureEntity} from \"@fik/entity\";\nimport {Box, Col, DownloadLink, Price, Row} from \"@fik/ui\";\nimport {Table, TableRow} from \"@fik/table\";\n\nconst ResellerPlan = () => {\n const [{entity: resellerPlanStats, isFetching}, load] = usePureEntity({name: 'resellerPlan'}, null);\n const {\n entity: resellerProfile,\n loadingState: {\n isSuccess: isProfileLoaded\n }\n } = useEntity({name: 'profile'}, null);\n\n const hasActivePlan = useMemo(() => {\n return (resellerProfile && resellerProfile.resellerPlanEnabled) === true;\n }, [resellerProfile])\n\n useEffect(() => {\n if (hasActivePlan) {\n load();\n }\n }, [hasActivePlan, load]);\n\n return <Row>\n <Col lg={12}>\n <Box>\n <p>Individuální roční plán slouží k nastavení ročních cílů pro konkrétního partnera a je součástí podmínek elitních\n kategorií\n partnerství. Individuální plán definuje obchodní a marketingové aktivity, obratové cíle, úroveň vzdělání a certifikací\n partnera\n pro kalendářní rok.</p>\n\n <p>Vyhodnocení Individuálního plánu partnera probíhá během ledna společně s ročním vyhodnocením partnerské kategorie\n následující\n kalendářní rok. Nový Individuální plán je k dispozici od 1.2. a jeho průběžné plnění nastavených cílů pro kalendářní\n rok, lze\n sledovat v přehledu níže na této stránce.</p>\n\n <p>Sestavení Individuálního ročního plánu vždy konzultujte se svým obchodím zástupcem. Věříme, že jasné stanovení cílů a\n priorit\n pomůže naplnit společná očekávání a rozvoj vzájemné spolupráce. Individuální roční plán je pro nás závazek maximální\n podpory\n partnera s přednostním zajištěním zdrojů u plánovaných aktivit nebo nastavených cílů.</p>\n\n {hasActivePlan && <p>\n <DownloadLink resource='reseller-plan' className=\"btn btn-primary btn-xs\"><i className=\"fa fa-file-pdf-o\"/> Individuální roční plán ke stažení v PDF</DownloadLink>\n </p>}\n\n {isProfileLoaded && !hasActivePlan && <div className='alert alert-warning'>\n Individuální plán není momentálně stanoven\n </div>}\n </Box>\n {hasActivePlan && resellerPlanStats && <Box>\n <Table striped responsive rows={resellerPlanStats.filter((item) => item.plan !== null)}>\n <TableRow header=''>{({name}) => name}</TableRow>\n <TableRow header='Roční cíl partnera'>{({plan}) => <Price price={plan} />}</TableRow>\n <TableRow header='Průběžné plnění'>{({stats}) => <Price price={stats} />}</TableRow>\n </Table>\n <p className='font-italic'>Tabulka se aktualizuje po fakturaci.</p>\n </Box>}\n </Col>\n </Row>;\n}\n\nexport default ResellerPlan;","import React from \"react\";\nimport {NavigationItem} from \"@fik/navigation\";\n\nconst Expiring90dLicensesInfo = () => <p className='m-t-md'>\n <i className=\"fa fa-info-circle\"/> Níže uvedený výpis obsahuje licence, které budou expirovat v nejbližší budoucnosti, maximálně ale za 90 dní.\n Výpis je omezen jen na licence, které nárokují založení registrace obchodního případu, tedy obvykle v počtu 50+. Bližší informace o celém expiračním\n procesu naleznete <NavigationItem to=\"page\" params={{category: 'partnerstvi', page: 'exspiracni-proces'}}>zde</NavigationItem>.<br/>\n <i className=\"fa fa-info-circle\"/> Kliknutím na tlačítko <button type=\"button\" className=\"btn btn-xs btn-default\"><span\n className=\"glyphicon glyphicon-list-alt\"/></button> si můžete k licenci zapsat libovolnou poznámku. Pro zobrazení poznámky stačí\n najet myší na zelenou podobu tlačítka: <button type=\"button\" className=\"btn btn-xs btn-success\"><span\n className=\"glyphicon glyphicon-list-alt\"/></button>\n</p>;\n\nexport default Expiring90dLicensesInfo;","import React from \"react\";\nimport ResellerLicenses from \"./ResellerLicenses\";\n\nconst Expiring90dLicenses = () => <ResellerLicenses query='expiring90d'/>;\n\nexport default Expiring90dLicenses;","import React, {useEffect} from 'react';\nimport 'react-dates/initialize';\nimport {BrowserRouter, Redirect, Route, Switch} from \"react-router-dom\";\nimport Layout from \"./components/Layout/Layout\";\nimport Homepage from './containers/Homepage/Homepage';\nimport Auth from './containers/Auth/Auth';\nimport {useDispatch} from \"react-redux\";\nimport {Logout} from \"@fik/auth\";\nimport {PageRoute, useSetPageInfo} from \"@fik/page\";\nimport {PageParams} from \"@fik/navigation\";\nimport {Downloads, Page} from \"@fik/cms\";\nimport Offers from \"./containers/Offers/Offers\";\nimport Deals from \"./containers/Deals/Deals\";\nimport ProjectPrices from \"./containers/ProjectPrices/ProjectPrices\";\nimport Invoices from \"./containers/Invoices/Invoices\";\nimport Settings from \"./containers/Profile/Settings/Settings\";\nimport Contacts from \"./containers/Profile/Contacts/Contacts\";\nimport Reports from \"./containers/Profile/Reports/Reports\";\nimport Orders from \"./containers/Orders/Orders\";\nimport Offer from \"./containers/Offers/Offer\";\nimport Order from \"./containers/Orders/Order\";\nimport Invoice from \"./containers/Invoices/Invoice\";\nimport OrderCreate from \"./containers/Orders/OrderCreate\";\nimport CalculatorAndPriceLists from \"./containers/CalculatorAndPriceLists/CalculatorAndPriceLists\";\nimport {mergeDeep} from \"@mouseover/js-utils\";\nimport OfferCreate from \"./containers/Offers/OfferCreate\";\nimport ProjectPriceCreate from \"./containers/ProjectPrices/ProjectPriceCreate\";\nimport {ValidatorProvider, defaultRuleSet} from \"@mouseover/js-validation-hook\";\nimport {checkState} from \"@fik/auth/actions\";\nimport OrderNfr from \"./containers/OrderNfr\";\nimport BoxEshop from \"./containers/BoxEshop\";\nimport MarketingEshop from \"./containers/MarketingEshop\";\nimport NewDeal from \"./containers/Deals/NewDeal\";\nimport Article from \"./containers/Article/Article\";\nimport {LoadingSpinnerOverlay} from \"@fik/loading\";\nimport EditDeal from \"./containers/Deals/EditDeal\";\nimport LicensesDownload from \"./containers/License/LicensesDownload\";\nimport EsetContacts from \"./containers/EsetContacts/EsetContacts\";\nimport ContactEdit from \"./containers/Contact/ContactEdit/ContactEdit\";\nimport ContactCreate from \"./containers/Contact/ContactCreate/ContactCreate\";\nimport CertificationRequest from \"./containers/Contact/CertificationRequest/CertificationRequest\";\nimport Password from \"./containers/Profile/Password/Password\";\nimport CertificationDownload from \"./containers/CertificationDownload/CertificationDownload\";\nimport Certifications from \"./containers/Profile/Certifications/Certifications\";\nimport {useNavigation} from \"@fik/navigation\";\nimport ExpiringLicenses from \"./containers/License/ExpiringLicenses\";\nimport LeakedLicenses from \"./containers/License/LeakedLicenses\";\nimport ResellerNfrLicenses from \"./containers/License/ResellerNfrLicenses\";\nimport NewestLicenses from \"./containers/License/NewestLicenses\";\nimport License from \"./containers/License/License\";\nimport useIsAuthenticated from \"@fik/auth/useIsAuthenticated\";\nimport useIsAuthInitialized from \"@fik/auth/useIsAuthInitialized\";\nimport Consignment from \"./containers/Consignment/Consignment\";\nimport DataPage from \"./components/DataPage\";\nimport SelfContact from \"./containers/Contact/ContactEdit/SelfContact\";\nimport ProcessedCourses from \"./containers/ProcessedCourses/ProcessedCourses\";\nimport {Col, Row} from \"@fik/ui\";\nimport AuthToken from \"./containers/Auth/AuthToken\";\nimport LeakedLicensesInfo from \"./containers/License/LeakedLicensesInfo\";\nimport ExpiringLicensesInfo from \"./containers/License/ExpiringLicensesInfo\";\nimport NewestLicensesInfo from \"./containers/License/NewestLicensesInfo\";\nimport ExpiredLicenses from \"./containers/License/ExpiredLicenses\";\nimport {QueryParamsProvider} from \"@fik/url-query\";\nimport CmsNavigationProvider from \"./components/CmsNavigationProvider\";\nimport FileManagerProvider from \"./components/FileManagerProvider\";\nimport ExpiredLicensesInfo from \"./containers/License/ExpiredLicensesInfo\";\nimport ForgotPassword from \"./containers/ForgotPassword/ForgotPassword\";\nimport MinimalLayout from \"./components/MinimalLayout/MinimalLayout\";\nimport PasswordSet from \"./containers/PasswordSet/PasswordSet\";\nimport Sso from \"./containers/Sso\";\nimport EshopDone from \"./containers/EshopDone\";\nimport OrderInfo from \"./containers/Orders/OrderInfo\";\nimport ResellerPlan from \"./containers/ResellerPlan\";\nimport Expiring90dLicensesInfo from \"./containers/License/Expiring90dLicensesInfo\";\nimport Expiring90dLicenses from \"./containers/License/Expiring90dLicenses\";\n\nconst appRuleSet = mergeDeep(\n {...defaultRuleSet},\n {\n required: {\n message: 'Toto pole je vyžadováno!'\n },\n minLength: {\n message: 'Minimální počet znaků je {0}.'\n },\n maxLength: {\n message: 'Maximální počet znaků je {0}.'\n },\n min: {\n message: 'Zadejte hodnotu rovnou nebo vyšší než {0}.'\n },\n max: {\n message: 'Zadejte hodnotu rovnou nebo nižší než {0}.'\n },\n email: {\n message: 'Zadejte validní emailovou adresu'\n },\n pattern: {\n message: 'Zadejte validní hodnotu'\n }\n }\n);\n\nconst blocks = {\n homepage: ['banners']\n};\n\nconst LICENSES_ALLOWED_KEYS = ['licenseEPLI', 'licensePublicId', 'licenseKey', 'licenseUsername', 'evidenceItem', 'itemProductTypeId', 'itemProductFamilyId', 'itemProductPeriodId', 'itemAmount'];\n\nconst createPageContents = (result) => {\n const contents = [];\n if (result.data) {\n contents.push(<DataPage key=\"data\" {...result.data}/>);\n }\n return contents;\n};\n\nconst App = () => {\n\n const isAuthReady = useIsAuthInitialized();\n const isAuthenticated = useIsAuthenticated();\n const dispatch = useDispatch();\n const {routes} = useNavigation();\n\n useEffect(() => {\n dispatch(checkState());\n }, [dispatch]);\n\n const setPageInfo = useSetPageInfo();\n\n let layout = null;\n if (!isAuthReady) {\n return null;\n }\n\n if (isAuthenticated) {\n document.body.classList.add('eset-skin');\n document.body.classList.add('fixed-nav');\n document.body.classList.remove('gray-bg');\n layout = (\n <Layout\n renderInfo={<Switch>\n <PageRoute {...routes.license.expiring} component={ExpiringLicensesInfo}/>\n <PageRoute {...routes.license.expired} component={ExpiredLicensesInfo}/>\n <PageRoute {...routes.license.leaked} component={LeakedLicensesInfo}/>\n <PageRoute {...routes.license.expiring90d} component={Expiring90dLicensesInfo}/>\n <PageRoute {...routes.license.newest} component={NewestLicensesInfo}/>\n <PageRoute {...routes.order.list} component={OrderInfo}/>\n </Switch>}\n >\n <Row>\n <Col lg={12} className=\"no-padding\">\n <LoadingSpinnerOverlay>\n <Switch>\n <PageRoute {...routes.signToken}>\n <PageParams>\n {({token}) => <AuthToken token={decodeURIComponent(token)}/>}\n </PageParams>\n </PageRoute>\n <PageRoute {...routes.signIn} component={Auth}/>\n <PageRoute {...routes.signOut} component={Logout}/>\n <Route {...routes.sso}>\n <PageParams>\n {({path}) => <Sso path={decodeURIComponent(path)}/>}\n </PageParams>\n </Route>\n <PageRoute {...routes.order.create}>\n <PageParams allowed={LICENSES_ALLOWED_KEYS}>\n {(props) => <OrderCreate {...props} />}\n </PageParams>\n </PageRoute>\n\n <PageRoute {...routes.offer.create}>\n <PageParams allowed={LICENSES_ALLOWED_KEYS}>\n {(props) => <OfferCreate {...props} />}\n </PageParams>\n </PageRoute>\n\n <PageRoute {...routes.projectPrice.create}>\n <PageParams allowed={LICENSES_ALLOWED_KEYS}>\n {(props) => <ProjectPriceCreate {...props} />}\n </PageParams>\n </PageRoute>\n\n <PageRoute {...routes.order.list} component={Orders}/>\n\n <PageRoute {...routes.order.detail}>\n <PageParams>\n {({id}) => <Order id={decodeURIComponent(id)}/>}\n </PageParams>\n </PageRoute>\n\n <PageRoute {...routes.offer.detail}>\n <PageParams>\n {({id}) => <Offer id={decodeURIComponent(id)}/>}\n </PageParams>\n </PageRoute>\n\n <PageRoute {...routes.offer.list} component={Offers}/>\n\n <PageRoute {...routes.projectPrice.list} component={ProjectPrices}/>\n\n <PageRoute {...routes.invoice.list} component={Invoices}/>\n\n <PageRoute {...routes.invoice.detail}>\n <PageParams>\n {({id}) => <Invoice id={decodeURIComponent(id)}/>}\n </PageParams>\n </PageRoute>\n\n <PageRoute {...routes.calculator} component={CalculatorAndPriceLists}/>\n <PageRoute {...routes.deal.list} component={Deals}/>\n\n <PageRoute {...routes.deal.create}>\n <PageParams>\n {({offerId}) => <NewDeal offerId={offerId ? decodeURIComponent(offerId) : null}/>}\n </PageParams>\n </PageRoute>\n\n <PageRoute {...routes.deal.createNewLicence}>\n <PageParams>\n {({offerId}) => <NewDeal initialFormType='new' offerId={offerId ? decodeURIComponent(offerId) : null}/>}\n </PageParams>\n </PageRoute>\n\n <PageRoute {...routes.deal.createRenewLicence}>\n <PageParams>\n {({offerId}) => <NewDeal initialFormType='renew' offerId={offerId ? decodeURIComponent(offerId) : null}/>}\n </PageParams>\n </PageRoute>\n\n <PageRoute {...routes.deal.detail}>\n <PageParams>\n {({id}) => <EditDeal id={decodeURIComponent(id)}/>}\n </PageParams>\n </PageRoute>\n\n <PageRoute {...routes.license.detail}>\n <PageParams>\n {({id}) => <License id={id}/>}\n </PageParams>\n </PageRoute>\n\n <PageRoute {...routes.license.expiring} component={ExpiringLicenses}/>\n <PageRoute {...routes.license.expiring90d} component={Expiring90dLicenses}/>\n <PageRoute {...routes.license.expired} component={ExpiredLicenses}/>\n <PageRoute {...routes.license.leaked} component={LeakedLicenses}/>\n <PageRoute {...routes.license.nfr} component={ResellerNfrLicenses}/>\n <PageRoute {...routes.license.download} component={LicensesDownload}/>\n <PageRoute {...routes.license.newest} component={NewestLicenses}/>\n\n <PageRoute {...routes.profile.settings} component={Settings}/>\n <PageRoute {...routes.profile.contacts} component={Contacts}/>\n <PageRoute path={'/profile/contact'} render={() => <Redirect to={'/profile/contacts'}/>}/>\n <PageRoute {...routes.profile.createContact} component={ContactCreate}/>\n <PageRoute {...routes.profile.editContact}>\n <PageParams>\n {({id}) => <ContactEdit id={id}/>}\n </PageParams>\n </PageRoute>\n <PageRoute {...routes.profile.editSelfContact}>\n <PageParams>\n {() => <SelfContact />}\n </PageParams>\n </PageRoute>\n <PageRoute {...routes.profile.certificationRequest}>\n <PageParams>\n {({id}) => <CertificationRequest contactId={id}/>}\n </PageParams>\n </PageRoute>\n <PageRoute {...routes.profile.reports} component={Reports}/>\n <PageRoute {...routes.partnerstvi.resellerPlan} component={ResellerPlan}/>\n <PageRoute {...routes.profile.password} component={Password}/>\n <PageRoute {...routes.profile.certification} component={Certifications}/>\n <PageRoute {...routes.profile.certificationDownload} component={CertificationDownload}/>\n <PageRoute {...routes.profile.processedCourses} component={ProcessedCourses}/>\n\n <PageRoute {...routes.nfrOrder} component={OrderNfr}/>\n <PageRoute {...routes.boxEshop} component={BoxEshop}/>\n <PageRoute {...routes.boxEshopOrdered} component={EshopDone}/>\n <PageRoute {...routes.downloads} component={Downloads}/>\n <PageRoute {...routes.profile.nfrOrder} component={OrderNfr}/>\n <PageRoute {...routes.marketingEshop} component={MarketingEshop}/>\n <PageRoute {...routes.marketingEshopOrdered} component={EshopDone}/>\n <PageRoute {...routes.consignment} component={Consignment}/>\n\n <PageRoute {...routes.page}>\n <PageParams>\n {({category, page}) => <Page setPageInfo={setPageInfo} category={category} page={page} createContents={createPageContents}/>}\n </PageParams>\n </PageRoute>\n\n <PageRoute {...routes.cms}>\n <PageParams allowed={['category', 'page']}>\n {(props) => <Page setPageInfo={setPageInfo} {...props} createContents={createPageContents} />}\n </PageParams>\n </PageRoute>\n\n <PageRoute {...routes.article.detail}>\n <PageParams>\n {({id}) => <Article id={id}/>}\n </PageParams>\n </PageRoute>\n\n <PageRoute {...routes.article.old}>\n <PageParams>\n {({id}) => <Article id={id}/>}\n </PageParams>\n </PageRoute>\n\n <PageRoute {...routes.contacts} component={EsetContacts}/>\n\n <PageRoute path={routes.homepage.path} exact component={Homepage} blocks={blocks.homepage}/>\n </Switch>\n </LoadingSpinnerOverlay>\n </Col>\n </Row>\n </Layout>\n );\n } else {\n document.body.classList.remove('eset-skin');\n document.body.classList.remove('fixed-nav');\n document.body.classList.add('gray-bg');\n layout = (\n <MinimalLayout>\n <Switch>\n <PageRoute {...routes.signToken}>\n <PageParams>\n {({token}) => <AuthToken token={decodeURIComponent(token)}/>}\n </PageParams>\n </PageRoute>\n <Route {...routes.signIn} component={Auth}/>\n <Route {...routes.sso}>\n <PageParams>\n {({path}) => <Sso path={decodeURIComponent(path)}/>}\n </PageParams>\n </Route>\n <Route {...routes.forgottenPassword} component={ForgotPassword}/>\n <Route {...routes.passwordSet}>\n <PageParams>\n {({id}) => <PasswordSet id={id ? decodeURIComponent(id) : null}/>}\n </PageParams>\n </Route>\n <Route path={routes.homepage.path} component={Auth}/>\n </Switch>\n </MinimalLayout>\n );\n }\n return (\n <BrowserRouter basename={process.env.PUBLIC_URL}>\n <QueryParamsProvider>\n <ValidatorProvider ruleSet={appRuleSet}>\n <CmsNavigationProvider>\n <FileManagerProvider>\n {layout}\n </FileManagerProvider>\n </CmsNavigationProvider>\n </ValidatorProvider>\n </QueryParamsProvider>\n </BrowserRouter>\n );\n};\n\n\nexport default App;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' }\n })\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","export const updateObject = (oldObject, newObject) => {\n return {\n ...oldObject,\n ...newObject\n }\n};\n\nexport default updateObject;\n","import * as actions from \"./actionTypes\";\nimport updateObject from \"@fik/utils/updateObject\";\n\nconst initialState = {\n token: null,\n userId: null,\n username: null,\n error: false,\n initialized: false,\n loading: false,\n redirectPath: '/'\n};\n\nconst reducer = (state = initialState, action) => {\n switch (action.type) {\n case actions.AUTH_INIT:\n return updateObject(state, {initialized: true, loading: true, error: false});\n\n case actions.AUTH_DONE:\n return updateObject(state, {\n initialized: true,\n loading: false,\n error: false,\n userId: action.payload.userId,\n token: action.payload.token,\n username: action.payload.username\n });\n\n case actions.AUTH_FAILED:\n return updateObject(state, {initialized: true, loading: false, error: action.payload.error});\n\n case actions.AUTH_LOGOUT:\n return updateObject(state, {initialized: true, token: null, userId: null});\n\n case actions.AUTH_SET_REDIRECT_PATH:\n return updateObject(state, {redirectPath: action.payload.path});\n\n default:\n return state;\n }\n};\n\nexport default reducer;","import {AUTH_SUCCESS, AUTH_INIT, AUTH_LOGOUT, AUTH_CHECK, AUTH_DONE} from \"./actionTypes\";\n\nexport const authMiddleware = model => {\n const authenticationModel = model.authentication();\n return () => next => action => {\n if (action) {\n switch (action.type) {\n case AUTH_SUCCESS:\n authenticationModel.setAuthorizationToken(action.payload.token);\n next({...action, type: AUTH_DONE});\n break;\n\n case AUTH_INIT:\n next(authInit(authenticationModel)(action.actions, action.payload.credentials));\n break;\n\n case AUTH_LOGOUT:\n authenticationModel.logOut();\n clearAuthorizationHeader(authenticationModel);\n break;\n\n case AUTH_CHECK:\n next(authCheck(authenticationModel, action.actions));\n break;\n\n default:\n // nothing to do\n break;\n }\n }\n\n return next(action);\n };\n};\n\nconst clearAuthorizationHeader = (authenticationModel) => {\n authenticationModel.setAuthorizationToken(null);\n};\n\nconst authInit = authenticationModel => (actions, credentials) => dispatch => {\n const [authSuccess, checkOfTimeout, authFailed] = actions;\n authenticationModel.authenticate(credentials)\n .then(body => {\n dispatch(authSuccess(body));\n dispatch(checkOfTimeout(body.expiresIn));\n return body;\n })\n .catch((error) => {\n dispatch(authFailed(error));\n });\n};\n\n\nconst authCheck = (authenticationModel, actions) => dispatch => {\n const [logOut, authSuccess, checkOfTimeout] = actions;\n\n if (authenticationModel.authTokenCheck()) {\n const credentials = authenticationModel.getCredentials();\n dispatch(authSuccess(credentials));\n dispatch(checkOfTimeout(credentials.expiresIn));\n } else {\n dispatch(logOut());\n }\n};","import {createResponseReducer} from \"@fik/api\";\nimport {isObject} from \"@mouseover/js-utils\";\nimport {createDataSourceReducer} from \"@fik/data-source\";\nimport {combineReducers} from \"redux\";\n\nexport const TYPE_DATASOURCE = 'dataSource';\nexport const TYPE_ENTITY = 'entity';\nexport const TYPE_REDUCER = 'reducer';\n\nconst createSpecificReducer = (type, {name, storeName, resetResult = true}) => {\n const definition = isObject(type) ? type : {type};\n switch (definition.type) {\n case TYPE_ENTITY:\n return createResponseReducer(storeName, name, definition.initialState, resetResult);\n case TYPE_DATASOURCE:\n return createDataSourceReducer(storeName, definition.resource || 'data-source');\n case TYPE_REDUCER:\n return {[definition.name]: definition.reducer};\n default:\n throw new Error('Unknown reducer type ' + type);\n }\n};\n\nconst createResourceReducers = (resourceConfig, def) => {\n return def.reduce((reducers, current) => {\n return {...reducers, ...createSpecificReducer(current, resourceConfig) };\n }, {});\n};\n\nconst createResourcesReducers = (model, definitions) => {\n return Object.entries(definitions).reduce((reducers, [key, def]) => {\n const resourceConfig = model.resources[key];\n reducers[resourceConfig.storeName] = combineReducers(createResourceReducers(resourceConfig, def));\n return reducers;\n }, {});\n};\n\nexport default createResourcesReducers;","import * as actions from \"./actionTypes\";\n\nconst rootReducer = (appReducer) => (state, action) => {\n if (action && action.type === actions.AUTH_LOGOUT) {\n state = undefined;\n }\n return appReducer(state, action);\n};\n\nexport default rootReducer;","import {applyMiddleware, combineReducers, compose, createStore} from \"redux\";\nimport thunk from \"redux-thunk\";\n\nimport authReducer from '@fik/auth/reducer';\nimport {authMiddleware} from \"@fik/auth/authMiddleware\";\nimport createResourcesReducers, {TYPE_DATASOURCE, TYPE_ENTITY} from \"@fik/model/createResourcesReducers\";\nimport rootReducer from \"@fik/auth/rootReducer\";\n\nconst composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\n\nconst prepareStore = model => createStore(\n rootReducer( combineReducers({\n auth: authReducer,\n ...createResourcesReducers(\n model,\n {\n 'contact': [TYPE_ENTITY],\n 'branchOffice': [TYPE_ENTITY],\n 'customer': [TYPE_ENTITY],\n 'product': [TYPE_ENTITY],\n 'deal': [TYPE_DATASOURCE, TYPE_ENTITY],\n 'invoice': [TYPE_DATASOURCE, TYPE_ENTITY],\n 'license': [TYPE_DATASOURCE, TYPE_ENTITY],\n 'offer': [TYPE_DATASOURCE, TYPE_ENTITY],\n 'order': [TYPE_DATASOURCE, TYPE_ENTITY],\n 'loyalties': [TYPE_ENTITY],\n 'profile': [{\n type: TYPE_ENTITY, initialState: {\n addressBook: null,\n branchOffice: null,\n categoryInfo: null,\n privilegeStatus: null,\n turnovers: null,\n certification: null,\n staff: null,\n stats: null,\n loyalties: null\n }\n }],\n 'resellerProfile': [TYPE_ENTITY, {type: TYPE_DATASOURCE, resource: 'certification-data-source'}],\n 'resellerPlan': [TYPE_ENTITY],\n 'productTree': [TYPE_ENTITY],\n 'projectPrice': [TYPE_DATASOURCE, TYPE_ENTITY],\n 'identity': [TYPE_ENTITY],\n 'processedCourse': [TYPE_DATASOURCE],\n 'esetEvidenceItem': [TYPE_ENTITY],\n }\n )\n }\n )),\n composeEnhancers(applyMiddleware(authMiddleware(model), thunk))\n);\n\nexport default prepareStore;\n","\nconst createDialsModel = (adapter) => {\n return {\n getDialsFor: (resource, params) => adapter(resource).get({action: 'dials', ...(params ? params : {})})\n }\n};\n\nexport default createDialsModel;\n\n","import {getOnPath} from \"@mouseover/js-utils/src\";\n\nconst DOCUMENT_RESOURCES = ['order', 'offer', 'project-price'];\n\nconst createEntityModel = (adapters, defaultAdapter = 'entity', actionsModel = {}) => {\n\n const getAdapter = (adapter) => adapters[adapter || defaultAdapter];\n\n return {\n getEntity: ({name: resource, adapterName}, params = {}) => {\n if (DOCUMENT_RESOURCES.indexOf(resource) !== -1 && params.id === 'new') {\n params.action = 'new';\n delete params.id;\n }\n\n return getAdapter(adapterName)(resource).get(params);\n },\n postEntity: ({name: resource, adapterName}, params = {}, content = {}) => {\n return getAdapter(adapterName)(resource).post(params, content);\n },\n putEntity: ({name: resource, adapterName}, params = {}, content = {}) => {\n return getAdapter(adapterName)(resource).put(params, content);\n },\n deleteEntity: ({name: resource, adapterName}, params = {}) => {\n return getAdapter(adapterName)(resource).delete(params);\n },\n action: ({entity, name: resource, adapterName, storeName}, action, params) => {\n const def = getOnPath(actionsModel, [entity, action]);\n if (def) {\n return def(params, () => getAdapter(adapterName)(resource));\n }\n }\n }\n};\n\nexport default createEntityModel;\n\n","const createDocumentModel = (adapter) => {\n\n return {\n validate: (resource, document) => {\n return adapter(resource).post({action: 'validate'}, document);\n },\n save: (resource, document) => {\n return adapter(resource).post({}, document);\n },\n createAllOfferVariants: (offerId) => {\n return adapter('offer').post({action: 'create-all-variants'}, {id: offerId});\n },\n orderOffer: (offerId, values) => {\n return adapter('offer').post({action: 'order'}, {id: offerId, ...values});\n }\n }\n};\n\nexport default createDocumentModel;","const createCmsModel = (adapter) => {\n\n return {\n getMenu: () => {\n return adapter().getMenu();\n },\n getPage: (category, page) => {\n return adapter().getPage(category, page);\n },\n getPageBlocks: (category, page, blocks) => {\n return adapter().getPageBlocks(category, page, blocks);\n },\n getFiles: () => adapter().getFiles(),\n getFeeds: (feedGroupId) => adapter().getFeeds(feedGroupId),\n getArticle: (id) => adapter().getArticle(id),\n }\n};\n\nexport default createCmsModel;","const createNonce = () => {\n\n return new Promise((resolve, reject) => {\n\n let text = \"\";\n let possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for (let i = 0; i < 40; i++)\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n\n resolve(text);\n });\n};\n\nconst createAndSaveNonce = (storage) => {\n return createNonce()\n .then((nonce) => {\n storage.setItem(\"nonce\", nonce);\n return nonce;\n });\n};\n\n\nconst clearLocalStorage = (storage) => {\n storage.removeItem('token');\n storage.removeItem('expireAt');\n storage.removeItem('userId');\n storage.removeItem('username');\n};\n\nconst persistInLocalStorage = (storage, body) => {\n const expireAt = new Date(new Date().getTime() + body.expiresIn * 1000);\n storage.setItem('token', body.token || body.accessToken);\n storage.setItem('expireAt', expireAt);\n storage.setItem('userId', body.userId);\n storage.setItem('username', body.username);\n};\n\n\nexport const createAuthStorage = (storage) => {\n\n return {\n clearLocalStorage: () => clearLocalStorage(storage),\n getAccessToken: () => storage.getItem(\"token\"),\n getUserName: () => storage.getItem(\"username\"),\n getExpireAt: () => storage.getItem(\"expireAt\"),\n getUserId: () => storage.getItem(\"userId\"),\n getNonce: () => storage.getItem(\"nonce\"),\n getIdentity: () => JSON.parse(storage.getItem(\"identity\")),\n createNonce: () => createAndSaveNonce(storage),\n clearStorage: () => clearLocalStorage(storage),\n persistAuthResponse: (body) => persistInLocalStorage(storage, body)\n }\n};","import {createAuthStorage} from \"@fik/auth/authStorage\";\n\nconst tokenCheck = (authStorage) => {\n const token = authStorage.getAccessToken();\n\n if (!token) {\n return false\n }\n\n const expireAt = new Date(authStorage.getExpireAt());\n const expiresIn = (expireAt.getTime() - (new Date()).getTime()) / 1000; // we need amount of seconds\n\n return expiresIn > 0;\n};\n\nconst createAuthenticationModel = (storage, adapter) => {\n const authStorage = createAuthStorage(storage);\n return {\n authStorage,\n authenticate: (credentials) => adapter().authenticate(credentials).then((response) => {\n authStorage.persistAuthResponse(response);\n return response;\n }),\n getCredentials: () => {\n const expireAt = new Date(authStorage.getExpireAt());\n return {\n username: authStorage.getUserName(),\n userId: authStorage.getUserId(),\n token: authStorage.getAccessToken(),\n expireAt: authStorage.getExpireAt(),\n expiresIn: (expireAt.getTime() - (new Date()).getTime()) / 1000\n };\n },\n authTokenCheck: () => tokenCheck(authStorage),\n logOut: authStorage.clearStorage,\n forgotPassword: adapter().forgotPassword,\n validateResetPassword: adapter().validateResetPassword,\n resetPassword: adapter().resetPassword,\n setAuthorizationToken: (token) => adapter().setAuthorizationToken(token)\n }\n};\n\nexport default createAuthenticationModel;","\nconst createDataSourceModel = (adapter) => {\n return {\n getDataSource: (resource, params) => adapter(resource).getDataSource(params),\n getDataSourceCount: (resource, params) => adapter(resource).getDataSourceCount(params)\n }\n};\n\n\nexport default createDataSourceModel;","const section = {\n sales: 'Prodej',\n license: 'Licence'\n};\n\nconst navigation = {\n homepage: {path: '/', blocks: ['banners', 'popup']},\n signIn: {path: '/sign/in'},\n signToken: {path: '/sign/token/:token'},\n signOut: {path: '/sign/out'},\n sso: {path: '/sso'},\n forgottenPassword: {path: '/sign/forgot-password'},\n passwordSet: {path: '/sign/password-set/:id'},\n calculator: {section: 'Ceníky', title: 'Kalkulátor', path: '/sales/calculator', atIndex: 1},\n consignment: {section: section.sales, title: 'Komise', path: '/sales/consignment'},\n order: {\n detail: {section: section.sales, title: 'Objednávka', path: '/sales/order/:id'},\n list: {section: section.sales, title: 'Čekající objednávky', path: \"/sales/orders\"},\n create: {section: section.sales, title: 'Nová objednávka', path: \"/sales/create-order\"}\n },\n offer: {\n detail: {section: section.sales, title: 'Nabídka', path: '/sales/offer/:id'},\n list: {section: section.sales, title: 'Cenové nabídky/projektovky', path: \"/sales/offers\"},\n create: {section: section.sales, title: 'Nová nabídka/projektovka', path: \"/sales/create-offer\"}\n },\n projectPrice: {\n list: {section: section.sales, title: 'Projektové ceny', path: \"/sales/project-prices\"},\n create: {section: section.sales, title: 'Nová projektová cena', path: \"/sales/create-project-price\"}\n },\n invoice: {\n detail: {section: section.sales, title: 'Faktura', path: '/sales/invoice/:id'},\n list: {section: section.sales, title: 'Faktury', path: \"/sales/invoices\"}\n },\n deal: {\n detail: {section: section.sales, title: 'Registrace obchodního případu', path: '/sales/deal/:id'},\n list: {section: section.sales, title: 'Obchodní případy', path: \"/sales/deals\"},\n create: {section: section.sales, title: 'Nová registrace obchodního případu', path: \"/sales/create-deal\"},\n createNewLicence: {section: section.sales, title: 'Nová registrace obchodního případu', path: \"/sales/create-deal-new\"},\n createRenewLicence: {section: section.sales, title: 'Nová registrace obchodního případu', path: \"/sales/create-deal-renew\"}\n },\n license: {\n detail: {section: section.license, title: 'Licence', path: '/licenses/view/:id'},\n expiring: {section: section.license, title: 'Expirující vše', path: '/licenses/expiring'},\n expiring90d: {section: section.license, title: 'Expirující projektovky', path: '/licenses/expiring-90-d'},\n expired: {section: section.license, title: 'Expirované licence', path: '/licenses/expired'},\n leaked: {section: section.license, title: 'Zneužité licence', path: '/licenses/leaked'},\n nfr: {section: section.license, title: 'Partnerské NFR', path: '/licenses/nfr'},\n newest: {section: section.license, title: 'Nejnovější licence', path: '/licenses'},\n download: {section: section.license, title: 'Zaslat licence', path: '/licenses/download'}\n },\n profile: {\n settings: {title: \"Nastavení profilu\", section: \"Profil\", path: \"/profile/reseller\"},\n password: {title: \"Změna hesla\", section: \"Profil\", path: \"/profile/password\"},\n certification: {title: \"Certifikace\", section: \"Profil\", path: \"/profile/certifications\"},\n processedCourses: {title: \"Výpis elearningových kurzů\", section: \"Profil\", path: \"/profile/processed-courses\"},\n certificationDownload: {title: \"Stažení certifikátu\", section: \"Profil\", path: \"/profile/certification-download\"},\n certificationRequest: {title: \"Zažádat o certifikaci\", section: \"Profil\", path: \"/profile/certification-request/:id\"},\n orderNfr: {title: \"Objednat NFR licenci\", section: \"Profil\", path: \"/profile/order-nfr\"},\n reports: {title: \"Přehledy\", section: \"Profil\", path: \"/profile/reports\"},\n editSelfContact: {title: \"Úprava kontaktu\", section: \"Profil\", path: \"/profile/edit-contact\"},\n editContact: {title: \"Úprava kontaktu\", section: \"Profil\", path: \"/profile/edit-contact/:id\"},\n createContact: {title: \"Vytvoření kontaktu\", section: \"Profil\", path: \"/profile/create-contact\"},\n contacts: {title: \"Osoby\", section: \"Profil\", path: \"/profile/contacts\"},\n nfrOrder: {section: section.sales, title: 'NFR pro vlastní potřebu', path: '/profile/order-nfr'},\n },\n partnerstvi: {\n resellerPlan: {title: \"Individuální plán\", section: \"Partnerství\", path: \"/partnerstvi/reseller-plan\", atIndex: 2},\n },\n downloads: {title: \"Ke stažení\", section: \"Profil\", path: \"/downloads\"},\n marketingEshop: {title: \"Reklamní materiály\", section: \"Prodej\", path: \"/p/prodejni-nastroje/objednavka-all\"},\n marketingEshopOrdered: {title: \"Reklamní materiály\", section: \"Prodej\", path: \"/p/prodejni-nastroje/objednavka-all-objednano\"},\n nfrOrder: {section: section.sales, title: 'NFR pro vlastní potřebu', path: '/sales/order-nfr'},\n boxEshop: {section: section.sales, title: 'Objednávka krabic', path: '/sales/krabice'},\n boxEshopOrdered: {section: section.sales, title: 'Objednávka krabic', path: '/sales/krabice-objednany'},\n contacts: {title: \"Kontakty\", path: \"/contact\"},\n article: {\n detail: {path: '/article/:id'},\n old: {path: '/homepage/rss-detail/:id'},\n },\n cms: {path: '/c-m-s'},\n page: {path: '/p/:category/:page'}\n};\n\nexport default navigation;","import {navigationToMenuItem} from \"@fik/navigation/menu\";\n\nconst sideBarMenu = (navigation, tags) => {\n const salesMenuItems = [\n {\n icon: null,\n ...navigationToMenuItem(navigation.order.create)\n },\n navigationToMenuItem(navigation.offer.create),\n // navigationToMenuItem(navigation.projectPrice.create),\n //{...navigationToMenuItem(navigation.order.list), child: [navigationToMenuItem(navigation.order.detail)]},\n navigationToMenuItem(navigation.offer.list),\n navigationToMenuItem(navigation.order.list),\n // navigationToMenuItem(navigation.projectPrice.list),\n navigationToMenuItem(navigation.invoice.list),\n// navigationToMenuItem(navigation.calculator),\n navigationToMenuItem(navigation.deal.list),\n navigationToMenuItem(navigation.deal.create),\n navigationToMenuItem(navigation.nfrOrder),\n navigationToMenuItem(navigation.boxEshop)\n ];\n\n if (tags && tags.indexOf('PI_KOMISE') !== -1) {\n salesMenuItems.push(navigationToMenuItem(navigation.consignment));\n }\n\n return [\n {\n icon: 'fa fa-home',\n label: 'Home',\n to: '/',\n },\n {\n icon: 'fa fa-briefcase',\n label: 'Prodej',\n content: salesMenuItems,\n },\n {\n icon: 'fa fa-barcode',\n label: 'Správa licencí',\n content: [\n {\n label: 'Nejnovější',\n to: navigation.license.newest.path,\n },\n {\n label: 'Expirující vše',\n to: navigation.license.expiring.path,\n },\n {\n label: 'Expirující projektovky',\n to: navigation.license.expiring90d.path,\n },\n {\n label: 'Expirované',\n to: navigation.license.expired.path,\n },\n {\n label: 'Zneužité',\n to: navigation.license.leaked.path,\n },\n {\n label: 'Partnerské NFR',\n to: navigation.license.nfr.path,\n },\n {\n label: 'Zaslat vše v CSV',\n to: navigation.license.download.path,\n }\n ]\n },\n {\n icon: 'fa fa-download',\n ...navigationToMenuItem(navigation.downloads)\n },\n {\n icon: 'fa fa-user',\n label: 'Profil',\n content: [\n navigationToMenuItem(navigation.profile.settings),\n navigationToMenuItem(navigation.profile.contacts),\n navigationToMenuItem(navigation.profile.reports),\n navigationToMenuItem(navigation.profile.password),\n navigationToMenuItem(navigation.profile.certificationDownload),\n navigationToMenuItem(navigation.profile.certification),\n navigationToMenuItem(navigation.profile.processedCourses),\n ]\n },\n {\n icon: 'fa fa-line-chart',\n label: 'Partnerství',\n content: [\n navigationToMenuItem(navigation.partnerstvi.resellerPlan),\n ]\n },\n {\n icon: 'fa fa-usd',\n label: 'Ceníky',\n content: [\n navigationToMenuItem(navigation.calculator),\n ]\n },\n {\n icon: 'fa fa-envelope',\n label: 'Kontakty',\n to: navigation.contacts.path,\n },\n\n ];\n};\n\n\nexport default sideBarMenu;","const models = (authenticationModel) => ({\n license: {\n resetCredentials: ({id}, adapter) => adapter().put({id, action: 'reset-credentials'}),\n resendLicenseEmail: ({id, values}, adapter) => adapter().put({id, action: 'resend-license-email'}, {id, ...values}),\n requestLicenses: (params, adapter) => adapter().post({action: 'send-csv'}),\n saveResellerNote: ({id, values}, adapter) => adapter().post({id, action: 'reseller-note'}, {id, ...values}),\n },\n resellerProfile: {\n consignment: (params, adapter) => adapter().post({action: 'consignment', ...params}),\n resetPassword: ({values}, adapter) => adapter().post({action: 'reset-password'}, values),\n saveAddressBook: ({values}, adapter) => adapter().post({action: 'address-book'}, values),\n saveBranchOffice: ({values}, adapter) => adapter().post({action: 'branch-office'}, values),\n contactCertificationRequest: ({values}, adapter) => adapter().post({action: 'contact-certification-request'}, values),\n },\n contact: {\n create: ({values}, adapter) => adapter().post({}, values),\n save: ({id, values}, adapter) => adapter().post({id}, values),\n resendLogin: ({id, values}, adapter) => adapter().post({id, action: 'resend-login'}, values),\n },\n authentication: {\n forgotPassword: (values) => authenticationModel.forgotPassword(values),\n validateResetPassword: authenticationModel.validateResetPassword,\n resetPassword: authenticationModel.resetPassword\n }\n});\n\nexport default models","import createEvidenceItemModel from \"@fik/model/createEvidenceItemModel\";\nimport createDialsModel from \"@fik/model/createDialsModel\";\nimport createEntityModel from \"@fik/model/createEntityModel\";\nimport createDocumentModel from \"@fik/model/createDocumentModel\";\nimport createCmsModel from \"@fik/model/createCmsModel\";\nimport createAuthenticationModel from \"@fik/auth/createAuthenticationModel\";\nimport createDataSourceModel from \"@fik/model/createDataSourceModel\";\nimport * as axios from \"axios\";\nimport queryString from 'query-string'\nimport {getOnPath} from \"@mouseover/js-utils/src\";\nimport navigation from \"./navigation\";\nimport sideBarMenu from \"./sidebarMenu\";\nimport models from \"./models\";\n\nconst createStore = () => {\n let store = {};\n return {\n get: (key) => store[key],\n save: (key, value) => store = {...store, [key]: value}\n }\n};\n\n\nfunction getTags(resellerProfile) {\n if (!resellerProfile) return [];\n\n if (resellerProfile.branchOffice && resellerProfile.branchOffice.branchOfficeId) {\n return getOnPath(resellerProfile, ['branchOffice', 'tags']);\n }\n\n return resellerProfile.addressBook ? getOnPath(resellerProfile, ['addressBook', 'tags']) : [];\n}\n\nconst createResellerZoneModel = ({\n baseURL,\n adapters: {authenticationAdapters, cmsAdapter, dataSourceAdapter, identityAdapter, resourceAdapter}\n }) => {\n\n const axiosInstance = axios.create({\n baseURL: baseURL\n });\n\n const authenticationModel = createAuthenticationModel(window.localStorage, authenticationAdapters(axiosInstance));\n const resellerzoneResourceAdapter = resourceAdapter(axiosInstance);\n const store = createStore();\n\n return {\n createDownloadLink: (resource, params) => {\n const {id, ...queryParams} = params || {};\n queryParams['access_token'] = authenticationModel.authStorage.getAccessToken();\n return baseURL + (!baseURL.endsWith('/') ? '/' : '') + 'api/download/' + resource + (id ? '/' + encodeURIComponent(id) : '') + (queryParams ? '?' + queryString.stringify(queryParams) : '')\n },\n resources: {\n contact: {name: 'contact', storeName: 'contacts'},\n branchOffice: {name: 'branchOffice', storeName: 'branchOffices'},\n product: {name: 'product', storeName: 'products'},\n productTree: {name: 'product-tree', storeName: 'product-tree'},\n customer: {name: 'owner', storeName: 'customer'},\n deal: {name: 'deal', storeName: 'deals'},\n invoice: {name: 'invoice', storeName: 'invoices'},\n license: {name: 'license', storeName: 'licenses'},\n offer: {name: 'offer', storeName: 'offers'},\n order: {name: 'order', storeName: 'orders'},\n profile: {name: 'profile', storeName: 'profile', timeToRefresh: 1},\n loyalties: {name: 'loyalties', storeName: 'loyalties'},\n resellerProfile: {name: 'reseller-profile', storeName: 'reseller-profile'},\n resellerPlan: {name: 'reseller-plan', storeName: 'reseller-plan'},\n projectPrice: {name: 'project-price', storeName: 'project-prices'},\n identity: {name: 'identity', adapterName: 'identity', storeName: 'identity'},\n processedCourse: {name: 'processed-course', storeName: 'processed-course'},\n esetEvidenceItem: {name: 'esetEvidenceItem', storeName: 'esetEvidenceItem'}\n },\n evidenceItems: () => createEvidenceItemModel(() => resellerzoneResourceAdapter('eset-evidence-item')),\n dials: () => createDialsModel(resellerzoneResourceAdapter),\n entity: () => createEntityModel({entity: resellerzoneResourceAdapter, identity: identityAdapter(axiosInstance)}, 'entity', models(authenticationModel)),\n document: () => createDocumentModel(resellerzoneResourceAdapter),\n cms: () => createCmsModel(cmsAdapter(axiosInstance, store)),\n authentication: () => authenticationModel,\n dataSource: (name) => createDataSourceModel(dataSourceAdapter(axiosInstance, name)),\n navigation: () => navigation,\n menu: (resellerProfile) => {\n const tags = getTags(resellerProfile);\n return {\n sideBarMenu: sideBarMenu(navigation, tags),\n };\n }\n };\n};\n\nexport default createResellerZoneModel;\n","import {usePureEntity} from \"@fik/entity\";\nimport React, {useEffect, useMemo} from 'react';\nimport {NavigationContext} from \"@fik/navigation\";\nimport useAuth from \"@fik/auth/useAuth\";\n\nconst ResellerzoneNavigationProvider = ({navigation, menu, ...props}) => {\n const {isAuthenticated} = useAuth()\n const [{entity: resellerProfile, loading}, load] = usePureEntity({name: 'profile'})\n\n useEffect(() => {\n if (isAuthenticated ) {\n load();\n }\n }, [isAuthenticated, load]);\n\n const currentMenu = useMemo(() => menu(resellerProfile), [menu, resellerProfile]);\n\n return <NavigationContext.Provider value={{navigation, menu: currentMenu}} {...props} />;\n};\n\nexport default ResellerzoneNavigationProvider;","import React, {useEffect, useMemo} from 'react';\nimport PageContext from \"@fik/page/PageContext\";\nimport usePage from \"@fik/page/usePage\";\nimport {useCmsPageBlocks} from \"@fik/cms\";\n\nconst ResellerzonePageProvider = (props) => {\n const {page, setPageInfo, setPageLocation} = usePage();\n const [blocks, initPage] = useCmsPageBlocks();\n\n useEffect(() => {\n initPage(page.path, page.blocks);\n }, [initPage, page]);\n\n const value = useMemo(() => ({page, setPageInfo, setPageLocation, blocks}), [page, setPageInfo, setPageLocation, blocks]);\n\n return <PageContext.Provider value={value} {...props} />;\n};\n\nexport default ResellerzonePageProvider;","const mapResourceParamsToRequestParams = (resource, params = {}, content = null) => {\n\n const requestParams = {...params};\n\n if (resource === 'profile') {\n requestParams.path = '/api/profile';\n }\n\n if (resource === 'loyalties') {\n requestParams.path = '/api/loyalties';\n }\n\n\n let path;\n if (requestParams.path) {\n path = requestParams.path;\n delete requestParams.path;\n } else {\n path = `api/resource/${resource}`;\n }\n\n if (requestParams.id) {\n path += `/${encodeURIComponent(requestParams.id)}`;\n delete requestParams.id;\n }\n\n if (requestParams.action) {\n path += `/action/${requestParams.action}`;\n delete requestParams.action;\n }\n\n return {\n url: path,\n params: requestParams,\n data: content\n }\n};\n\nconst isInvalidResponse = (res) => (!res.data.body || !res.data.success);\n\nconst mapResponse = (res) => res.data.body;\n\nconst axiosRequest = async (axiosInstance, requestParameters) => {\n return axiosInstance(requestParameters)\n .then(res => {\n if (isInvalidResponse(res)) {\n const e = Error('Invalid response');\n e.data = res;\n throw e;\n }\n return mapResponse(res);\n });\n};\n\nconst wrapWithStore = (store, key, promise) => {\n const stored = store.get(key);\n\n if (stored) {\n return new Promise((resolve) => resolve(stored));\n }\n\n return promise.then((result) => {\n store.save(key, result);\n return result;\n });\n};\n\nconst resourceRequestConfig = (resource, method, params, content) => {\n const requestParams = mapResourceParamsToRequestParams(resource, params, content);\n requestParams.method = method;\n return requestParams;\n};\n\nexport const resourceAdapter = (axiosInstance) => (resource) => {\n return {\n get: (params) => axiosRequest(axiosInstance, resourceRequestConfig(resource, 'GET', params)),\n put: (params, content) => axiosRequest(axiosInstance, resourceRequestConfig(resource, 'PUT', params, content)),\n post: (params, content) => axiosRequest(axiosInstance, resourceRequestConfig(resource, 'POST', params, content)),\n remove: (params) => axiosRequest(axiosInstance, resourceRequestConfig(resource, 'REMOVE', params)),\n }\n};\n\nexport const cmsAdapter = (axiosInstance, store) => () => {\n return {\n getMenu: () => axiosRequest(axiosInstance, {url: 'api/cms/content/menu'}),\n getPage: (category, page) => axiosRequest(axiosInstance, {url: 'api/cms/content/page/' + encodeURIComponent(category) + '/' + encodeURIComponent(page)}),\n getPageBlocks: (category, page, blocks) => wrapWithStore(\n store,\n `${category}-${page}-${blocks.join('-')}`,\n axiosRequest(axiosInstance, {url: 'api/cms/content/blocks/' + encodeURIComponent(category) + '/' + encodeURIComponent(page) + '?blocks=' + blocks.join(',')}),\n ),\n getFiles: () => axiosRequest(axiosInstance, {url: 'api/cms/files'}),\n getFeeds: (feedGroupId) => axiosRequest(axiosInstance, {url: 'api/cms/resource/article/action/feeds?tagGroupId=' + feedGroupId}),\n getArticle: (id) => axiosRequest(axiosInstance, {url: 'api/cms/resource/article/' + encodeURIComponent(id)}),\n }\n};\n\nexport const authenticationAdapters = (axiosInstance) => () => {\n return {\n authenticate: (credentials) => axiosRequest(axiosInstance, {\n url: credentials.username ? '/api/authenticate/user' : '/api/authenticate/token',\n data: credentials,\n method: 'POST'\n })\n .then((response) => {\n return {\n ...response,\n userId: response.contactId\n }\n }),\n forgotPassword: (credentials) => axiosRequest(axiosInstance, {\n url: '/api/authenticate/forgot-password',\n data: credentials,\n method: 'POST'\n }\n ),\n validateResetPassword: ({id}) => axiosRequest(axiosInstance, {\n url: '/api/authenticate/validate-reset-password',\n data: {id},\n method: 'POST'\n }\n ),\n resetPassword: (values) => axiosRequest(axiosInstance, {\n url: '/api/authenticate/reset-password',\n data: values,\n method: 'POST'\n }\n ),\n getUserByToken: (accessToken) => axiosRequest(axiosInstance, {\n url: '/api/authenticate/token',\n data: {access_token: accessToken},\n method: 'POST'\n }\n )\n .then((response) => {\n return {\n ...response,\n userId: response.contactId\n }\n }),\n setAuthorizationToken: (token) => axiosInstance.defaults.headers.common['Authorization'] = `Bearer ${token}`\n }\n};\n\nexport const identityAdapter = (axiosInstance, credentials) => (resource) => {\n return {\n get: (token) => {\n return authenticationAdapters(axiosInstance)().getUserByToken(token)\n },\n }\n};\n\nexport const dataSourceAdapter = (axiosInstance, action = 'data-source') => (resource) => {\n return {\n getDataSource: (params) => {\n return resourceAdapter(axiosInstance)(resource).get({action: action, ...params})\n }\n }\n};","// moment.js locale configuration\n// locale : czech (cs)\n// author : petrbela : https://github.com/petrbela\nimport moment from \"moment\";\nfunction moment_init_cs(moment) {\n var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_'),\n monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_');\n\n function plural(n) {\n return (n > 1) && (n < 5) && (~~(n / 10) !== 1);\n }\n\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's': // a few seconds / in a few seconds / a few seconds ago\n return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami';\n case 'm': // a minute / in a minute / a minute ago\n return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou');\n case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'minuty' : 'minut');\n } else {\n return result + 'minutami';\n }\n case 'h': // an hour / in an hour / an hour ago\n return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');\n case 'hh': // 9 hours / in 9 hours / 9 hours ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'hodiny' : 'hodin');\n } else {\n return result + 'hodinami';\n }\n case 'd': // a day / in a day / a day ago\n return (withoutSuffix || isFuture) ? 'den' : 'dnem';\n case 'dd': // 9 days / in 9 days / 9 days ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'dny' : 'dní');\n } else {\n return result + 'dny';\n }\n case 'M': // a month / in a month / a month ago\n return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem';\n case 'MM': // 9 months / in 9 months / 9 months ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'měsíce' : 'měsíců');\n } else {\n return result + 'měsíci';\n }\n case 'y': // a year / in a year / a year ago\n return (withoutSuffix || isFuture) ? 'rok' : 'rokem';\n case 'yy': // 9 years / in 9 years / 9 years ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'roky' : 'let');\n } else {\n return result + 'lety';\n }\n }\n }\n\n return moment.defineLocale('cs', {\n months : months,\n monthsShort : monthsShort,\n monthsParse : (function (months, monthsShort) {\n var i, _monthsParse = [];\n for (i = 0; i < 12; i++) {\n // use custom parser to solve problem with July (červenec)\n _monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');\n }\n return _monthsParse;\n }(months, monthsShort)),\n weekdays : 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),\n weekdaysShort : 'ne_po_út_st_čt_pá_so'.split('_'),\n weekdaysMin : 'ne_po_út_st_čt_pá_so'.split('_'),\n longDateFormat : {\n LT: 'H:mm',\n L : 'DD. MM. YYYY',\n LL : 'D. MMMM YYYY',\n LLL : 'D. MMMM YYYY LT',\n LLLL : 'dddd D. MMMM YYYY LT'\n },\n calendar : {\n sameDay: '[dnes v] LT',\n nextDay: '[zítra v] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[v neděli v] LT';\n case 1:\n case 2:\n return '[v] dddd [v] LT';\n case 3:\n return '[ve středu v] LT';\n case 4:\n return '[ve čtvrtek v] LT';\n case 5:\n return '[v pátek v] LT';\n case 6:\n return '[v sobotu v] LT';\n }\n },\n lastDay: '[včera v] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[minulou neděli v] LT';\n case 1:\n case 2:\n return '[minulé] dddd [v] LT';\n case 3:\n return '[minulou středu v] LT';\n case 4:\n case 5:\n return '[minulý] dddd [v] LT';\n case 6:\n return '[minulou sobotu v] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime : {\n future : 'za %s',\n past : 'před %s',\n s : translate,\n m : translate,\n mm : translate,\n h : translate,\n hh : translate,\n d : translate,\n dd : translate,\n M : translate,\n MM : translate,\n y : translate,\n yy : translate\n },\n ordinal : '%d.',\n week : {\n dow : 1, // Monday is the first day of the week.\n doy : 4 // The week that contains Jan 4th is the first week of the year.\n }\n });\n}\n\nmoment_init_cs(moment);\n","import parseQueryString from \"@fik/utils/parseQueryString\";\n\nconst createLoginUrl = (nonce, {state, url, response_type, clientId, redirectUrl, scope}) => {\n return new Promise((resolve, reject) => {\n resolve(\n url\n + \"?response_type=\"\n + response_type\n + \"&client_id=\"\n + encodeURIComponent(clientId)\n + \"&state=\"\n + encodeURIComponent(state ? nonce + \";\" + state : nonce)\n + \"&redirect_uri=\"\n + encodeURIComponent(redirectUrl)\n + \"&scope=\"\n + encodeURIComponent(scope)\n );\n });\n};\n\nconst getFragment = () => {\n if (window.location.hash.indexOf(\"#\") === 0) {\n return parseQueryString(window.location.hash.substr(1));\n } else {\n return {};\n }\n};\n\n\nconst checkoutHash = (savedNonce) => {\n // parsnem s url vse za hashem #access_token=xxx,state=xxx,expires_in=xxx\n const {access_token, state, expires_in, refresh_token, username, user_id} = getFragment();\n\n // pokud neni access_token a state tak to neni navratove url\n if (!access_token || !state) return null;\n\n // porovname - nechceme aby se dalo prihlasit bez nonce\n const stateParts = state.split(';');\n const [nonceInState] = stateParts;\n if (savedNonce === nonceInState) {\n return {\n token: access_token,\n refreshToken: refresh_token,\n state,\n expiresIn: expires_in,\n username,\n userId: user_id\n };\n }\n\n return null;\n};\n\nexport const createRedirectAuthenticator = (authentication, {url, response_type = 'token', clientId, scope, redirectUrl, userUrl}) => {\n\n const initImplicitFlow = (additionalState) => {\n authentication.authStorage.createNonce()\n .then((nonce) => {\n return createLoginUrl(nonce, {state: additionalState, url, response_type, clientId, scope, redirectUrl})\n .then((url) => {\n window.location.href = url;\n });\n });\n };\n\n return (additionalState = \"\") => {\n\n // mame validni access_token netreba niceho\n if (authentication.authTokenCheck()) {\n authentication.setAuthorizationToken(authentication.authStorage.getAccessToken());\n return true;\n }\n\n // zkontrolujeme jestli je v url hash cast vracena s sso\n const validHashParams = checkoutHash(authentication.authStorage.getNonce());\n\n //pokud ano\n if (validHashParams) {\n // odstranime hash cast v url\n window.location.hash = '';\n\n // ulozime v session\n authentication.authStorage.persistAuthResponse(validHashParams);\n authentication.setAuthorizationToken(authentication.authStorage.getAccessToken());\n return true;\n } else {\n // neni a tim padem musime prejit na prihlaseni\n initImplicitFlow(additionalState);\n return false;\n }\n };\n};\n\n","import 'react-app-polyfill/ie9';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport {Provider} from \"react-redux\";\n\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nimport \"bootstrap/dist/css/bootstrap.min.css\";\nimport 'font-awesome/css/font-awesome.css';\nimport '@fik/inspinia/dist/css/style.css';\nimport '@fik/inspinia/dist/css/datepicker.css';\n\nimport prepareStore from './store';\n\nimport createResellerZoneModel from \"./resellerzone\";\nimport {ModelProvider} from \"@fik/model\";\nimport {AuthIdentityProvider} from \"@fik/auth\";\nimport ResellerzoneNavigationProvider from \"./ResellerzoneNavigationProvider\";\nimport {LoadingProvider} from \"@fik/loading\";\nimport ResellerzonePageProvider from \"./components/ResellerzonePageProvider\";\n\nimport * as adapters from \"./resellerzone/adapter\";\nimport models from \"./resellerzone/models\";\nimport {AppStorageProvider} from \"@fik/storage\";\nimport moment from \"moment\";\nimport \"./locale/cs\";\nimport {createRedirectAuthenticator} from \"@fik/auth/redirectAuthenticator\";\n\nconst model = createResellerZoneModel({baseURL: process.env.REACT_APP_API_URL, adapters, models});\nconst store = prepareStore(model);\nmoment.locale('cs');\n\nconst resellerAuthenticate = createRedirectAuthenticator(model.authentication(), {\n clientId: '00c48e24-f0ce-5f40-b2f1-94e9302718a2',\n redirectUrl: window.location.origin,\n scope: 'fik',\n url: process.env.REACT_APP_SSO_URL + '/sign'\n});\n\nReactDOM.render(\n <>\n <ModelProvider model={model}>\n <Provider store={store}>\n <AppStorageProvider storage={window.sessionStorage}>\n <LoadingProvider>\n <AuthIdentityProvider>\n <ResellerzoneNavigationProvider navigation={model.navigation()} menu={model.menu}>\n <ResellerzonePageProvider>\n <App/>\n </ResellerzonePageProvider>\n </ResellerzoneNavigationProvider>\n </AuthIdentityProvider>\n </LoadingProvider>\n </AppStorageProvider>\n </Provider>\n </ModelProvider>\n </>,\n document.getElementById('wrapper')\n);\n\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();"],"sourceRoot":""}