@sava-info-systems/api-maker-with-extensions 1.11.0 → 1.12.0

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.
Files changed (64) hide show
  1. package/dist/1025.js +1 -1
  2. package/dist/1097.js +1 -1
  3. package/dist/148.js +1 -1
  4. package/dist/1558.js +1 -1
  5. package/dist/1678.js +1 -1
  6. package/dist/1754.js +1 -1
  7. package/dist/1928.js +1 -1
  8. package/dist/1957.js +1 -1
  9. package/dist/2140.js +1 -1
  10. package/dist/2295.js +1 -1
  11. package/dist/2473.js +1 -1
  12. package/dist/2714.js +1 -1
  13. package/dist/2735.js +1 -1
  14. package/dist/2908.js +1 -1
  15. package/dist/3081.js +1 -0
  16. package/dist/3139.js +1 -1
  17. package/dist/3450.js +1 -1
  18. package/dist/4110.js +1 -1
  19. package/dist/4181.js +1 -1
  20. package/dist/4186.js +1 -1
  21. package/dist/4211.js +1 -1
  22. package/dist/4575.js +1 -1
  23. package/dist/4842.js +1 -1
  24. package/dist/485.js +1 -1
  25. package/dist/4895.js +1 -1
  26. package/dist/5249.js +1 -1
  27. package/dist/5334.js +1 -1
  28. package/dist/5421.js +1 -1
  29. package/dist/5679.js +1 -1
  30. package/dist/5761.js +1 -1
  31. package/dist/5765.js +1 -1
  32. package/dist/6236.js +1 -1
  33. package/dist/6393.js +1 -1
  34. package/dist/6401.js +1 -1
  35. package/dist/7368.js +1 -1
  36. package/dist/7436.js +1 -1
  37. package/dist/7470.js +1 -1
  38. package/dist/7649.js +1 -1
  39. package/dist/7975.js +1 -1
  40. package/dist/7977.js +1 -1
  41. package/dist/7987.js +1 -1
  42. package/dist/8125.js +1 -1
  43. package/dist/8266.js +1 -1
  44. package/dist/8296.js +1 -1
  45. package/dist/8841.js +1 -1
  46. package/dist/885.js +1 -1
  47. package/dist/891.js +1 -1
  48. package/dist/913.js +1 -1
  49. package/dist/9243.js +1 -1
  50. package/dist/9575.js +1 -1
  51. package/dist/9939.js +1 -1
  52. package/dist/assets/images/icons/api-maker-deployment.svg +5 -0
  53. package/dist/assets/schema-types/types.ts +357 -9
  54. package/dist/assets/styles/out/styles.css +1 -1
  55. package/dist/assets/styles/out/styles.css.map +1 -1
  56. package/dist/assets/styles/styles.scss +22 -0
  57. package/dist/common.js +1 -1
  58. package/dist/main.js +1 -1
  59. package/main.js +1 -1
  60. package/package.json +4 -4
  61. package/sandbox/assets/schema-types/types.js +38 -0
  62. package/sandbox/sandbox.js +1 -1
  63. package/src/assets/schema-types/types.ts +357 -9
  64. package/src/public/dist-db-masters/browser/main.js +70 -68
