@contentful/field-editor-tags 1.4.19 → 1.4.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/TagsEditor.js
CHANGED
|
@@ -132,9 +132,9 @@ function TagsEditor(props) {
|
|
|
132
132
|
onUpdate
|
|
133
133
|
]);
|
|
134
134
|
const swapItems = (0, _react.useCallback)(({ active, over })=>{
|
|
135
|
-
if (active.id !== over
|
|
135
|
+
if (active.id !== over?.id) {
|
|
136
136
|
const oldIndex = itemsMap.findIndex(({ id })=>id === active.id);
|
|
137
|
-
const newIndex = itemsMap.findIndex(({ id })=>id === over
|
|
137
|
+
const newIndex = itemsMap.findIndex(({ id })=>id === over?.id);
|
|
138
138
|
const newItems = (0, _sortable.arrayMove)(items, oldIndex, newIndex);
|
|
139
139
|
onUpdate(newItems);
|
|
140
140
|
}
|
package/dist/esm/TagsEditor.js
CHANGED
|
@@ -76,9 +76,9 @@ export function TagsEditor(props) {
|
|
|
76
76
|
onUpdate
|
|
77
77
|
]);
|
|
78
78
|
const swapItems = useCallback(({ active, over })=>{
|
|
79
|
-
if (active.id !== over
|
|
79
|
+
if (active.id !== over?.id) {
|
|
80
80
|
const oldIndex = itemsMap.findIndex(({ id })=>id === active.id);
|
|
81
|
-
const newIndex = itemsMap.findIndex(({ id })=>id === over
|
|
81
|
+
const newIndex = itemsMap.findIndex(({ id })=>id === over?.id);
|
|
82
82
|
const newItems = arrayMove(items, oldIndex, newIndex);
|
|
83
83
|
onUpdate(newItems);
|
|
84
84
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { Constraint, ConstraintsType } from './types';
|
|
3
3
|
export interface TagsEditorProps {
|
|
4
4
|
items: string[];
|
|
@@ -8,4 +8,4 @@ export interface TagsEditorProps {
|
|
|
8
8
|
constraints?: Constraint;
|
|
9
9
|
onUpdate: (items: string[]) => void;
|
|
10
10
|
}
|
|
11
|
-
export declare function TagsEditor(props: TagsEditorProps): JSX.Element;
|
|
11
|
+
export declare function TagsEditor(props: TagsEditorProps): React.JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { Constraint, ConstraintsType } from './types';
|
|
3
3
|
interface TagEditorConstraintsProps {
|
|
4
4
|
constraintsType: ConstraintsType;
|
|
5
5
|
constraints: Constraint;
|
|
6
6
|
}
|
|
7
|
-
export declare function TagsEditorConstraints(props: TagEditorConstraintsProps): JSX.Element;
|
|
7
|
+
export declare function TagsEditorConstraints(props: TagEditorConstraintsProps): React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { FieldAPI } from '@contentful/field-editor-shared';
|
|
3
3
|
export interface TagsEditorContainerProps {
|
|
4
4
|
/**
|
|
@@ -10,7 +10,7 @@ export interface TagsEditorContainerProps {
|
|
|
10
10
|
*/
|
|
11
11
|
field: FieldAPI;
|
|
12
12
|
}
|
|
13
|
-
export declare function TagsEditorContainer(props: TagsEditorContainerProps): JSX.Element;
|
|
13
|
+
export declare function TagsEditorContainer(props: TagsEditorContainerProps): React.JSX.Element;
|
|
14
14
|
export declare namespace TagsEditorContainer {
|
|
15
15
|
var defaultProps: {
|
|
16
16
|
isInitiallyDisabled: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-tags",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.20",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@contentful/f36-components": "^4.0.27",
|
|
39
39
|
"@contentful/f36-icons": "^4.1.0",
|
|
40
40
|
"@contentful/f36-tokens": "^4.0.0",
|
|
41
|
-
"@contentful/field-editor-shared": "^1.6.
|
|
41
|
+
"@contentful/field-editor-shared": "^1.6.2",
|
|
42
42
|
"@dnd-kit/core": "^6.0.8",
|
|
43
43
|
"@dnd-kit/modifiers": "^7.0.0",
|
|
44
44
|
"@dnd-kit/sortable": "^8.0.0",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"registry": "https://npm.pkg.github.com/"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "6e7fb82c93e497874c875de0803ea7b6d8d6c990"
|
|
58
58
|
}
|