@sava-info-systems/api-maker-with-extensions 1.6.0 → 1.7.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 (162) hide show
  1. package/README.md +1 -1
  2. package/dist/1025.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/2295.js +1 -1
  7. package/dist/2443.js +1 -1
  8. package/dist/2473.js +1 -1
  9. package/dist/2714.js +1 -1
  10. package/dist/3139.js +1 -1
  11. package/dist/4181.js +1 -1
  12. package/dist/4186.js +1 -1
  13. package/dist/4211.js +1 -1
  14. package/dist/485.js +1 -1
  15. package/dist/4895.js +1 -1
  16. package/dist/5334.js +1 -1
  17. package/dist/5421.js +1 -1
  18. package/dist/5679.js +1 -1
  19. package/dist/5765.js +1 -0
  20. package/dist/6236.js +1 -1
  21. package/dist/6393.js +1 -1
  22. package/dist/6401.js +1 -1
  23. package/dist/6855.js +1 -0
  24. package/dist/7436.js +1 -1
  25. package/dist/7470.js +1 -1
  26. package/dist/7987.js +1 -1
  27. package/dist/8125.js +1 -1
  28. package/dist/8266.js +1 -1
  29. package/dist/8296.js +1 -1
  30. package/dist/885.js +1 -1
  31. package/dist/9243.js +1 -1
  32. package/dist/assets/images/icons/api-group.svg +10 -9
  33. package/dist/assets/images/icons/api-user.svg +9 -6
  34. package/dist/assets/images/icons/comparator.svg +13 -4
  35. package/dist/assets/images/icons/custom.svg +5 -8
  36. package/dist/assets/images/icons/database.svg +28 -11
  37. package/dist/assets/images/icons/db-m.svg +9 -27
  38. package/dist/assets/images/icons/dev.svg +10 -6
  39. package/dist/assets/images/icons/diagram.svg +27 -6
  40. package/dist/assets/images/icons/event.svg +16 -0
  41. package/dist/assets/images/icons/film-movies-icon.svg +3 -13
  42. package/dist/assets/images/icons/finder.svg +9 -6
  43. package/dist/assets/images/icons/i18n.svg +10 -8
  44. package/dist/assets/images/icons/increment.svg +4 -3
  45. package/dist/assets/images/icons/license.svg +6 -0
  46. package/dist/assets/images/icons/log-profile.svg +20 -6
  47. package/dist/assets/images/icons/log.svg +14 -6
  48. package/dist/assets/images/icons/masters.svg +14 -0
  49. package/dist/assets/images/icons/nodes.svg +4 -2
  50. package/dist/assets/images/icons/notes.svg +11 -18
  51. package/dist/assets/images/icons/process_initializers.svg +19 -12
  52. package/dist/assets/images/icons/redis.svg +17 -6
  53. package/dist/assets/images/icons/sandbox.svg +10 -3
  54. package/dist/assets/images/icons/schedulers.svg +7 -11
  55. package/dist/assets/images/icons/secret.svg +12 -6
  56. package/dist/assets/images/icons/systems.svg +7 -8
  57. package/dist/assets/images/icons/testing.svg +11 -3
  58. package/dist/assets/images/icons/third-party.svg +16 -6
  59. package/dist/assets/images/icons/typescript.svg +7 -6
  60. package/dist/assets/images/icons/ui-maker.svg +11 -0
  61. package/dist/assets/images/icons/utility.svg +18 -6
  62. package/dist/assets/images/icons/vulnerability.svg +19 -11
  63. package/dist/assets/images/icons/web.svg +3 -9
  64. package/dist/assets/schema-types/InterfaceProps.ts +8 -0
  65. package/dist/assets/schema-types/types.ts +1358 -140
  66. package/dist/assets/styles/out/styles.css +1 -1
  67. package/dist/assets/styles/out/styles.css.map +1 -1
  68. package/dist/assets/styles/styles.scss +2 -2
  69. package/dist/common.js +1 -1
  70. package/dist/main.js +1 -1
  71. package/dist/primeicons.eot +0 -0
  72. package/dist/primeicons.svg +62 -9
  73. package/dist/primeicons.ttf +0 -0
  74. package/dist/primeicons.woff +0 -0
  75. package/dist/primeicons.woff2 +0 -0
  76. package/dist/styles.css +1 -1
  77. package/license.txt +2 -1
  78. package/main.js +1 -1
  79. package/package.json +5 -4
  80. package/sandbox/assets/schema-types/types.js +179 -9
  81. package/sandbox/package.json +1 -0
  82. package/sandbox/sandbox.js +1 -1
  83. package/src/assets/schema-types/types.ts +1358 -140
  84. package/src/public/dist-db-masters/3rdpartylicenses.txt +1 -1
  85. package/src/public/dist-db-masters/browser/assets/data/mime_types.json +819 -0
  86. package/src/public/dist-db-masters/browser/assets/iframe_test.html +34 -1
  87. package/src/public/dist-db-masters/browser/assets/themes/arya-blue/theme.css +117 -5
  88. package/src/public/dist-db-masters/browser/assets/themes/arya-green/theme.css +117 -5
  89. package/src/public/dist-db-masters/browser/assets/themes/arya-orange/theme.css +117 -5
  90. package/src/public/dist-db-masters/browser/assets/themes/arya-purple/theme.css +117 -5
  91. package/src/public/dist-db-masters/browser/assets/themes/aura-dark-amber/theme.css +174 -2
  92. package/src/public/dist-db-masters/browser/assets/themes/aura-dark-blue/theme.css +174 -2
  93. package/src/public/dist-db-masters/browser/assets/themes/aura-dark-cyan/theme.css +174 -2
  94. package/src/public/dist-db-masters/browser/assets/themes/aura-dark-green/theme.css +174 -2
  95. package/src/public/dist-db-masters/browser/assets/themes/aura-dark-indigo/theme.css +174 -2
  96. package/src/public/dist-db-masters/browser/assets/themes/aura-dark-lime/theme.css +174 -2
  97. package/src/public/dist-db-masters/browser/assets/themes/aura-dark-noir/theme.css +174 -2
  98. package/src/public/dist-db-masters/browser/assets/themes/aura-dark-pink/theme.css +174 -2
  99. package/src/public/dist-db-masters/browser/assets/themes/aura-dark-purple/theme.css +174 -2
  100. package/src/public/dist-db-masters/browser/assets/themes/aura-dark-teal/theme.css +174 -2
  101. package/src/public/dist-db-masters/browser/assets/themes/aura-light-amber/theme.css +174 -2
  102. package/src/public/dist-db-masters/browser/assets/themes/aura-light-blue/theme.css +174 -2
  103. package/src/public/dist-db-masters/browser/assets/themes/aura-light-cyan/theme.css +174 -2
  104. package/src/public/dist-db-masters/browser/assets/themes/aura-light-green/theme.css +174 -2
  105. package/src/public/dist-db-masters/browser/assets/themes/aura-light-indigo/theme.css +174 -2
  106. package/src/public/dist-db-masters/browser/assets/themes/aura-light-lime/theme.css +174 -2
  107. package/src/public/dist-db-masters/browser/assets/themes/aura-light-noir/theme.css +174 -2
  108. package/src/public/dist-db-masters/browser/assets/themes/aura-light-pink/theme.css +174 -2
  109. package/src/public/dist-db-masters/browser/assets/themes/aura-light-purple/theme.css +174 -2
  110. package/src/public/dist-db-masters/browser/assets/themes/aura-light-teal/theme.css +174 -2
  111. package/src/public/dist-db-masters/browser/assets/themes/bootstrap4-dark-blue/theme.css +166 -5
  112. package/src/public/dist-db-masters/browser/assets/themes/bootstrap4-dark-purple/theme.css +166 -5
  113. package/src/public/dist-db-masters/browser/assets/themes/bootstrap4-light-blue/theme.css +166 -5
  114. package/src/public/dist-db-masters/browser/assets/themes/bootstrap4-light-purple/theme.css +166 -5
  115. package/src/public/dist-db-masters/browser/assets/themes/fluent-light/theme.css +117 -5
  116. package/src/public/dist-db-masters/browser/assets/themes/lara-dark-blue/theme.css +173 -1
  117. package/src/public/dist-db-masters/browser/assets/themes/lara-dark-indigo/theme.css +173 -1
  118. package/src/public/dist-db-masters/browser/assets/themes/lara-dark-purple/theme.css +173 -1
  119. package/src/public/dist-db-masters/browser/assets/themes/lara-dark-teal/theme.css +173 -1
  120. package/src/public/dist-db-masters/browser/assets/themes/lara-light-blue/theme.css +222 -1
  121. package/src/public/dist-db-masters/browser/assets/themes/lara-light-indigo/theme.css +222 -1
  122. package/src/public/dist-db-masters/browser/assets/themes/lara-light-purple/theme.css +222 -1
  123. package/src/public/dist-db-masters/browser/assets/themes/lara-light-teal/theme.css +222 -1
  124. package/src/public/dist-db-masters/browser/assets/themes/luna-amber/theme.css +117 -5
  125. package/src/public/dist-db-masters/browser/assets/themes/luna-blue/theme.css +117 -5
  126. package/src/public/dist-db-masters/browser/assets/themes/luna-green/theme.css +117 -5
  127. package/src/public/dist-db-masters/browser/assets/themes/luna-pink/theme.css +117 -5
  128. package/src/public/dist-db-masters/browser/assets/themes/md-dark-deeppurple/theme.css +187 -4
  129. package/src/public/dist-db-masters/browser/assets/themes/md-dark-indigo/theme.css +187 -4
  130. package/src/public/dist-db-masters/browser/assets/themes/md-light-deeppurple/theme.css +187 -4
  131. package/src/public/dist-db-masters/browser/assets/themes/md-light-indigo/theme.css +187 -4
  132. package/src/public/dist-db-masters/browser/assets/themes/mdc-dark-deeppurple/theme.css +187 -4
  133. package/src/public/dist-db-masters/browser/assets/themes/mdc-dark-indigo/theme.css +187 -4
  134. package/src/public/dist-db-masters/browser/assets/themes/mdc-light-deeppurple/theme.css +187 -4
  135. package/src/public/dist-db-masters/browser/assets/themes/mdc-light-indigo/theme.css +187 -4
  136. package/src/public/dist-db-masters/browser/assets/themes/mira/theme.css +117 -5
  137. package/src/public/dist-db-masters/browser/assets/themes/nano/theme.css +117 -5
  138. package/src/public/dist-db-masters/browser/assets/themes/nova/theme.css +117 -5
  139. package/src/public/dist-db-masters/browser/assets/themes/nova-accent/theme.css +117 -5
  140. package/src/public/dist-db-masters/browser/assets/themes/nova-alt/theme.css +117 -5
  141. package/src/public/dist-db-masters/browser/assets/themes/rhea/theme.css +117 -5
  142. package/src/public/dist-db-masters/browser/assets/themes/saga-blue/theme.css +117 -5
  143. package/src/public/dist-db-masters/browser/assets/themes/saga-green/theme.css +117 -5
  144. package/src/public/dist-db-masters/browser/assets/themes/saga-orange/theme.css +117 -5
  145. package/src/public/dist-db-masters/browser/assets/themes/saga-purple/theme.css +117 -5
  146. package/src/public/dist-db-masters/browser/assets/themes/soho-dark/theme.css +117 -5
  147. package/src/public/dist-db-masters/browser/assets/themes/soho-light/theme.css +117 -5
  148. package/src/public/dist-db-masters/browser/assets/themes/tailwind-light/theme.css +117 -5
  149. package/src/public/dist-db-masters/browser/assets/themes/vela-blue/theme.css +117 -5
  150. package/src/public/dist-db-masters/browser/assets/themes/vela-green/theme.css +117 -5
  151. package/src/public/dist-db-masters/browser/assets/themes/vela-orange/theme.css +117 -5
  152. package/src/public/dist-db-masters/browser/assets/themes/vela-purple/theme.css +117 -5
  153. package/src/public/dist-db-masters/browser/assets/themes/viva-dark/theme.css +117 -5
  154. package/src/public/dist-db-masters/browser/assets/themes/viva-light/theme.css +117 -5
  155. package/src/public/dist-db-masters/browser/index.html +2 -0
  156. package/src/public/dist-db-masters/browser/main.js +58 -62
  157. package/src/public/dist-db-masters/browser/polyfills.js +2 -2
  158. package/dist/1840.js +0 -1
  159. package/dist/9208.js +0 -1
  160. package/dist/assets/images/icons/event.png +0 -0
  161. package/dist/assets/images/icons/license.png +0 -0
  162. package/dist/assets/images/icons/masters.png +0 -0
