
Security News
pnpm 10.16 Adds New Setting for Delayed Dependency Updates
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
ng-daia is an AngularJS module to facilitate access Document Availability Information API (DAIA) display DAIA responses.
npm install ng-daia --safe
bower install ng-daia --safe
See https://gbv.github.io/ng-daia/ for documentation and usage examples!
The demo illustrates display of availability information with directives and filters provided by module ng-daia}. Please have a look at the documentation of each directive/filter.
The following minimal example might help to include ng-daia into your website:
<html ng-app="myApp">
<head>
<script src="angular.min.js"></script>
<script src="ng-daia.min.js"></script>
<script>angular.module('myApp', ['ngDAIA']);</script>
<link href="ng-daia.css" rel="stylesheet" />
</head>
<body>
<div daia-api="http://your-daia-base-url" daia-id="your-document-id">
</div>
</body>
</html>
The default templates, included in ng-daia.js
, can be styled with CSS,
translated with angular-translate, and replaced with the template-url
parameter:
The following CSS classes are used:
daia-response
: the whole responsedaia-result
: the whole resultdaia-document
: each copy of the resultdaia-label
: style of descriptionsavailability
: overall style for display of availabilityservice-label
: style for availability labelsavailability-available
: style for display of available servicesavailability-unavailable
: style for display of unavailable servicesavailability-expected
: style for display of unavailable services with expected availabilityavailability-limitation
: style for limitations (in brackets after the corresponding availability status)returning
: overall style for message concerning 'expected' date and link for preorderingreturning-expected
: style for message concerning 'expected' dateaccess
: style for display of possible access-linksimple-openaccess
: style for simple availability "openaccess"simple-loan
: style for simple availability "loan"simple-presentation
: style for simple availability "presentation"The default templates are fully prepared for internationalization (i18n) with angular-translate. To use the translations module, first include the following in your html:
<script src="../lib/angular-translate.min.js"></script>
There are several ways to manage translations with angular-translate. You might want to add them directly into your myApp
module, or the translations can be put into their own json files and retrieved by your app, which will require an additional package:
<script src="../lib/angular-translate-loader-static-files.min.js"></script>
You then have to extend the app module to enable loading the translations (the filenames would in this case have the format "lang-en.json", etc.):
angular.module('myApp', ['ngDAIA', 'pascalprecht.translate']).config(['$translateProvider', function ($translateProvider) {
$translateProvider.useStaticFilesLoader({
prefix: '../src/translations/lang-',
suffix: '.json'
});
$translateProvider.registerAvailableLanguageKeys(['en', 'de'], {
'en_US':'en','en_UK':'en','de_DE':'de','de_AT':'de','de_CH':'de',
})
$translateProvider.fallbackLanguage('en');
$translateProvider.determinePreferredLanguage();
}]);
As well as exporting the translation tables, this example shows the support for automatic language-detection. The default templates are using the following translation terms:
unknown
available
unavailable
presentation
loan
interloan
none
expected
openaccess
INSTITUTION
: reference label to holding institutionDOCUMENT
: reference label for searched documentCATALOG_ENTRY
: reference label for document linkDEPARTMENT
: label for specific part of the institutionSIGNATURE
: label for alternative id (like shelf mark for physical medium)NO_RECORDS
: message shown when no items can be displayedAVAILABILITY
: label used before unknown
if no items can be displayedEXPECTED_BACK
: messageRESERVATION
: displayed link text for reservation linkACCESS
: label displayed if a direct document link existsSTATUS
: label text for daia-simple
outputThe demo (see demo
directory of source code
repository) contains a more detailed sample application that makes use of
ng-daia
as well as angular-translate. The demo should be run from a server
(e.g. localhost).
See CONTRIBUTING.md
for development documentation.
Contributions and feedback is
appreciated!
Code licensed under the AGPL. Documentation licensed under CC BY 3.0.
DAIA icons (included in daia.css
) are based on
PICOL icons, CC-BY Melih Bilgil.
FAQs
AngularJS module to access DAIA services
The npm package ng-daia receives a total of 0 weekly downloads. As such, ng-daia popularity was classified as not popular.
We found that ng-daia demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.