2.0.0 • Published 18 days ago

@abi-software/map-side-bar v2.0.0

Weekly downloads
-
License
-
Repository
-
Last release
18 days ago

map-side-bar

npm version

The project is developed based on Vite-Vue3. Aims to provide a sidebar for searching capability for SPARC portal.

Customize configuration

See Vite Configuration Reference.

Package installation

npm i @abi-software/map-side-bar

Project Setup

npm install

Compile and Hot-Reload for Development

npm run serve

Compile and Minify for Production

npm run build-bundle

How to use

Import the component and the style from the package.

import { SideBar } from "@abi-software/map-side-bar";
import "@abi-software/map-side-bar/dist/style.css";

The code in template should looks like this

<SideBar
  :envVars="envVars"
  :visible="sideBarVisibility"
  @actionClick="actionClick"
/>

envVars contains environment variables like so:

{
  API_LOCATION: 'http://localhost:5000/',
  ALGOLIA_KEY: 'xxxxxxxxxxxxxxxxxxxxxxxxx',
  ALGOLIA_ID: 'xxxxx',
  ALGOLIA_INDEX: 'k-core_dev_published_time_desc',
}

actionClick event is called when an action button has been clicked on.

Sidebar Data formats

Algolia

Data retrieved from Algolia can be found here: https://github.com/ABI-Software/map-sidebar/blob/3310b165489b10901f50a21e5689ef046251dbd9/src/algolia/algolia.js#L136

[
  'pennsieve.publishDate',  // optional
  'pennsieve.updatedAt', // optional
  'Item.curie', //contains the DOI for the dataset (required)
  'Item.name', // dataset title (required)
  'Item.description', // dataset description (required)
  'objectID', // Pennsieve discover ID (required)
],

Scicrunch

Data retrieved from scicrunch can be found here: https://github.com/nih-sparc/sparc-api/blob/f3444a32964f5340e0ee1f10a08a05839620d098/app/scicrunch_processing_common.py#L25

And mimetypes can be viewed here https://github.com/nih-sparc/sparc-api/blob/f3444a32964f5340e0ee1f10a08a05839620d098/app/scicrunch_processing_common.py#L28

ADDITIONAL_LINKS = 'additionalLinks'
BIOLUCIDA_2D = 'biolucida-2d'
BIOLUCIDA_3D = 'biolucida-3d'
COMMON_IMAGES = 'common-images'
CONTEXT_FILE = 'abi-context-file'
CSV = 'csv'
NAME = 'name'
ORGANS = 'organs'
PLOT_FILE = 'abi-plot'
SEGMENTATION_FILES = 'mbf-segmentation'
SCAFFOLD_DIR = 'abi-scaffold-dir'
SCAFFOLD_FILE = 'abi-scaffold-metadata-file'
THUMBNAIL_IMAGE = 'abi-thumbnail'
SCAFFOLD_VIEW_FILE = 'abi-scaffold-view-file'
SIMULATION_FILE = 'abi-simulation-file'
VIDEO = 'video'
VERSION = 'version'
README = 'readme'
TITLE = 'title'

Note: All are optional except for ‘name’

Sidebar input processing

Sidebar input processing can be viewed here: https://github.com/ABI-Software/map-sidebar/blob/3310b165489b10901f50a21e5689ef046251dbd9/src/components/SidebarContent.vue#L318

It is used to keep the code from attempting to access an object property that does not exist

Context card data format

All fields are strings:

{
  "description": required ,
  "id": optional,
  "samples": [ // array required here (can be empty)
    {
      "annotation": optional,
      "description": required,
      "doi": optional // Doi will be used to link sample to a separate dataset,
      "heading": required,
      "id": required,
      "path": optional // path will be used to link to file location,
      "view": optional // Will be used to link to “views[i].id”
    }
  ],
  "version": // not currently used,
  "views": [ // array required here (can be empty)
    {
      "annotation": optional,
      "description": required,
      "id": required,
      "path": required // relative path to the view file, eg "derivative\\Scaffolds\\scaffoldMap_tenial_view.json",
      "sample": optional // used to link to views to samples
      "thumbnail": optional // technically optional but it won’t look great
    }
  ]
}

An example context card file can be viewed here: https://drive.google.com/file/d/15NVRBny7WGltpMSRbsgMglXo0xOC3-Q9/view?usp=sharing

