diff --git a/.config/tslint.json b/.config/tslint.json new file mode 100644 index 000000000..689ca2fac --- /dev/null +++ b/.config/tslint.json @@ -0,0 +1,12 @@ +{ + "defaultSeverity": "error", + "extends": "./../tslint.json", + + "jsRules": { + "no-console": false + }, + "rules": { + "no-console": false + }, + "rulesDirectory": [] +} \ No newline at end of file diff --git a/.config/webpack/base.js b/.config/webpack/base.js index e2acbb699..32c6d61f0 100644 --- a/.config/webpack/base.js +++ b/.config/webpack/base.js @@ -12,7 +12,7 @@ module.exports = (preprocessor = {}, mode = 'development') => { return { entry: { bundle: './src/dash-table/index.ts', - demo: ['./demo/index.js', './demo/index.html'], + demo: ['./demo/index.js', './demo/index.html'] }, mode: mode, output: { @@ -21,18 +21,19 @@ module.exports = (preprocessor = {}, mode = 'development') => { library: dashLibraryName, libraryTarget: 'umd' }, + devtool: 'source-map', externals: { react: { - commonjs: "react", - commonjs2: "react", - amd: "React", - root: "React" + commonjs: 'react', + commonjs2: 'react', + amd: 'React', + root: 'React' }, - "react-dom": { - commonjs: "react-dom", - commonjs2: "react-dom", - amd: "ReactDOM", - root: "ReactDOM" + 'react-dom': { + commonjs: 'react-dom', + commonjs2: 'react-dom', + amd: 'ReactDOM', + root: 'ReactDOM' }, 'plotly.js': 'Plotly' }, @@ -58,7 +59,7 @@ module.exports = (preprocessor = {}, mode = 'development') => { use: [ { loader: 'style-loader' }, { loader: 'css-loader' } - ], + ] }, { test: /\.less$/, @@ -66,17 +67,17 @@ module.exports = (preprocessor = {}, mode = 'development') => { { loader: 'style-loader' }, { loader: 'css-loader' }, { loader: 'less-loader' } - ], - }, - ], + ] + } + ] }, resolve: { alias: { - 'cypress': path.resolve('./tests/cypress/src'), + cypress: path.resolve('./tests/cypress/src'), 'dash-table': path.resolve('./src/dash-table'), - 'demo': path.resolve('./demo'), - 'core': path.resolve('./src/core'), - 'tests': path.resolve('./tests') + demo: path.resolve('./demo'), + core: path.resolve('./src/core'), + tests: path.resolve('./tests') }, extensions: ['.js', '.ts', '.tsx'] } diff --git a/CHANGELOG.md b/CHANGELOG.md index 2db2e6864..a5d3adbf3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,12 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). -## [3.1.9-rc1] - 2018-12-03 +## [3.1.9] - 2018-12-06 +### Added +- Source map [#284](https://github.com/plotly/dash-table/issues/284) + Related Dash issue [#480](https://github.com/plotly/dash/issues/480) ### Changed -- Refactoring in preparation for data types +- Refactoring in preparation for data types [#280](https://github.com/plotly/dash-table/issues/280) ## [3.1.8] - 2018-12-04 ### Added diff --git a/MANIFEST.in b/MANIFEST.in index bb6052d74..393231112 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,5 @@ include dash_table/bundle.js +include dash_table/bundle.js.map include dash_table/metadata.json include dash_table/package-info.json include README.md diff --git a/dash_table/__init__.py b/dash_table/__init__.py index 37f2fbc49..66baed638 100644 --- a/dash_table/__init__.py +++ b/dash_table/__init__.py @@ -36,6 +36,14 @@ 'https://unpkg.com/dash-table@{}/dash_table/bundle.js' ).format(__version__), 'namespace': package_name + }, + { + 'relative_package_path': 'bundle.js.map', + 'external_url': ( + 'https://unpkg.com/dash-table@{}/dash_table/bundle.js.map' + ).format(__version__), + 'namespace': package_name, + 'dynamic': True } ] diff --git a/dash_table/_imports_.py b/dash_table/_imports_.py index 37be7a7d7..c58eec59c 100644 --- a/dash_table/_imports_.py +++ b/dash_table/_imports_.py @@ -1,6 +1,5 @@ from .DataTable import DataTable - __all__ = [ - "DataTable", -] + "DataTable" +] \ No newline at end of file diff --git a/dash_table/bundle.js b/dash_table/bundle.js index 3470aaa27..a44d83d84 100644 --- a/dash_table/bundle.js +++ b/dash_table/bundle.js @@ -9,10 +9,11 @@ Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ -!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t1?arguments[1]:void 0)}}),n(51)("find")},function(e,t,n){var r=n(44),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(85),o=n(67);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(58),o=n(37);e.exports=function(e){return r(o(e))}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(37);e.exports=function(e){return Object(r(e))}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";var r=n(133),o=n(99);e.exports=n(134)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(o(this,"Map"),e);return t&&t.v},set:function(e,t){return r.def(o(this,"Map"),0===e?0:e,t)}},r,!0)},function(e,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"b",function(){return i});n(9),n(10),n(8),n(22),n(116);function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return null!=e&&"object"===r(e)&&e.constructor===Object}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e===t||i(Object.values(e),Object.values(t),n)}function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!!e&&e.length===t.length&&!!e.every(function(e,r){var s=t[r];return e===s||n&&(Array.isArray(e)&&Array.isArray(s)&&i(e,s,n)||o(e)&&o(s)&&a(e,s,n))})}},function(e,n){e.exports=t},function(e,t,n){var r=n(17);r(r.S+r.F,"Object",{assign:n(111)})},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=!1},function(e,t,n){var r=n(18).f,o=n(29),a=n(11)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t){e.exports={}},function(e,t,n){var r=n(42)("meta"),o=n(15),a=n(29),i=n(18).f,s=0,l=Object.isExtensible||function(){return!0},u=!n(23)(function(){return l(Object.preventExtensions({}))}),c=function(e){i(e,r,{value:{i:"O"+ ++s,w:{}}})},p=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,r)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!a(e,r)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return u&&p.NEED&&l(e)&&!a(e,r)&&c(e),e}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(11)("unscopables"),o=Array.prototype;null==o[r]&&n(24)(o,r,{}),e.exports=function(e){o[r][e]=!0}},function(e,t,n){"use strict";var r=n(14);t.a="function"==typeof Object.assign?Object.assign:function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1,o=arguments.length;n1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/",r=new Date((new Date).getTime()-864e5).toUTCString();document.cookie="".concat(e,"=;expires=").concat(r,";domain=").concat(t,";path=").concat(n)}},{key:"get",value:function(e){if(e.length)return e=e.toLowerCase(),(document.cookie.split(";").map(function(e){var t=e.split("=");return{id:t[0].trim(),value:t[1]}}).find(function(t){return e===t.id.toLocaleLowerCase()})||{}).value}},{key:"set",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"/",a=new Date((new Date).getTime()+63072e7).toUTCString(),i="".concat(t,"=").concat(n,";expires=").concat(a,";domain=").concat(r,";path=").concat(o);e.get(t)&&e.delete(t,r,o),document.cookie=i}}],(n=null)&&o(t.prototype,n),r&&o(t,r),e}();function i(e,t){for(var n=0;n=0&&c.splice(t,1)}function b(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=function(){0;return n.nc}();r&&(e.attrs.nonce=r)}return y(t,e.attrs),h(e,t),t}function y(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function g(e,t){var n,r,o,a;if(t.transform&&e.css){if(!(a="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=a}if(t.singleton){var i=u++;n=l||(l=b(t)),r=w.bind(null,n,i,!1),o=w.bind(null,n,i,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",y(t,e.attrs),h(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||a)&&(r=p(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(i),s&&URL.revokeObjectURL(s)}.bind(null,n,t),o=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=b(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){v(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=i()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=f(e,t);return d(n,t),function(e){for(var r=[],o=0;o1&&s.call(r[0],n,function(){for(o=1;o")}),p=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var d=s(e),f=!a(function(){var t={};return t[d]=function(){return 7},7!=""[e](t)}),h=f?!a(function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[u]=function(){return n}),n[d](""),!t}):void 0;if(!f||!h||"replace"===e&&!c||"split"===e&&!p){var v=/./[d],b=n(i,d,""[e],function(e,t,n,r,o){return t.exec===l?f&&!o?{done:!0,value:v.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),y=b[0],g=b[1];r(String.prototype,e,y),o(RegExp.prototype,d,2==t?function(e,t){return g.call(e,this,t)}:function(e){return g.call(e,this)})}}},function(e,t,n){var r=n(59)("keys"),o=n(42);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(16),o=n(109),a=n(67),i=n(66)("IE_PROTO"),s=function(){},l=function(){var e,t=n(56)("iframe"),r=a.length;for(t.style.display="none",n(87).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("