Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions .config/webpack/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,19 @@ module.exports = (options = {}) => {
return {
entry: {
bundle: './src/dash-table/index.ts',
demo: ['./demo/index.js', './demo/index.html']
demo: ['./demo/index.html', './demo/index.js']
},
mode: mode,
output: {
path: path.resolve(__dirname, `./../../${dashLibraryName}`),
filename: '[name].js',
library: dashLibraryName,
libraryTarget: 'umd'
libraryTarget: 'window'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loaded unto window.dash_table in the browser

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will changing how this is exposed have any side-effects for non-Dash users? Could you imagine anyone using RequireJS or anything else that expects a umd in their JavaScript project? I suppose, obviously, we wouldn't expect Node.js users (without a window global namespace) to be using this project. I'm also not sure if there's any webpack magic that makes this a non-issue.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not have an impact.

},
devtool: 'source-map',
externals: {
react: {
commonjs: 'react',
commonjs2: 'react',
amd: 'React',
root: 'React'
},
'react-dom': {
commonjs: 'react-dom',
commonjs2: 'react-dom',
amd: 'ReactDOM',
root: 'ReactDOM'
},
react: 'React',
'react-dom': 'ReactDOM',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be simplified as it's target is window now

'plotly.js': 'Plotly'
},
module: {
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Changed
[#488](https://github.com/plotly/dash-table/pull/488)
- Update table build for use as a library and make consistent with other Dash repos

## [4.0.0] - 2019-06-20
### Changed
[#446](https://github.com/plotly/dash-table/pull/446)
Expand Down
172 changes: 92 additions & 80 deletions dash_table/DataTable.py

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dash_table/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dash_table/bundle.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dash_table/demo.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dash_table/demo.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dash_table/metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"src/dash-table/dash/DataTable.js": {
"description": "",
"description": "Dash DataTable is an interactive table component designed for \ndesigned for viewing, editing, and exploring large datasets.\nDataTable is rendered with standard, semantic HTML <table/> markup,\nwhich makes it accessible, responsive, and easy to style. This\ncomponent was written from scratch in React.js specifically for the \nDash community. Its API was designed to be ergonomic and its behavior\nis completely customizable through its properties.",
"displayName": "DataTable",
"methods": [],
"props": {
Expand Down
23 changes: 12 additions & 11 deletions dash_table/package-info.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,25 +58,25 @@
"@babel/preset-react": "^7.0.0",
"@cypress/webpack-preprocessor": "^4.1.0",
"@percy-io/percy-storybook": "^2.1.0",
"@storybook/cli": "^5.1.8",
"@storybook/react": "^5.1.8",
"@storybook/cli": "^5.1.9",
"@storybook/react": "^5.1.9",
"@types/d3-format": "^1.3.1",
"@types/papaparse": "^4.5.9",
"@types/ramda": "^0.26.9",
"@types/react": "^16.8.20",
"@types/papaparse": "^4.5.11",
"@types/ramda": "^0.26.14",
"@types/react": "^16.8.22",
"@types/react-dom": "^16.8.4",
"@types/react-select": "^1.3.4",
"babel-loader": "^8.0.6",
"core-js": "^3.1.4",
"css-loader": "^3.0.0",
"cypress": "^3.3.1",
"cypress": "^3.3.2",
"d3-format": "^1.3.2",
"fast-isnumeric": "^1.1.3",
"file-loader": "^4.0.0",
"http-server": "^0.11.1",
"less": "^3.9.0",
"less-loader": "^5.0.0",
"npm": "^6.9.0",
"npm": "^6.9.2",
"npm-run-all": "^4.1.5",
"papaparse": "^5.0.0",
"ramda": "^0.26.1",
Expand All @@ -88,19 +88,20 @@
"remarkable": "^1.7.1",
"sheetclip": "^0.3.0",
"style-loader": "^0.23.1",
"ts-loader": "^6.0.3",
"tslint": "^5.17.0",
"ts-loader": "^6.0.4",
"tslint": "^5.18.0",
"typescript": "^3.5.2",
"wait-on": "^3.2.0",
"webpack": "^4.34.0",
"webpack-cli": "^3.3.4",
"webpack": "^4.35.2",
"webpack-cli": "^3.3.5",
"webpack-dev-server": "^3.7.2",
"webpack-preprocessor": "^0.1.12"
},
"files": [
"/dash_table/bundle*{.js,.map}"
],
"peerDependencies": {
"prop-types": "^15.7.2",
"react": ">=0.14",
"react-dom": ">=0.14"
},
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
"/dash_table/bundle*{.js,.map}"
],
"peerDependencies": {
"prop-types": "^15.7.2",
"react": ">=0.14",
"react-dom": ">=0.14"
},
Expand Down
4 changes: 2 additions & 2 deletions src/dash-table/dash/DataTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import isValidProps from './validate';
import Sanitizer from './Sanitizer';

/**
* Dash DataTable is an interactive table component designed for
* Dash DataTable is an interactive table component designed for
* designed for viewing, editing, and exploring large datasets.
* DataTable is rendered with standard, semantic HTML <table/> markup,
* which makes it accessible, responsive, and easy to style. This
* component was written from scratch in React.js specifically for the
* component was written from scratch in React.js specifically for the
* Dash community. Its API was designed to be ergonomic and its behavior
* is completely customizable through its properties.
*/
Expand Down