12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- 'use strict';
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- /**
- * Licensed Materials - Property of IBM
- * IBM Business Analytics (C) Copyright IBM Corp. 2020
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define(['../../../../../lib/@waca/dashboard-common/dist/core/APIFactory', '../IconsAPI'], function (APIFactory, IconsAPI) {
- var Icons = function () {
- function Icons() {
- _classCallCheck(this, Icons);
- this._api = APIFactory.createAPI(this, [IconsAPI]);
- this._iconCache = {};
- }
- Icons.prototype.getAPI = function getAPI() {
- return this._api;
- };
- Icons.prototype.registerIcons = function registerIcons() {
- var _this = this;
- var iconList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
- iconList.forEach(function (item) {
- if (item.icon) {
- _this._iconCache[item.id] = item.icon.default;
- } else if (item.icons) {
- _this._iconCache[item.id] = item.icons.default;
- }
- });
- };
- Icons.prototype.getIcon = function getIcon(iconId) {
- return this._iconCache[iconId];
- };
- return Icons;
- }();
- return Icons;
- });
- //# sourceMappingURL=Icons.js.map
|