1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- /**
- * Licensed Materials - Property of IBM
- * IBM Cognos Products: Modeling UI (C) Copyright IBM Corp. 2019
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define([
- 'bi/glass/app/ContentView'
- ], function (ContentView) {
- var ModellingSettingsViewBridge = ContentView.extend({
- init(options) {
- ContentView.inherited('init', this, [options]);
- // assign options to props because react-like
- this.props = options;
- // this.initialize(this.props, options.glassContext);
- },
- // hook for subclasses
- initialize() {},
- /**
- * Glass will call this method to get the asset type that is used to match share action handler.
- * In <i>perspectives/common/ca-modeller.json</i>, the types of share feature should contain this type.
- */
- getType() {
- return 'module';
- },
- render() {
- return new Promise((resolve, reject) => {
- require(['ca-modeller/modellingSettings'], (modellingSettingsModule) => {
- if (!this._unmounted) {
- this._unmount = modellingSettingsModule.default(this.props.glassContext, { el: this.el });
- resolve();
- }
- });
- });
- },
- onClose() {
- if (this._unmount && this.el) {
- this._unmount();
- } else {
- this._unmounted = true;
- }
- }
- });
- return ModellingSettingsViewBridge;
- });
|