fng-audit 0.12.0-beta.227 → 0.12.0-beta.228

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
13
13
  function verb(n) { return function (v) { return step([n, v]); }; }
14
14
  function step(op) {
15
15
  if (f) throw new TypeError("Generator is already executing.");
16
- while (_) try {
16
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
17
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
18
  if (y = 0, t) op = [op[0] & 2, t.value];
19
19
  switch (op[0]) {
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,o,s,l){return new(s=s||Promise)(function(r,t){function n(e){try{a(l.next(e))}catch(e){t(e)}}function i(e){try{a(l.throw(e))}catch(e){t(e)}}function a(e){var t;e.done?r(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(n,i)}a((l=l.apply(e,o||[])).next())})},__generator=this&&this.__generator||function(n,i){var a,o,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,o=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=i.call(n,l)}catch(e){t=[6,e],o=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}};!function(){"use strict";angular.module("fngAuditModule",["formsAngular"]).config(["RoutingServiceProvider",function(e){e.addRoutes(null,[{route:"/:model/:id/history",state:"model::history",templateUrl:"templates/base-history.html"},{route:"/:model/:form/:id/history",state:"model::history",templateUrl:"templates/base-history.html"},{route:"/:model/:id/changes",state:"model::history",templateUrl:"templates/base-history.html"},{route:"/:model/:form/:id/changes",state:"model::history",templateUrl:"templates/base-history.html"},{route:"/:model/:id/version/:version",state:"model::version",templateUrl:"templates/base-version.html"},{route:"/:model/:form/:id/version/:version",state:"model::version",templateUrl:"templates/base-version.html"}]),e.registerAction("history"),e.registerAction("changes"),e.registerAction("version")}]).controller("FngAuditHistCtrl",["$rootScope","$scope","$location","RoutingService","FngAuditService",function(n,i,e,t,a){i.changes=[];var e=e.path(),r=(angular.extend(i,t.parsePathFunc()(e)),"".concat(i.modelName).concat(i.formName?"/".concat(i.formName):""));i.createDate=new Date(1e3*parseInt(i.id.toString().substring(0,8),16)),a.getHist(i.modelName,i.id,e.split("/").slice(-1)[0]).then(function(e){i.changes=e.data;var t,r={};i.changes.forEach(function(e){e.user&&(r[e.user]=null)}),null!=(e=null==n?void 0:n.describeUsers(r))&&e.then(function(t){i.changes.forEach(function(e){e.user&&(e.userDesc=t[e.user])})}),0<i.changes.length?("create"!==i.changes[i.changes.length-1].operation&&(i.inferCreate=!0),t="view",i.changes.forEach(function(e){e.url=t,void 0!==e.oldVersion&&(t="version/"+e.oldVersion)})):a.checkValidItem(i.modelName,i.id).then(function(){i.inferCreate=!0})},function(e){i.errorVisible=!0,i.alertTitle=e.statusText,i.errorMessage=e.data}),i.buildHistUrl=function(e){return t.buildUrl("".concat(r,"/").concat(i.id,"/").concat(e))}}]).controller("FngAuditVerCtrl",["$scope","$location","RoutingService","FngAuditService",function(t,e,r,n){t.record=[],angular.extend(t,r.parsePathFunc()(e.$$path)),n.getVersion(t.modelName,t.id,t.tab).then(function(e){"0"===t.tab&&1===Object.keys(e.data).length?(t.errorVisible=!0,t.alertTitle="Error",t.errorMessage="No such ".concat(t.modelName," as ").concat(t.id)):t.version=e.data},function(e){t.errorVisible=!0,t.alertTitle=e.statusText,t.errorMessage=e.data}),t.buildHistUrl=function(e){return r.buildUrl(t.modelName+"/"+t.id+"/version/"+e.oldVersion)}}]).service("FngAuditService",["$http",function(i){return{getHist:function(t,r,n){return void 0===n&&(n="history"),__awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,i.get("/api/".concat(t,"/").concat(r,"/").concat(n))]})})},getVersion:function(e,t,r){return i.get("/api/".concat(e,"/").concat(t,"/version/").concat(r))},checkValidItem:function(e,t){return i.get("/api/".concat(e,"/").concat(t))}}}])}(),angular.module("fngAuditModule").run(["$templateCache",function(e){"use strict";e.put("templates/base-history.html","<div ng-controller=FngAuditHistCtrl><div ng-class=\"css('rowFluid')\" class=\"page-header list-header\"><div class=header-lhs><h1>History for {{modelName}} {{id}}</h1></div></div><div class=\"page-body list-body\"><error-display></error-display><div ng-class=\"css('rowFluid')\"><a ng-repeat=\"change in changes\" ng-href={{buildHistUrl(change.url)}}><div class=list-item><div ng-class=\"css('span',12)\">{{ change.changedAt | date : 'yy-MM-dd HH:mm:ss' }} UTC <span ng-if=change.chg title=\"{{ change.chg | json}}\">&lt;changes&gt; </span>&nbsp; {{ change.comment }} &nbsp;{{ change.userDesc || (change.user ? (' User: ' + change.user) : '' ) }}</div></div></a></div><div ng-class=\"css('rowFluid')\" ng-show=inferCreate><a ng-href=\"{{buildHistUrl('version/0')}}\"><div class=list-item><div ng-class=\"css('span',12)\">{{ createDate | date : 'yy-MM-dd HH:mm:ss' }} UTC created</div></div></a></div></div></div>"),e.put("templates/base-version.html",'<div ng-controller=FngAuditVerCtrl><div ng-class="css(\'rowFluid\')" class="page-header list-header"><div class=header-lhs><h1>Version {{ tab }} for {{modelName}} {{id}}</h1></div></div><div class="page-body list-body"><error-display></error-display><div ng-class="css(\'rowFluid\')"><pre>\n{{ version | json }}\n</pre></div></div></div>')}]);
1
+ var __awaiter=this&&this.__awaiter||function(e,o,s,l){return new(s=s||Promise)(function(r,t){function n(e){try{a(l.next(e))}catch(e){t(e)}}function i(e){try{a(l.throw(e))}catch(e){t(e)}}function a(e){var t;e.done?r(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(n,i)}a((l=l.apply(e,o||[])).next())})},__generator=this&&this.__generator||function(n,i){var a,o,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(a)throw new TypeError("Generator is already executing.");for(;l=c&&t[c=0]?0:l;)try{if(a=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,o=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=i.call(n,l)}catch(e){t=[6,e],o=0}finally{a=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}};!function(){"use strict";angular.module("fngAuditModule",["formsAngular"]).config(["RoutingServiceProvider",function(e){e.addRoutes(null,[{route:"/:model/:id/history",state:"model::history",templateUrl:"templates/base-history.html"},{route:"/:model/:form/:id/history",state:"model::history",templateUrl:"templates/base-history.html"},{route:"/:model/:id/changes",state:"model::history",templateUrl:"templates/base-history.html"},{route:"/:model/:form/:id/changes",state:"model::history",templateUrl:"templates/base-history.html"},{route:"/:model/:id/version/:version",state:"model::version",templateUrl:"templates/base-version.html"},{route:"/:model/:form/:id/version/:version",state:"model::version",templateUrl:"templates/base-version.html"}]),e.registerAction("history"),e.registerAction("changes"),e.registerAction("version")}]).controller("FngAuditHistCtrl",["$rootScope","$scope","$location","RoutingService","FngAuditService",function(n,i,e,t,a){i.changes=[];var e=e.path(),r=(angular.extend(i,t.parsePathFunc()(e)),"".concat(i.modelName).concat(i.formName?"/".concat(i.formName):""));i.createDate=new Date(1e3*parseInt(i.id.toString().substring(0,8),16)),a.getHist(i.modelName,i.id,e.split("/").slice(-1)[0]).then(function(e){i.changes=e.data;var t,r={};i.changes.forEach(function(e){e.user&&(r[e.user]=null)}),null!=(e=null==n?void 0:n.describeUsers(r))&&e.then(function(t){i.changes.forEach(function(e){e.user&&(e.userDesc=t[e.user])})}),0<i.changes.length?("create"!==i.changes[i.changes.length-1].operation&&(i.inferCreate=!0),t="view",i.changes.forEach(function(e){e.url=t,void 0!==e.oldVersion&&(t="version/"+e.oldVersion)})):a.checkValidItem(i.modelName,i.id).then(function(){i.inferCreate=!0})},function(e){i.errorVisible=!0,i.alertTitle=e.statusText,i.errorMessage=e.data}),i.buildHistUrl=function(e){return t.buildUrl("".concat(r,"/").concat(i.id,"/").concat(e))}}]).controller("FngAuditVerCtrl",["$scope","$location","RoutingService","FngAuditService",function(t,e,r,n){t.record=[],angular.extend(t,r.parsePathFunc()(e.$$path)),n.getVersion(t.modelName,t.id,t.tab).then(function(e){"0"===t.tab&&1===Object.keys(e.data).length?(t.errorVisible=!0,t.alertTitle="Error",t.errorMessage="No such ".concat(t.modelName," as ").concat(t.id)):t.version=e.data},function(e){t.errorVisible=!0,t.alertTitle=e.statusText,t.errorMessage=e.data}),t.buildHistUrl=function(e){return r.buildUrl(t.modelName+"/"+t.id+"/version/"+e.oldVersion)}}]).service("FngAuditService",["$http",function(i){return{getHist:function(t,r,n){return void 0===n&&(n="history"),__awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,i.get("/api/".concat(t,"/").concat(r,"/").concat(n))]})})},getVersion:function(e,t,r){return i.get("/api/".concat(e,"/").concat(t,"/version/").concat(r))},checkValidItem:function(e,t){return i.get("/api/".concat(e,"/").concat(t))}}}])}(),angular.module("fngAuditModule").run(["$templateCache",function(e){"use strict";e.put("templates/base-history.html","<div ng-controller=FngAuditHistCtrl><div ng-class=\"css('rowFluid')\" class=\"page-header list-header\"><div class=header-lhs><h1>History for {{modelName}} {{id}}</h1></div></div><div class=\"page-body list-body\"><error-display></error-display><div ng-class=\"css('rowFluid')\"><a ng-repeat=\"change in changes\" ng-href={{buildHistUrl(change.url)}}><div class=list-item><div ng-class=\"css('span',12)\">{{ change.changedAt | date : 'yy-MM-dd HH:mm:ss' }} UTC <span ng-if=change.chg title=\"{{ change.chg | json}}\">&lt;changes&gt; </span>&nbsp; {{ change.comment }} &nbsp;{{ change.userDesc || (change.user ? (' User: ' + change.user) : '' ) }}</div></div></a></div><div ng-class=\"css('rowFluid')\" ng-show=inferCreate><a ng-href=\"{{buildHistUrl('version/0')}}\"><div class=list-item><div ng-class=\"css('span',12)\">{{ createDate | date : 'yy-MM-dd HH:mm:ss' }} UTC created</div></div></a></div></div></div>"),e.put("templates/base-version.html",'<div ng-controller=FngAuditVerCtrl><div ng-class="css(\'rowFluid\')" class="page-header list-header"><div class=header-lhs><h1>Version {{ tab }} for {{modelName}} {{id}}</h1></div></div><div class="page-body list-body"><error-display></error-display><div ng-class="css(\'rowFluid\')"><pre>\n{{ version | json }}\n</pre></div></div></div>')}]);
@@ -26,7 +26,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
26
26
  function verb(n) { return function (v) { return step([n, v]); }; }
27
27
  function step(op) {
28
28
  if (f) throw new TypeError("Generator is already executing.");
29
- while (_) try {
29
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
30
30
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
31
31
  if (y = 0, t) op = [op[0] & 2, t.value];
32
32
  switch (op[0]) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fng-audit",
3
- "version": "0.12.0-beta.227",
3
+ "version": "0.12.0-beta.228",
4
4
  "description": "Client part of forms-angular audit plugin",
5
5
  "homepage": "https://www.forms-angular.org/#/plugins",
6
6
  "files": [
@@ -26,7 +26,7 @@
26
26
  "@types/mocha": "10.0.1",
27
27
  "angular": "^1.8.3",
28
28
  "chai": "4.3.7",
29
- "forms-angular": "0.12.0-beta.227",
29
+ "forms-angular": "0.12.0-beta.228",
30
30
  "grunt": "^1.5.3",
31
31
  "grunt-angular-templates": "^1.2.0",
32
32
  "grunt-contrib-concat": "2.1.0",