From 7feb9979922f198ad619152eab8a9ce763adf6a8 Mon Sep 17 00:00:00 2001 From: Ola Blissing Date: Wed, 1 Dec 2021 11:43:05 +0100 Subject: [PATCH 01/38] Add support for typechooser settings to be defined as Class.property --- vue-client/src/components/mixins/form-mixin.vue | 2 +- vue-client/src/components/mixins/item-mixin.vue | 3 +++ vue-client/src/settings.js | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/vue-client/src/components/mixins/form-mixin.vue b/vue-client/src/components/mixins/form-mixin.vue index 60fe47a49..a56f97a3e 100644 --- a/vue-client/src/components/mixins/form-mixin.vue +++ b/vue-client/src/components/mixins/form-mixin.vue @@ -57,7 +57,7 @@ export default { return VocabUtil.getRecordType(this.formType, this.resources.vocab, this.resources.context); }, showTypeChanger() { - if (this.settings.showTypeChangerFor.includes(this.recordType) || this.isMainEntityForm) { + if (this.settings.showTypeChangerFor.includes(this.recordType) || this.settings.showTypeChangerFor.includes(this.inClassAndProperty) || this.isMainEntityForm) { return true; } return false; diff --git a/vue-client/src/components/mixins/item-mixin.vue b/vue-client/src/components/mixins/item-mixin.vue index ce9e1132e..a431706aa 100644 --- a/vue-client/src/components/mixins/item-mixin.vue +++ b/vue-client/src/components/mixins/item-mixin.vue @@ -86,6 +86,9 @@ export default { } return `${this.parentPath}`; }, + inClassAndProperty() { + return `${this.entityType}.${this.fieldKey}`; + }, extractedMainEntity() { const cleanObj = DataUtil.removeNullValues(this.focusData); if (VocabUtil.isSubClassOf(this.focusData['@type'], 'Work', this.resources.vocabClasses, this.resources.context)) { diff --git a/vue-client/src/settings.js b/vue-client/src/settings.js index 97a15bf74..5b19c7eea 100644 --- a/vue-client/src/settings.js +++ b/vue-client/src/settings.js @@ -35,6 +35,7 @@ export default { 'Work', 'PlaceholderRecord', 'CacheRecord', + 'ComplexSubject.termComponentList' ], keysToClear: { duplication: [ From 0f6e7dff697bb398a8a51ac6378b9b092e2a61ff Mon Sep 17 00:00:00 2001 From: klngwll Date: Tue, 7 Dec 2021 07:58:45 +0100 Subject: [PATCH 02/38] Add draft for manuscript template --- .../src/resources/json/combinedTemplates.json | 202 ++++++++++++++++++ 1 file changed, 202 insertions(+) diff --git a/vue-client/src/resources/json/combinedTemplates.json b/vue-client/src/resources/json/combinedTemplates.json index a65287f08..c3a67bb3b 100644 --- a/vue-client/src/resources/json/combinedTemplates.json +++ b/vue-client/src/resources/json/combinedTemplates.json @@ -964,6 +964,208 @@ } } }, + "manuscriptdMonographText": { + "label": "Handskrift", + "description": "Handskrift monografi - RDA", + "value": { + "record": { + "@id": "https://id.kb.se/TEMPID", + "@type": "Record", + "mainEntity": { + "@id": "https://id.kb.se/TEMPID#it" + }, + "bibliography": [], + "descriptionConventions": [ + { + "@id": "https://id.kb.se/marc/Isbd" + }, + { + "@type": "DescriptionConventions", + "code": "rda" + } + ], + "descriptionLanguage": { + "@id": "https://id.kb.se/language/swe" + }, + "encodingLevel": "marc:AbbreviatedLevel", + "marc:catalogingSource": { + "@id": "https://id.kb.se/marc/CooperativeCatalogingProgram" + } + }, + "mainEntity": { + "@id": "https://id.kb.se/TEMPID#it", + "@type": "Manuscript", + "issuanceType": "Monograph", + "hasTitle": [ + { + "@type": "Title", + "mainTitle": "", + "subtitle": "" + } + ], + "responsibilityStatement": "", + "marc:primaryProvisionActivity": { + "@type": "PrimaryProduction", + "country": { + "@id": "https://id.kb.se/country/sw" + }, + "marc:publicationStatus": "marc:QuestionableDate", + "otherYear": "", + "year": "" + }, + "production": [ + { + "@type": "Production", + "agent": { + "@type": "Agent", + "label": [ + "" + ] + }, + "date": [ + "" + ], + "place": [ + { + "@type": "Place", + "label": [ + "" + ] + } + ] + } + ], + "mediaType": [{"@id": "https://id.kb.se/term/rda/Unmediated"}], + "carrierType": [{"@id": "https://id.kb.se/term/rda/Volume"}], + "baseMaterial": [ + { + "@type": "BaseMaterial", + "label": [ + "papper" + ] + } + ], + "extent": [ + { + "@type": "Extent", + "label": "" + } + ], + "physicalDetailsNote": "illustrationer", + "productionMethod": [ + { + "@type": "ProductionMethod", + "label": [ + "handskrift" + ] + } + ], + "hasDimensions": { + "@type": "Dimensions", + "label": "" + }, + "hasNote": [ + { + "@type": "Note", + "label": [ + "Ingår i KB:s handskriftssamling" + ] + }, + { + "@type": "Note", + "label": "" + } + ], + "instanceOf": { + "@type": "Text", + "language": [ + { + "@id": "https://id.kb.se/language/swe" + } + ], + "genreForm": [ + { + "@id": "https://id.kb.se/term/saogf/Handskrifter" + } + ], + "contribution": [ + { + "@type": "PrimaryContribution", + "agent": null, + "role": [ + { + "@id": "https://id.kb.se/relator/author" + } + ] + }, + { + "@type": "Contribution", + "agent": null, + "role": [ + { + "@id": "https://id.kb.se/relator/author" + } + ] + }, + { + "@type": "Contribution", + "agent": null, + "role": [ + { + "@id": "https://id.kb.se/relator/unspecifiedContributor" + } + ] + } + ], + "contentType": [ + { + "@id": "https://id.kb.se/term/rda/Text" + } + ], + "hasNote": [ + { + "@type": "marc:LanguageNote", + "label": "" + } + ], + "subject": [ + { + "@type": "Person", + "familyName": "", + "givenName": "", + "lifeSpan": "" + }, + { + "@type": "ComplexSubject", + "inScheme": { + "@id": "https://id.kb.se/term/sao" + }, + "termComponentList": [ + { + "@type": "Geographic", + "prefLabel": "" + }, + { + "@type": "GeographicSubdivision", + "prefLabel": "" + }, + { + "@type": "GeographicSubdivision", + "prefLabel": "" + } + ] + } + ], + "summary": [ + { + "@type": "Summary", + "label": [""] + } + ] + } + } + } + }, "movie": { "label": "Film", "description": "Videoinspelning - RDA", From ba9a3a89b8211641b9f04c913aa7ac239a3b215d Mon Sep 17 00:00:00 2001 From: klngwll Date: Tue, 7 Dec 2021 21:58:05 +0100 Subject: [PATCH 03/38] Add linked baseMaterial --- vue-client/src/resources/json/combinedTemplates.json | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/vue-client/src/resources/json/combinedTemplates.json b/vue-client/src/resources/json/combinedTemplates.json index c3a67bb3b..53809a006 100644 --- a/vue-client/src/resources/json/combinedTemplates.json +++ b/vue-client/src/resources/json/combinedTemplates.json @@ -964,7 +964,7 @@ } } }, - "manuscriptdMonographText": { + "manuscriptMonographText": { "label": "Handskrift", "description": "Handskrift monografi - RDA", "value": { @@ -1035,16 +1035,8 @@ ] } ], - "mediaType": [{"@id": "https://id.kb.se/term/rda/Unmediated"}], "carrierType": [{"@id": "https://id.kb.se/term/rda/Volume"}], - "baseMaterial": [ - { - "@type": "BaseMaterial", - "label": [ - "papper" - ] - } - ], + "baseMaterial": [{"@id": "https://id.kb.se/term/rda/material/Paper"}], "extent": [ { "@type": "Extent", From 553afc7c730eb82920851428679d6f16472db2f7 Mon Sep 17 00:00:00 2001 From: Ola Blissing Date: Wed, 15 Dec 2021 15:29:35 +0100 Subject: [PATCH 04/38] Fix changelog wrapping behaviour --- vue-client/src/components/inspector/breadcrumb.vue | 2 +- .../src/components/inspector/entity-changelog.vue | 13 +++++++++++++ vue-client/src/views/Inspector.vue | 14 ++------------ 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/vue-client/src/components/inspector/breadcrumb.vue b/vue-client/src/components/inspector/breadcrumb.vue index d8a33c1ff..753ff7f77 100644 --- a/vue-client/src/components/inspector/breadcrumb.vue +++ b/vue-client/src/components/inspector/breadcrumb.vue @@ -177,7 +177,7 @@ export default { display: flex; flex-wrap: wrap; justify-content: space-between; - margin: 0 0 30px 0; + margin: 0 0 0.5em 0; &-recordNumbers { } diff --git a/vue-client/src/components/inspector/entity-changelog.vue b/vue-client/src/components/inspector/entity-changelog.vue index 9d619ec1b..f3fc70d51 100644 --- a/vue-client/src/components/inspector/entity-changelog.vue +++ b/vue-client/src/components/inspector/entity-changelog.vue @@ -66,6 +66,7 @@ export default { flex-direction: column; @media (min-width: @screen-md-min) { flex-direction: row; + flex-wrap: wrap; } &-unknown { @media (min-width: @screen-md-min) { @@ -74,10 +75,22 @@ export default { } &-item { display: flex; + flex-direction: column; + margin-bottom: 0.5em; + @media (min-width: @screen-sm-min) { + margin-bottom: 0.25em; + flex-direction: row; + } } &-key { margin-right: 0.5em; } + &-value { + word-break: break-word; + @media (min-width: @screen-sm-min) { + word-break: unset; + } + } } diff --git a/vue-client/src/views/Inspector.vue b/vue-client/src/views/Inspector.vue index ec2c6c015..f57a9fcdd 100644 --- a/vue-client/src/views/Inspector.vue +++ b/vue-client/src/views/Inspector.vue @@ -934,8 +934,8 @@ export default { {{ recordType | labelByLang }} {{ "New record" | translatePhrase }} - + Date: Wed, 15 Dec 2021 16:00:02 +0100 Subject: [PATCH 05/38] Lint --- vue-client/src/settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vue-client/src/settings.js b/vue-client/src/settings.js index 5b19c7eea..28eb322c0 100644 --- a/vue-client/src/settings.js +++ b/vue-client/src/settings.js @@ -35,7 +35,7 @@ export default { 'Work', 'PlaceholderRecord', 'CacheRecord', - 'ComplexSubject.termComponentList' + 'ComplexSubject.termComponentList', ], keysToClear: { duplication: [ From 6cd73eaf3f92e51fed6ec05feb5d9c00b3eccdde Mon Sep 17 00:00:00 2001 From: Ola Blissing Date: Wed, 15 Dec 2021 16:59:07 +0100 Subject: [PATCH 06/38] Make entity-summary more responsive --- .../src/components/inspector/entity-header.vue | 5 ++++- .../components/search/panel-search-item.vue | 4 +++- .../src/components/shared/entity-summary.vue | 18 +++++++++++++----- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/vue-client/src/components/inspector/entity-header.vue b/vue-client/src/components/inspector/entity-header.vue index fe9258f36..36424de6c 100644 --- a/vue-client/src/components/inspector/entity-header.vue +++ b/vue-client/src/components/inspector/entity-header.vue @@ -148,7 +148,10 @@ export default { display: flex; border: 1px solid @grey-lighter; border-radius: 4px; - padding: 0.5em 1em 0.25em 1em; + padding: 0.5em; + @media (min-width: @screen-sm-min) { + padding: 0.5em 1em 0.25em 1em; + } &-body { &.is-full { diff --git a/vue-client/src/components/search/panel-search-item.vue b/vue-client/src/components/search/panel-search-item.vue index 24202810b..f466f7078 100644 --- a/vue-client/src/components/search/panel-search-item.vue +++ b/vue-client/src/components/search/panel-search-item.vue @@ -157,7 +157,9 @@ export default { &-listItem { .EntitySummary-detailsKey { - flex-basis: 8em; + @media (min-width: @screen-sm-min) { + flex-basis: 8em; + } } &.is-added, diff --git a/vue-client/src/components/shared/entity-summary.vue b/vue-client/src/components/shared/entity-summary.vue index cba3751db..ec08af20e 100644 --- a/vue-client/src/components/shared/entity-summary.vue +++ b/vue-client/src/components/shared/entity-summary.vue @@ -532,13 +532,19 @@ export default { &-detailsItem { display: flex; + flex-direction: column; min-width: 0; font-size: 1.4rem; - padding: 0.2rem 0; + @media (min-width: @screen-sm-min) { + padding: 0.2rem 0; + flex-direction: row; + } } &-detailsKey { - flex-basis: 6em; + @media (min-width: @screen-sm-min) { + flex-basis: 6em; + } flex-grow: 1; font-weight: 600; margin-right: 0.5em; @@ -549,11 +555,13 @@ export default { } &-detailsValue { - flex-basis: 75%; - flex-grow: 2; + @media (min-width: @screen-sm-min) { + flex-basis: 75%; + flex-grow: 2; + align-self: flex-end; + } color: #000; white-space: nowrap; - align-self: flex-end; overflow-x: hidden; text-overflow: ellipsis; } From 64c0a81f027e8afb73c44f20c8450150b9c538a2 Mon Sep 17 00:00:00 2001 From: Ola Blissing Date: Thu, 16 Dec 2021 12:41:43 +0100 Subject: [PATCH 07/38] Add wildcard to development gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d85d8417d..0c5093fa7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # Local App Config -vue-client/.env.development +vue-client/.env.development* # Common OS, Tool and Editor Files .vscode/* From 1b82ab08c6c26f981375b5bbe4720463e461bc32 Mon Sep 17 00:00:00 2001 From: Ola Blissing Date: Tue, 21 Dec 2021 09:27:37 +0100 Subject: [PATCH 08/38] Updated caniuse --- vue-client/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vue-client/yarn.lock b/vue-client/yarn.lock index 7086391d8..1792c8cc9 100644 --- a/vue-client/yarn.lock +++ b/vue-client/yarn.lock @@ -2649,9 +2649,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001265: - version "1.0.30001270" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001270.tgz#cc9c37a4ec5c1a8d616fc7bace902bb053b0cdea" - integrity sha512-TcIC7AyNWXhcOmv2KftOl1ShFAaHQYcB/EPL/hEyMrcS7ZX0/DvV1aoy6BzV0+16wTpoAyTMGDNAJfSqS/rz7A== + version "1.0.30001291" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001291.tgz" + integrity sha512-roMV5V0HNGgJ88s42eE70sstqGW/gwFndosYrikHthw98N5tLnOTxFqMLQjZVRxTWFlJ4rn+MsgXrR7MDPY4jA== capture-exit@^1.2.0: version "1.2.0" From 6f9123f9ca80cb8a94bc1a613c0345c43c1e5cad Mon Sep 17 00:00:00 2001 From: Ola Blissing Date: Tue, 21 Dec 2021 10:34:43 +0100 Subject: [PATCH 09/38] Adjust layout for search-bar --- .../src/components/layout/search-bar.vue | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/vue-client/src/components/layout/search-bar.vue b/vue-client/src/components/layout/search-bar.vue index 3c243f808..c6df256d4 100644 --- a/vue-client/src/components/layout/search-bar.vue +++ b/vue-client/src/components/layout/search-bar.vue @@ -47,12 +47,12 @@ export default {