@intellias/menu 1.1.43 → 1.1.45

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.
Files changed (2) hide show
  1. package/dist/js/main.js +3 -3
  2. package/package.json +1 -1
package/dist/js/main.js CHANGED
@@ -219,7 +219,7 @@ return /******/ (function(modules) { // webpackBootstrap
219
219
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
220
220
 
221
221
  "use strict";
222
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n/* harmony import */ var mobile_device_detect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mobile-device-detect */ \"./node_modules/mobile-device-detect/dist/index.js\");\n/* harmony import */ var mobile_device_detect__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(mobile_device_detect__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _components_notifications_sidebar_NotificationsSidebar_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/notifications-sidebar/NotificationsSidebar.vue */ \"./components/notifications-sidebar/NotificationsSidebar.vue\");\n/* harmony import */ var _components_play_pause_PlayPause_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/play-pause/PlayPause.vue */ \"./components/play-pause/PlayPause.vue\");\n/* harmony import */ var _components_sub_menu_SubMenu_vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/sub-menu/SubMenu.vue */ \"./components/sub-menu/SubMenu.vue\");\n/* harmony import */ var _repositories_BaseUrl__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./repositories/BaseUrl */ \"./repositories/BaseUrl.ts\");\n/* harmony import */ var _repositories_BaseRepository__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./repositories/BaseRepository */ \"./repositories/BaseRepository.ts\");\n/* harmony import */ var _components_user_picture_UserPicture_vue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/user-picture/UserPicture.vue */ \"./components/user-picture/UserPicture.vue\");\n/* harmony import */ var _models_user_NotificationActionModel__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./models/user/NotificationActionModel */ \"./models/user/NotificationActionModel.ts\");\n/* harmony import */ var _models_user_NotificationModel__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./models/user/NotificationModel */ \"./models/user/NotificationModel.ts\");\n/* harmony import */ var _models_MenuLayouts__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./models/MenuLayouts */ \"./models/MenuLayouts.ts\");\n/* harmony import */ var _components_onboarding_sign_OnBoardingSign_vue__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./components/onboarding-sign/OnBoardingSign.vue */ \"./components/onboarding-sign/OnBoardingSign.vue\");\n/* harmony import */ var _repositories_managers_portal_ManagersItemsRepository__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./repositories/managers-portal/ManagersItemsRepository */ \"./repositories/managers-portal/ManagersItemsRepository.ts\");\n/* harmony import */ var _repositories_managers_portal_ManagersJiraRepository__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./repositories/managers-portal/ManagersJiraRepository */ \"./repositories/managers-portal/ManagersJiraRepository.ts\");\n/* harmony import */ var _models_managers_portal_ManagersIntemsModel__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./models/managers-portal/ManagersIntemsModel */ \"./models/managers-portal/ManagersIntemsModel.ts\");\n/* harmony import */ var _models_managers_portal_ManagersJiraModel__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./models/managers-portal/ManagersJiraModel */ \"./models/managers-portal/ManagersJiraModel.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst MEDIA_LANDSCAPE_MODE = '(orientation: landscape)';\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'MainMenu',\n components: {\n UserPicture: _components_user_picture_UserPicture_vue__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n NotificationsSidebar: _components_notifications_sidebar_NotificationsSidebar_vue__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n playPause: _components_play_pause_PlayPause_vue__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n SubMenu: _components_sub_menu_SubMenu_vue__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n OnBoardingSign: _components_onboarding_sign_OnBoardingSign_vue__WEBPACK_IMPORTED_MODULE_11__[\"default\"]\n },\n props: {\n helperFunctions: {\n type: Array\n },\n storeAdapter: {\n type: Object\n },\n subMenus: {\n type: Array\n },\n layout: {\n type: _models_MenuLayouts__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n required: true\n }\n },\n provide() {\n return {\n layout: this.layout,\n storeAdapter: this.storeAdapter,\n subMenus: this.isLiteDomain ? this.subMenus : null,\n helperFunctions: this.helperFunctions\n };\n },\n mounted() {\n return __awaiter(this, void 0, void 0, function* () {\n this.initializeItems();\n this.initializeAdminItems();\n this.initializeHereBoardItems();\n this.attachOverflowItems();\n this.$echo\n .private(`employee.${this.getUser.employee_id}`)\n .listen('SmartBalanceChanged', () => this.storeAdapter.User.actions.getData())\n .listen('LiqPayDonationProcessed', payload => {\n if (payload.status === 'finished') {\n this.storeAdapter.Toasts.mutations.addMessage(`${payload.quantity} UAH was successfully donated.`);\n }\n else {\n this.storeAdapter.Toasts.mutations.addWarning(`Donation ${payload.quantity} UAH was failed.`);\n }\n this.storeAdapter.Toasts.mutations.showAll();\n });\n if (this.$can('read', 'menu_manager_portal') && !this.isManagersPortal) {\n yield this.fetchManagersIntemsData();\n yield this.fetchManagersJiraData();\n }\n });\n },\n updated() {\n this.findOverflowedIndex();\n if (this.overflowedItems.items.length) {\n this.attachOverflowedMenus();\n }\n },\n computed: Object.assign(Object.assign({}, Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapGetters\"])('User', ['getUser', 'isSidebarFixed', 'isSidebarOpenOnMobile'])), { intemsConfig() {\n return this.storeAdapter.Config.state.data;\n },\n userInfo() {\n return this.storeAdapter.User.state.data;\n },\n uncheckedCounter() {\n var _a;\n if ((_a = this.storeAdapter.HomePage_OnBoardingPlan.getters) === null || _a === void 0 ? void 0 : _a.notCheckedTasksLength) {\n return this.storeAdapter.HomePage_OnBoardingPlan.getters.notCheckedTasksLength;\n }\n return this.userInfo.welcomeProgram.unchecked_welcome_program_questions;\n },\n canSeeGitBranch() {\n return this.$can('read', 'feature_show_git_branch');\n },\n isIntelliHub() {\n return this.layout === _models_MenuLayouts__WEBPACK_IMPORTED_MODULE_10__[\"default\"].Portals && this.$route.meta.layout === _models_MenuLayouts__WEBPACK_IMPORTED_MODULE_10__[\"PortalsAppLayout\"].IntelliHub;\n },\n isLiteDomain() {\n return this.layout === _models_MenuLayouts__WEBPACK_IMPORTED_MODULE_10__[\"default\"].Lite;\n },\n isManagersPortal() {\n return this.layout === _models_MenuLayouts__WEBPACK_IMPORTED_MODULE_10__[\"default\"].Portals && this.$route.meta.layout === _models_MenuLayouts__WEBPACK_IMPORTED_MODULE_10__[\"PortalsAppLayout\"].ManagersPortal;\n },\n managersDataCount() {\n return this.managersIntemsData.length + this.managersJiraData.length;\n },\n allowedToGiveKudos() {\n return this.userInfo.kudos_balance > 0;\n },\n isFreelancer() {\n return this.getUser.is_freelancer;\n },\n vacationBalance() {\n return this.userInfo.vacation_balance;\n },\n overflowMenuItemHeight() {\n return this.overflowedMenus[0].querySelector('li').getBoundingClientRect().height;\n },\n overflowMenuMaxItemCount() {\n const itemCountPerMenu = [];\n this.overflowedMenus.forEach(menu => {\n itemCountPerMenu.push(menu.querySelectorAll(':scope > li').length);\n });\n return Math.max(...itemCountPerMenu);\n },\n isMobileDevice() {\n return mobile_device_detect__WEBPACK_IMPORTED_MODULE_1__[\"isMobileOnly\"];\n },\n isTabletDevice() {\n return mobile_device_detect__WEBPACK_IMPORTED_MODULE_1__[\"isTablet\"];\n } }),\n watch: {\n // kostyl to close dropdown after back button press\n $route() {\n if (this.sideNavOpened) {\n this.toggleSideNavVisibility();\n }\n },\n 'overflowedItems.startIndex': {\n handler(index) {\n this.overflowedItems.items = this.items.slice(index);\n }\n }\n },\n methods: Object.assign(Object.assign(Object.assign(Object.assign({}, Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapGetters\"])('Config', ['config'])), Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapActions\"])('User/Notifications', ['markAsRead'])), Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapMutations\"])('User', ['toggleSidebarFixation', 'toggleSidebarOnMobile'])), { requestNotification(action) {\n return __awaiter(this, void 0, void 0, function* () {\n this.markAsRead(this.rejectedNotification);\n yield this.baseRepository.request(action.action, action.method ? action.method : _models_user_NotificationActionModel__WEBPACK_IMPORTED_MODULE_8__[\"RequestMethod\"].put, action.body);\n });\n },\n fetchManagersIntemsData() {\n return __awaiter(this, void 0, void 0, function* () {\n const data = yield this.managersIntemsRepository.getItems();\n Object.values(_models_managers_portal_ManagersIntemsModel__WEBPACK_IMPORTED_MODULE_14__[\"IntemsKeys\"]).forEach((item) => {\n if (data[item] && data[item].length) {\n this.managersIntemsData.push(...data[item]);\n }\n });\n });\n },\n fetchManagersJiraData() {\n return __awaiter(this, void 0, void 0, function* () {\n const { data } = yield this.managersJiraRepository.getItems();\n Object.values(_models_managers_portal_ManagersJiraModel__WEBPACK_IMPORTED_MODULE_15__[\"JiraKeys\"]).forEach((item) => {\n if (data[item] && data[item].length) {\n this.managersJiraData.push(...data[item]);\n }\n });\n });\n },\n logOut() {\n return __awaiter(this, void 0, void 0, function* () {\n const repository = new _repositories_BaseRepository__WEBPACK_IMPORTED_MODULE_6__[\"default\"](_repositories_BaseUrl__WEBPACK_IMPORTED_MODULE_5__[\"BaseUrl\"].LogOut);\n const data = yield repository.post();\n if (data.data !== undefined) {\n window.location.href = data.data.redirect_url;\n }\n });\n },\n handleSidebarTogglerClick() {\n const isLandscapeMode = window.matchMedia(MEDIA_LANDSCAPE_MODE).matches;\n if (!this.isMobileDevice || this.isTabletDevice || isLandscapeMode) {\n this.toggleSidebarFixation();\n }\n else {\n this.toggleSidebarOnMobile();\n }\n },\n goTo(routeName) {\n this.helperFunctions.router.push({ name: routeName });\n },\n modifyOpenedAdminItems(indexItem) {\n const collapsibleWrapper = document.getElementById('admin_collapsible');\n const collaplsedAdminItem = collapsibleWrapper.children[indexItem].children[1];\n const animationSmoothness = 0.4;\n const transitionDuration = `${collaplsedAdminItem.children.length * animationSmoothness}s`;\n collaplsedAdminItem.style.transitionDuration = transitionDuration;\n this.adminItems = this.adminItems.map((item, index) => item.children && index === indexItem ? Object.assign(Object.assign({}, item), { opened: !item.opened }) : item);\n },\n isManagersPortalMenuItem(item) {\n return item.menuCheck === 'menu_manager_portal';\n },\n showManagersPortalCounter(item) {\n return this.isManagersPortalMenuItem(item) && !this.isManagersPortal;\n },\n toggleSideNavVisibility() {\n this.sideNavOpened = !this.sideNavOpened;\n },\n attachOverflowItems() {\n this.markOverflowedItems();\n window.addEventListener('resize', this.markOverflowedItems);\n },\n attachOverflowedMenus() {\n this.overflowedMenus = this.$refs.overflowedMenu.querySelectorAll('ul');\n },\n findOverflowedIndex() {\n const items = [...this.$refs['menu-items'].childNodes];\n const { length } = items;\n for (let i = 0; i < length; i++) {\n if (items[i].offsetTop > items[i].clientTop) {\n this.overflowedItems.startIndex = i;\n break;\n }\n }\n },\n markOverflowedItems() {\n this.findOverflowedIndex();\n this.overflowedItems.items =\n this.overflowedItems.startIndex > -1 ? this.items.slice(this.overflowedItems.startIndex) : [];\n },\n openModalGiveKudos() {\n if (this.allowedToGiveKudos) {\n this.giveKudosComponent = this.giveKudosModalComponent();\n }\n },\n closeModalGiveKudos() {\n this.giveKudosComponent = undefined;\n }, giveKudosModalComponent() {\n return () => Promise.all(/*! import() | kudosForm */[__webpack_require__.e(\"vue\"), __webpack_require__.e(\"vendors~kudosForm~rejectComponent\"), __webpack_require__.e(\"vendors~kudosForm\"), __webpack_require__.e(\"kudosForm\")]).then(__webpack_require__.bind(null, /*! ./components/give-kudos-form/GiveKudosForm.vue */ \"./components/give-kudos-form/GiveKudosForm.vue\"));\n }, setOverflowedMenuHeight() {\n this.overflowedMenus.forEach(menu => {\n menu.style.height = `${this.overflowMenuMaxItemCount * this.overflowMenuItemHeight}px`;\n });\n },\n moveOverflowedMenu() {\n this.isOveflowedMenuMoved = true;\n this.setOverflowedMenuHeight();\n },\n resetOverflowedMenu() {\n this.isOveflowedMenuMoved = false;\n this.overflowedMenus.forEach(menu => {\n menu.style.height = 'auto';\n });\n },\n initializeRejectionComponent(rejectionData) {\n this.rejectConfirm = rejectionData.rejectionComponent;\n this.rejectedNotification = rejectionData.notification;\n },\n confirmedReject(payload) {\n const action = this.rejectedNotification.actions.first(item => item.type === _models_user_NotificationActionModel__WEBPACK_IMPORTED_MODULE_8__[\"ActionType\"].reject).clone();\n if ([\n _models_user_NotificationModel__WEBPACK_IMPORTED_MODULE_9__[\"NotificationCategory\"].vacations,\n _models_user_NotificationModel__WEBPACK_IMPORTED_MODULE_9__[\"NotificationCategory\"].sick_leaves,\n _models_user_NotificationModel__WEBPACK_IMPORTED_MODULE_9__[\"NotificationCategory\"].unpaid_leave\n ].includes(this.rejectedNotification.category)) {\n action.body.rejection_reason = payload.comment;\n }\n else {\n action.body.reject_reason = payload;\n }\n this.requestNotification(action);\n this.unsetRejection();\n },\n unsetRejection() {\n this.rejectConfirm = null;\n },\n initializeItems() {\n this.items = [\n {\n name: 'Time',\n link: this.isLiteDomain ? 'Time' : 'time',\n toMainDomain: false,\n toLite: !this.isLiteDomain,\n menuCheck: 'menu_time'\n },\n {\n name: 'Leaves and Absences',\n link: this.isLiteDomain ? 'Leaves and Absences' : 'leaves-and-absences/balance',\n toLite: !this.isLiteDomain,\n menuCheck: 'menu_leaves_and_absences'\n },\n {\n name: 'Stats',\n link: 'stats',\n toLite: !this.isLiteDomain,\n toMainDomain: false,\n menuCheck: 'menu_stats'\n },\n {\n name: 'IntelliShare',\n link: 'donations',\n toLite: false,\n toIntelliHub: this.isLiteDomain,\n toMainDomain: false,\n menuCheck: 'menu_donation_campaigns',\n blank: true\n },\n {\n name: 'Operations',\n link: this.isLiteDomain ? 'Reporting Branches' : 'projects',\n toLite: !this.isLiteDomain,\n toMainDomain: false,\n menuCheck: 'menu_projects'\n },\n {\n name: 'Reports',\n link: this.isLiteDomain ? 'project-report' : 'reports/project-report',\n toLite: !this.isLiteDomain,\n toMainDomain: false,\n menuCheck: 'reports_tab'\n },\n {\n name: \"Manager's Portal\",\n link: `${this.intemsConfig.liteSiteUrl}managers-portal`,\n isDirectLink: true,\n menuCheck: 'menu_manager_portal'\n },\n {\n name: 'Team',\n link: 'view-employees',\n toLite: !this.isLiteDomain,\n toMainDomain: false,\n menuCheck: 'menu_team'\n },\n {\n name: 'News',\n link: 'news',\n toLite: !this.isLiteDomain,\n toMainDomain: false,\n menuCheck: 'menu_news'\n },\n {\n name: 'Service desk',\n link: 'https://jira.intellias.com/servicedesk/customer/portals',\n toMainDomain: true,\n menuCheck: 'menu_service_desk',\n blank: true\n },\n {\n name: 'Knowledge base',\n link: 'https://confluence.intellias.com/pages/viewpage.action?pageId=110035843',\n toMainDomain: true,\n menuCheck: 'menu_knowledge_base',\n blank: true\n },\n {\n name: 'IntelliTube',\n link: 'https://intellias.sharepoint.com/sites/IntelliTube',\n toMainDomain: true,\n menuCheck: 'menu_intelli_tube',\n blank: true\n },\n {\n name: 'Book a desk',\n link: 'https://intellias.officespacesoftware.com/visual-directory',\n toMainDomain: true,\n menuCheck: 'menu_office_space',\n blank: true\n },\n {\n name: 'Company EA Model',\n link: this.isLiteDomain ? 'Company EA Model' : 'ea',\n toLite: !this.isLiteDomain,\n toMainDomain: false,\n menuCheck: 'menu_ea_model'\n },\n {\n name: 'Admin',\n menuCheck: 'menu_admin',\n adminMenu: true\n },\n {\n name: 'Time Imports',\n menuCheck: 'menu_here_board_page',\n hereBoardMenu: true\n }\n ];\n },\n initializeAdminItems() {\n this.adminItems = [\n {\n name: 'Admin support',\n menuCheck: 'menu_admin_it_support',\n opened: false,\n children: [\n {\n name: 'Access roles',\n menuCheck: 'setup_roles',\n link: this.isLiteDomain ? 'Access Roles' : 'access-roles',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Work areas',\n menuCheck: 'menu_work_areas',\n link: this.isLiteDomain ? 'office-assignments' : 'work-areas/office-assignments',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Technical work',\n menuCheck: 'menu_admin_it_support_technical_work',\n link: 'technical-work',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Access cards',\n menuCheck: 'menu_admin_it_support_access_cards',\n link: 'access-cards',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Client IPs',\n menuCheck: 'menu_admin_it_support_client_ips',\n link: 'clients/index.php',\n toMainDomain: true\n },\n {\n name: 'View logs',\n menuCheck: 'menu_admin_it_support_view_logs',\n link: this.isLiteDomain ? 'view_logs' : 'view-logs',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Service page',\n menuCheck: 'menu_service_page',\n link: this.isLiteDomain ? 'Service' : 'service-page',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n }\n ]\n },\n {\n name: 'HR',\n menuCheck: 'menu_admin_hr',\n opened: false,\n children: [\n {\n name: 'Manage IntelliStore',\n menuCheck: 'menu_intelli_store_manage',\n link: this.isLiteDomain\n ? 'catalog-admin-products-list'\n : 'total-rewards-portal/smart-catalog/admin',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Events',\n menuCheck: 'event_and_training',\n link: this.isLiteDomain ? 'Manage trainings' : 'trainings',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Calendars',\n menuCheck: 'menu_admin_holiday_calendar',\n link: 'calendars',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Manage smarts',\n menuCheck: 'menu_admin_hr_manage_smarts',\n link: 'manage-smarts',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Manage news',\n menuCheck: 'menu_admin_hr_news',\n link: 'manage-news-list',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Manage communities',\n menuCheck: 'manage_communities',\n link: 'manage-communities',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Compensation packages',\n menuCheck: 'menu_admin_comp_list',\n link: this.isLiteDomain ? 'compensation-package' : 'admin/compensation-package',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Banners',\n menuCheck: 'menu_admin_banners',\n link: this.isLiteDomain ? 'Banners List' : 'banners',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Manage Welcome Program',\n link: this.isLiteDomain ? 'Manage Welcome Program' : 'admin/welcome-program',\n toMainDomain: false,\n toLite: !this.isLiteDomain,\n menuCheck: 'menu_manage_welcome_program'\n },\n {\n name: 'Jira Satisfaction Survey',\n menuCheck: 'menu_enps_survey_admin',\n link: this.isLiteDomain ? 'Jira Satisfaction Survey List' : 'jira-satisfaction-survey',\n toMainDomain: false,\n toLite: !this.isLiteDomain\n },\n {\n name: 'Request Employees Location',\n menuCheck: 'request_employees_location',\n link: 'request-employees-location',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n }\n ]\n },\n {\n name: 'Countries',\n menuCheck: 'menu_admin_dictionary',\n link: this.isLiteDomain ? 'dictionary-page' : 'countries',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n }\n ];\n },\n initializeHereBoardItems() {\n this.hereBoardItems = [\n {\n name: 'Employee Dashboard',\n menuCheck: 'menu_here_board_page_user',\n link: this.isLiteDomain ? 'Here Board Page' : 'here-board-page',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Manager Dashboard',\n menuCheck: 'menu_here_board_page_manager',\n link: this.isLiteDomain ? 'Here Board Page Admin' : 'here-board-page-admin',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Admin Dashboard',\n menuCheck: 'menu_here_board_page_owner',\n link: this.isLiteDomain ? 'Here Board Page Admin' : 'here-board-page-admin',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n }\n ];\n } }),\n data() {\n return {\n flagShowSignOutLinks: false,\n sideNavOpened: false,\n baseRepository: new _repositories_BaseRepository__WEBPACK_IMPORTED_MODULE_6__[\"default\"](),\n managersIntemsRepository: new _repositories_managers_portal_ManagersItemsRepository__WEBPACK_IMPORTED_MODULE_12__[\"default\"](),\n managersJiraRepository: new _repositories_managers_portal_ManagersJiraRepository__WEBPACK_IMPORTED_MODULE_13__[\"default\"](),\n managersIntemsData: [],\n managersJiraData: [],\n rejectConfirm: undefined,\n rejectedNotification: undefined,\n giveKudosComponent: undefined,\n items: [],\n adminItems: [],\n hereBoardItems: [],\n overflowedItems: {\n items: [],\n startIndex: -1\n },\n overflowedMenus: undefined,\n isOveflowedMenuMoved: false\n };\n }\n});\n\n\n//# sourceURL=webpack://MainMenu/./Menu.ts?");
222
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n/* harmony import */ var mobile_device_detect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mobile-device-detect */ \"./node_modules/mobile-device-detect/dist/index.js\");\n/* harmony import */ var mobile_device_detect__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(mobile_device_detect__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _components_notifications_sidebar_NotificationsSidebar_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/notifications-sidebar/NotificationsSidebar.vue */ \"./components/notifications-sidebar/NotificationsSidebar.vue\");\n/* harmony import */ var _components_play_pause_PlayPause_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/play-pause/PlayPause.vue */ \"./components/play-pause/PlayPause.vue\");\n/* harmony import */ var _components_sub_menu_SubMenu_vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/sub-menu/SubMenu.vue */ \"./components/sub-menu/SubMenu.vue\");\n/* harmony import */ var _repositories_BaseUrl__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./repositories/BaseUrl */ \"./repositories/BaseUrl.ts\");\n/* harmony import */ var _repositories_BaseRepository__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./repositories/BaseRepository */ \"./repositories/BaseRepository.ts\");\n/* harmony import */ var _components_user_picture_UserPicture_vue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/user-picture/UserPicture.vue */ \"./components/user-picture/UserPicture.vue\");\n/* harmony import */ var _models_user_NotificationActionModel__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./models/user/NotificationActionModel */ \"./models/user/NotificationActionModel.ts\");\n/* harmony import */ var _models_user_NotificationModel__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./models/user/NotificationModel */ \"./models/user/NotificationModel.ts\");\n/* harmony import */ var _models_MenuLayouts__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./models/MenuLayouts */ \"./models/MenuLayouts.ts\");\n/* harmony import */ var _components_onboarding_sign_OnBoardingSign_vue__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./components/onboarding-sign/OnBoardingSign.vue */ \"./components/onboarding-sign/OnBoardingSign.vue\");\n/* harmony import */ var _repositories_managers_portal_ManagersItemsRepository__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./repositories/managers-portal/ManagersItemsRepository */ \"./repositories/managers-portal/ManagersItemsRepository.ts\");\n/* harmony import */ var _repositories_managers_portal_ManagersJiraRepository__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./repositories/managers-portal/ManagersJiraRepository */ \"./repositories/managers-portal/ManagersJiraRepository.ts\");\n/* harmony import */ var _models_managers_portal_ManagersIntemsModel__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./models/managers-portal/ManagersIntemsModel */ \"./models/managers-portal/ManagersIntemsModel.ts\");\n/* harmony import */ var _models_managers_portal_ManagersJiraModel__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./models/managers-portal/ManagersJiraModel */ \"./models/managers-portal/ManagersJiraModel.ts\");\n/* harmony import */ var _helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @/helpers/response/ResponseCode */ \"./helpers/response/ResponseCode.ts\");\n/* harmony import */ var _helpers_response_ErrorsToToastHelper__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @/helpers/response/ErrorsToToastHelper */ \"./helpers/response/ErrorsToToastHelper.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst MEDIA_LANDSCAPE_MODE = '(orientation: landscape)';\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'MainMenu',\n components: {\n UserPicture: _components_user_picture_UserPicture_vue__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n NotificationsSidebar: _components_notifications_sidebar_NotificationsSidebar_vue__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n playPause: _components_play_pause_PlayPause_vue__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n SubMenu: _components_sub_menu_SubMenu_vue__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n OnBoardingSign: _components_onboarding_sign_OnBoardingSign_vue__WEBPACK_IMPORTED_MODULE_11__[\"default\"]\n },\n props: {\n helperFunctions: {\n type: Array\n },\n storeAdapter: {\n type: Object\n },\n subMenus: {\n type: Array\n },\n layout: {\n type: _models_MenuLayouts__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n required: true\n }\n },\n provide() {\n return {\n layout: this.layout,\n storeAdapter: this.storeAdapter,\n subMenus: this.isLiteDomain ? this.subMenus : null,\n helperFunctions: this.helperFunctions\n };\n },\n mounted() {\n return __awaiter(this, void 0, void 0, function* () {\n this.initializeItems();\n this.initializeAdminItems();\n this.initializeHereBoardItems();\n this.attachOverflowItems();\n this.$echo\n .private(`employee.${this.getUser.employee_id}`)\n .listen('SmartBalanceChanged', () => this.storeAdapter.User.actions.getData())\n .listen('LiqPayDonationProcessed', payload => {\n if (payload.status === 'finished') {\n this.storeAdapter.Toasts.mutations.addMessage(`${payload.quantity} UAH was successfully donated.`);\n }\n else {\n this.storeAdapter.Toasts.mutations.addWarning(`Donation ${payload.quantity} UAH was failed.`);\n }\n this.storeAdapter.Toasts.mutations.showAll();\n });\n if (this.$can('read', 'menu_manager_portal') && !this.isManagersPortal) {\n yield this.fetchManagersIntemsData();\n yield this.fetchManagersJiraData();\n }\n });\n },\n updated() {\n this.findOverflowedIndex();\n if (this.overflowedItems.items.length) {\n this.attachOverflowedMenus();\n }\n },\n computed: Object.assign(Object.assign({}, Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapGetters\"])('User', ['getUser', 'isSidebarFixed', 'isSidebarOpenOnMobile'])), { intemsConfig() {\n return this.storeAdapter.Config.state.data;\n },\n userInfo() {\n return this.storeAdapter.User.state.data;\n },\n uncheckedCounter() {\n var _a;\n if ((_a = this.storeAdapter.HomePage_OnBoardingPlan.getters) === null || _a === void 0 ? void 0 : _a.notCheckedTasksLength) {\n return this.storeAdapter.HomePage_OnBoardingPlan.getters.notCheckedTasksLength;\n }\n return this.userInfo.welcomeProgram.unchecked_welcome_program_questions;\n },\n canSeeGitBranch() {\n return this.$can('read', 'feature_show_git_branch');\n },\n isIntelliHub() {\n return this.layout === _models_MenuLayouts__WEBPACK_IMPORTED_MODULE_10__[\"default\"].Portals && this.$route.meta.layout === _models_MenuLayouts__WEBPACK_IMPORTED_MODULE_10__[\"PortalsAppLayout\"].IntelliHub;\n },\n isLiteDomain() {\n return this.layout === _models_MenuLayouts__WEBPACK_IMPORTED_MODULE_10__[\"default\"].Lite;\n },\n isManagersPortal() {\n return this.layout === _models_MenuLayouts__WEBPACK_IMPORTED_MODULE_10__[\"default\"].Portals && this.$route.meta.layout === _models_MenuLayouts__WEBPACK_IMPORTED_MODULE_10__[\"PortalsAppLayout\"].ManagersPortal;\n },\n managersDataCount() {\n return this.managersIntemsData.length + this.managersJiraData.length;\n },\n allowedToGiveKudos() {\n return this.userInfo.kudos_balance > 0;\n },\n isFreelancer() {\n return this.getUser.is_freelancer;\n },\n vacationBalance() {\n return this.userInfo.vacation_balance;\n },\n overflowMenuItemHeight() {\n return this.overflowedMenus[0].querySelector('li').getBoundingClientRect().height;\n },\n overflowMenuMaxItemCount() {\n const itemCountPerMenu = [];\n this.overflowedMenus.forEach(menu => {\n itemCountPerMenu.push(menu.querySelectorAll(':scope > li').length);\n });\n return Math.max(...itemCountPerMenu);\n },\n isMobileDevice() {\n return mobile_device_detect__WEBPACK_IMPORTED_MODULE_1__[\"isMobileOnly\"];\n },\n isTabletDevice() {\n return mobile_device_detect__WEBPACK_IMPORTED_MODULE_1__[\"isTablet\"];\n } }),\n watch: {\n // kostyl to close dropdown after back button press\n $route() {\n if (this.sideNavOpened) {\n this.toggleSideNavVisibility();\n }\n },\n 'overflowedItems.startIndex': {\n handler(index) {\n this.overflowedItems.items = this.items.slice(index);\n }\n }\n },\n methods: Object.assign(Object.assign(Object.assign(Object.assign({}, Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapGetters\"])('Config', ['config'])), Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapActions\"])('User/Notifications', ['markAsRead'])), Object(vuex__WEBPACK_IMPORTED_MODULE_0__[\"mapMutations\"])('User', ['toggleSidebarFixation', 'toggleSidebarOnMobile'])), { requestNotification(action) {\n return __awaiter(this, void 0, void 0, function* () {\n this.markAsRead(this.rejectedNotification);\n yield this.baseRepository.request(action.action, action.method ? action.method : _models_user_NotificationActionModel__WEBPACK_IMPORTED_MODULE_8__[\"RequestMethod\"].put, action.body);\n });\n },\n fetchManagersIntemsData() {\n return __awaiter(this, void 0, void 0, function* () {\n const data = yield this.managersIntemsRepository.getItems();\n Object.values(_models_managers_portal_ManagersIntemsModel__WEBPACK_IMPORTED_MODULE_14__[\"IntemsKeys\"]).forEach((item) => {\n if (data[item] && data[item].length) {\n this.managersIntemsData.push(...data[item]);\n }\n });\n });\n },\n fetchManagersJiraData() {\n return __awaiter(this, void 0, void 0, function* () {\n const { data, status } = yield this.managersJiraRepository.getItems();\n if (status === _helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_16__[\"ResponseCode\"].BadGateway) {\n _helpers_response_ErrorsToToastHelper__WEBPACK_IMPORTED_MODULE_17__[\"default\"].error('VPN connection issue. In order to access all the data for managers portal, it is necessary to connect to a VPN.');\n }\n Object.values(_models_managers_portal_ManagersJiraModel__WEBPACK_IMPORTED_MODULE_15__[\"JiraKeys\"]).forEach(item => {\n if (data[item] && data[item].length) {\n this.managersJiraData.push(...data[item]);\n }\n });\n });\n },\n logOut() {\n return __awaiter(this, void 0, void 0, function* () {\n const repository = new _repositories_BaseRepository__WEBPACK_IMPORTED_MODULE_6__[\"default\"](_repositories_BaseUrl__WEBPACK_IMPORTED_MODULE_5__[\"BaseUrl\"].LogOut);\n const data = yield repository.post();\n if (data.data !== undefined) {\n window.location.href = data.data.redirect_url;\n }\n });\n },\n handleSidebarTogglerClick() {\n const isLandscapeMode = window.matchMedia(MEDIA_LANDSCAPE_MODE).matches;\n if (!this.isMobileDevice || this.isTabletDevice || isLandscapeMode) {\n this.toggleSidebarFixation();\n }\n else {\n this.toggleSidebarOnMobile();\n }\n },\n goTo(routeName) {\n this.helperFunctions.router.push({ name: routeName });\n },\n modifyOpenedAdminItems(indexItem) {\n const collapsibleWrapper = document.getElementById('admin_collapsible');\n const collaplsedAdminItem = collapsibleWrapper.children[indexItem].children[1];\n const animationSmoothness = 0.4;\n const transitionDuration = `${collaplsedAdminItem.children.length * animationSmoothness}s`;\n collaplsedAdminItem.style.transitionDuration = transitionDuration;\n this.adminItems = this.adminItems.map((item, index) => item.children && index === indexItem ? Object.assign(Object.assign({}, item), { opened: !item.opened }) : item);\n },\n isManagersPortalMenuItem(item) {\n return item.menuCheck === 'menu_manager_portal';\n },\n showManagersPortalCounter(item) {\n return this.isManagersPortalMenuItem(item) && !this.isManagersPortal;\n },\n toggleSideNavVisibility() {\n this.sideNavOpened = !this.sideNavOpened;\n },\n attachOverflowItems() {\n this.markOverflowedItems();\n window.addEventListener('resize', this.markOverflowedItems);\n },\n attachOverflowedMenus() {\n this.overflowedMenus = this.$refs.overflowedMenu.querySelectorAll('ul');\n },\n findOverflowedIndex() {\n const items = [...this.$refs['menu-items'].childNodes];\n const { length } = items;\n for (let i = 0; i < length; i++) {\n if (items[i].offsetTop > items[i].clientTop) {\n this.overflowedItems.startIndex = i;\n break;\n }\n }\n },\n markOverflowedItems() {\n this.findOverflowedIndex();\n this.overflowedItems.items =\n this.overflowedItems.startIndex > -1 ? this.items.slice(this.overflowedItems.startIndex) : [];\n },\n openModalGiveKudos() {\n if (this.allowedToGiveKudos) {\n this.giveKudosComponent = this.giveKudosModalComponent();\n }\n },\n closeModalGiveKudos() {\n this.giveKudosComponent = undefined;\n }, giveKudosModalComponent() {\n return () => Promise.all(/*! import() | kudosForm */[__webpack_require__.e(\"vue\"), __webpack_require__.e(\"vendors~kudosForm~rejectComponent\"), __webpack_require__.e(\"vendors~kudosForm\"), __webpack_require__.e(\"kudosForm\")]).then(__webpack_require__.bind(null, /*! ./components/give-kudos-form/GiveKudosForm.vue */ \"./components/give-kudos-form/GiveKudosForm.vue\"));\n }, setOverflowedMenuHeight() {\n this.overflowedMenus.forEach(menu => {\n menu.style.height = `${this.overflowMenuMaxItemCount * this.overflowMenuItemHeight}px`;\n });\n },\n moveOverflowedMenu() {\n this.isOveflowedMenuMoved = true;\n this.setOverflowedMenuHeight();\n },\n resetOverflowedMenu() {\n this.isOveflowedMenuMoved = false;\n this.overflowedMenus.forEach(menu => {\n menu.style.height = 'auto';\n });\n },\n initializeRejectionComponent(rejectionData) {\n this.rejectConfirm = rejectionData.rejectionComponent;\n this.rejectedNotification = rejectionData.notification;\n },\n confirmedReject(payload) {\n const action = this.rejectedNotification.actions.first(item => item.type === _models_user_NotificationActionModel__WEBPACK_IMPORTED_MODULE_8__[\"ActionType\"].reject).clone();\n if ([\n _models_user_NotificationModel__WEBPACK_IMPORTED_MODULE_9__[\"NotificationCategory\"].vacations,\n _models_user_NotificationModel__WEBPACK_IMPORTED_MODULE_9__[\"NotificationCategory\"].sick_leaves,\n _models_user_NotificationModel__WEBPACK_IMPORTED_MODULE_9__[\"NotificationCategory\"].unpaid_leave\n ].includes(this.rejectedNotification.category)) {\n action.body.rejection_reason = payload.comment;\n }\n else {\n action.body.reject_reason = payload;\n }\n this.requestNotification(action);\n this.unsetRejection();\n },\n unsetRejection() {\n this.rejectConfirm = null;\n },\n initializeItems() {\n this.items = [\n {\n name: 'Time',\n link: this.isLiteDomain ? 'Time' : 'time',\n toMainDomain: false,\n toLite: !this.isLiteDomain,\n menuCheck: 'menu_time'\n },\n {\n name: 'Leaves and Absences',\n link: this.isLiteDomain ? 'Leaves and Absences' : 'leaves-and-absences/balance',\n toLite: !this.isLiteDomain,\n menuCheck: 'menu_leaves_and_absences'\n },\n {\n name: 'Stats',\n link: 'stats',\n toLite: !this.isLiteDomain,\n toMainDomain: false,\n menuCheck: 'menu_stats'\n },\n {\n name: 'IntelliShare',\n link: 'donations',\n toLite: false,\n toIntelliHub: this.isLiteDomain,\n toMainDomain: false,\n menuCheck: 'menu_donation_campaigns',\n blank: true\n },\n {\n name: 'Operations',\n link: this.isLiteDomain ? 'Reporting Branches' : 'projects',\n toLite: !this.isLiteDomain,\n toMainDomain: false,\n menuCheck: 'menu_projects'\n },\n {\n name: 'Reports',\n link: this.isLiteDomain ? 'project-report' : 'reports/project-report',\n toLite: !this.isLiteDomain,\n toMainDomain: false,\n menuCheck: 'reports_tab'\n },\n {\n name: \"Manager's Portal\",\n link: `${this.intemsConfig.liteSiteUrl}managers-portal`,\n isDirectLink: true,\n menuCheck: 'menu_manager_portal'\n },\n {\n name: 'Team',\n link: 'view-employees',\n toLite: !this.isLiteDomain,\n toMainDomain: false,\n menuCheck: 'menu_team'\n },\n {\n name: 'News',\n link: 'news',\n toLite: !this.isLiteDomain,\n toMainDomain: false,\n menuCheck: 'menu_news'\n },\n {\n name: 'Service desk',\n link: 'https://jira.intellias.com/servicedesk/customer/portals',\n toMainDomain: true,\n menuCheck: 'menu_service_desk',\n blank: true\n },\n {\n name: 'Knowledge base',\n link: 'https://confluence.intellias.com/pages/viewpage.action?pageId=110035843',\n toMainDomain: true,\n menuCheck: 'menu_knowledge_base',\n blank: true\n },\n {\n name: 'IntelliTube',\n link: 'https://intellias.sharepoint.com/sites/IntelliTube',\n toMainDomain: true,\n menuCheck: 'menu_intelli_tube',\n blank: true\n },\n {\n name: 'Book a desk',\n link: 'https://intellias.officespacesoftware.com/visual-directory',\n toMainDomain: true,\n menuCheck: 'menu_office_space',\n blank: true\n },\n {\n name: 'Company EA Model',\n link: this.isLiteDomain ? 'Company EA Model' : 'ea',\n toLite: !this.isLiteDomain,\n toMainDomain: false,\n menuCheck: 'menu_ea_model'\n },\n {\n name: 'Admin',\n menuCheck: 'menu_admin',\n adminMenu: true\n },\n {\n name: 'Time Imports',\n menuCheck: 'menu_here_board_page',\n hereBoardMenu: true\n }\n ];\n },\n initializeAdminItems() {\n this.adminItems = [\n {\n name: 'Admin support',\n menuCheck: 'menu_admin_it_support',\n opened: false,\n children: [\n {\n name: 'Access roles',\n menuCheck: 'setup_roles',\n link: this.isLiteDomain ? 'Access Roles' : 'access-roles',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Work areas',\n menuCheck: 'menu_work_areas',\n link: this.isLiteDomain ? 'office-assignments' : 'work-areas/office-assignments',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Technical work',\n menuCheck: 'menu_admin_it_support_technical_work',\n link: 'technical-work',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Access cards',\n menuCheck: 'menu_admin_it_support_access_cards',\n link: 'access-cards',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Client IPs',\n menuCheck: 'menu_admin_it_support_client_ips',\n link: 'clients/index.php',\n toMainDomain: true\n },\n {\n name: 'View logs',\n menuCheck: 'menu_admin_it_support_view_logs',\n link: this.isLiteDomain ? 'view_logs' : 'view-logs',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Service page',\n menuCheck: 'menu_service_page',\n link: this.isLiteDomain ? 'Service' : 'service-page',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n }\n ]\n },\n {\n name: 'HR',\n menuCheck: 'menu_admin_hr',\n opened: false,\n children: [\n {\n name: 'Manage IntelliStore',\n menuCheck: 'menu_intelli_store_manage',\n link: this.isLiteDomain\n ? 'catalog-admin-products-list'\n : 'total-rewards-portal/smart-catalog/admin',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Events',\n menuCheck: 'event_and_training',\n link: this.isLiteDomain ? 'Manage trainings' : 'trainings',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Calendars',\n menuCheck: 'menu_admin_holiday_calendar',\n link: 'calendars',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Manage smarts',\n menuCheck: 'menu_admin_hr_manage_smarts',\n link: 'manage-smarts',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Manage news',\n menuCheck: 'menu_admin_hr_news',\n link: 'manage-news-list',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Manage communities',\n menuCheck: 'manage_communities',\n link: 'manage-communities',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Compensation packages',\n menuCheck: 'menu_admin_comp_list',\n link: this.isLiteDomain ? 'compensation-package' : 'admin/compensation-package',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Banners',\n menuCheck: 'menu_admin_banners',\n link: this.isLiteDomain ? 'Banners List' : 'banners',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Manage Welcome Program',\n link: this.isLiteDomain ? 'Manage Welcome Program' : 'admin/welcome-program',\n toMainDomain: false,\n toLite: !this.isLiteDomain,\n menuCheck: 'menu_manage_welcome_program'\n },\n {\n name: 'Jira Satisfaction Survey',\n menuCheck: 'menu_enps_survey_admin',\n link: this.isLiteDomain ? 'Jira Satisfaction Survey List' : 'jira-satisfaction-survey',\n toMainDomain: false,\n toLite: !this.isLiteDomain\n },\n {\n name: 'Request Employees Location',\n menuCheck: 'request_employees_location',\n link: 'request-employees-location',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n }\n ]\n },\n {\n name: 'Countries',\n menuCheck: 'menu_admin_dictionary',\n link: this.isLiteDomain ? 'dictionary-page' : 'countries',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n }\n ];\n },\n initializeHereBoardItems() {\n this.hereBoardItems = [\n {\n name: 'Employee Dashboard',\n menuCheck: 'menu_here_board_page_user',\n link: this.isLiteDomain ? 'Here Board Page' : 'here-board-page',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Manager Dashboard',\n menuCheck: 'menu_here_board_page_manager',\n link: this.isLiteDomain ? 'Here Board Page Admin' : 'here-board-page-admin',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n },\n {\n name: 'Admin Dashboard',\n menuCheck: 'menu_here_board_page_owner',\n link: this.isLiteDomain ? 'Here Board Page Admin' : 'here-board-page-admin',\n toLite: !this.isLiteDomain,\n toMainDomain: false\n }\n ];\n } }),\n data() {\n return {\n flagShowSignOutLinks: false,\n sideNavOpened: false,\n baseRepository: new _repositories_BaseRepository__WEBPACK_IMPORTED_MODULE_6__[\"default\"](),\n managersIntemsRepository: new _repositories_managers_portal_ManagersItemsRepository__WEBPACK_IMPORTED_MODULE_12__[\"default\"](),\n managersJiraRepository: new _repositories_managers_portal_ManagersJiraRepository__WEBPACK_IMPORTED_MODULE_13__[\"default\"](),\n managersIntemsData: [],\n managersJiraData: [],\n rejectConfirm: undefined,\n rejectedNotification: undefined,\n giveKudosComponent: undefined,\n items: [],\n adminItems: [],\n hereBoardItems: [],\n overflowedItems: {\n items: [],\n startIndex: -1\n },\n overflowedMenus: undefined,\n isOveflowedMenuMoved: false\n };\n }\n});\n\n\n//# sourceURL=webpack://MainMenu/./Menu.ts?");
223
223
 
