graphdb-workbench
Version:
The web application for GraphDB APIs
2 lines • 2.12 kB
JavaScript
export const __webpack_id__=2109;export const __webpack_ids__=[2109,30690,75331];export const __webpack_modules__={2109:(t,o,e)=>{e.r(o);var r=e(27932);function i(t,o,e,i){t.RemoteLocationType=r.RemoteLocationType,t.RemoteLocationAuthType=r.RemoteLocationAuthType,t.isEdit=!!i.remoteLocation,t.remoteLocation=i.remoteLocation?new r.RemoteLocationModel({...i.remoteLocation}):new r.RemoteLocationModel,t.docBase=`https://graphdb.ontotext.com/documentation/${e.productShortVersion}`,t.ok=()=>{t.remoteLocationForm.$pristine||t.remoteLocationForm.$invalid||o.close(t.remoteLocation)},t.cancel=()=>{o.dismiss("cancel")},t.onLocationTypeChanged=()=>{[r.RemoteLocationType.ONTOPIC,r.RemoteLocationType.SPARQL].includes(t.remoteLocation.locationType)?t.remoteLocation.authType=r.RemoteLocationAuthType.BASIC:t.remoteLocation.authType=r.RemoteLocationAuthType.NONE}}e(75331),angular.module("graphdb.framework.repositories.controllers.manage-remote-location-dialog",["graphdb.framework.core.directives.validate-url"]).controller("ManageRemoteLocationDialogController",i),i.$inject=["$scope","$uibModalInstance","productInfo","data"]},30690:(t,o,e)=>{e.r(o),e.d(o,{UrlUtils:()=>n});const r=/^(h|ht|htt|http|https|http:|https:|http:\/|https:\/|http:\/\/|https:\/\/|https?:\/\/[\S]*)$/i,i=/^(f|ft|ftp|ftps|ftp:|ftps:|ftp:\/|ftps:\/|ftp:\/\/|ftps:\/\/[\S]*)$/i;class n{static isValidUrl(t){return r.test(t)||i.test(t)}static doesNotContain(t,o){return!new RegExp(o).test(t)}static doesNotUseProtocol(t,o){return!new RegExp("^("+o.join("|")+")://","i").test(t)}}},75331:(t,o,e)=>{e.r(o);var r=e(30690);angular.module("graphdb.framework.core.directives.validate-url",[]).directive("validateUrl",function(){return{restrict:"A",require:"ngModel",link:function(t,o,e,i){i.$validators.validUrl=function(t,o){if(i.$isEmpty(o))return"false"!==e.allowEmpty;if(!r.UrlUtils.isValidUrl(o))return!1;if(e.exclude&&!r.UrlUtils.doesNotContain(o,e.exclude))return!1;if(e.excludeProtocol){const t=e.excludeProtocol.split(",");if(!r.UrlUtils.doesNotUseProtocol(o,t))return!1}return!0}}}})}};
//# sourceMappingURL=2109.a4ea8761992346d273c5.bundle.js.map