Skip to content

Commit

Permalink
Bump version to 2.13.3 and update dist files
Browse files Browse the repository at this point in the history
  • Loading branch information
bhch committed Jan 7, 2024
1 parent 119dab6 commit ae76864
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 32 deletions.
40 changes: 30 additions & 10 deletions dist/react-json-form.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4376,24 +4376,44 @@ function FormInstance(config) {
this.onChange = this.onChange.bind(this);

this.render = function () {
if (ReactDOM__default["default"].hasOwnProperty('createRoot')) this._renderReact18();else this._renderReact17();
};

this._renderReact17 = function () {
try {
ReactDOM__default["default"].render( /*#__PURE__*/React__default["default"].createElement(FormContainer, {
schema: this.schema,
dataInputId: this.dataInputId,
data: this.data,
errorMap: this.errorMap,
fileHandler: this.fileHandler,
fileHandlerArgs: this.fileHandlerArgs,
onChange: this.onChange,
readonly: this.readonly
}), document.getElementById(this.containerId));
ReactDOM__default["default"].render(this._getFormContainerComponent(), document.getElementById(this.containerId));
} catch (error) {
ReactDOM__default["default"].render( /*#__PURE__*/React__default["default"].createElement(ErrorReporter, {
error: error
}), document.getElementById(this.containerId));
}
};

this._renderReact18 = function () {
const root = ReactDOM__default["default"].createRoot(document.getElementById(this.containerId));

try {
root.render(this._getFormContainerComponent());
} catch (error) {
root.render( /*#__PURE__*/React__default["default"].createElement(ErrorReporter, {
error: error
}));
}
};

this._getFormContainerComponent = function () {
return /*#__PURE__*/React__default["default"].createElement(FormContainer, {
schema: this.schema,
dataInputId: this.dataInputId,
data: this.data,
errorMap: this.errorMap,
fileHandler: this.fileHandler,
fileHandlerArgs: this.fileHandlerArgs,
onChange: this.onChange,
readonly: this.readonly
});
};

this.update = function (config) {
this.schema = config.schema || this.schema;
this.data = config.data || this.data;
Expand Down
2 changes: 1 addition & 1 deletion dist/react-json-form.js

Large diffs are not rendered by default.

40 changes: 30 additions & 10 deletions dist/react-json-form.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -4370,24 +4370,44 @@ function FormInstance(config) {
this.onChange = this.onChange.bind(this);

this.render = function () {
if (ReactDOM.hasOwnProperty('createRoot')) this._renderReact18();else this._renderReact17();
};

this._renderReact17 = function () {
try {
ReactDOM.render( /*#__PURE__*/React$1.createElement(FormContainer, {
schema: this.schema,
dataInputId: this.dataInputId,
data: this.data,
errorMap: this.errorMap,
fileHandler: this.fileHandler,
fileHandlerArgs: this.fileHandlerArgs,
onChange: this.onChange,
readonly: this.readonly
}), document.getElementById(this.containerId));
ReactDOM.render(this._getFormContainerComponent(), document.getElementById(this.containerId));
} catch (error) {
ReactDOM.render( /*#__PURE__*/React$1.createElement(ErrorReporter, {
error: error
}), document.getElementById(this.containerId));
}
};

this._renderReact18 = function () {
const root = ReactDOM.createRoot(document.getElementById(this.containerId));

try {
root.render(this._getFormContainerComponent());
} catch (error) {
root.render( /*#__PURE__*/React$1.createElement(ErrorReporter, {
error: error
}));
}
};

this._getFormContainerComponent = function () {
return /*#__PURE__*/React$1.createElement(FormContainer, {
schema: this.schema,
dataInputId: this.dataInputId,
data: this.data,
errorMap: this.errorMap,
fileHandler: this.fileHandler,
fileHandlerArgs: this.fileHandlerArgs,
onChange: this.onChange,
readonly: this.readonly
});
};

this.update = function (config) {
this.schema = config.schema || this.schema;
this.data = config.data || this.data;
Expand Down
40 changes: 30 additions & 10 deletions dist/react-json-form.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -4370,24 +4370,44 @@ function FormInstance(config) {
this.onChange = this.onChange.bind(this);

this.render = function () {
if (ReactDOM.hasOwnProperty('createRoot')) this._renderReact18();else this._renderReact17();
};

this._renderReact17 = function () {
try {
ReactDOM.render( /*#__PURE__*/React$1.createElement(FormContainer, {
schema: this.schema,
dataInputId: this.dataInputId,
data: this.data,
errorMap: this.errorMap,
fileHandler: this.fileHandler,
fileHandlerArgs: this.fileHandlerArgs,
onChange: this.onChange,
readonly: this.readonly
}), document.getElementById(this.containerId));
ReactDOM.render(this._getFormContainerComponent(), document.getElementById(this.containerId));
} catch (error) {
ReactDOM.render( /*#__PURE__*/React$1.createElement(ErrorReporter, {
error: error
}), document.getElementById(this.containerId));
}
};

this._renderReact18 = function () {
const root = ReactDOM.createRoot(document.getElementById(this.containerId));

try {
root.render(this._getFormContainerComponent());
} catch (error) {
root.render( /*#__PURE__*/React$1.createElement(ErrorReporter, {
error: error
}));
}
};

this._getFormContainerComponent = function () {
return /*#__PURE__*/React$1.createElement(FormContainer, {
schema: this.schema,
dataInputId: this.dataInputId,
data: this.data,
errorMap: this.errorMap,
fileHandler: this.fileHandler,
fileHandlerArgs: this.fileHandlerArgs,
onChange: this.onChange,
readonly: this.readonly
});
};

this.update = function (config) {
this.schema = config.schema || this.schema;
this.data = config.data || this.data;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bhch/react-json-form",
"version": "2.13.2",
"version": "2.13.3",
"description": "Create forms using JSON Schema",
"publishConfig": {
"access": "public"
Expand Down

0 comments on commit ae76864

Please sign in to comment.