New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

primo-explore-dom

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

primo-explore-dom

A simple Domain Object Model for Primo 5

  • 0.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-62.5%
Maintainers
1
Weekly downloads
 
Created
Source

TODO:write documentation

Install

This package will extend the newUI through a "Template Package" or "Central Package".

  1. Install and configure primo-explore-devenv
  2. Download a "Template Package" or "Central Package" from the Primo Back Office
  3. Extract the downloaded package to primo-explore-devenv/primo-explore/custom
  4. Rename the "Template Package" directory to reflect your view code
  5. Create a package.json file if you do not have one by running npm init -y
  6. Install and store a reference to this package npm install primo-explore-dom --save-dev
  7. Test. * gulp run --view YOUR_VIEW_CODE * Open your web browser and go to http://localhost:8003/primo-explore/search?vid=YOUR_VIEW_CODE

PS: __ YOUR_VIEW_CODE __ must be replaced with the code you use for your view.

General

If you are using this library to understand the newUI always load debug info first.

  angular.reloadWithDebugInfo();

For now it is not possible to access the $scope and $ctrl without the debug info. The library will throw an error if this is the case and try an alternative method but this does not work for component access. (± will mark methods that absolutely need $scope access)

Check if the library is loaded with debug info enabled

  Primo.isDebugEnabled()

This is an artifact. Should not be used!

  Primo.isPrimoAvailable()

Session

Getting the session id (only available when logged in)

  Primo.explore.session.id

user

TODO

view

TODO

ip

TODO

institution

TODO

Components

Getting available components

The components list changes over time. Some components are only available in certain situations

  Primo.explore.components.keys();

Getting the 'prm-icon' component

  var prmIcons = Primo.explore.components.get('prm-icon');

Examining the prmIcon component

Get component name

  primIcons[0].name

Get DOM element

  primIcons[0].element

Find out css path to component

  primIcons[0].cssPath

Get $scope for component (±)

  primIcons[0].scope()

Get $ctrl form component (±)

  primIcons[0].ctrl()
  primIcons[0].blink()

Records

Getting access to all records

  Primo.explore.records

Mapping all recordid's into a list

  Primo.explore.records.map((m) => m.pnx.control.recordid[0])

Facets

Getting access to all facets

  Primo.explore.facets

Examining a facet

Getting the facet name

  Primo.explore.facets[0].name

Getting facet count

  Primo.explore.facets[0].count

Getting facet values

  Primo.explore.facets[0].values

UI

TODO: Should this go into its own repo?

Active the UI

  Primo.ui.toggle()

Keywords

FAQs

Package last updated on 05 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc