1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- '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', './UserProfileAPI'], function (APIFactory, UserProfileAPI) {
- /**
- * @class
- * @implements UserProfileAPI
- * @hideconstructor
- * @classdesc default implementation of the UserProfileAPI
- */
- var UserProfileImpl = function () {
- function UserProfileImpl() {
- _classCallCheck(this, UserProfileImpl);
- this._api = APIFactory.createAPI(this, [UserProfileAPI]);
- this._capabilities = {
- 'canAuthorDashboard': true,
- 'canUseInteractiveDashboard': true
- };
- }
- /**
- * it is required in order to be defined as a dashboard feature
- * @returns {Object} instance of the API implementation
- */
- UserProfileImpl.prototype.getAPI = function getAPI() {
- return this._api;
- };
- UserProfileImpl.prototype.getAvailableContentLocales = function getAvailableContentLocales() {
- return Promise.resolve(null);
- };
- UserProfileImpl.prototype.getValidDomainList = function getValidDomainList() {
- return null;
- };
- /**
- *
- * @param {string} capabilityName
- * @returns {boolean} true for the built-in capabilities, false otherwise
- */
- UserProfileImpl.prototype.hasCapability = function hasCapability(capabilityName) {
- var hasIt = capabilityName ? !!this._capabilities[capabilityName] : false;
- return hasIt;
- };
- UserProfileImpl.prototype.getContentLocale = function getContentLocale() {
- return 'en';
- };
- UserProfileImpl.prototype.getUserAccount = function getUserAccount() {
- return {
- defaultName: undefined,
- userName: undefined,
- id: undefined
- };
- };
- return UserProfileImpl;
- }();
- return UserProfileImpl;
- });
- //# sourceMappingURL=UserProfileImpl.js.map
|