package/dist/5334.js CHANGED
@@ -1 +1 @@
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(8176),m=s(3726),d=s(921),t=s(4946),p=s(5852),u=s(4795),Z=s(7240),v=s(6814);function l(e,g){1&e&&(t.TgZ(0,"a",80)(1,"div",11),t._UZ(2,"img",81),t.TgZ(3,"h1"),t._uU(4,"Licenses"),t.qZA()()())}function h(e,g){1&e&&(t.TgZ(0,"a",82)(1,"div",11),t._UZ(2,"img",83),t.TgZ(3,"h1"),t._uU(4,"Masters"),t.qZA()()())}function f(e,g){1&e&&(t.TgZ(0,"a",84)(1,"div",11),t._UZ(2,"img",85),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,i){this.authCS=n,this.authS=a,this.generalCS=i}ngOnInit(){this.generalCS.setNewTitle("AM - Dashboard")}static \u0275fac=function(a){return new(a||e)(t.Y36(p.D),t.Y36(u.e),t.Y36(Z.b))};static \u0275cmp=t.Xpm({type:e,selectors:[["app-am-welcome"]],decls:190,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",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.png",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/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","javascript:","routerLink","/dashboard/ext-licenses",2,"text-decoration","none"],["src","/assets/images/icons/license.png",1,"mt-3"],["href","javascript:","routerLink","/api-info/db-masters/main",2,"text-decoration","none"],["src","/assets/images/icons/masters.png",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&&(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,5,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,5,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,"Sandbox Settings"),t.qZA()()(),t.TgZ(155,"a",66)(156,"div",11),t._UZ(157,"img",67),t.TgZ(158,"h1"),t._uU(159,"Notes"),t.qZA()()(),t.TgZ(160,"a",68)(161,"div",11),t._UZ(162,"img",69),t.TgZ(163,"h1"),t._uU(164,"Utility Classes"),t.qZA()()(),t.TgZ(165,"a",70)(166,"div",11),t._UZ(167,"img",71),t.TgZ(168,"h1"),t._uU(169,"Database Migration"),t.qZA()()(),t.TgZ(170,"a",72)(171,"div",11),t._UZ(172,"img",73),t.TgZ(173,"h1"),t._uU(174,"Code Finder"),t.qZA()()(),t.TgZ(175,"a",74)(176,"div",11),t._UZ(177,"img",75),t.TgZ(178,"h1"),t._uU(179,"Code Comparator"),t.qZA()()(),t.TgZ(180,"a",76)(181,"div",11),t._UZ(182,"img",77),t.TgZ(183,"h1"),t._uU(184," Auto Increments"),t.qZA()()(),t.TgZ(185,"a",78)(186,"div",11),t._UZ(187,"img",79),t.TgZ(188,"h1"),t._uU(189," Generated Interfaces"),t.qZA()()()()()()()),2&a&&(t.xp6(30),t.Q6J("ngIf",(null==i.authS.backendSettings?null:i.authS.backendSettings.extensions)&&(null==i.authCS.gUser?null:i.authCS.gUser.userType)===i.EUserType.ADMIN),t.xp6(67),t.Q6J("ngIf",null==i.authS.backendSettings?null:i.authS.backendSettings.extensions),t.xp6(37),t.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 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(8176),m=s(3726),d=s(921),t=s(4946),u=s(5852),p=s(4795),v=s(7240),Z=s(6814);function l(e,g){1&e&&(t.TgZ(0,"a",80)(1,"div",11),t._UZ(2,"img",81),t.TgZ(3,"h1"),t._UZ(4,"i",82),t._uU(5," Licenses"),t.qZA()()())}function h(e,g){1&e&&(t.TgZ(0,"a",83)(1,"div",11),t._UZ(2,"img",84),t.TgZ(3,"h1"),t._UZ(4,"i",82),t._uU(5," UI Maker"),t.qZA()()())}function f(e,g){1&e&&(t.TgZ(0,"a",85)(1,"div",11),t._UZ(2,"img",86),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,i){this.authCS=n,this.authS=a,this.generalCS=i}ngOnInit(){this.generalCS.setNewTitle("AM - Dashboard")}static \u0275fac=function(a){return new(a||e)(t.Y36(u.D),t.Y36(p.e),t.Y36(v.b))};static \u0275cmp=t.Xpm({type:e,selectors:[["app-am-welcome"]],decls:190,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",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/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","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&&(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,"Sandbox Settings"),t.qZA()()(),t.TgZ(155,"a",66)(156,"div",11),t._UZ(157,"img",67),t.TgZ(158,"h1"),t._uU(159,"Notes"),t.qZA()()(),t.TgZ(160,"a",68)(161,"div",11),t._UZ(162,"img",69),t.TgZ(163,"h1"),t._uU(164,"Utility Classes"),t.qZA()()(),t.TgZ(165,"a",70)(166,"div",11),t._UZ(167,"img",71),t.TgZ(168,"h1"),t._uU(169,"Database Migration"),t.qZA()()(),t.TgZ(170,"a",72)(171,"div",11),t._UZ(172,"img",73),t.TgZ(173,"h1"),t._uU(174,"Code Finder"),t.qZA()()(),t.TgZ(175,"a",74)(176,"div",11),t._UZ(177,"img",75),t.TgZ(178,"h1"),t._uU(179,"Code Comparator"),t.qZA()()(),t.TgZ(180,"a",76)(181,"div",11),t._UZ(182,"img",77),t.TgZ(183,"h1"),t._uU(184," Auto Increments"),t.qZA()()(),t.TgZ(185,"a",78)(186,"div",11),t._UZ(187,"img",79),t.TgZ(188,"h1"),t._uU(189," Generated Interfaces"),t.qZA()()()()()()()),2&a&&(t.xp6(30),t.Q6J("ngIf",(null==i.authS.backendSettings?null:i.authS.backendSettings.extensions)&&(null==i.authCS.gUser?null:i.authCS.gUser.userType)===i.EUserType.ADMIN),t.xp6(67),t.Q6J("ngIf",null==i.authS.backendSettings?null:i.authS.backendSettings.extensions),t.xp6(37),t.Q6J("ngIf",(null==i.authCS.gUser?null:i.authCS.gUser.userType)===i.EUserType.ADMIN))},dependencies:[r.rH,Z.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})()}}]);
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(8176),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),L=a(6814),f=a(5431),M=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]?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,L.O5,f.iA,z.jx,f.Ei,f.UA,f.Mo,M.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(8176),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(8176),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}};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(8176),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/5765.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[5765],{7595:(Pt,S,l)=>{l.d(S,{G:()=>p});var d=l(5861),t=l(4946),i=l(3157),f=l(328),C=l(6212),g=l(6990),y=l(5085),w=l(1162),xt=l(6925),Mt=l(553),F=l(921),E=l(7629),L=l(7240),D=l(9961),u=l(2189),Z=l(5852),I=l(7414),v=l(2915),P=l(7664),J=l(9862),O=l(5219),R=l(95),G=l(6814),Q=l(7797),T=l(5431),Y=l(7680),k=l(3259),K=l(8057),B=l(1137);const q=["funManFormC"],W=["cloneApiModalC"];function H(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"span",20),t.NdJ("click",function(){t.CHM(e);const r=t.oxw(2);return t.KtG(r.edit())}),t._UZ(1,"i",21),t.qZA()}}function j(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"span",22),t.NdJ("click",function(){t.CHM(e);const r=t.oxw(2);return t.KtG(r.clone())}),t._UZ(1,"i",23),t.qZA()}}function z(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"span",24),t.NdJ("click",function(){t.CHM(e);const r=t.oxw(2);return t.KtG(r.removePermanentDialog())}),t._UZ(1,"i",25),t.qZA()}}function $(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"span")(1,"span",13),t.NdJ("click",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.navigateToTreeView())}),t._UZ(2,"i",14),t.qZA(),t.TgZ(3,"span",15),t.NdJ("click",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.add())}),t._UZ(4,"i",16),t.qZA(),t.YNc(5,H,2,0,"span",17),t.YNc(6,j,2,0,"span",18),t.YNc(7,z,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 V(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(r){t.CHM(e);const c=t.oxw();return t.KtG(c.eventCenterS.group.apisRegex.allCustomApis=r)}),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngModel",e.eventCenterS.group.apisRegex.allCustomApis)("binary",!0)}}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(r){t.CHM(e);const c=t.oxw();return t.KtG(c.eventCenterS.filterInLog.apisRegex.allCustomApis=r)}),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngModel",e.eventCenterS.filterInLog.apisRegex.allCustomApis)("binary",!0)}}function tt(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 et(n,o){1&n&&(t.TgZ(0,"th",39),t._UZ(1,"p-tableHeaderCheckbox"),t.qZA())}function nt(n,o){1&n&&t._UZ(0,"th",37)}function it(n,o){1&n&&(t.TgZ(0,"th"),t._uU(1,"Authorization"),t.qZA())}function st(n,o){1&n&&t._UZ(0,"th")}function ot(n,o){1&n&&t._UZ(0,"th",40)}function at(n,o){if(1&n&&(t.TgZ(0,"tr"),t.YNc(1,et,2,0,"th",35),t.YNc(2,nt,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,it,2,0,"th",5),t.YNc(9,st,1,0,"th",5),t.YNc(10,ot,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 rt(n,o){if(1&n&&(t.TgZ(0,"td"),t._UZ(1,"p-tableCheckbox",44),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("value",e)("pSelectableRow",e)}}function lt(n,o){if(1&n&&(t.TgZ(0,"td",45)(1,"span"),t._uU(2),t.qZA()()),2&n){const e=t.oxw().rowIndex;t.xp6(2),t.Oqu(e+1)}}function ct(n,o){1&n&&(t.TgZ(0,"span",49),t._uU(1,"AM-User"),t.qZA())}function pt(n,o){1&n&&(t.TgZ(0,"span",50),t._uU(1,"No-Access"),t.qZA())}function dt(n,o){1&n&&(t.TgZ(0,"span",51),t._uU(1,"Public"),t.qZA())}function _t(n,o){1&n&&(t.TgZ(0,"span",50),t._uU(1,"DB-User"),t.qZA())}function ut(n,o){1&n&&(t.TgZ(0,"span",50),t._uU(1,"AWS"),t.qZA())}function mt(n,o){1&n&&(t.TgZ(0,"span",50),t._uU(1,"Azure"),t.qZA())}function ft(n,o){1&n&&(t.TgZ(0,"span",50),t._uU(1,"Google"),t.qZA())}function gt(n,o){if(1&n&&(t.TgZ(0,"td"),t.YNc(1,ct,2,0,"span",46),t.YNc(2,pt,2,0,"span",47),t.YNc(3,dt,2,0,"span",48),t.YNc(4,_t,2,0,"span",47),t.YNc(5,ut,2,0,"span",47),t.YNc(6,mt,2,0,"span",47),t.YNc(7,ft,2,0,"span",47),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 ht(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"div")(1,"label",52)(2,"p-checkbox",53),t.NdJ("ngModelChange",function(r){t.CHM(e);const c=t.oxw(2).$implicit;return t.KtG(c.saveResponseInLog=r)})("ngModelChange",function(){t.CHM(e);const r=t.oxw(4);return t.KtG(r.saveResponseInLogCheckData())})("click",function(r){t.CHM(e);const c=t.oxw(4);return t.KtG(c.generalS.stopPropagation(r))}),t.qZA()()()}if(2&n){const e=t.oxw(2).$implicit;t.xp6(2),t.Q6J("ngModel",e.saveResponseInLog)("binary",!0)}}function U(n,o){if(1&n&&(t.TgZ(0,"td"),t.YNc(1,ht,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 Ct=function(){return["/api-info/api-testing/testing"]},N=function(n,o,e){return{at_category:n,at_user:o,at_api:e}};function b(n,o){if(1&n&&(t.TgZ(0,"td")(1,"div",45)(2,"a",54),t.NdJ("click",function(s){return s.stopPropagation()}),t._UZ(3,"i",55),t.qZA()()()),2&n){const e=t.oxw().$implicit,s=t.oxw(2);t.xp6(2),t.Q6J("routerLink",t.DdM(2,Ct))("queryParams",t.kEZ(3,N,s.EAPICategory.CUSTOM_APIS,s.authCS.getUserId(),e._id))}}const vt=function(n,o,e,s){return{get:n,put:o,post:e,delete:s}};function It(n,o){if(1&n&&(t.TgZ(0,"tr",41),t.YNc(1,rt,2,2,"td",5),t.YNc(2,lt,3,1,"td",42),t.TgZ(3,"td")(4,"span",43),t._uU(5),t.qZA()(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td"),t._uU(9),t.qZA(),t.YNc(10,gt,8,7,"td",5),t.YNc(11,U,2,1,"td",5),t.YNc(12,b,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(10,vt,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(2),t.Oqu(e.name),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 Tt(n,o){1&n&&t._UZ(0,"p-progressSpinner",56)}function a(n,o){if(1&n){const e=t.EpF();t.TgZ(0,"div",30)(1,"p-table",31),t.NdJ("selectionChange",function(r){t.CHM(e);const c=t.oxw();return t.KtG(c.selectedRows=r)})("selectionChange",function(r){t.CHM(e);const c=t.oxw();return t.KtG(c.functionSelected(r))})("dblclick",function(r){t.CHM(e);const c=t.oxw();return t.KtG(c.dblClickCustomAPIsGrid(r))}),t.YNc(2,at,11,5,"ng-template",32),t.YNc(3,It,13,15,"ng-template",33),t.qZA(),t.YNc(4,Tt,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=w.iH._id;EUserType=F.dN;BE_HOST_PORT=Mt.N.BE_HOST_PORT;EAPICategory=y.R;FunManFormC;cloneApiModalC;constructor(e,s,r,c,A,_,m,x,M,h,St){this.functionS=e,this.generalS=s,this.notificationS=r,this.navigationCS=c,this.authCS=A,this.constantsS=_,this.eventCenterS=m,this.cd=x,this.router=M,this.http=h,this.confirmationService=St}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*(r){r.length&&(yield e.loadGridData())});return function(r){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,apiAccessType:1},sort:{path:1}};this.showAll&&delete s.find.active,this.subscriptions.push(this.functionS.query(s,"getAuthData=true").subscribe(function(){var r=(0,d.Z)(function*(c){c.success?(e.selectedRows=[],e.rows=c.data||[],e.rowsMap=g.keyBy(e.rows,w.iH._id),e.rowsMapName=g.keyBy(e.rows,w.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 r.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 r of s.rows)-1===s.selectedRows.indexOf(r)&&(r.saveResponseInLog=!1);s.fillData().then(),s.getSelectedRowId()?s.generalS.setNewTitle(s.rowsMap[s.getSelectedRowId()].name,y.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(),r=(yield e.functionS.getById(s).toPromise()).data;r._id?(yield e.navigationCS.setQueryParam(C.p.custom_api,r._id),e.eventCenterS.functions.selectedFunctions.next([r])):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*(r){r&&(yield e.loadGridData()),e.cd.detectChanges()});return function(r){return s.apply(this,arguments)}}())})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}ERequestMethod=xt.Yp;static \u0275fac=function(s){return new(s||n)(t.Y36(E.d),t.Y36(L.b),t.Y36(D.W),t.Y36(u.S),t.Y36(Z.D),t.Y36(I.L),t.Y36(v.u),t.Y36(t.sBO),t.Y36(P.F0),t.Y36(J.eN),t.Y36(O.YP))};static \u0275cmp=t.Xpm({type:n,selectors:[["app-custom-api-grid"]],viewQuery:function(s,r){if(1&s&&(t.Gf(q,5),t.Gf(W,5)),2&s){let c;t.iGM(c=t.CRH())&&(r.FunManFormC=c.first),t.iGM(c=t.CRH())&&(r.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","apiCategory"],["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"],[3,"value","pSelectableRow"],[1,"text-center"],["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,r){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,$,8,3,"span",5),t.YNc(8,V,3,2,"span",6),t.YNc(9,X,3,2,"span",6),t.qZA(),t.TgZ(10,"div",7),t.YNc(11,tt,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",!r.isReadOnly),t.xp6(1),t.Q6J("ngIf",r.isDependentOnGroup),t.xp6(1),t.Q6J("ngIf",r.isFilterLogTable),t.xp6(2),t.Q6J("ngIf",r.eventCenterS.group.apisRegex.allCustomApis||r.eventCenterS.filterInLog.apisRegex.allCustomApis),t.xp6(1),t.Q6J("ngIf",!(r.eventCenterS.group.apisRegex.allCustomApis||r.eventCenterS.filterInLog.apisRegex.allCustomApis)),t.xp6(1),t.Q6J("data",r.data),t.xp6(2),t.Q6J("modalId","idCloneCustomAPI")("hostAndPort",r.BE_HOST_PORT)("apiCategory",r.EAPICategory.CUSTOM_APIS))},dependencies:[P.rH,R.JJ,R.On,G.mk,G.O5,Q.s,T.iA,O.jx,T.Ei,T.UA,T.Mo,Y.G,k.u,K.XZ,B.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:(Pt,S,l)=>{l.r(S),l.d(S,{FunctionManM:()=>Tt});var d=l(7664),t=l(6814),i=l(4946),f=l(5219);let F=(()=>{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 E=l(3726),L=l(8176),D=l(7595),u=l(5861),Z=l(3157),I=l(328),v=l(6212),P=l(5085),J=l(1162),O=l(6925),R=l(553),G=l(921),Q=l(7629),T=l(7240),Y=l(9961),k=l(2189),K=l(5852),B=l(7414),q=l(2915),W=l(9862),H=l(7797),j=l(7526),z=l(7680),$=l(3259),V=l(1137);const X=["funManFormC"],tt=["cloneApiModalC"];function et(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 nt(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 it(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 st(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 ot(a,p){1&a&&(i.TgZ(0,"span",38),i._uU(1,"AM-User"),i.qZA())}function at(a,p){1&a&&(i.TgZ(0,"span",39),i._uU(1,"No-Access"),i.qZA())}function rt(a,p){1&a&&(i.TgZ(0,"span",40),i._uU(1,"Public"),i.qZA())}function lt(a,p){1&a&&(i.TgZ(0,"span",39),i._uU(1,"DB-User"),i.qZA())}function ct(a,p){1&a&&(i.TgZ(0,"span",39),i._uU(1,"AWS"),i.qZA())}function pt(a,p){1&a&&(i.TgZ(0,"span",39),i._uU(1,"Azure"),i.qZA())}function dt(a,p){1&a&&(i.TgZ(0,"span",39),i._uU(1,"Google"),i.qZA())}const _t=function(a,p,n,o){return{get:a,put:p,post:n,delete:o}},ut=function(){return["/api-info/api-testing/testing"]},mt=function(a,p,n){return{at_category:a,at_user:p,at_api:n}};function ft(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"),i._uU(8),i.qZA()(),i.TgZ(9,"td",30),i._uU(10),i.qZA(),i.TgZ(11,"td"),i.YNc(12,ot,2,0,"span",32),i.YNc(13,at,2,0,"span",33),i.YNc(14,rt,2,0,"span",34),i.YNc(15,lt,2,0,"span",33),i.YNc(16,ct,2,0,"span",33),i.YNc(17,pt,2,0,"span",33),i.YNc(18,dt,2,0,"span",33),i.qZA(),i.TgZ(19,"td",35)(20,"a",36),i.NdJ("click",function(o){return o.stopPropagation()}),i._UZ(21,"i",37),i.qZA()()()()()()),2&a){const n=i.oxw().$implicit,o=i.oxw();i.xp6(5),i.Q6J("ngClass",i.l5B(13,_t,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(2),i.Oqu(n.data.name),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(18,ut))("queryParams",i.kEZ(19,mt,o.EAPICategory.CUSTOM_APIS,o.authCS.getUserId(),n.data._id))}}function gt(a,p){if(1&a&&(i.TgZ(0,"div",27),i.YNc(1,st,2,1,"div",28),i.YNc(2,ft,22,23,"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 ht(a,p){1&a&&i._UZ(0,"p-progressSpinner",41)}let U=(()=>{class a{functionS;generalS;notificationS;navigationCS;authCS;constantsS;eventCenterS;cd;router;http;confirmationService;loading={grid:!1};subscriptions=[];data={mode:I.D.ADD,eventChannel:new i.vpe,formData:void 0};gridKey=J.iH._id;EUserType=G.dN;BE_HOST_PORT=R.N.BE_HOST_PORT;EAPICategory=P.R;EQueryParam=v.p;leafSelected=!1;selectedRows=void 0;treeNodes=[];allTreeItemsMap={};FunManFormC;cloneApiModalC;constructor(n,o,e,s,r,c,A,_,m,x,M){this.functionS=n,this.generalS=o,this.notificationS=e,this.navigationCS=s,this.authCS=r,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 r=n.allTreeItemsMap[s];r&&(e[s].expanded=r.expanded)}n.treeNodes=o,n.allTreeItemsMap=e,n.loading.grid=!1,n.cd.detectChanges()})()}add(){this.data.formData=void 0,this.data.mode=I.D.ADD,this.data.eventChannel.emit({action:Z.F.OPEN_FORM_IN_ADD_MODE}),this.FunManFormC.showModal()}edit(){this.leafSelected&&(this.data.formData=this.selectedRows[0].data,this.data.mode=I.D.EDIT,this.data.eventChannel.emit({action:Z.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,P.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=O.Yp;static \u0275fac=function(o){return new(o||a)(i.Y36(Q.d),i.Y36(T.b),i.Y36(Y.W),i.Y36(k.S),i.Y36(K.D),i.Y36(B.L),i.Y36(q.u),i.Y36(i.sBO),i.Y36(d.F0),i.Y36(W.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(X,5),i.Gf(tt,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","apiCategory"],["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"],["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"],[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,et,2,0,"span",9),i.YNc(13,nt,2,0,"span",10),i.YNc(14,it,2,0,"span",11),i.qZA()(),i.TgZ(15,"div",12)(16,"div",13)(17,"p-tree",14),i.NdJ("selectionChange",function(r){return e.selectedRows=r})("dblclick",function(){return e.dblClickCustomAPIsGrid()})("selectionChange",function(){return e.functionSelected()}),i.YNc(18,gt,3,2,"ng-template",15),i.qZA(),i.YNc(19,ht,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","idCloneCustomAPI")("hostAndPort",e.BE_HOST_PORT)("apiCategory",e.EAPICategory.CUSTOM_APIS))},dependencies:[d.rH,t.mk,t.O5,H.s,f.jx,j.mp,z.G,$.u,V.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 Ct=l(7987);const vt=[{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:[U],encapsulation:2})}return a})(),canActivate:[E.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:[D.G],encapsulation:2})}return a})(),canActivate:[E.P]}];let Tt=(()=>{class a{static \u0275fac=function(o){return new(o||a)};static \u0275mod=i.oAB({type:a});static \u0275inj=i.cJS({imports:[d.Bz.forChild(vt),L.u,Ct.X,F]})}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),z=s(6814),R=s(2660),b=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,_){1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",29),e._uU(2," Edit Process Initializer"),e.qZA())}function w(i,_){1&i&&(e.TgZ(0,"span",38),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",30)(2,"div",31)(3,"label",32),e._uU(4,"Name"),e.qZA(),e.TgZ(5,"div",33),e._UZ(6,"input",34),e.YNc(7,w,2,0,"span",35),e.qZA()(),e.TgZ(8,"div",31)(9,"label",32),e._uU(10,"Order"),e.qZA(),e.TgZ(11,"div",33),e._UZ(12,"input",36),e.qZA()(),e.TgZ(13,"div",31)(14,"label",32),e._uU(15,"Timeout in minutes"),e.qZA(),e.TgZ(16,"div",33),e._UZ(17,"input",37),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",39)(1,"app-monaco-editor",40),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",41),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",42),e.NdJ("click",function(){e.CHM(o);const t=e.oxw();return e.KtG(t.save())}),e._UZ(1,"i",43),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",44)}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={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,"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,3,0,"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,z.O5,R.y,b.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(8176),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),z=s(6814),R=s(2660),b=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={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,z.O5,R.y,b.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(8176),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})()}}]);
package/dist/6393.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[6393],{6393:(ae,v,r)=>{r.r(v),r.d(v,{AdminUserM:()=>te});var b=r(7664),E=r(8176),e=r(4946),m=r(5861),c=r(3157),p=r(328),f=r(6212),M=r(6990),u=r(921),h=r(1162),U=r(3835),C=r(7240),A=r(9961),Z=r(5219),x=r(2189),y=r(204),N=r(2915),S=r(6814),_=r(5431),D=r(7680),P=r(3259),o=r(95),T=r(553),O=r(5852),R=r(2660);function Y(n,l){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",22),e._uU(2," Add User"),e.qZA())}function k(n,l){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",23),e._uU(2," View User"),e.qZA())}function J(n,l){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",24),e._uU(2," Edit User"),e.qZA())}function Q(n,l){1&n&&(e.TgZ(0,"div",10)(1,"label",11),e._uU(2,"Password"),e.qZA(),e.TgZ(3,"div",12),e._UZ(4,"input",25),e.qZA()())}function V(n,l){1&n&&(e.TgZ(0,"span"),e._uU(1,"Save User"),e.qZA())}function q(n,l){1&n&&(e.TgZ(0,"span"),e._uU(1,"Update User"),e.qZA())}function G(n,l){if(1&n){const t=e.EpF();e.TgZ(0,"button",26),e.NdJ("click",function(){e.CHM(t);const a=e.oxw();return e.KtG(a.save())}),e._UZ(1,"i",27),e.YNc(2,V,2,0,"span",4),e.YNc(3,q,2,0,"span",4),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("disabled",t.form.invalid),e.xp6(2),e.Q6J("ngIf",t.data.mode===t.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",t.data.mode===t.EFormMode.EDIT)}}function W(n,l){1&n&&e._UZ(0,"p-progressSpinner",28)}let w=(()=>{class n{fb;ns;userS;generalS;constantsCS;authCS;data;loading={form:!1};EFormMode=p.D;form;subscriptions=[];constructor(t,s,a,i,d,g){this.fb=t,this.ns=s,this.userS=a,this.generalS=i,this.constantsCS=d,this.authCS=g}ngOnInit(){var t=this;this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var s=(0,m.Z)(function*(a){if(a)if(t.form.enable(),a.action===c.F.OPEN_FORM_IN_EDIT_MODE){const i=yield t.userS.getById(t.data.formData._id).toPromise();t.form.reset(),t.form.patchValue(i.data),t.form.get("password").setValidators([]),t.form.get("password").updateValueAndValidity()}else if(a.action===c.F.OPEN_FORM_IN_VIEW_MODE){const i=yield t.userS.getById(t.data.formData._id).toPromise();t.form.reset(),t.form.patchValue(i.data),t.form.disable()}else a.action===c.F.OPEN_FORM_IN_ADD_MODE&&(t.form.reset(),t.form.get("password").setValidators([o.kI.required,o.kI.minLength(4),o.kI.maxLength(40)]),t.form.get("password").updateValueAndValidity())});return function(a){return s.apply(this,arguments)}}()))}createForm(){this.form=this.fb.group({name:[null,[o.kI.required]],email:[null,[o.kI.required,o.kI.email]],apiPath:[null,[o.kI.required,o.kI.minLength(3),o.kI.maxLength(25),o.kI.pattern("[a-z0-9]*")]],password:[null,[]]})}showModal(){$("#idAMUsersForm").modal("show")}hideModal(){$("#idAMUsersForm").modal("hide")}save(){var t=this;return(0,m.Z)(function*(){const s=t.form.getRawValue();s.user=t.authCS.getUserId(),s.userType=u.dN.ADMIN;try{let a;t.loading.form=!0,t.data.mode===p.D.ADD?(s.password=t.generalS.getEncryptedString(s.password,T.N.crypto.passCommunication),a=yield t.userS.post(s).toPromise(),t.ns.showSuccess(t.constantsCS.user.addSuccess)):t.data.mode===p.D.EDIT&&(t.data.formData._id&&(s.userType=t.data.formData.userType,t.form.get("password").value?s.password=t.generalS.getEncryptedString(s.password,T.N.crypto.passCommunication):delete s.password),a=yield t.userS.put(t.data.formData._id,s,{select:h.iH._id}).toPromise(),t.ns.showSuccess(t.constantsCS.user.editSuccess)),t.data.eventChannel.emit({action:t.data.mode===p.D.ADD?c.F.SAVED:c.F.UPDATED}),t.loading.form=!1}catch(a){t.loading.form=!1,t.ns.showErrorFromResponse(a.error||a,"Unable to save user info.")}})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(s){return new(s||n)(e.Y36(o.qu),e.Y36(A.W),e.Y36(U.K),e.Y36(C.b),e.Y36(y.s),e.Y36(O.D))};static \u0275cmp=e.Xpm({type:n,selectors:[["app-w-admin-user-form"]],inputs:{data:"data"},decls:34,vars:7,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idAMUsersForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body","overflow-auto"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-6"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm"],["formControlName","email","name","email","spellcheck","false","type","text","placeholder","Please provide email",1,"form-control","form-control-sm"],["class","form-group row",4,"ngIf"],["formControlName","apiPath","name","apiPath","spellcheck","false","type","text","placeholder","Please provide api path",1,"form-control","text-lowercase","form-control-sm"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[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"],[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"],["formControlName","password","name","password","spellcheck","false","type","password","placeholder","Please provide password",1,"form-control","form-control-sm"],["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(s,a){1&s&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,Y,3,0,"span",4),e.YNc(5,k,3,0,"span",4),e.YNc(6,J,3,0,"span",4),e.TgZ(7,"button",5)(8,"span",6),e._UZ(9,"i",7),e.qZA()()(),e.TgZ(10,"div",8)(11,"form",9)(12,"div",10)(13,"label",11),e._uU(14,"Name"),e.qZA(),e.TgZ(15,"div",12),e._UZ(16,"input",13),e.qZA()(),e.TgZ(17,"div",10)(18,"label",11),e._uU(19,"Email"),e.qZA(),e.TgZ(20,"div",12),e._UZ(21,"input",14),e.qZA()(),e.YNc(22,Q,5,0,"div",15),e.TgZ(23,"div",10)(24,"label",11),e._uU(25,"API Path"),e.qZA(),e.TgZ(26,"div",12),e._UZ(27,"input",16),e.qZA()()()(),e.TgZ(28,"div",17)(29,"button",18),e._UZ(30,"i",19),e._uU(31," Close"),e.qZA(),e.YNc(32,G,4,3,"button",20),e.qZA(),e.YNc(33,W,1,0,"p-progressSpinner",21),e.qZA()()()),2&s&&(e.xp6(4),e.Q6J("ngIf",a.data.mode===a.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",a.data.mode===a.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",a.data.mode===a.EFormMode.EDIT),e.xp6(5),e.Q6J("formGroup",a.form),e.xp6(11),e.Q6J("ngIf",a.data.mode!==a.EFormMode.VIEW),e.xp6(10),e.Q6J("ngIf",a.data.mode!==a.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",a.loading.form))},dependencies:[o._Y,o.Fj,o.JJ,o.JL,o.sg,o.u,S.O5,R.y,D.G],encapsulation:2})}return n})();const K=["adminUserFormC"];function H(n,l){if(1&n){const t=e.EpF();e.TgZ(0,"span",14),e.NdJ("click",function(){e.CHM(t);const a=e.oxw();return e.KtG(a.edit())}),e._UZ(1,"i",15),e.qZA()}}function L(n,l){if(1&n){const t=e.EpF();e.TgZ(0,"span",16),e.NdJ("click",function(){e.CHM(t);const a=e.oxw();return e.KtG(a.removePermanentDialog())}),e._UZ(1,"i",17),e.qZA()}}function B(n,l){1&n&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Name"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Email"),e.qZA(),e.TgZ(5,"th"),e._uU(6,"API Path"),e.qZA()())}function j(n,l){if(1&n&&(e.TgZ(0,"tr",18)(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()()),2&n){const t=l.$implicit;e.Q6J("pSelectableRow",t),e.xp6(2),e.Oqu(t.name),e.xp6(2),e.Oqu(t.email),e.xp6(2),e.Oqu(t.apiPath)}}function X(n,l){1&n&&e._UZ(0,"p-progressSpinner",19)}let I=(()=>{class n{userS;generalS;notificationS;confirmationService;navigationCS;constantsCS;eventCenterS;loading={grid:!1};subscriptions=[];data={mode:p.D.ADD,eventChannel:new e.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;selectedRows=[];gridKey=h.iH._id;adminUserFormC;constructor(t,s,a,i,d,g,se){this.userS=t,this.generalS=s,this.notificationS=a,this.confirmationService=i,this.navigationCS=d,this.constantsCS=g,this.eventCenterS=se}ngOnInit(){this.eventCenterS.user.selectedUsers.next([]),this.loadGridData(),this.subscriptions.push(this.data.eventChannel.subscribe(t=>{(t.action===c.F.SAVED||t.action===c.F.UPDATED)&&(this.adminUserFormC.hideModal(),this.loadGridData())}))}loadGridData(){var t=this;this.loading.grid=!0;const s={find:{active:!0,userType:{$in:[u.dN.ROOT,u.dN.ADMIN]}},select:{name:1,email:1,apiPath:1,active:1,userType:1}};this.showAll&&delete s.find.active,this.subscriptions.push(this.userS.query(s).subscribe(function(){var a=(0,m.Z)(function*(i){i.success&&(t.selectedRows=[],t.rows=i.data,t.rowsMap=M.keyBy(t.rows,h.iH._id));const d=t.navigationCS.getQueryParam(f.p.user);t.rowsMap[d]&&(t.eventCenterS.user.selectedUsers.next([t.rowsMap[d]]),t.selectedRows=[t.rowsMap[d]],yield t.fillData()),t.loading.grid=!1});return function(i){return a.apply(this,arguments)}}()))}add(){this.data.formData=void 0,this.data.mode=p.D.ADD,this.data.eventChannel.emit({action:c.F.OPEN_FORM_IN_ADD_MODE}),this.adminUserFormC.showModal()}view(){this.data.formData=this.selectedRows[0],this.data.mode=p.D.VIEW,this.data.eventChannel.emit({action:c.F.OPEN_FORM_IN_VIEW_MODE}),this.adminUserFormC.showModal()}edit(){this.data.formData=this.selectedRows[0],this.data.mode=p.D.EDIT,this.data.eventChannel.emit({action:c.F.OPEN_FORM_IN_EDIT_MODE}),this.adminUserFormC.showModal()}removePermanentDialog(){var t=this;return(0,m.Z)(function*(){var s;t.confirmationService.confirm({message:t.constantsCS.user.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(s=(0,m.Z)(function*(){yield t.removePermanent()}),function(){return s.apply(this,arguments)})})})()}removePermanent(){var t=this;return(0,m.Z)(function*(){t.loading.grid=!0;const s=yield t.userS.permanentDelete(t.selectedRows[0]._id).toPromise();t.loading.grid=!1,s.success?(t.notificationS.showSuccess(t.constantsCS.user.removePermanent),t.resetSelectedRows(),t.loadGridData()):t.notificationS.showErrorFromResponse(s,t.constantsCS.user.removePermanentError)})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.user.selectedUsers.next([])}resetDependents(){var t=this;return(0,m.Z)(function*(){t.eventCenterS.user.selectedUsers.next([]),yield t.navigationCS.setQueryParam(f.p.user,null)})()}adminUserSelected(t){var s=this;return(0,m.Z)(function*(){s.selectedRows=t,s.resetDependents(),s.fillData()})()}fillData(){var t=this;return(0,m.Z)(function*(){if(!t.selectedRows.length)return yield t.navigationCS.setQueryParam(f.p.user,""),void t.eventCenterS.user.selectedUsers.next([]);const s=(yield t.userS.getById(t.selectedRows[0]._id).toPromise()).data;s._id?(yield t.navigationCS.setQueryParam(f.p.user,s._id),t.eventCenterS.user.selectedUsers.next([s])):t.resetDependents()})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickUsers(){this.selectedRows.length&&this.edit()}static \u0275fac=function(s){return new(s||n)(e.Y36(U.K),e.Y36(C.b),e.Y36(A.W),e.Y36(Z.YP),e.Y36(x.S),e.Y36(y.s),e.Y36(N.u))};static \u0275cmp=e.Xpm({type:n,selectors:[["app-w-admin-users"]],viewQuery:function(s,a){if(1&s&&e.Gf(K,5),2&s){let i;e.iGM(i=e.CRH())&&(a.adminUserFormC=i.first)}},decls:16,vars:10,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],[1,"fas","fa-users","text-info","fa-fw","mr-1"],["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","Make Inactive",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"],[3,"data"],["adminUserFormC",""],["pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["pTooltip","Make Inactive",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,a){1&s&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"i",2),e._uU(4," Users"),e.qZA(),e.TgZ(5,"span",3),e.NdJ("click",function(){return a.add()}),e._UZ(6,"i",4),e.qZA(),e.YNc(7,H,2,0,"span",5),e.YNc(8,L,2,0,"span",6),e.qZA(),e.TgZ(9,"div",7)(10,"p-table",8),e.NdJ("selectionChange",function(d){return a.selectedRows=d})("dblclick",function(){return a.dblClickUsers()})("selectionChange",function(d){return a.adminUserSelected(d)}),e.YNc(11,B,7,0,"ng-template",9),e.YNc(12,j,7,4,"ng-template",10),e.qZA(),e.YNc(13,X,1,0,"p-progressSpinner",11),e.qZA()(),e._UZ(14,"app-w-admin-user-form",12,13)),2&s&&(e.xp6(7),e.Q6J("ngIf",a.selectedRows.length),e.xp6(1),e.Q6J("ngIf",a.selectedRows.length),e.xp6(2),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",a.selectedRows)("dataKey",a.gridKey)("scrollable",!0)("value",a.rows),e.xp6(3),e.Q6J("ngIf",a.loading.grid),e.xp6(1),e.Q6J("data",a.data))},dependencies:[S.O5,_.iA,Z.jx,_.Ei,D.G,P.u,w],encapsulation:2})}return n})();const ee=[{path:"",component:(()=>{class n{constructor(){}ngOnInit(){}static \u0275fac=function(s){return new(s||n)};static \u0275cmp=e.Xpm({type:n,selectors:[["app-admin-user-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1"],[1,"w-100"]],template:function(s,a){1&s&&(e.TgZ(0,"div",0),e._UZ(1,"app-w-admin-users",1),e.qZA())},dependencies:[I],encapsulation:2})}return n})(),canActivate:[r(1490).g]}];let te=(()=>{class n{static \u0275fac=function(s){return new(s||n)};static \u0275mod=e.oAB({type:n});static \u0275inj=e.cJS({imports:[b.Bz.forChild(ee),E.u]})}return n})()}}]);
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[6393],{6393:(ae,v,r)=>{r.r(v),r.d(v,{AdminUserM:()=>te});var b=r(7664),E=r(8176),e=r(4946),m=r(5861),c=r(3157),p=r(328),f=r(6212),M=r(6990),u=r(921),h=r(1162),U=r(3835),C=r(7240),A=r(9961),Z=r(5219),x=r(2189),y=r(204),N=r(2915),S=r(6814),_=r(5431),D=r(7680),P=r(3259),o=r(95),T=r(553),O=r(5852),R=r(2660);function Y(n,l){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",22),e._uU(2," Add User"),e.qZA())}function k(n,l){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",23),e._uU(2," View User"),e.qZA())}function J(n,l){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",24),e._uU(2," Edit User"),e.qZA())}function Q(n,l){1&n&&(e.TgZ(0,"div",10)(1,"label",11),e._uU(2,"Password"),e.qZA(),e.TgZ(3,"div",12),e._UZ(4,"input",25),e.qZA()())}function V(n,l){1&n&&(e.TgZ(0,"span"),e._uU(1,"Save User"),e.qZA())}function q(n,l){1&n&&(e.TgZ(0,"span"),e._uU(1,"Update User"),e.qZA())}function G(n,l){if(1&n){const t=e.EpF();e.TgZ(0,"button",26),e.NdJ("click",function(){e.CHM(t);const a=e.oxw();return e.KtG(a.save())}),e._UZ(1,"i",27),e.YNc(2,V,2,0,"span",4),e.YNc(3,q,2,0,"span",4),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("disabled",t.form.invalid),e.xp6(2),e.Q6J("ngIf",t.data.mode===t.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",t.data.mode===t.EFormMode.EDIT)}}function W(n,l){1&n&&e._UZ(0,"p-progressSpinner",28)}let w=(()=>{class n{fb;ns;userS;generalS;constantsCS;authCS;data;loading={form:!1};EFormMode=p.D;form;subscriptions=[];constructor(t,s,a,i,d,g){this.fb=t,this.ns=s,this.userS=a,this.generalS=i,this.constantsCS=d,this.authCS=g}ngOnInit(){var t=this;this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var s=(0,m.Z)(function*(a){if(a)if(t.form.enable(),a.action===c.F.OPEN_FORM_IN_EDIT_MODE){const i=yield t.userS.getById(t.data.formData._id).toPromise();t.form.reset(),t.form.patchValue(i.data),t.form.get("password").setValidators([]),t.form.get("password").updateValueAndValidity()}else if(a.action===c.F.OPEN_FORM_IN_VIEW_MODE){const i=yield t.userS.getById(t.data.formData._id).toPromise();t.form.reset(),t.form.patchValue(i.data),t.form.disable()}else a.action===c.F.OPEN_FORM_IN_ADD_MODE&&(t.form.reset(),t.form.get("password").setValidators([o.kI.required,o.kI.minLength(4),o.kI.maxLength(40)]),t.form.get("password").updateValueAndValidity())});return function(a){return s.apply(this,arguments)}}()))}createForm(){this.form=this.fb.group({name:[null,[o.kI.required]],email:[null,[o.kI.required,o.kI.email]],apiPath:[null,[o.kI.required,o.kI.minLength(3),o.kI.maxLength(25),o.kI.pattern("[a-z0-9]*")]],password:[null,[]]})}showModal(){$("#idAMUsersForm").modal("show")}hideModal(){$("#idAMUsersForm").modal("hide")}save(){var t=this;return(0,m.Z)(function*(){const s=t.form.getRawValue();s.user=t.authCS.getUserId(),s.userType=u.dN.ADMIN;try{let a;t.loading.form=!0,t.data.mode===p.D.ADD?(s.password=t.generalS.getEncryptedString(s.password,T.N.crypto.passCommunication),a=yield t.userS.post(s).toPromise(),t.ns.showSuccess(t.constantsCS.user.addSuccess)):t.data.mode===p.D.EDIT&&(t.data.formData._id&&(s.userType=t.data.formData.userType,t.form.get("password").value?s.password=t.generalS.getEncryptedString(s.password,T.N.crypto.passCommunication):delete s.password),a=yield t.userS.put(t.data.formData._id,s,{select:h.iH._id}).toPromise(),t.ns.showSuccess(t.constantsCS.user.editSuccess)),t.data.eventChannel.emit({action:t.data.mode===p.D.ADD?c.F.SAVED:c.F.UPDATED}),t.loading.form=!1}catch(a){t.loading.form=!1,t.ns.showErrorFromResponse(a.error||a,"Unable to save user info.")}})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(s){return new(s||n)(e.Y36(o.qu),e.Y36(A.W),e.Y36(U.K),e.Y36(C.b),e.Y36(y.s),e.Y36(O.D))};static \u0275cmp=e.Xpm({type:n,selectors:[["app-w-admin-user-form"]],inputs:{data:"data"},decls:34,vars:7,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idAMUsersForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body","overflow-auto"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-6"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm"],["formControlName","email","name","email","spellcheck","false","type","text","placeholder","Please provide email",1,"form-control","form-control-sm"],["class","form-group row",4,"ngIf"],["formControlName","apiPath","name","apiPath","spellcheck","false","type","text","placeholder","Please provide api path",1,"form-control","text-lowercase","form-control-sm"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[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"],[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"],["formControlName","password","name","password","spellcheck","false","type","password","placeholder","Please provide password",1,"form-control","form-control-sm"],["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(s,a){1&s&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,Y,3,0,"span",4),e.YNc(5,k,3,0,"span",4),e.YNc(6,J,3,0,"span",4),e.TgZ(7,"button",5)(8,"span",6),e._UZ(9,"i",7),e.qZA()()(),e.TgZ(10,"div",8)(11,"form",9)(12,"div",10)(13,"label",11),e._uU(14,"Name"),e.qZA(),e.TgZ(15,"div",12),e._UZ(16,"input",13),e.qZA()(),e.TgZ(17,"div",10)(18,"label",11),e._uU(19,"Email"),e.qZA(),e.TgZ(20,"div",12),e._UZ(21,"input",14),e.qZA()(),e.YNc(22,Q,5,0,"div",15),e.TgZ(23,"div",10)(24,"label",11),e._uU(25,"API Path"),e.qZA(),e.TgZ(26,"div",12),e._UZ(27,"input",16),e.qZA()()()(),e.TgZ(28,"div",17)(29,"button",18),e._UZ(30,"i",19),e._uU(31," Close"),e.qZA(),e.YNc(32,G,4,3,"button",20),e.qZA(),e.YNc(33,W,1,0,"p-progressSpinner",21),e.qZA()()()),2&s&&(e.xp6(4),e.Q6J("ngIf",a.data.mode===a.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",a.data.mode===a.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",a.data.mode===a.EFormMode.EDIT),e.xp6(5),e.Q6J("formGroup",a.form),e.xp6(11),e.Q6J("ngIf",a.data.mode!==a.EFormMode.VIEW),e.xp6(10),e.Q6J("ngIf",a.data.mode!==a.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",a.loading.form))},dependencies:[o._Y,o.Fj,o.JJ,o.JL,o.sg,o.u,S.O5,R.y,D.G],encapsulation:2})}return n})();const K=["adminUserFormC"];function H(n,l){if(1&n){const t=e.EpF();e.TgZ(0,"span",14),e.NdJ("click",function(){e.CHM(t);const a=e.oxw();return e.KtG(a.edit())}),e._UZ(1,"i",15),e.qZA()}}function L(n,l){if(1&n){const t=e.EpF();e.TgZ(0,"span",16),e.NdJ("click",function(){e.CHM(t);const a=e.oxw();return e.KtG(a.removePermanentDialog())}),e._UZ(1,"i",17),e.qZA()}}function B(n,l){1&n&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Name"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Email"),e.qZA(),e.TgZ(5,"th"),e._uU(6,"API Path"),e.qZA()())}function j(n,l){if(1&n&&(e.TgZ(0,"tr",18)(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()()),2&n){const t=l.$implicit;e.Q6J("pSelectableRow",t),e.xp6(2),e.Oqu(t.name),e.xp6(2),e.Oqu(t.email),e.xp6(2),e.Oqu(t.apiPath)}}function X(n,l){1&n&&e._UZ(0,"p-progressSpinner",19)}let I=(()=>{class n{userS;generalS;notificationS;confirmationService;navigationCS;constantsCS;eventCenterS;loading={grid:!1};subscriptions=[];data={mode:p.D.ADD,eventChannel:new e.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;selectedRows=[];gridKey=h.iH._id;adminUserFormC;constructor(t,s,a,i,d,g,se){this.userS=t,this.generalS=s,this.notificationS=a,this.confirmationService=i,this.navigationCS=d,this.constantsCS=g,this.eventCenterS=se}ngOnInit(){this.eventCenterS.user.selectedUsers.next([]),this.loadGridData(),this.subscriptions.push(this.data.eventChannel.subscribe(t=>{(t.action===c.F.SAVED||t.action===c.F.UPDATED)&&(this.adminUserFormC.hideModal(),this.loadGridData())}))}loadGridData(){var t=this;this.loading.grid=!0;const s={find:{active:!0,userType:{$in:[u.dN.ROOT,u.dN.ADMIN]}},select:{name:1,email:1,apiPath:1,active:1,userType:1},sort:{name:1}};this.showAll&&delete s.find.active,this.subscriptions.push(this.userS.query(s).subscribe(function(){var a=(0,m.Z)(function*(i){i.success&&(t.selectedRows=[],t.rows=i.data,t.rowsMap=M.keyBy(t.rows,h.iH._id));const d=t.navigationCS.getQueryParam(f.p.user);t.rowsMap[d]&&(t.eventCenterS.user.selectedUsers.next([t.rowsMap[d]]),t.selectedRows=[t.rowsMap[d]],yield t.fillData()),t.loading.grid=!1});return function(i){return a.apply(this,arguments)}}()))}add(){this.data.formData=void 0,this.data.mode=p.D.ADD,this.data.eventChannel.emit({action:c.F.OPEN_FORM_IN_ADD_MODE}),this.adminUserFormC.showModal()}view(){this.data.formData=this.selectedRows[0],this.data.mode=p.D.VIEW,this.data.eventChannel.emit({action:c.F.OPEN_FORM_IN_VIEW_MODE}),this.adminUserFormC.showModal()}edit(){this.data.formData=this.selectedRows[0],this.data.mode=p.D.EDIT,this.data.eventChannel.emit({action:c.F.OPEN_FORM_IN_EDIT_MODE}),this.adminUserFormC.showModal()}removePermanentDialog(){var t=this;return(0,m.Z)(function*(){var s;t.confirmationService.confirm({message:t.constantsCS.user.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(s=(0,m.Z)(function*(){yield t.removePermanent()}),function(){return s.apply(this,arguments)})})})()}removePermanent(){var t=this;return(0,m.Z)(function*(){t.loading.grid=!0;const s=yield t.userS.permanentDelete(t.selectedRows[0]._id).toPromise();t.loading.grid=!1,s.success?(t.notificationS.showSuccess(t.constantsCS.user.removePermanent),t.resetSelectedRows(),t.loadGridData()):t.notificationS.showErrorFromResponse(s,t.constantsCS.user.removePermanentError)})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.user.selectedUsers.next([])}resetDependents(){var t=this;return(0,m.Z)(function*(){t.eventCenterS.user.selectedUsers.next([]),yield t.navigationCS.setQueryParam(f.p.user,null)})()}adminUserSelected(t){var s=this;return(0,m.Z)(function*(){s.selectedRows=t,s.resetDependents(),s.fillData()})()}fillData(){var t=this;return(0,m.Z)(function*(){if(!t.selectedRows.length)return yield t.navigationCS.setQueryParam(f.p.user,""),void t.eventCenterS.user.selectedUsers.next([]);const s=(yield t.userS.getById(t.selectedRows[0]._id).toPromise()).data;s._id?(yield t.navigationCS.setQueryParam(f.p.user,s._id),t.eventCenterS.user.selectedUsers.next([s])):t.resetDependents()})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickUsers(){this.selectedRows.length&&this.edit()}static \u0275fac=function(s){return new(s||n)(e.Y36(U.K),e.Y36(C.b),e.Y36(A.W),e.Y36(Z.YP),e.Y36(x.S),e.Y36(y.s),e.Y36(N.u))};static \u0275cmp=e.Xpm({type:n,selectors:[["app-w-admin-users"]],viewQuery:function(s,a){if(1&s&&e.Gf(K,5),2&s){let i;e.iGM(i=e.CRH())&&(a.adminUserFormC=i.first)}},decls:16,vars:10,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],[1,"fas","fa-users","text-info","fa-fw","mr-1"],["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","Make Inactive",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"],[3,"data"],["adminUserFormC",""],["pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["pTooltip","Make Inactive",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,a){1&s&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"i",2),e._uU(4," Users"),e.qZA(),e.TgZ(5,"span",3),e.NdJ("click",function(){return a.add()}),e._UZ(6,"i",4),e.qZA(),e.YNc(7,H,2,0,"span",5),e.YNc(8,L,2,0,"span",6),e.qZA(),e.TgZ(9,"div",7)(10,"p-table",8),e.NdJ("selectionChange",function(d){return a.selectedRows=d})("dblclick",function(){return a.dblClickUsers()})("selectionChange",function(d){return a.adminUserSelected(d)}),e.YNc(11,B,7,0,"ng-template",9),e.YNc(12,j,7,4,"ng-template",10),e.qZA(),e.YNc(13,X,1,0,"p-progressSpinner",11),e.qZA()(),e._UZ(14,"app-w-admin-user-form",12,13)),2&s&&(e.xp6(7),e.Q6J("ngIf",a.selectedRows.length),e.xp6(1),e.Q6J("ngIf",a.selectedRows.length),e.xp6(2),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",a.selectedRows)("dataKey",a.gridKey)("scrollable",!0)("value",a.rows),e.xp6(3),e.Q6J("ngIf",a.loading.grid),e.xp6(1),e.Q6J("data",a.data))},dependencies:[S.O5,_.iA,Z.jx,_.Ei,D.G,P.u,w],encapsulation:2})}return n})();const ee=[{path:"",component:(()=>{class n{constructor(){}ngOnInit(){}static \u0275fac=function(s){return new(s||n)};static \u0275cmp=e.Xpm({type:n,selectors:[["app-admin-user-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1"],[1,"w-100"]],template:function(s,a){1&s&&(e.TgZ(0,"div",0),e._UZ(1,"app-w-admin-users",1),e.qZA())},dependencies:[I],encapsulation:2})}return n})(),canActivate:[r(1490).g]}];let te=(()=>{class n{static \u0275fac=function(s){return new(s||n)};static \u0275mod=e.oAB({type:n});static \u0275inj=e.cJS({imports:[b.Bz.forChild(ee),E.u]})}return n})()}}]);