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

@jsonforms/vanilla-renderers

Package Overview
Dependencies
Maintainers
0
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.4.0-alpha.3 to 3.4.0-beta.0

10

lib/complex/array/ArrayControlRenderer.d.ts
import React from 'react';
import { ArrayControlProps } from '@jsonforms/core';
import { ArrayControlProps, ArrayTranslations } from '@jsonforms/core';
import type { VanillaRendererProps } from '../../index';
export declare const ArrayControl: ({ classNames, data, label, path, schema, errors, addItem, removeItems, moveUp, moveDown, uischema, uischemas, getStyleAsClassName, renderers, rootSchema, translations, }: ArrayControlProps & VanillaRendererProps) => React.JSX.Element;
export declare const ArrayControlRenderer: ({ schema, uischema, data, path, rootSchema, uischemas, addItem, getStyle, getStyleAsClassName, removeItems, moveUp, moveDown, id, visible, enabled, errors, translations, }: ArrayControlProps & VanillaRendererProps) => React.JSX.Element;
export declare const ArrayControl: ({ classNames, data, label, path, schema, errors, addItem, removeItems, moveUp, moveDown, uischema, uischemas, getStyleAsClassName, renderers, rootSchema, translations, enabled, }: ArrayControlProps & VanillaRendererProps & {
translations: ArrayTranslations;
}) => React.JSX.Element;
export declare const ArrayControlRenderer: ({ schema, uischema, data, path, rootSchema, uischemas, addItem, getStyle, getStyleAsClassName, removeItems, moveUp, moveDown, id, visible, enabled, errors, translations, }: ArrayControlProps & VanillaRendererProps & {
translations: ArrayTranslations;
}) => React.JSX.Element;
declare const _default: (props: any) => React.JSX.Element;
export default _default;

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

