angular-mapexplorer
Advanced tools
Comparing version 0.0.13 to 0.1.0
@@ -32,3 +32,5 @@ { | ||
"angular-aria": "^1.5.8", | ||
"mapexplorer-core": "0.1.0" | ||
"mapexplorer-core": "0.1.0", | ||
"angular-ui-ace": "^0.2.3", | ||
"angular-route": "^1.5.8" | ||
}, | ||
@@ -35,0 +37,0 @@ "devDependencies": { |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('angular'), require('angular-animate'), require('angular-material'), require('angular-aria'), require('md-color-picker'), require('mapexplorer-core')) : | ||
typeof define === 'function' && define.amd ? define(['angular', 'angular-animate', 'angular-material', 'angular-aria', 'md-color-picker', 'mapexplorer-core'], factory) : | ||
(global.angularMapexplorer = factory(global.angular$1,global.angularAnimate,global.angularMaterial,global.angularAria,global.mdColorPicker,global.mapexplorerCore)); | ||
}(this, (function (angular$1,angularAnimate,angularMaterial,angularAria,mdColorPicker,mapexplorerCore) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('angular'), require('mapexplorer-core')) : | ||
typeof define === 'function' && define.amd ? define(['angular', 'mapexplorer-core'], factory) : | ||
(global.angularMapexplorer = factory(global.angular,global.mapexplorerCore)); | ||
}(this, (function (angular,mapexplorerCore) { 'use strict'; | ||
angular$1 = 'default' in angular$1 ? angular$1['default'] : angular$1; | ||
angular = 'default' in angular ? angular['default'] : angular; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { | ||
return typeof obj; | ||
} : function (obj) { | ||
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; | ||
}; | ||
function stMerklePathTree() { | ||
return { | ||
restrict: 'E', | ||
scope: { | ||
merklePath: '=' | ||
}, | ||
template: '<svg></svg>', | ||
link: function link(scope, element) { | ||
var merklePathTree = new mapexplorerCore.MerklePathTree(element); | ||
scope.$watch('merklePath', function () { | ||
return merklePathTree.display(scope.merklePath); | ||
}); | ||
} | ||
}; | ||
} | ||
@@ -53,189 +63,2 @@ var classCallCheck = function (instance, Constructor) { | ||
/* | ||
AngularDrop v0.0.1-13b6b1b | ||
(c) 2013 Caitlin Potter & Contributors. http://caitp.github.io/angular-drop | ||
License: MIT | ||
*/ | ||
(function (n, v, q) { | ||
'use strict'; | ||
function r() {}function s() {}var p = { full: "0.0.1-13b6b1b", major: "0", minor: "0", dot: "1", codeName: "badger" }, | ||
l, | ||
u = { "false": !1, "true": !0, "": !0 }, | ||
k = function k(a, d, c) { | ||
Object.defineProperty ? Object.defineProperty(a, d, { get: c, set: function set() {}, configurable: !1, enumerable: !0 }) : a.__defineGetter__ ? a.__defineGetter__(d, c) : a[d] = c(); | ||
}, | ||
t, | ||
w = /^(\s*(\.-?([a-z\u00A0-\u10FFFF]|(\\\d+))([0-9a-z\u00A0-\u10FFFF_-]|(\\\d+))*)\s*)+$/i, | ||
x = function x() { | ||
var a = "matches matchesSelector msMatchesSelector mozMatchesSelector webkitMatchesSelector oMatchesSelector".split(" "); | ||
if ("function" === typeof n.Element && "object" === _typeof(n.Element.prototype)) for (var d = 0, c = a.length; d < c; ++d) { | ||
var e = a[d];if ("function" === typeof n.Element.prototype[e]) { | ||
var h = n.Element.prototype[e];return function (a, b) { | ||
return h.call(a[0], b); | ||
}; | ||
} | ||
}return "function" === typeof $ && "function" === typeof $.prototype.is ? function (a, b) { | ||
return a.is(b); | ||
} : "function" === typeof Sizzle && "function" === typeof Sizzle.matchesSelector ? function (a, b) { | ||
return Sizzle.matchesSelector(a[0], b); | ||
} : function (a, b) { | ||
if (b && w.test(b)) return b = b.replace(/\s+/g, "").replace(".", " ").replace(/^\s+/, "").replace(/\s+$/, ""), a.hasClass(b);throw Error("Only class-based selectors are supported in this browser."); | ||
}; | ||
}, | ||
f = { nodeEq: function nodeEq(a, d) { | ||
return _typeof(("string" === a.nodeName ? a.nodeName.toLowerCase() : a[0].nodeName).toLowerCase()) === d; | ||
}, offset: function offset(a) { | ||
a = a.length ? a[0] : a;var d = { top: 0, left: 0 }, | ||
c = a && a.ownerDocument;if (c) { | ||
c = c.documentElement;if (!f.contains(c, a)) return d;angular.isFunction(a.getBoundingClientRect) && (d = a.getBoundingClientRect());a = f.window(c);return { top: d.top + a.pageYOffset - c.clientTop, left: d.left + a.pageXOffset - c.clientLeft }; | ||
} | ||
}, contains: function contains(a, d) { | ||
var c = 9 === a.nodeType ? a.documentElement : a, | ||
e = d && d.parentNode;return a === e || !(!e || 1 !== e.nodeType || !f.contains(c, e)); | ||
}, window: function window(a) { | ||
a = "undefined" === typeof a.nodeName && "number" === typeof a.length ? a[0] : a;return f.isWindow(a) ? a : 9 === a.nodeType && a.defaultView || a.ownerDocument && (a.ownerDocument.defaultView || a.ownerDocument.parentWindow); | ||
}, isWindow: function isWindow(a) { | ||
return a && a.document && a.location && a.alert && a.setInterval; | ||
}, | ||
swapCss: function swapCss(a, d, c, e) { | ||
var h, | ||
m = {};for (h in d) { | ||
m[h] = a.style[h], a.style[h] = d[h]; | ||
}c = c.apply(a, e || []);for (h in d) { | ||
a.style[h] = m[h]; | ||
}return c; | ||
}, swapDisplay: /^(none|table(?!-c[ea]).+)/, cssShow: { position: "absolute", visibility: "hidden", display: "block" }, size: function size(a) { | ||
function d(a) { | ||
return { width: a.offsetWidth, height: a.offsetHeight }; | ||
}var c = angular.element(a);a = a.nodeName ? a : a[0];return 0 === a.offsetWidth && f.swapDisplay.test(c.css("display")) ? f.swapCss(a, f.cssShow, d, [a]) : d(a); | ||
}, keepSize: function keepSize(a) { | ||
a = f.size(a);a.width += "px";a.height += "px";return a; | ||
}, closest: function closest(a, d) { | ||
a = angular.element(a);if ($.fn && angular.isFunction($.fn.closest)) return a.closest(d);a = a[0];d = d.toLowerCase();do { | ||
if (a.nodeName.toLowerCase() === d) return angular.element(a); | ||
} while (a = a.parentNode); | ||
} }, | ||
y = { dragKeepSize: "keepSize", dragWithin: "dragWithin" }, | ||
z = ["$drag", "$document", "$interpolate", "$timeout", function (a, d, c, e) { | ||
return { restrict: "A", link: function link(e, m, b) { | ||
var g = {};angular.forEach(y, function (a, m) { | ||
if ("undefined" !== typeof b[m]) { | ||
var d;a: if (d = c(b[m], !1)(e), "string" === typeof d) { | ||
var f;if (u.hasOwnProperty(d)) { | ||
d = u[d];break a; | ||
} else f = parseInt(d, 10), f === f && (d = f); | ||
}g[a] = d; | ||
} | ||
});a.draggable(m, g); | ||
} }; | ||
}], | ||
A = function A() { | ||
function a(a) { | ||
angular.isUndefined(a) && (a = n.event || { pageX: 0, pageY: 0, preventDefault: function preventDefault() {} });angular.isFunction(a.preventDefault) || (a.preventDefault = function () {});return a; | ||
}function d(a) { | ||
if ("undefined" !== typeof a && 0 !== a.length) { | ||
var e = f.offset(a);a = f.size(a);e.right = e.left + a.width;e.bottom = e.top + a.height;return e; | ||
} | ||
}this.$get = ["$document", "$drop", function (c, e) { | ||
var h = { isDraggable: function isDraggable(a) { | ||
return !!h.draggable(a, !1); | ||
}, draggable: function draggable(a, b) { | ||
a = angular.element(a);var e = a.data("$draggable");if (e) return e;if (!1 === b) return q;b = angular.extend({ delay: 500, distance: 1 }, b || {});e = new r();e.element = a;e.options = b;a.on("mousedown", e.dragStart);a.data("$draggable", e);return e; | ||
} };r.prototype = { constructor: r, dragStart: function dragStart(e) { | ||
e = a(e);e.preventDefault();var b = angular.isObject(this) && this.constructor === r ? this : h.draggable(this);l && l.dragEnd(e);l = b;b.cssDisplay = b.element.css("display"); | ||
b.dimensions = f.size(b.element);b.hanging || (b.cssPosition = b.element.css("position"), b.options.keepSize && (b.keepSize = { width: b.element[0].style.width, height: b.element[0].style.height }, b.element.css(f.keepSize(b.element))));if ("string" === typeof b.options.dragWithin) { | ||
var g;g = b.options.dragWithin;var k = b.element;g = "" !== g.length ? /^(\.|#)/.test(g) && $.fn && angular.isFunction($.fn.closest) ? d(k.parent().closest(g)) : /^(\^|parent)$/.test(g) ? d(k.parent()) : d(f.closest(k.parent(), g)) : void 0;b.constraints = g; | ||
}b.offset = b.positionAbs = f.offset(b.element);b.offset.scroll = !1;angular.extend(b.offset, { click: { top: e.pageY - b.offset.top, left: e.pageX - b.offset.left } });b.lastMouseY = e.pageY;b.lastMouseX = e.pageX;b.startEvent = e;b.element.css({ position: "absolute", left: b.offset.left, top: b.offset.top });c.on("mousemove", b.drag);c.on("mouseup", b.dragEnd); | ||
}, dragEnd: function dragEnd(a) { | ||
a.preventDefault();c.off("mousemove", self.drag);c.off("mouseup", self.dragEnd);e.drop(a); | ||
}, drag: function drag(e) { | ||
e = a(e);e.preventDefault();var b = l;if (b) { | ||
var d = b.element.prop("style"), | ||
h = e.pageY;e = e.pageX;var c = d.left || 0, | ||
f;f = parseInt(d.top || 0, 10) + (h - b.lastMouseY);c = parseInt(c, 10) + (e - b.lastMouseX);if (!b.constraints || c >= b.constraints.left && c + b.dimensions.width <= b.constraints.right && f >= b.constraints.top && f + b.dimensions.height <= b.constraints.bottom) d.left = c + "px", d.top = f + "px";b.lastMouseY = h;b.lastMouseX = e; | ||
} | ||
}, finish: function finish() { | ||
this.element.css({ position: this.cssPosition });l = this.dimensions = q; | ||
} };k(h, "current", function () { | ||
return l; | ||
});k(h, "version", function () { | ||
return p; | ||
});return h; | ||
}];k(this, "version", function () { | ||
return p; | ||
}); | ||
}, | ||
B = ["$drop", "$parse", function (a, d) { | ||
return { restrict: "A", compile: function compile(c, e) { | ||
return function (e, c, b) { | ||
e = d(b.dropAllowed || "undefined")(e);c = a.droppable(c);e && c.allowedSelectors(e); | ||
}; | ||
} }; | ||
}], | ||
C = function C() { | ||
this.$get = ["$document", "$rootScope", function (a, d) { | ||
var c = { isDroppable: function isDroppable(a) { | ||
return !!$drag.droppable(a, !1); | ||
}, droppable: function droppable(a, d) { | ||
a = angular.element(a);var c = a.data("$droppable");if (c) return c;if (!1 === d) return q;d = angular.extend({ constraints: null, delay: 500, distance: 1 }, d || {});c = new s(); | ||
c.element = a;c.options = d;a.data("$droppable", c);return c; | ||
}, drop: function drop(a, c) { | ||
function f() { | ||
b.hanging = !0;b.element.css({ display: b.cssDisplay });l = q;d.$emit("$badDrop", b); | ||
}if (l && ("undefined" === typeof a && (a = n.event), angular.isObject(a) && ("number" === typeof a.clientX && "number" === typeof a.clientY ? (c = a.clientY, a = a.clientX) : "number" === typeof a.left && "number" === typeof a.top && (c = a.top, a = a.left)), "number" === typeof a && "number" === typeof c)) { | ||
var b = l, | ||
g;b.element.css({ display: "none" });g = v.elementFromPoint(a, c);if (!g) return f(); | ||
3 === g.nodeType && (g = g.parentNode);g = angular.element(g);g = g.inheritedData("$droppable");if (!g || !this.dropAllowed(g, b.element)) return f();g.drop(b);return !0; | ||
} | ||
}, dropAllowed: function dropAllowed(a, d) { | ||
var c = a.allowedSelectors();if (!c || !angular.isArray(c)) return !0;for (var b = 0; b < c.length; ++b) { | ||
var f = c[b];if ("string" === typeof f) { | ||
var k = d;"function" !== typeof t && (t = x());if (t(k, f)) return !0; | ||
} | ||
}return !1; | ||
} };s.prototype = { constructor: s, drop: function drop(a, c) { | ||
a = a || l;if ("number" === typeof a.length || a.nodeName) a = angular.element(a).data("$draggable"); | ||
a && a.constructor === r && (c = angular.extend(c || {}, { display: a.cssDisplay }), this.element.append(a.element), a.options.keepSize && (a.element.css(a.keepSize), a.keepSize = q), a.element.css({ display: c.display }), a.hanging = !1, d.$$phase || d.$apply(), a.finish()); | ||
}, allowedSelectors: function allowedSelectors(a) { | ||
return 0 < arguments.length ? ("string" === typeof a && (a = a.split(",")), angular.isArray(a) && (this.allowed = a), this) : this.allowed; | ||
} };k(c, "version", function () { | ||
return p; | ||
});return c; | ||
}];k(this, "version", function () { | ||
return p; | ||
}); | ||
}, | ||
D = function D() { | ||
this.$get = [function () { | ||
var a = {};k(a, "current", function () { | ||
return l; | ||
});k(a, "version", function () { | ||
return p; | ||
});return a; | ||
}];k(this, "version", function () { | ||
return p; | ||
}); | ||
};(function () { | ||
angular.module("ui.drop", [], ["$provide", function (a) { | ||
a.provider({ $dnd: D, $drag: A, $drop: C }); | ||
}]).directive({ draggable: z, droppable: B }); | ||
})(); | ||
})(window, document); | ||
function stMerklePathTree() { | ||
return { | ||
restrict: 'E', | ||
scope: { | ||
merklePath: '=' | ||
}, | ||
template: '<svg></svg>', | ||
link: function link(scope, element) { | ||
var merklePathTree = new mapexplorerCore.MerklePathTree(element); | ||
scope.$watch('merklePath', function () { | ||
return merklePathTree.display(scope.merklePath); | ||
}); | ||
} | ||
}; | ||
} | ||
stMapExplorer.$inject = ['ChainTreeBuilderService']; | ||
@@ -272,3 +95,3 @@ | ||
scope.tags = []; | ||
var elem = angular$1.element(element[0].querySelector('.scroll'))[0]; | ||
var elem = angular.element(element[0].querySelector('.scroll'))[0]; | ||
var builder = ChainTreeBuilderService.getBuilder(elem); | ||
@@ -308,3 +131,3 @@ | ||
scope.error = null; | ||
if (angular$1.isDefined(scope.chainscript)) { | ||
if (angular.isDefined(scope.chainscript)) { | ||
scope.loading = true; | ||
@@ -535,3 +358,3 @@ MapValidatorService.validate(scope.chainscript).then(function (errors) { | ||
var index = angular$1.module('stratumn.angular-mapexplorer', ['ngAnimate', 'ngMaterial', 'ngAria', 'mdColorPicker', 'ui.drop']).directive('stMapExplorer', stMapExplorer).directive('stMerklePathTree', stMerklePathTree).directive('stMapValidator', stMapValidator).directive('stPromiseLoader', stPromiseLoader).directive('stTagColorPicker', stTagColorPicker).service('AceConfigurationService', AceConfigurationService).service('ChainTreeBuilderService', ChainTreeBuilderService).service('MapValidatorService', MapValidatorService).controller('MapExplorerController', MapExplorer).filter('functionArguments', function () { | ||
var index = angular.module('stratumn.angular-mapexplorer', ['ngAnimate', 'material.components.autocomplete', 'material.components.button', 'material.components.icon', 'material.components.toolbar', 'material.components.progressCircular', 'ngAria', 'mdColorPicker', 'ui.drop', 'ui.ace']).directive('stMapExplorer', stMapExplorer).directive('stMerklePathTree', stMerklePathTree).directive('stMapValidator', stMapValidator).directive('stPromiseLoader', stPromiseLoader).directive('stTagColorPicker', stTagColorPicker).service('AceConfigurationService', AceConfigurationService).service('ChainTreeBuilderService', ChainTreeBuilderService).service('MapValidatorService', MapValidatorService).controller('MapExplorerController', MapExplorer).filter('functionArguments', function () { | ||
return filter; | ||
@@ -538,0 +361,0 @@ }).name; |
{ | ||
"name": "angular-mapexplorer", | ||
"version": "0.0.13", | ||
"version": "0.1.0", | ||
"description": "", | ||
@@ -40,3 +40,2 @@ "author": "Stratumn Team", | ||
"rollup-plugin-babel": "^2.6.1", | ||
"rollup-plugin-bower-resolve": "^0.1.1", | ||
"rollup-plugin-commonjs": "^3.3.1", | ||
@@ -43,0 +42,0 @@ "rollup-plugin-includepaths": "^0.1.5", |
@@ -5,3 +5,2 @@ import babel from 'rollup-plugin-babel'; | ||
import builtins from 'rollup-plugin-node-builtins'; | ||
import bowerResolve from 'rollup-plugin-bower-resolve'; | ||
import commonjs from 'rollup-plugin-commonjs'; | ||
@@ -11,5 +10,2 @@ import globals from 'rollup-plugin-node-globals'; | ||
let pkg = require('./package.json'); | ||
const nodeExternal = Object.keys(pkg.dependencies); | ||
export default { | ||
@@ -30,5 +26,2 @@ plugins: [ | ||
}), | ||
bowerResolve({ | ||
skip: nodeExternal | ||
}), | ||
commonjs(), | ||
@@ -35,0 +28,0 @@ globals() |
import babel from 'rollup-plugin-babel'; | ||
import babelrc from 'babelrc-rollup'; | ||
import angular from './rollup-plugin-angular1'; | ||
import bowerResolve from 'rollup-plugin-bower-resolve'; | ||
@@ -13,4 +12,3 @@ let pkg = require('./package.json'); | ||
angular(), | ||
babel(babelrc()), | ||
bowerResolve() | ||
babel(babelrc()) | ||
], | ||
@@ -17,0 +15,0 @@ external: external, |
import babel from 'rollup-plugin-babel'; | ||
import babelrc from 'babelrc-rollup'; | ||
import angular from './rollup-plugin-angular1'; | ||
import bowerResolve from 'rollup-plugin-bower-resolve'; | ||
@@ -13,4 +12,3 @@ let pkg = require('./package.json'); | ||
angular(), | ||
babel(babelrc()), | ||
bowerResolve(), | ||
babel(babelrc()) | ||
], | ||
@@ -17,0 +15,0 @@ external: external, |
import angular from 'angular'; | ||
import 'angular-animate'; | ||
import 'angular-material'; | ||
import 'angular-aria'; | ||
import 'md-color-picker'; | ||
import 'angular-drop'; | ||
@@ -20,3 +15,5 @@ import stMerklePathTree from './stMerklePathTree.directive'; | ||
export default angular.module('stratumn.angular-mapexplorer', | ||
['ngAnimate', 'ngMaterial', 'ngAria', 'mdColorPicker', 'ui.drop'] | ||
['ngAnimate', 'material.components.autocomplete', 'material.components.button', | ||
'material.components.icon', 'material.components.toolbar', | ||
'material.components.progressCircular', 'ngAria', 'mdColorPicker', 'ui.drop', 'ui.ace'] | ||
) | ||
@@ -23,0 +20,0 @@ .directive('stMapExplorer', stMapExplorer) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39
879260
3022