API Documentation

The API documentation is developed with vitepress and vuese. Documentation pages are in the docs folder.

To run in local development mode

npm run docs:watch

This will start the documentation server with vitepress on port :5173 and watch the components' changes.

2.0.0

18 days ago

1.7.0-vue3.4

3 months ago

1.7.0-vue3.3

3 months ago

1.7.0-vue3.2

3 months ago

1.7.0-vue3.1

3 months ago

1.7.0-vue3.0

3 months ago

1.6.0

4 months ago

1.5.4

5 months ago

1.5.3

6 months ago

1.5.2

6 months ago

1.4.1-beta.4

8 months ago

1.4.1-beta.3

8 months ago

1.4.1-beta.6

8 months ago

1.4.1-beta.5

8 months ago

1.4.1-beta.2

10 months ago

1.5.1

7 months ago

1.5.0

8 months ago

1.3.38-staging

8 months ago

1.3.37-staging

8 months ago

1.3.36-staging

8 months ago

1.4.1-beta.0

11 months ago

1.4.1-beta.1

11 months ago

1.4.0

11 months ago

1.3.39-beta.0

11 months ago

1.3.37

1 year ago

1.3.38

1 year ago

1.3.35

1 year ago

1.3.36

1 year ago

1.3.34

1 year ago

1.3.32-staging

1 year ago

1.3.27-staging

2 years ago

1.3.31

2 years ago

1.3.32

1 year ago

1.3.30

2 years ago

1.3.33

1 year ago

1.3.30-staging

2 years ago

1.3.29-staging

2 years ago

1.3.28

2 years ago

1.3.29

2 years ago

1.3.26-staging

2 years ago

1.3.26

2 years ago

1.3.27

2 years ago

1.3.24-isan-0

2 years ago

1.3.21

2 years ago

1.3.24

2 years ago

1.3.25

2 years ago

1.3.23

2 years ago

1.3.10

2 years ago

1.3.14

2 years ago

1.3.11

2 years ago

1.3.12

2 years ago

1.3.17

2 years ago

1.3.18

2 years ago

1.3.15

2 years ago

1.3.16

2 years ago

1.3.19

2 years ago

1.3.20

2 years ago

1.3.9

2 years ago

1.3.8

2 years ago

1.3.7

2 years ago

1.3.6

2 years ago

1.3.5

2 years ago

1.3.4

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.0-beta.11

2 years ago

1.2.0

2 years ago

1.2.0-beta.9

2 years ago

1.2.0-beta.8

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.1.17-beta.1

2 years ago

1.2.0-beta.5

2 years ago

1.2.0-beta.4

2 years ago

1.2.0-beta.7

2 years ago

1.2.0-beta.6

2 years ago

1.1.18-fixes-1

2 years ago

1.1.18-fixes-3

2 years ago

1.1.18-fixes-2

2 years ago

1.1.18

2 years ago

1.2.0-beta.10

2 years ago

1.2.0-beta.1

2 years ago

1.2.0-beta.0

2 years ago

1.2.0-beta.3

2 years ago

1.2.0-beta.2

2 years ago

1.1.16

2 years ago

1.1.15

2 years ago

1.1.14

2 years ago

1.1.17

2 years ago

1.1.17-beta-1

2 years ago

1.1.13

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.5-beta-1

2 years ago

1.1.12

2 years ago

1.1.11

2 years ago

1.1.3-fix-0

2 years ago

1.1.7-beta.1

2 years ago

1.1.7-beta.0

2 years ago

1.1.4

2 years ago

1.1.5-beta-0

3 years ago

1.1.3

3 years ago

1.1.1

3 years ago

1.1.2

3 years ago

1.1.1-beta.6

3 years ago

1.1.1-beta.5

3 years ago

1.0.13

3 years ago

1.1.1-beta.4

3 years ago

1.1.1-beta.3

3 years ago

1.0.12

3 years ago

1.1.1-beta.2

3 years ago

1.1.0-beta-1

3 years ago

1.1.1-beta.1

3 years ago

1.0.11

3 years ago

1.0.0-hotfix-1

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.10

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago

1.0.0-beta-5

3 years ago

1.0.0-beta-4

3 years ago

1.0.0-beta-3

3 years ago

1.0.0-beta-2

3 years ago

1.0.0-beta-1

3 years ago