From 464adb0526aa7b20f9f70e8fb58ce04865cbde70 Mon Sep 17 00:00:00 2001 From: Derek Leadbetter Date: Tue, 2 May 2023 12:10:31 -0400 Subject: [PATCH 1/3] UDCSL #202 - Updating user_defined_fields gem; Updating react-components packages; Adding resolveValidationError to Project page --- Gemfile | 3 ++- Gemfile.lock | 6 ++---- client/package.json | 6 +++--- client/src/pages/Project.js | 5 +++-- client/yarn.lock | 33 +++++++++++++++++---------------- 5 files changed, 27 insertions(+), 26 deletions(-) diff --git a/Gemfile b/Gemfile index 1a03269..07ac603 100644 --- a/Gemfile +++ b/Gemfile @@ -46,7 +46,8 @@ gem 'exif', '~> 2.2.3' gem 'httparty', '~> 0.17.3' # User defined fields -gem 'user_defined_fields', git: 'https://github.com/performant-software/user-defined-fields.git', tag: 'v0.1.4' +#gem 'user_defined_fields', git: 'https://github.com/performant-software/user-defined-fields.git', tag: 'v0.1.4' +gem 'user_defined_fields', path: '../user-defined-fields' # Data migrations gem 'data_migrate', '~> 8.1.1' diff --git a/Gemfile.lock b/Gemfile.lock index e520bf5..0ea4a69 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,10 +7,8 @@ GIT pagy (~> 5.10) rails (>= 6.0.3.2, < 8) -GIT - remote: https://github.com/performant-software/user-defined-fields.git - revision: 3ee864cc829e35b6c470905af97043ed10e0b02c - tag: v0.1.4 +PATH + remote: ../user-defined-fields specs: user_defined_fields (0.1.0) rails (>= 6.0.3.2, < 8) diff --git a/client/package.json b/client/package.json index 49b1f0d..329357d 100644 --- a/client/package.json +++ b/client/package.json @@ -11,9 +11,9 @@ "flow": "flow" }, "dependencies": { - "@performant-software/semantic-components": "^1.0.4", - "@performant-software/shared-components": "^1.0.4", - "@performant-software/user-defined-fields": "^1.0.4", + "@performant-software/semantic-components": "^1.0.12-beta.3", + "@performant-software/shared-components": "^1.0.12-beta.3", + "@performant-software/user-defined-fields": "^1.0.12-beta.3", "classnames": "^2.3.1", "i18next": "^21.8.0", "react": "^17.0.2", diff --git a/client/src/pages/Project.js b/client/src/pages/Project.js index f275e29..d626a05 100644 --- a/client/src/pages/Project.js +++ b/client/src/pages/Project.js @@ -1,7 +1,7 @@ // @flow import { AssociatedDropdown, FileInputButton, LazyImage } from '@performant-software/semantic-components'; -import { UserDefinedFieldsEmbeddedList } from '@performant-software/user-defined-fields'; +import { UserDefinedFields, UserDefinedFieldsEmbeddedList } from '@performant-software/user-defined-fields'; import React, { type ComponentType, useEffect } from 'react'; import { withTranslation } from 'react-i18next'; import { Button, Form } from 'semantic-ui-react'; @@ -140,7 +140,8 @@ const Project: ComponentType = withEditPage(ProjectForm, { .save(project) .then(({ data }) => data.project) ), - required: ['name', 'description', 'organization_id'] + required: ['name', 'description', 'organization_id'], + resolveValidationError: UserDefinedFields.resolveError.bind(this) }); export default Project; diff --git a/client/yarn.lock b/client/yarn.lock index db291e0..48f601e 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -1606,15 +1606,14 @@ "@stitches/react" "^1.2.7" react "^18.2.0" -"@performant-software/semantic-components@^1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@performant-software/semantic-components/-/semantic-components-1.0.4.tgz#4145b7937332b495694d26e96778176bce51e2ea" - integrity sha512-fkqioC01Vi6XhtWZOgrmKjbjDZb+7qkdP8grIzCwn59mbGEHzinL4H8Wiv/WU3CWCr2h5SlmT+BGNbTlczyM5w== +"@performant-software/semantic-components@^1.0.12-beta.3": + version "1.0.12-beta.3" + resolved "https://registry.yarnpkg.com/@performant-software/semantic-components/-/semantic-components-1.0.12-beta.3.tgz#eaf105a4045ceb6022168b81306aa9cbba6a0ceb" + integrity sha512-6YAD/cpDKNQtghDA4XBzzBajRaIpgwpJKuiRPKW3CPAv5YY21jo31Y8NTGCNphReqjXrNUAXiJPOMMJ+PSOG1A== dependencies: - "@performant-software/shared-components" "^1.0.4" + "@performant-software/shared-components" "^1.0.12-beta.3" "@react-google-maps/api" "^2.8.1" axios "^0.26.1" - citeproc "^2.4.62" i18next "^19.4.4" react-calendar "^3.3.0" react-color "^2.18.1" @@ -1630,14 +1629,15 @@ zotero-api-client "^0.40.0" zotero-translation-client "^5.0.1" -"@performant-software/shared-components@^1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@performant-software/shared-components/-/shared-components-1.0.4.tgz#0b2be8edb1359ef0e1da8fcd7e8379ec3156f347" - integrity sha512-tePGzd7fv+wZuZ3KuELl/YzGM3fY0wSnYmypQaC2iAwYV6lNuCi+JnEqJb7OSrZ5zzua4leRsn/pQ19JERDYLA== +"@performant-software/shared-components@^1.0.12-beta.3": + version "1.0.12-beta.3" + resolved "https://registry.yarnpkg.com/@performant-software/shared-components/-/shared-components-1.0.12-beta.3.tgz#8a7da891a66b693fb73c2c366adf72dd46a73ba5" + integrity sha512-S9QZIvE54FAyk0ak+WFDaDsMR5oIwNr7tdtYh8ImqWamSQ+8fZa6ZPXsu56LGnx0ABfXMXwLIbvHvDrdH868gw== dependencies: "@react-google-maps/api" "^2.8.1" "@samvera/clover-iiif" "^1.10.3" axios "^0.26.1" + citeproc "^2.4.62" i18next "^19.4.4" moment "^2.27.0" moment-islamic-civil ACGC/moment-islamic-civil @@ -1650,14 +1650,15 @@ simple-keyboard "^3.0.0" simple-keyboard-layouts "^3.0.0" underscore "^1.13.2" + zotero-translation-client "^5.0.1" -"@performant-software/user-defined-fields@^1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@performant-software/user-defined-fields/-/user-defined-fields-1.0.4.tgz#091f79fec013507955deac111b8d9f73030aeead" - integrity sha512-gTJud8tJDnWdNF9hJynztuVCRyZUJtEZ1c2/91YwzKHMjn3Z/aUtbgoa/R8ZRfJnws6uZeID3S2kstfiJamm3w== +"@performant-software/user-defined-fields@^1.0.12-beta.3": + version "1.0.12-beta.3" + resolved "https://registry.yarnpkg.com/@performant-software/user-defined-fields/-/user-defined-fields-1.0.12-beta.3.tgz#f73b81924dabf7167b6c3462488ccfd9a291814a" + integrity sha512-5FFAcb443ENgfPSgl3LDv08HGvO36DRMu7Kvpmx17XqQk45PTTrzScxVkh/0BXfKYLarr9T5KQuxnEq4xUv5jQ== dependencies: - "@performant-software/semantic-components" "^1.0.4" - "@performant-software/shared-components" "^1.0.4" + "@performant-software/semantic-components" "^1.0.12-beta.3" + "@performant-software/shared-components" "^1.0.12-beta.3" i18next "^21.9.1" semantic-ui-react "^2.1.2" underscore "^1.13.2" From 94c34b2e4e2b16da4540af60ba246315265414ef Mon Sep 17 00:00:00 2001 From: Derek Leadbetter Date: Wed, 3 May 2023 06:49:14 -0400 Subject: [PATCH 2/3] UDCSL #202 - Updating react-components packages to the latest version --- client/package.json | 6 +++--- client/yarn.lock | 30 +++++++++++++++--------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/client/package.json b/client/package.json index 329357d..50796b7 100644 --- a/client/package.json +++ b/client/package.json @@ -11,9 +11,9 @@ "flow": "flow" }, "dependencies": { - "@performant-software/semantic-components": "^1.0.12-beta.3", - "@performant-software/shared-components": "^1.0.12-beta.3", - "@performant-software/user-defined-fields": "^1.0.12-beta.3", + "@performant-software/semantic-components": "^1.0.12-beta.4", + "@performant-software/shared-components": "^1.0.12-beta.4", + "@performant-software/user-defined-fields": "^1.0.12-beta.4", "classnames": "^2.3.1", "i18next": "^21.8.0", "react": "^17.0.2", diff --git a/client/yarn.lock b/client/yarn.lock index 48f601e..25e13d3 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -1606,12 +1606,12 @@ "@stitches/react" "^1.2.7" react "^18.2.0" -"@performant-software/semantic-components@^1.0.12-beta.3": - version "1.0.12-beta.3" - resolved "https://registry.yarnpkg.com/@performant-software/semantic-components/-/semantic-components-1.0.12-beta.3.tgz#eaf105a4045ceb6022168b81306aa9cbba6a0ceb" - integrity sha512-6YAD/cpDKNQtghDA4XBzzBajRaIpgwpJKuiRPKW3CPAv5YY21jo31Y8NTGCNphReqjXrNUAXiJPOMMJ+PSOG1A== +"@performant-software/semantic-components@^1.0.12-beta.4": + version "1.0.12-beta.4" + resolved "https://registry.yarnpkg.com/@performant-software/semantic-components/-/semantic-components-1.0.12-beta.4.tgz#51502c7e8df6092681f16fd3b25bd284eb4904be" + integrity sha512-TOv91fLIslzepxsiR6fHd/LUYrNDtD+2xB6V6MpxhEf0HBIfmI/c2+zkz/vaFWVXDrylBUin9eeE7nX9wZj/pA== dependencies: - "@performant-software/shared-components" "^1.0.12-beta.3" + "@performant-software/shared-components" "^1.0.12-beta.4" "@react-google-maps/api" "^2.8.1" axios "^0.26.1" i18next "^19.4.4" @@ -1629,10 +1629,10 @@ zotero-api-client "^0.40.0" zotero-translation-client "^5.0.1" -"@performant-software/shared-components@^1.0.12-beta.3": - version "1.0.12-beta.3" - resolved "https://registry.yarnpkg.com/@performant-software/shared-components/-/shared-components-1.0.12-beta.3.tgz#8a7da891a66b693fb73c2c366adf72dd46a73ba5" - integrity sha512-S9QZIvE54FAyk0ak+WFDaDsMR5oIwNr7tdtYh8ImqWamSQ+8fZa6ZPXsu56LGnx0ABfXMXwLIbvHvDrdH868gw== +"@performant-software/shared-components@^1.0.12-beta.4": + version "1.0.12-beta.4" + resolved "https://registry.yarnpkg.com/@performant-software/shared-components/-/shared-components-1.0.12-beta.4.tgz#8f2780bcd499b6f3747d803799fa82e0f09f306a" + integrity sha512-QTMzl1ncbmRe2iuAmmHxO3XBuHHQLinICHMMJYkvjDLBOcxX6KdFqCKjpyqianr5W4Eafr8e7hg9HdCtDoVqOQ== dependencies: "@react-google-maps/api" "^2.8.1" "@samvera/clover-iiif" "^1.10.3" @@ -1652,13 +1652,13 @@ underscore "^1.13.2" zotero-translation-client "^5.0.1" -"@performant-software/user-defined-fields@^1.0.12-beta.3": - version "1.0.12-beta.3" - resolved "https://registry.yarnpkg.com/@performant-software/user-defined-fields/-/user-defined-fields-1.0.12-beta.3.tgz#f73b81924dabf7167b6c3462488ccfd9a291814a" - integrity sha512-5FFAcb443ENgfPSgl3LDv08HGvO36DRMu7Kvpmx17XqQk45PTTrzScxVkh/0BXfKYLarr9T5KQuxnEq4xUv5jQ== +"@performant-software/user-defined-fields@^1.0.12-beta.4": + version "1.0.12-beta.4" + resolved "https://registry.yarnpkg.com/@performant-software/user-defined-fields/-/user-defined-fields-1.0.12-beta.4.tgz#b20588330aba45a0a0edf47a9ae95693cec285ec" + integrity sha512-5XAu3C5pknfrXHH4OVqObYLc7b55Q5V9v1aQCES5Pktmnp7F0F2RRV8ddDUagpp/Wb8JrKgqwhcusdpfKbfOzQ== dependencies: - "@performant-software/semantic-components" "^1.0.12-beta.3" - "@performant-software/shared-components" "^1.0.12-beta.3" + "@performant-software/semantic-components" "^1.0.12-beta.4" + "@performant-software/shared-components" "^1.0.12-beta.4" i18next "^21.9.1" semantic-ui-react "^2.1.2" underscore "^1.13.2" From cf4c93b852e5aba270a2e1cef16dd331275ce6e9 Mon Sep 17 00:00:00 2001 From: Derek Leadbetter Date: Thu, 4 May 2023 11:33:10 -0400 Subject: [PATCH 3/3] UDCSL #202 - Updates the user_defined_fields gem; Updates the react-components packages --- Gemfile | 3 +-- Gemfile.lock | 6 ++++-- client/package.json | 6 +++--- client/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 23 insertions(+), 22 deletions(-) diff --git a/Gemfile b/Gemfile index 07ac603..ca066e0 100644 --- a/Gemfile +++ b/Gemfile @@ -46,8 +46,7 @@ gem 'exif', '~> 2.2.3' gem 'httparty', '~> 0.17.3' # User defined fields -#gem 'user_defined_fields', git: 'https://github.com/performant-software/user-defined-fields.git', tag: 'v0.1.4' -gem 'user_defined_fields', path: '../user-defined-fields' +gem 'user_defined_fields', git: 'https://github.com/performant-software/user-defined-fields.git', tag: 'v0.1.5' # Data migrations gem 'data_migrate', '~> 8.1.1' diff --git a/Gemfile.lock b/Gemfile.lock index 0ea4a69..924adde 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,8 +7,10 @@ GIT pagy (~> 5.10) rails (>= 6.0.3.2, < 8) -PATH - remote: ../user-defined-fields +GIT + remote: https://github.com/performant-software/user-defined-fields.git + revision: 8be734aead7c44211b49d16017e99741186bbdcd + tag: v0.1.5 specs: user_defined_fields (0.1.0) rails (>= 6.0.3.2, < 8) diff --git a/client/package.json b/client/package.json index 50796b7..29e12fc 100644 --- a/client/package.json +++ b/client/package.json @@ -11,9 +11,9 @@ "flow": "flow" }, "dependencies": { - "@performant-software/semantic-components": "^1.0.12-beta.4", - "@performant-software/shared-components": "^1.0.12-beta.4", - "@performant-software/user-defined-fields": "^1.0.12-beta.4", + "@performant-software/semantic-components": "^1.0.12", + "@performant-software/shared-components": "^1.0.12", + "@performant-software/user-defined-fields": "^1.0.12", "classnames": "^2.3.1", "i18next": "^21.8.0", "react": "^17.0.2", diff --git a/client/yarn.lock b/client/yarn.lock index 25e13d3..2097e1f 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -1606,12 +1606,12 @@ "@stitches/react" "^1.2.7" react "^18.2.0" -"@performant-software/semantic-components@^1.0.12-beta.4": - version "1.0.12-beta.4" - resolved "https://registry.yarnpkg.com/@performant-software/semantic-components/-/semantic-components-1.0.12-beta.4.tgz#51502c7e8df6092681f16fd3b25bd284eb4904be" - integrity sha512-TOv91fLIslzepxsiR6fHd/LUYrNDtD+2xB6V6MpxhEf0HBIfmI/c2+zkz/vaFWVXDrylBUin9eeE7nX9wZj/pA== +"@performant-software/semantic-components@^1.0.12": + version "1.0.12" + resolved "https://registry.yarnpkg.com/@performant-software/semantic-components/-/semantic-components-1.0.12.tgz#dd99502c534b8955b9c81a123b8377f00a27b3a6" + integrity sha512-ovoyVpql/V9TEcZ4fNZCl3NNj/eXhE4qdslhvu37XKljJ99arR8INuYI27t2sVi2bYdGibiqIWEiBYyLWdPABw== dependencies: - "@performant-software/shared-components" "^1.0.12-beta.4" + "@performant-software/shared-components" "^1.0.12" "@react-google-maps/api" "^2.8.1" axios "^0.26.1" i18next "^19.4.4" @@ -1629,10 +1629,10 @@ zotero-api-client "^0.40.0" zotero-translation-client "^5.0.1" -"@performant-software/shared-components@^1.0.12-beta.4": - version "1.0.12-beta.4" - resolved "https://registry.yarnpkg.com/@performant-software/shared-components/-/shared-components-1.0.12-beta.4.tgz#8f2780bcd499b6f3747d803799fa82e0f09f306a" - integrity sha512-QTMzl1ncbmRe2iuAmmHxO3XBuHHQLinICHMMJYkvjDLBOcxX6KdFqCKjpyqianr5W4Eafr8e7hg9HdCtDoVqOQ== +"@performant-software/shared-components@^1.0.12": + version "1.0.12" + resolved "https://registry.yarnpkg.com/@performant-software/shared-components/-/shared-components-1.0.12.tgz#ca08303feaa3227a38d571b00c54e33de7a915f7" + integrity sha512-P+/HpkCl/Gng+q6U3bFhxGQ34ZxWFzEi35SlQq1+HNH5RvYpkn4oNttOq5M7JO9Y/BbVy2sKlT2zP8QQ36FoWQ== dependencies: "@react-google-maps/api" "^2.8.1" "@samvera/clover-iiif" "^1.10.3" @@ -1652,13 +1652,13 @@ underscore "^1.13.2" zotero-translation-client "^5.0.1" -"@performant-software/user-defined-fields@^1.0.12-beta.4": - version "1.0.12-beta.4" - resolved "https://registry.yarnpkg.com/@performant-software/user-defined-fields/-/user-defined-fields-1.0.12-beta.4.tgz#b20588330aba45a0a0edf47a9ae95693cec285ec" - integrity sha512-5XAu3C5pknfrXHH4OVqObYLc7b55Q5V9v1aQCES5Pktmnp7F0F2RRV8ddDUagpp/Wb8JrKgqwhcusdpfKbfOzQ== +"@performant-software/user-defined-fields@^1.0.12": + version "1.0.12" + resolved "https://registry.yarnpkg.com/@performant-software/user-defined-fields/-/user-defined-fields-1.0.12.tgz#e44506d39f7ec8d0f82da0b4cca67ef3456b95ca" + integrity sha512-HK1oW6cgPSekmvVmPikaHgB8FnnhRJe2JjSyOFG6SkXWdFCEQjKLJDR5EdUd/ee3KDVvYM/O4vyYzr5ltCFpcA== dependencies: - "@performant-software/semantic-components" "^1.0.12-beta.4" - "@performant-software/shared-components" "^1.0.12-beta.4" + "@performant-software/semantic-components" "^1.0.12" + "@performant-software/shared-components" "^1.0.12" i18next "^21.9.1" semantic-ui-react "^2.1.2" underscore "^1.13.2"