'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. 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', '../../../lib/@waca/dashboard-common/dist/api/PropertiesProviderAPI'], function (APIFactory, PropertiesProviderAPI) { var DashboardInternalProperties = function () { function DashboardInternalProperties(_ref) { var features = _ref.features, options = _ref.options; _classCallCheck(this, DashboardInternalProperties); this._api = APIFactory.createAPI(this, [PropertiesProviderAPI]); this._templateCollection = options.templateCollection || []; features['Properties'].registerProvider(this.getAPI()); } DashboardInternalProperties.prototype.getAPI = function getAPI() { return this._api; }; DashboardInternalProperties.prototype.getPropertyLayoutList = function getPropertyLayoutList() { return []; }; DashboardInternalProperties.prototype.getPropertyList = function getPropertyList() { var _this = this; return [{ id: 'excludedTemplates', getPropertyValue: function getPropertyValue() { return _this._getExcludedTemplatesFromCollections(); }, setPropertyValue: function setPropertyValue() { throw new Error('not supported'); } }]; }; DashboardInternalProperties.prototype._getExcludedTemplatesFromCollections = function _getExcludedTemplatesFromCollections() { var excludedTemplates = []; this._templateCollection.find(function (template) { if (template.dataId === 'tab' && Array.isArray(template.excludedTemplates)) { excludedTemplates = excludedTemplates.concat(template.excludedTemplates); } }); return excludedTemplates; }; return DashboardInternalProperties; }(); return DashboardInternalProperties; }); //# sourceMappingURL=DashboardInternalProperties.js.map