Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
edsilv committed Feb 14, 2018
1 parent 842a1ef commit 797d7c1
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dist/iiif-metadata-component.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/iiif-metadata-component.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// iiif-metadata-component v1.1.3 https://github.com/iiif-commons/iiif-metadata-component#readme
// iiif-metadata-component v1.1.4 https://github.com/iiif-commons/iiif-metadata-component#readme

declare namespace IIIFComponents {
class StringValue {
Expand Down
5 changes: 3 additions & 2 deletions dist/iiif-metadata-component.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// iiif-metadata-component v1.1.3 https://github.com/iiif-commons/iiif-metadata-component#readme
// iiif-metadata-component v1.1.4 https://github.com/iiif-commons/iiif-metadata-component#readme
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.iiifMetadataComponent = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function (global){

Expand Down Expand Up @@ -309,6 +309,7 @@ var IIIFComponents;
var $values = $metadataItem.find('.values');
var originalLabel = item.getLabel();
var label = originalLabel;
var urlPattern = new RegExp("/\w+:(\/?\/?)[^\s]+/gm", "i");
if (label && item.isRootLevel) {
switch (label.toLowerCase()) {
case "attribution":
Expand All @@ -332,7 +333,7 @@ var IIIFComponents;
$metadataItem.addClass(label.toCssClass());
var $value;
// if the value is a URI
if (originalLabel && originalLabel.toLowerCase() === "license") {
if (originalLabel && originalLabel.toLowerCase() === "license" && (urlPattern.exec(item.value[0].value) != null)) {
$value = this._buildMetadataItemURIValue(item.value[0].value);
$values.append($value);
}
Expand Down
4 changes: 2 additions & 2 deletions dist/iiif-metadata-component.min.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions examples/js/iiif-metadata-component.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// iiif-metadata-component v1.1.3 https://github.com/iiif-commons/iiif-metadata-component#readme
// iiif-metadata-component v1.1.4 https://github.com/iiif-commons/iiif-metadata-component#readme
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.iiifMetadataComponent = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function (global){

Expand Down Expand Up @@ -309,6 +309,7 @@ var IIIFComponents;
var $values = $metadataItem.find('.values');
var originalLabel = item.getLabel();
var label = originalLabel;
var urlPattern = new RegExp("/\w+:(\/?\/?)[^\s]+/gm", "i");
if (label && item.isRootLevel) {
switch (label.toLowerCase()) {
case "attribution":
Expand All @@ -332,7 +333,7 @@ var IIIFComponents;
$metadataItem.addClass(label.toCssClass());
var $value;
// if the value is a URI
if (originalLabel && originalLabel.toLowerCase() === "license") {
if (originalLabel && originalLabel.toLowerCase() === "license" && (urlPattern.exec(item.value[0].value) != null)) {
$value = this._buildMetadataItemURIValue(item.value[0].value);
$values.append($value);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iiif-metadata-component",
"version": "1.1.4",
"version": "1.1.5",
"description": "",
"main": "index.js",
"types": "./dist/iiif-metadata-component.d.ts",
Expand Down

0 comments on commit 797d7c1

Please sign in to comment.