Skip to content

Commit 5c058b8

Browse files
authored
Merge pull request #332 from kit-data-manager/310-add-rendering-for-spdx-licenses
310 add rendering for spdx licenses
2 parents 1359fde + 26bb6ca commit 5c058b8

File tree

5 files changed

+615
-6
lines changed

5 files changed

+615
-6
lines changed

packages/stencil-library/src/components/pid-component/pid-component.stories.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,32 @@ export const ROR: Story = {
191191
},
192192
};
193193

194+
export const SPDXLong: Story = {
195+
args: {
196+
value: 'https://spdx.org/licenses/Apache-2.0',
197+
},
198+
parameters: {
199+
docs: {
200+
source: {
201+
code: `<pid-component value='https://spdx.org/licenses/Apache-2.0'></pid-component>`,
202+
},
203+
},
204+
},
205+
};
206+
207+
export const SPDXShort: Story = {
208+
args: {
209+
value: 'Apache-2.0',
210+
},
211+
parameters: {
212+
docs: {
213+
source: {
214+
code: `<pid-component value='Apache-2.0'></pid-component>`,
215+
},
216+
},
217+
},
218+
};
219+
194220
export const Date: Story = {
195221
args: {
196222
value: '2022-11-11T08:01:20.557+00:00',

packages/stencil-library/src/components/pid-data-table/pid-data-table.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export class PidDataTable {
151151
<div class="min-w-0 break-words whitespace-normal">
152152
{
153153
// Load a foldable subcomponent if subcomponents are not disabled (hideSubcomponents), and the current level of subcomponents is not the total level of subcomponents. If the subcomponent is on the bottom level of the hierarchy, render just a preview. If the value should not be resolved (isFoldable), just render the value as text.
154-
this.loadSubcomponents && !this.hideSubcomponents && !value.renderDynamically ? (
154+
this.loadSubcomponents && !this.hideSubcomponents && value.renderDynamically ? (
155155
<pid-component
156156
value={value.value}
157157
levelOfSubcomponents={this.levelOfSubcomponents}
@@ -161,7 +161,7 @@ export class PidDataTable {
161161
openByDefault={false}
162162
class="block w-full min-w-0"
163163
/>
164-
) : !this.hideSubcomponents && this.currentLevelOfSubcomponents === this.levelOfSubcomponents && !value.renderDynamically ? (
164+
) : !this.hideSubcomponents && this.currentLevelOfSubcomponents === this.levelOfSubcomponents && value.renderDynamically ? (
165165
<pid-component
166166
value={value.value}
167167
levelOfSubcomponents={this.currentLevelOfSubcomponents}

packages/stencil-library/src/rendererModules/RORType.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export class RORType extends GenericIdentifierType {
145145
// Add external references
146146
if (this.rorData.links && this.rorData.links.length > 0) {
147147
for (const link of this.rorData.links) {
148-
if (link.type && link.type.isEmpty()) {
148+
if (link.type) {
149149
this.items.push(new FoldableItem(35, `Link to ${link.type}`, link.value, 'External link related to the organization'));
150150
} else {
151151
this.items.push(new FoldableItem(35, `Link`, link.value, 'External link related to the organization'));

0 commit comments

Comments
 (0)