"use strict"; /**  * Licensed Materials - Property of IBM  * IBM Cognos Products: Cognos Analytics  * Copyright IBM Corp. 2018  * US Government Users Restricted Rights - * Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.  */ define(['underscore', 'bi/admin/common/slideout/BasePane', 'bi/admin/nls/StringResource', 'react-dom', 'react', 'ba-react-admin/ba-react-admin.min'], function (_, BasePane, StringResource, ReactDOM, React, AdminReact) { 'use strict'; //NOSONAR: meant to be strict var BulkMembershipPane = BasePane.extend({ /** * @constructor * @param options.$el - JQuery node to append the table HTML * @param options.items {object} - An array of tab metadata. Must provide name, * module, and objectInfo (containing all the basic properties of the object) */ init: function init(options) { BulkMembershipPane.inherited('init', this, arguments); _.extend(this, options); this.title = StringResource.get('bulkMembershipGroupsRolesAccounts'); this.$el.addClass('bulkMembershipSlideout'); }, _getNewPropertyUIControl: function _getNewPropertyUIControl(options) { return new PropertyUIControl(options); }, renderBody: function renderBody($body) { ReactDOM.unmountComponentAtNode(this.$el.find('.bi-admin-pane-body')[0]); this.reactBulkImportPane = React.createElement(AdminReact.BulkMembershipView, { 'StringResource': StringResource, 'glassContext': this.glassContext, 'close': this._closeSlideout.bind(this), 'objectInfo': this.objectInfo, 'refreshListCallback': this.refreshListCallback.bind(this.parentView) }); ReactDOM.render(this.reactBulkImportPane, this.$el.find('.bi-admin-pane-body')[0]); return Promise.resolve(); }, _closeSlideout: function _closeSlideout() { this.slideout.hide(); }, remove: function remove() { BulkMembershipPane.inherited('remove', this, arguments); ReactDOM.unmountComponentAtNode(this.$el.find('.bi-admin-pane-body')[0]); this.reactBulkImportPane = null; } }); return BulkMembershipPane; });