@opensalt/ob3-definer 1.2.3 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.html +3 -1
- package/dist/ob3-definer.js +11 -11
- package/package.json +4 -1
- package/.vscode/extensions.json +0 -3
- package/NOTES +0 -6
- package/Test Achievement-bug1.json +0 -42
- package/formkit.config.js +0 -27
- package/index-2.html +0 -22
- package/index.html +0 -19
- package/jsconfig.json +0 -8
- package/public/favicon.svg +0 -7
- package/src/App.vue +0 -23
- package/src/assets/base.css +0 -86
- package/src/assets/main.css +0 -24
- package/src/assets/style.scss +0 -33
- package/src/components/AchievementCriteria.vue +0 -78
- package/src/components/AchievementDefiner.vue +0 -223
- package/src/components/AchievementImage.vue +0 -167
- package/src/components/AchievementType.vue +0 -118
- package/src/components/AdditionalTab.vue +0 -33
- package/src/components/AddressComponent.vue +0 -118
- package/src/components/AlignmentComponent.vue +0 -103
- package/src/components/AlignmentType.vue +0 -98
- package/src/components/AlignmentsComponent.vue +0 -13
- package/src/components/AlignmentsTab.vue +0 -18
- package/src/components/BasicTab.vue +0 -55
- package/src/components/CreatorProfile.vue +0 -166
- package/src/components/CriterionLevels.vue +0 -97
- package/src/components/DetailTab.vue +0 -72
- package/src/components/IndividualName.vue +0 -63
- package/src/components/MarkdownRenderer.vue +0 -20
- package/src/components/OtherIdentifiers.vue +0 -116
- package/src/components/RelatedList.vue +0 -89
- package/src/components/ResultDescription.vue +0 -121
- package/src/components/ResultType.vue +0 -94
- package/src/components/TagList.vue +0 -121
- package/src/components/ValueList.vue +0 -144
- package/src/inputs/innerLabelTextInput.js +0 -62
- package/src/inputs/innerLabelTextareaInput.js +0 -57
- package/src/inputs/selectInputGroup.js +0 -76
- package/src/main.js +0 -57
- package/src/stores/credential.js +0 -292
- package/src/validation/uri.js +0 -13
- package/test-index.html +0 -17
- package/vite.config.js +0 -39
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import AchievementImage from "@/components/AchievementImage.vue";
|
|
3
|
-
import AchievementType from "@/components/AchievementType.vue";
|
|
4
|
-
import AchievementCriteria from "@/components/AchievementCriteria.vue";
|
|
5
|
-
|
|
6
|
-
const model = defineModel({ default: {
|
|
7
|
-
/* name: '',
|
|
8
|
-
achievementType: null,
|
|
9
|
-
image: null,
|
|
10
|
-
description: '',
|
|
11
|
-
criteria: { },*/
|
|
12
|
-
} });
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<template>
|
|
16
|
-
<div class="tab-pane fade show active" id="tab-basic" role="tabpanel" aria-labelledby="basic-tab">
|
|
17
|
-
<div class="card mb-3">
|
|
18
|
-
<div class="card-body">
|
|
19
|
-
<p class="mb-0">
|
|
20
|
-
This tab contains all of the required fields for a credential.<br/>
|
|
21
|
-
<em>Credential Type</em> and <em>Image</em> are not required, but it is suggested that all credentials have them.
|
|
22
|
-
</p>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<FormKit
|
|
27
|
-
type="text"
|
|
28
|
-
label="Credential Name"
|
|
29
|
-
name="name"
|
|
30
|
-
wrapper-class="required"
|
|
31
|
-
validation="required:trim"
|
|
32
|
-
v-model="model.name"
|
|
33
|
-
help="The name of the credential."
|
|
34
|
-
/>
|
|
35
|
-
|
|
36
|
-
<AchievementType v-model="model.achievementType" />
|
|
37
|
-
<AchievementImage v-model="model.image"/>
|
|
38
|
-
|
|
39
|
-
<FormKit
|
|
40
|
-
type="textarea"
|
|
41
|
-
label="Description"
|
|
42
|
-
name="description"
|
|
43
|
-
wrapper-class="required"
|
|
44
|
-
rows="5"
|
|
45
|
-
validation="required:trim"
|
|
46
|
-
v-model="model.description"
|
|
47
|
-
help="A short description of the achievement."
|
|
48
|
-
/>
|
|
49
|
-
|
|
50
|
-
<AchievementCriteria
|
|
51
|
-
v-model="model.criteria"
|
|
52
|
-
/>
|
|
53
|
-
</div>
|
|
54
|
-
</template>
|
|
55
|
-
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import {onBeforeMount, ref} from "vue";
|
|
3
|
-
import AddressComponent from "@/components/AddressComponent.vue";
|
|
4
|
-
import CredentialImage from "@/components/AchievementImage.vue";
|
|
5
|
-
import OtherIdentifiers from "@/components/OtherIdentifiers.vue";
|
|
6
|
-
|
|
7
|
-
const creator=defineModel({ default: {} });
|
|
8
|
-
const creatorIs=ref('noCreator');
|
|
9
|
-
|
|
10
|
-
onBeforeMount(() => {
|
|
11
|
-
if (Object.keys(creator.value).length === 0) {
|
|
12
|
-
creatorIs.value = 'noCreator';
|
|
13
|
-
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// Default to organization
|
|
18
|
-
creatorIs.value = 'organization';
|
|
19
|
-
|
|
20
|
-
if (creator.value.dateOfBirth || null) {
|
|
21
|
-
creatorIs.value = 'individual';
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<template>
|
|
27
|
-
<div class="card">
|
|
28
|
-
<h5 class="card-header">
|
|
29
|
-
<formKit
|
|
30
|
-
type="select"
|
|
31
|
-
label="Creator"
|
|
32
|
-
v-model="creatorIs"
|
|
33
|
-
input-class="$reset formkit-input form-select"
|
|
34
|
-
:options="{
|
|
35
|
-
noCreator: 'Do not add a creator field',
|
|
36
|
-
organization: 'The creator is an Organization',
|
|
37
|
-
individual: 'The creator is a Person',
|
|
38
|
-
}"
|
|
39
|
-
ignore="true"
|
|
40
|
-
/>
|
|
41
|
-
</h5>
|
|
42
|
-
|
|
43
|
-
<FormKit
|
|
44
|
-
type="group"
|
|
45
|
-
name="creator"
|
|
46
|
-
v-model="creator"
|
|
47
|
-
v-if="creatorIs !== 'noCreator'"
|
|
48
|
-
>
|
|
49
|
-
<div class="card-body">
|
|
50
|
-
<FormKit
|
|
51
|
-
type="text"
|
|
52
|
-
label="ID"
|
|
53
|
-
name="id"
|
|
54
|
-
wrapper-class="required"
|
|
55
|
-
validation="uri:required:trim"
|
|
56
|
-
help="Unique URI for the creator."
|
|
57
|
-
/>
|
|
58
|
-
|
|
59
|
-
<FormKit
|
|
60
|
-
type="hidden"
|
|
61
|
-
name="type"
|
|
62
|
-
:value="[ 'Profile' ]"
|
|
63
|
-
/>
|
|
64
|
-
|
|
65
|
-
<FormKit
|
|
66
|
-
type="text"
|
|
67
|
-
label="Name"
|
|
68
|
-
name="name"
|
|
69
|
-
help="The name of the entity or organization."
|
|
70
|
-
/>
|
|
71
|
-
|
|
72
|
-
<FormKit
|
|
73
|
-
type="text"
|
|
74
|
-
label="Description"
|
|
75
|
-
name="description"
|
|
76
|
-
help="A short description of the issuer entity or organization."
|
|
77
|
-
/>
|
|
78
|
-
|
|
79
|
-
<CredentialImage
|
|
80
|
-
help="An image that represents the creator. Must be a PNG or SVG image."
|
|
81
|
-
v-model="creator.image"
|
|
82
|
-
/>
|
|
83
|
-
|
|
84
|
-
<FormKit
|
|
85
|
-
type="text"
|
|
86
|
-
label="Official"
|
|
87
|
-
name="official"
|
|
88
|
-
help="If the entity is an organization, `official` is the name of an authorized official of the organization."
|
|
89
|
-
v-if="creatorIs === 'organization'"
|
|
90
|
-
/>
|
|
91
|
-
|
|
92
|
-
<FormKit
|
|
93
|
-
type="text"
|
|
94
|
-
label="URL"
|
|
95
|
-
name="url"
|
|
96
|
-
validation="url"
|
|
97
|
-
help="The homepage or social media profile of the entity, whether individual or institutional. Should be a URL/URI Accessible via HTTP."
|
|
98
|
-
/>
|
|
99
|
-
|
|
100
|
-
<FormKit
|
|
101
|
-
type="text"
|
|
102
|
-
label="Email"
|
|
103
|
-
name="email"
|
|
104
|
-
validation="email"
|
|
105
|
-
help="An email address for the creator."
|
|
106
|
-
/>
|
|
107
|
-
|
|
108
|
-
<FormKit
|
|
109
|
-
type="text"
|
|
110
|
-
label="Phone"
|
|
111
|
-
name="phone"
|
|
112
|
-
help="A phone number for the creator."
|
|
113
|
-
/>
|
|
114
|
-
|
|
115
|
-
<AddressComponent
|
|
116
|
-
v-model="creator.address"
|
|
117
|
-
/>
|
|
118
|
-
|
|
119
|
-
<FormKit
|
|
120
|
-
type="text"
|
|
121
|
-
label="Date of Birth"
|
|
122
|
-
name="dateOfBirth"
|
|
123
|
-
format="yyyy-MM-dd"
|
|
124
|
-
help="Birthdate of the person."
|
|
125
|
-
v-if="creatorIs === 'individual'"
|
|
126
|
-
/>
|
|
127
|
-
|
|
128
|
-
<OtherIdentifiers
|
|
129
|
-
label="Other Identifiers"
|
|
130
|
-
v-model="creator.otherIdentifier"
|
|
131
|
-
help="Other unique identifiers for the creator."
|
|
132
|
-
/>
|
|
133
|
-
|
|
134
|
-
<FormKit
|
|
135
|
-
type="text"
|
|
136
|
-
label="Parent Org"
|
|
137
|
-
name="parentOrg"
|
|
138
|
-
placeholder="--TO BE EXPANDED--"
|
|
139
|
-
v-if="false"
|
|
140
|
-
/>
|
|
141
|
-
|
|
142
|
-
<FormKit
|
|
143
|
-
type="text"
|
|
144
|
-
label="Endorsement JWT"
|
|
145
|
-
name="endorsementJwt"
|
|
146
|
-
help="Allows endorsers to make specific claims about the individual or organization represented by this profile. These endorsements are signed with the VC-JWT proof format."
|
|
147
|
-
placeholder="--TO BE EXPANDED --"
|
|
148
|
-
v-if="false"
|
|
149
|
-
/>
|
|
150
|
-
|
|
151
|
-
<FormKit
|
|
152
|
-
type="text"
|
|
153
|
-
label="Endorsement"
|
|
154
|
-
name="endorsement"
|
|
155
|
-
help="Allows endorsers to make specific claims about the individual or organization represented by this profile."
|
|
156
|
-
placeholder="--TO BE EXPANDED --"
|
|
157
|
-
v-if="false"
|
|
158
|
-
/>
|
|
159
|
-
</div>
|
|
160
|
-
</FormKit>
|
|
161
|
-
</div>
|
|
162
|
-
</template>
|
|
163
|
-
|
|
164
|
-
<style scoped>
|
|
165
|
-
|
|
166
|
-
</style>
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import AlignmentComponent from "@/components/AlignmentComponent.vue";
|
|
3
|
-
|
|
4
|
-
const levels = defineModel({ default: {} });
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<template>
|
|
8
|
-
<FormKit
|
|
9
|
-
#default="{ items, node, value }"
|
|
10
|
-
type="list"
|
|
11
|
-
v-model="levels"
|
|
12
|
-
name="rubricCriterionLevel"
|
|
13
|
-
dynamic
|
|
14
|
-
>
|
|
15
|
-
<h5>Rubric Criterion Levels
|
|
16
|
-
<button type="button" @click="() => node.input(value.concat({}))" class="btn btn-sm btn-primary ms-3">
|
|
17
|
-
Add Level
|
|
18
|
-
</button>
|
|
19
|
-
</h5>
|
|
20
|
-
|
|
21
|
-
<FormKit
|
|
22
|
-
type="group"
|
|
23
|
-
wrapper-class="card"
|
|
24
|
-
v-for="(item, index) in items"
|
|
25
|
-
:key="item"
|
|
26
|
-
:index="index"
|
|
27
|
-
>
|
|
28
|
-
<div class="card mb-3">
|
|
29
|
-
<h5 class="card-header">Level {{index+1}}
|
|
30
|
-
<button type="button" @click="() => node.input(value.filter((_, i) => i !== index))" class="btn btn-secondary btn-sm float-end">
|
|
31
|
-
Remove
|
|
32
|
-
</button>
|
|
33
|
-
</h5>
|
|
34
|
-
|
|
35
|
-
<div class="card-body">
|
|
36
|
-
<FormKit
|
|
37
|
-
type="hidden"
|
|
38
|
-
name="type"
|
|
39
|
-
:value="[ 'RubricCriterionLevel' ]"
|
|
40
|
-
/>
|
|
41
|
-
|
|
42
|
-
<FormKit
|
|
43
|
-
type="innerLabelTextInput"
|
|
44
|
-
label="ID"
|
|
45
|
-
name="id"
|
|
46
|
-
inner-class="input-group"
|
|
47
|
-
label-class="input-group-text"
|
|
48
|
-
validation="required:trim"
|
|
49
|
-
wrapper-class="required"
|
|
50
|
-
/>
|
|
51
|
-
|
|
52
|
-
<FormKit
|
|
53
|
-
type="innerLabelTextInput"
|
|
54
|
-
label="Name"
|
|
55
|
-
name="name"
|
|
56
|
-
inner-class="input-group"
|
|
57
|
-
label-class="input-group-text"
|
|
58
|
-
validation="required:trim"
|
|
59
|
-
wrapper-class="required"
|
|
60
|
-
/>
|
|
61
|
-
|
|
62
|
-
<FormKit
|
|
63
|
-
type="innerLabelTextareaInput"
|
|
64
|
-
label="Description"
|
|
65
|
-
name="description"
|
|
66
|
-
inner-class="input-group"
|
|
67
|
-
label-class="input-group-text"
|
|
68
|
-
/>
|
|
69
|
-
|
|
70
|
-
<FormKit
|
|
71
|
-
type="innerLabelTextInput"
|
|
72
|
-
label="Level"
|
|
73
|
-
name="level"
|
|
74
|
-
inner-class="input-group"
|
|
75
|
-
label-class="input-group-text"
|
|
76
|
-
/>
|
|
77
|
-
|
|
78
|
-
<FormKit
|
|
79
|
-
type="innerLabelTextInput"
|
|
80
|
-
label="Points"
|
|
81
|
-
name="points"
|
|
82
|
-
inner-class="input-group"
|
|
83
|
-
label-class="input-group-text"
|
|
84
|
-
/>
|
|
85
|
-
|
|
86
|
-
<AlignmentComponent v-model="levels[index].alignment"/>
|
|
87
|
-
</div>
|
|
88
|
-
</div>
|
|
89
|
-
</FormKit>
|
|
90
|
-
</FormKit>
|
|
91
|
-
</template>
|
|
92
|
-
|
|
93
|
-
<style>
|
|
94
|
-
.input-group>.form-label {
|
|
95
|
-
margin-bottom: 0;
|
|
96
|
-
}
|
|
97
|
-
</style>
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
const credential = defineModel({ default: {
|
|
3
|
-
humanCode: null,
|
|
4
|
-
inLanguage: null,
|
|
5
|
-
version: null,
|
|
6
|
-
creditsAvailable: null,
|
|
7
|
-
additionalType: null,
|
|
8
|
-
} })
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<div class="tab-pane fade show active" id="tab-detail" role="tabpanel" aria-labelledby="detail-tab">
|
|
13
|
-
<FormKit
|
|
14
|
-
type="text"
|
|
15
|
-
label="Human Code"
|
|
16
|
-
v-model="credential.humanCode"
|
|
17
|
-
name="humanCode"
|
|
18
|
-
help="The code, generally human readable, associated with an achievement."
|
|
19
|
-
/>
|
|
20
|
-
|
|
21
|
-
<FormKit
|
|
22
|
-
type="text"
|
|
23
|
-
label="In Language"
|
|
24
|
-
v-model="credential.inLanguage"
|
|
25
|
-
name="inLanguage"
|
|
26
|
-
help="The language this credential is in as a BCP47 language code, such as 'en', 'en-US', or 'es-MX'"
|
|
27
|
-
:validation="[['matches', '/^[a-z]{2,4}(-[A-Z][a-z]{3})?(-([A-Z]{2}|[0-9]{3}))?$/']]"
|
|
28
|
-
:validation-messages="{
|
|
29
|
-
'matches': 'The language must formatted as a BCP47 language code, such as \'en\', \'en-US\', or \'es-MX\'.'
|
|
30
|
-
}"
|
|
31
|
-
/>
|
|
32
|
-
|
|
33
|
-
<FormKit
|
|
34
|
-
type="text"
|
|
35
|
-
label="Version"
|
|
36
|
-
v-model="credential.version"
|
|
37
|
-
name="version"
|
|
38
|
-
help="The version property allows issuers to set a version string for an Achievement. This is particularly useful when replacing a previous version with an update."
|
|
39
|
-
/>
|
|
40
|
-
|
|
41
|
-
<FormKit
|
|
42
|
-
type="number"
|
|
43
|
-
label="Credits Available"
|
|
44
|
-
number
|
|
45
|
-
name="creditsAvailable"
|
|
46
|
-
v-model="credential.creditsAvailable"
|
|
47
|
-
help="Credit hours associated with this entity, or credit hours possible. For example 3.0."
|
|
48
|
-
/>
|
|
49
|
-
|
|
50
|
-
<FormKit
|
|
51
|
-
type="text"
|
|
52
|
-
label="Specialization"
|
|
53
|
-
v-model="credential.specialization"
|
|
54
|
-
name="specialization"
|
|
55
|
-
help="Name given to the focus, concentration, or specific area of study defined in the achievement. Examples include 'Entrepreneurship', 'Technical Communication', and 'Finance'."
|
|
56
|
-
/>
|
|
57
|
-
|
|
58
|
-
<FormKit
|
|
59
|
-
type="text"
|
|
60
|
-
label="Field of Study"
|
|
61
|
-
v-model="credential.fieldOfStudy"
|
|
62
|
-
name="fieldOfStudy"
|
|
63
|
-
help="Category, subject, area of study, discipline, or general branch of knowledge. Examples include Business, Education, Psychology, and Technology."
|
|
64
|
-
/>
|
|
65
|
-
</div>
|
|
66
|
-
</template>
|
|
67
|
-
|
|
68
|
-
<style scoped>
|
|
69
|
-
#criteria-preview {
|
|
70
|
-
min-height: 250px;
|
|
71
|
-
}
|
|
72
|
-
</style>
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<template>
|
|
6
|
-
<FormKit
|
|
7
|
-
type="group"
|
|
8
|
-
>
|
|
9
|
-
<FormKit
|
|
10
|
-
type="text"
|
|
11
|
-
label="Given Name"
|
|
12
|
-
name="givenName"
|
|
13
|
-
help="Given name. In the western world, often referred to as the 'first name' of a person."
|
|
14
|
-
/>
|
|
15
|
-
|
|
16
|
-
<FormKit
|
|
17
|
-
type="text"
|
|
18
|
-
label="Additional Name"
|
|
19
|
-
name="additionalName"
|
|
20
|
-
help="Additional name. Includes what is often referred to as 'middle name' in the western world."
|
|
21
|
-
/>
|
|
22
|
-
|
|
23
|
-
<FormKit
|
|
24
|
-
type="text"
|
|
25
|
-
label="Family Name Prefix"
|
|
26
|
-
name="familyNamePrefix"
|
|
27
|
-
help="Family name prefix. As used in some locales, this is the leading part of a family name (e.g. 'de' in the name 'de Boer')."
|
|
28
|
-
/>
|
|
29
|
-
|
|
30
|
-
<FormKit
|
|
31
|
-
type="text"
|
|
32
|
-
label="Family Name"
|
|
33
|
-
name="familyName"
|
|
34
|
-
help="Family name. In the western world, often referred to as the 'last name' of a person."
|
|
35
|
-
/>
|
|
36
|
-
|
|
37
|
-
<FormKit
|
|
38
|
-
type="text"
|
|
39
|
-
label="Patronymic Name"
|
|
40
|
-
name="patronymicName"
|
|
41
|
-
help="Patronynmic name."
|
|
42
|
-
v-if="false"
|
|
43
|
-
/>
|
|
44
|
-
|
|
45
|
-
<FormKit
|
|
46
|
-
type="text"
|
|
47
|
-
label="Honorific Prefix"
|
|
48
|
-
name="honorificPrefix"
|
|
49
|
-
help="Honorific prefix(es) preceding a person's name (e.g. 'Dr', 'Mrs' or 'Mr')."
|
|
50
|
-
/>
|
|
51
|
-
|
|
52
|
-
<FormKit
|
|
53
|
-
type="text"
|
|
54
|
-
label="Honorific Suffix"
|
|
55
|
-
name="honorificSuffix"
|
|
56
|
-
help="Honorific suffix(es) following a person's name (e.g. 'M.D, PhD')."
|
|
57
|
-
/>
|
|
58
|
-
</FormKit>
|
|
59
|
-
</template>
|
|
60
|
-
|
|
61
|
-
<style scoped>
|
|
62
|
-
|
|
63
|
-
</style>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import MarkdownIt from "markdown-it";
|
|
3
|
-
|
|
4
|
-
const markdown = MarkdownIt();
|
|
5
|
-
|
|
6
|
-
const props = defineProps({
|
|
7
|
-
source: {
|
|
8
|
-
type: String,
|
|
9
|
-
default: ""
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<template>
|
|
15
|
-
<div class="mb-3" v-html="markdown.render(source)" />
|
|
16
|
-
</template>
|
|
17
|
-
|
|
18
|
-
<style scoped>
|
|
19
|
-
|
|
20
|
-
</style>
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
const props = defineProps({
|
|
3
|
-
help: {
|
|
4
|
-
type: String,
|
|
5
|
-
default: 'Other identifiers for this credential.'
|
|
6
|
-
}
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
const identifiers = defineModel({ default: [] });
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<template>
|
|
13
|
-
<FormKit
|
|
14
|
-
#default="{ items, node, value }"
|
|
15
|
-
type="list"
|
|
16
|
-
v-model="identifiers"
|
|
17
|
-
name="otherIdentifier"
|
|
18
|
-
dynamic
|
|
19
|
-
>
|
|
20
|
-
<h5>Other Identifiers
|
|
21
|
-
<button type="button" @click="() => node.input(value.concat({}))" class="btn btn-sm btn-primary ms-3">
|
|
22
|
-
Add Identifier
|
|
23
|
-
</button>
|
|
24
|
-
</h5>
|
|
25
|
-
<p class="form-text">{{ props.help }}</p>
|
|
26
|
-
|
|
27
|
-
<FormKit
|
|
28
|
-
type="group"
|
|
29
|
-
v-for="(item, index) in items"
|
|
30
|
-
:key="item"
|
|
31
|
-
:index="index"
|
|
32
|
-
>
|
|
33
|
-
<div class="card mb-3">
|
|
34
|
-
<h5 class="card-header">Other Identifier {{index+1}}
|
|
35
|
-
<button type="button" @click="() => node.input(value.filter((_, i) => i !== index))" class="btn btn-secondary btn-sm float-end">
|
|
36
|
-
Remove
|
|
37
|
-
</button>
|
|
38
|
-
</h5>
|
|
39
|
-
|
|
40
|
-
<div class="card-body pb-0">
|
|
41
|
-
<FormKit
|
|
42
|
-
type="hidden"
|
|
43
|
-
name="type"
|
|
44
|
-
:value="'IdentifierEntry'"
|
|
45
|
-
/>
|
|
46
|
-
|
|
47
|
-
<FormKit
|
|
48
|
-
type="innerLabelTextInput"
|
|
49
|
-
label="Identifier"
|
|
50
|
-
name="identifier"
|
|
51
|
-
aria-label="Identifier"
|
|
52
|
-
inner-class="input-group"
|
|
53
|
-
label-class="input-group-text"
|
|
54
|
-
wrapper-class="required"
|
|
55
|
-
validation="required:trim"
|
|
56
|
-
/>
|
|
57
|
-
<FormKit
|
|
58
|
-
type="selectInputGroup"
|
|
59
|
-
label="Identifier Type"
|
|
60
|
-
name="identifierType"
|
|
61
|
-
inner-class="input-group"
|
|
62
|
-
label-class="input-group-text"
|
|
63
|
-
input-class="$reset formkit-input form-select"
|
|
64
|
-
wrapper-class="required"
|
|
65
|
-
placeholder="Select the Identifier Type"
|
|
66
|
-
validation="required"
|
|
67
|
-
:options="{
|
|
68
|
-
'name': 'name',
|
|
69
|
-
'sourcedId': 'sourcedId',
|
|
70
|
-
'systemId': 'systemId',
|
|
71
|
-
'productId': 'productId',
|
|
72
|
-
'userName': 'userName',
|
|
73
|
-
'accountId': 'accountId',
|
|
74
|
-
'emailAddress': 'emailAddress',
|
|
75
|
-
'nationalIdentityNumber': 'nationalIdentityNumber',
|
|
76
|
-
'isbn': 'isbn',
|
|
77
|
-
'issn': 'issn',
|
|
78
|
-
'lisSourcedId': 'lisSourcedId',
|
|
79
|
-
'oneRosterSourcedId': 'oneRosterSourcedId',
|
|
80
|
-
'sisSourcedId': 'sisSourcedId',
|
|
81
|
-
'ltiContextId': 'ltiContextId',
|
|
82
|
-
'ltiDeploymentId': 'ltiDeploymentId',
|
|
83
|
-
'ltiToolId': 'ltiToolId',
|
|
84
|
-
'ltiPlatformId': 'ltiPlatformId',
|
|
85
|
-
'ltiUserId': 'ltiUserId',
|
|
86
|
-
'identifier': 'identifier',
|
|
87
|
-
'other': 'Other (ext:)',
|
|
88
|
-
}"
|
|
89
|
-
/>
|
|
90
|
-
<FormKit
|
|
91
|
-
v-if="value[index].identifierType === 'other'"
|
|
92
|
-
type="innerLabelTextInput"
|
|
93
|
-
label="Extended Type"
|
|
94
|
-
name="typeExt"
|
|
95
|
-
aria-label="Extended Identifier Type"
|
|
96
|
-
inner-class="input-group ms-3 me-5 pe-3"
|
|
97
|
-
outer-class="$reset"
|
|
98
|
-
label-class="visually-hidden"
|
|
99
|
-
before="ext:"
|
|
100
|
-
:validation="[['matches', '/^[a-z|A-Z|0-9|.|-|_]+$/']]"
|
|
101
|
-
>
|
|
102
|
-
<template #prefix>
|
|
103
|
-
<span class="input-group-text" aria-label="ext:">ext:</span>
|
|
104
|
-
</template>
|
|
105
|
-
</FormKit>
|
|
106
|
-
</div>
|
|
107
|
-
</div>
|
|
108
|
-
</FormKit>
|
|
109
|
-
</FormKit>
|
|
110
|
-
</template>
|
|
111
|
-
|
|
112
|
-
<style>
|
|
113
|
-
.input-group>.form-label {
|
|
114
|
-
margin-bottom: 0;
|
|
115
|
-
}
|
|
116
|
-
</style>
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import {ref, watch} from "vue";
|
|
3
|
-
|
|
4
|
-
const emit = defineEmits(['change']);
|
|
5
|
-
|
|
6
|
-
const related = ref([]);
|
|
7
|
-
|
|
8
|
-
watch(related, (newRelated) => {
|
|
9
|
-
//credential.alignment = newAlignment;
|
|
10
|
-
emit('change', newRelated);
|
|
11
|
-
});
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<template>
|
|
15
|
-
<FormKit
|
|
16
|
-
#default="{ items, node, value }"
|
|
17
|
-
type="list"
|
|
18
|
-
v-model="related"
|
|
19
|
-
name="related"
|
|
20
|
-
dynamic
|
|
21
|
-
>
|
|
22
|
-
<h5>Related Credentials
|
|
23
|
-
<button type="button" @click="() => node.input(value.concat({}))" class="btn btn-sm btn-primary ms-3">
|
|
24
|
-
Add Related Credential
|
|
25
|
-
</button>
|
|
26
|
-
</h5>
|
|
27
|
-
<p class="form-text">A list of credentials related to this one.</p>
|
|
28
|
-
|
|
29
|
-
<FormKit
|
|
30
|
-
type="group"
|
|
31
|
-
wrapper-class="card"
|
|
32
|
-
v-for="(item, index) in items"
|
|
33
|
-
:key="item"
|
|
34
|
-
:index="index"
|
|
35
|
-
>
|
|
36
|
-
<div class="card mb-3">
|
|
37
|
-
<h5 class="card-header">Credential {{index+1}}
|
|
38
|
-
<button type="button" @click="() => node.input(value.filter((_, i) => i !== index))" class="btn btn-secondary btn-sm float-end">
|
|
39
|
-
Remove
|
|
40
|
-
</button>
|
|
41
|
-
</h5>
|
|
42
|
-
|
|
43
|
-
<div class="card-body pb-0">
|
|
44
|
-
<FormKit
|
|
45
|
-
type="hidden"
|
|
46
|
-
name="type"
|
|
47
|
-
:value="[ 'Related' ]"
|
|
48
|
-
/>
|
|
49
|
-
|
|
50
|
-
<FormKit
|
|
51
|
-
type="innerLabelTextInput"
|
|
52
|
-
label="ID"
|
|
53
|
-
name="id"
|
|
54
|
-
inner-class="input-group"
|
|
55
|
-
label-class="input-group-text"
|
|
56
|
-
wrapper-class="required"
|
|
57
|
-
validation="uri:required:trim"
|
|
58
|
-
help="The URI of the related achievement."
|
|
59
|
-
/>
|
|
60
|
-
|
|
61
|
-
<FormKit
|
|
62
|
-
type="innerLabelTextInput"
|
|
63
|
-
label="Language"
|
|
64
|
-
name="inLanguage"
|
|
65
|
-
inner-class="input-group"
|
|
66
|
-
label-class="input-group-text"
|
|
67
|
-
:validation="[['matches', '/^[a-z]{2,4}(-[A-Z][a-z]{3})?(-([A-Z]{2}|[0-9]{3}))?$/']]"
|
|
68
|
-
help="The language of the related achievement as a BCP47 language code."
|
|
69
|
-
/>
|
|
70
|
-
|
|
71
|
-
<FormKit
|
|
72
|
-
type="innerLabelTextInput"
|
|
73
|
-
label="Version"
|
|
74
|
-
name="version"
|
|
75
|
-
inner-class="input-group"
|
|
76
|
-
label-class="input-group-text"
|
|
77
|
-
help="The version of the related achievement."
|
|
78
|
-
/>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</FormKit>
|
|
82
|
-
</FormKit>
|
|
83
|
-
</template>
|
|
84
|
-
|
|
85
|
-
<style>
|
|
86
|
-
.input-group>.form-label {
|
|
87
|
-
margin-bottom: 0;
|
|
88
|
-
}
|
|
89
|
-
</style>
|