Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jsonforms/vanilla-renderers

Package Overview
Dependencies
Maintainers
6
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsonforms/vanilla-renderers - npm Package Compare versions

Comparing version 3.0.0-beta.1 to 3.0.0-beta.2

10

lib/jsonforms-react-vanilla.cjs.js

@@ -420,3 +420,3 @@ 'use strict';

var data = props.data, className = props.className, id = props.id, enabled = props.enabled, uischema = props.uischema, path = props.path, handleChange = props.handleChange;
return (React__default["default"].createElement("input", { type: 'number', step: '1', value: data || '', onChange: function (ev) { return handleChange(path, parseInt(ev.target.value, 10)); }, className: className, id: id, disabled: !enabled, autoFocus: uischema.options && uischema.options.focus }));
return (React__default["default"].createElement("input", { type: 'number', step: '1', value: data !== null && data !== void 0 ? data : '', onChange: function (ev) { return handleChange(path, parseInt(ev.target.value, 10)); }, className: className, id: id, disabled: !enabled, autoFocus: uischema.options && uischema.options.focus }));
};

@@ -500,3 +500,3 @@ var integerCellTester = core.rankWith(2, core.isIntegerControl);

InputControl.prototype.render = function () {
var _a = this.props, classNames = _a.classNames, description = _a.description, id = _a.id, errors = _a.errors, label = _a.label, uischema = _a.uischema, schema = _a.schema, visible = _a.visible, enabled = _a.enabled, required = _a.required, path = _a.path, cells = _a.cells, config = _a.config;
var _a = this.props, classNames = _a.classNames, description = _a.description, id = _a.id, errors = _a.errors, label = _a.label, uischema = _a.uischema, schema = _a.schema, rootSchema = _a.rootSchema, visible = _a.visible, enabled = _a.enabled, required = _a.required, path = _a.path, cells = _a.cells, config = _a.config;
var isValid = errors.length === 0;

@@ -508,5 +508,5 @@ var divClassNames = [classNames.validation]

var showDescription = !core.isDescriptionHidden(visible, description, this.state.isFocused, appliedUiSchemaOptions.showUnfocusedDescription);
var cell = maxBy__default["default"](cells, function (r) { return r.tester(uischema, schema); });
var cell = maxBy__default["default"](cells, function (r) { return r.tester(uischema, schema, rootSchema); });
if (cell === undefined ||
cell.tester(uischema, schema) === core.NOT_APPLICABLE) {
cell.tester(uischema, schema, rootSchema) === core.NOT_APPLICABLE) {
console.warn('No applicable cell found.', uischema, schema);

@@ -757,3 +757,3 @@ return null;

return (React__default["default"].createElement("td", { key: childPropPath },
React__default["default"].createElement(react.DispatchCell, { schema: core.Resolve.schema(schema, "#/properties/" + prop, rootSchema), uischema: createControlElement(prop), path: childPath + '.' + prop })));
React__default["default"].createElement(react.DispatchCell, { schema: core.Resolve.schema(schema, "#/properties/" + core.encode(prop), rootSchema), uischema: createControlElement(core.encode(prop)), path: childPath + '.' + prop })));
}))(schema.properties)) : (React__default["default"].createElement("td", { key: core.Paths.compose(childPath, index.toString()) },

@@ -760,0 +760,0 @@ React__default["default"].createElement(react.DispatchCell, { schema: schema, uischema: createControlElement(), path: childPath }))),

import React, { useContext, useMemo, useState } from 'react';
import { convertToValidClassName as convertToValidClassName$1, getConfig, rankWith as rankWith$1, isBooleanControl, isDateControl, isDateTimeControl, isEnumControl, isIntegerControl, isNumberControl, isNumberFormatControl, isRangeControl, isStringControl, isMultiLineControl, isTimeControl, isControl, isDescriptionHidden, NOT_APPLICABLE, computeLabel, and, optionIs, isOneOfEnumControl, findUISchema, createDefaultValue, composePaths, Helpers, isObjectArrayWithNesting, uiTypeIs, Paths, getControlPath, Resolve, Test } from '@jsonforms/core';
import { convertToValidClassName as convertToValidClassName$1, getConfig, rankWith as rankWith$1, isBooleanControl, isDateControl, isDateTimeControl, isEnumControl, isIntegerControl, isNumberControl, isNumberFormatControl, isRangeControl, isStringControl, isMultiLineControl, isTimeControl, isControl, isDescriptionHidden, NOT_APPLICABLE, computeLabel, and, optionIs, isOneOfEnumControl, findUISchema, createDefaultValue, composePaths, Helpers, isObjectArrayWithNesting, uiTypeIs, Paths, getControlPath, Resolve, encode, Test } from '@jsonforms/core';
import { useJsonForms, withJsonFormsCellProps, withJsonFormsEnumCellProps, withJsonFormsControlProps, Control, DispatchCell, withJsonFormsEnumProps, withJsonFormsOneOfEnumProps, JsonFormsDispatch, withJsonFormsArrayControlProps, withJsonFormsLayoutProps, RendererComponent } from '@jsonforms/react';

