@sava-info-systems/api-maker-with-extensions 2.3.0 → 3.0.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/.dockerignore +5 -1
- package/Dockerfile +1 -35
- package/Dockerfile.base +22 -0
- package/Dockerfile.extended-base +44 -0
- package/dist/1025.5c34b11ab88519fd.js +1 -0
- package/dist/1097.3c5b2b4587cefa6e.js +1 -0
- package/dist/115.8d10b2b963e7d632.js +1 -0
- package/dist/148.f8f560a5f818328e.js +1 -0
- package/dist/1558.576af7585833e289.js +1 -0
- package/dist/1678.14f917ee37080d63.js +1 -0
- package/dist/1754.fc6d6e9f6c1e96d5.js +1 -0
- package/dist/1928.9c9375dd036b025a.js +1 -0
- package/dist/1957.b718aa368330b524.js +1 -0
- package/dist/2140.bb097d69bcb6a1e5.js +1 -0
- package/dist/2295.aa3514c8d1238cb2.js +1 -0
- package/dist/238.553f30dbe5124419.js +1 -0
- package/dist/2473.260a6b26a70eaa8d.js +1 -0
- package/dist/2579.b02fe6a8ba3a2e71.js +1 -0
- package/dist/2714.b41d14f7378785df.js +1 -0
- package/dist/2735.4046cae4c68ac75f.js +1 -0
- package/dist/292.bb85e0ea91dcc118.js +1 -0
- package/dist/3139.5dd9289cc24b4100.js +1 -0
- package/dist/3450.588aafa515b19133.js +1 -0
- package/dist/3664.ed1232e3c70195fc.js +1 -0
- package/dist/3752.d4e0a280a37c1426.js +1 -0
- package/dist/3rdpartylicenses.txt +1 -1
- package/dist/4110.b9ebfd9a7382c450.js +1 -0
- package/dist/4186.2fd0537d5bc6d882.js +1 -0
- package/dist/4211.b6b9f495b100e985.js +1 -0
- package/dist/4575.1fee055d10b57afc.js +1 -0
- package/dist/4842.ccf765ed3e9753a7.js +1 -0
- package/dist/485.7870367c9475fed8.js +1 -0
- package/dist/{4895.a54759704d1994b1.js → 4895.fa7b24d66157c531.js} +1 -1
- package/dist/5334.e0a2450fc295f659.js +1 -0
- package/dist/5421.2c2c0fbf926792db.js +1 -0
- package/dist/5434.0997994b319a866a.js +1 -0
- package/dist/5679.e362a3e10cb1b953.js +1 -0
- package/dist/5761.6c20b09245ac31ef.js +1 -0
- package/dist/5765.8d761aef1708e8a1.js +1 -0
- package/dist/6236.969b45cad747277c.js +1 -0
- package/dist/6393.1b7b097f17d75290.js +1 -0
- package/dist/6401.f18e3c98d6deaa22.js +1 -0
- package/dist/6650.05ea40acd68697c3.js +1 -0
- package/dist/7368.85d940d08fdca6e2.js +1 -0
- package/dist/7436.4a62f7ef13cffb21.js +1 -0
- package/dist/7470.d24359dc7a3ef75a.js +1 -0
- package/dist/7649.8e5ff8a951b474e0.js +1 -0
- package/dist/7975.d3d7064d527ac017.js +1 -0
- package/dist/7977.85b17bdb465e9a90.js +1 -0
- package/dist/7987.c1637bec96a9cc03.js +1 -0
- package/dist/8125.8390bc1b477ec6b9.js +1 -0
- package/dist/8266.0bf85311cf40ddff.js +1 -0
- package/dist/8296.fe54c3787977fad3.js +1 -0
- package/dist/885.7e1ec0f82adbdd6f.js +1 -0
- package/dist/891.fee03277c7f1c29d.js +1 -0
- package/dist/{913.4580b4ce4307a40f.js → 913.e49eb351997bc25c.js} +1 -1
- package/dist/9243.eaa2c312b42fc4b3.js +1 -0
- package/dist/9575.8404e98d640fd9f9.js +1 -0
- package/dist/9939.537c5e355804804b.js +1 -0
- package/dist/assets/images/icons/api-group-light.svg +11 -0
- package/dist/assets/images/icons/api-group.svg +5 -5
- package/dist/assets/images/icons/api-maker-deployment-light.svg +5 -0
- package/dist/assets/images/icons/api-maker-deployment.svg +3 -3
- package/dist/assets/images/icons/api-user-light.svg +12 -0
- package/dist/assets/images/icons/api-user.svg +2 -2
- package/dist/assets/images/icons/comparator-light.svg +61 -0
- package/dist/assets/images/icons/comparator.svg +2 -2
- package/dist/assets/images/icons/custom-light.svg +6 -0
- package/dist/assets/images/icons/custom.svg +5 -5
- package/dist/assets/images/icons/database-light.svg +29 -0
- package/dist/assets/images/icons/database.svg +6 -6
- package/dist/assets/images/icons/db-m-light.svg +10 -0
- package/dist/assets/images/icons/db-m.svg +4 -4
- package/dist/assets/images/icons/db-token-generator-light.svg +4 -0
- package/dist/assets/images/icons/db-token-generator.svg +4 -0
- package/dist/assets/images/icons/dev-light.svg +13 -0
- package/dist/assets/images/icons/dev.svg +4 -4
- package/dist/assets/images/icons/diagram-light.svg +28 -0
- package/dist/assets/images/icons/diagram.svg +9 -9
- package/dist/assets/images/icons/event-light.svg +16 -0
- package/dist/assets/images/icons/event.svg +4 -4
- package/dist/assets/images/icons/film-movies-icon.svg +3 -3
- package/dist/assets/images/icons/finder-light.svg +14 -0
- package/dist/assets/images/icons/finder.svg +3 -3
- package/dist/assets/images/icons/i18n-light.svg +11 -0
- package/dist/assets/images/icons/i18n.svg +6 -6
- package/dist/assets/images/icons/increment-light.svg +5 -0
- package/dist/assets/images/icons/increment.svg +2 -2
- package/dist/assets/images/icons/license-light.svg +6 -0
- package/dist/assets/images/icons/license.svg +4 -4
- package/dist/assets/images/icons/log-light.svg +17 -0
- package/dist/assets/images/icons/log-profile-light.svg +23 -0
- package/dist/assets/images/icons/log-profile.svg +7 -7
- package/dist/assets/images/icons/log.svg +6 -6
- package/dist/assets/images/icons/masters.svg +3 -3
- package/dist/assets/images/icons/native-process-logs-light.svg +13 -0
- package/dist/assets/images/icons/native-process-logs.svg +6 -6
- package/dist/assets/images/icons/nodes-light.svg +5 -0
- package/dist/assets/images/icons/nodes.svg +2 -2
- package/dist/assets/images/icons/notes-light.svg +16 -0
- package/dist/assets/images/icons/notes.svg +2 -2
- package/dist/assets/images/icons/process_initializers-light.svg +20 -0
- package/dist/assets/images/icons/process_initializers.svg +7 -7
- package/dist/assets/images/icons/rsa_encryption-light.svg +6 -0
- package/dist/assets/images/icons/rsa_encryption.svg +2 -2
- package/dist/assets/images/icons/sandbox-light.svg +11 -0
- package/dist/assets/images/icons/sandbox.svg +2 -2
- package/dist/assets/images/icons/scanning-period-light.svg +13 -0
- package/dist/assets/images/icons/scanning-period.svg +4 -4
- package/dist/assets/images/icons/schedulers-light.svg +8 -0
- package/dist/assets/images/icons/schedulers.svg +5 -5
- package/dist/assets/images/icons/secret-light.svg +15 -0
- package/dist/assets/images/icons/secret.svg +2 -2
- package/dist/assets/images/icons/swagger-logo-light.svg +9 -0
- package/dist/assets/images/icons/swagger-logo.svg +2 -2
- package/dist/assets/images/icons/systems-light.svg +8 -0
- package/dist/assets/images/icons/systems.svg +3 -3
- package/dist/assets/images/icons/testing-light.svg +12 -0
- package/dist/assets/images/icons/testing.svg +6 -6
- package/dist/assets/images/icons/third-party-light.svg +19 -0
- package/dist/assets/images/icons/third-party.svg +4 -4
- package/dist/assets/images/icons/typescript-light.svg +12 -0
- package/dist/assets/images/icons/typescript.svg +2 -2
- package/dist/assets/images/icons/ui-maker-light.svg +23 -0
- package/dist/assets/images/icons/ui-maker.svg +10 -10
- package/dist/assets/images/icons/utility-light.svg +19 -0
- package/dist/assets/images/icons/utility.svg +2 -2
- package/dist/assets/images/icons/vulnerability-light.svg +20 -0
- package/dist/assets/images/icons/vulnerability.svg +5 -5
- package/dist/assets/images/icons/web-light.svg +16 -0
- package/dist/assets/images/icons/web.svg +3 -3
- package/dist/assets/images/logo/api_maker_logo_dark.svg +29 -0
- package/dist/assets/images/logo/api_maker_logo_full_white.svg +29 -0
- package/dist/assets/images/logo/api_maker_logo_light.svg +22 -0
- package/dist/assets/images/logo/apple-touch-icon.png +0 -0
- package/dist/assets/images/logo/favicon-192x192.png +0 -0
- package/dist/assets/images/logo/favicon-32x32.png +0 -0
- package/dist/assets/images/logo/favicon-512x512.png +0 -0
- package/dist/assets/images/logo/logo_docs-light.svg +15 -0
- package/dist/assets/images/logo/logo_docs.svg +3 -3
- package/dist/assets/images/logo/logo_store-light.svg +17 -0
- package/dist/assets/images/logo/logo_store.svg +3 -3
- package/dist/assets/images/logo/store_logo-dark.svg +11 -0
- package/dist/assets/images/logo/store_logo-light.svg +11 -0
- package/dist/assets/images/logo/store_logo.svg +2 -2
- package/dist/assets/primeng-theme/primeng-theme-overrides.scss +1426 -31
- package/dist/assets/public/diagram-viewer/index.html +59 -20
- package/dist/assets/public/diagram-viewer/index.js +1 -1
- package/dist/assets/public/monaco-editor/index.html +105 -9
- package/dist/assets/public/monaco-editor/index.js +1 -1
- package/dist/assets/public/table-viewer/index.html +124 -38
- package/dist/assets/schema-types/InterfaceProps.ts +71 -13
- package/dist/assets/schema-types/store-types.ts +2 -0
- package/dist/assets/schema-types/types.ts +65 -17
- package/dist/assets/styles/bootstrap-overrides.scss +170 -7
- package/dist/assets/styles/colors-dark.scss +320 -33
- package/dist/assets/styles/colors-light.scss +453 -9
- package/dist/assets/styles/out/styles.css.map +1 -1
- package/dist/assets/styles/styles.scss +213 -24
- package/dist/assets/styles/variables.scss +2 -2
- package/dist/bootstrap-overrides.css +1 -0
- package/dist/colors-dark.css +1 -0
- package/dist/colors-light.css +1 -0
- package/dist/{common.912ad7a22e5de63a.js → common.86c514055f788290.js} +1 -1
- package/dist/index.html +111 -27
- package/dist/main.0ac98a72f1b9c1dd.js +1 -0
- package/dist/runtime.0e9fc303007ced09.js +1 -0
- package/dist/styles-global.css +1 -0
- package/dist/{styles.242217e145c3f7ab.css → styles.c1032bc4f4d7829b.css} +1 -1
- package/main.js +1 -1
- package/package-sandbox.json +1 -1
- package/package.json +9 -9
- package/pnpm-workspace.yaml +15 -0
- package/sandbox.js +1 -1
- package/src/assets/schema-types/store-types.ts +2 -0
- package/src/assets/schema-types/types.ts +65 -17
- package/src/schema-types/store-types.js +2 -0
- package/src/schema-types/types.js +1 -0
- package/src/tools/.github/copilot-instructions.md +17 -9
- package/src/tools/local-client.js +1 -1
- package/dist/1025.a0db9347453600d0.js +0 -1
- package/dist/1097.d0d6fd13031aa1f0.js +0 -1
- package/dist/148.1dc7d9e0cfe45510.js +0 -1
- package/dist/1558.0aae3e5c538d3815.js +0 -1
- package/dist/1678.ed1e4a269e0f42bc.js +0 -1
- package/dist/1754.691f142aa1eabe28.js +0 -1
- package/dist/1928.2b376f7cf66ed038.js +0 -1
- package/dist/1957.ab7fda21d9978597.js +0 -1
- package/dist/2140.1ce150285aebe3cc.js +0 -1
- package/dist/2295.4fa1d4b5ff482f3a.js +0 -1
- package/dist/238.891233aa670bdd2b.js +0 -1
- package/dist/2473.4b2bb1ad5b1cc99d.js +0 -1
- package/dist/2579.6558b67b2d98f116.js +0 -1
- package/dist/2714.0d6939336a02dd0a.js +0 -1
- package/dist/2735.86437a8639a0c1bb.js +0 -1
- package/dist/292.f6482cd1a572ba4b.js +0 -1
- package/dist/3139.0921102d181c220d.js +0 -1
- package/dist/3450.9b5cfc83039b02b5.js +0 -1
- package/dist/3664.4a1dd7f16f8b57fb.js +0 -1
- package/dist/4110.d108e786ecbdfd1b.js +0 -1
- package/dist/4186.ac3e8af0efeeac14.js +0 -1
- package/dist/4211.1bfe72ce0b7b2f76.js +0 -1
- package/dist/443.7e3946651373e09a.js +0 -1
- package/dist/4575.169008cbbbae66bb.js +0 -1
- package/dist/4842.e7649d81606ad80d.js +0 -1
- package/dist/485.b546656b466cb8a4.js +0 -1
- package/dist/5334.72c1c6d89fdf136e.js +0 -1
- package/dist/5421.2067001c10533303.js +0 -1
- package/dist/5679.4e22239895c7f520.js +0 -1
- package/dist/5761.331ca41ab64cca92.js +0 -1
- package/dist/5765.2b640be5d177d794.js +0 -1
- package/dist/6236.6c0fc469f0c96549.js +0 -1
- package/dist/6393.173ecdfc3b022973.js +0 -1
- package/dist/6401.374823002788afe7.js +0 -1
- package/dist/6650.1d18ee25901d68be.js +0 -1
- package/dist/7368.9ebf62d518f8ad7a.js +0 -1
- package/dist/7436.640bf5fe48814cbe.js +0 -1
- package/dist/7470.b1ce7eedb9cedb2d.js +0 -1
- package/dist/7649.ab4744cfe713eec0.js +0 -1
- package/dist/7975.578a00ebd1160a1e.js +0 -1
- package/dist/7977.afeded970bac8b66.js +0 -1
- package/dist/7987.5958ad5b81873058.js +0 -1
- package/dist/8125.b2f908096882ed45.js +0 -1
- package/dist/8266.aca59a0a04590ab1.js +0 -1
- package/dist/8296.a387c28f5702c5e8.js +0 -1
- package/dist/885.be44d92efca1aaf6.js +0 -1
- package/dist/891.5e08c81e5200413e.js +0 -1
- package/dist/9243.08630ad94e1fddba.js +0 -1
- package/dist/9575.30ac91b65602c0ca.js +0 -1
- package/dist/9939.a3389cc6764e3cbc.js +0 -1
- package/dist/assets/images/logo/API Maker Logo 2021 black.svg +0 -47
- package/dist/assets/images/logo/API Maker Logo 2021.svg +0 -49
- package/dist/assets/images/logo/logo.svg +0 -41
- package/dist/assets/styles/out/bootstrap-overrides.css +0 -2
- package/dist/assets/styles/out/colors-dark.css +0 -2
- package/dist/assets/styles/out/colors-light.css +0 -2
- package/dist/assets/styles/out/monaco-editor-overrides.css +0 -2
- package/dist/assets/styles/out/styles.css +0 -2
- package/dist/assets/styles/out/variables.css +0 -2
- package/dist/favicon.ico +0 -0
- package/dist/main.2046fb4b0dd1b8e0.js +0 -1
- package/dist/runtime.a86d5cd27767506e.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[5334],{35334:(S,h,a)=>{a.r(h),a.d(h,{AmWelcomeM:()=>Z});var d=a(77664),_=a(17017),f=a(63726),x=a(60921),m=a(38727),l=a(56555),t=a(94946),b=a(95852),C=a(84795),u=a(77240),M=a(51774),g=a(60095),p=a(96814);const O=["searchInput"];function P(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"button",10),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.clearFilter())}),t._UZ(1,"i",11),t.qZA()}}function w(n,c){1&n&&(t.TgZ(0,"span",12)(1,"span",13),t._uU(2,"\u2318"),t.qZA(),t._uU(3,"K"),t.qZA())}function k(n,c){if(1&n&&(t.TgZ(0,"div",14),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.hij(" No pages match \u201c",e.query,"\u201d. ")}}function T(n,c){if(1&n&&(t.TgZ(0,"span",29),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.ekj("tile-badge--deprecated","deprecated"===e.badgeType),t.xp6(1),t.Oqu(e.badge)}}function I(n,c){if(1&n&&t._UZ(0,"img",30),2&n){const e=t.oxw().$implicit,o=t.oxw(2);t.Tol(o.iconSizeClass(e.icon)),t.Q6J("src",o.icon(e.icon),t.LSH)}}function y(n,c){if(1&n&&t._UZ(0,"i"),2&n){const e=t.oxw().$implicit;t.Tol(e.faIcon+" "+(e.faIconClass||"dash-tile-icon"))}}function v(n,c){if(1&n&&(t.TgZ(0,"span",31),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.label)}}function A(n,c){if(1&n&&(t.TgZ(0,"span",32),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(e.tooltip)}}function H(n,c){if(1&n){const e=t.EpF();t.TgZ(0,"a",22),t.NdJ("click",function(i){const r=t.CHM(e).$implicit;return t.oxw(2).go(r),t.KtG(i.preventDefault())}),t.TgZ(1,"div",23),t.YNc(2,T,2,3,"span",24),t.YNc(3,I,1,3,"img",25),t.YNc(4,y,1,2,"i",26),t.YNc(5,v,2,1,"span",27),t.qZA(),t.YNc(6,A,2,1,"span",28),t.qZA()}if(2&n){const e=c.$implicit;t.ekj("dash-tile-link--has-tip",e.tooltip),t.xp6(1),t.ekj("icon-box--logo-only",e.hideLabel),t.xp6(1),t.Q6J("ngIf",e.badge),t.xp6(1),t.Q6J("ngIf",e.icon),t.xp6(1),t.Q6J("ngIf",!e.icon&&e.faIcon),t.xp6(1),t.Q6J("ngIf",!e.hideLabel),t.xp6(1),t.Q6J("ngIf",e.tooltip)}}function G(n,c){if(1&n&&(t.TgZ(0,"section",15)(1,"h4",16)(2,"span",17),t._UZ(3,"i"),t.qZA(),t.TgZ(4,"span",18),t._uU(5),t.qZA(),t._UZ(6,"span",19),t.qZA(),t.TgZ(7,"div",20),t.YNc(8,H,7,9,"a",21),t.qZA()()),2&n){const e=c.$implicit,o=t.oxw();t.ekj("dash-section--top",e.key===o.EDashSection.DASHBOARD||e.key===o.EDashSection.FAMILY),t.xp6(3),t.Tol(e.faIcon+" fa-fw"),t.xp6(2),t.Oqu(e.key),t.xp6(3),t.Q6J("ngForOf",e.pages)}}const L=[{path:"",component:(()=>{class n{authCS;authS;generalCS;themeS;router;EUserType=x.d;EDashSection=l.tX;sections=[];filteredSections=[];query="";searchInput;constructor(e,o,i,s,r){this.authCS=e,this.authS=o,this.generalCS=i,this.themeS=s,this.router=r}ngOnInit(){this.generalCS.setNewTitle("Dashboard"),this.buildSections(),this.applyFilter()}buildSections(){const e=(0,l.xu)({extensions:!!this.authS.backendSettings?.extensions,userType:this.authCS.gUser?.userType});this.sections=l.Xg.map(o=>({key:o.key,faIcon:o.faIcon,pages:e.filter(i=>i.section===o.key)})).filter(o=>o.pages.length>0)}get noResults(){return!!this.query.trim()&&0===this.filteredSections.length}applyFilter(){const e=this.query;this.filteredSections=e.trim()?this.sections.map(o=>({...o,pages:o.pages.filter(i=>(0,l.gF)(i,e))})).filter(o=>o.pages.length>0):this.sections}clearFilter(){this.query="",this.applyFilter(),this.searchInput?.nativeElement.focus()}icon(e){return e?this.themeS.theme.value===m.K.LIGHT&&e.endsWith(".svg")?e.replace(/\.svg$/,"-light.svg"):e:""}iconSizeClass(e){return e?{process_initializers:"icon-img--wide-xl","api-maker-deployment":"icon-img--wide-lg",comparator:"icon-img--wide-lg",diagram:"icon-img--wide-md",increment:"icon-img--wide-md"}[e.split("/").pop()?.replace(/(-light)?\.svg$/,"")??""]??"":""}go(e){e.route?this.router.navigateByUrl(e.route):e.href&&window.open(e.href,"_blank")}onKeydown(e){if((e.metaKey||e.ctrlKey)&&("k"===e.key||"K"===e.key))return e.preventDefault(),this.searchInput?.nativeElement.focus(),void this.searchInput?.nativeElement.select();"Escape"===e.key&&e.target===this.searchInput?.nativeElement&&this.query&&(e.preventDefault(),this.clearFilter())}static \u0275fac=function(o){return new(o||n)(t.Y36(b.D),t.Y36(C.e),t.Y36(u.b),t.Y36(M.Y),t.Y36(d.F0))};static \u0275cmp=t.Xpm({type:n,selectors:[["app-am-welcome"]],viewQuery:function(o,i){if(1&o&&t.Gf(O,5),2&o){let s;t.iGM(s=t.CRH())&&(i.searchInput=s.first)}},hostBindings:function(o,i){1&o&&t.NdJ("keydown",function(r){return i.onKeydown(r)},!1,t.evT)},decls:10,vars:5,consts:[[1,"dash-wrap"],[1,"dash-search"],[1,"fas","fa-search","dash-search__icon"],["type","text","placeholder","Search pages\u2026","aria-label","Search pages",1,"dash-search__input",3,"ngModel","ngModelChange"],["searchInput",""],["type","button","class","dash-search__clear","aria-label","Clear search",3,"click",4,"ngIf"],["class","kbd",4,"ngIf"],["class","dash-no-results",4,"ngIf"],[1,"dash-sections"],["class","dash-section",3,"dash-section--top",4,"ngFor","ngForOf"],["type","button","aria-label","Clear search",1,"dash-search__clear",3,"click"],[1,"fas","fa-times"],[1,"kbd"],[1,"kbd-cmd"],[1,"dash-no-results"],[1,"dash-section"],[1,"dash-section__title"],[1,"dash-section__ico"],[1,"dash-section__text"],[1,"dash-section__rule"],[1,"icon-row"],["href","javascript:","class","dash-tile-link",3,"dash-tile-link--has-tip","click",4,"ngFor","ngForOf"],["href","javascript:",1,"dash-tile-link",3,"click"],[1,"icon-box"],["class","tile-badge",3,"tile-badge--deprecated",4,"ngIf"],["alt","",3,"src","class",4,"ngIf"],[3,"class",4,"ngIf"],["class","tile-label",4,"ngIf"],["class","tile-tooltip","role","tooltip",4,"ngIf"],[1,"tile-badge"],["alt","",3,"src"],[1,"tile-label"],["role","tooltip",1,"tile-tooltip"]],template:function(o,i){1&o&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"i",2),t.TgZ(3,"input",3,4),t.NdJ("ngModelChange",function(r){return i.query=r})("ngModelChange",function(){return i.applyFilter()}),t.qZA(),t.YNc(5,P,2,0,"button",5),t.YNc(6,w,4,0,"span",6),t.qZA(),t.YNc(7,k,2,1,"div",7),t.TgZ(8,"div",8),t.YNc(9,G,9,6,"section",9),t.qZA()()),2&o&&(t.xp6(3),t.Q6J("ngModel",i.query),t.xp6(2),t.Q6J("ngIf",i.query),t.xp6(1),t.Q6J("ngIf",!i.query),t.xp6(1),t.Q6J("ngIf",i.noResults),t.xp6(2),t.Q6J("ngForOf",i.filteredSections))},dependencies:[g.Fj,g.JJ,g.On,p.sg,p.O5],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block}.dash-wrap[_ngcontent-%COMP%]{height:calc(100vh - 44px);overflow:auto;padding:2.25rem 3rem}.dash-search[_ngcontent-%COMP%]{display:flex;align-items:center;gap:11px;width:100%;max-width:520px;margin:0 0 2.5rem;padding:11px 14px;border-radius:10px;border:1px solid rgba(97,175,239,.28);background:rgba(20,28,41,.7);box-shadow:inset 0 1px #ffffff0d,0 2px 10px #00000040;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}.dash-search[_ngcontent-%COMP%]:focus-within{border-color:#61afef99;box-shadow:inset 0 1px #ffffff0f,0 0 0 3px #61afef26}.dash-search__icon[_ngcontent-%COMP%]{color:#5aa9f2;font-size:15px}.dash-search__input[_ngcontent-%COMP%]{flex:1;border:none;outline:none;background:transparent;color:#eef3fa;font-size:14px;line-height:1.4;padding:0;margin:0}.dash-search__input[_ngcontent-%COMP%]::placeholder{color:#7e90a8}.dash-search__clear[_ngcontent-%COMP%]{border:none;background:transparent;color:#9fb3cc;cursor:pointer;font-size:14px;padding:0 2px;line-height:1}.dash-search__clear[_ngcontent-%COMP%]:hover{color:#eef3fa}.dash-no-results[_ngcontent-%COMP%]{margin:-1.5rem 0 1.5rem;color:#9fb3cc;font-style:italic}.kbd[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:2px;font-size:11px;line-height:1;color:#9fb3cc;border:1px solid rgba(159,179,204,.35);border-radius:5px;padding:3px 6px;background:rgba(255,255,255,.03);white-space:nowrap}.kbd[_ngcontent-%COMP%] + .kbd[_ngcontent-%COMP%]{margin-left:4px}.kbd[_ngcontent-%COMP%] .kbd-cmd[_ngcontent-%COMP%]{font-size:12px}.dash-sections[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;-moz-column-gap:3rem;column-gap:3rem}.dash-section[_ngcontent-%COMP%]{margin-bottom:2.25rem;flex:1 1 100%}.dash-section.dash-section--top[_ngcontent-%COMP%]{flex:0 0 auto}.dash-section.dash-section--top[_ngcontent-%COMP%] .icon-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.dash-section__title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin:0 0 .85rem;font-weight:600;font-size:.9rem!important;letter-spacing:.02em;text-transform:none;text-shadow:none}.dash-section__ico[_ngcontent-%COMP%]{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;font-size:.82rem;color:#61afef;opacity:.95}.dash-section__ico[_ngcontent-%COMP%] > i[_ngcontent-%COMP%]{margin:0}.dash-section__text[_ngcontent-%COMP%]{background-image:linear-gradient(90deg,#8cc6ff 0%,#6fdcaa 100%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.dash-section__rule[_ngcontent-%COMP%]{flex:1 1 auto;height:1px;max-width:120px;background-image:linear-gradient(90deg,rgba(97,175,239,.4) 0%,rgba(0,137,63,.18) 55%,rgba(0,137,63,0) 100%)}.icon-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,124px);gap:16px}.dash-tile-link[_ngcontent-%COMP%]{text-decoration:none;display:block}.dash-tile-link--has-tip[_ngcontent-%COMP%]{position:relative}.tile-tooltip[_ngcontent-%COMP%]{position:absolute;bottom:calc(100% + 9px);left:50%;transform:translate(-50%) translateY(4px);z-index:20;width:max-content;max-width:220px;padding:8px 11px;font-size:12px;line-height:1.4;font-weight:500;text-align:center;color:#eef3fa;background:#1b2638;border:1px solid rgba(97,175,239,.3);border-radius:8px;box-shadow:0 8px 24px #00000073;opacity:0;pointer-events:none;transition:opacity .15s ease,transform .15s ease}.tile-tooltip[_ngcontent-%COMP%]:after{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);border:6px solid transparent;border-top-color:#1b2638}.dash-tile-link--has-tip[_ngcontent-%COMP%]:hover .tile-tooltip[_ngcontent-%COMP%]{opacity:1;transform:translate(-50%) translateY(0)}.icon-box[_ngcontent-%COMP%]{position:relative;overflow:hidden;box-sizing:border-box;width:124px;height:132px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:14px 10px;border:1px solid rgba(97,175,239,.22);border-radius:14px;background:linear-gradient(160deg,rgba(28,42,61,.55) 0%,rgba(20,28,41,.45) 100%);backdrop-filter:blur(14px) saturate(120%);-webkit-backdrop-filter:blur(14px) saturate(120%);box-shadow:inset 0 1px #ffffff1a,0 4px 16px #00000047;transition:transform .15s ease,box-shadow .15s ease,background .15s ease,border-color .15s ease}.icon-box[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:44px;width:auto;max-width:52px;object-fit:contain;flex-shrink:0}.icon-box[_ngcontent-%COMP%] img.icon-img--wide-md[_ngcontent-%COMP%]{max-width:58px}.icon-box[_ngcontent-%COMP%] img.icon-img--wide-lg[_ngcontent-%COMP%]{max-width:64px}.icon-box[_ngcontent-%COMP%] img.icon-img--wide-xl[_ngcontent-%COMP%]{height:40px;max-width:70px}.icon-box.icon-box--logo-only[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:50px;width:auto;max-width:78px}.icon-box[_ngcontent-%COMP%] .tile-badge[_ngcontent-%COMP%]{position:absolute;top:10px;left:-30px;width:96px;transform:rotate(-45deg);text-align:center;padding:2px 0;font-size:9px;font-weight:700;line-height:1.3;letter-spacing:.6px;text-transform:uppercase;color:#fff;background:linear-gradient(135deg,#0C53A4 0%,#00893F 100%);box-shadow:0 1px 4px #00000059}.icon-box[_ngcontent-%COMP%] .tile-badge--deprecated[_ngcontent-%COMP%]{top:20px;left:-20px;font-size:7.5px;letter-spacing:.2px;color:#e6ebf2;background:linear-gradient(135deg,#5a6675 0%,#3a4453 100%)}.icon-box[_ngcontent-%COMP%] .tile-label[_ngcontent-%COMP%]{width:100%;font-size:13px;line-height:1.3;font-weight:600;margin:0;text-align:center;color:#eef3fa;text-shadow:0 1px 2px rgba(0,0,0,.45);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:break-word;word-break:normal}.icon-box[_ngcontent-%COMP%]:hover{transform:translateY(-2px);background:linear-gradient(160deg,rgba(74,151,232,.3) 0%,rgba(40,152,110,.22) 100%);border-color:#61afef80;box-shadow:inset 0 1px #ffffff24,0 10px 26px #0c53a452,0 2px 10px #00893f2e}.icon-box[_ngcontent-%COMP%]:hover .dash-tile-icon[_ngcontent-%COMP%]{filter:brightness(1.15) drop-shadow(0 0 8px rgba(97,175,239,.65)) drop-shadow(0 0 16px rgba(0,137,63,.4))}.icon-box[_ngcontent-%COMP%]:hover .dash-tile-icon--no-glow[_ngcontent-%COMP%]{filter:none}.dash-tile-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;font-size:40px;line-height:1;height:44px;flex-shrink:0;background:linear-gradient(135deg,#61AFEF 0%,#3D9FC0 50%,#3DBE79 100%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent;filter:drop-shadow(0 0 5px rgba(97,175,239,.35)) drop-shadow(0 0 10px rgba(0,137,63,.2));transition:filter .15s ease}.dash-tile-icon--no-glow[_ngcontent-%COMP%]{filter:none}html.LIGHT[_nghost-%COMP%] .dash-search[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .dash-search[_ngcontent-%COMP%]{background:rgba(255,255,255,.85);border-color:#0c53a440;box-shadow:0 1px 3px #0c1e3c14}html.LIGHT[_nghost-%COMP%] .dash-search[_ngcontent-%COMP%]:focus-within, html.LIGHT [_nghost-%COMP%] .dash-search[_ngcontent-%COMP%]:focus-within{border-color:#0c53a480;box-shadow:0 0 0 3px #0c53a41f}html.LIGHT[_nghost-%COMP%] .dash-search__input[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .dash-search__input[_ngcontent-%COMP%]{color:#1b2330}html.LIGHT[_nghost-%COMP%] .dash-search__input[_ngcontent-%COMP%]::placeholder, html.LIGHT [_nghost-%COMP%] .dash-search__input[_ngcontent-%COMP%]::placeholder{color:#8a98ab}html.LIGHT[_nghost-%COMP%] .dash-search__icon[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .dash-search__icon[_ngcontent-%COMP%]{color:#0c53a4}html.LIGHT[_nghost-%COMP%] .dash-search__clear[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .dash-search__clear[_ngcontent-%COMP%]{color:#7a8694}html.LIGHT[_nghost-%COMP%] .dash-search__clear[_ngcontent-%COMP%]:hover, html.LIGHT [_nghost-%COMP%] .dash-search__clear[_ngcontent-%COMP%]:hover{color:#1b2330}html.LIGHT[_nghost-%COMP%] .dash-no-results[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .dash-no-results[_ngcontent-%COMP%]{color:#7a8694}html.LIGHT[_nghost-%COMP%] .tile-tooltip[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .tile-tooltip[_ngcontent-%COMP%]{color:#1b2330;background:#ffffff;border-color:#0c53a440;box-shadow:0 8px 24px #0c1e3c2e}html.LIGHT[_nghost-%COMP%] .tile-tooltip[_ngcontent-%COMP%]:after, html.LIGHT [_nghost-%COMP%] .tile-tooltip[_ngcontent-%COMP%]:after{border-top-color:#fff}html.LIGHT[_nghost-%COMP%] .kbd[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .kbd[_ngcontent-%COMP%]{color:#5a6a82;border-color:#0c53a440;background:rgba(12,83,164,.04)}html.LIGHT[_nghost-%COMP%] .dash-section__title[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .dash-section__title[_ngcontent-%COMP%]{text-shadow:none}html.LIGHT[_nghost-%COMP%] .dash-section__ico[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .dash-section__ico[_ngcontent-%COMP%]{color:#0c53a4}html.LIGHT[_nghost-%COMP%] .dash-section__text[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .dash-section__text[_ngcontent-%COMP%]{background-image:linear-gradient(90deg,#0C53A4 0%,#00893F 100%)}html.LIGHT[_nghost-%COMP%] .dash-section__rule[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .dash-section__rule[_ngcontent-%COMP%]{background-image:linear-gradient(90deg,rgba(12,83,164,.45) 0%,rgba(0,137,63,.25) 60%,rgba(0,137,63,0) 100%)}html.LIGHT[_nghost-%COMP%] .icon-box[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .icon-box[_ngcontent-%COMP%]{background:linear-gradient(160deg,rgba(255,255,255,.48) 0%,rgba(243,247,252,.4) 100%);border-color:#0c53a42e;box-shadow:inset 0 1px #fffc,0 2px 10px #0c1e3c0f}html.LIGHT[_nghost-%COMP%] .icon-box[_ngcontent-%COMP%] .tile-label[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .icon-box[_ngcontent-%COMP%] .tile-label[_ngcontent-%COMP%]{color:#29333f;text-shadow:none}html.LIGHT[_nghost-%COMP%] .icon-box[_ngcontent-%COMP%]:hover, html.LIGHT [_nghost-%COMP%] .icon-box[_ngcontent-%COMP%]:hover{background:linear-gradient(160deg,rgba(12,83,164,.16) 0%,rgba(0,137,63,.12) 100%);border-color:#0c53a466;box-shadow:inset 0 1px #ffffffb3,0 8px 20px #0c53a429,0 2px 10px #00893f1a}html.LIGHT[_nghost-%COMP%] .dash-tile-icon[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .dash-tile-icon[_ngcontent-%COMP%]{background:linear-gradient(135deg,#0C53A4 0%,#0a6a5f 50%,#00893F 100%);-webkit-background-clip:text;background-clip:text;filter:drop-shadow(0 0 3px rgba(12,83,164,.18))}']})}return n})(),canActivate:[f.P]}];let Z=(()=>{class n{static \u0275fac=function(o){return new(o||n)};static \u0275mod=t.oAB({type:n});static \u0275inj=t.cJS({imports:[d.Bz.forChild(L),_.u]})}return n})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[5421],{45421:(ce,g,r)=>{r.r(g),r.d(g,{ProcessInitializersM:()=>q});var h=r(77664),w=r(17017),y=r(63726),e=r(94946),a=r(15861),c=r(6990),d=r(33157),u=r(90328),f=r(56212),v=r(51162),Z=r(45085),T=r(60921),x=r(62694),_=r(77240),I=r(99961),D=r(92189),A=r(95852),C=r(27414),R=r(32915),E=r(33835),L=r(53429),z=r(85219),U=r(96814),m=r(95431),M=r(97680),k=r(33259),Y=r(34491),F=r(44879);const N=["processInitializersFormC"];function J(n,l){if(1&n){const t=e.EpF();e.TgZ(0,"span",17),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.edit())}),e._UZ(1,"i",18),e.qZA()}}function Q(n,l){if(1&n){const t=e.EpF();e.TgZ(0,"span",19),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.clone())}),e._UZ(1,"i",20),e.qZA()}}function O(n,l){if(1&n){const t=e.EpF();e.TgZ(0,"span",21),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.removePermanentDialog())}),e._UZ(1,"i",22),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("pTooltip",t.selectedRows.length>1?"Permanent Delete ("+t.selectedRows.length+" selected)":"Permanent Delete")}}function b(n,l){1&n&&(e.TgZ(0,"th",26),e._UZ(1,"p-tableHeaderCheckbox"),e.qZA())}function G(n,l){if(1&n&&(e.TgZ(0,"tr"),e.YNc(1,b,2,0,"th",23),e._UZ(2,"th",24),e.TgZ(3,"th",25),e._uU(4,"Order"),e.qZA(),e.TgZ(5,"th"),e._uU(6,"Name"),e.qZA(),e._UZ(7,"th",25),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.showCheckbox)}}function B(n,l){if(1&n&&(e.TgZ(0,"td"),e._UZ(1,"p-tableCheckbox",33),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("value",t)("pSelectableRow",t)}}function H(n,l){1&n&&e._UZ(0,"i",34)}const K=function(){return["/api-info/api-testing/testing"]},$=function(n,l,t){return{at_category:n,at_user:l,at_api:t}};function W(n,l){if(1&n&&(e.TgZ(0,"tr",27),e.YNc(1,B,2,2,"td",28),e.TgZ(2,"td"),e.YNc(3,H,1,0,"i",29),e.qZA(),e.TgZ(4,"td"),e._uU(5),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td")(9,"div",30)(10,"a",31),e.NdJ("click",function(i){return i.stopPropagation()}),e._UZ(11,"i",32),e.qZA()()()()),2&n){const t=l.$implicit,i=e.oxw();e.Q6J("pSelectableRow",t),e.xp6(1),e.Q6J("ngIf",i.showCheckbox),e.xp6(2),e.Q6J("ngIf",t.isScriptExecutedCalculated),e.xp6(2),e.Oqu(t.order),e.xp6(2),e.Oqu(t.name),e.xp6(3),e.Q6J("routerLink",e.DdM(7,K))("queryParams",e.kEZ(8,$,i.EAPICategory.PROCESS_INITIALIZER,i.authCS.getUserId(),t._id))}}function j(n,l){1&n&&e._UZ(0,"p-progressSpinner",35)}let P=(()=>{class n{processInitializersS;generalS;notificationS;navigationCS;authCS;constantsS;eventCenterS;router;userS;instanceS;ns;cs;confirmationService;cd;showCheckbox=!0;loading={grid:!1};subscriptions=[];data={mode:u.D.ADD,eventChannel:new e.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;EUserType=T.d;gridKey=v.iH._id;EAPICategory=Z.R;selectedRows=[];processInitializersFormC;constructor(t,i,s,o,p,ee,te,ie,se,ne,re,oe,ae,le){this.processInitializersS=t,this.generalS=i,this.notificationS=s,this.navigationCS=o,this.authCS=p,this.constantsS=ee,this.eventCenterS=te,this.router=ie,this.userS=se,this.instanceS=ne,this.ns=re,this.cs=oe,this.confirmationService=ae,this.cd=le}ngOnInit(){var t=this;return(0,a.Z)(function*(){t.eventCenterS.processInitializers.selectedInitializer.next(void 0),yield t.loadGridData(),t.subscriptions.push(t.data.eventChannel.subscribe(function(){var i=(0,a.Z)(function*(s){(s.action===d.F.SAVED||s.action===d.F.UPDATED)&&(t.processInitializersFormC.hideModal(),yield t.loadGridData())});return function(s){return i.apply(this,arguments)}}())),t.generalS.setNewTitle("Process Initializers")})()}loadGridData(){var t=this;return(0,a.Z)(function*(){t.loading.grid=!0;const i={find:{user:t.authCS.getUserId(),active:!0},select:{name:1,label:1,active:1,user:1,order:1},sort:{order:1}};t.showAll&&delete i.find.active;const s=yield t.processInitializersS.query(i).toPromise();s&&(t.selectedRows=[],t.rows=s.data,t.rowsMap=c.keyBy(t.rows,v.iH._id));let o=t.navigationCS.getQueryParam(f.p.am_process_initializer);o&&!t.rowsMap[o]&&t.rows.length&&(o=t.rows[0]._id),t.rowsMap[o]?(t.selectedRows=[t.rowsMap[o]],yield t.fillData()):t.eventCenterS.processInitializers.selectedInitializer.next(void 0),t.loading.grid=!1,t.cd.detectChanges()})()}add(){this.data.formData={order:(c.max(c.map(this.rows,"order"))||0)+1},this.data.mode=u.D.ADD,this.data.eventChannel.emit({action:d.F.OPEN_FORM_IN_ADD_MODE,data:this.data.formData}),this.processInitializersFormC.showModal()}edit(){this.data.formData=this.rowsMap[c.map(this.selectedRows,"_id")[0]],this.data.mode=u.D.EDIT,this.data.eventChannel.emit({action:d.F.OPEN_FORM_IN_EDIT_MODE}),this.processInitializersFormC.showModal()}clone(){var t=this;return(0,a.Z)(function*(){try{if(!t.selectedRows[0]||!t.rowsMap[c.map(t.selectedRows,"_id")[0]])return;const i=t.rowsMap[c.map(t.selectedRows,"_id")[0]]._id,s=(yield t.processInitializersS.getById(i).toPromise()).data;delete s._id,delete s.guid,s.name=`${s.name}-clone`,s.order=(c.max(c.map(t.rows,"order"))||0)+1,(yield t.processInitializersS.post(s).toPromise()).success?(t.notificationS.showSuccess(t.constantsS.processInitializer.cloneSuccess),t.loadGridData()):t.notificationS.showSuccess(t.constantsS.processInitializer.cloneSuccess)}catch{t.notificationS.showError(t.constantsS.processInitializer.cloneError)}})()}removePermanentDialog(){var i,t=this;this.selectedRows.length>1?this.removePermanentBulkDialog():this.confirmationService.confirm({message:this.cs.processInitializer.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,a.Z)(function*(){yield t.removePermanent()}),function(){return i.apply(this,arguments)})})}removePermanent(){var t=this;return(0,a.Z)(function*(){t.selectedRows.length&&(yield t.hardDelete(t.selectedRows[0]._id),t.ns.showSuccess(t.cs.processInitializer.removePermanent),yield t.loadGridData())})()}removePermanentBulkDialog(){var i,t=this;this.selectedRows.length<2||this.confirmationService.confirm({message:this.cs.processInitializer.removePermanentBulkConfirm(this.selectedRows.length),header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,a.Z)(function*(){yield t.removePermanentBulk()}),function(){return i.apply(this,arguments)})})}removePermanentBulk(){var t=this;return(0,a.Z)(function*(){if(t.selectedRows.length<2)return;const i=t.selectedRows;try{const o=(yield Promise.all(i.map(p=>t.processInitializersS.permanentDelete(p._id).toPromise()))).filter(p=>!p.success).length;0===o?t.ns.showSuccess(t.cs.processInitializer.removePermanentBulk(i.length)):t.ns.showError(o<i.length?`${i.length-o} of ${i.length} process initializers removed. ${o} failed.`:t.cs.processInitializer.removePermanentBulkError)}catch{t.ns.showError(t.cs.processInitializer.removePermanentBulkError)}yield t.loadGridData()})()}hardDelete(t){var i=this;return(0,a.Z)(function*(){yield i.processInitializersS.permanentDelete(t).toPromise()})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.processInitializers.selectedInitializer.next(void 0)}resetThisUrl(){var t=this;return(0,a.Z)(function*(){t.eventCenterS.processInitializers.selectedInitializer.next(void 0),yield t.navigationCS.setQueryParam(f.p.am_process_initializer,null)})()}itemSelected(){var t=this;return(0,a.Z)(function*(){yield t.resetThisUrl(),setTimeout(t.fillData.bind(t))})()}fillData(){var t=this;return(0,a.Z)(function*(){if(!t.selectedRows.length)return yield t.navigationCS.setQueryParam(f.p.am_process_initializer,""),void t.eventCenterS.processInitializers.selectedInitializer.next(null);const i=t.selectedRows[0];i?(yield t.navigationCS.setQueryParam(f.p.am_process_initializer,i._id),t.eventCenterS.processInitializers.selectedInitializer.next(i)):yield t.resetThisUrl()})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickProcessInitializer(){this.selectedRows.length&&this.edit()}static \u0275fac=function(i){return new(i||n)(e.Y36(x.e),e.Y36(_.b),e.Y36(I.W),e.Y36(D.S),e.Y36(A.D),e.Y36(C.L),e.Y36(R.u),e.Y36(h.F0),e.Y36(E.K),e.Y36(L.E),e.Y36(I.W),e.Y36(C.L),e.Y36(z.YP),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:n,selectors:[["app-process-initializers-list"]],viewQuery:function(i,s){if(1&i&&e.Gf(N,5),2&i){let o;e.iGM(o=e.CRH())&&(s.processInitializersFormC=o.first)}},inputs:{showCheckbox:"showCheckbox"},decls:21,vars:17,consts:[[1,"card","shadow-sm","h-100"],["pTooltip","",1,"card-header"],["alt","Process Initializer",1,"fa-fw","mr-1",2,"width","27px",3,"src"],["href","https://docs.apimaker.dev/v1/docs/features/process-initializers.html","target","_blank"],[1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px",3,"src"],["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",3,"pTooltip","click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 82px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"data"],["processInitializersFormC",""],["tooltipPosition","left","pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["tooltipPosition","left","pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-warning","fa-fw"],["tooltipPosition","left",1,"float-right","cursor-pointer","ml-3",3,"pTooltip","click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],["style","width: 45px;",4,"ngIf"],[2,"width","30px"],[2,"width","70px"],[2,"width","45px"],[3,"pSelectableRow"],[4,"ngIf"],["pTooltip","Script Executed","class","fas fa-solid fa-check fa-fw align-middle text-success text-v-small pr-1",4,"ngIf"],[1,"text-center"],["href","javascript:","pTooltip","Test API","tooltipPosition","left",1,"btn","btn-xsm-custom","mr-3",3,"routerLink","queryParams","click"],[1,"fas","fa-vial","text-info","fa-fw","test-tube","pt-1"],[3,"value","pSelectableRow"],["pTooltip","Script Executed",1,"fas","fa-solid","fa-check","fa-fw","align-middle","text-success","text-v-small","pr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,s){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"img",2),e.ALo(4,"themeIcon"),e._uU(5," Process Initializer"),e.qZA(),e.TgZ(6,"a",3),e._UZ(7,"img",4),e.ALo(8,"themeIcon"),e.qZA(),e.TgZ(9,"span",5),e.NdJ("click",function(){return s.add()}),e._UZ(10,"i",6),e.qZA(),e.YNc(11,J,2,0,"span",7),e.YNc(12,Q,2,0,"span",8),e.YNc(13,O,2,1,"span",9),e.qZA(),e.TgZ(14,"div",10)(15,"p-table",11),e.NdJ("selectionChange",function(p){return s.selectedRows=p})("selectionChange",function(){return s.itemSelected()})("dblclick",function(){return s.dblClickProcessInitializer()}),e.YNc(16,G,8,1,"ng-template",12),e.YNc(17,W,12,12,"ng-template",13),e.qZA(),e.YNc(18,j,1,0,"p-progressSpinner",14),e.qZA()(),e._UZ(19,"app-process-initializers-form",15,16)),2&i&&(e.xp6(3),e.Q6J("src",e.lcZ(4,13,"/assets/images/icons/process_initializers.svg"),e.LSH),e.xp6(4),e.Q6J("src",e.lcZ(8,15,"/assets/images/logo/logo_docs.svg"),e.LSH),e.xp6(4),e.Q6J("ngIf",s.selectedRows.length&&s.selectedRows.length<2),e.xp6(1),e.Q6J("ngIf",s.selectedRows.length&&s.selectedRows.length<2),e.xp6(1),e.Q6J("ngIf",s.selectedRows.length),e.xp6(2),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",s.selectedRows)("dataKey",s.gridKey)("scrollable",!0)("value",s.rows),e.xp6(3),e.Q6J("ngIf",s.loading.grid),e.xp6(1),e.Q6J("data",s.data))},dependencies:[h.rH,U.O5,m.iA,z.jx,m.Ei,m.UA,m.Mo,M.G,k.u,Y.g,F.w],encapsulation:2,changeDetection:0})}return n})(),S=(()=>{class n{constructor(){}ngOnInit(){}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.Xpm({type:n,selectors:[["app-process-initializers-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1","overflow-auto"]],template:function(i,s){1&i&&(e.TgZ(0,"div",0),e._UZ(1,"app-process-initializers-list"),e.qZA())},dependencies:[P],encapsulation:2})}return n})();var X=r(56236);const V=[{path:"main",component:S,canActivate:[y.P]}];let q=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=e.oAB({type:n});static \u0275inj=e.cJS({imports:[h.Bz.forChild(V),w.u,X.e]})}return n})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[5434],{27572:(v,p,r)=>{r.d(p,{Z:()=>l});var l=function(E){return E.DB_TOKEN_GENERATOR="DB_TOKEN_GENERATOR",E.CUSTOM_TOKEN_GENERATOR="CUSTOM_TOKEN_GENERATOR",E.AWS="AWS",E.GOOGLE="GOOGLE",E.AZURE="AZURE",E}(l||{})},27104:(v,p,r)=>{r.d(p,{s:()=>J});var l=r(15861),E=r(91601),u=r(33157),d=r(90328),c=r(27572),D=r(51162),O=r(20553),m=r(45085),e=r(94946),M=r(99961),g=r(99150),C=r(77240),I=r(53429),G=r(95852),P=r(45809),A=r(96814),S=r(32660),F=r(756),B=r(97680),h=r(14844),R=r(25025);const U=["monacoEditorModalC"];function Z(n,i){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",22),e._uU(2," Add Custom Token Generator"),e.qZA())}function y(n,i){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",23),e._uU(2," View Custom Token Generator"),e.qZA())}function k(n,i){if(1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",24),e._uU(2," Edit Custom Token Generator "),e.TgZ(3,"span",25),e._uU(4),e.qZA()()),2&n){const o=e.oxw();e.xp6(4),e.Oqu((null==o.updateObj?null:o.updateObj.name)||"")}}function b(n,i){if(1&n){const o=e.EpF();e.TgZ(0,"div",26)(1,"app-monaco-editor",27),e.NdJ("editorGenerated",function(a){e.CHM(o);const s=e.oxw();return e.KtG(s.editorGeneratedBasicInfo(a))}),e.qZA()()}if(2&n){const o=e.oxw();e.xp6(1),e.Q6J("isSchemaEditor",!0)("editorOptions",o.editorOptions)}}function x(n,i){if(1&n){const o=e.EpF();e.TgZ(0,"div",26)(1,"app-monaco-editor",27),e.NdJ("editorGenerated",function(a){e.CHM(o);const s=e.oxw();return e.KtG(s.editorGeneratedTokenGenerator(a))}),e.qZA()()}if(2&n){const o=e.oxw();e.xp6(1),e.Q6J("isSchemaEditor",!0)("editorOptions",o.editorOptions)}}function N(n,i){if(1&n){const o=e.EpF();e.TgZ(0,"div",26)(1,"app-monaco-editor",27),e.NdJ("editorGenerated",function(a){e.CHM(o);const s=e.oxw();return e.KtG(s.editorGeneratedTokenValidator(a))}),e.qZA()()}if(2&n){const o=e.oxw();e.xp6(1),e.Q6J("isSchemaEditor",!0)("editorOptions",o.editorOptions)}}function K(n,i){if(1&n){const o=e.EpF();e.TgZ(0,"a",28),e.NdJ("click",function(){e.CHM(o);const a=e.oxw();return e.KtG(a.viewError())}),e._UZ(1,"i",29),e._uU(2,"View error "),e.qZA()}}function W(n,i){1&n&&(e.TgZ(0,"span"),e._uU(1,"Save"),e.qZA())}function L(n,i){1&n&&(e.TgZ(0,"span"),e._uU(1,"Update"),e.qZA())}function w(n,i){if(1&n){const o=e.EpF();e.TgZ(0,"button",30),e.NdJ("click",function(){e.CHM(o);const a=e.oxw();return e.KtG(a.save())}),e._UZ(1,"i",31),e.YNc(2,W,2,0,"span",4),e.YNc(3,L,2,0,"span",4),e.qZA()}if(2&n){const o=e.oxw();e.xp6(2),e.Q6J("ngIf",o.data.mode===o.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",o.data.mode===o.EFormMode.EDIT)}}function V(n,i){1&n&&e._UZ(0,"p-progressSpinner",32)}let J=(()=>{class n{ns;dbTokenGeneratorS;generalS;generalCS;instanceS;authCS;monacoS;data;loading={form:!1};EFormMode=d.D;subscriptions=[];editorBasicInfo;editorTokenGenerator;editorTokenValidator;editorOptions={readOnly:!1,language:"typescript",contextmenu:!0};editorOptionsMonacoEditorModal={readOnly:!0,language:"json",contextmenu:!0};viewErrorModalC;updateObj;lastError;BE_HOST_PORT=O.N.BE_HOST_PORT;shouldLoadMonacoEditor=!1;constructor(o,t,a,s,f,_,T){this.ns=o,this.dbTokenGeneratorS=t,this.generalS=a,this.generalCS=s,this.instanceS=f,this.authCS=_,this.monacoS=T}ngOnInit(){var o=this;this.subscriptions.push(this.data.eventChannel.subscribe(function(){var t=(0,l.Z)(function*(a){if(a&&(!o.data.formData?.generatorType||o.data.formData.generatorType===c.Z.CUSTOM_TOKEN_GENERATOR))if(a.action===u.F.OPEN_FORM_IN_EDIT_MODE||a.action===u.F.OPEN_FORM_IN_VIEW_MODE){const f=`${o.data.formData.guid}:${o.authCS.gUser._id}`,_=yield o.dbTokenGeneratorS.getById(f).toPromise();o.updateObj=_.data,o.generalCS.setValueInEditor(o,"editorBasicInfo",_.data?.dbTokenGeneratorCode||""),o.generalCS.setValueInEditor(o,"editorTokenGenerator",_.data?.customTokenGeneratorFunCode||""),o.generalCS.setValueInEditor(o,"editorTokenValidator",_.data?.customTokenValidatorFunCode||""),yield o.monacoS.loadTypesInMonaco(o.BE_HOST_PORT,o.authCS.getUserId(),{})}else if(a.action===u.F.OPEN_FORM_IN_ADD_MODE){const[s,f,_]=yield Promise.all([o.instanceS.getDefaultContent(o.BE_HOST_PORT,m.R.CUSTOM_TOKEN_GENERATOR_BASIC_INFO_JSON).toPromise(),o.instanceS.getDefaultContent(o.BE_HOST_PORT,m.R.CUSTOM_TOKEN_GENERATOR_FUN).toPromise(),o.instanceS.getDefaultContent(o.BE_HOST_PORT,m.R.CUSTOM_TOKEN_VALIDATOR_FUN).toPromise()]);o.generalCS.setValueInEditor(o,"editorBasicInfo",s.data),o.generalCS.setValueInEditor(o,"editorTokenGenerator",f.data),o.generalCS.setValueInEditor(o,"editorTokenValidator",_.data),o.updateObj={}}});return function(a){return t.apply(this,arguments)}}()))}showModal(){this.lastError=void 0,this.shouldLoadMonacoEditor=!0,setTimeout(()=>{$("#idCustomTokenGeneratorForm").modal("show")},100)}hideModal(){$("#idCustomTokenGeneratorForm").modal("hide")}save(){var o=this;return(0,l.Z)(function*(){const t=Object.assign({},o.updateObj||{});t.user=o.authCS.getUserId(),t.generatorType=c.Z.CUSTOM_TOKEN_GENERATOR,t.dbTokenGeneratorCode=o.editorBasicInfo.getValue(),t.customTokenGeneratorFunCode=o.editorTokenGenerator.getValue(),t.customTokenValidatorFunCode=o.editorTokenValidator.getValue();try{let a;o.loading.form=!0,o.lastError=void 0,o.data.mode===d.D.ADD?a=yield o.dbTokenGeneratorS.post(t).toPromise():o.data.mode===d.D.EDIT&&(a=yield o.dbTokenGeneratorS.replace(t._id,t,{select:D.iH._id}).toPromise()),o.ns.showSuccess(o.data.mode===d.D.ADD?"Saved successfully.":"Updated successfully."),o.data.eventChannel.emit({action:o.data.mode===d.D.ADD?u.F.SAVED:u.F.UPDATED}),o.loading.form=!1}catch(a){const s=o.toFriendlyError(a);s?o.ns.showError(s):o.ns.showErrorMessageFromErrorObject(a),o.loading.form=!1,o.lastError=a.error}})()}toFriendlyError(o){const t=o?.error?.errors?.[0]?.message||o?.error?.message||o?.message||"";if(!t)return null;if(t.includes("E11000")&&t.includes("name_user_token_generators_i1")){const a=t.match(/name:\s*"([^"]+)"/),s=a?a[1]:"";return s?`A token generator named "${s}" already exists. Please choose a different name.`:"A token generator with this name already exists. Please choose a different name."}return t.includes("E11000")?"This record conflicts with an existing one (duplicate key).":null}viewError(){this.lastError&&this.viewErrorModalC.showModal(this.generalS.stringify(this.lastError),E.d.json)}editorGeneratedBasicInfo(o){var t=this;return(0,l.Z)(function*(){t.editorBasicInfo=o,yield t.monacoS.loadSchemaEditorSettings(t.BE_HOST_PORT,t.authCS.getUserId(),null),t.monacoS.addSaveCodeKeyBinding(o,a=>{t.data.mode!==d.D.VIEW&&t.save()})})()}editorGeneratedTokenGenerator(o){var t=this;return(0,l.Z)(function*(){t.editorTokenGenerator=o,yield t.monacoS.loadSchemaEditorSettings(t.BE_HOST_PORT,t.authCS.getUserId(),null),t.monacoS.addSaveCodeKeyBinding(o,a=>{t.data.mode!==d.D.VIEW&&t.save()})})()}editorGeneratedTokenValidator(o){var t=this;return(0,l.Z)(function*(){t.editorTokenValidator=o,yield t.monacoS.loadSchemaEditorSettings(t.BE_HOST_PORT,t.authCS.getUserId(),null),t.monacoS.addSaveCodeKeyBinding(o,a=>{t.data.mode!==d.D.VIEW&&t.save()})})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(t){return new(t||n)(e.Y36(M.W),e.Y36(g.T),e.Y36(C.b),e.Y36(C.b),e.Y36(I.E),e.Y36(G.D),e.Y36(P.b))};static \u0275cmp=e.Xpm({type:n,selectors:[["app-custom-token-generator-form"]],viewQuery:function(t,a){if(1&t&&e.Gf(U,5),2&t){let s;e.iGM(s=e.CRH())&&(a.viewErrorModalC=s.first)}},inputs:{data:"data"},decls:28,vars:12,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idCustomTokenGeneratorForm","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"],[1,"modal-body","overflow-auto"],["header","Basic Info"],["class","overflow-hidden","style","height: calc(100vh - 188px);",4,"ngIf"],["header","Token Generator"],["header","Token Validator"],[1,"modal-footer"],["href","javascript:;","class","text-danger mr-auto",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,"modalId","editorOptionsMonacoEditorModal","modalTitle"],["monacoEditorModalC",""],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],[1,"ml-2","font-weight-normal","small","text-muted"],[1,"overflow-hidden",2,"height","calc(100vh - 188px)"],[3,"isSchemaEditor","editorOptions","editorGenerated"],["href","javascript:;",1,"text-danger","mr-auto",3,"click"],[1,"fas","fa-exclamation-triangle","fa-fw","mr-1"],["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(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,Z,3,0,"span",4),e.YNc(5,y,3,0,"span",4),e.YNc(6,k,5,1,"span",4),e.TgZ(7,"div",5)(8,"button",6),e.NdJ("click",function(){return a.hideModal()}),e.TgZ(9,"span",7),e._UZ(10,"i",8),e.qZA()()()(),e.TgZ(11,"div",9)(12,"p-tabView")(13,"p-tabPanel",10),e.YNc(14,b,2,2,"div",11),e.qZA(),e.TgZ(15,"p-tabPanel",12),e.YNc(16,x,2,2,"div",11),e.qZA(),e.TgZ(17,"p-tabPanel",13),e.YNc(18,N,2,2,"div",11),e.qZA()()(),e.TgZ(19,"div",14),e.YNc(20,K,3,0,"a",15),e.TgZ(21,"button",16),e.NdJ("click",function(){return a.hideModal()}),e._UZ(22,"i",17),e._uU(23," Close"),e.qZA(),e.YNc(24,w,4,2,"button",18),e.qZA(),e.YNc(25,V,1,0,"p-progressSpinner",19),e.qZA()()(),e._UZ(26,"app-monaco-editor-modal",20,21)),2&t&&(e.xp6(4),e.Q6J("ngIf",a.data.mode===a.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",a.data.mode===a.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",a.data.mode===a.EFormMode.EDIT),e.xp6(8),e.Q6J("ngIf",a.shouldLoadMonacoEditor),e.xp6(2),e.Q6J("ngIf",a.shouldLoadMonacoEditor),e.xp6(2),e.Q6J("ngIf",a.shouldLoadMonacoEditor),e.xp6(2),e.Q6J("ngIf",a.lastError),e.xp6(4),e.Q6J("ngIf",a.data.mode!==a.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",a.loading.form),e.xp6(1),e.Q6J("modalId","idMonacoEditorModalInCustomTokenGenerator")("editorOptionsMonacoEditorModal",a.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[A.O5,S.y,F.O,B.G,h.xf,h.x4,R.A],encapsulation:2})}return n})()},81453:(v,p,r)=>{r.d(p,{a:()=>J});var l=r(15861),E=r(91601),u=r(33157),d=r(90328),c=r(27572),D=r(51162),O=r(20553),m=r(45085),e=r(94946),M=r(99961),g=r(99150),C=r(77240),I=r(53429),G=r(95852),P=r(45809),A=r(96814),S=r(32660),F=r(756),B=r(97680),h=r(14844),R=r(25025);const U=["monacoEditorModalC"];function Z(n,i){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",21),e._uU(2," Add DB Token Generator"),e.qZA())}function y(n,i){1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",22),e._uU(2," View DB Token Generator"),e.qZA())}function k(n,i){if(1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",23),e._uU(2," Edit DB Token Generator "),e.TgZ(3,"span",24),e._uU(4),e.qZA()()),2&n){const o=e.oxw();e.xp6(4),e.Oqu((null==o.updateObj?null:o.updateObj.name)||"")}}function b(n,i){if(1&n){const o=e.EpF();e.TgZ(0,"div",25)(1,"app-monaco-editor",26),e.NdJ("editorGenerated",function(a){e.CHM(o);const s=e.oxw();return e.KtG(s.editorGeneratedBasicInfo(a))}),e.qZA()()}if(2&n){const o=e.oxw();e.xp6(1),e.Q6J("isSchemaEditor",!0)("editorOptions",o.editorOptions)}}function x(n,i){if(1&n){const o=e.EpF();e.TgZ(0,"div",25)(1,"app-monaco-editor",26),e.NdJ("editorGenerated",function(a){e.CHM(o);const s=e.oxw(2);return e.KtG(s.editorGeneratedFieldsGenerator(a))}),e.qZA()()}if(2&n){const o=e.oxw(2);e.xp6(1),e.Q6J("isSchemaEditor",!0)("editorOptions",o.editorOptions)}}function N(n,i){if(1&n&&(e.TgZ(0,"p-tabPanel",27),e.YNc(1,x,2,2,"div",11),e.qZA()),2&n){const o=e.oxw();e.xp6(1),e.Q6J("ngIf",o.shouldLoadMonacoEditor)}}function K(n,i){if(1&n){const o=e.EpF();e.TgZ(0,"a",28),e.NdJ("click",function(){e.CHM(o);const a=e.oxw();return e.KtG(a.viewError())}),e._UZ(1,"i",29),e._uU(2,"View error "),e.qZA()}}function W(n,i){1&n&&(e.TgZ(0,"span"),e._uU(1,"Save"),e.qZA())}function L(n,i){1&n&&(e.TgZ(0,"span"),e._uU(1,"Update"),e.qZA())}function w(n,i){if(1&n){const o=e.EpF();e.TgZ(0,"button",30),e.NdJ("click",function(){e.CHM(o);const a=e.oxw();return e.KtG(a.save())}),e._UZ(1,"i",31),e.YNc(2,W,2,0,"span",4),e.YNc(3,L,2,0,"span",4),e.qZA()}if(2&n){const o=e.oxw();e.xp6(2),e.Q6J("ngIf",o.data.mode===o.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",o.data.mode===o.EFormMode.EDIT)}}function V(n,i){1&n&&e._UZ(0,"p-progressSpinner",32)}let J=(()=>{class n{ns;dbTokenGeneratorS;generalS;generalCS;instanceS;authCS;monacoS;data;loading={form:!1};EFormMode=d.D;subscriptions=[];editorBasicInfo;editorFieldsGenerator;editorOptions={readOnly:!1,language:"typescript",contextmenu:!0};editorOptionsMonacoEditorModal={readOnly:!0,language:"json",contextmenu:!0};viewErrorModalC;updateObj;lastError;BE_HOST_PORT=O.N.BE_HOST_PORT;shouldLoadMonacoEditor=!1;constructor(o,t,a,s,f,_,T){this.ns=o,this.dbTokenGeneratorS=t,this.generalS=a,this.generalCS=s,this.instanceS=f,this.authCS=_,this.monacoS=T}handledTypes=new Set([c.Z.DB_TOKEN_GENERATOR,c.Z.AWS,c.Z.AZURE,c.Z.GOOGLE]);showFieldsGeneratorTab(){const o=this.data?.formData?.generatorType;return!o||o===c.Z.DB_TOKEN_GENERATOR}ngOnInit(){var o=this;this.subscriptions.push(this.data.eventChannel.subscribe(function(){var t=(0,l.Z)(function*(a){if(a&&(!o.data.formData?.generatorType||o.handledTypes.has(o.data.formData.generatorType)))if(a.action===u.F.OPEN_FORM_IN_EDIT_MODE||a.action===u.F.OPEN_FORM_IN_VIEW_MODE){const f=`${o.data.formData.guid}:${o.authCS.gUser._id}`,_=yield o.dbTokenGeneratorS.getById(f).toPromise();o.updateObj=_.data,o.generalCS.setValueInEditor(o,"editorBasicInfo",_.data?.dbTokenGeneratorCode||""),o.generalCS.setValueInEditor(o,"editorFieldsGenerator",_.data?.fieldsGeneratorFunCode||""),yield o.monacoS.loadTypesInMonaco(o.BE_HOST_PORT,o.authCS.getUserId(),{})}else if(a.action===u.F.OPEN_FORM_IN_ADD_MODE){const s=o.getBasicInfoCategoryForType(o.data.formData?.generatorType),f=[o.instanceS.getDefaultContent(o.BE_HOST_PORT,s).toPromise()];o.showFieldsGeneratorTab()&&f.push(o.instanceS.getDefaultContent(o.BE_HOST_PORT,m.R.TOKEN_GENERATOR_FIELDS_GENERATOR).toPromise());const[_,T]=yield Promise.all(f);o.generalCS.setValueInEditor(o,"editorBasicInfo",_.data),T&&o.generalCS.setValueInEditor(o,"editorFieldsGenerator",T.data),o.updateObj={}}});return function(a){return t.apply(this,arguments)}}()))}showModal(){this.lastError=void 0,this.shouldLoadMonacoEditor=!0,setTimeout(()=>{$("#idDBTokenGeneratorForm").modal("show")},100)}getBasicInfoCategoryForType(o){return o===c.Z.AWS?m.R.AWS_TOKEN_GENERATOR_JSON:o===c.Z.AZURE?m.R.AZURE_TOKEN_GENERATOR_JSON:o===c.Z.GOOGLE?m.R.GOOGLE_TOKEN_GENERATOR_JSON:m.R.TOKEN_GENERATOR_JSON}hideModal(){$("#idDBTokenGeneratorForm").modal("hide")}save(){var o=this;return(0,l.Z)(function*(){const t=Object.assign({},o.updateObj||{});t.user=o.authCS.getUserId(),t.generatorType=o.data.formData?.generatorType||t.generatorType||c.Z.DB_TOKEN_GENERATOR,t.dbTokenGeneratorCode=o.editorBasicInfo.getValue(),o.showFieldsGeneratorTab()&&o.editorFieldsGenerator&&(t.fieldsGeneratorFunCode=o.editorFieldsGenerator.getValue());try{let a;o.loading.form=!0,o.lastError=void 0,o.data.mode===d.D.ADD?a=yield o.dbTokenGeneratorS.post(t).toPromise():o.data.mode===d.D.EDIT&&(a=yield o.dbTokenGeneratorS.replace(t._id,t,{select:D.iH._id}).toPromise()),o.ns.showSuccess(o.data.mode===d.D.ADD?"Saved successfully.":"Updated successfully."),o.data.eventChannel.emit({action:o.data.mode===d.D.ADD?u.F.SAVED:u.F.UPDATED}),o.loading.form=!1}catch(a){const s=o.toFriendlyError(a);s?o.ns.showError(s):o.ns.showErrorMessageFromErrorObject(a),o.loading.form=!1,o.lastError=a.error}})()}toFriendlyError(o){const t=o?.error?.errors?.[0]?.message||o?.error?.message||o?.message||"";if(!t)return null;if(t.includes("E11000")&&t.includes("name_user_token_generators_i1")){const a=t.match(/name:\s*"([^"]+)"/),s=a?a[1]:"";return s?`A DB Token Generator named "${s}" already exists. Please choose a different name.`:"A DB Token Generator with this name already exists. Please choose a different name."}return t.includes("E11000")?"This record conflicts with an existing one (duplicate key).":null}viewError(){this.lastError&&this.viewErrorModalC.showModal(this.generalS.stringify(this.lastError),E.d.json)}editorGeneratedBasicInfo(o){var t=this;return(0,l.Z)(function*(){t.editorBasicInfo=o,yield t.monacoS.loadSchemaEditorSettings(t.BE_HOST_PORT,t.authCS.getUserId(),null),t.monacoS.addSaveCodeKeyBinding(o,a=>{t.data.mode!==d.D.VIEW&&t.save()})})()}editorGeneratedFieldsGenerator(o){var t=this;return(0,l.Z)(function*(){t.editorFieldsGenerator=o,yield t.monacoS.loadSchemaEditorSettings(t.BE_HOST_PORT,t.authCS.getUserId(),null),t.monacoS.addSaveCodeKeyBinding(o,a=>{t.data.mode!==d.D.VIEW&&t.save()})})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(t){return new(t||n)(e.Y36(M.W),e.Y36(g.T),e.Y36(C.b),e.Y36(C.b),e.Y36(I.E),e.Y36(G.D),e.Y36(P.b))};static \u0275cmp=e.Xpm({type:n,selectors:[["app-db-token-generator-form"]],viewQuery:function(t,a){if(1&t&&e.Gf(U,5),2&t){let s;e.iGM(s=e.CRH())&&(a.viewErrorModalC=s.first)}},inputs:{data:"data"},decls:25,vars:11,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idDBTokenGeneratorForm","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"],[1,"modal-body","overflow-auto"],["header","Basic Info"],["class","overflow-hidden","style","height: calc(100vh - 188px);",4,"ngIf"],["header","Fields Generator",4,"ngIf"],[1,"modal-footer"],["href","javascript:;","class","text-danger mr-auto",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,"modalId","editorOptionsMonacoEditorModal","modalTitle"],["monacoEditorModalC",""],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],[1,"ml-2","font-weight-normal","small","text-muted"],[1,"overflow-hidden",2,"height","calc(100vh - 188px)"],[3,"isSchemaEditor","editorOptions","editorGenerated"],["header","Fields Generator"],["href","javascript:;",1,"text-danger","mr-auto",3,"click"],[1,"fas","fa-exclamation-triangle","fa-fw","mr-1"],["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(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,Z,3,0,"span",4),e.YNc(5,y,3,0,"span",4),e.YNc(6,k,5,1,"span",4),e.TgZ(7,"div",5)(8,"button",6),e.NdJ("click",function(){return a.hideModal()}),e.TgZ(9,"span",7),e._UZ(10,"i",8),e.qZA()()()(),e.TgZ(11,"div",9)(12,"p-tabView")(13,"p-tabPanel",10),e.YNc(14,b,2,2,"div",11),e.qZA(),e.YNc(15,N,2,1,"p-tabPanel",12),e.qZA()(),e.TgZ(16,"div",13),e.YNc(17,K,3,0,"a",14),e.TgZ(18,"button",15),e.NdJ("click",function(){return a.hideModal()}),e._UZ(19,"i",16),e._uU(20," Close"),e.qZA(),e.YNc(21,w,4,2,"button",17),e.qZA(),e.YNc(22,V,1,0,"p-progressSpinner",18),e.qZA()()(),e._UZ(23,"app-monaco-editor-modal",19,20)),2&t&&(e.xp6(4),e.Q6J("ngIf",a.data.mode===a.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",a.data.mode===a.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",a.data.mode===a.EFormMode.EDIT),e.xp6(8),e.Q6J("ngIf",a.shouldLoadMonacoEditor),e.xp6(1),e.Q6J("ngIf",a.showFieldsGeneratorTab()),e.xp6(2),e.Q6J("ngIf",a.lastError),e.xp6(4),e.Q6J("ngIf",a.data.mode!==a.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",a.loading.form),e.xp6(1),e.Q6J("modalId","idMonacoEditorModalInDBTokenGenerator")("editorOptionsMonacoEditorModal",a.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[A.O5,S.y,F.O,B.G,h.xf,h.x4,R.A],encapsulation:2})}return n})()},25434:(v,p,r)=>{r.d(p,{L:()=>O});var l=r(17017),E=r(44950),c=(r(27104),r(81453),r(94946));let O=(()=>{class m{static \u0275fac=function(g){return new(g||m)};static \u0275mod=c.oAB({type:m});static \u0275inj=c.cJS({imports:[l.u,E.A]})}return m})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[5679],{75679:(B,h,c)=>{c.r(h),c.d(h,{SecretManagementM:()=>W});var v=c(77664),P=c(63726),x=c(17017),O=c(44950),e=c(94946),i=c(15861),d=c(33157),g=c(90328),l=c(56212),S=c(6990),f=c(51162),b=c(60115),m=c(77240),T=c(99961),y=c(85219),I=c(92189),Z=c(95852),w=c(90204),G=c(25405),D=c(32915),H=c(27414),C=c(96814),L=c(97680),k=c(33259),F=c(44879);function A(r,p){1&r&&(e.TgZ(0,"div",12),e._UZ(1,"i",13),e.TgZ(2,"div"),e._uU(3,"No secrets yet. Use "),e._UZ(4,"i",14),e._uU(5," above to add one."),e.qZA()())}function U(r,p){1&r&&e._UZ(0,"i",33)}function E(r,p){if(1&r){const t=e.EpF();e.TgZ(0,"div",15),e.NdJ("click",function(){const a=e.CHM(t).$implicit,s=e.oxw();return e.KtG(s.secretSelected(a))})("dblclick",function(){const a=e.CHM(t).$implicit,s=e.oxw();return e.KtG(s.edit(a))}),e.TgZ(1,"div",16),e.NdJ("click",function(n){return n.stopPropagation()}),e.TgZ(2,"span",17),e.NdJ("click",function(){const a=e.CHM(t).$implicit,s=e.oxw();return e.KtG(s.edit(a))}),e._UZ(3,"i",18),e.qZA(),e.TgZ(4,"span",19),e.NdJ("click",function(){const a=e.CHM(t).$implicit,s=e.oxw();return e.KtG(s.clone(a))}),e._UZ(5,"i",20),e.qZA(),e.TgZ(6,"span",21),e.NdJ("click",function(){const a=e.CHM(t).$implicit,s=e.oxw();return e.KtG(s.removePermanentDialog(a))}),e._UZ(7,"i",22),e.qZA()(),e.TgZ(8,"div",23)(9,"span",24),e._UZ(10,"i",25),e.YNc(11,U,1,0,"i",26),e.qZA(),e.TgZ(12,"span",27),e._uU(13),e.qZA()(),e.TgZ(14,"div",28)(15,"span",29),e._uU(16,"ID"),e.qZA(),e.TgZ(17,"span",30),e._uU(18),e.qZA(),e.TgZ(19,"span",31),e.NdJ("click",function(n){const s=e.CHM(t).$implicit,_=e.oxw();return n.stopPropagation(),e.KtG(_.copyId(s))}),e._UZ(20,"i",32),e.qZA()()()}if(2&r){const t=p.$implicit,o=e.oxw();e.ekj("sec-card--selected",o.selectedId===t._id),e.xp6(9),e.ekj("sec-card__icon--default",t.isDefault),e.Q6J("pTooltip",t.isDefault?"Default secret":null),e.xp6(2),e.Q6J("ngIf",t.isDefault),e.xp6(1),e.Q6J("pTooltip",t.name),e.xp6(1),e.Oqu(t.name),e.xp6(4),e.Q6J("pTooltip",t._id),e.xp6(1),e.Oqu(t._id)}}function N(r,p){1&r&&e._UZ(0,"p-progressSpinner",34)}let u=(()=>{class r{secretS;generalCS;notificationS;confirmationService;navigationCS;authCS;constantsCS;eventCenterCS;eventCenterS;constantsS;cd;generalS;loading={grid:!1};subscriptions=[];rows=[];rowsMap={};showAll=!1;selectedId=null;gridKey=f.iH._id;constructor(t,o,n,a,s,_,J,Q,z,$,j,K){this.secretS=t,this.generalCS=o,this.notificationS=n,this.confirmationService=a,this.navigationCS=s,this.authCS=_,this.constantsCS=J,this.eventCenterCS=Q,this.eventCenterS=z,this.constantsS=$,this.cd=j,this.generalS=K}ngOnInit(){this.loadGridData(),this.subscriptions.push(this.eventCenterS.headerC.dataSecretForm.eventChannel.subscribe(t=>{(t.action===d.F.SAVED||t.action===d.F.UPDATED)&&(this.eventCenterS.headerC.secManFormC.hideModal(),this.loadGridData())})),this.generalS.setNewTitle("Secrets")}loadGridData(){var t=this;this.loading.grid=!0;const o={find:{user:this.authCS.getUserId(),active:!0},select:{name:1,active:1,isDefault:1},sort:{name:1}};this.showAll&&delete o.find.active,this.subscriptions.push(this.secretS.query(o).subscribe(function(){var n=(0,i.Z)(function*(a){a.success&&(t.rows=a.data,t.rowsMap=S.keyBy(t.rows,f.iH._id),t.selectedId&&!t.rowsMap[t.selectedId]&&(t.selectedId=null));const s=t.navigationCS.getQueryParam(l.p.secret);t.rowsMap[s]&&(t.selectedId=s,yield t.fillData()),t.generalS.setNewTitle("Secrets"),t.loading.grid=!1,t.cd.detectChanges()});return function(a){return n.apply(this,arguments)}}()))}add(){this.eventCenterS.headerC.dataSecretForm.formData=void 0,this.eventCenterS.headerC.dataSecretForm.mode=g.D.ADD,this.eventCenterS.headerC.dataSecretForm.eventChannel.emit({action:d.F.OPEN_FORM_IN_ADD_MODE}),this.eventCenterS.headerC.secManFormC.showModal()}view(t){this.eventCenterS.headerC.dataSecretForm.formData=t,this.eventCenterS.headerC.dataSecretForm.mode=g.D.VIEW,this.eventCenterS.headerC.dataSecretForm.eventChannel.emit({action:d.F.OPEN_FORM_IN_VIEW_MODE}),this.eventCenterS.headerC.secManFormC.showModal()}edit(t){this.eventCenterS.headerC.dataSecretForm.formData=t,this.eventCenterS.headerC.dataSecretForm.mode=g.D.EDIT,this.eventCenterS.headerC.dataSecretForm.eventChannel.emit({action:d.F.OPEN_FORM_IN_EDIT_MODE}),this.eventCenterS.headerC.secManFormC.showModal()}clone(t){var o=this;return(0,i.Z)(function*(){try{if(!t)return;const n=(yield o.secretS.getById(t._id).toPromise()).data;delete n._id,delete n.guid,delete n.isDefault,n.name=`${n.name}-clone`,(yield o.secretS.post(n).toPromise()).success?(o.notificationS.showSuccess(o.constantsS.secrets.cloneSuccess),o.loadGridData()):o.notificationS.showSuccess(o.constantsS.secrets.cloneSuccess)}catch{o.notificationS.showError(o.constantsS.secrets.cloneError)}})()}removePermanentDialog(t){var o=this;return(0,i.Z)(function*(){var n;o.confirmationService.confirm({message:o.constantsCS.secret.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(n=(0,i.Z)(function*(){yield o.removePermanent(t)}),function(){return n.apply(this,arguments)})})})()}removePermanent(t){var o=this;return(0,i.Z)(function*(){o.loading.grid=!0;try{(yield o.secretS.permanentDelete(t._id).toPromise()).success&&(o.notificationS.showSuccess(o.constantsCS.secret.removePermanent),o.selectedId===t._id&&(o.selectedId=null),o.loadGridData())}catch(n){o.notificationS.showErrorFromResponse(n.error,o.constantsCS.secret.removePermanentError)}o.loading.grid=!1})()}resetDependents(){var t=this;return(0,i.Z)(function*(){yield t.navigationCS.setQueryParam(l.p.secret,null)})()}secretSelected(t){var o=this;return(0,i.Z)(function*(){o.selectedId=o.selectedId===t._id?null:t._id,yield o.resetDependents(),yield o.fillData()})()}fillData(){var t=this;return(0,i.Z)(function*(){t.selectedId?yield t.navigationCS.setQueryParam(l.p.secret,t.selectedId):yield t.navigationCS.setQueryParam(l.p.secret,"")})()}copyId(t){try{navigator.clipboard.writeText(t._id),this.notificationS.showSuccess("Secret ID copied to clipboard.")}catch{this.notificationS.showError("Unable to copy Secret ID.")}}ngOnDestroy(){this.generalCS.unsubscribe(this.subscriptions)}static \u0275fac=function(o){return new(o||r)(e.Y36(b.e),e.Y36(m.b),e.Y36(T.W),e.Y36(y.YP),e.Y36(I.S),e.Y36(Z.D),e.Y36(w.s),e.Y36(G.M),e.Y36(D.u),e.Y36(H.L),e.Y36(e.sBO),e.Y36(m.b))};static \u0275cmp=e.Xpm({type:r,selectors:[["app-secret-man-w"]],decls:16,vars:9,consts:[[1,"card","shadow-sm",2,"height","calc(100vh - 50px)"],[1,"card-header"],["alt","Secret Management",1,"fa-fw","mr-1",3,"src"],["href","https://docs.apimaker.dev/v1/docs/secrets/secrets.html","target","_blank"],[1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px",3,"src"],["tooltipPosition","left","pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],[1,"card-body","p-0","h-100","overflow-hidden","position-relative"],["class","sec-empty",4,"ngIf"],[1,"sec-grid"],["class","sec-card",3,"sec-card--selected","click","dblclick",4,"ngFor","ngForOf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"sec-empty"],[1,"fas","fa-key","fa-fw","mb-2"],[1,"fas","fa-plus","text-success"],[1,"sec-card",3,"click","dblclick"],[1,"sec-card__actions",3,"click"],["pTooltip","Edit","tooltipPosition","top",1,"sec-card__act","sec-card__act--edit",3,"click"],[1,"fas","fa-pencil-alt","fa-fw"],["pTooltip","Clone","tooltipPosition","top",1,"sec-card__act","sec-card__act--clone",3,"click"],[1,"fas","fa-copy","fa-fw"],["pTooltip","Permanent Delete","tooltipPosition","top",1,"sec-card__act","sec-card__act--delete",3,"click"],[1,"far","fa-trash-alt","fa-fw"],[1,"sec-card__title"],["tooltipPosition","top",1,"sec-card__icon",3,"pTooltip"],[1,"fas","fa-key","fa-fw"],["class","fas fa-star sec-card__star",4,"ngIf"],["tooltipPosition","top",1,"sec-card__name",3,"pTooltip"],[1,"sec-card__id"],[1,"sec-card__id-label"],["tooltipPosition","bottom",1,"sec-card__id-value",3,"pTooltip"],["pTooltip","Copy ID","tooltipPosition","top",1,"sec-card__copy",3,"click"],[1,"far","fa-copy","fa-fw"],[1,"fas","fa-star","sec-card__star"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(o,n){1&o&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"img",2),e.ALo(4,"themeIcon"),e._uU(5," Secrets"),e.qZA(),e.TgZ(6,"a",3),e._UZ(7,"img",4),e.ALo(8,"themeIcon"),e.qZA(),e.TgZ(9,"span",5),e.NdJ("click",function(){return n.add()}),e._UZ(10,"i",6),e.qZA()(),e.TgZ(11,"div",7),e.YNc(12,A,6,0,"div",8),e.TgZ(13,"div",9),e.YNc(14,E,21,10,"div",10),e.qZA(),e.YNc(15,N,1,0,"p-progressSpinner",11),e.qZA()()),2&o&&(e.xp6(3),e.Q6J("src",e.lcZ(4,5,"/assets/images/icons/secret.svg"),e.LSH),e.xp6(4),e.Q6J("src",e.lcZ(8,7,"/assets/images/logo/logo_docs.svg"),e.LSH),e.xp6(5),e.Q6J("ngIf",!n.loading.grid&&!n.rows.length),e.xp6(2),e.Q6J("ngForOf",n.rows),e.xp6(1),e.Q6J("ngIf",n.loading.grid))},dependencies:[C.sg,C.O5,L.G,k.u,F.w],styles:['@charset "UTF-8";.sec-grid[_ngcontent-%COMP%]{height:100%;overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px;padding:14px;align-content:start}.sec-card[_ngcontent-%COMP%]{position:relative;background-color:#141c29;border:1px solid rgba(97,175,239,.18);border-radius:10px;padding:12px 14px;cursor:pointer;overflow:hidden;box-shadow:0 2px 10px #0003;transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease,background-color .15s ease}.sec-card[_ngcontent-%COMP%]:hover{border-color:#61afef73;box-shadow:0 6px 18px #0000004d;transform:translateY(-2px)}.sec-card--selected[_ngcontent-%COMP%]{border-color:#61afef;background-image:linear-gradient(90deg,rgba(12,83,164,.22) 0%,rgba(0,137,63,.14) 100%);box-shadow:0 0 0 1px #61afef8c,0 6px 18px #0000004d}.sec-card__title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding-right:76px;min-height:26px}.sec-card__icon[_ngcontent-%COMP%]{position:relative;flex:0 0 auto;width:26px;height:26px;display:inline-flex;align-items:center;justify-content:center;border-radius:7px;background-color:#61afef1f;color:#61afef;font-size:.82rem}.sec-card__icon--default[_ngcontent-%COMP%]{background-color:#e5c07b29;color:#e5c07b;box-shadow:0 0 0 1px #e5c07b66 inset}.sec-card__star[_ngcontent-%COMP%]{position:absolute;top:-5px;right:-5px;font-size:.52rem;color:#f0c000;background-color:#141c29;border-radius:50%;padding:2px;line-height:1;box-shadow:0 0 0 1px #f0c0008c}.sec-card__name[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;color:#eaf2fb;font-weight:600;letter-spacing:.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sec-card__id[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-top:10px;padding-top:8px;border-top:1px solid rgba(97,175,239,.1)}.sec-card__id-label[_ngcontent-%COMP%]{flex:0 0 auto;font-size:.62rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#8cc6ff;background-color:#61afef1a;border-radius:4px;padding:1px 6px}.sec-card__id-value[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:.76rem;color:#9fb3cc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sec-card__copy[_ngcontent-%COMP%]{flex:0 0 auto;cursor:pointer;color:#6f8095;font-size:.78rem;padding:2px;border-radius:5px;transition:color .12s ease,background-color .12s ease}.sec-card__copy[_ngcontent-%COMP%]:hover{color:#61afef;background-color:#61afef1f}.sec-card__actions[_ngcontent-%COMP%]{position:absolute;top:8px;right:8px;display:flex;gap:4px;opacity:0;transform:translateY(-2px);transition:opacity .12s ease,transform .12s ease}.sec-card[_ngcontent-%COMP%]:hover .sec-card__actions[_ngcontent-%COMP%], .sec-card--selected[_ngcontent-%COMP%] .sec-card__actions[_ngcontent-%COMP%]{opacity:1;transform:translateY(0)}.sec-card__act[_ngcontent-%COMP%]{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;border-radius:6px;cursor:pointer;font-size:.74rem;color:#9fb3cc;background-color:#0f1622b8;border:1px solid rgba(97,175,239,.18);transition:color .12s ease,background-color .12s ease,border-color .12s ease}.sec-card__act--edit[_ngcontent-%COMP%]:hover{color:#eaf2fb;border-color:#61afef8c;background-color:#0c53a466}.sec-card__act--clone[_ngcontent-%COMP%]:hover{color:#e5c07b;border-color:#e5c07b8c;background-color:#785a1459}.sec-card__act--delete[_ngcontent-%COMP%]:hover{color:#ff6b6b;border-color:#ff6b6b8c;background-color:#781e1e59}.sec-empty[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#6f8095;font-size:.9rem;padding:20px}.sec-empty[_ngcontent-%COMP%] i.fa-key[_ngcontent-%COMP%]{font-size:1.8rem;color:#61afef8c}html.LIGHT[_nghost-%COMP%] .sec-card[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .sec-card[_ngcontent-%COMP%]{background-color:#fff;border-color:#0c53a429;box-shadow:0 2px 10px #0c1e3c0f}html.LIGHT[_nghost-%COMP%] .sec-card[_ngcontent-%COMP%]:hover, html.LIGHT [_nghost-%COMP%] .sec-card[_ngcontent-%COMP%]:hover{border-color:#0c53a466;box-shadow:0 6px 18px #0c1e3c1f}html.LIGHT[_nghost-%COMP%] .sec-card--selected[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .sec-card--selected[_ngcontent-%COMP%]{border-color:#0c53a4;background-image:linear-gradient(90deg,rgba(12,83,164,.08) 0%,rgba(0,137,63,.05) 100%);box-shadow:0 0 0 1px #0c53a473,0 6px 18px #0c1e3c1f}html.LIGHT[_nghost-%COMP%] .sec-card__icon[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .sec-card__icon[_ngcontent-%COMP%]{background-color:#0c53a41a;color:#0c53a4}html.LIGHT[_nghost-%COMP%] .sec-card__name[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .sec-card__name[_ngcontent-%COMP%]{color:#14233a}html.LIGHT[_nghost-%COMP%] .sec-card__icon--default[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .sec-card__icon--default[_ngcontent-%COMP%]{background-color:#c98a0024;color:#c98a00;box-shadow:0 0 0 1px #c98a0066 inset}html.LIGHT[_nghost-%COMP%] .sec-card__star[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .sec-card__star[_ngcontent-%COMP%]{color:#c98a00;background-color:#fff;box-shadow:0 0 0 1px #c98a008c}html.LIGHT[_nghost-%COMP%] .sec-card__id[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .sec-card__id[_ngcontent-%COMP%]{border-top-color:#0c53a41a}html.LIGHT[_nghost-%COMP%] .sec-card__id-label[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .sec-card__id-label[_ngcontent-%COMP%]{color:#0c53a4;background-color:#0c53a414}html.LIGHT[_nghost-%COMP%] .sec-card__id-value[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .sec-card__id-value[_ngcontent-%COMP%]{color:#5a6a82}html.LIGHT[_nghost-%COMP%] .sec-card__copy[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .sec-card__copy[_ngcontent-%COMP%]{color:#8a99ad}html.LIGHT[_nghost-%COMP%] .sec-card__copy[_ngcontent-%COMP%]:hover, html.LIGHT [_nghost-%COMP%] .sec-card__copy[_ngcontent-%COMP%]:hover{color:#0c53a4;background-color:#0c53a41a}html.LIGHT[_nghost-%COMP%] .sec-card__act[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .sec-card__act[_ngcontent-%COMP%]{color:#5a6a82;background-color:#f4f7fbeb;border-color:#0c53a42e}html.LIGHT[_nghost-%COMP%] .sec-card__act--edit[_ngcontent-%COMP%]:hover, html.LIGHT [_nghost-%COMP%] .sec-card__act--edit[_ngcontent-%COMP%]:hover{color:#14233a;border-color:#0c53a48c;background-color:#0c53a41f}html.LIGHT[_nghost-%COMP%] .sec-card__act--clone[_ngcontent-%COMP%]:hover, html.LIGHT [_nghost-%COMP%] .sec-card__act--clone[_ngcontent-%COMP%]:hover{color:#c98a00;border-color:#c98a008c;background-color:#c98a001f}html.LIGHT[_nghost-%COMP%] .sec-card__act--delete[_ngcontent-%COMP%]:hover, html.LIGHT [_nghost-%COMP%] .sec-card__act--delete[_ngcontent-%COMP%]:hover{color:#d9363e;border-color:#d9363e8c;background-color:#d9363e1a}html.LIGHT[_nghost-%COMP%] .sec-empty[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .sec-empty[_ngcontent-%COMP%]{color:#8a99ad}html.LIGHT[_nghost-%COMP%] .sec-empty[_ngcontent-%COMP%] i.fa-key[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .sec-empty[_ngcontent-%COMP%] i.fa-key[_ngcontent-%COMP%]{color:#0c53a473}']})}return r})();const Y=[{path:"",component:(()=>{class r{constructor(){}ngOnInit(){}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=e.Xpm({type:r,selectors:[["app-sec-man-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1"]],template:function(o,n){1&o&&(e.TgZ(0,"div",0),e._UZ(1,"app-secret-man-w"),e.qZA())},dependencies:[u],encapsulation:2})}return r})(),canActivate:[P.P]}];let W=(()=>{class r{static \u0275fac=function(o){return new(o||r)};static \u0275mod=e.oAB({type:r});static \u0275inj=e.cJS({imports:[v.Bz.forChild(Y),x.u,O.A]})}return r})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[5761],{5761:(N,m,o)=>{o.r(m),o.d(m,{AutoIncrementM:()=>R});var f=o(77664),h=o(17017),v=o(63726),i=o(15861),Z=o(51162),A=o(6990),e=o(94946),T=o(99961),p=o(85219),I=o(27414),y=o(53429),C=o(77240),l=o(60095),b=o(96814),U=o(32660),u=o(95431),S=o(97680),w=o(33259),_=o(44879);function x(a,r){if(1&a){const t=e.EpF();e.TgZ(0,"span",36),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.edit())}),e._UZ(1,"i",37),e.qZA()}}function L(a,r){if(1&a){const t=e.EpF();e.TgZ(0,"span",38),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.removePermanentDialog())}),e._UZ(1,"i",39),e.qZA()}}function P(a,r){1&a&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Instance"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Database"),e.qZA(),e.TgZ(5,"th"),e._uU(6,"Collection"),e.qZA(),e.TgZ(7,"th"),e._uU(8,"Field Path"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"Last Generated Value"),e.qZA()())}function D(a,r){if(1&a&&(e.TgZ(0,"tr",40)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA()()),2&a){const t=r.$implicit;e.Q6J("pSelectableRow",t),e.xp6(2),e.Oqu(t.instance),e.xp6(2),e.Oqu(t.database),e.xp6(2),e.Oqu(t.collection),e.xp6(2),e.Oqu(t.field),e.xp6(2),e.Oqu(t.value)}}function J(a,r){1&a&&e._UZ(0,"p-progressSpinner",41)}function q(a,r){1&a&&e._UZ(0,"p-progressSpinner",41)}const M=[{path:"main",component:(()=>{class a{ns;confirmationService;constantsS;instanceS;cd;generalS;loading={grid:!1,form:!1};rows=[];rowsMap={};gridKey=Z.GR.id;idCounter=0;val;selectedRows=[];constructor(t,s,n,c,d,E){this.ns=t,this.confirmationService=s,this.constantsS=n,this.instanceS=c,this.cd=d,this.generalS=E}ngOnInit(){this.loadGridData(),this.generalS.setNewTitle("Auto Increments")}loadGridData(){var t=this;return(0,i.Z)(function*(){t.loading.grid=!0,t.selectedRows=[];const s=yield t.instanceS.getAllAutoIncrement().toPromise();t.rows=s.data,t.idCounter=0;for(const n of t.rows)n.id=t.idCounter++;t.rowsMap=A.keyBy(t.rows,t.gridKey),t.loading.grid=!1,t.cd.detectChanges()})()}edit(){var t=this;return(0,i.Z)(function*(){t.selectedRows.length&&($("#idEditIncrement").modal("show"),t.val=t.selectedRows[0].value)})()}removePermanentDialog(){var t=this;return(0,i.Z)(function*(){var s;t.confirmationService.confirm({message:t.constantsS.autoIncrement.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(s=(0,i.Z)(function*(){yield t.removePermanent()}),function(){return s.apply(this,arguments)})})})()}removePermanent(){var t=this;return(0,i.Z)(function*(){t.loading.grid=!0;const s=t.selectedRows[0],n=yield t.instanceS.deleteAutoIncrement(s).toPromise();t.loading.grid=!1,n.success?(t.ns.showSuccess(t.constantsS.autoIncrement.removePermanent),yield t.loadGridData()):t.ns.showErrorFromResponse(n,t.constantsS.autoIncrement.removePermanentError)})()}update(){var t=this;return(0,i.Z)(function*(){if(!t.val)return t.ns.showWarning("Please Provide Value");if(t.val<1)return t.ns.showWarning("Please Provide Positive Value");const s=t.selectedRows[0];s.value=t.val;try{t.loading.grid=!0,(yield t.instanceS.updateAutoIncrementKey(s).toPromise())&&(t.ns.showSuccess(t.constantsS.autoIncrement.editSuccess),yield t.loadGridData(),$("#idEditIncrement").modal("hide"),t.val=null),t.loading.grid=!1}catch(n){t.loading.grid=!1,t.ns.showErrorFromResponse(n.error||n,"Unable to update.")}t.cd.detectChanges()})()}static \u0275fac=function(s){return new(s||a)(e.Y36(T.W),e.Y36(p.YP),e.Y36(I.L),e.Y36(y.E),e.Y36(e.sBO),e.Y36(C.b))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-auto-increment-list"]],decls:62,vars:22,consts:[[1,"pt-1","pl-1","pr-1"],[1,"card","shadow-sm",2,"height","calc(100vh - 50px)"],[1,"card-header"],["alt","Auto Increments",1,"fa-fw","mr-1",3,"src"],["href","https://docs.apimaker.dev/v1/docs/features/auto-increment.html","target","_blank"],[1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px",3,"src"],["class","float-right cursor-pointer ml-3","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 94px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idEditIncrement","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body"],[1,"form-group","row","pt-4"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-6"],["min","1","name","val","spellcheck","false","type","number","placeholder","Value",1,"form-control","form-control-sm",3,"ngModel","ngModelChange"],[1,"mt-2",2,"line-height","1"],[1,"text-info","small","font-monospaced"],[1,"text-warning","small","font-monospaced"],[1,"small","font-monospaced"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"disabled","click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw","align-middle"],["pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],[3,"pSelectableRow"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(s,n){1&s&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"span"),e._UZ(4,"img",3),e.ALo(5,"themeIcon"),e._uU(6," Auto Increments"),e.qZA(),e.TgZ(7,"a",4),e._UZ(8,"img",5),e.ALo(9,"themeIcon"),e.qZA(),e.YNc(10,x,2,0,"span",6),e.YNc(11,L,2,0,"span",7),e.qZA(),e.TgZ(12,"div",8)(13,"p-table",9),e.NdJ("selectionChange",function(d){return n.selectedRows=d})("dblclick",function(){return n.edit()}),e.YNc(14,P,11,0,"ng-template",10),e.YNc(15,D,11,6,"ng-template",11),e.qZA(),e.YNc(16,J,1,0,"p-progressSpinner",12),e.qZA()()(),e.TgZ(17,"div",13)(18,"div",14)(19,"div",15)(20,"div",16)(21,"span"),e._UZ(22,"i",17),e._uU(23," Edit Auto Increment"),e.qZA(),e.TgZ(24,"div",18)(25,"button",19)(26,"span",20),e._UZ(27,"i",21),e.qZA()(),e.TgZ(28,"a",4),e._UZ(29,"img",5),e.ALo(30,"themeIcon"),e.qZA()()(),e.TgZ(31,"div",22)(32,"div",23)(33,"label",24),e._uU(34,"Value"),e.qZA(),e.TgZ(35,"div",25)(36,"input",26),e.NdJ("ngModelChange",function(d){return n.val=d}),e.qZA(),e.TgZ(37,"div",27)(38,"span",28),e._uU(39,"Next value will be maximum from below"),e.qZA(),e._UZ(40,"br"),e.TgZ(41,"span",29),e._uU(42),e.qZA(),e._UZ(43,"br"),e.TgZ(44,"span",30),e._uU(45,"or"),e.qZA(),e._UZ(46,"br"),e.TgZ(47,"span",29),e._uU(48,"\u{1f449} Max DB value + (step from schema || 1)"),e.qZA(),e._UZ(49,"br"),e.TgZ(50,"span",30),e._uU(51,"System will get max db value, when there is no entry available in this table."),e.qZA(),e._UZ(52,"br"),e.qZA()()()(),e.TgZ(53,"div",31)(54,"button",32),e._UZ(55,"i",33),e._uU(56," Close"),e.qZA(),e.TgZ(57,"button",34),e.NdJ("click",function(){return n.update()}),e._UZ(58,"i",35),e.TgZ(59,"span"),e._uU(60,"Update"),e.qZA()()(),e.YNc(61,q,1,0,"p-progressSpinner",12),e.qZA()()()),2&s&&(e.xp6(4),e.Q6J("src",e.lcZ(5,16,"/assets/images/icons/increment.svg"),e.LSH),e.xp6(4),e.Q6J("src",e.lcZ(9,18,"/assets/images/logo/logo_docs.svg"),e.LSH),e.xp6(2),e.Q6J("ngIf",n.selectedRows.length),e.xp6(1),e.Q6J("ngIf",n.selectedRows.length),e.xp6(2),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",n.selectedRows)("dataKey",n.gridKey)("scrollable",!0)("value",n.rows),e.xp6(3),e.Q6J("ngIf",n.loading.grid),e.xp6(13),e.Q6J("src",e.lcZ(30,20,"/assets/images/logo/logo_docs.svg"),e.LSH),e.xp6(7),e.Q6J("ngModel",n.val),e.xp6(6),e.hij("\u{1f449} ",n.val," + (step from schema || 1)"),e.xp6(15),e.Q6J("disabled",!n.val),e.xp6(4),e.Q6J("ngIf",n.loading.form))},dependencies:[l.Fj,l.wV,l.JJ,l.qQ,l.On,b.O5,U.y,u.iA,p.jx,u.Ei,S.G,w.u,_.w],encapsulation:2,changeDetection:0})}return a})(),canActivate:[v.P]}];let R=(()=>{class a{static \u0275fac=function(s){return new(s||a)};static \u0275mod=e.oAB({type:a});static \u0275inj=e.cJS({imports:[f.Bz.forChild(M),h.u]})}return a})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[5765],{37595:(bt,A,r)=>{r.d(A,{G:()=>wt});var p=r(15861),t=r(94946),n=r(33157),u=r(90328),g=r(56212),f=r(6990),P=r(45085),M=r(51162),Dt=r(96925),Rt=r(20553),N=r(19394),I=r(60921),L=r(67629),S=r(77240),_=r(99961),y=r(92189),x=r(95852),h=r(27414),w=r(32915),Z=r(77664),J=r(69862),E=r(85219),O=r(60095),D=r(96814),k=r(87797),C=r(95431),Q=r(97680),F=r(33259),Y=r(38057),B=r(21137),q=r(44879);const K=["funManFormC"],R=["cloneApiModalC"];function H(o,a){if(1&o){const e=t.EpF();t.TgZ(0,"span",20),t.NdJ("click",function(){t.CHM(e);const s=t.oxw(2);return t.KtG(s.edit())}),t._UZ(1,"i",21),t.qZA()}}function W(o,a){if(1&o){const e=t.EpF();t.TgZ(0,"span",22),t.NdJ("click",function(){t.CHM(e);const s=t.oxw(2);return t.KtG(s.clone())}),t._UZ(1,"i",23),t.qZA()}}function $(o,a){if(1&o){const e=t.EpF();t.TgZ(0,"span",24),t.NdJ("click",function(){t.CHM(e);const s=t.oxw(2);return t.KtG(s.removePermanentDialog())}),t._UZ(1,"i",25),t.qZA()}if(2&o){const e=t.oxw(2);t.Q6J("pTooltip",e.selectedRows.length>1?"Permanent Delete ("+e.selectedRows.length+" selected)":"Permanent Delete")}}function j(o,a){if(1&o){const e=t.EpF();t.TgZ(0,"span")(1,"span",13),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.navigateToTreeView())}),t._UZ(2,"i",14),t.qZA(),t.TgZ(3,"span",15),t.NdJ("click",function(){t.CHM(e);const s=t.oxw();return t.KtG(s.add())}),t._UZ(4,"i",16),t.qZA(),t.YNc(5,H,2,0,"span",17),t.YNc(6,W,2,0,"span",18),t.YNc(7,$,2,1,"span",19),t.qZA()}if(2&o){const e=t.oxw();t.xp6(5),t.Q6J("ngIf",1===e.selectedRows.length),t.xp6(1),t.Q6J("ngIf",1===e.selectedRows.length),t.xp6(1),t.Q6J("ngIf",e.selectedRows.length>=1)}}function V(o,a){if(1&o){const e=t.EpF();t.TgZ(0,"span",26)(1,"p-checkbox",27),t.NdJ("ngModelChange",function(s){t.CHM(e);const l=t.oxw();return t.KtG(l.eventCenterS.group.apisRegex.allCustomApis=s)}),t.qZA()()}if(2&o){const e=t.oxw();t.xp6(1),t.Q6J("ngModel",e.eventCenterS.group.apisRegex.allCustomApis)("binary",!0)}}function z(o,a){if(1&o){const e=t.EpF();t.TgZ(0,"span",26)(1,"p-checkbox",27),t.NdJ("ngModelChange",function(s){t.CHM(e);const l=t.oxw();return t.KtG(l.eventCenterS.filterInLog.apisRegex.allCustomApis=s)}),t.qZA()()}if(2&o){const e=t.oxw();t.xp6(1),t.Q6J("ngModel",e.eventCenterS.filterInLog.apisRegex.allCustomApis)("binary",!0)}}function X(o,a){if(1&o&&(t.TgZ(0,"div")(1,"div",28),t._uU(2),t.qZA()()),2&o){const e=t.oxw();t.xp6(2),t.Oqu(e.constantsS.group.allCustomApisPermitted)}}function tt(o,a){1&o&&(t.TgZ(0,"th",38),t._UZ(1,"p-tableHeaderCheckbox"),t.qZA())}function et(o,a){1&o&&t._UZ(0,"th",36)}function nt(o,a){1&o&&(t.TgZ(0,"th"),t._uU(1,"Authorization"),t.qZA())}function ot(o,a){1&o&&t._UZ(0,"th")}function it(o,a){1&o&&t._UZ(0,"th",39)}function st(o,a){if(1&o&&(t.TgZ(0,"tr"),t.YNc(1,tt,2,0,"th",34),t.YNc(2,et,1,0,"th",35),t._UZ(3,"th",36),t.TgZ(4,"th"),t._uU(5,"Name"),t.qZA(),t.TgZ(6,"th"),t._uU(7,"Path"),t.qZA(),t.YNc(8,nt,2,0,"th",5),t.YNc(9,ot,1,0,"th",5),t.YNc(10,it,1,0,"th",37),t.qZA()),2&o){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.showCheckbox),t.xp6(1),t.Q6J("ngIf",!e.isDependentOnGroup&&!e.isLPM&&!e.isFilterLogTable),t.xp6(6),t.Q6J("ngIf",!e.isDependentOnGroup&&!e.isLPM&&!e.isFilterLogTable),t.xp6(1),t.Q6J("ngIf",e.isLPM),t.xp6(1),t.Q6J("ngIf",!e.isDependentOnGroup&&!e.isLPM&&!e.isFilterLogTable)}}function at(o,a){if(1&o&&(t.TgZ(0,"td"),t._UZ(1,"p-tableCheckbox",51),t.qZA()),2&o){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("value",e)("pSelectableRow",e)}}function rt(o,a){if(1&o&&(t.TgZ(0,"td",52)(1,"span"),t._uU(2),t.qZA()()),2&o){const e=t.oxw().rowIndex;t.xp6(2),t.Oqu(e+1)}}function lt(o,a){1&o&&(t.TgZ(0,"span",53),t._uU(1,"Native"),t.qZA())}function ct(o,a){1&o&&(t.TgZ(0,"span",54),t._uU(1,"Caching"),t.qZA())}function pt(o,a){1&o&&(t.TgZ(0,"span",55),t._uU(1,"B. Schema"),t.qZA())}function dt(o,a){1&o&&(t.TgZ(0,"span",56),t._uU(1,"Q. Schema"),t.qZA())}function _t(o,a){if(1&o&&(t.TgZ(0,"span",57),t._UZ(1,"i",58),t._uU(2),t.qZA()),2&o){const e=t.oxw().$implicit;t.xp6(2),t.hij(" Sandbox : ",e.hasSeparateSandboxSettings,"")}}function ut(o,a){if(1&o){const e=t.EpF();t.TgZ(0,"i",59),t.NdJ("click",function(s){t.CHM(e);const l=t.oxw().$implicit,c=t.oxw(2);return t.KtG(c.copyValue(s,l.name))}),t.qZA()}}function mt(o,a){if(1&o){const e=t.EpF();t.TgZ(0,"i",60),t.NdJ("click",function(s){t.CHM(e);const l=t.oxw().$implicit,c=t.oxw(2);return t.KtG(c.copyValue(s,l.path))}),t.qZA()}}function ft(o,a){1&o&&(t.TgZ(0,"span",64),t._uU(1,"AM-User"),t.qZA())}function gt(o,a){1&o&&(t.TgZ(0,"span",65),t._uU(1,"No-Access"),t.qZA())}function ht(o,a){1&o&&(t.TgZ(0,"span",66),t._uU(1,"Public"),t.qZA())}function Ct(o,a){1&o&&(t.TgZ(0,"span",65),t._uU(1,"DB-User"),t.qZA())}function Tt(o,a){1&o&&(t.TgZ(0,"span",65),t._uU(1,"AWS"),t.qZA())}function vt(o,a){1&o&&(t.TgZ(0,"span",65),t._uU(1,"Azure"),t.qZA())}function xt(o,a){1&o&&(t.TgZ(0,"span",65),t._uU(1,"Google"),t.qZA())}function At(o,a){if(1&o&&(t.TgZ(0,"td"),t.YNc(1,ft,2,0,"span",61),t.YNc(2,gt,2,0,"span",62),t.YNc(3,ht,2,0,"span",63),t.YNc(4,Ct,2,0,"span",62),t.YNc(5,Tt,2,0,"span",62),t.YNc(6,vt,2,0,"span",62),t.YNc(7,xt,2,0,"span",62),t.qZA()),2&o){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngIf",e.hasAmAuth),t.xp6(1),t.Q6J("ngIf",e.noAccess),t.xp6(1),t.Q6J("ngIf",e.isPublic),t.xp6(1),t.Q6J("ngIf",e.hasAmDBAuth),t.xp6(1),t.Q6J("ngIf",e.hasAwsAuth),t.xp6(1),t.Q6J("ngIf",e.hasAzureAuth),t.xp6(1),t.Q6J("ngIf",e.hasGoogleAuth)}}function Pt(o,a){if(1&o){const e=t.EpF();t.TgZ(0,"div")(1,"label",67)(2,"p-checkbox",68),t.NdJ("ngModelChange",function(s){t.CHM(e);const l=t.oxw(2).$implicit;return t.KtG(l.saveResponseInLog=s)})("ngModelChange",function(){t.CHM(e);const s=t.oxw(4);return t.KtG(s.saveResponseInLogCheckData())})("click",function(s){t.CHM(e);const l=t.oxw(4);return t.KtG(l.generalS.stopPropagation(s))}),t.qZA()()()}if(2&o){const e=t.oxw(2).$implicit;t.xp6(2),t.Q6J("ngModel",e.saveResponseInLog)("binary",!0)}}function Mt(o,a){if(1&o&&(t.TgZ(0,"td"),t.YNc(1,Pt,3,2,"div",5),t.qZA()),2&o){const e=t.oxw().$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("ngIf",(null==i.selectedRows?null:i.selectedRows.indexOf(e))>=0)}}const It=function(){return["/api-info/api-testing/testing"]},G=function(o,a,e){return{at_category:o,at_user:a,at_api:e}};function St(o,a){if(1&o&&(t.TgZ(0,"td")(1,"div",52)(2,"a",69),t.NdJ("click",function(i){return i.stopPropagation()}),t._UZ(3,"i",70),t.qZA()()()),2&o){const e=t.oxw().$implicit,i=t.oxw(2);t.xp6(2),t.Q6J("routerLink",t.DdM(2,It))("queryParams",t.kEZ(3,G,i.EAPICategory.CUSTOM_APIS,i.authCS.getUserId(),e._id))}}const b=function(o,a,e,i){return{get:o,put:a,post:e,delete:i}};function U(o,a){if(1&o&&(t.TgZ(0,"tr",40),t.YNc(1,at,2,2,"td",5),t.YNc(2,rt,3,1,"td",41),t.TgZ(3,"td")(4,"span",42),t._uU(5),t.qZA()(),t.TgZ(6,"td")(7,"span",43)(8,"span"),t._uU(9),t.qZA(),t.YNc(10,lt,2,0,"span",44),t.YNc(11,ct,2,0,"span",45),t.YNc(12,pt,2,0,"span",46),t.YNc(13,dt,2,0,"span",47),t.YNc(14,_t,3,1,"span",48),t.YNc(15,ut,1,0,"i",49),t.qZA()(),t.TgZ(16,"td")(17,"span",43)(18,"span"),t._uU(19),t.qZA(),t.YNc(20,mt,1,0,"i",50),t.qZA()(),t.YNc(21,At,8,7,"td",5),t.YNc(22,Mt,2,1,"td",5),t.YNc(23,St,4,7,"td",5),t.qZA()),2&o){const e=a.$implicit,i=t.oxw(2);t.Q6J("pSelectableRow",e),t.xp6(1),t.Q6J("ngIf",i.showCheckbox),t.xp6(1),t.Q6J("ngIf",!i.isDependentOnGroup&&!i.isLPM&&!i.isFilterLogTable),t.xp6(2),t.Q6J("ngClass",t.l5B(17,b,e.requestMethod===i.ERequestMethod.GET,e.requestMethod===i.ERequestMethod.PUT,e.requestMethod===i.ERequestMethod.POST,e.requestMethod===i.ERequestMethod.DELETE)),t.xp6(1),t.Oqu(e.requestMethod),t.xp6(4),t.Oqu(e.name),t.xp6(1),t.Q6J("ngIf",e.runOnNativeProcess),t.xp6(1),t.Q6J("ngIf",e.enableCaching),t.xp6(1),t.Q6J("ngIf",e.hasReqBodySchema),t.xp6(1),t.Q6J("ngIf",e.hasReqQueryParametersSchema),t.xp6(1),t.Q6J("ngIf",e.hasSeparateSandboxSettings),t.xp6(1),t.Q6J("ngIf",e.name),t.xp6(4),t.Oqu(e.path),t.xp6(1),t.Q6J("ngIf",e.path),t.xp6(1),t.Q6J("ngIf",!i.isDependentOnGroup&&!i.isLPM&&!i.isFilterLogTable),t.xp6(1),t.Q6J("ngIf",i.isLPM),t.xp6(1),t.Q6J("ngIf",!i.isDependentOnGroup&&!i.isLPM&&!i.isFilterLogTable)}}function yt(o,a){1&o&&t._UZ(0,"p-progressSpinner",71)}function Gt(o,a){if(1&o){const e=t.EpF();t.TgZ(0,"div",29)(1,"p-table",30),t.NdJ("selectionChange",function(s){t.CHM(e);const l=t.oxw();return t.KtG(l.selectedRows=s)})("selectionChange",function(s){t.CHM(e);const l=t.oxw();return t.KtG(l.functionSelected(s))})("dblclick",function(s){t.CHM(e);const l=t.oxw();return t.KtG(l.dblClickCustomAPIsGrid(s))}),t.YNc(2,st,11,5,"ng-template",31),t.YNc(3,U,24,22,"ng-template",32),t.qZA(),t.YNc(4,yt,1,0,"p-progressSpinner",33),t.qZA()}if(2&o){const e=t.oxw();t.xp6(1),t.Q6J("selectionMode","multiple")("metaKeySelection",e.metaKeySelection)("selection",e.selectedRows)("dataKey",e.gridKey)("scrollable",!0)("value",e.rows),t.xp6(3),t.Q6J("ngIf",e.loading.grid)}}let wt=(()=>{class o{functionS;generalS;notificationS;navigationCS;authCS;constantsS;eventCenterS;cd;router;http;confirmationService;showCheckbox=!0;isReadOnly=!1;isDependentOnGroup=!1;isLPM=!1;isFilterLogTable=!1;metaKeySelection=!0;loading={grid:!1};subscriptions=[];data={mode:u.D.ADD,eventChannel:new t.vpe,formData:void 0};rows=[];rowsMap={};rowsMapName={};showAll=!1;selectedRows=[];gridKey=M.iH._id;EUserType=I.d;BE_HOST_PORT=Rt.N.BE_HOST_PORT;EAPICategory=P.R;ERequestMethod=Dt.Yp;FunManFormC;cloneApiModalC;constructor(e,i,s,l,c,d,T,v,m,Zt,Et){this.functionS=e,this.generalS=i,this.notificationS=s,this.navigationCS=l,this.authCS=c,this.constantsS=d,this.eventCenterS=T,this.cd=v,this.router=m,this.http=Zt,this.confirmationService=Et}ngOnInit(){var e=this;this.eventCenterS.functions.selectedFunctions.next([]),this.loadGridData(),this.subscriptions.push(this.data.eventChannel.subscribe(i=>{this.FunManFormC.hideModal(),this.loadGridData()})),this.isDependentOnGroup&&this.subscriptions.push(this.eventCenterS.group.selectedGroups.subscribe(function(){var i=(0,p.Z)(function*(s){s.length&&(yield e.loadGridData())});return function(s){return i.apply(this,arguments)}}())),(this.isFilterLogTable||this.isLPM)&&this.subscriptions.push(this.eventCenterS.filterInLog.refreshGrid.subscribe(i=>{i&&this.loadGridData()})),this.isLPM&&this.subscriptions.push(this.eventCenterS.filterInLog.functionIds.subscribe((0,p.Z)(function*(){e.loadGridData()}))),this.generalS.setNewTitle("Custom APIs")}navigateToTreeView(){var e=this;return(0,p.Z)(function*(){yield e.router.navigate(["api-info","custom-api","functions-tree"])})()}loadGridData(){var e=this;this.isDependentOnGroup&&0===this.eventCenterS.group.selectedGroups.value.length?this.resetGridAndUrl():(this.loading.grid=!0,this.subscriptions.push(this.functionS.getFunctionsAsAPI().subscribe(function(){var i=(0,p.Z)(function*(s){s.success?(e.selectedRows=[],e.rows=s.data||[],e.rowsMap=f.keyBy(e.rows,M.iH._id),e.rowsMapName=f.keyBy(e.rows,M.eb.name)):e.resetGridAndUrl();const l=e.navigationCS.getQueryParam(g.p.custom_api)||(e.isFilterLogTable?e.eventCenterS.filterInLog.functionIds.value.join(","):e.eventCenterS.group.customApiIds.value.join(","))||(e.isDependentOnGroup&&e.eventCenterS.group.selectedGroups.value[0].queryParams.customApiNames?e.eventCenterS.group.selectedGroups.value[0].queryParams.customApiNames.join(","):"");if(l){const c=l.split(","),d=f.intersection(f.keys(e.rowsMap),c),T=[];for(const m of d)e.rowsMap[m]&&T.push(e.rowsMap[m]);const v=[];for(const m of d)e.rowsMap[m]&&v.push(e.rowsMap[m]);e.selectedRows=v,e.eventCenterS.functions.selectedFunctions.next(T)}if(e.isLPM&&e.eventCenterS.group.selectedGroups.value[0]?.queryParams?.customApiNames?.length){const c=e.eventCenterS.group.selectedGroups.value[0];for(const d of c?.queryParams?.customApiNames)e.rowsMapName[d]&&(e.rowsMapName[d].saveResponseInLog=c.functionsLog?.[d]?.saveResponseInLog||!1);e.setResDataInEventCenter()}if(e.isDependentOnGroup){e.selectedRows=[];for(const c of e.eventCenterS.group.customApiIds.value)e.rowsMap[c]&&e.selectedRows.push(e.rowsMap[c])}if(e.isFilterLogTable){e.selectedRows=[];for(const c of e.eventCenterS.filterInLog.functionIds.value)e.rowsMap[c]&&e.selectedRows.push(e.rowsMap[c])}e.loading.grid=!1,e.cd.detectChanges()});return function(s){return i.apply(this,arguments)}}())))}add(){this.data.formData=void 0,this.data.mode=u.D.ADD,this.data.eventChannel.emit({action:n.F.OPEN_FORM_IN_ADD_MODE}),this.FunManFormC.showModal()}view(){this.data.formData=this.rowsMap[this.getSelectedRowId()],this.data.mode=u.D.VIEW,this.data.eventChannel.emit({action:n.F.OPEN_FORM_IN_VIEW_MODE}),this.FunManFormC.showModal()}edit(){this.data.formData=this.rowsMap[this.getSelectedRowId()],this.data.mode=u.D.EDIT,this.data.eventChannel.emit({action:n.F.OPEN_FORM_IN_EDIT_MODE}),this.FunManFormC.showModal()}removePermanentDialog(){var i,e=this;this.selectedRows.length>1?this.removePermanentBulkDialog():this.confirmationService.confirm({message:this.constantsS.functions.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,p.Z)(function*(){yield e.removePermanent()}),function(){return i.apply(this,arguments)})})}removePermanent(){var e=this;return(0,p.Z)(function*(){if(e.getSelectedRowId()){e.loading.grid=!0;try{const i=`${e.getSelectedRowGuid()}:${e.authCS.gUser._id}`,s=yield e.functionS.permanentDelete(i).toPromise();s.success?(e.notificationS.showSuccess(e.constantsS.functions.removePermanent),e.resetGridAndUrl(),e.loadGridData()):e.notificationS.showErrorFromResponse(s,e.constantsS.functions.removePermanentError)}catch{e.notificationS.showError(e.constantsS.functions.removePermanentError)}e.loading.grid=!1}})()}removePermanentBulkDialog(){var i,e=this;this.selectedRows.length<2||this.confirmationService.confirm({message:this.constantsS.functions.removePermanentBulkConfirm(this.selectedRows.length),header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,p.Z)(function*(){yield e.removePermanentBulk()}),function(){return i.apply(this,arguments)})})}removePermanentBulk(){var e=this;return(0,p.Z)(function*(){if(e.selectedRows.length<2)return;e.loading.grid=!0;const i=e.selectedRows;try{const l=(yield Promise.all(i.map(c=>e.functionS.permanentDelete(`${c.guid}:${e.authCS.gUser._id}`).toPromise()))).filter(c=>!c.success).length;0===l?e.notificationS.showSuccess(e.constantsS.functions.removePermanentBulk(i.length)):e.notificationS.showError(l<i.length?`${i.length-l} of ${i.length} custom APIs removed. ${l} failed.`:e.constantsS.functions.removePermanentBulkError),e.resetGridAndUrl(),e.loadGridData()}catch{e.notificationS.showError(e.constantsS.functions.removePermanentBulkError)}e.loading.grid=!1})()}resetDependents(){var e=this;return(0,p.Z)(function*(){e.eventCenterS.functions.selectedFunctions.next([]),yield e.navigationCS.setQueryParam(g.p.custom_api,null)})()}functionSelected(e){var i=this;return(0,p.Z)(function*(){i.selectedRows=e,i.resetDependents().then();for(const s of i.rows)-1===i.selectedRows.indexOf(s)&&(s.saveResponseInLog=!1);i.fillData().then(),i.getSelectedRowId()?i.generalS.setNewTitle(i.rowsMap[i.getSelectedRowId()].name,P.R.CUSTOM_APIS):i.generalS.setNewTitle("Custom APIs")})()}resetGridAndUrl(){this.rows=[],this.selectedRows=[],this.rowsMap={},this.eventCenterS.functions.selectedFunctions.next([])}fillData(){var e=this;return(0,p.Z)(function*(){if(!e.selectedRows||Array.isArray(e.selectedRows)&&!e.selectedRows.length)return yield e.navigationCS.setQueryParam(g.p.custom_api,""),e.eventCenterS.group.customApis.next([]),e.eventCenterS.functions.selectedFunctions.next([]),e.eventCenterS.group.customApiIds.next([]),void e.eventCenterS.group.customApis.next([]);if(e.isDependentOnGroup||e.isFilterLogTable){const i=f.map(e.selectedRows,"_id");e.eventCenterS.group.customApiIds.next(i),e.eventCenterS.group.customApis.next(e.selectedRows),e.isFilterLogTable&&(e.eventCenterS.filterInLog.functionIds.next(i),e.eventCenterS.filterInLog.functions.next(e.selectedRows))}else{const i=e.getSelectedRowId(),s=(yield e.functionS.getById(i).toPromise()).data;s._id?(yield e.navigationCS.setQueryParam(g.p.custom_api,s._id),e.eventCenterS.functions.selectedFunctions.next([s])):e.resetDependents().then()}})()}getSelectedRowId(){return this.selectedRows[0]?._id}getSelectedRowGuid(){return this.selectedRows[0]?.guid}dblClickCustomAPIsGrid(e){setTimeout(()=>{this.edit()},10)}setResDataInEventCenter(){this.isDependentOnGroup&&(this.eventCenterS.group.customApis.next(this.selectedRows),this.eventCenterS.group.selectedFunctions.next(this.selectedRows)),this.isFilterLogTable&&this.eventCenterS.filterInLog.functions.next(this.selectedRows)}saveResponseInLogCheckData(){this.setResDataInEventCenter()}clone(){var e=this;return(0,p.Z)(function*(){yield e.cloneApiModalC.showModal(e.getSelectedRowId(),null,function(){var i=(0,p.Z)(function*(s){s&&(yield e.loadGridData()),e.cd.detectChanges()});return function(s){return i.apply(this,arguments)}}())})()}copyValue(e,i){var s=this;return(0,p.Z)(function*(){e.stopPropagation(),i&&((yield s.generalS.copyToClipboard(i))?s.notificationS.showSuccess(`Copied "${i}" to clipboard.`):s.notificationS.showError("Unable to copy to clipboard."))})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}EModelApiPaths=N.k4;static \u0275fac=function(i){return new(i||o)(t.Y36(L.d),t.Y36(S.b),t.Y36(_.W),t.Y36(y.S),t.Y36(x.D),t.Y36(h.L),t.Y36(w.u),t.Y36(t.sBO),t.Y36(Z.F0),t.Y36(J.eN),t.Y36(E.YP))};static \u0275cmp=t.Xpm({type:o,selectors:[["app-custom-api-grid"]],viewQuery:function(i,s){if(1&i&&(t.Gf(K,5),t.Gf(R,5)),2&i){let l;t.iGM(l=t.CRH())&&(s.FunManFormC=l.first),t.iGM(l=t.CRH())&&(s.cloneApiModalC=l.first)}},inputs:{showCheckbox:"showCheckbox",isReadOnly:["IsReadOnly","isReadOnly"],isDependentOnGroup:["IsDependentOnGroup","isDependentOnGroup"],isLPM:"isLPM",isFilterLogTable:"isFilterLogTable",metaKeySelection:"metaKeySelection"},decls:19,vars:15,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["alt","Custom API",1,"fa-fw","mr-1",3,"src"],["href","https://docs.apimaker.dev/v1/docs/apis-all/custom-apis/user-created-custom-api.html","target","_blank"],[1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px",3,"src"],[4,"ngIf"],["class","float-right cursor-pointer","tooltipPosition","left","pTooltip","All Custom APIs",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["class","h-100",4,"ngIf"],[3,"data"],["funManFormC",""],[3,"modalId","hostAndPort","modelApiPaths"],["cloneApiModalC",""],[1,"float-right","cursor-pointer","ml-3",3,"click"],["tooltipPosition","left","pTooltip","Tree View","tooltipPosition","left",1,"fas","fa-sitemap","text-yellow","fa-fw","fa-rotate-270"],["tooltipPosition","left","pTooltip","Add New","tooltipPosition","left",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left",3,"pTooltip","click",4,"ngIf"],["tooltipPosition","left","pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["tooltipPosition","left","pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-light","fa-fw"],["tooltipPosition","left",1,"float-right","cursor-pointer","ml-3",3,"pTooltip","click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],["tooltipPosition","left","pTooltip","All Custom APIs",1,"float-right","cursor-pointer"],[3,"ngModel","binary","ngModelChange"],[1,"p-2","text-center","text-success"],[1,"h-100"],["styleClass","p-datatable-striped custom-api-grid-height","scrollHeight","flex",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["style","width: 45px;",4,"ngIf"],["style","width: 80px;",4,"ngIf"],[2,"width","80px"],["style","width: 60px;",4,"ngIf"],[2,"width","45px"],[2,"width","60px"],[3,"pSelectableRow"],["class","text-center",4,"ngIf"],[1,"small","font-weight-bold","d-inline-block","mr-2",3,"ngClass"],[1,"copy-cell"],["tooltipPosition","left","pTooltip","Running on native process","class","ml-2 grid-pill-custom-api text-danger border",4,"ngIf"],["tooltipPosition","left","pTooltip","Caching enabled","class","ml-2 grid-pill-custom-api text-warning border",4,"ngIf"],["tooltipPosition","left","pTooltip","It has request body schema","class","ml-2 grid-pill-custom-api text-muted border",4,"ngIf"],["tooltipPosition","left","pTooltip","It has request query parameters schema","class","ml-2 grid-pill-custom-api text-muted border",4,"ngIf"],["tooltipPosition","left","pTooltip","It has separate sandbox","class","ml-2 grid-pill-custom-api text-muted border",4,"ngIf"],["class","fas fa-copy fa-fw ml-2 cursor-pointer text-muted copy-icon","pTooltip","Copy name","tooltipPosition","top",3,"click",4,"ngIf"],["class","fas fa-copy fa-fw ml-2 cursor-pointer text-muted copy-icon","pTooltip","Copy path","tooltipPosition","top",3,"click",4,"ngIf"],[3,"value","pSelectableRow"],[1,"text-center"],["tooltipPosition","left","pTooltip","Running on native process",1,"ml-2","grid-pill-custom-api","text-danger","border"],["tooltipPosition","left","pTooltip","Caching enabled",1,"ml-2","grid-pill-custom-api","text-warning","border"],["tooltipPosition","left","pTooltip","It has request body schema",1,"ml-2","grid-pill-custom-api","text-muted","border"],["tooltipPosition","left","pTooltip","It has request query parameters schema",1,"ml-2","grid-pill-custom-api","text-muted","border"],["tooltipPosition","left","pTooltip","It has separate sandbox",1,"ml-2","grid-pill-custom-api","text-muted","border"],[1,"fas","fa-box"],["pTooltip","Copy name","tooltipPosition","top",1,"fas","fa-copy","fa-fw","ml-2","cursor-pointer","text-muted","copy-icon",3,"click"],["pTooltip","Copy path","tooltipPosition","top",1,"fas","fa-copy","fa-fw","ml-2","cursor-pointer","text-muted","copy-icon",3,"click"],["class","d-inline-block small font-weight-bold font-monospaced ml-2",4,"ngIf"],["class","d-inline-block small font-weight-bold font-monospaced text-success ml-2",4,"ngIf"],["class","d-inline-block small font-weight-bold font-monospaced text-warning ml-2",4,"ngIf"],[1,"d-inline-block","small","font-weight-bold","font-monospaced","ml-2"],[1,"d-inline-block","small","font-weight-bold","font-monospaced","text-success","ml-2"],[1,"d-inline-block","small","font-weight-bold","font-monospaced","text-warning","ml-2"],[1,"m-0","vertical-align-sub"],["label","Save Response In Log",3,"ngModel","binary","ngModelChange","click"],["href","javascript:",1,"btn","btn-xsm-custom","mr-3",3,"routerLink","queryParams","click"],[1,"fas","fa-vial","text-info","fa-fw","test-tube","pt-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,s){1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span"),t._UZ(3,"img",2),t.ALo(4,"themeIcon"),t._uU(5," Custom APIs"),t.qZA(),t.TgZ(6,"a",3),t._UZ(7,"img",4),t.ALo(8,"themeIcon"),t.qZA(),t.YNc(9,j,8,3,"span",5),t.YNc(10,V,2,2,"span",6),t.YNc(11,z,2,2,"span",6),t.qZA(),t.TgZ(12,"div",7),t.YNc(13,X,3,1,"div",5),t.YNc(14,Gt,5,7,"div",8),t.qZA()(),t._UZ(15,"app-w-fun-man-form",9,10)(17,"app-clone-api-modal",11,12)),2&i&&(t.xp6(3),t.Q6J("src",t.lcZ(4,11,"/assets/images/icons/custom.svg"),t.LSH),t.xp6(4),t.Q6J("src",t.lcZ(8,13,"/assets/images/logo/logo_docs.svg"),t.LSH),t.xp6(2),t.Q6J("ngIf",!s.isReadOnly),t.xp6(1),t.Q6J("ngIf",s.isDependentOnGroup),t.xp6(1),t.Q6J("ngIf",s.isFilterLogTable),t.xp6(2),t.Q6J("ngIf",s.eventCenterS.group.apisRegex.allCustomApis||s.eventCenterS.filterInLog.apisRegex.allCustomApis),t.xp6(1),t.Q6J("ngIf",!(s.eventCenterS.group.apisRegex.allCustomApis||s.eventCenterS.filterInLog.apisRegex.allCustomApis)),t.xp6(1),t.Q6J("data",s.data),t.xp6(2),t.Q6J("modalId","idCloneCustomAPIGrid")("hostAndPort",s.BE_HOST_PORT)("modelApiPaths",s.EModelApiPaths.CUSTOM_APIS))},dependencies:[Z.rH,O.JJ,O.On,D.mk,D.O5,k.s,C.iA,E.jx,C.Ei,C.UA,C.Mo,Q.G,F.u,Y.XZ,B.u,q.w],styles:[".custom-tab-title[_ngcontent-%COMP%]{padding:.5rem}.min-width[_ngcontent-%COMP%], .none[_ngcontent-%COMP%], .delete[_ngcontent-%COMP%], .post[_ngcontent-%COMP%], .put[_ngcontent-%COMP%], .get[_ngcontent-%COMP%]{width:45px;display:inline-block}.get[_ngcontent-%COMP%]{color:var(--accent-success)}.put[_ngcontent-%COMP%]{color:var(--brand-secondary)}.post[_ngcontent-%COMP%]{color:var(--accent-warning)}.delete[_ngcontent-%COMP%]{color:var(--accent-error)}.none[_ngcontent-%COMP%]{color:var(--accent-success--shade--three)}.width-160[_ngcontent-%COMP%]{width:160px}",".copy-cell[_ngcontent-%COMP%] .copy-icon[_ngcontent-%COMP%]{opacity:0;transition:opacity .15s ease-in-out}.copy-cell[_ngcontent-%COMP%]:hover .copy-icon[_ngcontent-%COMP%]{opacity:1}.copy-cell[_ngcontent-%COMP%] .copy-icon[_ngcontent-%COMP%]:hover{color:#0d6efd}"]})}return o})()},95765:(bt,A,r)=>{r.r(A),r.d(A,{FunctionManM:()=>wt});var p=r(77664),t=r(96814),n=r(94946),u=r(85219);let N=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=n.oAB({type:o});static \u0275inj=n.cJS({imports:[t.ez,u.m8,u.m8]})}return o})();var I=r(63726),L=r(17017),S=r(37595),_=r(15861),y=r(33157),x=r(90328),h=r(56212),w=r(45085),Z=r(51162),J=r(96925),E=r(20553),O=r(19394),D=r(60921),k=r(67629),C=r(77240),Q=r(99961),F=r(92189),Y=r(95852),B=r(27414),q=r(32915),K=r(69862),R=r(60095),H=r(87797),W=r(91396),$=r(97680),j=r(33259),V=r(38057),z=r(21137),X=r(44879);const tt=["funManFormC"],et=["cloneApiModalC"];function nt(o,a){if(1&o){const e=n.EpF();n.TgZ(0,"span",25),n.NdJ("click",function(){n.CHM(e);const s=n.oxw();return n.KtG(s.edit())}),n._UZ(1,"i",26),n.qZA()}}function ot(o,a){if(1&o){const e=n.EpF();n.TgZ(0,"span",27),n.NdJ("click",function(){n.CHM(e);const s=n.oxw();return n.KtG(s.clone())}),n._UZ(1,"i",28),n.qZA()}}function it(o,a){if(1&o){const e=n.EpF();n.TgZ(0,"span",29),n.NdJ("click",function(){n.CHM(e);const s=n.oxw();return n.KtG(s.removePermanentDialog())}),n._UZ(1,"i",30),n.qZA()}if(2&o){const e=n.oxw();n.Q6J("pTooltip",e.getSelectedLeafRows().length>1?"Permanent Delete ("+e.getSelectedLeafRows().length+" selected)":"Permanent Delete")}}function st(o,a){if(1&o&&(n.TgZ(0,"div"),n._uU(1),n.qZA()),2&o){const e=n.oxw().$implicit;n.xp6(1),n.Oqu(e.label)}}function at(o,a){1&o&&(n.TgZ(0,"span",52),n._uU(1,"Native"),n.qZA())}function rt(o,a){1&o&&(n.TgZ(0,"span",53),n._uU(1,"Caching"),n.qZA())}function lt(o,a){1&o&&(n.TgZ(0,"span",54),n._uU(1,"B. Schema"),n.qZA())}function ct(o,a){1&o&&(n.TgZ(0,"span",55),n._uU(1,"Q. Schema"),n.qZA())}function pt(o,a){if(1&o&&(n.TgZ(0,"span",56),n._UZ(1,"i",57),n._uU(2),n.qZA()),2&o){const e=n.oxw(2).$implicit;n.xp6(2),n.hij(" Sandbox : ",e.data.hasSeparateSandboxSettings,"")}}function dt(o,a){if(1&o){const e=n.EpF();n.TgZ(0,"i",58),n.NdJ("click",function(s){n.CHM(e);const l=n.oxw(2).$implicit,c=n.oxw();return n.KtG(c.copyValue(s,l.data.name))}),n.qZA()}}function _t(o,a){if(1&o){const e=n.EpF();n.TgZ(0,"i",59),n.NdJ("click",function(s){n.CHM(e);const l=n.oxw(2).$implicit,c=n.oxw();return n.KtG(c.copyValue(s,l.data.path))}),n.qZA()}}function ut(o,a){1&o&&(n.TgZ(0,"span",60),n._uU(1,"AM-User"),n.qZA())}function mt(o,a){1&o&&(n.TgZ(0,"span",61),n._uU(1,"No-Access"),n.qZA())}function ft(o,a){1&o&&(n.TgZ(0,"span",62),n._uU(1,"Public"),n.qZA())}function gt(o,a){1&o&&(n.TgZ(0,"span",61),n._uU(1,"DB-User"),n.qZA())}function ht(o,a){1&o&&(n.TgZ(0,"span",61),n._uU(1,"AWS"),n.qZA())}function Ct(o,a){1&o&&(n.TgZ(0,"span",61),n._uU(1,"Azure"),n.qZA())}function Tt(o,a){1&o&&(n.TgZ(0,"span",61),n._uU(1,"Google"),n.qZA())}const vt=function(o,a,e,i){return{get:o,put:a,post:e,delete:i}},xt=function(){return["/api-info/api-testing/testing"]},At=function(o,a,e){return{at_category:o,at_user:a,at_api:e}};function Pt(o,a){if(1&o&&(n.TgZ(0,"div")(1,"div")(2,"table",33)(3,"tr")(4,"td",34),n._UZ(5,"p-checkbox",35),n.qZA(),n.TgZ(6,"td",36)(7,"span",37),n._uU(8),n.qZA(),n.TgZ(9,"span",38)(10,"span"),n._uU(11),n.qZA(),n.YNc(12,at,2,0,"span",39),n.YNc(13,rt,2,0,"span",40),n.YNc(14,lt,2,0,"span",41),n.YNc(15,ct,2,0,"span",42),n.YNc(16,pt,3,1,"span",43),n.YNc(17,dt,1,0,"i",44),n.qZA()(),n.TgZ(18,"td",36)(19,"span",38)(20,"span"),n._uU(21),n.qZA(),n.YNc(22,_t,1,0,"i",45),n.qZA()(),n.TgZ(23,"td"),n.YNc(24,ut,2,0,"span",46),n.YNc(25,mt,2,0,"span",47),n.YNc(26,ft,2,0,"span",48),n.YNc(27,gt,2,0,"span",47),n.YNc(28,ht,2,0,"span",47),n.YNc(29,Ct,2,0,"span",47),n.YNc(30,Tt,2,0,"span",47),n.qZA(),n.TgZ(31,"td",49)(32,"a",50),n.NdJ("click",function(i){return i.stopPropagation()}),n._UZ(33,"i",51),n.qZA()()()()()()),2&o){const e=n.oxw().$implicit,i=n.oxw();n.xp6(5),n.Q6J("ngModel",i.isNodeSelected(e))("binary",!0),n.xp6(2),n.Q6J("ngClass",n.l5B(22,vt,e.data.requestMethod===i.ERequestMethod.GET,e.data.requestMethod===i.ERequestMethod.PUT,e.data.requestMethod===i.ERequestMethod.POST,e.data.requestMethod===i.ERequestMethod.DELETE)),n.xp6(1),n.Oqu(e.data.requestMethod),n.xp6(3),n.Oqu(e.data.name),n.xp6(1),n.Q6J("ngIf",e.data.runOnNativeProcess),n.xp6(1),n.Q6J("ngIf",e.data.enableCaching),n.xp6(1),n.Q6J("ngIf",e.data.hasReqBodySchema),n.xp6(1),n.Q6J("ngIf",e.data.hasReqQueryParametersSchema),n.xp6(1),n.Q6J("ngIf",e.data.hasSeparateSandboxSettings),n.xp6(1),n.Q6J("ngIf",e.data.name),n.xp6(4),n.Oqu(e.data.path),n.xp6(1),n.Q6J("ngIf",e.data.path),n.xp6(2),n.Q6J("ngIf",e.data.hasAmAuth),n.xp6(1),n.Q6J("ngIf",e.data.noAccess),n.xp6(1),n.Q6J("ngIf",e.data.isPublic),n.xp6(1),n.Q6J("ngIf",e.data.hasAmDBAuth),n.xp6(1),n.Q6J("ngIf",e.data.hasAwsAuth),n.xp6(1),n.Q6J("ngIf",e.data.hasAzureAuth),n.xp6(1),n.Q6J("ngIf",e.data.hasGoogleAuth),n.xp6(2),n.Q6J("routerLink",n.DdM(27,xt))("queryParams",n.kEZ(28,At,i.EAPICategory.CUSTOM_APIS,i.authCS.getUserId(),e.data._id))}}function Mt(o,a){if(1&o&&(n.TgZ(0,"div",31),n.YNc(1,st,2,1,"div",32),n.YNc(2,Pt,34,32,"div",32),n.qZA()),2&o){const e=a.$implicit;n.xp6(1),n.Q6J("ngIf",null==e.children?null:e.children.length),n.xp6(1),n.Q6J("ngIf",!(null!=e.children&&e.children.length))}}function It(o,a){1&o&&n._UZ(0,"p-progressSpinner",63)}let G=(()=>{class o{functionS;generalS;notificationS;navigationCS;authCS;constantsS;eventCenterS;cd;router;http;confirmationService;loading={grid:!1};subscriptions=[];data={mode:x.D.ADD,eventChannel:new n.vpe,formData:void 0};gridKey=Z.iH._id;EUserType=D.d;BE_HOST_PORT=E.N.BE_HOST_PORT;EAPICategory=w.R;EQueryParam=h.p;leafSelected=!1;selectedRows=void 0;treeNodes=[];allTreeItemsMap={};FunManFormC;cloneApiModalC;constructor(e,i,s,l,c,d,T,v,m,Zt,Et){this.functionS=e,this.generalS=i,this.notificationS=s,this.navigationCS=l,this.authCS=c,this.constantsS=d,this.eventCenterS=T,this.cd=v,this.router=m,this.http=Zt,this.confirmationService=Et}ngOnInit(){this.loadTreeData(),this.subscriptions.push(this.data.eventChannel.subscribe(e=>{this.FunManFormC.hideModal(),this.loadTreeData()})),this.generalS.setNewTitle("Custom APIs")}navigateToGridView(){var e=this;return(0,_.Z)(function*(){yield e.router.navigate(["api-info","custom-api","functions"])})()}expandAll(){this.treeNodes=this.generalS.setTreeExpansion(this.treeNodes,!0),this.cd.detectChanges()}collapseAll(){this.treeNodes=this.generalS.setTreeExpansion(this.treeNodes,!1),this.cd.detectChanges()}loadTreeData(){var e=this;return(0,_.Z)(function*(){const i=(yield e.functionS.getCustomAPITree().toPromise()).data;for(const l of i)e.generalS.convertKTreeItemToPrimeNGTreeItem(l);const s={};e.generalS.getMapOfAllItems(s,i);for(const l of Object.keys(s)){const c=e.allTreeItemsMap[l];c&&(s[l].expanded=c.expanded)}e.treeNodes=i,e.allTreeItemsMap=s,e.loading.grid=!1,e.cd.detectChanges()})()}add(){this.data.formData=void 0,this.data.mode=x.D.ADD,this.data.eventChannel.emit({action:y.F.OPEN_FORM_IN_ADD_MODE}),this.FunManFormC.showModal()}edit(){this.leafSelected&&(this.data.formData=this.selectedRows[0].data,this.data.mode=x.D.EDIT,this.data.eventChannel.emit({action:y.F.OPEN_FORM_IN_EDIT_MODE}),this.FunManFormC.showModal())}getSelectedLeafRows(){return(this.selectedRows||[]).filter(e=>!e.children?.length)}isNodeSelected(e){return!!this.selectedRows?.includes(e)}removePermanentDialog(){var s,e=this;this.getSelectedLeafRows().length>1?this.removePermanentBulkDialog():this.leafSelected&&this.confirmationService.confirm({message:this.constantsS.functions.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(s=(0,_.Z)(function*(){yield e.removePermanent()}),function(){return s.apply(this,arguments)})})}removePermanent(){var e=this;return(0,_.Z)(function*(){if(e.getSelectedRowId()){e.loading.grid=!0;try{const i=`${e.getSelectedRowGuid()}:${e.authCS.gUser._id}`,s=yield e.functionS.permanentDelete(i).toPromise();s.success?(e.notificationS.showSuccess(e.constantsS.functions.removePermanent),e.resetGridAndUrl(),yield e.loadTreeData(),e.leafSelected=!1):e.notificationS.showErrorFromResponse(s,e.constantsS.functions.removePermanentError)}catch{e.notificationS.showError(e.constantsS.functions.removePermanentError)}e.loading.grid=!1}})()}removePermanentBulkDialog(){var e=this;const i=this.getSelectedLeafRows();var s;i.length<2||this.confirmationService.confirm({message:this.constantsS.functions.removePermanentBulkConfirm(i.length),header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(s=(0,_.Z)(function*(){yield e.removePermanentBulk()}),function(){return s.apply(this,arguments)})})}removePermanentBulk(){var e=this;return(0,_.Z)(function*(){const i=e.getSelectedLeafRows();if(!(i.length<2)){e.loading.grid=!0;try{const l=(yield Promise.all(i.map(c=>e.functionS.permanentDelete(`${c.data?.guid}:${e.authCS.gUser._id}`).toPromise()))).filter(c=>!c.success).length;0===l?e.notificationS.showSuccess(e.constantsS.functions.removePermanentBulk(i.length)):e.notificationS.showError(l<i.length?`${i.length-l} of ${i.length} custom APIs removed. ${l} failed.`:e.constantsS.functions.removePermanentBulkError),e.resetGridAndUrl(),yield e.loadTreeData(),e.leafSelected=!1}catch{e.notificationS.showError(e.constantsS.functions.removePermanentBulkError)}e.loading.grid=!1}})()}resetDependents(){var e=this;return(0,_.Z)(function*(){yield e.navigationCS.setQueryParam(h.p.custom_api,null)})()}functionSelected(){var e=this;return(0,_.Z)(function*(){e.resetDependents(),e.fillData(),e.getSelectedRowId()?e.generalS.setNewTitle(e.selectedRows[0].data.name,w.R.CUSTOM_APIS):e.generalS.setNewTitle("Custom APIs"),e.leafSelected=!(!e.getSelectedRowId()||e.selectedRows[0].children?.length)})()}resetGridAndUrl(){this.selectedRows=void 0}fillData(){var e=this;return(0,_.Z)(function*(){if(!e.selectedRows)return void(yield e.navigationCS.setQueryParam(h.p.custom_api,""));const i=e.getSelectedRowId();i?yield e.navigationCS.setQueryParam(h.p.custom_api,i):e.resetDependents()})()}getSelectedRowId(){return this.selectedRows?.[0]?.data?._id}getSelectedRowGuid(){return this.selectedRows?.[0]?.data?.guid}dblClickCustomAPIsGrid(){setTimeout(()=>{this.edit()},10)}clone(){var e=this;return(0,_.Z)(function*(){yield e.cloneApiModalC.showModal(e.getSelectedRowId(),null,function(){var i=(0,_.Z)(function*(s){s&&(yield e.loadTreeData()),e.cd.detectChanges()});return function(s){return i.apply(this,arguments)}}())})()}copyValue(e,i){var s=this;return(0,_.Z)(function*(){e.stopPropagation(),i&&((yield s.generalS.copyToClipboard(i))?s.notificationS.showSuccess(`Copied "${i}" to clipboard.`):s.notificationS.showError("Unable to copy to clipboard."))})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}ERequestMethod=J.Yp;EModelApiPaths=O.k4;static \u0275fac=function(i){return new(i||o)(n.Y36(k.d),n.Y36(C.b),n.Y36(Q.W),n.Y36(F.S),n.Y36(Y.D),n.Y36(B.L),n.Y36(q.u),n.Y36(n.sBO),n.Y36(p.F0),n.Y36(K.eN),n.Y36(u.YP))};static \u0275cmp=n.Xpm({type:o,selectors:[["app-custom-api-tree"]],viewQuery:function(i,s){if(1&i&&(n.Gf(tt,5),n.Gf(et,5)),2&i){let l;n.iGM(l=n.CRH())&&(s.FunManFormC=l.first),n.iGM(l=n.CRH())&&(s.cloneApiModalC=l.first)}},decls:30,vars:16,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["alt","Custom API",1,"fa-fw","mr-1",3,"src"],["href","https://docs.apimaker.dev/v1/docs/apis-all/custom-apis/user-created-custom-api.html","target","_blank"],[1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px",3,"src"],[1,"float-right","cursor-pointer","ml-3",3,"click"],["pTooltip","Grid View",1,"fas","fa-table","text-yellow","fa-fw"],["pTooltip","Collapse All","tooltipPosition","left",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-compress-alt","text-light","fa-fw"],["pTooltip","Expand All","tooltipPosition","left",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-expand-alt","text-light","fa-fw"],["pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3",3,"pTooltip","click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],[1,"h-100"],["scrollHeight","calc(100vh - 82px)","selectionMode","multiple",1,"w-full",3,"value","selection","selectionChange","dblclick"],["pTemplate","default"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"data"],["funManFormC",""],[3,"modalId","hostAndPort","modelApiPaths"],["cloneApiModalC",""],["pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-light","fa-fw"],[1,"float-right","cursor-pointer","ml-3",3,"pTooltip","click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],[1,"w-100","prevent-text-selection","cursor-pointer"],[4,"ngIf"],[1,"w-100",2,"table-layout","fixed"],[2,"width","30px"],[3,"ngModel","binary"],[2,"width","40%"],[1,"small","font-weight-bold","d-inline-block","mr-2",3,"ngClass"],[1,"copy-cell"],["tooltipPosition","left","pTooltip","Running on native process","class","ml-2 grid-pill-custom-api text-danger border",4,"ngIf"],["tooltipPosition","left","pTooltip","Caching enabled","class","ml-2 grid-pill-custom-api text-warning border",4,"ngIf"],["tooltipPosition","left","pTooltip","It has request body schema","class","ml-2 grid-pill-custom-api text-muted border",4,"ngIf"],["tooltipPosition","left","pTooltip","It has request query parameters schema","class","ml-2 grid-pill-custom-api text-muted border",4,"ngIf"],["tooltipPosition","left","pTooltip","It has separate sandbox","class","ml-2 grid-pill-custom-api text-muted border",4,"ngIf"],["class","fas fa-copy fa-fw ml-2 cursor-pointer text-muted copy-icon","pTooltip","Copy name","tooltipPosition","top",3,"click",4,"ngIf"],["class","fas fa-copy fa-fw ml-2 cursor-pointer text-muted copy-icon","pTooltip","Copy path","tooltipPosition","top",3,"click",4,"ngIf"],["class","d-inline-block small font-weight-bold font-monospaced ml-2",4,"ngIf"],["class","d-inline-block small font-weight-bold font-monospaced text-success ml-2",4,"ngIf"],["class","d-inline-block small font-weight-bold font-monospaced text-warning ml-2",4,"ngIf"],[2,"text-align","right"],["href","javascript:",1,"btn","btn-xsm-custom","mr-3",3,"routerLink","queryParams","click"],[1,"fas","fa-vial","text-info","fa-fw","test-tube","pt-1"],["tooltipPosition","left","pTooltip","Running on native process",1,"ml-2","grid-pill-custom-api","text-danger","border"],["tooltipPosition","left","pTooltip","Caching enabled",1,"ml-2","grid-pill-custom-api","text-warning","border"],["tooltipPosition","left","pTooltip","It has request body schema",1,"ml-2","grid-pill-custom-api","text-muted","border"],["tooltipPosition","left","pTooltip","It has request query parameters schema",1,"ml-2","grid-pill-custom-api","text-muted","border"],["tooltipPosition","left","pTooltip","It has separate sandbox",1,"ml-2","grid-pill-custom-api","text-muted","border"],[1,"fas","fa-box"],["pTooltip","Copy name","tooltipPosition","top",1,"fas","fa-copy","fa-fw","ml-2","cursor-pointer","text-muted","copy-icon",3,"click"],["pTooltip","Copy path","tooltipPosition","top",1,"fas","fa-copy","fa-fw","ml-2","cursor-pointer","text-muted","copy-icon",3,"click"],[1,"d-inline-block","small","font-weight-bold","font-monospaced","ml-2"],[1,"d-inline-block","small","font-weight-bold","font-monospaced","text-success","ml-2"],[1,"d-inline-block","small","font-weight-bold","font-monospaced","text-warning","ml-2"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,s){1&i&&(n.TgZ(0,"div",0)(1,"div",1)(2,"span"),n._UZ(3,"img",2),n.ALo(4,"themeIcon"),n._uU(5," Custom APIs"),n.qZA(),n.TgZ(6,"a",3),n._UZ(7,"img",4),n.ALo(8,"themeIcon"),n.qZA(),n.TgZ(9,"span")(10,"span",5),n.NdJ("click",function(){return s.navigateToGridView()}),n._UZ(11,"i",6),n.qZA(),n.TgZ(12,"span",7),n.NdJ("click",function(){return s.collapseAll()}),n._UZ(13,"i",8),n.qZA(),n.TgZ(14,"span",9),n.NdJ("click",function(){return s.expandAll()}),n._UZ(15,"i",10),n.qZA(),n.TgZ(16,"span",11),n.NdJ("click",function(){return s.add()}),n._UZ(17,"i",12),n.qZA(),n.YNc(18,nt,2,0,"span",13),n.YNc(19,ot,2,0,"span",14),n.YNc(20,it,2,1,"span",15),n.qZA()(),n.TgZ(21,"div",16)(22,"div",17)(23,"p-tree",18),n.NdJ("selectionChange",function(c){return s.selectedRows=c})("dblclick",function(){return s.dblClickCustomAPIsGrid()})("selectionChange",function(){return s.functionSelected()}),n.YNc(24,Mt,3,2,"ng-template",19),n.qZA(),n.YNc(25,It,1,0,"p-progressSpinner",20),n.qZA()()(),n._UZ(26,"app-w-fun-man-form",21,22)(28,"app-clone-api-modal",23,24)),2&i&&(n.xp6(3),n.Q6J("src",n.lcZ(4,12,"/assets/images/icons/custom.svg"),n.LSH),n.xp6(4),n.Q6J("src",n.lcZ(8,14,"/assets/images/logo/logo_docs.svg"),n.LSH),n.xp6(11),n.Q6J("ngIf",s.leafSelected),n.xp6(1),n.Q6J("ngIf",s.leafSelected),n.xp6(1),n.Q6J("ngIf",s.leafSelected||s.getSelectedLeafRows().length>1),n.xp6(3),n.Q6J("value",s.treeNodes)("selection",s.selectedRows),n.xp6(2),n.Q6J("ngIf",s.loading.grid),n.xp6(1),n.Q6J("data",s.data),n.xp6(2),n.Q6J("modalId","idCloneCustomAPITree")("hostAndPort",s.BE_HOST_PORT)("modelApiPaths",s.EModelApiPaths.CUSTOM_APIS))},dependencies:[p.rH,R.JJ,R.On,t.mk,t.O5,H.s,u.jx,W.mp,$.G,j.u,V.XZ,z.u,X.w],styles:[".custom-tab-title[_ngcontent-%COMP%]{padding:.5rem}.min-width[_ngcontent-%COMP%], .none[_ngcontent-%COMP%], .delete[_ngcontent-%COMP%], .post[_ngcontent-%COMP%], .put[_ngcontent-%COMP%], .get[_ngcontent-%COMP%]{width:45px;display:inline-block}.get[_ngcontent-%COMP%]{color:var(--accent-success)}.put[_ngcontent-%COMP%]{color:var(--brand-secondary)}.post[_ngcontent-%COMP%]{color:var(--accent-warning)}.delete[_ngcontent-%COMP%]{color:var(--accent-error)}.none[_ngcontent-%COMP%]{color:var(--accent-success--shade--three)}.width-160[_ngcontent-%COMP%]{width:160px}",".copy-cell[_ngcontent-%COMP%] .copy-icon[_ngcontent-%COMP%]{opacity:0;transition:opacity .15s ease-in-out}.copy-cell[_ngcontent-%COMP%]:hover .copy-icon[_ngcontent-%COMP%]{opacity:1}.copy-cell[_ngcontent-%COMP%] .copy-icon[_ngcontent-%COMP%]:hover{color:#0d6efd}"]})}return o})();var St=r(67987);const yt=[{path:"",redirectTo:"functions-tree",pathMatch:"full"},{path:"functions-tree",component:(()=>{class o{route;constructor(e){this.route=e}ngOnInit(){}static \u0275fac=function(i){return new(i||o)(n.Y36(p.gz))};static \u0275cmp=n.Xpm({type:o,selectors:[["app-fun-man-layout-tree"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1"]],template:function(i,s){1&i&&(n.TgZ(0,"div",0),n._UZ(1,"app-custom-api-tree"),n.qZA())},dependencies:[G],encapsulation:2})}return o})(),canActivate:[I.P]},{path:"functions",component:(()=>{class o{route;mode="tree";constructor(e){this.route=e}ngOnInit(){this.route.queryParams.subscribe(e=>{e.mode&&(this.mode=e.mode)})}static \u0275fac=function(i){return new(i||o)(n.Y36(p.gz))};static \u0275cmp=n.Xpm({type:o,selectors:[["app-fun-man-layout"]],decls:2,vars:1,consts:[[1,"pt-1","pl-1","pr-1"],[3,"showCheckbox"]],template:function(i,s){1&i&&(n.TgZ(0,"div",0),n._UZ(1,"app-custom-api-grid",1),n.qZA()),2&i&&(n.xp6(1),n.Q6J("showCheckbox",!0))},dependencies:[S.G],encapsulation:2})}return o})(),canActivate:[I.P]}];let wt=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=n.oAB({type:o});static \u0275inj=n.cJS({imports:[p.Bz.forChild(yt),L.u,St.X,N]})}return o})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[6236],{34491:(C,u,s)=>{s.d(u,{g:()=>ee});var m=s(15861),r=s(60095),c=s(33157),l=s(90328),E=s(59361),I=s(51162),p=s(20553),D=s(45085),M=s(91601),f=s(3531),h=s(39989),e=s(94946),v=s(99961),g=s(77240),O=s(27414),T=s(62694),A=s(95852),S=s(45809),U=s(53429),Z=s(32915),F=s(33835),z=s(96814),R=s(32660),b=s(5860),x=s(756),y=s(97680),P=s(14844),L=s(33259),B=s(25025),W=s(44879);const K=["insertCodeModalC"],N=["monacoEditorModalC"];function J(i,_){1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",27),e._uU(2," Add Process Initializer"),e.qZA())}function Y(i,_){1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",28),e._uU(2," View Process Initializer"),e.qZA())}function w(i,_){if(1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",29),e._uU(2," Edit Process Initializer "),e.TgZ(3,"span",30),e._uU(4),e.qZA()()),2&i){const o=e.oxw();e.xp6(4),e.Oqu(o.form.get("name").value)}}function V(i,_){1&i&&(e.TgZ(0,"span",39),e._uU(1,"You can not change name later, it can be used in script."),e.qZA())}function Q(i,_){if(1&i&&(e.TgZ(0,"div")(1,"form",31)(2,"div",32)(3,"label",33),e._uU(4,"Name"),e.qZA(),e.TgZ(5,"div",34),e._UZ(6,"input",35),e.YNc(7,V,2,0,"span",36),e.qZA()(),e.TgZ(8,"div",32)(9,"label",33),e._uU(10,"Order"),e.qZA(),e.TgZ(11,"div",34),e._UZ(12,"input",37),e.qZA()(),e.TgZ(13,"div",32)(14,"label",33),e._uU(15,"Timeout in minutes"),e.qZA(),e.TgZ(16,"div",34),e._UZ(17,"input",38),e.qZA()()()()),2&i){const o=e.oxw();e.xp6(1),e.Q6J("formGroup",o.form),e.xp6(6),e.Q6J("ngIf",o.data.mode===o.EFormMode.ADD)}}function H(i,_){if(1&i){const o=e.EpF();e.TgZ(0,"div",40)(1,"app-monaco-editor",41),e.NdJ("editorGenerated",function(t){e.CHM(o);const n=e.oxw();return e.KtG(n.editorGenerated(t))}),e.qZA()()}if(2&i){const o=e.oxw();e.xp6(1),e.Q6J("isSchemaEditor",!0)("editorOptions",o.editorOptionsProcessInitializer)}}function G(i,_){if(1&i){const o=e.EpF();e.TgZ(0,"a",42),e.NdJ("click",function(){e.CHM(o);const t=e.oxw();return e.KtG(t.viewError())}),e._uU(1,"View error"),e.qZA()}}function k(i,_){1&i&&(e.TgZ(0,"span"),e._uU(1,"Save"),e.qZA())}function j(i,_){1&i&&(e.TgZ(0,"span"),e._uU(1,"Update"),e.qZA())}function X(i,_){if(1&i){const o=e.EpF();e.TgZ(0,"button",43),e.NdJ("click",function(){e.CHM(o);const t=e.oxw();return e.KtG(t.save())}),e._UZ(1,"i",44),e.YNc(2,k,2,0,"span",4),e.YNc(3,j,2,0,"span",4),e.qZA()}if(2&i){const o=e.oxw();e.Q6J("disabled",o.form.invalid),e.xp6(2),e.Q6J("ngIf",o.data.mode===o.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",o.data.mode===o.EFormMode.EDIT)}}function q(i,_){1&i&&e._UZ(0,"p-progressSpinner",45)}let ee=(()=>{class i{fb;ns;generalS;constantsS;processInitializersS;authCS;monacoS;instanceS;eventCenterS;generalCS;userS;cd;data;loading={form:!1};EFormMode=l.D;form;subscriptions=[];formData;IEventData=c.F;id;BE_HOST_PORT=p.N.BE_HOST_PORT;DOCS_HOST_PORT=p.N.DOCS_HOST_PORT;instances=[];editorPI;editorOptionsProcessInitializer={readOnly:!1,language:"typescript",contextmenu:!0};lastError;editorOptionsMonacoEditorModal={readOnly:!0,language:"json",contextmenu:!0};insertCodeModalC;viewDockerfileModelC;shouldLoadMonacoEditor=!1;monacoDecorations=[];tab;constructor(o,a,t,n,d,oe,te,se,ae,ie,ne,re){this.fb=o,this.ns=a,this.generalS=t,this.constantsS=n,this.processInitializersS=d,this.authCS=oe,this.monacoS=te,this.instanceS=se,this.eventCenterS=ae,this.generalCS=ie,this.userS=ne,this.cd=re}ngOnInit(){var o=this;return(0,m.Z)(function*(){o.createForm(),o.subscriptions.push(o.data.eventChannel.subscribe(function(){var a=(0,m.Z)(function*(t){if(t)if(o.form.enable(),t.action===c.F.OPEN_FORM_IN_EDIT_MODE)yield o.editViewLoadData(),o.form.get("name").disable(),o.cd.detectChanges();else if(t.action===c.F.OPEN_FORM_IN_VIEW_MODE)yield o.editViewLoadData(),o.form.disable(),o.cd.detectChanges();else if(t.action===c.F.OPEN_FORM_IN_ADD_MODE){o.form.reset(),o.form.patchValue(t.data||{});const n=yield o.instanceS.getDefaultContent(o.BE_HOST_PORT,D.R.PROCESS_INITIALIZER).toPromise();o.editorOptionsProcessInitializer={readOnly:!1},o.generalCS.setValueInEditor(o,"editorPI",n.data),o.cd.detectChanges()}});return function(t){return a.apply(this,arguments)}}()))})()}editViewLoadData(){var o=this;return(0,m.Z)(function*(){const a=yield o.processInitializersS.queryOne({find:{guid:o.data.formData.guid,user:o.authCS.gUser._id}});o.form.reset(),o.form.patchValue(a),o.generalCS.setValueInEditor(o,"editorPI",a?.processInitializerCode||"")})()}createForm(){this.form=this.fb.group({name:[null,[r.kI.required]],order:[null,[r.kI.required]],processInitializerTimeoutInMinutes:[null,[]]})}showModal(){this.lastError=void 0,this.shouldLoadMonacoEditor=!0,setTimeout(()=>{$("#idProcessInitializerForm").modal("show")},100)}hideModal(){$("#idProcessInitializerForm").modal("hide")}save(){var o=this;return(0,m.Z)(function*(){const a=o.form.getRawValue();let t;t=o.data.formData&&o.data.formData._id?yield o.processInitializersS.queryOne({find:{guid:o.data.formData.guid,user:o.authCS.gUser._id}}):{};const n=Object.assign({},t,a);n.user=o.authCS.getUserId(),n.processInitializerCode=o.editorPI.getValue();try{let d;o.loading.form=!0,o.lastError=void 0,o.monacoS.clearEditorDecorations(o.editorPI,o.monacoDecorations),o.data.mode===l.D.ADD?d=yield o.processInitializersS.post(n).toPromise():o.data.mode===l.D.EDIT&&(d=yield o.processInitializersS.put(n._id,n,{select:I.iH._id}).toPromise()),o.ns.showSuccess(o.data.mode===l.D.ADD?o.constantsS.processInitializer.addSuccess:o.constantsS.processInitializer.editSuccess),o.data.eventChannel.emit({action:o.data.mode===l.D.ADD?c.F.SAVED:c.F.UPDATED,data:d}),o.eventCenterS.processInitializersSavedAndUpdate.next(!0),o.loading.form=!1}catch(d){o.loading.form=!1,o.ns.showErrorFromResponse(d.error||d,"Unable to save process initializer."),o.lastError=d.error,o.tab=o.tab||{},o.tab.axiosResponse={data:d.error},o.monacoS.highlightErrorInMonacoEditor(o.editorPI,o.tab,"MainSandbox.ts",o.monacoDecorations)}o.cd.detectChanges()})()}showInsertCodeModel(){this.generalCS.messageReceivedFor=E.H.All,this.insertCodeModalC.showModal(f.b.ProcessInitializersFormC).then()}editorGenerated(o){var a=this;return(0,m.Z)(function*(){a.editorPI=o,yield a.monacoS.loadSchemaEditorSettings(a.BE_HOST_PORT,a.authCS.getUserId(),null),a.monacoS.addSaveCodeKeyBinding(o,t=>{a.form.valid&&a.save()}),a.monacoS.addInsertCodeKeyBinding(o,t=>{a.generalCS.messageReceivedFor=E.H.All,a.data.mode!==l.D.VIEW&&a.insertCodeModalC.showModal(f.b.ProcessInitializersFormC)}),a.subscriptions.push(a.generalS.messageReceived.subscribe(t=>{t.type&&t.type===h.g.TEXT_COPIED&&t.componentName===f.b.ProcessInitializersFormC&&(a.monacoS.insertAtCursor(o,t.selectedText),a.insertCodeModalC.hideModal())}))})()}viewError(){this.viewDockerfileModelC.showModal(this.generalS.stringify(this.lastError),M.d.json)}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions),this.eventCenterS.processInitializersSavedAndUpdate.next(!1)}static \u0275fac=function(a){return new(a||i)(e.Y36(r.qu),e.Y36(v.W),e.Y36(g.b),e.Y36(O.L),e.Y36(T.e),e.Y36(A.D),e.Y36(S.b),e.Y36(U.E),e.Y36(Z.u),e.Y36(g.b),e.Y36(F.K),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:i,selectors:[["app-process-initializers-form"]],viewQuery:function(a,t){if(1&a&&(e.Gf(K,5),e.Gf(N,5)),2&a){let n;e.iGM(n=e.CRH())&&(t.insertCodeModalC=n.first),e.iGM(n=e.CRH())&&(t.viewDockerfileModelC=n.first)}},inputs:{data:"data"},decls:33,vars:17,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idProcessInitializerForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close",3,"click"],["aria-hidden","true"],[1,"fas","fa-window-close"],["pTooltip","Insert Code","sava-no-dbl-click","",1,"cursor-pointer","mr-1",2,"font-size","1.4em",3,"click"],[1,"fas","fa-info-circle","text-info","fa-fw"],["href","https://docs.apimaker.dev/v1/docs/features/process-initializers.html","target","_blank"],[1,"fa-fw","ml-3","mr-1","mt-n2",2,"font-size","25px",3,"src"],[1,"modal-body","overflow-auto"],["header","Basic Info"],["header","Code"],["class","overflow-hidden","style","height: calc(100vh - 206px);",4,"ngIf"],[1,"modal-footer"],["href","javascript:;","class","text-danger",3,"click",4,"ngIf"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary",3,"click"],[1,"fas","fa-times","text-danger","fa-fw"],["class","btn btn-primary btn-sm","sava-no-dbl-click","","type","button",3,"disabled","click",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"frameId","modalId","docsHostPort"],["insertCodeModalC",""],[3,"modalId","editorOptionsMonacoEditorModal","modalTitle"],["monacoEditorModalC",""],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],[1,"ml-2","font-weight-normal","small","text-muted"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-3","col-form-label","col-form-label-sm","text-right"],[1,"col-7"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm"],["class","mt-1px small",4,"ngIf"],["formControlName","order","name","order","spellcheck","false","type","number","placeholder","Please provide order",1,"form-control","form-control-sm"],["formControlName","processInitializerTimeoutInMinutes","name","processInitializerTimeoutInMinutes","spellcheck","false","type","number","placeholder","10",1,"form-control","form-control-sm"],[1,"mt-1px","small"],[1,"overflow-hidden",2,"height","calc(100vh - 206px)"],[3,"isSchemaEditor","editorOptions","editorGenerated"],["href","javascript:;",1,"text-danger",3,"click"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"disabled","click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(a,t){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,J,3,0,"span",4),e.YNc(5,Y,3,0,"span",4),e.YNc(6,w,5,1,"span",4),e.TgZ(7,"div",5)(8,"button",6),e.NdJ("click",function(){return t.hideModal()}),e.TgZ(9,"span",7),e._UZ(10,"i",8),e.qZA()(),e.TgZ(11,"span",9),e.NdJ("click",function(){return t.showInsertCodeModel()}),e._UZ(12,"i",10),e.qZA(),e.TgZ(13,"a",11),e._UZ(14,"img",12),e.ALo(15,"themeIcon"),e.qZA()()(),e.TgZ(16,"div",13)(17,"p-tabView")(18,"p-tabPanel",14),e.YNc(19,Q,18,2,"div",4),e.qZA(),e.TgZ(20,"p-tabPanel",15),e.YNc(21,H,2,2,"div",16),e.qZA()()(),e.TgZ(22,"div",17),e.YNc(23,G,2,0,"a",18),e.TgZ(24,"button",19),e.NdJ("click",function(){return t.hideModal()}),e._UZ(25,"i",20),e._uU(26," Close"),e.qZA(),e.YNc(27,X,4,3,"button",21),e.qZA(),e.YNc(28,q,1,0,"p-progressSpinner",22),e.qZA()()(),e._UZ(29,"app-insert-code-modal",23,24)(31,"app-monaco-editor-modal",25,26)),2&a&&(e.xp6(4),e.Q6J("ngIf",t.data.mode===t.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",t.data.mode===t.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",t.data.mode===t.EFormMode.EDIT),e.xp6(8),e.Q6J("src",e.lcZ(15,15,"/assets/images/logo/logo_docs.svg"),e.LSH),e.xp6(5),e.Q6J("ngIf",t.shouldLoadMonacoEditor),e.xp6(2),e.Q6J("ngIf",t.shouldLoadMonacoEditor),e.xp6(2),e.Q6J("ngIf",t.lastError),e.xp6(4),e.Q6J("ngIf",t.data.mode!==t.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",t.loading.form),e.xp6(1),e.Q6J("frameId","idInsertCodeDbMig")("modalId","idInsertCodeDbMigForm")("docsHostPort",t.DOCS_HOST_PORT),e.xp6(2),e.Q6J("modalId","idMonacoEditorModalInSysProcessInitializer")("editorOptionsMonacoEditorModal",t.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[r._Y,r.Fj,r.wV,r.JJ,r.JL,r.sg,r.u,z.O5,R.y,b.P,x.O,y.G,P.xf,P.x4,L.u,B.A,W.w],encapsulation:2,changeDetection:0})}return i})()},56236:(C,u,s)=>{s.d(u,{e:()=>I});var m=s(17017),c=(s(34491),s(44950)),l=s(94946);let I=(()=>{class p{static \u0275fac=function(f){return new(f||p)};static \u0275mod=l.oAB({type:p});static \u0275inj=l.cJS({imports:[m.u,c.A]})}return p})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[6393],{66393:(ut,v,s)=>{s.r(v),s.d(v,{AdminUserM:()=>pt});var b=s(77664),D=s(17017),t=s(94946),g=s(77240),m=s(15861),d=s(33157),p=s(90328),f=s(56212),F=s(6990),h=s(60921),_=s(51162),w=s(33835),A=s(99961),U=s(85219),O=s(92189),y=s(90204),E=s(32915),u=s(96814),T=s(95431),Z=s(97680),P=s(33259),l=s(60095),x=s(20553),N=s(95852),k=s(32660),J=s(45609);function Y(o,r){1&o&&(t.TgZ(0,"span"),t._UZ(1,"i",29),t._uU(2," Add User"),t.qZA())}function Q(o,r){1&o&&(t.TgZ(0,"span"),t._UZ(1,"i",30),t._uU(2," View User"),t.qZA())}function q(o,r){1&o&&(t.TgZ(0,"span"),t._UZ(1,"i",31),t._uU(2," Edit User"),t.qZA())}function R(o,r){1&o&&(t.TgZ(0,"small",32),t._uU(1,"Name is required."),t.qZA())}function G(o,r){if(1&o&&(t.TgZ(0,"small",32),t._uU(1),t.qZA()),2&o){const e=t.oxw();t.xp6(1),t.hij(" ",null!=e.form.get("email").errors&&e.form.get("email").errors.required?"Email is required.":"Please provide a valid email address."," ")}}function V(o,r){1&o&&(t.TgZ(0,"span",12),t._uU(1,"*"),t.qZA())}function H(o,r){1&o&&(t.TgZ(0,"small",32),t._uU(1,"Password must be 4\u201340 characters."),t.qZA())}function L(o,r){1&o&&(t.TgZ(0,"small",39),t._uU(1,"Leave blank to keep the current password."),t.qZA())}function K(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"div",10)(1,"label",11),t._uU(2," Password "),t.YNc(3,V,2,0,"span",33),t.qZA(),t.TgZ(4,"div",13)(5,"div",34),t._UZ(6,"input",35),t.TgZ(7,"span",36),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.showPassword=!n.showPassword)}),t._UZ(8,"i",37),t.qZA()(),t.YNc(9,H,2,0,"small",15),t.YNc(10,L,2,0,"small",38),t.qZA()()}if(2&o){const e=t.oxw();t.xp6(3),t.Q6J("ngIf",e.data.mode===e.EFormMode.ADD),t.xp6(3),t.ekj("is-invalid",e.invalid("password")),t.Q6J("type",e.showPassword?"text":"password"),t.xp6(1),t.Q6J("pTooltip",e.showPassword?"Hide password":"Show password"),t.xp6(1),t.Q6J("ngClass",e.showPassword?"fa-eye-slash":"fa-eye"),t.xp6(1),t.Q6J("ngIf",e.invalid("password")),t.xp6(1),t.Q6J("ngIf",!e.invalid("password")&&e.data.mode===e.EFormMode.EDIT)}}function W(o,r){1&o&&(t.TgZ(0,"small",32),t._uU(1,"API path must be 3\u201325 lowercase letters or digits (a\u2013z, 0\u20139)."),t.qZA())}function j(o,r){1&o&&(t.TgZ(0,"small",40),t._uU(1,"[a-z0-9] \xa0\xb7\xa0 e.g. "),t.TgZ(2,"span",41),t._uU(3,"myapp"),t.qZA()())}function B(o,r){1&o&&(t.TgZ(0,"span"),t._uU(1,"Save User"),t.qZA())}function z(o,r){1&o&&(t.TgZ(0,"span"),t._uU(1,"Update User"),t.qZA())}function X(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"button",42),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.save())}),t._UZ(1,"i",43),t.YNc(2,B,2,0,"span",4),t.YNc(3,z,2,0,"span",4),t.qZA()}if(2&o){const e=t.oxw();t.Q6J("disabled",e.form.invalid),t.xp6(2),t.Q6J("ngIf",e.data.mode===e.EFormMode.ADD),t.xp6(1),t.Q6J("ngIf",e.data.mode===e.EFormMode.EDIT)}}function tt(o,r){1&o&&t._UZ(0,"p-progressSpinner",44)}let I=(()=>{class o{fb;ns;userS;generalS;constantsCS;authCS;data;loading={form:!1};EFormMode=p.D;form;subscriptions=[];showPassword=!1;constructor(e,i,n,a,c,C){this.fb=e,this.ns=i,this.userS=n,this.generalS=a,this.constantsCS=c,this.authCS=C}ngOnInit(){var e=this;this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var i=(0,m.Z)(function*(n){if(n)if(e.form.enable(),n.action===d.F.OPEN_FORM_IN_EDIT_MODE){const a=yield e.userS.getById(e.data.formData._id).toPromise();e.form.reset(),e.form.patchValue(a.data),e.form.get("password").setValidators([]),e.form.get("password").updateValueAndValidity()}else if(n.action===d.F.OPEN_FORM_IN_VIEW_MODE){const a=yield e.userS.getById(e.data.formData._id).toPromise();e.form.reset(),e.form.patchValue(a.data),e.form.disable()}else n.action===d.F.OPEN_FORM_IN_ADD_MODE&&(e.form.reset(),e.form.get("active").setValue(!0),e.form.get("password").setValidators([l.kI.required,l.kI.minLength(4),l.kI.maxLength(40)]),e.form.get("password").updateValueAndValidity())});return function(n){return i.apply(this,arguments)}}()))}createForm(){this.form=this.fb.group({name:[null,[l.kI.required]],email:[null,[l.kI.required,l.kI.email]],apiPath:[null,[l.kI.required,l.kI.minLength(3),l.kI.maxLength(25),l.kI.pattern("[a-z0-9]*")]],password:[null,[]],active:[!0,[]]})}invalid(e){const i=this.form.get(e);return!!i&&i.invalid&&(i.touched||i.dirty)}showModal(){this.showPassword=!1,$("#idAMUsersForm").modal("show")}hideModal(){$("#idAMUsersForm").modal("hide")}save(){var e=this;return(0,m.Z)(function*(){const i=e.form.getRawValue();i.user=e.authCS.getUserId(),i.userType=h.d.ADMIN;try{let n;e.loading.form=!0,e.data.mode===p.D.ADD?(i.password=e.generalS.getEncryptedString(i.password,x.N.crypto.passCommunication),n=yield e.userS.post(i).toPromise(),e.ns.showSuccess(e.constantsCS.user.addSuccess)):e.data.mode===p.D.EDIT&&(e.data.formData._id&&(i.userType=e.data.formData.userType,e.form.get("password").value?i.password=e.generalS.getEncryptedString(i.password,x.N.crypto.passCommunication):delete i.password),n=yield e.userS.put(e.data.formData._id,i,{select:_.iH._id}).toPromise(),e.ns.showSuccess(e.constantsCS.user.editSuccess)),e.data.eventChannel.emit({action:e.data.mode===p.D.ADD?d.F.SAVED:d.F.UPDATED}),e.loading.form=!1}catch(n){e.loading.form=!1,e.ns.showErrorFromResponse(n.error||n,"Unable to save user info.")}})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(i){return new(i||o)(t.Y36(l.qu),t.Y36(A.W),t.Y36(w.K),t.Y36(g.b),t.Y36(y.s),t.Y36(N.D))};static \u0275cmp=t.Xpm({type:o,selectors:[["app-w-admin-user-form"]],inputs:{data:"data"},decls:49,vars:17,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idAMUsersForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body","overflow-auto"],[1,"container","pt-3","ui-form",3,"formGroup"],[1,"form-group","row"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"text-danger"],[1,"col-8"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm"],["class","ui-hint ui-hint--error",4,"ngIf"],["formControlName","email","name","email","spellcheck","false","type","text","placeholder","Please provide email",1,"form-control","form-control-sm"],["class","form-group row",4,"ngIf"],["formControlName","apiPath","name","apiPath","spellcheck","false","type","text","placeholder","Please provide api path",1,"form-control","text-lowercase","form-control-sm"],["class","ui-hint font-monospaced",4,"ngIf"],[1,"form-group","row","switch-row"],[1,"col-4","col-form-label","col-form-label-sm","text-right","switch-row__label"],[1,"col-8","switch-row__control"],["formControlName","active"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["class","btn btn-primary btn-sm","sava-no-dbl-click","","type","button",3,"disabled","click",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],[1,"ui-hint","ui-hint--error"],["class","text-danger",4,"ngIf"],[1,"input-group","input-group-sm"],["formControlName","password","name","password","spellcheck","false","autocomplete","new-password","placeholder","Please provide password",1,"form-control","form-control-sm",3,"type"],[1,"input-group-text","input-pwd-toggle","pl-3","pr-3","pt-0","pb-0","cursor-pointer",3,"pTooltip","click"],[1,"fas","fa-fw",3,"ngClass"],["class","ui-hint",4,"ngIf"],[1,"ui-hint"],[1,"ui-hint","font-monospaced"],[1,"ui-hint__em"],["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,n){1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),t.YNc(4,Y,3,0,"span",4),t.YNc(5,Q,3,0,"span",4),t.YNc(6,q,3,0,"span",4),t.TgZ(7,"button",5)(8,"span",6),t._UZ(9,"i",7),t.qZA()()(),t.TgZ(10,"div",8)(11,"form",9)(12,"div",10)(13,"label",11),t._uU(14,"Name "),t.TgZ(15,"span",12),t._uU(16,"*"),t.qZA()(),t.TgZ(17,"div",13),t._UZ(18,"input",14),t.YNc(19,R,2,0,"small",15),t.qZA()(),t.TgZ(20,"div",10)(21,"label",11),t._uU(22,"Email "),t.TgZ(23,"span",12),t._uU(24,"*"),t.qZA()(),t.TgZ(25,"div",13),t._UZ(26,"input",16),t.YNc(27,G,2,1,"small",15),t.qZA()(),t.YNc(28,K,11,8,"div",17),t.TgZ(29,"div",10)(30,"label",11),t._uU(31,"API Path "),t.TgZ(32,"span",12),t._uU(33,"*"),t.qZA()(),t.TgZ(34,"div",13),t._UZ(35,"input",18),t.YNc(36,W,2,0,"small",15),t.YNc(37,j,4,0,"small",19),t.qZA()(),t.TgZ(38,"div",20)(39,"label",21),t._uU(40,"Active"),t.qZA(),t.TgZ(41,"div",22),t._UZ(42,"p-inputSwitch",23),t.qZA()()()(),t.TgZ(43,"div",24)(44,"button",25),t._UZ(45,"i",26),t._uU(46," Close"),t.qZA(),t.YNc(47,X,4,3,"button",27),t.qZA(),t.YNc(48,tt,1,0,"p-progressSpinner",28),t.qZA()()()),2&i&&(t.xp6(4),t.Q6J("ngIf",n.data.mode===n.EFormMode.ADD),t.xp6(1),t.Q6J("ngIf",n.data.mode===n.EFormMode.VIEW),t.xp6(1),t.Q6J("ngIf",n.data.mode===n.EFormMode.EDIT),t.xp6(5),t.Q6J("formGroup",n.form),t.xp6(7),t.ekj("is-invalid",n.invalid("name")),t.xp6(1),t.Q6J("ngIf",n.invalid("name")),t.xp6(7),t.ekj("is-invalid",n.invalid("email")),t.xp6(1),t.Q6J("ngIf",n.invalid("email")),t.xp6(1),t.Q6J("ngIf",n.data.mode!==n.EFormMode.VIEW),t.xp6(7),t.ekj("is-invalid",n.invalid("apiPath")),t.xp6(1),t.Q6J("ngIf",n.invalid("apiPath")),t.xp6(1),t.Q6J("ngIf",!n.invalid("apiPath")),t.xp6(10),t.Q6J("ngIf",n.data.mode!==n.EFormMode.VIEW),t.xp6(1),t.Q6J("ngIf",n.loading.form))},dependencies:[l._Y,l.Fj,l.JJ,l.JL,l.sg,l.u,u.mk,u.O5,k.y,Z.G,P.u,J.Ql],styles:[".ui-form[_ngcontent-%COMP%] .form-group.row[_ngcontent-%COMP%]{margin-bottom:1.1rem;align-items:center}.ui-form[_ngcontent-%COMP%] .form-group.row[_ngcontent-%COMP%]:has(.ui-hint){align-items:flex-start}.ui-form[_ngcontent-%COMP%] .form-group.row[_ngcontent-%COMP%]:has(.ui-hint) > .col-form-label[_ngcontent-%COMP%]{padding-top:calc(.25rem + 1px)}.ui-hint[_ngcontent-%COMP%]{display:block;margin-top:.35rem;font-size:.74rem;color:#61afef;line-height:1.4}.ui-hint__em[_ngcontent-%COMP%]{color:#d7dae0}.ui-hint--error[_ngcontent-%COMP%]{color:#e06c75}.ui-form[_ngcontent-%COMP%] .form-group.row.switch-row[_ngcontent-%COMP%]{align-items:center;margin-bottom:1.1rem}.switch-row__label[_ngcontent-%COMP%]{margin-bottom:0}.switch-row__control[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:calc(1.5em + .5rem + 2px)}.switch-row__control[_ngcontent-%COMP%] .p-inputswitch{display:block}[_nghost-%COMP%] .form-control.is-invalid{border-color:#e06c75!important;box-shadow:none}[_nghost-%COMP%] .form-control.is-invalid:focus{box-shadow:0 0 0 .2rem #e06c754d!important}html.LIGHT[_nghost-%COMP%] .ui-hint[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .ui-hint[_ngcontent-%COMP%]{color:#0c53a4}html.LIGHT[_nghost-%COMP%] .ui-hint__em[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .ui-hint__em[_ngcontent-%COMP%]{color:#243446}html.LIGHT[_nghost-%COMP%] .ui-hint--error[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .ui-hint--error[_ngcontent-%COMP%]{color:#c0392b}html.LIGHT[_nghost-%COMP%] .form-control.is-invalid, html.LIGHT [_nghost-%COMP%] .form-control.is-invalid{border-color:#c0392b!important}"]})}return o})();const et=["adminUserFormC"];function nt(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"span",14),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.edit())}),t._UZ(1,"i",15),t.qZA()}}function ot(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"span",16),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.removePermanentDialog())}),t._UZ(1,"i",17),t.qZA()}}function it(o,r){1&o&&(t.TgZ(0,"tr")(1,"th"),t._uU(2,"Name"),t.qZA(),t.TgZ(3,"th"),t._uU(4,"Email"),t.qZA(),t.TgZ(5,"th"),t._uU(6,"API Path"),t.qZA(),t.TgZ(7,"th",18),t._uU(8,"Active"),t.qZA()())}function st(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"i",26),t.NdJ("click",function(n){t.CHM(e);const a=t.oxw().$implicit,c=t.oxw();return t.KtG(c.copyValue(n,a.name))}),t.qZA()}}function at(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"i",27),t.NdJ("click",function(n){t.CHM(e);const a=t.oxw().$implicit,c=t.oxw();return t.KtG(c.copyValue(n,a.email))}),t.qZA()}}function rt(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"i",28),t.NdJ("click",function(n){t.CHM(e);const a=t.oxw().$implicit,c=t.oxw();return t.KtG(c.copyValue(n,a.apiPath))}),t.qZA()}}function lt(o,r){if(1&o&&(t.TgZ(0,"tr",19)(1,"td")(2,"span",20)(3,"span"),t._uU(4),t.qZA(),t.YNc(5,st,1,0,"i",21),t.qZA()(),t.TgZ(6,"td")(7,"span",20)(8,"span"),t._uU(9),t.qZA(),t.YNc(10,at,1,0,"i",22),t.qZA()(),t.TgZ(11,"td")(12,"span",20)(13,"span"),t._uU(14),t.qZA(),t.YNc(15,rt,1,0,"i",23),t.qZA()(),t.TgZ(16,"td",24),t._UZ(17,"i",25),t.qZA()()),2&o){const e=r.$implicit;t.Q6J("pSelectableRow",e),t.xp6(4),t.Oqu(e.name),t.xp6(1),t.Q6J("ngIf",e.name),t.xp6(4),t.Oqu(e.email),t.xp6(1),t.Q6J("ngIf",e.email),t.xp6(4),t.Oqu(e.apiPath),t.xp6(1),t.Q6J("ngIf",e.apiPath),t.xp6(2),t.Q6J("ngClass",e.active?"fa-check-circle text-success":"fa-times-circle text-danger")("pTooltip",e.active?"Active":"Inactive")}}function ct(o,r){1&o&&t._UZ(0,"p-progressSpinner",29)}let M=(()=>{class o{userS;generalS;notificationS;confirmationService;navigationCS;constantsCS;eventCenterS;loading={grid:!1};subscriptions=[];data={mode:p.D.ADD,eventChannel:new t.vpe,formData:void 0};rows=[];rowsMap={};showAll=!0;selectedRows=[];gridKey=_.iH._id;adminUserFormC;constructor(e,i,n,a,c,C,ft){this.userS=e,this.generalS=i,this.notificationS=n,this.confirmationService=a,this.navigationCS=c,this.constantsCS=C,this.eventCenterS=ft}ngOnInit(){this.eventCenterS.user.selectedUsers.next([]),this.loadGridData(),this.subscriptions.push(this.data.eventChannel.subscribe(e=>{(e.action===d.F.SAVED||e.action===d.F.UPDATED)&&(this.adminUserFormC.hideModal(),this.loadGridData())}))}loadGridData(){var e=this;this.loading.grid=!0;const i={find:{active:!0,userType:{$in:[h.d.ROOT,h.d.ADMIN]}},select:{name:1,email:1,apiPath:1,active:1,userType:1},sort:{name:1}};this.showAll&&delete i.find.active,this.subscriptions.push(this.userS.query(i).subscribe(function(){var n=(0,m.Z)(function*(a){a.success&&(e.selectedRows=[],e.rows=a.data,e.rowsMap=F.keyBy(e.rows,_.iH._id));const c=e.navigationCS.getQueryParam(f.p.user);e.rowsMap[c]&&(e.eventCenterS.user.selectedUsers.next([e.rowsMap[c]]),e.selectedRows=[e.rowsMap[c]],yield e.fillData()),e.loading.grid=!1});return function(a){return n.apply(this,arguments)}}()))}add(){this.data.formData=void 0,this.data.mode=p.D.ADD,this.data.eventChannel.emit({action:d.F.OPEN_FORM_IN_ADD_MODE}),this.adminUserFormC.showModal()}view(){this.data.formData=this.selectedRows[0],this.data.mode=p.D.VIEW,this.data.eventChannel.emit({action:d.F.OPEN_FORM_IN_VIEW_MODE}),this.adminUserFormC.showModal()}edit(){this.data.formData=this.selectedRows[0],this.data.mode=p.D.EDIT,this.data.eventChannel.emit({action:d.F.OPEN_FORM_IN_EDIT_MODE}),this.adminUserFormC.showModal()}removePermanentDialog(){var e=this;return(0,m.Z)(function*(){var i;e.confirmationService.confirm({message:e.constantsCS.user.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,m.Z)(function*(){yield e.removePermanent()}),function(){return i.apply(this,arguments)})})})()}removePermanent(){var e=this;return(0,m.Z)(function*(){e.loading.grid=!0;const i=yield e.userS.permanentDelete(e.selectedRows[0]._id).toPromise();e.loading.grid=!1,i.success?(e.notificationS.showSuccess(e.constantsCS.user.removePermanent),e.resetSelectedRows(),e.loadGridData()):e.notificationS.showErrorFromResponse(i,e.constantsCS.user.removePermanentError)})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.user.selectedUsers.next([])}resetDependents(){var e=this;return(0,m.Z)(function*(){e.eventCenterS.user.selectedUsers.next([]),yield e.navigationCS.setQueryParam(f.p.user,null)})()}adminUserSelected(e){var i=this;return(0,m.Z)(function*(){i.selectedRows=e,i.resetDependents(),i.fillData()})()}fillData(){var e=this;return(0,m.Z)(function*(){if(!e.selectedRows.length)return yield e.navigationCS.setQueryParam(f.p.user,""),void e.eventCenterS.user.selectedUsers.next([]);const i=(yield e.userS.getById(e.selectedRows[0]._id).toPromise()).data;i._id?(yield e.navigationCS.setQueryParam(f.p.user,i._id),e.eventCenterS.user.selectedUsers.next([i])):e.resetDependents()})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickUsers(){this.selectedRows.length&&this.edit()}copyValue(e,i){var n=this;return(0,m.Z)(function*(){e.stopPropagation(),i&&((yield n.generalS.copyToClipboard(i))?n.notificationS.showSuccess(`Copied "${i}" to clipboard.`):n.notificationS.showError("Unable to copy to clipboard."))})()}static \u0275fac=function(i){return new(i||o)(t.Y36(w.K),t.Y36(g.b),t.Y36(A.W),t.Y36(U.YP),t.Y36(O.S),t.Y36(y.s),t.Y36(E.u))};static \u0275cmp=t.Xpm({type:o,selectors:[["app-w-admin-users"]],viewQuery:function(i,n){if(1&i&&t.Gf(et,5),2&i){let a;t.iGM(a=t.CRH())&&(n.adminUserFormC=a.first)}},decls:16,vars:10,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],[1,"fas","fa-users","text-info","fa-fw","mr-1"],["pTooltip","Add New","tooltipPosition","left",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","pTooltip","Edit","tooltipPosition","left",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Remove permananent","tooltipPosition","left",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 94px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"data"],["adminUserFormC",""],["pTooltip","Edit","tooltipPosition","left",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["pTooltip","Remove permananent","tooltipPosition","left",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],[1,"text-center",2,"width","70px"],[3,"pSelectableRow"],[1,"copy-cell"],["class","fas fa-copy fa-fw ml-2 cursor-pointer text-muted copy-icon","pTooltip","Copy name","tooltipPosition","top",3,"click",4,"ngIf"],["class","fas fa-copy fa-fw ml-2 cursor-pointer text-muted copy-icon","pTooltip","Copy email","tooltipPosition","top",3,"click",4,"ngIf"],["class","fas fa-copy fa-fw ml-2 cursor-pointer text-muted copy-icon","pTooltip","Copy API path","tooltipPosition","top",3,"click",4,"ngIf"],[1,"text-center"],[1,"fas","fa-fw",3,"ngClass","pTooltip"],["pTooltip","Copy name","tooltipPosition","top",1,"fas","fa-copy","fa-fw","ml-2","cursor-pointer","text-muted","copy-icon",3,"click"],["pTooltip","Copy email","tooltipPosition","top",1,"fas","fa-copy","fa-fw","ml-2","cursor-pointer","text-muted","copy-icon",3,"click"],["pTooltip","Copy API path","tooltipPosition","top",1,"fas","fa-copy","fa-fw","ml-2","cursor-pointer","text-muted","copy-icon",3,"click"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,n){1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span"),t._UZ(3,"i",2),t._uU(4," Users"),t.qZA(),t.TgZ(5,"span",3),t.NdJ("click",function(){return n.add()}),t._UZ(6,"i",4),t.qZA(),t.YNc(7,nt,2,0,"span",5),t.YNc(8,ot,2,0,"span",6),t.qZA(),t.TgZ(9,"div",7)(10,"p-table",8),t.NdJ("selectionChange",function(c){return n.selectedRows=c})("dblclick",function(){return n.dblClickUsers()})("selectionChange",function(c){return n.adminUserSelected(c)}),t.YNc(11,it,9,0,"ng-template",9),t.YNc(12,lt,18,9,"ng-template",10),t.qZA(),t.YNc(13,ct,1,0,"p-progressSpinner",11),t.qZA()(),t._UZ(14,"app-w-admin-user-form",12,13)),2&i&&(t.xp6(7),t.Q6J("ngIf",n.selectedRows.length),t.xp6(1),t.Q6J("ngIf",n.selectedRows.length),t.xp6(2),t.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",n.selectedRows)("dataKey",n.gridKey)("scrollable",!0)("value",n.rows),t.xp6(3),t.Q6J("ngIf",n.loading.grid),t.xp6(1),t.Q6J("data",n.data))},dependencies:[u.mk,u.O5,T.iA,U.jx,T.Ei,Z.G,P.u,I],styles:[".copy-cell[_ngcontent-%COMP%] .copy-icon[_ngcontent-%COMP%]{opacity:0;transition:opacity .15s ease-in-out}.copy-cell[_ngcontent-%COMP%]:hover .copy-icon[_ngcontent-%COMP%]{opacity:1}.copy-cell[_ngcontent-%COMP%] .copy-icon[_ngcontent-%COMP%]:hover{color:#0d6efd}"]})}return o})();const dt=[{path:"",component:(()=>{class o{generalS;constructor(e){this.generalS=e}ngOnInit(){this.generalS.setNewTitle("Admin Users")}static \u0275fac=function(i){return new(i||o)(t.Y36(g.b))};static \u0275cmp=t.Xpm({type:o,selectors:[["app-admin-user-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1"],[1,"w-100"]],template:function(i,n){1&i&&(t.TgZ(0,"div",0),t._UZ(1,"app-w-admin-users",1),t.qZA())},dependencies:[M],encapsulation:2})}return o})(),canActivate:[s(81490).g]}];let pt=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=t.oAB({type:o});static \u0275inj=t.cJS({imports:[b.Bz.forChild(dt),D.u]})}return o})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[6401],{36401:(et,F,i)=>{i.r(F),i.d(F,{GroupM:()=>Xe});var B=i(77664),W=i(17017),K=i(63726),L=i(81025),x=i(45085),e=i(94946),w=i(32915),A=i(85219),H=i(55043),V=i(63885),j=i(559),z=i(86937),X=i(80740),ee=i(37595),te=i(79329),ne=i(40356),se=i(53824),ae=i(58651),oe=i(72726),c=i(15861),v=i(33157),y=i(90328),g=i(56212),d=i(6990),m=i(51162),R=i(78883),N=i(53429),ie=i(67629),re=i(12559),le=i(10262),T=i(77240),U=i(99961),O=i(92189),P=i(95852),D=i(27414),pe=i(13065),ce=i(45312),M=i(96814),E=i(95431),Z=i(97680),J=i(33259),h=i(60095),de=i(32660);function ue(o,l){1&o&&(e.TgZ(0,"span"),e._UZ(1,"i",19),e._uU(2," Add Group"),e.qZA())}function ge(o,l){1&o&&(e.TgZ(0,"span"),e._UZ(1,"i",20),e._uU(2," View Group"),e.qZA())}function me(o,l){1&o&&(e.TgZ(0,"span"),e._UZ(1,"i",21),e._uU(2," Edit Group"),e.qZA())}function he(o,l){1&o&&(e.TgZ(0,"span"),e._uU(1,"Save Group"),e.qZA())}function fe(o,l){1&o&&(e.TgZ(0,"span"),e._uU(1,"Update Group"),e.qZA())}function Ce(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"button",22),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.save())}),e._UZ(1,"i",23),e.YNc(2,he,2,0,"span",4),e.YNc(3,fe,2,0,"span",4),e.qZA()}if(2&o){const t=e.oxw();e.Q6J("disabled",t.form.invalid),e.xp6(2),e.Q6J("ngIf",t.data.mode===t.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",t.data.mode===t.EFormMode.EDIT)}}function ve(o,l){1&o&&e._UZ(0,"p-progressSpinner",24)}let k=(()=>{class o{fb;ns;groupS;generalS;authCS;constantsS;data;loading={form:!1};EFormMode=y.D;form;subscriptions=[];constructor(t,s,n,a,r,u){this.fb=t,this.ns=s,this.groupS=n,this.generalS=a,this.authCS=r,this.constantsS=u}ngOnInit(){var t=this;this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var s=(0,c.Z)(function*(n){if(n)if(t.form.enable(),n.action===v.F.OPEN_FORM_IN_EDIT_MODE){const a=yield t.groupS.getById(t.data.formData._id).toPromise();t.form.reset(),t.form.patchValue(a.data)}else if(n.action===v.F.OPEN_FORM_IN_VIEW_MODE){const a=yield t.groupS.getById(t.data.formData._id).toPromise();t.form.reset(),t.form.patchValue(a.data),t.form.disable()}else n.action===v.F.OPEN_FORM_IN_ADD_MODE&&t.form.reset()});return function(n){return s.apply(this,arguments)}}()))}createForm(){this.form=this.fb.group({name:[null,[h.kI.required]]})}showModal(){$("#idGroupsForm").modal("show")}hideModal(){$("#idGroupsForm").modal("hide")}save(){var t=this;return(0,c.Z)(function*(){const s=t.form.getRawValue();let n;n=t.data.formData&&t.data.formData._id?(yield t.groupS.getById(t.data.formData._id).toPromise()).data:{};const a=Object.assign({},n,s);a.user=t.authCS.getUserId();try{let r;t.loading.form=!0,t.data.mode===y.D.ADD?r=yield t.groupS.post(a).toPromise():t.data.mode===y.D.EDIT&&(r=yield t.groupS.put(t.data.formData._id,a,{select:m.iH._id}).toPromise()),t.ns.showSuccess(t.data.mode===y.D.ADD?t.constantsS.group.addSuccess:t.constantsS.group.editSuccess),t.data.eventChannel.emit({action:t.data.mode===y.D.ADD?v.F.SAVED:v.F.UPDATED}),t.loading.form=!1}catch(r){t.loading.form=!1,t.ns.showErrorFromResponse(r.error||r,"Unable to save group.")}})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(s){return new(s||o)(e.Y36(h.qu),e.Y36(U.W),e.Y36(R.e),e.Y36(T.b),e.Y36(P.D),e.Y36(D.L))};static \u0275cmp=e.Xpm({type:o,selectors:[["app-w-groups-form"]],inputs:{data:"data"},decls:23,vars:6,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idGroupsForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body","overflow-auto"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-6"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["class","btn btn-primary btn-sm","sava-no-dbl-click","","type","button",3,"disabled","click",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"far","fa-eye","text-info","fa-fw","mr-1"],[1,"fas","fa-pencil-alt","text-light","fa-fw","mr-1"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"disabled","click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(s,n){1&s&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,ue,3,0,"span",4),e.YNc(5,ge,3,0,"span",4),e.YNc(6,me,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",14)(18,"button",15),e._UZ(19,"i",16),e._uU(20," Close"),e.qZA(),e.YNc(21,Ce,4,3,"button",17),e.qZA(),e.YNc(22,ve,1,0,"p-progressSpinner",18),e.qZA()()()),2&s&&(e.xp6(4),e.Q6J("ngIf",n.data.mode===n.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",n.data.mode===n.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",n.data.mode===n.EFormMode.EDIT),e.xp6(5),e.Q6J("formGroup",n.form),e.xp6(10),e.Q6J("ngIf",n.data.mode!==n.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",n.loading.form))},dependencies:[h._Y,h.Fj,h.JJ,h.JL,h.sg,h.u,M.O5,de.y,Z.G],encapsulation:2})}return o})();var Se=i(44879);const ye=["groupsFormC"];function _e(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"span",18),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.edit())}),e._UZ(1,"i",19),e.qZA()}}function be(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"span",20),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.clone())}),e._UZ(1,"i",21),e.qZA()}}function Ie(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"span",22),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.removePermanentDialog())}),e._UZ(1,"i",23),e.qZA()}}function we(o,l){1&o&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Name"),e.qZA(),e.TgZ(3,"th",24),e._UZ(4,"i",25),e.qZA(),e._UZ(5,"th",26),e.qZA())}function Ae(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"i",33),e.NdJ("click",function(n){e.CHM(t);const a=e.oxw().$implicit,r=e.oxw();return e.KtG(r.copyValue(n,a.name))}),e.qZA()}}function Te(o,l){if(1&o&&(e.TgZ(0,"span",34),e._uU(1),e.qZA()),2&o){const t=e.oxw().$implicit;e.Q6J("pTooltip",t.apiUsersCount+" active API user"+(1!==t.apiUsersCount?"s":"")),e.xp6(1),e.Oqu(t.apiUsersCount)}}function Me(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"i",35),e.NdJ("click",function(n){e.CHM(t);const a=e.oxw().$implicit,r=e.oxw();return e.KtG(r.saveGroupPermissions(n,a))}),e.qZA()}}function Ze(o,l){if(1&o&&(e.TgZ(0,"tr",27)(1,"td")(2,"span",28)(3,"span"),e._uU(4),e.qZA(),e.YNc(5,Ae,1,0,"i",29),e.qZA()(),e.TgZ(6,"td",30),e.YNc(7,Te,2,2,"span",31),e.qZA(),e.TgZ(8,"td"),e.YNc(9,Me,1,0,"i",32),e.qZA()()),2&o){const t=l.$implicit,s=e.oxw();e.Q6J("pSelectableRow",t),e.xp6(4),e.Oqu(t.name),e.xp6(1),e.Q6J("ngIf",t.name),e.xp6(2),e.Q6J("ngIf",null!=t.apiUsersCount),e.xp6(2),e.Q6J("ngIf",s.selectedRows.indexOf(t)>-1)}}function xe(o,l){1&o&&e._UZ(0,"p-progressSpinner",36)}let Y=(()=>{class o{groupS;instanceS;functionS;tpInstalledApisS;webSocketEventsS;generalS;notificationS;navigationCS;authCS;constantsS;apiS;eventCenterS;confirmationService;apiUserS;loading={grid:!1};subscriptions=[];data={mode:y.D.ADD,eventChannel:new e.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;selectedRows=[];gridKey=m.iH._id;groupsFormC;constructor(t,s,n,a,r,u,_,p,f,S,C,b,G,I){this.groupS=t,this.instanceS=s,this.functionS=n,this.tpInstalledApisS=a,this.webSocketEventsS=r,this.generalS=u,this.notificationS=_,this.navigationCS=p,this.authCS=f,this.constantsS=S,this.apiS=C,this.eventCenterS=b,this.confirmationService=G,this.apiUserS=I}ngOnInit(){this.eventCenterS.group.selectedGroups.next([]),this.loadGridData(),this.subscriptions.push(this.data.eventChannel.subscribe(t=>{(t.action===v.F.SAVED||t.action===v.F.UPDATED)&&(this.groupsFormC.hideModal(),this.loadGridData())})),this.generalS.setNewTitle("Groups")}loadGridData(){var t=this;this.loading.grid=!0;const s={find:{user:this.authCS.getUserId(),active:!0},select:{name:1,active:1},sort:{name:1}};this.showAll&&delete s.find.active,this.subscriptions.push(this.groupS.query(s).subscribe(function(){var n=(0,c.Z)(function*(a){a.success&&(t.selectedRows=[],t.rows=a.data,t.rowsMap=d.keyBy(t.rows,m.iH._id));const r=t.navigationCS.getQueryParam(g.p.group);t.rowsMap[r]&&(t.selectedRows.length=0,t.selectedRows.push(t.rowsMap[r]),yield t.fillData()),t.generalS.setNewTitle("Groups"),t.loading.grid=!1,t.loadApiUserCounts()});return function(a){return n.apply(this,arguments)}}()))}loadApiUserCounts(){var t=this;return(0,c.Z)(function*(){try{const n=(yield t.apiUserS.query({find:{active:!0,user:t.authCS.getUserId()},select:{groupNames:1}}).toPromise()).data||[];for(const a of t.rows)a.apiUsersCount=n.filter(r=>r.groupNames?.includes(a.name)).length}catch{for(const n of t.rows)n.apiUsersCount=null}})()}add(){this.data.formData=void 0,this.data.mode=y.D.ADD,this.data.eventChannel.emit({action:v.F.OPEN_FORM_IN_ADD_MODE}),this.groupsFormC.showModal()}view(){this.data.formData=this.selectedRows[0],this.data.mode=y.D.VIEW,this.data.eventChannel.emit({action:v.F.OPEN_FORM_IN_VIEW_MODE}),this.groupsFormC.showModal()}edit(){this.data.formData=this.selectedRows[0],this.data.mode=y.D.EDIT,this.data.eventChannel.emit({action:v.F.OPEN_FORM_IN_EDIT_MODE}),this.groupsFormC.showModal()}clone(){var t=this;return(0,c.Z)(function*(){try{if(!t.selectedRows[0])return;const s=(yield t.groupS.getById(t.selectedRows[0]._id).toPromise()).data;delete s._id,delete s.guid,delete s.queryParamsMap,s.name=`${s.name}-clone`,(yield t.groupS.post(s).toPromise()).success?(t.notificationS.showSuccess(t.constantsS.group.cloneSuccess),t.loadGridData()):t.notificationS.showSuccess(t.constantsS.group.cloneSuccess)}catch{t.notificationS.showError(t.constantsS.group.cloneError)}})()}removePermanentDialog(){var t=this;return(0,c.Z)(function*(){var s;t.confirmationService.confirm({message:t.constantsS.group.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(s=(0,c.Z)(function*(){yield t.removePermanent()}),function(){return s.apply(this,arguments)})})})()}removePermanent(){var t=this;return(0,c.Z)(function*(){t.loading.grid=!0;const s=yield t.groupS.permanentDelete(t.selectedRows[0]._id).toPromise();t.loading.grid=!1,s.success?(t.notificationS.showSuccess(t.constantsS.group.removePermanent),t.resetSelectedRows(),t.loadGridData()):t.notificationS.showErrorFromResponse(s,t.constantsS.group.removePermanentError)})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.group.selectedGroups.next([])}resetDependents(){var t=this;return(0,c.Z)(function*(){t.eventCenterS.group.selectedGroups.next([]),yield t.generalS.resetUrlParams([g.p.group,g.p.api_category]),t.eventCenterS.apiCategory.selectedApiCategory.next([]),t.eventCenterS.group.instanceIds.next([]),t.eventCenterS.group.databaseNames.next([]),t.eventCenterS.group.collectionNames.next([]),t.eventCenterS.group.supportedApiIds.next([]),t.eventCenterS.group.fields.next([]),t.eventCenterS.group.customApiIds.next([]),t.eventCenterS.group.thirdPartyApiIds.next([]),t.eventCenterS.group.systemApiIds.next([]),t.eventCenterS.group.webSocketIds.next([]),t.eventCenterS.group.apisRegex={}})()}groupSelected(){var t=this;return(0,c.Z)(function*(){yield t.resetDependents(),yield t.fillData()})()}fillData(){var t=this;return(0,c.Z)(function*(){if(!t.selectedRows.length)return void(yield t.resetDependents());const s=(yield t.groupS.getById(t.selectedRows[0]._id).toPromise()).data;s&&s.queryParams&&(t.eventCenterS.group.instanceIds.next((yield t.apiS.getIdArrFromNames(s.queryParams.instanceNames,t.instanceS))||[]),t.eventCenterS.group.databaseNames.next(s.queryParams.databaseNames||[]),t.eventCenterS.group.collectionNames.next(s.queryParams.collectionNames||[]),t.eventCenterS.group.supportedApiIds.next(s.queryParams.supportedApiNames||[]),t.eventCenterS.group.fields.next(s.queryParams.fields||[]),t.eventCenterS.group.customApiIds.next((yield t.apiS.getIdArrFromNames(s.queryParams.customApiNames,t.functionS))||[]),t.eventCenterS.group.systemApiIds.next(s.queryParams.systemApiNames||[]),t.eventCenterS.group.thirdPartyApiIds.next((yield t.apiS.getIdArrFromNames(s.queryParams.thirdPartyApiNames,t.tpInstalledApisS,x.R.THIRD_PARTY_APIS))||[]),t.eventCenterS.group.webSocketIds.next(yield t.apiS.getIdArrFromNamesWebSocketEvents(s.queryParams.webSocketEventNames))),s&&(t.eventCenterS.group.selectedGroups.next([s]),t.eventCenterS.group.apisRegex=s.apisRegex,yield t.navigationCS.setQueryParam(g.p.group,t.selectedRows[0]._id)),s?.queryParams||t.resetDependents()})()}saveGroupPermissions(t,s){var n=this;return(0,c.Z)(function*(){t.stopImmediatePropagation();const a=JSON.parse(JSON.stringify(s));a.fields=n.getPermissionMap(n.eventCenterS.group.schemaFields.value,["path","allowRead","allowWrite"]),a.apisRegex=n.eventCenterS.group.apisRegex,a.queryParams={},a.user=n.authCS.getUserId(),a.queryParams.instanceNames=yield n.apiS.getNameArrFromIds(n.eventCenterS.group.instanceIds.value,n.instanceS),a.queryParams.databaseNames=d.uniq(n.eventCenterS.group.databaseNames.value),a.queryParams.collectionNames=d.uniq(n.eventCenterS.group.collectionNames.value),a.queryParams.supportedApiNames=d.uniq(n.eventCenterS.group.supportedApiIds.value),a.queryParams.fields=d.uniq(n.eventCenterS.group.fields.value),a.queryParams.customApiNames=yield n.apiS.getNameArrFromIds(n.eventCenterS.group.customApiIds.value,n.functionS),a.queryParams.systemApiNames=d.uniq(n.eventCenterS.group.systemApiIds.value),a.queryParams.thirdPartyApiNames=yield n.apiS.getNameArrFromIds(n.eventCenterS.group.thirdPartyApiIds.value,n.tpInstalledApisS,x.R.THIRD_PARTY_APIS),a.queryParams.webSocketEventNames=yield n.apiS.getNameArrFromIdsWebSocketEvents(n.eventCenterS.group.webSocketIds.value);const r=yield n.groupS.put(a._id,a,{select:m.iH._id}).toPromise();r&&r.success&&n.notificationS.showSuccess(n.constantsS.group.editSuccess)})()}getPermissionMap(t,s){const n=s.slice(1),a=d.groupBy(t,m.W$.instanceName);for(const r in a){const u=a[r]=d.groupBy(a[r],m.W$.databaseName);for(const _ in u){const p=u[_]=d.groupBy(u[_],m.W$.collectionName);for(const f in p)if(1===s.length){const S={};for(const C of p[f])S[C[s[0]]]=!0;p[f]=S}else{const S={};for(const C of p[f])S[C[s[0]]]=d.pick(C,n);p[f]=S}}}return a}getPermissionMapThirdPartyAPIs(t){const s=d.groupBy(t,m.W$.apiBundleName);for(const n in s){if("undefined"===n){delete s[n];continue}const a=s[n]=d.groupBy(s[n],m.W$.apiVersionName);for(const r in a){if("undefined"===r){delete a[r];continue}const u=a[r]=d.groupBy(a[r],m.W$.apiName);for(const _ in u)"undefined"!==_?u[_]=!0:delete u[_]}}return s}getPermissionMapFunctionsAndWSEventAndSysApis(t){const s={};for(const n of t||[])s[n._id]=!0;return s}copyValue(t,s){var n=this;return(0,c.Z)(function*(){t.stopPropagation(),s&&((yield n.generalS.copyToClipboard(s))?n.notificationS.showSuccess(`Copied "${s}" to clipboard.`):n.notificationS.showError("Unable to copy to clipboard."))})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickGroups(){this.selectedRows.length&&this.edit()}static \u0275fac=function(s){return new(s||o)(e.Y36(R.e),e.Y36(N.E),e.Y36(ie.d),e.Y36(re.d),e.Y36(le.a),e.Y36(T.b),e.Y36(U.W),e.Y36(O.S),e.Y36(P.D),e.Y36(D.L),e.Y36(pe.k),e.Y36(w.u),e.Y36(A.YP),e.Y36(ce.q))};static \u0275cmp=e.Xpm({type:o,selectors:[["app-w-groups"]],viewQuery:function(s,n){if(1&s&&e.Gf(ye,5),2&s){let a;e.iGM(a=e.CRH())&&(n.groupsFormC=a.first)}},decls:22,vars:17,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["alt","API Group Permissions",1,"fa-fw","mr-1",3,"src"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/apis-security/api-group-permission.html","target","_blank"],[1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px",3,"src"],["pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped log-profile-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"],[3,"data"],["groupsFormC",""],["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","Active API users in this group","tooltipPosition","top",1,"text-center",2,"width","52px"],[1,"fas","fa-users","fa-fw","text-muted",2,"font-size","11px"],[2,"width","40px"],[3,"pSelectableRow"],[1,"copy-cell"],["class","fas fa-copy fa-fw ml-2 cursor-pointer text-muted copy-icon","pTooltip","Copy name","tooltipPosition","top",3,"click",4,"ngIf"],[1,"text-center"],["class","small text-muted","tooltipPosition","top",3,"pTooltip",4,"ngIf"],["class","fas fa-save text-success fa-fw cursor-pointer","pTooltip","Save group settings",3,"click",4,"ngIf"],["pTooltip","Copy name","tooltipPosition","top",1,"fas","fa-copy","fa-fw","ml-2","cursor-pointer","text-muted","copy-icon",3,"click"],["tooltipPosition","top",1,"small","text-muted",3,"pTooltip"],["pTooltip","Save group settings",1,"fas","fa-save","text-success","fa-fw","cursor-pointer",3,"click"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(s,n){1&s&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"img",2),e.ALo(4,"themeIcon"),e._uU(5," Groups"),e.qZA(),e.TgZ(6,"div",3)(7,"a",4),e._UZ(8,"img",5),e.ALo(9,"themeIcon"),e.qZA()(),e.TgZ(10,"span",6),e.NdJ("click",function(){return n.add()}),e._UZ(11,"i",7),e.qZA(),e.YNc(12,_e,2,0,"span",8),e.YNc(13,be,2,0,"span",9),e.YNc(14,Ie,2,0,"span",10),e.qZA(),e.TgZ(15,"div",11)(16,"p-table",12),e.NdJ("selectionChange",function(r){return n.selectedRows=r})("selectionChange",function(){return n.groupSelected()})("dblclick",function(){return n.dblClickGroups()}),e.YNc(17,we,6,0,"ng-template",13),e.YNc(18,Ze,10,5,"ng-template",14),e.qZA(),e.YNc(19,xe,1,0,"p-progressSpinner",15),e.qZA()(),e._UZ(20,"app-w-groups-form",16,17)),2&s&&(e.xp6(3),e.Q6J("src",e.lcZ(4,13,"/assets/images/icons/api-group.svg"),e.LSH),e.xp6(5),e.Q6J("src",e.lcZ(9,15,"/assets/images/logo/logo_docs.svg"),e.LSH),e.xp6(4),e.Q6J("ngIf",n.selectedRows.length),e.xp6(1),e.Q6J("ngIf",n.selectedRows.length),e.xp6(1),e.Q6J("ngIf",n.selectedRows.length),e.xp6(2),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",n.selectedRows)("dataKey",n.gridKey)("scrollable",!0)("value",n.rows),e.xp6(3),e.Q6J("ngIf",n.loading.grid),e.xp6(1),e.Q6J("data",n.data))},dependencies:[M.O5,E.iA,A.jx,E.Ei,Z.G,J.u,k,Se.w],styles:[".copy-cell[_ngcontent-%COMP%] .copy-icon[_ngcontent-%COMP%]{opacity:0;transition:opacity .15s ease-in-out}.copy-cell[_ngcontent-%COMP%]:hover .copy-icon[_ngcontent-%COMP%]{opacity:1}.copy-cell[_ngcontent-%COMP%] .copy-icon[_ngcontent-%COMP%]:hover{color:#0d6efd}"]})}return o})();var Ne=i(83620),Pe=i(91396),De=i(38057);function Ge(o,l){if(1&o&&(e.TgZ(0,"div")(1,"div",13),e._uU(2),e.qZA()()),2&o){const t=e.oxw();e.xp6(2),e.Oqu(t.constantsS.group.allFieldsPermitted)}}function Fe(o,l){if(1&o&&(e.TgZ(0,"span",21),e._uU(1),e.qZA()),2&o){const t=e.oxw().$implicit;e.xp6(1),e.AsE(" [",t.instanceName.substr(0,3).toUpperCase(),"] [",t.databaseName.substr(0,3).toUpperCase(),"] ")}}function Re(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"span",22)(1,"label",23)(2,"p-checkbox",24),e.NdJ("ngModelChange",function(n){e.CHM(t);const a=e.oxw().$implicit;return e.KtG(a.allowRead=n)})("click",function(n){e.CHM(t);const a=e.oxw().$implicit,r=e.oxw(2);return r.generalS.stopPropagation(n),e.KtG(r.removeDataItemFromSelectedRows(a))}),e.qZA()(),e.TgZ(3,"label",25)(4,"p-checkbox",26),e.NdJ("ngModelChange",function(n){e.CHM(t);const a=e.oxw().$implicit;return e.KtG(a.allowWrite=n)})("click",function(n){e.CHM(t);const a=e.oxw().$implicit,r=e.oxw(2);return r.generalS.stopPropagation(n),e.KtG(r.removeDataItemFromSelectedRows(a))}),e.qZA()()()}if(2&o){const t=e.oxw().$implicit;e.xp6(2),e.Q6J("ngModel",t.allowRead)("binary",!0),e.xp6(2),e.Q6J("ngModel",t.allowWrite)("binary",!0)}}function Ue(o,l){if(1&o&&(e.TgZ(0,"div",18),e._uU(1),e.YNc(2,Fe,2,2,"span",19),e.YNc(3,Re,5,4,"span",20),e.qZA()),2&o){const t=l.$implicit,s=e.oxw(2);e.xp6(1),e.hij(" ",t.label||t.name," "),e.xp6(1),e.Q6J("ngIf",t.level1),e.xp6(1),e.Q6J("ngIf",!t.level1&&(!t.children||0===t.children.length)&&s.selectedRows.indexOf(t)>=0)}}function Oe(o,l){1&o&&e._UZ(0,"p-progressSpinner",27)}function Ee(o,l){if(1&o){const t=e.EpF();e.TgZ(0,"div",14)(1,"p-tree",15),e.NdJ("selectionChange",function(n){e.CHM(t);const a=e.oxw();return e.KtG(a.selectedRows=n)})("selectionChange",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.checkedChange())})("onNodeSelect",function(n){e.CHM(t);const a=e.oxw();return e.KtG(a.nodeSelected(n))})("onNodeUnselect",function(n){e.CHM(t);const a=e.oxw();return e.KtG(a.nodeUnSelected(n))}),e.YNc(2,Ue,4,3,"ng-template",16),e.qZA(),e.YNc(3,Oe,1,0,"p-progressSpinner",17),e.qZA()}if(2&o){const t=e.oxw();e.xp6(1),e.Q6J("value",t.propertiesListData)("selection",t.selectedRows)("metaKeySelection",!1),e.xp6(2),e.Q6J("ngIf",t.loading.grid)}}let Q=(()=>{class o{instanceS;eventCenterS;constantsS;generalS;loading={grid:!1};subscriptions=[];propertiesListData=[];allTreeItemsMap={};selectedRows=[];checkedKeysMap={};key="_id";constructor(t,s,n,a){this.instanceS=t,this.eventCenterS=s,this.constantsS=n,this.generalS=a}ngOnInit(){var t=this;this.subscriptions.push(this.eventCenterS.collection.selectedCollections.pipe((0,Ne.b)(300)).subscribe(function(){var s=(0,c.Z)(function*(n){yield t.loadSchemas()});return function(n){return s.apply(this,arguments)}}()))}expandAll(){this.propertiesListData=this.generalS.setTreeExpansion(this.propertiesListData,!0)}collapseAll(){this.propertiesListData=this.generalS.setTreeExpansion(this.propertiesListData,!1)}loadSchemas(){var t=this;return(0,c.Z)(function*(){const s=t.eventCenterS.collection.selectedCollections.value;if(!s.length)return void(yield t.resetGridAndUrl());t.loading.grid=!0;const n=t.eventCenterS.group.selectedGroups.value[0];yield t.resetGridAndUrl(),t.allTreeItemsMap={};const a=(yield t.instanceS.getSchemas(s).toPromise()).data,r=[],u=[];for(const p of a){const f=[];if(p.propertyItems){const b=[];for(const G of p.propertyItems){const I=t.generalS.convertKTreeItemToPrimeNGTreeItem(G);t.setReadWriteRecursively(n,I),b.push(I),f.push(I)}u.push(b)}const S=p.instanceName+":"+p.databaseName+":"+p.collectionName,C={label:`${p.collectionName}`,children:f,_id:S,level1:!0,instanceName:p.instanceName,databaseName:p.databaseName,collectionName:p.collectionName};r.push(C),t.allTreeItemsMap[S]=C;for(const b of C?.children||[])b.parent=C}t.propertiesListData=r;for(const p of u)t.generateIdMap(p,t.allTreeItemsMap);if(t.eventCenterS.group.fields.value.join(",")){const p=d.intersection(d.keys(t.allTreeItemsMap),t.eventCenterS.group.fields.value);t.selectedRows=[];for(const f of p)t.allTreeItemsMap[f]&&t.selectedRows.push(t.allTreeItemsMap[f]);t.generalS.setDataInSelectedRowsFromIdArr(p,t.selectedRows,t.allTreeItemsMap),t.setDataInEventCenter()}t.loading.grid=!1})()}setReadWriteRecursively(t,s){const n=t?.fields?.[s.instanceName]?.[s.databaseName]?.[s.collectionName];if(!n)return;const a=n[s.path];if(a?(s.allowRead=a.allowRead,s.allowWrite=a.allowWrite):s.allowRead=s.allowWrite=!1,s.children&&s.children.length)for(const r of s.children)this.setReadWriteRecursively(t,r)}resetGridAndUrl(){var t=this;return(0,c.Z)(function*(){t.propertiesListData=[],t.allTreeItemsMap={},t.selectedRows=[],t.checkedKeysMap={},t.eventCenterS.group.schemaFields.next([])})()}checkedChange(){this.setDataInEventCenter()}nodeSelected(t){t.node.allowRead=!0}nodeUnSelected(t){const s=t.node;s.allowRead=!1,s.allowWrite=!1}removeDataItemFromSelectedRows(t){if(!t.allowRead&&!t.allowWrite){const s=this.selectedRows.indexOf(t);s>=0&&this.selectedRows.splice(s,1)}}calculateCheckedKeysMap(){this.checkedKeysMap={};for(const t of this.selectedRows)this.checkedKeysMap[t._id]=t}setDataInEventCenter(){this.calculateCheckedKeysMap(),this.eventCenterS.group.fields.next(d.map(this.selectedRows,"_id"));const t=[];for(const s of this.selectedRows)this.allTreeItemsMap[s._id]&&t.push(s);this.eventCenterS.group.schemaFields.next(t)}generateIdMap(t,s){if(Array.isArray(t))for(const n of t)this.generateIdMap(n,s);else s[t._id]=t,t.children&&this.generateIdMap(t.children,s)}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(s){return new(s||o)(e.Y36(N.E),e.Y36(w.u),e.Y36(D.L),e.Y36(T.b))};static \u0275cmp=e.Xpm({type:o,selectors:[["app-w-schema-fields"]],decls:15,vars:4,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],[1,"fas","fa-indent","text-success","fa-fw","mr-1"],["pTooltip","All Fields",1,"float-right","cursor-pointer"],[3,"ngModel","binary","ngModelChange"],["pTooltip","Collapse All","tooltipPosition","left",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-compress-alt","text-light","fa-fw"],["pTooltip","Expand All","tooltipPosition","left",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-expand-alt","text-light","fa-fw"],[1,"card-body","p-0","h-100","overflow-hidden"],[1,"position-relative","border-top","h-100"],[4,"ngIf"],["class","h-100",4,"ngIf"],[1,"p-2","text-center","text-success"],[1,"h-100"],["scrollHeight","flex","selectionMode","checkbox",1,"w-full",3,"value","selection","metaKeySelection","selectionChange","onNodeSelect","onNodeUnselect"],["pTemplate","default"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"w-100","prevent-text-selection","cursor-pointer"],["class","text-monospace font-weight-bold font-italic float-right mr-1","style","font-size: xx-small;",4,"ngIf"],["class","float-right small mr-2",4,"ngIf"],[1,"text-monospace","font-weight-bold","font-italic","float-right","mr-1",2,"font-size","xx-small"],[1,"float-right","small","mr-2"],[1,"align-middle","mb-0","mr-2"],["label","R",3,"ngModel","binary","ngModelChange","click"],[1,"align-middle","mb-0"],["label","W",3,"ngModel","binary","ngModelChange","click"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(s,n){1&s&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"i",2),e._uU(4," Schema Fields"),e.qZA(),e.TgZ(5,"span",3)(6,"p-checkbox",4),e.NdJ("ngModelChange",function(r){return n.eventCenterS.group.apisRegex.allFields=r}),e.qZA()(),e.TgZ(7,"span",5),e.NdJ("click",function(){return n.collapseAll()}),e._UZ(8,"i",6),e.qZA(),e.TgZ(9,"span",7),e.NdJ("click",function(){return n.expandAll()}),e._UZ(10,"i",8),e.qZA()(),e.TgZ(11,"div",9)(12,"div",10),e.YNc(13,Ge,3,1,"div",11),e.YNc(14,Ee,4,4,"div",12),e.qZA()()()),2&s&&(e.xp6(6),e.Q6J("ngModel",n.eventCenterS.group.apisRegex.allFields)("binary",!0),e.xp6(7),e.Q6J("ngIf",n.eventCenterS.group.apisRegex.allInstances||n.eventCenterS.group.apisRegex.allDatabases||n.eventCenterS.group.apisRegex.allCollections||n.eventCenterS.group.apisRegex.allFields),e.xp6(1),e.Q6J("ngIf",!(n.eventCenterS.group.apisRegex.allInstances||n.eventCenterS.group.apisRegex.allDatabases||n.eventCenterS.group.apisRegex.allCollections||n.eventCenterS.group.apisRegex.allFields)))},dependencies:[h.JJ,h.On,M.O5,A.jx,Pe.mp,Z.G,J.u,De.XZ],encapsulation:2})}return o})();function Je(o,l){if(1&o&&(e.TgZ(0,"div",21),e._UZ(1,"app-w-instances",10),e.qZA()),2&o){const t=e.oxw();e.xp6(1),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsDependentOnGroup",!0)("showHooksCount",!0)("groupFilter",t.selectedGroupName)}}function ke(o,l){if(1&o&&(e.TgZ(0,"div",22),e._UZ(1,"app-w-databases",10),e.qZA()),2&o){const t=e.oxw();e.xp6(1),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsDependentOnGroup",!0)("showHooksCount",!0)("groupFilter",t.selectedGroupName)}}const Ye=function(){return[50,50]};let q=(()=>{class o{eventCenterS;cd;EAPICategory=x.R;selectedGroupName=null;subscriptions=[];constructor(t,s){this.eventCenterS=t,this.cd=s}ngOnInit(){this.subscriptions.push(this.eventCenterS.group.selectedGroups.subscribe(t=>{this.selectedGroupName=t?.length?t[0].name:null,this.cd.detectChanges()}))}ngOnDestroy(){this.eventCenterS.group.apisRegex={};for(const t of this.subscriptions)t.unsubscribe()}static \u0275fac=function(s){return new(s||o)(e.Y36(w.u),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:o,selectors:[["app-group-layout"]],decls:34,vars:45,consts:[[1,"pt-1","pl-1","pr-1","overflow-auto"],[2,"width","max-content"],[1,"v-div","w-groups"],[1,"vertical-height-max"],[1,"v-div","w-categories"],[3,"typeIsGroup"],[1,"v-div","w-ins-db"],["layout","vertical",3,"panelSizes"],["pTemplate",""],[1,"v-div","w-collection"],[3,"metaKeySelection","IsReadOnly","IsDependentOnGroup","showHooksCount","groupFilter"],[1,"v-div","w-ins-apis"],[3,"isLPM","isDependentOnGroup","treeViewId","groupFilter"],[1,"v-div","w-schema-fields"],[1,"v-div","w-third-party"],[3,"IsDependentOnGroup","isLPM"],[1,"v-div","w-custom-apis"],[3,"metaKeySelection","IsReadOnly","IsDependentOnGroup","isLPM"],[1,"v-div","w-system-apis"],[1,"v-div","w-web-sockets"],[3,"metaKeySelection","IsReadOnly","IsDependentOnGroup","showCheckbox","isLPM"],[1,"vertical-height-instances","w-100"],[1,"vertical-height-db","w-100"]],template:function(s,n){1&s&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e._UZ(4,"app-w-groups"),e.qZA()(),e.TgZ(5,"div",4)(6,"div",3),e._UZ(7,"app-w-api-categories",5),e.qZA()(),e.TgZ(8,"div",6)(9,"p-splitter",7),e.YNc(10,Je,2,5,"ng-template",8),e.YNc(11,ke,2,5,"ng-template",8),e.qZA()(),e.TgZ(12,"div",9)(13,"div",3),e._UZ(14,"app-w-collections",10),e.qZA()(),e.TgZ(15,"div",11)(16,"div",3),e._UZ(17,"app-w-supported-api",12),e.qZA()(),e.TgZ(18,"div",13)(19,"div",3),e._UZ(20,"app-w-schema-fields"),e.qZA()(),e.TgZ(21,"div",14)(22,"div",3),e._UZ(23,"app-w-supported-tp-api",15),e.qZA()(),e.TgZ(24,"div",16)(25,"div",3),e._UZ(26,"app-custom-api-grid",17),e.qZA()(),e.TgZ(27,"div",18)(28,"div",3),e._UZ(29,"app-system-api-w",17),e.qZA()(),e.TgZ(30,"div",19)(31,"div",3),e._UZ(32,"app-web-socket-events-grid",20),e.qZA()()()(),e._UZ(33,"app-create-schema-form")),2&s&&(e.xp6(5),e.Udp("display",n.eventCenterS.group.selectedGroups.value.length?"block":"none"),e.xp6(2),e.Q6J("typeIsGroup","GROUP"),e.xp6(1),e.Udp("display",n.eventCenterS.group.selectedGroups.value.length&&(null==n.eventCenterS.apiCategory||null==n.eventCenterS.apiCategory.selectedApiCategory||null==n.eventCenterS.apiCategory.selectedApiCategory.value||null==n.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:n.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===n.EAPICategory.INSTANCES?"block":"none"),e.xp6(1),e.Q6J("panelSizes",e.DdM(44,Ye)),e.xp6(3),e.Udp("display",n.eventCenterS.group.selectedGroups.value.length&&(null==n.eventCenterS.apiCategory||null==n.eventCenterS.apiCategory.selectedApiCategory||null==n.eventCenterS.apiCategory.selectedApiCategory.value||null==n.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:n.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===n.EAPICategory.INSTANCES?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsDependentOnGroup",!0)("showHooksCount",!0)("groupFilter",n.selectedGroupName),e.xp6(1),e.Udp("display",n.eventCenterS.group.selectedGroups.value.length&&(null==n.eventCenterS.apiCategory||null==n.eventCenterS.apiCategory.selectedApiCategory||null==n.eventCenterS.apiCategory.selectedApiCategory.value||null==n.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:n.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===n.EAPICategory.INSTANCES?"block":"none"),e.xp6(2),e.Q6J("isLPM",!1)("isDependentOnGroup",!0)("treeViewId","treeViewFromGroupLayout")("groupFilter",n.selectedGroupName),e.xp6(1),e.Udp("display",n.eventCenterS.group.selectedGroups.value.length&&(null==n.eventCenterS.apiCategory||null==n.eventCenterS.apiCategory.selectedApiCategory||null==n.eventCenterS.apiCategory.selectedApiCategory.value||null==n.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:n.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===n.EAPICategory.INSTANCES?"block":"none"),e.xp6(3),e.Udp("display",n.eventCenterS.group.selectedGroups.value.length&&(null==n.eventCenterS.apiCategory||null==n.eventCenterS.apiCategory.selectedApiCategory||null==n.eventCenterS.apiCategory.selectedApiCategory.value||null==n.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:n.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===n.EAPICategory.THIRD_PARTY_APIS?"block":"none"),e.xp6(2),e.Q6J("IsDependentOnGroup",!0)("isLPM",!1),e.xp6(1),e.Udp("display",n.eventCenterS.group.selectedGroups.value.length&&(null==n.eventCenterS.apiCategory||null==n.eventCenterS.apiCategory.selectedApiCategory||null==n.eventCenterS.apiCategory.selectedApiCategory.value||null==n.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:n.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===n.EAPICategory.CUSTOM_APIS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsDependentOnGroup",!0)("isLPM",!1),e.xp6(1),e.Udp("display",n.eventCenterS.group.selectedGroups.value.length&&(null==n.eventCenterS.apiCategory||null==n.eventCenterS.apiCategory.selectedApiCategory||null==n.eventCenterS.apiCategory.selectedApiCategory.value||null==n.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:n.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===n.EAPICategory.SYSTEM_APIS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsDependentOnGroup",!0)("isLPM",!1),e.xp6(1),e.Udp("display",n.eventCenterS.group.selectedGroups.value.length&&(null==n.eventCenterS.apiCategory||null==n.eventCenterS.apiCategory.selectedApiCategory||null==n.eventCenterS.apiCategory.selectedApiCategory.value||null==n.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:n.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===n.EAPICategory.WEB_SOCKET_EVENT?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsDependentOnGroup",!0)("showCheckbox",!0)("isLPM",!1))},dependencies:[A.jx,H.q,V.f,j.O,z.n,X.c,ee.G,te.X,ne.T,se.d,ae.A,oe.x,Y,Q],styles:[".vertical-height-instances[_ngcontent-%COMP%]{height:248px}.vertical-height-db[_ngcontent-%COMP%]{height:calc(100vh - 320px)}.vertical-height-max[_ngcontent-%COMP%]{height:calc(100vh - 66px)}.v-div[_ngcontent-%COMP%]{display:inline-block;height:calc(100vh - 62px);float:left}.w-groups[_ngcontent-%COMP%]{width:22rem}.w-categories[_ngcontent-%COMP%]{width:17rem}.w-ins-db[_ngcontent-%COMP%]{width:30rem}.w-collection[_ngcontent-%COMP%]{width:33rem}.w-ins-apis[_ngcontent-%COMP%], .w-col-apis[_ngcontent-%COMP%], .w-schema-fields[_ngcontent-%COMP%]{width:35rem}.w-custom-apis[_ngcontent-%COMP%], .w-system-apis[_ngcontent-%COMP%], .w-third-party[_ngcontent-%COMP%], .w-web-sockets[_ngcontent-%COMP%]{width:calc(100vw - 39.5rem)}"]})}return o})();i(53965);var We=i(1678),Ke=i(95765),Le=i(64211),He=i(84186),Ve=i(2777),$e=i(57705),je=i(21434);const ze=[{path:"group-layout",component:q,canActivate:[K.P]}];let Xe=(()=>{class o{static \u0275fac=function(s){return new(s||o)};static \u0275mod=e.oAB({type:o});static \u0275inj=e.cJS({imports:[B.Bz.forChild(ze),W.u,We.DashboardM,Le.DbCellM,Ke.FunctionManM,He.SystemApiM,je.B,Ve.u,$e.L,L.WebSocketEventsM]})}return o})()}}]);
|