{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./_carbon.tsx","webpack:///./errors/CancelledError.ts","webpack:///./errors/HttpError.ts","webpack:///./hooks/useAction.ts","webpack:///./hooks/useBoundAction.ts","webpack:///./hooks/useParametricSelector.ts","webpack:///./index.tsx","webpack:///./init.tsx","webpack:///./io/codecs/IntegerFromString.ts","webpack:///./io/codecs/NativeBlob.ts","webpack:///./io/codecs/NumberFromString.ts","webpack:///./io/combinators/ReadOnlyArray.ts","webpack:///./io/utils/decodeOrGet.ts","webpack:///./io/utils/decodeOrThrow.ts","webpack:///./migration/react-intl.tsx","webpack:///./modules/announcements/actions/AnnouncementsActions.ts","webpack:///./modules/announcements/components/AnnouncementsEmpty.tsx","webpack:///./modules/announcements/reducers/announcementsReducer.ts","webpack:///./modules/announcements/sagas/announcementsSaga.ts","webpack:///./modules/announcements/sagas/fetchAnnouncements.ts","webpack:///./modules/announcements/sagas/readAnnouncements.ts","webpack:///./modules/announcements/sagas/utils/loadAnnouncements.ts","webpack:///./modules/announcements/sagas/utils/readAnnouncement.ts","webpack:///./modules/announcements/selectors/getAnnouncementState.ts","webpack:///./modules/announcements/views/Announcements.tsx","webpack:///./modules/api/sagas/utils/makeRestRequest.ts","webpack:///./modules/api/utils/isHttpError.ts","webpack:///./modules/asset/actions/AssetActions.ts","webpack:///./modules/asset/reducers/assetCancelReducer.ts","webpack:///./modules/asset/reducers/assetReducer.ts","webpack:///./modules/asset/reducers/assetUploadReducer.ts","webpack:///./modules/asset/sagas/assetSaga.ts","webpack:///./modules/asset/sagas/assetUploadSaga.ts","webpack:///./modules/asset/sagas/utils/uploadAsset.ts","webpack:///./modules/asset/selectors/getAssetState.ts","webpack:///./modules/asset/utils/isValidImageData.ts","webpack:///./modules/asset/utils/numberToUnit32.ts","webpack:///./modules/asset/views/AssetUpload.tsx","webpack:///./modules/asset/views/FileUpload.tsx","webpack:///./modules/basedata/actions/BasedataActions.ts","webpack:///./modules/basedata/constants/schema.ts","webpack:///./modules/basedata/pages/BasedataPage.tsx","webpack:///./modules/basedata/sagas/basedataChangeSaga.ts","webpack:///./modules/basedata/sagas/basedataSaga.ts","webpack:///./modules/basedata/selectors/getBasedataFormData.ts","webpack:///./modules/basedata/views/BasedataFormView.tsx","webpack:///./modules/common/codecs/Announcement.ts","webpack:///./modules/common/codecs/Asset.ts","webpack:///./modules/common/codecs/AuthUser.ts","webpack:///./modules/common/codecs/ContainerType.ts","webpack:///./modules/common/codecs/DeviceType.ts","webpack:///./modules/common/codecs/Empty.ts","webpack:///./modules/common/codecs/EnergyEfficiencyClass.ts","webpack:///./modules/common/codecs/FlowDirection.ts","webpack:///./modules/common/codecs/Language.ts","webpack:///./modules/common/codecs/NonEmptyString.ts","webpack:///./modules/common/codecs/Organization.ts","webpack:///./modules/common/codecs/Orientation.ts","webpack:///./modules/common/codecs/Project.ts","webpack:///./modules/common/codecs/ThermalEnergy.ts","webpack:///./modules/common/codecs/UserRole.ts","webpack:///./modules/common/codecs/UserSettings.ts","webpack:///./modules/common/codecs/XlsxValue.ts","webpack:///./modules/common/components/AreaUnitView.tsx","webpack:///./modules/common/components/AssetImage.tsx","webpack:///./modules/common/components/BlobImage.tsx","webpack:///./modules/common/components/BottomNavigationHelper.tsx","webpack:///./modules/common/components/CarbonIntensityUnit.tsx","webpack:///./modules/common/components/CarbonSavingsUnit.tsx","webpack:///./modules/common/components/Checkbox.tsx","webpack:///./modules/common/components/CurrencySymbol.tsx","webpack:///./modules/common/components/CustomBreadcrumbItem.tsx","webpack:///./modules/common/components/CustomButton.tsx","webpack:///./modules/common/components/CustomLoading.tsx","webpack:///./modules/common/components/CustomMenu.tsx","webpack:///./modules/common/components/CustomMenuItem.tsx","webpack:///./modules/common/components/CustomModal.tsx","webpack:///./modules/common/components/CustomTabList.tsx","webpack:///./modules/common/components/CustomToggle.tsx","webpack:///./modules/common/components/Divider.tsx","webpack:///./modules/common/components/Dropdown.tsx","webpack:///./modules/common/components/EnergyEfficiencyLabel.tsx","webpack:///./modules/common/components/EnergyEfficiencyLabelWrapper.tsx","webpack:///./modules/common/components/EnergyEfficiencyStack.tsx","webpack:///./modules/common/components/EnergyEfficiencyTransition.tsx","webpack:///./modules/common/components/EnergyPriceUnit.tsx","webpack:///./modules/common/components/EnergySavingsUnit.tsx","webpack:///./modules/common/components/EnergySourceUnit.tsx","webpack:///./modules/common/components/Footer.tsx","webpack:///./modules/common/components/FormSection.tsx","webpack:///./modules/common/components/FormattedAmount.tsx","webpack:///./modules/common/components/FormattedBEP.tsx","webpack:///./modules/common/components/FormattedMathMessage.tsx","webpack:///./modules/common/components/FormattedNumber.tsx","webpack:///./modules/common/components/FormattedValue.tsx","webpack:///./modules/common/components/Header.tsx","webpack:///./modules/common/components/HorizontalDivider.tsx","webpack:///./modules/common/components/Lifecycle.tsx","webpack:///./modules/common/components/OnboardingModal.tsx","webpack:///./modules/common/components/OverflowMenu.tsx","webpack:///./modules/common/components/OverflowMenuItem.tsx","webpack:///./modules/common/components/PreserveContent.tsx","webpack:///./modules/common/components/ProjectTitle.tsx","webpack:///./modules/common/components/ProjectToolbar.tsx","webpack:///./modules/common/components/Rating.tsx","webpack:///./modules/common/components/SavingTileAmount.tsx","webpack:///./modules/common/components/SavingTileCard.tsx","webpack:///./modules/common/components/SavingsAmount.tsx","webpack:///./modules/common/components/SavingsValue.tsx","webpack:///./modules/common/components/SupScript.tsx","webpack:///./modules/common/components/SvgFile.tsx","webpack:///./modules/common/components/TileCard.tsx","webpack:///./modules/common/components/Tooltip.tsx","webpack:///./modules/common/components/UserForm.tsx","webpack:///./modules/common/components/UserLanguage.tsx","webpack:///./modules/common/components/UserProfile.tsx","webpack:///./modules/common/constants/dateFormat.ts","webpack:///./modules/common/constants/decimal.ts","webpack:///./modules/common/constants/energyEfficiencyLabels.tsx","webpack:///./modules/common/constants/factorWeightedLabel.ts","webpack:///./modules/common/constants/fileField.ts","webpack:///./modules/common/constants/formattingHelpers.tsx","webpack:///./modules/common/constants/integer.ts","webpack:///./modules/common/constants/language.ts","webpack:///./modules/common/constants/links.ts","webpack:///./modules/common/constants/localStorageKeys.ts","webpack:///./modules/common/constants/locale.ts","webpack:///./modules/common/constants/matrix.ts","webpack:///./modules/common/constants/options.ts","webpack:///./modules/common/constants/theme.tsx","webpack:///./modules/common/hooks/useCountryList.ts","webpack:///./modules/common/hooks/useOutsideClick.ts","webpack:///./modules/common/hooks/usePrevious.ts","webpack:///./modules/common/icons/ArrowDownIcon.tsx","webpack:///./modules/common/icons/ArrowLeftIcon.tsx","webpack:///./modules/common/icons/ArrowRightIcon.tsx","webpack:///./modules/common/icons/ArrowUpIcon.tsx","webpack:///./modules/common/icons/BellIcon.tsx","webpack:///./modules/common/icons/ChartUpIcon.tsx","webpack:///./modules/common/icons/CheckIcon.tsx","webpack:///./modules/common/icons/ChevronDownIcon.tsx","webpack:///./modules/common/icons/ChevronUpIcon.tsx","webpack:///./modules/common/icons/CircleCheckFilledIcon.tsx","webpack:///./modules/common/icons/CircleFilledIcon.tsx","webpack:///./modules/common/icons/CloudIcon.tsx","webpack:///./modules/common/icons/CommentIcon.tsx","webpack:///./modules/common/icons/CoolingIcon.tsx","webpack:///./modules/common/icons/CopyIcon.tsx","webpack:///./modules/common/icons/CrossIcon.tsx","webpack:///./modules/common/icons/CurrencyExchangeIcon.tsx","webpack:///./modules/common/icons/DateIcon.tsx","webpack:///./modules/common/icons/DeleteIcon.tsx","webpack:///./modules/common/icons/DownloadIcon.tsx","webpack:///./modules/common/icons/EditIcon.tsx","webpack:///./modules/common/icons/FanIcon.tsx","webpack:///./modules/common/icons/FileIcon.tsx","webpack:///./modules/common/icons/FilterIcon.tsx","webpack:///./modules/common/icons/GlobeIcon.tsx","webpack:///./modules/common/icons/GridViewIcon.tsx","webpack:///./modules/common/icons/HeatingIcon.tsx","webpack:///./modules/common/icons/IconWrapper.tsx","webpack:///./modules/common/icons/LightningIcon.tsx","webpack:///./modules/common/icons/ListViewIcon.tsx","webpack:///./modules/common/icons/LoadingIcon.tsx","webpack:///./modules/common/icons/MailIcon.tsx","webpack:///./modules/common/icons/PlusIcon.tsx","webpack:///./modules/common/icons/QuestionIcon.tsx","webpack:///./modules/common/icons/ResetIcon.tsx","webpack:///./modules/common/icons/SearchIcon.tsx","webpack:///./modules/common/icons/ShareOff.tsx","webpack:///./modules/common/icons/StarFilledIcon.tsx","webpack:///./modules/common/icons/StarIcon.tsx","webpack:///./modules/common/icons/UploadIcon.tsx","webpack:///./modules/common/icons/UserIcon.tsx","webpack:///./modules/common/icons/WarningIcon.tsx","webpack:///./modules/common/layouts/AdminLayout.tsx","webpack:///./modules/common/layouts/AppLayout.tsx","webpack:///./modules/common/layouts/DocumentLayout.tsx","webpack:///./modules/common/layouts/LoginLayout.tsx","webpack:///./modules/common/sagas/utils/createProject.ts","webpack:///./modules/common/sagas/utils/loadProject.ts","webpack:///./modules/common/sagas/utils/removeProject.ts","webpack:///./modules/common/sagas/utils/updateProject.ts","webpack:///./modules/common/selectors/getProjectLazy.ts","webpack:///./modules/common/types/ChangeOverLevel.ts","webpack:///./modules/common/types/DeviceType.ts","webpack:///./modules/common/types/DifferentTemperatureLevel.ts","webpack:///./modules/common/types/FlowDirection.ts","webpack:///./modules/common/types/Future.ts","webpack:///./modules/common/types/Orientation.ts","webpack:///./modules/common/types/ProjectReportCoverContacts.ts","webpack:///./modules/common/types/ThermalEnergy.ts","webpack:///./modules/common/types/UserRole.ts","webpack:///./modules/common/types/WaterToAir.ts","webpack:///./modules/common/typography/BodyDesktopLargeRegularText.tsx","webpack:///./modules/common/typography/BodyDesktopSmallLightText.tsx","webpack:///./modules/common/typography/BodyLargeLightText.tsx","webpack:///./modules/common/typography/BodyLargeRegularText.tsx","webpack:///./modules/common/typography/BodySmallText.tsx","webpack:///./modules/common/typography/BodyText.tsx","webpack:///./modules/common/typography/DesktopLargeText.tsx","webpack:///./modules/common/typography/HeadlineSmallText.tsx","webpack:///./modules/common/typography/LeadText.tsx","webpack:///./modules/common/typography/OverlineDesktopSmallText.tsx","webpack:///./modules/common/typography/TitleText.tsx","webpack:///./modules/common/utils/decorator.ts","webpack:///./modules/common/utils/either.ts","webpack:///./modules/common/utils/formatProjectDetailsSubTitle.ts","webpack:///./modules/common/utils/htmlToReact.tsx","webpack:///./modules/common/utils/interpolation.ts","webpack:///./modules/common/utils/language.ts","webpack:///./modules/common/utils/locale.ts","webpack:///./modules/common/utils/matrix.ts","webpack:///./modules/common/utils/optional.ts","webpack:///./modules/common/utils/ord.ts","webpack:///./modules/common/utils/point.ts","webpack:///./modules/common/utils/spring.ts","webpack:///./modules/common/utils/svg.ts","webpack:///./modules/config/actions/ConfigActions.ts","webpack:///./modules/config/codecs/ConfigContainer.ts","webpack:///./modules/config/codecs/ConfigDevice.ts","webpack:///./modules/config/codecs/ConfigHvac.ts","webpack:///./modules/config/codecs/ConfigSchema.ts","webpack:///./modules/config/codecs/Environment.ts","webpack:///./modules/config/containers/ConfigProvider.tsx","webpack:///./modules/config/reducers/configFetchReducer.ts","webpack:///./modules/config/reducers/configLanguageSwitchReducer.ts","webpack:///./modules/config/reducers/configReducer.ts","webpack:///./modules/config/sagas/configFetchSaga.ts","webpack:///./modules/config/sagas/configLanguageSwitchSaga.ts","webpack:///./modules/config/sagas/configSaga.ts","webpack:///./modules/config/sagas/utils/loadConfig.ts","webpack:///./modules/config/sagas/utils/loadContainers.ts","webpack:///./modules/config/sagas/utils/loadDevices.ts","webpack:///./modules/config/sagas/utils/loadEnvironment.ts","webpack:///./modules/config/sagas/utils/loadHvacConfig.ts","webpack:///./modules/config/sagas/utils/loadLanguage.ts","webpack:///./modules/config/sagas/utils/loadLocale.ts","webpack:///./modules/config/sagas/utils/loadSchemas.ts","webpack:///./modules/config/sagas/utils/loadTranslations.ts","webpack:///./modules/config/sagas/utils/saveLanguage.ts","webpack:///./modules/config/selectors/getApiBaseUrl.ts","webpack:///./modules/config/selectors/getConfigData.ts","webpack:///./modules/config/selectors/getConfigSchemas.ts","webpack:///./modules/config/selectors/getConfigState.ts","webpack:///./modules/config/selectors/getCurrentDate.ts","webpack:///./modules/config/selectors/getEnvironmentLanguages.ts","webpack:///./modules/config/selectors/getHvacConfig.ts","webpack:///./modules/config/selectors/getLanguage.ts","webpack:///./modules/config/selectors/getLocale.ts","webpack:///./modules/config/selectors/getTolgeeInstance.ts","webpack:///./modules/config/selectors/getTranslator.ts","webpack:///./modules/config/utils/sentryCatch.ts","webpack:///./modules/config/utils/sentryInit.ts","webpack:///./modules/error/containers/ErrorBoundary.tsx","webpack:///./modules/error/pages/ErrorPage.tsx","webpack:///./modules/error/views/ErrorMessage.tsx","webpack:///./modules/error/views/ErrorView.tsx","webpack:///./modules/evaluation/actions/EvaluationActions.ts","webpack:///./modules/evaluation/pages/EvaluationPage.tsx","webpack:///./modules/evaluation/sagas/evaluationChangeSaga.ts","webpack:///./modules/evaluation/sagas/evaluationSaga.ts","webpack:///./modules/evaluation/selectors/getEvaluationFormData.ts","webpack:///./modules/evaluation/selectors/getEvaluationResults.ts","webpack:///./modules/evaluation/views/EvaluationFormView.tsx","webpack:///./modules/evaluation/views/EvaluationResultsCharts.tsx","webpack:///./modules/evaluation/views/EvaluationResultsChartsGraphArea.tsx","webpack:///./modules/evaluation/views/EvaluationResultsChartsGraphBEP.tsx","webpack:///./modules/evaluation/views/EvaluationResultsChartsGraphCO2.tsx","webpack:///./modules/evaluation/views/EvaluationResultsChartsGraphIRR.tsx","webpack:///./modules/evaluation/views/EvaluationResultsChartsGraphROI.tsx","webpack:///./modules/evaluation/views/EvaluationResultsChartsXTick.tsx","webpack:///./modules/evaluation/views/EvaluationResultsSavings.tsx","webpack:///./modules/evaluation/views/EvaluationScreen.tsx","webpack:///./modules/feedback/actions/FeedbackActions.ts","webpack:///./modules/feedback/constants/feedbackModal.ts","webpack:///./modules/feedback/constants/formData.ts","webpack:///./modules/feedback/constants/schema.ts","webpack:///./modules/feedback/reducers/feedbackCounterReducer.ts","webpack:///./modules/feedback/reducers/feedbackModalReducer.ts","webpack:///./modules/feedback/reducers/feedbackReducer.ts","webpack:///./modules/feedback/sagas/feedbackResetSaga.ts","webpack:///./modules/feedback/sagas/feedbackSaga.ts","webpack:///./modules/feedback/sagas/feedbackSendSaga.ts","webpack:///./modules/feedback/sagas/feedbackUpdateSaga.ts","webpack:///./modules/feedback/sagas/utils/resetFeedbackCounter.ts","webpack:///./modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter.ts","webpack:///./modules/feedback/sagas/utils/sendFeedback.ts","webpack:///./modules/feedback/sagas/utils/updateFeedbackCounter.ts","webpack:///./modules/feedback/selectors/getFeedbackModal.ts","webpack:///./modules/feedback/views/FeedbackButton.tsx","webpack:///./modules/feedback/views/FeedbackForm.tsx","webpack:///./modules/feedback/views/FeedbackModal.tsx","webpack:///./modules/feedback/views/FeedbackSent.tsx","webpack:///./modules/form/components/AssetField.tsx","webpack:///./modules/form/components/AutocompleteField.tsx","webpack:///./modules/form/components/CheckboxField.tsx","webpack:///./modules/form/components/DateboxField.tsx","webpack:///./modules/form/components/DecimalField.tsx","webpack:///./modules/form/components/DropdownField.tsx","webpack:///./modules/form/components/FileField.tsx","webpack:///./modules/form/components/PasswordField.tsx","webpack:///./modules/form/components/RatingField.tsx","webpack:///./modules/form/components/SearchField.tsx","webpack:///./modules/form/components/TextAreaField.tsx","webpack:///./modules/form/components/TextField.tsx","webpack:///./modules/form/components/ToggleField.tsx","webpack:///./modules/form/hooks/useFormResolver.ts","webpack:///./modules/form/hooks/useFormValidator.ts","webpack:///./modules/form/sagas/utils/formSubmitFailure.ts","webpack:///./modules/form/sagas/utils/formSubmitStart.ts","webpack:///./modules/form/sagas/utils/formSubmitSuccess.ts","webpack:///./modules/form/sagas/utils/formValidate.ts","webpack:///./modules/form/utils/rules.ts","webpack:///./modules/form/utils/transform.ts","webpack:///./modules/form/utils/validate.ts","webpack:///./modules/hvac/actions/HvacActions.ts","webpack:///./modules/hvac/constants/ISOCategories.ts","webpack:///./modules/hvac/pages/HvacPage.tsx","webpack:///./modules/hvac/sagas/hvacChangeSaga.ts","webpack:///./modules/hvac/sagas/hvacSaga.ts","webpack:///./modules/hvac/selectors/getHvacAssesmentFormData.ts","webpack:///./modules/hvac/selectors/getHvacBuildingFormData.ts","webpack:///./modules/hvac/selectors/getHvacConfig.ts","webpack:///./modules/hvac/selectors/getHvacCurrencyCode.ts","webpack:///./modules/hvac/selectors/getHvacData.ts","webpack:///./modules/hvac/selectors/getHvacFormCounters.ts","webpack:///./modules/hvac/selectors/getHvacFormData.ts","webpack:///./modules/hvac/selectors/getHvacResults.ts","webpack:///./modules/hvac/selectors/getHvacResultsInaccurate.ts","webpack:///./modules/hvac/selectors/getHvacResultsOverallRating.ts","webpack:///./modules/hvac/types/HvacAssessmentCategories.ts","webpack:///./modules/hvac/utils/filterHvacSectonByCategory.ts","webpack:///./modules/hvac/utils/getDefaultFormAnswer.ts","webpack:///./modules/hvac/utils/getDefaultFormSection.ts","webpack:///./modules/hvac/utils/getDefaultFormVariant.ts","webpack:///./modules/hvac/utils/getReportHvacEnergy.ts","webpack:///./modules/hvac/utils/mapHvacFormToStore.ts","webpack:///./modules/hvac/utils/mapHvacStoreToForm.ts","webpack:///./modules/hvac/utils/resolveHvacFormData.ts","webpack:///./modules/hvac/views/HvacFormAssessmentView.tsx","webpack:///./modules/hvac/views/HvacFormChapter.tsx","webpack:///./modules/hvac/views/HvacFormClearConfirmationModal.tsx","webpack:///./modules/hvac/views/HvacFormCommentModal.tsx","webpack:///./modules/hvac/views/HvacFormSection.tsx","webpack:///./modules/hvac/views/HvacFormSectionAdditionalInput.tsx","webpack:///./modules/hvac/views/HvacFormSectionAdditionals.tsx","webpack:///./modules/hvac/views/HvacFormSectionContent.tsx","webpack:///./modules/hvac/views/HvacFormSectionCopy.tsx","webpack:///./modules/hvac/views/HvacFormSectionCopyDeleteConfirmationModal.tsx","webpack:///./modules/hvac/views/HvacFormSectionCopyTitleModal.tsx","webpack:///./modules/hvac/views/HvacFormSectionFormBlock.tsx","webpack:///./modules/hvac/views/HvacFormSectionHeader.tsx","webpack:///./modules/hvac/views/HvacFormSetupField.tsx","webpack:///./modules/hvac/views/HvacFormSetupOption.tsx","webpack:///./modules/hvac/views/HvacResultEnergyElectricalView.tsx","webpack:///./modules/hvac/views/HvacResultEnergyPricesView.tsx","webpack:///./modules/hvac/views/HvacResultEnergyThermalView.tsx","webpack:///./modules/hvac/views/HvacResultEnergyView.tsx","webpack:///./modules/hvac/views/HvacResultSavingsExplanation.tsx","webpack:///./modules/hvac/views/HvacResultSavingsOverall.tsx","webpack:///./modules/hvac/views/HvacResultSavingsSystem.tsx","webpack:///./modules/hvac/views/HvacResultSavingsView.tsx","webpack:///./modules/hvac/views/HvacResultSummaryChapter.tsx","webpack:///./modules/hvac/views/HvacResultSummaryView.tsx","webpack:///./modules/loader/actions/LoaderActions.ts","webpack:///./modules/loader/sagas/loaderSaga.ts","webpack:///./modules/loader/sagas/utils/loadingIndicator.ts","webpack:///./modules/login/actions/LoginActions.ts","webpack:///./modules/login/actions/RequestAccessActions.ts","webpack:///./modules/login/actions/UserSettingsActions.ts","webpack:///./modules/login/actions/WhoAmIAction.ts","webpack:///./modules/login/constants/schema.ts","webpack:///./modules/login/pages/LoginPage.tsx","webpack:///./modules/login/reducers/loginReducer.ts","webpack:///./modules/login/reducers/loginUserReducer.ts","webpack:///./modules/login/reducers/userSettingsReducer.ts","webpack:///./modules/login/sagas/loginPerformSaga.ts","webpack:///./modules/login/sagas/loginSaga.ts","webpack:///./modules/login/sagas/requestAccessSubmitSaga.ts","webpack:///./modules/login/sagas/updateUserSettingsSaga.ts","webpack:///./modules/login/sagas/utils/loadUser.ts","webpack:///./modules/login/sagas/utils/performLogin.ts","webpack:///./modules/login/sagas/utils/performLogout.ts","webpack:///./modules/login/sagas/utils/submitRequestAccess.ts","webpack:///./modules/login/sagas/utils/updateUserSettings.ts","webpack:///./modules/login/selectors/getIsAuthenticated.ts","webpack:///./modules/login/selectors/getLoggedInUser.ts","webpack:///./modules/login/selectors/getLoginState.ts","webpack:///./modules/login/views/LoginScreen.tsx","webpack:///./modules/login/views/RequestAccessModal.tsx","webpack:///./modules/modals/actions/ModalActions.ts","webpack:///./modules/modals/pages/ModalStack.tsx","webpack:///./modules/modals/pages/ModalWrapper.tsx","webpack:///./modules/modals/reducers/modalOrganizationErrorReducer.ts","webpack:///./modules/modals/reducers/modalProjectErrorReducer.ts","webpack:///./modules/modals/reducers/modalStackReducer.ts","webpack:///./modules/modals/reducers/modalUserErrorReducer.ts","webpack:///./modules/modals/sagas/modalOrganizationErrorSaga.ts","webpack:///./modules/modals/sagas/modalProjectErrorSaga.ts","webpack:///./modules/modals/sagas/modalStackSaga.ts","webpack:///./modules/modals/sagas/modalUserErrorSaga.ts","webpack:///./modules/modals/selectors/getModalStack.ts","webpack:///./modules/modals/views/OrganizationErrorModal.tsx","webpack:///./modules/modals/views/ProjectErrorModal.tsx","webpack:///./modules/modals/views/UserErrorModal.tsx","webpack:///./modules/notifications/actions/NotificationActions.ts","webpack:///./modules/notifications/reducers/notificationReducer.ts","webpack:///./modules/notifications/sagas/showNotification.ts","webpack:///./modules/notifications/selectors/getNotification.ts","webpack:///./modules/notifications/views/Notification.tsx","webpack:///./modules/organization/actions/OrganizationActions.ts","webpack:///./modules/organization/pages/OrganizationPage.tsx","webpack:///./modules/organization/reducers/organizationReducer.ts","webpack:///./modules/organization/reducers/organizationSyncReducer.ts","webpack:///./modules/organization/sagas/organizationSaga.ts","webpack:///./modules/organization/sagas/organizationSyncPerformSaga.ts","webpack:///./modules/organization/sagas/utils/forceOrganizationSync.ts","webpack:///./modules/organization/sagas/utils/saveOrganizationForm.ts","webpack:///./modules/organization/sagas/utils/syncOrganizationForeground.ts","webpack:///./modules/organization/sagas/utils/syncUserOrganization.ts","webpack:///./modules/organization/sagas/utils/waitOrganizationSync.ts","webpack:///./modules/organization/selectors/getOrganization.ts","webpack:///./modules/organization/selectors/getOrganizationFormData.ts","webpack:///./modules/organization/selectors/getOrganizationState.ts","webpack:///./modules/organization/selectors/getOrganizationSyncData.ts","webpack:///./modules/organization/views/OrganizationSettings.tsx","webpack:///./modules/output/context/OutputDocumentContext.tsx","webpack:///./modules/output/context/OutputPageContext.tsx","webpack:///./modules/output/utils/splitBlocksIntoPages.ts","webpack:///./modules/output/views/OutputDocument.tsx","webpack:///./modules/output/views/OutputDocumentPage.tsx","webpack:///./modules/output/views/OutputLogo.tsx","webpack:///./modules/output/views/OutputPage.tsx","webpack:///./modules/output/views/OutputPagination.tsx","webpack:///./modules/output/views/OutputTitle.tsx","webpack:///./modules/password-forgot/actions/PasswordForgotActions.ts","webpack:///./modules/password-forgot/constants/schema.ts","webpack:///./modules/password-forgot/pages/PasswordForgotPage.tsx","webpack:///./modules/password-forgot/sagas/passwordForgotSaga.ts","webpack:///./modules/password-forgot/sagas/passwordForgotSubmitSaga.ts","webpack:///./modules/password-forgot/sagas/utils/submitPasswordForgot.ts","webpack:///./modules/password-forgot/views/PasswordForgotForm.tsx","webpack:///./modules/password-forgot/views/PasswordForgotScreen.tsx","webpack:///./modules/password-reset/actions/PasswordResetActions.ts","webpack:///./modules/password-reset/constants/schema.ts","webpack:///./modules/password-reset/pages/PasswordResetPage.tsx","webpack:///./modules/password-reset/pages/PasswordSetupPage.tsx","webpack:///./modules/password-reset/reducers/passwordResetReducer.ts","webpack:///./modules/password-reset/reducers/passwordResetTokenReducer.ts","webpack:///./modules/password-reset/sagas/passwordResetSaga.ts","webpack:///./modules/password-reset/sagas/passwordResetSubmitSaga.ts","webpack:///./modules/password-reset/sagas/utils/submitPasswordReset.ts","webpack:///./modules/password-reset/sagas/utils/validateRecoveryToken.ts","webpack:///./modules/password-reset/selectors/getPasswordResetState.ts","webpack:///./modules/password-reset/selectors/getPasswordResetToken.ts","webpack:///./modules/password-reset/selectors/getPasswordResetValid.ts","webpack:///./modules/password-reset/views/PasswordResetError.tsx","webpack:///./modules/password-reset/views/PasswordResetForm.tsx","webpack:///./modules/password-reset/views/PasswordResetScreen.tsx","webpack:///./modules/password-reset/views/PasswordSetupError.tsx","webpack:///./modules/password-reset/views/PasswordSetupForm.tsx","webpack:///./modules/password-reset/views/PasswordSetupScreen.tsx","webpack:///./modules/profile/actions/ProfileActions.ts","webpack:///./modules/profile/constants/schema.ts","webpack:///./modules/profile/page/ProfilePage.tsx","webpack:///./modules/profile/sagas/profileChangePasswordSaga.ts","webpack:///./modules/profile/sagas/profileSaga.ts","webpack:///./modules/profile/sagas/profileSaveSaga.ts","webpack:///./modules/profile/sagas/updateLatestActivity.ts","webpack:///./modules/profile/sagas/utils/changePassword.ts","webpack:///./modules/profile/sagas/utils/scheduleUpdateLatestActivity.ts","webpack:///./modules/profile/sagas/utils/updateProfile.ts","webpack:///./modules/profile/views/PasswordChangeForm.tsx","webpack:///./modules/profile/views/ProfileContent.tsx","webpack:///./modules/profile/views/ProfileHeader.tsx","webpack:///./modules/project-list/actions/ProjectListActions.ts","webpack:///./modules/project-list/codecs/ProjectListViewMode.ts","webpack:///./modules/project-list/codecs/export.ts","webpack:///./modules/project-list/codecs/import.ts","webpack:///./modules/project-list/constants/export.ts","webpack:///./modules/project-list/constants/import.ts","webpack:///./modules/project-list/constants/pageSize.ts","webpack:///./modules/project-list/constants/sort.ts","webpack:///./modules/project-list/pages/ProjectListPage.tsx","webpack:///./modules/project-list/reducers/projectListDataReducer.ts","webpack:///./modules/project-list/reducers/projectListDownloadReducer.ts","webpack:///./modules/project-list/reducers/projectListExportReducer.ts","webpack:///./modules/project-list/reducers/projectListImportReducer.ts","webpack:///./modules/project-list/reducers/projectListReducer.ts","webpack:///./modules/project-list/reducers/projectListRemovingReducer.ts","webpack:///./modules/project-list/reducers/projectListUnfollowingReducer.ts","webpack:///./modules/project-list/sagas/projectListDownloadSaga.ts","webpack:///./modules/project-list/sagas/projectListExportSaga.ts","webpack:///./modules/project-list/sagas/projectListFilterSaga.ts","webpack:///./modules/project-list/sagas/projectListImportCompleteSaga.ts","webpack:///./modules/project-list/sagas/projectListImportSubmitSaga.ts","webpack:///./modules/project-list/sagas/projectListImportUploadSaga.ts","webpack:///./modules/project-list/sagas/projectListRemoveSaga.ts","webpack:///./modules/project-list/sagas/projectListSaga.ts","webpack:///./modules/project-list/sagas/projectListShareSaga.ts","webpack:///./modules/project-list/sagas/projectListUnfollowSaga.ts","webpack:///./modules/project-list/sagas/utils/importProjects.ts","webpack:///./modules/project-list/sagas/utils/loadProjectList.ts","webpack:///./modules/project-list/sagas/utils/loadProjectListChunk.ts","webpack:///./modules/project-list/sagas/utils/loadProjectListFull.ts","webpack:///./modules/project-list/sagas/utils/loadProjectListViewMode.ts","webpack:///./modules/project-list/sagas/utils/saveProjectListViewMode.ts","webpack:///./modules/project-list/sagas/utils/unfollowProject.ts","webpack:///./modules/project-list/selectors/getProjectListData.ts","webpack:///./modules/project-list/selectors/getProjectListDownloading.ts","webpack:///./modules/project-list/selectors/getProjectListExport.ts","webpack:///./modules/project-list/selectors/getProjectListExportEntry.ts","webpack:///./modules/project-list/selectors/getProjectListFilterValues.ts","webpack:///./modules/project-list/selectors/getProjectListImport.ts","webpack:///./modules/project-list/selectors/getProjectListItem.ts","webpack:///./modules/project-list/selectors/getProjectListItemTextBlocks.ts","webpack:///./modules/project-list/selectors/getProjectListProjects.ts","webpack:///./modules/project-list/selectors/getProjectListQuery.ts","webpack:///./modules/project-list/selectors/getProjectListRemoving.ts","webpack:///./modules/project-list/selectors/getProjectListSlice.ts","webpack:///./modules/project-list/selectors/getProjectListState.ts","webpack:///./modules/project-list/selectors/getProjectListUnfollowing.ts","webpack:///./modules/project-list/types/ProjectListViewMode.ts","webpack:///./modules/project-list/utils/filter.ts","webpack:///./modules/project-list/utils/formatImportError.ts","webpack:///./modules/project-list/utils/getExportDocumentFilename.ts","webpack:///./modules/project-list/utils/mapImportLine.ts","webpack:///./modules/project-list/utils/mergeImportData.ts","webpack:///./modules/project-list/utils/query.ts","webpack:///./modules/project-list/utils/slice.ts","webpack:///./modules/project-list/utils/sort.ts","webpack:///./modules/project-list/views/ProjectListEmpty.tsx","webpack:///./modules/project-list/views/ProjectListFilterDropdown.tsx","webpack:///./modules/project-list/views/ProjectListFilterGroup.tsx","webpack:///./modules/project-list/views/ProjectListHeader.tsx","webpack:///./modules/project-list/views/ProjectListImportDataTable.tsx","webpack:///./modules/project-list/views/ProjectListImportModal.tsx","webpack:///./modules/project-list/views/ProjectListImportSelector.tsx","webpack:///./modules/project-list/views/ProjectListImportUpload.tsx","webpack:///./modules/project-list/views/ProjectListItemGridView.tsx","webpack:///./modules/project-list/views/ProjectListItemListView.tsx","webpack:///./modules/project-list/views/ProjectListPager.tsx","webpack:///./modules/project-list/views/ProjectListRating.tsx","webpack:///./modules/project-list/views/ProjectListRemoveModal.tsx","webpack:///./modules/project-list/views/ProjectListSortLink.tsx","webpack:///./modules/project-list/views/ProjectListToolbar.tsx","webpack:///./modules/project-list/views/ProjectListView.tsx","webpack:///./modules/project-list/views/UnfollowProjectModal.tsx","webpack:///./modules/project-new/actions/ProjectNewActions.ts","webpack:///./modules/project-new/constants/formData.ts","webpack:///./modules/project-new/constants/projectData.ts","webpack:///./modules/project-new/constants/schema.ts","webpack:///./modules/project-new/sagas/projectNewCreateSaga.ts","webpack:///./modules/project-new/sagas/projectNewSaga.ts","webpack:///./modules/project-new/utils/getRandomDefaultCover.ts","webpack:///./modules/project-new/views/BasicInfoFormModal.tsx","webpack:///./modules/project-new/views/BuildingInfoFormModal.tsx","webpack:///./modules/project-new/views/ProjectCreateModal.tsx","webpack:///./modules/project-sync/actions/ProjectSyncActions.ts","webpack:///./modules/project-sync/reducers/projectSyncPerformReducer.ts","webpack:///./modules/project-sync/reducers/projectSyncReducer.ts","webpack:///./modules/project-sync/reducers/projectSyncResetReducer.ts","webpack:///./modules/project-sync/sagas/projectSyncPerformSaga.ts","webpack:///./modules/project-sync/sagas/projectSyncSaga.ts","webpack:///./modules/project-sync/sagas/utils/forceProjectSynchronization.ts","webpack:///./modules/project-sync/sagas/utils/syncProjectBackground.ts","webpack:///./modules/project-sync/sagas/utils/syncProjectForeground.ts","webpack:///./modules/project-sync/sagas/utils/waitProjectSynchronization.ts","webpack:///./modules/project-sync/selectors/getProjectSyncData.ts","webpack:///./modules/project-sync/selectors/getProjectSyncState.ts","webpack:///./modules/project-view/actions/ProjectViewActions.ts","webpack:///./modules/project-view/reducers/projectViewDataReducer.ts","webpack:///./modules/project-view/reducers/projectViewReducer.ts","webpack:///./modules/project-view/sagas/projectViewSaga.ts","webpack:///./modules/project-view/sagas/projectViewShareSaga.ts","webpack:///./modules/project-view/selectors/getProjectDetails.ts","webpack:///./modules/project-view/selectors/getProjectViewData.ts","webpack:///./modules/project-view/selectors/getProjectViewState.ts","webpack:///./modules/report/actions/ReportActions.ts","webpack:///./modules/report/constants/schema.ts","webpack:///./modules/report/pages/ReportDocumentPage.tsx","webpack:///./modules/report/pages/ReportPage.tsx","webpack:///./modules/report/reducers/reportGenerateReducer.ts","webpack:///./modules/report/reducers/reportReducer.ts","webpack:///./modules/report/reducers/reportResetReducer.ts","webpack:///./modules/report/sagas/reportChangeSaga.ts","webpack:///./modules/report/sagas/reportGenerateSaga.ts","webpack:///./modules/report/sagas/reportSaga.ts","webpack:///./modules/report/sagas/utils/buildReportDocument.tsx","webpack:///./modules/report/sagas/utils/waitReportDocument.tsx","webpack:///./modules/report/selectors/getCoverContactsOptions.ts","webpack:///./modules/report/selectors/getReportCurrency.ts","webpack:///./modules/report/selectors/getReportFakeStore.ts","webpack:///./modules/report/selectors/getReportFormData.ts","webpack:///./modules/report/selectors/getReportGenerated.ts","webpack:///./modules/report/selectors/getReportGeneratedCover.ts","webpack:///./modules/report/selectors/getReportGeneratedEnergy.ts","webpack:///./modules/report/selectors/getReportGeneratedEvaluation.ts","webpack:///./modules/report/selectors/getReportGeneratedHvac.ts","webpack:///./modules/report/selectors/getReportGeneratedSavings.ts","webpack:///./modules/report/selectors/getReportGeneratedSavingsAnnualSavings.ts","webpack:///./modules/report/selectors/getReportGeneratedSavingsCarbonEmission.ts","webpack:///./modules/report/selectors/getReportGeneratedSavingsEnergyAbsolute.ts","webpack:///./modules/report/selectors/getReportGeneratedSavingsEnergyRelative.ts","webpack:///./modules/report/selectors/getReportGeneratedSavingsRatingPerArea.ts","webpack:///./modules/report/selectors/getReportGeneratedSavingsTotalCost.ts","webpack:///./modules/report/selectors/getReportGeneratedSchema.ts","webpack:///./modules/report/selectors/getReportLoading.ts","webpack:///./modules/report/utils/createShadowHost.ts","webpack:///./modules/report/utils/getReportDocumentFilename.ts","webpack:///./modules/report/utils/renderComponent.tsx","webpack:///./modules/report/views/ReportDocumentContent.tsx","webpack:///./modules/report/views/ReportFormDocument.tsx","webpack:///./modules/report/views/ReportFormFieldToggle.tsx","webpack:///./modules/report/views/ReportFormSectionConfigCover.tsx","webpack:///./modules/report/views/ReportFormSectionConfigEnergy.tsx","webpack:///./modules/report/views/ReportFormSectionConfigEvaluation.tsx","webpack:///./modules/report/views/ReportFormSectionConfigEvaluationCharts.tsx","webpack:///./modules/report/views/ReportFormSectionConfigHvac.tsx","webpack:///./modules/report/views/ReportFormSectionConfigSavings.tsx","webpack:///./modules/report/views/ReportFormSectionConfigSchema.tsx","webpack:///./modules/report/views/ReportFormSectionNoSchema.tsx","webpack:///./modules/report/views/ReportFormSectionPreview.tsx","webpack:///./modules/report/views/ReportFormSectionPreviewPage.tsx","webpack:///./modules/report/views/ReportFormView.tsx","webpack:///./modules/report/views/document/ReportDocumentPageAmount.tsx","webpack:///./modules/report/views/document/ReportDocumentPageCO2Value.tsx","webpack:///./modules/report/views/document/ReportDocumentPageCover.tsx","webpack:///./modules/report/views/document/ReportDocumentPageEnergy.tsx","webpack:///./modules/report/views/document/ReportDocumentPageEnergyThermal.tsx","webpack:///./modules/report/views/document/ReportDocumentPageEnergyValue.tsx","webpack:///./modules/report/views/document/ReportDocumentPageEnergyVentilation.tsx","webpack:///./modules/report/views/document/ReportDocumentPageEvaluation.tsx","webpack:///./modules/report/views/document/ReportDocumentPageEvaluationCharts.tsx","webpack:///./modules/report/views/document/ReportDocumentPageEvaluationOverview.tsx","webpack:///./modules/report/views/document/ReportDocumentPageHvac.tsx","webpack:///./modules/report/views/document/ReportDocumentPageSavings.tsx","webpack:///./modules/report/views/document/ReportDocumentPageSchema.tsx","webpack:///./modules/report/views/document/ReportDocumentPageSchemaCanvas.tsx","webpack:///./modules/routing/actions/RouteChange.ts","webpack:///./modules/routing/constants/RoutingHooks.ts","webpack:///./modules/routing/constants/RoutingStates.ts","webpack:///./modules/routing/containers/Initialization.tsx","webpack:///./modules/routing/containers/RouteSwitch.tsx","webpack:///./modules/routing/errors/RouteNotFoundError.ts","webpack:///./modules/routing/hooks/emulateTransitionDelay.ts","webpack:///./modules/routing/hooks/errorHandlers/cancelledErrorHandler.ts","webpack:///./modules/routing/hooks/errorHandlers/unauthorizedErrorHandler.ts","webpack:///./modules/routing/hooks/errorHandlers/unknownErrorHandler.ts","webpack:///./modules/routing/hooks/errorTransitionHandling.ts","webpack:///./modules/routing/hooks/errorTransitionLogging.ts","webpack:///./modules/routing/hooks/globalTransitionLogging.ts","webpack:///./modules/routing/hooks/resolvers/abortProjectList.ts","webpack:///./modules/routing/hooks/resolvers/authenticate.ts","webpack:///./modules/routing/hooks/resolvers/checkIsAuthenticated.ts","webpack:///./modules/routing/hooks/resolvers/destroySession.ts","webpack:///./modules/routing/hooks/resolvers/fetchPasswordResetToken.ts","webpack:///./modules/routing/hooks/resolvers/fetchProjectDetails.ts","webpack:///./modules/routing/hooks/resolvers/fetchProjectList.ts","webpack:///./modules/routing/hooks/resolvers/fetchSchemaSelection.ts","webpack:///./modules/routing/hooks/resolvers/fetchUsersList.ts","webpack:///./modules/routing/hooks/resolvers/redirectTo.ts","webpack:///./modules/routing/hooks/resolvers/resetPasswordResetToken.ts","webpack:///./modules/routing/hooks/resolvers/resetProjectDetails.ts","webpack:///./modules/routing/hooks/resolvers/resetProjectList.ts","webpack:///./modules/routing/hooks/resolvers/resetUsersList.ts","webpack:///./modules/routing/hooks/resolvers/syncOrganization.ts","webpack:///./modules/routing/hooks/resolvers/syncProjectDetails.ts","webpack:///./modules/routing/hooks/resolvers/syncUser.ts","webpack:///./modules/routing/hooks/stateTransitionLogging.ts","webpack:///./modules/routing/reducers/routeChangeReducer.ts","webpack:///./modules/routing/reducers/routingReducer.ts","webpack:///./modules/routing/sagas/handleTransitionError.ts","webpack:///./modules/routing/sagas/locationChangeSaga.ts","webpack:///./modules/routing/sagas/performTransition.ts","webpack:///./modules/routing/sagas/restoreCurrentUrl.ts","webpack:///./modules/routing/sagas/routeChangeSaga.ts","webpack:///./modules/routing/sagas/routingSaga.ts","webpack:///./modules/routing/selectors/getCurrentLocation.ts","webpack:///./modules/routing/selectors/getCurrentMatch.ts","webpack:///./modules/routing/selectors/getCurrentState.ts","webpack:///./modules/routing/selectors/getIsRoutingBlocked.ts","webpack:///./modules/routing/selectors/getRoutingState.ts","webpack:///./modules/routing/states/AdminStates.ts","webpack:///./modules/routing/states/HomeStates.ts","webpack:///./modules/routing/states/LayoutStates.ts","webpack:///./modules/routing/states/LoginStates.ts","webpack:///./modules/routing/states/OrganizationStates.ts","webpack:///./modules/routing/states/ProfileState.ts","webpack:///./modules/routing/states/ProjectStates.ts","webpack:///./modules/routing/utils/composeSagas.ts","webpack:///./modules/routing/utils/createTransitionUid.ts","webpack:///./modules/routing/utils/matchState.ts","webpack:///./modules/routing/utils/matchUtils.ts","webpack:///./modules/routing/utils/navigate.ts","webpack:///./modules/routing/utils/transitionUtils.ts","webpack:///./modules/routing/views/RouterLoader.tsx","webpack:///./modules/schema/actions/SchemaActions.ts","webpack:///./modules/schema/codecs/SchemaAreaMap.ts","webpack:///./modules/schema/codecs/SchemaSelection.ts","webpack:///./modules/schema/constants/options.ts","webpack:///./modules/schema/constants/schema.ts","webpack:///./modules/schema/pages/SchemaPage.tsx","webpack:///./modules/schema/reducers/schemaReducer.ts","webpack:///./modules/schema/reducers/schemaSelectionReducer.ts","webpack:///./modules/schema/sagas/schemaCommentChangeSaga.ts","webpack:///./modules/schema/sagas/schemaMatrixChangeSaga.ts","webpack:///./modules/schema/sagas/schemaSaga.ts","webpack:///./modules/schema/sagas/schemaSelectionChangeSaga.ts","webpack:///./modules/schema/sagas/schemaTemplateSelectSaga.ts","webpack:///./modules/schema/sagas/schemaVersionChangeSaga.ts","webpack:///./modules/schema/sagas/schemaVersionCreateSaga.ts","webpack:///./modules/schema/sagas/schemaVersionRemoveSaga.ts","webpack:///./modules/schema/sagas/utils/loadSchemaSelection.ts","webpack:///./modules/schema/sagas/utils/saveSchemaSelection.ts","webpack:///./modules/schema/selectors/getProjectSchema.ts","webpack:///./modules/schema/selectors/getSchemaFormData.ts","webpack:///./modules/schema/selectors/getSchemaSelection.ts","webpack:///./modules/schema/selectors/getSchemaState.ts","webpack:///./modules/schema/utils/event/canvasGesture.ts","webpack:///./modules/schema/utils/event/canvasPointer.ts","webpack:///./modules/schema/utils/event/canvasWheel.ts","webpack:///./modules/schema/utils/getReportPreselectedFutureVersion.ts","webpack:///./modules/schema/utils/mapSchema.ts","webpack:///./modules/schema/utils/resolveReportSchemaSelection.ts","webpack:///./modules/schema/views/CommentVersionModal.tsx","webpack:///./modules/schema/views/DeleteVersionDialog.tsx","webpack:///./modules/schema/views/MultipleSchemasScreen.tsx","webpack:///./modules/schema/views/SchemaCanvas.tsx","webpack:///./modules/schema/views/SchemaCard.tsx","webpack:///./modules/schema/views/SchemaClearContainersConfirmation.tsx","webpack:///./modules/schema/views/SchemaContainerPreview.tsx","webpack:///./modules/schema/views/SchemaContainerSelect.tsx","webpack:///./modules/schema/views/SchemaEditScreen.tsx","webpack:///./modules/schema/views/SchemaGesture.tsx","webpack:///./modules/schema/views/SchemaInputLayer.tsx","webpack:///./modules/schema/views/SchemaSelectScreen.tsx","webpack:///./modules/schema/views/canvas/SchemaAssignments.tsx","webpack:///./modules/schema/views/canvas/SchemaBackground.tsx","webpack:///./modules/schema/views/canvas/SchemaDeviceView.tsx","webpack:///./modules/screen-size-guard/views/ScreenSizeGuard.tsx","webpack:///./modules/scroll/actions/ScrollRestoration.ts","webpack:///./modules/scroll/containers/ScrollRestoration.ts","webpack:///./modules/scroll/reducers/scrollReducer.ts","webpack:///./modules/scroll/reducers/scrollRestorationReducer.ts","webpack:///./modules/scroll/selectors/getScrollRestoration.ts","webpack:///./modules/scroll/selectors/getScrollState.ts","webpack:///./modules/scroll/utils/scrollRestore.ts","webpack:///./modules/sharing-projects/actions/ShareProjectActions.ts","webpack:///./modules/sharing-projects/codecs/SharedUser.ts","webpack:///./modules/sharing-projects/constants/schema.ts","webpack:///./modules/sharing-projects/containers/ShareProject.tsx","webpack:///./modules/sharing-projects/reducers/shareProjectDataReducer.ts","webpack:///./modules/sharing-projects/reducers/shareProjectReducer.ts","webpack:///./modules/sharing-projects/reducers/shareProjectRemoveReducer.ts","webpack:///./modules/sharing-projects/reducers/shareProjectUsersReducer.ts","webpack:///./modules/sharing-projects/sagas/shareProjectFetchSaga.ts","webpack:///./modules/sharing-projects/sagas/shareProjectRemoveSaga.ts","webpack:///./modules/sharing-projects/sagas/shareProjectSaga.ts","webpack:///./modules/sharing-projects/sagas/shareProjectSubmitSaga.ts","webpack:///./modules/sharing-projects/sagas/utils/loadSharedProjectUsers.ts","webpack:///./modules/sharing-projects/sagas/utils/removeUserFromSharedProject.ts","webpack:///./modules/sharing-projects/sagas/utils/shareProjectWith.ts","webpack:///./modules/sharing-projects/selectors/getShareProjectData.ts","webpack:///./modules/sharing-projects/selectors/getShareProjectProject.ts","webpack:///./modules/sharing-projects/selectors/getShareProjectRemovingUser.ts","webpack:///./modules/sharing-projects/selectors/getShareProjectUsers.ts","webpack:///./modules/sharing-projects/views/ShareProjectModal.tsx","webpack:///./modules/sharing-projects/views/ShareProjectRemoveModal.tsx","webpack:///./modules/sharing-projects/views/ShareProjectShareForm.tsx","webpack:///./modules/sharing-projects/views/ShareProjectUserList.tsx","webpack:///./modules/users/actions/UserActions.ts","webpack:///./modules/users/actions/UsersActions.ts","webpack:///./modules/users/codecs/OrganizationUser.ts","webpack:///./modules/users/components/UserListActions.tsx","webpack:///./modules/users/components/UserListHeader.tsx","webpack:///./modules/users/components/UserRow.tsx","webpack:///./modules/users/constants/userAddFormSchema.ts","webpack:///./modules/users/constants/userEditFormSchema.ts","webpack:///./modules/users/pages/UsersPage.tsx","webpack:///./modules/users/reducers/userAddingReducer.ts","webpack:///./modules/users/reducers/userDeletingReducer.ts","webpack:///./modules/users/reducers/userEditingReducer.ts","webpack:///./modules/users/reducers/userSyncReducer.ts","webpack:///./modules/users/reducers/usersListDataReducer.ts","webpack:///./modules/users/reducers/usersReducer.ts","webpack:///./modules/users/sagas/userCreateSaga.ts","webpack:///./modules/users/sagas/userRemoveSaga.ts","webpack:///./modules/users/sagas/userSaveSaga.ts","webpack:///./modules/users/sagas/userSyncPerformSaga.ts","webpack:///./modules/users/sagas/usersSaga.ts","webpack:///./modules/users/sagas/utils/createUser.ts","webpack:///./modules/users/sagas/utils/deleteUser.ts","webpack:///./modules/users/sagas/utils/forceUserSynchronization.ts","webpack:///./modules/users/sagas/utils/loadUsersList.ts","webpack:///./modules/users/sagas/utils/syncUserBackground.ts","webpack:///./modules/users/sagas/utils/syncUserForeground.ts","webpack:///./modules/users/sagas/utils/updateUser.ts","webpack:///./modules/users/sagas/utils/waitUserSynchronization.ts","webpack:///./modules/users/selectors/getFoundUsers.ts","webpack:///./modules/users/selectors/getSortedFoundSelectableUsers.ts","webpack:///./modules/users/selectors/getSortedFoundUsers.ts","webpack:///./modules/users/selectors/getUserDeleting.ts","webpack:///./modules/users/selectors/getUserEditing.ts","webpack:///./modules/users/selectors/getUsersListData.ts","webpack:///./modules/users/selectors/getUsersQuery.ts","webpack:///./modules/users/selectors/getUsersSortingOrder.ts","webpack:///./modules/users/selectors/getUsersSortingTarget.ts","webpack:///./modules/users/selectors/getUsersState.ts","webpack:///./modules/users/views/AddUserModal.tsx","webpack:///./modules/users/views/DeleteUserModal.tsx","webpack:///./modules/users/views/UsersListBody.tsx","webpack:///./reducers/rootReducer.ts","webpack:///./root.tsx","webpack:///./sagas/rootSaga.ts","webpack:///./sagas/utils/doOnExportWorker.ts","webpack:///./sagas/utils/doOnImportWorker.ts","webpack:///./sagas/utils/doOnPdfWorker.ts","webpack:///./sagas/utils/doOnWorker.ts","webpack:///./sagas/utils/getImageContent.ts","webpack:///./sagas/utils/htmlToPdf.ts","webpack:///./sagas/utils/logging.ts","webpack:///./sagas/utils/storage.ts","webpack:///./utils/assert.ts","webpack:///./utils/cancelSagaOn.ts","webpack:///./utils/chainReducers.ts","webpack:///./utils/createActions.ts","webpack:///./utils/createTrigger.ts","webpack:///./utils/guard.ts","webpack:///./utils/selectorUtils.ts"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","0","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","IconButton","propTypes","CancelledError","BaseError","message","context","previous","super","HttpError","response","status","statusText","this","toJSON","creator","dispatch","useDispatch","useCallback","values","action","useAction","selector","param","plainSelector","state","useSelector","ROOT_ELEMENT","assertNotNull","document","getElementById","init","rootElement","configure","showSpinner","history","createBrowserHistory","sagaMiddleware","error","sagaStack","console","store","middlewares","createStore","rootReducer","composeWithDevTools","trace","applyMiddleware","rootStore","routerMiddleware","reactRoot","createRoot","RootElement","run","rootSaga","Root","render","AppContainer","decoder","pipe","NUMBER_FROM_STRING","D","parse","INTEGER","decode","encoder","encode","String","INTEGER_FROM_STRING","C","make","input","Blob","success","failure","NATIVE_BLOB","E","id","string","Number","isNaN","trim","item","array","getOrElse","getOrElseW","DecodingError","throw","FormattedMessage","T","keyName","params","FormattedHTMLMessage","useTranslate","children","useMemo","html","htmlToReact","wrapped","RuntimeError","NativeError","wrap","sentryCatch","parseHtml","noWrap","useIntl","formatMessage","descriptor","FormattedDate","language","getLanguage","formatted","Intl","DateTimeFormat","year","month","day","format","Component","props","intl","ANNOUNCEMENTS_READ","createTrigger","ANNOUNCEMENTS_FETCH","AnnouncementsEmpty","className","BellIcon","defaultState","announcements","announcementsReducer","is","takeLatest","readAnnouncements","logDebug","loadAnnouncements","put","trigger","scheduleUpdateLatestActivity","scheduleUpdateFeedbackCounter","logError","announcementState","select","getAnnouncementState","unreadAnnouncements","filter","announcement","read","all","map","unreadAnnouncement","readAnnouncement","showNotification","variant","type","messageId","content","makeRestRequest","decodeOrThrow","ANNOUNCEMENTS","announcementId","encodeURIComponent","ANNOUNCEMENT","Announcements","memo","announcementsState","isBadgeHidden","every","OverflowMenu","interactive","buttonTooltip","buttonSize","onClose","label","CircleFilledIcon","OverflowMenuItem","title","b","em","strong","date","description","getRequestBody","requestData","undefined","FormData","URLSearchParams","JSON","stringify","getRequestType","method","relativeUrl","url","getApiBaseUrl","concat","config","credentials","headers","isDefined","body","fetch","ok","contentType","startsWith","fn","json","text","blob","isHttpError","ASSET_UPLOAD","createActions","ASSET_CANCEL","copy","Map","delete","meta","assetReducer","chainReducers","assetUploadReducer","assetCancelReducer","isRequest","set","FUTURE","pending","isSuccess","isFailure","TASK_MAP","take","fieldId","oldTask","cancel","newTask","fork","assetUploadSaga","file","asset","uploadAsset","append","ASSET","async","arrayBuffer","view","Uint8Array","magicNumbers","numberToUnit32","size","getValidMagicNumbers","byte","index","litteEndian","isSafeInteger","LogicError","DataView","ArrayBuffer","setUint32","buffer","AssetUpload","onTouch","onChange","disabled","assetUpload","request","assetCancel","useParametricSelector","getAssetState","loading","handleChange","useEffect","FileUpload","CustomLoading","small","withOverlay","fileError","setFileError","useState","handleDrop","acceptedFiles","isValidImageData","then","valid","ErrorCode","FileInvalidType","getRootProps","getInputProps","useDropzone","onDrop","onFileDialogOpen","onDropRejected","rejectData","rejection","errors","some","code","FileTooLarge","maxSize","FILE_MAX_SIZE_FILED_MB","accept","timer","setTimeout","clearTimeout","UploadIcon","DropdownWarningFileTooLarge","DropdownWarningInvalidFormat","BASEDATA_CHANGE","BASEDATA_FORM_SCHEMA","R","struct","cover","pass","maxLength","projectGoals","building","required","nullable","gt","address","street","city","country","zip","participants","propertyManager","consutlingEngineer","productManager","BasedataPage","project","getProjectDetails","formData","getBasedataFormData","saveForm","shareProject","useBoundAction","PROJECT_VIEW_SHARE","form","useForm","reinitialize","initialValues","useFormValidator","subscribe","prevState","nextState","currentState","Helmet","AppLayout","ProjectToolbar","onShare","BasedataFormView","projectId","ShareProject","modified","goals","modifiedCarbonIntensity","resolveCurrentProjectData","reloaded","syncProjectBackground","basedataChangeSaga","createSelector","renderBuildingTypeOption","option","renderUnitOptions","AreaUnitView","unit","renderCountryOption","countryCodes","useCountryList","projectHvacUrl","TileCard","TextField","labelText","field","at","autoComplete","placeholder","TextAreaField","rows","showHint","AssetField","DropdownField","wrapperClass","options","BUILDING_TYPE_OPTIONS","transform","ensureNonNull","titleText","itemToElement","renderSelectedItem","DecimalField","maxValue","MAX_TRILLION","UNIT_VERSION_OPTIONS","renderHint","constNull","AutocompleteField","direction","BottomNavigationHelper","routeForthText","routeForthPath","UUID","boolean","DATE_TIME","fileName","AUTH_USER","email","firstName","lastName","organization","ORGANIZATION","role","USER_ROLE","latestActivity","feedbackCounter","number","settings","USER_SETTINGS","CONTAINER_TYPE","literal","DEVICE_TYPE","DeviceType","THROTTLING_CIRCUIT","DIVERTING_CIRCUIT","INJECTION_CIRCUIT","MIXING_CIRCUIT","BYPASS","PUMP","ACTIVE_OR_PASSIVE_CIRCUIT","SPECIFIC_CIRCUIT","CHANGEOVER","identity","EMPTY","ENERGY_EFFICIENCY_CLASS","FLOW_DIRECTION","FlowDirection","NORTH","SOUTH","EAST","WEST","LANGUAGE","LANGUAGE_LIST","DECODER","NON_EMPTY_STRING","ORGANIZATION_ADDRESS","COUNTRY_CODE","ORGANIZATION_CONTACT","phone","website","ORGANIZATION_OFFICE","shop","contact","logo","useOrganizationContacts","office","ORIENTATION","Orientation","HORIZONTAL","VERTICAL","PROJECT_OWNER","PROJECT","PROJECT_DATA","owner","createdAt","updatedAt","isShared","THERMAL_ENERGY","ThermalEnergy","HEATING","COOLING","MIXED","UserRole","USER","ADMIN","report","showOrganizationLogo","coverContacts","ProjectReportCoverContactsEnum","OFFICE","union","ENCODER","XLSX_VALUE","AreaUnit","SQM","sub","sup","AssetImage","alt","apiBaseUrl","imageUrl","src","BlobImage","image","setImageUrl","useLayoutEffect","URL","createObjectURL","revokeObjectURL","routeBackText","routeBackPath","CustomButton","kind","as","Link","to","ArrowLeftIcon","backText","forthText","ArrowRightIcon","CarbonIntensityUnit","source","EnergySourceUnit","CarbonSavingsUnit","Checkbox","checked","partial","onClick","tabIndex","onKeyDown","CurrencySymbol","currency","CustomBreadcrumbItem","BreadcrumbItem","fullWidth","renderIcon","RenderIcon","computedClassName","Button","LoadingIcon","Loading","CustomMenu","flipped","iconDescription","tooltipPosition","menuOptionsClass","hasIconOnly","align","CustomMenuItem","itemText","hasDivider","href","isDelete","wrapperClassName","itemClassName","location","getCurrentLocation","currentRoute","pathname","CustomModal","isFullScreen","open","shouldUnmount","isShaded","isNarrowFooter","isShown","setShown","prevOpen","usePrevious","isMounted","handleKeyDown","event","timeout","addEventListener","removeEventListener","scrollbarWidth","innerWidth","documentElement","clientWidth","style","setProperty","ComposedModal","CustomTabList","ariaLabel","contained","isFullWidth","theme","TabList","CustomTab","Tab","CustomToggle","Toggle","Divider","orientation","typedMemo","Dropdown","renderLabel","icon","selectedValue","outlined","shaded","listOpened","setListOpened","ref","useRef","useOutsideClick","selected","find","isOnlyOneOption","chevron","ChevronUpIcon","ChevronDownIcon","prev","CheckIcon","EnergyEfficiencyLabel","sized","EnergyEfficiencyLabelWrapper","maxLabel","getEnergyEfficiencyLabel","toDecimalPlaces","Decimal","ROUND_UP","minLabel","ROUND_DOWN","LABELS","EnergyEfficiencyStack","line","CLASS_LIST","FACTOR_WEIGHTS_LABELS","position","mul","STACK_ITEM_HEIGHT","add","toFixed","getPosition","marginBottom","CaretRight","EnergyEfficiencyTransition","actual","future","EnergyPriceUnit","EnergySavingsUnit","EnergySource","HEATING_OIL","Footer","getLoggedInUser","privacy","imprint","contacts","target","rel","FormSection","Stack","gap","FormattedAmount","FormattedNumber","minimumFractionDigits","maximumFractionDigits","FormattedBEP","isPositive","lessThan","roundedToNearestHalfValue","div","roundedValuePrecision","decimalPlaces","FormattedValue","precision","greaterThan","FormattedMathMessage","InlineMath","math","BlockMath","locale","getLocale","toNumber","NumberFormat","replace","Header","isOnboardingModalOpened","setOnboardingModalOpened","handleOnboardingModalClose","handleOnboardingModalOpen","localStorage","getItem","IS_ONBOARDING_MODAL_VIEWED","UserLanguage","QuestionIcon","UserProfile","OnboardingModal","handleClose","HorizontalDivider","Lifecycle","errorInfo","setState","onError","onReady","step","setStep","setItem","ModalHeader","labelClassName","titleClassName","buttonOnClick","current","overall","ModalBody","TitleText","BodyText","ModalFooter","autoFocus","menuRef","opened","setOpened","handleButtonOpen","handleButtonClose","Tooltip","preventDefault","PreserveContent","nextProps","ProjectTitle","routeState","getCurrentMatch","projectBaseUrl","areDetailsShown","setDetailsShown","projectTitleRef","projectDetailsRef","heightOfOpenedDetails","offsetHeight","heightOfClosedDetails","formatProjectDetailsSubTitle","defaultCheckedTab","findIndex","it","getMatchedRoute","match","parent","Breadcrumb","height","ChevronUp","color","CARBON_THEME","onSurfaceLightPrimary","ChevronDown","Share","belimoOrangeColor","Folder","BodyDesktopLargeRegularText","OverlineDesktopSmallText","Tabs","selectedIndex","Rating","onSelect","rating","setRating","hover","setHover","stars","Array","from","_","star","onMouseEnter","onMouseLeave","StarFilledIcon","StarIcon","SavingTileAmount","amount","SavingTileCard","savingTitle","amountTitle","SavingsAmount","isNegative","SavingsValue","SupScript","fetchSvgFile","signal","redirect","parseSvgFile","SvgFile","urls","width","element","setElement","abort","AbortController","fallback","visibility","pointerEvents","fetchAnySvgFile","catch","cloneElement","x","y","prevProps","subtitle","LeadText","DesktopLargeText","UserForm","disableEmail","disableRole","isUserCreation","RenderItem","ROLE_LIST","ROLE_NAMES","languages","getEnvironmentLanguages","switchLanguage","CONFIG_LANGUAGE_SWITCH","LANGUAGE_KEYS","GlobeIcon","loggedInUser","UserIcon","Checkmark","dateFormat","userDateFormat","DECIMAL_ZERO","DECIMAL_ONE","DECIMAL_PLACES","A","B","INTEGER_ZERO","INTEGER_ONE","INTL_LOCALE_MAP","TERMS_AND_PRIVACY_LINK_MAP","IMPRINT_LINK_MAP","SCHEMA_TEMPLATE_SELECTION","SUPPORTED_LOCALES","MATRIX_IDENTITY","a","e","f","ENERGY_SOURCE_HEATING_OPTIONS","ELECTRICITY","HEATING_DISTRICT","GAS","HEATING_OTHER","ENERGY_SOURCE_COOLING_OPTIONS","COOLING_DISTRICT","COOLING_OTHER","BuildingType","DATA_CENTER","EDUCATION_ELEMENTARY","EDUCATION_HIGHER","EDUCATION_OTHER","ENTERTAINMENT_LEISURE","GOVERNMENT","HEALTH","HOSPITAL","HOTEL","LIFE_SCIENCE","RESTAURANT","RETAIL","WHOLESALE_RETAIL_TRADE","CURRENCY_CODE_OPTIONS","SQFT","additionalSuccess20","additionalSuccess100","additionalSuccess125","additionalDanger20","additionalDanger100","additionalDanger125","surface04","blue04","onSurfaceLightSecondary","onInteractionDark","collator","Collator","COUNTRY_CODES","sort","optionA","optionB","compare","handler","listener","Element","contains","isConnected","passive","prop","propRef","ArrowDownIcon","IconWrapper","xmlns","fill","viewBox","ArrowUpIcon","ChartUpIcon","CircleCheckFilledIcon","rx","cx","cy","stroke","CloudIcon","CommentIcon","CoolingIcon","CopyIcon","CrossIcon","CurrencyExchangeIcon","DateIcon","DeleteIcon","DownloadIcon","strokeLinecap","strokeLinejoin","EditIcon","FanIcon","FileIcon","FilterIcon","GridViewIcon","HeatingIcon","LightningIcon","ListViewIcon","MailIcon","PlusIcon","ResetIcon","SearchIcon","ShareOff","WarningIcon","AdminLayout","actions","extension","breadcrumbs","classNameBody","notifications","getNotification","hideNotification","NOTIFICATION_HIDE","FeedbackButton","Notification","DocumentLayout","LoginLayout","getProjectLazy","createParameterSelector","ChangeOverLevel","DifferentTemperatureLevel","WaterToAir","BodyDesktopSmallLightText","BodyLargeLightText","BodyLargeRegularText","BodySmallText","Cmp","HeadlineSmallText","propertyKey","configurable","bound","writable","hashFunc","cacheMap","memoized","originalMethod","args","cacheKey","has","getNewFunction","either","fold","buildingType","Boolean","join","processNode","node","Text","textContent","processTextNode","HTMLAnchorElement","hrefLang","hreflang","parseChildren","processLinkElement","HTMLImageElement","srcSet","srcset","sizes","processImageElement","HTMLElement","nodeName","toLowerCase","EMPTY_ELEMENTS","createElement","BASIC_ELEMENTS","Error","processGenericElement","inner","childNodes","child","wrappedNodes","DOMParser","parseFromString","Set","INTERPOLATION_MATRIX","len","Math","hypot","k","environmentLanguages","navigatorLanguages","navigator","substring","supportedLanguages","matchedLanguage","includes","matrixMultiply","matrix","more","reduce","m1","m2","matrixTranslate","point","scale","origin","scaleMatrix","det","O","optional","none","ordNullable","ord","equals","ordPrecedence","mass","tension","friction","initialPosition","initialVelocity","interpolation","velocity","currFrameId","prevFrameTs","NaN","loop","currFrameTs","elasped","min","floor","delta","restoringForce","dampingForce","totalForce","acceleration","ONE_MILLISECOND","distance","completed","requestAnimationFrame","animate","performance","now","cancelAnimationFrame","parseNode","SVGElement","parseElement","validAttributes","ALLOWED","random","svgAttribute","getAttribute","dashed","toUpperCase","isNotNull","SVGSVGElement","COMMON_ATTRIBUTES","TEXT_ATTRIBUTES","svg","g","clipPath","rect","circle","ellipse","path","polyline","polygon","tspan","CONFIG_FETCH","CONFIG_CONTAINER","ReadOnlyArray","DEVICE_IDENTIFIER","CONFIG_DEVICE_DECODER","explanation","CONFIG_DEVICE","CONFIG_HVAC_ADDITION","CONFIG_HVAC_OPTION","CONFIG_HVAC_SECTION","additionals","CONFIG_HVAC","heating","cooling","ventilation","CONFIG_SCHEMA_CONTAINER","left","top","flow_direction","termal_energy","CHANGE_OVER_LEVEL","NO_CHANGE_OVER","EMITTER","DISTRIBUTION","FLOOR","WATER_TO_AIR","WATER","DIFFERENT_TEMPERATURE_LEVEL","YES","NO","CONFIG_SCHEMA","thermal_energy","water_to_air","change_over_level","different_temperature_level","record","ENVIRONMENT","sentryDsn","sentryEnv","ConfigProvider","getConfigState","RouterLoader","IntlProvider","tolgee","getTolgeeInstance","TolgeeProvider","isPending","compose","optionalFuture","modify","configReducer","configFetchReducer","configLanguageSwitchReducer","loadConfig","showLoadingIndicator","getPreferredLocale","translations","loadTranslations","saveLanguage","hideLoadingIndicator","configFetchSaga","configLanguageSwitchSaga","currentDate","Date","environment","loadEnvironment","sentryInit","loadLocale","loadLanguage","hvac","schemas","devices","containers","loadHvacConfig","loadSchemas","loadDevices","loadContainers","i18n","preferred","getPreferredLanguage","stored","storageGet","environmentLanguage","storageSet","getConfigData","assertNever","getConfigSchemas","getCurrentDate","getConfigHvac","Tolgee","use","FormatIcu","staticData","onTranslationMissing","info","onFormatError","details","getTranslator","withScope","scope","setExtra","captureException","dsn","release","transport","makeBrowserOfflineTransport","makeFetchTransport","tracePropagationTargets","RegExp","debug","enabled","normalizeDepth","maxValueLength","defaultIntegrations","integrations","HttpContext","Breadcrumbs","dom","xhr","sentry","GlobalHandlers","onerror","onunhandledrejection","ExtraErrorData","depth","LinkedErrors","limit","BrowserTracing","traceXHR","traceFetch","enableHTTPTimings","tracesSampleRate","ErrorBoundary","ErrorMessage","ErrorPage","RouteNotFoundError","ErrorView","errorCode","ErrorBlock","stack","componentStack","EVALUATION_CHANGE","EvaluationPage","getReportCurrency","results","getEvaluationResults","getEvaluationFormData","SHARE_PROJECT_OPEN","EvaluationScreen","evaluation","evaluationChangeSaga","EvaluationFormView","decimalScale","endAdornment","helperText","EvaluationResultsCharts","hvacAssessmentFormData","getHvacAssesmentFormData","isOnlyOneAreaEnabled","areCostExclSavingsNegative","savings","costExclCO2","isInvestmentEmpty","investmentAmount","isZero","EvaluationResultsChartsGraphBEP","charts","BEP","xAxisLabel","yAxisLabel","areCostSavingsExcludedNegative","years","exclCO2","inclCO2","EvaluationResultsChartsGraphCO2","CO2","shouldDisplayOverallData","enterDelayMs","Information","EvaluationResultsChartsGraphROI","seria","ROI","toString","padStart","NO_AREA_DATA","EvaluationResultsChartsGraphIRR","IRR","EvaluationResultsChartsGraphArea","labels","chartData","isChartReady","setChartReady","yStep","filteredCO2Included","POSITIVE_INFINITY","decimal","diff","max","NEGATIVE_INFINITY","pow","ceil","log10","getYStep","yDomain","roundMin","v","ROUND_FLOOR","roundMax","ROUND_CEIL","yTicks","renderTooltip","backgroundColor","COLORS","renderLegend","renderNotification","ResponsiveContainer","AreaChart","margin","right","bottom","CartesianGrid","strokeWidth","strokeDasharray","XAxis","dataKey","domain","ticks","tick","EvaluationResultsChartsXTick","fontSize","YAxis","tickFormatter","formatYTick","isAnimationActive","cursor","Area","onAnimationEnd","fillOpacity","strokeOpacity","baseValue","dot","activeDot","DIVIDER","investment","xDomain","xTicks","domainMax","LineChart","Line","areaNames","HVAC_AREAS","area","perArea","HVAC_NAMES","BarChart","barGap","barSize","vertical","Bar","interval","SERIA_KEYS","HvacArea","VENTILATION","shouldHideData","payload","textAnchor","EvaluationResultsSavings","energy","costInclCO2","carbonEmission","carbon","projectSchemaUrl","projectReportUrl","FEEDBACK_SEND","FEEDBACK_UPDATE","FEEDBACK_RESET","FEEDBACK_OPEN","FEEDBACK_MODAL_COUNTER_THRESHOLD","FEEDBACK_FORM_DEFAULT_DATA","comment","FEEDBACK_FORM_SCHEMA","feedbackModalOpened","feedbackReducer","feedbackCounterReducer","feedbackModalReducer","resetFeedbackCounter","feedbackSendSaga","feedbackUpdateSaga","feedbackResetSaga","formValidate","formSubmitStart","sendFeedback","formSubmitSuccess","formSubmitFailure","updatedUser","updateFeedbackCounter","feedback","feedbackReset","feedbackModalOpen","handleOpen","getFeedbackModal","FeedbackModal","FeedbackForm","submitting","useFormWatch","RatingField","CheckboxField","submitForm","submitSucceeded","submitSucceded","closeModal","FeedbackSent","useFormField","submitted","invalid","touched","change","handleReset","handleTouch","objectFit","Close","itemToString","renderError","renderErrorDefault","rest","selectedItem","handleBlur","itemToElementHandler","found","ComboBox","onBlur","invalidText","items","DateboxField","newValue","DatePicker","startOf","datePickerType","DatePickerInput","restProps","intlConfig","viewValue","setViewValue","parsed","_1","_2","float","MAX_SAFE_INTEGER","nextValue","onValueChange","decimalsLimit","allowDecimals","allowNegativeValue","disableGroupSeparators","disableAbbreviations","formatValueOnBlur","customInput","DecimalInput","forwardRef","TextInput","composedOptions","selectedOption","selectedItemHandler","initialSelectedItem","downshiftProps","FileField","PasswordField","PasswordInput","showPasswordLabel","hidePasswordLabel","newRating","SearchField","Search","hint","renderHintDefault","maxCount","actualLength","ToggleField","readOnly","toggled","onToggle","labelA","labelB","resolver","middleware","nextValues","prevValues","syncValues","rule","validate","submitCount","count","keys","NO_ERRORS","EMAIL_REGEXP","removeNonUniqueStrings","strings","toLocaleLowerCase","test","literalArray","uniqEmails","emailStr","validateEmails","split","str","existingEmailsArray","newEmail","getDate","gte","lt","lte","rules","val","entries","regex","regExp","reference","NON_NULL_LENS","ROOT_CONTEXT","fromFoldableMap","first","Foldable","HVAC_CHANGE","ISO_CATEGORIES","1.1","HvacAssessmentCategories","EMISSION","1.2","1.3","1.4","1.5","1.6","GENERATION","1.7","1.8","1.9","3.1","3.2","3.3","3.4","3.5","3.6","3.7","3.8","3.9","4.1","4.2","4.3","4.4","4.5","4.6","4.7","4.8","4.9","HvacPage","getHvacResults","counters","getHvacFormCounters","inaccurate","getHvacResultsInaccurate","getHvacFormData","saveFormData","hvacForm","useFormResolver","resolveHvacFormData","HvacResultSummaryView","HvacResultEnergyView","HvacFormAssessmentView","HvacResultSavingsView","updatedReport","getReportHvacEnergy","mapHvacFormToStore","assessment","hvacChangeSaga","getHvacData","getHvacConfig","mapHvacStoreToForm","getHvacBuildingFormData","HVAC_CONFIG","mapWithIndex","sections","section","extra","assertDefined","mapOption","addition","mapAddition","mapSection","getHvacCurrencyCode","getCounter","answered","total","isAnswered","answer","copies","sum","getHvacResultsOverallRating","category","curr","getDefaultFormVariant","getDefaultFormAnswer","currHvacAreas","prevHvacAreas","areas","prevReportHvac","prevReportEnergy","isHeatingAreaChanged","isCoolingAreaChanged","isVentilationAreaChanged","showHeating","showCooling","showVentilation","showComments","mapHvacFormChapter","thermal","electrical","mapHvacFormSection","mapHvacFormSectionAnswer","mapHvacFormSectionCopy","mapHvacFormVariant","prices","deactivation","multiplication","getDefaultFormSection","toFixedDecimal","decimalValue","resolveThermalCarbonIntensity","system","prevValue","getCarbonIntensityValue","energySource","prevEditable","getCarbonIntensityEditable","decimalEquals","L","resolveElectricityCarbonIntensity","isHeatingEnabled","isCoolingEnabled","isVentilationEnabled","defaultSelectedTab","activeTab","setActiveTab","handleTabChange","currentTab","HvacFormChapter","emission","filterHvacSectionByCategory","distribution","generation","Accordion","Fragment","HvacFormSection","copyIndex","HvacFormSectionCopy","sectionIndex","HvacFormClearConfirmationModal","onCancel","onSubmit","danger","HvacFormCommentModal","handleSubmit","handleCancel","reset","initialState","titleModalOpen","setTitleModalOpen","isItemOpened","setItemOpened","headerRef","handleClick","isOpen","currentTarget","scrollIntoView","behavior","handleClear","handleToggle","handleClone","handleTitleModalOpen","handleTitleModalCancel","handleTitleModalSubmit","renderToggle","HvacFormSectionHeader","class","wrapperRef","isCopy","onClone","onRename","AccordionItem","onHeadingClick","HvacFormSectionContent","onClear","HvacFormSectionCopyTitleModal","HvacFormSectionAdditionalInput","TO_TEXT_VALUE","lens","HvacFormSectionAdditionals","renderActualSetupOption","HvacFormSetupOption","renderComment","renderEfficiencyLabel","energyEfficiencyClass","renderActualSetupOptionSelected","renderFutureSetupOption","renderFutureSetupOptionSelected","HvacFormSectionFormBlock","level","HvacFormSetupField","renderOption","renderSelectedOption","isDeleteConfirmationModalOpened","setDeleteConfirmationModalOpened","modalOpen","setModalOpen","handleDeleteConfirmationModalOpen","handleDeleteConfirmationModalCancel","handleDeleteConfirmationModalSubmit","copiesPath","copiesValues","handleModalOpen","handleModalCancel","handleModalSubmit","onRemove","HvacFormSectionCopyDeleteConfirmationModal","sectionName","WarningFilled","stopPropagation","isRenameExist","isCloneExist","isRemoveExist","handleRemove","handleRename","opacity","hideLabel","OverflowMenuVertical","getOptionLabel","HvacResultEnergyElectricalView","tooltip","getSystemEnergySources","systemType","systemEnabled","HvacResultEnergyPricesView","heatingEnabled","coolingEnabled","horizontal","visibleSources","getVisibleEnergySources","renderEnergySourceOption","HvacResultEnergyThermalView","energySources","CURRENCY_CODE_OPTIONS_SORTED","renderCurrencyCodeOption","ventilationEnabled","HvacResultSavingsExplanation","annual","energyCosts","HvacResultSavingsOverall","relative","absolute","HvacResultSavingsSystem","TabPanels","TabPanel","HvacResultSummaryChapter","isCommentModalOpen","setIsCommentModalOpen","handleCommentOpen","handleCommentCancel","handleCommentSubmit","isClearModalOpen","setIsClearModalOpen","handleClearOpen","handleClearCancel","handleClearSubmit","PROJECT_HVAC_DEFAULT_DATA","LOADER_SHOW","LOADER_HIDE","VISIBLE","start","done","LOGIN_PERFORM","REQUEST_ACCESS_SUBMIT","UPDATE_USER_SETTINGS","WHOAMI_ACTION","LOGIN_FORM_SCHEMA","username","allOf","nonEmpty","password","REQUEST_ACCESS_FORM_SCHEMA","companyName","countryCode","LoginPage","submitRequestAccess","LoginScreen","loginReducer","user","loginUserReducer","userSettingsReducer","delay","performLogin","loginPerformSaga","requestAccessSubmitSaga","updateUserSettingsSaga","userSettings","updateUserSettings","remember","loadUser","getIsAuthenticated","getLoginState","login","requestAccessButtonRef","isRequestAccessModalOpen","setRequestAccessModalOpen","closeRequestForm","formErrors","isSubmitting","isSubmissionFailed","termsAndPrivacyLink","noValidate","spellCheck","autoCorrect","autoCapitalize","link","mailTo","launcherButtonRef","RequestAccessModal","requestAccessForm","CheckmarkFilled","MODAL_PROJECT_ERROR_OPEN","MODAL_PROJECT_ERROR_RETRY","MODAL_PROJECT_ERROR_CLOSE","MODAL_USER_ERROR_OPEN","MODAL_USER_ERROR_RETRY","MODAL_USER_ERROR_CLOSE","MODAL_ORGANIZATION_ERROR_OPEN","MODAL_ORGANIZATION_ERROR_RETRY","MODAL_ORGANIZATION_ERROR_CLOSE","ModalStack","modals","getModalStack","TransitionGroup","modal","ModalWrapper","ProjectErrorModal","UserErrorModal","OrganizationErrorModal","in","modalStackReducer","modalProjectErrorReducer","modalUserErrorReducer","modalOrganizationErrorReducer","syncOrganizationForeground","synchronized","syncProjectForeground","modalProjectErrorSaga","modalUserErrorSaga","modalOrganizationErrorSaga","users","syncUserForeground","retry","saveProject","userSnapshot","NOTIFICATION_SHOW","notificationReducer","messageValue","notification","counter","ToastNotification","ORGANIZATION_SYNC_RESET","ORGANIZATION_SYNC_PERFORM","OrganizationPage","getOrganizationFormData","syncOrganization","OrganizationSettings","organizationReducer","sync","organizationSyncReducer","task","organizationSyncPerformSaga","saveOrganizationForm","syncUserOrganization","saving","getOrganizationSyncData","waitOrganizationSync","getOrganization","logoId","getOrganizationState","OutputDocumentContext","createContext","registerPage","constVoid","unregisterPage","OutputPageContext","pageNumber","totalPages","getOrphansCount","pageHeight","blockRows","pageItems","requiredHeight","blocks","onBlockBreak","currentPageIndex","currentPageItems","currentPageHeight","maximumPageHeight","currentBlockIndex","currentBlock","currentRows","hasBlockRows","breakBlock","insertWidowsHeader","widowsHeader","block","resultPages","forwardBlock","insertRow","row","elementHeight","orphansCount","widowsCount","forEach","widows","orphans","orphansRows","OutputDocument","pageContents","documentContext","page","collectedPages","setCollectedPages","timerId","visible","order","Provider","OutputDocumentPage","useContext","OutputLogo","OutputPage","showPageNumber","forwardedRef","OutputPagination","OutputTitle","PASSWORD_FORGOT_SUBMIT","PASSWORD_FORGOT_FORM_SCHEMA","PasswordForgotPage","PasswordForgotScreen","passwordForgotSubmitSaga","submitPasswordForgot","PasswordForgotForm","isSubmitted","PASSWORD_RESET_TOKEN","PASSWORD_RESET_SUBMIT","PASSWORD_RESET_FORM_SCHEMA","confirmation","minLength","matchField","PasswordResetPage","tokenValid","getPasswordResetValid","PasswordResetScreen","PasswordResetError","PasswordSetupPage","PasswordSetupScreen","PasswordSetupError","passwordResetReducer","token","passwordResetTokenReducer","passwordResetSubmitSaga","submitPasswordReset","getPasswordResetToken","query","passwordReset","getPasswordResetState","PasswordResetForm","PasswordSetupForm","PROFILE_SAVE","PROFILE_CHANGE_PASSWORD","UPDATE_LATEST_ACTIVITY","CHANGE_PASSWORD_SCHEMA","ProfilePage","ProfileContent","changePasswordForm","changePasswordValues","changePassword","profileSaveSaga","profileChangePasswordSaga","updateLatestActivity","profileForm","profileValues","USER_EDIT_FORM_SCHEMA","updateProfile","authUser","passwordData","updateData","PasswordChangeForm","display","isProfileFormSubmitting","saveProfile","ProfileHeader","onSave","PROJECT_LIST_FETCH","PROJECT_LIST_RESET","PROJECT_LIST_ABORT","PROJECT_LIST_FILTER","PROJECT_LIST_SHARE","PROJECT_LIST_EXPORT","PROJECT_LIST_DOWNLOAD","PROJECT_LIST_REMOVE_CONFIRM","PROJECT_LIST_REMOVE_CANCEL","PROJECT_LIST_REMOVE_SUBMIT","PROJECT_LIST_UNFOLLOW_CONFIRM","PROJECT_LIST_UNFOLLOW_CANCEL","PROJECT_LIST_UNFOLLOW_SUBMIT","PROJECT_LIST_IMPORT_OPEN","PROJECT_LIST_IMPORT_CANCEL","PROJECT_LIST_IMPORT_UPLOAD","PROJECT_LIST_IMPORT_SUBMIT","PROJECT_LIST_IMPORT_COMPLETE","PROJECT_LIST_VIEW_MODE","ProjectListViewMode","LIST","GRID","CELL_STRING","CELL_DECIMAL_2","CELL_DECIMAL_4","CELL_ENUM","mapping","CELL_RATING","CELL_PROJECT_DATA","CELL_CARBON_SAVINGS","CELL_ENERGY_SAVINGS","CELL_AMOUNT_SAVINGS","CONTENT_DATA","EXPORT_BUILDING_TYPE_MAP","EXPORT_AREA_UNIT_MAP","EXPORT_COUNTRY_CODE_MAP","EXPORT_CURRENCY_CODE_MAP","EXPORT_ENERGY_SOURCE_HEATING","EXPORT_ENERGY_SOURCE_COOLING","EXPORT_CONTENT_LINE","entry","cells","author","annualEnergyUse","carbonIntensity","EXPORT_HEADER_COLUMNS","column","CELL_BASE","CELL_EMPTY","DECIMAL","J","flatMap","altW","IMPORT_BUILDING_TYPE_MAP","IMPORT_AREA_UNIT_MAP","IMPORT_COUNTRY_CODE_MAP","IMPORT_CURRENCY_CODE_MAP","IMPORT_ENERGY_SOURCE_HEATING","IMPORT_ENERGY_SOURCE_COOLING","COLUMN_ORDER","HEADER_LINE","columns","IMPORT_HEADER_COLUMNS","indexOf","IMPORT_CONTENT","ask","mapper","CONTENT_LINE","rowNumber","importData","mapLeft","formatImportError","fromEntries","PROJECT_LIST_PAGE_SIZE","PROJECT_LIST_DEFAULT_SORT","ProjectListPage","getProjectListProjects","getProjectListSlice","getProjectListQuery","applyFilter","openCreationDialog","setOpenCreationDialog","downloading","getProjectListDownloading","downloadReport","handleDownload","removeProjectState","getProjectListRemoving","removeProjectOpen","removeProjectSubmit","removeProjectCancel","unfollowProjectState","getProjectListUnfollowing","unfollowProjectOpen","unfollowProjectSubmit","unfollowProjectCancel","importState","getProjectListImport","importProjectOpen","importProjectUpload","importProjectCancel","importProjectSubmit","importProjectComplete","exporting","getProjectListExport","exportProjectData","ProjectListToolbar","onExport","onImport","onCreate","onFilter","ProjectListView","projects","unfollowing","onDownload","onUnfollow","ProjectListEmpty","ProjectListRemoveModal","ProjectCreateModal","ProjectListImportModal","onUpload","onComplete","UnfollowProjectModal","onConfirmUnfollow","import","export","removing","modifyUploadStatus","fromNullable","modifySubmitStatus","upload","submit","projectListReducer","projectListDataReducer","projectListImportReducer","projectListExportReducer","projectListRemovingReducer","projectListDownloadReducer","projectListUnfollowingReducer","modifyStatus","getReportGenerated","getReportFormData","fileData","buildReportDocument","getReportDocumentFilename","saveAs","loadProjectListFull","exportData","exportItem","getProjectListExportEntry","exportLine","doOnExportWorker","getExportDocumentFilename","EQ_FILTER","search","buildProjectListQuery","navigate","EQ_SET","term","eqStrict","ratingActual","ratingFuture","ownership","importProjects","lines","doOnImportWorker","mapImportProjectData","removeProject","loadProjectList","applyProjectListQuery","projectName","projectListRemoveSaga","cancelSagaOn","projectListFilterSaga","ROUTE_CHANGE","projectListExportSaga","projectListImportCompleteSaga","projectListImportUploadSaga","projectListImportSubmitSaga","projectListDownloadSaga","projectListUnfollowSaga","projectListShareSaga","SHARE_PROJECT_REMOVE_SUBMIT","SHARE_PROJECT_CLOSE","unfollowProject","merged","mergeImportData","resolved","resolveInitialProjectData","updated","updateProject","created","createProject","listItems","listItem","getProjectListItem","skip","RESPONSE_DATA","chunk","loadProjectListChunk","raw","decodeOrGet","viewMode","getProjectListData","getProjectListState","getProjectListFilterValues","uniq","BUILDING_TYPE_ORD","COUNTRY_CODE_ORD","S","Eq","Ord","EFFICIENCY_LABEL_ORD","N","contramap","reverse","getProjectListItemTextBlocks","textBlocks","translator","SCHEMA_AREAS","schema","proposalDescription","SchemaArea","projectList","getPredicateTerm","predicate","norm","constTrue","getPredicateStringMatch","getPredicateBuildingType","getPredicateAnyOf","getPredicateCountry","getPredicateCity","getPredicateRatingActual","buildOrCondition","getPredicateEfficiencyClass","getPredicateRatingFuture","getPredicateOwnership","minValue","ENERGY_EFFICIENCY_RANGE","predicates","initial","constFalse","or","and","buildAndCondition","decodeError","getColumnErrors","_tag","DE","Index","Key","Lazy","Leaf","Member","Wrap","getActualValue","reason","getFullYear","getMonth","getHours","getMinutes","version","PROJECT_VERSION","defaultViewMode","PAGE_NUMBER","SORT_ORDER","getAll","BUILDING_TYPE","parseProjectListFilter","buildProjectListFilter","SORT_MAP","filtered","getProjectFilter","pageSize","getProjectOrd","concatAll","getMonoid","SORT_BY_ID","getTime","Add","renderCountryCodeOption","ProjectListFilterDropdown","onApply","formValues","hasEfficiencyFilter","ProjectListFilterGroup","isGroupOpened","setGroupOpened","groupListRef","someSelected","formGroupMinRows","formGroupLength","formGroupHeight","resetAll","toggleOption","toggleSetValue","FormGroup","legendText","FormLabel","ProjectListHeader","ProjectListSortLink","ProjectListImportDataTable","errorCount","isRight","composedContent","isLeft","DataTable","radio","getRowProps","getSelectionProps","getTableProps","getTableContainerProps","TableContainer","Table","TableBody","TableRow","importErrors","TableCell","importError","errorIndex","importEntry","TableSelectRow","Tag","fontFamily","ProjectListImportSelector","ProjectListImportUpload","setSelected","toNullable","formatLink","textDecoration","File","Upload","InlineNotification","hideCloseButton","ProjectListItemGridView","shared","handleUnfollow","handleOwnershipClick","ownershipContent","ProjectListRating","DocumentPdf","TrashCan","ProjectListItemListView","ProjectListPager","useHistory","PaginationNav","totalItems","itemsShown","pageIndex","getQueryString","getSortSearch","CaretUp","CaretDown","getAppliedFilterCount","isFiltersDropdownOpened","setFiltersDropdownOpened","flow","handleFilterDebounced","useDebouncedCallback","handleDropdownOpen","handleDropdownClose","handleDropdownApply","Popover","onRequestClose","PopoverContent","PROJECT_NEW_CREATE","DEFAULT_BASIC_FORM_DATA","DEFAULT_BUILDING_FORM_DATA","PROJECT_CURRENCY_DEFAULT_DATA","PROJECT_SCHEMA_DEFAULT_DATA","PROJECT_REPORT_DEFAULT_DATA","creationDate","showBuildingInfo","showOverallEfficiency","showPerAreaEfficiency","showPotentialSavings","showZoomedIn","futureVersion","showInitialInvestment","showAnnualSavings","showInvestmentPerCarbonSavings","evaluationCharts","showReturnOnInvestment","showInternalRateOfReturn","showAnnualCarbonEmmission","showBreakEvenPoint","PROJECT_PARTICIPANTS_DEFAULT_DATA","PROJECT_EVALUATION_DEFAULT_DATA","carbonEmissionPrice","BASIC_SCHEMA","BUILDING_SCHEMA","basicValues","stepOne","buildingForm","stepTwo","buildingValues","getRandomDefaultCover","projectData","projectNewCreateSaga","randomIndex","BasicInfoFormModal","onNext","enableCounter","htmlFor","BuildingInfoFormModal","onBack","handleBack","basicInfoValues","setBasicInfoValues","buildingInfoValues","setBuildingInfoValues","handleNext","preventCloseOnClickOutside","PROJECT_SYNC_RESET","PROJECT_SYNC_PERFORM","projectSyncReducer","projectSyncResetReducer","projectSyncPerformReducer","PROJECT_VIEW_REPLACE","projectSyncPerformSaga","syncData","getProjectSyncData","waitProjectSynchronization","race","cancelled","getProjectSyncState","projectSync","PROJECT_VIEW_FETCH","PROJECT_VIEW_RESET","projectViewReducer","projectViewDataReducer","projectViewShareSaga","getProjectViewData","getProjectViewState","projectView","REPORT_RESET","REPORT_CHANGE","REPORT_GENERATE","REPORT_FORM_SCHEMA_COVER","REPORT_FORM_SCHEMA","ReportDocumentPage","ReportDocumentContent","ReportPage","getReportLoading","resetState","ReportFormView","reportReducer","reportResetReducer","reportGenerateReducer","reportChangeSaga","reportGenerateSaga","host","createShadowHost","getReportFakeStore","renderComponent","complete","waitReportDocument","pages","querySelectorAll","htmlToPdf","destroy","checkImageState","checkReadyState","getCoverContactsOptions","toDate","getReportGeneratedCover","getReportGeneratedEnergy","getReportGeneratedHvac","getReportGeneratedSavings","getReportGeneratedEvaluation","getReportGeneratedSchema","orgInfo","reportDate","mapThermalArea","mapElectricalArea","annualConsumption","totalCosts","inputs","getComment","hvacFormData","getReportGeneratedSavingsRatingPerArea","getReportGeneratedSavingsAnnualSavings","ratingOverall","ratingPerArea","annualSavings","getReportGeneratedSavingsTotalCost","getReportGeneratedSavingsEnergyRelative","getReportGeneratedSavingsEnergyAbsolute","getReportGeneratedSavingsCarbonEmission","totalCost","energyRelative","energyAbsolute","hvacResults","electricity","getEnergySavingsInKWh","mulDecimals","ENERGY_OUTPUT_BY_SOURCE_UNIT","getSchemaFormData","selection","zIndex","overflow","appendChild","root","unmount","removeChild","formatDate","Promise","resolve","reject","ReportDocumentPageCover","ReportDocumentPageSavings","ReportDocumentPageEvaluation","ReportDocumentPageEnergy","ReportDocumentPageHvac","ReportDocumentPageSchema","getReportPages","contents","sortedPages","shownPages","ReportFormDocument","ReportFormFieldToggle","renderAllowContactsOption","ReportFormSectionConfigCover","officeContactsOptions","ReportFormSectionConfigEnergy","ReportFormSectionConfigEvaluation","ReportFormSectionConfigEvaluationCharts","ReportFormSectionConfigHvac","ReportFormSectionConfigSavings","renderFutureVariantOption","ReportFormSectionConfigSchema","schemaData","futureOptions","isSchemaMissing","isCommentMissing","AREA_NAMES","ReportFormSectionNoSchema","ReportFormSectionPreview","ReportFormSectionPreviewPage","ratio","wrapper","createRef","updateContent","getWrapperStyle","getContentStyle","paddingBottom","wrapperW","contentW","clientHeight","projectEvaluationUrl","generateReport","handleReportClick","reportPages","setReportPages","ReportDocumentPageAmount","ReportDocumentPageCO2Value","ReportDocumentPageEnergyThermal","ReportDocumentPageEnergyVentilation","ReportDocumentPageEnergyValue","ReportDocumentPageEvaluationOverview","ReportDocumentPageEvaluationCharts","NO_CHART_DATA","AreaPage","contentElement","outputPages","setOutputPages","pageElement","sectionMargin","pt2px","PAGE_HEADER_HEIGHT","AREA_NAME_HEIGHT","linearizeHvacSection","flat","sectionHeight","sectionId","assertNotEmpty","querySelector","splitBlocksIntoPages","collectHvacPages","pageData","AREA_TITLES","isCommentShown","Cloud","Lightning","paddingLeft","currentSchema","SECTION_ORDER","AREA_ICONS","ReportDocumentPageSchemaCanvas","transformLine","assignments","assignment","DeviceShape","container","SCHEMA_CONTAINER_SIZE","ry","SchemaDeviceView","device","ROUTING_PRE_HOOKS","createGlobalTransitionLoggingSaga","ROUTING_POST_HOOKS","scrollRestore","ROUTING_ERROR_HOOKS","errorTransitionLogging","errorTransitionHandling","ROUTING_STATES","ROUTING_LAYOUT_STATES","ROUTING_LOGIN_STATES","ROUTING_HOME_STATES","ROUTING_PROJECT_STATES","ROUTING_ADMIN_STATES","ROUTING_PROFILE_STATE","ROUTING_ORGANIZATION_STATES","Initialization","routing","getRoutingState","transitionError","RouteSwitch","Switch","firstDuration","enterDuration","transition","duration","restoreCurrentUrl","unauthorizedErrorHandler","cancelledErrorHandler","unknownErrorHandler","stage","performLogout","validateRecoveryToken","assertDecode","loadProject","loadProjectListViewMode","parseProjectListQuery","saveProjectListViewMode","loadSchemaSelection","SCHEMA_SELECTION_FETCH","loadUsersList","USERS_LIST_FETCH","USERS_LIST_RESET","forceOrganizationSync","forceProjectSynchronization","userSnapshotsToSync","getUsersListData","forceUserSynchronization","USER_SYNC_RESET","isTransitioning","routingReducer","routeChangeReducer","errorHook","getIsRoutingBlocked","preHook","statesToLeave","getStatesToLeave","onLeaving","statesToRetain","getStatesToRetain","onRetaining","statesToEnter","getStatesToEnter","onEntering","onLeft","onRetained","onEntered","postHook","matchState","getCurrentState","uid","createTransitionUid","performPreTransition","performPostTransition","handleTransitionError","LOCATION_CHANGE","locationChangeSaga","routeChangeSaga","composeSagas","createStateTransitionLoggingSaga","emulateTransitionDelay","fetchUsersList","syncUser","resetUsersList","redirectTo","destroySession","authenticate","fetchAnnouncements","checkIsAuthenticated","fetchPasswordResetToken","resetPasswordResetToken","fetchProjectList","abortProjectList","resetProjectList","fetchProjectDetails","resetProjectDetails","syncProjectDetails","fetchSchemaSelection","sagas","saga","statePathToMatch","statePath","stateMatch","matchPath","strict","sensitive","exact","states","stateTree","createStateTree","parentName","treeItem","isMatchEqual","match1","match2","params1","params2","aKeys","bKeys","isParamsEqual","isMatchContain","possibleAncestor","getEnterPath","SCHEMA_TEMPLATE_SELECT","SCHEMA_VERSION_CREATE","SCHEMA_VERSION_CHANGE","SCHEMA_VERSION_REMOVE","SCHEMA_COMMENT_CHANGE","SCHEMA_MATRIX_CHANGE","SCHEMA_SELECTION_CHANGE","SCHEMA_AREA_MAP","codec","SCHEMA_SELECTION","DEVICE_OPTIONS","DEFAULT_SCHEMA_SELECTION","SchemaPage","templates","selectTemplate","getSchemaSelection","changeSelection","createVersion","changeVersion","removeVersion","changeMatrix","changeComment","MultipleSchemasScreen","onSelectTemplate","onChangeSelection","onCreateVersion","onChangeVersion","onRemoveVersion","onChangeComment","onChangeMatrix","schemaReducer","schemaSelectionReducer","previousProjectSchemaArea","previousSchema","previousSchemaArea","modifiedSchema","schemaSelectionResult","mapSchemaFormDataToProject","modifiedReportProjectData","resolveReportSchemaSelection","modifiedReportProject","schemaTemplateSelectSaga","schemaVersionCreateSaga","schemaVersionChangeSaga","schemaVersionRemoveSaga","schemaCommentChangeSaga","schemaMatrixChangeSaga","schemaSelectionChangeSaga","saveSchemaSelection","thermalEnergy","modifiedSchemaNumber","maxId","getReportPreselectedFutureVersion","modifiedWithReport","schemaNumber","STORAGE_CODEC","getProjectSchema","mapSchemaProjectToFormData","getSchemaState","GestureEvent","TouchEvent","NEVER","start$","fromEvent","once","capture","change$","stop$","cancelable","tap","switchMap","takeUntil","takeWhile","pairwise","pageX","pageY","menu$","down$","move$","merge","eventName","isPrimary","pointerId","scan","next","skipWhile","currStore","initPoint","currPoint","abs","UNCERTAINTY_THRESHOLD","ignoreMove","prevStore","nextStore","nextA","nextB","prevA","prevB","prevCenter","nextCenter","prevDistance","nextDistance","handleMove","mergeAll","ctrlKey","deltaX","deltaY","wheelDelta","deltaMode","WheelEvent","DOM_DELTA_PAGE","DOM_DELTA_LINE","getWheelDelta","MOUSE_WHEEL_STEPS","sign","prevProjectData","nextProjectData","futureSchemaFirstId","previousReport","previousFutureVersionSelected","previousFutureVersionFound","mapAssignments","deviceId","valvePosition","mapSchemaByArea","currentSchemaArea","configSchema","configContainer","flowDirection","mapDevice","mapContainer","mapAssignment","isSchemaCommentArea","CommentVersionModal","DeleteVersionDialog","onConfirm","selectedVersionIndex","setSelectedVersionIndex","setCommentModalOpen","currentAreaSchema","currentAreaTemplates","currentAreaSelection","tab","handleSelectionChange","handleSchemaCreate","RadioButtonGroup","valueSelected","RadioButton","SchemaEditScreen","handleCommentModalClose","onSelectVersionIndex","SchemaSelectScreen","SchemaCanvasWithContext","animation","spring","preview","renderContent","renderModals","zoom","SchemaGesture","onEvent","handleCanvasEvent","renderCanvas","renderControls","SchemaBackground","SchemaAssignments","SchemaInputLayer","handleContainerSelect","zoomFactor","round","ZOOM_MIN","handleZoomOut","ZoomOut","leaveDelayMs","ZOOM_MAX","handleZoomIn","ZoomIn","handleZoomReset","ZoomReset","handleFullScreenClose","handleFullScreenOpen","Minimize","Maximize","handleContainerCancel","SchemaContainerSelect","onSelectDevice","handleDeviceSelect","SchemaContainerPreview","handleContainerChange","handleZoomEvent","handleMoveEvent","getViewboxPoint","ZOOM_STEP","zoomWithOrigin","applyMatrixConstraint","onChangeAssignments","schemaPoint","pointTransform","matrixInverse","matrixScale","rb","realLT","realRB","SchemaEventCanvas","SchemaAssignment","SchemaCanvas","injectIntl","SchemaCard","handleSelect","SchemaClearContainersConfirmation","PREVIEW_SIZE","group","handleGroupChange","filteredDeviceOptions","renderItem","getDeviceSelectHandler","deviceType","filteredOptions","OnChangeData","memoize","SchemaDevice","SchemaEditScreenWithoutContext","isClearConfirmationOpen","isDeleteConfirmationOpen","isMaximumVersionAmountExceeded","handleDeleleOpen","handleVersionCreate","currentVersion","handleAssignmentsChange","handleDeleleCancel","handleDeleleSubmit","versions","ReadonlyArray","PureComponent","events","Subscription","bbox","w","h","handleResize","unsubscribe","canvasGesture","canvasPointer","canvasWheel","getBoundingClientRect","getScaleMatrix","bboxPoint","center","SchemaEventCanvasZoom","SchemaEventCanvasMove","getSelectHandler","getButtonStyles","AddAlt","cardRefs","el","objectPosition","SchemaDeviceShape","SchemaContainerShape","ScreenSizeGuard","screenWidth","setScreenWidth","screenWidthChangeListener","screen","supportedScreenWidth","constUndefined","SCROLL_RESTORE","ScrollRestoration","scrollPosition","getScrollRestoration","scrollRestoration","unlisten","listen","isRestoring","lastScrollPosition","scrollY","scrollReducer","scrollRestorationReducer","getScrollState","scroll","scrollTo","SHARE_PROJECT_FETCH","SHARE_PROJECT_SUBMIT","SHARE_PROJECT_REMOVE_OPEN","SHARE_PROJECT_REMOVE_CLOSE","SHARED_USER","SHARE_PROJECT_FORM_SCHEMA","emailsArray","emailAlreadyExist","emailList","modalData","getShareProjectData","shareProjectClose","shareProjectSubmit","removeUserClose","removeUserRequest","removeUserConfirm","ShareProjectModal","ShareProjectRemoveModal","shareProjectReducer","shareProjectDataReducer","shareProjectUsersReducer","shareProjectRemoveReducer","modifyRemoving","dataLens","modifyUsers","loadSharedProjectUsers","getShareProjectProject","getShareProjectUsers","getShareProjectRemovingUser","removeUserFromSharedProject","shareProjectModalSaga","shareProjectFetchSaga","shareProjectSubmitSaga","shareProjectRemoveSaga","currentUsers","emails","not","isEmpty","shareProjectWith","updatedUsers","userList","sharedUser","ShareProjectShareForm","ShareProjectUserList","validationSchema","StructuredListWrapper","StructuredListHead","StructuredListRow","head","StructuredListCell","StructuredListBody","USER_SAVE","USER_ADD","USER_DELETE","USER_SYNC_PERFORM","USERS_LIST_QUERY","USERS_LIST_TARGET","USERS_LIST_ORDER","ORGANIZATION_USER","UserListActions","searchQuery","setSearchQuery","handleAddUserOpen","UserListHeader","areAllSelected","areSomeSelected","sortingTarget","sortingOrder","setSortingTarget","setSortingOrder","handleHeaderCheckboxChange","onSortingChange","UserRow","isSelf","currentUser","isSelected","onSelectHandler","isRowOpened","setRowOpened","contentHeight","setContentHeight","saveUser","handleSaveUser","USER_ADD_FORM_SCHEMA","UsersPage","isAddUserModalOpen","setAddUserModalOpen","userDeleting","getUserDeleting","getUsersQuery","getUsersSortingTarget","getUsersSortingOrder","allUserSnapshots","sortedFoundUsers","getSortedFoundUsers","sortedFoundSelectableUsers","getSortedFoundSelectableUsers","deleteUser","handleAddUserCancel","UsersListBody","handleDelete","usersToDelete","AddUserModal","userSnapshots","deletingUserIds","deletingUser","deleting","deletedUserIds","editing","isDeletingUsers","usersReducer","userAddingReducer","userDeletingReducer","userEditingReducer","userSyncReducer","userForm","userValues","savedUserData","savedUser","createUser","synchronizedUsers","syncUserBackground","usersToUpdate","updateUser","userCreateSaga","userSaveSaga","userRemoveSaga","userSyncPerformSaga","userData","userId","userEditing","getUserEditing","waitUserSynchronization","USERS","getFoundUsers","lowerCasedQuery","foundUsers","targetA","targetB","getUsersState","addUser","isLoading","addUserSubmitted","addUserErrors","DeleteUserModal","onDelete","selectedUsers","isDeleteUserModalOpen","setDeleteUserModalOpen","setSelectedUsers","handleDeleteUserCancel","selectedUser","filteredUsers","allSelectableUserIds","combineReducers","router","connectRouter","React","StrictMode","HelmetProvider","ConnectedRouter","Route","component","NotFound","loaderSaga","configSaga","routingSaga","loginSaga","passwordForgotSaga","passwordResetSaga","schemaSaga","hvacSaga","basedataSaga","projectNewSaga","projectSyncSaga","projectListSaga","projectViewSaga","evaluationSaga","reportSaga","assetSaga","modalStackSaga","feedbackSaga","profileSaga","usersSaga","organizationSaga","shareProjectSaga","announcementsSaga","doOnWorker","WORKER_RESULT","WORKER_ERROR","WORKER_RESULT_SUCCESS","WORKER_RESULT_FAILURE","doWorkerRequestUsingMessagePort","worker","channel","callback","postMessage","port1","port2","onmessage","onmessageerror","workerUrl","Worker","MessageChannel","cps","close","doRequest","terminate","saveCanvas","canvas","toBlob","Image","crossOrigin","naturalWidth","naturalHeight","getContext","drawImage","getImageUrls","nodes","imageUrls","imageSource","pageNode","imageData","getImageContent","workerRequest","resources","doOnPdfWorker","AssertionError","isNotEmpty","cancelOn","reducers","reducer","REQUEST","PENDING","SUCCESS","FAILURE","TRIGGER","condition","thenSelector","elseSelector","selector1","selector2"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,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MA,IAER7I,QAAS,CAACtI,EAAMmR,KAAS,CACvB7D,KAAM89F,EACNprG,KAAMA,EACNmR,KAAMA,IAER5I,QAAS,CAACvI,EAAMmR,KAAS,CACvB7D,KAAM+9F,EACNrrG,KAAMA,EACNmR,KAAMA,O,gIC3DZ,yBAAmD7D,GACjD,MAAMg+F,EAAah+F,EAAH,WAEhB,MAAO,CACLjB,QAAS,CAACrM,EAAMmR,KAAS,CAAG7D,KAAMg+F,EAAStrG,KAAMA,EAAMmR,KAAMA,IAC7DpF,GAAK9G,GAAkDA,EAAOqI,OAASg+F,K,6ICvB3E,qBAA6BxoG,GAC3B,YAAiBsM,IAAVtM,GAGT,qBAA6BA,GAC3B,OAAiB,OAAVA,GAGT,sBAA8BA,GAC5B,OAAOA,U,8LCNT,qCACE,MAAO,CAACwC,EAAOF,IAAUA,GAe3B,qCACEmmG,EACAC,EACAC,GAGA,MAAO,CAACnmG,EAAOF,KAAU+4B,IAAUotE,EAAUjmG,EAAOF,KAAU+4B,GAC1DqtE,EAAalmG,EAAOF,KAAU+4B,GAC9BstE,EAAanmG,EAAOF,KAAU+4B,IAapC,iCACEutE,EACAC,GAEA,MAAO,CAACrmG,EAAOF,IAAUumG,EAAUrmG,EAAOomG,EAAUpmG,EAAOF,M","file":"portal.68866ef7.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t0: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,1]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import { IconButton } from '@carbon/react';\n\n// see https://github.com/carbon-design-system/carbon/issues/17956\n// eslint-disable-next-line react/forbid-foreign-prop-types\ndelete IconButton.propTypes;\n","import { BaseError } from '@belimo-retrofit-portal/logic';\n\nexport class CancelledError extends BaseError {\n public constructor(\n message: string,\n context?: unknown,\n previous?: BaseError,\n ) {\n super(message, previous);\n }\n\n public get name(): string {\n return 'CancelledError';\n }\n}\n","import { BaseError } from '@belimo-retrofit-portal/logic';\n\nexport class HttpError extends BaseError {\n public constructor(\n public readonly response: Response,\n previous?: BaseError,\n ) {\n super(`HTTP error ${response.status} (\"${response.statusText}\")`, previous);\n }\n\n public get name(): string {\n return 'HttpError';\n }\n\n public get status(): number {\n return this.response.status;\n }\n\n public toJSON(): Record {\n return {\n ...super.toJSON(),\n response: this.response,\n };\n }\n}\n","import { useCallback } from 'react';\nimport { useDispatch } from 'react-redux';\nimport { Action } from 'redux';\n\nexport function useAction>(\n creator: (...value: TArgs) => Action,\n): (...value: TArgs) => void;\n\nexport function useAction(\n creator: () => Action,\n): () => void;\n\nexport function useAction>(\n creator: (...value: TArgs) => Action,\n): (...value: TArgs) => void {\n const dispatch = useDispatch();\n return useCallback((...value) => dispatch(creator(...value)), [dispatch, creator]);\n}\n","import { useCallback } from 'react';\nimport { Action } from 'redux';\nimport { useAction } from 'src/hooks/useAction';\n\nexport function useBoundAction>(\n creator: (...values: TData) => Action,\n ...values: TData\n): () => void {\n const action = useAction(creator);\n return useCallback(() => action(...values), [action, values]);\n}\n","import { useCallback } from 'react';\nimport { useSelector } from 'react-redux';\nimport { RootState } from 'src/types/RootState';\n\nexport function useParametricSelector(\n selector: (state: RootState, param: TParameter) => TResult,\n param: TParameter,\n): TResult {\n const plainSelector = useCallback((state: RootState) => selector(state, param), [selector, param]);\n return useSelector(plainSelector);\n}\n","import './index.scss';\nimport 'dayjs/locale/de-ch';\nimport 'dayjs/locale/fr-ch';\nimport 'src/_carbon';\nimport { init } from 'src/init';\nimport { assertNotNull } from 'src/utils/assert';\n\nconst ROOT_ELEMENT = assertNotNull(\n document.getElementById('root'),\n 'Could not find DOM root',\n);\ninit(ROOT_ELEMENT);\n","/* eslint-disable import/no-import-module-exports */\nimport { routerMiddleware } from 'connected-react-router';\nimport { constVoid } from 'fp-ts/function';\nimport { History, createBrowserHistory } from 'history';\nimport nProgress from 'nprogress';\nimport 'nprogress/nprogress.css';\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { AppContainer } from 'react-hot-loader';\nimport { applyMiddleware, createStore, Middleware, Store } from 'redux';\nimport { composeWithDevTools } from 'redux-devtools-extension';\nimport createSagaMiddleware from 'redux-saga';\nimport { rootReducer } from 'src/reducers/rootReducer';\nimport { Root } from 'src/root';\nimport { rootSaga } from 'src/sagas/rootSaga';\nimport { RootState } from 'src/types/RootState';\n\nexport function init(\n rootElement: HTMLElement,\n): void {\n nProgress.configure({ showSpinner: false });\n\n const history = createBrowserHistory();\n const sagaMiddleware = createSagaMiddleware({\n onError(error: Error, { sagaStack }) {\n /* eslint-disable no-console */\n console.error(error);\n console.error(sagaStack);\n\n // TODO: sentry logging\n },\n });\n\n const store = rootStore(history, [\n sagaMiddleware,\n routerMiddleware(history),\n ]);\n\n const reactRoot = createRoot(rootElement);\n\n let sagaTask = sagaMiddleware.run(rootSaga);\n const renderApp = (RootElement: typeof Root): void => reactRoot.render((\n \n \n \n ));\n\n renderApp(Root);\n\n // Hot Module Replacement API\n if (module.hot) {\n module.hot.accept('./root', () => {\n // eslint-disable-next-line\n const nextRoot: typeof Root = require('./root').Root;\n renderApp(nextRoot);\n });\n module.hot.accept('./sagas/rootSaga', () => {\n sagaTask.cancel();\n sagaTask.toPromise().then(() => {\n // eslint-disable-next-line\n const nextSaga: typeof rootSaga = require('./sagas/rootSaga').rootSaga;\n sagaTask = sagaMiddleware.run(nextSaga);\n }, constVoid);\n });\n module.hot.accept('./reducers/rootReducer', () => {\n // eslint-disable-next-line\n const nextReducer: typeof rootReducer = require('./reducers/rootReducer').rootReducer;\n store.replaceReducer(nextReducer(history));\n });\n }\n}\n\nfunction rootStore(\n history: History,\n middlewares: ReadonlyArray,\n): Store {\n return createStore(\n rootReducer(history),\n composeWithDevTools({ name: 'Belimo Portal', trace: true })(applyMiddleware(...middlewares)),\n );\n}\n","import { INTEGER, Integer } from '@belimo-retrofit-portal/logic';\nimport { pipe } from 'fp-ts/function';\nimport * as C from 'io-ts/Codec';\nimport * as D from 'io-ts/Decoder';\nimport * as E from 'io-ts/Encoder';\nimport { NUMBER_FROM_STRING } from 'src/io/codecs/NumberFromString';\n\nconst decoder: D.Decoder = pipe(\n NUMBER_FROM_STRING,\n D.parse(INTEGER.decode),\n);\n\nconst encoder: E.Encoder = {\n encode: String,\n};\n\nexport const INTEGER_FROM_STRING = C.make(decoder, encoder);\n","import * as C from 'io-ts/Codec';\nimport * as D from 'io-ts/Decoder';\nimport * as E from 'io-ts/Encoder';\n\nconst decoder: D.Decoder = {\n decode: (input) => (input instanceof Blob\n ? D.success(input)\n : D.failure(input, 'NativeBlob')),\n};\n\nexport const NATIVE_BLOB: C.Codec = C.make(decoder, E.id());\n","import { pipe } from 'fp-ts/function';\nimport * as C from 'io-ts/Codec';\nimport * as D from 'io-ts/Decoder';\nimport * as E from 'io-ts/Encoder';\n\nconst decoder: D.Decoder = pipe(\n D.string,\n D.parse((input) => {\n const value = +input;\n return Number.isNaN(value) || input.trim() === ''\n ? D.failure(input, 'NumberFromString')\n : D.success(value);\n }),\n);\n\nconst encoder: E.Encoder = {\n encode: String,\n};\n\nexport const NUMBER_FROM_STRING = C.make(decoder, encoder);\n","import * as C from 'io-ts/Codec';\nimport * as D from 'io-ts/Decoder';\nimport * as E from 'io-ts/Encoder';\n\nexport function ReadOnlyArray(item: C.Codec): C.Codec, ReadonlyArray> {\n return C.make, ReadonlyArray>(\n D.array(item),\n { encode: (value) => E.array(item).encode(value.slice()) },\n );\n}\n","import { getOrElse } from 'fp-ts/Either';\nimport { pipe } from 'fp-ts/function';\nimport { Decoder } from 'io-ts/Decoder';\n\nexport function decodeOrGet(decoder: Decoder, input: I, value: A): A {\n return pipe(\n decoder.decode(input),\n getOrElse(() => value),\n );\n}\n","import { DecodingError } from '@belimo-retrofit-portal/logic';\nimport { getOrElseW } from 'fp-ts/Either';\nimport { pipe } from 'fp-ts/function';\nimport { Decoder } from 'io-ts/Decoder';\n\nexport function decodeOrThrow(decoder: Decoder, input: I): A {\n return pipe(\n decoder.decode(input),\n getOrElseW((error) => new DecodingError(input, error).throw()),\n );\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { T, useTranslate } from '@tolgee/react';\nimport { useMemo } from 'react';\nimport * as React from 'react';\nimport { useSelector } from 'react-redux';\nimport { htmlToReact } from 'src/modules/common/utils/htmlToReact';\nimport { getLanguage } from 'src/modules/config/selectors/getLanguage';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\n\nexport type PrimitiveType =\n | string\n | number\n | boolean\n | null\n | undefined\n | Date;\n\nexport type MessageDescriptor = {\n readonly id: string;\n};\n\nexport type FormatIcuElement = {\n (node: React.ReactNode): React.ReactNode;\n};\n\nexport type StringMessageValues = Readonly>;\n\nexport type ElementMessageValues = Readonly>;\n\nexport type FormattedMessageProps = MessageDescriptor & {\n readonly values?: ElementMessageValues;\n};\n\nexport type FormattedDateProps = {\n readonly value: Date;\n};\n\nexport type IntlInstance = {\n readonly formatMessage: (descriptor: MessageDescriptor, values?: StringMessageValues) => string;\n};\n\nexport type WrappedComponentProps = TProps & {\n readonly intl: IntlInstance;\n};\n\nexport const FormattedMessage = ({ id, values }: FormattedMessageProps): React.ReactElement => (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n \n);\n\nexport const FormattedHTMLMessage = ({ id }: MessageDescriptor): React.ReactElement => {\n const { t } = useTranslate();\n\n const children = useMemo(() => parseHtml(t(id, id, { noWrap: true }), id), [id, t]);\n\n // eslint-disable-next-line react/jsx-no-useless-fragment\n return <>{children};\n};\n\nfunction parseHtml(html: string, id: string): React.ReactNode {\n try {\n return htmlToReact(html);\n } catch (error) {\n const wrapped = new RuntimeError(`Invalid HTML message content \"${id}\"`, { id, html }, NativeError.wrap(error));\n if (process.env.NODE_ENV === 'development') {\n throw wrapped;\n }\n\n sentryCatch(wrapped);\n return html;\n }\n}\n\nexport const FormattedDate = ({ value }: FormattedDateProps): React.ReactElement => {\n const language = useSelector(getLanguage);\n\n const formatted = new Intl.DateTimeFormat(language, {\n year: '2-digit',\n month: '2-digit',\n day: '2-digit',\n }).format(value);\n\n // eslint-disable-next-line react/jsx-no-useless-fragment\n return <>{formatted};\n};\n\nexport function useIntl(): IntlInstance {\n const { t } = useTranslate();\n\n return useMemo((): IntlInstance => ({\n formatMessage: (descriptor, values) => t(descriptor.id, values),\n }), [t]);\n}\n\nexport function injectIntl(\n Component: React.ComponentType>,\n): React.FunctionComponent {\n return (props: TProps): React.ReactElement => {\n const intl = useIntl();\n return ;\n };\n}\n","import { Announcement } from 'src/modules/common/types/Announcement';\nimport { createTrigger } from 'src/utils/createTrigger';\n\nexport const ANNOUNCEMENTS_READ = createTrigger('ANNOUNCEMENTS_READ');\nexport const ANNOUNCEMENTS_FETCH = createTrigger>('ANNOUNCEMENTS_FETCH');\n","import './AnnouncementsEmpty.scss';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { BellIcon } from 'src/modules/common/icons/BellIcon';\n\nexport const AnnouncementsEmpty = (): React.ReactNode => (\n
\n
\n \n
\n\n

\n \n

\n\n

\n \n

\n
\n);\n","import { Action } from 'redux';\nimport {\n ANNOUNCEMENTS_FETCH,\n} from 'src/modules/announcements/actions/AnnouncementsActions';\nimport { AnnouncementsState } from 'src/modules/announcements/types/announcementsState';\n\nconst defaultState: AnnouncementsState = {\n announcements: [],\n};\n\nexport const announcementsReducer = (\n // eslint-disable-next-line @typescript-eslint/default-param-last\n state: AnnouncementsState = defaultState,\n action: Action,\n): AnnouncementsState => {\n if (ANNOUNCEMENTS_FETCH.is(action)) {\n return {\n announcements: action.data,\n };\n }\n\n return state;\n};\n","import { SagaIterator } from 'redux-saga';\nimport {\n ANNOUNCEMENTS_READ,\n} from 'src/modules/announcements/actions/AnnouncementsActions';\nimport { readAnnouncements } from 'src/modules/announcements/sagas/readAnnouncements';\nimport { takeLatest } from 'typed-redux-saga';\n\nexport function* announcementsSaga(): SagaIterator {\n yield* takeLatest(ANNOUNCEMENTS_READ.is, readAnnouncements);\n}\n","import { SagaIterator } from 'redux-saga';\nimport {\n ANNOUNCEMENTS_FETCH,\n} from 'src/modules/announcements/actions/AnnouncementsActions';\nimport { loadAnnouncements } from 'src/modules/announcements/sagas/utils/loadAnnouncements';\nimport { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* fetchAnnouncements(): SagaIterator {\n try {\n yield* call(logDebug, 'Fetching announcements...');\n\n const data = yield* call(loadAnnouncements);\n\n yield* put(ANNOUNCEMENTS_FETCH.trigger(data));\n yield* call(logDebug, 'Fetching announcements... done', data);\n\n yield* call(scheduleUpdateLatestActivity);\n yield* call(scheduleUpdateFeedbackCounter);\n } catch (error) {\n yield* call(logError, 'Fetching announcements... error', error);\n throw error;\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { call as callEffect } from 'redux-saga/effects';\nimport { ANNOUNCEMENTS_FETCH } from 'src/modules/announcements/actions/AnnouncementsActions';\nimport { readAnnouncement } from 'src/modules/announcements/sagas/utils/readAnnouncement';\nimport {\n getAnnouncementState,\n} from 'src/modules/announcements/selectors/getAnnouncementState';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { all, call, put, select } from 'typed-redux-saga';\n\nexport function* readAnnouncements(): SagaIterator {\n try {\n yield* call(logDebug, 'Reading announcements...');\n\n const announcementState = yield* select(getAnnouncementState);\n\n const unreadAnnouncements = announcementState.announcements.filter((announcement) => !announcement.read);\n\n yield* all(unreadAnnouncements.map(\n (unreadAnnouncement) => callEffect(readAnnouncement, unreadAnnouncement.id),\n ));\n\n yield* put(ANNOUNCEMENTS_FETCH.trigger(announcementState.announcements.map(\n (announcement) => ({\n ...announcement,\n read: true,\n }),\n )));\n yield* call(logDebug, 'Reading announcements... done');\n\n yield* call(scheduleUpdateLatestActivity);\n yield* call(scheduleUpdateFeedbackCounter);\n } catch (error) {\n yield* call(logError, 'Fetching announcements... error', error);\n yield* call(sentryCatch, error);\n yield* call(showNotification, { variant: 'error', type: 'error', messageId: 'announcements/readError' });\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { ANNOUNCEMENTS } from 'src/modules/common/codecs/Announcement';\nimport { Announcement } from 'src/modules/common/types/Announcement';\nimport { call } from 'typed-redux-saga';\n\nexport function* loadAnnouncements(): SagaIterator> {\n try {\n const { content } = yield* call(makeRestRequest, 'GET', '/notifications/announcements');\n return yield* call(decodeOrThrow, ANNOUNCEMENTS, content);\n } catch (error) {\n throw new RuntimeError('Could not load announcements', {}, NativeError.wrap(error));\n }\n}\n","import { NativeError, RuntimeError, Uuid } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { ANNOUNCEMENT } from 'src/modules/common/codecs/Announcement';\nimport { Announcement } from 'src/modules/common/types/Announcement';\nimport { call } from 'typed-redux-saga';\n\nexport function* readAnnouncement(announcementId: Uuid): SagaIterator {\n try {\n const { content } = yield* call(\n makeRestRequest,\n 'PUT',\n `/notifications/announcements/${encodeURIComponent(announcementId)}`,\n );\n\n return yield* call(decodeOrThrow, ANNOUNCEMENT, content);\n } catch (error) {\n throw new RuntimeError('Could not mark announcement as read', {}, NativeError.wrap(error));\n }\n}\n","import { AnnouncementsState } from 'src/modules/announcements/types/announcementsState';\nimport { RootState } from 'src/types/RootState';\n\nexport function getAnnouncementState(state: RootState): AnnouncementsState {\n return state.announcements;\n}\n","import './Announcements.scss';\nimport dayjs from 'dayjs';\nimport React, { memo } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { useAction } from 'src/hooks/useAction';\nimport {\n ANNOUNCEMENTS_READ,\n} from 'src/modules/announcements/actions/AnnouncementsActions';\nimport { AnnouncementsEmpty } from 'src/modules/announcements/components/AnnouncementsEmpty';\nimport {\n getAnnouncementState,\n} from 'src/modules/announcements/selectors/getAnnouncementState';\nimport { OverflowMenu } from 'src/modules/common/components/OverflowMenu';\nimport { OverflowMenuItem } from 'src/modules/common/components/OverflowMenuItem';\nimport { b, em, i, strong } from 'src/modules/common/constants/formattingHelpers';\nimport { BellIcon } from 'src/modules/common/icons/BellIcon';\nimport { CircleFilledIcon } from 'src/modules/common/icons/CircleFilledIcon';\n\nexport const Announcements = memo(() => {\n const intl = useIntl();\n\n const announcementsState = useSelector(getAnnouncementState);\n\n const isBadgeHidden = announcementsState.announcements.every((announcement) => announcement.read);\n\n const readAnnouncements = useAction(ANNOUNCEMENTS_READ.trigger);\n\n return (\n \n \n\n {!isBadgeHidden && (\n
\n \n
\n )}\n \n )}\n >\n
\n
\n \n
\n\n {announcementsState.announcements.length\n ? announcementsState.announcements.map((announcement) => (\n \n
\n
\n

\n \n

\n\n
\n

\n {dayjs(announcement.date).format(intl.formatMessage({ id: 'common/dateFormat' }))}\n

\n\n {!announcement.read && (\n
\n \n
\n )}\n
\n
\n\n

\n \n

\n
\n \n )) : (\n \n )}\n
\n \n );\n});\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { Json } from 'fp-ts/Json';\nimport { filter } from 'fp-ts/Record';\nimport { SagaIterator } from 'redux-saga';\nimport { HttpError } from 'src/errors/HttpError';\nimport { getApiBaseUrl } from 'src/modules/config/selectors/getApiBaseUrl';\nimport { getLanguage } from 'src/modules/config/selectors/getLanguage';\nimport { isDefined } from 'src/utils/guard';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* makeRestRequest(\n method: 'GET' | 'POST' | 'PUT' | 'DELETE',\n relativeUrl: string,\n requestData: Json | FormData | URLSearchParams | undefined = undefined,\n): SagaIterator<{ content: unknown }> {\n const language = yield* select(getLanguage);\n const apiBaseUrl = yield* select(getApiBaseUrl);\n\n const url = apiBaseUrl.concat(relativeUrl);\n const config: RequestInit = {\n method: method,\n mode: 'cors',\n credentials: 'include',\n headers: filter(isDefined)({\n 'Content-Type': getRequestType(requestData),\n 'Accept-Language': language,\n }),\n body: getRequestBody(requestData),\n };\n\n try {\n const response = yield* call(fetch, url, config);\n if (!response.ok) {\n throw new HttpError(response);\n }\n\n const contentType = response.headers.get('Content-Type');\n if (contentType?.startsWith('application/json')) {\n const content: unknown = yield* call({\n fn: response.json,\n context: response,\n });\n return { content };\n }\n if (contentType?.startsWith('text/plain')) {\n const content: unknown = yield* call({\n fn: response.text,\n context: response,\n });\n return { content };\n }\n\n const content: unknown = yield* call({\n fn: response.blob,\n context: response,\n });\n return { content };\n } catch (error) {\n throw new RuntimeError(\n `Could not perform \"${method} ${relativeUrl}\" request`,\n { url, config },\n NativeError.wrap(error),\n );\n }\n}\n\nfunction getRequestBody(requestData: Json | FormData | URLSearchParams | undefined): BodyInit | undefined {\n if (\n requestData === undefined ||\n requestData instanceof FormData ||\n requestData instanceof URLSearchParams\n ) {\n return requestData;\n }\n\n return JSON.stringify(requestData);\n}\n\nfunction getRequestType(requestData: Json | FormData | URLSearchParams | undefined): string | undefined {\n if (\n requestData === undefined ||\n requestData instanceof FormData ||\n requestData instanceof URLSearchParams\n ) {\n // will be set by fetch\n return undefined;\n }\n\n return 'application/json';\n}\n","import { BaseError } from '@belimo-retrofit-portal/logic';\nimport { HttpError } from 'src/errors/HttpError';\n\nexport function isHttpError(error: BaseError, status: number): boolean {\n if (error instanceof HttpError) {\n return error.status === status;\n }\n\n return error.previous\n ? isHttpError(error.previous, status)\n : false;\n}\n","import { Asset } from 'src/modules/common/types/Asset';\nimport { createActions } from 'src/utils/createActions';\nimport { createTrigger } from 'src/utils/createTrigger';\n\nexport const ASSET_UPLOAD = createActions('ASSET_UPLOAD');\nexport const ASSET_CANCEL = createTrigger('ASSET_CANCEL');\n","import { Action } from 'redux';\nimport { ASSET_CANCEL } from 'src/modules/asset/actions/AssetActions';\nimport { AssetState } from 'src/modules/asset/types/AssetState';\n\nexport function assetCancelReducer(state: AssetState, action: Action): AssetState {\n if (ASSET_CANCEL.is(action)) {\n const copy = new Map(state);\n copy.delete(action.meta);\n return copy;\n }\n\n return state;\n}\n","import { assetCancelReducer } from 'src/modules/asset/reducers/assetCancelReducer';\nimport { assetUploadReducer } from 'src/modules/asset/reducers/assetUploadReducer';\nimport { AssetState } from 'src/modules/asset/types/AssetState';\nimport { chainReducers } from 'src/utils/chainReducers';\n\nconst defaultState: AssetState = new Map();\n\nexport const assetReducer = chainReducers(defaultState, [\n assetUploadReducer,\n assetCancelReducer,\n]);\n","import { Action } from 'redux';\nimport { ASSET_UPLOAD } from 'src/modules/asset/actions/AssetActions';\nimport { AssetState } from 'src/modules/asset/types/AssetState';\nimport { FUTURE } from 'src/modules/common/types/Future';\n\nexport function assetUploadReducer(state: AssetState, action: Action): AssetState {\n if (ASSET_UPLOAD.isRequest(action)) {\n const copy = new Map(state);\n copy.set(action.meta, FUTURE.pending());\n return copy;\n }\n if (ASSET_UPLOAD.isSuccess(action)) {\n const copy = new Map(state);\n copy.set(action.meta, FUTURE.success(action.data));\n return copy;\n }\n if (ASSET_UPLOAD.isFailure(action)) {\n const copy = new Map(state);\n copy.set(action.meta, FUTURE.failure(action.data));\n return copy;\n }\n\n return state;\n}\n","import { SagaIterator, Task } from 'redux-saga';\nimport { ASSET_CANCEL, ASSET_UPLOAD } from 'src/modules/asset/actions/AssetActions';\nimport { assetUploadSaga } from 'src/modules/asset/sagas/assetUploadSaga';\nimport { cancel, fork, take } from 'typed-redux-saga';\n\nexport function* assetSaga(): SagaIterator {\n const TASK_MAP = new Map();\n\n while (true) {\n const action = yield* take([\n ASSET_UPLOAD.isRequest,\n ASSET_CANCEL.is,\n ]);\n\n const fieldId = action.meta;\n const oldTask = TASK_MAP.get(fieldId);\n if (oldTask) {\n yield* cancel(oldTask);\n TASK_MAP.delete(fieldId);\n }\n\n if (ASSET_UPLOAD.isRequest(action)) {\n const newTask = yield* fork(assetUploadSaga, action);\n TASK_MAP.set(fieldId, newTask);\n }\n }\n}\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { ASSET_UPLOAD } from 'src/modules/asset/actions/AssetActions';\nimport { uploadAsset } from 'src/modules/asset/sagas/utils/uploadAsset';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* assetUploadSaga(\n action: GetRequestActionType,\n): SagaIterator {\n const id = action.meta;\n const file = action.data;\n\n try {\n yield* put(ASSET_UPLOAD.pending(id));\n yield* call(logDebug, `Uploading asset \"${id}\"...`, { file });\n\n const asset = yield* call(uploadAsset, file);\n\n yield* call(logDebug, `Uploading asset \"${id}\"... done`, asset);\n yield* put(ASSET_UPLOAD.success(asset, id));\n\n yield* call(scheduleUpdateLatestActivity);\n yield* call(scheduleUpdateFeedbackCounter);\n } catch (error) {\n yield* call(sentryCatch, error);\n yield* call(showNotification, { variant: 'error', type: 'error' });\n\n yield* call(logError, `Uploading asset \"${id}\"... error`, error);\n yield* put(ASSET_UPLOAD.failure(NativeError.wrap(error), id));\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { ASSET } from 'src/modules/common/codecs/Asset';\nimport { Asset } from 'src/modules/common/types/Asset';\nimport { call } from 'typed-redux-saga';\n\nexport function* uploadAsset(file: File): SagaIterator {\n try {\n const body = new FormData();\n body.append('file', file);\n\n const { content } = yield* call(makeRestRequest, 'POST', '/assets', body);\n return yield* call(decodeOrThrow, ASSET, content);\n } catch (error) {\n throw new RuntimeError('Could not upload asset', { file }, NativeError.wrap(error));\n }\n}\n","import { Asset } from 'src/modules/common/types/Asset';\nimport { Future } from 'src/modules/common/types/Future';\nimport { RootState } from 'src/types/RootState';\n\nexport function getAssetState(state: RootState, id: string): Future | null {\n return state.asset.get(id) ?? null;\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { numberToUnit32 } from 'src/modules/asset/utils/numberToUnit32';\n\nexport async function isValidImageData(file: File): Promise {\n try {\n const data = await file.slice(0, 12).arrayBuffer();\n const view = new Uint8Array(data);\n\n for (const magicNumbers of getValidMagicNumbers(file)) {\n const match = magicNumbers.every((byte, index) => view[index] === byte);\n if (match) {\n return true;\n }\n }\n\n return false;\n } catch (error) {\n throw new RuntimeError('Could not validate image data', { file }, NativeError.wrap(error));\n }\n}\n\nfunction* getValidMagicNumbers(file: File): Iterable {\n // JPG\n yield new Uint8Array([\n 0xFF, 0xD8,\n ]);\n\n // PNG\n yield new Uint8Array([\n 0x89,\n 0x50, 0x4E, 0x47,\n 0x0D, 0x0A,\n 0x1A,\n 0x0A,\n ]);\n\n // WEBP\n yield new Uint8Array([\n 0x52, 0x49, 0x46, 0x46,\n ...numberToUnit32(file.size - 8, true),\n 0x57, 0x45, 0x42, 0x50,\n ]);\n}\n","import { LogicError } from '@belimo-retrofit-portal/logic';\n\nexport function numberToUnit32(value: number, litteEndian: boolean): Uint8Array {\n if (!Number.isSafeInteger(value) || value < 0 || value > 0xFFFFFFFF) {\n throw new LogicError(`Number \"${value}\" can not be shown as UINT32`);\n }\n\n const view = new DataView(new ArrayBuffer(4), 0);\n view.setUint32(0, value, litteEndian);\n return new Uint8Array(view.buffer);\n}\n","import './AssetUpload.scss';\nimport React, { useCallback, useEffect } from 'react';\nimport { useAction } from 'src/hooks/useAction';\nimport { useParametricSelector } from 'src/hooks/useParametricSelector';\nimport { ASSET_CANCEL, ASSET_UPLOAD } from 'src/modules/asset/actions/AssetActions';\nimport { getAssetState } from 'src/modules/asset/selectors/getAssetState';\nimport { FileUpload } from 'src/modules/asset/views/FileUpload';\nimport { CustomLoading } from 'src/modules/common/components/CustomLoading';\nimport { Asset } from 'src/modules/common/types/Asset';\n\ntype Props = {\n readonly id: string;\n readonly name?: string;\n readonly disabled: boolean;\n readonly children: React.ReactNode;\n\n readonly onTouch: () => void;\n readonly onChange: (asset: Asset) => void;\n};\n\nexport const AssetUpload = ({\n id,\n name,\n onTouch,\n onChange,\n disabled,\n children,\n}: Props): React.ReactElement => {\n const assetUpload = useAction(ASSET_UPLOAD.request);\n const assetCancel = useAction(ASSET_CANCEL.trigger);\n\n const state = useParametricSelector(getAssetState, id);\n const loading = state?.state === 'pending';\n\n const handleChange = useCallback((file: File) => {\n assetUpload(file, id);\n }, [assetUpload, id]);\n\n useEffect(() => (): void => {\n assetCancel(undefined, id);\n }, [assetCancel, id]);\n useEffect(() => {\n if (state?.state === 'success') {\n onChange(state.value);\n }\n }, [state, onChange]);\n\n return (\n
\n
\n \n {children}\n \n
\n\n {state?.state === 'pending' && (\n
\n \n
\n )}\n
\n );\n};\n","import './FileUpload.scss';\nimport clsx from 'clsx';\nimport React, { useCallback, useEffect, useState } from 'react';\nimport { ErrorCode, FileRejection, useDropzone } from 'react-dropzone';\nimport { FormattedMessage } from 'react-intl';\nimport { isValidImageData } from 'src/modules/asset/utils/isValidImageData';\nimport { FILE_MAX_SIZE_FILED_MB } from 'src/modules/common/constants/fileField';\nimport { UploadIcon } from 'src/modules/common/icons/UploadIcon';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\n\ntype FileError =\n | 'file-too-large'\n | 'file-invalid-type';\n\ntype Props = {\n readonly id?: string;\n readonly name?: string;\n readonly disabled: boolean;\n readonly children: React.ReactNode;\n\n readonly onTouch: () => void;\n readonly onChange: (file: File) => void;\n};\n\nexport const FileUpload = ({\n id,\n name,\n onTouch,\n onChange,\n disabled,\n children,\n}: Props): React.ReactElement => {\n const [fileError, setFileError] = useState(null);\n\n const handleDrop = useCallback((acceptedFiles: File[]) => {\n const file = acceptedFiles[0];\n if (file) {\n isValidImageData(file).then((valid) => {\n if (valid) {\n setFileError(null);\n onChange(file);\n } else {\n setFileError(ErrorCode.FileInvalidType);\n }\n }, sentryCatch);\n }\n }, [onChange]);\n\n const handleReject = (rejectData: FileRejection[]): void => {\n const rejection = rejectData[0];\n\n /* eslint-disable @typescript-eslint/no-unsafe-enum-comparison */\n if (rejection.errors.some((error) => error.code === ErrorCode.FileTooLarge)) {\n setFileError(ErrorCode.FileTooLarge);\n } else if (rejection.errors.some((error) => error.code === ErrorCode.FileInvalidType)) {\n setFileError(ErrorCode.FileInvalidType);\n }\n /* eslint-enable @typescript-eslint/no-unsafe-enum-comparison */\n };\n\n const { getRootProps, getInputProps } = useDropzone({\n onDrop: handleDrop,\n onFileDialogOpen: onTouch,\n onDropRejected: handleReject,\n disabled: disabled,\n maxSize: FILE_MAX_SIZE_FILED_MB * 1024 * 1024, // 10 MB in bytes\n accept: {\n 'image/webp': ['.webp'],\n 'image/jpeg': ['.jpg', '.jpeg'],\n 'image/png': ['.png'],\n },\n });\n\n useEffect(() => {\n if (fileError !== null) {\n const timer = setTimeout(() => {\n setFileError(null);\n }, 3000);\n\n return () => clearTimeout(timer);\n }\n\n return undefined;\n }, [fileError]);\n\n return (\n \n \n\n
\n \n\n {fileError === ErrorCode.FileTooLarge\n ? \n : fileError === ErrorCode.FileInvalidType\n ? \n : children}\n
\n \n );\n};\n\nconst DropdownWarningFileTooLarge = (): React.ReactElement => (\n

\n \n

\n);\n\nconst DropdownWarningInvalidFormat = (): React.ReactElement => (\n

\n \n

\n);\n","import { BasedataFormData } from 'src/modules/basedata/types/BasedataFormData';\nimport { createTrigger } from 'src/utils/createTrigger';\n\nexport const BASEDATA_CHANGE = createTrigger('BASEDATA_CHANGE');\n","import { BasedataFormData } from 'src/modules/basedata/types/BasedataFormData';\nimport { FormRule } from 'src/modules/form/types/FormRule';\nimport * as R from 'src/modules/form/utils/rules';\n\nexport const BASEDATA_FORM_SCHEMA: FormRule = R.struct({\n cover: R.pass(),\n title: R.maxLength(40),\n\n projectGoals: R.maxLength(280),\n\n building: R.struct({\n type: R.required(),\n size: R.nullable(R.gt(0)),\n address: R.struct({\n street: R.maxLength(30),\n city: R.maxLength(20),\n country: R.required(),\n zip: R.maxLength(10),\n }),\n }),\n participants: R.struct({\n propertyManager: R.maxLength(50),\n consutlingEngineer: R.maxLength(50),\n productManager: R.maxLength(50),\n }),\n});\n","import { useForm } from '@form-ts/react';\nimport React, { useEffect } from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { useAction } from 'src/hooks/useAction';\nimport { useBoundAction } from 'src/hooks/useBoundAction';\nimport { BASEDATA_CHANGE } from 'src/modules/basedata/actions/BasedataActions';\nimport { BASEDATA_FORM_SCHEMA } from 'src/modules/basedata/constants/schema';\nimport { getBasedataFormData } from 'src/modules/basedata/selectors/getBasedataFormData';\nimport { BasedataFormData } from 'src/modules/basedata/types/BasedataFormData';\nimport { BasedataFormView } from 'src/modules/basedata/views/BasedataFormView';\nimport { ProjectToolbar } from 'src/modules/common/components/ProjectToolbar';\nimport { AppLayout } from 'src/modules/common/layouts/AppLayout';\nimport { useFormValidator } from 'src/modules/form/hooks/useFormValidator';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { PROJECT_VIEW_SHARE } from 'src/modules/project-view/actions/ProjectViewActions';\nimport { getProjectDetails } from 'src/modules/project-view/selectors/getProjectDetails';\nimport { ShareProject } from 'src/modules/sharing-projects/containers/ShareProject';\n\nexport const BasedataPage = (): React.ReactElement => {\n const intl = useIntl();\n const project = useSelector(getProjectDetails);\n const formData = useSelector(getBasedataFormData);\n\n const saveForm = useAction(BASEDATA_CHANGE.trigger);\n const shareProject = useBoundAction(PROJECT_VIEW_SHARE.trigger, project);\n\n const form = useForm('project.basedata', {\n reinitialize: false,\n initialValues: formData,\n });\n useFormValidator(form, BASEDATA_FORM_SCHEMA);\n\n useEffect(() => form.subscribe((prevState) => {\n const nextState = form.currentState;\n if (prevState.values !== nextState.values) {\n saveForm(nextState.values);\n }\n }), [form, saveForm]);\n\n return (\n <>\n \n \n {intl.formatMessage({ id: 'basedata/pageTitle' })}\n \n \n\n \n \n \n \n\n \n \n );\n};\n","import { NativeError, RuntimeError, resolveCurrentProjectData } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { BASEDATA_CHANGE } from 'src/modules/basedata/actions/BasedataActions';\nimport { Project } from 'src/modules/common/types/Project';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { syncProjectBackground } from 'src/modules/project-sync/sagas/utils/syncProjectBackground';\nimport { getProjectDetails } from 'src/modules/project-view/selectors/getProjectDetails';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetTriggerActionType } from 'src/utils/createTrigger';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* basedataChangeSaga(\n action: GetTriggerActionType,\n): SagaIterator {\n const formData = action.data;\n\n try {\n yield* call(logDebug, 'Saving project basedata...', formData);\n\n const previous = yield* select(getProjectDetails);\n const modified: Project = {\n ...previous,\n data: {\n ...previous.data,\n cover: formData.cover,\n title: formData.title,\n goals: formData.projectGoals,\n building: formData.building,\n participants: formData.participants,\n },\n };\n\n const modifiedCarbonIntensity = {\n ...modified,\n data: resolveCurrentProjectData(modified.data),\n };\n\n const reloaded = yield* call(syncProjectBackground, modifiedCarbonIntensity);\n yield* call(logDebug, 'Saving project basedata... done', reloaded);\n } catch (error) {\n const wrapped = new RuntimeError('Could not save project basedata', { formData }, NativeError.wrap(error));\n yield* call(logError, 'Saving project basedata... error', error);\n\n yield* call(sentryCatch, wrapped);\n yield* call(showNotification, { variant: 'error', type: 'error' });\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { BASEDATA_CHANGE } from 'src/modules/basedata/actions/BasedataActions';\nimport { basedataChangeSaga } from 'src/modules/basedata/sagas/basedataChangeSaga';\nimport { takeLatest } from 'typed-redux-saga';\n\nexport function* basedataSaga(): SagaIterator {\n yield* takeLatest(BASEDATA_CHANGE.is, basedataChangeSaga);\n}\n","import { createSelector } from 'reselect';\nimport { BasedataFormData } from 'src/modules/basedata/types/BasedataFormData';\nimport { Project } from 'src/modules/common/types/Project';\nimport { getProjectDetails } from 'src/modules/project-view/selectors/getProjectDetails';\n\nconst mapProjectDetails = (project: Project): BasedataFormData => ({\n cover: project.data.cover,\n title: project.data.title,\n building: project.data.building,\n participants: project.data.participants,\n projectGoals: project.data.goals,\n});\n\nexport const getBasedataFormData = createSelector(\n [getProjectDetails],\n mapProjectDetails,\n);\n","import './BasedataFormView.scss';\nimport { AreaUnit, BuildingType, CountryCode } from '@belimo-retrofit-portal/logic';\nimport { FormController } from '@form-ts/core';\nimport { constNull } from 'fp-ts/function';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { BasedataFormData } from 'src/modules/basedata/types/BasedataFormData';\nimport { AreaUnitView } from 'src/modules/common/components/AreaUnitView';\nimport { BottomNavigationHelper } from 'src/modules/common/components/BottomNavigationHelper';\nimport { TileCard } from 'src/modules/common/components/TileCard';\nimport { MAX_TRILLION } from 'src/modules/common/constants/decimal';\nimport { BUILDING_TYPE_OPTIONS, UNIT_VERSION_OPTIONS } from 'src/modules/common/constants/options';\nimport { useCountryList } from 'src/modules/common/hooks/useCountryList';\nimport { AssetField } from 'src/modules/form/components/AssetField';\nimport { AutocompleteField } from 'src/modules/form/components/AutocompleteField';\nimport { DecimalField } from 'src/modules/form/components/DecimalField';\nimport { DropdownField } from 'src/modules/form/components/DropdownField';\nimport { TextAreaField } from 'src/modules/form/components/TextAreaField';\nimport { TextField } from 'src/modules/form/components/TextField';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { ensureNonNull } from 'src/modules/form/utils/transform';\n\ntype Props = {\n readonly projectId: string;\n readonly form: FormController;\n};\n\nexport const BasedataFormView = ({ projectId, form }: Props): React.ReactElement => {\n const intl = useIntl();\n const countryCodes = useCountryList();\n\n const projectHvacUrl = `/project/${encodeURIComponent(projectId)}/hvac`;\n\n return (\n
\n
\n
\n }>\n \n \n
\n\n
\n }>\n \n \n\n }>\n \n \n
\n\n
\n }>\n
\n \n\n \n\n \n
\n\n
\n \n
\n\n
\n \n
\n\n
\n \n size=\"md\"\n wrapperClass=\"bp-basedata-form-view__field-wrapper bp-basedata-form-view__country-field\"\n titleText={intl.formatMessage({ id: 'basedata/building/address/country' })}\n field={form.field.at('building').at('address').at('country').transform(ensureNonNull())}\n options={countryCodes}\n itemToElement={renderCountryOption}\n direction=\"top\"\n />\n\n \n
\n
\n\n }>\n \n\n \n\n \n\n \n \n
\n\n \n
\n
\n );\n};\n\nfunction renderBuildingTypeOption(option: BuildingType): React.ReactElement {\n return ;\n}\n\nfunction renderUnitOptions(option: AreaUnit): React.ReactElement {\n return ;\n}\n\nfunction renderCountryOption(option: CountryCode | null): React.ReactNode {\n return option ? : null;\n}\n","import { DATE_TIME, UUID } from '@belimo-retrofit-portal/logic';\nimport * as D from 'io-ts/Decoder';\nimport { Announcement } from 'src/modules/common/types/Announcement';\n\nexport const ANNOUNCEMENT: D.Decoder = D.struct({\n id: UUID,\n read: D.boolean,\n date: DATE_TIME,\n title: D.string,\n description: D.string,\n});\n\nexport const ANNOUNCEMENTS: D.Decoder> = D.array(ANNOUNCEMENT);\n","import { UUID } from '@belimo-retrofit-portal/logic';\nimport { Json } from 'fp-ts/Json';\nimport * as C from 'io-ts/Codec';\nimport { Asset } from 'src/modules/common/types/Asset';\n\nexport const ASSET: C.Codec = C.struct({\n id: UUID,\n fileName: C.string,\n});\n","import { DATE_TIME, UUID } from '@belimo-retrofit-portal/logic';\nimport { Json } from 'fp-ts/Json';\nimport * as C from 'io-ts/Codec';\nimport { ORGANIZATION } from 'src/modules/common/codecs/Organization';\nimport { USER_ROLE } from 'src/modules/common/codecs/UserRole';\nimport { USER_SETTINGS } from 'src/modules/common/codecs/UserSettings';\nimport { AuthUser } from 'src/modules/common/types/AuthUser';\n\nexport const AUTH_USER: C.Codec = C.struct({\n id: UUID,\n email: C.string,\n firstName: C.string,\n lastName: C.string,\n organization: ORGANIZATION,\n role: USER_ROLE,\n latestActivity: C.nullable(DATE_TIME),\n feedbackCounter: C.number,\n settings: USER_SETTINGS,\n});\n","import { Json } from 'fp-ts/Json';\nimport * as C from 'io-ts/Codec';\nimport { ContainerType } from 'src/modules/common/types/ContainerType';\n\nexport const CONTAINER_TYPE: C.Codec = C.literal(\n 'ETU',\n 'EAC',\n 'EAN',\n 'EBY',\n 'EHA',\n 'DDI',\n 'DDC',\n 'DHW',\n 'DWA',\n 'DAP',\n 'DBY',\n 'DHE',\n 'DPU',\n 'PPU',\n);\n","import { Json } from 'fp-ts/Json';\nimport * as C from 'io-ts/Codec';\nimport { DeviceType } from 'src/modules/common/types/DeviceType';\n\nexport const DEVICE_TYPE: C.Codec = C.literal(\n DeviceType.THROTTLING_CIRCUIT,\n DeviceType.DIVERTING_CIRCUIT,\n DeviceType.INJECTION_CIRCUIT,\n DeviceType.MIXING_CIRCUIT,\n DeviceType.BYPASS,\n DeviceType.PUMP,\n DeviceType.ACTIVE_OR_PASSIVE_CIRCUIT,\n DeviceType.SPECIFIC_CIRCUIT,\n DeviceType.CHANGEOVER,\n);\n","import { identity } from 'fp-ts/function';\nimport * as C from 'io-ts/Codec';\nimport * as D from 'io-ts/Decoder';\nimport * as E from 'io-ts/Encoder';\n\nconst decoder: D.Decoder = {\n decode: (input) => (\n input === '' || input === undefined || input === null\n ? D.success(null)\n : D.failure(input, 'Empty')\n ),\n};\n\nconst encoder: E.Encoder = {\n encode: identity,\n};\nexport const EMPTY: C.Codec = C.make(decoder, encoder);\n","import { EnergyEfficiencyClass } from '@belimo-retrofit-portal/logic';\nimport * as C from 'io-ts/Codec';\n\nexport const ENERGY_EFFICIENCY_CLASS: C.Codec = C.literal(\n 'A+',\n 'A',\n 'B',\n 'C',\n 'D',\n);\n","import { Json } from 'fp-ts/Json';\nimport * as C from 'io-ts/Codec';\nimport { FlowDirection } from 'src/modules/common/types/FlowDirection';\n\nexport const FLOW_DIRECTION: C.Codec = C.literal(\n FlowDirection.NORTH,\n FlowDirection.SOUTH,\n FlowDirection.EAST,\n FlowDirection.WEST,\n);\n","import { Json } from 'fp-ts/Json';\nimport * as C from 'io-ts/Codec';\nimport { LANGUAGE_LIST } from 'src/modules/common/constants/language';\nimport { Language } from 'src/types/common/Language';\n\nexport const LANGUAGE: C.Codec = C.literal(\n ...LANGUAGE_LIST,\n);\n","import { pipe } from 'fp-ts/function';\nimport * as C from 'io-ts/Codec';\nimport * as D from 'io-ts/Decoder';\nimport * as E from 'io-ts/Encoder';\n\nconst DECODER = pipe(\n D.string,\n D.parse((input) => (\n input.length > 0\n ? D.success(input)\n : D.failure(input, 'NonEmptyString')\n )),\n);\n\nexport const NON_EMPTY_STRING = C.make(DECODER, E.id());\n","import { COUNTRY_CODE, UUID } from '@belimo-retrofit-portal/logic';\nimport { Json } from 'fp-ts/Json';\nimport * as C from 'io-ts/Codec';\nimport { ASSET } from 'src/modules/common/codecs/Asset';\nimport { Organization } from 'src/modules/common/types/Organization';\nimport { OrganizationAddress } from 'src/modules/common/types/OrganizationAddress';\nimport { OrganizationContact } from 'src/modules/common/types/OrganizationContact';\nimport { OrganizationOffice } from 'src/modules/common/types/OrganizationOffice';\n\nexport const ORGANIZATION_ADDRESS: C.Codec = C.struct({\n country: C.nullable(COUNTRY_CODE),\n city: C.string,\n zip: C.string,\n street: C.string,\n});\n\nexport const ORGANIZATION_CONTACT: C.Codec = C.struct({\n email: C.string,\n phone: C.string,\n website: C.string,\n});\n\nexport const ORGANIZATION_OFFICE: C.Codec = C.struct({\n name: C.string,\n shop: C.string,\n\n address: ORGANIZATION_ADDRESS,\n contact: ORGANIZATION_CONTACT,\n});\n\nexport const ORGANIZATION: C.Codec = C.struct({\n id: UUID,\n name: C.string,\n logo: C.nullable(ASSET),\n\n address: ORGANIZATION_ADDRESS,\n contact: ORGANIZATION_CONTACT,\n\n useOrganizationContacts: C.boolean,\n office: ORGANIZATION_OFFICE,\n});\n","import { Json } from 'fp-ts/Json';\nimport * as C from 'io-ts/Codec';\nimport { Orientation } from 'src/modules/common/types/Orientation';\n\nexport const ORIENTATION: C.Codec = C.literal(\n Orientation.HORIZONTAL,\n Orientation.VERTICAL,\n);\n","import { DATE_TIME, PROJECT_DATA, UUID } from '@belimo-retrofit-portal/logic';\nimport { Json } from 'fp-ts/Json';\nimport * as C from 'io-ts/Codec';\nimport { ORGANIZATION } from 'src/modules/common/codecs/Organization';\nimport { Project } from 'src/modules/common/types/Project';\nimport { ProjectOwner } from 'src/modules/common/types/ProjectOwner';\n\nconst PROJECT_OWNER: C.Codec = C.struct({\n id: UUID,\n email: C.string,\n firstName: C.string,\n lastName: C.string,\n});\n\nexport const PROJECT: C.Codec = C.struct({\n id: UUID,\n data: PROJECT_DATA,\n owner: C.nullable(PROJECT_OWNER),\n createdAt: DATE_TIME,\n updatedAt: DATE_TIME,\n isShared: C.boolean,\n organization: ORGANIZATION,\n});\n","import { Json } from 'fp-ts/Json';\nimport * as C from 'io-ts/Codec';\nimport { ThermalEnergy } from 'src/modules/common/types/ThermalEnergy';\n\nexport const THERMAL_ENERGY: C.Codec = C.literal(\n ThermalEnergy.HEATING,\n ThermalEnergy.COOLING,\n ThermalEnergy.MIXED,\n);\n","import { Json } from 'fp-ts/Json';\nimport * as C from 'io-ts/Codec';\nimport { UserRole } from 'src/modules/common/types/UserRole';\n\nexport const USER_ROLE: C.Codec = C.literal(\n UserRole.USER,\n UserRole.ADMIN,\n);\n","import * as C from 'io-ts/Codec';\nimport { ProjectReportCoverContactsEnum } from 'src/modules/common/types/ProjectReportCoverContacts';\n\nexport const USER_SETTINGS = C.struct({\n report: C.struct({\n showOrganizationLogo: C.boolean,\n coverContacts: C.literal(\n ProjectReportCoverContactsEnum.OFFICE,\n ProjectReportCoverContactsEnum.ORGANIZATION,\n ),\n }),\n});\n","import * as C from 'io-ts/Codec';\nimport * as D from 'io-ts/Decoder';\nimport * as E from 'io-ts/Encoder';\nimport { XlsxValue } from 'src/modules/common/types/XlsxValue';\n\nconst DECODER: D.Decoder = D.nullable(D.union(D.string, D.number));\nconst ENCODER: E.Encoder = E.id();\n\nexport const XLSX_VALUE = C.make(DECODER, ENCODER);\n","import './AreaUnitView.scss';\nimport { AreaUnit } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { sub, sup } from 'src/modules/common/constants/formattingHelpers';\n\ntype Props = {\n readonly unit: AreaUnit;\n};\n\nexport const AreaUnitView = ({ unit }: Props): React.ReactElement => (\n \n {unit === AreaUnit.SQM\n ? \n : }\n \n);\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { Asset } from 'src/modules/common/types/Asset';\nimport { getApiBaseUrl } from 'src/modules/config/selectors/getApiBaseUrl';\n\ntype Props = Omit, 'src'> & {\n readonly asset: Asset;\n readonly size: 'small' | 'medium' | 'large';\n};\n\nexport const AssetImage = ({ asset, size, alt, ...props }: Props): JSX.Element => {\n const apiBaseUrl = useSelector(getApiBaseUrl);\n const imageUrl = size === 'medium'\n ? `${apiBaseUrl}/preview/${encodeURIComponent(asset.id)}/500/500`\n : size === 'small'\n ? `${apiBaseUrl}/preview/${encodeURIComponent(asset.id)}/100/100`\n : `${apiBaseUrl}/source/${encodeURIComponent(asset.id)}`;\n\n return {alt};\n};\n","import React from 'react';\n\ntype Props = Omit, 'src'> & {\n readonly image: Blob;\n};\n\nexport const BlobImage = ({ image, alt, ...props }: Props): JSX.Element => {\n const [imageUrl, setImageUrl] = React.useState('');\n React.useLayoutEffect(() => {\n const url = URL.createObjectURL(image);\n setImageUrl(url);\n\n return () => {\n URL.revokeObjectURL(url);\n };\n }, [image]);\n\n return {alt};\n};\n","import './BottomNavigationHelper.scss';\nimport React, { memo } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { ArrowLeftIcon } from 'src/modules/common/icons/ArrowLeftIcon';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\n\ntype Props = {\n routeBackText?: string;\n routeBackPath?: string;\n routeForthText: string;\n routeForthPath: string;\n};\n\nexport const BottomNavigationHelper = memo(({\n routeBackText,\n routeBackPath,\n routeForthText,\n routeForthPath,\n}:Props) => (\n
\n {(routeBackPath && routeBackText) && (\n \n
\n \n
\n\n \n \n )}\n\n \n \n\n
\n \n
\n \n
\n));\n","import './CarbonIntensityUnit.scss';\nimport { EnergySource } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { EnergySourceUnit } from 'src/modules/common/components/EnergySourceUnit';\nimport { sub, sup } from 'src/modules/common/constants/formattingHelpers';\n\ntype Props = {\n readonly source: EnergySource;\n};\n\nexport const CarbonIntensityUnit = ({ source }: Props): React.ReactElement => (\n \n \n /\n \n \n);\n","import './CarbonSavingsUnit.scss';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { sub, sup } from 'src/modules/common/constants/formattingHelpers';\n\nexport const CarbonSavingsUnit = (): React.ReactElement => (\n \n \n \n);\n","import './Checkbox.scss';\nimport clsx from 'clsx';\nimport React, { memo } from 'react';\n\ntype Props = {\n checked: boolean;\n label?: string;\n disabled?: boolean;\n className?: string;\n partial?: boolean;\n onChange?: (e: React.MouseEvent) => void;\n};\n\nexport const Checkbox = memo(({ label, disabled, checked, className, partial, onChange }: Props) => (\n null}\n >\n
\n\n {label && (

{label}

)}\n
\n));\n","import './CurrencySymbol.scss';\nimport { CurrencyCode } from '@belimo-retrofit-portal/logic';\nimport * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\n\ntype Props = {\n readonly currency: CurrencyCode;\n};\n\nexport const CurrencySymbol = ({ currency }: Props): React.ReactElement => (\n \n \n \n);\n","import './CustomBreadcrumbItem.scss';\nimport { BreadcrumbItem } from '@carbon/react';\nimport React, { memo } from 'react';\n\ntype Props = {\n children: React.ReactNode;\n};\n\nexport const CustomBreadcrumbItem = memo(({ children }: Props) => (\n \n {children}\n \n));\n","import './CustomButton.scss';\nimport { Button, ButtonProps } from '@carbon/react';\nimport clsx from 'clsx';\nimport React from 'react';\nimport { LoadingIcon } from 'src/modules/common/icons/LoadingIcon';\n\ntype Props = {\n fullWidth?: boolean;\n loading?: boolean;\n};\n\ntype CustomButtonProps = TButtonProps extends ButtonProps\n ? TButtonProps & Omit, 'as'> & Props\n : never;\n\nexport const CustomButton = >({\n children,\n className,\n disabled,\n fullWidth,\n loading,\n renderIcon: RenderIcon,\n size = 'lg',\n ...props\n}: CustomButtonProps): React.ReactElement => {\n const computedClassName = clsx(\n 'bp-custom-button',\n `bp-custom-button--${size}`,\n {\n 'bp-custom-button--disabled': disabled,\n 'bp-custom-button--full-width': fullWidth,\n 'bp-custom-button--loading': loading,\n },\n className,\n );\n\n return (\n : RenderIcon\n }\n size={size}\n >\n {children}\n \n );\n};\n","import './CustomLoading.scss';\nimport { Loading } from '@carbon/react';\nimport React, { memo } from 'react';\n\ntype LoadingProps = React.ComponentProps;\ntype Props = Omit;\n\nexport const CustomLoading = memo((props: Props) => );\n","import './CustomMenu.scss';\n// @ts-expect-error Carbon does have the OverflowMenu component\nimport { OverflowMenu } from '@carbon/react/lib/components/OverflowMenu';\nimport clsx from 'clsx';\nimport React, { memo } from 'react';\n\ntype Props = {\n className?: string;\n disabled?: boolean;\n flipped?: boolean;\n renderIcon?: () => React.ReactNode;\n onClick?: (event: React.MouseEvent) => void;\n onClose?: () => void;\n iconDescription: React.ReactNode;\n tooltipPosition: 'top' | 'bottom' | 'right' | 'left';\n children: React.ReactNode;\n};\n\nexport const CustomMenu = memo((\n { className,\n disabled,\n flipped,\n renderIcon,\n onClick,\n onClose,\n iconDescription,\n tooltipPosition,\n children,\n ...props }: Props,\n) => (\n \n {children}\n \n));\n","import './CustomMenuItem.scss';\nimport { OverflowMenuItem } from '@carbon/react';\nimport clsx from 'clsx';\nimport React, { memo } from 'react';\nimport { useSelector } from 'react-redux';\nimport { getCurrentLocation } from 'src/modules/routing/selectors/getCurrentLocation';\n\ntype Props = {\n itemText: React.ReactNode;\n hasDivider: boolean;\n disabled?: boolean;\n onClick?: (e: React.MouseEvent) => void;\n href?: string;\n isDelete?: boolean;\n flipped?: boolean;\n wrapperClassName?: string;\n itemClassName?: string;\n};\n\nexport const CustomMenuItem = memo((\n {\n onClick,\n disabled,\n itemText,\n hasDivider,\n href,\n isDelete,\n flipped,\n wrapperClassName,\n itemClassName,\n ...props\n }: Props,\n): React.ReactElement => {\n const location = useSelector(getCurrentLocation);\n const currentRoute = location?.pathname === href;\n\n return (\n \n );\n});\n","import './CustomModal.scss';\nimport { ComposedModal, ComposedModalProps } from '@carbon/react';\nimport clsx from 'clsx';\nimport React, { memo, useCallback, useEffect, useLayoutEffect, useMemo, useState } from 'react';\nimport { usePrevious } from 'src/modules/common/hooks/usePrevious';\n\ntype Props = ComposedModalProps & {\n isFullScreen?: boolean;\n className?: string;\n open: boolean;\n shouldUnmount: boolean;\n isShaded: boolean;\n isNarrowFooter?: boolean;\n onClose: (event: T) => void;\n onKeyDown?: (event: T) => void;\n children: React.ReactNode;\n};\n\nexport const CustomModal = memo(\n ({\n isFullScreen,\n className,\n open,\n shouldUnmount,\n isShaded,\n isNarrowFooter,\n children,\n onClose,\n onKeyDown,\n ...props\n }: Props): React.ReactNode => {\n const [isShown, setShown] = useState(false);\n\n const prevOpen = usePrevious(open);\n\n const isMounted = useMemo(() => {\n if (shouldUnmount) {\n return isShown;\n }\n\n return true;\n }, [shouldUnmount, isShown]);\n\n const handleKeyDown = useCallback((event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n onClose(event);\n }\n\n onKeyDown?.(event);\n }, [onClose, onKeyDown]);\n\n // show the modal immediately when it is open\n useEffect(() => {\n if (open) {\n setShown(true);\n }\n }, [open]);\n\n // unmount the modal by timeout when it is closing to preserve animation\n useEffect(() => {\n const timeout = setTimeout(() => {\n if (prevOpen && !open) {\n setShown(false);\n }\n }, 500);\n\n return () => {\n clearTimeout(timeout);\n };\n }, [open, prevOpen]);\n\n useEffect(() => {\n document.addEventListener('keydown', handleKeyDown);\n\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleKeyDown]);\n\n useLayoutEffect(() => {\n const scrollbarWidth = open ? window.innerWidth - document.documentElement.clientWidth : 0;\n\n document.documentElement.style.setProperty('--scroll-bar-width', `${scrollbarWidth}px`);\n }, [open]);\n\n return (\n \n {isMounted ? children : null}\n \n );\n },\n);\n","import './CustomTabList.scss';\nimport { Tab, TabList } from '@carbon/react';\nimport { TabProps } from '@carbon/react/lib/components/Tabs/Tabs';\nimport clsx from 'clsx';\nimport React, { memo } from 'react';\n\ntype Props = {\n ariaLabel: string;\n contained: boolean;\n isFullWidth: boolean;\n theme?: 'gray' | 'white';\n children: React.ReactNode;\n};\n\nexport const CustomTabList = (\n { ariaLabel, contained, isFullWidth, theme = 'gray', children }: Props,\n):React.ReactElement => (\n \n {children}\n \n);\n\nexport const CustomTab = memo((props: TabProps) => (\n \n {props.children}\n \n));\n","import './CustomToggle.scss';\nimport { Toggle, ToggleProps } from '@carbon/react';\nimport clsx from 'clsx';\nimport React from 'react';\n\nexport const CustomToggle = ({ className, ...props }: ToggleProps): React.ReactElement => (\n \n);\n","import './Divider.scss';\nimport clsx from 'clsx';\nimport React from 'react';\n\ntype Props = {\n orientation: 'horizontal' | 'vertical';\n};\n\nexport const Divider = ({ orientation }: Props): React.ReactElement => (\n \n);\n","import './Dropdown.scss';\nimport clsx from 'clsx';\nimport React, { memo, PropsWithChildren, ReactNode, useMemo, useRef, useState } from 'react';\nimport { useOutsideClick } from 'src/modules/common/hooks/useOutsideClick';\nimport { CheckIcon } from 'src/modules/common/icons/CheckIcon';\nimport { ChevronDownIcon } from 'src/modules/common/icons/ChevronDownIcon';\nimport { ChevronUpIcon } from 'src/modules/common/icons/ChevronUpIcon';\n\ntype Props = PropsWithChildren<{\n selectedValue: T;\n renderLabel?: (arg: T) => ReactNode;\n icon?: ReactNode;\n options: readonly T[];\n size?: 'sm' | 'md' | 'lg' | 'xlg';\n outlined?: boolean;\n shaded?: boolean;\n disabled?: boolean;\n onChange: (value: T) => void;\n}>;\n\n// eslint-disable-next-line react/function-component-definition\nfunction DropdownWithoutMemo({\n onChange,\n renderLabel = (option: T): string => String(option),\n icon,\n selectedValue,\n options,\n size = 'md',\n outlined = false,\n shaded = true,\n disabled,\n children,\n}: Props): ReactNode {\n const [listOpened, setListOpened] = useState(false);\n const ref = useRef(null);\n\n useOutsideClick(ref, () => setListOpened(false));\n\n const selected = options.find((option) => option === selectedValue) || null;\n\n const isOnlyOneOption = selected !== null && options.length === 1;\n\n const chevron = useMemo(() => {\n if (isOnlyOneOption) {\n return null;\n }\n\n return (\n listOpened\n ? \n : \n );\n }, [isOnlyOneOption, listOpened]);\n\n const handleSelect = (value: T): void => {\n onChange(value);\n setListOpened(false);\n };\n\n const handleOpen = (): void => {\n if (isOnlyOneOption || disabled) {\n return;\n }\n\n setListOpened((prev) => !prev);\n };\n\n return (\n
\n {children && (\n
\n {children}\n
\n )}\n\n
\n \n {selected ? renderLabel(selected) : null}\n\n
\n {icon || chevron}\n
\n \n\n
\n {options.map((option) => (\n handleSelect(option)}\n >\n {renderLabel(option)}\n\n {selected === option && (\n \n \n \n )}\n \n ))}\n
\n
\n
\n );\n}\n\nconst typedMemo: (c: T) => T = memo;\nexport const Dropdown = typedMemo(DropdownWithoutMemo);\n","import './EnergyEfficiencyLabel.scss';\nimport { EnergyEfficiencyClass } from '@belimo-retrofit-portal/logic';\nimport clsx from 'clsx';\nimport React from 'react';\n\ntype Props = {\n readonly value: EnergyEfficiencyClass | null;\n readonly sized: boolean;\n readonly disabled?: boolean;\n readonly children: React.ReactNode;\n};\n\nexport const EnergyEfficiencyLabel = ({ value, sized, disabled, children }: Props): React.ReactElement => (\n \n {children}\n \n);\n","import { getEnergyEfficiencyLabel } from '@belimo-retrofit-portal/logic';\nimport { Decimal } from 'decimal.js-light';\nimport React from 'react';\nimport { EnergyEfficiencyLabel } from 'src/modules/common/components/EnergyEfficiencyLabel';\nimport { LABELS } from 'src/modules/common/constants/energyEfficiencyLabels';\n\ntype Props = {\n readonly value: Decimal | null;\n readonly sized: boolean;\n readonly disabled: boolean;\n};\n\nexport const EnergyEfficiencyLabelWrapper = ({ value, sized, disabled }: Props): React.ReactElement => {\n if (value === null) {\n return (\n \n –\n \n );\n }\n\n const maxLabel = getEnergyEfficiencyLabel(value.toDecimalPlaces(0, Decimal.ROUND_UP));\n const minLabel = getEnergyEfficiencyLabel(value.toDecimalPlaces(0, Decimal.ROUND_DOWN));\n\n if (minLabel === maxLabel) {\n return (\n \n {LABELS[maxLabel]}\n \n );\n }\n\n return (\n \n {LABELS[minLabel]}–{LABELS[maxLabel]}\n \n );\n};\n","import './EnergyEfficiencyStack.scss';\nimport { getEnergyEfficiencyLabel } from '@belimo-retrofit-portal/logic';\nimport { CaretRight } from '@carbon/icons-react';\nimport { Decimal } from 'decimal.js-light';\nimport React from 'react';\nimport { EnergyEfficiencyLabelWrapper } from 'src/modules/common/components/EnergyEfficiencyLabelWrapper';\nimport { FACTOR_WEIGHTS_LABELS } from 'src/modules/common/constants/factorWeightedLabel';\n\ntype Props = {\n readonly line: boolean;\n readonly value: Decimal | null;\n};\n\nexport const EnergyEfficiencyStack = ({ line, value }: Props): React.ReactElement => {\n if (value === null) {\n return (\n
\n
\n {CLASS_LIST.map((label) => (\n
\n \n
\n ))}\n
\n
\n );\n }\n\n const position = getPosition(value);\n const maxLabel = getEnergyEfficiencyLabel(value.toDecimalPlaces(0, Decimal.ROUND_UP));\n const minLabel = getEnergyEfficiencyLabel(value.toDecimalPlaces(0, Decimal.ROUND_DOWN));\n\n return (\n
\n
\n
\n
\n {minLabel === maxLabel\n ? minLabel\n : <>{minLabel}–{maxLabel}}\n
\n\n
\n \n
\n
\n\n {line && (\n
\n )}\n
\n\n
\n {CLASS_LIST.map((label) => (\n
\n \n
\n ))}\n
\n
\n );\n};\n\nconst CLASS_LIST = ['A+', 'A', 'B', 'C', 'D'] as const;\n\nconst STACK_ITEM_HEIGHT = 1.333;\nconst STACK_ITEM_MARGIN = 0.25;\n\nfunction getPosition(value: Decimal): React.CSSProperties['marginBottom'] {\n return `${value.mul(STACK_ITEM_HEIGHT + STACK_ITEM_MARGIN).add(STACK_ITEM_HEIGHT / 2).toFixed(3)}em`;\n}\n","import './EnergyEfficiencyTransition.scss';\nimport { EnergyEfficiencyClass } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\nimport { EnergyEfficiencyLabel } from 'src/modules/common/components/EnergyEfficiencyLabel';\nimport { LABELS } from 'src/modules/common/constants/energyEfficiencyLabels';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\n\ntype Props = {\n readonly actual: EnergyEfficiencyClass | null;\n readonly future: EnergyEfficiencyClass | null;\n};\n\nexport const EnergyEfficiencyTransition = ({ actual, future }: Props): React.ReactElement | null => (\n
\n
\n \n {actual === null ? '\\u2013' : LABELS[actual]}\n \n
\n\n
\n \n
\n\n
\n \n {future === null ? '\\u2013' : LABELS[future]}\n \n
\n
\n);\n","import './EnergyPriceUnit.scss';\nimport { CurrencyCode, EnergySource } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\nimport { CurrencySymbol } from 'src/modules/common/components/CurrencySymbol';\nimport { EnergySourceUnit } from 'src/modules/common/components/EnergySourceUnit';\n\ntype Props = {\n readonly currency: CurrencyCode;\n readonly source: EnergySource;\n};\n\nexport const EnergyPriceUnit = ({ currency, source }: Props): React.ReactElement => (\n \n \n /\n \n \n);\n","import './EnergySavingsUnit.scss';\nimport { EnergySource } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { sub, sup } from 'src/modules/common/constants/formattingHelpers';\n\ntype Props = {\n readonly source: EnergySource;\n};\n\nexport const EnergySavingsUnit = ({ source }: Props): React.ReactElement => {\n if (source === EnergySource.HEATING_OIL) {\n return (\n \n \n \n );\n }\n\n return (\n \n \n \n );\n};\n","import './EnergySourceUnit.scss';\nimport { EnergySource } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { sub, sup } from 'src/modules/common/constants/formattingHelpers';\n\ntype Props = {\n readonly source: EnergySource;\n};\n\nexport const EnergySourceUnit = ({ source }: Props): React.ReactElement => {\n if (source === EnergySource.HEATING_OIL) {\n return (\n \n \n \n );\n }\n\n return (\n \n \n \n );\n};\n","import './Footer.scss';\nimport React, { useMemo } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\n\nexport const Footer = ():React.ReactElement => {\n const intl = useIntl();\n const loggedInUser = useSelector(getLoggedInUser);\n\n const organization = loggedInUser.organization.office;\n\n const privacy = useMemo(\n () => (organization.shop === 'cn'\n ? 'https://www.belimo.com.cn/cn/zh_CN/privacy'\n : `https://www.belimo.com/${encodeURIComponent(organization.shop)}/en_US/privacy`),\n [organization],\n );\n const imprint = useMemo(\n () => (organization.shop === 'cn'\n ? 'https://www.belimo.com.cn/cn/zh_CN/imprint'\n : `https://www.belimo.com/${encodeURIComponent(organization.shop)}/en_US/imprint`),\n [organization],\n );\n\n const contacts = useMemo(() => `${organization.name}, ${\n organization.address.street\n }, ${\n organization.address.zip\n } ${\n organization.address.city\n } (${intl.formatMessage({ id: `common/country/name/${organization.address.country}` })})\n`, [intl, organization]);\n\n return (\n
\n
\n \n \n \n\n {organization.shop !== 'hk' && (\n \n \n \n )}\n\n \n \n \n
\n\n
\n {contacts}\n
\n
\n );\n};\n","import './FormSection.scss';\nimport { Stack } from '@carbon/react';\nimport React from 'react';\nimport { Divider } from 'src/modules/common/components/Divider';\n\ntype Props = {\n readonly children: React.ReactNode;\n readonly title: React.ReactNode;\n};\n\nexport const FormSection = ({ children, title }: Props): React.ReactElement => (\n \n

{title}

\n \n {children}\n
\n);\n","import { CurrencyCode } from '@belimo-retrofit-portal/logic';\nimport { Numeric } from 'decimal.js-light';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { FormattedNumber } from 'src/modules/common/components/FormattedNumber';\n\ntype Props = {\n readonly value: Numeric | null;\n readonly currency: CurrencyCode;\n};\n\nexport const FormattedAmount = ({ value, currency }: Props): React.ReactElement => (\n <>\n \n  \n {value === null ? '—' : (\n \n )}\n \n);\n","import Decimal from 'decimal.js-light';\nimport React from 'react';\nimport { FormattedValue } from 'src/modules/common/components/FormattedValue';\n\ntype Props = {\n value: Decimal | null;\n};\n\nexport const FormattedBEP = ({ value }: Props): React.ReactNode => {\n if (!value || !value.isPositive()) {\n return '\\u2013';\n }\n\n if (value.lessThan(1)) {\n return '<1';\n }\n\n if (value.lessThan(10)) {\n const roundedToNearestHalfValue = value.mul(2).toDecimalPlaces(0).div(2);\n const roundedValuePrecision = roundedToNearestHalfValue.decimalPlaces();\n\n return (\n \n );\n }\n\n if (value.greaterThan(100)) {\n return '>100';\n }\n\n return ;\n};\n","import 'katex/dist/katex.min.css';\nimport React from 'react';\nimport { FormattedMessage, FormattedMessageProps } from 'react-intl';\nimport { BlockMath, InlineMath } from 'react-katex';\n\nexport const FormattedMathMessage = ({ id, values }: FormattedMessageProps): React.ReactElement => (\n ,\n // eslint-disable-next-line react/no-unstable-nested-components\n 'tex-block': (content) => ,\n }}\n />\n);\n","import { Decimal, Numeric } from 'decimal.js-light';\nimport React from 'react';\nimport { useSelector } from 'react-redux';\nimport { getLocale } from 'src/modules/config/selectors/getLocale';\n\ntype Props = Intl.NumberFormatOptions & {\n readonly value: Numeric;\n};\n\nexport const FormattedNumber = ({ value, ...options }: Props): React.ReactElement => {\n const locale = useSelector(getLocale);\n\n // Roboto font doesn't contain NARROW NO-BREAK SPACE (NNBSP, U+202F)\n // so PDF builder maps the char to U+0000\n const number = new Decimal(value).toNumber();\n const formatted = new Intl.NumberFormat(locale, options)\n .format(number)\n .replace(/\\u202f/g, '\\u2009');\n\n // eslint-disable-next-line react/jsx-no-useless-fragment\n return <>{formatted};\n};\n","import { Decimal } from 'decimal.js-light';\nimport React from 'react';\nimport { FormattedNumber } from 'src/modules/common/components/FormattedNumber';\n\ntype Props = {\n readonly value: Decimal | null;\n readonly precision: number;\n};\n\nexport const FormattedValue = ({ value, precision }: Props): React.ReactElement => {\n if (value === null) {\n return <>—;\n }\n\n return (\n \n );\n};\n","import './Header.scss';\nimport React, { useCallback, useEffect, useState } from 'react';\nimport { useIntl } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport { Announcements } from 'src/modules/announcements/views/Announcements';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CustomModal } from 'src/modules/common/components/CustomModal';\nimport { OnboardingModal } from 'src/modules/common/components/OnboardingModal';\nimport { UserLanguage } from 'src/modules/common/components/UserLanguage';\nimport { UserProfile } from 'src/modules/common/components/UserProfile';\nimport { IS_ONBOARDING_MODAL_VIEWED } from 'src/modules/common/constants/localStorageKeys';\nimport { QuestionIcon } from 'src/modules/common/icons/QuestionIcon';\n\nexport const Header = (): React.ReactElement => {\n const intl = useIntl();\n\n const [isOnboardingModalOpened, setOnboardingModalOpened] = useState(false);\n\n const handleOnboardingModalClose = useCallback(() => {\n setOnboardingModalOpened(false);\n }, []);\n\n const handleOnboardingModalOpen = useCallback(() => {\n setOnboardingModalOpened(true);\n }, []);\n\n useEffect(() => {\n const isModalViewed = localStorage.getItem(IS_ONBOARDING_MODAL_VIEWED);\n\n if (!isModalViewed) {\n setOnboardingModalOpened(true);\n }\n }, []);\n\n return (\n <>\n \n \n \n \n\n
\n \n\n \n
\n \n
\n \n\n \n\n \n
\n
\n\n \n \n \n \n );\n};\n","import './HorizontalDivider.scss';\nimport clsx from 'clsx';\nimport React from 'react';\n\ntype Props = {\n readonly className?: string;\n};\n\nexport const HorizontalDivider = ({ className }: Props):React.ReactElement => (\n
\n);\n","import { BaseError, NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\n\ntype Props = {\n readonly onReady: () => void;\n readonly onError: (error: BaseError) => void;\n readonly children: React.ReactElement | null;\n};\ntype State = {\n readonly error: Error | null;\n};\n\nexport class Lifecycle extends React.Component {\n public readonly state: State = {\n error: null,\n };\n\n public componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void {\n this.setState({ error });\n\n const { onError } = this.props;\n onError(new RuntimeError('Rendering error', errorInfo, NativeError.wrap(error)));\n }\n\n public componentDidMount(): void {\n const { onReady } = this.props;\n onReady();\n }\n\n public render(): React.ReactNode {\n const { error } = this.state;\n if (error) {\n return null;\n }\n\n const { children } = this.props;\n return children;\n }\n}\n","import './OnboardingModal.scss';\nimport { ModalBody, ModalFooter, ModalHeader } from '@carbon/react';\nimport React, { memo, useEffect, useState } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { IS_ONBOARDING_MODAL_VIEWED } from 'src/modules/common/constants/localStorageKeys';\nimport { ArrowLeftIcon } from 'src/modules/common/icons/ArrowLeftIcon';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\nimport { BodyText } from 'src/modules/common/typography/BodyText';\nimport { TitleText } from 'src/modules/common/typography/TitleText';\n\ntype Props = {\n handleClose: () => void;\n};\n\nexport const OnboardingModal = memo(({ handleClose }: Props): React.ReactElement => {\n const intl = useIntl();\n\n const [step, setStep] = useState(1);\n\n const maxStep = 5;\n\n useEffect(() => () => {\n // set item on unmount\n localStorage.setItem(IS_ONBOARDING_MODAL_VIEWED, JSON.stringify(true));\n }, []);\n\n return (\n <>\n \n\n \n \n\n \n \n \n\n \n \n \n \n\n \n {step === 1 ? (\n setStep(2)}\n >\n \n\n
\n \n
\n \n ) : step !== 5 ? (\n <>\n setStep((prev) => prev - 1)}\n >\n
\n \n
\n\n \n \n\n setStep((prev) => prev + 1)}\n >\n \n\n
\n \n
\n \n \n ) : (\n <>\n setStep((prev) => prev - 1)}\n >\n
\n \n
\n\n \n \n\n \n \n\n
\n \n
\n \n \n )}\n
\n \n );\n});\n","import './OverflowMenu.scss';\nimport clsx from 'clsx';\nimport React, { memo, ReactNode, useCallback, useRef, useState } from 'react';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { Tooltip } from 'src/modules/common/components/Tooltip';\nimport { useOutsideClick } from 'src/modules/common/hooks/useOutsideClick';\n\ntype Props = {\n readonly buttonTooltip?: React.ReactNode;\n readonly interactive?: boolean;\n readonly label: ReactNode;\n readonly buttonSize?: 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n readonly children: ReactNode;\n readonly onClose?: () => void;\n};\n\nexport const OverflowMenu = memo(({\n buttonTooltip,\n interactive = true,\n label,\n buttonSize,\n children,\n onClose,\n}: Props) => {\n const menuRef = useRef(null);\n const [opened, setOpened] = useState(false);\n\n const handleButtonOpen = useCallback(() => {\n setOpened(true);\n }, []);\n\n const handleButtonClose = useCallback(() => {\n if (opened) {\n setOpened(false);\n onClose?.();\n }\n }, [opened, onClose]);\n\n useOutsideClick(menuRef, handleButtonClose);\n\n return (\n \n \n \n
\n {label}\n
\n \n
\n\n
\n {children}\n
\n \n );\n});\n","import clsx from 'clsx';\nimport React, { memo, MouseEvent, ReactNode, useCallback } from 'react';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\n\ntype Props = {\n selected?: boolean;\n onClick?: (e: MouseEvent) => void;\n children: ReactNode;\n className?: string;\n};\n\nexport const OverflowMenuItem = memo(({ className, selected, onClick, children }: Props) => {\n const preventDefault = useCallback((event: React.MouseEvent): void => {\n event.preventDefault();\n }, []);\n\n return (\n \n {children}\n \n );\n});\n","import React from 'react';\n\ntype Props = {\n readonly children: React.ReactElement | null | undefined | boolean;\n};\ntype State = {\n readonly children: React.ReactElement | null | undefined | boolean;\n};\n\nexport class PreserveContent extends React.Component {\n public readonly state: State = {\n // eslint-disable-next-line react/destructuring-assignment\n children: this.props.children,\n };\n\n public static getDerivedStateFromProps(\n nextProps: Props,\n prevState: State,\n ): State {\n const isEmpty = (\n nextProps.children === null ||\n nextProps.children === undefined ||\n nextProps.children === true ||\n nextProps.children === false\n );\n\n return isEmpty ? prevState : nextProps;\n }\n\n public render(): React.ReactNode {\n const { children } = this.state;\n return children;\n }\n}\n","import React from 'react';\nimport { FormattedMessage } from 'react-intl';\n\ntype Props = {\n readonly title: string;\n};\n\nexport const ProjectTitle = ({ title }: Props): React.ReactElement => (\n title.trim().length === 0\n ? \n : <>{title.trim()}\n);\n","import './ProjectToolbar.scss';\nimport { ChevronDown, ChevronUp, Folder, Share } from '@carbon/icons-react';\nimport { Breadcrumb, Button, Tabs } from '@carbon/react';\nimport React, { useMemo, useRef, useState } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { Link } from 'react-router-dom';\nimport { AssetImage } from 'src/modules/common/components/AssetImage';\nimport { CustomBreadcrumbItem } from 'src/modules/common/components/CustomBreadcrumbItem';\nimport { CustomTab, CustomTabList } from 'src/modules/common/components/CustomTabList';\nimport { CARBON_THEME } from 'src/modules/common/constants/theme';\nimport { Project } from 'src/modules/common/types/Project';\nimport { BodyDesktopLargeRegularText } from 'src/modules/common/typography/BodyDesktopLargeRegularText';\nimport { OverlineDesktopSmallText } from 'src/modules/common/typography/OverlineDesktopSmallText';\nimport { formatProjectDetailsSubTitle } from 'src/modules/common/utils/formatProjectDetailsSubTitle';\nimport { getCurrentMatch } from 'src/modules/routing/selectors/getCurrentMatch';\nimport { RouteMatch } from 'src/modules/routing/types/RouteMatch';\nimport { ShareProject } from 'src/modules/sharing-projects/containers/ShareProject';\n\ntype Props = {\n readonly project: Project;\n readonly onShare: () => void;\n};\n\nexport const ProjectToolbar = ({ project, onShare }: Props): React.ReactElement => {\n const intl = useIntl();\n\n const routeState = useSelector(getCurrentMatch);\n\n const projectBaseUrl = `/project/${encodeURIComponent(project.id)}`;\n\n const [areDetailsShown, setDetailsShown] = useState(false);\n\n const projectTitleRef = useRef(null);\n const projectDetailsRef = useRef(null);\n\n const heightOfOpenedDetails = (projectTitleRef.current?.offsetHeight || 0) +\n (projectDetailsRef.current?.offsetHeight || 0) +\n 24;\n const heightOfClosedDetails = (projectTitleRef.current?.offsetHeight || 56);\n\n const address = useMemo(\n () => formatProjectDetailsSubTitle(\n intl.formatMessage({ id: `common/buildingType/${project.data.building.type}` }),\n project.data.building.address,\n ),\n [intl, project.data.building],\n );\n\n const defaultCheckedTab = useMemo(() => {\n const stateNames = [\n 'bp:project:basedata',\n 'bp:project:hvac',\n 'bp:project:schema',\n 'bp:project:evaluation',\n 'bp:project:report',\n ];\n return stateNames.findIndex((it) => getMatchedRoute(routeState, it) !== null);\n }, [routeState]);\n\n return (\n
\n
\n \n \n \n \n \n \n \n\n \n
\n setDetailsShown((prev) => !prev)}\n >\n
\n {project.data.title || intl.formatMessage({ id: 'project/toolbar/project/unnamed' })}\n
\n\n {areDetailsShown\n ? (\n \n )\n : (\n \n )}\n \n\n \n \n\n \n \n
\n\n
\n {project.data.cover\n ? \n : }\n\n
\n \n {address}\n \n\n \n {project.data.goals || intl.formatMessage({ id: 'basedata/projectGoals/empty' })}\n \n
\n
\n
\n\n
\n \n \n \n \n \n \n \n\n \n \n \n \n \n\n \n \n
\n \n
\n\n \n
\n \n\n \n \n \n \n \n\n \n \n \n \n \n \n
\n
\n
\n\n \n \n );\n};\n\nfunction getMatchedRoute(match: RouteMatch | null, state: string): RouteMatch | null {\n if (match?.state.name === state) {\n return match;\n }\n\n return match?.parent\n ? getMatchedRoute(match.parent, state)\n : null;\n}\n","import './Rating.scss';\nimport clsx from 'clsx';\nimport React, { memo, useMemo, useState } from 'react';\nimport { StarFilledIcon } from 'src/modules/common/icons/StarFilledIcon';\nimport { StarIcon } from 'src/modules/common/icons/StarIcon';\n\ntype Props = {\n readonly disabled: boolean;\n readonly error?: boolean;\n readonly onSelect: (value: number) => void;\n};\n\nexport const Rating = memo(({ disabled, error, onSelect }: Props) => {\n const [rating, setRating] = useState(0);\n const [hover, setHover] = useState(0);\n\n const stars = useMemo(() => Array.from({ length: 5 }, (_, i) => (i + 1)), []);\n\n const onClick = (star: number): void => {\n setRating(star);\n onSelect(star);\n };\n\n return (\n
\n {\n stars.map((star) => (\n onClick(star)}\n onMouseEnter={() => setHover(star)}\n onMouseLeave={() => setHover(rating)}\n >\n {star <= (hover || rating) ? (\n \n ) : (\n \n )}\n \n ))\n }\n
\n );\n});\n","import './SavingTileAmount.scss';\nimport React, { memo } from 'react';\n\ntype Props = {\n title: React.ReactNode;\n amount: React.ReactNode;\n unit: React.ReactNode;\n};\n\nexport const SavingTileAmount = memo(({ title, amount, unit }: Props) => (\n
\n
\n {title}\n
\n\n
\n {amount}\n\n {unit}\n
\n
\n));\n","import './SavingTileCard.scss';\nimport clsx from 'clsx';\nimport React, { memo } from 'react';\nimport { SavingTileAmount } from 'src/modules/common/components/SavingTileAmount';\n\ntype Props = {\n savingTitle: React.ReactNode;\n icon: React.ReactNode;\n amountTitle: React.ReactNode;\n amount: React.ReactNode;\n unit: React.ReactNode;\n children: React.ReactNode;\n small: boolean;\n};\n\nexport const SavingTileCard = memo(({\n savingTitle,\n icon,\n amountTitle,\n amount,\n unit,\n children,\n small,\n}:Props) => (\n
\n
\n {savingTitle}\n
\n\n
\n
\n {icon}\n
\n\n \n
\n\n
\n {children}\n
\n
\n));\n","import { CurrencyCode } from '@belimo-retrofit-portal/logic';\nimport { Decimal } from 'decimal.js-light';\nimport React from 'react';\nimport { FormattedAmount } from 'src/modules/common/components/FormattedAmount';\n\ntype Props = {\n readonly value: Decimal | null;\n readonly currency: CurrencyCode;\n};\n\nexport const SavingsAmount = ({ value, currency }: Props): React.ReactElement => {\n if (value === null) {\n return (\n \n );\n }\n\n if (value.isNegative()) {\n return (\n <>\n <\n \n \n );\n }\n if (value.isPositive() && value.lessThan(1_000)) {\n return (\n <>\n <\n \n \n );\n }\n\n return (\n \n );\n};\n","import { Decimal } from 'decimal.js-light';\nimport React from 'react';\nimport { FormattedNumber } from 'src/modules/common/components/FormattedNumber';\n\ntype Props = {\n readonly value: Decimal | null;\n readonly precision: number;\n};\n\nexport const SavingsValue = ({ value, precision }: Props): React.ReactElement => {\n if (value === null) {\n return <>—;\n }\n\n if (value.isNegative()) {\n return (\n <>\n <\n \n \n );\n }\n if (value.isPositive() && value.lessThan(1)) {\n return (\n <>\n <\n \n \n );\n }\n\n return (\n \n );\n};\n","import './SupScript.scss';\nimport React from 'react';\n\ntype Props = {\n children: React.ReactNode;\n};\n\nexport const SupScript = ({ children }: Props): React.ReactElement => (\n {children}\n);\n","import { LogicError, NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport React, { cloneElement, useEffect, useState } from 'react';\nimport { CancelledError } from 'src/errors/CancelledError';\nimport { HttpError } from 'src/errors/HttpError';\nimport { parseSvgFile } from 'src/modules/common/utils/svg';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\n\ntype Props = {\n readonly urls: ReadonlyArray;\n readonly width: number;\n readonly height: number;\n};\n\nexport const SvgFile = React.memo(\n ({ urls, width, height }: Props): React.ReactElement | null => {\n const [element, setElement] = useState(null);\n\n useEffect(() => {\n const abort = new AbortController();\n const fallback = ;\n\n fetchAnySvgFile(urls, abort.signal)\n .then((result) => setElement(result ?? fallback))\n .catch((error) => {\n if (error instanceof CancelledError) {\n return;\n }\n\n setElement(fallback);\n sentryCatch(error);\n });\n\n return () => {\n abort.abort();\n };\n }, [urls]);\n\n if (element) {\n return cloneElement(element, {\n x: 0,\n y: 0,\n width: width,\n height: height,\n 'data-ready': 'true',\n });\n }\n\n return (\n \n );\n },\n (prevProps: Props, nextProps: Props) => (\n prevProps.width === nextProps.width &&\n prevProps.height === nextProps.height &&\n prevProps.urls.every((url, index) => url === nextProps.urls[index])\n ),\n);\n\nasync function fetchSvgFile(url: string, signal: AbortSignal): Promise {\n try {\n const response = await fetch(url, {\n signal: signal,\n mode: 'no-cors',\n redirect: 'error',\n credentials: 'omit',\n });\n\n if (response.ok) {\n const content = await response.text();\n return parseSvgFile(content);\n }\n if (response.status === 404) {\n return null;\n }\n\n throw new HttpError(response);\n } catch (error) {\n const wrapped = NativeError.wrap(error);\n if (wrapped.name === 'AbortError') {\n throw new CancelledError('SVG file loading cancelled', { url }, wrapped);\n } else {\n throw new RuntimeError('Could not fetch SVG file', { url }, wrapped);\n }\n }\n}\n\nasync function fetchAnySvgFile(urls: ReadonlyArray, signal: AbortSignal): Promise {\n for (const url of urls) {\n const file = await fetchSvgFile(url, signal);\n if (file) {\n return file;\n }\n }\n\n throw new LogicError('Could not fetch any of SVG files', { urls });\n}\n","import './TileCard.scss';\nimport React, { memo } from 'react';\nimport { HorizontalDivider } from 'src/modules/common/components/HorizontalDivider';\nimport { DesktopLargeText } from 'src/modules/common/typography/DesktopLargeText';\nimport { LeadText } from 'src/modules/common/typography/LeadText';\n\ntype Props = {\n title: React.ReactNode;\n subtitle?: React.ReactNode;\n children: React.ReactNode;\n};\n\nexport const TileCard = memo(({ title, subtitle, children }: Props) => (\n
\n
\n \n {title}\n \n\n {subtitle ? (\n \n {subtitle}\n \n ) : null}\n
\n\n \n\n {children}\n
\n));\n","import './Tooltip.scss';\nimport clsx from 'clsx';\nimport React, { memo, PropsWithChildren, ReactNode } from 'react';\n\ntype Props = PropsWithChildren<{\n title?: ReactNode;\n value: ReactNode;\n disabled?: boolean;\n}>;\n\nexport const Tooltip = memo(({ title, value, disabled, children }: Props) => (\n
\n
\n {children}\n
\n\n
\n {title ? (

{title}

) : null}\n\n

{value}

\n
\n
\n));\n","import { Stack } from '@carbon/react';\nimport { FormController } from '@form-ts/core';\nimport { constNull } from 'fp-ts/function';\nimport React, { memo } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { UserFormData } from 'src/modules/common/types/UserFormData';\nimport { UserRole } from 'src/modules/common/types/UserRole';\nimport { DropdownField } from 'src/modules/form/components/DropdownField';\nimport { TextField } from 'src/modules/form/components/TextField';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { ensureNonNull } from 'src/modules/form/utils/transform';\n\ntype Props = {\n className?: string;\n disableEmail?: boolean;\n disableRole: boolean;\n form: FormController;\n isUserCreation: boolean;\n};\n\nexport const UserForm = memo(({\n className, disableEmail, disableRole, form, isUserCreation,\n}: Props): React.ReactElement => {\n const intl = useIntl();\n\n return (\n \n \n\n \n\n \n\n \n \n );\n});\n\nconst renderSelectedItem = (role: UserRole): React.ReactElement => (\n {ROLE_NAMES[role]}\n);\nconst RenderItem = (role: UserRole): React.ReactElement => (\n {ROLE_NAMES[role]}\n);\n\nconst ROLE_LIST = [\n UserRole.USER,\n UserRole.ADMIN,\n];\nconst ROLE_NAMES = {\n [UserRole.USER]: ,\n [UserRole.ADMIN]: ,\n};\n","import './UserLanguage.scss';\nimport { TranslationKey } from '@tolgee/react';\nimport React, { memo } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { useAction } from 'src/hooks/useAction';\nimport { Dropdown } from 'src/modules/common/components/Dropdown';\nimport { GlobeIcon } from 'src/modules/common/icons/GlobeIcon';\nimport { CONFIG_LANGUAGE_SWITCH } from 'src/modules/config/actions/ConfigActions';\nimport { getEnvironmentLanguages } from 'src/modules/config/selectors/getEnvironmentLanguages';\nimport { getLanguage } from 'src/modules/config/selectors/getLanguage';\nimport { Language } from 'src/types/common/Language';\n\nexport const UserLanguage = memo(() => {\n const language = useSelector(getLanguage);\n const languages = useSelector(getEnvironmentLanguages);\n\n const switchLanguage = useAction(CONFIG_LANGUAGE_SWITCH.request);\n\n return (\n }\n selectedValue={language}\n onChange={switchLanguage}\n icon={}\n shaded={false}\n size=\"xlg\"\n />\n );\n});\n\nconst LANGUAGE_KEYS: Record = {\n 'en-US': 'header/user/language/en-US',\n 'de-CH': 'header/user/language/de-CH',\n 'fr-FR': 'header/user/language/fr-FR',\n 'hu-HU': 'header/user/language/hu-HU',\n 'es-ES': 'header/user/language/es-ES',\n 'sv-SE': 'header/user/language/sv-SE',\n 'zh-CN': 'header/user/language/zh-CN',\n 'it-IT': 'header/user/language/it-IT',\n 'sr-RS': 'header/user/language/sr-RS',\n 'mk-MK': 'header/user/language/mk-MK',\n};\n","import './UserProfile.scss';\nimport { Checkmark } from '@carbon/icons-react';\nimport React, { memo } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { Link } from 'react-router-dom';\nimport { CustomMenu } from 'src/modules/common/components/CustomMenu';\nimport { CustomMenuItem } from 'src/modules/common/components/CustomMenuItem';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\nimport { UserIcon } from 'src/modules/common/icons/UserIcon';\nimport { UserRole } from 'src/modules/common/types/UserRole';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { getCurrentLocation } from 'src/modules/routing/selectors/getCurrentLocation';\n\nexport const UserProfile = memo(() => {\n const intl = useIntl();\n const location = useSelector(getCurrentLocation);\n\n const loggedInUser = useSelector(getLoggedInUser);\n\n return (\n (\n
\n \n
\n )}\n >\n

{loggedInUser.email}

\n\n \n \n

\n \n

\n\n
\n {location?.pathname === '/projects' ? : }\n
\n \n )}\n hasDivider={false}\n />\n \n\n \n \n

\n \n

\n\n
\n \n
\n \n )}\n hasDivider={true}\n />\n \n\n {loggedInUser.role === UserRole.ADMIN && (\n

\n \n

\n )}\n\n {loggedInUser.role === UserRole.ADMIN && (\n \n \n

\n \n

\n\n
\n {location?.pathname === '/admin/users' ? : }\n
\n \n )}\n hasDivider={false}\n />\n \n )}\n\n {loggedInUser.role === UserRole.ADMIN && (\n \n \n

\n \n

\n\n
\n {location?.pathname === '/admin/organization' ? : }\n
\n \n )}\n hasDivider={true}\n />\n \n )}\n\n \n \n \n

\n )}\n hasDivider={true}\n />\n \n \n );\n});\n","export const dateFormat = 'd.m.Y';\nexport const userDateFormat = 'DD/MM/YYYY - HH:mm:ss';\n","import { Decimal } from 'decimal.js-light';\n\nexport const DECIMAL_ZERO = new Decimal(0);\nexport const DECIMAL_ONE = new Decimal(1);\n\nexport const DECIMAL_PLACES = 2;\nexport const MAX_TRILLION = 9_999_999_999_999;\n","import { EnergyEfficiencyClass } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\nimport { SupScript } from 'src/modules/common/components/SupScript';\n\nexport const LABELS: Record = {\n 'A+': <>A +,\n A: 'A',\n B: 'B',\n C: 'C',\n D: 'D',\n};\n","import { EnergyEfficiencyClass } from '@belimo-retrofit-portal/logic';\nimport Decimal from 'decimal.js-light';\n\nexport const FACTOR_WEIGHTS_LABELS: Readonly> = {\n 'A+': new Decimal(4),\n A: new Decimal(3),\n B: new Decimal(2),\n C: new Decimal(1),\n D: new Decimal(0),\n};\n","export const FILE_MAX_SIZE_FILED_MB = 10;\n","import React from 'react';\n\nexport const sub = (children: React.ReactNode): React.ReactElement => {children};\nexport const sup = (children: React.ReactNode): React.ReactElement => {children};\nexport const i = (children: React.ReactNode): React.ReactElement => {children};\nexport const b = (children: React.ReactNode): React.ReactElement => {children};\nexport const em = (children: React.ReactNode): React.ReactElement => {children};\nexport const strong = (children: React.ReactNode): React.ReactElement => {children};\n","/* eslint-disable @typescript-eslint/consistent-type-assertions */\nimport { Integer } from '@belimo-retrofit-portal/logic';\n\nexport const INTEGER_ZERO = 0 as Integer;\nexport const INTEGER_ONE = 1 as Integer;\n","import { Language } from 'src/types/common/Language';\n\nexport const LANGUAGE_LIST = [\n 'en-US',\n 'de-CH',\n 'fr-FR',\n 'hu-HU',\n 'es-ES',\n 'sv-SE',\n 'zh-CN',\n 'it-IT',\n 'sr-RS',\n 'mk-MK',\n] as const;\n\nexport const INTL_LOCALE_MAP: Record = {\n 'en-US': 'en-US',\n 'de-CH': 'de-CH',\n 'fr-FR': 'fr-FR',\n 'hu-HU': 'hu-HU',\n 'es-ES': 'es-ES',\n 'sv-SE': 'sv-SE',\n 'zh-CN': 'zh-CN',\n 'it-IT': 'it-IT',\n 'sr-RS': 'sr-RS',\n 'mk-MK': 'mk-MK',\n};\n","import { Language } from 'src/types/common/Language';\n\nexport const TERMS_AND_PRIVACY_LINK_MAP: Readonly> = {\n 'de-CH': 'https://www.belimo.com/ch/de_CH/privacy',\n 'en-US': 'https://www.belimo.com/ch/en_US/privacy',\n 'fr-FR': 'https://www.belimo.com/fr/fr_FR/privacy',\n 'hu-HU': 'https://www.belimo.com/at/hu_HU/privacy',\n 'es-ES': 'https://www.belimo.com/es/es_ES/privacy',\n 'sv-SE': 'https://www.belimo.com/se/sv_SE/privacy',\n 'zh-CN': 'https://www.belimo.com.cn/cn/zh_CN/privacy',\n 'it-IT': 'https://www.belimo.com/it/it_IT/privacy',\n 'sr-RS': 'https://www.belimo.com/at/sr_RS/privacy',\n 'mk-MK': 'https://www.belimo.com/at/mk_MK/privacy',\n};\n\nexport const IMPRINT_LINK_MAP: Readonly> = {\n 'de-CH': 'https://www.belimo.com/ch/de_CH/imprint',\n 'en-US': 'https://www.belimo.com/ch/en_US/imprint',\n 'fr-FR': 'https://www.belimo.com/fr/fr_FR/imprint',\n 'hu-HU': 'https://www.belimo.com/at/hu_HU/imprint',\n 'es-ES': 'https://www.belimo.com/es/es_ES/imprint',\n 'sv-SE': 'https://www.belimo.com/se/sv_SE/imprint',\n 'zh-CN': 'https://www.belimo.com.cn/cn/zh_CN/imprint',\n 'it-IT': 'https://www.belimo.com/it/it_IT/imprint',\n 'sr-RS': 'https://www.belimo.com/at/sr_RS/imprint',\n 'mk-MK': 'https://www.belimo.com/at/mk_MK/imprint',\n};\n","export const IS_ONBOARDING_MODAL_VIEWED = 'bp-is-onboarding-modal-viewed';\n\nexport const SCHEMA_TEMPLATE_SELECTION = 'MULTIPLE_SCHEMA_PRESELECTED';\n","import { Locale } from 'src/types/common/Locale';\n\nexport const SUPPORTED_LOCALES: ReadonlyMap = new Map([\n ['en', 'en-us'],\n ['de', 'de-de'],\n ['fr', 'fr-fr'],\n ['hu', 'hu-hu'],\n ['es', 'es-es'],\n ['sv', 'sv-se'],\n ['zh', 'zh-cn'],\n ['it', 'it-it'],\n ['sr', 'sr-rs'],\n ['mk', 'mk-mk'],\n\n ['en-au', 'en-au'],\n ['en-ca', 'en-ca'],\n ['en-gb', 'en-gb'],\n ['en-us', 'en-us'],\n\n ['de-at', 'de-at'],\n ['de-de', 'de-de'],\n ['de-li', 'de-li'],\n ['de-lu', 'de-lu'],\n ['de-ch', 'de-ch'],\n\n ['fr-be', 'fr-be'],\n ['fr-ca', 'fr-ca'],\n ['fr-fr', 'fr-fr'],\n ['fr-lu', 'fr-lu'],\n ['fr-ch', 'fr-ch'],\n\n ['hu-hu', 'hu-hu'],\n\n ['es-es', 'es-es'],\n\n ['sv-se', 'sv-se'],\n\n ['zh-cn', 'zh-cn'],\n\n ['it-it', 'it-it'],\n\n ['sr-rs', 'sr-rs'],\n\n ['mk-mk', 'mk-mk'],\n]);\n","import { Matrix } from '@belimo-retrofit-portal/logic';\n\nexport const MATRIX_IDENTITY: Matrix = {\n a: 1,\n b: 0,\n c: 0,\n d: 1,\n e: 0,\n f: 0,\n};\n","import { AreaUnit, BuildingType, CurrencyCode, EnergySource } from '@belimo-retrofit-portal/logic';\n\nexport const ENERGY_SOURCE_HEATING_OPTIONS: ReadonlyArray = [\n EnergySource.ELECTRICITY,\n EnergySource.HEATING_DISTRICT,\n EnergySource.HEATING_OIL,\n EnergySource.GAS,\n EnergySource.HEATING_OTHER,\n];\n\nexport const ENERGY_SOURCE_COOLING_OPTIONS: ReadonlyArray = [\n EnergySource.ELECTRICITY,\n EnergySource.COOLING_DISTRICT,\n EnergySource.GAS,\n EnergySource.COOLING_OTHER,\n];\n\nexport const BUILDING_TYPE_OPTIONS: ReadonlyArray = [\n BuildingType.OFFICE,\n BuildingType.DATA_CENTER,\n BuildingType.EDUCATION_ELEMENTARY,\n BuildingType.EDUCATION_HIGHER,\n BuildingType.EDUCATION_OTHER,\n BuildingType.ENTERTAINMENT_LEISURE,\n BuildingType.GOVERNMENT,\n BuildingType.HEALTH,\n BuildingType.HOSPITAL,\n BuildingType.HOTEL,\n BuildingType.LIFE_SCIENCE,\n BuildingType.RESTAURANT,\n BuildingType.RETAIL,\n BuildingType.WHOLESALE_RETAIL_TRADE,\n];\n\nexport const CURRENCY_CODE_OPTIONS: ReadonlyArray = [\n 'EUR',\n 'CHF',\n 'USD',\n 'GBP',\n 'HKD',\n 'CNY',\n 'INR',\n 'SEK',\n 'NOK',\n 'TRY',\n];\n\nexport const UNIT_VERSION_OPTIONS: ReadonlyArray = [\n AreaUnit.SQM,\n AreaUnit.SQFT,\n];\n","export const CARBON_THEME = {\n belimoOrangeColor: '#ff6600',\n additionalSuccess20: '#B6D6A4',\n additionalSuccess100: '#517D34',\n additionalSuccess125: '#236119',\n additionalDanger20: '#F8BBB8',\n additionalDanger100: '#C33224',\n additionalDanger125: '#A02E23',\n surface04: '#c3c3c3',\n blue04: '#375f80',\n onSurfaceLightPrimary: '#000000',\n onSurfaceLightSecondary: '#2c2b2b',\n onInteractionDark: '#000000',\n};\n","import { COUNTRY_CODES, CountryCode } from '@belimo-retrofit-portal/logic';\nimport { useMemo } from 'react';\nimport { useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { INTL_LOCALE_MAP } from 'src/modules/common/constants/language';\nimport { AutocompleteOption } from 'src/modules/common/types/AutocompleteOption';\nimport { getLanguage } from 'src/modules/config/selectors/getLanguage';\n\nexport function useCountryList(): ReadonlyArray> {\n const intl = useIntl();\n const language = useSelector(getLanguage);\n const collator = useMemo(() => new Intl.Collator(INTL_LOCALE_MAP[language]), [language]);\n\n return useMemo(\n () => COUNTRY_CODES.map((code) => ({\n value: code,\n label: intl.formatMessage({ id: `common/country/name/${code}` }),\n })).sort((optionA, optionB) => collator.compare(optionA.label, optionB.label)),\n [intl, collator],\n );\n}\n","import { RefObject, useEffect } from 'react';\n\nexport function useOutsideClick(ref: RefObject, handler: () => void): void {\n useEffect(() => {\n const listener = (event: MouseEvent): void => {\n const element = ref.current;\n if (!element) {\n return;\n }\n\n const { target } = event;\n if (target instanceof Element) {\n if (element.contains(target) || !target.isConnected) {\n return;\n }\n }\n\n handler();\n };\n\n window.addEventListener('click', listener, { passive: true });\n return () => window.removeEventListener('click', listener);\n }, [ref, handler]);\n}\n","import { useEffect, useRef } from 'react';\n\nexport const usePrevious = (prop: T): T => {\n const propRef = useRef(prop);\n\n useEffect(() => {\n propRef.current = prop;\n }, [prop]);\n\n return propRef.current;\n};\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const ArrowDownIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const ArrowLeftIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const ArrowRightIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const ArrowUpIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const BellIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const ChartUpIcon = memo(() => (\n \n \n {/* eslint-disable-next-line */}\n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const CheckIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const ChevronDownIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const ChevronUpIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const CircleCheckFilledIcon = memo(() => (\n \n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const CircleFilledIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const CloudIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const CommentIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const CoolingIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const CopyIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const CrossIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const CurrencyExchangeIcon = memo(() => (\n \n \n {/* eslint-disable-next-line */}\n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const DateIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const DeleteIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const DownloadIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const EditIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const FanIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const FileIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const FilterIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const GlobeIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const GridViewIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const HeatingIcon = memo(() => (\n \n \n \n \n \n));\n","import './IconWrapper.scss';\nimport React, { memo } from 'react';\n\ntype Props = {\n children: React.ReactNode;\n};\n\nexport const IconWrapper = memo(({ children }: Props) => (\n \n {children}\n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const LightningIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const ListViewIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\ntype Props = {\n readonly className?: string;\n};\n\nexport const LoadingIcon = memo(\n ({ className }: Props): React.ReactElement => (\n
\n \n \n \n \n \n
\n ),\n);\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const MailIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const PlusIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const QuestionIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const ResetIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const SearchIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const ShareOff = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const StarFilledIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const StarIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const UploadIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const UserIcon = memo(() => (\n \n \n \n \n \n));\n","import React, { memo } from 'react';\nimport { IconWrapper } from 'src/modules/common/icons/IconWrapper';\n\nexport const WarningIcon = memo(() => (\n \n \n \n \n \n));\n","import './AdminLayout.scss';\nimport { Breadcrumb } from '@carbon/react';\nimport React, { PropsWithChildren } from 'react';\nimport { AppLayout } from 'src/modules/common/layouts/AppLayout';\n\ntype Props = PropsWithChildren<{\n actions?: React.ReactNode;\n extension?: React.ReactNode;\n breadcrumbs: React.ReactNode;\n title: string;\n}>;\n\nexport const AdminLayout = ({\n actions,\n children,\n extension,\n title,\n breadcrumbs,\n}: Props): React.ReactElement => (\n \n
\n
\n
\n \n {breadcrumbs}\n \n\n

{title}

\n
{actions}
\n
\n\n
\n {extension}\n
\n
\n
\n\n {children}\n
\n);\n","import './AppLayout.scss';\nimport clsx from 'clsx';\nimport React from 'react';\nimport { useSelector } from 'react-redux';\nimport { useAction } from 'src/hooks/useAction';\nimport { Footer } from 'src/modules/common/components/Footer';\nimport { Header } from 'src/modules/common/components/Header';\nimport { FeedbackButton } from 'src/modules/feedback/views/FeedbackButton';\nimport { NOTIFICATION_HIDE } from 'src/modules/notifications/actions/NotificationActions';\nimport { getNotification } from 'src/modules/notifications/selectors/getNotification';\nimport { Notification } from 'src/modules/notifications/views/Notification';\n\ntype Props = {\n readonly children: React.ReactNode;\n readonly className?: string;\n readonly classNameBody?: string;\n};\n\nexport const AppLayout = ({ children, className, classNameBody }: Props): React.ReactElement => {\n const notifications = useSelector(getNotification);\n\n const hideNotification = useAction(NOTIFICATION_HIDE.trigger);\n\n return (\n
\n\n
\n\n
\n {children}\n
\n\n
\n\n \n\n \n
\n );\n};\n","import './DocumentLayout.scss';\nimport React from 'react';\n\ntype Props = {\n readonly children: React.ReactNode;\n};\n\nexport const DocumentLayout = ({ children }: Props): React.ReactElement => (\n
\n {children}\n
\n);\n","import './LoginLayout.scss';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { LeadText } from 'src/modules/common/typography/LeadText';\n\ntype Props = {\n readonly children: React.ReactNode;\n};\n\nexport const LoginLayout = ({ children }: Props): React.ReactElement => (\n
\n
\n \n\n
\n
\n

\n \n

\n\n \n \n \n
\n\n \n
\n
\n\n
\n {children}\n
\n
\n);\n","import { NativeError, RuntimeError, ProjectData, PROJECT_DATA } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { PROJECT } from 'src/modules/common/codecs/Project';\nimport { Project } from 'src/modules/common/types/Project';\nimport { call } from 'typed-redux-saga';\n\nexport function* createProject(project: ProjectData): SagaIterator {\n try {\n const body = yield* call(PROJECT_DATA.encode, project);\n const { content } = yield* call(makeRestRequest, 'POST', '/projects', body);\n return yield* call(decodeOrThrow, PROJECT, content);\n } catch (error) {\n throw new RuntimeError('Could not create project', { project }, NativeError.wrap(error));\n }\n}\n","import { NativeError, RuntimeError, Uuid } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { PROJECT } from 'src/modules/common/codecs/Project';\nimport { Project } from 'src/modules/common/types/Project';\nimport { call } from 'typed-redux-saga';\n\nexport function* loadProject(projectId: Uuid): SagaIterator {\n try {\n const { content } = yield* call(makeRestRequest, 'GET', `/projects/${projectId}`);\n return yield* call(decodeOrThrow, PROJECT, content);\n } catch (error) {\n throw new RuntimeError(`Could not load project \"${projectId}\"`, {}, NativeError.wrap(error));\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { Project } from 'src/modules/common/types/Project';\nimport { call } from 'typed-redux-saga';\n\nexport function* removeProject(project: Project): SagaIterator {\n try {\n yield* call(makeRestRequest, 'DELETE', `/projects/${encodeURIComponent(project.id)}`);\n } catch (error) {\n throw new RuntimeError('Could not remove project', { project }, NativeError.wrap(error));\n }\n}\n","import { NativeError, PROJECT_DATA, ProjectData, RuntimeError, Uuid } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { PROJECT } from 'src/modules/common/codecs/Project';\nimport { Project } from 'src/modules/common/types/Project';\nimport { call } from 'typed-redux-saga';\n\nexport function* updateProject(id: Uuid, project: ProjectData): SagaIterator {\n try {\n const body = yield* call(PROJECT_DATA.encode, project);\n const { content } = yield* call(makeRestRequest, 'PUT', `/projects/${encodeURIComponent(id)}`, body);\n return yield* call(decodeOrThrow, PROJECT, content);\n } catch (error) {\n throw new RuntimeError(`Could not update project \"${id}\"`, { project }, NativeError.wrap(error));\n }\n}\n","import { Project } from 'src/modules/common/types/Project';\nimport { createParameterSelector } from 'src/utils/selectorUtils';\n\nexport const getProjectLazy = createParameterSelector();\n","export enum ChangeOverLevel {\n NO_CHANGE_OVER = 'no-change-over',\n EMITTER = 'emitter',\n DISTRIBUTION = 'distribution',\n FLOOR = 'floor',\n}\n","export enum DeviceType {\n THROTTLING_CIRCUIT = 'throttling-circuit',\n DIVERTING_CIRCUIT = 'diverting-circuit',\n INJECTION_CIRCUIT = 'injection-circuit',\n MIXING_CIRCUIT = 'mixing-circuit',\n BYPASS = 'bypass',\n PUMP = 'pump',\n ACTIVE_OR_PASSIVE_CIRCUIT = 'active-or-passive-circuit',\n SPECIFIC_CIRCUIT = 'specific-circuit',\n CHANGEOVER = 'changeover',\n}\n","export enum DifferentTemperatureLevel {\n YES = 'yes',\n NO = 'no',\n}\n","export enum FlowDirection {\n NORTH = 'N',\n SOUTH = 'S',\n EAST = 'E',\n WEST = 'W',\n}\n","import { BaseError } from '@belimo-retrofit-portal/logic';\n\nexport type Future =\n | { readonly state: 'pending' }\n | { readonly state: 'success'; readonly value: TValue }\n | { readonly state: 'failure'; readonly error: BaseError };\n\nexport const FUTURE = {\n pending(): Future {\n return { state: 'pending' };\n },\n failure(error: BaseError): Future {\n return { state: 'failure', error: error };\n },\n success(value: TValue): Future {\n return { state: 'success', value: value };\n },\n};\n","export enum Orientation {\n HORIZONTAL = 'H',\n VERTICAL = 'V',\n}\n","export enum ProjectReportCoverContactsEnum {\n OFFICE = 'office',\n ORGANIZATION = 'organization',\n}\n","export enum ThermalEnergy {\n HEATING = 'H',\n COOLING = 'C',\n MIXED = 'X',\n}\n","export enum UserRole {\n USER = 'user',\n ADMIN = 'admin',\n}\n","export enum WaterToAir {\n WATER_TO_AIR = 'water-to-air',\n WATER = 'water',\n}\n","import './BodyDesktopLargeRegularText.scss';\nimport clsx from 'clsx';\nimport React from 'react';\n\ntype Props = {\n className?: string;\n children: React.ReactNode;\n};\n\nexport const BodyDesktopLargeRegularText = ({ className, children }: Props): React.ReactElement => (\n

\n {children}\n

\n);\n","import './BodyDesktopSmallLightText.scss';\nimport clsx from 'clsx';\nimport React from 'react';\n\ntype Props = {\n className?: string;\n children: React.ReactNode;\n};\n\nexport const BodyDesktopSmallLightText = ({ className, children }: Props): React.ReactElement => (\n

\n {children}\n

\n);\n","import './BodyLargeLightText.scss';\nimport clsx from 'clsx';\nimport React from 'react';\n\ntype Props = {\n className?: string;\n children: React.ReactNode;\n};\n\nexport const BodyLargeLightText = ({ className, children }: Props): React.ReactElement => (\n

\n {children}\n

\n);\n","import './BodyLargeRegularText.scss';\nimport clsx from 'clsx';\nimport React from 'react';\n\ntype Props = {\n className?: string;\n children: React.ReactNode;\n};\n\nexport const BodyLargeRegularText = ({ className, children }: Props): React.ReactElement => (\n

\n {children}\n

\n);\n","import './BodySmallText.scss';\nimport clsx from 'clsx';\nimport React from 'react';\n\ntype Props = {\n className?: string;\n children: React.ReactNode;\n};\n\nexport const BodySmallText = ({ className, children }: Props): React.ReactElement => (\n

\n {children}\n

\n);\n","import './BodyText.scss';\nimport clsx from 'clsx';\nimport React from 'react';\n\ntype Props = {\n className?: string;\n children: React.ReactNode;\n};\n\nexport const BodyText = ({ className, children }: Props): React.ReactElement => (\n

\n {children}\n

\n);\n","import './DesktopLargeText.scss';\nimport clsx from 'clsx';\nimport React from 'react';\n\ntype Props = {\n className?: string;\n as?: React.ElementType;\n children: React.ReactNode;\n};\n\nexport const DesktopLargeText = (props: Props): React.ReactElement => {\n const { className, as: Cmp = 'p', children } = props;\n\n return (\n \n {children}\n \n );\n};\n","import './HeadlineSmallText.scss';\nimport clsx from 'clsx';\nimport React from 'react';\n\ntype Props = {\n className?: string;\n children: React.ReactNode;\n};\n\nexport const HeadlineSmallText = ({ className, children }: Props): React.ReactElement => (\n

\n {children}\n

\n);\n","import './LeadText.scss';\nimport clsx from 'clsx';\nimport React from 'react';\n\ntype Props = {\n className?: string;\n as?: React.ElementType;\n children: React.ReactNode;\n};\n\nexport const LeadText = (props: Props): React.ReactElement => {\n const { className, as: Cmp = 'h6', children } = props;\n\n return (\n \n {children}\n \n );\n};\n","import './OverlineDesktopSmallText.scss';\nimport clsx from 'clsx';\nimport React from 'react';\n\ntype Props = {\n className?: string;\n children: React.ReactNode;\n};\n\nexport const OverlineDesktopSmallText = ({ className, children }: Props): React.ReactElement => (\n

\n {children}\n

\n);\n","import './TitleText.scss';\nimport clsx from 'clsx';\nimport React from 'react';\n\ntype Props = {\n className?: string;\n children: React.ReactNode;\n};\n\nexport const TitleText = ({ className, children }: Props): React.ReactElement => (\n

\n {children}\n

\n);\n","type Method = (...args: A) => R;\n\ntype Decorator = (\n target: unknown,\n propertyKey: string,\n descriptor: TypedPropertyDescriptor>,\n) => TypedPropertyDescriptor>;\n\nexport function bind(): Decorator {\n return (\n _: unknown,\n propertyKey: string,\n descriptor: TypedPropertyDescriptor>,\n ) => ({\n configurable: true,\n get: function getter(this: object): Method {\n const bound = descriptor.value!.bind(this);\n\n Object.defineProperty(this, propertyKey, {\n value: bound,\n configurable: true,\n writable: true,\n });\n\n return bound;\n },\n });\n}\n\nexport function memoize(hashFunc: Method): Decorator {\n return (\n _: unknown,\n propertyKey: string,\n descriptor: TypedPropertyDescriptor>,\n ) => ({\n configurable: true,\n get: function getter(this: object): Method {\n const cacheMap = new Map();\n const memoized = getNewFunction(hashFunc, cacheMap, descriptor.value!);\n\n Object.defineProperty(this, propertyKey, {\n value: memoized,\n configurable: true,\n writable: true,\n });\n\n return memoized;\n },\n });\n}\n\nfunction getNewFunction(\n hashFunc: Method,\n cacheMap: Map,\n originalMethod: Method,\n): Method {\n return function method(this: unknown, ...args: A): R {\n const cacheKey = hashFunc(...args);\n if (cacheMap.has(cacheKey)) {\n return cacheMap.get(cacheKey)!;\n }\n\n const result = originalMethod.apply(this, args);\n cacheMap.set(cacheKey, result);\n return result;\n };\n}\n","import { Either, fold } from 'fp-ts/Either';\nimport { constNull, identity, pipe } from 'fp-ts/function';\n\nexport function toNullable(either: Either): T | null {\n return pipe(either, fold(constNull, identity));\n}\n","import { ProjectAddress } from '@belimo-retrofit-portal/logic';\n\nexport function formatProjectDetailsSubTitle(buildingType: string, address: ProjectAddress): string {\n return [\n buildingType,\n address.street.trim(),\n `${address.city} ${address.zip}`.trim(),\n ].filter(Boolean).join(', ');\n}\n","/* eslint-disable indent */\nimport React from 'react';\n\nexport function htmlToReact(html: string): React.ReactNode {\n const document = new DOMParser().parseFromString(html, 'text/html');\n return parseChildren(document.body, false);\n}\n\nfunction processNode(node: Node): React.ReactNode {\n if (node instanceof Text) {\n return processTextNode(node);\n } if (node instanceof HTMLAnchorElement) {\n return processLinkElement(node);\n } if (node instanceof HTMLImageElement) {\n return processImageElement(node);\n } if (node instanceof HTMLElement) {\n return processGenericElement(node);\n }\n return null;\n}\n\nfunction processLinkElement(node: HTMLAnchorElement): React.ReactElement {\n return (\n \n {parseChildren(node, true)}\n \n );\n}\n\nfunction processImageElement(node: HTMLImageElement): React.ReactElement {\n return (\n \n );\n}\n\nfunction processGenericElement(node: HTMLElement): React.ReactNode {\n const element = node.nodeName.toLowerCase();\n if (EMPTY_ELEMENTS.has(element)) {\n return React.createElement(element, {});\n }\n if (BASIC_ELEMENTS.has(element)) {\n return React.createElement(element, {}, parseChildren(node, true));\n }\n\n throw new Error(`Unsupported HTML tag \"${node.nodeName}\"`);\n}\n\nfunction processTextNode(node: Text): string {\n return node.textContent ?? '';\n}\n\nfunction parseChildren(node: HTMLElement, inner: boolean): React.ReactNode {\n if (node.childNodes.length === 0) {\n return undefined;\n }\n\n const childNodes = Array.from(node.childNodes).map((child) => processNode(child));\n\n // eslint-disable-next-line react/jsx-no-useless-fragment\n const wrappedNodes = inner ? childNodes : <>{ ...childNodes };\n\n return childNodes.length === 1 ? childNodes[0] : wrappedNodes;\n}\n\nconst EMPTY_ELEMENTS: ReadonlySet = new Set([\n 'br',\n 'hr',\n]);\n\nconst BASIC_ELEMENTS: ReadonlySet = new Set([\n 'ol',\n 'ul',\n 'li',\n\n 'p',\n\n 'span',\n\n 'u',\n 'i',\n 's',\n 'b',\n\n 'em',\n 'del',\n 'small',\n 'strong',\n\n 'sub',\n 'sup',\n]);\n","import { Matrix } from '@belimo-retrofit-portal/logic';\nimport { Interpolation } from 'src/modules/common/types/Interpolation';\n\nexport const INTERPOLATION_MATRIX: Interpolation = {\n len: (x) => Math.hypot(\n x.a,\n x.b,\n x.c,\n x.d,\n x.e,\n x.f,\n ),\n add: (x, y) => ({\n a: x.a + y.a,\n b: x.b + y.b,\n c: x.c + y.c,\n d: x.d + y.d,\n e: x.e + y.e,\n f: x.f + y.f,\n }),\n sub: (x, y) => ({\n a: x.a - y.a,\n b: x.b - y.b,\n c: x.c - y.c,\n d: x.d - y.d,\n e: x.e - y.e,\n f: x.f - y.f,\n }),\n mul: (x, k) => ({\n a: x.a * k,\n b: x.b * k,\n c: x.c * k,\n d: x.d * k,\n e: x.e * k,\n f: x.f * k,\n }),\n};\n","import { Language } from 'src/types/common/Language';\n\nexport function getPreferredLanguage(environmentLanguages: ReadonlyArray): Language {\n const navigatorLanguages = navigator.languages.map((language) => language.substring(0, 2).toLowerCase());\n const supportedLanguages = environmentLanguages.map((language) => language.substring(0, 2));\n\n const matchedLanguage = navigatorLanguages.find((language) => supportedLanguages.includes(language));\n\n const matchedSupportedLanguage = environmentLanguages.find(\n (language) => language.substring(0, 2) === matchedLanguage,\n );\n\n return matchedSupportedLanguage || environmentLanguages[0];\n}\n","import { SUPPORTED_LOCALES } from 'src/modules/common/constants/locale';\nimport { Locale } from 'src/types/common/Locale';\n\nexport function getPreferredLocale(): Locale {\n for (const value of navigator.languages) {\n const locale = SUPPORTED_LOCALES.get(value.toLowerCase());\n if (locale) {\n return locale;\n }\n }\n\n return 'en-us';\n}\n","import { Matrix } from '@belimo-retrofit-portal/logic';\nimport { MATRIX_IDENTITY } from 'src/modules/common/constants/matrix';\nimport { Point } from 'src/modules/common/types/Point';\n\nexport function matrixMultiply(\n matrix: Matrix,\n ...more: ReadonlyArray\n): Matrix {\n return more.reduce((m1, m2) => ({\n a: m2.a * m1.a + m2.b * m1.c,\n b: m2.a * m1.b + m2.b * m1.d,\n c: m2.c * m1.a + m2.d * m1.c,\n d: m2.c * m1.b + m2.d * m1.d,\n e: m2.e * m1.a + m2.f * m1.c + m1.e,\n f: m2.e * m1.b + m2.f * m1.d + m1.f,\n }), matrix);\n}\n\nexport function matrixScale(scale: number, origin: Point): Matrix {\n const scaleMatrix = { a: scale, b: 0, c: 0, d: scale, e: 0, f: 0 };\n if (origin.x === 0 && origin.y === 0) {\n return scaleMatrix;\n }\n\n return matrixMultiply(\n matrixTranslate(origin),\n scaleMatrix,\n matrixTranslate({ x: -origin.x, y: -origin.y }),\n );\n}\n\nexport function matrixTranslate(point: Point): Matrix {\n return { a: 1, b: 0, c: 0, d: 1, e: point.x, f: point.y };\n}\n\nexport function matrixInverse(matrix: Matrix): Matrix {\n const det = matrix.a * matrix.d - matrix.b * matrix.c;\n if (det === 0) {\n return MATRIX_IDENTITY;\n }\n\n return {\n a: +matrix.d / det,\n b: -matrix.b / det,\n c: -matrix.c / det,\n d: +matrix.a / det,\n e: +(matrix.c * matrix.f - matrix.d * matrix.e) / det,\n f: -(matrix.a * matrix.f - matrix.b * matrix.e) / det,\n };\n}\n","import { none, some } from 'fp-ts/Option';\nimport * as O from 'monocle-ts/Optional';\nimport { Future, FUTURE } from 'src/modules/common/types/Future';\n\nexport function optionalFuture(): O.Optional, T> {\n return O.optional(\n (state) => (state.state === 'success'\n ? some(state.value)\n : none),\n (data) => (state) => (state.state === 'success'\n ? FUTURE.success(data)\n : state),\n );\n}\n","import { Ord } from 'fp-ts/Ord';\nimport { Ordering } from 'fp-ts/Ordering';\n\n// NOTE: Option.getOrd is not OK because CMP(NONE, SOME) == -1\nexport const ordNullable: (ord: Ord) => Ord = (ord) => ({\n equals: (a, b): boolean => {\n if (a === null) {\n return b === null;\n }\n if (b === null) {\n return false;\n }\n\n return ord.equals(a, b);\n },\n compare: (a, b): Ordering => {\n if (a === null) {\n return b === null ? 0 : 1;\n }\n if (b === null) {\n return -1;\n }\n\n return ord.compare(a, b);\n },\n});\n\nexport const ordPrecedence: (value: T) => ((ord: Ord) => Ord) = (value) => (ord) => ({\n equals: ord.equals,\n compare: (a, b): Ordering => {\n if (a === b) {\n return 0;\n }\n if (a === value) {\n return -1;\n }\n if (b === value) {\n return +1;\n }\n\n return ord.compare(a, b);\n },\n});\n","import { Matrix } from '@belimo-retrofit-portal/logic';\nimport { Point } from 'src/modules/common/types/Point';\n\nexport function pointTransform(point: Point, matrix: Matrix): Point {\n return {\n x: matrix.a * point.x + matrix.c * point.y + matrix.e,\n y: matrix.b * point.x + matrix.d * point.y + matrix.f,\n };\n}\n","import { Interpolation } from 'src/modules/common/types/Interpolation';\n\nexport type SpringParams = {\n readonly mass: number;\n readonly tension: number;\n readonly friction: number;\n\n readonly initialPosition: T;\n readonly initialVelocity: T;\n\n readonly onChange: (value: T, completed: boolean) => void;\n\n readonly precision: number;\n readonly interpolation: Interpolation;\n};\n\nexport type SpringController = {\n readonly value: T;\n readonly target: T;\n\n animate(to: T): void;\n abort(): void;\n};\n\nexport function spring({\n mass,\n tension,\n friction,\n initialPosition,\n initialVelocity,\n onChange,\n precision,\n interpolation,\n}: SpringParams): SpringController {\n let target = initialPosition;\n let position = initialPosition;\n let velocity = initialVelocity;\n\n let currFrameId = 0;\n let prevFrameTs = NaN;\n\n function loop(currFrameTs: number): void {\n // limit time delta to 46ms\n const elasped = Math.min(46, Math.floor(currFrameTs - prevFrameTs));\n\n // incrementaly iterpolate for each 1ms\n for (let i = 0; i < elasped; ++i) {\n const delta = interpolation.sub(position, target);\n const restoringForce = interpolation.mul(delta, -tension);\n const dampingForce = interpolation.mul(velocity, -friction);\n const totalForce = interpolation.add(restoringForce, dampingForce);\n const acceleration = interpolation.mul(totalForce, 1 / mass);\n\n velocity = interpolation.add(velocity, interpolation.mul(acceleration, ONE_MILLISECOND));\n position = interpolation.add(position, interpolation.mul(velocity, ONE_MILLISECOND));\n }\n\n const distance = interpolation.sub(position, target);\n const completed = (\n interpolation.len(velocity) < precision &&\n interpolation.len(distance) < precision\n );\n\n if (completed) {\n position = target;\n velocity = initialVelocity;\n prevFrameTs = NaN;\n } else {\n prevFrameTs = Math.floor(currFrameTs);\n }\n\n // we request animation before invoking the callback\n // to make possible to abort or start new animation inside the callback\n currFrameId = completed ? 0 : window.requestAnimationFrame(loop);\n onChange(position, completed);\n }\n\n return {\n get value(): T {\n return position;\n },\n get target(): T {\n return target;\n },\n\n animate: (to): void => {\n target = to;\n\n if (!currFrameId) {\n prevFrameTs = performance.now();\n currFrameId = window.requestAnimationFrame(loop);\n }\n },\n abort: (): void => {\n if (currFrameId) {\n window.cancelAnimationFrame(currFrameId);\n currFrameId = 0;\n }\n\n velocity = initialVelocity;\n prevFrameTs = NaN;\n },\n };\n}\n\nconst ONE_MILLISECOND = 0.001;\n","import { LogicError } from '@belimo-retrofit-portal/logic';\nimport { createElement, ReactElement, ReactNode } from 'react';\nimport { isNotNull } from 'src/utils/guard';\n\nexport function parseSvgFile(content: string): ReactElement {\n const document = new DOMParser().parseFromString(content, 'image/svg+xml');\n if (document.documentElement instanceof SVGSVGElement) {\n return parseElement(document.documentElement);\n }\n\n throw new LogicError('Invalid SVG content', { content });\n}\n\nfunction parseNode(node: Node): ReactNode {\n if (node instanceof Text) {\n return node.textContent?.trim() || null;\n }\n if (node instanceof SVGElement) {\n return parseElement(node);\n }\n\n return null;\n}\n\nfunction parseElement(node: SVGElement): ReactElement {\n const validAttributes = ALLOWED[node.nodeName];\n if (!validAttributes) {\n return createElement('g', { 'data-invalid-node': node.nodeName });\n }\n\n const props: Record = { key: Math.random().toFixed(6) };\n for (const svgAttribute of validAttributes) {\n const value = node.getAttribute(svgAttribute);\n if (value !== null) {\n const reactAttribute = svgAttribute.replace(/-([a-z])/g, (dashed) => dashed.substring(1).toUpperCase());\n props[reactAttribute] = value;\n }\n }\n\n const children = Array.from(node.childNodes).map(parseNode).filter(isNotNull);\n return createElement(node.nodeName.toLowerCase(), props, children);\n}\n\nconst COMMON_ATTRIBUTES = [\n 'display',\n 'visibility',\n\n 'color',\n 'opacity',\n 'overflow',\n 'transform',\n\n 'clip-path',\n 'clip-rule',\n\n 'fill',\n 'fill-opacity',\n 'fill-rule',\n\n 'stroke',\n 'stroke-width',\n 'stroke-opacity',\n 'stroke-dasharray',\n 'stroke-dashoffset',\n 'stroke-linecap',\n 'stroke-linejoin',\n 'stroke-miterlimit',\n];\nconst TEXT_ATTRIBUTES = [\n 'x',\n 'y',\n\n 'dx',\n 'dy',\n\n 'font-family',\n 'font-size',\n 'font-stretch',\n 'font-style',\n 'font-variant',\n 'font-weight',\n\n 'text-anchor',\n 'text-decoration',\n 'text-rendering',\n\n 'dominant-baseline',\n 'baseline-shift',\n 'alignment-baseline',\n];\n\nconst ALLOWED: Record = {\n svg: [\n 'width',\n 'height',\n\n 'viewBox',\n 'preserveAspectRatio',\n ],\n g: [\n ...COMMON_ATTRIBUTES,\n ],\n clipPath: [\n ...COMMON_ATTRIBUTES,\n 'clipPathUnits',\n ],\n line: [\n ...COMMON_ATTRIBUTES,\n 'x1',\n 'y1',\n 'x2',\n 'y2',\n ],\n rect: [\n ...COMMON_ATTRIBUTES,\n 'x',\n 'y',\n 'rx',\n 'ry',\n 'width',\n 'height',\n ],\n circle: [\n ...COMMON_ATTRIBUTES,\n 'cx',\n 'cy',\n 'r',\n ],\n ellipse: [\n ...COMMON_ATTRIBUTES,\n 'cx',\n 'cy',\n 'rx',\n 'ry',\n ],\n path: [\n ...COMMON_ATTRIBUTES,\n 'd',\n ],\n polyline: [\n ...COMMON_ATTRIBUTES,\n 'points',\n ],\n polygon: [\n ...COMMON_ATTRIBUTES,\n 'points',\n ],\n text: [\n ...COMMON_ATTRIBUTES,\n ...TEXT_ATTRIBUTES,\n ],\n tspan: [\n ...COMMON_ATTRIBUTES,\n ...TEXT_ATTRIBUTES,\n ],\n};\n","import { ConfigData } from 'src/modules/config/types/ConfigData';\nimport { ConfigI18n } from 'src/modules/config/types/ConfigI18n';\nimport { Language } from 'src/types/common/Language';\nimport { createActions } from 'src/utils/createActions';\n\nexport const CONFIG_FETCH = createActions('CONFIG_FETCH');\nexport const CONFIG_LANGUAGE_SWITCH = createActions('CONFIG_LANGUAGE_SWITCH');\n","import { DEVICE_IDENTIFIER } from '@belimo-retrofit-portal/logic';\nimport { Json } from 'fp-ts/Json';\nimport * as C from 'io-ts/Codec';\nimport { ReadOnlyArray } from 'src/io/combinators/ReadOnlyArray';\nimport { CONTAINER_TYPE } from 'src/modules/common/codecs/ContainerType';\nimport { ConfigContainer } from 'src/modules/config/types/ConfigContainer';\n\nexport const CONFIG_CONTAINER: C.Codec = C.struct({\n type: CONTAINER_TYPE,\n name: C.string,\n description: C.string,\n children: ReadOnlyArray(DEVICE_IDENTIFIER),\n});\n","import * as C from 'io-ts/Codec';\nimport * as D from 'io-ts/Decoder';\nimport * as E from 'io-ts/Encoder';\nimport { DEVICE_TYPE } from 'src/modules/common/codecs/DeviceType';\nimport { EMPTY } from 'src/modules/common/codecs/Empty';\nimport { ConfigDevice } from 'src/modules/config/types/ConfigDevice';\n\nconst CONFIG_DEVICE_DECODER: D.Decoder = D.struct({\n id: D.string,\n type: DEVICE_TYPE,\n\n name: D.string,\n explanation: D.union(EMPTY, D.string),\n});\n\nexport const CONFIG_DEVICE = C.make(CONFIG_DEVICE_DECODER, E.id());\n","import * as D from 'io-ts/Decoder';\nimport { EMPTY } from 'src/modules/common/codecs/Empty';\nimport {\n ConfigHvac,\n ConfigHvacAddition,\n ConfigHvacOption,\n ConfigHvacSection,\n} from 'src/modules/config/types/ConfigHvac';\n\nconst CONFIG_HVAC_ADDITION: D.Decoder = D.struct({\n id: D.string,\n title: D.string,\n placeholder: D.union(EMPTY, D.string),\n});\n\nconst CONFIG_HVAC_OPTION: D.Decoder = D.struct({\n id: D.string,\n title: D.string,\n explanation: D.union(EMPTY, D.string),\n});\n\nconst CONFIG_HVAC_SECTION: D.Decoder = D.struct({\n id: D.string,\n name: D.string,\n explanation: D.union(EMPTY, D.string),\n option: D.array(CONFIG_HVAC_OPTION),\n additionals: D.array(CONFIG_HVAC_ADDITION),\n});\n\nexport const CONFIG_HVAC: D.Decoder = D.struct({\n heating: D.array(CONFIG_HVAC_SECTION),\n cooling: D.array(CONFIG_HVAC_SECTION),\n ventilation: D.array(CONFIG_HVAC_SECTION),\n});\n","import { Json } from 'fp-ts/Json';\nimport * as C from 'io-ts/Codec';\nimport * as D from 'io-ts/Decoder';\nimport { CONTAINER_TYPE } from 'src/modules/common/codecs/ContainerType';\nimport { EMPTY } from 'src/modules/common/codecs/Empty';\nimport { FLOW_DIRECTION } from 'src/modules/common/codecs/FlowDirection';\nimport { ORIENTATION } from 'src/modules/common/codecs/Orientation';\nimport { THERMAL_ENERGY } from 'src/modules/common/codecs/ThermalEnergy';\nimport { ChangeOverLevel } from 'src/modules/common/types/ChangeOverLevel';\nimport { DifferentTemperatureLevel } from 'src/modules/common/types/DifferentTemperatureLevel';\nimport { WaterToAir } from 'src/modules/common/types/WaterToAir';\nimport { ConfigSchema, ConfigSchemaContainer } from 'src/modules/config/types/ConfigSchema';\n\nconst CONFIG_SCHEMA_CONTAINER: D.Decoder = D.struct({\n type: CONTAINER_TYPE,\n\n left: D.number,\n top: D.number,\n\n orientation: ORIENTATION,\n flow_direction: FLOW_DIRECTION,\n termal_energy: THERMAL_ENERGY,\n});\n\nexport const CHANGE_OVER_LEVEL: C.Codec = C.literal(\n ChangeOverLevel.NO_CHANGE_OVER,\n ChangeOverLevel.EMITTER,\n ChangeOverLevel.DISTRIBUTION,\n ChangeOverLevel.FLOOR,\n);\n\nexport const WATER_TO_AIR: C.Codec = C.literal(\n WaterToAir.WATER,\n WaterToAir.WATER_TO_AIR,\n);\n\nexport const DIFFERENT_TEMPERATURE_LEVEL: C.Codec = C.literal(\n DifferentTemperatureLevel.YES,\n DifferentTemperatureLevel.NO,\n);\n\nexport const CONFIG_SCHEMA: D.Decoder = D.struct({\n id: D.string,\n thermal_energy: THERMAL_ENERGY,\n water_to_air: WATER_TO_AIR,\n change_over_level: CHANGE_OVER_LEVEL,\n different_temperature_level: DIFFERENT_TEMPERATURE_LEVEL,\n children: D.record(CONFIG_SCHEMA_CONTAINER),\n\n name: D.string,\n explanation: D.union(EMPTY, D.string),\n width: D.number,\n height: D.number,\n});\n","import * as D from 'io-ts/Decoder';\nimport { LANGUAGE } from 'src/modules/common/codecs/Language';\nimport { Environment } from 'src/types/Environment';\n\nexport const ENVIRONMENT: D.Decoder = D.struct({\n apiBaseUrl: D.string,\n sentryDsn: D.string,\n sentryEnv: D.string,\n languages: D.array(LANGUAGE),\n});\n","import { TolgeeProvider } from '@tolgee/react';\nimport React from 'react';\nimport { useSelector } from 'react-redux';\nimport { getConfigState } from 'src/modules/config/selectors/getConfigState';\nimport { getTolgeeInstance } from 'src/modules/config/selectors/getTolgeeInstance';\nimport { RouterLoader } from 'src/modules/routing/views/RouterLoader';\n\ntype Props = {\n readonly children: React.ReactElement;\n};\n\nexport const ConfigProvider = ({ children }: Props): React.ReactElement | null => {\n const config = useSelector(getConfigState);\n if (config.data.state === 'pending') {\n return ;\n }\n if (config.data.state === 'failure') {\n // NOTE: not a good idea but the expected behaviour is not specified\n throw config.data.error;\n }\n\n return (\n \n {children}\n \n );\n};\n\nconst IntlProvider = ({ children }: Props): React.ReactElement => {\n const tolgee = useSelector(getTolgeeInstance);\n\n return (\n \n {children}\n \n );\n};\n","import { Action } from 'redux';\nimport { FUTURE } from 'src/modules/common/types/Future';\nimport { CONFIG_FETCH } from 'src/modules/config/actions/ConfigActions';\nimport { ConfigState } from 'src/modules/config/types/ConfigState';\n\nexport function configFetchReducer(state: ConfigState, action: Action): ConfigState {\n if (CONFIG_FETCH.isPending(action)) {\n return {\n data: FUTURE.pending(),\n };\n }\n if (CONFIG_FETCH.isSuccess(action)) {\n return {\n data: FUTURE.success(action.data),\n };\n }\n if (CONFIG_FETCH.isFailure(action)) {\n return {\n data: FUTURE.failure(action.data),\n };\n }\n\n return state;\n}\n","import { pipe } from 'fp-ts/function';\nimport * as O from 'monocle-ts/Optional';\nimport { Action } from 'redux';\nimport { optionalFuture } from 'src/modules/common/utils/optional';\nimport { CONFIG_LANGUAGE_SWITCH } from 'src/modules/config/actions/ConfigActions';\nimport { ConfigState } from 'src/modules/config/types/ConfigState';\n\nexport function configLanguageSwitchReducer(state: ConfigState, action: Action): ConfigState {\n if (CONFIG_LANGUAGE_SWITCH.isSuccess(action)) {\n return pipe(\n O.id(),\n O.prop('data'),\n O.compose(optionalFuture()),\n O.prop('i18n'),\n O.modify(() => action.data),\n )(state);\n }\n\n return state;\n}\n","import { FUTURE } from 'src/modules/common/types/Future';\nimport { configFetchReducer } from 'src/modules/config/reducers/configFetchReducer';\nimport { configLanguageSwitchReducer } from 'src/modules/config/reducers/configLanguageSwitchReducer';\nimport { ConfigState } from 'src/modules/config/types/ConfigState';\nimport { chainReducers } from 'src/utils/chainReducers';\n\nconst defaultState: ConfigState = {\n data: FUTURE.pending(),\n};\n\nexport const configReducer = chainReducers(defaultState, [\n configFetchReducer,\n configLanguageSwitchReducer,\n]);\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { CONFIG_FETCH } from 'src/modules/config/actions/ConfigActions';\nimport { loadConfig } from 'src/modules/config/sagas/utils/loadConfig';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* configFetchSaga(): SagaIterator {\n try {\n yield* call(logDebug, 'Fetching configuration...');\n yield* put(CONFIG_FETCH.pending());\n\n const config = yield* call(loadConfig);\n\n yield* call(logDebug, 'Fetching configuration... done', config);\n yield* put(CONFIG_FETCH.success(config));\n } catch (error) {\n yield* call(sentryCatch, error);\n\n yield* call(logError, 'Fetching configuration... error', { error });\n yield* put(CONFIG_FETCH.failure(NativeError.wrap(error)));\n }\n}\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { getPreferredLocale } from 'src/modules/common/utils/locale';\nimport { CONFIG_LANGUAGE_SWITCH } from 'src/modules/config/actions/ConfigActions';\nimport { loadTranslations } from 'src/modules/config/sagas/utils/loadTranslations';\nimport { saveLanguage } from 'src/modules/config/sagas/utils/saveLanguage';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { hideLoadingIndicator, showLoadingIndicator } from 'src/modules/loader/sagas/utils/loadingIndicator';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* configLanguageSwitchSaga(\n action: GetRequestActionType,\n): SagaIterator {\n const language = action.data;\n const loaderKey = 'language-switch';\n try {\n yield* call(showLoadingIndicator, loaderKey);\n\n yield* call(logDebug, `Switching language to \"${language}\"...`);\n yield* put(CONFIG_LANGUAGE_SWITCH.pending());\n\n const locale = yield* call(getPreferredLocale);\n const translations = yield* call(loadTranslations, language);\n yield* call(saveLanguage, language);\n\n yield* call(logDebug, `Switching language to \"${language}\"... done`);\n yield* put(CONFIG_LANGUAGE_SWITCH.success({ locale, language, translations }));\n } catch (error) {\n yield* call(sentryCatch, error);\n\n yield* call(logError, `Switching language to \"${language}\"... error`, { error });\n yield* put(CONFIG_LANGUAGE_SWITCH.failure(NativeError.wrap(error)));\n } finally {\n yield* call(hideLoadingIndicator, loaderKey);\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { CONFIG_FETCH, CONFIG_LANGUAGE_SWITCH } from 'src/modules/config/actions/ConfigActions';\nimport { configFetchSaga } from 'src/modules/config/sagas/configFetchSaga';\nimport { configLanguageSwitchSaga } from 'src/modules/config/sagas/configLanguageSwitchSaga';\nimport { takeLatest } from 'typed-redux-saga';\n\nexport function* configSaga(): SagaIterator {\n yield* takeLatest(CONFIG_FETCH.isRequest, configFetchSaga);\n yield* takeLatest(CONFIG_LANGUAGE_SWITCH.isRequest, configLanguageSwitchSaga);\n}\n","import { SagaIterator } from 'redux-saga';\nimport { call as callEffect } from 'redux-saga/effects';\nimport { loadContainers } from 'src/modules/config/sagas/utils/loadContainers';\nimport { loadDevices } from 'src/modules/config/sagas/utils/loadDevices';\nimport { loadEnvironment } from 'src/modules/config/sagas/utils/loadEnvironment';\nimport { loadHvacConfig } from 'src/modules/config/sagas/utils/loadHvacConfig';\nimport { loadLanguage } from 'src/modules/config/sagas/utils/loadLanguage';\nimport { loadLocale } from 'src/modules/config/sagas/utils/loadLocale';\nimport { loadSchemas } from 'src/modules/config/sagas/utils/loadSchemas';\nimport { loadTranslations } from 'src/modules/config/sagas/utils/loadTranslations';\nimport { ConfigData } from 'src/modules/config/types/ConfigData';\nimport { sentryInit } from 'src/modules/config/utils/sentryInit';\nimport { all, call } from 'typed-redux-saga';\n\nexport function* loadConfig(): SagaIterator {\n const currentDate = new Date();\n const environment = yield* call(loadEnvironment);\n\n // init Sentry as soon as possible\n yield* call(sentryInit, environment);\n\n const locale = yield* call(loadLocale);\n const language = yield* call(loadLanguage, environment.languages);\n const translations = yield* call(loadTranslations, language);\n const { hvac, schemas, devices, containers } = yield* all({\n hvac: callEffect(loadHvacConfig),\n schemas: callEffect(loadSchemas),\n devices: callEffect(loadDevices),\n containers: callEffect(loadContainers),\n });\n\n return {\n environment: environment,\n currentDate: currentDate,\n hvac: hvac,\n schemas: schemas,\n devices: devices,\n containers: containers,\n i18n: {\n locale,\n language,\n translations,\n },\n };\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { array } from 'io-ts/Decoder';\nimport { SagaIterator } from 'redux-saga';\nimport { HttpError } from 'src/errors/HttpError';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { CONFIG_CONTAINER } from 'src/modules/config/codecs/ConfigContainer';\nimport { ConfigContainer } from 'src/modules/config/types/ConfigContainer';\nimport { call } from 'typed-redux-saga';\n\nexport function* loadContainers(): SagaIterator {\n try {\n const response = yield* call(fetch, '/configs/containers.json', {\n method: 'GET',\n redirect: 'error',\n credentials: 'omit',\n });\n if (!response.ok) {\n throw new HttpError(response);\n }\n\n const content: unknown = yield* call({\n fn: response.json,\n context: response,\n });\n return yield* call(\n decodeOrThrow,\n array(CONFIG_CONTAINER),\n content,\n );\n } catch (error) {\n throw new RuntimeError('Could not fetch schema containers', {}, NativeError.wrap(error));\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { array } from 'io-ts/Decoder';\nimport { SagaIterator } from 'redux-saga';\nimport { HttpError } from 'src/errors/HttpError';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { CONFIG_DEVICE } from 'src/modules/config/codecs/ConfigDevice';\nimport { ConfigDevice } from 'src/modules/config/types/ConfigDevice';\nimport { call } from 'typed-redux-saga';\n\nexport function* loadDevices(): SagaIterator {\n try {\n const response = yield* call(fetch, '/configs/devices.json', {\n method: 'GET',\n redirect: 'error',\n credentials: 'omit',\n });\n if (!response.ok) {\n throw new HttpError(response);\n }\n\n const content: unknown = yield* call({\n fn: response.json,\n context: response,\n });\n return yield* call(\n decodeOrThrow,\n array(CONFIG_DEVICE),\n content,\n );\n } catch (error) {\n throw new RuntimeError('Could not fetch schema devices', {}, NativeError.wrap(error));\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { HttpError } from 'src/errors/HttpError';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { ENVIRONMENT } from 'src/modules/config/codecs/Environment';\nimport { Environment } from 'src/types/Environment';\nimport { call } from 'typed-redux-saga';\n\nexport function* loadEnvironment(): SagaIterator {\n try {\n const response = yield* call(fetch, '/environment.json', {\n method: 'GET',\n redirect: 'error',\n credentials: 'omit',\n });\n if (!response.ok) {\n throw new HttpError(response);\n }\n\n const content: unknown = yield* call({\n fn: response.json,\n context: response,\n });\n return yield* call(\n decodeOrThrow,\n ENVIRONMENT,\n content,\n );\n } catch (error) {\n throw new RuntimeError('Could not fetch environment file', {}, NativeError.wrap(error));\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { HttpError } from 'src/errors/HttpError';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { CONFIG_HVAC } from 'src/modules/config/codecs/ConfigHvac';\nimport { ConfigHvac } from 'src/modules/config/types/ConfigHvac';\nimport { call } from 'typed-redux-saga';\n\nexport function* loadHvacConfig(): SagaIterator {\n try {\n const response = yield* call(fetch, '/configs/hvac.json', {\n method: 'GET',\n redirect: 'error',\n credentials: 'omit',\n });\n if (!response.ok) {\n throw new HttpError(response);\n }\n\n const content: unknown = yield* call({\n fn: response.json,\n context: response,\n });\n return yield* call(\n decodeOrThrow,\n CONFIG_HVAC,\n content,\n );\n } catch (error) {\n throw new RuntimeError('Could not fetch HVAC configuration file', {}, NativeError.wrap(error));\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { getPreferredLanguage } from 'src/modules/common/utils/language';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { storageGet } from 'src/sagas/utils/storage';\nimport { Language } from 'src/types/common/Language';\nimport { call } from 'typed-redux-saga';\n\nexport function* loadLanguage(environmentLanguages: ReadonlyArray): SagaIterator {\n const preferred = yield* call(getPreferredLanguage, environmentLanguages);\n\n try {\n yield* call(logDebug, 'Loading user language...');\n\n const stored = yield* call(storageGet, 'language');\n const language = environmentLanguages.find(\n (environmentLanguage) => environmentLanguage === stored,\n ) || preferred;\n\n yield* call(logDebug, 'Loading user language... done', language);\n return language;\n } catch (error) {\n yield* call(logError, 'Loading user language... error', error);\n yield* call(sentryCatch, new RuntimeError('Could not load user language', {}, NativeError.wrap(error)));\n\n return preferred;\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { getPreferredLocale } from 'src/modules/common/utils/locale';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { Locale } from 'src/types/common/Locale';\nimport { call } from 'typed-redux-saga';\n\nexport function* loadLocale(): SagaIterator {\n try {\n yield* call(logDebug, 'Loading user locale...');\n const locale = yield* call(getPreferredLocale);\n\n yield* call(logDebug, 'Loading user locale... done', locale);\n return locale;\n } catch (error) {\n const wrapped = new RuntimeError('Could not load user locale', {}, NativeError.wrap(error));\n\n yield* call(logError, 'Loading user locale... error', error);\n yield* call(sentryCatch, wrapped);\n\n throw wrapped;\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { array } from 'io-ts/Decoder';\nimport { SagaIterator } from 'redux-saga';\nimport { HttpError } from 'src/errors/HttpError';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { CONFIG_SCHEMA } from 'src/modules/config/codecs/ConfigSchema';\nimport { ConfigSchema } from 'src/modules/config/types/ConfigSchema';\nimport { call } from 'typed-redux-saga';\n\nexport function* loadSchemas(): SagaIterator {\n try {\n const response = yield* call(fetch, '/configs/schemas.json', {\n method: 'GET',\n redirect: 'error',\n credentials: 'omit',\n });\n if (!response.ok) {\n throw new HttpError(response);\n }\n\n const content: unknown = yield* call({\n fn: response.json,\n context: response,\n });\n return yield* call(\n decodeOrThrow,\n array(CONFIG_SCHEMA),\n content,\n );\n } catch (error) {\n throw new RuntimeError('Could not fetch schema templates', {}, NativeError.wrap(error));\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { pipe } from 'fp-ts/function';\nimport { filter } from 'fp-ts/ReadonlyRecord';\nimport * as D from 'io-ts/Decoder';\nimport { SagaIterator } from 'redux-saga';\nimport { HttpError } from 'src/errors/HttpError';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { Translations } from 'src/modules/config/types/Translations';\nimport { Language } from 'src/types/common/Language';\nimport { isNotNull } from 'src/utils/guard';\nimport { call } from 'typed-redux-saga';\n\nexport function* loadTranslations(language: Language): SagaIterator {\n try {\n const response = yield* call(fetch, `/translations/${encodeURIComponent(language)}.json`, {\n method: 'GET',\n redirect: 'error',\n credentials: 'omit',\n });\n if (!response.ok) {\n throw new HttpError(response);\n }\n\n const content: unknown = yield* call({\n fn: response.json,\n context: response,\n });\n const translations = yield* call(\n decodeOrThrow,\n D.record(D.nullable(D.string)),\n content,\n );\n return pipe(\n translations,\n filter(isNotNull),\n );\n } catch (error) {\n throw new RuntimeError('Could not fetch translations', { language }, NativeError.wrap(error));\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { LANGUAGE } from 'src/modules/common/codecs/Language';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { storageSet } from 'src/sagas/utils/storage';\nimport { Language } from 'src/types/common/Language';\nimport { call } from 'typed-redux-saga';\n\nexport function* saveLanguage(language: Language): SagaIterator {\n try {\n yield* call(logDebug, 'Saving user language...', language);\n\n const stored = yield* call(LANGUAGE.encode, language);\n yield* call(storageSet, 'language', stored);\n\n yield* call(logDebug, 'Saving user language... done', language);\n } catch (error) {\n const wrapped = new RuntimeError('Could not save user language', { language }, NativeError.wrap(error));\n\n yield* call(logError, 'Saving user language... error', error);\n yield* call(sentryCatch, wrapped);\n throw wrapped;\n }\n}\n","import { createSelector } from 'reselect';\nimport { getConfigData } from 'src/modules/config/selectors/getConfigData';\n\nexport const getApiBaseUrl = createSelector([\n getConfigData,\n], (config) => config.environment.apiBaseUrl);\n","import { createSelector } from 'reselect';\nimport { getConfigState } from 'src/modules/config/selectors/getConfigState';\nimport { assertNever } from 'src/utils/assert';\n\nexport const getConfigData = createSelector([\n getConfigState,\n], (state) => {\n if (state.data.state === 'success') {\n return state.data.value;\n }\n\n return assertNever('Config data is not initialed yet', { state });\n});\n","import { createSelector } from 'reselect';\nimport { getConfigData } from 'src/modules/config/selectors/getConfigData';\n\nexport const getConfigSchemas = createSelector([\n getConfigData,\n], (config) => config.schemas);\n","import { ConfigState } from 'src/modules/config/types/ConfigState';\nimport { RootState } from 'src/types/RootState';\n\nexport function getConfigState(state: RootState): ConfigState {\n return state.config;\n}\n","import { createSelector } from 'reselect';\nimport { getConfigData } from 'src/modules/config/selectors/getConfigData';\n\nexport const getCurrentDate = createSelector([\n getConfigData,\n], (config) => config.currentDate);\n","import { createSelector } from 'reselect';\nimport { getConfigData } from 'src/modules/config/selectors/getConfigData';\n\nexport const getEnvironmentLanguages = createSelector([\n getConfigData,\n], (config) => config.environment.languages);\n","import { createSelector } from 'reselect';\nimport { getConfigData } from 'src/modules/config/selectors/getConfigData';\n\nexport const getConfigHvac = createSelector([\n getConfigData,\n], (config) => config.hvac);\n","import { createSelector } from 'reselect';\nimport { getConfigData } from 'src/modules/config/selectors/getConfigData';\n\nexport const getLanguage = createSelector([\n getConfigData,\n], (config) => config.i18n.language);\n","import { createSelector } from 'reselect';\nimport { getConfigData } from 'src/modules/config/selectors/getConfigData';\n\nexport const getLocale = createSelector([\n getConfigData,\n], (config) => config.i18n.locale);\n","import { FormatIcu } from '@artshell/tolgee-format-icu-jsx-param';\nimport { LogicError } from '@belimo-retrofit-portal/logic';\nimport { Tolgee } from '@tolgee/react';\nimport { createSelector } from 'reselect';\nimport { getConfigData } from 'src/modules/config/selectors/getConfigData';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\n\nexport const getTolgeeInstance = createSelector([\n getConfigData,\n], ({ i18n }) => Tolgee()\n .use(FormatIcu())\n .init({\n language: i18n.language,\n staticData: {\n [i18n.language]: i18n.translations,\n },\n\n onTranslationMissing: (info) => {\n const error = new LogicError(`Missing translation \"${i18n.language}:${info.key}\"`);\n sentryCatch(error);\n\n return info.key;\n },\n onFormatError: (details, info) => {\n const error = new LogicError(`Invalid translation \"${i18n.language}:${info.key}\" (${details})`);\n sentryCatch(error);\n\n return info.key;\n },\n }));\n","import { createSelector } from 'reselect';\nimport { getTolgeeInstance } from 'src/modules/config/selectors/getTolgeeInstance';\nimport { Translator } from 'src/modules/config/types/Translator';\n\nexport const getTranslator = createSelector([\n getTolgeeInstance,\n], (tolgee): Translator => (key, values) => tolgee.t(key, values));\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport { captureException, withScope } from '@sentry/browser';\n\nexport function sentryCatch(error: unknown): void {\n withScope((scope) => {\n // TODO: don't we need a user info here?\n const context = NativeError.wrap(error).toJSON();\n\n scope.setExtra('error_context', context);\n captureException(error);\n });\n}\n","import {\n init,\n BrowserTracing,\n makeBrowserOfflineTransport,\n makeFetchTransport,\n HttpContext,\n Breadcrumbs,\n GlobalHandlers,\n LinkedErrors,\n} from '@sentry/browser';\nimport { ExtraErrorData } from '@sentry/integrations';\nimport { BaseTransportOptions } from '@sentry/types/types/transport';\nimport escapeStringRegexp from 'escape-string-regexp';\nimport { Environment } from 'src/types/Environment';\n\nexport function sentryInit(environment: Environment): void {\n if (environment.sentryDsn === '') {\n return;\n }\n\n init({\n dsn: environment.sentryDsn,\n environment: environment.sentryEnv,\n release: process.env.SENTRY_RELEASE,\n transport: makeBrowserOfflineTransport((options: BaseTransportOptions) => makeFetchTransport({\n ...options,\n // masking sentry_key because adblockers use it for blocking sentry\n url: options.url.replace(/sentry_key/, 'xauth'),\n })),\n tracePropagationTargets: [\n new RegExp(`^${escapeStringRegexp(environment.apiBaseUrl)}`),\n ],\n\n debug: false,\n enabled: true,\n\n normalizeDepth: 0,\n maxValueLength: 100_000,\n\n defaultIntegrations: false,\n integrations: [\n new HttpContext(),\n new Breadcrumbs({\n dom: true,\n xhr: true,\n fetch: true,\n console: true,\n history: true,\n sentry: true,\n }),\n new GlobalHandlers({\n onerror: true,\n onunhandledrejection: true,\n }),\n new ExtraErrorData({\n depth: 1_000,\n }),\n new LinkedErrors({\n key: 'previous',\n limit: 100,\n }),\n new BrowserTracing({\n traceXHR: true,\n traceFetch: true,\n enableHTTPTimings: true,\n }),\n ],\n\n tracesSampleRate: 1.0,\n });\n}\n","import './ErrorBoundary.scss';\nimport { BaseError, NativeError } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { ErrorMessage } from 'src/modules/error/views/ErrorMessage';\n\ntype Props = {\n readonly children: React.ReactNode;\n};\ntype State = {\n readonly error: BaseError | undefined;\n readonly errorInfo: React.ErrorInfo | undefined;\n};\n\nexport class ErrorBoundary extends React.Component {\n public readonly state: State = {\n error: undefined,\n errorInfo: undefined,\n };\n\n public componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void {\n sentryCatch(error);\n\n this.setState(() => ({\n error: NativeError.wrap(error),\n errorInfo: errorInfo,\n }));\n }\n\n public render(): React.ReactNode {\n const { error, errorInfo } = this.state;\n if (!error || !errorInfo) {\n const { children } = this.props;\n return children;\n }\n\n return (\n
\n \n
\n );\n }\n}\n","import './ErrorPage.scss';\nimport { BaseError } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { useIntl } from 'react-intl';\nimport { isHttpError } from 'src/modules/api/utils/isHttpError';\nimport { ErrorView } from 'src/modules/error/views/ErrorView';\nimport { RouteNotFoundError } from 'src/modules/routing/errors/RouteNotFoundError';\n\ntype Props = {\n readonly error: BaseError;\n};\n\nexport const ErrorPage = ({ error }: Props): React.ReactElement => {\n const intl = useIntl();\n\n return (\n <>\n \n \n {intl.formatMessage({ id: 'errorPage/title' })}\n \n \n\n
\n {error instanceof RouteNotFoundError\n ? \n : isHttpError(error, 404)\n ? \n : isHttpError(error, 401)\n ? \n : }\n
\n \n );\n};\n","import './ErrorMessage.scss';\nimport { BaseError } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\n\ntype Props = {\n readonly error: BaseError;\n readonly errorInfo: React.ErrorInfo | undefined;\n};\n\nexport const ErrorMessage = ({ error, errorInfo }: Props): React.ReactElement => (\n
\n \n
\n);\n\nconst ErrorBlock = ({ error, errorInfo } : Props): React.ReactElement => (\n
\n
\n {error.name}. {error.message}\n
\n\n
\n Error\n
\n        {JSON.stringify(error, null, 2)}\n      
\n
\n\n
\n Stack\n
\n        {error.stack}\n      
\n
\n\n {errorInfo && (\n
\n Components\n
\n          {errorInfo.componentStack}\n        
\n
\n )}\n\n {error.previous && (\n
\n \n
\n )}\n
\n);\n","import './ErrorView.scss';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\n\ntype ErrorCode = 404 | 500 | 401;\n\ntype Props = {\n errorCode: ErrorCode;\n};\n\nexport const ErrorView = ({ errorCode }: Props): React.ReactElement => (\n
\n

\n {errorCode}\n

\n\n
\n \n
\n\n

\n \n

\n\n \n \n\n
\n \n
\n \n
\n);\n","import { ProjectEvaluation } from '@belimo-retrofit-portal/logic';\nimport { createTrigger } from 'src/utils/createTrigger';\n\nexport const EVALUATION_CHANGE = createTrigger('EVALUATION_CHANGE');\n","import React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { useAction } from 'src/hooks/useAction';\nimport { useBoundAction } from 'src/hooks/useBoundAction';\nimport { useParametricSelector } from 'src/hooks/useParametricSelector';\nimport { ProjectToolbar } from 'src/modules/common/components/ProjectToolbar';\nimport { AppLayout } from 'src/modules/common/layouts/AppLayout';\nimport { EVALUATION_CHANGE } from 'src/modules/evaluation/actions/EvaluationActions';\nimport { getEvaluationFormData } from 'src/modules/evaluation/selectors/getEvaluationFormData';\nimport { getEvaluationResults } from 'src/modules/evaluation/selectors/getEvaluationResults';\nimport { EvaluationScreen } from 'src/modules/evaluation/views/EvaluationScreen';\nimport { getProjectDetails } from 'src/modules/project-view/selectors/getProjectDetails';\nimport { getReportCurrency } from 'src/modules/report/selectors/getReportCurrency';\nimport { SHARE_PROJECT_OPEN } from 'src/modules/sharing-projects/actions/ShareProjectActions';\nimport { ShareProject } from 'src/modules/sharing-projects/containers/ShareProject';\n\nexport const EvaluationPage = (): React.ReactElement => {\n const intl = useIntl();\n const project = useSelector(getProjectDetails);\n const currency = useParametricSelector(getReportCurrency, project);\n const results = useParametricSelector(getEvaluationResults, project);\n const formData = useParametricSelector(getEvaluationFormData, project);\n const saveForm = useAction(EVALUATION_CHANGE.trigger);\n const shareProject = useBoundAction(SHARE_PROJECT_OPEN.trigger, project);\n\n return (\n <>\n \n \n {intl.formatMessage({ id: 'evaluation/pageTitle' })}\n \n \n\n \n \n \n \n\n \n \n );\n};\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { Project } from 'src/modules/common/types/Project';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { EVALUATION_CHANGE } from 'src/modules/evaluation/actions/EvaluationActions';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { syncProjectBackground } from 'src/modules/project-sync/sagas/utils/syncProjectBackground';\nimport { getProjectDetails } from 'src/modules/project-view/selectors/getProjectDetails';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetTriggerActionType } from 'src/utils/createTrigger';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* evaluationChangeSaga(\n action: GetTriggerActionType,\n): SagaIterator {\n const formData = action.data;\n\n try {\n yield* call(logDebug, 'Saving evaluation data...', formData);\n\n const previous = yield* select(getProjectDetails);\n const modified: Project = {\n ...previous,\n data: {\n ...previous.data,\n evaluation: formData,\n },\n };\n\n const reloaded = yield* call(syncProjectBackground, modified);\n yield* call(logDebug, 'Saving evaluation data... done', reloaded);\n } catch (error) {\n const wrapped = new RuntimeError('Could not save evaluation data', { formData }, NativeError.wrap(error));\n yield* call(logError, 'Saving evaluation data... error', error);\n\n yield* call(sentryCatch, wrapped);\n yield* call(showNotification, { variant: 'error', type: 'error' });\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { EVALUATION_CHANGE } from 'src/modules/evaluation/actions/EvaluationActions';\nimport { evaluationChangeSaga } from 'src/modules/evaluation/sagas/evaluationChangeSaga';\nimport { takeLatest } from 'typed-redux-saga';\n\nexport function* evaluationSaga(): SagaIterator {\n yield* takeLatest(EVALUATION_CHANGE.is, evaluationChangeSaga);\n}\n","import { createSelector } from 'reselect';\nimport { getProjectLazy } from 'src/modules/common/selectors/getProjectLazy';\n\nexport const getEvaluationFormData = createSelector([\n getProjectLazy,\n], (project) => project.data.evaluation);\n","import { EvaluationResults, getEvaluationResults as API } from '@belimo-retrofit-portal/logic';\nimport { createSelector } from 'reselect';\nimport { getProjectLazy } from 'src/modules/common/selectors/getProjectLazy';\n\nexport const getEvaluationResults = createSelector([\n getProjectLazy,\n], (project): EvaluationResults => API(project.data));\n","import './EvaluationFormView.scss';\nimport { ProjectEvaluation, CurrencyCode } from '@belimo-retrofit-portal/logic';\nimport { FormController } from '@form-ts/core';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { CurrencySymbol } from 'src/modules/common/components/CurrencySymbol';\nimport { TileCard } from 'src/modules/common/components/TileCard';\nimport { DECIMAL_PLACES, MAX_TRILLION } from 'src/modules/common/constants/decimal';\nimport { sub, sup } from 'src/modules/common/constants/formattingHelpers';\nimport { DecimalField } from 'src/modules/form/components/DecimalField';\nimport { TextAreaField } from 'src/modules/form/components/TextAreaField';\nimport { FormError } from 'src/modules/form/types/FormError';\n\ntype Props = {\n readonly form: FormController;\n readonly currency: CurrencyCode;\n};\n\nexport const EvaluationFormView = ({ form, currency }: Props): React.ReactElement => (\n
\n \n )}\n >\n
\n }\n endAdornment={}\n helperText={(\n \n )}\n />\n
\n\n
\n \n )}\n endAdornment={(\n }}\n />\n )}\n />\n
\n
\n\n }>\n
\n }\n rows={6}\n maxLength={280}\n showHint={true}\n />\n
\n
\n
\n);\n","import './EvaluationResultsCharts.scss';\nimport { CurrencyCode, EvaluationResults } from '@belimo-retrofit-portal/logic';\nimport { Information } from '@carbon/icons-react';\nimport { Tooltip } from '@carbon/react';\nimport { Decimal } from 'decimal.js-light';\nimport React, { useMemo } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { useParametricSelector } from 'src/hooks/useParametricSelector';\nimport { FormattedBEP } from 'src/modules/common/components/FormattedBEP';\nimport { FormattedMathMessage } from 'src/modules/common/components/FormattedMathMessage';\nimport { FormattedValue } from 'src/modules/common/components/FormattedValue';\nimport { SavingTileAmount } from 'src/modules/common/components/SavingTileAmount';\nimport { TileCard } from 'src/modules/common/components/TileCard';\nimport { sub, sup } from 'src/modules/common/constants/formattingHelpers';\nimport { EvaluationResultsChartsGraphBEP } from 'src/modules/evaluation/views/EvaluationResultsChartsGraphBEP';\nimport { EvaluationResultsChartsGraphCO2 } from 'src/modules/evaluation/views/EvaluationResultsChartsGraphCO2';\nimport { EvaluationResultsChartsGraphIRR } from 'src/modules/evaluation/views/EvaluationResultsChartsGraphIRR';\nimport { EvaluationResultsChartsGraphROI } from 'src/modules/evaluation/views/EvaluationResultsChartsGraphROI';\nimport { getHvacAssesmentFormData } from 'src/modules/hvac/selectors/getHvacAssesmentFormData';\nimport { getProjectDetails } from 'src/modules/project-view/selectors/getProjectDetails';\n\ntype Props = {\n readonly results: EvaluationResults;\n readonly currency: CurrencyCode;\n};\n\nexport const EvaluationResultsCharts = ({ results, currency }: Props): React.ReactElement => {\n const intl = useIntl();\n\n const project = useSelector(getProjectDetails);\n const hvacAssessmentFormData = useParametricSelector(getHvacAssesmentFormData, project);\n\n const isOnlyOneAreaEnabled = useMemo(() => {\n const { heating, cooling, ventilation } = hvacAssessmentFormData;\n\n return [heating.enabled, cooling.enabled, ventilation.enabled].filter(Boolean).length === 1;\n }, [hvacAssessmentFormData]);\n\n const areCostExclSavingsNegative = (results.savings.costExclCO2?.overall &&\n !results.savings.costExclCO2?.overall?.isPositive()) ||\n false;\n const isInvestmentEmpty = Boolean(\n results.savings.costExclCO2?.overall?.isPositive() &&\n (project.data.evaluation.investmentAmount === null ||\n project.data.evaluation.investmentAmount?.isZero()),\n );\n\n return (\n
\n
\n \n )}\n subtitle={}\n >\n \n\n
\n
\n
\n \n )}\n amount={}\n unit={(\n \n )}\n />\n
\n\n {results.charts.BEP?.years.inclCO2 && (\n
\n \n )}\n amount={}\n unit={(\n \n )}\n />\n
\n )}\n
\n
\n \n\n \n )}\n subtitle={(\n \n )}\n >\n \n )}\n />\n \n
\n\n
\n \n \n\n }\n >\n \n \n
\n )}\n subtitle={(\n \n )}\n >\n \n\n
\n \n \n \n \n \n {results.charts.ROI?.some((it) => it.value.inclCO2) && (\n \n )}\n \n \n\n \n {!areCostExclSavingsNegative && results.charts.ROI !== null && results.charts.ROI.map((it) => (\n \n {it.year.toString().padStart(2, '0')}\n \n\n \n \n \n\n {it.value.inclCO2 && (\n \n \n \n )}\n \n ))}\n {(areCostExclSavingsNegative || results.charts.ROI === null) && NO_AREA_DATA.map((it) => (\n \n {it.year.toString().padStart(2, '0')}\n \n\n \n \n \n\n {it.inclCO2 && (\n \n \n \n )}\n \n ))}\n \n
\n \n \n \n \n \n
\n
\n \n\n \n \n\n }\n >\n \n \n
\n )}\n subtitle={(\n \n )}\n >\n \n\n
\n \n \n \n \n \n {results.charts.IRR?.some((it) => it.value.inclCO2) && (\n \n )}\n \n \n\n \n {!areCostExclSavingsNegative && results.charts.IRR !== null && results.charts.IRR.map((it) => (\n \n {it.year.toString().padStart(2, '0')}\n \n\n \n \n \n\n {it.value.inclCO2 && (\n \n \n \n )}\n \n ))}\n {(areCostExclSavingsNegative || results.charts.IRR === null) && NO_AREA_DATA.map((it) => (\n \n {it.year.toString().padStart(2, '0')}\n \n\n \n \n \n\n {it.inclCO2 && (\n \n \n \n )}\n \n ))}\n \n
\n \n \n \n \n \n
\n
\n \n \n \n );\n};\n\nconst NO_AREA_DATA = [\n new Decimal(1),\n new Decimal(2),\n new Decimal(3),\n new Decimal(4),\n new Decimal(5),\n new Decimal(10),\n new Decimal(20),\n].map((year) => ({\n year: year,\n exclCO2: null,\n inclCO2: null,\n}));\n","import './EvaluationResultsChartsGraph.scss';\nimport { EvaluationResultsChartsSeria } from '@belimo-retrofit-portal/logic';\nimport { Decimal } from 'decimal.js-light';\nimport { ReadonlyRecord } from 'fp-ts/ReadonlyRecord';\nimport React, { memo, useCallback, useMemo, useState } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport {\n Area,\n AreaChart,\n CartesianGrid,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from 'recharts';\nimport { NameType, ValueType } from 'recharts/types/component/DefaultTooltipContent';\nimport { TooltipProps } from 'recharts/types/component/Tooltip';\nimport { FormattedNumber } from 'src/modules/common/components/FormattedNumber';\nimport { EvaluationResultsChartsXTick } from 'src/modules/evaluation/views/EvaluationResultsChartsXTick';\nimport { isNotNull } from 'src/utils/guard';\n\ntype Props = {\n readonly data: EvaluationResultsChartsSeria | null;\n readonly labels: ReadonlyRecord<'year' | 'exclCO2' | 'inclCO2', React.ReactNode>;\n readonly xAxisLabel?: string;\n readonly yAxisLabel?: string;\n readonly interactive: boolean;\n readonly areCostSavingsExcludedNegative: boolean;\n readonly isInvestmentEmpty: boolean;\n};\n\nexport const EvaluationResultsChartsGraphArea = memo((\n { data, labels, xAxisLabel, yAxisLabel, interactive, areCostSavingsExcludedNegative, isInvestmentEmpty }: Props,\n) => {\n const chartData = useMemo(() => {\n if (data === null) {\n return [];\n }\n\n return data.map((point) => ({\n year: point.year.toNumber(),\n exclCO2: point.value.exclCO2.mul(100).toDecimalPlaces(1).toNumber(),\n inclCO2: point.value.inclCO2\n ? point.value.inclCO2.mul(100).toDecimalPlaces(1).toNumber()\n : null,\n }));\n }, [data]);\n\n const [isChartReady, setChartReady] = useState(chartData.length === 0);\n\n const yStep = useMemo(() => (data ? getYStep(data) : 20), [data]);\n const yDomain = useMemo(() => {\n if (data === null) {\n return [-80, +20];\n }\n\n const roundMin = (v: Decimal): Decimal => v.div(yStep).sub(0.25).toDecimalPlaces(0, Decimal.ROUND_FLOOR).mul(yStep);\n const roundMax = (v: Decimal): Decimal => v.div(yStep).add(0.25).toDecimalPlaces(0, Decimal.ROUND_CEIL).mul(yStep);\n\n const filteredCO2Included = data.map((it) => (it.value.inclCO2)).filter(isNotNull);\n\n const domainMin = Math.min(\n Number.POSITIVE_INFINITY,\n ...filteredCO2Included.map((decimal) => roundMin(decimal.mul(100)).toNumber()),\n ...data.map((it) => roundMin(it.value.exclCO2.mul(100)).toNumber()),\n );\n const domainMax = Math.max(\n Number.NEGATIVE_INFINITY,\n ...filteredCO2Included.map((decimal) => roundMax(decimal.mul(100)).toNumber()),\n ...data.map((it) => roundMax(it.value.exclCO2.mul(100)).toNumber()),\n );\n\n return [\n domainMin,\n domainMax,\n ];\n }, [data, yStep]);\n\n const yTicks = useMemo(() => {\n const [min, max] = yDomain;\n return Array.from({ length: (max - min) / yStep + 1 }, (_, i) => min + i * yStep);\n }, [yStep, yDomain]);\n\n const renderTooltip = useCallback((props: TooltipProps) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const { label } = props;\n\n const value = chartData.find((it) => it.year === label);\n if (value === undefined) {\n return null;\n }\n\n return (\n
\n
\n \n
\n {labels.year}\n
\n
\n \n
\n
\n
\n \n
\n {labels.exclCO2}\n
\n
\n \n
\n
\n {value.inclCO2 && (\n
\n \n
\n {labels.inclCO2}\n
\n
\n \n
\n
\n )}\n
\n );\n }, [chartData, labels]);\n\n const renderLegend = useMemo(() => (\n
\n
\n
\n \n\n
\n {labels.exclCO2}\n
\n
\n {data?.some((it) => it.value.inclCO2) && (\n
\n \n\n
\n {labels.inclCO2}\n
\n
\n )}\n
\n
\n ), [labels, data]);\n\n const renderNotification = useMemo(() => {\n if (areCostSavingsExcludedNegative) {\n return (\n
\n \n
\n );\n }\n\n if (isInvestmentEmpty) {\n return (\n
\n \n
\n );\n }\n\n return null;\n }, [areCostSavingsExcludedNegative, isInvestmentEmpty]);\n\n return (\n
\n
\n {renderNotification}\n\n \n \n \n\n it.year)}\n tick={EvaluationResultsChartsXTick}\n fontSize={12}\n />\n\n \n\n {interactive && (\n \n )}\n\n setChartReady(true)}\n dataKey=\"exclCO2\"\n fill={COLORS.exclCO2}\n fillOpacity={0.25}\n stroke={COLORS.exclCO2}\n strokeWidth={2}\n strokeOpacity={1}\n baseValue=\"dataMin\"\n dot={{\n fill: COLORS.exclCO2,\n fillOpacity: 1,\n stroke: COLORS.exclCO2,\n strokeWidth: 4,\n }}\n activeDot={{\n fill: COLORS.exclCO2,\n fillOpacity: 1,\n stroke: COLORS.exclCO2,\n strokeWidth: 5,\n }}\n />\n\n setChartReady(true)}\n dataKey=\"inclCO2\"\n fill={COLORS.inclCO2}\n fillOpacity={0.25}\n stroke={COLORS.inclCO2}\n strokeWidth={2}\n strokeOpacity={1}\n baseValue=\"dataMin\"\n dot={{\n fill: COLORS.inclCO2,\n fillOpacity: 1,\n stroke: COLORS.inclCO2,\n strokeWidth: 4,\n }}\n activeDot={{\n fill: COLORS.inclCO2,\n fillOpacity: 1,\n stroke: COLORS.inclCO2,\n strokeWidth: 5,\n }}\n />\n \n \n\n {renderLegend}\n\n
\n

\n {yAxisLabel}\n

\n
\n\n
\n

\n {xAxisLabel}\n

\n
\n
\n
\n );\n});\n\nconst COLORS = {\n exclCO2: '#375F80',\n inclCO2: '#632E5B',\n};\n\nfunction getYStep(data: EvaluationResultsChartsSeria): number {\n const filteredCO2Included = data.map((it) => it.value.inclCO2).filter(isNotNull);\n\n const min = Math.min(\n Number.POSITIVE_INFINITY,\n ...filteredCO2Included.map((decimal) => decimal.mul(100).toNumber()),\n ...data.map((it) => it.value.exclCO2.mul(100).toNumber()),\n );\n const max = Math.max(\n Number.NEGATIVE_INFINITY,\n ...filteredCO2Included.map((decimal) => decimal.mul(100).toNumber()),\n ...data.map((it) => it.value.exclCO2.mul(100).toNumber()),\n );\n\n const diff = max - min;\n const pow = Math.max(1, 10 ** (Math.ceil(Math.log10(diff)) - 1));\n\n for (const x of [1, 2, 5]) {\n if (diff <= x * pow) {\n return x * pow * 0.1;\n }\n }\n\n return pow;\n}\n\nfunction formatYTick(value: unknown): string {\n if (typeof value !== 'number') {\n return '';\n }\n\n if (value >= 1_000_000_000) {\n return `${(value / 1_000_000).toFixed(0)}G`;\n }\n if (value >= 1_000_000) {\n return `${(value / 1_000_000).toFixed(0)}M`;\n }\n if (value >= 1_000) {\n return `${(value / 1_000).toFixed(0)}k`;\n }\n\n return `${value.toFixed(0)}`;\n}\n","import './EvaluationResultsChartsGraph.scss';\nimport { EvaluationResultsChartsBEP, isNotNull } from '@belimo-retrofit-portal/logic';\nimport { Decimal } from 'decimal.js-light';\nimport React, { memo, useCallback, useMemo, useState } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { CartesianGrid, Line, LineChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';\nimport { NameType, ValueType } from 'recharts/types/component/DefaultTooltipContent';\nimport { TooltipProps } from 'recharts/types/component/Tooltip';\nimport { FormattedNumber } from 'src/modules/common/components/FormattedNumber';\nimport { sub, sup } from 'src/modules/common/constants/formattingHelpers';\nimport { EvaluationResultsChartsXTick } from 'src/modules/evaluation/views/EvaluationResultsChartsXTick';\n\ntype Props = {\n readonly data: EvaluationResultsChartsBEP | null;\n readonly xAxisLabel?: string;\n readonly yAxisLabel?: string;\n readonly interactive: boolean;\n readonly areCostSavingsExcludedNegative: boolean;\n readonly isInvestmentEmpty: boolean;\n};\n\nexport const EvaluationResultsChartsGraphBEP = memo(({\n data,\n xAxisLabel,\n yAxisLabel,\n interactive,\n areCostSavingsExcludedNegative,\n isInvestmentEmpty,\n}: Props) => {\n const chartData = useMemo(() => {\n if (data === null) {\n return [];\n }\n\n return data.values.map((point) => ({\n year: point.year.toNumber(),\n exclCO2: point.value.exclCO2.div(DIVIDER).toNumber(),\n inclCO2: point.value.inclCO2 ? point.value.inclCO2.div(DIVIDER).toNumber() : null,\n investment: data.investment.div(DIVIDER).toNumber(),\n }));\n }, [data]);\n\n const [isChartReady, setChartReady] = useState(chartData.length === 0);\n\n const xDomain = useMemo(() => {\n if (data === null) {\n return [0, 7];\n }\n\n return [\n 0,\n data.values[data.values.length - 1].year\n .toDecimalPlaces(0, Decimal.ROUND_UP).toNumber(),\n ];\n }, [data]);\n\n const xTicks = useMemo(() => {\n const [min, max] = xDomain;\n return Array.from({ length: (max - min) + 1 }, (_, i) => min + i);\n }, [xDomain]);\n\n const yStep = useMemo(() => (data ? getYStep(data) : 50), [data]);\n\n const yDomain = useMemo(() => {\n if (data === null) {\n return [0, 350];\n }\n\n const roundMax = (v: Decimal): Decimal => v.div(yStep).add(0.25).toDecimalPlaces(0, Decimal.ROUND_CEIL).mul(yStep);\n\n const filteredCO2Included = data.values.map((it) => it.value.inclCO2).filter(isNotNull);\n\n const domainMax = Math.max(\n roundMax(data.investment.div(DIVIDER)).toNumber(),\n ...filteredCO2Included.map((decimal) => roundMax(decimal.div(DIVIDER)).toNumber()),\n ...data.values.map((it) => roundMax(it.value.exclCO2.div(DIVIDER)).toNumber()),\n );\n\n return [\n 0,\n Math.max(yStep, domainMax),\n ];\n }, [data, yStep]);\n\n const yTicks = useMemo(() => {\n const [min, max] = yDomain;\n return Array.from({ length: (max - min) / yStep + 1 }, (_, i) => min + i * yStep);\n }, [yStep, yDomain]);\n\n const renderTooltip = useCallback((props: TooltipProps) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const { label } = props;\n\n const value = chartData.find((it) => it.year === label);\n if (value === undefined) {\n return null;\n }\n\n return (\n
\n
\n \n
\n \n
\n
\n \n
\n
\n
\n \n
\n \n
\n
\n \n
\n
\n {value.inclCO2 && (\n
\n \n
\n \n
\n
\n \n
\n
\n )}\n
\n );\n }, [chartData]);\n\n const renderLegend = useMemo(() => (\n
\n
\n
\n \n\n
\n \n
\n
\n
\n \n\n
\n \n
\n
\n {data?.values.some((it) => it.value.inclCO2) && (\n
\n \n\n
\n \n
\n
\n )}\n
\n
\n ), [data?.values]);\n\n const renderNotification = useMemo(() => {\n if (areCostSavingsExcludedNegative) {\n return (\n
\n \n
\n );\n }\n\n if (isInvestmentEmpty) {\n return (\n
\n \n
\n );\n }\n\n return null;\n }, [areCostSavingsExcludedNegative, isInvestmentEmpty]);\n\n return (\n
\n
\n {renderNotification}\n\n \n \n \n\n \n\n \n\n {interactive && (\n \n )}\n\n setChartReady(true)}\n dataKey=\"investment\"\n stroke={COLORS.investment}\n strokeWidth={3}\n strokeOpacity={1}\n dot={false}\n activeDot={false}\n />\n\n setChartReady(true)}\n dataKey=\"exclCO2\"\n stroke={COLORS.exclCO2}\n strokeWidth={3}\n strokeOpacity={1}\n dot={false}\n activeDot={{\n fill: COLORS.exclCO2,\n fillOpacity: 1,\n stroke: COLORS.exclCO2,\n strokeWidth: 5,\n }}\n />\n\n setChartReady(true)}\n dataKey=\"inclCO2\"\n stroke={COLORS.inclCO2}\n strokeWidth={3}\n strokeOpacity={1}\n dot={false}\n activeDot={{\n fill: COLORS.inclCO2,\n fillOpacity: 1,\n stroke: COLORS.inclCO2,\n strokeWidth: 5,\n }}\n />\n \n \n\n {renderLegend}\n\n
\n

\n {yAxisLabel}\n

\n
\n\n
\n

\n {xAxisLabel}\n

\n
\n
\n
\n );\n});\n\nconst COLORS = {\n investment: '#437FA3',\n exclCO2: '#BC7DB3',\n inclCO2: '#BDD2DF',\n};\n\nfunction getYStep(data: EvaluationResultsChartsBEP): number {\n const filteredCO2Included = data.values.map((it) => it.value.inclCO2).filter(isNotNull);\n\n const min = Math.min(\n data.investment.div(DIVIDER).toDecimalPlaces(0).toNumber(),\n ...filteredCO2Included.map((decimal) => decimal.div(DIVIDER).toDecimalPlaces(0).toNumber()),\n ...data.values.map((it) => it.value.exclCO2.div(DIVIDER).toDecimalPlaces(0).toNumber()),\n );\n const max = Math.max(\n data.investment.div(DIVIDER).toDecimalPlaces(0).toNumber(),\n ...filteredCO2Included.map((decimal) => decimal.div(DIVIDER).toDecimalPlaces(0).toNumber()),\n ...data.values.map((it) => it.value.exclCO2.div(DIVIDER).toDecimalPlaces(0).toNumber()),\n );\n\n const diff = max - min;\n const pow = Math.max(2, 10 ** (Math.ceil(Math.log10(diff)) - 1));\n\n for (const x of [1, 2, 5]) {\n if (diff <= x * pow) {\n return x * pow * 0.1;\n }\n }\n\n return pow;\n}\n\nconst DIVIDER = 1_000;\n\nfunction formatYTick(value: unknown): string {\n if (typeof value !== 'number') {\n return '';\n }\n\n return `${value.toFixed(0)}`;\n}\n","import './EvaluationResultsChartsGraph.scss';\nimport { EvaluationResultsChartsCO2, HvacArea } from '@belimo-retrofit-portal/logic';\nimport { Decimal } from 'decimal.js-light';\nimport { literal } from 'io-ts/es6/Guard';\nimport React, { memo, useCallback, useMemo, useState } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { Bar, BarChart, CartesianGrid, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';\nimport { NameType, ValueType } from 'recharts/types/component/DefaultTooltipContent';\nimport { TooltipProps } from 'recharts/types/component/Tooltip';\nimport { SavingsValue } from 'src/modules/common/components/SavingsValue';\nimport { sub, sup } from 'src/modules/common/constants/formattingHelpers';\nimport { EvaluationResultsChartsXTick } from 'src/modules/evaluation/views/EvaluationResultsChartsXTick';\nimport { isNotNull } from 'src/utils/guard';\n\ntype Props = {\n readonly data: EvaluationResultsChartsCO2 | null;\n readonly interactive: boolean;\n readonly shouldDisplayOverallData: boolean;\n readonly yAxisLabel: React.ReactNode;\n};\n\nexport const EvaluationResultsChartsGraphCO2 = memo((\n { data, interactive, shouldDisplayOverallData, yAxisLabel }: Props,\n) => {\n const intl = useIntl();\n\n const areaNames = useMemo(() => ({\n overall: intl.formatMessage({ id: 'evaluation/charts/CO2/values/overall' }),\n heating: intl.formatMessage({ id: 'evaluation/hvacArea/heating' }),\n cooling: intl.formatMessage({ id: 'evaluation/hvacArea/cooling' }),\n ventilation: intl.formatMessage({ id: 'evaluation/hvacArea/ventilation' }),\n }), [intl]);\n\n const chartData = useMemo(() => {\n if (data === null) {\n return [];\n }\n\n if (!shouldDisplayOverallData) {\n return HVAC_AREAS.map((area) => {\n const values = data.perArea[area];\n if (values === null) {\n return null;\n }\n\n return {\n area: area,\n actual: values.actual.div(1_000_000).toNumber(),\n future: values.future.div(1_000_000).toNumber(),\n };\n }).filter(isNotNull);\n }\n\n return [\n ...HVAC_AREAS.map((area) => {\n const values = data.perArea[area];\n if (values === null) {\n return null;\n }\n\n return {\n area: area,\n actual: values.actual.div(1_000_000).toNumber(),\n future: values.future.div(1_000_000).toNumber(),\n };\n }).filter(isNotNull),\n {\n area: 'overall' as const,\n actual: data.overall.actual.div(1_000_000).toNumber(),\n future: data.overall.future.div(1_000_000).toNumber(),\n },\n ];\n }, [data, shouldDisplayOverallData]);\n\n const [isChartReady, setChartReady] = useState(chartData.length === 0);\n\n const renderTooltip = useCallback((props: TooltipProps) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const { label } = props;\n\n const value = chartData.find((it) => it.area === label);\n if (value === undefined) {\n return null;\n }\n\n return (\n
\n
\n \n
\n {HVAC_NAMES[value.area]}\n
\n
\n
\n \n
\n \n
\n
\n \n
\n
\n
\n \n
\n \n
\n
\n \n
\n
\n
\n );\n }, [chartData]);\n\n const renderLegend = useMemo(() => (\n
\n
\n
\n \n\n
\n \n
\n
\n
\n \n\n
\n \n
\n
\n
\n
\n ), []);\n\n return (\n
\n
\n \n \n \n\n {interactive && (\n \n )}\n\n setChartReady(true)}\n dataKey=\"actual\"\n fill={COLORS.actual}\n fillOpacity={1}\n barSize={shouldDisplayOverallData ? 20 : 40}\n />\n setChartReady(true)}\n dataKey=\"future\"\n fill={COLORS.future}\n fillOpacity={1}\n barSize={shouldDisplayOverallData ? 20 : 40}\n />\n\n (\n SERIA_KEYS.is(value)\n ? areaNames[value]\n : ''\n )}\n tick={EvaluationResultsChartsXTick}\n />\n\n \n \n \n\n {renderLegend}\n\n
\n

\n {yAxisLabel}\n

\n
\n
\n
\n );\n});\n\nconst COLORS = {\n actual: '#BDD2DF',\n future: '#632E5B',\n};\n\nconst HVAC_AREAS = [\n HvacArea.HEATING,\n HvacArea.COOLING,\n HvacArea.VENTILATION,\n];\n\nconst HVAC_NAMES = {\n overall: ,\n heating: ,\n cooling: ,\n ventilation: ,\n};\n\nconst SERIA_KEYS = literal(\n 'overall',\n 'heating',\n 'cooling',\n 'ventilation',\n);\n","import { EvaluationResultsChartsSeria } from '@belimo-retrofit-portal/logic';\nimport React, { useMemo } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { sub, sup } from 'src/modules/common/constants/formattingHelpers';\nimport { EvaluationResultsChartsGraphArea } from 'src/modules/evaluation/views/EvaluationResultsChartsGraphArea';\n\ntype Props = {\n readonly seria: EvaluationResultsChartsSeria | null;\n readonly interactive: boolean;\n readonly areCostSavingsExcludedNegative: boolean;\n readonly isInvestmentEmpty: boolean;\n};\n\nexport const EvaluationResultsChartsGraphIRR = (\n { seria, interactive, areCostSavingsExcludedNegative, isInvestmentEmpty }: Props,\n): React.ReactElement => {\n const intl = useIntl();\n\n const shouldHideData = useMemo(\n () => areCostSavingsExcludedNegative ||\n isInvestmentEmpty,\n [areCostSavingsExcludedNegative, isInvestmentEmpty],\n );\n\n return (\n \n );\n};\n\nconst LABELS = {\n year: (\n \n ),\n exclCO2: (\n \n ),\n inclCO2: (\n \n ),\n};\n","import { EvaluationResultsChartsSeria } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { sub, sup } from 'src/modules/common/constants/formattingHelpers';\nimport { EvaluationResultsChartsGraphArea } from 'src/modules/evaluation/views/EvaluationResultsChartsGraphArea';\n\ntype Props = {\n readonly seria: EvaluationResultsChartsSeria | null;\n readonly interactive: boolean;\n readonly areCostSavingsExcludedNegative: boolean;\n readonly isInvestmentEmpty: boolean;\n};\n\nexport const EvaluationResultsChartsGraphROI = (\n { seria, interactive, areCostSavingsExcludedNegative, isInvestmentEmpty }: Props,\n): React.ReactElement => {\n const intl = useIntl();\n\n return (\n \n );\n};\n\nconst LABELS = {\n year: (\n \n ),\n exclCO2: (\n \n ),\n inclCO2: (\n \n ),\n};\n","import React from 'react';\nimport { TickProps } from 'src/modules/evaluation/types/graph';\n\nexport const EvaluationResultsChartsXTick =\n ({\n fontSize,\n orientation,\n width,\n height,\n stroke,\n x,\n y,\n className,\n fill,\n payload,\n textAnchor,\n tickFormatter,\n }: TickProps):React.ReactElement => (\n \n \n\n \n {tickFormatter ? tickFormatter(payload.value) : payload.value}\n \n \n );\n","import './EvaluationResultsSavings.scss';\nimport { CurrencyCode, EvaluationResults, HvacArea } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { CarbonSavingsUnit } from 'src/modules/common/components/CarbonSavingsUnit';\nimport { CurrencySymbol } from 'src/modules/common/components/CurrencySymbol';\nimport { FormattedValue } from 'src/modules/common/components/FormattedValue';\nimport { SavingsAmount } from 'src/modules/common/components/SavingsAmount';\nimport { SavingsValue } from 'src/modules/common/components/SavingsValue';\nimport { SavingTileCard } from 'src/modules/common/components/SavingTileCard';\nimport { TileCard } from 'src/modules/common/components/TileCard';\nimport { sub, sup } from 'src/modules/common/constants/formattingHelpers';\nimport { ChartUpIcon } from 'src/modules/common/icons/ChartUpIcon';\nimport { CloudIcon } from 'src/modules/common/icons/CloudIcon';\nimport { CurrencyExchangeIcon } from 'src/modules/common/icons/CurrencyExchangeIcon';\nimport { HeatingIcon } from 'src/modules/common/icons/HeatingIcon';\n\ntype Props = {\n readonly results: EvaluationResults;\n readonly currency: CurrencyCode;\n};\n\nexport const EvaluationResultsSavings = ({ results, currency }: Props): React.ReactElement => (\n \n )}\n >\n
\n \n )}\n icon={}\n amountTitle={(\n \n )}\n amount={(\n \n )}\n unit={}\n small={false}\n >\n {HVAC_AREAS.map((area) => (\n
\n
\n {HVAC_NAMES[area]}\n
\n
\n \n \n \n \n \n \n
\n
\n ))}\n \n\n \n )}\n icon={}\n amountTitle={(\n }}\n />\n )}\n amount={(\n \n )}\n unit={null}\n small={false}\n >\n {HVAC_AREAS.map((area) => (\n
\n
\n {HVAC_NAMES[area]}\n
\n
\n \n
\n
\n ))}\n \n\n \n )}\n icon={}\n amountTitle={(\n }}\n />\n )}\n amount={(\n \n )}\n unit={null}\n small={false}\n >\n {HVAC_AREAS.map((area) => (\n
\n
\n {HVAC_NAMES[area]}\n
\n
\n \n
\n
\n ))}\n \n
\n\n
\n \n )}\n icon={}\n amountTitle={(\n }}\n />\n )}\n amount={(\n \n )}\n unit={(\n }}\n />\n )}\n small={false}\n >\n
\n \n
\n

\n \n

\n \n\n \n )}\n icon={}\n amountTitle={(\n \n )}\n amount={(\n \n )}\n unit={}\n small={false}\n >\n {HVAC_AREAS.map((area) => (\n
\n
\n {HVAC_NAMES[area]}\n
\n
\n \n
\n
\n \n
\n
\n ))}\n \n
\n
\n);\n\nconst HVAC_AREAS = [\n HvacArea.HEATING,\n HvacArea.COOLING,\n HvacArea.VENTILATION,\n];\n\nconst HVAC_NAMES = {\n heating: ,\n cooling: ,\n ventilation: ,\n};\n","import './EvaluationScreen.scss';\nimport { CurrencyCode, EvaluationResults, ProjectEvaluation } from '@belimo-retrofit-portal/logic';\nimport { useForm } from '@form-ts/react';\nimport React, { useEffect } from 'react';\nimport { useIntl } from 'react-intl';\nimport { BottomNavigationHelper } from 'src/modules/common/components/BottomNavigationHelper';\nimport { EvaluationFormView } from 'src/modules/evaluation/views/EvaluationFormView';\nimport { EvaluationResultsCharts } from 'src/modules/evaluation/views/EvaluationResultsCharts';\nimport { EvaluationResultsSavings } from 'src/modules/evaluation/views/EvaluationResultsSavings';\nimport { FormError } from 'src/modules/form/types/FormError';\n\ntype Props = {\n readonly projectId: string;\n readonly formData: ProjectEvaluation;\n readonly onChange: (formData: ProjectEvaluation) => void;\n readonly results: EvaluationResults;\n readonly currency: CurrencyCode;\n};\n\nexport const EvaluationScreen = ({ projectId, results, formData, onChange, currency }: Props): React.ReactElement => {\n const intl = useIntl();\n\n const projectSchemaUrl = `/project/${encodeURIComponent(projectId)}/schema`;\n const projectReportUrl = `/project/${encodeURIComponent(projectId)}/report`;\n\n const form = useForm('project.evaluation', {\n reinitialize: false,\n initialValues: formData,\n });\n\n useEffect(() => form.subscribe((prevState) => {\n const nextState = form.currentState;\n if (prevState.values !== nextState.values) {\n onChange(nextState.values);\n }\n }), [form, onChange]);\n\n return (\n
\n
\n \n\n \n\n \n\n \n
\n
\n );\n};\n","import { FormController } from '@form-ts/core';\nimport { FeedbackFormData } from 'src/modules/feedback/types/FeedbackFormData';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { createActions } from 'src/utils/createActions';\nimport { createTrigger } from 'src/utils/createTrigger';\n\nexport const FEEDBACK_SEND = createActions, void>('FEEDBACK_SEND');\nexport const FEEDBACK_UPDATE = createActions('FEEDBACK_UPDATE');\nexport const FEEDBACK_RESET = createTrigger('FEEDBACK_RESET');\n\nexport const FEEDBACK_OPEN = createTrigger('FEEDBACK_OPEN');\n","export const FEEDBACK_MODAL_COUNTER_THRESHOLD = 1000;\n","import { FeedbackFormData } from 'src/modules/feedback/types/FeedbackFormData';\n\nexport const FEEDBACK_FORM_DEFAULT_DATA: FeedbackFormData = {\n rating: null,\n comment: '',\n contact: false,\n};\n","import { FeedbackFormData } from 'src/modules/feedback/types/FeedbackFormData';\nimport { FormRule } from 'src/modules/form/types/FormRule';\nimport * as R from 'src/modules/form/utils/rules';\n\nexport const FEEDBACK_FORM_SCHEMA: FormRule = R.struct({\n rating: R.required(),\n comment: R.maxLength(500),\n contact: R.pass(),\n});\n","import { Action } from 'redux';\nimport { FEEDBACK_RESET, FEEDBACK_UPDATE } from 'src/modules/feedback/actions/FeedbackActions';\nimport { FEEDBACK_MODAL_COUNTER_THRESHOLD } from 'src/modules/feedback/constants/feedbackModal';\nimport { FeedbackState } from 'src/modules/feedback/types/FeedbackState';\n\nexport function feedbackCounterReducer(state: FeedbackState, action: Action): FeedbackState {\n if (FEEDBACK_UPDATE.isSuccess(action)) {\n return {\n ...state,\n feedbackCounter: action.data,\n feedbackModalOpened: action.data > FEEDBACK_MODAL_COUNTER_THRESHOLD,\n };\n }\n if (FEEDBACK_RESET.is(action)) {\n return {\n ...state,\n feedbackCounter: 0,\n feedbackModalOpened: false,\n };\n }\n\n return state;\n}\n","import { Action } from 'redux';\nimport { FEEDBACK_OPEN } from 'src/modules/feedback/actions/FeedbackActions';\nimport { FeedbackState } from 'src/modules/feedback/types/FeedbackState';\n\nexport function feedbackModalReducer(state: FeedbackState, action: Action): FeedbackState {\n if (FEEDBACK_OPEN.is(action)) {\n return {\n ...state,\n feedbackModalOpened: action.data,\n };\n }\n\n return state;\n}\n","import { feedbackCounterReducer } from 'src/modules/feedback/reducers/feedbackCounterReducer';\nimport { feedbackModalReducer } from 'src/modules/feedback/reducers/feedbackModalReducer';\nimport { FeedbackState } from 'src/modules/feedback/types/FeedbackState';\nimport { chainReducers } from 'src/utils/chainReducers';\n\nconst defaultState: FeedbackState = {\n feedbackCounter: 0,\n feedbackModalOpened: false,\n};\n\nexport const feedbackReducer = chainReducers(defaultState, [\n feedbackCounterReducer,\n feedbackModalReducer,\n]);\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { resetFeedbackCounter } from 'src/modules/feedback/sagas/utils/resetFeedbackCounter';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { call } from 'typed-redux-saga';\n\nexport function* feedbackResetSaga(): SagaIterator {\n try {\n yield* call(logDebug, 'Reset feedback...');\n\n yield* call(resetFeedbackCounter);\n\n yield* call(logDebug, 'Reset feedback... done');\n } catch (error) {\n const wrapped = new RuntimeError('Could not reset feedback', {}, NativeError.wrap(error));\n\n yield* call(logError, 'Reset feedback... error', error);\n\n yield* call(sentryCatch, wrapped);\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { FEEDBACK_RESET, FEEDBACK_SEND, FEEDBACK_UPDATE } from 'src/modules/feedback/actions/FeedbackActions';\nimport { feedbackResetSaga } from 'src/modules/feedback/sagas/feedbackResetSaga';\nimport { feedbackSendSaga } from 'src/modules/feedback/sagas/feedbackSendSaga';\nimport { feedbackUpdateSaga } from 'src/modules/feedback/sagas/feedbackUpdateSaga';\nimport { takeLatest } from 'typed-redux-saga';\n\nexport function* feedbackSaga(): SagaIterator {\n yield* takeLatest(FEEDBACK_SEND.isRequest, feedbackSendSaga);\n yield* takeLatest(FEEDBACK_UPDATE.isRequest, feedbackUpdateSaga);\n yield* takeLatest(FEEDBACK_RESET.is, feedbackResetSaga);\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { FEEDBACK_SEND } from 'src/modules/feedback/actions/FeedbackActions';\nimport { FEEDBACK_FORM_SCHEMA } from 'src/modules/feedback/constants/schema';\nimport { sendFeedback } from 'src/modules/feedback/sagas/utils/sendFeedback';\nimport { formSubmitFailure } from 'src/modules/form/sagas/utils/formSubmitFailure';\nimport { formSubmitStart } from 'src/modules/form/sagas/utils/formSubmitStart';\nimport { formSubmitSuccess } from 'src/modules/form/sagas/utils/formSubmitSuccess';\nimport { formValidate } from 'src/modules/form/sagas/utils/formValidate';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* feedbackSendSaga(\n action: GetRequestActionType,\n): SagaIterator {\n const form = action.data;\n const values = form.values.get(form.currentState);\n\n const valid = yield* call(formValidate, form, FEEDBACK_FORM_SCHEMA);\n if (!valid) {\n return;\n }\n\n try {\n yield* call(logDebug, 'Sending feedback...');\n yield* put(FEEDBACK_SEND.pending());\n yield* call(formSubmitStart, form);\n\n yield* call(sendFeedback, values);\n yield* call(formSubmitSuccess, form);\n\n yield* call(logDebug, 'Sending feedback... done', values);\n yield* put(FEEDBACK_SEND.success());\n\n yield* call(scheduleUpdateLatestActivity);\n } catch (error) {\n const wrapped = new RuntimeError('Could not send feedback', { values }, NativeError.wrap(error));\n\n yield* call(logError, 'Sending feedback... error', error);\n yield* put(FEEDBACK_SEND.failure(wrapped));\n\n yield* call(sentryCatch, wrapped);\n yield* call(showNotification, { variant: 'error', type: 'error' });\n\n yield* call(formSubmitFailure, form, {});\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { FEEDBACK_UPDATE } from 'src/modules/feedback/actions/FeedbackActions';\nimport { updateFeedbackCounter } from 'src/modules/feedback/sagas/utils/updateFeedbackCounter';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* feedbackUpdateSaga(): SagaIterator {\n try {\n yield* call(logDebug, 'Update feedback...');\n yield* put(FEEDBACK_UPDATE.pending());\n\n const updatedUser = yield* call(updateFeedbackCounter);\n\n yield* put(FEEDBACK_UPDATE.success(updatedUser.feedbackCounter));\n\n yield* call(logDebug, 'Update feedback... done');\n } catch (error) {\n const wrapped = new RuntimeError('Could not update feedback', {}, NativeError.wrap(error));\n\n yield* call(logError, 'Update feedback... error', error);\n\n yield* put(FEEDBACK_UPDATE.failure(wrapped));\n yield* call(sentryCatch, wrapped);\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { call } from 'typed-redux-saga';\n\nexport function* resetFeedbackCounter(): SagaIterator {\n try {\n yield* call(\n makeRestRequest,\n 'PUT',\n '/account/reset-feedback-counter',\n );\n } catch (error) {\n throw new RuntimeError('Could not reset feedback counter', {}, NativeError.wrap(error));\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { FEEDBACK_UPDATE } from 'src/modules/feedback/actions/FeedbackActions';\nimport { put } from 'typed-redux-saga';\n\nexport function* scheduleUpdateFeedbackCounter(): SagaIterator {\n yield* put(FEEDBACK_UPDATE.request());\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { FeedbackFormData } from 'src/modules/feedback/types/FeedbackFormData';\nimport { call } from 'typed-redux-saga';\n\nexport function* sendFeedback(formData: FeedbackFormData): SagaIterator {\n try {\n yield* call(makeRestRequest, 'POST', '/feedback', formData);\n } catch (error) {\n throw new RuntimeError('Could not send feedback', { formData }, NativeError.wrap(error));\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { AUTH_USER } from 'src/modules/common/codecs/AuthUser';\nimport { AuthUser } from 'src/modules/common/types/AuthUser';\nimport { call } from 'typed-redux-saga';\n\nexport function* updateFeedbackCounter(): SagaIterator {\n try {\n const data = yield* call(\n makeRestRequest,\n 'PUT',\n '/account/update-feedback-counter',\n );\n\n return decodeOrThrow(AUTH_USER, data.content);\n } catch (error) {\n throw new RuntimeError('Could not update feedback counter', {}, NativeError.wrap(error));\n }\n}\n","import { RootState } from 'src/types/RootState';\n\nexport function getFeedbackModal(state: RootState): boolean {\n return state.feedback.feedbackModalOpened;\n}\n","import './FeedbackButton.scss';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { useAction } from 'src/hooks/useAction';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CustomModal } from 'src/modules/common/components/CustomModal';\nimport { MailIcon } from 'src/modules/common/icons/MailIcon';\nimport { FEEDBACK_OPEN, FEEDBACK_RESET } from 'src/modules/feedback/actions/FeedbackActions';\nimport { getFeedbackCounter } from 'src/modules/feedback/selectors/getFeedbackCounter';\nimport { getFeedbackModal } from 'src/modules/feedback/selectors/getFeedbackModal';\nimport { FeedbackModal } from 'src/modules/feedback/views/FeedbackModal';\n\nexport const FeedbackButton = (): React.ReactElement => {\n const feedbackReset = useAction(FEEDBACK_RESET.trigger);\n const feedbackModalOpen = useAction(FEEDBACK_OPEN.trigger);\n\n const handleOpen = useCallback(() => feedbackModalOpen(true), [feedbackModalOpen]);\n const handleClose = useCallback(() => {\n feedbackModalOpen(false);\n feedbackReset();\n }, [feedbackModalOpen, feedbackReset]);\n\n const feedbackModalOpened = useSelector(getFeedbackModal);\n\n return (\n <>\n
\n \n
\n \n
\n\n \n \n
\n\n \n \n \n \n );\n};\n","import './FeedbackForm.scss';\nimport { FormController } from '@form-ts/core';\nimport { useFormWatch } from '@form-ts/react';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { FeedbackFormData } from 'src/modules/feedback/types/FeedbackFormData';\nimport { CheckboxField } from 'src/modules/form/components/CheckboxField';\nimport { RatingField } from 'src/modules/form/components/RatingField';\nimport { TextAreaField } from 'src/modules/form/components/TextAreaField';\nimport { FormError } from 'src/modules/form/types/FormError';\n\ntype Props = {\n readonly form: FormController;\n};\n\nexport const FeedbackForm = ({ form }: Props): React.ReactElement => {\n const intl = useIntl();\n const submitting = useFormWatch(form, form.submitting.get);\n\n return (\n \n
\n
\n \n
\n\n \n
\n\n \n\n \n \n );\n};\n","import './FeedbackModal.scss';\nimport { ModalBody, ModalFooter, ModalHeader } from '@carbon/react';\nimport { useForm, useFormWatch } from '@form-ts/react';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { useBoundAction } from 'src/hooks/useBoundAction';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\nimport { FEEDBACK_SEND } from 'src/modules/feedback/actions/FeedbackActions';\nimport { FEEDBACK_FORM_DEFAULT_DATA } from 'src/modules/feedback/constants/formData';\nimport { FEEDBACK_FORM_SCHEMA } from 'src/modules/feedback/constants/schema';\nimport { FeedbackFormData } from 'src/modules/feedback/types/FeedbackFormData';\nimport { FeedbackForm } from 'src/modules/feedback/views/FeedbackForm';\nimport { FeedbackSent } from 'src/modules/feedback/views/FeedbackSent';\nimport { useFormValidator } from 'src/modules/form/hooks/useFormValidator';\nimport { FormError } from 'src/modules/form/types/FormError';\n\ntype Props = {\n readonly onClose: () => void;\n};\n\nexport const FeedbackModal = ({ onClose }: Props): React.ReactElement => {\n const intl = useIntl();\n const form = useForm('feedback.form', {\n reinitialize: false,\n initialValues: FEEDBACK_FORM_DEFAULT_DATA,\n });\n\n useFormValidator(form, FEEDBACK_FORM_SCHEMA);\n\n const submitting = useFormWatch(form, form.submitting.get);\n\n const submitForm = useBoundAction(FEEDBACK_SEND.request, form);\n const submitSucceeded = useFormWatch(form, form.submitSucceded.get);\n\n return (\n <>\n }\n title={}\n closeModal={onClose}\n />\n\n \n
\n
\n \n
\n\n
\n {submitSucceeded\n ? \n : }\n
\n
\n
\n\n \n \n {submitSucceeded\n ? \n : }\n \n\n {!submitSucceeded && (\n (\n
\n \n
\n )}\n >\n \n \n )}\n
\n \n );\n};\n","import './FeedbackSent.scss';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nexport const FeedbackSent = (): React.ReactElement => (\n
\n
\n \n
\n
\n);\n","import './AssetField.scss';\nimport { Close } from '@carbon/icons-react';\nimport { IconButton } from '@carbon/react';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormField, useFormWatch } from '@form-ts/react';\nimport clsx from 'clsx';\nimport { pipe } from 'fp-ts/function';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { AssetUpload } from 'src/modules/asset/views/AssetUpload';\nimport { AssetImage } from 'src/modules/common/components/AssetImage';\nimport { FILE_MAX_SIZE_FILED_MB } from 'src/modules/common/constants/fileField';\nimport { Asset } from 'src/modules/common/types/Asset';\nimport { FormError } from 'src/modules/form/types/FormError';\n\ntype Props = {\n readonly theme?: 'gray' | 'white';\n readonly field: FieldPath;\n readonly disabled?: boolean;\n};\n\nexport const AssetField: (props: Props) => React.ReactElement = ({\n theme = 'gray',\n field,\n disabled = false,\n}) => {\n const intl = useIntl();\n const { meta, value, error } = useFormField(field);\n\n const submitted = useFormWatch(field.form, field.form.submitted.get);\n const invalid = error !== undefined && (meta.touched || submitted);\n\n const handleChange = useCallback((asset: Asset) => {\n field.form.change(pipe(\n field.form.currentState,\n field.touched.set(true),\n field.value.set(asset),\n ));\n }, [field]);\n\n const handleReset = useCallback(() => {\n field.form.change(pipe(\n field.form.currentState,\n field.touched.set(true),\n field.value.set(null),\n ));\n }, [field]);\n\n const handleTouch = useCallback(() => {\n field.form.change(pipe(\n field.form.currentState,\n field.touched.set(true),\n ));\n }, [field]);\n\n if (value !== null) {\n return (\n
\n \n\n
\n \n \n \n
\n
\n );\n }\n\n return (\n
\n
\n \n

\n \n

\n \n
\n\n

\n \n

\n
\n );\n};\n","import './AutocompleteField.scss';\nimport { ComboBox, OnChangeData } from '@carbon/react';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormField, useFormWatch } from '@form-ts/react';\nimport clsx from 'clsx';\nimport { pipe } from 'fp-ts/function';\nimport React, { ReactNode, useCallback } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { AutocompleteOption } from 'src/modules/common/types/AutocompleteOption';\nimport { FormError } from 'src/modules/form/types/FormError';\n\ntype Props = {\n readonly wrapperClass?: string;\n readonly field: FieldPath;\n readonly options: ReadonlyArray>;\n readonly label?: string;\n readonly outlined?: boolean;\n readonly size?: 'sm' | 'md' | 'lg';\n readonly theme?: 'gray' | 'white';\n readonly direction?: 'top' | 'bottom';\n readonly titleText: ReactNode;\n readonly required?: boolean;\n readonly disabled?: boolean;\n readonly itemToString?: (item: AutocompleteOption | null) => string;\n readonly itemToElement: (item: TValue) => React.ReactNode;\n readonly renderError?: (error: FormError) => React.ReactNode;\n};\n\nexport const AutocompleteField = ({\n wrapperClass,\n field,\n options,\n label,\n size,\n theme = 'gray',\n outlined,\n direction,\n titleText,\n required,\n itemToString,\n itemToElement,\n renderError = renderErrorDefault,\n ...rest\n}: Props): React.ReactElement => {\n const { meta, value, error } = useFormField(field);\n\n const submitted = useFormWatch(field.form, field.form.submitted.get);\n const invalid = error !== undefined && (meta.touched || submitted);\n\n const handleChange = useCallback(({ selectedItem }: OnChangeData | undefined>) => {\n if (!selectedItem?.value) {\n return;\n }\n\n field.form.change(pipe(\n field.form.currentState,\n field.value.set(selectedItem.value),\n ));\n }, [field]);\n\n const handleBlur = useCallback(() => {\n field.form.change(pipe(\n field.form.currentState,\n field.touched.set(true),\n ));\n }, [field]);\n\n const itemToElementHandler = useCallback(\n (option: AutocompleteOption) => itemToElement(option.value),\n [itemToElement],\n );\n\n const selectedItem = React.useMemo(() => {\n const found = options.find((option) => option.value === value);\n return found ?? null;\n }, [value, options]);\n\n return (\n >\n {...rest}\n className={clsx(\n 'bp-autocomplete-field',\n wrapperClass,\n `bp-autocomplete-field--${size}`,\n `bp-autocomplete-field--${theme}`,\n {\n 'bp-autocomplete-field--outlined': outlined,\n 'bp-autocomplete-field--invalid': invalid,\n 'bp-autocomplete-field--required': required,\n },\n )}\n direction={direction}\n titleText={titleText}\n id={`${field.form.name}.${field.path}`}\n onChange={handleChange}\n onBlur={handleBlur}\n invalid={invalid}\n invalidText={error && invalid ? renderError(error) : null}\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n items={options as Array>}\n itemToString={itemToString}\n itemToElement={itemToElementHandler}\n selectedItem={selectedItem}\n />\n );\n};\n\nconst renderErrorDefault = (error: FormError): React.ReactNode => (\n \n);\n","import './CheckboxField.scss';\nimport { Checkbox, CheckboxProps } from '@carbon/react';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormField, useFormWatch } from '@form-ts/react';\nimport clsx from 'clsx';\nimport { pipe } from 'fp-ts/function';\nimport React, { useCallback } from 'react';\nimport { FormError } from 'src/modules/form/types/FormError';\n\ntype BaseProps = Omit<\nCheckboxProps,\n'id' |\n'name' |\n'checked' |\n'onChange' |\n'onBlur' |\n'data-field-invalid' |\n'data-field-touched'\n>;\n\ntype Props = BaseProps & {\n readonly wrapperClass?: string;\n readonly field: FieldPath;\n};\n\nexport const CheckboxField: (props: Props) => React.ReactElement = ({\n wrapperClass, field, ...props\n}) => {\n const { meta, value, error } = useFormField(field);\n\n const submitted = useFormWatch(field.form, field.form.submitted.get);\n const invalid = error !== undefined && (meta.touched || submitted);\n\n const handleChange = useCallback((event: React.ChangeEvent) => {\n field.form.change(pipe(\n field.form.currentState,\n field.value.set(event.target.checked),\n ));\n }, [field]);\n\n const handleBlur = useCallback(() => {\n field.form.change(pipe(\n field.form.currentState,\n field.touched.set(true),\n ));\n }, [field]);\n\n return (\n \n );\n};\n","import './DateboxField.scss';\nimport './Field.scss';\nimport { DatePicker, DatePickerInput } from '@carbon/react';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormField, useFormWatch } from '@form-ts/react';\nimport clsx from 'clsx';\nimport dayjs from 'dayjs';\nimport { pipe } from 'fp-ts/function';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { dateFormat } from 'src/modules/common/constants/dateFormat';\nimport { DateIcon } from 'src/modules/common/icons/DateIcon';\nimport { FormError } from 'src/modules/form/types/FormError';\n\ntype Props = {\n readonly size: 'sm' | 'md' | 'lg';\n readonly label: string;\n readonly field: FieldPath;\n readonly renderError?: (error: FormError) => React.ReactNode;\n};\n\nexport const DateboxField: (props: Props) => React.ReactElement = (\n { size, field, label, renderError = renderErrorDefault },\n) => {\n const intl = useIntl();\n\n const { value, meta, error } = useFormField(field);\n\n const submitted = useFormWatch(field.form, field.form.submitted.get);\n const invalid = error !== undefined && (meta.touched || submitted);\n\n const handleChange = useCallback((newValue: Date[]) => {\n field.form.change(pipe(\n field.form.currentState,\n field.value.set(newValue[0] ? newValue[0] : null),\n ));\n }, [field]);\n\n const handleBlur = useCallback(() => {\n field.form.change(pipe(\n field.form.currentState,\n field.touched.set(true),\n ));\n }, [field]);\n\n return (\n
\n \n \n \n\n
\n \n
\n
\n );\n};\n\nconst renderErrorDefault = (error: FormError): React.ReactNode => (\n \n);\n","import './DecimalField.scss';\nimport './Field.scss';\nimport { TextInput } from '@carbon/react';\nimport { TextInputProps } from '@carbon/react/lib/components/TextInput/TextInput';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormField, useFormWatch } from '@form-ts/react';\nimport clsx from 'clsx';\nimport { Decimal } from 'decimal.js-light';\nimport { pipe } from 'fp-ts/function';\nimport React, { ReactNode, useCallback, useEffect, useMemo, useState } from 'react';\nimport CurrencyInput, { CurrencyInputOnChangeValues } from 'react-currency-input-field';\nimport { FormattedMessage } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { DECIMAL_PLACES } from 'src/modules/common/constants/decimal';\nimport { getLocale } from 'src/modules/config/selectors/getLocale';\nimport { FormError } from 'src/modules/form/types/FormError';\n\ntype BaseProps = Omit<\nTextInputProps,\n'className' |\n'id' |\n'name' |\n'invalid' |\n'value' |\n'onChange' |\n'onBlur' |\n'inputMode' |\n'pattern' |\n'allowEmpty'\n>;\n\ntype FieldProps =\n & BaseProps\n & DataProps\n & StyleProps;\n\ntype InputProps =\n & BaseProps\n & ViewProps\n & StyleProps;\n\ntype DataProps = {\n readonly maxValue?: number;\n readonly decimalPlaces?: number;\n readonly decimalScale?: number;\n readonly field: FieldPath;\n};\ntype ViewProps = {\n readonly id: string;\n readonly name: string;\n readonly invalid: boolean;\n readonly error: FormError | undefined;\n readonly value: string;\n};\ntype StyleProps = {\n readonly size: 'sm' | 'md' | 'lg';\n readonly theme?: 'gray' | 'white';\n readonly wrapperClass?: string;\n readonly endAdornment?: ReactNode;\n readonly renderError?: (error: FormError) => React.ReactNode;\n};\n\nexport const DecimalField: (props: FieldProps) => React.ReactElement = ({\n field,\n decimalPlaces = DECIMAL_PLACES,\n decimalScale,\n maxValue,\n ...restProps\n}) => {\n const locale = useSelector(getLocale);\n const intlConfig = useMemo(() => ({ locale }), [locale]);\n\n const { meta, value, error } = useFormField(field);\n\n const submitted = useFormWatch(field.form, field.form.submitted.get);\n const invalid = error !== undefined && (meta.touched || submitted);\n\n const [viewValue, setViewValue] = useState(() => value?.toString() ?? '');\n useEffect(() => {\n try {\n if (viewValue.trim()) {\n const parsed = new Decimal(viewValue);\n if (value === null) {\n setViewValue('');\n } else if (!value.equals(parsed)) {\n setViewValue(value.toString());\n }\n } else if (value !== null) {\n setViewValue(value.toString());\n }\n } catch {\n // noop\n }\n }, [value, viewValue]);\n\n const handleChange = useCallback((\n _1: unknown,\n _2: unknown,\n values: CurrencyInputOnChangeValues | undefined,\n ) => {\n if (!values) {\n return;\n }\n\n if (Number(values.float) > (maxValue || Number.MAX_SAFE_INTEGER)) {\n return;\n }\n\n const nextValue = values.float !== null\n ? new Decimal(values.float)\n : null;\n\n field.form.change(pipe(\n field.form.currentState,\n field.value.set(nextValue),\n ));\n\n setViewValue(values.value);\n }, [field, maxValue]);\n\n const handleBlur = useCallback(() => {\n field.form.change(pipe(\n field.form.currentState,\n field.touched.set(true),\n ));\n }, [field]);\n\n return (\n 0}\n allowNegativeValue={false}\n disableGroupSeparators={false}\n disableAbbreviations={true}\n formatValueOnBlur={true}\n customInput={DecimalInput}\n intlConfig={intlConfig}\n {...restProps}\n />\n );\n};\n\nconst DecimalInput = React.forwardRef((props: InputProps, ref: React.Ref): React.ReactElement => {\n const {\n error,\n invalid,\n size,\n theme = 'gray',\n disabled,\n wrapperClass,\n endAdornment,\n labelText,\n renderError = renderErrorDefault,\n ...restProps\n } = props;\n\n return (\n
\n \n\n
\n {endAdornment}\n
\n
\n );\n});\n\nconst renderErrorDefault = (error: FormError): React.ReactNode => (\n \n);\n","import './DropdownField.scss';\nimport './Field.scss';\nimport { Dropdown } from '@carbon/react';\nimport { DropdownProps, OnChangeData } from '@carbon/react/lib/components/Dropdown/Dropdown';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormField, useFormWatch } from '@form-ts/react';\nimport clsx from 'clsx';\nimport { pipe } from 'fp-ts/function';\nimport React, { ReactElement, useCallback, useMemo } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { FormError } from 'src/modules/form/types/FormError';\n\ntype Option = {\n value: T | null;\n label: T | string | null;\n selected: boolean;\n};\n\ntype BaseProps = Omit<\nDropdownProps,\n'className' |\n'id' |\n'onChange' |\n'onBlur' |\n'label' |\n'invalid' |\n'invalidText' |\n'items' |\n'itemToString' |\n'itemToElement' |\n'renderSelectedItem' |\n'selectedItem'\n>;\n\ntype Props = BaseProps & {\n readonly size: 'sm' | 'md' | 'lg';\n readonly theme?: 'gray' | 'white';\n readonly wrapperClass?: string;\n readonly field: FieldPath;\n readonly options: ReadonlyArray;\n readonly label?: string;\n readonly outlined?: boolean;\n readonly itemToString?: (item: TValue | null) => string;\n readonly itemToElement: (item: TValue) => ReactElement;\n readonly renderSelectedItem: (item: TValue) => ReactElement;\n readonly renderError?: (error: FormError) => React.ReactNode;\n};\n\nexport const DropdownField = ({\n size,\n theme = 'gray',\n wrapperClass,\n field,\n options,\n label,\n outlined,\n disabled,\n itemToString,\n itemToElement,\n renderSelectedItem,\n renderError = renderErrorDefault,\n ...rest\n}: Props): React.ReactElement => {\n const { meta, value, error } = useFormField(field);\n\n const submitted = useFormWatch(field.form, field.form.submitted.get);\n const invalid = error !== undefined && (meta.touched || submitted);\n\n const emptyObject = {\n label: '',\n value: null,\n selected: true,\n };\n\n const composedOptions: Array> = useMemo(() => options.map((option) => ({\n label: itemToString ? itemToString(option) : option,\n value: option,\n selected: option === value,\n })), [options, itemToString, value]);\n\n const selectedItem: Option | undefined = useMemo(\n () => composedOptions.find((option) => option.selected),\n [composedOptions],\n );\n\n const handleChange = useCallback((event: OnChangeData>) => {\n const selectedOption = event.selectedItem?.value\n ? event.selectedItem.value\n : null;\n\n field.form.change(pipe(\n field.form.currentState,\n field.value.set(selectedOption),\n ));\n }, [field]);\n\n const handleBlur = useCallback(() => {\n field.form.change(pipe(\n field.form.currentState,\n field.touched.set(true),\n ));\n }, [field]);\n\n const itemToElementHandler = useCallback(\n (option: Option) => (\n option.value ? itemToElement(option.value) : null),\n [itemToElement],\n );\n\n const selectedItemHandler = useCallback(\n (option: Option) => (option.value ? renderSelectedItem(option.value) : null),\n [renderSelectedItem],\n );\n\n return (\n \n );\n};\n\nconst renderErrorDefault = (error: FormError): React.ReactNode => (\n \n);\n","import './FileField.scss';\nimport { Close } from '@carbon/icons-react';\nimport { IconButton } from '@carbon/react';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormField, useFormWatch } from '@form-ts/react';\nimport clsx from 'clsx';\nimport { pipe } from 'fp-ts/function';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { FileUpload } from 'src/modules/asset/views/FileUpload';\nimport { BlobImage } from 'src/modules/common/components/BlobImage';\nimport { FILE_MAX_SIZE_FILED_MB } from 'src/modules/common/constants/fileField';\nimport { FormError } from 'src/modules/form/types/FormError';\n\ntype Props = {\n readonly theme?: 'gray' | 'white';\n readonly className?: string;\n readonly field: FieldPath;\n};\n\nexport const FileField: (props: Props) => React.ReactElement = ({ theme = 'gray', className, field }) => {\n const intl = useIntl();\n\n const { meta, value, error } = useFormField(field);\n\n const submitted = useFormWatch(field.form, field.form.submitted.get);\n const invalid = error !== undefined && (meta.touched || submitted);\n\n const handleChange = useCallback((file: File) => {\n field.form.change(pipe(\n field.form.currentState,\n field.touched.set(true),\n field.value.set(file),\n ));\n }, [field]);\n\n const handleReset = useCallback(() => {\n field.form.change(pipe(\n field.form.currentState,\n field.touched.set(true),\n field.value.set(null),\n ));\n }, [field]);\n\n const handleTouch = useCallback(() => {\n field.form.change(pipe(\n field.form.currentState,\n field.touched.set(true),\n ));\n }, [field]);\n\n if (value !== null) {\n return (\n
\n \n\n
\n \n \n \n
\n
\n );\n }\n\n return (\n <>\n
\n \n

\n \n

\n \n
\n\n

\n \n

\n \n );\n};\n","import './Field.scss';\n// @ts-expect-error It works fine, but in the 1.51.1 version TypeScript prints\n// an error Module '\"@carbon/react\"' has no exported member 'PasswordInput'\n// should be resolved soon\nimport { PasswordInput } from '@carbon/react';\nimport { TextInputProps } from '@carbon/react/lib/components/TextInput/TextInput';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormField, useFormWatch } from '@form-ts/react';\nimport clsx from 'clsx';\nimport { pipe } from 'fp-ts/function';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { FormError } from 'src/modules/form/types/FormError';\n\ntype BaseProps = Omit<\nTextInputProps,\n'id' | 'invalid' | 'invalidText' | 'name' | 'value' | 'onChange' | 'onBlur'\n>;\n\ntype Props = BaseProps & {\n readonly size: 'sm' | 'lg' | 'md';\n readonly wrapperClass?: string;\n readonly field: FieldPath;\n readonly renderError?: (error: FormError) => React.ReactNode;\n};\n\nexport const PasswordField: (props: Props) => React.ReactElement = (\n { size, field, wrapperClass, renderError = renderErrorDefault, ...props },\n) => {\n const intl = useIntl();\n const { meta, value, error } = useFormField(field);\n\n const submitted = useFormWatch(field.form, field.form.submitted.get);\n const invalid = error !== undefined && (meta.touched || submitted);\n\n const handleChange = useCallback((event: React.ChangeEvent) => {\n field.form.change(pipe(\n field.form.currentState,\n field.value.set(event.target.value),\n ));\n }, [field]);\n\n const handleBlur = useCallback(() => {\n field.form.change(pipe(\n field.form.currentState,\n field.touched.set(true),\n ));\n }, [field]);\n\n return (\n
\n \n
\n );\n};\n\nconst renderErrorDefault = (error: FormError): React.ReactNode => (\n \n);\n","import './RatingField.scss';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormField, useFormWatch } from '@form-ts/react';\nimport { pipe } from 'fp-ts/function';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage } from 'src/migration/react-intl';\nimport { Rating } from 'src/modules/common/components/Rating';\nimport { FormError } from 'src/modules/form/types/FormError';\n\ntype Props = {\n readonly disabled: boolean;\n readonly field: FieldPath;\n readonly renderError?: (error: FormError) => React.ReactNode;\n};\n\nexport const RatingField: (props: Props) => React.ReactElement = (\n {\n disabled,\n field,\n renderError = renderErrorDefault,\n },\n) => {\n const { meta, error } = useFormField(field);\n\n const submitted = useFormWatch(field.form, field.form.submitted.get);\n const invalid = error !== undefined && (meta.touched || submitted);\n\n const handleChange = useCallback((newRating: number) => {\n field.form.change(pipe(\n field.form.currentState,\n field.value.set(newRating),\n ));\n }, [field]);\n\n return (\n
\n \n\n {error && invalid ? renderError(error) : null}\n
\n );\n};\n\nconst renderErrorDefault = (error: FormError): React.ReactNode => (\n
\n \n
\n);\n","import { Search, SearchProps } from '@carbon/react';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormField, useFormWatch } from '@form-ts/react';\nimport clsx from 'clsx';\nimport { pipe } from 'fp-ts/function';\nimport React, { useCallback } from 'react';\nimport { FormError } from 'src/modules/form/types/FormError';\n\ntype BaseProps = Omit<\nSearchProps,\n'id' | 'value'\n>;\n\ntype Props = BaseProps & {\n readonly size: 'sm' | 'md' | 'lg';\n readonly field: FieldPath;\n};\n\nexport const SearchField: (props: Props) => React.ReactElement = ({ size, field, ...props }) => {\n const { error, meta, value } = useFormField(field);\n\n const { onChange, onBlur } = props;\n\n const submitted = useFormWatch(field.form, field.form.submitted.get);\n const invalid = error !== undefined && (meta.touched || submitted);\n\n const handleChange = useCallback((event: { target: HTMLInputElement; type: 'change' }) => {\n field.form.change(pipe(\n field.form.currentState,\n field.value.set(event.target.value),\n ));\n onChange?.(event);\n }, [field, onChange]);\n\n const handleBlur = useCallback((event: React.FocusEvent) => {\n field.form.change(pipe(\n field.form.currentState,\n field.touched.set(true),\n ));\n onBlur?.(event);\n }, [field, onBlur]);\n\n return (\n \n );\n};\n","import './Field.scss';\nimport './TextAreaField.scss';\nimport { TextArea as CarbonTextArea } from '@carbon/react';\nimport { TextAreaProps } from '@carbon/react/lib/components/TextArea/TextArea';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormField, useFormWatch } from '@form-ts/react';\nimport clsx from 'clsx';\nimport { pipe } from 'fp-ts/function';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { FormError } from 'src/modules/form/types/FormError';\n\ntype BaseProps = Omit<\nTextAreaProps,\n'id' | 'invalid' | 'invalidText' | 'helperText' | 'name' | 'value' | 'onChange'\n| 'onBlur' | 'maxCount' | 'maxLength'\n>;\n\ntype Props = BaseProps & {\n readonly theme?: 'gray' | 'white';\n readonly outlined?: boolean;\n readonly maxLength?: number;\n readonly showHint?: boolean;\n readonly wrapperClass?: string;\n readonly field: FieldPath;\n readonly onBlur?: () => void;\n readonly renderError?: (error: FormError) => React.ReactNode;\n readonly renderHint?: () => React.ReactNode;\n};\n\nexport const TextAreaField: (props: Props) => React.ReactElement = (\n {\n theme = 'gray',\n outlined = false,\n maxLength,\n showHint,\n field,\n wrapperClass,\n onBlur,\n renderError = renderErrorDefault,\n renderHint,\n ...props\n },\n) => {\n const { meta, value, error } = useFormField(field);\n\n const submitted = useFormWatch(field.form, field.form.submitted.get);\n const invalid = error !== undefined && (meta.touched || submitted);\n\n const hint = renderHint || (():React.ReactNode => renderHintDefault(value.length, maxLength));\n\n const handleChange = useCallback((event: React.ChangeEvent) => {\n field.form.change(pipe(\n field.form.currentState,\n field.value.set(event.target.value),\n ));\n }, [field]);\n\n const handleBlur = useCallback(() => {\n field.form.change(pipe(\n field.form.currentState,\n field.touched.set(true),\n ));\n\n onBlur?.();\n }, [field, onBlur]);\n\n return (\n
\n \n
\n );\n};\n\nconst renderErrorDefault = (error: FormError): React.ReactNode => (\n \n);\n\nconst renderHintDefault = (length: number, maxLength?: number): React.ReactNode => (\n \n);\n","import './Field.scss';\nimport './TextField.scss';\nimport { TextInput } from '@carbon/react';\nimport { TextInputProps } from '@carbon/react/lib/components/TextInput/TextInput';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormField, useFormWatch } from '@form-ts/react';\nimport clsx from 'clsx';\nimport { pipe } from 'fp-ts/function';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { FormError } from 'src/modules/form/types/FormError';\n\ntype BaseProps = Omit<\nTextInputProps,\n'id' | 'invalid' | 'invalidText' | 'helperText' | 'name'\n| 'value' | 'onChange' | 'onBlur' | 'maxCount' | 'maxLength'\n>;\n\ntype Props = BaseProps & {\n readonly size: 'sm' | 'md' | 'lg';\n readonly theme?: 'gray' | 'white';\n readonly disabled?: boolean;\n readonly outlined?: boolean;\n readonly maxLength?: number;\n readonly wrapperClass?: string;\n readonly field: FieldPath;\n readonly onBlur?: () => void;\n readonly renderError?: (error: FormError) => React.ReactNode;\n readonly renderHint?: () => React.ReactNode;\n};\n\nexport const TextField: (props: Props) => React.ReactElement = (\n {\n size,\n theme = 'gray',\n disabled,\n outlined = false,\n maxLength,\n field,\n wrapperClass,\n onBlur,\n renderError = renderErrorDefault,\n renderHint,\n ...props\n },\n) => {\n const { meta, value, error } = useFormField(field);\n\n const submitted = useFormWatch(field.form, field.form.submitted.get);\n const invalid = error !== undefined && (meta.touched || submitted);\n\n const hint = (renderHint || ((): React.ReactNode => renderHintDefault(value.length, maxLength)));\n\n const handleChange = useCallback((event: React.ChangeEvent) => {\n field.form.change(pipe(\n field.form.currentState,\n field.value.set(event.target.value),\n ));\n }, [field]);\n\n const handleBlur = useCallback(() => {\n field.form.change(pipe(\n field.form.currentState,\n field.touched.set(true),\n ));\n\n onBlur?.();\n }, [field, onBlur]);\n\n return (\n
\n \n
\n );\n};\n\nconst renderErrorDefault = (error: FormError): React.ReactNode => (\n \n);\n\nconst renderHintDefault = (length: number, maxLength?: number): React.ReactNode => (\n \n);\n","import './ToggleField.scss';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormField, useFormWatch } from '@form-ts/react';\nimport { pipe } from 'fp-ts/function';\nimport React, { useCallback } from 'react';\nimport { CustomToggle } from 'src/modules/common/components/CustomToggle';\nimport { FormError } from 'src/modules/form/types/FormError';\n\ntype Props = {\n readonly field: FieldPath;\n readonly label: React.ReactNode;\n readonly disabled?: boolean;\n readonly readOnly?: boolean;\n};\n\nexport const ToggleField: (props: Props) => React.ReactElement = ({\n field,\n label,\n disabled,\n readOnly,\n}) => {\n const { meta, value, error } = useFormField(field);\n\n const submitted = useFormWatch(field.form, field.form.submitted.get);\n const invalid = error !== undefined && (meta.touched || submitted);\n\n const handleChange = useCallback((toggled: boolean) => {\n field.form.change(pipe(\n field.form.currentState,\n field.value.set(toggled),\n ));\n }, [field]);\n\n const handleBlur = useCallback(() => {\n field.form.change(pipe(\n field.form.currentState,\n field.touched.set(true),\n ));\n }, [field]);\n\n return (\n \n );\n};\n","import { FormController } from '@form-ts/core';\nimport { pipe } from 'fp-ts/function';\nimport { useEffect } from 'react';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { FormResolver } from 'src/modules/form/types/FormResolver';\n\nexport function useFormResolver(\n form: FormController,\n resolver: FormResolver,\n): void {\n useEffect(() => form.middleware((nextState) => {\n const nextValues = nextState.values;\n const prevValues = form.currentState.values;\n\n if (nextValues === prevValues) {\n return nextState;\n }\n\n const syncValues = resolver(prevValues, nextValues);\n return pipe(\n nextState,\n form.values.set(syncValues),\n );\n }), [form, resolver]);\n}\n","import { FormController } from '@form-ts/core';\nimport { pipe } from 'fp-ts/function';\nimport { useEffect } from 'react';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { FormRule } from 'src/modules/form/types/FormRule';\nimport { validate } from 'src/modules/form/utils/validate';\n\nexport function useFormValidator(\n form: FormController,\n rule: FormRule,\n): void {\n useEffect(() => form.middleware((nextState) => {\n const nextValues = nextState.values;\n const prevValues = form.currentState.values;\n\n if (nextValues === prevValues) {\n return nextState;\n }\n\n const errors = validate(nextValues, rule);\n return pipe(\n nextState,\n form.errors.set(errors),\n );\n }), [form, rule]);\n}\n","import { FieldMap, FormController } from '@form-ts/core';\nimport { pipe } from 'fp-ts/function';\nimport { SagaIterator } from 'redux-saga';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { call } from 'typed-redux-saga';\n\nexport function* formSubmitFailure(\n form: FormController,\n errors: FieldMap,\n): SagaIterator {\n yield* call({\n fn: form.change,\n context: form,\n }, pipe(\n form.currentState,\n form.errors.set(errors),\n form.submitted.set(true),\n form.submitting.set(false),\n form.submitSucceded.set(false),\n ));\n}\n","import { FormController } from '@form-ts/core';\nimport { pipe } from 'fp-ts/function';\nimport { modify } from 'monocle-ts/Lens';\nimport { SagaIterator } from 'redux-saga';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { call } from 'typed-redux-saga';\n\nexport function* formSubmitStart(\n form: FormController,\n): SagaIterator {\n yield* call({\n fn: form.change,\n context: form,\n }, pipe(\n form.currentState,\n form.submitting.set(true),\n pipe(form.submitCount, modify((count) => count + 1)),\n ));\n}\n","import { FormController } from '@form-ts/core';\nimport { pipe } from 'fp-ts/function';\nimport { SagaIterator } from 'redux-saga';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { call } from 'typed-redux-saga';\n\nexport function* formSubmitSuccess(\n form: FormController,\n): SagaIterator {\n yield* call({\n fn: form.change,\n context: form,\n }, pipe(\n form.currentState,\n form.submitted.set(true),\n form.submitting.set(false),\n form.submitSucceded.set(true),\n ));\n}\n","import { FormController } from '@form-ts/core';\nimport { SagaIterator } from 'redux-saga';\nimport { formSubmitFailure } from 'src/modules/form/sagas/utils/formSubmitFailure';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { FormRule } from 'src/modules/form/types/FormRule';\nimport { validate } from 'src/modules/form/utils/validate';\nimport { call } from 'typed-redux-saga';\n\nexport function* formValidate(\n form: FormController,\n rule: FormRule,\n): SagaIterator {\n const values = form.values.get(form.currentState);\n\n const errors = yield* call(validate, values, rule);\n if (Object.keys(errors).length === 0) {\n return true;\n }\n\n yield* call(formSubmitFailure, form, errors);\n return false;\n}\n","import { Decimal, Numeric } from 'decimal.js-light';\nimport type { Predicate } from 'fp-ts/Predicate';\nimport type { Refinement } from 'fp-ts/Refinement';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { FormRule } from 'src/modules/form/types/FormRule';\n\nexport function required(): FormRule {\n return (value, context) => {\n if (value === null || value === undefined) {\n return [{\n path: context.path.join('.'),\n code: 'required',\n value: value,\n\n context: {},\n message: 'Value should not be empty',\n }];\n }\n\n return NO_ERRORS;\n };\n}\n\nexport function nonEmpty(message?: string): FormRule {\n return (value, context) => {\n if (value === '') {\n return [{\n path: context.path.join('.'),\n code: 'required',\n value: value,\n\n context: {},\n message: message || 'Value should not be empty',\n }];\n }\n\n return NO_ERRORS;\n };\n}\n\nexport function minLength(n: number, message?: string): FormRule {\n return (value, context) => {\n if (value.length >= n) {\n return NO_ERRORS;\n }\n\n return [{\n path: context.path.join('.'),\n code: 'minLength',\n value: value,\n\n context: { min: n },\n message: message || `Value should not be shorter than ${n} character(s)`,\n }];\n };\n}\n\nexport function maxLength(n: number, message?: string): FormRule {\n return (value, context) => {\n if (value.length <= n) {\n return NO_ERRORS;\n }\n\n return [{\n path: context.path.join('.'),\n code: 'maxLength',\n value: value,\n\n context: { max: n },\n message: message || `Value should not be longer than ${n} character(s)`,\n }];\n };\n}\n\nconst EMAIL_REGEXP = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$/;\n\nexport function email(): FormRule {\n return (value, context) => {\n if (EMAIL_REGEXP.test(value)) {\n return NO_ERRORS;\n }\n\n return [{\n path: context.path.join('.'),\n code: 'email',\n value: value,\n\n context: {},\n message: 'Value is not a valid email address',\n }];\n };\n}\n\nexport function literal(literalArray: ReadonlyArray): FormRule {\n return (value, context) => {\n if (literalArray.includes(value)) {\n return NO_ERRORS;\n }\n\n return [{\n path: context.path.join('.'),\n code: 'literal',\n value: value,\n\n context: {},\n message: 'Value is not a included in the list of literals',\n }];\n };\n}\n\nexport function emailList(): FormRule {\n return (value, context) => {\n const emailsArray = value.split(',')\n .filter((str) => str.trim().length > 0)\n .map((str) => str.trim());\n\n const uniqEmails = removeNonUniqueStrings(emailsArray);\n\n const isValidEmailList = validateEmails(uniqEmails);\n\n if (isValidEmailList) {\n return NO_ERRORS;\n }\n\n return [{\n path: context.path.join('.'),\n code: 'emailListInvalid',\n value: value,\n\n context: {},\n message: 'User(s) email address is not valid',\n }];\n };\n}\n\nexport function emailAlreadyExist(existingEmailsArray: string[]): FormRule {\n return (value, context) => {\n const newEmailsArray = value.split(',')\n .filter((str) => str.trim().length > 0)\n .map((str) => str.trim());\n\n const uniqNewEmails = removeNonUniqueStrings(newEmailsArray);\n\n const areSomeEmailsAlreadyAdded = uniqNewEmails.some(\n (newEmail) => existingEmailsArray.includes(newEmail),\n );\n\n if (areSomeEmailsAlreadyAdded) {\n return [{\n path: context.path.join('.'),\n code: 'emailAlreadyExists',\n value: value,\n\n context: {},\n message: 'User(s) email is already added',\n }];\n }\n\n return NO_ERRORS;\n };\n}\n\nfunction validateEmails(uniqEmails: string[]): boolean {\n return uniqEmails.every((emailStr) => EMAIL_REGEXP.test(emailStr));\n}\n\nfunction removeNonUniqueStrings(strings: string[]): string[] {\n return [...new Set(strings.map((string) => string.toLocaleLowerCase()))];\n}\n\nexport function date(): FormRule {\n return (value, context) => {\n if (!Number.isNaN(value.getDate())) {\n return NO_ERRORS;\n }\n\n return [{\n path: context.path.join('.'),\n code: 'date',\n value: value,\n\n context: {},\n message: 'Value is not a valid date',\n }];\n };\n}\n\nexport function gt(n: Numeric): FormRule {\n return (value, context) => {\n if (value.gt(n)) {\n return NO_ERRORS;\n }\n\n return [{\n path: context.path.join('.'),\n code: 'gt',\n value: value,\n\n context: { min: new Decimal(n).toNumber() },\n message: `Value should be greater than ${String(n)}`,\n }];\n };\n}\n\nexport function gte(n: Numeric): FormRule {\n return (value, context) => {\n if (value.gte(n)) {\n return NO_ERRORS;\n }\n\n return [{\n path: context.path.join('.'),\n code: 'gte',\n value: value,\n\n context: { min: new Decimal(n).toNumber() },\n message: `Value should not be less than ${String(n)}`,\n }];\n };\n}\n\nexport function lt(n: Numeric): FormRule {\n return (value, context) => {\n if (value.lt(n)) {\n return NO_ERRORS;\n }\n\n return [{\n path: context.path.join('.'),\n code: 'lt',\n value: value,\n\n context: { max: new Decimal(n).toNumber() },\n message: `Value should be less than ${String(n)}`,\n }];\n };\n}\n\nexport function lte(n: Numeric): FormRule {\n return (value, context) => {\n if (value.lte(n)) {\n return NO_ERRORS;\n }\n\n return [{\n path: context.path.join('.'),\n code: 'lte',\n value: value,\n\n context: { max: new Decimal(n).toNumber() },\n message: `Value should not be greater than ${String(n)}`,\n }];\n };\n}\n\nexport function allOf(rules: ReadonlyArray>): FormRule {\n // FIXME: should we use `reduceRight` to validate from left to right in array (e.g. `allOf([nonEmpty(), email()])`)\n // i.g. it's first validation will be `nonEmpty()` and than `email()`\n return (value, context) => rules.reduce((errors, rule) => {\n const more = rule(value, context);\n\n return more.length > 0\n ? errors.concat(more)\n : errors;\n }, NO_ERRORS);\n}\n\nexport function anyOf(rules: ReadonlyArray>): FormRule {\n return (value, context) => {\n for (const rule of rules) {\n const more = rule(value, context);\n if (more.length === 0) {\n return NO_ERRORS;\n }\n }\n\n return [{\n path: context.path.join('.'),\n code: 'invalid',\n value: value,\n\n context: {},\n message: 'Value does not match any rule',\n }];\n };\n}\n\nexport function struct(rules: { readonly [K in keyof T]: FormRule }): FormRule {\n return (value, context) => {\n let errors = NO_ERRORS;\n\n // eslint-disable-next-line no-restricted-syntax\n for (const key in rules) {\n // eslint-disable-next-line no-prototype-builtins\n if (!rules.hasOwnProperty(key)) {\n continue;\n }\n\n const path = context.path.concat(key);\n const rule = rules[key];\n const more = rule(value[key], { path });\n\n if (more.length > 0) {\n errors = errors.concat(more);\n }\n }\n\n return errors;\n };\n}\n\nexport function nullable(rule: FormRule): FormRule {\n return (value, context) => (\n value !== null\n ? rule(value, context)\n : NO_ERRORS\n );\n}\n\nexport function array(rule: FormRule): FormRule> {\n return (value, context) => value.reduce((errors, val, key) => {\n const path = context.path.concat(key.toString());\n const more = rule(val, { path });\n\n return more.length > 0\n ? errors.concat(more)\n : errors;\n }, NO_ERRORS);\n}\n\nexport function record(rule: FormRule): FormRule>> {\n return (value, context) => Object.entries(value).reduce((errors, [key, val]) => {\n const path = context.path.concat(key);\n const more = rule(val, { path });\n\n return more.length > 0\n ? errors.concat(more)\n : errors;\n }, NO_ERRORS);\n}\n\nexport function maybe(test: Refinement, rule: FormRule): FormRule;\nexport function maybe(test: Predicate, rule: FormRule): FormRule {\n return (value, context) => (test(value)\n ? rule(value, context)\n : NO_ERRORS);\n}\n\nexport function map(fn: (value: T) => U, rule: FormRule): FormRule {\n return (value, context) => rule(fn(value), context);\n}\n\nexport function pass(): FormRule {\n return () => NO_ERRORS;\n}\n\nexport function match(regex: RegExp, message?: string): FormRule {\n return (value, context) => {\n if (regex.test(value)) {\n return NO_ERRORS;\n }\n\n return [{\n path: context.path.join('.'),\n code: 'match',\n value: value,\n\n context: { regExp: String(regex) },\n message: message || `Value should match these regular expression: \"${regex}\"`,\n }];\n };\n}\n\nexport function matchField(\n field: Extract,\n reference: Extract,\n message?: string,\n): FormRule {\n return (value, context) => {\n if (Object.is(value[field], value[reference])) {\n return NO_ERRORS;\n }\n\n return [{\n path: context.path.concat(field).join('.'),\n code: 'match',\n value: value,\n\n context: {},\n message: message ?? `Value should match \"${reference}\" field`,\n }];\n };\n}\n\nexport const NO_ERRORS: ReadonlyArray = [];\n","import { Lens } from 'monocle-ts/Lens';\n\nconst NON_NULL_LENS = {\n get: (value: T): T => value,\n set: (value: T | null) => (state: T): T => value ?? state,\n};\n\nexport function ensureNonNull(): Lens {\n return NON_NULL_LENS;\n}\n","import { FieldMap } from '@form-ts/core';\nimport { Foldable } from 'fp-ts/ReadonlyArray';\nimport { fromFoldableMap } from 'fp-ts/ReadonlyRecord';\nimport { first } from 'fp-ts/Semigroup';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { FormRule, RuleContext } from 'src/modules/form/types/FormRule';\n\nexport function validate(data: T, rule: FormRule): FieldMap {\n const errors = rule(data, ROOT_CONTEXT);\n return fromFoldableMap(first(), Foldable)(errors, (error) => [error.path, error]);\n}\n\nconst ROOT_CONTEXT: RuleContext = {\n path: [],\n};\n","import { HvacFormData } from 'src/modules/hvac/types/HvacFormData';\nimport { createTrigger } from 'src/utils/createTrigger';\n\nexport const HVAC_CHANGE = createTrigger('HVAC_CHANGE');\n","import { HvacAssessmentCategories } from 'src/modules/hvac/types/HvacAssessmentCategories';\n\nexport const ISO_CATEGORIES: Record = {\n 1.1: HvacAssessmentCategories.EMISSION,\n '1.1a': HvacAssessmentCategories.EMISSION,\n 1.2: HvacAssessmentCategories.EMISSION,\n 1.3: HvacAssessmentCategories.DISTRIBUTION,\n 1.4: HvacAssessmentCategories.DISTRIBUTION,\n '1.4a': HvacAssessmentCategories.DISTRIBUTION,\n 1.5: HvacAssessmentCategories.DISTRIBUTION,\n 1.6: HvacAssessmentCategories.GENERATION,\n 1.7: HvacAssessmentCategories.GENERATION,\n 1.8: HvacAssessmentCategories.GENERATION,\n 1.9: HvacAssessmentCategories.GENERATION,\n '1.10': HvacAssessmentCategories.GENERATION,\n\n 3.1: HvacAssessmentCategories.EMISSION,\n '3.1a': HvacAssessmentCategories.EMISSION,\n 3.2: HvacAssessmentCategories.EMISSION,\n 3.3: HvacAssessmentCategories.DISTRIBUTION,\n 3.4: HvacAssessmentCategories.DISTRIBUTION,\n '3.4a': HvacAssessmentCategories.DISTRIBUTION,\n 3.5: HvacAssessmentCategories.DISTRIBUTION,\n 3.6: HvacAssessmentCategories.GENERATION,\n 3.7: HvacAssessmentCategories.GENERATION,\n 3.8: HvacAssessmentCategories.GENERATION,\n 3.9: HvacAssessmentCategories.GENERATION,\n\n 4.1: HvacAssessmentCategories.EMISSION,\n 4.2: HvacAssessmentCategories.EMISSION,\n 4.3: HvacAssessmentCategories.EMISSION,\n 4.4: HvacAssessmentCategories.DISTRIBUTION,\n 4.5: HvacAssessmentCategories.DISTRIBUTION,\n 4.6: HvacAssessmentCategories.DISTRIBUTION,\n 4.7: HvacAssessmentCategories.DISTRIBUTION,\n 4.8: HvacAssessmentCategories.DISTRIBUTION,\n 4.9: HvacAssessmentCategories.DISTRIBUTION,\n '4.10': HvacAssessmentCategories.DISTRIBUTION,\n};\n","import './HvacPage.scss';\nimport { useForm } from '@form-ts/react';\nimport React, { useEffect } from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { useAction } from 'src/hooks/useAction';\nimport { useBoundAction } from 'src/hooks/useBoundAction';\nimport { useParametricSelector } from 'src/hooks/useParametricSelector';\nimport { ProjectToolbar } from 'src/modules/common/components/ProjectToolbar';\nimport { AppLayout } from 'src/modules/common/layouts/AppLayout';\nimport { useFormResolver } from 'src/modules/form/hooks/useFormResolver';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { HVAC_CHANGE } from 'src/modules/hvac/actions/HvacActions';\nimport { getHvacFormCounters } from 'src/modules/hvac/selectors/getHvacFormCounters';\nimport { getHvacFormData } from 'src/modules/hvac/selectors/getHvacFormData';\nimport { getHvacResults } from 'src/modules/hvac/selectors/getHvacResults';\nimport { getHvacResultsInaccurate } from 'src/modules/hvac/selectors/getHvacResultsInaccurate';\nimport { HvacFormData } from 'src/modules/hvac/types/HvacFormData';\nimport { resolveHvacFormData } from 'src/modules/hvac/utils/resolveHvacFormData';\nimport { HvacFormAssessmentView } from 'src/modules/hvac/views/HvacFormAssessmentView';\nimport { HvacResultEnergyView } from 'src/modules/hvac/views/HvacResultEnergyView';\nimport { HvacResultSavingsView } from 'src/modules/hvac/views/HvacResultSavingsView';\nimport { HvacResultSummaryView } from 'src/modules/hvac/views/HvacResultSummaryView';\nimport { PROJECT_VIEW_SHARE } from 'src/modules/project-view/actions/ProjectViewActions';\nimport { getProjectDetails } from 'src/modules/project-view/selectors/getProjectDetails';\nimport { ShareProject } from 'src/modules/sharing-projects/containers/ShareProject';\n\nexport const HvacPage = (): React.ReactElement => {\n const intl = useIntl();\n const project = useSelector(getProjectDetails);\n\n const results = useParametricSelector(getHvacResults, project);\n const counters = useParametricSelector(getHvacFormCounters, project);\n const inaccurate = useParametricSelector(getHvacResultsInaccurate, project);\n const formData = useParametricSelector(getHvacFormData, project);\n const saveFormData = useAction(HVAC_CHANGE.trigger);\n const shareProject = useBoundAction(PROJECT_VIEW_SHARE.trigger, project);\n\n const hvacForm = useForm('hvac', {\n reinitialize: false,\n initialValues: formData,\n });\n useFormResolver(hvacForm, resolveHvacFormData);\n\n useEffect(() => hvacForm.subscribe((prevState) => {\n const nextState = hvacForm.currentState;\n if (prevState.values !== nextState.values) {\n saveFormData(nextState.values);\n }\n }), [hvacForm, saveFormData]);\n\n return (\n <>\n \n \n {intl.formatMessage({ id: 'hvac/pageTitle' })}\n \n \n\n \n \n\n
\n
\n \n\n \n\n \n\n \n
\n
\n
\n\n \n \n );\n};\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { Project } from 'src/modules/common/types/Project';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { HVAC_CHANGE } from 'src/modules/hvac/actions/HvacActions';\nimport { getReportHvacEnergy } from 'src/modules/hvac/utils/getReportHvacEnergy';\nimport { mapHvacFormToStore } from 'src/modules/hvac/utils/mapHvacFormToStore';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { syncProjectBackground } from 'src/modules/project-sync/sagas/utils/syncProjectBackground';\nimport { getProjectDetails } from 'src/modules/project-view/selectors/getProjectDetails';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetTriggerActionType } from 'src/utils/createTrigger';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* hvacChangeSaga(\n action: GetTriggerActionType,\n): SagaIterator {\n const formData = action.data;\n\n try {\n yield* call(logDebug, 'Saving HVAC data...', formData);\n\n const previous = yield* select(getProjectDetails);\n\n const updatedReport = yield* call(getReportHvacEnergy, formData, previous);\n\n const modified: Project = {\n ...previous,\n data: {\n ...previous.data,\n currency: formData.currency,\n building: formData.building,\n hvac: yield* call(mapHvacFormToStore, formData.assessment),\n report: updatedReport,\n },\n };\n\n const reloaded = yield* call(syncProjectBackground, modified);\n yield* call(logDebug, 'Saving HVAC data... done', reloaded);\n } catch (error) {\n const wrapped = new RuntimeError('Could not save HVAC data', { formData }, NativeError.wrap(error));\n yield* call(logError, 'Saving HVAC data... error', error);\n\n yield* call(sentryCatch, wrapped);\n yield* call(showNotification, { variant: 'error', type: 'error' });\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { HVAC_CHANGE } from 'src/modules/hvac/actions/HvacActions';\nimport { hvacChangeSaga } from 'src/modules/hvac/sagas/hvacChangeSaga';\nimport { takeLatest } from 'typed-redux-saga';\n\nexport function* hvacSaga(): SagaIterator {\n yield* takeLatest(HVAC_CHANGE.is, hvacChangeSaga);\n}\n","import { createSelector } from 'reselect';\nimport { getHvacConfig } from 'src/modules/hvac/selectors/getHvacConfig';\nimport { getHvacData } from 'src/modules/hvac/selectors/getHvacData';\nimport { mapHvacStoreToForm } from 'src/modules/hvac/utils/mapHvacStoreToForm';\n\nexport const getHvacAssesmentFormData = createSelector([\n getHvacData,\n getHvacConfig,\n], mapHvacStoreToForm);\n","import { createSelector } from 'reselect';\nimport { getProjectLazy } from 'src/modules/common/selectors/getProjectLazy';\n\nexport const getHvacBuildingFormData = createSelector([\n getProjectLazy,\n], (project) => project.data.building);\n","import {\n HVAC_CONFIG,\n HvacArea,\n HvacConfigAddition,\n HvacConfigOption,\n HvacConfigSection,\n} from '@belimo-retrofit-portal/logic';\nimport { pipe } from 'fp-ts/function';\nimport { mapWithIndex } from 'fp-ts/ReadonlyRecord';\nimport { createSelector } from 'reselect';\nimport { getConfigHvac } from 'src/modules/config/selectors/getHvacConfig';\nimport { ConfigHvacSection } from 'src/modules/config/types/ConfigHvac';\nimport * as App from 'src/modules/hvac/types/HvacConfig';\nimport { assertDefined } from 'src/utils/assert';\n\nexport const getHvacConfig = createSelector([\n getConfigHvac,\n], (config): App.HvacConfig => {\n return pipe(\n HVAC_CONFIG,\n mapWithIndex(mapArea),\n );\n\n function mapArea(\n area: HvacArea,\n sections: ReadonlyArray,\n ): App.HvacConfigSection[] {\n return sections.map((section) => mapSection(area, section));\n }\n\n function mapSection(\n area: HvacArea,\n section: HvacConfigSection,\n ): App.HvacConfigSection {\n const extra = assertDefined(\n config[area].find((it) => it.id === section.id),\n 'Could not find HVAC section translations',\n { area, section, config },\n );\n\n return {\n ...section,\n name: extra.name,\n explanation: extra.explanation,\n option: section.option.map((option) => mapOption(area, extra, option)),\n additionals: section.additionals.map((addition) => mapAddition(area, extra, addition)),\n };\n }\n\n function mapOption(\n area: HvacArea,\n section: ConfigHvacSection,\n option: HvacConfigOption,\n ): App.HvacConfigOption {\n const extra = assertDefined(\n section.option.find((it) => it.id === option.id),\n 'Could not find HVAC option translations',\n { area, section, option, config },\n );\n\n return {\n ...option,\n title: extra.title,\n explanation: extra.explanation,\n };\n }\n\n function mapAddition(\n area: HvacArea,\n section: ConfigHvacSection,\n addition: HvacConfigAddition,\n ): App.HvacConfigAddition {\n const extra = assertDefined(\n section.additionals.find((it) => it.id === addition.id),\n 'Could not find HVAC addition translations',\n { area, section, addition, config },\n );\n\n return {\n ...addition,\n title: extra.title,\n placeholder: extra.placeholder,\n };\n }\n});\n","import { createSelector } from 'reselect';\nimport { getProjectLazy } from 'src/modules/common/selectors/getProjectLazy';\n\nexport const getHvacCurrencyCode = createSelector([\n getProjectLazy,\n], (project) => project.data.currency);\n","import { createSelector } from 'reselect';\nimport { getProjectLazy } from 'src/modules/common/selectors/getProjectLazy';\n\nexport const getHvacData = createSelector([\n getProjectLazy,\n], (project) => project.data.hvac);\n","import { createSelector } from 'reselect';\nimport { getHvacAssesmentFormData } from 'src/modules/hvac/selectors/getHvacAssesmentFormData';\nimport { HvacFormCounter, HvacFormCounters } from 'src/modules/hvac/types/HvacFormCounter';\nimport { HvacFormChapterData, HvacFormSectionAnswerData } from 'src/modules/hvac/types/HvacFormData';\n\nexport const getHvacFormCounters = createSelector([\n getHvacAssesmentFormData,\n], (formData): HvacFormCounters => ({\n heating: getCounter(formData.heating),\n cooling: getCounter(formData.cooling),\n ventilation: getCounter(formData.ventilation),\n}));\n\nfunction getCounter(formData: HvacFormChapterData): HvacFormCounter {\n return {\n answered: formData.sections.reduce((total, section) => {\n if (!section.enabled) {\n return total;\n }\n\n const answer = isAnswered(section.answer) ? 1 : 0;\n const copies = section.copies.reduce((sum, copy) => (isAnswered(copy.answer) ? sum + 1 : sum), 0);\n\n return total + answer + copies;\n }, 0),\n enabled: formData.sections.reduce((result, section) => {\n if (!section.enabled) {\n return result;\n }\n\n return result + 1 + section.copies.length;\n }, 0),\n };\n}\n\nfunction isAnswered(answer: HvacFormSectionAnswerData): boolean {\n return (\n answer.actual.option !== null &&\n answer.future.option !== null\n );\n}\n","import { createSelector } from 'reselect';\nimport { getHvacAssesmentFormData } from 'src/modules/hvac/selectors/getHvacAssesmentFormData';\nimport { getHvacBuildingFormData } from 'src/modules/hvac/selectors/getHvacBuildingFormData';\nimport { getHvacCurrencyCode } from 'src/modules/hvac/selectors/getHvacCurrencyCode';\nimport { HvacFormData } from 'src/modules/hvac/types/HvacFormData';\n\nexport const getHvacFormData = createSelector([\n getHvacCurrencyCode,\n getHvacBuildingFormData,\n getHvacAssesmentFormData,\n], (currency, building, assessment): HvacFormData => ({\n currency,\n building,\n assessment,\n}));\n","import { HvacResults, getHvacResults as API } from '@belimo-retrofit-portal/logic';\nimport { createSelector } from 'reselect';\nimport { getProjectLazy } from 'src/modules/common/selectors/getProjectLazy';\n\nexport const getHvacResults = createSelector([\n getProjectLazy,\n], (project): HvacResults => API(project.data));\n","import { HvacArea } from '@belimo-retrofit-portal/logic';\nimport { createSelector } from 'reselect';\nimport { getHvacAssesmentFormData } from 'src/modules/hvac/selectors/getHvacAssesmentFormData';\nimport { getHvacFormCounters } from 'src/modules/hvac/selectors/getHvacFormCounters';\n\nexport const getHvacResultsInaccurate = createSelector([\n getHvacFormCounters,\n getHvacAssesmentFormData,\n], (counters, formData): boolean => HVAC_AREAS\n .filter((area) => formData[area].enabled)\n .some((area) => (\n // enabled at least one section\n counters[area].enabled > 0 &&\n // enabled less than 5 sections\n counters[area].enabled < 5 &&\n // all enabled sections answered\n counters[area].enabled === counters[area].answered\n )));\n\nconst HVAC_AREAS = [\n HvacArea.HEATING,\n HvacArea.COOLING,\n HvacArea.VENTILATION,\n];\n","import { HvacResultsRating } from '@belimo-retrofit-portal/logic';\nimport { createSelector } from 'reselect';\nimport { getHvacResults } from 'src/modules/hvac/selectors/getHvacResults';\n\nexport const getHvacResultsOverallRating = createSelector([\n getHvacResults,\n], (results): HvacResultsRating => results.overall.rating);\n","export enum HvacAssessmentCategories {\n EMISSION = 'emission',\n DISTRIBUTION = 'distribution',\n GENERATION = 'generation',\n}\n","import { ISO_CATEGORIES } from 'src/modules/hvac/constants/ISOCategories';\nimport { HvacAssessmentCategories } from 'src/modules/hvac/types/HvacAssessmentCategories';\nimport { HvacFormSectionData } from 'src/modules/hvac/types/HvacFormData';\n\nexport function filterHvacSectionByCategory(\n sections: readonly HvacFormSectionData[],\n category: HvacAssessmentCategories,\n): { section: HvacFormSectionData; index: number }[] {\n const EMPTY_SECTIONS: { section: HvacFormSectionData; index: number }[] = [];\n return sections.reduce((prev, curr, index) => {\n if (ISO_CATEGORIES[curr.config.number] === category) {\n return [\n ...prev,\n {\n section: curr,\n index: index,\n }];\n }\n\n return prev;\n }, EMPTY_SECTIONS);\n}\n","import { HvacConfigSection } from 'src/modules/hvac/types/HvacConfig';\nimport { HvacFormSectionAnswerData } from 'src/modules/hvac/types/HvacFormData';\nimport { getDefaultFormVariant } from 'src/modules/hvac/utils/getDefaultFormVariant';\n\nexport function getDefaultFormAnswer(config: HvacConfigSection): HvacFormSectionAnswerData {\n return {\n actual: getDefaultFormVariant(config),\n future: getDefaultFormVariant(config),\n };\n}\n","import { HvacConfigSection } from 'src/modules/hvac/types/HvacConfig';\nimport { HvacFormSectionData } from 'src/modules/hvac/types/HvacFormData';\nimport { getDefaultFormAnswer } from 'src/modules/hvac/utils/getDefaultFormAnswer';\n\nexport function getDefaultFormSection(config: HvacConfigSection): HvacFormSectionData {\n return {\n title: '',\n enabled: false,\n config: config,\n copies: [],\n answer: getDefaultFormAnswer(config),\n };\n}\n","import { HvacConfigSection } from 'src/modules/hvac/types/HvacConfig';\nimport { HvacFormVariantData } from 'src/modules/hvac/types/HvacFormData';\n\nexport function getDefaultFormVariant(config: HvacConfigSection): HvacFormVariantData {\n return {\n option: null,\n additionals: config.additionals.map((it) => ({\n config: it,\n value: null,\n })),\n };\n}\n","import { ProjectReport } from '@belimo-retrofit-portal/logic';\nimport { Project } from 'src/modules/common/types/Project';\nimport { HvacFormData } from 'src/modules/hvac/types/HvacFormData';\n\nexport const getReportHvacEnergy = (formData: HvacFormData, previous: Project): ProjectReport => {\n const currHvacAreas = formData.assessment;\n const prevHvacAreas = previous.data.hvac.areas;\n const prevReportHvac = previous.data.report.hvac;\n const prevReportEnergy = previous.data.report.energy;\n\n const isHeatingAreaChanged = prevHvacAreas.heating.enabled !== currHvacAreas.heating.enabled;\n const isCoolingAreaChanged = prevHvacAreas.cooling.enabled !== currHvacAreas.cooling.enabled;\n const isVentilationAreaChanged = prevHvacAreas.ventilation.enabled !== currHvacAreas.ventilation.enabled;\n\n const report: ProjectReport = {\n ...previous.data.report,\n hvac: {\n ...previous.data.report.hvac,\n showHeating: isHeatingAreaChanged ? currHvacAreas.heating.enabled : prevReportHvac.showHeating,\n showCooling: isCoolingAreaChanged ? currHvacAreas.cooling.enabled : prevReportHvac.showCooling,\n showVentilation: isVentilationAreaChanged ? currHvacAreas.ventilation.enabled : prevReportHvac.showVentilation,\n },\n energy: {\n ...previous.data.report.energy,\n showHeating: isHeatingAreaChanged ? currHvacAreas.heating.enabled : prevReportEnergy.showHeating,\n showCooling: isCoolingAreaChanged ? currHvacAreas.cooling.enabled : prevReportEnergy.showCooling,\n showVentilation: isVentilationAreaChanged ? currHvacAreas.ventilation.enabled : prevReportEnergy.showVentilation,\n showComments: Boolean(currHvacAreas.comment),\n },\n };\n\n return report;\n};\n","import {\n HvacArea,\n ProjectHvac,\n ProjectHvacAnswer,\n ProjectHvacArea,\n ProjectHvacSection,\n ProjectHvacSectionCopy,\n ProjectHvacVariant,\n} from '@belimo-retrofit-portal/logic';\nimport { HvacConfigSection } from 'src/modules/hvac/types/HvacConfig';\nimport {\n HvacFormAdditionalValue,\n HvacFormAssessmentData,\n HvacFormChapterData,\n HvacFormSectionAnswerData,\n HvacFormSectionCopyData,\n HvacFormSectionData,\n HvacFormVariantData,\n} from 'src/modules/hvac/types/HvacFormData';\n\nexport function mapHvacFormToStore(form: HvacFormAssessmentData): ProjectHvac {\n return {\n comment: form.comment,\n prices: form.prices,\n areas: {\n [HvacArea.HEATING]: mapHvacFormChapter(form.heating),\n [HvacArea.COOLING]: mapHvacFormChapter(form.cooling),\n [HvacArea.VENTILATION]: mapHvacFormChapter(form.ventilation),\n },\n };\n}\n\nfunction mapHvacFormChapter(form: HvacFormChapterData): ProjectHvacArea {\n return {\n enabled: form.enabled,\n thermal: form.thermal,\n electrical: form.electrical,\n sections: form.sections.map(mapHvacFormSection),\n };\n}\n\nfunction mapHvacFormSection(form: HvacFormSectionData): ProjectHvacSection {\n return {\n id: form.config.id,\n title: form.title,\n enabled: form.enabled,\n answer: mapHvacFormSectionAnswer(form.answer, form.config),\n copies: form.copies.map((copy) => mapHvacFormSectionCopy(copy, form.config)),\n };\n}\n\nfunction mapHvacFormSectionCopy(\n form: HvacFormSectionCopyData,\n config: HvacConfigSection,\n): ProjectHvacSectionCopy {\n return {\n title: form.title,\n answer: mapHvacFormSectionAnswer(form.answer, config),\n };\n}\n\nfunction mapHvacFormSectionAnswer(\n form: HvacFormSectionAnswerData,\n config: HvacConfigSection,\n): ProjectHvacAnswer {\n return {\n actual: mapHvacFormVariant(form.actual),\n future: mapHvacFormVariant(form.future),\n };\n}\n\nfunction mapHvacFormVariant(form: HvacFormVariantData): ProjectHvacVariant {\n return {\n option: form.option?.id ?? null,\n additionals: form.additionals.reduce>((map, it) => {\n // eslint-disable-next-line no-param-reassign\n map[it.config.id] = it.value;\n return map;\n }, {}),\n };\n}\n","import {\n HvacArea,\n ProjectHvac,\n ProjectHvacAnswer,\n ProjectHvacArea,\n ProjectHvacSection,\n ProjectHvacSectionCopy,\n ProjectHvacVariant,\n} from '@belimo-retrofit-portal/logic';\nimport { HvacConfig, HvacConfigSection } from 'src/modules/hvac/types/HvacConfig';\nimport {\n HvacFormAssessmentData,\n HvacFormChapterData,\n HvacFormSectionAnswerData,\n HvacFormSectionCopyData,\n HvacFormSectionData,\n HvacFormVariantData,\n} from 'src/modules/hvac/types/HvacFormData';\nimport { getDefaultFormSection } from 'src/modules/hvac/utils/getDefaultFormSection';\n\nexport function mapHvacStoreToForm(\n store: ProjectHvac,\n config: HvacConfig,\n): HvacFormAssessmentData {\n return {\n comment: store.comment,\n prices: store.prices,\n\n heating: mapHvacFormChapter(\n store.areas[HvacArea.HEATING],\n config.heating,\n ),\n cooling: mapHvacFormChapter(\n store.areas[HvacArea.COOLING],\n config.cooling,\n ),\n ventilation: mapHvacFormChapter(\n store.areas[HvacArea.VENTILATION],\n config.ventilation,\n ),\n };\n}\n\nfunction mapHvacFormChapter(\n store: ProjectHvacArea,\n config: ReadonlyArray,\n): HvacFormChapterData {\n return {\n enabled: store.enabled,\n thermal: store.thermal,\n electrical: store.electrical,\n sections: config.map((section) => {\n const data = store.sections.find((it) => it.id === section.id);\n return data\n ? mapHvacFormSection(data, section)\n : getDefaultFormSection(section);\n }),\n };\n}\n\nfunction mapHvacFormSection(\n store: ProjectHvacSection,\n config: HvacConfigSection,\n): HvacFormSectionData {\n return {\n title: store.title,\n enabled: config.deactivation ? store.enabled : true,\n config: config,\n answer: mapHvacFormSectionAnswer(store.answer, config),\n copies: config.multiplication\n ? store.copies.map((copy) => mapHvacFormSectionCopy(copy, config))\n : [],\n };\n}\n\nfunction mapHvacFormSectionCopy(\n store: ProjectHvacSectionCopy,\n config: HvacConfigSection,\n): HvacFormSectionCopyData {\n return {\n title: store.title,\n answer: mapHvacFormSectionAnswer(store.answer, config),\n };\n}\n\nfunction mapHvacFormSectionAnswer(\n store: ProjectHvacAnswer,\n config: HvacConfigSection,\n): HvacFormSectionAnswerData {\n return {\n actual: mapHvacFormVariant(store.actual, config),\n future: mapHvacFormVariant(store.future, config),\n };\n}\n\nfunction mapHvacFormVariant(\n store: ProjectHvacVariant,\n config: HvacConfigSection,\n): HvacFormVariantData {\n return {\n option: config.option.find((it) => it.id === store.option) ?? null,\n additionals: config.additionals.map((it) => ({\n config: it,\n value: store.additionals[it.id] ?? null,\n })),\n };\n}\n","import {\n EnergySource,\n getCarbonIntensityEditable,\n getCarbonIntensityValue,\n HvacArea,\n} from '@belimo-retrofit-portal/logic';\nimport { Decimal } from 'decimal.js-light';\nimport { pipe } from 'fp-ts/function';\nimport * as L from 'monocle-ts/Lens';\nimport { HvacFormData } from 'src/modules/hvac/types/HvacFormData';\n\nconst toFixedDecimal = (decimalValue: Decimal | null, decimalPlaces: number): Decimal | null => (\n decimalValue ? new Decimal(decimalValue.toDecimalPlaces(decimalPlaces)) : null\n);\n\nexport function resolveHvacFormData(\n prevValues: HvacFormData,\n nextValues: HvacFormData,\n): HvacFormData {\n return pipe(\n nextValues,\n resolveThermalCarbonIntensity.bind(null, HvacArea.HEATING, prevValues),\n resolveThermalCarbonIntensity.bind(null, HvacArea.COOLING, prevValues),\n resolveThermalCarbonIntensity.bind(null, HvacArea.VENTILATION, prevValues),\n resolveElectricityCarbonIntensity.bind(null, HvacArea.HEATING, prevValues),\n resolveElectricityCarbonIntensity.bind(null, HvacArea.COOLING, prevValues),\n resolveElectricityCarbonIntensity.bind(null, HvacArea.VENTILATION, prevValues),\n );\n}\n\nfunction resolveThermalCarbonIntensity(\n system: HvacArea,\n prevValues: HvacFormData,\n nextValues: HvacFormData,\n): HvacFormData {\n const prevValue = toFixedDecimal(getCarbonIntensityValue(\n prevValues.assessment[system].thermal.energySource,\n prevValues.building.address.country,\n ), 2);\n const nextValue = toFixedDecimal(getCarbonIntensityValue(\n nextValues.assessment[system].thermal.energySource,\n nextValues.building.address.country,\n ), 2);\n\n const prevEditable = getCarbonIntensityEditable(prevValues.assessment[system].thermal.energySource);\n const nextEditable = getCarbonIntensityEditable(nextValues.assessment[system].thermal.energySource);\n\n if (\n nextEditable &&\n prevEditable &&\n decimalEquals(prevValue, nextValue)\n ) {\n return nextValues;\n }\n\n return pipe(\n L.id(),\n L.prop('assessment'),\n L.prop(system),\n L.prop('thermal'),\n L.prop('carbonIntensity'),\n L.modify((actual) => (\n decimalEquals(actual, nextValue)\n ? actual\n : nextValue\n )),\n )(nextValues);\n}\n\nfunction resolveElectricityCarbonIntensity(\n system: HvacArea,\n prevValues: HvacFormData,\n nextValues: HvacFormData,\n): HvacFormData {\n const nextValue = toFixedDecimal(getCarbonIntensityValue(\n EnergySource.ELECTRICITY,\n nextValues.building.address.country,\n ), 2);\n\n // electricity input is always disabled\n return pipe(\n L.id(),\n L.prop('assessment'),\n L.prop(system),\n L.prop('electrical'),\n L.prop('carbonIntensity'),\n L.modify((actual) => (\n decimalEquals(actual, nextValue)\n ? actual\n : nextValue\n )),\n )(nextValues);\n}\n\nfunction decimalEquals(a: Decimal | null, b: Decimal | null): boolean {\n if (a === null && b === null) {\n return true;\n }\n if (a !== null && b !== null) {\n return a.equals(b);\n }\n\n return false;\n}\n","import './HvacFormAssessmentView.scss';\nimport { HvacArea } from '@belimo-retrofit-portal/logic';\nimport { Tabs, Tooltip } from '@carbon/react';\nimport { FormController } from '@form-ts/core';\nimport { useFormWatch } from '@form-ts/react';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomTab, CustomTabList } from 'src/modules/common/components/CustomTabList';\nimport { TileCard } from 'src/modules/common/components/TileCard';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { HvacFormCounters } from 'src/modules/hvac/types/HvacFormCounter';\nimport { HvacFormData } from 'src/modules/hvac/types/HvacFormData';\nimport { HvacFormChapter } from 'src/modules/hvac/views/HvacFormChapter';\n\ntype Props = {\n readonly form: FormController;\n readonly counters: HvacFormCounters;\n};\n\nexport const HvacFormAssessmentView = ({ form, counters }: Props): React.ReactElement => {\n const intl = useIntl();\n\n const isHeatingEnabled = useFormWatch(\n form,\n form.field.at('assessment').at('heating').at('enabled').value.get,\n );\n const isCoolingEnabled = useFormWatch(\n form,\n form.field.at('assessment').at('cooling').at('enabled').value.get,\n );\n const isVentilationEnabled = useFormWatch(\n form,\n form.field.at('assessment').at('ventilation').at('enabled').value.get,\n );\n\n const defaultSelectedTab = useMemo(() => {\n if (isHeatingEnabled) {\n return 0;\n }\n\n if (isCoolingEnabled) {\n return 1;\n }\n\n if (isVentilationEnabled) {\n return 2;\n }\n\n return 0;\n }, [\n isHeatingEnabled,\n isCoolingEnabled,\n isVentilationEnabled,\n ]);\n\n const [activeTab, setActiveTab] = useState(defaultSelectedTab);\n\n const handleTabChange = useCallback((state: { selectedIndex: number }) => {\n setActiveTab(state.selectedIndex);\n }, []);\n\n const currentTab: HvacArea = useMemo(\n () => {\n const tab = [\n HvacArea.HEATING,\n HvacArea.COOLING,\n HvacArea.VENTILATION,\n ][activeTab];\n\n return tab || HvacArea.HEATING;\n },\n [activeTab],\n );\n\n useEffect(() => {\n const isCurrentTabActive = [\n isHeatingEnabled,\n isCoolingEnabled,\n isVentilationEnabled,\n ][activeTab];\n\n if (!isCurrentTabActive) {\n setActiveTab(defaultSelectedTab);\n }\n }, [isHeatingEnabled, isCoolingEnabled, isVentilationEnabled, activeTab, defaultSelectedTab]);\n\n return (\n }>\n
\n \n \n {isHeatingEnabled ? (\n \n
\n \n\n {counters[HvacArea.HEATING].answered}/{counters[HvacArea.HEATING].enabled}\n
\n
\n ) : (\n \n \n
\n \n\n {counters[HvacArea.HEATING].answered}/{counters[HvacArea.HEATING].enabled}\n
\n
\n \n )}\n\n {isCoolingEnabled ? (\n \n
\n \n\n {counters[HvacArea.COOLING].answered}/{counters[HvacArea.COOLING].enabled}\n
\n
\n ) : (\n \n \n
\n \n\n {counters[HvacArea.COOLING].answered}/{counters[HvacArea.COOLING].enabled}\n
\n
\n \n )}\n\n {isVentilationEnabled ? (\n \n
\n \n\n {counters[HvacArea.VENTILATION].answered}/{counters[HvacArea.VENTILATION].enabled}\n
\n
\n ) : (\n \n \n
\n \n\n {counters[HvacArea.VENTILATION].answered}/{counters[HvacArea.VENTILATION].enabled}\n
\n
\n \n )}\n \n
\n\n \n
\n
\n );\n};\n","import './HvacFormChapter.scss';\nimport { Accordion } from '@carbon/react';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormField } from '@form-ts/react';\nimport React, { memo, useMemo } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { BodyDesktopLargeRegularText } from 'src/modules/common/typography/BodyDesktopLargeRegularText';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { HvacAssessmentCategories } from 'src/modules/hvac/types/HvacAssessmentCategories';\nimport { HvacFormChapterData, HvacFormData } from 'src/modules/hvac/types/HvacFormData';\nimport { filterHvacSectionByCategory } from 'src/modules/hvac/utils/filterHvacSectonByCategory';\nimport { HvacFormSection } from 'src/modules/hvac/views/HvacFormSection';\nimport { HvacFormSectionCopy } from 'src/modules/hvac/views/HvacFormSectionCopy';\n\ntype Props = {\n readonly path: FieldPath;\n};\n\nexport const HvacFormChapter = memo(({ path }: Props) => {\n const { value } = useFormField(path);\n\n const emission = useMemo(\n () => filterHvacSectionByCategory(value.sections, HvacAssessmentCategories.EMISSION),\n [value.sections],\n );\n\n const distribution = useMemo(\n () => filterHvacSectionByCategory(value.sections, HvacAssessmentCategories.DISTRIBUTION),\n [value.sections],\n );\n\n const generation = useMemo(\n () => filterHvacSectionByCategory(value.sections, HvacAssessmentCategories.GENERATION),\n [value.sections],\n );\n\n return (\n \n {Boolean(emission.length) && (\n <>\n \n \n \n\n {emission.map(({ section, index }) => (\n \n \n\n {section.copies.map((copy, copyIndex) => (\n \n ))}\n \n ))}\n \n )}\n\n {Boolean(distribution.length) && (\n <>\n \n \n \n\n {distribution.map(({ section, index }) => (\n \n \n\n {section.copies.map((copy, copyIndex) => (\n \n ))}\n \n ))}\n \n )}\n\n {Boolean(generation.length) && (\n <>\n \n \n \n\n {generation.map(({ section, index }) => (\n \n \n\n {section.copies.map((copy, copyIndex) => (\n \n ))}\n \n ))}\n \n )}\n \n );\n});\n","import './HvacFormClearConfirmationModal.scss';\nimport { ModalBody, ModalFooter, ModalHeader } from '@carbon/react';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CustomModal } from 'src/modules/common/components/CustomModal';\nimport { BodyText } from 'src/modules/common/typography/BodyText';\nimport { LeadText } from 'src/modules/common/typography/LeadText';\n\ntype Props = {\n readonly open: boolean;\n readonly onCancel: () => void;\n readonly onSubmit: () => void;\n};\n\nexport const HvacFormClearConfirmationModal = ({\n open,\n onCancel,\n onSubmit,\n}: Props): React.ReactElement => {\n const intl = useIntl();\n\n return (\n \n \n\n \n
\n \n \n \n\n \n \n \n
\n
\n\n \n \n \n \n\n \n \n \n \n \n );\n};\n","import { ModalBody, ModalFooter, ModalHeader } from '@carbon/react';\nimport { useForm } from '@form-ts/react';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CustomModal } from 'src/modules/common/components/CustomModal';\nimport { TextAreaField } from 'src/modules/form/components/TextAreaField';\nimport { FormError } from 'src/modules/form/types/FormError';\n\ntype Props = {\n readonly open: boolean;\n readonly comment: string;\n readonly onCancel: () => void;\n readonly onSubmit: (title: string) => void;\n};\n\nexport const HvacFormCommentModal = ({ open, comment, onSubmit, onCancel }: Props): React.ReactElement => {\n const intl = useIntl();\n\n const form = useForm('hvac.comment', {\n reinitialize: true,\n initialValues: comment,\n });\n\n const handleSubmit = useCallback(() => {\n onSubmit(form.currentState.values);\n }, [form, onSubmit]);\n const handleCancel = useCallback(() => {\n form.reset(form.initialState);\n onCancel();\n }, [form, onCancel]);\n\n return (\n \n \n\n \n \n \n\n \n \n \n \n\n \n \n \n \n \n );\n};\n","import './HvacFormSection.scss';\nimport { AccordionItem } from '@carbon/react';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormField } from '@form-ts/react';\nimport { pipe } from 'fp-ts/function';\nimport React, { useCallback, useRef, useState } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { HvacFormData, HvacFormSectionData } from 'src/modules/hvac/types/HvacFormData';\nimport { getDefaultFormAnswer } from 'src/modules/hvac/utils/getDefaultFormAnswer';\nimport { HvacFormSectionContent } from 'src/modules/hvac/views/HvacFormSectionContent';\nimport { HvacFormSectionCopyTitleModal } from 'src/modules/hvac/views/HvacFormSectionCopyTitleModal';\nimport { HvacFormSectionHeader } from 'src/modules/hvac/views/HvacFormSectionHeader';\n\ntype Props = {\n readonly path: FieldPath;\n readonly readOnly: boolean;\n};\n\nexport const HvacFormSection = ({ path, readOnly }: Props): React.ReactElement => {\n const [titleModalOpen, setTitleModalOpen] = useState(false);\n const [isItemOpened, setItemOpened] = useState(false);\n\n const headerRef = useRef(null);\n\n const { value: section } = useFormField(path);\n\n const handleClick = useCallback((\n {\n isOpen,\n event,\n }: {\n isOpen: boolean;\n event: React.MouseEvent;\n },\n ) => {\n setItemOpened(isOpen);\n\n if (isOpen) {\n event.currentTarget.scrollIntoView({ behavior: 'smooth' });\n }\n }, []);\n\n const handleClear = useCallback(() => {\n const current = path.value.get(path.form.currentState);\n const value = getDefaultFormAnswer(current.config);\n\n path.form.change(pipe(\n path.form.currentState,\n path.at('answer').value.set(value),\n ));\n }, [path]);\n\n const handleToggle = useCallback(() => {\n const current = path.value.get(path.form.currentState);\n const value = !current.enabled;\n\n if (value && headerRef.current) {\n setItemOpened(value);\n headerRef.current.scrollIntoView({ behavior: 'smooth' });\n }\n\n path.form.change(pipe(\n path.form.currentState,\n path.at('enabled').value.set(value),\n ));\n }, [path]);\n\n const handleClone = useCallback(() => {\n const current = path.value.get(path.form.currentState);\n const value = current.copies.concat({\n title: 'copy',\n answer: getDefaultFormAnswer(current.config),\n });\n\n path.form.change(pipe(\n path.form.currentState,\n path.at('copies').value.set(value),\n ));\n }, [path]);\n\n const handleTitleModalOpen = useCallback(() => {\n setTitleModalOpen(true);\n }, []);\n\n const handleTitleModalCancel = useCallback(() => {\n setTitleModalOpen(false);\n }, []);\n\n const handleTitleModalSubmit = useCallback((title: string) => {\n setTitleModalOpen(false);\n\n path.form.change(pipe(\n path.form.currentState,\n path.at('title').value.set(title),\n ));\n }, [path]);\n\n const renderToggle: ({ onClick }: {\n onClick?: React.MouseEventHandler;\n }) => React.JSX.Element = useCallback(({ onClick }) => (\n \n {section.config.number}\n  \n \n {section.title && ` \\u2013 ${section.title}`}\n \n ), [\n isItemOpened,\n readOnly,\n handleToggle,\n handleClone,\n handleTitleModalOpen,\n section,\n ]);\n\n return (\n <>\n \n \n \n\n \n \n );\n};\n","import './HvacFormSectionContent.scss';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormField } from '@form-ts/react';\nimport * as L from 'monocle-ts/Lens';\nimport React from 'react';\nimport { useIntl } from 'react-intl';\nimport { TextAreaField } from 'src/modules/form/components/TextAreaField';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { HvacFormAdditionalData, HvacFormAdditionalValue, HvacFormData } from 'src/modules/hvac/types/HvacFormData';\nimport { assertNever } from 'src/utils/assert';\n\ntype Props = {\n readonly labelText: string;\n readonly field: FieldPath;\n readonly disabled: boolean;\n};\n\nexport const HvacFormSectionAdditionalInput = ({ labelText, field, disabled }: Props): React.ReactElement => {\n const intl = useIntl();\n const { value: { config } } = useFormField(field);\n\n if (config.element === 'textarea') {\n const placeholder = config.placeholder ? intl.formatMessage({ id: config.placeholder }) : undefined;\n return (\n \n );\n }\n\n return assertNever('Unexpected additional field', { field });\n};\n\nconst TO_TEXT_VALUE = L.lens(\n (value) => (typeof value === 'string' ? value : ''),\n (value) => (): string => value,\n);\n","import './HvacFormSectionAdditionals.scss';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormField } from '@form-ts/react';\nimport React from 'react';\nimport { useIntl } from 'react-intl';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { HvacFormAdditionalData, HvacFormData } from 'src/modules/hvac/types/HvacFormData';\nimport { HvacFormSectionAdditionalInput } from 'src/modules/hvac/views/HvacFormSectionAdditionalInput';\n\ntype Props = {\n readonly path: FieldPath>;\n readonly disabled: boolean;\n};\n\nexport const HvacFormSectionAdditionals = ({ path, disabled }: Props): React.ReactElement => {\n const intl = useIntl();\n\n const { value } = useFormField(path);\n\n return (\n
\n {value.map((field, index) => (\n \n ))}\n
\n );\n};\n","import './HvacFormSectionContent.scss';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormField } from '@form-ts/react';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { ResetIcon } from 'src/modules/common/icons/ResetIcon';\nimport { BodySmallText } from 'src/modules/common/typography/BodySmallText';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { HvacConfigOption, HvacConfigSection } from 'src/modules/hvac/types/HvacConfig';\nimport { HvacFormData, HvacFormSectionAnswerData } from 'src/modules/hvac/types/HvacFormData';\nimport { HvacFormSectionAdditionals } from 'src/modules/hvac/views/HvacFormSectionAdditionals';\nimport { HvacFormSectionFormBlock } from 'src/modules/hvac/views/HvacFormSectionFormBlock';\nimport { HvacFormSetupField } from 'src/modules/hvac/views/HvacFormSetupField';\nimport { HvacFormSetupOption } from 'src/modules/hvac/views/HvacFormSetupOption';\n\ntype Props = {\n readonly path: FieldPath;\n readonly disabled: boolean;\n readonly config: HvacConfigSection;\n readonly onClear: () => void;\n};\n\nexport const HvacFormSectionContent = ({\n path,\n disabled,\n config,\n onClear,\n}: Props): React.ReactElement => {\n const intl = useIntl();\n\n const { value: answer } = useFormField(path);\n\n return (\n
\n
\n \n {config.explanation !== null && (\n \n )}\n \n\n \n \n\n
\n \n
\n \n
\n\n }\n level={answer.actual.option?.class ?? null}\n >\n \n\n \n \n\n }\n level={answer.future.option?.class ?? null}\n >\n \n\n \n \n
\n );\n};\n\nfunction renderActualSetupOption(\n option: HvacConfigOption,\n): React.ReactElement {\n return (\n }\n comment={option.explanation && }\n renderComment={true}\n renderEfficiencyLabel={true}\n energyEfficiencyClass={option.class}\n />\n );\n}\n\nfunction renderActualSetupOptionSelected(\n option: HvacConfigOption,\n): React.ReactElement {\n return (\n }\n comment={option.explanation && }\n renderComment={false}\n renderEfficiencyLabel={false}\n />\n );\n}\n\nfunction renderFutureSetupOption(\n option: HvacConfigOption,\n): React.ReactElement {\n return (\n }\n comment={option.explanation && }\n renderComment={true}\n renderEfficiencyLabel={true}\n energyEfficiencyClass={option.class}\n />\n );\n}\n\nfunction renderFutureSetupOptionSelected(\n option: HvacConfigOption,\n): React.ReactElement {\n return (\n }\n comment={option.explanation && }\n renderComment={false}\n renderEfficiencyLabel={false}\n />\n );\n}\n","import './HvacFormSectionCopy.scss';\nimport { AccordionItem } from '@carbon/react';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormField } from '@form-ts/react';\nimport { pipe } from 'fp-ts/function';\nimport React, { useCallback, useState } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { HvacConfigSection } from 'src/modules/hvac/types/HvacConfig';\nimport { HvacFormChapterData, HvacFormData } from 'src/modules/hvac/types/HvacFormData';\nimport { getDefaultFormAnswer } from 'src/modules/hvac/utils/getDefaultFormAnswer';\nimport { HvacFormSectionContent } from 'src/modules/hvac/views/HvacFormSectionContent';\nimport {\n HvacFormSectionCopyDeleteConfirmationModal,\n} from 'src/modules/hvac/views/HvacFormSectionCopyDeleteConfirmationModal';\nimport { HvacFormSectionCopyTitleModal } from 'src/modules/hvac/views/HvacFormSectionCopyTitleModal';\nimport { HvacFormSectionHeader } from 'src/modules/hvac/views/HvacFormSectionHeader';\n\ntype Props = {\n readonly path: FieldPath;\n readonly config: HvacConfigSection;\n readonly disabled: boolean;\n readonly readOnly: boolean;\n readonly sectionIndex: number;\n readonly copyIndex: number;\n};\n\nexport const HvacFormSectionCopy = ({\n path, config, disabled, readOnly, sectionIndex, copyIndex,\n}: Props): React.ReactElement => {\n const [isItemOpened, setItemOpened] = useState(false);\n const [isDeleteConfirmationModalOpened, setDeleteConfirmationModalOpened] = useState(false);\n const [modalOpen, setModalOpen] = useState(false);\n\n const field = path.at('sections').at(sectionIndex).at('copies').at(copyIndex);\n\n const { value: section } = useFormField(field);\n\n const handleClick = useCallback((\n {\n isOpen,\n event,\n }: {\n isOpen: boolean;\n event: React.MouseEvent;\n },\n ) => {\n setItemOpened(isOpen);\n\n if (isOpen) {\n event.currentTarget.scrollIntoView({ behavior: 'smooth' });\n }\n }, []);\n\n const handleDeleteConfirmationModalOpen = useCallback(() => {\n setDeleteConfirmationModalOpened(true);\n }, []);\n\n const handleDeleteConfirmationModalCancel = useCallback(() => {\n setDeleteConfirmationModalOpened(false);\n }, []);\n\n const handleDeleteConfirmationModalSubmit = useCallback(() => {\n const copiesPath = path.at('sections').at(sectionIndex).at('copies');\n const copiesValues = copiesPath.value\n .get(path.form.currentState)\n .filter((_, index) => index !== copyIndex);\n\n path.form.change(pipe(\n path.form.currentState,\n copiesPath.value.set(copiesValues),\n ));\n\n setDeleteConfirmationModalOpened(false);\n }, [path, copyIndex, sectionIndex]);\n\n const handleClear = useCallback(() => {\n const answer = getDefaultFormAnswer(config);\n\n field.form.change(pipe(\n field.form.currentState,\n field.at('answer').value.set(answer),\n ));\n }, [field, config]);\n\n const handleModalOpen = useCallback(() => {\n setModalOpen(true);\n }, []);\n const handleModalCancel = useCallback(() => {\n setModalOpen(false);\n }, []);\n const handleModalSubmit = useCallback((title: string) => {\n setModalOpen(false);\n\n field.form.change(pipe(\n field.form.currentState,\n field.at('title').value.set(title),\n ));\n }, [field]);\n\n const renderToggle: ({ onClick }: {\n onClick?: React.MouseEventHandler;\n }) => React.JSX.Element = useCallback(({ onClick }) => (\n \n – {section.title}\n \n ), [\n isItemOpened,\n disabled,\n readOnly,\n handleDeleteConfirmationModalOpen,\n handleModalOpen,\n config.name,\n section,\n ]);\n\n return (\n <>\n \n \n \n\n \n\n – {section.title}}\n open={isDeleteConfirmationModalOpened}\n onClose={handleDeleteConfirmationModalCancel}\n onSubmit={handleDeleteConfirmationModalSubmit}\n />\n \n );\n};\n","import './HvacFormSectionCopyDeleteConfirmationModal.scss';\nimport { WarningFilled } from '@carbon/icons-react';\nimport { ModalBody, ModalFooter, ModalHeader } from '@carbon/react';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CustomModal } from 'src/modules/common/components/CustomModal';\nimport { CARBON_THEME } from 'src/modules/common/constants/theme';\nimport { BodyText } from 'src/modules/common/typography/BodyText';\nimport { LeadText } from 'src/modules/common/typography/LeadText';\n\ntype Props = {\n sectionName: React.ReactNode;\n open: boolean;\n onClose: () => void;\n onSubmit: () => void;\n};\n\nexport const HvacFormSectionCopyDeleteConfirmationModal = (\n { sectionName, open, onClose, onSubmit }: Props,\n): React.ReactElement => {\n const intl = useIntl();\n\n return (\n \n }\n iconDescription={intl.formatMessage({ id: 'modal/close/label' })}\n labelClassName=\"bp-hvac-form-section-copy-delete-confirmation-modal__label\"\n />\n\n \n \n\n \n \n \n\n \n \n \n \n\n \n \n \n \n\n \n \n \n \n \n );\n};\n","import { ModalBody, ModalFooter, ModalHeader } from '@carbon/react';\nimport { useForm } from '@form-ts/react';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CustomModal } from 'src/modules/common/components/CustomModal';\nimport { TextField } from 'src/modules/form/components/TextField';\nimport { FormError } from 'src/modules/form/types/FormError';\n\ntype Props = {\n readonly open: boolean;\n readonly title: string;\n readonly onCancel: () => void;\n readonly onSubmit: (title: string) => void;\n};\n\nexport const HvacFormSectionCopyTitleModal = ({ open, title, onSubmit, onCancel }: Props): React.ReactElement => {\n const intl = useIntl();\n\n const form = useForm('hvac.section.copy.title', {\n reinitialize: true,\n initialValues: title,\n });\n\n const handleSubmit = useCallback(() => {\n onSubmit(form.currentState.values);\n }, [form, onSubmit]);\n const handleCancel = useCallback(() => {\n form.reset(form.initialState);\n onCancel();\n }, [form, onCancel]);\n\n return (\n \n \n\n \n \n }\n maxLength={80}\n />\n \n\n \n \n \n \n\n \n \n \n \n \n );\n};\n","import './HvacFormSectionFormBlock.scss';\nimport { EnergyEfficiencyClass } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\nimport { EnergyEfficiencyLabel } from 'src/modules/common/components/EnergyEfficiencyLabel';\nimport { LABELS } from 'src/modules/common/constants/energyEfficiencyLabels';\nimport { LeadText } from 'src/modules/common/typography/LeadText';\n\ntype Props = {\n readonly title: React.ReactNode;\n readonly level: EnergyEfficiencyClass | null;\n readonly children: React.ReactNode;\n};\n\nexport const HvacFormSectionFormBlock = ({ title, level, children }: Props): React.ReactElement => (\n
\n
\n \n {title}\n \n\n
\n \n {level === null ? '\\u2013' : LABELS[level]}\n \n
\n
\n\n
\n {children}\n
\n
\n);\n","import './HvacFormSectionHeader.scss';\nimport { EnergyEfficiencyClass } from '@belimo-retrofit-portal/logic';\nimport { ChevronDown, ChevronUp, OverflowMenuVertical } from '@carbon/icons-react';\nimport clsx from 'clsx';\nimport React, { MouseEventHandler, MutableRefObject, memo, useCallback, useMemo } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CustomMenu } from 'src/modules/common/components/CustomMenu';\nimport { CustomMenuItem } from 'src/modules/common/components/CustomMenuItem';\nimport { CustomToggle } from 'src/modules/common/components/CustomToggle';\nimport { EnergyEfficiencyTransition } from 'src/modules/common/components/EnergyEfficiencyTransition';\nimport { CARBON_THEME } from 'src/modules/common/constants/theme';\nimport { CopyIcon } from 'src/modules/common/icons/CopyIcon';\nimport { DeleteIcon } from 'src/modules/common/icons/DeleteIcon';\nimport { EditIcon } from 'src/modules/common/icons/EditIcon';\n\ntype Props = {\n readonly actual: EnergyEfficiencyClass | null;\n readonly future: EnergyEfficiencyClass | null;\n readonly disabled: boolean;\n readonly readOnly: boolean;\n readonly children: React.ReactNode;\n readonly isItemOpened: boolean;\n readonly isCopy: boolean;\n readonly wrapperRef?: MutableRefObject;\n\n readonly onClick?: MouseEventHandler;\n readonly onToggle?: () => void;\n readonly onClone?: () => void;\n readonly onRemove?: () => void;\n readonly onRename?: () => void;\n};\n\nexport const HvacFormSectionHeader = memo(({\n actual,\n future,\n disabled,\n readOnly,\n isItemOpened,\n isCopy,\n wrapperRef,\n onClick,\n onToggle,\n onClone,\n onRemove,\n onRename,\n children,\n}: Props): React.ReactElement => {\n const intl = useIntl();\n\n const isRenameExist = useMemo(() => onRename !== undefined, [onRename]);\n const isCloneExist = useMemo(() => onClone !== undefined, [onClone]);\n const isRemoveExist = useMemo(() => onRemove !== undefined, [onRemove]);\n\n const handleClone = useCallback((event: React.MouseEvent) => {\n stopPropagation(event);\n onClone?.();\n }, [onClone]);\n const handleRemove = useCallback((event: React.MouseEvent) => {\n stopPropagation(event);\n onRemove?.();\n }, [onRemove]);\n const handleRename = useCallback((event: React.MouseEvent) => {\n stopPropagation(event);\n onRename?.();\n }, [onRename]);\n const handleClick = useCallback((event: React.MouseEvent) => {\n stopPropagation(event);\n }, []);\n\n return (\n null}\n style={{\n opacity: readOnly ? 0.5 : undefined,\n pointerEvents: readOnly ? 'none' : 'auto',\n }}\n >\n \n {isItemOpened ? (\n \n ) : (\n \n )}\n \n\n
\n \n {children}\n \n\n \n \n
\n \n\n
\n
\n {onToggle !== undefined && (\n \n )}\n
\n\n {(isRenameExist || isCloneExist || isRemoveExist) && (\n e?.preventDefault()}\n flipped={true}\n className=\"bp-hvac-form-section-header__menu\"\n iconDescription={intl.formatMessage({ id: 'hvac/form/section/actions' })}\n tooltipPosition=\"bottom\"\n disabled={readOnly || disabled}\n renderIcon={() => }\n >\n {isRenameExist && (\n \n
\n \n
\n\n \n \n )}\n />\n )}\n\n {isCloneExist && (\n \n
\n \n
\n\n \n \n )}\n />\n )}\n\n {isRemoveExist && (\n \n
\n \n
\n\n \n \n )}\n />\n )}\n \n )}\n
\n \n );\n});\n\nfunction stopPropagation(event: React.MouseEvent): void {\n event.stopPropagation();\n}\n","import './HvacFormSectionContent.scss';\nimport './HvacFormSetupField.scss';\nimport { FieldPath } from '@form-ts/core';\nimport React, { useCallback } from 'react';\nimport { useIntl } from 'react-intl';\nimport { DropdownField } from 'src/modules/form/components/DropdownField';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { HvacConfigOption } from 'src/modules/hvac/types/HvacConfig';\nimport { HvacFormData } from 'src/modules/hvac/types/HvacFormData';\n\ntype Props = {\n readonly field: FieldPath;\n readonly disabled: boolean;\n readonly options: ReadonlyArray;\n readonly title: string;\n readonly renderOption: (option: HvacConfigOption) => React.ReactElement;\n readonly renderSelectedOption: (option: HvacConfigOption) => React.ReactElement;\n};\n\nexport const HvacFormSetupField = ({\n field,\n disabled,\n options,\n title,\n renderOption,\n renderSelectedOption,\n}: Props): React.ReactElement => {\n const intl = useIntl();\n\n const getOptionLabel = useCallback((option: HvacConfigOption | null) => (\n option\n ? intl.formatMessage({ id: option.title })\n : ''\n ), [intl]);\n\n return (\n \n );\n};\n","import './HvacFormSetupOption.scss';\nimport { EnergyEfficiencyClass } from '@belimo-retrofit-portal/logic';\nimport clsx from 'clsx';\nimport React from 'react';\nimport { EnergyEfficiencyLabel } from 'src/modules/common/components/EnergyEfficiencyLabel';\nimport { LABELS } from 'src/modules/common/constants/energyEfficiencyLabels';\n\ntype Props = {\n readonly label: React.ReactNode;\n readonly comment: React.ReactNode;\n readonly renderComment: boolean;\n readonly renderEfficiencyLabel?: boolean;\n readonly energyEfficiencyClass?: EnergyEfficiencyClass;\n};\n\nexport const HvacFormSetupOption = ({\n label,\n comment,\n renderComment,\n renderEfficiencyLabel,\n energyEfficiencyClass,\n}: Props): React.ReactElement => (\n
\n {renderEfficiencyLabel && (\n
\n \n {energyEfficiencyClass ? LABELS[energyEfficiencyClass] : '\\u2013' }\n \n
\n )}\n\n
\n
\n
\n {label}\n
\n
\n\n {(renderComment && comment) && (\n
\n {comment}\n
\n )}\n
\n
\n);\n","import './HvacResultEnergyElectricalView.scss';\nimport { EnergySource, getCarbonIntensityEditable, ProjectHvacConsumption } from '@belimo-retrofit-portal/logic';\nimport { FieldPath } from '@form-ts/core';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CarbonIntensityUnit } from 'src/modules/common/components/CarbonIntensityUnit';\nimport { EnergySourceUnit } from 'src/modules/common/components/EnergySourceUnit';\nimport { DecimalField } from 'src/modules/form/components/DecimalField';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { HvacFormData } from 'src/modules/hvac/types/HvacFormData';\n\ntype Props = {\n readonly path: FieldPath;\n readonly disabled: boolean;\n readonly tooltip?: React.ReactNode;\n};\n\nexport const HvacResultEnergyElectricalView = ({ path, disabled, tooltip }: Props): React.ReactElement => {\n const intl = useIntl();\n\n return (\n
\n \n \n\n {tooltip}\n
\n )}\n field={path.at('annualEnergyUse')}\n disabled={disabled}\n autoComplete=\"off\"\n endAdornment={}\n />\n\n }\n />\n \n );\n};\n","import './HvacResultEnergyPricesView.scss';\nimport { CurrencyCode, EnergySource, HvacArea } from '@belimo-retrofit-portal/logic';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormWatch } from '@form-ts/react';\nimport clsx from 'clsx';\nimport React from 'react';\nimport { useIntl } from 'react-intl';\nimport { EnergyPriceUnit } from 'src/modules/common/components/EnergyPriceUnit';\nimport { DECIMAL_PLACES, MAX_TRILLION } from 'src/modules/common/constants/decimal';\nimport { DecimalField } from 'src/modules/form/components/DecimalField';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { HvacFormAssessmentData, HvacFormData } from 'src/modules/hvac/types/HvacFormData';\n\ntype Props = {\n readonly path: FieldPath;\n readonly currency: CurrencyCode;\n readonly heatingEnabled: boolean;\n readonly coolingEnabled: boolean;\n readonly horizontal?: boolean;\n};\n\nexport const HvacResultEnergyPricesView = ({\n path,\n currency,\n heatingEnabled,\n coolingEnabled,\n horizontal,\n}: Props): React.ReactElement => {\n const intl = useIntl();\n\n const energyInfo = useFormWatch(path.form, path.value.get);\n const visibleSources = getVisibleEnergySources(energyInfo, heatingEnabled, coolingEnabled);\n\n return (\n
\n {visibleSources.map((source) => (\n \n )}\n />\n ))}\n
\n );\n};\n\nfunction getVisibleEnergySources(\n formData: HvacFormAssessmentData,\n heatingEnabled: boolean,\n coolingEnabled: boolean,\n): EnergySource[] {\n return Array.from(new Set([\n ...getSystemEnergySources(formData, HvacArea.HEATING, heatingEnabled),\n ...getSystemEnergySources(formData, HvacArea.COOLING, coolingEnabled),\n ]));\n}\n\nfunction getSystemEnergySources(\n formData: HvacFormAssessmentData,\n systemType: HvacArea,\n systemEnabled: boolean,\n): EnergySource[] {\n return systemEnabled\n ? [EnergySource.ELECTRICITY, formData[systemType].thermal.energySource]\n : [EnergySource.ELECTRICITY];\n}\n","import './HvacResultEnergyThermalView.scss';\nimport { EnergySource, getCarbonIntensityEditable, ProjectHvacConsumption } from '@belimo-retrofit-portal/logic';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormWatch } from '@form-ts/react';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CarbonIntensityUnit } from 'src/modules/common/components/CarbonIntensityUnit';\nimport { EnergySourceUnit } from 'src/modules/common/components/EnergySourceUnit';\nimport { DecimalField } from 'src/modules/form/components/DecimalField';\nimport { DropdownField } from 'src/modules/form/components/DropdownField';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { ensureNonNull } from 'src/modules/form/utils/transform';\nimport { HvacFormData } from 'src/modules/hvac/types/HvacFormData';\n\ntype Props = {\n readonly path: FieldPath;\n readonly disabled: boolean;\n readonly energySources: ReadonlyArray;\n};\n\nexport const HvacResultEnergyThermalView = ({ path, disabled, energySources }: Props): React.ReactElement => {\n const intl = useIntl();\n\n const energySource = useFormWatch(path.form, path.at('energySource').value.get);\n\n return (\n
\n \n\n }\n />\n\n }\n />\n
\n );\n};\n\nfunction renderEnergySourceOption(option: EnergySource): React.ReactElement {\n return ;\n}\n","import './HvacResultEnergyView.scss';\nimport { CurrencyCode } from '@belimo-retrofit-portal/logic';\nimport { Information } from '@carbon/icons-react';\nimport { Tooltip } from '@carbon/react';\nimport { FormController } from '@form-ts/core';\nimport { useFormWatch } from '@form-ts/react';\nimport clsx from 'clsx';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { TileCard } from 'src/modules/common/components/TileCard';\nimport {\n CURRENCY_CODE_OPTIONS,\n ENERGY_SOURCE_COOLING_OPTIONS,\n ENERGY_SOURCE_HEATING_OPTIONS,\n} from 'src/modules/common/constants/options';\nimport { CARBON_THEME } from 'src/modules/common/constants/theme';\nimport { CoolingIcon } from 'src/modules/common/icons/CoolingIcon';\nimport { HeatingIcon } from 'src/modules/common/icons/HeatingIcon';\nimport { LightningIcon } from 'src/modules/common/icons/LightningIcon';\nimport { BodyLargeRegularText } from 'src/modules/common/typography/BodyLargeRegularText';\nimport { DropdownField } from 'src/modules/form/components/DropdownField';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { ensureNonNull } from 'src/modules/form/utils/transform';\nimport { HvacFormData } from 'src/modules/hvac/types/HvacFormData';\nimport { HvacResultEnergyElectricalView } from 'src/modules/hvac/views/HvacResultEnergyElectricalView';\nimport { HvacResultEnergyPricesView } from 'src/modules/hvac/views/HvacResultEnergyPricesView';\nimport { HvacResultEnergyThermalView } from 'src/modules/hvac/views/HvacResultEnergyThermalView';\n\nconst CURRENCY_CODE_OPTIONS_SORTED = [...CURRENCY_CODE_OPTIONS].sort();\n\ntype Props = {\n readonly form: FormController;\n};\n\nexport const HvacResultEnergyView = ({ form }: Props): React.ReactElement => {\n const intl = useIntl();\n\n const currency = useFormWatch(form, form.field.at('currency').value.get);\n const heatingEnabled = useFormWatch(form, form.field.at('assessment').at('heating').at('enabled').value.get);\n const coolingEnabled = useFormWatch(form, form.field.at('assessment').at('cooling').at('enabled').value.get);\n const ventilationEnabled = useFormWatch(form, form.field.at('assessment').at('ventilation').at('enabled').value.get);\n\n return (\n <>\n }>\n
\n
\n
\n
\n
\n \n
\n\n \n \n \n
\n
\n\n \n
\n\n
\n
\n
\n
\n \n
\n\n \n \n \n
\n
\n\n \n
\n
\n\n
\n
\n
\n
\n
\n \n
\n\n \n \n \n
\n
\n\n }\n className={clsx(\n 'bp-hvac-result-energy-view__tooltip',\n {\n 'bp-hvac-result-energy-view__tooltip--disabled': !heatingEnabled,\n },\n )}\n >\n \n \n )}\n />\n
\n\n
\n
\n
\n
\n \n
\n\n \n \n \n
\n
\n\n }\n className={clsx(\n 'bp-hvac-result-energy-view__tooltip',\n {\n 'bp-hvac-result-energy-view__tooltip--disabled': !coolingEnabled,\n },\n )}\n >\n \n \n )}\n />\n
\n\n
\n
\n
\n
\n \n
\n\n \n \n \n
\n
\n\n
\n\n \n
\n
\n \n\n }>\n
\n
\n
\n \n
\n
\n
\n\n
\n \n
\n
\n \n );\n};\n\nfunction renderCurrencyCodeOption(option: CurrencyCode): React.ReactElement {\n return ;\n}\n","import './HvacResultSavingsExplanation.scss';\nimport { HvacResultsOverall } from '@belimo-retrofit-portal/logic';\nimport { FormController } from '@form-ts/core';\nimport { useFormWatch } from '@form-ts/react';\nimport React from 'react';\nimport { FormattedHTMLMessage, FormattedMessage, useIntl } from 'react-intl';\nimport { BottomNavigationHelper } from 'src/modules/common/components/BottomNavigationHelper';\nimport { FormattedAmount } from 'src/modules/common/components/FormattedAmount';\nimport { HorizontalDivider } from 'src/modules/common/components/HorizontalDivider';\nimport { SavingsAmount } from 'src/modules/common/components/SavingsAmount';\nimport { WarningIcon } from 'src/modules/common/icons/WarningIcon';\nimport { BodyDesktopSmallLightText } from 'src/modules/common/typography/BodyDesktopSmallLightText';\nimport { BodySmallText } from 'src/modules/common/typography/BodySmallText';\nimport { LeadText } from 'src/modules/common/typography/LeadText';\nimport { TitleText } from 'src/modules/common/typography/TitleText';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { HvacFormData } from 'src/modules/hvac/types/HvacFormData';\n\ntype Props = {\n readonly projectId: string;\n readonly form: FormController;\n readonly results: HvacResultsOverall;\n readonly inaccurate: boolean;\n};\n\nexport const HvacResultSavingsExplanation = ({ projectId, form, results, inaccurate }: Props): React.ReactElement => {\n const intl = useIntl();\n\n const projectBaseUrl = `/project/${encodeURIComponent(projectId)}`;\n const projectSchemaUrl = `/project/${encodeURIComponent(projectId)}/schema`;\n\n const currency = useFormWatch(form, form.field.at('currency').value.get);\n\n return (\n
\n
\n
\n \n \n \n\n \n \n \n
\n\n {inaccurate && (\n
\n
\n \n
\n
\n \n
\n
\n )}\n\n \n\n
\n \n \n \n\n \n \n \n
\n
\n\n \n\n \n \n \n
\n );\n};\n","import './HvacResultSavingsOverall.scss';\nimport { EnergySource, HvacArea, HvacResults } from '@belimo-retrofit-portal/logic';\nimport { Information } from '@carbon/icons-react';\nimport { Stack, Tooltip } from '@carbon/react';\nimport { FormController } from '@form-ts/core';\nimport { useFormWatch } from '@form-ts/react';\nimport clsx from 'clsx';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CarbonSavingsUnit } from 'src/modules/common/components/CarbonSavingsUnit';\nimport { EnergyEfficiencyLabelWrapper } from 'src/modules/common/components/EnergyEfficiencyLabelWrapper';\nimport { EnergyEfficiencyStack } from 'src/modules/common/components/EnergyEfficiencyStack';\nimport { EnergySavingsUnit } from 'src/modules/common/components/EnergySavingsUnit';\nimport { FormattedMathMessage } from 'src/modules/common/components/FormattedMathMessage';\nimport { SavingsAmount } from 'src/modules/common/components/SavingsAmount';\nimport { SavingsValue } from 'src/modules/common/components/SavingsValue';\nimport { SavingTileCard } from 'src/modules/common/components/SavingTileCard';\nimport { sub, sup } from 'src/modules/common/constants/formattingHelpers';\nimport { CARBON_THEME } from 'src/modules/common/constants/theme';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\nimport { CloudIcon } from 'src/modules/common/icons/CloudIcon';\nimport { CoolingIcon } from 'src/modules/common/icons/CoolingIcon';\nimport { FanIcon } from 'src/modules/common/icons/FanIcon';\nimport { HeatingIcon } from 'src/modules/common/icons/HeatingIcon';\nimport { LightningIcon } from 'src/modules/common/icons/LightningIcon';\nimport { BodySmallText } from 'src/modules/common/typography/BodySmallText';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { HvacFormData } from 'src/modules/hvac/types/HvacFormData';\n\ntype Props = {\n readonly form: FormController;\n readonly results: HvacResults;\n};\n\nexport const HvacResultSavingsOverall = ({ form, results }: Props): React.ReactElement => {\n const intl = useIntl();\n\n const currency = useFormWatch(form, form.field.at('currency').value.get);\n const heatingEnabled = useFormWatch(form, form.field.at('assessment').at('heating').at('enabled').value.get);\n const coolingEnabled = useFormWatch(form, form.field.at('assessment').at('cooling').at('enabled').value.get);\n const ventilationEnabled = useFormWatch(form, form.field.at('assessment').at('ventilation').at('enabled').value.get);\n\n return (\n <>\n \n
\n
\n
\n\n
\n

\n \n

\n\n
 
\n\n

\n \n

\n
\n
\n\n \n
\n
\n \n
\n\n \n \n \n
\n\n
\n
\n \n
\n\n
\n \n
\n\n
\n \n
\n
\n
\n\n \n
\n
\n \n
\n\n \n \n \n
\n\n
\n
\n \n
\n\n
\n \n
\n\n
\n \n
\n
\n
\n\n \n
\n
\n \n
\n\n

\n \n

\n
\n\n
\n
\n \n
\n\n
\n \n
\n\n
\n \n
\n
\n
\n\n
\n
\n \n \n \n
\n\n
\n
\n
\n \n
\n
\n\n
 
\n\n
\n
\n \n
\n
\n
\n
\n \n \n\n
\n \n )}\n amountTitle={intl.formatMessage({ id: 'hvac/result/savings/potential/thermalSavings/diagram/label' })}\n icon={}\n savingTitle={intl.formatMessage({ id: 'hvac/result/savings/potential/thermalSavings/title' })}\n unit={}\n small={false}\n >\n
\n
\n \n
\n\n
\n \n
\n
\n \n
\n
\n\n
\n
\n \n
\n\n
\n \n
\n
\n \n
\n
\n\n
\n
\n \n
\n\n
\n \n
\n
\n \n\n \n )}\n amountTitle={intl.formatMessage({ id: 'hvac/result/savings/potential/electricalSavings/diagram/label' })}\n icon={}\n savingTitle={intl.formatMessage({ id: 'hvac/result/savings/potential/electricalSavings/title' })}\n unit={}\n small={false}\n >\n
\n
\n \n
\n\n
\n \n
\n
\n \n
\n
\n\n
\n
\n \n
\n\n
\n \n
\n
\n \n\n \n )}\n amountTitle={(\n \n )}\n icon={}\n savingTitle={(\n \n )}\n unit={(\n
\n \n\n \n )}\n >\n \n \n
\n )}\n small={false}\n >\n
\n
\n \n
\n\n
\n \n
\n
\n \n
\n
\n\n
\n
\n \n
\n\n
\n \n
\n
\n \n
\n
\n \n
\n \n );\n};\n","import './HvacResultSavingsSystem.scss';\nimport { EnergySource, HvacArea, HvacResultsArea } from '@belimo-retrofit-portal/logic';\nimport { Stack } from '@carbon/react';\nimport { FormController } from '@form-ts/core';\nimport { useFormWatch } from '@form-ts/react';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CarbonSavingsUnit } from 'src/modules/common/components/CarbonSavingsUnit';\nimport { EnergyEfficiencyStack } from 'src/modules/common/components/EnergyEfficiencyStack';\nimport { EnergySavingsUnit } from 'src/modules/common/components/EnergySavingsUnit';\nimport { SavingsAmount } from 'src/modules/common/components/SavingsAmount';\nimport { SavingsValue } from 'src/modules/common/components/SavingsValue';\nimport { SavingTileCard } from 'src/modules/common/components/SavingTileCard';\nimport { sub, sup } from 'src/modules/common/constants/formattingHelpers';\nimport { HeatingIcon } from 'src/modules/common/icons/HeatingIcon';\nimport { LightningIcon } from 'src/modules/common/icons/LightningIcon';\nimport { BodySmallText } from 'src/modules/common/typography/BodySmallText';\nimport { HeadlineSmallText } from 'src/modules/common/typography/HeadlineSmallText';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { HvacFormData } from 'src/modules/hvac/types/HvacFormData';\n\ntype Props = {\n readonly form: FormController;\n readonly results: HvacResultsArea;\n};\n\nexport const HvacResultSavingsSystem = ({ form, results }: Props): React.ReactElement => {\n const intl = useIntl();\n const currency = useFormWatch(form, form.field.at('currency').value.get);\n\n return (\n \n
\n
\n
\n \n \n \n\n \n \n \n
\n\n
\n \n
\n
\n\n
\n
\n \n \n \n\n \n \n \n
\n\n
\n \n
\n
\n
\n\n
\n {results.type !== HvacArea.VENTILATION && (\n \n )}\n amountTitle={intl.formatMessage({ id: 'hvac/result/savings/potential/thermalSavings/diagram/label' })}\n icon={}\n savingTitle={intl.formatMessage({ id: 'hvac/result/savings/potential/thermalSavings/title' })}\n unit={}\n small={false}\n >\n
\n
\n \n
\n\n
\n \n
\n
\n \n
\n
\n\n
\n
\n \n
\n\n
\n \n
\n
\n \n )}\n\n \n )}\n amountTitle={intl.formatMessage({ id: 'hvac/result/savings/potential/electricalSavings/diagram/label' })}\n icon={}\n savingTitle={intl.formatMessage({ id: 'hvac/result/savings/potential/electricalSavings/title' })}\n unit={}\n small={false}\n >\n
\n
\n \n
\n\n
\n \n
\n
\n \n
\n
\n\n
\n
\n \n
\n\n
\n \n
\n
\n \n\n \n )}\n amountTitle={(\n \n )}\n icon={}\n savingTitle={(\n \n )}\n unit={}\n small={false}\n >\n {results.type !== HvacArea.VENTILATION && (\n
\n
\n \n
\n\n
\n \n
\n
\n \n
\n
\n )}\n\n
\n
\n \n
\n\n
\n \n
\n
\n \n
\n
\n \n
\n
\n );\n};\n","import './HvacResultSavingsView.scss';\nimport { HvacArea, HvacResults } from '@belimo-retrofit-portal/logic';\nimport { TabPanel, TabPanels, Tabs, Tooltip } from '@carbon/react';\nimport { FormController } from '@form-ts/core';\nimport { useFormWatch } from '@form-ts/react';\nimport React, { useCallback, useEffect, useState } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomTab, CustomTabList } from 'src/modules/common/components/CustomTabList';\nimport { TileCard } from 'src/modules/common/components/TileCard';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { HvacFormData } from 'src/modules/hvac/types/HvacFormData';\nimport { HvacResultSavingsExplanation } from 'src/modules/hvac/views/HvacResultSavingsExplanation';\nimport { HvacResultSavingsOverall } from 'src/modules/hvac/views/HvacResultSavingsOverall';\nimport { HvacResultSavingsSystem } from 'src/modules/hvac/views/HvacResultSavingsSystem';\n\ntype Props = {\n readonly projectId: string;\n readonly form: FormController;\n readonly results: HvacResults;\n readonly inaccurate: boolean;\n};\n\nconst overallTabIndex = 0;\nconst heatingTabIndex = 1;\nconst coolingTabIndex = 2;\nconst ventilationTabIndex = 3;\n\nexport const HvacResultSavingsView = ({ projectId, form, results, inaccurate }: Props): React.ReactElement => {\n const intl = useIntl();\n\n const [activeTab, setActiveTab] = useState(0);\n\n const handleTabChange = useCallback((state: { selectedIndex: number }) => {\n setActiveTab(state.selectedIndex);\n }, []);\n\n const heatingEnabled = useFormWatch(form, form.field.at('assessment').at('heating').at('enabled').value.get);\n const coolingEnabled = useFormWatch(form, form.field.at('assessment').at('cooling').at('enabled').value.get);\n const ventilationEnabled = useFormWatch(form, form.field.at('assessment').at('ventilation').at('enabled').value.get);\n\n useEffect(() => {\n if (activeTab === heatingTabIndex && !heatingEnabled) {\n setActiveTab(overallTabIndex);\n }\n if (activeTab === coolingTabIndex && !coolingEnabled) {\n setActiveTab(overallTabIndex);\n }\n if (activeTab === ventilationTabIndex && !ventilationEnabled) {\n setActiveTab(overallTabIndex);\n }\n }, [activeTab, heatingEnabled, coolingEnabled, ventilationEnabled]);\n\n return (\n <>\n }>\n
\n \n \n \n \n \n\n {heatingEnabled ? (\n \n \n \n ) : (\n \n \n \n \n \n )}\n\n {coolingEnabled ? (\n \n \n \n ) : (\n \n \n \n \n \n )}\n\n {ventilationEnabled ? (\n \n \n \n ) : (\n \n \n \n \n \n )}\n \n\n \n \n \n \n\n \n {results.perArea[HvacArea.HEATING].enabled && (\n \n )}\n \n\n \n {results.perArea[HvacArea.COOLING].enabled && (\n \n )}\n \n\n \n {results.perArea[HvacArea.VENTILATION].enabled && (\n \n )}\n \n \n \n
\n
\n\n \n \n );\n};\n","import './HvacResultSummaryChapter.scss';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormWatch } from '@form-ts/react';\nimport { pipe } from 'fp-ts/function';\nimport { modify } from 'monocle-ts/Lens';\nimport React, { useCallback } from 'react';\nimport { CustomToggle } from 'src/modules/common/components/CustomToggle';\nimport { BodySmallText } from 'src/modules/common/typography/BodySmallText';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { HvacFormChapterData, HvacFormData } from 'src/modules/hvac/types/HvacFormData';\n\ntype Props = {\n readonly path: FieldPath;\n readonly title: React.ReactNode;\n readonly icon: React.ReactNode;\n};\n\nexport const HvacResultSummaryChapter = ({ path, title, icon }: Props): React.ReactElement => {\n const enabled = useFormWatch(path.form, path.at('enabled').value.get);\n\n const handleToggle = useCallback(() => {\n path.form.change(pipe(\n path.form.currentState,\n pipe(\n path.at('enabled').value,\n modify((value) => !value),\n ),\n ));\n }, [path]);\n\n return (\n
\n
\n
\n {icon}\n
\n\n \n
\n\n
\n \n {title}\n \n
\n
\n );\n};\n","import './HvacResultSummaryView.scss';\nimport { HvacArea } from '@belimo-retrofit-portal/logic';\nimport { FormController } from '@form-ts/core';\nimport { useFormWatch } from '@form-ts/react';\nimport { pipe } from 'fp-ts/function';\nimport { modify } from 'monocle-ts/Lens';\nimport React, { useCallback, useState } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { HorizontalDivider } from 'src/modules/common/components/HorizontalDivider';\nimport { CircleCheckFilledIcon } from 'src/modules/common/icons/CircleCheckFilledIcon';\nimport { CommentIcon } from 'src/modules/common/icons/CommentIcon';\nimport { CoolingIcon } from 'src/modules/common/icons/CoolingIcon';\nimport { FanIcon } from 'src/modules/common/icons/FanIcon';\nimport { HeatingIcon } from 'src/modules/common/icons/HeatingIcon';\nimport { ResetIcon } from 'src/modules/common/icons/ResetIcon';\nimport { BodyLargeLightText } from 'src/modules/common/typography/BodyLargeLightText';\nimport { LeadText } from 'src/modules/common/typography/LeadText';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { HvacFormAssessmentData, HvacFormData } from 'src/modules/hvac/types/HvacFormData';\nimport { getDefaultFormSection } from 'src/modules/hvac/utils/getDefaultFormSection';\nimport { HvacFormClearConfirmationModal } from 'src/modules/hvac/views/HvacFormClearConfirmationModal';\nimport { HvacFormCommentModal } from 'src/modules/hvac/views/HvacFormCommentModal';\nimport { HvacResultSummaryChapter } from 'src/modules/hvac/views/HvacResultSummaryChapter';\nimport { PROJECT_HVAC_DEFAULT_DATA } from 'src/modules/project-new/constants/projectData';\n\ntype Props = {\n readonly form: FormController;\n};\n\nexport const HvacResultSummaryView = ({ form }: Props): React.ReactElement => {\n const [isCommentModalOpen, setIsCommentModalOpen] = useState(false);\n const handleCommentOpen = useCallback(() => {\n setIsCommentModalOpen(true);\n }, []);\n const handleCommentCancel = useCallback(() => {\n setIsCommentModalOpen(false);\n }, []);\n const handleCommentSubmit = useCallback((comment: string) => {\n setIsCommentModalOpen(false);\n\n form.change(pipe(\n form.currentState,\n form.field.at('assessment').at('comment').value.set(comment),\n ));\n }, [form]);\n\n const [isClearModalOpen, setIsClearModalOpen] = useState(false);\n const handleClearOpen = useCallback(() => {\n setIsClearModalOpen(true);\n }, []);\n const handleClearCancel = useCallback(() => {\n setIsClearModalOpen(false);\n }, []);\n const handleClearSubmit = useCallback(() => {\n setIsClearModalOpen(false);\n\n form.change(pipe(\n form.currentState,\n pipe(\n form.field.at('assessment').value,\n modify((previous): HvacFormAssessmentData => ({\n comment: '',\n prices: PROJECT_HVAC_DEFAULT_DATA.prices,\n heating: {\n ...PROJECT_HVAC_DEFAULT_DATA.areas[HvacArea.HEATING],\n enabled: previous.heating.enabled,\n sections: previous.heating.sections.map((section) => getDefaultFormSection(section.config)),\n },\n cooling: {\n ...PROJECT_HVAC_DEFAULT_DATA.areas[HvacArea.COOLING],\n enabled: previous.cooling.enabled,\n sections: previous.cooling.sections.map((section) => getDefaultFormSection(section.config)),\n },\n ventilation: {\n ...PROJECT_HVAC_DEFAULT_DATA.areas[HvacArea.VENTILATION],\n enabled: previous.ventilation.enabled,\n sections: previous.ventilation.sections.map((section) => getDefaultFormSection(section.config)),\n },\n })),\n ),\n ));\n }, [form]);\n\n const comment = useFormWatch(form, form.field.at('assessment').at('comment').value.get);\n\n return (\n <>\n
\n
\n
\n \n \n \n \n \n \n
\n\n
\n \n \n\n
\n \n
\n
\n\n \n \n\n
\n \n
\n\n
\n {comment.length > 0 && }\n
\n \n
\n
\n\n \n\n
\n }\n icon={}\n />\n\n }\n icon={}\n />\n\n }\n icon={}\n />\n
\n
\n\n \n\n \n \n );\n};\n","import { createTrigger } from 'src/utils/createTrigger';\n\nexport const LOADER_SHOW = createTrigger('LOADER_SHOW');\nexport const LOADER_HIDE = createTrigger('LOADER_HIDE');\n","import { done, start } from 'nprogress';\nimport { SagaIterator } from 'redux-saga';\nimport { LOADER_HIDE, LOADER_SHOW } from 'src/modules/loader/actions/LoaderActions';\nimport { call, take } from 'typed-redux-saga';\n\nexport function* loaderSaga(): SagaIterator {\n const VISIBLE = new Map();\n\n while (true) {\n const action = yield* take([LOADER_SHOW.is, LOADER_HIDE.is]);\n\n const key = action.meta;\n const show = LOADER_SHOW.is(action);\n\n if (show) {\n if (VISIBLE.has(key)) {\n continue;\n }\n\n VISIBLE.set(key, null);\n if (VISIBLE.size === 1) {\n yield* call(start);\n }\n } else {\n if (!VISIBLE.has(key)) {\n continue;\n }\n\n VISIBLE.delete(key);\n if (VISIBLE.size === 0) {\n yield* call(done);\n }\n }\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { LOADER_HIDE, LOADER_SHOW } from 'src/modules/loader/actions/LoaderActions';\nimport { put } from 'typed-redux-saga';\n\nexport function* showLoadingIndicator(key: string): SagaIterator {\n yield* put(LOADER_SHOW.trigger(undefined, key));\n}\n\nexport function* hideLoadingIndicator(key: string): SagaIterator {\n yield* put(LOADER_HIDE.trigger(undefined, key));\n}\n","import { FormController } from '@form-ts/core';\nimport { AuthUser } from 'src/modules/common/types/AuthUser';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { LoginFormData } from 'src/modules/login/types/LoginFormData';\nimport { createActions } from 'src/utils/createActions';\n\nexport const LOGIN_PERFORM = createActions, AuthUser>('LOGIN_PERFORM');\n","import { FormController } from '@form-ts/core';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { RequestAccessFormData } from 'src/modules/login/types/RequestAccessFormData';\nimport { createTrigger } from 'src/utils/createTrigger';\n\nexport const REQUEST_ACCESS_SUBMIT =\n createTrigger>('REQUEST_ACCESS_SUBMIT');\n","import { UserSettings } from 'src/modules/common/types/UserSettings';\nimport { createTrigger } from 'src/utils/createTrigger';\n\nexport const UPDATE_USER_SETTINGS = createTrigger('REPORT_SHOW_LOGO');\n","import { AuthUser } from 'src/modules/common/types/AuthUser';\nimport { createTrigger } from 'src/utils/createTrigger';\n\nexport const WHOAMI_ACTION = createTrigger('WHOAMI');\n","import { COUNTRY_CODES } from '@belimo-retrofit-portal/logic';\nimport { trim } from 'fp-ts/string';\nimport { FormRule } from 'src/modules/form/types/FormRule';\nimport * as R from 'src/modules/form/utils/rules';\nimport { LoginFormData } from 'src/modules/login/types/LoginFormData';\nimport { RequestAccessFormData } from 'src/modules/login/types/RequestAccessFormData';\n\nexport const LOGIN_FORM_SCHEMA: FormRule = R.struct({\n username: R.allOf([R.nonEmpty(), R.email()]),\n password: R.nonEmpty(),\n});\n\nexport const REQUEST_ACCESS_FORM_SCHEMA: FormRule = R.struct({\n email: R.allOf([\n R.map(trim, R.nonEmpty()),\n R.maxLength(40),\n R.email(),\n ]),\n firstName: R.allOf([\n R.map(trim, R.nonEmpty()),\n R.maxLength(40),\n ]),\n lastName: R.allOf([\n R.map(trim, R.nonEmpty()),\n R.maxLength(40),\n ]),\n companyName: R.allOf([\n R.map(trim, R.nonEmpty()),\n R.maxLength(40),\n ]),\n countryCode: R.literal(COUNTRY_CODES),\n});\n","import React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { useIntl } from 'react-intl';\nimport { useAction } from 'src/hooks/useAction';\nimport { LoginLayout } from 'src/modules/common/layouts/LoginLayout';\nimport { CONFIG_LANGUAGE_SWITCH } from 'src/modules/config/actions/ConfigActions';\nimport { REQUEST_ACCESS_SUBMIT } from 'src/modules/login/actions/RequestAccessActions';\nimport { LoginScreen } from 'src/modules/login/views/LoginScreen';\n\nexport const LoginPage = (): React.ReactElement => {\n const intl = useIntl();\n const switchLanguage = useAction(CONFIG_LANGUAGE_SWITCH.request);\n const submitRequestAccess = useAction(REQUEST_ACCESS_SUBMIT.trigger);\n\n return (\n <>\n \n {intl.formatMessage({ id: 'login/pageTitle' })}\n \n\n \n \n \n \n );\n};\n","import { loginUserReducer } from 'src/modules/login/reducers/loginUserReducer';\nimport { userSettingsReducer } from 'src/modules/login/reducers/userSettingsReducer';\nimport { LoginState } from 'src/modules/login/types/LoginState';\nimport { chainReducers } from 'src/utils/chainReducers';\n\nconst defaultState: LoginState = {\n user: null,\n};\n\nexport const loginReducer = chainReducers(defaultState, [\n loginUserReducer,\n userSettingsReducer,\n]);\n","import { Action } from 'redux';\nimport { LOGIN_PERFORM } from 'src/modules/login/actions/LoginActions';\nimport { WHOAMI_ACTION } from 'src/modules/login/actions/WhoAmIAction';\nimport { LoginState } from 'src/modules/login/types/LoginState';\n\nexport function loginUserReducer(state: LoginState, action: Action): LoginState {\n if (WHOAMI_ACTION.is(action)) {\n return {\n ...state,\n user: action.data,\n };\n }\n if (LOGIN_PERFORM.isSuccess(action)) {\n return {\n ...state,\n user: action.data,\n };\n }\n\n return state;\n}\n","import { Action } from 'redux';\nimport { UPDATE_USER_SETTINGS } from 'src/modules/login/actions/UserSettingsActions';\nimport { LoginState } from 'src/modules/login/types/LoginState';\n\nexport function userSettingsReducer(state: LoginState, action: Action): LoginState {\n if (UPDATE_USER_SETTINGS.is(action)) {\n return {\n ...state,\n user: state.user\n ? {\n ...state.user,\n settings: action.data,\n }\n : null,\n };\n }\n\n return state;\n}\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport { replace } from 'connected-react-router';\nimport { SagaIterator } from 'redux-saga';\nimport { formSubmitFailure } from 'src/modules/form/sagas/utils/formSubmitFailure';\nimport { formSubmitStart } from 'src/modules/form/sagas/utils/formSubmitStart';\nimport { formValidate } from 'src/modules/form/sagas/utils/formValidate';\nimport { LOGIN_PERFORM } from 'src/modules/login/actions/LoginActions';\nimport { LOGIN_FORM_SCHEMA } from 'src/modules/login/constants/schema';\nimport { performLogin } from 'src/modules/login/sagas/utils/performLogin';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, delay, put } from 'typed-redux-saga';\n\nexport function* loginPerformSaga(action: GetRequestActionType): SagaIterator {\n const form = action.data;\n const values = form.values.get(form.currentState);\n\n const valid = yield* call(formValidate, form, LOGIN_FORM_SCHEMA);\n if (!valid) {\n return;\n }\n\n try {\n yield* call(logDebug, 'Logging in...');\n yield* put(LOGIN_PERFORM.pending());\n yield* call(formSubmitStart, form);\n yield* delay(500);\n\n const user = yield* call(performLogin, values);\n yield* put(replace('/'));\n\n yield* call(logDebug, 'Logging in... done', user);\n yield* put(LOGIN_PERFORM.success(user));\n\n // no need to unlock the form until router transition is completed\n // so there is no `formSubmitSuccess` call\n } catch (error) {\n yield* call(logError, 'Logging in... error', error);\n yield* put(LOGIN_PERFORM.failure(NativeError.wrap(error)));\n\n yield* call(formSubmitFailure, form, {\n username: {\n code: 'invalid',\n path: 'username',\n\n value: values.username,\n message: 'Invalid credentials',\n context: {},\n },\n password: {\n code: 'invalid',\n path: 'password',\n\n value: values.password,\n message: 'Invalid credentials',\n context: {},\n },\n });\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { LOGIN_PERFORM } from 'src/modules/login/actions/LoginActions';\nimport { REQUEST_ACCESS_SUBMIT } from 'src/modules/login/actions/RequestAccessActions';\nimport { UPDATE_USER_SETTINGS } from 'src/modules/login/actions/UserSettingsActions';\nimport { loginPerformSaga } from 'src/modules/login/sagas/loginPerformSaga';\nimport { requestAccessSubmitSaga } from 'src/modules/login/sagas/requestAccessSubmitSaga';\nimport { updateUserSettingsSaga } from 'src/modules/login/sagas/updateUserSettingsSaga';\nimport { takeLatest } from 'typed-redux-saga';\n\nexport function* loginSaga(): SagaIterator {\n yield* takeLatest(LOGIN_PERFORM.isRequest, loginPerformSaga);\n yield* takeLatest(REQUEST_ACCESS_SUBMIT.is, requestAccessSubmitSaga);\n yield* takeLatest(UPDATE_USER_SETTINGS.is, updateUserSettingsSaga);\n}\n","import { SagaIterator } from 'redux-saga';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { formSubmitFailure } from 'src/modules/form/sagas/utils/formSubmitFailure';\nimport { formSubmitStart } from 'src/modules/form/sagas/utils/formSubmitStart';\nimport { formSubmitSuccess } from 'src/modules/form/sagas/utils/formSubmitSuccess';\nimport { formValidate } from 'src/modules/form/sagas/utils/formValidate';\nimport { REQUEST_ACCESS_SUBMIT } from 'src/modules/login/actions/RequestAccessActions';\nimport { REQUEST_ACCESS_FORM_SCHEMA } from 'src/modules/login/constants/schema';\nimport { submitRequestAccess } from 'src/modules/login/sagas/utils/submitRequestAccess';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetTriggerActionType } from 'src/utils/createTrigger';\nimport { call, delay } from 'typed-redux-saga';\n\nexport function* requestAccessSubmitSaga(\n action: GetTriggerActionType,\n): SagaIterator {\n const form = action.data;\n const values = form.values.get(form.currentState);\n\n const valid = yield* call(formValidate, form, REQUEST_ACCESS_FORM_SCHEMA);\n if (!valid) {\n return;\n }\n\n try {\n yield* call(logDebug, 'Sending request access...');\n yield* call(formSubmitStart, form);\n\n yield* delay(500);\n yield* call(submitRequestAccess, values);\n\n yield* call(logDebug, 'Sending request access... done');\n yield* call(formSubmitSuccess, form);\n } catch (error) {\n yield* call(logError, 'Sending request access... error', error);\n yield* call(formSubmitFailure, form, {});\n\n yield* call(sentryCatch, error);\n yield* call(showNotification, { variant: 'error', type: 'error' });\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { UPDATE_USER_SETTINGS } from 'src/modules/login/actions/UserSettingsActions';\nimport { updateUserSettings } from 'src/modules/login/sagas/utils/updateUserSettings';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetTriggerActionType } from 'src/utils/createTrigger';\nimport { call } from 'typed-redux-saga';\n\nexport function* updateUserSettingsSaga(action: GetTriggerActionType): SagaIterator {\n const userSettings = action.data;\n\n try {\n yield* call(logDebug, 'Updating the user settings...');\n\n const user = yield* call(updateUserSettings, userSettings);\n\n yield* call(logDebug, 'Updating the user settings... done', user);\n } catch (error) {\n yield* call(logError, 'Updating the user settings... error', error);\n yield* call(sentryCatch, error);\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { AUTH_USER } from 'src/modules/common/codecs/AuthUser';\nimport { AuthUser } from 'src/modules/common/types/AuthUser';\nimport { call } from 'typed-redux-saga';\n\nexport function* loadUser(): SagaIterator {\n try {\n const { content } = yield* call(makeRestRequest, 'GET', '/account/profile');\n return yield* call(decodeOrThrow, AUTH_USER, content);\n } catch (error) {\n throw new RuntimeError('Could not load current user', {}, NativeError.wrap(error));\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { AuthUser } from 'src/modules/common/types/AuthUser';\nimport { loadUser } from 'src/modules/login/sagas/utils/loadUser';\nimport { LoginFormData } from 'src/modules/login/types/LoginFormData';\nimport { call } from 'typed-redux-saga';\n\nexport function* performLogin(form: LoginFormData): SagaIterator {\n try {\n const body = {\n email: form.username,\n password: form.password,\n remember: form.remember,\n };\n\n yield* call(makeRestRequest, 'POST', '/auth/login', body);\n return yield* call(loadUser);\n } catch (error) {\n throw new RuntimeError('Could not perform login', { form }, NativeError.wrap(error));\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { call } from 'typed-redux-saga';\n\nexport function* performLogout(): SagaIterator {\n try {\n yield* call(makeRestRequest, 'DELETE', '/auth/logout');\n } catch (error) {\n throw new RuntimeError('Could not perform logout', {}, NativeError.wrap(error));\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { RequestAccessFormData } from 'src/modules/login/types/RequestAccessFormData';\nimport { call } from 'typed-redux-saga';\n\nexport function* submitRequestAccess(form: RequestAccessFormData): SagaIterator {\n try {\n yield* call(makeRestRequest, 'POST', '/auth/request', form);\n } catch (error) {\n throw new RuntimeError('Could not submit request access', { form }, NativeError.wrap(error));\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { AUTH_USER } from 'src/modules/common/codecs/AuthUser';\nimport { USER_SETTINGS } from 'src/modules/common/codecs/UserSettings';\nimport { AuthUser } from 'src/modules/common/types/AuthUser';\nimport { UserSettings } from 'src/modules/common/types/UserSettings';\nimport { call } from 'typed-redux-saga';\n\nexport function* updateUserSettings(userSettings: UserSettings): SagaIterator {\n try {\n const body = yield* call(USER_SETTINGS.encode, userSettings);\n const { content } = yield* call(makeRestRequest, 'PUT', '/account/settings', body);\n return yield* call(decodeOrThrow, AUTH_USER, content);\n } catch (error) {\n throw new RuntimeError('Could not update user settings', { userSettings }, NativeError.wrap(error));\n }\n}\n","import { createSelector } from 'reselect';\nimport { getLoginState } from 'src/modules/login/selectors/getLoginState';\n\nexport const getIsAuthenticated = createSelector([\n getLoginState,\n], (state) => state.user !== null);\n","import { createSelector } from 'reselect';\nimport { getLoginState } from 'src/modules/login/selectors/getLoginState';\nimport { assertNotNull } from 'src/utils/assert';\n\nexport const getLoggedInUser = createSelector([\n getLoginState,\n], (state) => assertNotNull(\n state.user,\n 'User is not authenticated',\n { state },\n));\n","import { LoginState } from 'src/modules/login/types/LoginState';\nimport { RootState } from 'src/types/RootState';\n\nexport function getLoginState(state: RootState): LoginState {\n return state.login;\n}\n","import './LoginScreen.scss';\nimport { FormController } from '@form-ts/core';\nimport { useForm, useFormWatch } from '@form-ts/react';\nimport { TranslationKey } from '@tolgee/react';\nimport { constNull } from 'fp-ts/function';\nimport React, { useCallback, useRef, useState } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { Link as RouterLink } from 'react-router-dom';\nimport { useAction } from 'src/hooks/useAction';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CustomModal } from 'src/modules/common/components/CustomModal';\nimport { Dropdown } from 'src/modules/common/components/Dropdown';\nimport { TERMS_AND_PRIVACY_LINK_MAP } from 'src/modules/common/constants/links';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\nimport { GlobeIcon } from 'src/modules/common/icons/GlobeIcon';\nimport { BodySmallText } from 'src/modules/common/typography/BodySmallText';\nimport { getEnvironmentLanguages } from 'src/modules/config/selectors/getEnvironmentLanguages';\nimport { getLanguage } from 'src/modules/config/selectors/getLanguage';\nimport { CheckboxField } from 'src/modules/form/components/CheckboxField';\nimport { PasswordField } from 'src/modules/form/components/PasswordField';\nimport { TextField } from 'src/modules/form/components/TextField';\nimport { useFormValidator } from 'src/modules/form/hooks/useFormValidator';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { LOGIN_PERFORM } from 'src/modules/login/actions/LoginActions';\nimport { LOGIN_FORM_SCHEMA } from 'src/modules/login/constants/schema';\nimport { LoginFormData } from 'src/modules/login/types/LoginFormData';\nimport { RequestAccessFormData } from 'src/modules/login/types/RequestAccessFormData';\nimport { RequestAccessModal } from 'src/modules/login/views/RequestAccessModal';\nimport { Language } from 'src/types/common/Language';\n\ntype Props = {\n readonly switchLanguage: (language: Language) => void;\n readonly submitRequestAccess: (form: FormController) => void;\n};\n\nexport const LoginScreen = ({ switchLanguage, submitRequestAccess }: Props): React.ReactElement => {\n const requestAccessButtonRef = useRef(null);\n\n const [isRequestAccessModalOpen, setRequestAccessModalOpen] = useState(false);\n const closeRequestForm = useCallback(() => setRequestAccessModalOpen(false), []);\n\n const intl = useIntl();\n\n const form = useForm('login', {\n reinitialize: false,\n initialValues: {\n username: '',\n password: '',\n remember: true,\n },\n });\n\n useFormValidator(form, LOGIN_FORM_SCHEMA);\n\n const formErrors = useFormWatch(form, form.errors.get);\n const isSubmitting = useFormWatch(form, form.submitting.get);\n const isSubmissionFailed = (\n !isSubmitting &&\n Object.keys(formErrors).length > 0 &&\n Object.values(formErrors).every((error) => error?.code === 'invalid')\n );\n\n const submitForm = useAction(LOGIN_PERFORM.request);\n const handleSubmit = useCallback((event: React.FormEvent) => {\n event.preventDefault();\n submitForm(form);\n }, [form, submitForm]);\n\n const language = useSelector(getLanguage);\n const languages = useSelector(getEnvironmentLanguages);\n const termsAndPrivacyLink = TERMS_AND_PRIVACY_LINK_MAP[language];\n\n return (\n <>\n
\n
\n }\n selectedValue={language}\n onChange={switchLanguage}\n shaded={false}\n outlined={true}\n icon={}\n />\n
\n\n
\n
\n

\n \n

\n\n
\n \n \n \n
\n
\n\n
\n \n (\n error && error.code !== 'invalid'\n ? \n : ' '\n )}\n labelText={intl.formatMessage({ id: 'login/username' })}\n type=\"email\"\n size=\"md\"\n disabled={isSubmitting}\n autoFocus={true}\n autoComplete=\"username\"\n placeholder={intl.formatMessage({ id: 'login/emailPlaceholder' })}\n spellCheck={false}\n autoCorrect=\"off\"\n autoCapitalize=\"off\"\n renderHint={constNull}\n />\n\n (\n error && error.code !== 'invalid'\n ? \n : ' '\n )}\n labelText={intl.formatMessage({ id: 'login/password' })}\n type=\"password\"\n size=\"lg\"\n disabled={isSubmitting}\n autoComplete=\"current-password\"\n placeholder={intl.formatMessage({ id: 'login/passwordPlaceholder' })}\n spellCheck={false}\n autoCorrect=\"off\"\n autoCapitalize=\"off\"\n />\n\n

\n {isSubmissionFailed ? () : null}\n

\n\n
\n
\n }\n field={form.field.at('remember')}\n />\n
\n
\n \n \n \n
\n
\n\n (\n
\n \n
\n )}\n >\n \n \n\n

\n \n

\n\n

\n \n

\n \n
\n
\n
\n\n \n \n \n \n );\n};\n\nconst mailTo = (children: React.ReactNode): React.ReactElement => (\n \n {children}\n \n);\n\nconst link = (termsAndPrivacyLink: string) => (children: React.ReactNode): React.ReactNode => (\n {children}\n \n);\n\nconst LANGUAGE_KEYS: Record = {\n 'en-US': 'login/language/en-US',\n 'de-CH': 'login/language/de-CH',\n 'fr-FR': 'login/language/fr-FR',\n 'hu-HU': 'login/language/hu-HU',\n 'es-ES': 'login/language/es-ES',\n 'sv-SE': 'login/language/sv-SE',\n 'zh-CN': 'login/language/zh-CN',\n 'it-IT': 'login/language/it-IT',\n 'sr-RS': 'login/language/sr-RS',\n 'mk-MK': 'login/language/mk-MK',\n};\n","import './RequestAccessModal.scss';\nimport { CountryCode } from '@belimo-retrofit-portal/logic';\nimport { CheckmarkFilled } from '@carbon/icons-react';\nimport { ModalBody, ModalFooter, ModalHeader } from '@carbon/react';\nimport { FormController } from '@form-ts/core';\nimport { useForm, useFormWatch } from '@form-ts/react';\nimport { constNull } from 'fp-ts/function';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CARBON_THEME } from 'src/modules/common/constants/theme';\nimport { useCountryList } from 'src/modules/common/hooks/useCountryList';\nimport { AutocompleteField } from 'src/modules/form/components/AutocompleteField';\nimport { TextField } from 'src/modules/form/components/TextField';\nimport { useFormValidator } from 'src/modules/form/hooks/useFormValidator';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { REQUEST_ACCESS_FORM_SCHEMA } from 'src/modules/login/constants/schema';\nimport { RequestAccessFormData } from 'src/modules/login/types/RequestAccessFormData';\n\ntype Props = {\n readonly onClose: () => void;\n readonly onSubmit: (form: FormController) => void;\n};\n\nexport const RequestAccessModal = ({ onClose, onSubmit }: Props): React.ReactElement => {\n const intl = useIntl();\n const countryCodes = useCountryList();\n\n const requestAccessForm = useForm('requestAccess', {\n reinitialize: false,\n initialValues: {\n firstName: '',\n lastName: '',\n companyName: '',\n email: '',\n countryCode: 'CHE',\n },\n });\n useFormValidator(requestAccessForm, REQUEST_ACCESS_FORM_SCHEMA);\n\n const isSubmitting = useFormWatch(requestAccessForm, requestAccessForm.submitting.get);\n const handleSubmit = useCallback((event: React.FormEvent) => {\n event.preventDefault();\n onSubmit(requestAccessForm);\n }, [requestAccessForm, onSubmit]);\n\n const isSubmitted = useFormWatch(requestAccessForm, requestAccessForm.submitSucceded.get);\n if (isSubmitted) {\n return (\n
\n \n\n \n
\n \n\n

\n \n

\n
\n
\n\n \n \n \n \n \n
\n );\n }\n\n return (\n
\n \n\n \n
\n \n
\n\n
\n \n
\n\n
\n \n
\n\n
\n \n
\n\n
\n \n
\n
\n\n \n \n \n \n\n \n \n \n \n \n );\n};\n\nfunction renderCountryOption(option: CountryCode): React.ReactElement {\n return ;\n}\n","import { Project } from 'src/modules/common/types/Project';\nimport { OrganizationFormData } from 'src/modules/organization/types/OrganizationFormData';\nimport { UserSnapshot } from 'src/modules/users/types/User';\nimport { createActions } from 'src/utils/createActions';\nimport { createTrigger } from 'src/utils/createTrigger';\n\nexport const MODAL_PROJECT_ERROR_OPEN = createTrigger('MODAL_PROJECT_ERROR_OPEN');\nexport const MODAL_PROJECT_ERROR_RETRY = createActions('MODAL_PROJECT_ERROR_RETRY');\nexport const MODAL_PROJECT_ERROR_CLOSE = createTrigger('MODAL_PROJECT_ERROR_CLOSE');\n\nexport const MODAL_USER_ERROR_OPEN = createTrigger>('MODAL_USER_ERROR_OPEN');\nexport const MODAL_USER_ERROR_RETRY = createActions<\nReadonlyArray,\nReadonlyArray,\nReadonlyArray\n>('MODAL_USER_ERROR_RETRY');\nexport const MODAL_USER_ERROR_CLOSE = createTrigger('MODAL_USER_ERROR_CLOSE');\n\nexport const MODAL_ORGANIZATION_ERROR_OPEN =\n createTrigger('MODAL_ORGANIZATION_ERROR_OPEN');\nexport const MODAL_ORGANIZATION_ERROR_RETRY =\n createActions('MODAL_ORGANIZATION_ERROR_RETRY');\nexport const MODAL_ORGANIZATION_ERROR_CLOSE =\n createTrigger('MODAL_ORGANIZATION_ERROR_CLOSE');\n","import * as React from 'react';\nimport { useSelector } from 'react-redux';\nimport { TransitionGroup } from 'react-transition-group';\nimport { ModalWrapper } from 'src/modules/modals/pages/ModalWrapper';\nimport { getModalStack } from 'src/modules/modals/selectors/getModalStack';\nimport { OrganizationErrorModal } from 'src/modules/modals/views/OrganizationErrorModal';\nimport { ProjectErrorModal } from 'src/modules/modals/views/ProjectErrorModal';\nimport { UserErrorModal } from 'src/modules/modals/views/UserErrorModal';\n\nexport const ModalStack = (): React.ReactElement => {\n const modals = useSelector(getModalStack);\n\n return (\n \n {modals.map((modal) => {\n if (modal.type === 'project-error') {\n return (\n \n \n \n );\n }\n\n if (modal.type === 'user-error') {\n return (\n \n \n \n );\n }\n\n if (modal.type === 'organization-error') {\n return (\n \n \n \n );\n }\n\n return null;\n })}\n \n );\n};\n","import * as React from 'react';\nimport { CustomModal } from 'src/modules/common/components/CustomModal';\n\ntype Props = {\n readonly in?: boolean;\n readonly children: React.ReactNode;\n};\n\n/* eslint-disable react/destructuring-assignment */\nexport const ModalWrapper = (props: Props): React.ReactElement => (\n false}\n isShaded={false}\n shouldUnmount={true}\n size=\"md\"\n >\n {props.children}\n \n);\n","import { Action } from 'redux';\nimport { FUTURE } from 'src/modules/common/types/Future';\nimport {\n MODAL_ORGANIZATION_ERROR_CLOSE,\n MODAL_ORGANIZATION_ERROR_OPEN,\n MODAL_ORGANIZATION_ERROR_RETRY,\n} from 'src/modules/modals/actions/ModalActions';\nimport { ModalStackState } from 'src/modules/modals/types/ModalStackState';\n\nexport function modalOrganizationErrorReducer(state: ModalStackState, action: Action): ModalStackState {\n if (MODAL_ORGANIZATION_ERROR_OPEN.is(action)) {\n return state.filter((it) => it.type !== 'organization-error').concat({\n type: 'organization-error',\n data: action.data,\n status: null,\n });\n }\n if (MODAL_ORGANIZATION_ERROR_CLOSE.is(action)) {\n return state.filter((it) => it.type !== 'organization-error');\n }\n\n if (MODAL_ORGANIZATION_ERROR_RETRY.isPending(action)) {\n return state.map((it) => (\n it.type === 'organization-error'\n ? { ...it, status: FUTURE.pending() }\n : it\n ));\n }\n if (MODAL_ORGANIZATION_ERROR_RETRY.isSuccess(action)) {\n return state.map((it) => (\n it.type === 'organization-error'\n ? { ...it, status: FUTURE.success(undefined) }\n : it\n ));\n }\n if (MODAL_ORGANIZATION_ERROR_RETRY.isFailure(action)) {\n return state.map((it) => (\n it.type === 'organization-error'\n ? { ...it, status: FUTURE.failure(action.data) }\n : it\n ));\n }\n\n return state;\n}\n","import { Action } from 'redux';\nimport { FUTURE } from 'src/modules/common/types/Future';\nimport {\n MODAL_PROJECT_ERROR_CLOSE,\n MODAL_PROJECT_ERROR_OPEN,\n MODAL_PROJECT_ERROR_RETRY,\n} from 'src/modules/modals/actions/ModalActions';\nimport { ModalStackState } from 'src/modules/modals/types/ModalStackState';\n\nexport function modalProjectErrorReducer(state: ModalStackState, action: Action): ModalStackState {\n if (MODAL_PROJECT_ERROR_OPEN.is(action)) {\n const filteredState = state.filter((it) => it.type !== 'project-error');\n\n return [...filteredState, {\n type: 'project-error',\n data: action.data,\n status: null,\n }];\n }\n if (MODAL_PROJECT_ERROR_CLOSE.is(action)) {\n return state.filter((it) => it.type !== 'project-error');\n }\n\n if (MODAL_PROJECT_ERROR_RETRY.isPending(action)) {\n return state.map((it) => (\n it.type === 'project-error'\n ? { ...it, status: FUTURE.pending() }\n : it\n ));\n }\n if (MODAL_PROJECT_ERROR_RETRY.isSuccess(action)) {\n return state.map((it) => (\n it.type === 'project-error'\n ? { ...it, status: FUTURE.success(action.data) }\n : it\n ));\n }\n if (MODAL_PROJECT_ERROR_RETRY.isFailure(action)) {\n return state.map((it) => (\n it.type === 'project-error'\n ? { ...it, status: FUTURE.failure(action.data) }\n : it\n ));\n }\n\n return state;\n}\n","import { modalOrganizationErrorReducer } from 'src/modules/modals/reducers/modalOrganizationErrorReducer';\nimport { modalProjectErrorReducer } from 'src/modules/modals/reducers/modalProjectErrorReducer';\nimport { modalUserErrorReducer } from 'src/modules/modals/reducers/modalUserErrorReducer';\nimport { ModalStackState } from 'src/modules/modals/types/ModalStackState';\nimport { chainReducers } from 'src/utils/chainReducers';\n\nconst defaultState: ModalStackState = [];\n\nexport const modalStackReducer = chainReducers(defaultState, [\n modalProjectErrorReducer,\n modalUserErrorReducer,\n modalOrganizationErrorReducer,\n]);\n","import { Action } from 'redux';\nimport { FUTURE } from 'src/modules/common/types/Future';\nimport {\n MODAL_USER_ERROR_CLOSE,\n MODAL_USER_ERROR_OPEN,\n MODAL_USER_ERROR_RETRY,\n} from 'src/modules/modals/actions/ModalActions';\nimport { ModalStackState } from 'src/modules/modals/types/ModalStackState';\n\nexport function modalUserErrorReducer(state: ModalStackState, action: Action): ModalStackState {\n if (MODAL_USER_ERROR_OPEN.is(action)) {\n const filteredState = state.filter((it) => it.type !== 'user-error');\n\n return [...filteredState, {\n type: 'user-error',\n data: action.data,\n status: null,\n }];\n }\n if (MODAL_USER_ERROR_CLOSE.is(action)) {\n return state.filter((it) => it.type !== 'user-error');\n }\n\n if (MODAL_USER_ERROR_RETRY.isPending(action)) {\n return state.map((it) => (\n it.type === 'user-error'\n ? { ...it, status: FUTURE.pending() }\n : it\n ));\n }\n if (MODAL_USER_ERROR_RETRY.isSuccess(action)) {\n return state.map((it) => (\n it.type === 'user-error'\n ? { ...it, status: FUTURE.success(action.data) }\n : it\n ));\n }\n if (MODAL_USER_ERROR_RETRY.isFailure(action)) {\n return state.map((it) => (\n it.type === 'user-error'\n ? { ...it, status: FUTURE.failure(action.data) }\n : it\n ));\n }\n\n return state;\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport {\n MODAL_ORGANIZATION_ERROR_CLOSE,\n MODAL_ORGANIZATION_ERROR_RETRY,\n} from 'src/modules/modals/actions/ModalActions';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { syncOrganizationForeground } from 'src/modules/organization/sagas/utils/syncOrganizationForeground';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* modalOrganizationErrorSaga(\n action: GetRequestActionType,\n): SagaIterator {\n const formData = action.data;\n\n try {\n yield* call(logDebug, 'Synchronizing organization...', formData);\n yield* put(MODAL_ORGANIZATION_ERROR_RETRY.pending());\n\n yield* call(syncOrganizationForeground, formData);\n yield* call(logDebug, 'Synchronizing organization... done', formData);\n\n yield* put(MODAL_ORGANIZATION_ERROR_RETRY.success());\n yield* put(MODAL_ORGANIZATION_ERROR_CLOSE.trigger());\n } catch (error) {\n const wrapped = new RuntimeError('Could not save synchronize organization', { formData }, NativeError.wrap(error));\n yield* call(logError, 'Synchronizing organization... error', error);\n yield* put(MODAL_ORGANIZATION_ERROR_RETRY.failure(wrapped));\n\n yield* call(sentryCatch, wrapped);\n yield* call(showNotification, { variant: 'error', type: 'error' });\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { MODAL_PROJECT_ERROR_CLOSE, MODAL_PROJECT_ERROR_RETRY } from 'src/modules/modals/actions/ModalActions';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { syncProjectForeground } from 'src/modules/project-sync/sagas/utils/syncProjectForeground';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* modalProjectErrorSaga(\n action: GetRequestActionType,\n): SagaIterator {\n const project = action.data;\n\n try {\n yield* call(logDebug, 'Synchronizing project...', project);\n yield* put(MODAL_PROJECT_ERROR_RETRY.pending());\n\n const synchronized = yield* call(syncProjectForeground, project);\n yield* call(logDebug, 'Synchronizing project... done', project);\n\n yield* put(MODAL_PROJECT_ERROR_RETRY.success(synchronized));\n yield* put(MODAL_PROJECT_ERROR_CLOSE.trigger());\n } catch (error) {\n const wrapped = new RuntimeError('Could not save synchronize project', { project }, NativeError.wrap(error));\n yield* call(logError, 'Synchronizing project... error', error);\n yield* put(MODAL_PROJECT_ERROR_RETRY.failure(wrapped));\n\n yield* call(sentryCatch, wrapped);\n yield* call(showNotification, { variant: 'error', type: 'error' });\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport {\n MODAL_ORGANIZATION_ERROR_RETRY,\n MODAL_PROJECT_ERROR_RETRY,\n MODAL_USER_ERROR_RETRY,\n} from 'src/modules/modals/actions/ModalActions';\nimport { modalOrganizationErrorSaga } from 'src/modules/modals/sagas/modalOrganizationErrorSaga';\nimport { modalProjectErrorSaga } from 'src/modules/modals/sagas/modalProjectErrorSaga';\nimport { modalUserErrorSaga } from 'src/modules/modals/sagas/modalUserErrorSaga';\nimport { takeLatest } from 'typed-redux-saga';\n\nexport function* modalStackSaga(): SagaIterator {\n yield* takeLatest(MODAL_PROJECT_ERROR_RETRY.isRequest, modalProjectErrorSaga);\n yield* takeLatest(MODAL_USER_ERROR_RETRY.isRequest, modalUserErrorSaga);\n yield* takeLatest(MODAL_ORGANIZATION_ERROR_RETRY.isRequest, modalOrganizationErrorSaga);\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { MODAL_USER_ERROR_CLOSE, MODAL_USER_ERROR_RETRY } from 'src/modules/modals/actions/ModalActions';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { syncUserForeground } from 'src/modules/users/sagas/utils/syncUserForeground';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* modalUserErrorSaga(\n action: GetRequestActionType,\n): SagaIterator {\n const users = action.data;\n\n try {\n yield* call(logDebug, 'Synchronizing user...');\n yield* put(MODAL_USER_ERROR_RETRY.pending(users));\n\n const synchronized = yield* call(syncUserForeground);\n yield* call(logDebug, 'Synchronizing user... done');\n\n yield* put(MODAL_USER_ERROR_RETRY.success(synchronized, synchronized));\n yield* put(MODAL_USER_ERROR_CLOSE.trigger());\n } catch (error) {\n const wrapped = new RuntimeError('Could not save user', { users }, NativeError.wrap(error));\n yield* call(logError, 'Synchronizing user... error', error);\n yield* put(MODAL_USER_ERROR_RETRY.failure(wrapped, users));\n\n yield* call(sentryCatch, wrapped);\n yield* call(showNotification, { variant: 'error', type: 'error' });\n }\n}\n","import { ModalStackState } from 'src/modules/modals/types/ModalStackState';\nimport { RootState } from 'src/types/RootState';\n\nexport function getModalStack(state: RootState): ModalStackState {\n return state.modals;\n}\n","import './ErrorModal.scss';\nimport { ModalBody, ModalFooter, ModalHeader } from '@carbon/react';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { useBoundAction } from 'src/hooks/useBoundAction';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport {\n MODAL_ORGANIZATION_ERROR_CLOSE,\n MODAL_ORGANIZATION_ERROR_RETRY,\n} from 'src/modules/modals/actions/ModalActions';\nimport { ModalWindowOrganizationError } from 'src/modules/modals/types/ModalWindow';\n\ntype Props = {\n readonly modal: ModalWindowOrganizationError;\n};\n\nexport const OrganizationErrorModal = ({ modal }: Props): React.ReactElement => {\n const intl = useIntl();\n const closeModal = useBoundAction(MODAL_ORGANIZATION_ERROR_CLOSE.trigger);\n const retry = useBoundAction(MODAL_ORGANIZATION_ERROR_RETRY.request, modal.data);\n\n const loading = modal.status?.state === 'pending';\n\n return (\n
\n }\n />\n\n \n

\n \n

\n\n

\n \n

\n
\n\n \n \n \n \n\n \n \n \n \n
\n );\n};\n","import './ErrorModal.scss';\nimport { ModalBody, ModalFooter, ModalHeader } from '@carbon/react';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { useBoundAction } from 'src/hooks/useBoundAction';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { ProjectTitle } from 'src/modules/common/components/ProjectTitle';\nimport { MODAL_PROJECT_ERROR_CLOSE, MODAL_PROJECT_ERROR_RETRY } from 'src/modules/modals/actions/ModalActions';\nimport { ModalWindowProjectError } from 'src/modules/modals/types/ModalWindow';\n\ntype Props = {\n readonly modal: ModalWindowProjectError;\n};\n\nexport const ProjectErrorModal = ({ modal }: Props): React.ReactElement => {\n const intl = useIntl();\n const closeModal = useBoundAction(MODAL_PROJECT_ERROR_CLOSE.trigger, undefined);\n const saveProject = useBoundAction(MODAL_PROJECT_ERROR_RETRY.request, modal.data);\n\n const loading = modal.status?.state === 'pending';\n\n return (\n
\n }\n />\n\n \n

\n }}\n />\n

\n\n

\n \n

\n
\n\n \n \n \n \n\n \n \n \n \n
\n );\n};\n","import './ErrorModal.scss';\nimport { ModalBody, ModalFooter, ModalHeader } from '@carbon/react';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { useBoundAction } from 'src/hooks/useBoundAction';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { MODAL_USER_ERROR_CLOSE, MODAL_USER_ERROR_RETRY } from 'src/modules/modals/actions/ModalActions';\nimport { ModalWindowUserError } from 'src/modules/modals/types/ModalWindow';\n\ntype Props = {\n readonly modal: ModalWindowUserError;\n};\n\nexport const UserErrorModal = ({ modal }: Props): React.ReactElement => {\n const intl = useIntl();\n const closeModal = useBoundAction(MODAL_USER_ERROR_CLOSE.trigger);\n const retry = useBoundAction(MODAL_USER_ERROR_RETRY.request, modal.data, modal.data);\n\n const loading = modal.status?.state === 'pending';\n\n return (\n
\n }\n />\n\n \n

\n userSnapshot.user.email).join(', ') }}\n />\n

\n\n

\n \n

\n
\n\n \n \n \n \n\n \n \n \n \n
\n );\n};\n","import { NotificationData } from 'src/modules/notifications/types/NotificationData';\nimport { createTrigger } from 'src/utils/createTrigger';\n\nexport const NOTIFICATION_SHOW = createTrigger('NOTIFICATION_SHOW');\n\nexport const NOTIFICATION_HIDE = createTrigger('NOTIFICATION_HIDE');\n","import { Action } from 'redux';\nimport { NOTIFICATION_HIDE, NOTIFICATION_SHOW } from 'src/modules/notifications/actions/NotificationActions';\nimport { NotificationState } from 'src/modules/notifications/types/NotificationData';\n\nconst defaultState: NotificationState = [];\n\n// eslint-disable-next-line @typescript-eslint/default-param-last\nexport const notificationReducer = (state: NotificationState = defaultState, action: Action): NotificationState => {\n if (NOTIFICATION_SHOW.is(action)) {\n return [\n ...state,\n {\n id: action.data.id,\n type: action.data.type,\n variant: action.data.variant,\n messageId: action.data.messageId,\n messageValue: action.data.messageValue,\n }];\n }\n if (NOTIFICATION_HIDE.is(action)) {\n return state.filter((notification) => notification.id !== action.data);\n }\n\n return state;\n};\n","import { SagaIterator } from 'redux-saga';\nimport { NOTIFICATION_SHOW } from 'src/modules/notifications/actions/NotificationActions';\nimport { NotificationData } from 'src/modules/notifications/types/NotificationData';\nimport { put } from 'typed-redux-saga';\n\nlet counter = 1_000_000;\n\nexport function* showNotification(data: Omit): SagaIterator {\n const id = counter++;\n\n yield* put(NOTIFICATION_SHOW.trigger({ ...data, id }));\n}\n","import { NotificationState } from 'src/modules/notifications/types/NotificationData';\nimport { RootState } from 'src/types/RootState';\n\nexport function getNotification(state: RootState): NotificationState {\n return state.notification;\n}\n","import './Notification.scss';\nimport { ToastNotification } from '@carbon/react';\nimport React from 'react';\nimport { useIntl } from 'react-intl';\nimport { NotificationData } from 'src/modules/notifications/types/NotificationData';\n\ntype Props = {\n notifications: ReadonlyArray;\n handleClose: (id: number) => void;\n};\n\nexport const Notification: React.FC = ({ notifications, handleClose }) => {\n const intl = useIntl();\n\n return (\n
\n {notifications.map(({ id, type, variant, messageId, messageValue }) => (\n handleClose(id)}\n role=\"status\"\n title={intl.formatMessage({ id: messageId || `notificationmessage/${type}` }, messageValue)}\n timeout={3000}\n />\n ))}\n
\n );\n};\n","import { Organization } from 'src/modules/common/types/Organization';\nimport { SyncMode } from 'src/modules/common/types/SyncMode';\nimport { OrganizationFormData } from 'src/modules/organization/types/OrganizationFormData';\nimport { createActions } from 'src/utils/createActions';\nimport { createTrigger } from 'src/utils/createTrigger';\n\nexport const ORGANIZATION_SYNC_RESET =\n createTrigger('ORGANIZATION_SYNC_RESET');\nexport const ORGANIZATION_SYNC_PERFORM =\n createActions('ORGANIZATION_SYNC_PERFORM');\n","import { useForm } from '@form-ts/react';\nimport React, { useEffect } from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { Link } from 'react-router-dom';\nimport { useAction } from 'src/hooks/useAction';\nimport { CustomBreadcrumbItem } from 'src/modules/common/components/CustomBreadcrumbItem';\nimport { AdminLayout } from 'src/modules/common/layouts/AdminLayout';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { ORGANIZATION_SYNC_PERFORM } from 'src/modules/organization/actions/OrganizationActions';\nimport { getOrganizationFormData } from 'src/modules/organization/selectors/getOrganizationFormData';\nimport { OrganizationFormData } from 'src/modules/organization/types/OrganizationFormData';\nimport { OrganizationSettings } from 'src/modules/organization/views/OrganizationSettings';\n\nexport const OrganizationPage = (): React.ReactElement => {\n const intl = useIntl();\n\n const user = useSelector(getLoggedInUser);\n const formData = useSelector(getOrganizationFormData);\n\n const form = useForm('admin.organization', {\n reinitialize: false,\n initialValues: formData,\n });\n const syncOrganization = useAction(ORGANIZATION_SYNC_PERFORM.request);\n\n useEffect(() => form.subscribe((prevState) => {\n if (prevState.values !== form.currentState.values) {\n syncOrganization('background', form.currentState.values);\n }\n }), [form, syncOrganization]);\n\n return (\n <>\n \n {intl.formatMessage({ id: 'admin/organization/title' })}\n \n\n \n \n {intl.formatMessage({ id: 'organization/settings/breadcrumbs/project' })}\n \n \n )}\n title={intl.formatMessage({ id: 'admin/organization/title' })}\n >\n \n \n \n );\n};\n","import { organizationSyncReducer } from 'src/modules/organization/reducers/organizationSyncReducer';\nimport { OrganizationState } from 'src/modules/organization/types/OrganizationState';\nimport { chainReducers } from 'src/utils/chainReducers';\n\nconst defaultState: OrganizationState = {\n sync: null,\n};\n\nexport const organizationReducer = chainReducers(defaultState, [\n organizationSyncReducer,\n]);\n","import { Action } from 'redux';\nimport { FUTURE } from 'src/modules/common/types/Future';\nimport {\n ORGANIZATION_SYNC_PERFORM,\n ORGANIZATION_SYNC_RESET,\n} from 'src/modules/organization/actions/OrganizationActions';\nimport { OrganizationState } from 'src/modules/organization/types/OrganizationState';\n\nexport function organizationSyncReducer(state: OrganizationState, action: Action): OrganizationState {\n if (ORGANIZATION_SYNC_RESET.is(action)) {\n return { ...state, sync: null };\n }\n\n if (ORGANIZATION_SYNC_PERFORM.isRequest(action)) {\n return {\n ...state,\n sync: {\n formData: action.meta,\n status: FUTURE.pending(),\n },\n };\n }\n if (ORGANIZATION_SYNC_PERFORM.isPending(action)) {\n return {\n ...state,\n sync: {\n formData: action.meta,\n status: FUTURE.pending(),\n },\n };\n }\n if (ORGANIZATION_SYNC_PERFORM.isSuccess(action)) {\n return {\n ...state,\n sync: {\n formData: action.data,\n status: FUTURE.success(undefined),\n },\n };\n }\n if (ORGANIZATION_SYNC_PERFORM.isFailure(action)) {\n return {\n ...state,\n sync: {\n formData: action.meta,\n status: FUTURE.failure(action.data),\n },\n };\n }\n\n return state;\n}\n","import { SagaIterator } from 'redux-saga';\nimport {\n ORGANIZATION_SYNC_PERFORM,\n ORGANIZATION_SYNC_RESET,\n} from 'src/modules/organization/actions/OrganizationActions';\nimport { organizationSyncPerformSaga } from 'src/modules/organization/sagas/organizationSyncPerformSaga';\nimport { cancel, take, takeLatest } from 'typed-redux-saga';\n\nexport function* organizationSaga(): SagaIterator {\n while (true) {\n const task = yield* takeLatest(ORGANIZATION_SYNC_PERFORM.isRequest, organizationSyncPerformSaga);\n\n yield* take(ORGANIZATION_SYNC_RESET.is);\n yield* cancel(task);\n }\n}\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { ORGANIZATION_SYNC_PERFORM } from 'src/modules/organization/actions/OrganizationActions';\nimport { saveOrganizationForm } from 'src/modules/organization/sagas/utils/saveOrganizationForm';\nimport { syncUserOrganization } from 'src/modules/organization/sagas/utils/syncUserOrganization';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, delay, put } from 'typed-redux-saga';\n\nexport function* organizationSyncPerformSaga(\n action: GetRequestActionType,\n): SagaIterator {\n const mode = action.data;\n const form = action.meta;\n\n try {\n yield* call(logDebug, `Synchronizing organization in ${mode}...`, form);\n yield* put(ORGANIZATION_SYNC_PERFORM.pending(form));\n if (mode === 'background') {\n yield* delay(1_000);\n }\n\n const organization = yield* call(saveOrganizationForm, form);\n yield* call(syncUserOrganization, organization);\n\n yield* call(logDebug, `Synchronizing organization in ${mode}... done`, organization);\n yield* put(ORGANIZATION_SYNC_PERFORM.success(organization, form));\n\n yield* call(scheduleUpdateLatestActivity);\n yield* call(scheduleUpdateFeedbackCounter);\n } catch (error) {\n yield* call(logError, `Synchronizing organization in ${mode}... error`, error);\n yield* put(ORGANIZATION_SYNC_PERFORM.failure(NativeError.wrap(error), form));\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { syncOrganizationForeground } from 'src/modules/organization/sagas/utils/syncOrganizationForeground';\nimport { waitOrganizationSync } from 'src/modules/organization/sagas/utils/waitOrganizationSync';\nimport { getOrganizationSyncData } from 'src/modules/organization/selectors/getOrganizationSyncData';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* forceOrganizationSync(): SagaIterator {\n // if synchronization is scheduled, new foreground task is triggered\n // to cancel all existing processes and to skip the planned delay\n const saving = yield* select(getOrganizationSyncData);\n if (saving?.status.state === 'pending') {\n yield* call(syncOrganizationForeground, saving.formData);\n } else {\n yield* call(waitOrganizationSync);\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { ORGANIZATION } from 'src/modules/common/codecs/Organization';\nimport { Organization } from 'src/modules/common/types/Organization';\nimport { getOrganization } from 'src/modules/organization/selectors/getOrganization';\nimport { OrganizationFormData } from 'src/modules/organization/types/OrganizationFormData';\nimport { OrganizationRequestData } from 'src/modules/organization/types/OrganizationRequestData';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* saveOrganizationForm(\n formData: OrganizationFormData,\n): SagaIterator {\n try {\n const organization = yield* select(getOrganization);\n const requestData: OrganizationRequestData = {\n logoId: formData.logo?.id ?? null,\n useOrganizationContacts: formData.useOrganizationContacts,\n\n address: formData.address,\n contact: formData.contact,\n };\n\n const { content } = yield* call(\n makeRestRequest,\n 'PUT',\n `/organizations/${encodeURIComponent(organization.id)}`,\n requestData,\n );\n return yield* call(\n decodeOrThrow,\n ORGANIZATION,\n content,\n );\n } catch (error) {\n throw new RuntimeError('Could not save organization form', { formData }, NativeError.wrap(error));\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { ORGANIZATION_SYNC_PERFORM } from 'src/modules/organization/actions/OrganizationActions';\nimport { waitOrganizationSync } from 'src/modules/organization/sagas/utils/waitOrganizationSync';\nimport { OrganizationFormData } from 'src/modules/organization/types/OrganizationFormData';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* syncOrganizationForeground(formData: OrganizationFormData): SagaIterator {\n yield* put(ORGANIZATION_SYNC_PERFORM.request('foreground', formData));\n yield* call(waitOrganizationSync);\n}\n","import { SagaIterator } from 'redux-saga';\nimport { Organization } from 'src/modules/common/types/Organization';\nimport { WHOAMI_ACTION } from 'src/modules/login/actions/WhoAmIAction';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { put, select } from 'typed-redux-saga';\n\nexport function* syncUserOrganization(organization: Organization): SagaIterator {\n const user = yield* select(getLoggedInUser);\n yield* put(WHOAMI_ACTION.trigger({ ...user, organization }));\n}\n","import { SagaIterator } from 'redux-saga';\nimport { ORGANIZATION_SYNC_PERFORM } from 'src/modules/organization/actions/OrganizationActions';\nimport { getOrganizationSyncData } from 'src/modules/organization/selectors/getOrganizationSyncData';\nimport { call, select, take } from 'typed-redux-saga';\n\nexport function* waitOrganizationSync(): SagaIterator {\n const saving = yield* select(getOrganizationSyncData);\n if (saving === null) {\n return;\n }\n if (saving.status.state === 'success') {\n return;\n }\n if (saving.status.state === 'failure') {\n throw saving.status.error;\n }\n\n yield* take([ORGANIZATION_SYNC_PERFORM.isSuccess, ORGANIZATION_SYNC_PERFORM.isFailure]);\n yield* call(waitOrganizationSync);\n}\n","import { createSelector } from 'reselect';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\n\nexport const getOrganization = createSelector([\n getLoggedInUser,\n], (state) => state.organization);\n","import { createSelector } from 'reselect';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { OrganizationFormData } from 'src/modules/organization/types/OrganizationFormData';\n\nexport const getOrganizationFormData = createSelector([\n getLoggedInUser,\n], (user): OrganizationFormData => ({\n name: user.organization.name,\n logo: user.organization.logo,\n\n address: user.organization.address,\n contact: user.organization.contact,\n\n useOrganizationContacts: user.organization.useOrganizationContacts,\n}));\n","import { OrganizationState } from 'src/modules/organization/types/OrganizationState';\nimport { RootState } from 'src/types/RootState';\n\nexport function getOrganizationState(state: RootState): OrganizationState {\n return state.organization;\n}\n","import { createSelector } from 'reselect';\nimport { getOrganizationState } from 'src/modules/organization/selectors/getOrganizationState';\n\nexport const getOrganizationSyncData = createSelector([\n getOrganizationState,\n], (state) => state.sync);\n","import './OrganizationSettings.scss';\nimport { CountryCode } from '@belimo-retrofit-portal/logic';\nimport { FormController } from '@form-ts/core';\nimport { useFormWatch } from '@form-ts/react';\nimport { constNull } from 'fp-ts/function';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { TileCard } from 'src/modules/common/components/TileCard';\nimport { useCountryList } from 'src/modules/common/hooks/useCountryList';\nimport { OrganizationOffice } from 'src/modules/common/types/OrganizationOffice';\nimport { AssetField } from 'src/modules/form/components/AssetField';\nimport { AutocompleteField } from 'src/modules/form/components/AutocompleteField';\nimport { TextField } from 'src/modules/form/components/TextField';\nimport { ToggleField } from 'src/modules/form/components/ToggleField';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { OrganizationFormData } from 'src/modules/organization/types/OrganizationFormData';\n\ntype Props = {\n readonly office: OrganizationOffice;\n readonly form: FormController;\n};\n\nexport const OrganizationSettings = ({ office, form }: Props): React.ReactElement => {\n const countryCodes = useCountryList();\n const useOrganizationContacts = useFormWatch(form, form.field.at('useOrganizationContacts').value.get);\n\n return (\n
\n
\n
\n }>\n
\n }\n />\n
\n
\n }\n autoComplete=\"off\"\n maxLength={30}\n renderHint={constNull}\n />\n
\n
\n }\n autoComplete=\"off\"\n maxLength={30}\n renderHint={constNull}\n />\n\n }\n autoComplete=\"off\"\n maxLength={20}\n renderHint={constNull}\n />\n
\n
\n }\n options={countryCodes}\n itemToElement={renderCountryOption}\n />\n\n }\n autoComplete=\"off\"\n maxLength={10}\n renderHint={constNull}\n />\n\n }\n autoComplete=\"off\"\n maxLength={30}\n renderHint={constNull}\n />\n
\n
\n }\n autoComplete=\"off\"\n maxLength={30}\n renderHint={constNull}\n />\n\n }\n autoComplete=\"off\"\n maxLength={30}\n renderHint={constNull}\n />\n
\n
\n
\n\n
\n }>\n
\n
\n
\n \n
\n\n
\n {office.name}\n
\n
\n\n
\n
\n \n
\n\n
\n {office.address.street}\n
\n
\n\n
\n
\n \n
\n\n
\n {office.address.city}\n
\n
\n\n
\n
\n \n
\n\n
\n \n
\n
\n\n
\n
\n \n
\n\n
\n {office.address.zip}\n
\n
\n\n
\n
\n \n
\n\n
\n {office.contact.phone}\n
\n
\n\n
\n
\n \n
\n\n
\n {office.contact.email}\n
\n
\n\n
\n
\n \n
\n\n
\n {office.contact.website}\n
\n
\n
\n
\n
\n\n
\n }>\n \n\n \n \n
\n
\n
\n );\n};\n\nfunction renderCountryOption(option: CountryCode | null): React.ReactNode {\n return option ? : null;\n}\n\nfunction preventDefault(event: React.FormEvent): void {\n event.preventDefault();\n}\n","import { constVoid } from 'fp-ts/function';\nimport { createContext } from 'react';\nimport { OutputDocumentPageInfo } from 'src/modules/output/types/OutputDocumentPageInfo';\n\nexport type OutputDocumentContextData = {\n readonly registerPage: (page: OutputDocumentPageInfo) => void;\n readonly unregisterPage: (id: string) => void;\n};\n\nexport const OutputDocumentContext = createContext({\n registerPage: constVoid,\n unregisterPage: constVoid,\n});\n","import { createContext } from 'react';\n\ntype OutputPageContextData = {\n readonly pageNumber: number;\n readonly totalPages: number;\n};\n\nexport const OutputPageContext = createContext({\n pageNumber: 0,\n totalPages: 0,\n});\n","type OutputInnerHeight = number;\ntype OutputOuterHeight = number;\n\nexport type OutputBlock = {\n readonly widows: number;\n readonly orphans: number;\n\n readonly block: TBlock;\n readonly rows: ReadonlyArray>;\n};\nexport type OutputBlockRow = {\n readonly height: (before: ReadonlyArray) => OutputOuterHeight;\n readonly element: TElement;\n};\n\nexport function splitBlocksIntoPages(\n blocks: ReadonlyArray>,\n pageHeight: (pageIndex: number) => OutputInnerHeight,\n onBlockBreak?: (block: TBlock, pageIndex: number) => OutputBlockRow | null,\n): TElement[][] {\n let currentPageIndex = 0;\n let currentPageItems: TElement[] = [];\n let currentPageHeight = 0;\n let maximumPageHeight = pageHeight(currentPageIndex);\n\n let currentBlockIndex = 0;\n let currentBlock = blocks[currentBlockIndex];\n let currentRows = currentBlock ? currentBlock.rows.slice() : [];\n let hasBlockRows = false;\n\n function breakBlock(insertWidowsHeader: boolean): void {\n const widowsHeader = insertWidowsHeader && onBlockBreak\n ? onBlockBreak(currentBlock.block, currentPageIndex)\n : null;\n\n currentPageIndex += 1;\n currentPageItems = widowsHeader ? [widowsHeader.element] : [];\n currentPageHeight = widowsHeader ? widowsHeader.height([]) : 0;\n maximumPageHeight = pageHeight(currentPageIndex);\n\n resultPages.push(currentPageItems);\n }\n function forwardBlock(): void {\n currentBlockIndex += 1;\n currentBlock = blocks[currentBlockIndex];\n currentRows = currentBlock ? currentBlock.rows.slice() : [];\n hasBlockRows = false;\n }\n\n function insertRow(row: OutputBlockRow): void {\n const elementHeight = row.height(currentPageItems);\n\n currentPageItems.push(row.element);\n currentPageHeight += elementHeight;\n hasBlockRows = true;\n }\n\n const resultPages = [currentPageItems];\n while (currentBlockIndex < blocks.length) {\n if (currentRows.length === 0) {\n forwardBlock();\n continue;\n }\n\n const orphansCount = getOrphansCount(maximumPageHeight - currentPageHeight, currentRows, currentPageItems);\n const widowsCount = currentRows.length - orphansCount;\n if (widowsCount === 0) {\n currentRows.forEach(insertRow);\n\n forwardBlock();\n } else if (widowsCount < currentBlock.widows) {\n const orphansRows = currentRows.splice(0, currentRows.length - currentBlock.widows);\n orphansRows.forEach(insertRow);\n breakBlock(true);\n\n currentRows.forEach(insertRow);\n forwardBlock();\n } else if (orphansCount < currentBlock.orphans) {\n const orphansRows = currentRows.splice(0, orphansCount);\n breakBlock(hasBlockRows);\n orphansRows.forEach(insertRow);\n } else {\n const orphansRows = currentRows.splice(0, orphansCount);\n orphansRows.forEach(insertRow);\n breakBlock(true);\n }\n }\n\n return resultPages;\n}\n\nfunction getOrphansCount(\n pageHeight: OutputInnerHeight,\n blockRows: ReadonlyArray>,\n pageItems: ReadonlyArray,\n): number {\n let requiredHeight = 0;\n for (let index = 0; index < blockRows.length; ++index) {\n requiredHeight += blockRows[index].height(pageItems);\n if (requiredHeight > pageHeight) {\n return index;\n }\n }\n\n return blockRows.length;\n}\n","/* eslint-disable react/no-array-index-key */\n/* eslint-disable react/jsx-no-constructed-context-values */\nimport './OutputDocument.scss';\nimport React, { useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { OutputDocumentContext, OutputDocumentContextData } from 'src/modules/output/context/OutputDocumentContext';\nimport { OutputPageContext } from 'src/modules/output/context/OutputPageContext';\nimport { OutputDocumentPageInfo } from 'src/modules/output/types/OutputDocumentPageInfo';\n\ntype Props = {\n readonly children: React.ReactNode;\n};\n\nexport const OutputDocument = ({ children }: Props): React.ReactElement => {\n const pageContents = useRef(new Map());\n const documentContext = useMemo((): OutputDocumentContextData => ({\n registerPage: (page: OutputDocumentPageInfo): void => {\n pageContents.current = pageContents.current.set(page.id, page);\n },\n unregisterPage: (id: string): void => {\n pageContents.current.delete(id);\n },\n }), []);\n\n const [collectedPages, setCollectedPages] = useState(null);\n useLayoutEffect(() => {\n const timerId = window.setTimeout(() => {\n setCollectedPages(\n [...pageContents.current.values()]\n .filter((it) => it.visible)\n .sort((a, b) => a.order - b.order)\n .map((it) => it.content),\n );\n }, 100);\n return () => window.clearTimeout(timerId);\n }, []);\n\n return (\n
\n {collectedPages !== null && collectedPages.map((page, index) => (\n
\n \n {page}\n \n
\n ))}\n {collectedPages === null && (\n \n
\n {children}\n
\n
\n )}\n
\n );\n};\n","import './OutputDocument.scss';\nimport React, { useContext, useLayoutEffect } from 'react';\nimport { OutputDocumentContext } from 'src/modules/output/context/OutputDocumentContext';\n\ntype Props = {\n readonly id: string;\n readonly order: number;\n readonly section: string;\n readonly visible: boolean;\n readonly children: React.ReactElement;\n};\n\nexport const OutputDocumentPage = ({ id, order, section, visible, children }: Props): React.ReactElement => {\n const { registerPage, unregisterPage } = useContext(OutputDocumentContext);\n\n useLayoutEffect(() => {\n registerPage({\n id: id,\n order: order,\n section: section,\n visible: visible,\n content: children,\n });\n }, [children, id, order, section, visible, registerPage]);\n\n useLayoutEffect(() => () => unregisterPage(id), [id, unregisterPage]);\n\n return children;\n};\n","/* eslint-disable max-len */\nimport * as React from 'react';\n\nexport const OutputLogo = (): React.ReactElement => (\n \n \n \n \n \n);\n","import './OutputPage.scss';\nimport clsx from 'clsx';\nimport React from 'react';\nimport { OutputPagination } from 'src/modules/output/views/OutputPagination';\nimport { Language } from 'src/types/common/Language';\n\ntype Props = {\n readonly language: Language;\n readonly children: React.ReactNode;\n readonly showPageNumber: boolean;\n};\n\nexport const OutputPage = React.forwardRef((\n {\n language,\n children,\n showPageNumber,\n }: Props,\n forwardedRef: React.ForwardedRef,\n): React.ReactElement => (\n \n
\n {children}\n
\n\n {showPageNumber && (\n
\n \n
\n )}\n \n));\n","import './OutputPagination.scss';\nimport React from 'react';\nimport { OutputPageContext } from 'src/modules/output/context/OutputPageContext';\n\nexport const OutputPagination = (): React.ReactElement => {\n const { pageNumber, totalPages } = React.useContext(OutputPageContext);\n\n return (\n
\n {pageNumber > 0\n ? `${pageNumber} / ${totalPages}`\n : 'x / x'}\n
\n );\n};\n","import './OutputTitle.scss';\nimport React from 'react';\n\ntype Props = {\n readonly children: React.ReactNode;\n};\n\nexport const OutputTitle = ({ children }: Props): React.ReactElement => (\n
\n {children}\n
\n);\n","import { FormController } from '@form-ts/core';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { PasswordForgotFormData } from 'src/modules/password-forgot/types/PasswordForgotFormData';\nimport { createActions } from 'src/utils/createActions';\n\nexport const PASSWORD_FORGOT_SUBMIT =\n createActions, void>('PASSWORD_FORGOT_SUBMIT');\n","import { trim } from 'fp-ts/string';\nimport { FormRule } from 'src/modules/form/types/FormRule';\nimport * as R from 'src/modules/form/utils/rules';\nimport { PasswordForgotFormData } from 'src/modules/password-forgot/types/PasswordForgotFormData';\n\nexport const PASSWORD_FORGOT_FORM_SCHEMA: FormRule = R.struct({\n username: R.allOf([\n R.map(trim, R.nonEmpty()),\n R.email(),\n ]),\n});\n","import React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { useIntl } from 'react-intl';\nimport { useAction } from 'src/hooks/useAction';\nimport { LoginLayout } from 'src/modules/common/layouts/LoginLayout';\nimport { PASSWORD_FORGOT_SUBMIT } from 'src/modules/password-forgot/actions/PasswordForgotActions';\nimport { PasswordForgotScreen } from 'src/modules/password-forgot/views/PasswordForgotScreen';\n\nexport const PasswordForgotPage = (): React.ReactElement => {\n const intl = useIntl();\n const submitForm = useAction(PASSWORD_FORGOT_SUBMIT.request);\n\n return (\n <>\n \n {intl.formatMessage({ id: 'passwordForgot/pageTitle' })}\n \n\n \n \n \n \n );\n};\n","import { SagaIterator } from 'redux-saga';\nimport { PASSWORD_FORGOT_SUBMIT } from 'src/modules/password-forgot/actions/PasswordForgotActions';\nimport { passwordForgotSubmitSaga } from 'src/modules/password-forgot/sagas/passwordForgotSubmitSaga';\nimport { takeLatest } from 'typed-redux-saga';\n\nexport function* passwordForgotSaga(): SagaIterator {\n yield* takeLatest(PASSWORD_FORGOT_SUBMIT.isRequest, passwordForgotSubmitSaga);\n}\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { formSubmitFailure } from 'src/modules/form/sagas/utils/formSubmitFailure';\nimport { formSubmitStart } from 'src/modules/form/sagas/utils/formSubmitStart';\nimport { formSubmitSuccess } from 'src/modules/form/sagas/utils/formSubmitSuccess';\nimport { formValidate } from 'src/modules/form/sagas/utils/formValidate';\nimport { PASSWORD_FORGOT_SUBMIT } from 'src/modules/password-forgot/actions/PasswordForgotActions';\nimport { PASSWORD_FORGOT_FORM_SCHEMA } from 'src/modules/password-forgot/constants/schema';\nimport { submitPasswordForgot } from 'src/modules/password-forgot/sagas/utils/submitPasswordForgot';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, delay, put } from 'typed-redux-saga';\n\nexport function* passwordForgotSubmitSaga(\n action: GetRequestActionType,\n): SagaIterator {\n const form = action.data;\n const values = form.values.get(form.currentState);\n\n const valid = yield* call(formValidate, form, PASSWORD_FORGOT_FORM_SCHEMA);\n if (!valid) {\n return;\n }\n\n try {\n yield* call(logDebug, 'Requesting password recovery...');\n yield* put(PASSWORD_FORGOT_SUBMIT.pending());\n yield* call(formSubmitStart, form);\n\n yield* delay(500);\n yield* call(submitPasswordForgot, values);\n\n yield* call(logDebug, 'Requesting password recovery... done');\n yield* put(PASSWORD_FORGOT_SUBMIT.success());\n\n yield* call(formSubmitSuccess, form);\n } catch (error) {\n yield* call(sentryCatch, error);\n\n yield* call(logError, 'Requesting password recovery... error', error);\n yield* put(PASSWORD_FORGOT_SUBMIT.failure(NativeError.wrap(error)));\n\n yield* call(formSubmitFailure, form, {\n username: {\n code: 'invalid',\n path: 'username',\n\n value: values.username,\n message: 'Invalid response',\n context: {},\n },\n });\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { PasswordForgotFormData } from 'src/modules/password-forgot/types/PasswordForgotFormData';\nimport { call } from 'typed-redux-saga';\n\nexport function* submitPasswordForgot(form: PasswordForgotFormData): SagaIterator {\n try {\n const body = {\n email: form.username,\n };\n\n yield* call(makeRestRequest, 'POST', '/auth/reset-password', body);\n } catch (error) {\n throw new RuntimeError('Could not request password recovery', { form }, NativeError.wrap(error));\n }\n}\n","import './PasswordForgotForm.scss';\nimport { FormController } from '@form-ts/core';\nimport { useFormWatch } from '@form-ts/react';\nimport { constNull } from 'fp-ts/function';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\nimport { TextField } from 'src/modules/form/components/TextField';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { PasswordForgotFormData } from 'src/modules/password-forgot/types/PasswordForgotFormData';\n\ntype Props = {\n readonly form: FormController;\n readonly onSubmit: () => void;\n};\n\nexport const PasswordForgotForm = ({ form, onSubmit }: Props): React.ReactElement => {\n const intl = useIntl();\n\n const handleSubmit = useCallback((event: React.FormEvent) => {\n event.preventDefault();\n onSubmit();\n }, [onSubmit]);\n\n const isSubmitting = useFormWatch(form, form.submitting.get);\n\n return (\n \n \n\n (\n
\n \n
\n )}\n size=\"md\"\n >\n \n \n \n );\n};\n","import './PasswordForgotScreen.scss';\nimport { FormController } from '@form-ts/core';\nimport { useForm, useFormWatch } from '@form-ts/react';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { ArrowLeftIcon } from 'src/modules/common/icons/ArrowLeftIcon';\nimport { useFormValidator } from 'src/modules/form/hooks/useFormValidator';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { PASSWORD_FORGOT_FORM_SCHEMA } from 'src/modules/password-forgot/constants/schema';\nimport { PasswordForgotFormData } from 'src/modules/password-forgot/types/PasswordForgotFormData';\nimport { PasswordForgotForm } from 'src/modules/password-forgot/views/PasswordForgotForm';\n\ntype Props = {\n readonly onSubmit: (form: FormController) => void;\n};\n\nexport const PasswordForgotScreen = ({ onSubmit }: Props): React.ReactElement => {\n const form = useForm('password.forgot', {\n reinitialize: false,\n initialValues: { username: '' },\n });\n useFormValidator(form, PASSWORD_FORGOT_FORM_SCHEMA);\n\n const isSubmitted = useFormWatch(form, form.submitSucceded.get);\n const handleSubmit = useCallback(() => {\n onSubmit(form);\n }, [form, onSubmit]);\n\n return (\n
\n

\n \n

\n\n

\n {isSubmitted\n ? \n : }\n

\n\n {!isSubmitted && (\n
\n \n
\n )}\n\n
\n \n \n \n \n
\n
\n );\n};\n","import { FormController } from '@form-ts/core';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { PasswordResetFormData } from 'src/modules/password-reset/types/PasswordResetFormData';\nimport { createActions } from 'src/utils/createActions';\nimport { createTrigger } from 'src/utils/createTrigger';\n\nexport const PASSWORD_RESET_TOKEN =\n createTrigger('PASSWORD_RESET_TOKEN');\n\nexport const PASSWORD_RESET_SUBMIT =\n createActions, void>('PASSWORD_RESET_SUBMIT');\n","import { FormRule } from 'src/modules/form/types/FormRule';\nimport * as R from 'src/modules/form/utils/rules';\nimport { PasswordResetFormData } from 'src/modules/password-reset/types/PasswordResetFormData';\n\n// NOTE: the translations are OK\nexport const PASSWORD_RESET_FORM_SCHEMA: FormRule = R.allOf([\n R.struct({\n confirmation: R.nonEmpty('profile/form/section/changePassword/error/empty'),\n password: R.allOf([\n R.nonEmpty('profile/form/section/changePassword/error/empty'),\n R.minLength(8, 'profile/form/section/changePassword/error/short'),\n R.maxLength(30, 'profile/form/section/changePassword/error/long'),\n R.match(/\\d/, 'profile/form/section/changePassword/error/noDigits'),\n R.match(/[a-z]/i, 'profile/form/section/changePassword/error/noLetters'),\n R.match(/^\\S+$/, 'profile/form/section/changePassword/error/spaces'),\n ]),\n }),\n R.matchField(\n 'confirmation',\n 'password',\n 'profile/form/section/changePassword/error/mismatch',\n ),\n]);\n","import React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { useAction } from 'src/hooks/useAction';\nimport { LoginLayout } from 'src/modules/common/layouts/LoginLayout';\nimport { PASSWORD_RESET_SUBMIT } from 'src/modules/password-reset/actions/PasswordResetActions';\nimport { getPasswordResetValid } from 'src/modules/password-reset/selectors/getPasswordResetValid';\nimport { PasswordResetError } from 'src/modules/password-reset/views/PasswordResetError';\nimport { PasswordResetScreen } from 'src/modules/password-reset/views/PasswordResetScreen';\n\nexport const PasswordResetPage = (): React.ReactElement => {\n const intl = useIntl();\n const tokenValid = useSelector(getPasswordResetValid);\n const submitForm = useAction(PASSWORD_RESET_SUBMIT.request);\n\n return (\n <>\n \n {intl.formatMessage({ id: 'passwordReset/pageTitle' })}\n \n\n \n {tokenValid\n ? \n : }\n \n \n );\n};\n","import React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { useAction } from 'src/hooks/useAction';\nimport { LoginLayout } from 'src/modules/common/layouts/LoginLayout';\nimport { PASSWORD_RESET_SUBMIT } from 'src/modules/password-reset/actions/PasswordResetActions';\nimport { getPasswordResetValid } from 'src/modules/password-reset/selectors/getPasswordResetValid';\nimport { PasswordSetupError } from 'src/modules/password-reset/views/PasswordSetupError';\nimport { PasswordSetupScreen } from 'src/modules/password-reset/views/PasswordSetupScreen';\n\nexport const PasswordSetupPage = (): React.ReactElement => {\n const intl = useIntl();\n const tokenValid = useSelector(getPasswordResetValid);\n const submitForm = useAction(PASSWORD_RESET_SUBMIT.request);\n\n return (\n <>\n \n {intl.formatMessage({ id: 'passwordSetup/pageTitle' })}\n \n\n \n {tokenValid\n ? \n : }\n \n \n );\n};\n","import { passwordResetTokenReducer } from 'src/modules/password-reset/reducers/passwordResetTokenReducer';\nimport { PasswordResetState } from 'src/modules/password-reset/types/PasswordResetState';\nimport { chainReducers } from 'src/utils/chainReducers';\n\nconst defaultState: PasswordResetState = {\n token: null,\n};\n\nexport const passwordResetReducer = chainReducers(defaultState, [\n passwordResetTokenReducer,\n]);\n","import { Action } from 'redux';\nimport { PASSWORD_RESET_TOKEN } from 'src/modules/password-reset/actions/PasswordResetActions';\nimport { PasswordResetState } from 'src/modules/password-reset/types/PasswordResetState';\n\nexport function passwordResetTokenReducer(state: PasswordResetState, action: Action): PasswordResetState {\n if (PASSWORD_RESET_TOKEN.is(action)) {\n return {\n ...state,\n token: action.data,\n };\n }\n\n return state;\n}\n","import { SagaIterator } from 'redux-saga';\nimport { PASSWORD_RESET_SUBMIT } from 'src/modules/password-reset/actions/PasswordResetActions';\nimport { passwordResetSubmitSaga } from 'src/modules/password-reset/sagas/passwordResetSubmitSaga';\nimport { takeLatest } from 'typed-redux-saga';\n\nexport function* passwordResetSaga(): SagaIterator {\n yield* takeLatest(PASSWORD_RESET_SUBMIT.isRequest, passwordResetSubmitSaga);\n}\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { formSubmitFailure } from 'src/modules/form/sagas/utils/formSubmitFailure';\nimport { formSubmitStart } from 'src/modules/form/sagas/utils/formSubmitStart';\nimport { formSubmitSuccess } from 'src/modules/form/sagas/utils/formSubmitSuccess';\nimport { formValidate } from 'src/modules/form/sagas/utils/formValidate';\nimport { PASSWORD_RESET_SUBMIT } from 'src/modules/password-reset/actions/PasswordResetActions';\nimport { PASSWORD_RESET_FORM_SCHEMA } from 'src/modules/password-reset/constants/schema';\nimport { submitPasswordReset } from 'src/modules/password-reset/sagas/utils/submitPasswordReset';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, delay, put } from 'typed-redux-saga';\n\nexport function* passwordResetSubmitSaga(\n action: GetRequestActionType,\n): SagaIterator {\n const form = action.data;\n const values = form.values.get(form.currentState);\n\n const valid = yield* call(formValidate, form, PASSWORD_RESET_FORM_SCHEMA);\n if (!valid) {\n return;\n }\n\n try {\n yield* call(logDebug, 'Resetting password...');\n yield* put(PASSWORD_RESET_SUBMIT.pending());\n yield* call(formSubmitStart, form);\n\n yield* delay(500);\n yield* call(submitPasswordReset, values);\n\n yield* call(logDebug, 'Resetting password... done');\n yield* put(PASSWORD_RESET_SUBMIT.success());\n\n yield* call(formSubmitSuccess, form);\n } catch (error) {\n yield* call(sentryCatch, error);\n\n yield* call(logError, 'Resetting password... error', error);\n yield* put(PASSWORD_RESET_SUBMIT.failure(NativeError.wrap(error)));\n\n yield* call(formSubmitFailure, form, {\n password: {\n code: 'invalid',\n path: 'username',\n\n value: values.password,\n message: 'Invalid response',\n context: {},\n },\n });\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { getPasswordResetToken } from 'src/modules/password-reset/selectors/getPasswordResetToken';\nimport { PasswordResetFormData } from 'src/modules/password-reset/types/PasswordResetFormData';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* submitPasswordReset(form: PasswordResetFormData): SagaIterator {\n try {\n const token = yield* select(getPasswordResetToken);\n const query = new URLSearchParams({ token });\n\n const body = { password: form.password };\n\n yield* call(makeRestRequest, 'POST', `/auth/set-password?${query.toString()}`, body);\n } catch (error) {\n throw new RuntimeError('Could not reset user password', { form }, NativeError.wrap(error));\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { call } from 'typed-redux-saga';\n\nexport function* validateRecoveryToken(token: string): SagaIterator {\n try {\n const query = new URLSearchParams({ token });\n yield* call(makeRestRequest, 'GET', `/auth/check-token?${query.toString()}`);\n } catch (error) {\n throw new RuntimeError('Password recovery token is not valid', { token }, NativeError.wrap(error));\n }\n}\n","import { PasswordResetState } from 'src/modules/password-reset/types/PasswordResetState';\nimport { RootState } from 'src/types/RootState';\n\nexport function getPasswordResetState(state: RootState): PasswordResetState {\n return state.passwordReset;\n}\n","import { createSelector } from 'reselect';\nimport { getPasswordResetState } from 'src/modules/password-reset/selectors/getPasswordResetState';\nimport { assertNotNull } from 'src/utils/assert';\n\nexport const getPasswordResetToken = createSelector([\n getPasswordResetState,\n], (state) => assertNotNull(\n state.token,\n 'Password recovery token is not valid',\n));\n","import { createSelector } from 'reselect';\nimport { getPasswordResetState } from 'src/modules/password-reset/selectors/getPasswordResetState';\n\nexport const getPasswordResetValid = createSelector([\n getPasswordResetState,\n], (state) => state.token !== null);\n","import './PasswordResetError.scss';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { ArrowLeftIcon } from 'src/modules/common/icons/ArrowLeftIcon';\n\nexport const PasswordResetError = (): React.ReactElement => (\n
\n

\n \n

\n\n

\n \n

\n\n
\n \n \n \n \n
\n
\n);\n","import './PasswordResetForm.scss';\nimport { FormController } from '@form-ts/core';\nimport { useFormWatch } from '@form-ts/react';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\nimport { PasswordField } from 'src/modules/form/components/PasswordField';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { PasswordResetFormData } from 'src/modules/password-reset/types/PasswordResetFormData';\n\ntype Props = {\n readonly form: FormController;\n readonly onSubmit: () => void;\n};\n\nexport const PasswordResetForm = ({ form, onSubmit }: Props): React.ReactElement => {\n const intl = useIntl();\n const renderError = useCallback((e: FormError) => intl.formatMessage({ id: e.message }, e.context), [intl]);\n\n const handleSubmit = useCallback((event: React.FormEvent) => {\n event.preventDefault();\n onSubmit();\n }, [onSubmit]);\n\n const isSubmitting = useFormWatch(form, form.submitting.get);\n\n return (\n \n \n\n \n\n (\n
\n \n
\n )}\n size=\"md\"\n >\n \n \n \n );\n};\n","import './PasswordResetScreen.scss';\nimport { FormController } from '@form-ts/core';\nimport { useForm, useFormWatch } from '@form-ts/react';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { ArrowLeftIcon } from 'src/modules/common/icons/ArrowLeftIcon';\nimport { useFormValidator } from 'src/modules/form/hooks/useFormValidator';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { PASSWORD_RESET_FORM_SCHEMA } from 'src/modules/password-reset/constants/schema';\nimport { PasswordResetFormData } from 'src/modules/password-reset/types/PasswordResetFormData';\nimport { PasswordResetForm } from 'src/modules/password-reset/views/PasswordResetForm';\n\ntype Props = {\n readonly onSubmit: (form: FormController) => void;\n};\n\nexport const PasswordResetScreen = ({ onSubmit }: Props): React.ReactElement => {\n const form = useForm('password.reset', {\n reinitialize: false,\n initialValues: {\n password: '',\n confirmation: '',\n },\n });\n useFormValidator(form, PASSWORD_RESET_FORM_SCHEMA);\n\n const isSubmitted = useFormWatch(form, form.submitSucceded.get);\n const handleSubmit = useCallback(() => {\n onSubmit(form);\n }, [form, onSubmit]);\n\n return (\n
\n

\n \n

\n\n

\n {isSubmitted\n ? \n : }\n

\n\n {!isSubmitted && (\n
\n \n
\n )}\n\n
\n \n \n \n \n
\n
\n );\n};\n","import './PasswordSetupError.scss';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { ArrowLeftIcon } from 'src/modules/common/icons/ArrowLeftIcon';\n\nexport const PasswordSetupError = (): React.ReactElement => (\n
\n

\n \n

\n\n

\n \n

\n\n
\n \n \n \n \n
\n
\n);\n","import './PasswordSetupForm.scss';\nimport { FormController } from '@form-ts/core';\nimport { useFormWatch } from '@form-ts/react';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\nimport { PasswordField } from 'src/modules/form/components/PasswordField';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { PasswordResetFormData } from 'src/modules/password-reset/types/PasswordResetFormData';\n\ntype Props = {\n readonly form: FormController;\n readonly onSubmit: () => void;\n};\n\nexport const PasswordSetupForm = ({ form, onSubmit }: Props): React.ReactElement => {\n const intl = useIntl();\n const renderError = useCallback((e: FormError) => intl.formatMessage({ id: e.message }, e.context), [intl]);\n\n const handleSubmit = useCallback((event: React.FormEvent) => {\n event.preventDefault();\n onSubmit();\n }, [onSubmit]);\n\n const isSubmitting = useFormWatch(form, form.submitting.get);\n\n return (\n \n \n\n \n\n (\n
\n \n
\n )}\n >\n \n \n \n );\n};\n","import './PasswordSetupScreen.scss';\nimport { FormController } from '@form-ts/core';\nimport { useForm, useFormWatch } from '@form-ts/react';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { ArrowLeftIcon } from 'src/modules/common/icons/ArrowLeftIcon';\nimport { useFormValidator } from 'src/modules/form/hooks/useFormValidator';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { PASSWORD_RESET_FORM_SCHEMA } from 'src/modules/password-reset/constants/schema';\nimport { PasswordResetFormData } from 'src/modules/password-reset/types/PasswordResetFormData';\nimport { PasswordSetupForm } from 'src/modules/password-reset/views/PasswordSetupForm';\n\ntype Props = {\n readonly onSubmit: (form: FormController) => void;\n};\n\nexport const PasswordSetupScreen = ({ onSubmit }: Props): React.ReactElement => {\n const form = useForm('password.setup', {\n reinitialize: false,\n initialValues: {\n password: '',\n confirmation: '',\n },\n });\n useFormValidator(form, PASSWORD_RESET_FORM_SCHEMA);\n\n const isSubmitted = useFormWatch(form, form.submitSucceded.get);\n const handleSubmit = useCallback(() => {\n onSubmit(form);\n }, [form, onSubmit]);\n\n return (\n
\n

\n \n

\n\n

\n {isSubmitted\n ? \n : }\n

\n\n {!isSubmitted && (\n
\n \n
\n )}\n\n
\n \n \n\n \n \n
\n
\n );\n};\n","import { FormController } from '@form-ts/core';\nimport { UserFormData } from 'src/modules/common/types/UserFormData';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { ChangePasswordData } from 'src/modules/profile/types/ChangePasswordData';\nimport { createActions } from 'src/utils/createActions';\n\nexport const PROFILE_SAVE = createActions, void>('PROFILE_SAVE');\nexport const PROFILE_CHANGE_PASSWORD = createActions, void>(\n 'PROFILE_CHANGE_PASSWORD',\n);\n\nexport const UPDATE_LATEST_ACTIVITY = createActions('UPDATE_LATEST_ACTIVITY');\n","import { FormRule } from 'src/modules/form/types/FormRule';\nimport * as R from 'src/modules/form/utils/rules';\nimport { ChangePasswordData } from 'src/modules/profile/types/ChangePasswordData';\n\nexport const CHANGE_PASSWORD_SCHEMA: FormRule = R.allOf([\n R.struct({\n confirmation: R.pass(),\n password: R.allOf([\n R.nonEmpty('profile/form/section/changePassword/error/empty'),\n R.minLength(8, 'profile/form/section/changePassword/error/short'),\n R.maxLength(30, 'profile/form/section/changePassword/error/long'),\n R.match(/\\d/, 'profile/form/section/changePassword/error/noDigits'),\n R.match(/[a-z]/i, 'profile/form/section/changePassword/error/noLetters'),\n R.match(/^\\S+$/, 'profile/form/section/changePassword/error/spaces'),\n ]),\n }),\n R.matchField(\n 'confirmation',\n 'password',\n 'profile/form/section/changePassword/error/mismatch',\n ),\n]);\n","import './ProfilePage.scss';\nimport React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { useIntl } from 'react-intl';\nimport { AppLayout } from 'src/modules/common/layouts/AppLayout';\nimport { ProfileContent } from 'src/modules/profile/views/ProfileContent';\n\nexport const ProfilePage = (): React.ReactElement => {\n const intl = useIntl();\n\n return (\n <>\n \n {intl.formatMessage({ id: 'profile/pageTitle' })}\n \n\n \n \n \n \n );\n};\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { formSubmitFailure } from 'src/modules/form/sagas/utils/formSubmitFailure';\nimport { formSubmitStart } from 'src/modules/form/sagas/utils/formSubmitStart';\nimport { formSubmitSuccess } from 'src/modules/form/sagas/utils/formSubmitSuccess';\nimport { formValidate } from 'src/modules/form/sagas/utils/formValidate';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { PROFILE_CHANGE_PASSWORD } from 'src/modules/profile/actions/ProfileActions';\nimport { CHANGE_PASSWORD_SCHEMA } from 'src/modules/profile/constants/schema';\nimport { changePassword } from 'src/modules/profile/sagas/utils/changePassword';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* profileChangePasswordSaga(\n action: GetRequestActionType,\n): SagaIterator {\n const changePasswordForm = action.data;\n const changePasswordValues = changePasswordForm.values.get(changePasswordForm.currentState);\n\n const formValid = yield* call(formValidate, changePasswordForm, CHANGE_PASSWORD_SCHEMA);\n if (!formValid) {\n return;\n }\n\n try {\n yield* put(PROFILE_CHANGE_PASSWORD.pending());\n yield* call(logDebug, 'Changing password...');\n yield* call(formSubmitStart, changePasswordForm);\n\n yield* call(changePassword, changePasswordValues);\n\n yield* call(\n showNotification,\n {\n variant: 'success',\n type: 'done',\n messageId: 'profile/notification/passwordSaved',\n },\n );\n\n yield* call(logDebug, 'Changing password... done');\n yield* put(PROFILE_CHANGE_PASSWORD.success());\n yield* call(formSubmitSuccess, changePasswordForm);\n yield* call({ context: changePasswordForm, fn: changePasswordForm.reset }, changePasswordForm.initialState);\n\n yield* call(scheduleUpdateLatestActivity);\n yield* call(scheduleUpdateFeedbackCounter);\n } catch (error) {\n yield* call(sentryCatch, error);\n\n yield* call(logError, 'Changing password... error', error);\n yield* put(PROFILE_CHANGE_PASSWORD.failure(NativeError.wrap(error)));\n\n yield* call(showNotification, { type: 'error', variant: 'error' });\n\n yield* call(formSubmitFailure, changePasswordForm, {\n '': {\n path: '',\n code: 'unknown',\n value: changePasswordValues,\n\n context: {},\n message: String(error),\n },\n });\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport {\n PROFILE_CHANGE_PASSWORD,\n PROFILE_SAVE, UPDATE_LATEST_ACTIVITY,\n} from 'src/modules/profile/actions/ProfileActions';\nimport { profileChangePasswordSaga } from 'src/modules/profile/sagas/profileChangePasswordSaga';\nimport { profileSaveSaga } from 'src/modules/profile/sagas/profileSaveSaga';\nimport { updateLatestActivity } from 'src/modules/profile/sagas/updateLatestActivity';\nimport { takeLatest } from 'typed-redux-saga';\n\nexport function* profileSaga(): SagaIterator {\n yield* takeLatest(PROFILE_SAVE.isRequest, profileSaveSaga);\n yield* takeLatest(PROFILE_CHANGE_PASSWORD.isRequest, profileChangePasswordSaga);\n yield* takeLatest(UPDATE_LATEST_ACTIVITY.isRequest, updateLatestActivity);\n}\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { formSubmitFailure } from 'src/modules/form/sagas/utils/formSubmitFailure';\nimport { formSubmitStart } from 'src/modules/form/sagas/utils/formSubmitStart';\nimport { formSubmitSuccess } from 'src/modules/form/sagas/utils/formSubmitSuccess';\nimport { formValidate } from 'src/modules/form/sagas/utils/formValidate';\nimport { WHOAMI_ACTION } from 'src/modules/login/actions/WhoAmIAction';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { PROFILE_SAVE } from 'src/modules/profile/actions/ProfileActions';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { updateProfile } from 'src/modules/profile/sagas/utils/updateProfile';\nimport { USER_EDIT_FORM_SCHEMA } from 'src/modules/users/constants/userEditFormSchema';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, put, select } from 'typed-redux-saga';\n\nexport function* profileSaveSaga(action: GetRequestActionType): SagaIterator {\n const profileForm = action.data;\n const profileValues = profileForm.values.get(profileForm.currentState);\n\n const formValid = yield* call(formValidate, profileForm, USER_EDIT_FORM_SCHEMA);\n if (!formValid) {\n return;\n }\n\n try {\n yield* put(PROFILE_SAVE.pending());\n yield* call(logDebug, 'Saving profile...');\n yield* call(formSubmitStart, profileForm);\n\n yield* call(updateProfile, profileValues);\n\n yield* call(showNotification, { type: 'done', variant: 'success', messageId: 'profile/notification/profileSaved' });\n\n yield* call(logDebug, 'Saving profile... done');\n yield* put(PROFILE_SAVE.success());\n yield* call(formSubmitSuccess, profileForm);\n\n const authUser = yield* select(getLoggedInUser);\n yield* put(\n WHOAMI_ACTION.trigger({ ...authUser, firstName: profileValues.firstName, lastName: profileValues.lastName }),\n );\n\n yield* call(scheduleUpdateLatestActivity);\n yield* call(scheduleUpdateFeedbackCounter);\n } catch (error) {\n yield* call(sentryCatch, error);\n\n yield* call(logError, 'Saving profile... error', error);\n yield* put(PROFILE_SAVE.failure(NativeError.wrap(error)));\n\n yield* call(showNotification, { type: 'error', variant: 'error' });\n\n yield* call(formSubmitFailure, profileForm, {\n '': {\n path: '',\n code: 'unknown',\n value: profileForm,\n\n message: String(error),\n context: {},\n },\n });\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { call } from 'typed-redux-saga';\n\nexport function* updateLatestActivity(): SagaIterator {\n try {\n yield* call(\n makeRestRequest,\n 'PUT',\n '/account/update-latest-activity',\n );\n } catch (error) {\n throw new RuntimeError('Could not update user`s latest activity', {}, NativeError.wrap(error));\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { ChangePasswordData } from 'src/modules/profile/types/ChangePasswordData';\nimport { call } from 'typed-redux-saga';\n\nexport function* changePassword(passwordData: ChangePasswordData): SagaIterator {\n try {\n const body = { password: passwordData.password };\n yield* call(makeRestRequest, 'PUT', '/account/password', body);\n } catch (error) {\n throw new RuntimeError('Could not update password', { passwordData }, NativeError.wrap(error));\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { UPDATE_LATEST_ACTIVITY } from 'src/modules/profile/actions/ProfileActions';\nimport { put } from 'typed-redux-saga';\n\nexport function* scheduleUpdateLatestActivity(): SagaIterator {\n yield* put(UPDATE_LATEST_ACTIVITY.request());\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { UserFormData } from 'src/modules/common/types/UserFormData';\nimport { call } from 'typed-redux-saga';\n\nexport function* updateProfile(updateData: UserFormData): SagaIterator {\n try {\n yield* call(makeRestRequest, 'PUT', '/account/profile', updateData);\n } catch (error) {\n throw new RuntimeError('Could not update profile', { updateData }, NativeError.wrap(error));\n }\n}\n","import './PasswordChangeForm.scss';\nimport { Stack } from '@carbon/react';\nimport { FormController } from '@form-ts/core';\nimport React from 'react';\nimport { useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { PasswordField } from 'src/modules/form/components/PasswordField';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { ChangePasswordData } from 'src/modules/profile/types/ChangePasswordData';\n\ntype Props = {\n form: FormController;\n onChange: () => void;\n};\n\nexport const PasswordChangeForm = ({ form, onChange }: Props): React.ReactElement => {\n const intl = useIntl();\n\n const handleSubmit = (event: React.FormEvent): void => {\n event.preventDefault();\n onChange();\n };\n\n return (\n \n \n

\n {intl.formatMessage({ id: 'profile/form/section/changePassword/passwordTip1' })}\n

\n

\n {intl.formatMessage({ id: 'profile/form/section/changePassword/passwordTip2' })}\n

\n

\n {intl.formatMessage({ id: 'profile/form/section/changePassword/passwordTip3' })}\n

\n
\n {/* Accessibility: https://www.chromium.org/developers/design-documents/create-amazing-password-forms */}\n \n intl.formatMessage({ id: error.message }, error.context)}\n size=\"md\"\n />\n intl.formatMessage({ id: error.message }, error.context)}\n size=\"md\"\n />\n \n {intl.formatMessage({ id: 'profile/form/section/changePassword/button/update' })}\n \n
\n );\n};\n","import { Stack } from '@carbon/react';\nimport { useForm, useFormWatch } from '@form-ts/react';\nimport React from 'react';\nimport { useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { useBoundAction } from 'src/hooks/useBoundAction';\nimport { FormSection } from 'src/modules/common/components/FormSection';\nimport { UserForm } from 'src/modules/common/components/UserForm';\nimport { UserFormData } from 'src/modules/common/types/UserFormData';\nimport { useFormValidator } from 'src/modules/form/hooks/useFormValidator';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { PROFILE_CHANGE_PASSWORD, PROFILE_SAVE } from 'src/modules/profile/actions/ProfileActions';\nimport { CHANGE_PASSWORD_SCHEMA } from 'src/modules/profile/constants/schema';\nimport { ChangePasswordData } from 'src/modules/profile/types/ChangePasswordData';\nimport { PasswordChangeForm } from 'src/modules/profile/views/PasswordChangeForm';\nimport { ProfileHeader } from 'src/modules/profile/views/ProfileHeader';\nimport { USER_EDIT_FORM_SCHEMA } from 'src/modules/users/constants/userEditFormSchema';\n\nexport const ProfileContent = (): React.ReactElement => {\n const intl = useIntl();\n\n const authUser = useSelector(getLoggedInUser);\n\n const profileForm = useForm('profile.user-settings', {\n initialValues: {\n email: authUser.email,\n firstName: authUser.firstName,\n lastName: authUser.lastName,\n role: authUser.role,\n },\n reinitialize: false,\n });\n\n const changePasswordForm = useForm('profile.password-change', {\n initialValues: {\n confirmation: '',\n password: '',\n },\n reinitialize: false,\n });\n\n useFormValidator(profileForm, USER_EDIT_FORM_SCHEMA);\n useFormValidator(changePasswordForm, CHANGE_PASSWORD_SCHEMA);\n\n const isProfileFormSubmitting = useFormWatch(profileForm, profileForm.submitting.get);\n\n const saveProfile = useBoundAction(PROFILE_SAVE.request, profileForm);\n const changePassword = useBoundAction(PROFILE_CHANGE_PASSWORD.request, changePasswordForm);\n\n return (\n <>\n \n\n \n \n \n \n\n \n \n \n \n \n );\n};\n","import './ProfileHeader.scss';\nimport { Breadcrumb } from '@carbon/react';\nimport React from 'react';\nimport { useIntl } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport { CustomBreadcrumbItem } from 'src/modules/common/components/CustomBreadcrumbItem';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\n\ntype Props = {\n isSubmitting: boolean;\n title: string;\n onSave: () => void;\n};\n\nexport const ProfileHeader = ({ isSubmitting, title, onSave }: Props): React.ReactElement => {\n const intl = useIntl();\n\n return (\n
\n
\n \n \n \n {intl.formatMessage({ id: 'profile/header/breadcrumbs/project' })}\n \n \n \n\n

{title}

\n
\n\n
\n \n {intl.formatMessage({ id: 'profile/header/button/save' })}\n \n
\n
\n );\n};\n","import { Project } from 'src/modules/common/types/Project';\nimport { User } from 'src/modules/common/types/User';\nimport { ProjectListData } from 'src/modules/project-list/types/ProjectListData';\nimport { ProjectListFilter } from 'src/modules/project-list/types/ProjectListFilter';\nimport { ProjectListImportData, ProjectListImportEntry } from 'src/modules/project-list/types/ProjectListImport';\nimport { createActions } from 'src/utils/createActions';\nimport { createTrigger } from 'src/utils/createTrigger';\n\nexport const PROJECT_LIST_FETCH = createTrigger('PROJECT_LIST_FETCH');\nexport const PROJECT_LIST_RESET = createTrigger('PROJECT_LIST_RESET');\nexport const PROJECT_LIST_ABORT = createTrigger('PROJECT_LIST_ABORT');\nexport const PROJECT_LIST_FILTER = createTrigger('PROJECT_LIST_FILTER');\nexport const PROJECT_LIST_SHARE = createTrigger('PROJECT_LIST_SHARE');\n\nexport const PROJECT_LIST_EXPORT = createActions('PROJECT_LIST_EXPORT');\nexport const PROJECT_LIST_DOWNLOAD = createActions('PROJECT_LIST_DOWNLOAD');\n\nexport const PROJECT_LIST_REMOVE_CONFIRM = createTrigger('PROJECT_LIST_REMOVE_CONFIRM');\nexport const PROJECT_LIST_REMOVE_CANCEL = createTrigger('PROJECT_LIST_REMOVE_CANCEL');\nexport const PROJECT_LIST_REMOVE_SUBMIT = createActions('PROJECT_LIST_REMOVE_SUBMIT');\n\nexport const PROJECT_LIST_UNFOLLOW_CONFIRM = createTrigger('PROJECT_LIST_UNFOLLOW_CONFIRM');\nexport const PROJECT_LIST_UNFOLLOW_CANCEL = createTrigger('PROJECT_LIST_UNFOLLOW_CANCEL');\nexport const PROJECT_LIST_UNFOLLOW_SUBMIT = createActions('PROJECT_LIST_UNFOLLOW_SUBMIT');\n\nexport const PROJECT_LIST_IMPORT_OPEN =\n createTrigger('PROJECT_LIST_IMPORT_OPEN');\nexport const PROJECT_LIST_IMPORT_CANCEL =\n createTrigger('PROJECT_LIST_IMPORT_CANCEL');\nexport const PROJECT_LIST_IMPORT_UPLOAD =\n createActions('PROJECT_LIST_IMPORT_UPLOAD');\nexport const PROJECT_LIST_IMPORT_SUBMIT =\n createActions, void>('PROJECT_LIST_IMPORT_SUBMIT');\nexport const PROJECT_LIST_IMPORT_COMPLETE =\n createTrigger('PROJECT_LIST_IMPORT_COMPLETE');\n","import * as C from 'io-ts/Codec';\nimport { ProjectListViewMode } from 'src/modules/project-list/types/ProjectListViewMode';\n\nexport const PROJECT_LIST_VIEW_MODE: C.Codec = C.literal(\n ProjectListViewMode.LIST,\n ProjectListViewMode.GRID,\n);\n","/* eslint-disable max-len,quote-props,@typescript-eslint/dot-notation */\nimport {\n EnergySource,\n getEnergyEfficiencyLabel,\n HvacArea,\n PROJECT_DATA,\n ProjectData,\n UUID,\n} from '@belimo-retrofit-portal/logic';\nimport { Decimal } from 'decimal.js-light';\nimport * as E from 'io-ts/Encoder';\nimport { XlsxValue } from 'src/modules/common/types/XlsxValue';\nimport {\n EXPORT_AREA_UNIT_MAP,\n EXPORT_BUILDING_TYPE_MAP,\n EXPORT_COUNTRY_CODE_MAP,\n EXPORT_CURRENCY_CODE_MAP,\n EXPORT_ENERGY_SOURCE_COOLING,\n EXPORT_ENERGY_SOURCE_HEATING,\n EXPORT_HEADER_COLUMNS,\n} from 'src/modules/project-list/constants/export';\nimport { ProjectListExportEntry } from 'src/modules/project-list/types/ProjectListExport';\n\nconst CELL_STRING = E.id();\nconst CELL_DECIMAL_2: E.Encoder = {\n encode: (value) => value.toDecimalPlaces(2).toNumber(),\n};\nconst CELL_DECIMAL_4: E.Encoder = {\n encode: (value) => value.toDecimalPlaces(4).toNumber(),\n};\nconst CELL_ENUM: (mapping: Readonly>) => E.Encoder = (mapping) => ({\n encode: (value) => mapping[value],\n});\nconst CELL_RATING: E.Encoder = {\n encode: (value) => {\n const maxLabel = getEnergyEfficiencyLabel(value.toDecimalPlaces(0, Decimal.ROUND_UP));\n const minLabel = getEnergyEfficiencyLabel(value.toDecimalPlaces(0, Decimal.ROUND_DOWN));\n\n return minLabel === maxLabel\n ? minLabel\n : `${minLabel}–${maxLabel}`;\n },\n};\n\nconst CELL_PROJECT_DATA: E.Encoder = {\n encode: (value) => JSON.stringify(PROJECT_DATA.encode(value)),\n};\n\nconst CELL_CARBON_SAVINGS: E.Encoder = {\n encode: (value) => {\n if (value.isNegative()) {\n return '<0';\n }\n if (value.isZero()) {\n return 0;\n }\n if (value.lessThan(1_000_000)) {\n return '<1';\n }\n\n return value.div(1_000_000).toDecimalPlaces(0).toNumber();\n },\n};\n\nconst CELL_ENERGY_SAVINGS: E.Encoder = {\n encode: (value) => {\n if (value.isNegative()) {\n return '<0';\n }\n if (value.isZero()) {\n return 0;\n }\n if (value.lessThan(1_000)) {\n return '<1';\n }\n\n return value.div(1_000).toDecimalPlaces(0).toNumber();\n },\n};\n\nconst CELL_AMOUNT_SAVINGS: E.Encoder = {\n encode: (value) => {\n if (value.isNegative()) {\n return '<0';\n }\n if (value.isZero()) {\n return 0;\n }\n if (value.lessThan(1_000)) {\n return '<1000';\n }\n\n return value.div(1_000).toDecimalPlaces(0).mul(1_000).toNumber();\n },\n};\n\nconst CONTENT_DATA = E.struct({\n 'project id': E.nullable(UUID),\n 'project title': CELL_STRING,\n 'project goal': CELL_STRING,\n\n 'building type': CELL_ENUM(EXPORT_BUILDING_TYPE_MAP),\n 'building size unit': CELL_ENUM(EXPORT_AREA_UNIT_MAP),\n 'building size': E.nullable(CELL_DECIMAL_2),\n 'building street address': CELL_STRING,\n 'building city': CELL_STRING,\n 'building country': CELL_ENUM(EXPORT_COUNTRY_CODE_MAP),\n 'building zip code': CELL_STRING,\n\n 'participants author': CELL_STRING,\n 'participants property manager': CELL_STRING,\n 'participants consulting engineer': CELL_STRING,\n 'participants product engineer': CELL_STRING,\n\n 'currency': CELL_ENUM(EXPORT_CURRENCY_CODE_MAP),\n 'electricity price': E.nullable(CELL_DECIMAL_4),\n 'gas price': E.nullable(CELL_DECIMAL_4),\n 'heating oil price': E.nullable(CELL_DECIMAL_4),\n 'district heating price': E.nullable(CELL_DECIMAL_4),\n 'district cooling price': E.nullable(CELL_DECIMAL_4),\n 'heating other price': E.nullable(CELL_DECIMAL_4),\n 'cooling other price': E.nullable(CELL_DECIMAL_4),\n\n 'heating energy source': CELL_ENUM(EXPORT_ENERGY_SOURCE_HEATING),\n 'heating energy annual consumption': E.nullable(CELL_DECIMAL_2),\n 'heating energy carbon intensity': E.nullable(CELL_DECIMAL_2),\n 'heating electrical aux annual consumption': E.nullable(CELL_DECIMAL_2),\n\n 'cooling energy source': CELL_ENUM(EXPORT_ENERGY_SOURCE_COOLING),\n 'cooling energy annual consumption': E.nullable(CELL_DECIMAL_2),\n 'cooling energy carbon intensity': E.nullable(CELL_DECIMAL_2),\n 'cooling electrical aux annual consumption': E.nullable(CELL_DECIMAL_2),\n\n 'ventilation electrical aux annual consumption': E.nullable(CELL_DECIMAL_2),\n\n 'overall efficiency actual': E.nullable(CELL_RATING),\n 'overall efficiency future': E.nullable(CELL_RATING),\n\n 'heating area efficiency actual': E.nullable(CELL_RATING),\n 'heating area efficiency future': E.nullable(CELL_RATING),\n\n 'cooling area efficiency actual': E.nullable(CELL_RATING),\n 'cooling area efficiency future': E.nullable(CELL_RATING),\n\n 'ventilation area efficiency actual': E.nullable(CELL_RATING),\n 'ventilation area efficiency future': E.nullable(CELL_RATING),\n\n 'heating energy annual savings in MWh or m3': E.nullable(CELL_ENERGY_SAVINGS),\n 'heating energy annual savings in currency': E.nullable(CELL_AMOUNT_SAVINGS),\n 'heating energy annual savings in co2 tonne': E.nullable(CELL_CARBON_SAVINGS),\n\n 'heating electrical aux annual savings in MWh': E.nullable(CELL_ENERGY_SAVINGS),\n 'heating electrical aux annual savings in currency': E.nullable(CELL_AMOUNT_SAVINGS),\n 'heating electrical aux annual savings in co2 tonne': E.nullable(CELL_CARBON_SAVINGS),\n\n 'cooling energy annual savings in MWh': E.nullable(CELL_ENERGY_SAVINGS),\n 'cooling energy annual savings in currency': E.nullable(CELL_AMOUNT_SAVINGS),\n 'cooling energy annual savings in co2 tonne': E.nullable(CELL_CARBON_SAVINGS),\n\n 'cooling electrical aux annual savings in MWh': E.nullable(CELL_ENERGY_SAVINGS),\n 'cooling electrical aux annual savings in currency': E.nullable(CELL_AMOUNT_SAVINGS),\n 'cooling electrical aux annual savings in co2 tonne': E.nullable(CELL_CARBON_SAVINGS),\n\n 'ventilation electrical aux annual savings in MWh': E.nullable(CELL_ENERGY_SAVINGS),\n 'ventilation electrical aux annual savings in currency': E.nullable(CELL_AMOUNT_SAVINGS),\n 'ventilation electrical aux annual savings in co2 tonne': E.nullable(CELL_CARBON_SAVINGS),\n\n 'overall thermal energy annual savings in currency': E.nullable(CELL_AMOUNT_SAVINGS),\n 'overall thermal energy annual savings in co2 tonne': E.nullable(CELL_CARBON_SAVINGS),\n\n 'overall electrical aux annual savings in MWh': E.nullable(CELL_ENERGY_SAVINGS),\n 'overall electrical aux annual savings in currency': E.nullable(CELL_AMOUNT_SAVINGS),\n 'overall electrical aux annual savings in co2 tonne': E.nullable(CELL_CARBON_SAVINGS),\n\n 'total potential annual savings in currency': E.nullable(CELL_AMOUNT_SAVINGS),\n\n 'project data and configuration': CELL_PROJECT_DATA,\n});\n\nexport const EXPORT_CONTENT_LINE: E.Encoder = {\n encode: (entry) => {\n const cells = CONTENT_DATA.encode({\n 'project id': entry.project.id,\n 'project title': entry.project.data.title,\n 'project goal': entry.project.data.goals,\n\n 'building type': entry.project.data.building.type,\n 'building size unit': entry.project.data.building.unit,\n 'building size': entry.project.data.building.size,\n 'building street address': entry.project.data.building.address.street,\n 'building city': entry.project.data.building.address.city,\n 'building country': entry.project.data.building.address.country,\n 'building zip code': entry.project.data.building.address.zip,\n\n 'participants author': entry.project.data.participants.author,\n 'participants property manager': entry.project.data.participants.propertyManager,\n 'participants consulting engineer': entry.project.data.participants.consutlingEngineer,\n 'participants product engineer': entry.project.data.participants.productManager,\n\n 'currency': entry.project.data.currency,\n 'electricity price': entry.project.data.hvac.prices[EnergySource.ELECTRICITY],\n 'gas price': entry.project.data.hvac.prices[EnergySource.GAS],\n 'heating oil price': entry.project.data.hvac.prices[EnergySource.HEATING_OIL],\n 'district heating price': entry.project.data.hvac.prices[EnergySource.HEATING_DISTRICT],\n 'district cooling price': entry.project.data.hvac.prices[EnergySource.COOLING_DISTRICT],\n 'heating other price': entry.project.data.hvac.prices[EnergySource.HEATING_OTHER],\n 'cooling other price': entry.project.data.hvac.prices[EnergySource.COOLING_OTHER],\n\n 'heating energy source': entry.project.data.hvac.areas[HvacArea.HEATING].thermal.energySource,\n 'heating energy annual consumption': entry.project.data.hvac.areas[HvacArea.HEATING].thermal.annualEnergyUse,\n 'heating energy carbon intensity': entry.project.data.hvac.areas[HvacArea.HEATING].thermal.carbonIntensity,\n 'heating electrical aux annual consumption': entry.project.data.hvac.areas[HvacArea.HEATING].electrical.annualEnergyUse,\n\n 'cooling energy source': entry.project.data.hvac.areas[HvacArea.COOLING].thermal.energySource,\n 'cooling energy annual consumption': entry.project.data.hvac.areas[HvacArea.COOLING].thermal.annualEnergyUse,\n 'cooling energy carbon intensity': entry.project.data.hvac.areas[HvacArea.COOLING].thermal.carbonIntensity,\n 'cooling electrical aux annual consumption': entry.project.data.hvac.areas[HvacArea.COOLING].electrical.annualEnergyUse,\n\n 'ventilation electrical aux annual consumption': entry.project.data.hvac.areas[HvacArea.VENTILATION].electrical.annualEnergyUse,\n\n 'overall efficiency actual': entry.results.overall.rating.actual,\n 'overall efficiency future': entry.results.overall.rating.future,\n\n 'heating area efficiency actual': entry.results.perArea.heating.rating.actual,\n 'heating area efficiency future': entry.results.perArea.heating.rating.future,\n\n 'cooling area efficiency actual': entry.results.perArea.cooling.rating.actual,\n 'cooling area efficiency future': entry.results.perArea.cooling.rating.future,\n\n 'ventilation area efficiency actual': entry.results.perArea.ventilation.rating.actual,\n 'ventilation area efficiency future': entry.results.perArea.ventilation.rating.future,\n\n 'heating energy annual savings in MWh or m3': entry.results.perArea.heating.savings.thermal.absolute,\n 'heating energy annual savings in currency': entry.results.perArea.heating.savings.thermal.annual,\n 'heating energy annual savings in co2 tonne': entry.results.perArea.heating.savings.carbon.thermal,\n\n 'heating electrical aux annual savings in MWh': entry.results.perArea.heating.savings.electrical.absolute,\n 'heating electrical aux annual savings in currency': entry.results.perArea.heating.savings.electrical.annual,\n 'heating electrical aux annual savings in co2 tonne': entry.results.perArea.heating.savings.carbon.electrical,\n\n 'cooling energy annual savings in MWh': entry.results.perArea.cooling.savings.thermal.absolute,\n 'cooling energy annual savings in currency': entry.results.perArea.cooling.savings.thermal.annual,\n 'cooling energy annual savings in co2 tonne': entry.results.perArea.cooling.savings.carbon.thermal,\n\n 'cooling electrical aux annual savings in MWh': entry.results.perArea.cooling.savings.electrical.absolute,\n 'cooling electrical aux annual savings in currency': entry.results.perArea.cooling.savings.electrical.annual,\n 'cooling electrical aux annual savings in co2 tonne': entry.results.perArea.cooling.savings.carbon.electrical,\n\n 'ventilation electrical aux annual savings in MWh': entry.results.perArea.ventilation.savings.electrical.absolute,\n 'ventilation electrical aux annual savings in currency': entry.results.perArea.ventilation.savings.electrical.annual,\n 'ventilation electrical aux annual savings in co2 tonne': entry.results.perArea.ventilation.savings.carbon.electrical,\n\n 'overall thermal energy annual savings in currency': entry.results.overall.savings.thermal.annual,\n 'overall thermal energy annual savings in co2 tonne': entry.results.overall.savings.carbon.thermal,\n\n 'overall electrical aux annual savings in MWh': entry.results.overall.savings.electrical.absolute,\n 'overall electrical aux annual savings in currency': entry.results.overall.savings.electrical.annual,\n 'overall electrical aux annual savings in co2 tonne': entry.results.overall.savings.carbon.electrical,\n\n 'total potential annual savings in currency': entry.results.overall.savings.overall.annual,\n\n 'project data and configuration': entry.project.data,\n });\n return EXPORT_HEADER_COLUMNS.map((column) => cells[column]);\n },\n};\n","/* eslint-disable quote-props,@typescript-eslint/dot-notation */\nimport { DECIMAL, PROJECT_DATA, ProjectData, UUID } from '@belimo-retrofit-portal/logic';\nimport { Decimal } from 'decimal.js-light';\nimport { altW, flatMap, map, mapLeft } from 'fp-ts/Either';\nimport { pipe } from 'fp-ts/function';\nimport * as J from 'fp-ts/Json';\nimport * as R from 'fp-ts/Reader';\nimport { map as mapRecord } from 'fp-ts/ReadonlyRecord';\nimport * as D from 'io-ts/Decoder';\nimport { XLSX_VALUE } from 'src/modules/common/codecs/XlsxValue';\nimport {\n IMPORT_AREA_UNIT_MAP,\n IMPORT_BUILDING_TYPE_MAP,\n IMPORT_COUNTRY_CODE_MAP,\n IMPORT_CURRENCY_CODE_MAP,\n IMPORT_ENERGY_SOURCE_COOLING,\n IMPORT_ENERGY_SOURCE_HEATING,\n IMPORT_HEADER_COLUMNS,\n} from 'src/modules/project-list/constants/import';\nimport {\n ProjectListImportColumns,\n ProjectListImportLine,\n ProjectListImportLineMapper,\n ProjectListImportRawLine,\n} from 'src/modules/project-list/types/ProjectListImport';\nimport { formatImportError } from 'src/modules/project-list/utils/formatImportError';\n\nconst CELL_BASE: D.Decoder = pipe(\n XLSX_VALUE,\n D.parse((input) => D.success(String(input ?? ''))),\n);\nconst CELL_EMPTY: D.Decoder = {\n decode: (input) => (\n input == null || input === ''\n ? D.success(null)\n : D.failure(input, 'CellEmpty')\n ),\n};\nconst CELL_DECIMAL_2: D.Decoder = pipe(\n DECIMAL,\n D.parse((input) => (\n input.isNegative()\n ? D.failure(input, 'CellDecimal')\n : D.success(input.toDecimalPlaces(2))\n )),\n);\nconst CELL_DECIMAL_4: D.Decoder = pipe(\n DECIMAL,\n D.parse((input) => (\n input.isNegative()\n ? D.failure(input, 'CellDecimal')\n : D.success(input.toDecimalPlaces(4))\n )),\n);\nconst CELL_STRING = (minLength: number, maxLength: number): D.Decoder => pipe(\n CELL_BASE,\n D.parse((input) => (\n input.length < minLength\n ? D.failure(input, `CellString(${minLength},${maxLength})`)\n : D.success(input.substring(0, maxLength))\n )),\n);\nconst CELL_ENUM: (mapping: Readonly>) => D.Decoder = (mapping) => pipe(\n CELL_BASE,\n D.parse((input) => (\n mapping[input] == null\n ? D.failure(input, `CellEnum(${Object.keys(mapping).join('|')})`)\n : D.success(mapping[input])\n )),\n);\nconst CELL_PROJECT_DATA: D.Decoder = pipe(\n CELL_BASE,\n D.parse((input) => pipe(\n J.parse(input),\n flatMap(PROJECT_DATA.decode),\n altW(() => D.failure(input, 'ProjectData')),\n )),\n);\n\nconst CONTENT_DATA: D.Decoder = D.struct({\n 'project id': D.union(CELL_EMPTY, UUID),\n 'project title': CELL_STRING(1, 40),\n 'project goal': CELL_STRING(0, 280),\n\n 'building type': CELL_ENUM(IMPORT_BUILDING_TYPE_MAP),\n 'building size unit': CELL_ENUM(IMPORT_AREA_UNIT_MAP),\n 'building size': D.union(CELL_EMPTY, CELL_DECIMAL_2),\n 'building street address': CELL_STRING(0, 100),\n 'building city': CELL_STRING(0, 40),\n 'building country': CELL_ENUM(IMPORT_COUNTRY_CODE_MAP),\n 'building zip code': CELL_STRING(0, 20),\n\n 'participants author': CELL_STRING(0, 50),\n 'participants property manager': CELL_STRING(0, 50),\n 'participants consulting engineer': CELL_STRING(0, 50),\n 'participants product engineer': CELL_STRING(0, 50),\n\n 'currency': CELL_ENUM(IMPORT_CURRENCY_CODE_MAP),\n 'electricity price': D.union(CELL_EMPTY, CELL_DECIMAL_4),\n 'gas price': D.union(CELL_EMPTY, CELL_DECIMAL_4),\n 'heating oil price': D.union(CELL_EMPTY, CELL_DECIMAL_4),\n 'district heating price': D.union(CELL_EMPTY, CELL_DECIMAL_4),\n 'district cooling price': D.union(CELL_EMPTY, CELL_DECIMAL_4),\n 'heating other price': D.union(CELL_EMPTY, CELL_DECIMAL_4),\n 'cooling other price': D.union(CELL_EMPTY, CELL_DECIMAL_4),\n\n 'heating energy source': CELL_ENUM(IMPORT_ENERGY_SOURCE_HEATING),\n 'heating energy annual consumption': D.union(CELL_EMPTY, CELL_DECIMAL_2),\n 'heating energy carbon intensity': D.union(CELL_EMPTY, CELL_DECIMAL_2),\n 'heating electrical aux annual consumption': D.union(CELL_EMPTY, CELL_DECIMAL_2),\n\n 'cooling energy source': CELL_ENUM(IMPORT_ENERGY_SOURCE_COOLING),\n 'cooling energy annual consumption': D.union(CELL_EMPTY, CELL_DECIMAL_2),\n 'cooling energy carbon intensity': D.union(CELL_EMPTY, CELL_DECIMAL_2),\n 'cooling electrical aux annual consumption': D.union(CELL_EMPTY, CELL_DECIMAL_2),\n\n 'ventilation electrical aux annual consumption': D.union(CELL_EMPTY, CELL_DECIMAL_2),\n\n 'project data and configuration': CELL_PROJECT_DATA,\n});\n\nconst COLUMN_ORDER: ProjectListImportColumns = {\n 'project id': Number.NaN,\n 'project title': Number.NaN,\n 'project goal': Number.NaN,\n\n 'building type': Number.NaN,\n 'building size unit': Number.NaN,\n 'building size': Number.NaN,\n 'building street address': Number.NaN,\n 'building city': Number.NaN,\n 'building country': Number.NaN,\n 'building zip code': Number.NaN,\n\n 'participants author': Number.NaN,\n 'participants property manager': Number.NaN,\n 'participants consulting engineer': Number.NaN,\n 'participants product engineer': Number.NaN,\n\n 'currency': Number.NaN,\n 'electricity price': Number.NaN,\n 'gas price': Number.NaN,\n 'heating oil price': Number.NaN,\n 'district heating price': Number.NaN,\n 'district cooling price': Number.NaN,\n 'heating other price': Number.NaN,\n 'cooling other price': Number.NaN,\n\n 'heating energy source': Number.NaN,\n 'heating energy annual consumption': Number.NaN,\n 'heating energy carbon intensity': Number.NaN,\n 'heating electrical aux annual consumption': Number.NaN,\n\n 'cooling energy source': Number.NaN,\n 'cooling energy annual consumption': Number.NaN,\n 'cooling energy carbon intensity': Number.NaN,\n 'cooling electrical aux annual consumption': Number.NaN,\n\n 'ventilation electrical aux annual consumption': Number.NaN,\n\n 'project data and configuration': Number.NaN,\n};\n\nconst HEADER_LINE: D.Decoder = pipe(\n D.array(D.string),\n D.parse((columns) => {\n const result = { ...COLUMN_ORDER };\n\n for (const column of IMPORT_HEADER_COLUMNS) {\n const index = columns.indexOf(column);\n if (index < 0) {\n return D.failure(columns, 'HeaderLine');\n }\n\n result[column] = index;\n }\n\n return D.success(result);\n }),\n);\nconst CONTENT_LINE = (columns: ProjectListImportColumns): D.Decoder => pipe(\n D.array(XLSX_VALUE),\n D.parse((cells) => pipe(\n columns,\n mapRecord((index) => cells[index] ?? null),\n D.success,\n )),\n D.parse(CONTENT_DATA.decode),\n);\n\nexport const IMPORT_CONTENT = pipe(\n R.ask(),\n R.map((mapper): D.Decoder => pipe(\n D.array(D.array(XLSX_VALUE)),\n D.parse((rows) => pipe(\n HEADER_LINE.decode(rows[0]),\n map((columns) => rows.slice(1)\n .map(CONTENT_LINE(columns).decode)\n .map((line, index): ProjectListImportLine => ({\n rowNumber: index + 2,\n importData: pipe(line, map(mapper), mapLeft(formatImportError)),\n }))),\n )),\n )),\n);\n","/* eslint-disable quote-props */\nimport {\n AreaUnit,\n BuildingType,\n COUNTRY_CODES,\n CountryCode,\n CurrencyCode,\n EnergySource,\n} from '@belimo-retrofit-portal/logic';\nimport { CURRENCY_CODE_OPTIONS } from 'src/modules/common/constants/options';\n\nexport const EXPORT_HEADER_COLUMNS = [\n 'project id',\n 'project title',\n 'project goal',\n\n 'building type',\n 'building size unit',\n 'building size',\n 'building street address',\n 'building city',\n 'building country',\n 'building zip code',\n\n 'participants author',\n 'participants property manager',\n 'participants consulting engineer',\n 'participants product engineer',\n\n 'currency',\n 'electricity price',\n 'gas price',\n 'heating oil price',\n 'district heating price',\n 'district cooling price',\n 'heating other price',\n 'cooling other price',\n\n 'heating energy source',\n 'heating energy annual consumption',\n 'heating energy carbon intensity',\n 'heating electrical aux annual consumption',\n\n 'cooling energy source',\n 'cooling energy annual consumption',\n 'cooling energy carbon intensity',\n 'cooling electrical aux annual consumption',\n\n 'ventilation electrical aux annual consumption',\n\n 'overall efficiency actual',\n 'overall efficiency future',\n\n 'heating area efficiency actual',\n 'heating area efficiency future',\n\n 'cooling area efficiency actual',\n 'cooling area efficiency future',\n\n 'ventilation area efficiency actual',\n 'ventilation area efficiency future',\n\n 'heating energy annual savings in MWh or m3',\n 'heating energy annual savings in currency',\n 'heating energy annual savings in co2 tonne',\n\n 'heating electrical aux annual savings in MWh',\n 'heating electrical aux annual savings in currency',\n 'heating electrical aux annual savings in co2 tonne',\n\n 'cooling energy annual savings in MWh',\n 'cooling energy annual savings in currency',\n 'cooling energy annual savings in co2 tonne',\n\n 'cooling electrical aux annual savings in MWh',\n 'cooling electrical aux annual savings in currency',\n 'cooling electrical aux annual savings in co2 tonne',\n\n 'ventilation electrical aux annual savings in MWh',\n 'ventilation electrical aux annual savings in currency',\n 'ventilation electrical aux annual savings in co2 tonne',\n\n 'overall thermal energy annual savings in currency',\n 'overall thermal energy annual savings in co2 tonne',\n\n 'overall electrical aux annual savings in MWh',\n 'overall electrical aux annual savings in currency',\n 'overall electrical aux annual savings in co2 tonne',\n\n 'total potential annual savings in currency',\n\n 'project data and configuration',\n] as const;\n\nexport const EXPORT_BUILDING_TYPE_MAP: Readonly> = {\n [BuildingType.OFFICE]: 'Office',\n [BuildingType.DATA_CENTER]: 'Data center',\n [BuildingType.EDUCATION_ELEMENTARY]: 'Education, elementary',\n [BuildingType.EDUCATION_HIGHER]: 'Education, higher',\n [BuildingType.EDUCATION_OTHER]: 'Education, other',\n [BuildingType.ENTERTAINMENT_LEISURE]: 'Entertainment and Leisure',\n [BuildingType.GOVERNMENT]: 'Government',\n [BuildingType.HEALTH]: 'Health',\n [BuildingType.HOSPITAL]: 'Hospital',\n [BuildingType.HOTEL]: 'Hotel',\n [BuildingType.LIFE_SCIENCE]: 'Life science',\n [BuildingType.RESTAURANT]: 'Restaurant',\n [BuildingType.RETAIL]: 'Retail',\n [BuildingType.WHOLESALE_RETAIL_TRADE]: 'Wholesale/retail trade',\n};\n\nexport const EXPORT_AREA_UNIT_MAP: Readonly> = {\n [AreaUnit.SQM]: 'm2',\n [AreaUnit.SQFT]: 'ft2',\n};\n\nexport const EXPORT_COUNTRY_CODE_MAP: Readonly> =\n Object.fromEntries(COUNTRY_CODES.map((code) => [code, code]));\n\nexport const EXPORT_CURRENCY_CODE_MAP: Readonly> =\n Object.fromEntries(CURRENCY_CODE_OPTIONS.map((code) => [code, code]));\n\nexport const EXPORT_ENERGY_SOURCE_HEATING: Readonly> = {\n [EnergySource.ELECTRICITY]: 'Electricity',\n [EnergySource.GAS]: 'Gas',\n\n [EnergySource.HEATING_OIL]: 'Heating Oil',\n [EnergySource.HEATING_DISTRICT]: 'District',\n [EnergySource.HEATING_OTHER]: 'Other',\n\n [EnergySource.COOLING_DISTRICT]: '',\n [EnergySource.COOLING_OTHER]: '',\n};\n\nexport const EXPORT_ENERGY_SOURCE_COOLING: Readonly> = {\n [EnergySource.ELECTRICITY]: 'Electricity',\n [EnergySource.GAS]: 'Gas',\n\n [EnergySource.HEATING_OIL]: '',\n [EnergySource.HEATING_DISTRICT]: '',\n [EnergySource.HEATING_OTHER]: '',\n\n [EnergySource.COOLING_DISTRICT]: 'District',\n [EnergySource.COOLING_OTHER]: 'Other',\n};\n","/* eslint-disable quote-props */\nimport {\n AreaUnit,\n BuildingType,\n COUNTRY_CODES,\n CountryCode,\n CurrencyCode,\n EnergySource,\n} from '@belimo-retrofit-portal/logic';\nimport { CURRENCY_CODE_OPTIONS } from 'src/modules/common/constants/options';\n\nexport const IMPORT_HEADER_COLUMNS = [\n 'project id',\n 'project title',\n 'project goal',\n\n 'building type',\n 'building size unit',\n 'building size',\n 'building street address',\n 'building city',\n 'building country',\n 'building zip code',\n\n 'participants author',\n 'participants property manager',\n 'participants consulting engineer',\n 'participants product engineer',\n\n 'currency',\n 'electricity price',\n 'gas price',\n 'heating oil price',\n 'district heating price',\n 'district cooling price',\n 'heating other price',\n 'cooling other price',\n\n 'heating energy source',\n 'heating energy annual consumption',\n 'heating energy carbon intensity',\n 'heating electrical aux annual consumption',\n\n 'cooling energy source',\n 'cooling energy annual consumption',\n 'cooling energy carbon intensity',\n 'cooling electrical aux annual consumption',\n\n 'ventilation electrical aux annual consumption',\n\n 'project data and configuration',\n] as const;\n\nexport const IMPORT_BUILDING_TYPE_MAP: Readonly> = {\n 'Office': BuildingType.OFFICE,\n 'Data center': BuildingType.DATA_CENTER,\n 'Education, elementary': BuildingType.EDUCATION_ELEMENTARY,\n 'Education, higher': BuildingType.EDUCATION_HIGHER,\n 'Education, other': BuildingType.EDUCATION_OTHER,\n 'Entertainment and Leisure': BuildingType.ENTERTAINMENT_LEISURE,\n 'Government': BuildingType.GOVERNMENT,\n 'Health': BuildingType.HEALTH,\n 'Hospital': BuildingType.HOSPITAL,\n 'Hotel': BuildingType.HOTEL,\n 'Life science': BuildingType.LIFE_SCIENCE,\n 'Restaurant': BuildingType.RESTAURANT,\n 'Retail': BuildingType.RETAIL,\n 'Wholesale/retail trade': BuildingType.WHOLESALE_RETAIL_TRADE,\n};\n\nexport const IMPORT_AREA_UNIT_MAP: Readonly> = {\n 'm2': AreaUnit.SQM,\n 'ft2': AreaUnit.SQFT,\n};\n\nexport const IMPORT_COUNTRY_CODE_MAP: Readonly> =\n Object.fromEntries(COUNTRY_CODES.map((code) => [code, code]));\n\nexport const IMPORT_CURRENCY_CODE_MAP: Readonly> =\n Object.fromEntries(CURRENCY_CODE_OPTIONS.map((code) => [code, code]));\n\nexport const IMPORT_ENERGY_SOURCE_HEATING: Readonly> = {\n 'Electricity': EnergySource.ELECTRICITY,\n 'District': EnergySource.HEATING_DISTRICT,\n 'Heating Oil': EnergySource.HEATING_OIL,\n 'Gas': EnergySource.GAS,\n 'Other': EnergySource.HEATING_OTHER,\n};\n\nexport const IMPORT_ENERGY_SOURCE_COOLING: Readonly> = {\n 'Electricity': EnergySource.ELECTRICITY,\n 'District': EnergySource.COOLING_DISTRICT,\n 'Gas': EnergySource.GAS,\n 'Other': EnergySource.COOLING_OTHER,\n};\n","import { ReadonlyRecord } from 'fp-ts/ReadonlyRecord';\nimport { ProjectListViewMode } from 'src/modules/project-list/types/ProjectListViewMode';\n\nexport const PROJECT_LIST_PAGE_SIZE: ReadonlyRecord = {\n [ProjectListViewMode.LIST]: 10,\n [ProjectListViewMode.GRID]: 6,\n};\n","import { ReadonlyRecord } from 'fp-ts/ReadonlyRecord';\nimport { ProjectListSort } from 'src/modules/project-list/types/ProjectListSort';\nimport { ProjectListViewMode } from 'src/modules/project-list/types/ProjectListViewMode';\n\nexport const PROJECT_LIST_DEFAULT_SORT: ReadonlyRecord = {\n [ProjectListViewMode.LIST]: {\n field: 'updated',\n direction: 'desc',\n },\n [ProjectListViewMode.GRID]: {\n field: 'updated',\n direction: 'desc',\n },\n};\n","import './ProjectListPage.scss';\nimport clsx from 'clsx';\nimport React, { useCallback, useState } from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { useAction } from 'src/hooks/useAction';\nimport { useBoundAction } from 'src/hooks/useBoundAction';\nimport { AppLayout } from 'src/modules/common/layouts/AppLayout';\nimport { Project } from 'src/modules/common/types/Project';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport {\n PROJECT_LIST_DOWNLOAD,\n PROJECT_LIST_FILTER,\n PROJECT_LIST_EXPORT,\n PROJECT_LIST_IMPORT_CANCEL,\n PROJECT_LIST_IMPORT_COMPLETE,\n PROJECT_LIST_IMPORT_OPEN,\n PROJECT_LIST_IMPORT_SUBMIT,\n PROJECT_LIST_IMPORT_UPLOAD,\n PROJECT_LIST_REMOVE_CANCEL,\n PROJECT_LIST_REMOVE_CONFIRM,\n PROJECT_LIST_REMOVE_SUBMIT,\n PROJECT_LIST_UNFOLLOW_CONFIRM,\n PROJECT_LIST_UNFOLLOW_SUBMIT,\n PROJECT_LIST_UNFOLLOW_CANCEL,\n PROJECT_LIST_SHARE,\n} from 'src/modules/project-list/actions/ProjectListActions';\nimport { getProjectListDownloading } from 'src/modules/project-list/selectors/getProjectListDownloading';\nimport { getProjectListExport } from 'src/modules/project-list/selectors/getProjectListExport';\nimport { getProjectListImport } from 'src/modules/project-list/selectors/getProjectListImport';\nimport { getProjectListProjects } from 'src/modules/project-list/selectors/getProjectListProjects';\nimport { getProjectListQuery } from 'src/modules/project-list/selectors/getProjectListQuery';\nimport { getProjectListRemoving } from 'src/modules/project-list/selectors/getProjectListRemoving';\nimport { getProjectListSlice } from 'src/modules/project-list/selectors/getProjectListSlice';\nimport { getProjectListUnfollowing } from 'src/modules/project-list/selectors/getProjectListUnfollowing';\nimport { ProjectListEmpty } from 'src/modules/project-list/views/ProjectListEmpty';\nimport { ProjectListImportModal } from 'src/modules/project-list/views/ProjectListImportModal';\nimport { ProjectListRemoveModal } from 'src/modules/project-list/views/ProjectListRemoveModal';\nimport { ProjectListToolbar } from 'src/modules/project-list/views/ProjectListToolbar';\nimport { ProjectListView } from 'src/modules/project-list/views/ProjectListView';\nimport { UnfollowProjectModal } from 'src/modules/project-list/views/UnfollowProjectModal';\nimport { ProjectCreateModal } from 'src/modules/project-new/views/ProjectCreateModal';\nimport { ShareProject } from 'src/modules/sharing-projects/containers/ShareProject';\n\nexport const ProjectListPage = (): React.ReactElement => {\n const intl = useIntl();\n const data = useSelector(getProjectListProjects);\n const slice = useSelector(getProjectListSlice);\n const query = useSelector(getProjectListQuery);\n const applyFilter = useAction(PROJECT_LIST_FILTER.trigger);\n const user = useSelector(getLoggedInUser);\n\n const [openCreationDialog, setOpenCreationDialog] = useState(false);\n\n const downloading = useSelector(getProjectListDownloading);\n const downloadReport = useAction(PROJECT_LIST_DOWNLOAD.request);\n const handleDownload = useCallback((project: Project) => downloadReport(undefined, project), [downloadReport]);\n\n const removeProjectState = useSelector(getProjectListRemoving);\n const removeProjectOpen = useAction(PROJECT_LIST_REMOVE_CONFIRM.trigger);\n const removeProjectSubmit = useBoundAction(PROJECT_LIST_REMOVE_SUBMIT.request, undefined);\n const removeProjectCancel = useBoundAction(PROJECT_LIST_REMOVE_CANCEL.trigger, undefined);\n\n const unfollowProjectState = useSelector(getProjectListUnfollowing);\n\n const unfollowProjectOpen = useAction(PROJECT_LIST_UNFOLLOW_CONFIRM.trigger);\n const unfollowProjectSubmit = useAction(PROJECT_LIST_UNFOLLOW_SUBMIT.request);\n const unfollowProjectCancel = useAction(PROJECT_LIST_UNFOLLOW_CANCEL.trigger);\n\n const importState = useSelector(getProjectListImport);\n const importProjectOpen = useBoundAction(PROJECT_LIST_IMPORT_OPEN.trigger, undefined);\n const importProjectUpload = useAction(PROJECT_LIST_IMPORT_UPLOAD.request);\n const importProjectCancel = useBoundAction(PROJECT_LIST_IMPORT_CANCEL.trigger, undefined);\n const importProjectSubmit = useAction(PROJECT_LIST_IMPORT_SUBMIT.request);\n const importProjectComplete = useBoundAction(PROJECT_LIST_IMPORT_COMPLETE.trigger, undefined);\n\n const exporting = useSelector(getProjectListExport);\n const exportProjectData = useBoundAction(PROJECT_LIST_EXPORT.request, undefined);\n\n const shareProject = useAction(PROJECT_LIST_SHARE.trigger);\n\n return (\n <>\n \n {\n openCreationDialog\n ? intl.formatMessage({ id: 'projectList/pageTitle/newProject' })\n : intl.formatMessage({ id: 'projectList/pageTitle' })\n }\n \n \n\n \n {data.length !== 0 ? (\n <>\n setOpenCreationDialog(true)}\n onFilter={applyFilter}\n />\n\n unfollowProjectOpen(project, user)}\n onShare={shareProject}\n />\n \n ) : (\n setOpenCreationDialog(true)}/>\n )}\n \n\n \n\n setOpenCreationDialog(false)}\n />\n\n \n\n \n\n \n \n );\n};\n","import { Action } from 'redux';\nimport {\n PROJECT_LIST_ABORT,\n PROJECT_LIST_FETCH,\n PROJECT_LIST_RESET,\n} from 'src/modules/project-list/actions/ProjectListActions';\nimport { ProjectListState } from 'src/modules/project-list/types/ProjectListState';\n\nexport function projectListDataReducer(state: ProjectListState, action: Action): ProjectListState {\n if (PROJECT_LIST_FETCH.is(action)) {\n return {\n ...state,\n data: action.data,\n import: null,\n export: null,\n removing: null,\n downloading: null,\n unfollowing: null,\n };\n }\n if (PROJECT_LIST_RESET.is(action)) {\n return {\n ...state,\n data: null,\n import: null,\n export: null,\n removing: null,\n downloading: null,\n unfollowing: null,\n };\n }\n if (PROJECT_LIST_ABORT.is(action)) {\n return {\n ...state,\n import: null,\n export: null,\n removing: null,\n downloading: null,\n unfollowing: null,\n };\n }\n\n return state;\n}\n","import { Action } from 'redux';\nimport { FUTURE } from 'src/modules/common/types/Future';\nimport { PROJECT_LIST_DOWNLOAD } from 'src/modules/project-list/actions/ProjectListActions';\nimport { ProjectListState } from 'src/modules/project-list/types/ProjectListState';\n\nexport function projectListDownloadReducer(state: ProjectListState, action: Action): ProjectListState {\n if (PROJECT_LIST_DOWNLOAD.isPending(action)) {\n return {\n ...state,\n downloading: {\n project: action.meta,\n status: FUTURE.pending(),\n },\n };\n }\n if (PROJECT_LIST_DOWNLOAD.isSuccess(action)) {\n return {\n ...state,\n downloading: {\n project: action.meta,\n status: FUTURE.success(undefined),\n },\n };\n }\n if (PROJECT_LIST_DOWNLOAD.isFailure(action)) {\n return {\n ...state,\n downloading: {\n project: action.meta,\n status: FUTURE.failure(action.data),\n },\n };\n }\n\n return state;\n}\n","import { Action } from 'redux';\nimport { FUTURE } from 'src/modules/common/types/Future';\nimport { PROJECT_LIST_EXPORT } from 'src/modules/project-list/actions/ProjectListActions';\nimport { ProjectListState } from 'src/modules/project-list/types/ProjectListState';\n\nexport function projectListExportReducer(state: ProjectListState, action: Action): ProjectListState {\n if (PROJECT_LIST_EXPORT.isPending(action)) {\n return {\n ...state,\n export: FUTURE.pending(),\n };\n }\n if (PROJECT_LIST_EXPORT.isSuccess(action)) {\n return {\n ...state,\n export: FUTURE.success(action.data),\n };\n }\n if (PROJECT_LIST_EXPORT.isFailure(action)) {\n return {\n ...state,\n export: FUTURE.failure(action.data),\n };\n }\n\n return state;\n}\n","import { pipe } from 'fp-ts/function';\nimport * as O from 'monocle-ts/Optional';\nimport { Action } from 'redux';\nimport { FUTURE, Future } from 'src/modules/common/types/Future';\nimport {\n PROJECT_LIST_IMPORT_CANCEL,\n PROJECT_LIST_IMPORT_COMPLETE,\n PROJECT_LIST_IMPORT_OPEN,\n PROJECT_LIST_IMPORT_SUBMIT,\n PROJECT_LIST_IMPORT_UPLOAD,\n} from 'src/modules/project-list/actions/ProjectListActions';\nimport { ProjectListImportData } from 'src/modules/project-list/types/ProjectListImport';\nimport { ProjectListState } from 'src/modules/project-list/types/ProjectListState';\n\nexport function projectListImportReducer(state: ProjectListState, action: Action): ProjectListState {\n if (PROJECT_LIST_IMPORT_OPEN.is(action)) {\n return {\n ...state,\n import: {\n upload: null,\n submit: null,\n },\n };\n }\n if (PROJECT_LIST_IMPORT_CANCEL.is(action)) {\n return {\n ...state,\n import: null,\n };\n }\n\n if (PROJECT_LIST_IMPORT_UPLOAD.isPending(action)) {\n return modifyUploadStatus(state, FUTURE.pending());\n }\n if (PROJECT_LIST_IMPORT_UPLOAD.isSuccess(action)) {\n return modifyUploadStatus(state, FUTURE.success(action.data));\n }\n if (PROJECT_LIST_IMPORT_UPLOAD.isFailure(action)) {\n return modifyUploadStatus(state, FUTURE.failure(action.data));\n }\n\n if (PROJECT_LIST_IMPORT_SUBMIT.isPending(action)) {\n return modifySubmitStatus(state, FUTURE.pending());\n }\n if (PROJECT_LIST_IMPORT_SUBMIT.isSuccess(action)) {\n return modifySubmitStatus(state, FUTURE.success(undefined));\n }\n if (PROJECT_LIST_IMPORT_SUBMIT.isFailure(action)) {\n return modifySubmitStatus(state, FUTURE.failure(action.data));\n }\n\n if (PROJECT_LIST_IMPORT_COMPLETE.is(action)) {\n return {\n ...state,\n import: null,\n };\n }\n\n return state;\n}\n\nfunction modifyUploadStatus(state: ProjectListState, status: Future): ProjectListState {\n return pipe(\n O.id(),\n O.prop('import'),\n O.fromNullable,\n O.prop('upload'),\n O.modify(() => status),\n )(state);\n}\n\nfunction modifySubmitStatus(state: ProjectListState, status: Future): ProjectListState {\n return pipe(\n O.id(),\n O.prop('import'),\n O.fromNullable,\n O.prop('submit'),\n O.modify(() => status),\n )(state);\n}\n","import { projectListDataReducer } from 'src/modules/project-list/reducers/projectListDataReducer';\nimport { projectListDownloadReducer } from 'src/modules/project-list/reducers/projectListDownloadReducer';\nimport { projectListExportReducer } from 'src/modules/project-list/reducers/projectListExportReducer';\nimport { projectListImportReducer } from 'src/modules/project-list/reducers/projectListImportReducer';\nimport { projectListRemovingReducer } from 'src/modules/project-list/reducers/projectListRemovingReducer';\nimport { projectListUnfollowingReducer } from 'src/modules/project-list/reducers/projectListUnfollowingReducer';\nimport { ProjectListState } from 'src/modules/project-list/types/ProjectListState';\nimport { chainReducers } from 'src/utils/chainReducers';\n\nconst defaultState: ProjectListState = {\n data: null,\n import: null,\n export: null,\n removing: null,\n downloading: null,\n unfollowing: null,\n};\n\nexport const projectListReducer = chainReducers(defaultState, [\n projectListDataReducer,\n projectListImportReducer,\n projectListExportReducer,\n projectListRemovingReducer,\n projectListDownloadReducer,\n projectListUnfollowingReducer,\n]);\n","import { pipe } from 'fp-ts/function';\nimport * as O from 'monocle-ts/Optional';\nimport { Action } from 'redux';\nimport { FUTURE, Future } from 'src/modules/common/types/Future';\nimport {\n PROJECT_LIST_REMOVE_CANCEL,\n PROJECT_LIST_REMOVE_CONFIRM,\n PROJECT_LIST_REMOVE_SUBMIT,\n} from 'src/modules/project-list/actions/ProjectListActions';\nimport { ProjectListState } from 'src/modules/project-list/types/ProjectListState';\n\nexport function projectListRemovingReducer(state: ProjectListState, action: Action): ProjectListState {\n if (PROJECT_LIST_REMOVE_CONFIRM.is(action)) {\n return {\n ...state,\n removing: {\n project: action.data,\n status: null,\n },\n };\n }\n if (PROJECT_LIST_REMOVE_CANCEL.is(action)) {\n return {\n ...state,\n removing: null,\n };\n }\n if (PROJECT_LIST_REMOVE_SUBMIT.isPending(action)) {\n return modifyStatus(state, FUTURE.pending());\n }\n if (PROJECT_LIST_REMOVE_SUBMIT.isSuccess(action)) {\n return modifyStatus(state, FUTURE.success(undefined));\n }\n if (PROJECT_LIST_REMOVE_SUBMIT.isFailure(action)) {\n return {\n ...state,\n removing: null,\n };\n }\n\n return state;\n}\n\nfunction modifyStatus(state: ProjectListState, status: Future): ProjectListState {\n return pipe(\n O.id(),\n O.prop('removing'),\n O.fromNullable,\n O.prop('status'),\n O.modify(() => status),\n )(state);\n}\n","import { pipe } from 'fp-ts/function';\nimport * as O from 'monocle-ts/Optional';\nimport { Action } from 'redux-saga';\nimport { FUTURE, Future } from 'src/modules/common/types/Future';\nimport {\n PROJECT_LIST_UNFOLLOW_CANCEL,\n PROJECT_LIST_UNFOLLOW_CONFIRM,\n PROJECT_LIST_UNFOLLOW_SUBMIT,\n} from 'src/modules/project-list/actions/ProjectListActions';\nimport { ProjectListState } from 'src/modules/project-list/types/ProjectListState';\n\nexport function projectListUnfollowingReducer(state: ProjectListState, action: Action): ProjectListState {\n if (PROJECT_LIST_UNFOLLOW_CONFIRM.is(action)) {\n return {\n ...state,\n unfollowing: {\n project: action.data,\n user: action.meta,\n status: null,\n },\n };\n }\n\n if (PROJECT_LIST_UNFOLLOW_CANCEL.is(action)) {\n return {\n ...state,\n unfollowing: null,\n };\n }\n\n if (PROJECT_LIST_UNFOLLOW_SUBMIT.isPending(action)) {\n return modifyStatus(state, FUTURE.pending());\n }\n\n if (PROJECT_LIST_UNFOLLOW_SUBMIT.isSuccess(action)) {\n return {\n ...state,\n unfollowing: null,\n };\n }\n\n if (PROJECT_LIST_UNFOLLOW_SUBMIT.isFailure(action)) {\n return modifyStatus(state, FUTURE.success(undefined));\n }\n\n return state;\n}\n\nfunction modifyStatus(state: ProjectListState, status: Future): ProjectListState {\n return pipe(\n O.id(),\n O.prop('unfollowing'),\n O.fromNullable,\n O.prop('status'),\n O.modify(() => status),\n )(state);\n}\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport { saveAs } from 'file-saver';\nimport { SagaIterator } from 'redux-saga';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { PROJECT_LIST_DOWNLOAD } from 'src/modules/project-list/actions/ProjectListActions';\nimport { buildReportDocument } from 'src/modules/report/sagas/utils/buildReportDocument';\nimport { getReportFormData } from 'src/modules/report/selectors/getReportFormData';\nimport { getReportGenerated } from 'src/modules/report/selectors/getReportGenerated';\nimport { getReportDocumentFilename } from 'src/modules/report/utils/getReportDocumentFilename';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, put, select } from 'typed-redux-saga';\n\nexport function* projectListDownloadSaga(\n action: GetRequestActionType,\n): SagaIterator {\n const project = action.meta;\n\n try {\n yield* put(PROJECT_LIST_DOWNLOAD.pending(project));\n yield* call(logDebug, 'Downloading project report...');\n\n const document = yield* select(getReportGenerated, project);\n const formData = yield* select(getReportFormData, project);\n const fileData = yield* call(buildReportDocument, document, formData, project);\n const fileName = yield* call(getReportDocumentFilename, document);\n\n yield* call(\n saveAs,\n fileData,\n `${fileName}.pdf`,\n );\n\n yield* call(logDebug, 'Downloading project report... done', project);\n yield* put(PROJECT_LIST_DOWNLOAD.success(undefined, project));\n } catch (error) {\n yield* call(sentryCatch, error);\n yield* call(showNotification, { variant: 'error', type: 'error' });\n\n yield* call(logError, 'Downloading project report... error', error);\n yield* put(PROJECT_LIST_DOWNLOAD.failure(NativeError.wrap(error), project));\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { saveAs } from 'file-saver';\nimport { SagaIterator } from 'redux-saga';\nimport { XlsxValue } from 'src/modules/common/types/XlsxValue';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { PROJECT_LIST_EXPORT } from 'src/modules/project-list/actions/ProjectListActions';\nimport { EXPORT_CONTENT_LINE } from 'src/modules/project-list/codecs/export';\nimport { EXPORT_HEADER_COLUMNS } from 'src/modules/project-list/constants/export';\nimport { loadProjectListFull } from 'src/modules/project-list/sagas/utils/loadProjectListFull';\nimport { getProjectListExportEntry } from 'src/modules/project-list/selectors/getProjectListExportEntry';\nimport { getExportDocumentFilename } from 'src/modules/project-list/utils/getExportDocumentFilename';\nimport { doOnExportWorker } from 'src/sagas/utils/doOnExportWorker';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { call, put, select } from 'typed-redux-saga';\n\nexport function* projectListExportSaga(): SagaIterator {\n try {\n yield* put(PROJECT_LIST_EXPORT.pending());\n yield* call(logDebug, 'Exporting projects...');\n\n const projects = yield* call(loadProjectListFull);\n const exportData: XlsxValue[][] = [EXPORT_HEADER_COLUMNS.slice()];\n\n for (const project of projects) {\n const exportItem = yield* select(getProjectListExportEntry, project);\n const exportLine = yield* call(EXPORT_CONTENT_LINE.encode, exportItem);\n exportData.push(exportLine);\n }\n\n const fileData = yield* call(doOnExportWorker, exportData);\n const fileName = yield* call(getExportDocumentFilename, new Date());\n yield* call(saveAs, fileData, `${fileName}.xlsx`);\n\n yield* call(logDebug, 'Exporting projects... done', exportData);\n yield* put(PROJECT_LIST_EXPORT.success());\n } catch (error) {\n const wrapped = new RuntimeError('Could not export projects', {}, NativeError.wrap(error));\n yield* call(sentryCatch, wrapped);\n yield* call(showNotification, { variant: 'error', type: 'error' });\n\n yield* call(logError, 'Exporting projects... error', error);\n yield* put(PROJECT_LIST_EXPORT.failure(NativeError.wrap(error)));\n }\n}\n","import { replace } from 'connected-react-router';\nimport { Eq, eqStrict, struct } from 'fp-ts/Eq';\nimport { SagaIterator } from 'redux-saga';\nimport { INTEGER_ONE } from 'src/modules/common/constants/integer';\nimport { PROJECT_LIST_FILTER } from 'src/modules/project-list/actions/ProjectListActions';\nimport { getProjectListQuery } from 'src/modules/project-list/selectors/getProjectListQuery';\nimport { ProjectListFilter } from 'src/modules/project-list/types/ProjectListFilter';\nimport { buildProjectListQuery } from 'src/modules/project-list/utils/query';\nimport { navigate } from 'src/modules/routing/utils/navigate';\nimport { logDebug } from 'src/sagas/utils/logging';\nimport { GetTriggerActionType } from 'src/utils/createTrigger';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* projectListFilterSaga(\n action: GetTriggerActionType,\n): SagaIterator {\n const filter = action.data;\n const query = yield* select(getProjectListQuery);\n if (EQ_FILTER.equals(query.filter, filter)) {\n return;\n }\n\n yield* call(logDebug, 'Applying project filter...', { filter });\n const search = yield* call(buildProjectListQuery, { ...query, filter: filter, page: INTEGER_ONE });\n yield* call(navigate, replace({ pathname: '/projects', search: search.toString() }));\n}\n\nconst EQ_SET: Eq> = {\n equals: (a, b) => (\n a.size === b.size &&\n new Set([...a, ...b]).size === a.size\n ),\n};\nconst EQ_FILTER: Eq = struct({\n term: eqStrict,\n buildingType: EQ_SET,\n\n country: EQ_SET,\n city: EQ_SET,\n\n ratingActual: EQ_SET,\n ratingFuture: EQ_SET,\n\n ownership: EQ_SET,\n});\n","import { replace } from 'connected-react-router';\nimport { SagaIterator } from 'redux-saga';\nimport { getProjectListQuery } from 'src/modules/project-list/selectors/getProjectListQuery';\nimport { buildProjectListQuery } from 'src/modules/project-list/utils/query';\nimport { navigate } from 'src/modules/routing/utils/navigate';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* projectListImportCompleteSaga(): SagaIterator {\n const query = yield* select(getProjectListQuery);\n const search = yield* call(buildProjectListQuery, query);\n\n yield* call(navigate, replace({ pathname: '/projects', search: search.toString() }));\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { PROJECT_LIST_IMPORT_SUBMIT } from 'src/modules/project-list/actions/ProjectListActions';\nimport { importProjects } from 'src/modules/project-list/sagas/utils/importProjects';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* projectListImportSubmitSaga(\n action: GetRequestActionType,\n): SagaIterator {\n const entries = action.data;\n\n try {\n yield* put(PROJECT_LIST_IMPORT_SUBMIT.pending());\n yield* call(logDebug, 'Importing projects...');\n\n const projects = yield* call(importProjects, entries);\n\n yield* call(logDebug, 'Importing projects... done', projects);\n yield* put(PROJECT_LIST_IMPORT_SUBMIT.success());\n\n yield* call(scheduleUpdateLatestActivity);\n yield* call(scheduleUpdateFeedbackCounter);\n } catch (error) {\n const wrapped = new RuntimeError('Could not import projects', { entries }, NativeError.wrap(error));\n yield* call(sentryCatch, wrapped);\n\n yield* call(logError, 'Importing projects... error', error);\n yield* put(PROJECT_LIST_IMPORT_SUBMIT.failure(NativeError.wrap(error)));\n }\n}\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { PROJECT_LIST_IMPORT_UPLOAD } from 'src/modules/project-list/actions/ProjectListActions';\nimport { IMPORT_CONTENT } from 'src/modules/project-list/codecs/import';\nimport { mapImportProjectData } from 'src/modules/project-list/utils/mapImportLine';\nimport { doOnImportWorker } from 'src/sagas/utils/doOnImportWorker';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, delay, put } from 'typed-redux-saga';\n\nexport function* projectListImportUploadSaga(\n action: GetRequestActionType,\n): SagaIterator {\n try {\n yield* put(PROJECT_LIST_IMPORT_UPLOAD.pending());\n yield* call(logDebug, 'Reading import file...');\n\n yield* delay(1_000);\n const lines = yield* call(doOnImportWorker, action.data);\n const decoder = yield* call(IMPORT_CONTENT, mapImportProjectData);\n const content = yield* call(decodeOrThrow, decoder, lines);\n\n yield* call(logDebug, 'Reading import file... done', content);\n yield* put(PROJECT_LIST_IMPORT_UPLOAD.success(content));\n } catch (error) {\n yield* call(logError, 'Reading import file... error', error);\n yield* put(PROJECT_LIST_IMPORT_UPLOAD.failure(NativeError.wrap(error)));\n }\n}\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport { replace } from 'connected-react-router';\nimport { SagaIterator } from 'redux-saga';\nimport { INTEGER_ONE } from 'src/modules/common/constants/integer';\nimport { removeProject } from 'src/modules/common/sagas/utils/removeProject';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { PROJECT_LIST_FETCH, PROJECT_LIST_REMOVE_SUBMIT } from 'src/modules/project-list/actions/ProjectListActions';\nimport { loadProjectList } from 'src/modules/project-list/sagas/utils/loadProjectList';\nimport { getProjectListQuery } from 'src/modules/project-list/selectors/getProjectListQuery';\nimport { getProjectListRemoving } from 'src/modules/project-list/selectors/getProjectListRemoving';\nimport { ProjectListData } from 'src/modules/project-list/types/ProjectListData';\nimport { buildProjectListQuery } from 'src/modules/project-list/utils/query';\nimport { applyProjectListQuery } from 'src/modules/project-list/utils/slice';\nimport { navigate } from 'src/modules/routing/utils/navigate';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { assertNotNull } from 'src/utils/assert';\nimport { call, put, select } from 'typed-redux-saga';\n\nexport function* projectListRemoveSaga(): SagaIterator {\n try {\n yield* put(PROJECT_LIST_REMOVE_SUBMIT.pending());\n yield* call(logDebug, 'Removing project...');\n\n const { project } = assertNotNull(\n yield* select(getProjectListRemoving),\n 'Could not find project to remove',\n );\n\n yield* call(removeProject, project);\n\n const query = yield* select(getProjectListQuery);\n const projects = yield* call(loadProjectList, query);\n const data: ProjectListData = { projects, query };\n\n const authUser = yield* select(getLoggedInUser);\n const { found } = yield* call(applyProjectListQuery, data, authUser);\n\n if (found.length === 0) {\n const search = yield* call(buildProjectListQuery, { ...query, page: INTEGER_ONE });\n yield* call(navigate, replace({ pathname: '/projects', search: search.toString() }));\n } else {\n yield* put(PROJECT_LIST_FETCH.trigger(data));\n }\n\n yield* call(\n showNotification,\n {\n variant: 'success',\n type: 'done',\n messageId: 'projectList/notification/remove/success',\n messageValue: {\n projectName: project.data.title,\n },\n },\n );\n\n yield* call(logDebug, 'Removing project... done', project);\n yield* put(PROJECT_LIST_REMOVE_SUBMIT.success());\n\n yield* call(scheduleUpdateLatestActivity);\n yield* call(scheduleUpdateFeedbackCounter);\n } catch (error) {\n yield* call(sentryCatch, error);\n\n yield* call(showNotification, { variant: 'error', type: 'error' });\n\n yield* call(logError, 'Removing project... error', error);\n yield* put(PROJECT_LIST_REMOVE_SUBMIT.failure(NativeError.wrap(error)));\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport {\n PROJECT_LIST_DOWNLOAD,\n PROJECT_LIST_EXPORT,\n PROJECT_LIST_FILTER,\n PROJECT_LIST_IMPORT_CANCEL,\n PROJECT_LIST_IMPORT_COMPLETE,\n PROJECT_LIST_IMPORT_SUBMIT,\n PROJECT_LIST_IMPORT_UPLOAD,\n PROJECT_LIST_REMOVE_SUBMIT,\n PROJECT_LIST_RESET,\n PROJECT_LIST_ABORT,\n PROJECT_LIST_UNFOLLOW_SUBMIT,\n PROJECT_LIST_SHARE,\n} from 'src/modules/project-list/actions/ProjectListActions';\nimport { projectListDownloadSaga } from 'src/modules/project-list/sagas/projectListDownloadSaga';\nimport { projectListExportSaga } from 'src/modules/project-list/sagas/projectListExportSaga';\nimport { projectListFilterSaga } from 'src/modules/project-list/sagas/projectListFilterSaga';\nimport { projectListImportCompleteSaga } from 'src/modules/project-list/sagas/projectListImportCompleteSaga';\nimport { projectListImportSubmitSaga } from 'src/modules/project-list/sagas/projectListImportSubmitSaga';\nimport { projectListImportUploadSaga } from 'src/modules/project-list/sagas/projectListImportUploadSaga';\nimport { projectListRemoveSaga } from 'src/modules/project-list/sagas/projectListRemoveSaga';\nimport { projectListShareSaga } from 'src/modules/project-list/sagas/projectListShareSaga';\nimport { projectListUnfollowSaga } from 'src/modules/project-list/sagas/projectListUnfollowSaga';\nimport { ROUTE_CHANGE } from 'src/modules/routing/actions/RouteChange';\nimport { cancelSagaOn } from 'src/utils/cancelSagaOn';\nimport { takeLatest } from 'typed-redux-saga';\n\nexport function* projectListSaga(): SagaIterator {\n yield* takeLatest(PROJECT_LIST_REMOVE_SUBMIT.isRequest, projectListRemoveSaga);\n\n yield* takeLatest(PROJECT_LIST_FILTER.is, cancelSagaOn(projectListFilterSaga, [\n ROUTE_CHANGE.isRequest,\n ]));\n\n yield* takeLatest(PROJECT_LIST_EXPORT.isRequest, cancelSagaOn(projectListExportSaga, [\n PROJECT_LIST_RESET.is,\n PROJECT_LIST_ABORT.is,\n ]));\n\n yield* takeLatest(PROJECT_LIST_IMPORT_COMPLETE.is, projectListImportCompleteSaga);\n yield* takeLatest(PROJECT_LIST_IMPORT_UPLOAD.isRequest, cancelSagaOn(projectListImportUploadSaga, [\n PROJECT_LIST_RESET.is,\n PROJECT_LIST_ABORT.is,\n PROJECT_LIST_IMPORT_CANCEL.is,\n ]));\n yield* takeLatest(PROJECT_LIST_IMPORT_SUBMIT.isRequest, cancelSagaOn(projectListImportSubmitSaga, [\n PROJECT_LIST_RESET.is,\n PROJECT_LIST_ABORT.is,\n PROJECT_LIST_IMPORT_CANCEL.is,\n ]));\n\n yield* takeLatest(PROJECT_LIST_DOWNLOAD.isRequest, cancelSagaOn(projectListDownloadSaga, [\n PROJECT_LIST_RESET.is,\n PROJECT_LIST_ABORT.is,\n PROJECT_LIST_REMOVE_SUBMIT.isRequest,\n PROJECT_LIST_UNFOLLOW_SUBMIT.isRequest,\n ]));\n\n yield* takeLatest(PROJECT_LIST_UNFOLLOW_SUBMIT.isRequest, projectListUnfollowSaga);\n\n yield* takeLatest(PROJECT_LIST_SHARE.is, cancelSagaOn(projectListShareSaga, [\n PROJECT_LIST_RESET.is,\n PROJECT_LIST_ABORT.is,\n ]));\n}\n","import { replace } from 'connected-react-router';\nimport { SagaIterator } from 'redux-saga';\nimport { INTEGER_ONE } from 'src/modules/common/constants/integer';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { PROJECT_LIST_SHARE } from 'src/modules/project-list/actions/ProjectListActions';\nimport { getProjectListQuery } from 'src/modules/project-list/selectors/getProjectListQuery';\nimport { getProjectListSlice } from 'src/modules/project-list/selectors/getProjectListSlice';\nimport { buildProjectListQuery } from 'src/modules/project-list/utils/query';\nimport { navigate } from 'src/modules/routing/utils/navigate';\nimport {\n SHARE_PROJECT_CLOSE,\n SHARE_PROJECT_OPEN,\n SHARE_PROJECT_REMOVE_SUBMIT,\n} from 'src/modules/sharing-projects/actions/ShareProjectActions';\nimport { GetTriggerActionType } from 'src/utils/createTrigger';\nimport { call, put, select, take } from 'typed-redux-saga';\n\nexport function* projectListShareSaga(\n action: GetTriggerActionType,\n): SagaIterator {\n const project = action.data;\n const loggedInUser = yield* select(getLoggedInUser);\n\n yield* put(SHARE_PROJECT_OPEN.trigger(project));\n const trigger = yield* take([SHARE_PROJECT_REMOVE_SUBMIT.isSuccess, SHARE_PROJECT_CLOSE.is]);\n if (SHARE_PROJECT_CLOSE.is(trigger)) {\n // the Share Project modal was closed\n // there is no need to do anything\n return;\n }\n\n const hasAccess = (\n project.owner?.id === loggedInUser.id ||\n trigger.data.some((it) => it.id === loggedInUser.id)\n );\n if (hasAccess) {\n // we still have access to the project\n // there is no need to do anything\n return;\n }\n\n // the project is not accessible for us anymore\n // we need to close the modal immediately\n yield* put(SHARE_PROJECT_CLOSE.trigger());\n\n // and reload the project list\n const projects = yield* select(getProjectListSlice);\n const isOnlyProject = projects.found.every((it) => it.project.id === project.id);\n if (isOnlyProject) {\n const query = yield* select(getProjectListQuery);\n const search = yield* call(buildProjectListQuery, { ...query, page: INTEGER_ONE });\n yield* call(navigate, replace({ pathname: '/projects', search: search.toString() }));\n } else {\n const query = yield* select(getProjectListQuery);\n const search = yield* call(buildProjectListQuery, query);\n yield* call(navigate, replace({ pathname: '/projects', search: search.toString() }));\n }\n}\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport { replace } from 'connected-react-router';\nimport { SagaIterator } from 'redux-saga';\nimport { INTEGER_ONE } from 'src/modules/common/constants/integer';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { PROJECT_LIST_FETCH, PROJECT_LIST_UNFOLLOW_SUBMIT } from 'src/modules/project-list/actions/ProjectListActions';\nimport { loadProjectList } from 'src/modules/project-list/sagas/utils/loadProjectList';\nimport { unfollowProject } from 'src/modules/project-list/sagas/utils/unfollowProject';\nimport { getProjectListQuery } from 'src/modules/project-list/selectors/getProjectListQuery';\nimport { getProjectListUnfollowing } from 'src/modules/project-list/selectors/getProjectListUnfollowing';\nimport { ProjectListData } from 'src/modules/project-list/types/ProjectListData';\nimport { buildProjectListQuery } from 'src/modules/project-list/utils/query';\nimport { applyProjectListQuery } from 'src/modules/project-list/utils/slice';\nimport { navigate } from 'src/modules/routing/utils/navigate';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { assertNotNull } from 'src/utils/assert';\nimport { call, put, select } from 'typed-redux-saga';\n\nexport function* projectListUnfollowSaga(): SagaIterator {\n try {\n yield* put(PROJECT_LIST_UNFOLLOW_SUBMIT.pending());\n yield* call(logDebug, 'Unfollowing project...');\n\n const { project, user } = assertNotNull(\n yield* select(getProjectListUnfollowing),\n 'Could not find project or/and user to unfollow',\n );\n\n yield* call(unfollowProject, project.id);\n\n const query = yield* select(getProjectListQuery);\n const projects = yield* call(loadProjectList, query);\n const data: ProjectListData = { projects, query };\n\n const authUser = yield* select(getLoggedInUser);\n const { found } = yield* call(applyProjectListQuery, data, authUser);\n\n if (found.length === 0) {\n const search = yield* call(buildProjectListQuery, { ...query, page: INTEGER_ONE });\n yield* call(navigate, replace({ pathname: '/projects', search: search.toString() }));\n } else {\n yield* put(PROJECT_LIST_FETCH.trigger(data));\n }\n\n yield* call(\n showNotification,\n {\n variant: 'success',\n type: 'done',\n messageId: 'projectList/notification/unfollow/success',\n messageValue: {\n projectName: project.data.title,\n },\n },\n );\n\n yield* call(logDebug, 'Unfollowing project... done', project, user);\n yield* put(PROJECT_LIST_UNFOLLOW_SUBMIT.success());\n\n yield* call(scheduleUpdateLatestActivity);\n yield* call(scheduleUpdateFeedbackCounter);\n } catch (error) {\n yield* call(sentryCatch, error);\n\n yield* call(showNotification, { variant: 'error', type: 'error' });\n\n yield* call(logError, 'Unfollowing project... error', error);\n yield* put(PROJECT_LIST_UNFOLLOW_SUBMIT.failure(NativeError.wrap(error)));\n }\n}\n","import { NativeError, RuntimeError, resolveInitialProjectData } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { createProject } from 'src/modules/common/sagas/utils/createProject';\nimport { updateProject } from 'src/modules/common/sagas/utils/updateProject';\nimport { Project } from 'src/modules/common/types/Project';\nimport { loadProjectListFull } from 'src/modules/project-list/sagas/utils/loadProjectListFull';\nimport { ProjectListImportEntry } from 'src/modules/project-list/types/ProjectListImport';\nimport { mergeImportData } from 'src/modules/project-list/utils/mergeImportData';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* importProjects(entries: ReadonlyArray): SagaIterator {\n try {\n const result: Project[] = [];\n const projects = yield* call(loadProjectListFull);\n\n for (const entry of entries) {\n const project = projects.find((it) => it.id === entry.id);\n if (project) {\n const merged = yield* call(mergeImportData, project, entry.project);\n const resolved = yield* call(resolveInitialProjectData, merged);\n\n const updated = yield* call(updateProject, project.id, resolved);\n result.push(updated);\n } else {\n const resolved = yield* call(resolveInitialProjectData, entry.project);\n\n const created = yield* call(createProject, resolved);\n result.push(created);\n }\n }\n\n return result;\n } catch (error) {\n throw new RuntimeError('Could not import projects', { entries }, NativeError.wrap(error));\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { loadProjectListFull } from 'src/modules/project-list/sagas/utils/loadProjectListFull';\nimport { getProjectListItem } from 'src/modules/project-list/selectors/getProjectListItem';\nimport { ProjectListItem } from 'src/modules/project-list/types/ProjectListItem';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* loadProjectList(): SagaIterator {\n try {\n const projects = yield* call(loadProjectListFull);\n const listItems: ProjectListItem[] = [];\n\n for (const project of projects) {\n const listItem = yield* select(getProjectListItem, project);\n listItems.push(listItem);\n }\n\n return listItems;\n } catch (error) {\n throw new RuntimeError('Could not load project list', {}, NativeError.wrap(error));\n }\n}\n","import { INTEGER, NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport * as D from 'io-ts/Decoder';\nimport { SagaIterator } from 'redux-saga';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { PROJECT } from 'src/modules/common/codecs/Project';\nimport { Project } from 'src/modules/common/types/Project';\nimport { call } from 'typed-redux-saga';\n\nexport function* loadProjectListChunk(take: number, skip: number): SagaIterator {\n try {\n const query = new URLSearchParams({\n take: take.toString(),\n skip: skip.toString(),\n\n sort: 'title',\n order: 'asc',\n });\n\n const { content } = yield* call(makeRestRequest, 'GET', `/projects?${query.toString()}`);\n const { found } = yield* call(decodeOrThrow, RESPONSE_DATA, content);\n return found;\n } catch (error) {\n throw new RuntimeError('Could not load project list chunk', { take, skip }, NativeError.wrap(error));\n }\n}\n\nconst RESPONSE_DATA = D.struct({\n total: INTEGER,\n found: D.array(PROJECT),\n});\n","import { SagaIterator } from 'redux-saga';\nimport { Project } from 'src/modules/common/types/Project';\nimport { loadProjectListChunk } from 'src/modules/project-list/sagas/utils/loadProjectListChunk';\nimport { call } from 'typed-redux-saga';\n\nexport function* loadProjectListFull(): SagaIterator {\n let projects: Project[] = [];\n\n while (true) {\n // NOTE: 100 is max `take` on the backend\n const limit = 100;\n const chunk = yield* call(loadProjectListChunk, limit, projects.length);\n projects = projects.concat(chunk);\n\n if (chunk.length < limit) {\n return projects;\n }\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { decodeOrGet } from 'src/io/utils/decodeOrGet';\nimport { PROJECT_LIST_VIEW_MODE } from 'src/modules/project-list/codecs/ProjectListViewMode';\nimport { ProjectListViewMode } from 'src/modules/project-list/types/ProjectListViewMode';\nimport { storageGet } from 'src/sagas/utils/storage';\nimport { call } from 'typed-redux-saga';\n\nexport function* loadProjectListViewMode(): SagaIterator {\n try {\n const raw = yield* call(storageGet, 'project-list-view-mode');\n return yield* call(decodeOrGet, PROJECT_LIST_VIEW_MODE, raw, ProjectListViewMode.LIST);\n } catch (error) {\n throw new RuntimeError('Could not load project list view mode', {}, NativeError.wrap(error));\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { PROJECT_LIST_VIEW_MODE } from 'src/modules/project-list/codecs/ProjectListViewMode';\nimport { ProjectListViewMode } from 'src/modules/project-list/types/ProjectListViewMode';\nimport { storageSet } from 'src/sagas/utils/storage';\nimport { call } from 'typed-redux-saga';\n\nexport function* saveProjectListViewMode(viewMode: ProjectListViewMode): SagaIterator {\n try {\n const raw = yield* call(PROJECT_LIST_VIEW_MODE.encode, viewMode);\n yield* call(storageSet, 'project-list-view-mode', raw);\n } catch (error) {\n throw new RuntimeError('Could not save project list view mode', {}, NativeError.wrap(error));\n }\n}\n","import { NativeError, RuntimeError, Uuid } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { call } from 'typed-redux-saga';\n\nexport function* unfollowProject(projectId: Uuid): SagaIterator {\n try {\n yield* call(makeRestRequest, 'DELETE', `/projects/${encodeURIComponent(projectId)}/leave`);\n } catch (error) {\n throw new RuntimeError('Could not unfollow project', { projectId }, NativeError.wrap(error));\n }\n}\n","import { createSelector } from 'reselect';\nimport { getProjectListState } from 'src/modules/project-list/selectors/getProjectListState';\nimport { assertNotNull } from 'src/utils/assert';\n\nexport const getProjectListData = createSelector([\n getProjectListState,\n], (state) => assertNotNull(\n state.data,\n 'Project list should be fetched first',\n { state },\n));\n","import { createSelector } from 'reselect';\nimport { getProjectListState } from 'src/modules/project-list/selectors/getProjectListState';\n\nexport const getProjectListDownloading = createSelector([\n getProjectListState,\n], (state) => state.downloading);\n","import { createSelector } from 'reselect';\nimport { getProjectListState } from 'src/modules/project-list/selectors/getProjectListState';\n\nexport const getProjectListExport = createSelector([\n getProjectListState,\n], (state) => state.export);\n","import { createSelector } from 'reselect';\nimport { getProjectLazy } from 'src/modules/common/selectors/getProjectLazy';\nimport { getHvacResults } from 'src/modules/hvac/selectors/getHvacResults';\nimport { ProjectListExportEntry } from 'src/modules/project-list/types/ProjectListExport';\n\nexport const getProjectListExportEntry = createSelector([\n getProjectLazy,\n getHvacResults,\n], (project, results): ProjectListExportEntry => ({\n project,\n results,\n}));\n","import {\n BuildingType,\n CountryCode,\n EnergyEfficiencyClass,\n getEnergyEfficiencyLabel,\n COUNTRY_CODES,\n} from '@belimo-retrofit-portal/logic';\nimport { eqStrict } from 'fp-ts/Eq';\nimport { pipe } from 'fp-ts/function';\nimport * as N from 'fp-ts/number';\nimport * as O from 'fp-ts/Ord';\nimport * as A from 'fp-ts/ReadonlyArray';\nimport * as S from 'fp-ts/string';\nimport { createSelector } from 'reselect';\nimport { FACTOR_WEIGHTS_LABELS } from 'src/modules/common/constants/factorWeightedLabel';\nimport { BUILDING_TYPE_OPTIONS } from 'src/modules/common/constants/options';\nimport { ordPrecedence } from 'src/modules/common/utils/ord';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { getProjectListProjects } from 'src/modules/project-list/selectors/getProjectListProjects';\nimport { ProjectListFilterValues } from 'src/modules/project-list/types/ProjectListFilterValues';\nimport { isDefined, isNotNull } from 'src/utils/guard';\n\nexport const getProjectListFilterValues = createSelector([\n getProjectListProjects,\n getLoggedInUser,\n], (projects, authUser): ProjectListFilterValues => ({\n buildingType: pipe(\n projects,\n (data) => data.map((it) => it.project.data.building.type),\n A.uniq(eqStrict),\n A.sort(BUILDING_TYPE_ORD),\n ),\n\n country: pipe(\n projects,\n (data) => data.map((it) => it.project.data.building.address.country),\n A.uniq(eqStrict),\n A.sort(COUNTRY_CODE_ORD),\n ),\n city: pipe(\n projects,\n (data) => data.map((it) => it.project.data.building.address.city),\n (data) => data.filter((it) => it !== ''),\n A.uniq(S.Eq),\n A.sort(S.Ord),\n ),\n\n ratingActual: pipe(\n projects,\n (data) => data.map((it) => it.rating.actual),\n (data) => data.filter(isNotNull),\n (data) => data.map(getEnergyEfficiencyLabel),\n A.uniq(eqStrict),\n A.sort(EFFICIENCY_LABEL_ORD),\n ),\n ratingFuture: pipe(\n projects,\n (data) => data.map((it) => it.rating.future),\n (data) => data.filter(isNotNull),\n (data) => data.map(getEnergyEfficiencyLabel),\n A.uniq(eqStrict),\n A.sort(EFFICIENCY_LABEL_ORD),\n ),\n\n ownership: pipe(\n projects,\n A.map((it) => it.project.owner?.email),\n A.filter(isDefined),\n A.uniq(eqStrict),\n A.sort(pipe(S.Ord, ordPrecedence(authUser.email))),\n ),\n}));\n\nconst BUILDING_TYPE_ORD = pipe(\n N.Ord,\n O.contramap((value: BuildingType) => BUILDING_TYPE_OPTIONS.indexOf(value)),\n);\n\nconst COUNTRY_CODE_ORD = pipe(\n N.Ord,\n O.contramap((value: CountryCode) => COUNTRY_CODES.indexOf(value)),\n);\n\nconst EFFICIENCY_LABEL_ORD = pipe(\n N.Ord,\n O.contramap((value: EnergyEfficiencyClass) => FACTOR_WEIGHTS_LABELS[value].toNumber()),\n O.reverse,\n);\n","import { createSelector } from 'reselect';\nimport { getProjectListState } from 'src/modules/project-list/selectors/getProjectListState';\n\nexport const getProjectListImport = createSelector([\n getProjectListState,\n], (state) => state.import);\n","import { createSelector } from 'reselect';\nimport { getProjectLazy } from 'src/modules/common/selectors/getProjectLazy';\nimport { getHvacResultsOverallRating } from 'src/modules/hvac/selectors/getHvacResultsOverallRating';\nimport { getProjectListItemTextBlocks } from 'src/modules/project-list/selectors/getProjectListItemTextBlocks';\nimport { ProjectListItem } from 'src/modules/project-list/types/ProjectListItem';\n\nexport const getProjectListItem = createSelector([\n getProjectLazy,\n getHvacResultsOverallRating,\n getProjectListItemTextBlocks,\n], (project, rating, textBlocks): ProjectListItem => ({\n project,\n rating,\n textBlocks,\n}));\n","import { SchemaArea } from '@belimo-retrofit-portal/logic';\nimport { createSelector } from 'reselect';\nimport { getProjectLazy } from 'src/modules/common/selectors/getProjectLazy';\nimport { getTranslator } from 'src/modules/config/selectors/getTranslator';\nimport { isNotNull } from 'src/utils/guard';\n\nexport const getProjectListItemTextBlocks = createSelector([\n getProjectLazy,\n getTranslator,\n], (project, translator): ReadonlyArray => [\n project.data.title,\n project.data.goals,\n\n ...project.owner === null ? [] : [\n project.owner.email,\n project.owner.firstName,\n project.owner.lastName,\n ],\n\n project.data.participants.consutlingEngineer,\n project.data.participants.propertyManager,\n project.data.participants.productManager,\n\n translator(`common/buildingType/${project.data.building.type}`),\n translator(`common/country/name/${project.data.building.address.country}`),\n project.data.building.address.city,\n project.data.building.address.zip,\n project.data.building.address.street,\n\n project.data.hvac.comment,\n\n ...SCHEMA_AREAS\n .map((area) => project.data.schema[area])\n .filter(isNotNull)\n .map((schema) => schema.comment),\n\n project.data.evaluation.proposalDescription,\n]);\n\nconst SCHEMA_AREAS = [\n SchemaArea.HEATING,\n SchemaArea.COOLING,\n SchemaArea.VENTILATION,\n];\n","import { createSelector } from 'reselect';\nimport { getProjectListData } from 'src/modules/project-list/selectors/getProjectListData';\n\nexport const getProjectListProjects = createSelector([\n getProjectListData,\n], (data) => data.projects);\n","import { createSelector } from 'reselect';\nimport { getProjectListData } from 'src/modules/project-list/selectors/getProjectListData';\n\nexport const getProjectListQuery = createSelector([\n getProjectListData,\n], (data) => data.query);\n","import { createSelector } from 'reselect';\nimport { getProjectListState } from 'src/modules/project-list/selectors/getProjectListState';\n\nexport const getProjectListRemoving = createSelector([\n getProjectListState,\n], (state) => state.removing);\n","import { createSelector } from 'reselect';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { getProjectListData } from 'src/modules/project-list/selectors/getProjectListData';\nimport { applyProjectListQuery } from 'src/modules/project-list/utils/slice';\n\nexport const getProjectListSlice = createSelector([\n getProjectListData,\n getLoggedInUser,\n], applyProjectListQuery);\n","import { ProjectListState } from 'src/modules/project-list/types/ProjectListState';\nimport { RootState } from 'src/types/RootState';\n\nexport function getProjectListState(state: RootState): ProjectListState {\n return state.projectList;\n}\n","import { createSelector } from 'reselect';\nimport { getProjectListState } from 'src/modules/project-list/selectors/getProjectListState';\n\nexport const getProjectListUnfollowing = createSelector([\n getProjectListState,\n], (state) => state.unfollowing);\n","export enum ProjectListViewMode {\n LIST = 'list',\n GRID = 'grid',\n}\n","import { EnergyEfficiencyClass } from '@belimo-retrofit-portal/logic';\nimport { Decimal } from 'decimal.js-light';\nimport { constFalse, constTrue } from 'fp-ts/function';\nimport { and, or, Predicate } from 'fp-ts/Predicate';\nimport { FACTOR_WEIGHTS_LABELS } from 'src/modules/common/constants/factorWeightedLabel';\nimport { ProjectListFilter } from 'src/modules/project-list/types/ProjectListFilter';\nimport { ProjectListItem } from 'src/modules/project-list/types/ProjectListItem';\n\nexport function getProjectFilter(\n filter: ProjectListFilter,\n): Predicate {\n return buildAndCondition([\n getPredicateTerm(filter),\n getPredicateBuildingType(filter),\n getPredicateCountry(filter),\n getPredicateCity(filter),\n getPredicateRatingActual(filter),\n getPredicateRatingFuture(filter),\n getPredicateOwnership(filter),\n ]);\n}\n\nfunction getPredicateTerm(\n filter: ProjectListFilter,\n): Predicate {\n const predicate = getPredicateStringMatch(filter.term);\n return (item) => predicate(item.textBlocks);\n}\n\nfunction getPredicateBuildingType(\n filter: ProjectListFilter,\n): Predicate {\n const predicate = getPredicateAnyOf(filter.buildingType);\n return (item) => predicate(item.project.data.building.type);\n}\n\nfunction getPredicateCountry(\n filter: ProjectListFilter,\n): Predicate {\n const predicate = getPredicateAnyOf(filter.country);\n return (item) => predicate(item.project.data.building.address.country);\n}\n\nfunction getPredicateCity(\n filter: ProjectListFilter,\n): Predicate {\n const predicate = getPredicateAnyOf(filter.city);\n return (item) => predicate(item.project.data.building.address.city);\n}\n\nfunction getPredicateRatingActual(\n filter: ProjectListFilter,\n): Predicate {\n const predicate = buildOrCondition(Array.from(filter.ratingActual).map(getPredicateEfficiencyClass));\n return (item) => predicate(item.rating.actual);\n}\n\nfunction getPredicateRatingFuture(\n filter: ProjectListFilter,\n): Predicate {\n const predicate = buildOrCondition(Array.from(filter.ratingFuture).map(getPredicateEfficiencyClass));\n return (item) => predicate(item.rating.future);\n}\n\nfunction getPredicateOwnership(\n filter: ProjectListFilter,\n): Predicate {\n const predicate = getPredicateAnyOf(filter.ownership);\n return (item) => predicate(item.project.owner?.email ?? '');\n}\n\nfunction getPredicateEfficiencyClass(\n rating: EnergyEfficiencyClass,\n): Predicate {\n const { minValue, maxValue } = ENERGY_EFFICIENCY_RANGE[rating];\n return (value) => (\n value !== null &&\n value.gte(minValue) &&\n value.lt(maxValue)\n );\n}\n\nfunction getPredicateStringMatch(\n term: string,\n): Predicate> {\n const norm = term.trim().toLowerCase();\n if (norm.length === 0) {\n return constTrue;\n }\n\n return (value) => value.some((chunk) => chunk.toLowerCase().includes(norm));\n}\n\nfunction getPredicateAnyOf(\n options: ReadonlySet,\n): Predicate {\n return (value) => (options.size === 0 || options.has(value));\n}\n\nfunction buildOrCondition(\n predicates: ReadonlyArray>,\n): Predicate {\n if (predicates.length === 0) {\n return constTrue;\n }\n\n const initial: Predicate = constFalse;\n return predicates.reduce((result, predicate) => or(predicate)(result), initial);\n}\n\nfunction buildAndCondition(\n predicates: ReadonlyArray>,\n): Predicate {\n const initial: Predicate = constTrue;\n return predicates.reduce((result, predicate) => and(predicate)(result), initial);\n}\n\nconst ENERGY_EFFICIENCY_RANGE = {\n 'A+': {\n minValue: FACTOR_WEIGHTS_LABELS['A+'],\n maxValue: new Decimal(1_000_000),\n },\n A: {\n minValue: FACTOR_WEIGHTS_LABELS.A,\n maxValue: FACTOR_WEIGHTS_LABELS['A+'],\n },\n B: {\n minValue: FACTOR_WEIGHTS_LABELS.B,\n maxValue: FACTOR_WEIGHTS_LABELS.A,\n },\n C: {\n minValue: FACTOR_WEIGHTS_LABELS.C,\n maxValue: FACTOR_WEIGHTS_LABELS.B,\n },\n D: {\n minValue: FACTOR_WEIGHTS_LABELS.D,\n maxValue: FACTOR_WEIGHTS_LABELS.C,\n },\n};\n","import * as DE from 'io-ts/DecodeError';\nimport * as D from 'io-ts/Decoder';\nimport { ProjectListImportError } from 'src/modules/project-list/types/ProjectListImport';\n\nexport function formatImportError(decodeError: D.DecodeError): ProjectListImportError[] {\n return getColumnErrors(decodeError).map(([column, errors]): ProjectListImportError => {\n const value = getActualValue(errors);\n const reason = value === '' || value == null ? 'required' : 'invalid';\n return { column, reason, value };\n });\n}\n\nfunction getActualValue(decodeError: D.DecodeError): string {\n // eslint-disable-next-line no-underscore-dangle\n if (decodeError._tag === 'Concat') {\n return (\n getActualValue(decodeError.left) ??\n getActualValue(decodeError.right)\n );\n }\n\n return DE.fold({\n Index: (index: number, kind: DE.Kind, errors: D.DecodeError) => getActualValue(errors),\n Key: (key: string, kind: DE.Kind, errors: D.DecodeError) => getActualValue(errors),\n Lazy: (id: string, errors: D.DecodeError) => getActualValue(errors),\n Leaf: (input: unknown, error: string) => String(input),\n Member: (index: number, errors: D.DecodeError) => getActualValue(errors),\n Wrap: (error: string, errors: D.DecodeError) => getActualValue(errors),\n })(decodeError.value);\n}\n\nfunction getColumnErrors(decodeError: D.DecodeError): [string, D.DecodeError][] {\n // eslint-disable-next-line no-underscore-dangle\n if (decodeError._tag === 'Concat') {\n return [\n ...getColumnErrors(decodeError.left),\n ...getColumnErrors(decodeError.right),\n ];\n }\n\n return DE.fold({\n Index: (index: number, kind: DE.Kind, errors: D.DecodeError) => getColumnErrors(errors),\n Key: (key: string, kind: DE.Kind, errors: D.DecodeError) => [[key, errors]],\n Lazy: (id: string, errors: D.DecodeError) => getColumnErrors(errors),\n Leaf: (input: unknown, error: string) => [],\n Member: (index: number, errors: D.DecodeError) => getColumnErrors(errors),\n Wrap: (error: string, errors: D.DecodeError) => getColumnErrors(errors),\n })(decodeError.value);\n}\n","export function getExportDocumentFilename(now: Date): string {\n return [\n 'RetroFIT+ portal projects',\n ' ',\n now.getFullYear(),\n String(now.getMonth() + 1).padStart(2, '0'),\n String(now.getDate()).padStart(2, '0'),\n ' ',\n String(now.getHours()).padStart(2, '0'),\n String(now.getMinutes()).padStart(2, '0'),\n ].join('');\n}\n","/* eslint-disable @typescript-eslint/dot-notation */\nimport { EnergySource, HvacArea } from '@belimo-retrofit-portal/logic';\nimport { DECIMAL_ZERO } from 'src/modules/common/constants/decimal';\nimport { ProjectListImportEntry, ProjectListImportRawLine } from 'src/modules/project-list/types/ProjectListImport';\nimport { PROJECT_VERSION } from 'src/modules/project-new/constants/projectData';\n\nexport function mapImportProjectData(line: ProjectListImportRawLine): ProjectListImportEntry {\n return {\n id: line['project id'],\n project: {\n version: PROJECT_VERSION,\n cover: null,\n title: line['project title'],\n goals: line['project goal'],\n currency: line['currency'],\n building: {\n type: line['building type'],\n size: line['building size'],\n unit: line['building size unit'],\n address: {\n country: line['building country'],\n city: line['building city'],\n street: line['building street address'],\n zip: line['building zip code'],\n },\n },\n participants: {\n author: line['participants author'],\n productManager: line['participants product engineer'],\n propertyManager: line['participants property manager'],\n consutlingEngineer: line['participants consulting engineer'],\n },\n hvac: {\n comment: line['project data and configuration'].hvac.comment,\n prices: {\n [EnergySource.ELECTRICITY]: line['electricity price'],\n [EnergySource.GAS]: line['gas price'],\n\n [EnergySource.HEATING_DISTRICT]: line['district heating price'],\n [EnergySource.HEATING_OIL]: line['heating oil price'],\n [EnergySource.HEATING_OTHER]: line['heating other price'],\n\n [EnergySource.COOLING_DISTRICT]: line['district cooling price'],\n [EnergySource.COOLING_OTHER]: line['cooling other price'],\n },\n areas: {\n [HvacArea.HEATING]: {\n enabled: line['project data and configuration'].hvac.areas[HvacArea.HEATING].enabled,\n sections: line['project data and configuration'].hvac.areas[HvacArea.HEATING].sections,\n thermal: {\n energySource: line['heating energy source'],\n carbonIntensity: line['heating energy carbon intensity'],\n annualEnergyUse: line['heating energy annual consumption'],\n },\n electrical: {\n energySource: EnergySource.ELECTRICITY,\n carbonIntensity: null,\n annualEnergyUse: line['heating electrical aux annual consumption'],\n },\n },\n [HvacArea.COOLING]: {\n enabled: line['project data and configuration'].hvac.areas[HvacArea.COOLING].enabled,\n sections: line['project data and configuration'].hvac.areas[HvacArea.COOLING].sections,\n thermal: {\n energySource: line['cooling energy source'],\n carbonIntensity: line['cooling energy carbon intensity'],\n annualEnergyUse: line['cooling energy annual consumption'],\n },\n electrical: {\n energySource: EnergySource.ELECTRICITY,\n carbonIntensity: null,\n annualEnergyUse: line['cooling electrical aux annual consumption'],\n },\n },\n [HvacArea.VENTILATION]: {\n enabled: line['project data and configuration'].hvac.areas[HvacArea.VENTILATION].enabled,\n sections: line['project data and configuration'].hvac.areas[HvacArea.VENTILATION].sections,\n thermal: {\n energySource: EnergySource.ELECTRICITY,\n carbonIntensity: null,\n annualEnergyUse: DECIMAL_ZERO,\n },\n electrical: {\n energySource: EnergySource.ELECTRICITY,\n carbonIntensity: null,\n annualEnergyUse: line['ventilation electrical aux annual consumption'],\n },\n },\n },\n },\n schema: line['project data and configuration'].schema,\n report: line['project data and configuration'].report,\n evaluation: line['project data and configuration'].evaluation,\n },\n };\n}\n","import { ProjectData } from '@belimo-retrofit-portal/logic';\nimport { Project } from 'src/modules/common/types/Project';\nimport { PROJECT_VERSION } from 'src/modules/project-new/constants/projectData';\n\nexport function mergeImportData(\n project: Project,\n importData: ProjectData,\n): ProjectData {\n return {\n version: PROJECT_VERSION,\n\n title: importData.title,\n goals: importData.goals,\n building: importData.building,\n currency: importData.currency,\n participants: importData.participants,\n hvac: importData.hvac,\n report: importData.report,\n schema: importData.schema,\n evaluation: importData.evaluation,\n\n // these data should stay as it is\n cover: project.data.cover,\n };\n}\n","import { BUILDING_TYPE, COUNTRY_CODE, Integer } from '@belimo-retrofit-portal/logic';\nimport { pipe } from 'fp-ts/function';\nimport * as D from 'io-ts/Decoder';\nimport { INTEGER_FROM_STRING } from 'src/io/codecs/IntegerFromString';\nimport { decodeOrGet } from 'src/io/utils/decodeOrGet';\nimport { ENERGY_EFFICIENCY_CLASS } from 'src/modules/common/codecs/EnergyEfficiencyClass';\nimport { NON_EMPTY_STRING } from 'src/modules/common/codecs/NonEmptyString';\nimport { INTEGER_ONE } from 'src/modules/common/constants/integer';\nimport { PROJECT_LIST_VIEW_MODE } from 'src/modules/project-list/codecs/ProjectListViewMode';\nimport { PROJECT_LIST_DEFAULT_SORT } from 'src/modules/project-list/constants/sort';\nimport { ProjectListFilter } from 'src/modules/project-list/types/ProjectListFilter';\nimport { ProjectListQuery } from 'src/modules/project-list/types/ProjectListQuery';\nimport { ProjectListSort } from 'src/modules/project-list/types/ProjectListSort';\nimport { ProjectListViewMode } from 'src/modules/project-list/types/ProjectListViewMode';\nimport { isNotNull } from 'src/utils/guard';\n\nexport function parseProjectListQuery(query: URLSearchParams, defaultViewMode: ProjectListViewMode): ProjectListQuery {\n const view = decodeOrGet(PROJECT_LIST_VIEW_MODE, query.get('view'), defaultViewMode);\n const page = decodeOrGet(PAGE_NUMBER, query.get('page'), INTEGER_ONE);\n const sort = decodeOrGet(SORT_ORDER, query.get('sort'), PROJECT_LIST_DEFAULT_SORT[view]);\n const filter = parseProjectListFilter(query);\n\n return { view, page, sort, filter };\n}\n\nexport function buildProjectListQuery(query: ProjectListQuery): URLSearchParams {\n const params = buildProjectListFilter(query.filter);\n if (query.page > 1) {\n params.set('page', query.page.toString());\n }\n\n const sort = (query.sort.direction === 'asc' ? '' : '-') + query.sort.field;\n params.set('sort', sort);\n\n params.set('view', query.view);\n\n return params;\n}\n\nfunction parseProjectListFilter(query: URLSearchParams): ProjectListFilter {\n const buildingType = query.getAll('buildingType')\n .map((it) => decodeOrGet(BUILDING_TYPE, it, null))\n .filter(isNotNull);\n\n const country = query.getAll('country')\n .map((it) => decodeOrGet(COUNTRY_CODE, it, null))\n .filter(isNotNull);\n const city = query.getAll('city')\n .map((it) => decodeOrGet(NON_EMPTY_STRING, it, null))\n .filter(isNotNull);\n\n const ratingActual = query.getAll('ratingActual')\n .map((it) => decodeOrGet(ENERGY_EFFICIENCY_CLASS, it, null))\n .filter(isNotNull);\n const ratingFuture = query.getAll('ratingFuture')\n .map((it) => decodeOrGet(ENERGY_EFFICIENCY_CLASS, it, null))\n .filter(isNotNull);\n\n const ownership = query.getAll('ownership')\n .map((it) => decodeOrGet(NON_EMPTY_STRING, it, null))\n .filter(isNotNull);\n\n return {\n term: decodeOrGet(NON_EMPTY_STRING, query.get('term'), ''),\n\n buildingType: new Set(buildingType),\n\n country: new Set(country),\n city: new Set(city),\n\n ratingActual: new Set(ratingActual),\n ratingFuture: new Set(ratingFuture),\n\n ownership: new Set(ownership),\n };\n}\n\nfunction buildProjectListFilter(filter: ProjectListFilter): URLSearchParams {\n const params = new URLSearchParams();\n\n if (filter.term.length > 0) {\n params.set('term', filter.term);\n }\n if (filter.buildingType.size > 0) {\n filter.buildingType.forEach((it) => params.append('buildingType', it));\n }\n if (filter.country.size > 0) {\n filter.country.forEach((it) => params.append('country', it));\n }\n if (filter.city.size > 0) {\n filter.city.forEach((it) => params.append('city', it));\n }\n if (filter.ratingActual.size > 0) {\n filter.ratingActual.forEach((it) => params.append('ratingActual', it));\n }\n if (filter.ratingFuture.size > 0) {\n filter.ratingFuture.forEach((it) => params.append('ratingFuture', it));\n }\n if (filter.ownership.size > 0) {\n filter.ownership.forEach((it) => params.append('ownership', it));\n }\n\n return params;\n}\n\nconst SORT_MAP: ReadonlyMap = new Map([\n ['title', { field: 'title', direction: 'asc' }],\n ['-title', { field: 'title', direction: 'desc' }],\n\n ['rating', { field: 'rating', direction: 'asc' }],\n ['-rating', { field: 'rating', direction: 'desc' }],\n\n ['updated', { field: 'updated', direction: 'asc' }],\n ['-updated', { field: 'updated', direction: 'desc' }],\n\n ['ownership', { field: 'ownership', direction: 'asc' }],\n ['-ownership', { field: 'ownership', direction: 'desc' }],\n]);\n\nconst PAGE_NUMBER: D.Decoder = pipe(\n INTEGER_FROM_STRING,\n D.parse((input) => (input >= 1 ? D.success(input) : D.failure(input, 'PageNumber'))),\n);\n\nconst SORT_ORDER: D.Decoder = pipe(\n D.string,\n D.parse((input) => {\n const sort = SORT_MAP.get(input);\n return sort ? D.success(sort) : D.failure(input, 'SortOrder');\n }),\n);\n","import { Integer } from '@belimo-retrofit-portal/logic';\nimport { pipe } from 'fp-ts/function';\nimport { AuthUser } from 'src/modules/common/types/AuthUser';\nimport { PROJECT_LIST_PAGE_SIZE } from 'src/modules/project-list/constants/pageSize';\nimport { ProjectListData } from 'src/modules/project-list/types/ProjectListData';\nimport { ProjectListSlice } from 'src/modules/project-list/types/ProjectListSlice';\nimport { getProjectFilter } from 'src/modules/project-list/utils/filter';\nimport { getProjectOrd } from 'src/modules/project-list/utils/sort';\n\nexport function applyProjectListQuery(\n { projects, query }: ProjectListData,\n authUser: AuthUser,\n): ProjectListSlice {\n const filtered = projects.filter(getProjectFilter(query.filter));\n const pageSize = PROJECT_LIST_PAGE_SIZE[query.view];\n\n return {\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n total: filtered.length as Integer,\n found: pipe(\n filtered,\n (data) => data.sort(getProjectOrd(query.sort, authUser).compare),\n (data) => data.slice((query.page - 1) * pageSize, query.page * pageSize),\n ),\n };\n}\n","import { pipe } from 'fp-ts/function';\nimport { concatAll } from 'fp-ts/Monoid';\nimport * as N from 'fp-ts/number';\nimport * as O from 'fp-ts/Ord';\nimport * as S from 'fp-ts/string';\nimport { AuthUser } from 'src/modules/common/types/AuthUser';\nimport { ordNullable, ordPrecedence } from 'src/modules/common/utils/ord';\nimport { ProjectListItem } from 'src/modules/project-list/types/ProjectListItem';\nimport { ProjectListSort } from 'src/modules/project-list/types/ProjectListSort';\n\nexport function getProjectOrd(sort: ProjectListSort, authUser: AuthUser): O.Ord {\n const ord = concatAll(O.getMonoid())([\n SORT_MAP(authUser)[sort.field],\n SORT_BY_ID,\n ]);\n\n return sort.direction === 'asc' ? ord : O.reverse(ord);\n}\n\nconst SORT_BY_ID = pipe(\n S.Ord,\n O.contramap((item: ProjectListItem) => item.project.id),\n);\n\nconst SORT_MAP = (authUser: AuthUser): Readonly>> => ({\n title: pipe(\n S.Ord,\n O.contramap((item) => item.project.data.title),\n ),\n rating: pipe(\n N.Ord,\n O.contramap((item) => item.rating.future?.toNumber() ?? -1),\n ),\n updated: pipe(\n N.Ord,\n O.contramap((item) => item.project.updatedAt.getTime()),\n ),\n ownership: pipe(\n S.Ord,\n ordPrecedence(authUser.email),\n ordNullable,\n O.contramap((item) => item.project.owner?.email ?? null),\n ),\n});\n","import './ProjectListEmpty.scss';\nimport { Add } from '@carbon/icons-react';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { UploadIcon } from 'src/modules/common/icons/UploadIcon';\n\ntype Props = {\n readonly onCreate: () => void;\n readonly onImport: () => void;\n};\n\nexport const ProjectListEmpty = ({ onCreate, onImport }: Props): React.ReactElement => {\n const intl = useIntl();\n\n return (\n
\n
\n
\n \n\n

\n \n

\n
\n\n
\n \n \n\n \n \n\n \n \n\n
\n \n
\n \n
\n
\n
\n );\n};\n","import './ProjectListFilterDropdown.scss';\nimport { BuildingType, CountryCode } from '@belimo-retrofit-portal/logic';\nimport { FormController } from '@form-ts/core';\nimport { identity, pipe } from 'fp-ts/function';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { HorizontalDivider } from 'src/modules/common/components/HorizontalDivider';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { getProjectListFilterValues } from 'src/modules/project-list/selectors/getProjectListFilterValues';\nimport { ProjectListFilter } from 'src/modules/project-list/types/ProjectListFilter';\nimport { ProjectListFilterGroup } from 'src/modules/project-list/views/ProjectListFilterGroup';\n\ntype Props = {\n readonly form: FormController;\n readonly onApply: () => void;\n readonly onClose: () => void;\n};\n\nexport const ProjectListFilterDropdown = ({ form, onApply, onClose }: Props): React.ReactElement => {\n const intl = useIntl();\n\n const authUser = useSelector(getLoggedInUser);\n const values = useSelector(getProjectListFilterValues);\n\n const handleClear = useCallback(() => {\n const formValues = form.values.get(form.currentState);\n form.change(pipe(\n form.currentState,\n form.values.set({\n term: formValues.term,\n\n buildingType: new Set(),\n\n country: new Set(),\n city: new Set(),\n\n ratingActual: new Set(),\n ratingFuture: new Set(),\n\n ownership: new Set(),\n }),\n ));\n\n onApply();\n }, [form, onApply]);\n\n // the first group is always here since country and building type are required\n const hasEfficiencyFilter = (\n values.ratingActual.length > 0 ||\n values.ratingFuture.length > 0\n );\n\n return (\n
\n
\n
\n

\n \n

\n\n {values.buildingType.length > 0 && (\n <>\n
\n \n\n \n
\n\n \n \n )}\n\n {values.city.length > 0 && (\n <>\n
\n \n\n \n
\n\n \n \n )}\n\n {values.country.length > 0 && (\n <>\n
\n \n\n \n
\n\n \n \n )}\n\n {values.ownership.length > 0 && (\n <>\n
\n \n\n \n
\n\n (\n authUser.email === option ? intl.formatMessage({ id: 'projectList/item/owned' }) : option\n )}\n onApply={onApply}\n />\n \n )}\n
\n\n {hasEfficiencyFilter && (\n
\n

\n \n

\n\n {values.ratingActual.length > 0 && (\n <>\n
\n \n\n \n
\n\n \n \n )}\n\n {values.ratingFuture.length > 0 && (\n <>\n
\n \n\n \n
\n\n \n \n )}\n
\n )}\n
\n\n
\n \n \n \n\n \n \n \n
\n
\n );\n};\n\nfunction renderBuildingTypeOption(option: BuildingType): React.ReactElement {\n return ;\n}\n\nfunction renderCountryCodeOption(option: CountryCode): React.ReactElement {\n return ;\n}\n","import './ProjectListFilterGroup.scss';\nimport { Checkbox, FormGroup, FormLabel } from '@carbon/react';\nimport { FieldPath } from '@form-ts/core';\nimport { useFormWatch } from '@form-ts/react';\nimport { pipe } from 'fp-ts/function';\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { ProjectListFilter } from 'src/modules/project-list/types/ProjectListFilter';\n\ntype Props = {\n readonly field: FieldPath>;\n readonly options: ReadonlyArray;\n readonly renderOption: (option: T) => React.ReactElement | string;\n readonly onApply: () => void;\n};\n\n// eslint-disable-next-line react/function-component-definition\nexport function ProjectListFilterGroup({\n field,\n options,\n renderOption,\n onApply,\n}: Props): React.ReactElement {\n const value = useFormWatch(field.form, field.value.get);\n\n const [isGroupOpened, setGroupOpened] = useState(false);\n\n const groupListRef = useRef(null);\n\n const someSelected = useMemo(() => options.some((it) => value.has(it)), [options, value]);\n\n const formGroupTopOffset = 8;\n const formGroupGap = 4;\n const formGroupRowHeight = 23;\n const formGroupMinRows = Math.min(options.length, 3);\n const formGroupLength = isGroupOpened\n ? options.length\n : formGroupMinRows;\n const formGroupHeight = useMemo(\n () => (formGroupRowHeight * formGroupLength) + (formGroupGap * (formGroupLength - 1)) + formGroupTopOffset,\n [formGroupRowHeight, formGroupLength],\n );\n\n const resetAll = useCallback((e: React.MouseEvent) => {\n e.stopPropagation();\n\n const newValue = new Set();\n\n field.form.change(pipe(\n field.form.currentState,\n field.value.set(newValue),\n ));\n\n onApply();\n }, [field, onApply]);\n\n const toggleOption = useCallback((option: T) => {\n const oldValue = field.value.get(field.form.currentState);\n const newValue = toggleSetValue(oldValue, option);\n\n field.form.change(pipe(\n field.form.currentState,\n field.value.set(newValue),\n ));\n\n onApply();\n }, [field, onApply]);\n\n return (\n <>\n \n
\n {options.map((option) => (\n \n toggleOption(option)}\n />\n \n ))}\n
\n \n\n
\n {options.length > 3 ? (\n setGroupOpened((prev) => !prev)}>\n {isGroupOpened ? (\n \n ) : (\n \n )}\n \n ) : null}\n\n {someSelected ? (\n \n \n \n ) : null}\n
\n \n );\n}\n\nfunction toggleSetValue(value: ReadonlySet, option: T): Set {\n const newValue = new Set(value);\n if (newValue.has(option)) {\n newValue.delete(option);\n } else {\n newValue.add(option);\n }\n\n return newValue;\n}\n","import './ProjectListHeader.scss';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { ProjectListQuery } from 'src/modules/project-list/types/ProjectListQuery';\nimport { ProjectListSortLink } from 'src/modules/project-list/views/ProjectListSortLink';\n\ntype Props = {\n readonly query: ProjectListQuery;\n};\n\nexport const ProjectListHeader = ({ query }: Props): React.ReactElement => (\n
\n
\n\n
\n \n \n \n
\n\n
\n \n \n \n
\n\n
\n \n \n \n
\n\n
\n \n \n \n
\n\n
\n
\n);\n","import './ProjectListImportDataTable.scss';\nimport { Information } from '@carbon/icons-react';\nimport {\n DataTable,\n Table,\n TableBody,\n TableCell,\n TableContainer,\n TableRow,\n TableSelectRow,\n Tabs,\n Tag,\n Tooltip,\n} from '@carbon/react';\nimport { fold, isLeft, isRight } from 'fp-ts/Either';\nimport { pipe } from 'fp-ts/function';\nimport React, { useCallback, useState } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomTab, CustomTabList } from 'src/modules/common/components/CustomTabList';\nimport { FormattedMathMessage } from 'src/modules/common/components/FormattedMathMessage';\nimport { ProjectListImportData, ProjectListImportEntry } from 'src/modules/project-list/types/ProjectListImport';\n\ntype Props = {\n readonly content: ProjectListImportData;\n readonly selected: ReadonlyArray;\n readonly onChange: (selected: ReadonlyArray) => void;\n};\n\nexport const ProjectListImportDataTable = ({ content, selected, onChange }: Props): React.ReactElement => {\n const allTab = 0;\n\n const intl = useIntl();\n\n const [activeTab, setActiveTab] = useState(allTab);\n const handleTabChange = useCallback((state: {\n selectedIndex: number;\n }) => setActiveTab(state.selectedIndex), []);\n\n const errorCount = content.reduce((sum, it) => (isRight(it.importData) ? sum : sum + 1), 0);\n const visibleProjects = activeTab === allTab ? content : content.filter((it) => isLeft(it.importData));\n const composedContent = visibleProjects.map((row) => ({\n id: String(row.rowNumber),\n importData: row.importData,\n }));\n\n const handleToggle = useCallback((entry: ProjectListImportEntry) => {\n if (selected.includes(entry)) {\n onChange(selected.filter((it) => it !== entry));\n } else {\n onChange(selected.concat(entry));\n }\n }, [selected, onChange]);\n\n return (\n \n \n \n
\n \n\n {content.length}\n
\n
\n\n \n
\n \n\n {errorCount}\n
\n \n \n\n \n {({\n rows,\n getRowProps,\n getSelectionProps,\n getTableProps,\n getTableContainerProps,\n }) => (\n \n \n \n {composedContent.map((row, index) => (\n \n {pipe(row.importData, fold((importErrors) => (\n \n \n {importErrors.map((importError, errorIndex) => (\n // eslint-disable-next-line react/no-array-index-key\n
  • \n

    \n \n

    \n
  • \n ))}\n \n )}\n >\n \n \n
    \n ), (importEntry) => (\n handleToggle(importEntry)}\n checked={selected.includes(importEntry)}\n />\n )))}\n\n \n {pipe(row.importData, fold(() => (\n \n \n \n ), () => (\n \n \n \n )))}\n \n\n \n {pipe(row.importData, fold(() => (\n

    \n \n

    \n ), (importEntry) => (\n

    \n {importEntry.project.title}\n

    \n )))}\n
    \n\n \n \n \n

    \n
    \n \n ))}\n\n {composedContent.length === 0 && (\n \n \n

    \n \n

    \n
    \n
    \n )}\n
    \n
    \n
    \n )}\n
    \n
    \n );\n};\n\nconst code = (children: React.ReactNode): React.ReactElement => (\n {children}\n);\n","import { ModalHeader } from '@carbon/react';\nimport React, { useCallback, useMemo } from 'react';\nimport { useIntl } from 'react-intl';\nimport { CustomModal } from 'src/modules/common/components/CustomModal';\nimport { PreserveContent } from 'src/modules/common/components/PreserveContent';\nimport { ProjectListImport, ProjectListImportEntry } from 'src/modules/project-list/types/ProjectListImport';\nimport { ProjectListImportSelector } from 'src/modules/project-list/views/ProjectListImportSelector';\nimport { ProjectListImportUpload } from 'src/modules/project-list/views/ProjectListImportUpload';\n\ntype Props = {\n readonly data: ProjectListImport | null;\n readonly onUpload: (file: File) => void;\n readonly onCancel: () => void;\n readonly onSubmit: (entries: ReadonlyArray) => void;\n readonly onComplete: () => void;\n};\n\nexport const ProjectListImportModal = ({\n data,\n onUpload,\n onCancel,\n onSubmit,\n onComplete,\n}: Props): React.ReactElement => {\n const intl = useIntl();\n\n const title = useMemo(() => {\n if (data?.upload?.state === 'success') {\n return intl.formatMessage({ id: 'projectList/importModal/selector/title' });\n }\n\n if (data?.upload?.state !== 'failure') {\n return intl.formatMessage({ id: 'projectList/importModal/upload/title' });\n }\n\n return null;\n }, [data?.upload?.state, intl]);\n\n const handleClose = useCallback(() => {\n if (data?.submit?.state !== 'pending') {\n onCancel();\n }\n }, [data?.submit, onCancel]);\n\n return (\n \n \n\n \n {data && (\n <>\n {data.upload?.state === 'success' && (\n \n )}\n {data.upload?.state !== 'success' && (\n \n )}\n \n )}\n \n \n );\n};\n","import './ProjectListImportSelector.scss';\nimport { CheckmarkFilled } from '@carbon/icons-react';\nimport { ModalBody, ModalFooter } from '@carbon/react';\nimport React, { useCallback, useState } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CustomLoading } from 'src/modules/common/components/CustomLoading';\nimport { CARBON_THEME } from 'src/modules/common/constants/theme';\nimport { Future } from 'src/modules/common/types/Future';\nimport { toNullable } from 'src/modules/common/utils/either';\nimport { ProjectListImportData, ProjectListImportEntry } from 'src/modules/project-list/types/ProjectListImport';\nimport { ProjectListImportDataTable } from 'src/modules/project-list/views/ProjectListImportDataTable';\nimport { isNotNull } from 'src/utils/guard';\n\ntype Props = {\n readonly content: ProjectListImportData;\n readonly status: Future | null;\n readonly onSubmit: (entries: ReadonlyArray) => void;\n readonly onCancel: () => void;\n readonly onComplete: () => void;\n};\n\nexport const ProjectListImportSelector = ({\n content,\n status,\n onSubmit,\n onCancel,\n onComplete,\n}: Props): React.ReactElement => {\n const [selected, setSelected] = useState>(() => (\n content\n .map((it) => it.importData)\n .map(toNullable)\n .filter(isNotNull)\n ));\n const handleSubmit = useCallback(() => onSubmit(selected), [selected, onSubmit]);\n\n return (\n <>\n \n {status?.state === 'pending' && (\n
    \n \n\n

    \n \n

    \n
    \n )}\n\n {status?.state === 'success' && (\n
    \n \n\n

    \n \n

    \n
    \n )}\n\n {(status === null || status.state === 'failure') && (\n
    \n \n
    \n )}\n
    \n\n \n {status?.state !== 'success' && (\n <>\n \n \n \n\n \n \n \n \n )}\n\n {status?.state === 'success' && (\n \n \n \n )}\n \n \n );\n};\n","import './ProjectListImportUpload.scss';\nimport { Upload } from '@carbon/icons-react';\nimport { InlineNotification, ModalBody, ModalFooter } from '@carbon/react';\nimport React, { useCallback } from 'react';\nimport { useDropzone } from 'react-dropzone';\nimport { FormattedMessage } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CustomLoading } from 'src/modules/common/components/CustomLoading';\nimport { Future } from 'src/modules/common/types/Future';\nimport { ProjectListImportData } from 'src/modules/project-list/types/ProjectListImport';\n\ntype Props = {\n readonly status: Future | null;\n readonly onUpload: (file: File) => void;\n readonly onCancel: () => void;\n};\n\nexport const ProjectListImportUpload = ({ status, onUpload, onCancel }: Props): React.ReactElement => {\n const handleDrop = useCallback((acceptedFiles: File[]) => {\n const file = acceptedFiles[0] ?? new File([], 'invalid.xlsx');\n onUpload(file);\n }, [onUpload]);\n\n const { getRootProps, getInputProps } = useDropzone({\n onDrop: handleDrop,\n disabled: status?.state === 'pending',\n accept: {\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': ['.xlsx'],\n },\n });\n\n return (\n <>\n \n

    \n \n

    \n\n {status?.state !== 'pending' && (\n \n \n\n \n\n

    \n \n

    \n
    \n )}\n {status?.state === 'pending' && (\n
    \n \n\n

    \n \n

    \n
    \n )}\n {status?.state === 'failure' && (\n \n \n \n )}\n \n\n \n \n \n \n \n \n );\n};\n\nfunction formatLink(children: React.ReactNode): React.ReactElement {\n return (\n \n {children}\n \n );\n}\n","import './ProjectListItemGridView.scss';\nimport { ProjectAddress } from '@belimo-retrofit-portal/logic';\nimport { DocumentPdf, Folder, OverflowMenuVertical, TrashCan } from '@carbon/icons-react';\nimport { Tag, Tooltip } from '@carbon/react';\nimport clsx from 'clsx';\nimport React, { useCallback } from 'react';\nimport { FormattedDate, FormattedMessage, useIntl } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport { AssetImage } from 'src/modules/common/components/AssetImage';\nimport { CustomLoading } from 'src/modules/common/components/CustomLoading';\nimport { CustomMenu } from 'src/modules/common/components/CustomMenu';\nimport { CustomMenuItem } from 'src/modules/common/components/CustomMenuItem';\nimport { ProjectTitle } from 'src/modules/common/components/ProjectTitle';\nimport { CARBON_THEME } from 'src/modules/common/constants/theme';\nimport { ShareOff } from 'src/modules/common/icons/ShareOff';\nimport { Project } from 'src/modules/common/types/Project';\nimport { BodyDesktopLargeRegularText } from 'src/modules/common/typography/BodyDesktopLargeRegularText';\nimport { OverlineDesktopSmallText } from 'src/modules/common/typography/OverlineDesktopSmallText';\nimport { ProjectListItem } from 'src/modules/project-list/types/ProjectListItem';\nimport { ProjectListRating } from 'src/modules/project-list/views/ProjectListRating';\n\ntype Props = {\n readonly item: ProjectListItem;\n readonly downloading: boolean;\n readonly unfollowing: boolean;\n readonly onRemove: (project: Project) => void;\n readonly onDownload: (project: Project) => void;\n readonly onUnfollow: (project: Project) => void;\n readonly onShare: (project: Project) => void;\n};\n\nexport const ProjectListItemGridView = ({\n item,\n downloading,\n unfollowing,\n onRemove,\n onDownload,\n onUnfollow,\n onShare,\n}: Props): React.ReactElement => {\n const intl = useIntl();\n\n const { project, rating } = item;\n const shared = project.isShared;\n\n const handleRemove = useCallback((e: React.MouseEvent) => {\n e.preventDefault();\n onRemove(project);\n }, [project, onRemove]);\n\n const handleDownload = useCallback((e: React.MouseEvent) => {\n e.preventDefault();\n onDownload(project);\n }, [project, onDownload]);\n\n const handleUnfollow = useCallback((e: React.MouseEvent) => {\n e.preventDefault();\n onUnfollow(project);\n }, [project, onUnfollow]);\n\n const handleOwnershipClick = useCallback((event: React.MouseEvent): void => {\n event.preventDefault();\n event.stopPropagation();\n onShare(project);\n }, [project, onShare]);\n\n const buildingType = intl.formatMessage({ id: `common/buildingType/${project.data.building.type}` });\n const ownershipContent = shared\n ? project.owner?.email ?? '—'\n : intl.formatMessage({ id: 'projectList/item/owned' });\n\n return (\n \n
    \n
    \n \n \n \n
    \n
    \n \n {formatProjectDetailsSubTitle(buildingType, project.data.building.address)}\n \n
    \n
    \n\n
    \n {project.data.cover && (\n \n )}\n {!project.data.cover && (\n
    \n \n
    \n )}\n
    \n\n
    \n
    \n }}\n />\n
    \n
    \n \n
    \n
    \n\n
    \n
    \n \n \n {ownershipContent}\n \n \n
    \n
    \n e?.preventDefault()}\n flipped={true}\n iconDescription={intl.formatMessage({ id: 'projectList/items' })}\n tooltipPosition=\"bottom\"\n renderIcon={() => }\n >\n \n \n
    \n ) : (\n <>\n \n\n \n \n )}\n />\n\n {!shared ? (\n \n \n\n \n \n )}\n />\n ) : (\n \n \n
    \n ) : (\n <>\n \n\n \n \n )}\n />\n )}\n \n
    \n \n \n );\n};\n\nfunction formatProjectDetailsSubTitle(buildingType: string, address: ProjectAddress): string {\n return [buildingType, address.street.trim(), `${address.city} ${address.zip}`.trim()].filter(Boolean).join(', ');\n}\n","import './ProjectListItemListView.scss';\nimport { ProjectAddress } from '@belimo-retrofit-portal/logic';\nimport { DocumentPdf, Folder, OverflowMenuVertical, TrashCan } from '@carbon/icons-react';\nimport { Tag, Tooltip } from '@carbon/react';\nimport clsx from 'clsx';\nimport React, { useCallback } from 'react';\nimport { FormattedDate, FormattedMessage, useIntl } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport { AssetImage } from 'src/modules/common/components/AssetImage';\nimport { CustomLoading } from 'src/modules/common/components/CustomLoading';\nimport { CustomMenu } from 'src/modules/common/components/CustomMenu';\nimport { CustomMenuItem } from 'src/modules/common/components/CustomMenuItem';\nimport { ProjectTitle } from 'src/modules/common/components/ProjectTitle';\nimport { CARBON_THEME } from 'src/modules/common/constants/theme';\nimport { ShareOff } from 'src/modules/common/icons/ShareOff';\nimport { Project } from 'src/modules/common/types/Project';\nimport { BodyDesktopLargeRegularText } from 'src/modules/common/typography/BodyDesktopLargeRegularText';\nimport { OverlineDesktopSmallText } from 'src/modules/common/typography/OverlineDesktopSmallText';\nimport { ProjectListItem } from 'src/modules/project-list/types/ProjectListItem';\nimport { ProjectListRating } from 'src/modules/project-list/views/ProjectListRating';\n\ntype Props = {\n readonly item: ProjectListItem;\n readonly downloading: boolean;\n readonly unfollowing: boolean;\n readonly onRemove: (project: Project) => void;\n readonly onDownload: (project: Project) => void;\n readonly onUnfollow: (project: Project) => void;\n readonly onShare: (project: Project) => void;\n};\n\nexport const ProjectListItemListView = ({\n item,\n downloading,\n unfollowing,\n onRemove,\n onDownload,\n onUnfollow,\n onShare,\n}: Props): React.ReactElement => {\n const intl = useIntl();\n\n const { project, rating } = item;\n const shared = project.isShared;\n\n const handleRemove = useCallback((e: React.MouseEvent) => {\n e.preventDefault();\n onRemove(project);\n }, [project, onRemove]);\n\n const handleDownload = useCallback((e: React.MouseEvent) => {\n e.preventDefault();\n onDownload(project);\n }, [project, onDownload]);\n\n const handleUnfollow = useCallback((e: React.MouseEvent) => {\n e.preventDefault();\n onUnfollow(project);\n }, [project, onUnfollow]);\n\n const handleOwnershipClick = useCallback((event: React.MouseEvent): void => {\n event.preventDefault();\n event.stopPropagation();\n onShare(project);\n }, [project, onShare]);\n\n const buildingType = intl.formatMessage({ id: `common/buildingType/${project.data.building.type}` });\n const ownershipContent = shared\n ? project.owner?.email ?? '—'\n : intl.formatMessage({ id: 'projectList/item/owned' });\n\n return (\n \n
    \n {project.data.cover && (\n \n )}\n {!project.data.cover && (\n \n )}\n
    \n\n
    \n \n \n \n\n \n {formatProjectDetailsSubTitle(buildingType, project.data.building.address)}\n \n
    \n\n
    \n
    \n \n \n {ownershipContent}\n \n \n
    \n
    \n\n
    \n

    \n \n

    \n
    \n\n
    \n \n
    \n\n
    \n e?.preventDefault()}\n flipped={true}\n iconDescription={intl.formatMessage({ id: 'projectList/items' })}\n tooltipPosition=\"bottom\"\n renderIcon={() => }\n >\n \n \n
    \n ) : (\n <>\n \n\n \n \n )}\n />\n\n {!shared ? (\n \n \n\n \n \n )}\n />\n ) : (\n \n \n \n ) : (\n <>\n \n\n \n \n )}\n />\n )}\n \n \n \n );\n};\n\nfunction formatProjectDetailsSubTitle(buildingType: string, address: ProjectAddress): string {\n return [buildingType, address.street.trim(), `${address.city} ${address.zip}`.trim()].filter(Boolean).join(', ');\n}\n","import './ProjectListPager.scss';\nimport { INTEGER, Integer } from '@belimo-retrofit-portal/logic';\nimport { PaginationNav } from '@carbon/react';\nimport React from 'react';\nimport { useHistory } from 'react-router-dom';\nimport { decodeOrGet } from 'src/io/utils/decodeOrGet';\nimport { INTEGER_ONE } from 'src/modules/common/constants/integer';\nimport { PROJECT_LIST_PAGE_SIZE } from 'src/modules/project-list/constants/pageSize';\nimport { ProjectListQuery } from 'src/modules/project-list/types/ProjectListQuery';\nimport { buildProjectListQuery } from 'src/modules/project-list/utils/query';\n\ntype Props = {\n readonly total: Integer;\n readonly query: ProjectListQuery;\n};\n\nexport const ProjectListPager = ({ query, total }: Props): React.ReactElement => {\n const history = useHistory();\n\n return (\n history.push(`?${getQueryString(pageIndex + 1, query)}`)}\n />\n );\n};\n\nfunction getQueryString(page: number | null, query: ProjectListQuery): string {\n return buildProjectListQuery({\n ...query,\n page: decodeOrGet(INTEGER, page, INTEGER_ONE),\n }).toString();\n}\n","import './ProjectListRating.scss';\nimport { HvacResultsRating } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\nimport { EnergyEfficiencyLabelWrapper } from 'src/modules/common/components/EnergyEfficiencyLabelWrapper';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\n\ntype Props = {\n readonly rating: HvacResultsRating;\n};\n\nexport const ProjectListRating = ({ rating }: Props): React.ReactElement => (\n
    \n \n\n
    \n \n
    \n\n \n
    \n);\n","import './ProjectListRemoveModal.scss';\nimport { ModalBody, ModalFooter, ModalHeader } from '@carbon/react';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CustomModal } from 'src/modules/common/components/CustomModal';\nimport { PreserveContent } from 'src/modules/common/components/PreserveContent';\nimport { ProjectTitle } from 'src/modules/common/components/ProjectTitle';\nimport { BodyText } from 'src/modules/common/typography/BodyText';\nimport { LeadText } from 'src/modules/common/typography/LeadText';\nimport { ProjectListRemoving } from 'src/modules/project-list/types/ProjectListRemoving';\n\ntype Props = {\n readonly data: ProjectListRemoving | null;\n readonly onCancel: () => void;\n readonly onSubmit: () => void;\n};\n\nexport const ProjectListRemoveModal = ({ data, onCancel, onSubmit }: Props): React.ReactElement => {\n const intl = useIntl();\n\n const handleClose = useCallback(() => {\n if (data?.status?.state !== 'pending') {\n onCancel();\n }\n }, [data?.status, onCancel]);\n\n return (\n \n \n {data && (\n <>\n \n\n \n
    \n \n \n \n\n \n }}\n />\n \n
    \n
    \n\n \n \n \n \n\n \n \n \n \n \n )}\n
    \n \n );\n};\n","import './ProjectListSortLink.scss';\nimport { CaretDown, CaretUp } from '@carbon/icons-react';\nimport React from 'react';\nimport { Link } from 'react-router-dom';\nimport { INTEGER_ONE } from 'src/modules/common/constants/integer';\nimport { ProjectListQuery } from 'src/modules/project-list/types/ProjectListQuery';\nimport { ProjectListSort } from 'src/modules/project-list/types/ProjectListSort';\nimport { buildProjectListQuery } from 'src/modules/project-list/utils/query';\n\ntype Props = {\n readonly query: ProjectListQuery;\n readonly field: ProjectListSort['field'];\n readonly children: React.ReactNode;\n};\n\nexport const ProjectListSortLink = ({ query, field, children }: Props): React.ReactElement => (\n \n \n {children}\n \n\n {query.sort.field === field && (\n \n {query.sort.direction === 'asc'\n ? \n : }\n \n )}\n \n);\n\nfunction getSortSearch(query: ProjectListQuery, field: ProjectListSort['field']): string {\n const direction = query.sort.field === field && query.sort.direction === 'asc' ? 'desc' : 'asc';\n\n return buildProjectListQuery({\n ...query,\n page: INTEGER_ONE,\n sort: { field, direction },\n }).toString();\n}\n","import './ProjectListToolbar.scss';\nimport { Popover, PopoverContent } from '@carbon/react';\nimport { useForm, useFormWatch } from '@form-ts/react';\nimport { flow } from 'fp-ts/function';\nimport React, { memo, useCallback, useEffect, useState } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { INTEGER_ONE } from 'src/modules/common/constants/integer';\nimport { DownloadIcon } from 'src/modules/common/icons/DownloadIcon';\nimport { FilterIcon } from 'src/modules/common/icons/FilterIcon';\nimport { GridViewIcon } from 'src/modules/common/icons/GridViewIcon';\nimport { ListViewIcon } from 'src/modules/common/icons/ListViewIcon';\nimport { PlusIcon } from 'src/modules/common/icons/PlusIcon';\nimport { UploadIcon } from 'src/modules/common/icons/UploadIcon';\nimport { Future } from 'src/modules/common/types/Future';\nimport { SearchField } from 'src/modules/form/components/SearchField';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { PROJECT_LIST_DEFAULT_SORT } from 'src/modules/project-list/constants/sort';\nimport { ProjectListFilter } from 'src/modules/project-list/types/ProjectListFilter';\nimport { ProjectListQuery } from 'src/modules/project-list/types/ProjectListQuery';\nimport { ProjectListViewMode } from 'src/modules/project-list/types/ProjectListViewMode';\nimport { buildProjectListQuery } from 'src/modules/project-list/utils/query';\nimport { ProjectListFilterDropdown } from 'src/modules/project-list/views/ProjectListFilterDropdown';\nimport { useDebouncedCallback } from 'use-debounce';\n\ntype Props = {\n readonly query: ProjectListQuery;\n readonly exporting: Future | null;\n readonly onCreate: () => void;\n readonly onImport: () => void;\n readonly onExport: () => void;\n readonly onFilter: (filter: ProjectListFilter) => void;\n};\n\nexport const ProjectListToolbar = memo(({\n query,\n exporting,\n onCreate,\n onImport,\n onExport,\n onFilter,\n}: Props): React.ReactElement => {\n const intl = useIntl();\n\n const [isFiltersDropdownOpened, setFiltersDropdownOpened] = useState(false);\n\n const form = useForm('project.filter', {\n reinitialize: true,\n initialValues: query.filter,\n });\n\n const count = useFormWatch(form, flow(form.values.get, getAppliedFilterCount));\n\n const handleFilterDebounced = useDebouncedCallback(onFilter, 300);\n\n const handleDropdownOpen = useCallback(() => {\n setFiltersDropdownOpened(true);\n }, []);\n\n const handleDropdownClose = useCallback(() => {\n setFiltersDropdownOpened(false);\n onFilter(form.currentState.values);\n }, [form, onFilter]);\n\n const handleDropdownApply = useCallback(() => {\n onFilter(form.currentState.values);\n }, [form, onFilter]);\n\n const handleChange = useCallback(() => {\n handleFilterDebounced(form.currentState.values);\n }, [form.currentState.values, handleFilterDebounced]);\n\n useEffect(() => () => {\n handleFilterDebounced.cancel();\n }, [handleFilterDebounced]);\n\n return (\n
    \n
    \n
    \n

    \n \n

    \n
    \n\n
    \n
    \n \n \n \n\n \n \n \n
    \n\n
    \n \n \n \n\n \n \n \n\n \n \n \n \n\n \n \n \n \n\n \n\n \n \n\n
    \n \n
    \n \n
    \n
    \n
    \n
    \n );\n});\n\nfunction getAppliedFilterCount(filter: ProjectListFilter): number {\n return (\n (filter.buildingType.size > 0 ? 1 : 0) +\n (filter.country.size > 0 ? 1 : 0) +\n (filter.city.size > 0 ? 1 : 0) +\n (filter.ratingActual.size > 0 ? 1 : 0) +\n (filter.ratingFuture.size > 0 ? 1 : 0)\n );\n}\n","import './ProjectListView.scss';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Project } from 'src/modules/common/types/Project';\nimport { PROJECT_LIST_PAGE_SIZE } from 'src/modules/project-list/constants/pageSize';\nimport { ProjectListDownloading } from 'src/modules/project-list/types/ProjectListDownloading';\nimport { ProjectListQuery } from 'src/modules/project-list/types/ProjectListQuery';\nimport { ProjectListSlice } from 'src/modules/project-list/types/ProjectListSlice';\nimport { ProjectListViewMode } from 'src/modules/project-list/types/ProjectListViewMode';\nimport { ProjectListUnfollowing } from 'src/modules/project-list/types/ProjectUnfollowing';\nimport { ProjectListHeader } from 'src/modules/project-list/views/ProjectListHeader';\nimport { ProjectListItemGridView } from 'src/modules/project-list/views/ProjectListItemGridView';\nimport { ProjectListItemListView } from 'src/modules/project-list/views/ProjectListItemListView';\nimport { ProjectListPager } from 'src/modules/project-list/views/ProjectListPager';\n\ntype Props = {\n readonly query: ProjectListQuery;\n readonly projects: ProjectListSlice;\n readonly downloading: ProjectListDownloading | null;\n readonly unfollowing: ProjectListUnfollowing | null;\n readonly onRemove: (project: Project) => void;\n readonly onDownload: (project: Project) => void;\n readonly onUnfollow: (project: Project) => void;\n readonly onShare: (project: Project) => void;\n};\n\nexport const ProjectListView = ({\n query,\n projects,\n downloading,\n unfollowing,\n onRemove,\n onDownload,\n onUnfollow,\n onShare,\n}: Props): React.ReactElement => (\n
    \n
    \n {query.view === ProjectListViewMode.LIST && (\n
    \n \n\n {projects.found.map((listItem) => (\n \n ))}\n
    \n )}\n {query.view === ProjectListViewMode.GRID && (\n
    \n {projects.found.map((listItem) => (\n \n ))}\n
    \n )}\n\n {projects.total === 0 && (\n

    \n \n

    \n )}\n\n {projects.total > PROJECT_LIST_PAGE_SIZE[query.view] && (\n
    \n \n
    \n )}\n
    \n
    \n);\n","import './UnfollowProjectModal.scss';\nimport { ModalBody, ModalFooter, ModalHeader } from '@carbon/react';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CustomModal } from 'src/modules/common/components/CustomModal';\nimport { PreserveContent } from 'src/modules/common/components/PreserveContent';\nimport { ProjectListUnfollowing } from 'src/modules/project-list/types/ProjectUnfollowing';\n\ntype Props = {\n data: ProjectListUnfollowing | null;\n onConfirmUnfollow: () => void;\n onClose: () => void;\n};\n\nexport const UnfollowProjectModal = ({ data, onConfirmUnfollow, onClose }: Props): React.ReactElement => {\n const intl = useIntl();\n return (\n \n \n {\n data && (\n <>\n \n )}\n title={(\n \n )}\n />\n\n \n \n \n\n \n \n \n \n\n \n \n \n \n \n )\n }\n \n \n );\n};\n","import { FormController } from '@form-ts/core';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { BasicFormData } from 'src/modules/project-new/types/BasicFormData';\nimport { BuildingFormData } from 'src/modules/project-new/types/BuildingFormData';\nimport { createActions } from 'src/utils/createActions';\n\nexport const PROJECT_NEW_CREATE =\n createActions('PROJECT_NEW_CREATE');\n\ntype CreateNewData = {\n readonly stepOne: BasicFormData;\n readonly stepTwo: FormController;\n};\n","import { AreaUnit } from '@belimo-retrofit-portal/logic';\nimport { BasicFormData } from 'src/modules/project-new/types/BasicFormData';\nimport { BuildingFormData } from 'src/modules/project-new/types/BuildingFormData';\n\nexport const DEFAULT_BASIC_FORM_DATA: BasicFormData = {\n cover: null,\n projectGoals: '',\n title: '',\n};\n\nexport const DEFAULT_BUILDING_FORM_DATA: BuildingFormData = {\n unit: AreaUnit.SQM,\n type: null,\n size: null,\n address: {\n zip: '',\n city: '',\n street: '',\n country: null,\n },\n};\n","import {\n CurrencyCode,\n EnergySource,\n HvacArea,\n ProjectEvaluation,\n ProjectHvac,\n ProjectParticipants,\n ProjectReport,\n ProjectSchema,\n SchemaArea,\n} from '@belimo-retrofit-portal/logic';\nimport { DECIMAL_ZERO } from 'src/modules/common/constants/decimal';\n\nexport const PROJECT_VERSION = '2025.01.20.0';\n\nexport const PROJECT_CURRENCY_DEFAULT_DATA: CurrencyCode = 'EUR';\n\nexport const PROJECT_SCHEMA_DEFAULT_DATA: ProjectSchema = {\n [SchemaArea.HEATING]: null,\n [SchemaArea.COOLING]: null,\n [SchemaArea.VENTILATION]: null,\n};\n\nexport const PROJECT_REPORT_DEFAULT_DATA: ProjectReport = {\n cover: {\n creationDate: null,\n showBuildingInfo: true,\n },\n energy: {\n enabled: true,\n showHeating: false,\n showCooling: false,\n showVentilation: false,\n showComments: false,\n },\n hvac: {\n enabled: true,\n showHeating: false,\n showCooling: false,\n showVentilation: false,\n showComments: true,\n },\n savings: {\n enabled: true,\n showOverallEfficiency: true,\n showPerAreaEfficiency: true,\n showPotentialSavings: true,\n },\n schema: {\n [SchemaArea.HEATING]: {\n enabled: true,\n showZoomedIn: false,\n showComments: false,\n futureVersion: null,\n },\n [SchemaArea.COOLING]: {\n enabled: true,\n showZoomedIn: false,\n showComments: false,\n futureVersion: null,\n },\n [SchemaArea.VENTILATION]: {\n enabled: true,\n showZoomedIn: false,\n showComments: false,\n futureVersion: null,\n },\n },\n evaluation: {\n enabled: true,\n showInitialInvestment: true,\n showAnnualSavings: true,\n showInvestmentPerCarbonSavings: true,\n },\n evaluationCharts: {\n enabled: true,\n showReturnOnInvestment: true,\n showInternalRateOfReturn: true,\n showAnnualCarbonEmmission: true,\n showBreakEvenPoint: true,\n },\n};\n\nexport const PROJECT_PARTICIPANTS_DEFAULT_DATA: ProjectParticipants = {\n author: '',\n consutlingEngineer: '',\n productManager: '',\n propertyManager: '',\n};\n\nexport const PROJECT_HVAC_DEFAULT_DATA: ProjectHvac = {\n comment: '',\n prices: {\n [EnergySource.ELECTRICITY]: null,\n [EnergySource.GAS]: null,\n\n [EnergySource.HEATING_DISTRICT]: null,\n [EnergySource.HEATING_OIL]: null,\n [EnergySource.HEATING_OTHER]: null,\n\n [EnergySource.COOLING_DISTRICT]: null,\n [EnergySource.COOLING_OTHER]: null,\n },\n areas: {\n [HvacArea.HEATING]: {\n enabled: false,\n sections: [],\n thermal: {\n energySource: EnergySource.ELECTRICITY,\n annualEnergyUse: null,\n carbonIntensity: null,\n },\n electrical: {\n energySource: EnergySource.ELECTRICITY,\n annualEnergyUse: null,\n carbonIntensity: null,\n },\n },\n [HvacArea.COOLING]: {\n enabled: false,\n sections: [],\n thermal: {\n energySource: EnergySource.ELECTRICITY,\n annualEnergyUse: null,\n carbonIntensity: null,\n },\n electrical: {\n energySource: EnergySource.ELECTRICITY,\n annualEnergyUse: null,\n carbonIntensity: null,\n },\n },\n [HvacArea.VENTILATION]: {\n enabled: false,\n sections: [],\n thermal: {\n energySource: EnergySource.ELECTRICITY,\n annualEnergyUse: DECIMAL_ZERO,\n carbonIntensity: null,\n },\n electrical: {\n energySource: EnergySource.ELECTRICITY,\n annualEnergyUse: null,\n carbonIntensity: null,\n },\n },\n },\n};\n\nexport const PROJECT_EVALUATION_DEFAULT_DATA: ProjectEvaluation = {\n investmentAmount: null,\n carbonEmissionPrice: null,\n proposalDescription: '',\n};\n","import { trim } from 'fp-ts/string';\nimport { FormRule } from 'src/modules/form/types/FormRule';\nimport * as R from 'src/modules/form/utils/rules';\nimport { BasicFormData } from 'src/modules/project-new/types/BasicFormData';\nimport { BuildingFormData } from 'src/modules/project-new/types/BuildingFormData';\n\nexport const BASIC_SCHEMA: FormRule = R.struct({\n cover: R.pass(),\n title: R.allOf([\n R.map(trim, R.nonEmpty()),\n R.maxLength(40),\n ]),\n projectGoals: R.maxLength(280),\n});\n\nexport const BUILDING_SCHEMA: FormRule = R.struct({\n unit: R.required(),\n type: R.required(),\n size: R.nullable(R.gt(0)),\n address: R.struct({\n street: R.maxLength(30),\n city: R.maxLength(20),\n country: R.required(),\n zip: R.maxLength(10),\n }),\n});\n","import { NativeError, ProjectData, resolveInitialProjectData } from '@belimo-retrofit-portal/logic';\nimport { replace } from 'connected-react-router';\nimport { SagaIterator } from 'redux-saga';\nimport { uploadAsset } from 'src/modules/asset/sagas/utils/uploadAsset';\nimport { createProject } from 'src/modules/common/sagas/utils/createProject';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { formSubmitFailure } from 'src/modules/form/sagas/utils/formSubmitFailure';\nimport { formSubmitStart } from 'src/modules/form/sagas/utils/formSubmitStart';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { PROJECT_NEW_CREATE } from 'src/modules/project-new/actions/ProjectNewActions';\nimport {\n PROJECT_CURRENCY_DEFAULT_DATA,\n PROJECT_EVALUATION_DEFAULT_DATA,\n PROJECT_HVAC_DEFAULT_DATA,\n PROJECT_PARTICIPANTS_DEFAULT_DATA,\n PROJECT_REPORT_DEFAULT_DATA,\n PROJECT_SCHEMA_DEFAULT_DATA,\n PROJECT_VERSION,\n} from 'src/modules/project-new/constants/projectData';\nimport { getRandomDefaultCover } from 'src/modules/project-new/utils/getRandomDefaultCover';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { assertNotNull } from 'src/utils/assert';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, put, select } from 'typed-redux-saga';\n\nexport function* projectNewCreateSaga(\n action: GetRequestActionType,\n): SagaIterator {\n const basicValues = action.data.stepOne;\n const buildingForm = action.data.stepTwo;\n\n const buildingValues = buildingForm.values.get(buildingForm.currentState);\n\n try {\n yield* put(PROJECT_NEW_CREATE.pending());\n yield* call(logDebug, 'Creating new project...');\n yield* call(formSubmitStart, buildingForm);\n\n const cover = basicValues.cover !== null\n ? basicValues.cover\n : yield* call(getRandomDefaultCover);\n\n const asset = yield* call(uploadAsset, cover);\n\n const user = yield* select(getLoggedInUser);\n\n const projectData: ProjectData = yield* call(resolveInitialProjectData, {\n version: PROJECT_VERSION,\n title: basicValues.title,\n goals: basicValues.projectGoals,\n cover: asset,\n building: {\n type: assertNotNull(\n buildingValues.type,\n 'Building type is not defined',\n { buildingValues },\n ),\n address: {\n country: assertNotNull(\n buildingValues.address.country,\n 'Country is not defined',\n { buildingValues },\n ),\n city: buildingValues.address.city,\n street: buildingValues.address.street,\n zip: buildingValues.address.zip,\n },\n size: buildingValues.size,\n unit: buildingValues.unit,\n },\n participants: {\n ...PROJECT_PARTICIPANTS_DEFAULT_DATA,\n author: `${user.firstName} ${user.lastName}`,\n },\n hvac: PROJECT_HVAC_DEFAULT_DATA,\n currency: PROJECT_CURRENCY_DEFAULT_DATA,\n schema: PROJECT_SCHEMA_DEFAULT_DATA,\n report: PROJECT_REPORT_DEFAULT_DATA,\n evaluation: PROJECT_EVALUATION_DEFAULT_DATA,\n });\n\n const project = yield* call(createProject, projectData);\n yield* put(replace(`/project/${encodeURIComponent(project.id)}`));\n\n yield* call(logDebug, 'Creating new project... done', project);\n yield* put(PROJECT_NEW_CREATE.success());\n\n yield* call(\n showNotification,\n {\n variant: 'success',\n type: 'done',\n messageId: 'project/create/success',\n messageValue: {\n projectName: basicValues.title,\n },\n },\n );\n\n yield* call(scheduleUpdateLatestActivity);\n yield* call(scheduleUpdateFeedbackCounter);\n\n // no need to unlock the form until router transition is completed\n // so there is no `formSubmitSuccess` call\n } catch (error) {\n yield* call(sentryCatch, error);\n\n yield* call(logError, 'Creating new project... error', error);\n yield* put(PROJECT_NEW_CREATE.failure(NativeError.wrap(error)));\n\n yield* call(showNotification, { variant: 'error', type: 'error' });\n\n yield* call(formSubmitFailure, buildingForm, {\n '': {\n path: '',\n code: 'unknown',\n value: buildingValues,\n\n message: String(error),\n context: {},\n },\n });\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { PROJECT_NEW_CREATE } from 'src/modules/project-new/actions/ProjectNewActions';\nimport { projectNewCreateSaga } from 'src/modules/project-new/sagas/projectNewCreateSaga';\nimport { takeLatest } from 'typed-redux-saga';\n\nexport function* projectNewSaga(): SagaIterator {\n yield* takeLatest(PROJECT_NEW_CREATE.isRequest, projectNewCreateSaga);\n}\n","export function getRandomDefaultCover(): Promise {\n const randomIndex = Math.floor(Math.random() * 4) + 1;\n\n return fetch(`/images/newProjectDefault/${randomIndex}.png`)\n .then((response) => response.blob())\n .then((content) => new File([content], 'cover.png'));\n}\n","import './BasicInfoFormModal.scss';\nimport { ModalBody, ModalFooter, ModalHeader } from '@carbon/react';\nimport { FormController } from '@form-ts/core';\nimport { useForm } from '@form-ts/react';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\nimport { FileField } from 'src/modules/form/components/FileField';\nimport { TextAreaField } from 'src/modules/form/components/TextAreaField';\nimport { TextField } from 'src/modules/form/components/TextField';\nimport { useFormValidator } from 'src/modules/form/hooks/useFormValidator';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { BASIC_SCHEMA } from 'src/modules/project-new/constants/schema';\nimport { BasicFormData } from 'src/modules/project-new/types/BasicFormData';\n\ntype Props = {\n readonly formData: BasicFormData;\n readonly onNext: (form: FormController) => void;\n readonly onClose: () => void;\n};\n\nexport const BasicInfoFormModal = ({ formData, onNext, onClose }: Props): React.ReactElement => {\n const intl = useIntl();\n\n const form = useForm('project.create.new.basic', {\n reinitialize: false,\n initialValues: formData,\n });\n useFormValidator(form, BASIC_SCHEMA);\n\n const handleSubmit = useCallback((): void => {\n onNext(form);\n }, [form, onNext]);\n\n return (\n <>\n \n\n \n \n\n \n\n
    \n \n \n \n\n \n
    \n
    \n\n \n \n \n \n\n \n \n\n
    \n \n
    \n \n
    \n \n );\n};\n","import './BuildingInfoFormModal.scss';\nimport { AreaUnit, BuildingType, CountryCode } from '@belimo-retrofit-portal/logic';\nimport { ModalBody, ModalFooter, ModalHeader } from '@carbon/react';\nimport { FormController } from '@form-ts/core';\nimport { useForm, useFormWatch } from '@form-ts/react';\nimport { constNull } from 'fp-ts/function';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { AreaUnitView } from 'src/modules/common/components/AreaUnitView';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { BUILDING_TYPE_OPTIONS, UNIT_VERSION_OPTIONS } from 'src/modules/common/constants/options';\nimport { CARBON_THEME } from 'src/modules/common/constants/theme';\nimport { useCountryList } from 'src/modules/common/hooks/useCountryList';\nimport { ArrowLeftIcon } from 'src/modules/common/icons/ArrowLeftIcon';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\nimport { AutocompleteField } from 'src/modules/form/components/AutocompleteField';\nimport { DecimalField } from 'src/modules/form/components/DecimalField';\nimport { DropdownField } from 'src/modules/form/components/DropdownField';\nimport { TextField } from 'src/modules/form/components/TextField';\nimport { useFormValidator } from 'src/modules/form/hooks/useFormValidator';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { ensureNonNull } from 'src/modules/form/utils/transform';\nimport { BUILDING_SCHEMA } from 'src/modules/project-new/constants/schema';\nimport { BuildingFormData } from 'src/modules/project-new/types/BuildingFormData';\n\ntype Props = {\n readonly formData: BuildingFormData;\n readonly onSubmit: (form: FormController) => void;\n readonly onBack: (form: FormController) => void;\n readonly onClose: () => void;\n};\n\nexport const BuildingInfoFormModal = ({ formData, onSubmit, onBack, onClose }: Props): React.ReactElement => {\n const intl = useIntl();\n const countryCodes = useCountryList();\n\n const form = useForm('project.create.new.buidling', {\n reinitialize: false,\n initialValues: formData,\n });\n useFormValidator(form, BUILDING_SCHEMA);\n\n const handleSubmit = useCallback((): void => {\n onSubmit(form);\n }, [form, onSubmit]);\n const handleBack = useCallback((): void => {\n onBack(form);\n }, [form, onBack]);\n\n const isSubmitting = useFormWatch(form, form.submitting.get);\n\n return (\n <>\n \n\n \n
    \n \n {intl.formatMessage({ id: 'basedata/building/type' })}\n *\n \n )}\n itemToElement={renderBuildingTypeOption}\n renderSelectedItem={renderBuildingTypeOption}\n />\n\n \n\n \n
    \n\n
    \n \n
    \n\n
    \n \n
    \n\n
    \n \n size=\"lg\"\n direction=\"top\"\n field={form.field.at('address').at('country')}\n titleText={(\n <>\n \n *\n \n )}\n options={countryCodes}\n itemToElement={renderCountryOption}\n />\n\n \n
    \n
    \n\n \n \n
    \n \n
    \n\n \n \n\n (\n
    \n \n
    \n )}\n >\n \n \n
    \n \n );\n};\n\nfunction renderBuildingTypeOption(option: BuildingType): React.ReactElement {\n return ;\n}\n\nfunction renderUnitOptions(option: AreaUnit): React.ReactElement {\n return ;\n}\n\nfunction renderCountryOption(option: CountryCode | null): React.ReactNode {\n return option ? : null;\n}\n","import './ProjectCreateModal.scss';\nimport { FormController } from '@form-ts/core';\nimport { pipe } from 'fp-ts/function';\nimport React, { useCallback, useState } from 'react';\nimport { useAction } from 'src/hooks/useAction';\nimport { CustomModal } from 'src/modules/common/components/CustomModal';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { validate } from 'src/modules/form/utils/validate';\nimport { PROJECT_NEW_CREATE } from 'src/modules/project-new/actions/ProjectNewActions';\nimport { DEFAULT_BASIC_FORM_DATA, DEFAULT_BUILDING_FORM_DATA } from 'src/modules/project-new/constants/formData';\nimport { BASIC_SCHEMA, BUILDING_SCHEMA } from 'src/modules/project-new/constants/schema';\nimport { BasicFormData } from 'src/modules/project-new/types/BasicFormData';\nimport { BuildingFormData } from 'src/modules/project-new/types/BuildingFormData';\nimport { BasicInfoFormModal } from 'src/modules/project-new/views/BasicInfoFormModal';\nimport { BuildingInfoFormModal } from 'src/modules/project-new/views/BuildingInfoFormModal';\n\ntype Props = {\n readonly openCreationDialog: boolean;\n readonly onCancel: () => void;\n};\n\nexport const ProjectCreateModal = ({ openCreationDialog, onCancel }: Props): React.ReactElement => {\n const [step, setStep] = useState<1 | 2>(1);\n\n const [basicInfoValues, setBasicInfoValues] = useState(DEFAULT_BASIC_FORM_DATA);\n const [buildingInfoValues, setBuildingInfoValues] = useState(DEFAULT_BUILDING_FORM_DATA);\n\n const saveForm = useAction(PROJECT_NEW_CREATE.request);\n\n const handleNext = useCallback((form: FormController): void => {\n const values = form.values.get(form.currentState);\n const errors = validate(values, BASIC_SCHEMA);\n\n if (Object.keys(errors).length !== 0) {\n form.change(\n pipe(\n form.currentState,\n form.errors.set(errors),\n form.submitted.set(true),\n form.submitting.set(false),\n ),\n );\n return;\n }\n\n setBasicInfoValues(values);\n setStep(2);\n }, []);\n\n const handleBack = useCallback((form: FormController): void => {\n const values = form.values.get(form.currentState);\n\n setBuildingInfoValues(values);\n setStep(1);\n }, []);\n\n const handleSubmit = useCallback((form: FormController): void => {\n const values = form.values.get(form.currentState);\n const errors = validate(values, BUILDING_SCHEMA);\n\n if (Object.keys(errors).length !== 0) {\n form.change(\n pipe(\n form.currentState,\n form.errors.set(errors),\n form.submitted.set(true),\n form.submitting.set(false),\n ),\n );\n return;\n }\n\n saveForm({\n stepOne: basicInfoValues,\n stepTwo: form,\n });\n }, [saveForm, basicInfoValues]);\n\n return (\n \n {step === 1\n ? (\n \n )\n : (\n \n )}\n \n );\n};\n","import { Project } from 'src/modules/common/types/Project';\nimport { SyncMode } from 'src/modules/common/types/SyncMode';\nimport { createActions } from 'src/utils/createActions';\nimport { createTrigger } from 'src/utils/createTrigger';\n\nexport const PROJECT_SYNC_RESET = createTrigger('PROJECT_SYNC_RESET');\nexport const PROJECT_SYNC_PERFORM = createActions('PROJECT_SYNC_PERFORM');\n","import { Action } from 'redux';\nimport { FUTURE } from 'src/modules/common/types/Future';\nimport { PROJECT_SYNC_PERFORM } from 'src/modules/project-sync/actions/ProjectSyncActions';\nimport { ProjectSyncState } from 'src/modules/project-sync/types/ProjectSyncState';\n\nexport function projectSyncPerformReducer(state: ProjectSyncState, action: Action): ProjectSyncState {\n if (PROJECT_SYNC_PERFORM.isRequest(action)) {\n return {\n ...state,\n data: {\n project: action.meta,\n status: FUTURE.pending(),\n },\n };\n }\n if (PROJECT_SYNC_PERFORM.isPending(action)) {\n return {\n ...state,\n data: {\n project: action.meta,\n status: FUTURE.pending(),\n },\n };\n }\n if (PROJECT_SYNC_PERFORM.isSuccess(action)) {\n return {\n ...state,\n data: {\n project: action.data,\n status: FUTURE.success(undefined),\n },\n };\n }\n if (PROJECT_SYNC_PERFORM.isFailure(action)) {\n return {\n ...state,\n data: {\n project: action.meta,\n status: FUTURE.failure(action.data),\n },\n };\n }\n\n return state;\n}\n","import { projectSyncPerformReducer } from 'src/modules/project-sync/reducers/projectSyncPerformReducer';\nimport { projectSyncResetReducer } from 'src/modules/project-sync/reducers/projectSyncResetReducer';\nimport { ProjectSyncState } from 'src/modules/project-sync/types/ProjectSyncState';\nimport { chainReducers } from 'src/utils/chainReducers';\n\nconst defaultState: ProjectSyncState = {\n data: null,\n};\n\nexport const projectSyncReducer = chainReducers(defaultState, [\n projectSyncResetReducer,\n projectSyncPerformReducer,\n]);\n","import { Action } from 'redux';\nimport { PROJECT_SYNC_RESET } from 'src/modules/project-sync/actions/ProjectSyncActions';\nimport { ProjectSyncState } from 'src/modules/project-sync/types/ProjectSyncState';\n\nexport function projectSyncResetReducer(state: ProjectSyncState, action: Action): ProjectSyncState {\n if (PROJECT_SYNC_RESET.is(action)) {\n return {\n ...state,\n data: null,\n };\n }\n\n return state;\n}\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { updateProject } from 'src/modules/common/sagas/utils/updateProject';\nimport { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { PROJECT_SYNC_PERFORM } from 'src/modules/project-sync/actions/ProjectSyncActions';\nimport { PROJECT_VIEW_REPLACE } from 'src/modules/project-view/actions/ProjectViewActions';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, delay, put } from 'typed-redux-saga';\n\nexport function* projectSyncPerformSaga(\n action: GetRequestActionType,\n): SagaIterator {\n const mode = action.data;\n const project = action.meta;\n\n try {\n // optimistically update with the new version\n yield* put(PROJECT_VIEW_REPLACE.trigger(project));\n\n yield* call(logDebug, `Synchronizing project in ${mode}...`, project);\n yield* put(PROJECT_SYNC_PERFORM.pending(project));\n if (mode === 'background') {\n yield* delay(1_000);\n }\n\n const reloaded = yield* call(updateProject, project.id, project.data);\n\n // update with the reloaded version\n yield* put(PROJECT_VIEW_REPLACE.trigger(reloaded));\n\n yield* call(logDebug, `Synchronizing project in ${mode}... done`, reloaded);\n yield* put(PROJECT_SYNC_PERFORM.success(reloaded, project));\n\n yield* call(scheduleUpdateLatestActivity);\n yield* call(scheduleUpdateFeedbackCounter);\n } catch (error) {\n yield* call(logError, `Synchronizing project in ${mode}... error`, error);\n yield* put(PROJECT_SYNC_PERFORM.failure(NativeError.wrap(error), project));\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { PROJECT_SYNC_PERFORM, PROJECT_SYNC_RESET } from 'src/modules/project-sync/actions/ProjectSyncActions';\nimport { projectSyncPerformSaga } from 'src/modules/project-sync/sagas/projectSyncPerformSaga';\nimport { cancel, take, takeLatest } from 'typed-redux-saga';\n\nexport function* projectSyncSaga(): SagaIterator {\n while (true) {\n const task = yield* takeLatest(PROJECT_SYNC_PERFORM.isRequest, projectSyncPerformSaga);\n\n yield* take(PROJECT_SYNC_RESET.is);\n yield* cancel(task);\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { Project } from 'src/modules/common/types/Project';\nimport { syncProjectForeground } from 'src/modules/project-sync/sagas/utils/syncProjectForeground';\nimport { waitProjectSynchronization } from 'src/modules/project-sync/sagas/utils/waitProjectSynchronization';\nimport { getProjectSyncData } from 'src/modules/project-sync/selectors/getProjectSyncData';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* forceProjectSynchronization(project: Project): SagaIterator {\n // if synchronization is scheduled, new foreground task is triggered\n // to cancel all existing processes and to skip the planned delay\n const syncData = yield* select(getProjectSyncData);\n return syncData?.status.state === 'pending'\n ? yield* call(syncProjectForeground, project)\n : yield* call(waitProjectSynchronization, project);\n}\n","import { SagaIterator } from 'redux-saga';\nimport { call as callEffect, take as takeEffect } from 'redux-saga/effects';\nimport { CancelledError } from 'src/errors/CancelledError';\nimport { Project } from 'src/modules/common/types/Project';\nimport { PROJECT_SYNC_PERFORM } from 'src/modules/project-sync/actions/ProjectSyncActions';\nimport { waitProjectSynchronization } from 'src/modules/project-sync/sagas/utils/waitProjectSynchronization';\nimport { cancel, put, race } from 'typed-redux-saga';\n\nexport function* syncProjectBackground(project: Project): SagaIterator {\n yield* put(PROJECT_SYNC_PERFORM.request('background', project));\n\n const { synchronized } = yield* race({\n synchronized: callEffect(waitProjectSynchronization, project),\n cancelled: takeEffect(PROJECT_SYNC_PERFORM.isRequest),\n });\n if (synchronized) {\n return synchronized;\n }\n\n yield* cancel();\n throw new CancelledError('Explicit abort of control flow');\n}\n","import { SagaIterator } from 'redux-saga';\nimport { Project } from 'src/modules/common/types/Project';\nimport { PROJECT_SYNC_PERFORM } from 'src/modules/project-sync/actions/ProjectSyncActions';\nimport { waitProjectSynchronization } from 'src/modules/project-sync/sagas/utils/waitProjectSynchronization';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* syncProjectForeground(project: Project): SagaIterator {\n yield* put(PROJECT_SYNC_PERFORM.request('foreground', project));\n return yield* call(waitProjectSynchronization, project);\n}\n","import { SagaIterator } from 'redux-saga';\nimport { Project } from 'src/modules/common/types/Project';\nimport { PROJECT_SYNC_PERFORM } from 'src/modules/project-sync/actions/ProjectSyncActions';\nimport { getProjectSyncData } from 'src/modules/project-sync/selectors/getProjectSyncData';\nimport { call, select, take } from 'typed-redux-saga';\n\nexport function* waitProjectSynchronization(project: Project): SagaIterator {\n const saving = yield* select(getProjectSyncData);\n if (saving === null) {\n return project;\n }\n if (saving.status.state === 'success') {\n return saving.project;\n }\n if (saving.status.state === 'failure') {\n throw saving.status.error;\n }\n\n yield* take([PROJECT_SYNC_PERFORM.isSuccess, PROJECT_SYNC_PERFORM.isFailure]);\n return yield* call(waitProjectSynchronization, project);\n}\n","import { createSelector } from 'reselect';\nimport { getProjectSyncState } from 'src/modules/project-sync/selectors/getProjectSyncState';\n\nexport const getProjectSyncData = createSelector([\n getProjectSyncState,\n], (state) => state.data);\n","import { ProjectSyncState } from 'src/modules/project-sync/types/ProjectSyncState';\nimport { RootState } from 'src/types/RootState';\n\nexport function getProjectSyncState(state: RootState): ProjectSyncState {\n return state.projectSync;\n}\n","import { Uuid } from '@belimo-retrofit-portal/logic';\nimport { Project } from 'src/modules/common/types/Project';\nimport { ProjectViewData } from 'src/modules/project-view/types/ProjectViewData';\nimport { createTrigger } from 'src/utils/createTrigger';\n\nexport const PROJECT_VIEW_FETCH = createTrigger('PROJECT_VIEW_FETCH');\nexport const PROJECT_VIEW_RESET = createTrigger('PROJECT_VIEW_RESET');\nexport const PROJECT_VIEW_REPLACE = createTrigger('PROJECT_VIEW_REPLACE');\nexport const PROJECT_VIEW_SHARE = createTrigger('PROJECT_VIEW_SHARE');\n","import { pipe } from 'fp-ts/function';\nimport * as O from 'monocle-ts/Optional';\nimport { Action } from 'redux';\nimport {\n PROJECT_VIEW_FETCH,\n PROJECT_VIEW_RESET,\n PROJECT_VIEW_REPLACE,\n} from 'src/modules/project-view/actions/ProjectViewActions';\nimport { ProjectViewState } from 'src/modules/project-view/types/ProjectViewState';\n\nexport function projectViewDataReducer(state: ProjectViewState, action: Action): ProjectViewState {\n if (PROJECT_VIEW_FETCH.is(action)) {\n return {\n ...state,\n data: action.data,\n };\n }\n if (PROJECT_VIEW_RESET.is(action)) {\n return pipe(\n O.id(),\n O.prop('data'),\n O.filter((current) => current?.project.id === action.meta),\n O.modify(() => null),\n )(state);\n }\n if (PROJECT_VIEW_REPLACE.is(action)) {\n return pipe(\n O.id(),\n O.prop('data'),\n O.fromNullable,\n O.prop('project'),\n O.filter((current) => current.id === action.data.id),\n O.modify(() => action.data),\n )(state);\n }\n\n return state;\n}\n","import { projectViewDataReducer } from 'src/modules/project-view/reducers/projectViewDataReducer';\nimport { ProjectViewState } from 'src/modules/project-view/types/ProjectViewState';\nimport { chainReducers } from 'src/utils/chainReducers';\n\nconst defaultState: ProjectViewState = {\n data: null,\n};\n\nexport const projectViewReducer = chainReducers(defaultState, [\n projectViewDataReducer,\n]);\n","import { SagaIterator } from 'redux-saga';\nimport { PROJECT_VIEW_RESET, PROJECT_VIEW_SHARE } from 'src/modules/project-view/actions/ProjectViewActions';\nimport { projectViewShareSaga } from 'src/modules/project-view/sagas/projectViewShareSaga';\nimport { cancelSagaOn } from 'src/utils/cancelSagaOn';\nimport { takeLatest } from 'typed-redux-saga';\n\nexport function* projectViewSaga(): SagaIterator {\n yield* takeLatest(PROJECT_VIEW_SHARE.is, cancelSagaOn(projectViewShareSaga, [\n PROJECT_VIEW_RESET.is,\n ]));\n}\n","import { replace } from 'connected-react-router';\nimport { SagaIterator } from 'redux-saga';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { PROJECT_SYNC_RESET } from 'src/modules/project-sync/actions/ProjectSyncActions';\nimport { PROJECT_VIEW_SHARE } from 'src/modules/project-view/actions/ProjectViewActions';\nimport { navigate } from 'src/modules/routing/utils/navigate';\nimport {\n SHARE_PROJECT_CLOSE,\n SHARE_PROJECT_OPEN,\n SHARE_PROJECT_REMOVE_SUBMIT,\n} from 'src/modules/sharing-projects/actions/ShareProjectActions';\nimport { GetTriggerActionType } from 'src/utils/createTrigger';\nimport { call, put, select, take } from 'typed-redux-saga';\n\nexport function* projectViewShareSaga(\n action: GetTriggerActionType,\n): SagaIterator {\n const project = action.data;\n const loggedInUser = yield* select(getLoggedInUser);\n\n yield* put(SHARE_PROJECT_OPEN.trigger(project));\n const trigger = yield* take([SHARE_PROJECT_REMOVE_SUBMIT.isSuccess, SHARE_PROJECT_CLOSE.is]);\n if (SHARE_PROJECT_CLOSE.is(trigger)) {\n // the Share Project modal was closed\n // there is no need to do anything\n return;\n }\n\n const hasAccess = (\n project.owner?.id === loggedInUser.id ||\n trigger.data.some((it) => it.id === loggedInUser.id)\n );\n if (hasAccess) {\n // we still have access to the project\n // there is no need to do anything\n return;\n }\n\n // the project is not accessible for us anymore\n // we need to close the modal immediately\n yield* put(SHARE_PROJECT_CLOSE.trigger());\n\n // abort project synchronization\n yield* put(PROJECT_SYNC_RESET.trigger());\n\n // and redirect to the project list\n yield* call(navigate, replace({ pathname: '/projects' }));\n}\n","import { createSelector } from 'reselect';\nimport { getProjectViewData } from 'src/modules/project-view/selectors/getProjectViewData';\n\nexport const getProjectDetails = createSelector([\n getProjectViewData,\n], (data) => data.project);\n","import { createSelector } from 'reselect';\nimport { getProjectViewState } from 'src/modules/project-view/selectors/getProjectViewState';\nimport { assertNotNull } from 'src/utils/assert';\n\nexport const getProjectViewData = createSelector([\n getProjectViewState,\n], (state) => assertNotNull(\n state.data,\n 'Project details should be fetched first',\n { state },\n));\n","import { ProjectViewState } from 'src/modules/project-view/types/ProjectViewState';\nimport { RootState } from 'src/types/RootState';\n\nexport function getProjectViewState(state: RootState): ProjectViewState {\n return state.projectView;\n}\n","import { ReportFormData } from 'src/modules/report/types/ReportFormData';\nimport { createActions } from 'src/utils/createActions';\nimport { createTrigger } from 'src/utils/createTrigger';\n\nexport const REPORT_RESET = createTrigger('REPORT_RESET');\nexport const REPORT_CHANGE = createTrigger('REPORT_GENERATE');\nexport const REPORT_GENERATE = createActions('REPORT_GENERATE');\n","import { FormRule } from 'src/modules/form/types/FormRule';\nimport * as R from 'src/modules/form/utils/rules';\nimport { ReportFormData } from 'src/modules/report/types/ReportFormData';\n\nconst REPORT_FORM_SCHEMA_COVER: FormRule = R.struct({\n creationDate: R.nullable(R.date()),\n showBuildingInfo: R.pass(),\n});\n\nexport const REPORT_FORM_SCHEMA: FormRule = R.struct({\n cover: REPORT_FORM_SCHEMA_COVER,\n energy: R.pass(),\n hvac: R.pass(),\n savings: R.pass(),\n schema: R.pass(),\n evaluation: R.pass(),\n});\n","import React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { useParametricSelector } from 'src/hooks/useParametricSelector';\nimport { DocumentLayout } from 'src/modules/common/layouts/DocumentLayout';\nimport { getLanguage } from 'src/modules/config/selectors/getLanguage';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { OutputDocument } from 'src/modules/output/views/OutputDocument';\nimport { getProjectDetails } from 'src/modules/project-view/selectors/getProjectDetails';\nimport { getReportFormData } from 'src/modules/report/selectors/getReportFormData';\nimport { getReportGenerated } from 'src/modules/report/selectors/getReportGenerated';\nimport { ReportDocumentContent } from 'src/modules/report/views/ReportDocumentContent';\n\nexport const ReportDocumentPage = (): React.ReactElement => {\n const intl = useIntl();\n const project = useSelector(getProjectDetails);\n const language = useSelector(getLanguage);\n const document = useParametricSelector(getReportGenerated, project);\n const formData = useParametricSelector(getReportFormData, project);\n const loggedInUser = useSelector(getLoggedInUser);\n\n return (\n <>\n \n \n {intl.formatMessage({ id: 'report/pageTitle' })}\n \n \n\n \n \n \n \n \n \n );\n};\n","import React, { useEffect } from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { useAction } from 'src/hooks/useAction';\nimport { useBoundAction } from 'src/hooks/useBoundAction';\nimport { useParametricSelector } from 'src/hooks/useParametricSelector';\nimport { ProjectToolbar } from 'src/modules/common/components/ProjectToolbar';\nimport { AppLayout } from 'src/modules/common/layouts/AppLayout';\nimport { getLanguage } from 'src/modules/config/selectors/getLanguage';\nimport { UPDATE_USER_SETTINGS } from 'src/modules/login/actions/UserSettingsActions';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { PROJECT_VIEW_SHARE } from 'src/modules/project-view/actions/ProjectViewActions';\nimport { getProjectDetails } from 'src/modules/project-view/selectors/getProjectDetails';\nimport { REPORT_RESET } from 'src/modules/report/actions/ReportActions';\nimport { getReportFormData } from 'src/modules/report/selectors/getReportFormData';\nimport { getReportGenerated } from 'src/modules/report/selectors/getReportGenerated';\nimport { getReportLoading } from 'src/modules/report/selectors/getReportLoading';\nimport { ReportFormView } from 'src/modules/report/views/ReportFormView';\nimport { ShareProject } from 'src/modules/sharing-projects/containers/ShareProject';\n\nexport const ReportPage = (): React.ReactElement => {\n const intl = useIntl();\n const project = useSelector(getProjectDetails);\n const language = useSelector(getLanguage);\n const document = useParametricSelector(getReportGenerated, project);\n const formData = useParametricSelector(getReportFormData, project);\n const loading = useSelector(getReportLoading);\n const loggedInUser = useSelector(getLoggedInUser);\n\n const resetState = useAction(REPORT_RESET.trigger);\n const updateUserSettings = useAction(UPDATE_USER_SETTINGS.trigger);\n\n useEffect(() => () => resetState(), [resetState, project.id]);\n\n const shareProject = useBoundAction(PROJECT_VIEW_SHARE.trigger, project);\n\n return (\n <>\n \n \n {intl.formatMessage({ id: 'report/pageTitle' })}\n \n \n\n \n \n \n \n\n \n \n );\n};\n","import { Action } from 'redux';\nimport { FUTURE } from 'src/modules/common/types/Future';\nimport { REPORT_GENERATE } from 'src/modules/report/actions/ReportActions';\nimport { ReportState } from 'src/modules/report/types/ReportState';\n\nexport function reportGenerateReducer(state: ReportState, action: Action): ReportState {\n if (REPORT_GENERATE.isPending(action)) {\n return { status: FUTURE.pending() };\n }\n if (REPORT_GENERATE.isSuccess(action)) {\n return { status: FUTURE.success(undefined) };\n }\n if (REPORT_GENERATE.isFailure(action)) {\n return { status: FUTURE.failure(action.data) };\n }\n\n return state;\n}\n","import { reportGenerateReducer } from 'src/modules/report/reducers/reportGenerateReducer';\nimport { reportResetReducer } from 'src/modules/report/reducers/reportResetReducer';\nimport { ReportState } from 'src/modules/report/types/ReportState';\nimport { chainReducers } from 'src/utils/chainReducers';\n\nconst defaultState: ReportState = {\n status: null,\n};\n\nexport const reportReducer = chainReducers(defaultState, [\n reportResetReducer,\n reportGenerateReducer,\n]);\n","import { Action } from 'redux';\nimport { REPORT_RESET } from 'src/modules/report/actions/ReportActions';\nimport { ReportState } from 'src/modules/report/types/ReportState';\n\nexport function reportResetReducer(state: ReportState, action: Action): ReportState {\n if (REPORT_RESET.is(action)) {\n return { status: null };\n }\n\n return state;\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { Project } from 'src/modules/common/types/Project';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { syncProjectBackground } from 'src/modules/project-sync/sagas/utils/syncProjectBackground';\nimport { getProjectDetails } from 'src/modules/project-view/selectors/getProjectDetails';\nimport { REPORT_CHANGE } from 'src/modules/report/actions/ReportActions';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetTriggerActionType } from 'src/utils/createTrigger';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* reportChangeSaga(\n action: GetTriggerActionType,\n): SagaIterator {\n const formData = action.data;\n\n try {\n yield* call(logDebug, 'Saving report data...', formData);\n\n const previous = yield* select(getProjectDetails);\n const modified: Project = {\n ...previous,\n data: {\n ...previous.data,\n report: formData,\n },\n };\n\n const reloaded = yield* call(syncProjectBackground, modified);\n yield* call(logDebug, 'Saving report data... done', reloaded);\n } catch (error) {\n const wrapped = new RuntimeError('Could not save report data', { formData }, NativeError.wrap(error));\n yield* call(logError, 'Saving report data... error', error);\n\n yield* call(sentryCatch, wrapped);\n yield* call(showNotification, { variant: 'error', type: 'error' });\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { saveAs } from 'file-saver';\nimport { SagaIterator } from 'redux-saga';\nimport { Project } from 'src/modules/common/types/Project';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { syncProjectForeground } from 'src/modules/project-sync/sagas/utils/syncProjectForeground';\nimport { getProjectDetails } from 'src/modules/project-view/selectors/getProjectDetails';\nimport { REPORT_GENERATE } from 'src/modules/report/actions/ReportActions';\nimport { buildReportDocument } from 'src/modules/report/sagas/utils/buildReportDocument';\nimport { getReportGenerated } from 'src/modules/report/selectors/getReportGenerated';\nimport { getReportDocumentFilename } from 'src/modules/report/utils/getReportDocumentFilename';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, put, select } from 'typed-redux-saga';\n\nexport function* reportGenerateSaga(\n action: GetRequestActionType,\n): SagaIterator {\n const formData = action.data;\n\n try {\n yield* put(REPORT_GENERATE.pending());\n yield* call(logDebug, 'Generating report document...', formData);\n\n const previous = yield* select(getProjectDetails);\n const modified: Project = {\n ...previous,\n data: {\n ...previous.data,\n report: formData,\n },\n };\n\n const reloaded = yield* call(syncProjectForeground, modified);\n const document = yield* select(getReportGenerated, reloaded);\n\n const fileData = yield* call(\n buildReportDocument,\n document,\n formData,\n modified,\n );\n const fileName = yield* call(\n getReportDocumentFilename,\n document,\n );\n\n yield* call(\n saveAs,\n fileData,\n `${fileName}.pdf`,\n );\n\n yield* call(logDebug, 'Generating report document... done', document);\n yield* put(REPORT_GENERATE.success());\n\n yield* call(scheduleUpdateLatestActivity);\n yield* call(scheduleUpdateFeedbackCounter);\n } catch (error) {\n const wrapped = new RuntimeError('Could not generate report document', { formData }, NativeError.wrap(error));\n yield* call(logError, 'Generating report document... error', error);\n yield* put(REPORT_GENERATE.failure(wrapped));\n\n yield* call(sentryCatch, wrapped);\n yield* call(showNotification, { variant: 'error', type: 'error' });\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { REPORT_CHANGE, REPORT_GENERATE } from 'src/modules/report/actions/ReportActions';\nimport { reportChangeSaga } from 'src/modules/report/sagas/reportChangeSaga';\nimport { reportGenerateSaga } from 'src/modules/report/sagas/reportGenerateSaga';\nimport { takeLatest } from 'typed-redux-saga';\n\nexport function* reportSaga(): SagaIterator {\n yield* takeLatest(REPORT_CHANGE.is, reportChangeSaga);\n yield* takeLatest(REPORT_GENERATE.isRequest, reportGenerateSaga);\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { TolgeeProvider } from '@tolgee/react';\nimport React from 'react';\nimport { Provider } from 'react-redux';\nimport { SagaIterator } from 'redux-saga';\nimport { call as callEffect, delay as delayEffect } from 'redux-saga/effects';\nimport { Project } from 'src/modules/common/types/Project';\nimport { getLanguage } from 'src/modules/config/selectors/getLanguage';\nimport { getTolgeeInstance } from 'src/modules/config/selectors/getTolgeeInstance';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { OutputDocument } from 'src/modules/output/views/OutputDocument';\nimport { waitReportDocument } from 'src/modules/report/sagas/utils/waitReportDocument';\nimport { getReportFakeStore } from 'src/modules/report/selectors/getReportFakeStore';\nimport { ReportFormData } from 'src/modules/report/types/ReportFormData';\nimport { ReportGenerated } from 'src/modules/report/types/ReportGenerated';\nimport { createShadowHost } from 'src/modules/report/utils/createShadowHost';\nimport { renderComponent } from 'src/modules/report/utils/renderComponent';\nimport { ReportDocumentContent } from 'src/modules/report/views/ReportDocumentContent';\nimport { htmlToPdf } from 'src/sagas/utils/htmlToPdf';\nimport { call, race, select } from 'typed-redux-saga';\n\nexport function* buildReportDocument(\n document: ReportGenerated,\n formData: ReportFormData,\n project: Project,\n): SagaIterator {\n const host = yield* call(createShadowHost);\n\n try {\n const language = yield* select(getLanguage);\n const store = yield* select(getReportFakeStore);\n const tolgee = yield* select(getTolgeeInstance);\n const loggedInUser = yield* select(getLoggedInUser);\n\n const content = (\n \n \n \n \n \n \n \n );\n\n yield* call(renderComponent, host, content);\n const { timeout } = yield* race({\n timeout: delayEffect(5_000),\n complete: callEffect(waitReportDocument, host),\n });\n if (timeout) {\n throw new RuntimeError('Timeout exceeded for document readiness');\n }\n\n const pages = Array.from(host.element.querySelectorAll('.bp-output-page'));\n return yield* call(htmlToPdf, pages);\n } catch (error) {\n throw new RuntimeError('Could not build report PDF document', {}, NativeError.wrap(error));\n } finally {\n yield* call(host.destroy);\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { ShadowHost } from 'src/modules/report/types/ShadowHost';\nimport { call, delay } from 'typed-redux-saga';\n\nexport function* waitReportDocument(host: ShadowHost): SagaIterator {\n do {\n if (\n (yield* call(checkImageState, host.element)) &&\n (yield* call(checkReadyState, host.element))\n ) {\n return;\n }\n\n yield* call(delay, 50);\n } while (true);\n}\n\nfunction checkImageState(element: Element): boolean {\n return Array.from(element.querySelectorAll('img')).every((it) => it.complete);\n}\n\nfunction checkReadyState(element: Element): boolean {\n return Array.from(element.querySelectorAll('[data-ready]')).every((it) => {\n const value = it.getAttribute('data-ready');\n return value === null || value === 'true';\n });\n}\n","import { createSelector } from 'reselect';\nimport { ProjectReportCoverContactsEnum } from 'src/modules/common/types/ProjectReportCoverContacts';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\n\nexport const getCoverContactsOptions = createSelector([\n getLoggedInUser,\n], (user) => (user.organization.useOrganizationContacts ? [\n ProjectReportCoverContactsEnum.ORGANIZATION,\n ProjectReportCoverContactsEnum.OFFICE,\n] : [\n ProjectReportCoverContactsEnum.OFFICE,\n]));\n","import { createSelector } from 'reselect';\nimport { getProjectLazy } from 'src/modules/common/selectors/getProjectLazy';\n\nexport const getReportCurrency = createSelector([\n getProjectLazy,\n], (project) => project.data.currency);\n","import { createStore, Store } from 'redux';\nimport { RootState } from 'src/types/RootState';\n\nexport function getReportFakeStore(state: RootState): Store {\n return createStore(() => state);\n}\n","import dayjs from 'dayjs';\nimport { createSelector } from 'reselect';\nimport { getProjectLazy } from 'src/modules/common/selectors/getProjectLazy';\nimport { getCurrentDate } from 'src/modules/config/selectors/getCurrentDate';\nimport { ReportFormData } from 'src/modules/report/types/ReportFormData';\n\nexport const getReportFormData = createSelector([\n getProjectLazy,\n getCurrentDate,\n], (project, currentDate): ReportFormData => (\n {\n ...project.data.report,\n cover: {\n ...project.data.report.cover,\n creationDate: project.data.report.cover.creationDate || dayjs(currentDate).startOf('day').toDate(),\n },\n energy: project.data.report.energy,\n hvac: project.data.report.hvac,\n schema: project.data.report.schema,\n }\n));\n","import { createSelector } from 'reselect';\nimport { getReportGeneratedCover } from 'src/modules/report/selectors/getReportGeneratedCover';\nimport { getReportGeneratedEnergy } from 'src/modules/report/selectors/getReportGeneratedEnergy';\nimport { getReportGeneratedEvaluation } from 'src/modules/report/selectors/getReportGeneratedEvaluation';\nimport { getReportGeneratedHvac } from 'src/modules/report/selectors/getReportGeneratedHvac';\nimport { getReportGeneratedSavings } from 'src/modules/report/selectors/getReportGeneratedSavings';\nimport { getReportGeneratedSchema } from 'src/modules/report/selectors/getReportGeneratedSchema';\nimport { ReportGenerated } from 'src/modules/report/types/ReportGenerated';\n\nexport const getReportGenerated = createSelector([\n getReportGeneratedCover,\n getReportGeneratedEnergy,\n getReportGeneratedHvac,\n getReportGeneratedSavings,\n getReportGeneratedEvaluation,\n getReportGeneratedSchema,\n], (cover, energy, hvac, savings, evaluation, schema): ReportGenerated => ({\n cover,\n energy,\n hvac,\n savings,\n evaluation,\n schema,\n}));\n","import { createSelector } from 'reselect';\nimport { getProjectLazy } from 'src/modules/common/selectors/getProjectLazy';\nimport { ProjectReportCoverContactsEnum } from 'src/modules/common/types/ProjectReportCoverContacts';\nimport { getCurrentDate } from 'src/modules/config/selectors/getCurrentDate';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { getReportFormData } from 'src/modules/report/selectors/getReportFormData';\nimport { ReportGeneratedCover } from 'src/modules/report/types/ReportGenerated';\n\nexport const getReportGeneratedCover = createSelector([\n getProjectLazy,\n getReportFormData,\n getCurrentDate,\n getLoggedInUser,\n], (project, report, currentDate, loggedInUser): ReportGeneratedCover => {\n const orgInfo = !loggedInUser.organization.useOrganizationContacts ||\n loggedInUser.settings.report.coverContacts === ProjectReportCoverContactsEnum.OFFICE\n ? loggedInUser.organization.office\n : loggedInUser.organization;\n\n return {\n title: project.data.title,\n goals: project.data.goals,\n image: project.data.cover,\n logo: loggedInUser.organization.logo,\n building: project.data.building,\n email: project.owner?.email ?? '',\n author: project.data.participants.author,\n reportDate: report.cover.creationDate ?? currentDate,\n organization: orgInfo.name,\n address: orgInfo.address,\n contact: orgInfo.contact,\n };\n});\n","import { HvacArea } from '@belimo-retrofit-portal/logic';\nimport { createSelector } from 'reselect';\nimport { getHvacAssesmentFormData } from 'src/modules/hvac/selectors/getHvacAssesmentFormData';\nimport { getHvacResults } from 'src/modules/hvac/selectors/getHvacResults';\nimport { getReportCurrency } from 'src/modules/report/selectors/getReportCurrency';\nimport { ReportGeneratedEnergy, ReportGeneratedEnergyAreaDetails } from 'src/modules/report/types/ReportGenerated';\n\nexport const getReportGeneratedEnergy = createSelector([\n getReportCurrency,\n getHvacAssesmentFormData,\n getHvacResults,\n], (currency, hvacForm, results): ReportGeneratedEnergy => {\n return {\n comment: hvacForm.comment,\n currency: currency,\n\n areas: {\n [HvacArea.HEATING]: {\n thermal: mapThermalArea(HvacArea.HEATING),\n electrical: mapElectricalArea(HvacArea.HEATING),\n },\n [HvacArea.COOLING]: {\n thermal: mapThermalArea(HvacArea.COOLING),\n electrical: mapElectricalArea(HvacArea.COOLING),\n },\n [HvacArea.VENTILATION]: {\n thermal: mapThermalArea(HvacArea.VENTILATION),\n electrical: mapElectricalArea(HvacArea.VENTILATION),\n },\n },\n };\n\n function mapThermalArea(area: HvacArea): ReportGeneratedEnergyAreaDetails {\n return {\n source: hvacForm[area].thermal.energySource,\n annualConsumption: hvacForm[area].thermal.annualEnergyUse,\n\n carbonEmission: results.perArea[area].carbonEmission.thermal,\n totalCosts: results.perArea[area].energyCosts.thermal,\n };\n }\n\n function mapElectricalArea(area: HvacArea): ReportGeneratedEnergyAreaDetails {\n return {\n source: hvacForm[area].electrical.energySource,\n annualConsumption: hvacForm[area].electrical.annualEnergyUse,\n\n carbonEmission: results.perArea[area].carbonEmission.electrical,\n totalCosts: results.perArea[area].energyCosts.electrical,\n };\n }\n});\n","import { createSelector } from 'reselect';\nimport { getEvaluationFormData } from 'src/modules/evaluation/selectors/getEvaluationFormData';\nimport { getEvaluationResults } from 'src/modules/evaluation/selectors/getEvaluationResults';\nimport { getReportCurrency } from 'src/modules/report/selectors/getReportCurrency';\nimport { ReportGeneratedEvaluation } from 'src/modules/report/types/ReportGenerated';\n\nexport const getReportGeneratedEvaluation = createSelector([\n getReportCurrency,\n getEvaluationFormData,\n getEvaluationResults,\n], (currency, inputs, results): ReportGeneratedEvaluation => ({\n currency,\n inputs,\n results,\n}));\n","import { createSelector } from 'reselect';\nimport { getHvacAssesmentFormData } from 'src/modules/hvac/selectors/getHvacAssesmentFormData';\nimport { HvacFormSectionData, HvacFormVariantData } from 'src/modules/hvac/types/HvacFormData';\nimport { ReportGeneratedHvac, ReportGeneratedHvacSection } from 'src/modules/report/types/ReportGenerated';\n\nexport const getReportGeneratedHvac = createSelector([\n getHvacAssesmentFormData,\n], (hvacFormData): ReportGeneratedHvac => ({\n heating: hvacFormData.heating.sections\n .filter((section) => section.enabled)\n .map(mapSection),\n cooling: hvacFormData.cooling.sections\n .filter((section) => section.enabled)\n .map(mapSection),\n ventilation: hvacFormData.ventilation.sections\n .filter((section) => section.enabled)\n .map(mapSection),\n}));\n\nfunction mapSection(section: HvacFormSectionData): ReportGeneratedHvacSection {\n return {\n title: section.title,\n config: section.config,\n actual: {\n rating: section.answer.actual.option?.class ?? null,\n title: section.answer.actual.option?.title ?? null,\n explanation: section.answer.actual.option?.explanation ?? null,\n comment: getComment(section.answer.actual),\n },\n future: {\n rating: section.answer.future.option?.class ?? null,\n title: section.answer.future.option?.title ?? null,\n explanation: section.answer.future.option?.explanation ?? null,\n comment: getComment(section.answer.future),\n },\n copies: section.copies.map((copy, copyIndex) => ({\n id: `${section.config.id}-${copyIndex}`,\n name: copy.title,\n actual: {\n rating: copy.answer.actual.option?.class ?? null,\n title: copy.answer.actual.option?.title ?? null,\n explanation: copy.answer.actual.option?.explanation ?? null,\n comment: getComment(copy.answer.actual),\n },\n future: {\n rating: copy.answer.future.option?.class ?? null,\n title: copy.answer.future.option?.title ?? null,\n explanation: copy.answer.future.option?.explanation ?? null,\n comment: getComment(copy.answer.future),\n },\n })),\n };\n}\n\nfunction getComment(answer: HvacFormVariantData): string {\n const value = answer.additionals.find((it) => it.config.id === 'comment')?.value;\n return typeof value === 'string' ? value : '';\n}\n","import { createSelector } from 'reselect';\nimport { getHvacResultsOverallRating } from 'src/modules/hvac/selectors/getHvacResultsOverallRating';\nimport {\n getReportGeneratedSavingsAnnualSavings,\n} from 'src/modules/report/selectors/getReportGeneratedSavingsAnnualSavings';\nimport {\n getReportGeneratedSavingsRatingPerArea,\n} from 'src/modules/report/selectors/getReportGeneratedSavingsRatingPerArea';\nimport { ReportGeneratedSavings } from 'src/modules/report/types/ReportGenerated';\n\nexport const getReportGeneratedSavings = createSelector([\n getHvacResultsOverallRating,\n getReportGeneratedSavingsRatingPerArea,\n getReportGeneratedSavingsAnnualSavings,\n], (ratingOverall, ratingPerArea, annualSavings): ReportGeneratedSavings => ({\n ratingOverall,\n ratingPerArea,\n annualSavings,\n}));\n","import { createSelector } from 'reselect';\nimport { getReportCurrency } from 'src/modules/report/selectors/getReportCurrency';\nimport {\n getReportGeneratedSavingsCarbonEmission,\n} from 'src/modules/report/selectors/getReportGeneratedSavingsCarbonEmission';\nimport {\n getReportGeneratedSavingsEnergyAbsolute,\n} from 'src/modules/report/selectors/getReportGeneratedSavingsEnergyAbsolute';\nimport {\n getReportGeneratedSavingsEnergyRelative,\n} from 'src/modules/report/selectors/getReportGeneratedSavingsEnergyRelative';\nimport { getReportGeneratedSavingsTotalCost } from 'src/modules/report/selectors/getReportGeneratedSavingsTotalCost';\nimport { ReportGeneratedSavingsAnnual } from 'src/modules/report/types/ReportGenerated';\n\nexport const getReportGeneratedSavingsAnnualSavings = createSelector([\n getReportCurrency,\n getReportGeneratedSavingsTotalCost,\n getReportGeneratedSavingsEnergyRelative,\n getReportGeneratedSavingsEnergyAbsolute,\n getReportGeneratedSavingsCarbonEmission,\n], (currency, totalCost, energyRelative, energyAbsolute, carbonEmission): ReportGeneratedSavingsAnnual => ({\n currency,\n totalCost,\n energyRelative,\n energyAbsolute,\n carbonEmission,\n}));\n","import { HvacArea } from '@belimo-retrofit-portal/logic';\nimport { createSelector } from 'reselect';\nimport { getHvacResults } from 'src/modules/hvac/selectors/getHvacResults';\nimport { ReportGeneratedSavingsAnnualValues } from 'src/modules/report/types/ReportGenerated';\n\nexport const getReportGeneratedSavingsCarbonEmission = createSelector([\n getHvacResults,\n], (hvacResults): ReportGeneratedSavingsAnnualValues => ({\n heating: hvacResults.perArea[HvacArea.HEATING].savings.carbon.thermal,\n cooling: hvacResults.perArea[HvacArea.COOLING].savings.carbon.thermal,\n\n total: hvacResults.overall.savings.carbon.overall,\n electricity: hvacResults.overall.savings.carbon.electrical,\n}));\n","import {\n ENERGY_OUTPUT_BY_SOURCE_UNIT,\n HvacArea,\n HvacResultsSavingsEnergy,\n mulDecimals,\n} from '@belimo-retrofit-portal/logic';\nimport { Decimal } from 'decimal.js-light';\nimport { createSelector } from 'reselect';\nimport { getHvacResults } from 'src/modules/hvac/selectors/getHvacResults';\nimport { ReportGeneratedSavingsAnnualValues } from 'src/modules/report/types/ReportGenerated';\n\nexport const getReportGeneratedSavingsEnergyAbsolute = createSelector([\n getHvacResults,\n], (results): ReportGeneratedSavingsAnnualValues => ({\n heating: getEnergySavingsInKWh(results.perArea[HvacArea.HEATING].savings.thermal),\n cooling: getEnergySavingsInKWh(results.perArea[HvacArea.COOLING].savings.thermal),\n\n total: results.overall.savings.overall.absolute,\n electricity: results.overall.savings.electrical.absolute,\n}));\n\nfunction getEnergySavingsInKWh(savings: HvacResultsSavingsEnergy): Decimal | null {\n return mulDecimals(\n savings.absolute,\n ENERGY_OUTPUT_BY_SOURCE_UNIT[savings.source],\n );\n}\n","import { HvacArea } from '@belimo-retrofit-portal/logic';\nimport { createSelector } from 'reselect';\nimport { getHvacResults } from 'src/modules/hvac/selectors/getHvacResults';\nimport { ReportGeneratedSavingsAnnualValues } from 'src/modules/report/types/ReportGenerated';\n\nexport const getReportGeneratedSavingsEnergyRelative = createSelector([\n getHvacResults,\n], (results): ReportGeneratedSavingsAnnualValues => ({\n heating: results.perArea[HvacArea.HEATING].savings.thermal.relative,\n cooling: results.perArea[HvacArea.COOLING].savings.thermal.relative,\n\n total: results.overall.savings.overall.relative,\n electricity: results.overall.savings.electrical.relative,\n}));\n","import { HvacArea } from '@belimo-retrofit-portal/logic';\nimport { ReadonlyRecord } from 'fp-ts/ReadonlyRecord';\nimport { createSelector } from 'reselect';\nimport { getHvacResults } from 'src/modules/hvac/selectors/getHvacResults';\nimport { ReportGeneratedSavingsRating } from 'src/modules/report/types/ReportGenerated';\n\nexport const getReportGeneratedSavingsRatingPerArea = createSelector([\n getHvacResults,\n], (results): ReadonlyRecord => ({\n [HvacArea.HEATING]: results.perArea[HvacArea.HEATING].rating,\n [HvacArea.COOLING]: results.perArea[HvacArea.COOLING].rating,\n [HvacArea.VENTILATION]: results.perArea[HvacArea.VENTILATION].rating,\n}));\n","import { HvacArea } from '@belimo-retrofit-portal/logic';\nimport { createSelector } from 'reselect';\nimport { getHvacResults } from 'src/modules/hvac/selectors/getHvacResults';\nimport { ReportGeneratedSavingsAnnualValues } from 'src/modules/report/types/ReportGenerated';\n\nexport const getReportGeneratedSavingsTotalCost = createSelector([\n getHvacResults,\n], (results): ReportGeneratedSavingsAnnualValues => ({\n heating: results.perArea[HvacArea.HEATING].savings.thermal.annual,\n cooling: results.perArea[HvacArea.COOLING].savings.thermal.annual,\n\n total: results.overall.savings.overall.annual,\n electricity: results.overall.savings.electrical.annual,\n}));\n","import { pipe } from 'fp-ts/function';\nimport { mapWithIndex } from 'fp-ts/ReadonlyRecord';\nimport { createSelector } from 'reselect';\nimport { getReportFormData } from 'src/modules/report/selectors/getReportFormData';\nimport { ReportGeneratedSchema } from 'src/modules/report/types/ReportGenerated';\nimport { getSchemaFormData } from 'src/modules/schema/selectors/getSchemaFormData';\n\nexport const getReportGeneratedSchema = createSelector([\n getReportFormData,\n getSchemaFormData,\n], (report, schema): ReportGeneratedSchema => pipe(\n schema,\n mapWithIndex((area, selection) => {\n if (selection === null) {\n return null;\n }\n\n return {\n schema: selection.schema,\n comment: selection.comment,\n actual: selection.actual,\n future: selection.future.find((version) => version.number === report.schema[area].futureVersion) ?? null,\n matrix: selection.matrix,\n };\n }),\n));\n","import { RootState } from 'src/types/RootState';\n\nexport function getReportLoading(state: RootState): boolean {\n return state.report.status?.state === 'pending';\n}\n","import { createRoot } from 'react-dom/client';\nimport { ShadowHost } from 'src/modules/report/types/ShadowHost';\n\nexport function createShadowHost(): ShadowHost {\n const host = document.createElement('div');\n host.style.position = 'fixed';\n host.style.zIndex = '1';\n host.style.top = '0';\n host.style.left = '10000px';\n host.style.width = '0';\n host.style.height = '0';\n host.style.overflow = 'hidden';\n\n document.body.appendChild(host);\n const root = createRoot(host);\n\n return {\n element: host,\n render: (element): void => {\n root.render(element);\n },\n destroy: (): void => {\n root.unmount();\n document.body.removeChild(host);\n },\n };\n}\n","import { ReportGenerated } from 'src/modules/report/types/ReportGenerated';\n\nexport function getReportDocumentFilename(document: ReportGenerated): string {\n return [\n formatDate(document.cover.reportDate),\n document.cover.title,\n ].filter(Boolean).join(' ');\n}\n\nfunction formatDate(date: Date): string {\n const yyyy = date.getFullYear();\n const mm = String(date.getMonth() + 1).padStart(2, '0');\n const dd = String(date.getDate()).padStart(2, '0');\n\n return `${yyyy}${mm}${dd}`;\n}\n","import * as React from 'react';\nimport { Lifecycle } from 'src/modules/common/components/Lifecycle';\nimport { ShadowHost } from 'src/modules/report/types/ShadowHost';\n\nexport async function renderComponent(host: ShadowHost, element: React.ReactElement): Promise {\n await new Promise((resolve, reject) => {\n host.render((\n \n {element}\n \n ));\n });\n}\n","import { SchemaArea } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\nimport { Project } from 'src/modules/common/types/Project';\nimport { UserSettings } from 'src/modules/common/types/UserSettings';\nimport { ReportFormData } from 'src/modules/report/types/ReportFormData';\nimport { ReportGenerated } from 'src/modules/report/types/ReportGenerated';\nimport { ReportDocumentPageCover } from 'src/modules/report/views/document/ReportDocumentPageCover';\nimport { ReportDocumentPageEnergy } from 'src/modules/report/views/document/ReportDocumentPageEnergy';\nimport { ReportDocumentPageEvaluation } from 'src/modules/report/views/document/ReportDocumentPageEvaluation';\nimport { ReportDocumentPageHvac } from 'src/modules/report/views/document/ReportDocumentPageHvac';\nimport { ReportDocumentPageSavings } from 'src/modules/report/views/document/ReportDocumentPageSavings';\nimport { ReportDocumentPageSchema } from 'src/modules/report/views/document/ReportDocumentPageSchema';\nimport { Language } from 'src/types/common/Language';\n\ntype Props = {\n readonly language: Language;\n readonly document: ReportGenerated;\n readonly formData: ReportFormData;\n readonly project: Project;\n readonly userSettings: UserSettings;\n};\n\nexport const ReportDocumentContent = ({\n language,\n document,\n formData,\n project,\n userSettings,\n}: Props): React.ReactElement => (\n <>\n \n\n \n\n \n\n \n\n \n\n {[\n SchemaArea.HEATING,\n SchemaArea.COOLING,\n ].map((area) => (\n \n ))}\n \n);\n","import './ReportFormDocument.scss';\nimport React, { useMemo, useRef } from 'react';\nimport { Project } from 'src/modules/common/types/Project';\nimport { UserSettings } from 'src/modules/common/types/UserSettings';\nimport { OutputDocumentContext, OutputDocumentContextData } from 'src/modules/output/context/OutputDocumentContext';\nimport { OutputPageContext } from 'src/modules/output/context/OutputPageContext';\nimport { OutputDocumentPageInfo } from 'src/modules/output/types/OutputDocumentPageInfo';\nimport { ReportContentPage } from 'src/modules/report/types/ReportContent';\nimport { ReportFormData } from 'src/modules/report/types/ReportFormData';\nimport { ReportGenerated } from 'src/modules/report/types/ReportGenerated';\nimport { ReportDocumentContent } from 'src/modules/report/views/ReportDocumentContent';\nimport { Language } from 'src/types/common/Language';\n\ntype Props = {\n readonly language: Language;\n readonly document: ReportGenerated;\n readonly formData: ReportFormData;\n readonly project: Project;\n readonly onChange: (pages: ReadonlyArray) => void;\n readonly userSettings: UserSettings;\n};\n\nexport const ReportFormDocument = React.memo(({\n language, document, formData, project, onChange, userSettings,\n}: Props): React.ReactElement => {\n const pageContents = useRef(new Map());\n const documentContext = useMemo((): OutputDocumentContextData => ({\n registerPage: (page: OutputDocumentPageInfo): void => {\n pageContents.current = pageContents.current.set(page.id, page);\n\n const content = getReportPages(pageContents.current);\n onChange(content);\n },\n unregisterPage: (id: string): void => {\n pageContents.current.delete(id);\n\n const content = getReportPages(pageContents.current);\n onChange(content);\n },\n }), [onChange]);\n\n return (\n
    \n \n \n \n
    \n );\n});\n\nfunction getReportPages(contents: ReadonlyMap): ReportContentPage[] {\n const sortedPages = [...contents.values()].sort((a, b) => a.order - b.order);\n const shownPages = sortedPages.filter((it) => it.visible);\n\n return sortedPages.map((page) => ({\n id: page.id,\n section: page.section,\n content: (\n \n {page.content}\n \n ),\n }));\n}\n","import './ReportFormFieldToggle.scss';\nimport { FieldPath } from '@form-ts/core';\nimport React from 'react';\nimport { ToggleField } from 'src/modules/form/components/ToggleField';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { ReportFormData } from 'src/modules/report/types/ReportFormData';\n\ntype Props = {\n readonly field: FieldPath;\n readonly disabled?: boolean;\n readonly children: React.ReactNode;\n};\n\nexport const ReportFormFieldToggle = ({ field, disabled, children }: Props): React.ReactElement => (\n
    \n \n
    \n);\n","import './ReportFormSectionConfig.scss';\nimport { FieldPath } from '@form-ts/core';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { Link } from 'react-router-dom';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CustomToggle } from 'src/modules/common/components/CustomToggle';\nimport { Dropdown } from 'src/modules/common/components/Dropdown';\nimport { HorizontalDivider } from 'src/modules/common/components/HorizontalDivider';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\nimport { Project } from 'src/modules/common/types/Project';\nimport { ProjectReportCoverContactsEnum } from 'src/modules/common/types/ProjectReportCoverContacts';\nimport { UserSettings } from 'src/modules/common/types/UserSettings';\nimport { LeadText } from 'src/modules/common/typography/LeadText';\nimport { DateboxField } from 'src/modules/form/components/DateboxField';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { getCoverContactsOptions } from 'src/modules/report/selectors/getCoverContactsOptions';\nimport { ReportFormData } from 'src/modules/report/types/ReportFormData';\nimport { ReportGenerated } from 'src/modules/report/types/ReportGenerated';\nimport { ReportFormFieldToggle } from 'src/modules/report/views/ReportFormFieldToggle';\n\ntype Props = {\n readonly field: FieldPath;\n readonly project: Project;\n readonly document: ReportGenerated;\n readonly userSettings: UserSettings;\n readonly useOrganizationContacts: boolean;\n readonly updateUserSettings: (data: UserSettings) => void;\n};\n\nexport const ReportFormSectionConfigCover = ({\n field,\n project,\n document,\n userSettings,\n useOrganizationContacts,\n updateUserSettings,\n}: Props): React.ReactElement => {\n const intl = useIntl();\n\n const officeContactsOptions = useSelector(getCoverContactsOptions);\n\n return (\n
    \n
    \n \n \n \n
    \n\n \n\n
    \n \n \n \n\n \n\n updateUserSettings({\n report: { ...userSettings.report, showOrganizationLogo: checked },\n })}\n labelA={intl.formatMessage({ id: 'report/form/cover/showOrganizationLogo' })}\n labelB={intl.formatMessage({ id: 'report/form/cover/showOrganizationLogo' })}\n labelText={undefined}\n />\n\n \n\n
    \n\n \n\n updateUserSettings({ report: { ...userSettings.report, coverContacts: value } })}\n outlined={true}\n disabled={!useOrganizationContacts}\n />\n
    \n\n
    \n \n \n\n
    \n \n
    \n \n
    \n
    \n );\n};\n\nfunction renderAllowContactsOption(option: string): React.ReactElement {\n return ;\n}\n","import './ReportFormSectionConfig.scss';\nimport { FieldPath } from '@form-ts/core';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { HorizontalDivider } from 'src/modules/common/components/HorizontalDivider';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\nimport { Project } from 'src/modules/common/types/Project';\nimport { LeadText } from 'src/modules/common/typography/LeadText';\nimport { CheckboxField } from 'src/modules/form/components/CheckboxField';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { ReportFormData } from 'src/modules/report/types/ReportFormData';\nimport { ReportFormFieldToggle } from 'src/modules/report/views/ReportFormFieldToggle';\n\ntype Props = {\n readonly field: FieldPath;\n readonly project: Project;\n};\n\nexport const ReportFormSectionConfigEnergy = ({ field, project }: Props): React.ReactElement => (\n
    \n
    \n \n \n \n\n \n
    \n\n \n\n
    \n \n \n \n\n \n\n \n \n \n\n \n\n \n \n \n\n \n\n \n \n \n\n \n
    \n\n
    \n (\n
    \n \n
    \n )}\n >\n \n \n
    \n
    \n);\n","import './ReportFormSectionConfig.scss';\nimport { FieldPath } from '@form-ts/core';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { HorizontalDivider } from 'src/modules/common/components/HorizontalDivider';\nimport { sub } from 'src/modules/common/constants/formattingHelpers';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\nimport { Project } from 'src/modules/common/types/Project';\nimport { LeadText } from 'src/modules/common/typography/LeadText';\nimport { CheckboxField } from 'src/modules/form/components/CheckboxField';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { ReportFormData } from 'src/modules/report/types/ReportFormData';\nimport { ReportFormFieldToggle } from 'src/modules/report/views/ReportFormFieldToggle';\n\ntype Props = {\n readonly field: FieldPath;\n readonly project: Project;\n};\n\nexport const ReportFormSectionConfigEvaluation = ({ field, project }: Props): React.ReactElement => (\n
    \n
    \n \n \n \n\n \n
    \n\n \n\n
    \n \n \n \n\n \n\n \n \n \n\n \n\n \n \n \n\n \n
    \n\n
    \n (\n
    \n \n
    \n )}\n >\n \n \n
    \n
    \n);\n","import './ReportFormSectionConfig.scss';\nimport { FieldPath } from '@form-ts/core';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { HorizontalDivider } from 'src/modules/common/components/HorizontalDivider';\nimport { sub } from 'src/modules/common/constants/formattingHelpers';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\nimport { Project } from 'src/modules/common/types/Project';\nimport { LeadText } from 'src/modules/common/typography/LeadText';\nimport { CheckboxField } from 'src/modules/form/components/CheckboxField';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { ReportFormData } from 'src/modules/report/types/ReportFormData';\nimport { ReportFormFieldToggle } from 'src/modules/report/views/ReportFormFieldToggle';\n\ntype Props = {\n readonly field: FieldPath;\n readonly project: Project;\n};\n\nexport const ReportFormSectionConfigEvaluationCharts = ({ field, project }: Props): React.ReactElement => (\n
    \n
    \n \n \n \n\n \n
    \n\n \n\n
    \n \n \n \n\n \n\n \n \n \n\n \n\n \n \n \n\n \n\n \n \n \n\n \n
    \n\n
    \n (\n
    \n \n
    \n )}\n >\n \n \n
    \n
    \n);\n","import './ReportFormSectionConfig.scss';\nimport { FieldPath } from '@form-ts/core';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { HorizontalDivider } from 'src/modules/common/components/HorizontalDivider';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\nimport { Project } from 'src/modules/common/types/Project';\nimport { LeadText } from 'src/modules/common/typography/LeadText';\nimport { CheckboxField } from 'src/modules/form/components/CheckboxField';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { ReportFormData } from 'src/modules/report/types/ReportFormData';\nimport { ReportFormFieldToggle } from 'src/modules/report/views/ReportFormFieldToggle';\n\ntype Props = {\n readonly field: FieldPath;\n readonly project: Project;\n};\n\nexport const ReportFormSectionConfigHvac = ({ field, project }: Props): React.ReactElement => (\n
    \n
    \n \n \n \n\n \n
    \n\n \n\n
    \n \n \n \n\n \n\n \n \n \n\n \n\n \n \n \n\n \n\n \n \n \n\n \n
    \n\n
    \n (\n
    \n \n
    \n )}\n >\n \n \n
    \n
    \n);\n","import './ReportFormSectionConfig.scss';\nimport { FieldPath } from '@form-ts/core';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { HorizontalDivider } from 'src/modules/common/components/HorizontalDivider';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\nimport { Project } from 'src/modules/common/types/Project';\nimport { LeadText } from 'src/modules/common/typography/LeadText';\nimport { CheckboxField } from 'src/modules/form/components/CheckboxField';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { ReportFormData } from 'src/modules/report/types/ReportFormData';\nimport { ReportFormFieldToggle } from 'src/modules/report/views/ReportFormFieldToggle';\n\ntype Props = {\n readonly field: FieldPath;\n readonly project: Project;\n};\n\nexport const ReportFormSectionConfigSavings = ({ field, project }: Props): React.ReactElement => (\n
    \n
    \n \n \n \n\n \n
    \n\n \n\n
    \n \n \n \n\n \n\n \n \n \n\n \n\n \n \n \n\n \n
    \n\n
    \n (\n
    \n \n
    \n )}\n >\n \n \n
    \n
    \n);\n","import './ReportFormSectionConfig.scss';\nimport { SchemaArea } from '@belimo-retrofit-portal/logic';\nimport { Information } from '@carbon/icons-react';\nimport { FieldPath } from '@form-ts/core';\nimport React, { useMemo } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { HorizontalDivider } from 'src/modules/common/components/HorizontalDivider';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\nimport { Project } from 'src/modules/common/types/Project';\nimport { LeadText } from 'src/modules/common/typography/LeadText';\nimport { CheckboxField } from 'src/modules/form/components/CheckboxField';\nimport { DropdownField } from 'src/modules/form/components/DropdownField';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { ReportFormData } from 'src/modules/report/types/ReportFormData';\nimport { ReportFormFieldToggle } from 'src/modules/report/views/ReportFormFieldToggle';\n\ntype Props = {\n readonly area: SchemaArea;\n readonly field: FieldPath;\n readonly project: Project;\n};\n\nexport const ReportFormSectionConfigSchema = ({ area, field, project }: Props): React.ReactElement => {\n const schemaData = project.data.schema[area];\n const futureOptions = useMemo(() => schemaData?.future.map((it) => it?.id) ?? [], [schemaData]);\n\n const isSchemaMissing = schemaData === null;\n const isCommentMissing = !(schemaData?.comment.length);\n\n return (\n
    \n
    \n \n {AREA_NAMES[area]}\n \n\n \n
    \n\n \n\n
    \n \n \n \n\n \n\n \n \n \n\n
    \n \n\n
    \n \n\n \n
    \n
    \n\n }\n itemToElement={renderFutureVariantOption}\n renderSelectedItem={renderFutureVariantOption}\n disabled={isSchemaMissing}\n />\n
    \n\n
    \n (\n
    \n \n
    \n )}\n >\n \n \n
    \n
    \n );\n};\n\nfunction renderFutureVariantOption(option: number): React.ReactElement {\n return ;\n}\n\nconst AREA_NAMES = {\n [SchemaArea.HEATING]: ,\n [SchemaArea.COOLING]: ,\n [SchemaArea.VENTILATION]: ,\n};\n","import './ReportFormSectionNoSchema.scss';\nimport { SchemaArea } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\nimport { Project } from 'src/modules/common/types/Project';\n\ntype Props = {\n readonly area: SchemaArea;\n readonly project: Project;\n};\n\nexport const ReportFormSectionNoSchema = ({ area, project }: Props): React.ReactElement => (\n
    \n
    \n \n
    \n\n

    \n \n

    \n\n
    \n (\n
    \n \n
    \n )}\n >\n \n \n
    \n
    \n);\n\nconst AREA_NAMES = {\n [SchemaArea.HEATING]: ,\n [SchemaArea.COOLING]: ,\n [SchemaArea.VENTILATION]: ,\n};\n","import './ReportFormSectionPreview.scss';\nimport clsx from 'clsx';\nimport React from 'react';\nimport { ReportContentPage } from 'src/modules/report/types/ReportContent';\nimport { ReportFormSectionPreviewPage } from 'src/modules/report/views/ReportFormSectionPreviewPage';\n\ntype Props = {\n readonly pages: ReadonlyArray;\n readonly enabled: boolean;\n};\n\nexport const ReportFormSectionPreview = ({ pages, enabled }: Props): React.ReactElement => (\n
    \n {pages.map((page) => (\n
    \n
    \n \n {page.content}\n \n
    \n
    \n ))}\n
    \n);\n","import './ReportFormSectionPreviewPage.scss';\nimport React from 'react';\nimport { bind } from 'src/modules/common/utils/decorator';\n\ntype Props = {\n readonly children: React.ReactNode;\n};\ntype State = {\n readonly scale: number;\n readonly ratio: number;\n};\n\nexport class ReportFormSectionPreviewPage extends React.Component {\n public readonly state: State = {\n scale: 1,\n ratio: 0,\n };\n\n private wrapper: React.RefObject = React.createRef();\n\n private content: React.RefObject = React.createRef();\n\n public componentDidMount(): void {\n this.updateContent();\n\n window.addEventListener('resize', this.updateContent, { passive: true });\n window.addEventListener('orientationchange', this.updateContent, { passive: true });\n }\n\n public componentWillUnmount(): void {\n window.removeEventListener('resize', this.updateContent);\n window.removeEventListener('orientationchange', this.updateContent);\n }\n\n public componentDidUpdate(): void {\n this.updateContent();\n }\n\n public render(): React.ReactElement {\n const { children } = this.props;\n\n return (\n \n \n {children}\n
    \n \n );\n }\n\n private getWrapperStyle(): React.CSSProperties {\n const { ratio } = this.state;\n return { paddingBottom: `${(ratio * 100).toFixed(5)}%` };\n }\n\n private getContentStyle(): React.CSSProperties {\n const { scale } = this.state;\n return { transform: `scale(${scale.toFixed(5)})` };\n }\n\n @bind()\n private updateContent(): void {\n if (!this.content.current || !this.wrapper.current) {\n return;\n }\n\n const wrapperW = this.wrapper.current.clientWidth;\n const contentW = this.content.current.clientWidth;\n const contentH = this.content.current.clientHeight;\n\n const scale = wrapperW / contentW;\n const ratio = contentH / contentW;\n\n // eslint-disable-next-line react/destructuring-assignment\n if (this.state.scale !== scale || this.state.ratio !== ratio) {\n this.setState({ scale, ratio });\n }\n }\n}\n","import './ReportFormView.scss';\nimport { SchemaArea } from '@belimo-retrofit-portal/logic';\nimport { useForm } from '@form-ts/react';\nimport React, { useCallback, useEffect, useState } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport { useAction } from 'src/hooks/useAction';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { ArrowLeftIcon } from 'src/modules/common/icons/ArrowLeftIcon';\nimport { FileIcon } from 'src/modules/common/icons/FileIcon';\nimport { Project } from 'src/modules/common/types/Project';\nimport { UserSettings } from 'src/modules/common/types/UserSettings';\nimport { useFormValidator } from 'src/modules/form/hooks/useFormValidator';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { REPORT_CHANGE, REPORT_GENERATE } from 'src/modules/report/actions/ReportActions';\nimport { REPORT_FORM_SCHEMA } from 'src/modules/report/constants/schema';\nimport { ReportContentPage } from 'src/modules/report/types/ReportContent';\nimport { ReportFormData } from 'src/modules/report/types/ReportFormData';\nimport { ReportGenerated } from 'src/modules/report/types/ReportGenerated';\nimport { ReportFormDocument } from 'src/modules/report/views/ReportFormDocument';\nimport { ReportFormSectionConfigCover } from 'src/modules/report/views/ReportFormSectionConfigCover';\nimport { ReportFormSectionConfigEnergy } from 'src/modules/report/views/ReportFormSectionConfigEnergy';\nimport { ReportFormSectionConfigEvaluation } from 'src/modules/report/views/ReportFormSectionConfigEvaluation';\nimport {\n ReportFormSectionConfigEvaluationCharts,\n} from 'src/modules/report/views/ReportFormSectionConfigEvaluationCharts';\nimport { ReportFormSectionConfigHvac } from 'src/modules/report/views/ReportFormSectionConfigHvac';\nimport { ReportFormSectionConfigSavings } from 'src/modules/report/views/ReportFormSectionConfigSavings';\nimport { ReportFormSectionConfigSchema } from 'src/modules/report/views/ReportFormSectionConfigSchema';\nimport { ReportFormSectionNoSchema } from 'src/modules/report/views/ReportFormSectionNoSchema';\nimport { ReportFormSectionPreview } from 'src/modules/report/views/ReportFormSectionPreview';\nimport { Language } from 'src/types/common/Language';\n\ntype Props = {\n readonly language: Language;\n readonly project: Project;\n readonly document: ReportGenerated;\n readonly formData: ReportFormData;\n readonly loading: boolean;\n readonly userSettings: UserSettings;\n readonly useOrganizationContacts: boolean;\n readonly updateUserSettings: (data: UserSettings) => void;\n};\n\nexport const ReportFormView = ({\n language,\n project,\n document,\n formData,\n loading,\n userSettings,\n useOrganizationContacts,\n updateUserSettings,\n}: Props): React.ReactElement => {\n const projectEvaluationUrl = `/project/${encodeURIComponent(project.id)}/evaluation`;\n\n const form = useForm('project.report', {\n reinitialize: false,\n initialValues: formData,\n });\n useFormValidator(form, REPORT_FORM_SCHEMA);\n\n const saveForm = useAction(REPORT_CHANGE.trigger);\n useEffect(() => form.subscribe((prevState) => {\n const nextState = form.currentState;\n\n if (prevState.values !== nextState.values) {\n saveForm(nextState.values);\n }\n }), [form, saveForm]);\n\n const generateReport = useAction(REPORT_GENERATE.request);\n const handleReportClick = useCallback(() => {\n generateReport(form.currentState.values);\n }, [form, generateReport]);\n\n const [reportPages, setReportPages] = useState>([]);\n\n return (\n
    \n
    \n
    \n
    \n\n (\n
    \n \n
    \n )}\n >\n \n \n
    \n\n \n\n
    \n
    \n
    \n it.section === 'cover')}\n enabled={true}\n />\n
    \n
    \n \n
    \n
    \n\n
    \n
    \n it.section === 'savings')}\n enabled={formData.savings.enabled}\n />\n
    \n
    \n \n
    \n
    \n\n
    \n
    \n it.section === 'evaluation')}\n enabled={formData.evaluation.enabled}\n />\n
    \n
    \n \n
    \n
    \n\n
    \n
    \n it.section === 'evaluationCharts')}\n enabled={formData.evaluationCharts.enabled}\n />\n
    \n
    \n \n
    \n
    \n\n
    \n
    \n it.section === 'energy')}\n enabled={formData.energy.enabled}\n />\n
    \n\n
    \n \n
    \n
    \n\n
    \n
    \n it.section === 'hvac')}\n enabled={formData.hvac.enabled}\n />\n
    \n
    \n \n
    \n
    \n\n {[\n SchemaArea.HEATING,\n SchemaArea.COOLING,\n ].map((area) => (\n
    \n
    \n {document.schema[area] !== null && (\n it.section === `schema-${area}`)}\n enabled={formData.schema[area].enabled}\n />\n )}\n {document.schema[area] === null && (\n \n )}\n
    \n
    \n \n
    \n
    \n ))}\n
    \n\n
    \n \n
    \n \n
    \n\n \n \n\n (\n
    \n \n
    \n )}\n >\n \n \n
    \n
    \n
    \n );\n};\n","import './ReportDocumentPageAmount.scss';\nimport React, { memo } from 'react';\n\ntype Props = {\n title: React.ReactNode;\n amount: React.ReactNode;\n unit: React.ReactNode;\n};\n\nexport const ReportDocumentPageAmount = memo(({ title, amount, unit }: Props) => (\n
    \n
    \n {title}\n
    \n\n
    \n {amount || '\\u2014'}\n\n {unit}\n
    \n
    \n));\n","import './ReportDocumentPageEnergyValue.scss';\nimport { Decimal } from 'decimal.js-light';\nimport React from 'react';\nimport { SavingsValue } from 'src/modules/common/components/SavingsValue';\n\ntype Props = {\n readonly title: React.ReactNode;\n readonly value: Decimal | null;\n readonly unit: React.ReactNode;\n};\n\nexport const ReportDocumentPageCO2Value = ({ title, value, unit }: Props): React.ReactElement => (\n
    \n
    \n {title}\n
    \n\n
    \n
    \n \n
    \n\n
    \n {unit}\n
    \n
    \n
    \n);\n","import './ReportDocumentPageCover.scss';\nimport dayjs from 'dayjs';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { AreaUnitView } from 'src/modules/common/components/AreaUnitView';\nimport { AssetImage } from 'src/modules/common/components/AssetImage';\nimport { FormattedValue } from 'src/modules/common/components/FormattedValue';\nimport { ProjectTitle } from 'src/modules/common/components/ProjectTitle';\nimport { UserSettings } from 'src/modules/common/types/UserSettings';\nimport { OutputDocumentPage } from 'src/modules/output/views/OutputDocumentPage';\nimport { OutputLogo } from 'src/modules/output/views/OutputLogo';\nimport { OutputPage } from 'src/modules/output/views/OutputPage';\nimport { ReportFormData } from 'src/modules/report/types/ReportFormData';\nimport { ReportGenerated } from 'src/modules/report/types/ReportGenerated';\nimport { Language } from 'src/types/common/Language';\n\ntype Props = {\n readonly language: Language;\n readonly document: ReportGenerated;\n readonly formData: ReportFormData;\n readonly userSettings: UserSettings;\n};\n\nexport const ReportDocumentPageCover = ({ language, document, formData, userSettings }: Props): React.ReactElement => (\n \n \n
    \n
    \n {document.cover.image !== null && (\n \n )}\n {document.cover.image === null && (\n
    \n )}\n\n
    \n \n
    \n
    \n\n
    \n \n
    \n\n
    \n
    \n {document.cover.logo && userSettings.report.showOrganizationLogo && (\n
    \n

    \n \n

    \n\n \n
    \n )}\n\n {document.cover.goals.trim() && (\n <>\n
    \n \n
    \n\n
    {document.cover.goals}
    \n \n )}\n
    \n\n
    \n {formData.cover.showBuildingInfo && (\n
    \n
    \n \n
    \n\n
    \n \n
    \n\n {document.cover.building.size && (\n
    \n \n \n
    \n )}\n\n
    \n {document.cover.building.address.street}\n
    \n\n
    \n {document.cover.building.address.zip} {document.cover.building.address.city}\n {', '}\n \n
    \n
    \n )}\n\n
    \n
    \n \n
    \n\n
    \n {document.cover.author}\n
    \n\n
    \n {document.cover.email}\n
    \n
    \n\n
    \n
    \n \n
    \n\n
    \n {dayjs(document.cover.reportDate).format('DD.MM.YYYY')}\n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n {document.cover.organization}\n
    \n\n
    \n
    \n {document.cover.address.street}\n
    \n\n {document.cover.address.country && `${document.cover.address.country} —`} {\n document.cover.address.zip\n } {document.cover.address.city}\n
    \n\n
    \n {document.cover.contact.phone}\n
    \n {document.cover.contact.email}\n
    \n\n
    \n {document.cover.contact.website}\n
    \n
    \n
    \n\n
    \n \n
    \n
    \n
    \n \n \n);\n","import './ReportDocumentPageEnergy.scss';\nimport { HvacArea } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { CoolingIcon } from 'src/modules/common/icons/CoolingIcon';\nimport { FanIcon } from 'src/modules/common/icons/FanIcon';\nimport { HeatingIcon } from 'src/modules/common/icons/HeatingIcon';\nimport { OutputDocumentPage } from 'src/modules/output/views/OutputDocumentPage';\nimport { OutputPage } from 'src/modules/output/views/OutputPage';\nimport { OutputTitle } from 'src/modules/output/views/OutputTitle';\nimport { ReportFormData } from 'src/modules/report/types/ReportFormData';\nimport { ReportGenerated } from 'src/modules/report/types/ReportGenerated';\nimport { ReportDocumentPageEnergyThermal } from 'src/modules/report/views/document/ReportDocumentPageEnergyThermal';\nimport {\n ReportDocumentPageEnergyVentilation,\n} from 'src/modules/report/views/document/ReportDocumentPageEnergyVentilation';\nimport { Language } from 'src/types/common/Language';\n\ntype Props = {\n readonly language: Language;\n readonly document: ReportGenerated;\n readonly formData: ReportFormData;\n};\n\nexport const ReportDocumentPageEnergy = ({ language, document, formData }: Props): React.ReactElement => (\n \n \n
    \n
    \n \n \n \n
    \n\n
    \n {formData.energy.showHeating && (\n
    \n }\n name={}\n values={document.energy.areas[HvacArea.HEATING]}\n currency={document.energy.currency}\n />\n
    \n )}\n\n {formData.energy.showCooling && (\n
    \n }\n name={}\n values={document.energy.areas[HvacArea.COOLING]}\n currency={document.energy.currency}\n />\n
    \n )}\n\n {formData.energy.showVentilation && (\n
    \n }\n name={}\n values={document.energy.areas[HvacArea.VENTILATION]}\n currency={document.energy.currency}\n />\n
    \n )}\n
    \n\n {(formData.energy.showComments && document.energy.comment) && (\n
    \n
    \n \n
    \n\n
    \n {document.energy.comment}\n
    \n
    \n )}\n
    \n
    \n \n);\n","import './ReportDocumentPageEnergyThermal.scss';\nimport { CurrencyCode } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { CarbonSavingsUnit } from 'src/modules/common/components/CarbonSavingsUnit';\nimport { CurrencySymbol } from 'src/modules/common/components/CurrencySymbol';\nimport { EnergySavingsUnit } from 'src/modules/common/components/EnergySavingsUnit';\nimport { sub } from 'src/modules/common/constants/formattingHelpers';\nimport { ReportGeneratedEnergyArea } from 'src/modules/report/types/ReportGenerated';\nimport { ReportDocumentPageCO2Value } from 'src/modules/report/views/document/ReportDocumentPageCO2Value';\nimport { ReportDocumentPageEnergyValue } from 'src/modules/report/views/document/ReportDocumentPageEnergyValue';\n\ntype Props = {\n readonly icon: React.ReactElement;\n readonly name: React.ReactNode;\n readonly values: ReportGeneratedEnergyArea;\n readonly currency: CurrencyCode;\n};\n\nexport const ReportDocumentPageEnergyThermal = ({ icon, name, values, currency }: Props): React.ReactElement => (\n
    \n
    \n
    \n {icon}\n
    \n\n
    \n {name}\n
    \n
    \n\n
    \n
    \n
    \n \n
    \n\n
    \n
    \n }\n value={values.thermal.annualConsumption?.div(1_000) ?? null}\n unit={(\n }}\n />\n )}\n />\n
    \n\n
    \n }\n value={values.thermal.carbonEmission?.div(1_000_000) ?? null}\n unit={(\n }}\n />\n )}\n />\n
    \n\n
    \n }\n value={values.thermal.totalCosts}\n unit={(\n }}\n />\n )}\n />\n
    \n
    \n
    \n\n
    \n
    \n \n
    \n\n
    \n
    \n }\n value={values.electrical.annualConsumption?.div(1_000) ?? null}\n unit={(\n }}\n />\n )}\n />\n
    \n\n
    \n }\n value={values.electrical.carbonEmission?.div(1_000_000) ?? null}\n unit={(\n }}\n />\n )}\n />\n
    \n\n
    \n }\n value={values.electrical.totalCosts}\n unit={(\n }}\n />\n )}\n />\n
    \n
    \n
    \n
    \n
    \n);\n","import './ReportDocumentPageEnergyValue.scss';\nimport { Decimal } from 'decimal.js-light';\nimport React from 'react';\nimport { FormattedValue } from 'src/modules/common/components/FormattedValue';\n\ntype Props = {\n readonly title: React.ReactNode;\n readonly value: Decimal | null;\n readonly unit: React.ReactNode;\n};\n\nexport const ReportDocumentPageEnergyValue = ({ title, value, unit }: Props): React.ReactElement => (\n
    \n
    \n {title}\n
    \n\n
    \n
    \n \n
    \n\n
    \n {unit}\n
    \n
    \n
    \n);\n","import './ReportDocumentPageEnergyVentilation.scss';\nimport { CurrencyCode } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { CarbonSavingsUnit } from 'src/modules/common/components/CarbonSavingsUnit';\nimport { CurrencySymbol } from 'src/modules/common/components/CurrencySymbol';\nimport { EnergySavingsUnit } from 'src/modules/common/components/EnergySavingsUnit';\nimport { sub } from 'src/modules/common/constants/formattingHelpers';\nimport { ReportGeneratedEnergyArea } from 'src/modules/report/types/ReportGenerated';\nimport { ReportDocumentPageCO2Value } from 'src/modules/report/views/document/ReportDocumentPageCO2Value';\nimport { ReportDocumentPageEnergyValue } from 'src/modules/report/views/document/ReportDocumentPageEnergyValue';\n\ntype Props = {\n readonly icon: React.ReactElement;\n readonly name: React.ReactNode;\n readonly values: ReportGeneratedEnergyArea;\n readonly currency: CurrencyCode;\n};\n\nexport const ReportDocumentPageEnergyVentilation = ({ icon, name, values, currency }: Props): React.ReactElement => (\n
    \n
    \n
    \n {icon}\n
    \n\n
    \n {name}\n
    \n
    \n\n
    \n
    \n }\n value={values.electrical.annualConsumption?.div(1_000) ?? null}\n unit={(\n }}\n />\n )}\n />\n
    \n\n
    \n }\n value={values.electrical.carbonEmission?.div(1_000_000) ?? null}\n unit={(\n }}\n />\n )}\n />\n
    \n\n
    \n }\n value={values.electrical.totalCosts}\n unit={(\n }}\n />\n )}\n />\n
    \n
    \n
    \n);\n","import './ReportDocumentPageEvaluation.scss';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { Project } from 'src/modules/common/types/Project';\nimport { OutputDocumentPage } from 'src/modules/output/views/OutputDocumentPage';\nimport { OutputPage } from 'src/modules/output/views/OutputPage';\nimport { OutputTitle } from 'src/modules/output/views/OutputTitle';\nimport { ReportFormData } from 'src/modules/report/types/ReportFormData';\nimport { ReportGenerated } from 'src/modules/report/types/ReportGenerated';\nimport {\n ReportDocumentPageEvaluationCharts,\n} from 'src/modules/report/views/document/ReportDocumentPageEvaluationCharts';\nimport {\n ReportDocumentPageEvaluationOverview,\n} from 'src/modules/report/views/document/ReportDocumentPageEvaluationOverview';\nimport { Language } from 'src/types/common/Language';\n\ntype Props = {\n readonly language: Language;\n readonly document: ReportGenerated;\n readonly formData: ReportFormData;\n readonly project: Project;\n};\n\nexport const ReportDocumentPageEvaluation = ({ language, document, formData, project }: Props): React.ReactElement => (\n <>\n \n \n
    \n
    \n \n \n \n
    \n\n \n
    \n
    \n \n\n \n \n
    \n
    \n \n \n \n
    \n\n \n
    \n
    \n \n \n);\n","import './ReportDocumentPageEvaluationCharts.scss';\nimport { Decimal } from 'decimal.js-light';\nimport React, { memo, useMemo } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { useParametricSelector } from 'src/hooks/useParametricSelector';\nimport { FormattedBEP } from 'src/modules/common/components/FormattedBEP';\nimport { FormattedValue } from 'src/modules/common/components/FormattedValue';\nimport { sub, sup } from 'src/modules/common/constants/formattingHelpers';\nimport { Project } from 'src/modules/common/types/Project';\nimport { EvaluationResultsChartsGraphBEP } from 'src/modules/evaluation/views/EvaluationResultsChartsGraphBEP';\nimport { EvaluationResultsChartsGraphCO2 } from 'src/modules/evaluation/views/EvaluationResultsChartsGraphCO2';\nimport { EvaluationResultsChartsGraphIRR } from 'src/modules/evaluation/views/EvaluationResultsChartsGraphIRR';\nimport { EvaluationResultsChartsGraphROI } from 'src/modules/evaluation/views/EvaluationResultsChartsGraphROI';\nimport { getHvacAssesmentFormData } from 'src/modules/hvac/selectors/getHvacAssesmentFormData';\nimport { ReportFormData } from 'src/modules/report/types/ReportFormData';\nimport { ReportGenerated } from 'src/modules/report/types/ReportGenerated';\nimport { ReportDocumentPageAmount } from 'src/modules/report/views/document/ReportDocumentPageAmount';\n\ntype Props = {\n readonly document: ReportGenerated;\n readonly formData: ReportFormData;\n readonly project: Project;\n};\n\nexport const ReportDocumentPageEvaluationCharts = memo(({ document, formData, project }: Props) => {\n const intl = useIntl();\n\n const hvacAssessmentFormData = useParametricSelector(getHvacAssesmentFormData, project);\n\n const isOnlyOneAreaEnabled = useMemo(() => {\n const { heating, cooling, ventilation } = hvacAssessmentFormData;\n\n return [heating.enabled, cooling.enabled, ventilation.enabled].filter(Boolean).length === 1;\n }, [hvacAssessmentFormData]);\n\n const areCostExclSavingsNegative = (document.evaluation.results.savings.costExclCO2?.overall &&\n !document.evaluation.results.savings.costExclCO2?.overall?.isPositive()) ||\n false;\n const isInvestmentEmpty = Boolean(document.evaluation.results.savings.costExclCO2?.overall?.isPositive() &&\n (project.data.evaluation.investmentAmount === null ||\n project.data.evaluation.investmentAmount?.isZero()));\n\n return (\n
    \n {formData.evaluationCharts.showBreakEvenPoint && (\n
    \n
    \n
    \n \n
    \n\n
    \n \n
    \n
    \n\n \n\n
    \n }\n amount={}\n unit={}\n />\n\n {document.evaluation.results.charts.BEP?.years.inclCO2 && (\n }\n amount={}\n unit={}\n />\n )}\n
    \n
    \n )}\n\n {formData.evaluationCharts.showAnnualCarbonEmmission && (\n
    \n
    \n
    \n \n
    \n\n
    \n \n
    \n
    \n\n \n )}\n />\n
    \n )}\n\n {formData.evaluationCharts.showReturnOnInvestment && (\n
    \n
    \n
    \n \n
    \n\n
    \n \n
    \n
    \n\n \n\n
    \n
    \n
    \n
    \n \n
    \n\n
    \n \n
    \n\n {document.evaluation.results.charts.ROI !== null &&\n document.evaluation.results.charts.ROI.some((it) => it.value.inclCO2 !== null) && (\n
    \n \n
    \n )}\n
    \n\n {document.evaluation.results.charts.ROI !== null && document.evaluation.results.charts.ROI.map((it) => (\n
    \n
    \n {it.year.toString().padStart(2, '0')}\n
    \n
    \n \n
    \n {it.value.inclCO2 && (\n
    \n \n
    \n )}\n
    \n ))}\n\n {document.evaluation.results.charts.ROI === null && NO_CHART_DATA.map((it) => (\n
    \n
    \n {it.year.toString().padStart(2, '0')}\n
    \n
    \n \n
    \n {it.inclCO2 && (\n
    \n \n
    \n )}\n
    \n ))}\n
    \n
    \n
    \n )}\n\n {formData.evaluationCharts.showInternalRateOfReturn && (\n
    \n
    \n
    \n \n
    \n\n
    \n \n
    \n
    \n\n \n\n
    \n
    \n
    \n
    \n \n
    \n\n
    \n \n
    \n\n {document.evaluation.results.charts.IRR !== null &&\n document.evaluation.results.charts.IRR.some((it) => it.value.inclCO2 !== null) && (\n
    \n \n
    \n )}\n
    \n\n {document.evaluation.results.charts.IRR !== null && document.evaluation.results.charts.IRR.map((it) => (\n
    \n
    \n {it.year.toString().padStart(2, '0')}\n
    \n
    \n \n
    \n {it.value.inclCO2 && (\n
    \n \n
    \n )}\n
    \n ))}\n\n {document.evaluation.results.charts.IRR === null && NO_CHART_DATA.map((it) => (\n
    \n
    \n {it.year.toString().padStart(2, '0')}\n
    \n
    \n \n
    \n {it.inclCO2 && (\n
    \n \n
    \n )}\n
    \n ))}\n
    \n
    \n
    \n )}\n
    \n );\n});\n\nconst NO_CHART_DATA = [\n new Decimal(1),\n new Decimal(2),\n new Decimal(3),\n new Decimal(4),\n new Decimal(5),\n new Decimal(10),\n new Decimal(20),\n].map((year) => ({\n year: year,\n exclCO2: null,\n inclCO2: null,\n}));\n","import './ReportDocumentPageEvaluationOverview.scss';\nimport { HvacArea } from '@belimo-retrofit-portal/logic';\nimport React, { memo } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { CurrencySymbol } from 'src/modules/common/components/CurrencySymbol';\nimport { SavingsAmount } from 'src/modules/common/components/SavingsAmount';\nimport { SavingsValue } from 'src/modules/common/components/SavingsValue';\nimport { SavingTileCard } from 'src/modules/common/components/SavingTileCard';\nimport { sub } from 'src/modules/common/constants/formattingHelpers';\nimport { ChartUpIcon } from 'src/modules/common/icons/ChartUpIcon';\nimport { CurrencyExchangeIcon } from 'src/modules/common/icons/CurrencyExchangeIcon';\nimport { ReportFormData } from 'src/modules/report/types/ReportFormData';\nimport { ReportGenerated } from 'src/modules/report/types/ReportGenerated';\nimport { ReportDocumentPageAmount } from 'src/modules/report/views/document/ReportDocumentPageAmount';\n\ntype Props = {\n readonly document: ReportGenerated;\n readonly formData: ReportFormData;\n};\n\nexport const ReportDocumentPageEvaluationOverview = memo(({ document, formData }:Props) => (\n
    \n\n {formData.evaluation.showInitialInvestment && (\n <>\n
    \n \n
    \n\n
    \n }\n amount={(\n \n )}\n unit={null}\n />\n\n }\n amount={(\n \n )}\n unit={null}\n />\n
    \n\n {document.evaluation.inputs.proposalDescription && (\n
    \n
    \n \n
    \n\n
    \n {document.evaluation.inputs.proposalDescription}\n
    \n
    \n )}\n \n )}\n\n {formData.evaluation.showAnnualSavings && (\n <>\n
    \n \n
    \n\n
    \n }\n icon={}\n amountTitle={(\n }}\n />\n )}\n amount={(\n \n )}\n unit={null}\n small={true}\n >\n
    \n
    \n \n
    \n\n
    \n \n
    \n
    \n\n
    \n
    \n \n
    \n\n
    \n \n
    \n
    \n\n
    \n
    \n \n
    \n\n
    \n \n
    \n
    \n \n\n }\n icon={}\n amountTitle={(\n }}\n />\n )}\n amount={(\n \n )}\n unit={null}\n small={true}\n >\n
    \n
    \n \n
    \n\n
    \n \n
    \n
    \n\n
    \n
    \n \n
    \n\n
    \n \n
    \n
    \n\n
    \n
    \n \n
    \n\n
    \n \n
    \n
    \n \n\n {formData.evaluation.showInvestmentPerCarbonSavings && (\n }\n icon={}\n amountTitle={(\n }}\n />\n )}\n amount={(\n \n )}\n unit={(\n }}\n />\n )}\n small={true}\n >\n
    \n
    \n \n
    \n\n
    \n \n
    \n
    \n \n )}\n
    \n \n )}\n
    \n));\n","import './ReportDocumentPageHvac.scss';\nimport { HvacArea } from '@belimo-retrofit-portal/logic';\nimport React, { useLayoutEffect, useRef, useState } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { EnergyEfficiencyTransition } from 'src/modules/common/components/EnergyEfficiencyTransition';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\nimport { OutputBlock, splitBlocksIntoPages } from 'src/modules/output/utils/splitBlocksIntoPages';\nimport { OutputDocumentPage } from 'src/modules/output/views/OutputDocumentPage';\nimport { OutputPage } from 'src/modules/output/views/OutputPage';\nimport { OutputTitle } from 'src/modules/output/views/OutputTitle';\nimport { ReportFormData } from 'src/modules/report/types/ReportFormData';\nimport { ReportGenerated, ReportGeneratedHvacSection } from 'src/modules/report/types/ReportGenerated';\nimport { Language } from 'src/types/common/Language';\nimport { assertNotEmpty } from 'src/utils/assert';\n\ntype Props = {\n readonly language: Language;\n readonly document: ReportGenerated;\n readonly formData: ReportFormData;\n};\n\nexport const ReportDocumentPageHvac = React.memo(({ language, document, formData }: Props): React.ReactElement => (\n <>\n {formData.hvac.showHeating && (\n \n )}\n\n {formData.hvac.showCooling && (\n \n )}\n\n {formData.hvac.showVentilation && (\n \n )}\n \n));\n\ntype AreaProps = {\n readonly language: Language;\n readonly area: HvacArea;\n readonly order: number;\n\n readonly document: ReportGenerated;\n readonly formData: ReportFormData;\n};\n\nconst AreaPage = React.memo(({ language, area, order, document, formData }: AreaProps): React.ReactElement => {\n const contentElement = useRef(null);\n const [outputPages, setOutputPages] = useState([]);\n\n useLayoutEffect(() => {\n const pageElement = contentElement.current;\n if (!pageElement) {\n return;\n }\n\n const pages = collectHvacPages(area, document, formData, pageElement);\n setOutputPages(pages);\n }, [area, document, formData]);\n\n return (\n <>\n \n {document.hvac[area]\n .map((section) => linearizeHvacSection(section, formData))\n .flat(1)\n .map((section) => React.cloneElement(section.content, { key: section.id }))}\n \n\n {outputPages.map((pageData, pageIndex) => (\n \n \n
    \n \n \n \n
    \n\n {pageIndex === 0 && (\n
    \n {AREA_TITLES[area]}\n
    \n )}\n\n {pageData.map((section) => React.cloneElement(section.content, { key: section.id }))}\n
    \n \n ))}\n \n );\n});\n\ntype BlockElementSection = {\n readonly id: string;\n readonly content: React.ReactElement;\n};\n\nfunction collectHvacPages(\n area: HvacArea,\n document: ReportGenerated,\n formData: ReportFormData,\n pageElement: HTMLDivElement,\n): BlockElementSection[][] {\n const sectionMargin = pt2px(10);\n const sectionHeight = (sectionId: string): number => assertNotEmpty(\n pageElement.querySelector(`[data-hvac-section=\"${sectionId}\"]`)?.clientHeight,\n `Could not calculate HVAC section \"${sectionId}\" height`,\n {},\n );\n\n const PAGE_HEIGHT = 986;\n const PAGE_HEADER_HEIGHT = pt2px(12) + pt2px(5);\n const AREA_NAME_HEIGHT = pt2px(12) + pt2px(10);\n\n const blocks: OutputBlock<'page', BlockElementSection>[] = [{\n block: 'page',\n widows: 1,\n orphans: 1,\n rows: document.hvac[area]\n .map((section) => linearizeHvacSection(section, formData))\n .flat(1)\n .map((section) => ({\n element: section,\n height: () => sectionHeight(section.id) + sectionMargin,\n })),\n }];\n\n return splitBlocksIntoPages(\n blocks,\n (pageIndex) => (\n pageIndex === 0\n ? PAGE_HEIGHT - PAGE_HEADER_HEIGHT - AREA_NAME_HEIGHT\n : PAGE_HEIGHT - PAGE_HEADER_HEIGHT\n ),\n );\n}\n\nfunction linearizeHvacSection(\n section: ReportGeneratedHvacSection,\n formData: ReportFormData,\n): BlockElementSection[] {\n const result: BlockElementSection[] = [];\n\n const isCommentShown = Boolean(section.actual.comment || section.future.comment);\n\n result.push({\n id: section.config.id,\n content: (\n
    \n
    \n
    \n {section.config.number} \n {Boolean(section.title) && `\\u00A0\\u2013 ${section.title}`}\n
    \n\n
    \n \n
    \n
    \n\n {formData.hvac.showComments && (\n
    \n
    \n
    \n \n
    \n\n {section.actual.title && (\n
    \n \n
    \n )}\n\n {section.actual.explanation && (\n
    \n \n
    \n )}\n\n {isCommentShown && (\n
    \n {section.actual.comment}\n
    \n )}\n
    \n\n
    \n \n
    \n\n
    \n
    \n \n
    \n\n {section.future.title && (\n
    \n \n
    \n )}\n\n {section.future.explanation && (\n
    \n \n
    \n )}\n\n {isCommentShown && (\n
    \n {section.future.comment}\n
    \n )}\n
    \n
    \n )}\n
    \n ),\n });\n\n for (const copy of section.copies) {\n result.push({\n id: copy.id,\n content: (\n
    \n
    \n
    \n {section.config.number}  – {copy.name}\n
    \n\n
    \n \n
    \n
    \n\n {formData.hvac.showComments && (\n
    \n
    \n
    \n \n
    \n\n {copy.actual.title && (\n
    \n \n
    \n )}\n\n {copy.actual.explanation && (\n
    \n \n
    \n )}\n\n {isCommentShown && (\n
    \n {copy.actual.comment}\n
    \n )}\n
    \n\n
    \n \n
    \n\n
    \n
    \n \n
    \n\n {copy.future.title && (\n
    \n \n
    \n )}\n\n {copy.future.explanation && (\n
    \n \n
    \n )}\n\n {isCommentShown && (\n
    \n {copy.future.comment}\n
    \n )}\n
    \n
    \n )}\n
    \n ),\n });\n }\n\n return result;\n}\n\nfunction pt2px(value: number): number {\n return value / 0.75;\n}\n\nconst AREA_TITLES = {\n heating: ,\n cooling: ,\n ventilation: ,\n};\n","import './ReportDocumentPageSavings.scss';\nimport { EnergySource, HvacArea } from '@belimo-retrofit-portal/logic';\nimport { Cloud, Lightning } from '@carbon/icons-react';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { CarbonSavingsUnit } from 'src/modules/common/components/CarbonSavingsUnit';\nimport { EnergyEfficiencyLabelWrapper } from 'src/modules/common/components/EnergyEfficiencyLabelWrapper';\nimport { EnergyEfficiencyStack } from 'src/modules/common/components/EnergyEfficiencyStack';\nimport { EnergySavingsUnit } from 'src/modules/common/components/EnergySavingsUnit';\nimport { SavingsValue } from 'src/modules/common/components/SavingsValue';\nimport { SavingTileCard } from 'src/modules/common/components/SavingTileCard';\nimport { sub } from 'src/modules/common/constants/formattingHelpers';\nimport { ArrowRightIcon } from 'src/modules/common/icons/ArrowRightIcon';\nimport { CoolingIcon } from 'src/modules/common/icons/CoolingIcon';\nimport { FanIcon } from 'src/modules/common/icons/FanIcon';\nimport { HeatingIcon } from 'src/modules/common/icons/HeatingIcon';\nimport { OutputDocumentPage } from 'src/modules/output/views/OutputDocumentPage';\nimport { OutputPage } from 'src/modules/output/views/OutputPage';\nimport { OutputTitle } from 'src/modules/output/views/OutputTitle';\nimport { ReportFormData } from 'src/modules/report/types/ReportFormData';\nimport { ReportGenerated } from 'src/modules/report/types/ReportGenerated';\nimport { Language } from 'src/types/common/Language';\n\ntype Props = {\n readonly language: Language;\n readonly document: ReportGenerated;\n readonly formData: ReportFormData;\n};\n\nexport const ReportDocumentPageSavings = ({ language, document, formData }: Props): React.ReactElement => (\n \n \n
    \n
    \n \n \n \n
    \n\n {(formData.savings.showOverallEfficiency || formData.savings.showPerAreaEfficiency) && (\n
    \n {formData.savings.showPotentialSavings && (\n
    \n
    \n \n
    \n\n
    \n }\n icon={}\n amountTitle={}\n amount={(\n \n )}\n unit={}\n small={true}\n >\n
    \n
    \n \n
    \n\n
    \n \n
    \n\n
    \n \n
    \n
    \n\n
    \n
    \n \n
    \n\n
    \n \n
    \n\n
    \n \n
    \n
    \n\n
    \n
    \n \n
    \n\n
    \n \n
    \n\n
    \n \n
    \n
    \n \n\n \n )}\n icon={}\n amountTitle={(\n \n )}\n amount={(\n \n )}\n unit={}\n small={true}\n >\n
    \n
    \n \n
    \n\n
    \n \n
    \n\n
    \n \n
    \n
    \n\n
    \n
    \n \n
    \n\n
    \n \n
    \n\n
    \n \n
    \n
    \n\n
    \n
    \n \n
    \n\n
    \n \n
    \n\n
    \n \n
    \n
    \n \n\n \n }\n icon={\n \n }\n amountTitle={}\n amount={(\n \n )}\n unit={}\n small={true}\n >\n
    \n
    \n \n
    \n\n
    \n \n
    \n\n
    \n \n
    \n
    \n\n
    \n
    \n \n
    \n\n
    \n \n
    \n\n
    \n \n
    \n
    \n\n
    \n
    \n \n
    \n\n
    \n \n
    \n\n
    \n \n
    \n
    \n \n
    \n
    \n )}\n\n
    \n {formData.savings.showOverallEfficiency && (\n
    \n
    \n \n
    \n\n \n
    \n \n\n \n
    \n\n
    \n \n\n \n
    \n
    \n
    \n )}\n\n {formData.savings.showPerAreaEfficiency && (\n
    \n
    \n \n
    \n\n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n \n
    \n\n \n
    \n\n
    \n \n\n
    \n \n
    \n\n \n
    \n
    \n\n
    \n
    \n
    \n \n
    \n\n \n
    \n\n
    \n \n\n
    \n \n
    \n\n \n
    \n
    \n\n
    \n
    \n
    \n \n
    \n\n \n
    \n\n
    \n \n\n
    \n \n
    \n\n \n
    \n
    \n
    \n
    \n )}\n\n {formData.savings.showPotentialSavings && (\n
    \n
    \n \n
    \n\n
    \n \n
    \n
    \n )}\n
    \n
    \n )}\n
    \n
    \n \n);\n\nconst a = (children: React.ReactNode): React.ReactElement => {children};\nconst b = (children: React.ReactNode): React.ReactElement => {children};\n","import './ReportDocumentPageSchema.scss';\nimport { SchemaArea } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { MATRIX_IDENTITY } from 'src/modules/common/constants/matrix';\nimport { CoolingIcon } from 'src/modules/common/icons/CoolingIcon';\nimport { FanIcon } from 'src/modules/common/icons/FanIcon';\nimport { HeatingIcon } from 'src/modules/common/icons/HeatingIcon';\nimport { OutputDocumentPage } from 'src/modules/output/views/OutputDocumentPage';\nimport { OutputPage } from 'src/modules/output/views/OutputPage';\nimport { OutputTitle } from 'src/modules/output/views/OutputTitle';\nimport { ReportFormData } from 'src/modules/report/types/ReportFormData';\nimport { ReportGenerated } from 'src/modules/report/types/ReportGenerated';\nimport { ReportDocumentPageSchemaCanvas } from 'src/modules/report/views/document/ReportDocumentPageSchemaCanvas';\nimport { Language } from 'src/types/common/Language';\n\ntype Props = {\n readonly language: Language;\n readonly area: SchemaArea;\n readonly document: ReportGenerated;\n readonly formData: ReportFormData;\n};\n\nexport const ReportDocumentPageSchema = ({ language, area, document, formData }: Props): React.ReactElement | null => {\n const currentSchema = document.schema[area];\n if (!currentSchema) {\n return null;\n }\n\n const { showZoomedIn, showComments } = formData.schema[area];\n const matrix = showZoomedIn\n ? currentSchema.matrix\n : MATRIX_IDENTITY;\n\n return (\n \n \n
    \n
    \n \n {AREA_TITLES[area]}\n \n
    \n\n
    \n
    \n
    \n {AREA_ICONS[area]}\n
    \n\n \n
    \n\n
    \n
    \n \n
    \n
    \n
    \n\n {currentSchema.future && (\n
    \n
    \n
    \n {AREA_ICONS[area]}\n
    \n\n \n
    \n\n
    \n
    \n \n
    \n
    \n\n
    \n )}\n\n {showComments && currentSchema.comment.length > 0 && (\n <>\n
    \n\n
    \n
    \n \n
    \n\n
    \n {currentSchema.comment}\n
    \n
    \n \n )}\n
    \n \n \n );\n};\n\nconst SECTION_ORDER = {\n [SchemaArea.HEATING]: 6_000,\n [SchemaArea.COOLING]: 7_000,\n [SchemaArea.VENTILATION]: 8_000,\n};\n\nconst AREA_TITLES = {\n [SchemaArea.HEATING]: ,\n [SchemaArea.COOLING]: ,\n [SchemaArea.VENTILATION]: ,\n};\n\nconst AREA_ICONS = {\n [SchemaArea.HEATING]: ,\n [SchemaArea.COOLING]: ,\n [SchemaArea.VENTILATION]: ,\n};\n","import './ReportDocumentPageSchemaCanvas.scss';\nimport { Matrix } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\nimport { SvgFile } from 'src/modules/common/components/SvgFile';\nimport { ConfigSchema } from 'src/modules/config/types/ConfigSchema';\nimport {\n SCHEMA_CONTAINER_SIZE,\n} from 'src/modules/schema/constants/schema';\nimport { SchemaContainer } from 'src/modules/schema/types/SchemaContainer';\nimport { SchemaDevice } from 'src/modules/schema/types/SchemaDevice';\nimport { SchemaVersion } from 'src/modules/schema/types/SchemaVersion';\nimport { SchemaDeviceView } from 'src/modules/schema/views/canvas/SchemaDeviceView';\n\ntype Props = {\n readonly schema: ConfigSchema;\n readonly version: SchemaVersion;\n readonly matrix: Matrix;\n};\n\nexport const ReportDocumentPageSchemaCanvas = ({ schema, version, matrix }: Props): React.ReactElement => {\n const transformLine = [\n matrix.a.toFixed(5),\n matrix.b.toFixed(5),\n matrix.c.toFixed(5),\n matrix.d.toFixed(5),\n matrix.e.toFixed(5),\n matrix.f.toFixed(5),\n ].join(' ');\n\n return (\n \n \n \n {version.assignments.map((assignment) => assignment.selection && (\n \n ))}\n \n \n );\n};\n\ntype DeviceProps = {\n readonly container: SchemaContainer;\n readonly selection: SchemaDevice;\n};\n\nconst DeviceShape = ({ container, selection }: DeviceProps): React.ReactElement => {\n const position = {\n x: container.position.x,\n y: container.position.y,\n };\n\n return (\n \n \n \n \n );\n};\n","import { Location } from 'src/modules/routing/types/Location';\nimport { TransitionTarget } from 'src/modules/routing/types/TransitionTarget';\nimport { createActions } from 'src/utils/createActions';\n\ntype RouteChangeRequestData = {\n readonly location: Location;\n};\n\nexport const ROUTE_CHANGE = createActions('ROUTE_CHANGE');\n","import { hideLoadingIndicator, showLoadingIndicator } from 'src/modules/loader/sagas/utils/loadingIndicator';\nimport { errorTransitionHandling } from 'src/modules/routing/hooks/errorTransitionHandling';\nimport { errorTransitionLogging } from 'src/modules/routing/hooks/errorTransitionLogging';\nimport { createGlobalTransitionLoggingSaga } from 'src/modules/routing/hooks/globalTransitionLogging';\nimport { ErrorHook } from 'src/modules/routing/types/ErrorHook';\nimport { TransitionHook } from 'src/modules/routing/types/TransitionHook';\nimport { scrollRestore } from 'src/modules/scroll/utils/scrollRestore';\n\nexport const ROUTING_PRE_HOOKS: ReadonlyArray = [\n createGlobalTransitionLoggingSaga('Starting transition'),\n showLoadingIndicator.bind(null, 'routing-transition'),\n];\n\nexport const ROUTING_POST_HOOKS: ReadonlyArray = [\n createGlobalTransitionLoggingSaga('Finishing transition'),\n hideLoadingIndicator.bind(null, 'routing-transition'),\n scrollRestore,\n];\n\nexport const ROUTING_ERROR_HOOKS: ReadonlyArray = [\n errorTransitionLogging,\n errorTransitionHandling,\n hideLoadingIndicator.bind(null, 'routing-transition'),\n];\n","import { ROUTING_ADMIN_STATES } from 'src/modules/routing/states/AdminStates';\nimport { ROUTING_HOME_STATES } from 'src/modules/routing/states/HomeStates';\nimport { ROUTING_LAYOUT_STATES } from 'src/modules/routing/states/LayoutStates';\nimport { ROUTING_LOGIN_STATES } from 'src/modules/routing/states/LoginStates';\nimport { ROUTING_ORGANIZATION_STATES } from 'src/modules/routing/states/OrganizationStates';\nimport { ROUTING_PROFILE_STATE } from 'src/modules/routing/states/ProfileState';\nimport { ROUTING_PROJECT_STATES } from 'src/modules/routing/states/ProjectStates';\nimport { RouteState } from 'src/modules/routing/types/RouteState';\n\nexport const ROUTING_STATES: ReadonlyArray = [\n ...ROUTING_LAYOUT_STATES,\n ...ROUTING_LOGIN_STATES,\n ...ROUTING_HOME_STATES,\n ...ROUTING_PROJECT_STATES,\n ...ROUTING_ADMIN_STATES,\n ...ROUTING_PROFILE_STATE,\n ...ROUTING_ORGANIZATION_STATES,\n];\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { ErrorPage } from 'src/modules/error/pages/ErrorPage';\nimport { getRoutingState } from 'src/modules/routing/selectors/getRoutingState';\nimport { RouterLoader } from 'src/modules/routing/views/RouterLoader';\n\ntype Props = {\n readonly children: React.ReactElement;\n};\n\nexport const Initialization = ({ children }: Props): React.ReactElement => {\n const routing = useSelector(getRoutingState);\n\n if (routing.transitionError) {\n return ;\n }\n if (routing.currentState) {\n return children;\n }\n\n return ;\n};\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { Switch } from 'react-router';\nimport { getCurrentLocation } from 'src/modules/routing/selectors/getCurrentLocation';\n\ntype Props = {\n readonly children: React.ReactNode;\n};\n\nexport const RouteSwitch = ({ children }: Props): React.ReactElement | null => {\n const location = useSelector(getCurrentLocation);\n\n return location\n ? {children}\n : null;\n};\n","import { RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { Location } from 'src/modules/routing/types/Location';\n\nexport class RouteNotFoundError extends RuntimeError {\n public constructor(\n public readonly location: Location,\n ) {\n super(`Route \"${location.pathname}\" not found`, { location });\n }\n\n public get name(): string {\n return 'RouteNotFoundError';\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { TransitionHook } from 'src/modules/routing/types/TransitionHook';\nimport { delay } from 'typed-redux-saga';\n\nexport function emulateTransitionDelay(firstDuration: number, enterDuration: number): TransitionHook {\n return function* saga(transition): SagaIterator {\n const duration = transition.from === null\n ? firstDuration\n : enterDuration;\n yield* delay(duration);\n };\n}\n","import { BaseError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { CancelledError } from 'src/errors/CancelledError';\nimport { restoreCurrentUrl } from 'src/modules/routing/sagas/restoreCurrentUrl';\nimport { call, cancel } from 'typed-redux-saga';\n\nexport function* cancelledErrorHandler(error: BaseError): SagaIterator {\n if (!(error instanceof CancelledError)) {\n return;\n }\n\n yield* call(restoreCurrentUrl);\n yield* cancel();\n}\n","import { BaseError } from '@belimo-retrofit-portal/logic';\nimport { replace } from 'connected-react-router';\nimport { SagaIterator } from 'redux-saga';\nimport { isHttpError } from 'src/modules/api/utils/isHttpError';\nimport { cancel, put } from 'typed-redux-saga';\n\nexport function* unauthorizedErrorHandler(error: BaseError): SagaIterator {\n if (!isHttpError(error, 401)) {\n return;\n }\n\n yield* put(replace('/login'));\n yield* cancel();\n}\n","import { BaseError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { call } from 'typed-redux-saga';\n\nexport function* unknownErrorHandler(error: BaseError): SagaIterator {\n yield* call(sentryCatch, error);\n}\n","import { BaseError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { cancelledErrorHandler } from 'src/modules/routing/hooks/errorHandlers/cancelledErrorHandler';\nimport { unauthorizedErrorHandler } from 'src/modules/routing/hooks/errorHandlers/unauthorizedErrorHandler';\nimport { unknownErrorHandler } from 'src/modules/routing/hooks/errorHandlers/unknownErrorHandler';\nimport { Transition } from 'src/modules/routing/types/Transition';\nimport { call } from 'typed-redux-saga';\n\nexport function* errorTransitionHandling(transition: Transition, error: BaseError): SagaIterator {\n yield* call(unauthorizedErrorHandler, error);\n yield* call(cancelledErrorHandler, error);\n yield* call(unknownErrorHandler, error);\n}\n","import { BaseError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { Transition } from 'src/modules/routing/types/Transition';\nimport { logError } from 'src/sagas/utils/logging';\nimport { call } from 'typed-redux-saga';\n\nexport function* errorTransitionLogging(transition: Transition, error: BaseError): SagaIterator {\n yield* call(logError, 'ROUTER. Transition failed', { transition, error });\n}\n","import { SagaIterator } from 'redux-saga';\nimport { Transition } from 'src/modules/routing/types/Transition';\nimport { TransitionHook } from 'src/modules/routing/types/TransitionHook';\nimport { logDebug } from 'src/sagas/utils/logging';\nimport { call } from 'typed-redux-saga';\n\nexport function createGlobalTransitionLoggingSaga(stage: string): TransitionHook {\n return function* saga(transition: Transition): SagaIterator {\n yield* call(logDebug, `ROUTER. ${stage}`, { transition });\n };\n}\n","import { SagaIterator } from 'redux-saga';\nimport { PROJECT_LIST_ABORT } from 'src/modules/project-list/actions/ProjectListActions';\nimport { logDebug } from 'src/sagas/utils/logging';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* abortProjectList(): SagaIterator {\n yield* call(logDebug, 'Aborting project list operations...');\n yield* put(PROJECT_LIST_ABORT.trigger());\n yield* call(logDebug, 'Aborting project list operations... done');\n}\n","import { SagaIterator } from 'redux-saga';\nimport { WHOAMI_ACTION } from 'src/modules/login/actions/WhoAmIAction';\nimport { loadUser } from 'src/modules/login/sagas/utils/loadUser';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* authenticate(): SagaIterator {\n try {\n yield* call(logDebug, 'Performing authentication...');\n\n const user = yield* call(loadUser);\n\n yield* call(logDebug, 'Performing authentication... done', { user });\n yield* put(WHOAMI_ACTION.trigger(user));\n } catch (error) {\n yield* call(logError, 'Performing authentication... error', { error });\n throw error;\n }\n}\n","import { replace } from 'connected-react-router';\nimport { SagaIterator } from 'redux-saga';\nimport { getIsAuthenticated } from 'src/modules/login/selectors/getIsAuthenticated';\nimport { cancel, put, select } from 'typed-redux-saga';\n\nexport function* checkIsAuthenticated(): SagaIterator {\n const isAuthenticated = yield* select(getIsAuthenticated);\n if (!isAuthenticated) {\n yield* put(replace('/login'));\n yield* cancel();\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { WHOAMI_ACTION } from 'src/modules/login/actions/WhoAmIAction';\nimport { performLogout } from 'src/modules/login/sagas/utils/performLogout';\nimport { logDebug } from 'src/sagas/utils/logging';\nimport { call, delay, put } from 'typed-redux-saga';\n\nexport function* destroySession(): SagaIterator {\n try {\n yield* call(logDebug, 'Logging out...');\n\n yield* delay(100);\n yield* call(performLogout);\n\n yield* call(logDebug, 'Logging out... done');\n yield* put(WHOAMI_ACTION.trigger(null));\n } catch (error) {\n yield* call(logDebug, 'Logging out... error', error);\n yield* put(WHOAMI_ACTION.trigger(null));\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { PASSWORD_RESET_TOKEN } from 'src/modules/password-reset/actions/PasswordResetActions';\nimport { validateRecoveryToken } from 'src/modules/password-reset/sagas/utils/validateRecoveryToken';\nimport { Transition } from 'src/modules/routing/types/Transition';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* fetchPasswordResetToken(transition: Transition): SagaIterator {\n const params = new URLSearchParams(transition.to.location.search);\n const token = params.get('token') ?? '';\n\n try {\n yield* call(logDebug, 'Checking password reset token...');\n\n yield* call(validateRecoveryToken, token);\n\n yield* call(logDebug, 'Checking password reset token... done');\n yield* put(PASSWORD_RESET_TOKEN.trigger(token));\n } catch (error) {\n yield* call(sentryCatch, error);\n yield* call(logError, 'Checking password reset token... error');\n yield* put(PASSWORD_RESET_TOKEN.trigger(null));\n }\n}\n","import { UUID } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { loadProject } from 'src/modules/common/sagas/utils/loadProject';\nimport { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { PROJECT_VIEW_FETCH } from 'src/modules/project-view/actions/ProjectViewActions';\nimport { RouteMatch } from 'src/modules/routing/types/RouteMatch';\nimport { Transition } from 'src/modules/routing/types/Transition';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { assertDecode } from 'src/utils/assert';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* fetchProjectDetails(transition: Transition, match: RouteMatch): SagaIterator {\n const id = assertDecode(\n match.params.id,\n UUID,\n 'Missing \"id\" route parameter',\n { transition, match },\n );\n\n try {\n yield* call(logDebug, `Fetching project \"${id}\" details...`);\n\n const project = yield* call(loadProject, id);\n const data = { project };\n\n yield* put(PROJECT_VIEW_FETCH.trigger(data, id));\n yield* call(logDebug, `Fetching project \"${id}\" details... done`, data);\n\n yield* call(scheduleUpdateLatestActivity);\n yield* call(scheduleUpdateFeedbackCounter);\n } catch (error) {\n yield* call(logError, `Fetching project \"${id}\" details... error`, error);\n throw error;\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { PROJECT_LIST_FETCH } from 'src/modules/project-list/actions/ProjectListActions';\nimport { loadProjectList } from 'src/modules/project-list/sagas/utils/loadProjectList';\nimport { loadProjectListViewMode } from 'src/modules/project-list/sagas/utils/loadProjectListViewMode';\nimport { saveProjectListViewMode } from 'src/modules/project-list/sagas/utils/saveProjectListViewMode';\nimport { ProjectListData } from 'src/modules/project-list/types/ProjectListData';\nimport { parseProjectListQuery } from 'src/modules/project-list/utils/query';\nimport { Transition } from 'src/modules/routing/types/Transition';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* fetchProjectList(transition: Transition): SagaIterator {\n const viewMode = yield* call(loadProjectListViewMode);\n const params = new URLSearchParams(transition.to.location.search);\n const query = yield* call(parseProjectListQuery, params, viewMode);\n\n try {\n yield* call(logDebug, 'Fetching project list...', query);\n\n const projects = yield* call(loadProjectList, query);\n const data: ProjectListData = { projects, query };\n\n // store selected view mode if overriden by URL\n yield* call(saveProjectListViewMode, query.view);\n\n yield* put(PROJECT_LIST_FETCH.trigger(data));\n yield* call(logDebug, 'Fetching project list... done', data);\n } catch (error) {\n yield* call(logError, 'Fetching project list... error', error);\n throw error;\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { SCHEMA_SELECTION_FETCH } from 'src/modules/schema/actions/SchemaActions';\nimport { loadSchemaSelection } from 'src/modules/schema/sagas/utils/loadSchemaSelection';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* fetchSchemaSelection(): SagaIterator {\n try {\n yield* call(logDebug, 'Fetching schema selection...');\n\n const selection = yield* call(loadSchemaSelection);\n yield* put(SCHEMA_SELECTION_FETCH.trigger(selection));\n\n yield* call(logDebug, 'Fetching schema selection... done', selection);\n } catch (error) {\n yield* call(logError, 'Fetching schema selection... error', error);\n throw error;\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { USERS_LIST_FETCH } from 'src/modules/users/actions/UsersActions';\nimport { loadUsersList } from 'src/modules/users/sagas/utils/loadUsersList';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* fetchUsersList(): SagaIterator {\n try {\n yield* call(logDebug, 'Fetching users list...');\n\n const data = yield* call(loadUsersList);\n\n yield* put(USERS_LIST_FETCH.trigger(data));\n yield* call(logDebug, 'Fetching users list... done', data);\n\n yield* call(scheduleUpdateLatestActivity);\n yield* call(scheduleUpdateFeedbackCounter);\n } catch (error) {\n yield* call(logError, 'Fetching users list... error', error);\n throw error;\n }\n}\n","import { replace } from 'connected-react-router';\nimport { LocationDescriptorObject } from 'history';\nimport { RouteHook } from 'src/modules/routing/types/RouteHook';\nimport { logDebug } from 'src/sagas/utils/logging';\nimport { call, cancel, put } from 'typed-redux-saga';\n\nexport function redirectTo(location: LocationDescriptorObject): RouteHook {\n return function* goto() {\n yield* call(logDebug, 'ROUTER. Redirecting to', location);\n yield* put(replace(location));\n yield* cancel();\n };\n}\n","import { SagaIterator } from 'redux-saga';\nimport { PASSWORD_RESET_TOKEN } from 'src/modules/password-reset/actions/PasswordResetActions';\nimport { put } from 'typed-redux-saga';\n\nexport function* resetPasswordResetToken(): SagaIterator {\n yield* put(PASSWORD_RESET_TOKEN.trigger(null));\n}\n","import { UUID } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { PROJECT_VIEW_RESET } from 'src/modules/project-view/actions/ProjectViewActions';\nimport { RouteMatch } from 'src/modules/routing/types/RouteMatch';\nimport { Transition } from 'src/modules/routing/types/Transition';\nimport { logDebug } from 'src/sagas/utils/logging';\nimport { assertDecode } from 'src/utils/assert';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* resetProjectDetails(transition: Transition, match: RouteMatch): SagaIterator {\n const id = assertDecode(\n match.params.id,\n UUID,\n 'Missing \"id\" route parameter',\n { transition, match },\n );\n\n yield* call(logDebug, `Resetting project \"${id}\" details...`);\n yield* put(PROJECT_VIEW_RESET.trigger(undefined, id));\n yield* call(logDebug, `Resetting project \"${id}\" details... done`);\n}\n","import { SagaIterator } from 'redux-saga';\nimport { PROJECT_LIST_RESET } from 'src/modules/project-list/actions/ProjectListActions';\nimport { logDebug } from 'src/sagas/utils/logging';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* resetProjectList(): SagaIterator {\n yield* call(logDebug, 'Resetting project list...');\n yield* put(PROJECT_LIST_RESET.trigger());\n yield* call(logDebug, 'Resetting project list... done');\n}\n","import { SagaIterator } from 'redux-saga';\nimport { USERS_LIST_RESET } from 'src/modules/users/actions/UsersActions';\nimport { logDebug } from 'src/sagas/utils/logging';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* resetUsersList(): SagaIterator {\n yield* call(logDebug, 'Resetting users list...');\n yield* put(USERS_LIST_RESET.trigger());\n yield* call(logDebug, 'Resetting users list... done');\n}\n","import { SagaIterator } from 'redux-saga';\nimport {\n MODAL_ORGANIZATION_ERROR_CLOSE,\n MODAL_ORGANIZATION_ERROR_OPEN,\n} from 'src/modules/modals/actions/ModalActions';\nimport { ORGANIZATION_SYNC_RESET } from 'src/modules/organization/actions/OrganizationActions';\nimport { forceOrganizationSync } from 'src/modules/organization/sagas/utils/forceOrganizationSync';\nimport { getOrganizationSyncData } from 'src/modules/organization/selectors/getOrganizationSyncData';\nimport { call, put, select, take } from 'typed-redux-saga';\n\nexport function* syncOrganization(): SagaIterator {\n const syncData = yield* select(getOrganizationSyncData);\n if (syncData === null) {\n return;\n }\n\n try {\n yield* call(forceOrganizationSync);\n\n // reset current synchronization status\n yield* put(ORGANIZATION_SYNC_RESET.trigger());\n } catch (error) {\n yield* put(MODAL_ORGANIZATION_ERROR_OPEN.trigger(syncData.formData));\n yield* take(MODAL_ORGANIZATION_ERROR_CLOSE.is);\n\n // reset current synchronization status\n yield* put(ORGANIZATION_SYNC_RESET.trigger());\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { MODAL_PROJECT_ERROR_CLOSE, MODAL_PROJECT_ERROR_OPEN } from 'src/modules/modals/actions/ModalActions';\nimport { PROJECT_SYNC_RESET } from 'src/modules/project-sync/actions/ProjectSyncActions';\nimport { forceProjectSynchronization } from 'src/modules/project-sync/sagas/utils/forceProjectSynchronization';\nimport { getProjectDetails } from 'src/modules/project-view/selectors/getProjectDetails';\nimport { call, put, select, take } from 'typed-redux-saga';\n\nexport function* syncProjectDetails(): SagaIterator {\n const project = yield* select(getProjectDetails);\n\n try {\n yield* call(forceProjectSynchronization, project);\n } catch (error) {\n yield* put(MODAL_PROJECT_ERROR_OPEN.trigger(project));\n yield* take(MODAL_PROJECT_ERROR_CLOSE.is);\n\n // reset current synchronization status\n yield* put(PROJECT_SYNC_RESET.trigger());\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { MODAL_USER_ERROR_CLOSE, MODAL_USER_ERROR_OPEN } from 'src/modules/modals/actions/ModalActions';\nimport { USER_SYNC_RESET } from 'src/modules/users/actions/UserActions';\nimport { forceUserSynchronization } from 'src/modules/users/sagas/utils/forceUserSynchronization';\nimport { getUsersListData } from 'src/modules/users/selectors/getUsersListData';\nimport { call, put, select, take } from 'typed-redux-saga';\n\nexport function* syncUser(): SagaIterator {\n const userSnapshots = yield* select(getUsersListData);\n const userSnapshotsToSync = userSnapshots.filter((userSnapshot) => userSnapshot.action !== null);\n\n try {\n yield* call(forceUserSynchronization, userSnapshotsToSync);\n } catch (error) {\n yield* put(MODAL_USER_ERROR_OPEN.trigger(userSnapshotsToSync));\n yield* take(MODAL_USER_ERROR_CLOSE.is);\n\n // reset current synchronization status\n yield* put(USER_SYNC_RESET.trigger());\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { RouteHook } from 'src/modules/routing/types/RouteHook';\nimport { RouteMatch } from 'src/modules/routing/types/RouteMatch';\nimport { Transition } from 'src/modules/routing/types/Transition';\nimport { logDebug } from 'src/sagas/utils/logging';\nimport { call } from 'typed-redux-saga';\n\nexport function createStateTransitionLoggingSaga(stage: string): RouteHook {\n return function* saga(transition: Transition, match: RouteMatch): SagaIterator {\n yield* call(logDebug, `ROUTER. ${stage}: ${match.state.name}`, { match, transition });\n };\n}\n","import { Action } from 'redux';\nimport { ROUTE_CHANGE } from 'src/modules/routing/actions/RouteChange';\nimport { RoutingState } from 'src/modules/routing/types/RoutingState';\n\nexport function routeChangeReducer(\n state: RoutingState,\n action: Action,\n): RoutingState {\n if (ROUTE_CHANGE.isPending(action)) {\n return {\n ...state,\n isTransitioning: true,\n };\n }\n\n if (ROUTE_CHANGE.isSuccess(action)) {\n return {\n ...state,\n isTransitioning: false,\n currentState: action.data,\n transitionError: null,\n };\n }\n\n if (ROUTE_CHANGE.isFailure(action)) {\n return {\n ...state,\n isTransitioning: false,\n transitionError: action.data,\n };\n }\n\n return state;\n}\n","import { routeChangeReducer } from 'src/modules/routing/reducers/routeChangeReducer';\nimport { RoutingState } from 'src/modules/routing/types/RoutingState';\nimport { chainReducers } from 'src/utils/chainReducers';\n\nconst defaultState: RoutingState = {\n isTransitioning: false,\n currentState: null,\n transitionError: null,\n};\n\nexport const routingReducer = chainReducers(defaultState, [\n routeChangeReducer,\n]);\n","import { BaseError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { ROUTING_ERROR_HOOKS } from 'src/modules/routing/constants/RoutingHooks';\nimport { Transition } from 'src/modules/routing/types/Transition';\nimport { call } from 'typed-redux-saga';\n\nexport function* handleTransitionError(transition: Transition, error: BaseError): SagaIterator {\n for (const errorHook of ROUTING_ERROR_HOOKS) {\n yield* call(errorHook, transition, error);\n }\n}\n","import { LocationChangeAction } from 'connected-react-router';\nimport { SagaIterator } from 'redux-saga';\nimport { ROUTE_CHANGE } from 'src/modules/routing/actions/RouteChange';\nimport { getIsRoutingBlocked } from 'src/modules/routing/selectors/getIsRoutingBlocked';\nimport { put, select } from 'typed-redux-saga';\n\nexport function* locationChangeSaga({ payload: { location } }: LocationChangeAction): SagaIterator {\n const isBlocked = yield* select(getIsRoutingBlocked);\n if (isBlocked) {\n return;\n }\n\n yield* put(ROUTE_CHANGE.request({ location }));\n}\n","import { SagaIterator } from 'redux-saga';\nimport { ROUTING_PRE_HOOKS, ROUTING_POST_HOOKS } from 'src/modules/routing/constants/RoutingHooks';\nimport { Transition } from 'src/modules/routing/types/Transition';\nimport { getStatesToEnter, getStatesToLeave, getStatesToRetain } from 'src/modules/routing/utils/transitionUtils';\nimport { call } from 'typed-redux-saga';\n\nexport function* performPreTransition(transition: Transition): SagaIterator {\n for (const preHook of ROUTING_PRE_HOOKS) {\n yield* call(preHook, transition);\n }\n\n const statesToLeave = yield* call(\n getStatesToLeave,\n transition.to.match,\n transition.from?.match ?? null,\n );\n for (const state of statesToLeave) {\n if (state.state.onLeaving) {\n yield* call(state.state.onLeaving, transition, state);\n }\n }\n\n const statesToRetain = yield* call(\n getStatesToRetain,\n transition.to.match,\n transition.from?.match ?? null,\n );\n for (const state of statesToRetain) {\n if (state.state.onRetaining) {\n yield* call(state.state.onRetaining, transition, state);\n }\n }\n\n const statesToEnter = yield* call(\n getStatesToEnter,\n transition.to.match,\n transition.from?.match ?? null,\n );\n for (const state of statesToEnter) {\n if (state.state.onEntering) {\n yield* call(state.state.onEntering, transition, state);\n }\n }\n}\n\nexport function* performPostTransition(transition: Transition): SagaIterator {\n const statesToLeave = yield* call(\n getStatesToLeave,\n transition.to.match,\n transition.from?.match ?? null,\n );\n for (const state of statesToLeave) {\n if (state.state.onLeft) {\n yield* call(state.state.onLeft, transition, state);\n }\n }\n\n const statesToRetain = yield* call(\n getStatesToRetain,\n transition.to.match,\n transition.from?.match ?? null,\n );\n for (const state of statesToRetain) {\n if (state.state.onRetained) {\n yield* call(state.state.onRetained, transition, state);\n }\n }\n\n const statesToEnter = yield* call(\n getStatesToEnter,\n transition.to.match,\n transition.from?.match ?? null,\n );\n for (const state of statesToEnter) {\n if (state.state.onEntered) {\n yield* call(state.state.onEntered, transition, state);\n }\n }\n\n for (const postHook of ROUTING_POST_HOOKS) {\n yield* call(postHook, transition);\n }\n}\n","import { replace } from 'connected-react-router';\nimport { SagaIterator } from 'redux-saga';\nimport { getCurrentLocation } from 'src/modules/routing/selectors/getCurrentLocation';\nimport { put, select } from 'typed-redux-saga';\n\nexport function* restoreCurrentUrl(): SagaIterator {\n const location = yield* select(getCurrentLocation);\n yield* put(location ? replace(location) : replace('/'));\n}\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { ROUTE_CHANGE } from 'src/modules/routing/actions/RouteChange';\nimport { ROUTING_STATES } from 'src/modules/routing/constants/RoutingStates';\nimport { RouteNotFoundError } from 'src/modules/routing/errors/RouteNotFoundError';\nimport { handleTransitionError } from 'src/modules/routing/sagas/handleTransitionError';\nimport { performPostTransition, performPreTransition } from 'src/modules/routing/sagas/performTransition';\nimport { getCurrentState } from 'src/modules/routing/selectors/getCurrentState';\nimport { TransitionTarget } from 'src/modules/routing/types/TransitionTarget';\nimport { createTransitionUid } from 'src/modules/routing/utils/createTransitionUid';\nimport { matchState } from 'src/modules/routing/utils/matchState';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, put, select } from 'typed-redux-saga';\n\nexport function* routeChangeSaga(\n { data: { location } }: GetRequestActionType,\n): SagaIterator {\n const match = yield* call(matchState, ROUTING_STATES, location.pathname);\n if (!match) {\n yield* put(ROUTE_CHANGE.failure(new RouteNotFoundError(location)));\n return;\n }\n\n const from = yield* select(getCurrentState);\n const to: TransitionTarget = {\n uid: yield* call(createTransitionUid),\n match: match,\n location: location,\n };\n\n try {\n yield* put(ROUTE_CHANGE.pending());\n yield* call(performPreTransition, { to, from });\n yield* put(ROUTE_CHANGE.success(to));\n yield* call(performPostTransition, { to, from });\n } catch (error) {\n const wrapped = NativeError.wrap(error);\n\n yield* call(handleTransitionError, { to, from }, wrapped);\n yield* put(ROUTE_CHANGE.failure(wrapped));\n }\n}\n","import { LOCATION_CHANGE } from 'connected-react-router';\nimport { SagaIterator } from 'redux-saga';\nimport { ROUTE_CHANGE } from 'src/modules/routing/actions/RouteChange';\nimport { locationChangeSaga } from 'src/modules/routing/sagas/locationChangeSaga';\nimport { routeChangeSaga } from 'src/modules/routing/sagas/routeChangeSaga';\nimport { takeLatest } from 'typed-redux-saga';\n\nexport function* routingSaga(): SagaIterator {\n yield* takeLatest(LOCATION_CHANGE, locationChangeSaga);\n yield* takeLatest(ROUTE_CHANGE.isRequest, routeChangeSaga);\n}\n","import { createSelector } from 'reselect';\nimport { getCurrentState } from 'src/modules/routing/selectors/getCurrentState';\n\nexport const getCurrentLocation = createSelector([\n getCurrentState,\n], (state) => state?.location ?? null);\n","import { createSelector } from 'reselect';\nimport { getCurrentState } from 'src/modules/routing/selectors/getCurrentState';\n\nexport const getCurrentMatch = createSelector([\n getCurrentState,\n], (state) => state?.match ?? null);\n","import { createSelector } from 'reselect';\nimport { getRoutingState } from 'src/modules/routing/selectors/getRoutingState';\n\nexport const getCurrentState = createSelector([\n getRoutingState,\n], (state) => state.currentState);\n","import { RootState } from 'src/types/RootState';\n\nexport function getIsRoutingBlocked(state: RootState): boolean {\n return state.modals.length > 0;\n}\n","import { RoutingState } from 'src/modules/routing/types/RoutingState';\nimport { RootState } from 'src/types/RootState';\n\nexport const getRoutingState = (state: RootState): RoutingState => state.routing;\n","import { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { emulateTransitionDelay } from 'src/modules/routing/hooks/emulateTransitionDelay';\nimport { fetchUsersList } from 'src/modules/routing/hooks/resolvers/fetchUsersList';\nimport { resetUsersList } from 'src/modules/routing/hooks/resolvers/resetUsersList';\nimport { syncUser } from 'src/modules/routing/hooks/resolvers/syncUser';\nimport { createStateTransitionLoggingSaga } from 'src/modules/routing/hooks/stateTransitionLogging';\nimport { RouteState } from 'src/modules/routing/types/RouteState';\nimport { composeSagas } from 'src/modules/routing/utils/composeSagas';\n\nexport const ROUTING_ADMIN_STATES: ReadonlyArray = [\n {\n url: '/admin/users',\n name: 'bp:admin:users',\n parent: 'bp:authorized',\n\n onEntering: composeSagas(\n createStateTransitionLoggingSaga('Entering'),\n emulateTransitionDelay(0, 300),\n fetchUsersList,\n ),\n onLeaving: composeSagas(\n createStateTransitionLoggingSaga('Leaving'),\n syncUser,\n ),\n onRetaining: composeSagas(\n createStateTransitionLoggingSaga('Retaining'),\n fetchUsersList,\n ),\n\n onEntered: composeSagas(\n createStateTransitionLoggingSaga('Entered'),\n scheduleUpdateLatestActivity,\n scheduleUpdateFeedbackCounter,\n ),\n onLeft: composeSagas(\n createStateTransitionLoggingSaga('Left'),\n resetUsersList,\n ),\n onRetained: composeSagas(\n createStateTransitionLoggingSaga('Retained'),\n ),\n },\n];\n","import { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { redirectTo } from 'src/modules/routing/hooks/resolvers/redirectTo';\nimport { createStateTransitionLoggingSaga } from 'src/modules/routing/hooks/stateTransitionLogging';\nimport { RouteState } from 'src/modules/routing/types/RouteState';\nimport { composeSagas } from 'src/modules/routing/utils/composeSagas';\n\nexport const ROUTING_HOME_STATES: ReadonlyArray = [\n {\n url: '/',\n name: 'bp:home',\n parent: 'bp:authorized',\n\n onEntering: composeSagas(\n createStateTransitionLoggingSaga('Entering'),\n redirectTo({ pathname: '/projects' }),\n ),\n onLeaving: composeSagas(\n createStateTransitionLoggingSaga('Leaving'),\n ),\n onRetaining: composeSagas(\n createStateTransitionLoggingSaga('Retaining'),\n ),\n\n onEntered: composeSagas(\n createStateTransitionLoggingSaga('Entered'),\n scheduleUpdateLatestActivity,\n scheduleUpdateFeedbackCounter,\n ),\n onLeft: composeSagas(\n createStateTransitionLoggingSaga('Left'),\n ),\n onRetained: composeSagas(\n createStateTransitionLoggingSaga('Retained'),\n ),\n },\n];\n","import { fetchAnnouncements } from 'src/modules/announcements/sagas/fetchAnnouncements';\nimport { emulateTransitionDelay } from 'src/modules/routing/hooks/emulateTransitionDelay';\nimport { authenticate } from 'src/modules/routing/hooks/resolvers/authenticate';\nimport { checkIsAuthenticated } from 'src/modules/routing/hooks/resolvers/checkIsAuthenticated';\nimport { destroySession } from 'src/modules/routing/hooks/resolvers/destroySession';\nimport { createStateTransitionLoggingSaga } from 'src/modules/routing/hooks/stateTransitionLogging';\nimport { RouteState } from 'src/modules/routing/types/RouteState';\nimport { composeSagas } from 'src/modules/routing/utils/composeSagas';\n\nexport const ROUTING_LAYOUT_STATES: ReadonlyArray = [\n {\n url: '',\n name: 'bp:global',\n parent: null,\n\n onEntering: composeSagas(\n createStateTransitionLoggingSaga('Entering'),\n ),\n onLeaving: composeSagas(\n createStateTransitionLoggingSaga('Leaving'),\n ),\n onRetaining: composeSagas(\n createStateTransitionLoggingSaga('Retaining'),\n ),\n\n onEntered: composeSagas(\n createStateTransitionLoggingSaga('Entered'),\n ),\n onLeft: composeSagas(\n createStateTransitionLoggingSaga('Left'),\n ),\n onRetained: composeSagas(\n createStateTransitionLoggingSaga('Retained'),\n ),\n },\n {\n url: '',\n name: 'bp:anonymous',\n parent: 'bp:global',\n\n onEntering: composeSagas(\n createStateTransitionLoggingSaga('Entering'),\n emulateTransitionDelay(0, 500),\n ),\n onLeaving: composeSagas(\n createStateTransitionLoggingSaga('Leaving'),\n ),\n onRetaining: composeSagas(\n createStateTransitionLoggingSaga('Retaining'),\n ),\n\n onEntered: composeSagas(\n createStateTransitionLoggingSaga('Entered'),\n destroySession,\n ),\n onLeft: composeSagas(\n createStateTransitionLoggingSaga('Left'),\n ),\n onRetained: composeSagas(\n createStateTransitionLoggingSaga('Retained'),\n ),\n },\n {\n url: '',\n name: 'bp:authorized',\n parent: 'bp:global',\n\n onEntering: composeSagas(\n createStateTransitionLoggingSaga('Entering'),\n emulateTransitionDelay(300, 300),\n authenticate,\n fetchAnnouncements,\n ),\n onLeaving: composeSagas(\n createStateTransitionLoggingSaga('Leaving'),\n ),\n onRetaining: composeSagas(\n createStateTransitionLoggingSaga('Retaining'),\n checkIsAuthenticated,\n ),\n\n onEntered: composeSagas(\n createStateTransitionLoggingSaga('Entered'),\n ),\n onLeft: composeSagas(\n createStateTransitionLoggingSaga('Left'),\n ),\n onRetained: composeSagas(\n createStateTransitionLoggingSaga('Retained'),\n ),\n },\n];\n","import { fetchPasswordResetToken } from 'src/modules/routing/hooks/resolvers/fetchPasswordResetToken';\nimport { resetPasswordResetToken } from 'src/modules/routing/hooks/resolvers/resetPasswordResetToken';\nimport { createStateTransitionLoggingSaga } from 'src/modules/routing/hooks/stateTransitionLogging';\nimport { RouteState } from 'src/modules/routing/types/RouteState';\nimport { composeSagas } from 'src/modules/routing/utils/composeSagas';\n\nexport const ROUTING_LOGIN_STATES: ReadonlyArray = [\n {\n url: '/login',\n name: 'bp:login',\n parent: 'bp:anonymous',\n\n onEntering: composeSagas(\n createStateTransitionLoggingSaga('Entering'),\n ),\n onLeaving: composeSagas(\n createStateTransitionLoggingSaga('Leaving'),\n ),\n onRetaining: composeSagas(\n createStateTransitionLoggingSaga('Retaining'),\n ),\n\n onEntered: composeSagas(\n createStateTransitionLoggingSaga('Entered'),\n ),\n onLeft: composeSagas(\n createStateTransitionLoggingSaga('Left'),\n ),\n onRetained: composeSagas(\n createStateTransitionLoggingSaga('Retained'),\n ),\n },\n {\n url: '/password/forgot',\n name: 'bp:password:forgot',\n parent: 'bp:anonymous',\n\n onEntering: composeSagas(\n createStateTransitionLoggingSaga('Entering'),\n ),\n onLeaving: composeSagas(\n createStateTransitionLoggingSaga('Leaving'),\n ),\n onRetaining: composeSagas(\n createStateTransitionLoggingSaga('Retaining'),\n ),\n\n onEntered: composeSagas(\n createStateTransitionLoggingSaga('Entered'),\n ),\n onLeft: composeSagas(\n createStateTransitionLoggingSaga('Left'),\n ),\n onRetained: composeSagas(\n createStateTransitionLoggingSaga('Retained'),\n ),\n },\n {\n url: '/password/reset',\n name: 'bp:password:reset',\n parent: 'bp:anonymous',\n\n onEntering: composeSagas(\n createStateTransitionLoggingSaga('Entering'),\n fetchPasswordResetToken,\n ),\n onLeaving: composeSagas(\n createStateTransitionLoggingSaga('Leaving'),\n ),\n onRetaining: composeSagas(\n createStateTransitionLoggingSaga('Retaining'),\n fetchPasswordResetToken,\n ),\n\n onEntered: composeSagas(\n createStateTransitionLoggingSaga('Entered'),\n ),\n onLeft: composeSagas(\n createStateTransitionLoggingSaga('Left'),\n resetPasswordResetToken,\n ),\n onRetained: composeSagas(\n createStateTransitionLoggingSaga('Retained'),\n ),\n },\n {\n url: '/password/setup',\n name: 'bp:password:setup',\n parent: 'bp:anonymous',\n\n onEntering: composeSagas(\n createStateTransitionLoggingSaga('Entering'),\n fetchPasswordResetToken,\n ),\n onLeaving: composeSagas(\n createStateTransitionLoggingSaga('Leaving'),\n ),\n onRetaining: composeSagas(\n createStateTransitionLoggingSaga('Retaining'),\n fetchPasswordResetToken,\n ),\n\n onEntered: composeSagas(\n createStateTransitionLoggingSaga('Entered'),\n ),\n onLeft: composeSagas(\n createStateTransitionLoggingSaga('Left'),\n resetPasswordResetToken,\n ),\n onRetained: composeSagas(\n createStateTransitionLoggingSaga('Retained'),\n ),\n },\n];\n","import { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { emulateTransitionDelay } from 'src/modules/routing/hooks/emulateTransitionDelay';\nimport { syncOrganization } from 'src/modules/routing/hooks/resolvers/syncOrganization';\nimport { createStateTransitionLoggingSaga } from 'src/modules/routing/hooks/stateTransitionLogging';\nimport { RouteState } from 'src/modules/routing/types/RouteState';\nimport { composeSagas } from 'src/modules/routing/utils/composeSagas';\n\nexport const ROUTING_ORGANIZATION_STATES: ReadonlyArray = [\n {\n url: '/admin/organization',\n name: 'bp:admin:organization',\n parent: 'bp:authorized',\n\n onEntering: composeSagas(\n createStateTransitionLoggingSaga('Entering'),\n emulateTransitionDelay(0, 300),\n ),\n onLeaving: composeSagas(\n createStateTransitionLoggingSaga('Leaving'),\n syncOrganization,\n ),\n onRetaining: composeSagas(\n createStateTransitionLoggingSaga('Retaining'),\n ),\n\n onEntered: composeSagas(\n createStateTransitionLoggingSaga('Entered'),\n scheduleUpdateLatestActivity,\n scheduleUpdateFeedbackCounter,\n ),\n onLeft: composeSagas(\n createStateTransitionLoggingSaga('Left'),\n ),\n onRetained: composeSagas(\n createStateTransitionLoggingSaga('Retained'),\n ),\n },\n];\n","import { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { emulateTransitionDelay } from 'src/modules/routing/hooks/emulateTransitionDelay';\nimport { createStateTransitionLoggingSaga } from 'src/modules/routing/hooks/stateTransitionLogging';\nimport { RouteState } from 'src/modules/routing/types/RouteState';\nimport { composeSagas } from 'src/modules/routing/utils/composeSagas';\n\nexport const ROUTING_PROFILE_STATE: ReadonlyArray = [\n {\n url: '/profile',\n name: 'bp:profile',\n parent: 'bp:authorized',\n\n onEntering: composeSagas(\n createStateTransitionLoggingSaga('Entering'),\n emulateTransitionDelay(0, 300),\n ),\n onLeaving: composeSagas(\n createStateTransitionLoggingSaga('Leaving'),\n ),\n onRetaining: composeSagas(\n createStateTransitionLoggingSaga('Retaining'),\n ),\n\n onEntered: composeSagas(\n createStateTransitionLoggingSaga('Entered'),\n scheduleUpdateLatestActivity,\n scheduleUpdateFeedbackCounter,\n ),\n onLeft: composeSagas(\n createStateTransitionLoggingSaga('Left'),\n ),\n onRetained: composeSagas(\n createStateTransitionLoggingSaga('Retained'),\n ),\n },\n];\n","import { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { emulateTransitionDelay } from 'src/modules/routing/hooks/emulateTransitionDelay';\nimport { abortProjectList } from 'src/modules/routing/hooks/resolvers/abortProjectList';\nimport { fetchProjectDetails } from 'src/modules/routing/hooks/resolvers/fetchProjectDetails';\nimport { fetchProjectList } from 'src/modules/routing/hooks/resolvers/fetchProjectList';\nimport { fetchSchemaSelection } from 'src/modules/routing/hooks/resolvers/fetchSchemaSelection';\nimport { resetProjectDetails } from 'src/modules/routing/hooks/resolvers/resetProjectDetails';\nimport { resetProjectList } from 'src/modules/routing/hooks/resolvers/resetProjectList';\nimport { syncProjectDetails } from 'src/modules/routing/hooks/resolvers/syncProjectDetails';\nimport { createStateTransitionLoggingSaga } from 'src/modules/routing/hooks/stateTransitionLogging';\nimport { RouteState } from 'src/modules/routing/types/RouteState';\nimport { composeSagas } from 'src/modules/routing/utils/composeSagas';\n\nexport const ROUTING_PROJECT_STATES: ReadonlyArray = [\n {\n url: '/projects',\n name: 'bp:project:list',\n parent: 'bp:authorized',\n\n onEntering: composeSagas(\n createStateTransitionLoggingSaga('Entering'),\n emulateTransitionDelay(0, 300),\n fetchProjectList,\n ),\n onLeaving: composeSagas(\n createStateTransitionLoggingSaga('Leaving'),\n abortProjectList,\n ),\n onRetaining: composeSagas(\n createStateTransitionLoggingSaga('Retaining'),\n abortProjectList,\n fetchProjectList,\n ),\n\n onEntered: composeSagas(\n createStateTransitionLoggingSaga('Entered'),\n ),\n onLeft: composeSagas(\n createStateTransitionLoggingSaga('Left'),\n resetProjectList,\n ),\n onRetained: composeSagas(\n createStateTransitionLoggingSaga('Retained'),\n abortProjectList,\n ),\n },\n {\n url: '/project/:id([-a-f0-9]+)',\n name: 'bp:project:view',\n parent: 'bp:authorized',\n\n onEntering: composeSagas(\n createStateTransitionLoggingSaga('Entering'),\n emulateTransitionDelay(0, 300),\n fetchProjectDetails,\n ),\n onLeaving: composeSagas(\n createStateTransitionLoggingSaga('Leaving'),\n ),\n onRetaining: composeSagas(\n createStateTransitionLoggingSaga('Retaining'),\n ),\n\n onEntered: composeSagas(\n createStateTransitionLoggingSaga('Entered'),\n scheduleUpdateLatestActivity,\n scheduleUpdateFeedbackCounter,\n ),\n onLeft: composeSagas(\n createStateTransitionLoggingSaga('Left'),\n resetProjectDetails,\n ),\n onRetained: composeSagas(\n createStateTransitionLoggingSaga('Retained'),\n ),\n },\n {\n url: '',\n name: 'bp:project:basedata',\n parent: 'bp:project:view',\n\n onEntering: composeSagas(\n createStateTransitionLoggingSaga('Entering'),\n emulateTransitionDelay(0, 300),\n ),\n onLeaving: composeSagas(\n createStateTransitionLoggingSaga('Leaving'),\n syncProjectDetails,\n ),\n onRetaining: composeSagas(\n createStateTransitionLoggingSaga('Retaining'),\n ),\n\n onEntered: composeSagas(\n createStateTransitionLoggingSaga('Entered'),\n scheduleUpdateLatestActivity,\n scheduleUpdateFeedbackCounter,\n ),\n onLeft: composeSagas(\n createStateTransitionLoggingSaga('Left'),\n ),\n onRetained: composeSagas(\n createStateTransitionLoggingSaga('Retained'),\n ),\n },\n {\n url: '/hvac',\n name: 'bp:project:hvac',\n parent: 'bp:project:view',\n\n onEntering: composeSagas(\n createStateTransitionLoggingSaga('Entering'),\n emulateTransitionDelay(0, 200),\n ),\n onLeaving: composeSagas(\n createStateTransitionLoggingSaga('Leaving'),\n syncProjectDetails,\n ),\n onRetaining: composeSagas(\n createStateTransitionLoggingSaga('Retaining'),\n ),\n\n onEntered: composeSagas(\n createStateTransitionLoggingSaga('Entered'),\n scheduleUpdateLatestActivity,\n scheduleUpdateFeedbackCounter,\n ),\n onLeft: composeSagas(\n createStateTransitionLoggingSaga('Left'),\n ),\n onRetained: composeSagas(\n createStateTransitionLoggingSaga('Retained'),\n ),\n },\n\n {\n url: '/schema',\n name: 'bp:project:schema',\n parent: 'bp:project:view',\n\n onEntering: composeSagas(\n createStateTransitionLoggingSaga('Entering'),\n emulateTransitionDelay(0, 300),\n fetchSchemaSelection,\n ),\n onLeaving: composeSagas(\n createStateTransitionLoggingSaga('Leaving'),\n syncProjectDetails,\n ),\n onRetaining: composeSagas(\n createStateTransitionLoggingSaga('Retaining'),\n ),\n\n onEntered: composeSagas(\n createStateTransitionLoggingSaga('Entered'),\n scheduleUpdateLatestActivity,\n scheduleUpdateFeedbackCounter,\n ),\n onLeft: composeSagas(\n createStateTransitionLoggingSaga('Left'),\n ),\n onRetained: composeSagas(\n createStateTransitionLoggingSaga('Retained'),\n ),\n },\n\n {\n url: '/evaluation',\n name: 'bp:project:evaluation',\n parent: 'bp:project:view',\n\n onEntering: composeSagas(\n createStateTransitionLoggingSaga('Entering'),\n emulateTransitionDelay(0, 300),\n ),\n onLeaving: composeSagas(\n createStateTransitionLoggingSaga('Leaving'),\n syncProjectDetails,\n ),\n onRetaining: composeSagas(\n createStateTransitionLoggingSaga('Retaining'),\n ),\n\n onEntered: composeSagas(\n createStateTransitionLoggingSaga('Entered'),\n scheduleUpdateLatestActivity,\n scheduleUpdateFeedbackCounter,\n ),\n onLeft: composeSagas(\n createStateTransitionLoggingSaga('Left'),\n ),\n onRetained: composeSagas(\n createStateTransitionLoggingSaga('Retained'),\n ),\n },\n\n {\n url: '/report',\n name: 'bp:project:report',\n parent: 'bp:project:view',\n\n onEntering: composeSagas(\n createStateTransitionLoggingSaga('Entering'),\n emulateTransitionDelay(0, 300),\n ),\n onLeaving: composeSagas(\n createStateTransitionLoggingSaga('Leaving'),\n syncProjectDetails,\n ),\n onRetaining: composeSagas(\n createStateTransitionLoggingSaga('Retaining'),\n ),\n\n onEntered: composeSagas(\n createStateTransitionLoggingSaga('Entered'),\n scheduleUpdateLatestActivity,\n scheduleUpdateFeedbackCounter,\n ),\n onLeft: composeSagas(\n createStateTransitionLoggingSaga('Left'),\n ),\n onRetained: composeSagas(\n createStateTransitionLoggingSaga('Retained'),\n ),\n },\n\n {\n url: '/report/document',\n name: 'bp:project:report-document',\n parent: 'bp:project:view',\n\n onEntering: composeSagas(\n createStateTransitionLoggingSaga('Entering'),\n emulateTransitionDelay(0, 300),\n ),\n onLeaving: composeSagas(\n createStateTransitionLoggingSaga('Leaving'),\n ),\n onRetaining: composeSagas(\n createStateTransitionLoggingSaga('Retaining'),\n ),\n\n onEntered: composeSagas(\n createStateTransitionLoggingSaga('Entered'),\n scheduleUpdateLatestActivity,\n scheduleUpdateFeedbackCounter,\n ),\n onLeft: composeSagas(\n createStateTransitionLoggingSaga('Left'),\n ),\n onRetained: composeSagas(\n createStateTransitionLoggingSaga('Retained'),\n ),\n },\n];\n","import { SagaIterator } from 'redux-saga';\nimport { call } from 'typed-redux-saga';\n\ntype SagaFactory = (...args: TArgs) => SagaIterator;\n\nexport function composeSagas(\n ...sagas: ReadonlyArray>\n): SagaFactory {\n return function* chain(...args: TArgs): SagaIterator {\n for (const saga of sagas) {\n yield* call(saga, ...args);\n }\n };\n}\n","import { SagaIterator } from 'redux-saga';\nimport { call } from 'typed-redux-saga';\n\nexport function* createTransitionUid(): SagaIterator {\n const n = yield* call(Math.random);\n return n.toString(36).substring(2);\n}\n","import { matchPath } from 'react-router';\nimport { RouteMatch } from 'src/modules/routing/types/RouteMatch';\nimport { RouteState } from 'src/modules/routing/types/RouteState';\nimport { assertNotNull } from 'src/utils/assert';\n\ntype StateTreeItem = {\n readonly url: string;\n readonly state: RouteState;\n readonly parent: StateTreeItem | null;\n};\n\nexport function matchState(\n states: ReadonlyArray,\n pathname: string,\n): RouteMatch | null {\n const stateTree = createStateTree(states, null);\n for (const statePath of stateTree) {\n const stateMatch = matchPath(pathname, { path: statePath.url, strict: true, sensitive: true, exact: true });\n if (!stateMatch) {\n continue;\n }\n\n return statePathToMatch(statePath, pathname);\n }\n\n return null;\n}\n\nfunction statePathToMatch(\n statePath: StateTreeItem,\n pathname: string,\n): RouteMatch {\n const stateMatch = assertNotNull(\n matchPath(pathname, { path: statePath.url, strict: true, sensitive: true, exact: false }),\n `Invalid route state \"${statePath.state.name}\" configuration`,\n { statePath, pathname },\n );\n\n return {\n state: statePath.state,\n params: stateMatch.params,\n parent: statePath.parent\n ? statePathToMatch(statePath.parent, pathname)\n : null,\n };\n}\n\nfunction createStateTree(\n states: ReadonlyArray,\n parent: StateTreeItem | null,\n): StateTreeItem[] {\n const parentName = parent\n ? parent.state.name\n : null;\n\n return states\n .filter((state) => state.parent === parentName)\n .reduce((result: StateTreeItem[], state: RouteState) => {\n const treeItem: StateTreeItem = {\n state: state,\n parent: parent,\n url: parent\n ? parent.url + state.url\n : state.url,\n };\n\n const children = createStateTree(states, treeItem);\n return children.length\n ? [...children, ...result]\n : [treeItem, ...result];\n }, []);\n}\n","import { RouteMatch } from 'src/modules/routing/types/RouteMatch';\nimport { RouteParams } from 'src/modules/routing/types/RouteParams';\n\nexport function isMatchEqual(match1: RouteMatch, match2: RouteMatch): boolean {\n return (\n match1.state.name === match2.state.name &&\n isParamsEqual(match1.params, match2.params)\n );\n}\n\nexport function isMatchContain(possibleAncestor: RouteMatch, match: RouteMatch): boolean {\n if (isMatchEqual(possibleAncestor, match)) {\n return true;\n }\n\n return possibleAncestor.parent\n ? isMatchContain(possibleAncestor.parent, match)\n : false;\n}\n\nfunction isParamsEqual(\n params1: RouteParams,\n params2: RouteParams,\n): boolean {\n const aKeys = Object.keys(params1);\n const bKeys = Object.keys(params2);\n\n return (\n aKeys.length === bKeys.length &&\n aKeys.every((key) => params1[key] === params2[key])\n );\n}\n","import { CallHistoryMethodAction } from 'connected-react-router';\nimport { SagaIterator } from 'redux-saga';\nimport { ROUTE_CHANGE } from 'src/modules/routing/actions/RouteChange';\nimport { put, take } from 'typed-redux-saga';\n\nexport function* navigate(\n action: CallHistoryMethodAction,\n): SagaIterator {\n yield* put(action);\n\n const result = yield* take([\n ROUTE_CHANGE.isSuccess,\n ROUTE_CHANGE.isFailure,\n ]);\n if (ROUTE_CHANGE.isFailure(result)) {\n throw result.data;\n }\n}\n","import { RouteMatch } from 'src/modules/routing/types/RouteMatch';\nimport { isMatchContain } from 'src/modules/routing/utils/matchUtils';\n\nexport function getStatesToLeave(to: RouteMatch, from: RouteMatch | null): RouteMatch[] {\n if (!from) {\n return [];\n }\n\n if (isMatchContain(to, from)) {\n return [];\n }\n\n return [from, ...getStatesToLeave(to, from.parent)];\n}\n\nexport function getStatesToEnter(to: RouteMatch, from: RouteMatch | null): RouteMatch[] {\n if (!from) {\n return getEnterPath(to);\n }\n\n if (isMatchContain(from, to)) {\n return [];\n }\n\n return to.parent\n ? [...getStatesToEnter(to.parent, from), to]\n : [to];\n}\n\nexport function getStatesToRetain(to: RouteMatch, from: RouteMatch | null): RouteMatch[] {\n if (!from) {\n return [];\n }\n\n if (isMatchContain(from, to)) {\n return getEnterPath(to);\n }\n\n return to.parent\n ? getStatesToRetain(to.parent, from)\n : [];\n}\n\nfunction getEnterPath(match: RouteMatch): RouteMatch[] {\n return match.parent\n ? [...getEnterPath(match.parent), match]\n : [match];\n}\n","import './RouterLoader.scss';\nimport { Loading } from '@carbon/react';\nimport React from 'react';\n\nexport const RouterLoader = (): React.ReactElement => (\n
    \n \n
    \n);\n","import { Matrix, SchemaArea } from '@belimo-retrofit-portal/logic';\nimport { ConfigSchema } from 'src/modules/config/types/ConfigSchema';\nimport { SchemaAreaMap } from 'src/modules/schema/types/SchemaAreaMap';\nimport { SchemaSelection } from 'src/modules/schema/types/SchemaSelection';\nimport { SchemaVersion } from 'src/modules/schema/types/SchemaVersion';\nimport { createActions } from 'src/utils/createActions';\nimport { createTrigger } from 'src/utils/createTrigger';\n\nexport const SCHEMA_TEMPLATE_SELECT =\n createTrigger('SCHEMA_TEMPLATE_SELECT');\n\nexport const SCHEMA_VERSION_CREATE =\n createTrigger('SCHEMA_VERSION_CREATE');\n\nexport const SCHEMA_VERSION_CHANGE =\n createTrigger('SCHEMA_VERSION_CHANGE');\n\nexport const SCHEMA_VERSION_REMOVE =\n createTrigger('SCHEMA_VERSION_REMOVE');\n\nexport const SCHEMA_COMMENT_CHANGE =\n createTrigger('SCHEMA_COMMENT_CHANGE');\n\nexport const SCHEMA_MATRIX_CHANGE = createTrigger('SCHEMA_MATRIX_CHANGE');\n\nexport const SCHEMA_SELECTION_FETCH =\n createTrigger>('SCHEMA_SELECTION_FETCH');\n\nexport const SCHEMA_SELECTION_CHANGE =\n createActions, SchemaArea>('SCHEMA_SELECTION_CHANGE');\n","import { SchemaArea } from '@belimo-retrofit-portal/logic';\nimport { Json } from 'fp-ts/Json';\nimport * as C from 'io-ts/Codec';\nimport { SchemaAreaMap } from 'src/modules/schema/types/SchemaAreaMap';\n\nexport const SCHEMA_AREA_MAP: (codec: C.Codec) => C.Codec> =\n (codec) => C.struct({\n [SchemaArea.HEATING]: C.nullable(codec),\n [SchemaArea.COOLING]: C.nullable(codec),\n [SchemaArea.VENTILATION]: C.nullable(codec),\n });\n","import { Json } from 'fp-ts/Json';\nimport * as C from 'io-ts/Codec';\nimport { SchemaSelection } from 'src/modules/schema/types/SchemaSelection';\n\nexport const SCHEMA_SELECTION: C.Codec = C.struct({\n id: C.string,\n});\n","import { DeviceType } from 'src/modules/common/types/DeviceType';\n\nexport const DEVICE_OPTIONS = [\n DeviceType.THROTTLING_CIRCUIT,\n DeviceType.DIVERTING_CIRCUIT,\n DeviceType.INJECTION_CIRCUIT,\n DeviceType.MIXING_CIRCUIT,\n DeviceType.BYPASS,\n DeviceType.PUMP,\n DeviceType.ACTIVE_OR_PASSIVE_CIRCUIT,\n DeviceType.SPECIFIC_CIRCUIT,\n DeviceType.CHANGEOVER,\n];\n","import { SchemaArea } from '@belimo-retrofit-portal/logic';\nimport { ThermalEnergy } from 'src/modules/common/types/ThermalEnergy';\nimport { SchemaAreaMap } from 'src/modules/schema/types/SchemaAreaMap';\nimport { SchemaSelection } from 'src/modules/schema/types/SchemaSelection';\n\nexport const SCHEMA_CONTAINER_SIZE = {\n x: 100,\n y: 100,\n};\n\nexport const SCHEMA_AREA_MAP: Record = {\n [ThermalEnergy.HEATING]: SchemaArea.HEATING,\n [ThermalEnergy.COOLING]: SchemaArea.COOLING,\n [ThermalEnergy.MIXED]: SchemaArea.HEATING, // TODO: ?!\n};\n\nexport const DEFAULT_SCHEMA_SELECTION: SchemaAreaMap = {\n [SchemaArea.HEATING]: null,\n [SchemaArea.COOLING]: null,\n [SchemaArea.VENTILATION]: null,\n};\n","import React from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { useAction } from 'src/hooks/useAction';\nimport { useBoundAction } from 'src/hooks/useBoundAction';\nimport { useParametricSelector } from 'src/hooks/useParametricSelector';\nimport { ProjectToolbar } from 'src/modules/common/components/ProjectToolbar';\nimport { AppLayout } from 'src/modules/common/layouts/AppLayout';\nimport { getConfigSchemas } from 'src/modules/config/selectors/getConfigSchemas';\nimport { PROJECT_VIEW_SHARE } from 'src/modules/project-view/actions/ProjectViewActions';\nimport { getProjectDetails } from 'src/modules/project-view/selectors/getProjectDetails';\nimport {\n SCHEMA_COMMENT_CHANGE,\n SCHEMA_MATRIX_CHANGE,\n SCHEMA_TEMPLATE_SELECT,\n SCHEMA_VERSION_CHANGE,\n SCHEMA_VERSION_CREATE,\n SCHEMA_VERSION_REMOVE,\n SCHEMA_SELECTION_CHANGE,\n} from 'src/modules/schema/actions/SchemaActions';\nimport { getSchemaFormData } from 'src/modules/schema/selectors/getSchemaFormData';\nimport { getSchemaSelection } from 'src/modules/schema/selectors/getSchemaSelection';\nimport { MultipleSchemasScreen } from 'src/modules/schema/views/MultipleSchemasScreen';\nimport { ShareProject } from 'src/modules/sharing-projects/containers/ShareProject';\n\nexport const SchemaPage = (): React.ReactElement => {\n const intl = useIntl();\n\n const project = useSelector(getProjectDetails);\n const schemas = useParametricSelector(getSchemaFormData, project);\n\n const templates = useSelector(getConfigSchemas);\n const selectTemplate = useAction(SCHEMA_TEMPLATE_SELECT.trigger);\n\n const selection = useSelector(getSchemaSelection);\n const changeSelection = useAction(SCHEMA_SELECTION_CHANGE.request);\n\n const createVersion = useAction(SCHEMA_VERSION_CREATE.trigger);\n const changeVersion = useAction(SCHEMA_VERSION_CHANGE.trigger);\n const removeVersion = useAction(SCHEMA_VERSION_REMOVE.trigger);\n const changeMatrix = useAction(SCHEMA_MATRIX_CHANGE.trigger);\n const changeComment = useAction(SCHEMA_COMMENT_CHANGE.trigger);\n\n const shareProject = useBoundAction(PROJECT_VIEW_SHARE.trigger, project);\n\n return (\n <>\n \n \n {intl.formatMessage({ id: 'schema/pageTitle' })}\n \n \n\n \n \n\n \n \n\n \n \n );\n};\n","import { DEFAULT_SCHEMA_SELECTION } from 'src/modules/schema/constants/schema';\nimport { schemaSelectionReducer } from 'src/modules/schema/reducers/schemaSelectionReducer';\nimport { SchemaState } from 'src/modules/schema/types/SchemaState';\nimport { chainReducers } from 'src/utils/chainReducers';\n\nconst defaultState: SchemaState = {\n selection: DEFAULT_SCHEMA_SELECTION,\n};\n\nexport const schemaReducer = chainReducers(defaultState, [\n schemaSelectionReducer,\n]);\n","import { Action } from 'redux';\nimport {\n SCHEMA_SELECTION_CHANGE,\n SCHEMA_SELECTION_FETCH,\n} from 'src/modules/schema/actions/SchemaActions';\nimport { SchemaState } from 'src/modules/schema/types/SchemaState';\n\nexport function schemaSelectionReducer(state: SchemaState, action: Action): SchemaState {\n if (SCHEMA_SELECTION_FETCH.is(action)) {\n return {\n ...state,\n selection: action.data,\n };\n }\n\n if (SCHEMA_SELECTION_CHANGE.isSuccess(action)) {\n return {\n ...state,\n selection: action.data,\n };\n }\n\n return state;\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { Project } from 'src/modules/common/types/Project';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { syncProjectBackground } from 'src/modules/project-sync/sagas/utils/syncProjectBackground';\nimport { getProjectDetails } from 'src/modules/project-view/selectors/getProjectDetails';\nimport { SCHEMA_COMMENT_CHANGE } from 'src/modules/schema/actions/SchemaActions';\nimport { getSchemaFormData } from 'src/modules/schema/selectors/getSchemaFormData';\nimport { SchemaFormData } from 'src/modules/schema/types/SchemaFormData';\nimport { mapSchemaFormDataToProject } from 'src/modules/schema/utils/mapSchema';\nimport { resolveReportSchemaSelection } from 'src/modules/schema/utils/resolveReportSchemaSelection';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { assertNotNull } from 'src/utils/assert';\nimport { GetTriggerActionType } from 'src/utils/createTrigger';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* schemaCommentChangeSaga(\n action: GetTriggerActionType,\n): SagaIterator {\n const comment = action.data;\n const area = action.meta;\n\n try {\n yield* call(logDebug, 'Saving schema area comment...', comment);\n\n const previous = yield* select(getProjectDetails);\n\n const previousProjectSchemaArea = assertNotNull(\n previous.data.schema[area],\n 'Could not find schema to change',\n );\n\n const previousSchema = yield* select(getSchemaFormData, previous);\n\n const previousSchemaArea = assertNotNull(\n previousSchema[area],\n 'Could not find schema to change',\n );\n\n const modifiedSchema: SchemaFormData = {\n ...previousSchemaArea,\n comment,\n };\n\n const schemaSelectionResult = yield* call(mapSchemaFormDataToProject, modifiedSchema);\n\n const modified: Project = {\n ...previous,\n data: {\n ...previous.data,\n schema: {\n ...previous.data.schema,\n [area]: {\n ...schemaSelectionResult,\n matrix: previousProjectSchemaArea.matrix,\n },\n },\n },\n };\n\n const modifiedReportProjectData = yield* call(resolveReportSchemaSelection, previous.data, modified.data, area);\n\n const modifiedReportProject: Project = {\n ...previous,\n data: modifiedReportProjectData,\n };\n\n const reloaded = yield* call(syncProjectBackground, modifiedReportProject);\n yield* call(logDebug, 'Saving schema area comment... done', reloaded);\n } catch (error) {\n const wrapped = new RuntimeError('Could not save schema area comment', { comment }, NativeError.wrap(error));\n yield* call(logError, 'Saving schema area comment... error', error);\n\n yield* call(sentryCatch, wrapped);\n yield* call(showNotification, { variant: 'error', type: 'error' });\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { Project } from 'src/modules/common/types/Project';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { syncProjectBackground } from 'src/modules/project-sync/sagas/utils/syncProjectBackground';\nimport { getProjectDetails } from 'src/modules/project-view/selectors/getProjectDetails';\nimport { SCHEMA_MATRIX_CHANGE } from 'src/modules/schema/actions/SchemaActions';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetTriggerActionType } from 'src/utils/createTrigger';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* schemaMatrixChangeSaga(\n action: GetTriggerActionType,\n): SagaIterator {\n const matrix = action.data;\n const area = action.meta;\n\n try {\n yield* call(logDebug, 'Saving schema matrix...', matrix);\n\n const previous = yield* select(getProjectDetails);\n\n const modified: Project = {\n ...previous,\n data: {\n ...previous.data,\n schema: {\n ...previous.data.schema,\n [area]: {\n ...previous.data.schema[area],\n matrix,\n },\n },\n },\n };\n\n const reloaded = yield* call(syncProjectBackground, modified);\n\n yield* call(logDebug, 'Saving schema matrix... done', reloaded);\n } catch (error) {\n const wrapped = new RuntimeError('Could not save schema version', { matrix }, NativeError.wrap(error));\n yield* call(logError, 'Saving schema version... error', error);\n\n yield* call(sentryCatch, wrapped);\n yield* call(showNotification, { variant: 'error', type: 'error' });\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport {\n SCHEMA_COMMENT_CHANGE,\n SCHEMA_MATRIX_CHANGE,\n SCHEMA_TEMPLATE_SELECT,\n SCHEMA_VERSION_CHANGE,\n SCHEMA_VERSION_CREATE,\n SCHEMA_VERSION_REMOVE,\n SCHEMA_SELECTION_CHANGE,\n} from 'src/modules/schema/actions/SchemaActions';\nimport { schemaCommentChangeSaga } from 'src/modules/schema/sagas/schemaCommentChangeSaga';\nimport { schemaMatrixChangeSaga } from 'src/modules/schema/sagas/schemaMatrixChangeSaga';\nimport { schemaSelectionChangeSaga } from 'src/modules/schema/sagas/schemaSelectionChangeSaga';\nimport { schemaTemplateSelectSaga } from 'src/modules/schema/sagas/schemaTemplateSelectSaga';\nimport { schemaVersionChangeSaga } from 'src/modules/schema/sagas/schemaVersionChangeSaga';\nimport { schemaVersionCreateSaga } from 'src/modules/schema/sagas/schemaVersionCreateSaga';\nimport { schemaVersionRemoveSaga } from 'src/modules/schema/sagas/schemaVersionRemoveSaga';\nimport { takeLatest } from 'typed-redux-saga';\n\nexport function* schemaSaga(): SagaIterator {\n yield* takeLatest(SCHEMA_TEMPLATE_SELECT.is, schemaTemplateSelectSaga);\n yield* takeLatest(SCHEMA_VERSION_CREATE.is, schemaVersionCreateSaga);\n yield* takeLatest(SCHEMA_VERSION_CHANGE.is, schemaVersionChangeSaga);\n yield* takeLatest(SCHEMA_VERSION_REMOVE.is, schemaVersionRemoveSaga);\n yield* takeLatest(SCHEMA_COMMENT_CHANGE.is, schemaCommentChangeSaga);\n yield* takeLatest(SCHEMA_MATRIX_CHANGE.is, schemaMatrixChangeSaga);\n yield* takeLatest(SCHEMA_SELECTION_CHANGE.isRequest, schemaSelectionChangeSaga);\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { SCHEMA_SELECTION_CHANGE } from 'src/modules/schema/actions/SchemaActions';\nimport { saveSchemaSelection } from 'src/modules/schema/sagas/utils/saveSchemaSelection';\nimport { getSchemaSelection } from 'src/modules/schema/selectors/getSchemaSelection';\nimport { SchemaAreaMap } from 'src/modules/schema/types/SchemaAreaMap';\nimport { SchemaSelection } from 'src/modules/schema/types/SchemaSelection';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, put, select } from 'typed-redux-saga';\n\nexport function* schemaSelectionChangeSaga(\n action: GetRequestActionType,\n): SagaIterator {\n const { data: schema, meta: area } = action;\n\n try {\n yield* call(logDebug, 'Saving schema selection...');\n yield* put(SCHEMA_SELECTION_CHANGE.pending(area));\n\n const previous = yield* select(getSchemaSelection);\n const modified: SchemaAreaMap = {\n ...previous,\n [area]: schema,\n };\n\n yield* call(saveSchemaSelection, modified);\n\n yield* call(logDebug, 'Saving schema selection... done');\n yield* put(SCHEMA_SELECTION_CHANGE.success(modified, area));\n } catch (error) {\n const wrapped = new RuntimeError('Could not save schema selection', { schema }, NativeError.wrap(error));\n yield* call(sentryCatch, wrapped);\n\n yield* call(logError, 'Saving schema selection... error', { error });\n yield* put(SCHEMA_SELECTION_CHANGE.failure(wrapped, area));\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { MATRIX_IDENTITY } from 'src/modules/common/constants/matrix';\nimport { Project } from 'src/modules/common/types/Project';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { syncProjectBackground } from 'src/modules/project-sync/sagas/utils/syncProjectBackground';\nimport { getProjectDetails } from 'src/modules/project-view/selectors/getProjectDetails';\nimport { SCHEMA_TEMPLATE_SELECT } from 'src/modules/schema/actions/SchemaActions';\nimport { SCHEMA_AREA_MAP } from 'src/modules/schema/constants/schema';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetTriggerActionType } from 'src/utils/createTrigger';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* schemaTemplateSelectSaga(\n action: GetTriggerActionType,\n): SagaIterator {\n const schema = action.data;\n\n try {\n yield* call(logDebug, 'Saving schema template...', schema);\n const { id, thermal_energy: thermalEnergy } = schema;\n const area = SCHEMA_AREA_MAP[thermalEnergy];\n\n const previous = yield* select(getProjectDetails);\n const modified: Project = {\n ...previous,\n data: {\n ...previous.data,\n schema: {\n ...previous.data.schema,\n [area]: {\n schema: id,\n comment: '',\n actual: {\n assignments: {},\n },\n future: [],\n matrix: MATRIX_IDENTITY,\n },\n },\n },\n };\n\n const reloaded = yield* call(syncProjectBackground, modified);\n yield* call(logDebug, 'Saving schema template... done', reloaded);\n } catch (error) {\n const wrapped = new RuntimeError('Could not save schema template', { schema }, NativeError.wrap(error));\n yield* call(logError, 'Saving schema template... error', error);\n\n yield* call(sentryCatch, wrapped);\n yield* call(showNotification, { variant: 'error', type: 'error' });\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { Project } from 'src/modules/common/types/Project';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { syncProjectBackground } from 'src/modules/project-sync/sagas/utils/syncProjectBackground';\nimport { getProjectDetails } from 'src/modules/project-view/selectors/getProjectDetails';\nimport { SCHEMA_VERSION_CREATE } from 'src/modules/schema/actions/SchemaActions';\nimport { getSchemaFormData } from 'src/modules/schema/selectors/getSchemaFormData';\nimport { SchemaFormData } from 'src/modules/schema/types/SchemaFormData';\nimport { mapSchemaFormDataToProject } from 'src/modules/schema/utils/mapSchema';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { assertNotNull } from 'src/utils/assert';\nimport { GetTriggerActionType } from 'src/utils/createTrigger';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* schemaVersionChangeSaga(\n action: GetTriggerActionType,\n): SagaIterator {\n const version = action.data;\n const area = action.meta;\n\n try {\n yield* call(logDebug, 'Saving schema version...', version);\n\n const previous = yield* select(getProjectDetails);\n\n const previousProjectSchemaArea = assertNotNull(\n previous.data.schema[area],\n 'Could not find schema to change',\n );\n\n const previousSchema = yield* select(getSchemaFormData, previous);\n\n const previousSchemaArea = assertNotNull(\n previousSchema[area],\n 'Could not find schema to change',\n );\n\n const modifiedSchema: SchemaFormData = {\n ...previousSchemaArea,\n actual: version.type === 'actual'\n ? version\n : previousSchemaArea.actual,\n future: version.type === 'future'\n ? previousSchemaArea.future.map((it) => (it.number === version.number ? version : it))\n : previousSchemaArea.future,\n };\n\n const schemaSelectionResult = yield* call(mapSchemaFormDataToProject, modifiedSchema);\n\n const modified: Project = {\n ...previous,\n data: {\n ...previous.data,\n schema: {\n ...previous.data.schema,\n [area]: {\n ...schemaSelectionResult,\n matrix: previousProjectSchemaArea.matrix,\n },\n },\n },\n };\n\n const reloaded = yield* call(syncProjectBackground, modified);\n yield* call(logDebug, 'Saving schema version... done', reloaded);\n } catch (error) {\n const wrapped = new RuntimeError('Could not save schema version', { version }, NativeError.wrap(error));\n yield* call(logError, 'Saving schema version... error', error);\n\n yield* call(sentryCatch, wrapped);\n yield* call(showNotification, { variant: 'error', type: 'error' });\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { Project } from 'src/modules/common/types/Project';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { syncProjectBackground } from 'src/modules/project-sync/sagas/utils/syncProjectBackground';\nimport { getProjectDetails } from 'src/modules/project-view/selectors/getProjectDetails';\nimport { SCHEMA_VERSION_CREATE } from 'src/modules/schema/actions/SchemaActions';\nimport { getSchemaFormData } from 'src/modules/schema/selectors/getSchemaFormData';\nimport { SchemaFormData } from 'src/modules/schema/types/SchemaFormData';\nimport { getReportPreselectedFutureVersion } from 'src/modules/schema/utils/getReportPreselectedFutureVersion';\nimport { mapSchemaFormDataToProject } from 'src/modules/schema/utils/mapSchema';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { assertNotNull } from 'src/utils/assert';\nimport { GetTriggerActionType } from 'src/utils/createTrigger';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* schemaVersionCreateSaga(\n action: GetTriggerActionType,\n): SagaIterator {\n const version = action.data;\n const area = action.meta;\n\n try {\n yield* call(logDebug, 'Creating schema version...', version);\n\n const previous = yield* select(getProjectDetails);\n\n const previousProjectSchemaArea = assertNotNull(\n previous.data.schema[area],\n 'Could not find schema to change',\n );\n\n const previousSchema = yield* select(getSchemaFormData, previous);\n\n const previousSchemaArea = assertNotNull(\n previousSchema[area],\n 'Could not find schema to change',\n );\n\n const modifiedSchemaNumber = previousSchemaArea.future\n .reduce((maxId, future) => Math.max(maxId, future.number), 0) + 1;\n\n const modifiedSchema: SchemaFormData = {\n ...previousSchemaArea,\n future: previousSchemaArea.future.concat({\n type: 'future',\n number: modifiedSchemaNumber,\n assignments: version.assignments,\n }),\n };\n\n const schemaSelectionResult = yield* call(mapSchemaFormDataToProject, modifiedSchema);\n\n const modified: Project = {\n ...previous,\n data: {\n ...previous.data,\n schema: {\n ...previous.data.schema,\n [area]: {\n ...schemaSelectionResult,\n matrix: previousProjectSchemaArea.matrix,\n },\n },\n },\n };\n\n const updatedReport = yield* call(\n getReportPreselectedFutureVersion,\n previous.data,\n modified.data,\n area,\n );\n\n const modifiedWithReport: Project = {\n ...modified,\n data: {\n ...modified.data,\n report: updatedReport,\n },\n };\n\n yield* call(\n showNotification,\n {\n type: 'done',\n variant: 'success',\n messageId: 'schema/versionCreate/success',\n messageValue: { schemaNumber: modifiedSchemaNumber },\n },\n );\n\n const reloaded = yield* call(syncProjectBackground, modifiedWithReport);\n\n yield* call(logDebug, 'Creating schema version... done', reloaded);\n } catch (error) {\n const wrapped = new RuntimeError('Could not create schema version', { version }, NativeError.wrap(error));\n yield* call(logError, 'Creating schema version... error', error);\n\n yield* call(sentryCatch, wrapped);\n yield* call(showNotification, { variant: 'error', type: 'error' });\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { Project } from 'src/modules/common/types/Project';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { syncProjectBackground } from 'src/modules/project-sync/sagas/utils/syncProjectBackground';\nimport { getProjectDetails } from 'src/modules/project-view/selectors/getProjectDetails';\nimport { SCHEMA_VERSION_CREATE } from 'src/modules/schema/actions/SchemaActions';\nimport { getSchemaFormData } from 'src/modules/schema/selectors/getSchemaFormData';\nimport { SchemaFormData } from 'src/modules/schema/types/SchemaFormData';\nimport { getReportPreselectedFutureVersion } from 'src/modules/schema/utils/getReportPreselectedFutureVersion';\nimport { mapSchemaFormDataToProject } from 'src/modules/schema/utils/mapSchema';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { assertNotNull } from 'src/utils/assert';\nimport { GetTriggerActionType } from 'src/utils/createTrigger';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* schemaVersionRemoveSaga(\n action: GetTriggerActionType,\n): SagaIterator {\n const version = action.data;\n const area = action.meta;\n\n try {\n yield* call(logDebug, 'Removing schema version...', version);\n\n const previous = yield* select(getProjectDetails);\n\n const previousProjectSchemaArea = assertNotNull(\n previous.data.schema[area],\n 'Could not find schema to change',\n );\n\n const previousSchema = yield* select(getSchemaFormData, previous);\n\n const previousSchemaArea = assertNotNull(\n previousSchema[area],\n 'Could not find schema to delete',\n );\n\n const modifiedSchema: SchemaFormData = {\n ...previousSchemaArea,\n future: version.type === 'future'\n ? previousSchemaArea.future.filter((it) => it.number !== version.number)\n : previousSchemaArea.future,\n };\n\n const schemaSelectionResult = yield* call(mapSchemaFormDataToProject, modifiedSchema);\n\n const modified: Project = {\n ...previous,\n data: {\n ...previous.data,\n schema: {\n ...previous.data.schema,\n [area]: version.type === 'actual'\n ? null\n : {\n ...schemaSelectionResult,\n matrix: previousProjectSchemaArea.matrix,\n },\n },\n },\n };\n\n const updatedReport = yield* call(\n getReportPreselectedFutureVersion,\n previous.data,\n modified.data,\n area,\n );\n\n const modifiedWithReport: Project = {\n ...modified,\n data: {\n ...modified.data,\n report: updatedReport,\n },\n };\n\n const reloaded = yield* call(syncProjectBackground, modifiedWithReport);\n yield* call(logDebug, 'Removing schema version... done', reloaded);\n } catch (error) {\n const wrapped = new RuntimeError('Could not remove schema version', { version }, NativeError.wrap(error));\n yield* call(logError, 'Removing schema version... error', error);\n\n yield* call(sentryCatch, wrapped);\n yield* call(showNotification, { variant: 'error', type: 'error' });\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { decodeOrGet } from 'src/io/utils/decodeOrGet';\nimport { SCHEMA_TEMPLATE_SELECTION } from 'src/modules/common/constants/localStorageKeys';\nimport { SCHEMA_AREA_MAP } from 'src/modules/schema/codecs/SchemaAreaMap';\nimport { SCHEMA_SELECTION } from 'src/modules/schema/codecs/SchemaSelection';\nimport { DEFAULT_SCHEMA_SELECTION } from 'src/modules/schema/constants/schema';\nimport { SchemaAreaMap } from 'src/modules/schema/types/SchemaAreaMap';\nimport { SchemaSelection } from 'src/modules/schema/types/SchemaSelection';\nimport { storageGet } from 'src/sagas/utils/storage';\nimport { call } from 'typed-redux-saga';\n\nexport function* loadSchemaSelection(): SagaIterator> {\n try {\n const stored = yield* call(storageGet, SCHEMA_TEMPLATE_SELECTION);\n return yield* call(decodeOrGet, STORAGE_CODEC, stored, DEFAULT_SCHEMA_SELECTION);\n } catch (error) {\n throw new RuntimeError('Could not load schema selection', {}, NativeError.wrap(error));\n }\n}\n\nconst STORAGE_CODEC = SCHEMA_AREA_MAP(SCHEMA_SELECTION);\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { SCHEMA_TEMPLATE_SELECTION } from 'src/modules/common/constants/localStorageKeys';\nimport { SCHEMA_AREA_MAP } from 'src/modules/schema/codecs/SchemaAreaMap';\nimport { SCHEMA_SELECTION } from 'src/modules/schema/codecs/SchemaSelection';\nimport { SchemaAreaMap } from 'src/modules/schema/types/SchemaAreaMap';\nimport { SchemaSelection } from 'src/modules/schema/types/SchemaSelection';\nimport { storageSet } from 'src/sagas/utils/storage';\nimport { call } from 'typed-redux-saga';\n\nexport function* saveSchemaSelection(\n selection: SchemaAreaMap,\n): SagaIterator {\n try {\n const stored = yield* call(STORAGE_CODEC.encode, selection);\n yield* call(storageSet, SCHEMA_TEMPLATE_SELECTION, stored);\n } catch (error) {\n throw new RuntimeError('Could not save schema selection', { selection }, NativeError.wrap(error));\n }\n}\n\nconst STORAGE_CODEC = SCHEMA_AREA_MAP(SCHEMA_SELECTION);\n","import { createSelector } from 'reselect';\nimport { getProjectLazy } from 'src/modules/common/selectors/getProjectLazy';\nimport { assertNotNull } from 'src/utils/assert';\n\nexport const getProjectSchema = createSelector([\n getProjectLazy,\n], (project) => assertNotNull(\n project.data.schema,\n 'Project schema is not selected',\n { project },\n));\n","import { createSelector } from 'reselect';\nimport { getConfigData } from 'src/modules/config/selectors/getConfigData';\nimport { getProjectSchema } from 'src/modules/schema/selectors/getProjectSchema';\nimport { mapSchemaProjectToFormData } from 'src/modules/schema/utils/mapSchema';\n\nexport const getSchemaFormData = createSelector([\n getProjectSchema,\n getConfigData,\n], mapSchemaProjectToFormData);\n","import { createSelector } from 'reselect';\nimport { getSchemaState } from 'src/modules/schema/selectors/getSchemaState';\n\nexport const getSchemaSelection = createSelector([\n getSchemaState,\n], (state) => state.selection);\n","import { SchemaState } from 'src/modules/schema/types/SchemaState';\nimport { RootState } from 'src/types/RootState';\n\nexport function getSchemaState(state: RootState): SchemaState {\n return state.schema;\n}\n","import { fromEvent, NEVER, Observable } from 'rxjs';\nimport { filter, map, pairwise, switchMap, takeUntil, takeWhile, tap } from 'rxjs/operators';\nimport { SchemaEventCanvas } from 'src/modules/schema/types/SchemaEvent';\n\nexport function canvasGesture(\n element: Element,\n): Observable {\n const useGesture = (\n window.GestureEvent !== undefined &&\n window.TouchEvent === undefined\n );\n if (!useGesture) {\n // we are not using Safari on macOS\n return NEVER;\n }\n\n const start$ = fromEvent(element, 'gesturestart', {\n once: false,\n capture: false,\n passive: false,\n });\n const change$ = fromEvent(element, 'gesturechange', {\n once: false,\n capture: false,\n passive: false,\n });\n const stop$ = fromEvent(element, 'gestureend', {\n once: false,\n capture: false,\n passive: true,\n });\n\n return start$.pipe(\n filter((event) => event.cancelable),\n tap((event) => event.preventDefault()),\n switchMap(() => change$.pipe(\n takeUntil(stop$),\n takeWhile((event) => event.cancelable),\n tap((event) => event.preventDefault()),\n pairwise(),\n map(([prev, curr]): SchemaEventCanvas => ({\n type: 'zoom',\n mode: 'relative',\n delta: curr.scale / prev.scale,\n point: {\n x: curr.pageX,\n y: curr.pageY,\n },\n })),\n )),\n );\n}\n","import { fromEvent, merge, Observable } from 'rxjs';\nimport { filter, map, mergeAll, pairwise, scan, skipWhile, switchMap, takeUntil, takeWhile } from 'rxjs/operators';\nimport { SchemaEventCanvas } from 'src/modules/schema/types/SchemaEvent';\n\nconst menu$ = fromEvent(window, 'contextmenu', {\n once: false,\n capture: true,\n passive: true,\n});\n\nexport function canvasPointer(\n element: Element,\n): Observable {\n const down$ = fromEvent(element, 'pointerdown', {\n once: false,\n capture: false,\n passive: true,\n });\n const move$ = fromEvent(element, 'pointermove', {\n once: false,\n capture: false,\n passive: true,\n });\n const stop$ = merge(\n ...[\n 'pointerup',\n 'pointercancel',\n 'pointerleave',\n ].map((eventName) => fromEvent(element, eventName, {\n once: false,\n capture: false,\n passive: true,\n })),\n );\n\n return down$.pipe(\n filter((event) => event.isPrimary),\n switchMap((start) => {\n const initial: ReadonlyMap = new Map([[start.pointerId, start]]);\n\n return merge(stop$, down$, move$).pipe(\n takeUntil(menu$),\n scan((store, event) => {\n const next = new Map(store);\n if (event.type === 'pointermove' || event.type === 'pointerdown') {\n next.set(event.pointerId, event);\n } else {\n next.delete(event.pointerId);\n }\n return next;\n }, initial),\n takeWhile((store) => store.size > 0),\n skipWhile((store) => ignoreMove(store, start)),\n pairwise(),\n map(([prev, curr]) => handleMove(prev, curr)),\n mergeAll(),\n );\n }),\n );\n}\n\nfunction ignoreMove(\n currStore: ReadonlyMap,\n initPoint: PointerEvent,\n): boolean {\n if (currStore.size > 1) {\n return false;\n }\n\n const currPoint = currStore.get(initPoint.pointerId);\n if (!currPoint) {\n return false;\n }\n\n return (\n Math.abs(currPoint.pageX - initPoint.pageX) <= UNCERTAINTY_THRESHOLD &&\n Math.abs(currPoint.pageY - initPoint.pageY) <= UNCERTAINTY_THRESHOLD\n );\n}\n\nfunction handleMove(\n prevStore: ReadonlyMap,\n nextStore: ReadonlyMap,\n): SchemaEventCanvas[] {\n if (nextStore.size < prevStore.size) {\n return [];\n }\n\n const [nextA, nextB = null] = nextStore.values();\n const prevA = prevStore.get(nextA.pointerId);\n if (!prevA) {\n return [];\n }\n\n if (nextB === null) {\n return [{\n type: 'move',\n delta: {\n x: nextA.pageX - prevA.pageX,\n y: nextA.pageY - prevA.pageY,\n },\n }];\n }\n\n const prevB = prevStore.get(nextB.pointerId);\n if (!prevB) {\n return [];\n }\n\n const prevCenter = {\n x: (prevA.pageX + prevB.pageX) / 2,\n y: (prevA.pageY + prevB.pageY) / 2,\n };\n const nextCenter = {\n x: (nextA.pageX + nextB.pageX) / 2,\n y: (nextA.pageY + nextB.pageY) / 2,\n };\n\n const prevDistance = Math.hypot(\n prevA.pageX - prevB.pageX,\n prevA.pageY - prevB.pageY,\n );\n const nextDistance = Math.hypot(\n nextA.pageX - nextB.pageX,\n nextA.pageY - nextB.pageY,\n );\n\n return [{\n type: 'move',\n delta: {\n x: nextCenter.x - prevCenter.x,\n y: nextCenter.y - prevCenter.y,\n },\n }, {\n type: 'zoom',\n mode: 'relative',\n delta: nextDistance / prevDistance,\n point: nextCenter,\n }];\n}\n\nconst UNCERTAINTY_THRESHOLD = 3;\n","import { fromEvent, Observable } from 'rxjs';\nimport { map, tap } from 'rxjs/operators';\nimport { SchemaEventCanvas } from 'src/modules/schema/types/SchemaEvent';\n\nexport function canvasWheel(\n element: Element,\n): Observable {\n const wheel$ = fromEvent(element, 'wheel', {\n once: false,\n capture: false,\n passive: false,\n });\n\n return wheel$.pipe(\n tap((event) => event.preventDefault()),\n map((event): SchemaEventCanvas => {\n if (!event.ctrlKey) {\n return {\n type: 'move',\n delta: {\n x: -event.deltaX,\n y: -event.deltaY,\n },\n };\n }\n\n const wheelDelta = Math.abs(getWheelDelta(event));\n const isMouseWheel = MOUSE_WHEEL_STEPS.has(wheelDelta) || MOUSE_WHEEL_STEPS.has(-wheelDelta);\n if (isMouseWheel) {\n return {\n type: 'zoom',\n mode: 'absolute',\n delta: -Math.sign(event.deltaY),\n point: {\n x: event.pageX,\n y: event.pageY,\n },\n };\n }\n\n return {\n type: 'zoom',\n mode: 'relative',\n delta: 1 - event.deltaY / 120,\n point: {\n x: event.pageX,\n y: event.pageY,\n },\n };\n }),\n );\n}\n\nfunction getWheelDelta(event: WheelEvent): number {\n if (event.deltaMode === WheelEvent.DOM_DELTA_PAGE) {\n return event.deltaY * 60;\n }\n if (event.deltaMode === WheelEvent.DOM_DELTA_LINE) {\n return event.deltaY * 20;\n }\n\n return event.deltaY;\n}\n\nconst MOUSE_WHEEL_STEPS = new Set([\n 200,\n 160,\n 120,\n 100,\n 80,\n]);\n","import { ProjectData, ProjectReport, SchemaArea } from '@belimo-retrofit-portal/logic';\n\nexport function getReportPreselectedFutureVersion(\n prevProjectData: ProjectData,\n nextProjectData: ProjectData,\n area: SchemaArea,\n): ProjectReport {\n const futureSchemaFirstId = nextProjectData.schema[area]?.future[0]?.id ?? null;\n\n const previousReport = prevProjectData.report;\n const previousFutureVersionSelected = previousReport.schema[area].futureVersion;\n const previousFutureVersionFound = nextProjectData.schema[area]?.future\n .find((version) => version.id === previousFutureVersionSelected);\n\n const report: ProjectReport = {\n ...previousReport,\n schema: {\n ...previousReport.schema,\n [area]: {\n ...previousReport.schema[area],\n futureVersion: previousFutureVersionFound\n ? previousFutureVersionFound.id\n : futureSchemaFirstId,\n },\n },\n };\n\n return report;\n}\n","import {\n DeviceIdentifier,\n ProjectSchema,\n ProjectSchemaArea,\n ProjectSchemaAssignments,\n SchemaArea,\n} from '@belimo-retrofit-portal/logic';\nimport { ConfigData } from 'src/modules/config/types/ConfigData';\nimport { ConfigSchema, ConfigSchemaContainer } from 'src/modules/config/types/ConfigSchema';\nimport { SchemaAreaMap } from 'src/modules/schema/types/SchemaAreaMap';\nimport { SchemaAssignment } from 'src/modules/schema/types/SchemaAssignment';\nimport { SchemaContainer } from 'src/modules/schema/types/SchemaContainer';\nimport { SchemaDevice } from 'src/modules/schema/types/SchemaDevice';\nimport { SchemaFormData } from 'src/modules/schema/types/SchemaFormData';\nimport { assertDefined } from 'src/utils/assert';\n\nexport function mapSchemaFormDataToProject(schema: SchemaFormData): Omit {\n return {\n schema: schema.schema.id,\n comment: schema.comment,\n actual: {\n assignments: mapAssignments(schema.actual.assignments),\n },\n future: schema.future.map((future) => ({\n id: future.number,\n assignments: mapAssignments(future.assignments),\n })),\n };\n\n function mapAssignments(assignments: ReadonlyArray): ProjectSchemaAssignments {\n const result: Record = {};\n for (const assignment of assignments) {\n if (assignment.selection) {\n result[assignment.container.id] = {\n deviceId: assignment.selection.device.id,\n valvePosition: assignment.selection.valvePosition,\n };\n }\n }\n\n return result;\n }\n}\n\nexport function mapSchemaProjectToFormData(schema: ProjectSchema, config: ConfigData): SchemaAreaMap {\n return {\n [SchemaArea.HEATING]: mapSchemaByArea(SchemaArea.HEATING),\n [SchemaArea.COOLING]: mapSchemaByArea(SchemaArea.COOLING),\n [SchemaArea.VENTILATION]: mapSchemaByArea(SchemaArea.VENTILATION),\n };\n\n function mapSchemaByArea(area: SchemaArea): SchemaFormData | null {\n const currentSchema = schema[area];\n if (!currentSchema) {\n return null;\n }\n\n const currentSchemaArea = assertDefined(\n config.schemas.find((configSchema) => configSchema.id === currentSchema.schema),\n `Schema template \"${currentSchema.schema}\" could not be found`,\n { schema, config },\n );\n\n return {\n schema: currentSchemaArea,\n matrix: currentSchema.matrix,\n comment: currentSchema.comment,\n actual: {\n type: 'actual',\n assignments: mapAssignments(currentSchema.actual.assignments, currentSchemaArea),\n },\n future: currentSchema.future.map((future) => ({\n type: 'future',\n number: future.id,\n assignments: mapAssignments(future.assignments, currentSchemaArea),\n })),\n };\n }\n\n function mapAssignments(assignments: ProjectSchemaAssignments, currentSchema: ConfigSchema): SchemaAssignment[] {\n return Object.entries(currentSchema.children).map(([id, child]) => {\n const container = mapContainer(id, child);\n const assignment = assignments[id];\n\n return {\n container: container,\n selection: assignment ? mapAssignment(container, assignment) : null,\n };\n });\n }\n\n function mapContainer(id: string, container: ConfigSchemaContainer): SchemaContainer {\n const configContainer = assertDefined(\n config.containers.find((it) => it.type === container.type),\n 'Could not find container configuration',\n { container, config },\n );\n\n return {\n id: id,\n type: container.type,\n\n name: configContainer.name,\n description: configContainer.description,\n\n position: {\n x: container.left,\n y: container.top,\n },\n devices: configContainer.children.map((device) => mapDevice(container, device)),\n };\n }\n\n function mapDevice(container: ConfigSchemaContainer, device: DeviceIdentifier): SchemaDevice {\n const configDevice = assertDefined(\n config.devices.find((it) => it.id === device.deviceId),\n 'Could not find device configuration',\n { container, device },\n );\n\n return {\n device: configDevice,\n orientation: container.orientation,\n valvePosition: device.valvePosition,\n flowDirection: container.flow_direction,\n thermalEnergy: container.termal_energy,\n };\n }\n\n function mapAssignment(container: SchemaContainer, assignment: DeviceIdentifier): SchemaDevice {\n const device = container.devices.find((it) => (\n it.device.id === assignment.deviceId &&\n it.valvePosition === assignment.valvePosition\n ));\n\n return assertDefined(\n device,\n 'Could not find assigned device',\n { assignment },\n );\n }\n}\n","import { ProjectData, SchemaArea } from '@belimo-retrofit-portal/logic';\n\nexport function resolveReportSchemaSelection(\n prevProjectData: ProjectData,\n nextProjectData: ProjectData,\n area: SchemaArea,\n): ProjectData {\n const isSchemaCommentArea = Boolean(nextProjectData.schema[area]?.comment.length);\n\n return {\n ...nextProjectData,\n report: {\n ...nextProjectData.report,\n schema: {\n ...nextProjectData.report.schema,\n [area]: {\n ...nextProjectData.report.schema[area],\n showComments: isSchemaCommentArea ? nextProjectData.report.schema[area].showComments : false,\n },\n },\n },\n };\n}\n","import { ModalBody, ModalFooter, ModalHeader } from '@carbon/react';\nimport { useForm } from '@form-ts/react';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CustomModal } from 'src/modules/common/components/CustomModal';\nimport { TextAreaField } from 'src/modules/form/components/TextAreaField';\nimport { FormError } from 'src/modules/form/types/FormError';\n\ntype Props = {\n readonly isOpen: boolean;\n readonly comment: string;\n readonly onSubmit: (comment: string) => void;\n readonly onClose: () => void;\n};\n\nexport const CommentVersionModal = (\n { isOpen, comment, onSubmit, onClose }: Props,\n): React.ReactElement => {\n const intl = useIntl();\n\n const form = useForm('schema.comment', {\n reinitialize: true,\n initialValues: comment || '',\n });\n\n const handleSubmit = useCallback(() => {\n onSubmit(form.currentState.values);\n onClose();\n }, [form, onSubmit, onClose]);\n\n return (\n \n }\n title={}\n />\n\n \n \n \n\n \n \n \n \n\n \n \n \n \n \n );\n};\n","import './DeleteVersionDialog.scss';\nimport { ModalBody, ModalFooter, ModalHeader } from '@carbon/react';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CustomModal } from 'src/modules/common/components/CustomModal';\nimport { BodySmallText } from 'src/modules/common/typography/BodySmallText';\nimport { LeadText } from 'src/modules/common/typography/LeadText';\nimport { SchemaVersion } from 'src/modules/schema/types/SchemaVersion';\n\ntype Props = {\n readonly isOpen: boolean;\n readonly version: SchemaVersion;\n readonly onClose: () => void;\n readonly onConfirm: () => void;\n};\n\nexport const DeleteVersionDialog = ({ isOpen, onClose, onConfirm, version }: Props): React.ReactElement => {\n const intl = useIntl();\n\n return (\n \n \n\n \n
    \n \n {\n version.type === 'actual' ? (\n \n ) : (\n \n )\n }\n \n\n {version.type === 'actual' && (\n \n \n \n )}\n
    \n
    \n\n \n \n \n \n\n \n \n \n \n \n );\n};\n","import './MultipleSchemasScreen.scss';\nimport { Matrix, SchemaArea, Uuid } from '@belimo-retrofit-portal/logic';\nimport { Checkmark } from '@carbon/icons-react';\nimport { RadioButton, RadioButtonGroup } from '@carbon/react';\nimport React, { memo, useCallback, useMemo, useState } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { BottomNavigationHelper } from 'src/modules/common/components/BottomNavigationHelper';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CARBON_THEME } from 'src/modules/common/constants/theme';\nimport { CircleCheckFilledIcon } from 'src/modules/common/icons/CircleCheckFilledIcon';\nimport { CommentIcon } from 'src/modules/common/icons/CommentIcon';\nimport { ConfigSchema } from 'src/modules/config/types/ConfigSchema';\nimport { SCHEMA_AREA_MAP } from 'src/modules/schema/constants/schema';\nimport { SchemaAreaMap } from 'src/modules/schema/types/SchemaAreaMap';\nimport { SchemaFormData } from 'src/modules/schema/types/SchemaFormData';\nimport { SchemaSelection } from 'src/modules/schema/types/SchemaSelection';\nimport { SchemaVersion } from 'src/modules/schema/types/SchemaVersion';\nimport { SchemaEditScreen } from 'src/modules/schema/views/SchemaEditScreen';\nimport { SchemaSelectScreen } from 'src/modules/schema/views/SchemaSelectScreen';\n\ntype Props = {\n readonly projectId: Uuid;\n readonly schemas: SchemaAreaMap;\n readonly templates: ReadonlyArray;\n readonly selection: SchemaAreaMap;\n readonly onSelectTemplate: (data: ConfigSchema) => void;\n readonly onChangeSelection: (data: SchemaSelection, meta: SchemaArea) => void;\n readonly onCreateVersion: (data: SchemaVersion, meta: SchemaArea) => void;\n readonly onChangeVersion: (data: SchemaVersion, meta: SchemaArea) => void;\n readonly onRemoveVersion: (data: SchemaVersion, meta: SchemaArea) => void;\n readonly onChangeComment: (data: string, meta: SchemaArea) => void;\n readonly onChangeMatrix: (data: Matrix, meta: SchemaArea) => void;\n};\n\nexport const MultipleSchemasScreen = memo(({\n projectId,\n schemas,\n selection,\n templates,\n onSelectTemplate,\n onChangeSelection,\n onCreateVersion,\n onChangeVersion,\n onRemoveVersion,\n onChangeComment,\n onChangeMatrix,\n}: Props): React.ReactElement => {\n const intl = useIntl();\n\n const [activeTab, setActiveTab] = useState(SchemaArea.HEATING);\n const [selectedVersionIndex, setSelectedVersionIndex] = useState(0);\n const [isCommentModalOpen, setCommentModalOpen] = useState(false);\n\n const currentAreaSchema = useMemo(() => schemas[activeTab] || null, [schemas, activeTab]);\n const currentAreaTemplates = useMemo(\n () => templates.filter((it) => SCHEMA_AREA_MAP[it.thermal_energy] === activeTab),\n [activeTab, templates],\n );\n const currentAreaSelection = useMemo(() => (\n currentAreaTemplates.find((item) => item.id === selection[activeTab]?.id) ??\n currentAreaTemplates[0] ??\n null\n ), [activeTab, currentAreaTemplates, selection]);\n\n const handleTabChange = useCallback((tab: unknown) => {\n setSelectedVersionIndex(0);\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n setActiveTab(tab as SchemaArea);\n }, []);\n\n const handleSelectionChange = useCallback((data: ConfigSchema) => {\n onChangeSelection({ id: data.id }, activeTab);\n }, [activeTab, onChangeSelection]);\n\n const handleSchemaCreate = useCallback(() => {\n if (currentAreaSelection) {\n onSelectTemplate(currentAreaSelection);\n }\n }, [currentAreaSelection, onSelectTemplate]);\n\n return (\n
    \n
    \n
    \n \n {SCHEMA_AREAS.map((area) => (\n \n \n\n {schemas[area]\n ? (\n \n )\n : null}\n
    \n )}\n />\n ))}\n \n\n {currentAreaSchema && (\n setCommentModalOpen(true)}\n >\n \n\n
    \n \n
    \n\n
    \n {currentAreaSchema.comment.length > 0 && }\n
    \n \n )}\n
    \n\n {currentAreaSchema ? (\n setCommentModalOpen(false)}\n isCommentModalOpen={isCommentModalOpen}\n key={activeTab}\n schema={currentAreaSchema}\n selectedVersionIndex={selectedVersionIndex}\n onSelectVersionIndex={setSelectedVersionIndex}\n onChangeMatrix={(matrix) => onChangeMatrix(matrix, activeTab)}\n onCreateVersion={(version) => onCreateVersion(version, activeTab)}\n onRemoveVersion={(version) => onRemoveVersion(version, activeTab)}\n onChangeVersion={(version) => onChangeVersion(version, activeTab)}\n onChangeComment={(comment) => onChangeComment(comment, activeTab)}\n />\n ) : (\n \n )}\n\n \n
    \n
    \n );\n});\n\nconst SCHEMA_AREAS = [\n SchemaArea.HEATING,\n SchemaArea.COOLING,\n];\n","import './SchemaCanvas.scss';\nimport { Matrix } from '@belimo-retrofit-portal/logic';\nimport { ZoomIn, ZoomOut, Maximize, Minimize, ZoomReset } from '@carbon/icons-react';\nimport { ModalBody, ModalFooter, ModalHeader, Tooltip } from '@carbon/react';\nimport { pipe } from 'fp-ts/function';\nimport React from 'react';\nimport { FormattedMessage, injectIntl, WrappedComponentProps } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CustomModal } from 'src/modules/common/components/CustomModal';\nimport { PreserveContent } from 'src/modules/common/components/PreserveContent';\nimport { MATRIX_IDENTITY } from 'src/modules/common/constants/matrix';\nimport { Point } from 'src/modules/common/types/Point';\nimport { bind } from 'src/modules/common/utils/decorator';\nimport { INTERPOLATION_MATRIX } from 'src/modules/common/utils/interpolation';\nimport { matrixInverse, matrixMultiply, matrixScale, matrixTranslate } from 'src/modules/common/utils/matrix';\nimport { pointTransform } from 'src/modules/common/utils/point';\nimport { spring } from 'src/modules/common/utils/spring';\nimport { ConfigSchema } from 'src/modules/config/types/ConfigSchema';\nimport { SchemaAssignment } from 'src/modules/schema/types/SchemaAssignment';\nimport { SchemaContainer } from 'src/modules/schema/types/SchemaContainer';\nimport { SchemaDevice } from 'src/modules/schema/types/SchemaDevice';\nimport { SchemaEventCanvas, SchemaEventCanvasMove, SchemaEventCanvasZoom } from 'src/modules/schema/types/SchemaEvent';\nimport { SchemaAssignments } from 'src/modules/schema/views/canvas/SchemaAssignments';\nimport { SchemaBackground } from 'src/modules/schema/views/canvas/SchemaBackground';\nimport { SchemaContainerPreview } from 'src/modules/schema/views/SchemaContainerPreview';\nimport { SchemaContainerSelect } from 'src/modules/schema/views/SchemaContainerSelect';\nimport { SchemaGesture } from 'src/modules/schema/views/SchemaGesture';\nimport { SchemaInputLayer } from 'src/modules/schema/views/SchemaInputLayer';\n\ntype Props = {\n readonly schema: ConfigSchema;\n readonly assignments: ReadonlyArray;\n readonly matrix: Matrix;\n readonly onChangeAssignments: (assignments: ReadonlyArray) => void;\n readonly onChangeMatrix: (matrix: Matrix) => void;\n};\ntype State = {\n readonly matrix: Matrix;\n readonly modal: SchemaAssignment | null;\n readonly preview: AssignedContainer | null;\n readonly isFullScreen: boolean;\n};\ntype AssignedContainer = {\n readonly container: SchemaContainer;\n readonly selection: SchemaDevice;\n};\n\nclass SchemaCanvasWithContext extends React.Component, State> {\n private readonly animation = spring({\n mass: 1,\n tension: 1000,\n friction: 65,\n\n // eslint-disable-next-line react/destructuring-assignment\n initialPosition: this.props.matrix,\n initialVelocity: { a: 0, b: 0, c: 0, d: 0, e: 0, f: 0 },\n\n onChange: (matrix, completed) => {\n this.setState({ matrix });\n\n if (completed) {\n // eslint-disable-next-line react/destructuring-assignment\n this.props.onChangeMatrix(matrix);\n }\n },\n\n precision: 0.001,\n interpolation: INTERPOLATION_MATRIX,\n });\n\n public readonly state: State = {\n // eslint-disable-next-line react/destructuring-assignment\n matrix: this.props.matrix,\n modal: null,\n preview: null,\n isFullScreen: false,\n };\n\n public render(): React.ReactElement {\n const { isFullScreen } = this.state;\n\n return (\n <>\n \n {isFullScreen\n ? null\n : this.renderContent()}\n \n\n {this.renderModals()}\n \n );\n }\n\n private renderContent(): React.ReactElement {\n const { schema } = this.props;\n const { matrix: { a: zoom } } = this.state;\n\n return (\n
    \n
    \n {\n zoom > 1\n ? (\n
    \n \n
    \n )\n : null\n }\n\n \n {this.renderCanvas()}\n \n
    \n
    \n {this.renderControls()}\n
    \n
    \n );\n }\n\n private renderCanvas(): React.ReactElement {\n const { matrix } = this.state;\n const { schema, assignments } = this.props;\n\n const transformLine = [\n matrix.a.toFixed(5),\n matrix.b.toFixed(5),\n matrix.c.toFixed(5),\n matrix.d.toFixed(5),\n matrix.e.toFixed(5),\n matrix.f.toFixed(5),\n ].join(',');\n\n return (\n \n \n \n \n \n
    \n \n
    \n
    \n );\n }\n\n private renderControls(): React.ReactElement {\n const { matrix, isFullScreen } = this.state;\n const { intl } = this.props;\n const zoomFactor = Math.round(matrix.a * 100);\n\n return (\n
    \n
    \n \n \n \n\n \n

    \n {zoomFactor}%\n

    \n \n\n = ZOOM_MAX * 100}\n onClick={this.handleZoomIn}\n hasIconOnly={true}\n iconDescription={intl.formatMessage({ id: 'schema/canvas/control/zoomIn' })}\n tooltipPosition=\"bottom\"\n >\n \n \n
    \n\n \n \n \n\n \n {isFullScreen ? : }\n \n
    \n );\n }\n\n private renderModals(): React.ReactElement {\n const { modal, preview, isFullScreen } = this.state;\n\n return (\n <>\n \n \n \n {isFullScreen ? this.renderContent() : null}\n \n \n \n\n \n \n {modal && (\n <>\n }\n titleClassName=\"bp-schema-canvas-modal__title\"\n title={}\n />\n\n \n \n \n \n )}\n \n \n\n \n \n {preview && (\n <>\n }\n titleClassName=\"bp-schema-canvas-modal__title\"\n title={}\n />\n\n \n \n \n\n \n \n \n \n\n this.handleContainerChange(preview)}\n >\n \n \n \n \n )}\n \n \n \n );\n }\n\n @bind()\n private handleFullScreenOpen(): void {\n this.setState({ isFullScreen: true });\n }\n\n @bind()\n private handleFullScreenClose(): void {\n this.setState({ isFullScreen: false });\n }\n\n @bind()\n private handleCanvasEvent(event: SchemaEventCanvas): void {\n if (event.type === 'zoom') {\n this.handleZoomEvent(event);\n } else if (event.type === 'move') {\n this.handleMoveEvent(event);\n }\n }\n\n private handleZoomEvent(event: SchemaEventCanvasZoom): void {\n const origin = this.getViewboxPoint(event.point);\n const scale = pipe(\n this.animation.target.a,\n (v) => (event.mode === 'relative' ? v * event.delta : v + event.delta * ZOOM_STEP),\n (v) => (event.mode === 'relative' ? v : Math.round(v / ZOOM_STEP) * ZOOM_STEP),\n (v) => Math.max(ZOOM_MIN, Math.min(ZOOM_MAX, v)),\n );\n\n this.zoomWithOrigin(origin, scale);\n }\n\n private handleMoveEvent(event: SchemaEventCanvasMove): void {\n const delta = {\n x: event.delta.x / this.animation.target.a,\n y: event.delta.y / this.animation.target.a,\n };\n\n const result = matrixMultiply(\n this.animation.target,\n matrixTranslate(delta),\n );\n\n this.animation.animate(this.applyMatrixConstraint(result));\n }\n\n @bind()\n private handleZoomIn(): void {\n const { schema } = this.props;\n\n const origin = this.getViewboxPoint({\n x: schema.width / 2,\n y: schema.height / 2,\n });\n const scale = pipe(\n this.animation.target.a,\n (v) => Math.floor(v / ZOOM_STEP) * ZOOM_STEP + ZOOM_STEP,\n (v) => Math.max(ZOOM_MIN, Math.min(ZOOM_MAX, v)),\n );\n\n this.zoomWithOrigin(origin, scale);\n }\n\n @bind()\n private handleZoomOut(): void {\n const { schema } = this.props;\n\n const origin = this.getViewboxPoint({\n x: schema.width / 2,\n y: schema.height / 2,\n });\n const scale = pipe(\n this.animation.target.a,\n (v) => Math.ceil(v / ZOOM_STEP) * ZOOM_STEP - ZOOM_STEP,\n (v) => Math.max(ZOOM_MIN, Math.min(ZOOM_MAX, v)),\n );\n\n this.zoomWithOrigin(origin, scale);\n }\n\n @bind()\n private handleZoomReset(): void {\n this.animation.animate(MATRIX_IDENTITY);\n }\n\n @bind()\n private handleContainerSelect(assignment: SchemaAssignment): void {\n if (!assignment.selection) {\n this.setState({ modal: assignment });\n return;\n }\n\n this.setState({\n preview: {\n container: assignment.container,\n selection: assignment.selection,\n },\n });\n }\n\n @bind()\n private handleContainerChange(assignment: SchemaAssignment): void {\n this.setState({ modal: assignment, preview: null });\n }\n\n @bind()\n private handleDeviceSelect(assignment: SchemaAssignment): void {\n const { assignments, onChangeAssignments } = this.props;\n onChangeAssignments(assignments.map((it) => (it.container.id === assignment.container.id ? assignment : it)));\n\n this.setState({ modal: null });\n }\n\n @bind()\n private handleContainerCancel(): void {\n this.setState({ modal: null, preview: null });\n }\n\n private getViewboxPoint(schemaPoint: Point): Point {\n return pointTransform(\n schemaPoint,\n matrixInverse(this.animation.target),\n );\n }\n\n private zoomWithOrigin(origin: Point, scale: number): void {\n const result = matrixMultiply(\n this.animation.target,\n matrixScale(scale / this.animation.target.a, origin),\n );\n\n this.animation.animate(this.applyMatrixConstraint(result));\n }\n\n private applyMatrixConstraint(matrix: Matrix): Matrix {\n const { schema } = this.props;\n\n const lt = {\n x: 0,\n y: 0,\n };\n const rb = {\n x: schema.width,\n y: schema.height,\n };\n\n const realLT = pointTransform(lt, matrix);\n const realRB = pointTransform(rb, matrix);\n\n const deltaX = realLT.x > lt.x\n ? lt.x - realLT.x\n : realRB.x < rb.x\n ? rb.x - realRB.x\n : 0;\n const deltaY = realLT.y > lt.y\n ? lt.y - realLT.y\n : realRB.y < rb.y\n ? rb.y - realRB.y\n : 0;\n if (deltaX === 0 && deltaY === 0) {\n return matrix;\n }\n\n return matrixMultiply(\n matrixTranslate({ x: deltaX, y: deltaY }),\n matrix,\n );\n }\n}\n\nconst ZOOM_MIN = 1.00;\nconst ZOOM_MAX = 6.00;\nconst ZOOM_STEP = 0.50;\n\nexport const SchemaCanvas = injectIntl(SchemaCanvasWithContext);\n","import './SchemaCard.scss';\nimport clsx from 'clsx';\nimport React, { useCallback } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { ConfigSchema } from 'src/modules/config/types/ConfigSchema';\n\ntype Props = {\n readonly schema: ConfigSchema;\n readonly selected: boolean;\n readonly onSelect: (schema: ConfigSchema) => void;\n};\n\nexport const SchemaCard = React.forwardRef(\n ({ schema, selected, onSelect }: Props, ref): React.ReactElement => {\n const handleSelect = useCallback(() => {\n onSelect(schema);\n }, [schema, onSelect]);\n\n return (\n \n
    \n {schema.id}\n
    \n\n

    \n \n

    \n\n
    \n \n
    \n \n );\n },\n);\n","import './SchemaClearContainersConfirmation.scss';\nimport { ModalBody, ModalFooter, ModalHeader } from '@carbon/react';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CustomModal } from 'src/modules/common/components/CustomModal';\nimport { BodySmallText } from 'src/modules/common/typography/BodySmallText';\nimport { LeadText } from 'src/modules/common/typography/LeadText';\n\ntype Props = {\n readonly isOpen: boolean;\n readonly onCancel: () => void;\n readonly onSubmit: () => void;\n};\n\nexport const SchemaClearContainersConfirmation = ({ isOpen, onCancel, onSubmit }: Props): React.ReactElement => {\n const intl = useIntl();\n\n return (\n \n \n\n \n
    \n \n \n \n\n \n \n \n
    \n
    \n\n \n \n \n \n\n \n \n \n \n \n );\n};\n","import './SchemaContainerPreview.scss';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { BodySmallText } from 'src/modules/common/typography/BodySmallText';\nimport { LeadText } from 'src/modules/common/typography/LeadText';\nimport { SchemaDevice } from 'src/modules/schema/types/SchemaDevice';\nimport { SchemaDeviceView } from 'src/modules/schema/views/canvas/SchemaDeviceView';\n\ntype Props = {\n readonly selection: SchemaDevice;\n};\n\nexport const SchemaContainerPreview = ({ selection }: Props): React.ReactElement => (\n
    \n
    \n \n \n \n
    \n\n \n \n \n\n {selection.device.explanation && (\n \n \n \n )}\n
    \n);\n\nconst PREVIEW_SIZE = {\n x: 250,\n y: 250,\n};\n","import './SchemaContainerSelect.scss';\nimport { Dropdown, OnChangeData } from '@carbon/react';\nimport clsx from 'clsx';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { DeviceType } from 'src/modules/common/types/DeviceType';\nimport { bind, memoize } from 'src/modules/common/utils/decorator';\nimport { DEVICE_OPTIONS } from 'src/modules/schema/constants/options';\nimport { SchemaAssignment } from 'src/modules/schema/types/SchemaAssignment';\nimport { SchemaDevice } from 'src/modules/schema/types/SchemaDevice';\nimport { SchemaDeviceView } from 'src/modules/schema/views/canvas/SchemaDeviceView';\n\ntype OptionType = {\n readonly value: DeviceType | 'allDevices';\n readonly label: DeviceType | 'allDevices';\n};\n\ntype Props = {\n readonly assignment: SchemaAssignment;\n readonly onSelectDevice: (assignment: SchemaAssignment) => void;\n};\ntype State = {\n readonly group: OptionType | null;\n};\n\nexport class SchemaContainerSelect extends React.Component {\n public readonly state: State = {\n group: null,\n };\n\n public render(): React.ReactElement {\n const { group } = this.state;\n const { assignment: { container, selection } } = this.props;\n\n return (\n
    \n }\n onChange={this.handleGroupChange}\n items={this.filteredDeviceOptions}\n itemToElement={this.renderItem}\n className=\"bp-dropdown-field bp-dropdown-field--lg\"\n selectedItem={group || this.filteredDeviceOptions[0]}\n renderSelectedItem={this.renderItem}\n />\n\n
    \n {container.devices\n .filter((it) => group === null || it.device.type === group.value)\n .map((device) => (\n \n
    \n \n \n \n
    \n\n
    \n \n
    \n\n {device.device.explanation && (\n

    \n \n

    \n )}\n \n ))}\n
    \n
    \n );\n }\n\n private renderItem(deviceType: OptionType): React.ReactElement {\n if (deviceType.value === 'allDevices') {\n return ;\n }\n\n return (\n \n );\n }\n\n private get filteredDeviceOptions(): OptionType[] {\n const { assignment: { container } } = this.props;\n\n const filteredOptions = DEVICE_OPTIONS.filter(\n (type) => container.devices.some((it) => it.device.type === type),\n );\n\n const composedOptions = filteredOptions.map((option) => ({\n value: option,\n label: option,\n }));\n\n if (filteredOptions.length > 1) {\n return [\n { value: 'allDevices', label: 'allDevices' },\n ...composedOptions,\n ];\n }\n\n return composedOptions;\n }\n\n @bind()\n private handleGroupChange(event: OnChangeData): void {\n this.setState({ group: event.selectedItem || { value: 'allDevices', label: 'allDevices' } });\n }\n\n @memoize((device) => device)\n private getDeviceSelectHandler(device: SchemaDevice): () => void {\n return () => {\n const { assignment, onSelectDevice } = this.props;\n onSelectDevice({ ...assignment, selection: device });\n };\n }\n}\n\nconst PREVIEW_SIZE = {\n x: 150,\n y: 150,\n};\n","import './SchemaEditScreen.scss';\nimport { Matrix } from '@belimo-retrofit-portal/logic';\nimport { Add } from '@carbon/icons-react';\nimport { Tabs, Tooltip } from '@carbon/react';\nimport React from 'react';\nimport { FormattedMessage, WrappedComponentProps, injectIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CustomTab, CustomTabList } from 'src/modules/common/components/CustomTabList';\nimport { HorizontalDivider } from 'src/modules/common/components/HorizontalDivider';\nimport { DeleteIcon } from 'src/modules/common/icons/DeleteIcon';\nimport { ResetIcon } from 'src/modules/common/icons/ResetIcon';\nimport { bind } from 'src/modules/common/utils/decorator';\nimport { SchemaAssignment } from 'src/modules/schema/types/SchemaAssignment';\nimport { SchemaFormData } from 'src/modules/schema/types/SchemaFormData';\nimport { SchemaVersion } from 'src/modules/schema/types/SchemaVersion';\nimport { CommentVersionModal } from 'src/modules/schema/views/CommentVersionModal';\nimport { DeleteVersionDialog } from 'src/modules/schema/views/DeleteVersionDialog';\nimport { SchemaCanvas } from 'src/modules/schema/views/SchemaCanvas';\nimport { SchemaClearContainersConfirmation } from 'src/modules/schema/views/SchemaClearContainersConfirmation';\n\ntype Props = {\n readonly schema: SchemaFormData;\n readonly selectedVersionIndex: number;\n readonly isCommentModalOpen: boolean;\n\n readonly handleCommentModalClose: () => void;\n readonly onSelectVersionIndex: React.Dispatch>;\n readonly onCreateVersion: (version: SchemaVersion) => void;\n readonly onRemoveVersion: (version: SchemaVersion) => void;\n readonly onChangeVersion: (version: SchemaVersion) => void;\n readonly onChangeMatrix: (matrix: Matrix) => void;\n readonly onChangeComment: (comment: string) => void;\n};\ntype State = {\n readonly schema: SchemaFormData;\n\n readonly isClearConfirmationOpen: boolean;\n readonly isDeleteConfirmationOpen: boolean;\n};\n\nclass SchemaEditScreenWithoutContext extends React.Component, State> {\n public readonly state: State = {\n // eslint-disable-next-line react/destructuring-assignment\n schema: this.props.schema,\n\n isClearConfirmationOpen: false,\n isDeleteConfirmationOpen: false,\n };\n\n public static getDerivedStateFromProps(nextProps: Props, prevState: State): Partial | null {\n const { onSelectVersionIndex } = nextProps;\n\n if (nextProps.schema.future.length !== prevState.schema.future.length) {\n onSelectVersionIndex(nextProps.schema.future.length);\n }\n\n return nextProps;\n }\n\n public render(): React.ReactElement {\n const {\n schema,\n intl,\n isCommentModalOpen,\n selectedVersionIndex,\n onSelectVersionIndex,\n handleCommentModalClose,\n onChangeMatrix,\n onChangeComment,\n } = this.props;\n const { isClearConfirmationOpen, isDeleteConfirmationOpen } = this.state;\n\n const isMaximumVersionAmountExceeded = schema.future.length >= 5;\n\n return (\n
    \n
    \n

    \n ,\n }}\n />\n

    \n
    \n\n \n\n
    \n
    \n \n \n onSelectVersionIndex(0)}\n >\n \n \n\n {schema.future.map((future, index) => (\n onSelectVersionIndex(index + 1)}\n >\n \n \n ))}\n \n \n\n
    \n \n \n \n\n \n \n \n\n {isMaximumVersionAmountExceeded ? (\n \n \n \n\n \n \n \n ) : (\n \n \n\n \n \n )}\n\n
    \n
    \n\n \n
    \n\n \n\n \n\n \n
    \n );\n }\n\n private get currentVersion(): SchemaVersion {\n const { selectedVersionIndex } = this.props;\n const { schema } = this.state;\n\n const versions = [schema.actual, ...schema.future];\n\n const currentVersion = selectedVersionIndex\n ? versions[selectedVersionIndex]\n : schema.actual;\n\n return currentVersion;\n }\n\n @bind()\n private handleDeleleOpen(): void {\n this.setState({ isDeleteConfirmationOpen: true });\n }\n\n @bind()\n private handleDeleleCancel(): void {\n this.setState({ isDeleteConfirmationOpen: false });\n }\n\n @bind()\n private handleDeleleSubmit(): void {\n this.setState({ isDeleteConfirmationOpen: false });\n\n const { onRemoveVersion, onSelectVersionIndex } = this.props;\n\n onRemoveVersion(this.currentVersion);\n // in case of deleting the actual version\n onSelectVersionIndex((prev) => Math.max(prev - 1, 0));\n }\n\n @bind()\n private handleClearOpen(): void {\n this.setState({ isClearConfirmationOpen: true });\n }\n\n @bind()\n private handleClearCancel(): void {\n this.setState({ isClearConfirmationOpen: false });\n }\n\n @bind()\n private handleClearSubmit(): void {\n this.setState({ isClearConfirmationOpen: false });\n\n const { onChangeVersion } = this.props;\n\n onChangeVersion({ ...this.currentVersion, assignments: [] });\n }\n\n @bind()\n private handleAssignmentsChange(assignments: ReadonlyArray): void {\n const { onChangeVersion } = this.props;\n\n onChangeVersion({ ...this.currentVersion, assignments });\n }\n\n @bind()\n private handleVersionCreate(): void {\n const { schema, onCreateVersion, onChangeVersion } = this.props;\n\n // only 5 future versions are allowed\n if (schema.future.length >= 5) {\n return;\n }\n\n onCreateVersion(this.currentVersion);\n onChangeVersion(this.currentVersion);\n }\n}\n\nexport const SchemaEditScreen = injectIntl(SchemaEditScreenWithoutContext);\n","/* eslint-disable react/no-unused-class-component-methods */\nimport './SchemaGesture.scss';\nimport { Matrix } from '@belimo-retrofit-portal/logic';\nimport React from 'react';\nimport { merge, Subscription } from 'rxjs';\nimport { MATRIX_IDENTITY } from 'src/modules/common/constants/matrix';\nimport { BBox } from 'src/modules/common/types/BBox';\nimport { Point } from 'src/modules/common/types/Point';\nimport { bind } from 'src/modules/common/utils/decorator';\nimport { matrixInverse, matrixMultiply, matrixScale, matrixTranslate } from 'src/modules/common/utils/matrix';\nimport { pointTransform } from 'src/modules/common/utils/point';\nimport { SchemaEventCanvas, SchemaEventCanvasMove, SchemaEventCanvasZoom } from 'src/modules/schema/types/SchemaEvent';\nimport { canvasGesture } from 'src/modules/schema/utils/event/canvasGesture';\nimport { canvasPointer } from 'src/modules/schema/utils/event/canvasPointer';\nimport { canvasWheel } from 'src/modules/schema/utils/event/canvasWheel';\n\ntype Props = {\n readonly width: number;\n readonly height: number;\n\n readonly onEvent: (event: SchemaEventCanvas) => void;\n readonly children: React.ReactNode;\n};\ntype State = {\n readonly bbox: BBox;\n readonly scale: Matrix;\n};\n\nexport class SchemaGesture extends React.PureComponent {\n private events = Subscription.EMPTY;\n\n private readonly container: React.RefObject = React.createRef();\n\n public readonly state: State = {\n bbox: { x: 0, y: 0, w: 0, h: 0 },\n scale: MATRIX_IDENTITY,\n };\n\n public componentDidMount(): void {\n this.handleResize();\n\n window.addEventListener('resize', this.handleResize, { passive: true });\n window.addEventListener('orientationchange', this.handleResize, { passive: true });\n\n if (this.container.current) {\n this.events.unsubscribe();\n this.events = merge(\n canvasGesture(this.container.current),\n canvasPointer(this.container.current),\n canvasWheel(this.container.current),\n ).subscribe(this.handleCanvasEvent);\n }\n }\n\n public componentWillUnmount(): void {\n window.removeEventListener('resize', this.handleResize);\n window.removeEventListener('orientationchange', this.handleResize);\n\n this.events.unsubscribe();\n }\n\n public render(): React.ReactElement {\n const { children, width, height } = this.props;\n const { scale } = this.state;\n\n const transformLine = [\n scale.a.toFixed(5),\n scale.b.toFixed(5),\n scale.c.toFixed(5),\n scale.d.toFixed(5),\n scale.e.toFixed(5),\n scale.f.toFixed(5),\n ].join(',');\n\n return (\n \n \n {children}\n \n \n );\n }\n\n @bind()\n private handleResize(): void {\n const rect = this.container.current?.getBoundingClientRect();\n if (!rect) {\n return;\n }\n\n const bbox: BBox = {\n x: rect.left,\n y: rect.top,\n w: rect.width,\n h: rect.height,\n };\n\n this.setState({\n bbox: bbox,\n scale: this.getScaleMatrix(bbox),\n });\n }\n\n @bind()\n private handleCanvasEvent(event: SchemaEventCanvas): void {\n if (event.type === 'zoom') {\n this.handleZoomEvent(event);\n } else if (event.type === 'move') {\n this.handleMoveEvent(event);\n }\n }\n\n @bind()\n private handleZoomEvent(event: SchemaEventCanvasZoom): void {\n const { bbox } = this.state;\n\n const origin = this.getViewboxPoint({\n x: Math.max(0, Math.min(bbox.w, event.point.x - bbox.x)),\n y: Math.max(0, Math.min(bbox.h, event.point.y - bbox.y)),\n });\n\n const { onEvent } = this.props;\n onEvent({\n type: 'zoom',\n mode: event.mode,\n delta: event.delta,\n point: origin,\n });\n }\n\n @bind()\n private handleMoveEvent(event: SchemaEventCanvasMove): void {\n const { scale } = this.state;\n\n const delta = {\n x: event.delta.x / scale.a,\n y: event.delta.y / scale.a,\n };\n\n const { onEvent } = this.props;\n onEvent({\n type: 'move',\n delta: delta,\n });\n }\n\n private getViewboxPoint(bboxPoint: Point): Point {\n const { scale } = this.state;\n\n return pointTransform(\n bboxPoint,\n matrixInverse(scale),\n );\n }\n\n private getScaleMatrix(bbox: BBox): Matrix {\n const { width, height } = this.props;\n\n const viewBoxRatio = bbox.w / bbox.h;\n const contentRatio = width / height;\n\n const scale = contentRatio > viewBoxRatio\n ? bbox.w / width\n : bbox.h / height;\n const delta = {\n x: (bbox.w - width) / 2,\n y: (bbox.h - height) / 2,\n };\n const center = {\n x: width / 2,\n y: height / 2,\n };\n\n return matrixMultiply(\n matrixTranslate(delta),\n matrixScale(scale, center),\n );\n }\n}\n","import './SchemaInputLayer.scss';\nimport { AddAlt } from '@carbon/icons-react';\nimport clsx from 'clsx';\nimport React from 'react';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { memoize } from 'src/modules/common/utils/decorator';\nimport { SCHEMA_CONTAINER_SIZE } from 'src/modules/schema/constants/schema';\nimport { SchemaAssignment } from 'src/modules/schema/types/SchemaAssignment';\nimport { SchemaContainer } from 'src/modules/schema/types/SchemaContainer';\n\ntype Props = {\n readonly assignments: ReadonlyArray;\n readonly onSelect: (assignment: SchemaAssignment) => void;\n};\n\nexport class SchemaInputLayer extends React.PureComponent {\n public render(): React.ReactElement {\n const { assignments } = this.props;\n\n return (\n
    \n {assignments.map((assignment) => (\n \n \n \n ))}\n
    \n );\n }\n\n @memoize((assignment) => assignment)\n private getSelectHandler(assignment: SchemaAssignment): () => void {\n return () => {\n const { onSelect } = this.props;\n onSelect(assignment);\n };\n }\n\n private getButtonStyles(container: SchemaContainer): React.CSSProperties {\n return {\n left: container.position.x,\n top: container.position.y,\n width: SCHEMA_CONTAINER_SIZE.x,\n height: SCHEMA_CONTAINER_SIZE.y,\n };\n }\n}\n","import './SchemaSelectScreen.scss';\nimport { SchemaArea } from '@belimo-retrofit-portal/logic';\nimport { InlineNotification } from '@carbon/react';\nimport React, { useEffect, useRef } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { HorizontalDivider } from 'src/modules/common/components/HorizontalDivider';\nimport { ConfigSchema } from 'src/modules/config/types/ConfigSchema';\nimport { SchemaCard } from 'src/modules/schema/views/SchemaCard';\n\ntype Props = {\n readonly area: SchemaArea;\n readonly templates: ReadonlyArray;\n readonly selection: ConfigSchema | null;\n readonly onSelect: (selection: ConfigSchema) => void;\n readonly onCreate: () => void;\n};\n\nexport const SchemaSelectScreen = ({\n area,\n templates,\n selection,\n onSelect,\n onCreate,\n}: Props): React.ReactElement => {\n const intl = useIntl();\n\n const cardRefs = useRef<{ [key: ConfigSchema['id']]: HTMLButtonElement | null }>({});\n\n useEffect(() => {\n if (selection && cardRefs.current[selection.id]) {\n cardRefs.current[selection.id]?.scrollIntoView({ behavior: 'smooth', block: 'nearest' });\n }\n }, [selection]);\n\n return templates.length !== 0 ? (\n
    \n

    \n \n

    \n\n \n\n
    \n \n \n \n
    \n\n
    \n
    \n
    \n {templates.map((schema) => (\n {\n cardRefs.current[schema.id] = el;\n }}\n key={schema.id}\n schema={schema}\n selected={schema === selection}\n onSelect={onSelect}\n />\n ))}\n
    \n\n
    \n {selection && (\n
    \n
    \n

    \n {selection.id}\n

    \n\n {selection.explanation && (\n

    \n \n

    \n )}\n
    \n\n
    \n \n
    \n
    \n )}\n
    \n
    \n
    \n
    \n ) : (\n \n );\n};\n","import React from 'react';\nimport { SCHEMA_CONTAINER_SIZE } from 'src/modules/schema/constants/schema';\nimport { SchemaAssignment } from 'src/modules/schema/types/SchemaAssignment';\nimport { SchemaContainer } from 'src/modules/schema/types/SchemaContainer';\nimport { SchemaDevice } from 'src/modules/schema/types/SchemaDevice';\nimport { SchemaDeviceView } from 'src/modules/schema/views/canvas/SchemaDeviceView';\n\ntype Props = {\n readonly assignments: ReadonlyArray;\n};\n\nexport const SchemaAssignments = React.memo(({ assignments }: Props): React.ReactElement => (\n \n {assignments.map((assignment) => (\n assignment.selection\n ? (\n \n )\n : (\n \n )\n ))}\n \n));\n\ntype ContainerProps = {\n readonly container: SchemaContainer;\n};\n\nconst SchemaContainerShape = ({ container }: ContainerProps): React.ReactElement => {\n const position = {\n x: container.position.x,\n y: container.position.y,\n };\n\n return (\n \n \n \n );\n};\n\ntype DeviceProps = {\n readonly container: SchemaContainer;\n readonly selection: SchemaDevice;\n};\n\nconst SchemaDeviceShape = ({ container, selection }: DeviceProps): React.ReactElement => {\n const position = {\n x: container.position.x,\n y: container.position.y,\n };\n\n return (\n \n \n\n \n \n \n\n \n \n );\n};\n","import React from 'react';\nimport { SvgFile } from 'src/modules/common/components/SvgFile';\nimport { ConfigSchema } from 'src/modules/config/types/ConfigSchema';\n\ntype Props = {\n readonly schema: ConfigSchema;\n};\n\nexport const SchemaBackground = React.memo(({ schema }: Props): React.ReactElement => (\n \n \n \n));\n","import React from 'react';\nimport { SvgFile } from 'src/modules/common/components/SvgFile';\nimport { Point } from 'src/modules/common/types/Point';\nimport { SchemaDevice } from 'src/modules/schema/types/SchemaDevice';\n\ntype Props = {\n readonly size: Point;\n readonly device: SchemaDevice;\n};\n\nexport const SchemaDeviceView = ({ size, device }: Props): React.ReactElement => (\n \n `/images/devices/${encodeURIComponent(\n [\n 'C',\n device.device.id,\n device.valvePosition,\n device.orientation,\n flowDirection,\n device.thermalEnergy,\n ].join(''),\n )}.svg`)}\n width={size.x}\n height={size.y}\n />\n \n);\n","import './ScreenSizeGuard.scss';\nimport { ModalBody } from '@carbon/react';\nimport { constUndefined } from 'fp-ts/lib/function';\nimport React, { memo, useCallback, useEffect, useState } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { CustomModal } from 'src/modules/common/components/CustomModal';\n\ntype Props = {\n children: React.ReactNode;\n};\n\nexport const ScreenSizeGuard = memo(({ children }: Props) => {\n const [screenWidth, setScreenWidth] = useState(window.innerWidth);\n\n const screenWidthChangeListener = useCallback(() => {\n setScreenWidth(window.innerWidth);\n }, []);\n\n useEffect(() => {\n window.addEventListener('resize', screenWidthChangeListener);\n\n window.screen.orientation.addEventListener('change', screenWidthChangeListener);\n\n return (): void => {\n window.removeEventListener('resize', screenWidthChangeListener);\n\n window.screen.orientation.removeEventListener('change', screenWidthChangeListener);\n };\n }, [screenWidthChangeListener]);\n\n return screenWidth >= supportedScreenWidth\n ? children\n : (\n
    \n \n \n

    \n \n

    \n\n

    \n \n

    \n\n

    \n \n

    \n\n

    \n \n

    \n
    \n \n
    \n );\n});\n\nconst supportedScreenWidth = 1024;\n","import { ScrollRestoration } from 'src/modules/scroll/types/ScrollRestoration';\nimport { createTrigger } from 'src/utils/createTrigger';\n\nexport const SCROLL_RESTORE = createTrigger('SCROLL_RESTORE');\n","import { History } from 'history';\nimport { useEffect } from 'react';\nimport { useSelector } from 'react-redux';\nimport { useAction } from 'src/hooks/useAction';\nimport { SCROLL_RESTORE } from 'src/modules/scroll/actions/ScrollRestoration';\nimport { getScrollRestoration } from 'src/modules/scroll/selectors/getScrollRestoration';\n\ntype Props = {\n readonly history: History;\n};\n\nexport const ScrollRestoration = ({ history }: Props): null => {\n const scrollPosition = useSelector(getScrollRestoration);\n const scrollRestore = useAction(SCROLL_RESTORE.trigger);\n\n useEffect(() => {\n window.history.scrollRestoration = 'manual';\n\n const unlisten = history.listen((location, action) => {\n if (action === 'REPLACE') {\n scrollRestore({\n isRestoring: false,\n lastScrollPosition: window.scrollY,\n });\n }\n\n if (action === 'PUSH') {\n scrollRestore({\n isRestoring: false,\n lastScrollPosition: window.scrollY,\n });\n }\n\n if (action === 'POP') {\n scrollRestore({\n isRestoring: true,\n lastScrollPosition: scrollPosition.lastScrollPosition,\n });\n }\n });\n\n return () => {\n unlisten();\n window.history.scrollRestoration = 'auto';\n };\n }, [history, scrollRestore, scrollPosition.lastScrollPosition]);\n\n return null;\n};\n","import { scrollRestorationReducer } from 'src/modules/scroll/reducers/scrollRestorationReducer';\nimport { ScrollState } from 'src/modules/scroll/types/ScrollState';\nimport { chainReducers } from 'src/utils/chainReducers';\n\nconst defaultState: ScrollState = {\n scrollRestoration: {\n isRestoring: false,\n lastScrollPosition: 0,\n },\n};\n\nexport const scrollReducer = chainReducers(defaultState, [\n scrollRestorationReducer,\n]);\n","import { Action } from 'redux';\nimport { SCROLL_RESTORE } from 'src/modules/scroll/actions/ScrollRestoration';\nimport { ScrollState } from 'src/modules/scroll/types/ScrollState';\n\nexport function scrollRestorationReducer(\n state: ScrollState,\n action: Action,\n): ScrollState {\n if (SCROLL_RESTORE.is(action)) {\n return {\n ...state,\n scrollRestoration: {\n isRestoring: action.data.isRestoring,\n lastScrollPosition: action.data.lastScrollPosition,\n },\n };\n }\n\n return state;\n}\n","import { createSelector } from 'reselect';\nimport { getScrollState } from 'src/modules/scroll/selectors/getScrollState';\n\nexport const getScrollRestoration = createSelector([\n getScrollState,\n], (state) => state.scrollRestoration);\n","import { ScrollState } from 'src/modules/scroll/types/ScrollState';\nimport { RootState } from 'src/types/RootState';\n\nexport const getScrollState = (state: RootState): ScrollState => state.scroll;\n","import { SagaIterator } from 'redux-saga';\nimport { SCROLL_RESTORE } from 'src/modules/scroll/actions/ScrollRestoration';\nimport { getScrollRestoration } from 'src/modules/scroll/selectors/getScrollRestoration';\nimport { call, put, select } from 'typed-redux-saga';\n\nexport function* scrollRestore(): SagaIterator {\n const scrollRestoration = yield* select(getScrollRestoration);\n\n if (scrollRestoration.isRestoring) {\n window.requestAnimationFrame(() => window.scrollTo(0, scrollRestoration.lastScrollPosition));\n\n yield* put(SCROLL_RESTORE.trigger({\n isRestoring: false,\n lastScrollPosition: 0,\n }));\n } else {\n yield* call(window.scrollTo, 0, 0);\n }\n}\n","import { FormController } from '@form-ts/core';\nimport { Project } from 'src/modules/common/types/Project';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { SharedUser } from 'src/modules/sharing-projects/types/SharedUser';\nimport { ShareProjectForm } from 'src/modules/sharing-projects/types/ShareProjectForm';\nimport { createActions } from 'src/utils/createActions';\nimport { createTrigger } from 'src/utils/createTrigger';\n\nexport const SHARE_PROJECT_OPEN = createTrigger('SHARE_PROJECT_OPEN');\nexport const SHARE_PROJECT_CLOSE = createTrigger('SHARE_PROJECT_CLOSE');\n\nexport const SHARE_PROJECT_FETCH = createActions, Project>('SHARE_PROJECT_FETCH');\nexport const SHARE_PROJECT_SUBMIT = createActions<\nFormController,\nReadonlyArray\n>('SHARE_PROJECT_SUBMIT');\n\nexport const SHARE_PROJECT_REMOVE_OPEN = createTrigger('SHARE_PROJECT_REMOVE_OPEN');\nexport const SHARE_PROJECT_REMOVE_CLOSE = createTrigger('SHARE_PROJECT_REMOVE_CLOSE');\nexport const SHARE_PROJECT_REMOVE_SUBMIT = createActions<\nvoid,\nReadonlyArray\n>('SHARE_PROJECT_REMOVE_SUBMIT');\n","import { UUID } from '@belimo-retrofit-portal/logic';\nimport * as D from 'io-ts/Decoder';\nimport { SharedUser } from 'src/modules/sharing-projects/types/SharedUser';\n\nexport const SHARED_USER: D.Decoder = D.struct({\n id: UUID,\n email: D.string,\n firstName: D.string,\n lastName: D.string,\n});\n","import { FormRule } from 'src/modules/form/types/FormRule';\nimport * as R from 'src/modules/form/utils/rules';\nimport { ShareProjectForm } from 'src/modules/sharing-projects/types/ShareProjectForm';\n\nexport const SHARE_PROJECT_FORM_SCHEMA:\n(emailsArray: string[]) => FormRule = (emailsArray) => R.struct({\n users: R.allOf([R.emailAlreadyExist(emailsArray), R.emailList(), R.nonEmpty()]),\n});\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { useAction } from 'src/hooks/useAction';\nimport { useBoundAction } from 'src/hooks/useBoundAction';\nimport { CustomModal } from 'src/modules/common/components/CustomModal';\nimport { PreserveContent } from 'src/modules/common/components/PreserveContent';\nimport {\n SHARE_PROJECT_CLOSE,\n SHARE_PROJECT_SUBMIT,\n SHARE_PROJECT_REMOVE_CLOSE,\n SHARE_PROJECT_REMOVE_OPEN,\n SHARE_PROJECT_REMOVE_SUBMIT,\n} from 'src/modules/sharing-projects/actions/ShareProjectActions';\nimport { getShareProjectData } from 'src/modules/sharing-projects/selectors/getShareProjectData';\nimport { ShareProjectModal } from 'src/modules/sharing-projects/views/ShareProjectModal';\nimport { ShareProjectRemoveModal } from 'src/modules/sharing-projects/views/ShareProjectRemoveModal';\n\nexport const ShareProject = (): React.ReactElement => {\n const modalData = useSelector(getShareProjectData);\n\n const shareProjectClose = useBoundAction(SHARE_PROJECT_CLOSE.trigger, undefined);\n const shareProjectSubmit = useAction(SHARE_PROJECT_SUBMIT.request);\n\n const removeUserClose = useBoundAction(SHARE_PROJECT_REMOVE_CLOSE.trigger, undefined);\n const removeUserRequest = useAction(SHARE_PROJECT_REMOVE_OPEN.trigger);\n const removeUserConfirm = useAction(SHARE_PROJECT_REMOVE_SUBMIT.request);\n\n return (\n <>\n \n \n {modalData !== null && (\n \n )}\n \n \n\n \n \n {modalData !== null && modalData.removing !== null && (\n \n )}\n \n \n \n );\n};\n","import { Action } from 'redux-saga';\nimport { FUTURE } from 'src/modules/common/types/Future';\nimport { SHARE_PROJECT_CLOSE, SHARE_PROJECT_OPEN } from 'src/modules/sharing-projects/actions/ShareProjectActions';\nimport { ShareProjectState } from 'src/modules/sharing-projects/types/ShareProjectState';\n\nexport function shareProjectDataReducer(state: ShareProjectState, action: Action): ShareProjectState {\n if (SHARE_PROJECT_CLOSE.is(action)) {\n return { ...state, data: null };\n }\n if (SHARE_PROJECT_OPEN.is(action)) {\n return {\n ...state,\n data: {\n project: action.data,\n users: FUTURE.pending(),\n removing: null,\n },\n };\n }\n\n return state;\n}\n","import { shareProjectDataReducer } from 'src/modules/sharing-projects/reducers/shareProjectDataReducer';\nimport { shareProjectRemoveReducer } from 'src/modules/sharing-projects/reducers/shareProjectRemoveReducer';\nimport { shareProjectUsersReducer } from 'src/modules/sharing-projects/reducers/shareProjectUsersReducer';\nimport { ShareProjectState } from 'src/modules/sharing-projects/types/ShareProjectState';\nimport { chainReducers } from 'src/utils/chainReducers';\n\nconst defaultState: ShareProjectState = {\n data: null,\n};\n\nexport const shareProjectReducer = chainReducers(defaultState, [\n shareProjectDataReducer,\n shareProjectUsersReducer,\n shareProjectRemoveReducer,\n]);\n","import { pipe } from 'fp-ts/function';\nimport * as O from 'monocle-ts/Optional';\nimport { Action } from 'redux-saga';\nimport { Future, FUTURE } from 'src/modules/common/types/Future';\nimport {\n SHARE_PROJECT_REMOVE_OPEN,\n SHARE_PROJECT_REMOVE_CLOSE,\n SHARE_PROJECT_REMOVE_SUBMIT,\n} from 'src/modules/sharing-projects/actions/ShareProjectActions';\nimport { ShareProjectRemoving, ShareProjectState } from 'src/modules/sharing-projects/types/ShareProjectState';\n\nexport function shareProjectRemoveReducer(state: ShareProjectState, action: Action): ShareProjectState {\n if (SHARE_PROJECT_REMOVE_OPEN.is(action)) {\n return pipe(state, modifyRemoving({ user: action.data, status: null }));\n }\n if (SHARE_PROJECT_REMOVE_CLOSE.is(action)) {\n return pipe(state, modifyRemoving(null));\n }\n\n if (SHARE_PROJECT_REMOVE_SUBMIT.isPending(action)) {\n return pipe(state, modifyStatus(FUTURE.pending()));\n }\n if (SHARE_PROJECT_REMOVE_SUBMIT.isSuccess(action)) {\n return pipe(state, modifyRemoving(null));\n }\n if (SHARE_PROJECT_REMOVE_SUBMIT.isFailure(action)) {\n return pipe(state, modifyStatus(FUTURE.failure(action.data)));\n }\n\n return state;\n}\n\nconst dataLens = pipe(\n O.id(),\n O.prop('data'),\n O.fromNullable,\n);\n\nfunction modifyRemoving(\n value: ShareProjectRemoving | null,\n): (state: ShareProjectState) => ShareProjectState {\n return pipe(\n dataLens,\n O.prop('removing'),\n O.modify(() => value),\n );\n}\n\nfunction modifyStatus(\n value: Future,\n): (state: ShareProjectState) => ShareProjectState {\n return pipe(\n dataLens,\n O.prop('removing'),\n O.fromNullable,\n O.prop('status'),\n O.modify(() => value),\n );\n}\n","import { pipe } from 'fp-ts/function';\nimport * as O from 'monocle-ts/Optional';\nimport { Action } from 'redux-saga';\nimport { Future, FUTURE } from 'src/modules/common/types/Future';\nimport {\n SHARE_PROJECT_FETCH,\n SHARE_PROJECT_REMOVE_SUBMIT,\n SHARE_PROJECT_SUBMIT,\n} from 'src/modules/sharing-projects/actions/ShareProjectActions';\nimport { SharedUser } from 'src/modules/sharing-projects/types/SharedUser';\nimport { ShareProjectState } from 'src/modules/sharing-projects/types/ShareProjectState';\n\nexport function shareProjectUsersReducer(state: ShareProjectState, action: Action): ShareProjectState {\n if (SHARE_PROJECT_FETCH.isPending(action)) {\n return {\n ...state,\n data: {\n project: action.meta,\n users: FUTURE.pending(),\n removing: null,\n },\n };\n }\n if (SHARE_PROJECT_FETCH.isSuccess(action)) {\n return {\n ...state,\n data: {\n project: action.meta,\n users: FUTURE.success(action.data),\n removing: null,\n },\n };\n }\n if (SHARE_PROJECT_FETCH.isFailure(action)) {\n return {\n ...state,\n data: {\n project: action.meta,\n users: FUTURE.failure(action.data),\n removing: null,\n },\n };\n }\n\n if (SHARE_PROJECT_SUBMIT.isSuccess(action)) {\n return pipe(state, modifyUsers(FUTURE.success(action.data)));\n }\n if (SHARE_PROJECT_REMOVE_SUBMIT.isSuccess(action)) {\n return pipe(state, modifyUsers(FUTURE.success(action.data)));\n }\n\n return state;\n}\n\nfunction modifyUsers(\n users: Future>,\n): (state: ShareProjectState) => ShareProjectState {\n return pipe(\n O.id(),\n O.prop('data'),\n O.fromNullable,\n O.prop('users'),\n O.modify(() => users),\n );\n}\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { SHARE_PROJECT_FETCH } from 'src/modules/sharing-projects/actions/ShareProjectActions';\nimport { loadSharedProjectUsers } from 'src/modules/sharing-projects/sagas/utils/loadSharedProjectUsers';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* shareProjectFetchSaga(\n action: GetRequestActionType,\n): SagaIterator {\n const project = action.meta;\n\n try {\n yield* put(SHARE_PROJECT_FETCH.pending(project));\n yield* call(logDebug, 'Fetching project access list...', { project });\n\n const users = yield* call(loadSharedProjectUsers, project);\n\n yield* put(SHARE_PROJECT_FETCH.success(users, project));\n yield* call(logDebug, 'Fetching project access list... done', { project, users });\n\n yield* call(scheduleUpdateLatestActivity);\n yield* call(scheduleUpdateFeedbackCounter);\n } catch (error) {\n yield* call(sentryCatch, error);\n\n yield* call(logError, 'Fetching project access list... error', { project, error });\n yield* put(SHARE_PROJECT_FETCH.failure(NativeError.wrap(error), project));\n }\n}\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { SHARE_PROJECT_REMOVE_SUBMIT } from 'src/modules/sharing-projects/actions/ShareProjectActions';\nimport { removeUserFromSharedProject } from 'src/modules/sharing-projects/sagas/utils/removeUserFromSharedProject';\nimport { getShareProjectProject } from 'src/modules/sharing-projects/selectors/getShareProjectProject';\nimport { getShareProjectRemovingUser } from 'src/modules/sharing-projects/selectors/getShareProjectRemovingUser';\nimport { getShareProjectUsers } from 'src/modules/sharing-projects/selectors/getShareProjectUsers';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { call, put, select } from 'typed-redux-saga';\n\nexport function* shareProjectRemoveSaga(): SagaIterator {\n const project = yield* select(getShareProjectProject);\n const users = yield* select(getShareProjectUsers);\n const user = yield* select(getShareProjectRemovingUser);\n\n try {\n yield* call(logDebug, 'Removing user from project...', { project, user });\n yield* put(SHARE_PROJECT_REMOVE_SUBMIT.pending());\n\n yield* call(removeUserFromSharedProject, user, project);\n\n yield* call(\n showNotification,\n {\n variant: 'success',\n type: 'done',\n messageId: 'shareProject/notification/removeUser/success',\n },\n );\n\n yield* call(logDebug, 'Removing user from project... done', { project, user });\n yield* put(SHARE_PROJECT_REMOVE_SUBMIT.success(users.filter((it) => it.id !== user.id)));\n\n yield* call(scheduleUpdateLatestActivity);\n yield* call(scheduleUpdateFeedbackCounter);\n } catch (error) {\n yield* call(sentryCatch, error);\n\n yield* call(showNotification, { variant: 'error', type: 'error' });\n\n yield* call(logError, 'Removing user from project... error', { project, user, error });\n yield* put(SHARE_PROJECT_REMOVE_SUBMIT.failure(NativeError.wrap(error)));\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport {\n SHARE_PROJECT_CLOSE,\n SHARE_PROJECT_FETCH,\n SHARE_PROJECT_OPEN,\n SHARE_PROJECT_REMOVE_SUBMIT,\n SHARE_PROJECT_SUBMIT,\n} from 'src/modules/sharing-projects/actions/ShareProjectActions';\nimport { shareProjectFetchSaga } from 'src/modules/sharing-projects/sagas/shareProjectFetchSaga';\nimport { shareProjectRemoveSaga } from 'src/modules/sharing-projects/sagas/shareProjectRemoveSaga';\nimport { shareProjectSubmitSaga } from 'src/modules/sharing-projects/sagas/shareProjectSubmitSaga';\nimport { cancel, fork, put, take, takeLatest } from 'typed-redux-saga';\n\nexport function* shareProjectSaga(): SagaIterator {\n do {\n const { data: project } = yield* take(SHARE_PROJECT_OPEN.is);\n\n const task = yield* fork(shareProjectModalSaga);\n yield* put(SHARE_PROJECT_FETCH.request(undefined, project));\n\n yield* take(SHARE_PROJECT_CLOSE.is);\n yield* cancel(task);\n } while (true);\n}\n\nfunction* shareProjectModalSaga(): SagaIterator {\n yield* takeLatest(SHARE_PROJECT_FETCH.isRequest, shareProjectFetchSaga);\n yield* takeLatest(SHARE_PROJECT_SUBMIT.isRequest, shareProjectSubmitSaga);\n yield* takeLatest(SHARE_PROJECT_REMOVE_SUBMIT.isRequest, shareProjectRemoveSaga);\n}\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport * as A from 'fp-ts/Array';\nimport { pipe } from 'fp-ts/function';\nimport { not } from 'fp-ts/Predicate';\nimport * as S from 'fp-ts/string';\nimport { SagaIterator } from 'redux-saga';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { formSubmitFailure } from 'src/modules/form/sagas/utils/formSubmitFailure';\nimport { formSubmitStart } from 'src/modules/form/sagas/utils/formSubmitStart';\nimport { formSubmitSuccess } from 'src/modules/form/sagas/utils/formSubmitSuccess';\nimport { formValidate } from 'src/modules/form/sagas/utils/formValidate';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { SHARE_PROJECT_SUBMIT } from 'src/modules/sharing-projects/actions/ShareProjectActions';\nimport { SHARE_PROJECT_FORM_SCHEMA } from 'src/modules/sharing-projects/constants/schema';\nimport { loadSharedProjectUsers } from 'src/modules/sharing-projects/sagas/utils/loadSharedProjectUsers';\nimport { shareProjectWith } from 'src/modules/sharing-projects/sagas/utils/shareProjectWith';\nimport { getShareProjectProject } from 'src/modules/sharing-projects/selectors/getShareProjectProject';\nimport { getShareProjectUsers } from 'src/modules/sharing-projects/selectors/getShareProjectUsers';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, put, select } from 'typed-redux-saga';\n\nexport function* shareProjectSubmitSaga(\n action: GetRequestActionType,\n): SagaIterator {\n const form = action.data;\n\n const project = yield* select(getShareProjectProject);\n const currentUsers = yield* select(getShareProjectUsers);\n const schema = SHARE_PROJECT_FORM_SCHEMA(\n currentUsers\n .map((it) => it.email)\n .concat(project.owner ? [project.owner.email] : []),\n );\n\n const formValid = yield* call(formValidate, form, schema);\n if (!formValid) {\n return;\n }\n\n const values = form.values.get(form.currentState);\n const emails = pipe(\n values.users.split(','),\n A.map(S.trim),\n A.map(S.toLowerCase),\n A.filter(not(S.isEmpty)),\n A.uniq(S.Eq),\n );\n\n try {\n yield* call(logDebug, 'Post emails to share project... started');\n yield* put(SHARE_PROJECT_SUBMIT.pending());\n yield* call(formSubmitStart, form);\n\n yield* call(shareProjectWith, project, emails);\n const updatedUsers = yield* call(loadSharedProjectUsers, project);\n\n yield* call({\n fn: form.reset,\n context: form,\n }, form.initialState);\n yield* call(formSubmitSuccess, form);\n\n yield* call(\n showNotification,\n {\n variant: 'success',\n type: 'done',\n messageId: 'shareProject/notification/share/success',\n messageValue: {\n userList: values.users,\n },\n },\n );\n\n yield* call(logDebug, 'Post emails to share project... done');\n yield* put(SHARE_PROJECT_SUBMIT.success(updatedUsers));\n\n yield* call(scheduleUpdateLatestActivity);\n yield* call(scheduleUpdateFeedbackCounter);\n } catch (error) {\n yield* call(sentryCatch, error);\n\n yield* call(formSubmitFailure, form, {\n users: {\n path: '',\n code: 'emailListFailure',\n value: values,\n\n message: String(error),\n context: {},\n },\n });\n\n yield* call(logError, 'Post emails to share project... error', { error });\n yield* put(SHARE_PROJECT_SUBMIT.failure(NativeError.wrap(error)));\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { array } from 'io-ts/Decoder';\nimport { SagaIterator } from 'redux-saga';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { Project } from 'src/modules/common/types/Project';\nimport { SHARED_USER } from 'src/modules/sharing-projects/codecs/SharedUser';\nimport { SharedUser } from 'src/modules/sharing-projects/types/SharedUser';\nimport { call } from 'typed-redux-saga';\n\nexport function* loadSharedProjectUsers(project: Project): SagaIterator> {\n try {\n const { content } = yield* call(\n makeRestRequest,\n 'GET',\n `/projects/${encodeURIComponent(project.id)}/users`,\n );\n\n return yield* call(decodeOrThrow, array(SHARED_USER), content);\n } catch (error) {\n throw new RuntimeError(\n 'Could not load list of project users (shared)',\n { project },\n NativeError.wrap(error),\n );\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { Project } from 'src/modules/common/types/Project';\nimport { SharedUser } from 'src/modules/sharing-projects/types/SharedUser';\nimport { call } from 'typed-redux-saga';\n\nexport function* removeUserFromSharedProject(sharedUser: SharedUser, project: Project): SagaIterator {\n try {\n yield* call(\n makeRestRequest,\n 'DELETE',\n `/projects/${encodeURIComponent(project.id)}/users/${encodeURIComponent(sharedUser.id)}`,\n );\n } catch (error) {\n throw new RuntimeError(\n 'Could not delete user from sharing project',\n { sharedUser, project },\n NativeError.wrap(error),\n );\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { Project } from 'src/modules/common/types/Project';\nimport { call } from 'typed-redux-saga';\n\nexport function* shareProjectWith(\n project: Project,\n users: ReadonlyArray,\n): SagaIterator {\n try {\n yield* call(makeRestRequest, 'POST', `/projects/${encodeURIComponent(project.id)}/users`, { users });\n } catch (error) {\n throw new RuntimeError('Could not post user to share project with', { users, project }, NativeError.wrap(error));\n }\n}\n","import { ShareProjectData } from 'src/modules/sharing-projects/types/ShareProjectState';\nimport { RootState } from 'src/types/RootState';\n\nexport function getShareProjectData(state: RootState): ShareProjectData | null {\n return state.shareProject.data;\n}\n","import { createSelector } from 'reselect';\nimport { getShareProjectData } from 'src/modules/sharing-projects/selectors/getShareProjectData';\nimport { assertNever } from 'src/utils/assert';\n\nexport const getShareProjectProject = createSelector([\n getShareProjectData,\n], (data) => {\n if (data !== null) {\n return data.project;\n }\n\n return assertNever('Project to share is not initialed yet', { data });\n});\n","import { createSelector } from 'reselect';\nimport { getShareProjectData } from 'src/modules/sharing-projects/selectors/getShareProjectData';\nimport { assertNever } from 'src/utils/assert';\n\nexport const getShareProjectRemovingUser = createSelector([\n getShareProjectData,\n], (data) => {\n if (data?.removing?.user) {\n return data.removing.user;\n }\n\n return assertNever('Project to remove is not initialed yet', { data });\n});\n","import { createSelector } from 'reselect';\nimport { getShareProjectData } from 'src/modules/sharing-projects/selectors/getShareProjectData';\nimport { assertNever } from 'src/utils/assert';\n\nexport const getShareProjectUsers = createSelector([\n getShareProjectData,\n], (data) => {\n if (data?.users.state === 'success') {\n return data.users.value;\n }\n\n return assertNever('Project users is not initialed yet', { data });\n});\n","import './ShareProjectModal.scss';\nimport { ModalBody, ModalFooter, ModalHeader } from '@carbon/react';\nimport { FormController } from '@form-ts/core';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CustomLoading } from 'src/modules/common/components/CustomLoading';\nimport { Future } from 'src/modules/common/types/Future';\nimport { Project } from 'src/modules/common/types/Project';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { SharedUser } from 'src/modules/sharing-projects/types/SharedUser';\nimport { ShareProjectForm } from 'src/modules/sharing-projects/types/ShareProjectForm';\nimport { ShareProjectShareForm } from 'src/modules/sharing-projects/views/ShareProjectShareForm';\nimport { ShareProjectUserList } from 'src/modules/sharing-projects/views/ShareProjectUserList';\n\ntype Props = {\n readonly project: Project;\n readonly users: Future>;\n\n readonly onSubmit: (form: FormController) => void;\n readonly onCancel: () => void;\n readonly onRemove: (user: SharedUser) => void;\n};\n\nexport const ShareProjectModal = ({\n project,\n users,\n onSubmit,\n onCancel,\n onRemove,\n}: Props): React.ReactElement => {\n const intl = useIntl();\n\n return (\n <>\n }\n title={}\n buttonOnClick={onCancel}\n />\n\n \n {users.state === 'success' && (\n
    \n \n
    \n )}\n\n {users.state === 'success' && (\n
    \n \n
    \n )}\n\n {users.state === 'pending' && (\n
    \n \n
    \n )}\n
    \n\n \n \n \n \n \n \n );\n};\n","import './ShareProjectRemoveModal.scss';\nimport { ModalBody, ModalFooter, ModalHeader } from '@carbon/react';\nimport React from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { Project } from 'src/modules/common/types/Project';\nimport { SharedUser } from 'src/modules/sharing-projects/types/SharedUser';\n\ntype Props = {\n readonly project: Project;\n readonly user: SharedUser;\n readonly submitting: boolean;\n\n readonly onConfirm: () => void;\n readonly onCancel: () => void;\n};\n\nexport const ShareProjectRemoveModal = ({\n project,\n user,\n submitting,\n onConfirm,\n onCancel,\n}: Props): React.ReactElement => {\n const intl = useIntl();\n\n return (\n <>\n }\n buttonOnClick={onCancel}\n />\n\n \n
    \n \n
    \n
    \n\n \n \n \n \n\n \n \n \n \n \n );\n};\n","import './ShareProjectShareForm.scss';\nimport { FormController } from '@form-ts/core';\nimport { useForm, useFormWatch } from '@form-ts/react';\nimport { pipe } from 'fp-ts/function';\nimport React, { useCallback, useMemo } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { Project } from 'src/modules/common/types/Project';\nimport { TextField } from 'src/modules/form/components/TextField';\nimport { useFormValidator } from 'src/modules/form/hooks/useFormValidator';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { SHARE_PROJECT_FORM_SCHEMA } from 'src/modules/sharing-projects/constants/schema';\nimport { SharedUser } from 'src/modules/sharing-projects/types/SharedUser';\nimport { ShareProjectForm } from 'src/modules/sharing-projects/types/ShareProjectForm';\n\ntype Props = {\n readonly project: Project;\n readonly users: ReadonlyArray;\n readonly onSubmit: (form: FormController) => void;\n};\n\nexport const ShareProjectShareForm = ({ project, users, onSubmit }: Props): React.ReactElement => {\n const intl = useIntl();\n\n const form = useForm('shareProject.form', {\n reinitialize: false,\n initialValues: {\n users: '',\n },\n });\n\n const validationSchema = useMemo(() => SHARE_PROJECT_FORM_SCHEMA(\n users\n .map((item) => item.email)\n .concat(project.owner ? [project.owner.email] : []),\n ), [users, project]);\n useFormValidator(form, validationSchema);\n\n const submitting = useFormWatch(form, form.submitting.get);\n const submitSucceeded = useFormWatch(form, form.submitSucceded.get);\n\n const handleBlur = useCallback(() => {\n form.change(pipe(\n form.currentState,\n form.submitSucceded.set(false),\n ));\n }, [form]);\n const handleSubmit = useCallback((event: React.FormEvent): void => {\n event.preventDefault();\n onSubmit(form);\n }, [form, onSubmit]);\n\n return (\n \n (submitSucceeded ? (\n
    \n \n
    \n ) : '')}\n />\n\n \n \n \n \n );\n};\n","import './ShareProjectUserList.scss';\nimport {\n StructuredListBody,\n StructuredListCell,\n StructuredListHead,\n StructuredListRow,\n StructuredListWrapper,\n} from '@carbon/react';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { Project } from 'src/modules/common/types/Project';\nimport { SharedUser } from 'src/modules/sharing-projects/types/SharedUser';\n\ntype Props = {\n readonly project: Project;\n readonly users: ReadonlyArray;\n readonly onRemove: (user: SharedUser) => void;\n};\n\nexport const ShareProjectUserList = ({ project, users, onRemove }: Props): React.ReactElement => (\n \n \n \n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n {project.owner\n ? project.owner.lastName\n : '—'}\n \n\n \n {project.owner\n ? project.owner.firstName\n : '—'}\n \n\n \n {project.owner\n ? project.owner.email\n : '—'}\n \n\n \n \n \n\n \n \n\n {users.map((user) => (\n \n \n {user.lastName}\n \n\n \n {user.firstName}\n \n\n \n {user.email}\n \n\n \n \n \n\n \n onRemove(user)}\n >\n \n \n \n \n ))}\n \n \n);\n","import { FormController } from '@form-ts/core';\nimport { SyncMode } from 'src/modules/common/types/SyncMode';\nimport { UserFormData } from 'src/modules/common/types/UserFormData';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { User } from 'src/modules/users/types/User';\nimport { createActions } from 'src/utils/createActions';\nimport { createTrigger } from 'src/utils/createTrigger';\n\nexport const USER_SAVE = createActions<\nUser,\nUser,\nUser\n>('USER_SAVE');\nexport const USER_ADD = createActions, User>('USER_ADD');\nexport const USER_DELETE = createActions, void, ReadonlyArray>('USER_DELETE');\n\nexport const USER_SYNC_PERFORM = createActions('USER_SYNC_PERFORM');\nexport const USER_SYNC_RESET = createTrigger('USER_SYNC_RESET');\n","import { SortingOrder, SortingTarget } from 'src/modules/users/types/Sorting';\nimport { User } from 'src/modules/users/types/User';\nimport { createTrigger } from 'src/utils/createTrigger';\n\nexport const USERS_LIST_FETCH = createTrigger>('USERS_LIST_FETCH');\nexport const USERS_LIST_RESET = createTrigger('USERS_LIST_RESET');\n\nexport const USERS_LIST_QUERY = createTrigger('USER_LIST_QUERY');\nexport const USERS_LIST_TARGET = createTrigger('USERS_LIST_TARGET');\nexport const USERS_LIST_ORDER = createTrigger('USERS_LIST_ORDER');\n","import { DATE_TIME, UUID } from '@belimo-retrofit-portal/logic';\nimport { Json } from 'fp-ts/Json';\nimport * as C from 'io-ts/Codec';\nimport { USER_ROLE } from 'src/modules/common/codecs/UserRole';\nimport { User } from 'src/modules/users/types/User';\n\nexport const ORGANIZATION_USER: C.Codec = C.struct({\n createdAt: DATE_TIME,\n email: C.string,\n firstName: C.string,\n id: UUID,\n lastName: C.string,\n role: USER_ROLE,\n latestActivity: C.nullable(DATE_TIME),\n feedbackCounter: C.number,\n});\n","import './UserListActions.scss';\nimport React, { ChangeEvent, memo } from 'react';\nimport { FormattedMessage, useIntl } from 'src/migration/react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CrossIcon } from 'src/modules/common/icons/CrossIcon';\nimport { PlusIcon } from 'src/modules/common/icons/PlusIcon';\nimport { SearchIcon } from 'src/modules/common/icons/SearchIcon';\n\ntype Props = {\n searchQuery: string;\n setSearchQuery: (query: string) => void;\n handleAddUserOpen: () => void;\n};\n\nexport const UserListActions = memo(({ searchQuery, setSearchQuery, handleAddUserOpen }: Props) => {\n const intl = useIntl();\n\n const handleSearchChange = (event: ChangeEvent): void => {\n const value = event.target.value.trim().toLowerCase();\n\n if (value.length > 100) {\n return;\n }\n\n setSearchQuery(value);\n };\n\n const handleSearchClear = (): void => {\n setSearchQuery('');\n };\n\n return (\n
    \n
    \n
    \n \n
    \n\n \n\n {searchQuery && (\n null}\n tabIndex={0}\n aria-label={intl.formatMessage({ id: 'admin/users/search/clear/label' })}\n >\n \n
    \n )}\n
    \n\n \n \n\n
    \n \n
    \n
    \n \n );\n});\n","import './UserListHeader.scss';\nimport React, { memo } from 'react';\nimport { FormattedMessage, useIntl } from 'src/migration/react-intl';\nimport { Checkbox } from 'src/modules/common/components/Checkbox';\nimport { ArrowDownIcon } from 'src/modules/common/icons/ArrowDownIcon';\nimport { ArrowUpIcon } from 'src/modules/common/icons/ArrowUpIcon';\nimport { SortingOrder, SortingTarget } from 'src/modules/users/types/Sorting';\n\ntype Props = {\n areAllSelected: boolean;\n areSomeSelected: boolean;\n sortingTarget: SortingTarget;\n setSortingTarget: (target: SortingTarget) => void;\n sortingOrder: SortingOrder;\n setSortingOrder: (order: SortingOrder) => void;\n handleHeaderCheckboxChange: () => void;\n};\n\nexport const UserListHeader = memo(({\n areAllSelected,\n areSomeSelected,\n sortingTarget,\n sortingOrder,\n setSortingTarget,\n setSortingOrder,\n handleHeaderCheckboxChange,\n}: Props) => {\n const intl = useIntl();\n\n const onSortingChange = (target: SortingTarget): void => {\n if (sortingTarget !== target) {\n setSortingTarget(target);\n return setSortingOrder('asc');\n }\n\n if (sortingOrder === 'asc') {\n return setSortingOrder('desc');\n }\n\n setSortingTarget('firstName');\n return setSortingOrder('asc');\n };\n\n return (\n
    \n
    \n\n \n\n onSortingChange('firstName')}\n aria-label={intl.formatMessage({ id: 'admin/users/list/content/header/firstName' })}\n >\n \n\n {sortingTarget === 'firstName' && (\n
    \n {sortingOrder === 'asc'\n ? ()\n : ()}\n
    \n )}\n \n\n onSortingChange('lastName')}\n aria-label={intl.formatMessage({ id: 'admin/users/list/content/header/lastName' })}\n >\n \n\n {sortingTarget === 'lastName' && (\n
    \n {sortingOrder === 'asc'\n ? ()\n : ()}\n
    \n )}\n \n\n onSortingChange('email')}\n aria-label={intl.formatMessage({ id: 'admin/users/list/content/header/username' })}\n >\n \n\n {sortingTarget === 'email' && (\n
    \n {sortingOrder === 'asc'\n ? ()\n : ()}\n
    \n )}\n \n\n onSortingChange('role')}\n aria-label={intl.formatMessage({ id: 'admin/users/list/content/header/role' })}\n >\n \n\n {sortingTarget === 'role' && (\n
    \n {sortingOrder === 'asc'\n ? ()\n : ()}\n
    \n )}\n \n
    \n );\n});\n","import './UserRow.scss';\nimport { useForm } from '@form-ts/react';\nimport clsx from 'clsx';\nimport dayjs from 'dayjs';\nimport { constNull } from 'fp-ts/lib/function';\nimport React, { memo, useCallback, useEffect, useState } from 'react';\nimport { useAction } from 'src/hooks/useAction';\nimport { FormattedMessage } from 'src/migration/react-intl';\nimport { Checkbox } from 'src/modules/common/components/Checkbox';\nimport { userDateFormat } from 'src/modules/common/constants/dateFormat';\nimport { ChevronDownIcon } from 'src/modules/common/icons/ChevronDownIcon';\nimport { ChevronUpIcon } from 'src/modules/common/icons/ChevronUpIcon';\nimport { UserFormData } from 'src/modules/common/types/UserFormData';\nimport { UserRole } from 'src/modules/common/types/UserRole';\nimport { DropdownField } from 'src/modules/form/components/DropdownField';\nimport { TextField } from 'src/modules/form/components/TextField';\nimport { useFormValidator } from 'src/modules/form/hooks/useFormValidator';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { ensureNonNull } from 'src/modules/form/utils/transform';\nimport { USER_SAVE } from 'src/modules/users/actions/UserActions';\nimport { USER_EDIT_FORM_SCHEMA } from 'src/modules/users/constants/userEditFormSchema';\nimport { User } from 'src/modules/users/types/User';\n\ntype Props = {\n readonly isSelf: boolean;\n readonly currentUser: User;\n readonly isSelected: boolean;\n readonly onSelectHandler: (user: User) => void;\n};\n\nexport const UserRow = memo(({\n isSelf,\n currentUser,\n isSelected,\n onSelectHandler,\n}: Props) => {\n const [isRowOpened, setRowOpened] = useState(false);\n const [contentHeight, setContentHeight] = useState(40);\n\n const form = useForm('admin.users.edit', {\n initialValues: {\n email: currentUser.email,\n firstName: currentUser.firstName,\n lastName: currentUser.lastName,\n role: currentUser.role,\n },\n reinitialize: false,\n });\n useFormValidator(form, USER_EDIT_FORM_SCHEMA);\n\n const saveUser = useAction(USER_SAVE.request);\n\n const handleSaveUser = useCallback(() => {\n const formData = form.currentState.values;\n\n const updatedUser = {\n ...currentUser,\n ...formData,\n };\n\n return saveUser(updatedUser, updatedUser);\n }, [saveUser, form, currentUser]);\n\n const onSelect = useCallback((event: React.MouseEvent) => {\n event.stopPropagation();\n\n onSelectHandler(currentUser);\n }, [onSelectHandler, currentUser]);\n\n useEffect(() => form.subscribe((prevState) => {\n const nextState = form.currentState;\n\n const errors = form.errors.get(form.currentState);\n const isValid = Object.entries(errors).length === 0;\n\n if (isValid && prevState.values !== nextState.values) {\n handleSaveUser();\n }\n }), [form, handleSaveUser]);\n\n return (\n \n setRowOpened((prev) => !prev)}\n role=\"row\"\n tabIndex={0}\n onKeyDown={() => null}\n >\n
    \n {isRowOpened ? () : ()}\n
    \n\n
    \n {!isSelf && (\n \n )}\n
    \n\n

    \n {currentUser.firstName}\n

    \n\n

    \n {currentUser.lastName}\n

    \n\n

    \n {currentUser.email}\n

    \n\n

    \n \n

    \n
    \n\n setContentHeight(current?.offsetHeight || 40)}\n className=\"bp-user-row__content\"\n >\n
    \n
    \n }\n required={true}\n size=\"md\"\n maxLength={50}\n theme=\"white\"\n />\n\n }\n maxLength={50}\n renderHint={constNull}\n required={true}\n size=\"md\"\n theme=\"white\"\n />\n
    \n\n
    \n }\n maxLength={50}\n renderHint={constNull}\n required={true}\n size=\"md\"\n theme=\"white\"\n />\n\n }\n disabled={isSelf}\n itemToElement={RenderItem}\n options={ROLE_LIST}\n renderSelectedItem={renderSelectedItem}\n size=\"md\"\n theme=\"white\"\n />\n
    \n
    \n\n
    \n
    \n

    \n\n

    {dayjs(currentUser.createdAt).format(userDateFormat)}

    \n
    \n\n
    \n

    \n\n

    \n {currentUser.latestActivity\n ? dayjs(currentUser.latestActivity).format(userDateFormat)\n : (\n \n )}\n

    \n
    \n
    \n \n \n );\n});\n\nconst renderSelectedItem = (role: UserRole): React.ReactElement => (\n {ROLE_NAMES[role]}\n);\nconst RenderItem = (role: UserRole): React.ReactElement => (\n {ROLE_NAMES[role]}\n);\n\nconst ROLE_LIST = [\n UserRole.USER,\n UserRole.ADMIN,\n];\nconst ROLE_NAMES = {\n [UserRole.USER]: ,\n [UserRole.ADMIN]: ,\n};\n","import { trim } from 'fp-ts/string';\nimport { UserFormData } from 'src/modules/common/types/UserFormData';\nimport { FormRule } from 'src/modules/form/types/FormRule';\nimport * as R from 'src/modules/form/utils/rules';\n\nexport const USER_ADD_FORM_SCHEMA:\n(emailsArray: string[]) => FormRule = (emailsArray) => R.struct({\n email: R.map(trim, R.allOf([R.emailAlreadyExist(emailsArray), R.nonEmpty(), R.email()])),\n firstName: R.map(trim, R.allOf([R.nonEmpty(), R.maxLength(50)])),\n lastName: R.map(trim, R.allOf([R.nonEmpty(), R.maxLength(50)])),\n role: R.nonEmpty(),\n});\n","import { trim } from 'fp-ts/string';\nimport { UserFormData } from 'src/modules/common/types/UserFormData';\nimport { FormRule } from 'src/modules/form/types/FormRule';\nimport * as R from 'src/modules/form/utils/rules';\n\nexport const USER_EDIT_FORM_SCHEMA: FormRule = R.struct({\n email: R.map(trim, R.allOf([R.nonEmpty(), R.email()])),\n firstName: R.map(trim, R.allOf([R.nonEmpty(), R.maxLength(50)])),\n lastName: R.map(trim, R.allOf([R.nonEmpty(), R.maxLength(50)])),\n role: R.nonEmpty(),\n});\n","import React, { memo, useState } from 'react';\nimport { Helmet } from 'react-helmet-async';\nimport { useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\nimport { Link } from 'react-router-dom';\nimport { useAction } from 'src/hooks/useAction';\nimport { CustomBreadcrumbItem } from 'src/modules/common/components/CustomBreadcrumbItem';\nimport { CustomModal } from 'src/modules/common/components/CustomModal';\nimport { AdminLayout } from 'src/modules/common/layouts/AdminLayout';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { USER_DELETE } from 'src/modules/users/actions/UserActions';\nimport { USERS_LIST_ORDER, USERS_LIST_QUERY, USERS_LIST_TARGET } from 'src/modules/users/actions/UsersActions';\nimport { getSortedFoundSelectableUsers } from 'src/modules/users/selectors/getSortedFoundSelectableUsers';\nimport { getSortedFoundUsers } from 'src/modules/users/selectors/getSortedFoundUsers';\nimport { getUserDeleting } from 'src/modules/users/selectors/getUserDeleting';\nimport { getUsersListData } from 'src/modules/users/selectors/getUsersListData';\nimport { getUsersQuery } from 'src/modules/users/selectors/getUsersQuery';\nimport { getUsersSortingOrder } from 'src/modules/users/selectors/getUsersSortingOrder';\nimport { getUsersSortingTarget } from 'src/modules/users/selectors/getUsersSortingTarget';\nimport { User } from 'src/modules/users/types/User';\nimport { AddUserModal } from 'src/modules/users/views/AddUserModal';\nimport { UsersListBody } from 'src/modules/users/views/UsersListBody';\n\nexport const UsersPage = memo((): React.ReactElement => {\n const intl = useIntl();\n\n const [isAddUserModalOpen, setAddUserModalOpen] = useState(false);\n\n const userDeleting = useSelector(getUserDeleting);\n const loggedInUser = useSelector(getLoggedInUser);\n const searchQuery = useSelector(getUsersQuery);\n const sortingTarget = useSelector(getUsersSortingTarget);\n const sortingOrder = useSelector(getUsersSortingOrder);\n const allUserSnapshots = useSelector(getUsersListData);\n const sortedFoundUsers = useSelector(getSortedFoundUsers);\n const sortedFoundSelectableUsers = useSelector(getSortedFoundSelectableUsers);\n\n const deleteUser = useAction(USER_DELETE.request);\n const setSearchQuery = useAction(USERS_LIST_QUERY.trigger);\n const setSortingTarget = useAction(USERS_LIST_TARGET.trigger);\n const setSortingOrder = useAction(USERS_LIST_ORDER.trigger);\n\n const handleAddUserOpen = (): void => {\n setAddUserModalOpen(true);\n };\n\n const handleAddUserCancel = (): void => {\n setAddUserModalOpen(false);\n };\n\n const handleDeleteUserSubmit = (usersToDelete: ReadonlyArray): void => deleteUser(usersToDelete, usersToDelete);\n\n return (\n <>\n \n {intl.formatMessage({ id: 'admin/users/list/title' })}\n \n\n \n \n {intl.formatMessage({ id: 'admin/users/header/breadcrumbs/project' })}\n \n \n )}\n title={\n intl.formatMessage(\n { id: 'admin/users/list/header/title' },\n { organization: loggedInUser.organization.name },\n )\n }\n >\n \n\n \n \n \n \n \n );\n});\n","import { Action } from 'redux';\nimport {\n USER_ADD,\n} from 'src/modules/users/actions/UserActions';\nimport { UsersState } from 'src/modules/users/types/UsersState';\n\nexport function userAddingReducer(state: UsersState, action: Action): UsersState {\n if (USER_ADD.isSuccess(action)) {\n return {\n ...state,\n userSnapshots: [...state.userSnapshots, { user: action.data, action: null }],\n };\n }\n\n return state;\n}\n","import { Action } from 'redux';\nimport { FUTURE } from 'src/modules/common/types/Future';\nimport {\n USER_DELETE,\n} from 'src/modules/users/actions/UserActions';\nimport { UsersState } from 'src/modules/users/types/UsersState';\n\nexport function userDeletingReducer(state: UsersState, action: Action): UsersState {\n if (USER_DELETE.isPending(action)) {\n const deletingUserIds = action.meta.map((deletingUser) => deletingUser.id);\n\n return {\n ...state,\n userSnapshots: state.userSnapshots.map((userSnapshot) => (deletingUserIds.includes(userSnapshot.user.id)\n ? { ...userSnapshot, action: 'deleting' }\n : userSnapshot\n )),\n deleting: {\n status: FUTURE.pending(),\n },\n };\n }\n if (USER_DELETE.isSuccess(action)) {\n const deletedUserIds = action.meta.map((user) => user.id);\n return {\n ...state,\n userSnapshots: state.userSnapshots.filter((userSnapshot) => !deletedUserIds.includes(userSnapshot.user.id)),\n deleting: {\n status: FUTURE.success(undefined),\n },\n };\n }\n if (USER_DELETE.isFailure(action)) {\n return {\n ...state,\n userSnapshots: state.userSnapshots.map((userSnapshot) => (userSnapshot.action === 'deleting'\n ? { ...userSnapshot, action: null }\n : userSnapshot\n )),\n deleting: {\n status: FUTURE.failure(action.data),\n },\n };\n }\n return state;\n}\n","import { Action } from 'redux';\nimport { FUTURE } from 'src/modules/common/types/Future';\nimport { USER_SAVE } from 'src/modules/users/actions/UserActions';\nimport { UsersState } from 'src/modules/users/types/UsersState';\n\nexport function userEditingReducer(state: UsersState, action: Action): UsersState {\n if (USER_SAVE.isPending(action)) {\n return {\n ...state,\n userSnapshots: state.userSnapshots\n .filter((userSnapshot) => userSnapshot.action !== 'deleting')\n .map((userSnapshot) => (userSnapshot.user.id === action.meta.id\n ? { user: action.meta, action: 'editing' }\n : userSnapshot\n )),\n editing: {\n status: FUTURE.pending(),\n },\n };\n }\n if (USER_SAVE.isSuccess(action)) {\n return {\n ...state,\n userSnapshots: state.userSnapshots\n .filter((userSnapshot) => userSnapshot.action !== 'deleting')\n .map((userSnapshot) => (userSnapshot.user.id === action.data.id\n ? { ...userSnapshot, action: null }\n : userSnapshot\n )),\n editing: {\n status: FUTURE.success(undefined),\n },\n };\n }\n if (USER_SAVE.isFailure(action)) {\n return {\n ...state,\n editing: {\n status: FUTURE.failure(action.data),\n },\n };\n }\n return state;\n}\n","import { Action } from 'redux';\nimport { FUTURE } from 'src/modules/common/types/Future';\nimport {\n USER_SYNC_PERFORM,\n USER_SYNC_RESET,\n} from 'src/modules/users/actions/UserActions';\nimport { UsersState } from 'src/modules/users/types/UsersState';\n\nexport function userSyncReducer(state: UsersState, action: Action): UsersState {\n const isDeletingUsers = state.userSnapshots.some((userSnapshot) => userSnapshot.action === 'deleting');\n\n if (USER_SYNC_PERFORM.isRequest(action)) {\n return {\n ...state,\n deleting: isDeletingUsers ? {\n status: FUTURE.pending(),\n } : state.deleting,\n editing: {\n status: FUTURE.pending(),\n },\n };\n }\n if (USER_SYNC_PERFORM.isPending(action)) {\n return {\n ...state,\n deleting: isDeletingUsers ? {\n status: FUTURE.pending(),\n } : state.deleting,\n editing: {\n status: FUTURE.pending(),\n },\n };\n }\n if (USER_SYNC_PERFORM.isSuccess(action)) {\n return {\n ...state,\n deleting: isDeletingUsers ? {\n status: FUTURE.success(undefined),\n } : state.deleting,\n editing: {\n status: FUTURE.success(undefined),\n },\n };\n }\n if (USER_SYNC_PERFORM.isFailure(action)) {\n return {\n ...state,\n deleting: isDeletingUsers ? {\n status: FUTURE.failure(action.data),\n } : state.deleting,\n editing: {\n status: FUTURE.failure(action.data),\n },\n };\n }\n if (USER_SYNC_RESET.is(action)) {\n return {\n ...state,\n deleting: null,\n editing: null,\n };\n }\n return state;\n}\n","import { Action } from 'redux';\nimport {\n USERS_LIST_FETCH,\n USERS_LIST_ORDER,\n USERS_LIST_QUERY,\n USERS_LIST_RESET,\n USERS_LIST_TARGET,\n} from 'src/modules/users/actions/UsersActions';\nimport { UsersState } from 'src/modules/users/types/UsersState';\n\nexport function usersListDataReducer(state: UsersState, action: Action): UsersState {\n if (USERS_LIST_FETCH.is(action)) {\n return {\n ...state,\n userSnapshots: action.data.map((user) => ({ user: user, action: null })),\n };\n }\n if (USERS_LIST_RESET.is(action)) {\n return {\n ...state,\n query: '',\n sortingOrder: 'asc',\n sortingTarget: 'firstName',\n userSnapshots: [],\n };\n }\n if (USERS_LIST_QUERY.is(action)) {\n return {\n ...state,\n query: action.data,\n };\n }\n if (USERS_LIST_TARGET.is(action)) {\n return {\n ...state,\n sortingTarget: action.data,\n };\n }\n if (USERS_LIST_ORDER.is(action)) {\n return {\n ...state,\n sortingOrder: action.data,\n };\n }\n return state;\n}\n","import { userAddingReducer } from 'src/modules/users/reducers/userAddingReducer';\nimport { userDeletingReducer } from 'src/modules/users/reducers/userDeletingReducer';\nimport { userEditingReducer } from 'src/modules/users/reducers/userEditingReducer';\nimport { usersListDataReducer as usersDataReducer } from 'src/modules/users/reducers/usersListDataReducer';\nimport { userSyncReducer } from 'src/modules/users/reducers/userSyncReducer';\nimport { UsersState } from 'src/modules/users/types/UsersState';\nimport { chainReducers } from 'src/utils/chainReducers';\n\nconst defaultState: UsersState = {\n userSnapshots: [],\n deleting: null,\n editing: null,\n query: '',\n sortingTarget: 'firstName',\n sortingOrder: 'asc',\n};\n\nexport const usersReducer = chainReducers(defaultState, [\n userAddingReducer,\n userDeletingReducer,\n userEditingReducer,\n usersDataReducer,\n userSyncReducer,\n]);\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { formSubmitFailure } from 'src/modules/form/sagas/utils/formSubmitFailure';\nimport { formSubmitStart } from 'src/modules/form/sagas/utils/formSubmitStart';\nimport { formSubmitSuccess } from 'src/modules/form/sagas/utils/formSubmitSuccess';\nimport { formValidate } from 'src/modules/form/sagas/utils/formValidate';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { USER_ADD } from 'src/modules/users/actions/UserActions';\nimport { USER_ADD_FORM_SCHEMA } from 'src/modules/users/constants/userAddFormSchema';\nimport { createUser } from 'src/modules/users/sagas/utils/createUser';\nimport { getUsersListData } from 'src/modules/users/selectors/getUsersListData';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, put, select } from 'typed-redux-saga';\n\nexport function* userCreateSaga(action: GetRequestActionType): SagaIterator {\n const userForm = action.data;\n const userValues = userForm.values.get(userForm.currentState);\n\n const userSnapshots = yield* select(getUsersListData);\n const emails = userSnapshots.map((userSnapshot) => userSnapshot.user.email);\n const schema = USER_ADD_FORM_SCHEMA(emails);\n\n const formValid = yield* call(formValidate, userForm, schema);\n if (!formValid) {\n return;\n }\n\n try {\n yield* put(USER_ADD.pending(action.meta));\n yield* call(logDebug, 'Saving user...');\n yield* call(formSubmitStart, userForm);\n\n const savedUserData = { ...userValues, email: userValues.email.trim() };\n const savedUser = yield* call(createUser, savedUserData);\n\n yield* put(USER_ADD.success(savedUser));\n\n yield* call(\n showNotification,\n {\n variant: 'success',\n type: 'done',\n messageId: 'admin/user/notification/add/success',\n },\n );\n\n yield* call(logDebug, 'Saving user... done', savedUser);\n yield* call(formSubmitSuccess, userForm);\n\n yield* call(scheduleUpdateLatestActivity);\n yield* call(scheduleUpdateFeedbackCounter);\n } catch (error) {\n yield* call(sentryCatch, error);\n\n yield* call(logError, 'Saving user... error', error);\n yield* put(USER_ADD.failure(NativeError.wrap(error)));\n\n yield* call(showNotification, { type: 'error', variant: 'error' });\n\n yield* call(formSubmitFailure, userForm, {\n '': {\n path: '',\n code: 'unknown',\n value: userValues,\n\n message: String(error),\n context: {},\n },\n });\n }\n}\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { call as callEffect } from 'redux-saga/effects';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { USER_DELETE } from 'src/modules/users/actions/UserActions';\nimport { deleteUser } from 'src/modules/users/sagas/utils/deleteUser';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { all, call, put } from 'typed-redux-saga';\n\nexport function* userRemoveSaga(action: GetRequestActionType): SagaIterator {\n try {\n yield* put(USER_DELETE.pending(action.data));\n yield* call(logDebug, 'Removing user...');\n\n yield* all(action.data.map(\n (user) => callEffect(deleteUser, user.id),\n ));\n\n yield* call(\n showNotification,\n {\n variant: 'success',\n type: 'done',\n messageId: 'admin/user/notification/remove/success',\n },\n );\n\n yield* call(logDebug, 'Removing user... done');\n yield* put(USER_DELETE.success(undefined, action.meta));\n\n yield* call(scheduleUpdateLatestActivity);\n yield* call(scheduleUpdateFeedbackCounter);\n } catch (error) {\n yield* call(sentryCatch, error);\n\n yield* call(showNotification, { type: 'error', variant: 'error' });\n\n yield* call(logError, 'Removing user... error', error);\n yield* put(USER_DELETE.failure(NativeError.wrap(error), action.meta));\n }\n}\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { sentryCatch } from 'src/modules/config/utils/sentryCatch';\nimport { validate } from 'src/modules/form/utils/validate';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { USER_SAVE } from 'src/modules/users/actions/UserActions';\nimport { USER_EDIT_FORM_SCHEMA } from 'src/modules/users/constants/userEditFormSchema';\nimport { syncUserBackground } from 'src/modules/users/sagas/utils/syncUserBackground';\nimport { getUsersListData } from 'src/modules/users/selectors/getUsersListData';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { call, put, select } from 'typed-redux-saga';\n\nexport function* userSaveSaga(action: GetRequestActionType): SagaIterator {\n try {\n yield* put(USER_SAVE.pending(action.meta));\n yield* call(logDebug, 'Saving users...');\n\n const userSnapshots = yield* select(getUsersListData);\n\n for (const userSnapshot of userSnapshots) {\n const savedUserData = {\n ...userSnapshot.user,\n email: userSnapshot.user.email.trim(),\n };\n\n const errors = validate(savedUserData, USER_EDIT_FORM_SCHEMA);\n\n if (Object.keys(errors).length) {\n throw new Error('Saving user validation failed');\n }\n }\n\n const synchronizedUsers = yield* call(syncUserBackground);\n\n yield* call(logDebug, 'Saving users... done', synchronizedUsers);\n yield* put(USER_SAVE.success(action.data, action.data));\n } catch (error) {\n yield* call(sentryCatch, error);\n\n yield* call(logError, 'Saving users... error', error);\n yield* put(USER_SAVE.failure(NativeError.wrap(error), action.meta));\n\n yield* call(showNotification, { type: 'error', variant: 'error' });\n }\n}\n","import { NativeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { call as callEffect } from 'redux-saga/effects';\nimport { scheduleUpdateFeedbackCounter } from 'src/modules/feedback/sagas/utils/scheduleUpdateFeedbackCounter';\nimport { showNotification } from 'src/modules/notifications/sagas/showNotification';\nimport { scheduleUpdateLatestActivity } from 'src/modules/profile/sagas/utils/scheduleUpdateLatestActivity';\nimport { USER_SYNC_PERFORM } from 'src/modules/users/actions/UserActions';\nimport { deleteUser } from 'src/modules/users/sagas/utils/deleteUser';\nimport { updateUser } from 'src/modules/users/sagas/utils/updateUser';\nimport { getUsersListData } from 'src/modules/users/selectors/getUsersListData';\nimport { logDebug, logError } from 'src/sagas/utils/logging';\nimport { GetRequestActionType } from 'src/utils/createActions';\nimport { all, call, delay, put, select } from 'typed-redux-saga';\n\nexport function* userSyncPerformSaga(\n action: GetRequestActionType,\n): SagaIterator {\n const mode = action.data;\n\n try {\n yield* call(logDebug, `Synchronizing users in ${mode}...`);\n yield* put(USER_SYNC_PERFORM.pending(action.meta));\n\n if (mode === 'background') {\n yield* delay(1_000);\n }\n\n const userSnapshots = yield* select(getUsersListData);\n const usersToUpdate = userSnapshots\n .filter((userSnapshot) => userSnapshot.action === 'editing')\n .map((userSnapshot) => userSnapshot.user);\n const usersToDelete = userSnapshots\n .filter((userSnapshot) => userSnapshot.action === 'deleting')\n .map((userSnapshot) => userSnapshot.user);\n\n if (usersToUpdate.length === 0 && usersToDelete.length === 0) {\n return;\n }\n\n yield* all(usersToUpdate.map(\n (user) => callEffect(updateUser, user),\n ));\n\n yield* all(usersToDelete.map(\n (user) => callEffect(deleteUser, user.id),\n ));\n\n yield* call(logDebug, `Synchronizing users in ${mode}... done`);\n yield* put(USER_SYNC_PERFORM.success(action.meta, action.meta));\n yield* call(\n showNotification,\n {\n variant: 'success',\n type: 'done',\n messageId: 'admin/user/notification/save/success',\n },\n );\n\n yield* call(scheduleUpdateLatestActivity);\n yield* call(scheduleUpdateFeedbackCounter);\n } catch (error) {\n yield* call(logError, `Synchronizing users in ${mode}... error`, error);\n yield* put(USER_SYNC_PERFORM.failure(NativeError.wrap(error), action.meta));\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport {\n USER_ADD,\n USER_DELETE,\n USER_SYNC_PERFORM,\n USER_SYNC_RESET,\n USER_SAVE,\n} from 'src/modules/users/actions/UserActions';\nimport { userCreateSaga } from 'src/modules/users/sagas/userCreateSaga';\nimport { userRemoveSaga } from 'src/modules/users/sagas/userRemoveSaga';\nimport { userSaveSaga } from 'src/modules/users/sagas/userSaveSaga';\nimport { userSyncPerformSaga } from 'src/modules/users/sagas/userSyncPerformSaga';\nimport { cancel, take, takeLatest } from 'typed-redux-saga';\n\nexport function* usersSaga(): SagaIterator {\n yield* takeLatest(USER_ADD.isRequest, userCreateSaga);\n yield* takeLatest(USER_SAVE.isRequest, userSaveSaga);\n yield* takeLatest(USER_DELETE.isRequest, userRemoveSaga);\n\n while (true) {\n const task = yield* takeLatest(USER_SYNC_PERFORM.isRequest, userSyncPerformSaga);\n\n yield* take(USER_SYNC_RESET.is);\n yield* cancel(task);\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { UserFormData } from 'src/modules/common/types/UserFormData';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { ORGANIZATION_USER } from 'src/modules/users/codecs/OrganizationUser';\nimport { User } from 'src/modules/users/types/User';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* createUser(userData: UserFormData): SagaIterator {\n const authUser = yield* select(getLoggedInUser);\n\n try {\n const { content } = yield* call(\n makeRestRequest,\n 'POST',\n `/organizations/${encodeURIComponent(authUser.organization.id)}/users`,\n userData,\n );\n return yield* call(decodeOrThrow, ORGANIZATION_USER, content);\n } catch (error) {\n throw new RuntimeError('Could not save user', { userData }, NativeError.wrap(error));\n }\n}\n","import { NativeError, RuntimeError, Uuid } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* deleteUser(userId: Uuid): SagaIterator {\n const authUser = yield* select(getLoggedInUser);\n\n try {\n yield* call(\n makeRestRequest,\n 'DELETE',\n `/organizations/${encodeURIComponent(authUser.organization.id)}/users/${encodeURIComponent(userId)}`,\n );\n } catch (error) {\n throw new RuntimeError('Could not delete user', { userId }, NativeError.wrap(error));\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { syncUserForeground } from 'src/modules/users/sagas/utils/syncUserForeground';\nimport { waitUserSynchronization } from 'src/modules/users/sagas/utils/waitUserSynchronization';\nimport { getUserEditing } from 'src/modules/users/selectors/getUserEditing';\nimport { UserSnapshot } from 'src/modules/users/types/User';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* forceUserSynchronization(\n users: ReadonlyArray,\n): SagaIterator {\n // if synchronization is scheduled, new foreground task is triggered\n // to cancel all existing processes and to skip the planned delay\n const userEditing = yield* select(getUserEditing);\n if (userEditing?.status.state === 'pending') {\n yield* call(syncUserForeground, users);\n } else {\n yield* call(waitUserSynchronization);\n }\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport * as D from 'io-ts/Decoder';\nimport { SagaIterator } from 'redux-saga';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { ORGANIZATION_USER } from 'src/modules/users/codecs/OrganizationUser';\nimport { User } from 'src/modules/users/types/User';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* loadUsersList(): SagaIterator> {\n const authUser = yield* select(getLoggedInUser);\n\n try {\n const { content } = yield* call(\n makeRestRequest,\n 'GET',\n `/organizations/${encodeURIComponent(authUser.organization.id)}/users`,\n );\n\n return yield* call(decodeOrThrow, USERS, content);\n } catch (error) {\n throw new RuntimeError('Could not load organization users', {}, NativeError.wrap(error));\n }\n}\n\nconst USERS: D.Decoder> = D.array(ORGANIZATION_USER);\n","import { SagaIterator } from 'redux-saga';\nimport { call as callEffect, take as takeEffect } from 'redux-saga/effects';\nimport { CancelledError } from 'src/errors/CancelledError';\nimport { USER_SYNC_PERFORM } from 'src/modules/users/actions/UserActions';\nimport { waitUserSynchronization } from 'src/modules/users/sagas/utils/waitUserSynchronization';\nimport { UserSnapshot } from 'src/modules/users/types/User';\nimport { cancel, put, race } from 'typed-redux-saga';\n\nexport function* syncUserBackground(): SagaIterator> {\n yield* put(USER_SYNC_PERFORM.request('background'));\n\n const { synchronized } = yield* race({\n synchronized: callEffect(waitUserSynchronization),\n cancelled: takeEffect(USER_SYNC_PERFORM.isRequest),\n });\n if (synchronized) {\n return synchronized;\n }\n\n yield* cancel();\n throw new CancelledError('Explicit abort of control flow');\n}\n","import { SagaIterator } from 'redux-saga';\nimport { USER_SYNC_PERFORM } from 'src/modules/users/actions/UserActions';\nimport { waitUserSynchronization } from 'src/modules/users/sagas/utils/waitUserSynchronization';\nimport { UserSnapshot } from 'src/modules/users/types/User';\nimport { call, put } from 'typed-redux-saga';\n\nexport function* syncUserForeground(): SagaIterator> {\n yield* put(USER_SYNC_PERFORM.request('foreground'));\n return yield* call(waitUserSynchronization);\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { makeRestRequest } from 'src/modules/api/sagas/utils/makeRestRequest';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { ORGANIZATION_USER } from 'src/modules/users/codecs/OrganizationUser';\nimport { User } from 'src/modules/users/types/User';\nimport { call, select } from 'typed-redux-saga';\n\nexport function* updateUser(user: User): SagaIterator {\n const authUser = yield* select(getLoggedInUser);\n\n try {\n const { content } = yield* call(\n makeRestRequest,\n 'PUT',\n `/organizations/${encodeURIComponent(authUser.organization.id)}/users/${encodeURIComponent(user.id)}`,\n {\n firstName: user.firstName,\n lastName: user.lastName,\n email: user.email,\n role: user.role,\n },\n );\n return yield* call(decodeOrThrow, ORGANIZATION_USER, content);\n } catch (error) {\n throw new RuntimeError('Could not update user', { user }, NativeError.wrap(error));\n }\n}\n","import { SagaIterator } from 'redux-saga';\nimport { USER_SYNC_PERFORM } from 'src/modules/users/actions/UserActions';\nimport { getUserEditing } from 'src/modules/users/selectors/getUserEditing';\nimport { getUsersListData } from 'src/modules/users/selectors/getUsersListData';\nimport { UserSnapshot } from 'src/modules/users/types/User';\nimport { call, select, take } from 'typed-redux-saga';\n\nexport function* waitUserSynchronization(): SagaIterator> {\n const userSnapshots = yield* select(getUsersListData);\n const userEditing = yield* select(getUserEditing);\n\n if (userEditing === null) {\n return userSnapshots;\n }\n if (userEditing.status.state === 'success') {\n return userSnapshots;\n }\n if (userEditing.status.state === 'failure') {\n throw userEditing.status.error;\n }\n\n yield* take([USER_SYNC_PERFORM.isSuccess, USER_SYNC_PERFORM.isFailure]);\n return yield* call(waitUserSynchronization);\n}\n","import { createSelector } from 'reselect';\nimport { getUsersListData } from 'src/modules/users/selectors/getUsersListData';\nimport { getUsersQuery } from 'src/modules/users/selectors/getUsersQuery';\nimport { User } from 'src/modules/users/types/User';\n\nexport const getFoundUsers = createSelector(\n [getUsersListData, getUsersQuery],\n (userSnapshots, query): ReadonlyArray => {\n const users = userSnapshots.map((userSnapshot) => userSnapshot.user);\n if (query.length < 3) {\n return users;\n }\n\n const lowerCasedQuery = query.toLowerCase();\n\n return users.filter(\n ({ firstName, lastName, email }) => firstName.toLowerCase().includes(lowerCasedQuery) ||\n lastName.toLowerCase().includes(lowerCasedQuery) ||\n email.toLowerCase().includes(lowerCasedQuery),\n );\n },\n);\n","import { createSelector } from 'reselect';\nimport { getLoggedInUser } from 'src/modules/login/selectors/getLoggedInUser';\nimport { getSortedFoundUsers } from 'src/modules/users/selectors/getSortedFoundUsers';\n\nexport const getSortedFoundSelectableUsers = createSelector(\n [getSortedFoundUsers, getLoggedInUser],\n (sortedFoundUsers, loggedInUser) => sortedFoundUsers.filter((user) => user.id !== loggedInUser.id),\n);\n","import { createSelector } from 'reselect';\nimport { INTL_LOCALE_MAP } from 'src/modules/common/constants/language';\nimport { getLanguage } from 'src/modules/config/selectors/getLanguage';\nimport { getFoundUsers } from 'src/modules/users/selectors/getFoundUsers';\nimport { getUsersSortingOrder } from 'src/modules/users/selectors/getUsersSortingOrder';\nimport { getUsersSortingTarget } from 'src/modules/users/selectors/getUsersSortingTarget';\n\nexport const getSortedFoundUsers = createSelector(\n [getLanguage, getFoundUsers, getUsersSortingTarget, getUsersSortingOrder],\n (language, foundUsers, sortingTarget, sortingOrder) => [...foundUsers].sort((a, b) => {\n const collator = new Intl.Collator(INTL_LOCALE_MAP[language]);\n const targetA = a[sortingTarget];\n const targetB = b[sortingTarget];\n\n if (sortingOrder === 'asc') {\n return collator.compare(targetA, targetB);\n }\n return collator.compare(targetB, targetA);\n }),\n);\n","import { createSelector } from 'reselect';\nimport { getUsersState } from 'src/modules/users/selectors/getUsersState';\n\nexport const getUserDeleting = createSelector([\n getUsersState,\n], (state) => state.deleting);\n","import { createSelector } from 'reselect';\nimport { getUsersState } from 'src/modules/users/selectors/getUsersState';\n\nexport const getUserEditing = createSelector([\n getUsersState,\n], (state) => state.editing);\n","import { createSelector } from 'reselect';\nimport { getUsersState } from 'src/modules/users/selectors/getUsersState';\nimport { assertNotNull } from 'src/utils/assert';\n\nexport const getUsersListData = createSelector([\n getUsersState,\n], (state) => assertNotNull(\n state.userSnapshots,\n 'Users list should be fetched first',\n { state },\n));\n","import { createSelector } from 'reselect';\nimport { getUsersState } from 'src/modules/users/selectors/getUsersState';\n\nexport const getUsersQuery = createSelector([\n getUsersState,\n], (state) => state.query);\n","import { createSelector } from 'reselect';\nimport { getUsersState } from 'src/modules/users/selectors/getUsersState';\n\nexport const getUsersSortingOrder = createSelector([\n getUsersState,\n], (state) => state.sortingOrder);\n","import { createSelector } from 'reselect';\nimport { getUsersState } from 'src/modules/users/selectors/getUsersState';\n\nexport const getUsersSortingTarget = createSelector([\n getUsersState,\n], (state) => state.sortingTarget);\n","import { UsersState } from 'src/modules/users/types/UsersState';\nimport { RootState } from 'src/types/RootState';\n\nexport function getUsersState(state: RootState): UsersState {\n return state.users;\n}\n","import './AddUserModal.scss';\nimport { ModalBody, ModalFooter, ModalHeader } from '@carbon/react';\nimport { useForm, useFormWatch } from '@form-ts/react';\nimport { constNull } from 'fp-ts/lib/function';\nimport React, { useEffect } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\nimport { useAction } from 'src/hooks/useAction';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { UserFormData } from 'src/modules/common/types/UserFormData';\nimport { UserRole } from 'src/modules/common/types/UserRole';\nimport { DropdownField } from 'src/modules/form/components/DropdownField';\nimport { TextField } from 'src/modules/form/components/TextField';\nimport { useFormValidator } from 'src/modules/form/hooks/useFormValidator';\nimport { FormError } from 'src/modules/form/types/FormError';\nimport { ensureNonNull } from 'src/modules/form/utils/transform';\nimport { USER_ADD } from 'src/modules/users/actions/UserActions';\nimport { USER_ADD_FORM_SCHEMA } from 'src/modules/users/constants/userAddFormSchema';\nimport { UserSnapshot } from 'src/modules/users/types/User';\n\ntype Props = {\n readonly allUserSnapshots: ReadonlyArray;\n readonly onCancel: () => void;\n};\n\nexport const AddUserModal = ({ allUserSnapshots, onCancel }: Props): React.ReactElement => {\n const intl = useIntl();\n\n const addUser = useAction(USER_ADD.request);\n\n const form = useForm('admin.users.add', {\n initialValues: {\n email: '',\n firstName: '',\n lastName: '',\n role: UserRole.USER,\n },\n reinitialize: false,\n });\n\n const schema = USER_ADD_FORM_SCHEMA(\n allUserSnapshots\n .map((userSnapshot) => userSnapshot.user.email),\n );\n\n useFormValidator(form, schema);\n\n const isLoading = useFormWatch(form, form.submitting.get);\n const addUserSubmitted = useFormWatch(form, form.submitted.get);\n const addUserErrors = useFormWatch(form, form.errors.get);\n\n const onSubmit = (): void => addUser(form);\n\n useEffect(() => {\n if (addUserSubmitted && Object.entries(addUserErrors).length === 0) {\n onCancel();\n\n form.change(form.initialState);\n }\n }, [addUserErrors, addUserSubmitted, form, onCancel]);\n\n return (\n <>\n \n\n \n
    \n
    \n \n\n \n
    \n\n
    \n \n\n \n
    \n
    \n
    \n\n \n \n \n \n\n \n \n \n \n \n );\n};\n\nconst ROLE_LIST = [\n UserRole.USER,\n UserRole.ADMIN,\n];\nconst ROLE_NAMES = {\n [UserRole.USER]: ,\n [UserRole.ADMIN]: ,\n};\n\nconst renderSelectedItem = (role: UserRole): React.ReactElement => (\n {ROLE_NAMES[role]}\n);\nconst RenderItem = (role: UserRole): React.ReactElement => (\n {ROLE_NAMES[role]}\n);\n","import { ModalBody, ModalFooter, ModalHeader } from '@carbon/react';\nimport React from 'react';\nimport { useIntl } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { User } from 'src/modules/users/types/User';\n\ntype Props = {\n onClose: () => void;\n onDelete: () => void;\n removing: boolean;\n selectedUsers: ReadonlyArray;\n};\n\nexport const DeleteUserModal = ({ onClose, onDelete, removing, selectedUsers }: Props): React.ReactElement => {\n const intl = useIntl();\n\n return (\n <>\n \n\n \n {intl.formatMessage(\n { id: 'admin/user/deleteModal/body/content' },\n { users: selectedUsers.map((user) => `${user.firstName} ${user.lastName}`).join(', ') },\n )}\n \n\n \n \n {intl.formatMessage({ id: 'admin/user/deleteModal/footer/cancel' })}\n \n\n \n {intl.formatMessage({ id: 'admin/user/deleteModal/footer/confirm' })}\n \n \n \n );\n};\n","import './UsersListBody.scss';\nimport React, { memo, useCallback, useEffect, useState } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { CustomButton } from 'src/modules/common/components/CustomButton';\nimport { CustomModal } from 'src/modules/common/components/CustomModal';\nimport { DeleteIcon } from 'src/modules/common/icons/DeleteIcon';\nimport { AuthUser } from 'src/modules/common/types/AuthUser';\nimport { UserListActions } from 'src/modules/users/components/UserListActions';\nimport { UserListHeader } from 'src/modules/users/components/UserListHeader';\nimport { UserRow } from 'src/modules/users/components/UserRow';\nimport { SortingOrder, SortingTarget } from 'src/modules/users/types/Sorting';\nimport { User } from 'src/modules/users/types/User';\nimport { UserDeleting } from 'src/modules/users/types/UserDeleting';\nimport { DeleteUserModal } from 'src/modules/users/views/DeleteUserModal';\n\ntype Props = {\n readonly searchQuery: string;\n readonly setSearchQuery: (query: string) => void;\n readonly sortingTarget: SortingTarget;\n readonly setSortingTarget: (target: SortingTarget) => void;\n readonly sortingOrder: SortingOrder;\n readonly setSortingOrder: (order: SortingOrder) => void;\n readonly sortedFoundUsers: ReadonlyArray;\n readonly sortedFoundSelectableUsers: ReadonlyArray;\n readonly loggedInUser: AuthUser;\n readonly userDeleting: UserDeleting | null;\n readonly handleDelete: (data: ReadonlyArray) => void;\n readonly handleAddUserOpen: () => void;\n};\n\nexport const UsersListBody = memo(({\n searchQuery,\n setSearchQuery,\n sortingTarget,\n setSortingTarget,\n sortingOrder,\n setSortingOrder,\n sortedFoundUsers,\n sortedFoundSelectableUsers,\n loggedInUser,\n userDeleting,\n handleDelete,\n handleAddUserOpen,\n}: Props): React.ReactElement => {\n const [isDeleteUserModalOpen, setDeleteUserModalOpen] = useState(false);\n const [selectedUsers, setSelectedUsers] = useState>([]);\n\n const areSomeSelected = selectedUsers.length !== 0 &&\n selectedUsers.length !== sortedFoundSelectableUsers.length;\n const areAllSelected = selectedUsers.length !== 0 &&\n selectedUsers.length === sortedFoundSelectableUsers.length;\n\n const handleSelectAll = (): void => {\n setSelectedUsers(sortedFoundSelectableUsers);\n };\n\n const handleSelectNone = (): void => {\n setSelectedUsers([]);\n };\n\n const handleHeaderCheckboxChange = (): void => {\n if (areAllSelected) {\n return setSelectedUsers([]);\n }\n\n return setSelectedUsers(sortedFoundSelectableUsers);\n };\n\n const handleDeleteUserCancel = (): void => {\n setDeleteUserModalOpen(false);\n };\n\n const handleDeleteUserSubmit = (): void => handleDelete(selectedUsers);\n\n const handleSelect = useCallback((selectedUser: User): void => {\n const selectedUserIds = selectedUsers.map((user) => user.id);\n const checked = selectedUserIds.includes(selectedUser.id);\n\n if (!checked) {\n return setSelectedUsers((prev) => [...prev, selectedUser]);\n }\n\n const filteredUsers = selectedUsers.filter((user) => user.id !== selectedUser.id);\n\n return setSelectedUsers(filteredUsers);\n }, [selectedUsers]);\n\n useEffect(() => {\n const allSelectableUserIds = sortedFoundSelectableUsers.map((user) => user.id);\n setSelectedUsers((prev) => prev.filter((user) => allSelectableUserIds.includes(user.id)));\n }, [sortedFoundSelectableUsers]);\n\n useEffect(() => {\n if (userDeleting?.status.state === 'success') {\n setDeleteUserModalOpen(false);\n }\n }, [userDeleting?.status]);\n\n return (\n
    \n
    \n\n {selectedUsers.length !== 0 ? (\n
    \n
    \n \n\n
    \n\n
    \n \n \n \n
    \n
    \n\n
    \n setDeleteUserModalOpen(true)}>\n \n\n
    \n \n
    \n
    \n\n
    \n\n \n \n \n
    \n
    \n ) : (\n \n )}\n\n \n\n {sortedFoundUsers.map((user) => (\n selectedUser.id).includes(user.id)}\n onSelectHandler={handleSelect}\n />\n ))}\n\n \n \n \n
    \n
    \n );\n});\n","import { connectRouter } from 'connected-react-router';\nimport { History } from 'history';\nimport { combineReducers, Reducer } from 'redux';\nimport { announcementsReducer } from 'src/modules/announcements/reducers/announcementsReducer';\nimport { assetReducer } from 'src/modules/asset/reducers/assetReducer';\nimport { configReducer } from 'src/modules/config/reducers/configReducer';\nimport { feedbackReducer } from 'src/modules/feedback/reducers/feedbackReducer';\nimport { loginReducer } from 'src/modules/login/reducers/loginReducer';\nimport { modalStackReducer } from 'src/modules/modals/reducers/modalStackReducer';\nimport { notificationReducer } from 'src/modules/notifications/reducers/notificationReducer';\nimport { organizationReducer } from 'src/modules/organization/reducers/organizationReducer';\nimport { passwordResetReducer } from 'src/modules/password-reset/reducers/passwordResetReducer';\nimport { projectListReducer } from 'src/modules/project-list/reducers/projectListReducer';\nimport { projectSyncReducer } from 'src/modules/project-sync/reducers/projectSyncReducer';\nimport { projectViewReducer } from 'src/modules/project-view/reducers/projectViewReducer';\nimport { reportReducer } from 'src/modules/report/reducers/reportReducer';\nimport { routingReducer } from 'src/modules/routing/reducers/routingReducer';\nimport { schemaReducer } from 'src/modules/schema/reducers/schemaReducer';\nimport { scrollReducer } from 'src/modules/scroll/reducers/scrollReducer';\nimport { shareProjectReducer } from 'src/modules/sharing-projects/reducers/shareProjectReducer';\nimport { usersReducer } from 'src/modules/users/reducers/usersReducer';\nimport { RootState } from 'src/types/RootState';\n\nexport const rootReducer = (\n history: History,\n): Reducer => combineReducers({\n router: connectRouter(history),\n routing: routingReducer,\n\n scroll: scrollReducer,\n\n config: configReducer,\n login: loginReducer,\n asset: assetReducer,\n report: reportReducer,\n modals: modalStackReducer,\n schema: schemaReducer,\n feedback: feedbackReducer,\n\n projectList: projectListReducer,\n projectView: projectViewReducer,\n projectSync: projectSyncReducer,\n notification: notificationReducer,\n announcements: announcementsReducer,\n\n users: usersReducer,\n organization: organizationReducer,\n shareProject: shareProjectReducer,\n passwordReset: passwordResetReducer,\n});\n","import { ConnectedRouter } from 'connected-react-router';\nimport { History } from 'history';\nimport * as React from 'react';\nimport { HelmetProvider } from 'react-helmet-async';\nimport { Provider } from 'react-redux';\nimport { Route, RouteComponentProps } from 'react-router-dom';\nimport { Store } from 'redux';\nimport { BasedataPage } from 'src/modules/basedata/pages/BasedataPage';\nimport { ConfigProvider } from 'src/modules/config/containers/ConfigProvider';\nimport { ErrorBoundary } from 'src/modules/error/containers/ErrorBoundary';\nimport { ErrorPage } from 'src/modules/error/pages/ErrorPage';\nimport { EvaluationPage } from 'src/modules/evaluation/pages/EvaluationPage';\nimport { HvacPage } from 'src/modules/hvac/pages/HvacPage';\nimport { LoginPage } from 'src/modules/login/pages/LoginPage';\nimport { ModalStack } from 'src/modules/modals/pages/ModalStack';\nimport { OrganizationPage } from 'src/modules/organization/pages/OrganizationPage';\nimport { PasswordForgotPage } from 'src/modules/password-forgot/pages/PasswordForgotPage';\nimport { PasswordResetPage } from 'src/modules/password-reset/pages/PasswordResetPage';\nimport { PasswordSetupPage } from 'src/modules/password-reset/pages/PasswordSetupPage';\nimport { ProfilePage } from 'src/modules/profile/page/ProfilePage';\nimport { ProjectListPage } from 'src/modules/project-list/pages/ProjectListPage';\nimport { ReportDocumentPage } from 'src/modules/report/pages/ReportDocumentPage';\nimport { ReportPage } from 'src/modules/report/pages/ReportPage';\nimport { Initialization } from 'src/modules/routing/containers/Initialization';\nimport { RouteSwitch } from 'src/modules/routing/containers/RouteSwitch';\nimport { RouteNotFoundError } from 'src/modules/routing/errors/RouteNotFoundError';\nimport { SchemaPage } from 'src/modules/schema/pages/SchemaPage';\nimport { ScreenSizeGuard } from 'src/modules/screen-size-guard/views/ScreenSizeGuard';\nimport { ScrollRestoration } from 'src/modules/scroll/containers/ScrollRestoration';\nimport { UsersPage } from 'src/modules/users/pages/UsersPage';\nimport { RootState } from 'src/types/RootState';\n\ntype Props = {\n readonly store: Store;\n readonly history: History;\n};\n\nexport const Root = ({ store, history }: Props): React.ReactElement => (\n \n \n \n \n \n \n \n \n <>\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);\n\nconst NotFound = ({ location }: RouteComponentProps): React.ReactElement => {\n const query = Object.fromEntries(new URLSearchParams(location.search));\n const error = new RouteNotFoundError({ ...location, query });\n return ;\n};\n","import { SagaIterator } from 'redux-saga';\nimport { announcementsSaga } from 'src/modules/announcements/sagas/announcementsSaga';\nimport { assetSaga } from 'src/modules/asset/sagas/assetSaga';\nimport { basedataSaga } from 'src/modules/basedata/sagas/basedataSaga';\nimport { CONFIG_FETCH } from 'src/modules/config/actions/ConfigActions';\nimport { configSaga } from 'src/modules/config/sagas/configSaga';\nimport { evaluationSaga } from 'src/modules/evaluation/sagas/evaluationSaga';\nimport { feedbackSaga } from 'src/modules/feedback/sagas/feedbackSaga';\nimport { hvacSaga } from 'src/modules/hvac/sagas/hvacSaga';\nimport { loaderSaga } from 'src/modules/loader/sagas/loaderSaga';\nimport { loginSaga } from 'src/modules/login/sagas/loginSaga';\nimport { modalStackSaga } from 'src/modules/modals/sagas/modalStackSaga';\nimport { organizationSaga } from 'src/modules/organization/sagas/organizationSaga';\nimport { passwordForgotSaga } from 'src/modules/password-forgot/sagas/passwordForgotSaga';\nimport { passwordResetSaga } from 'src/modules/password-reset/sagas/passwordResetSaga';\nimport { profileSaga } from 'src/modules/profile/sagas/profileSaga';\nimport { projectListSaga } from 'src/modules/project-list/sagas/projectListSaga';\nimport { projectNewSaga } from 'src/modules/project-new/sagas/projectNewSaga';\nimport { projectSyncSaga } from 'src/modules/project-sync/sagas/projectSyncSaga';\nimport { projectViewSaga } from 'src/modules/project-view/sagas/projectViewSaga';\nimport { reportSaga } from 'src/modules/report/sagas/reportSaga';\nimport { routingSaga } from 'src/modules/routing/sagas/routingSaga';\nimport { schemaSaga } from 'src/modules/schema/sagas/schemaSaga';\nimport { shareProjectSaga } from 'src/modules/sharing-projects/sagas/shareProjectSaga';\nimport { usersSaga } from 'src/modules/users/sagas/usersSaga';\nimport { fork, put, take } from 'typed-redux-saga';\n\nexport function* rootSaga(): SagaIterator {\n yield* fork(loaderSaga);\n yield* fork(configSaga);\n\n // prefetch configuration before starting the app\n yield* put(CONFIG_FETCH.request());\n yield* take(CONFIG_FETCH.isSuccess);\n\n yield* fork(routingSaga);\n yield* fork(loginSaga);\n yield* fork(passwordForgotSaga);\n yield* fork(passwordResetSaga);\n yield* fork(schemaSaga);\n yield* fork(hvacSaga);\n yield* fork(basedataSaga);\n yield* fork(projectNewSaga);\n yield* fork(projectSyncSaga);\n yield* fork(projectListSaga);\n yield* fork(projectViewSaga);\n yield* fork(evaluationSaga);\n yield* fork(reportSaga);\n yield* fork(assetSaga);\n yield* fork(modalStackSaga);\n yield* fork(feedbackSaga);\n yield* fork(profileSaga);\n yield* fork(usersSaga);\n yield* fork(organizationSaga);\n yield* fork(shareProjectSaga);\n yield* fork(announcementsSaga);\n}\n","import { RuntimeError } from '@belimo-retrofit-portal/logic';\nimport * as D from 'io-ts/Decoder';\nimport { SagaIterator } from 'redux-saga';\nimport { NATIVE_BLOB } from 'src/io/codecs/NativeBlob';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { XlsxValue } from 'src/modules/common/types/XlsxValue';\nimport { doOnWorker } from 'src/sagas/utils/doOnWorker';\nimport { ExportWorkerResponse } from 'src/types/worker/ExportWorker';\nimport { call } from 'typed-redux-saga';\n\nexport function* doOnExportWorker(\n request: ReadonlyArray>,\n): SagaIterator {\n const response = yield* call(doOnWorker, '/export-worker.js', request);\n const data = decodeOrThrow(\n WORKER_RESULT,\n response,\n );\n if (data.type === 'failure') {\n throw new RuntimeError(\n `Error while executing export worker (${data.error.name}: ${data.error.message})`,\n { error: data.error },\n );\n }\n\n return data.content;\n}\n\nconst WORKER_ERROR = D.struct({\n name: D.string,\n message: D.string,\n});\n\nconst WORKER_RESULT_SUCCESS = D.struct({\n type: D.literal('success'),\n content: NATIVE_BLOB,\n});\n\nconst WORKER_RESULT_FAILURE = D.struct({\n type: D.literal('failure'),\n error: WORKER_ERROR,\n});\n\nconst WORKER_RESULT: D.Decoder = D.sum('type')({\n success: WORKER_RESULT_SUCCESS,\n failure: WORKER_RESULT_FAILURE,\n});\n","import { RuntimeError } from '@belimo-retrofit-portal/logic';\nimport * as D from 'io-ts/Decoder';\nimport { SagaIterator } from 'redux-saga';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { XLSX_VALUE } from 'src/modules/common/codecs/XlsxValue';\nimport { XlsxValue } from 'src/modules/common/types/XlsxValue';\nimport { doOnWorker } from 'src/sagas/utils/doOnWorker';\nimport { ImportWorkerResponse } from 'src/types/worker/ImportWorker';\nimport { call } from 'typed-redux-saga';\n\nexport function* doOnImportWorker(\n request: File,\n): SagaIterator {\n const response = yield* call(doOnWorker, '/import-worker.js', request);\n const data = decodeOrThrow(\n WORKER_RESULT,\n response,\n );\n if (data.type === 'failure') {\n throw new RuntimeError(\n `Error while executing import worker (${data.error.name}: ${data.error.message})`,\n { error: data.error },\n );\n }\n\n return data.content;\n}\n\nconst WORKER_ERROR = D.struct({\n name: D.string,\n message: D.string,\n});\n\nconst WORKER_RESULT_SUCCESS = D.struct({\n type: D.literal('success'),\n content: D.array(D.array(XLSX_VALUE)),\n});\n\nconst WORKER_RESULT_FAILURE = D.struct({\n type: D.literal('failure'),\n error: WORKER_ERROR,\n});\n\nconst WORKER_RESULT: D.Decoder = D.sum('type')({\n success: WORKER_RESULT_SUCCESS,\n failure: WORKER_RESULT_FAILURE,\n});\n","import { RuntimeError } from '@belimo-retrofit-portal/logic';\nimport * as D from 'io-ts/Decoder';\nimport { SagaIterator } from 'redux-saga';\nimport { NATIVE_BLOB } from 'src/io/codecs/NativeBlob';\nimport { decodeOrThrow } from 'src/io/utils/decodeOrThrow';\nimport { doOnWorker } from 'src/sagas/utils/doOnWorker';\nimport { HtmlToPdfWorkerRequest, HtmlToPdfWorkerResponse } from 'src/types/worker/HtmlToPdfWorker';\nimport { call } from 'typed-redux-saga';\n\nexport function* doOnPdfWorker(\n request: HtmlToPdfWorkerRequest,\n): SagaIterator {\n const response = yield* call(doOnWorker, '/html-to-pdf-worker.js', request);\n const data = decodeOrThrow(\n WORKER_RESULT,\n response,\n );\n if (data.type === 'failure') {\n throw new RuntimeError(\n `Error while executing PDF worker (${data.error.name}: ${data.error.message})`,\n { error: data.error },\n );\n }\n\n return data.content;\n}\n\nconst WORKER_ERROR = D.struct({\n name: D.string,\n message: D.string,\n});\n\nconst WORKER_RESULT_SUCCESS = D.struct({\n type: D.literal('success'),\n content: NATIVE_BLOB,\n});\n\nconst WORKER_RESULT_FAILURE = D.struct({\n type: D.literal('failure'),\n error: WORKER_ERROR,\n});\n\nconst WORKER_RESULT: D.Decoder = D.sum('type')({\n success: WORKER_RESULT_SUCCESS,\n failure: WORKER_RESULT_FAILURE,\n});\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { CpsCallback } from 'redux-saga/effects';\nimport { cps, SagaGenerator } from 'typed-redux-saga';\n\nexport function* doOnWorker(\n workerUrl: string,\n request: unknown,\n): SagaIterator {\n const worker = new Worker(workerUrl);\n try {\n return yield* doRequest(worker, request);\n } finally {\n worker.terminate();\n }\n}\n\nfunction* doRequest(\n worker: Worker,\n message: unknown,\n): SagaGenerator {\n const channel = new MessageChannel();\n\n try {\n return yield* cps(doWorkerRequestUsingMessagePort, worker, channel, message);\n } catch (error) {\n throw new RuntimeError('Error while sending Worker request', { message }, NativeError.wrap(error));\n } finally {\n channel.port1.close();\n channel.port1.onmessage = null;\n channel.port1.onmessageerror = null;\n\n channel.port2.close();\n channel.port2.onmessage = null;\n channel.port2.onmessageerror = null;\n }\n}\n\nfunction doWorkerRequestUsingMessagePort(\n worker: Worker,\n channel: MessageChannel,\n message: unknown,\n callback: CpsCallback,\n): void {\n worker.postMessage(message, [channel.port1]);\n\n // eslint-disable-next-line no-param-reassign\n channel.port2.onmessage = (event): void => callback(null, event.data);\n // eslint-disable-next-line no-param-reassign\n channel.port2.onmessageerror = (event): void => callback(event.data, undefined);\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { SagaIterator } from 'redux-saga';\nimport { call } from 'typed-redux-saga';\n\nexport function* getImageContent(\n url: string,\n): SagaIterator {\n try {\n const image = new Image();\n image.src = url;\n image.crossOrigin = 'anonymous';\n yield* call([image, image.decode]);\n\n const canvas = document.createElement('canvas');\n canvas.width = image.naturalWidth;\n canvas.height = image.naturalHeight;\n\n const context = canvas.getContext('2d')!;\n context.drawImage(image, 0, 0);\n\n const blob = yield* call(saveCanvas, canvas);\n return yield* call([blob, blob.arrayBuffer]);\n } catch (error) {\n throw new RuntimeError(`Could not get image content \"${url}\"`, {}, NativeError.wrap(error));\n }\n}\n\nfunction saveCanvas(canvas: HTMLCanvasElement): Promise {\n return new Promise((resolve, reject) => {\n canvas.toBlob((data) => {\n if (data !== null) {\n resolve(data);\n } else {\n reject(new RuntimeError('Could not save canvas content'));\n }\n }, 'image/png', 1);\n });\n}\n","import { HtmlNode, parse as parseHtmlToPdf } from '@belimo-retrofit-portal/html2pdf/lib/parse';\nimport { SagaIterator } from 'redux-saga';\nimport { call as callEffect } from 'redux-saga/effects';\nimport { doOnPdfWorker } from 'src/sagas/utils/doOnPdfWorker';\nimport { getImageContent } from 'src/sagas/utils/getImageContent';\nimport { HtmlToPdfWorkerRequest } from 'src/types/worker/HtmlToPdfWorker';\nimport { all, call } from 'typed-redux-saga';\n\nexport function* htmlToPdf(\n pages: ReadonlyArray,\n): SagaIterator {\n const nodes: HtmlNode[] = [];\n for (const child of pages) {\n const pageNode = yield* call(parseHtmlToPdf, child);\n nodes.push(pageNode);\n }\n\n const imageUrls = yield* call(getImageUrls, nodes);\n const imageData = yield* all(imageUrls.map((url) => callEffect(getImageContent, url)));\n const resources = new Map(imageUrls.map((url, index) => [url, imageData[index]]));\n\n const workerRequest: HtmlToPdfWorkerRequest = { nodes, resources };\n return yield* call(doOnPdfWorker, workerRequest);\n}\n\nfunction getImageUrls(nodes: ReadonlyArray): string[] {\n const imageUrls: string[] = [];\n for (const node of nodes) {\n if (node.type === 'block') {\n imageUrls.push(...getImageUrls(node.children));\n }\n if (node.type === 'image') {\n imageUrls.push(node.imageSource);\n }\n }\n\n return imageUrls;\n}\n","import { SagaIterator } from 'redux-saga';\nimport { call } from 'typed-redux-saga';\n\nexport function* logDebug(message: string, context?: unknown): SagaIterator {\n yield* call({\n // eslint-disable-next-line no-console\n fn: console.debug,\n context: console,\n }, message, context);\n}\n\nexport function* logInfo(message: string, context?: unknown): SagaIterator {\n yield* call({\n // eslint-disable-next-line no-console\n fn: console.info,\n context: console,\n }, message, context);\n}\n\nexport function* logError(message: string, context?: unknown): SagaIterator {\n yield* call({\n // eslint-disable-next-line no-console\n fn: console.error,\n context: console,\n }, message, context);\n}\n","import { NativeError, RuntimeError } from '@belimo-retrofit-portal/logic';\nimport { Json } from 'fp-ts/Json';\nimport { SagaIterator } from 'redux-saga';\nimport { call } from 'typed-redux-saga';\n\nexport function* storageGet(key: string): SagaIterator {\n try {\n const stored = yield* call({\n context: window.localStorage,\n fn: window.localStorage.getItem,\n }, key);\n if (stored === null) {\n return undefined;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return JSON.parse(stored);\n } catch (error) {\n throw new RuntimeError(`Could not get \"${key}\" storage value`, { key }, NativeError.wrap(error));\n }\n}\n\nexport function* storageSet(key: string, val: Json): SagaIterator {\n try {\n const stored = JSON.stringify(val);\n yield* call({\n context: window.localStorage,\n fn: window.localStorage.setItem,\n }, key, stored);\n } catch (error) {\n throw new RuntimeError(`Could not set \"${key}\" storage value`, { key, val }, NativeError.wrap(error));\n }\n}\n","import { AssertionError, DecodingError } from '@belimo-retrofit-portal/logic';\nimport { fold } from 'fp-ts/Either';\nimport { pipe } from 'fp-ts/function';\nimport { Decoder } from 'io-ts/Decoder';\nimport { isDefined, isNotEmpty, isNotNull } from 'src/utils/guard';\n\nexport function assertDefined(\n value: TValue | undefined,\n message: string,\n context?: unknown,\n): TValue {\n if (isDefined(value)) {\n return value;\n }\n\n throw new AssertionError(message, context);\n}\n\nexport function assertNotNull(\n value: TValue | null,\n message: string,\n context?: unknown,\n): TValue {\n if (isNotNull(value)) {\n return value;\n }\n\n throw new AssertionError(message, context);\n}\n\nexport function assertNotEmpty(\n value: TValue | null | undefined,\n message: string,\n context?: unknown,\n): TValue {\n if (isNotEmpty(value)) {\n return value;\n }\n\n throw new AssertionError(message, context);\n}\n\nexport function assertDecode(\n input: unknown,\n decoder: Decoder,\n message: string,\n context?: unknown,\n): TValue {\n return pipe(\n input,\n decoder.decode,\n fold(\n (error) => new AssertionError(message, context, new DecodingError(input, error)).throw(),\n (value) => value,\n ),\n );\n}\n\nexport function assertNever(\n message: string,\n context?: unknown,\n): never {\n throw new AssertionError(message, context);\n}\n","import { AnyAction } from 'redux';\nimport { SagaIterator } from 'redux-saga';\nimport { call, take, Pattern } from 'redux-saga/effects';\nimport { race } from 'typed-redux-saga';\n\ntype Saga = (...args: TArgs) => SagaIterator;\n\nexport function cancelSagaOn(\n saga: Saga,\n cancelOn: Pattern,\n): Saga {\n return function* wrapped(...args: TArgs): SagaIterator {\n const { cancel, result } = yield* race({\n result: call(saga, ...args),\n cancel: take(cancelOn),\n });\n if (cancel) {\n return undefined;\n }\n\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n return result as TResult;\n };\n}\n","import { Action, Reducer } from 'redux';\n\ntype StrictReducer = (state: TState, action: Action) => TState;\n\nexport function chainReducers(\n initialState: TState,\n reducers: ReadonlyArray>,\n): Reducer {\n // eslint-disable-next-line @typescript-eslint/default-param-last\n return (state = initialState, action) => reducers.reduce((result, reducer) => reducer(result, action), state);\n}\n","import { BaseError } from '@belimo-retrofit-portal/logic';\nimport { AnyAction } from 'redux';\n\ntype ActionHelper = {\n request(data: TRequest, meta: TMeta): ActionRequest;\n pending(meta: TMeta): ActionPending;\n success(data: TSuccess, meta: TMeta): ActionSuccess;\n failure(error: BaseError, meta: TMeta): ActionFailure;\n\n isRequest(action: AnyAction): action is ActionRequest;\n isPending(action: AnyAction): action is ActionPending;\n isSuccess(action: AnyAction): action is ActionSuccess;\n isFailure(action: AnyAction): action is ActionFailure;\n};\n\ntype ActionBase = {\n readonly type: string;\n readonly data: TData;\n readonly meta: TMeta;\n};\n\ntype ActionRequest = ActionBase;\ntype ActionPending = ActionBase;\ntype ActionSuccess = ActionBase;\ntype ActionFailure = ActionBase;\n\nexport type GetRequestActionType>\n = TActions extends ActionHelper\n ? ActionRequest\n : never;\nexport type GetPendingActionType>\n = TActions extends ActionHelper\n ? ActionPending\n : never;\nexport type GetSuccessActionType>\n = TActions extends ActionHelper\n ? ActionSuccess\n : never;\nexport type GetFailureActionType>\n = TActions extends ActionHelper\n ? ActionFailure\n : never;\n\nexport function createActions<\n TRequest,\n TSuccess,\n TMeta = void,\n>(type: string): ActionHelper {\n const REQUEST = `${type}_REQUEST`;\n const PENDING = `${type}_PENDING`;\n const SUCCESS = `${type}_SUCCESS`;\n const FAILURE = `${type}_FAILURE`;\n\n return {\n isRequest: (action): action is ActionRequest => action.type === REQUEST,\n isPending: (action): action is ActionPending => action.type === PENDING,\n isSuccess: (action): action is ActionSuccess => action.type === SUCCESS,\n isFailure: (action): action is ActionFailure => action.type === FAILURE,\n\n request: (data, meta) => ({\n type: REQUEST,\n data: data,\n meta: meta,\n }),\n pending: (meta) => ({\n type: PENDING,\n data: undefined,\n meta: meta,\n }),\n success: (data, meta) => ({\n type: SUCCESS,\n data: data,\n meta: meta,\n }),\n failure: (data, meta) => ({\n type: FAILURE,\n data: data,\n meta: meta,\n }),\n };\n}\n","import { AnyAction } from 'redux';\n\ntype ActionHelper = {\n trigger(data: TData, meta: TMeta): ActionTrigger;\n is(action: AnyAction): action is ActionTrigger;\n};\n\ntype ActionTrigger = {\n readonly type: string;\n readonly data: TData;\n readonly meta: TMeta;\n};\n\nexport type GetTriggerActionType>\n = TActions extends ActionHelper\n ? ActionTrigger\n : never;\n\nexport function createTrigger(type: string): ActionHelper {\n const TRIGGER = `${type}_TRIGGER`;\n\n return {\n trigger: (data, meta) => ({ type: TRIGGER, data: data, meta: meta }),\n is: (action): action is ActionTrigger => action.type === TRIGGER,\n };\n}\n","export function isDefined(value: T | undefined): value is T {\n return value !== undefined;\n}\n\nexport function isNotNull(value: T | null): value is T {\n return value !== null;\n}\n\nexport function isNotEmpty(value: T | undefined | null): value is T {\n return value !== null && value !== undefined;\n}\n","import { ParametricSelector, Selector } from 'reselect';\nimport { RootState } from 'src/types/RootState';\n\nexport function createParameterSelector(): ParametricSelector {\n return (state, param) => param;\n}\n\nexport function createConditionalSelector(\n condition: Selector,\n thenSelector: Selector,\n elseSelector: Selector,\n): Selector;\n\nexport function createConditionalSelector(\n condition: ParametricSelector,\n thenSelector: ParametricSelector,\n elseSelector: ParametricSelector,\n): ParametricSelector;\n\nexport function createConditionalSelector(\n condition: ParametricSelector,\n thenSelector: ParametricSelector,\n elseSelector: ParametricSelector,\n): ParametricSelector {\n /* eslint-disable @typescript-eslint/no-unsafe-argument */\n return (state, param, ...args) => (condition(state, param, ...args)\n ? thenSelector(state, param, ...args)\n : elseSelector(state, param, ...args));\n}\n\nexport function createChainedSelector(\n selector1: Selector,\n selector2: ParametricSelector,\n): Selector;\n\nexport function createChainedSelector(\n selector1: ParametricSelector,\n selector2: ParametricSelector,\n): ParametricSelector;\n\nexport function createChainedSelector(\n selector1: ParametricSelector,\n selector2: ParametricSelector,\n): ParametricSelector {\n return (state, param) => selector2(state, selector1(state, param));\n}\n"],"sourceRoot":""}