From c6bb66ef895c37e3b1aeb6a0cd90e8ffdd2cab94 Mon Sep 17 00:00:00 2001 From: Priyankkoul <41726119+Priyankkoul@users.noreply.github.com> Date: Fri, 11 Mar 2022 21:21:07 +0530 Subject: [PATCH 1/2] Create index.js --- qgrid/static/index.js | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 qgrid/static/index.js diff --git a/qgrid/static/index.js b/qgrid/static/index.js new file mode 100644 index 00000000..65a87ddf --- /dev/null +++ b/qgrid/static/index.js @@ -0,0 +1,4 @@ +// Entry point for the notebook bundle containing custom model definitions. +// Export widget models and views, and the npm package version number. +module.exports = require('./qgrid.widget.js'); +module.exports.version = require('../package.json').version; From 867064378a54b0049f684660747bb42395604f0d Mon Sep 17 00:00:00 2001 From: Priyankkoul <41726119+Priyankkoul@users.noreply.github.com> Date: Fri, 11 Mar 2022 21:22:10 +0530 Subject: [PATCH 2/2] Create extension.js --- qgrid/static/extension.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 qgrid/static/extension.js diff --git a/qgrid/static/extension.js b/qgrid/static/extension.js new file mode 100644 index 00000000..21eca77a --- /dev/null +++ b/qgrid/static/extension.js @@ -0,0 +1,19 @@ +// This file contains the javascript that is run when the notebook is loaded. +// It contains some requirejs configuration and the `load_ipython_extension` +// which is required for any notebook extension. + +// Configure requirejs +if (window.require) { + window.require.config({ + map: { + "*" : { + "qgrid": "nbextensions/qgrid/index" + } + } + }); +} + +// Export the required load_ipython_extension +module.exports = { + load_ipython_extension: function() {} +};