UNPKG

jupyterlab-emrys

Version:

A computational environment for Jupyter. Powered by Emrys

32 lines (31 loc) 861 B
// Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. "use strict"; var docregistry_1 = require('../docregistry'); var widget_1 = require('./widget'); /** * The list of file extensions for csv tables. */ var EXTENSIONS = ['.csv']; /** * The table file handler extension. */ exports.csvHandlerExtension = { id: 'jupyter.extensions.csvHandler', requires: [docregistry_1.DocumentRegistry], activate: activateCSVWidget }; /** * Activate the table widget extension. */ function activateCSVWidget(app, registry) { var options = { fileExtensions: EXTENSIONS, defaultFor: EXTENSIONS, displayName: 'Table', modelName: 'text', preferKernel: false, canStartKernel: false }; registry.addWidgetFactory(new widget_1.CSVWidgetFactory(), options); }