json-edit-react
Advanced tools
Comparing version 1.15.3 to 1.15.4
@@ -110,2 +110,3 @@ /// <reference types="react" /> | ||
type CustomTextFunction = (input: NodeData) => string | null; | ||
type DefaultValueFunction = (input: NodeData) => unknown; | ||
type SearchFilterFunction = (inputData: NodeData, searchText: string) => boolean; | ||
@@ -251,2 +252,2 @@ type CopyType = 'path' | 'value'; | ||
export { CollectionNodeProps, CompareFunction, CopyFunction, CustomNodeDefinition, CustomNodeProps, CustomTextDefinitions, FilterFunction, IconAdd, IconCancel, IconChevron, IconCopy, IconDelete, IconEdit, IconOk, IconReplacements, JerError, JsonData, JsonEditor, JsonEditorProps, LinkCustomComponent, LinkCustomNodeDefinition, LocalisedStrings, NodeData, OnChangeFunction, OnErrorFunction, SearchFilterFunction, Theme, ThemeInput, ThemeName, TranslateFunction, UpdateFunction, ValueNodeProps, isCollection, matchNode, matchNodeKey, themes, truncate }; | ||
export { CollectionNodeProps, CompareFunction, CopyFunction, CustomNodeDefinition, CustomNodeProps, CustomTextDefinitions, CustomTextFunction, DataType, DefaultValueFunction, FilterFunction, IconAdd, IconCancel, IconChevron, IconCopy, IconDelete, IconEdit, IconOk, IconReplacements, JerError, JsonData, JsonEditor, JsonEditorProps, LinkCustomComponent, LinkCustomNodeDefinition, LocalisedStrings, NodeData, OnChangeFunction, OnErrorFunction, SearchFilterFunction, Theme, ThemeInput, ThemeName, TranslateFunction, TypeFilterFunction, UpdateFunction, ValueNodeProps, isCollection, matchNode, matchNodeKey, themes, truncate }; |
{ | ||
"name": "json-edit-react", | ||
"version": "1.15.3", | ||
"version": "1.15.4", | ||
"description": "React component for editing or viewing JSON/object data", | ||
@@ -5,0 +5,0 @@ "main": "build/index.cjs.js", |
@@ -13,5 +13,2 @@ # json-edit-react | ||
> [!IMPORTANT] | ||
> **Version 1.14.0** has a change which recommends you provide a `setData` prop and not use `onUpdate` for updating your data externally. See [Managing state](#managing-state). | ||
### Features include: | ||
@@ -31,2 +28,7 @@ | ||
> [!IMPORTANT] | ||
> **Version 1.14.0** has a change which recommends you provide a `setData` prop and not use `onUpdate` for updating your data externally. See [Managing state](#managing-state). | ||
## Contents | ||
- [Contents](#contents) | ||
- [Installation](#installation) | ||
@@ -125,4 +127,4 @@ - [Implementation](#implementation) | ||
| `restrictAdd` | `boolean\|FilterFunction` | `false` | As with `restrictEdit` but for adding new properties | | ||
| `restrictTypeSelection` | `boolean\|FilterFunction` | `true` | Set to `false` to enable drag and drop functionality. See [Drag-n-drop](#drag-n-drop) | | ||
| `restrictDrag` | `boolean\|DataType[]\|TypeFilterFunction` | `false` | For restricting the data types the user can select. Can be a list of data types (e.g. `[ 'string', 'number', 'boolean', 'array', 'object', 'null' ]`) or a boolean. A function can be provided -- it should take the same input as the above `FilterFunction`s, but output should be `boolean \| DataType[]`. | | ||
| `restrictTypeSelection` | `boolean\|DataType[]\|TypeFilterFunction` | `true` | For restricting the data types the user can select. Can be a list of data types (e.g. `[ 'string', 'number', 'boolean', 'array', 'object', 'null' ]`) or a boolean. A function can be provided -- it should take the same input as the above `FilterFunction`s, but output should be `boolean \| DataType[]`. | | ||
| `restrictDrag` | `boolean\|FilterFunction` | `true` | Set to `false` to enable drag and drop functionality. See [Drag-n-drop](#drag-n-drop) | | ||
| `searchText` | `string` | `undefined` | Data visibility will be filtered by matching against value, using the method defined below in `searchFilter` | | ||
@@ -671,3 +673,3 @@ | `searchFilter` | `"key"\|"value"\|"all"\|SearchFilterFunction` | `undefined` | Define how `searchText` should be matched to filter the visible items. See [Search/Filtering](#searchfiltering) | | ||
- `JsonData`: main `data` object -- any valid JSON structure | ||
- [`UpdateFunction`](#update-functions), [`OnChangeFunction`](#onchange-function), [`OnErrorFunction`](#onerror-function) [`FilterFunction`](#filter-functions), [`CopyFunction`](#copy-function), [`SearchFilterFunction`](#searchfiltering), [`CompareFunction`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort), [`LocalisedString`](#localisation), [`CustomNodeDefinition`](#custom-nodes), [`CustomTextDefinitions`](#custom-text) | ||
- [`UpdateFunction`](#update-functions), [`OnChangeFunction`](#onchange-function), [`OnErrorFunction`](#onerror-function) [`FilterFunction`](#filter-functions), [`CopyFunction`](#copy-function), [`SearchFilterFunction`](#searchfiltering), [`CompareFunction`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort),[`TypeFilterFunction`](#filter-functions), [`LocalisedString`](#localisation), [`CustomNodeDefinition`](#custom-nodes), [`CustomTextDefinitions`](#custom-text), [`CustomTextFunction`](#custom-text), | ||
- `TranslateFunction`: function that takes a [localisation](#localisation) key and returns a translated string | ||
@@ -678,2 +680,3 @@ - `IconReplacements`: input type for the `icons` prop | ||
- `CustomNodeProps`: all props passed internally to [Custom nodes](#custom-nodes); basically the same as `CollectionNodeProps` with an extra `customNodeProps` field for passing props unique to your component` | ||
- `DataType`: `"string"` | `"number"` | `"boolean"` | `"null"` | `"object"` | `"array"` | ||
@@ -680,0 +683,0 @@ ## Issues, bugs, suggestions? |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
166337
593
763
0