aboutsummaryrefslogtreecommitdiffstats
path: root/vnfmarket/common/thirdparty/angular-translate-loader-static-files
diff options
context:
space:
mode:
Diffstat (limited to 'vnfmarket/common/thirdparty/angular-translate-loader-static-files')
-rw-r--r--vnfmarket/common/thirdparty/angular-translate-loader-static-files/.bower.json23
-rw-r--r--vnfmarket/common/thirdparty/angular-translate-loader-static-files/README.md29
-rw-r--r--vnfmarket/common/thirdparty/angular-translate-loader-static-files/angular-translate-loader-static-files.js112
-rw-r--r--vnfmarket/common/thirdparty/angular-translate-loader-static-files/angular-translate-loader-static-files.min.js6
-rw-r--r--vnfmarket/common/thirdparty/angular-translate-loader-static-files/bower.json12
-rw-r--r--vnfmarket/common/thirdparty/angular-translate-loader-static-files/package.json24
6 files changed, 206 insertions, 0 deletions
diff --git a/vnfmarket/common/thirdparty/angular-translate-loader-static-files/.bower.json b/vnfmarket/common/thirdparty/angular-translate-loader-static-files/.bower.json
new file mode 100644
index 00000000..61186227
--- /dev/null
+++ b/vnfmarket/common/thirdparty/angular-translate-loader-static-files/.bower.json
@@ -0,0 +1,23 @@
+{
+ "name": "angular-translate-loader-static-files",
+ "description": "A plugin for Angular Translate",
+ "version": "2.14.0",
+ "main": "./angular-translate-loader-static-files.js",
+ "ignore": [],
+ "author": "Pascal Precht",
+ "license": "MIT",
+ "dependencies": {
+ "angular-translate": "~2.14.0"
+ },
+ "homepage": "https://github.com/PascalPrecht/bower-angular-translate-loader-static-files",
+ "_release": "2.14.0",
+ "_resolution": {
+ "type": "version",
+ "tag": "2.14.0",
+ "commit": "68707379222c461c74833cbbdedb8f31dada160f"
+ },
+ "_source": "https://github.com/PascalPrecht/bower-angular-translate-loader-static-files.git",
+ "_target": "^2.14.0",
+ "_originalSource": "angular-translate-loader-static-files",
+ "_direct": true
+} \ No newline at end of file
diff --git a/vnfmarket/common/thirdparty/angular-translate-loader-static-files/README.md b/vnfmarket/common/thirdparty/angular-translate-loader-static-files/README.md
new file mode 100644
index 00000000..07dfa85c
--- /dev/null
+++ b/vnfmarket/common/thirdparty/angular-translate-loader-static-files/README.md
@@ -0,0 +1,29 @@
+# angular-translate-loader-static-files (bower shadow repository)
+
+This is the _Bower shadow_ repository for *angular-translate-loader-static-files*.
+
+## Bugs and issues
+
+Please file any issues and bugs in our main repository at [angular-translate/angular-translate](https://github.com/angular-translate/angular-translate/issues).
+
+## Usage
+
+### via Bower
+
+```bash
+$ bower install angular-translate-loader-static-files
+```
+
+### via NPM
+
+```bash
+$ npm install angular-translate-loader-static-files
+```
+
+### via cdnjs
+
+Please have a look at https://cdnjs.com/libraries/angular-translate-loader-static-files for specific versions.
+
+## License
+
+Licensed under MIT. See more details at [angular-translate/angular-translate](https://github.com/angular-translate/angular-translate).
diff --git a/vnfmarket/common/thirdparty/angular-translate-loader-static-files/angular-translate-loader-static-files.js b/vnfmarket/common/thirdparty/angular-translate-loader-static-files/angular-translate-loader-static-files.js
new file mode 100644
index 00000000..8a8c47ac
--- /dev/null
+++ b/vnfmarket/common/thirdparty/angular-translate-loader-static-files/angular-translate-loader-static-files.js
@@ -0,0 +1,112 @@
+/*!
+ * angular-translate - v2.14.0 - 2017-02-11
+ *
+ * Copyright (c) 2017 The angular-translate team, Pascal Precht; Licensed MIT
+ */
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define([], function () {
+ return (factory());
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory();
+ } else {
+ factory();
+ }
+}(this, function () {
+
+$translateStaticFilesLoader.$inject = ['$q', '$http'];
+angular.module('pascalprecht.translate')
+/**
+ * @ngdoc object
+ * @name pascalprecht.translate.$translateStaticFilesLoader
+ * @requires $q
+ * @requires $http
+ *
+ * @description
+ * Creates a loading function for a typical static file url pattern:
+ * "lang-en_US.json", "lang-de_DE.json", etc. Using this builder,
+ * the response of these urls must be an object of key-value pairs.
+ *
+ * @param {object} options Options object, which gets prefix, suffix, key, and fileMap
+ */
+.factory('$translateStaticFilesLoader', $translateStaticFilesLoader);
+
+function $translateStaticFilesLoader($q, $http) {
+
+ 'use strict';
+
+ return function (options) {
+
+ if (!options || (!angular.isArray(options.files) && (!angular.isString(options.prefix) || !angular.isString(options.suffix)))) {
+ throw new Error('Couldn\'t load static files, no files and prefix or suffix specified!');
+ }
+
+ if (!options.files) {
+ options.files = [{
+ prefix: options.prefix,
+ suffix: options.suffix
+ }];
+ }
+
+ var load = function (file) {
+ if (!file || (!angular.isString(file.prefix) || !angular.isString(file.suffix))) {
+ throw new Error('Couldn\'t load static file, no prefix or suffix specified!');
+ }
+
+ var fileUrl = [
+ file.prefix,
+ options.key,
+ file.suffix
+ ].join('');
+
+ if (angular.isObject(options.fileMap) && options.fileMap[fileUrl]) {
+ fileUrl = options.fileMap[fileUrl];
+ }
+
+ return $http(angular.extend({
+ url: fileUrl,
+ method: 'GET'
+ }, options.$http))
+ .then(function(result) {
+ return result.data;
+ }, function () {
+ return $q.reject(options.key);
+ });
+ };
+
+ var promises = [],
+ length = options.files.length;
+
+ for (var i = 0; i < length; i++) {
+ promises.push(load({
+ prefix: options.files[i].prefix,
+ key: options.key,
+ suffix: options.files[i].suffix
+ }));
+ }
+
+ return $q.all(promises)
+ .then(function (data) {
+ var length = data.length,
+ mergedData = {};
+
+ for (var i = 0; i < length; i++) {
+ for (var key in data[i]) {
+ mergedData[key] = data[i][key];
+ }
+ }
+
+ return mergedData;
+ });
+ };
+}
+
+$translateStaticFilesLoader.displayName = '$translateStaticFilesLoader';
+return 'pascalprecht.translate';
+
+}));
diff --git a/vnfmarket/common/thirdparty/angular-translate-loader-static-files/angular-translate-loader-static-files.min.js b/vnfmarket/common/thirdparty/angular-translate-loader-static-files/angular-translate-loader-static-files.min.js
new file mode 100644
index 00000000..ce9ad51c
--- /dev/null
+++ b/vnfmarket/common/thirdparty/angular-translate-loader-static-files/angular-translate-loader-static-files.min.js
@@ -0,0 +1,6 @@
+/*!
+ * angular-translate - v2.14.0 - 2017-02-11
+ *
+ * Copyright (c) 2017 The angular-translate team, Pascal Precht; Licensed MIT
+ */
+!function(a,b){"function"==typeof define&&define.amd?define([],function(){return b()}):"object"==typeof exports?module.exports=b():b()}(this,function(){function a(a,b){"use strict";return function(c){if(!(c&&(angular.isArray(c.files)||angular.isString(c.prefix)&&angular.isString(c.suffix))))throw new Error("Couldn't load static files, no files and prefix or suffix specified!");c.files||(c.files=[{prefix:c.prefix,suffix:c.suffix}]);for(var d=function(d){if(!d||!angular.isString(d.prefix)||!angular.isString(d.suffix))throw new Error("Couldn't load static file, no prefix or suffix specified!");var e=[d.prefix,c.key,d.suffix].join("");return angular.isObject(c.fileMap)&&c.fileMap[e]&&(e=c.fileMap[e]),b(angular.extend({url:e,method:"GET"},c.$http)).then(function(a){return a.data},function(){return a.reject(c.key)})},e=[],f=c.files.length,g=0;g<f;g++)e.push(d({prefix:c.files[g].prefix,key:c.key,suffix:c.files[g].suffix}));return a.all(e).then(function(a){for(var b=a.length,c={},d=0;d<b;d++)for(var e in a[d])c[e]=a[d][e];return c})}}return a.$inject=["$q","$http"],angular.module("pascalprecht.translate").factory("$translateStaticFilesLoader",a),a.displayName="$translateStaticFilesLoader","pascalprecht.translate"}); \ No newline at end of file
diff --git a/vnfmarket/common/thirdparty/angular-translate-loader-static-files/bower.json b/vnfmarket/common/thirdparty/angular-translate-loader-static-files/bower.json
new file mode 100644
index 00000000..1f0d21a4
--- /dev/null
+++ b/vnfmarket/common/thirdparty/angular-translate-loader-static-files/bower.json
@@ -0,0 +1,12 @@
+{
+ "name": "angular-translate-loader-static-files",
+ "description": "A plugin for Angular Translate",
+ "version": "2.14.0",
+ "main": "./angular-translate-loader-static-files.js",
+ "ignore": [],
+ "author": "Pascal Precht",
+ "license": "MIT",
+ "dependencies": {
+ "angular-translate": "~2.14.0"
+ }
+}
diff --git a/vnfmarket/common/thirdparty/angular-translate-loader-static-files/package.json b/vnfmarket/common/thirdparty/angular-translate-loader-static-files/package.json
new file mode 100644
index 00000000..aeeb21f1
--- /dev/null
+++ b/vnfmarket/common/thirdparty/angular-translate-loader-static-files/package.json
@@ -0,0 +1,24 @@
+{
+ "name": "angular-translate-loader-static-files",
+ "version": "2.14.0",
+ "description": "Creates a loading function for a typical static file url pattern: \"lang-en_US.json\", \"lang-de_DE.json\", etc. Using this builder, the response of these urls must be an object of key-value pairs.",
+ "main": "angular-translate-loader-static-files.js",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/angular-translate/bower-angular-translate-loader-static-files.git"
+ },
+ "keywords": [
+ "angular",
+ "translate",
+ "loader"
+ ],
+ "author": "Pascal Precht",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/angular-translate/angular-translate/issues"
+ },
+ "homepage": "https://angular-translate.github.io",
+ "dependencies": {
+ "angular-translate": "~2.14.0"
+ }
+}