Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • Experimental/Bugfixes
  • Hotfix/1129-fixValidation
  • Hotfix/1140-fixFixedValues
  • Hotfix/1142-fixFixedValues
  • Hotfix/1197-Datepicker
  • Hotfix/1216-fixDateDesign
  • Hotfix/2233-fixMe
  • Hotfix/2258-saveButtonWorksAsExpected
  • Hotfix/2296-selectedValuesNotReturned
  • Hotfix/2417-emptyMetadataValidation
  • Hotfix/2504-formGen
  • Hotfix/2504-formGenerator
  • Hotfix/2681-validationErrors
  • Hotfix/2955-storingFail
  • Hotfix/2957-styleAndUpgrade
  • Hotfix/845-someUIChanges
  • Hotfix/920-multiSelect
  • Hotfix/xxxx-infiniteLoops
  • Hotfix/xxxx-nodePath
  • Hotfix/xxxx-notEmptyFields
  • Issue/1607-dateTimeOffset
  • Issue/1607-newDateTimeOffset
  • Issue/1804-fixedValueFix
  • Issue/1804-fixedValueFixOld
  • Issue/1826-versioning
  • Issue/1938-internalHandling
  • Issue/1987-shIn
  • Issue/2002-migrateResourceCreate
  • Issue/2035-rcv
  • Issue/2117-ProjectandResourceCreateInfoIcons
  • Issue/2139-detailViewing
  • Issue/2262-frontendWorkspace
  • Issue/2309-docs
  • Issue/2318-fixedValuesFix
  • Issue/2341-description
  • Issue/2345-dealWithWeirdLists
  • Issue/2353-dropShapeFix
  • Issue/2408-hasValue
  • Issue/2435-userApi
  • Issue/2516-validationUpdate
  • Issue/2525-fixedFixValues
  • Issue/2551-enhanceSymbolDescriptionsInApplicationProfile
  • Issue/2598-vue3
  • Issue/2703-vocabularyList
  • Issue/2729-fixSlowLoadingOfInstances
  • Issue/2759-showMissingField
  • Issue/2804-templateUI
  • Issue/2805-ignoreTemplatingValues
  • Issue/2851-fixBooleanInFormGenerator
  • Issue/2920-fixRemovingValues
  • Issue/2943-uiFeedback
  • Issue/2960-fixValidationForAP
  • Issue/2960-infiniteLoop
  • Issue/43-saveButton
  • Issue/xxxx-correctTargetClass
  • Issue/xxxx-extensions
  • Issue/xxxx-infiniteLoop
  • Issue/xxxx-instances
  • Issue/xxxx-optimizedBuild
  • Issue/xxxx-reduceBootstrapVueBundle
  • Product/1107-frontendPerformance
  • Product/1210-inheritance
  • Product/1215-gitlabCleanUp
  • Product/1532-formGeneratorFeatures
  • Product/1573-ReadOnlyResources
  • Product/1576-formGeneratorMultiselect
  • Product/510-niceProjectUrl
  • Product/619-clientValidation
  • Product/791-uiAdaptions
  • Product/801-refactorFileMetadata
  • Product/815-cleanupApplicationProfiles
  • Sprint/2020-09
  • Sprint/2020-10
  • Sprint/2020-11
  • Sprint/2020-12
  • Sprint/2020-13
  • Sprint/2020-14
  • Sprint/2020-18
  • Sprint/2020-19
  • Sprint/2021-12
  • Sprint/2021-13
  • Sprint/2021-14
  • Sprint/2021-15
  • Sprint/2021-2022
  • Sprint/2021-22
  • Sprint/2022-01
  • Test/vue-demi
  • Topic/1065-clientValidation
  • Topic/1227-frontendPerformance
  • Topic/1229-inheritance
  • Topic/1533-formGeneratorCleanup
  • Topic/1535-formGeneratorMultiselect
  • Topic/1535-linting
  • Topic/795-uiAdaptions
  • Topic/804-niceProjectUrl
  • Topic/846-cleanupApplicationProfiles
  • Topic/853-refactorFileMetadataFE
  • dev
  • gitkeep
  • gitpod
  • v1.0.0
  • v1.1.0
  • v1.10.0
  • v1.10.1
  • v1.10.2
  • v1.11.0
  • v1.12.0
  • v1.13.0
  • v1.14.0
  • v1.15.0
  • v1.15.1
  • v1.16.0
  • v1.17.0
  • v1.18.0
  • v1.2.0
  • v1.3.0
  • v1.3.1
  • v1.3.2
  • v1.3.3
  • v1.4.0
  • v1.5.0
  • v1.6.0
  • v1.7.0
  • v1.8.0
  • v1.8.1
  • v1.8.2
  • v1.8.3
  • v1.8.4
  • v1.9.0
  • v1.9.1
  • v1.9.2
  • v1.9.3
  • v2.0.0
  • v2.1.0
  • v3.0.0
  • v3.0.1
  • v3.0.10
  • v3.0.11
  • v3.0.12
  • v3.0.2
  • v3.0.3
  • v3.0.4
  • v3.0.5
  • v3.0.6
  • v3.0.7
  • v3.0.8
  • v3.0.9
  • v3.1.0
  • v3.1.1
  • v3.1.2
  • v3.1.3
  • v3.1.4
  • v3.2.0
  • v3.2.1
  • v3.2.2
  • v3.3.0
  • v3.4.0
  • v3.5.0
  • v3.5.1
  • v3.5.2
  • v3.5.3
  • v3.5.4
  • v3.5.5
  • v3.5.6
  • v3.5.7
  • v3.6.0
  • v3.6.1
  • v3.6.2
  • v3.6.3
  • v4.0.0
  • v4.0.1
  • v4.0.2
  • v4.0.3
  • v4.0.4
  • v4.0.5