var ArrayControl = function (_a) {
var classNames = _a.classNames, data = _a.data, label = _a.label, path = _a.path, schema = _a.schema, errors = _a.errors, addItem = _a.addItem, removeItems = _a.removeItems, moveUp = _a.moveUp, moveDown = _a.moveDown, uischema = _a.uischema, uischemas = _a.uischemas, getStyleAsClassName = _a.getStyleAsClassName, renderers = _a.renderers, rootSchema = _a.rootSchema, translations = _a.translations;
var classNames = _a.classNames, data = _a.data, label = _a.label, path = _a.path, schema = _a.schema, errors = _a.errors, addItem = _a.addItem, removeItems = _a.removeItems, moveUp = _a.moveUp, moveDown = _a.moveDown, uischema = _a.uischema, uischemas = _a.uischemas, getStyleAsClassName = _a.getStyleAsClassName, renderers = _a.renderers, rootSchema = _a.rootSchema, translations = _a.translations, enabled = _a.enabled;
var controlElement = uischema;

@@ -558,3 +558,3 @@ var childUiSchema = React.useMemo(function () {

React__default["default"].createElement("label", { className: labelClass }, label),
React__default["default"].createElement("button", { type: 'button', className: buttonClassAdd, onClick: addItem(path, core.createDefaultValue(schema, rootSchema)) },
React__default["default"].createElement("button", { type: 'button', className: buttonClassAdd, disabled: !enabled, onClick: addItem(path, core.createDefaultValue(schema, rootSchema)) },
"Add to ",

@@ -568,9 +568,9 @@ label)),

React__default["default"].createElement("div", { className: childControlsClass },
React__default["default"].createElement("button", { type: 'button', className: buttonClassUp, "aria-label": translations.upAriaLabel, onClick: function () {
React__default["default"].createElement("button", { type: 'button', className: buttonClassUp, disabled: !enabled, "aria-label": translations.upAriaLabel, onClick: function () {
moveUp(path, index)();
} }, translations.up),
React__default["default"].createElement("button", { type: 'button', className: buttonClassDown, "aria-label": translations.downAriaLabel, onClick: function () {
React__default["default"].createElement("button", { type: 'button', className: buttonClassDown, disabled: !enabled, "aria-label": translations.downAriaLabel, onClick: function () {
moveDown(path, index)();
} }, translations.down),
React__default["default"].createElement("button", { type: 'button', className: buttonClassDelete, "aria-label": translations.removeAriaLabel, onClick: function () {
React__default["default"].createElement("button", { type: 'button', className: buttonClassDelete, disabled: !enabled, "aria-label": translations.removeAriaLabel, onClick: function () {
if (window.confirm('Are you sure you wish to delete this item?')) {

@@ -599,3 +599,3 @@ removeItems(path, [index])();

};
var ArrayControlRenderer$1 = withVanillaControlProps(react.withJsonFormsArrayControlProps(ArrayControlRenderer));
var ArrayControlRenderer$1 = withVanillaControlProps(react.withJsonFormsArrayControlProps(react.withTranslateProps(react.withArrayTranslationProps(ArrayControlRenderer))));

@@ -701,3 +701,3 @@ var arrayControlTester = core.rankWith(4, core.isObjectArrayWithNesting);

var _this = this;
var _a = this.props, addItem = _a.addItem, uischema = _a.uischema, schema = _a.schema, rootSchema = _a.rootSchema, path = _a.path, data = _a.data, visible = _a.visible, errors = _a.errors, label = _a.label, getStyleAsClassName = _a.getStyleAsClassName, childErrors = _a.childErrors, translations = _a.translations;
var _a = this.props, addItem = _a.addItem, uischema = _a.uischema, schema = _a.schema, rootSchema = _a.rootSchema, path = _a.path, data = _a.data, visible = _a.visible, errors = _a.errors, label = _a.label, getStyleAsClassName = _a.getStyleAsClassName, childErrors = _a.childErrors, translations = _a.translations, enabled = _a.enabled;
var controlElement = uischema;

@@ -724,3 +724,3 @@ var tableClass = getStyleAsClassName('array.table.table');

React__default["default"].createElement("label", { className: labelClass }, label),
React__default["default"].createElement("button", { type: 'button', className: buttonClass, onClick: addItem(path, core.createDefaultValue(schema, rootSchema)) }, translations.addTooltip)),
React__default["default"].createElement("button", { type: 'button', disabled: !enabled, className: buttonClass, onClick: addItem(path, core.createDefaultValue(schema, rootSchema)) }, translations.addTooltip)),
React__default["default"].createElement("div", { className: divClassNames }, !isValid ? errors : ''),

@@ -759,3 +759,3 @@ React__default["default"].createElement("table", { className: tableClass },

React__default["default"].createElement("td", null,
React__default["default"].createElement("button", { type: 'button', "aria-label": translations.removeAriaLabel, onClick: function () {
React__default["default"].createElement("button", { type: 'button', disabled: !enabled, "aria-label": translations.removeAriaLabel, onClick: function () {
if (window.confirm(translations.deleteDialogMessage)) {

@@ -769,3 +769,3 @@ _this.confirmDelete(childPath, index);

}(React__default["default"].Component));
var TableArrayControl$1 = withVanillaControlProps(react.withJsonFormsArrayControlProps(TableArrayControl));
var TableArrayControl$1 = withVanillaControlProps(react.withJsonFormsArrayControlProps(react.withTranslateProps(react.withArrayTranslationProps(TableArrayControl))));

@@ -772,0 +772,0 @@ var BooleanCell = function (props) {

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

@@ -410,3 +410,3 @@ import remove from 'lodash/remove';

const { convertToValidClassName: convertToValidClassName$1 } = Helpers;
const ArrayControl = ({ classNames, data, label, path, schema, errors, addItem, removeItems, moveUp, moveDown, uischema, uischemas, getStyleAsClassName, renderers, rootSchema, translations, }) => {
const ArrayControl = ({ classNames, data, label, path, schema, errors, addItem, removeItems, moveUp, moveDown, uischema, uischemas, getStyleAsClassName, renderers, rootSchema, translations, enabled, }) => {
const controlElement = uischema;

@@ -432,3 +432,3 @@ const childUiSchema = useMemo(() => findUISchema(uischemas, schema, uischema.scope, path, undefined, uischema, rootSchema), [uischemas, schema, uischema.scope, path, uischema, rootSchema]);

React.createElement("label", { className: labelClass }, label),
React.createElement("button", { type: 'button', className: buttonClassAdd, onClick: addItem(path, createDefaultValue(schema, rootSchema)) },
React.createElement("button", { type: 'button', className: buttonClassAdd, disabled: !enabled, onClick: addItem(path, createDefaultValue(schema, rootSchema)) },
"Add to ",

@@ -442,9 +442,9 @@ label)),

React.createElement("div", { className: childControlsClass },
React.createElement("button", { type: 'button', className: buttonClassUp, "aria-label": translations.upAriaLabel, onClick: () => {
React.createElement("button", { type: 'button', className: buttonClassUp, disabled: !enabled, "aria-label": translations.upAriaLabel, onClick: () => {
moveUp(path, index)();
} }, translations.up),
React.createElement("button", { type: 'button', className: buttonClassDown, "aria-label": translations.downAriaLabel, onClick: () => {
React.createElement("button", { type: 'button', className: buttonClassDown, disabled: !enabled, "aria-label": translations.downAriaLabel, onClick: () => {
moveDown(path, index)();
} }, translations.down),
React.createElement("button", { type: 'button', className: buttonClassDelete, "aria-label": translations.removeAriaLabel, onClick: () => {
React.createElement("button", { type: 'button', className: buttonClassDelete, disabled: !enabled, "aria-label": translations.removeAriaLabel, onClick: () => {
if (window.confirm('Are you sure you wish to delete this item?')) {

@@ -472,3 +472,3 @@ removeItems(path, [index])();

};
var ArrayControlRenderer$1 = withVanillaControlProps(withJsonFormsArrayControlProps(ArrayControlRenderer));
var ArrayControlRenderer$1 = withVanillaControlProps(withJsonFormsArrayControlProps(withTranslateProps(withArrayTranslationProps(ArrayControlRenderer))));

@@ -561,3 +561,3 @@ const arrayControlTester = rankWith$1(4, isObjectArrayWithNesting);

render() {
const { addItem, uischema, schema, rootSchema, path, data, visible, errors, label, getStyleAsClassName, childErrors, translations, } = this.props;
const { addItem, uischema, schema, rootSchema, path, data, visible, errors, label, getStyleAsClassName, childErrors, translations, enabled, } = this.props;
const controlElement = uischema;

@@ -584,3 +584,3 @@ const tableClass = getStyleAsClassName('array.table.table');

React.createElement("label", { className: labelClass }, label),
React.createElement("button", { type: 'button', className: buttonClass, onClick: addItem(path, createDefaultValue(schema, rootSchema)) }, translations.addTooltip)),
React.createElement("button", { type: 'button', disabled: !enabled, className: buttonClass, onClick: addItem(path, createDefaultValue(schema, rootSchema)) }, translations.addTooltip)),
React.createElement("div", { className: divClassNames }, !isValid ? errors : ''),

@@ -616,3 +616,3 @@ React.createElement("table", { className: tableClass },

React.createElement("td", null,
React.createElement("button", { type: 'button', "aria-label": translations.removeAriaLabel, onClick: () => {
React.createElement("button", { type: 'button', disabled: !enabled, "aria-label": translations.removeAriaLabel, onClick: () => {
if (window.confirm(translations.deleteDialogMessage)) {

@@ -625,3 +625,3 @@ this.confirmDelete(childPath, index);

}
var TableArrayControl$1 = withVanillaControlProps(withJsonFormsArrayControlProps(TableArrayControl));
var TableArrayControl$1 = withVanillaControlProps(withJsonFormsArrayControlProps(withTranslateProps(withArrayTranslationProps(TableArrayControl))));

@@ -628,0 +628,0 @@ const BooleanCell = (props) => {

{
"name": "@jsonforms/vanilla-renderers",
"version": "3.4.0-alpha.3",
"version": "3.4.0-beta.0",
"description": "Default Renderer Set for JSON Forms",

@@ -38,4 +38,4 @@ "repository": "https://github.com/eclipsesource/jsonforms",

"peerDependencies": {
"@jsonforms/core": "3.4.0-alpha.3",
"@jsonforms/react": "3.4.0-alpha.3",
"@jsonforms/core": "3.4.0-beta.0",
"@jsonforms/react": "3.4.0-beta.0",
"react": "^16.12.0 || ^17.0.0 || ^18.0.0"

@@ -84,4 +84,4 @@ },

"webpack-dev-server": "^4.15.1",
"@jsonforms/core": "3.4.0-alpha.3",
"@jsonforms/react": "3.4.0-alpha.3"
"@jsonforms/core": "3.4.0-beta.0",
"@jsonforms/react": "3.4.0-beta.0"
},

@@ -88,0 +88,0 @@ "jest": {

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