@sava-info-systems/api-maker-with-extensions 1.19.7 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/1025.95948d3d2668bb14.js +1 -0
- package/dist/1097.51fa3413ab19b10c.js +1 -0
- package/dist/148.1dc7d9e0cfe45510.js +1 -0
- package/dist/1558.0aae3e5c538d3815.js +1 -0
- package/dist/1617.ae52a2c64a228ace.js +1 -0
- package/dist/1678.d009ae459b731b2d.js +1 -0
- package/dist/1754.691f142aa1eabe28.js +1 -0
- package/dist/1928.5c81326985ca5f64.js +1 -0
- package/dist/1957.ab7fda21d9978597.js +1 -0
- package/dist/2140.1ce150285aebe3cc.js +1 -0
- package/dist/2295.4fa1d4b5ff482f3a.js +1 -0
- package/dist/238.891233aa670bdd2b.js +1 -0
- package/dist/2473.4b2bb1ad5b1cc99d.js +1 -0
- package/dist/2714.9880836f6b8b78a7.js +1 -0
- package/dist/2735.a66ecf607b9654e0.js +1 -0
- package/dist/2908.c26d49c83d4cbc85.js +1 -0
- package/dist/3081.cd465078d391b50b.js +1 -0
- package/dist/3139.8a9b45f6545e48f4.js +1 -0
- package/dist/3450.9b5cfc83039b02b5.js +1 -0
- package/dist/3664.79889ff090d64b8d.js +1 -0
- package/dist/3rdpartylicenses.txt +829 -0
- package/dist/4110.c8b37cab34b21d0d.js +1 -0
- package/dist/4186.3bd4de588fe7617d.js +1 -0
- package/dist/4211.0399a499eefacb52.js +1 -0
- package/dist/4575.f2056aa18e4cc778.js +1 -0
- package/dist/4842.e7649d81606ad80d.js +1 -0
- package/dist/485.ec283c2f8b792308.js +1 -0
- package/dist/4895.a54759704d1994b1.js +1 -0
- package/dist/5249.eb35e8578584cad0.js +1 -0
- package/dist/5334.b4ed1b45db24d12f.js +1 -0
- package/dist/5421.2067001c10533303.js +1 -0
- package/dist/5679.4e22239895c7f520.js +1 -0
- package/dist/5761.331ca41ab64cca92.js +1 -0
- package/dist/5765.1994a5bd001c1c55.js +1 -0
- package/dist/6236.5b62431db131ce4d.js +1 -0
- package/dist/6393.958d3e53cb6f8226.js +1 -0
- package/dist/6401.374823002788afe7.js +1 -0
- package/dist/6925.e2366878306cf7f7.js +1 -0
- package/dist/7368.7d91d2ce7677e72a.js +1 -0
- package/dist/7436.640bf5fe48814cbe.js +1 -0
- package/dist/7470.1bdcf8e01acb62bd.js +1 -0
- package/dist/7649.ab4744cfe713eec0.js +1 -0
- package/dist/7975.6f386123f5c64f78.js +1 -0
- package/dist/7977.afeded970bac8b66.js +1 -0
- package/dist/7987.d15aacc264588b12.js +1 -0
- package/dist/8125.35fe2368910566d5.js +1 -0
- package/dist/8266.aca59a0a04590ab1.js +1 -0
- package/dist/8296.b204438fa5439b1e.js +1 -0
- package/dist/8374.e72fc8226673c9d9.js +1 -0
- package/dist/8682.07ee1b8ac649ed4c.js +1 -0
- package/dist/8841.f7eb5568831c2981.js +1 -0
- package/dist/885.c5fd870ec02f004d.js +1 -0
- package/dist/891.5e08c81e5200413e.js +1 -0
- package/dist/913.4580b4ce4307a40f.js +1 -0
- package/dist/9243.08630ad94e1fddba.js +1 -0
- package/dist/9575.50120082195b31cc.js +1 -0
- package/dist/9939.4b0d758462bcc042.js +1 -0
- package/dist/assets/images/icons/scanning-period.svg +13 -0
- package/dist/assets/monaco-assets/grammars/javascript.tmLanguage.json +5913 -3574
- package/dist/assets/monaco-assets/grammars/magicpython.tmLanguage.json +4212 -3437
- package/dist/assets/monaco-assets/grammars/rust.tmLanguage.json +72 -89
- package/dist/assets/monaco-assets/grammars/typescript.tmLanguage.json +5664 -3302
- package/dist/assets/monaco-assets/grammars/xml.tmLanguage.json +1 -1
- package/dist/assets/monaco-assets/onig.wasm +0 -0
- package/dist/assets/schema-types/InterfaceProps.ts +38 -0
- package/dist/assets/schema-types/store-types.ts +4 -0
- package/dist/assets/schema-types/types.ts +85 -0
- package/dist/assets/styles/colors-dark.scss +4 -0
- package/dist/assets/styles/out/bootstrap-overrides.css.map +1 -0
- package/dist/assets/styles/out/colors-dark.css +1 -1
- package/dist/assets/styles/out/colors-dark.css.map +1 -0
- package/dist/assets/styles/out/colors-light.css.map +1 -0
- package/dist/assets/styles/out/monaco-editor-overrides.css.map +1 -0
- package/dist/assets/styles/out/styles.css +1 -1
- package/dist/assets/styles/out/styles.css.map +1 -0
- package/dist/assets/styles/out/variables.css.map +1 -0
- package/dist/assets/styles/styles.scss +42 -1
- package/dist/common.c4550210be4e415f.js +1 -0
- package/dist/index.html +9 -6
- package/dist/main.d1a56ffd3d6266b9.js +1 -0
- package/dist/polyfills.47193e1d7d4041b5.js +1 -0
- package/dist/runtime.bb2a9060f1f8cb8e.js +1 -0
- package/main.js +1 -1
- package/package.json +15 -15
- package/sandbox/Dockerfile +2 -2
- package/sandbox/assets/schema-types/store-types.js +53 -49
- package/sandbox/assets/schema-types/types.js +285 -265
- package/sandbox/sandbox.js +1 -1
- package/src/assets/schema-types/store-types.ts +4 -0
- package/src/assets/schema-types/types.ts +85 -0
- package/src/public/dist-db-masters/browser/index.html +1 -1
- package/src/public/dist-db-masters/browser/main-HGRBZVEX.js +139 -0
- package/src/tools/local-client.js +1 -1
- package/dist/1025.ad3d7fe2972421a7.js +0 -1
- package/dist/1097.f7edc9a254293cbe.js +0 -1
- package/dist/148.3d1172921fc38628.js +0 -1
- package/dist/1558.d77067ef3989dc57.js +0 -1
- package/dist/1617.cd35a3a268fd8f90.js +0 -1
- package/dist/1678.2c6fe869dc9df280.js +0 -1
- package/dist/1754.616b92791d39dab1.js +0 -1
- package/dist/1928.a299b3986d670379.js +0 -1
- package/dist/1957.cafa315c70f23efe.js +0 -1
- package/dist/2140.82e389d21656cd83.js +0 -1
- package/dist/2295.b066a00a7c4c4d9c.js +0 -1
- package/dist/238.6207cf874f0ff82a.js +0 -1
- package/dist/2473.6a522dcf87dfb922.js +0 -1
- package/dist/2714.1ed8bfd73f5693eb.js +0 -1
- package/dist/2735.880b4c038ef3207e.js +0 -1
- package/dist/2908.c7cbde300e1840a4.js +0 -1
- package/dist/3081.dd32ee0f5db41577.js +0 -1
- package/dist/3139.7a6ebcaa6a5f38f6.js +0 -1
- package/dist/3450.68d8d179c9496764.js +0 -1
- package/dist/4110.1747a68dfaacbbd8.js +0 -1
- package/dist/4186.601304798e909236.js +0 -1
- package/dist/4211.b7a72c8db8263edf.js +0 -1
- package/dist/4575.987834c6e73af961.js +0 -1
- package/dist/4842.f89ded9e1e9f1110.js +0 -1
- package/dist/485.b333cf63f954b75c.js +0 -1
- package/dist/4895.95e42b567a89ce84.js +0 -1
- package/dist/5249.73e35de880a7af92.js +0 -1
- package/dist/5334.8ed5b236a6948681.js +0 -1
- package/dist/5421.e729ed3585afa9af.js +0 -1
- package/dist/5679.53292305f1448567.js +0 -1
- package/dist/5761.c363fe26244e8787.js +0 -1
- package/dist/5765.2b385a8405d8e7b2.js +0 -1
- package/dist/6236.b81e95926f7fcd60.js +0 -1
- package/dist/6393.1323e8b7d2cdae70.js +0 -1
- package/dist/6401.02e5b3cb94d0322a.js +0 -1
- package/dist/6925.d59cabb0e343d24c.js +0 -1
- package/dist/7368.4c04430d3efc5947.js +0 -1
- package/dist/7436.7e4876b9e90efde6.js +0 -1
- package/dist/7470.9195bddaee5202e0.js +0 -1
- package/dist/7649.870e05f3aa978078.js +0 -1
- package/dist/7975.dbe6e674c50ab553.js +0 -1
- package/dist/7977.35ebfb6f4c9503b4.js +0 -1
- package/dist/7987.37367b65a76d5083.js +0 -1
- package/dist/8125.58e1a7a385797896.js +0 -1
- package/dist/8266.d665463de8b8d75a.js +0 -1
- package/dist/8296.32f107844a1381b6.js +0 -1
- package/dist/8374.11d430ef2432bfba.js +0 -1
- package/dist/8682.5bde1163690a18dc.js +0 -1
- package/dist/8841.6cb824dd9d5ad8f8.js +0 -1
- package/dist/885.e3d53b62c51f8311.js +0 -1
- package/dist/891.333c6913b8246e3c.js +0 -1
- package/dist/913.e60cadd27b99097f.js +0 -1
- package/dist/9243.c223cdbc4cd84cb8.js +0 -1
- package/dist/9575.0a35a4da70f9e6e5.js +0 -1
- package/dist/9939.218315684234eb18.js +0 -1
- package/dist/common.442040891fd4ef29.js +0 -1
- package/dist/main.45d0e6ca86c448ba.js +0 -1
- package/dist/polyfills.93062920aa87d580.js +0 -1
- package/dist/runtime.662c613ba3c97743.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[7649],{57649:(S,C,e)=>{e.r(C),e.d(C,{UtilityClassesM:()=>R});var y=e(77664),u=e(17017),m=e(63726),c=e(15861),d=e(20553),s=e(94946),f=e(13065),v=e(96814),T=e(73535),O=e(5290);const h=["utilityClassesFormC"],g=["utilityClassesListC"],A=function(i,r){return{"col-3":i,"d-none":r}},F=function(i,r){return{"col-9":i,"col-12":r}};const P=[{path:"utility-classes-internal/main",component:(()=>{class i{cd;apiS;projectType="AM";BE_HOST_PORT=d.N.BE_HOST_PORT;DOCS_HOST_PORT=d.N.DOCS_HOST_PORT;loading={form:!1,response:!1};editorOptionsVersions={readOnly:!1,language:"typescript",contextmenu:!0};utilityClassesFormC;utilityClassesListC;constructor(t,o){this.cd=t,this.apiS=o}ngOnInit(){var t=this;setTimeout((0,c.Z)(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 o=this;return(0,c.Z)(function*(){const l=t;yield o.apiS.saveVersionCode(l)})()}static \u0275fac=function(o){return new(o||i)(s.Y36(s.sBO),s.Y36(f.k))};static \u0275cmp=s.Xpm({type:i,selectors:[["app-utility-classes-layout"]],viewQuery:function(o,l){if(1&o&&(s.Gf(h,5),s.Gf(g,5)),2&o){let a;s.iGM(a=s.CRH())&&(l.utilityClassesFormC=a.first),s.iGM(a=s.CRH())&&(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(o,l){if(1&o&&(s.TgZ(0,"div",0)(1,"div",1)(2,"div",2),s._UZ(3,"app-utility-classes-list",3,4),s.qZA(),s.TgZ(5,"div",2)(6,"app-utility-classes-form",5,6),s.NdJ("saveVersionCode",function(n){return l.saveVersionCode(n)}),s.qZA()()()()),2&o){const a=s.MAs(4),n=s.MAs(7);s.xp6(2),s.Q6J("ngClass",s.WLB(13,A,!n.isResponseCollapsed,n.isResponseCollapsed)),s.xp6(1),s.Q6J("projectType","AM")("hostAndPort",l.BE_HOST_PORT)("isFromModal",!1),s.xp6(2),s.Udp("display",a.selectedRows.length?"block":"none"),s.Q6J("ngClass",s.WLB(16,F,!n.isResponseCollapsed,n.isResponseCollapsed)),s.xp6(1),s.Q6J("hostAndPort",l.BE_HOST_PORT)("editorOptionsVersions",l.editorOptionsVersions)("docsHostAndPort",l.DOCS_HOST_PORT)("data",a.data)("loading",l.loading)("projectType","AM")}},dependencies:[v.mk,T.w,O.D]})}return i})(),canActivate:[m.P]}];let R=(()=>{class i{static \u0275fac=function(o){return new(o||i)};static \u0275mod=s.oAB({type:i});static \u0275inj=s.cJS({imports:[y.Bz.forChild(P),u.u]})}return i})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[7975],{96522:(v,E,o)=>{o.d(E,{i:()=>oe});var f=o(15861),s=o(60095),m=o(33157),l=o(90328),D=o(59361),g=o(51162),u=o(20553),O=o(45085),C=o(91601),p=o(3531),T=o(39989),e=o(94946),I=o(99961),b=o(77240),P=o(27414),S=o(90602),A=o(95852),Z=o(62304),U=o(53429),x=o(32915),F=o(33835),y=o(96814),R=o(32660),L=o(5860),B=o(756),K=o(97680),h=o(14844),W=o(33259),N=o(38057),J=o(25025);const Y=["insertCodeModalC"],V=["monacoEditorModalC"];function w(n,d){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",27),e._uU(2," Add Database Migration"),e.qZA())}function Q(n,d){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",28),e._uU(2," View Database Migration"),e.qZA())}function k(n,d){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",29),e._uU(2," Edit Database Migration"),e.qZA())}function G(n,d){1&n&&(e.TgZ(0,"span",42),e._uU(1,"You can not change name later, it can be used in script."),e.qZA())}function H(n,d){1&n&&(e.TgZ(0,"span",42),e._uU(1,"You can change Label later."),e.qZA())}function j(n,d){if(1&n){const a=e.EpF();e.TgZ(0,"div")(1,"form",30)(2,"div",31)(3,"label",32),e._uU(4,"Name"),e.qZA(),e.TgZ(5,"div",33)(6,"input",34),e.NdJ("keyup",function(){e.CHM(a);const t=e.oxw();return e.KtG(t.form.get("label").setValue(t.form.get("name").value))}),e.qZA(),e.YNc(7,G,2,0,"span",35),e.qZA()(),e.TgZ(8,"div",31)(9,"label",32),e._uU(10,"Label"),e.qZA(),e.TgZ(11,"div",33),e._UZ(12,"input",36),e.YNc(13,H,2,0,"span",35),e.qZA()(),e.TgZ(14,"div",31)(15,"label",32),e._uU(16,"Order"),e.qZA(),e.TgZ(17,"div",33),e._UZ(18,"input",37),e.qZA()(),e.TgZ(19,"div",31)(20,"label",32),e._uU(21,"Timeout in minutes"),e.qZA(),e.TgZ(22,"div",33),e._UZ(23,"input",38),e.qZA()(),e.TgZ(24,"div",31),e._UZ(25,"label",32),e.TgZ(26,"div",33),e._UZ(27,"i",39),e.TgZ(28,"label",40),e._UZ(29,"p-checkbox",41),e.qZA()()()()()}if(2&n){const a=e.oxw();e.xp6(1),e.Q6J("formGroup",a.form),e.xp6(6),e.Q6J("ngIf",a.data.mode===a.EFormMode.ADD),e.xp6(6),e.Q6J("ngIf",a.data.mode===a.EFormMode.ADD),e.xp6(16),e.Q6J("binary",!0)}}function X(n,d){if(1&n){const a=e.EpF();e.TgZ(0,"div",43)(1,"app-monaco-editor",44),e.NdJ("editorGenerated",function(t){e.CHM(a);const r=e.oxw();return e.KtG(r.editorGenerated(t))}),e.qZA()()}if(2&n){const a=e.oxw();e.xp6(1),e.Q6J("isSchemaEditor",!0)("editorOptions",a.editorOptionsDBMigration)}}function z(n,d){if(1&n){const a=e.EpF();e.TgZ(0,"a",45),e.NdJ("click",function(){e.CHM(a);const t=e.oxw();return e.KtG(t.viewError())}),e._uU(1,"View error"),e.qZA()}}function q(n,d){1&n&&(e.TgZ(0,"span"),e._uU(1,"Save"),e.qZA())}function ee(n,d){1&n&&(e.TgZ(0,"span"),e._uU(1,"Update"),e.qZA())}function ae(n,d){if(1&n){const a=e.EpF();e.TgZ(0,"button",46),e.NdJ("click",function(){e.CHM(a);const t=e.oxw();return e.KtG(t.save())}),e._UZ(1,"i",47),e.YNc(2,q,2,0,"span",4),e.YNc(3,ee,2,0,"span",4),e.qZA()}if(2&n){const a=e.oxw();e.Q6J("disabled",a.form.invalid),e.xp6(2),e.Q6J("ngIf",a.data.mode===a.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",a.data.mode===a.EFormMode.EDIT)}}function te(n,d){1&n&&e._UZ(0,"p-progressSpinner",48)}let oe=(()=>{class n{fb;ns;generalS;constantsS;dbMigrationS;authCS;monacoS;instanceS;eventCenterS;generalCS;userS;cd;data;loading={form:!1};EFormMode=l.D;form;subscriptions=[];formData;IEventData=m.F;id;BE_HOST_PORT=u.N.BE_HOST_PORT;DOCS_HOST_PORT=u.N.DOCS_HOST_PORT;instances=[];editorDbM;editorOptionsDBMigration={readOnly:!1,language:"typescript",contextmenu:!0};lastError;editorOptionsMonacoEditorModal={readOnly:!0,language:"json",contextmenu:!0};insertCodeModalC;viewDockerfileModelC;shouldLoadMonacoEditor=!1;monacoDecorations=[];tab;constructor(a,i,t,r,M,c,_,ie,ne,re,se,de){this.fb=a,this.ns=i,this.generalS=t,this.constantsS=r,this.dbMigrationS=M,this.authCS=c,this.monacoS=_,this.instanceS=ie,this.eventCenterS=ne,this.generalCS=re,this.userS=se,this.cd=de}ngOnInit(){var a=this;return(0,f.Z)(function*(){a.createForm(),a.subscriptions.push(a.data.eventChannel.subscribe(function(){var i=(0,f.Z)(function*(t){if(t)if(a.form.enable(),t.action===m.F.OPEN_FORM_IN_EDIT_MODE)yield a.editViewLoadData(),a.form.get("name").disable(),a.cd.detectChanges();else if(t.action===m.F.OPEN_FORM_IN_VIEW_MODE)yield a.editViewLoadData(),a.form.disable(),a.cd.detectChanges();else if(t.action===m.F.OPEN_FORM_IN_ADD_MODE){a.form.reset(),a.form.patchValue(t.data||{});const r=yield a.instanceS.getDefaultContent(a.BE_HOST_PORT,O.R.MIGRATION_SCRIPT).toPromise();a.editorOptionsDBMigration={readOnly:!1},a.generalCS.setValueInEditor(a,"editorDbM",r.data),a.cd.detectChanges()}});return function(t){return i.apply(this,arguments)}}()))})()}editViewLoadData(){var a=this;return(0,f.Z)(function*(){const i=yield a.dbMigrationS.queryOne({find:{guid:a.data.formData.guid,user:a.authCS.gUser._id}});a.form.reset(),a.form.patchValue(i),a.form.get("isScriptExecutedCalculated").setValue(a.data.formData.isScriptExecutedCalculated),a.generalCS.setValueInEditor(a,"editorDbM",i?.dbMigrationScriptCode||"")})()}createForm(){this.form=this.fb.group({name:[null,[s.kI.required]],order:[null,[s.kI.required]],label:[null,[s.kI.required]],dbMigrationTimeoutInMinutes:[null,[]],isScriptExecutedCalculated:[!1,[]],executedMigrationScripts:[!1,[]]})}showModal(){this.lastError=void 0,this.shouldLoadMonacoEditor=!0,setTimeout(()=>{$("#idDbMigrationForm").modal("show")},100)}hideModal(){$("#idDbMigrationForm").modal("hide")}save(){var a=this;return(0,f.Z)(function*(){const i=a.form.getRawValue();let t;t=a.data.formData&&a.data.formData._id?yield a.dbMigrationS.queryOne({find:{guid:a.data.formData.guid,user:a.authCS.gUser._id}}):{};const r=Object.assign({},t,i);r.user=a.authCS.getUserId(),r.dbMigrationScriptCode=a.editorDbM.getValue();const M=(yield a.userS.getById(a.authCS.gUser._id).toPromise()).data,c={};c._id=M._id,c.executedMigrationScripts=M.executedMigrationScripts,c.executedMigrationScripts=c.executedMigrationScripts||{},c.executedMigrationScripts[r.name]=!!i.isScriptExecutedCalculated,yield a.userS.put(a.authCS.gUser._id,c,{select:g.iH._id}).toPromise();try{let _;a.loading.form=!0,a.lastError=void 0,a.monacoS.clearEditorDecorations(a.editorDbM,a.monacoDecorations),a.data.mode===l.D.ADD?_=yield a.dbMigrationS.post(r).toPromise():a.data.mode===l.D.EDIT&&(_=yield a.dbMigrationS.put(r._id,r,{select:g.iH._id}).toPromise()),a.ns.showSuccess(a.data.mode===l.D.ADD?a.constantsS.dbMigration.addSuccess:a.constantsS.dbMigration.editSuccess),a.data.eventChannel.emit({action:a.data.mode===l.D.ADD?m.F.SAVED:m.F.UPDATED,data:_}),a.eventCenterS.dbMigrationSavedAndUpdate.next(!0),a.loading.form=!1}catch(_){a.loading.form=!1,a.ns.showErrorFromResponse(_.error||_,"Unable to save database migration."),a.lastError=_.error,a.tab=a.tab||{},a.tab.axiosResponse={data:_.error},a.monacoS.highlightErrorInMonacoEditor(a.editorDbM,a.tab,"MainSandbox.ts",a.monacoDecorations)}a.cd.detectChanges()})()}resetForm(){this.formData=void 0,this.editorDbM&&this.editorDbM.getValue()&&this.editorDbM.setValue(""),this.monacoS.clearEditorDecorations(this.editorDbM,this.monacoDecorations),this.eventCenterS.dbMigration.detectChangesForm.next(Math.random())}showInsertCodeModel(){this.generalCS.messageReceivedFor=D.H.All,this.insertCodeModalC.showModal(p.b.CodeFinderResultC)}editorGenerated(a){var i=this;return(0,f.Z)(function*(){i.editorDbM=a,yield i.monacoS.loadSchemaEditorSettings(i.BE_HOST_PORT,i.authCS.getUserId(),null),i.monacoS.addSaveCodeKeyBinding(a,t=>{i.form.valid&&i.save()}),i.monacoS.addInsertCodeKeyBinding(a,t=>{i.generalCS.messageReceivedFor=D.H.All,i.data.mode!==l.D.VIEW&&i.insertCodeModalC.showModal(p.b.DatabasesMigrationFormC)}),i.subscriptions.push(i.generalS.messageReceived.subscribe(t=>{t.type&&t.type===T.g.TEXT_COPIED&&t.componentName===p.b.DatabasesMigrationFormC&&(i.monacoS.insertAtCursor(a,t.selectedText),i.insertCodeModalC.hideModal())}))})()}viewError(){this.viewDockerfileModelC.showModal(this.generalS.stringify(this.lastError),C.d.json)}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions),this.eventCenterS.dbMigrationSavedAndUpdate.next(!1)}static \u0275fac=function(i){return new(i||n)(e.Y36(s.qu),e.Y36(I.W),e.Y36(b.b),e.Y36(P.L),e.Y36(S.j),e.Y36(A.D),e.Y36(Z.b),e.Y36(U.E),e.Y36(x.u),e.Y36(b.b),e.Y36(F.K),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:n,selectors:[["app-databases-migration-form"]],viewQuery:function(i,t){if(1&i&&(e.Gf(Y,5),e.Gf(V,5)),2&i){let r;e.iGM(r=e.CRH())&&(t.insertCodeModalC=r.first),e.iGM(r=e.CRH())&&(t.viewDockerfileModelC=r.first)}},inputs:{data:"data"},decls:32,vars:14,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idDbMigrationForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close",3,"click"],["aria-hidden","true"],[1,"fas","fa-window-close"],["pTooltip","Insert Code","sava-no-dbl-click","",1,"cursor-pointer","mr-1",2,"font-size","1.4em",3,"click"],[1,"fas","fa-info-circle","text-info","fa-fw"],["href","https://docs.apimaker.dev/v1/docs/features/database-migration.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n2",2,"font-size","25px"],[1,"modal-body","overflow-auto"],["header","Basic Info"],["header","Code"],["class","overflow-hidden","style","height: calc(100vh - 206px);",4,"ngIf"],[1,"modal-footer"],["href","javascript:;","class","text-danger",3,"click",4,"ngIf"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary",3,"click"],[1,"fas","fa-times","text-danger","fa-fw"],["class","btn btn-primary btn-sm","sava-no-dbl-click","","type","button",3,"disabled","click",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"frameId","modalId","docsHostPort"],["insertCodeModalC",""],[3,"modalId","editorOptionsMonacoEditorModal","modalTitle"],["monacoEditorModalC",""],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-3","col-form-label","col-form-label-sm","text-right"],[1,"col-7"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm",3,"keyup"],["class","mt-1px small",4,"ngIf"],["formControlName","label","name","label","spellcheck","false","type","text","placeholder","Please provide label",1,"form-control","form-control-sm"],["formControlName","order","name","order","spellcheck","false","type","number","placeholder","Please provide order",1,"form-control","form-control-sm"],["formControlName","dbMigrationTimeoutInMinutes","name","dbMigrationTimeoutInMinutes","spellcheck","false","type","number","placeholder","10",1,"form-control","form-control-sm"],[1,"fas","fa-lock","fa-fw","align-middle","text-warning","d-inline-block","mr-1","mt-1"],[1,"align-middle","mb-0","mt-1","ml-2"],["formControlName","isScriptExecutedCalculated","label","Script Executed",3,"binary"],[1,"mt-1px","small"],[1,"overflow-hidden",2,"height","calc(100vh - 206px)"],[3,"isSchemaEditor","editorOptions","editorGenerated"],["href","javascript:;",1,"text-danger",3,"click"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"disabled","click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,t){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,w,3,0,"span",4),e.YNc(5,Q,3,0,"span",4),e.YNc(6,k,3,0,"span",4),e.TgZ(7,"div",5)(8,"button",6),e.NdJ("click",function(){return t.hideModal()}),e.TgZ(9,"span",7),e._UZ(10,"i",8),e.qZA()(),e.TgZ(11,"span",9),e.NdJ("click",function(){return t.showInsertCodeModel()}),e._UZ(12,"i",10),e.qZA(),e.TgZ(13,"a",11),e._UZ(14,"img",12),e.qZA()()(),e.TgZ(15,"div",13)(16,"p-tabView")(17,"p-tabPanel",14),e.YNc(18,j,30,4,"div",4),e.qZA(),e.TgZ(19,"p-tabPanel",15),e.YNc(20,X,2,2,"div",16),e.qZA()()(),e.TgZ(21,"div",17),e.YNc(22,z,2,0,"a",18),e.TgZ(23,"button",19),e.NdJ("click",function(){return t.hideModal()}),e._UZ(24,"i",20),e._uU(25," Close"),e.qZA(),e.YNc(26,ae,4,3,"button",21),e.qZA(),e.YNc(27,te,1,0,"p-progressSpinner",22),e.qZA()()(),e._UZ(28,"app-insert-code-modal",23,24)(30,"app-monaco-editor-modal",25,26)),2&i&&(e.xp6(4),e.Q6J("ngIf",t.data.mode===t.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",t.data.mode===t.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",t.data.mode===t.EFormMode.EDIT),e.xp6(12),e.Q6J("ngIf",t.shouldLoadMonacoEditor),e.xp6(2),e.Q6J("ngIf",t.shouldLoadMonacoEditor),e.xp6(2),e.Q6J("ngIf",t.lastError),e.xp6(4),e.Q6J("ngIf",t.data.mode!==t.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",t.loading.form),e.xp6(1),e.Q6J("frameId","idInsertCodeDbMig")("modalId","idInsertCodeDbMigForm")("docsHostPort",t.DOCS_HOST_PORT),e.xp6(2),e.Q6J("modalId","idMonacoEditorModalInSysMigration")("editorOptionsMonacoEditorModal",t.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[s._Y,s.Fj,s.wV,s.JJ,s.JL,s.sg,s.u,y.O5,R.y,L.P,B.O,K.G,h.xf,h.x4,W.u,N.XZ,J.A],encapsulation:2,changeDetection:0})}return n})()},97975:(v,E,o)=>{o.d(E,{d:()=>g});var f=o(17017),m=(o(96522),o(44950)),l=o(94946);let g=(()=>{class u{static \u0275fac=function(p){return new(p||u)};static \u0275mod=l.oAB({type:u});static \u0275inj=l.cJS({imports:[f.u,m.A]})}return u})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[7977],{77977:(b,r,s)=>{s.r(r),s.d(r,{DashSummaryM:()=>T});var e=s(77664),c=s(17017),h=s(63726),l=s(1678),m=s(15861),t=s(94946),v=s(99961),f=s(53429),g=s(97276),S=s(67031),u=s(95852),p=s(27414),C=s(32915),i=s(77240),y=s(9006);let D=(()=>{class a{ns;instanceS;adminDashboardsS;logProfileS;authCS;constantsS;eventCenterS;generalCS;cd;generalS;loading={grid:!1};subscriptions=[];constructor(o,n,d,x,P,A,M,O,U,B){this.ns=o,this.instanceS=n,this.adminDashboardsS=d,this.logProfileS=x,this.authCS=P,this.constantsS=A,this.eventCenterS=M,this.generalCS=O,this.cd=U,this.generalS=B}ngOnInit(){var o=this;return(0,m.Z)(function*(){o.generalS.setNewTitle("Server Nodes Dashboard")})()}ngOnDestroy(){this.generalCS.unsubscribe(this.subscriptions)}static \u0275fac=function(n){return new(n||a)(t.Y36(v.W),t.Y36(f.E),t.Y36(g.i),t.Y36(S.T),t.Y36(u.D),t.Y36(p.L),t.Y36(C.u),t.Y36(i.b),t.Y36(t.sBO),t.Y36(i.b))};static \u0275cmp=t.Xpm({type:a,selectors:[["app-dash-summary"]],decls:13,vars:0,consts:[[1,"pt-1","main-container",2,"overflow","inherit"],[1,"row","ml-0","mr-0","mb-3"],[1,"col-12","pl-1","pr-1"],[1,"card"],[1,"card-header"],[1,"fas","fa-info-circle","text-info","mr-1"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/dashboard/node-dashboard.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-2","mr-1","mt-n1",2,"font-size","25px"],[1,"card-body","p-0","h-100","overflow-hidden","pt-2"]],template:function(n,d){1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"span"),t._UZ(6,"i",5),t._uU(7," List of all connected nodes"),t.qZA(),t.TgZ(8,"div",6)(9,"a",7),t._UZ(10,"img",8),t.qZA()()(),t.TgZ(11,"div",9),t._UZ(12,"app-dash-root-nodes"),t.qZA()()()()())},dependencies:[y.G],styles:[".main-container[_ngcontent-%COMP%]{height:calc(100vh - 48px);overflow:auto}#chart[_ngcontent-%COMP%]{max-width:650px;margin:35px auto}"]})}return a})();var Y=s(69575);const Z=[{path:"",component:D,canActivate:[h.P]}];let T=(()=>{class a{static \u0275fac=function(n){return new(n||a)};static \u0275mod=t.oAB({type:a});static \u0275inj=t.cJS({imports:[e.Bz.forChild(Z),c.u,l.DashboardM,Y.Q]})}return a})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[7987],{21137:(v,g,a)=>{a.d(g,{u:()=>ae});var m=a(15861),l=a(33157),_=a(90328),p=a(6990),M=a(59361),u=a(51162),S=a(27672),O=a(20553),C=a(45085),P=a(91601),f=a(3531),T=a(39989),e=a(94946),F=a(99961),A=a(67629),h=a(77240),b=a(53429),U=a(27414),R=a(95852),B=a(62304),y=a(32915),x=a(96814),Z=a(32660),L=a(48917),W=a(5860),K=a(756),N=a(97680),D=a(14844),H=a(33259),J=a(25025);const Q=["QuillEditorC"],V=["insertCodeModalC"],G=["monacoEditorModalC"];function w(s,c){if(1&s&&e._UZ(0,"span",31),2&s){const t=e.oxw();e.Q6J("innerHTML",t.userNoteHtml,e.oJD)}}function Y(s,c){1&s&&(e.TgZ(0,"span"),e._UZ(1,"i",32),e._uU(2," Add Custom API"),e.qZA())}function j(s,c){1&s&&(e.TgZ(0,"span"),e._UZ(1,"i",33),e._uU(2," View Custom API"),e.qZA())}function k(s,c){if(1&s&&(e.TgZ(0,"span"),e._UZ(1,"i",34),e._uU(2," Edit Custom API "),e.TgZ(3,"span",35),e._uU(4),e.qZA()()),2&s){const t=e.oxw();e.xp6(4),e.Oqu((null==t.updateObj?null:t.updateObj.name)||"")}}function X(s,c){if(1&s){const t=e.EpF();e.TgZ(0,"div",36)(1,"app-monaco-editor",37),e.NdJ("editorGenerated",function(o){e.CHM(t);const i=e.oxw();return e.KtG(i.editorGeneratedBasicInfo(o))}),e.qZA()()}if(2&s){const t=e.oxw();e.xp6(1),e.Q6J("isSchemaEditor",!0)("editorOptions",t.editorOptionsSchema)}}function z(s,c){if(1&s){const t=e.EpF();e.TgZ(0,"div",36)(1,"app-monaco-editor",37),e.NdJ("editorGenerated",function(o){e.CHM(t);const i=e.oxw();return e.KtG(i.editorGenerated(o))}),e.qZA()()}if(2&s){const t=e.oxw();e.xp6(1),e.Q6J("isSchemaEditor",!0)("editorOptions",t.editorOptionsSchema)}}function q(s,c){if(1&s){const t=e.EpF();e.TgZ(0,"a",38),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.viewError())}),e._uU(1,"View error"),e.qZA()}}function ee(s,c){1&s&&(e.TgZ(0,"span"),e._uU(1,"Save"),e.qZA())}function te(s,c){1&s&&(e.TgZ(0,"span"),e._uU(1,"Update"),e.qZA())}function oe(s,c){if(1&s){const t=e.EpF();e.TgZ(0,"button",39),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.save())}),e._UZ(1,"i",40),e.YNc(2,ee,2,0,"span",5),e.YNc(3,te,2,0,"span",5),e.qZA()}if(2&s){const t=e.oxw();e.xp6(2),e.Q6J("ngIf",t.data.mode===t.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",t.data.mode===t.EFormMode.EDIT)}}function ne(s,c){1&s&&e._UZ(0,"p-progressSpinner",41)}let ae=(()=>{class s{ns;functionS;generalS;instanceS;constantsS;authCS;monacoS;eventCenterS;generalCS;data;loading={form:!1};EFormMode=_.D;subscriptions=[];EAPIAccessType=S.di;editorFunctions;editorFunctionsBasicInfo;editorOptionsSchema={readOnly:!1,language:"typescript",contextmenu:!0};lastError;editorOptionsMonacoEditorModal={readOnly:!0,language:"json",contextmenu:!0};updateObj;QuillEditorC;userNoteHtml='\n <span class="font-weight-bold text-success">Note:</span><br/>\n <span>Name might be used in code,<br/> so consider changing in code also.</span>\n ';BE_HOST_PORT=O.N.BE_HOST_PORT;DOCS_HOST_PORT=O.N.DOCS_HOST_PORT;shouldLoadMonacoEditor=!1;insertCodeModalC;viewDockerfileModelC;constructor(t,n,o,i,r,d,E,se,ie){this.ns=t,this.functionS=n,this.generalS=o,this.instanceS=i,this.constantsS=r,this.authCS=d,this.monacoS=E,this.eventCenterS=se,this.generalCS=ie}ngOnInit(){var t=this;this.subscriptions.push(this.data.eventChannel.subscribe(function(){var n=(0,m.Z)(function*(o){if(o)if(o.action===l.F.OPEN_FORM_IN_EDIT_MODE||o.action===l.F.OPEN_FORM_IN_VIEW_MODE){const r=`${t.data.formData.guid}:${t.authCS.gUser._id}`,d=yield t.functionS.getById(r).toPromise();t.updateObj=d.data,t.generalCS.setValueInEditor(t,"editorFunctionsBasicInfo",d.data?.functionBasicInfo||""),t.generalCS.setValueInEditor(t,"editorFunctions",d.data?.functionCode||""),t.generalCS.setValueInEditor(t,"QuillEditorC",d.data?.apiDocs||"");const E={};t.updateObj.separateSandboxSettings?.enableSeparateSandboxForThis&&(E.enableSeparateSandboxForThis=t.updateObj.separateSandboxSettings.enableSeparateSandboxForThis,E.allowAllPackagesOfAdmin=t.updateObj.separateSandboxSettings?.packages?.allowAllPackagesOfAdmin??!1),yield t.monacoS.loadTypesInMonaco(t.BE_HOST_PORT,t.authCS.getUserId(),E)}else if(o.action===l.F.OPEN_FORM_IN_ADD_MODE){const i=yield t.instanceS.getDefaultContent(t.BE_HOST_PORT,C.R.CUSTOM_API_JSON).toPromise(),r=yield t.instanceS.getDefaultContent(t.BE_HOST_PORT,C.R.CUSTOM_APIS).toPromise();t.generalCS.setValueInEditor(t,"editorFunctionsBasicInfo",i.data),t.generalCS.setValueInEditor(t,"editorFunctions",r.data),setTimeout(()=>{t.QuillEditorC.quill.setContents([{insert:"### API "},{insert:"Documentation",attributes:{bold:!0}},{insert:"\n"}])},1e3),t.updateObj={}}});return function(o){return n.apply(this,arguments)}}()))}showModal(){this.lastError=void 0,this.shouldLoadMonacoEditor=!0,setTimeout(()=>{$("#idFunctionForm").modal("show")},100)}hideModal(){$("#idFunctionForm").modal("hide")}save(){var t=this;return(0,m.Z)(function*(){let o;o=t.data.formData&&t.data.formData._id?yield t.functionS.queryOne({find:{guid:t.data.formData.guid,user:t.authCS.gUser._id}}):{};const i=p.find(o.versions||[],{isActive:!0});i&&(i.apiCodeStr=t.editorFunctions.getValue());let r=Object.assign({},o,{});r.user=t.authCS.getUserId(),r.functionCode=t.editorFunctions.getValue(),r.functionBasicInfo=t.editorFunctionsBasicInfo.getValue(),r.apiDocs=t.QuillEditorC.getValue();for(const d of r?.versions||[])d.version=d.version.toString();r=Object.assign({},t.updateObj||{},r);try{let d;t.loading.form=!0,t.lastError=void 0,t.data.mode===_.D.ADD?d=yield t.functionS.post(r).toPromise():t.data.mode===_.D.EDIT&&(d=yield t.functionS.replace(r._id,r,{select:u.iH._id}).toPromise()),t.ns.showSuccess(t.data.mode===_.D.ADD?t.constantsS.functions.addSuccess:t.constantsS.functions.editSuccess),t.data.eventChannel.emit({action:t.data.mode===_.D.ADD?l.F.SAVED:l.F.UPDATED}),t.eventCenterS.customApiSavedAndUpdate.next(!0),t.loading.form=!1}catch(d){t.ns.showErrorMessageFromErrorObject(d),t.loading.form=!1,t.lastError=d.error}})()}selectedTabTitle;tabSelected(t){this.selectedTabTitle=(t.originalEvent.originalTarget||t.originalEvent.currentTarget).text}setMessageReceiver(){this.generalCS.messageReceivedFor=void 0===this.selectedTabTitle||"Basic Info"===this.selectedTabTitle?M.H.Settings:M.H.All}showInsertCodeModel(){this.setMessageReceiver(),this.insertCodeModalC.showModal(f.b.FunManFormC)}editorGenerated(t){var n=this;return(0,m.Z)(function*(){n.editorFunctions=t,yield n.monacoS.loadSchemaEditorSettings(n.BE_HOST_PORT,n.authCS.getUserId(),null),n.monacoS.addSaveCodeKeyBinding(t,o=>{n.data.mode!==_.D.VIEW&&n.save()}),n.monacoS.addInsertCodeKeyBinding(t,o=>{n.data.mode!==_.D.VIEW&&(n.setMessageReceiver(),n.insertCodeModalC.showModal(f.b.FunManFormC))}),n.subscriptions.push(n.generalS.messageReceived.subscribe(o=>{o.type&&o.type===T.g.TEXT_COPIED&&"Code"===n.selectedTabTitle&&o.componentName===f.b.FunManFormC&&(n.monacoS.insertAtCursor(t,o.selectedText),n.insertCodeModalC.hideModal())}))})()}editorGeneratedBasicInfo(t){var n=this;return(0,m.Z)(function*(){n.editorFunctionsBasicInfo=t,yield n.monacoS.loadSchemaEditorSettings(n.BE_HOST_PORT,n.authCS.getUserId(),null),n.monacoS.addSaveCodeKeyBinding(t,o=>{n.data.mode!==_.D.VIEW&&n.save()}),n.monacoS.addInsertCodeKeyBinding(t,o=>{n.data.mode!==_.D.VIEW&&(n.setMessageReceiver(),n.insertCodeModalC.showModal(f.b.FunManFormC))}),n.subscriptions.push(n.generalS.messageReceived.subscribe(o=>{o.type&&o.type===T.g.TEXT_COPIED&&o.componentName===f.b.FunManFormC&&(void 0===n.selectedTabTitle||"Basic Info"===n.selectedTabTitle)&&(n.monacoS.insertAtCursor(t,o.selectedText),n.insertCodeModalC.hideModal())}))})()}viewError(){this.viewDockerfileModelC.showModal(this.generalS.stringify(this.lastError),P.d.json)}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions),this.eventCenterS.customApiSavedAndUpdate.next(!1)}static \u0275fac=function(n){return new(n||s)(e.Y36(F.W),e.Y36(A.d),e.Y36(h.b),e.Y36(b.E),e.Y36(U.L),e.Y36(R.D),e.Y36(B.b),e.Y36(y.u),e.Y36(h.b))};static \u0275cmp=e.Xpm({type:s,selectors:[["app-w-fun-man-form"]],viewQuery:function(n,o){if(1&n&&(e.Gf(Q,5),e.Gf(V,5),e.Gf(G,5)),2&n){let i;e.iGM(i=e.CRH())&&(o.QuillEditorC=i.first),e.iGM(i=e.CRH())&&(o.insertCodeModalC=i.first),e.iGM(i=e.CRH())&&(o.viewDockerfileModelC=i.first)}},inputs:{data:"data"},decls:37,vars:14,consts:[["template",""],["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idFunctionForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close",3,"click"],["aria-hidden","true"],[1,"fas","fa-window-close"],["pTooltip","Insert Code","sava-no-dbl-click","",1,"cursor-pointer","mr-1",2,"font-size","1.4em",3,"click"],[1,"fas","fa-info-circle","text-info","fa-fw"],["href","https://docs.apimaker.dev/v1/docs/apis-all/custom-apis/user-created-custom-api.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-2","mr-1","mt-n2",2,"font-size","25px"],[1,"modal-body","overflow-auto"],[3,"onChange"],["header","Basic Info"],["class","overflow-hidden","style","height: calc(100vh - 188px);",4,"ngIf"],["header","Code"],["header","Docs"],["QuillEditorC",""],[1,"modal-footer"],["href","javascript:;","class","text-danger",3,"click",4,"ngIf"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary",3,"click"],[1,"fas","fa-times","text-danger","fa-fw"],["class","btn btn-primary btn-sm","sava-no-dbl-click","","type","button",3,"click",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"frameId","modalId","docsHostPort"],["insertCodeModalC",""],[3,"modalId","editorOptionsMonacoEditorModal","modalTitle"],["monacoEditorModalC",""],[3,"innerHTML"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],[1,"ml-2","font-weight-normal","small","text-muted"],[1,"overflow-hidden",2,"height","calc(100vh - 188px)"],[3,"isSchemaEditor","editorOptions","editorGenerated"],["href","javascript:;",1,"text-danger",3,"click"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(n,o){1&n&&(e.YNc(0,w,1,1,"ng-template",null,0,e.W1O),e.TgZ(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4),e.YNc(6,Y,3,0,"span",5),e.YNc(7,j,3,0,"span",5),e.YNc(8,k,5,1,"span",5),e.TgZ(9,"div",6)(10,"button",7),e.NdJ("click",function(){return o.hideModal()}),e.TgZ(11,"span",8),e._UZ(12,"i",9),e.qZA()(),e.TgZ(13,"span",10),e.NdJ("click",function(){return o.showInsertCodeModel()}),e._UZ(14,"i",11),e.qZA(),e.TgZ(15,"a",12),e._UZ(16,"img",13),e.qZA()()(),e.TgZ(17,"div",14)(18,"p-tabView",15),e.NdJ("onChange",function(r){return o.tabSelected(r)}),e.TgZ(19,"p-tabPanel",16),e.YNc(20,X,2,2,"div",17),e.qZA(),e.TgZ(21,"p-tabPanel",18),e.YNc(22,z,2,2,"div",17),e.qZA(),e.TgZ(23,"p-tabPanel",19),e._UZ(24,"app-quill-editor",null,20),e.qZA()()(),e.TgZ(26,"div",21),e.YNc(27,q,2,0,"a",22),e.TgZ(28,"button",23),e.NdJ("click",function(){return o.hideModal()}),e._UZ(29,"i",24),e._uU(30," Close"),e.qZA(),e.YNc(31,oe,4,2,"button",25),e.qZA(),e.YNc(32,ne,1,0,"p-progressSpinner",26),e.qZA()()(),e._UZ(33,"app-insert-code-modal",27,28)(35,"app-monaco-editor-modal",29,30)),2&n&&(e.xp6(6),e.Q6J("ngIf",o.data.mode===o.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",o.data.mode===o.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",o.data.mode===o.EFormMode.EDIT),e.xp6(12),e.Q6J("ngIf",o.shouldLoadMonacoEditor),e.xp6(2),e.Q6J("ngIf",o.shouldLoadMonacoEditor),e.xp6(5),e.Q6J("ngIf",o.lastError),e.xp6(4),e.Q6J("ngIf",o.data.mode!==o.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",o.loading.form),e.xp6(1),e.Q6J("frameId","idInsertCodeCusApi")("modalId","idInsertCodeCusApiForm")("docsHostPort",o.DOCS_HOST_PORT),e.xp6(2),e.Q6J("modalId","idMonacoEditorModalInCustomApi")("editorOptionsMonacoEditorModal",o.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[x.O5,Z.y,L.l,W.P,K.O,N.G,D.xf,D.x4,H.u,J.A],encapsulation:2})}return s})()},67987:(v,g,a)=>{a.d(g,{X:()=>M});var m=a(17017),l=a(44950),p=(a(21137),a(94946));let M=(()=>{class u{static \u0275fac=function(C){return new(C||u)};static \u0275mod=p.oAB({type:u});static \u0275inj=p.cJS({imports:[m.u,l.A]})}return u})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[8125],{38125:(Te,z,o)=>{o.r(z),o.d(z,{AmEventsM:()=>ze});var E=o(77664),e=o(17017),t=o(94946),L=o(85219),f=o(55043),T=o(15861),C=o(33157),O=o(90328),U=o(56212),K=o(6990),V=o(51162),ne=o(60921),k=o(77240),H=o(99961),X=o(92189),ee=o(67145),w=o(95852),Q=o(27414),S=o(32915),x=o(21719),P=o(96814),Y=o(95431),F=o(97680),q=o(33259),B=o(60095),oe=o(59361),re=o(20553),ae=o(45085),ie=o(3531),le=o(39989),de=o(53429),ce=o(62304),_e=o(32660),D=o(5860),W=o(756),g=o(38057);const I=["insertCodeModalC"];function _(d,M){1&d&&(t.TgZ(0,"span"),t._UZ(1,"i",33),t._uU(2," Add Event Listener"),t.qZA())}function A(d,M){1&d&&(t.TgZ(0,"span"),t._UZ(1,"i",34),t._uU(2," View Event Listener"),t.qZA())}function G(d,M){1&d&&(t.TgZ(0,"span"),t._UZ(1,"i",35),t._uU(2," Edit Event Listener"),t.qZA())}function J(d,M){1&d&&(t.TgZ(0,"span"),t._uU(1,"Save"),t.qZA())}function u(d,M){1&d&&(t.TgZ(0,"span"),t._uU(1,"Update"),t.qZA())}function N(d,M){if(1&d){const a=t.EpF();t.TgZ(0,"button",36),t.NdJ("click",function(){t.CHM(a);const l=t.oxw();return t.KtG(l.save())}),t._UZ(1,"i",37),t.YNc(2,J,2,0,"span",4),t.YNc(3,u,2,0,"span",4),t.qZA()}if(2&d){const a=t.oxw();t.Q6J("disabled",a.form.invalid),t.xp6(2),t.Q6J("ngIf",a.data.mode===a.EFormMode.ADD),t.xp6(1),t.Q6J("ngIf",a.data.mode===a.EFormMode.EDIT)}}const s=function(d){return{"text-danger font-weight-bold":d}};let n=(()=>{class d{fb;ns;generalS;constantsS;instanceS;authCS;eventCenterS;monacoS;generalCS;data;eventData;EFormMode=O.D;form;subscriptions=[];editorEventListener;editorOptionsSchema={readOnly:!1,language:"typescript",contextmenu:!0};BE_HOST_PORT=re.N.BE_HOST_PORT;DOCS_HOST_PORT=re.N.DOCS_HOST_PORT;IAmEventListenerProps=V.Sh;insertCodeModalC;constructor(a,r,l,b,y,me,he,Ee,Ce){this.fb=a,this.ns=r,this.generalS=l,this.constantsS=b,this.instanceS=y,this.authCS=me,this.eventCenterS=he,this.monacoS=Ee,this.generalCS=Ce}ngOnInit(){var a=this;this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var r=(0,T.Z)(function*(l){if(l)if(a.eventData=l,a.form.enable(),a.form.reset(),l.action===C.F.OPEN_FORM_IN_EDIT_MODE)a.form.patchValue(a.data.formData),a.generalCS.setValueInEditor(a,"editorEventListener",a.data.formData.apiCodeStr||"");else if(l.action===C.F.OPEN_FORM_IN_VIEW_MODE)a.form.patchValue(a.data.formData),a.generalCS.setValueInEditor(a,"editorEventListener",a.data.formData.apiCodeStr||""),a.form.disable();else if(l.action===C.F.OPEN_FORM_IN_ADD_MODE){const b=yield a.instanceS.getDefaultContent(a.BE_HOST_PORT,ae.R.EVENTS).toPromise();a.generalCS.setValueInEditor(a,"editorEventListener",b.data)}});return function(l){return r.apply(this,arguments)}}()))}createForm(){this.form=this.fb.group({name:[null,[B.kI.required]],eventListenerTimeoutInMinutes:[null,[]],runOnNativeProcess:[null,[]]})}showModal(){$("#idEventListenerForm").modal("show")}hideModal(){$("#idEventListenerForm").modal("hide")}showInsertCodeModel(){this.generalCS.messageReceivedFor=oe.H.All,this.insertCodeModalC.showModal(ie.b.EventListenerFormC)}save(){var a=this;return(0,T.Z)(function*(){const r=a.form.getRawValue(),l=a.data.formData||{},b=K.find(l.versions||[],{isActive:!0});b&&(b.apiCodeStr=a.editorEventListener.getValue());const y=Object.assign({},l,r);y.apiCodeStr=a.editorEventListener.getValue();try{a.data.mode===O.D.ADD?a.data.sourceArr.push(y):a.data.mode===O.D.EDIT&&Object.assign(a.data.formData,y),a.data.eventChannel.emit({action:a.data.mode===O.D.ADD?C.F.SAVED:C.F.UPDATED}),a.eventCenterS.eventListenersSavedAndUpdate.next(y)}catch(me){console.log(me)}})()}editorGenerated(a){var r=this;return(0,T.Z)(function*(){r.editorEventListener=a,yield r.monacoS.loadSchemaEditorSettings(r.BE_HOST_PORT,r.authCS.getUserId(),null),r.monacoS.addSaveCodeKeyBinding(a,l=>{r.form.valid&&r.save()}),r.monacoS.addInsertCodeKeyBinding(a,l=>{r.generalCS.messageReceivedFor=oe.H.All,r.data.mode!==O.D.VIEW&&r.insertCodeModalC.showModal(ie.b.EventListenerFormC)}),r.subscriptions.push(r.generalS.messageReceived.subscribe(l=>{l.type&&l.type===le.g.TEXT_COPIED&&l.componentName===ie.b.EventListenerFormC&&(r.monacoS.insertAtCursor(a,l.selectedText),r.insertCodeModalC.hideModal())}))})()}ngOnDestroy(){this.eventCenterS.eventListenersSavedAndUpdate.next(void 0),this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(r){return new(r||d)(t.Y36(B.qu),t.Y36(H.W),t.Y36(k.b),t.Y36(Q.L),t.Y36(de.E),t.Y36(w.D),t.Y36(S.u),t.Y36(ce.b),t.Y36(k.b))};static \u0275cmp=t.Xpm({type:d,selectors:[["app-w-event-listener-form"]],viewQuery:function(r,l){if(1&r&&t.Gf(I,5),2&r){let b;t.iGM(b=t.CRH())&&(l.insertCodeModalC=b.first)}},inputs:{data:"data"},decls:44,vars:14,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idEventListenerForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],["pTooltip","Insert Code","sava-no-dbl-click","",1,"cursor-pointer","mr-1","text-info",2,"font-size","1.4em",3,"click"],[1,"fas","fa-info-circle","text-info","fa-fw"],[1,"modal-body"],[1,"pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-6"],[1,"row"],[1,"col-3","col-form-label","col-form-label-sm","text-right","pl-0","pr-0"],[1,"col-8"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm"],[1,"col-3"],[1,"col-7","col-form-label","col-form-label-sm","text-right","pl-0","pr-0"],["formControlName","eventListenerTimeoutInMinutes","name","eventListenerTimeoutInMinutes","spellcheck","false","type","number","placeholder","10",1,"form-control","form-control-sm"],["pTooltip","Code will run on actual process and not in sandbox, so be careful with code. You can not use sandbox packages in this mode. You can use all Node.js packages + some packages on which API Maker is dependent on. You can use features of global variable 'g'.",1,"col-8","col-form-label","col-form-label-sm","text-right",3,"ngClass"],[1,"align-middle","mb-0","pt-1"],["formControlName","runOnNativeProcess",3,"binary"],[1,"overflow-hidden","mb-3",2,"height","calc(100vh - 270px)"],[3,"isSchemaEditor","editorOptions","editorGenerated"],[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"],[3,"frameId","modalId","docsHostPort"],["insertCodeModalC",""],[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"],["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"]],template:function(r,l){1&r&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),t.YNc(4,_,3,0,"span",4),t.YNc(5,A,3,0,"span",4),t.YNc(6,G,3,0,"span",4),t.TgZ(7,"div",5)(8,"button",6)(9,"span",7),t._UZ(10,"i",8),t.qZA()(),t.TgZ(11,"span",9),t.NdJ("click",function(){return l.showInsertCodeModel()}),t._UZ(12,"i",10),t.qZA()()(),t.TgZ(13,"div",11)(14,"form",12)(15,"div",13)(16,"div",14)(17,"div",15)(18,"label",16),t._uU(19,"Name"),t.qZA(),t.TgZ(20,"div",17),t._UZ(21,"input",18),t.qZA()()(),t.TgZ(22,"div",19)(23,"div",15)(24,"label",20),t._uU(25,"Timeout in minutes"),t.qZA(),t.TgZ(26,"div",19),t._UZ(27,"input",21),t.qZA()()(),t.TgZ(28,"div",19)(29,"div",15)(30,"label",22)(31,"span"),t._uU(32,"Run Native"),t.qZA()(),t.TgZ(33,"label",23),t._UZ(34,"p-checkbox",24),t.qZA()()()(),t.TgZ(35,"div",25)(36,"app-monaco-editor",26),t.NdJ("editorGenerated",function(y){return l.editorGenerated(y)}),t.qZA()()()(),t.TgZ(37,"div",27)(38,"button",28),t._UZ(39,"i",29),t._uU(40," Close"),t.qZA(),t.YNc(41,N,4,3,"button",30),t.qZA()()()(),t._UZ(42,"app-insert-code-modal",31,32)),2&r&&(t.xp6(4),t.Q6J("ngIf",l.data.mode===l.EFormMode.ADD),t.xp6(1),t.Q6J("ngIf",l.data.mode===l.EFormMode.VIEW),t.xp6(1),t.Q6J("ngIf",l.data.mode===l.EFormMode.EDIT),t.xp6(8),t.Q6J("formGroup",l.form),t.xp6(16),t.Q6J("ngClass",t.VKq(12,s,!0===l.form.get(l.IAmEventListenerProps.runOnNativeProcess).value)),t.xp6(4),t.Q6J("binary",!0),t.xp6(2),t.Q6J("isSchemaEditor",!0)("editorOptions",l.editorOptionsSchema),t.xp6(5),t.Q6J("ngIf",l.data.mode!==l.EFormMode.VIEW),t.xp6(1),t.Q6J("frameId","idInsertCodeEventLis")("modalId","idInsertCodeEventLisForm")("docsHostPort",l.DOCS_HOST_PORT))},dependencies:[B._Y,B.Fj,B.wV,B.JJ,B.JL,B.sg,B.u,P.mk,P.O5,_e.y,D.P,W.O,q.u,g.XZ],encapsulation:2})}return d})();const p=["eventListenerFormC"];function v(d,M){if(1&d){const a=t.EpF();t.TgZ(0,"span",17),t.NdJ("click",function(){t.CHM(a);const l=t.oxw(2);return t.KtG(l.add())}),t._UZ(1,"i",18),t.qZA()}}function pe(d,M){if(1&d){const a=t.EpF();t.TgZ(0,"span",19),t.NdJ("click",function(){t.CHM(a);const l=t.oxw(2);return t.KtG(l.edit())}),t._UZ(1,"i",20),t.qZA()}}function ue(d,M){if(1&d){const a=t.EpF();t.TgZ(0,"span",21),t.NdJ("click",function(){t.CHM(a);const l=t.oxw(2);return t.KtG(l.removePermanentDialog())}),t._UZ(1,"i",22),t.qZA()}}function fe(d,M){if(1&d&&(t.TgZ(0,"span"),t.YNc(1,v,2,0,"span",14),t.YNc(2,pe,2,0,"span",15),t.YNc(3,ue,2,0,"span",16),t.qZA()),2&d){const a=t.oxw();t.xp6(1),t.Q6J("ngIf",null==a.eventCenterS.amEvents.selectedEvents.value[0]?null:a.eventCenterS.amEvents.selectedEvents.value[0]._id),t.xp6(1),t.Q6J("ngIf",a.selectedRows.length),t.xp6(1),t.Q6J("ngIf",a.selectedRows.length)}}function ge(d,M){1&d&&(t.TgZ(0,"tr")(1,"th"),t._uU(2,"Name"),t.qZA(),t._UZ(3,"th",23)(4,"th",24),t.qZA())}function m(d,M){1&d&&t._UZ(0,"i",31)}const Z=function(){return["/api-info/api-testing/testing"]},i=function(d,M,a){return{at_category:"EVENTS",at_user:d,at_event:M,at_api:a}};function c(d,M){if(1&d&&(t.TgZ(0,"a",32),t.NdJ("click",function(r){return r.stopPropagation()}),t._UZ(1,"i",33),t.qZA()),2&d){const a=t.oxw().$implicit,r=t.oxw();t.Q6J("routerLink",t.DdM(2,Z))("queryParams",t.kEZ(3,i,r.authCS.getUserId(),r.eventCenterS.amEvents.selectedEvents.value[0]._id,a._id))}}function h(d,M){if(1&d){const a=t.EpF();t.TgZ(0,"button",34),t.NdJ("click",function(l){t.CHM(a);const b=t.oxw().rowIndex,y=t.oxw();return y.moveS.moveUP(l,b,y.rows,y.selectedRows),t.KtG(y.saveEventListenersState())}),t._UZ(1,"i",35),t.qZA()}}function R(d,M){if(1&d){const a=t.EpF();t.TgZ(0,"button",36),t.NdJ("click",function(l){t.CHM(a);const b=t.oxw().rowIndex,y=t.oxw();return y.moveS.moveDown(l,b,y.rows,y.selectedRows),t.KtG(y.saveEventListenersState())}),t._UZ(1,"i",37),t.qZA()}}function te(d,M){if(1&d&&(t.TgZ(0,"tr",25)(1,"td")(2,"span"),t._uU(3),t.qZA(),t.YNc(4,m,1,0,"i",26),t.qZA(),t.TgZ(5,"td")(6,"div",27),t.YNc(7,c,2,7,"a",28),t.qZA()(),t.TgZ(8,"td"),t.YNc(9,h,2,0,"button",29),t.YNc(10,R,2,0,"button",30),t.qZA()()),2&d){const a=M.$implicit,r=M.rowIndex,l=t.oxw();t.Q6J("pSelectableRow",a),t.xp6(3),t.Oqu(a.name),t.xp6(1),t.Q6J("ngIf",a.runOnNativeProcess),t.xp6(3),t.Q6J("ngIf",null==a?null:a._id),t.xp6(2),t.Q6J("ngIf",0!==r),t.xp6(1),t.Q6J("ngIf",r!==l.rows.length-1)}}function j(d,M){1&d&&t._UZ(0,"p-progressSpinner",38)}let se=(()=>{class d{generalS;notificationS;navigationCS;amEventS;authCS;constantsS;eventCenterS;moveS;router;confirmationService;cd;isReadOnly=!1;loading={grid:!1};subscriptions=[];data={mode:O.D.ADD,eventChannel:new t.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;selectedRows=[];gridKey=V.GR.id;idCounter=0;EUserType=ne.d;eventListenerFormC;constructor(a,r,l,b,y,me,he,Ee,Ce,be,Me){this.generalS=a,this.notificationS=r,this.navigationCS=l,this.amEventS=b,this.authCS=y,this.constantsS=me,this.eventCenterS=he,this.moveS=Ee,this.router=Ce,this.confirmationService=be,this.cd=Me}ngOnInit(){var a=this;this.eventCenterS.amEvents.selectedEventListeners.next([]),this.subscriptions.push(this.data.eventChannel.subscribe(r=>{(r.action===C.F.SAVED||r.action===C.F.UPDATED)&&(this.eventListenerFormC.hideModal(),this.loadGridData())})),this.subscriptions.push(this.eventCenterS.amEvents.selectedEvents.subscribe(function(){var r=(0,T.Z)(function*(l){l&&l.length?a.loadGridData():a.resetGridAndUrl()});return function(l){return r.apply(this,arguments)}}()))}loadGridData(){this.loading.grid=!0;try{if(this.eventCenterS.amEvents.selectedEvents.value[0]){this.selectedRows=[],this.rows=this.eventCenterS.amEvents.selectedEvents.value[0].eventListeners;for(const r of this.rows)r.id=this.idCounter++;this.rowsMap=K.keyBy(this.rows,this.gridKey)}else this.resetGridAndUrl();const a=this.navigationCS.getQueryParam(U.p.am_event_listener);if(a){const r=a.split(","),l=K.intersection(K.keys(this.rowsMap),r),b=[];for(const y of l)this.rowsMap[y]&&b.push(this.rowsMap[y]);this.selectedRows=b,this.eventCenterS.amEvents.selectedEventListeners.next(b)}}catch(a){console.log(a)}this.loading.grid=!1,this.cd.detectChanges()}add(){this.data.formData=void 0,this.data.mode=O.D.ADD,this.data.sourceArr=this.getSourceArr(),this.data.eventChannel.emit({action:C.F.OPEN_FORM_IN_ADD_MODE}),this.eventListenerFormC.showModal()}view(){this.data.formData=this.selectedRows[0],this.data.mode=O.D.VIEW,this.data.sourceArr=this.getSourceArr(),this.data.eventChannel.emit({action:C.F.OPEN_FORM_IN_VIEW_MODE}),this.eventListenerFormC.showModal()}edit(){this.data.formData=this.selectedRows[0],this.data.mode=O.D.EDIT,this.data.sourceArr=this.getSourceArr(),this.data.eventChannel.emit({action:C.F.OPEN_FORM_IN_EDIT_MODE}),this.eventListenerFormC.showModal()}getSourceArr(){const a=this.eventCenterS.amEvents.selectedEvents.value[0];return a.eventListeners=a.eventListeners||[],a.eventListeners}removePermanentDialog(){var a=this;return(0,T.Z)(function*(){var r;a.confirmationService.confirm({message:a.constantsS.amEventListeners.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(r=(0,T.Z)(function*(){yield a.removePermanent()}),function(){return r.apply(this,arguments)})})})()}removePermanent(){var a=this;return(0,T.Z)(function*(){K.pull(a.rows,a.selectedRows[0]),a.rowsMap=K.keyBy(a.rows,a.gridKey),a.eventCenterS.eventListenersSavedAndUpdate.next(a.eventCenterS.amEvents.selectedEvents.value[0]),a.resetGridAndUrl(),a.loadGridData()})()}resetDependents(){var a=this;return(0,T.Z)(function*(){a.eventCenterS.amEvents.selectedEventListeners.next([]),yield a.navigationCS.setQueryParam(U.p.am_event_listener,null)})()}eventListenerSelected(){var a=this;return(0,T.Z)(function*(){a.resetDependents(),a.fillData()})()}resetGridAndUrl(){this.rows=[],this.selectedRows=[],this.rowsMap={},this.eventCenterS.amEvents.selectedEventListeners.next([])}fillData(){var a=this;return(0,T.Z)(function*(){if(!a.selectedRows.length)return yield a.navigationCS.setQueryParam(U.p.am_event_listener,""),void a.eventCenterS.amEvents.selectedEventListeners.next([]);const r=a.selectedRows[0];r.name?(yield a.navigationCS.setQueryParam(U.p.am_event_listener,r.name),a.eventCenterS.amEvents.selectedEventListeners.next([r])):a.resetDependents()})()}dblClickListeners(){this.selectedRows.length&&this.edit()}saveEventListenersState(){var a=this;return(0,T.Z)(function*(){const r=a.eventCenterS.amEvents.selectedEvents.value[0],l={eventListeners:a.rows,name:r.name};r&&(r.eventListeners=a.rows,yield a.amEventS.put(r._id,l,{select:V.iH._id}).toPromise())})()}ngOnDestroy(){this.eventCenterS.eventListenersSavedAndUpdate.next(void 0),this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(r){return new(r||d)(t.Y36(k.b),t.Y36(H.W),t.Y36(X.S),t.Y36(ee.l),t.Y36(w.D),t.Y36(Q.L),t.Y36(S.u),t.Y36(x.e),t.Y36(E.F0),t.Y36(L.YP),t.Y36(t.sBO))};static \u0275cmp=t.Xpm({type:d,selectors:[["app-listeners-w"]],viewQuery:function(r,l){if(1&r&&t.Gf(p,5),2&r){let b;t.iGM(b=t.CRH())&&(l.eventListenerFormC=b.first)}},inputs:{isReadOnly:["IsReadOnly","isReadOnly"]},decls:16,vars:9,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],[1,"fas","fa-headphones-alt","text-info","fa-fw","mr-1"],["href","https://docs.apimaker.dev/v1/docs/apis-all/events/user-created-events-api.html#event-listener","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],[4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],[1,"h-100"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 94px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"data"],["eventListenerFormC",""],["class","float-right cursor-pointer ml-3","pTooltip","Add New",3,"click",4,"ngIf"],["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"],["pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["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"],[2,"width","60px"],[2,"width","100px"],[3,"pSelectableRow"],["pTooltip","Running on native process","class","fas fa-radiation ml-2 text-danger",4,"ngIf"],[1,"text-center"],["class","btn btn-xsm-custom mr-3","href","javascript:","tooltipPosition","left","pTooltip","Test API",3,"routerLink","queryParams","click",4,"ngIf"],["class","btn btn-xsm-custom btn-outline-secondary vertical-align-sub",3,"click",4,"ngIf"],["class","btn btn-xsm-custom btn-outline-secondary float-right vertical-align-sub",3,"click",4,"ngIf"],["pTooltip","Running on native process",1,"fas","fa-radiation","ml-2","text-danger"],["href","javascript:","tooltipPosition","left","pTooltip","Test API",1,"btn","btn-xsm-custom","mr-3",3,"routerLink","queryParams","click"],[1,"fas","fa-vial","text-info","fa-fw","test-tube","pt-1"],[1,"btn","btn-xsm-custom","btn-outline-secondary","vertical-align-sub",3,"click"],[1,"fas","fa-arrow-up","fa-fw","cursor-pointer"],[1,"btn","btn-xsm-custom","btn-outline-secondary","float-right","vertical-align-sub",3,"click"],[1,"fas","fa-arrow-down","fa-fw","cursor-pointer"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(r,l){1&r&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span"),t._UZ(3,"i",2),t._uU(4," Listeners"),t.qZA(),t.TgZ(5,"a",3),t._UZ(6,"img",4),t.qZA(),t.YNc(7,fe,4,3,"span",5),t.qZA(),t.TgZ(8,"div",6)(9,"div",7)(10,"p-table",8),t.NdJ("selectionChange",function(y){return l.selectedRows=y})("selectionChange",function(){return l.eventListenerSelected()})("dblclick",function(){return l.dblClickListeners()}),t.YNc(11,ge,5,0,"ng-template",9),t.YNc(12,te,11,6,"ng-template",10),t.qZA(),t.YNc(13,j,1,0,"p-progressSpinner",11),t.qZA()()(),t._UZ(14,"app-w-event-listener-form",12,13)),2&r&&(t.xp6(7),t.Q6J("ngIf",!l.isReadOnly),t.xp6(3),t.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",l.selectedRows)("dataKey",l.gridKey)("scrollable",!0)("value",l.rows),t.xp6(3),t.Q6J("ngIf",l.loading.grid),t.xp6(1),t.Q6J("data",l.data))},dependencies:[E.rH,P.O5,Y.iA,L.jx,Y.Ei,F.G,q.u,n],encapsulation:2})}return d})();var ve=o(96925),Ae=o(25405),Se=o(67629),Ie=o(91396),ye=o(13241);const Le=["eventManFormC"];function Ne(d,M){if(1&d){const a=t.EpF();t.TgZ(0,"span",21),t.NdJ("click",function(){t.CHM(a);const l=t.oxw(2);return t.KtG(l.edit())}),t._UZ(1,"i",22),t.qZA()}}function Ue(d,M){if(1&d){const a=t.EpF();t.TgZ(0,"span",23),t.NdJ("click",function(){t.CHM(a);const l=t.oxw(2);return t.KtG(l.clone())}),t._UZ(1,"i",24),t.qZA()}}function Ge(d,M){if(1&d){const a=t.EpF();t.TgZ(0,"span",25),t.NdJ("click",function(){t.CHM(a);const l=t.oxw(2);return t.KtG(l.removePermanentDialog())}),t._UZ(1,"i",26),t.qZA()}}function Fe(d,M){if(1&d){const a=t.EpF();t.TgZ(0,"span")(1,"span",14),t.NdJ("click",function(){t.CHM(a);const l=t.oxw();return t.KtG(l.add())}),t._UZ(2,"i",15),t.qZA(),t.TgZ(3,"span",16),t.NdJ("click",function(){t.CHM(a);const l=t.oxw();return t.KtG(l.openEventsGridPage())}),t._UZ(4,"i",17),t.qZA(),t.YNc(5,Ne,2,0,"span",18),t.YNc(6,Ue,2,0,"span",19),t.YNc(7,Ge,2,0,"span",20),t.qZA()}if(2&d){const a=t.oxw();t.xp6(5),t.Q6J("ngIf",a.selectedRows.length),t.xp6(1),t.Q6J("ngIf",a.selectedRows.length),t.xp6(1),t.Q6J("ngIf",a.selectedRows.length)}}function Ye(d,M){if(1&d&&(t.TgZ(0,"div")(1,"div",27),t._uU(2),t.qZA()()),2&d){const a=t.oxw();t.xp6(2),t.Oqu(a.constantsS.group.allAmEventsPermitted)}}function Be(d,M){if(1&d&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&d){const a=t.oxw().$implicit;t.xp6(1),t.Oqu(a.label)}}function Je(d,M){if(1&d&&(t.TgZ(0,"div")(1,"div")(2,"table",29)(3,"tr")(4,"td",30),t._uU(5),t.qZA()()()()()),2&d){const a=t.oxw().$implicit;t.xp6(5),t.Oqu(a.data.text)}}function Ke(d,M){if(1&d&&(t.TgZ(0,"div",28),t.YNc(1,Be,2,1,"div",6),t.YNc(2,Je,6,1,"div",6),t.qZA()),2&d){const a=M.$implicit;t.xp6(1),t.Q6J("ngIf",null==a.children?null:a.children.length),t.xp6(1),t.Q6J("ngIf",!(null!=a.children&&a.children.length))}}function Qe(d,M){1&d&&t._UZ(0,"p-progressSpinner",31)}let Pe=(()=>{class d{amEventS;generalS;notificationS;navigationCS;authCS;constantsS;cd;eventCenterS;eventCenterCS;functionS;router;confirmationService;isReadOnly=!1;eventManFormC;loading={grid:!1};subscriptions=[];data={mode:O.D.ADD,eventChannel:new t.vpe,formData:void 0};showAll=!1;selectedRows=[];gridKey=V.iH._id;treeNodes=[];allTreeItemsMap={};selectByKey="_id";EAPICategory=ae.R;ERequestMethod=ve.Yp;constructor(a,r,l,b,y,me,he,Ee,Ce,be,Me,Xe){this.amEventS=a,this.generalS=r,this.notificationS=l,this.navigationCS=b,this.authCS=y,this.constantsS=me,this.cd=he,this.eventCenterS=Ee,this.eventCenterCS=Ce,this.functionS=be,this.router=Me,this.confirmationService=Xe}ngOnInit(){this.loadTreeData().then(),this.subscriptions.push(this.data.eventChannel.subscribe(a=>{(a.action===C.F.SAVED||a.action===C.F.UPDATED)&&(this.eventManFormC.hideModal(),this.loadTreeData().then())})),this.generalS.setNewTitle("API Maker - Events")}add(){this.data.formData=void 0,this.data.mode=O.D.ADD,this.data.eventChannel.emit({action:C.F.OPEN_FORM_IN_ADD_MODE}),this.eventManFormC.showModal()}edit(){this.selectedRows[0]&&(this.data.formData=this.selectedRows[0].data,console.log(this.data.formData),this.data.mode=O.D.EDIT,this.data.eventChannel.emit({action:C.F.OPEN_FORM_IN_EDIT_MODE}),this.eventManFormC.showModal())}clone(){var a=this;return(0,T.Z)(function*(){var r;a.confirmationService.confirm({message:a.constantsS.amEvents.cloneConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(r=(0,T.Z)(function*(){try{if(!a.selectedRows[0])return;const l=(yield a.amEventS.getById(a.selectedRows[0].data._id).toPromise()).data;delete l._id,delete l.guid,l.name=`event-${Math.random().toString().substr(2,6)}`,(yield a.amEventS.post(l).toPromise()).success?(a.notificationS.showSuccess(a.constantsS.amEvents.cloneSuccess),yield a.loadTreeData()):a.notificationS.showSuccess(a.constantsS.amEvents.cloneSuccess)}catch{a.notificationS.showError(a.constantsS.amEvents.cloneError)}}),function(){return r.apply(this,arguments)})})})()}removePermanentDialog(){var a=this;return(0,T.Z)(function*(){var r;a.confirmationService.confirm({message:a.constantsS.amEvents.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(r=(0,T.Z)(function*(){yield a.removePermanent()}),function(){return r.apply(this,arguments)})})})()}removePermanent(){var a=this;return(0,T.Z)(function*(){a.loading.grid=!0;const r=yield a.amEventS.permanentDelete(a.selectedRows[0].data._id).toPromise();a.loading.grid=!1,r.success?(a.notificationS.showSuccess(a.constantsS.amEvents.removePermanent),a.resetGridAndUrl(),yield a.loadTreeData(),a.selectedRows=[]):a.notificationS.showErrorFromResponse(r,a.constantsS.amEvents.removePermanentError)})()}resetDependents(){var a=this;return(0,T.Z)(function*(){a.eventCenterS.amEvents.selectedEvents.next([]),yield a.navigationCS.setQueryParam(U.p.am_events,null)})()}functionSelected(){var a=this;return(0,T.Z)(function*(){yield a.resetDependents(),yield a.fillData(),a.selectedRows[0]?a.generalS.setNewTitle(a.selectedRows[0].data?.name,ae.R.EVENTS):a.generalS.setNewTitle("API Maker - Events")})()}resetGridAndUrl(){this.selectedRows=[],this.eventCenterS.amEvents.selectedEvents.next([])}fillData(){var a=this;return(0,T.Z)(function*(){const r=a.selectedRows?.[0]?.data;if(!r)return;const l=(yield a.amEventS.getById(r._id).toPromise()).data;l._id?(yield a.navigationCS.setQueryParam(U.p.am_events,l._id),a.eventCenterS.amEvents.selectedEvents.next([l])):a.resetDependents().then()})()}openEventsGridPage(){var a=this;return(0,T.Z)(function*(){a.router.navigate(["api-info","am-events","layout"]).then()})()}loadTreeData(){var a=this;return(0,T.Z)(function*(){a.loading.grid=!0;try{const r=(yield a.functionS.getEventKTree().toPromise()).data;for(const b of r)a.generalS.convertKTreeItemToPrimeNGTreeItem(b);const l={};a.generalS.getMapOfAllItems(l,r),a.generalS.setIsExpandedStateFromOldMap(a.allTreeItemsMap,l),a.treeNodes=r,a.allTreeItemsMap=l,a.functionSelected().then()}catch(r){console.log(r)}a.loading.grid=!1,a.cd.detectChanges()})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickEvent(){this.selectedRows.length&&this.edit()}static \u0275fac=function(r){return new(r||d)(t.Y36(ee.l),t.Y36(k.b),t.Y36(H.W),t.Y36(X.S),t.Y36(w.D),t.Y36(Q.L),t.Y36(t.sBO),t.Y36(S.u),t.Y36(Ae.M),t.Y36(Se.d),t.Y36(E.F0),t.Y36(L.YP))};static \u0275cmp=t.Xpm({type:d,selectors:[["app-events-tree"]],viewQuery:function(r,l){if(1&r&&t.Gf(Le,5),2&r){let b;t.iGM(b=t.CRH())&&(l.eventManFormC=b.first)}},inputs:{isReadOnly:["IsReadOnly","isReadOnly"]},decls:17,vars:7,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["src","/assets/images/icons/event.svg","alt","Events",1,"fa-fw","mr-1"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/apis-all/events/user-created-events-api.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px"],[4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],[1,"h-100"],["scrollHeight","calc(100vh - 92px)","selectionMode","multiple",1,"w-full",3,"value","selection","selectionChange","dblclick"],["pTemplate","default"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"id","data"],["eventManFormC",""],["pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],[1,"float-right","cursor-pointer","ml-3",3,"click"],["pTooltip","Grid View",1,"fas","fa-table","text-yellow","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"],["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-warning","fa-fw"],["pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],[1,"p-2","text-center","text-success"],[1,"w-100","prevent-text-selection","cursor-pointer"],[1,"w-100"],[2,"width","30%"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(r,l){1&r&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span"),t._UZ(3,"img",2),t._uU(4," Events"),t.qZA(),t.TgZ(5,"div",3)(6,"a",4),t._UZ(7,"img",5),t.qZA()(),t.YNc(8,Fe,8,3,"span",6),t.qZA(),t.TgZ(9,"div",7),t.YNc(10,Ye,3,1,"div",6),t.TgZ(11,"div",8)(12,"p-tree",9),t.NdJ("selectionChange",function(y){return l.selectedRows=y})("dblclick",function(){return l.dblClickEvent()})("selectionChange",function(){return l.functionSelected()}),t.YNc(13,Ke,3,2,"ng-template",10),t.qZA(),t.YNc(14,Qe,1,0,"p-progressSpinner",11),t.qZA()()(),t._UZ(15,"app-w-event-man-form",12,13)),2&r&&(t.xp6(8),t.Q6J("ngIf",!l.isReadOnly),t.xp6(2),t.Q6J("ngIf",l.eventCenterS.group.apisRegex.allEvents||l.eventCenterS.filterInLog.apisRegex.allEvents),t.xp6(2),t.Q6J("value",l.treeNodes)("selection",l.selectedRows),t.xp6(2),t.Q6J("ngIf",l.loading.grid),t.xp6(1),t.Q6J("id","idEventFormTree")("data",l.data))},dependencies:[P.O5,L.jx,Ie.mp,F.G,q.u,ye.a],encapsulation:2})}return d})();function We(d,M){1&d&&t._UZ(0,"app-events-tree",3)}function Ve(d,M){1&d&&t._UZ(0,"app-listeners-w",3)}const De=function(){return[50,50]};let xe=(()=>{class d{constructor(){}ngOnInit(){}static \u0275fac=function(r){return new(r||d)};static \u0275cmp=t.Xpm({type:d,selectors:[["app-event-man-layout-tree"]],decls:4,vars:4,consts:[[1,"pt-1","pl-1","pr-1"],["styleClass","full-body",3,"panelSizes","minSizes"],["pTemplate",""],[1,"w-100"]],template:function(r,l){1&r&&(t.TgZ(0,"div",0)(1,"p-splitter",1),t.YNc(2,We,1,0,"ng-template",2),t.YNc(3,Ve,1,0,"ng-template",2),t.qZA()()),2&r&&(t.xp6(1),t.Q6J("panelSizes",t.DdM(2,De))("minSizes",t.DdM(3,De)))},dependencies:[L.jx,f.q,se,Pe],encapsulation:2})}return d})();var Ze=o(5305);function ke(d,M){1&d&&t._UZ(0,"app-events-grid",3),2&d&&t.Q6J("showCheckbox",!1)}function He(d,M){1&d&&t._UZ(0,"app-listeners-w",4)}const we=function(){return[50,50]};let Oe=(()=>{class d{constructor(){}ngOnInit(){}static \u0275fac=function(r){return new(r||d)};static \u0275cmp=t.Xpm({type:d,selectors:[["app-event-man-layout"]],decls:4,vars:4,consts:[[1,"pt-1","pl-1","pr-1"],["styleClass","full-body",3,"panelSizes","minSizes"],["pTemplate",""],[1,"w-100",3,"showCheckbox"],[1,"w-100"]],template:function(r,l){1&r&&(t.TgZ(0,"div",0)(1,"p-splitter",1),t.YNc(2,ke,1,1,"ng-template",2),t.YNc(3,He,1,0,"ng-template",2),t.qZA()()),2&r&&(t.xp6(1),t.Q6J("panelSizes",t.DdM(2,we))("minSizes",t.DdM(3,we)))},dependencies:[L.jx,f.q,se,Ze.N],encapsulation:2})}return d})();var Re=o(63726);o(69701),o(26551);const $e=[{path:"",redirectTo:"layout-tree",pathMatch:"full"},{path:"layout-tree",component:xe,canActivate:[Re.P]},{path:"layout",component:Oe,canActivate:[Re.P]}];let ze=(()=>{class d{static \u0275fac=function(r){return new(r||d)};static \u0275mod=t.oAB({type:d});static \u0275inj=t.cJS({imports:[E.Bz.forChild($e),e.u]})}return d})()},13241:(Te,z,o)=>{o.d(z,{a:()=>_e});var E=o(15861),e=o(94946),t=o(60095),L=o(33157),f=o(90328),T=o(6990),O=o(51162),U=o(45085),K=o(99961),V=o(67145),ne=o(77240),k=o(27414),H=o(32915),X=o(95852),ee=o(67629),w=o(96814),Q=o(32660),S=o(97680),x=o(33259),P=o(38057),Y=o(69701),F=o(26551);const q=["eventTriggerModalC"];function B(D,W){1&D&&(e.TgZ(0,"span"),e._UZ(1,"i",25),e._uU(2," Add Event"),e.qZA())}function oe(D,W){1&D&&(e.TgZ(0,"span"),e._UZ(1,"i",26),e._uU(2," View Event"),e.qZA())}function re(D,W){1&D&&(e.TgZ(0,"span"),e._UZ(1,"i",27),e._uU(2," Edit Event"),e.qZA())}function ae(D,W){if(1&D){const g=e.EpF();e.TgZ(0,"div",28)(1,"div",29)(2,"span"),e._UZ(3,"i",30),e._uU(4," Automatically Trigger On API Hit"),e.qZA(),e.TgZ(5,"span",31),e.NdJ("click",function(){e.CHM(g);const _=e.oxw();return e.KtG(_.showEventTriggerModel())}),e._UZ(6,"i",32),e.qZA()(),e.TgZ(7,"div",33),e._UZ(8,"app-api-grid",34),e.qZA()()}if(2&D){const g=e.oxw();e.xp6(8),e.Q6J("rows",g.apiGridsRows)("mode","EVENT_FORM_MODEL")}}function ie(D,W){1&D&&(e.TgZ(0,"span"),e._uU(1,"Save"),e.qZA())}function le(D,W){1&D&&(e.TgZ(0,"span"),e._uU(1,"Update"),e.qZA())}function de(D,W){if(1&D){const g=e.EpF();e.TgZ(0,"button",35),e.NdJ("click",function(){e.CHM(g);const _=e.oxw();return e.KtG(_.save())}),e._UZ(1,"i",36),e.YNc(2,ie,2,0,"span",4),e.YNc(3,le,2,0,"span",4),e.qZA()}if(2&D){const g=e.oxw();e.Q6J("disabled",g.form.invalid),e.xp6(2),e.Q6J("ngIf",g.data.mode===g.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",g.data.mode===g.EFormMode.EDIT)}}function ce(D,W){1&D&&e._UZ(0,"p-progressSpinner",37)}let _e=(()=>{class D{fb;ns;amEventS;generalS;constantsS;eventCenterS;authCS;functionS;cd;data;id;loading={form:!1};EFormMode=f.D;form;subscriptions=[];apiGridsRows=[];instanceMap={};customAPIMap={};tpAPIVersionMap={};allAPIBundles=[];tpAPIs=[];tpAPIMap={};EAPICategory=U.R;dataItem={eventChannel:new e.vpe};eventTriggerModalC;constructor(g,I,_,A,G,J,u,N,s){this.fb=g,this.ns=I,this.amEventS=_,this.generalS=A,this.constantsS=G,this.eventCenterS=J,this.authCS=u,this.functionS=N,this.cd=s}ngOnInit(){var g=this;this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var I=(0,E.Z)(function*(_){if(_)if(g.form.enable(),_.action===L.F.OPEN_FORM_IN_EDIT_MODE){const A=yield g.amEventS.getById(g.data.formData._id).toPromise();g.form.reset(),g.form.patchValue(A.data),g.eventCenterS.eventTrigger.triggerOnApisArr=[],yield g.loadETriggerTable(A.data.triggerOnApis)}else if(_.action===L.F.OPEN_FORM_IN_VIEW_MODE){const A=yield g.amEventS.getById(g.data.formData._id).toPromise();g.form.reset(),g.form.patchValue(A.data),g.form.disable(),yield g.loadETriggerTable(A.data.triggerOnApis)}else _.action===L.F.OPEN_FORM_IN_ADD_MODE&&(g.form.reset(),g.resetData())});return function(_){return I.apply(this,arguments)}}())),this.subscriptions.push(this.eventCenterS.eventListenersSavedAndUpdate.subscribe(function(){var I=(0,E.Z)(function*(_){_&&(yield g.save(_))});return function(_){return I.apply(this,arguments)}}()))}createForm(){this.form=this.fb.group({name:[null,[t.kI.required]],isAutomaticallyTriggerOnApiHit:[null,[]]})}showModal(){$("#"+this.id).modal("show")}hideModal(){$("#"+this.id).modal("hide")}save(g,I){var _=this;return(0,E.Z)(function*(){if(g){I?.stopImmediatePropagation();const A=Object.assign({},g,_.eventCenterS.amEvents.selectedEvents.value[0]||{});if(A.user=_.authCS.getUserId(),!_.checkValidListeners(A))return;const G=yield _.amEventS.put(A._id,A,{select:O.iH._id}).toPromise();G&&G.success&&(_.ns.showSuccess(_.constantsS.amEvents.editSuccess),_.data.eventChannel.emit({action:_.data.mode===f.D.ADD?L.F.SAVED:L.F.UPDATED}))}else{const A=_.form.getRawValue();let G;G=_.data.formData&&_.data.formData._id?(yield _.amEventS.getById(_.data.formData._id).toPromise()).data:{};const J=Object.assign({},G,A);J.user=_.authCS.getUserId(),J.triggerOnApis=_.eventCenterS.eventTrigger.triggerOnApisArr||[];try{let u;if(_.loading.form=!0,!_.checkValidListeners(J))return;_.data.mode===f.D.ADD?u=yield _.amEventS.post(J).toPromise():_.data.mode===f.D.EDIT&&(J.eventListeners=(_.eventCenterS.amEvents.selectedEvents.value[0]||{}).eventListeners,u=yield _.amEventS.put(J._id,J,{select:O.iH._id}).toPromise()),_.ns.showSuccess(_.data.mode===f.D.ADD?_.constantsS.amEvents.addSuccess:_.constantsS.amEvents.editSuccess),_.data.eventChannel.emit({action:_.data.mode===f.D.ADD?L.F.SAVED:L.F.UPDATED})}catch(u){console.log(u),_.ns.showErrorFromResponse(u.error||u,"Unable to save event.")}_.loading.form=!1}})()}checkValidListeners(g){const I=T.uniq(T.map(g.eventListeners,O.l0.name));return!(I&&g&&g.eventListeners&&I.length!==g.eventListeners.length&&(this.ns.showError("Please provide unique names for listeners."),g.eventListeners.pop(),1))}showEventTriggerModel(){var g=this;return(0,E.Z)(function*(){g.dataItem.eventChannel.emit({action:L.F.OPEN_FORM_IN_ADD_MODE}),g.eventTriggerModalC.showModal()})()}loadETriggerTable(g){var I=this;return(0,E.Z)(function*(){I.resetData(),I.eventCenterS.eventTrigger.triggerOnApisArr=g,I.apiGridsRows=g,I.cd.detectChanges()})()}loadETriggerData(g){var I=this;return(0,E.Z)(function*(){const _=[];for(const A of g)A.apiCategory===U.R.INSTANCES?T.find(I.apiGridsRows,{instanceName:A.instanceName,databaseName:A.databaseName,collectionName:A.collectionName,instanceApiName:A.instanceApiName})||_.push(A):A.apiCategory===U.R.CUSTOM_APIS?T.find(I.apiGridsRows,{customApiName:A.customApiName})||_.push(A):A.apiCategory===U.R.SYSTEM_APIS?T.find(I.apiGridsRows,{systemApiName:A.systemApiName})||_.push(A):A.apiCategory===U.R.THIRD_PARTY_APIS&&(T.find(I.apiGridsRows,{tpInstalledApiBundleName:A.tpInstalledApiBundleName,tpInstalledApiVersion:A.tpInstalledApiVersion,tpInstalledApiName:A.tpInstalledApiName})||_.push(A));yield I.loadETriggerTable([...I.apiGridsRows,..._])})()}resetData(){this.instanceMap={},this.eventCenterS.eventTrigger.triggerOnApisArr=[],this.allAPIBundles=[],this.tpAPIMap={},this.apiGridsRows=[],this.customAPIMap={}}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(I){return new(I||D)(e.Y36(t.qu),e.Y36(K.W),e.Y36(V.l),e.Y36(ne.b),e.Y36(k.L),e.Y36(H.u),e.Y36(X.D),e.Y36(ee.d),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:D,selectors:[["app-w-event-man-form"]],viewQuery:function(I,_){if(1&I&&e.Gf(q,5),2&I){let A;e.iGM(A=e.CRH())&&(_.eventTriggerModalC=A.first)}},inputs:{data:"data",id:"id"},decls:31,vars:10,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal",3,"id"],["role","document",1,"modal-dialog","modal-xl"],[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","level1/level2/name",1,"form-control","form-control-sm"],[1,"col-4"],[1,"align-middle","mb-0","pt-1"],["formControlName","isAutomaticallyTriggerOnApiHit","label","Automatically Trigger On API Hit",3,"binary"],["class","card shadow-sm h-100",4,"ngIf"],[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"],[3,"dataItem","apiGridSendData"],["eventTriggerModalC",""],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],[1,"card","shadow-sm","h-100"],[1,"card-header"],[1,"fas","fa-table","text-yellow","fa-fw","mr-1"],["pTooltip","Add",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],[1,"card-body","p-0","overflow-auto"],[3,"rows","mode"],["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(I,_){1&I&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,B,3,0,"span",4),e.YNc(5,oe,3,0,"span",4),e.YNc(6,re,3,0,"span",4),e.TgZ(7,"button",5)(8,"span",6),e._UZ(9,"i",7),e.qZA()()(),e.TgZ(10,"div",8)(11,"form",9)(12,"div",10)(13,"label",11),e._uU(14,"Name"),e.qZA(),e.TgZ(15,"div",12),e._UZ(16,"input",13),e.qZA()(),e.TgZ(17,"div",10),e._UZ(18,"div",14),e.TgZ(19,"div",12)(20,"label",15),e._UZ(21,"p-checkbox",16),e.qZA()()()(),e.YNc(22,ae,9,2,"div",17),e.qZA(),e.TgZ(23,"div",18)(24,"button",19),e._UZ(25,"i",20),e._uU(26," Close"),e.qZA(),e.YNc(27,de,4,3,"button",21),e.qZA(),e.YNc(28,ce,1,0,"p-progressSpinner",22),e.qZA()()(),e.TgZ(29,"app-event-trigger-modal",23,24),e.NdJ("apiGridSendData",function(G){return _.loadETriggerData(G)}),e.qZA()),2&I&&(e.s9C("id",_.id),e.xp6(4),e.Q6J("ngIf",_.data.mode===_.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",_.data.mode===_.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",_.data.mode===_.EFormMode.EDIT),e.xp6(5),e.Q6J("formGroup",_.form),e.xp6(10),e.Q6J("binary",!0),e.xp6(1),e.Q6J("ngIf",_.form.get("isAutomaticallyTriggerOnApiHit").value),e.xp6(5),e.Q6J("ngIf",_.data.mode!==_.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",_.loading.form),e.xp6(1),e.Q6J("dataItem",_.dataItem))},dependencies:[t._Y,t.Fj,t.JJ,t.JL,t.sg,t.u,w.O5,Q.y,S.G,x.u,P.XZ,Y.p,F.u],encapsulation:2})}return D})()},26551:(Te,z,o)=>{o.d(z,{u:()=>ee});var E=o(15861),e=o(94946),t=o(51162),L=o(19394),f=o(45085),T=o(32915),C=o(96814),O=o(95431),U=o(85219),K=o(33259);function V(w,Q){1&w&&(e.TgZ(0,"tr")(1,"th",3),e._uU(2,"API Category"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Instances | Databases | Collections"),e.qZA(),e.TgZ(5,"th"),e._uU(6,"API Bundles | API Versions"),e.qZA(),e.TgZ(7,"th",4),e._uU(8,"API Name"),e.qZA(),e._UZ(9,"th",5),e.qZA())}function ne(w,Q){if(1&w&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&w){const S=e.oxw().$implicit;e.xp6(1),e.lnq("",S.instanceName," | ",S.databaseName," | ",S.collectionName,"")}}function k(w,Q){if(1&w&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&w){const S=e.oxw().$implicit;e.xp6(1),e.AsE("",S.tpInstalledApiBundleName," | ",S.tpInstalledApiVersion,"")}}function H(w,Q){if(1&w){const S=e.EpF();e.TgZ(0,"tr",6)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,ne,2,3,"span",7),e.qZA(),e.TgZ(5,"td"),e.YNc(6,k,2,2,"span",7),e.qZA(),e.TgZ(7,"td")(8,"div"),e._uU(9),e.qZA()(),e.TgZ(10,"td")(11,"div",8)(12,"i",9),e.NdJ("click",function(P){const F=e.CHM(S).$implicit,q=e.oxw();return e.KtG(q.unSelectApi(P,F))}),e.qZA()()()()}if(2&w){const S=Q.$implicit,x=e.oxw();e.Q6J("pSelectableRow",S),e.xp6(2),e.Oqu(x.EAPICategoryNames[S.apiCategory]),e.xp6(2),e.Q6J("ngIf",null==S?null:S.instanceName),e.xp6(2),e.Q6J("ngIf",null==S?null:S.tpInstalledApiBundleName),e.xp6(3),e.Oqu(x.EAPIIdToName[null==S?null:S.instanceApiName]||(null==S?null:S.customApiName)||x.EAPIIdToName[null==S?null:S.systemApiName]||(null==S?null:S.tpInstalledApiName))}}const X=function(){return{height:"100%"}};let ee=(()=>{class w{ec;cd;rows;mode;selectedRows=[];gridKey=t.iH._id;EAPICategory=f.R;deleteAPIAddInBack=new e.vpe;EAPICategoryNames=f.a;EAPIIdToName=L.n4;constructor(S,x){this.ec=S,this.cd=x}ngOnInit(){}unSelectApi(S,x){var P=this;return(0,E.Z)(function*(){if(S.stopPropagation(),S.preventDefault(),P.rows.splice(P.rows.indexOf(x),1),"EVENT_TRIGGER_MODEL"===P.mode){const Y=P.ec.eventTrigger.allApiIds.indexOf(x._id);-1!==Y&&P.ec.eventTrigger.allApiIds.splice(Y,1),P.deleteAPIAddInBack.emit(x)}else if("EVENT_FORM_MODEL"===P.mode){const Y=P.ec.eventTrigger.triggerOnApisArr.findIndex(F=>F._id===x._id);-1!==Y&&P.ec.eventTrigger.triggerOnApisArr.splice(Y,1)}})()}static \u0275fac=function(x){return new(x||w)(e.Y36(T.u),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:w,selectors:[["app-api-grid"]],inputs:{rows:"rows",mode:"mode"},outputs:{deleteAPIAddInBack:"deleteAPIAddInBack"},decls:3,vars:8,consts:[["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 100px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","ngStyle","value","selectionChange"],["pTemplate","header"],["pTemplate","body"],[2,"width","140px"],[2,"width","260px"],[2,"width","45px"],[3,"pSelectableRow"],[4,"ngIf"],[1,"text-center"],["pTooltip","Delete",1,"far","fa-trash-alt","fa-fw","text-danger","cursor-pointer",3,"click"]],template:function(x,P){1&x&&(e.TgZ(0,"p-table",0),e.NdJ("selectionChange",function(F){return P.selectedRows=F}),e.YNc(1,V,10,0,"ng-template",1),e.YNc(2,H,13,5,"ng-template",2),e.qZA()),2&x&&e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",P.selectedRows)("dataKey",P.gridKey)("scrollable",!0)("ngStyle",e.DdM(7,X))("value",P.rows)},dependencies:[C.O5,C.PC,O.iA,U.jx,O.Ei,K.u],encapsulation:2})}return w})()},69701:(Te,z,o)=>{o.d(z,{p:()=>J});var E=o(15861),e=o(94946),t=o(6990),f=o(56212),T=o(51162),C=o(45085),O=o(19394),U=o(77240),K=o(92189),V=o(99961),ne=o(95852),k=o(53429),H=o(10262),X=o(32915),ee=o(24977),w=o(12559),Q=o(67629),S=o(81429),x=o(60095),P=o(96814),Y=o(32660),F=o(85219),q=o(53965),B=o(26551);const oe=["apiDropdownGridC"];function re(u,N){if(1&u){const s=e.EpF();e.TgZ(0,"div",20)(1,"span",21),e._uU(2,"Database"),e.qZA(),e.TgZ(3,"p-dropdown",35),e.NdJ("onChange",function(p){e.CHM(s);const v=e.oxw(3);return v.tab.database=p.value,e.KtG(v.loadCollections(!0))}),e.qZA()()}if(2&u){const s=e.oxw(3);e.xp6(3),e.Q6J("options",s.tab.allDatabases)("ngModel",s.tab.database)("filter",!0)}}function ae(u,N){if(1&u){const s=e.EpF();e.TgZ(0,"div",20)(1,"span",21),e._uU(2,"Collections"),e.qZA(),e.TgZ(3,"p-dropdown",22),e.NdJ("onChange",function(p){e.CHM(s);const v=e.oxw(3);return v.tab.collection=p.value,e.KtG(v.loadInstanceAPIs(!0))}),e.qZA()()}if(2&u){const s=e.oxw(3);e.xp6(3),e.Q6J("options",s.tab.allCollections)("ngModel",s.tab.collection)("filter",!0)}}function ie(u,N){if(1&u){const s=e.EpF();e.TgZ(0,"div",19)(1,"div",20)(2,"span",21),e._uU(3,"Instances"),e.qZA(),e.TgZ(4,"p-dropdown",22),e.NdJ("onChange",function(p){e.CHM(s);const v=e.oxw(2);return v.tab.instance=p.value,e.KtG(v.loadDatabases(!0))}),e.qZA()(),e.YNc(5,re,4,3,"div",34),e.YNc(6,ae,4,3,"div",34),e.qZA()}if(2&u){const s=e.oxw(2);e.xp6(4),e.Q6J("options",s.tab.allInstances)("ngModel",s.tab.instance)("filter",!0),e.xp6(1),e.Q6J("ngIf",s.tab.apiCategory.id===s.EAPICategory.INSTANCES),e.xp6(1),e.Q6J("ngIf",s.tab.apiCategory.id===s.EAPICategory.INSTANCES)}}function le(u,N){if(1&u){const s=e.EpF();e.TgZ(0,"div",20)(1,"span",21),e._uU(2,"API Versions"),e.qZA(),e.TgZ(3,"p-dropdown",36),e.NdJ("onChange",function(p){e.CHM(s);const v=e.oxw(3);return v.tab.tpStoreApiVersion=p.value,e.KtG(v.loadThirdPartyAPIs(!0))}),e.qZA()()}if(2&u){const s=e.oxw(3);e.xp6(3),e.Q6J("options",s.tab.allStoreApiVersions)("ngModel",s.tab.tpStoreApiVersion)("filter",!0)}}function de(u,N){if(1&u){const s=e.EpF();e.TgZ(0,"div",19)(1,"div",20)(2,"span",21),e._uU(3,"API Bundle"),e.qZA(),e.TgZ(4,"p-dropdown",22),e.NdJ("onChange",function(p){e.CHM(s);const v=e.oxw(2);return v.tab.tpApiBundle=p.value,e.KtG(v.loadStoreApiVersions(!0))}),e.qZA()(),e.YNc(5,le,4,3,"div",34),e.qZA()}if(2&u){const s=e.oxw(2);e.xp6(4),e.Q6J("options",s.tab.allApiBundles)("ngModel",s.tab.tpApiBundle)("filter",!0),e.xp6(1),e.Q6J("ngIf",s.tab.apiCategory.id===s.EAPICategory.THIRD_PARTY_APIS)}}function ce(u,N){if(1&u&&(e.TgZ(0,"span",40),e._uU(1),e.qZA()),2&u){const s=e.oxw(2).$implicit;e.xp6(1),e.hij(" - ",s.category.toLowerCase(),"")}}function _e(u,N){if(1&u&&(e.TgZ(0,"span",41),e._uU(1),e.qZA()),2&u){const s=e.oxw(2).$implicit;e.xp6(1),e.hij(" - ",s.category.toLowerCase(),"")}}function D(u,N){if(1&u&&(e.TgZ(0,"div")(1,"span"),e._uU(2),e.qZA(),e.YNc(3,ce,2,1,"span",38),e.YNc(4,_e,2,1,"span",39),e.qZA()),2&u){const s=e.oxw().$implicit;e.xp6(2),e.Oqu(s.name),e.xp6(1),e.Q6J("ngIf","SCHEMA"===s.category),e.xp6(1),e.Q6J("ngIf","GEN"===s.category)}}function W(u,N){1&u&&e.YNc(0,D,5,3,"div",37),2&u&&e.Q6J("ngIf",N.$implicit)}function g(u,N){if(1&u&&(e.TgZ(0,"span",40),e._uU(1),e.qZA()),2&u){const s=e.oxw(2).$implicit;e.xp6(1),e.hij(" - ",s.category.toLowerCase(),"")}}function I(u,N){if(1&u&&(e.TgZ(0,"span",41),e._uU(1),e.qZA()),2&u){const s=e.oxw(2).$implicit;e.xp6(1),e.hij(" - ",s.category.toLowerCase(),"")}}function _(u,N){if(1&u&&(e.TgZ(0,"div")(1,"span"),e._uU(2),e.qZA(),e.YNc(3,g,2,1,"span",38),e.YNc(4,I,2,1,"span",39),e.qZA()),2&u){const s=e.oxw().$implicit;e.xp6(2),e.Oqu(s.name),e.xp6(1),e.Q6J("ngIf","SCHEMA"===s.category),e.xp6(1),e.Q6J("ngIf","GEN"===s.category)}}function A(u,N){1&u&&e.YNc(0,_,5,3,"div",37),2&u&&e.Q6J("ngIf",N.$implicit)}function G(u,N){if(1&u){const s=e.EpF();e.TgZ(0,"div",17)(1,"div",18)(2,"div",19)(3,"div",20)(4,"span",21),e._uU(5,"API Category"),e.qZA(),e.TgZ(6,"p-dropdown",22),e.NdJ("onChange",function(p){e.CHM(s);const v=e.oxw();return v.tab.apiCategory=p.value,e.KtG(v.apiCategoryChangedEvent(!0))}),e.qZA()()()(),e.TgZ(7,"div",18),e.YNc(8,ie,7,5,"div",23),e.qZA(),e.TgZ(9,"div",18),e.YNc(10,de,6,4,"div",23),e.qZA(),e.TgZ(11,"div",18)(12,"div",19)(13,"div",24)(14,"span",21),e._uU(15,"APIs"),e.qZA(),e.TgZ(16,"p-dropdown",25),e.NdJ("onChange",function(p){e.CHM(s);const v=e.oxw();return v.tab.api=p.value,e.KtG(v.selectAPI(!0))}),e.YNc(17,W,1,1,"ng-template",26),e.YNc(18,A,1,1,"ng-template",27),e.qZA()()()(),e.TgZ(19,"div",28)(20,"div",29)(21,"div",30)(22,"span"),e._UZ(23,"i",31),e._uU(24," APIs "),e.qZA()(),e.TgZ(25,"div",32)(26,"app-api-grid",33),e.NdJ("deleteAPIAddInBack",function(p){e.CHM(s);const v=e.oxw();return e.KtG(v.deleteAPIAddInBack(p))}),e.qZA()()()()()}if(2&u){const s=e.oxw();e.xp6(6),e.Q6J("options",s.apiCategories)("ngModel",s.tab.apiCategory)("filter",!0),e.xp6(2),e.Q6J("ngIf",s.tab.apiCategory.id===s.EAPICategory.INSTANCES),e.xp6(2),e.Q6J("ngIf",s.tab.apiCategory.id===s.EAPICategory.THIRD_PARTY_APIS),e.xp6(6),e.Q6J("options",s.tab.apiList)("ngModel",s.tab.api)("filter",!0),e.xp6(10),e.Q6J("rows",s.apiGridsRows)("mode","EVENT_TRIGGER_MODEL")}}let J=(()=>{class u{generalS;navigationCS;ns;authCS;instanceS;webSocketEventsS;ec;tpStoreApiVersionS;tpInstalledApisS;functionS;dataProviderS;cd;dataItem;subscriptions=[];tab={};apiCategories;loading={dropdown:!0};EAPICategory=C.R;apiDropdownGridC;apiGridsRows=[];apiGridSendData=new e.vpe;idCounter=0;constructor(s,n,p,v,pe,ue,fe,ge,m,Z,i,c){this.generalS=s,this.navigationCS=n,this.ns=p,this.authCS=v,this.instanceS=pe,this.webSocketEventsS=ue,this.ec=fe,this.tpStoreApiVersionS=ge,this.tpInstalledApisS=m,this.functionS=Z,this.dataProviderS=i,this.cd=c}ngOnInit(){var s=this;return(0,E.Z)(function*(){s.subscriptions.push(s.dataItem.eventChannel.subscribe(function(){var n=(0,E.Z)(function*(p){p&&(yield s.loadApiCategories(),s.cd.detectChanges())});return function(p){return n.apply(this,arguments)}}())),yield s.loadApiCategories()})()}showModal(){$("#idEventTriggerModal").modal("show")}hideModal(){$("#idEventTriggerModal").modal("hide"),this.generalS.resetUrlParams([f.p.at_category,f.p.at_instance,f.p.at_database,f.p.at_collection,f.p.at_bundleName,f.p.at_apiVersion,f.p.at_api])}loadApiCategories(){var s=this;return(0,E.Z)(function*(){const n=s.dataProviderS.getApiCategories();s.apiCategories=n.filter(v=>v.id!==C.R.SCHEDULERS&&v.id!==C.R.EVENTS&&v.id!==C.R.MIGRATION_SCRIPT&&v.id!==C.R.WEB_SOCKET_EVENT_CAN_USER_CONNECT_CODE&&v.id!==C.R.PROCESS_INITIALIZER&&v.id!==C.R.UTILITY_CLASS);const p=s.navigationCS.getQueryParam(f.p.at_category);p&&s.tab&&(s.tab.apiCategory=t.find(s.apiCategories,{id:p})),s.tab.apiCategory||(s.tab.apiCategory=s.apiCategories[0]),s.apiCategoryChangedEvent(!1),s.categorySelected(!1)})()}apiCategoryChangedEvent(s){var n=this;return(0,E.Z)(function*(){n.loading.dropdown=!0,n.resetDependentObjects("INSTANCE"),n.categorySelected(s),n.apiGridsRows=[],n.ec.eventTrigger.allApiIds=[],n.tab.apiCategory.id===C.R.INSTANCES?yield n.loadInstances(s):n.tab.apiCategory.id===C.R.THIRD_PARTY_APIS?yield n.loadLibraries(s):n.tab.apiCategory.id===C.R.CUSTOM_APIS?yield n.loadCustomAPIs(s):n.tab.apiCategory.id===C.R.SYSTEM_APIS?yield n.loadSystemAPIs(s):n.tab.apiCategory.id===C.R.WEB_SOCKET_EVENT_CAN_USER_CONNECT_CODE&&(yield n.loadWebSocketEventCanUserConnectCode(s)),n.apiDropdownGridC&&(n.apiDropdownGridC.rows=[],n.apiDropdownGridC.cd.detectChanges())})()}loadInstances(s){var n=this;return(0,E.Z)(function*(){n.resetDependentObjects("INSTANCE"),yield n.categorySelected(s),n.loading.dropdown=!0;try{n.tab.allInstances=(yield n.instanceS.query({find:{user:n.authCS.getUserId(),active:1},select:{name:1,active:1,user:1},sort:{name:1}}).toPromise()).data||[]}catch(v){n.ns.showErrorMessageFromErrorObject(v),n.tab.allInstances=[]}const p=n.navigationCS.getQueryParam(f.p.at_instance);p&&(n.tab.instance=t.find(n.tab.allInstances,{_id:p})),!n.tab.instance&&n.tab.allInstances.length&&(n.tab.instance=n.tab.allInstances[0]),yield n.loadDatabases(s),n.loading.dropdown=!1,n.cd.detectChanges()})()}loadDatabases(s){var n=this;return(0,E.Z)(function*(){if(n.loading.dropdown=!0,n.resetDependentObjects("DATABASE"),yield n.instanceSelected(s),!n.tab.instance)return n.tab.allDatabases=[],n.tab.allCollections=[],void(n.tab.apiList=[]);try{n.tab.allDatabases=((yield n.instanceS.getDatabases([n.tab.instance],null).toPromise()).data||[])[0]||[]}catch(v){n.ns.showErrorMessageFromErrorObject(v),n.tab.allDatabases=[]}const p=n.navigationCS.getQueryParam(f.p.at_database);p&&(n.tab.database=t.find(n.tab.allDatabases,{_id:p})),!n.tab.database&&n.tab.allDatabases.length&&(n.tab.database=n.tab.allDatabases[0]),yield n.loadCollections(s),n.loading.dropdown=!1})()}loadCollections(s){var n=this;return(0,E.Z)(function*(){if(n.loading.dropdown=!0,n.resetDependentObjects("COLLECTION"),yield n.databaseSelected(s),!n.tab.instance||!n.tab.database)return n.tab.allCollections=[],void(n.tab.apiList=[]);try{n.tab.allCollections=((yield n.instanceS.getCollections([n.tab.database],null).toPromise()).data||[])[0]||[]}catch(v){n.ns.showErrorMessageFromErrorObject(v),n.tab.allCollections=[]}const p=n.navigationCS.getQueryParam(f.p.at_collection);n.tab.collection=p?t.find(n.tab.allCollections,{_id:p}):n.tab.allCollections[0],yield n.loadInstanceAPIs(s),n.loading.dropdown=!1,n.cd.detectChanges()})()}loadInstanceAPIs(s){var n=this;return(0,E.Z)(function*(){if(n.loading.dropdown=!0,yield n.collectionSelected(s),!n.tab.instance||!n.tab.database||!n.tab.collection)return n.tab.apiList=[],void(n.loading.dropdown=!1);try{n.tab.apiList=(yield n.instanceS.instanceAPIList([n.tab.collection],void 0)).data||[]}catch(v){n.ns.showErrorMessageFromErrorObject(v),n.tab.apiList=[]}const p=n.navigationCS.getQueryParam(f.p.at_api);yield n.apiCommon(p)})()}loadLibraries(s){var n=this;return(0,E.Z)(function*(){n.resetDependentObjects("LIBRARY"),n.loading.dropdown=!0,n.tab.allApiBundles=yield n.tpStoreApiVersionS.getAllAPIBundles();const p=n.navigationCS.getQueryParam(f.p.at_bundleName);p&&(n.tab.tpApiBundle=t.find(n.tab.allApiBundles,{value:p})),!n.tab.tpApiBundle&&n.tab.allApiBundles.length&&(n.tab.tpApiBundle=n.tab.allApiBundles[0]),yield n.loadStoreApiVersions(s),n.loading.dropdown=!1,n.cd.detectChanges()})()}loadStoreApiVersions(s){var n=this;return(0,E.Z)(function*(){if(n.loading.dropdown=!0,n.resetDependentObjects("API_VERSION"),yield n.librarySelected(s),!n.tab.tpApiBundle)return n.tab.allStoreApiVersions=[],void(n.tab.apiList=[]);n.tab.allStoreApiVersions=yield n.tpStoreApiVersionS.getAllStoreApiVersions([n.tab.tpApiBundle.value]);const p=n.navigationCS.getQueryParam(f.p.at_bundleName),v=n.navigationCS.getQueryParam(f.p.at_apiVersion);v&&(n.tab.tpStoreApiVersion=t.find(n.tab.allStoreApiVersions,{apiBundleName:p,storeApiVersion:v})),!n.tab.tpStoreApiVersion&&n.tab.allStoreApiVersions.length&&(n.tab.tpStoreApiVersion=n.tab.allStoreApiVersions[0]),yield n.loadThirdPartyAPIs(s),n.loading.dropdown=!1,n.cd.detectChanges()})()}loadThirdPartyAPIs(s){var n=this;return(0,E.Z)(function*(){if(n.loading.dropdown=!0,yield n.tpApiVersionSelected(s),!n.tab.tpApiBundle||!n.tab.tpStoreApiVersion)return void(n.tab.apiList=[]);n.tab.apiList=(yield n.tpInstalledApisS.getThirdPartyAPIListArray([n.tab.tpStoreApiVersion]).toPromise()).data;const p=n.navigationCS.getQueryParam(f.p.at_api);yield n.apiCommon(p)})()}loadCustomAPIs(s){var n=this;return(0,E.Z)(function*(){n.loading.dropdown=!0;const p=yield n.functionS.getFunctionsAsAPI().toPromise();for(const pe of p.data)pe._id=n.idCounter++;p.success&&p.data&&p.data.length&&(n.tab.apiList=p.data||[]);const v=n.navigationCS.getQueryParam(f.p.custom_api);yield n.apiCommon(v)})()}loadSystemAPIs(s){var n=this;return(0,E.Z)(function*(){n.loading.dropdown=!0;const p=yield n.instanceS.systemAPIList().toPromise();p?.data?.length&&(n.tab.apiList=p.data||[]);const v=n.navigationCS.getQueryParam(f.p.system_api);yield n.apiCommon(v)})()}loadWebSocketEventCanUserConnectCode(s){var n=this;return(0,E.Z)(function*(){n.loading.dropdown=!0;const p=yield n.webSocketEventsS.loadWebSocketEventCanUserConnectCode().toPromise();p?.data?.length&&(n.tab.apiList=p.data||[]);const v=n.navigationCS.getQueryParam(f.p.web_socket_user_can_connect_api_list);yield n.apiCommon(v)})()}apiCommon(s){var n=this;return(0,E.Z)(function*(){n.tab.apiList.unshift({id:"SelectAPI",name:""});const p=t.keyBy(n.tab.apiList,T.iH._id);for(const v of n.ec.eventTrigger.allApiIds)p[v]&&n.tab.apiList.splice(n.tab.apiList.indexOf(p[v]),1);n.tab.api=n.tab.apiList[0],n.loading.dropdown=!1,n.cd.detectChanges()})()}selectAPI(s){var n=this;return(0,E.Z)(function*(){if(s){if("SelectAPI"===n.tab.api.id)return;n.tab.api.apiCategory=n.tab.apiCategory.id,n.apiGridsRows.push(n.tab.api),n.ec.eventTrigger.allApiIds.push(n.tab.api._id),n.ns.showSuccess("API added successfully.!!"),n.tab.apiList=n.tab.apiList.filter(p=>p._id!==n.tab.api._id)}n.tab.api={id:"SelectAPI",name:""}})()}deleteAPIAddInBack(s){(this.tab.apiCategory.id===C.R.INSTANCES&&s.instanceName===this.tab.instance.name&&s.databaseName===this.tab.database.db&&s.collectionName===this.tab.collection.name||this.tab.apiCategory.id===C.R.SYSTEM_APIS||this.tab.apiCategory.id===C.R.CUSTOM_APIS||this.tab.apiCategory.id===C.R.THIRD_PARTY_APIS&&this.tab.tpApiBundle.name===s.bundleName&&this.tab.tpStoreApiVersion.storeApiVersion===s.apiVersion)&&this.tab.apiList.push(s)}categorySelected(s){var n=this;return(0,E.Z)(function*(){n.tab.apiCategory&&(yield n.navigationCS.setQueryParam(f.p.at_category,n.tab.apiCategory.id),s&&(yield n.generalS.resetUrlParams([f.p.at_instance,f.p.at_database,f.p.at_collection,f.p.at_bundleName,f.p.at_apiVersion,f.p.at_api])))})()}resetDependentObjects(s){"INSTANCE"===s?(this.tab.allInstances=this.tab.allDatabases=this.tab.allCollections=this.tab.apiList=[],this.tab.instance=this.tab.database=this.tab.collection=this.tab.api=void 0):"DATABASE"===s?(this.tab.allDatabases=this.tab.allCollections=this.tab.apiList=[],this.tab.database=this.tab.collection=this.tab.api=void 0):"COLLECTION"===s?(this.tab.allCollections=this.tab.apiList=[],this.tab.collection=this.tab.api=void 0):"LIBRARY"===s?(this.tab.allApiBundles=this.tab.allStoreApiVersions=this.tab.apiList=[],this.tab.tpApiBundle=this.tab.api=this.tab.tpStoreApiVersion=void 0):"API_VERSION"===s&&(this.tab.allStoreApiVersions=this.tab.apiList=[],this.tab.tpStoreApiVersion=this.tab.api=void 0)}instanceSelected(s){var n=this;return(0,E.Z)(function*(){n.tab.instance&&n.tab.instance._id&&(yield n.navigationCS.setQueryParam(f.p.at_instance,n.tab.instance._id),s&&(yield n.generalS.resetUrlParams([f.p.at_database,f.p.at_collection,f.p.at_api])))})()}databaseSelected(s){var n=this;return(0,E.Z)(function*(){n.tab.database&&n.tab.database._id&&(yield n.navigationCS.setQueryParam(f.p.at_database,n.tab.database._id),s&&(yield n.generalS.resetUrlParams([f.p.at_collection,f.p.at_api])))})()}collectionSelected(s){var n=this;return(0,E.Z)(function*(){n.tab.collection&&n.tab.collection._id&&(yield n.navigationCS.setQueryParam(f.p.at_collection,n.tab.collection._id),s&&(yield n.generalS.resetUrlParams([f.p.at_api])))})()}librarySelected(s){var n=this;return(0,E.Z)(function*(){n.tab.tpApiBundle&&n.tab.tpApiBundle.value&&(yield n.navigationCS.setQueryParam(f.p.at_bundleName,n.tab.tpApiBundle.value),s&&(yield n.generalS.resetUrlParams([f.p.at_apiVersion,f.p.at_api])))})()}tpApiVersionSelected(s){var n=this;return(0,E.Z)(function*(){n.tab.tpStoreApiVersion&&n.tab.tpStoreApiVersion._id&&(yield n.navigationCS.setQueryParam(f.p.at_apiVersion,n.tab.tpStoreApiVersion._id),s&&(yield n.generalS.resetUrlParams([f.p.at_api])))})()}apiGridSend(){const s=[];for(const n of this.apiGridsRows)this.tab.apiCategory.id===C.R.INSTANCES?s.push({apiCategory:C.R.INSTANCES,instanceName:n.instanceName,databaseName:n.databaseName,collectionName:n.collectionName,instanceApiName:n.id,nameUI:O.n4[n.id],_id:this.generalS.generateMongoObjectId()}):this.tab.apiCategory.id===C.R.CUSTOM_APIS?s.push({apiCategory:C.R.CUSTOM_APIS,customApiName:n.customApiName,_id:this.generalS.generateMongoObjectId()}):this.tab.apiCategory.id===C.R.SYSTEM_APIS?s.push({apiCategory:C.R.SYSTEM_APIS,systemApiName:n.id,_id:this.generalS.generateMongoObjectId()}):this.tab.apiCategory.id===C.R.THIRD_PARTY_APIS&&s.push({apiCategory:C.R.THIRD_PARTY_APIS,tpInstalledApiBundleName:n.bundleName,tpInstalledApiVersion:n.apiVersion,tpInstalledApiName:n.name,_id:this.generalS.generateMongoObjectId()});this.apiGridSendData.emit(s),this.hideModal()}static \u0275fac=function(n){return new(n||u)(e.Y36(U.b),e.Y36(K.S),e.Y36(V.W),e.Y36(ne.D),e.Y36(k.E),e.Y36(H.a),e.Y36(X.u),e.Y36(ee.f),e.Y36(w.d),e.Y36(Q.d),e.Y36(S.B),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:u,selectors:[["app-event-trigger-modal"]],viewQuery:function(n,p){if(1&n&&e.Gf(oe,5),2&n){let v;e.iGM(v=e.CRH())&&(p.apiDropdownGridC=v.first)}},inputs:{dataItem:"dataItem"},outputs:{apiGridSendData:"apiGridSendData"},decls:22,vars:2,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idEventTriggerModal","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-xl"],[1,"modal-content"],[1,"modal-header"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/apis-all/events/user-created-events-api.html#triggers","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","mr-1","mt-n1",2,"font-size","25px"],["aria-label","Close","type","button",1,"close",3,"click"],["aria-hidden","true"],[1,"fas","fa-window-close"],["class","modal-body overflow-auto p-0","style","height: calc(100vh - 110px);",4,"ngIf"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary",3,"click"],[1,"fas","fa-times","text-danger","fa-fw"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"disabled","click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],[1,"modal-body","overflow-auto","p-0",2,"height","calc(100vh - 110px)"],[1,"container","mt-3"],[1,"row"],[1,"col-4"],[1,"small"],["optionLabel","name","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","ngModel","filter","onChange"],["class","row",4,"ngIf"],[1,"col-8"],["optionLabel","name","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled fix-height-issue",3,"options","ngModel","filter","onChange"],["pTemplate","item"],["pTemplate","selectedItem"],[1,"row","ml-0","mr-0","mt-4"],[1,"card","shadow-sm","h-100","w-100","p-3"],[1,"card-header"],[1,"fas","fa-table","text-yellow","fa-fw","mr-1"],[1,"card-body","h-100","p-0"],[1,"w-100",3,"rows","mode","deleteAPIAddInBack"],["class","col-4",4,"ngIf"],["optionLabel","db","filterBy","db","appendTo","body","styleClass","w-100 p-input-filled",3,"options","ngModel","filter","onChange"],["optionLabel","displayText","filterBy","displayText","appendTo","body","styleClass","w-100 p-input-filled",3,"options","ngModel","filter","onChange"],[4,"ngIf"],["class","small text-success italic",4,"ngIf"],["class","small text-info italic",4,"ngIf"],[1,"small","text-success","italic"],[1,"small","text-info","italic"]],template:function(n,p){1&n&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span"),e._UZ(5,"i",4),e._uU(6," Event Trigger"),e.qZA(),e.TgZ(7,"div",5)(8,"a",6),e._UZ(9,"img",7),e.qZA(),e.TgZ(10,"button",8),e.NdJ("click",function(){return p.hideModal()}),e.TgZ(11,"span",9),e._UZ(12,"i",10),e.qZA()()()(),e.YNc(13,G,27,10,"div",11),e.TgZ(14,"div",12)(15,"button",13),e.NdJ("click",function(){return p.hideModal()}),e._UZ(16,"i",14),e._uU(17," Close"),e.qZA(),e.TgZ(18,"button",15),e.NdJ("click",function(){return p.apiGridSend()}),e._UZ(19,"i",16),e.TgZ(20,"span"),e._uU(21,"Save"),e.qZA()()()()()()),2&n&&(e.xp6(13),e.Q6J("ngIf",p.tab),e.xp6(5),e.Q6J("disabled",!p.apiGridsRows.length))},dependencies:[x.JJ,x.On,P.O5,Y.y,F.jx,q.Lt,B.u],encapsulation:2,changeDetection:0})}return u})()},5305:(Te,z,o)=>{o.d(z,{N:()=>ge});var E=o(15861),e=o(94946),t=o(33157),L=o(90328),f=o(56212),T=o(6990),O=o(45085),U=o(51162),K=o(96925),V=o(67145),ne=o(77240),k=o(99961),H=o(92189),X=o(95852),ee=o(27414),w=o(32915),Q=o(25405),S=o(77664),x=o(85219),P=o(60095),Y=o(96814),F=o(95431),q=o(97680),B=o(33259),oe=o(38057),re=o(13241);const ae=["eventManFormC"];function ie(m,Z){if(1&m){const i=e.EpF();e.TgZ(0,"span",18),e.NdJ("click",function(){e.CHM(i);const h=e.oxw(2);return e.KtG(h.toggleTreeView())}),e._UZ(1,"i",19),e.qZA()}}function le(m,Z){if(1&m){const i=e.EpF();e.TgZ(0,"span",20),e.NdJ("click",function(){e.CHM(i);const h=e.oxw(2);return e.KtG(h.edit())}),e._UZ(1,"i",21),e.qZA()}}function de(m,Z){if(1&m){const i=e.EpF();e.TgZ(0,"span",22),e.NdJ("click",function(){e.CHM(i);const h=e.oxw(2);return e.KtG(h.clone())}),e._UZ(1,"i",23),e.qZA()}}function ce(m,Z){if(1&m){const i=e.EpF();e.TgZ(0,"span",24),e.NdJ("click",function(){e.CHM(i);const h=e.oxw(2);return e.KtG(h.removePermanentDialog())}),e._UZ(1,"i",25),e.qZA()}}function _e(m,Z){if(1&m){const i=e.EpF();e.TgZ(0,"span")(1,"span",12),e.NdJ("click",function(){e.CHM(i);const h=e.oxw();return e.KtG(h.add())}),e._UZ(2,"i",13),e.qZA(),e.YNc(3,ie,2,0,"span",14),e.YNc(4,le,2,0,"span",15),e.YNc(5,de,2,0,"span",16),e.YNc(6,ce,2,0,"span",17),e.qZA()}if(2&m){const i=e.oxw();e.xp6(3),e.Q6J("ngIf",i.rows.length),e.xp6(1),e.Q6J("ngIf",i.selectedRows.length),e.xp6(1),e.Q6J("ngIf",i.selectedRows.length),e.xp6(1),e.Q6J("ngIf",i.selectedRows.length)}}function D(m,Z){if(1&m){const i=e.EpF();e.TgZ(0,"span",26)(1,"p-checkbox",27),e.NdJ("ngModelChange",function(h){e.CHM(i);const R=e.oxw();return e.KtG(R.eventCenterS.group.apisRegex.allEvents=h)}),e.qZA()()}if(2&m){const i=e.oxw();e.xp6(1),e.Q6J("ngModel",i.eventCenterS.group.apisRegex.allEvents)("binary",!0)}}function W(m,Z){if(1&m){const i=e.EpF();e.TgZ(0,"span",26)(1,"p-checkbox",27),e.NdJ("ngModelChange",function(h){e.CHM(i);const R=e.oxw();return e.KtG(R.eventCenterS.filterInLog.apisRegex.allEvents=h)}),e.qZA()()}if(2&m){const i=e.oxw();e.xp6(1),e.Q6J("ngModel",i.eventCenterS.filterInLog.apisRegex.allEvents)("binary",!0)}}function g(m,Z){if(1&m&&(e.TgZ(0,"div")(1,"div",28),e._uU(2),e.qZA()()),2&m){const i=e.oxw();e.xp6(2),e.Oqu(i.constantsS.group.allAmEventsPermitted)}}function I(m,Z){1&m&&(e.TgZ(0,"th",37),e._UZ(1,"p-tableHeaderCheckbox"),e.qZA())}function _(m,Z){1&m&&e._UZ(0,"th",38)}function A(m,Z){1&m&&e._UZ(0,"th")}function G(m,Z){1&m&&e._UZ(0,"th",39)}function J(m,Z){if(1&m&&(e.TgZ(0,"tr"),e.YNc(1,I,2,0,"th",34),e.YNc(2,_,1,0,"th",35),e.TgZ(3,"th"),e._uU(4,"Name"),e.qZA(),e.YNc(5,A,1,0,"th",6),e.YNc(6,G,1,0,"th",36),e.qZA()),2&m){const i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",i.showCheckbox),e.xp6(1),e.Q6J("ngIf",!i.isDependentOnGroup&&!i.isLPM&&!i.isFilterLogTable),e.xp6(3),e.Q6J("ngIf",i.isLPM),e.xp6(1),e.Q6J("ngIf",!i.isDependentOnGroup&&!i.isLPM&&!i.isFilterLogTable)}}function u(m,Z){if(1&m&&(e.TgZ(0,"td"),e._UZ(1,"p-tableCheckbox",42),e.qZA()),2&m){const i=e.oxw().$implicit;e.xp6(1),e.Q6J("value",i)("pSelectableRow",i)}}function N(m,Z){if(1&m&&(e.TgZ(0,"td",43)(1,"span"),e._uU(2),e.qZA()()),2&m){const i=e.oxw().rowIndex;e.xp6(2),e.Oqu(i+1)}}function s(m,Z){if(1&m){const i=e.EpF();e.TgZ(0,"div")(1,"label",44)(2,"p-checkbox",45),e.NdJ("ngModelChange",function(){e.CHM(i);const h=e.oxw(2).$implicit,R=e.oxw(2);return e.KtG(R.checkedChangeGridItem(h))})("ngModelChange",function(h){e.CHM(i);const R=e.oxw(2).$implicit;return e.KtG(R.saveResponseInLog=h)}),e.qZA()()()}if(2&m){const i=e.oxw(2).$implicit;e.xp6(2),e.Q6J("ngModel",i.saveResponseInLog)("binary",!0)}}function n(m,Z){if(1&m&&(e.TgZ(0,"td"),e.YNc(1,s,3,2,"div",6),e.qZA()),2&m){const i=e.oxw().$implicit,c=e.oxw(2);e.xp6(1),e.Q6J("ngIf",c.selectedRows.indexOf(i)>=0)}}function p(m,Z){if(1&m){const i=e.EpF();e.TgZ(0,"i",47),e.NdJ("click",function(h){e.CHM(i);const R=e.oxw(2).$implicit;e.oxw(2);const te=e.MAs(15);return e.KtG(te.save(R,h))}),e.qZA()}}function v(m,Z){if(1&m&&(e.TgZ(0,"td")(1,"div",43),e.YNc(2,p,1,0,"i",46),e.qZA()()),2&m){const i=e.oxw().$implicit,c=e.oxw(2);e.xp6(2),e.Q6J("ngIf",c.selectedRows.indexOf(i)>-1)}}function pe(m,Z){if(1&m&&(e.TgZ(0,"tr",40),e.YNc(1,u,2,2,"td",6),e.YNc(2,N,3,1,"td",41),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.YNc(5,n,2,1,"td",6),e.YNc(6,v,3,1,"td",6),e.qZA()),2&m){const i=Z.$implicit,c=e.oxw(2);e.Q6J("pSelectableRow",i),e.xp6(1),e.Q6J("ngIf",c.showCheckbox),e.xp6(1),e.Q6J("ngIf",!c.isDependentOnGroup&&!c.isLPM&&!c.isFilterLogTable),e.xp6(2),e.Oqu(i.name),e.xp6(1),e.Q6J("ngIf",c.isLPM),e.xp6(1),e.Q6J("ngIf",!c.isDependentOnGroup&&!c.isLPM&&!c.isFilterLogTable)}}function ue(m,Z){1&m&&e._UZ(0,"p-progressSpinner",48)}function fe(m,Z){if(1&m){const i=e.EpF();e.TgZ(0,"div",29)(1,"p-table",30),e.NdJ("selectionChange",function(h){e.CHM(i);const R=e.oxw();return e.KtG(R.selectedRows=h)})("selectionChange",function(){e.CHM(i);const h=e.oxw();return e.KtG(h.functionSelected())})("dblclick",function(){e.CHM(i);const h=e.oxw();return e.KtG(h.dblClickEvent())}),e.YNc(2,J,7,4,"ng-template",31),e.YNc(3,pe,7,6,"ng-template",32),e.qZA(),e.YNc(4,ue,1,0,"p-progressSpinner",33),e.qZA()}if(2&m){const i=e.oxw();e.xp6(1),e.Q6J("selectionMode","multiple")("metaKeySelection",i.metaKeySelection)("selection",i.selectedRows)("dataKey",i.gridKey)("scrollable",!0)("value",i.rows),e.xp6(3),e.Q6J("ngIf",i.loading.grid)}}let ge=(()=>{class m{amEventS;generalS;notificationS;navigationCS;authCS;constantsS;cd;eventCenterS;eventCenterCS;router;confirmationService;isReadOnly=!1;showCheckbox=!0;isDependentOnGroup=!1;isLPM=!1;isFilterLogTable=!1;metaKeySelection=!0;loading={grid:!1};subscriptions=[];data={mode:L.D.ADD,eventChannel:new e.vpe,formData:void 0};rows=[];rowsMap={};rowsMapName={};showAll=!1;selectedRows=[];gridKey=U.iH._id;treeNodes=[];eventManFormC;EAPICategory=O.R;ERequestMethod=K.Yp;constructor(i,c,h,R,te,j,se,ve,Ae,Se,Ie){this.amEventS=i,this.generalS=c,this.notificationS=h,this.navigationCS=R,this.authCS=te,this.constantsS=j,this.cd=se,this.eventCenterS=ve,this.eventCenterCS=Ae,this.router=Se,this.confirmationService=Ie}ngOnInit(){var i=this;this.loadGridData(),this.subscriptions.push(this.data.eventChannel.subscribe(c=>{(c.action===t.F.SAVED||c.action===t.F.UPDATED)&&(this.eventManFormC.hideModal(),this.loadGridData())})),this.isDependentOnGroup&&this.subscriptions.push(this.eventCenterS.group.selectedGroups.subscribe(function(){var c=(0,E.Z)(function*(h){h.length&&(yield i.loadGridData())});return function(h){return c.apply(this,arguments)}}())),(this.isFilterLogTable||this.isLPM)&&this.subscriptions.push(this.eventCenterS.filterInLog.refreshGrid.subscribe(c=>{c&&this.loadGridData()})),this.generalS.setNewTitle("API Maker - Events")}loadGridData(){var i=this;return(0,E.Z)(function*(){i.loading.grid=!0;try{const c={find:{user:i.authCS.getUserId(),active:!0},select:{name:1,eventListeners:1,active:1},sort:{name:1}};i.showAll&&delete c.find.active;const h=yield i.amEventS.query(c).toPromise();h.success?(i.selectedRows=[],i.rows=h.data||[],i.rowsMap=T.keyBy(i.rows,U.iH._id),i.rowsMapName=T.keyBy(i.rows,U.l0.name)):i.resetGridAndUrl();const R=i.navigationCS.getQueryParam(f.p.am_events)||(i.isFilterLogTable?i.eventCenterS.filterInLog.eventIds.value.join(","):i.eventCenterS.group.eventIds.value.join(","))||(i.isDependentOnGroup&&i.eventCenterS.group.selectedGroups.value[0]?.queryParams?.eventNames?i.eventCenterS.group.selectedGroups.value[0]?.queryParams.eventNames.join(","):"");if(R){const te=R.split(","),j=T.intersection(T.keys(i.rowsMap),te),se=[];for(const ve of j)i.rowsMap[ve]&&se.push(i.rowsMap[ve]);i.selectedRows=se,i.eventCenterS.amEvents.selectedEvents.next(se),i.eventCenterS.group.eventIds.next(j),i.eventCenterS.filterInLog.eventIds.next(j)}if(i.isLPM&&i.eventCenterS.group.selectedGroups.value[0]?.queryParams?.eventNames?.length){const te=i.eventCenterS.group.selectedGroups.value[0];for(const j of te?.queryParams?.eventNames)i.rowsMapName[j]&&(i.rowsMapName[j].saveResponseInLog=te.eventLog?.[j]?.saveResponseInLog||!1);i.setResDataInEventCenter()}}catch(c){console.log(c)}i.loading.grid=!1,i.cd.detectChanges()})()}setResDataInEventCenter(){this.isDependentOnGroup&&(this.eventCenterS.group.eventsApis.next(this.selectedRows),this.eventCenterS.group.selectedEvents.next(this.selectedRows)),this.isFilterLogTable&&this.eventCenterS.filterInLog.eventsApis.next(this.selectedRows)}add(){this.data.formData=void 0,this.data.mode=L.D.ADD,this.data.eventChannel.emit({action:t.F.OPEN_FORM_IN_ADD_MODE}),this.eventManFormC.showModal()}edit(){this.selectedRows[0]&&(this.data.formData=this.selectedRows[0],this.data.mode=L.D.EDIT,this.data.eventChannel.emit({action:t.F.OPEN_FORM_IN_EDIT_MODE}),this.eventManFormC.showModal())}clone(){var i=this;return(0,E.Z)(function*(){try{if(!i.selectedRows[0])return;const c=(yield i.amEventS.getById(i.selectedRows[0]._id).toPromise()).data;delete c._id,delete c.guid,c.name=`event-${Math.random().toString().substr(2,6)}`,(yield i.amEventS.post(c).toPromise()).success?(i.notificationS.showSuccess(i.constantsS.amEvents.cloneSuccess),i.loadGridData()):i.notificationS.showSuccess(i.constantsS.amEvents.cloneSuccess)}catch{i.notificationS.showError(i.constantsS.amEvents.cloneError)}})()}removePermanentDialog(){var i=this;return(0,E.Z)(function*(){var c;i.confirmationService.confirm({message:i.constantsS.amEvents.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(c=(0,E.Z)(function*(){yield i.removePermanent()}),function(){return c.apply(this,arguments)})})})()}removePermanent(){var i=this;return(0,E.Z)(function*(){i.loading.grid=!0;const c=yield i.amEventS.permanentDelete(i.selectedRows[0]._id).toPromise();i.loading.grid=!1,c.success?(i.notificationS.showSuccess(i.constantsS.amEvents.removePermanent),i.resetGridAndUrl(),i.loadGridData(),i.selectedRows=[]):i.notificationS.showErrorFromResponse(c,i.constantsS.amEvents.removePermanentError)})()}resetDependents(){var i=this;return(0,E.Z)(function*(){i.eventCenterS.amEvents.selectedEvents.next([]),yield i.navigationCS.setQueryParam(f.p.am_events,null)})()}functionSelected(){var i=this;return(0,E.Z)(function*(){setTimeout(()=>{i.resetDependents();for(const c of i.rows)-1===i.selectedRows.indexOf(c)&&(c.saveResponseInLog=!1);i.fillData(),i.selectedRows?.[0]?.eventListeners?.[0]?.name?i.generalS.setNewTitle(i.selectedRows[0].eventListeners[0].name,O.R.EVENTS):i.generalS.setNewTitle("API Maker - Events")},100)})()}resetGridAndUrl(){this.rows=[],this.selectedRows=[],this.rowsMap={},this.rowsMapName={},this.eventCenterS.amEvents.selectedEvents.next([])}fillData(){var i=this;return(0,E.Z)(function*(){if(!i.selectedRows.length)return i.eventCenterS.amEvents.selectedEvents.next([]),void(yield i.navigationCS.setQueryParam(f.p.am_events,""));if(i.isDependentOnGroup||i.isFilterLogTable)i.eventCenterS.group.eventIds.next(T.map(i.selectedRows,"_id")),i.eventCenterS.group.eventsApis.next(i.selectedRows),i.isFilterLogTable&&(i.eventCenterS.filterInLog.eventIds.next(T.map(i.selectedRows,"_id")),i.eventCenterS.filterInLog.eventsApis.next(i.selectedRows));else{const c=(yield i.amEventS.getById(i.selectedRows[0]._id).toPromise()).data;c._id?(yield i.navigationCS.setQueryParam(f.p.am_events,c._id),i.eventCenterS.amEvents.selectedEvents.next([c])):i.resetDependents()}})()}checkedChangeGridItem(i){var c=this;setTimeout((0,E.Z)(function*(){c.selectedRows.push(i),c.selectedRows=T.uniq(c.selectedRows);for(const h in c.rowsMap){const R=c.rowsMap[h];-1===c.selectedRows.indexOf(R)&&(R.saveResponseInLog=!1)}c.setResDataInEventCenter(),c.cd.detectChanges()}),100)}toggleTreeView(){var i=this;return(0,E.Z)(function*(){i.router.navigate(["api-info","am-events","layout-tree"])})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickEvent(){this.selectedRows.length&&this.edit()}static \u0275fac=function(c){return new(c||m)(e.Y36(V.l),e.Y36(ne.b),e.Y36(k.W),e.Y36(H.S),e.Y36(X.D),e.Y36(ee.L),e.Y36(e.sBO),e.Y36(w.u),e.Y36(Q.M),e.Y36(S.F0),e.Y36(x.YP))};static \u0275cmp=e.Xpm({type:m,selectors:[["app-events-grid"]],viewQuery:function(c,h){if(1&c&&e.Gf(ae,5),2&c){let R;e.iGM(R=e.CRH())&&(h.eventManFormC=R.first)}},inputs:{isReadOnly:["IsReadOnly","isReadOnly"],showCheckbox:"showCheckbox",isDependentOnGroup:["IsDependentOnGroup","isDependentOnGroup"],isLPM:"isLPM",isFilterLogTable:"isFilterLogTable",metaKeySelection:"metaKeySelection"},decls:16,vars:7,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["src","/assets/images/icons/event.svg","alt","Events",1,"fa-fw","mr-1"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/apis-all/events/user-created-events-api.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px"],[4,"ngIf"],["class","float-right cursor-pointer","pTooltip","All Events",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["class","h-100",4,"ngIf"],[3,"id","data"],["eventManFormC",""],["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",3,"click",4,"ngIf"],["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,"float-right","cursor-pointer","ml-3",3,"click"],["pTooltip","Tree View",1,"fas","fa-sitemap","text-yellow","fa-fw","fa-rotate-270"],["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-warning","fa-fw"],["pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],["pTooltip","All Events",1,"float-right","cursor-pointer"],[3,"ngModel","binary","ngModelChange"],[1,"p-2","text-center","text-success"],[1,"h-100"],["styleClass","p-datatable-striped events-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"],["style","width: 65px;",4,"ngIf"],[2,"width","45px"],[2,"width","80px"],[2,"width","65px"],[3,"pSelectableRow"],["class","text-center",4,"ngIf"],[3,"value","pSelectableRow"],[1,"text-center"],[1,"m-0","vertical-align-sub"],["label","Save Response In Log",3,"ngModel","binary","ngModelChange"],["class","fas fa-save text-success fa-fw cursor-pointer","pTooltip","Save",3,"click",4,"ngIf"],["pTooltip","Save",1,"fas","fa-save","text-success","fa-fw","cursor-pointer",3,"click"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(c,h){1&c&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"img",2),e._uU(4," Events"),e.qZA(),e.TgZ(5,"div",3)(6,"a",4),e._UZ(7,"img",5),e.qZA()(),e.YNc(8,_e,7,4,"span",6),e.YNc(9,D,2,2,"span",7),e.YNc(10,W,2,2,"span",7),e.qZA(),e.TgZ(11,"div",8),e.YNc(12,g,3,1,"div",6),e.YNc(13,fe,5,7,"div",9),e.qZA()(),e._UZ(14,"app-w-event-man-form",10,11)),2&c&&(e.xp6(8),e.Q6J("ngIf",!h.isReadOnly),e.xp6(1),e.Q6J("ngIf",h.isDependentOnGroup),e.xp6(1),e.Q6J("ngIf",h.isFilterLogTable),e.xp6(2),e.Q6J("ngIf",h.eventCenterS.group.apisRegex.allEvents||h.eventCenterS.filterInLog.apisRegex.allEvents),e.xp6(1),e.Q6J("ngIf",!(h.eventCenterS.group.apisRegex.allEvents||h.eventCenterS.filterInLog.apisRegex.allEvents)),e.xp6(1),e.Q6J("id","idEventFormGrid")("data",h.data))},dependencies:[P.JJ,P.On,Y.O5,F.iA,x.jx,F.Ei,F.UA,F.Mo,q.G,B.u,oe.XZ,re.a],encapsulation:2})}return m})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[8266],{58266:(dt,M,n)=>{n.r(M),n.d(M,{DatabasesMigrationM:()=>et});var m=n(77664),x=n(17017),D=n(63726),t=n(94946),o=n(15861),d=n(6990),p=n(33157),h=n(90328),g=n(56212),b=n(51162),Z=n(45085),w=n(60921),T=n(90602),A=n(77240),C=n(99961),E=n(92189),P=n(95852),_=n(27414),R=n(32915),I=n(33835),k=n(53429),v=n(85219),U=n(96814),f=n(95431),F=n(97680),L=n(33259),N=n(96522);const Y=["databasesMigrationFormC"];function J(s,c){if(1&s){const e=t.EpF();t.TgZ(0,"span",19),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.playAll())}),t._UZ(1,"i",20),t.qZA()}}function O(s,c){if(1&s){const e=t.EpF();t.TgZ(0,"span",21),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.markAll())}),t._UZ(1,"i",22),t.qZA()}}function Q(s,c){if(1&s){const e=t.EpF();t.TgZ(0,"span",23),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.edit())}),t._UZ(1,"i",24),t.qZA()}}function G(s,c){if(1&s){const e=t.EpF();t.TgZ(0,"span",25),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.clone())}),t._UZ(1,"i",26),t.qZA()}}function H(s,c){if(1&s){const e=t.EpF();t.TgZ(0,"span",27),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.removePermanent())}),t._UZ(1,"i",28),t.qZA()}}function K(s,c){1&s&&(t.TgZ(0,"th",32),t._UZ(1,"p-tableHeaderCheckbox"),t.qZA())}function B(s,c){if(1&s&&(t.TgZ(0,"tr"),t.YNc(1,K,2,0,"th",29),t._UZ(2,"th",30),t.TgZ(3,"th",31),t._uU(4,"Order"),t.qZA(),t.TgZ(5,"th"),t._uU(6,"Name"),t.qZA(),t.TgZ(7,"th"),t._uU(8,"Label"),t.qZA(),t._UZ(9,"th",31)(10,"th",31),t.qZA()),2&s){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.showCheckbox)}}function j(s,c){if(1&s&&(t.TgZ(0,"td"),t._UZ(1,"p-tableCheckbox",41),t.qZA()),2&s){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("value",e)("pSelectableRow",e)}}function $(s,c){1&s&&t._UZ(0,"i",42)}const W=function(){return["/api-info/api-testing/testing"]},q=function(s,c,e){return{at_category:s,at_user:c,at_api:e}};function z(s,c){if(1&s){const e=t.EpF();t.TgZ(0,"tr",33),t.YNc(1,j,2,2,"td",34),t.TgZ(2,"td"),t.YNc(3,$,1,0,"i",35),t.qZA(),t.TgZ(4,"td"),t._uU(5),t.qZA(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td"),t._uU(9),t.qZA(),t.TgZ(10,"td")(11,"div",36)(12,"button",37),t.NdJ("click",function(){const r=t.CHM(e).$implicit,l=t.oxw();return t.KtG(l.playSingle(r))}),t._UZ(13,"i",38),t.qZA()()(),t.TgZ(14,"td")(15,"div",36)(16,"a",39),t.NdJ("click",function(a){return a.stopPropagation()}),t._UZ(17,"i",40),t.qZA()()()()}if(2&s){const e=c.$implicit,i=t.oxw();t.Q6J("pSelectableRow",e),t.xp6(1),t.Q6J("ngIf",i.showCheckbox),t.xp6(2),t.Q6J("ngIf",e.isScriptExecutedCalculated),t.xp6(2),t.Oqu(e.order),t.xp6(2),t.Oqu(e.name),t.xp6(2),t.Oqu(e.label),t.xp6(7),t.Q6J("routerLink",t.DdM(8,W))("queryParams",t.kEZ(9,q,i.EAPICategory.MIGRATION_SCRIPT,i.authCS.getUserId(),e._id))}}function X(s,c){1&s&&t._UZ(0,"p-progressSpinner",43)}let y=(()=>{class s{dbMigrationS;generalS;notificationS;navigationCS;authCS;constantsS;eventCenterS;router;userS;instanceS;ns;cs;confirmationService;cd;showCheckbox=!0;loading={grid:!1};subscriptions=[];data={mode:h.D.ADD,eventChannel:new t.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;EUserType=w.d;gridKey=b.iH._id;EAPICategory=Z.R;selectedRows=[];databasesMigrationFormC;constructor(e,i,a,r,l,u,it,at,st,nt,ot,rt,ct,lt){this.dbMigrationS=e,this.generalS=i,this.notificationS=a,this.navigationCS=r,this.authCS=l,this.constantsS=u,this.eventCenterS=it,this.router=at,this.userS=st,this.instanceS=nt,this.ns=ot,this.cs=rt,this.confirmationService=ct,this.cd=lt}ngOnInit(){var e=this;return(0,o.Z)(function*(){e.eventCenterS.dbMigration.selectedDbMigration.next(void 0),yield e.loadGridData(),e.subscriptions.push(e.data.eventChannel.subscribe(function(){var i=(0,o.Z)(function*(a){(a.action===p.F.SAVED||a.action===p.F.UPDATED)&&(e.databasesMigrationFormC.hideModal(),yield e.loadGridData())});return function(a){return i.apply(this,arguments)}}())),e.generalS.setNewTitle("API Maker - Database Migration")})()}loadGridData(){var e=this;return(0,o.Z)(function*(){e.loading.grid=!0;const i=(yield e.userS.getById(e.authCS.gUser._id).toPromise()).data;i.executedMigrationScripts=i.executedMigrationScripts||{};const a={find:{user:e.authCS.getUserId(),active:!0},select:{name:1,label:1,active:1,user:1,order:1},sort:{order:1}};e.showAll&&delete a.find.active;const r=yield e.dbMigrationS.query(a).toPromise();r&&(e.selectedRows=[],e.rows=r.data,e.rowsMap=d.keyBy(e.rows,b.iH._id));for(const u of e.rows)u.isScriptExecutedCalculated=i.executedMigrationScripts[u.name];let l=e.navigationCS.getQueryParam(g.p.am_db_migration);l&&!e.rowsMap[l]&&e.rows.length&&(l=e.rows[0]._id),e.rowsMap[l]?yield e.fillData():e.eventCenterS.dbMigration.selectedDbMigration.next(void 0),e.loading.grid=!1,e.cd.detectChanges()})()}add(){this.data.formData={order:(d.max(d.map(this.rows,"order"))||0)+1},this.data.mode=h.D.ADD,this.data.eventChannel.emit({action:p.F.OPEN_FORM_IN_ADD_MODE,data:this.data.formData}),this.databasesMigrationFormC.showModal()}markAll(){var e=this;return(0,o.Z)(function*(){try{e.confirmationService.confirm({message:e.cs.dbMigration.markAllConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,o.Z)(function*(){yield e.markAsExecuted()}),function(){return i.apply(this,arguments)})})}catch(i){e.ns.showErrorFromResponse(i.error,e.cs.dbMigration.playError)}var i})()}markAsExecuted(){var e=this;return(0,o.Z)(function*(){e.loading.grid=!0,e.cd.detectChanges();try{const i=(yield e.userS.getById(e.authCS.gUser._id).toPromise()).data,a={};for(let r=0;r<e.selectedRows.length;r++)a.executedMigrationScripts=i.executedMigrationScripts,a.executedMigrationScripts[e.selectedRows[r].name]=!0;yield e.userS.put(e.authCS.gUser._id,a,{select:b.iH._id}).toPromise(),e.ns.showSuccess("Database migration scripts marked successfully."),yield e.loadGridData()}catch(i){e.ns.showErrorFromResponse(i.error||i,"Unable to mark database migration scripts.")}e.loading.grid=!1,e.cd.detectChanges()})()}playAll(){var e=this;return(0,o.Z)(function*(){try{e.confirmationService.confirm({message:e.cs.dbMigration.playAllConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,o.Z)(function*(){yield e.playAllOriginal()}),function(){return i.apply(this,arguments)})})}catch(i){e.ns.showErrorFromResponse(i.error,e.cs.dbMigration.playError)}var i})()}playAllOriginal(){var e=this;return(0,o.Z)(function*(){e.loading.grid=!0,e.cd.detectChanges();try{(yield e.instanceS.executeDataMigrationScript(d.map(e.selectedRows,"_id")))&&(e.ns.showSuccess("Database migration scripts executed successfully."),yield e.loadGridData())}catch(i){e.ns.showErrorFromResponse(i.error||i,"Unable to execute database migration scripts.")}e.loading.grid=!1,e.cd.detectChanges()})()}playSingle(e){var i=this;return(0,o.Z)(function*(){try{i.confirmationService.confirm({message:i.cs.dbMigration.playConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(a=(0,o.Z)(function*(){yield i.playSingleOriginal(e)}),function(){return a.apply(this,arguments)})})}catch(a){i.ns.showErrorFromResponse(a.error,i.cs.dbMigration.playError)}var a})()}playSingleOriginal(e){var i=this;return(0,o.Z)(function*(){i.loading.grid=!0,i.cd.detectChanges();try{(yield i.instanceS.executeDataMigrationScript(e._id))&&(i.ns.showSuccess("Database migration script executed successfully."),yield i.loadGridData())}catch(a){i.ns.showErrorFromResponse(a.error||a,"Unable to execute database migration script.")}i.loading.grid=!1,i.cd.detectChanges()})()}edit(){this.data.formData=this.rowsMap[d.map(this.selectedRows,"_id")[0]],this.data.mode=h.D.EDIT,this.data.eventChannel.emit({action:p.F.OPEN_FORM_IN_EDIT_MODE}),this.databasesMigrationFormC.showModal()}clone(){var e=this;return(0,o.Z)(function*(){try{if(!e.selectedRows[0]||!e.rowsMap[d.map(e.selectedRows,"_id")[0]])return;const i=e.rowsMap[d.map(e.selectedRows,"_id")[0]]._id,a=(yield e.dbMigrationS.getById(i).toPromise()).data;delete a._id,delete a.guid,a.name=`${a.name}-clone`,a.label=`${a.label} Clone`,a.order=(d.max(d.map(e.rows,"order"))||0)+1,(yield e.dbMigrationS.post(a).toPromise()).success?(e.notificationS.showSuccess(e.constantsS.dbMigration.cloneSuccess),e.loadGridData()):e.notificationS.showSuccess(e.constantsS.dbMigration.cloneSuccess)}catch{e.notificationS.showError(e.constantsS.dbMigration.cloneError)}})()}removePermanent(){var e=this;return(0,o.Z)(function*(){var i;e.confirmationService.confirm({message:e.cs.dbMigration.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,o.Z)(function*(){for(const a of e.selectedRows)yield e.hardDelete(a._id);e.ns.showSuccess(e.cs.dbMigration.removePermanent),yield e.loadGridData()}),function(){return i.apply(this,arguments)})})})()}hardDelete(e){var i=this;return(0,o.Z)(function*(){yield i.dbMigrationS.permanentDelete(e).toPromise()})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.dbMigration.selectedDbMigration.next(void 0)}resetThisUrl(){var e=this;return(0,o.Z)(function*(){e.eventCenterS.dbMigration.selectedDbMigration.next(void 0),yield e.navigationCS.setQueryParam(g.p.am_db_migration,null)})()}itemSelected(){var e=this;return(0,o.Z)(function*(){yield e.resetThisUrl(),setTimeout(e.fillData.bind(e))})()}fillData(){var e=this;return(0,o.Z)(function*(){if(!e.selectedRows.length)return yield e.navigationCS.setQueryParam(g.p.am_db_migration,""),void e.eventCenterS.dbMigration.selectedDbMigration.next(null);const i=e.selectedRows[0];i?(yield e.navigationCS.setQueryParam(g.p.am_db_migration,i._id),e.eventCenterS.dbMigration.selectedDbMigration.next(i)):yield e.resetThisUrl()})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickDBMigration(){this.selectedRows.length&&this.edit()}static \u0275fac=function(i){return new(i||s)(t.Y36(T.j),t.Y36(A.b),t.Y36(C.W),t.Y36(E.S),t.Y36(P.D),t.Y36(_.L),t.Y36(R.u),t.Y36(m.F0),t.Y36(I.K),t.Y36(k.E),t.Y36(C.W),t.Y36(_.L),t.Y36(v.YP),t.Y36(t.sBO))};static \u0275cmp=t.Xpm({type:s,selectors:[["app-databases-migration-list"]],viewQuery:function(i,a){if(1&i&&t.Gf(Y,5),2&i){let r;t.iGM(r=t.CRH())&&(a.databasesMigrationFormC=r.first)}},inputs:{showCheckbox:"showCheckbox"},decls:21,vars:13,consts:[[1,"card","shadow-sm","h-100"],["pTooltip","",1,"card-header"],["src","/assets/images/icons/db-m.svg","alt","Database Migration",1,"fa-fw","mr-1"],["href","https://docs.apimaker.dev/v1/docs/features/database-migration.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Execute Selected Migration",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Mark as executed",3,"click",4,"ngIf"],["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"],["databasesMigrationFormC",""],["tooltipPosition","left","pTooltip","Execute Selected Migration",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-check-double","text-warning"],["tooltipPosition","left","pTooltip","Mark as executed",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-solid","fa-marker","text-warning"],["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"],["tooltipPosition","left","pTooltip","Execute script",1,"btn","btn-xsm-custom",3,"click"],[1,"fas","fa-check","text-success"],["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(i,a){1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span"),t._UZ(3,"img",2),t._uU(4," Database Migration"),t.qZA(),t.TgZ(5,"a",3),t._UZ(6,"img",4),t.qZA(),t.YNc(7,J,2,0,"span",5),t.YNc(8,O,2,0,"span",6),t.TgZ(9,"span",7),t.NdJ("click",function(){return a.add()}),t._UZ(10,"i",8),t.qZA(),t.YNc(11,Q,2,0,"span",9),t.YNc(12,G,2,0,"span",10),t.YNc(13,H,2,0,"span",11),t.qZA(),t.TgZ(14,"div",12)(15,"p-table",13),t.NdJ("selectionChange",function(l){return a.selectedRows=l})("selectionChange",function(){return a.itemSelected()})("dblclick",function(){return a.dblClickDBMigration()}),t.YNc(16,B,11,1,"ng-template",14),t.YNc(17,z,18,13,"ng-template",15),t.qZA(),t.YNc(18,X,1,0,"p-progressSpinner",16),t.qZA()(),t._UZ(19,"app-databases-migration-form",17,18)),2&i&&(t.xp6(7),t.Q6J("ngIf",null==a.selectedRows?null:a.selectedRows.length),t.xp6(1),t.Q6J("ngIf",null==a.selectedRows?null:a.selectedRows.length),t.xp6(3),t.Q6J("ngIf",a.selectedRows.length&&a.selectedRows.length<2),t.xp6(1),t.Q6J("ngIf",a.selectedRows.length&&a.selectedRows.length<2),t.xp6(1),t.Q6J("ngIf",a.selectedRows.length),t.xp6(2),t.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",a.selectedRows)("dataKey",a.gridKey)("scrollable",!0)("value",a.rows),t.xp6(3),t.Q6J("ngIf",a.loading.grid),t.xp6(1),t.Q6J("data",a.data))},dependencies:[m.rH,U.O5,f.iA,v.jx,f.Ei,f.UA,f.Mo,F.G,L.u,N.i],encapsulation:2,changeDetection:0})}return s})(),S=(()=>{class s{constructor(){}ngOnInit(){}static \u0275fac=function(i){return new(i||s)};static \u0275cmp=t.Xpm({type:s,selectors:[["app-databases-migration-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1","overflow-auto"]],template:function(i,a){1&i&&(t.TgZ(0,"div",0),t._UZ(1,"app-databases-migration-list"),t.qZA())},dependencies:[y],encapsulation:2})}return s})();var V=n(97975);const tt=[{path:"main",component:S,canActivate:[D.P]}];let et=(()=>{class s{static \u0275fac=function(i){return new(i||s)};static \u0275mod=t.oAB({type:s});static \u0275inj=t.cJS({imports:[m.Bz.forChild(tt),x.u,V.d]})}return s})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[8296],{48296:(Mt,P,d)=>{d.r(P),d.d(P,{LogTableM:()=>Dt});var J=d(77664),Q=d(17017),B=d(63726),H=d(81025),u=d(15861),e=d(94946),r=d(6990),T=d(96925),N=d(33157),E=d(90328),p=d(51162),c=d(45085),D=d(70819),Y=d(95852),F=d(77240),G=d(53429),K=d(67629),L=d(32915),V=d(31042),j=d(67145),W=d(10262),X=d(81429),Z=d(85219),b=d(27414),M=d(90204),R=d(60095),_=d(96814),x=d(95431),q=d(97680),w=d(33259),z=d(51532),ee=d(42169),U=d(99961),te=d(32660),ie=d(55043),se=d(63885),ae=d(559),ne=d(86937),le=d(40356),oe=d(79329),re=d(37595),de=d(53824),pe=d(58651),ce=d(86607),ue=d(5305),ge=d(72726);function me(a,o){1&a&&(e.TgZ(0,"div",38),e._UZ(1,"app-w-instances",39),e.qZA()),2&a&&(e.xp6(1),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsFilterLogTable",!0))}function _e(a,o){1&a&&(e.TgZ(0,"div",40),e._UZ(1,"app-w-databases",39),e.qZA()),2&a&&(e.xp6(1),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsFilterLogTable",!0))}function he(a,o){1&a&&e._UZ(0,"p-progressSpinner",41)}const ve=function(){return[50,50]};let fe=(()=>{class a{eventCenterS;notificationS;constantsS;data;EAPICategory=c.R;loading={form:!1};constructor(t,i,s){this.eventCenterS=t,this.notificationS=i,this.constantsS=s}ngOnInit(){}showModal(){$("#idFilterPanelInLogsTableForm").modal("show")}hideModal(){$("#idFilterPanelInLogsTableForm").modal("hide")}applyFilter(){const t={};t.supportedAPIs=this.eventCenterS.filterInLog.supportedAPIs.value,t.customApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.functions.value),t.systemApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.systemApis.value),t.eventsApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.eventsApis.value),t.schedulersApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.schedulersApis.value),t.webSocketEvents=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.webSocketApis.value),t.thirdPartyApis=this.eventCenterS.filterInLog.thirdPartyAPIs.value,t.queryParams={},t.apisRegex=this.eventCenterS.filterInLog.apisRegex,this.setDataInObjectFromEventCenter(t),this.data.eventChannel.emit({action:N.F.APPLY_FILTER,data:t}),this.notificationS.showSuccess("Success.")}setDataInObjectFromEventCenter(t){t.queryParams.instanceIds=this.eventCenterS.filterInLog.instanceIds.value,t.queryParams.databaseIds=this.eventCenterS.filterInLog.databaseIds.value,t.queryParams.databaseNames=this.eventCenterS.filterInLog.databaseNames.value,t.queryParams.collectionIds=this.eventCenterS.filterInLog.collectionIds.value,t.queryParams.collectionNames=this.eventCenterS.filterInLog.collectionNames.value,t.queryParams.supportedApiIds=this.eventCenterS.filterInLog.supportedApiIds.value,t.queryParams.supportedApiNames=this.eventCenterS.filterInLog.supportedApiNames.value,t.queryParams.functions=this.eventCenterS.filterInLog.functionIds.value,t.queryParams.systemApis=this.eventCenterS.filterInLog.systemApiIds.value,t.queryParams.eventIds=this.eventCenterS.filterInLog.eventIds.value,t.queryParams.schedulersIds=this.eventCenterS.filterInLog.schedulersIds.value,t.queryParams.webSocketIds=this.eventCenterS.filterInLog.webSocketIds.value,this.setThirdPartyApiIds(t)}setThirdPartyApiIds(t){const i=this.eventCenterS.filterInLog.thirdPartyApiIds.value,s=[];for(const n of i)n.length>=24&&s.push(n);t.queryParams.thirdPartyApis=s}getPermissionMapFunctions(t){const i={};for(const s of t||[])i[s._id]=!0;return i}ngOnDestroy(){this.eventCenterS.filterInLog.apisRegex={}}static \u0275fac=function(i){return new(i||a)(e.Y36(L.u),e.Y36(U.W),e.Y36(b.L))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-log-filter-panel-layout-model"]],inputs:{data:"data"},decls:52,vars:54,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idFilterPanelInLogsTableForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content",2,"max-height","calc(100vh - 58px)"],[1,"modal-header"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body","overflow-auto"],[2,"width","max-content"],[1,"v-div","w-categories"],[1,"vertical-height-max"],[3,"isFilterLogTable","typeIsGroup"],[1,"v-div","w-ins-db"],["layout","vertical",3,"panelSizes"],["pTemplate",""],[1,"v-div","w-collection"],[3,"metaKeySelection","IsReadOnly","IsFilterLogTable"],[1,"v-div","w-ins-apis"],[1,"vertical-height-max",2,"width","500px"],[3,"isLPM","isFilterLogTable","treeViewId"],[1,"v-div","w-third-party"],[1,"vertical-height-tp-api"],[3,"isFilterLogTable","isLPM","IsDependentOnGroup"],[1,"v-div","w-custom-apis"],[3,"metaKeySelection","IsReadOnly","isFilterLogTable","isLPM"],[1,"v-div","w-system-apis"],[1,"v-div","w-events"],[1,"v-div","w-schedulers"],[3,"metaKeySelection","IsReadOnly","IsMultiSelect","isFilterLogTable","isLPM"],[1,"v-div","w-web-sockets"],[3,"metaKeySelection","showCheckbox","IsReadOnly","isFilterLogTable","isLPM"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"click"],[1,"fas","fa-filter","text-yellow","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"vertical-height-instances","w-100"],[1,"w-100",3,"metaKeySelection","IsReadOnly","IsFilterLogTable"],[1,"vertical-height-db","w-100"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,s){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span"),e._UZ(5,"i",4),e._uU(6,"Filter "),e.qZA(),e.TgZ(7,"button",5)(8,"span",6),e._UZ(9,"i",7),e.qZA()()(),e.TgZ(10,"div",8)(11,"div",9)(12,"div",10)(13,"div",11),e._UZ(14,"app-w-api-categories",12),e.qZA()(),e.TgZ(15,"div",13)(16,"p-splitter",14),e.YNc(17,me,2,3,"ng-template",15),e.YNc(18,_e,2,3,"ng-template",15),e.qZA()(),e.TgZ(19,"div",16)(20,"div",11),e._UZ(21,"app-w-collections",17),e.qZA()(),e.TgZ(22,"div",18)(23,"div",19),e._UZ(24,"app-w-supported-api",20),e.qZA()(),e.TgZ(25,"div",21)(26,"div",22),e._UZ(27,"app-w-supported-tp-api",23),e.qZA()(),e.TgZ(28,"div",24)(29,"div",11),e._UZ(30,"app-custom-api-grid",25),e.qZA()(),e.TgZ(31,"div",26)(32,"div",11),e._UZ(33,"app-system-api-w",25),e.qZA()(),e.TgZ(34,"div",27)(35,"div",11),e._UZ(36,"app-events-grid",25),e.qZA()(),e.TgZ(37,"div",28)(38,"div",11),e._UZ(39,"app-scheduler-man-w",29),e.qZA()(),e.TgZ(40,"div",30)(41,"div",11),e._UZ(42,"app-web-socket-events-grid",31),e.qZA()()()(),e.TgZ(43,"div",32)(44,"button",33),e._UZ(45,"i",34),e._uU(46," Cancel"),e.qZA(),e.TgZ(47,"button",35),e.NdJ("click",function(){return s.applyFilter()}),e._UZ(48,"i",36),e.TgZ(49,"span"),e._uU(50,"Apply Filter"),e.qZA()()(),e.YNc(51,he,1,0,"p-progressSpinner",37),e.qZA()()()),2&i&&(e.xp6(14),e.Q6J("isFilterLogTable",!0)("typeIsGroup","LOG_PROFILE"),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.INSTANCES?"block":"none"),e.xp6(1),e.Q6J("panelSizes",e.DdM(53,ve)),e.xp6(3),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.INSTANCES?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsFilterLogTable",!0),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.INSTANCES?"block":"none"),e.xp6(2),e.Q6J("isLPM",!1)("isFilterLogTable",!0)("treeViewId","treeViewFromLogFilterPanel"),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.THIRD_PARTY_APIS?"block":"none"),e.xp6(2),e.Q6J("isFilterLogTable",!0)("isLPM",!1)("IsDependentOnGroup",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.CUSTOM_APIS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.SYSTEM_APIS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.EVENTS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.SCHEDULERS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsMultiSelect",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.WEB_SOCKET_EVENT?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("showCheckbox",!0)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(9),e.Q6J("ngIf",s.loading.form))},dependencies:[_.O5,te.y,Z.jx,q.G,ie.q,se.f,ae.O,ne.n,le.T,oe.X,re.G,de.d,pe.A,ce.V,ue.N,ge.x],styles:[".vertical-height-instances[_ngcontent-%COMP%]{height:248px}.vertical-height-db[_ngcontent-%COMP%]{height:calc(100vh - 410px)}.vertical-height-max[_ngcontent-%COMP%], .vertical-height-tp-api[_ngcontent-%COMP%]{height:calc(100vh - 154px)}.v-div[_ngcontent-%COMP%]{display:inline-block;height:calc(100vh - 158px);float:left}.w-categories[_ngcontent-%COMP%]{width:17rem}.w-ins-db[_ngcontent-%COMP%]{width:25rem}.w-collection[_ngcontent-%COMP%]{width:28rem}.w-ins-apis[_ngcontent-%COMP%]{width:35rem}.w-custom-apis[_ngcontent-%COMP%], .w-system-apis[_ngcontent-%COMP%], .w-third-party[_ngcontent-%COMP%], .w-web-sockets[_ngcontent-%COMP%], .w-events[_ngcontent-%COMP%], .w-schedulers[_ngcontent-%COMP%]{width:calc(100vw - 24.5rem)}"]})}return a})();var f=d(27672),ye=d(62304),Ce=d(756),Ae=d(84066);function Te(a,o){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2,"Tenant Username"),e.qZA(),e.TgZ(3,"td"),e._uU(4," :"),e.qZA(),e.TgZ(5,"td",19),e._uU(6),e.qZA()()),2&a){const t=e.oxw();e.xp6(6),e.Oqu(null==t.inputData?null:t.inputData.tenantUsername)}}function Ze(a,o){1&a&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Keys"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Value"),e.qZA()())}function xe(a,o){if(1&a&&(e.TgZ(0,"tr",44)(1,"td",45)(2,"span"),e._uU(3),e.qZA()(),e.TgZ(4,"td")(5,"span"),e._uU(6),e.qZA()()()),2&a){const t=o.$implicit;e.Q6J("pSelectableRow",t),e.xp6(3),e.Oqu(t.toString().split(",")[0]),e.xp6(3),e.Oqu(t.toString().split(",")[1]||"")}}function Ie(a,o){1&a&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Keys"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Value"),e.qZA()())}function Se(a,o){if(1&a&&(e.TgZ(0,"tr",44)(1,"td",45)(2,"span"),e._uU(3),e.qZA()(),e.TgZ(4,"td")(5,"span"),e._uU(6),e.qZA()()()),2&a){const t=o.$implicit;e.Q6J("pSelectableRow",t),e.xp6(3),e.Oqu(t.toString().split(",")[0]),e.xp6(3),e.Oqu(t.toString().split(",")[1]||"")}}const Le=function(a,o,t,i){return{get:a,put:o,post:t,delete:i}},O=function(){return{color:"#26b47f"}},k=function(){return{color:"#ed4b48"}};let be=(()=>{class a{ec;notificationS;generalCS;constantsCS;logS;cd;monacoS;constantsS;EAPICategory=c.R;loading={form:!1};selectedRowData;reqHeaders=[];resHeaders=[];inputData;editorReqQueryParams;editorOptionReqQueryParams={readOnly:!1,language:"json",contextmenu:!1};editorReqBody;editorOptionReqBody={readOnly:!1,language:"json",contextmenu:!1};editorResBody;editorOptionResBody={readOnly:!1,language:"json",contextmenu:!1};editorLogs;editorOptionLogs={readOnly:!1,language:"text",contextmenu:!1};reqHeaderCollapse;reqQueryParamsCollapse;reqBodyCollapse;resHeaderCollapse;resQueryParamsCollapse;resBodyCollapse;logsBodyCollapse;ERequestMethod=T.Yp;constructor(t,i,s,n,l,g,h,v){this.ec=t,this.notificationS=i,this.generalCS=s,this.constantsCS=n,this.logS=l,this.cd=g,this.monacoS=h,this.constantsS=v}ngOnInit(){}hideModal(){$("#idLogDetailsLayoutModal").modal("hide")}showModal(t){var i=this;return(0,u.Z)(function*(){try{if(i.inputData=t[0],!i.inputData)return;yield i.getLogByID(i.inputData._id),i.collapseAll(),$("#idLogDetailsLayoutModal").modal("show")}catch(s){console.log(s)}})()}getLogByID(t){var i=this;return(0,u.Z)(function*(){const s=(yield i.logS.getById(t).toPromise()).data;if(i.inputData=Object.assign({},i.inputData,s),s){s.pathVariables=JSON.parse(s.pathVariables||"{}"),s.meta&&(s.executionTime=s.meta?.executionTime),s.createdAt=moment(s.createdAt).format("DD-MM-YYYY hh:mm:ss A"),s.updatedAt=moment(s.updatedAt).format("DD-MM-YYYY hh:mm:ss A");for(const l of i.getKeys(s.pathVariables))s[l]=s.pathVariables[l];for(const l of s.apiErrors||[])for(const g of i.getKeys(l))s[g]=l[g];delete s.pathVariables,delete s.apiErrors,delete s.meta,delete s._id,delete s.user,delete s.instance,delete s.apiUser}if(i.selectedRowData=s,i.reqHeaders=i.selectedRowData?.reqHeaders?Object.entries(i.selectedRowData.reqHeaders):[],i.generalCS.setValueInEditor(i,"editorReqQueryParams",i.selectedRowData.queryParams||""),i.generalCS.setValueInEditor(i,"editorReqBody",i.selectedRowData.reqPayload||""),i.selectedRowData.resHeaders){i.resHeaders=Object.entries(i.selectedRowData.resHeaders);const l=i.selectedRowData.resHeaders[T.Eg.CONTENT_TYPE];yield i.setResponseBodyLanguage(l)}else i.resHeaders=[];let n=i.selectedRowData.resPayload;(!i.selectedRowData.resHeaders||i.selectedRowData.resHeaders&&i.selectedRowData.resHeaders[T.Eg.CONTENT_TYPE].indexOf(f.g7.JSON)>=0)&&(n=JSON.stringify(i.selectedRowData.resPayload)),i.generalCS.setValueInEditor(i,"editorResBody",n||""),i.generalCS.setValueInEditor(i,"editorLogs",i.selectedRowData.logs||""),i.cd.detectChanges()})()}setResponseBodyLanguage(t){var i=this;return(0,u.Z)(function*(){t.indexOf(f.g7.JSON)>=0?(i.editorOptionResBody.language="json",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.HTML)>=0?(i.editorOptionResBody.language="html",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.XML)>=0?(i.editorOptionResBody.language="xml",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.YAML)>=0?(i.editorOptionResBody.language="yaml",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.TEXT)>=0&&(i.editorOptionResBody.language="plaintext",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language))})()}getKeys(t){return t?Object.keys(t):[]}requestHeaderClick(){this.reqHeaderCollapse=!this.reqHeaderCollapse}requestQueryParamsClick(){void 0!==this.editorReqQueryParams&&this.monacoS.formatDocument(this.editorReqQueryParams),this.reqQueryParamsCollapse=!this.reqQueryParamsCollapse}requestBodyClick(){void 0!==this.editorReqBody&&this.monacoS.formatDocument(this.editorReqBody),this.reqBodyCollapse=!this.reqBodyCollapse}responseHeaderClick(){this.resHeaderCollapse=!this.resHeaderCollapse}responseBodyClick(){void 0!==this.editorResBody&&this.monacoS.formatDocument(this.editorResBody),this.resBodyCollapse=!this.resBodyCollapse}logsBodyClick(){void 0!==this.editorLogs&&this.monacoS.formatDocument(this.editorLogs),this.logsBodyCollapse=!this.logsBodyCollapse}expandAll(){this.reqHeaderCollapse=!0,this.reqQueryParamsCollapse=!0,this.reqBodyCollapse=!0,this.resHeaderCollapse=!0,this.resQueryParamsCollapse=!0,this.resBodyCollapse=!0,this.logsBodyCollapse=!0,void 0!==this.editorReqQueryParams&&this.monacoS.formatDocument(this.editorReqQueryParams),void 0!==this.editorReqBody&&this.monacoS.formatDocument(this.editorReqBody),void 0!==this.editorResBody&&this.monacoS.formatDocument(this.editorResBody),void 0!==this.editorLogs&&this.monacoS.formatDocument(this.editorLogs),this.cd.detectChanges()}collapseAll(){this.reqHeaderCollapse=!1,this.reqQueryParamsCollapse=!1,this.reqBodyCollapse=!1,this.resHeaderCollapse=!1,this.resQueryParamsCollapse=!1,this.resBodyCollapse=!1,this.logsBodyCollapse=!1,this.cd.detectChanges()}ngOnDestroy(){this.ec.filterInLog.apisRegex={}}static \u0275fac=function(i){return new(i||a)(e.Y36(L.u),e.Y36(U.W),e.Y36(F.b),e.Y36(M.s),e.Y36(D.e),e.Y36(e.sBO),e.Y36(ye.b),e.Y36(b.L))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-log-details-layout-model"]],decls:143,vars:54,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idLogDetailsLayoutModal","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content"],[1,"modal-header"],[2,"margin-top","1px"],[1,"fas","fa-info-circle","text-success","fa-fw","mr-1"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],["pTooltip","Expand",1,"cursor-pointer"],[1,"btn-outline-light","btn-sm","mr-1","mt-1px","ng-star-inserted","text-danger","fas","fa-expand-alt",3,"click"],["pTooltip","Collapse",1,"cursor-pointer"],[1,"btn-outline-light","btn-sm","mr-1","mt-1px","ng-star-inserted","fas","fa-compress-alt",3,"click"],[1,"modal-body","p-4",2,"overflow-y","scroll"],[1,""],[1,"table","table-hover","table-striped","table-bordered","table-sm"],[2,"width","150px"],[2,"width","10px"],[1,"pl-2"],[3,"ngClass"],[4,"ngIf"],[3,"ngStyle"],["id","reqHeader",1,"cursor-pointer","logs-collapse-div",3,"click"],[2,"margin-left","10px"],[1,"float-right","mr-2",3,"hidden"],[1,"fas","fa-caret-down"],[1,"fas","fa-caret-up"],[1,"mt-1",2,"background","#373b3d","border-radius","10px",3,"hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 100px)",3,"selectionMode","metaKeySelection","scrollable","value"],["pTemplate","header"],["pTemplate","body"],["id","reqQueryParams",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],[1,"overflow-auto",2,"height","300px !important"],[3,"editorOptions","editorGenerated"],["id","reqBody",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],["id","resHeader",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],["id","resBody",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],["id","logsBody",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],[1,"ml-2"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",3,"hidden"],[3,"pSelectableRow"],[2,"white-space","nowrap"]],template:function(i,s){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span",4),e._UZ(5,"i",5),e._uU(6,"Detail view "),e.qZA(),e.TgZ(7,"div",6)(8,"button",7)(9,"span",8),e._UZ(10,"i",9),e.qZA()(),e.TgZ(11,"span",10)(12,"i",11),e.NdJ("click",function(){return s.expandAll()}),e.qZA()(),e.TgZ(13,"span",12)(14,"i",13),e.NdJ("click",function(){return s.collapseAll()}),e.qZA()()()(),e.TgZ(15,"div",14)(16,"div",15)(17,"table",16)(18,"colgroup"),e._UZ(19,"col",17)(20,"col",18)(21,"col"),e.qZA(),e.TgZ(22,"tr")(23,"td"),e._uU(24,"URL"),e.qZA(),e.TgZ(25,"td"),e._uU(26," :"),e.qZA(),e.TgZ(27,"td",19),e._uU(28),e.qZA()(),e.TgZ(29,"tr")(30,"td"),e._uU(31,"Method"),e.qZA(),e.TgZ(32,"td"),e._uU(33," :"),e.qZA(),e.TgZ(34,"td",19)(35,"span",20),e._uU(36),e.qZA()()(),e.TgZ(37,"tr")(38,"td"),e._uU(39,"Type"),e.qZA(),e.TgZ(40,"td"),e._uU(41," :"),e.qZA(),e.TgZ(42,"td",19),e._uU(43),e.qZA()(),e.YNc(44,Te,7,1,"tr",21),e.TgZ(45,"tr")(46,"td"),e._uU(47,"Name"),e.qZA(),e.TgZ(48,"td"),e._uU(49," :"),e.qZA(),e.TgZ(50,"td",19),e._uU(51),e.qZA()(),e.TgZ(52,"tr")(53,"td"),e._uU(54,"Time"),e.qZA(),e.TgZ(55,"td"),e._uU(56," :"),e.qZA(),e.TgZ(57,"td",19),e._uU(58),e.ALo(59,"moment"),e.qZA()(),e.TgZ(60,"tr")(61,"td"),e._uU(62,"Status"),e.qZA(),e.TgZ(63,"td"),e._uU(64," :"),e.qZA(),e.TgZ(65,"td",19)(66,"span",22),e._uU(67),e.qZA()()(),e.TgZ(68,"tr")(69,"td"),e._uU(70,"Status Code"),e.qZA(),e.TgZ(71,"td"),e._uU(72," :"),e.qZA(),e.TgZ(73,"td",19)(74,"span",22),e._uU(75),e.qZA()()()()(),e.TgZ(76,"div",23),e.NdJ("click",function(){return s.requestHeaderClick()}),e.TgZ(77,"span",24),e._uU(78,"Request Header "),e.qZA(),e.TgZ(79,"div",25),e._UZ(80,"i",26),e.qZA(),e.TgZ(81,"div",25),e._UZ(82,"i",27),e.qZA()(),e.TgZ(83,"div",28)(84,"p-table",29),e.YNc(85,Ze,5,0,"ng-template",30),e.YNc(86,xe,7,3,"ng-template",31),e.qZA()(),e.TgZ(87,"div",32),e.NdJ("click",function(){return s.requestQueryParamsClick()}),e.TgZ(88,"span",24),e._uU(89,"Request Query params "),e.qZA(),e.TgZ(90,"div",25),e._UZ(91,"i",26),e.qZA(),e.TgZ(92,"div",25),e._UZ(93,"i",27),e.qZA()(),e.TgZ(94,"div",28)(95,"div",33)(96,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorReqQueryParams=l}),e.qZA()()(),e.TgZ(97,"div",35),e.NdJ("click",function(){return s.requestBodyClick()}),e.TgZ(98,"span",24),e._uU(99,"Request Body "),e.qZA(),e.TgZ(100,"div",25),e._UZ(101,"i",26),e.qZA(),e.TgZ(102,"div",25),e._UZ(103,"i",27),e.qZA()(),e.TgZ(104,"div",28)(105,"div",33)(106,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorReqBody=l}),e.qZA()()(),e.TgZ(107,"div",36),e.NdJ("click",function(){return s.responseHeaderClick()}),e.TgZ(108,"span",24),e._uU(109,"Response Header "),e.qZA(),e.TgZ(110,"div",25),e._UZ(111,"i",26),e.qZA(),e.TgZ(112,"div",25),e._UZ(113,"i",27),e.qZA()(),e.TgZ(114,"div",28)(115,"p-table",29),e.YNc(116,Ie,5,0,"ng-template",30),e.YNc(117,Se,7,3,"ng-template",31),e.qZA()(),e.TgZ(118,"div",37),e.NdJ("click",function(){return s.responseBodyClick()}),e.TgZ(119,"span",24),e._uU(120,"Response Body "),e.qZA(),e.TgZ(121,"div",25),e._UZ(122,"i",26),e.qZA(),e.TgZ(123,"div",25),e._UZ(124,"i",27),e.qZA()(),e.TgZ(125,"div",28)(126,"div",33)(127,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorResBody=l}),e.qZA()()(),e.TgZ(128,"div",38),e.NdJ("click",function(){return s.logsBodyClick()}),e.TgZ(129,"span",39),e._uU(130,"Logs "),e.qZA(),e.TgZ(131,"div",25),e._UZ(132,"i",26),e.qZA(),e.TgZ(133,"div",25),e._UZ(134,"i",27),e.qZA()(),e.TgZ(135,"div",28)(136,"div",33)(137,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorLogs=l}),e.qZA()()()(),e.TgZ(138,"div",40)(139,"button",41),e._UZ(140,"i",42),e._uU(141," Cancel"),e.qZA()(),e._UZ(142,"p-progressSpinner",43),e.qZA()()()),2&i&&(e.xp6(28),e.Oqu(null==s.inputData?null:s.inputData.url),e.xp6(7),e.Q6J("ngClass",e.l5B(45,Le,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.GET,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.PUT,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.POST,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.DELETE)),e.xp6(1),e.hij(" ",null==s.inputData||null==s.inputData.requestMethod?null:s.inputData.requestMethod.toUpperCase()," "),e.xp6(7),e.Oqu(null==s.inputData?null:s.inputData.category),e.xp6(1),e.Q6J("ngIf",null==s.inputData?null:s.inputData.tenantUsername),e.xp6(7),e.Oqu(null==s.inputData?null:s.inputData.logNameForUI),e.xp6(7),e.Oqu(e.xi3(59,42,null==s.inputData?null:s.inputData.createdAt,s.constantsCS.DATETIME_FORMAT_USER_WITH_SECONDS)),e.xp6(8),e.Q6J("ngStyle",null!=s.inputData&&s.inputData.success?e.DdM(50,O):e.DdM(51,k)),e.xp6(1),e.Oqu(null!=s.inputData&&s.inputData.success?"Success":"Fail"),e.xp6(7),e.Q6J("ngStyle",null!=s.inputData&&s.inputData.success?e.DdM(52,O):e.DdM(53,k)),e.xp6(1),e.Oqu(null==s.inputData?null:s.inputData.statusCode),e.xp6(4),e.Q6J("hidden",s.reqHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.reqHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.reqHeaderCollapse),e.xp6(1),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("scrollable",!0)("value",s.reqHeaders),e.xp6(6),e.Q6J("hidden",s.reqQueryParamsCollapse),e.xp6(2),e.Q6J("hidden",!s.reqQueryParamsCollapse),e.xp6(2),e.Q6J("hidden",!s.reqQueryParamsCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionReqQueryParams),e.xp6(4),e.Q6J("hidden",s.reqBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.reqBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.reqBodyCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionReqBody),e.xp6(4),e.Q6J("hidden",s.resHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.resHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.resHeaderCollapse),e.xp6(1),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("scrollable",!0)("value",s.resHeaders),e.xp6(6),e.Q6J("hidden",s.resBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.resBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.resBodyCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionResBody),e.xp6(4),e.Q6J("hidden",s.logsBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.logsBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.logsBodyCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionLogs),e.xp6(5),e.Q6J("hidden",!s.loading.form))},dependencies:[_.mk,_.O5,_.PC,Ce.O,x.iA,Z.jx,x.Ei,q.G,w.u,Ae.d],encapsulation:2})}return a})();const qe=["logFilterPanelLayoutModelC"],Pe=["logDetailsLayoutModelC"];function Ne(a,o){if(1&a&&(e.TgZ(0,"div",7)(1,"span",8)(2,"h4",9),e._uU(3),e.qZA()()()),2&a){const t=e.oxw(2);e.xp6(3),e.Oqu(t.constantsS.logTable.setupExternalLogs)}}function Ee(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL INSTANCES"),e.qZA())}function De(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",50)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.instanceClickData([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function Fe(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,De,4,1,"p-chip",49),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.instances)}}function Me(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL DATABASES"),e.qZA())}function Re(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",53)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.removeDbClick([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.db," ")}}function we(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Re,4,1,"p-chip",52),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.databases)}}function Ue(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL COLLECTIONS"),e.qZA())}function Oe(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",55)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.removeCollectionClick([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function ke(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Oe,4,1,"p-chip",54),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.collections)}}function Je(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL APIS"),e.qZA())}function Qe(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.removeApiClick([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function Be(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Qe,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.supportedAPIs)}}function He(a,o){1&a&&(e.TgZ(0,"td",29)(1,"div",48),e._uU(2,"ALL THIRD PARTY APIS"),e.qZA()())}function Ye(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",53)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.npmPackageClickData(n,"L_1"))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function $e(a,o){if(1&a&&(e.TgZ(0,"td",23),e.YNc(1,Ye,4,1,"p-chip",52),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpBundles)}}function Ge(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",55)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.npmPackageClickData(n,"L_2"))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.nameId," ")}}function Ke(a,o){if(1&a&&(e.TgZ(0,"td",23),e.YNc(1,Ge,4,1,"p-chip",54),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpApiVersions)}}function Ve(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.npmPackageClickData(n,"L_3"))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.nameId," ")}}function je(a,o){if(1&a&&(e.TgZ(0,"td",58),e.YNc(1,Ve,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpApis)}}function We(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL CUSTOM APIS"),e.qZA())}function Xe(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.customApisClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function ze(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Xe,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.customApis)}}function et(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL SYSTEM APIS"),e.qZA())}function tt(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.systemsApisClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function it(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,tt,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.systemsApis)}}function st(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL EVENTS"),e.qZA())}function at(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.amEventsClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function nt(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,at,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.amEvents)}}function lt(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL SCHEDULERS"),e.qZA())}function ot(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.schedulersClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function rt(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,ot,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.schedulersApis)}}function dt(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL WEBSOCKET EVENTS"),e.qZA())}function pt(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.wsEventClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.nameUI," ")}}function ct(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,pt,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.wsEvents)}}function ut(a,o){1&a&&(e.TgZ(0,"tr")(1,"th",59),e._uU(2,"Index"),e.qZA(),e.TgZ(3,"th",60),e._uU(4,"Date & Time"),e.qZA(),e.TgZ(5,"th",61),e._uU(6,"Method"),e.qZA(),e.TgZ(7,"th",62),e._uU(8,"Status"),e.qZA(),e.TgZ(9,"th",60),e._uU(10,"API Type"),e.qZA(),e.TgZ(11,"th"),e._uU(12,"API Name"),e.qZA()())}const y=function(a){return{"selected-row":a}},gt=function(a,o,t,i){return{get:a,put:o,post:t,delete:i}},mt=function(){return{color:"#26b47f"}},_t=function(){return{color:"#ed4b48"}};function ht(a,o){if(1&a&&(e.TgZ(0,"tr",63)(1,"td")(2,"div",64),e._uU(3),e.qZA()(),e.TgZ(4,"td")(5,"div",65),e._uU(6),e.qZA()(),e.TgZ(7,"td")(8,"div",65)(9,"span",66),e._uU(10),e.qZA()()(),e.TgZ(11,"td")(12,"div",67),e._uU(13),e.qZA()(),e.TgZ(14,"td")(15,"div",65),e._uU(16),e.qZA()(),e.TgZ(17,"td")(18,"div",65),e._uU(19),e.qZA()()()),2&a){const t=o.$implicit,i=o.rowIndex,s=e.oxw(3);e.Q6J("pSelectableRow",t),e.xp6(2),e.Q6J("ngClass",e.VKq(15,y,t.isNewInGrid)),e.xp6(1),e.Oqu(i+1),e.xp6(2),e.Q6J("ngClass",e.VKq(17,y,t.isNewInGrid)),e.xp6(1),e.Oqu(t.createdAt),e.xp6(2),e.Q6J("ngClass",e.VKq(19,y,t.isNewInGrid)),e.xp6(1),e.Q6J("ngClass",e.l5B(21,gt,(null==t?null:t.requestMethod)===s.ERequestMethod.GET,(null==t?null:t.requestMethod)===s.ERequestMethod.PUT,(null==t?null:t.requestMethod)===s.ERequestMethod.POST,(null==t?null:t.requestMethod)===s.ERequestMethod.DELETE)),e.xp6(1),e.hij("",null==t?null:t.requestMethod," "),e.xp6(2),e.Q6J("ngStyle",t.success?e.DdM(26,mt):e.DdM(27,_t))("ngClass",e.VKq(28,y,t.isNewInGrid)),e.xp6(1),e.hij("",t.success?"Success":"Fail"," "),e.xp6(2),e.Q6J("ngClass",e.VKq(30,y,t.isNewInGrid)),e.xp6(1),e.Oqu(t.category),e.xp6(2),e.Q6J("ngClass",e.VKq(32,y,t.isNewInGrid)),e.xp6(1),e.Oqu(t.logNameForUI)}}const vt=function(){return[50,200,500]};function ft(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"div",4)(1,"div",10)(2,"div",11)(3,"span"),e._UZ(4,"i",12),e._uU(5," Log Table Summary"),e.qZA(),e.TgZ(6,"div",13)(7,"a",14),e._UZ(8,"img",15),e.qZA()(),e.TgZ(9,"span",16),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.loadGridData(!1))}),e._UZ(10,"i",17),e._uU(11," Apply "),e.qZA(),e.TgZ(12,"span",18),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.showFilterPanelModel())}),e._UZ(13,"i",19),e.qZA()(),e.TgZ(14,"div",20)(15,"table",21)(16,"tbody")(17,"tr")(18,"td",22),e._uU(19," Instances"),e.qZA(),e.TgZ(20,"td",23),e.YNc(21,Ee,2,0,"div",24),e.YNc(22,Fe,2,1,"div",25),e.qZA(),e.TgZ(23,"td",23),e.YNc(24,Me,2,0,"div",24),e.YNc(25,we,2,1,"div",25),e.qZA(),e.TgZ(26,"td",23),e.YNc(27,Ue,2,0,"div",24),e.YNc(28,ke,2,1,"div",25),e.qZA(),e.TgZ(29,"td"),e.YNc(30,Je,2,0,"div",24),e.YNc(31,Be,2,1,"div",25),e.qZA()(),e.TgZ(32,"tr")(33,"td",22),e._uU(34," Third Party APIs"),e.qZA(),e.YNc(35,He,3,0,"td",26),e.YNc(36,$e,2,1,"td",27),e.YNc(37,Ke,2,1,"td",27),e.YNc(38,je,2,1,"td",28),e.qZA(),e.TgZ(39,"tr")(40,"td",22),e._uU(41," Custom APIs"),e.qZA(),e.TgZ(42,"td",29),e.YNc(43,We,2,0,"div",24),e.YNc(44,ze,2,1,"div",25),e.qZA()(),e.TgZ(45,"tr")(46,"td",22),e._uU(47," System APIs"),e.qZA(),e.TgZ(48,"td",29),e.YNc(49,et,2,0,"div",24),e.YNc(50,it,2,1,"div",25),e.qZA()(),e.TgZ(51,"tr")(52,"td",22),e._uU(53," Events"),e.qZA(),e.TgZ(54,"td",29),e.YNc(55,st,2,0,"div",24),e.YNc(56,nt,2,1,"div",25),e.qZA()(),e.TgZ(57,"tr")(58,"td",22),e._uU(59," Schedulers"),e.qZA(),e.TgZ(60,"td",29),e.YNc(61,lt,2,0,"div",24),e.YNc(62,rt,2,1,"div",25),e.qZA()(),e.TgZ(63,"tr")(64,"td",22),e._uU(65," WebSocket Events"),e.qZA(),e.TgZ(66,"td",29),e.YNc(67,dt,2,0,"div",24),e.YNc(68,ct,2,1,"div",25),e.qZA()(),e.TgZ(69,"tr")(70,"td",30)(71,"span",31),e._uU(72,"Date"),e.qZA()(),e.TgZ(73,"td",32)(74,"p-calendar",33),e.NdJ("ngModelChange",function(s){e.CHM(t);const n=e.oxw(2);return e.KtG(n.gridFilter.rangeDates=s)}),e.qZA(),e.TgZ(75,"span",34),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.clearDate())}),e._UZ(76,"i",35),e.qZA()()()()()()(),e.TgZ(77,"div",36)(78,"div",11)(79,"span"),e._UZ(80,"img",37),e._uU(81," Log Table"),e.qZA(),e.TgZ(82,"span",38),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.showFilterPanelModel())}),e._UZ(83,"i",19),e.qZA(),e.TgZ(84,"span",39),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.clearAllLogsDialog())}),e._UZ(85,"i",40),e.qZA(),e.TgZ(86,"span",41),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.refresh())}),e._UZ(87,"i",42),e.qZA()()(),e.TgZ(88,"div",43)(89,"div",44)(90,"p-table",45),e.NdJ("selectionChange",function(s){e.CHM(t);const n=e.oxw(2);return e.KtG(n.selectedRows=s)})("dblclick",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.dblClickLogs())}),e.YNc(91,ut,13,0,"ng-template",46),e.YNc(92,ht,20,34,"ng-template",47),e.qZA()()()()}if(2&a){const t=e.oxw(2);e.xp6(21),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances)),e.xp6(2),e.Q6J("ngIf",(null==t.gridFilter?null:t.gridFilter.apisRegex.allDatabases)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allDatabases||null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances)),e.xp6(2),e.Q6J("ngIf",(null==t.gridFilter?null:t.gridFilter.apisRegex.allCollections)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allDatabases)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allCollections||null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances||null!=t.gridFilter&&t.gridFilter.apisRegex.allDatabases)),e.xp6(2),e.Q6J("ngIf",(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstanceApis)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allDatabases)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allCollections)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allInstanceApis||null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances||null!=t.gridFilter&&t.gridFilter.apisRegex.allDatabases||null!=t.gridFilter&&t.gridFilter.apisRegex.allCollections)),e.xp6(4),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allThirdPartyApis),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allThirdPartyApis)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allThirdPartyApis)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allThirdPartyApis)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allCustomApis),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allCustomApis)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allSystemApis),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allSystemApis)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allEvents),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allEvents)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allSchedulers),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allSchedulers)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allWebSocketEvents),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allWebSocketEvents)),e.xp6(6),e.Q6J("ngModel",t.gridFilter.rangeDates)("showIcon",!0)("showButtonBar",!0)("readonlyInput",!0),e.xp6(16),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",t.selectedRows)("dataKey",t.gridKey)("scrollable",!0)("paginator",!0)("rows",50)("rowsPerPageOptions",e.DdM(35,vt))("value",t.responseData)}}function yt(a,o){1&a&&e._UZ(0,"p-progressSpinner",68)}function Ct(a,o){if(1&a&&(e.TgZ(0,"div",4),e.YNc(1,Ne,4,1,"div",5),e.YNc(2,ft,93,36,"div",0),e.YNc(3,yt,1,0,"p-progressSpinner",6),e.qZA()),2&a){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",!t.isExternalLogsSetupDoneByRoot),e.xp6(1),e.Q6J("ngIf",t.isExternalLogsSetupDoneByRoot),e.xp6(1),e.Q6J("ngIf",t.loading)}}let At=(()=>{class a{logS;authCS;generalS;instanceS;functionS;eventCenterS;schedulerS;amEventS;webSocketEventsS;dataProviderS;confirmationService;constantsS;constantsCS;cd;responseData=[];loading;allApiCategories=[];tab={apiCategory:this.allApiCategories[0]};subscriptions=[];settings={maxRowsLimit:1e4};data={mode:E.D.ADD,eventChannel:new e.vpe,formData:void 0};instances;instanceIds;instanceNames;databases;databaseNames;collections;collectionNames;supportedAPIs;supportedApiNames;customApis;functionIds;customApiNames;systemsApis;systemApiIds;systemApiNames;amEvents;amEventIds;amEventNames;schedulersApis;schedulersIds;schedulersNames;wsEvents;wsEventIds;wsEventsNames;tpBundles;tpBundleMap=[];tpApiVersions;tpApiVersionMap=[];tpApis;tpApisMap=[];allTreeItemsMap={};value=new Date;range={start:null,end:null};logFilterPanelLayoutModelC;logDetailsLayoutModelC;gridFilter={queryParams:{},apisRegex:{},supportedAPIs:{}};ERequestMethod=T.Yp;constructor(t,i,s,n,l,g,h,v,C,m,I,S,A,Ft){this.logS=t,this.authCS=i,this.generalS=s,this.instanceS=n,this.functionS=l,this.eventCenterS=g,this.schedulerS=h,this.amEventS=v,this.webSocketEventsS=C,this.dataProviderS=m,this.confirmationService=I,this.constantsS=S,this.constantsCS=A,this.cd=Ft,this.allApiCategories=this.dataProviderS.getApiCategories()}ngOnInit(){var t=this;this.getExternalRedisSetupFromPackageJson(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var i=(0,u.Z)(function*(s){if(s&&s.action===N.F.APPLY_FILTER){const n=t.gridFilter;t.gridFilter=s.data,t.gridFilter.rangeDates=n.rangeDates,yield t.loadInstances(s.data),yield t.logTableSummaryData(s.data),t.logFilterPanelLayoutModelC&&t.logFilterPanelLayoutModelC.hideModal(),yield t.loadGridData(!1)}});return function(s){return i.apply(this,arguments)}}())),this.generalS.setNewTitle("API Maker - Log Table Summary")}isExternalLogsSetupDoneByRoot;getExternalRedisSetupFromPackageJson(){var t=this;return(0,u.Z)(function*(){t.loading=!0;try{const i=(yield t.instanceS.getExternalSetupStatus().toPromise()).data;t.loading=!1,!0===i.isLogsSetupDone?(t.isExternalLogsSetupDoneByRoot=!0,t.loadGridData(!1)):t.isExternalLogsSetupDoneByRoot=!1}catch{t.isExternalLogsSetupDoneByRoot=!1}t.cd.detectChanges()})()}loadGridData(t){var i=this;return(0,u.Z)(function*(){const s={find:{user:i.authCS.getUserId()},select:{createdAt:1,success:1,category:1,requestMethod:1,instanceName:1,databaseName:1,collectionName:1,instanceApiName:1,customApiName:1,systemApiName:1,eventName:1,tpApiBundleName:1,apiVersion:1,tpApiName:1,schedulerName:1,webSocketEventName:1,tenantUsername:1,url:1},sort:{_id:-1},limit:i.settings.maxRowsLimit};if(i.setDataForFilterModal(!1),i.gridFilter&&i.logFilterPanelLayoutModelC&&i.logFilterPanelLayoutModelC.setDataInObjectFromEventCenter(i.gridFilter),i.applyFilterInQuery(s.find,i.gridFilter),t){const l=i.responseData?.[0]?._id;l&&(s.find._id={$gt:l})}const n=yield i.logS.query(s).toPromise();if(t){for(const l of i.responseData)l.isNewInGrid=!1;i.responseData=[...n.data,...i.responseData];for(const l of n.data)i.doChangesInLogObject(l,!0)}else{i.responseData=n.data;for(const l of i.responseData)i.doChangesInLogObject(l,!1)}i.generalS.setNewTitle("API Maker - Log Table Summary"),i.loading=!1,i.cd.detectChanges()})()}applyFilterInQuery(t,i){if(!i)return;t.$or=[],t.$and=[];const s={category:c.R.CUSTOM_APIS};i?.apisRegex?.allCustomApis?t.$or.push(s):r.isEmpty(i?.queryParams?.functions)||t.$or.push({category:c.R.CUSTOM_APIS,customApiName:{$in:this.customApiNames}});const n={category:c.R.SYSTEM_APIS};i?.apisRegex?.allSystemApis?t.$or.push(n):r.isEmpty(i?.queryParams?.systemApis)||t.$or.push({category:c.R.SYSTEM_APIS,systemApiName:{$in:this.systemApiNames}});const l={category:c.R.INSTANCES};i?.apisRegex?.allInstances?t.$or.push(l):r.isEmpty(i?.queryParams?.instanceIds)||(l.instanceName={$in:this.instanceNames},r.isEmpty(i.queryParams.databaseNames)||(l.databaseName={$in:i.queryParams.databaseNames}),r.isEmpty(i.queryParams.collectionNames)||(l.collectionName={$in:i.queryParams.collectionNames}),r.isEmpty(i.queryParams.supportedApiNames)||(l.instanceApiName={$in:i.queryParams.supportedApiNames}),t.$or.push(l));const g={category:c.R.THIRD_PARTY_APIS};if(i?.apisRegex?.allThirdPartyApis)t.$or.push(g);else if(!r.isEmpty(this.tpApis)||!r.isEmpty(this.tpBundles)||!r.isEmpty(this.tpApiVersions)){const m=r.uniq(r.map(this.tpBundles,"bundleName")),I=r.uniq(r.map(this.tpApiVersions,"apiVersion")),S=r.uniq(r.map(this.tpApis,"apiName")),A={category:c.R.THIRD_PARTY_APIS};r.isEmpty(m)||(A.tpApiBundleName={$in:m}),r.isEmpty(I)||(A.apiVersion={$in:I}),r.isEmpty(S)||(A.tpApiName={$in:S}),t.$or.push(A)}const h={category:c.R.EVENTS};i?.apisRegex?.allEvents?t.$or.push(h):r.isEmpty(i?.queryParams?.eventIds)||t.$or.push({category:c.R.SYSTEM_APIS,eventName:{$in:this.amEventNames}});const v={category:c.R.SCHEDULERS};i?.apisRegex?.allSchedulers?t.$or.push(v):r.isEmpty(i?.queryParams?.schedulersIds)||t.$or.push({category:c.R.SCHEDULERS,schedulerName:{$in:this.schedulersNames}});const C={category:c.R.WEB_SOCKET_EVENT};i?.apisRegex?.allWebSocketEvents?t.$or.push(C):r.isEmpty(i?.queryParams?.webSocketIds)||t.$or.push({category:c.R.WEB_SOCKET_EVENT,webSocketEventName:{$in:this.wsEventsNames}}),i?.rangeDates?.[0]&&t.$and.push({createdAt:{$gte:i.rangeDates[0]}}),i?.rangeDates?.[1]&&t.$and.push({createdAt:{$lte:i.rangeDates[1]}}),r.isEmpty(t.$or)&&delete t.$or,r.isEmpty(t.$and)&&delete t.$and}logTableSummaryData(t){var i=this;return(0,u.Z)(function*(){const s={find:{_id:t?.queryParams.functions},select:{name:1}};i.customApis=(yield i.functionS.query(s).toPromise()).data,i.functionIds=r.map(i.customApis,p.iH._id),i.customApiNames=r.map(i.customApis,p.eb.name);const n=(yield i.instanceS.systemAPIList().toPromise()).data,l=r.keyBy(n,p.iH._id);i.systemsApis=[];for(const m of t?.queryParams.systemApis)l[m]&&i.systemsApis.push(l[m]);i.systemApiIds=r.map(i.systemsApis,p.iH._id),i.systemApiNames=r.map(i.systemsApis,p.aV.name);const g={find:{_id:t?.queryParams.eventIds},select:{name:1}};i.amEvents=(yield i.amEventS.query(g).toPromise()).data,i.amEventIds=r.map(i.amEvents,p.iH._id),i.amEventNames=r.map(i.amEvents,p.l0.name);const h={find:{_id:t?.queryParams.schedulersIds},select:{name:1}};i.schedulersApis=(yield i.schedulerS.query(h).toPromise()).data,i.schedulersIds=r.map(i.schedulersApis,p.iH._id),i.schedulersNames=r.map(i.schedulersApis,p.qH.name);const v=(yield i.webSocketEventsS.getWSEventKGrid({}).toPromise()).data,C=r.keyBy(v,p.iH._id);i.wsEvents=[];for(const m of t?.queryParams.webSocketIds)C[m]&&i.wsEvents.push(C[m]);i.wsEventIds=r.map(i.wsEvents,p.iH._id),i.wsEventsNames=r.map(i.wsEvents,p.of.id),i.calculateThirdPartyApiDataForUI(t)})()}calculateThirdPartyApiDataForUI(t){this.tpBundles=[],this.tpApiVersions=[],this.tpApis=[];for(const i of t.thirdPartyApis)i.level0?this.tpBundles.push(i):i.level1?this.tpApiVersions.push(i):i.level2&&this.tpApis.push(i);this.generalS.getMapOfAllItems(this.allTreeItemsMap,t.thirdPartyApis),this.tpBundleMap=r.map(this.tpBundles,p.iH._id),this.tpApiVersionMap=r.map(this.tpApiVersions,p.iH._id),this.tpApisMap=r.map(this.tpApis,p.iH._id)}loadInstances(t){var i=this;return(0,u.Z)(function*(){const s={find:{_id:t?.queryParams.instanceIds},select:{name:1},sort:{name:1}};i.instances=(yield i.instanceS.query(s).toPromise()).data,i.instanceIds=r.map(i.instances,p.iH._id),i.instanceNames=r.map(i.instances,p.Il.name),yield i.loadDatabases(t)})()}loadDatabases(t){var i=this;return(0,u.Z)(function*(){if(!i.instances)return i.databases=[],i.collections=[],void(i.supportedAPIs=[]);const s=(yield i.instanceS.getDatabases(i.instances,null).toPromise()).data||[],n=r.keyBy(r.flatten(s||[]),p.iH._id);i.databases=[];for(const l of t?.queryParams.databaseIds)n[l]&&i.databases.push(n[l]);i.databaseNames=r.map(i.databases,p.iH._id),yield i.loadCollection(t)})()}loadCollection(t){var i=this;return(0,u.Z)(function*(){if(!i.instances||!i.databases)return i.collections=[],void(i.supportedAPIs=[]);const s=(yield i.instanceS.getCollections(i.databases,null).toPromise()).data||[],n=r.keyBy(r.flatten(s||[]),p.iH._id);i.collections=[];for(const l of t?.queryParams.collectionIds)n[l]&&i.collections.push(n[l]);i.collectionNames=r.map(i.collections,p.iH._id),yield i.loadSupportedApis(t)})()}loadSupportedApis(t){var i=this;return(0,u.Z)(function*(){i.instances&&i.databases&&i.collections?(i.supportedAPIs=[],i.supportedAPIs=t.supportedAPIs||[],i.supportedApiNames=r.map(i.supportedAPIs,p.iH._id)):i.supportedAPIs=[]})()}doChangesInLogObject(t,i){t.createdAt=moment(t.createdAt).format(this.constantsCS.DATETIME_FORMAT_USER_WITH_SECONDS),t.isNewInGrid=i,t.category===c.R.INSTANCES?t.logNameForUI=[[t.instanceName,t.tenantUsername].filter(s=>!!s).join("::"),t.databaseName,t.collectionName,t.instanceApiName].filter(s=>!!s).join(" \u2192 "):t.category===c.R.CUSTOM_APIS?t.logNameForUI=t.customApiName:t.category===c.R.SYSTEM_APIS?t.logNameForUI=t.eventName?t.eventName:t.systemApiName:t.category===c.R.SCHEDULERS?t.logNameForUI=t.schedulerName:t.category===c.R.WEB_SOCKET_EVENT?t.logNameForUI=t.webSocketEventName:t.category===c.R.THIRD_PARTY_APIS&&(t.logNameForUI=t.tpApiBundleName+" \u2192 "+t.apiVersion+" \u2192 "+t.tpApiName)}showFilterPanelModel(){this.data.formData=void 0,this.data.mode=E.D.ADD,this.setDataForFilterModal(!0),this.logFilterPanelLayoutModelC.showModal()}instanceClickData(t){var i=this;return(0,u.Z)(function*(){const s=[];for(const n of t){i.instances.splice(i.instances.indexOf(n),1);for(const l of i.databases)l.instanceId===n._id&&s.push(l)}i.instanceIds=r.map(i.instances,p.iH._id),i.instanceNames=r.map(i.instances,p.Il.name),i.eventCenterS.filterInLog.instanceIds.next(i.instanceIds),i.removeDbClick(s)})()}removeDbClick(t){const i=[];for(const s of t){this.databases.splice(this.databases.indexOf(s),1);for(const n of this.collections)n.instanceName===s.instanceName&&n.databaseName===s.db&&i.push(n)}this.databaseNames=r.map(this.databases,p.iH._id),this.eventCenterS.filterInLog.databaseIds.next(this.databaseNames),this.removeCollectionClick(i)}removeCollectionClick(t){const i=[];for(const s of t){this.collections.splice(this.collections.indexOf(s),1);for(const n of this.supportedAPIs)s.instanceName&&n.databaseName===s.databaseName&&n.collectionName===s.name&&i.push(n)}this.collectionNames=r.map(this.collections,p.iH._id),this.eventCenterS.filterInLog.collectionIds.next(this.collectionNames),this.removeApiClick(i)}removeApiClick(t){for(const i of t)this.supportedAPIs.splice(this.supportedAPIs.indexOf(i),1);this.supportedApiNames=r.map(this.supportedAPIs,p.iH._id),this.eventCenterS.filterInLog.supportedApiIds.next(this.supportedApiNames),this.setRegexOnRemove()}setRegexOnRemove(){(0===this.instances.length||0===this.databases.length||0===this.collections.length||0===this.supportedAPIs.length)&&(this.gridFilter.apisRegex={})}customApisClick(t){this.customApis.splice(this.customApis.indexOf(t),1),this.functionIds=r.map(this.customApis,p.iH._id),this.customApiNames=r.map(this.customApis,p.eb.name),this.eventCenterS.filterInLog.functionIds.next(this.functionIds)}systemsApisClick(t){this.systemsApis.splice(this.systemsApis.indexOf(t),1),this.systemApiIds=r.map(this.systemsApis,p.iH._id),this.systemApiNames=r.map(this.systemsApis,p.aV.name),this.eventCenterS.filterInLog.systemApiIds.next(this.systemApiIds)}amEventsClick(t){this.amEvents.splice(this.amEvents.indexOf(t),1),this.amEventIds=r.map(this.amEvents,p.iH._id),this.amEventNames=r.map(this.amEvents,p.l0.name),this.eventCenterS.filterInLog.eventIds.next(this.amEventIds)}schedulersClick(t){this.schedulersApis.splice(this.schedulersApis.indexOf(t),1),this.schedulersIds=r.map(this.schedulersApis,p.iH._id),this.schedulersNames=r.map(this.schedulersApis,p.qH.name),this.eventCenterS.filterInLog.schedulersIds.next(this.schedulersIds)}wsEventClick(t){this.wsEvents.splice(this.wsEvents.indexOf(t),1),this.wsEventIds=r.map(this.wsEvents,p.iH._id),this.wsEventsNames=r.map(this.wsEvents,p.of.id),this.eventCenterS.filterInLog.webSocketIds.next(this.wsEventIds)}npmPackageClickData(t,i){"L_1"===i?this.bundleAndVersionAndApiRemove(t):"L_2"===i?this.allTreeItemsMap[t._id]&&this.apiVersionClickData(this.allTreeItemsMap[t._id]):"L_3"===i&&this.allTreeItemsMap[t._id]&&this.tpApiClickData(this.allTreeItemsMap[t._id])}bundleAndVersionAndApiRemove(t){if(t.level0&&this.tpBundles.indexOf(t)>=0){for(const i of t.children||[])this.apiVersionClickData(i);this.tpBundles.splice(this.tpBundles.indexOf(t),1)}this.tpBundleMap=r.map(this.tpBundles,p.iH._id),this.apiVersionClickData(t)}apiVersionClickData(t){t.level1&&this.tpApiVersions.indexOf(t)>=0&&this.tpApiVersions.splice(this.tpApiVersions.indexOf(t),1),this.tpApiVersionMap=r.map(this.tpApiVersions,p.iH._id),this.tpApiClickData(t)}tpApiClickData(t){if(t.level1)for(const i of t.children||[])this.tpApis.indexOf(i)>=0&&this.tpApis.splice(this.tpApis.indexOf(i),1);else if(t.level0)for(const i of t.children||[])for(const s of i.children||[])this.tpApis.indexOf(s)>=0&&this.tpApis.splice(this.tpApis.indexOf(s),1);else t.level2&&this.tpApis.indexOf(t)>=0&&this.tpApis.splice(this.tpApis.indexOf(t),1);this.tpApisMap=r.map(this.tpApis,p.iH._id)}setDataForFilterModal(t){this.eventCenterS.filterInLog.instanceIds.next(this.instanceIds?this.instanceIds:[]),this.eventCenterS.filterInLog.functionIds.next(this.functionIds?this.functionIds:[]),this.eventCenterS.filterInLog.systemApiIds.next(this.systemApiIds?this.systemApiIds:[]),this.eventCenterS.filterInLog.eventIds.next(this.amEventIds?this.amEventIds:[]),this.eventCenterS.filterInLog.schedulersIds.next(this.schedulersIds?this.schedulersIds:[]),this.eventCenterS.filterInLog.webSocketIds.next(this.wsEventIds?this.wsEventIds:[]),this.eventCenterS.filterInLog.databaseIds.next(this.databaseNames?this.databaseNames:[]),this.eventCenterS.filterInLog.collectionIds.next(this.collectionNames?this.collectionNames:[]),this.eventCenterS.filterInLog.supportedApiIds.next(this.supportedApiNames?this.supportedApiNames:[]);const i=[...this.tpBundleMap,...this.tpApiVersionMap,...this.tpApisMap];this.eventCenterS.filterInLog.thirdPartyApiIds.next(i.length?i:[]),t&&this.eventCenterS.filterInLog.refreshGrid.next(Math.random())}clearAllLogsDialog(){var t=this;return(0,u.Z)(function*(){var i;t.confirmationService.confirm({message:t.constantsS.logTable.clearAllLogsConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,u.Z)(function*(){yield t.clearAllLogs()}),function(){return i.apply(this,arguments)})})})()}clearAllLogs(){var t=this;return(0,u.Z)(function*(){yield t.logS.clearUserLogs(t.authCS.getUserId()).toPromise(),t.loadGridData(!1)})()}refresh(){var t=this;return(0,u.Z)(function*(){t.loadGridData(!0)})()}clearDate(){this.gridFilter.rangeDates=void 0}selectedRows=[];gridKey=p.iH._id;dblClickLogs(){var t=this;return(0,u.Z)(function*(){yield t.logDetailsLayoutModelC.showModal(t.selectedRows)})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(i){return new(i||a)(e.Y36(D.e),e.Y36(Y.D),e.Y36(F.b),e.Y36(G.E),e.Y36(K.d),e.Y36(L.u),e.Y36(V.Z),e.Y36(j.l),e.Y36(W.a),e.Y36(X.B),e.Y36(Z.YP),e.Y36(b.L),e.Y36(M.s),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-log-table-c"]],viewQuery:function(i,s){if(1&i&&(e.Gf(qe,5),e.Gf(Pe,5)),2&i){let n;e.iGM(n=e.CRH())&&(s.logFilterPanelLayoutModelC=n.first),e.iGM(n=e.CRH())&&(s.logDetailsLayoutModelC=n.first)}},decls:5,vars:2,consts:[["class","pt-1 pl-1 pr-1",4,"ngIf"],[3,"data"],["logFilterPanelLayoutModelC",""],["logDetailsLayoutModelC",""],[1,"pt-1","pl-1","pr-1"],["class","overflow-hidden","style","height: calc(100vh - 46px);",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"overflow-hidden",2,"height","calc(100vh - 46px)"],[1,"text-center"],[1,"mt-5","pt-5"],[1,"card","shadow-sm","h-100"],[1,"card-header"],[1,"fas","fa-table","text-yellow","fa-fw","mr-1"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/logs/log-table.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px"],["tooltipPosition","left","pTooltip","Apply Filter",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-check","fa-fw","align-middle","text-success"],["tooltipPosition","left","pTooltip","Show Filter Modal",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fa","fa-filter","text-yellow","fa-fw"],[1,"card-body","p-0","overflow-auto",2,"height","278px"],[1,"table","table-striped","table-sm","mb-0"],[1,"w-10-nowrap","text-right","font-weight-bold","border-right","pr-2","pl-2"],[1,"border-right"],["class","text-center text-success",4,"ngIf"],[4,"ngIf"],["colspan","4",4,"ngIf"],["class","border-right",4,"ngIf"],["colspan","2",4,"ngIf"],["colspan","4"],[1,"w-10-nowrap","text-right","font-weight-bold","border-right","pr-2","pl-2","pt-2"],[1,"mt-1","d-inline-block"],["colspan","4",1,""],["appendTo","body","selectionMode","range","dateFormat","dd/mm/yy","inputId","filterDatePickerId",1,"form-control-sm",3,"ngModel","showIcon","showButtonBar","readonlyInput","ngModelChange"],["pTooltip","Clear",1,"cursor-pointer",3,"click"],[1,"fas","fa-ban","fa-fw","ml-4","align-middle","text-danger"],[1,"card","shadow-sm","h-100","mt-2"],["src","/assets/images/icons/log.svg","alt","Log Table",1,"fa-fw","mr-1"],["tooltipPosition","left","pTooltip","Show Apply Filter",1,"float-right","cursor-pointer","ml-3",3,"click"],["tooltipPosition","left","pTooltip","Clear All Logs",1,"float-right","cursor-pointer","ml-3","text-danger",3,"click"],[1,"far","fa-trash-alt","text-danger","fa-fw"],["tooltipPosition","left","pTooltip","Refresh Logs",1,"float-right","cursor-pointer","ml-3","text-success",3,"click"],[1,"fas","fa-sync-alt","text-info","fa-fw"],[1,"overflow-hidden"],[2,"height","calc(100vh - 418px)","width","calc(100% - 2px)"],["styleClass","p-datatable-striped","scrollHeight","flex",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","paginator","rows","rowsPerPageOptions","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],[1,"text-center","text-success"],["class","ml-1","styleClass","bg-danger text-dark",4,"ngFor","ngForOf"],["styleClass","bg-danger text-dark",1,"ml-1"],[1,"fas","fa-times-circle","cursor-pointer",3,"click"],["class","ml-1","styleClass","bg-warning text-dark",4,"ngFor","ngForOf"],["styleClass","bg-warning text-dark",1,"ml-1"],["class","ml-1","styleClass","bg-info text-dark",4,"ngFor","ngForOf"],["styleClass","bg-info text-dark",1,"ml-1"],["class","ml-1","styleClass","bg-light text-dark",4,"ngFor","ngForOf"],["styleClass","bg-light text-dark",1,"ml-1"],["colspan","2"],[1,"text-center",2,"width","80px"],[2,"width","200px"],[2,"width","130px"],[2,"width","100px"],[3,"pSelectableRow"],[1,"text-center",3,"ngClass"],[1,"text-nowrap",3,"ngClass"],[1,"small","font-weight-bold","mr-3",3,"ngClass"],[1,"text-nowrap",3,"ngStyle","ngClass"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,s){1&i&&(e.YNc(0,Ct,4,3,"div",0),e._UZ(1,"app-log-filter-panel-layout-model",1,2)(3,"app-log-details-layout-model",null,3)),2&i&&(e.Q6J("ngIf",void 0!==s.isExternalLogsSetupDoneByRoot),e.xp6(1),e.Q6J("data",s.data))},dependencies:[R.JJ,R.On,_.mk,_.sg,_.O5,_.PC,x.iA,Z.jx,x.Ei,q.G,w.u,z.f,ee.A,fe,be],styles:[".table th,.table td{border-top:none}#filterDatePickerId,.w-date-input{width:210px}\n"],encapsulation:2,changeDetection:0})}return a})();var Tt=d(75249),Zt=d(1678),xt=d(64211),It=d(21434),St=d(84186),Lt=d(95765),bt=d(2777),qt=d(57705),Pt=d(31558),Nt=d(38125);const Et=[{path:"main",component:At,canActivate:[B.P]}];let Dt=(()=>{class a{static \u0275fac=function(i){return new(i||a)};static \u0275mod=e.oAB({type:a});static \u0275inj=e.cJS({imports:[J.Bz.forChild(Et),Q.u,Tt.ApiTestingM,Zt.DashboardM,xt.DbCellM,It.B,St.SystemApiM,Lt.FunctionManM,bt.u,qt.L,Pt.SchedulerManM,Nt.AmEventsM,H.WebSocketEventsM]})}return a})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[8374,6925,8682,1617],{96925:(l,o,c)=>{c.d(o,{Eg:()=>_,Yp:()=>a,ZF:()=>i,vT:()=>t});var t=function(n){return n.FORM_DATA="FORM_DATA",n.JSON="JSON",n.TEXT="TEXT",n}(t||{}),a=function(n){return n.GET="GET",n.POST="POST",n.PUT="PUT",n.DELETE="DELETE",n}(a||{}),_=function(n){return n.CONTENT_TYPE="content-type",n.ACCEPT_ENCODING="accept-encoding",n.NO_COMPRESSION_STD="x-no-compression",n.AUTHORIZATION_AM="x-am-authorization",n.AUTHORIZATION_AM_USER="x-am-user-authorization",n.AUTHORIZATION_AWS="x-aws-authorization",n.AUTHORIZATION_GOOGLE="x-google-authorization",n.AUTHORIZATION_AZURE="x-azure-authorization",n.RUN_IN_SANDBOX="x-am-run-in-sandbox",n.ORIGIN="origin",n.AUTHORIZATION="authorization",n.META="x-am-meta",n.SECRET="x-am-secret",n.CONTENT_TYPE_RESPONSE="x-am-content-type-response",n.CACHE_CONTROL="x-am-cache-control",n.CODE_HASH="x-am-code-hash",n.SANDBOX_TIMEOUT="x-am-sandbox-timeout",n.GET_ENCRYPTED_DATA="x-am-get-encrypted-data",n.ENCRYPTED_PAYLOAD="x-am-encrypted-payload",n.RESPONSE_CASE="x-am-response-case",n.RESPONSE_OBJECT_TYPE="x-am-response-object-type",n.AM_I18N="x-am-internationalization",n.DATA_SOURCE="x-am-data-source",n.TEST_HOOK="x-am-test-hook",n.TEST_EVENT="x-am-test-event",n.INTER_COMM="x-am-inter-comm",n.SEND_ONLY_OBJECTS="x-am-send-only-objects-in-stream",n.AM_REQUEST_ID="x-am-request-id",n.AM_CODE_EXEC_ID="x-am-code-exec-id",n.AM_STORE_TOKEN="x-am-store-token",n.AM_WS_Client_ID="x-am-ws-client-id",n.RUN_IN_DEBUGGER="x-am-run-in-debugger",n.TENANT_USERNAME="x-am-tenant-username",n.TENANT_SECRET_PATH="x-am-tenant-secret-path",n}(_||{}),i=function(n){return n.DB_MASTER_NAME="db-master-name",n.ADMIN_PATH="admin-path",n}(i||{})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[8682,6925,8374,1617],{96925:(l,o,c)=>{c.d(o,{Eg:()=>_,Yp:()=>a,ZF:()=>i,vT:()=>t});var t=function(n){return n.FORM_DATA="FORM_DATA",n.JSON="JSON",n.TEXT="TEXT",n}(t||{}),a=function(n){return n.GET="GET",n.POST="POST",n.PUT="PUT",n.DELETE="DELETE",n}(a||{}),_=function(n){return n.CONTENT_TYPE="content-type",n.ACCEPT_ENCODING="accept-encoding",n.NO_COMPRESSION_STD="x-no-compression",n.AUTHORIZATION_AM="x-am-authorization",n.AUTHORIZATION_AM_USER="x-am-user-authorization",n.AUTHORIZATION_AWS="x-aws-authorization",n.AUTHORIZATION_GOOGLE="x-google-authorization",n.AUTHORIZATION_AZURE="x-azure-authorization",n.RUN_IN_SANDBOX="x-am-run-in-sandbox",n.ORIGIN="origin",n.AUTHORIZATION="authorization",n.META="x-am-meta",n.SECRET="x-am-secret",n.CONTENT_TYPE_RESPONSE="x-am-content-type-response",n.CACHE_CONTROL="x-am-cache-control",n.CODE_HASH="x-am-code-hash",n.SANDBOX_TIMEOUT="x-am-sandbox-timeout",n.GET_ENCRYPTED_DATA="x-am-get-encrypted-data",n.ENCRYPTED_PAYLOAD="x-am-encrypted-payload",n.RESPONSE_CASE="x-am-response-case",n.RESPONSE_OBJECT_TYPE="x-am-response-object-type",n.AM_I18N="x-am-internationalization",n.DATA_SOURCE="x-am-data-source",n.TEST_HOOK="x-am-test-hook",n.TEST_EVENT="x-am-test-event",n.INTER_COMM="x-am-inter-comm",n.SEND_ONLY_OBJECTS="x-am-send-only-objects-in-stream",n.AM_REQUEST_ID="x-am-request-id",n.AM_CODE_EXEC_ID="x-am-code-exec-id",n.AM_STORE_TOKEN="x-am-store-token",n.AM_WS_Client_ID="x-am-ws-client-id",n.RUN_IN_DEBUGGER="x-am-run-in-debugger",n.TENANT_USERNAME="x-am-tenant-username",n.TENANT_SECRET_PATH="x-am-tenant-secret-path",n}(_||{}),i=function(n){return n.DB_MASTER_NAME="db-master-name",n.ADMIN_PATH="admin-path",n}(i||{})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[8841],{68841:(m,s,n)=>{n.r(s),n.d(s,{AccountsM:()=>l});var d=n(77664),o=n(17017),a=n(94946);const h=[{path:"admin-users",loadChildren:()=>n.e(6393).then(n.bind(n,66393)).then(t=>t.AdminUserM)},{path:"dev-accounts",loadChildren:()=>n.e(2295).then(n.bind(n,12295)).then(t=>t.DevAccM)},{path:"secret-management",loadChildren:()=>n.e(5679).then(n.bind(n,75679)).then(t=>t.SecretManagementM)}];let l=(()=>{class t{static \u0275fac=function(c){return new(c||t)};static \u0275mod=a.oAB({type:t});static \u0275inj=a.cJS({imports:[d.Bz.forChild(h),o.u]})}return t})()}}]);
|