175 results

Target

Select target project
  • coscine/frontend/libraries/form-generator
1 result
Select Git revision
  • Experimental/Bugfixes
  • Hotfix/1129-fixValidation
  • Hotfix/1140-fixFixedValues
  • Hotfix/1142-fixFixedValues
  • Hotfix/1197-Datepicker
  • Hotfix/1216-fixDateDesign
  • Hotfix/2233-fixMe
  • Hotfix/2258-saveButtonWorksAsExpected
  • Hotfix/2296-selectedValuesNotReturned
  • Hotfix/2417-emptyMetadataValidation
  • Hotfix/2504-formGen
  • Hotfix/2504-formGenerator
  • Hotfix/2681-validationErrors
  • Hotfix/2955-storingFail
  • Hotfix/2957-styleAndUpgrade
  • Hotfix/845-someUIChanges
  • Hotfix/920-multiSelect
  • Hotfix/xxxx-infiniteLoops
  • Hotfix/xxxx-nodePath
  • Hotfix/xxxx-notEmptyFields
  • Issue/1607-dateTimeOffset
  • Issue/1607-newDateTimeOffset
  • Issue/1804-fixedValueFix
  • Issue/1804-fixedValueFixOld
  • Issue/1826-versioning
  • Issue/1938-internalHandling
  • Issue/1987-shIn
  • Issue/2002-migrateResourceCreate
  • Issue/2035-rcv
  • Issue/2117-ProjectandResourceCreateInfoIcons
  • Issue/2139-detailViewing
  • Issue/2262-frontendWorkspace
  • Issue/2309-docs
  • Issue/2318-fixedValuesFix
  • Issue/2341-description
  • Issue/2345-dealWithWeirdLists
  • Issue/2353-dropShapeFix
  • Issue/2408-hasValue
  • Issue/2435-userApi
  • Issue/2516-validationUpdate
  • Issue/2525-fixedFixValues
  • Issue/2551-enhanceSymbolDescriptionsInApplicationProfile
  • Issue/2598-vue3
  • Issue/2703-vocabularyList
  • Issue/2729-fixSlowLoadingOfInstances
  • Issue/2759-showMissingField
  • Issue/2804-templateUI
  • Issue/2805-ignoreTemplatingValues
  • Issue/2851-fixBooleanInFormGenerator
  • Issue/2920-fixRemovingValues
  • Issue/2943-uiFeedback
  • Issue/2960-fixValidationForAP
  • Issue/2960-infiniteLoop
  • Issue/43-saveButton
  • Issue/xxxx-correctTargetClass
  • Issue/xxxx-extensions
  • Issue/xxxx-infiniteLoop
  • Issue/xxxx-instances
  • Issue/xxxx-optimizedBuild
  • Issue/xxxx-reduceBootstrapVueBundle
  • Product/1107-frontendPerformance
  • Product/1210-inheritance
  • Product/1215-gitlabCleanUp
  • Product/1532-formGeneratorFeatures
  • Product/1573-ReadOnlyResources
  • Product/1576-formGeneratorMultiselect
  • Product/510-niceProjectUrl
  • Product/619-clientValidation
  • Product/791-uiAdaptions
  • Product/801-refactorFileMetadata
  • Product/815-cleanupApplicationProfiles
  • Sprint/2020-09
  • Sprint/2020-10
  • Sprint/2020-11
  • Sprint/2020-12
  • Sprint/2020-13
  • Sprint/2020-14
  • Sprint/2020-18
  • Sprint/2020-19
  • Sprint/2021-12
  • Sprint/2021-13
  • Sprint/2021-14
  • Sprint/2021-15
  • Sprint/2021-2022
  • Sprint/2021-22
  • Sprint/2022-01
  • Test/vue-demi
  • Topic/1065-clientValidation
  • Topic/1227-frontendPerformance
  • Topic/1229-inheritance
  • Topic/1533-formGeneratorCleanup
  • Topic/1535-formGeneratorMultiselect
  • Topic/1535-linting
  • Topic/795-uiAdaptions
  • Topic/804-niceProjectUrl
  • Topic/846-cleanupApplicationProfiles
  • Topic/853-refactorFileMetadataFE
  • dev
  • gitkeep
  • gitpod
  • v1.0.0
  • v1.1.0
  • v1.10.0
  • v1.10.1
  • v1.10.2
  • v1.11.0
  • v1.12.0
  • v1.13.0
  • v1.14.0
  • v1.15.0
  • v1.15.1
  • v1.16.0
  • v1.17.0
  • v1.18.0
  • v1.2.0
  • v1.3.0
  • v1.3.1
  • v1.3.2
  • v1.3.3
  • v1.4.0
  • v1.5.0
  • v1.6.0
  • v1.7.0
  • v1.8.0
  • v1.8.1
  • v1.8.2
  • v1.8.3
  • v1.8.4
  • v1.9.0
  • v1.9.1
  • v1.9.2
  • v1.9.3
  • v2.0.0
  • v2.1.0
  • v3.0.0
  • v3.0.1
  • v3.0.10
  • v3.0.11
  • v3.0.12
  • v3.0.2
  • v3.0.3
  • v3.0.4
  • v3.0.5
  • v3.0.6
  • v3.0.7
  • v3.0.8
  • v3.0.9
  • v3.1.0
  • v3.1.1
  • v3.1.2
  • v3.1.3
  • v3.1.4
  • v3.2.0
  • v3.2.1
  • v3.2.2
  • v3.3.0
  • v3.4.0
  • v3.5.0
  • v3.5.1
  • v3.5.2
  • v3.5.3
  • v3.5.4
  • v3.5.5
  • v3.5.6
  • v3.5.7
  • v3.6.0
  • v3.6.1
  • v3.6.2
  • v3.6.3
  • v4.0.0
  • v4.0.1
  • v4.0.2
  • v4.0.3
  • v4.0.4
  • v4.0.5
