react-tabulator
Advanced tools
Comparing version 0.18.1 to 0.19.0
@@ -46,3 +46,3 @@ "use strict"; | ||
return new Es6Promise.Promise(function (resolve, reject) { | ||
(0, react_dom_1.render)(comp, el, function () { | ||
react_dom_1.render(comp, el, function () { | ||
resolve(el); | ||
@@ -49,0 +49,0 @@ }); |
@@ -50,4 +50,4 @@ "use strict"; | ||
// value is "yyyy-MM-dd" => parse it | ||
var valueDate = (0, DateEditorUtils_1.parse)(value, 'YYYY-MM-DD'); | ||
result = (0, DateEditorUtils_1.format)(valueDate, _this.format); | ||
var valueDate = DateEditorUtils_1.parse(value, 'YYYY-MM-DD'); | ||
result = DateEditorUtils_1.format(valueDate, _this.format); | ||
} | ||
@@ -57,3 +57,3 @@ } | ||
console.error('ERROR', err); | ||
result = (0, DateEditorUtils_1.format)(new Date(), DEFAULT_DATE_INPUT_FORMAT); | ||
result = DateEditorUtils_1.format(new Date(), DEFAULT_DATE_INPUT_FORMAT); | ||
} | ||
@@ -70,3 +70,3 @@ success(result); | ||
// Enter pressed. If value is '' => set to today: | ||
var today = (0, DateEditorUtils_1.format)(new Date(), DEFAULT_DATE_INPUT_FORMAT); | ||
var today = DateEditorUtils_1.format(new Date(), DEFAULT_DATE_INPUT_FORMAT); | ||
var value = _this.state.value || today; | ||
@@ -95,9 +95,9 @@ _this.setValueOnSuccess(value); | ||
var cell = this.props.cell; | ||
var valueDt = (0, DateEditorUtils_1.parse)(cell.getValue(), this.format); | ||
var valueDt = DateEditorUtils_1.parse(cell.getValue(), this.format); | ||
// console.log('this.format', this.format); | ||
// console.log('cell.getValue()', cell.getValue()); | ||
// console.log('valueDt', valueDt); | ||
var value = (0, DateEditorUtils_1.format)(new Date(), DEFAULT_DATE_INPUT_FORMAT); | ||
var value = DateEditorUtils_1.format(new Date(), DEFAULT_DATE_INPUT_FORMAT); | ||
try { | ||
value = (0, DateEditorUtils_1.format)(valueDt, DEFAULT_DATE_INPUT_FORMAT); | ||
value = DateEditorUtils_1.format(valueDt, DEFAULT_DATE_INPUT_FORMAT); | ||
} | ||
@@ -114,5 +114,5 @@ catch (err) { } | ||
container.style.height = '100%'; | ||
(0, react_dom_1.render)(React.createElement(Editor, { cell: cell, onRendered: onRendered, success: success, cancel: cancel, editorParams: editorParams }), container); | ||
react_dom_1.render(React.createElement(Editor, { cell: cell, onRendered: onRendered, success: success, cancel: cancel, editorParams: editorParams }), container); | ||
return container; | ||
} | ||
exports["default"] = default_1; |
@@ -281,3 +281,3 @@ "use strict"; | ||
if (specifiedFields[field]) { | ||
throw new Error("Invalid format. ".concat(field, " specified twice in format")); | ||
throw new Error("Invalid format. " + field + " specified twice in format"); | ||
} | ||
@@ -295,3 +295,3 @@ specifiedFields[field] = true; | ||
if (!specifiedFields[field]) { | ||
throw new Error("Invalid format. ".concat(field, " is required in specified format")); | ||
throw new Error("Invalid format. " + field + " is required in specified format"); | ||
} | ||
@@ -298,0 +298,0 @@ }); |
@@ -68,3 +68,3 @@ "use strict"; | ||
// console.log(111, newValue, this.ref); | ||
var values = (0, Utils_1.clone)(_this.state.values); | ||
var values = Utils_1.clone(_this.state.values); | ||
values.push({ id: newValue, name: newValue }); | ||
@@ -77,3 +77,3 @@ // console.log('- handleBlur ', values); | ||
} | ||
var el = (0, react_dom_1.findDOMNode)(_this.ref); | ||
var el = react_dom_1.findDOMNode(_this.ref); | ||
if (el && el.parentElement.parentElement.parentElement) { | ||
@@ -89,3 +89,3 @@ el.parentElement.parentElement.parentElement.style.overflow = 'hidden'; | ||
this.props.onRendered(function () { | ||
var el = (0, react_dom_1.findDOMNode)(_this.ref); | ||
var el = react_dom_1.findDOMNode(_this.ref); | ||
el.style.zIndex = 1; | ||
@@ -113,5 +113,5 @@ el.parentElement.parentElement.parentElement.style.overflow = 'inherit'; | ||
container.style.height = '100%'; | ||
(0, react_dom_1.render)(React.createElement(Editor, { cell: cell, onRendered: onRendered, success: success, cancel: cancel, editorParams: editorParams }), container); | ||
react_dom_1.render(React.createElement(Editor, { cell: cell, onRendered: onRendered, success: success, cancel: cancel, editorParams: editorParams }), container); | ||
return container; | ||
} | ||
exports["default"] = default_1; |
@@ -26,5 +26,5 @@ "use strict"; | ||
el.title = arr && arr.length > 0 && typeof arr[0] === 'string' ? arr.join(', ') : ''; | ||
(0, react_dom_1.render)(content, el); | ||
react_dom_1.render(content, el); | ||
return el; | ||
} | ||
exports["default"] = default_1; |
@@ -82,3 +82,3 @@ "use strict"; | ||
_this.htmlProps = null; | ||
_this.mainId = "tabulator-".concat(+new Date(), "-").concat(Math.floor(Math.random() * 9999999)); // random id | ||
_this.mainId = "tabulator-" + +new Date() + "-" + Math.floor(Math.random() * 9999999); // random id | ||
_this.table = null; // will be set once Tabulator instantiated | ||
@@ -88,3 +88,3 @@ _this.pickValidHTMLProps = function () { | ||
if (!_this.htmlProps) { | ||
_this.htmlProps = (0, pick_react_known_prop_1.pickHTMLProps)(_this.props); // pick valid html props | ||
_this.htmlProps = pick_react_known_prop_1.pickHTMLProps(_this.props); // pick valid html props | ||
delete _this.htmlProps['data']; // don't render data & columns as attributes | ||
@@ -105,3 +105,3 @@ delete _this.htmlProps['columns']; | ||
_a = this.props, columns = _a.columns, data = _a.data, options = _a.options; | ||
return [4 /*yield*/, (0, ConfigUtils_1.propsToOptions)(this.props)]; | ||
return [4 /*yield*/, ConfigUtils_1.propsToOptions(this.props)]; | ||
case 1: | ||
@@ -113,3 +113,4 @@ propOptions = _b.sent(); | ||
that.props.tableBuilding ? that.props.tableBuilding() : ''; | ||
}, dataLoaded: function () { | ||
}, | ||
dataLoaded: function () { | ||
that.props.dataLoaded ? that.props.dataLoaded() : ''; | ||
@@ -133,3 +134,3 @@ }, invalidOptionWarnings: false }), options), { data: data })); | ||
var _this = this; | ||
if (!(0, Utils_1.isSameArray)(this.state.data, props.data)) { | ||
if (!Utils_1.isSameArray(this.state.data, props.data)) { | ||
// console.log('- data changed'); | ||
@@ -140,3 +141,3 @@ this.setState({ data: props.data }, function () { | ||
} | ||
if (!(0, Utils_1.isSameArray)(this.state.columns, props.columns)) { | ||
if (!Utils_1.isSameArray(this.state.columns, props.columns)) { | ||
// console.log('- columns changed'); | ||
@@ -143,0 +144,0 @@ this.setState({ columns: props.columns }, function () { |
@@ -59,5 +59,5 @@ "use strict"; | ||
var instanceRef = React.useRef(); | ||
var _a = React.useState("tabulator-".concat(+new Date(), "-").concat(Math.floor(Math.random() * 9999999))), mainId = _a[0], setMainId = _a[1]; | ||
var _a = React.useState("tabulator-" + +new Date() + "-" + Math.floor(Math.random() * 9999999)), mainId = _a[0], setMainId = _a[1]; | ||
var htmlProps; | ||
htmlProps = (0, pick_react_known_prop_1.pickHTMLProps)(props); // pick valid html props | ||
htmlProps = pick_react_known_prop_1.pickHTMLProps(props); // pick valid html props | ||
delete htmlProps['data']; // don't render data & columns as attributes | ||
@@ -73,3 +73,3 @@ delete htmlProps['columns']; | ||
columns = props.columns, data = props.data, options = props.options; | ||
return [4 /*yield*/, (0, ConfigUtils_1.propsToOptions)(props)]; | ||
return [4 /*yield*/, ConfigUtils_1.propsToOptions(props)]; | ||
case 1: | ||
@@ -76,0 +76,0 @@ propOptions = _b.sent(); |
@@ -25,3 +25,3 @@ "use strict"; | ||
{ title: 'Passed?', field: 'passed', hozAlign: 'center', formatter: 'tickCross' }, | ||
{ title: 'Custom', field: 'custom', hozAlign: 'center', editor: 'input', formatter: (0, Utils_1.reactFormatter)(React.createElement(SimpleButton, null)) } | ||
{ title: 'Custom', field: 'custom', hozAlign: 'center', editor: 'input', formatter: Utils_1.reactFormatter(React.createElement(SimpleButton, null)) } | ||
]; | ||
@@ -28,0 +28,0 @@ var data = [ |
@@ -53,3 +53,3 @@ "use strict"; | ||
var CompWithMoreProps = React.cloneElement(JSX, { cell: cell }); | ||
(0, react_dom_1.render)(CompWithMoreProps, cellEl.querySelector('.formatterCell')); | ||
react_dom_1.render(CompWithMoreProps, cellEl.querySelector('.formatterCell')); | ||
} | ||
@@ -56,0 +56,0 @@ } |
{ | ||
"name": "react-tabulator", | ||
"version": "0.18.1", | ||
"version": "0.19.0", | ||
"description": "React Tabulator is based on tabulator - a JS table library with many advanced features.", | ||
@@ -44,8 +44,9 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@types/babel__traverse": "^7.17.1", | ||
"@types/react-tag-autocomplete": "^5.6.0", | ||
"dotenv": "^8.2.0", | ||
"dotenv": "^16.3.1", | ||
"es6-promise": "^4.2.8", | ||
"pick-react-known-prop": "^0.1.5", | ||
"react-tag-autocomplete": "^5.7.1", | ||
"tabulator-tables": "5.0.10" | ||
"tabulator-tables": "5.5.2" | ||
}, | ||
@@ -61,3 +62,3 @@ "peerDependencies": { | ||
"awesome-typescript-loader": "^5.2.1", | ||
"babel-jest": "^23.6.0", | ||
"babel-jest": "^29.6.4", | ||
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2", | ||
@@ -70,5 +71,5 @@ "concurrently": "^5.0.0", | ||
"faker": "^4.1.0", | ||
"jest": "^23.6.0", | ||
"jest-puppeteer": "^4.3.0", | ||
"nwb": "^0.23.0", | ||
"jest": "^29.6.4", | ||
"jest-puppeteer": "^9.0.0", | ||
"nwb": "^0.25.2", | ||
"puppeteer": "^5.5.0", | ||
@@ -75,0 +76,0 @@ "react": "^16.5.2", |
@@ -55,2 +55,3 @@ # react-tabulator | ||
$ npm install --legacy-peer-deps install dependencies for development. | ||
$ export NODE_OPTIONS=--openssl-legacy-provider to work with Node 18+ | ||
$ npm run dev Launch DEV mode (with hot reload). | ||
@@ -57,0 +58,0 @@ $ npm run build Make a build. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4303851
140
40441
77
9
+ Added@babel/helper-string-parser@7.25.9(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@babel/types@7.26.3(transitive)
+ Added@types/babel__traverse@7.20.6(transitive)
+ Addeddotenv@16.4.7(transitive)
+ Addedtabulator-tables@5.5.2(transitive)
- Removeddotenv@8.6.0(transitive)
- Removedtabulator-tables@5.0.10(transitive)
Updateddotenv@^16.3.1
Updatedtabulator-tables@5.5.2