Coder Social home page Coder Social logo

describo / crate-builder-component Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 2.0 14.39 MB

A VueJS UI component to build an RO-Crate

License: MIT License

JavaScript 62.07% Vue 36.95% HTML 0.27% CSS 0.67% Shell 0.03%
ro-crate describo research-object jsonld rocrate metadata-editor vue-component schema-org

crate-builder-component's People

Contributors

beepsoft avatar csontosreka avatar marcolarosa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

crate-builder-component's Issues

The behavior of entering a URL into Text-type fields is strange

In a regular Text-type field, it is possible to enter a URL. In this case, upon the first save, the field appears as Text, with a text input box, a green checkmark next to it, and a red trash can icon.

image

If someone clicks on the green checkmark, it will become an attached URL with its controls, while the text input box remains.

image

Through some interaction, my colleague managed to add a URL without a removal field, which could only be deleted by selecting the entity and using its page.

image

Once a URL is attached like this, the text input field only accepts URLs and indicates if the format provided deviates from it.

image

AutoComplete closing before being able to select item or click "Create new ..." button

This actually happens when using the component in https://github.com/describo/crate-builder-component-react but I don't think it is react (or web component) related.

Here I try to add a new "Dataset Contact". When I start to type the name the autocomplete items and the "Create new" button appears, however it quickly closes afterwards and so I am unable to click any of the items or the "Create new" button. After some trials it sometimes stays on screen (as in the gif) below, but it is just pure luck.

Do you have any what could cause this or how to workaround?

screencast-docs google com-2023 03 24-14_23_08

Profile inconsistencies with overriden values

I have created a use case for this issue in the development app here:

https://github.com/dsd-sztaki-hu/crate-builder-component/tree/file-profile-problem

Use the "Single file" crate and the "A profile for single-file.json test".

Here's the problem I found. I have this crate with a single File:

{
  "@context": [
    "https://w3id.org/ro/crate/1.1/context",
    {
      "@vocab": "http://schema.org/"
    },
    {
      "txc": {
        "@id": "http://purl.archive.org/textcommons/terms#"
      }
    },
    {
      "@base": null
    }
  ],
  "@graph": [
    {
      "@id": "ro-crate-metadata.json",
      "@type": "CreativeWork",
      "conformsTo": {
        "@id": "https://w3id.org/ro/crate/1.1"
      },
      "about": {
        "@id": "./"
      }
    },
    {
      "@id": "./",
      "@type": [
        "Dataset"
      ],
      "name": "./",
      "hasPart": {
        "@id": "Some file"
      }
    },
    {
      "@id": "Some file",
      "@type": [
        "File"
      ],
      "name": "Some file",
      "@reverse": {
        "hasPart": {
          "@id": "./"
        }
      }
    }
  ]
}

I try to use it with this profile:

{
    "metadata": {
        "name": "A profile for single-file.json test",
        "description": "",
        "version": 0.1,
        "warnMissingProperty": true
    },
    "classes": {
        "Dataset": {
            "definition": "override",
            "subClassOf": [],
            "inputs": [
                {
                    "id": "https://schema.org/text",
                    "name": "text",
                    "label": "text",
                    "help": "help message",
                    "required": true,
                    "multiple": true,
                    "type": ["Text"]
                },
                {
                    "name": "encodingFormat",
                    "label": "Encoding format from profile in Dataset",
                    "help": "Encoding format help from profile",
                    "type": [
                        "URL",
                        "Text"
                    ],
                    "required": true,
                    "multiple": false
                }
            ]
        },
        "File":{
            "definition": "override",
            "subClassOf": [],
            "inputs": [
                {
                    "name": "contentSize",
                    "label": "Content size from profile",
                    "help": "Content size help from profile",
                    "type": [
                        "Text"
                    ],
                    "required": true,
                    "multiple": false
                },
                {
                    "name": "encodingFormat",
                    "label": "Encoding format from profile in File",
                    "help": "Encoding format help from profile",
                    "type": [
                        "URL",
                        "Text"
                    ],
                    "required": true,
                    "multiple": false
                },
                {
                    "name": "description",
                    "label": "Description from profile",
                    "help": "Description help from profile",
                    "type": [
                        "Text"
                    ],
                    "required": false,
                    "multiple": false
                },
                {
                    "id":"http://nonschema.org/randomValue",
                    "name": "nonSchemaDotOrgValue",
                    "label": "Non schema dot org value",
                    "help": "Non schema dot org value help",
                    "type": [
                        "Text"
                    ],
                    "required": true,
                    "multiple": true
                }
            ]
        }
    }
}

Both the Dataset and the File class has encodingFormat property with the same input definition.

