{"version":3,"sources":["webpack://jrs-ui/./src/components/components.about.js","webpack://jrs-ui/./src/components/components.heartbeat.js","webpack://jrs-ui/./src/components/components.toolbarButtons.js","webpack://jrs-ui/./src/config/dateAndTimeSettings.js","webpack://jrs-ui/./src/settings/settingsStore.js","webpack://jrs-ui/./src/stdnav/plugins/stdnavPluginActionMenu.js","webpack://jrs-ui/./src/stdnav/plugins/stdnavPluginActionMenuTrap.js","webpack://jrs-ui/./src/stdnav/plugins/stdnavPluginDynamicList.js","webpack://jrs-ui/./src/stdnav/plugins/stdnavPluginForms.js","webpack://jrs-ui/./src/stdnav/plugins/stdnavPluginMainMenu.js","webpack://jrs-ui/./src/stdnav/plugins/stdnavPluginToolbar.js","webpack://jrs-ui/./src/stdnav/plugins/stdnavPluginToolbarV2.js","webpack://jrs-ui/./src/stdnav/plugins/stdnavTabList.js","webpack://jrs-ui/../js-sdk/src/common/extension/jQueryDatepickerExtension.js","webpack://jrs-ui/../js-sdk/src/common/extension/jQueryTimepickerExtension.js","webpack://jrs-ui/../js-sdk/src/common/stdnav/plugins/stdnavPluginAnchor.js","webpack://jrs-ui/../js-sdk/src/common/stdnav/plugins/stdnavPluginButton.js","webpack://jrs-ui/../js-sdk/src/common/stdnav/plugins/stdnavPluginGrid.js","webpack://jrs-ui/../js-sdk/src/common/stdnav/plugins/stdnavPluginList.js","webpack://jrs-ui/../js-sdk/src/common/stdnav/plugins/stdnavPluginModalTrap.js","webpack://jrs-ui/../js-sdk/src/common/stdnav/plugins/stdnavPluginTable.js","webpack://jrs-ui/../js-sdk/src/common/stdnav/plugins/stdnavPluginWorkflowCard.js","webpack://jrs-ui/../js-sdk/src/common/util/accessibility/waiAriaConstants.ts","webpack://jrs-ui/../js-sdk/src/common/util/eventAutomation.js","webpack://jrs-ui/../js-sdk/src/components/dateAndTime/DateAndTimePicker.js","webpack://jrs-ui/../js-sdk/src/components/dateAndTime/template/dateTimePopupContainer.htm","webpack://jrs-ui/./src/settings/dateTimeSettings.settings.js"],"names":["about","initialize","aboutBox","registerListeners","show","dom","jQuery","hasClass","dialogs","closable","_hide","$about","$aboutBoxCloseButton","on","e","preventDefault","stopPropagation","init","DOM_ID","PERMIT_CHECKBOX_ID","options","this","_baseUrl","baseUrl","_showDialog","showDialog","_sendClientInfo","sendClientInfo","_dom","_permit","_okButton","find","layoutModule","_okHandler","bind","url","checked","ajaxNonReturningUpdate","errorHandler","baseErrorHandler","start","focus","_doSendClientInfo","params","navigator","appName","appVersion","screen","width","height","colorDepth","postData","appendPostData","UP","DOWN","OVER","DISABLED","PRESSED","CONTENT_PREFIX","MenuClass","TOOLBAR_MENU_CLASS","ACTION_MODEL_TAG","CAPSULE_PATTERN","showButtonMenu","event","object","context","attr","model","actionModel","setActionModel","newActionModel","isToolBarButton","button","enable","buttonManager","disable","setButtonState","userLocale","availableLocales","postfix","locale","jrsConfigs","_","substring","replace","DateAndTimePicker","date","dateTimeSettings","time","MENU_TRAP_ELEMENT_TEMPLATE","log","stdnavPluginActionMenu","prototype","zinit","selector","activate","behavior","_onEnter","_onExit","_fixFocus","_fixSuperfocus","_onFocusIn","_onFocusOut","_onSubfocusIn","_onLeft","_onRight","_onSuperfocusIn","_onSuperfocusOut","_onUp","_onDown","_onHome","_onEnd","stdnav","navtype","navtype_tags","deactivate","element","newFocus","$el","$","is","insertBefore","insertAfter","pressedItem","length","closest","$li","_openChildMenu","_setAriaAttributes","$p","AriaProps","open","isMenuShowing","$thisItem","nodeName","subel","$parentMenu","parentMenuItem","$subMenuItem","first","$lastItem","last","$prev","prev","$firstItem","$next","next","logger","stdnavPluginModalTrap","error","modalFocusableElement","lastFocused","gserial","stdnavPluginDynamicList","serial","debug","_ariaPrep","_ariaRefresh","el","$links","isButtonLink","eventAutomation","findRow","querySelector","$listEl","warn","listObj","dynamicList","focusableEl","addClass","getCursorElement","_fixSubfocus","$closestList","ghosts","children","removeClass","items","stdnavPluginForms","parent","ActiveTopLevelMenuAttribute","$mainMenu","$homeMenu","$libraryMenu","stdnavPluginMainMenu","menu_item_callbacks","click","_onToggle","_onClick","_onSubfocusOut","_setHasSubMenuAriaAttributes","_setOpenSubMenuAriaAttributeState","p","mute","$activeToplevelMenu","role","_closeSubMenu","_showSubMenu","$menuWithSubmenu","allExpandedMenuItems","primaryNavigation","text","trim","_getActiveTopLevelMenu","activeToplevelMenuId","activeTopLevelMenuId","menuItem","elementId","$activeTopLevelMenu","_getNextActiveDescendant","activeDescendantId","$menuItems","_getPreviousActiveDescendant","$previous","activeDescendant","StdnavPluginToolbar","_onEnterOrEntered","$items","not","key","item","$item","$labeledEl","lis","prop","$root","$elem","$parentList","$currentList","_parentTabindex","$ul","$matched","$selected","hide","lastMenuBarItem","removeAttr","$toolbar","document","activeElement","_onExitHandler","prevAll","each","elem","nextAll","$menu","$button","$input","_setParentElem","simulateEl","select","StdnavPluginToolbarV2","$btnItems","$icons","iconEl","elementWithSuperfocus","filter","index","siblings","$btn","trigger","$firstEl","$lastEl","StdnavTabList","$tabItems","$element","_jasperPrefix","_mainDivId","_jasperPopupClass","originalNewInst","result","apply","arguments","dpDiv","originalGoToToday","id","call","_selectDate","opts","onChangeMonthYear","year","month","datepicker","timepicker","currentYear","selectedYear","currentMonth","selectedMonth","currentDay","selectedDay","_updateDateTime","instance","originalOnTimeChange","_onTimeChange","$timeObj","setSelectionRange","stdnavPluginAnchor","_onLeftOrUp","_onRightOrDown","newSubfocus","undefined","stdnavPluginButton","localLogger","stdnavPluginGrid","_onHover","_findSubfocus","sfels","rows","cells","sfel","newsf","row","newrow","iter","col","stdnavPluginList","firstLink","$list","$newFocus","currentModalDialogRoot","DIALOG_REFERENCE_ATTRIBUTE","stdnavPluginTable","$table","label","labelledBy","itemLabel","itemLabelledBy","_getPreviousSection","prevSection","thisSection","_getNextSection","nextSection","$closestTable","fixedSubfocus","StdnavPluginWorkflowCard","_onEnterOrToggle","eq","parents","isButtonOrChild","isMainUl","_navigationCallbackHandler","listCallback","buttonCallback","currentFocus","newPosition","newSelectedButton","visibleButtonList","closestLi","liList","previousItem","closestLiParent","liParentList","nextItem","mouseEventOptions","bubbles","cancelable","view","defaultView","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","relatedTarget","srcElement","triggerNativeEvent","eventName","target","ev","ie","browserDetection","documentElement","window","createEvent","MouseEvent","initMouseEvent","eventOptions","initEvent","bubble","dispatchEvent","createEventObject","fireEvent","simulateClickSequence","simulateDoubleClickSequence","DATE_TIME_DEFAULTS","stepHour","stepMinute","stepSecond","showSecond","changeMonth","changeYear","showButtonPanel","constrainInput","TIME_DEFAULTS","err","Backbone","constructor","pickerOptions","hasOwnProperty","dateFormat","timeFormat","inline","skipMoving","pickerType","discoverPickerType","provideDefaultPickerOptions","fixPopupPositionAndStyling","self","_callPickerAction","getDate","getTime","setDate","remove","empty","off","stopListening","setDefaults","configs","Helpers","movePickerRelativelyToTriggerIcon","stylePopupContainer","type","originalBeforeShowFn","beforeShow","afterInject","inst","input","offset","left","parseFloat","css","move","offsetWidth","marginLeft","$dpDiv","$popupContainer","$parent","detach","append"],"mappings":"qMA2BIA,EAAQ,CAIRC,WAAY,WACRD,EAAME,SAASC,sBAMvBH,EAAME,SAAW,CAIbE,KAAM,WACF,IAAIC,EAAMC,IAAO,aACbD,EAAIE,SAAS,WACbC,eAAmBH,EAAI,IAAI,EAAM,CAACI,UAAU,KAGpDC,MAAO,WACH,IAAIL,EAAMC,IAAO,aACZD,EAAIE,SAAS,WACdC,eAAmBH,EAAI,KAI/BF,kBAAoB,WAChB,IAAIQ,EAASL,IAAO,UAChBM,EAAuBN,IAAO,oBAElCK,EAAOE,GAAG,SAAS,SAASC,GACxBA,EAAEC,iBACFf,EAAME,SAASE,UAGnBQ,EAAqBC,GAAG,SAAS,SAASC,GACtCd,EAAME,SAASQ,QACfI,EAAEE,uBAMd,W,+GCuBA,QA/DgB,CACZC,MAAM,EACNC,OAAQ,iBACRC,mBAAoB,iBAEpBlB,WAAY,SAASmB,GACjBC,KAAKC,SAAWF,EAAQG,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- 2022 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n/**\n * @author: Yuriy Plakosh\n * @version: $Id$\n */\nimport jQuery from 'jquery';\nimport dialogs from './components.dialogs';\n\nvar about = {\n /**\n * Initialize about module.\n */\n initialize: function () {\n about.aboutBox.registerListeners();\n }\n};\n///////////////////////////\n// About box component\n///////////////////////////\nabout.aboutBox = {\n /**\n * Shows about box.\n */\n show: function () {\n var dom = jQuery('#aboutBox');\n if (dom.hasClass('hidden')) {\n dialogs.popup.show(dom[0], true, {closable: true});\n }\n },\n _hide: function () {\n var dom = jQuery('#aboutBox');\n if (!dom.hasClass('hidden')) {\n dialogs.popup.hide(dom[0]);\n }\n },\n\n registerListeners : function() {\n var $about = jQuery(\"#about\"),\n $aboutBoxCloseButton = jQuery(\"#aboutBox button\");\n\n $about.on('click', function(e) {\n e.preventDefault();\n about.aboutBox.show();\n });\n\n $aboutBoxCloseButton.on('click', function(e) {\n about.aboutBox._hide();\n e.stopPropagation();\n });\n\n }\n};\n\nexport default about;","/*\n * Copyright (C) 2005 - 2022 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\n\n/**\n * @version: $Id$\n */\n\nimport layoutModule from '../core/core.layout';\nimport {ajaxNonReturningUpdate, appendPostData} from \"../core/core.ajax\";\nimport {baseErrorHandler} from \"../core/core.ajax.utils\";\nimport dialogs from './components.dialogs';\nimport jQuery from 'jquery';\n\nvar heartbeat = {\n init: false,\n DOM_ID: \"heartbeatOptin\",\n PERMIT_CHECKBOX_ID: \"heartbeatCheck\",\n\n initialize: function(options) {\n this._baseUrl = options.baseUrl;\n this._showDialog = options.showDialog;\n this._sendClientInfo = options.sendClientInfo;\n\n this._dom = jQuery('#' + this.DOM_ID)[0];\n if (!this._dom) {\n return;\n }\n this._permit = jQuery('#' + this.PERMIT_CHECKBOX_ID)[0];\n this._okButton = jQuery(this._dom).find(layoutModule.BUTTON_PATTERN)[0];\n\n jQuery(this._okButton).on(\"click\", this._okHandler.bind(this));\n this.init = true;\n },\n\n _okHandler: function() {\n dialogs.popup.hide(this._dom);\n\n var url = this._baseUrl +\"/heartbeat.html?permit=\" + this._permit.checked;\n\n ajaxNonReturningUpdate(url, { errorHandler: baseErrorHandler });\n },\n\n start: function() {\n if (this.init === false) {\n return;\n }\n\n if (this._showDialog) {\n dialogs.popup.show(this._dom);\n\n this._okButton.focus();\n }\n if (this._sendClientInfo) {\n this._doSendClientInfo();\n }\n },\n\n _doSendClientInfo: function() {\n try {\n var params = {};\n params[\"navAppName\"] = navigator.appName;\n params[\"navAppVersion\"] = navigator.appVersion;\n params[\"scrWidth\"] = screen.width;\n params[\"scrHeight\"] = screen.height;\n params[\"scrColorDepth\"] = screen.colorDepth;\n var postData = appendPostData(\"\", params);\n\n var url = this._baseUrl + \"/heartbeatInfo.html\";\n\n ajaxNonReturningUpdate(url, {postData: postData});\n } catch(e) {\n // Ignore.\n }\n }\n};\n\nexport default heartbeat;","/*\n * Copyright (C) 2005 - 2022 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\n\n/**\n * @version: $Id$\n */\n\nimport jQuery from 'jquery';\nimport actionModel from '../actionModel/actionModel.modelGenerator';\nimport buttonManager from '../core/core.events.bis';\n\n////////////////////////////////////////////////\n// Generic toolbar button utils\n////////////////////////////////////////////////\n\nvar toolbarButtonModule = {\n\n UP : \"up\",\n DOWN : \"down\",\n OVER : \"over\",\n DISABLED : \"disabled\",\n PRESSED : \"pressed\",\n CONTENT_PREFIX : \"toolbar_\", //action model\n MenuClass : \"menu vertical dropDown\",\n TOOLBAR_MENU_CLASS : \"menu vertical dropDown fitable\",\n ACTION_MODEL_TAG : \"adhocActionModel\",\n CAPSULE_PATTERN : \"capsule\",\n\n /**\n * Used by all toolbar components to show menu\n * @param event\n * @param object object we want the menu for\n */\n showButtonMenu : function(event, object){\n object = jQuery(object);\n var context = this.CONTENT_PREFIX + object.attr(\"id\"),\n model = this.ACTION_MODEL_TAG == 'adhocActionModel' ? this.actionModel : this.ACTION_MODEL_TAG;\n\n actionModel.showDropDownMenu(event, object, context, this.TOOLBAR_MENU_CLASS, model);\n },\n\n setActionModel: function(newActionModel){\n this.actionModel = newActionModel;\n },\n\n /**\n * Test to see if the button clicked is a toolbar type\n * @param button\n */\n isToolBarButton : function(button){\n if (button){\n return (jQuery(button).hasClass(\"capsule\"));\n } else{\n return false;\n }\n\n },\n\n /**\n * Used to enable toolbar button\n * @param button\n * @param enable\n */\n enable : function(button, enable){\n buttonManager.enable(button);\n },\n\n /**\n * Used to disable toolbar button\n * @param button\n */\n disable : function(button){\n buttonManager.disable(button);\n },\n\n /**\n * Used to enable or disable button based on adhoc state variables\n * @param button\n * @param enable\n */\n setButtonState : function(button, enable){\n if(enable){\n this.enable(button);\n }else{\n this.disable(button);\n }\n }\n};\n\nexport default toolbarButtonModule;\n\n\n\n","/*\n * Copyright (C) 2005 - 2022 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\nimport jrsConfigs from 'js-sdk/src/jrs.configs';\nimport $ from 'jquery';\nimport _ from 'underscore';\n\nimport dateTimeSettings from '../settings/dateTimeSettings.settings';\nimport DateAndTimePicker from 'js-sdk/src/components/dateAndTime/DateAndTimePicker';\n\nfunction getLocale(userLocale, availableLocales) {\n var postfix = 'en';\n if (userLocale) {\n if (_.contains(availableLocales, userLocale)) {\n postfix = userLocale;\n } else if (_.contains(availableLocales, userLocale.substring(0, 2))) {\n postfix = userLocale.substring(0, 2);\n }\n }\n return postfix.replace('_', '-');\n}\nvar locale = getLocale(jrsConfigs.userLocale, jrsConfigs.availableLocales);\nDateAndTimePicker.setDefaults({\n locale: locale,\n date: dateTimeSettings.datepicker,\n time: dateTimeSettings.timepicker\n});\nexport default $;","/*\n * Copyright (C) 2005 - 2022 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\n// This settings store will be filled with the actual settings loaded from the server\n\nexport default {};","/*\n * Copyright (C) 2005 - 2022 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\n/**\n * @author: ${username}\n * @version: $Id$\n */\n\n/* Standard Navigation library (stdnav) plugin\n * Elements: LI, OL, UL\n * Navtype: actionmenu\n *\n * Plugin for \"actionModel\"-based menus, such as the JRS main menu, which\n * handle mouse and touch events, but offer no keyboard support. (Note\n * that \"actionModel\" itself is not used in a Backbone context yet, in\n * case its name suggests that to you; it's a coincidence.)\n *\n * This module supports enhancements intended to improve compliance with\n * section 508 of the Rehabilitation Act of 1973, 29 USC 798, as amended\n * 1998.\n */\n\nimport $ from 'jquery';\nimport _ from 'underscore';\nimport stdnav from 'js-sdk/src/common/stdnav/stdnav';\nimport actionModel from '../../actionModel/actionModel.modelGenerator';\nimport buttonManager from '../../core/core.events.bis';\nimport layoutModule from '../../core/core.layout';\nimport log from 'js-sdk/src/common/logging/logger';\nimport {AriaProps} from \"js-sdk/src/common/util/accessibility/waiAriaConstants\";\n\nvar logger = log.register(\"stdnav\");\n\nconst MENU_TRAP_ELEMENT_TEMPLATE = '
';\n\nvar stdnavPluginActionMenu = function () {\n};\n\n_.extend(stdnavPluginActionMenu.prototype, {\n zinit: function (selector) {\n return this;\n },\n\n // Registers the 'actionMenu' navtype with stdnav. Both stdnav and ActionMenu\n // must be loaded and activated before this can be done.\n activate: function () {\n // This is the behaviour hash for the navtype. These defaults pass\n // everything through to the browser, and are normally overridden\n // with $.extend based on specific tagnames and stdnav attributes.\n this.behavior = {\n 'toggle': [this, this._onEnter, null],\n 'enter': [this, this._onEnter, null],\n 'exit': [this, this._onExit, null],\n 'fixfocus': [this, this._fixFocus, null],\n 'fixsubfocus': [this, this._fixFocus, null],\n 'fixsuperfocus': [this, this._fixSuperfocus, null],\n 'focusin': [this, this._onFocusIn, null],\n 'focusout': [this, this._onFocusOut, null],\n 'subfocusin': [this, this._onSubfocusIn, null],\n 'left': [this, this._onLeft, null],\n 'right': [this, this._onRight, null],\n 'superfocusin': [this, this._onSuperfocusIn, null],\n 'superfocusout': [this, this._onSuperfocusOut, null],\n 'up': [this, this._onUp, null],\n 'down': [this, this._onDown, null],\n 'home': [this, this._onHome, null],\n 'end': [this, this._onEnd, null],\n 'inherit': false,\n 'inheritable': true\n };\n stdnav.registerNavtype(this.navtype, this.behavior, this.navtype_tags);\n },\n\n // Unregisters the 'actionMenu' navtype from stdnav. This must be done\n // before deactivating/unloading stdnav.\n deactivate: function () {\n stdnav.unregisterNavtype(this.navtype, this);\n },\n\n /* ====== Focus Management ====== */\n\n\n // Focus adjustment callback. Ensures that if the DIV or UL elements\n // themselves are given focus, that it is promoted to the first LI.\n _fixFocus: function (element) {\n var newFocus;\n var $el = $(element);\n if ($el.is('#' + actionModel.PARENT_MENU_CONTAINER)) {\n $(MENU_TRAP_ELEMENT_TEMPLATE).insertBefore($el);\n $(MENU_TRAP_ELEMENT_TEMPLATE).insertAfter($el);\n }\n const pressedItem = $el.find(`.${layoutModule.PRESSED_CLASS} > p`);\n if (pressedItem.length > 0) {\n newFocus = pressedItem[0];\n }else {\n if ($el.is('div,ul,ol')) {\n newFocus = $el.find('li > p')[0] ?? element;\n } else if ($el.is('li')) {\n // Focus is already appropriate.\n newFocus = $el.find('> p')[0] ?? element;\n } else {\n newFocus = $el.closest('li').find('> p')[0] ??\n ($el.closest('ul').find('li > p')[0] ?? element);\n }\n }\n return newFocus;\n },\n\n // Superfocus adjustment callback. Because of the way actionModel\n // works, the menu is expected to be rooted in an enclosing DIV that\n // contains the list, so use the DIV for the superfocus region.\n // However, context menus are _not_\n _fixSuperfocus: function (element) {\n return $(element).closest(`.context`)[0];\n },\n\n _onSuperfocusIn: function(element){\n },\n\n _onFocusIn: function (element) {\n var $el = $(element);\n\n var $li = $el.closest(layoutModule.MENU_LIST_PATTERN);\n if ($li.length>0) {\n this._openChildMenu($li[0], true);\n //this._setAriaAttributes($li[0]);\n buttonManager.over($li.find(layoutModule.BUTTON_PATTERN)[0]);\n }\n\n return element;\n },\n\n _setAriaAttributes: function (element) {\n var $li = $(element);\n var $p = $li.find('> p');\n\n if ($li.hasClass(layoutModule.NODE_CLASS) && !$p.attr(AriaProps.HasPopup)) {\n $p.attr(AriaProps.Expanded, 'false')\n .attr(AriaProps.HasPopup, 'true')\n }\n },\n\n _openChildMenu: function (element, open) {\n var $li = $(element);\n var $p = $li.find('> p');\n\n if ($li.hasClass(layoutModule.NODE_CLASS)) {\n this._setAriaAttributes(element);\n const isMenuShowing = actionModel.isMenuShowing($li.find('.context')[0]);\n\n if (open) {\n $p.attr(AriaProps.Expanded, 'true')\n !isMenuShowing && actionModel.showChildSubmenu(element);\n } else {\n isMenuShowing && actionModel.hideChildSubmenu(element);\n $p.attr(AriaProps.Expanded, 'false');\n }\n }\n },\n\n _onFocusOut: function (element) {\n var $thisItem = $(element).closest(layoutModule.MENU_LIST_PATTERN);\n if ($thisItem.length>0) {\n // An item in a drop-down or context menu has lost focus.\n buttonManager.out($thisItem.find(layoutModule.BUTTON_PATTERN)[0]);\n }\n return null;\n },\n\n // When the entire menu loses superfocus, ensure that any remaining\n // hover events and classes for actionMenu fire as expected, and that\n // the context menu is hidden.\n _onSuperfocusOut: function(element){\n\n },\n\n /* ========== NAVTYPE BEHAVIOR CALLBACKS =========== */\n\n _onSubfocusIn: function (element) {\n // Handle menus hosted in non-focusable elements (such as a cell in a grid).\n if (element.nodeName !== 'P') {\n // Find a usable child element.\n var subel = this._fixFocus(element);\n // Adjust subfocus without firing callbacks.\n stdnav.setSubfocus(subel, false);\n }\n },\n\n _onEnter: function (element) {\n return this._onRight(element);\n },\n\n _onExit: function (element) {\n var $context = $(element).closest('.context');\n if ($context.attr('id') === layoutModule.MENU_ID) {\n actionModel.hideMenu();\n } else {\n return this._onLeft(element);\n }\n },\n\n /* ========== KEYBOARD BEHAVIOR =========== */\n _onLeft: function (element){\n const $thisItem = $(element).closest(layoutModule.MENU_LIST_PATTERN);\n const $parentMenu = $thisItem.closest('ul');\n if (!$parentMenu.is(`#${actionModel.PARENT_MENU_CONTAINER}`)) {\n const parentMenuItem = $parentMenu.closest('li');\n stdnav.forceFocus(parentMenuItem.find('> p')[0]);\n this._openChildMenu(parentMenuItem[0], false);\n } else {\n return element\n }\n },\n\n _onRight: function (element) {\n const $thisItem = $(element).closest(layoutModule.MENU_LIST_PATTERN);\n const $subMenuItem = $thisItem.find('ul[role=menu] li').first();\n\n if ($subMenuItem.length>0) {\n this._openChildMenu($thisItem[0], true);\n return $subMenuItem.find('> p')[0];\n } else {\n return element;\n }\n },\n\n _onUp: function (element) {\n var $el = $(element).closest(layoutModule.MENU_LIST_PATTERN);\n var $lastItem = $el.closest('ul').find('> li').last();\n var $prev = $el.prev('li');\n\n while ($prev.is(layoutModule.SEPARATOR_PATTERN)){\n $prev=$prev.prev('li');\n }\n\n if (!$prev[0]) {\n $prev = $lastItem;\n }\n\n if ($prev.length>0){\n this._openChildMenu($el[0], false);\n stdnav.forceFocus($prev.find('> p')[0]);\n } else {\n return element;\n }\n },\n\n _onDown: function (element) {\n var $el = $(element).closest(layoutModule.MENU_LIST_PATTERN);\n var $firstItem = $el.closest('ul').find('> li').first();\n var $next = $el.next('li');\n\n while ($next.is(layoutModule.SEPARATOR_PATTERN)){\n $next=$next.next('li');\n }\n\n if (!$next[0]) {\n $next = $firstItem;\n }\n\n if ($next.length>0){\n this._openChildMenu($el[0], false);\n stdnav.forceFocus($next.find('> p')[0]);\n } else {\n return element;\n }\n },\n\n _onHome: function (element) {\n var $el = $(element).closest(layoutModule.MENU_LIST_PATTERN);\n var $firstItem = $el.closest('ul').find('> li').first();\n this._openChildMenu($el[0], false);\n stdnav.forceFocus($firstItem.find('> p')[0]);\n },\n\n _onEnd: function (element) {\n var $el = $(element).closest(layoutModule.MENU_LIST_PATTERN);\n var $lastItem = $el.closest('ul').find('> li').last();\n this._openChildMenu($el[0], false);\n stdnav.forceFocus($lastItem.find('> p')[0]);\n }\n});\n\n// SECOND EXTENSION PASS - ATTRIBUTES\n// Hash members in this pass can reference functions from the last pass.\n$.extend(stdnavPluginActionMenu.prototype, {\n // This is the name of the new navtype. Each stdnav plugin must\n // define a unique name.\n navtype: 'actionmenu',\n\n // This arrray extends the tag-to-navtype map in stdnav. If your\n // plugin should apply to all elements of a given type, add those\n // element tagnames, in lower case, to this array. It is normally\n // empty, and the page templates simply set an appropriate\n // \"data-navtype=\" attribute to get the expected behavior.\n //\n // NOTE: The HTML5 \"menu\" element is still very broken. In practice\n // our menus are built with list items and use \"js-navtype\" overrides to\n // this type.\n //\n // CASE SENSITIVE - USE UPPER-CASE!\n navtype_tags: []\n});\n\nexport default new stdnavPluginActionMenu();\n","/*\n * Copyright (C) 2005 - 2020 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\nimport jQuery from 'jquery';\nimport log from \"js-sdk/src/common/logging/logger\";\nimport stdnav from 'js-sdk/src/common/stdnav/stdnav';\nimport actionModel from \"../../actionModel/actionModel.modelGenerator\";\n\nconst logger = log.register(\"stdnav\");\n\nconst stdnavPluginModalTrap = function () {\n};\n\njQuery.extend(stdnavPluginModalTrap.prototype, {\n // Registers the 'button' navtype with stdnav. stdnav must be loaded and\n // activated before this can be done.\n activate: function () {\n // This is the behaviour hash for the navtype. These defaults pass\n // everything through to the browser, and are normally overridden\n // with jQuery.extend based on specific tagnames and stdnav attributes.\n this.behavior = {\n 'fixfocus': [this, this._fixFocus, null]\n };\n stdnav.registerNavtype(this.navtype, this.behavior, this.navtype_tags);\n },\n\n // Unregisters navtype from stdnav. This must be done\n // before deactivating/unloading stdnav.\n deactivate: function () {\n stdnav.unregisterNavtype(this.navtype, this.behavior);\n },\n\n /* ========== NAVTYPE BEHAVIOR CALLBACKS =========== */\n\n _fixFocus: function (element) {\n if (!actionModel.lastFocused) {\n logger.error('Menu Trap element exists while there is no parent focusable element for the menu');\n return element;\n }\n\n const lastFocused = actionModel.lastFocused;\n actionModel.hideMenu(false);\n\n let modalFocusableElement;\n const $el = jQuery(element);\n if ($el.prev().is('#' + actionModel.PARENT_MENU_CONTAINER)) {\n modalFocusableElement = stdnav.getNextFocusableElement(lastFocused)\n } else if ($el.next().is('#' + actionModel.PARENT_MENU_CONTAINER)) {\n modalFocusableElement = stdnav.getPreviousFocusableElement(lastFocused)\n }\n\n //$el.parent().find('[js-navtype=menuTrap]').remove();\n return modalFocusableElement;\n }\n});\n\n// SECOND EXTENSION PASS - ATTRIBUTES\n// Hash members in this pass can reference functions from the last pass.\njQuery.extend(stdnavPluginModalTrap.prototype, {\n // This is the name of the new navtype. Each stdnav plugin must\n // define a unique name.\n navtype: 'menuTrap',\n\n // This arrary extends the tag-to-navtype map in stdnav. If your\n // plugin should apply to all elements of a given type, add those\n // element tagnames, in lower case, to this array. It is normally\n // empty, and the page templates simply set an appropriate\n // \"data-navtype=\" attribute to get the expected behavior.\n //\n // CASE SENSITIVE - USE UPPER-CASE!\n navtype_tags: []\n});\nvar newStdnavPluginModalTrap = new stdnavPluginModalTrap();\nexport default newStdnavPluginModalTrap;","/*\n * Copyright (C) 2005 - 2022 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\nimport $ from 'jquery';\nimport eventAutomation from 'js-sdk/src/common/util/eventAutomation';\nimport stdnav from 'js-sdk/src/common/stdnav/stdnav';\nimport {dynamicList} from '../../components/list.base';\nimport log from 'js-sdk/src/common/logging/logger';\n\nvar logger = log.register(\"stdnav\");\n\nvar version = '0.0.1';\nvar singleton = null;\nvar gserial = 0;\nvar stdnavPluginDynamicList = function () {\n gserial++;\n this.serial = gserial;\n};\n// FIRST EXTENSION PASS - FUNCTIONS\n// Provides forward-references for hashes in the second pass, so that\n// references in that second pass to functions declared here resolve\n// (since the entire pass is applied at once, they cannot be combined).\n$.extend(stdnavPluginDynamicList.prototype, {\n zinit: function (selector) {\n logger.debug('stdnavPluginDynamicList.init(' + selector + ')\\n');\n return this;\n },\n // Registers the 'dynamiclist' navtype with stdnav. stdnav must be loaded and\n // activated before this can be done.\n activate: function () {\n // This is the behaviour hash for the navtype. These defaults pass\n // everything through to the browser, and are normally overridden\n // with $.extend based on specific tagnames and stdnav attributes.\n //\n // For dynamic lists, pass arrow keys through to the existing keyboard\n // behavior.\n this.behavior = {\n 'ariaprep': [\n this,\n this._ariaPrep,\n null\n ],\n 'ariarefresh': [\n this,\n this._ariaRefresh,\n null\n ],\n 'click': null,\n 'down': null,\n 'end': null,\n 'enter': [\n this,\n this._onEnter,\n null\n ],\n 'toggle': [\n this,\n this._onEnter,\n null\n ],\n 'fixfocus': [\n this,\n this._fixFocus,\n null\n ],\n 'fixsuperfocus': [\n this,\n this._fixSuperfocus,\n null\n ],\n 'home': null,\n 'inherit': true,\n 'inheritable': true,\n 'left': null,\n 'pagedown': null,\n 'pageup': null,\n 'right': null,\n 'superfocusin': [\n stdnav,\n stdnav.basicSuperfocusIn,\n {\n 'maxdepth': 1,\n 'focusSelector': 'li',\n 'ghostfocus': false\n }\n ],\n 'superfocusout': [\n stdnav,\n stdnav.basicSuperfocusOut,\n { 'ghostfocus': false }\n ],\n 'up': null\n };\n stdnav.registerNavtype(this.navtype, this.behavior, this.navtype_tags);\n },\n // Unregisters the 'dynamiclist' navtype from stdnav. This must be done\n // before deactivating/unloading stdnav.\n deactivate: function () {\n stdnav.unregisterNavtype(this.navtype, this.behavior);\n },\n // This callback is run when the page is initially rendered. Add the\n // appropriate ARIA tags for the handled construt, if they do not already\n // exist. The element passed will be the superfocus for the construct\n // being instrumented, but this construct may not actually have focus at\n // the time this function is called.\n _ariaPrep: function (el) {\n //$(el).attr('role', 'application');\n // $(el).attr('aria-label', 'Dynamic List');\n return null;\n },\n // This callback is run when the superfocus changes to the construct.\n // Its two purposes are to update existing constructs, and to handle\n // dynamically-created content whose creation was not detected during\n // initial page construction (possibly because no part of the construct\n // existed yet). The element passed will be the superfocus for the\n // construct, but this construct may not actually have focus at the time\n // this function is called.\n _ariaRefresh: function (el) {\n //$(el).attr('role', 'application');\n //$(el).attr('aria-label', 'Dynamic List');\n return null;\n },\n _onEnter: function (element) {\n let $el = $(element);\n if ($el.is('.supercursor')) {\n // If a sublist is expanded, and a subitem has an active cursor,\n // then the parent item gets the \"supercursor\" class instead,\n // and should NEVER get keyboard focus at the same time (or the\n // cursor would have been removed from the sublist and this item\n // would have \"cursor\" instead of \"supercursor\" class).\n logger.error('dynamicList item has supercursor class-- should not have focus while this is true.');\n if ($el.find('ul > li.cursor') < 0) {\n logger.error('...additionally, no sublist item appears to have the cursor class.');\n }\n } else {\n // Using \"stdnav.getClosestNavigableDescendant\" here would just\n // give us the sublist, if any, if that appears in the markup\n // prior to the actual link on this item. Therefore, explicitly\n // look for buttons, links, and form fields only.\n let $links = $el.find('a,:input');\n let isButtonLink = $el.hasClass('button focus-visible')\n\n if ($links.length > 0) {\n // Fire the click handler\n eventAutomation.simulateClickSequence($links[0]);\n }\n\n if(isButtonLink) {\n eventAutomation.simulateClickSequence($el[0]);\n }\n\n }// DO NOT move focus.\n return element;\n },\n // Focus adjustment callback. Given an element somewhere within a\n // dynamicList, including the list itself, return the element which should\n // have get focused. This is done by obtaining the cursor for the list.\n _fixFocus: function (element) {\n function findRow(el){\n if ($(el).attr('role') === 'row'){\n return el;\n }\n\n return element.querySelector('[role=\"row\"]') ? element.querySelector('[role=\"row\"]') : element;\n }\n\n var $listEl = $(element).closest('[js-navtype=\\'' + this.navtype + '\\']');\n if ($listEl.length < 1) {\n logger.warn('Can\\'t find a dynamic list to fix focus to');\n return findRow(element);\n }\n var listObj = dynamicList.getDynamicListForElement($listEl[0]);\n if (stdnav.nullOrUndefined(listObj)) {\n logger.warn('Can\\'t map a dynamic list to fix focus to');\n return findRow(element);\n }\n if($(element).attr('role')==='treegrid'){\n if($(element).find('.selected').length){\n return $(element).find('.selected[role=\"row\"]');\n }\n let focusableEl = findRow(element);\n $(focusableEl).addClass('selected');\n return focusableEl;\n }\n return listObj.getCursorElement();\n },\n // Subfocus adjustment callback. Use the same element that has focus.\n _fixSubfocus: function (element) {\n return null;\n },\n // Superfocus adjustment callback. Given an element somewhere within a\n // sub-DOM within a list, ensures that the list itself (OL,UL) is given\n // superfocus.\n _fixSuperfocus: function (element) {\n var newSuperfocus;\n var $closestList = $(element).closest('ol,ul');\n if ($closestList.length > 0) {\n newSuperfocus = $closestList[0];\n } else {\n // FAULT, let StdNav fall back to BODY\n newSuperfocus = null;\n }\n return newSuperfocus;\n },\n /* ========== NAVTYPE BEHAVIOR CALLBACKS =========== */\n // The list has been entered from another control, and superfocus has been\n // set appropriately. Browser focus may be temporarily on the control's\n // container. Return the element which should receive browser focus for\n // accessibility purposes.\n _onSuperfocusIn: function (element) {\n var newFocus; // This should fire on the list itself, not the item.\n // This should fire on the list itself, not the item.\n var ghosts = $(element).children('li .ghostfocus');\n if (ghosts.length > 0) {\n ghosts.removeClass('ghostfocus'); // Promote ghost.\n // Promote ghost.\n newFocus = ghosts[0];\n } else {\n // No ghosts. Set focus to first item.\n var items = $(element).children('li[js-navigable!=\"false\"]');\n if (items.length > 0) {\n newFocus = items[0];\n } else {\n // For visual reasons, in the case of an empty list, we give up and\n // set subfocus to the list itself.\n newFocus = element;\n }\n }\n return newFocus;\n },\n // The list is being exited for another control, and superfocus has been\n // lost.\n _onSuperfocusOut: function (element) {\n } // FIXME: ghostfocus\n}); // SECOND EXTENSION PASS - ATTRIBUTES\n// Hash members in this pass can reference functions from the last pass.\n// SECOND EXTENSION PASS - ATTRIBUTES\n// Hash members in this pass can reference functions from the last pass.\n$.extend(stdnavPluginDynamicList.prototype, {\n // This is the name of the new navtype. Each stdnav plugin must\n // define a unique name.\n navtype: 'dynamiclist',\n // This arrary extends the tag-to-navtype map in stdnav. If your\n // plugin should apply to all elements of a given type, add those\n // element tagnames, in lower case, to this array. It is normally\n // empty, and the page templates simply set an appropriate\n // \"data-navtype=\" attribute to get the expected behavior.\n //\n // The normal List plugin should handle UL and OL tags by default.\n navtype_tags: []\n});\nvar newStdnavPluginDynamicList = new stdnavPluginDynamicList();\nexport default newStdnavPluginDynamicList;\n","/*\n * Copyright (C) 2005 - 2022 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\n/**\n* @author: ${username}\n* @version: $Id$\n*/\n\n/* Standard Navigation library (stdnav) plugin\n* Elements: FORM, INPUT, OPTION, OPTGROUP, SELECT, TEXTAREA\n* Navtype: forms (element default)\n*\n* Plugin for the \"forms\" navtype. This is the default-- AND STRONGLY\n* RECOMMENDED-- behavior for forms and inputs. Primarily needed to ensure\n* that input controls inside of lists and grids can properly obtain focus,\n* and also so they don't get inappropriate navigation effects intended for\n* their parents. Be aware that \"button\" has its own plugin.\n*\n* Note that screen readers take classic, standard web forms more seriously\n* than practically anything else. They implement them well, and in general\n* you will want to stay out of their way. Avoid unexpected focus changes\n* when dealing with forms.\n*\n* This module supports enhancements intended to improve compliance with\n* section 508 of the Rehabilitation Act of 1973, 29 USC 798, as amended\n* 1998.\n*/\nimport $ from 'jquery';\nimport log from \"js-sdk/src/common/logging/logger\";\nimport stdnav from 'js-sdk/src/common/stdnav/stdnav';\n\nimport eventAutomation from \"js-sdk/src/common/util/eventAutomation\";\n\nimport layoutModule from \"../../core/core.layout\";\n\nlet logger = log.register('stdnav');\n\nvar version = \"0.0.1\",\n singleton = null,\n gserial = 0;\n\n// TODO: get rid of dependency on JRS mark-up\nlayoutModule.INPUT_ZOOM_VALUE = 'input#zoom_value';\nlayoutModule.INPUT_SEARCH_REPORT = 'input#search_report';\nlayoutModule.PAGE_CURRENT = 'input#page_current';\n\nlayoutModule.MENU_VWROPTIONS = '#vwroptions .menu.vertical.dropDown.fitable';\nlayoutModule.MENU_VWROPTIONS_LIST = '#vwroptions .menu.vertical.dropDown.fitable li';\n\n// Local object definition.\n\nvar stdnavPluginForms = function () {\n gserial++;\n this.serial = gserial;\n};\n\n// FIRST EXTENSION PASS - FUNCTIONS\n// Provides forward-references for hashes in the second pass, so that\n// references in that second pass to functions declared here resolve\n// (since the entire pass is applied at once, they cannot be combined).\n$.extend(stdnavPluginForms.prototype, {\n zinit: function (selector) {\n logger.debug('stdnavPluginForms.init(' + selector + \")\\n\");\n return this;\n },\n\n // Registers the 'forms' navtype with stdnav. stdnav must be loaded and\n // activated before this can be done.\n activate: function () {\n // This is the behaviour hash for the navtype. These defaults pass\n // everything through to the browser, and are normally overridden\n // with $.extend based on specific tagnames and stdnav attributes.\n //\n // For dynamic lists, pass arrow keys through to the existing keyboard\n // behavior.\n this.behavior = {\n 'ariaprep': [this, this._ariaPrep, null],\n 'ariarefresh': [this, this._ariaRefresh, null],\n 'down': [this, this._onDown, null],\n 'enter': [this, this._onEnter, null],\n 'exit': [this, this._onExit, null],\n 'inherit': false,\n 'inheritable': true,\n 'fixsuperfocus': [stdnav, stdnav.basicFixSuperfocus, null],\n 'superfocusin': [stdnav, stdnav.basicSuperfocusIn, {\n 'maxdepth': 1,\n 'focusSelector': ':input',\n 'ghostfocus': false\n }]\n }\n stdnav.registerNavtype(this.navtype, this.behavior, this.navtype_tags);\n },\n\n // Unregisters the 'forms' navtype from stdnav. This must be done\n // before deactivating/unloading stdnav.\n deactivate: function () {\n stdnav.unregisterNavtype(this.navtype, this.behavior);\n },\n\n // This callback is run when the page is initially rendered. Add the\n // appropriate ARIA tags for the handled construct, if they do not already\n // exist. The element passed will be the superfocus for the construct\n // being instrumented, but this construct may not actually have focus at\n // the time this function is called.\n _ariaPrep: function (el) {\n //$(el).attr('role', 'form');\n return null;\n },\n\n // This callback is run when the superfocus changes to the construct.\n // Its two purposes are to update existing constructs, and to handle\n // dynamically-created content whose creation was not detected during\n // initial page construction (possibly because no part of the construct\n // existed yet). The element passed will be the superfocus for the\n // construct, but this construct may not actually have focus at the time\n // this function is called.\n _ariaRefresh: function (el) {\n //$(el).attr('role', 'form');\n return null;\n },\n\n /* ========== NAVTYPE BEHAVIOR CALLBACKS =========== */\n\n /* ========== KEYBOARD BEHAVIOR =========== */\n //ToDo need refactor!!!\n _onDown: function(element){\n var $el = $(element);\n if($el.is(\"input#zoom_value\")){\n this.parent = element;\n $el.closest(\"li\").addClass(\"isParent\");\n eventAutomation.simulateClickSequence($('button#zoom_value_button')[0]);\n $(layoutModule.MENU_VWROPTIONS_LIST).first().find(\"p\").addClass(\"over\");\n element = $(layoutModule.MENU_VWROPTIONS_LIST).first()[0];\n } else if($el.is(\"input#search_report\")){\n this.parent = element;\n $el.closest(\"li\").addClass(\"isParent\");\n eventAutomation.simulateClickSequence($('button#search_options')[0]);\n $(layoutModule.MENU_VWROPTIONS_LIST).first().find(\"p\").addClass(\"over\");\n element = $(layoutModule.MENU_VWROPTIONS_LIST).first()[0]\n }\n\n return element;\n },\n\n _onExit: function(element){\n var $el = $(element);\n\n if($el.is(layoutModule.INPUT_ZOOM_VALUE)){\n element = $(\"li.zoom.leaf.j-dropdown\")[0];\n } else if ($el.is(layoutModule.INPUT_SEARCH_REPORT)){\n element = $(\"li.search.leaf.j-dropdown\")[0];\n } else if ($el.is(layoutModule.PAGE_CURRENT)){\n element = $(\"li.paging.leaf.j-dropdown\")[0];\n }\n\n return element;\n },\n\n _onEnter: function(element){\n var $el = $(element);\n\n if($el.is(layoutModule.INPUT_ZOOM_VALUE)){\n element = $(\"li.zoom.leaf.j-dropdown\")[0];\n } else if ($el.is(layoutModule.INPUT_SEARCH_REPORT)){\n element = $(\"li.search.leaf.j-dropdown\")[0];\n } else if ($el.is(layoutModule.PAGE_CURRENT)){\n element = $(\"li.paging.leaf.j-dropdown\")[0];\n }\n\n return element;\n }\n});\n\n// SECOND EXTENSION PASS - ATTRIBUTES\n// Hash members in this pass can reference functions from the last pass.\n$.extend(stdnavPluginForms.prototype, {\n // This is the name of the new navtype. Each stdnav plugin must\n // define a unique name.\n navtype: 'forms',\n\n // This arrary extends the tag-to-navtype map in stdnav. If your\n // plugin should apply to all elements of a given type, add those\n // element tagnames, in lower case, to this array. It is normally\n // empty, and the page templates simply set an appropriate\n // \"data-navtype=\" attribute to get the expected behavior.\n // Note that 'button' has its own plugin.\n // USE UPPER-CASE!\n navtype_tags: ['FORM', 'INPUT', 'OPTGROUP', 'OPTION', 'SELECT', 'TEXTAREA']\n});\nvar newStdnavPluginForms = new stdnavPluginForms();\nexport default newStdnavPluginForms;","/*\n * Copyright (C) 2005 - 2020 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\nimport $ from 'jquery';\nimport _ from 'underscore';\nimport stdnav from 'js-sdk/src/common/stdnav/stdnav';\nimport actionModel from '../../actionModel/actionModel.modelGenerator';\nimport buttonManager from '../../core/core.events.bis';\nimport layoutModule from '../../core/core.layout';\nimport primaryNavigation from '../../actionModel/actionModel.primaryNavigation';\nimport log from 'js-sdk/src/common/logging/logger';\nimport eventAutomation from \"js-sdk/src/common/util/eventAutomation\";\nimport {AriaProps} from \"js-sdk/src/common/util/accessibility/waiAriaConstants\";\n\nvar logger = log.register(\"stdnav\");\n\nconst ActiveTopLevelMenuAttribute = 'data-toplevel-descendant';\n\nconst $mainMenu = $('#' + layoutModule.MAIN_NAVIGATION_ID);\nconst $homeMenu = $('#' + layoutModule.MAIN_NAVIGATION_HOME_ITEM_ID);\nconst $libraryMenu = $('#' + layoutModule.MAIN_NAVIGATION_LIBRARY_ITEM_ID);\n\nvar stdnavPluginMainMenu = function () {\n this.menu_item_callbacks = {\n click: {}\n };\n};\n\n_.extend(stdnavPluginMainMenu.prototype, {\n zinit: function (selector) {\n return this;\n },\n\n // Registers the 'actionMenu' navtype with stdnav. Both stdnav and ActionMenu\n // must be loaded and activated before this can be done.\n activate: function () {\n // This is the behaviour hash for the navtype. These defaults pass\n // everything through to the browser, and are normally overridden\n // with $.extend based on specific tagnames and stdnav attributes.\n this.behavior = {\n 'toggle': [this, this._onToggle, null],\n 'enter': [this, this._onEnter, null],\n 'exit': [this, this._onExit, null],\n 'fixfocus': [this, this._fixFocus, null],\n 'fixsubfocus': [this, this._fixFocus, null],\n 'ariarefresh': [this, this._ariaRefresh, null],\n 'focusin': [this, this._onFocusIn, null],\n 'focusout': [this, this._onFocusOut, null],\n 'click': [this, this._onClick, null],\n 'subfocusin': [this, this._onSubfocusIn, null],\n 'subfocusout': [this, this._onSubfocusOut, null],\n 'left': [this, this._onLeft, null],\n 'right': [this, this._onRight, null],\n 'up': [this, this._onUp, null],\n 'down': [this, this._onDown, null],\n 'home': [this, this._onHome, null],\n 'end': [this, this._onEnd, null],\n 'inherit': false,\n 'inheritable': true\n };\n stdnav.registerNavtype(this.navtype, this.behavior, this.navtype_tags);\n },\n\n // Unregisters the 'actionMenu' navtype from stdnav. This must be done\n // before deactivating/unloading stdnav.\n deactivate: function () {\n stdnav.unregisterNavtype(this.navtype, this);\n },\n\n /* ====== Focus Management ====== */\n\n _fixFocus: function (element) {\n return element;\n },\n\n _ariaRefresh: function () {\n this._setHasSubMenuAriaAttributes($mainMenu.find(layoutModule.NAVIGATION_MUTTON_PATTERN));\n },\n\n _setOpenSubMenuAriaAttributeState: function (p, open, mute = false) {\n const $activeToplevelMenu = $(p);\n if ($activeToplevelMenu.attr(AriaProps.HasPopup)) {\n const role = $activeToplevelMenu.attr('role');\n mute && $activeToplevelMenu.attr('role', 'none')\n $activeToplevelMenu\n .attr(AriaProps.Expanded, open ? 'true' : 'false')\n mute && $activeToplevelMenu.attr('role', role)\n }\n },\n\n _setHasSubMenuAriaAttributes: function (element) {\n const $menuWithSubmenu = $(element);\n $menuWithSubmenu.find('> p')\n .attr(AriaProps.Expanded, 'false')\n .attr(AriaProps.HasPopup, 'true')\n .attr(AriaProps.Controls, actionModel.PARENT_MENU_CONTAINER)\n .attr(AriaProps.Owns, actionModel.PARENT_MENU_CONTAINER)\n },\n\n _closeSubMenu: function (element) {\n this._setOpenSubMenuAriaAttributeState($(element).find('> p'), false);\n\n actionModel.hideMenu();\n },\n\n _showSubMenu: function (element) {\n const $activeToplevelMenu = $(element);\n const $menuWithSubmenu = $activeToplevelMenu.closest(layoutModule.NAVIGATION_MUTTON_PATTERN);\n if ($menuWithSubmenu.length>0) {\n const $p = $menuWithSubmenu.find('p');\n const allExpandedMenuItems = $mainMenu.find(`${layoutModule.NAVIGATION_MUTTON_PATTERN} > p[${AriaProps.Expanded}=true]`);\n if (allExpandedMenuItems.length && !$p.is(allExpandedMenuItems)) {\n this._setOpenSubMenuAriaAttributeState(allExpandedMenuItems, false, true);\n }\n\n this._setOpenSubMenuAriaAttributeState($p, true)\n primaryNavigation.showNavButtonMenu(null, $menuWithSubmenu[0], $menuWithSubmenu.text().trim());\n } else {\n this._closeSubMenu($activeToplevelMenu[0]);\n }\n },\n\n _getActiveTopLevelMenu: function () {\n const activeToplevelMenuId = $mainMenu.attr(ActiveTopLevelMenuAttribute);\n return $(`#${activeToplevelMenuId}`);\n },\n\n _onFocusIn: function (element) {\n const $el = $(element);\n let activeTopLevelMenuId = $el.attr(ActiveTopLevelMenuAttribute);\n if (!activeTopLevelMenuId) {\n activeTopLevelMenuId = $el.find('li').first().attr('id');\n $el.attr(ActiveTopLevelMenuAttribute, activeTopLevelMenuId);\n }\n\n const $activeToplevelMenu = this._getActiveTopLevelMenu();\n return $activeToplevelMenu[0];\n },\n\n _onFocusOut: function (element) {\n buttonManager.out($(element).find(layoutModule.BUTTON_PATTERN)[0]);\n this._closeSubMenu(element);\n\n return null;\n },\n\n _onClick: function (element) {\n const menuItem = $(element).closest('li');\n if (menuItem.length > 0) {\n stdnav.setSubfocus(menuItem);\n }\n },\n\n /* ========== NAVTYPE BEHAVIOR CALLBACKS =========== */\n\n _onSubfocusIn: function (element) {\n const $el = $(element).closest('li');\n const elementId = $el.find('p').attr('id') ?? $el.attr('id');\n $mainMenu.attr(AriaProps.ActiveDescendant, elementId);\n buttonManager.over($el.find(layoutModule.BUTTON_PATTERN)[0]);\n\n if ($el.closest('#' + layoutModule.MAIN_NAVIGATION_ID).length) {\n $mainMenu.attr(ActiveTopLevelMenuAttribute, $el.attr('id'));\n this._showSubMenu($el);\n }\n },\n\n _onSubfocusOut: function (element) {\n buttonManager.out($(element).find(layoutModule.BUTTON_PATTERN)[0]);\n },\n\n _onToggle: function (element) {\n this._onEnter(element);\n },\n\n _onEnter: function (element) {\n if (!actionModel.isMenuShowing()) {\n this._showSubMenu(element);\n }\n\n if ($(element).is(`#${layoutModule.MAIN_NAVIGATION_ID} li`) && (!($(element).is($homeMenu) || $(element).is($libraryMenu)))) {\n this._onDown(element);\n } else {\n eventAutomation.simulateClickSequence(element);\n }\n },\n\n _onExit: function (element) {\n const $activeTopLevelMenu = this._getActiveTopLevelMenu()\n stdnav.setSubfocus($activeTopLevelMenu[0]);\n this._closeSubMenu($activeTopLevelMenu)\n },\n\n /* ========== KEYBOARD BEHAVIOR =========== */\n _onLeft: function (element){\n const $activeTopLevelMenu = this._getActiveTopLevelMenu()\n\n let $prev = $activeTopLevelMenu.prev();\n if ($prev.length === 0) {\n $prev = $mainMenu.find('li').last();\n }\n\n stdnav.setSubfocus($prev[0]);\n },\n\n _onRight: function (element) {\n const $activeTopLevelMenu = this._getActiveTopLevelMenu()\n\n let $next = $activeTopLevelMenu.next();\n if ($next.length === 0) {\n $next = $mainMenu.find('li').first();\n }\n\n stdnav.setSubfocus($next[0]);\n },\n\n _getNextActiveDescendant: function (activeDescendantId) {\n var $menuItems = $(layoutModule.MENU_LIST_PATTERN);\n var $thisItem = activeDescendantId ? $(`#${activeDescendantId}`).closest('li') : null;\n var $firstItem = $menuItems.first();\n var $next = activeDescendantId ? $thisItem.next(layoutModule.MENU_LIST_PATTERN) : $firstItem;\n\n if (!$next[0]) {\n $next = $firstItem;\n }\n\n // Oddly, trying to add \":not(.separator)\" to the pattern\n // above did not work; the separator was indeed skipped, but\n // the menu item after it was not returned. This code skips\n // over any number of adjacent separators.\n while ($next.is(layoutModule.SEPARATOR_PATTERN)){\n $next=$next.next(layoutModule.MENU_LIST_PATTERN);\n }\n\n return $next;\n },\n\n _getPreviousActiveDescendant: function (activeDescendantId) {\n var $menuItems = $(layoutModule.MENU_LIST_PATTERN);\n var $thisItem = activeDescendantId ? $(`#${activeDescendantId}`).closest('li') : null;\n var $lastItem = $menuItems.last();\n var $previous = activeDescendantId ? $thisItem.prev(layoutModule.MENU_LIST_PATTERN) : $lastItem;\n\n if (!$previous[0]) {\n $previous = $lastItem;\n }\n\n // Oddly, trying to add \":not(.separator)\" to the pattern\n // above did not work; the separator was indeed skipped, but\n // the menu item after it was not returned. This code skips\n // over any number of adjacent separators.\n while ($previous.is(layoutModule.SEPARATOR_PATTERN)){\n $previous = $previous.prev(layoutModule.MENU_LIST_PATTERN);\n }\n\n return $previous;\n },\n\n _onUp: function (element) {\n if (!actionModel.isMenuShowing()) {\n this._showSubMenu(element);\n }\n\n if (actionModel.isMenuShowing()) {\n const activeDescendantId = $mainMenu.attr(AriaProps.ActiveDescendant);\n const $prev = this._getPreviousActiveDescendant(activeDescendantId);\n\n stdnav.setSubfocus($prev[0]);\n }\n },\n\n _onDown: function (element) {\n if (!actionModel.isMenuShowing()) {\n this._showSubMenu(element);\n }\n\n if (actionModel.isMenuShowing()) {\n const activeDescendant = $mainMenu.attr(AriaProps.ActiveDescendant);\n const $next = this._getNextActiveDescendant(activeDescendant);\n\n stdnav.setSubfocus($next[0]);\n }\n },\n\n _onHome: function (element) {\n const first = $(element).closest('ul').find('li').first()[0];\n stdnav.setSubfocus(first);\n },\n\n _onEnd: function (element) {\n const last = $(element).closest('ul').find('li').last()[0];\n stdnav.setSubfocus(last);\n }\n});\n\n// SECOND EXTENSION PASS - ATTRIBUTES\n// Hash members in this pass can reference functions from the last pass.\n$.extend(stdnavPluginMainMenu.prototype, {\n // This is the name of the new navtype. Each stdnav plugin must\n // define a unique name.\n navtype: 'mainmenu',\n\n // This arrray extends the tag-to-navtype map in stdnav. If your\n // plugin should apply to all elements of a given type, add those\n // element tagnames, in lower case, to this array. It is normally\n // empty, and the page templates simply set an appropriate\n // \"data-navtype=\" attribute to get the expected behavior.\n //\n // NOTE: The HTML5 \"menu\" element is still very broken. In practice\n // our menus are built with list items and use \"js-navtype\" overrides to\n // this type.\n //\n // CASE SENSITIVE - USE UPPER-CASE!\n navtype_tags: []\n});\n\nexport default new stdnavPluginMainMenu();\n","/*\n * Copyright (C) 2005 - 2022 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\n\n/**\n * @version: $Id: $\n */\n\n/* Standard Navigation library (stdnav) plugin\n * Elements: LI, OL, UL\n * Navtype: toolbar\n *\n * Plugin for toolbar menus, which may consist of simple buttons, text inputs,\n * buttons with drop-down options, tabs, etc. It handles the basic keyboard\n * navigation: moving left/right, opening the drop-downs, firing the actions.\n *\n * This module supports enhancements intended to improve compliance with\n * section 508 of the Rehabilitation Act of 1973, 29 USC 798, as amended\n * 1998.\n */\n\nimport $ from 'jquery';\nimport _ from 'underscore';\nimport stdnav from 'js-sdk/src/common/stdnav/stdnav';\nimport buttonManager from '../../core/core.events.bis';\nimport layoutModule from '../../core/core.layout';\nimport primaryNavigation from '../../components/components.toolbarButtons';\nimport eventAutomation from 'js-sdk/src/common/util/eventAutomation';\nimport actionModel from '../../actionModel/actionModel.modelGenerator';\n\nvar gserial = 0;\n\n// TODO: get rid of dependency on JRS mark-up\nlayoutModule.TOOLBAR_MENU_PATTERN = 'ul.j-toolbar';\nlayoutModule.TOOLBAR_MENU_ITEM_PATTERN = 'ul.j-toolbar li';\n\nlayoutModule.BUTTON_ZOOM_VALUE = 'button#zoom_value_button';\nlayoutModule.BUTTON_SEARCH_REPORT = 'button#search_report_button';\nlayoutModule.BUTTON_SEARCH_OPTIONS = 'button#search_options';\nlayoutModule.BUTTON_FILE_OPTIONS = 'button#fileOptions';\nlayoutModule.BUTTON_EXPORT = 'button#export';\n\nlayoutModule.INPUT_ZOOM_VALUE = 'input#zoom_value';\nlayoutModule.INPUT_SEARCH_REPORT = 'input#search_report';\n\nlayoutModule.VIEWER_TOOLBAR = '#viewerToolbar';\nlayoutModule.MENU_VWROPTIONS = '#vwroptions .menu.vertical.dropDown.fitable';\nlayoutModule.MENU_VWROPTIONS_LIST = '#vwroptions .menu.vertical.dropDown.fitable li';\n\n\nvar StdnavPluginToolbar = function () {\n gserial++;\n this.serial = gserial;\n};\n\n_.extend(StdnavPluginToolbar.prototype, {\n zinit: function (selector) {\n return this;\n },\n\n // Registers the 'toolbar' navtype with stdnav. Both stdnav and toolbar\n // must be loaded and activated before this can be done.\n activate: function () {\n // This is the behaviour hash for the navtype. These defaults pass\n // everything through to the browser, and are normally overridden\n // with $.extend based on specific tagnames and stdnav attributes.\n this.behavior = {\n 'ariaprep': [this, this._ariaPrep, null],\n 'ariarefresh': [this, this._ariaRefresh, null],\n 'down': [this, this._onDown, null],\n 'enter': [this, this._onEnterOrEntered, null],\n 'exit': [this, this._onExit, null],\n 'fixfocus': [this, this._fixFocus, null],\n 'fixsubfocus': [this, this._fixFocus, null],\n 'fixsuperfocus': [this, this._fixSuperfocus, null],\n 'focusin': [this, this._onFocusIn, null],\n 'focusout': [this, this._onFocusOut, null],\n 'left': [this, this._onLeft, null],\n 'right': [this, this._onRight, null],\n 'subfocusin': [this, this._onSubfocusIn, null],\n 'superfocusin': [this, this._onSuperfocusIn, null],\n 'superfocusout': [this, this._onSuperfocusOut, null],\n 'up': [this, this._onUp, null],\n 'inherit': false\n };\n stdnav.registerNavtype(this.navtype, this.behavior, this.navtype_tags);\n },\n\n // Unregisters the 'toolbar' navtype from stdnav. This must be done\n // before deactivating/unloading stdnav.\n deactivate: function () {\n stdnav.unregisterNavtype(this.navtype, this);\n },\n\n // This callback is run when the page is initially rendered. Add the\n // appropriate ARIA tags for the handled construt, if they do not already\n // exist. The element passed will be the superfocus for the construct\n // being instrumented, but this construct may not actually have focus at\n // the time this function is called.\n _ariaPrep: function (el) {\n this._ariaRefresh(el);\n },\n\n // This callback is run when the superfocus changes to the construct.\n // Its two purposes are to update existing constructs, and to handle\n // dynamically-created content whose creation was not detected during\n // initial page construction (possibly because no part of the construct\n // existed yet). The element passed will be the superfocus for the\n // construct, but this construct may not actually have focus at the time\n // this function is called.\n _ariaRefresh: function (el) {\n var $items = $(el).find('li').not(\".divider\");\n $(el).attr('role', 'application');\n $.each($items, function (key, item) {\n var $item = $(item);\n $item.attr('role', 'option');\n var $labeledEl = $item.find(\"[aria-label]\");\n if (!$item.attr('aria-label') && $labeledEl.length) {\n $item.attr('aria-label', $labeledEl.attr('aria-label'));\n }\n });\n return null;\n },\n\n /* ====== Focus Management ====== */\n\n\n // Focus adjustment callback. Ensures that if the DIV or UL elements\n // themselves are given focus, that it is promoted to the first LI.\n _fixFocus: function (element) {\n var newFocus;\n var $el = $(element);\n if ($el.is('div,ul,ol')) {\n // The usual case: the entire menu is gaining focus. One of\n // the reasons this can happen, of course, is in response to a\n // mouse click, not a TAB press-- as a result, check to see if\n // any of the menu options has the \"pressed\" CSS class, and\n // focus that, if it does. However, ignore the \"over\" class,\n // as the mouse pointer can wind up anywhere for a blind user\n // by total coincidence, so it must be ignored when setting\n // focus in response to TAB.\n //\n // If nothing seems to be in use yet, select the first list\n // item-- if there ARE any.\n //\n // Failing even that, select the list itself.\n var items = $el.find('.pressed');\n if (items.length > 0) {\n newFocus = items[0];\n } else {\n items = $el.find('li').not(\".divider\");\n if (items.length > 0) {\n newFocus = items[0];\n } else {\n // The entire list is empty-- set focus to the root list element\n // after all.\n newFocus = element;\n }\n }\n } else if ($el.is('button')) {\n // Focus is already appropriate.\n newFocus = element;\n } else {\n // Assume we're in a span or something within a list item.\n var lis = $el.closest('li');\n if (lis.length > 0) {\n if ($(lis[0]).prop['js-navigable'] === false) {\n // Clicked on a header or something; focus the list instead.\n newFocus = $el.closest('ul,ol');\n } else {\n newFocus = lis[0];\n }\n }\n }\n\n // Avoid focusing disabled button\n if ($(newFocus).is(\":disabled\") || $(newFocus).find(\".button,.mutton\").is(\":disabled\")) {\n newFocus = stdnav.closestNavigableAncestor(newFocus);\n }\n\n // this code is necessary to fix JS-63350\n if (newFocus[0] === $el[0]) {\n newFocus = null;\n }\n\n return newFocus;\n },\n\n // Superfocus adjustment callback. Because of the way actionModel\n // works, the menu is expected to be rooted in an enclosing DIV that\n // contains the list, so use the DIV for the superfocus region.\n // However, context menus are _not_\n _fixSuperfocus: function (element) {\n var newSuperfocus;\n var $root = $(element).closest('ul');\n if ($root.length > 0) {\n newSuperfocus = $root[0];\n } else {\n // FAULT, let StdNav fall back to BODY\n newSuperfocus = null;\n }\n return newSuperfocus;\n },\n\n /* ========== NAVTYPE BEHAVIOR CALLBACKS =========== */\n\n _onSuperfocusIn: function(element){\n var $elem = $(element),\n $parentList = $(this.parent).closest(layoutModule.TOOLBAR_MENU_PATTERN),\n $currentList = $elem.closest(\".menu\").length && $elem;\n\n if( $currentList && ($parentList.attr(\"tabindex\")>-1)){\n this._parentTabindex = $parentList.attr(\"tabindex\");\n\n if (this._parentTabindex>-1) {\n $currentList.attr('js-suspended-tabindex', this._parentTabindex);\n $currentList.find(\"li:first\").attr('tabindex', this._parentTabindex);\n } else {\n $elem.attr('js-suspended-tabindex', 'none');\n $currentList.find(\"li:first\").attr('tabindex', -1);\n }\n\n // Explicitly make the element unfocusable-- temporarily.\n $currentList.attr('tabindex', '-1');\n $parentList.attr(\"tabindex\", \"-1\");\n }\n\n return element;\n },\n\n _onSubfocusIn: function(element){\n var $ul = $(element).closest(layoutModule.TOOLBAR_MENU_PATTERN);\n\n if($ul.attr('js-suspended-tabindex')>-1){\n $(element).attr(\"tabindex\", $ul.attr('js-suspended-tabindex'));\n } else if ($ul.attr('tabindex')>-1){\n $(element).attr(\"tabindex\", $ul.attr('tabindex'));\n $ul.attr('js-suspended-tabindex', $ul.attr('tabindex'));\n }\n },\n\n _onFocusIn: function (element) {\n var $thisItem,\n $matched;\n\n var $selected = $(element);\n if ($selected.length>0) {\n $thisItem = $selected.closest(layoutModule.TOOLBAR_MENU_ITEM_PATTERN);\n if ($thisItem.length>0) {\n // An item in the main menu bar has been focused.\n buttonManager.over($thisItem.find(\".button\")[0]);\n //buttonManager.over($thisItem.find(layoutModule.MENU_LIST_PATTERN)[0]); //ToDo\n $matched = $thisItem.find(\".mutton\");\n\n if ($matched.length>0 && !buttonManager.isDisabled($matched.context)) {\n // The item has a submenu-- show it.\n //actionModel.hideMenu();\n primaryNavigation.showButtonMenu(null, $matched[0]);\n } else {\n // An item with no drop-down menu has been focused;\n // ensure any drop-down menus for other items are closed.\n actionModel.hideMenu();\n $(layoutModule.MENU_VWROPTIONS).hide();\n }\n } else {\n $thisItem = $selected.is(\".menu li\")? $selected : $selected.closest(\".menu\");\n if ($thisItem.length>0) {\n // An item in a drop-down or context menu has been focused.\n buttonManager.over($thisItem.find(\"p\")[0]);\n }\n\n // TODO: get rid of dependency on JRS mark-up\n if($selected.is(layoutModule.BUTTON_ZOOM_VALUE) || $selected.is(layoutModule.BUTTON_SEARCH_REPORT)\n || $selected.is(layoutModule.BUTTON_SEARCH_OPTIONS)){\n $selected.click();\n }\n }\n }\n return element;\n },\n\n _onFocusOut: function (element) {\n var $thisItem = $(element).closest(layoutModule.TOOLBAR_MENU_ITEM_PATTERN);\n\n if ($thisItem.length>0) {\n // A top-level item in the main menu bar has lost focus.\n //actionModel.hideMenu();\n // Don't remove the style if we've moved into a drop-down menu.\n if (this.lastMenuBarItem !== element){\n buttonManager.out($thisItem.find(layoutModule.BUTTON_PATTERN)[0]);\n $thisItem.removeAttr(\"tabindex\");\n }\n //buttonManager.out($thisItem.find(layoutModule.MENU_LIST_PATTERN)[0]);\n } else {\n $thisItem = $(element).closest(layoutModule.MENU_LIST_PATTERN);\n if ($thisItem.length>0) {\n // An item in a drop-down or context menu has lost focus.\n buttonManager.out($thisItem.find(layoutModule.BUTTON_PATTERN)[0]);\n $thisItem.removeAttr(\"tabindex\");\n }\n }\n\n return null;\n },\n\n _onSuperfocusOut: function(element){\n var $toolbar = $(layoutModule.VIEWER_TOOLBAR);\n\n if ($toolbar.length<1){\n // There is no main navigation in embedded mode.\n return element;\n }\n // Hide the dropdown menu unless the new focus is _in_ the\n // dropdown menu. Because of the way actionModel works, the\n // dropdown menu is NOT a DOM descendant of the toolbar.\n var newFocus=$(document.activeElement);\n if (newFocus.closest('.dropDown').length<1){\n var $selected = $toolbar.find(\".\" + layoutModule.HOVERED_CLASS);\n\n if ($selected.length>0) {\n buttonManager.out($selected[0]);\n }\n\n actionModel.hideMenu();\n $(layoutModule.MENU_VWROPTIONS).hide();\n\n // Explicitly make the element unfocusable-- temporarily.\n var $ul = $(this.parent).closest(layoutModule.TOOLBAR_MENU_PATTERN);\n\n $ul.attr(\"tabindex\", this._parentTabindex);\n\n this.parent = null;\n this.lastMenuBarItem = null;\n $(\".isParent\").removeClass(\"isParent\");\n }\n },\n\n /* ========== KEYBOARD BEHAVIOR =========== */\n\n\n /* ========== KEYBOARD BEHAVIOR =========== */\n _onLeft: function (element){\n var $thisItem = $(element).closest(layoutModule.TOOLBAR_MENU_ITEM_PATTERN);\n var $prev=$(element);\n\n if(!$thisItem.length && $(element).closest(\".menu\").length){\n $thisItem = $(this._onExitHandler(element));\n }\n\n if ($thisItem.length>0){\n var $prevAll = $thisItem.prevAll(layoutModule.TOOLBAR_MENU_ITEM_PATTERN);\n $prevAll.each(function(key, elem){\n var $elem = $(elem);\n if(!$elem.hasClass(\"divider\") && $elem.find(\"button:disabled\").length === 0 && $elem.find(\"button:hidden\").length === 0){\n $prev = $elem;\n return false;\n }\n });\n }\n\n return $prev[0];\n },\n\n _onRight: function (element) {\n var $thisItem = $(element).closest(layoutModule.TOOLBAR_MENU_ITEM_PATTERN);\n var $next=$(element);\n\n if(!$thisItem.length && $(element).closest(\".menu\").length){\n $thisItem = $(this._onExitHandler(element));\n }\n\n if ($thisItem.length>0){\n var $nextAll = $thisItem.nextAll(layoutModule.TOOLBAR_MENU_ITEM_PATTERN);\n $nextAll.each(function(key, elem){\n var $elem = $(elem);\n if(!$elem.hasClass(\"divider\") && $elem.find(\"button:disabled\").length === 0 && $elem.find(\"button:hidden\").length === 0){\n $next = $elem;\n return false;\n }\n });\n }\n\n return $next[0];\n },\n\n _onUp: function (element) {\n var $prev = $(element);\n\n if($(element).closest(\".menu\").length){\n if($prev.prev().length){\n $prev.find(\"p\").removeClass(layoutModule.HOVERED_CLASS);\n $prev = $prev.prev().hasClass(\"separator\") ? $prev.prev().prev() : $prev.prev();\n $prev.find(\"p\").addClass(layoutModule.HOVERED_CLASS);\n } else {\n $prev.length = 0;\n }\n }\n\n if ($prev.length>0){\n return $prev[0];\n } else {\n return this._onExitHandler(element);\n }\n },\n\n _onDown: function (element) {\n var $menu,\n $button,\n $next = $(element),\n $input = $next.find(\"input\");\n\n // TODO: get rid of dependency on JRS mark-up\n if ($input.is(layoutModule.INPUT_ZOOM_VALUE) ){\n $button = $(layoutModule.BUTTON_ZOOM_VALUE);\n } else if ($input.is(layoutModule.INPUT_SEARCH_REPORT) ){\n $button = $(layoutModule.BUTTON_SEARCH_OPTIONS);\n }\n\n if($button && $button.length){\n this._setParentElem(element);\n\n eventAutomation.simulateClickSequence($button[0]);\n $(layoutModule.MENU_VWROPTIONS_LIST).first().find(\"p\").addClass(layoutModule.HOVERED_CLASS);\n return $(layoutModule.MENU_VWROPTIONS_LIST).first()[0];\n }\n\n if($next.parent().is(\"ul.buttonSet\")){\n // TODO: get rid of dependency on JRS mark-up\n if ($next.find(layoutModule.BUTTON_FILE_OPTIONS + \",\" + layoutModule.BUTTON_EXPORT).length === 0) {\n return element;\n }\n $(\"#\"+layoutModule.MENU_ID).removeClass(\"hidden\");\n $menu = $(\"#\"+layoutModule.MENU_ID + \" ul\");\n } else {\n $menu = $next.closest(\"ul\").not(\".j-toolbar\");\n }\n\n if($(element).closest(\".menu\").length){\n if($next.next().length){\n $next.find(\"p\").removeClass(layoutModule.HOVERED_CLASS);\n $next = $next.next().hasClass(\"separator\") ? $next.next().next() : $next.next();\n $next.find(\"p\").addClass(layoutModule.HOVERED_CLASS);\n }\n } else if($(element).closest(\".buttonSet\").length) {\n $next = $menu.find(\"li\").first();\n\n this._setParentElem(element);\n // this.lastMenuBarItem = element;\n }\n\n return $next[0];\n },\n\n _onExit: function(element){\n var $el = $(element);\n if($el.find(\"p\").length>0){\n element = this._onExitHandler(element);\n } else {\n element = $(\"#\"+layoutModule.MAIN_SEARCH_INPUT_ID)[0];\n }\n\n return element;\n },\n\n _onEnterOrEntered: function (element) {\n // Activate the link.\n var simulateEl;\n var $el = $(element);\n\n if($el.hasClass(\"j-dropdown\")){\n this._setParentElem(element);\n element = $el.find(\"input\")[0];\n\n // select the existing text value\n if (element) {\n $(element).select();\n }\n }\n\n if($el.find(\"p\").length>0){\n simulateEl = $el.find(\"p\")[0];\n } else if ($el.find(\"input\").length === 0) {\n simulateEl = $el.find(\".button\")[0];\n }\n\n // TODO: get rid of dependency on JRS mark-up\n if(simulateEl && $(this.parent).find(layoutModule.BUTTON_FILE_OPTIONS).length === 0 &&\n $(this.parent).find(layoutModule.BUTTON_EXPORT).length === 0){\n eventAutomation.simulateClickSequence(simulateEl);\n }\n\n if($(element).find(\"p\").length>0){\n element = this._onExitHandler(element);\n }\n\n return element;\n },\n\n _setParentElem: function(element){\n this.parent = element;\n $(element).addClass(\"isParent\");\n this.lastMenuBarItem = element;\n },\n\n _onExitHandler: function (element) {\n element = this.parent;\n if(!element){\n element = $(\".isParent\")[0];\n }\n\n $(element).removeClass(\"isParent\");\n return element;\n }\n});\n\n$.extend(StdnavPluginToolbar.prototype, {\n // This is the name of the new navtype. Each stdnav plugin must\n // define a unique name.\n navtype: 'toolbar',\n\n // This arrray extends the tag-to-navtype map in stdnav. If your\n // plugin should apply to all elements of a given type, add those\n // element tagnames, in lower case, to this array. It is normally\n // empty, and the page templates simply set an appropriate\n // \"data-navtype=\" attribute to get the expected behavior.\n // CASE SENSITIVE - USE UPPER-CASE!\n navtype_tags: []\n});\n\nexport default new StdnavPluginToolbar();\n","/*\n * Copyright (C) 2005 - 2021 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\n\n/**\n * @version: $Id: $\n */\n\n/* Standard Navigation library (stdnav) plugin\n * Elements: LI, OL, UL\n * Navtype: toolbarV2\n *\n * Plugin for toolbar menus, which may consist of simple buttons, text inputs,\n * buttons with drop-down options, tabs, etc. It handles the basic keyboard\n * navigation: moving left/right, opening the drop-downs, firing the actions.\n *\n * This module supports enhancements intended to improve compliance with\n * section 508 of the Rehabilitation Act of 1973, 29 USC 798, as amended\n * 1998.\n */\n\nimport $ from 'jquery';\nimport _ from 'underscore';\nimport stdnav from 'js-sdk/src/common/stdnav/stdnav';\nimport buttonManager from '../../core/core.events.bis';\nimport layoutModule from \"../../core/core.layout\";\n\nlet gserial = 0;\nlayoutModule.TOOLBAR_CONTAINER_EL = '[js-navtype=\"toolbarV2\"]';\nlayoutModule.TOOLBAR_LEAF_EL = '.leaf';\n\nvar StdnavPluginToolbarV2 = function () {\n gserial++;\n this.serial = gserial;\n};\n\n_.extend(StdnavPluginToolbarV2.prototype, {\n zinit: function () {\n return this;\n },\n\n // Registers the 'toolbarV2' navtype with stdnav.\n activate: function () {\n // This is the behaviour hash for the navtype. These defaults pass\n // everything through to the browser, and are normally overridden\n // with $.extend based on specific tagnames and stdnav attributes.\n this.behavior = {\n 'ariaprep': [this, this._ariaPrep, null],\n 'ariarefresh': [this, this._ariaRefresh, null],\n 'fixfocus': [this, this._fixFocus, null],\n 'fixsubfocus': [this, this._fixFocus, null],\n 'fixsuperfocus': [this, this._fixSuperfocus, null],\n 'superfocusout': [this, this._onSuperfocusOut, null],\n 'subfocusin': [this, this._onSubfocusIn, null],\n 'subfocusout': [this, this._onSubfocusOut, null],\n 'left': [this, this._onLeft, null],\n 'up': [this, this._onUp, null],\n 'down': [this, this._onDown, null],\n 'right': [this, this._onRight, null],\n 'enter': [this, this._onEnter, null],\n 'toggle': [this, this._onEnter, null],\n 'home': [this, this._onHome, null],\n 'end': [this, this._onEnd, null],\n 'click': [this, this._onClick, null],\n 'inherit': false,\n 'inheritable': true\n };\n stdnav.registerNavtype(this.navtype, this.behavior, this.navtype_tags);\n },\n\n // Unregisters the 'toolbarV2' navtype from stdnav. This must be done\n // before deactivating/unloading stdnav.\n deactivate: function () {\n stdnav.unregisterNavtype(this.navtype, this);\n },\n\n // This callback is run when the page is initially rendered. Add the\n // appropriate ARIA tags for the handled construct, if they do not already\n // exist.\n _ariaPrep: function (el) {\n this._ariaRefresh(el);\n },\n\n // This callback is run when the superfocus changes to the construct.\n _ariaRefresh: function (el) {\n $(el).attr('role', 'toolbar');\n const $btnItems = $(el).find('.button');\n $.each($btnItems, function (key, item) {\n const $item = $(item);\n $item.attr('aria-pressed', 'false');\n //set navtype to button to avoid running default 'button' navtype for button\n $item.attr('js-navtype', 'none');\n\n const $icons = $($item).find('[class=\"icon\"]');\n $.each($icons, function (key, iconEl) {\n $(iconEl).attr('aria-hidden', 'true');\n });\n });\n return null;\n },\n\n /* ====== Focus Management ====== */\n _fixFocus: function (element) {\n let newFocus;\n const $el = $(element);\n if ($el.is(layoutModule.TOOLBAR_CONTAINER_EL)) {\n var items = $el.find(layoutModule.TOOLBAR_LEAF_EL).not(\".divider\");\n if (items.length > 0) {\n items = items.find('.button').not(':disabled');\n if (items.length > 0) {\n newFocus = items[0];\n } else {\n // The entire list is empty-- set focus to the next/previous focusable element depending on where is superfocus\n let elementWithSuperfocus = $('.superfocus')[0];\n if(($el.next())[0] === elementWithSuperfocus){\n newFocus = stdnav.getPreviousFocusableElement(element);\n if(newFocus && newFocus === $('#maincontent')[0]){\n newFocus = stdnav.getPreviousFocusableElement(newFocus);\n }\n }else{\n newFocus = stdnav.getNextFocusableElement(element);\n }\n }\n }\n } else if ($el.is(layoutModule.TOOLBAR_LEAF_EL)) {\n newFocus = ($el.find('.button'))[0];\n } else {\n // Assume we're in a span or something within a leaf.\n const lis = $el.closest(layoutModule.TOOLBAR_LEAF_EL);\n if (lis.length > 0) {\n if ($(lis[0]).prop['js-navigable'] === false) {\n // Clicked on a header or something; focus the list instead.\n newFocus = $el.closest(layoutModule.TOOLBAR_CONTAINER_EL);\n } else {\n newFocus = lis.find('.button');\n }\n }\n }\n\n // Avoid focusing disabled button\n if ($(newFocus).is(\":disabled\") || $(newFocus).find(\".button\").is(\":disabled\")) {\n const nextElements = $(newFocus).closest(layoutModule.TOOLBAR_LEAF_EL).nextAll().filter(function (index, element) {\n return $(element).find(\".button\").is(\":enabled\");\n });\n newFocus = nextElements[0] ?? newFocus;\n }\n\n // this code is necessary to avoid issues like JS-63350\n if (newFocus && (newFocus[0] === $el[0])) {\n newFocus = null;\n }\n\n return newFocus;\n },\n\n // Superfocus adjustment callback.\n _fixSuperfocus: function (element) {\n let newSuperfocus;\n const $root = $(element).closest(layoutModule.TOOLBAR_CONTAINER_EL);\n if ($root.length > 0) {\n newSuperfocus = $root[0];\n } else {\n // let StdNav fall back to BODY\n newSuperfocus = null;\n }\n return newSuperfocus;\n },\n\n _onSuperfocusOut: function(element) {\n const $leafAll = $(element).closest(layoutModule.TOOLBAR_CONTAINER_EL).find(layoutModule.TOOLBAR_LEAF_EL).not(\".divider\");\n $leafAll.each(function(key, elem){\n $(elem).find(\".button\").removeClass(layoutModule.PRESSED_CLASS).attr('aria-pressed', 'false');\n });\n },\n\n _onSubfocusIn: function(element){\n const $elem = $(element).is('.button') ? $(element) : $(element).find('.button');\n buttonManager.over($elem[0]);\n },\n\n _onSubfocusOut: function(element){\n const $elem = $(element).is('.button') ? $(element) : $(element).find('.button');\n buttonManager.out($elem[0]);\n },\n\n /* ========== KEYBOARD BEHAVIOR =========== */\n _onLeft: function (element){\n const $thisItem = $(element).is(layoutModule.TOOLBAR_LEAF_EL) ? $(element) : $(element).closest(layoutModule.TOOLBAR_LEAF_EL);\n let $prev = null;\n\n if ($thisItem.length>0){\n const $prevAll = $thisItem.prevAll(layoutModule.TOOLBAR_LEAF_EL).not(\".divider\");\n $prevAll.each(function(key, elem){\n const $elem = $(elem);\n if($prev === null && $elem.find(\".button:disabled\").length === 0 && $elem.find(\".button:hidden\").length === 0){\n $prev = $elem.find('.button');\n }\n });\n\n //If we are on first Item of toolbar Item, pressing left arrow key should take us to last toolbar enabled item.\n if($prev === null){\n const $nextAll = $thisItem.nextAll(layoutModule.TOOLBAR_LEAF_EL).not(\".divider\");\n $nextAll.each(function(key, elem){\n const $elem = $(elem);\n if($elem.find(\".button:disabled\").length === 0 && $elem.find(\".button:hidden\").length === 0){\n $prev = $elem.find('.button');\n }\n });\n }\n }\n $prev = $prev ?? element;\n return $prev;\n },\n\n _onRight: function (element) {\n const $thisItem = $(element).is(layoutModule.TOOLBAR_LEAF_EL) ? $(element) : $(element).closest(layoutModule.TOOLBAR_LEAF_EL);\n let $next = null;\n\n if ($thisItem.length>0){\n const $nextAll = $thisItem.nextAll(layoutModule.TOOLBAR_LEAF_EL).not(\".divider\");\n $nextAll.each(function(key, elem){\n const $elem = $(elem);\n if($next === null && $elem.find(\".button:disabled\").length === 0 && $elem.find(\".button:hidden\").length === 0){\n $next = $elem.find('.button');\n }\n });\n //If we are on last Item of toolbar Item, pressing right should take us to first enabled item.\n if($next === null){\n const $prevAll = $thisItem.prevAll(layoutModule.TOOLBAR_LEAF_EL).not(\".divider\");\n $prevAll.each(function(key, elem){\n const $elem = $(elem);\n if($elem.find(\".button:disabled\").length === 0 && $elem.find(\".button:hidden\").length === 0){\n $next = $elem.find('.button');\n }\n });\n }\n }\n $next = $next ?? element;\n return $next;\n },\n\n _onUp: function (element) {\n //toolbar with buttons only not need any behaviour, if needed change this with checks\n return element;\n },\n\n _onDown: function (element) {\n //toolbar with buttons only not need any behaviour, if needed change this with checks\n return element;\n },\n\n _onEnter: function (element) {\n const $thisItem = $(element).is(layoutModule.TOOLBAR_LEAF_EL) ? $(element) : $(element).closest(layoutModule.TOOLBAR_LEAF_EL);\n if($thisItem.length>0){\n const $siblingAll = $thisItem.siblings(layoutModule.TOOLBAR_LEAF_EL).not(\".divider\");\n $siblingAll.each(function(key, elem){\n $(elem).find(\".button\").removeClass(layoutModule.PRESSED_CLASS).attr('aria-pressed', 'false');\n });\n if($thisItem.find(\".button\").length >0 && $thisItem.find(\".button:disabled\").length === 0 && $thisItem.find(\".button:hidden\").length === 0){\n let $btn = $thisItem.find(\".button\");\n $btn.attr('aria-pressed', 'true');\n buttonManager.down($btn[0]);\n $($btn[0]).trigger('mouseup');\n }\n }\n },\n\n _onHome: function (element) {\n let $firstEl = null;\n const $thisItem = $(element).is(layoutModule.TOOLBAR_LEAF_EL) ? $(element) : $(element).closest(layoutModule.TOOLBAR_LEAF_EL);\n const $prevAll = $thisItem.prevAll(layoutModule.TOOLBAR_LEAF_EL).not(\".divider\");\n $prevAll.each(function(key, elem){\n const $elem = $(elem);\n if($elem.find(\".button:disabled\").length === 0 && $elem.find(\".button:hidden\").length === 0){\n $firstEl = $elem.find('.button');\n }\n });\n return $firstEl ?? element;\n },\n\n _onEnd: function (element) {\n let $lastEl = null;\n const $thisItem = $(element).is(layoutModule.TOOLBAR_LEAF_EL) ? $(element) : $(element).closest(layoutModule.TOOLBAR_LEAF_EL);\n const $nextAll = $thisItem.nextAll(layoutModule.TOOLBAR_LEAF_EL).not(\".divider\");\n $nextAll.each(function(key, elem){\n const $elem = $(elem);\n if($elem.find(\".button:disabled\").length === 0 && $elem.find(\".button:hidden\").length === 0){\n $lastEl = $elem.find('.button');\n }\n });\n return $lastEl ?? element;\n },\n\n _onClick: function (element) {\n const $siblingAll = $(element).closest(layoutModule.TOOLBAR_LEAF_EL).siblings(layoutModule.TOOLBAR_LEAF_EL).not(\".divider\");\n $siblingAll.each(function(key, elem){\n $(elem).find(\".button\").attr('aria-pressed', 'false');\n });\n const $btn = $(element).is('.button') ? $(element) : $(element).closest('.button');\n if($btn.length>0) {\n $btn.attr('aria-pressed', 'true');\n }\n }\n});\n\n$.extend(StdnavPluginToolbarV2.prototype, {\n // This is the name of the new navtype. Each stdnav plugin must\n // define a unique name.\n navtype: 'toolbarV2',\n\n // This array extends the tag-to-navtype map in stdnav. If your\n // plugin should apply to all elements of a given type, add those\n // element tagnames, in lower case, to this array. It is normally\n // empty, and the page templates simply set an appropriate\n // \"data-navtype=\" attribute to get the expected behavior.\n // CASE SENSITIVE - USE UPPER-CASE!\n navtype_tags: []\n});\n\nexport default new StdnavPluginToolbarV2();","/*\n * Copyright (C) 2005 - 2021 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\n\n/**\n * @version: $Id: $\n */\n\n/* Standard Navigation library (stdnav) plugin\n * Elements: LI, OL, UL, div\n * Navtype: tablist\n *\n * Plugin for toolbar menus, which may consist of simple buttons, text inputs,\n * buttons with drop-down options, tabs, etc. It handles the basic keyboard\n * navigation: moving left/right, opening the drop-downs, firing the actions.\n *\n * This module supports enhancements intended to improve compliance with\n * section 508 of the Rehabilitation Act of 1973, 29 USC 798, as amended\n * 1998.\n */\n\nimport $ from 'jquery';\nimport _ from 'underscore';\nimport stdnav from 'js-sdk/src/common/stdnav/stdnav';\nimport layoutModule from \"../../core/core.layout\";\n\nlet gserial = 0;\nlayoutModule.TABLIST_CONTAINER_EL = '[js-navtype=\"tablist\"]';\nlayoutModule.TABLIST_LEAF_EL = '.tablistleaf';\n\nvar StdnavTabList = function () {\n gserial++;\n this.serial = gserial;\n};\n\n_.extend(StdnavTabList.prototype, {\n zinit: function () {\n return this;\n },\n\n // Registers the 'tablist' navtype with stdnav.\n activate: function () {\n // This is the behaviour hash for the navtype. These defaults pass\n // everything through to the browser, and are normally overridden\n // with $.extend based on specific tagnames and stdnav attributes.\n this.behavior = {\n 'ariaprep': [this, this._ariaPrep, null],\n 'ariarefresh': [this, this._ariaRefresh, null],\n 'fixfocus': [this, this._fixFocus, null],\n 'fixsubfocus': [this, this._fixFocus, null],\n 'fixsuperfocus': [this, this._fixSuperfocus, null],\n 'left': [this, this._onLeft, null],\n 'right': [this, this._onRight, null],\n 'up': [this, this._onUp, null],\n 'down': [this, this._onDown, null],\n 'click': [this, this._onClick, null],\n 'inherit': false,\n 'inheritable': true\n };\n stdnav.registerNavtype(this.navtype, this.behavior, this.navtype_tags);\n },\n\n // Unregisters the 'tablist' navtype from stdnav. This must be done\n // before deactivating/unloading stdnav.\n deactivate: function () {\n stdnav.unregisterNavtype(this.navtype, this);\n },\n\n // This callback is run when the page is initially rendered. Add the\n // appropriate ARIA tags for the handled construct, if they do not already\n // exist.\n _ariaPrep: function (el) {\n this._ariaRefresh(el);\n },\n\n // This callback is run when the superfocus changes to the construct.\n _ariaRefresh: function (el) {\n $(el).attr('role', 'tablist');\n const $tabItems = $(el).find(layoutModule.TABLIST_LEAF_EL).not('[disabled]');\n $.each($tabItems, function (key, item) {\n const $item = $(item);\n if($(item).hasClass('selected')){\n $item.attr('aria-selected', 'true');\n }else{\n $item.attr('aria-selected', 'false');\n }\n $item.attr('role', 'tab');\n\n const $icons = $($item).find('[class=\"icon\"]');\n $.each($icons, function (key, iconEl) {\n $(iconEl).attr('aria-hidden', 'true');\n });\n });\n return null;\n },\n\n /* ====== Focus Management ====== */\n _fixFocus: function (element) {\n let newFocus;\n const $el = $(element);\n if ($el.is(layoutModule.TABLIST_CONTAINER_EL)) {\n var items = $el.find(layoutModule.TABLIST_LEAF_EL).not(\".label\");\n if (items.length > 0) {\n //set focus to active/selected Item\n newFocus = (items.filter((index, item)=>$(item).hasClass(\"selected\")))[0];\n }else {\n // The entire list is empty-- set focus to the next focusable element\n newFocus = stdnav.getNextFocusableElement(element);\n }\n } else if ($el.is(layoutModule.TABLIST_LEAF_EL)) {\n newFocus = element;\n } else {\n // Assume we're in a span or something within a leaf.\n const lis = $el.closest(layoutModule.TABLIST_LEAF_EL);\n if (lis.length > 0) {\n if ($(lis[0]).prop['js-navigable'] === false) {\n // Clicked on a header or something; focus the list instead.\n newFocus = $el.closest(layoutModule.TABLIST_CONTAINER_EL);\n } else {\n newFocus = lis[0];\n }\n }\n }\n\n // Avoid focusing disabled button\n if ($(newFocus).is(\"[disabled]\") || $(newFocus).find(\".button\").is(\":disabled\")) {\n const activeElement = $(newFocus).closest(layoutModule.TABLIST_CONTAINER_EL).find(layoutModule.TABLIST_LEAF_EL).not('[disabled]');\n newFocus = activeElement[0] ?? newFocus;\n }\n\n // this code is necessary to avoid issues like JS-63350\n if (newFocus && (newFocus[0] === $el[0])) {\n newFocus = null;\n }\n\n return newFocus;\n },\n\n // Superfocus adjustment callback.\n _fixSuperfocus: function (element) {\n let newSuperfocus;\n const $root = $(element).closest(layoutModule.TABLIST_CONTAINER_EL);\n if ($root.length > 0) {\n newSuperfocus = $root[0];\n } else {\n // let StdNav fall back to BODY\n newSuperfocus = null;\n }\n return newSuperfocus;\n },\n\n /* ========== KEYBOARD BEHAVIOR =========== */\n _onLeft: function (element){\n const $thisItem = $(element).is(layoutModule.TABLIST_LEAF_EL) ? $(element) : $(element).closest(layoutModule.TABLIST_LEAF_EL);\n let $prev = null;\n\n if ($thisItem.length>0){\n $thisItem.attr('aria-selected', 'false').removeClass('selected');;\n const $prevAll = $thisItem.prevAll(layoutModule.TABLIST_LEAF_EL).not(\".label\");\n $prevAll.each(function(key, elem){\n const $elem = $(elem);\n if($prev === null && !($elem.is(\"[disabled]\")) && $elem.find(\".button:disabled\").length === 0){\n $prev = $elem;\n }\n });\n }\n $prev = $prev ? $prev[0] : element;\n $($prev).attr('aria-selected', 'true').addClass('selected');;\n return $prev;\n },\n\n _onRight: function (element) {\n const $thisItem = $(element).is(layoutModule.TABLIST_LEAF_EL) ? $(element) : $(element).closest(layoutModule.TABLIST_LEAF_EL);\n let $next = null;\n\n if ($thisItem.length>0){\n $thisItem.attr('aria-selected', 'false').removeClass('selected');;\n const $nextAll = $thisItem.nextAll(layoutModule.TABLIST_LEAF_EL).not(\".label\");\n $nextAll.each(function(key, elem){\n const $elem = $(elem);\n if($next === null && !($elem.is(\"[disabled]\")) && $elem.find(\".button:disabled\").length === 0){\n $next = $elem;\n }\n });\n }\n $next = $next ? $next[0] : element;\n $($next).attr('aria-selected', 'true').addClass('selected');\n return $next;\n },\n\n _onUp: function (element) {\n return element;\n },\n\n _onDown: function (element) {\n return element;\n },\n\n _onClick: function (element) {\n const $element = $(element).is(layoutModule.TABLIST_LEAF_EL) ? $(element) : $(element).closest(layoutModule.TABLIST_LEAF_EL);\n const $siblingAll = $element.siblings(layoutModule.TABLIST_LEAF_EL).not(\".label\");\n $siblingAll.each(function(key, elem){\n $(elem).attr('aria-selected', 'false');\n });\n const item = $element.not('[disabled]');\n if(item.length>0) {\n $element.attr('aria-selected', 'true');\n }\n }\n});\n\n$.extend(StdnavTabList.prototype, {\n // This is the name of the new navtype. Each stdnav plugin must\n // define a unique name.\n navtype: 'tablist',\n\n // This array extends the tag-to-navtype map in stdnav. If your\n // plugin should apply to all elements of a given type, add those\n // element tagnames, in lower case, to this array. It is normally\n // empty, and the page templates simply set an appropriate\n // \"data-navtype=\" attribute to get the expected behavior.\n // CASE SENSITIVE - USE UPPER-CASE!\n navtype_tags: []\n});\n\nexport default new StdnavTabList();","/*\n * Copyright (C) 2005 - 2022 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\nimport $ from 'jquery';\n\nimport 'jquery-ui/ui/widgets/datepicker';\n\nvar _jasperPrefix = \"jr\";\nvar _jasperPopupClass = \"jr-jDatepickerPopupContainer\";\n\nvar datepickerId = $.datepicker.dpDiv.attr(\"id\"),\n _mainDivId = _jasperPrefix + \"-\" + datepickerId;\n\n$.datepicker._mainDivId = _mainDivId;\n\n$.datepicker.dpDiv.attr(\"id\", _mainDivId);\n\n$.datepicker.dpDiv.removeClass();\n\nvar dpDivClass = _jasperPopupClass\n + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all '\n + _jasperPrefix;\n\n$.datepicker.dpDiv.addClass(dpDivClass);\n\nvar originalNewInst = $.datepicker._newInst;\n\n$.datepicker._newInst = function() {\n var result = originalNewInst.apply($.datepicker, arguments);\n\n result.dpDiv.removeClass(_jasperPrefix);\n result.dpDiv.addClass(_jasperPrefix);\n\n return result;\n};\n\nvar originalGoToToday = $.datepicker._gotoToday;\n\n$.datepicker._gotoToday = function(id) {\n originalGoToToday.call(this, id);\n this._selectDate(id);\n};\n\nexport default $;","/*\n * Copyright (C) 2005 - 2022 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\nimport $ from 'jquery';\n\nimport './jQueryDatepickerExtension';\nimport './jQueryUiSliderAccessExtension';\nimport 'jqueryui-timepicker-addon/dist/jquery-ui-timepicker-addon';\n\nvar originalNewInst = $.timepicker._newInst;\n\n$.timepicker._newInst = function($input, opts) {\n if (!opts.onChangeMonthYear) {\n opts.onChangeMonthYear = function(year, month, datepicker, timepicker) {\n datepicker.currentYear = datepicker.selectedYear;\n datepicker.currentMonth = datepicker.selectedMonth;\n datepicker.currentDay = datepicker.selectedDay;\n\n timepicker._updateDateTime(datepicker);\n };\n }\n\n var instance = originalNewInst.call($.timepicker, $input, opts);\n\n var originalOnTimeChange = instance._onTimeChange;\n\n instance._onTimeChange = function() {\n this.$timeObj[0].setSelectionRange = null;\n\n return originalOnTimeChange.apply(this, arguments);\n };\n\n return instance;\n};\n\nexport default $;","/*\n * Copyright (C) 2005 - 2022 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\n/**\n* @author: ${username}\n* @version: $Id$\n*/\n\n/* Standard Navigation library (stdnav) plugin\n* Elements: A\n* Navtype: anchor (element default)\n*\n* Plugin for the \"anchor\" navtype. This is the default behavior for \"A\"\n* tags, handling both normal \"HREF\" links and \"#\" internal/Backbone/fake\n* button links.\n*\n* This module supports enhancements intended to improve compliance with\n* section 508 of the Rehabilitation Act of 1973, 29 USC 798, as amended\n* 1998.\n*/\nimport $ from 'jquery';\nimport eventAutomation from '../../util/eventAutomation';\nimport log from \"../../logging/logger\";\nimport stdnav from '../stdnav';\n\nvar version = \"0.0.1\",\n singleton = null,\n gserial = 0;\n\nlet logger = log.register('stdnav');\n\n// Local object definition.\n\nvar stdnavPluginAnchor = function () {\n gserial++;\n this.serial = gserial;\n};\n\n// FIRST EXTENSION PASS - FUNCTIONS\n// Provides forward-references for hashes in the second pass, so that\n// references in that second pass to functions declared here resolve\n// (since the entire pass is applied at once, they cannot be combined).\n$.extend(stdnavPluginAnchor.prototype, {\n zinit: function (selector) {\n logger.debug('stdnavPluginAnchor.init(' + selector + \")\\n\");\n return this;\n },\n\n // Registers the 'anchor' navtype with stdnav. stdnav must be loaded and\n // activated before this can be done.\n activate: function () {\n // This is the behaviour hash for the navtype. These defaults pass\n // everything through to the browser, and are normally overridden\n // with $.extend based on specific tagnames and stdnav attributes.\n this.behavior = {\n 'ariaprep': [this, this._ariaPrep, null],\n 'ariarefresh': [this, this._ariaRefresh, null],\n 'down': [this, this._onLeftOrUp, null],\n 'enter': [this, this._onEnterOrEntered, null],\n 'toggle': [this, this._onToggle, null],\n 'inherit': false,\n 'inheritable': true,\n 'left': [this, this._onLeftOrUp, null],\n 'right': [this, this._onRightOrDown, null],\n 'up': [this, this._onRightOrDown, null]\n };\n stdnav.registerNavtype(this.navtype, this.behavior, this.navtype_tags);\n },\n\n // Unregisters the 'anchor' navtype from stdnav. This must be done\n // before deactivating/unloading stdnav.\n deactivate: function () {\n stdnav.unregisterNavtype('anchor', this.behavior);\n },\n\n // This callback is run when the page is initially rendered. Add the\n // appropriate ARIA tags for the handled construct, if they do not already\n // exist. The element passed will be the superfocus for the construct\n // being instrumented, but this construct may not actually have focus at\n // the time this function is called.\n _ariaPrep: function (el) {\n //$(el).attr('role', 'link');\n /*\n var label = $(el).attr('aria-label');\n if (stdnav.nullOrUndefined(label)) {\n $(el).attr('aria-label', $(el).text());\n }\n */\n return null;\n },\n\n // This callback is run when the superfocus changes to the construct.\n // Its two purposes are to update existing constructs, and to handle\n // dynamically-created content whose creation was not detected during\n // initial page construction (possibly because no part of the construct\n // existed yet). The element passed will be the superfocus for the\n // construct, but this construct may not actually have focus at the time\n // this function is called.\n _ariaRefresh: function (el) {\n //$(el).attr('role', 'link');\n /*\n var label = $(el).attr('aria-label');\n if (stdnav.nullOrUndefined(label)) {\n $(el).attr('aria-label', $(el).text());\n }\n */\n return null;\n },\n\n // Utility function: given a list, ensure the most appropriate element\n // available (in this case, the top-level anchor node, only) has focus.\n _fixSubfocus: function (element) {\n var newSubfocus;\n var $el = $(element);\n\n if ($el.is('A')) {\n newSubfocus = $el;\n } else {\n newSubfocus = $(element).closest('A');\n if (newSubfocus === undefined) {\n // Safety\n return undefined;\n }\n }\n\n // Nothing in or under this node should have ghostfocus; clear anything\n // that does, and ensure that only the anchor element itself has subfocus.\n newSubfocus.find('.ghostfocus').removeClass('.ghostfocus');\n newSubfocus.children().find('.subfocus').removeClass('.subfocus');\n return newSubfocus;\n },\n\n /* ========== NAVTYPE BEHAVIOR CALLBACKS =========== */\n\n _onFocusIn: function (element) {\n var newSubfocus;\n // This should fire on the list itself, not the item.\n var ghosts = $(element).children('.ghostfocus');\n if (ghosts.length > 0) {\n ghosts.removeClass('ghostfocus');\n // Promote ghost.\n newSubfocus = this._fixSubfocus(ghosts[0]);\n } else {\n // Set subfocus to first item, without firing callbacks.\n var items = $(element).children('li[js-navigable!=\"false\"]');\n if (items.length > 0) {\n newSubfocus = this._fixSubfocus(items[0]);\n } else {\n // For visual reasons, in the case of an empty list, we give up and\n // set subfocus to the list itself.\n newSubfocus = element;\n }\n }\n return newSubfocus;\n },\n\n _onLeftOrUp: function(element) {\n var $prev=$(element).prev('a');\n if ($prev.length<1){\n return element;\n }\n return $prev[0];\n },\n\n _onRightOrDown: function(element) {\n var $next=$(element).next('a');\n if ($next.length<1){\n return element;\n }\n return $next[0];\n },\n\n //FIXME: Do not set ghostfocus on focus out\n\n _onSubfocusIn: function (element) {\n if ($(element).prop('nodeName') != 'A') {\n // Find a usable child element.\n var subel = this._fixSubfocus(element);\n // Adjust subfocus without firing callbacks.\n stdnav.setSubfocus(subel, false);\n }\n },\n\n // When activated as a member of a navigable control, such as a list or\n // table, this is a cascade event from the navigable control's \"enter\"\n // handler, which will cause our \"enter\" handler to fire. However, if\n // the anchor is a simple link, such as an tag embedded in a

block,\n // it will be a simple tabstop, which is therefore focusable. If such a\n // link is focused, pressing ENTER will fire our \"enter\" handler. The same\n // logic works for both cases, so this callback should be mapped to both\n // events.\n _onEnterOrEntered: function (element) {\n // Activate the link.\n var $el = $(element);\n if ($el.is('a')) {\n // Fire the click handler\n eventAutomation.simulateClickSequence(element);\n }\n return element;\n },\n\n // Making links with role='button' react to space bar as normal buttons does\n _onToggle: function (element) {\n // Activate the link.\n var $el = $(element);\n if ($el.is('a') && $el.attr('role') === 'button') {\n return this._onEnterOrEntered(element);\n }\n\n return element;\n }\n});\n\n// SECOND EXTENSION PASS - ATTRIBUTES\n// Hash members in this pass can reference functions from the last pass.\n$.extend(stdnavPluginAnchor.prototype, {\n // This is the name of the new navtype. Each stdnav plugin must\n // define a unique name.\n navtype: 'anchor',\n\n // This arrary extends the tag-to-navtype map in stdnav. If your\n // plugin should apply to all elements of a given type, add those\n // element tagnames, in lower case, to this array. It is normally\n // empty, and the page templates simply set an appropriate\n // \"data-navtype=\" attribute to get the expected behavior.\n //\n // CASE SENSITIVE - USE UPPER-CASE!\n navtype_tags: ['A']\n});\nvar newStdnavPluginAnchor = new stdnavPluginAnchor();\nexport default newStdnavPluginAnchor;","/*\n * Copyright (C) 2005 - 2022 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\n/**\n* @author: ${username}\n* @version: $Id$\n*/\n\n/* Standard Navigation library (stdnav) plugin\n* Elements: BUTTON\n* Navtype: button (element default)\n*\n* Plugin for the \"button\" navtype. This is the default behavior for \"BUTTON\"\n* elements.\n*\n* This module supports enhancements intended to improve compliance with\n* section 508 of the Rehabilitation Act of 1973, 29 USC 798, as amended\n* 1998.\n*/\n\nimport $ from 'jquery';\nimport eventAutomation from '../../util/eventAutomation';\nimport log from \"../../logging/logger\";\nimport stdnav from '../stdnav';\n\nvar version = \"0.0.1\",\n singleton = null,\n gserial = 0;\n\nlet logger = log.register(\"stdnav\");\n\n// Local object definition.\n\nvar stdnavPluginButton = function () {\n gserial++;\n this.serial = gserial;\n};\n\n// FIRST EXTENSION PASS - FUNCTIONS\n// Provides forward-references for hashes in the second pass, so that\n// references in that second pass to functions declared here resolve\n// (since the entire pass is applied at once, they cannot be combined).\n$.extend(stdnavPluginButton.prototype, {\n zinit: function (selector) {\n logger.debug('stdnavPluginButton.init(' + selector + \")\\n\");\n return this;\n },\n\n // Registers the 'button' navtype with stdnav. stdnav must be loaded and\n // activated before this can be done.\n activate: function () {\n // This is the behaviour hash for the navtype. These defaults pass\n // everything through to the browser, and are normally overridden\n // with $.extend based on specific tagnames and stdnav attributes.\n this.behavior = {\n 'enter': [this, this._onEnterOrEntered, null],\n 'entered': [this, this._onEnterOrEntered, null],\n 'toggle': [this, this._onEnterOrEntered, null],\n 'inherit': false,\n 'inheritable': true\n };\n stdnav.registerNavtype(this.navtype, this.behavior, this.navtype_tags);\n },\n\n // Unregisters the 'button' navtype from stdnav. This must be done\n // before deactivating/unloading stdnav.\n deactivate: function () {\n stdnav.unregisterNavtype('button', this.behavior);\n },\n\n // Utility function: given a list, ensure the most appropriate element\n // available (in this case, the top-level link node, only) has focus.\n _fixSubfocus: function (element) {\n var newSubfocus;\n var $el = $(element);\n\n if ($el.is(\"BUTTON,[role='button']\")) {\n newSubfocus = $el;\n } else {\n newSubfocus = $(element).closest(\"BUTTON,[role='button']\");\n if (newSubfocus === undefined) {\n // Safety\n return undefined;\n }\n }\n\n // Nothing in or under this node should have ghostfocus; clear anything\n // that does, and ensure that only the link element itself has subfocus.\n newSubfocus.find('.ghostfocus').removeClass('.ghostfocus');\n newSubfocus.children().find('.subfocus').removeClass('.subfocus');\n return newSubfocus;\n },\n\n /* ========== NAVTYPE BEHAVIOR CALLBACKS =========== */\n\n _onFocusIn: function (element) {\n var newSubfocus;\n // This should fire on the list itself, not the item.\n var ghosts = $(element).children('.ghostfocus');\n if (ghosts.length > 0) {\n ghosts.removeClass('ghostfocus');\n // Promote ghost.\n newSubfocus = this._fixSubfocus(ghosts[0]);\n } else {\n // Set subfocus to first item, without firing callbacks.\n var items = $(element).children('li[js-navigable!=\"false\"]');\n if (items.length > 0) {\n newSubfocus = this._fixSubfocus(items[0]);\n } else {\n // For visual reasons, in the case of an empty list, we give up and\n // set subfocus to the list itself.\n newSubfocus = element;\n }\n }\n return newSubfocus;\n },\n\n //FIXME: Do not set ghostfocus on focus out\n\n _onSubfocusIn: function (element) {\n if ($(element).prop('nodeName') != 'BUTTON') {\n // Find a usable child element.\n var subel = this._fixSubfocus(element);\n // Adjust subfocus without firing callbacks.\n stdnav.setSubfocus(subel, false);\n }\n },\n\n // When activated as a member of a navigable control, such as a list or\n // table, this is a cascade event from the navigable control's \"enter\"\n // handler, which will cause our \"entered\" handler to fire. However, if\n // the anchor is a simple link, such as an tag embedded in a

block,\n // it will be a simple tabstop, which is therefore focusable. If such a\n // link is focused, pressing ENTER will fire our \"enter\" handler. The same\n // logic works for both cases, so this callback should be mapped to both\n // events.\n _onEnterOrEntered: function (element) {\n // Activate the link.\n var $el = $(element);\n if ($el.is(\"BUTTON,[role='button']\")) {\n eventAutomation.simulateClickSequence(element);\n }\n return element;\n }\n});\n\n// SECOND EXTENSION PASS - ATTRIBUTES\n// Hash members in this pass can reference functions from the last pass.\n$.extend(stdnavPluginButton.prototype, {\n // This is the name of the new navtype. Each stdnav plugin must\n // define a unique name.\n navtype: 'button',\n\n // This arrary extends the tag-to-navtype map in stdnav. If your\n // plugin should apply to all elements of a given type, add those\n // element tagnames, in lower case, to this array. It is normally\n // empty, and the page templates simply set an appropriate\n // \"data-navtype=\" attribute to get the expected behavior.\n //\n // CASE SENSITIVE - USE UPPER-CASE!\n navtype_tags: ['BUTTON']\n});\nvar newStdnavPluginButton = new stdnavPluginButton();\nexport default newStdnavPluginButton;","/*\n * Copyright (C) 2005 - 2022 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\nimport $ from 'jquery';\nimport logger from \"../../logging/logger\";\nimport stdnav from '../stdnav';\n\nlet localLogger = logger.register(\"stdnavPluginGrid\");\n\nvar version = '0.0.1';\nvar singleton = null;\nvar gserial = 0;\nvar stdnavPluginGrid = function () {\n gserial++;\n this.serial = gserial;\n};\n$.extend(stdnavPluginGrid.prototype, {\n zinit: function (selector) {\n localLogger.debug('stdnavPluginGrid.init(' + selector + ')\\n');\n return this;\n },\n activate: function () {\n this.behavior = {\n 'focusin': [\n this,\n stdnav.basicFocusIn,\n {\n 'maxdepth': 2,\n 'subfocusclass': 'gridcell'\n }\n ],\n 'focusout': [\n this,\n stdnav.ghostFocusOut,\n null\n ],\n 'subfocusin': [\n this,\n this._onSubfocusIn,\n null\n ],\n 'left': [\n this,\n this._onLeft,\n null\n ],\n 'right': [\n this,\n this._onRight,\n null\n ],\n 'up': [\n this,\n this._onUp,\n null\n ],\n 'down': [\n this,\n this._onDown,\n null\n ],\n 'hoverin': [\n this,\n this._onHover,\n null\n ],\n 'inherit': true,\n 'inheritable': true\n };\n stdnav.registerNavtype(this.navtype, this.behavior, this.navtype_tags);\n },\n deactivate: function () {\n stdnav.unregisterNavtype(this.navtype, this.behavior);\n },\n _findSubfocus: function (el) {\n var grid = $(el).closest('.grid');\n var sfels = grid.find('.subfocus');\n if (sfels !== undefined) {\n return $(sfels[0]);\n }\n },\n _fixSubfocus: function (element) {\n var ghosts;\n var newSubfocus;\n if (element.hasClass('grid')) {\n ghosts = element.children('.gridrow').children('.gridcell .ghostfocus');\n if (ghosts.length > 0) {\n newSubfocus = ghosts[0];\n } else {\n var rows = element.children('.gridrow');\n if (rows.length > 0) {\n var cells = $(rows[0]).children('.gridcell');\n if (cells.length > 0) {\n newSubfocus = cells[0];\n } else {\n newSubfocus = rows[0];\n }\n } else {\n newSubfocus = element;\n }\n }\n } else if (element.hasClass('gridrow')) {\n ghosts = element.children('.gridcell .ghostfocus');\n newSubfocus = ghosts[0];\n } else if (element.hasClass('gridcell')) {\n newSubfocus = element;\n }\n return newSubfocus;\n },\n _onSubfocusIn: function (element) {\n if ($(element).hasClass('gridcell') === false) {\n var subel = this._fixSubfocus($(element));\n stdnav.setSubfocus(subel, false);\n }\n },\n _onLeft: function (element) {\n var sfel = this._findSubfocus(element);\n var newsf = $(false);\n if (sfel.hasClass('gridcell')) {\n newsf = sfel.prev('.gridcell');\n }\n if (newsf.length === 1) {\n stdnav.setSubfocus(newsf);\n }\n return false;\n },\n _onRight: function (element) {\n var sfel = this._findSubfocus(element);\n var newsf = $(false);\n if (sfel.hasClass('gridcell')) {\n newsf = sfel.next('.gridcell');\n }\n if (newsf.length === 1) {\n stdnav.setSubfocus(newsf);\n }\n return false;\n },\n _onUp: function (element) {\n var sfel = this._findSubfocus(element);\n var row;\n var newrow = $(false);\n var newsf = $(false);\n if (sfel.hasClass('gridcell')) {\n row = sfel.closest('.gridrow');\n if (row.length === 1) {\n newrow = row.prev('.gridrow');\n }\n if (newrow.length === 1) {\n var iter = sfel;\n var col = -1;\n do {\n col++;\n iter = $(iter.prev('.gridcell')[0]);\n } while (iter.length > 0);\n newsf = $(newrow.find('.gridcell')[0]);\n while (col > 0) {\n iter = newsf.next('.gridcell');\n if (iter.length > 0) {\n newsf = $(iter[0]);\n }\n col--;\n }\n }\n }\n if (newsf.length === 1) {\n stdnav.setSubfocus(newsf);\n }\n return false;\n },\n _onDown: function (element) {\n var sfel = this._findSubfocus(element);\n var row;\n var newrow = $(false);\n var newsf = $(false);\n if (sfel.hasClass('gridcell')) {\n row = sfel.closest('.gridrow');\n if (row.length > 0) {\n newrow = row.next('.gridrow');\n }\n if (newrow.length > 0) {\n var iter = sfel;\n var col = -1;\n do {\n col++;\n iter = $(iter.prev('.gridcell')[0]);\n } while (iter.length > 0);\n newsf = $(newrow.find('.gridcell')[0]);\n while (col > 0) {\n iter = newsf.next('.gridcell');\n if (iter.length > 0) {\n newsf = $(iter[0]);\n }\n col--;\n }\n }\n }\n if (newsf.length === 1) {\n stdnav.setSubfocus(newsf);\n }\n return false;\n }\n});\n$.extend(stdnavPluginGrid.prototype, {\n navtype: 'grid',\n navtype_tags: []\n});\nvar newStdnavPluginGrid = new stdnavPluginGrid();\nexport default newStdnavPluginGrid;","/*\n * Copyright (C) 2005 - 2022 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\nimport $ from 'jquery';\nimport logger from \"../../logging/logger\";\nimport stdnav from '../stdnav';\n\nlet localLogger = logger.register(\"stdnavPluginList\");\n\nvar version = '0.0.1';\nvar singleton = null;\nvar gserial = 0;\nvar stdnavPluginList = function () {\n gserial++;\n this.serial = gserial;\n};\n$.extend(stdnavPluginList.prototype, {\n zinit: function (selector) {\n localLogger.debug('stdnavPluginList.init(' + selector + ')\\n');\n return this;\n },\n activate: function () {\n this.behavior = {\n 'ariaprep': [\n this,\n this._ariaPrep,\n null\n ],\n 'ariarefresh': [\n this,\n this._ariaRefresh,\n null\n ],\n 'click': [\n this,\n this._onClick,\n null\n ],\n 'down': [\n this,\n this._onDown,\n null\n ],\n 'fixfocus': [\n this,\n this._fixFocus,\n null\n ],\n 'fixsuperfocus': [\n this,\n this._fixSuperfocus,\n null\n ],\n 'inherit': true,\n 'inheritable': true,\n 'left': [\n this,\n this._onLeft,\n null\n ],\n 'right': [\n this,\n this._onRight,\n null\n ],\n 'up': [\n this,\n this._onUp,\n null\n ],\n 'superfocusin': [\n stdnav,\n stdnav.basicSuperfocusIn,\n {\n 'maxdepth': 1,\n 'focusSelector': 'li',\n 'ghostfocus': false\n }\n ],\n 'superfocusout': [\n stdnav,\n stdnav.basicSuperfocusOut,\n { 'ghostfocus': false }\n ]\n };\n stdnav.registerNavtype(this.navtype, this.behavior, this.navtype_tags);\n },\n deactivate: function () {\n stdnav.unregisterNavtype('list', this.behavior);\n },\n _ariaPrep: function (el) {\n this._ariaRefresh(el);\n },\n _ariaRefresh: function (el) {\n var $list = $(el);\n var $items = $list.children('li');\n $.each($items, function (index, item) {\n var $item = $(item);\n if (typeof $item.attr('role') === \"undefined\") {\n var $itemLinks = $item.find('a');\n if ($itemLinks.length > 0) {\n $item.attr('role', 'link');\n }\n }\n });\n return null;\n },\n _fixFocus: function (element) {\n var ghosts;\n var newFocus;\n var $el = $(element);\n if ($el.is('fieldset') && $el.children('ul.inputSet').length) {\n return element;\n }\n if ($el.is('ul,ol')) {\n ghosts = $el.children('li .ghostfocus');\n if (ghosts.length > 0) {\n newFocus = ghosts[0];\n } else {\n var items = $el.children('li');\n if (items.length > 0) {\n newFocus = items[0];\n } else {\n newFocus = element;\n }\n }\n } else if ($el.is('li')) {\n newFocus = element;\n } else {\n var lis = $el.closest('li');\n if (lis.length > 0) {\n if ($(lis[0]).prop['js-navigable'] === false) {\n newFocus = $el.closest('ul,ol');\n } else {\n newFocus = lis[0];\n }\n } else {\n newFocus = $el.closest('ul,ol');\n }\n }\n return newFocus;\n },\n _fixSubfocus: function (element) {\n return null;\n },\n _fixSuperfocus: function (element) {\n var newSuperfocus;\n var $closestList = $(element).closest('ol,ul');\n if ($closestList.length > 0) {\n newSuperfocus = $closestList[0];\n } else {\n newSuperfocus = null;\n }\n return newSuperfocus;\n },\n // Some screen readers have their own shortcuts to activate element.\n // in case of role=link such activation will trigger 'click' event\n // on the item, so we have to re-trigger this event on an underlying link\n _onClick: function (element) {\n let $el = $(element);\n if (element.nodeName === 'LI' && $el.attr('role') === 'link') {\n var firstLink = $el.find('a')[0];\n if (typeof firstLink !== \"undefined\") {\n stdnav.runAction('enter', firstLink);\n }\n }\n return element;\n },\n _onSuperfocusIn: function (element) {\n var newFocus;\n var ghosts = $(element).children('li .ghostfocus');\n if (ghosts.length > 0) {\n ghosts.removeClass('ghostfocus');\n newFocus = ghosts[0];\n } else {\n var items = $(element).children('li[js-navigable!=\"false\"]');\n if (items.length > 0) {\n newFocus = items[0];\n } else {\n newFocus = element;\n }\n }\n return newFocus;\n },\n _onSuperfocusOut: function (element) {\n },\n _onLeft: function (element) {\n var newFocus = element;\n var $list = $(element).closest('ul,ol');\n if ($list.hasClass('horizontal')) {\n var $newFocus = $(element).prev('li');\n if ($newFocus.length === 0) {\n if ($list.attr('js-stdnav-wrap') === 'wrap') {\n var $items = $list.children('li');\n if ($items.length > 0) {\n newFocus = $items[$items.length - 1];\n }\n } else {\n newFocus = $list.find('li').last()[0];\n }\n } else {\n newFocus = $newFocus[0];\n }\n }\n return newFocus;\n },\n _onRight: function (element) {\n var newFocus = element;\n var $list = $(element).closest('ul,ol');\n if ($list.hasClass('horizontal')) {\n var $newFocus = $(element).next('li');\n if ($newFocus.length === 0) {\n if ($list.attr('js-stdnav-wrap') === 'wrap') {\n var $items = $list.children('li');\n if ($items.length > 0) {\n newFocus = $items[0];\n }\n } else {\n newFocus = $list.find('li').first()[0];\n }\n } else {\n newFocus = $newFocus[0];\n }\n }\n return newFocus;\n },\n _onUp: function (element) {\n var newFocus = element;\n var $list = $(element).closest('ul,ol');\n if (!$list.hasClass('horizontal')) {\n var $newFocus = $(element).prev('li');\n if ($newFocus.length === 0) {\n if ($list.attr('js-stdnav-wrap') == 'wrap') {\n var $items = $list.children('li');\n if ($items.length > 0) {\n newFocus = $items[$items.length - 1];\n }\n }\n } else {\n newFocus = $newFocus[0];\n }\n }\n return newFocus;\n },\n _onDown: function (element) {\n var newFocus = element;\n var $list = $(element).closest('ul,ol');\n if (!$list.hasClass('horizontal')) {\n var $newFocus = $(element).next('li');\n if ($newFocus.length === 0) {\n if ($list.attr('js-stdnav-wrap') == 'wrap') {\n var $items = $list.children('li');\n if ($items.length > 0) {\n newFocus = $items[0];\n }\n }\n } else {\n newFocus = $newFocus[0];\n }\n }\n return newFocus;\n }\n});\n$.extend(stdnavPluginList.prototype, {\n navtype: 'list',\n navtype_tags: [\n 'UL',\n 'OL'\n ]\n});\nvar newStdnavPluginList = new stdnavPluginList();\nexport default newStdnavPluginList;","/*\n * Copyright (C) 2005 - 2020 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\nimport jQuery from 'jquery';\nimport log from \"../../logging/logger\";\nimport stdnav from '../stdnav';\nimport {DIALOG_REFERENCE_ATTRIBUTE} from '../stdnavModalFocusing';\n\nconst logger = log.register(\"stdnav\");\n\nconst stdnavPluginModalTrap = function () {\n};\n\njQuery.extend(stdnavPluginModalTrap.prototype, {\n // Registers the 'button' navtype with stdnav. stdnav must be loaded and\n // activated before this can be done.\n activate: function () {\n // This is the behaviour hash for the navtype. These defaults pass\n // everything through to the browser, and are normally overridden\n // with jQuery.extend based on specific tagnames and stdnav attributes.\n this.behavior = {\n 'fixfocus': [this, this._fixFocus, null]\n };\n stdnav.registerNavtype(this.navtype, this.behavior, this.navtype_tags);\n },\n\n // Unregisters navtype from stdnav. This must be done\n // before deactivating/unloading stdnav.\n deactivate: function () {\n stdnav.unregisterNavtype(this.navtype, this.behavior);\n },\n\n /* ========== NAVTYPE BEHAVIOR CALLBACKS =========== */\n\n _fixFocus: function (element) {\n const $el = jQuery(element);\n const currentModalDialogRoot = stdnav.modalDialogRoots[$el.attr(DIALOG_REFERENCE_ATTRIBUTE)];\n if (!currentModalDialogRoot) {\n logger.error('Modal Trap element exists while there is no opened dialog');\n return element;\n }\n\n let modalFocusableElement;\n if ($el.prev().is(currentModalDialogRoot)) {\n modalFocusableElement = stdnav.getFirstFocusableElement(currentModalDialogRoot)\n } else if ($el.next().is(currentModalDialogRoot)) {\n modalFocusableElement = stdnav.getLastFocusableElement(currentModalDialogRoot)\n }\n\n if (!modalFocusableElement) {\n logger.error('Modal dialog does not contain any focusable element');\n return element;\n }\n\n return modalFocusableElement;\n }\n});\n\n// SECOND EXTENSION PASS - ATTRIBUTES\n// Hash members in this pass can reference functions from the last pass.\njQuery.extend(stdnavPluginModalTrap.prototype, {\n // This is the name of the new navtype. Each stdnav plugin must\n // define a unique name.\n navtype: 'modalTrap',\n\n // This arrary extends the tag-to-navtype map in stdnav. If your\n // plugin should apply to all elements of a given type, add those\n // element tagnames, in lower case, to this array. It is normally\n // empty, and the page templates simply set an appropriate\n // \"data-navtype=\" attribute to get the expected behavior.\n //\n // CASE SENSITIVE - USE UPPER-CASE!\n navtype_tags: []\n});\nvar newStdnavPluginModalTrap = new stdnavPluginModalTrap();\nexport default newStdnavPluginModalTrap;","/*\n * Copyright (C) 2005 - 2022 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\nimport $ from 'jquery';\nimport logger from \"../../logging/logger\";\nimport stdnav from '../stdnav';\n\nlet localLogger = logger.register(\"stdnavPluginTable\");\n\nvar version = '0.0.1';\nvar singleton = null;\nvar gserial = 0;\nvar stdnavPluginTable = function () {\n gserial++;\n this.serial = gserial;\n};\n$.extend(stdnavPluginTable.prototype, {\n zinit: function (selector) {\n localLogger.debug('stdnavPluginTable.init(' + selector + ')\\n');\n return this;\n },\n activate: function () {\n this.behavior = {\n 'ariaprep': [\n this,\n this._ariaPrep,\n null\n ],\n 'ariarefresh': [\n this,\n this._ariaRefresh,\n null\n ],\n 'down': [\n this,\n this._onDown,\n null\n ],\n 'fixfocus': [\n this,\n this._fixFocus,\n null\n ],\n 'fixsuperfocus': [\n this,\n this._fixSuperfocus,\n null\n ],\n 'inherit': true,\n 'inheritable': true,\n 'left': [\n this,\n this._onLeft,\n null\n ],\n 'mousedown': [\n stdnav,\n stdnav.basicMouseDown\n ],\n 'right': [\n this,\n this._onRight,\n null\n ],\n 'up': [\n this,\n this._onUp,\n null\n ],\n 'superfocusin': [\n stdnav,\n stdnav.basicSuperfocusIn,\n {\n 'maxdepth': 4,\n 'focusSelector': 'td',\n 'ghostfocus': false\n }\n ],\n 'superfocusout': [\n stdnav,\n stdnav.basicSuperfocusOut,\n { 'ghostfocus': false }\n ]\n };\n stdnav.registerNavtype(this.navtype, this.behavior, this.navtype_tags);\n },\n deactivate: function () {\n stdnav.unregisterNavtype(this.navtype, this.behavior);\n },\n _ariaPrep: function (el) {\n this._ariaRefresh(el);\n },\n _ariaRefresh: function (el) {\n var $table = $(el);\n $table.attr('role', 'application');\n var label = $table.attr('aria-label');\n var labelledBy = $table.attr('aria-labelledby');\n var $items = $table.find('td,th');\n if (stdnav.nullOrUndefined(label) && stdnav.nullOrUndefined(labelledBy)) {\n var allLinks = $items.find('a');\n if (allLinks.length === $items.length) {\n $table.attr('aria-label', 'Table of ' + $items.length + ' links.');\n } else {\n $table.attr('aria-label', 'Table of ' + $items.length + ' cells.');\n }\n }\n $.each($items, function (index, item) {\n var $item = $(item);\n var $itemLinks = $item.find('a');\n if ($itemLinks.length > 0) {\n $item.attr('role', 'link');\n var itemLabel = $item.attr('aria-label');\n var itemLabelledBy = $item.attr('aria-labelledby');\n if (stdnav.nullOrUndefined(itemLabel) && stdnav.nullOrUndefined(itemLabelledBy)) {\n var itemText = $item.text();\n itemLabel = itemText;\n $item.attr('aria-label', itemLabel);\n }\n }\n });\n return null;\n },\n _findSubfocus: function (el) {\n var table = $(el).closest('table');\n var sfels = table.find('.subfocus');\n if (sfels !== undefined) {\n return $(sfels[0]);\n }\n },\n _getPreviousSection: function (element) {\n var thisSection = $(element).closest('thead,tbody,tfoot');\n var prevSection;\n if (thisSection === undefined) {\n return undefined;\n }\n switch (thisSection.prop('nodeType')) {\n case 'TFOOT':\n prevSection = thisSection.parent().children('TBODY');\n break;\n case 'TBODY':\n prevSection = thisSection.parent().children('THEAD');\n break;\n case 'THEAD':\n break;\n default:\n }\n if (prevSection !== undefined && prevSection.length > 0) {\n return prevSection[0];\n }\n return undefined;\n },\n _getNextSection: function (element) {\n var thisSection = $(element).closest('thead,tbody,tfoot');\n var nextSection;\n if (thisSection === undefined) {\n return undefined;\n }\n switch (thisSection.prop('nodeType')) {\n case 'THEAD':\n nextSection = thisSection.parent().children('TBODY');\n break;\n case 'TBODY':\n nextSection = thisSection.parent().children('TFOOT');\n break;\n case 'TFOOT':\n break;\n default:\n }\n if (nextSection !== undefined && nextSection.length > 0) {\n return nextSection[0];\n }\n return undefined;\n },\n _fixSuperfocus: function (element) {\n var newSuperfocus;\n var $closestTable = $(element).closest('table');\n if ($closestTable.length > 0) {\n newSuperfocus = $closestTable[0];\n } else {\n newSuperfocus = null;\n }\n return newSuperfocus;\n },\n _fixFocus: function (element) {\n var newFocus;\n switch ($(element).prop('nodeName')) {\n case 'TH':\n case 'TD':\n newFocus = element;\n break;\n case 'TR':\n newFocus = stdnav.closestDescendant(element, 'td,th .ghostfocus', null, 1);\n if (newFocus === undefined) {\n newFocus = stdnav.closestDescendant(element, 'td,th', null, 1);\n if (newFocus === undefined) {\n newFocus = $(element).prev('tr');\n if (newFocus === undefined) {\n newFocus = this._fixFocus($(element).parent());\n }\n }\n }\n break;\n case 'THEAD':\n case 'TBODY':\n case 'TFOOT':\n newFocus = stdnav.closestDescendant(element, 'td,th .ghostfocus', null, 2);\n if (newFocus === undefined) {\n newFocus = stdnav.closestDescendant(element, 'td,th', null, 2);\n if (newFocus === undefined) {\n var nextSection = this._getNextSection(element);\n if (nextSection === undefined) {\n newFocus = this._fixFocus($(element).closest('table'));\n } else {\n newFocus = this._fixFocus(nextSection);\n }\n }\n }\n break;\n case 'COLGROUP':\n case 'COL':\n newFocus = this._fixFocus($(element).closest('table'));\n break;\n case 'CAPTION':\n newFocus = this._fixFocus($(element).closest('table'));\n break;\n case 'TABLE':\n newFocus = stdnav.closestDescendant(element, 'td,th .ghostfocus', null, 5);\n if (newFocus === undefined) {\n newFocus = stdnav.closestDescendant(element, 'td,th', null, 5);\n if (newFocus === undefined) {\n newFocus = element;\n }\n }\n break;\n default:\n newFocus = this._fixFocus($(element).closest('td,th,table'));\n }\n return newFocus;\n },\n _onSubfocusIn: function (element) {\n var fixedSubfocus = element;\n if ($(element).is('td') === false) {\n fixedSubfocus = this._fixSubfocus($(element));\n stdnav.setSubfocus(fixedSubfocus, false);\n }\n $.call(this, stdnav.basicSubfocusIn, fixedSubfocus);\n },\n _onLeft: function (element) {\n var sfel = this._findSubfocus(element);\n var newsf = $(false);\n if (sfel.is('td')) {\n newsf = sfel.prev('td');\n }\n if (newsf.length === 1) {\n return newsf;\n }\n return element;\n },\n _onRight: function (element) {\n var sfel = this._findSubfocus(element);\n var newsf = $(false);\n if (sfel.is('td')) {\n newsf = sfel.next('td');\n }\n if (newsf.length === 1) {\n return newsf;\n }\n return element;\n },\n _onUp: function (element) {\n var sfel = this._findSubfocus(element);\n var row;\n var newrow = $(false);\n var newsf = $(false);\n if (sfel.is('td')) {\n row = sfel.closest('tr');\n if (row.length === 1) {\n newrow = row.prev('tr');\n }\n if (newrow.length == 1) {\n var iter = sfel;\n var col = -1;\n do {\n col++;\n iter = $(iter.prev('td')[0]);\n } while (iter.length > 0);\n newsf = $(newrow.find('td')[0]);\n while (col > 0) {\n iter = newsf.next('td');\n if (iter.length > 0) {\n newsf = $(iter[0]);\n }\n col--;\n }\n }\n }\n if (newsf.length === 1) {\n return newsf;\n }\n return element;\n },\n _onDown: function (element) {\n var sfel = this._findSubfocus(element);\n var row;\n var newrow = $(false);\n var newsf = $(false);\n if (sfel.is('td')) {\n row = sfel.closest('tr');\n if (row.length > 0) {\n newrow = row.next('tr');\n }\n if (newrow.length > 0) {\n var iter = sfel;\n var col = -1;\n do {\n col++;\n iter = $(iter.prev('td')[0]);\n } while (iter.length > 0);\n newsf = $(newrow.find('td')[0]);\n while (col > 0) {\n iter = newsf.next('td');\n if (iter.length > 0) {\n newsf = $(iter[0]);\n }\n col--;\n }\n }\n }\n if (newsf.length === 1) {\n return newsf;\n }\n return element;\n }\n});\n$.extend(stdnavPluginTable.prototype, {\n navtype: 'table',\n navtype_tags: ['TABLE']\n});\nvar newStdnavPluginTable = new stdnavPluginTable();\nexport default newStdnavPluginTable;","/*\n * Copyright (C) 2005 - 2022 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\nimport $ from 'jquery';\nimport logger from \"../../logging/logger\";\nimport stdnav from '../stdnav';\n\n\nlet localLogger = logger.register(\"stdnavPluginWorkflowCard\");\nlet version = '0.0.1';\nlet singleton = null;\nlet gserial = 0;\n\nlet StdnavPluginWorkflowCard = function StdnavPluginWorkflowCard() {\n gserial++;\n this.serial = gserial;\n};\n\n$.extend(StdnavPluginWorkflowCard.prototype, {\n zinit: function zinit(selector) {\n localLogger.debug('stdnavPluginWorkflowCard.init(' + selector + ')\\n');\n return this;\n },\n activate: function activate() {\n this.behavior = {\n 'ariaprep': [this, this._ariaPrep, null],\n 'ariarefresh': [this, this._ariaRefresh, null],\n 'right': [this, this._onRight, null],\n 'left': [this, this._onLeft, null],\n 'up': [this, this._onUp, null],\n 'down': [this, this._onDown, null],\n 'home': [this, this._onHome, null],\n 'end': [this, this._onEnd, null],\n 'toggle': [this, this._onEnterOrToggle, null],\n 'enter': [this, this._onEnterOrToggle, null],\n 'exit': [this, this._onExit, null],\n 'fixfocus': [this, this._fixFocus, null],\n 'fixsuperfocus': [this, this._fixSuperfocus, null],\n 'click': [this, this._onClick, null],\n 'inherit': true,\n 'inheritable': true\n };\n stdnav.registerNavtype(this.navtype, this.behavior, this.navtype_tags);\n },\n deactivate: function deactivate() {\n stdnav.unregisterNavtype('list2', this.behavior);\n },\n _ariaPrep: function _ariaPrep(el) {\n this._ariaRefresh(el);\n },\n _ariaRefresh: function _ariaRefresh() {\n return null;\n },\n _fixFocus: function _fixFocus(element) {\n let $el = $(element);\n\n if ($el.is(\"ul\")) {\n element = $el.find(\"li\").eq(0)[0];\n }\n\n return element;\n },\n _fixSuperfocus: function _fixSuperfocus(element) {\n let newSuperfocus;\n let $closestList = $(element).parents('ul').last();\n\n if ($closestList.length > 0) {\n newSuperfocus = $closestList[0];\n } else {\n newSuperfocus = null;\n }\n return newSuperfocus;\n },\n _onClick: function _onClick(element) {\n const $el = $(element);\n const isButtonOrChild = $el.closest('button').length > 0;\n const isMainUl = $el.prop('nodeName') === 'UL' && $el.attr('role') === 'menubar';\n const isLiMenuItem = $el.prop('nodeName') === 'LI' && $el.attr('role') === 'menuitem';\n\n if (isLiMenuItem) {\n stdnav.forceFocus($el);\n } else if (!(isButtonOrChild || isMainUl)) {\n stdnav.forceFocus($el.parents('li').last());\n }\n },\n _navigationCallbackHandler: function _navigationCallbackHandler(element, listCallback, buttonCallback) {\n const currentFocus = $(element).closest('li,button');\n\n if (currentFocus.prop('nodeName') === 'LI') {\n return listCallback();\n } else if (currentFocus.prop('nodeName') === 'BUTTON') {\n return buttonCallback();\n }\n return null;\n },\n _onLeft: function _onLeft(element) {\n let currentPosition, newPosition, newSelectedButton;\n const visibleButtonList = $(element).closest('ul').find('button:visible');\n\n if (visibleButtonList.first().hasClass('subfocus')) {\n return visibleButtonList.last();\n }\n currentPosition = $('li button').index($('button.subfocus'));\n newPosition = currentPosition - 1;\n newSelectedButton = $('li button').eq(newPosition);\n return newPosition >= 0 && newSelectedButton[0];\n },\n _onRight: function _onRight(element) {\n const listCallback = () => {\n const visibleButtonList = $(element).closest('li').find('button:visible');\n return visibleButtonList.first();\n }\n const buttonCallback = () => {\n let currentPosition, newPosition, newSelectedButton;\n const visibleButtonList = $(element).closest('ul').find('button:visible');\n\n if (visibleButtonList.last().hasClass('subfocus')) {\n return visibleButtonList.first();\n }\n currentPosition = $('li button').index($('button.subfocus'));\n newPosition = currentPosition + 1;\n newSelectedButton = $('li button').eq(newPosition);\n return newSelectedButton.length && newSelectedButton[0];\n }\n return this._navigationCallbackHandler(element, listCallback, buttonCallback);\n },\n _onUp: function _onUp(element) {\n const listCallback = () => {\n const closestLi = $(element).closest('li');\n const liList = closestLi.parent().children('li');\n const previousItem = closestLi.prev();\n\n if (liList.length <= 1) {\n return null;\n }\n return previousItem.length ? previousItem : liList.last();\n }\n const buttonCallback = () => {\n const closestLiParent = $(element).closest('ul').parent();\n const liParentList = closestLiParent.parent().children('li');\n const previousItem = closestLiParent.prev();\n\n if (liParentList.length <= 1) {\n return null;\n }\n return previousItem.length ? previousItem : liParentList.last();\n }\n return this._navigationCallbackHandler(element, listCallback, buttonCallback);\n },\n _onDown: function _onDown(element) {\n const listCallback = () => {\n const closestLi = $(element).closest('li');\n const liList = closestLi.parent().children('li');\n const nextItem = closestLi.next();\n\n if (liList.length <= 1) {\n return null;\n }\n return nextItem.length ? nextItem : liList.first();\n }\n const buttonCallback = () => {\n const closestLiParent = $(element).closest('ul').parent();\n const liParentList = closestLiParent.parent().children('li');\n const nextItem = closestLiParent.next();\n\n if (liParentList.length <= 1) {\n return null;\n }\n return nextItem.length ? nextItem : liParentList.first();\n }\n return this._navigationCallbackHandler(element, listCallback, buttonCallback);\n },\n _onHome: function _onHome(element) {\n const listCallback = () => {\n const liList = $(element).closest('li').parent().children('li');\n return liList.first();\n }\n const buttonCallback = () => {\n const visibleButtonList = $(element).closest('ul').find('button:visible');\n return visibleButtonList.first();\n }\n return this._navigationCallbackHandler(element, listCallback, buttonCallback);\n },\n _onEnd: function _onEnd(element) {\n const listCallback = () => {\n const liList = $(element).closest('li').parent().children('li');\n return liList.last();\n }\n const buttonCallback = () => {\n const visibleButtonList = $(element).closest('ul').find('button:visible');\n return visibleButtonList.last();\n }\n return this._navigationCallbackHandler(element, listCallback, buttonCallback);\n },\n _onEnterOrToggle: function _onEnterOrToggle(element) {\n const $el = $(element);\n if ($el.prop('nodeName') === 'LI' && $el.attr('role') === 'menuitem') {\n return $el.find('button:visible').first();\n }\n return null;\n },\n _onExit: function _onExit(element) {\n const $el = $(element);\n if ($el.prop('nodeName') === 'BUTTON') {\n return $el.closest('ul').parent();\n }\n return null;\n }\n});\n$.extend(StdnavPluginWorkflowCard.prototype, {\n navtype: 'workflowCard',\n navtype_tags: ['li', 'button']\n});\n\nlet stdnavPluginWorkflowCard = new StdnavPluginWorkflowCard();\nexport default stdnavPluginWorkflowCard;\n\n","export enum AriaProps {\n ActiveDescendant = 'aria-activedescendant',\n Atomic = 'aria-atomic',\n AutoComplete = 'aria-autocomplete',\n Busy = 'aria-busy', // (state)\n Checked = 'aria-checked', // (state)\n Controls = 'aria-controls',\n DescribedBy = 'aria-describedby',\n Disabled = 'aria-disabled', // (state)\n DropEffect = 'aria-dropeffect',\n Expanded = 'aria-expanded', // (state)\n FlowTo = 'aria-flowto',\n Grabbed = 'aria-grabbed', // (state)\n HasPopup = 'aria-haspopup',\n Hidden = 'aria-hidden', // (state)\n Invalid = 'aria-invalid', // (state)\n Label = 'aria-label',\n LabelledBy = 'aria-labelledby',\n Level = 'aria-level',\n Live = 'aria-live',\n MultiLine = 'aria-multiline',\n MultiSelectable = 'aria-multiselectable',\n Orientation = 'aria-orientation',\n Owns = 'aria-owns',\n PosInSet = 'aria-posinset',\n Pressed = 'aria-pressed', // (state)\n ReadOnly = 'aria-readonly',\n Relevant = 'aria-relevant',\n Required = 'aria-required',\n Selected = 'aria-selected', // (state)\n SetSize = 'aria-setsize',\n Sort = 'aria-sort',\n ValueMax = 'aria-valuemax',\n ValueMin = 'aria-valuemin',\n ValueNow = 'aria-valuenow',\n ValueText = 'aria-valuetext',\n}\n","/*\n * Copyright (C) 2005 - 2022 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\nimport browserDetection from './browserDetection';\nimport $ from 'jquery';\nexport default {\n mouseEventOptions: {\n bubbles: true,\n cancelable: true,\n view: document.defaultView,\n detail: 0,\n screenX: 0,\n screenY: 0,\n clientX: 0,\n clientY: 0,\n ctrlKey: false,\n altKey: false,\n shiftKey: false,\n metaKey: false,\n button: 0,\n relatedTarget: null,\n srcElement: null\n },\n triggerNativeEvent: function (eventName, target, options) {\n var ie = browserDetection.isIE(), ev;\n target = target || (ie ? document.documentElement : window);\n if (document.createEvent) {\n var opts;\n switch (eventName) {\n case 'click':\n case 'doubleclick':\n case 'mousedown':\n case 'mousemove':\n case 'mouseout':\n case 'mouseover':\n case 'mouseup':\n opts = $.extend({}, this.mouseEventOptions, options);\n opts.srcElement = target;\n if (typeof MouseEvent === 'function') {\n ev = new MouseEvent(eventName, opts);\n } else {\n ev = document.createEvent('MouseEvents');\n ev.initMouseEvent(eventName, opts.bubbles, opts.cancelable, opts.view, opts.detail, opts.screenX, opts.screenY, opts.clientX, opts.clientY, opts.ctrlKey, opts.altKey, opts.shiftKey, opts.metaKey, opts.button, opts.relatedTarget);\n }\n break;\n default:\n opts = $.extend({}, this.eventOptions, options);\n opts.srcElement = target;\n ev = document.createEvent('HTMLEvents');\n ev.initEvent(eventName, opts.bubble, opts.cancelable);\n }\n target.dispatchEvent(ev);\n } else {\n ev = document.createEventObject();\n ev.srcElement = target;\n if (eventName == 'click' && typeof target.click !== 'undefined') {\n target.click();\n } else {\n target.fireEvent('on' + eventName, ev);\n }\n }\n },\n simulateClickSequence: function (element) {\n this.triggerNativeEvent('mousedown', element);\n this.triggerNativeEvent('mouseup', element);\n this.triggerNativeEvent('click', element);\n },\n simulateDoubleClickSequence: function (element) {\n this.triggerNativeEvent('mousedown', element);\n this.triggerNativeEvent('mouseup', element);\n this.triggerNativeEvent('click', element);\n this.triggerNativeEvent('mousedown', element);\n this.triggerNativeEvent('mouseup', element);\n this.triggerNativeEvent('click', element);\n this.triggerNativeEvent('dblclick', element);\n }\n};","/*\n * Copyright (C) 2005 - 2022 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\n\n/**\n* @author: Igor Nesterenko\n* @version: $Id$\n*/\n\nimport Backbone from 'backbone';\nimport $ from 'jquery';\nimport _ from 'underscore';\nimport popupContainerTemplate from './template/dateTimePopupContainer.htm';\n\nimport logger from \"../../common/logging/logger\";\n\nimport \"../../common/extension/jQueryTimepickerExtension\";\n\nvar DATE_TIME_DEFAULTS = {\n stepHour: 1,\n stepMinute: 1,\n stepSecond: 1,\n showSecond: true,\n changeMonth: true,\n changeYear: true,\n showButtonPanel: true,\n onChangeMonthYear: null,\n constrainInput: false\n },\n TIME_DEFAULTS = {\n showSecond:true,\n constrainInput:false\n };\n\nlet log = logger.register(\"DateAndTimePicker\");\n\n$.timepicker.log = function (err) {\n //redirect error messages to our logger\n log.warn(err);\n};\n\nexport default Backbone.View.extend({\n\n /**\n * @constructor DateAndTimePicker\n * @class DateAndTimePicker\n * @classdesc DateAndTimePicker decorator over jQuery datetime pickers\n * @extends Backbone.View\n * @param {object} options - mixin on Backbone standard properties and jQuery datetime pickers\n * @description - You have to pass 'el' property to point to element in DOM. We have next behaviour\n * - by default it renders with datetimepicker\n * - if only `dateFormat` it renders with datepicker\n * - if only `timeFormat` it renders with timepicker\n * - if `dateFormat` and `timeFormat` specified it renders with datetimepicker\n */\n\n constructor: function (options) {\n this.pickerOptions = _.clone(options);\n\n if (this.pickerOptions.hasOwnProperty(\"dateFormat\") && !_.isString(this.pickerOptions.dateFormat)) {\n delete this.pickerOptions.dateFormat;\n }\n if (this.pickerOptions.hasOwnProperty(\"timeFormat\") && !_.isString(this.pickerOptions.timeFormat)) {\n delete this.pickerOptions.timeFormat;\n }\n\n this.inline = !!this.pickerOptions.el || false;\n this.skipMoving = this.pickerOptions.skipMoving || false;\n //clean up from backbone props\n delete this.pickerOptions.el;\n delete this.pickerOptions.skipMoving;\n\n this.pickerType = discoverPickerType(this.pickerOptions);\n\n this.pickerOptions = provideDefaultPickerOptions(this.pickerOptions, this.pickerType);\n\n this.pickerOptions = fixPopupPositionAndStyling(this.pickerOptions, this.skipMoving);\n\n this.log = options.log ? options.log : log;\n\n Backbone.View.apply(this, arguments);\n },\n\n initialize: function () {\n var self = this;\n\n //initialize picker\n this.$el[this.pickerType](this.pickerOptions);\n\n this._callPickerAction = function (options) {\n self.$el[self.pickerType](options);\n }\n },\n\n /**\n * @return {Date} - standart date object\n * @description Return Date if components has it\n */\n\n getDate: function(){\n var date;\n\n if (this.pickerType !== \"timepicker\"){\n date = this.$el[this.pickerType].getDate();\n }else{\n date = this.$el[this.pickerType].getTime();\n }\n return date;\n },\n\n /**\n * @params {Date|String} date\n * @return this\n */\n\n setDate: function(date){\n\n if (!date) return this;\n\n try{\n //try to convert string to date object\n // we don't need to convert time because setTime method accepts string time format\n if (_.isString(date)){\n if (this.pickerType === \"datetimepicker\") {\n date = $.datepicker.parseDateTime(this.pickerOptions.dateFormat, this.pickerOptions.timeFormat, date);\n } else if (this.pickerType === \"datepicker\") {\n date = $.datepicker.parseDate(this.pickerOptions.dateFormat, date);\n }\n }\n\n if (this.pickerType === \"datepicker\"){\n this.$el[this.pickerType](\"setDate\", date);\n }else if (this.pickerType === \"timepicker\") {\n this.$el[this.pickerType](\"setTime\", date);\n }else if (this.pickerType === \"datetimepicker\"){\n this.$el[this.pickerType](\"setTime\", date);\n this.$el[this.pickerType](\"setDate\", date);\n }\n\n }catch(err){\n this.log.debug(err);\n }\n return this;\n },\n\n /**\n * @description Show picker\n */\n\n show: function () {\n this._callPickerAction(\"show\");\n return this;\n },\n\n /**\n * @description Hide picker\n */\n\n hide: function () {\n this._callPickerAction(\"hide\");\n return this;\n },\n\n remove: function () {\n this._callPickerAction(\"destroy\");\n if (this.inline) {\n this.$el.empty().off();\n this.stopListening();\n } else {\n Backbone.View.prototype.remove.apply(this, arguments);\n }\n\n }\n\n}, {\n\n /**\n * @param {object} configs - which should contains 'locale', configs for 'date' amd configs for 'time'\n * @description Provide defaults for locale specific configuration\n */\n\n setDefaults : function(configs){\n $.datepicker.regional[configs.locale] = configs.date;\n $.datepicker.setDefaults(configs.date);\n $.timepicker.setDefaults(configs.time);\n },\n\n Helpers : {\n\n fixPopupPositionAndStyling: fixPopupPositionAndStyling,\n\n movePickerRelativelyToTriggerIcon: movePickerRelativelyToTriggerIcon,\n\n stylePopupContainer: stylePopupContainer,\n\n discoverPickerType: discoverPickerType,\n\n provideDefaultPickerOptions: provideDefaultPickerOptions\n }\n});\n\nfunction discoverPickerType(options) {\n var result = \"datetimepicker\";\n if (options.dateFormat && options.timeFormat) {\n return result;\n } else if (options.dateFormat) {\n result = \"datepicker\"\n } else if (options.timeFormat) {\n result = \"timepicker\"\n }\n return result;\n}\n\nfunction provideDefaultPickerOptions(options, type){\n\n var result = options;\n\n if (\"datetimepicker\" == type || \"datepicker\" == type){\n result = _.defaults(options, DATE_TIME_DEFAULTS);\n }else if(\"timepicker\" == type){\n result = _.defaults(options, TIME_DEFAULTS)\n }\n\n return result;\n}\n\nfunction fixPopupPositionAndStyling(options, skipMoving) {\n\n var originalBeforeShowFn = options.beforeShow;\n\n options.beforeShow = function () {\n stylePopupContainer.apply(this, arguments);\n skipMoving || movePickerRelativelyToTriggerIcon.apply(this, arguments);\n originalBeforeShowFn && originalBeforeShowFn.apply(this, arguments);\n };\n\n options.afterInject = function() {\n stylePopupContainer.apply(this, [this.$input[0], this.inst]);\n };\n\n return options;\n}\n\nfunction movePickerRelativelyToTriggerIcon(input, inst) {\n var offset = $(input).offset().left;\n var width = parseFloat(inst.dpDiv.css(\"width\").replace(\"px\", \"\"));\n var move = offset + input.offsetWidth + width < $(window).width();\n inst.dpDiv.css({\n marginLeft: move ? input.offsetWidth + \"px\" : 0\n });\n}\n\nfunction stylePopupContainer(input, inst) {\n var $popupContainer = inst.dpDiv,\n $parent = $popupContainer.parent(),\n $dpDiv;\n\n if ($parent && $parent.is('body')) {\n $dpDiv = $popupContainer.detach();\n $popupContainer = $(popupContainerTemplate);\n $popupContainer.append($dpDiv);\n $('body').append($popupContainer);\n }\n}\n","export default \"

\\n\";","\n import settingsStore from 'settingsStore';\n settingsStore['dateTimeSettings'] = settingsStore['dateTimeSettings'] || {};\n export default settingsStore['dateTimeSettings'];\n "],"sourceRoot":""}