invenio-vocabularies 7.2.0__py2.py3-none-any.whl → 7.3.0__py2.py3-none-any.whl
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.
Potentially problematic release.
This version of invenio-vocabularies might be problematic. Click here for more details.
- invenio_vocabularies/__init__.py +1 -1
- invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/FundingField.js +28 -7
- invenio_vocabularies/contrib/subjects/config.py +5 -0
- invenio_vocabularies/webpack.py +2 -2
- {invenio_vocabularies-7.2.0.dist-info → invenio_vocabularies-7.3.0.dist-info}/METADATA +9 -1
- {invenio_vocabularies-7.2.0.dist-info → invenio_vocabularies-7.3.0.dist-info}/RECORD +11 -11
- {invenio_vocabularies-7.2.0.dist-info → invenio_vocabularies-7.3.0.dist-info}/WHEEL +1 -1
- {invenio_vocabularies-7.2.0.dist-info → invenio_vocabularies-7.3.0.dist-info}/AUTHORS.rst +0 -0
- {invenio_vocabularies-7.2.0.dist-info → invenio_vocabularies-7.3.0.dist-info}/LICENSE +0 -0
- {invenio_vocabularies-7.2.0.dist-info → invenio_vocabularies-7.3.0.dist-info}/entry_points.txt +0 -0
- {invenio_vocabularies-7.2.0.dist-info → invenio_vocabularies-7.3.0.dist-info}/top_level.txt +0 -0
invenio_vocabularies/__init__.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is part of InvenioVocabularies
|
|
2
|
-
// Copyright (C) 2021-
|
|
2
|
+
// Copyright (C) 2021-2025 CERN.
|
|
3
3
|
// Copyright (C) 2021 Northwestern University.
|
|
4
4
|
//
|
|
5
5
|
// Invenio is free software; you can redistribute it and/or modify it
|
|
@@ -11,7 +11,7 @@ import { FieldArray, getIn } from "formik";
|
|
|
11
11
|
import { HTML5Backend } from "react-dnd-html5-backend";
|
|
12
12
|
import { DndProvider } from "react-dnd";
|
|
13
13
|
import { Button, Form, Icon, List } from "semantic-ui-react";
|
|
14
|
-
import { FieldLabel } from "react-invenio-forms";
|
|
14
|
+
import { FieldLabel, FeedbackLabel } from "react-invenio-forms";
|
|
15
15
|
|
|
16
16
|
import { FundingFieldItem } from "./FundingFieldItem";
|
|
17
17
|
import FundingModal from "./FundingModal";
|
|
@@ -25,7 +25,7 @@ function FundingFieldForm(props) {
|
|
|
25
25
|
label,
|
|
26
26
|
labelIcon,
|
|
27
27
|
fieldPath,
|
|
28
|
-
form: { values },
|
|
28
|
+
form: { values, errors, initialErrors, initialValues },
|
|
29
29
|
move: formikArrayMove,
|
|
30
30
|
push: formikArrayPush,
|
|
31
31
|
remove: formikArrayRemove,
|
|
@@ -81,12 +81,25 @@ function FundingFieldForm(props) {
|
|
|
81
81
|
|
|
82
82
|
return { headerContent, descriptionContent, awardOrFunder };
|
|
83
83
|
};
|
|
84
|
+
|
|
85
|
+
const fundingList = getIn(values, fieldPath, []);
|
|
86
|
+
const formikInitialValues = getIn(initialValues, fieldPath, []);
|
|
87
|
+
|
|
88
|
+
const error = getIn(errors, fieldPath, null);
|
|
89
|
+
const initialError = getIn(initialErrors, fieldPath, null);
|
|
90
|
+
const fundingError = error || (fundingList === formikInitialValues && initialError);
|
|
91
|
+
|
|
92
|
+
let className = "";
|
|
93
|
+
if (fundingError) {
|
|
94
|
+
className = typeof fundingError !== "string" ? fundingError.severity : "error";
|
|
95
|
+
}
|
|
96
|
+
|
|
84
97
|
return (
|
|
85
98
|
<DndProvider backend={HTML5Backend}>
|
|
86
|
-
<Form.Field required={required}>
|
|
99
|
+
<Form.Field required={required} className={className}>
|
|
87
100
|
<FieldLabel htmlFor={fieldPath} icon={labelIcon} label={label} />
|
|
88
101
|
<List>
|
|
89
|
-
{
|
|
102
|
+
{fundingList.map((value, index) => {
|
|
90
103
|
const key = `${fieldPath}.${index}`;
|
|
91
104
|
// if award does not exist or has no id, it's a custom one
|
|
92
105
|
const awardType = value?.award?.id ? "standard" : "custom";
|
|
@@ -120,7 +133,7 @@ function FundingFieldForm(props) {
|
|
|
120
133
|
key="custom"
|
|
121
134
|
icon
|
|
122
135
|
labelPosition="left"
|
|
123
|
-
className=
|
|
136
|
+
className={`mb-5 ${className}`}
|
|
124
137
|
>
|
|
125
138
|
<Icon name="add" />
|
|
126
139
|
{i18next.t("Add")}
|
|
@@ -141,7 +154,13 @@ function FundingFieldForm(props) {
|
|
|
141
154
|
<FundingModal
|
|
142
155
|
searchConfig={searchConfig}
|
|
143
156
|
trigger={
|
|
144
|
-
<Button
|
|
157
|
+
<Button
|
|
158
|
+
type="button"
|
|
159
|
+
key="custom"
|
|
160
|
+
icon
|
|
161
|
+
labelPosition="left"
|
|
162
|
+
className={className}
|
|
163
|
+
>
|
|
145
164
|
<Icon name="add" />
|
|
146
165
|
{i18next.t("Add custom")}
|
|
147
166
|
</Button>
|
|
@@ -156,6 +175,8 @@ function FundingFieldForm(props) {
|
|
|
156
175
|
computeFundingContents={computeFundingContents}
|
|
157
176
|
/>
|
|
158
177
|
</Overridable>
|
|
178
|
+
|
|
179
|
+
{fundingError && <FeedbackLabel errorMessage={fundingError} />}
|
|
159
180
|
</Form.Field>
|
|
160
181
|
</DndProvider>
|
|
161
182
|
);
|
|
@@ -50,6 +50,11 @@ class SubjectsSearchOptions(SearchOptions):
|
|
|
50
50
|
localized_title,
|
|
51
51
|
"synonyms^20",
|
|
52
52
|
],
|
|
53
|
+
clauses=[
|
|
54
|
+
{"type": "cross_fields", "boost": 3},
|
|
55
|
+
{"type": "bool_prefix", "boost": 2, "fuzziness": "AUTO"},
|
|
56
|
+
{"type": "most_fields", "boost": 1, "fuzziness": "AUTO"},
|
|
57
|
+
],
|
|
53
58
|
)
|
|
54
59
|
|
|
55
60
|
sort_default = "bestmatch"
|
invenio_vocabularies/webpack.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
#
|
|
3
|
-
# Copyright (C) 2019-
|
|
3
|
+
# Copyright (C) 2019-2025 CERN.
|
|
4
4
|
# Copyright (C) 2019-2022 Northwestern University.
|
|
5
5
|
# Copyright (C) 2022 TU Wien.
|
|
6
6
|
# Copyright (C) 2022 Graz University of Technology.
|
|
@@ -34,7 +34,7 @@ theme = WebpackThemeBundle(
|
|
|
34
34
|
"react-dnd-html5-backend": "^11.1.0",
|
|
35
35
|
"react-dropzone": "^11.0.0",
|
|
36
36
|
"react-i18next": "^11.11.0",
|
|
37
|
-
"react-invenio-forms": "^4.
|
|
37
|
+
"react-invenio-forms": "^4.6.0",
|
|
38
38
|
"react-searchkit": "^3.0.0",
|
|
39
39
|
"yup": "^0.32.0",
|
|
40
40
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: invenio-vocabularies
|
|
3
|
-
Version: 7.
|
|
3
|
+
Version: 7.3.0
|
|
4
4
|
Summary: Invenio module for managing vocabularies.
|
|
5
5
|
Home-page: https://github.com/inveniosoftware/invenio-vocabularies
|
|
6
6
|
Author: CERN
|
|
@@ -91,6 +91,14 @@ https://invenio-vocabularies.readthedocs.io/
|
|
|
91
91
|
Changes
|
|
92
92
|
=======
|
|
93
93
|
|
|
94
|
+
Version v7.3.0 (released 2025-03-18)
|
|
95
|
+
|
|
96
|
+
- form: funding: use FeedbackLabel and add error styling
|
|
97
|
+
|
|
98
|
+
Version v7.2.1 (released 2025-03-17)
|
|
99
|
+
|
|
100
|
+
- subjects: Keep bool_prefix clause for suggest search
|
|
101
|
+
|
|
94
102
|
Version v7.2.0 (released 2025-03-10)
|
|
95
103
|
|
|
96
104
|
- search: fix too many clauses on affiliation search
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
invenio_vocabularies/__init__.py,sha256=
|
|
1
|
+
invenio_vocabularies/__init__.py,sha256=IuQRd0A4SQseB03HVn0A3YbUI1JUeqRykVF3aqcYMew,429
|
|
2
2
|
invenio_vocabularies/cli.py,sha256=CpXTTIn2GTpUqNfLEMlRAp3JWst8ZjHVxoGYdhuuv_4,5959
|
|
3
3
|
invenio_vocabularies/config.py,sha256=HCX670_PXw-fA1aaTto93N4579dr4M3xRxnA4nHZn18,6967
|
|
4
4
|
invenio_vocabularies/ext.py,sha256=GujJ4UARd4Fxf4z7zznRk9JAgHamZuYCOdrKU5czg00,5987
|
|
@@ -7,7 +7,7 @@ invenio_vocabularies/fixtures.py,sha256=iEPkWf_ZjdP2D9r2sLdIlPoR8Rq2m5cnoFwywUGH
|
|
|
7
7
|
invenio_vocabularies/jobs.py,sha256=cbiZnJ3D6Q-j4NvijjqeCoD90TSTMyYul8l4BmBIxPw,5776
|
|
8
8
|
invenio_vocabularies/proxies.py,sha256=k7cTUgWfnCoYIuNqAj_VFi1zBN33KNNclRSVnBkObEM,711
|
|
9
9
|
invenio_vocabularies/views.py,sha256=PNJ5nvc3O7ASwNe56xmqy5YaU9n3UYF3W2JwvtE_kYs,1561
|
|
10
|
-
invenio_vocabularies/webpack.py,sha256=
|
|
10
|
+
invenio_vocabularies/webpack.py,sha256=FkM8TxXClmaJcD8YsQq5Mai56nYVJh_1IYTMEHb3c1M,1891
|
|
11
11
|
invenio_vocabularies/administration/__init__.py,sha256=0bDp2Aw8aZth7C-q9Xn9rxeCUQQRoIUxoWWWwPvKbXA,308
|
|
12
12
|
invenio_vocabularies/administration/views/__init__.py,sha256=31DP4jLG6q4HQlzSRiGLPxUjHPUCCl4N34y4XMuPP6g,313
|
|
13
13
|
invenio_vocabularies/administration/views/vocabularies.py,sha256=JyKr1OYF9DO89zvWCNOtNfClO_QptdHdjvgY1kkImnw,1290
|
|
@@ -32,7 +32,7 @@ invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/form
|
|
|
32
32
|
invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/AwardResults.js,sha256=AgqJg9GEcJvKZR4plZsH0j7cm9C3yjT9YCPI6uvmOyc,3499
|
|
33
33
|
invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/CustomAwardForm.js,sha256=TfwrlA_GrINvN1LAdW7J6q_hkbsiEKxbCWc-7VVp8mY,4674
|
|
34
34
|
invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/FunderDropdown.js,sha256=pPMB9Hirc8z3efquecrO_CKlfXE1ws6OqDB7fB30l5k,2431
|
|
35
|
-
invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/FundingField.js,sha256=
|
|
35
|
+
invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/FundingField.js,sha256=NfbBZOxqphYqWB3i0N5p3LDNo4WxM1ko50K_zuuFT28,7621
|
|
36
36
|
invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/FundingField.test.js,sha256=z_4lWkf3h9Uin8OzSBSKY1wpUxtbnjE2kRUjW80jAhA,35
|
|
37
37
|
invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/FundingFieldItem.js,sha256=ZN4dEcHCVtSVFjzb1SAYPxmaY1Qk5ZdCt1yY7j6pvQs,4610
|
|
38
38
|
invenio_vocabularies/assets/semantic-ui/js/invenio_vocabularies/src/contrib/forms/Funding/FundingModal.js,sha256=X2l1hjwboHFZWEEODvQS8Q7YntD6npj_TmZLiXkuZQs,7474
|
|
@@ -137,7 +137,7 @@ invenio_vocabularies/contrib/names/mappings/v7/__init__.py,sha256=qLGB8C0kPI3xub
|
|
|
137
137
|
invenio_vocabularies/contrib/names/mappings/v7/names/name-v1.0.0.json,sha256=5Ybcq3fUMYx3u1MNKmHh-CWBtATS9MYpdEcwAM8EQ80,1943
|
|
138
138
|
invenio_vocabularies/contrib/subjects/__init__.py,sha256=GtXZKA6VWG1oA1fUX2Wh92nd-1i7RnnQF6RprGhxkD4,591
|
|
139
139
|
invenio_vocabularies/contrib/subjects/api.py,sha256=QH8mxoLsa8qjJT1i1Tj6rRnpbH23plo2IMOJ56rnvbU,347
|
|
140
|
-
invenio_vocabularies/contrib/subjects/config.py,sha256=
|
|
140
|
+
invenio_vocabularies/contrib/subjects/config.py,sha256=CLQT1_5gj4waCFBI6K2jobHHUQjW0RJ7Xk49caWDP14,2378
|
|
141
141
|
invenio_vocabularies/contrib/subjects/datastreams.py,sha256=s6o5_A-0I3TMx77IbwmLHJpSuDWx8xClW9ocnP2JYfw,1885
|
|
142
142
|
invenio_vocabularies/contrib/subjects/facets.py,sha256=qQ7_rppFBzsmrlZu4-MvOIdUcjeOmDA9gOHAcs0lWwI,695
|
|
143
143
|
invenio_vocabularies/contrib/subjects/models.py,sha256=8XgbVRxDDvhWPjMWsoCriNlOKdmV_113a14yLRtlvM4,363
|
|
@@ -305,10 +305,10 @@ invenio_vocabularies/translations/zh_CN/LC_MESSAGES/messages.mo,sha256=bpqywk-Hn
|
|
|
305
305
|
invenio_vocabularies/translations/zh_CN/LC_MESSAGES/messages.po,sha256=vg8qC8ofpAdJ3mQz7mWM1ylKDpiNWXFs7rlMdSPkgKk,4629
|
|
306
306
|
invenio_vocabularies/translations/zh_TW/LC_MESSAGES/messages.mo,sha256=o3nwy64PXTcRaAbRrJpYMICW5aVQ0sCdGIn2Xy4UccU,600
|
|
307
307
|
invenio_vocabularies/translations/zh_TW/LC_MESSAGES/messages.po,sha256=9ACePz_EpB-LfcIJajZ2kp8Q04tcdrQLOtug162ZUss,4115
|
|
308
|
-
invenio_vocabularies-7.
|
|
309
|
-
invenio_vocabularies-7.
|
|
310
|
-
invenio_vocabularies-7.
|
|
311
|
-
invenio_vocabularies-7.
|
|
312
|
-
invenio_vocabularies-7.
|
|
313
|
-
invenio_vocabularies-7.
|
|
314
|
-
invenio_vocabularies-7.
|
|
308
|
+
invenio_vocabularies-7.3.0.dist-info/AUTHORS.rst,sha256=8d0p_WWE1r9DavvzMDi2D4YIGBHiMYcN3LYxqQOj8sY,291
|
|
309
|
+
invenio_vocabularies-7.3.0.dist-info/LICENSE,sha256=UvI8pR8jGWqe0sTkb_hRG6eIrozzWwWzyCGEpuXX4KE,1062
|
|
310
|
+
invenio_vocabularies-7.3.0.dist-info/METADATA,sha256=VdGum0SJJwYTn6gfdGbGiNWSDkDw84w4veKV4j6Dr4g,13460
|
|
311
|
+
invenio_vocabularies-7.3.0.dist-info/WHEEL,sha256=Kol19cahXavY536r5Aj6aAgK_6CmctrOu3bgNJMSNJA,109
|
|
312
|
+
invenio_vocabularies-7.3.0.dist-info/entry_points.txt,sha256=lget4Ekno9VRTq36oowWReIJA99165gOp0BOiiET60Y,3179
|
|
313
|
+
invenio_vocabularies-7.3.0.dist-info/top_level.txt,sha256=x1gRNbaODF_bCD0SBLM3nVOFPGi06cmGX5X94WKrFKk,21
|
|
314
|
+
invenio_vocabularies-7.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{invenio_vocabularies-7.2.0.dist-info → invenio_vocabularies-7.3.0.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|