@@ -324,3 +324,3 @@ import isEmpty from 'lodash/isEmpty';

const { data, className, id, enabled, uischema, path, handleChange } = props;
return (React.createElement("input", { type: 'number', step: '1', value: data || '', onChange: ev => handleChange(path, parseInt(ev.target.value, 10)), className: className, id: id, disabled: !enabled, autoFocus: uischema.options && uischema.options.focus }));
return (React.createElement("input", { type: 'number', step: '1', value: data ?? '', onChange: ev => handleChange(path, parseInt(ev.target.value, 10)), className: className, id: id, disabled: !enabled, autoFocus: uischema.options && uischema.options.focus }));
};

@@ -400,3 +400,3 @@ const integerCellTester = rankWith$1(2, isIntegerControl);

render() {
const { classNames, description, id, errors, label, uischema, schema, visible, enabled, required, path, cells, config } = this.props;
const { classNames, description, id, errors, label, uischema, schema, rootSchema, visible, enabled, required, path, cells, config } = this.props;
const isValid = errors.length === 0;

@@ -408,5 +408,5 @@ const divClassNames = [classNames.validation]

const showDescription = !isDescriptionHidden(visible, description, this.state.isFocused, appliedUiSchemaOptions.showUnfocusedDescription);
const cell = maxBy(cells, r => r.tester(uischema, schema));
const cell = maxBy(cells, r => r.tester(uischema, schema, rootSchema));
if (cell === undefined ||
cell.tester(uischema, schema) === NOT_APPLICABLE) {
cell.tester(uischema, schema, rootSchema) === NOT_APPLICABLE) {
console.warn('No applicable cell found.', uischema, schema);

@@ -634,3 +634,3 @@ return null;

return (React.createElement("td", { key: childPropPath },
React.createElement(DispatchCell, { schema: Resolve.schema(schema, `#/properties/${prop}`, rootSchema), uischema: createControlElement(prop), path: childPath + '.' + prop })));
React.createElement(DispatchCell, { schema: Resolve.schema(schema, `#/properties/${encode(prop)}`, rootSchema), uischema: createControlElement(encode(prop)), path: childPath + '.' + prop })));
}))(schema.properties)) : (React.createElement("td", { key: Paths.compose(childPath, index.toString()) },

@@ -637,0 +637,0 @@ React.createElement(DispatchCell, { schema: schema, uischema: createControlElement(), path: childPath }))),

{
"name": "@jsonforms/vanilla-renderers",
"version": "3.0.0-beta.1",
"version": "3.0.0-beta.2",
"description": "Default Renderer Set for JSON Forms",

@@ -39,10 +39,10 @@ "repository": "https://github.com/eclipsesource/jsonforms",

"peerDependencies": {
"@jsonforms/core": "^3.0.0-beta.0",
"@jsonforms/react": "^3.0.0-beta.0",
"react": "^16.12.0 || ^17.0.0"
"@jsonforms/core": "3.0.0-beta.2",
"@jsonforms/react": "3.0.0-beta.2",
"react": "^16.12.0 || ^17.0.0 || ^18.0.0"
},
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@jsonforms/core": "^3.0.0-beta.1",
"@jsonforms/react": "^3.0.0-beta.1",
"@jsonforms/core": "^3.0.0-beta.2",
"@jsonforms/react": "^3.0.0-beta.2",
"@types/enzyme": "^3.10.3",

@@ -101,3 +101,3 @@ "@wojtekmaj/enzyme-adapter-react-17": "^0.6.3",

},
"gitHead": "8c3b6263f360ca192c0a20a343a19c5ffb3a10f7"
"gitHead": "8e9c14dcf049ee4b31baf9c40a86b394cba33139"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc