moodle/lib/amd/build/icon_system_standard.min.js
2023-07-07 16:13:27 +08:00

10 lines
2.0 KiB
JavaScript

define("core/icon_system_standard",["exports","./icon_system","./url","./mustache"],(function(_exports,_icon_system,CoreUrl,Mustache){var obj;
/**
* The Standard icon system.
*
* @module core/icon_system_standard
* @copyright 2017 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!=typeof obj&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_icon_system=(obj=_icon_system)&&obj.__esModule?obj:{default:obj},CoreUrl=_interopRequireWildcard(CoreUrl),Mustache=_interopRequireWildcard(Mustache);class IconSystemStandard extends _icon_system.default{renderIcon(key,component,title,template){const templatecontext={attributes:[{name:"src",value:CoreUrl.imageUrl(key,component)},{name:"alt",value:title},{name:"title",value:title}]};return void 0!==title&&""!=title||templatecontext.attributes.push({name:"aria-hidden",value:"true"}),Mustache.render(template,templatecontext).trim()}getTemplateName(){return"core/pix_icon"}}return _exports.default=IconSystemStandard,_exports.default}));
//# sourceMappingURL=icon_system_standard.min.js.map