graphdb-workbench
Version:
The web application for GraphDB APIs
2 lines • 11.1 kB
JavaScript
export const __webpack_id__=10406;export const __webpack_ids__=[868,10406,16014,16747,21388,23864,28379,29646,30514,45149];export const __webpack_modules__={868:(e,t,s)=>{s.r(t),s.d(t,{DynamicFormField:()=>i});class i{_key="";_label="";_type="";_collection=!1;_value;_values;_regex;_required=!1;_group;hidden=!1;constructor(e){this._key=e.key,this._label=e.label,this._type=e.type,this._collection=e.collection,this._value=e.value,this._values=e.values,this._regex="string"==typeof e.regex?new RegExp(e.regex):e.regex,this._required=e.required,this._group=e.group,this.hidden=e.hidden}get key(){return this._key}set key(e){this._key=e}get label(){return this._label}set label(e){this._label=e}get type(){return this._type}set type(e){this._type=e}get collection(){return this._collection}set collection(e){this._collection=e}get value(){return this._value}set value(e){this._value=e}get values(){return this._values}set values(e){this._values=e}get regex(){return this._regex}set regex(e){this._regex="string"==typeof e?new RegExp(e):e}get required(){return this._required}set required(e){this._required=e}get group(){return this._group}set group(e){this._group=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}}},10406:(e,t,s)=>{s.r(t),s.d(t,{GraphqlEndpointConfiguration:()=>c,GraphqlEndpointParams:()=>l});var i=s(29646),r=s(82854),h=s(28379),n=s(16014),a=s(23864),o=s(30514),p=s(21388);class c{_schemaSourceType;_owlOrShaclSourceType;_selectedGraphqlSchemaShapes;_selectedGraphs;_params;_settings;constructor(){this._schemaSourceType=p.SchemaSourceType.GRAPHQL_SCHEMA_SHAPES,this._owlOrShaclSourceType=p.OntologyShaclShapeSource.USE_ALL_GRAPHS,this._selectedGraphqlSchemaShapes=new i.GraphqlSchemaShapes,this._selectedGraphs=new r.GraphListOptions,this._params=new l({}),this._endpointConfigurationSettings=new h.GraphqlEndpointConfigurationSettings}generateFromGraphqlSchemaShapes(){return this.schemaSourceType===p.SchemaSourceType.GRAPHQL_SCHEMA_SHAPES}generateFromShaclShapes(){return this.schemaSourceType===p.SchemaSourceType.SHACL_SHAPES}toCreateEndpointFromShapesRequest(e){return new a.CreateEndpointFromShapesRequest({fromRepo:e,shapes:this.selectedGraphqlSchemaShapes.getShapeIds(),config:this.settings.toFlatJSON()})}toCreateEndpointFromOwlRequest(e){const t=this._owlOrShaclSourceType===p.OntologyShaclShapeSource.USE_ALL_GRAPHS?[]:this.selectedGraphs.getGraphIds();return new o.CreateEndpointFromOwlRequest({id:this.params.endpointId,label:this.params.endpointLabel,description:this.params.endpointDescription,fromRepo:e,namedGraphs:t,vocabPrefix:this.params.vocPrefix,config:this.settings.toFlatJSON()})}getSelectedGraphqlSchemaShapesOverview(){return this.generateFromGraphqlSchemaShapes()?this.selectedGraphqlSchemaShapes.processShapes(e=>new n.GraphqlEndpointOverview({label:e.label||e.id,uri:e.id})):this.generateFromShaclShapes()?this.selectedGraphs.isEmpty?[new n.GraphqlEndpointOverview({label:`${this.params.endpointId}`})]:this.selectedGraphs.processGraphList(e=>new n.GraphqlEndpointOverview({label:e.label||e.uri,uri:e.uri})):void 0}getSelectedGraphqlSchemaShapesCount(){return this.selectedGraphqlSchemaShapes.shapes.length}hasSelectedGraphqlSchemaShapes(){return this.getSelectedGraphqlSchemaShapesCount()>0}getSelectedGraphsCount(){return this.selectedGraphs.graphList.length}hasSelectedGraphs(){return this.getSelectedGraphsCount()>0}get owlOrShaclSourceType(){return this._owlOrShaclSourceType}set owlOrShaclSourceType(e){this._owlOrShaclSourceType=e}get schemaSourceType(){return this._schemaSourceType}set schemaSourceType(e){this._schemaSourceType=e}get settings(){return this._settings}set settings(e){this._settings=e}get selectedGraphs(){return this._selectedGraphs}set selectedGraphs(e){this._selectedGraphs=e}get params(){return this._params}set params(e){this._params=e}get selectedGraphqlSchemaShapes(){return this._selectedGraphqlSchemaShapes}set selectedGraphqlSchemaShapes(e){this._selectedGraphqlSchemaShapes=e}}class l{_endpointId;_endpointLabel;_endpointDescription;_vocPrefix;constructor(e){this._endpointId=e.endpointId||"",this._endpointLabel=e.endpointLabel||"",this._vocPrefix=e.vocPrefix||"",this._endpointDescription=e.endpointDescription||""}get endpointId(){return this._endpointId}set endpointId(e){this._endpointId=e}get endpointLabel(){return this._endpointLabel}set endpointLabel(e){this._endpointLabel=e}get endpointDescription(){return this._endpointDescription}set endpointDescription(e){this._endpointDescription=e}get vocPrefix(){return this._vocPrefix}set vocPrefix(e){this._vocPrefix=e}toJSON(){return{endpointId:this.endpointId,endpointLabel:this.endpointLabel,vocPrefix:this.vocPrefix,description:this.endpointDescription}}}},16014:(e,t,s)=>{s.r(t),s.d(t,{ENDPOINT_GENERATION_STATUS:()=>i,GraphqlEndpointOverview:()=>h,GraphqlEndpointOverviewList:()=>r});const i={NONE:"NONE",SUCCESS:"SUCCESS",ERROR:"ERROR"};class r{_endpointList=[];constructor(e){this._endpointList=e||[]}get endpointList(){return this._endpointList}set endpointList(e){this._endpointList=e}}class h{_label;_uri;_status;constructor(e){this._label=e.label||"",this._uri=e.uri||"",this._status=e.status||i.NONE}get label(){return this._label}set label(e){this._label=e}get uri(){return this._uri}set uri(e){this._uri=e}get status(){return this._status}set status(e){this._status=e}}},16747:(e,t,s)=>{s.r(t),s.d(t,{Wizard:()=>i,WizardStep:()=>r});class i{#e=[];#t=0;constructor(e=[],t=0){this.#e=e,this.#t=t}addStep(e){return this.#e.push(e),this}getActiveStep(){return this.#e.find(e=>e.active)}isAPreviousStep(e){return this.#e.indexOf(e)<this.#t}setStepActive(e){this.#e.forEach(e=>e.active=!1),e.active=!0;const t=this.#e.indexOf(e);this.#t=t,this.#e.forEach((e,s)=>{e.visited=s<t})}previousStep(){this.#t>0&&this.#t--;const e=this.#e[this.#t];return this.setStepActive(e),e}nextStep(){this.#t<this.#e.length-1&&this.#t++;const e=this.#e[this.#t];return this.setStepActive(e),e}get steps(){return this.#e}set steps(e){this.#e=e}get currentStep(){return this.#t}set currentStep(e){this.#t=e}}class r{#s="";#i=!1;#r=!1;#h="";#n="";constructor(e,t,s,i=!1){this.#s=e,this.#i=i,this.#h=t,this.#n=s,this.#r=!1}get page(){return this.#n}set page(e){this.#n=e}get templateUrl(){return this.#h}set templateUrl(e){this.#h=e}get active(){return this.#i}set active(e){this.#i=e}get id(){return this.#s}set id(e){this.#s=e}get visited(){return this.#r}set visited(e){this.#r=e}}},21388:(e,t,s)=>{s.r(t),s.d(t,{ConfigureEndpointStep:()=>a,GenerateEndpointStep:()=>o,OntologyShaclShapeSource:()=>h,SchemaSourceType:()=>r,SelectSchemaSourceStep:()=>n});var i=s(16747);const r={GRAPHQL_SCHEMA_SHAPES:"graphql_schema_shapes",SHACL_SHAPES:"shacl_shapes"},h={USE_ALL_GRAPHS:"use_all_graphs",USE_SHACL_SHAPE_GRAPH:"use_shacl_shape_graph",PICK_GRAPHS:"pick_graphs"};class n extends i.WizardStep{_schemaSourceTypes=[{value:r.GRAPHQL_SCHEMA_SHAPES},{value:r.SHACL_SHAPES}];_schemaSourceType=this._schemaSourceTypes[0].value;_ontologyShaclShapeSources=[{value:h.USE_ALL_GRAPHS},{value:h.USE_SHACL_SHAPE_GRAPH},{value:h.PICK_GRAPHS}];_ontotlogyShaclShapeSource=this._ontologyShaclShapeSources[0].value;constructor(){super("select_schema_sources",void 0,"schema-sources",!0)}get ontotlogyShaclShapeSource(){return this._ontotlogyShaclShapeSource}set ontotlogyShaclShapeSource(e){this._ontotlogyShaclShapeSource=e}get ontologyShaclShapeSources(){return this._ontologyShaclShapeSources}set ontologyShaclShapeSources(e){this._ontologyShaclShapeSources=e}get schemaSourceType(){return this._schemaSourceType}set schemaSourceType(e){this._schemaSourceType=e}get schemaSourceTypes(){return this._schemaSourceTypes}set schemaSourceTypes(e){this._schemaSourceTypes=e}}class a extends i.WizardStep{constructor(){super("configure_endpoint",void 0,"endpoint-config",!1)}}class o extends i.WizardStep{constructor(){super("generate_endpoint",void 0,"generate-endpoint",!1)}}},23864:(e,t,s)=>{s.r(t),s.d(t,{CreateEndpointFromShapesRequest:()=>i});class i{_fromRepo;_shapes;_config;constructor(e){this._fromRepo=e.fromRepo||"",this._shapes=e.shapes||[],this._config=e.config||{}}toJSON(){return{fromRepo:this.fromRepo,shapes:this.shapes,config:this.config}}get fromRepo(){return this._fromRepo}set fromRepo(e){this._fromRepo=e}get shapes(){return this._shapes}set shapes(e){this._shapes=e}get config(){return this._config}set config(e){this._config=e}}},28379:(e,t,s)=>{s.r(t),s.d(t,{CONFIG_TYPE:()=>r,GraphqlEndpointConfigurationSettings:()=>h});var i=s(868);const r={STRING:"string",TEXT:"text",BOOLEAN:"boolean",JSON:"json"};class h{_settings;_hasSettings;constructor(e){this._settings=e,this._hasSettings=!!this._settings&&this._settings.models.length>0}toFlatJSON(){const e={},t=t=>{t.collection?e[t.key]=t.value:"select"===t.type?e[t.key]=t.value.value:e[t.key]=t.value};return this._settings.models.forEach(e=>{e instanceof i.DynamicFormField?t(e):[...e.fields,...e.hiddenFields].forEach(t)}),e}get hasSettings(){return this._hasSettings}get settings(){return this._settings}set settings(e){this._settings=e,this._hasSettings=this._settings.models.length>0}}},29646:(e,t,s)=>{s.r(t),s.d(t,{GraphqlSchemaShape:()=>r,GraphqlSchemaShapes:()=>i});class i{_shapes;_size;_isEmpty;constructor(e){this._shapes=e||[],this._size=this.shapes.length,this._isEmpty=0===this.shapes.length}processShapes(e){return this.shapes.map(e)}getShapeIds(){return this.shapes.map(e=>e.id)}get isEmpty(){return this._isEmpty}get size(){return this._size}get shapes(){return this._shapes}set shapes(e){this._shapes=e,this._size=this.shapes.length,this._isEmpty=0===this.shapes.length}toJSON(){return this.shapes.map(e=>e.id)}}class r{_id;_name;_label;_description;constructor(e){this._id=e.id,this._name=e.name,this._label=e.label,this._description=e.description}get id(){return this._id}set id(e){this._id=e}get name(){return this._name}set name(e){this._name=e}get label(){return this._label}set label(e){this._label=e}get description(){return this._description}set description(e){this._description=e}}},30514:(e,t,s)=>{s.r(t),s.d(t,{CreateEndpointFromOwlRequest:()=>i});class i{_fromRepo;_namedGraphs;_id;_label;_description;_vocPrefix;_config;constructor(e){this._id=e.id||"",this._label=e.label||"",this._description=e.description||"",this._fromRepo=e.fromRepo||"",this._namedGraphs=e.namedGraphs||[],this._vocPrefix=e.vocabPrefix||"",this._config=e.config||{}}toJSON(){return{id:this.id,label:this.label,description:this.description,fromRepo:this.fromRepo,namedGraphs:this.namedGraphs,vocabPrefix:this.vocPrefix,config:this.config}}get fromRepo(){return this._fromRepo}set fromRepo(e){this._fromRepo=e}get namedGraphs(){return this._namedGraphs}set namedGraphs(e){this._namedGraphs=e}get id(){return this._id}set id(e){this._id=e}get label(){return this._label}set label(e){this._label=e}get description(){return this._description}set description(e){this._description=e}get vocPrefix(){return this._vocPrefix}set vocPrefix(e){this._vocPrefix=e}get config(){return this._config}set config(e){this._config=e}}}};
//# sourceMappingURL=10406.52677950658780fd8859.bundle.js.map