2.4.2 • Published 8 months ago

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

Weekly downloads
-
License
-
Repository
-
Last release
8 months 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.4.2-beta.13

8 months ago

2.5.0-beta.0

8 months ago

2.5.0-beta.1

8 months ago

2.5.0-beta.2

8 months ago

2.5.0-beta.3

8 months ago

2.4.2-beta.12

9 months ago

2.4.2-beta.11

9 months ago

2.4.2-beta.10

9 months ago

2.4.2-beta.9

9 months ago

2.4.2-beta.8

9 months ago

2.4.2-beta.7

9 months ago

2.4.2-beta.6

9 months ago

2.4.2-beta.5

9 months ago

2.4.2-beta.4

9 months ago

2.4.2-beta.3

9 months ago

2.4.2-beta.2

9 months ago

2.4.2-beta.1

9 months ago

2.4.2

9 months ago

2.4.2-beta.0

10 months ago

2.4.1

11 months ago

2.4.0

11 months ago

2.4.0-isan-1

12 months ago

2.4.0-isan-2

12 months ago

2.4.0-isan-0

12 months ago

2.3.0

1 year ago

2.3.1

12 months ago

2.2.1-alpha-1

1 year ago

2.2.1-alpha-2

1 year ago

2.4.0-alpha-1

12 months ago

2.2.1-alpha-3

1 year ago

2.3.2-beta.0

11 months ago

2.3.2-beta.1

11 months ago

2.3.2-beta.2

11 months ago

2.3.2-beta.3

11 months ago

2.3.2-beta.4

11 months ago

2.3.2-beta.5

11 months ago

2.2.1-beta.5

1 year ago

2.2.1-beta.4

1 year ago

2.2.1-beta.3

1 year ago

2.2.1-beta.2

1 year ago

2.2.1-beta.1

1 year ago

2.2.1-beta.0

1 year ago

2.2.0

1 year ago

2.0.1

1 year ago

2.1.0

1 year ago

2.0.0

1 year ago

1.7.0-vue3.4

1 year ago

1.7.0-vue3.3

1 year ago

1.7.0-vue3.2

1 year ago

1.7.0-vue3.1

1 year ago

1.7.0-vue3.0

1 year ago

1.6.0

2 years ago

1.5.4

2 years ago

1.5.3

2 years ago

1.5.2

2 years ago

1.4.1-beta.4

2 years ago

1.4.1-beta.3

2 years ago

1.4.1-beta.6

2 years ago

1.4.1-beta.5

2 years ago

1.4.1-beta.2

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.3.38-staging

2 years ago

1.3.37-staging

2 years ago

1.3.36-staging

2 years ago

1.4.1-beta.0

2 years ago

1.4.1-beta.1

2 years ago

1.4.0

2 years ago

1.3.39-beta.0

2 years ago

1.3.37

2 years ago

1.3.38

2 years ago

2.0.0-response.1

2 years ago

2.0.0-response.0

2 years ago

1.3.35

2 years ago

1.3.36

2 years ago

1.3.34

2 years ago

1.3.32-staging

3 years ago

1.3.27-staging

3 years ago

1.3.26-staging-8

3 years ago

1.3.31

3 years ago

1.3.32

3 years ago

1.3.30

3 years ago

1.3.33

3 years ago

1.3.32-staging-2

3 years ago

1.3.30-staging

3 years ago

1.3.29-staging

3 years ago

1.3.28

3 years ago

1.3.29

3 years ago

1.3.26-staging

3 years ago

1.3.26

3 years ago

1.3.27

3 years ago

1.3.24-isan-0

3 years ago

1.3.21

3 years ago

1.3.24

3 years ago

1.3.25

3 years ago

1.3.23

3 years ago

1.3.10

3 years ago

1.3.14

3 years ago

1.3.11

3 years ago

1.3.12

3 years ago

1.3.17

3 years ago

1.3.18

3 years ago

1.3.15

3 years ago

1.3.16

3 years ago

1.3.19

3 years ago

1.3.20

3 years ago

1.3.9

3 years ago

1.3.8

3 years ago

1.3.7

3 years ago

1.3.6

3 years ago

1.3.5

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0-beta.11

3 years ago

1.2.0

3 years ago

1.2.0-beta.9

3 years ago

1.2.0-beta.8

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.1.17-beta.1

3 years ago

1.2.0-beta.5

3 years ago

1.2.0-beta.4

3 years ago

1.2.0-beta.7

3 years ago

1.2.0-beta.6

3 years ago

1.1.18-fixes-1

3 years ago

1.1.18-fixes-3

3 years ago

1.1.18-fixes-2

3 years ago

1.1.18

3 years ago

1.2.0-beta.10

3 years ago

1.2.0-beta.1

3 years ago

1.2.0-beta.0

3 years ago

1.2.0-beta.3

3 years ago

1.2.0-beta.2

3 years ago

1.1.16

3 years ago

1.1.15

3 years ago

1.1.14

3 years ago

1.1.17

3 years ago

1.1.17-beta-1

3 years ago

1.1.13

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.5-beta-1

3 years ago

1.1.12

3 years ago

1.1.11

3 years ago

1.1.3-fix-0

3 years ago

1.1.7-beta.1

3 years ago

1.1.7-beta.0

3 years ago

1.1.4

4 years ago

1.1.5-beta-0

4 years ago

1.1.3

4 years ago

1.1.1

4 years ago

1.1.2

4 years ago

1.1.1-beta.6

4 years ago

1.1.1-beta.5

4 years ago

1.0.13

4 years ago

1.1.1-beta.4

4 years ago

1.1.1-beta.3

4 years ago

1.0.12

4 years ago

1.1.1-beta.2

4 years ago

1.1.0-beta-1

4 years ago

1.1.1-beta.1

4 years ago

1.0.11

4 years ago

1.0.0-hotfix-1

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.10

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago

1.0.0-beta-5

4 years ago

1.0.0-beta-4

4 years ago

1.0.0-beta-3

4 years ago

1.0.0-beta-2

4 years ago

1.0.0-beta-1

4 years ago