tao-test/app/taoQtiTest/views/js/loader/testPlugins.min.js

2 lines
377 KiB
JavaScript
Raw Normal View History

2022-08-29 20:14:13 +02:00
function _typeof2(obj){"@babel/helpers - typeof";return _typeof2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof2(obj)}define("taoQtiTest/runner/plugins/content/accessibility/focusOnFirstField",["lodash","taoTests/runner/plugin","ckeditor"],function(_,pluginFactory,ckEditor){'use strict';function isIOSDevice(){return /(iPhone|iPad)/i.test(navigator.userAgent)}_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,pluginFactory=pluginFactory&&Object.prototype.hasOwnProperty.call(pluginFactory,"default")?pluginFactory["default"]:pluginFactory,ckEditor=ckEditor&&Object.prototype.hasOwnProperty.call(ckEditor,"default")?ckEditor["default"]:ckEditor;var focusOnFirstField=pluginFactory({name:"focusOnFirstField",init:function(){var self=this;isIOSDevice()||this.getTestRunner().after("renderitem",function(){var $input=self.getAreaBroker().getContentArea().find(".qti-itemBody").find("input, textarea, select").not(":input[type=button], :input[type=submit], :input[type=reset]").first(),$cke=$input.closest(".qti-interaction").find(".cke");$cke.length?_.delay(function(){ckEditor.instances[$cke.attr("id").replace(/^cke_/,"")].focus()},100):$input.focus()})}});return focusOnFirstField}),define("taoQtiTest/runner/plugins/content/accessibility/jumplinks/helpers",["exports","i18n"],function(exports,__){'use strict';__=__&&Object.prototype.hasOwnProperty.call(__,"default")?__["default"]:__;var getItemStatus=function(item){return item.flagged?__("Flagged for review"):item.answered?__("Answered"):item.viewed?__("Not answered"):__("Not seen")};exports.getItemStatus=getItemStatus,exports.getJumpElementFactory=function(broker){return{get container(){return broker.getContainer()},get question(){return broker.getContainer().find(".content-wrapper").first()},get navigation(){return broker.getNavigationArea().find(":not(.hidden)[tabindex]").first()},get toolbox(){return broker.getToolboxArea().find(":not(.hidden)[tabindex]").first()},get teststatus(){return broker.getPanelArea().find(":not(.hidden)[tabindex]").first()}}},exports.isReviewPanelHidden=function(testRunner){return testRunner.getAreaBroker().getPanelArea().find(".qti-navigator").is(".hidden")},Object.defineProperty(exports,"__esModule",{value:!0})}),define("taoQtiTest/runner/plugins/content/accessibility/jumplinks/jumplinks",["lodash","ui/component","handlebars"],function(_,component,Handlebars){'use strict';function jumplinksTpl(data,options,asString){var html=Template(data,options);return asString||!0?html:$(html)}function jumplinksFactory(config){var jumplinksBox=component({},defaults).on("render",function(){var _this=this;_.forEach([{selector:"[data-jump=question] ",eventName:"jump",eventParam:"question"},{selector:"[data-jump=navigation]",eventName:"jump",eventParam:"navigation"},{selector:"[data-jump=toolbox]",eventName:"jump",eventParam:"toolbox"},{selector:"[data-jump=teststatus]",eventName:"jump",eventParam:"teststatus"},{selector:"[data-jump=shortcuts]",eventName:"shortcuts",eventParam:"shortcuts"}],function(linkDescription){var $link=_this.getElement().find(linkDescription.selector),handleLink=function(){_this.trigger(linkDescription.eventName,linkDescription.eventParam),_this.getElement().find(":focus").blur()};$link&&($link.on("click",handleLink),$link.on("keyup",function(event){[32,13].includes(event.keyCode)&&handleLink()}))})});return jumplinksBox.setTemplate(jumplinksTpl),_.defer(function(){jumplinksBox.init(config)}),jumplinksBox}_=_&&Object.prototype.hasOwnProperty.call(_,"default")?_["default"]:_,component=component&&Object.prototype.hasOwnProperty.call(component,"default")?component["default"]:component,Handlebars=Handlebars&&Object.prototype.hasOwnProperty.call(Handlebars,"default")?Handlebars["default"]:Handlebars;var Template=Handlebars.template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),dat
//# sourceMappingURL=testPlugins.min.js.map