2 lines
338 KiB
JavaScript
2 lines
338 KiB
JavaScript
|
function _typeof(obj){"@babel/helpers - typeof";return _typeof="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},_typeof(obj)}define("taoQtiTest/controller/creator/areaBroker",["lodash","ui/areaBroker"],function(_,areaBroker){'use strict';return _.partial(areaBroker,["creator","itemSelectorPanel","contentCreatorPanel","propertyPanel","elementPropertyPanel"])}),define("taoQtiTest/controller/creator/config/defaults",["lodash","module"],function(_,module){'use strict';return function(){var config=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};return _.defaults({},module.config(),config)}}),define("taoQtiTest/controller/creator/helpers/baseType",["lodash"],function(_){'use strict';var baseTypeEnum={IDENTIFIER:0,BOOLEAN:1,INTEGER:2,FLOAT:3,STRING:4,POINT:5,PAIR:6,DIRECTED_PAIR:7,DURATION:8,FILE:9,URI:10,INT_OR_IDENTIFIER:11,COORDS:12,ANY:12,SAME:13},baseTypeHelper=_({asArray:function(){return baseTypeEnum},getValid:function(type,defaultType){return _.isFinite(type)?!baseTypeHelper.getNameByConstant(type)&&(type=!1):type=baseTypeHelper.getConstantByName(type),!1===type&&(_.isUndefined(defaultType)||-1===defaultType?type=-1:type=baseTypeHelper.getValid(defaultType,-1)),type},getValue:function(type,value){switch(_.isString(type)&&(type=baseTypeHelper.getConstantByName(type)),type){case baseTypeEnum.URI:case baseTypeEnum.STRING:case baseTypeEnum.IDENTIFIER:return value+"";case baseTypeEnum.BOOLEAN:if(_.isString(value))switch(value.toLowerCase()){case"true":return!0;case"false":return!1;}return!!value;case baseTypeEnum.INTEGER:return parseInt(value,10)||0;case baseTypeEnum.FLOAT:return parseFloat(value)||0;case baseTypeEnum.INT_OR_IDENTIFIER:return _.isNaN(parseInt(value,10))?""+value:parseInt(value,10)||0;}return value},getConstantByName:function(name){switch((name+"").trim().toLowerCase()){case"identifier":return baseTypeEnum.IDENTIFIER;case"boolean":return baseTypeEnum.BOOLEAN;case"integer":return baseTypeEnum.INTEGER;case"float":return baseTypeEnum.FLOAT;case"string":return baseTypeEnum.STRING;case"point":return baseTypeEnum.POINT;case"pair":return baseTypeEnum.PAIR;case"directedpair":return baseTypeEnum.DIRECTED_PAIR;case"duration":return baseTypeEnum.DURATION;case"file":return baseTypeEnum.FILE;case"uri":return baseTypeEnum.URI;case"intoridentifier":return baseTypeEnum.INT_OR_IDENTIFIER;case"coords":return baseTypeEnum.COORDS;case"any":return baseTypeEnum.ANY;case"same":return baseTypeEnum.SAME;default:return!1;}},getNameByConstant:function(constant,operator){return constant===baseTypeEnum.IDENTIFIER?"identifier":constant===baseTypeEnum.BOOLEAN?"boolean":constant===baseTypeEnum.INTEGER?"integer":constant===baseTypeEnum.FLOAT?"float":constant===baseTypeEnum.STRING?"string":constant===baseTypeEnum.POINT?"point":constant===baseTypeEnum.PAIR?"pair":constant===baseTypeEnum.DIRECTED_PAIR?"directedPair":constant===baseTypeEnum.DURATION?"duration":constant===baseTypeEnum.FILE?"file":constant===baseTypeEnum.URI?"uri":constant===baseTypeEnum.INT_OR_IDENTIFIER?"intOrIdentifier":constant===baseTypeEnum.COORDS||constant===baseTypeEnum.ANY?operator?"any":"coords":!(constant!==baseTypeEnum.SAME)&&"same"}}).assign(baseTypeEnum).value();return baseTypeHelper}),define("taoQtiTest/controller/creator/helpers/cardinality",["lodash"],function(_){'use strict';var cardinalityEnum={SINGLE:0,MULTIPLE:1,ORDERED:2,RECORD:3,SAME:4,ANY:5},cardinalityHelper=_({asArray:function(){return cardinalityEnum},getValid:function(cardinality,defaultCardinality){return _.isFinite(cardinality)?!cardinalityHelper.getNameByConstant(cardinality)&&(cardinality=!1):cardinality=cardinalityHelper.getConstantByName(cardinality),!1===cardinality&&(_.isUndefined(defaultCardinality)||defaultCardinality===cardinalityEnum.SINGLE?cardinality=cardinalityEnum.SINGLE:cardinality=cardinalityHelper.getValid(defaultCardinality,cardinalityEnum.SINGLE)),cardinality},getConstantByName:function(name){switch((name+""
|
||
|
//# sourceMappingURL=taoQtiTest.min.js.map
|