@sava-info-systems/api-maker-with-extensions 1.19.3 → 1.19.4

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 (116) hide show
  1. package/dist/1025.ad3d7fe2972421a7.js +1 -0
  2. package/dist/1097.f7edc9a254293cbe.js +1 -0
  3. package/dist/148.3d1172921fc38628.js +1 -0
  4. package/dist/1558.d77067ef3989dc57.js +1 -0
  5. package/dist/{1351.48e08341fba9b889.js → 1617.cd35a3a268fd8f90.js} +1 -1
  6. package/dist/1678.2c6fe869dc9df280.js +1 -0
  7. package/dist/1754.616b92791d39dab1.js +1 -0
  8. package/dist/1928.a299b3986d670379.js +1 -0
  9. package/dist/1957.cafa315c70f23efe.js +1 -0
  10. package/dist/2140.82e389d21656cd83.js +1 -0
  11. package/dist/2295.b066a00a7c4c4d9c.js +1 -0
  12. package/dist/238.6207cf874f0ff82a.js +1 -0
  13. package/dist/2473.6a522dcf87dfb922.js +1 -0
  14. package/dist/2714.1ed8bfd73f5693eb.js +1 -0
  15. package/dist/{3611.9577d58af5f1f4aa.js → 2735.880b4c038ef3207e.js} +1 -1
  16. package/dist/2908.c7cbde300e1840a4.js +1 -0
  17. package/dist/3081.e470a8aeed4a7745.js +1 -0
  18. package/dist/3139.7a6ebcaa6a5f38f6.js +1 -0
  19. package/dist/3450.68d8d179c9496764.js +1 -0
  20. package/dist/4110.1747a68dfaacbbd8.js +1 -0
  21. package/dist/4186.601304798e909236.js +1 -0
  22. package/dist/4211.b7a72c8db8263edf.js +1 -0
  23. package/dist/4575.987834c6e73af961.js +1 -0
  24. package/dist/4842.f89ded9e1e9f1110.js +1 -0
  25. package/dist/485.b333cf63f954b75c.js +1 -0
  26. package/dist/4895.95e42b567a89ce84.js +1 -0
  27. package/dist/5249.52aa732ef6a173c5.js +1 -0
  28. package/dist/5334.8ed5b236a6948681.js +1 -0
  29. package/dist/5421.e729ed3585afa9af.js +1 -0
  30. package/dist/5679.53292305f1448567.js +1 -0
  31. package/dist/5761.c363fe26244e8787.js +1 -0
  32. package/dist/5765.e70cd773673bfe27.js +1 -0
  33. package/dist/6236.b81e95926f7fcd60.js +1 -0
  34. package/dist/6393.1323e8b7d2cdae70.js +1 -0
  35. package/dist/6401.02e5b3cb94d0322a.js +1 -0
  36. package/dist/{8970.8eece52bbc1c316c.js → 6925.d59cabb0e343d24c.js} +1 -1
  37. package/dist/7368.4c04430d3efc5947.js +1 -0
  38. package/dist/{2442.adbc5b49349bb569.js → 7436.7e4876b9e90efde6.js} +1 -1
  39. package/dist/7470.9195bddaee5202e0.js +1 -0
  40. package/dist/7649.870e05f3aa978078.js +1 -0
  41. package/dist/7975.dbe6e674c50ab553.js +1 -0
  42. package/dist/7977.35ebfb6f4c9503b4.js +1 -0
  43. package/dist/7987.37367b65a76d5083.js +1 -0
  44. package/dist/8125.58e1a7a385797896.js +1 -0
  45. package/dist/8266.d665463de8b8d75a.js +1 -0
  46. package/dist/8296.32f107844a1381b6.js +1 -0
  47. package/dist/{3732.b5ac36f1448e215c.js → 8374.11d430ef2432bfba.js} +1 -1
  48. package/dist/{6589.b9c83295e466e464.js → 8682.5bde1163690a18dc.js} +1 -1
  49. package/dist/8841.6cb824dd9d5ad8f8.js +1 -0
  50. package/dist/885.e3d53b62c51f8311.js +1 -0
  51. package/dist/{9785.35cc7f0c3778344e.js → 891.333c6913b8246e3c.js} +1 -1
  52. package/dist/913.7d41933171ab9fbe.js +1 -0
  53. package/dist/9243.c223cdbc4cd84cb8.js +1 -0
  54. package/dist/9575.0a35a4da70f9e6e5.js +1 -0
  55. package/dist/9939.218315684234eb18.js +1 -0
  56. package/dist/common.442040891fd4ef29.js +1 -0
  57. package/dist/index.html +1 -1
  58. package/dist/main.9630ecd9c9613e82.js +1 -0
  59. package/dist/polyfills.93062920aa87d580.js +1 -0
  60. package/dist/runtime.21919a870e05d69b.js +1 -0
  61. package/main.js +1 -1
  62. package/package.json +4 -4
  63. package/sandbox/sandbox.js +1 -1
  64. package/src/tools/local-client.js +1 -1
  65. package/dist/1417.5caf023140e7c67f.js +0 -1
  66. package/dist/1468.d42293f7d802a787.js +0 -1
  67. package/dist/1959.a22fe393419f10c5.js +0 -1
  68. package/dist/2162.3c94f3d66c6312d5.js +0 -1
  69. package/dist/2818.71176f4848a9419f.js +0 -1
  70. package/dist/3488.ada60be2dbcd9845.js +0 -1
  71. package/dist/3545.b5585792e9fe1447.js +0 -1
  72. package/dist/3605.3c6cdf2a08c47301.js +0 -1
  73. package/dist/3621.412300a009ea6346.js +0 -1
  74. package/dist/379.d3e61f3350a595dc.js +0 -1
  75. package/dist/3929.9ac933e926943db2.js +0 -1
  76. package/dist/4092.71b0eccc0cb429f0.js +0 -1
  77. package/dist/4124.a8329e77343e7087.js +0 -1
  78. package/dist/4316.542be541e58dff84.js +0 -1
  79. package/dist/4344.d8f42d425eaec852.js +0 -1
  80. package/dist/4689.e827720779e0cf34.js +0 -1
  81. package/dist/4709.262c34f60b50ebc9.js +0 -1
  82. package/dist/4774.a4368f3ce2e778da.js +0 -1
  83. package/dist/4880.70ca405524206be7.js +0 -1
  84. package/dist/5011.ed9a6465223f760d.js +0 -1
  85. package/dist/5090.c8bf74c35b0a5d26.js +0 -1
  86. package/dist/5140.581ccd2699e2a8a8.js +0 -1
  87. package/dist/5362.912e053f78479e90.js +0 -1
  88. package/dist/5442.186b40719e7c1da9.js +0 -1
  89. package/dist/5455.a1d0d507419e3c59.js +0 -1
  90. package/dist/5729.f0ee236ba6579a94.js +0 -1
  91. package/dist/5826.44efead20568788a.js +0 -1
  92. package/dist/6053.67f38f7b35484475.js +0 -1
  93. package/dist/6220.b6c29e6e3e717880.js +0 -1
  94. package/dist/6415.a48241737e134178.js +0 -1
  95. package/dist/6679.c5073d3a60b67e2e.js +0 -1
  96. package/dist/6828.36c6805f2b3c6f38.js +0 -1
  97. package/dist/6866.4dd76a41246a20be.js +0 -1
  98. package/dist/6882.fe03a3df377ca119.js +0 -1
  99. package/dist/7014.5db4db60cc21782e.js +0 -1
  100. package/dist/7152.dab3cc50472f703f.js +0 -1
  101. package/dist/7367.ba1e63db0f9b97f4.js +0 -1
  102. package/dist/7374.ebfe1004d1773912.js +0 -1
  103. package/dist/7597.177f15771dcdea42.js +0 -1
  104. package/dist/7759.2b4ed39a62323abd.js +0 -1
  105. package/dist/807.dba59148bbbbe7fb.js +0 -1
  106. package/dist/8219.2c97945d465ab185.js +0 -1
  107. package/dist/8447.8caa67c3eb5d2b55.js +0 -1
  108. package/dist/9036.876c1f0c1ce4e82b.js +0 -1
  109. package/dist/9347.4e7d02eee86c5778.js +0 -1
  110. package/dist/9429.9299aa0abda3dc76.js +0 -1
  111. package/dist/9882.a94c746b42e5fc0e.js +0 -1
  112. package/dist/9957.47ed0e74bdfeddd5.js +0 -1
  113. package/dist/common.d4eb1616e93e21e1.js +0 -1
  114. package/dist/main.1da32156380b46d5.js +0 -1
  115. package/dist/polyfills.9cbb1c8222a6b6c3.js +0 -1
  116. package/dist/runtime.212fca73d6a42b3a.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[8219],{8219:(K,f,s)=>{s.r(f),s.d(f,{DeploymentSettingsM:()=>X});var S=s(7060),R=s(1709),F=s(7358),m=s(467),r=s(4341),i=s(5312),t=s(540),C=s(3864),u=s(7237),y=s(9561),E=s(7420),D=s(1626);let b=(()=>{class o extends E.a{http;authCS;constructor(e,n){super(e,y.bd.ROOT_USER_SETTINGS),this.http=e,this.authCS=n}saveRootUserSettings(e){return this.http.put(i.c.BE_HOST_PORT_SITES+`${this.modelPath}/set-root-user-settings`,e).toPromise()}getRootUserSettings(){return this.http.get(i.c.BE_HOST_PORT_SITES+`${this.modelPath}/get-root-user-settings`)}verifyRootUserSettings(e){return this.http.post(i.c.BE_HOST_PORT_SITES+`${this.modelPath}/verify-root-user-settings`,e).toPromise()}static \u0275fac=function(n){return new(n||o)(t.KVO(D.Qq),t.KVO(u.l))};static \u0275prov=t.jDH({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var T=s(6129),k=s(6268),h=s(6708),I=s(177),j=s(3478),L=s(6914),U=s(7515),x=s(8542),O=s(1305),P=s(3410);function G(o,p){1&o&&t.nrm(0,"i",51)}function J(o,p){if(1&o&&t.nrm(0,"i",52),2&o){const e=t.XpG();t.Y8G("pTooltip",null==e.validationResp?null:e.validationResp.logDatabaseConnectionMessage)}}function $(o,p){1&o&&t.nrm(0,"i",51)}function w(o,p){if(1&o&&t.nrm(0,"i",53),2&o){const e=t.XpG();t.Y8G("pTooltip",null==e.validationResp?null:e.validationResp.externalRedisSettingsJsonMessage)}}function A(o,p){if(1&o){const e=t.RV6();t.j41(0,"a",54),t.bIt("click",function(){t.eBV(e);const a=t.XpG();return t.Njj(a.installAndDetectD2Lib())}),t.nrm(1,"i",55),t.EFF(2," Auto Install "),t.k0s()}}function N(o,p){1&o&&t.nrm(0,"i",51)}function V(o,p){if(1&o&&(t.j41(0,"span",56),t.EFF(1),t.k0s()),2&o){const e=t.XpG();t.R7$(1),t.JRh(e.validationResp.d2DiagramLibVersion)}}function W(o,p){if(1&o&&t.nrm(0,"i",52),2&o){const e=t.XpG();t.Y8G("pTooltip",null==e.validationResp?null:e.validationResp.d2DiagramLibPathMessage)}}function M(o,p){if(1&o&&(t.j41(0,"div",57)(1,"div",58),t.nrm(2,"div",59),t.nI1(3,"safeHtml"),t.k0s()()),2&o){const e=t.XpG();t.R7$(2),t.Y8G("innerHTML",t.bMT(3,1,e.d2InstallError),t.npT)}}function Y(o,p){1&o&&t.nrm(0,"p-progressSpinner",60)}const _=[{path:"",component:(()=>{class o{fb;monacoS;authCS;rootUserSettings;generalS;instanceS;ns;cd;notificationS;form;formData;loading={form:!1};BE_HOST_PORT=i.c.BE_HOST_PORT;sampleConnectionString="mongodb://username:password@127.0.0.1:27017/databaseName?authSource=admin&replicaSet=rs0&directConnection=true";sampleJson='{\n "nodes": [\n {\n "port": 6390,\n "host": "127.0.0.1",\n "pass": ""\n }\n ],\n "otherRedisClusterOptions": null,\n "redisValueExpireInSeconds": 7200,\n "maxCharsResToCache": 1000000\n}';editorRootSetting;editorOptionsRootSetting={readOnly:!1,language:"json",contextmenu:!0};d2InstallError;validationResp;constructor(e,n,a,l,c,d,g,H,B){this.fb=e,this.monacoS=n,this.authCS=a,this.rootUserSettings=l,this.generalS=c,this.instanceS=d,this.ns=g,this.cd=H,this.notificationS=B}ngOnInit(){var e=this;return(0,m.A)(function*(){e.createForm(),yield e.loadData()})()}createForm(){this.form=this.fb.group({logDatabaseConnectionString:["",[]],externalRedisSettingsJsonString:["",[]],universalLoginCaptcha:["",[]],logRemoveSchedulerInterval:["0 0 0 * * *",[]],passJWTOfAPIUsers:["",[]],jwtTokenExpiresInSeconds:[259200,[r.k0.min(60),r.k0.max(10368e4)]],maxLogsCount:[1e4,[]],d2DiagramLibPath:[1e4,[]]})}loadData(){var e=this;return(0,m.A)(function*(){try{e.loading.form=!0;const n=(yield e.rootUserSettings.getRootUserSettings().toPromise()).data;if(e.form.reset(),e.form.patchValue(n),n?.logDatabaseConnectionString){const a=e.generalS.getDecryptedString(n.logDatabaseConnectionString,i.c.crypto.passCommunication);e.form.get("logDatabaseConnectionString").setValue(a)}if(n?.passJWTOfAPIUsers){const a=e.generalS.getDecryptedString(n.passJWTOfAPIUsers,i.c.crypto.passCommunication);e.form.get("passJWTOfAPIUsers").setValue(a)}if(n?.externalRedisSettingsJsonString){const a=e.generalS.getDecryptedString(n.externalRedisSettingsJsonString,i.c.crypto.passCommunication);e.editorRootSetting.setValue(a)}if(n?.universalLoginCaptcha){const a=e.generalS.getDecryptedString(n.universalLoginCaptcha,i.c.crypto.passCommunication);e.form.get("universalLoginCaptcha").setValue(a)}e.loading.form=!1}catch(n){e.loading.form=!1,e.ns.showErrorFromResponse(n.error||n,"Unable to load data.")}})()}update(){var e=this;return(0,m.A)(function*(){try{e.loading.form=!0,e.formData=e.form.getRawValue(),e.form.get("logDatabaseConnectionString").value&&(e.formData.logDatabaseConnectionString=e.generalS.getEncryptedString(e.form.get("logDatabaseConnectionString").value,i.c.crypto.passCommunication)),e.form.get("passJWTOfAPIUsers").value&&(e.formData.passJWTOfAPIUsers=e.generalS.getEncryptedString(e.form.get("passJWTOfAPIUsers").value,i.c.crypto.passCommunication)),e.editorRootSetting.getValue()&&(e.formData.externalRedisSettingsJsonString=e.generalS.getEncryptedString(e.editorRootSetting.getValue(),i.c.crypto.passCommunication)),e.form.get("universalLoginCaptcha").value&&(e.formData.universalLoginCaptcha=e.generalS.getEncryptedString(e.form.get("universalLoginCaptcha").value,i.c.crypto.passCommunication)),yield e.verifyRootUser(e.formData),!e.validationResp.logDatabaseConnectionMessage&&!e.validationResp.externalRedisSettingsJsonMessage&&(yield e.rootUserSettings.saveRootUserSettings(e.formData),e.loading.form=!1,e.ns.showSuccess("Settings verified and saved successfully.")),e.loading.form=!1}catch(n){e.loading.form=!1,e.ns.showErrorFromResponse(n.error||n,"Unable to update.")}})()}verifyRootUser(e){var n=this;return(0,m.A)(function*(){const a=yield n.rootUserSettings.verifyRootUserSettings(e);n.validationResp=a.data,setTimeout(()=>{n.cd.detectChanges()},1e3)})()}copyToClipboard(e){var n=this;return(0,m.A)(function*(){"json"===e?yield navigator.clipboard.writeText(n.sampleJson):yield navigator.clipboard.writeText(n.sampleConnectionString),n.notificationS.showSuccess("Copied to clipboard.")})()}editorGenerated(e){var n=this;return(0,m.A)(function*(){n.loading.form=!0,n.editorRootSetting=e,yield n.monacoS.loadSchemaEditorSettings(n.BE_HOST_PORT,n.authCS.getUserId(),null),n.monacoS.addSaveCodeKeyBinding(e,a=>{n.form.valid&&n.update()}),n.loading.form=!1})()}installAndDetectD2Lib(){var e=this;return(0,m.A)(function*(){e.loading.form=!0;try{const a=(yield e.instanceS.installAndDetectD2Lib()).data,l=a[0].d2InstallOutput?.data?.d2LibPath;if(l)e.form.patchValue({d2DiagramLibPath:l}),e.ns.showSuccess("D2 library installed successfully.");else{const c=a[0].d2InstallOutput?.errors?.[0]?.message;e.ns.showError(c),e.d2InstallError=c}}catch(n){e.ns.showErrorFromResponse(n.error||n,"Unable to install d2 diagram library.")}e.loading.form=!1,e.cd.detectChanges()})()}generateRandomValue(e){const n=this.generalS.getRandomStringWithCapitals(5),a=this.generalS.getRandomStringWithCapitals(5),l=this.generalS.getRandomStringWithCapitals(5),c=this.generalS.getRandomStringWithCapitals(5),d=this.generalS.getRandomStringWithCapitals(5),g=this.generalS.getRandomStringWithCapitals(5);this.form.get(e).setValue(`${n}_${a}_${l}_${c}_${d}_${g}`)}static \u0275fac=function(n){return new(n||o)(t.rXU(r.ok),t.rXU(C.e),t.rXU(u.l),t.rXU(b),t.rXU(T.f),t.rXU(k.J),t.rXU(h.m),t.rXU(t.gRc),t.rXU(h.m))};static \u0275cmp=t.VBU({type:o,selectors:[["app-dep-set-layout"]],decls:142,vars:22,consts:[[1,"pt-1","pr-1","pl-1","full-body","overflow-auto"],[1,"card","shadow-sm","h-100"],[1,"card-header"],[1,"fas","fa-cog","text-danger","fa-fw","mr-1"],[1,"card-body","p-0","overflow-hidden"],[1,"pl-3","overflow-auto","h-100"],[1,"pb-5",3,"formGroup"],[1,"form-group","row","mt-3","mb-0","ml-0","mr-0"],[1,"text-left","mb-0"],["class","fas fa-check-circle text-success pt-1 ml-2",4,"ngIf"],["class","fas fa-times-circle text-danger pt-1 ml-2 hover",3,"pTooltip",4,"ngIf"],[1,"form-group","row","ml-0","mr-0"],[1,"col-7","pl-0","pr-0"],["rows","5","formControlName","logDatabaseConnectionString","spellcheck","false","placeholder","Please provide log database connection string","pInputTextarea","",1,"form-control","form-control-sm","font-monospaced",3,"autoResize"],[1,"text-danger","small","col-12","pl-0","pr-0"],[1,"col-4","border","ml-3","pt-3"],["pTooltip","Copy to clipboard",1,"fas","fa-copy","text-warning","fa-fw","cursor-pointer","line-height-1-3","mr-2","float-right",3,"click"],[1,"form-group","row","mt-5","mb-0","ml-0","mr-0"],[1,"small","text-muted"],[1,"form-group","row","mb-3","ml-0","mr-0"],["formControlName","logRemoveSchedulerInterval","name","logRemoveSchedulerInterval","spellcheck","false","type","text","placeholder","For daily : 0 0 0 * * *",1,"form-control","form-control-sm","font-monospaced","col-7"],["formControlName","maxLogsCount","name","maxLogsCount","spellcheck","false","type","number","placeholder","10000",1,"form-control","form-control-sm","font-monospaced","col-7"],["class","fas fa-times-circle text-danger pt-1 ml-2",3,"pTooltip",4,"ngIf"],[1,"pr-0","pl-0",2,"height","277px"],[3,"isSchemaEditor","editorOptions","editorGenerated"],[1,"col-4","border","ml-3"],["title","Copy to clipboard",1,"fas","fa-copy","text-warning","fa-fw","cursor-pointer","line-height-1-3","mr-2","pt-3","float-right",3,"click"],[1,"mb-0","mt-0"],[1,"fw-bold"],[1,"json-key"],[1,"json-val"],[1,"json-num-val"],["formControlName","universalLoginCaptcha","name","universalLoginCaptcha","spellcheck","false","type","text","placeholder","Please provide universal login captcha",1,"form-control","form-control-sm","font-monospaced","col-7"],[1,"text-left","col-7","p-0","mb-0"],["href","https://docs.apimaker.dev/v1/docs/blog/install-d2.html","target","_blank",1,"float-right","small","text-warning"],[1,"fas","fa-link","fa-fw"],["class","float-right small text-info mr-3","href","javascript:",3,"click",4,"ngIf"],["class","ml-1",4,"ngIf"],["formControlName","d2DiagramLibPath","name","d2DiagramLibPath","spellcheck","false","type","text","placeholder","Please provide D2 diagram library path. ex : /usr/local/bin/d2",1,"form-control","form-control-sm","font-monospaced","col-7"],["class","row",4,"ngIf"],["href","javascript:",1,"float-right","small","text-info",3,"click"],[1,"fas","fa-random","fa-fw"],[1,"form-group","row","ml-0","mr-0","mb-0"],["maxlength","32","formControlName","passJWTOfAPIUsers","name","passJWTOfAPIUsers","spellcheck","false","type","text","placeholder","",1,"form-control","form-control-sm","font-monospaced","col-7"],[1,"row","mb-3","ml-0","mr-0"],["formControlName","jwtTokenExpiresInSeconds","name","jwtTokenExpiresInSeconds","spellcheck","false","type","number","placeholder","",1,"form-control","form-control-sm","font-monospaced","col-7"],[1,"form-group","row","mb-3","ml-0","mr-0","mt-5"],[1,"float-left","ml-1","mt-3"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary",3,"click"],[1,"fas","fa-save","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"fas","fa-check-circle","text-success","pt-1","ml-2"],[1,"fas","fa-times-circle","text-danger","pt-1","ml-2","hover",3,"pTooltip"],[1,"fas","fa-times-circle","text-danger","pt-1","ml-2",3,"pTooltip"],["href","javascript:",1,"float-right","small","text-info","mr-3",3,"click"],[1,"fas","fa-cloud-download-alt","fa-fw"],[1,"ml-1"],[1,"row"],[1,"col-7"],[1,"text-right",3,"innerHTML"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(n,a){1&n&&(t.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"span"),t.nrm(4,"i",3),t.EFF(5," Settings"),t.k0s()(),t.j41(6,"div",4)(7,"div",5)(8,"form",6)(9,"div",7)(10,"label",8),t.EFF(11,"Log Database Connection String"),t.k0s(),t.DNE(12,G,1,0,"i",9),t.DNE(13,J,1,1,"i",10),t.k0s(),t.j41(14,"div",11)(15,"div",12),t.nrm(16,"textarea",13),t.j41(17,"div",14),t.EFF(18),t.k0s()(),t.j41(19,"div",15)(20,"p")(21,"i",16),t.bIt("click",function(){return a.copyToClipboard()}),t.k0s()(),t.j41(22,"p"),t.EFF(23),t.k0s()()(),t.j41(24,"div",17)(25,"label",8),t.EFF(26,"Log Remove Scheduler Run CRON "),t.j41(27,"span",18),t.EFF(28,"(Clean logs daily ex : 0 0 0 * * *)"),t.k0s()()(),t.j41(29,"div",19),t.nrm(30,"input",20),t.j41(31,"div",14),t.EFF(32),t.k0s()(),t.j41(33,"div",17)(34,"label",8),t.EFF(35,"Max logs save count "),t.j41(36,"span",18),t.EFF(37,"(ex: 10000, it will keep recent 10000 logs)"),t.k0s()()(),t.j41(38,"div",19),t.nrm(39,"input",21),t.k0s(),t.j41(40,"div",17)(41,"label",8),t.EFF(42,"Redis Connection JSON"),t.k0s(),t.DNE(43,$,1,0,"i",9),t.DNE(44,w,1,1,"i",22),t.k0s(),t.j41(45,"div",19)(46,"div",12)(47,"div",23)(48,"app-monaco-editor",24),t.bIt("editorGenerated",function(c){return a.editorGenerated(c)}),t.k0s()(),t.j41(49,"div",14),t.EFF(50),t.k0s()(),t.j41(51,"div",25)(52,"span")(53,"i",26),t.bIt("click",function(){return a.copyToClipboard("json")}),t.k0s()(),t.j41(54,"pre",27)(55,"code",28),t.EFF(56),t.j41(57,"span",29),t.EFF(58,'"nodes"'),t.k0s(),t.EFF(59),t.j41(60,"span",29),t.EFF(61,'"port"'),t.k0s(),t.EFF(62,": "),t.j41(63,"span",30),t.EFF(64,"6390"),t.k0s(),t.EFF(65,",\n "),t.j41(66,"span",29),t.EFF(67,'"host"'),t.k0s(),t.EFF(68,": "),t.j41(69,"span",30),t.EFF(70,'"127.0.0.1"'),t.k0s(),t.EFF(71,",\n "),t.j41(72,"span",29),t.EFF(73,'"pass"'),t.k0s(),t.EFF(74,": "),t.j41(75,"span",30),t.EFF(76,'""'),t.k0s(),t.EFF(77),t.j41(78,"span",29),t.EFF(79,'"otherRedisClusterOptions"'),t.k0s(),t.EFF(80,": "),t.j41(81,"span",30),t.EFF(82,"null"),t.k0s(),t.EFF(83,",\n "),t.j41(84,"span",29),t.EFF(85,'"redisValueExpireInSeconds"'),t.k0s(),t.EFF(86,": "),t.j41(87,"span",31),t.EFF(88,"7200"),t.k0s(),t.EFF(89,",\n "),t.j41(90,"span",29),t.EFF(91,'"maxCharsResToCache"'),t.k0s(),t.EFF(92,": "),t.j41(93,"span",31),t.EFF(94,"1000000"),t.k0s(),t.EFF(95),t.k0s(),t.EFF(96,"\n"),t.k0s()()(),t.j41(97,"div",17)(98,"label",8),t.EFF(99,"Universal Login Captcha"),t.k0s()(),t.j41(100,"div",19),t.nrm(101,"input",32),t.k0s(),t.j41(102,"div",17)(103,"label",33),t.EFF(104," D2 Diagram Library Path "),t.j41(105,"a",34),t.nrm(106,"i",35),t.EFF(107," Install Guide "),t.k0s(),t.DNE(108,A,3,0,"a",36),t.DNE(109,N,1,0,"i",9),t.DNE(110,V,2,1,"span",37),t.DNE(111,W,1,1,"i",10),t.k0s()(),t.j41(112,"div",19),t.nrm(113,"input",38),t.k0s(),t.DNE(114,M,4,3,"div",39),t.j41(115,"div",17)(116,"label",33),t.EFF(117," JWT Password "),t.j41(118,"span",18),t.EFF(119,"(It will be used for generating JWT tokens)"),t.k0s(),t.j41(120,"a",40),t.bIt("click",function(){return a.generateRandomValue("passJWTOfAPIUsers")}),t.nrm(121,"i",41),t.EFF(122," Generate "),t.k0s()()(),t.j41(123,"div",42),t.nrm(124,"input",43),t.k0s(),t.j41(125,"div",44)(126,"span",18),t.EFF(127,"If you change this value, all the users of your applications will be logged out."),t.k0s()(),t.j41(128,"div",17)(129,"label",33),t.EFF(130," JWT Tokens Expires In Seconds "),t.j41(131,"span",18),t.EFF(132,"(259200 = 3 Days | 72 Hours)"),t.k0s()()(),t.j41(133,"div",19),t.nrm(134,"input",45),t.k0s(),t.j41(135,"div",46)(136,"div",47)(137,"button",48),t.bIt("click",function(){return a.update()}),t.nrm(138,"i",49),t.j41(139,"span"),t.EFF(140,"Update"),t.k0s()()()()()()(),t.DNE(141,Y,1,0,"p-progressSpinner",50),t.k0s()()),2&n&&(t.R7$(8),t.Y8G("formGroup",a.form),t.R7$(4),t.Y8G("ngIf",a.validationResp&&(null==a.formData?null:a.formData.logDatabaseConnectionString)&&!(null!=a.validationResp&&a.validationResp.logDatabaseConnectionMessage)),t.R7$(1),t.Y8G("ngIf",null==a.validationResp?null:a.validationResp.logDatabaseConnectionMessage),t.R7$(3),t.Y8G("autoResize",!0),t.R7$(2),t.JRh(null==a.validationResp?null:a.validationResp.logDatabaseConnectionMessage),t.R7$(5),t.JRh(a.sampleConnectionString),t.R7$(9),t.JRh(null==a.validationResp?null:a.validationResp.logRemoveSchedulerIntervalMessage),t.R7$(11),t.Y8G("ngIf",a.validationResp&&(null==a.formData?null:a.formData.externalRedisSettingsJsonString)&&!(null!=a.validationResp&&a.validationResp.externalRedisSettingsJsonMessage)),t.R7$(1),t.Y8G("ngIf",null==a.validationResp?null:a.validationResp.externalRedisSettingsJsonMessage),t.R7$(4),t.Y8G("isSchemaEditor",!1)("editorOptions",a.editorOptionsRootSetting),t.R7$(2),t.JRh(null==a.validationResp?null:a.validationResp.externalRedisSettingsJsonMessage),t.R7$(6),t.SpI("\n","{","\n "),t.R7$(3),t.SpI(": [\n ","{","\n "),t.R7$(18),t.SpI("\n ","}","\n ],\n "),t.R7$(18),t.SpI("\n","}","\n"),t.R7$(13),t.Y8G("ngIf","Linux"===a.authCS.backendSettings.osType),t.R7$(1),t.Y8G("ngIf",null==a.validationResp?null:a.validationResp.d2DiagramLibVersion),t.R7$(1),t.Y8G("ngIf",null==a.validationResp?null:a.validationResp.d2DiagramLibVersion),t.R7$(1),t.Y8G("ngIf",null==a.validationResp?null:a.validationResp.d2DiagramLibPathMessage),t.R7$(3),t.Y8G("ngIf",a.d2InstallError),t.R7$(27),t.Y8G("ngIf",a.loading.form))},dependencies:[r.qT,r.me,r.Q0,r.BC,r.cb,r.tU,r.j4,r.JD,I.bT,j.U,L.A,U.p,x.m,O.Z,P.$],encapsulation:2})}return o})(),canActivate:[F.k]}];let X=(()=>{class o{static \u0275fac=function(n){return new(n||o)};static \u0275mod=t.$C({type:o});static \u0275inj=t.G2t({imports:[S.iI.forChild(_),R.u]})}return o})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[8447],{8447:(Re,I,n)=>{n.r(I),n.d(I,{ApiUserM:()=>Ee});var x=n(7060),X=n(1709),M=n(2173),e=n(540),S=n(5779),V=n(572),l=n(467),p=n(8727),d=n(5046),U=n(7326),C=n(7376),u=n(6645),_=n(7427),b=n(6129),w=n(6708),O=n(7337),y=n(7237),A=n(1987),F=n(3966),E=n(177),h=n(7645),D=n(7515),R=n(8542),m=n(4341),Y=n(9773),k=n(5312),B=n(9561),L=n(6268),K=n(5203),W=n(3478),J=n(8150),z=n(5430);function Q(r,i){1&r&&(e.j41(0,"span"),e.nrm(1,"i",24),e.EFF(2," Add API User"),e.k0s())}function H(r,i){1&r&&(e.j41(0,"span"),e.nrm(1,"i",25),e.EFF(2," View API User"),e.k0s())}function Z(r,i){1&r&&(e.j41(0,"span"),e.nrm(1,"i",26),e.EFF(2," Edit API User"),e.k0s())}function q(r,i){if(1&r){const t=e.RV6();e.j41(0,"a",30),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.openSecret())}),e.nrm(1,"i",31),e.EFF(2," Open Secret "),e.k0s()}}function ee(r,i){if(1&r&&(e.j41(0,"div")(1,"div",10)(2,"label",11),e.EFF(3,"Password Path"),e.k0s(),e.j41(4,"div",12),e.nrm(5,"p-dropdown",27),e.k0s(),e.j41(6,"div",28),e.DNE(7,q,3,0,"a",29),e.k0s()()()),2&r){const t=e.XpG();e.R7$(5),e.Y8G("options",t.connectionStringSecrets)("filter",!0),e.R7$(2),e.Y8G("ngIf",t.data.mode!==t.EFormMode.VIEW)}}function te(r,i){1&r&&(e.j41(0,"div",10)(1,"label",11),e.EFF(2,"Password"),e.k0s(),e.j41(3,"div",12),e.nrm(4,"input",32),e.k0s()())}function se(r,i){if(1&r){const t=e.RV6();e.j41(0,"div",10)(1,"label",11),e.EFF(2,"Swagger Token"),e.k0s(),e.j41(3,"div",12),e.nrm(4,"input",33),e.k0s(),e.j41(5,"div",34)(6,"button",35),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.generateRandomStringForSwaggerURLPart())}),e.nrm(7,"i",36),e.k0s()()()}}function ae(r,i){if(1&r&&(e.j41(0,"div",10),e.nrm(1,"label",11),e.j41(2,"div",12)(3,"a",37),e.EFF(4,"View Swagger JSON"),e.k0s()()()),2&r){const t=e.XpG();e.R7$(3),e.yjJ("href","",t.environment.BE_HOST_PORT+t.EApiPaths.API+t.EApiPaths.SITES+t.EModelApiPaths.INSTANCE,"/",t.authCS.gUser.apiPath,"/get-swagger-docs/",t.form.getRawValue().swaggerURLRandomPart,"",e.B4B)}}function re(r,i){1&r&&(e.j41(0,"span"),e.EFF(1,"Save User"),e.k0s())}function ne(r,i){1&r&&(e.j41(0,"span"),e.EFF(1,"Update User"),e.k0s())}function ie(r,i){if(1&r){const t=e.RV6();e.j41(0,"button",38),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.save())}),e.nrm(1,"i",39),e.DNE(2,re,2,0,"span",4),e.DNE(3,ne,2,0,"span",4),e.k0s()}if(2&r){const t=e.XpG();e.Y8G("disabled",t.form.invalid),e.R7$(2),e.Y8G("ngIf",t.data.mode===t.EFormMode.ADD),e.R7$(1),e.Y8G("ngIf",t.data.mode===t.EFormMode.EDIT)}}function oe(r,i){1&r&&e.nrm(0,"p-progressSpinner",40)}let P=(()=>{class r{fb;ns;apiUserS;generalS;instanceS;eventCenterS;secretS;constantsS;authCS;data;loading={form:!1};EFormMode=d.X;form;subscriptions=[];environment=k.c;connectionStringSecrets=[];constructor(t,a,s,o,c,f,g,v,De){this.fb=t,this.ns=a,this.apiUserS=s,this.generalS=o,this.instanceS=c,this.eventCenterS=f,this.secretS=g,this.constantsS=v,this.authCS=De}ngOnInit(){var t=this;this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var a=(0,l.A)(function*(s){if(s)if(t.form.enable(),yield t.loadConnectionStringFromSecret(),s.action===p.K.OPEN_FORM_IN_EDIT_MODE){const o=yield t.apiUserS.getById(t.data.formData._id).toPromise();t.form.reset(),t.form.patchValue(o.data),t.form.get("password").setValidators([]),t.form.get("password").updateValueAndValidity()}else if(s.action===p.K.OPEN_FORM_IN_VIEW_MODE){const o=yield t.apiUserS.getById(t.data.formData._id).toPromise();t.form.reset(),t.form.patchValue(o.data),t.form.disable()}else s.action===p.K.OPEN_FORM_IN_ADD_MODE&&(t.form.reset(),t.form.get("enablePasswordPath").setValue(!0))});return function(s){return a.apply(this,arguments)}}())),this.subscriptions.push(this.eventCenterS.headerC.dataSecretForm.eventChannel.subscribe(function(){var a=(0,l.A)(function*(s){s&&s.action===p.K.UPDATED&&(t.eventCenterS.headerC.secManFormC.hideModal(),yield t.loadConnectionStringFromSecret())});return function(s){return a.apply(this,arguments)}}()))}createForm(){this.form=this.fb.group({name:[null,[m.k0.required]],username:[null,[m.k0.required]],password:[null,[]],enablePasswordPath:[!1,[]],apiUserPasswordPath:[null,[]],swaggerURLRandomPart:[null,[]],enableSwaggerDocs:[!1,[]]})}showModal(){$("#idApiUsersForm").modal("show")}hideModal(){$("#idApiUsersForm").modal("hide")}openSecret(){var t=this;return(0,l.A)(function*(){t.eventCenterS.headerC.dataSecretForm.formData=yield t.getDefaultSecret(),t.eventCenterS.headerC.dataSecretForm.mode=d.X.EDIT,t.eventCenterS.headerC.dataSecretForm.eventChannel.emit({action:p.K.OPEN_FORM_IN_EDIT_MODE}),t.eventCenterS.headerC.secManFormC.showModal(),t.eventCenterS.headerC.secManFormC.zIndex=1051})()}loadConnectionStringFromSecret(){var t=this;return(0,l.A)(function*(){try{const a=(yield t.instanceS.getConnectionStringSecret().toPromise())?.data;t.connectionStringSecrets=a}catch(a){t.ns.showErrorFromResponse(a.error||a,"Unable to load connection string.")}})()}getDefaultSecret(){var t=this;return(0,l.A)(function*(){const a={find:{user:t.authCS.getUserId(),active:!0,isDefault:!0}};return(yield t.secretS.query(a).toPromise()).data?.[0]})()}save(){var t=this;return(0,l.A)(function*(){const a=t.form.getRawValue();a.user=t.authCS.getUserId();try{let s;if(t.loading.form=!0,t.data.mode===d.X.ADD){if(!a.password&&!a.apiUserPasswordPath)return t.loading.form=!1,t.ns.showError(t.constantsS.apiUser.passwordError);t.processDataBeforeSaveOrUpdate(a),s=yield t.apiUserS.post(a).toPromise()}else t.data.mode===d.X.EDIT&&(a.password||delete a.password,t.processDataBeforeSaveOrUpdate(a),s=yield t.apiUserS.put(t.data.formData._id,a,{select:u.GX._id}).toPromise());t.ns.showSuccess(t.data.mode===d.X.ADD?t.constantsS.apiUser.addSuccess:t.constantsS.apiUser.editSuccess),t.data.eventChannel.emit({action:t.data.mode===d.X.ADD?p.K.SAVED:p.K.UPDATED}),t.loading.form=!1}catch(s){t.loading.form=!1,t.ns.showErrorFromResponse(s.error||s,"Unable to save user info.")}})()}processDataBeforeSaveOrUpdate(t){t.password&&(t.password=this.generalS.getEncryptedString(t.password,k.c.crypto.passCommunication))}generateRandomStringForSwaggerURLPart(){this.form.patchValue({swaggerURLRandomPart:this.generalS.getRandomStringWithCapitals(32)})}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}EApiPaths=Y.ey;EModelApiPaths=B.bd;static \u0275fac=function(a){return new(a||r)(e.rXU(m.ok),e.rXU(w.m),e.rXU(_.N),e.rXU(b.f),e.rXU(L.J),e.rXU(F.d),e.rXU(K.S),e.rXU(A.X),e.rXU(y.l))};static \u0275cmp=e.VBU({type:r,selectors:[["app-w-api-user-form"]],inputs:{data:"data"},decls:42,vars:12,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idApiUsersForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-lg"],[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","username","name","username","spellcheck","false","type","text","placeholder","Please provide username",1,"form-control","form-control-sm"],[1,"align-middle","mb-0","pt-1"],["formControlName","enablePasswordPath","label","Enable Password From Secret Path",3,"binary"],["class","form-group row",4,"ngIf"],["formControlName","enableSwaggerDocs","label","Enable Swagger Docs",3,"binary"],[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","apiUserPasswordPath","optionValue","value","optionLabel","name","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter"],[1,"col-2","p-0"],["class","d-block mt-2 text-info","href","javascript:","sava-no-dbl-click","",3,"click",4,"ngIf"],["href","javascript:","sava-no-dbl-click","",1,"d-block","mt-2","text-info",3,"click"],[1,"fas","fa-key","text-danger","fa-fw","mr-1"],["formControlName","password","name","password","spellcheck","false","type","password","placeholder","Please provide password",1,"form-control","form-control-sm"],["formControlName","swaggerURLRandomPart","name","swaggerURLRandomPart","spellcheck","false","type","text","placeholder","Please generate random URL",1,"form-control","form-control-sm"],[1,"col-2","pl-0"],["pTooltip","Generate random swagger token","type","button",1,"btn","btn-sm","btn-outline-info",3,"click"],[1,"fas","fa-star-of-life","text-info","fa-fw"],["target","_blank",3,"href"],["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,s){1&a&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.DNE(4,Q,3,0,"span",4),e.DNE(5,H,3,0,"span",4),e.DNE(6,Z,3,0,"span",4),e.j41(7,"button",5)(8,"span",6),e.nrm(9,"i",7),e.k0s()()(),e.j41(10,"div",8)(11,"form",9)(12,"div",10)(13,"label",11),e.EFF(14,"Name"),e.k0s(),e.j41(15,"div",12),e.nrm(16,"input",13),e.k0s()(),e.j41(17,"div",10)(18,"label",11),e.EFF(19,"Username"),e.k0s(),e.j41(20,"div",12),e.nrm(21,"input",14),e.k0s()(),e.j41(22,"div",10),e.nrm(23,"label",11),e.j41(24,"div",12)(25,"label",15),e.nrm(26,"p-checkbox",16),e.k0s()()(),e.DNE(27,ee,8,3,"div",4),e.DNE(28,te,5,0,"div",17),e.j41(29,"div",10),e.nrm(30,"label",11),e.j41(31,"div",12)(32,"label",15),e.nrm(33,"p-checkbox",18),e.k0s()()(),e.DNE(34,se,8,0,"div",17),e.DNE(35,ae,5,3,"div",17),e.k0s()(),e.j41(36,"div",19)(37,"button",20),e.nrm(38,"i",21),e.EFF(39," Close"),e.k0s(),e.DNE(40,ie,4,3,"button",22),e.k0s(),e.DNE(41,oe,1,0,"p-progressSpinner",23),e.k0s()()()),2&a&&(e.R7$(4),e.Y8G("ngIf",s.data.mode===s.EFormMode.ADD),e.R7$(1),e.Y8G("ngIf",s.data.mode===s.EFormMode.VIEW),e.R7$(1),e.Y8G("ngIf",s.data.mode===s.EFormMode.EDIT),e.R7$(5),e.Y8G("formGroup",s.form),e.R7$(15),e.Y8G("binary",!0),e.R7$(1),e.Y8G("ngIf",!0===s.form.get("enablePasswordPath").value),e.R7$(1),e.Y8G("ngIf",s.data.mode!==s.EFormMode.VIEW&&!s.form.get("enablePasswordPath").value),e.R7$(5),e.Y8G("binary",!0),e.R7$(1),e.Y8G("ngIf",s.form.getRawValue().enableSwaggerDocs),e.R7$(1),e.Y8G("ngIf",s.form.getRawValue().enableSwaggerDocs&&s.form.getRawValue().swaggerURLRandomPart),e.R7$(5),e.Y8G("ngIf",s.data.mode!==s.EFormMode.VIEW),e.R7$(1),e.Y8G("ngIf",s.loading.form))},dependencies:[m.qT,m.me,m.BC,m.cb,m.j4,m.JD,E.bT,W.U,D.p,R.m,J.ms,z.Sc],encapsulation:2})}return r})();const le=["apiUserFormC"];function ce(r,i){if(1&r){const t=e.RV6();e.j41(0,"span",17),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.edit())}),e.nrm(1,"i",18),e.k0s()}}function pe(r,i){if(1&r){const t=e.RV6();e.j41(0,"span",19),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.removePermanentDialog())}),e.nrm(1,"i",20),e.k0s()}}function de(r,i){1&r&&(e.j41(0,"tr")(1,"th"),e.EFF(2,"Name"),e.k0s(),e.j41(3,"th"),e.EFF(4,"Username"),e.k0s()())}function me(r,i){if(1&r&&(e.j41(0,"tr",21)(1,"td"),e.EFF(2),e.k0s(),e.j41(3,"td"),e.EFF(4),e.k0s()()),2&r){const t=i.$implicit;e.Y8G("pSelectableRow",t),e.R7$(2),e.JRh(t.name),e.R7$(2),e.JRh(t.username)}}function fe(r,i){1&r&&e.nrm(0,"p-progressSpinner",22)}let G=(()=>{class r{apiUserS;generalS;notificationS;navigationCS;authCS;constantsS;confirmationService;eventCenterS;loading={grid:!1};subscriptions=[];data={mode:d.X.ADD,eventChannel:new e.bkB,formData:void 0};rows=[];rowsMap={};showAll=!1;selectedRows=[];gridKey=u.GX._id;apiUserFormC;constructor(t,a,s,o,c,f,g,v){this.apiUserS=t,this.generalS=a,this.notificationS=s,this.navigationCS=o,this.authCS=c,this.constantsS=f,this.confirmationService=g,this.eventCenterS=v}ngOnInit(){this.eventCenterS.apiUser.selectedApiUsers.next([]),this.loadGridData(),this.subscriptions.push(this.data.eventChannel.subscribe(t=>{(t.action===p.K.SAVED||t.action===p.K.UPDATED)&&(this.apiUserFormC.hideModal(),this.loadGridData())})),this.generalS.setNewTitle("API Maker - API Users")}loadGridData(){var t=this;this.loading.grid=!0;const a={find:{user:this.authCS.getUserId(),active:!0},select:{name:1,username:1,active:1},sort:{name:1}};this.showAll&&delete a.find.active,this.subscriptions.push(this.apiUserS.query(a).subscribe(function(){var s=(0,l.A)(function*(o){if(o.success&&(t.selectedRows=[],t.rows=o.data,t.rowsMap=C.keyBy(t.rows,u.GX._id),t.rows[0]?._id)){const c=(yield t.apiUserS.getById(t.rows[0]._id).toPromise()).data;c._id&&(yield t.navigationCS.setQueryParam(U.F.api_user,c._id),t.eventCenterS.apiUser.selectedApiUsers.next([c]),t.selectedRows=[c],yield t.fillData())}t.generalS.setNewTitle("API Maker - API Users"),t.loading.grid=!1});return function(o){return s.apply(this,arguments)}}()))}add(){this.data.formData=void 0,this.data.mode=d.X.ADD,this.data.eventChannel.emit({action:p.K.OPEN_FORM_IN_ADD_MODE}),this.apiUserFormC.showModal()}view(){this.data.formData=this.selectedRows[0],this.data.mode=d.X.VIEW,this.data.eventChannel.emit({action:p.K.OPEN_FORM_IN_VIEW_MODE}),this.apiUserFormC.showModal()}edit(){this.data.formData=this.selectedRows[0],this.data.mode=d.X.EDIT,this.data.eventChannel.emit({action:p.K.OPEN_FORM_IN_EDIT_MODE}),this.apiUserFormC.showModal()}removePermanentDialog(){var t=this;return(0,l.A)(function*(){var a;t.confirmationService.confirm({message:t.constantsS.apiUser.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(a=(0,l.A)(function*(){yield t.removePermanent()}),function(){return a.apply(this,arguments)})})})()}removePermanent(){var t=this;return(0,l.A)(function*(){t.loading.grid=!0;const a=yield t.apiUserS.permanentDelete(t.selectedRows[0]._id).toPromise();t.loading.grid=!1,a.success?(t.notificationS.showSuccess(t.constantsS.apiUser.removePermanent),t.resetSelectedRows(),t.loadGridData()):t.notificationS.showErrorFromResponse(a,t.constantsS.apiUser.removePermanentError)})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.apiUser.selectedApiUsers.next([])}resetDependents(){var t=this;return(0,l.A)(function*(){t.eventCenterS.apiUser.selectedApiUsers.next([]),yield t.navigationCS.setQueryParam(U.F.api_user,null)})()}apiUserSelected(){var t=this;return(0,l.A)(function*(){yield t.resetDependents(),yield t.fillData()})()}fillData(){var t=this;return(0,l.A)(function*(){if(!t.selectedRows.length)return yield t.navigationCS.setQueryParam(U.F.api_user,""),void t.eventCenterS.apiUser.selectedApiUsers.next([]);const a=(yield t.apiUserS.getById(t.selectedRows[0]._id).toPromise()).data;a._id?(yield t.navigationCS.setQueryParam(U.F.api_user,a._id),t.eventCenterS.apiUser.selectedApiUsers.next([a])):t.resetDependents().then()})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickUsers(){this.selectedRows.length&&this.edit()}static \u0275fac=function(a){return new(a||r)(e.rXU(_.N),e.rXU(b.f),e.rXU(w.m),e.rXU(O.$),e.rXU(y.l),e.rXU(A.X),e.rXU(S.td),e.rXU(F.d))};static \u0275cmp=e.VBU({type:r,selectors:[["app-w-api-users"]],viewQuery:function(a,s){if(1&a&&e.GBs(le,5),2&a){let o;e.mGM(o=e.lsd())&&(s.apiUserFormC=o.first)}},decls:19,vars:10,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["src","/assets/images/icons/api-user.svg","alt","API Group Permissions",1,"fa-fw","mr-1"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/apis-security/api-user-permission.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px"],["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","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"],[3,"data"],["apiUserFormC",""],["pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","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"],[3,"pSelectableRow"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(a,s){1&a&&(e.j41(0,"div",0)(1,"div",1)(2,"span"),e.nrm(3,"img",2),e.EFF(4," API Users"),e.k0s(),e.j41(5,"div",3)(6,"a",4),e.nrm(7,"img",5),e.k0s()(),e.j41(8,"span",6),e.bIt("click",function(){return s.add()}),e.nrm(9,"i",7),e.k0s(),e.DNE(10,ce,2,0,"span",8),e.DNE(11,pe,2,0,"span",9),e.k0s(),e.j41(12,"div",10)(13,"p-table",11),e.bIt("selectionChange",function(c){return s.selectedRows=c})("dblclick",function(){return s.dblClickUsers()})("selectionChange",function(){return s.apiUserSelected()}),e.DNE(14,de,5,0,"ng-template",12),e.DNE(15,me,5,3,"ng-template",13),e.k0s(),e.DNE(16,fe,1,0,"p-progressSpinner",14),e.k0s()(),e.nrm(17,"app-w-api-user-form",15,16)),2&a&&(e.R7$(10),e.Y8G("ngIf",s.selectedRows.length),e.R7$(1),e.Y8G("ngIf",s.selectedRows.length),e.R7$(2),e.Y8G("selectionMode","multiple")("metaKeySelection",!0)("selection",s.selectedRows)("dataKey",s.gridKey)("scrollable",!0)("value",s.rows),e.R7$(3),e.Y8G("ngIf",s.loading.grid),e.R7$(1),e.Y8G("data",s.data))},dependencies:[E.bT,h.XI,S.Ei,h.d5,D.p,R.m,P],encapsulation:2})}return r})();var ue=n(152),he=n(4774),ge=n(4752);function ve(r,i){if(1&r){const t=e.RV6();e.j41(0,"span",10),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.saveUserPermissions())}),e.nrm(1,"i",11),e.EFF(2," Save"),e.k0s()}}function Se(r,i){1&r&&(e.j41(0,"tr"),e.nrm(1,"th",15),e.j41(2,"th"),e.EFF(3,"Name"),e.k0s()())}function Ue(r,i){if(1&r&&(e.j41(0,"td"),e.nrm(1,"p-tableCheckbox",18),e.k0s()),2&r){const t=e.XpG().$implicit;e.R7$(1),e.Y8G("value",t)("pSelectableRow",t)}}function Ce(r,i){if(1&r&&(e.j41(0,"tr",16),e.DNE(1,Ue,2,2,"td",17),e.j41(2,"td"),e.EFF(3),e.k0s()()),2&r){const t=i.$implicit,a=e.XpG(2);e.Y8G("pSelectableRow",t),e.R7$(1),e.Y8G("ngIf",a.showCheckbox),e.R7$(2),e.JRh(t.name)}}function _e(r,i){if(1&r){const t=e.RV6();e.j41(0,"p-table",12),e.bIt("selectionChange",function(s){e.eBV(t);const o=e.XpG();return e.Njj(o.selectedRows=s)})("selectionChange",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.apiGroupSelected())}),e.DNE(1,Se,4,0,"ng-template",13),e.DNE(2,Ce,4,3,"ng-template",14),e.k0s()}if(2&r){const t=e.XpG();e.Y8G("selectionMode","multiple")("metaKeySelection",!1)("selection",t.selectedRows)("dataKey",t.gridKey)("scrollable",!0)("value",t.rows)}}function be(r,i){1&r&&e.nrm(0,"p-progressSpinner",19)}let T=(()=>{class r{groupS;generalS;notificationS;navigationS;authCS;apiUserS;constantsS;eventCenterS;showCheckbox=!0;loading={grid:!1};subscriptions=[];data={eventChannel:new e.bkB};rows=[];rowsMap={};selectedRows=[];gridKey=u.h3.name;constructor(t,a,s,o,c,f,g,v){this.groupS=t,this.generalS=a,this.notificationS=s,this.navigationS=o,this.authCS=c,this.apiUserS=f,this.constantsS=g,this.eventCenterS=v}ngOnInit(){var t=this;this.eventCenterS.apiUser.selectedGroups.next([]),this.subscriptions.push(this.eventCenterS.apiUser.selectedApiUsers.pipe((0,ue.B)(10)).subscribe(function(){var a=(0,l.A)(function*(s){s.length?yield t.loadGridData():t.resetList()});return function(s){return a.apply(this,arguments)}}()))}loadGridData(){var t=this;return(0,l.A)(function*(){t.loading.grid=!0;const a={find:{user:t.authCS.getUserId(),active:!0},select:{name:1},sort:{name:1}},s=yield t.groupS.query(a).toPromise();if(s.success){t.selectedRows=[],t.rows=s.data,t.rowsMap=C.keyBy(t.rows,"name");const o=t.eventCenterS.apiUser.selectedApiUsers.value[0].groupNames||[],c=[];for(const f of o)t.rowsMap[f]&&c.push(t.rowsMap[f]);t.selectedRows=c,t.eventCenterS.apiUser.selectedGroups.next(C.map(t.selectedRows,"_id"))}t.loading.grid=!1})()}resetList(){var t=this;return(0,l.A)(function*(){t.rows=[],t.rowsMap={},t.selectedRows.length=0,t.eventCenterS.apiUser.selectedGroups.next([])})()}apiGroupSelected(){var t=this;return(0,l.A)(function*(){t.eventCenterS.apiUser.selectedGroups.next(C.map(t.selectedRows,t.gridKey))})()}saveUserPermissions(){var t=this;return(0,l.A)(function*(){const a=JSON.parse(JSON.stringify(t.eventCenterS.apiUser.selectedApiUsers.value[0]));a.user=t.authCS.getUserId(),a.groupNames=t.eventCenterS.apiUser.selectedGroups.value||[],t.loading.grid=!0;const s=yield t.apiUserS.put(a._id,a,{select:u.GX._id}).toPromise();s&&s.success&&t.notificationS.showSuccess("User updated successfully."),t.loading.grid=!1})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(a){return new(a||r)(e.rXU(he.L),e.rXU(b.f),e.rXU(w.m),e.rXU(ge.O),e.rXU(y.l),e.rXU(_.N),e.rXU(A.X),e.rXU(F.d))};static \u0275cmp=e.VBU({type:r,selectors:[["app-w-api-group-list"]],inputs:{showCheckbox:"showCheckbox"},decls:12,vars:3,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["src","/assets/images/icons/api-group.svg","alt","API Group Permissions",1,"fa-fw","mr-1"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/apis-security/api-group-permission.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px"],["class","float-right cursor-pointer ml-3","pTooltip","Save",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","flex",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["pTooltip","Save",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-save","fa-fw","text-success"],["styleClass","p-datatable-striped","scrollHeight","flex",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange"],["pTemplate","header"],["pTemplate","body"],[2,"width","40px"],[3,"pSelectableRow"],[4,"ngIf"],[3,"value","pSelectableRow"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(a,s){1&a&&(e.j41(0,"div",0)(1,"div",1)(2,"span"),e.nrm(3,"img",2),e.EFF(4," Groups"),e.k0s(),e.j41(5,"div",3)(6,"a",4),e.nrm(7,"img",5),e.k0s()(),e.DNE(8,ve,3,0,"span",6),e.k0s(),e.j41(9,"div",7),e.DNE(10,_e,3,6,"p-table",8),e.DNE(11,be,1,0,"p-progressSpinner",9),e.k0s()()),2&a&&(e.R7$(8),e.Y8G("ngIf",s.eventCenterS.apiUser.selectedApiUsers.value.length),e.R7$(2),e.Y8G("ngIf",s.eventCenterS.apiUser.selectedApiUsers.value.length),e.R7$(1),e.Y8G("ngIf",s.loading.grid))},dependencies:[E.bT,h.XI,S.Ei,h.d5,h.S9,D.p,R.m],encapsulation:2})}return r})();function we(r,i){1&r&&(e.j41(0,"div",3),e.nrm(1,"app-w-api-users"),e.k0s())}function ye(r,i){1&r&&(e.j41(0,"div",4),e.nrm(1,"app-w-api-group-list"),e.k0s())}const Ae=function(){return{height:"calc(100% - 100px);"}},j=function(){return[50,50]};const Fe=[{path:"layout",component:(()=>{class r{constructor(){}ngOnInit(){}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=e.VBU({type:r,selectors:[["app-api-user-layout"]],decls:4,vars:7,consts:[[1,"pt-1","pl-1","pr-1"],["styleClass","full-body border-0 shadow-sm mb-5","orientation","horizontal",3,"panelSizes","minSizes"],["pTemplate",""],[1,"col","flex","align-items-center","justify-content-center","pl-0","pr-1"],[1,"col","flex","align-items-center","justify-content-center","pl-1","pr-0"]],template:function(a,s){1&a&&(e.j41(0,"div",0)(1,"p-splitter",1),e.DNE(2,we,2,0,"ng-template",2),e.DNE(3,ye,2,0,"ng-template",2),e.k0s()()),2&a&&(e.R7$(1),e.Aen(e.lJ4(4,Ae)),e.Y8G("panelSizes",e.lJ4(5,j))("minSizes",e.lJ4(6,j)))},dependencies:[S.Ei,V.O,G,T],encapsulation:2})}return r})(),canActivate:[M.Z]}];let Ee=(()=>{class r{static \u0275fac=function(a){return new(a||r)};static \u0275mod=e.$C({type:r});static \u0275inj=e.G2t({imports:[x.iI.forChild(Fe),X.u]})}return r})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[9036],{2290:(Dt,P,l)=>{l.d(P,{d:()=>c});var d=l(467),t=l(540),s=l(8727),f=l(5046),C=l(7326),g=l(7376),R=l(5632),G=l(6645),Pt=l(6589),Rt=l(5312),L=l(9561),D=l(1325),U=l(123),S=l(6129),m=l(6708),x=l(7337),M=l(7237),v=l(1987),y=l(3966),O=l(7060),$=l(1626),w=l(5779),F=l(4341),b=l(177),X=l(6146),T=l(7645),B=l(7515),Y=l(8542),K=l(5430),V=l(3534);const W=["funManFormC"],Q=["cloneApiModalC"];function J(n,o){if(1&n){const e=t.RV6();t.j41(0,"span",20),t.bIt("click",function(){t.eBV(e);const r=t.XpG(2);return t.Njj(r.edit())}),t.nrm(1,"i",21),t.k0s()}}function H(n,o){if(1&n){const e=t.RV6();t.j41(0,"span",22),t.bIt("click",function(){t.eBV(e);const r=t.XpG(2);return t.Njj(r.clone())}),t.nrm(1,"i",23),t.k0s()}}function z(n,o){if(1&n){const e=t.RV6();t.j41(0,"span",24),t.bIt("click",function(){t.eBV(e);const r=t.XpG(2);return t.Njj(r.removePermanentDialog())}),t.nrm(1,"i",25),t.k0s()}}function Z(n,o){if(1&n){const e=t.RV6();t.j41(0,"span")(1,"span",13),t.bIt("click",function(){t.eBV(e);const r=t.XpG();return t.Njj(r.navigateToTreeView())}),t.nrm(2,"i",14),t.k0s(),t.j41(3,"span",15),t.bIt("click",function(){t.eBV(e);const r=t.XpG();return t.Njj(r.add())}),t.nrm(4,"i",16),t.k0s(),t.DNE(5,J,2,0,"span",17),t.DNE(6,H,2,0,"span",18),t.DNE(7,z,2,0,"span",19),t.k0s()}if(2&n){const e=t.XpG();t.R7$(5),t.Y8G("ngIf",1===e.selectedRows.length),t.R7$(1),t.Y8G("ngIf",1===e.selectedRows.length),t.R7$(1),t.Y8G("ngIf",1===e.selectedRows.length)}}function q(n,o){if(1&n){const e=t.RV6();t.j41(0,"span",26)(1,"label",27)(2,"p-checkbox",28),t.bIt("ngModelChange",function(r){t.eBV(e);const p=t.XpG();return t.Njj(p.eventCenterS.group.apisRegex.allCustomApis=r)}),t.k0s()()()}if(2&n){const e=t.XpG();t.R7$(2),t.Y8G("ngModel",e.eventCenterS.group.apisRegex.allCustomApis)("binary",!0)}}function tt(n,o){if(1&n){const e=t.RV6();t.j41(0,"span",26)(1,"label",27)(2,"p-checkbox",28),t.bIt("ngModelChange",function(r){t.eBV(e);const p=t.XpG();return t.Njj(p.eventCenterS.filterInLog.apisRegex.allCustomApis=r)}),t.k0s()()()}if(2&n){const e=t.XpG();t.R7$(2),t.Y8G("ngModel",e.eventCenterS.filterInLog.apisRegex.allCustomApis)("binary",!0)}}function et(n,o){if(1&n&&(t.j41(0,"div")(1,"div",29),t.EFF(2),t.k0s()()),2&n){const e=t.XpG();t.R7$(2),t.JRh(e.constantsS.group.allCustomApisPermitted)}}function nt(n,o){1&n&&(t.j41(0,"th",39),t.nrm(1,"p-tableHeaderCheckbox"),t.k0s())}function st(n,o){1&n&&t.nrm(0,"th",37)}function it(n,o){1&n&&(t.j41(0,"th"),t.EFF(1,"Authorization"),t.k0s())}function ot(n,o){1&n&&t.nrm(0,"th")}function at(n,o){1&n&&t.nrm(0,"th",40)}function rt(n,o){if(1&n&&(t.j41(0,"tr"),t.DNE(1,nt,2,0,"th",35),t.DNE(2,st,1,0,"th",36),t.nrm(3,"th",37),t.j41(4,"th"),t.EFF(5,"Name"),t.k0s(),t.j41(6,"th"),t.EFF(7,"Path"),t.k0s(),t.DNE(8,it,2,0,"th",5),t.DNE(9,ot,1,0,"th",5),t.DNE(10,at,1,0,"th",38),t.k0s()),2&n){const e=t.XpG(2);t.R7$(1),t.Y8G("ngIf",e.showCheckbox),t.R7$(1),t.Y8G("ngIf",!e.isDependentOnGroup&&!e.isLPM&&!e.isFilterLogTable),t.R7$(6),t.Y8G("ngIf",!e.isDependentOnGroup&&!e.isLPM&&!e.isFilterLogTable),t.R7$(1),t.Y8G("ngIf",e.isLPM),t.R7$(1),t.Y8G("ngIf",!e.isDependentOnGroup&&!e.isLPM&&!e.isFilterLogTable)}}function lt(n,o){if(1&n&&(t.j41(0,"td"),t.nrm(1,"p-tableCheckbox",46),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(1),t.Y8G("value",e)("pSelectableRow",e)}}function ct(n,o){if(1&n&&(t.j41(0,"td",47)(1,"span"),t.EFF(2),t.k0s()()),2&n){const e=t.XpG().rowIndex;t.R7$(2),t.JRh(e+1)}}function pt(n,o){1&n&&t.nrm(0,"i",48)}function dt(n,o){1&n&&t.nrm(0,"i",49)}function _t(n,o){1&n&&(t.j41(0,"span",53),t.EFF(1,"AM-User"),t.k0s())}function mt(n,o){1&n&&(t.j41(0,"span",54),t.EFF(1,"No-Access"),t.k0s())}function ut(n,o){1&n&&(t.j41(0,"span",55),t.EFF(1,"Public"),t.k0s())}function ft(n,o){1&n&&(t.j41(0,"span",54),t.EFF(1,"DB-User"),t.k0s())}function gt(n,o){1&n&&(t.j41(0,"span",54),t.EFF(1,"AWS"),t.k0s())}function ht(n,o){1&n&&(t.j41(0,"span",54),t.EFF(1,"Azure"),t.k0s())}function Ct(n,o){1&n&&(t.j41(0,"span",54),t.EFF(1,"Google"),t.k0s())}function vt(n,o){if(1&n&&(t.j41(0,"td"),t.DNE(1,_t,2,0,"span",50),t.DNE(2,mt,2,0,"span",51),t.DNE(3,ut,2,0,"span",52),t.DNE(4,ft,2,0,"span",51),t.DNE(5,gt,2,0,"span",51),t.DNE(6,ht,2,0,"span",51),t.DNE(7,Ct,2,0,"span",51),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(1),t.Y8G("ngIf",e.hasAmAuth),t.R7$(1),t.Y8G("ngIf",e.noAccess),t.R7$(1),t.Y8G("ngIf",e.isPublic),t.R7$(1),t.Y8G("ngIf",e.hasAmDBAuth),t.R7$(1),t.Y8G("ngIf",e.hasAwsAuth),t.R7$(1),t.Y8G("ngIf",e.hasAzureAuth),t.R7$(1),t.Y8G("ngIf",e.hasGoogleAuth)}}function Tt(n,o){if(1&n){const e=t.RV6();t.j41(0,"div")(1,"label",56)(2,"p-checkbox",57),t.bIt("ngModelChange",function(r){t.eBV(e);const p=t.XpG(2).$implicit;return t.Njj(p.saveResponseInLog=r)})("ngModelChange",function(){t.eBV(e);const r=t.XpG(4);return t.Njj(r.saveResponseInLogCheckData())})("click",function(r){t.eBV(e);const p=t.XpG(4);return t.Njj(p.generalS.stopPropagation(r))}),t.k0s()()()}if(2&n){const e=t.XpG(2).$implicit;t.R7$(2),t.Y8G("ngModel",e.saveResponseInLog)("binary",!0)}}function k(n,o){if(1&n&&(t.j41(0,"td"),t.DNE(1,Tt,3,2,"div",5),t.k0s()),2&n){const e=t.XpG().$implicit,i=t.XpG(2);t.R7$(1),t.Y8G("ngIf",(null==i.selectedRows?null:i.selectedRows.indexOf(e))>=0)}}const At=function(){return["/api-info/api-testing/testing"]},j=function(n,o,e){return{at_category:n,at_user:o,at_api:e}};function N(n,o){if(1&n&&(t.j41(0,"td")(1,"div",47)(2,"a",58),t.bIt("click",function(i){return i.stopPropagation()}),t.nrm(3,"i",59),t.k0s()()()),2&n){const e=t.XpG().$implicit,i=t.XpG(2);t.R7$(2),t.Y8G("routerLink",t.lJ4(2,At))("queryParams",t.sMw(3,j,i.EAPICategory.CUSTOM_APIS,i.authCS.getUserId(),e._id))}}const It=function(n,o,e,i){return{get:n,put:o,post:e,delete:i}};function Gt(n,o){if(1&n&&(t.j41(0,"tr",41),t.DNE(1,lt,2,2,"td",5),t.DNE(2,ct,3,1,"td",42),t.j41(3,"td")(4,"span",43),t.EFF(5),t.k0s()(),t.j41(6,"td")(7,"span"),t.EFF(8),t.k0s(),t.DNE(9,pt,1,0,"i",44),t.DNE(10,dt,1,0,"i",45),t.k0s(),t.j41(11,"td"),t.EFF(12),t.k0s(),t.DNE(13,vt,8,7,"td",5),t.DNE(14,k,2,1,"td",5),t.DNE(15,N,4,7,"td",5),t.k0s()),2&n){const e=o.$implicit,i=t.XpG(2);t.Y8G("pSelectableRow",e),t.R7$(1),t.Y8G("ngIf",i.showCheckbox),t.R7$(1),t.Y8G("ngIf",!i.isDependentOnGroup&&!i.isLPM&&!i.isFilterLogTable),t.R7$(2),t.Y8G("ngClass",t.ziG(12,It,e.requestMethod===i.ERequestMethod.GET,e.requestMethod===i.ERequestMethod.PUT,e.requestMethod===i.ERequestMethod.POST,e.requestMethod===i.ERequestMethod.DELETE)),t.R7$(1),t.JRh(e.requestMethod),t.R7$(3),t.JRh(e.name),t.R7$(1),t.Y8G("ngIf",e.runOnNativeProcess),t.R7$(1),t.Y8G("ngIf",e.enableCaching),t.R7$(2),t.JRh(e.path),t.R7$(1),t.Y8G("ngIf",!i.isDependentOnGroup&&!i.isLPM&&!i.isFilterLogTable),t.R7$(1),t.Y8G("ngIf",i.isLPM),t.R7$(1),t.Y8G("ngIf",!i.isDependentOnGroup&&!i.isLPM&&!i.isFilterLogTable)}}function Et(n,o){1&n&&t.nrm(0,"p-progressSpinner",60)}function a(n,o){if(1&n){const e=t.RV6();t.j41(0,"div",30)(1,"p-table",31),t.bIt("selectionChange",function(r){t.eBV(e);const p=t.XpG();return t.Njj(p.selectedRows=r)})("selectionChange",function(r){t.eBV(e);const p=t.XpG();return t.Njj(p.functionSelected(r))})("dblclick",function(r){t.eBV(e);const p=t.XpG();return t.Njj(p.dblClickCustomAPIsGrid(r))}),t.DNE(2,rt,11,5,"ng-template",32),t.DNE(3,Gt,16,17,"ng-template",33),t.k0s(),t.DNE(4,Et,1,0,"p-progressSpinner",34),t.k0s()}if(2&n){const e=t.XpG();t.R7$(1),t.Y8G("selectionMode","multiple")("metaKeySelection",e.metaKeySelection)("selection",e.selectedRows)("dataKey",e.gridKey)("scrollable",!0)("value",e.rows),t.R7$(3),t.Y8G("ngIf",e.loading.grid)}}let c=(()=>{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.X.ADD,eventChannel:new t.bkB,formData:void 0};rows=[];rowsMap={};rowsMapName={};showAll=!1;selectedRows=[];gridKey=G.GX._id;EUserType=D.l;BE_HOST_PORT=Rt.c.BE_HOST_PORT;EAPICategory=R.O;ERequestMethod=Pt.mO;FunManFormC;cloneApiModalC;constructor(e,i,r,p,A,_,u,I,E,h,St){this.functionS=e,this.generalS=i,this.notificationS=r,this.navigationCS=p,this.authCS=A,this.constantsS=_,this.eventCenterS=u,this.cd=I,this.router=E,this.http=h,this.confirmationService=St}ngOnInit(){var e=this;this.eventCenterS.functions.selectedFunctions.next([]),this.loadGridData(),this.subscriptions.push(this.data.eventChannel.subscribe(i=>{this.FunManFormC.hideModal(),this.loadGridData()})),this.isDependentOnGroup&&this.subscriptions.push(this.eventCenterS.group.selectedGroups.subscribe(function(){var i=(0,d.A)(function*(r){r.length&&(yield e.loadGridData())});return function(r){return i.apply(this,arguments)}}())),(this.isFilterLogTable||this.isLPM)&&this.subscriptions.push(this.eventCenterS.filterInLog.refreshGrid.subscribe(i=>{i&&this.loadGridData()})),this.isLPM&&this.subscriptions.push(this.eventCenterS.filterInLog.functionIds.subscribe((0,d.A)(function*(){e.loadGridData()}))),this.generalS.setNewTitle("API Maker - Custom APIs")}navigateToTreeView(){var e=this;return(0,d.A)(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 i={find:{user:this.authCS.getUserId(),active:!0},select:{name:1,label:1,path:1,active:1,requestMethod:1,runOnNativeProcess:1,enableCaching:1,apiAccessType:1},sort:{path:1}};this.showAll&&delete i.find.active,this.subscriptions.push(this.functionS.query(i,"getAuthData=true").subscribe(function(){var r=(0,d.A)(function*(p){p.success?(e.selectedRows=[],e.rows=p.data||[],e.rowsMap=g.keyBy(e.rows,G.GX._id),e.rowsMapName=g.keyBy(e.rows,G.dG.name)):e.resetGridAndUrl();const A=e.navigationCS.getQueryParam(C.F.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(","),u=g.intersection(g.keys(e.rowsMap),_),I=[];for(const h of u)e.rowsMap[h]&&I.push(e.rowsMap[h]);const E=[];for(const h of u)e.rowsMap[h]&&E.push(e.rowsMap[h]);e.selectedRows=E,e.eventCenterS.functions.selectedFunctions.next(I)}if(e.isLPM&&e.eventCenterS.group.selectedGroups.value[0]?.queryParams?.customApiNames?.length){const _=e.eventCenterS.group.selectedGroups.value[0];for(const u of _?.queryParams?.customApiNames)e.rowsMapName[u]&&(e.rowsMapName[u].saveResponseInLog=_.functionsLog?.[u]?.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(p){return r.apply(this,arguments)}}()))}add(){this.data.formData=void 0,this.data.mode=f.X.ADD,this.data.eventChannel.emit({action:s.K.OPEN_FORM_IN_ADD_MODE}),this.FunManFormC.showModal()}view(){this.data.formData=this.rowsMap[this.getSelectedRowId()],this.data.mode=f.X.VIEW,this.data.eventChannel.emit({action:s.K.OPEN_FORM_IN_VIEW_MODE}),this.FunManFormC.showModal()}edit(){this.data.formData=this.rowsMap[this.getSelectedRowId()],this.data.mode=f.X.EDIT,this.data.eventChannel.emit({action:s.K.OPEN_FORM_IN_EDIT_MODE}),this.FunManFormC.showModal()}removePermanentDialog(){var i,e=this;this.confirmationService.confirm({message:this.constantsS.functions.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,d.A)(function*(){yield e.removePermanent()}),function(){return i.apply(this,arguments)})})}removePermanent(){var e=this;return(0,d.A)(function*(){if(e.getSelectedRowId()){e.loading.grid=!0;try{const i=`${e.getSelectedRowGuid()}:${e.authCS.gUser._id}`,r=yield e.functionS.permanentDelete(i).toPromise();r.success?(e.notificationS.showSuccess(e.constantsS.functions.removePermanent),e.resetGridAndUrl(),e.loadGridData()):e.notificationS.showErrorFromResponse(r,e.constantsS.functions.removePermanentError)}catch{e.notificationS.showError(e.constantsS.functions.removePermanentError)}e.loading.grid=!1}})()}resetDependents(){var e=this;return(0,d.A)(function*(){e.eventCenterS.functions.selectedFunctions.next([]),yield e.navigationCS.setQueryParam(C.F.custom_api,null)})()}functionSelected(e){var i=this;return(0,d.A)(function*(){i.selectedRows=e,i.resetDependents().then();for(const r of i.rows)-1===i.selectedRows.indexOf(r)&&(r.saveResponseInLog=!1);i.fillData().then(),i.getSelectedRowId()?i.generalS.setNewTitle(i.rowsMap[i.getSelectedRowId()].name,R.O.CUSTOM_APIS):i.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.A)(function*(){if(!e.selectedRows||Array.isArray(e.selectedRows)&&!e.selectedRows.length)return yield e.navigationCS.setQueryParam(C.F.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 i=g.map(e.selectedRows,"_id");e.eventCenterS.group.customApiIds.next(i),e.eventCenterS.group.customApis.next(e.selectedRows),e.isFilterLogTable&&(e.eventCenterS.filterInLog.functionIds.next(i),e.eventCenterS.filterInLog.functions.next(e.selectedRows))}else{const i=e.getSelectedRowId(),r=(yield e.functionS.getById(i).toPromise()).data;r._id?(yield e.navigationCS.setQueryParam(C.F.custom_api,r._id),e.eventCenterS.functions.selectedFunctions.next([r])):e.resetDependents().then()}})()}getSelectedRowId(){return this.selectedRows[0]?._id}getSelectedRowGuid(){return this.selectedRows[0]?.guid}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.A)(function*(){yield e.cloneApiModalC.showModal(e.getSelectedRowId(),null,function(){var i=(0,d.A)(function*(r){r&&(yield e.loadGridData()),e.cd.detectChanges()});return function(r){return i.apply(this,arguments)}}())})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}EModelApiPaths=L.bd;static \u0275fac=function(i){return new(i||n)(t.rXU(U.a),t.rXU(S.f),t.rXU(m.m),t.rXU(x.$),t.rXU(M.l),t.rXU(v.X),t.rXU(y.d),t.rXU(t.gRc),t.rXU(O.Ix),t.rXU($.Qq),t.rXU(w.td))};static \u0275cmp=t.VBU({type:n,selectors:[["app-custom-api-grid"]],viewQuery:function(i,r){if(1&i&&(t.GBs(W,5),t.GBs(Q,5)),2&i){let p;t.mGM(p=t.lsd())&&(r.FunManFormC=p.first),t.mGM(p=t.lsd())&&(r.cloneApiModalC=p.first)}},inputs:{showCheckbox:"showCheckbox",isReadOnly:["IsReadOnly","isReadOnly"],isDependentOnGroup:["IsDependentOnGroup","isDependentOnGroup"],isLPM:"isLPM",isFilterLogTable:"isFilterLogTable",metaKeySelection:"metaKeySelection"},decls:17,vars:9,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["src","/assets/images/icons/custom.svg","alt","Custom API",1,"fa-fw","mr-1"],["href","https://docs.apimaker.dev/v1/docs/apis-all/custom-apis/user-created-custom-api.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],[4,"ngIf"],["class","float-right cursor-pointer","tooltipPosition","left","pTooltip","All Custom APIs",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["class","h-100",4,"ngIf"],[3,"data"],["funManFormC",""],[3,"modalId","hostAndPort","modelApiPaths"],["cloneApiModalC",""],[1,"float-right","cursor-pointer","ml-3",3,"click"],["tooltipPosition","left","pTooltip","Tree View","tooltipPosition","left",1,"fas","fa-sitemap","text-yellow","fa-fw","fa-rotate-270"],["tooltipPosition","left","pTooltip","Add New","tooltipPosition","left",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Permanent Delete",3,"click",4,"ngIf"],["tooltipPosition","left","pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["tooltipPosition","left","pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-light","fa-fw"],["tooltipPosition","left","pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],["tooltipPosition","left","pTooltip","All Custom APIs",1,"float-right","cursor-pointer"],[1,"mb-0","mt--2px"],[3,"ngModel","binary","ngModelChange"],[1,"p-2","text-center","text-success"],[1,"h-100"],["styleClass","p-datatable-striped custom-api-grid-height","scrollHeight","flex",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["style","width: 45px;",4,"ngIf"],["style","width: 80px;",4,"ngIf"],[2,"width","80px"],["style","width: 60px;",4,"ngIf"],[2,"width","45px"],[2,"width","60px"],[3,"pSelectableRow"],["class","text-center",4,"ngIf"],[1,"small","font-weight-bold","d-inline-block","mr-2",3,"ngClass"],["pTooltip","Running on native process","class","fas fa-radiation ml-2 text-danger",4,"ngIf"],["pTooltip","Caching enabled","class","fas fa-fighter-jet ml-2 text-warning",4,"ngIf"],[3,"value","pSelectableRow"],[1,"text-center"],["pTooltip","Running on native process",1,"fas","fa-radiation","ml-2","text-danger"],["pTooltip","Caching enabled",1,"fas","fa-fighter-jet","ml-2","text-warning"],["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(i,r){1&i&&(t.j41(0,"div",0)(1,"div",1)(2,"span"),t.nrm(3,"img",2),t.EFF(4," Custom APIs"),t.k0s(),t.j41(5,"a",3),t.nrm(6,"img",4),t.k0s(),t.DNE(7,Z,8,3,"span",5),t.DNE(8,q,3,2,"span",6),t.DNE(9,tt,3,2,"span",6),t.k0s(),t.j41(10,"div",7),t.DNE(11,et,3,1,"div",5),t.DNE(12,a,5,7,"div",8),t.k0s()(),t.nrm(13,"app-w-fun-man-form",9,10)(15,"app-clone-api-modal",11,12)),2&i&&(t.R7$(7),t.Y8G("ngIf",!r.isReadOnly),t.R7$(1),t.Y8G("ngIf",r.isDependentOnGroup),t.R7$(1),t.Y8G("ngIf",r.isFilterLogTable),t.R7$(2),t.Y8G("ngIf",r.eventCenterS.group.apisRegex.allCustomApis||r.eventCenterS.filterInLog.apisRegex.allCustomApis),t.R7$(1),t.Y8G("ngIf",!(r.eventCenterS.group.apisRegex.allCustomApis||r.eventCenterS.filterInLog.apisRegex.allCustomApis)),t.R7$(1),t.Y8G("data",r.data),t.R7$(2),t.Y8G("modalId","idCloneCustomAPIGrid")("hostAndPort",r.BE_HOST_PORT)("modelApiPaths",r.EModelApiPaths.CUSTOM_APIS))},dependencies:[O.Wk,F.BC,F.vS,b.YU,b.bT,X.K,T.XI,w.Ei,T.d5,T.S9,T.nA,B.p,Y.m,K.Sc,V.r],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})()},9036:(Dt,P,l)=>{l.r(P),l.d(P,{FunctionManM:()=>Et});var d=l(7060),t=l(177),s=l(540),f=l(5779);let L=(()=>{class a{static \u0275fac=function(o){return new(o||a)};static \u0275mod=s.$C({type:a});static \u0275inj=s.G2t({imports:[t.MD,f.Gg,f.Gg]})}return a})();var D=l(2173),U=l(1709),S=l(2290),m=l(467),x=l(8727),M=l(5046),v=l(7326),y=l(5632),O=l(6645),$=l(6589),w=l(5312),F=l(9561),b=l(1325),X=l(123),T=l(6129),B=l(6708),Y=l(7337),K=l(7237),V=l(1987),W=l(3966),Q=l(1626),J=l(6146),H=l(9861),z=l(7515),Z=l(8542),q=l(3534);const tt=["funManFormC"],et=["cloneApiModalC"];function nt(a,c){if(1&a){const n=s.RV6();s.j41(0,"span",21),s.bIt("click",function(){s.eBV(n);const e=s.XpG();return s.Njj(e.edit())}),s.nrm(1,"i",22),s.k0s()}}function st(a,c){if(1&a){const n=s.RV6();s.j41(0,"span",23),s.bIt("click",function(){s.eBV(n);const e=s.XpG();return s.Njj(e.clone())}),s.nrm(1,"i",24),s.k0s()}}function it(a,c){if(1&a){const n=s.RV6();s.j41(0,"span",25),s.bIt("click",function(){s.eBV(n);const e=s.XpG();return s.Njj(e.removePermanentDialog())}),s.nrm(1,"i",26),s.k0s()}}function ot(a,c){if(1&a&&(s.j41(0,"div"),s.EFF(1),s.k0s()),2&a){const n=s.XpG().$implicit;s.R7$(1),s.JRh(n.label)}}function at(a,c){1&a&&s.nrm(0,"i",40)}function rt(a,c){1&a&&s.nrm(0,"i",41)}function lt(a,c){1&a&&(s.j41(0,"span",42),s.EFF(1,"AM-User"),s.k0s())}function ct(a,c){1&a&&(s.j41(0,"span",43),s.EFF(1,"No-Access"),s.k0s())}function pt(a,c){1&a&&(s.j41(0,"span",44),s.EFF(1,"Public"),s.k0s())}function dt(a,c){1&a&&(s.j41(0,"span",43),s.EFF(1,"DB-User"),s.k0s())}function _t(a,c){1&a&&(s.j41(0,"span",43),s.EFF(1,"AWS"),s.k0s())}function mt(a,c){1&a&&(s.j41(0,"span",43),s.EFF(1,"Azure"),s.k0s())}function ut(a,c){1&a&&(s.j41(0,"span",43),s.EFF(1,"Google"),s.k0s())}const ft=function(a,c,n,o){return{get:a,put:c,post:n,delete:o}},gt=function(){return["/api-info/api-testing/testing"]},ht=function(a,c,n){return{at_category:a,at_user:c,at_api:n}};function Ct(a,c){if(1&a&&(s.j41(0,"div")(1,"div")(2,"table",29)(3,"tr")(4,"td",30)(5,"span",31),s.EFF(6),s.k0s(),s.j41(7,"span")(8,"span"),s.EFF(9),s.k0s(),s.DNE(10,at,1,0,"i",32),s.DNE(11,rt,1,0,"i",33),s.k0s()(),s.j41(12,"td",30),s.EFF(13),s.k0s(),s.j41(14,"td"),s.DNE(15,lt,2,0,"span",34),s.DNE(16,ct,2,0,"span",35),s.DNE(17,pt,2,0,"span",36),s.DNE(18,dt,2,0,"span",35),s.DNE(19,_t,2,0,"span",35),s.DNE(20,mt,2,0,"span",35),s.DNE(21,ut,2,0,"span",35),s.k0s(),s.j41(22,"td",37)(23,"a",38),s.bIt("click",function(o){return o.stopPropagation()}),s.nrm(24,"i",39),s.k0s()()()()()()),2&a){const n=s.XpG().$implicit,o=s.XpG();s.R7$(5),s.Y8G("ngClass",s.ziG(15,ft,n.data.requestMethod===o.ERequestMethod.GET,n.data.requestMethod===o.ERequestMethod.PUT,n.data.requestMethod===o.ERequestMethod.POST,n.data.requestMethod===o.ERequestMethod.DELETE)),s.R7$(1),s.JRh(n.data.requestMethod),s.R7$(3),s.JRh(n.data.name),s.R7$(1),s.Y8G("ngIf",n.data.runOnNativeProcess),s.R7$(1),s.Y8G("ngIf",n.data.enableCaching),s.R7$(2),s.JRh(n.data.path),s.R7$(2),s.Y8G("ngIf",n.data.hasAmAuth),s.R7$(1),s.Y8G("ngIf",n.data.noAccess),s.R7$(1),s.Y8G("ngIf",n.data.isPublic),s.R7$(1),s.Y8G("ngIf",n.data.hasAmDBAuth),s.R7$(1),s.Y8G("ngIf",n.data.hasAwsAuth),s.R7$(1),s.Y8G("ngIf",n.data.hasAzureAuth),s.R7$(1),s.Y8G("ngIf",n.data.hasGoogleAuth),s.R7$(2),s.Y8G("routerLink",s.lJ4(20,gt))("queryParams",s.sMw(21,ht,o.EAPICategory.CUSTOM_APIS,o.authCS.getUserId(),n.data._id))}}function vt(a,c){if(1&a&&(s.j41(0,"div",27),s.DNE(1,ot,2,1,"div",28),s.DNE(2,Ct,25,25,"div",28),s.k0s()),2&a){const n=c.$implicit;s.R7$(1),s.Y8G("ngIf",null==n.children?null:n.children.length),s.R7$(1),s.Y8G("ngIf",!(null!=n.children&&n.children.length))}}function Tt(a,c){1&a&&s.nrm(0,"p-progressSpinner",45)}let k=(()=>{class a{functionS;generalS;notificationS;navigationCS;authCS;constantsS;eventCenterS;cd;router;http;confirmationService;loading={grid:!1};subscriptions=[];data={mode:M.X.ADD,eventChannel:new s.bkB,formData:void 0};gridKey=O.GX._id;EUserType=b.l;BE_HOST_PORT=w.c.BE_HOST_PORT;EAPICategory=y.O;EQueryParam=v.F;leafSelected=!1;selectedRows=void 0;treeNodes=[];allTreeItemsMap={};FunManFormC;cloneApiModalC;constructor(n,o,e,i,r,p,A,_,u,I,E){this.functionS=n,this.generalS=o,this.notificationS=e,this.navigationCS=i,this.authCS=r,this.constantsS=p,this.eventCenterS=A,this.cd=_,this.router=u,this.http=I,this.confirmationService=E}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,m.A)(function*(){yield n.router.navigate(["api-info","custom-api","functions"])})()}loadTreeData(){var n=this;return(0,m.A)(function*(){const o=(yield n.functionS.getCustomAPITree().toPromise()).data;for(const i of o)n.generalS.convertKTreeItemToPrimeNGTreeItem(i);const e={};n.generalS.getMapOfAllItems(e,o);for(const i of Object.keys(e)){const r=n.allTreeItemsMap[i];r&&(e[i].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=M.X.ADD,this.data.eventChannel.emit({action:x.K.OPEN_FORM_IN_ADD_MODE}),this.FunManFormC.showModal()}edit(){this.leafSelected&&(this.data.formData=this.selectedRows[0].data,this.data.mode=M.X.EDIT,this.data.eventChannel.emit({action:x.K.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,m.A)(function*(){yield n.removePermanent()}),function(){return o.apply(this,arguments)})})}removePermanent(){var n=this;return(0,m.A)(function*(){if(n.getSelectedRowId()){n.loading.grid=!0;try{const o=`${n.getSelectedRowGuid()}:${n.authCS.gUser._id}`,e=yield n.functionS.permanentDelete(o).toPromise();e.success?(n.notificationS.showSuccess(n.constantsS.functions.removePermanent),n.resetGridAndUrl(),yield n.loadTreeData(),n.leafSelected=!1):n.notificationS.showErrorFromResponse(e,n.constantsS.functions.removePermanentError)}catch{n.notificationS.showError(n.constantsS.functions.removePermanentError)}n.loading.grid=!1}})()}resetDependents(){var n=this;return(0,m.A)(function*(){yield n.navigationCS.setQueryParam(v.F.custom_api,null)})()}functionSelected(){var n=this;return(0,m.A)(function*(){n.resetDependents(),n.fillData(),n.getSelectedRowId()?n.generalS.setNewTitle(n.selectedRows[0].data.name,y.O.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,m.A)(function*(){if(!n.selectedRows)return void(yield n.navigationCS.setQueryParam(v.F.custom_api,""));const o=n.getSelectedRowId();o?yield n.navigationCS.setQueryParam(v.F.custom_api,o):n.resetDependents()})()}getSelectedRowId(){return this.selectedRows?.[0]?.data?._id}getSelectedRowGuid(){return this.selectedRows?.[0]?.data?.guid}dblClickCustomAPIsGrid(){setTimeout(()=>{this.edit()},10)}clone(){var n=this;return(0,m.A)(function*(){yield n.cloneApiModalC.showModal(n.getSelectedRowId(),null,function(){var o=(0,m.A)(function*(e){e&&(yield n.loadTreeData()),n.cd.detectChanges()});return function(e){return o.apply(this,arguments)}}())})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}ERequestMethod=$.mO;EModelApiPaths=F.bd;static \u0275fac=function(o){return new(o||a)(s.rXU(X.a),s.rXU(T.f),s.rXU(B.m),s.rXU(Y.$),s.rXU(K.l),s.rXU(V.X),s.rXU(W.d),s.rXU(s.gRc),s.rXU(d.Ix),s.rXU(Q.Qq),s.rXU(f.td))};static \u0275cmp=s.VBU({type:a,selectors:[["app-custom-api-tree"]],viewQuery:function(o,e){if(1&o&&(s.GBs(tt,5),s.GBs(et,5)),2&o){let i;s.mGM(i=s.lsd())&&(e.FunManFormC=i.first),s.mGM(i=s.lsd())&&(e.cloneApiModalC=i.first)}},decls:24,vars:10,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["src","/assets/images/icons/custom.svg","alt","Custom API",1,"fa-fw","mr-1"],["href","https://docs.apimaker.dev/v1/docs/apis-all/custom-apis/user-created-custom-api.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],[1,"float-right","cursor-pointer","ml-3",3,"click"],["pTooltip","Grid View",1,"fas","fa-table","text-yellow","fa-fw"],["pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],[1,"h-100"],["scrollHeight","calc(100vh - 82px)","selectionMode","multiple",1,"w-full",3,"value","selection","selectionChange","dblclick"],["pTemplate","default"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"data"],["funManFormC",""],[3,"modalId","hostAndPort","modelApiPaths"],["cloneApiModalC",""],["pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-light","fa-fw"],["pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],[1,"w-100","prevent-text-selection","cursor-pointer"],[4,"ngIf"],[1,"w-100"],[2,"width","40%"],[1,"small","font-weight-bold","d-inline-block","mr-2",3,"ngClass"],["pTooltip","Running on native process","class","fas fa-radiation ml-2 text-danger",4,"ngIf"],["pTooltip","Caching enabled","class","fas fa-fighter-jet ml-2 text-warning",4,"ngIf"],["class","d-inline-block small font-weight-bold font-monospaced ml-2",4,"ngIf"],["class","d-inline-block small font-weight-bold font-monospaced text-success ml-2",4,"ngIf"],["class","d-inline-block small font-weight-bold font-monospaced text-warning ml-2",4,"ngIf"],[2,"text-align","right"],["href","javascript:",1,"btn","btn-xsm-custom","mr-3",3,"routerLink","queryParams","click"],[1,"fas","fa-vial","text-info","fa-fw","test-tube","pt-1"],["pTooltip","Running on native process",1,"fas","fa-radiation","ml-2","text-danger"],["pTooltip","Caching enabled",1,"fas","fa-fighter-jet","ml-2","text-warning"],[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&&(s.j41(0,"div",0)(1,"div",1)(2,"span"),s.nrm(3,"img",2),s.EFF(4," Custom APIs"),s.k0s(),s.j41(5,"a",3),s.nrm(6,"img",4),s.k0s(),s.j41(7,"span")(8,"span",5),s.bIt("click",function(){return e.navigateToGridView()}),s.nrm(9,"i",6),s.k0s(),s.j41(10,"span",7),s.bIt("click",function(){return e.add()}),s.nrm(11,"i",8),s.k0s(),s.DNE(12,nt,2,0,"span",9),s.DNE(13,st,2,0,"span",10),s.DNE(14,it,2,0,"span",11),s.k0s()(),s.j41(15,"div",12)(16,"div",13)(17,"p-tree",14),s.bIt("selectionChange",function(r){return e.selectedRows=r})("dblclick",function(){return e.dblClickCustomAPIsGrid()})("selectionChange",function(){return e.functionSelected()}),s.DNE(18,vt,3,2,"ng-template",15),s.k0s(),s.DNE(19,Tt,1,0,"p-progressSpinner",16),s.k0s()()(),s.nrm(20,"app-w-fun-man-form",17,18)(22,"app-clone-api-modal",19,20)),2&o&&(s.R7$(12),s.Y8G("ngIf",e.leafSelected),s.R7$(1),s.Y8G("ngIf",e.leafSelected),s.R7$(1),s.Y8G("ngIf",e.leafSelected),s.R7$(3),s.Y8G("value",e.treeNodes)("selection",e.selectedRows),s.R7$(2),s.Y8G("ngIf",e.loading.grid),s.R7$(1),s.Y8G("data",e.data),s.R7$(2),s.Y8G("modalId","idCloneCustomAPITree")("hostAndPort",e.BE_HOST_PORT)("modelApiPaths",e.EModelApiPaths.CUSTOM_APIS))},dependencies:[d.Wk,t.YU,t.bT,J.K,f.Ei,H.PH,z.p,Z.m,q.r],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 At=l(3488);const It=[{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)(s.rXU(d.nX))};static \u0275cmp=s.VBU({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&&(s.j41(0,"div",0),s.nrm(1,"app-custom-api-tree"),s.k0s())},dependencies:[k],encapsulation:2})}return a})(),canActivate:[D.Z]},{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)(s.rXU(d.nX))};static \u0275cmp=s.VBU({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&&(s.j41(0,"div",0),s.nrm(1,"app-custom-api-grid",1),s.k0s()),2&o&&(s.R7$(1),s.Y8G("showCheckbox",!1))},dependencies:[S.d],encapsulation:2})}return a})(),canActivate:[D.Z]}];let Et=(()=>{class a{static \u0275fac=function(o){return new(o||a)};static \u0275mod=s.$C({type:a});static \u0275inj=s.G2t({imports:[d.iI.forChild(It),U.u,At.d,L]})}return a})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[9347],{9347:(m,a,n)=>{n.r(a),n.d(a,{MonitoringM:()=>l});var r=n(7060),s=n(1709),e=n(2173),o=n(540);const u=[{path:"main",component:(()=>{class t{constructor(){}ngOnInit(){}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=o.VBU({type:t,selectors:[["app-monitoring-c"]],decls:2,vars:0,template:function(i,f){1&i&&(o.j41(0,"h1"),o.EFF(1,"Monitoring"),o.k0s())},encapsulation:2})}return t})(),canActivate:[e.Z]}];let l=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=o.$C({type:t});static \u0275inj=o.G2t({imports:[r.iI.forChild(u),s.u]})}return t})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[9429],{9429:(m,c,s)=>{s.r(c),s.d(c,{DashDevM:()=>v});var e=s(7060),r=s(1709),a=s(540),i=s(4218);let d=(()=>{class t{constructor(){}ngOnInit(){}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=a.VBU({type:t,selectors:[["app-dash-dev"]],decls:4,vars:1,consts:[[1,"pt-1"],[1,"row","ml-0","mr-0"],[1,"col-6","pl-1","pr-1","full-body"],[3,"showCheckbox"]],template:function(n,f){1&n&&(a.j41(0,"div",0)(1,"div",1)(2,"div",2),a.nrm(3,"app-w-instances",3),a.k0s()()()),2&n&&(a.R7$(3),a.Y8G("showCheckbox",!1))},dependencies:[i._],encapsulation:2})}return t})();var l=s(2818);const p=[{path:"",component:d,canActivate:[s(2173).Z]}];let v=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=a.$C({type:t});static \u0275inj=a.G2t({imports:[e.iI.forChild(p),r.u,l.DashboardM]})}return t})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[9882],{9882:(lt,g,r)=>{r.r(g),r.d(g,{ProcessInitializersM:()=>Z});var m=r(7060),y=r(1709),w=r(2173),t=r(540),l=r(467),c=r(7376),d=r(8727),h=r(5046),p=r(7326),I=r(6645),R=r(5632),T=r(1325),D=r(9818),E=r(6129),v=r(6708),x=r(7337),k=r(7237),C=r(1987),_=r(3966),G=r(2396),F=r(6268),z=r(5779),X=r(177),f=r(7645),A=r(7515),j=r(8542),L=r(846);const M=["processInitializersFormC"];function U(n,o){if(1&n){const e=t.RV6();t.j41(0,"span",17),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.edit())}),t.nrm(1,"i",18),t.k0s()}}function b(n,o){if(1&n){const e=t.RV6();t.j41(0,"span",19),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.clone())}),t.nrm(1,"i",20),t.k0s()}}function N(n,o){if(1&n){const e=t.RV6();t.j41(0,"span",21),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.removePermanent())}),t.nrm(1,"i",22),t.k0s()}}function $(n,o){1&n&&(t.j41(0,"th",26),t.nrm(1,"p-tableHeaderCheckbox"),t.k0s())}function O(n,o){if(1&n&&(t.j41(0,"tr"),t.DNE(1,$,2,0,"th",23),t.nrm(2,"th",24),t.j41(3,"th",25),t.EFF(4,"Order"),t.k0s(),t.j41(5,"th"),t.EFF(6,"Name"),t.k0s(),t.nrm(7,"th",25),t.k0s()),2&n){const e=t.XpG();t.R7$(1),t.Y8G("ngIf",e.showCheckbox)}}function Y(n,o){if(1&n&&(t.j41(0,"td"),t.nrm(1,"p-tableCheckbox",33),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(1),t.Y8G("value",e)("pSelectableRow",e)}}function K(n,o){1&n&&t.nrm(0,"i",34)}const B=function(){return["/api-info/api-testing/testing"]},V=function(n,o,e){return{at_category:n,at_user:o,at_api:e}};function Q(n,o){if(1&n&&(t.j41(0,"tr",27),t.DNE(1,Y,2,2,"td",28),t.j41(2,"td"),t.DNE(3,K,1,0,"i",29),t.k0s(),t.j41(4,"td"),t.EFF(5),t.k0s(),t.j41(6,"td"),t.EFF(7),t.k0s(),t.j41(8,"td")(9,"div",30)(10,"a",31),t.bIt("click",function(s){return s.stopPropagation()}),t.nrm(11,"i",32),t.k0s()()()()),2&n){const e=o.$implicit,s=t.XpG();t.Y8G("pSelectableRow",e),t.R7$(1),t.Y8G("ngIf",s.showCheckbox),t.R7$(2),t.Y8G("ngIf",e.isScriptExecutedCalculated),t.R7$(2),t.JRh(e.order),t.R7$(2),t.JRh(e.name),t.R7$(3),t.Y8G("routerLink",t.lJ4(7,B))("queryParams",t.sMw(8,V,s.EAPICategory.PROCESS_INITIALIZER,s.authCS.getUserId(),e._id))}}function J(n,o){1&n&&t.nrm(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.X.ADD,eventChannel:new t.bkB,formData:void 0};rows=[];rowsMap={};showAll=!1;EUserType=T.l;gridKey=I.GX._id;EAPICategory=R.O;selectedRows=[];processInitializersFormC;constructor(e,s,i,a,u,q,tt,et,it,st,nt,rt,at,ot){this.processInitializersS=e,this.generalS=s,this.notificationS=i,this.navigationCS=a,this.authCS=u,this.constantsS=q,this.eventCenterS=tt,this.router=et,this.userS=it,this.instanceS=st,this.ns=nt,this.cs=rt,this.confirmationService=at,this.cd=ot}ngOnInit(){var e=this;return(0,l.A)(function*(){e.eventCenterS.processInitializers.selectedInitializer.next(void 0),yield e.loadGridData(),e.subscriptions.push(e.data.eventChannel.subscribe(function(){var s=(0,l.A)(function*(i){(i.action===d.K.SAVED||i.action===d.K.UPDATED)&&(e.processInitializersFormC.hideModal(),yield e.loadGridData())});return function(i){return s.apply(this,arguments)}}())),e.generalS.setNewTitle("API Maker - Process Initializers")})()}loadGridData(){var e=this;return(0,l.A)(function*(){e.loading.grid=!0;const s={find:{user:e.authCS.getUserId(),active:!0},select:{name:1,label:1,active:1,user:1,order:1},sort:{order:1}};e.showAll&&delete s.find.active;const i=yield e.processInitializersS.query(s).toPromise();i&&(e.selectedRows=[],e.rows=i.data,e.rowsMap=c.keyBy(e.rows,I.GX._id));let a=e.navigationCS.getQueryParam(p.F.am_process_initializer);a&&!e.rowsMap[a]&&e.rows.length&&(a=e.rows[0]._id),e.rowsMap[a]?(e.selectedRows=[e.rowsMap[a]],yield e.fillData()):e.eventCenterS.processInitializers.selectedInitializer.next(void 0),e.loading.grid=!1,e.cd.detectChanges()})()}add(){this.data.formData={order:(c.max(c.map(this.rows,"order"))||0)+1},this.data.mode=h.X.ADD,this.data.eventChannel.emit({action:d.K.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.X.EDIT,this.data.eventChannel.emit({action:d.K.OPEN_FORM_IN_EDIT_MODE}),this.processInitializersFormC.showModal()}clone(){var e=this;return(0,l.A)(function*(){try{if(!e.selectedRows[0]||!e.rowsMap[c.map(e.selectedRows,"_id")[0]])return;const s=e.rowsMap[c.map(e.selectedRows,"_id")[0]]._id,i=(yield e.processInitializersS.getById(s).toPromise()).data;delete i._id,i.name=`${i.name}-clone`,i.order=(c.max(c.map(e.rows,"order"))||0)+1,(yield e.processInitializersS.post(i).toPromise()).success?(e.notificationS.showSuccess(e.constantsS.processInitializer.cloneSuccess),e.loadGridData()):e.notificationS.showSuccess(e.constantsS.processInitializer.cloneSuccess)}catch{e.notificationS.showError(e.constantsS.processInitializer.cloneError)}})()}removePermanent(){var e=this;return(0,l.A)(function*(){var s;e.confirmationService.confirm({message:e.cs.processInitializer.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(s=(0,l.A)(function*(){for(const i of e.selectedRows)yield e.hardDelete(i._id);e.ns.showSuccess(e.cs.processInitializer.removePermanent),yield e.loadGridData()}),function(){return s.apply(this,arguments)})})})()}hardDelete(e){var s=this;return(0,l.A)(function*(){yield s.processInitializersS.permanentDelete(e).toPromise()})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.processInitializers.selectedInitializer.next(void 0)}resetThisUrl(){var e=this;return(0,l.A)(function*(){e.eventCenterS.processInitializers.selectedInitializer.next(void 0),yield e.navigationCS.setQueryParam(p.F.am_process_initializer,null)})()}itemSelected(){var e=this;return(0,l.A)(function*(){yield e.resetThisUrl(),setTimeout(e.fillData.bind(e))})()}fillData(){var e=this;return(0,l.A)(function*(){if(!e.selectedRows.length)return yield e.navigationCS.setQueryParam(p.F.am_process_initializer,""),void e.eventCenterS.processInitializers.selectedInitializer.next(null);const s=e.selectedRows[0];s?(yield e.navigationCS.setQueryParam(p.F.am_process_initializer,s._id),e.eventCenterS.processInitializers.selectedInitializer.next(s)):yield e.resetThisUrl()})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickProcessInitializer(){this.selectedRows.length&&this.edit()}static \u0275fac=function(s){return new(s||n)(t.rXU(D.o),t.rXU(E.f),t.rXU(v.m),t.rXU(x.$),t.rXU(k.l),t.rXU(C.X),t.rXU(_.d),t.rXU(m.Ix),t.rXU(G.N),t.rXU(F.J),t.rXU(v.m),t.rXU(C.X),t.rXU(z.td),t.rXU(t.gRc))};static \u0275cmp=t.VBU({type:n,selectors:[["app-process-initializers-list"]],viewQuery:function(s,i){if(1&s&&t.GBs(M,5),2&s){let a;t.mGM(a=t.lsd())&&(i.processInitializersFormC=a.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&&(t.j41(0,"div",0)(1,"div",1)(2,"span"),t.nrm(3,"img",2),t.EFF(4," Process Initializer"),t.k0s(),t.j41(5,"a",3),t.nrm(6,"img",4),t.k0s(),t.j41(7,"span",5),t.bIt("click",function(){return i.add()}),t.nrm(8,"i",6),t.k0s(),t.DNE(9,U,2,0,"span",7),t.DNE(10,b,2,0,"span",8),t.DNE(11,N,2,0,"span",9),t.k0s(),t.j41(12,"div",10)(13,"p-table",11),t.bIt("selectionChange",function(u){return i.selectedRows=u})("selectionChange",function(){return i.itemSelected()})("dblclick",function(){return i.dblClickProcessInitializer()}),t.DNE(14,O,8,1,"ng-template",12),t.DNE(15,Q,12,12,"ng-template",13),t.k0s(),t.DNE(16,J,1,0,"p-progressSpinner",14),t.k0s()(),t.nrm(17,"app-process-initializers-form",15,16)),2&s&&(t.R7$(9),t.Y8G("ngIf",i.selectedRows.length&&i.selectedRows.length<2),t.R7$(1),t.Y8G("ngIf",i.selectedRows.length&&i.selectedRows.length<2),t.R7$(1),t.Y8G("ngIf",i.selectedRows.length),t.R7$(2),t.Y8G("selectionMode","multiple")("metaKeySelection",!0)("selection",i.selectedRows)("dataKey",i.gridKey)("scrollable",!0)("value",i.rows),t.R7$(3),t.Y8G("ngIf",i.loading.grid),t.R7$(1),t.Y8G("data",i.data))},dependencies:[m.Wk,X.bT,f.XI,z.Ei,f.d5,f.S9,f.nA,A.p,j.m,L.s],encapsulation:2,changeDetection:0})}return n})(),P=(()=>{class n{constructor(){}ngOnInit(){}static \u0275fac=function(s){return new(s||n)};static \u0275cmp=t.VBU({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&&(t.j41(0,"div",0),t.nrm(1,"app-process-initializers-list"),t.k0s())},dependencies:[S],encapsulation:2})}return n})();var W=r(7152);const H=[{path:"main",component:P,canActivate:[w.Z]}];let Z=(()=>{class n{static \u0275fac=function(s){return new(s||n)};static \u0275mod=t.$C({type:n});static \u0275inj=t.G2t({imports:[m.iI.forChild(H),y.u,W.s]})}return n})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[9957],{9957:(A,c,o)=>{o.r(c),o.d(c,{UtilityClassesM:()=>P});var u=o(7060),p=o(1709),m=o(2173),C=o(467),d=o(5312),s=o(540),f=o(7454),v=o(177),T=o(219),O=o(3228);const h=["utilityClassesFormC"],g=["utilityClassesListC"],R=function(i,r){return{"col-3":i,"d-none":r}},S=function(i,r){return{"col-9":i,"col-12":r}};const F=[{path:"utility-classes-internal/main",component:(()=>{class i{cd;apiS;projectType="AM";BE_HOST_PORT=d.c.BE_HOST_PORT;DOCS_HOST_PORT=d.c.DOCS_HOST_PORT;loading={form:!1,response:!1};editorOptionsVersions={readOnly:!1,language:"typescript",contextmenu:!0};utilityClassesFormC;utilityClassesListC;constructor(t,e){this.cd=t,this.apiS=e}ngOnInit(){var t=this;setTimeout((0,C.A)(function*(){t.utilityClassesFormC.layout=t,t.utilityClassesFormC.heightClass="height-page",t.utilityClassesListC.utilityClassesForm=t.utilityClassesFormC,yield t.utilityClassesListC.init(),yield t.utilityClassesFormC.init(),t.utilityClassesFormC.cd.detectChanges()}),1e3)}saveVersionCode(t){var e=this;return(0,C.A)(function*(){const l=t;yield e.apiS.saveVersionCode(l)})()}static \u0275fac=function(e){return new(e||i)(s.rXU(s.gRc),s.rXU(f.a))};static \u0275cmp=s.VBU({type:i,selectors:[["app-utility-classes-layout"]],viewQuery:function(e,l){if(1&e&&(s.GBs(h,5),s.GBs(g,5)),2&e){let a;s.mGM(a=s.lsd())&&(l.utilityClassesFormC=a.first),s.mGM(a=s.lsd())&&(l.utilityClassesListC=a.first)}},decls:8,vars:19,consts:[["id","idUtilityClassesFormPanel",1,"pt-1","pl-1","pr-1","overflow-auto"],[1,"row","m-0","full-body"],[1,"p-0",3,"ngClass"],[3,"projectType","hostAndPort","isFromModal"],["utilityClassesListC",""],[3,"hostAndPort","editorOptionsVersions","docsHostAndPort","data","loading","projectType","saveVersionCode"],["utilityClassesFormC",""]],template:function(e,l){if(1&e&&(s.j41(0,"div",0)(1,"div",1)(2,"div",2),s.nrm(3,"app-utility-classes-list",3,4),s.k0s(),s.j41(5,"div",2)(6,"app-utility-classes-form",5,6),s.bIt("saveVersionCode",function(n){return l.saveVersionCode(n)}),s.k0s()()()()),2&e){const a=s.sdS(4),n=s.sdS(7);s.R7$(2),s.Y8G("ngClass",s.l_i(13,R,!n.isResponseCollapsed,n.isResponseCollapsed)),s.R7$(1),s.Y8G("projectType","AM")("hostAndPort",l.BE_HOST_PORT)("isFromModal",!1),s.R7$(2),s.xc7("display",a.selectedRows.length?"block":"none"),s.Y8G("ngClass",s.l_i(16,S,!n.isResponseCollapsed,n.isResponseCollapsed)),s.R7$(1),s.Y8G("hostAndPort",l.BE_HOST_PORT)("editorOptionsVersions",l.editorOptionsVersions)("docsHostAndPort",l.DOCS_HOST_PORT)("data",a.data)("loading",l.loading)("projectType","AM")}},dependencies:[v.YU,T.e,O.S]})}return i})(),canActivate:[m.Z]}];let P=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=s.$C({type:i});static \u0275inj=s.G2t({imports:[u.iI.forChild(F),p.u]})}return i})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[2076],{2938:(C,l,n)=>{n.r(l),n.d(l,{ApiInfoM:()=>m});var s=n(7060),d=n(1709),h=n(540);const o=[{path:"db-cell",loadChildren:()=>Promise.all([n.e(2818),n.e(807)]).then(n.bind(n,807)).then(t=>t.DbCellM)},{path:"third-party-api",loadChildren:()=>Promise.all([n.e(2818),n.e(807),n.e(3488),n.e(4344),n.e(9036),n.e(5826),n.e(5455),n.e(6415),n.e(4316)]).then(n.bind(n,4316)).then(t=>t.TpApiM)},{path:"custom-api",loadChildren:()=>Promise.all([n.e(3488),n.e(9036),n.e(6589)]).then(n.bind(n,9036)).then(t=>t.FunctionManM)},{path:"am-events",loadChildren:()=>Promise.all([n.e(7597),n.e(8970)]).then(n.bind(n,7597)).then(t=>t.AmEventsM)},{path:"web-socket-events",loadChildren:()=>Promise.all([n.e(4344),n.e(1351)]).then(n.bind(n,4344)).then(t=>t.WebSocketEventsM)},{path:"system-api",loadChildren:()=>Promise.all([n.e(5826),n.e(3732)]).then(n.bind(n,5826)).then(t=>t.SystemApiM)},{path:"schedulers",loadChildren:()=>Promise.all([n.e(1468),n.e(1959)]).then(n.bind(n,1959)).then(t=>t.SchedulerManM)},{path:"process-initializers",loadChildren:()=>Promise.all([n.e(7152),n.e(9882)]).then(n.bind(n,9882)).then(t=>t.ProcessInitializersM)},{path:"db-masters",loadChildren:()=>n.e(4689).then(n.bind(n,4689)).then(t=>t.DbMastersM)},{path:"api-testing",loadChildren:()=>Promise.all([n.e(2818),n.e(807),n.e(3488),n.e(1468),n.e(3621),n.e(7759),n.e(7152),n.e(4774)]).then(n.bind(n,2393)).then(t=>t.ApiTestingM)}];let m=(()=>{class t{static \u0275fac=function(M){return new(M||t)};static \u0275mod=h.$C({type:t});static \u0275inj=h.G2t({imports:[s.iI.forChild(o),d.u]})}return t})()}}]);