ws-voice-infinity-global-module 1.0.36 → 1.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function _typeof(e){"@babel/helpers - typeof";return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(_getRequireWildcardCache=function(e){return e?r:t})(e)}function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==_typeof(e)&&"function"!=typeof e)return{"default":e};var r=_getRequireWildcardCache(t);if(r&&r.has(e))return r.get(e);var o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=n?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(o,a,i):o[a]=e[a]}return o["default"]=e,r&&r.set(e,o),o}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){_defineProperty(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.BaseService=void 0;var GlobalConstants=_interopRequireWildcard(require("../constants/globalConstants")),_reactToastify=require("react-toastify"),_authServices=require("../services/authServices"),_globalConfig=require("../config/globalConfig"),BaseService=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"doPromise",value:function(t,r){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return new Promise(function(a,i){return!o&&t&&t({type:GlobalConstants.LOADING_START}),r.then(function(r){return!o&&t&&t({type:GlobalConstants.LOADING_FINISH}),r&&r.data.error&&e.showToast(_reactToastify.toast.error(r.data.error)),r&&r.data.message&&e.showToast(_reactToastify.toast.success(r.data.message)),r?a(r.data?r.data:{}):i({})})["catch"](function(r){return n||e.showToast(_reactToastify.toast.error(e.DEFAULT_ERROR_MESSAGE[r.toString()]?e.DEFAULT_ERROR_MESSAGE[r.toString()]:e.parseErrorText(r.response))),!o&&t&&t({type:GlobalConstants.LOADING_FINISH}),i(r)})})}},{key:"parseErrorText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&e.data&&e.data.error?e.data.error_description||e.data.error:e&&e.data&&e.data.message?e.data.message:"Неизвестная ошибка"}},{key:"showToast",value:function(t){"undefined"!=typeof window&&window.setTimeout(function(){return _reactToastify.toast.dismiss(t)},e.DEFAULT_TIMEOUT)}},{key:"checkConfig",value:function(t){return e.trueConfig=!0,t.isAuth&&e.checkAuth(),e.trueConfig}},{key:"checkAuth",value:function(){_authServices.AuthService.getUserInfo()||(e.trueConfig=!1)}},{key:"defaultCookieParams",value:function(){var e
|
|
1
|
+
"use strict";function _typeof(e){"@babel/helpers - typeof";return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(_getRequireWildcardCache=function(e){return e?r:t})(e)}function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==_typeof(e)&&"function"!=typeof e)return{"default":e};var r=_getRequireWildcardCache(t);if(r&&r.has(e))return r.get(e);var o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=n?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(o,a,i):o[a]=e[a]}return o["default"]=e,r&&r.set(e,o),o}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){_defineProperty(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.BaseService=void 0;var GlobalConstants=_interopRequireWildcard(require("../constants/globalConstants")),_reactToastify=require("react-toastify"),_authServices=require("../services/authServices"),_globalConfig=require("../config/globalConfig"),BaseService=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"getDomain",value:function(){var e=/(http|https):\/\//;return _globalConfig.globalConfig.mainModuleDomain.replace(e,"")}},{key:"doPromise",value:function(t,r){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return new Promise(function(a,i){return!o&&t&&t({type:GlobalConstants.LOADING_START}),r.then(function(r){return!o&&t&&t({type:GlobalConstants.LOADING_FINISH}),r&&r.data.error&&e.showToast(_reactToastify.toast.error(r.data.error)),r&&r.data.message&&e.showToast(_reactToastify.toast.success(r.data.message)),r?a(r.data?r.data:{}):i({})})["catch"](function(r){return n||e.showToast(_reactToastify.toast.error(e.DEFAULT_ERROR_MESSAGE[r.toString()]?e.DEFAULT_ERROR_MESSAGE[r.toString()]:e.parseErrorText(r.response))),!o&&t&&t({type:GlobalConstants.LOADING_FINISH}),i(r)})})}},{key:"parseErrorText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&e.data&&e.data.error?e.data.error_description||e.data.error:e&&e.data&&e.data.message?e.data.message:"Неизвестная ошибка"}},{key:"showToast",value:function(t){"undefined"!=typeof window&&window.setTimeout(function(){return _reactToastify.toast.dismiss(t)},e.DEFAULT_TIMEOUT)}},{key:"checkConfig",value:function(t){return e.trueConfig=!0,t.isAuth&&e.checkAuth(),e.trueConfig}},{key:"checkAuth",value:function(){_authServices.AuthService.getUserInfo()||(e.trueConfig=!1)}},{key:"defaultCookieParams",value:function(){var e={Path:"/"};return"development"===process.env.NODE_ENV?e:(e.Domain=".".concat(this.getDomain()),e)}},{key:"getCookieValue",value:function(e){var t=document.cookie.match(new RegExp("(?:^|; )".concat(e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1"),"=([^;]*)")));return t?decodeURIComponent(t[1]):null}},{key:"setCookie",value:function(t,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;o||(o=e.defaultCookieParams());var n=encodeURIComponent(r),a=_objectSpread({},o),i=o.expires?o.expires:e.secondsInHour*e.hourInDay;if(i&&"number"==typeof i){var c=new Date;c.setTime(c.getTime()+i*e.millisecondsInSecond),i=a.expires=c}i&&i.toUTCString&&(a.expires=i.toUTCString());var s="".concat(t,"=").concat(n);for(var u in a){s+="; ".concat(u);var l=a[u];l!==!0&&(s+="=".concat(l))}document.cookie=s}},{key:"deleteCookie",value:function(t){var r=e.defaultCookieParams();r=_objectSpread(_objectSpread({},r),{},{expires:-1}),e.setCookie(t,"",r)}}]),e}();exports.BaseService=BaseService,BaseService.POST_METHOD="post",BaseService.GET_METHOD="get",BaseService.DEFAULT_ERROR_MESSAGE={"Error: Request failed with status code 404":"Ошибка! Страница не найдена"},BaseService.DEFAULT_TIMEOUT=5e3,BaseService.millisecondsInSecond=1e3,BaseService.secondsInHour=3600,BaseService.hourInDay=24,BaseService.CURRENT_WIDTH="undefined"==typeof window?0:window.innerWidth,BaseService.COOKIE_PREFIX="-".concat(BaseService.getDomain()),BaseService.ADMIN_USER_INFO_COOKIE="adminUserInfo".concat(BaseService.COOKIE_PREFIX),BaseService.USER_INFO_COOKIE="userInfo".concat(BaseService.COOKIE_PREFIX),BaseService.PAGE_AFTER_AUTH_COOKIE="pageAfterAuth".concat(BaseService.COOKIE_PREFIX),BaseService.AUTH_SOCIAL_TOKEN_COOKIE="authSocialToken".concat(BaseService.COOKIE_PREFIX),BaseService.SELECT_OKTMO__COOKIE="selectOktmo".concat(BaseService.COOKIE_PREFIX);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _classCallCheck(e,l){if(!(e instanceof l))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,l){for(var a=0;a<l.length;a++){var i=l[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,l,a){return l&&_defineProperties(e.prototype,l),a&&_defineProperties(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.TopNavMainPageService=void 0;var _globalConfig=require("../config/globalConfig"),_appMode=_interopRequireDefault(require("../enums/appMode")),_modules=_interopRequireDefault(require("../enums/modules")),_authServices=require("./authServices"),_businessModeUtilsService=require("./businessModeUtilsService"),_topNavService=require("./topNavService"),_utilService=require("./utilService"),TopNavMainPageService=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"menuItems",get:function(){return[{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].COMPLAINTS.value,"/"),friendStates:[],hide:!_globalConfig.globalConfig.complaintsOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessComplaintsOn)||_utilService.UtilService.isSkh()&&_businessModeUtilsService.BusinessModeUtilsService.isBusinessModeOn(),name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].COMPLAINTS),module:_modules["default"].COMPLAINTS,children:[{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].COMPLAINTS.value,"/"),friendStates:[],name:"О сервисе",module:_modules["default"].COMPLAINTS,exact:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/subject-category":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].COMPLAINTS.value,"/subject-category"),friendStates:[],name:"Каталог проблем",module:_modules["default"].COMPLAINTS,exact:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/messages-list":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].COMPLAINTS.value,"/messages-list"),friendStates:[],name:"Лента проблем",module:_modules["default"].COMPLAINTS,exact:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/before-after":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].COMPLAINTS.value,"/"),friendStates:[],name:"Результат работы",module:_modules["default"].COMPLAINTS,exact:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].MAP.value)?"/?showComplaint":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].MAP.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].MAP.value,"/?showComplaint"),friendStates:[],name:"Проблема на карте",module:_modules["default"].COMPLAINTS,exact:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/new":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].COMPLAINTS.value,"/new"),friendStates:[],name:"Сообщить о проблеме",module:_modules["default"].COMPLAINTS,exact:!0}]},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].EVALUATION.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].EVALUATION.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].EVALUATION.value,"/"),friendStates:[],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].EVALUATION),module:_modules["default"].EVALUATION,hide:!_globalConfig.globalConfig.evaluationOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessEvaluationOn)},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].VOTING.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].VOTING.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].VOTING.value,"/"),friendStates:[],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].VOTING),module:_modules["default"].VOTING,hide:!_globalConfig.globalConfig.votingOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessVotingOn)},{state:null,externalUrl:"https://urban.vmeste.pkgo.ru",name:"Голосование",hide:!_utilService.UtilService.isKam()},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].EVENT.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].EVENT.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].EVENT.value,"/"),friendStates:[],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].EVENT),module:_modules["default"].EVENT,hide:!_globalConfig.globalConfig.eventOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessEventOn)},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].ARTICLE.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].ARTICLE.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].ARTICLE.value,"/"),friendStates:[],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].ARTICLE),module:_modules["default"].ARTICLE,hide:!_globalConfig.globalConfig.articleOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessArticleOn)},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].MAP.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].MAP.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].MAP.value,"/"),friendStates:[],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].MAP),module:_modules["default"].MAP,hide:!_globalConfig.globalConfig.mapOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessMapOn)||_globalConfig.globalConfig.mapOn&&_globalConfig.globalConfig.lifecityOn&&!_globalConfig.globalConfig.registryContractOn},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].ORGANIZATION.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].ORGANIZATION.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].ORGANIZATION.value,"/"),friendStates:[],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].ORGANIZATION),module:_modules["default"].ORGANIZATION,hide:!_globalConfig.globalConfig.organizationOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessOrganizationOn)},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].CAMERAS.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].CAMERAS.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].CAMERAS.value,"/"),friendStates:[],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].CAMERAS),module:_modules["default"].CAMERAS,hide:!_globalConfig.globalConfig.camerasOn},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].POLL.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].POLL.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].POLL.value,"/"),friendStates:[],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].POLL),module:_modules["default"].POLL,hide:!_globalConfig.globalConfig.pollOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessPollOn)},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].INITIATIVE.value)?"/initiatives-list":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].INITIATIVE.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].INITIATIVE.value,"/initiatives-list"),friendStates:["intitative"],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].INITIATIVE),module:_modules["default"].INITIATIVE,hide:!_globalConfig.globalConfig.initiativenOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessInitiativeOn)},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].OPENDATA.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].OPENDATA.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].OPENDATA.value,"/"),friendStates:[],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].OPENDATA),module:_modules["default"].OPENDATA,hide:!_globalConfig.globalConfig.openDataOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessOpenDataOn)},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].RECEPTION.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].RECEPTION.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].RECEPTION.value,"/"),friendStates:[],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].RECEPTION),module:_modules["default"].RECEPTION,hide:!_globalConfig.globalConfig.receptionOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessReceptionOn),children:[{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].RECEPTION.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].RECEPTION.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].RECEPTION.value,"/"),friendStates:[],name:"О сервисе",module:_modules["default"].RECEPTION,exact:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].RECEPTION.value)?"/new":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].RECEPTION.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].RECEPTION.value,"/new"),friendStates:[],name:"Записаться на приём",module:_modules["default"].RECEPTION,exact:!0}]},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].MAIN.value)?"/snow-track":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].MAIN.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].MAIN.value,"/snow-track"),friendStates:[],name:"Уборка снега",module:_modules["default"].MAIN,hide:!_globalConfig.globalConfig.snowTrackOn},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].PROFILE.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].PROFILE.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].PROFILE.value,"/"),friendStates:[],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].PROFILE),module:_modules["default"].PROFILE,hide:!_authServices.AuthService.getUserInfo()||!_globalConfig.globalConfig.profileOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessProfileOn),dropdownAvatar:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/cabinet/with-mode/".concat(_appMode["default"].PUBLIC):null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].COMPLAINTS.value,"/cabinet/with-mode/".concat(_appMode["default"].PUBLIC)),friendStates:[],name:"Мои ".concat(_globalConfig.globalConfig.WS_VOICE_INFINITY_COMPLAINT_NAME_BASE,"ия"),exact:!0,hide:!_globalConfig.globalConfig.complaintsOn||!_authServices.AuthService.getUserInfo(),module:_modules["default"].COMPLAINTS,moduleRootState:"/",dropdownAvatar:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/cabinet/with-mode/".concat(_appMode["default"].BUSINESS):null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].COMPLAINTS.value,"/cabinet/with-mode/".concat(_appMode["default"].BUSINESS)),friendStates:[],name:"".concat(_utilService.UtilService.setFirstWordToUpperCase(_globalConfig.globalConfig.WS_VOICE_INFINITY_COMPLAINT_NAME_BASE),"ия компании"),exact:!0,hide:!_authServices.AuthService.getUserInfo()||!!_utilService.UtilService.isApiri()||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessComplaintsOn),module:_modules["default"].COMPLAINTS,moduleRootState:"/",needHasOrganization:!0,dropdownAvatar:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].LIFECITY.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].LIFECITY.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].LIFECITY.value,"/"),friendStates:[],name:_modules["default"].LIFECITY.name,hide:!_globalConfig.globalConfig.lifecityOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessLifecityOn),module:_modules["default"].LIFECITY,moduleRootState:"/",children:[{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].LIFECITY.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].LIFECITY.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].LIFECITY.value,"/"),friendStates:[],name:"О сервисе",module:_modules["default"].LIFECITY,exact:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].MAP.value)?"/?showContract&entityId=".concat(_globalConfig.globalConfig.WS_VOICE_INFINITY_CONTRACT_CATEGORY_GROUP_ID,"&filtersOff"):null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].MAP.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].MAP.value,"/?showContract&entityId=".concat(_globalConfig.globalConfig.WS_VOICE_INFINITY_CONTRACT_CATEGORY_GROUP_ID,"&filtersOff")),friendStates:[],name:"Народный контроль",module:_modules["default"].LIFECITY,exact:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].LIFECITY.value)?"/npa-list":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].LIFECITY.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].LIFECITY.value,"/npa-list"),friendStates:[],name:"НПА о проекте",module:_modules["default"].LIFECITY,exact:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].LIFECITY.value)?"/history-project":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].LIFECITY.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].LIFECITY.value,"/history-project"),friendStates:[],name:"История проекта",module:_modules["default"].LIFECITY,exact:!0}]},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].DISCUSSIONS.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].DISCUSSIONS.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].DISCUSSIONS.value,"/"),friendStates:[],name:_modules["default"].DISCUSSIONS.name,exact:!0,hide:!_globalConfig.globalConfig.discussionsOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessDiscussionsOn),module:_modules["default"].DISCUSSIONS,moduleRootState:"/"},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].STROIKA.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].STROIKA.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].STROIKA.value,"/"),friendStates:[],name:_modules["default"].STROIKA.name,exact:!0,hide:!_globalConfig.globalConfig.stroikaOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessDiscussionsOn),module:_modules["default"].STROIKA,moduleRootState:"/"},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].MAIN.value)?"/cabinet/initiatives-list":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].MAIN.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].MAIN.value,"/cabinet/initiatives-list"),friendStates:[],name:"Мои инициативы",exact:!0,hide:!_globalConfig.globalConfig.initiativenOn||!_authServices.AuthService.getUserInfo()||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessInitiativeOn),module:_modules["default"].MAIN,moduleRootState:"/",dropdownAvatar:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].VOTING.value)?"/cabinet/claims-list":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].VOTING.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].VOTING.value,"/cabinet/claims-list"),friendStates:[],name:"Мои предложения",exact:!0,hide:!_globalConfig.globalConfig.votingOn||!_authServices.AuthService.getUserInfo()||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessVotingOn)||_globalConfig.globalConfig.votingOn&&!_utilService.UtilService.isKhv(),module:_modules["default"].VOTING,moduleRootState:"/",dropdownAvatar:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].EVALUATION.value)?"/cabinet/vote/list":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].EVALUATION.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].EVALUATION.value,"/cabinet/vote/list"),friendStates:[],name:"Мои голоса",exact:!0,hide:!_globalConfig.globalConfig.evaluationOn||!_authServices.AuthService.getUserInfo()||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessEvaluationOn),module:_modules["default"].EVALUATION,moduleRootState:"/",dropdownAvatar:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].ARTICLE.value)?"/favourites":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].ARTICLE.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].ARTICLE.value,"/favourites"),friendStates:[],name:"Избранные статьи",exact:!0,hide:!_globalConfig.globalConfig.articleOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessArticleOn),module:_modules["default"].ARTICLE,moduleRootState:"/",dropdownAvatar:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].CAMERAS.value)?"/favorite/cameras":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].CAMERAS.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].CAMERAS.value,"/favorite/cameras"),friendStates:[],name:"Избранные камеры",exact:!0,hide:!_globalConfig.globalConfig.camerasOn,module:_modules["default"].CAMERAS,moduleRootState:"/",dropdownAvatar:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].PROFILE.value)?"/information-messages":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].PROFILE.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].PROFILE.value,"/information-messages"),friendStates:[],name:"Информ. сообщения",exact:!0,hide:!_globalConfig.globalConfig.informationalMessagesOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessInformationalMessagesOn),module:_modules["default"].PROFILE,moduleRootState:"/",dropdownAvatar:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].PROFILE.value)?"/my-organizations":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].PROFILE.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].PROFILE.value,"/my-organizations"),friendStates:[],name:"Мои организации",exact:!0,hide:!_authServices.AuthService.getUserInfo()||!_globalConfig.globalConfig.businessModeOn,module:_modules["default"].PROFILE,moduleRootState:"/",dropdownAvatar:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].RECEPTION.value)?"/cabinet":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].RECEPTION.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].RECEPTION.value,"/cabinet"),friendStates:[],name:"Мои заявки",exact:!0,hide:!_globalConfig.globalConfig.receptionOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessReceptionOn),module:_modules["default"].RECEPTION,moduleRootState:"/",dropdownAvatar:!0},{name:"Выход",hide:!_authServices.AuthService.getUserInfo(),dropdownAvatar:!0,isLogout:!0,callback:function(){return _authServices.AuthService.logOut()}},{name:"Войти",isAuth:!0,hide:!!_authServices.AuthService.getUserInfo(),friendStates:[],dropdownAvatar:!0}]}}]),e}();exports.TopNavMainPageService=TopNavMainPageService;
|
|
1
|
+
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _classCallCheck(e,l){if(!(e instanceof l))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,l){for(var a=0;a<l.length;a++){var i=l[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,l,a){return l&&_defineProperties(e.prototype,l),a&&_defineProperties(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.TopNavMainPageService=void 0;var _globalConfig=require("../config/globalConfig"),_appMode=_interopRequireDefault(require("../enums/appMode")),_modules=_interopRequireDefault(require("../enums/modules")),_authServices=require("./authServices"),_businessModeUtilsService=require("./businessModeUtilsService"),_topNavService=require("./topNavService"),_utilService=require("./utilService"),TopNavMainPageService=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"menuItems",get:function(){return[{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].COMPLAINTS.value,"/"),friendStates:[],hide:!_globalConfig.globalConfig.complaintsOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessComplaintsOn)||_utilService.UtilService.isSkh()&&_businessModeUtilsService.BusinessModeUtilsService.isBusinessModeOn(),name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].COMPLAINTS),module:_modules["default"].COMPLAINTS,children:[{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].COMPLAINTS.value,"/"),friendStates:[],name:"О сервисе",module:_modules["default"].COMPLAINTS,exact:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/subject-category":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].COMPLAINTS.value,"/subject-category"),friendStates:[],name:"Каталог проблем",module:_modules["default"].COMPLAINTS,exact:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/messages-list":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].COMPLAINTS.value,"/messages-list"),friendStates:[],name:"Лента проблем",module:_modules["default"].COMPLAINTS,exact:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/before-after":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].COMPLAINTS.value,"/"),friendStates:[],name:"Результат работы",module:_modules["default"].COMPLAINTS,exact:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].MAP.value)?"/?showComplaint":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].MAP.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].MAP.value,"/?showComplaint"),friendStates:[],name:"Проблема на карте",module:_modules["default"].COMPLAINTS,exact:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/new":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].COMPLAINTS.value,"/new"),friendStates:[],name:"Сообщить о проблеме",module:_modules["default"].COMPLAINTS,exact:!0}]},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].EVALUATION.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].EVALUATION.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].EVALUATION.value,"/"),friendStates:[],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].EVALUATION),module:_modules["default"].EVALUATION,hide:!_globalConfig.globalConfig.evaluationOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessEvaluationOn)},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].VOTING.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].VOTING.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].VOTING.value,"/"),friendStates:[],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].VOTING),module:_modules["default"].VOTING,hide:!_globalConfig.globalConfig.votingOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessVotingOn)},{state:null,externalUrl:"https://urban.vmeste.pkgo.ru",name:"Голосование",hide:!_utilService.UtilService.isKam()},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].EVENT.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].EVENT.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].EVENT.value,"/"),friendStates:[],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].EVENT),module:_modules["default"].EVENT,hide:!_globalConfig.globalConfig.eventOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessEventOn)},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].ARTICLE.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].ARTICLE.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].ARTICLE.value,"/"),friendStates:[],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].ARTICLE),module:_modules["default"].ARTICLE,hide:!_globalConfig.globalConfig.articleOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessArticleOn)},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].MAP.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].MAP.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].MAP.value,"/"),friendStates:[],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].MAP),module:_modules["default"].MAP,hide:!_globalConfig.globalConfig.mapOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessMapOn)||_globalConfig.globalConfig.mapOn&&_globalConfig.globalConfig.lifecityOn&&!_globalConfig.globalConfig.registryContractOn},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].ORGANIZATION.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].ORGANIZATION.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].ORGANIZATION.value,"/"),friendStates:[],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].ORGANIZATION),module:_modules["default"].ORGANIZATION,hide:!_globalConfig.globalConfig.organizationOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessOrganizationOn)},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].CAMERAS.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].CAMERAS.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].CAMERAS.value,"/"),friendStates:[],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].CAMERAS),module:_modules["default"].CAMERAS,hide:!_globalConfig.globalConfig.camerasOn},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].POLL.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].POLL.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].POLL.value,"/"),friendStates:[],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].POLL),module:_modules["default"].POLL,hide:!_globalConfig.globalConfig.pollOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessPollOn)},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].INITIATIVE.value)?"/initiatives-list":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].INITIATIVE.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].INITIATIVE.value,"/initiatives-list"),friendStates:["intitative"],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].INITIATIVE),module:_modules["default"].INITIATIVE,hide:!_globalConfig.globalConfig.initiativenOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessInitiativeOn)},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].OPENDATA.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].OPENDATA.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].OPENDATA.value,"/"),friendStates:[],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].OPENDATA),module:_modules["default"].OPENDATA,hide:!_globalConfig.globalConfig.openDataOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessOpenDataOn)},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].RECEPTION.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].RECEPTION.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].RECEPTION.value,"/"),friendStates:[],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].RECEPTION),module:_modules["default"].RECEPTION,hide:!_globalConfig.globalConfig.receptionOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessReceptionOn),children:[{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].RECEPTION.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].RECEPTION.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].RECEPTION.value,"/"),friendStates:[],name:"О сервисе",module:_modules["default"].RECEPTION,exact:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].RECEPTION.value)?"/new":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].RECEPTION.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].RECEPTION.value,"/new"),friendStates:[],name:"Записаться на приём",module:_modules["default"].RECEPTION,exact:!0}]},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].MAIN.value)?"/snow-track":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].MAIN.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].MAIN.value,"/snow-track"),friendStates:[],name:"Уборка снега",module:_modules["default"].MAIN,hide:!_globalConfig.globalConfig.snowTrackOn},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].PROFILE.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].PROFILE.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].PROFILE.value,"/"),friendStates:[],name:_topNavService.TopNavInfinityService.getTitleModule(_modules["default"].PROFILE),module:_modules["default"].PROFILE,hide:!_authServices.AuthService.getUserInfo()||!_globalConfig.globalConfig.profileOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessProfileOn),dropdownAvatar:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/cabinet/with-mode/".concat(_appMode["default"].PUBLIC):null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].COMPLAINTS.value,"/cabinet/with-mode/".concat(_appMode["default"].PUBLIC)),friendStates:[],name:"Мои ".concat(_globalConfig.globalConfig.WS_VOICE_INFINITY_COMPLAINT_NAME_BASE,"ия"),exact:!0,hide:!_globalConfig.globalConfig.complaintsOn||!_authServices.AuthService.getUserInfo(),module:_modules["default"].COMPLAINTS,moduleRootState:"/",dropdownAvatar:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/cabinet/with-mode/".concat(_appMode["default"].BUSINESS):null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].COMPLAINTS.value,"/cabinet/with-mode/".concat(_appMode["default"].BUSINESS)),friendStates:[],name:"".concat(_utilService.UtilService.setFirstWordToUpperCase(_globalConfig.globalConfig.WS_VOICE_INFINITY_COMPLAINT_NAME_BASE),"ия компании"),exact:!0,hide:!_authServices.AuthService.getUserInfo()||!!_utilService.UtilService.isApiri()||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessComplaintsOn),module:_modules["default"].COMPLAINTS,moduleRootState:"/",needHasOrganization:!0,dropdownAvatar:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].LIFECITY.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].LIFECITY.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].LIFECITY.value,"/"),friendStates:[],name:_modules["default"].LIFECITY.name,hide:!_globalConfig.globalConfig.lifecityOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessLifecityOn),module:_modules["default"].LIFECITY,moduleRootState:"/",children:[{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].LIFECITY.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].LIFECITY.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].LIFECITY.value,"/"),friendStates:[],name:"О сервисе",module:_modules["default"].LIFECITY,exact:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].MAP.value)?"/?showContract&entityId=".concat(_globalConfig.globalConfig.WS_VOICE_INFINITY_CONTRACT_CATEGORY_GROUP_ID,"&filtersOff"):null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].MAP.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].MAP.value,"/?showContract&entityId=".concat(_globalConfig.globalConfig.WS_VOICE_INFINITY_CONTRACT_CATEGORY_GROUP_ID,"&filtersOff")),friendStates:[],name:"Народный контроль",module:_modules["default"].LIFECITY,exact:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].LIFECITY.value)?"/npa-list":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].LIFECITY.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].LIFECITY.value,"/npa-list"),friendStates:[],name:"НПА о проекте",module:_modules["default"].LIFECITY,exact:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].LIFECITY.value)?"/history-project":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].LIFECITY.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].LIFECITY.value,"/history-project"),friendStates:[],name:"История проекта",module:_modules["default"].LIFECITY,exact:!0}]},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].DISCUSSIONS.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].DISCUSSIONS.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].DISCUSSIONS.value,"/"),friendStates:[],name:_modules["default"].DISCUSSIONS.name,exact:!0,hide:!_globalConfig.globalConfig.discussionsOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessDiscussionsOn),module:_modules["default"].DISCUSSIONS,moduleRootState:"/"},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].STROIKA.value)?"/":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].STROIKA.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].STROIKA.value,"/"),friendStates:[],name:_modules["default"].STROIKA.name,exact:!0,hide:!_globalConfig.globalConfig.stroikaOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessDiscussionsOn),module:_modules["default"].STROIKA,moduleRootState:"/"},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].MAIN.value)?"/cabinet/initiatives-list":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].MAIN.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].MAIN.value,"/cabinet/initiatives-list"),friendStates:[],name:"Мои инициативы",exact:!0,hide:!_globalConfig.globalConfig.initiativenOn||!_authServices.AuthService.getUserInfo()||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessInitiativeOn),module:_modules["default"].MAIN,moduleRootState:"/",dropdownAvatar:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].VOTING.value)?"/cabinet/claims-list":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].VOTING.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].VOTING.value,"/cabinet/claims-list"),friendStates:[],name:"Мои предложения",exact:!0,hide:!_globalConfig.globalConfig.votingOn||!_authServices.AuthService.getUserInfo()||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessVotingOn)||_globalConfig.globalConfig.votingOn&&!_utilService.UtilService.isKhv()&&!_utilService.UtilService.isR41(),module:_modules["default"].VOTING,moduleRootState:"/",dropdownAvatar:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].EVALUATION.value)?"/cabinet/vote/list":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].EVALUATION.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].EVALUATION.value,"/cabinet/vote/list"),friendStates:[],name:"Мои голоса",exact:!0,hide:!_globalConfig.globalConfig.evaluationOn||!_authServices.AuthService.getUserInfo()||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessEvaluationOn),module:_modules["default"].EVALUATION,moduleRootState:"/",dropdownAvatar:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].ARTICLE.value)?"/favourites":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].ARTICLE.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].ARTICLE.value,"/favourites"),friendStates:[],name:"Избранные статьи",exact:!0,hide:!_globalConfig.globalConfig.articleOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessArticleOn),module:_modules["default"].ARTICLE,moduleRootState:"/",dropdownAvatar:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].CAMERAS.value)?"/favorite/cameras":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].CAMERAS.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].CAMERAS.value,"/favorite/cameras"),friendStates:[],name:"Избранные камеры",exact:!0,hide:!_globalConfig.globalConfig.camerasOn,module:_modules["default"].CAMERAS,moduleRootState:"/",dropdownAvatar:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].PROFILE.value)?"/information-messages":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].PROFILE.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].PROFILE.value,"/information-messages"),friendStates:[],name:"Информ. сообщения",exact:!0,hide:!_globalConfig.globalConfig.informationalMessagesOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessInformationalMessagesOn),module:_modules["default"].PROFILE,moduleRootState:"/",dropdownAvatar:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].PROFILE.value)?"/my-organizations":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].PROFILE.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].PROFILE.value,"/my-organizations"),friendStates:[],name:"Мои организации",exact:!0,hide:!_authServices.AuthService.getUserInfo()||!_globalConfig.globalConfig.businessModeOn,module:_modules["default"].PROFILE,moduleRootState:"/",dropdownAvatar:!0},{state:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].RECEPTION.value)?"/cabinet":null,externalUrl:_topNavService.TopNavInfinityService.isLocalRoute(_modules["default"].RECEPTION.value)?null:_topNavService.TopNavInfinityService.getExternalUrl(_modules["default"].RECEPTION.value,"/cabinet"),friendStates:[],name:"Мои заявки",exact:!0,hide:!_globalConfig.globalConfig.receptionOn||_topNavService.TopNavInfinityService.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessReceptionOn),module:_modules["default"].RECEPTION,moduleRootState:"/",dropdownAvatar:!0},{name:"Выход",hide:!_authServices.AuthService.getUserInfo(),dropdownAvatar:!0,isLogout:!0,callback:function(){return _authServices.AuthService.logOut()}},{name:"Войти",isAuth:!0,hide:!!_authServices.AuthService.getUserInfo(),friendStates:[],dropdownAvatar:!0}]}}]),e}();exports.TopNavMainPageService=TopNavMainPageService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _classCallCheck(e,l){if(!(e instanceof l))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,l){for(var a=0;a<l.length;a++){var t=l[a];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}function _createClass(e,l,a){return l&&_defineProperties(e.prototype,l),a&&_defineProperties(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.TopNavInfinityService=void 0;var _globalConfig=require("../config/globalConfig"),_modules=_interopRequireDefault(require("../enums/modules")),_notificationsCount=_interopRequireDefault(require("../enums/notificationsCount")),_authServices=require("./authServices"),_businessModeUtilsService=require("./businessModeUtilsService"),_utilService=require("./utilService"),_appMode=_interopRequireDefault(require("../enums/appMode")),TopNavInfinityService=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"isLocalRoute",value:function(e){return!!_modules["default"][_globalConfig.globalConfig.currentModule]&&_globalConfig.globalConfig.currentModule===_modules["default"][e].value||!!_modules["default"][_globalConfig.globalConfig.currentModule]&&!!_modules["default"][_globalConfig.globalConfig.currentModule].isMain&&_modules["default"][e].isMain}},{key:"getExternalUrl",value:function(e){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(_modules["default"][e].isMain)return"".concat(_globalConfig.globalConfig.mainModuleDomain,"/#").concat(l);if(e===_modules["default"].RECEPTION.value&&_utilService.UtilService.isR41())return _globalConfig.globalConfig.receptionExternalUrl;var a=_globalConfig.globalConfig.mainModuleDomain;if(!a)return"";var t=a.split("://");return"".concat(t[0],"://").concat(_modules["default"][e].value.toLowerCase(),".").concat(t[1]).concat(l?"/#".concat(l):"")}},{key:"isSelectState",value:function(l,a){return l.module&&!l.module.isMain&&l.module.value===_globalConfig.globalConfig.currentModule?!l.exact||l.state===a:e.isSelectRootState(l,a)||e.isSelectFriendState(l,a)}},{key:"isSelectFriendState",value:function(e,l){var a=!1;return!!e.friendStates&&(e.friendStates.forEach(function(e){l.indexOf(e)>-1&&l.indexOf(e)<=1&&(a=!0)}),a)}},{key:"isSelectRootState",value:function(e,l){var a=e&&l.indexOf(e.state)>-1&&l.indexOf(e.state)<=1;return a}},{key:"getTitleModule",value:function(e){var l=e.title[_globalConfig.globalConfig.templateFolder];return l?l:e.title["default"]}},{key:"menuItems",get:function(){return[{state:e.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:e.getExternalUrl(_modules["default"].COMPLAINTS.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].COMPLAINTS),hide:!_globalConfig.globalConfig.complaintsOn||_utilService.UtilService.isApiri()||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessComplaintsOn)||_utilService.UtilService.isSkh()&&_businessModeUtilsService.BusinessModeUtilsService.isBusinessModeOn(),module:_modules["default"].COMPLAINTS,icon:"assets/images/svg/menu/ic_publicComplaints.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/new":null,externalUrl:e.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:e.getExternalUrl(_modules["default"].COMPLAINTS.value,"/new"),friendStates:[],name:"Подать ".concat(_globalConfig.globalConfig.WS_VOICE_INFINITY_COMPLAINT_NAME_BASE,"ие"),exact:!0,hide:!_globalConfig.globalConfig.complaintsOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessComplaintsOn),module:_modules["default"].COMPLAINTS,moduleRootState:"/",icon:"assets/images/svg/menu/ic_CreateComplaints_54px.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].INITIATIVE.value)?"/initiatives-list":null,externalUrl:e.isLocalRoute(_modules["default"].INITIATIVE.value)?null:e.getExternalUrl(_modules["default"].INITIATIVE.value,"/initiatives-list"),friendStates:["intitative"],name:e.getTitleModule(_modules["default"].INITIATIVE),hide:!_globalConfig.globalConfig.initiativenOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessInitiativeOn),module:_modules["default"].INITIATIVE,icon:"assets/images/svg/menu/ic_IniciativesPublic_54px.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].INITIATIVE.value)?"/initiative-create":null,externalUrl:e.isLocalRoute(_modules["default"].INITIATIVE.value)?null:e.getExternalUrl(_modules["default"].INITIATIVE.value,"/initiative-create"),friendStates:[],name:"Предложить инициативу",exact:!0,hide:!_globalConfig.globalConfig.initiativenOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessInitiativeOn),module:_modules["default"].INITIATIVE,moduleRootState:"/",icon:"assets/images/svg/menu/ic_CreateIniciatives_54px.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].INITIATIVE.value)?"/initiatives-reviewers":null,externalUrl:e.isLocalRoute(_modules["default"].INITIATIVE.value)?null:e.getExternalUrl(_modules["default"].INITIATIVE.value,"/initiative-create"),friendStates:[],name:"Наши эксперты",exact:!0,hide:(!_globalConfig.globalConfig.initiativenOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessInitiativeOn))&&!_utilService.UtilService.isKam(),module:_modules["default"].INITIATIVE,moduleRootState:"/",icon:"assets/images/svg/menu/ic_IniciativesReviewers.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].MAP.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].MAP.value)?null:e.getExternalUrl(_modules["default"].MAP.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].MAP),hide:!_globalConfig.globalConfig.mapOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessMapOn)||_globalConfig.globalConfig.mapOn&&_globalConfig.globalConfig.lifecityOn&&!_globalConfig.globalConfig.registryContractOn,module:_modules["default"].MAP,icon:"assets/images/svg/menu/ic_SocialMap_54px.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].EVALUATION.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].EVALUATION.value)?null:e.getExternalUrl(_modules["default"].EVALUATION.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].EVALUATION),hide:!_globalConfig.globalConfig.evaluationOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessEvaluationOn),module:_modules["default"].EVALUATION,icon:"assets/images/svg/menu/ic_evaluation_54.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].VOTING.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].VOTING.value)?null:e.getExternalUrl(_modules["default"].VOTING.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].VOTING),hide:!_globalConfig.globalConfig.votingOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessVotingOn),module:_modules["default"].VOTING,icon:"assets/images/svg/menu/ic_voting_54.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].EVENT.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].EVENT.value)?null:e.getExternalUrl(_modules["default"].EVENT.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].EVENT),hide:!_globalConfig.globalConfig.eventOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessEventOn),module:_modules["default"].EVENT,icon:"assets/images/svg/menu/ic_events_54px.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].POLL.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].POLL.value)?null:e.getExternalUrl(_modules["default"].POLL.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].POLL),hide:!_globalConfig.globalConfig.pollOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessPollOn),module:_modules["default"].POLL,icon:"assets/images/svg/menu/ic_polls.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].ARTICLE.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].ARTICLE.value)?null:e.getExternalUrl(_modules["default"].ARTICLE.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].ARTICLE),hide:!_globalConfig.globalConfig.articleOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessArticleOn),module:_modules["default"].ARTICLE,icon:"assets/images/svg/menu/ic_Articles_54px.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].ORGANIZATION.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].ORGANIZATION.value)?null:e.getExternalUrl(_modules["default"].ORGANIZATION.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].ORGANIZATION),hide:!_globalConfig.globalConfig.organizationOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessOrganizationOn),module:_modules["default"].ORGANIZATION,icon:"assets/images/svg/menu/ic_Organization_54px.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].OPENDATA.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].OPENDATA.value)?null:e.getExternalUrl(_modules["default"].OPENDATA.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].OPENDATA),hide:!_globalConfig.globalConfig.openDataOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessOpenDataOn),module:_modules["default"].OPENDATA,icon:"assets/images/svg/menu/ic_voting_54.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].RECEPTION.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].RECEPTION.value)?null:e.getExternalUrl(_modules["default"].RECEPTION.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].RECEPTION),hide:!_globalConfig.globalConfig.receptionOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessReceptionOn),module:_modules["default"].RECEPTION,icon:"assets/images/svg/menu/ic_online_reception.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].STROIKA.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].STROIKA.value)?null:e.getExternalUrl(_modules["default"].STROIKA.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].STROIKA),hide:!_globalConfig.globalConfig.stroikaOn,module:_modules["default"].STROIKA,icon:"assets/images/svg/menu/map-construction.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].MAIN.value)?"/snow-track":null,externalUrl:e.isLocalRoute(_modules["default"].MAIN.value)?null:e.getExternalUrl(_modules["default"].MAIN.value,"/snow-track"),name:"Уборка снега",exact:!0,friendStates:["snow-"],hide:!_globalConfig.globalConfig.snowTrackOn,module:_modules["default"].MAIN,icon:"assets/images/svg/menu/SnowMap.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].MAIN.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].MAIN.value)?null:e.getExternalUrl(_modules["default"].MAIN.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].MAIN),module:_modules["default"].MAIN,icon:"assets/images/svg/menu/ic_Main_54px.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].PROFILE.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].PROFILE.value)?null:e.getExternalUrl(_modules["default"].PROFILE.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].PROFILE),hide:!_globalConfig.globalConfig.profileOn||!_authServices.AuthService.getUserInfo()||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessProfileOn),module:_modules["default"].PROFILE,icon:"assets/images/svg/menu/user.svg",isInfinityProfileMenu:!0},{state:e.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/cabinet/with-mode/".concat(_appMode["default"].PUBLIC):null,externalUrl:e.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:e.getExternalUrl(_modules["default"].COMPLAINTS.value,"/cabinet/with-mode/".concat(_appMode["default"].PUBLIC)),friendStates:[],name:"Мои ".concat(_globalConfig.globalConfig.WS_VOICE_INFINITY_COMPLAINT_NAME_BASE,"ия"),exact:!0,hide:!_globalConfig.globalConfig.complaintsOn,module:_modules["default"].COMPLAINTS,moduleRootState:"/",dropdownAvatar:!0,icon:"assets/images/svg/menu/ic_MyComplaints_54.svg",isInfinityProfileMenu:!0,notificationsCountType:_notificationsCount["default"].COMPLAINTS},{state:e.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/cabinet/with-mode/".concat(_appMode["default"].BUSINESS):null,externalUrl:e.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:e.getExternalUrl(_modules["default"].COMPLAINTS.value,"/cabinet/with-mode/".concat(_appMode["default"].BUSINESS)),friendStates:[],name:"".concat(_utilService.UtilService.setFirstWordToUpperCase(_globalConfig.globalConfig.WS_VOICE_INFINITY_COMPLAINT_NAME_BASE),"ия компании"),exact:!0,hide:e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessComplaintsOn)||!!_utilService.UtilService.isApiri(),module:_modules["default"].COMPLAINTS,moduleRootState:"/",needHasOrganization:!0,dropdownAvatar:!0,icon:"assets/images/svg/menu/ic_MyOrgComplaints_54.svg",isInfinityProfileMenu:!0,notificationsCountType:_notificationsCount["default"].BUSINESS_COMPLAINTS},{state:e.isLocalRoute(_modules["default"].MAIN.value)?"/cabinet/initiatives-list":null,externalUrl:e.isLocalRoute(_modules["default"].MAIN.value)?null:e.getExternalUrl(_modules["default"].MAIN.value,"/cabinet/initiatives-list"),friendStates:[],name:"Мои инициативы",exact:!0,hide:!_globalConfig.globalConfig.initiativenOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessInitiativeOn),module:_modules["default"].MAIN,moduleRootState:"/",dropdownAvatar:!0,icon:"assets/images/svg/menu/ic_MyComplaints_54.svg",isInfinityProfileMenu:!0},{state:e.isLocalRoute(_modules["default"].EVALUATION.value)?"/cabinet/vote/list":null,externalUrl:e.isLocalRoute(_modules["default"].EVALUATION.value)?null:e.getExternalUrl(_modules["default"].EVALUATION.value,"/cabinet/vote/list"),friendStates:[],name:"Мои голоса",exact:!0,hide:!_globalConfig.globalConfig.evaluationOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessEvaluationOn),module:_modules["default"].EVALUATION,moduleRootState:"/",dropdownAvatar:!0,icon:"assets/images/svg/menu/ic_my_evaluation_54.svg",isInfinityProfileMenu:!0},{state:e.isLocalRoute(_modules["default"].VOTING.value)?"/cabinet/claims-list":null,externalUrl:e.isLocalRoute(_modules["default"].VOTING.value)?null:e.getExternalUrl(_modules["default"].VOTING.value,"/cabinet/claims-list"),friendStates:[],name:"Мои предложения",exact:!0,hide:!_globalConfig.globalConfig.votingOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessVotingOn)||_globalConfig.globalConfig.votingOn&&!_utilService.UtilService.isKhv(),module:_modules["default"].VOTING,moduleRootState:"/",dropdownAvatar:!0,icon:"assets/images/svg/menu/ic_MyComplaints_54.svg",isInfinityProfileMenu:!0},{state:e.isLocalRoute(_modules["default"].RECEPTION.value)?"/cabinet":null,externalUrl:e.isLocalRoute(_modules["default"].RECEPTION.value)?null:e.getExternalUrl(_modules["default"].RECEPTION.value,"/cabinet"),friendStates:[],name:"Мои заявки",exact:!0,hide:!_globalConfig.globalConfig.receptionOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessReceptionOn),module:_modules["default"].RECEPTION,moduleRootState:"/",dropdownAvatar:!0,icon:"assets/images/svg/menu/ic_online_reception_private.svg",isInfinityProfileMenu:!0,notificationsCountType:_notificationsCount["default"].MEETING_EVENTS},{state:e.isLocalRoute(_modules["default"].ARTICLE.value)?"/favourites":null,externalUrl:e.isLocalRoute(_modules["default"].ARTICLE.value)?null:e.getExternalUrl(_modules["default"].ARTICLE.value,"/favourites"),friendStates:[],name:"Избранные статьи",exact:!0,hide:!_globalConfig.globalConfig.articleOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessArticleOn),module:_modules["default"].ARTICLE,moduleRootState:"/",dropdownAvatar:!0,icon:"assets/images/svg/menu/ic_ArticlesPrivate_54px.svg",isInfinityProfileMenu:!0},{state:e.isLocalRoute(_modules["default"].CAMERAS.value)?"/favorite/cameras":null,externalUrl:e.isLocalRoute(_modules["default"].CAMERAS.value)?null:e.getExternalUrl(_modules["default"].CAMERAS.value,"/favorite/cameras"),friendStates:[],name:"Избранные камеры",exact:!0,hide:!_globalConfig.globalConfig.camerasOn,module:_modules["default"].CAMERAS,moduleRootState:"/",dropdownAvatar:!0,icon:"assets/images/svg/menu/ic_ArticlesPrivate_54px.svg",isInfinityProfileMenu:!0},{state:e.isLocalRoute(_modules["default"].PROFILE.value)?"/information-messages":null,externalUrl:e.isLocalRoute(_modules["default"].PROFILE.value)?null:e.getExternalUrl(_modules["default"].PROFILE.value,"/information-messages"),friendStates:[],name:"Информ. сообщения",exact:!0,hide:!_globalConfig.globalConfig.informationalMessagesOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessInformationalMessagesOn),module:_modules["default"].PROFILE,moduleRootState:"/",dropdownAvatar:!0,icon:"assets/images/svg/menu/ic_InformationalMessages_54px.svg",isInfinityProfileMenu:!0,notificationsCountType:_notificationsCount["default"].INFORMATION_MESSAGES},{state:e.isLocalRoute(_modules["default"].PROFILE.value)?"/my-organizations":null,externalUrl:e.isLocalRoute(_modules["default"].PROFILE.value)?null:e.getExternalUrl(_modules["default"].PROFILE.value,"/my-organizations"),friendStates:[],name:"Мои организации",exact:!0,hide:!_authServices.AuthService.getUserInfo()||!_globalConfig.globalConfig.businessModeOn,module:_modules["default"].PROFILE,moduleRootState:"/",dropdownAvatar:!0,icon:"assets/images/svg/menu/ic_MyOrganizations_54px.svg",isInfinityProfileMenu:!0},{state:e.isLocalRoute(_modules["default"].LIFECITY.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].LIFECITY.value)?null:e.getExternalUrl(_modules["default"].LIFECITY.value,"/"),friendStates:[],name:_modules["default"].LIFECITY.name,exact:!0,hide:!_globalConfig.globalConfig.lifecityOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessLifecityOn),module:_modules["default"].LIFECITY,moduleRootState:"/"},{state:e.isLocalRoute(_modules["default"].DISCUSSIONS.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].DISCUSSIONS.value)?null:e.getExternalUrl(_modules["default"].DISCUSSIONS.value,"/"),friendStates:[],name:_modules["default"].DISCUSSIONS.name,exact:!0,hide:!_globalConfig.globalConfig.discussionsOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessDiscussionsOn),module:_modules["default"].DISCUSSIONS,moduleRootState:"/"},{state:e.isLocalRoute(_modules["default"].CAMERAS.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].CAMERAS.value)?null:e.getExternalUrl(_modules["default"].CAMERAS.value,"/"),name:e.getTitleModule(_modules["default"].CAMERAS),exact:!0,friendStates:[],hide:!_globalConfig.globalConfig.camerasOn,module:_modules["default"].CAMERAS,icon:"assets/images/svg/menu/city-cameras.svg",isInfinityMainMenu:!0,moduleRootState:"/"},{state:null,externalUrl:null,friendStates:[],name:"Выйти из аккаунта",hide:!_authServices.AuthService.getUserInfo(),isLogout:!0,dropdownAvatar:!0,icon:"assets/images/svg/menu/default.svg",callback:function(){return _authServices.AuthService.logOut()},isInfinityProfileMenu:!0},{state:null,externalUrl:null,friendStates:[],name:"Войти",isAuth:!0,icon:"assets/images/svg/menu/default.svg",hide:!!_authServices.AuthService.getUserInfo()}]}},{key:"menuItemBusinessModeHide",value:function(e){return!!_businessModeUtilsService.BusinessModeUtilsService.isBusinessModeOn()&&!!e}}]),e}();exports.TopNavInfinityService=TopNavInfinityService,TopNavInfinityService.MAIN_HASH="#/main",TopNavInfinityService.NOTIFICATIONS_COUNT_INTERVAL=null;
|
|
1
|
+
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _classCallCheck(e,l){if(!(e instanceof l))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,l){for(var a=0;a<l.length;a++){var t=l[a];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}function _createClass(e,l,a){return l&&_defineProperties(e.prototype,l),a&&_defineProperties(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.TopNavInfinityService=void 0;var _globalConfig=require("../config/globalConfig"),_modules=_interopRequireDefault(require("../enums/modules")),_notificationsCount=_interopRequireDefault(require("../enums/notificationsCount")),_authServices=require("./authServices"),_businessModeUtilsService=require("./businessModeUtilsService"),_utilService=require("./utilService"),_appMode=_interopRequireDefault(require("../enums/appMode")),TopNavInfinityService=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"isLocalRoute",value:function(e){return!!_modules["default"][_globalConfig.globalConfig.currentModule]&&_globalConfig.globalConfig.currentModule===_modules["default"][e].value||!!_modules["default"][_globalConfig.globalConfig.currentModule]&&!!_modules["default"][_globalConfig.globalConfig.currentModule].isMain&&_modules["default"][e].isMain}},{key:"getExternalUrl",value:function(e){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(_modules["default"][e].isMain)return"".concat(_globalConfig.globalConfig.mainModuleDomain,"/#").concat(l);if(e===_modules["default"].RECEPTION.value&&_utilService.UtilService.isR41())return _globalConfig.globalConfig.receptionExternalUrl;var a=_globalConfig.globalConfig.mainModuleDomain;if(!a)return"";var t=a.split("://");return"".concat(t[0],"://").concat(_modules["default"][e].value.toLowerCase(),".").concat(t[1]).concat(l?"/#".concat(l):"")}},{key:"isSelectState",value:function(l,a){return l.module&&!l.module.isMain&&l.module.value===_globalConfig.globalConfig.currentModule?!l.exact||l.state===a:e.isSelectRootState(l,a)||e.isSelectFriendState(l,a)}},{key:"isSelectFriendState",value:function(e,l){var a=!1;return!!e.friendStates&&(e.friendStates.forEach(function(e){l.indexOf(e)>-1&&l.indexOf(e)<=1&&(a=!0)}),a)}},{key:"isSelectRootState",value:function(e,l){var a=e&&l.indexOf(e.state)>-1&&l.indexOf(e.state)<=1;return a}},{key:"getTitleModule",value:function(e){var l=e.title[_globalConfig.globalConfig.templateFolder];return l?l:e.title["default"]}},{key:"menuItems",get:function(){return[{state:e.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:e.getExternalUrl(_modules["default"].COMPLAINTS.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].COMPLAINTS),hide:!_globalConfig.globalConfig.complaintsOn||_utilService.UtilService.isApiri()||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessComplaintsOn)||_utilService.UtilService.isSkh()&&_businessModeUtilsService.BusinessModeUtilsService.isBusinessModeOn(),module:_modules["default"].COMPLAINTS,icon:"assets/images/svg/menu/ic_publicComplaints.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/new":null,externalUrl:e.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:e.getExternalUrl(_modules["default"].COMPLAINTS.value,"/new"),friendStates:[],name:"Подать ".concat(_globalConfig.globalConfig.WS_VOICE_INFINITY_COMPLAINT_NAME_BASE,"ие"),exact:!0,hide:!_globalConfig.globalConfig.complaintsOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessComplaintsOn),module:_modules["default"].COMPLAINTS,moduleRootState:"/",icon:"assets/images/svg/menu/ic_CreateComplaints_54px.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].INITIATIVE.value)?"/initiatives-list":null,externalUrl:e.isLocalRoute(_modules["default"].INITIATIVE.value)?null:e.getExternalUrl(_modules["default"].INITIATIVE.value,"/initiatives-list"),friendStates:["intitative"],name:e.getTitleModule(_modules["default"].INITIATIVE),hide:!_globalConfig.globalConfig.initiativenOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessInitiativeOn),module:_modules["default"].INITIATIVE,icon:"assets/images/svg/menu/ic_IniciativesPublic_54px.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].INITIATIVE.value)?"/initiative-create":null,externalUrl:e.isLocalRoute(_modules["default"].INITIATIVE.value)?null:e.getExternalUrl(_modules["default"].INITIATIVE.value,"/initiative-create"),friendStates:[],name:"Предложить инициативу",exact:!0,hide:!_globalConfig.globalConfig.initiativenOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessInitiativeOn),module:_modules["default"].INITIATIVE,moduleRootState:"/",icon:"assets/images/svg/menu/ic_CreateIniciatives_54px.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].INITIATIVE.value)?"/initiatives-reviewers":null,externalUrl:e.isLocalRoute(_modules["default"].INITIATIVE.value)?null:e.getExternalUrl(_modules["default"].INITIATIVE.value,"/initiative-create"),friendStates:[],name:"Наши эксперты",exact:!0,hide:(!_globalConfig.globalConfig.initiativenOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessInitiativeOn))&&!_utilService.UtilService.isKam(),module:_modules["default"].INITIATIVE,moduleRootState:"/",icon:"assets/images/svg/menu/ic_IniciativesReviewers.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].MAP.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].MAP.value)?null:e.getExternalUrl(_modules["default"].MAP.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].MAP),hide:!_globalConfig.globalConfig.mapOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessMapOn)||_globalConfig.globalConfig.mapOn&&_globalConfig.globalConfig.lifecityOn&&!_globalConfig.globalConfig.registryContractOn,module:_modules["default"].MAP,icon:"assets/images/svg/menu/ic_SocialMap_54px.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].EVALUATION.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].EVALUATION.value)?null:e.getExternalUrl(_modules["default"].EVALUATION.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].EVALUATION),hide:!_globalConfig.globalConfig.evaluationOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessEvaluationOn),module:_modules["default"].EVALUATION,icon:"assets/images/svg/menu/ic_evaluation_54.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].VOTING.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].VOTING.value)?null:e.getExternalUrl(_modules["default"].VOTING.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].VOTING),hide:!_globalConfig.globalConfig.votingOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessVotingOn),module:_modules["default"].VOTING,icon:"assets/images/svg/menu/ic_voting_54.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].EVENT.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].EVENT.value)?null:e.getExternalUrl(_modules["default"].EVENT.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].EVENT),hide:!_globalConfig.globalConfig.eventOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessEventOn),module:_modules["default"].EVENT,icon:"assets/images/svg/menu/ic_events_54px.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].POLL.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].POLL.value)?null:e.getExternalUrl(_modules["default"].POLL.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].POLL),hide:!_globalConfig.globalConfig.pollOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessPollOn),module:_modules["default"].POLL,icon:"assets/images/svg/menu/ic_polls.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].ARTICLE.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].ARTICLE.value)?null:e.getExternalUrl(_modules["default"].ARTICLE.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].ARTICLE),hide:!_globalConfig.globalConfig.articleOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessArticleOn),module:_modules["default"].ARTICLE,icon:"assets/images/svg/menu/ic_Articles_54px.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].ORGANIZATION.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].ORGANIZATION.value)?null:e.getExternalUrl(_modules["default"].ORGANIZATION.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].ORGANIZATION),hide:!_globalConfig.globalConfig.organizationOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessOrganizationOn),module:_modules["default"].ORGANIZATION,icon:"assets/images/svg/menu/ic_Organization_54px.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].OPENDATA.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].OPENDATA.value)?null:e.getExternalUrl(_modules["default"].OPENDATA.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].OPENDATA),hide:!_globalConfig.globalConfig.openDataOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessOpenDataOn),module:_modules["default"].OPENDATA,icon:"assets/images/svg/menu/ic_voting_54.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].RECEPTION.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].RECEPTION.value)?null:e.getExternalUrl(_modules["default"].RECEPTION.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].RECEPTION),hide:!_globalConfig.globalConfig.receptionOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessReceptionOn),module:_modules["default"].RECEPTION,icon:"assets/images/svg/menu/ic_online_reception.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].STROIKA.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].STROIKA.value)?null:e.getExternalUrl(_modules["default"].STROIKA.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].STROIKA),hide:!_globalConfig.globalConfig.stroikaOn,module:_modules["default"].STROIKA,icon:"assets/images/svg/menu/map-construction.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].MAIN.value)?"/snow-track":null,externalUrl:e.isLocalRoute(_modules["default"].MAIN.value)?null:e.getExternalUrl(_modules["default"].MAIN.value,"/snow-track"),name:"Уборка снега",exact:!0,friendStates:["snow-"],hide:!_globalConfig.globalConfig.snowTrackOn,module:_modules["default"].MAIN,icon:"assets/images/svg/menu/SnowMap.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].MAIN.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].MAIN.value)?null:e.getExternalUrl(_modules["default"].MAIN.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].MAIN),module:_modules["default"].MAIN,icon:"assets/images/svg/menu/ic_Main_54px.svg",isInfinityMainMenu:!0},{state:e.isLocalRoute(_modules["default"].PROFILE.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].PROFILE.value)?null:e.getExternalUrl(_modules["default"].PROFILE.value,"/"),friendStates:[],name:e.getTitleModule(_modules["default"].PROFILE),hide:!_globalConfig.globalConfig.profileOn||!_authServices.AuthService.getUserInfo()||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessProfileOn),module:_modules["default"].PROFILE,icon:"assets/images/svg/menu/user.svg",isInfinityProfileMenu:!0},{state:e.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/cabinet/with-mode/".concat(_appMode["default"].PUBLIC):null,externalUrl:e.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:e.getExternalUrl(_modules["default"].COMPLAINTS.value,"/cabinet/with-mode/".concat(_appMode["default"].PUBLIC)),friendStates:[],name:"Мои ".concat(_globalConfig.globalConfig.WS_VOICE_INFINITY_COMPLAINT_NAME_BASE,"ия"),exact:!0,hide:!_globalConfig.globalConfig.complaintsOn,module:_modules["default"].COMPLAINTS,moduleRootState:"/",dropdownAvatar:!0,icon:"assets/images/svg/menu/ic_MyComplaints_54.svg",isInfinityProfileMenu:!0,notificationsCountType:_notificationsCount["default"].COMPLAINTS},{state:e.isLocalRoute(_modules["default"].COMPLAINTS.value)?"/cabinet/with-mode/".concat(_appMode["default"].BUSINESS):null,externalUrl:e.isLocalRoute(_modules["default"].COMPLAINTS.value)?null:e.getExternalUrl(_modules["default"].COMPLAINTS.value,"/cabinet/with-mode/".concat(_appMode["default"].BUSINESS)),friendStates:[],name:"".concat(_utilService.UtilService.setFirstWordToUpperCase(_globalConfig.globalConfig.WS_VOICE_INFINITY_COMPLAINT_NAME_BASE),"ия компании"),exact:!0,hide:e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessComplaintsOn)||!!_utilService.UtilService.isApiri(),module:_modules["default"].COMPLAINTS,moduleRootState:"/",needHasOrganization:!0,dropdownAvatar:!0,icon:"assets/images/svg/menu/ic_MyOrgComplaints_54.svg",isInfinityProfileMenu:!0,notificationsCountType:_notificationsCount["default"].BUSINESS_COMPLAINTS},{state:e.isLocalRoute(_modules["default"].MAIN.value)?"/cabinet/initiatives-list":null,externalUrl:e.isLocalRoute(_modules["default"].MAIN.value)?null:e.getExternalUrl(_modules["default"].MAIN.value,"/cabinet/initiatives-list"),friendStates:[],name:"Мои инициативы",exact:!0,hide:!_globalConfig.globalConfig.initiativenOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessInitiativeOn),module:_modules["default"].MAIN,moduleRootState:"/",dropdownAvatar:!0,icon:"assets/images/svg/menu/ic_MyComplaints_54.svg",isInfinityProfileMenu:!0},{state:e.isLocalRoute(_modules["default"].EVALUATION.value)?"/cabinet/vote/list":null,externalUrl:e.isLocalRoute(_modules["default"].EVALUATION.value)?null:e.getExternalUrl(_modules["default"].EVALUATION.value,"/cabinet/vote/list"),friendStates:[],name:"Мои голоса",exact:!0,hide:!_globalConfig.globalConfig.evaluationOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessEvaluationOn),module:_modules["default"].EVALUATION,moduleRootState:"/",dropdownAvatar:!0,icon:"assets/images/svg/menu/ic_my_evaluation_54.svg",isInfinityProfileMenu:!0},{state:e.isLocalRoute(_modules["default"].VOTING.value)?"/cabinet/claims-list":null,externalUrl:e.isLocalRoute(_modules["default"].VOTING.value)?null:e.getExternalUrl(_modules["default"].VOTING.value,"/cabinet/claims-list"),friendStates:[],name:"Мои предложения",exact:!0,hide:!_globalConfig.globalConfig.votingOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessVotingOn)||_globalConfig.globalConfig.votingOn&&!_utilService.UtilService.isKhv()&&!_utilService.UtilService.isR41(),module:_modules["default"].VOTING,moduleRootState:"/",dropdownAvatar:!0,icon:"assets/images/svg/menu/ic_MyComplaints_54.svg",isInfinityProfileMenu:!0},{state:e.isLocalRoute(_modules["default"].RECEPTION.value)?"/cabinet":null,externalUrl:e.isLocalRoute(_modules["default"].RECEPTION.value)?null:e.getExternalUrl(_modules["default"].RECEPTION.value,"/cabinet"),friendStates:[],name:"Мои заявки",exact:!0,hide:!_globalConfig.globalConfig.receptionOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessReceptionOn),module:_modules["default"].RECEPTION,moduleRootState:"/",dropdownAvatar:!0,icon:"assets/images/svg/menu/ic_online_reception_private.svg",isInfinityProfileMenu:!0,notificationsCountType:_notificationsCount["default"].MEETING_EVENTS},{state:e.isLocalRoute(_modules["default"].ARTICLE.value)?"/favourites":null,externalUrl:e.isLocalRoute(_modules["default"].ARTICLE.value)?null:e.getExternalUrl(_modules["default"].ARTICLE.value,"/favourites"),friendStates:[],name:"Избранные статьи",exact:!0,hide:!_globalConfig.globalConfig.articleOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessArticleOn),module:_modules["default"].ARTICLE,moduleRootState:"/",dropdownAvatar:!0,icon:"assets/images/svg/menu/ic_ArticlesPrivate_54px.svg",isInfinityProfileMenu:!0},{state:e.isLocalRoute(_modules["default"].CAMERAS.value)?"/favorite/cameras":null,externalUrl:e.isLocalRoute(_modules["default"].CAMERAS.value)?null:e.getExternalUrl(_modules["default"].CAMERAS.value,"/favorite/cameras"),friendStates:[],name:"Избранные камеры",exact:!0,hide:!_globalConfig.globalConfig.camerasOn,module:_modules["default"].CAMERAS,moduleRootState:"/",dropdownAvatar:!0,icon:"assets/images/svg/menu/ic_ArticlesPrivate_54px.svg",isInfinityProfileMenu:!0},{state:e.isLocalRoute(_modules["default"].PROFILE.value)?"/information-messages":null,externalUrl:e.isLocalRoute(_modules["default"].PROFILE.value)?null:e.getExternalUrl(_modules["default"].PROFILE.value,"/information-messages"),friendStates:[],name:"Информ. сообщения",exact:!0,hide:!_globalConfig.globalConfig.informationalMessagesOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessInformationalMessagesOn),module:_modules["default"].PROFILE,moduleRootState:"/",dropdownAvatar:!0,icon:"assets/images/svg/menu/ic_InformationalMessages_54px.svg",isInfinityProfileMenu:!0,notificationsCountType:_notificationsCount["default"].INFORMATION_MESSAGES},{state:e.isLocalRoute(_modules["default"].PROFILE.value)?"/my-organizations":null,externalUrl:e.isLocalRoute(_modules["default"].PROFILE.value)?null:e.getExternalUrl(_modules["default"].PROFILE.value,"/my-organizations"),friendStates:[],name:"Мои организации",exact:!0,hide:!_authServices.AuthService.getUserInfo()||!_globalConfig.globalConfig.businessModeOn,module:_modules["default"].PROFILE,moduleRootState:"/",dropdownAvatar:!0,icon:"assets/images/svg/menu/ic_MyOrganizations_54px.svg",isInfinityProfileMenu:!0},{state:e.isLocalRoute(_modules["default"].LIFECITY.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].LIFECITY.value)?null:e.getExternalUrl(_modules["default"].LIFECITY.value,"/"),friendStates:[],name:_modules["default"].LIFECITY.name,exact:!0,hide:!_globalConfig.globalConfig.lifecityOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessLifecityOn),module:_modules["default"].LIFECITY,moduleRootState:"/"},{state:e.isLocalRoute(_modules["default"].DISCUSSIONS.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].DISCUSSIONS.value)?null:e.getExternalUrl(_modules["default"].DISCUSSIONS.value,"/"),friendStates:[],name:_modules["default"].DISCUSSIONS.name,exact:!0,hide:!_globalConfig.globalConfig.discussionsOn||e.menuItemBusinessModeHide(!_globalConfig.globalConfig.businessDiscussionsOn),module:_modules["default"].DISCUSSIONS,moduleRootState:"/"},{state:e.isLocalRoute(_modules["default"].CAMERAS.value)?"/":null,externalUrl:e.isLocalRoute(_modules["default"].CAMERAS.value)?null:e.getExternalUrl(_modules["default"].CAMERAS.value,"/"),name:e.getTitleModule(_modules["default"].CAMERAS),exact:!0,friendStates:[],hide:!_globalConfig.globalConfig.camerasOn,module:_modules["default"].CAMERAS,icon:"assets/images/svg/menu/city-cameras.svg",isInfinityMainMenu:!0,moduleRootState:"/"},{state:null,externalUrl:null,friendStates:[],name:"Выйти из аккаунта",hide:!_authServices.AuthService.getUserInfo(),isLogout:!0,dropdownAvatar:!0,icon:"assets/images/svg/menu/default.svg",callback:function(){return _authServices.AuthService.logOut()},isInfinityProfileMenu:!0},{state:null,externalUrl:null,friendStates:[],name:"Войти",isAuth:!0,icon:"assets/images/svg/menu/default.svg",hide:!!_authServices.AuthService.getUserInfo()}]}},{key:"menuItemBusinessModeHide",value:function(e){return!!_businessModeUtilsService.BusinessModeUtilsService.isBusinessModeOn()&&!!e}}]),e}();exports.TopNavInfinityService=TopNavInfinityService,TopNavInfinityService.MAIN_HASH="#/main",TopNavInfinityService.NOTIFICATIONS_COUNT_INTERVAL=null;
|