{"version":3,"sources":["webpack:///./src/components/authorizations/_CCFForm.vue?6ffd","webpack:///./src/services/authorizations/authorizationService.ts","webpack:///./src/components/authorizations/_CCFForm.vue?f95d","webpack:///./src/components/authorizations/_CCFForm.vue","webpack:///./src/components/authorizations/_CCFForm.vue?ce24","webpack:///./src/components/authorizations/_CCFForm.vue?2c53","webpack:///./src/components/authorizations/authorizationValidators.ts","webpack:///./src/directives/validate.ts","webpack:///./src/services/authorizations/types.ts","webpack:///./src/components/common/modals/UnsavedFormModal.vue?2f75","webpack:///./src/components/common/modals/UnsavedFormModal.vue","webpack:///./src/components/common/modals/UnsavedFormModal.vue?d3fc","webpack:///./src/components/common/modals/UnsavedFormModal.vue?8c30","webpack:///./src/components/layouts/HeaderActionButtons.vue?3b8a","webpack:///./src/components/layouts/HeaderActionButtons.vue?2810","webpack:///./src/components/layouts/HeaderActionButtons.vue","webpack:///./src/components/layouts/HeaderActionButtons.vue?0d84","webpack:///./src/components/layouts/HeaderActionButtons.vue?1c9a"],"names":["getAllAuthorizations","a","Promise","resolve","reject","get","then","response","data","error","getAuthorization","id","getAuthorizationInfo","getRedirectUri","createAuthorization","authorization","post","updateAuthorization","put","deleteAuthorization","delete","getOAuthJwtToken","render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","i18n","t","validators","credentialsName","model","value","callback","$$v","$set","expression","preventBack","preventSave","on","back","save","$event","stopPropagation","preventDefault","_v","_s","$t","flowTypesEnum","flowType","toLowerCase","redirectUri","directives","name","rawName","clientId","state","clientSecret","scopes","tenantId","formatDate","lastAuthorizationSuccessDate","_e","lastAuthorizationRequestDate","authorized","lastErrorMessage","initiateAuthorization","externalAuthorizationLink","copyExternalAuthorizeLink","ref","onContinue","staticRenderFns","ClientCredentialFlow","url","priorAuthorizationState","JSON","parse","stringify","authorizationValidators","nextRoute","routeParams","saveClicked","continue","fetchingActive","fetchData","window","addEventListener","event","storageArea","localStorage","key","newValue","setItem","authorizationId","$router","push","params","external","token","authorizationLink","encodeURI","authPopupWindow","navigator","clipboard","writeText","title","w","h","dualScreenLeft","undefined","screenLeft","screenX","dualScreenTop","screenTop","screenY","width","innerWidth","document","documentElement","clientWidth","screen","height","innerHeight","clientHeight","systemZoom","availWidth","left","top","newWindow","open","focus","date","utc","local","format","to","next","noChanges","lodash","isEqual","$refs","UnsavedFormModal","beforeRouteLeave","from","onBeforeRouteLeave","components","HeaderActionButtons","validate","component","rules","type","Required","Min","username","password","bind","element","binding","vNode","componentContext","context","el","property","set","confirm","matchRule","find","x","Confirm","confirmProperty","message","update","unbind","FlowTypesEnum","scopedSlots","_u","fn","decline","proxy","$bvModal","show","$emit","hide","class","sticky","showSaveButton","isAdmin","saveAndBack","editorStatus","namespace","permitionEnum","havePermition","$route","getCurrentUser","permissions","AdminPrivilege","checkPermition","default","abg","inserted","vnode","offset","pageYOffset","getBoundingClientRect","doc","scrollTop","clientTop","removeEventListener"],"mappings":"kHAAA,yBAAyf,EAAG,G,qpBCMrf,SAAeA,IAAtB,+B,kCAAO,sBAAAC,EAAA,gFACI,IAAIC,SAAQ,SAACC,EAASC,GACzB,OAAIC,IAAI,UAAUC,MACd,SAAAC,GACIJ,EAAQI,EAASC,SAErB,SAAAC,GACIL,EAAOK,UAPhB,2C,wBAaA,SAAeC,EAAtB,kC,kCAAO,WAAgCC,GAAhC,SAAAV,EAAA,gFACI,IAAIC,SAAQ,SAACC,EAASC,GACzB,OAAIC,IAAJ,iBAAkBM,IAAML,MACpB,SAAAC,GACIJ,EAAQI,EAASC,SAErB,SAAAC,GACIL,EAAOK,UAPhB,2C,wBAaA,SAAeG,EAAtB,kC,kCAAO,WAAoCD,GAApC,SAAAV,EAAA,gFACI,IAAIC,SAAQ,SAACC,EAASC,GACzB,OAAIC,IAAJ,sBAAuBM,IAAML,MACzB,SAAAC,GACIJ,EAAQI,EAASC,SAErB,SAAAC,GACIL,EAAOK,UAPhB,2C,wBAaA,SAAeI,IAAtB,+B,kCAAO,sBAAAZ,EAAA,gFACI,IAAIC,SAAQ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K0K,cAAcK,mBAblD,qCAsCQ,OAA+B,OAAxB/K,KAAKgL,qBAAmDvF,IAAxBzF,KAAKgL,gBACtChL,KAAK2K,cAAc3K,KAAK6K,eAAeC,YAAa9K,KAAK0K,cAAc1K,KAAKgL,qBAvC1F,GAAiD,QACrC,gBAAP,kB,qCACyB,gBAAzB,eAAK,CAAEC,SAAS,K,kCACS,gBAAzB,eAAK,CAAEA,SAAS,K,kCACwB,gBAAxC,eAAO,iBAAkB,CAAER,e,qCAJX,EAAmB,gBAnBvC,eAAU,CACPzI,WAAY,CACRkJ,IAAK,CACDC,SAAU,SAAU3C,EAASC,EAAS2C,GAClC,IAAIC,EAAUpH,OAAOqH,YAAc9C,EAAQ+C,wBAAwB5E,IAAO,GAC1E,EAAS,WACL,IAAI6E,EAAMvF,SAASC,gBACfS,GAAO1C,OAAOqH,aAAeE,EAAIC,YAAcD,EAAIE,WAAa,GAChDN,EAAMxC,QAAgBwB,OAAtCzD,GAAO0E,GAGfpH,OAAOC,iBAAiB,SAAU,GAAQ,IAE9CsF,OAAQ,SAAUhB,EAASC,EAAS2C,GAChCnH,OAAO0H,oBAAoB,SAAU,GAAQ,SAKxC,WCvD2Y,I,wBCQ5Z3D,EAAY,eACd,EACAlI,EACAqD,GACA,EACA,KACA,WACA,MAIa,OAAA6E,E","file":"js/chunk-282b5f0b.a07a6bfe.js","sourcesContent":["import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./_CCFForm.vue?vue&type=style&index=0&id=ea623fd6&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./_CCFForm.vue?vue&type=style&index=0&id=ea623fd6&scoped=true&lang=css&\"","import api from \"@/services/api\";\r\nimport {\r\n Authorization,\r\n AuthorizationInfo\r\n} from \"@/services/authorizations/types\";\r\n\r\nexport async function getAllAuthorizations(): Promise> {\r\n return new Promise((resolve, reject) => {\r\n api.get(\"/OAuth\").then(\r\n response => {\r\n resolve(response.data);\r\n },\r\n error => {\r\n reject(error);\r\n }\r\n );\r\n });\r\n}\r\n\r\nexport async function getAuthorization(id: string): Promise {\r\n return new Promise((resolve, reject) => {\r\n api.get(`/OAuth/${id}`).then(\r\n response => {\r\n resolve(response.data);\r\n },\r\n error => {\r\n reject(error);\r\n }\r\n );\r\n });\r\n}\r\n\r\nexport async function getAuthorizationInfo(id: string): Promise {\r\n return new Promise((resolve, reject) => {\r\n api.get(`/OAuth/info/${id}`).then(\r\n response => {\r\n resolve(response.data);\r\n },\r\n error => {\r\n reject(error);\r\n }\r\n );\r\n });\r\n}\r\n\r\nexport async function getRedirectUri(): Promise {\r\n return new Promise((resolve, reject) => {\r\n api.get(`/OAuth/RedirectUri`).then(\r\n response => {\r\n resolve(response.data);\r\n },\r\n error => {\r\n reject(error);\r\n }\r\n );\r\n });\r\n}\r\n\r\nexport function createAuthorization(authorization: Authorization) : Promise {\r\n return new Promise((resolve, reject) => {\r\n api.post(`/OAuth`, authorization).then(\r\n response => {\r\n resolve(response.data);\r\n },\r\n error => {\r\n reject(error);\r\n }\r\n );\r\n });\r\n}\r\n\r\nexport function updateAuthorization(authorization: Authorization) : Promise {\r\n return new Promise((resolve, reject) => {\r\n api.put(`/OAuth`, authorization).then(\r\n response => {\r\n resolve(response.data);\r\n },\r\n error => {\r\n reject(error);\r\n }\r\n );\r\n });\r\n}\r\n\r\nexport function deleteAuthorization(id: string): Promise {\r\n return new Promise((resolve, reject) => {\r\n api.delete(`/OAuth/${id}`).then(\r\n response => {\r\n resolve(response.data);\r\n },\r\n error => {\r\n reject(error);\r\n }\r\n );\r\n });\r\n}\r\n\r\nexport async function getAccessToken(param: string): Promise {\r\n return new Promise((resolve, reject) => {\r\n api.get(`/OAuth/getAccessToken/${param}`).then(\r\n response => {\r\n resolve(response.data);\r\n },\r\n error => {\r\n reject(error);\r\n }\r\n );\r\n });\r\n}\r\n\r\nexport function authorize(id: string) : Promise {\r\n return new Promise((resolve, reject) => {\r\n api.post(`/OAuth/authorize/${id}`, {}).then(\r\n response => {\r\n resolve(response.data);\r\n },\r\n error => {\r\n reject(error);\r\n }\r\n );\r\n });\r\n}\r\n\r\nexport async function getOAuthJwtToken(id: string): Promise {\r\n return new Promise((resolve, reject) => {\r\n api.get(`/OAuth/getOAuthJwtToken/${id}`).then(\r\n response => {\r\n resolve(response.data);\r\n },\r\n error => {\r\n reject(error);\r\n }\r\n );\r\n });\r\n}\r\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('header',{staticClass:\"page-header\"},[_c('div',{staticClass:\"d-flex justify-content-between\"},[_c('vsc-name-input',{attrs:{\"placeholder\":_vm.i18n.t('authorization.enterName'),\"validator\":_vm.validators.credentialsName},model:{value:(_vm.authorization.credentialsName),callback:function ($$v) {_vm.$set(_vm.authorization, \"credentialsName\", $$v)},expression:\"authorization.credentialsName\"}}),_c('div',[_c('HeaderActionButtons',{attrs:{\"prevent-back\":_vm.preventBack,\"prevent-save\":_vm.preventSave},on:{\"back\":_vm.back,\"save\":_vm.save}})],1)],1)]),_c('b-form',{attrs:{\"autocomplete\":\"off\"},on:{\"submit\":function($event){$event.stopPropagation();$event.preventDefault();return _vm.save($event)}}},[_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.flowType\"))+\":\")]),_c('b-form-input',{staticClass:\"vsc-input vsc-input-lg\",attrs:{\"id\":\"flowType\",\"value\":_vm.$t((\"authorization.\" + (_vm.flowTypesEnum[_vm.authorization.flowType].toLowerCase()))),\"disabled\":\"disabled\"}})],1),_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.redirectUri\"))+\":\")]),_c('b-form-input',{staticClass:\"vsc-input vsc-input-lg\",attrs:{\"id\":\"redirectUri\",\"value\":_vm.redirectUri,\"disabled\":\"disabled\"}})],1),_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.clientId\"))+\":\")]),_c('b-form-input',{directives:[{name:\"validate\",rawName:\"v-validate\",value:(_vm.authorization.clientId),expression:\"authorization.clientId\"}],staticClass:\"vsc-input vsc-input-lg\",attrs:{\"placeholder\":_vm.$t('authorization.clientId'),\"id\":\"clientId\",\"state\":_vm.validators.clientId.state},model:{value:(_vm.authorization.clientId),callback:function ($$v) {_vm.$set(_vm.authorization, \"clientId\", $$v)},expression:\"authorization.clientId\"}})],1),_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.clientSecret\"))+\":\")]),_c('b-form-input',{directives:[{name:\"validate\",rawName:\"v-validate\",value:(_vm.authorization.clientSecret),expression:\"authorization.clientSecret\"}],staticClass:\"vsc-input vsc-input-lg\",attrs:{\"placeholder\":_vm.$t('authorization.clientSecret'),\"id\":\"clientSecret\",\"type\":\"password\",\"autocomplete\":\"new-password\",\"state\":_vm.validators.clientSecret.state},model:{value:(_vm.authorization.clientSecret),callback:function ($$v) {_vm.$set(_vm.authorization, \"clientSecret\", $$v)},expression:\"authorization.clientSecret\"}})],1),_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.scope\"))+\":\")]),_c('b-form-input',{directives:[{name:\"validate\",rawName:\"v-validate\",value:(_vm.authorization.scopes),expression:\"authorization.scopes\"}],staticClass:\"vsc-input vsc-input-lg\",attrs:{\"placeholder\":_vm.$t('authorization.scope'),\"id\":\"scopes\",\"state\":_vm.validators.scopes.state},model:{value:(_vm.authorization.scopes),callback:function ($$v) {_vm.$set(_vm.authorization, \"scopes\", $$v)},expression:\"authorization.scopes\"}})],1),_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.tenantId\"))+\":\")]),_c('b-form-input',{directives:[{name:\"validate\",rawName:\"v-validate\",value:(_vm.authorization.tenantId),expression:\"authorization.tenantId\"}],staticClass:\"vsc-input vsc-input-lg\",attrs:{\"placeholder\":_vm.$t('authorization.tenantId'),\"id\":\"tenantId\",\"state\":_vm.validators.tenantId.state},model:{value:(_vm.authorization.tenantId),callback:function ($$v) {_vm.$set(_vm.authorization, \"tenantId\", $$v)},expression:\"authorization.tenantId\"}})],1),_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.authorizationId\"))+\":\")]),_c('b-form-input',{staticClass:\"vsc-input vsc-input-lg\",attrs:{\"placeholder\":_vm.$t('authorization.authorizationId'),\"id\":\"authorizationId\",\"disabled\":\"disabled\"},model:{value:(_vm.authorization.id),callback:function ($$v) {_vm.$set(_vm.authorization, \"id\", $$v)},expression:\"authorization.id\"}})],1),_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.authorized\"))+\":\")]),_c('div',{staticClass:\"authorizedWrapper\"},[(_vm.authorization.authorized)?_c('svg',{staticClass:\"vc-icon_md icon-active icon\",attrs:{\"viewBox\":\"0 0 100 100\"}},[_c('use',{attrs:{\"xlink:href\":\"#success-icon\"}})]):_c('svg',{staticClass:\"vc-icon_md icon-inactive icon\",attrs:{\"viewBox\":\"0 0 100 100\"}},[_c('use',{attrs:{\"xlink:href\":\"#error-icon\"}})]),(_vm.authorization.authorized)?_c('span',[_vm._v(_vm._s(_vm.$t('authorization.authorized')))]):_c('span',[_vm._v(_vm._s(_vm.$t('authorization.notAuthorized')))])])]),(_vm.authorization.lastAuthorizationSuccessDate)?_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.lastAuthorizationSuccessDate\"))+\":\")]),_c('b-form-input',{staticClass:\"vsc-input vsc-input-lg\",attrs:{\"id\":\"lastAuthorizationSuccessDate\",\"disabled\":\"disabled\",\"value\":_vm.formatDate(_vm.authorization.lastAuthorizationSuccessDate)}})],1):_vm._e(),(_vm.authorization.lastAuthorizationRequestDate)?_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.lastAuthorizationRequestDate\"))+\":\")]),_c('b-form-input',{staticClass:\"vsc-input vsc-input-lg\",attrs:{\"id\":\"lastAuthorizationRequestDate\",\"disabled\":\"disabled\",\"value\":_vm.formatDate(_vm.authorization.lastAuthorizationRequestDate)}})],1):_vm._e(),(!_vm.authorization.authorized && _vm.authorization.lastErrorMessage)?_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.lastErrorMessage\"))+\":\")]),_c('b-form-textarea',{staticClass:\"vsc-input vsc-input-lg\",attrs:{\"rows\":\"5\",\"id\":\"lastErrorMessage\",\"disabled\":\"disabled\",\"value\":_vm.authorization.lastErrorMessage}})],1):_vm._e(),_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.authorization\"))+\":\")]),_c('b-button',{attrs:{\"variant\":\"primary\"},on:{\"click\":function($event){return _vm.initiateAuthorization(false)}}},[_vm._v(_vm._s(_vm.$t(\"authorization.authorize\")))]),_c('b-button',{staticClass:\"no-wrap-button\",attrs:{\"variant\":\"primary\"},on:{\"click\":function($event){return _vm.initiateAuthorization(true)}}},[_vm._v(_vm._s(_vm.$t(\"authorization.generateAuthLink\")))])],1),(_vm.externalAuthorizationLink !='')?_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"}),_c('b-form-textarea',{staticClass:\"vsc-input vsc-input-lg\",attrs:{\"rows\":\"15\",\"id\":\"externalAuthorizationLink\",\"disabled\":\"disabled\",\"value\":_vm.externalAuthorizationLink}})],1):_vm._e(),(_vm.externalAuthorizationLink !='')?_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"}),_c('b-button',{attrs:{\"variant\":\"primary\"},on:{\"click\":_vm.copyExternalAuthorizeLink}},[_vm._v(_vm._s(_vm.$t(\"authorization.copyAuthLink\")))])],1):_vm._e()]),_c('unsaved-form-modal',{ref:\"UnsavedFormModal\",on:{\"continue\":_vm.onContinue}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport { Component, Prop, Vue } from \"vue-property-decorator\";\r\nimport i18n from \"@/i18n\";\r\nimport { Route } from \"vue-router\";\r\nimport { Authorization, FlowTypesEnum } from \"@/services/authorizations/types\";\r\nimport {\r\n createAuthorization,\r\n getAuthorization,\r\n updateAuthorization,\r\n getRedirectUri,\r\n getOAuthJwtToken\r\n} from \"@/services/authorizations/authorizationService\";\r\nimport HeaderActionButtons from \"@/components/layouts/HeaderActionButtons.vue\";\r\nimport UnsavedFormModal from \"@/components/common/modals/UnsavedFormModal.vue\";\r\nimport { authorizationValidators } from \"@/components/authorizations/authorizationValidators\";\r\nimport { validateForm } from \"@/services/validation/validationService\";\r\nimport validate from \"@/directives/validate\";\r\nimport moment from \"moment\";\r\n\r\n@Component({\r\n beforeRouteLeave(to, from, next) {\r\n this.onBeforeRouteLeave(to, next);\r\n },\r\n components: { UnsavedFormModal, HeaderActionButtons },\r\n directives: {\r\n validate\r\n }\r\n})\r\nexport default class ROPCForm extends Vue {\r\n @Prop() authorizationId!: string;\r\n\r\n // local state\r\n authorization = {\r\n id: \"\",\r\n credentialsName: \"\",\r\n flowType: FlowTypesEnum.ClientCredentialFlow,\r\n url: \"https://login.microsoftonline.com/#tenantId/oauth2/v2.0/token\",\r\n authorized: false\r\n } as Authorization;\r\n\r\n priorAuthorizationState = JSON.parse(JSON.stringify(this.authorization)) as Authorization;\r\n redirectUri = \"\";\r\n externalAuthorizationLink = \"\";\r\n\r\n i18n = i18n;\r\n flowTypesEnum = FlowTypesEnum;\r\n validators = authorizationValidators;\r\n preventSave = false;\r\n preventBack = false;\r\n nextRoute = \"\";\r\n routeParams = {};\r\n saveClicked = false;\r\n continue = false;\r\n fetchingActive = false;\r\n\r\n // lifecycle hooks\r\n async created() {\r\n this.fetchData();\r\n window.addEventListener(\"storage\", (event) => {\r\n if (event.storageArea !== localStorage) return;\r\n if (event.key === \"refresh\") {\r\n if (event.newValue === \"true\") {\r\n window.localStorage.setItem(\"refresh\", \"\");\r\n this.fetchData();\r\n }\r\n }\r\n });\r\n getRedirectUri().then(response => {\r\n this.redirectUri = response;\r\n });\r\n }\r\n\r\n // methods\r\n fetchData() {\r\n if (this.authorizationId || this.authorization.id !== \"\") {\r\n this.fetchingActive = true;\r\n getAuthorization(this.authorizationId ? this.authorizationId : this.authorization.id).then(response => {\r\n this.authorization = response;\r\n this.authorization.clientSecret = \"dummy-secret\";\r\n this.priorAuthorizationState = JSON.parse(JSON.stringify(this.authorization)) as Authorization;\r\n this.fetchingActive = false;\r\n });\r\n }\r\n }\r\n\r\n async save(back: boolean) : Promise {\r\n if (this.saveClicked) return;\r\n this.saveClicked = true;\r\n if (!await validateForm([this.validators])) {\r\n this.saveClicked = false;\r\n return;\r\n }\r\n // create or update\r\n if (this.authorization.id !== \"\") {\r\n await updateAuthorization(this.authorization);\r\n this.saveClicked = false;\r\n this.priorAuthorizationState = JSON.parse(JSON.stringify(this.authorization));\r\n if (back) {\r\n this.$router.push({\r\n name: \"authorizations\"\r\n });\r\n }\r\n } else {\r\n const id = await createAuthorization(this.authorization);\r\n this.saveClicked = false;\r\n this.authorization.id = id;\r\n this.priorAuthorizationState = JSON.parse(JSON.stringify(this.authorization));\r\n if (back) {\r\n this.$router.push({\r\n name: \"authorizations\"\r\n });\r\n }\r\n }\r\n }\r\n\r\n back() {\r\n this.$router.push({\r\n name: \"authorizations\"\r\n });\r\n }\r\n\r\n onContinue(data: boolean) {\r\n this.continue = data;\r\n if (data) this.$router.push({ name: this.nextRoute, params: this.routeParams });\r\n this.nextRoute = \"\";\r\n }\r\n\r\n async initiateAuthorization(external: boolean) {\r\n await this.save(false);\r\n const token = await getOAuthJwtToken(this.authorization.id);\r\n const authorizationLink = `https://login.microsoftonline.com/${this.authorization.tenantId}/adminConsent?` +\r\n `client_id=${this.authorization.clientId}` +\r\n `&redirect_uri=${encodeURI(this.redirectUri)}` +\r\n `&state=${token}`;\r\n\r\n if (external) {\r\n this.externalAuthorizationLink = authorizationLink;\r\n } else {\r\n this.authPopupWindow(authorizationLink, \"Authorize\", 500, 700);\r\n }\r\n }\r\n\r\n async copyExternalAuthorizeLink() {\r\n await navigator.clipboard.writeText(this.externalAuthorizationLink);\r\n }\r\n\r\n authPopupWindow(url: any, title: any, w: any, h: any) {\r\n // Fixes dual-screen position Most browsers Firefox\r\n const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX;\r\n const dualScreenTop = window.screenTop !== undefined ? window.screenTop : window.screenY;\r\n\r\n const width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;\r\n const height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;\r\n\r\n const systemZoom = width / window.screen.availWidth;\r\n const left = (width - w) / 2 / systemZoom + dualScreenLeft;\r\n const top = (height - h) / 2 / systemZoom + dualScreenTop;\r\n const newWindow = window.open(url, title,\r\n `\r\n scrollbars=yes,\r\n width=${w / systemZoom},\r\n height=${h / systemZoom},\r\n top=${top},\r\n left=${left}\r\n `\r\n );\r\n\r\n if (window.focus && newWindow) newWindow.focus();\r\n }\r\n\r\n formatDate(date: Date) {\r\n return moment.utc(date).local().format(\"LLL\");\r\n }\r\n\r\n // computed\r\n get editMode() {\r\n return !!this.authorization.id;\r\n }\r\n\r\n // router events\r\n async onBeforeRouteLeave(to: Route, next: any) {\r\n if (this.saveClicked || this.continue || this.fetchingActive) {\r\n next();\r\n } else {\r\n this.nextRoute = to.name ? to.name : \"\";\r\n this.routeParams = to.params;\r\n const noChanges = this.lodash.isEqual(this.priorAuthorizationState, this.authorization);\r\n if (noChanges) {\r\n next();\r\n } else {\r\n next(false);\r\n (this.$refs.UnsavedFormModal as any).open();\r\n }\r\n }\r\n }\r\n}\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./_CCFForm.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./_CCFForm.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./_CCFForm.vue?vue&type=template&id=ea623fd6&scoped=true&\"\nimport script from \"./_CCFForm.vue?vue&type=script&lang=ts&\"\nexport * from \"./_CCFForm.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./_CCFForm.vue?vue&type=style&index=0&id=ea623fd6&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"ea623fd6\",\n null\n \n)\n\nexport default component.exports","import { ValidationModel, ValidationType } from \"@/services/validation/types\";\r\n\r\nexport const authorizationValidators = {\r\n credentialsName: {\r\n rules: [\r\n { type: ValidationType.Required },\r\n { type: ValidationType.Min, value: 1 }\r\n ]\r\n } as ValidationModel,\r\n clientId: {\r\n rules: [\r\n { type: ValidationType.Required },\r\n { type: ValidationType.Min, value: 1 }\r\n ]\r\n } as ValidationModel,\r\n clientSecret: {\r\n rules: [\r\n { type: ValidationType.Required },\r\n { type: ValidationType.Min, value: 1 }\r\n ]\r\n } as ValidationModel,\r\n scopes: {\r\n rules: [\r\n { type: ValidationType.Required },\r\n { type: ValidationType.Min, value: 1 }\r\n ]\r\n } as ValidationModel,\r\n tenantId: {\r\n rules: [\r\n { type: ValidationType.Required },\r\n { type: ValidationType.Min, value: 1 }\r\n ]\r\n } as ValidationModel,\r\n username: {\r\n rules: [\r\n { type: ValidationType.Required },\r\n { type: ValidationType.Min, value: 1 }\r\n ]\r\n } as ValidationModel,\r\n password: {\r\n rules: [\r\n { type: ValidationType.Required },\r\n { type: ValidationType.Min, value: 1 }\r\n ]\r\n } as ValidationModel\r\n};\r\n","import { DirectiveOptions } from \"vue\";\r\nimport { Vue } from \"vue-property-decorator\";\r\nimport { validateValue } from \"@/services/validation/validationService\";\r\nimport { ValidationType } from \"@/services/validation/types\";\r\n\r\nconst validate: DirectiveOptions = {\r\n bind(element, binding, vNode) {\r\n const componentContext = vNode.context as any;\r\n const el = element as HTMLInputElement;\r\n\r\n if (!componentContext || !componentContext.validators) return;\r\n\r\n const property = componentContext.validators[el.id];\r\n if (!property || !property.rules) return;\r\n\r\n Vue.set(property, \"value\", binding.value);\r\n Vue.set(property, \"active\", true);\r\n\r\n element.addEventListener(\"input\", (event) => {\r\n Vue.set(property, \"value\", el.value);\r\n\r\n if (binding.value && binding.value.confirm) {\r\n const matchRule = (property.rules as any[]).find(x => x.type === ValidationType.Confirm);\r\n const confirmProperty = componentContext.validators[binding.value.confirm];\r\n matchRule.value = confirmProperty.value;\r\n }\r\n validateValue(property).then(response => {\r\n Vue.set(property, \"message\", response.message);\r\n Vue.set(property, \"state\", response.state);\r\n });\r\n });\r\n },\r\n // we use update for setting the value of already populated form fields\r\n update(element, binding, vNode) {\r\n const componentContext = vNode.context as any;\r\n const property = componentContext.validators[element.id];\r\n Vue.set(property, \"value\", binding.value);\r\n },\r\n unbind(element, binding, vNode) {\r\n const componentContext = vNode.context as any;\r\n const property = componentContext.validators[element.id];\r\n Vue.set(property, \"state\", null);\r\n Vue.set(property, \"message\", \"\");\r\n Vue.set(property, \"value\", \"\");\r\n Vue.set(property, \"active\", false);\r\n }\r\n};\r\n\r\nexport default validate;\r\n","export interface Authorization {\r\n id: string,\r\n clientId: string;\r\n clientSecret: string;\r\n url: string;\r\n redirectUri: string;\r\n scopes: string;\r\n username: string;\r\n password: string;\r\n createdOn: Date;\r\n modifiedOn: Date;\r\n flowType: FlowTypesEnum;\r\n refreshToken: string;\r\n credentialsName: string;\r\n tenantId: string;\r\n authorized: boolean;\r\n lastAuthorizationSuccessDate: Date | null;\r\n lastAuthorizationRequestDate: Date | null;\r\n lastErrorMessage: string;\r\n}\r\n\r\nexport interface AuthorizationInfo {\r\n id: string,\r\n credentialsName: string;\r\n username: string;\r\n createdOn: Date;\r\n modifiedOn: Date;\r\n modifiedById: string;\r\n modifiedBy: string;\r\n flowType: FlowTypesEnum;\r\n lastAuthorizationSuccessDate: Date | null;\r\n lastAuthorizationRequestDate: Date | null;\r\n}\r\n\r\nexport enum FlowTypesEnum\r\n{\r\n AuthorizationCodeFlow,\r\n ClientCredentialFlow,\r\n ResourceOwnerPasswordCredentialsFlow\r\n}\r\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('b-modal',{attrs:{\"centered\":\"\",\"id\":\"modal-navigateFromUnsavedForm\"},scopedSlots:_vm._u([{key:\"modal-footer\",fn:function(){return [_c('b-button',{attrs:{\"variant\":\"primary\"},on:{\"click\":_vm.confirm}},[_vm._v(_vm._s(_vm.$t(\"common.btnYesContinue\")))]),_c('b-button',{attrs:{\"variant\":\"dark\"},on:{\"click\":_vm.decline}},[_vm._v(_vm._s(_vm.$t(\"common.btnNo\")))])]},proxy:true}])},[_c('div',{staticClass:\"confirmation-modal-body\"},[_c('svg',{staticClass:\"vc-icon_xl ver-ar fill-danger\",attrs:{\"viewBox\":\"0 0 100 100\"}},[_c('use',{attrs:{\"xlink:href\":\"#delete-icon\"}})]),_c('h2',[_vm._v(_vm._s(_vm.$t(\"common.unsavedFormTitle\")))]),_c('small',[_vm._v(_vm._s(_vm.$t(\"common.unsavedFormDescription\")))])])])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport { Component, Vue } from \"vue-property-decorator\";\r\n\r\n@Component\r\nexport default class UnsavedFormModal extends Vue {\r\n open() {\r\n this.$bvModal.show(\"modal-navigateFromUnsavedForm\");\r\n }\r\n\r\n decline() {\r\n this.$emit(\"continue\", false);\r\n this.$bvModal.hide(\"modal-navigateFromUnsavedForm\");\r\n }\r\n\r\n confirm() {\r\n this.$emit(\"continue\", true);\r\n this.$bvModal.hide(\"modal-navigateFromUnsavedForm\");\r\n }\r\n}\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UnsavedFormModal.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UnsavedFormModal.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./UnsavedFormModal.vue?vue&type=template&id=f971da18&\"\nimport script from \"./UnsavedFormModal.vue?vue&type=script&lang=ts&\"\nexport * from \"./UnsavedFormModal.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HeaderActionButtons.vue?vue&type=style&index=0&id=1317f3f0&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HeaderActionButtons.vue?vue&type=style&index=0&id=1317f3f0&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:\"abg\",rawName:\"v-abg\"}],staticClass:\"actionButtonGroup\",class:{ sticky : _vm.sticky }},[(_vm.showSaveButton)?_c('b-button',{attrs:{\"disabled\":_vm.preventSave,\"variant\":\"primary\"},on:{\"click\":_vm.save}},[_vm._v(_vm._s(_vm.$t(\"common.save\")))]):_vm._e(),(_vm.showSaveButton && _vm.isAdmin)?_c('b-button',{attrs:{\"disabled\":_vm.preventSave,\"variant\":\"primary\"},on:{\"click\":_vm.saveAndBack}},[_vm._v(_vm._s(_vm.$t(\"common.saveAndBack\")))]):_vm._e(),(_vm.editorStatus && !_vm.isAdmin)?_c('b-button',{staticClass:\"btn-combine\",attrs:{\"disabled\":_vm.preventBack,\"variant\":\"primary\"},on:{\"click\":function($event){return _vm.$emit('newPostBtn')}}},[_c('span',{staticClass:\"iconBox\"},[_c('svg',{staticClass:\"vc-icon\",attrs:{\"viewBox\":\"0 0 9.9 7.5\"}},[_c('use',{attrs:{\"xlink:href\":\"#plus-icon\"}})])]),_c('span',{staticClass:\"post-combine\"},[_vm._v(\" \"+_vm._s(_vm.$t(\"posts.newPost\"))+\" \")])]):_vm._e(),(_vm.editorStatus && !_vm.isAdmin)?_c('b-button',{staticClass:\"btn-combine\",attrs:{\"variant\":\"primary\"},on:{\"click\":function($event){return _vm.$emit('previewEvent')}}},[_c('span',{staticClass:\"iconBox\"},[_c('svg',{staticClass:\"vc-icon\",attrs:{\"viewBox\":\"0 0 9 7\"}},[_c('use',{attrs:{\"xlink:href\":\"#preview-icon\"}})])]),_c('span',{staticClass:\"post-combine\"},[_vm._v(\" \"+_vm._s(_vm.$t(\"common.preview\"))+\" \")])]):_vm._e(),_c('b-button',{staticClass:\"ml-1\",attrs:{\"disabled\":_vm.preventBack,\"variant\":\"secondary\"},on:{\"click\":_vm.back}},[_vm._v(_vm._s(_vm.$t(\"common.back\")))])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport { Component, Vue, Prop, Watch } from \"vue-property-decorator\";\r\nimport { Getter } from \"vuex-class\";\r\nimport { HavePermition, PermitionEnum } from \"@/components/security/Permitions\";\r\n\r\nconst namespace: string = \"authentication\";\r\n\r\nvar scroll: any;\r\n\r\n@Component({\r\n directives: {\r\n abg: {\r\n inserted: function (element, binding, vnode) {\r\n var offset = (window.pageYOffset + element.getBoundingClientRect().top) - 50; // 50 is the height of the topbar\r\n scroll = function () {\r\n var doc = document.documentElement;\r\n var top = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);\r\n if (top >= offset) (vnode.context as any).sticky = true;\r\n else (vnode.context as any).sticky = false;\r\n };\r\n window.addEventListener(\"scroll\", scroll, false);\r\n },\r\n unbind: function (element, binding, vnode) {\r\n window.removeEventListener(\"scroll\", scroll, false);\r\n }\r\n }\r\n }\r\n})\r\nexport default class HeaderActionButtons extends Vue {\r\n @Prop() checkPermition!: PermitionEnum;\r\n @Prop({ default: false }) preventSave!: boolean;\r\n @Prop({ default: false }) preventBack!: boolean;\r\n @Getter(\"getCurrentUser\", { namespace }) getCurrentUser: any;\r\n\r\n // local\r\n permitionEnum = PermitionEnum;\r\n havePermition = HavePermition;\r\n editorStatus = false;\r\n\r\n get isAdmin() : boolean {\r\n return this.havePermition(this.getCurrentUser.permissions,\r\n this.permitionEnum[this.permitionEnum.AdminPrivilege]);\r\n }\r\n\r\n sticky = false;\r\n\r\n save() {\r\n if (!this.isAdmin) this.$emit(\"save\", true);\r\n else this.$emit(\"save\", false);\r\n }\r\n\r\n saveAndBack() {\r\n this.$emit(\"save\", true);\r\n }\r\n\r\n back() {\r\n this.$emit(\"back\");\r\n }\r\n\r\n // header component is detroyed and rebuilt in every page load\r\n // so watchers are unless in this case\r\n mounted() {\r\n this.editorStatus = this.$route.name === \"editorupdatechannel\";\r\n }\r\n\r\n get showSaveButton(): boolean {\r\n return this.checkPermition !== null && this.checkPermition !== undefined\r\n ? this.havePermition(this.getCurrentUser.permissions, this.permitionEnum[this.checkPermition]) : true;\r\n }\r\n}\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HeaderActionButtons.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HeaderActionButtons.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./HeaderActionButtons.vue?vue&type=template&id=1317f3f0&scoped=true&\"\nimport script from \"./HeaderActionButtons.vue?vue&type=script&lang=ts&\"\nexport * from \"./HeaderActionButtons.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./HeaderActionButtons.vue?vue&type=style&index=0&id=1317f3f0&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1317f3f0\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}