Now, when I try to edit this crate with this profile I can see an input for "encodingFormat" appear in the Dataset,

image

but not in File:

image

encodingFormat is part of schema.org. I also added contentSize and description to File class and I could override contentSize and have an input for it, but not for description just like with encodingFormat.

If I add an explicit schema.org id to the input definition, then it appears:

                {
                    "id": "http://schema.org/encodingFormat",
                    "name": "encodingFormat",
                    "label": "Encoding format from profile in File",
                    "help": "Encoding format help from profile",
                    "type": [
                        "URL",
                        "Text"
                    ],
                    "required": true,
                    "multiple": false
                },

How do you think this supposed to work?

I tested this with 0.38.3 but this behavior also appears in 0.37.2.

Why data binding only works one-way at top level?

I have tried using the crate-builder-component in a new simple Vue app and managed to get it running and displaying the crate data.
However I just found out that the crate data is bound only at top level.
For example, if you have data.crate = { ... } and pass it to :crate="data.crate", you can't do for example
data.crate['@graph'][7].name = 'abc' to update a value from outside of the compenent. And neither data.crate['@graph'][7].name is updated when the value in the text box is changed.
I know that we can use the @save:crate event to get the current/modified data.
But, is there a reason for not properly bound each nested property to its corresponding ui component?
It seems to be counterintuitive to how Vue component generally works.

Make "Add property" button optional

It would be great to have an option to make displaying the Add property button optional. In our application we want to control all user inputs via the Profile and don't want to support adding random properties via "Add".

I imagine something like this:

        <describo-crate-builder
            :enable-add-property="..."
        />

I can provide a PR for this if you agree.

Glitch when changing the name of the root dataset

With any crate, when changing the value of "Name" property under "About", the new value is properly update in the underlying data model. However, after switching tabs, for example from "About" to "Main" and then back to "About" again, the text box still displays the old value.

Entity Identifier that uses arcp protocol is not validated properly

When a crate has an entity that uses arcp protocol as its id, the validator library fails it, which causes it to create a whole bunch of new objects with id prefixed by #.
The main issue is with the validator library:

import { isURL as validatorIsURL } from "validator";
const urlProtocols = ["http", "https", "ftp", "ftps", "arcp"];

// this returns false
isURL('arcp://name,cooee-corpus/item/2-157', { require_protocol: true, protocols: urlProtocols });

// this returns true, so the isURL function only works for a strict URL, not URI such as arcp
isURL('arcp://namecooee-corpus.com/item/2-157', { require_protocol: true, protocols: urlProtocols });

If the id fails the validation check, the id will be replaced in this line entity["@id"] = `#${entity["@id"]}`;. From there, it will cause a different bigger problem especially when the data is big. A lot of new entities are being created which makes loading takes forever.
I think before a new entity is created and pushed, it should be checked first if there is already existing one.

Test data is attached here as zip file:
ro-crate-metadata.zip

ID generation based on Name could clash and result in invalid ro crate JSON

I tried to add two different entities: a Person and an Education level. When creating I named both "aaa". With this I ended up with two entities with the same "#aaa", or more precisely a Person entity with "#aaa" but both the Person and the Education level references this Person object, which is wrong. Here's a little video about it:

screencast-docs google com-2023 03 24-16_03_55

Wouldn't it be better to generate ID-s (eg. uuid) randomly and not based on the Name of the entity?

Or optionally a user provided callback function, which can provide the ID for a new entity. It may then decide to have an ID generated based on the name of there's no clash, or in case of clashing generating a randomized ID.

configuration.webComponent is undefined in AutoComplete.component.vue

Setting the webComponent configuration option doesn't seem to have effect anymore as the value of configuration.webComponent is always undefined here:

if (configuration.webComponent) {
data.selection = queryString;
}

I checked both in the Vue test app and in the web component build and in both cases the value of configuration.webComponent (and actually any configuration.* value, eg. configuration.language, is undefined).

As a result the autocomplete field is now always cleared because the web component related workaround in the above code is not run.

When editing field in a group the editor always jumps to the About group

Previously, when we edited a field value in a group the editor stayed at the currently selected group where the field was present, but now it always jumps back to the About group. This way the users always loose the editing context and need to go back to the group and find the field they want to edit.

describo-group-bug.webm

AutoCompoleteComponent fails when trying to reference dataPacks

I try to add a new entity like this:

Screen.Recording.2023-05-19.at.18.34.25.mov

And I get this error:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'dataPacks')

The problem seems to be with this newly added code, failing at line 136:

