How to use the @jupyterlab/observables.ObservableJSON.ChangeMessage function in @jupyterlab/observables

To help you get started, we’ve selected a few @jupyterlab/observables examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jupyterlab / jupyterlab-data-explorer / tests / test-observables / src / observablejson.spec.ts View on Github external
it('should create a new message', () => {
        const message = new ObservableJSON.ChangeMessage('jsonvalue-changed', {
          key: 'foo',
          type: 'add',
          oldValue: 1,
          newValue: 2
        });
        expect(message).to.be.an.instanceof(ObservableJSON.ChangeMessage);
      });
    });
github jupyterlab / jupyterlab-data-explorer / tests / test-observables / src / observablejson.spec.ts View on Github external
it('should be the args of the message', () => {
        const args: IObservableJSON.IChangedArgs = {
          key: 'foo',
          type: 'add',
          oldValue: 'ho',
          newValue: 'hi'
        };
        const message = new ObservableJSON.ChangeMessage(
          'jsonvalue-changed',
          args
        );
        expect(message.args).to.equal(args);
      });
    });
github jupyterlab / jupyterlab-data-explorer / packages / notebook / src / notebooktools.ts View on Github external
private _onActiveCellMetadataChanged(
    sender: IObservableMap,
    args: IObservableMap.IChangedArgs
  ): void {
    let message = new ObservableJSON.ChangeMessage(
      'activecell-metadata-changed',
      args
    );
    each(this._toolChildren(), widget => {
      MessageLoop.sendMessage(widget, message);
    });
  }
github jupyterlab / jupyterlab-data-explorer / jupyterlab / packages / notebook / src / notebooktools.ts View on Github external
private _onActiveCellMetadataChanged(
    sender: IObservableMap,
    args: IObservableMap.IChangedArgs
  ): void {
    let message = new ObservableJSON.ChangeMessage(
      'activecell-metadata-changed',
      args
    );
    each(this._toolChildren(), widget => {
      MessageLoop.sendMessage(widget, message);
    });
  }
github jupyterlab / jupyterlab-data-explorer / packages / notebook / src / notebooktools.ts View on Github external
private _onActiveNotebookPanelMetadataChanged(
    sender: IObservableMap,
    args: IObservableMap.IChangedArgs
  ): void {
    let message = new ObservableJSON.ChangeMessage(
      'activenotebookpanel-metadata-changed',
      args
    );
    each(this._toolChildren(), widget => {
      MessageLoop.sendMessage(widget, message);
    });
  }
github jupyterlab / jupyterlab-data-explorer / jupyterlab / packages / notebook / src / notebooktools.ts View on Github external
private _onActiveNotebookPanelMetadataChanged(
    sender: IObservableMap,
    args: IObservableMap.IChangedArgs
  ): void {
    let message = new ObservableJSON.ChangeMessage(
      'activenotebookpanel-metadata-changed',
      args
    );
    each(this._toolChildren(), widget => {
      MessageLoop.sendMessage(widget, message);
    });
  }