224
224
  /***/ }),
225
225
 
@@ -1166,7 +1166,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
1166
1166
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1167
1167
 
1168
1168
  "use strict";
1169
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ResponseCode\", function() { return ResponseCode; });\nvar ResponseCode;\n(function (ResponseCode) {\n ResponseCode[ResponseCode[\"Ok\"] = 200] = \"Ok\";\n ResponseCode[ResponseCode[\"Created\"] = 201] = \"Created\";\n ResponseCode[ResponseCode[\"Accepted\"] = 202] = \"Accepted\";\n ResponseCode[ResponseCode[\"NoContent\"] = 204] = \"NoContent\";\n ResponseCode[ResponseCode[\"BadRequest\"] = 400] = \"BadRequest\";\n ResponseCode[ResponseCode[\"Unauthorized\"] = 401] = \"Unauthorized\";\n ResponseCode[ResponseCode[\"Forbidden\"] = 403] = \"Forbidden\";\n ResponseCode[ResponseCode[\"NotFound\"] = 404] = \"NotFound\";\n ResponseCode[ResponseCode[\"PageExpired\"] = 419] = \"PageExpired\";\n ResponseCode[ResponseCode[\"UnprocessableEntity\"] = 422] = \"UnprocessableEntity\";\n ResponseCode[ResponseCode[\"ServerError\"] = 500] = \"ServerError\";\n ResponseCode[ResponseCode[\"ServiceUnavailable\"] = 503] = \"ServiceUnavailable\";\n})(ResponseCode || (ResponseCode = {}));\n\n\n//# sourceURL=webpack://MainMenu/./helpers/response/ResponseCode.ts?");
1169
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ResponseCode\", function() { return ResponseCode; });\nvar ResponseCode;\n(function (ResponseCode) {\n ResponseCode[ResponseCode[\"Ok\"] = 200] = \"Ok\";\n ResponseCode[ResponseCode[\"Created\"] = 201] = \"Created\";\n ResponseCode[ResponseCode[\"Accepted\"] = 202] = \"Accepted\";\n ResponseCode[ResponseCode[\"NoContent\"] = 204] = \"NoContent\";\n ResponseCode[ResponseCode[\"BadRequest\"] = 400] = \"BadRequest\";\n ResponseCode[ResponseCode[\"Unauthorized\"] = 401] = \"Unauthorized\";\n ResponseCode[ResponseCode[\"Forbidden\"] = 403] = \"Forbidden\";\n ResponseCode[ResponseCode[\"NotFound\"] = 404] = \"NotFound\";\n ResponseCode[ResponseCode[\"PageExpired\"] = 419] = \"PageExpired\";\n ResponseCode[ResponseCode[\"UnprocessableEntity\"] = 422] = \"UnprocessableEntity\";\n ResponseCode[ResponseCode[\"ServerError\"] = 500] = \"ServerError\";\n ResponseCode[ResponseCode[\"BadGateway\"] = 502] = \"BadGateway\";\n ResponseCode[ResponseCode[\"ServiceUnavailable\"] = 503] = \"ServiceUnavailable\";\n})(ResponseCode || (ResponseCode = {}));\n\n\n//# sourceURL=webpack://MainMenu/./helpers/response/ResponseCode.ts?");
1170
1170
 
