YetiForceCompany/YetiForceCRM

View on GitHub
public_html/layouts/resources/Calendar.min.js.map

Summary

Maintainability
Test Coverage
{"version":3,"file":"Calendar.min.js","sources":["Calendar.js"],"sourcesContent":["/* {[The file is published on the basis of YetiForce Public License 6.5 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */\n'use strict';\n\n/** Class representing a calendar. */\nwindow.Calendar_Js = class {\n\tstatic monthFormat = {\n\t\t'yyyy-mm-dd': 'YYYY-MMMM',\n\t\t'mm-dd-yyyy': 'MMMM-YYYY',\n\t\t'dd-mm-yyyy': 'MMMM-YYYY',\n\t\t'yyyy.mm.dd': 'YYYY.MMMM',\n\t\t'mm.dd.yyyy': 'MMMM.YYYY',\n\t\t'dd.mm.yyyy': 'MMMM.YYYY',\n\t\t'yyyy/mm/dd': 'YYYY/MMMM',\n\t\t'mm/dd/yyyy': 'MMMM/YYYY',\n\t\t'dd/mm/yyyy': 'MMMM/YYYY'\n\t};\n\tstatic viewsNamesMap = {\n\t\tmonth: 'dayGridMonth',\n\t\tbasicWeek: 'dayGridWeek',\n\t\tbasicDay: 'dayGridDay',\n\t\ttimeGridWeek: 'timeGridWeek',\n\t\ttimeGridDay: 'timeGridDay'\n\t};\n\tstatic viewsNamesLabels = {\n\t\tdayGridMonth: 'month',\n\t\tdayGridWeek: 'week',\n\t\tdayGridDay: 'day',\n\t\tlistWeek: 'week',\n\t\ttimeGridWeek: 'week',\n\t\ttimeGridDay: 'day'\n\t};\n\t/**\n\t * Create calendar's options.\n\t * @param {jQuery} container\n\t * @param {bool} readonly\n\t * @param {boolean} browserHistory\n\t */\n\tconstructor(container = $('.js-base-container'), readonly = false, browserHistory = true) {\n\t\tthis.calendarCreateView = false;\n\t\tthis.container = container;\n\t\tthis.calendarView = container.find('.js-calendar__container');\n\t\tthis.readonly = readonly;\n\t\tthis.eventCreate = app.getMainParams('eventCreate');\n\t\tthis.eventEdit = app.getMainParams('eventEdit');\n\t\tthis.browserHistory = !readonly && browserHistory;\n\t\tthis.sidebarView = {\n\t\t\tlength: 0\n\t\t};\n\t\tthis.startHour = app.getMainParams('startHour');\n\t\tthis.endHour = app.getMainParams('endHour');\n\t\tif (this.startHour == '') {\n\t\t\tthis.startHour = '00';\n\t\t}\n\t\tif (this.endHour == '') {\n\t\t\tthis.endHour = '00';\n\t\t}\n\t\tthis.browserHistoryOptions = {};\n\t\tthis.browserHistoryConfig = this.browserHistory ? this.setBrowserHistoryOptions() : {};\n\t\tthis.calendarOptions = this.setCalendarOptions();\n\t\tthis.eventTypeKeyName = false;\n\t\tthis.module = app.getModuleName();\n\n\t\tapp.event.on('QuickEdit.AfterSaveFinal', () => {\n\t\t\tthis.reloadCalendarData();\n\t\t});\n\t}\n\t/**\n\t * Set calendar's options.\n\t * @returns {object}\n\t */\n\tsetCalendarOptions() {\n\t\treturn Object.assign(\n\t\t\tthis.setCalendarBasicOptions(),\n\t\t\tthis.setCalendarAdvancedOptions(),\n\t\t\tthis.setCalendarModuleOptions(),\n\t\t\tthis.browserHistoryOptions\n\t\t);\n\t}\n\t/**\n\t * Set calendar's basic options.\n\t * @returns {object}\n\t */\n\tsetCalendarBasicOptions() {\n\t\tlet eventLimit = app.getMainParams('eventLimit'),\n\t\t\tuserView = app.getMainParams('activity_view'),\n\t\t\tdefaultView = app.moduleCacheGet('defaultView'),\n\t\t\tuserTimeFormat = CONFIG.hourFormat;\n\t\tif (eventLimit == 'true') {\n\t\t\teventLimit = true;\n\t\t} else if (eventLimit == 'false') {\n\t\t\teventLimit = false;\n\t\t} else {\n\t\t\teventLimit = parseInt(eventLimit) + 1;\n\t\t}\n\t\tif (userView === 'Today') {\n\t\t\tuserView = app.getMainParams('dayView');\n\t\t} else if (userView === 'This Week') {\n\t\t\tuserView = app.getMainParams('weekView');\n\t\t} else if (userView === 'This Year') {\n\t\t\tuserView = 'year';\n\t\t} else {\n\t\t\tuserView = 'dayGridMonth';\n\t\t}\n\t\tif (defaultView != null) {\n\t\t\tuserView = defaultView;\n\t\t}\n\t\tif (userTimeFormat == 24) {\n\t\t\tuserTimeFormat = {\n\t\t\t\thour: '2-digit',\n\t\t\t\tminute: '2-digit',\n\t\t\t\thour12: false,\n\t\t\t\tmeridiem: false\n\t\t\t};\n\t\t} else {\n\t\t\tuserTimeFormat = {\n\t\t\t\thour: 'numeric',\n\t\t\t\tminute: '2-digit',\n\t\t\t\tmeridiem: 'short'\n\t\t\t};\n\t\t}\n\n\t\tlet options = {\n\t\t\teventTimeFormat: userTimeFormat,\n\t\t\tslotLabelFormat: userTimeFormat,\n\t\t\tinitialView: Calendar_Js.viewsNamesMap[userView] ? Calendar_Js.viewsNamesMap[userView] : userView,\n\t\t\tforceEventDuration: true,\n\t\t\tdefaultTimedEventDuration: '01:00:00',\n\t\t\tdayMaxEvents: eventLimit,\n\t\t\tselectMirror: true,\n\t\t\tslotDuration: '00:15:00',\n\t\t\tnowIndicator: true,\n\t\t\tscrollTime: this.startHour + ':00'\n\t\t};\n\t\tif (app.moduleCacheGet('start') !== null && app.moduleCacheGet('start') !== undefined) {\n\t\t\ttry {\n\t\t\t\tlet s = App.Fields.Date.getDateInstance(app.moduleCacheGet('start'));\n\t\t\t\tlet e = App.Fields.Date.getDateInstance(app.moduleCacheGet('end'));\n\t\t\t\toptions.initialDate = App.Fields.Date.dateToDbFormat(new Date(e - (e - s) / 2));\n\t\t\t} catch (_error) {\n\t\t\t\tapp.cacheClear(app.getModuleName() + '_' + 'start');\n\t\t\t\tapp.cacheClear(app.getModuleName() + '_' + 'end');\n\t\t\t}\n\t\t}\n\n\t\treturn Object.assign(this.setCalendarMinimalOptions(), options);\n\t}\n\t/**\n\t * Set calendar's minimal options.\n\t * @returns {object}\n\t */\n\tsetCalendarMinimalOptions() {\n\t\tlet hiddenDays = [];\n\t\tif (app.getMainParams('switchingDays') === 'workDays') {\n\t\t\thiddenDays = app.getMainParams('hiddenDays', true);\n\t\t}\n\t\treturn {\n\t\t\tnavLinks: true,\n\t\t\tfirstDay: CONFIG.firstDayOfWeekNo,\n\t\t\tselectable: true,\n\t\t\thiddenDays: hiddenDays,\n\t\t\tmoreLinkContent: app.vtranslate('JS_MORE'),\n\t\t\tallDayText: app.vtranslate('JS_ALL_DAY'),\n\t\t\tnoEventsText: app.vtranslate('JS_NO_RECORDS'),\n\t\t\tbuttonText: {\n\t\t\t\ttoday: '',\n\t\t\t\tyear: app.vtranslate('JS_YEAR'),\n\t\t\t\tweek: app.vtranslate('JS_WEEK'),\n\t\t\t\tmonth: app.vtranslate('JS_MONTH'),\n\t\t\t\tday: app.vtranslate('JS_DAY'),\n\t\t\t\tdayGridMonth: app.vtranslate('JS_MONTH'),\n\t\t\t\tdayGridWeek: app.vtranslate('JS_WEEK'),\n\t\t\t\tlistWeek: app.vtranslate('JS_WEEK'),\n\t\t\t\tdayGridDay: app.vtranslate('JS_DAY'),\n\t\t\t\ttimeGridDay: app.vtranslate('JS_DAY'),\n\t\t\t\tlist: app.vtranslate('JS_CALENDAR_LIST')\n\t\t\t},\n\t\t\tbuttonHints: {\n\t\t\t\tprev(buttonText) {\n\t\t\t\t\treturn `${app.vtranslate('JS_PREV')} ${buttonText}`;\n\t\t\t\t},\n\t\t\t\tnext(buttonText) {\n\t\t\t\t\treturn `${app.vtranslate('JS_NEXT')} ${buttonText}`;\n\t\t\t\t},\n\t\t\t\ttoday(buttonText) {\n\t\t\t\t\treturn `${app.vtranslate('JS_CURRENT')} ${buttonText}`;\n\t\t\t\t}\n\t\t\t},\n\t\t\tviewHint: '$0',\n\t\t\tnavLinkHint: (_dateStr, zonedDate) => {\n\t\t\t\treturn App.Fields.Date.dateToUserFormat(zonedDate);\n\t\t\t},\n\t\t\tdayHeaderContent: (arg) => {\n\t\t\t\tif (this.container.width() < 600) {\n\t\t\t\t\treturn App.Fields.Date.daysTranslated[arg.date.getUTCDay()];\n\t\t\t\t}\n\t\t\t\treturn App.Fields.Date.fullDaysTranslated[arg.date.getUTCDay()];\n\t\t\t}\n\t\t};\n\t}\n\t/**\n\t * Set calendar's advanced options.\n\t * @returns {object}\n\t */\n\tsetCalendarAdvancedOptions() {\n\t\tconst self = this;\n\t\treturn {\n\t\t\teditable: !this.readonly && this.eventEdit == 1,\n\t\t\tselectable: !this.readonly && this.eventCreate == 1,\n\t\t\theaderToolbar: {\n\t\t\t\tleft: 'dayGridMonth,' + app.getMainParams('weekView') + ',' + app.getMainParams('dayView'),\n\t\t\t\tcenter: 'title,today',\n\t\t\t\tright: 'prev,next'\n\t\t\t},\n\t\t\tallDaySlot: app.getMainParams('allDaySlot'),\n\t\t\tviews: {\n\t\t\t\tbasic: {\n\t\t\t\t\tdayMaxEvents: false\n\t\t\t\t},\n\t\t\t\tdayGridMonth: {\n\t\t\t\t\ttitleFormat: (args) => {\n\t\t\t\t\t\treturn this.formatDate(args.date, args.end, 'month');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\ttimeGridWeek: {\n\t\t\t\t\ttitleFormat: (args) => {\n\t\t\t\t\t\treturn this.formatDate(args.date, args.end, 'week');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\ttimeGridDay: {\n\t\t\t\t\ttitleFormat: (args) => {\n\t\t\t\t\t\treturn this.formatDate(args.date, args.end, 'day');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tlistWeek: {\n\t\t\t\t\ttitleFormat: (args) => {\n\t\t\t\t\t\treturn this.formatDate(args.date, args.end, 'week');\n\t\t\t\t\t},\n\t\t\t\t\tdayHeaderContent: (arg) => {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\thtml: `<span class=\"fc-list-day-text\">${App.Fields.Date.fullDaysTranslated[arg.date.getDay()]}</span>\n\t\t\t\t\t\t\t<span class=\"fc-list-day-side-text\">${App.Fields.Date.dateToUserFormat(arg.date)}</span>`\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tbasicDay: {\n\t\t\t\t\ttype: 'timeGridDay'\n\t\t\t\t}\n\t\t\t},\n\t\t\teventDrop: self.updateEvent,\n\t\t\teventResize: self.updateEvent,\n\t\t\tdatesSet: (dateInfo) => {\n\t\t\t\tapp.event.trigger('Calendar.DatesSet', dateInfo, this);\n\t\t\t\tself.loadCalendarData();\n\t\t\t},\n\t\t\teventContent: self.eventRenderer,\n\t\t\theight: this.setCalendarHeight()\n\t\t};\n\t}\n\t/**\n\t * Set calendar module's options.\n\t * @returns {object}\n\t */\n\tsetCalendarModuleOptions() {\n\t\treturn {};\n\t}\n\t/**\n\t * Invokes FullCalendar with options.\n\t */\n\trenderCalendar() {\n\t\tthis.fullCalendar = new FullCalendar.Calendar(this.calendarView.get(0), this.calendarOptions);\n\t\tthis.fullCalendar.render();\n\t\tthis.registerViewRenderEvents();\n\t}\n\t/**\n\t * Get calendar container.\n\t * @returns {(boolean|jQuery)}\n\t */\n\tgetCalendarView() {\n\t\tif (!this.calendarView) {\n\t\t\tthis.calendarView = this.container.find('.js-calendar__container');\n\t\t}\n\t\treturn this.calendarView;\n\t}\n\t/**\n\t * Load calendar data\n\t */\n\tloadCalendarData() {\n\t\tconst defaultParams = this.getDefaultParams();\n\t\tthis.fullCalendar.removeAllEvents();\n\t\tif (!defaultParams.emptyFilters) {\n\t\t\tconst progressInstance = $.progressIndicator({ blockInfo: { enabled: true } });\n\t\t\tAppConnector.request(defaultParams).done((events) => {\n\t\t\t\tthis.fullCalendar.addEventSource(events.result);\n\t\t\t\tprogressInstance.progressIndicator({ mode: 'hide' });\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t * Reload calendar data after changing search parameters\n\t */\n\treloadCalendarData() {\n\t\tthis.loadCalendarData();\n\t}\n\t/**\n\t * Default params\n\t * @returns {{module: string, action: string, mode: string, start: string, end: string, user: *, cvid: int, emptyFilters: boolean}}\n\t */\n\tgetDefaultParams() {\n\t\tconst users = app.moduleCacheGet('calendar-users') || CONFIG.userId,\n\t\t\tsideBar = this.getSidebarView();\n\t\tlet filters = [],\n\t\t\tparams = {\n\t\t\t\tmodule: this.module ? this.module : CONFIG.module,\n\t\t\t\taction: 'Calendar',\n\t\t\t\tmode: 'getEvents',\n\t\t\t\tstart: App.Fields.Date.dateToUserFormat(this.fullCalendar.view.activeStart),\n\t\t\t\tend: App.Fields.Date.dateToUserFormat(this.fullCalendar.view.activeEnd),\n\t\t\t\tuser: users,\n\t\t\t\tcvid: this.getCurrentCvId(),\n\t\t\t\temptyFilters: users.length === 0\n\t\t\t};\n\t\tsideBar.find('.calendarFilters .filterField').each(function () {\n\t\t\tlet element = $(this),\n\t\t\t\tname,\n\t\t\t\tvalue;\n\t\t\tif (element.attr('type') == 'checkbox') {\n\t\t\t\tname = element.val();\n\t\t\t\tvalue = element.prop('checked') ? 1 : 0;\n\t\t\t} else {\n\t\t\t\tname = element.attr('name');\n\t\t\t\tvalue = element.val();\n\t\t\t}\n\t\t\tfilters.push({ name: name, value: value });\n\t\t});\n\t\tif (filters.length) {\n\t\t\tparams.filters = filters;\n\t\t}\n\t\tsideBar.find('.js-sidebar-filter-container').each((_, e) => {\n\t\t\tlet element = $(e);\n\t\t\tlet name = element.data('name');\n\t\t\tlet cacheName = element.data('cache');\n\t\t\tif (name && cacheName && app.moduleCacheGet(cacheName)) {\n\t\t\t\tparams[name] = app.moduleCacheGet(cacheName);\n\t\t\t\tparams.emptyFilters = !params.emptyFilters && params[name].length === 0;\n\t\t\t}\n\t\t});\n\t\tsideBar.find('.js-filter__container_checkbox_list').each((_, e) => {\n\t\t\tlet filters = [];\n\t\t\tlet element = $(e);\n\t\t\tlet name = element.data('name');\n\t\t\telement.find('.js-filter__item__val:checked').each(function () {\n\t\t\t\tfilters.push($(this).val());\n\t\t\t});\n\t\t\tif (name) {\n\t\t\t\tparams[name] = filters;\n\t\t\t}\n\t\t});\n\t\tsideBar.find('.js-calendar__filter__select').each((_, e) => {\n\t\t\tlet element = $(e);\n\t\t\tlet name = element.attr('name');\n\t\t\tlet cacheName = element.data('cache');\n\t\t\tif (name) {\n\t\t\t\tparams[name] = cacheName && app.moduleCacheGet(cacheName) ? app.moduleCacheGet(cacheName) : element.val();\n\t\t\t\tparams.emptyFilters = !params.emptyFilters && params[name].length === 0;\n\t\t\t}\n\t\t});\n\t\treturn params;\n\t}\n\t/**\n\t * Converts the date format.\n\t * @param {object} startDate\n\t * @param {object} endDate\n\t * @param {string} type\n\t * @returns {string}\n\t */\n\tformatDate(startDate, endDate, type) {\n\t\tswitch (type) {\n\t\t\tcase 'month':\n\t\t\t\treturn Calendar_Js.monthFormat[CONFIG.dateFormat]\n\t\t\t\t\t.replace('YYYY', startDate['year'])\n\t\t\t\t\t.replace('MMMM', App.Fields.Date.fullMonthsTranslated[startDate['month']]);\n\t\t\tcase 'week':\n\t\t\t\tlet weekRange = '';\n\t\t\t\tlet endMonth = '';\n\t\t\t\tlet startDay = startDate['day'];\n\t\t\t\tlet endYear = startDate['year'];\n\t\t\t\tif (startDate['month'] !== endDate['month']) {\n\t\t\t\t\tendMonth = App.Fields.Date.monthsTranslated[endDate['month']];\n\t\t\t\t}\n\t\t\t\tif (startDate['year'] !== endDate['year']) {\n\t\t\t\t\tstartDay = startDate['day'] + ', ' + startDate['year'];\n\t\t\t\t\tendYear = endDate['year'];\n\t\t\t\t}\n\t\t\t\tweekRange = [\n\t\t\t\t\tApp.Fields.Date.monthsTranslated[startDate['month']],\n\t\t\t\t\tstartDay,\n\t\t\t\t\t'-',\n\t\t\t\t\tendMonth,\n\t\t\t\t\tendDate['day'] + ',',\n\t\t\t\t\tendYear\n\t\t\t\t].join(' ');\n\t\t\t\treturn weekRange;\n\t\t\tcase 'day':\n\t\t\t\treturn CONFIG.dateFormat\n\t\t\t\t\t.replace('yyyy', startDate['year'])\n\t\t\t\t\t.replace('mm', App.Fields.Date.monthsTranslated[startDate['month']])\n\t\t\t\t\t.replace('dd', startDate['day']);\n\t\t}\n\t}\n\t/**\n\t * Update calendar's event.\n\t * @param {Object} info\n\t */\n\tupdateEvent(info) {\n\t\tconst progressInstance = jQuery.progressIndicator({ blockInfo: { enabled: true } });\n\t\tAppConnector.request({\n\t\t\tmodule: this.module ? this.module : CONFIG.module,\n\t\t\taction: 'Calendar',\n\t\t\tmode: 'updateEvent',\n\t\t\tid: info.event.id,\n\t\t\tstart: App.Fields.DateTime.dateToUserFormat(info.event.start),\n\t\t\tend: App.Fields.DateTime.dateToUserFormat(info.event.end),\n\t\t\tallDay: info.event.allDay\n\t\t})\n\t\t\t.done(function (response) {\n\t\t\t\tprogressInstance.progressIndicator({ mode: 'hide' });\n\t\t\t\tif (!response['result']) {\n\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\ttext: app.vtranslate('JS_NO_EDIT_PERMISSION'),\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t});\n\t\t\t\t\tinfo.revert();\n\t\t\t\t} else {\n\t\t\t\t\twindow.popoverCache = {};\n\t\t\t\t}\n\t\t\t})\n\t\t\t.fail(function () {\n\t\t\t\tprogressInstance.progressIndicator({ mode: 'hide' });\n\t\t\t\tapp.showNotify({\n\t\t\t\t\ttext: app.vtranslate('JS_NO_EDIT_PERMISSION'),\n\t\t\t\t\ttype: 'error'\n\t\t\t\t});\n\t\t\t\tinfo.revert();\n\t\t\t});\n\t}\n\t/**\n\t * Render event.\n\t * @param {Object} arg\n\t * @returns {Object}\n\t */\n\teventRenderer(arg) {\n\t\tif (arg.event.display === 'background') {\n\t\t\treturn {\n\t\t\t\thtml: `<span class=\"${arg.event.extendedProps.icon} js-popover-icon mr-1\"></span>${arg.event._def.title}`\n\t\t\t};\n\t\t}\n\t}\n\t/**\n\t * Returns counted calendar height.\n\t * @returns {(number|string)}\n\t */\n\tsetCalendarHeight() {\n\t\tlet defaultHeightValue = 'auto';\n\t\tif ($(window).width() > 993) {\n\t\t\tlet calendarPadding;\n\t\t\tif (this.container.hasClass('js-modal-container')) {\n\t\t\t\tcalendarPadding = this.container.find('.js-modal-header').outerHeight(); // modal needs bigger padding to prevent modal's scrollbar\n\t\t\t} else {\n\t\t\t\tcalendarPadding = this.container.find('.js-contents-div').css('margin-left').replace('px', ''); //equals calendar padding bottom to left margin\n\t\t\t}\n\t\t\tlet setCalendarH = () => {\n\t\t\t\treturn (\n\t\t\t\t\t$(window).height() -\n\t\t\t\t\tthis.container.find('.js-calendar__container').offset().top -\n\t\t\t\t\t$('.js-footer').height() -\n\t\t\t\t\tcalendarPadding\n\t\t\t\t);\n\t\t\t};\n\t\t\tdefaultHeightValue = setCalendarH();\n\t\t\tnew ResizeSensor(this.container.find('.contentsDiv'), () => {\n\t\t\t\tlet currentHeight = setCalendarH();\n\t\t\t\tif (currentHeight !== defaultHeightValue) {\n\t\t\t\t\tthis.fullCalendar.setOption('height', currentHeight);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn defaultHeightValue;\n\t}\n\t/**\n\t * Set calendar options from browser history.\n\t * @returns {object}\n\t */\n\tsetBrowserHistoryOptions() {\n\t\tconst historyParams = app.getMainParams('historyParams', true);\n\t\tlet options = {};\n\t\tif (historyParams && (historyParams.length || Object.keys(historyParams).length)) {\n\t\t\tlet s = App.Fields.Date.getDateInstance(historyParams.start);\n\t\t\tlet e = App.Fields.Date.getDateInstance(historyParams.end);\n\t\t\tthis.browserHistoryOptions = {\n\t\t\t\tinitialView: historyParams.viewType,\n\t\t\t\tinitialDate: App.Fields.Date.dateToDbFormat(new Date(e - (e - s) / 2)),\n\t\t\t\thiddenDays: historyParams.hiddenDays.split(',').map((x) => {\n\t\t\t\t\tlet parsedValue = parseInt(x);\n\t\t\t\t\treturn isNaN(parsedValue) ? '' : parsedValue;\n\t\t\t\t})\n\t\t\t};\n\t\t\toptions = {\n\t\t\t\tstart: historyParams.start,\n\t\t\t\tend: historyParams.end,\n\t\t\t\ttime: historyParams.time,\n\t\t\t\tuser: historyParams.user,\n\t\t\t\tcvid: historyParams.cvid\n\t\t\t};\n\t\t\tObject.keys(options).forEach((key) => options[key] === 'undefined' && delete options[key]);\n\t\t\tObject.keys(this.browserHistoryOptions).forEach(\n\t\t\t\t(key) => this.browserHistoryOptions[key] === 'undefined' && delete this.browserHistoryOptions[key]\n\t\t\t);\n\t\t\tapp.moduleCacheSet('browserHistoryEvent', false);\n\t\t\tif (historyParams.cvid && historyParams.cvid !== 'undefined') {\n\t\t\t\tapp.moduleCacheSet('CurrentCvId', historyParams.cvid);\n\t\t\t}\n\t\t\tapp.setMainParams('showType', options.time);\n\t\t\tapp.setMainParams('usersId', options.user);\n\t\t\tapp.setMainParams('defaultView', this.browserHistoryOptions);\n\t\t}\n\t\twindow.addEventListener(\n\t\t\t'popstate',\n\t\t\tfunction () {\n\t\t\t\tapp.moduleCacheSet('browserHistoryEvent', true);\n\t\t\t},\n\t\t\tfalse\n\t\t);\n\t\treturn options;\n\t}\n\t/**\n\t * Register filters\n\t */\n\tregisterFilters() {\n\t\tconst self = this;\n\t\tlet sideBar = self.getSidebarView();\n\t\tif (!sideBar || sideBar.length <= 0) {\n\t\t\treturn;\n\t\t}\n\t\tsideBar.find('.js-sidebar-filter-container').each((_, row) => {\n\t\t\tlet formContainer = $(row);\n\t\t\tself.registerUsersChange(formContainer);\n\t\t\tApp.Fields.Picklist.showSelect2ElementView(formContainer.find('select'));\n\t\t\tapp.showNewScrollbar(formContainer, {\n\t\t\t\tsuppressScrollX: true\n\t\t\t});\n\t\t\tself.registerFilterForm(formContainer);\n\t\t});\n\t\tself.registerSelectAll(sideBar);\n\t\tif (app.moduleCacheGet('CurrentCvId') !== null) {\n\t\t\tthis.container\n\t\t\t\t.find('.js-calendar__extended-filter-tab [data-cvid=\"' + app.moduleCacheGet('CurrentCvId') + '\"] a')\n\t\t\t\t.addClass('active');\n\t\t}\n\t}\n\t/**\n\t * Register filter for users and groups\n\t * @param {jQuery} container\n\t */\n\tregisterFilterForm(container) {\n\t\tconst self = this;\n\t\tif (container.find('.js-filter__search').length) {\n\t\t\tcontainer.find('.js-filter__search').on('keyup', this.findElementOnList.bind(self));\n\t\t}\n\t\tcontainer.find('.js-calendar__filter__select, .filterField').each((_, e) => {\n\t\t\tlet element = $(e);\n\t\t\tlet name = element.data('cache');\n\t\t\tlet cachedValue = app.moduleCacheGet(name);\n\t\t\tif (element.length > 0 && cachedValue !== undefined) {\n\t\t\t\tif (element.prop('tagName') == 'SELECT') {\n\t\t\t\t\telement.val(cachedValue);\n\t\t\t\t}\n\t\t\t} else if (\n\t\t\t\tname &&\n\t\t\t\telement.length > 0 &&\n\t\t\t\tcachedValue === undefined &&\n\t\t\t\t!element.find(':selected').length &&\n\t\t\t\telement.data('selected') !== 0\n\t\t\t) {\n\t\t\t\tlet allOptions = [];\n\t\t\t\telement.find('option').each((i, option) => {\n\t\t\t\t\tallOptions.push($(option).val());\n\t\t\t\t});\n\t\t\t\telement.val(allOptions);\n\t\t\t\tapp.moduleCacheSet(name, cachedValue);\n\t\t\t}\n\t\t\telement.off('change');\n\t\t\tApp.Fields.Picklist.showSelect2ElementView(element);\n\t\t\telement.on('change', (e) => {\n\t\t\t\tlet item = $(e.currentTarget);\n\t\t\t\tlet value = item.val();\n\t\t\t\tif (value == null) {\n\t\t\t\t\tvalue = '';\n\t\t\t\t}\n\t\t\t\tif (item.attr('type') == 'checkbox') {\n\t\t\t\t\tvalue = element.is(':checked');\n\t\t\t\t}\n\t\t\t\tapp.moduleCacheSet(item.data('cache'), value);\n\t\t\t\tself.reloadCalendarData();\n\t\t\t});\n\t\t});\n\t\tcontainer\n\t\t\t.find('.js-filter__container_checkbox_list .js-filter__item__val')\n\t\t\t.off('change')\n\t\t\t.on('change', (e) => {\n\t\t\t\tself.reloadCalendarData();\n\t\t\t});\n\t}\n\t/**\n\t * Find element on list (user, group)\n\t * @param {jQuery.Event} e\n\t */\n\tfindElementOnList(e) {\n\t\tconst target = $(e.target),\n\t\t\tvalue = target.val().toLowerCase(),\n\t\t\tcontainer = target.closest('.js-filter__container');\n\t\tcontainer.find('.js-filter__item__value').filter(function () {\n\t\t\tlet item = $(this).closest('.js-filter__item__container');\n\t\t\tif ($(this).text().trim().toLowerCase().indexOf(value) > -1) {\n\t\t\t\titem.removeClass('d-none');\n\t\t\t} else {\n\t\t\t\titem.addClass('d-none');\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t * Register users change\n\t * @param {jQuery} formContainer\n\t */\n\tregisterUsersChange(formContainer) {\n\t\tformContainer.find('.js-input-user-owner-id-ajax, .js-input-user-owner-id').on('change', () => {\n\t\t\tthis.reloadCalendarData();\n\t\t});\n\t}\n\t/**\n\t * Register change on select all checkbox\n\t * @param {jQuery} formContainer\n\t */\n\tregisterSelectAll(formContainer) {\n\t\tformContainer.find('.js-select-all').on('change', (e) => {\n\t\t\tlet checkboxSelectAll = $(e.currentTarget);\n\t\t\tlet checkboxes = formContainer.find('.js-input-user-owner-id-ajax, .js-input-user-owner-id');\n\t\t\tif (checkboxSelectAll.is(':checked')) {\n\t\t\t\tcheckboxes.prop('checked', true);\n\t\t\t} else {\n\t\t\t\tcheckboxes.prop('checked', false);\n\t\t\t\tformContainer.find('#ownerId' + CONFIG.userId).prop('checked', true);\n\t\t\t}\n\t\t\tthis.reloadCalendarData();\n\t\t});\n\t}\n\t/**\n\t * Register sidebar events.\n\t */\n\tregisterSidebarEvents() {\n\t\t$('.bodyContents').on('Vtiger.Widget.Load.undefined', () => {\n\t\t\tthis.registerSelect2Event();\n\t\t});\n\t}\n\t/**\n\t * Get sidebar view panel\n\t * @returns {jQuery}\n\t */\n\tgetSidebarView() {\n\t\tif (!this.sidebarView || !this.sidebarView.length) {\n\t\t\tthis.sidebarView = this.container.find('.js-calendar-right-panel');\n\t\t}\n\t\treturn this.sidebarView;\n\t}\n\t/**\n\t * Get current cv id\n\t * @returns {int}\n\t */\n\tgetCurrentCvId() {\n\t\tlet tab = $('.js-calendar__container .js-calendar__extended-filter-tab');\n\t\tif (tab.length === 0) {\n\t\t\ttab = $('.js-calendar__header-buttons .js-calendar__extended-filter-tab');\n\t\t}\n\t\treturn tab.find('.active').parent().data('cvid');\n\t}\n\t/**\n\t * Register select2 event.\n\t */\n\tregisterSelect2Event() {\n\t\tconst self = this;\n\t\t$('.siteBarRight .js-calendar__filter__select').each(function () {\n\t\t\tlet element = $(this);\n\t\t\tlet name = element.data('cache');\n\t\t\tlet cachedValue = app.moduleCacheGet(name);\n\t\t\tif (element.length > 0 && cachedValue !== undefined) {\n\t\t\t\tif (element.prop('tagName') == 'SELECT') {\n\t\t\t\t\telement.val(cachedValue);\n\t\t\t\t}\n\t\t\t} else if (element.length > 0 && cachedValue === undefined && !element.find(':selected').length) {\n\t\t\t\tlet allOptions = [];\n\t\t\t\telement.find('option').each((_i, option) => {\n\t\t\t\t\tallOptions.push($(option).val());\n\t\t\t\t});\n\t\t\t\telement.val(allOptions);\n\t\t\t\tapp.moduleCacheSet(name, cachedValue);\n\t\t\t}\n\t\t});\n\t\tlet selectsElements = $('.siteBarRight .select2, .siteBarRight .filterField');\n\t\tselectsElements.off('change');\n\t\tApp.Fields.Picklist.showSelect2ElementView(selectsElements);\n\t\tselectsElements.on('change', function () {\n\t\t\tlet element = $(this);\n\t\t\tlet value = element.val();\n\t\t\tif (value == null) {\n\t\t\t\tvalue = '';\n\t\t\t}\n\t\t\tif (element.attr('type') == 'checkbox') {\n\t\t\t\tvalue = element.is(':checked');\n\t\t\t}\n\t\t\tapp.moduleCacheSet(element.data('cache'), value);\n\t\t\tself.reloadCalendarData();\n\t\t});\n\t}\n\t/**\n\t * Register button select all.\n\t */\n\tregisterButtonSelectAll() {\n\t\t$('.selectAllBtn').on('click', function () {\n\t\t\tconst selectAllLabel = $(this).find('.selectAll'),\n\t\t\t\tdeselectAllLabel = $(this).find('.deselectAll');\n\t\t\tif (selectAllLabel.hasClass('d-none')) {\n\t\t\t\tselectAllLabel.removeClass('d-none');\n\t\t\t\tdeselectAllLabel.addClass('d-none');\n\t\t\t\t$(this).closest('.quickWidget').find('select option').prop('selected', false);\n\t\t\t} else {\n\t\t\t\t$(this).closest('.quickWidget').find('select option').prop('selected', true);\n\t\t\t\tdeselectAllLabel.removeClass('d-none');\n\t\t\t\tselectAllLabel.addClass('d-none');\n\t\t\t}\n\t\t\t$(this).closest('.quickWidget').find('select').trigger('change');\n\t\t});\n\t}\n\t/**\n\t * Register add button.\n\t */\n\tregisterAddButton() {\n\t\t$('.js-add').on('click', () => {\n\t\t\tthis.getCalendarCreateView().done((data) => {\n\t\t\t\tApp.Components.QuickCreate.showModal(data, {\n\t\t\t\t\tcallbackFunction: () => {\n\t\t\t\t\t\tthis.reloadCalendarData();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t * Get calendar create view.\n\t * @returns {promise}\n\t */\n\tgetCalendarCreateView() {\n\t\tconst self = this,\n\t\t\taDeferred = jQuery.Deferred();\n\t\tif (this.calendarCreateView !== false) {\n\t\t\taDeferred.resolve(this.calendarCreateView);\n\t\t\treturn aDeferred.promise();\n\t\t}\n\t\tlet progressInstance = jQuery.progressIndicator();\n\t\tthis.loadCalendarCreateView()\n\t\t\t.done(function (data) {\n\t\t\t\tprogressInstance.hide();\n\t\t\t\tself.calendarCreateView = data;\n\t\t\t\taDeferred.resolve(data);\n\t\t\t})\n\t\t\t.fail(function () {\n\t\t\t\tprogressInstance.hide();\n\t\t\t});\n\t\treturn aDeferred.promise();\n\t}\n\t/**\n\t * Load calendar create view.\n\t * @returns {promise}\n\t */\n\tloadCalendarCreateView() {\n\t\tconst aDeferred = jQuery.Deferred(),\n\t\t\tmoduleName = app.getModuleName();\n\t\tApp.Components.QuickCreate.getForm('index.php?module=' + moduleName + '&view=QuickCreateAjax', moduleName)\n\t\t\t.done(function (data) {\n\t\t\t\taDeferred.resolve(data);\n\t\t\t})\n\t\t\t.fail(function (textStatus, errorThrown) {\n\t\t\t\taDeferred.reject(textStatus, errorThrown);\n\t\t\t});\n\t\treturn aDeferred.promise();\n\t}\n\t/**\n\t * Function invokes by FullCalendar, sets selected days in form\n\t * @param info\n\t */\n\tselectDays(info) {\n\t\tthis.getCalendarCreateView().done((data) => {\n\t\t\tApp.Components.QuickCreate.showModal(data, {\n\t\t\t\tcallbackFunction: () => {\n\t\t\t\t\tself.reloadCalendarData();\n\t\t\t\t},\n\t\t\t\tcallbackPostShown: (modal) => {\n\t\t\t\t\tthis.selectCallbackCreateModal(modal, info);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t * Callback after shown create modal\n\t * @param {jQuery} modal\n\t */\n\tselectCallbackCreateModal(modal, info) {\n\t\tlet startDate = info.start,\n\t\t\tendDate = info.end;\n\t\tif (info['allDay']) {\n\t\t\tendDate.setDate(endDate.getDate() - 1);\n\t\t}\n\t\tif (info['allDay']) {\n\t\t\tlet startDateSplitted = this.startHour.split(':');\n\t\t\tlet endDateSplitted = this.endHour.split(':');\n\t\t\tstartDate.setHours(startDateSplitted[0], startDateSplitted[1]);\n\t\t\tendDate.setHours(endDateSplitted[0], endDateSplitted[1]);\n\t\t\tif (startDate.toDateString() === endDate.toDateString()) {\n\t\t\t\tlet activityType = modal.find('[name=\"activitytype\"]').val();\n\t\t\t\tlet activityDurations = JSON.parse(modal.find('[name=\"defaultOtherEventDuration\"]').val());\n\t\t\t\tlet minutes = 60;\n\t\t\t\tfor (let i in activityDurations) {\n\t\t\t\t\tif (activityDurations[i].activitytype === activityType) {\n\t\t\t\t\t\tminutes = parseInt(activityDurations[i].duration);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (minutes) {\n\t\t\t\t\tendDate.setMinutes(endDate.getMinutes() + minutes);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlet dateFormat = CONFIG.dateFormat;\n\t\tlet timeFormat = CONFIG.hourFormat;\n\t\tlet dateField = modal.find('[name=\"date_start\"]');\n\t\tif (dateField.length) {\n\t\t\tdateFormat = dateField.data('dateFormat');\n\t\t}\n\t\tlet timeField = modal.find('[name=\"time_start\"]');\n\t\tif (timeField.length) {\n\t\t\ttimeFormat = timeField.data('format');\n\t\t}\n\t\tlet defaultTimeFormat = '';\n\t\tif (timeFormat == 24) {\n\t\t\tdefaultTimeFormat = 'HH:mm';\n\t\t} else {\n\t\t\tdefaultTimeFormat = 'hh:mm A';\n\t\t}\n\t\tmodal.find('[name=\"date_start\"]').val(App.Fields.Date.dateToUserFormat(startDate, dateFormat));\n\t\tmodal.find('[name=\"due_date\"]').val(App.Fields.Date.dateToUserFormat(endDate, dateFormat));\n\t\tif (modal.find('.js-autofill').prop('checked') === true) {\n\t\t\tCalendar_Edit_Js.getInstance().getFreeTime(modal);\n\t\t} else {\n\t\t\tmodal.find('[name=\"time_start\"]').val(moment(startDate).format(defaultTimeFormat));\n\t\t\tmodal.find('[name=\"time_end\"]').val(moment(endDate).format(defaultTimeFormat));\n\t\t}\n\t}\n\t/**\n\t * Register events.\n\t */\n\tregisterEvents() {\n\t\tthis.registerFilters();\n\t\tthis.registerSidebarEvents();\n\t\tthis.renderCalendar();\n\t\tthis.registerButtonSelectAll();\n\t\tthis.registerAddButton();\n\t}\n};\n"],"names":["_class","_typeof","o","Symbol","iterator","constructor","prototype","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","descriptor","i","length","enumerable","configurable","writable","Object","defineProperty","_toPropertyKey","key","_createClass","protoProps","staticProps","_defineProperty","obj","value","arg","_toPrimitive","String","input","hint","prim","toPrimitive","res","call","Number","window","Calendar_Js","_this","container","arguments","$","readonly","browserHistory","calendarCreateView","calendarView","find","eventCreate","app","getMainParams","eventEdit","sidebarView","startHour","endHour","browserHistoryOptions","browserHistoryConfig","setBrowserHistoryOptions","calendarOptions","setCalendarOptions","eventTypeKeyName","module","getModuleName","event","on","reloadCalendarData","assign","setCalendarBasicOptions","setCalendarAdvancedOptions","setCalendarModuleOptions","eventLimit","userView","defaultView","moduleCacheGet","userTimeFormat","CONFIG","hourFormat","parseInt","hour","minute","hour12","meridiem","options","eventTimeFormat","slotLabelFormat","initialView","viewsNamesMap","forceEventDuration","defaultTimedEventDuration","dayMaxEvents","selectMirror","slotDuration","nowIndicator","scrollTime","s","App","Fields","Date","getDateInstance","e","initialDate","dateToDbFormat","_error","cacheClear","setCalendarMinimalOptions","_this2","hiddenDays","navLinks","firstDay","firstDayOfWeekNo","selectable","moreLinkContent","vtranslate","allDayText","noEventsText","buttonText","today","year","week","month","day","dayGridMonth","dayGridWeek","listWeek","dayGridDay","timeGridDay","list","buttonHints","prev","concat","next","viewHint","navLinkHint","_dateStr","zonedDate","dateToUserFormat","dayHeaderContent","width","daysTranslated","date","getUTCDay","fullDaysTranslated","_this3","self","editable","headerToolbar","left","center","right","allDaySlot","views","basic","titleFormat","args","formatDate","end","timeGridWeek","html","getDay","basicDay","type","eventDrop","updateEvent","eventResize","datesSet","dateInfo","trigger","loadCalendarData","eventContent","eventRenderer","height","setCalendarHeight","renderCalendar","fullCalendar","FullCalendar","Calendar","get","render","registerViewRenderEvents","getCalendarView","_this4","defaultParams","getDefaultParams","removeAllEvents","emptyFilters","progressInstance","progressIndicator","blockInfo","enabled","AppConnector","request","done","events","addEventSource","result","mode","users","userId","sideBar","getSidebarView","filters","params","action","start","view","activeStart","activeEnd","user","cvid","getCurrentCvId","each","name","element","attr","val","prop","push","_","data","cacheName","startDate","endDate","monthFormat","dateFormat","replace","fullMonthsTranslated","weekRange","endMonth","startDay","endYear","monthsTranslated","join","info","jQuery","id","DateTime","allDay","response","popoverCache","showNotify","text","revert","fail","display","extendedProps","icon","_def","title","_this5","defaultHeightValue","calendarPadding","hasClass","outerHeight","css","setCalendarH","offset","top","ResizeSensor","currentHeight","setOption","_this6","historyParams","keys","viewType","split","map","x","parsedValue","isNaN","time","forEach","moduleCacheSet","setMainParams","addEventListener","registerFilters","row","formContainer","registerUsersChange","Picklist","showSelect2ElementView","showNewScrollbar","suppressScrollX","registerFilterForm","registerSelectAll","addClass","findElementOnList","bind","cachedValue","allOptions","option","off","item","currentTarget","is","toLowerCase","closest","filter","trim","indexOf","removeClass","_this7","_this8","checkboxSelectAll","checkboxes","registerSidebarEvents","_this9","registerSelect2Event","tab","parent","_i","selectsElements","registerButtonSelectAll","selectAllLabel","deselectAllLabel","registerAddButton","_this10","getCalendarCreateView","Components","QuickCreate","showModal","callbackFunction","aDeferred","Deferred","resolve","promise","loadCalendarCreateView","hide","moduleName","getForm","textStatus","errorThrown","reject","selectDays","_this11","callbackPostShown","modal","selectCallbackCreateModal","setDate","getDate","startDateSplitted","endDateSplitted","setHours","toDateString","activityType","activityDurations","JSON","parse","minutes","activitytype","duration","setMinutes","getMinutes","timeFormat","dateField","timeField","defaultTimeFormat","Calendar_Edit_Js","getInstance","getFreeTime","moment","format","registerEvents","\"yyyy-mm-dd\"","\"mm-dd-yyyy\"","\"dd-mm-yyyy\"","\"yyyy.mm.dd\"","\"mm.dd.yyyy\"","\"dd.mm.yyyy\"","\"yyyy/mm/dd\"","\"mm/dd/yyyy\"","\"dd/mm/yyyy\"","basicWeek"],"mappings":";;AAAA,kKACA,YAAY,CAEZ,qCAAAA,IAAAA,MAAA,CAAAC,SAAAA,OAAAA,CAAAC,CAAA,CAAA,CAAA,yBAAA,CAAA,OAAAD,OAAA,CAAA,UAAA,EAAA,OAAAE,MAAA,EAAA,QAAA,EAAA,OAAAA,MAAA,CAAAC,QAAA,CAAA,SAAAF,CAAA,CAAA,CAAA,OAAA,OAAAA,CAAA,CAAA,CAAA,SAAAA,CAAA,CAAA,CAAA,OAAAA,CAAA,EAAA,UAAA,EAAA,OAAAC,MAAA,EAAAD,CAAA,CAAAG,WAAA,GAAAF,MAAA,EAAAD,CAAA,GAAAC,MAAA,CAAAG,SAAA,CAAAJ,QAAAA,CAAAA,OAAAA,CAAA,CAAAD,CAAAA,OAAA,CAAAC,CAAA,CAAAK,CAAAA,SAAAA,eAAAA,CAAAC,QAAA,CAAAC,WAAA,CAAA,CAAA,GAAA,EAAAD,QAAA,YAAAC,WAAA,CAAA,CAAA,MAAA,IAAAC,SAAA,CAAA,mCAAA,CAAA,CAAA,SAAAC,iBAAAC,CAAAA,MAAA,CAAAC,KAAA,CAAAC,CAAAA,IAAAA,IAAAA,UAAA,CAAAC,CAAA,CAAA,CAAA,CAAAA,CAAA,CAAA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