ContentPropertiesProvider.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. 'use strict';
  2. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3. /**
  4. * Licensed Materials - Property of IBM
  5. * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2020
  6. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. */
  8. define(['../../../lib/@waca/dashboard-common/dist/core/APIFactory', '../../../lib/@waca/dashboard-common/dist/api/PropertiesProviderAPI'], function (APIFactory, PropertiesProviderAPI) {
  9. var ContentProperties = function () {
  10. function ContentProperties(_ref) {
  11. var features = _ref.features,
  12. options = _ref.options;
  13. _classCallCheck(this, ContentProperties);
  14. this._api = APIFactory.createAPI(this, [PropertiesProviderAPI]);
  15. this._options = options;
  16. this._propertyList = options && options.propertyList ? JSON.parse(JSON.stringify(options.propertyList)) : [];
  17. features.Properties.registerProvider(this.getAPI());
  18. }
  19. ContentProperties.prototype.getAPI = function getAPI() {
  20. return this._api;
  21. };
  22. ContentProperties.prototype.getPropertyLayoutList = function getPropertyLayoutList() {
  23. if (!this._propertyLayoutList) {
  24. this._propertyLayoutList = this._options && this._options.propertyLayoutList ? this._options.propertyLayoutList : [];
  25. }
  26. return this._propertyLayoutList;
  27. };
  28. ContentProperties.prototype.getPropertyList = function getPropertyList() {
  29. return this._propertyList;
  30. };
  31. return ContentProperties;
  32. }();
  33. return ContentProperties;
  34. });
  35. //# sourceMappingURL=ContentPropertiesProvider.js.map