@trackunit/custom-field-components 1.13.8 → 1.13.9
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/index.cjs.js +1 -1
- package/index.esm.js +1 -1
- package/package.json +10 -10
package/index.cjs.js
CHANGED
|
@@ -314,7 +314,7 @@ const StringListField = ({ defaultValue = [], label, description, disabled, vali
|
|
|
314
314
|
handleRemoveValue(index);
|
|
315
315
|
}
|
|
316
316
|
};
|
|
317
|
-
return (jsxRuntime.jsxs(reactComponents.Card, { ...props, className: "w-full", "data-testid": dataTestId, children: [jsxRuntime.jsx(reactComponents.CardHeader, { accessories: jsxRuntime.jsx(reactComponents.Tooltip, { label: description }), heading: label, headingVariant: "secondary" }), jsxRuntime.jsx(reactComponents.CardBody, { children: field.value.length === 0 ? (jsxRuntime.jsx(reactComponents.Text, { children: t("customfield.stringlistfield.noValuesAddedYet") })) : (jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: field.value.map((value, index) => (jsxRuntime.jsx(StringListInput, { disabled: disabled, id: id, index: index, onDelete: () => handleRemoveValueConfirmation(index), onSave: newValue => handleFieldChange(index, newValue), value: value }, `${id}-${index}`))) })) }), !disabled ? (jsxRuntime.jsx(reactComponents.CardFooter, { children: jsxRuntime.jsx(reactComponents.Button, { disabled: disabled, onClick: () => setIsEditing(true), variant: "secondary", children: t("customfield.stringlistfield.add", { label: label }) }) })) : null, jsxRuntime.jsx(AddStringListField, { id: id, isEditing: isEditing, label: label, onAdd: (newItem) => {
|
|
317
|
+
return (jsxRuntime.jsxs(reactComponents.Card, { ...props, className: "w-full", "data-testid": dataTestId, children: [jsxRuntime.jsx(reactComponents.CardHeader, { accessories: jsxRuntime.jsx(reactComponents.Tooltip, { asChild: false, label: description }), heading: label, headingVariant: "secondary" }), jsxRuntime.jsx(reactComponents.CardBody, { children: field.value.length === 0 ? (jsxRuntime.jsx(reactComponents.Text, { children: t("customfield.stringlistfield.noValuesAddedYet") })) : (jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: field.value.map((value, index) => (jsxRuntime.jsx(StringListInput, { disabled: disabled, id: id, index: index, onDelete: () => handleRemoveValueConfirmation(index), onSave: newValue => handleFieldChange(index, newValue), value: value }, `${id}-${index}`))) })) }), !disabled ? (jsxRuntime.jsx(reactComponents.CardFooter, { children: jsxRuntime.jsx(reactComponents.Button, { disabled: disabled, onClick: () => setIsEditing(true), variant: "secondary", children: t("customfield.stringlistfield.add", { label: label }) }) })) : null, jsxRuntime.jsx(AddStringListField, { id: id, isEditing: isEditing, label: label, onAdd: (newItem) => {
|
|
318
318
|
field.onChange([...field.value, newItem]);
|
|
319
319
|
}, setIsEditing: setIsEditing })] }));
|
|
320
320
|
}, rules: validationRules }));
|
package/index.esm.js
CHANGED
|
@@ -312,7 +312,7 @@ const StringListField = ({ defaultValue = [], label, description, disabled, vali
|
|
|
312
312
|
handleRemoveValue(index);
|
|
313
313
|
}
|
|
314
314
|
};
|
|
315
|
-
return (jsxs(Card, { ...props, className: "w-full", "data-testid": dataTestId, children: [jsx(CardHeader, { accessories: jsx(Tooltip, { label: description }), heading: label, headingVariant: "secondary" }), jsx(CardBody, { children: field.value.length === 0 ? (jsx(Text, { children: t("customfield.stringlistfield.noValuesAddedYet") })) : (jsx("div", { className: "flex flex-wrap gap-2", children: field.value.map((value, index) => (jsx(StringListInput, { disabled: disabled, id: id, index: index, onDelete: () => handleRemoveValueConfirmation(index), onSave: newValue => handleFieldChange(index, newValue), value: value }, `${id}-${index}`))) })) }), !disabled ? (jsx(CardFooter, { children: jsx(Button, { disabled: disabled, onClick: () => setIsEditing(true), variant: "secondary", children: t("customfield.stringlistfield.add", { label: label }) }) })) : null, jsx(AddStringListField, { id: id, isEditing: isEditing, label: label, onAdd: (newItem) => {
|
|
315
|
+
return (jsxs(Card, { ...props, className: "w-full", "data-testid": dataTestId, children: [jsx(CardHeader, { accessories: jsx(Tooltip, { asChild: false, label: description }), heading: label, headingVariant: "secondary" }), jsx(CardBody, { children: field.value.length === 0 ? (jsx(Text, { children: t("customfield.stringlistfield.noValuesAddedYet") })) : (jsx("div", { className: "flex flex-wrap gap-2", children: field.value.map((value, index) => (jsx(StringListInput, { disabled: disabled, id: id, index: index, onDelete: () => handleRemoveValueConfirmation(index), onSave: newValue => handleFieldChange(index, newValue), value: value }, `${id}-${index}`))) })) }), !disabled ? (jsx(CardFooter, { children: jsx(Button, { disabled: disabled, onClick: () => setIsEditing(true), variant: "secondary", children: t("customfield.stringlistfield.add", { label: label }) }) })) : null, jsx(AddStringListField, { id: id, isEditing: isEditing, label: label, onAdd: (newItem) => {
|
|
316
316
|
field.onChange([...field.value, newItem]);
|
|
317
317
|
}, setIsEditing: setIsEditing })] }));
|
|
318
318
|
}, rules: validationRules }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/custom-field-components",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.9",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
"react": "19.0.0",
|
|
11
11
|
"react-hook-form": "7.62.0",
|
|
12
12
|
"react-select": "^5.10.2",
|
|
13
|
-
"@trackunit/react-form-components": "1.14.
|
|
14
|
-
"@trackunit/shared-utils": "1.13.
|
|
15
|
-
"@trackunit/custom-field-api": "1.13.
|
|
16
|
-
"@trackunit/iris-app-runtime-core": "1.13.
|
|
17
|
-
"@trackunit/react-components": "1.17.
|
|
18
|
-
"@trackunit/react-modal": "1.14.
|
|
19
|
-
"@trackunit/react-core-hooks": "1.12.
|
|
20
|
-
"@trackunit/i18n-library-translation": "1.12.
|
|
21
|
-
"@trackunit/iris-app-runtime-core-api": "1.12.
|
|
13
|
+
"@trackunit/react-form-components": "1.14.8",
|
|
14
|
+
"@trackunit/shared-utils": "1.13.35",
|
|
15
|
+
"@trackunit/custom-field-api": "1.13.8",
|
|
16
|
+
"@trackunit/iris-app-runtime-core": "1.13.18",
|
|
17
|
+
"@trackunit/react-components": "1.17.6",
|
|
18
|
+
"@trackunit/react-modal": "1.14.9",
|
|
19
|
+
"@trackunit/react-core-hooks": "1.12.19",
|
|
20
|
+
"@trackunit/i18n-library-translation": "1.12.19",
|
|
21
|
+
"@trackunit/iris-app-runtime-core-api": "1.12.16"
|
|
22
22
|
},
|
|
23
23
|
"module": "./index.esm.js",
|
|
24
24
|
"main": "./index.cjs.js",
|