@trackunit/custom-field-components 1.7.70 → 1.7.74

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 CHANGED
@@ -237,7 +237,7 @@ const AddStringListField = ({ id, label, isEditing, setIsEditing, onAdd }) => {
237
237
  setIsEditing(false);
238
238
  }
239
239
  };
240
- return (jsxRuntime.jsxs(reactModal.Modal, { ...modal, className: "max-w-lg", dataTestId: `${id}-edit-modal`, children: [jsxRuntime.jsx(reactComponents.CardHeader, { heading: t("customfield.stringlistfield.addField.Heading", { label: label }), onClose: modal.close }), jsxRuntime.jsx(reactComponents.CardBody, { children: jsxRuntime.jsx(reactFormComponents.TextBaseInput, { dataTestId: `${id}-edit-modal-input`, onChange: e => setInputValue(e.target.value), placeholder: t("customfield.stringlistfield.addField.InputPlaceholder", { label: label }), value: inputValue }) }), jsxRuntime.jsxs(reactComponents.CardFooter, { children: [jsxRuntime.jsx(reactComponents.Button, { dataTestId: `${id}-edit-modal-discard-button`, onClick: modal.close, variant: "ghost-neutral", children: t("customfield.stringlistfield.discard") }), jsxRuntime.jsx(reactComponents.Button, { dataTestId: `${id}-edit-modal-add-button`, onClick: handleAdd, children: t("customfield.stringlistfield.add") })] })] }));
240
+ return (jsxRuntime.jsxs(reactModal.Modal, { ...modal, className: "max-w-lg", dataTestId: `${id}-edit-modal`, children: [jsxRuntime.jsx(reactModal.ModalHeader, { heading: t("customfield.stringlistfield.addField.Heading", { label: label }), onClose: modal.close }), jsxRuntime.jsx(reactModal.ModalBody, { children: jsxRuntime.jsx(reactFormComponents.TextBaseInput, { dataTestId: `${id}-edit-modal-input`, onChange: e => setInputValue(e.target.value), placeholder: t("customfield.stringlistfield.addField.InputPlaceholder", { label: label }), value: inputValue }) }), jsxRuntime.jsx(reactModal.ModalFooter, { cancelLabel: t("customfield.stringlistfield.discard"), dataTestId: `${id}-edit-modal-footer`, onCancel: modal.close, primaryAction: handleAdd, primaryLabel: t("customfield.stringlistfield.add") })] }));
241
241
  };
242
242
 
243
243
  const StringListInput = ({ value: initialValue, onSave, onDelete, disabled, id, index }) => {
package/index.esm.js CHANGED
@@ -5,9 +5,9 @@ import { FormGroup, Checkbox, DateField, BaseSelect, TextBaseInput, useGetPhoneV
5
5
  import { uuidv4, exhaustiveCheck } from '@trackunit/shared-utils';
6
6
  import { useState, useEffect, useCallback, createElement, useMemo } from 'react';
7
7
  import { Controller, useWatch } from 'react-hook-form';
8
- import { CardHeader, CardBody, CardFooter, Button, Card, Tooltip, Text, IconButton, Icon } from '@trackunit/react-components';
8
+ import { Card, CardHeader, Tooltip, CardBody, Text, CardFooter, Button, IconButton, Icon } from '@trackunit/react-components';
9
9
  import { useConfirmationDialog } from '@trackunit/react-core-hooks';
10
- import { useModal, Modal } from '@trackunit/react-modal';
10
+ import { useModal, Modal, ModalHeader, ModalBody, ModalFooter } from '@trackunit/react-modal';
11
11
 
12
12
  var defaultTranslations = {
13
13
  "customfield.stringlistfield.add": "Add",
@@ -235,7 +235,7 @@ const AddStringListField = ({ id, label, isEditing, setIsEditing, onAdd }) => {
235
235
  setIsEditing(false);
236
236
  }
237
237
  };
238
- return (jsxs(Modal, { ...modal, className: "max-w-lg", dataTestId: `${id}-edit-modal`, children: [jsx(CardHeader, { heading: t("customfield.stringlistfield.addField.Heading", { label: label }), onClose: modal.close }), jsx(CardBody, { children: jsx(TextBaseInput, { dataTestId: `${id}-edit-modal-input`, onChange: e => setInputValue(e.target.value), placeholder: t("customfield.stringlistfield.addField.InputPlaceholder", { label: label }), value: inputValue }) }), jsxs(CardFooter, { children: [jsx(Button, { dataTestId: `${id}-edit-modal-discard-button`, onClick: modal.close, variant: "ghost-neutral", children: t("customfield.stringlistfield.discard") }), jsx(Button, { dataTestId: `${id}-edit-modal-add-button`, onClick: handleAdd, children: t("customfield.stringlistfield.add") })] })] }));
238
+ return (jsxs(Modal, { ...modal, className: "max-w-lg", dataTestId: `${id}-edit-modal`, children: [jsx(ModalHeader, { heading: t("customfield.stringlistfield.addField.Heading", { label: label }), onClose: modal.close }), jsx(ModalBody, { children: jsx(TextBaseInput, { dataTestId: `${id}-edit-modal-input`, onChange: e => setInputValue(e.target.value), placeholder: t("customfield.stringlistfield.addField.InputPlaceholder", { label: label }), value: inputValue }) }), jsx(ModalFooter, { cancelLabel: t("customfield.stringlistfield.discard"), dataTestId: `${id}-edit-modal-footer`, onCancel: modal.close, primaryAction: handleAdd, primaryLabel: t("customfield.stringlistfield.add") })] }));
239
239
  };
240
240
 
241
241
  const StringListInput = ({ value: initialValue, onSave, onDelete, disabled, id, index }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/custom-field-components",
3
- "version": "1.7.70",
3
+ "version": "1.7.74",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -12,16 +12,16 @@
12
12
  "react-select": "^5.10.0",
13
13
  "@testing-library/react": "16.2.0",
14
14
  "jest-fetch-mock": "^3.0.3",
15
- "@trackunit/react-form-components": "1.8.70",
16
- "@trackunit/shared-utils": "1.9.44",
17
- "@trackunit/custom-field-api": "1.7.61",
18
- "@trackunit/iris-app-runtime-core": "1.8.48",
19
- "@trackunit/react-components": "1.10.7",
20
- "@trackunit/react-modal": "1.8.67",
21
- "@trackunit/react-core-hooks": "1.7.52",
22
- "@trackunit/i18n-library-translation": "1.7.55",
23
- "@trackunit/iris-app-runtime-core-api": "1.7.48",
24
- "@trackunit/react-test-setup": "1.4.44"
15
+ "@trackunit/react-form-components": "1.8.74",
16
+ "@trackunit/shared-utils": "1.9.46",
17
+ "@trackunit/custom-field-api": "1.7.65",
18
+ "@trackunit/iris-app-runtime-core": "1.8.50",
19
+ "@trackunit/react-components": "1.10.11",
20
+ "@trackunit/react-modal": "1.8.71",
21
+ "@trackunit/react-core-hooks": "1.7.54",
22
+ "@trackunit/i18n-library-translation": "1.7.57",
23
+ "@trackunit/iris-app-runtime-core-api": "1.7.50",
24
+ "@trackunit/react-test-setup": "1.4.46"
25
25
  },
26
26
  "module": "./index.esm.js",
27
27
  "main": "./index.cjs.js",