Skip to content

Commit

Permalink
Merge pull request #1487 from jay-hodgson/SWC-7067
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-hodgson authored Jan 8, 2025
2 parents 30f191c + 7794c80 commit c20f525
Show file tree
Hide file tree
Showing 13 changed files with 76 additions and 1,484 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ const synapseIdRule: LinkifyRule = {
}

const httpRule: LinkifyRule = {
regex: /((ftp|http|https):\/\/[^ ",]+)/,
regex: /(http:\/\/[^ ",]+)/,
onMatch: value => value,
}
const httpsRule: LinkifyRule = {
regex: /(https:\/\/[^ ",]+)/,
onMatch: value => value,
}
const ftpRule: LinkifyRule = {
regex: /(ftp:\/\/[^ ",]+)/,
onMatch: value => value,
}

Expand Down Expand Up @@ -78,6 +86,8 @@ const cbioPortalRule: LinkifyRule = {

const rules: LinkifyRule[] = [
httpRule,
httpsRule,
ftpRule,
synapseIdRule,
pubMedRule,
sciCrunchResolverRule,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Meta, StoryObj } from '@storybook/react'
import {
DATASET,
EXPERIMENTAL_TOOL,
GENERIC_CARD,
MEDIUM_USER_CARD,
Expand Down Expand Up @@ -58,6 +59,28 @@ const handlePlotClick = (event: QueryWrapperSynapsePlotRowClickEvent) => {
]
executeQueryRequest(requestCopy)
}
export const DataCatalogCards: Story = {
args: {
name: 'Data Catalog',
sql: "SELECT * FROM syn61609402 where includedInDataCatalog = 'true'",
defaultShowPlots: false,
defaultShowSearchBox: true,
hideCopyToClipboard: true,
hideDownload: true,
cardConfiguration: {
type: GENERIC_CARD,
secondaryLabelLimit: 4,
genericCardSchema: {
type: DATASET,
title: 'name',
subTitle: 'community',
description: 'description',
secondaryLabels: ['contributors', 'individuals', 'id', 'link'],
},
},
},
}

export const Cards: Story = {
args: {
name: 'Tools',
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit c20f525

Please sign in to comment.