graphdb-workbench
Version:
The web application for GraphDB APIs
2 lines • 7.18 kB
JavaScript
export const __webpack_id__=28050;export const __webpack_ids__=[10153,28050,29428,32534,69724,84727];export const __webpack_modules__={10307:(e,n,t)=>{t.r(n);var o=t(3588);function r(e){return{restrict:"E",scope:{field:"=",form:"=",translationKeyPrefix:"="},templateUrl:"js/angular/core/directives/dynamic-form/templates/form-field-template.html",link:function(e){e.FIELD_TYPE=o.FIELD_TYPE}}}angular.module("graphdb.framework.core.directives.dynamic-form-field",[]).directive("dynamicFormField",r),r.$inject=[]},28050:(e,n,t)=>{t.r(n);var o=t(32534),r=(t(69724),t(77512));function i(e,n,t,i,a,d){return{restrict:"E",templateUrl:"js/angular/graphql/templates/step-generate-endpoint.html",scope:{stepDefinition:"="},link:n=>{n.endpointConfiguration=void 0,n.endpointsCountToGenerate=0,n.endpointsOverview=void 0,n.activeRepository=i.getActiveRepository(),n.generateFromGraphqlSchemaShapes=!1,n.generatingEndpoint=!1,n.generationReport=void 0,n.endpointUrl=r.endpointUrl,n.back=()=>{d.previousEndpointCreationStep()},n.cancel=()=>{const n=t.instant("graphql.create_endpoint.wizard_steps.actions.cancel.confirmation.title"),o=t.instant("graphql.create_endpoint.wizard_steps.actions.cancel.confirmation.body");e.openConfirmation(n,o,()=>{d.cancelEndpointCreation()})},n.generateEndpoint=()=>{n.generatingEndpoint=!0,n.generationReport=void 0,d.generateEndpoint()},n.finishGenerationWorkflow=()=>{d.finishGenerationWorkflow()},n.showEndpointReport=e=>{d.openEndpointGenerationReport(e)},n.exploreInPlayground=e=>{d.exploreEndpointInPlayground(e)};const l=[];l.push(d.subscribe(o.GraphqlEventName.ENDPOINT_GENERATED,e=>{n.generatingEndpoint=!1,n.generationReport=e})),n.$on("$destroy",()=>{l.forEach(e=>e())}),n.endpointConfiguration=d.getNewEndpoint(),n.generateFromGraphqlSchemaShapes=n.endpointConfiguration.hasSelectedGraphqlSchemaShapes(),n.endpointsCountToGenerate=a.getEndpointsCountToGenerate(n.endpointConfiguration),n.endpointsOverview=a.getGenerateEndpointsOverview(n.endpointConfiguration)}}}angular.module("graphdb.framework.graphql.directives.generate-endpoint",["graphdb.framework.graphql.controllers.endpoint-generation-failure-result-modal"]).directive("generateEndpoint",i),i.$inject=["ModalService","$uibModal","$translate","$repositories","GraphqlService","GraphqlContextService"]},29428:()=>{angular.module("graphdb.framework.core.directives.multiselect-dropdown",[]).directive("multiselectDropdown",["$translate",function(e){return{restrict:"E",require:"ngModel",scope:{options:"=",dropdownLabel:"=?"},templateUrl:"js/angular/core/directives/multiselect-dropdown/templates/multiselect-dropdown.html",link:function(n,t,o,r){n.isOpen=!1;const i=e=>{t[0].contains(e.target)||n.$apply(()=>{n.isOpen=!1})};n.toggleDropdown=function(){n.isOpen=!n.isOpen},n.toggleSelection=function(e){e.selected=!e.selected,(()=>{const e=n.options.filter(function(e){return e.selected});r.$setViewValue(e)})()},n.getSelectedText=function(){const t=n.options.filter(e=>e.selected);return 0===t.length?n.dropdownLabel||e.instant("common.select"):t.map(e=>e.label).join(", ")},r.$render=function(){angular.isArray(r.$viewValue)&&n.options.forEach(function(e){e.selected=r.$viewValue.some(function(n){return n.value===e.value})})},document.addEventListener("click",i),n.$on("$destroy",()=>{document.removeEventListener("click",i)})}}}])},32534:(e,n,t)=>{t.r(n),t.d(n,{GraphqlEventName:()=>a});var o=t(98980),r=t(10406);function i(e){let n,t,i;const d=()=>n,l=()=>i,p=(n,t)=>{e.emitSync(n,(0,o.cloneDeep)(t))},c=(n,t)=>e.subscribeSync(n,e=>t(e));return{resetContext:()=>{t=void 0,i=void 0},updateSourceRepository:e=>{n=e,p(a.SOURCE_REPOSITORY_UPDATED,d())},getSourceRepository:d,setSelectedEndpoint:e=>{t=e},getSelectedEndpoint:()=>(0,o.cloneDeep)(t),getNewEndpoint:l,createEndpointConfig:()=>{i=new r.GraphqlEndpointConfiguration,e.emitSync(a.ENDPOINT_CONFIG_CREATED,i)},onEndpointConfigCreated:e=>(i&&angular.isFunction(e)&&e(i),c(a.ENDPOINT_CONFIG_CREATED,n=>e(n))),startCreateEndpointWizard:()=>{p(a.START_CREATE_ENDPOINT_WIZARD,null)},generateEndpoint:()=>{p(a.GENERATE_ENDPOINT,l())},endpointGenerated:e=>{p(a.ENDPOINT_GENERATED,e)},exploreEndpointInPlayground:e=>{p(a.EXPLORE_ENDPOINT_IN_PLAYGROUND,e)},openEndpointGenerationReport:e=>{p(a.OPEN_ENDPOINT_GENERATION_REPORT,e)},deleteEndpointGenerationReport:e=>{p(a.DELETE_ENDPOINT_REPORT,e)},cancelEndpointCreation:()=>{p(a.CANCEL_ENDPOINT_CREATION,{})},finishGenerationWorkflow:()=>{p(a.FINISH_GENERATION_WORKFLOW,{})},nextEndpointCreationStep:()=>{p(a.NEXT_ENDPOINT_CREATION_STEP,{})},previousEndpointCreationStep:()=>{p(a.PREVIOUS_ENDPOINT_CREATION_STEP,{})},subscribe:c}}angular.module("graphdb.framework.graphql.services.graphql-context",[]).factory("GraphqlContextService",i),i.$inject=["EventEmitterService","GraphqlService"];const a={SOURCE_REPOSITORY_UPDATED:"sourceRepositoryUpdated",START_CREATE_ENDPOINT_WIZARD:"startCreateEndpointWizard",ENDPOINT_CONFIG_CREATED:"updateConfigCreated",GENERATE_ENDPOINT:"generateEndpoint",ENDPOINT_GENERATED:"endpointGenerated",CANCEL_ENDPOINT_CREATION:"cancelEndpointCreation",FINISH_GENERATION_WORKFLOW:"finishGenerationWorkflow",EXPLORE_ENDPOINT_IN_PLAYGROUND:"exploreEndpointInPlayground",OPEN_ENDPOINT_GENERATION_REPORT:"openEndpointGenerationReport",DELETE_ENDPOINT_REPORT:"deleteEndpointReport",NEXT_ENDPOINT_CREATION_STEP:"nextEndpointCreationStep",PREVIOUS_ENDPOINT_CREATION_STEP:"previousEndpointCreationStep"}},58334:(e,n,t)=>{t.r(n),t(10307);var o=t(3588);function r(){return{restrict:"E",scope:{formModel:"=",showAllFields:"=?",onValidityChange:"&?",formCtrl:"=?",translationKeyPrefix:"@?"},templateUrl:"js/angular/core/directives/dynamic-form/templates/dynamic-form.html",link:function(e,n){e.FIELD_TYPE=o.FIELD_TYPE,e.formCtrl=void 0,e.showAllFields=e.showAllFields||!1,(()=>{const t=n.find("form").controller("form");if(!t)return void console.error("Form controller not found!");e.formCtrl=t;const o=t.$setValidity;e.formCtrl.$setValidity=function(n,r,i){o.call(t,n,r,i),e.onValidityChange&&e.onValidityChange({valid:t.$valid})}})()}}}angular.module("graphdb.framework.core.directives.dynamic-form",["graphdb.framework.core.directives.dynamic-form-field"]).directive("dynamicForm",r),r.$inject=[]},69724:(e,n,t)=>{function o(e,n,t,o){const r="generation-report.json";e.endpointReport=void 0,e.downloadReport=()=>{const n=JSON.stringify(e.endpointReport.toJSON(),null,2),t=new Blob([n],{type:"application/json"}),o=URL.createObjectURL(t),i=document.createElement("a");i.href=o,i.download=e.endpointReport.endpointId?`${e.endpointReport.endpointId}-${r}`:r,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o)},e.deleteReport=()=>{o.deleteEndpointGenerationReport(e.endpointReport),e.close()},e.close=()=>{n.dismiss("cancel")},e.endpointReport=t.endpointReport}t.r(n),t(14874),t(58334),t(29428),angular.module("graphdb.framework.graphql.controllers.endpoint-generation-failure-result-modal",["graphdb.framework.core.services.graphql-service"]).controller("EndpointGenerationResultFailureModalController",o),o.$inject=["$scope","$uibModalInstance","data","GraphqlContextService"]}};
//# sourceMappingURL=28050.1359d262b2e2c497ad6d.bundle.js.map