package/dist/5334.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[5334],{5334:(T,o,i)=>{i.r(o),i.d(o,{AmWelcomeM:()=>U});var r=i(7664),c=i(8761),m=i(3726),d=i(921),t=i(4946),u=i(5852),p=i(4795),Z=i(7240),v=i(6814);function l(e,g){1&e&&(t.TgZ(0,"a",84)(1,"div",11),t._UZ(2,"img",85),t.TgZ(3,"h1"),t._UZ(4,"i",86),t._uU(5," Licenses"),t.qZA()()())}function h(e,g){1&e&&(t.TgZ(0,"a",87)(1,"div",11),t._UZ(2,"img",88),t.TgZ(3,"h1"),t._UZ(4,"i",86),t._uU(5," UI Maker"),t.qZA()()())}function f(e,g){1&e&&(t.TgZ(0,"a",89)(1,"div",11),t._UZ(2,"img",90),t.TgZ(3,"h1"),t._uU(4,"Dev Account"),t.qZA()()())}const x=[{path:"",component:(()=>{class e{authCS;authS;generalCS;EUserType=d.dN;constructor(n,a,s){this.authCS=n,this.authS=a,this.generalCS=s}ngOnInit(){this.generalCS.setNewTitle("AM - Dashboard")}static \u0275fac=function(a){return new(a||e)(t.Y36(u.D),t.Y36(p.e),t.Y36(Z.b))};static \u0275cmp=t.Xpm({type:e,selectors:[["app-am-welcome"]],decls:202,vars:3,consts:[[1,"p-5",2,"height","calc(100vh - 44px)","overflow","auto"],[1,"row","h4","bold"],[1,"col-6"],[1,"fas","fa-tachometer-alt","fa-fw","text-success"],["src","/assets/images/logo/store_logo.svg",2,"height","25px"],[1,"row","mt-3","h4","bold"],[1,"icon-row","mt-lg-n2","ml-0"],["href","javascript:","routerLink","/dashboard/summary-dashboard",2,"text-decoration","none"],[1,"icon-box","ml-0"],["src","/assets/images/icons/nodes.svg",1,"mt-2"],["href","javascript:","routerLink","/dashboard/redis-dashboard",2,"text-decoration","none"],[1,"icon-box"],["src","/assets/images/icons/redis.svg",1,"mt-2"],["href","javascript:","routerLink","/diagram/main",2,"text-decoration","none"],["src","/assets/images/icons/diagram.svg",1,"mt-3"],["href","javascript:","routerLink","/dashboard/ext-licenses","style","text-decoration: none",4,"ngIf"],[1,"icon-row","mt-lg-n2"],["href","javascript:","routerLink","/utility/app-store/main",2,"text-decoration","none"],["src","/assets/images/logo/logo_store.svg",1,"mt-4","p-1"],["href","https://docs.apimaker.dev/","target","_blank",2,"text-decoration","none"],["src","/assets/images/logo/logo_docs.svg",1,"mt-4","p-1"],["href","https://www.youtube.com/playlist?list=PLfJ8NnUMaDUYNNZUX5M_KcIzn9qGCNj43","target","_blank",2,"text-decoration","none"],["src","/assets/images/icons/film-movies-icon.svg",1,"mt-2","p-1"],[1,"row","mt-5","bold"],[1,"col-12"],[1,"bold","m-0"],[1,"fas","fa-code","fa-fw","text-info"],[1,"row","h4","bold","mt-3"],["href","javascript:","routerLink","/api-info/db-cell/layout",2,"text-decoration","none"],["src","/assets/images/icons/database.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/custom-api/functions-tree",2,"text-decoration","none"],["src","/assets/images/icons/custom.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/system-api/layout",2,"text-decoration","none"],["src","/assets/images/icons/systems.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/third-party-api/tp-layout",2,"text-decoration","none"],["src","/assets/images/icons/third-party.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/am-events/layout-tree",2,"text-decoration","none"],["src","/assets/images/icons/event.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/schedulers/scheduler-layout",2,"text-decoration","none"],["src","/assets/images/icons/schedulers.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/web-socket-events/layout-tree",2,"text-decoration","none"],["src","/assets/images/icons/web.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/process-initializers/main",2,"text-decoration","none"],["src","/assets/images/icons/process_initializers.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/api-testing/testing",2,"text-decoration","none"],["src","/assets/images/icons/testing.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/db-masters/main","style","text-decoration: none",4,"ngIf"],[1,"fas","fa-lock","fa-fw","text-warning"],["href","javascript:","routerLink","/permissions/group/group-layout",2,"text-decoration","none"],["src","/assets/images/icons/api-group.svg",1,"mt-2"],["href","javascript:","routerLink","/permissions/api-user/layout",2,"text-decoration","none"],["src","/assets/images/icons/api-user.svg",1,"mt-2"],["href","javascript:","routerLink","/permissions/vulnerabilities/layout",2,"text-decoration","none"],["src","/assets/images/icons/vulnerability.svg",1,"mt-2"],[1,"fas","fa-tools","fa-fw","text-yellow"],["href","javascript:","routerLink","/accounts/secret-management",2,"text-decoration","none"],["src","/assets/images/icons/secret.svg",1,"mt-2"],["href","javascript:","routerLink","/accounts/dev-accounts","style","text-decoration: none",4,"ngIf"],["href","javascript:","routerLink","/utility/internationalization/main",2,"text-decoration","none"],["src","/assets/images/icons/i18n.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/log-profile/main",2,"text-decoration","none"],["src","/assets/images/icons/log-profile.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/log-table/main",2,"text-decoration","none"],["src","/assets/images/icons/log.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/native-process-logs",2,"text-decoration","none"],["src","/assets/images/icons/native-process-logs.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/sandbox-settings/main",2,"text-decoration","none"],["src","/assets/images/icons/sandbox.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/notes/main",2,"text-decoration","none"],["src","/assets/images/icons/notes.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/utility-classes/utility-classes-internal/main",2,"text-decoration","none"],["src","/assets/images/icons/utility.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/system-migration/main",2,"text-decoration","none"],["src","/assets/images/icons/db-m.svg",1,"mt-2","p-1"],["href","javascript:","routerLink","/utility/code-finder/finder",2,"text-decoration","none"],["src","/assets/images/icons/finder.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/code-comparator/main",2,"text-decoration","none"],["src","/assets/images/icons/comparator.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/auto-increment/main",2,"text-decoration","none"],["src","/assets/images/icons/increment.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/ts-gen-interfaces/main",2,"text-decoration","none"],["src","/assets/images/icons/typescript.svg",1,"mt-2"],["href","/assets/swagger/index.html","target","_blank",2,"text-decoration","none"],["src","/assets/images/icons/swagger-logo.svg",1,"mt-2",2,"height","55px","margin-top","3px !important"],["href","javascript:","routerLink","/dashboard/ext-licenses",2,"text-decoration","none"],["src","/assets/images/icons/license.svg",1,"mt-3"],[1,"fas","fa-plus"],["href","javascript:","routerLink","/api-info/db-masters/main",2,"text-decoration","none"],["src","/assets/images/icons/ui-maker.svg",1,"mt-2"],["href","javascript:","routerLink","/accounts/dev-accounts",2,"text-decoration","none"],["src","/assets/images/icons/dev.svg",1,"mt-2"]],template:function(a,s){1&a&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"span"),t._UZ(4,"i",3),t.TgZ(5,"span"),t._uU(6," Dashboard"),t.qZA()()(),t.TgZ(7,"div",2)(8,"span"),t._UZ(9,"img",4),t.TgZ(10,"span"),t._uU(11," API Maker Family"),t.qZA()()()(),t.TgZ(12,"div",5)(13,"div",2)(14,"div",6)(15,"a",7)(16,"div",8),t._UZ(17,"img",9),t.TgZ(18,"h1"),t._uU(19,"Nodes Summary"),t.qZA()()(),t.TgZ(20,"a",10)(21,"div",11),t._UZ(22,"img",12),t.TgZ(23,"h1"),t._uU(24,"Redis Dashboard"),t.qZA()()(),t.TgZ(25,"a",13)(26,"div",11),t._UZ(27,"img",14),t.TgZ(28,"h1"),t._uU(29,"ER Diagram"),t.qZA()()(),t.YNc(30,l,6,0,"a",15),t.qZA()(),t.TgZ(31,"div",2)(32,"div",16)(33,"a",17)(34,"div",8),t._UZ(35,"img",18),t.qZA()(),t.TgZ(36,"a",19)(37,"div",11),t._UZ(38,"img",20),t.qZA()(),t.TgZ(39,"a",21)(40,"div",11),t._UZ(41,"img",22),t.TgZ(42,"h1"),t._uU(43,"Learn API Maker"),t.qZA()()()()()(),t.TgZ(44,"div",23)(45,"div",24)(46,"h4",25),t._UZ(47,"i",26),t._uU(48," API Info "),t.qZA()()(),t.TgZ(49,"div",27)(50,"div",24)(51,"div",16)(52,"a",28)(53,"div",11),t._UZ(54,"img",29),t.TgZ(55,"h1"),t._uU(56,"Instance API (DB API)"),t.qZA()()(),t.TgZ(57,"a",30)(58,"div",11),t._UZ(59,"img",31),t.TgZ(60,"h1"),t._uU(61,"Custom API"),t.qZA()()(),t.TgZ(62,"a",32)(63,"div",11),t._UZ(64,"img",33),t.TgZ(65,"h1"),t._uU(66,"System API"),t.qZA()()(),t.TgZ(67,"a",34)(68,"div",11),t._UZ(69,"img",35),t.TgZ(70,"h1"),t._uU(71,"Third Party API"),t.qZA()()(),t.TgZ(72,"a",36)(73,"div",11),t._UZ(74,"img",37),t.TgZ(75,"h1"),t._uU(76,"Events"),t.qZA()()(),t.TgZ(77,"a",38)(78,"div",11),t._UZ(79,"img",39),t.TgZ(80,"h1"),t._uU(81,"Schedulers"),t.qZA()()(),t.TgZ(82,"a",40)(83,"div",11),t._UZ(84,"img",41),t.TgZ(85,"h1"),t._uU(86,"WebSocket Events"),t.qZA()()(),t.TgZ(87,"a",42)(88,"div",11),t._UZ(89,"img",43),t.TgZ(90,"h1"),t._uU(91," Process Initializers"),t.qZA()()(),t.TgZ(92,"a",44)(93,"div",11),t._UZ(94,"img",45),t.TgZ(95,"h1"),t._uU(96,"API Testing"),t.qZA()()(),t.YNc(97,h,6,0,"a",46),t.qZA()()(),t.TgZ(98,"div",23)(99,"div",24)(100,"h4",25),t._UZ(101,"i",47),t._uU(102," API Security "),t.qZA()()(),t.TgZ(103,"div",27)(104,"div",24)(105,"div",16)(106,"a",48)(107,"div",11),t._UZ(108,"img",49),t.TgZ(109,"h1"),t._uU(110,"API Group Permissions"),t.qZA()()(),t.TgZ(111,"a",50)(112,"div",11),t._UZ(113,"img",51),t.TgZ(114,"h1"),t._uU(115,"API User Permissions"),t.qZA()()(),t.TgZ(116,"a",52)(117,"div",11),t._UZ(118,"img",53),t.TgZ(119,"h1"),t._uU(120,"Vulnerabilities"),t.qZA()()()()()(),t.TgZ(121,"div",23)(122,"div",24)(123,"h4",25),t._UZ(124,"i",54),t._uU(125," Utility "),t.qZA()()(),t.TgZ(126,"div",27)(127,"div",24)(128,"div",16)(129,"a",55)(130,"div",11),t._UZ(131,"img",56),t.TgZ(132,"h1"),t._uU(133,"Secret Management"),t.qZA()()(),t.YNc(134,f,5,0,"a",57),t.TgZ(135,"a",58)(136,"div",11),t._UZ(137,"img",59),t.TgZ(138,"h1"),t._uU(139,"i18N Management"),t.qZA()()(),t.TgZ(140,"a",60)(141,"div",11),t._UZ(142,"img",61),t.TgZ(143,"h1"),t._uU(144,"Log Profile"),t.qZA()()(),t.TgZ(145,"a",62)(146,"div",11),t._UZ(147,"img",63),t.TgZ(148,"h1"),t._uU(149,"Log Table"),t.qZA()()(),t.TgZ(150,"a",64)(151,"div",11),t._UZ(152,"img",65),t.TgZ(153,"h1"),t._uU(154,"Native Process Logs"),t.qZA()()(),t.TgZ(155,"a",66)(156,"div",11),t._UZ(157,"img",67),t.TgZ(158,"h1"),t._uU(159,"Sandbox Settings"),t.qZA()()(),t.TgZ(160,"a",68)(161,"div",11),t._UZ(162,"img",69),t.TgZ(163,"h1"),t._uU(164,"Notes"),t.qZA()()(),t.TgZ(165,"a",70)(166,"div",11),t._UZ(167,"img",71),t.TgZ(168,"h1"),t._uU(169,"Utility Classes"),t.qZA()()(),t.TgZ(170,"a",72)(171,"div",11),t._UZ(172,"img",73),t.TgZ(173,"h1"),t._uU(174,"Database Migration"),t.qZA()()(),t.TgZ(175,"a",74)(176,"div",11),t._UZ(177,"img",75),t.TgZ(178,"h1"),t._uU(179,"Code Finder"),t.qZA()()(),t.TgZ(180,"a",76)(181,"div",11),t._UZ(182,"img",77),t.TgZ(183,"h1"),t._uU(184,"Code Comparator"),t.qZA()()(),t.TgZ(185,"a",78)(186,"div",11),t._UZ(187,"img",79),t.TgZ(188,"h1"),t._uU(189," Auto Increments"),t.qZA()()(),t.TgZ(190,"a",80)(191,"div",11),t._UZ(192,"img",81),t.TgZ(193,"h1"),t._uU(194," Generated Interfaces"),t.qZA()()(),t.TgZ(195,"a",82)(196,"div",11),t._UZ(197,"img",83),t.TgZ(198,"h1"),t._uU(199," Swagger "),t._UZ(200,"br"),t._uU(201,"Docs"),t.qZA()()()()()()()),2&a&&(t.xp6(30),t.Q6J("ngIf",(null==s.authS.backendSettings?null:s.authS.backendSettings.extensions)&&(null==s.authCS.gUser?null:s.authCS.gUser.userType)===s.EUserType.ADMIN),t.xp6(67),t.Q6J("ngIf",null==s.authS.backendSettings?null:s.authS.backendSettings.extensions),t.xp6(37),t.Q6J("ngIf",(null==s.authCS.gUser?null:s.authCS.gUser.userType)===s.EUserType.ADMIN))},dependencies:[r.rH,v.O5],styles:[".icon-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}h1[_ngcontent-%COMP%]{font-size:15px;margin-top:10px}img[_ngcontent-%COMP%]{height:50px}.icon-box[_ngcontent-%COMP%]{font-size:15px;text-align:center;width:120px;min-width:120px;height:120px;background:transparent;border:1px solid #515151;margin:0 20px 20px 0;padding:5px;transition:all .1s;border-radius:10px;box-shadow:#00000040 0 54px 55px,#0000001f 0 -12px 30px,#0000001f 0 4px 6px,#0000002b 0 12px 13px,#00000017 0 -3px 5px}.icon-box[_ngcontent-%COMP%]:hover{background:#292929;box-shadow:#b8b8b840 0 54px 55px,#a5a5a51f 0 -12px 30px,#ffffff1f 0 4px 6px,#0b88982b 0 12px 13px,#ab151517 0 -3px 5px;--darkreader-inline-boxshadow: rgba(0, 0, 0, .25) 0px 54px 55px, rgba(0, 0, 0, .12) 0px -12px 30px, rgba(0, 0, 0, .12) 0px 4px 6px, rgba(0, 0, 0, .17) 0px 12px 13px, rgba(0, 0, 0, .09) 0px -3px 5px}"]})}return e})(),canActivate:[m.P]}];let U=(()=>{class e{static \u0275fac=function(a){return new(a||e)};static \u0275mod=t.oAB({type:e});static \u0275inj=t.cJS({imports:[r.Bz.forChild(x),c.u]})}return e})()}}]);
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[5334],{5334:(T,o,s)=>{s.r(o),s.d(o,{AmWelcomeM:()=>U});var r=s(7664),c=s(7359),m=s(3726),d=s(921),e=s(4946),p=s(5852),u=s(4795),Z=s(7240),v=s(6814);function l(t,g){1&t&&(e.TgZ(0,"a",86)(1,"div",11),e._UZ(2,"img",87),e.TgZ(3,"h1"),e._UZ(4,"i",88),e._uU(5," Licenses"),e.qZA()()())}function h(t,g){1&t&&(e.TgZ(0,"a",89)(1,"div",11),e._UZ(2,"img",90),e.TgZ(3,"h1"),e._UZ(4,"i",88),e._uU(5," UI Maker"),e.qZA()()())}function f(t,g){1&t&&(e.TgZ(0,"a",91)(1,"div",11),e._UZ(2,"img",92),e.TgZ(3,"h1"),e._uU(4,"Dev Account"),e.qZA()()())}const x=[{path:"",component:(()=>{class t{authCS;authS;generalCS;EUserType=d.dN;constructor(n,a,i){this.authCS=n,this.authS=a,this.generalCS=i}ngOnInit(){this.generalCS.setNewTitle("AM - Dashboard")}static \u0275fac=function(a){return new(a||t)(e.Y36(p.D),e.Y36(u.e),e.Y36(Z.b))};static \u0275cmp=e.Xpm({type:t,selectors:[["app-am-welcome"]],decls:209,vars:3,consts:[[1,"p-5",2,"height","calc(100vh - 44px)","overflow","auto"],[1,"row","h4","bold"],[1,"col-6"],[1,"fas","fa-tachometer-alt","fa-fw","text-success"],["src","/assets/images/logo/store_logo.svg",2,"height","25px"],[1,"row","mt-3","h4","bold"],[1,"icon-row","mt-lg-n2","ml-0"],["href","javascript:","routerLink","/dashboard/summary-dashboard",2,"text-decoration","none"],[1,"icon-box","ml-0"],["src","/assets/images/icons/nodes.svg",1,"mt-2"],["href","javascript:","routerLink","/dashboard/redis-dashboard",2,"text-decoration","none"],[1,"icon-box"],["src","/assets/images/icons/redis.svg",1,"mt-2"],["href","javascript:","routerLink","/diagram/main",2,"text-decoration","none"],["src","/assets/images/icons/diagram.svg",1,"mt-3"],["href","javascript:","routerLink","/dashboard/ext-licenses","style","text-decoration: none",4,"ngIf"],[1,"icon-row","mt-lg-n2"],["href","javascript:","routerLink","/utility/app-store/main",2,"text-decoration","none"],["src","/assets/images/logo/logo_store.svg",1,"mt-4","p-1"],["href","https://docs.apimaker.dev/","target","_blank",2,"text-decoration","none"],["src","/assets/images/logo/logo_docs.svg",1,"mt-4","p-1"],["href","https://www.youtube.com/playlist?list=PLfJ8NnUMaDUYNNZUX5M_KcIzn9qGCNj43","target","_blank",2,"text-decoration","none"],["src","/assets/images/icons/film-movies-icon.svg",1,"mt-2","p-1"],[1,"row","mt-5","bold"],[1,"col-12"],[1,"bold","m-0"],[1,"fas","fa-code","fa-fw","text-info"],[1,"row","h4","bold","mt-3"],["href","javascript:","routerLink","/api-info/db-cell/layout",2,"text-decoration","none"],["src","/assets/images/icons/database.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/custom-api/functions-tree",2,"text-decoration","none"],["src","/assets/images/icons/custom.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/system-api/layout",2,"text-decoration","none"],["src","/assets/images/icons/systems.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/third-party-api/tp-layout",2,"text-decoration","none"],["src","/assets/images/icons/third-party.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/am-events/layout-tree",2,"text-decoration","none"],["src","/assets/images/icons/event.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/schedulers/scheduler-layout",2,"text-decoration","none"],["src","/assets/images/icons/schedulers.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/web-socket-events/layout-tree",2,"text-decoration","none"],["src","/assets/images/icons/web.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/process-initializers/main",2,"text-decoration","none"],["src","/assets/images/icons/process_initializers.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/api-testing/testing",2,"text-decoration","none"],["src","/assets/images/icons/testing.svg",1,"mt-2"],["href","javascript:","routerLink","/api-info/db-masters/main","style","text-decoration: none",4,"ngIf"],[1,"fas","fa-lock","fa-fw","text-warning"],["href","javascript:","routerLink","/permissions/group/group-layout",2,"text-decoration","none"],["src","/assets/images/icons/api-group.svg",1,"mt-2"],["href","javascript:","routerLink","/permissions/api-user/layout",2,"text-decoration","none"],["src","/assets/images/icons/api-user.svg",1,"mt-2"],["href","javascript:","routerLink","/permissions/vulnerabilities/layout",2,"text-decoration","none"],["src","/assets/images/icons/vulnerability.svg",1,"mt-2"],[1,"fas","fa-tools","fa-fw","text-yellow"],["href","javascript:","routerLink","/accounts/secret-management",2,"text-decoration","none"],["src","/assets/images/icons/secret.svg",1,"mt-2"],["href","javascript:","routerLink","/accounts/dev-accounts","style","text-decoration: none",4,"ngIf"],["href","javascript:","routerLink","/utility/internationalization/main",2,"text-decoration","none"],["src","/assets/images/icons/i18n.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/log-profile/main",2,"text-decoration","none"],["src","/assets/images/icons/log-profile.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/log-table/main",2,"text-decoration","none"],["src","/assets/images/icons/log.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/native-process-logs",2,"text-decoration","none"],["src","/assets/images/icons/native-process-logs.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/sandbox-settings/main",2,"text-decoration","none"],["src","/assets/images/icons/sandbox.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/notes/main",2,"text-decoration","none"],["src","/assets/images/icons/notes.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/utility-classes/utility-classes-internal/main",2,"text-decoration","none"],["src","/assets/images/icons/utility.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/system-migration/main",2,"text-decoration","none"],["src","/assets/images/icons/db-m.svg",1,"mt-2","p-1"],["href","javascript:","routerLink","/utility/code-finder/finder",2,"text-decoration","none"],["src","/assets/images/icons/finder.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/code-comparator/main",2,"text-decoration","none"],["src","/assets/images/icons/comparator.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/auto-increment/main",2,"text-decoration","none"],["src","/assets/images/icons/increment.svg",1,"mt-2"],["href","javascript:","routerLink","/utility/ts-gen-interfaces/main",2,"text-decoration","none"],["src","/assets/images/icons/typescript.svg",1,"mt-2"],["href","/assets/swagger/index.html","target","_blank",2,"text-decoration","none"],["src","/assets/images/icons/swagger-logo.svg",1,"mt-2",2,"height","55px","margin-top","3px !important"],["href","javascript:","routerLink","/utility/deploy-api-maker",2,"text-decoration","none"],["src","/assets/images/icons/api-maker-deployment.svg",1,"mt-2"],["href","javascript:","routerLink","/dashboard/ext-licenses",2,"text-decoration","none"],["src","/assets/images/icons/license.svg",1,"mt-3"],[1,"fas","fa-plus"],["href","javascript:","routerLink","/api-info/db-masters/main",2,"text-decoration","none"],["src","/assets/images/icons/ui-maker.svg",1,"mt-2"],["href","javascript:","routerLink","/accounts/dev-accounts",2,"text-decoration","none"],["src","/assets/images/icons/dev.svg",1,"mt-2"]],template:function(a,i){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"span"),e._UZ(4,"i",3),e.TgZ(5,"span"),e._uU(6," Dashboard"),e.qZA()()(),e.TgZ(7,"div",2)(8,"span"),e._UZ(9,"img",4),e.TgZ(10,"span"),e._uU(11," API Maker Family"),e.qZA()()()(),e.TgZ(12,"div",5)(13,"div",2)(14,"div",6)(15,"a",7)(16,"div",8),e._UZ(17,"img",9),e.TgZ(18,"h1"),e._uU(19,"Nodes Summary"),e.qZA()()(),e.TgZ(20,"a",10)(21,"div",11),e._UZ(22,"img",12),e.TgZ(23,"h1"),e._uU(24,"Redis Dashboard"),e.qZA()()(),e.TgZ(25,"a",13)(26,"div",11),e._UZ(27,"img",14),e.TgZ(28,"h1"),e._uU(29,"ER Diagram"),e.qZA()()(),e.YNc(30,l,6,0,"a",15),e.qZA()(),e.TgZ(31,"div",2)(32,"div",16)(33,"a",17)(34,"div",8),e._UZ(35,"img",18),e.qZA()(),e.TgZ(36,"a",19)(37,"div",11),e._UZ(38,"img",20),e.qZA()(),e.TgZ(39,"a",21)(40,"div",11),e._UZ(41,"img",22),e.TgZ(42,"h1"),e._uU(43,"Learn API Maker"),e.qZA()()()()()(),e.TgZ(44,"div",23)(45,"div",24)(46,"h4",25),e._UZ(47,"i",26),e._uU(48," API Info "),e.qZA()()(),e.TgZ(49,"div",27)(50,"div",24)(51,"div",16)(52,"a",28)(53,"div",11),e._UZ(54,"img",29),e.TgZ(55,"h1"),e._uU(56,"Instance API (DB API)"),e.qZA()()(),e.TgZ(57,"a",30)(58,"div",11),e._UZ(59,"img",31),e.TgZ(60,"h1"),e._uU(61,"Custom API"),e.qZA()()(),e.TgZ(62,"a",32)(63,"div",11),e._UZ(64,"img",33),e.TgZ(65,"h1"),e._uU(66,"System API"),e.qZA()()(),e.TgZ(67,"a",34)(68,"div",11),e._UZ(69,"img",35),e.TgZ(70,"h1"),e._uU(71,"Third Party API"),e.qZA()()(),e.TgZ(72,"a",36)(73,"div",11),e._UZ(74,"img",37),e.TgZ(75,"h1"),e._uU(76,"Events"),e.qZA()()(),e.TgZ(77,"a",38)(78,"div",11),e._UZ(79,"img",39),e.TgZ(80,"h1"),e._uU(81,"Schedulers"),e.qZA()()(),e.TgZ(82,"a",40)(83,"div",11),e._UZ(84,"img",41),e.TgZ(85,"h1"),e._uU(86,"WebSocket Events"),e.qZA()()(),e.TgZ(87,"a",42)(88,"div",11),e._UZ(89,"img",43),e.TgZ(90,"h1"),e._uU(91," Process Initializers"),e.qZA()()(),e.TgZ(92,"a",44)(93,"div",11),e._UZ(94,"img",45),e.TgZ(95,"h1"),e._uU(96,"API Testing"),e.qZA()()(),e.YNc(97,h,6,0,"a",46),e.qZA()()(),e.TgZ(98,"div",23)(99,"div",24)(100,"h4",25),e._UZ(101,"i",47),e._uU(102," API Security "),e.qZA()()(),e.TgZ(103,"div",27)(104,"div",24)(105,"div",16)(106,"a",48)(107,"div",11),e._UZ(108,"img",49),e.TgZ(109,"h1"),e._uU(110,"API Group Permissions"),e.qZA()()(),e.TgZ(111,"a",50)(112,"div",11),e._UZ(113,"img",51),e.TgZ(114,"h1"),e._uU(115,"API User Permissions"),e.qZA()()(),e.TgZ(116,"a",52)(117,"div",11),e._UZ(118,"img",53),e.TgZ(119,"h1"),e._uU(120,"Vulnerabilities"),e.qZA()()()()()(),e.TgZ(121,"div",23)(122,"div",24)(123,"h4",25),e._UZ(124,"i",54),e._uU(125," Utility "),e.qZA()()(),e.TgZ(126,"div",27)(127,"div",24)(128,"div",16)(129,"a",55)(130,"div",11),e._UZ(131,"img",56),e.TgZ(132,"h1"),e._uU(133,"Secret Management"),e.qZA()()(),e.YNc(134,f,5,0,"a",57),e.TgZ(135,"a",58)(136,"div",11),e._UZ(137,"img",59),e.TgZ(138,"h1"),e._uU(139,"i18N Management"),e.qZA()()(),e.TgZ(140,"a",60)(141,"div",11),e._UZ(142,"img",61),e.TgZ(143,"h1"),e._uU(144,"Log Profile"),e.qZA()()(),e.TgZ(145,"a",62)(146,"div",11),e._UZ(147,"img",63),e.TgZ(148,"h1"),e._uU(149,"Log Table"),e.qZA()()(),e.TgZ(150,"a",64)(151,"div",11),e._UZ(152,"img",65),e.TgZ(153,"h1"),e._uU(154,"Native Process Logs"),e.qZA()()(),e.TgZ(155,"a",66)(156,"div",11),e._UZ(157,"img",67),e.TgZ(158,"h1"),e._uU(159,"Sandbox Settings"),e.qZA()()(),e.TgZ(160,"a",68)(161,"div",11),e._UZ(162,"img",69),e.TgZ(163,"h1"),e._uU(164,"Notes"),e.qZA()()(),e.TgZ(165,"a",70)(166,"div",11),e._UZ(167,"img",71),e.TgZ(168,"h1"),e._uU(169,"Utility Classes"),e.qZA()()(),e.TgZ(170,"a",72)(171,"div",11),e._UZ(172,"img",73),e.TgZ(173,"h1"),e._uU(174,"Database Migration"),e.qZA()()(),e.TgZ(175,"a",74)(176,"div",11),e._UZ(177,"img",75),e.TgZ(178,"h1"),e._uU(179,"Code Finder"),e.qZA()()(),e.TgZ(180,"a",76)(181,"div",11),e._UZ(182,"img",77),e.TgZ(183,"h1"),e._uU(184,"Code Comparator"),e.qZA()()(),e.TgZ(185,"a",78)(186,"div",11),e._UZ(187,"img",79),e.TgZ(188,"h1"),e._uU(189," Auto Increments"),e.qZA()()(),e.TgZ(190,"a",80)(191,"div",11),e._UZ(192,"img",81),e.TgZ(193,"h1"),e._uU(194," Generated Interfaces"),e.qZA()()(),e.TgZ(195,"a",82)(196,"div",11),e._UZ(197,"img",83),e.TgZ(198,"h1"),e._uU(199," Swagger "),e._UZ(200,"br"),e._uU(201,"Docs"),e.qZA()()(),e.TgZ(202,"a",84)(203,"div",11),e._UZ(204,"img",85),e.TgZ(205,"h1"),e._uU(206," Deploy "),e._UZ(207,"br"),e._uU(208,"API Maker"),e.qZA()()()()()()()),2&a&&(e.xp6(30),e.Q6J("ngIf",(null==i.authS.backendSettings?null:i.authS.backendSettings.extensions)&&(null==i.authCS.gUser?null:i.authCS.gUser.userType)===i.EUserType.ADMIN),e.xp6(67),e.Q6J("ngIf",null==i.authS.backendSettings?null:i.authS.backendSettings.extensions),e.xp6(37),e.Q6J("ngIf",(null==i.authCS.gUser?null:i.authCS.gUser.userType)===i.EUserType.ADMIN))},dependencies:[r.rH,v.O5],styles:[".icon-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}h1[_ngcontent-%COMP%]{font-size:15px;margin-top:10px}img[_ngcontent-%COMP%]{height:50px}.icon-box[_ngcontent-%COMP%]{font-size:15px;text-align:center;width:120px;min-width:120px;height:120px;background:transparent;border:1px solid #515151;margin:0 20px 20px 0;padding:5px;transition:all .1s;border-radius:10px;box-shadow:#00000040 0 54px 55px,#0000001f 0 -12px 30px,#0000001f 0 4px 6px,#0000002b 0 12px 13px,#00000017 0 -3px 5px}.icon-box[_ngcontent-%COMP%]:hover{background:#292929;box-shadow:#b8b8b840 0 54px 55px,#a5a5a51f 0 -12px 30px,#ffffff1f 0 4px 6px,#0b88982b 0 12px 13px,#ab151517 0 -3px 5px;--darkreader-inline-boxshadow: rgba(0, 0, 0, .25) 0px 54px 55px, rgba(0, 0, 0, .12) 0px -12px 30px, rgba(0, 0, 0, .12) 0px 4px 6px, rgba(0, 0, 0, .17) 0px 12px 13px, rgba(0, 0, 0, .09) 0px -3px 5px}"]})}return t})(),canActivate:[m.P]}];let U=(()=>{class t{static \u0275fac=function(a){return new(a||t)};static \u0275mod=e.oAB({type:t});static \u0275inj=e.cJS({imports:[r.Bz.forChild(x),c.u]})}return t})()}}]);
package/dist/5421.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[5421],{5421:(le,g,a)=>{a.r(g),a.d(g,{ProcessInitializersM:()=>V});var m=a(7664),Z=a(8761),T=a(3726),e=a(4946),l=a(5861),c=a(6990),p=a(3157),h=a(328),d=a(6212),I=a(1162),y=a(5085),w=a(921),x=a(2694),_=a(7240),v=a(9961),D=a(2189),A=a(5852),C=a(7414),E=a(2915),R=a(3835),U=a(3429),z=a(5219),M=a(6814),f=a(5431),L=a(7680),N=a(3259),Y=a(4491);const F=["processInitializersFormC"];function J(n,o){if(1&n){const t=e.EpF();e.TgZ(0,"span",17),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.edit())}),e._UZ(1,"i",18),e.qZA()}}function Q(n,o){if(1&n){const t=e.EpF();e.TgZ(0,"span",19),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.clone())}),e._UZ(1,"i",20),e.qZA()}}function k(n,o){if(1&n){const t=e.EpF();e.TgZ(0,"span",21),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.removePermanent())}),e._UZ(1,"i",22),e.qZA()}}function b(n,o){1&n&&(e.TgZ(0,"th",26),e._UZ(1,"p-tableHeaderCheckbox"),e.qZA())}function O(n,o){if(1&n&&(e.TgZ(0,"tr"),e.YNc(1,b,2,0,"th",23),e._UZ(2,"th",24),e.TgZ(3,"th",25),e._uU(4,"Order"),e.qZA(),e.TgZ(5,"th"),e._uU(6,"Name"),e.qZA(),e._UZ(7,"th",25),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.showCheckbox)}}function G(n,o){if(1&n&&(e.TgZ(0,"td"),e._UZ(1,"p-tableCheckbox",33),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("value",t)("pSelectableRow",t)}}function K(n,o){1&n&&e._UZ(0,"i",34)}const H=function(){return["/api-info/api-testing/testing"]},B=function(n,o,t){return{at_category:n,at_user:o,at_api:t}};function W(n,o){if(1&n&&(e.TgZ(0,"tr",27),e.YNc(1,G,2,2,"td",28),e.TgZ(2,"td"),e.YNc(3,K,1,0,"i",29),e.qZA(),e.TgZ(4,"td"),e._uU(5),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td")(9,"div",30)(10,"a",31),e.NdJ("click",function(s){return s.stopPropagation()}),e._UZ(11,"i",32),e.qZA()()()()),2&n){const t=o.$implicit,s=e.oxw();e.Q6J("pSelectableRow",t),e.xp6(1),e.Q6J("ngIf",s.showCheckbox),e.xp6(2),e.Q6J("ngIf",t.isScriptExecutedCalculated),e.xp6(2),e.Oqu(t.order),e.xp6(2),e.Oqu(t.name),e.xp6(3),e.Q6J("routerLink",e.DdM(7,H))("queryParams",e.kEZ(8,B,s.EAPICategory.PROCESS_INITIALIZER,s.authCS.getUserId(),t._id))}}function j(n,o){1&n&&e._UZ(0,"p-progressSpinner",35)}let S=(()=>{class n{processInitializersS;generalS;notificationS;navigationCS;authCS;constantsS;eventCenterS;router;userS;instanceS;ns;cs;confirmationService;cd;showCheckbox=!0;loading={grid:!1};subscriptions=[];data={mode:h.D.ADD,eventChannel:new e.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;EUserType=w.dN;gridKey=I.iH._id;EAPICategory=y.R;selectedRows=[];processInitializersFormC;constructor(t,s,i,r,u,q,ee,te,ie,se,ne,ae,re,oe){this.processInitializersS=t,this.generalS=s,this.notificationS=i,this.navigationCS=r,this.authCS=u,this.constantsS=q,this.eventCenterS=ee,this.router=te,this.userS=ie,this.instanceS=se,this.ns=ne,this.cs=ae,this.confirmationService=re,this.cd=oe}ngOnInit(){var t=this;return(0,l.Z)(function*(){t.eventCenterS.processInitializers.selectedInitializer.next(void 0),yield t.loadGridData(),t.subscriptions.push(t.data.eventChannel.subscribe(function(){var s=(0,l.Z)(function*(i){(i.action===p.F.SAVED||i.action===p.F.UPDATED)&&(t.processInitializersFormC.hideModal(),yield t.loadGridData())});return function(i){return s.apply(this,arguments)}}())),t.generalS.setNewTitle("API Maker - Process Initializers")})()}loadGridData(){var t=this;return(0,l.Z)(function*(){t.loading.grid=!0;const s={find:{user:t.authCS.getUserId(),active:!0},select:{name:1,label:1,active:1,user:1,order:1},sort:{order:1}};t.showAll&&delete s.find.active;const i=yield t.processInitializersS.query(s).toPromise();i&&(t.selectedRows=[],t.rows=i.data,t.rowsMap=c.keyBy(t.rows,I.iH._id));let r=t.navigationCS.getQueryParam(d.p.am_process_initializer);r&&!t.rowsMap[r]&&t.rows.length&&(r=t.rows[0]._id),t.rowsMap[r]?(t.selectedRows=[t.rowsMap[r]],yield t.fillData()):t.eventCenterS.processInitializers.selectedInitializer.next(void 0),t.loading.grid=!1,t.cd.detectChanges()})()}add(){this.data.formData={order:(c.max(c.map(this.rows,"order"))||0)+1},this.data.mode=h.D.ADD,this.data.eventChannel.emit({action:p.F.OPEN_FORM_IN_ADD_MODE,data:this.data.formData}),this.processInitializersFormC.showModal()}edit(){this.data.formData=this.rowsMap[c.map(this.selectedRows,"_id")[0]],this.data.mode=h.D.EDIT,this.data.eventChannel.emit({action:p.F.OPEN_FORM_IN_EDIT_MODE}),this.processInitializersFormC.showModal()}clone(){var t=this;return(0,l.Z)(function*(){try{if(!t.selectedRows[0]||!t.rowsMap[c.map(t.selectedRows,"_id")[0]])return;const s=t.rowsMap[c.map(t.selectedRows,"_id")[0]]._id,i=(yield t.processInitializersS.getById(s).toPromise()).data;delete i._id,i.name=`${i.name}-clone`,i.order=(c.max(c.map(t.rows,"order"))||0)+1,(yield t.processInitializersS.post(i).toPromise()).success?(t.notificationS.showSuccess(t.constantsS.processInitializer.cloneSuccess),t.loadGridData()):t.notificationS.showSuccess(t.constantsS.processInitializer.cloneSuccess)}catch{t.notificationS.showError(t.constantsS.processInitializer.cloneError)}})()}removePermanent(){var t=this;return(0,l.Z)(function*(){var s;t.confirmationService.confirm({message:t.cs.processInitializer.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(s=(0,l.Z)(function*(){for(const i of t.selectedRows)yield t.hardDelete(i._id);t.ns.showSuccess(t.cs.processInitializer.removePermanent),yield t.loadGridData()}),function(){return s.apply(this,arguments)})})})()}hardDelete(t){var s=this;return(0,l.Z)(function*(){yield s.processInitializersS.permanentDelete(t).toPromise()})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.processInitializers.selectedInitializer.next(void 0)}resetThisUrl(){var t=this;return(0,l.Z)(function*(){t.eventCenterS.processInitializers.selectedInitializer.next(void 0),yield t.navigationCS.setQueryParam(d.p.am_process_initializer,null)})()}itemSelected(){var t=this;return(0,l.Z)(function*(){yield t.resetThisUrl(),setTimeout(t.fillData.bind(t))})()}fillData(){var t=this;return(0,l.Z)(function*(){if(!t.selectedRows.length)return yield t.navigationCS.setQueryParam(d.p.am_process_initializer,""),void t.eventCenterS.processInitializers.selectedInitializer.next(null);const s=t.selectedRows[0];s?(yield t.navigationCS.setQueryParam(d.p.am_process_initializer,s._id),t.eventCenterS.processInitializers.selectedInitializer.next(s)):yield t.resetThisUrl()})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickProcessInitializer(){this.selectedRows.length&&this.edit()}static \u0275fac=function(s){return new(s||n)(e.Y36(x.e),e.Y36(_.b),e.Y36(v.W),e.Y36(D.S),e.Y36(A.D),e.Y36(C.L),e.Y36(E.u),e.Y36(m.F0),e.Y36(R.K),e.Y36(U.E),e.Y36(v.W),e.Y36(C.L),e.Y36(z.YP),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:n,selectors:[["app-process-initializers-list"]],viewQuery:function(s,i){if(1&s&&e.Gf(F,5),2&s){let r;e.iGM(r=e.CRH())&&(i.processInitializersFormC=r.first)}},inputs:{showCheckbox:"showCheckbox"},decls:19,vars:11,consts:[[1,"card","shadow-sm","h-100"],["pTooltip","",1,"card-header"],["src","/assets/images/icons/process_initializers.svg","alt","Process Initializer",1,"fa-fw","mr-1",2,"width","27px"],["href","https://docs.apimaker.dev/v1/docs/features/process-initializers.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],["tooltipPosition","left","pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 82px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"data"],["processInitializersFormC",""],["tooltipPosition","left","pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["tooltipPosition","left","pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-warning","fa-fw"],["tooltipPosition","left","pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],["style","width: 45px;",4,"ngIf"],[2,"width","30px"],[2,"width","70px"],[2,"width","45px"],[3,"pSelectableRow"],[4,"ngIf"],["pTooltip","Script Executed","class","fas fa-solid fa-check fa-fw align-middle text-success text-v-small pr-1",4,"ngIf"],[1,"text-center"],["href","javascript:","pTooltip","Test API","tooltipPosition","left",1,"btn","btn-xsm-custom","mr-3",3,"routerLink","queryParams","click"],[1,"fas","fa-vial","text-info","fa-fw","test-tube","pt-1"],[3,"value","pSelectableRow"],["pTooltip","Script Executed",1,"fas","fa-solid","fa-check","fa-fw","align-middle","text-success","text-v-small","pr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(s,i){1&s&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"img",2),e._uU(4," Process Initializer"),e.qZA(),e.TgZ(5,"a",3),e._UZ(6,"img",4),e.qZA(),e.TgZ(7,"span",5),e.NdJ("click",function(){return i.add()}),e._UZ(8,"i",6),e.qZA(),e.YNc(9,J,2,0,"span",7),e.YNc(10,Q,2,0,"span",8),e.YNc(11,k,2,0,"span",9),e.qZA(),e.TgZ(12,"div",10)(13,"p-table",11),e.NdJ("selectionChange",function(u){return i.selectedRows=u})("selectionChange",function(){return i.itemSelected()})("dblclick",function(){return i.dblClickProcessInitializer()}),e.YNc(14,O,8,1,"ng-template",12),e.YNc(15,W,12,12,"ng-template",13),e.qZA(),e.YNc(16,j,1,0,"p-progressSpinner",14),e.qZA()(),e._UZ(17,"app-process-initializers-form",15,16)),2&s&&(e.xp6(9),e.Q6J("ngIf",i.selectedRows.length&&i.selectedRows.length<2),e.xp6(1),e.Q6J("ngIf",i.selectedRows.length&&i.selectedRows.length<2),e.xp6(1),e.Q6J("ngIf",i.selectedRows.length),e.xp6(2),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",i.selectedRows)("dataKey",i.gridKey)("scrollable",!0)("value",i.rows),e.xp6(3),e.Q6J("ngIf",i.loading.grid),e.xp6(1),e.Q6J("data",i.data))},dependencies:[m.rH,M.O5,f.iA,z.jx,f.Ei,f.UA,f.Mo,L.G,N.u,Y.g],encapsulation:2,changeDetection:0})}return n})(),P=(()=>{class n{constructor(){}ngOnInit(){}static \u0275fac=function(s){return new(s||n)};static \u0275cmp=e.Xpm({type:n,selectors:[["app-process-initializers-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1","overflow-auto"]],template:function(s,i){1&s&&(e.TgZ(0,"div",0),e._UZ(1,"app-process-initializers-list"),e.qZA())},dependencies:[S],encapsulation:2})}return n})();var $=a(6236);const X=[{path:"main",component:P,canActivate:[T.P]}];let V=(()=>{class n{static \u0275fac=function(s){return new(s||n)};static \u0275mod=e.oAB({type:n});static \u0275inj=e.cJS({imports:[m.Bz.forChild(X),Z.u,$.e]})}return n})()}}]);
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[5421],{5421:(le,g,a)=>{a.r(g),a.d(g,{ProcessInitializersM:()=>V});var m=a(7664),Z=a(7359),T=a(3726),e=a(4946),l=a(5861),c=a(6990),p=a(3157),h=a(328),d=a(6212),I=a(1162),y=a(5085),w=a(921),x=a(2694),_=a(7240),v=a(9961),D=a(2189),A=a(5852),C=a(7414),E=a(2915),R=a(3835),U=a(3429),z=a(5219),M=a(6814),f=a(5431),L=a(7680),N=a(3259),Y=a(4491);const F=["processInitializersFormC"];function J(n,o){if(1&n){const t=e.EpF();e.TgZ(0,"span",17),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.edit())}),e._UZ(1,"i",18),e.qZA()}}function Q(n,o){if(1&n){const t=e.EpF();e.TgZ(0,"span",19),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.clone())}),e._UZ(1,"i",20),e.qZA()}}function k(n,o){if(1&n){const t=e.EpF();e.TgZ(0,"span",21),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.removePermanent())}),e._UZ(1,"i",22),e.qZA()}}function b(n,o){1&n&&(e.TgZ(0,"th",26),e._UZ(1,"p-tableHeaderCheckbox"),e.qZA())}function O(n,o){if(1&n&&(e.TgZ(0,"tr"),e.YNc(1,b,2,0,"th",23),e._UZ(2,"th",24),e.TgZ(3,"th",25),e._uU(4,"Order"),e.qZA(),e.TgZ(5,"th"),e._uU(6,"Name"),e.qZA(),e._UZ(7,"th",25),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.showCheckbox)}}function G(n,o){if(1&n&&(e.TgZ(0,"td"),e._UZ(1,"p-tableCheckbox",33),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("value",t)("pSelectableRow",t)}}function K(n,o){1&n&&e._UZ(0,"i",34)}const H=function(){return["/api-info/api-testing/testing"]},B=function(n,o,t){return{at_category:n,at_user:o,at_api:t}};function W(n,o){if(1&n&&(e.TgZ(0,"tr",27),e.YNc(1,G,2,2,"td",28),e.TgZ(2,"td"),e.YNc(3,K,1,0,"i",29),e.qZA(),e.TgZ(4,"td"),e._uU(5),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td")(9,"div",30)(10,"a",31),e.NdJ("click",function(s){return s.stopPropagation()}),e._UZ(11,"i",32),e.qZA()()()()),2&n){const t=o.$implicit,s=e.oxw();e.Q6J("pSelectableRow",t),e.xp6(1),e.Q6J("ngIf",s.showCheckbox),e.xp6(2),e.Q6J("ngIf",t.isScriptExecutedCalculated),e.xp6(2),e.Oqu(t.order),e.xp6(2),e.Oqu(t.name),e.xp6(3),e.Q6J("routerLink",e.DdM(7,H))("queryParams",e.kEZ(8,B,s.EAPICategory.PROCESS_INITIALIZER,s.authCS.getUserId(),t._id))}}function j(n,o){1&n&&e._UZ(0,"p-progressSpinner",35)}let S=(()=>{class n{processInitializersS;generalS;notificationS;navigationCS;authCS;constantsS;eventCenterS;router;userS;instanceS;ns;cs;confirmationService;cd;showCheckbox=!0;loading={grid:!1};subscriptions=[];data={mode:h.D.ADD,eventChannel:new e.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;EUserType=w.dN;gridKey=I.iH._id;EAPICategory=y.R;selectedRows=[];processInitializersFormC;constructor(t,s,i,r,u,q,ee,te,ie,se,ne,ae,re,oe){this.processInitializersS=t,this.generalS=s,this.notificationS=i,this.navigationCS=r,this.authCS=u,this.constantsS=q,this.eventCenterS=ee,this.router=te,this.userS=ie,this.instanceS=se,this.ns=ne,this.cs=ae,this.confirmationService=re,this.cd=oe}ngOnInit(){var t=this;return(0,l.Z)(function*(){t.eventCenterS.processInitializers.selectedInitializer.next(void 0),yield t.loadGridData(),t.subscriptions.push(t.data.eventChannel.subscribe(function(){var s=(0,l.Z)(function*(i){(i.action===p.F.SAVED||i.action===p.F.UPDATED)&&(t.processInitializersFormC.hideModal(),yield t.loadGridData())});return function(i){return s.apply(this,arguments)}}())),t.generalS.setNewTitle("API Maker - Process Initializers")})()}loadGridData(){var t=this;return(0,l.Z)(function*(){t.loading.grid=!0;const s={find:{user:t.authCS.getUserId(),active:!0},select:{name:1,label:1,active:1,user:1,order:1},sort:{order:1}};t.showAll&&delete s.find.active;const i=yield t.processInitializersS.query(s).toPromise();i&&(t.selectedRows=[],t.rows=i.data,t.rowsMap=c.keyBy(t.rows,I.iH._id));let r=t.navigationCS.getQueryParam(d.p.am_process_initializer);r&&!t.rowsMap[r]&&t.rows.length&&(r=t.rows[0]._id),t.rowsMap[r]?(t.selectedRows=[t.rowsMap[r]],yield t.fillData()):t.eventCenterS.processInitializers.selectedInitializer.next(void 0),t.loading.grid=!1,t.cd.detectChanges()})()}add(){this.data.formData={order:(c.max(c.map(this.rows,"order"))||0)+1},this.data.mode=h.D.ADD,this.data.eventChannel.emit({action:p.F.OPEN_FORM_IN_ADD_MODE,data:this.data.formData}),this.processInitializersFormC.showModal()}edit(){this.data.formData=this.rowsMap[c.map(this.selectedRows,"_id")[0]],this.data.mode=h.D.EDIT,this.data.eventChannel.emit({action:p.F.OPEN_FORM_IN_EDIT_MODE}),this.processInitializersFormC.showModal()}clone(){var t=this;return(0,l.Z)(function*(){try{if(!t.selectedRows[0]||!t.rowsMap[c.map(t.selectedRows,"_id")[0]])return;const s=t.rowsMap[c.map(t.selectedRows,"_id")[0]]._id,i=(yield t.processInitializersS.getById(s).toPromise()).data;delete i._id,i.name=`${i.name}-clone`,i.order=(c.max(c.map(t.rows,"order"))||0)+1,(yield t.processInitializersS.post(i).toPromise()).success?(t.notificationS.showSuccess(t.constantsS.processInitializer.cloneSuccess),t.loadGridData()):t.notificationS.showSuccess(t.constantsS.processInitializer.cloneSuccess)}catch{t.notificationS.showError(t.constantsS.processInitializer.cloneError)}})()}removePermanent(){var t=this;return(0,l.Z)(function*(){var s;t.confirmationService.confirm({message:t.cs.processInitializer.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(s=(0,l.Z)(function*(){for(const i of t.selectedRows)yield t.hardDelete(i._id);t.ns.showSuccess(t.cs.processInitializer.removePermanent),yield t.loadGridData()}),function(){return s.apply(this,arguments)})})})()}hardDelete(t){var s=this;return(0,l.Z)(function*(){yield s.processInitializersS.permanentDelete(t).toPromise()})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.processInitializers.selectedInitializer.next(void 0)}resetThisUrl(){var t=this;return(0,l.Z)(function*(){t.eventCenterS.processInitializers.selectedInitializer.next(void 0),yield t.navigationCS.setQueryParam(d.p.am_process_initializer,null)})()}itemSelected(){var t=this;return(0,l.Z)(function*(){yield t.resetThisUrl(),setTimeout(t.fillData.bind(t))})()}fillData(){var t=this;return(0,l.Z)(function*(){if(!t.selectedRows.length)return yield t.navigationCS.setQueryParam(d.p.am_process_initializer,""),void t.eventCenterS.processInitializers.selectedInitializer.next(null);const s=t.selectedRows[0];s?(yield t.navigationCS.setQueryParam(d.p.am_process_initializer,s._id),t.eventCenterS.processInitializers.selectedInitializer.next(s)):yield t.resetThisUrl()})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickProcessInitializer(){this.selectedRows.length&&this.edit()}static \u0275fac=function(s){return new(s||n)(e.Y36(x.e),e.Y36(_.b),e.Y36(v.W),e.Y36(D.S),e.Y36(A.D),e.Y36(C.L),e.Y36(E.u),e.Y36(m.F0),e.Y36(R.K),e.Y36(U.E),e.Y36(v.W),e.Y36(C.L),e.Y36(z.YP),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:n,selectors:[["app-process-initializers-list"]],viewQuery:function(s,i){if(1&s&&e.Gf(F,5),2&s){let r;e.iGM(r=e.CRH())&&(i.processInitializersFormC=r.first)}},inputs:{showCheckbox:"showCheckbox"},decls:19,vars:11,consts:[[1,"card","shadow-sm","h-100"],["pTooltip","",1,"card-header"],["src","/assets/images/icons/process_initializers.svg","alt","Process Initializer",1,"fa-fw","mr-1",2,"width","27px"],["href","https://docs.apimaker.dev/v1/docs/features/process-initializers.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],["tooltipPosition","left","pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 82px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"data"],["processInitializersFormC",""],["tooltipPosition","left","pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["tooltipPosition","left","pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-warning","fa-fw"],["tooltipPosition","left","pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],["style","width: 45px;",4,"ngIf"],[2,"width","30px"],[2,"width","70px"],[2,"width","45px"],[3,"pSelectableRow"],[4,"ngIf"],["pTooltip","Script Executed","class","fas fa-solid fa-check fa-fw align-middle text-success text-v-small pr-1",4,"ngIf"],[1,"text-center"],["href","javascript:","pTooltip","Test API","tooltipPosition","left",1,"btn","btn-xsm-custom","mr-3",3,"routerLink","queryParams","click"],[1,"fas","fa-vial","text-info","fa-fw","test-tube","pt-1"],[3,"value","pSelectableRow"],["pTooltip","Script Executed",1,"fas","fa-solid","fa-check","fa-fw","align-middle","text-success","text-v-small","pr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(s,i){1&s&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"img",2),e._uU(4," Process Initializer"),e.qZA(),e.TgZ(5,"a",3),e._UZ(6,"img",4),e.qZA(),e.TgZ(7,"span",5),e.NdJ("click",function(){return i.add()}),e._UZ(8,"i",6),e.qZA(),e.YNc(9,J,2,0,"span",7),e.YNc(10,Q,2,0,"span",8),e.YNc(11,k,2,0,"span",9),e.qZA(),e.TgZ(12,"div",10)(13,"p-table",11),e.NdJ("selectionChange",function(u){return i.selectedRows=u})("selectionChange",function(){return i.itemSelected()})("dblclick",function(){return i.dblClickProcessInitializer()}),e.YNc(14,O,8,1,"ng-template",12),e.YNc(15,W,12,12,"ng-template",13),e.qZA(),e.YNc(16,j,1,0,"p-progressSpinner",14),e.qZA()(),e._UZ(17,"app-process-initializers-form",15,16)),2&s&&(e.xp6(9),e.Q6J("ngIf",i.selectedRows.length&&i.selectedRows.length<2),e.xp6(1),e.Q6J("ngIf",i.selectedRows.length&&i.selectedRows.length<2),e.xp6(1),e.Q6J("ngIf",i.selectedRows.length),e.xp6(2),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",i.selectedRows)("dataKey",i.gridKey)("scrollable",!0)("value",i.rows),e.xp6(3),e.Q6J("ngIf",i.loading.grid),e.xp6(1),e.Q6J("data",i.data))},dependencies:[m.rH,M.O5,f.iA,z.jx,f.Ei,f.UA,f.Mo,L.G,N.u,Y.g],encapsulation:2,changeDetection:0})}return n})(),P=(()=>{class n{constructor(){}ngOnInit(){}static \u0275fac=function(s){return new(s||n)};static \u0275cmp=e.Xpm({type:n,selectors:[["app-process-initializers-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1","overflow-auto"]],template:function(s,i){1&s&&(e.TgZ(0,"div",0),e._UZ(1,"app-process-initializers-list"),e.qZA())},dependencies:[S],encapsulation:2})}return n})();var $=a(6236);const X=[{path:"main",component:P,canActivate:[T.P]}];let V=(()=>{class n{static \u0275fac=function(s){return new(s||n)};static \u0275mod=e.oAB({type:n});static \u0275inj=e.cJS({imports:[m.Bz.forChild(X),Z.u,$.e]})}return n})()}}]);
package/dist/5679.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[5679],{5679:($,m,a)=>{a.r(m),a.d(m,{SecretManagementM:()=>b});var M=a(7664),Z=a(3726),y=a(8761),T=a(4950),e=a(4946),o=a(5861),l=a(3157),p=a(328),h=a(6212),D=a(6990),f=a(1162),w=a(115),S=a(7240),P=a(9961),g=a(5219),F=a(2189),A=a(5852),I=a(204),E=a(5405),R=a(2915),x=a(7414),_=a(6814),u=a(5431),N=a(7680),W=a(3259);function Y(s,c){if(1&s){const t=e.EpF();e.TgZ(0,"span",15),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.edit())}),e._UZ(1,"i",16),e.qZA()}}function O(s,c){if(1&s){const t=e.EpF();e.TgZ(0,"span",17),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.clone())}),e._UZ(1,"i",18),e.qZA()}}function U(s,c){if(1&s){const t=e.EpF();e.TgZ(0,"span",19),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.removePermanentDialog())}),e._UZ(1,"i",20),e.qZA()}}function J(s,c){1&s&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"ID"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Name"),e.qZA(),e._UZ(5,"th",21),e.qZA())}function Q(s,c){1&s&&e._UZ(0,"i",24)}function G(s,c){if(1&s&&(e.TgZ(0,"tr",22)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e.YNc(6,Q,1,0,"i",23),e.qZA()()),2&s){const t=c.$implicit;e.Q6J("pSelectableRow",t),e.xp6(2),e.Oqu(t._id),e.xp6(2),e.Oqu(t.name),e.xp6(2),e.Q6J("ngIf",t.isDefault)}}function k(s,c){1&s&&e._UZ(0,"p-progressSpinner",25)}let C=(()=>{class s{secretS;generalCS;notificationS;confirmationService;navigationCS;authCS;constantsCS;eventCenterCS;eventCenterS;constantsS;cd;generalS;loading={grid:!1};subscriptions=[];rows=[];rowsMap={};showAll=!1;selectedRows=[];gridKey=f.iH._id;constructor(t,n,i,r,d,H,B,j,L,V,z,X){this.secretS=t,this.generalCS=n,this.notificationS=i,this.confirmationService=r,this.navigationCS=d,this.authCS=H,this.constantsCS=B,this.eventCenterCS=j,this.eventCenterS=L,this.constantsS=V,this.cd=z,this.generalS=X}ngOnInit(){this.loadGridData(),this.subscriptions.push(this.eventCenterS.headerC.dataSecretForm.eventChannel.subscribe(t=>{(t.action===l.F.SAVED||t.action===l.F.UPDATED)&&(this.eventCenterS.headerC.secManFormC.hideModal(),this.loadGridData())})),this.generalS.setNewTitle("API Maker - Secrets")}loadGridData(){var t=this;this.loading.grid=!0;const n={find:{user:this.authCS.getUserId(),active:!0},select:{name:1,active:1,isDefault:1},sort:{name:1}};this.showAll&&delete n.find.active,this.subscriptions.push(this.secretS.query(n).subscribe(function(){var i=(0,o.Z)(function*(r){r.success&&(t.selectedRows=[],t.rows=r.data,t.rowsMap=D.keyBy(t.rows,f.iH._id));const d=t.navigationCS.getQueryParam(h.p.secret);t.rowsMap[d]&&(yield t.fillData()),t.generalS.setNewTitle("API Maker - Secrets"),t.loading.grid=!1,t.cd.detectChanges()});return function(r){return i.apply(this,arguments)}}()))}add(){this.eventCenterS.headerC.dataSecretForm.formData=void 0,this.eventCenterS.headerC.dataSecretForm.mode=p.D.ADD,this.eventCenterS.headerC.dataSecretForm.eventChannel.emit({action:l.F.OPEN_FORM_IN_ADD_MODE}),this.eventCenterS.headerC.secManFormC.showModal()}view(){this.eventCenterS.headerC.dataSecretForm.formData=this.selectedRows[0],this.eventCenterS.headerC.dataSecretForm.mode=p.D.VIEW,this.eventCenterS.headerC.dataSecretForm.eventChannel.emit({action:l.F.OPEN_FORM_IN_VIEW_MODE}),this.eventCenterS.headerC.secManFormC.showModal()}edit(){this.eventCenterS.headerC.dataSecretForm.formData=this.selectedRows[0],this.eventCenterS.headerC.dataSecretForm.mode=p.D.EDIT,this.eventCenterS.headerC.dataSecretForm.eventChannel.emit({action:l.F.OPEN_FORM_IN_EDIT_MODE}),this.eventCenterS.headerC.secManFormC.showModal()}clone(){var t=this;return(0,o.Z)(function*(){try{if(!t.selectedRows[0])return;const n=(yield t.secretS.getById(t.selectedRows[0]._id).toPromise()).data;delete n._id,delete n.isDefault,n.name=`${n.name}-clone`,(yield t.secretS.post(n).toPromise()).success?(t.notificationS.showSuccess(t.constantsS.secrets.cloneSuccess),t.loadGridData()):t.notificationS.showSuccess(t.constantsS.secrets.cloneSuccess)}catch{t.notificationS.showError(t.constantsS.secrets.cloneError)}})()}removePermanentDialog(){var t=this;return(0,o.Z)(function*(){var n;t.confirmationService.confirm({message:t.constantsCS.secret.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(n=(0,o.Z)(function*(){yield t.removePermanent()}),function(){return n.apply(this,arguments)})})})()}removePermanent(){var t=this;return(0,o.Z)(function*(){t.loading.grid=!0;try{(yield t.secretS.permanentDelete(t.selectedRows[0]._id).toPromise()).success&&(t.notificationS.showSuccess(t.constantsCS.secret.removePermanent),t.resetSelectedRows(),t.loadGridData())}catch(n){t.notificationS.showErrorFromResponse(n.error,t.constantsCS.secret.removePermanentError)}t.loading.grid=!1})()}resetSelectedRows(){this.selectedRows.length=0}resetDependents(){var t=this;return(0,o.Z)(function*(){yield t.navigationCS.setQueryParam(h.p.secret,null)})()}secretSelected(){var t=this;return(0,o.Z)(function*(){t.resetDependents(),t.fillData()})()}fillData(){var t=this;return(0,o.Z)(function*(){t.selectedRows.length?yield t.navigationCS.setQueryParam(h.p.secret,t.selectedRows[0]._id):yield t.navigationCS.setQueryParam(h.p.secret,"")})()}ngOnDestroy(){this.generalCS.unsubscribe(this.subscriptions)}dblClickSecrets(){this.selectedRows.length&&this.edit()}static \u0275fac=function(n){return new(n||s)(e.Y36(w.e),e.Y36(S.b),e.Y36(P.W),e.Y36(g.YP),e.Y36(F.S),e.Y36(A.D),e.Y36(I.s),e.Y36(E.M),e.Y36(R.u),e.Y36(x.L),e.Y36(e.sBO),e.Y36(S.b))};static \u0275cmp=e.Xpm({type:s,selectors:[["app-secret-man-w"]],decls:17,vars:10,consts:[[1,"card","shadow-sm",2,"height","calc(100vh - 50px)"],[1,"card-header"],["src","/assets/images/icons/secret.svg","alt","Secret Management",1,"fa-fw","mr-1"],["href","https://docs.apimaker.dev/v1/docs/secrets/secrets.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],["tooltipPosition","left","pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 100px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["tooltipPosition","left","pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["tooltipPosition","left","pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-warning","fa-fw"],["tooltipPosition","left","pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],[2,"width","40px"],[3,"pSelectableRow"],["class","fas fa-check fa-fw text-success",4,"ngIf"],[1,"fas","fa-check","fa-fw","text-success"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(n,i){1&n&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"img",2),e._uU(4," Secrets"),e.qZA(),e.TgZ(5,"a",3),e._UZ(6,"img",4),e.qZA(),e.TgZ(7,"span",5),e.NdJ("click",function(){return i.add()}),e._UZ(8,"i",6),e.qZA(),e.YNc(9,Y,2,0,"span",7),e.YNc(10,O,2,0,"span",8),e.YNc(11,U,2,0,"span",9),e.qZA(),e.TgZ(12,"div",10)(13,"p-table",11),e.NdJ("selectionChange",function(d){return i.selectedRows=d})("selectionChange",function(){return i.secretSelected()})("dblclick",function(){return i.dblClickSecrets()}),e.YNc(14,J,6,0,"ng-template",12),e.YNc(15,G,7,4,"ng-template",13),e.qZA(),e.YNc(16,k,1,0,"p-progressSpinner",14),e.qZA()()),2&n&&(e.xp6(9),e.Q6J("ngIf",i.selectedRows.length),e.xp6(1),e.Q6J("ngIf",i.selectedRows.length),e.xp6(1),e.Q6J("ngIf",i.selectedRows.length),e.xp6(2),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",i.selectedRows)("dataKey",i.gridKey)("scrollable",!0)("value",i.rows),e.xp6(3),e.Q6J("ngIf",i.loading.grid))},dependencies:[_.O5,u.iA,g.jx,u.Ei,N.G,W.u],encapsulation:2})}return s})();const K=[{path:"",component:(()=>{class s{constructor(){}ngOnInit(){}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=e.Xpm({type:s,selectors:[["app-sec-man-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1"]],template:function(n,i){1&n&&(e.TgZ(0,"div",0),e._UZ(1,"app-secret-man-w"),e.qZA())},dependencies:[C],encapsulation:2})}return s})(),canActivate:[Z.P]}];let b=(()=>{class s{static \u0275fac=function(n){return new(n||s)};static \u0275mod=e.oAB({type:s});static \u0275inj=e.cJS({imports:[M.Bz.forChild(K),y.u,T.A]})}return s})()}}]);
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[5679],{5679:($,m,a)=>{a.r(m),a.d(m,{SecretManagementM:()=>b});var M=a(7664),Z=a(3726),y=a(7359),T=a(4950),e=a(4946),o=a(5861),l=a(3157),p=a(328),h=a(6212),D=a(6990),f=a(1162),w=a(115),S=a(7240),P=a(9961),g=a(5219),F=a(2189),A=a(5852),I=a(204),E=a(5405),R=a(2915),x=a(7414),_=a(6814),u=a(5431),N=a(7680),W=a(3259);function Y(s,c){if(1&s){const t=e.EpF();e.TgZ(0,"span",15),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.edit())}),e._UZ(1,"i",16),e.qZA()}}function O(s,c){if(1&s){const t=e.EpF();e.TgZ(0,"span",17),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.clone())}),e._UZ(1,"i",18),e.qZA()}}function U(s,c){if(1&s){const t=e.EpF();e.TgZ(0,"span",19),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.removePermanentDialog())}),e._UZ(1,"i",20),e.qZA()}}function J(s,c){1&s&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"ID"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Name"),e.qZA(),e._UZ(5,"th",21),e.qZA())}function Q(s,c){1&s&&e._UZ(0,"i",24)}function G(s,c){if(1&s&&(e.TgZ(0,"tr",22)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e.YNc(6,Q,1,0,"i",23),e.qZA()()),2&s){const t=c.$implicit;e.Q6J("pSelectableRow",t),e.xp6(2),e.Oqu(t._id),e.xp6(2),e.Oqu(t.name),e.xp6(2),e.Q6J("ngIf",t.isDefault)}}function k(s,c){1&s&&e._UZ(0,"p-progressSpinner",25)}let C=(()=>{class s{secretS;generalCS;notificationS;confirmationService;navigationCS;authCS;constantsCS;eventCenterCS;eventCenterS;constantsS;cd;generalS;loading={grid:!1};subscriptions=[];rows=[];rowsMap={};showAll=!1;selectedRows=[];gridKey=f.iH._id;constructor(t,n,i,r,d,H,B,j,L,V,z,X){this.secretS=t,this.generalCS=n,this.notificationS=i,this.confirmationService=r,this.navigationCS=d,this.authCS=H,this.constantsCS=B,this.eventCenterCS=j,this.eventCenterS=L,this.constantsS=V,this.cd=z,this.generalS=X}ngOnInit(){this.loadGridData(),this.subscriptions.push(this.eventCenterS.headerC.dataSecretForm.eventChannel.subscribe(t=>{(t.action===l.F.SAVED||t.action===l.F.UPDATED)&&(this.eventCenterS.headerC.secManFormC.hideModal(),this.loadGridData())})),this.generalS.setNewTitle("API Maker - Secrets")}loadGridData(){var t=this;this.loading.grid=!0;const n={find:{user:this.authCS.getUserId(),active:!0},select:{name:1,active:1,isDefault:1},sort:{name:1}};this.showAll&&delete n.find.active,this.subscriptions.push(this.secretS.query(n).subscribe(function(){var i=(0,o.Z)(function*(r){r.success&&(t.selectedRows=[],t.rows=r.data,t.rowsMap=D.keyBy(t.rows,f.iH._id));const d=t.navigationCS.getQueryParam(h.p.secret);t.rowsMap[d]&&(yield t.fillData()),t.generalS.setNewTitle("API Maker - Secrets"),t.loading.grid=!1,t.cd.detectChanges()});return function(r){return i.apply(this,arguments)}}()))}add(){this.eventCenterS.headerC.dataSecretForm.formData=void 0,this.eventCenterS.headerC.dataSecretForm.mode=p.D.ADD,this.eventCenterS.headerC.dataSecretForm.eventChannel.emit({action:l.F.OPEN_FORM_IN_ADD_MODE}),this.eventCenterS.headerC.secManFormC.showModal()}view(){this.eventCenterS.headerC.dataSecretForm.formData=this.selectedRows[0],this.eventCenterS.headerC.dataSecretForm.mode=p.D.VIEW,this.eventCenterS.headerC.dataSecretForm.eventChannel.emit({action:l.F.OPEN_FORM_IN_VIEW_MODE}),this.eventCenterS.headerC.secManFormC.showModal()}edit(){this.eventCenterS.headerC.dataSecretForm.formData=this.selectedRows[0],this.eventCenterS.headerC.dataSecretForm.mode=p.D.EDIT,this.eventCenterS.headerC.dataSecretForm.eventChannel.emit({action:l.F.OPEN_FORM_IN_EDIT_MODE}),this.eventCenterS.headerC.secManFormC.showModal()}clone(){var t=this;return(0,o.Z)(function*(){try{if(!t.selectedRows[0])return;const n=(yield t.secretS.getById(t.selectedRows[0]._id).toPromise()).data;delete n._id,delete n.isDefault,n.name=`${n.name}-clone`,(yield t.secretS.post(n).toPromise()).success?(t.notificationS.showSuccess(t.constantsS.secrets.cloneSuccess),t.loadGridData()):t.notificationS.showSuccess(t.constantsS.secrets.cloneSuccess)}catch{t.notificationS.showError(t.constantsS.secrets.cloneError)}})()}removePermanentDialog(){var t=this;return(0,o.Z)(function*(){var n;t.confirmationService.confirm({message:t.constantsCS.secret.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(n=(0,o.Z)(function*(){yield t.removePermanent()}),function(){return n.apply(this,arguments)})})})()}removePermanent(){var t=this;return(0,o.Z)(function*(){t.loading.grid=!0;try{(yield t.secretS.permanentDelete(t.selectedRows[0]._id).toPromise()).success&&(t.notificationS.showSuccess(t.constantsCS.secret.removePermanent),t.resetSelectedRows(),t.loadGridData())}catch(n){t.notificationS.showErrorFromResponse(n.error,t.constantsCS.secret.removePermanentError)}t.loading.grid=!1})()}resetSelectedRows(){this.selectedRows.length=0}resetDependents(){var t=this;return(0,o.Z)(function*(){yield t.navigationCS.setQueryParam(h.p.secret,null)})()}secretSelected(){var t=this;return(0,o.Z)(function*(){t.resetDependents(),t.fillData()})()}fillData(){var t=this;return(0,o.Z)(function*(){t.selectedRows.length?yield t.navigationCS.setQueryParam(h.p.secret,t.selectedRows[0]._id):yield t.navigationCS.setQueryParam(h.p.secret,"")})()}ngOnDestroy(){this.generalCS.unsubscribe(this.subscriptions)}dblClickSecrets(){this.selectedRows.length&&this.edit()}static \u0275fac=function(n){return new(n||s)(e.Y36(w.e),e.Y36(S.b),e.Y36(P.W),e.Y36(g.YP),e.Y36(F.S),e.Y36(A.D),e.Y36(I.s),e.Y36(E.M),e.Y36(R.u),e.Y36(x.L),e.Y36(e.sBO),e.Y36(S.b))};static \u0275cmp=e.Xpm({type:s,selectors:[["app-secret-man-w"]],decls:17,vars:10,consts:[[1,"card","shadow-sm",2,"height","calc(100vh - 50px)"],[1,"card-header"],["src","/assets/images/icons/secret.svg","alt","Secret Management",1,"fa-fw","mr-1"],["href","https://docs.apimaker.dev/v1/docs/secrets/secrets.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],["tooltipPosition","left","pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 100px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["tooltipPosition","left","pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["tooltipPosition","left","pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-warning","fa-fw"],["tooltipPosition","left","pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],[2,"width","40px"],[3,"pSelectableRow"],["class","fas fa-check fa-fw text-success",4,"ngIf"],[1,"fas","fa-check","fa-fw","text-success"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(n,i){1&n&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"img",2),e._uU(4," Secrets"),e.qZA(),e.TgZ(5,"a",3),e._UZ(6,"img",4),e.qZA(),e.TgZ(7,"span",5),e.NdJ("click",function(){return i.add()}),e._UZ(8,"i",6),e.qZA(),e.YNc(9,Y,2,0,"span",7),e.YNc(10,O,2,0,"span",8),e.YNc(11,U,2,0,"span",9),e.qZA(),e.TgZ(12,"div",10)(13,"p-table",11),e.NdJ("selectionChange",function(d){return i.selectedRows=d})("selectionChange",function(){return i.secretSelected()})("dblclick",function(){return i.dblClickSecrets()}),e.YNc(14,J,6,0,"ng-template",12),e.YNc(15,G,7,4,"ng-template",13),e.qZA(),e.YNc(16,k,1,0,"p-progressSpinner",14),e.qZA()()),2&n&&(e.xp6(9),e.Q6J("ngIf",i.selectedRows.length),e.xp6(1),e.Q6J("ngIf",i.selectedRows.length),e.xp6(1),e.Q6J("ngIf",i.selectedRows.length),e.xp6(2),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",i.selectedRows)("dataKey",i.gridKey)("scrollable",!0)("value",i.rows),e.xp6(3),e.Q6J("ngIf",i.loading.grid))},dependencies:[_.O5,u.iA,g.jx,u.Ei,N.G,W.u],encapsulation:2})}return s})();const K=[{path:"",component:(()=>{class s{constructor(){}ngOnInit(){}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=e.Xpm({type:s,selectors:[["app-sec-man-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1"]],template:function(n,i){1&n&&(e.TgZ(0,"div",0),e._UZ(1,"app-secret-man-w"),e.qZA())},dependencies:[C],encapsulation:2})}return s})(),canActivate:[Z.P]}];let b=(()=>{class s{static \u0275fac=function(n){return new(n||s)};static \u0275mod=e.oAB({type:s});static \u0275inj=e.cJS({imports:[M.Bz.forChild(K),y.u,T.A]})}return s})()}}]);
package/dist/5761.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[5761],{5761:(E,m,o)=>{o.r(m),o.d(m,{AutoIncrementM:()=>M});var f=o(7664),h=o(8761),v=o(3726),i=o(5861),Z=o(1162),A=o(6990),e=o(4946),T=o(9961),u=o(5219),I=o(7414),b=o(3429),y=o(7240),l=o(95),C=o(6814),U=o(2660),p=o(5431),_=o(7680),w=o(3259);function S(a,r){if(1&a){const t=e.EpF();e.TgZ(0,"span",36),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.edit())}),e._UZ(1,"i",37),e.qZA()}}function x(a,r){if(1&a){const t=e.EpF();e.TgZ(0,"span",38),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.removePermanentDialog())}),e._UZ(1,"i",39),e.qZA()}}function P(a,r){1&a&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Instance"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Database"),e.qZA(),e.TgZ(5,"th"),e._uU(6,"Collection"),e.qZA(),e.TgZ(7,"th"),e._uU(8,"Field Path"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"Last Generated Value"),e.qZA()())}function D(a,r){if(1&a&&(e.TgZ(0,"tr",40)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA()()),2&a){const t=r.$implicit;e.Q6J("pSelectableRow",t),e.xp6(2),e.Oqu(t.instance),e.xp6(2),e.Oqu(t.database),e.xp6(2),e.Oqu(t.collection),e.xp6(2),e.Oqu(t.field),e.xp6(2),e.Oqu(t.value)}}function q(a,r){1&a&&e._UZ(0,"p-progressSpinner",41)}function L(a,r){1&a&&e._UZ(0,"p-progressSpinner",41)}const J=[{path:"main",component:(()=>{class a{ns;confirmationService;constantsS;instanceS;cd;generalS;loading={grid:!1,form:!1};rows=[];rowsMap={};gridKey=Z.GR.id;idCounter=0;val;selectedRows=[];constructor(t,s,n,c,d,R){this.ns=t,this.confirmationService=s,this.constantsS=n,this.instanceS=c,this.cd=d,this.generalS=R}ngOnInit(){this.loadGridData(),this.generalS.setNewTitle("API Maker - Auto Increments")}loadGridData(){var t=this;return(0,i.Z)(function*(){t.loading.grid=!0,t.selectedRows=[];const s=yield t.instanceS.getAllAutoIncrement().toPromise();t.rows=s.data,t.idCounter=0;for(const n of t.rows)n.id=t.idCounter++;t.rowsMap=A.keyBy(t.rows,t.gridKey),t.loading.grid=!1,t.cd.detectChanges()})()}edit(){var t=this;return(0,i.Z)(function*(){t.selectedRows.length&&($("#idEditIncrement").modal("show"),t.val=t.selectedRows[0].value)})()}removePermanentDialog(){var t=this;return(0,i.Z)(function*(){var s;t.confirmationService.confirm({message:t.constantsS.autoIncrement.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(s=(0,i.Z)(function*(){yield t.removePermanent()}),function(){return s.apply(this,arguments)})})})()}removePermanent(){var t=this;return(0,i.Z)(function*(){t.loading.grid=!0;const s=t.selectedRows[0],n=yield t.instanceS.deleteAutoIncrement(s).toPromise();t.loading.grid=!1,n.success?(t.ns.showSuccess(t.constantsS.autoIncrement.removePermanent),yield t.loadGridData()):t.ns.showErrorFromResponse(n,t.constantsS.autoIncrement.removePermanentError)})()}update(){var t=this;return(0,i.Z)(function*(){if(!t.val)return t.ns.showWarning("Please Provide Value");if(t.val<1)return t.ns.showWarning("Please Provide Positive Value");const s=t.selectedRows[0];s.value=t.val;try{t.loading.grid=!0,(yield t.instanceS.updateAutoIncrementKey(s).toPromise())&&(t.ns.showSuccess(t.constantsS.autoIncrement.editSuccess),yield t.loadGridData(),$("#idEditIncrement").modal("hide"),t.val=null),t.loading.grid=!1}catch(n){t.loading.grid=!1,t.ns.showErrorFromResponse(n.error||n,"Unable to update.")}t.cd.detectChanges()})()}static \u0275fac=function(s){return new(s||a)(e.Y36(T.W),e.Y36(u.YP),e.Y36(I.L),e.Y36(b.E),e.Y36(e.sBO),e.Y36(y.b))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-auto-increment-list"]],decls:59,vars:13,consts:[[1,"pt-1","pl-1","pr-1"],[1,"card","shadow-sm",2,"height","calc(100vh - 50px)"],[1,"card-header"],["src","/assets/images/icons/increment.svg","alt","Auto Increments",1,"fa-fw","mr-1"],["href","https://docs.apimaker.dev/v1/docs/features/auto-increment.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],["class","float-right cursor-pointer ml-3","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 94px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idEditIncrement","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body"],[1,"form-group","row","pt-4"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-6"],["min","1","name","val","spellcheck","false","type","number","placeholder","Value",1,"form-control","form-control-sm",3,"ngModel","ngModelChange"],[1,"mt-2",2,"line-height","1"],[1,"text-info","small","font-monospaced"],[1,"text-warning","small","font-monospaced"],[1,"small","font-monospaced"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"disabled","click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw","align-middle"],["pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],[3,"pSelectableRow"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(s,n){1&s&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"span"),e._UZ(4,"img",3),e._uU(5," Auto Increments"),e.qZA(),e.TgZ(6,"a",4),e._UZ(7,"img",5),e.qZA(),e.YNc(8,S,2,0,"span",6),e.YNc(9,x,2,0,"span",7),e.qZA(),e.TgZ(10,"div",8)(11,"p-table",9),e.NdJ("selectionChange",function(d){return n.selectedRows=d})("dblclick",function(){return n.edit()}),e.YNc(12,P,11,0,"ng-template",10),e.YNc(13,D,11,6,"ng-template",11),e.qZA(),e.YNc(14,q,1,0,"p-progressSpinner",12),e.qZA()()(),e.TgZ(15,"div",13)(16,"div",14)(17,"div",15)(18,"div",16)(19,"span"),e._UZ(20,"i",17),e._uU(21," Edit Auto Increment"),e.qZA(),e.TgZ(22,"div",18)(23,"button",19)(24,"span",20),e._UZ(25,"i",21),e.qZA()(),e.TgZ(26,"a",4),e._UZ(27,"img",5),e.qZA()()(),e.TgZ(28,"div",22)(29,"div",23)(30,"label",24),e._uU(31,"Value"),e.qZA(),e.TgZ(32,"div",25)(33,"input",26),e.NdJ("ngModelChange",function(d){return n.val=d}),e.qZA(),e.TgZ(34,"div",27)(35,"span",28),e._uU(36,"Next value will be maximum from below"),e.qZA(),e._UZ(37,"br"),e.TgZ(38,"span",29),e._uU(39),e.qZA(),e._UZ(40,"br"),e.TgZ(41,"span",30),e._uU(42,"or"),e.qZA(),e._UZ(43,"br"),e.TgZ(44,"span",29),e._uU(45,"\u{1f449} Max DB value + (step from schema || 1)"),e.qZA(),e._UZ(46,"br"),e.TgZ(47,"span",30),e._uU(48,"System will get max db value, when there is no entry available in this table."),e.qZA(),e._UZ(49,"br"),e.qZA()()()(),e.TgZ(50,"div",31)(51,"button",32),e._UZ(52,"i",33),e._uU(53," Close"),e.qZA(),e.TgZ(54,"button",34),e.NdJ("click",function(){return n.update()}),e._UZ(55,"i",35),e.TgZ(56,"span"),e._uU(57,"Update"),e.qZA()()(),e.YNc(58,L,1,0,"p-progressSpinner",12),e.qZA()()()),2&s&&(e.xp6(8),e.Q6J("ngIf",n.selectedRows.length),e.xp6(1),e.Q6J("ngIf",n.selectedRows.length),e.xp6(2),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",n.selectedRows)("dataKey",n.gridKey)("scrollable",!0)("value",n.rows),e.xp6(3),e.Q6J("ngIf",n.loading.grid),e.xp6(19),e.Q6J("ngModel",n.val),e.xp6(6),e.hij("\u{1f449} ",n.val," + (step from schema || 1)"),e.xp6(15),e.Q6J("disabled",!n.val),e.xp6(4),e.Q6J("ngIf",n.loading.form))},dependencies:[l.Fj,l.wV,l.JJ,l.qQ,l.On,C.O5,U.y,p.iA,u.jx,p.Ei,_.G,w.u],encapsulation:2,changeDetection:0})}return a})(),canActivate:[v.P]}];let M=(()=>{class a{static \u0275fac=function(s){return new(s||a)};static \u0275mod=e.oAB({type:a});static \u0275inj=e.cJS({imports:[f.Bz.forChild(J),h.u]})}return a})()}}]);
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[5761],{5761:(E,m,o)=>{o.r(m),o.d(m,{AutoIncrementM:()=>M});var f=o(7664),h=o(7359),v=o(3726),i=o(5861),Z=o(1162),A=o(6990),e=o(4946),T=o(9961),u=o(5219),I=o(7414),b=o(3429),y=o(7240),l=o(95),C=o(6814),U=o(2660),p=o(5431),_=o(7680),w=o(3259);function S(a,r){if(1&a){const t=e.EpF();e.TgZ(0,"span",36),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.edit())}),e._UZ(1,"i",37),e.qZA()}}function x(a,r){if(1&a){const t=e.EpF();e.TgZ(0,"span",38),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.removePermanentDialog())}),e._UZ(1,"i",39),e.qZA()}}function P(a,r){1&a&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Instance"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Database"),e.qZA(),e.TgZ(5,"th"),e._uU(6,"Collection"),e.qZA(),e.TgZ(7,"th"),e._uU(8,"Field Path"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"Last Generated Value"),e.qZA()())}function D(a,r){if(1&a&&(e.TgZ(0,"tr",40)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA()()),2&a){const t=r.$implicit;e.Q6J("pSelectableRow",t),e.xp6(2),e.Oqu(t.instance),e.xp6(2),e.Oqu(t.database),e.xp6(2),e.Oqu(t.collection),e.xp6(2),e.Oqu(t.field),e.xp6(2),e.Oqu(t.value)}}function q(a,r){1&a&&e._UZ(0,"p-progressSpinner",41)}function L(a,r){1&a&&e._UZ(0,"p-progressSpinner",41)}const J=[{path:"main",component:(()=>{class a{ns;confirmationService;constantsS;instanceS;cd;generalS;loading={grid:!1,form:!1};rows=[];rowsMap={};gridKey=Z.GR.id;idCounter=0;val;selectedRows=[];constructor(t,s,n,c,d,R){this.ns=t,this.confirmationService=s,this.constantsS=n,this.instanceS=c,this.cd=d,this.generalS=R}ngOnInit(){this.loadGridData(),this.generalS.setNewTitle("API Maker - Auto Increments")}loadGridData(){var t=this;return(0,i.Z)(function*(){t.loading.grid=!0,t.selectedRows=[];const s=yield t.instanceS.getAllAutoIncrement().toPromise();t.rows=s.data,t.idCounter=0;for(const n of t.rows)n.id=t.idCounter++;t.rowsMap=A.keyBy(t.rows,t.gridKey),t.loading.grid=!1,t.cd.detectChanges()})()}edit(){var t=this;return(0,i.Z)(function*(){t.selectedRows.length&&($("#idEditIncrement").modal("show"),t.val=t.selectedRows[0].value)})()}removePermanentDialog(){var t=this;return(0,i.Z)(function*(){var s;t.confirmationService.confirm({message:t.constantsS.autoIncrement.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(s=(0,i.Z)(function*(){yield t.removePermanent()}),function(){return s.apply(this,arguments)})})})()}removePermanent(){var t=this;return(0,i.Z)(function*(){t.loading.grid=!0;const s=t.selectedRows[0],n=yield t.instanceS.deleteAutoIncrement(s).toPromise();t.loading.grid=!1,n.success?(t.ns.showSuccess(t.constantsS.autoIncrement.removePermanent),yield t.loadGridData()):t.ns.showErrorFromResponse(n,t.constantsS.autoIncrement.removePermanentError)})()}update(){var t=this;return(0,i.Z)(function*(){if(!t.val)return t.ns.showWarning("Please Provide Value");if(t.val<1)return t.ns.showWarning("Please Provide Positive Value");const s=t.selectedRows[0];s.value=t.val;try{t.loading.grid=!0,(yield t.instanceS.updateAutoIncrementKey(s).toPromise())&&(t.ns.showSuccess(t.constantsS.autoIncrement.editSuccess),yield t.loadGridData(),$("#idEditIncrement").modal("hide"),t.val=null),t.loading.grid=!1}catch(n){t.loading.grid=!1,t.ns.showErrorFromResponse(n.error||n,"Unable to update.")}t.cd.detectChanges()})()}static \u0275fac=function(s){return new(s||a)(e.Y36(T.W),e.Y36(u.YP),e.Y36(I.L),e.Y36(b.E),e.Y36(e.sBO),e.Y36(y.b))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-auto-increment-list"]],decls:59,vars:13,consts:[[1,"pt-1","pl-1","pr-1"],[1,"card","shadow-sm",2,"height","calc(100vh - 50px)"],[1,"card-header"],["src","/assets/images/icons/increment.svg","alt","Auto Increments",1,"fa-fw","mr-1"],["href","https://docs.apimaker.dev/v1/docs/features/auto-increment.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],["class","float-right cursor-pointer ml-3","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 94px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idEditIncrement","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body"],[1,"form-group","row","pt-4"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-6"],["min","1","name","val","spellcheck","false","type","number","placeholder","Value",1,"form-control","form-control-sm",3,"ngModel","ngModelChange"],[1,"mt-2",2,"line-height","1"],[1,"text-info","small","font-monospaced"],[1,"text-warning","small","font-monospaced"],[1,"small","font-monospaced"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"disabled","click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw","align-middle"],["pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],[3,"pSelectableRow"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(s,n){1&s&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"span"),e._UZ(4,"img",3),e._uU(5," Auto Increments"),e.qZA(),e.TgZ(6,"a",4),e._UZ(7,"img",5),e.qZA(),e.YNc(8,S,2,0,"span",6),e.YNc(9,x,2,0,"span",7),e.qZA(),e.TgZ(10,"div",8)(11,"p-table",9),e.NdJ("selectionChange",function(d){return n.selectedRows=d})("dblclick",function(){return n.edit()}),e.YNc(12,P,11,0,"ng-template",10),e.YNc(13,D,11,6,"ng-template",11),e.qZA(),e.YNc(14,q,1,0,"p-progressSpinner",12),e.qZA()()(),e.TgZ(15,"div",13)(16,"div",14)(17,"div",15)(18,"div",16)(19,"span"),e._UZ(20,"i",17),e._uU(21," Edit Auto Increment"),e.qZA(),e.TgZ(22,"div",18)(23,"button",19)(24,"span",20),e._UZ(25,"i",21),e.qZA()(),e.TgZ(26,"a",4),e._UZ(27,"img",5),e.qZA()()(),e.TgZ(28,"div",22)(29,"div",23)(30,"label",24),e._uU(31,"Value"),e.qZA(),e.TgZ(32,"div",25)(33,"input",26),e.NdJ("ngModelChange",function(d){return n.val=d}),e.qZA(),e.TgZ(34,"div",27)(35,"span",28),e._uU(36,"Next value will be maximum from below"),e.qZA(),e._UZ(37,"br"),e.TgZ(38,"span",29),e._uU(39),e.qZA(),e._UZ(40,"br"),e.TgZ(41,"span",30),e._uU(42,"or"),e.qZA(),e._UZ(43,"br"),e.TgZ(44,"span",29),e._uU(45,"\u{1f449} Max DB value + (step from schema || 1)"),e.qZA(),e._UZ(46,"br"),e.TgZ(47,"span",30),e._uU(48,"System will get max db value, when there is no entry available in this table."),e.qZA(),e._UZ(49,"br"),e.qZA()()()(),e.TgZ(50,"div",31)(51,"button",32),e._UZ(52,"i",33),e._uU(53," Close"),e.qZA(),e.TgZ(54,"button",34),e.NdJ("click",function(){return n.update()}),e._UZ(55,"i",35),e.TgZ(56,"span"),e._uU(57,"Update"),e.qZA()()(),e.YNc(58,L,1,0,"p-progressSpinner",12),e.qZA()()()),2&s&&(e.xp6(8),e.Q6J("ngIf",n.selectedRows.length),e.xp6(1),e.Q6J("ngIf",n.selectedRows.length),e.xp6(2),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",n.selectedRows)("dataKey",n.gridKey)("scrollable",!0)("value",n.rows),e.xp6(3),e.Q6J("ngIf",n.loading.grid),e.xp6(19),e.Q6J("ngModel",n.val),e.xp6(6),e.hij("\u{1f449} ",n.val," + (step from schema || 1)"),e.xp6(15),e.Q6J("disabled",!n.val),e.xp6(4),e.Q6J("ngIf",n.loading.form))},dependencies:[l.Fj,l.wV,l.JJ,l.qQ,l.On,C.O5,U.y,p.iA,u.jx,p.Ei,_.G,w.u],encapsulation:2,changeDetection:0})}return a})(),canActivate:[v.P]}];let M=(()=>{class a{static \u0275fac=function(s){return new(s||a)};static \u0275mod=e.oAB({type:a});static \u0275inj=e.cJS({imports:[f.Bz.forChild(J),h.u]})}return a})()}}]);
package/dist/5765.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[5765],{7595:(Et,I,r)=>{r.d(I,{G:()=>p});var d=r(5861),t=r(4946),i=r(3157),f=r(328),C=r(6212),g=r(6990),S=r(5085),E=r(1162),Pt=r(6925),It=r(553),L=r(9394),w=r(921),J=r(7629),y=r(7240),u=r(9961),D=r(2189),P=r(5852),v=r(7414),O=r(2915),Z=r(7664),Q=r(9862),R=r(5219),G=r(95),U=r(6814),Y=r(7797),T=r(5431),k=r(7680),K=r(3259),B=r(8057),q=r(1137);const W=["funManFormC"],H=["cloneApiModalC"];function j(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"span",20),t.NdJ("click",function(){t.CHM(e);const l=t.oxw(2);return t.KtG(l.edit())}),t._UZ(1,"i",21),t.qZA()}}function z(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"span",22),t.NdJ("click",function(){t.CHM(e);const l=t.oxw(2);return t.KtG(l.clone())}),t._UZ(1,"i",23),t.qZA()}}function $(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"span",24),t.NdJ("click",function(){t.CHM(e);const l=t.oxw(2);return t.KtG(l.removePermanentDialog())}),t._UZ(1,"i",25),t.qZA()}}function V(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"span")(1,"span",13),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.navigateToTreeView())}),t._UZ(2,"i",14),t.qZA(),t.TgZ(3,"span",15),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.add())}),t._UZ(4,"i",16),t.qZA(),t.YNc(5,j,2,0,"span",17),t.YNc(6,z,2,0,"span",18),t.YNc(7,$,2,0,"span",19),t.qZA()}if(2&n){const e=t.oxw();t.xp6(5),t.Q6J("ngIf",1===e.selectedRows.length),t.xp6(1),t.Q6J("ngIf",1===e.selectedRows.length),t.xp6(1),t.Q6J("ngIf",1===e.selectedRows.length)}}function X(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"span",26)(1,"label",27)(2,"p-checkbox",28),t.NdJ("ngModelChange",function(l){t.CHM(e);const c=t.oxw();return t.KtG(c.eventCenterS.group.apisRegex.allCustomApis=l)}),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngModel",e.eventCenterS.group.apisRegex.allCustomApis)("binary",!0)}}function tt(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"span",26)(1,"label",27)(2,"p-checkbox",28),t.NdJ("ngModelChange",function(l){t.CHM(e);const c=t.oxw();return t.KtG(c.eventCenterS.filterInLog.apisRegex.allCustomApis=l)}),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngModel",e.eventCenterS.filterInLog.apisRegex.allCustomApis)("binary",!0)}}function et(n,o){if(1&n&&(t.TgZ(0,"div")(1,"div",29),t._uU(2),t.qZA()()),2&n){const e=t.oxw();t.xp6(2),t.Oqu(e.constantsS.group.allCustomApisPermitted)}}function nt(n,o){1&n&&(t.TgZ(0,"th",39),t._UZ(1,"p-tableHeaderCheckbox"),t.qZA())}function it(n,o){1&n&&t._UZ(0,"th",37)}function st(n,o){1&n&&(t.TgZ(0,"th"),t._uU(1,"Authorization"),t.qZA())}function ot(n,o){1&n&&t._UZ(0,"th")}function at(n,o){1&n&&t._UZ(0,"th",40)}function rt(n,o){if(1&n&&(t.TgZ(0,"tr"),t.YNc(1,nt,2,0,"th",35),t.YNc(2,it,1,0,"th",36),t._UZ(3,"th",37),t.TgZ(4,"th"),t._uU(5,"Name"),t.qZA(),t.TgZ(6,"th"),t._uU(7,"Path"),t.qZA(),t.YNc(8,st,2,0,"th",5),t.YNc(9,ot,1,0,"th",5),t.YNc(10,at,1,0,"th",38),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.showCheckbox),t.xp6(1),t.Q6J("ngIf",!e.isDependentOnGroup&&!e.isLPM&&!e.isFilterLogTable),t.xp6(6),t.Q6J("ngIf",!e.isDependentOnGroup&&!e.isLPM&&!e.isFilterLogTable),t.xp6(1),t.Q6J("ngIf",e.isLPM),t.xp6(1),t.Q6J("ngIf",!e.isDependentOnGroup&&!e.isLPM&&!e.isFilterLogTable)}}function lt(n,o){if(1&n&&(t.TgZ(0,"td"),t._UZ(1,"p-tableCheckbox",45),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("value",e)("pSelectableRow",e)}}function ct(n,o){if(1&n&&(t.TgZ(0,"td",46)(1,"span"),t._uU(2),t.qZA()()),2&n){const e=t.oxw().rowIndex;t.xp6(2),t.Oqu(e+1)}}function pt(n,o){1&n&&t._UZ(0,"i",47)}function dt(n,o){1&n&&(t.TgZ(0,"span",51),t._uU(1,"AM-User"),t.qZA())}function _t(n,o){1&n&&(t.TgZ(0,"span",52),t._uU(1,"No-Access"),t.qZA())}function ut(n,o){1&n&&(t.TgZ(0,"span",53),t._uU(1,"Public"),t.qZA())}function mt(n,o){1&n&&(t.TgZ(0,"span",52),t._uU(1,"DB-User"),t.qZA())}function ft(n,o){1&n&&(t.TgZ(0,"span",52),t._uU(1,"AWS"),t.qZA())}function gt(n,o){1&n&&(t.TgZ(0,"span",52),t._uU(1,"Azure"),t.qZA())}function ht(n,o){1&n&&(t.TgZ(0,"span",52),t._uU(1,"Google"),t.qZA())}function Ct(n,o){if(1&n&&(t.TgZ(0,"td"),t.YNc(1,dt,2,0,"span",48),t.YNc(2,_t,2,0,"span",49),t.YNc(3,ut,2,0,"span",50),t.YNc(4,mt,2,0,"span",49),t.YNc(5,ft,2,0,"span",49),t.YNc(6,gt,2,0,"span",49),t.YNc(7,ht,2,0,"span",49),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngIf",e.hasAmAuth),t.xp6(1),t.Q6J("ngIf",e.noAccess),t.xp6(1),t.Q6J("ngIf",e.isPublic),t.xp6(1),t.Q6J("ngIf",e.hasAmDBAuth),t.xp6(1),t.Q6J("ngIf",e.hasAwsAuth),t.xp6(1),t.Q6J("ngIf",e.hasAzureAuth),t.xp6(1),t.Q6J("ngIf",e.hasGoogleAuth)}}function vt(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"div")(1,"label",54)(2,"p-checkbox",55),t.NdJ("ngModelChange",function(l){t.CHM(e);const c=t.oxw(2).$implicit;return t.KtG(c.saveResponseInLog=l)})("ngModelChange",function(){t.CHM(e);const l=t.oxw(4);return t.KtG(l.saveResponseInLogCheckData())})("click",function(l){t.CHM(e);const c=t.oxw(4);return t.KtG(c.generalS.stopPropagation(l))}),t.qZA()()()}if(2&n){const e=t.oxw(2).$implicit;t.xp6(2),t.Q6J("ngModel",e.saveResponseInLog)("binary",!0)}}function N(n,o){if(1&n&&(t.TgZ(0,"td"),t.YNc(1,vt,3,2,"div",5),t.qZA()),2&n){const e=t.oxw().$implicit,s=t.oxw(2);t.xp6(1),t.Q6J("ngIf",(null==s.selectedRows?null:s.selectedRows.indexOf(e))>=0)}}const Tt=function(){return["/api-info/api-testing/testing"]},b=function(n,o,e){return{at_category:n,at_user:o,at_api:e}};function F(n,o){if(1&n&&(t.TgZ(0,"td")(1,"div",46)(2,"a",56),t.NdJ("click",function(s){return s.stopPropagation()}),t._UZ(3,"i",57),t.qZA()()()),2&n){const e=t.oxw().$implicit,s=t.oxw(2);t.xp6(2),t.Q6J("routerLink",t.DdM(2,Tt))("queryParams",t.kEZ(3,b,s.EAPICategory.CUSTOM_APIS,s.authCS.getUserId(),e._id))}}const At=function(n,o,e,s){return{get:n,put:o,post:e,delete:s}};function St(n,o){if(1&n&&(t.TgZ(0,"tr",41),t.YNc(1,lt,2,2,"td",5),t.YNc(2,ct,3,1,"td",42),t.TgZ(3,"td")(4,"span",43),t._uU(5),t.qZA()(),t.TgZ(6,"td")(7,"span"),t._uU(8),t.qZA(),t.YNc(9,pt,1,0,"i",44),t.qZA(),t.TgZ(10,"td"),t._uU(11),t.qZA(),t.YNc(12,Ct,8,7,"td",5),t.YNc(13,N,2,1,"td",5),t.YNc(14,F,4,7,"td",5),t.qZA()),2&n){const e=o.$implicit,s=t.oxw(2);t.Q6J("pSelectableRow",e),t.xp6(1),t.Q6J("ngIf",s.showCheckbox),t.xp6(1),t.Q6J("ngIf",!s.isDependentOnGroup&&!s.isLPM&&!s.isFilterLogTable),t.xp6(2),t.Q6J("ngClass",t.l5B(11,At,e.requestMethod===s.ERequestMethod.GET,e.requestMethod===s.ERequestMethod.PUT,e.requestMethod===s.ERequestMethod.POST,e.requestMethod===s.ERequestMethod.DELETE)),t.xp6(1),t.Oqu(e.requestMethod),t.xp6(3),t.Oqu(e.name),t.xp6(1),t.Q6J("ngIf",e.runOnNativeProcess),t.xp6(2),t.Oqu(e.path),t.xp6(1),t.Q6J("ngIf",!s.isDependentOnGroup&&!s.isLPM&&!s.isFilterLogTable),t.xp6(1),t.Q6J("ngIf",s.isLPM),t.xp6(1),t.Q6J("ngIf",!s.isDependentOnGroup&&!s.isLPM&&!s.isFilterLogTable)}}function xt(n,o){1&n&&t._UZ(0,"p-progressSpinner",58)}function a(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"div",30)(1,"p-table",31),t.NdJ("selectionChange",function(l){t.CHM(e);const c=t.oxw();return t.KtG(c.selectedRows=l)})("selectionChange",function(l){t.CHM(e);const c=t.oxw();return t.KtG(c.functionSelected(l))})("dblclick",function(l){t.CHM(e);const c=t.oxw();return t.KtG(c.dblClickCustomAPIsGrid(l))}),t.YNc(2,rt,11,5,"ng-template",32),t.YNc(3,St,15,16,"ng-template",33),t.qZA(),t.YNc(4,xt,1,0,"p-progressSpinner",34),t.qZA()}if(2&n){const e=t.oxw();t.xp6(1),t.Q6J("selectionMode","multiple")("metaKeySelection",e.metaKeySelection)("selection",e.selectedRows)("dataKey",e.gridKey)("scrollable",!0)("value",e.rows),t.xp6(3),t.Q6J("ngIf",e.loading.grid)}}let p=(()=>{class n{functionS;generalS;notificationS;navigationCS;authCS;constantsS;eventCenterS;cd;router;http;confirmationService;showCheckbox=!0;isReadOnly=!1;isDependentOnGroup=!1;isLPM=!1;isFilterLogTable=!1;metaKeySelection=!0;loading={grid:!1};subscriptions=[];data={mode:f.D.ADD,eventChannel:new t.vpe,formData:void 0};rows=[];rowsMap={};rowsMapName={};showAll=!1;selectedRows=[];gridKey=E.iH._id;EUserType=w.dN;BE_HOST_PORT=It.N.BE_HOST_PORT;EAPICategory=S.R;ERequestMethod=Pt.Yp;FunManFormC;cloneApiModalC;constructor(e,s,l,c,A,_,m,x,M,h,wt){this.functionS=e,this.generalS=s,this.notificationS=l,this.navigationCS=c,this.authCS=A,this.constantsS=_,this.eventCenterS=m,this.cd=x,this.router=M,this.http=h,this.confirmationService=wt}ngOnInit(){var e=this;this.eventCenterS.functions.selectedFunctions.next([]),this.loadGridData(),this.subscriptions.push(this.data.eventChannel.subscribe(s=>{this.FunManFormC.hideModal(),this.loadGridData()})),this.isDependentOnGroup&&this.subscriptions.push(this.eventCenterS.group.selectedGroups.subscribe(function(){var s=(0,d.Z)(function*(l){l.length&&(yield e.loadGridData())});return function(l){return s.apply(this,arguments)}}())),this.isLPM&&(this.subscriptions.push(this.eventCenterS.filterInLog.refreshGrid.subscribe(s=>{s&&this.loadGridData()})),this.subscriptions.push(this.eventCenterS.filterInLog.functionIds.subscribe((0,d.Z)(function*(){e.loadGridData()})))),this.generalS.setNewTitle("API Maker - Custom APIs")}navigateToTreeView(){var e=this;return(0,d.Z)(function*(){yield e.router.navigate(["api-info","custom-api","functions-tree"])})()}loadGridData(){var e=this;if(this.isDependentOnGroup&&0===this.eventCenterS.group.selectedGroups.value.length)return void this.resetGridAndUrl();this.loading.grid=!0;const s={find:{user:this.authCS.getUserId(),active:!0},select:{name:1,label:1,path:1,active:1,requestMethod:1,runOnNativeProcess:1,apiAccessType:1},sort:{path:1}};this.showAll&&delete s.find.active,this.subscriptions.push(this.functionS.query(s,"getAuthData=true").subscribe(function(){var l=(0,d.Z)(function*(c){c.success?(e.selectedRows=[],e.rows=c.data||[],e.rowsMap=g.keyBy(e.rows,E.iH._id),e.rowsMapName=g.keyBy(e.rows,E.eb.name)):e.resetGridAndUrl();const A=e.navigationCS.getQueryParam(C.p.custom_api)||(e.isFilterLogTable?e.eventCenterS.filterInLog.functionIds.value.join(","):e.eventCenterS.group.customApiIds.value.join(","))||(e.isDependentOnGroup&&e.eventCenterS.group.selectedGroups.value[0].queryParams.customApiNames?e.eventCenterS.group.selectedGroups.value[0].queryParams.customApiNames.join(","):"");if(A){const _=A.split(","),m=g.intersection(g.keys(e.rowsMap),_),x=[];for(const h of m)e.rowsMap[h]&&x.push(e.rowsMap[h]);const M=[];for(const h of m)e.rowsMap[h]&&M.push(e.rowsMap[h]);e.selectedRows=M,e.eventCenterS.functions.selectedFunctions.next(x)}if(e.isLPM&&e.eventCenterS.group.selectedGroups.value[0]?.queryParams?.customApiNames?.length){const _=e.eventCenterS.group.selectedGroups.value[0];for(const m of _?.queryParams?.customApiNames)e.rowsMapName[m]&&(e.rowsMapName[m].saveResponseInLog=_.functionsLog?.[m]?.saveResponseInLog||!1);e.setResDataInEventCenter()}if(e.isDependentOnGroup){e.selectedRows=[];for(const _ of e.eventCenterS.group.customApiIds.value)e.rowsMap[_]&&e.selectedRows.push(e.rowsMap[_])}if(e.isFilterLogTable){e.selectedRows=[];for(const _ of e.eventCenterS.filterInLog.functionIds.value)e.rowsMap[_]&&e.selectedRows.push(e.rowsMap[_])}e.loading.grid=!1,e.cd.detectChanges()});return function(c){return l.apply(this,arguments)}}()))}add(){this.data.formData=void 0,this.data.mode=f.D.ADD,this.data.eventChannel.emit({action:i.F.OPEN_FORM_IN_ADD_MODE}),this.FunManFormC.showModal()}view(){this.data.formData=this.rowsMap[this.getSelectedRowId()],this.data.mode=f.D.VIEW,this.data.eventChannel.emit({action:i.F.OPEN_FORM_IN_VIEW_MODE}),this.FunManFormC.showModal()}edit(){this.data.formData=this.rowsMap[this.getSelectedRowId()],this.data.mode=f.D.EDIT,this.data.eventChannel.emit({action:i.F.OPEN_FORM_IN_EDIT_MODE}),this.FunManFormC.showModal()}removePermanentDialog(){var s,e=this;this.confirmationService.confirm({message:this.constantsS.functions.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(s=(0,d.Z)(function*(){yield e.removePermanent()}),function(){return s.apply(this,arguments)})})}removePermanent(){var e=this;return(0,d.Z)(function*(){if(e.getSelectedRowId()){e.loading.grid=!0;try{const s=yield e.functionS.permanentDelete(e.getSelectedRowId()).toPromise();s.success?(e.notificationS.showSuccess(e.constantsS.functions.removePermanent),e.resetGridAndUrl(),e.loadGridData()):e.notificationS.showErrorFromResponse(s,e.constantsS.functions.removePermanentError)}catch{e.notificationS.showError(e.constantsS.functions.removePermanentError)}e.loading.grid=!1}})()}resetDependents(){var e=this;return(0,d.Z)(function*(){e.eventCenterS.functions.selectedFunctions.next([]),yield e.navigationCS.setQueryParam(C.p.custom_api,null)})()}functionSelected(e){var s=this;return(0,d.Z)(function*(){s.selectedRows=e,s.resetDependents().then();for(const l of s.rows)-1===s.selectedRows.indexOf(l)&&(l.saveResponseInLog=!1);s.fillData().then(),s.getSelectedRowId()?s.generalS.setNewTitle(s.rowsMap[s.getSelectedRowId()].name,S.R.CUSTOM_APIS):s.generalS.setNewTitle("API Maker - Custom APIs")})()}resetGridAndUrl(){this.rows=[],this.selectedRows=[],this.rowsMap={},this.eventCenterS.functions.selectedFunctions.next([])}fillData(){var e=this;return(0,d.Z)(function*(){if(!e.selectedRows||Array.isArray(e.selectedRows)&&!e.selectedRows.length)return yield e.navigationCS.setQueryParam(C.p.custom_api,""),e.eventCenterS.group.customApis.next([]),e.eventCenterS.functions.selectedFunctions.next([]),e.eventCenterS.group.customApiIds.next([]),void e.eventCenterS.group.customApis.next([]);if(e.isDependentOnGroup||e.isFilterLogTable){const s=g.map(e.selectedRows,"_id");e.eventCenterS.group.customApiIds.next(s),e.eventCenterS.group.customApis.next(e.selectedRows),e.isFilterLogTable&&(e.eventCenterS.filterInLog.functionIds.next(s),e.eventCenterS.filterInLog.functions.next(e.selectedRows))}else{const s=e.getSelectedRowId(),l=(yield e.functionS.getById(s).toPromise()).data;l._id?(yield e.navigationCS.setQueryParam(C.p.custom_api,l._id),e.eventCenterS.functions.selectedFunctions.next([l])):e.resetDependents().then()}})()}getSelectedRowId(){return this.selectedRows[0]?._id}dblClickCustomAPIsGrid(e){setTimeout(()=>{this.edit()},10)}setResDataInEventCenter(){this.isDependentOnGroup&&(this.eventCenterS.group.customApis.next(this.selectedRows),this.eventCenterS.group.selectedFunctions.next(this.selectedRows)),this.isFilterLogTable&&this.eventCenterS.filterInLog.functions.next(this.selectedRows)}saveResponseInLogCheckData(){this.setResDataInEventCenter()}clone(){var e=this;return(0,d.Z)(function*(){yield e.cloneApiModalC.showModal(e.getSelectedRowId(),function(){var s=(0,d.Z)(function*(l){l&&(yield e.loadGridData()),e.cd.detectChanges()});return function(l){return s.apply(this,arguments)}}())})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}EModelApiPaths=L.k4;static \u0275fac=function(s){return new(s||n)(t.Y36(J.d),t.Y36(y.b),t.Y36(u.W),t.Y36(D.S),t.Y36(P.D),t.Y36(v.L),t.Y36(O.u),t.Y36(t.sBO),t.Y36(Z.F0),t.Y36(Q.eN),t.Y36(R.YP))};static \u0275cmp=t.Xpm({type:n,selectors:[["app-custom-api-grid"]],viewQuery:function(s,l){if(1&s&&(t.Gf(W,5),t.Gf(H,5)),2&s){let c;t.iGM(c=t.CRH())&&(l.FunManFormC=c.first),t.iGM(c=t.CRH())&&(l.cloneApiModalC=c.first)}},inputs:{showCheckbox:"showCheckbox",isReadOnly:["IsReadOnly","isReadOnly"],isDependentOnGroup:["IsDependentOnGroup","isDependentOnGroup"],isLPM:"isLPM",isFilterLogTable:"isFilterLogTable",metaKeySelection:"metaKeySelection"},decls:17,vars:9,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["src","/assets/images/icons/custom.svg","alt","Custom API",1,"fa-fw","mr-1"],["href","https://docs.apimaker.dev/v1/docs/apis-all/custom-apis/user-created-custom-api.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],[4,"ngIf"],["class","float-right cursor-pointer","tooltipPosition","left","pTooltip","All Custom APIs",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["class","h-100",4,"ngIf"],[3,"data"],["funManFormC",""],[3,"modalId","hostAndPort","modelApiPaths"],["cloneApiModalC",""],[1,"float-right","cursor-pointer","ml-3",3,"click"],["tooltipPosition","left","pTooltip","Tree View","tooltipPosition","left",1,"fas","fa-sitemap","text-yellow","fa-fw","fa-rotate-270"],["tooltipPosition","left","pTooltip","Add New","tooltipPosition","left",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Permanent Delete",3,"click",4,"ngIf"],["tooltipPosition","left","pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["tooltipPosition","left","pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-light","fa-fw"],["tooltipPosition","left","pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],["tooltipPosition","left","pTooltip","All Custom APIs",1,"float-right","cursor-pointer"],[1,"mb-0","mt--2px"],[3,"ngModel","binary","ngModelChange"],[1,"p-2","text-center","text-success"],[1,"h-100"],["styleClass","p-datatable-striped custom-api-grid-height","scrollHeight","flex",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["style","width: 45px;",4,"ngIf"],["style","width: 80px;",4,"ngIf"],[2,"width","80px"],["style","width: 60px;",4,"ngIf"],[2,"width","45px"],[2,"width","60px"],[3,"pSelectableRow"],["class","text-center",4,"ngIf"],[1,"small","font-weight-bold","d-inline-block","mr-2",3,"ngClass"],["pTooltip","Running on native process","class","fas fa-radiation ml-2 text-danger",4,"ngIf"],[3,"value","pSelectableRow"],[1,"text-center"],["pTooltip","Running on native process",1,"fas","fa-radiation","ml-2","text-danger"],["class","d-inline-block small font-weight-bold font-monospaced ml-2",4,"ngIf"],["class","d-inline-block small font-weight-bold font-monospaced text-success ml-2",4,"ngIf"],["class","d-inline-block small font-weight-bold font-monospaced text-warning ml-2",4,"ngIf"],[1,"d-inline-block","small","font-weight-bold","font-monospaced","ml-2"],[1,"d-inline-block","small","font-weight-bold","font-monospaced","text-success","ml-2"],[1,"d-inline-block","small","font-weight-bold","font-monospaced","text-warning","ml-2"],[1,"m-0","vertical-align-sub"],["label","Save Response In Log",3,"ngModel","binary","ngModelChange","click"],["href","javascript:",1,"btn","btn-xsm-custom","mr-3",3,"routerLink","queryParams","click"],[1,"fas","fa-vial","text-info","fa-fw","test-tube","pt-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(s,l){1&s&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span"),t._UZ(3,"img",2),t._uU(4," Custom APIs"),t.qZA(),t.TgZ(5,"a",3),t._UZ(6,"img",4),t.qZA(),t.YNc(7,V,8,3,"span",5),t.YNc(8,X,3,2,"span",6),t.YNc(9,tt,3,2,"span",6),t.qZA(),t.TgZ(10,"div",7),t.YNc(11,et,3,1,"div",5),t.YNc(12,a,5,7,"div",8),t.qZA()(),t._UZ(13,"app-w-fun-man-form",9,10)(15,"app-clone-api-modal",11,12)),2&s&&(t.xp6(7),t.Q6J("ngIf",!l.isReadOnly),t.xp6(1),t.Q6J("ngIf",l.isDependentOnGroup),t.xp6(1),t.Q6J("ngIf",l.isFilterLogTable),t.xp6(2),t.Q6J("ngIf",l.eventCenterS.group.apisRegex.allCustomApis||l.eventCenterS.filterInLog.apisRegex.allCustomApis),t.xp6(1),t.Q6J("ngIf",!(l.eventCenterS.group.apisRegex.allCustomApis||l.eventCenterS.filterInLog.apisRegex.allCustomApis)),t.xp6(1),t.Q6J("data",l.data),t.xp6(2),t.Q6J("modalId","idCloneCustomAPIGrid")("hostAndPort",l.BE_HOST_PORT)("modelApiPaths",l.EModelApiPaths.CUSTOM_APIS))},dependencies:[Z.rH,G.JJ,G.On,U.mk,U.O5,Y.s,T.iA,R.jx,T.Ei,T.UA,T.Mo,k.G,K.u,B.XZ,q.u],styles:[".custom-tab-title[_ngcontent-%COMP%]{padding:.5rem}.min-width[_ngcontent-%COMP%], .none[_ngcontent-%COMP%], .delete[_ngcontent-%COMP%], .post[_ngcontent-%COMP%], .put[_ngcontent-%COMP%], .get[_ngcontent-%COMP%]{width:45px;display:inline-block}.get[_ngcontent-%COMP%]{color:var(--accent-success)}.put[_ngcontent-%COMP%]{color:var(--brand-secondary)}.post[_ngcontent-%COMP%]{color:var(--accent-warning)}.delete[_ngcontent-%COMP%]{color:var(--accent-error)}.none[_ngcontent-%COMP%]{color:var(--accent-success--shade--three)}.width-160[_ngcontent-%COMP%]{width:160px}"]})}return n})()},5765:(Et,I,r)=>{r.r(I),r.d(I,{FunctionManM:()=>xt});var d=r(7664),t=r(6814),i=r(4946),f=r(5219);let L=(()=>{class a{static \u0275fac=function(o){return new(o||a)};static \u0275mod=i.oAB({type:a});static \u0275inj=i.cJS({imports:[t.ez,f.m8,f.m8]})}return a})();var w=r(3726),J=r(8761),y=r(7595),u=r(5861),D=r(3157),P=r(328),v=r(6212),O=r(5085),Z=r(1162),Q=r(6925),R=r(553),G=r(9394),U=r(921),Y=r(7629),T=r(7240),k=r(9961),K=r(2189),B=r(5852),q=r(7414),W=r(2915),H=r(9862),j=r(7797),z=r(7526),$=r(7680),V=r(3259),X=r(1137);const tt=["funManFormC"],et=["cloneApiModalC"];function nt(a,p){if(1&a){const n=i.EpF();i.TgZ(0,"span",21),i.NdJ("click",function(){i.CHM(n);const e=i.oxw();return i.KtG(e.edit())}),i._UZ(1,"i",22),i.qZA()}}function it(a,p){if(1&a){const n=i.EpF();i.TgZ(0,"span",23),i.NdJ("click",function(){i.CHM(n);const e=i.oxw();return i.KtG(e.clone())}),i._UZ(1,"i",24),i.qZA()}}function st(a,p){if(1&a){const n=i.EpF();i.TgZ(0,"span",25),i.NdJ("click",function(){i.CHM(n);const e=i.oxw();return i.KtG(e.removePermanentDialog())}),i._UZ(1,"i",26),i.qZA()}}function ot(a,p){if(1&a&&(i.TgZ(0,"div"),i._uU(1),i.qZA()),2&a){const n=i.oxw().$implicit;i.xp6(1),i.Oqu(n.label)}}function at(a,p){1&a&&i._UZ(0,"i",39)}function rt(a,p){1&a&&(i.TgZ(0,"span",40),i._uU(1,"AM-User"),i.qZA())}function lt(a,p){1&a&&(i.TgZ(0,"span",41),i._uU(1,"No-Access"),i.qZA())}function ct(a,p){1&a&&(i.TgZ(0,"span",42),i._uU(1,"Public"),i.qZA())}function pt(a,p){1&a&&(i.TgZ(0,"span",41),i._uU(1,"DB-User"),i.qZA())}function dt(a,p){1&a&&(i.TgZ(0,"span",41),i._uU(1,"AWS"),i.qZA())}function _t(a,p){1&a&&(i.TgZ(0,"span",41),i._uU(1,"Azure"),i.qZA())}function ut(a,p){1&a&&(i.TgZ(0,"span",41),i._uU(1,"Google"),i.qZA())}const mt=function(a,p,n,o){return{get:a,put:p,post:n,delete:o}},ft=function(){return["/api-info/api-testing/testing"]},gt=function(a,p,n){return{at_category:a,at_user:p,at_api:n}};function ht(a,p){if(1&a&&(i.TgZ(0,"div")(1,"div")(2,"table",29)(3,"tr")(4,"td",30)(5,"span",31),i._uU(6),i.qZA(),i.TgZ(7,"span")(8,"span"),i._uU(9),i.qZA(),i.YNc(10,at,1,0,"i",32),i.qZA()(),i.TgZ(11,"td",30),i._uU(12),i.qZA(),i.TgZ(13,"td"),i.YNc(14,rt,2,0,"span",33),i.YNc(15,lt,2,0,"span",34),i.YNc(16,ct,2,0,"span",35),i.YNc(17,pt,2,0,"span",34),i.YNc(18,dt,2,0,"span",34),i.YNc(19,_t,2,0,"span",34),i.YNc(20,ut,2,0,"span",34),i.qZA(),i.TgZ(21,"td",36)(22,"a",37),i.NdJ("click",function(o){return o.stopPropagation()}),i._UZ(23,"i",38),i.qZA()()()()()()),2&a){const n=i.oxw().$implicit,o=i.oxw();i.xp6(5),i.Q6J("ngClass",i.l5B(14,mt,n.data.requestMethod===o.ERequestMethod.GET,n.data.requestMethod===o.ERequestMethod.PUT,n.data.requestMethod===o.ERequestMethod.POST,n.data.requestMethod===o.ERequestMethod.DELETE)),i.xp6(1),i.Oqu(n.data.requestMethod),i.xp6(3),i.Oqu(n.data.name),i.xp6(1),i.Q6J("ngIf",n.data.runOnNativeProcess),i.xp6(2),i.Oqu(n.data.path),i.xp6(2),i.Q6J("ngIf",n.data.hasAmAuth),i.xp6(1),i.Q6J("ngIf",n.data.noAccess),i.xp6(1),i.Q6J("ngIf",n.data.isPublic),i.xp6(1),i.Q6J("ngIf",n.data.hasAmDBAuth),i.xp6(1),i.Q6J("ngIf",n.data.hasAwsAuth),i.xp6(1),i.Q6J("ngIf",n.data.hasAzureAuth),i.xp6(1),i.Q6J("ngIf",n.data.hasGoogleAuth),i.xp6(2),i.Q6J("routerLink",i.DdM(19,ft))("queryParams",i.kEZ(20,gt,o.EAPICategory.CUSTOM_APIS,o.authCS.getUserId(),n.data._id))}}function Ct(a,p){if(1&a&&(i.TgZ(0,"div",27),i.YNc(1,ot,2,1,"div",28),i.YNc(2,ht,24,24,"div",28),i.qZA()),2&a){const n=p.$implicit;i.xp6(1),i.Q6J("ngIf",null==n.children?null:n.children.length),i.xp6(1),i.Q6J("ngIf",!(null!=n.children&&n.children.length))}}function vt(a,p){1&a&&i._UZ(0,"p-progressSpinner",43)}let N=(()=>{class a{functionS;generalS;notificationS;navigationCS;authCS;constantsS;eventCenterS;cd;router;http;confirmationService;loading={grid:!1};subscriptions=[];data={mode:P.D.ADD,eventChannel:new i.vpe,formData:void 0};gridKey=Z.iH._id;EUserType=U.dN;BE_HOST_PORT=R.N.BE_HOST_PORT;EAPICategory=O.R;EQueryParam=v.p;leafSelected=!1;selectedRows=void 0;treeNodes=[];allTreeItemsMap={};FunManFormC;cloneApiModalC;constructor(n,o,e,s,l,c,A,_,m,x,M){this.functionS=n,this.generalS=o,this.notificationS=e,this.navigationCS=s,this.authCS=l,this.constantsS=c,this.eventCenterS=A,this.cd=_,this.router=m,this.http=x,this.confirmationService=M}ngOnInit(){this.loadTreeData(),this.subscriptions.push(this.data.eventChannel.subscribe(n=>{this.FunManFormC.hideModal(),this.loadTreeData()})),this.generalS.setNewTitle("API Maker - Custom APIs")}navigateToGridView(){var n=this;return(0,u.Z)(function*(){yield n.router.navigate(["api-info","custom-api","functions"])})()}loadTreeData(){var n=this;return(0,u.Z)(function*(){const o=(yield n.functionS.getCustomAPITree().toPromise()).data;for(const s of o)n.generalS.convertKTreeItemToPrimeNGTreeItem(s);const e={};n.generalS.getMapOfAllItems(e,o);for(const s of Object.keys(e)){const l=n.allTreeItemsMap[s];l&&(e[s].expanded=l.expanded)}n.treeNodes=o,n.allTreeItemsMap=e,n.loading.grid=!1,n.cd.detectChanges()})()}add(){this.data.formData=void 0,this.data.mode=P.D.ADD,this.data.eventChannel.emit({action:D.F.OPEN_FORM_IN_ADD_MODE}),this.FunManFormC.showModal()}edit(){this.leafSelected&&(this.data.formData=this.selectedRows[0].data,this.data.mode=P.D.EDIT,this.data.eventChannel.emit({action:D.F.OPEN_FORM_IN_EDIT_MODE}),this.FunManFormC.showModal())}removePermanentDialog(){var o,n=this;this.leafSelected&&this.confirmationService.confirm({message:this.constantsS.functions.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(o=(0,u.Z)(function*(){yield n.removePermanent()}),function(){return o.apply(this,arguments)})})}removePermanent(){var n=this;return(0,u.Z)(function*(){if(n.getSelectedRowId()){n.loading.grid=!0;try{const o=yield n.functionS.permanentDelete(n.getSelectedRowId()).toPromise();o.success?(n.notificationS.showSuccess(n.constantsS.functions.removePermanent),n.resetGridAndUrl(),yield n.loadTreeData(),n.leafSelected=!1):n.notificationS.showErrorFromResponse(o,n.constantsS.functions.removePermanentError)}catch{n.notificationS.showError(n.constantsS.functions.removePermanentError)}n.loading.grid=!1}})()}resetDependents(){var n=this;return(0,u.Z)(function*(){yield n.navigationCS.setQueryParam(v.p.custom_api,null)})()}functionSelected(){var n=this;return(0,u.Z)(function*(){n.resetDependents(),n.fillData(),n.getSelectedRowId()?n.generalS.setNewTitle(n.selectedRows[0].data.name,O.R.CUSTOM_APIS):n.generalS.setNewTitle("API Maker - Custom APIs"),n.leafSelected=!(!n.getSelectedRowId()||n.selectedRows[0].children?.length)})()}resetGridAndUrl(){this.selectedRows=void 0}fillData(){var n=this;return(0,u.Z)(function*(){if(!n.selectedRows)return void(yield n.navigationCS.setQueryParam(v.p.custom_api,""));const o=n.getSelectedRowId();o?yield n.navigationCS.setQueryParam(v.p.custom_api,o):n.resetDependents()})()}getSelectedRowId(){return this.selectedRows?.[0]?.data?._id}dblClickCustomAPIsGrid(){setTimeout(()=>{this.edit()},10)}clone(){var n=this;return(0,u.Z)(function*(){yield n.cloneApiModalC.showModal(n.getSelectedRowId(),function(){var o=(0,u.Z)(function*(e){e&&(yield n.loadTreeData()),n.cd.detectChanges()});return function(e){return o.apply(this,arguments)}}())})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}ERequestMethod=Q.Yp;EModelApiPaths=G.k4;static \u0275fac=function(o){return new(o||a)(i.Y36(Y.d),i.Y36(T.b),i.Y36(k.W),i.Y36(K.S),i.Y36(B.D),i.Y36(q.L),i.Y36(W.u),i.Y36(i.sBO),i.Y36(d.F0),i.Y36(H.eN),i.Y36(f.YP))};static \u0275cmp=i.Xpm({type:a,selectors:[["app-custom-api-tree"]],viewQuery:function(o,e){if(1&o&&(i.Gf(tt,5),i.Gf(et,5)),2&o){let s;i.iGM(s=i.CRH())&&(e.FunManFormC=s.first),i.iGM(s=i.CRH())&&(e.cloneApiModalC=s.first)}},decls:24,vars:10,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["src","/assets/images/icons/custom.svg","alt","Custom API",1,"fa-fw","mr-1"],["href","https://docs.apimaker.dev/v1/docs/apis-all/custom-apis/user-created-custom-api.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],[1,"float-right","cursor-pointer","ml-3",3,"click"],["pTooltip","Grid View",1,"fas","fa-table","text-yellow","fa-fw"],["pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],[1,"h-100"],["scrollHeight","calc(100vh - 82px)","selectionMode","multiple",1,"w-full",3,"value","selection","selectionChange","dblclick"],["pTemplate","default"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"data"],["funManFormC",""],[3,"modalId","hostAndPort","modelApiPaths"],["cloneApiModalC",""],["pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-light","fa-fw"],["pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],[1,"w-100","prevent-text-selection","cursor-pointer"],[4,"ngIf"],[1,"w-100"],[2,"width","40%"],[1,"small","font-weight-bold","d-inline-block","mr-2",3,"ngClass"],["pTooltip","Running on native process","class","fas fa-radiation ml-2 text-danger",4,"ngIf"],["class","d-inline-block small font-weight-bold font-monospaced ml-2",4,"ngIf"],["class","d-inline-block small font-weight-bold font-monospaced text-success ml-2",4,"ngIf"],["class","d-inline-block small font-weight-bold font-monospaced text-warning ml-2",4,"ngIf"],[2,"text-align","right"],["href","javascript:",1,"btn","btn-xsm-custom","mr-3",3,"routerLink","queryParams","click"],[1,"fas","fa-vial","text-info","fa-fw","test-tube","pt-1"],["pTooltip","Running on native process",1,"fas","fa-radiation","ml-2","text-danger"],[1,"d-inline-block","small","font-weight-bold","font-monospaced","ml-2"],[1,"d-inline-block","small","font-weight-bold","font-monospaced","text-success","ml-2"],[1,"d-inline-block","small","font-weight-bold","font-monospaced","text-warning","ml-2"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(o,e){1&o&&(i.TgZ(0,"div",0)(1,"div",1)(2,"span"),i._UZ(3,"img",2),i._uU(4," Custom APIs"),i.qZA(),i.TgZ(5,"a",3),i._UZ(6,"img",4),i.qZA(),i.TgZ(7,"span")(8,"span",5),i.NdJ("click",function(){return e.navigateToGridView()}),i._UZ(9,"i",6),i.qZA(),i.TgZ(10,"span",7),i.NdJ("click",function(){return e.add()}),i._UZ(11,"i",8),i.qZA(),i.YNc(12,nt,2,0,"span",9),i.YNc(13,it,2,0,"span",10),i.YNc(14,st,2,0,"span",11),i.qZA()(),i.TgZ(15,"div",12)(16,"div",13)(17,"p-tree",14),i.NdJ("selectionChange",function(l){return e.selectedRows=l})("dblclick",function(){return e.dblClickCustomAPIsGrid()})("selectionChange",function(){return e.functionSelected()}),i.YNc(18,Ct,3,2,"ng-template",15),i.qZA(),i.YNc(19,vt,1,0,"p-progressSpinner",16),i.qZA()()(),i._UZ(20,"app-w-fun-man-form",17,18)(22,"app-clone-api-modal",19,20)),2&o&&(i.xp6(12),i.Q6J("ngIf",e.leafSelected),i.xp6(1),i.Q6J("ngIf",e.leafSelected),i.xp6(1),i.Q6J("ngIf",e.leafSelected),i.xp6(3),i.Q6J("value",e.treeNodes)("selection",e.selectedRows),i.xp6(2),i.Q6J("ngIf",e.loading.grid),i.xp6(1),i.Q6J("data",e.data),i.xp6(2),i.Q6J("modalId","idCloneCustomAPITree")("hostAndPort",e.BE_HOST_PORT)("modelApiPaths",e.EModelApiPaths.CUSTOM_APIS))},dependencies:[d.rH,t.mk,t.O5,j.s,f.jx,z.mp,$.G,V.u,X.u],styles:[".custom-tab-title[_ngcontent-%COMP%]{padding:.5rem}.min-width[_ngcontent-%COMP%], .none[_ngcontent-%COMP%], .delete[_ngcontent-%COMP%], .post[_ngcontent-%COMP%], .put[_ngcontent-%COMP%], .get[_ngcontent-%COMP%]{width:45px;display:inline-block}.get[_ngcontent-%COMP%]{color:var(--accent-success)}.put[_ngcontent-%COMP%]{color:var(--brand-secondary)}.post[_ngcontent-%COMP%]{color:var(--accent-warning)}.delete[_ngcontent-%COMP%]{color:var(--accent-error)}.none[_ngcontent-%COMP%]{color:var(--accent-success--shade--three)}.width-160[_ngcontent-%COMP%]{width:160px}"]})}return a})();var Tt=r(7987);const At=[{path:"",redirectTo:"functions-tree",pathMatch:"full"},{path:"functions-tree",component:(()=>{class a{route;constructor(n){this.route=n}ngOnInit(){}static \u0275fac=function(o){return new(o||a)(i.Y36(d.gz))};static \u0275cmp=i.Xpm({type:a,selectors:[["app-fun-man-layout-tree"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1"]],template:function(o,e){1&o&&(i.TgZ(0,"div",0),i._UZ(1,"app-custom-api-tree"),i.qZA())},dependencies:[N],encapsulation:2})}return a})(),canActivate:[w.P]},{path:"functions",component:(()=>{class a{route;mode="tree";constructor(n){this.route=n}ngOnInit(){this.route.queryParams.subscribe(n=>{n.mode&&(this.mode=n.mode)})}static \u0275fac=function(o){return new(o||a)(i.Y36(d.gz))};static \u0275cmp=i.Xpm({type:a,selectors:[["app-fun-man-layout"]],decls:2,vars:1,consts:[[1,"pt-1","pl-1","pr-1"],[3,"showCheckbox"]],template:function(o,e){1&o&&(i.TgZ(0,"div",0),i._UZ(1,"app-custom-api-grid",1),i.qZA()),2&o&&(i.xp6(1),i.Q6J("showCheckbox",!1))},dependencies:[y.G],encapsulation:2})}return a})(),canActivate:[w.P]}];let xt=(()=>{class a{static \u0275fac=function(o){return new(o||a)};static \u0275mod=i.oAB({type:a});static \u0275inj=i.cJS({imports:[d.Bz.forChild(At),J.u,Tt.X,L]})}return a})()}}]);
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[5765],{7595:(Et,I,r)=>{r.d(I,{G:()=>p});var d=r(5861),t=r(4946),i=r(3157),f=r(328),C=r(6212),g=r(6990),S=r(5085),E=r(1162),Pt=r(6925),It=r(553),L=r(9394),w=r(921),J=r(7629),y=r(7240),u=r(9961),D=r(2189),P=r(5852),v=r(7414),O=r(2915),Z=r(7664),Q=r(9862),R=r(5219),G=r(95),U=r(6814),Y=r(7797),T=r(5431),k=r(7680),K=r(3259),B=r(8057),q=r(1137);const W=["funManFormC"],H=["cloneApiModalC"];function j(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"span",20),t.NdJ("click",function(){t.CHM(e);const l=t.oxw(2);return t.KtG(l.edit())}),t._UZ(1,"i",21),t.qZA()}}function z(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"span",22),t.NdJ("click",function(){t.CHM(e);const l=t.oxw(2);return t.KtG(l.clone())}),t._UZ(1,"i",23),t.qZA()}}function $(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"span",24),t.NdJ("click",function(){t.CHM(e);const l=t.oxw(2);return t.KtG(l.removePermanentDialog())}),t._UZ(1,"i",25),t.qZA()}}function V(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"span")(1,"span",13),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.navigateToTreeView())}),t._UZ(2,"i",14),t.qZA(),t.TgZ(3,"span",15),t.NdJ("click",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.add())}),t._UZ(4,"i",16),t.qZA(),t.YNc(5,j,2,0,"span",17),t.YNc(6,z,2,0,"span",18),t.YNc(7,$,2,0,"span",19),t.qZA()}if(2&n){const e=t.oxw();t.xp6(5),t.Q6J("ngIf",1===e.selectedRows.length),t.xp6(1),t.Q6J("ngIf",1===e.selectedRows.length),t.xp6(1),t.Q6J("ngIf",1===e.selectedRows.length)}}function X(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"span",26)(1,"label",27)(2,"p-checkbox",28),t.NdJ("ngModelChange",function(l){t.CHM(e);const c=t.oxw();return t.KtG(c.eventCenterS.group.apisRegex.allCustomApis=l)}),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngModel",e.eventCenterS.group.apisRegex.allCustomApis)("binary",!0)}}function tt(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"span",26)(1,"label",27)(2,"p-checkbox",28),t.NdJ("ngModelChange",function(l){t.CHM(e);const c=t.oxw();return t.KtG(c.eventCenterS.filterInLog.apisRegex.allCustomApis=l)}),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngModel",e.eventCenterS.filterInLog.apisRegex.allCustomApis)("binary",!0)}}function et(n,o){if(1&n&&(t.TgZ(0,"div")(1,"div",29),t._uU(2),t.qZA()()),2&n){const e=t.oxw();t.xp6(2),t.Oqu(e.constantsS.group.allCustomApisPermitted)}}function nt(n,o){1&n&&(t.TgZ(0,"th",39),t._UZ(1,"p-tableHeaderCheckbox"),t.qZA())}function it(n,o){1&n&&t._UZ(0,"th",37)}function st(n,o){1&n&&(t.TgZ(0,"th"),t._uU(1,"Authorization"),t.qZA())}function ot(n,o){1&n&&t._UZ(0,"th")}function at(n,o){1&n&&t._UZ(0,"th",40)}function rt(n,o){if(1&n&&(t.TgZ(0,"tr"),t.YNc(1,nt,2,0,"th",35),t.YNc(2,it,1,0,"th",36),t._UZ(3,"th",37),t.TgZ(4,"th"),t._uU(5,"Name"),t.qZA(),t.TgZ(6,"th"),t._uU(7,"Path"),t.qZA(),t.YNc(8,st,2,0,"th",5),t.YNc(9,ot,1,0,"th",5),t.YNc(10,at,1,0,"th",38),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.showCheckbox),t.xp6(1),t.Q6J("ngIf",!e.isDependentOnGroup&&!e.isLPM&&!e.isFilterLogTable),t.xp6(6),t.Q6J("ngIf",!e.isDependentOnGroup&&!e.isLPM&&!e.isFilterLogTable),t.xp6(1),t.Q6J("ngIf",e.isLPM),t.xp6(1),t.Q6J("ngIf",!e.isDependentOnGroup&&!e.isLPM&&!e.isFilterLogTable)}}function lt(n,o){if(1&n&&(t.TgZ(0,"td"),t._UZ(1,"p-tableCheckbox",45),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("value",e)("pSelectableRow",e)}}function ct(n,o){if(1&n&&(t.TgZ(0,"td",46)(1,"span"),t._uU(2),t.qZA()()),2&n){const e=t.oxw().rowIndex;t.xp6(2),t.Oqu(e+1)}}function pt(n,o){1&n&&t._UZ(0,"i",47)}function dt(n,o){1&n&&(t.TgZ(0,"span",51),t._uU(1,"AM-User"),t.qZA())}function _t(n,o){1&n&&(t.TgZ(0,"span",52),t._uU(1,"No-Access"),t.qZA())}function ut(n,o){1&n&&(t.TgZ(0,"span",53),t._uU(1,"Public"),t.qZA())}function mt(n,o){1&n&&(t.TgZ(0,"span",52),t._uU(1,"DB-User"),t.qZA())}function ft(n,o){1&n&&(t.TgZ(0,"span",52),t._uU(1,"AWS"),t.qZA())}function gt(n,o){1&n&&(t.TgZ(0,"span",52),t._uU(1,"Azure"),t.qZA())}function ht(n,o){1&n&&(t.TgZ(0,"span",52),t._uU(1,"Google"),t.qZA())}function Ct(n,o){if(1&n&&(t.TgZ(0,"td"),t.YNc(1,dt,2,0,"span",48),t.YNc(2,_t,2,0,"span",49),t.YNc(3,ut,2,0,"span",50),t.YNc(4,mt,2,0,"span",49),t.YNc(5,ft,2,0,"span",49),t.YNc(6,gt,2,0,"span",49),t.YNc(7,ht,2,0,"span",49),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngIf",e.hasAmAuth),t.xp6(1),t.Q6J("ngIf",e.noAccess),t.xp6(1),t.Q6J("ngIf",e.isPublic),t.xp6(1),t.Q6J("ngIf",e.hasAmDBAuth),t.xp6(1),t.Q6J("ngIf",e.hasAwsAuth),t.xp6(1),t.Q6J("ngIf",e.hasAzureAuth),t.xp6(1),t.Q6J("ngIf",e.hasGoogleAuth)}}function vt(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"div")(1,"label",54)(2,"p-checkbox",55),t.NdJ("ngModelChange",function(l){t.CHM(e);const c=t.oxw(2).$implicit;return t.KtG(c.saveResponseInLog=l)})("ngModelChange",function(){t.CHM(e);const l=t.oxw(4);return t.KtG(l.saveResponseInLogCheckData())})("click",function(l){t.CHM(e);const c=t.oxw(4);return t.KtG(c.generalS.stopPropagation(l))}),t.qZA()()()}if(2&n){const e=t.oxw(2).$implicit;t.xp6(2),t.Q6J("ngModel",e.saveResponseInLog)("binary",!0)}}function N(n,o){if(1&n&&(t.TgZ(0,"td"),t.YNc(1,vt,3,2,"div",5),t.qZA()),2&n){const e=t.oxw().$implicit,s=t.oxw(2);t.xp6(1),t.Q6J("ngIf",(null==s.selectedRows?null:s.selectedRows.indexOf(e))>=0)}}const Tt=function(){return["/api-info/api-testing/testing"]},b=function(n,o,e){return{at_category:n,at_user:o,at_api:e}};function F(n,o){if(1&n&&(t.TgZ(0,"td")(1,"div",46)(2,"a",56),t.NdJ("click",function(s){return s.stopPropagation()}),t._UZ(3,"i",57),t.qZA()()()),2&n){const e=t.oxw().$implicit,s=t.oxw(2);t.xp6(2),t.Q6J("routerLink",t.DdM(2,Tt))("queryParams",t.kEZ(3,b,s.EAPICategory.CUSTOM_APIS,s.authCS.getUserId(),e._id))}}const At=function(n,o,e,s){return{get:n,put:o,post:e,delete:s}};function St(n,o){if(1&n&&(t.TgZ(0,"tr",41),t.YNc(1,lt,2,2,"td",5),t.YNc(2,ct,3,1,"td",42),t.TgZ(3,"td")(4,"span",43),t._uU(5),t.qZA()(),t.TgZ(6,"td")(7,"span"),t._uU(8),t.qZA(),t.YNc(9,pt,1,0,"i",44),t.qZA(),t.TgZ(10,"td"),t._uU(11),t.qZA(),t.YNc(12,Ct,8,7,"td",5),t.YNc(13,N,2,1,"td",5),t.YNc(14,F,4,7,"td",5),t.qZA()),2&n){const e=o.$implicit,s=t.oxw(2);t.Q6J("pSelectableRow",e),t.xp6(1),t.Q6J("ngIf",s.showCheckbox),t.xp6(1),t.Q6J("ngIf",!s.isDependentOnGroup&&!s.isLPM&&!s.isFilterLogTable),t.xp6(2),t.Q6J("ngClass",t.l5B(11,At,e.requestMethod===s.ERequestMethod.GET,e.requestMethod===s.ERequestMethod.PUT,e.requestMethod===s.ERequestMethod.POST,e.requestMethod===s.ERequestMethod.DELETE)),t.xp6(1),t.Oqu(e.requestMethod),t.xp6(3),t.Oqu(e.name),t.xp6(1),t.Q6J("ngIf",e.runOnNativeProcess),t.xp6(2),t.Oqu(e.path),t.xp6(1),t.Q6J("ngIf",!s.isDependentOnGroup&&!s.isLPM&&!s.isFilterLogTable),t.xp6(1),t.Q6J("ngIf",s.isLPM),t.xp6(1),t.Q6J("ngIf",!s.isDependentOnGroup&&!s.isLPM&&!s.isFilterLogTable)}}function xt(n,o){1&n&&t._UZ(0,"p-progressSpinner",58)}function a(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"div",30)(1,"p-table",31),t.NdJ("selectionChange",function(l){t.CHM(e);const c=t.oxw();return t.KtG(c.selectedRows=l)})("selectionChange",function(l){t.CHM(e);const c=t.oxw();return t.KtG(c.functionSelected(l))})("dblclick",function(l){t.CHM(e);const c=t.oxw();return t.KtG(c.dblClickCustomAPIsGrid(l))}),t.YNc(2,rt,11,5,"ng-template",32),t.YNc(3,St,15,16,"ng-template",33),t.qZA(),t.YNc(4,xt,1,0,"p-progressSpinner",34),t.qZA()}if(2&n){const e=t.oxw();t.xp6(1),t.Q6J("selectionMode","multiple")("metaKeySelection",e.metaKeySelection)("selection",e.selectedRows)("dataKey",e.gridKey)("scrollable",!0)("value",e.rows),t.xp6(3),t.Q6J("ngIf",e.loading.grid)}}let p=(()=>{class n{functionS;generalS;notificationS;navigationCS;authCS;constantsS;eventCenterS;cd;router;http;confirmationService;showCheckbox=!0;isReadOnly=!1;isDependentOnGroup=!1;isLPM=!1;isFilterLogTable=!1;metaKeySelection=!0;loading={grid:!1};subscriptions=[];data={mode:f.D.ADD,eventChannel:new t.vpe,formData:void 0};rows=[];rowsMap={};rowsMapName={};showAll=!1;selectedRows=[];gridKey=E.iH._id;EUserType=w.dN;BE_HOST_PORT=It.N.BE_HOST_PORT;EAPICategory=S.R;ERequestMethod=Pt.Yp;FunManFormC;cloneApiModalC;constructor(e,s,l,c,A,_,m,x,M,h,wt){this.functionS=e,this.generalS=s,this.notificationS=l,this.navigationCS=c,this.authCS=A,this.constantsS=_,this.eventCenterS=m,this.cd=x,this.router=M,this.http=h,this.confirmationService=wt}ngOnInit(){var e=this;this.eventCenterS.functions.selectedFunctions.next([]),this.loadGridData(),this.subscriptions.push(this.data.eventChannel.subscribe(s=>{this.FunManFormC.hideModal(),this.loadGridData()})),this.isDependentOnGroup&&this.subscriptions.push(this.eventCenterS.group.selectedGroups.subscribe(function(){var s=(0,d.Z)(function*(l){l.length&&(yield e.loadGridData())});return function(l){return s.apply(this,arguments)}}())),this.isLPM&&(this.subscriptions.push(this.eventCenterS.filterInLog.refreshGrid.subscribe(s=>{s&&this.loadGridData()})),this.subscriptions.push(this.eventCenterS.filterInLog.functionIds.subscribe((0,d.Z)(function*(){e.loadGridData()})))),this.generalS.setNewTitle("API Maker - Custom APIs")}navigateToTreeView(){var e=this;return(0,d.Z)(function*(){yield e.router.navigate(["api-info","custom-api","functions-tree"])})()}loadGridData(){var e=this;if(this.isDependentOnGroup&&0===this.eventCenterS.group.selectedGroups.value.length)return void this.resetGridAndUrl();this.loading.grid=!0;const s={find:{user:this.authCS.getUserId(),active:!0},select:{name:1,label:1,path:1,active:1,requestMethod:1,runOnNativeProcess:1,apiAccessType:1},sort:{path:1}};this.showAll&&delete s.find.active,this.subscriptions.push(this.functionS.query(s,"getAuthData=true").subscribe(function(){var l=(0,d.Z)(function*(c){c.success?(e.selectedRows=[],e.rows=c.data||[],e.rowsMap=g.keyBy(e.rows,E.iH._id),e.rowsMapName=g.keyBy(e.rows,E.eb.name)):e.resetGridAndUrl();const A=e.navigationCS.getQueryParam(C.p.custom_api)||(e.isFilterLogTable?e.eventCenterS.filterInLog.functionIds.value.join(","):e.eventCenterS.group.customApiIds.value.join(","))||(e.isDependentOnGroup&&e.eventCenterS.group.selectedGroups.value[0].queryParams.customApiNames?e.eventCenterS.group.selectedGroups.value[0].queryParams.customApiNames.join(","):"");if(A){const _=A.split(","),m=g.intersection(g.keys(e.rowsMap),_),x=[];for(const h of m)e.rowsMap[h]&&x.push(e.rowsMap[h]);const M=[];for(const h of m)e.rowsMap[h]&&M.push(e.rowsMap[h]);e.selectedRows=M,e.eventCenterS.functions.selectedFunctions.next(x)}if(e.isLPM&&e.eventCenterS.group.selectedGroups.value[0]?.queryParams?.customApiNames?.length){const _=e.eventCenterS.group.selectedGroups.value[0];for(const m of _?.queryParams?.customApiNames)e.rowsMapName[m]&&(e.rowsMapName[m].saveResponseInLog=_.functionsLog?.[m]?.saveResponseInLog||!1);e.setResDataInEventCenter()}if(e.isDependentOnGroup){e.selectedRows=[];for(const _ of e.eventCenterS.group.customApiIds.value)e.rowsMap[_]&&e.selectedRows.push(e.rowsMap[_])}if(e.isFilterLogTable){e.selectedRows=[];for(const _ of e.eventCenterS.filterInLog.functionIds.value)e.rowsMap[_]&&e.selectedRows.push(e.rowsMap[_])}e.loading.grid=!1,e.cd.detectChanges()});return function(c){return l.apply(this,arguments)}}()))}add(){this.data.formData=void 0,this.data.mode=f.D.ADD,this.data.eventChannel.emit({action:i.F.OPEN_FORM_IN_ADD_MODE}),this.FunManFormC.showModal()}view(){this.data.formData=this.rowsMap[this.getSelectedRowId()],this.data.mode=f.D.VIEW,this.data.eventChannel.emit({action:i.F.OPEN_FORM_IN_VIEW_MODE}),this.FunManFormC.showModal()}edit(){this.data.formData=this.rowsMap[this.getSelectedRowId()],this.data.mode=f.D.EDIT,this.data.eventChannel.emit({action:i.F.OPEN_FORM_IN_EDIT_MODE}),this.FunManFormC.showModal()}removePermanentDialog(){var s,e=this;this.confirmationService.confirm({message:this.constantsS.functions.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(s=(0,d.Z)(function*(){yield e.removePermanent()}),function(){return s.apply(this,arguments)})})}removePermanent(){var e=this;return(0,d.Z)(function*(){if(e.getSelectedRowId()){e.loading.grid=!0;try{const s=yield e.functionS.permanentDelete(e.getSelectedRowId()).toPromise();s.success?(e.notificationS.showSuccess(e.constantsS.functions.removePermanent),e.resetGridAndUrl(),e.loadGridData()):e.notificationS.showErrorFromResponse(s,e.constantsS.functions.removePermanentError)}catch{e.notificationS.showError(e.constantsS.functions.removePermanentError)}e.loading.grid=!1}})()}resetDependents(){var e=this;return(0,d.Z)(function*(){e.eventCenterS.functions.selectedFunctions.next([]),yield e.navigationCS.setQueryParam(C.p.custom_api,null)})()}functionSelected(e){var s=this;return(0,d.Z)(function*(){s.selectedRows=e,s.resetDependents().then();for(const l of s.rows)-1===s.selectedRows.indexOf(l)&&(l.saveResponseInLog=!1);s.fillData().then(),s.getSelectedRowId()?s.generalS.setNewTitle(s.rowsMap[s.getSelectedRowId()].name,S.R.CUSTOM_APIS):s.generalS.setNewTitle("API Maker - Custom APIs")})()}resetGridAndUrl(){this.rows=[],this.selectedRows=[],this.rowsMap={},this.eventCenterS.functions.selectedFunctions.next([])}fillData(){var e=this;return(0,d.Z)(function*(){if(!e.selectedRows||Array.isArray(e.selectedRows)&&!e.selectedRows.length)return yield e.navigationCS.setQueryParam(C.p.custom_api,""),e.eventCenterS.group.customApis.next([]),e.eventCenterS.functions.selectedFunctions.next([]),e.eventCenterS.group.customApiIds.next([]),void e.eventCenterS.group.customApis.next([]);if(e.isDependentOnGroup||e.isFilterLogTable){const s=g.map(e.selectedRows,"_id");e.eventCenterS.group.customApiIds.next(s),e.eventCenterS.group.customApis.next(e.selectedRows),e.isFilterLogTable&&(e.eventCenterS.filterInLog.functionIds.next(s),e.eventCenterS.filterInLog.functions.next(e.selectedRows))}else{const s=e.getSelectedRowId(),l=(yield e.functionS.getById(s).toPromise()).data;l._id?(yield e.navigationCS.setQueryParam(C.p.custom_api,l._id),e.eventCenterS.functions.selectedFunctions.next([l])):e.resetDependents().then()}})()}getSelectedRowId(){return this.selectedRows[0]?._id}dblClickCustomAPIsGrid(e){setTimeout(()=>{this.edit()},10)}setResDataInEventCenter(){this.isDependentOnGroup&&(this.eventCenterS.group.customApis.next(this.selectedRows),this.eventCenterS.group.selectedFunctions.next(this.selectedRows)),this.isFilterLogTable&&this.eventCenterS.filterInLog.functions.next(this.selectedRows)}saveResponseInLogCheckData(){this.setResDataInEventCenter()}clone(){var e=this;return(0,d.Z)(function*(){yield e.cloneApiModalC.showModal(e.getSelectedRowId(),function(){var s=(0,d.Z)(function*(l){l&&(yield e.loadGridData()),e.cd.detectChanges()});return function(l){return s.apply(this,arguments)}}())})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}EModelApiPaths=L.k4;static \u0275fac=function(s){return new(s||n)(t.Y36(J.d),t.Y36(y.b),t.Y36(u.W),t.Y36(D.S),t.Y36(P.D),t.Y36(v.L),t.Y36(O.u),t.Y36(t.sBO),t.Y36(Z.F0),t.Y36(Q.eN),t.Y36(R.YP))};static \u0275cmp=t.Xpm({type:n,selectors:[["app-custom-api-grid"]],viewQuery:function(s,l){if(1&s&&(t.Gf(W,5),t.Gf(H,5)),2&s){let c;t.iGM(c=t.CRH())&&(l.FunManFormC=c.first),t.iGM(c=t.CRH())&&(l.cloneApiModalC=c.first)}},inputs:{showCheckbox:"showCheckbox",isReadOnly:["IsReadOnly","isReadOnly"],isDependentOnGroup:["IsDependentOnGroup","isDependentOnGroup"],isLPM:"isLPM",isFilterLogTable:"isFilterLogTable",metaKeySelection:"metaKeySelection"},decls:17,vars:9,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["src","/assets/images/icons/custom.svg","alt","Custom API",1,"fa-fw","mr-1"],["href","https://docs.apimaker.dev/v1/docs/apis-all/custom-apis/user-created-custom-api.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],[4,"ngIf"],["class","float-right cursor-pointer","tooltipPosition","left","pTooltip","All Custom APIs",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["class","h-100",4,"ngIf"],[3,"data"],["funManFormC",""],[3,"modalId","hostAndPort","modelApiPaths"],["cloneApiModalC",""],[1,"float-right","cursor-pointer","ml-3",3,"click"],["tooltipPosition","left","pTooltip","Tree View","tooltipPosition","left",1,"fas","fa-sitemap","text-yellow","fa-fw","fa-rotate-270"],["tooltipPosition","left","pTooltip","Add New","tooltipPosition","left",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Permanent Delete",3,"click",4,"ngIf"],["tooltipPosition","left","pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["tooltipPosition","left","pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-light","fa-fw"],["tooltipPosition","left","pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],["tooltipPosition","left","pTooltip","All Custom APIs",1,"float-right","cursor-pointer"],[1,"mb-0","mt--2px"],[3,"ngModel","binary","ngModelChange"],[1,"p-2","text-center","text-success"],[1,"h-100"],["styleClass","p-datatable-striped custom-api-grid-height","scrollHeight","flex",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["style","width: 45px;",4,"ngIf"],["style","width: 80px;",4,"ngIf"],[2,"width","80px"],["style","width: 60px;",4,"ngIf"],[2,"width","45px"],[2,"width","60px"],[3,"pSelectableRow"],["class","text-center",4,"ngIf"],[1,"small","font-weight-bold","d-inline-block","mr-2",3,"ngClass"],["pTooltip","Running on native process","class","fas fa-radiation ml-2 text-danger",4,"ngIf"],[3,"value","pSelectableRow"],[1,"text-center"],["pTooltip","Running on native process",1,"fas","fa-radiation","ml-2","text-danger"],["class","d-inline-block small font-weight-bold font-monospaced ml-2",4,"ngIf"],["class","d-inline-block small font-weight-bold font-monospaced text-success ml-2",4,"ngIf"],["class","d-inline-block small font-weight-bold font-monospaced text-warning ml-2",4,"ngIf"],[1,"d-inline-block","small","font-weight-bold","font-monospaced","ml-2"],[1,"d-inline-block","small","font-weight-bold","font-monospaced","text-success","ml-2"],[1,"d-inline-block","small","font-weight-bold","font-monospaced","text-warning","ml-2"],[1,"m-0","vertical-align-sub"],["label","Save Response In Log",3,"ngModel","binary","ngModelChange","click"],["href","javascript:",1,"btn","btn-xsm-custom","mr-3",3,"routerLink","queryParams","click"],[1,"fas","fa-vial","text-info","fa-fw","test-tube","pt-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(s,l){1&s&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span"),t._UZ(3,"img",2),t._uU(4," Custom APIs"),t.qZA(),t.TgZ(5,"a",3),t._UZ(6,"img",4),t.qZA(),t.YNc(7,V,8,3,"span",5),t.YNc(8,X,3,2,"span",6),t.YNc(9,tt,3,2,"span",6),t.qZA(),t.TgZ(10,"div",7),t.YNc(11,et,3,1,"div",5),t.YNc(12,a,5,7,"div",8),t.qZA()(),t._UZ(13,"app-w-fun-man-form",9,10)(15,"app-clone-api-modal",11,12)),2&s&&(t.xp6(7),t.Q6J("ngIf",!l.isReadOnly),t.xp6(1),t.Q6J("ngIf",l.isDependentOnGroup),t.xp6(1),t.Q6J("ngIf",l.isFilterLogTable),t.xp6(2),t.Q6J("ngIf",l.eventCenterS.group.apisRegex.allCustomApis||l.eventCenterS.filterInLog.apisRegex.allCustomApis),t.xp6(1),t.Q6J("ngIf",!(l.eventCenterS.group.apisRegex.allCustomApis||l.eventCenterS.filterInLog.apisRegex.allCustomApis)),t.xp6(1),t.Q6J("data",l.data),t.xp6(2),t.Q6J("modalId","idCloneCustomAPIGrid")("hostAndPort",l.BE_HOST_PORT)("modelApiPaths",l.EModelApiPaths.CUSTOM_APIS))},dependencies:[Z.rH,G.JJ,G.On,U.mk,U.O5,Y.s,T.iA,R.jx,T.Ei,T.UA,T.Mo,k.G,K.u,B.XZ,q.u],styles:[".custom-tab-title[_ngcontent-%COMP%]{padding:.5rem}.min-width[_ngcontent-%COMP%], .none[_ngcontent-%COMP%], .delete[_ngcontent-%COMP%], .post[_ngcontent-%COMP%], .put[_ngcontent-%COMP%], .get[_ngcontent-%COMP%]{width:45px;display:inline-block}.get[_ngcontent-%COMP%]{color:var(--accent-success)}.put[_ngcontent-%COMP%]{color:var(--brand-secondary)}.post[_ngcontent-%COMP%]{color:var(--accent-warning)}.delete[_ngcontent-%COMP%]{color:var(--accent-error)}.none[_ngcontent-%COMP%]{color:var(--accent-success--shade--three)}.width-160[_ngcontent-%COMP%]{width:160px}"]})}return n})()},5765:(Et,I,r)=>{r.r(I),r.d(I,{FunctionManM:()=>xt});var d=r(7664),t=r(6814),i=r(4946),f=r(5219);let L=(()=>{class a{static \u0275fac=function(o){return new(o||a)};static \u0275mod=i.oAB({type:a});static \u0275inj=i.cJS({imports:[t.ez,f.m8,f.m8]})}return a})();var w=r(3726),J=r(7359),y=r(7595),u=r(5861),D=r(3157),P=r(328),v=r(6212),O=r(5085),Z=r(1162),Q=r(6925),R=r(553),G=r(9394),U=r(921),Y=r(7629),T=r(7240),k=r(9961),K=r(2189),B=r(5852),q=r(7414),W=r(2915),H=r(9862),j=r(7797),z=r(1396),$=r(7680),V=r(3259),X=r(1137);const tt=["funManFormC"],et=["cloneApiModalC"];function nt(a,p){if(1&a){const n=i.EpF();i.TgZ(0,"span",21),i.NdJ("click",function(){i.CHM(n);const e=i.oxw();return i.KtG(e.edit())}),i._UZ(1,"i",22),i.qZA()}}function it(a,p){if(1&a){const n=i.EpF();i.TgZ(0,"span",23),i.NdJ("click",function(){i.CHM(n);const e=i.oxw();return i.KtG(e.clone())}),i._UZ(1,"i",24),i.qZA()}}function st(a,p){if(1&a){const n=i.EpF();i.TgZ(0,"span",25),i.NdJ("click",function(){i.CHM(n);const e=i.oxw();return i.KtG(e.removePermanentDialog())}),i._UZ(1,"i",26),i.qZA()}}function ot(a,p){if(1&a&&(i.TgZ(0,"div"),i._uU(1),i.qZA()),2&a){const n=i.oxw().$implicit;i.xp6(1),i.Oqu(n.label)}}function at(a,p){1&a&&i._UZ(0,"i",39)}function rt(a,p){1&a&&(i.TgZ(0,"span",40),i._uU(1,"AM-User"),i.qZA())}function lt(a,p){1&a&&(i.TgZ(0,"span",41),i._uU(1,"No-Access"),i.qZA())}function ct(a,p){1&a&&(i.TgZ(0,"span",42),i._uU(1,"Public"),i.qZA())}function pt(a,p){1&a&&(i.TgZ(0,"span",41),i._uU(1,"DB-User"),i.qZA())}function dt(a,p){1&a&&(i.TgZ(0,"span",41),i._uU(1,"AWS"),i.qZA())}function _t(a,p){1&a&&(i.TgZ(0,"span",41),i._uU(1,"Azure"),i.qZA())}function ut(a,p){1&a&&(i.TgZ(0,"span",41),i._uU(1,"Google"),i.qZA())}const mt=function(a,p,n,o){return{get:a,put:p,post:n,delete:o}},ft=function(){return["/api-info/api-testing/testing"]},gt=function(a,p,n){return{at_category:a,at_user:p,at_api:n}};function ht(a,p){if(1&a&&(i.TgZ(0,"div")(1,"div")(2,"table",29)(3,"tr")(4,"td",30)(5,"span",31),i._uU(6),i.qZA(),i.TgZ(7,"span")(8,"span"),i._uU(9),i.qZA(),i.YNc(10,at,1,0,"i",32),i.qZA()(),i.TgZ(11,"td",30),i._uU(12),i.qZA(),i.TgZ(13,"td"),i.YNc(14,rt,2,0,"span",33),i.YNc(15,lt,2,0,"span",34),i.YNc(16,ct,2,0,"span",35),i.YNc(17,pt,2,0,"span",34),i.YNc(18,dt,2,0,"span",34),i.YNc(19,_t,2,0,"span",34),i.YNc(20,ut,2,0,"span",34),i.qZA(),i.TgZ(21,"td",36)(22,"a",37),i.NdJ("click",function(o){return o.stopPropagation()}),i._UZ(23,"i",38),i.qZA()()()()()()),2&a){const n=i.oxw().$implicit,o=i.oxw();i.xp6(5),i.Q6J("ngClass",i.l5B(14,mt,n.data.requestMethod===o.ERequestMethod.GET,n.data.requestMethod===o.ERequestMethod.PUT,n.data.requestMethod===o.ERequestMethod.POST,n.data.requestMethod===o.ERequestMethod.DELETE)),i.xp6(1),i.Oqu(n.data.requestMethod),i.xp6(3),i.Oqu(n.data.name),i.xp6(1),i.Q6J("ngIf",n.data.runOnNativeProcess),i.xp6(2),i.Oqu(n.data.path),i.xp6(2),i.Q6J("ngIf",n.data.hasAmAuth),i.xp6(1),i.Q6J("ngIf",n.data.noAccess),i.xp6(1),i.Q6J("ngIf",n.data.isPublic),i.xp6(1),i.Q6J("ngIf",n.data.hasAmDBAuth),i.xp6(1),i.Q6J("ngIf",n.data.hasAwsAuth),i.xp6(1),i.Q6J("ngIf",n.data.hasAzureAuth),i.xp6(1),i.Q6J("ngIf",n.data.hasGoogleAuth),i.xp6(2),i.Q6J("routerLink",i.DdM(19,ft))("queryParams",i.kEZ(20,gt,o.EAPICategory.CUSTOM_APIS,o.authCS.getUserId(),n.data._id))}}function Ct(a,p){if(1&a&&(i.TgZ(0,"div",27),i.YNc(1,ot,2,1,"div",28),i.YNc(2,ht,24,24,"div",28),i.qZA()),2&a){const n=p.$implicit;i.xp6(1),i.Q6J("ngIf",null==n.children?null:n.children.length),i.xp6(1),i.Q6J("ngIf",!(null!=n.children&&n.children.length))}}function vt(a,p){1&a&&i._UZ(0,"p-progressSpinner",43)}let N=(()=>{class a{functionS;generalS;notificationS;navigationCS;authCS;constantsS;eventCenterS;cd;router;http;confirmationService;loading={grid:!1};subscriptions=[];data={mode:P.D.ADD,eventChannel:new i.vpe,formData:void 0};gridKey=Z.iH._id;EUserType=U.dN;BE_HOST_PORT=R.N.BE_HOST_PORT;EAPICategory=O.R;EQueryParam=v.p;leafSelected=!1;selectedRows=void 0;treeNodes=[];allTreeItemsMap={};FunManFormC;cloneApiModalC;constructor(n,o,e,s,l,c,A,_,m,x,M){this.functionS=n,this.generalS=o,this.notificationS=e,this.navigationCS=s,this.authCS=l,this.constantsS=c,this.eventCenterS=A,this.cd=_,this.router=m,this.http=x,this.confirmationService=M}ngOnInit(){this.loadTreeData(),this.subscriptions.push(this.data.eventChannel.subscribe(n=>{this.FunManFormC.hideModal(),this.loadTreeData()})),this.generalS.setNewTitle("API Maker - Custom APIs")}navigateToGridView(){var n=this;return(0,u.Z)(function*(){yield n.router.navigate(["api-info","custom-api","functions"])})()}loadTreeData(){var n=this;return(0,u.Z)(function*(){const o=(yield n.functionS.getCustomAPITree().toPromise()).data;for(const s of o)n.generalS.convertKTreeItemToPrimeNGTreeItem(s);const e={};n.generalS.getMapOfAllItems(e,o);for(const s of Object.keys(e)){const l=n.allTreeItemsMap[s];l&&(e[s].expanded=l.expanded)}n.treeNodes=o,n.allTreeItemsMap=e,n.loading.grid=!1,n.cd.detectChanges()})()}add(){this.data.formData=void 0,this.data.mode=P.D.ADD,this.data.eventChannel.emit({action:D.F.OPEN_FORM_IN_ADD_MODE}),this.FunManFormC.showModal()}edit(){this.leafSelected&&(this.data.formData=this.selectedRows[0].data,this.data.mode=P.D.EDIT,this.data.eventChannel.emit({action:D.F.OPEN_FORM_IN_EDIT_MODE}),this.FunManFormC.showModal())}removePermanentDialog(){var o,n=this;this.leafSelected&&this.confirmationService.confirm({message:this.constantsS.functions.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(o=(0,u.Z)(function*(){yield n.removePermanent()}),function(){return o.apply(this,arguments)})})}removePermanent(){var n=this;return(0,u.Z)(function*(){if(n.getSelectedRowId()){n.loading.grid=!0;try{const o=yield n.functionS.permanentDelete(n.getSelectedRowId()).toPromise();o.success?(n.notificationS.showSuccess(n.constantsS.functions.removePermanent),n.resetGridAndUrl(),yield n.loadTreeData(),n.leafSelected=!1):n.notificationS.showErrorFromResponse(o,n.constantsS.functions.removePermanentError)}catch{n.notificationS.showError(n.constantsS.functions.removePermanentError)}n.loading.grid=!1}})()}resetDependents(){var n=this;return(0,u.Z)(function*(){yield n.navigationCS.setQueryParam(v.p.custom_api,null)})()}functionSelected(){var n=this;return(0,u.Z)(function*(){n.resetDependents(),n.fillData(),n.getSelectedRowId()?n.generalS.setNewTitle(n.selectedRows[0].data.name,O.R.CUSTOM_APIS):n.generalS.setNewTitle("API Maker - Custom APIs"),n.leafSelected=!(!n.getSelectedRowId()||n.selectedRows[0].children?.length)})()}resetGridAndUrl(){this.selectedRows=void 0}fillData(){var n=this;return(0,u.Z)(function*(){if(!n.selectedRows)return void(yield n.navigationCS.setQueryParam(v.p.custom_api,""));const o=n.getSelectedRowId();o?yield n.navigationCS.setQueryParam(v.p.custom_api,o):n.resetDependents()})()}getSelectedRowId(){return this.selectedRows?.[0]?.data?._id}dblClickCustomAPIsGrid(){setTimeout(()=>{this.edit()},10)}clone(){var n=this;return(0,u.Z)(function*(){yield n.cloneApiModalC.showModal(n.getSelectedRowId(),function(){var o=(0,u.Z)(function*(e){e&&(yield n.loadTreeData()),n.cd.detectChanges()});return function(e){return o.apply(this,arguments)}}())})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}ERequestMethod=Q.Yp;EModelApiPaths=G.k4;static \u0275fac=function(o){return new(o||a)(i.Y36(Y.d),i.Y36(T.b),i.Y36(k.W),i.Y36(K.S),i.Y36(B.D),i.Y36(q.L),i.Y36(W.u),i.Y36(i.sBO),i.Y36(d.F0),i.Y36(H.eN),i.Y36(f.YP))};static \u0275cmp=i.Xpm({type:a,selectors:[["app-custom-api-tree"]],viewQuery:function(o,e){if(1&o&&(i.Gf(tt,5),i.Gf(et,5)),2&o){let s;i.iGM(s=i.CRH())&&(e.FunManFormC=s.first),i.iGM(s=i.CRH())&&(e.cloneApiModalC=s.first)}},decls:24,vars:10,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["src","/assets/images/icons/custom.svg","alt","Custom API",1,"fa-fw","mr-1"],["href","https://docs.apimaker.dev/v1/docs/apis-all/custom-apis/user-created-custom-api.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],[1,"float-right","cursor-pointer","ml-3",3,"click"],["pTooltip","Grid View",1,"fas","fa-table","text-yellow","fa-fw"],["pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],[1,"h-100"],["scrollHeight","calc(100vh - 82px)","selectionMode","multiple",1,"w-full",3,"value","selection","selectionChange","dblclick"],["pTemplate","default"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"data"],["funManFormC",""],[3,"modalId","hostAndPort","modelApiPaths"],["cloneApiModalC",""],["pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-light","fa-fw"],["pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],[1,"w-100","prevent-text-selection","cursor-pointer"],[4,"ngIf"],[1,"w-100"],[2,"width","40%"],[1,"small","font-weight-bold","d-inline-block","mr-2",3,"ngClass"],["pTooltip","Running on native process","class","fas fa-radiation ml-2 text-danger",4,"ngIf"],["class","d-inline-block small font-weight-bold font-monospaced ml-2",4,"ngIf"],["class","d-inline-block small font-weight-bold font-monospaced text-success ml-2",4,"ngIf"],["class","d-inline-block small font-weight-bold font-monospaced text-warning ml-2",4,"ngIf"],[2,"text-align","right"],["href","javascript:",1,"btn","btn-xsm-custom","mr-3",3,"routerLink","queryParams","click"],[1,"fas","fa-vial","text-info","fa-fw","test-tube","pt-1"],["pTooltip","Running on native process",1,"fas","fa-radiation","ml-2","text-danger"],[1,"d-inline-block","small","font-weight-bold","font-monospaced","ml-2"],[1,"d-inline-block","small","font-weight-bold","font-monospaced","text-success","ml-2"],[1,"d-inline-block","small","font-weight-bold","font-monospaced","text-warning","ml-2"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(o,e){1&o&&(i.TgZ(0,"div",0)(1,"div",1)(2,"span"),i._UZ(3,"img",2),i._uU(4," Custom APIs"),i.qZA(),i.TgZ(5,"a",3),i._UZ(6,"img",4),i.qZA(),i.TgZ(7,"span")(8,"span",5),i.NdJ("click",function(){return e.navigateToGridView()}),i._UZ(9,"i",6),i.qZA(),i.TgZ(10,"span",7),i.NdJ("click",function(){return e.add()}),i._UZ(11,"i",8),i.qZA(),i.YNc(12,nt,2,0,"span",9),i.YNc(13,it,2,0,"span",10),i.YNc(14,st,2,0,"span",11),i.qZA()(),i.TgZ(15,"div",12)(16,"div",13)(17,"p-tree",14),i.NdJ("selectionChange",function(l){return e.selectedRows=l})("dblclick",function(){return e.dblClickCustomAPIsGrid()})("selectionChange",function(){return e.functionSelected()}),i.YNc(18,Ct,3,2,"ng-template",15),i.qZA(),i.YNc(19,vt,1,0,"p-progressSpinner",16),i.qZA()()(),i._UZ(20,"app-w-fun-man-form",17,18)(22,"app-clone-api-modal",19,20)),2&o&&(i.xp6(12),i.Q6J("ngIf",e.leafSelected),i.xp6(1),i.Q6J("ngIf",e.leafSelected),i.xp6(1),i.Q6J("ngIf",e.leafSelected),i.xp6(3),i.Q6J("value",e.treeNodes)("selection",e.selectedRows),i.xp6(2),i.Q6J("ngIf",e.loading.grid),i.xp6(1),i.Q6J("data",e.data),i.xp6(2),i.Q6J("modalId","idCloneCustomAPITree")("hostAndPort",e.BE_HOST_PORT)("modelApiPaths",e.EModelApiPaths.CUSTOM_APIS))},dependencies:[d.rH,t.mk,t.O5,j.s,f.jx,z.mp,$.G,V.u,X.u],styles:[".custom-tab-title[_ngcontent-%COMP%]{padding:.5rem}.min-width[_ngcontent-%COMP%], .none[_ngcontent-%COMP%], .delete[_ngcontent-%COMP%], .post[_ngcontent-%COMP%], .put[_ngcontent-%COMP%], .get[_ngcontent-%COMP%]{width:45px;display:inline-block}.get[_ngcontent-%COMP%]{color:var(--accent-success)}.put[_ngcontent-%COMP%]{color:var(--brand-secondary)}.post[_ngcontent-%COMP%]{color:var(--accent-warning)}.delete[_ngcontent-%COMP%]{color:var(--accent-error)}.none[_ngcontent-%COMP%]{color:var(--accent-success--shade--three)}.width-160[_ngcontent-%COMP%]{width:160px}"]})}return a})();var Tt=r(7987);const At=[{path:"",redirectTo:"functions-tree",pathMatch:"full"},{path:"functions-tree",component:(()=>{class a{route;constructor(n){this.route=n}ngOnInit(){}static \u0275fac=function(o){return new(o||a)(i.Y36(d.gz))};static \u0275cmp=i.Xpm({type:a,selectors:[["app-fun-man-layout-tree"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1"]],template:function(o,e){1&o&&(i.TgZ(0,"div",0),i._UZ(1,"app-custom-api-tree"),i.qZA())},dependencies:[N],encapsulation:2})}return a})(),canActivate:[w.P]},{path:"functions",component:(()=>{class a{route;mode="tree";constructor(n){this.route=n}ngOnInit(){this.route.queryParams.subscribe(n=>{n.mode&&(this.mode=n.mode)})}static \u0275fac=function(o){return new(o||a)(i.Y36(d.gz))};static \u0275cmp=i.Xpm({type:a,selectors:[["app-fun-man-layout"]],decls:2,vars:1,consts:[[1,"pt-1","pl-1","pr-1"],[3,"showCheckbox"]],template:function(o,e){1&o&&(i.TgZ(0,"div",0),i._UZ(1,"app-custom-api-grid",1),i.qZA()),2&o&&(i.xp6(1),i.Q6J("showCheckbox",!1))},dependencies:[y.G],encapsulation:2})}return a})(),canActivate:[w.P]}];let xt=(()=>{class a{static \u0275fac=function(o){return new(o||a)};static \u0275mod=i.oAB({type:a});static \u0275inj=i.cJS({imports:[d.Bz.forChild(At),J.u,Tt.X,L]})}return a})()}}]);
package/dist/6236.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[6236],{4491:(C,E,s)=>{s.d(E,{g:()=>q});var m=s(5861),r=s(95),c=s(3157),l=s(328),u=s(9361),I=s(1162),p=s(553),D=s(5085),M=s(1601),f=s(3531),h=s(9989),e=s(4946),v=s(9961),P=s(7240),O=s(7414),T=s(2694),A=s(5852),S=s(2304),Z=s(3429),U=s(2915),F=s(3835),b=s(6814),z=s(2660),R=s(5860),y=s(756),x=s(7680),g=s(4844),L=s(3259),B=s(5025);const W=["insertCodeModalC"],K=["monacoEditorModalC"];function N(i,_){1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",27),e._uU(2," Add Process Initializer"),e.qZA())}function J(i,_){1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",28),e._uU(2," View Process Initializer"),e.qZA())}function Y(i,_){if(1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",29),e._uU(2," Edit Process Initializer "),e.TgZ(3,"span",30),e._uU(4),e.qZA()()),2&i){const o=e.oxw();e.xp6(4),e.Oqu(o.form.get("name").value)}}function w(i,_){1&i&&(e.TgZ(0,"span",39),e._uU(1,"You can not change name later, it can be used in script."),e.qZA())}function V(i,_){if(1&i&&(e.TgZ(0,"div")(1,"form",31)(2,"div",32)(3,"label",33),e._uU(4,"Name"),e.qZA(),e.TgZ(5,"div",34),e._UZ(6,"input",35),e.YNc(7,w,2,0,"span",36),e.qZA()(),e.TgZ(8,"div",32)(9,"label",33),e._uU(10,"Order"),e.qZA(),e.TgZ(11,"div",34),e._UZ(12,"input",37),e.qZA()(),e.TgZ(13,"div",32)(14,"label",33),e._uU(15,"Timeout in minutes"),e.qZA(),e.TgZ(16,"div",34),e._UZ(17,"input",38),e.qZA()()()()),2&i){const o=e.oxw();e.xp6(1),e.Q6J("formGroup",o.form),e.xp6(6),e.Q6J("ngIf",o.data.mode===o.EFormMode.ADD)}}function Q(i,_){if(1&i){const o=e.EpF();e.TgZ(0,"div",40)(1,"app-monaco-editor",41),e.NdJ("editorGenerated",function(t){e.CHM(o);const n=e.oxw();return e.KtG(n.editorGenerated(t))}),e.qZA()()}if(2&i){const o=e.oxw();e.xp6(1),e.Q6J("isSchemaEditor",!0)("editorOptions",o.editorOptionsProcessInitializer)}}function G(i,_){if(1&i){const o=e.EpF();e.TgZ(0,"a",42),e.NdJ("click",function(){e.CHM(o);const t=e.oxw();return e.KtG(t.viewError())}),e._uU(1,"View error"),e.qZA()}}function H(i,_){1&i&&(e.TgZ(0,"span"),e._uU(1,"Save"),e.qZA())}function k(i,_){1&i&&(e.TgZ(0,"span"),e._uU(1,"Update"),e.qZA())}function j(i,_){if(1&i){const o=e.EpF();e.TgZ(0,"button",43),e.NdJ("click",function(){e.CHM(o);const t=e.oxw();return e.KtG(t.save())}),e._UZ(1,"i",44),e.YNc(2,H,2,0,"span",4),e.YNc(3,k,2,0,"span",4),e.qZA()}if(2&i){const o=e.oxw();e.Q6J("disabled",o.form.invalid),e.xp6(2),e.Q6J("ngIf",o.data.mode===o.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",o.data.mode===o.EFormMode.EDIT)}}function X(i,_){1&i&&e._UZ(0,"p-progressSpinner",45)}let q=(()=>{class i{fb;ns;generalS;constantsS;processInitializersS;authCS;monacoS;instanceS;eventCenterS;generalCS;userS;cd;data;loading={form:!1};EFormMode=l.D;form;subscriptions=[];formData;IEventData=c.F;id;BE_HOST_PORT=p.N.BE_HOST_PORT;DOCS_HOST_PORT=p.N.DOCS_HOST_PORT;instances=[];editorPI;editorOptionsProcessInitializer={readOnly:!1,language:"typescript",contextmenu:!0};lastError;editorOptionsMonacoEditorModal={readOnly:!0,language:"json",contextmenu:!0};insertCodeModalC;viewDockerfileModelC;shouldLoadMonacoEditor=!1;monacoDecorations=[];tab;constructor(o,a,t,n,d,ee,oe,te,se,ae,ie,ne){this.fb=o,this.ns=a,this.generalS=t,this.constantsS=n,this.processInitializersS=d,this.authCS=ee,this.monacoS=oe,this.instanceS=te,this.eventCenterS=se,this.generalCS=ae,this.userS=ie,this.cd=ne}ngOnInit(){var o=this;return(0,m.Z)(function*(){o.createForm(),o.subscriptions.push(o.data.eventChannel.subscribe(function(){var a=(0,m.Z)(function*(t){if(t)if(o.form.enable(),t.action===c.F.OPEN_FORM_IN_EDIT_MODE)yield o.editViewLoadData(),o.form.get("name").disable(),o.cd.detectChanges();else if(t.action===c.F.OPEN_FORM_IN_VIEW_MODE)yield o.editViewLoadData(),o.form.disable(),o.cd.detectChanges();else if(t.action===c.F.OPEN_FORM_IN_ADD_MODE){o.form.reset(),o.form.patchValue(t.data||{});const n=yield o.instanceS.getDefaultContent(o.BE_HOST_PORT,D.R.PROCESS_INITIALIZER).toPromise();o.editorOptionsProcessInitializer={readOnly:!1},o.generalCS.setValueInEditor(o,"editorPI",n.data),o.cd.detectChanges()}});return function(t){return a.apply(this,arguments)}}()))})()}editViewLoadData(){var o=this;return(0,m.Z)(function*(){const a=yield o.processInitializersS.getById(o.data.formData._id).toPromise();o.form.reset(),o.form.patchValue(a.data),o.generalCS.setValueInEditor(o,"editorPI",a.data?.processInitializerCode||"")})()}createForm(){this.form=this.fb.group({name:[null,[r.kI.required]],order:[null,[r.kI.required]],processInitializerTimeoutInMinutes:[null,[]]})}showModal(){this.lastError=void 0,this.shouldLoadMonacoEditor=!0,setTimeout(()=>{$("#idProcessInitializerForm").modal("show")},100)}hideModal(){$("#idProcessInitializerForm").modal("hide")}save(){var o=this;return(0,m.Z)(function*(){const a=o.form.getRawValue();let t;t=o.data.formData&&o.data.formData._id?(yield o.processInitializersS.getById(o.data.formData._id).toPromise()).data:{};const n=Object.assign({},t,a);n.user=o.authCS.getUserId(),n.processInitializerCode=o.editorPI.getValue();try{let d;o.loading.form=!0,o.lastError=void 0,o.monacoS.clearEditorDecorations(o.editorPI,o.monacoDecorations),o.data.mode===l.D.ADD?d=yield o.processInitializersS.post(n).toPromise():o.data.mode===l.D.EDIT&&(d=yield o.processInitializersS.put(n._id,n,{select:I.iH._id}).toPromise()),o.ns.showSuccess(o.data.mode===l.D.ADD?o.constantsS.processInitializer.addSuccess:o.constantsS.processInitializer.editSuccess),o.data.eventChannel.emit({action:o.data.mode===l.D.ADD?c.F.SAVED:c.F.UPDATED,data:d}),o.eventCenterS.processInitializersSavedAndUpdate.next(!0),o.loading.form=!1}catch(d){o.loading.form=!1,o.ns.showErrorFromResponse(d.error||d,"Unable to save process initializer."),o.lastError=d.error,o.tab=o.tab||{},o.tab.axiosResponse={data:d.error},o.monacoS.highlightErrorInMonacoEditor(o.editorPI,o.tab,"MainSandbox.ts",o.monacoDecorations)}o.cd.detectChanges()})()}showInsertCodeModel(){this.generalCS.messageReceivedFor=u.H.All,this.insertCodeModalC.showModal(f.b.ProcessInitializersFormC).then()}editorGenerated(o){var a=this;return(0,m.Z)(function*(){a.editorPI=o,yield a.monacoS.loadSchemaEditorSettings(a.BE_HOST_PORT,a.authCS.getUserId(),null),a.monacoS.addSaveCodeKeyBinding(o,t=>{a.form.valid&&a.save()}),a.monacoS.addInsertCodeKeyBinding(o,t=>{a.generalCS.messageReceivedFor=u.H.All,a.data.mode!==l.D.VIEW&&a.insertCodeModalC.showModal(f.b.ProcessInitializersFormC)}),a.subscriptions.push(a.generalS.messageReceived.subscribe(t=>{t.type&&t.type===h.g.TEXT_COPIED&&t.componentName===f.b.ProcessInitializersFormC&&(a.monacoS.insertAtCursor(o,t.selectedText),a.insertCodeModalC.hideModal())}))})()}viewError(){this.viewDockerfileModelC.showModal(this.generalS.stringify(this.lastError),M.d.json)}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions),this.eventCenterS.processInitializersSavedAndUpdate.next(!1)}static \u0275fac=function(a){return new(a||i)(e.Y36(r.qu),e.Y36(v.W),e.Y36(P.b),e.Y36(O.L),e.Y36(T.e),e.Y36(A.D),e.Y36(S.b),e.Y36(Z.E),e.Y36(U.u),e.Y36(P.b),e.Y36(F.K),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:i,selectors:[["app-process-initializers-form"]],viewQuery:function(a,t){if(1&a&&(e.Gf(W,5),e.Gf(K,5)),2&a){let n;e.iGM(n=e.CRH())&&(t.insertCodeModalC=n.first),e.iGM(n=e.CRH())&&(t.viewDockerfileModelC=n.first)}},inputs:{data:"data"},decls:32,vars:14,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idProcessInitializerForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close",3,"click"],["aria-hidden","true"],[1,"fas","fa-window-close"],["pTooltip","Insert Code","sava-no-dbl-click","",1,"cursor-pointer","mr-1",2,"font-size","1.4em",3,"click"],[1,"fas","fa-info-circle","text-info","fa-fw"],["href","https://docs.apimaker.dev/v1/docs/features/process-initializers.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n2",2,"font-size","25px"],[1,"modal-body","overflow-auto"],["header","Basic Info"],["header","Code"],["class","overflow-hidden","style","height: calc(100vh - 206px);",4,"ngIf"],[1,"modal-footer"],["href","javascript:;","class","text-danger",3,"click",4,"ngIf"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary",3,"click"],[1,"fas","fa-times","text-danger","fa-fw"],["class","btn btn-primary btn-sm","sava-no-dbl-click","","type","button",3,"disabled","click",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"frameId","modalId","docsHostPort"],["insertCodeModalC",""],[3,"modalId","editorOptionsMonacoEditorModal","modalTitle"],["monacoEditorModalC",""],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],[1,"ml-2","font-weight-normal","small","text-muted"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-3","col-form-label","col-form-label-sm","text-right"],[1,"col-7"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm"],["class","mt-1px small",4,"ngIf"],["formControlName","order","name","order","spellcheck","false","type","number","placeholder","Please provide order",1,"form-control","form-control-sm"],["formControlName","processInitializerTimeoutInMinutes","name","processInitializerTimeoutInMinutes","spellcheck","false","type","number","placeholder","10",1,"form-control","form-control-sm"],[1,"mt-1px","small"],[1,"overflow-hidden",2,"height","calc(100vh - 206px)"],[3,"isSchemaEditor","editorOptions","editorGenerated"],["href","javascript:;",1,"text-danger",3,"click"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"disabled","click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(a,t){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,N,3,0,"span",4),e.YNc(5,J,3,0,"span",4),e.YNc(6,Y,5,1,"span",4),e.TgZ(7,"div",5)(8,"button",6),e.NdJ("click",function(){return t.hideModal()}),e.TgZ(9,"span",7),e._UZ(10,"i",8),e.qZA()(),e.TgZ(11,"span",9),e.NdJ("click",function(){return t.showInsertCodeModel()}),e._UZ(12,"i",10),e.qZA(),e.TgZ(13,"a",11),e._UZ(14,"img",12),e.qZA()()(),e.TgZ(15,"div",13)(16,"p-tabView")(17,"p-tabPanel",14),e.YNc(18,V,18,2,"div",4),e.qZA(),e.TgZ(19,"p-tabPanel",15),e.YNc(20,Q,2,2,"div",16),e.qZA()()(),e.TgZ(21,"div",17),e.YNc(22,G,2,0,"a",18),e.TgZ(23,"button",19),e.NdJ("click",function(){return t.hideModal()}),e._UZ(24,"i",20),e._uU(25," Close"),e.qZA(),e.YNc(26,j,4,3,"button",21),e.qZA(),e.YNc(27,X,1,0,"p-progressSpinner",22),e.qZA()()(),e._UZ(28,"app-insert-code-modal",23,24)(30,"app-monaco-editor-modal",25,26)),2&a&&(e.xp6(4),e.Q6J("ngIf",t.data.mode===t.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",t.data.mode===t.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",t.data.mode===t.EFormMode.EDIT),e.xp6(12),e.Q6J("ngIf",t.shouldLoadMonacoEditor),e.xp6(2),e.Q6J("ngIf",t.shouldLoadMonacoEditor),e.xp6(2),e.Q6J("ngIf",t.lastError),e.xp6(4),e.Q6J("ngIf",t.data.mode!==t.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",t.loading.form),e.xp6(1),e.Q6J("frameId","idInsertCodeDbMig")("modalId","idInsertCodeDbMigForm")("docsHostPort",t.DOCS_HOST_PORT),e.xp6(2),e.Q6J("modalId","idMonacoEditorModalInSysProcessInitializer")("editorOptionsMonacoEditorModal",t.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[r._Y,r.Fj,r.wV,r.JJ,r.JL,r.sg,r.u,b.O5,z.y,R.P,y.O,x.G,g.xf,g.x4,L.u,B.A],encapsulation:2,changeDetection:0})}return i})()},6236:(C,E,s)=>{s.d(E,{e:()=>I});var m=s(8761),c=(s(4491),s(4950)),l=s(4946);let I=(()=>{class p{static \u0275fac=function(f){return new(f||p)};static \u0275mod=l.oAB({type:p});static \u0275inj=l.cJS({imports:[m.u,c.A]})}return p})()}}]);
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[6236],{4491:(C,E,s)=>{s.d(E,{g:()=>q});var m=s(5861),r=s(95),c=s(3157),l=s(328),u=s(9361),I=s(1162),p=s(553),D=s(5085),M=s(1601),f=s(3531),h=s(9989),e=s(4946),v=s(9961),P=s(7240),O=s(7414),T=s(2694),A=s(5852),S=s(2304),Z=s(3429),U=s(2915),F=s(3835),b=s(6814),z=s(2660),R=s(5860),y=s(756),x=s(7680),g=s(4844),L=s(3259),B=s(5025);const W=["insertCodeModalC"],K=["monacoEditorModalC"];function N(i,_){1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",27),e._uU(2," Add Process Initializer"),e.qZA())}function J(i,_){1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",28),e._uU(2," View Process Initializer"),e.qZA())}function Y(i,_){if(1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",29),e._uU(2," Edit Process Initializer "),e.TgZ(3,"span",30),e._uU(4),e.qZA()()),2&i){const o=e.oxw();e.xp6(4),e.Oqu(o.form.get("name").value)}}function w(i,_){1&i&&(e.TgZ(0,"span",39),e._uU(1,"You can not change name later, it can be used in script."),e.qZA())}function V(i,_){if(1&i&&(e.TgZ(0,"div")(1,"form",31)(2,"div",32)(3,"label",33),e._uU(4,"Name"),e.qZA(),e.TgZ(5,"div",34),e._UZ(6,"input",35),e.YNc(7,w,2,0,"span",36),e.qZA()(),e.TgZ(8,"div",32)(9,"label",33),e._uU(10,"Order"),e.qZA(),e.TgZ(11,"div",34),e._UZ(12,"input",37),e.qZA()(),e.TgZ(13,"div",32)(14,"label",33),e._uU(15,"Timeout in minutes"),e.qZA(),e.TgZ(16,"div",34),e._UZ(17,"input",38),e.qZA()()()()),2&i){const o=e.oxw();e.xp6(1),e.Q6J("formGroup",o.form),e.xp6(6),e.Q6J("ngIf",o.data.mode===o.EFormMode.ADD)}}function Q(i,_){if(1&i){const o=e.EpF();e.TgZ(0,"div",40)(1,"app-monaco-editor",41),e.NdJ("editorGenerated",function(t){e.CHM(o);const n=e.oxw();return e.KtG(n.editorGenerated(t))}),e.qZA()()}if(2&i){const o=e.oxw();e.xp6(1),e.Q6J("isSchemaEditor",!0)("editorOptions",o.editorOptionsProcessInitializer)}}function G(i,_){if(1&i){const o=e.EpF();e.TgZ(0,"a",42),e.NdJ("click",function(){e.CHM(o);const t=e.oxw();return e.KtG(t.viewError())}),e._uU(1,"View error"),e.qZA()}}function H(i,_){1&i&&(e.TgZ(0,"span"),e._uU(1,"Save"),e.qZA())}function k(i,_){1&i&&(e.TgZ(0,"span"),e._uU(1,"Update"),e.qZA())}function j(i,_){if(1&i){const o=e.EpF();e.TgZ(0,"button",43),e.NdJ("click",function(){e.CHM(o);const t=e.oxw();return e.KtG(t.save())}),e._UZ(1,"i",44),e.YNc(2,H,2,0,"span",4),e.YNc(3,k,2,0,"span",4),e.qZA()}if(2&i){const o=e.oxw();e.Q6J("disabled",o.form.invalid),e.xp6(2),e.Q6J("ngIf",o.data.mode===o.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",o.data.mode===o.EFormMode.EDIT)}}function X(i,_){1&i&&e._UZ(0,"p-progressSpinner",45)}let q=(()=>{class i{fb;ns;generalS;constantsS;processInitializersS;authCS;monacoS;instanceS;eventCenterS;generalCS;userS;cd;data;loading={form:!1};EFormMode=l.D;form;subscriptions=[];formData;IEventData=c.F;id;BE_HOST_PORT=p.N.BE_HOST_PORT;DOCS_HOST_PORT=p.N.DOCS_HOST_PORT;instances=[];editorPI;editorOptionsProcessInitializer={readOnly:!1,language:"typescript",contextmenu:!0};lastError;editorOptionsMonacoEditorModal={readOnly:!0,language:"json",contextmenu:!0};insertCodeModalC;viewDockerfileModelC;shouldLoadMonacoEditor=!1;monacoDecorations=[];tab;constructor(o,a,t,n,d,ee,oe,te,se,ae,ie,ne){this.fb=o,this.ns=a,this.generalS=t,this.constantsS=n,this.processInitializersS=d,this.authCS=ee,this.monacoS=oe,this.instanceS=te,this.eventCenterS=se,this.generalCS=ae,this.userS=ie,this.cd=ne}ngOnInit(){var o=this;return(0,m.Z)(function*(){o.createForm(),o.subscriptions.push(o.data.eventChannel.subscribe(function(){var a=(0,m.Z)(function*(t){if(t)if(o.form.enable(),t.action===c.F.OPEN_FORM_IN_EDIT_MODE)yield o.editViewLoadData(),o.form.get("name").disable(),o.cd.detectChanges();else if(t.action===c.F.OPEN_FORM_IN_VIEW_MODE)yield o.editViewLoadData(),o.form.disable(),o.cd.detectChanges();else if(t.action===c.F.OPEN_FORM_IN_ADD_MODE){o.form.reset(),o.form.patchValue(t.data||{});const n=yield o.instanceS.getDefaultContent(o.BE_HOST_PORT,D.R.PROCESS_INITIALIZER).toPromise();o.editorOptionsProcessInitializer={readOnly:!1},o.generalCS.setValueInEditor(o,"editorPI",n.data),o.cd.detectChanges()}});return function(t){return a.apply(this,arguments)}}()))})()}editViewLoadData(){var o=this;return(0,m.Z)(function*(){const a=yield o.processInitializersS.getById(o.data.formData._id).toPromise();o.form.reset(),o.form.patchValue(a.data),o.generalCS.setValueInEditor(o,"editorPI",a.data?.processInitializerCode||"")})()}createForm(){this.form=this.fb.group({name:[null,[r.kI.required]],order:[null,[r.kI.required]],processInitializerTimeoutInMinutes:[null,[]]})}showModal(){this.lastError=void 0,this.shouldLoadMonacoEditor=!0,setTimeout(()=>{$("#idProcessInitializerForm").modal("show")},100)}hideModal(){$("#idProcessInitializerForm").modal("hide")}save(){var o=this;return(0,m.Z)(function*(){const a=o.form.getRawValue();let t;t=o.data.formData&&o.data.formData._id?(yield o.processInitializersS.getById(o.data.formData._id).toPromise()).data:{};const n=Object.assign({},t,a);n.user=o.authCS.getUserId(),n.processInitializerCode=o.editorPI.getValue();try{let d;o.loading.form=!0,o.lastError=void 0,o.monacoS.clearEditorDecorations(o.editorPI,o.monacoDecorations),o.data.mode===l.D.ADD?d=yield o.processInitializersS.post(n).toPromise():o.data.mode===l.D.EDIT&&(d=yield o.processInitializersS.put(n._id,n,{select:I.iH._id}).toPromise()),o.ns.showSuccess(o.data.mode===l.D.ADD?o.constantsS.processInitializer.addSuccess:o.constantsS.processInitializer.editSuccess),o.data.eventChannel.emit({action:o.data.mode===l.D.ADD?c.F.SAVED:c.F.UPDATED,data:d}),o.eventCenterS.processInitializersSavedAndUpdate.next(!0),o.loading.form=!1}catch(d){o.loading.form=!1,o.ns.showErrorFromResponse(d.error||d,"Unable to save process initializer."),o.lastError=d.error,o.tab=o.tab||{},o.tab.axiosResponse={data:d.error},o.monacoS.highlightErrorInMonacoEditor(o.editorPI,o.tab,"MainSandbox.ts",o.monacoDecorations)}o.cd.detectChanges()})()}showInsertCodeModel(){this.generalCS.messageReceivedFor=u.H.All,this.insertCodeModalC.showModal(f.b.ProcessInitializersFormC).then()}editorGenerated(o){var a=this;return(0,m.Z)(function*(){a.editorPI=o,yield a.monacoS.loadSchemaEditorSettings(a.BE_HOST_PORT,a.authCS.getUserId(),null),a.monacoS.addSaveCodeKeyBinding(o,t=>{a.form.valid&&a.save()}),a.monacoS.addInsertCodeKeyBinding(o,t=>{a.generalCS.messageReceivedFor=u.H.All,a.data.mode!==l.D.VIEW&&a.insertCodeModalC.showModal(f.b.ProcessInitializersFormC)}),a.subscriptions.push(a.generalS.messageReceived.subscribe(t=>{t.type&&t.type===h.g.TEXT_COPIED&&t.componentName===f.b.ProcessInitializersFormC&&(a.monacoS.insertAtCursor(o,t.selectedText),a.insertCodeModalC.hideModal())}))})()}viewError(){this.viewDockerfileModelC.showModal(this.generalS.stringify(this.lastError),M.d.json)}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions),this.eventCenterS.processInitializersSavedAndUpdate.next(!1)}static \u0275fac=function(a){return new(a||i)(e.Y36(r.qu),e.Y36(v.W),e.Y36(P.b),e.Y36(O.L),e.Y36(T.e),e.Y36(A.D),e.Y36(S.b),e.Y36(Z.E),e.Y36(U.u),e.Y36(P.b),e.Y36(F.K),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:i,selectors:[["app-process-initializers-form"]],viewQuery:function(a,t){if(1&a&&(e.Gf(W,5),e.Gf(K,5)),2&a){let n;e.iGM(n=e.CRH())&&(t.insertCodeModalC=n.first),e.iGM(n=e.CRH())&&(t.viewDockerfileModelC=n.first)}},inputs:{data:"data"},decls:32,vars:14,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idProcessInitializerForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close",3,"click"],["aria-hidden","true"],[1,"fas","fa-window-close"],["pTooltip","Insert Code","sava-no-dbl-click","",1,"cursor-pointer","mr-1",2,"font-size","1.4em",3,"click"],[1,"fas","fa-info-circle","text-info","fa-fw"],["href","https://docs.apimaker.dev/v1/docs/features/process-initializers.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n2",2,"font-size","25px"],[1,"modal-body","overflow-auto"],["header","Basic Info"],["header","Code"],["class","overflow-hidden","style","height: calc(100vh - 206px);",4,"ngIf"],[1,"modal-footer"],["href","javascript:;","class","text-danger",3,"click",4,"ngIf"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary",3,"click"],[1,"fas","fa-times","text-danger","fa-fw"],["class","btn btn-primary btn-sm","sava-no-dbl-click","","type","button",3,"disabled","click",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"frameId","modalId","docsHostPort"],["insertCodeModalC",""],[3,"modalId","editorOptionsMonacoEditorModal","modalTitle"],["monacoEditorModalC",""],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],[1,"ml-2","font-weight-normal","small","text-muted"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-3","col-form-label","col-form-label-sm","text-right"],[1,"col-7"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm"],["class","mt-1px small",4,"ngIf"],["formControlName","order","name","order","spellcheck","false","type","number","placeholder","Please provide order",1,"form-control","form-control-sm"],["formControlName","processInitializerTimeoutInMinutes","name","processInitializerTimeoutInMinutes","spellcheck","false","type","number","placeholder","10",1,"form-control","form-control-sm"],[1,"mt-1px","small"],[1,"overflow-hidden",2,"height","calc(100vh - 206px)"],[3,"isSchemaEditor","editorOptions","editorGenerated"],["href","javascript:;",1,"text-danger",3,"click"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"disabled","click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(a,t){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,N,3,0,"span",4),e.YNc(5,J,3,0,"span",4),e.YNc(6,Y,5,1,"span",4),e.TgZ(7,"div",5)(8,"button",6),e.NdJ("click",function(){return t.hideModal()}),e.TgZ(9,"span",7),e._UZ(10,"i",8),e.qZA()(),e.TgZ(11,"span",9),e.NdJ("click",function(){return t.showInsertCodeModel()}),e._UZ(12,"i",10),e.qZA(),e.TgZ(13,"a",11),e._UZ(14,"img",12),e.qZA()()(),e.TgZ(15,"div",13)(16,"p-tabView")(17,"p-tabPanel",14),e.YNc(18,V,18,2,"div",4),e.qZA(),e.TgZ(19,"p-tabPanel",15),e.YNc(20,Q,2,2,"div",16),e.qZA()()(),e.TgZ(21,"div",17),e.YNc(22,G,2,0,"a",18),e.TgZ(23,"button",19),e.NdJ("click",function(){return t.hideModal()}),e._UZ(24,"i",20),e._uU(25," Close"),e.qZA(),e.YNc(26,j,4,3,"button",21),e.qZA(),e.YNc(27,X,1,0,"p-progressSpinner",22),e.qZA()()(),e._UZ(28,"app-insert-code-modal",23,24)(30,"app-monaco-editor-modal",25,26)),2&a&&(e.xp6(4),e.Q6J("ngIf",t.data.mode===t.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",t.data.mode===t.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",t.data.mode===t.EFormMode.EDIT),e.xp6(12),e.Q6J("ngIf",t.shouldLoadMonacoEditor),e.xp6(2),e.Q6J("ngIf",t.shouldLoadMonacoEditor),e.xp6(2),e.Q6J("ngIf",t.lastError),e.xp6(4),e.Q6J("ngIf",t.data.mode!==t.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",t.loading.form),e.xp6(1),e.Q6J("frameId","idInsertCodeDbMig")("modalId","idInsertCodeDbMigForm")("docsHostPort",t.DOCS_HOST_PORT),e.xp6(2),e.Q6J("modalId","idMonacoEditorModalInSysProcessInitializer")("editorOptionsMonacoEditorModal",t.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[r._Y,r.Fj,r.wV,r.JJ,r.JL,r.sg,r.u,b.O5,z.y,R.P,y.O,x.G,g.xf,g.x4,L.u,B.A],encapsulation:2,changeDetection:0})}return i})()},6236:(C,E,s)=>{s.d(E,{e:()=>I});var m=s(7359),c=(s(4491),s(4950)),l=s(4946);let I=(()=>{class p{static \u0275fac=function(f){return new(f||p)};static \u0275mod=l.oAB({type:p});static \u0275inj=l.cJS({imports:[m.u,c.A]})}return p})()}}]);