1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- '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 Cognos Products: BI Cloud (C) Copyright IBM Corp. 2019
- * 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', './api/ContentActionsAPI'], function (APIFactory, ContentActionsAPI) {
- var ContentActions = function () {
- function ContentActions() {
- _classCallCheck(this, ContentActions);
- this.api = APIFactory.createAPI(this, [ContentActionsAPI]);
- this.providers = {};
- }
- ContentActions.prototype.registerProvider = function registerProvider(name, provider) {
- this.providers[name] = provider;
- };
- ContentActions.prototype.getContentActionList = function getContentActionList(idList) {
- var contentActionList = [];
- Object.values(this.providers).forEach(function (provider) {
- if (provider.getContentActionList && typeof provider.getContentActionList === 'function') {
- var actions = null;
- try {
- actions = provider.getContentActionList(idList);
- } catch (e) {
- console.log(e);
- }
- if (actions) {
- contentActionList.push.apply(contentActionList, actions);
- }
- }
- });
- return contentActionList;
- };
- ContentActions.prototype.getAPI = function getAPI() {
- return this.api;
- };
- return ContentActions;
- }();
- return ContentActions;
- });
- //# sourceMappingURL=ContentActions.js.map
|