1171
1171
  /***/ }),
1172
1172
 
@@ -7564,7 +7564,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
7564
7564
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
7565
7565
 
7566
7566
  "use strict";
7567
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return DefaultSubscribers; });\n/* harmony import */ var _helpers_response_ResponseState__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../helpers/response/ResponseState */ \"./helpers/response/ResponseState.ts\");\n/* harmony import */ var _helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../helpers/response/ResponseCode */ \"./helpers/response/ResponseCode.ts\");\n/* harmony import */ var _main__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../main */ \"./main.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\nconst laravelDefault403Error1 = 'Unauthenticated.';\nconst laravelDefault403Error2 = 'This action is unauthorized.';\nclass DefaultSubscribers {\n constructor() {\n this.errors = new Map([\n [_helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__[\"ResponseCode\"].BadRequest, 'Bad request'],\n [_helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__[\"ResponseCode\"].Unauthorized, 'Unauthorized error'],\n [_helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__[\"ResponseCode\"].Forbidden, 'Unauthorized action'],\n [_helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__[\"ResponseCode\"].NotFound, 'Resource is not found'],\n [_helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__[\"ResponseCode\"].PageExpired, 'Page is expired. Please reload the page'],\n [_helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__[\"ResponseCode\"].UnprocessableEntity, 'Data is not valid'],\n [_helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__[\"ResponseCode\"].ServerError, 'Server error'],\n [_helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__[\"ResponseCode\"].ServiceUnavailable, 'Service unavailable']\n ]);\n }\n getErrorMessageByCode(statusCode) {\n const errorMessage = this.errors.get(statusCode);\n return errorMessage !== undefined ? errorMessage : 'Unknown error';\n }\n generateError(error) {\n if (error.response.status === _helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__[\"ResponseCode\"].UnprocessableEntity) {\n const { response } = error;\n // if there are error messages return false, because it will be shown by another handlers\n if (typeof response.data.errors !== 'undefined') {\n return false;\n }\n return response.data.message;\n }\n if (error.response.data.message &&\n error.response.status === _helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__[\"ResponseCode\"].Forbidden &&\n error.response.data.message !== '' &&\n error.response.data.message !== laravelDefault403Error1 &&\n error.response.data.message !== laravelDefault403Error2) {\n return error.response.data.message;\n }\n return this.getErrorMessageByCode(error.response.status);\n }\n getMessageFromBlob(data) {\n return __awaiter(this, void 0, void 0, function* () {\n yield data.text().then(text => {\n return JSON.parse(text);\n });\n });\n }\n generate() {\n return {\n [_helpers_response_ResponseState__WEBPACK_IMPORTED_MODULE_0__[\"ResponseState\"].Pending]: () => {\n _main__WEBPACK_IMPORTED_MODULE_2__[\"myOptions\"].storeAdapter.Request.mutations.incrementSent();\n },\n [_helpers_response_ResponseState__WEBPACK_IMPORTED_MODULE_0__[\"ResponseState\"].Rejected]: (error) => {\n if (error.config.method === 'head') {\n return false;\n }\n const errorMessage = this.generateError(error);\n if (!errorMessage) {\n return false;\n }\n _main__WEBPACK_IMPORTED_MODULE_2__[\"myOptions\"].storeAdapter.Toasts.mutations.addError(errorMessage);\n },\n [_helpers_response_ResponseState__WEBPACK_IMPORTED_MODULE_0__[\"ResponseState\"].Done]: () => {\n _main__WEBPACK_IMPORTED_MODULE_2__[\"myOptions\"].storeAdapter.Request.mutations.incrementCompleted();\n _main__WEBPACK_IMPORTED_MODULE_2__[\"myOptions\"].storeAdapter.Toasts.mutations.showAll();\n }\n };\n }\n}\n\n\n//# sourceURL=webpack://MainMenu/./repositories/subscribers/DefaultSubscribers.ts?");
7567
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return DefaultSubscribers; });\n/* harmony import */ var _helpers_response_ResponseState__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../helpers/response/ResponseState */ \"./helpers/response/ResponseState.ts\");\n/* harmony import */ var _helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../helpers/response/ResponseCode */ \"./helpers/response/ResponseCode.ts\");\n/* harmony import */ var _main__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../main */ \"./main.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\nconst laravelDefault403Error1 = 'Unauthenticated.';\nconst laravelDefault403Error2 = 'This action is unauthorized.';\nclass DefaultSubscribers {\n constructor() {\n this.errors = new Map([\n [_helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__[\"ResponseCode\"].BadRequest, 'Bad request'],\n [_helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__[\"ResponseCode\"].Unauthorized, 'Unauthorized error'],\n [_helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__[\"ResponseCode\"].Forbidden, 'Unauthorized action'],\n [_helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__[\"ResponseCode\"].NotFound, 'Resource is not found'],\n [_helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__[\"ResponseCode\"].PageExpired, 'Page is expired. Please reload the page'],\n [_helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__[\"ResponseCode\"].UnprocessableEntity, 'Data is not valid'],\n [_helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__[\"ResponseCode\"].ServerError, 'Server error'],\n [_helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__[\"ResponseCode\"].ServiceUnavailable, 'Service unavailable'],\n [_helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__[\"ResponseCode\"].BadGateway, '']\n ]);\n }\n getErrorMessageByCode(statusCode) {\n const errorMessage = this.errors.get(statusCode);\n return errorMessage !== undefined ? errorMessage : 'Unknown error';\n }\n generateError(error) {\n if (error.response.status === _helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__[\"ResponseCode\"].UnprocessableEntity) {\n const { response } = error;\n // if there are error messages return false, because it will be shown by another handlers\n if (typeof response.data.errors !== 'undefined') {\n return false;\n }\n return response.data.message;\n }\n if (error.response.data.message &&\n error.response.status === _helpers_response_ResponseCode__WEBPACK_IMPORTED_MODULE_1__[\"ResponseCode\"].Forbidden &&\n error.response.data.message !== '' &&\n error.response.data.message !== laravelDefault403Error1 &&\n error.response.data.message !== laravelDefault403Error2) {\n return error.response.data.message;\n }\n return this.getErrorMessageByCode(error.response.status);\n }\n getMessageFromBlob(data) {\n return __awaiter(this, void 0, void 0, function* () {\n yield data.text().then(text => {\n return JSON.parse(text);\n });\n });\n }\n generate() {\n return {\n [_helpers_response_ResponseState__WEBPACK_IMPORTED_MODULE_0__[\"ResponseState\"].Pending]: () => {\n _main__WEBPACK_IMPORTED_MODULE_2__[\"myOptions\"].storeAdapter.Request.mutations.incrementSent();\n },\n [_helpers_response_ResponseState__WEBPACK_IMPORTED_MODULE_0__[\"ResponseState\"].Rejected]: (error) => {\n if (error.config.method === 'head') {\n return false;\n }\n const errorMessage = this.generateError(error);\n if (!errorMessage) {\n return false;\n }\n _main__WEBPACK_IMPORTED_MODULE_2__[\"myOptions\"].storeAdapter.Toasts.mutations.addError(errorMessage);\n },\n [_helpers_response_ResponseState__WEBPACK_IMPORTED_MODULE_0__[\"ResponseState\"].Done]: () => {\n _main__WEBPACK_IMPORTED_MODULE_2__[\"myOptions\"].storeAdapter.Request.mutations.incrementCompleted();\n _main__WEBPACK_IMPORTED_MODULE_2__[\"myOptions\"].storeAdapter.Toasts.mutations.showAll();\n }\n };\n }\n}\n\n\n//# sourceURL=webpack://MainMenu/./repositories/subscribers/DefaultSubscribers.ts?");
7568
7568
 
7569
7569
  /***/ }),
7570
7570
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intellias/menu",
3
- "version": "1.1.43",
3
+ "version": "1.1.45",
4
4
  "description": "Menu for intems project.",
5
5
  "author": "Intems",
6
6
  "scripts": {