File manager - Edit - /home/web/vm-3fadc827.na4u.ru/www/bitrix/modules/calendar/install/js/calendar/eventeditform/dist/eventeditform.bundle.min.js
Back
this.BX=this.BX||{};(function(e,t,i,n,s,a,r,o,l,d,h){"use strict";var c=function(e){babelHelpers.inherits(n,e);function n(){babelHelpers.classCallCheck(this,n);return babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(n).apply(this,arguments))}babelHelpers.createClass(n,[{key:"create",value:function e(){this.DOM.dateTimeWrap=this.DOM.outerContent.querySelector("#".concat(this.UID,"_datetime_container"));this.DOM.fromDate=this.DOM.outerContent.querySelector("#".concat(this.UID,"_date_from"));this.DOM.toDate=this.DOM.outerContent.querySelector("#".concat(this.UID,"_date_to"));this.DOM.fromTime=this.DOM.outerContent.querySelector("#".concat(this.UID,"_time_from"));this.DOM.toTime=this.DOM.outerContent.querySelector("#".concat(this.UID,"_time_to"));this.fromTimeControl=new i.TimeSelector({input:this.DOM.fromTime,onChangeCallback:this.handleTimeFromChange.bind(this)});this.toTimeControl=new i.TimeSelector({input:this.DOM.toTime,onChangeCallback:this.handleTimeToChange.bind(this)});this.DOM.fullDay=this.DOM.outerContent.querySelector("#".concat(this.UID,"_date_full_day"));this.DOM.defTimezoneWrap=this.DOM.outerContent.querySelector("#".concat(this.UID,"_timezone_default_wrap"));this.DOM.defTimezone=this.DOM.outerContent.querySelector("#".concat(this.UID,"_timezone_default"));this.DOM.fromTz=this.DOM.outerContent.querySelector("#".concat(this.UID,"_timezone_from"));this.DOM.toTz=this.DOM.outerContent.querySelector("#".concat(this.UID,"_timezone_to"));this.DOM.tzButton=this.DOM.outerContent.querySelector("#".concat(this.UID,"_timezone_btn"));this.DOM.tzOuterCont=this.DOM.outerContent.querySelector("#".concat(this.UID,"_timezone_wrap"));this.DOM.tzCont=this.DOM.outerContent.querySelector("#".concat(this.UID,"_timezone_inner_wrap"));this.DOM.outerContent.querySelector("#".concat(this.UID,"_timezone_hint")).title=t.Loc.getMessage("EC_EVENT_TZ_HINT");this.DOM.outerContent.querySelector("#".concat(this.UID,"_timezone_default_hint")).title=t.Loc.getMessage("EC_EVENT_TZ_DEF_HINT");this.prepareModel();this.bindEventHandlers()}},{key:"prepareModel",value:function e(){t.Dom.adjust(this.DOM.fromDate,{props:{autocomplete:"off"}});t.Dom.adjust(this.DOM.toDate,{props:{autocomplete:"off"}});t.Dom.adjust(this.DOM.fromTime,{props:{autocomplete:"off"}});t.Dom.adjust(this.DOM.toTime,{props:{autocomplete:"off"}})}}]);return n}(i.DateTimeControl);var u,f,p,m,y,D,g,v,C,E;var S=function(){function e(){var i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};babelHelpers.classCallCheck(this,e);babelHelpers.defineProperty(this,"DOM",{});babelHelpers.defineProperty(this,"uid",null);babelHelpers.defineProperty(this,"sliderId","calendar:edit-entry-slider");babelHelpers.defineProperty(this,"zIndex",3100);babelHelpers.defineProperty(this,"denyClose",false);babelHelpers.defineProperty(this,"formType","slider_main");babelHelpers.defineProperty(this,"STATE",{READY:1,REQUEST:2,ERROR:3});babelHelpers.defineProperty(this,"sections",[]);babelHelpers.defineProperty(this,"sectionIndex",{});babelHelpers.defineProperty(this,"trackingUsersList",[]);babelHelpers.defineProperty(this,"userSettings",{});babelHelpers.defineProperty(this,"prevUserList",[]);babelHelpers.defineProperty(this,"loadedAccessibilityData",{});this.name=i.name||"eventeditform";this.type=i.type||"user";this.isLocationCalendar=i.isLocationCalendar||false;this.locationAccess=i.locationAccess||false;this.locationCapacity=i.locationCapacity||0;this.dayOfWeekMonthFormat=i.dayOfWeekMonthFormat||false;this.roomsManager=i.roomsManager||null;this.userId=i.userId||parseInt(t.Loc.getMessage("USER_ID"));this.ownerId=i.ownerId;this.entryId=parseInt(i.entryId)||null;this.entry=i.entry||null;this.formDataValue=i.formDataValue||{};this.emitter=new r.EventEmitter;this.emitter.setEventNamespace("BX.Calendar.EventEditForm");this.BX=n.Util.getBX();this.formSettings={pinnedFields:{}};if(!this.ownerId&&this.type==="user"){this.ownerId=this.userId}if(t.Type.isDate(i.entryDateFrom)&&!this.formDataValue.from){this.formDataValue.from=i.entryDateFrom;this.formDataValue.to=new Date(i.entryDateFrom.getTime()+3600)}this.participantsEntityList=t.Type.isArray(i.participantsEntityList)?i.participantsEntityList:[];this.participantsSelectorEntityList=t.Type.isArray(i.participantsSelectorEntityList)?i.participantsSelectorEntityList:[];if(i.entryName&&!this.entryId){this.formDataValue.name=i.entryName}if(i.entryDescription&&!this.entryId){this.formDataValue.description=i.entryDescription}this.refreshPlanner=t.Runtime.debounce(this.refreshPlannerState,100,this);this.state=this.STATE.READY;this.sliderOnClose=this.hide.bind(this);this.handlePullBind=this.handlePull.bind(this);this.keyHandlerBind=this.keyHandler.bind(this)}babelHelpers.createClass(e,[{key:"initInSlider",value:function e(i,n){this.sliderId=i.getUrl();this.BX.addCustomEvent(i,"SidePanel.Slider:onLoad",this.onLoadSlider.bind(this));this.BX.addCustomEvent(i,"SidePanel.Slider:onClose",this.sliderOnClose);this.BX.addCustomEvent(i,"SidePanel.Slider:onBeforeCloseComplete",this.destroy.bind(this));this.setCurrentEntry(this.entry||null);this.createContent(i).then(function(e){if(t.Type.isFunction(n)){n(e)}}.bind(this));this.opened=true;this.bindEventHandlers()}},{key:"show",value:function e(){var i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.setCurrentEntry(i.entry);if(i.formType){this.formType=i.formType}this.BX.SidePanel.Instance.open(this.sliderId,{contentCallback:this.createContent.bind(this),label:{text:t.Loc.getMessage("CALENDAR_EVENT"),bgColor:"#55D0E0"},events:{onClose:this.sliderOnClose,onCloseComplete:this.destroy.bind(this),onLoad:this.onLoadSlider.bind(this)}});this.opened=true;this.bindEventHandlers()}},{key:"isOpened",value:function e(){return this.opened}},{key:"bindEventHandlers",value:function e(){var i=this;t.Event.bind(document,"keydown",this.keyHandlerBind);r.EventEmitter.subscribe("onPullEvent-calendar",this.handlePullBind);this.mouseUpNodeCheck=null;t.Event.bind(document,"mousedown",(function(e){i.mousedownTarget=e.target||e.srcElement}));t.Event.bind(document,"mouseup",(function(e){var t=e.target||e.srcElement;if(i.mousedownTarget!==t){i.mouseUpNodeCheck=false}setTimeout((function(){i.mouseUpNodeCheck=null}),0)}));this.BX.addCustomEvent(window,"onCalendarControlChildPopupShown",this.BX.proxy(this.denySliderClose,this));this.BX.addCustomEvent(window,"onCalendarControlChildPopupClosed",this.BX.proxy(this.allowSliderClose,this))}},{key:"onLoadSlider",value:function e(t){this.slider=t.getSlider();this.DOM.content=this.slider.layout.content;this.sliderId=this.slider.getUrl();this.BX.html(this.slider.layout.content,this.slider.getData().get("sliderContent"));this.initControls(this.uid);this.setFormValues()}},{key:"close",value:function e(){if(!this.checkDenyClose()){this.state=this.STATE.READY;this.BX.SidePanel.Instance.close()}}},{key:"save",value:function e(){var a=this;var o=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(this.state===this.STATE.REQUEST){return false}o=t.Type.isPlainObject(o)?o:{};if(!this.entry.id&&this.hasExternalEmailUsers()&&n.Util.checkEmailLimitationPopup()&&!o.emailLimitationDialogShown){s.EntryManager.showEmailLimitationDialog({callback:function e(){o.emailLimitationDialogShown=true;a.save(o)}});return false}if(!this.userSettings.sendFromEmail&&this.hasExternalEmailUsers()){s.EntryManager.showConfirmedEmailDialog({callback:function e(t){if(t.sendFromEmail){a.userSettings.sendFromEmail=t.sendFromEmail}a.save(o)}});return false}if(this.entry.id&&this.entry.isRecursive()&&!o.confirmed&&this.getFormDataChanges(["section","notify"]).length>0){s.EntryManager.showConfirmEditDialog({callback:function e(t){a.save({recursionMode:t.recursionMode,confirmed:true})}});return false}if(this.entry.id&&this.entry.isMeeting()&&o.sendInvitesAgain===undefined&&this.getFormDataChanges().includes("date&time")&&this.entry.getAttendees().find((function(e){return e.STATUS==="N"}))){s.EntryManager.showReInviteUsersDialog({callback:function e(t){o.sendInvitesAgain=t.sendInvitesAgain;a.save(o)}});return false}t.Dom.addClass(this.DOM.saveBtn,this.BX.UI.Button.State.CLOCKING);t.Dom.addClass(this.DOM.closeBtn,this.BX.UI.Button.State.DISABLED);this.state=this.STATE.REQUEST;this.DOM.form.id.value=this.entry.id||0;this.DOM.form.location.value=this.locationSelector.getTextValue();if(this.editor){this.editor.SaveContent()}var l=this.getCurrentSection();if(l){if(l.COLOR.toLowerCase()!==this.colorSelector.getValue().toLowerCase()){this.DOM.form.color.value=this.colorSelector.getValue()}}this.DOM.form.current_date_from.value=o.recursionMode?n.Util.formatDate(this.entry.from):"";this.DOM.form.rec_edit_mode.value=o.recursionMode||"";if(o.sendInvitesAgain!==undefined){this.DOM.form.appendChild(t.Tag.render(u||(u=babelHelpers.taggedTemplateLiteral(['<input name="sendInvitesAgain" type="hidden" value="','">'])),o.sendInvitesAgain?"Y":"N"))}if(!this.DOM.form.requestUid){this.DOM.requestUid=this.DOM.form.appendChild(t.Tag.render(f||(f=babelHelpers.taggedTemplateLiteral(['<input name="requestUid" type="hidden">']))))}if(!this.DOM.form.meeting_host){this.DOM.meeting_host=this.DOM.form.appendChild(t.Tag.render(p||(p=babelHelpers.taggedTemplateLiteral(['<input type="hidden" name="meeting_host" value="','">'])),this.entry.data.MEETING_HOST||"0"))}if(!this.DOM.form.chat_id){this.DOM.chat_id=this.DOM.form.appendChild(t.Tag.render(m||(m=babelHelpers.taggedTemplateLiteral(['<input type="hidden" name="chat_id" value="','">'])),this.entry.data.MEETING?this.entry.data.MEETING.CHAT_ID:0))}this.DOM.requestUid.value=n.Util.registerRequestId();var h=this.getUserSelectorEntityList();t.Dom.clean(this.DOM.userSelectorValueWarp);h.forEach((function(e,i){a.DOM.userSelectorValueWarp.appendChild(t.Tag.render(y||(y=babelHelpers.taggedTemplateLiteral(['\n\t\t\t\t<input type="hidden" name="attendeesEntityList[','][entityId]" value="','">\n\t\t\t'])),i,e.entityId));a.DOM.userSelectorValueWarp.appendChild(t.Tag.render(D||(D=babelHelpers.taggedTemplateLiteral(['\n\t\t\t\t<input type="hidden" name="attendeesEntityList[','][id]" value="','">\n\t\t\t'])),i,e.id))}));var c=!this.entry.id||this.checkCurrentUsersAccessibility();if(!c&&this.getFormDataChanges().includes("codes")){var C=this.entry.getAttendeesEntityList();h.forEach((function(e){if(!C.find((function(t){return e.entityId===t.entityId&&parseInt(e.id)===parseInt(t.id)}))){if(e.entityId==="user"){a.DOM.userSelectorValueWarp.appendChild(t.Tag.render(g||(g=babelHelpers.taggedTemplateLiteral(['\n\t\t\t\t\t\t\t<input type="hidden" name="newAttendeesList[]" value="','">\n\t\t\t\t\t\t'])),parseInt(e.id)))}else{c=true}}}))}this.DOM.userSelectorValueWarp.appendChild(t.Tag.render(v||(v=babelHelpers.taggedTemplateLiteral(['\n\t\t\t<input type="hidden" name="checkCurrentUsersAccessibility" value="','">\n\t\t'])),c?"Y":"N"));this.BX.ajax.runAction("calendar.api.calendarentryajax.editEntry",{data:new FormData(this.DOM.form),analyticsLabel:{calendarAction:this.entry.id?"edit_event":"create_event",formType:"full",emailGuests:this.hasExternalEmailUsers()?"Y":"N",markView:n.Util.getCurrentView()||"outside",markCrm:this.DOM.form["UF_CRM_CAL_EVENT[]"]&&this.DOM.form["UF_CRM_CAL_EVENT[]"].value?"Y":"N",markRrule:this.repeatSelector.getType(),markMeeting:this.entry.isMeeting()?"Y":"N",markType:this.type}}).then((function(e){if(a.isLocationCalendar){a.roomsManager.unsetHiddenRoom(i.Location.parseStringValue(a.DOM.form.location.value).room_id)}a.state=a.STATE.READY;a.allowSliderClose();a.close();t.Dom.removeClass(a.DOM.closeBtn,a.BX.UI.Button.State.DISABLED);t.Dom.removeClass(a.DOM.saveBtn,a.BX.UI.Button.State.CLOCKING);if(e.data.entryId){if(a.entry.id){s.EntryManager.showEditEntryNotification(e.data.entryId)}else{s.EntryManager.showNewEntryNotification(e.data.entryId)}}if(e.data.displayMobileBanner){(new d.MobileSyncBanner).showInPopup()}if(e.data.countEventWithEmailGuestAmount){n.Util.setEventWithEmailGuestAmount(e.data.countEventWithEmailGuestAmount)}if(t.Type.isArray(e.data.eventList)&&e.data.eventList.length&&e.data.eventList[0].REMIND&&e.data.eventList[0].REMIND.length){s.EntryManager.setNewEntryReminders(e.data.eventList[0].DT_SKIP_TIME==="Y"?"fullDay":"withTime",e.data.eventList[0].REMIND)}a.emitter.emit("onSave",new r.BaseEvent({data:{responseData:e.data,options:o}}));r.EventEmitter.emit("BX.Calendar:onEntrySave",new r.BaseEvent({data:{sliderId:a.sliderId,responseData:e.data,options:o}}))}),(function(e){t.Dom.removeClass(a.DOM.saveBtn,a.BX.UI.Button.State.CLOCKING);t.Dom.removeClass(a.DOM.closeBtn,a.BX.UI.Button.State.DISABLED);if(e.data&&t.Type.isPlainObject(e.data.busyUsersList)){a.handleBusyUsersError(e.data.busyUsersList);var i=[];e.errors.forEach((function(e){if(e.code!=="edit_entry_user_busy"){i.push(e)}}));e.errors=i}if(e.errors&&e.errors.length){a.showError(e.errors)}a.state=a.STATE.ERROR}));return true}},{key:"handleBusyUsersError",value:function e(t){var n=this;var s=[],a=[];for(var r in t){if(t.hasOwnProperty(r)){s.push(t[r]);a.push(r)}}this.busyUsersDialog=new i.BusyUsersDialog;this.busyUsersDialog.subscribe("onSaveWithout",(function(){n.DOM.form.exclude_users.value=a.join(",");n.save()}));this.busyUsersDialog.show({users:s})}},{key:"clientSideCheck",value:function e(){}},{key:"hide",value:function e(t){if(t&&t.getSlider&&t.getSlider().getUrl()===this.sliderId){if(this.checkDenyClose()){t.denyAction()}else{this.BX.removeCustomEvent("SidePanel.Slider::onClose",this.sliderOnClose);if(this.attendeesSelector)this.attendeesSelector.closeAll();this.destroy(t)}}}},{key:"destroy",value:function e(s){if(s&&s.getSliderPage&&s.getSliderPage().getUrl()===this.sliderId){this.BX.onCustomEvent("OnCalendarPlannerDoUninstall",[{plannerId:this.plannerId}]);t.Event.unbind(document,"keydown",this.keyHandlerBind);r.EventEmitter.unsubscribe("onPullEvent-calendar",this.handlePullBind);this.BX.SidePanel.Instance.destroy(this.sliderId);if(i.Location){i.Location.setCurrentCapacity(0)}n.Util.closeAllPopups();this.planner=null;this.opened=false;n.Util.clearPlannerWatches()}}},{key:"createContent",value:function e(i){var s=this;var r=new this.BX.Promise;var o=this.getCurrentEntry();this.BX.ajax.runAction("calendar.api.calendarajax.getEditEventSlider",{data:{event_id:this.entryId||o.id,date_from:o?n.Util.formatDate(o.from):"",form_type:this.formType,type:this.type,ownerId:this.ownerId,entityList:this.participantsEntityList}}).then((function(e){if(t.Type.isFunction(i.isOpen)&&i.isOpen()||i.isOpen===true){var l=s.BX.util.trim(e.data.html);i.getData().set("sliderContent",l);var d=e.data.additionalParams;s.uid=d.uniqueId;s.editorId=d.editorId;s.formSettings=s.getSettings(d.formSettings||[]);var h=s.formDataValue.attendeesEntityList||d.attendeesEntityList||[];if(!o.id&&s.participantsEntityList.length){h=s.participantsEntityList}if(t.Type.isArray(h)){h.forEach((function(e){if(e.entityId==="user"&&d.userIndex[e.id]){e.entityType=d.userIndex[e.id].EMAIL_USER?"email":"employee"}}))}s.setUserSelectorEntityList(h);s.attendeesPreselectedItems=s.getUserSelectorEntityList().map((function(e){return[e.entityId,e.id]}));s.setUserSettings(d.userSettings);n.Util.setEventWithEmailGuestAmount(d.countEventWithEmailGuestAmount);n.Util.setEventWithEmailGuestLimit(d.eventWithEmailGuestLimit);s.handleSections(d.sections,d.trackingUsersList);s.handleLocationData(d.locationFeatureEnabled,d.locationList,d.iblockMeetingRoomList);s.locationAccess=d.locationAccess;s.dayOfWeekMonthFormat=d.dayOfWeekMonthFormat;s.plannerFeatureEnabled=!!d.plannerFeatureEnabled;if(s.planner&&!s.plannerFeatureEnabled){s.planner.lock()}if(!o.id&&!o.sectionId){s.setCurrentEntry()}s.updateEntryData(d.entry,{userSettings:s.userSettings});var c=s.type+s.ownerId;if(s.userSettings.defaultSections&&s.userSettings.defaultSections[c]){a.SectionManager.setNewEntrySectionId(s.userSettings.defaultSections[c])}r.fulfill(l)}}),(function(e){}));return r}},{key:"initControls",value:function e(i){this.DOM.title=this.DOM.content.querySelector("#".concat(i,"_title"));this.DOM.formWrap=this.DOM.content.querySelector("#".concat(i,"_form_wrap"));this.DOM.form=this.DOM.content.querySelector("#".concat(i,"_form"));this.DOM.buttonsWrap=this.DOM.content.querySelector(".calendar-form-buttons-fixed");this.DOM.saveBtn=this.DOM.buttonsWrap.querySelector("#".concat(i,"_save"));this.DOM.closeBtn=this.DOM.buttonsWrap.querySelector("#".concat(i,"_close"));t.Event.bind(this.DOM.saveBtn,"click",this.save.bind(this));t.Event.bind(this.DOM.closeBtn,"click",this.close.bind(this));this.initFormFieldManager(i);this.initDateTimeControl(i);this.initNameControl(i);this.initEditorControl(i);this.initAttendeesControl();this.initPlanner(i);this.initReminderControl(i);this.initSectionSelector(i);this.initLocationControl(i);this.initRepeatRuleControl(i);this.initColorControl(i);this.initCrmUfControl(i);this.initAdditionalControls(i);this.checkLastItemBorder();if(this.DOM.buttonsWrap){BX.ZIndexManager.register(this.DOM.buttonsWrap)}}},{key:"updateEntryData",value:function e(i){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(this.entry instanceof s.Entry){var a=n.userSettings||{};if(t.Type.isPlainObject(i)){this.entry.prepareData(i)}else{if(!this.entry.getTimezoneFrom()||this.entry.getTimezoneTo()){this.entry.setTimezone(a.timezoneName||a.timezoneDefaultName||null)}}}}},{key:"handleSections",value:function e(i,n){var s=this;this.sections=i;this.sectionIndex={};this.trackingUsersList=n||[];if(t.Type.isArray(i)){i.forEach((function(e,t){s.sectionIndex[parseInt(e.ID)]=t}),this)}}},{key:"handleLocationData",value:function e(t,n,s){this.locationFeatureEnabled=!!t;this.locationList=n||[];this.iblockMeetingRoomList=s||[];i.Location.setLocationList(n);i.Location.setMeetingRoomList(s)}},{key:"setUserSettings",value:function e(t){this.userSettings=t;n.Util.setUserSettings(t)}},{key:"setFormValues",value:function e(){var i=this;var s=this.entry;this.dateTimeControl.setValue({from:this.formDataValue.from||s.from,to:this.formDataValue.to||s.to,fullDay:t.Type.isBoolean(this.formDataValue.fullDay)?this.formDataValue.fullDay:s.fullDay,timezoneFrom:s.getTimezoneFrom()||"",timezoneTo:s.getTimezoneTo()||"",timezoneName:this.userSettings.timezoneName});this.DOM.entryName.value=this.formDataValue.name||s.getName();if(this.formDataValue.section){s.sectionId=parseInt(this.formDataValue.section)}this.DOM.sectionInput.value=this.getCurrentSectionId();this.sectionSelector.updateValue();if(!this.fieldIsPinned("section")){var a=this.getCurrentSection();if(a["CAL_TYPE"]!==this.type||a["CAL_TYPE"]===this.type&&parseInt(a["OWNER_ID"])!==this.ownerId){this.pinField("section")}}this.colorSelector.setValue(this.formDataValue.color||s.getColor()||this.getCurrentSection().COLOR);this.remindersControl.setValue(this.formDataValue.reminder||s.getReminders(),true,false);this.repeatSelector.setValue(this.formDataValue.rrule||s.getRrule());if(this.DOM.accessibilityInput){this.DOM.accessibilityInput.value=s.accessibility}if(this.locationSelector){this.locationSelector.setValue(this.formDataValue.location||this.locationSelector["default"]||s.getLocation());this.locationSelector.checkLocationAccessibility({from:this.formDataValue.from||s.from,to:this.formDataValue.to||s.to,fullDay:t.Type.isBoolean(this.formDataValue.fullDay)?this.formDataValue.fullDay:s.fullDay,currentEventId:this.entry.id})}if(this.DOM.privateEventCheckbox){this.DOM.privateEventCheckbox.checked=s["private"]}if(this.DOM.importantEventCheckbox){this.DOM.importantEventCheckbox.checked=s.important}if(this.DOM.form.meeting_notify){if(this.formDataValue.meetingNotify!==undefined){this.DOM.form.meeting_notify.checked=this.formDataValue.meetingNotify}if(this.entry.data&&this.entry.data.MEETING){this.DOM.form.meeting_notify.checked=this.entry.data.MEETING.NOTIFY}else{this.DOM.form.meeting_notify.checked=true}}if(this.DOM.form.hide_guests){if(this.formDataValue.hideGuests!==undefined){this.DOM.form.hide_guests.checked=this.formDataValue.hideGuests==="Y"}else if(this.entry.data&&this.entry.data.MEETING){this.DOM.form.hide_guests.checked=this.entry.data.MEETING.HIDE_GUESTS}else{this.DOM.form.hide_guests.checked=true}}if(this.DOM.form.allow_invite){if(this.entry.data){this.DOM.form.allow_invite.checked=this.entry.data.MEETING&&this.entry.data.MEETING.ALLOW_INVITE}else{this.DOM.form.allow_invite.checked=this.entry.allowInvite}}this.loadPlannerData({entityList:this.getUserSelectorEntityList(),from:n.Util.formatDate(s.from.getTime()-n.Util.getDayLength()*3),to:n.Util.formatDate(s.to.getTime()+n.Util.getDayLength()*10),timezone:s.getTimezoneFrom(),location:this.locationSelector.getTextValue()}).then((function(){if(i.hasExternalEmailUsers()){i.showHideGuestsOption()}else{i.hideHideGuestsOption()}}))}},{key:"switchFullDay",value:function e(i){i=!!this.DOM.fullDay.checked;if(i&&t.Type.isString(this.userSettings.timezoneName)&&(!this.DOM.fromTz.value||!this.DOM.toTz.value)){this.DOM.fromTz.value=this.userSettings.timezoneName;this.DOM.toTz.value=this.userSettings.timezoneName;this.DOM.defTimezone.value=this.userSettings.timezoneName}if(i){t.Dom.addClass(this.DOM.dateTimeWrap,"calendar-options-item-datetime-hide-time")}else{t.Dom.removeClass(this.DOM.dateTimeWrap,"calendar-options-item-datetime-hide-time")}if(this.remindersControl){this.remindersControl.setFullDayMode(i)}this.refreshPlanner()}},{key:"switchTimezone",value:function e(){if(t.Dom.hasClass(this.DOM.tzCont,"calendar-options-timezone-collapse")){t.Dom.addClass(this.DOM.tzCont,"calendar-options-timezone-expand");t.Dom.removeClass(this.DOM.tzCont,"calendar-options-timezone-collapse")}else{t.Dom.addClass(this.DOM.tzCont,"calendar-options-timezone-collapse");t.Dom.removeClass(this.DOM.tzCont,"calendar-options-timezone-expand")}}},{key:"initFormFieldManager",value:function e(i){var n=this;this.DOM.mainBlock=this.DOM.content.querySelector("#".concat(i,"_main_block_wrap"));this.DOM.additionalBlockWrap=this.DOM.content.querySelector("#".concat(i,"_additional_block_wrap"));this.DOM.additionalBlock=this.DOM.content.querySelector("#".concat(i,"_additional_block"));this.DOM.pinnedNamesWrap=this.DOM.content.querySelector("#".concat(i,"_additional_pinned_names"));this.DOM.additionalSwitch=this.DOM.content.querySelector("#".concat(i,"_additional_switch"));if(this.isLocationCalendar&&!this.fieldIsPinned("location")){this.pinField("location")}t.Event.bind(this.DOM.additionalSwitch,"click",(function(){t.Dom.toggleClass(n.DOM.additionalSwitch,"opened");t.Dom.toggleClass(n.DOM.additionalBlock,"invisible")}));t.Event.bind(this.DOM.formWrap,"click",(function(e){var t=e.target||e.srcElement;if(t&&t.getAttribute&&t.getAttribute("data-bx-fixfield")){var i=t.getAttribute("data-bx-fixfield");if(!n.fieldIsPinned(i)){n.pinField(i)}else{n.unPinField(i)}}}))}},{key:"initDateTimeControl",value:function e(t){var i=this;this.dateTimeControl=new c(t,{showTimezone:true,outerContent:this.DOM.content});this.dateTimeControl.subscribe("onChange",(function(e){if(e instanceof r.BaseEvent){var t=e.getData().value;if(i.remindersControl){i.remindersControl.setFullDayMode(t.fullDay);if(!i.entry.id&&!i.remindersControl.wasChangedByUser()){var n=s.EntryManager.getNewEntryReminders(t.fullDay?"fullDay":"withTime");i.remindersControl.setValue(n,true,false)}}if(i.planner){i.planner.updateSelector(t.from,t.to,t.fullDay)}if(i.locationSelector){i.locationSelector.checkLocationAccessibility({from:t.from,to:t.to,fullDay:t.fullDay,currentEventId:i.entry.id})}}}))}},{key:"initNameControl",value:function e(t){var i=this;this.DOM.entryName=this.DOM.content.querySelector("#".concat(t,"_entry_name"));setTimeout((function(){i.DOM.entryName.focus();i.DOM.entryName.select()}),500)}},{key:"initReminderControl",value:function e(n){var s=this;this.reminderValues=[];this.DOM.reminderWrap=this.DOM.content.querySelector("#".concat(n,"_reminder"));this.DOM.reminderInputsWrap=this.DOM.reminderWrap.appendChild(t.Tag.render(C||(C=babelHelpers.taggedTemplateLiteral(["<span></span>"]))));this.remindersControl=new i.Reminder({wrap:this.DOM.reminderWrap,zIndex:this.zIndex});this.remindersControl.subscribe("onChange",(function(e){if(e instanceof r.BaseEvent){s.reminderValues=e.getData().values;t.Dom.clean(s.DOM.reminderInputsWrap);s.reminderValues.forEach((function(e){s.DOM.reminderInputsWrap.appendChild(t.Dom.create("INPUT",{props:{name:"reminder[]",type:"hidden"},attrs:{value:e}}))}))}}))}},{key:"initSectionSelector",value:function e(t){var n=this;this.DOM.sectionInput=this.DOM.content.querySelector("#".concat(t,"_section"));this.sectionSelector=new i.SectionSelector({outerWrap:this.DOM.content.querySelector("#".concat(t,"_section_wrap")),defaultCalendarType:this.type,defaultOwnerId:this.ownerId,sectionList:this.sections,sectionGroupList:a.SectionManager.getSectionGroupList({type:this.type||"user",ownerId:this.ownerId||this.userId,userId:this.userId,trackingUsersList:this.trackingUsersList}),mode:"full",zIndex:this.zIndex,getCurrentSection:function e(){var t=n.getCurrentSection();if(t){return{id:t.ID,name:t.NAME,color:t.COLOR}}return false},selectCallback:function e(t){if(t){n.DOM.sectionInput.value=t.id;if(n.colorSelector){n.colorSelector.setValue(t.color)}n.entry.setSectionId(t.id);a.SectionManager.saveDefaultSectionId(t.id,{calendarType:n.type,ownerId:n.ownerId,userId:n.userId,sections:n.sections})}}})}},{key:"initEditorControl",value:function e(t){if(!window["BXHtmlEditor"]){return setTimeout(BX.delegate(this.initEditorControl,this),50)}this.editor=null;if(window["BXHtmlEditor"]){this.editor=window["BXHtmlEditor"].Get(this.editorId)}if(!this.editor&&top["BXHtmlEditor"]&&top["BXHtmlEditor"]!==window["BXHtmlEditor"]){this.editor=top["BXHtmlEditor"].Get(this.editorId)}if(this.editor&&this.editor.IsShown()){this.customizeHtmlEditor();if(this.formDataValue.description){this.editor.SetContent(this.formDataValue.description)}}else{this.BX.addCustomEvent(window["BXHtmlEditor"],"OnEditorCreated",function(e){if(e.id===this.editorId){this.editor=e;this.customizeHtmlEditor();if(this.formDataValue.description){this.editor.SetContent(this.formDataValue.description)}}}.bind(this))}}},{key:"customizeHtmlEditor",value:function e(){var i=this.editor;if(i.toolbar&&i.toolbar.controls&&i.toolbar.controls.spoiler){t.Dom.remove(i.toolbar.controls.spoiler.pCont)}}},{key:"initLocationControl",value:function e(t){this.DOM.locationWrap=this.DOM.content.querySelector("#".concat(t,"_location_wrap"));this.DOM.locationInput=this.DOM.content.querySelector("#".concat(t,"_location"));this.locationSelector=new i.Location({inputName:"lo_cation",wrap:this.DOM.locationWrap,richLocationEnabled:this.locationFeatureEnabled,locationList:this.locationList||[],roomsManager:this.roomsManager||null,locationAccess:this.locationAccess||false,iblockMeetingRoomList:this.iblockMeetingRoomList,onChangeCallback:this.refreshPlanner})}},{key:"initRepeatRuleControl",value:function e(t){var n=this;this.DOM.rruleWrap=this.DOM.content.querySelector("#".concat(t,"_rrule_wrap"));this.repeatSelector=new i.RepeatSelector({wrap:this.DOM.rruleWrap,rruleType:this.DOM.content.querySelector("#".concat(t,"_rrule_type")),getDate:function(){return this.dateTimeControl.getValue().from}.bind(this)});this.dateTimeControl.subscribe("onChange",(function(){if(n.repeatSelector.getType()==="weekly"){n.repeatSelector.changeType(n.repeatSelector.getType())}}))}},{key:"initAttendeesControl",value:function e(){this.DOM.userSelectorWrap=this.DOM.content.querySelector(".calendar-attendees-selector-wrap");this.DOM.userSelectorValueWarp=this.DOM.userSelectorWrap.appendChild(t.Tag.render(E||(E=babelHelpers.taggedTemplateLiteral(["<div></div>"]))));this.userTagSelector=new l.TagSelector({dialogOptions:{context:"CALENDAR",preselectedItems:this.attendeesPreselectedItems||[],zIndex:this.slider.zIndex,events:{"Item:onSelect":this.handleUserSelectorChanges.bind(this),"Item:onDeselect":this.handleUserSelectorChanges.bind(this)},entities:this.getParticipantsSelectorEntityList(),searchTabOptions:{stubOptions:{title:t.Loc.getMessage("EC_USER_DIALOG_404_TITLE"),subtitle:t.Loc.getMessage("EC_USER_DIALOG_404_SUBTITLE"),icon:"/bitrix/images/calendar/search-email.svg",iconOpacity:100,arrow:true}}}});this.userTagSelector.renderTo(this.DOM.userSelectorWrap);this.DOM.hideGuestsWrap=this.DOM.content.querySelector(".calendar-hide-members-wrap")}},{key:"handleUserSelectorChanges",value:function e(){if(this.planner){this.planner.show();this.planner.showLoader();var t=this.userTagSelector.getDialog().getSelectedItems();this.setUserSelectorEntityList(t.map((function(e){return{entityId:e.entityId,id:e.id,entityType:e.entityType}})));this.refreshPlanner()}}},{key:"hasExternalEmailUsers",value:function e(){return!!this.getUserSelectorEntityList().find((function(e){return e.entityType==="email"}))}},{key:"showHideGuestsOption",value:function e(){this.DOM.hideGuestsWrap.style.display="";n.Util.initHintNode(this.DOM.hideGuestsWrap.querySelector(".calendar-hide-members-helper"))}},{key:"hideHideGuestsOption",value:function e(){this.DOM.hideGuestsWrap.style.display="none"}},{key:"setHideGuestsValue",value:function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;this.hideGuests=t}},{key:"initPlanner",value:function e(t){this.DOM.plannerOuterWrap=this.DOM.content.querySelector("#".concat(t,"_planner_outer_wrap"));this.planner=new o.Planner({wrap:this.DOM.plannerOuterWrap,minWidth:parseInt(this.DOM.plannerOuterWrap.offsetWidth),dayOfWeekMonthFormat:this.dayOfWeekMonthFormat,locked:!this.plannerFeatureEnabled});this.planner.subscribe("onDateChange",this.handlePlannerSelectorChanges.bind(this));this.planner.subscribe("onExpandTimeline",this.handleExpandPlannerTimeline.bind(this));this.planner.subscribe("onDisplayAttendees",this.checkLocationForm.bind(this));this.planner.show();this.planner.showLoader()}},{key:"loadPlannerData",value:function e(){var i=this;var n=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.planner.showLoader();return new Promise((function(e){i.BX.ajax.runAction("calendar.api.calendarajax.updatePlanner",{data:{entryId:i.entry.id||0,entryLocation:i.entry.data.LOCATION||"",ownerId:i.ownerId,type:i.type,entityList:n.entityList||[],dateFrom:n.from||"",dateTo:n.to||"",timezone:n.timezone||"",location:n.location||"",prevUserList:i.prevUserList}}).then((function(s){if(i.planner){for(var a in s.data.accessibility){if(s.data.accessibility.hasOwnProperty(a)){i.loadedAccessibilityData[a]=s.data.accessibility[a]}}if(t.Type.isArray(s.data.entries)){s.data.entries.forEach((function(e){if(e.type==="user"&&!i.prevUserList.includes(parseInt(e.id))){i.prevUserList.push(parseInt(e.id))}}))}i.planner.hideLoader();var r=i.dateTimeControl.getValue();i.planner.update(s.data.entries,i.loadedAccessibilityData);i.planner.updateSelector(r.from,r.to,r.fullDay,{focus:n.focusSelector!==false})}if(i.hasExternalEmailUsers()){i.showHideGuestsOption()}else{i.hideHideGuestsOption()}e(s)}),(function(t){e(t)}))}))}},{key:"initAdditionalControls",value:function e(t){this.DOM.accessibilityInput=this.DOM.content.querySelector("#".concat(t,"_accessibility"));this.DOM.privateEventCheckbox=this.DOM.content.querySelector("#".concat(t,"_private"));this.DOM.importantEventCheckbox=this.DOM.content.querySelector("#".concat(t,"_important"))}},{key:"initColorControl",value:function e(t){this.DOM.colorWrap=this.DOM.content.querySelector("#".concat(t,"_color_selector_wrap"));this.colorSelector=new i.ColorSelector({wrap:this.DOM.colorWrap})}},{key:"initCrmUfControl",value:function e(i){this.DOM.crmUfWrap=BX(i+"-uf-crm-wrap");if(this.DOM.crmUfWrap){var s=this.getCurrentEntry();var a=this.DOM.crmUfWrap.appendChild(t.Dom.adjust(n.Util.getLoader(50),{style:{height:"40px",width:"40px"}}));setTimeout(function(){this.BX.ajax.runAction("calendar.api.calendarajax.getCrmUserfield",{data:{event_id:s&&s.id?s.id:0}}).then(function(e){if(t.Type.isDomNode(this.DOM.crmUfWrap)){this.BX.html(this.DOM.crmUfWrap,e.data.html)}}.bind(this),function(e){t.Dom.remove(a)}.bind(this))}.bind(this),800)}}},{key:"denySliderClose",value:function e(){this.denyClose=true}},{key:"allowSliderClose",value:function e(){this.denyClose=false}},{key:"checkDenyClose",value:function e(){if(this.state===this.STATE.REQUEST){return true}if(!t.Type.isNull(this.mouseUpNodeCheck)){return!this.mouseUpNodeCheck}return this.denyClose}},{key:"setCurrentEntry",value:function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;this.entry=s.EntryManager.getEntryInstance(t,i,{type:this.type,ownerId:this.ownerId});s.EntryManager.registerEntrySlider(this.entry,this)}},{key:"getCurrentEntry",value:function e(){return this.entry}},{key:"getCurrentSection",value:function e(){var t=false,i=this.getCurrentSectionId();if(i&&this.sectionIndex[i]!==undefined&&this.sections[this.sectionIndex[i]]!==undefined){t=this.sections[this.sectionIndex[i]]}return t}},{key:"getCurrentSectionId",value:function e(){var t=0,i=this.getCurrentEntry();if(i instanceof s.Entry){t=parseInt(i.sectionId)}if(!t){if(this.type==="location"){t=h.RoomsManager.getNewEntrySectionId()}else{t=a.SectionManager.getNewEntrySectionId()}if(!this.sectionIndex[t]){t=null}}if(!t&&this.sections[0]){t=parseInt(this.sections[0].ID)}return t}},{key:"pinField",value:function e(i){var n=this;var s=this.getPlaceholders(),a=babelHelpers.slicedToArray(s,2),r=a[0],o=a[1];var l=o[i],d=r[i],h=l.offsetHeight;l.style.height=h+"px";setTimeout((function(){t.Dom.addClass(l,"calendar-hide-field")}),0);d.style.height="0";if(i==="description"){setTimeout(function(){if(!this.DOM.descriptionAdditionalWrap){this.DOM.descriptionAdditionalWrap=this.DOM.additionalBlock.querySelector(".calendar-info-panel-description")}if(this.DOM.descriptionAdditionalWrap){while(this.DOM.descriptionAdditionalWrap.firstChild){d.appendChild(this.DOM.descriptionAdditionalWrap.firstChild)}}d.style.height=h+"px"}.bind(this),200);setTimeout(function(){t.Dom.removeClass(l,"calendar-hide-field");l.style.display="none";d.style.height="";this.pinnedFieldsIndex[i]=true;var e=window["BXHtmlEditor"].Get(this.editorId);if(e){e.CheckAndReInit()}this.saveSettings();this.updateAdditionalBlockState()}.bind(this),500)}else{setTimeout((function(){while(l.firstChild){d.appendChild(l.firstChild)}d.style.height=h+"px"}),200);setTimeout((function(){t.Dom.removeClass(l,"calendar-hide-field");l.style.height="";d.style.height="";n.pinnedFieldsIndex[i]=true;n.saveSettings();n.updateAdditionalBlockState()}),300)}}},{key:"unPinField",value:function e(i){var n=this.getPlaceholders(),s=babelHelpers.slicedToArray(n,2),a=s[0],r=s[1];var o=a[i],l=r[i],d=o.offsetHeight;o.style.height=d+"px";setTimeout((function(){t.Dom.addClass(o,"calendar-hide-field")}),0);l.style.height="0";if(i==="description"){setTimeout(function(){if(!this.DOM.descriptionAdditionalWrap){this.DOM.descriptionAdditionalWrap=this.DOM.additionalBlock.querySelector(".calendar-info-panel-description")}if(this.DOM.descriptionAdditionalWrap){while(o.firstChild){this.DOM.descriptionAdditionalWrap.appendChild(o.firstChild)}}l.style.display="";l.style.height=d+"px"}.bind(this),200);setTimeout(function(){t.Dom.removeClass(o,"calendar-hide-field");o.style.height="";l.style.height="";this.pinnedFieldsIndex[i]=false;var e=window["BXHtmlEditor"].Get(this.editorId);if(e){e.CheckAndReInit()}this.saveSettings();this.updateAdditionalBlockState()}.bind(this),300)}else{setTimeout((function(){while(o.firstChild){l.appendChild(o.firstChild)}l.style.height=d+"px"}),200);setTimeout(function(){t.Dom.removeClass(o,"calendar-hide-field");o.style.height="";l.style.height="";this.pinnedFieldsIndex[i]=false;this.saveSettings();this.updateAdditionalBlockState()}.bind(this),300)}}},{key:"fieldIsPinned",value:function e(t){return this.pinnedFieldsIndex[t]}},{key:"getPlaceholders",value:function e(){if(!this.placeHolders){this.placeHolders={};this.placeHoldersAdditional={};var t,i,n=this.DOM.formWrap.querySelectorAll(".calendar-field-additional-placeholder");for(t=0;t<n.length;t++){i=n[t].getAttribute("data-bx-block-placeholer");if(i){this.placeHoldersAdditional[i]=n[t]}}n=this.DOM.formWrap.querySelectorAll(".calendar-field-placeholder");for(t=0;t<n.length;t++){i=n[t].getAttribute("data-bx-block-placeholer");if(i){this.placeHolders[i]=n[t]}}}return[this.placeHolders,this.placeHoldersAdditional]}},{key:"getSettings",value:function e(t){this.pinnedFieldsIndex={};var i,n=[];for(i in t.pinnedFields){if(t.pinnedFields.hasOwnProperty(i)){n.push(t.pinnedFields[i]);this.pinnedFieldsIndex[t.pinnedFields[i]]=true}}t.pinnedFields=n;return t}},{key:"saveSettings",value:function e(){var t,i=[];for(t in this.pinnedFieldsIndex){if(this.pinnedFieldsIndex.hasOwnProperty(t)&&this.pinnedFieldsIndex[t]){i.push(t)}}this.formSettings.pinnedFields=i;this.BX.userOptions.save("calendar",this.formType,"pinnedFields",i)}},{key:"updateAdditionalBlockState",value:function e(i){var n=this;if(i!==false){if(this.updateAdditionalBlockTimeout){clearTimeout(this.updateAdditionalBlockTimeout);this.updateAdditionalBlockTimeout=null}this.updateAdditionalBlockTimeout=setTimeout((function(){n.updateAdditionalBlockState(false)}),300)}else{var s,a=this.DOM.additionalBlock.getElementsByClassName("js-calendar-field-name");t.Dom.clean(this.DOM.pinnedNamesWrap);for(s=0;s<a.length;s++){this.DOM.pinnedNamesWrap.appendChild(t.Dom.create("SPAN",{props:{className:"calendar-additional-alt-promo-text"},html:a[s].innerHTML}))}if(!a.length){t.Dom.addClass(this.DOM.additionalBlockWrap,"calendar-additional-block-hidden")}else if(t.Dom.hasClass(this.DOM.additionalBlockWrap,"calendar-additional-block-hidden")){t.Dom.removeClass(this.DOM.additionalBlockWrap,"calendar-additional-block-hidden")}this.checkLastItemBorder()}}},{key:"checkLastItemBorder",value:function e(){var i="no-border",n,s;s=this.DOM.mainBlock.querySelectorAll(".calendar-options-item-border");for(n=0;n<s.length;n++){if(n===s.length-1){t.Dom.addClass(s[n],i)}else{t.Dom.removeClass(s[n],i)}}s=this.DOM.additionalBlock.querySelectorAll(".calendar-options-item-border");for(n=0;n<s.length;n++){if(n===s.length-1){t.Dom.addClass(s[n],i)}else{t.Dom.removeClass(s[n],i)}}}},{key:"handlePlannerSelectorChanges",value:function e(t){if(t instanceof r.BaseEvent){var i=t.getData();this.dateTimeControl.setValue({from:i.dateFrom,to:i.dateTo});if(this.locationSelector){this.locationSelector.checkLocationAccessibility({from:i.dateFrom,to:i.dateTo,fullDay:i.fullDay,currentEventId:this.entry.id})}}}},{key:"handleExpandPlannerTimeline",value:function e(t){if(t instanceof r.BaseEvent){var i=t.getData();if(i.reload){this.prevUserList=[];var s=this.dateTimeControl.getValue();this.loadPlannerData({entityList:this.getUserSelectorEntityList(),from:n.Util.formatDate(i.dateFrom),to:n.Util.formatDate(i.dateTo),timezone:s.timezoneFrom,location:this.locationSelector.getTextValue(),focusSelector:false})}}}},{key:"getUserSelectorEntityList",value:function e(){return this.selectorEntityList}},{key:"setUserSelectorEntityList",value:function e(t){this.selectorEntityList=t}},{key:"refreshPlannerState",value:function e(){var t=this.dateTimeControl.getValue();this.loadPlannerData({entityList:this.getUserSelectorEntityList(),from:n.Util.formatDate(t.from.getTime()-n.Util.getDayLength()*3),to:n.Util.formatDate(t.to.getTime()+n.Util.getDayLength()*10),timezone:t.timezoneFrom,location:this.locationSelector.getTextValue()})}},{key:"checkLocationForm",value:function e(t){if(t&&t instanceof r.BaseEvent){var n=t.getData();var s=n.usersCount;if(this.locationCapacity!==0){i.Location.setCurrentCapacity(this.locationCapacity);this.locationCapacity=0}var a=i.Location.getCurrentCapacity()||0;if(this.locationSelector.value.type===undefined){if(a){a=0;i.Location.setCurrentCapacity(0)}}if(a<s&&a!==0){this.locationSelector.addCapacityAlert()}else{this.locationSelector.removeCapacityAlert()}}}},{key:"plannerIsShown",value:function e(){return this.DOM.plannerWrap&&t.Dom.hasClass(this.DOM.plannerWrap,"calendar-edit-planner-wrap-shown")}},{key:"keyHandler",value:function e(t){if((t.ctrlKey||t.metaKey)&&!t.altKey&&t.keyCode===n.Util.getKeyCode("enter")){this.save()}}},{key:"showError",value:function e(i){var s=this;var a="";if(t.Type.isArray(i)){i.forEach((function(e){if(e.code==="edit_entry_location_busy"){return n.Util.showFieldError(e.message,s.DOM.locationWrap,{clearTimeout:1e4})}a+=e.message+"\n"}))}if(a!==""){alert(a)}}},{key:"getFormDataChanges",value:function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];var n=this.entry;var s=[];if(!t.includes("name")&&n.name!==this.DOM.form.name.value){s.push("name")}if(!t.includes("location")&&this.locationSelector.getTextLocation(i.Location.parseStringValue(this.entry.getLocation()))!==this.locationSelector.getTextLocation(i.Location.parseStringValue(this.locationSelector.getTextValue()))){s.push("location")}var a=this.dateTimeControl.getValue();if(!t.includes("date&time")&&(n.isFullDay()!==a.fullDay||a.from.toString()!==n.from.toString()||a.to.toString()!==n.to.toString())){s.push("date&time")}if(!t.includes("section")&&parseInt(n.sectionId)!==parseInt(this.DOM.sectionInput.value)){s.push("section")}if(!t.includes("codes")&&this.getUserSelectorEntityList().map((function(e){return e.entityId+":"+e.id})).join("|")!==n.getAttendeesEntityList().map((function(e){return e.entityId+":"+e.id})).join("|")){s.push("codes")}return s}},{key:"checkCurrentUsersAccessibility",value:function e(){return this.getFormDataChanges().includes("date&time")}},{key:"formDataChanged",value:function e(){return this.getFormDataChanges().length>0}},{key:"getUserCodes",value:function e(){var t=[],i=this.DOM.attendeesWrap.querySelectorAll('input[name="EVENT_DESTINATION[]"]');for(var n=0;n<i.length;n++){if(!t.includes(i[n].value)){t.push(i[n].value)}}return t}},{key:"handlePull",value:function e(i){var n,s,a,o;if(!i instanceof r.BaseEvent){return}var l=i.getData();var d=l[0];var h=t.Type.isObjectLike(l[1])?l[1]:{};switch(d){case"edit_event":case"delete_event":case"set_meeting_status":var c=t.Type.isArray(h===null||h===void 0?void 0:(n=h.fields)===null||n===void 0?void 0:n.ATTENDEES)?h.fields.ATTENDEES:[];var u=(h===null||h===void 0?void 0:(s=h.fields)===null||s===void 0?void 0:s.CAL_TYPE)==="user"?parseInt(h===null||h===void 0?void 0:(a=h.fields)===null||a===void 0?void 0:a.OWNER_ID):parseInt(h===null||h===void 0?void 0:(o=h.fields)===null||o===void 0?void 0:o.CREATED_BY);if(!c.includes(u)){c.push(u)}this.clearAccessibilityData(c);this.refreshPlannerState();break}}},{key:"clearAccessibilityData",value:function e(i){if(t.Type.isArray(i)&&i.length&&this.prevUserList.length){this.prevUserList=this.prevUserList.filter((function(e){return!i.includes(e)}))}}},{key:"getParticipantsSelectorEntityList",value:function e(){if(this.participantsSelectorEntityList&&this.participantsSelectorEntityList.length){return this.participantsSelectorEntityList}var t=[{id:"user",options:{inviteGuestLink:true,emailUsers:true}},{id:"project"},{id:"department",options:{selectMode:"usersAndDepartments"}},{id:"meta-user",options:{"all-users":true}}];if(this.attendeesPreselectedItems){var i=null;this.attendeesPreselectedItems.forEach((function(e){var t=e[0];var n=e[1];if(t==="project-roles"){i=n}}));if(i){t=[{id:"user"},{id:"project-roles",options:{projectId:i.split("_")[0]},dynamicLoad:true}]}}return t}}]);return e}();e.EventEditForm=S})(this.BX.Calendar=this.BX.Calendar||{},BX,BX.Calendar.Controls,BX.Calendar,BX.Calendar,BX.Calendar,BX.Event,BX.Calendar,BX.UI.EntitySelector,BX.Calendar.Sync.Interface,BX.Calendar); //# sourceMappingURL=eventeditform.bundle.map.js
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.26 |
proxy
|
phpinfo
|
Settings