175 results
Show changes
Commits on Source (5)
{
"name": "@coscine/form-generator",
"version": "4.0.4",
"version": "4.0.5",
"main": "./dist/index.js",
"module": "./dist/index.js",
"browser": "./dist/index.js",
......
......@@ -8,8 +8,13 @@ import {
dataCite,
dropShapeAnalysis,
listApplicationProfile,
radarAP,
} from '@/data/example/applicationProfile';
import { dataCiteApFixed, listFixedValues } from '@/data/example/fixedValues';
import {
dataCiteApFixed,
listFixedValues,
radar,
} from '@/data/example/fixedValues';
import {
dataCiteMetadata,
dropShapeAnalysisMetadata,
......@@ -328,4 +333,50 @@ describe('FormGenerator.vue', () => {
expect(wrapper.find('.invisible').exists()).toBeFalsy();
});
/*Checks for correct functionality of removing the fixed values */
test('dataCiteApFixed', async () => {
const wrapper = mount(FormGenerator, {
propsData: {
fixedValues: radar,
selectedShape: 'https://purl.org/coscine/ap/radar/',
shapes: radarAP,
shapesMimeType: 'text/turtle',
},
});
await wrapper.vm.$nextTick();
// Wait for 2 seconds until everything is set up
await sleep(2000);
const allTextFields = wrapper.findAllComponents({ name: 'InputTextField' });
// Default value has been set
const defaultTitleField = allTextFields.filter(
(entry) => entry.vm?.$data?.object?.value === 'TestTitle',
);
expect(defaultTitleField.length).toBe(1);
// Remove the value and set to empty field
if (defaultTitleField.length > 0) {
const titleFieldVm = defaultTitleField[0].vm;
titleFieldVm.$data.object.value = ''; // clear the value
await wrapper.vm.$nextTick();
}
// Check if fixedValues is defined and not null
const fixedValues = wrapper.vm.$props.fixedValues;
expect(fixedValues).toBeDefined();
// Check if the specific property exists before accessing it
if (fixedValues) {
expect(
fixedValues['http://purl.org/dc/terms/title'][
'https://purl.org/coscine/defaultValue'
]?.length === 0,
);
}
});
});
......@@ -136,6 +136,7 @@ export const useFixedValues = (
nodeName: string,
) => {
const currentFixedValueObject = getClonedFixedValueObject(nodeName);
setIndividualFixedValue(
currentFixedValueObject,
InvisibleFixedValue,
......@@ -151,16 +152,27 @@ export const useFixedValues = (
DefaultFixedValue,
fixedFixedValue,
);
if (
defaultFixedValue.length === 0 &&
fixedFixedValue.length === 0 &&
values.value.every((entry) => entry.value === '')
) {
currentFixedValueObject[DefaultFixedValue] = [];
} else {
setIndividualFixedValue(
currentFixedValueObject,
DefaultFixedValue,
defaultFixedValue,
);
}
removeIndividualFixedValue(
currentFixedValueObject,
FixedFixedValue,
defaultFixedValue,
);
inputFixedValues(currentFixedValueObject, nodeName);
};
......
......@@ -413,3 +413,92 @@ _:autos41 rdf:first "Other";
sh:name "Author Identifier"@en ;
sh:order 12 ;
sh:path <http://purl.org/spar/datacite/AgentIdentifier>].`;
export const radarAP = `@base <https://purl.org/coscine/ap/radar/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix coscineradar: <https://purl.org/coscine/ap/radar#> .
<https://purl.org/coscine/ap/radar/>
dcterms:license <http://spdx.org/licenses/MIT> ;
dcterms:publisher <https://itc.rwth-aachen.de/> ;
dcterms:rights "Copyright © 2020 IT Center, RWTH Aachen University" ;
dcterms:title "radar application profile"@en ;
dcterms:description "The RADAR metadata schema v09 was created by the 2018 FIZ Karlsruhe - Leibniz-Institut fuer Informationsinfrastruktur GmbH and has been published under CC BY 4.0." ;
a sh:NodeShape ;
sh:targetClass <https://purl.org/coscine/ap/radar/> ;
sh:closed true ; # no additional properties are allowed
sh:property [
sh:path rdf:type ;
] ;
sh:property coscineradar:creator ;
sh:property coscineradar:title ;
sh:property coscineradar:created ;
sh:property coscineradar:subject ;
sh:property coscineradar:type ;
sh:property coscineradar:rights ;
sh:property coscineradar:rightsHolder .
coscineradar:creator
sh:path dcterms:creator ;
sh:order 0 ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:minLength 1 ;
sh:datatype xsd:string ;
sh:defaultValue "{ME}" ;
sh:name "Creator"@en, "Ersteller"@de .
coscineradar:title
sh:path dcterms:title ;
sh:order 1 ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:minLength 1 ;
sh:datatype xsd:string ;
sh:name "Title"@en, "Titel"@de .
coscineradar:created
sh:path dcterms:created ;
sh:order 2 ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:datatype xsd:date ;
sh:defaultValue "{TODAY}" ;
sh:name "Production Date"@en, "Erstelldatum"@de .
coscineradar:subject
sh:path dcterms:subject ;
sh:order 3 ;
sh:maxCount 1 ;
sh:name "Subject Area"@en, "Fachrichtung"@de ;
sh:class <http://www.dfg.de/dfg_profil/gremien/fachkollegien/faecher/> .
coscineradar:type
sh:path dcterms:type ;
sh:order 4 ;
sh:maxCount 1 ;
sh:name "Resource"@en, "Ressource"@de ;
sh:class <http://purl.org/dc/dcmitype/> .
coscineradar:rights
sh:path dcterms:rights ;
sh:order 5 ;
sh:maxCount 1 ;
sh:datatype xsd:string ;
sh:name "Rights"@en, "Berechtigung"@de .
coscineradar:rightsHolder
sh:path dcterms:rightsHolder ;
sh:order 6 ;
sh:maxCount 1 ;
sh:datatype xsd:string ;
sh:name "Rightsholder"@en, "Rechteinhaber"@de .`;
......@@ -276,3 +276,71 @@ export const dataCiteApFixed = {
],
},
} satisfies FixedValues;
export const radar = {
'http://purl.org/dc/terms/creator': {
[DefaultFixedValue]: [
{
value: '{ME}',
type: 'literal',
datatype: 'http://www.w3.org/2001/XMLSchema#string',
targetClass: 'https://purl.org/coscine/ap/radar/',
},
],
[FixedFixedValue]: [],
[InvisibleFixedValue]: [
{
value: '0',
type: 'literal',
targetClass: 'https://purl.org/coscine/ap/radar/',
},
],
},
'http://purl.org/dc/terms/created': {
[DefaultFixedValue]: [
{
value: '2024-07-30',
type: 'literal',
datatype: 'http://www.w3.org/2001/XMLSchema#date',
targetClass: 'https://purl.org/coscine/ap/radar/',
},
],
[FixedFixedValue]: [],
[InvisibleFixedValue]: [
{
value: '0',
type: 'literal',
targetClass: 'https://purl.org/coscine/ap/radar/',
},
],
},
'http://purl.org/dc/terms/title': {
[DefaultFixedValue]: [
{
value: 'TestTitle',
type: 'literal',
datatype: 'http://www.w3.org/2001/XMLSchema#string',
targetClass: 'https://purl.org/coscine/ap/radar/',
},
],
[FixedFixedValue]: [],
[InvisibleFixedValue]: [
{
value: '0',
type: 'literal',
targetClass: 'https://purl.org/coscine/ap/radar/',
},
],
},
'http://purl.org/dc/terms/rights': {
[DefaultFixedValue]: [],
[FixedFixedValue]: [],
[InvisibleFixedValue]: [
{
value: '0',
type: 'literal',
targetClass: 'https://purl.org/coscine/ap/radar/',
},
],
},
} satisfies FixedValues;