// wire up handler to lookup datapacks externally
if (props.crateManager.lookup.dataPacks) {
lookups.push(
wrapPromise(lookup.dataPacks(props.type, queryString), data.promiseTimeout, {
reason: "External Lookup Timeout",
})
);
lookupMapping.datapacks = lookups.length - 1;
}

I don't know if it is relevant, but in my app I don't have a lookup property defined and it worked before without it.

Add 'label' and 'help' to profile classes

Currently classes are defined with these 3 properties in a Describo Profile:

"classes": {
    "Dataset": {
        "definition": "override",
        "subClassOf": [],
        "inputs": [
            ... the properties a user can associate to this class
        ]
    }
}

The crate builder component then uses the class's name as found as the key in classes. For example, this raw class name is displayed in the context entity browser.

image

It would be great if we were able to specify a - translatable - label and help text for classes the same way we can for fields (inputs).

For example:

"classes": {
    ...
    "geographicCoverage": {
        "label": "Geographic coverage",
        "help": "Geographic details of the dataset",
        "definition": "override",
        "subClassOf": [],
        "inputs": [
            ... the properties a user can associate to this class
        ]
    }
}

Whenever the class's name is to be displayed to the user, the component would use the label if available, and falls back to the class's name if it is not. The help text could be shown, for example, whenever hovering the name of the class or some other places in the future.

Profile: input label is not used

It seems that label defined in inputs in a Profile is not used when displaying the input's name.

I tried changing in test-profile-without-groups.json

            "inputs": [
                {
                    "id": "https://schema.org/date",
                    "name": "date",
                    "label": "Date",
                    "help": "Attach a date",
                    "type": ["Geo"],
                    "required": true,
                    "multiple": false
                }
            ]

to

            "inputs": [
                {
                    "id": "https://schema.org/date",
                    "name": "date",
                    "label": "Custom date label",
                    "help": "Attach a date",
                    "type": ["Geo"],
                    "required": true,
                    "multiple": false
                }
            ]

I expected to see "Custom date label", but I still got "Date", which is derived from the value of name.

Translation

hi @beepsoft. Can you please translate "Associate any entity (lookup by identifier or name)". I needed to add another property called "associate_any_prompt" for a new profile feature.

Layout problems with Profiles with long descriptions

I tried to use a custom profile and we provided description for layout elements, which results in an UI like this:

Screenshot 2023-03-24 at 12 07 32

Without the descriptions, it is OK:
Screenshot 2023-03-24 at 12 19 01

Can you make the description text breakable in the UI, so that it doesn't stretch the view?

This is the actual Profile we use:

