From 263019290816b94462dc046936d13dd8044c5a8d Mon Sep 17 00:00:00 2001 From: Azizjon Nurov Date: Wed, 29 Jan 2025 20:20:24 +0500 Subject: [PATCH 1/6] Add labelless prop to FieldTags component to hide label --- lib/FieldTags/FieldTagsContainer.js | 3 +++ lib/FieldTags/FieldTagsFinal.js | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/FieldTags/FieldTagsContainer.js b/lib/FieldTags/FieldTagsContainer.js index e05990e4..80fbcd6f 100644 --- a/lib/FieldTags/FieldTagsContainer.js +++ b/lib/FieldTags/FieldTagsContainer.js @@ -17,6 +17,7 @@ const FieldTagsContainer = ({ mutator, name, resources, + labelless = false, }) => { const allTags = get(resources, ['tags', 'records'], []); const tagSettings = get(resources, ['configTags', 'records'], []); @@ -40,6 +41,7 @@ const FieldTagsContainer = ({ formValues={formValues} name={name} onAdd={onAdd} + labelless={labelless} /> ); }; @@ -52,6 +54,7 @@ FieldTagsContainer.manifest = Object.freeze({ FieldTagsContainer.propTypes = { formValues: PropTypes.object, mutator: PropTypes.object.isRequired, + labelless: PropTypes.bool, name: PropTypes.string.isRequired, resources: PropTypes.object.isRequired, }; diff --git a/lib/FieldTags/FieldTagsFinal.js b/lib/FieldTags/FieldTagsFinal.js index 8dceb39d..997ed650 100644 --- a/lib/FieldTags/FieldTagsFinal.js +++ b/lib/FieldTags/FieldTagsFinal.js @@ -28,6 +28,7 @@ const FieldTagsFinal = ({ formValues, name, onAdd, + labelless = false, }) => { const { change } = useForm(); const addTag = useCallback( @@ -64,7 +65,7 @@ const FieldTagsFinal = ({ filter={filterArrayValues} formatter={formatter} itemToString={itemToString} - label={label} + label={!labelless && label} name={name} validateFields={[]} /> @@ -74,6 +75,7 @@ const FieldTagsFinal = ({ FieldTagsFinal.propTypes = { allTags: PropTypes.arrayOf(PropTypes.object), formValues: PropTypes.object, + labelless: PropTypes.bool, name: PropTypes.string.isRequired, onAdd: PropTypes.func.isRequired, }; From c67e82c24d71d99a9b1571933309eb4e18987209 Mon Sep 17 00:00:00 2001 From: Azizjon Nurov Date: Wed, 29 Jan 2025 20:21:47 +0500 Subject: [PATCH 2/6] Add change log --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f56d4156..d855b3a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ * Move reusable version history hook useVersionHistoryValueResolvers to the ACQ lib. Refs UISACQCOMP-235. * Move reusable claiming code from `ui-receiving` to the shared library. Refs UISACQCOMP-236. * Support `CLAIMS` export type in the `useIntegrationConfigs` hook. Refs UISACQCOMP-238. +* Add `labelless` prop to `FieldTags` component to hide label. Refs UISACQCOMP-243. ## [6.0.4](https://github.com/folio-org/stripes-acq-components/tree/v6.0.4) (2025-01-21) [Full Changelog](https://github.com/folio-org/stripes-acq-components/compare/v6.0.3...v6.0.4) From 4419a810b1493eb9b5464cad1b7386d843dd0f11 Mon Sep 17 00:00:00 2001 From: Azizjon Nurov Date: Tue, 4 Feb 2025 18:39:26 +0500 Subject: [PATCH 3/6] Add `data-testid` for FileUploader input --- lib/FileUploader/FileUploader.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/FileUploader/FileUploader.js b/lib/FileUploader/FileUploader.js index 0bd309af..6d85e579 100644 --- a/lib/FileUploader/FileUploader.js +++ b/lib/FileUploader/FileUploader.js @@ -30,7 +30,10 @@ const FileUploader = ({ onSelectFile }) => { ({ getRootProps, getInputProps, open }) => (
- +
From 07dd5ac54f88d7c3a47c4d0f4e4666f30e73eef3 Mon Sep 17 00:00:00 2001 From: Azizjon Nurov Date: Tue, 4 Feb 2025 18:54:38 +0500 Subject: [PATCH 4/6] Add `fullWidth` and `marginBottom0` props --- lib/FieldTags/FieldTagsContainer.js | 12 +++++++++--- lib/FieldTags/FieldTagsFinal.js | 8 +++++++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/lib/FieldTags/FieldTagsContainer.js b/lib/FieldTags/FieldTagsContainer.js index 80fbcd6f..38284f72 100644 --- a/lib/FieldTags/FieldTagsContainer.js +++ b/lib/FieldTags/FieldTagsContainer.js @@ -14,10 +14,12 @@ import FieldTagsFinal from './FieldTagsFinal'; const FieldTagsContainer = ({ formValues, + fullWidth, + labelless = false, + marginBottom0, mutator, name, resources, - labelless = false, }) => { const allTags = get(resources, ['tags', 'records'], []); const tagSettings = get(resources, ['configTags', 'records'], []); @@ -39,9 +41,11 @@ const FieldTagsContainer = ({ ); }; @@ -53,8 +57,10 @@ FieldTagsContainer.manifest = Object.freeze({ FieldTagsContainer.propTypes = { formValues: PropTypes.object, - mutator: PropTypes.object.isRequired, + fullWidth: PropTypes.bool, labelless: PropTypes.bool, + marginBottom0: PropTypes.bool, + mutator: PropTypes.object.isRequired, name: PropTypes.string.isRequired, resources: PropTypes.object.isRequired, }; diff --git a/lib/FieldTags/FieldTagsFinal.js b/lib/FieldTags/FieldTagsFinal.js index 997ed650..40c0ee99 100644 --- a/lib/FieldTags/FieldTagsFinal.js +++ b/lib/FieldTags/FieldTagsFinal.js @@ -26,9 +26,11 @@ const renderTag = ({ filterValue, exactMatch }) => { const FieldTagsFinal = ({ allTags, formValues, + fullWidth, + labelless = false, + marginBottom0, name, onAdd, - labelless = false, }) => { const { change } = useForm(); const addTag = useCallback( @@ -64,8 +66,10 @@ const FieldTagsFinal = ({ emptyMessage=" " filter={filterArrayValues} formatter={formatter} + fullWidth={fullWidth} itemToString={itemToString} label={!labelless && label} + marginBottom0={marginBottom0} name={name} validateFields={[]} /> @@ -75,7 +79,9 @@ const FieldTagsFinal = ({ FieldTagsFinal.propTypes = { allTags: PropTypes.arrayOf(PropTypes.object), formValues: PropTypes.object, + fullWidth: PropTypes.bool, labelless: PropTypes.bool, + marginBottom0: PropTypes.bool, name: PropTypes.string.isRequired, onAdd: PropTypes.func.isRequired, }; From 55874bfa98cab16862049ffbbce2fb740c2e5041 Mon Sep 17 00:00:00 2001 From: Azizjon Nurov Date: Tue, 4 Feb 2025 19:25:21 +0500 Subject: [PATCH 5/6] Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d855b3a2..b9fa5d0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ * Move reusable version history hook useVersionHistoryValueResolvers to the ACQ lib. Refs UISACQCOMP-235. * Move reusable claiming code from `ui-receiving` to the shared library. Refs UISACQCOMP-236. * Support `CLAIMS` export type in the `useIntegrationConfigs` hook. Refs UISACQCOMP-238. -* Add `labelless` prop to `FieldTags` component to hide label. Refs UISACQCOMP-243. +* Add `labelless`, `fullWidth`, `marginBottom0` props to `FieldTags` component. Refs UISACQCOMP-243. ## [6.0.4](https://github.com/folio-org/stripes-acq-components/tree/v6.0.4) (2025-01-21) [Full Changelog](https://github.com/folio-org/stripes-acq-components/compare/v6.0.3...v6.0.4) From 9beeef65d9e22cd6795408ed3aff8b3750143a26 Mon Sep 17 00:00:00 2001 From: Azizjon Nurov Date: Wed, 5 Feb 2025 13:23:13 +0500 Subject: [PATCH 6/6] Add spread props --- lib/FieldTags/FieldTagsContainer.js | 2 ++ lib/FieldTags/FieldTagsFinal.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/FieldTags/FieldTagsContainer.js b/lib/FieldTags/FieldTagsContainer.js index 38284f72..08a5172c 100644 --- a/lib/FieldTags/FieldTagsContainer.js +++ b/lib/FieldTags/FieldTagsContainer.js @@ -20,6 +20,7 @@ const FieldTagsContainer = ({ mutator, name, resources, + ...props }) => { const allTags = get(resources, ['tags', 'records'], []); const tagSettings = get(resources, ['configTags', 'records'], []); @@ -46,6 +47,7 @@ const FieldTagsContainer = ({ marginBottom0={marginBottom0} name={name} onAdd={onAdd} + {...props} /> ); }; diff --git a/lib/FieldTags/FieldTagsFinal.js b/lib/FieldTags/FieldTagsFinal.js index 40c0ee99..ac29c59b 100644 --- a/lib/FieldTags/FieldTagsFinal.js +++ b/lib/FieldTags/FieldTagsFinal.js @@ -31,6 +31,7 @@ const FieldTagsFinal = ({ marginBottom0, name, onAdd, + ...props }) => { const { change } = useForm(); const addTag = useCallback( @@ -72,6 +73,7 @@ const FieldTagsFinal = ({ marginBottom0={marginBottom0} name={name} validateFields={[]} + {...props} /> ); };