'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, 2020 * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ define(['underscore', 'gemini/lib/@waca/dashboard-common/dist/core/APIFactory', 'gemini/lib/@waca/dashboard-common/dist/api/PropertiesProviderAPI'], function (_, APIFactory, PropertiesProviderAPI) { var BLACKLISTED_PROPERTIES = ['layoutPositioning']; var TopLevelPropertiesProvider = function () { function TopLevelPropertiesProvider(options) { _classCallCheck(this, TopLevelPropertiesProvider); this.dashboardApi = options.dashboardAPI; this.content = options.content; this.stringResources = this.dashboardApi.getFeature('.StringResources'); this._api = APIFactory.createAPI(this, [PropertiesProviderAPI]); // register self as a properties provider contributing storytelling TopLevelPropertiesProvider properties this.content.getFeature('Properties').registerProvider(this.getAPI()); } TopLevelPropertiesProvider.prototype.getAPI = function getAPI() { return this._api; }; TopLevelPropertiesProvider.prototype.getPropertyLayoutList = function getPropertyLayoutList() { return [{ id: 'canvas', type: 'Section', label: this.stringResources.get('sectionName_canvas'), position: 1 }]; }; TopLevelPropertiesProvider.prototype.getPropertyList = function getPropertyList() { return this._getBlackListedPropertiesList(BLACKLISTED_PROPERTIES); }; TopLevelPropertiesProvider.prototype._getBlackListedPropertiesList = function _getBlackListedPropertiesList(list) { return list.map(function (propertyName) { return { id: propertyName, getPropertyValue: function getPropertyValue() {}, editor: { hidden: true } }; }); }; return TopLevelPropertiesProvider; }(); return TopLevelPropertiesProvider; }); //# sourceMappingURL=TopLevelPropertiesProvider.js.map