summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/WebConsole3/frontend/README.md6
-rw-r--r--admin/WebConsole3/frontend/console/lib/globunet/dist/css/globunet-util.min.css1
-rw-r--r--admin/WebConsole3/frontend/console/lib/globunet/dist/js/globunet-util-lte.min.js2
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/index.d.ts2
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/index.js7
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/models/api/resource.d.ts4
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/models/api/resource.js8
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-address.d.ts20
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-address.js30
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-media.d.ts20
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-media.js33
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-user.d.ts11
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-user.js16
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/models/models.d.ts2
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/models/models.js6
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/api.d.ts3
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/api.js8
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/query-options.d.ts12
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/query-options.js29
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/resource.service.d.ts18
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/resource.service.js39
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/serializer.d.ts5
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/serializer.js14
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/sub-resource.service.d.ts19
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/sub-resource.service.js40
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth.d.ts3
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth.js9
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/auth.module.d.ts14
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/auth.module.js65
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/auth.service.d.ts33
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/auth.service.js121
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/token-interceptor.service.d.ts8
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/token-interceptor.service.js34
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/i18n.d.ts1
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/i18n.js4
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/i18n/translate-extract.d.ts1
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/i18n/translate-extract.js6
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/providers.d.ts3
-rw-r--r--admin/WebConsole3/frontend/library/globunet-angular/core/providers/providers.js8
-rw-r--r--admin/WebConsole3/frontend/src/app/app.module.ts4
-rw-r--r--admin/WebConsole3/frontend/src/app/core/sidebar-left-inner/sidebar-left-inner.component.html36
-rw-r--r--admin/WebConsole3/frontend/tsconfig.json5
42 files changed, 686 insertions, 24 deletions
diff --git a/admin/WebConsole3/frontend/README.md b/admin/WebConsole3/frontend/README.md
index d2cb5bde..6a70a21c 100644
--- a/admin/WebConsole3/frontend/README.md
+++ b/admin/WebConsole3/frontend/README.md
@@ -14,6 +14,12 @@ Run `ng generate component component-name` to generate a new component. You can
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
+In some cases its necessary to change the base url in `index.html` file. By default, base url is `"/"`.
+
+The HTML `<base href="..."/>` specifies a base path for resolving relative URLs to assets such as images, scripts, and style sheets. For example, given the `<base href="/my/app/">`, the browser resolves a URL such as `some/place/foo.jpg` into a server request for `my/app/some/place/foo.jpg`. During navigation, the Angular router uses the base href as the base path to component, template, and module files.
+
+Once configured the base href, copy the content of `dist` directory to the desired folder of the server
+
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
diff --git a/admin/WebConsole3/frontend/console/lib/globunet/dist/css/globunet-util.min.css b/admin/WebConsole3/frontend/console/lib/globunet/dist/css/globunet-util.min.css
deleted file mode 100644
index 93f13c72..00000000
--- a/admin/WebConsole3/frontend/console/lib/globunet/dist/css/globunet-util.min.css
+++ /dev/null
@@ -1 +0,0 @@
-gbn-mini-calendar{float:left;display:block;box-sizing:border-box;-moz-box-sizing:border-box;background:#fff;width:300px;border:1px solid #ccc;margin-bottom:10px}gbn-mini-calendar>div.header{float:left;width:100%;background:#2875c7;height:40px;color:#fff}gbn-mini-calendar>div.header>*{height:40px;line-height:40px!important;display:inline-block;vertical-align:middle}gbn-mini-calendar>div.header>i{float:left;width:40px;font-size:1.125em;font-weight:700;position:relative;box-sizing:border-box;-moz-box-sizing:border-box;padding:0 10px;cursor:pointer}gbn-mini-calendar>div.header>i.fa-angle-left{text-align:left}gbn-mini-calendar>div.header>i.fa-angle-right{text-align:right;margin-left:-40px}gbn-mini-calendar>div.header>span{float:left;width:100%;font-weight:700;text-transform:uppercase;box-sizing:border-box;-moz-box-sizing:border-box;padding-left:50px;margin-left:-40px;text-align:center;padding-right:40px;color:inherit}gbn-mini-calendar>div.week{float:left;width:100%;border-top:solid 1px #ccc}gbn-mini-calendar>div.week:first-child{border-top:none}gbn-mini-calendar>div.week>span.day{float:left;width:14.28571429%;box-sizing:border-box;-moz-box-sizing:border-box;border-left:solid 1px #ccc;font-size:.75em;text-align:center;height:30px;line-height:30px!important;display:inline-block;vertical-align:middle;background:#fff;cursor:pointer;color:#000}gbn-mini-calendar>div.week>span.day.disabled{pointer-events:none;color:#000!important;background:rgba(193,66,66,.5)}gbn-mini-calendar>div.week>span.day:first-child{border-left:none}gbn-mini-calendar>div.week>span.day.today{background:#E3F2FF}gbn-mini-calendar>div.week>span.day.different-month{color:silver}gbn-mini-calendar>div.week>span.day.selected{background:#2875c7;color:#fff}gbn-mini-calendar>div.week.names>span{color:#2875c7;font-weight:700} \ No newline at end of file
diff --git a/admin/WebConsole3/frontend/console/lib/globunet/dist/js/globunet-util-lte.min.js b/admin/WebConsole3/frontend/console/lib/globunet/dist/js/globunet-util-lte.min.js
deleted file mode 100644
index 834005af..00000000
--- a/admin/WebConsole3/frontend/console/lib/globunet/dist/js/globunet-util-lte.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-!function(){"use strict";function e(e){}function t(e){e.useStaticFilesLoader({prefix:"assets/i18n/",suffix:".json"}),e.preferredLanguage("en"),e.useLocalStorage(),e.useSanitizeValueStrategy("sanitize")}angular.module("globunet.utils",["pascalprecht.translate"]).config(t).run(e),e.$inject=["JsExtensions"],t.$inject=["$translateProvider"]}(),function(){function e(e,t){var r='<ul class="nav nav-list nav-pills nav-stacked abn-tree">\n <li ng-repeat="row in tree_rows | filter:{visible:true} track by row.branch.uid" ng-animate="\'abn-tree-animate\'" ng-class="\'level-\' + {{ row.level }} + (row.branch.selected ? \' active\':\'\') + \' \' +row.classes.join(\' \')" class="abn-tree-row"><a ng-click="user_clicks_branch(row.branch)"><i ng-class="row.tree_icon" ng-click="row.branch.expanded = !row.branch.expanded" class="indented tree-icon"> </i><span class="indented tree-label">{{ row.label }} </span></a></li>\n</ul>';return{restrict:"E",template:r,replace:!0,scope:{treeData:"=",onSelect:"&",initialSelection:"@",treeControl:"=",onOptionSelect:"&"},link:function(i,a,o){var l,s,c,u,d,f,p,g,m,b,h;if(l=function(e){console.log("ERROR:"+e)},o.template&&(r=o.template,a.html(r),t(a.contents())(i)),null==o.iconExpand&&(o.iconExpand="icon-plus glyphicon glyphicon-plus fa fa-plus"),null==o.iconCollapse&&(o.iconCollapse="icon-minus glyphicon glyphicon-minus fa fa-minus"),null==o.iconLeaf&&(o.iconLeaf="icon-file glyphicon glyphicon-file fa fa-file"),null==o.expandLevel&&(o.expandLevel="3"),c=parseInt(o.expandLevel,10),!i.treeData)return void alert("no treeData defined for the tree!");if(null==i.treeData.length){if(null==treeData.label)return void alert("treeData should be an array of root branches");i.treeData=[treeData]}if(d=function(e){var t,n,r,a,o,l;for(t=function(n,r){var i,a,o,l,s;if(e(n,r),null!=n.children){for(l=n.children,s=[],a=0,o=l.length;a<o;a++)i=l[a],s.push(t(i,r+1));return s}},o=i.treeData,l=[],r=0,a=o.length;r<a;r++)n=o[r],l.push(t(n,1));return l},b=null,m=function(t){if(!t)return null!=b&&(b.selected=!1),void(b=null);if(t!==b){if(null!=b&&(b.selected=!1),t.selected=!0,b=t,s(t),null!=t.onSelect)return e(function(){return t.onSelect(t)});if(null!=i.onSelect)return e(function(){return i.onSelect({branch:t})})}},i.user_clicks_branch=function(e){var t=null;return e!==b?t=m(e):o.toggleSelection&&(t=m(null)),t},i.branch_option_select=function(t){if(null!=i.onOptionSelect){var n={params:{params:t,branch:b}};e(function(){i.onOptionSelect(n)})}},f=function(e){var t;return t=void 0,e.parent_uid&&d(function(n){if(n.uid===e.parent_uid)return t=n}),t},u=function(e,t){var n;if(n=f(e),null!=n)return t(n),u(n,t)},s=function(e){return u(e,function(e){return e.expanded=!0})},i.tree_rows=[],g=function(){var e,t,r,a,l,s;for(d(function(e,t){if(!e.uid)return e.uid=""+Math.random()}),console.log("UIDs are set."),d(function(e){var t,n,r,i,a;if(angular.isArray(e.children)){for(i=e.children,a=[],n=0,r=i.length;n<r;n++)t=i[n],a.push(t.parent_uid=e.uid);return a}}),i.tree_rows=[],d(function(e){var t,n;return e.children?e.children.length>0?(n=function(e){return"string"==typeof e?{label:e,children:[]}:e},e.children=function(){var r,i,a,o;for(a=e.children,o=[],r=0,i=a.length;r<i;r++)t=a[r],o.push(n(t));return o}()):void 0:e.children=[]}),e=function(t,r,a){var l,s,c,u,d,f,p;if(null==r.expanded&&(r.expanded=!1),null==r.classes&&(r.classes=[]),r.noLeaf||r.children&&0!==r.children.length?c=r.expanded?o.iconCollapse:o.iconExpand:(c=o.iconLeaf,n.call(r.classes,"leaf")<0&&r.classes.push("leaf")),i.tree_rows.push({level:t,branch:r,label:r.label,classes:r.classes,tree_icon:c,visible:a}),null!=r.children){for(f=r.children,p=[],u=0,d=f.length;u<d;u++)l=f[u],s=a&&r.expanded,p.push(e(t+1,l,s));return p}},l=i.treeData,s=[],r=0,a=l.length;r<a;r++)t=l[r],s.push(e(1,t,!0));return s},i.$watch("treeData",g,!0),null!=o.initialSelection&&d(function(t){if(t.label===o.initialSelection)return e(function(){return m(t)})}),p=i.treeData.length,console.log("num root branches = "+p),d(function(e,t){return e.level=t,e.expanded=e.level<c}),null!=i.treeControl&&angular.isObject(i.treeControl)){h=i.treeControl,h.expand_all=function(){return d(function(e,t){return e.expanded=!0})},h.collapse_all=function(){return d(function(e,t){return e.expanded=!1})},h.get_first_branch=function(){if(p=i.treeData.length,p>0)return i.treeData[0]},h.select_first_branch=function(){var e;return e=h.get_first_branch(),h.select_branch(e)},h.get_selected_branch=function(){return b},h.get_parent_branch=function(e){return f(e)},h.select_branch=function(e){return m(e),e},h.get_children=function(e){return e.children},h.select_parent_branch=function(e){var t;if(null==e&&(e=h.get_selected_branch()),null!=e&&(t=h.get_parent_branch(e),null!=t))return h.select_branch(t),t},h.add_branch=function(e,t){return null!=e?(e.children.push(t),e.expanded=!0):i.treeData.push(t),t},h.add_root_branch=function(e){return h.add_branch(null,e),e},h.expand_branch=function(e){if(null==e&&(e=h.get_selected_branch()),null!=e)return e.expanded=!0,e},h.collapse_branch=function(e){if(null==e&&(e=b),null!=e)return e.expanded=!1,e},h.get_siblings=function(e){var t,n;if(null==e&&(e=b),null!=e)return t=h.get_parent_branch(e),n=t?t.children:i.treeData},h.get_next_sibling=function(e){var t,n;if(null==e&&(e=b),null!=e&&(n=h.get_siblings(e),p=n.length,t=n.indexOf(e),t<p))return n[t+1]},h.get_prev_sibling=function(e){var t,n;if(null==e&&(e=b),n=h.get_siblings(e),p=n.length,t=n.indexOf(e),t>0)return n[t-1]},h.select_next_sibling=function(e){var t;if(null==e&&(e=b),null!=e&&(t=h.get_next_sibling(e),null!=t))return h.select_branch(t)},h.select_prev_sibling=function(e){var t;if(null==e&&(e=b),null!=e&&(t=h.get_prev_sibling(e),null!=t))return h.select_branch(t)},h.get_first_child=function(e){var t;if(null==e&&(e=b),null!=e&&(null!=(t=e.children)?t.length:void 0)>0)return e.children[0]},h.get_closest_ancestor_next_sibling=function(e){var t,n;return t=h.get_next_sibling(e),null!=t?t:(n=h.get_parent_branch(e),h.get_closest_ancestor_next_sibling(n))},h.get_next_branch=function(e){var t;if(null==e&&(e=b),null!=e)return t=h.get_first_child(e),null!=t?t:t=h.get_closest_ancestor_next_sibling(e)},h.select_next_branch=function(e){var t;if(null==e&&(e=b),null!=e&&(t=h.get_next_branch(e),null!=t))return h.select_branch(t),t},h.last_descendant=function(e){var t;return p=e.children.length,0===p?e:(t=e.children[p-1],h.last_descendant(t))},h.get_prev_branch=function(e){var t,n;if(null==e&&(e=b),null!=e)return n=h.get_prev_sibling(e),null!=n?h.last_descendant(n):t=h.get_parent_branch(e)},h.get_data_structure=function(){var e=[];return v(e,h.select_first_branch()),e};var v=function(e,t){if(t.children&&0!==t.children.length){var n={};angular.extend(n,t.data),n.children=[],e.push(n);for(var r=0;r<t.children.length;r++)v(n.children,t.children[r])}else e.push(t.data)};return h.select_prev_branch=function(e){var t;if(null==e&&(e=b),null!=e&&(t=h.get_prev_branch(e),null!=t))return h.select_branch(t),t}}}}}var t,n=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};t=angular.module("globunet.utils"),t.directive("abnTree",e),e.$inject=["$timeout","$compile"]}.call(this),function(){"use strict";function e(){function e(e){angular.extend(t.templates,e)}var t=this;t.templates={text:'<div class="form-group" ng-class="{{ngClass}}"> <label for="{{field}}">{{label}} <span ng-if="{{required}}" class="symbol required"></span> </label> <input class="form-control" type="text" {{required}} {{contraints}} ng-model="{{model}}" name="{{field}}"> </div>',textarea:'<div class="form-group" ng-class="{{ngClass}}"> <label for="{{field}}">{{label}} <span ng-if="{{required}}" class="symbol required"></span> </label> <textarea class="form-control" type="text" {{required}} {{contraints}} ng-model="{{model}}" name="{{field}}"></textarea> </div>',email:'<div class="form-group" ng-class="{{ngClass}}"> <label for="{{field}}">{{label}} <span ng-if="{{required}}" class="symbol required"></span> </label> <input class="form-control" type="email" {{required}} {{contraints}} ng-model="{{model}}" name="{{field}}"> </div>',password:'<div class="form-group" ng-class="{{ngClass}}"> <label for="{{field}}">{{label}} <span ng-if="{{required}}" class="symbol required"></span> </label> <input class="form-control" type="password" {{required}} {{contraints}} ng-model="{{model}}" name="{{field}}"> </div>',number:'<div class="form-group" ng-class="{{ngClass}}"> <label for="{{field}}">{{label}} <span ng-if="{{required}}" class="symbol required"></span> </label> <input class="form-control" type="number" {{required}} {{contraints}} ng-model="{{model}}" name="{{field}}"> </div>',checkbox:'<div class="checkbox clip-check check-primary"> <input type="checkbox" id="{{field}}" value="{{value}}" checked="" ng-model="{{model}}"> <label for="{{field}}"> {{label}} </label> </div>',select:'<div class="form-group" ng-class="{{ngClass}}"> <label for="{{field}}">{{label}} <span ng-if="{{required}}" class="symbol required"></span> </label> <select {{contraints}} {{ngChange}} class="form-control" {{repeater}} {{required}} ng-model="{{model}}" name="{{field}}"> {{options}} </select> </div>',"select-multiple":'<div class="form-group" ng-class="{{ngClass}}"> <label for="{{field}}">{{label}} <span ng-if="{{options.required}}" class="symbol required"></span> </label> <gbn-select2 select-class="select2 form-control" multiple="multiple" name="{{field}}" collection="{{options.value}}" placeholder="{{placeholder}}" {{options.required}} ng-model="{{model}}" option-value="{{options.output}}"> <gbn-select2-options> {{options.label}} </gbn-select2-options> </gbn-select2> </div>',file:'<div class="form-group" ng-class="{{ngClass}}"> <label for="{{field}}">{{label}} <span ng-if="{{required}}" class="symbol required"></span> </label> <input class="form-control" type="file" {{required}} {{contraints}} ng-model="{{model}}" name="{{field}}"> </div>',date:'<div class="form-group" ng-class="{{ngClass}}"> <label for="{{field}}" class="for-date">{{label}} <span ng-if="{{required}}" class="symbol required"></span> </label> <p class="input-group"> <input type="text" placeholder="{{dateHandler.format}}" class="form-control" uib-datepicker-popup="{{dateHandler.format}}" ng-model="{{model}}" name="{{field}}" is-open="dateHandler.getStatus(\'{{field}}\').open" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="{{required}}" close-text="Close" placeholder="{{dateHandler.format}}" /> <span class="input-group-btn"> <button type="button" class="btn btn-default" ng-click="dateHandler.open($event,\'{{field}}\')"> <i class="glyphicon glyphicon-calendar"></i> </button> </span> </p> </div>',time:'<div class="form-group" ng-class="{{ngClass}}"> <label for="{{field}}" class="for-date">{{label}} <span ng-if="{{required}}" class="symbol required"></span> </label> <p class="input-group"> <div uib-timepicker ng-model="{{model}}" hour-step="1" minute-step="5" show-meridian="ismeridian"></div> </p> </div>',button:'<button type="submit" class="{{buttonCssClass}}">{{buttonText}}</button>'},t.setTemplates=e,this.$get=function(){return t}}function t(e,t,n,r,i,a,o){var l=o.templates,s="<div>void form</div>",c=function(e){var t=e.type,n=t;return"string"===t?n="text":"integer"===t?n="number":"choice"!==t&&"select"!==t||(n="select",e.multiple&&(n="select-multiple")),n},u=function(e,t){var n=t.label;return n||(n=e),i("translate")(n)},d=function(e,t,n){var r="";e=e||"Form";var i=e+"."+t+".$dirty",a=e+"."+t+".$invalid",o=e+"."+t+".$valid",l="";return n.css&&(l=",'"+n.css+"': true"),r="{'has-error':"+i+" && "+a+", 'has-success':"+o+l+"}"},f=function(t,a,o,s){var f="",p=n(a)(t).fields,g=!1;p.rows&&(g=!0);var m=p.rows||[p];for(var b in m){p=m[b],g&&(f+="<div class='row'>");for(var h in p){var v=p[h];if(v.default&&(n(o)(t)||n(o+"={}")(t),n(o)(t)[h]=v.default),"undefined"==typeof v.visible||v.visible===!0){var y=c(v),x=l[y],_={};if(_.field=h,_.label=u(h,v),_.ngClass=d(s,h,v),_.required=v.required||"all"===n(a)(t).required?"required='true'":"",_.model=o+"."+h,_.contraints="","undefined"!=typeof v.read_only&&1==v.read_only&&(_.contraints+="select"===v.type||"select-multiple"===v.type?" disabled = true":" readOnly = true "),"undefined"!=typeof v.max_length&&(_.contraints+=" maxlength='"+v.max_length+"' "),"undefined"!=typeof v.min_length&&(_.contraints+=" minlength='"+v.max_length+"' "),"undefined"!=typeof v.max&&(_.contraints+=" max='"+v.max+"' "),"undefined"!=typeof v.min&&(_.contraints+=" min='"+v.min+"' "),"undefined"!=typeof v.pattern&&(_.contraints+=" pattern='"+v.pattern+"' "),"date"===y&&(_.dateHandler=e.dateHandler),"select"===y){_.options="",v.options.ngChange&&(_.ngChange="ng-change='"+v.options.ngChange+"'");var $,C;if(Array.isArray(v.options))for(var k=0;k<v.options.length;k++)"object"==typeof v.options[k]?(C=i("translate")(Object.keys(v.options[k])[0]),$=v.options[k][C]):($=v.options[k],C=i("translate")(v.options[k])),_.options+="<option value='"+$+"' translate='"+C+"'>"+C+"</option>";else if(v.options.source){var S=v.options.label?"item as item."+v.options.label+" for item in ":"key|translate for (key , value) in ",D=v.options.trackby||"";""!==D||v.options.label||(D=" track by value"),_.repeater="ng-options='"+S+v.options.source+D+"'"}}else"select-multiple"===y&&(_.options=v.options,_.optionLabel=v.optionLabel||"'element $index'","boolean"==typeof v.options.required&&v.options.required===!0||"string"==typeof v.options.required&&"true"===v.options.required?_.options.required="required='true'":_.required="");if("submit"===y&&(x=l.button,x="<div class='"+v.css+"'>"+x+"</div>",_={buttonCssClass:"btn btn-primary",buttonText:"Submit"},_.buttonCssClass=v.buttonCss||_.buttonCssClass,_.buttonText=v.label||_.buttonText),x){var T=r(x);f+=T(_)}}}g&&(f+="</div>")}return n(a)(t).submitButton&&(_={buttonCssClass:"btn btn-primary",buttonText:"Submit"},_.buttonCssClass=n(a)(t).submitButton.cssClass||_.buttonCssClass,_.buttonText=n(a)(t).submitButton.text||_.buttonText,f+=r(l.button)(_)),f};return e.dateHandler||(e.dateHandler=a),{link:function(e,n,r){e.$watch(r.formOptions,function(){s=f(e,r.formOptions,r.formModel,r.name),n.html(s),t(n.contents())(e)})},template:s}}angular.module("globunet.utils").provider("gbnAutoFormConfig",e).directive("gbnAutoForm",t),e.$inject=[],t.$inject=["$rootScope","$compile","$parse","$interpolate","$filter","gbnDateHandler","gbnAutoFormConfig"]}(),function(){"use strict";function e(e,t,n,r){return{restrict:"A",scope:{gbnFileModel:"="},link:function(e,n,r){e.loaded="0";var i='<input type="file" placeholder="{{\'file\'|translate}}" name="attachment"> \t<uib-progressbar value="loaded" type="success">\t\t\t\t\t{{loaded}}%\t\t\t\t</uib-progressbar>';n.html(i),t(n.contents())(e);var a=angular.element(r.inputSelector);a.bind("change",function(t){e.$apply(function(){if(r.multiple?e.gbnFileModel=t.target.files:e.gbnFileModel=t.target.files[0],"true"==r.fileData){var n=[];e.gbnFileModel.length?n=e.gbnFileModel:n.push(e.gbnFileModel);for(var i=0;i<n.length;i++){var a=n[i],o=new FileReader;o.onload=function(t){e.$apply(function(){a.data=t.target.result})},o.onprogress=function(t){e.loaded=Math.round(t.loaded/t.total*100)},o.readAsDataURL(a)}}})})}}}angular.module("globunet.utils").directive("gbnFileModel",e),e.$inject=["$rootScope","$compile","$interpolate","$window"]}(),function(){"use strict";function e(e,t){return{restrict:"A",link:function(n,r,i){n.$watch(i.focus,function(e,t){e&&r[0].focus()}),i.gbnBlur&&r.bind("blur",function(r){e(function(){t(i.gbnBlur)(n)},0)}),r.bind("focus",function(r){e(function(){t(i.gbnFocus)(n)},0)})}}}angular.module("globunet.utils").directive("gbnFocus",e),e.$inject=["$timeout","$parse"]}(),function(){"use strict";function e(e,t,n,r,i,a,o){var l="",s={},c="",u=function(t){for(var n="<div>",r=0;r<t.length;r++)if("string"==typeof t[r]){var i=e["get"+t[r].capitalizeFirstLetter()+"Template"];"function"==typeof i?n+=i(c):s[t[r]]&&(n+=s[t[r]])}return n+"</div>"},d=function(t){t=t||{};var n=t.templateName||"gbn-table-options.html",i=t.tableOptions||e.tableOptions;c=t.arrayName,l=u(i),r.put(n,l)};return{restrict:"A",template:l,link:function(n,r,i){if(n[i.tableOptions]){var c={};c.tableOptions=[],c.resource=n[i.tableOptions].resource,c.arrayName=i.arrayName,c.templateName=i.generateTableOptions,c.tableOptions=n[i.tableOptions].options;for(var u=0;u<n[i.tableOptions].options.length;u++){var f=n[i.tableOptions].options[u];n[i.tableOptions].templates&&n[i.tableOptions].templates[f]&&(s[f]=n[i.tableOptions].templates[f]),"delete"===f&&"function"!=typeof n[e.getDeleteFunctionName(c.arrayName)]&&(n[e.getDeleteFunctionName(c.arrayName)]=function(r){var l=e.getCustomErrorDialogClass()||"";o.swal({title:"Are you sure?",text:"Your will not be able to recover this imaginary file!",type:"warning",showCancelButton:!0,confirmButtonColor:"#DD6B55",confirmButtonText:"Yes, delete it!",cancelButtonText:"No, cancel plx!",closeOnConfirm:!0,closeOnCancel:!0,customClass:l},function(e){e&&n[i.tableOptions].resource.delete(r).then(function(e){var o=t("gbnToUTF8")(t("translate")("globunet.GbnNgTableService.successTitle")),l=t("gbnToUTF8")(t("translate")("globunet.GbnNgTableService.successSavingMessage"));a.pop("success",o,l);var s=n[i.arrayName].indexOfByKey({id:r},"id");s!=-1&&n[i.arrayName].splice(s,1),"function"==typeof n.reloadTable&&n.reloadTable()},function(e){var n=t("gbnToUTF8")(t("translate")("globunet.GbnNgTableService.errorTitle")),r=t("gbnToUTF8")(t("translate")("globunet.GbnNgTableService.errorDeletingMessage"));a.pop("error",n,r)})})})}l=d(c)}}}}angular.module("globunet.utils").directive("generateTableOptions",e),e.$inject=["GbnNgTableServiceConfig","$filter","$parse","$templateCache","ngTableParams","toaster","SweetAlert"]}(),function(){"use strict";function e(e,t,n,r){return{restrict:"E",link:function(n,i,a){function o(e){n[e]&&n[e].reload()}var l=null,s=a.tableParams||"tableParams";"reload"+s.toUpperCase();a.searchModel&&n.$watch(a.searchModel,function(e,t){o(s)});var c=[];a.filterCols&&(c=t(a.filterCols)(n));a.array;l=t(a.array)(n);var u=l?l.length:0;n.$watchCollection(a.array,function(e,t){l=e,o(s)}),n[s]=new r({page:1,count:10,filter:c},{total:u,getData:function(r,i){var o=[];if(l){Array.isArray(l)&&(o=i.sorting()?e("gbnNestedOrderBy")(l,i.orderBy()):l);var s={};if(a.searchModel)if(c)for(var u=0;u<c.length;u++)s[c[u]]=t(a.searchModel)(n);else s=t(a.searchModel)(n);o=i.filter()?e("gbnNestedFilter")(o,s):o,o=o.slice((i.page()-1)*i.count(),i.page()*i.count()),i.total(l.length)}r.resolve(o)}})}}}angular.module("globunet.utils").directive("gbnGenerateTableParams",e),e.$inject=["$filter","$parse","$templateCache","ngTableParams"]}(),function(){"use strict";function e(e,t){var n='<div id="{{diagramId}}" style="background-color: white; border: solid 1px black; width: 100%; height: 550px"></div>';return{restrict:"E",template:n,scope:{diagramId:"@",diagramData:"=",diagramHandler:"=",diagramOptions:"="},link:function(e,t,n){function r(){angular.extend(e.diagramOptions.converters,{}),e.layoutOptions={angle:90,nodeSpacing:10,layerSpacing:40,layerStyle:go.TreeLayout.LayerUniform};var t={"toolManager.hoverDelay":100,allowCopy:!1,layout:d(go.TreeLayout,e.layoutOptions),initialDocumentSpot:go.Spot.TopCenter,initialViewportSpot:go.Spot.TopCenter};e.myDiagram=d(go.Diagram,e.diagramId,t),e.myDiagram.add(i()),e.myDiagram.nodeTemplate=d(go.Node,"Auto",{deletable:!1,toolTip:a()},new go.Binding("text","name"),d(go.Shape,"Rectangle",{fill:"lightgray",stroke:null,strokeWidth:0,stretch:go.GraphObject.Fill,alignment:go.Spot.Center},o()),d(go.TextBlock,{font:"700 12px Droid Serif, sans-serif",textAlign:"center",margin:20,maxSize:new go.Size(80,NaN)},new go.Binding("text","name"))),e.myDiagram.linkTemplate=d(go.Link,{routing:go.Link.Orthogonal,corner:5,selectable:!1},d(go.Shape,{strokeWidth:3,stroke:"#424242"}))}function i(){if(e.diagramOptions.legend){for(var t=e.diagramOptions.legend.title||"Leyend Title",n=[],r=0;r<e.diagramOptions.legend.inputs.length;r++){var i=e.diagramOptions.legend.inputs[r],a=null,o="legend "+r;i.color&&(a=d(go.Shape,"Rectangle",{desiredSize:new go.Size(30,30),fill:i.color,margin:5})),i.text&&(o=d(go.TextBlock,i.text,{font:"700 13px Droid Serif, sans-serif"})),n.push(d(go.Panel,"Horizontal",{row:r+1,alignment:go.Spot.Left},a,o))}var l=new go.Point(-100,100);return d(go.Part,"Table",{position:l,selectable:!1},d(go.TextBlock,t,{row:0,font:"700 14px Droid Serif, sans-serif"}),n)}}function a(){var t=null;if(e.diagramOptions.converters.tooltipTextConverter){var n=e.diagramOptions.converters.tooltipTextConverter._function;t=d(go.Adornment,"Auto",d(go.Shape,"Rectangle",{fill:"whitesmoke",stroke:"black"}),d(go.TextBlock,{font:"bold 8pt Helvetica, bold Arial, sans-serif",wrap:go.TextBlock.WrapFit,margin:5},new go.Binding("text","",n)))}return t}function o(){var t={};if(e.diagramOptions.converters.colorBrushConverter){var n=e.diagramOptions.converters.colorBrushConverter.property||"fill",r=e.diagramOptions.converters.colorBrushConverter.field||"color",i=e.diagramOptions.converters.colorBrushConverter._function;t=new go.Binding(n,r,i)}return t}function l(){e.myDiagram.zoomToFit()}function s(){e.myDiagram.scale=1,e.myDiagram.scrollToRect(myDiagram.findNodeForKey(0).actualBounds)}function c(){e.myDiagram.scale-=.1}function u(){e.myDiagram.scale+=.1}var d=go.GraphObject.make,f=!1;e.diagramId=e.diagramId||"myDiagramDiv",e.$watchCollection("diagramData",function(t,n,r){t&&(f||(f=!0,e.init()),e.myDiagram.model=new go.TreeModel(e.diagramData))}),e.diagramHandler&&(e.diagramHandler.zoomToFit=l,e.diagramHandler.centerOnRoot=s,e.diagramHandler.zoomIn=u,e.diagramHandler.zoomOut=c),e.init=r}}}angular.module("globunet.utils").directive("gbnGojs",e),e.$inject=["$interpolate","$timeout"]}(),function(){"use strict";function e(e,t,n,r){return{link:function(e,t,n){var r=t,i=r.attr("id"),a=r.attr("class"),o=r.attr("src");jQuery.get(o,function(e){var t=jQuery(e).find("svg");"undefined"!=typeof i&&(t=t.attr("id",i)),"undefined"!=typeof a&&(t=t.attr("class",a+" gbn-svg")),t=t.removeAttr("xmlns:a"),!t.attr("viewBox")&&t.attr("height")&&t.attr("width")&&t.attr("viewBox","0 0 "+t.attr("height")+" "+t.attr("width")),r.replaceWith(t)},"xml")}}}angular.module("globunet.utils").directive("gbnInlineSvg",e),e.$inject=["$rootScope","$compile","$interpolate","$window"]}(),function(){"use strict";function e(e){return function(t,n,r){var i=e(r.ngRightClick);n.bind("contextmenu",function(e){t.$apply(function(){e.preventDefault(),i(t,{$event:e})})})}}angular.module("globunet.utils").directive("ngRightClick",e),e.$inject=["$parse"]}(),function(){"use strict";function e(e,t,n,r){var i='<select name="{{name}}" {{required}} class="{{selectClass}}" ng-model="$innerModel" multiple="{{multiple}}" data-placeholder="{{placeholder}}" style="{{style}}"> {{options}} </select>';return{restrict:"E",scope:{name:"@name",required:"@required",selectClass:"@selectClass",ngModel:"@ngModel",multiple:"@multiple",placeholder:"@placeholder",style:"@style",collection:"@",optionValue:"@"},controller:function(e,t,n){this.addOptions=function(t){e.optionLabel=t}},link:function(a,o,l){a.name||(a.name="select2"),("boolean"==typeof a.required&&a.required===!0||"string"==typeof a.required&&"true"===a.required)&&(a.required="required"),a.$collection=n(a.collection)(a.$parent),a.selectClass=a.selectClass||"form-control select2",a.selectClass.indexOf("select2")==-1&&(a.selectClass+=" select2"),a.$innerModel=n(a.ngModel)(a.$parent),a.optionValue=a.optionValue||"option",a.options="<option ng-repeat='option in $collection' value=\"{{"+a.optionValue+'}}">'+a.optionLabel+"</option>";var s=t(i)(a);o.html(s),r(o.contents())(a),a.$parent.$watch(a.collection,function(e,t,n){a.$collection=e}),a.$watch("$innerModel",function(e,t,r){n(a.ngModel+"="+JSON.stringify(e))(a.$parent)}),e(function(){o.find(".select2").select2()},0)}}}function t(e,t,n){return{restrict:"E",require:"^gbnSelect2",scope:{label:"@"},link:function(e,t,n,r){r.addOptions(t.html())}}}angular.module("globunet.utils").directive("gbnSelect2",e).directive("gbnSelect2Options",t),e.$inject=["$timeout","$interpolate","$parse","$compile"],t.$inject=["$timeout","$interpolate","$compile"]}(),function(){"use strict";function e(e){return{restrict:"A",link:function(e,t,n){t.on(n.gbnStopEvent,function(e){e.stopPropagation(),e.stopImmediatePropagation()})}}}angular.module("globunet.utils").directive("gbnStopEvent",e),e.$inject=["$rootScope"]}(),function(){"use strict";function e(e,t,n,r){var i=function(e,t){if("undefined"!=typeof t.gbnVSizeChildren){var n=t.gbnVSizeChildren,i=e.height();angular.forEach(e.find("."+n),function(e,t){angular.element(e).css("height",i)})}else{var a=r.innerHeight,i=a;t.gbnVSizeFromBottom&&(/[0-9]+%/.test(t.gbnVSizeFromBottom)||/[0-9]+/.test(t.gbnVSizeFromBottom)&&(i=a-parseFloat(t.gbnVSizeFromBottom))),e.css("height",i+"px")}};return{link:function(e,t,n){i(t,n),angular.element(r).bind("resize",function(e,r){i(t,n)})}}}angular.module("globunet.utils").directive("gbnVSize",e),e.$inject=["$rootScope","$compile","$interpolate","$window"]}(),function(){"use strict";function e(){return function(e){var t="input_not_string";return"string"==typeof e&&(t=e.charAt(0).toUpperCase()+e.slice(1)),t}}angular.module("globunet.utils").filter("gbnCapitalize",e),e.$inject=[]}(),function(){"use strict";function e(e){var t=this;return this.createObjectFromString=function(e,n){var r=e.indexOf("."),i=e.indexOf(":");if(n||(n={}),r===-1||r>i)n[e.split(":")[0]]=e.split(":")[1]?e.split(":")[1]:"";else{n[e.substring(0,r)]={};var a=e.substring(r+1,e.length);t.createObjectFromString(a,n[e.substring(0,r)])}return n},this.isMatch=function(e,n,r){var i=!1;if("object"==typeof r)for(var a=Object.keys(r),o=0;o<a.length;o++)i=i||t.isMatch(e[n],a[o],r[a[o]]);else{var l=r.toLowerCase();i=e[n].toString().toLowerCase().indexOf(l)!==-1}return i},function(n,r){var i=[],a={};if("object"!=typeof r)i=e("filter")(n,r);else{for(var o in r)if(o.indexOf(".")!==-1){var l=o+":"+r[o];t.createObjectFromString(l,a)}else a[o]=r[o];r=a,i=e("filter")(n,r)}return i}}angular.module("globunet.utils").filter("gbnNestedFilter",e),e.$inject=["$filter"]}(),function(){"use strict";function e(e){return function(t,n,r){function i(e){var t=!1;if("string"==typeof e&&e.indexOf(".")!==-1)t=!0;else if("object"==typeof e)for(var n in e)t=i(e[n])||t;return t}function a(){Array.isArray(n)||(n=[n]);for(var e=0;e<n.length;e++)n[e].indexOf("+")!==-1?(n[e]=n[e].replace("+",""),r=!1):n[e].indexOf("-")!==-1&&(n[e]=n[e].replace("-",""),r=!0)}function o(e){return!isNaN(parseFloat(e))&&isFinite(e)}function l(e,t){return e[t]}function s(e,t){for(var r=0,i=0;0==r&&i<n.length;){var a=n[i],s=a.split(".").reduce(l,e),c=a.split(".").reduce(l,t);o(s)&&o(c)&&(s=Number(s),c=Number(c)),r=s===c?0:s>c?1:-1,i++}return r}var c=[];return i(n)?n?(a(),angular.forEach(t,function(e,t){e.key=t,c.push(e)}),c.sort(s),r&&c.reverse()):c=t:c=e("orderBy")(t,n,r),c}}angular.module("globunet.utils").filter("gbnNestedOrderBy",e),e.$inject=["$filter"]}(),function(){"use strict";function e(){function e(e,t,n){for(;e.toString().indexOf(t)!=-1;)e=e.toString().replace(t,n);return e}return function(t){return null!=t&&(t=e(t,"&#225;","á"),t=e(t,"&#233;","é"),t=e(t,"&#237;","í"),t=e(t,"&#243;","ó"),t=e(t,"&#250;","ú"),t=e(t,"&#252;","ü"),t=e(t,"&#193;","Á"),t=e(t,"&#201;","É"),t=e(t,"&#205;","Í"),t=e(t,"&#211;","Ó"),t=e(t,"&#218;","Ú"),t=e(t,"&#220;","Ü"),t=e(t,"&#241;","ñ"),t=e(t,"&#209;","Ñ"),t=e(t,"&#186;","º"),t=e(t,"&#8364;","€")),t}}angular.module("globunet.utils").filter("gbnToUTF8",e)}(),function(){"use strict";function e(e){var t=e;String.prototype.capitalizeFirstLetter=function(){return this.charAt(0).toUpperCase()+this.slice(1)},Array.prototype.inArray=function(e){var t;for(t=0;t<this.length;t++)if(this[t]==e)return!0;return!1},Array.prototype.indexOfByKey=function(e,n,r){r=r||n;for(var i=0,a=!1,o=0;!a&&o<this.length;)t(r)(this[o])==t(n)(e)&&(a=!0),o++;return i=a?o-1:-1}}angular.module("globunet.utils").service("JsExtensions",e),e.$inject=["$parse"]}(),function(){"use strict";function e(e,t){function n(e,t){return f.methods={},f.options={},f.resource=e,f.options=angular.extend(f.options,t),f.methods=t.methods,r()}function r(){var e=f.methods||{};return e=angular.extend(e,{mockData:[],nextId:1,_options:angular.merge({},f.options),getFunction:i,resource:f.resource,query:function(e){var t=this,n=null,r=null;return t._options.mock?(r=l,n=r.apply(this,arguments)):(r=t.getFunction("query"),n=r.apply(this,arguments).$promise),n},get:function(e){var t=this,n=null,r=null;return t._options.mock?(r=s,n=r.apply(this,arguments)):(r=t.getFunction("get"),n=r.apply(this,arguments).$promise),n},save:function(e){var t=this,n=null,r=null;return t._options.mock?(r=c,n=r.apply(this,arguments)):(r=t.getFunction("save"),n=r.apply(this,arguments).$promise),n},update:function(e){var t=this,n=null,r=null;return t._options.mock?(r=u,n=r.apply(this,arguments)):(r=t.getFunction("update"),n=r.apply(this,arguments).$promise),n},delete:function(e){var t=this,n=null,r=null;return t._options.mock?(r=d,n=r.apply(this,arguments)):(r=t.getFunction("delete"),n=r.apply(this,arguments).$promise),n},options:function(e){var t=this,n=t.getFunction("options");return n.apply(this,arguments).$promise||n.apply(this,arguments)},loadMockData:a,saveMockData:o,init:function(){var e=this;e._options.mock&&e.loadMockData()}}),e.init(),e}function i(e){var t=this,n=t.resource[e];return"undefined"!=typeof t._options.methods&&"function"==typeof t._options.methods[e]&&(n=t._options.methods[e]),n}function a(){var t=this,n=t._options.name;localStorage.getItem(n)?(t.mockData=JSON.parse(localStorage.getItem(n)),t.mockData=e("orderBy")(t.mockData,"id"),0==t.mockData.length?t.nextId=1:t.nextId=parseInt(t.mockData[t.mockData.length-1].id)+1):(t.mockData=[],t.nextId=1,t.saveMockData())}function o(){var e=this,t=e._options.name;localStorage.setItem(t,JSON.stringify(e.mockData))}function l(e){var n=this;return t(function(e,t){e(n.mockData)})}function s(e){var n=this;return t(function(t,r){if(e.id){var i=n.mockData.indexOfByKey(e,"id");i!=-1?t(n.mockData[i]):r({error:{status:404,message:"object not found"}})}else r({error:{status:404,message:"param id not found"}})})}function c(e){var n=this;return t(function(t,r){e.id=n.nextId++,n.mockData.push(e),n.saveMockData(),
-t(e)})}function u(e,n){var r=this;return t(function(t,i){var a=Object.keys(e)[0],o=r.mockData.indexOfByKey(e,a);o!=-1?(angular.extend(r.mockData[o],n),r.saveMockData(),t(r.mockData[o])):i({error:{status:404,message:"object not found"}})})}function d(e){var n=this;return t(function(t,r){var i=Object.keys(e)[0],a=n.mockData.indexOfByKey(e,i);a!=-1?(n.mockData.splice(a,1),n.saveMockData(),t({status:200})):r({error:{status:404,message:"object not found"}})})}var f=this;return f.resource,f.options={},f.getBaseResource=n,f}angular.module("globunet.utils").service("gbnBaseResource",e),e.$inject=["$filter","$q"]}(),function(){"use strict";function e(){function e(e){t.options=angular.extend(t.options,e)}var t=this;t.options={isoFormat:"yyyy-MM-dd",format:"dd-MM-yyyy",formatLong:"dd-MM-yyyy HH:mm"},t.setOptions=e,this.$get=function(){return t}}function t(e,t){var n=this;return this.isoFormat=t.options.isoFormat,this.format=t.options.format,this.formatLong=t.options.formatLong,this.status={},this.getDate=function(e,t){var r="1970-01-01";return t&&moment(e,t).isValid()?r=moment(e,t.toUpperCase()):moment(e).isValid()&&(r=moment(e).format(n.isoFormat.toUpperCase())),r},this.transformToDateFormat=function(t,r,i){return i=i||n.format,t[r]=e("date")(new Date(t[r]),i),t[r]},this.getStatus=function(e){return n.status[e]||(n.status[e]={open:!1}),n.status[e]},this.open=function(e,t){n.status[t]||(n.status[t]={open:!0}),n.status[t].open=!0},this}angular.module("globunet.utils").provider("gbnDateHandlerConfig",e).service("gbnDateHandler",t),e.$inject=[],t.$inject=["$filter","gbnDateHandlerConfig"]}(),function(){"use strict";function e(e,t){return this.validate=function(n,r,i,a,o,l){var s=!0,c=null;if(n.$invalid){var u=null,c=null;for(u in n)"$"!=u[0]&&(null!==c||n[u].$valid||(c=n[u]),n[u].$pristine&&(n[u].$dirty=!0));angular.element(".ng-invalid[name="+c.$name+"]").focus();var d=e("gbnToUTF8")(e("translate")(c.$name)),f=angular.element(".ng-invalid[name="+c.$name+"]").siblings("label");f.length>1&&(d=f[0].text());var p=e("gbnToUTF8")(e("translate")(Object.keys(c.$error)[0]));if(1==r){var g=i||e("gbnToUTF8")(e("translate")("globunet.GbnNgFormValidatorService.errorTitle")),m=a||e("gbnToUTF8")(e("translate")("globunet.GbnNgFormValidatorService.errorMessage",{field:d,error:p}));t.pop("error",g,m)}s=!1,"function"==typeof l&&l(c)}return 1==s&&"function"==typeof o&&o(),s},this.validateAndSave=function(n,r,i,a,o,l,s,c){var u=this;1==u.validate(n,a,o,l)&&i.save(r).then(function(n){if("function"==typeof s)s(n);else{var r=o||e("gbnToUTF8")(e("translate")("globunet.GbnNgFormValidatorService.successTitle")),i=l||e("gbnToUTF8")(e("translate")("globunet.GbnNgFormValidatorService.successSavingMessage"));t.pop("success",r,i)}},function(n){if("function"==typeof c)c(n);else{var r=o||e("gbnToUTF8")(e("translate")("globunet.GbnNgFormValidatorService.errorTitle")),i=l||e("gbnToUTF8")(e("translate")("globunet.GbnNgFormValidatorService.errorSavingMessage"));t.pop("error",r,i)}})},this.validateAndUpdate=function(n,r,i,a,o,l,s,c){var u=this;1==u.validate(n,a,o,l)&&i.update({id:r.id},r).then(function(n){if("function"==typeof s)s(n);else{var r=o||e("gbnToUTF8")(e("translate")("globunet.GbnNgFormValidatorService.successTitle")),i=l||e("gbnToUTF8")(e("translate")("globunet.GbnNgFormValidatorService.successSavingMessage"));t.pop("success",r,i)}},function(n){if("function"==typeof c)c(n);else{var r=o||e("gbnToUTF8")(e("translate")("globunet.GbnNgFormValidatorService.errorTitle")),i=l||e("gbnToUTF8")(e("translate")("globunet.GbnNgFormValidatorService.errorSavingMessage"));t.pop("error",r,i)}})},this}angular.module("globunet.utils").service("GbnNgFormValidatorService",e),e.$inject=["$filter","toaster"]}(),function(){"use strict";function e(){this.tableOptions=["view","edit","delete"],this.customErrorDialogClass=null,this.getViewTemplate=function(e){var t=e.substring(0,e.length-1),n="app."+e+".view({"+t+"Id: "+t+".id})";return"<a class='btn btn-default btn-o btn-xs tooltips btn-opt-view margin-right-5' tooltip-placement='top' tooltip='View' ui-sref=\""+n+"\"><i class='icon-eye'></i>View</a>"},this.getEditTemplate=function(e){var t=e.substring(0,e.length-1),n="app."+e+".view.edit({"+t+"Id: "+t+".id})";return"<a class='btn btn-default btn-o btn-xs tooltips btn-opt-edit margin-right-5' tooltip-placement='top' tooltip='Edit' ui-sref=\""+n+"\"><i class='icon-paper'></i>Edit</a>"};var e=function(e){var t=e.substring(0,e.length-1),n="delete"+t.capitalizeFirstLetter();return n};this.getDeleteFunctionName=e,this.getDeleteTemplate=function(t){var n=t.substring(0,t.length-1),r=e(t)+"("+n+".id)";return"<a class='btn btn-default btn-o btn-xs tooltips btn-opt-delete' tooltip-placement='top' tooltip='Delete' ng-click=\""+r+"\">\t\t\t<i class='icon-cross'></i>\t\t\tDelete</a>"},this.setOptions=function(e){var t=this;t.tableOptions=e},this.setCustomErrorDialogClass=function(e){var t=this;t.customErrorDialogClass=e},this.getCustomErrorDialogClass=function(){var e=this;return e.customErrorDialogClass},this.addOptions=function(e){var t=this;Array.isArray(e)?t.tableOptions=t.tableOptions.concat(e):t.tableOptions.push(e)},this.setOptionsTemplate=function(e,t){var n=this;"function"==typeof t?n["get"+e.capitalizeFirstLetter()+"Template"]=t:n["get"+e.capitalizeFirstLetter()+"Template"]=function(){return t}},this.$get=function(){return this}}angular.module("globunet.utils").provider("GbnNgTableServiceConfig",e).service("GbnNgTableService",function(e,t,n,r,i,a){})}(),function(){"use strict";function e(){function e(e){for(var t=[],n=0;n<7;n++)t.push(moment().locale(e).weekday(n).format("ddd"));return t}function t(e){angular.extend(r.miniCalendarConfig,e),n(r.miniCalendarConfig)}function n(t){t.moment.locale(t.locale),t.month&&t.month.locale(t.locale),t.weekDays=e(t.locale)}var r=this;r.miniCalendarConfig={leftArrow:!0,rightArrow:!0,weekDays:e("en"),disabledDays:[0,6],locale:"en",moment:moment()},r.setOptions=t,r.init=n,this.$get=function(){return r}}function t(e,t,n){return t.put("gbn-mini-calendar.html",'<div class="header"> <i class="fa fa-angle-left" ng-click="previous()" ng-if="miniCalendarConfig.leftArrow"></i> <span>{{month.format("MMMM, YYYY")}}</span> <i class="fa fa-angle-right" ng-click="next()" ng-if="miniCalendarConfig.rightArrow"></i> </div> <div class="week names"> <span class="day" ng-repeat="weekDay in miniCalendarConfig.weekDays"> {{weekDay}} </span> </div> <div class="week" ng-repeat="week in weeks"> <span class="day" ng-class="{ today: day.isToday, \'different-month\': !day.isCurrentMonth, \'selected\': day.selected, \'disabled\': day.disabled }" ng-click="select(day)" ng-repeat="day in week.days"> {{day.number}} </span> </div>'),{restrict:"E",templateUrl:"gbn-mini-calendar.html",scope:{selectHandler:"&",calendarHandler:"&",options:"=options",selected:"=",initialSelected:"="},link:function(e,t,r){function i(t){if(!t.disabled&&(e.selected&&(e.selected.selected=!1),e.selected=t,t.selected=!0,e.selectHandler)){var n=e.selectHandler();n(t)}}function a(){e.month=e.month.clone().add(1,"M");var t=e.month.clone();l(t.weekday(0)),s(e,t,e.month)}function o(){e.month=e.month.clone().subtract(1,"M");var t=e.month.clone();l(t.weekday(0)),s(e,t,e.month)}function l(e){return e.hour(0).minute(0).second(0).millisecond(0)}function s(e,t,n){e.weeks=[];for(var r=!1,i=t.clone(),a=i.month(),o=0;!r;)e.weeks.push({days:c(e,i.clone(),n)}),i.add(1,"w"),r=o++>4,a=i.month()}function c(e,t,n){for(var r=[],i=0;i<7;i++){var a=u.disabledDays&&u.disabledDays.indexOf(t.day())!==-1,o={name:t.format("dd").substring(0,1),number:t.date(),isCurrentMonth:t.month()===n.month(),isToday:t.isSame(new Date,"day"),date:t,disabled:a,selected:!1},l=e.selected?e.selected.date:e.initialSelected;l&&l.isSame(o.date,"date")&&(o.selected=!0,e.selected=o),r.push(o),t=t.clone(),t.add(1,"d")}return r}var u=angular.extend({},n.miniCalendarConfig);e.options&&(angular.extend(u,e.options),n.init(u)),e.miniCalendarConfig=u,e.selected=e.selected,e.month=e.selected&&e.selected.date?e.selected.date.clone():u.moment.clone();var d=e.selected&&e.selected.date?e.selected.date.clone():u.moment.clone();u.month&&(e.month=u.month,d=e.month.clone()),d.date(1),l(d.weekday(0)),s(e,d,e.month),e.calendarHandler&&angular.extend(e.calendarHandler(),{next:a,previous:o}),e.select=i,e.next=a,e.previous=o,e.selected&&i(e.selected)}}}angular.module("globunet.utils").provider("gbnMiniCalendarConfig",e).directive("gbnMiniCalendar",t),t.$inject=["$parse","$templateCache","gbnMiniCalendarConfig"]}();!function(){"use strict";function e(){function e(e){angular.extend(a,e)}var n=this,a={navbarMenuSlimscroll:!0,navbarMenuSlimscrollWidth:"3px",navbarMenuHeight:"200px",animationSpeed:500,sidebarToggleSelector:"[data-toggle='offcanvas']",sidebarPushMenu:!0,sidebarSlimScroll:!0,sidebarExpandOnHover:!1,enableBoxRefresh:!0,enableBSToppltip:!0,BSTooltipSelector:"[data-toggle='tooltip']",enableFastclick:!0,enableControlSidebar:!0,controlSidebarOptions:{toggleBtnSelector:"[data-toggle='control-sidebar']",selector:".control-sidebar",slide:!0},enableBoxWidget:!0,boxWidgetOptions:{boxWidgetIcons:{collapse:"fa-minus",open:"fa-plus",remove:"fa-times"},boxWidgetSelectors:{remove:'[data-widget="remove"]',collapse:'[data-widget="collapse"]'}},directChat:{enable:!0,contactToggleSelector:'[data-widget="chat-pane-toggle"]'},colors:{lightBlue:"#3c8dbc",red:"#f56954",green:"#00a65a",aqua:"#00c0ef",yellow:"#f39c12",blue:"#0073b7",navy:"#001F3F",teal:"#39CCCC",olive:"#3D9970",lime:"#01FF70",orange:"#FF851B",fuchsia:"#F012BE",purple:"#8E24AA",maroon:"#D81B60",black:"#222222",gray:"#d2d6de"},screenSizes:{xs:480,sm:768,md:992,lg:1200}};n.setOptions=e,n.options=a,n.$get=function(){return n}}function n(e,n,a,t){function i(){t.$on("$viewContentLoaded",function(e){n(function(){o()},0);})}function o(){var n=e.options;C.hasClass("hold-transition")&&C.removeClass("hold-transition"),u.layout.activate(),angular.element(".sidebar").length>0&&!p&&(u.tree(".sidebar"),p=!0),n.enableControlSidebar&&!m&&angular.element(n.controlSidebarOptions.selector).length>0&&angular.element(n.controlSidebarOptions.toggleBtnSelector).length>0&&(u.controlSidebar.activate(),m=!0),n.navbarMenuSlimscroll&&"undefined"!=typeof $.fn.slimscroll&&!h&&(angular.element(".navbar .menu").length>0&&angular.element(".navbar .menu").slimscroll({height:n.navbarMenuHeight,alwaysVisible:!1,size:n.navbarMenuSlimscrollWidth}).css("width","100%"),h=!0),n.sidebarPushMenu&&angular.element(n.sidebarToggleSelector).length>0&&p&&!g&&(u.pushMenu.activate(n.sidebarToggleSelector),g=!0),n.enableBSToppltip&&C.tooltip({selector:n.BSTooltipSelector}),n.enableBoxWidget&&!v&&(u.boxWidget.activate(),v=!0),n.enableFastclick&&"undefined"!=typeof FastClick&&!f&&(FastClick.attach(document.body),f=!0),n.directChat.enable&&a.on("click",n.directChat.contactToggleSelector,function(){var e=angular.element(this).parents(".direct-chat").first();e.toggleClass("direct-chat-contacts-open")}),angular.element('.btn-group[data-toggle="btn-toggle"]').length>0&&!b&&(angular.element('.btn-group[data-toggle="btn-toggle"]').each(function(){var e=angular.element(this);angular.element(this).find(".btn").on("click",function(n){e.find(".btn.active").removeClass("active"),angular.element(this).addClass("active"),n.preventDefault()})}),b=!0)}function l(){function n(){i.fix(),i.fixSidebar(),o||0===angular.element(".wrapper").length||(angular.element(window,".wrapper").resize(function(){i.fix(),i.fixSidebar()}),o=!0)}function a(){var n=angular.element(".main-header").outerHeight()+angular.element(".main-footer").outerHeight(),a=angular.element(window).height(),t=angular.element(".sidebar").height();if(C.hasClass("fixed"))angular.element(".content-wrapper, .right-side").css("min-height",a-angular.element(".main-footer").outerHeight());else{var i;a>=t?(angular.element(".content-wrapper, .right-side").css("min-height",a-n),i=a-n):(angular.element(".content-wrapper, .right-side").css("min-height",t),i=t);var o=angular.element(e.options.controlSidebarOptions.selector);"undefined"!=typeof o&&o.height()>i&&angular.element(".content-wrapper, .right-side").css("min-height",o.height())}}function t(){var n=!1;C.hasClass("fixed")?"undefined"==typeof $.fn.slimScroll&&window.console&&window.console.error("Error: the fixed layout requires the slimscroll plugin!"):("undefined"!=typeof $.fn.slimScroll&&angular.element(".sidebar").slimScroll({destroy:!0}).height("auto"),n=!0),n||e.options.sidebarSlimScroll&&"undefined"!=typeof $.fn.slimScroll&&(angular.element(".sidebar").slimScroll({destroy:!0}).height("auto"),angular.element(".sidebar").slimscroll({height:angular.element(window).height()-angular.element(".main-header").height()+"px",color:"rgba(0,0,0,0.2)",size:"3px"}))}var i={},o=!1;return i.activate=n,i.fix=a,i.fixSidebar=t,i}function s(){function n(n){var t=e.options.screenSizes;a.on("click",n,function(e){e.preventDefault(),angular.element(window).width()>t.sm-1?C.hasClass("sidebar-collapse")?C.removeClass("sidebar-collapse").trigger("expanded.pushMenu"):C.addClass("sidebar-collapse").trigger("collapsed.pushMenu"):C.hasClass("sidebar-open")?C.removeClass("sidebar-open").removeClass("sidebar-collapse").trigger("collapsed.pushMenu"):C.addClass("sidebar-open").trigger("expanded.pushMenu")}),angular.element(".content-wrapper").click(function(){angular.element(window).width()<=t.sm-1&&C.hasClass("sidebar-open")&&C.removeClass("sidebar-open")}),(e.options.sidebarExpandOnHover||C.hasClass("fixed")&&C.hasClass("sidebar-mini"))&&l.expandOnHover()}function t(){var n=e.options.screenSizes.sm-1;angular.element(".main-sidebar").hover(function(){C.hasClass("sidebar-mini")&&C.hasClass("sidebar-collapse")&&angular.element(window).width()>n&&l.expand()},function(){C.hasClass("sidebar-mini")&&C.hasClass("sidebar-expanded-on-hover")&&angular.element(window).width()>n&&l.collapse()})}function i(){C.removeClass("sidebar-collapse").addClass("sidebar-expanded-on-hover")}function o(){C.hasClass("sidebar-expanded-on-hover")&&C.removeClass("sidebar-expanded-on-hover").addClass("sidebar-collapse")}var l={};return l.activate=n,l.expandOnHover=t,l.expand=i,l.collapse=o,l}function r(n){var t=e.options.animationSpeed;a.on("click",n+" li a",function(e){var n=angular.element(this),a=n.next();if(a.is(".treeview-menu")&&a.is(":visible")&&!C.hasClass("sidebar-collapse"))a.slideUp(t,function(){a.removeClass("menu-open")}),a.parent("li").removeClass("active");else if(a.is(".treeview-menu")&&!a.is(":visible")){var i=n.parents("ul").first(),o=i.find("ul:visible").slideUp(t);o.removeClass("menu-open");var l=n.parent("li");a.slideDown(t,function(){a.addClass("menu-open"),i.find("li.active").removeClass("active"),l.addClass("active"),u.layout.fix()})}else{var i=n.parents("ul").first();i.find("li.active").removeClass("active");var o=i.find("ul:visible").slideUp(t);o.removeClass("menu-open");var l=n.parent("li");l.addClass("active"),u.layout.fix(),C.hasClass("sidebar-open")&&C.removeClass("sidebar-open").removeClass("sidebar-collapse").trigger("collapsed.pushMenu")}a.is(".treeview-menu")&&e.preventDefault()})}function d(){function n(){var n=e.options.controlSidebarOptions,a=angular.element(n.selector),t=angular.element(n.toggleBtnSelector);t.on("click",function(e){e.preventDefault(),a.hasClass("control-sidebar-open")||C.hasClass("control-sidebar-open")?s.close(a,n.slide):s.open(a,n.slide)});var i=angular.element(".control-sidebar-bg");s._fix(i),C.hasClass("fixed")?s._fixForFixed(a):angular.element(".content-wrapper, .right-side").height()<a.height()&&s._fixForContent(a)}function a(e,n){n?e.addClass("control-sidebar-open"):C.addClass("control-sidebar-open")}function t(e,n){n?e.removeClass("control-sidebar-open"):C.removeClass("control-sidebar-open")}function i(e){var n=this;C.hasClass("layout-boxed")?(e.css("position","absolute"),e.height($(".wrapper").height()),angular.element(window).resize(function(){n._fix(e)})):e.css({position:"fixed",height:"auto"})}function o(e){e.css({position:"fixed","max-height":"100%",overflow:"auto","padding-bottom":"50px"})}function l(e){angular.element(".content-wrapper, .right-side").css("min-height",e.height())}var s={};return s.activate=n,s.open=a,s.close=t,s._fix=i,s._fixForFixed=o,s._fixForContent=l,s}function c(){function n(e){var n=this;e||(e=a),angular.element(e).on("click",n.selectors.collapse,function(e){e.preventDefault(),n.collapse(angular.element(this))}),angular.element(e).on("click",n.selectors.remove,function(e){e.preventDefault(),n.remove(angular.element(this))})}function t(e){var n=this,a=e.parents(".box").first(),t=a.find("> .box-body, > .box-footer, > form >.box-body, > form > .box-footer");a.hasClass("collapsed-box")?(e.children(":first").removeClass(n.icons.open).addClass(n.icons.collapse),t.slideDown(n.animationSpeed,function(){a.removeClass("collapsed-box")})):(e.children(":first").removeClass(n.icons.collapse).addClass(n.icons.open),t.slideUp(n.animationSpeed,function(){a.addClass("collapsed-box")}))}function i(e){var n=this,a=e.parents(".box").first();a.slideUp(n.animationSpeed)}var o={};return o.selectors=e.options.boxWidgetOptions.boxWidgetSelectors,o.icons=e.options.boxWidgetOptions.boxWidgetIcons,o.animationSpeed=e.options.animationSpeed,o.activate=n,o.collapse=t,o.remove=i,o}var u=this,p=!1,g=!1,m=!1,h=!1,f=!1,b=!1,v=!1,C=angular.element("body");return u.layout=l(),u.pushMenu=s(),u.tree=r,u.controlSidebar=d(),u.boxWidget=c(),u.init=i,u}angular.module("gbn-lte-admin",[]).provider("lteAdminConfig",e).service("lteAdminInitService",n),n.$inject=["lteAdminConfig","$timeout","$document","$rootScope"]}(); \ No newline at end of file
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/index.d.ts b/admin/WebConsole3/frontend/library/globunet-angular/core/index.d.ts
new file mode 100644
index 00000000..fa7868db
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/index.d.ts
@@ -0,0 +1,2 @@
+export * from "./models/models";
+export * from "./providers/providers";
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/index.js b/admin/WebConsole3/frontend/library/globunet-angular/core/index.js
new file mode 100644
index 00000000..2c3c81a5
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/index.js
@@ -0,0 +1,7 @@
+"use strict";
+function __export(m) {
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
+}
+Object.defineProperty(exports, "__esModule", { value: true });
+__export(require("./models/models"));
+__export(require("./providers/providers"));
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/models/api/resource.d.ts b/admin/WebConsole3/frontend/library/globunet-angular/core/models/api/resource.d.ts
new file mode 100644
index 00000000..2320d684
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/models/api/resource.d.ts
@@ -0,0 +1,4 @@
+export declare class Resource {
+ id: number;
+ parentId?: number;
+}
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/models/api/resource.js b/admin/WebConsole3/frontend/library/globunet-angular/core/models/api/resource.js
new file mode 100644
index 00000000..d82a6a7d
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/models/api/resource.js
@@ -0,0 +1,8 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+class Resource {
+ constructor() {
+ this.id = 0;
+ }
+}
+exports.Resource = Resource;
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-address.d.ts b/admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-address.d.ts
new file mode 100644
index 00000000..43614eba
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-address.d.ts
@@ -0,0 +1,20 @@
+import { Resource } from "./api/resource";
+export declare class GlobunetCoordinates extends Resource {
+ latitude: number;
+ longitude: number;
+ radius: number;
+}
+export declare class GlobunetAddress extends Resource {
+ formattedAddress: string;
+ streetName: string;
+ streetNumber: string;
+ postalCode: string;
+ locality: string;
+ province: string;
+ provinceCode: string;
+ state: string;
+ stateCode: string;
+ country: string;
+ countryCode: string;
+ coordinates: GlobunetCoordinates;
+}
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-address.js b/admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-address.js
new file mode 100644
index 00000000..f49f46cc
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-address.js
@@ -0,0 +1,30 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const resource_1 = require("./api/resource");
+class GlobunetCoordinates extends resource_1.Resource {
+ constructor() {
+ super(...arguments);
+ this.latitude = 0;
+ this.longitude = 0;
+ this.radius = 0;
+ }
+}
+exports.GlobunetCoordinates = GlobunetCoordinates;
+class GlobunetAddress extends resource_1.Resource {
+ constructor() {
+ super(...arguments);
+ this.formattedAddress = "";
+ this.streetName = "";
+ this.streetNumber = "";
+ this.postalCode = "";
+ this.locality = "";
+ this.province = "";
+ this.provinceCode = "";
+ this.state = "";
+ this.stateCode = "";
+ this.country = "";
+ this.countryCode = "";
+ this.coordinates = new GlobunetCoordinates();
+ }
+}
+exports.GlobunetAddress = GlobunetAddress;
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-media.d.ts b/admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-media.d.ts
new file mode 100644
index 00000000..d8451688
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-media.d.ts
@@ -0,0 +1,20 @@
+import { Resource } from "./api/resource";
+export declare class GlobunetMedia extends Resource {
+ name: string;
+ description: string;
+ enabled: boolean;
+ file: any;
+ contentType: string;
+}
+export declare class GlobunetGalleryHasMedia extends Resource {
+ position: number;
+ enabled: boolean;
+ media: GlobunetMedia;
+}
+export declare class GlobunetGallery extends Resource {
+ name: string;
+ context: string;
+ defaultFormat: string;
+ enabled: boolean;
+ galleryHasMedias: GlobunetGalleryHasMedia;
+}
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-media.js b/admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-media.js
new file mode 100644
index 00000000..63bdbe8e
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-media.js
@@ -0,0 +1,33 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const resource_1 = require("./api/resource");
+class GlobunetMedia extends resource_1.Resource {
+ constructor() {
+ super(...arguments);
+ this.name = "";
+ this.description = "";
+ this.enabled = true;
+ this.contentType = "";
+ }
+}
+exports.GlobunetMedia = GlobunetMedia;
+class GlobunetGalleryHasMedia extends resource_1.Resource {
+ constructor() {
+ super(...arguments);
+ this.position = 0;
+ this.enabled = false;
+ this.media = new GlobunetMedia();
+ }
+}
+exports.GlobunetGalleryHasMedia = GlobunetGalleryHasMedia;
+class GlobunetGallery extends resource_1.Resource {
+ constructor() {
+ super(...arguments);
+ this.name = "";
+ this.context = "";
+ this.defaultFormat = "";
+ this.enabled = false;
+ this.galleryHasMedias = new GlobunetGalleryHasMedia();
+ }
+}
+exports.GlobunetGallery = GlobunetGallery;
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-user.d.ts b/admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-user.d.ts
new file mode 100644
index 00000000..dbcdcde5
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-user.d.ts
@@ -0,0 +1,11 @@
+export declare class GlobunetUser {
+ id: number;
+ username: string;
+ email: string;
+ enabled?: boolean;
+ roles: string[];
+ firstname: string;
+ lastname: string;
+ locale: string;
+ timezone: string;
+}
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-user.js b/admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-user.js
new file mode 100644
index 00000000..b97dce59
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/models/globunet-user.js
@@ -0,0 +1,16 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+class GlobunetUser {
+ constructor() {
+ this.id = 0;
+ this.username = "";
+ this.email = "";
+ this.enabled = false;
+ this.roles = [];
+ this.firstname = "";
+ this.lastname = "";
+ this.locale = "";
+ this.timezone = "";
+ }
+}
+exports.GlobunetUser = GlobunetUser;
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/models/models.d.ts b/admin/WebConsole3/frontend/library/globunet-angular/core/models/models.d.ts
new file mode 100644
index 00000000..3763977d
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/models/models.d.ts
@@ -0,0 +1,2 @@
+export { GlobunetUser } from "./globunet-user";
+export { Resource } from "./api/resource";
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/models/models.js b/admin/WebConsole3/frontend/library/globunet-angular/core/models/models.js
new file mode 100644
index 00000000..a489fbeb
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/models/models.js
@@ -0,0 +1,6 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var globunet_user_1 = require("./globunet-user");
+exports.GlobunetUser = globunet_user_1.GlobunetUser;
+var resource_1 = require("./api/resource");
+exports.Resource = resource_1.Resource;
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api.d.ts b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api.d.ts
new file mode 100644
index 00000000..e63670db
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api.d.ts
@@ -0,0 +1,3 @@
+export { ResourceService } from "./api/resource.service";
+export { SubResourceService } from "./api/sub-resource.service";
+export { Serializer } from "./api/serializer";
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api.js b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api.js
new file mode 100644
index 00000000..2662453c
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api.js
@@ -0,0 +1,8 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var resource_service_1 = require("./api/resource.service");
+exports.ResourceService = resource_service_1.ResourceService;
+var sub_resource_service_1 = require("./api/sub-resource.service");
+exports.SubResourceService = sub_resource_service_1.SubResourceService;
+var serializer_1 = require("./api/serializer");
+exports.Serializer = serializer_1.Serializer;
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/query-options.d.ts b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/query-options.d.ts
new file mode 100644
index 00000000..b9299c82
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/query-options.d.ts
@@ -0,0 +1,12 @@
+export interface QueryBuilder {
+ toQueryMap: () => Map<string, string>;
+ toQueryString: () => string;
+}
+export declare class QueryOptions implements QueryBuilder {
+ offset: number;
+ limit: number;
+ private properties;
+ constructor(props: any);
+ toQueryMap(): Map<string, string>;
+ toQueryString(): string;
+}
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/query-options.js b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/query-options.js
new file mode 100644
index 00000000..5e94b296
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/query-options.js
@@ -0,0 +1,29 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+class QueryOptions {
+ constructor(props) {
+ this.offset = 0;
+ this.limit = 10000;
+ this.properties = {};
+ Object.assign(this.properties, props);
+ }
+ toQueryMap() {
+ const queryMap = new Map();
+ queryMap.set('offset', `${this.offset}`);
+ queryMap.set('limit', `${this.limit}`);
+ for (var prop in this.properties) {
+ if (this.properties.hasOwnProperty(prop)) {
+ queryMap.set(prop, this.properties[prop]);
+ }
+ }
+ return queryMap;
+ }
+ toQueryString() {
+ let queryString = '';
+ this.toQueryMap().forEach((value, key) => {
+ queryString = queryString.concat(`${key}=${value}&`);
+ });
+ return queryString.substring(0, queryString.length - 1);
+ }
+}
+exports.QueryOptions = QueryOptions;
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/resource.service.d.ts b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/resource.service.d.ts
new file mode 100644
index 00000000..8389ceff
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/resource.service.d.ts
@@ -0,0 +1,18 @@
+import { Resource } from "../../models/api/resource";
+import { HttpClient } from '@angular/common/http';
+import { Observable } from 'rxjs';
+import { Serializer } from "./serializer";
+import { QueryOptions } from "./query-options";
+export declare abstract class ResourceService<T extends Resource> {
+ protected httpClient: HttpClient;
+ protected url: string;
+ protected endpoint: string;
+ protected serializer: Serializer;
+ constructor(httpClient: HttpClient, url: string, endpoint: string, serializer: Serializer);
+ create(item: T): Observable<T>;
+ update(item: T): Observable<T>;
+ read(id: number): Observable<T>;
+ list(queryOptions?: QueryOptions): Observable<T[]>;
+ delete(id: number): Observable<Object>;
+ protected convertData(data: any): T[];
+}
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/resource.service.js b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/resource.service.js
new file mode 100644
index 00000000..fe6f862c
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/resource.service.js
@@ -0,0 +1,39 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const operators_1 = require("rxjs/operators");
+class ResourceService {
+ constructor(httpClient, url, endpoint, serializer) {
+ this.httpClient = httpClient;
+ this.url = url;
+ this.endpoint = endpoint;
+ this.serializer = serializer;
+ }
+ create(item) {
+ return this.httpClient
+ .post(`${this.url}/${this.endpoint}`, this.serializer.toJson(item)).pipe(operators_1.map(data => this.serializer.fromJson(data)));
+ }
+ update(item) {
+ return this.httpClient
+ .patch(`${this.url}/${this.endpoint}/${item.id}`, this.serializer.toJson(item)).pipe(operators_1.map(data => this.serializer.fromJson(data)));
+ }
+ read(id) {
+ return this.httpClient
+ .get(`${this.url}/${this.endpoint}/${id}`).pipe(operators_1.map((data) => this.serializer.fromJson(data)));
+ }
+ list(queryOptions) {
+ const params = queryOptions ? "?" + queryOptions.toQueryString() : "";
+ return this.httpClient
+ .get(`${this.url}/${this.endpoint}${params}`).pipe(operators_1.map((data) => this.convertData(data)));
+ }
+ delete(id) {
+ return this.httpClient
+ .delete(`${this.url}/${this.endpoint}/${id}`);
+ }
+ convertData(data) {
+ if (!Array.isArray(data)) {
+ data = [data];
+ }
+ return data.map((item) => this.serializer.fromJson(item));
+ }
+}
+exports.ResourceService = ResourceService;
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/serializer.d.ts b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/serializer.d.ts
new file mode 100644
index 00000000..627b5002
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/serializer.d.ts
@@ -0,0 +1,5 @@
+import { Resource } from "../../models/api/resource";
+export declare abstract class Serializer {
+ fromJson(json: any): Resource;
+ toJson(resource: Resource): any;
+}
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/serializer.js b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/serializer.js
new file mode 100644
index 00000000..a9cf145b
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/serializer.js
@@ -0,0 +1,14 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+class Serializer {
+ fromJson(json) {
+ if (typeof json != "object") {
+ json = { response: json };
+ }
+ return Object.assign({}, json);
+ }
+ toJson(resource) {
+ return JSON.parse(JSON.stringify(resource));
+ }
+}
+exports.Serializer = Serializer;
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/sub-resource.service.d.ts b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/sub-resource.service.d.ts
new file mode 100644
index 00000000..d9142e05
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/sub-resource.service.d.ts
@@ -0,0 +1,19 @@
+import { Resource } from "../../models/api/resource";
+import { HttpClient } from '@angular/common/http';
+import { Observable } from 'rxjs';
+import { Serializer } from "./serializer";
+import { QueryOptions } from "./query-options";
+export declare class SubResourceService<T extends Resource> {
+ private httpClient;
+ private url;
+ private parentEndpoint;
+ private endpoint;
+ private serializer;
+ constructor(httpClient: HttpClient, url: string, parentEndpoint: string, endpoint: string, serializer: Serializer);
+ create(parentId: number, item: T): Observable<T>;
+ update(parentId: number, item: T): Observable<T>;
+ read(parentId: number, id: number): Observable<T>;
+ list(parentId: number, queryOptions?: QueryOptions): Observable<T[]>;
+ delete(parentId: number, id: number): Observable<Object>;
+ protected convertData(data: any): T[];
+}
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/sub-resource.service.js b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/sub-resource.service.js
new file mode 100644
index 00000000..a27772d1
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/api/sub-resource.service.js
@@ -0,0 +1,40 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const operators_1 = require("rxjs/operators");
+class SubResourceService {
+ constructor(httpClient, url, parentEndpoint, endpoint, serializer) {
+ this.httpClient = httpClient;
+ this.url = url;
+ this.parentEndpoint = parentEndpoint;
+ this.endpoint = endpoint;
+ this.serializer = serializer;
+ }
+ create(parentId, item) {
+ return this.httpClient
+ .post(`${this.url}/${this.parentEndpoint}/${parentId}/${this.endpoint}`, this.serializer.toJson(item)).pipe(operators_1.map((data) => this.serializer.fromJson(data)));
+ }
+ update(parentId, item) {
+ return this.httpClient
+ .patch(`${this.url}/${this.parentEndpoint}/${parentId}/${this.endpoint}/${item.id}`, this.serializer.toJson(item)).pipe(operators_1.map((data) => this.serializer.fromJson(data)));
+ }
+ read(parentId, id) {
+ return this.httpClient
+ .get(`${this.url}/${this.parentEndpoint}/${parentId}/${this.endpoint}/${id}`).pipe(operators_1.map((data) => this.serializer.fromJson(data)));
+ }
+ list(parentId, queryOptions) {
+ const params = queryOptions ? "?" + queryOptions.toQueryString() : "";
+ return this.httpClient
+ .get(`${this.url}/${this.parentEndpoint}/${parentId}/${this.endpoint}${params}`).pipe(operators_1.map((data) => this.convertData(data)));
+ }
+ delete(parentId, id) {
+ return this.httpClient
+ .delete(`${this.url}/${this.parentEndpoint}/${parentId}/${this.endpoint}/${id}`);
+ }
+ convertData(data) {
+ if (!Array.isArray(data)) {
+ data = [data];
+ }
+ return data.map((item) => this.serializer.fromJson(item));
+ }
+}
+exports.SubResourceService = SubResourceService;
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth.d.ts b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth.d.ts
new file mode 100644
index 00000000..827ee6b5
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth.d.ts
@@ -0,0 +1,3 @@
+export { AuthModule } from "./auth/auth.module";
+export { AuthConfig, AuthService } from "./auth/auth.service";
+export { TokenInterceptorService } from "./auth/token-interceptor.service";
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth.js b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth.js
new file mode 100644
index 00000000..8dad4869
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth.js
@@ -0,0 +1,9 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var auth_module_1 = require("./auth/auth.module");
+exports.AuthModule = auth_module_1.AuthModule;
+var auth_service_1 = require("./auth/auth.service");
+exports.AuthConfig = auth_service_1.AuthConfig;
+exports.AuthService = auth_service_1.AuthService;
+var token_interceptor_service_1 = require("./auth/token-interceptor.service");
+exports.TokenInterceptorService = token_interceptor_service_1.TokenInterceptorService;
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/auth.module.d.ts b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/auth.module.d.ts
new file mode 100644
index 00000000..8bd4d6c1
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/auth.module.d.ts
@@ -0,0 +1,14 @@
+import { ModuleWithProviders } from '@angular/core';
+import { Observable } from 'rxjs';
+import { AuthConfig } from './auth.service';
+import { AuthService } from './auth.service';
+import { GlobunetUser } from "../../models/globunet-user";
+export declare class AuthModule {
+ private authService;
+ private loggedUser;
+ constructor(authService: AuthService, parentModule: AuthModule);
+ static forRoot(config: AuthConfig): ModuleWithProviders;
+ login(username: string, password: string, user: GlobunetUser): Observable<GlobunetUser>;
+ logout(): void;
+ getLoggedUser(): GlobunetUser;
+}
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/auth.module.js b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/auth.module.js
new file mode 100644
index 00000000..47df72d9
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/auth.module.js
@@ -0,0 +1,65 @@
+"use strict";
+var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
+};
+var __param = (this && this.__param) || function (paramIndex, decorator) {
+ return function (target, key) { decorator(target, key, paramIndex); }
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var AuthModule_1;
+"use strict";
+const core_1 = require("@angular/core");
+const common_1 = require("@angular/common");
+const http_1 = require("@angular/common/http");
+const rxjs_1 = require("rxjs");
+const auth_service_1 = require("./auth.service");
+const auth_service_2 = require("./auth.service");
+const globunet_user_1 = require("../../models/globunet-user");
+let AuthModule = AuthModule_1 = class AuthModule {
+ constructor(authService, parentModule) {
+ this.authService = authService;
+ this.loggedUser = new globunet_user_1.GlobunetUser();
+ if (parentModule) {
+ throw new Error('AuthModule is already loaded. Import it in the AppModule only');
+ }
+ }
+ static forRoot(config) {
+ return {
+ ngModule: AuthModule_1,
+ providers: [
+ { provide: auth_service_1.AuthConfig, useValue: config }
+ ]
+ };
+ }
+ login(username, password, user) {
+ return new rxjs_1.Observable((observer) => {
+ this.authService.getAccessToken(username, password).subscribe(data => {
+ // Obtener los datos del usuario
+ this.authService.me().subscribe(data => {
+ this.loggedUser = Object.assign(user, data);
+ observer.next(this.loggedUser);
+ });
+ }, error => {
+ observer.error(error);
+ });
+ });
+ }
+ logout() {
+ delete this.loggedUser;
+ this.authService.logout();
+ }
+ getLoggedUser() {
+ return this.loggedUser;
+ }
+};
+AuthModule = AuthModule_1 = __decorate([
+ core_1.NgModule({
+ imports: [common_1.CommonModule, http_1.HttpClientModule],
+ providers: [auth_service_2.AuthService]
+ }),
+ __param(0, core_1.Inject(auth_service_2.AuthService)), __param(1, core_1.Optional()), __param(1, core_1.Inject(AuthModule_1)), __param(1, core_1.SkipSelf())
+], AuthModule);
+exports.AuthModule = AuthModule;
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/auth.service.d.ts b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/auth.service.d.ts
new file mode 100644
index 00000000..9843c348
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/auth.service.d.ts
@@ -0,0 +1,33 @@
+import { HttpClient } from '@angular/common/http';
+import { Observable } from 'rxjs';
+import { GlobunetUser } from "../../models/globunet-user";
+export declare class AuthConfig {
+ BASE_URL: string;
+ OAUTH_DOMAIN: string;
+ OAUTH_CLIENT_ID: string;
+ OAUTH_CLIENT_SECRET: string;
+ API_URL: string;
+ constructor(environment: any);
+}
+export declare class AuthService {
+ private http;
+ private token;
+ private refreshToken;
+ private tokenType;
+ private environment;
+ private httpOptions;
+ constructor(config: AuthConfig, http: HttpClient);
+ setAuthorizationToken(data: any): void;
+ getAccessToken(username: string, password: string): Observable<any>;
+ getAuthorizationToken(): string | null;
+ me(): Observable<GlobunetUser>;
+ logout(): void;
+ private log;
+ /**
+ * Handle Http operation that failed.
+ * Let the app continue.
+ * @param operation - name of the operation that failed
+ * @param result - optional value to return as the observable result
+ */
+ private handleError;
+}
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/auth.service.js b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/auth.service.js
new file mode 100644
index 00000000..ddaa899d
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/auth.service.js
@@ -0,0 +1,121 @@
+"use strict";
+var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
+};
+var __param = (this && this.__param) || function (paramIndex, decorator) {
+ return function (target, key) { decorator(target, key, paramIndex); }
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const core_1 = require("@angular/core");
+const http_1 = require("@angular/common/http");
+const rxjs_1 = require("rxjs");
+const operators_1 = require("rxjs/operators");
+class AuthConfig {
+ constructor(environment) {
+ this.BASE_URL = "";
+ this.OAUTH_DOMAIN = "";
+ this.OAUTH_CLIENT_ID = "";
+ this.OAUTH_CLIENT_SECRET = "";
+ this.API_URL = "";
+ if (environment) {
+ this.BASE_URL = environment.BASE_URL || "";
+ this.OAUTH_DOMAIN = environment.OAUTH_DOMAIN || "";
+ this.OAUTH_CLIENT_ID = environment.OAUTH_CLIENT_ID || "";
+ this.OAUTH_CLIENT_SECRET = environment.OAUTH_CLIENT_SECRET || "";
+ this.API_URL = environment.API_URL || "";
+ }
+ }
+}
+exports.AuthConfig = AuthConfig;
+/*
+ Generated class for the AuthService provider.
+
+ See https://angular.io/guide/dependency-injection for more info on providers
+ and Angular DI.
+*/
+let AuthService = class AuthService {
+ constructor(config, http) {
+ this.http = http;
+ this.token = "";
+ this.refreshToken = "";
+ this.tokenType = "";
+ this.httpOptions = {
+ headers: new http_1.HttpHeaders({
+ 'Content-Type': 'application/json',
+ 'Accept': 'application/json'
+ })
+ };
+ console.log('Auth Service started');
+ this.environment = config;
+ }
+ setAuthorizationToken(data) {
+ data = data || {};
+ this.tokenType = data.token_type || "";
+ this.token = data.access_token || "";
+ this.refreshToken = data.refresh_token || "";
+ if (this.tokenType == "bearer") {
+ this.httpOptions.headers = this.httpOptions.headers.set("Authorization", "Bearer " + data.access_token);
+ }
+ else {
+ this.httpOptions.headers = new http_1.HttpHeaders({
+ 'Content-Type': 'application/json',
+ 'Accept': 'application/json'
+ });
+ }
+ }
+ getAccessToken(username, password) {
+ var url = this.environment.BASE_URL + this.environment.OAUTH_DOMAIN + "?client_id=" + this.environment.OAUTH_CLIENT_ID + "&client_secret=" + this.environment.OAUTH_CLIENT_SECRET + "&grant_type=password&username=" + username + "&password=" + password;
+ return this.http.get(url).pipe(operators_1.map(data => {
+ this.setAuthorizationToken(data);
+ return data;
+ }), operators_1.catchError((error) => {
+ return this.handleError(error);
+ }));
+ }
+ getAuthorizationToken() {
+ return this.httpOptions.headers.get("Authorization");
+ }
+ me() {
+ return this.http.get(this.environment.API_URL + "/user/me");
+ }
+ logout() {
+ // Borrar datos de token
+ this.setAuthorizationToken({});
+ }
+ log(message) {
+ console.log('AuthService: ${message}');
+ }
+ /**
+ * Handle Http operation that failed.
+ * Let the app continue.
+ * @param operation - name of the operation that failed
+ * @param result - optional value to return as the observable result
+ */
+ handleError(error) {
+ let msg = 'Something bad happened; please try again later.';
+ if (error.error instanceof ErrorEvent) {
+ // A client-side or network error occurred. Handle it accordingly.
+ msg = 'An error occurred:' + error.error.message;
+ }
+ else if (error.error instanceof Object) {
+ // The backend returned an unsuccessful response code.
+ // The response body may contain clues as to what went wrong,
+ let errorObject = error.error;
+ msg = `Backend returned code ${error.status}, ` + `body was: ${errorObject.error}`;
+ }
+ console.error(msg);
+ // return an observable with a user-facing error message
+ return rxjs_1.throwError(msg);
+ }
+ ;
+};
+AuthService = __decorate([
+ core_1.Injectable({
+ providedIn: 'root'
+ }),
+ __param(0, core_1.Inject(AuthConfig)), __param(1, core_1.Inject(http_1.HttpClient))
+], AuthService);
+exports.AuthService = AuthService;
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/token-interceptor.service.d.ts b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/token-interceptor.service.d.ts
new file mode 100644
index 00000000..2ff5c25c
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/token-interceptor.service.d.ts
@@ -0,0 +1,8 @@
+import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
+import { Observable } from 'rxjs';
+import { AuthService } from './auth.service';
+export declare class TokenInterceptorService implements HttpInterceptor {
+ auth: AuthService;
+ constructor(auth: AuthService);
+ intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
+}
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/token-interceptor.service.js b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/token-interceptor.service.js
new file mode 100644
index 00000000..0adf247b
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/auth/token-interceptor.service.js
@@ -0,0 +1,34 @@
+"use strict";
+var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
+};
+var __param = (this && this.__param) || function (paramIndex, decorator) {
+ return function (target, key) { decorator(target, key, paramIndex); }
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const core_1 = require("@angular/core");
+const auth_service_1 = require("./auth.service");
+let TokenInterceptorService = class TokenInterceptorService {
+ constructor(auth) {
+ this.auth = auth;
+ }
+ intercept(request, next) {
+ const token = this.auth.getAuthorizationToken();
+ if (token != null) {
+ request = request.clone({
+ setHeaders: {
+ Authorization: token
+ }
+ });
+ }
+ return next.handle(request);
+ }
+};
+TokenInterceptorService = __decorate([
+ core_1.Injectable(),
+ __param(0, core_1.Inject(auth_service_1.AuthService))
+], TokenInterceptorService);
+exports.TokenInterceptorService = TokenInterceptorService;
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/i18n.d.ts b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/i18n.d.ts
new file mode 100644
index 00000000..2e200959
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/i18n.d.ts
@@ -0,0 +1 @@
+export { tr } from "./i18n/translate-extract";
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/i18n.js b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/i18n.js
new file mode 100644
index 00000000..a51331bc
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/i18n.js
@@ -0,0 +1,4 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var translate_extract_1 = require("./i18n/translate-extract");
+exports.tr = translate_extract_1.tr;
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/i18n/translate-extract.d.ts b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/i18n/translate-extract.d.ts
new file mode 100644
index 00000000..dec09e0b
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/i18n/translate-extract.d.ts
@@ -0,0 +1 @@
+export declare function tr(str: string): string;
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/i18n/translate-extract.js b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/i18n/translate-extract.js
new file mode 100644
index 00000000..d54d7582
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/i18n/translate-extract.js
@@ -0,0 +1,6 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+function tr(str) {
+ return str;
+}
+exports.tr = tr;
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/providers.d.ts b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/providers.d.ts
new file mode 100644
index 00000000..6e8128d4
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/providers.d.ts
@@ -0,0 +1,3 @@
+export * from "./api";
+export * from "./auth";
+export * from "./i18n";
diff --git a/admin/WebConsole3/frontend/library/globunet-angular/core/providers/providers.js b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/providers.js
new file mode 100644
index 00000000..b2540f70
--- /dev/null
+++ b/admin/WebConsole3/frontend/library/globunet-angular/core/providers/providers.js
@@ -0,0 +1,8 @@
+"use strict";
+function __export(m) {
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
+}
+Object.defineProperty(exports, "__esModule", { value: true });
+__export(require("./api"));
+__export(require("./auth"));
+__export(require("./i18n"));
diff --git a/admin/WebConsole3/frontend/src/app/app.module.ts b/admin/WebConsole3/frontend/src/app/app.module.ts
index 2e8d4121..79943697 100644
--- a/admin/WebConsole3/frontend/src/app/app.module.ts
+++ b/admin/WebConsole3/frontend/src/app/app.module.ts
@@ -4,9 +4,9 @@ import {AdminLteConf } from './admin-lte.conf';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { CoreModule } from './core/core.module';
-import {DropdownModule, LayoutModule, LayoutService, LayoutState, LayoutStore} from '../../library/angular-admin-lte/src';
+import {DropdownModule, LayoutModule, LayoutService, LayoutState, LayoutStore} from 'library/angular-admin-lte/src';
import {environment} from '../environments/environment';
-import {AuthModule, TokenInterceptorService} from 'globunet-angular/core';
+import {AuthModule, TokenInterceptorService} from 'library/globunet-angular/core';
import {HTTP_INTERCEPTORS, HttpClient, HttpClientModule} from '@angular/common/http';
import {LoginComponent} from './pages/login/login.component';
import {ImageComponent} from './pages/image/image.component';
diff --git a/admin/WebConsole3/frontend/src/app/core/sidebar-left-inner/sidebar-left-inner.component.html b/admin/WebConsole3/frontend/src/app/core/sidebar-left-inner/sidebar-left-inner.component.html
index 9a5f4293..7b2b79b6 100644
--- a/admin/WebConsole3/frontend/src/app/core/sidebar-left-inner/sidebar-left-inner.component.html
+++ b/admin/WebConsole3/frontend/src/app/core/sidebar-left-inner/sidebar-left-inner.component.html
@@ -1,18 +1,18 @@
-<div class="user-panel">
- <div class="pull-left image">
- <img src="assets/img/user2-160x160.jpg" class="img-circle" alt="User Image">
- </div>
- <div class="pull-left info">
- <p>Alexander Pierce</p>
- <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
- </div>
-</div>
-<form action="#" method="get" class="sidebar-form">
- <div class="input-group">
- <input type="text" name="q" class="form-control" placeholder="Search...">
- <span class="input-group-btn">
- <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
- </button>
- </span>
- </div>
-</form>
+<div class="user-panel">
+ <div class="pull-left image">
+ <img src="assets/img/no-image.png" class="img-circle" alt="User Image">
+ </div>
+ <div class="pull-left info">
+ <p>Alexander Pierce</p>
+ <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
+ </div>
+</div>
+<form action="#" method="get" class="sidebar-form">
+ <div class="input-group">
+ <input type="text" name="q" class="form-control" placeholder="Search...">
+ <span class="input-group-btn">
+ <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
+ </button>
+ </span>
+ </div>
+</form>
diff --git a/admin/WebConsole3/frontend/tsconfig.json b/admin/WebConsole3/frontend/tsconfig.json
index 067e716a..f79f161a 100644
--- a/admin/WebConsole3/frontend/tsconfig.json
+++ b/admin/WebConsole3/frontend/tsconfig.json
@@ -19,7 +19,10 @@
],
"paths": {
"angular-admin-lte": [
- "library/angular-admin-lte/src"
+ "./library/angular-admin-lte/src"
+ ],
+ "globunet-angular/*": [
+ "./library/globunet-angular/*"
]
}
}