{
  "metadata": {
    "name": "Citation Metadata",
    "version": 1.0,
    "description": "",
    "warnMissingProperty": true
  },
  "layouts": {
    "Dataset": [
      {
        "name": "otherId",
        "description": "Another unique identifier for the Dataset (e.g. producer\u0027s or another repository\u0027s identifier)",
        "inputs": [
          "otherIdAgency",
          "otherIdValue"
        ]
      },
      {
        "name": "author",
        "description": "The entity, e.g. a person or organization, that created the Dataset",
        "inputs": [
          "authorName",
          "authorAffiliation",
          "authorIdentifierScheme",
          "authorIdentifier"
        ]
      },
      {
        "name": "datasetContact",
        "description": "The entity, e.g. a person or organization, that users of the Dataset can contact with questions",
        "inputs": [
          "datasetContactName",
          "datasetContactAffiliation",
          "datasetContactEmail"
        ]
      },
      {
        "name": "dsDescription",
        "description": "A summary describing the purpose, nature, and scope of the Dataset",
        "inputs": [
          "dsDescriptionValue",
          "dsDescriptionDate"
        ]
      },
      {
        "name": "keyword",
        "description": "A key term that describes an important aspect of the Dataset and information about any controlled vocabulary used",
        "inputs": [
          "keywordValue",
          "keywordVocabulary",
          "keywordVocabularyURI"
        ]
      },
      {
        "name": "topicClassification",
        "description": "Indicates a broad, important topic or subject that the Dataset covers and information about any controlled vocabulary used",
        "inputs": [
          "topicClassValue",
          "topicClassVocab",
          "topicClassVocabURI"
        ]
      },
      {
        "name": "publication",
        "description": "The article or report that uses the data in the Dataset. The full list of related publications will be displayed on the metadata tab",
        "inputs": [
          "publicationCitation",
          "publicationIDType",
          "publicationIDNumber",
          "publicationURL"
        ]
      },
      {
        "name": "producer",
        "description": "The entity, such a person or organization, managing the finances or other administrative processes involved in the creation of the Dataset",
        "inputs": [
          "producerName",
          "producerAffiliation",
          "producerAbbreviation",
          "producerURL",
          "producerLogoURL"
        ]
      },
      {
        "name": "contributor",
        "description": "The entity, such as a person or organization, responsible for collecting, managing, or otherwise contributing to the development of the Dataset",
        "inputs": [
          "contributorType",
          "contributorName"
        ]
      },
      {
        "name": "grantNumber",
        "description": "Information about the Dataset\u0027s financial support",
        "inputs": [
          "grantNumberAgency",
          "grantNumberValue"
        ]
      },
      {
        "name": "distributor",
        "description": "The entity, such as a person or organization, designated to generate copies of the Dataset, including any editions or revisions",
        "inputs": [
          "distributorName",
          "distributorAffiliation",
          "distributorAbbreviation",
          "distributorURL",
          "distributorLogoURL"
        ]
      },
      {
        "name": "timePeriodCovered",
        "description": "The time period that the data refer to. Also known as span. This is the time period covered by the data, not the dates of coding, collecting data, or making documents machine-readable",
        "inputs": [
          "timePeriodCoveredStart",
          "timePeriodCoveredEnd"
        ]
      },
      {
        "name": "dateOfCollection",
        "description": "The dates when the data were collected or generated",
        "inputs": [
          "dateOfCollectionStart",
          "dateOfCollectionEnd"
        ]
      },
      {
        "name": "series",
        "description": "Information about the dataset series to which the Dataset belong",
        "inputs": [
          "seriesName",
          "seriesInformation"
        ]
      },
      {
        "name": "software",
        "description": "Information about the software used to generate the Dataset",
        "inputs": [
          "softwareName",
          "softwareVersion"
        ]
      }
    ]
  },
  "classes": {
    "Dataset": {
      "definition": "override",
      "subClassOf": [],
      "inputs": [
        {
          "id": "http://purl.org/dc/terms/title",
          "name": "title",
          "label": "Title",
          "help": "The main title of the Dataset",
          "type": [
            "Text"
          ],
          "required": true,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/subtitle",
          "name": "subtitle",
          "label": "Subtitle",
          "help": "A secondary title that amplifies or states certain limitations on the main title",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "http://purl.org/dc/terms/alternative",
          "name": "alternativeTitle",
          "label": "Alternative Title",
          "help": "Either 1) a title commonly used to refer to the Dataset or 2) an abbreviation of the main title",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://schema.org/distribution",
          "name": "alternativeURL",
          "label": "Alternative URL",
          "help": "Another URL where one can view or access the data in the Dataset, e.g. a project or personal webpage",
          "type": [
            "URL"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/otherIdAgency",
          "name": "otherIdAgency",
          "label": "Agency",
          "help": "The name of the agency that generated the other identifier",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/otherIdValue",
          "name": "otherIdValue",
          "label": "Identifier",
          "help": "Another identifier uniquely identifies the Dataset",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/authorName",
          "name": "authorName",
          "label": "Name",
          "help": "The name of the author, such as the person\u0027s name or the name of an organization",
          "type": [
            "Text"
          ],
          "required": true,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/authorAffiliation",
          "name": "authorAffiliation",
          "label": "Affiliation",
          "help": "The name of the entity affiliated with the author, e.g. an organization\u0027s name",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "http://purl.org/spar/datacite/AgentIdentifierScheme",
          "name": "authorIdentifierScheme",
          "label": "Identifier Type",
          "help": "The type of identifier that uniquely identifies the author (e.g. ORCID, ISNI)",
          "type": [
            "Select"
          ],
          "values": [
            "ORCID",
            "ISNI",
            "LCNA",
            "VIAF",
            "GND",
            "DAI",
            "ResearcherID",
            "ScopusID"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "http://purl.org/spar/datacite/AgentIdentifier",
          "name": "authorIdentifier",
          "label": "Identifier",
          "help": "Uniquely identifies the author when paired with an identifier type",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/datasetContactName",
          "name": "datasetContactName",
          "label": "Name",
          "help": "The name of the point of contact, e.g. the person\u0027s name or the name of an organization",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/datasetContactAffiliation",
          "name": "datasetContactAffiliation",
          "label": "Affiliation",
          "help": "The name of the entity affiliated with the point of contact, e.g. an organization\u0027s name",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/datasetContactEmail",
          "name": "datasetContactEmail",
          "label": "E-mail",
          "help": "The point of contact\u0027s email address",
          "type": [
            "Text"
          ],
          "required": true,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/dsDescriptionValue",
          "name": "dsDescriptionValue",
          "label": "Text",
          "help": "A summary describing the purpose, nature, and scope of the Dataset",
          "type": [
            "TextArea"
          ],
          "required": true,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/dsDescriptionDate",
          "name": "dsDescriptionDate",
          "label": "Date",
          "help": "The date when the description was added to the Dataset. If the Dataset contains more than one description, e.g. the data producer supplied one description and the data repository supplied another, this date is used to distinguish between the descriptions",
          "type": [
            "Date"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "http://purl.org/dc/terms/subject",
          "name": "subject",
          "label": "Subject",
          "help": "The area of study relevant to the Dataset",
          "type": [
            "Select"
          ],
          "values": [
            "Agricultural Sciences",
            "Arts and Humanities",
            "Astronomy and Astrophysics",
            "Business and Management",
            "Chemistry",
            "Computer and Information Science",
            "Earth and Environmental Sciences",
            "Engineering",
            "Law",
            "Mathematical Sciences",
            "Medicine, Health and Life Sciences",
            "Physics",
            "Social Sciences",
            "Other"
          ],
          "required": true,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/keywordValue",
          "name": "keywordValue",
          "label": "Term",
          "help": "A key term that describes important aspects of the Dataset",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/keywordVocabulary",
          "name": "keywordVocabulary",
          "label": "Controlled Vocabulary Name",
          "help": "The controlled vocabulary used for the keyword term (e.g. LCSH, MeSH)",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/keywordVocabularyURI",
          "name": "keywordVocabularyURI",
          "label": "Controlled Vocabulary URL",
          "help": "The URL where one can access information about the term\u0027s controlled vocabulary",
          "type": [
            "URL"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/topicClassValue",
          "name": "topicClassValue",
          "label": "Term",
          "help": "A topic or subject term",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/topicClassVocab",
          "name": "topicClassVocab",
          "label": "Controlled Vocabulary Name",
          "help": "The controlled vocabulary used for the keyword term (e.g. LCSH, MeSH)",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/topicClassVocabURI",
          "name": "topicClassVocabURI",
          "label": "Controlled Vocabulary URL",
          "help": "The URL where one can access information about the term\u0027s controlled vocabulary",
          "type": [
            "URL"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "http://purl.org/dc/terms/bibliographicCitation",
          "name": "publicationCitation",
          "label": "Citation",
          "help": "The full bibliographic citation for the related publication",
          "type": [
            "TextArea"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "http://purl.org/spar/datacite/ResourceIdentifierScheme",
          "name": "publicationIDType",
          "label": "Identifier Type",
          "help": "The type of identifier that uniquely identifies a related publication",
          "type": [
            "Select"
          ],
          "values": [
            "ark",
            "arXiv",
            "bibcode",
            "cstr",
            "doi",
            "ean13",
            "eissn",
            "handle",
            "isbn",
            "issn",
            "istc",
            "lissn",
            "lsid",
            "pmid",
            "purl",
            "upc",
            "url",
            "urn",
            "DASH-NRS"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "http://purl.org/spar/datacite/ResourceIdentifier",
          "name": "publicationIDNumber",
          "label": "Identifier",
          "help": "The identifier for a related publication",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://schema.org/distribution",
          "name": "publicationURL",
          "label": "URL",
          "help": "The URL form of the identifier entered in the Identifier field, e.g. the DOI URL if a DOI was entered in the Identifier field. Used to display what was entered in the ID Type and ID Number fields as a link. If what was entered in the Identifier field has no URL form, the URL of the publication webpage is used, e.g. a journal article webpage",
          "type": [
            "URL"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/notesText",
          "name": "notesText",
          "label": "Notes",
          "help": "Additional information about the Dataset",
          "type": [
            "TextArea"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "http://purl.org/dc/terms/language",
          "name": "language",
          "label": "Language",
          "help": "A language that the Dataset\u0027s files is written in",
          "type": [
            "Select"
          ],
          "values": [
            "Abkhaz",
            "Afar",
            "Afrikaans",
            "Akan",
            "Albanian",
            "Amharic",
            "Arabic",
            "Aragonese",
            "Armenian",
            "Assamese",
            "Avaric",
            "Avestan",
            "Aymara",
            "Azerbaijani",
            "Bambara",
            "Bashkir",
            "Basque",
            "Belarusian",
            "Bengali, Bangla",
            "Bihari",
            "Bislama",
            "Bosnian",
            "Breton",
            "Bulgarian",
            "Burmese",
            "Catalan,Valencian",
            "Chamorro",
            "Chechen",
            "Chichewa, Chewa, Nyanja",
            "Chinese",
            "Chuvash",
            "Cornish",
            "Corsican",
            "Cree",
            "Croatian",
            "Czech",
            "Danish",
            "Divehi, Dhivehi, Maldivian",
            "Dutch",
            "Dzongkha",
            "English",
            "Esperanto",
            "Estonian",
            "Ewe",
            "Faroese",
            "Fijian",
            "Finnish",
            "French",
            "Fula, Fulah, Pulaar, Pular",
            "Galician",
            "Georgian",
            "German",
            "Greek (modern)",
            "Guaraní",
            "Gujarati",
            "Haitian, Haitian Creole",
            "Hausa",
            "Hebrew (modern)",
            "Herero",
            "Hindi",
            "Hiri Motu",
            "Hungarian",
            "Interlingua",
            "Indonesian",
            "Interlingue",
            "Irish",
            "Igbo",
            "Inupiaq",
            "Ido",
            "Icelandic",
            "Italian",
            "Inuktitut",
            "Japanese",
            "Javanese",
            "Kalaallisut, Greenlandic",
            "Kannada",
            "Kanuri",
            "Kashmiri",
            "Kazakh",
            "Khmer",
            "Kikuyu, Gikuyu",
            "Kinyarwanda",
            "Kyrgyz",
            "Komi",
            "Kongo",
            "Korean",
            "Kurdish",
            "Kwanyama, Kuanyama",
            "Latin",
            "Luxembourgish, Letzeburgesch",
            "Ganda",
            "Limburgish, Limburgan, Limburger",
            "Lingala",
            "Lao",
            "Lithuanian",
            "Luba-Katanga",
            "Latvian",
            "Manx",
            "Macedonian",
            "Malagasy",
            "Malay",
            "Malayalam",
            "Maltese",
            "Māori",
            "Marathi (Marāṭhī)",
            "Marshallese",
            "Mixtepec Mixtec",
            "Mongolian",
            "Nauru",
            "Navajo, Navaho",
            "Northern Ndebele",
            "Nepali",
            "Ndonga",
            "Norwegian Bokmål",
            "Norwegian Nynorsk",
            "Norwegian",
            "Nuosu",
            "Southern Ndebele",
            "Occitan",
            "Ojibwe, Ojibwa",
            "Old Church Slavonic,Church Slavonic,Old Bulgarian",
            "Oromo",
            "Oriya",
            "Ossetian, Ossetic",
            "Panjabi, Punjabi",
            "Pāli",
            "Persian (Farsi)",
            "Polish",
            "Pashto, Pushto",
            "Portuguese",
            "Quechua",
            "Romansh",
            "Kirundi",
            "Romanian",
            "Russian",
            "Sanskrit (Saṁskṛta)",
            "Sardinian",
            "Sindhi",
            "Northern Sami",
            "Samoan",
            "Sango",
            "Serbian",
            "Scottish Gaelic, Gaelic",
            "Shona",
            "Sinhala, Sinhalese",
            "Slovak",
            "Slovene",
            "Somali",
            "Southern Sotho",
            "Spanish, Castilian",
            "Sundanese",
            "Swahili",
            "Swati",
            "Swedish",
            "Tamil",
            "Telugu",
            "Tajik",
            "Thai",
            "Tigrinya",
            "Tibetan Standard, Tibetan, Central",
            "Turkmen",
            "Tagalog",
            "Tswana",
            "Tonga (Tonga Islands)",
            "Turkish",
            "Tsonga",
            "Tatar",
            "Twi",
            "Tahitian",
            "Uyghur, Uighur",
            "Ukrainian",
            "Urdu",
            "Uzbek",
            "Venda",
            "Vietnamese",
            "Volapük",
            "Walloon",
            "Welsh",
            "Wolof",
            "Western Frisian",
            "Xhosa",
            "Yiddish",
            "Yoruba",
            "Zhuang, Chuang",
            "Zulu",
            "Not applicable"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/producerName",
          "name": "producerName",
          "label": "Name",
          "help": "The name of the entity, e.g. the person\u0027s name or the name of an organization",
          "type": [
            "Text"
          ],
          "required": true,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/producerAffiliation",
          "name": "producerAffiliation",
          "label": "Affiliation",
          "help": "The name of the entity affiliated with the producer, e.g. an organization\u0027s name",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/producerAbbreviation",
          "name": "producerAbbreviation",
          "label": "Abbreviated Name",
          "help": "The producer\u0027s abbreviated name (e.g. IQSS, ICPSR)",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/producerURL",
          "name": "producerURL",
          "label": "URL",
          "help": "The URL of the producer\u0027s website",
          "type": [
            "URL"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/producerLogoURL",
          "name": "producerLogoURL",
          "label": "Logo URL",
          "help": "The URL of the producer\u0027s logo",
          "type": [
            "URL"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/productionDate",
          "name": "productionDate",
          "label": "Production Date",
          "help": "The date when the data were produced (not distributed, published, or archived)",
          "type": [
            "Date"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/productionPlace",
          "name": "productionPlace",
          "label": "Production Location",
          "help": "The location where the data and any related materials were produced or collected",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/contributorType",
          "name": "contributorType",
          "label": "Type",
          "help": "Indicates the type of contribution made to the dataset",
          "type": [
            "Select"
          ],
          "values": [
            "Data Collector",
            "Data Curator",
            "Data Manager",
            "Editor",
            "Funder",
            "Hosting Institution",
            "Project Leader",
            "Project Manager",
            "Project Member",
            "Related Person",
            "Researcher",
            "Research Group",
            "Rights Holder",
            "Sponsor",
            "Supervisor",
            "Work Package Leader",
            "Other"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/contributorName",
          "name": "contributorName",
          "label": "Name",
          "help": "The name of the contributor, e.g. the person\u0027s name or the name of an organization",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/grantNumberAgency",
          "name": "grantNumberAgency",
          "label": "Agency",
          "help": "The agency that provided financial support for the Dataset",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/grantNumberValue",
          "name": "grantNumberValue",
          "label": "Identifier",
          "help": "The grant identifier or contract identifier of the agency that provided financial support for the Dataset",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/distributorName",
          "name": "distributorName",
          "label": "Name",
          "help": "The name of the entity, e.g. the person\u0027s name or the name of an organization",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/distributorAffiliation",
          "name": "distributorAffiliation",
          "label": "Affiliation",
          "help": "The name of the entity affiliated with the distributor, e.g. an organization\u0027s name",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/distributorAbbreviation",
          "name": "distributorAbbreviation",
          "label": "Abbreviated Name",
          "help": "The distributor\u0027s abbreviated name (e.g. IQSS, ICPSR)",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/distributorURL",
          "name": "distributorURL",
          "label": "URL",
          "help": "The URL of the distributor\u0027s webpage",
          "type": [
            "URL"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/distributorLogoURL",
          "name": "distributorLogoURL",
          "label": "Logo URL",
          "help": "The URL of the distributor\u0027s logo image, used to show the image on the Dataset\u0027s page",
          "type": [
            "URL"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/distributionDate",
          "name": "distributionDate",
          "label": "Distribution Date",
          "help": "The date when the Dataset was made available for distribution/presentation",
          "type": [
            "Date"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/depositor",
          "name": "depositor",
          "label": "Depositor",
          "help": "The entity, such as a person or organization, that deposited the Dataset in the repository",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "http://purl.org/dc/terms/dateSubmitted",
          "name": "dateOfDeposit",
          "label": "Deposit Date",
          "help": "The date when the Dataset was deposited into the repository",
          "type": [
            "Date"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/timePeriodCoveredStart",
          "name": "timePeriodCoveredStart",
          "label": "Start Date",
          "help": "The start date of the time period that the data refer to",
          "type": [
            "Date"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/timePeriodCoveredEnd",
          "name": "timePeriodCoveredEnd",
          "label": "End Date",
          "help": "The end date of the time period that the data refer to",
          "type": [
            "Date"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/dateOfCollectionStart",
          "name": "dateOfCollectionStart",
          "label": "Start Date",
          "help": "The date when the data collection started",
          "type": [
            "Date"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/dateOfCollectionEnd",
          "name": "dateOfCollectionEnd",
          "label": "End Date",
          "help": "The date when the data collection ended",
          "type": [
            "Date"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "http://rdf-vocabulary.ddialliance.org/discovery#kindOfData",
          "name": "kindOfData",
          "label": "Data Type",
          "help": "The type of data included in the files (e.g. survey data, clinical data, or machine-readable text)",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/seriesName",
          "name": "seriesName",
          "label": "Name",
          "help": "The name of the dataset series",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/seriesInformation",
          "name": "seriesInformation",
          "label": "Information",
          "help": "Can include 1) a history of the series and 2) a summary of features that apply to the series",
          "type": [
            "TextArea"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/softwareName",
          "name": "softwareName",
          "label": "Name",
          "help": "The name of software used to generate the Dataset",
          "type": [
            "Select"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/softwareVersion",
          "name": "softwareVersion",
          "label": "Version",
          "help": "The version of the software used to generate the Dataset, e.g. 4.11",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/relatedMaterial",
          "name": "relatedMaterial",
          "label": "Related Material",
          "help": "Information, such as a persistent ID or citation, about the material related to the Dataset, such as appendices or sampling information available outside of the Dataset",
          "type": [
            "TextArea"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "http://purl.org/dc/terms/relation",
          "name": "relatedDatasets",
          "label": "Related Dataset",
          "help": "Information, such as a persistent ID or citation, about a related dataset, such as previous research on the Dataset\u0027s subject",
          "type": [
            "TextArea"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "http://purl.org/dc/terms/references",
          "name": "otherReferences",
          "label": "Other Reference",
          "help": "Information, such as a persistent ID or citation, about another type of resource that provides background or supporting material to the Dataset",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://www.w3.org/TR/prov-o/#wasDerivedFrom",
          "name": "dataSources",
          "label": "Data Source",
          "help": "Information, such as a persistent ID or citation, about sources of the Dataset (e.g. a book, article, serial, or machine-readable data file)",
          "type": [
            "TextArea"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/originOfSources",
          "name": "originOfSources",
          "label": "Origin of Historical Sources",
          "help": "For historical sources, the origin and any rules followed in establishing them as sources",
          "type": [
            "TextArea"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/characteristicOfSources",
          "name": "characteristicOfSources",
          "label": "Characteristic of Sources",
          "help": "Characteristics not already noted elsewhere",
          "type": [
            "TextArea"
          ],
          "required": false,
          "multiple": false
        },
        {
          "id": "https://dataverse.org/schema/citation/accessToSources",
          "name": "accessToSources",
          "label": "Documentation and Access to Sources",
          "help": "1) Methods or procedures for accessing data sources and 2) any special permissions needed for access",
          "type": [
            "TextArea"
          ],
          "required": false,
          "multiple": false
        }
      ]
    }
  },
  "enabledClasses": [
    "Dataset"
  ]
}

Uncaught SyntaxError: ...validate-iri... does not provide an export named 'IriValidationStrategy'

Hi, I can't seem to get crate-builder-component to work in a minimal vue project with vite. I followed the README instructions here https://github.com/describo/crate-builder-component#using-the-component-in-your-app.

The full error in the browser console:

Uncaught SyntaxError: The requested module '/node_modules/validate-iri/index.js?v=b73c8eb8' 
does not provide an export named 'IriValidationStrategy' (at crate-manager.js?v=b73c8eb8:13:23)

Here is the minimum reproducible example: https://github.com/Kurrawong/describo-cbc-mre

I also noticed another project (https://github.com/Arkisto-Platform/describro) that also utilises crate-builder-component and it has a similar error as well.

Uncaught SyntaxError: The requested module '/node_modules/validator/lib/isDate.js?v=32dfbcb5' 
does not provide an export named 'default' (at Date.component.vue:23:8)

In both cases, I'm running Node v18.14.2 and all I did was install and run with vite.

npm i
npm run dev

Please let me know if I'm missing a config setting somewhere. Thanks.

Controls disappears when clearing value of a non multiple item

In our Profile we have an input definition like this:

        {
          "id": "https://dataverse.org/schema/citation/authorAffiliation",
          "name": "authorAffiliation",
          "label": "Affiliation",
          "help": "The name of the entity affiliated with the author, e.g. an organization's name",
          "type": [
            "Text"
          ],
          "required": false,
          "multiple": false
        },

If we delete the value using the delete icon then the field's value is deleted and we have a "+ Text" button again.

However, if instead of the delete button, we just clear all the text in the field, we cannot edit it anymore, add a new value, or delete it because no controls appear.

All this only happens with "multiple": false fields.

screencast-github.com-2023.06.13-14_33_14.webm

Storybook problems

Trying version 0.35.1 and some of the storybook stories fail. For example:

image

I would like to add a story for Shell.component.wc.vue to be able to check whether the WebComponent specific functionalities work in vue. For example, setting the new enableReverseLinkBrowser value doesn't seem to work for me right now and I try to figure out whether the problem is in the vue/wc/react layer. A Shell.component.wc.stories.js could help in this.

Metadata validation

  • add a control to pick ro crate version to conform to
  • validate metadata to confirm it meets the absolute minimum requirements of that ro crate version:
    • name, description datePublished, publisher etc (TBD)
    • checks entity ids are sensible and as expected: ORCID etc
  • if a profile is in use, validate metadata against the profile selection to ensure all required properties have input

Don't remove accents from profile labels

I found that if I have accents in labels in profiles these accents are removed in the crate builder.

For example, I set this label "Árvíztűrő tükörfúrógép" (contains all Hungarian accented letters):

image

and I get this in the crate builder ("Arvizturo Tukorfurogep")

image

In general, it would be great if the labels appeared exactly as provided in the profile (casing, accents), or maybe some configurations to make them Capitalized Case (as done now), unaccented (as done now), or any other transformations that feels necessary.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.