graphdb-workbench 2.8.6-RC1 → 2.8.6-RC2
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/dist/112.393b01f7630bb30617c9.bundle.js +1 -0
- package/dist/113.b9328c23dfc071d71abf.bundle.js +1 -0
- package/dist/114.85465110c4fbd79849c7.bundle.js +1 -0
- package/dist/{12.8c18d6d2991d8c0f7b4f.bundle.js → 12.8078044ba9dc5aefb919.bundle.js} +1 -1
- package/dist/186.d2a7c6668b2f2198549a.bundle.js +1 -1
- package/dist/202.61f0f819d7cf434a37fa.bundle.js +1 -0
- package/dist/23.09956e07d8bced216cbd.bundle.js +1 -1
- package/dist/348.b09b5350639beca8034e.bundle.js +1 -1
- package/dist/354.474aa50f195477e48af9.bundle.js +1 -1
- package/dist/357.603fceaaeb0992019407.bundle.js +1 -1
- package/dist/358.5398b6635b1fc42b581a.bundle.js +1 -1
- package/dist/359.a2f8d884c46015ae98ed.bundle.js +1 -1
- package/dist/360.40b2c9f3610b0f8dea80.bundle.js +1 -1
- package/dist/361.91ac80c8c5586b0546a5.bundle.js +1 -1
- package/dist/391.45bf699afe7aba531cd9.bundle.js +1 -1
- package/dist/403.61a61ce1c12385533859.bundle.js +1 -1
- package/dist/404.b53dc0ad0aaedcf3f809.bundle.js +1 -1
- package/dist/405.eb8906e00f241da08275.bundle.js +1 -1
- package/dist/406.48298a2b9c49b99170f8.bundle.js +1 -1
- package/dist/407.56a20539c08f5d616640.bundle.js +1 -1
- package/dist/409.72d548b44e2f1c414a24.bundle.js +1 -1
- package/dist/410.df9406357dc52e98d0c4.bundle.js +1 -1
- package/dist/411.3a8907f7c02b1e9581e2.bundle.js +1 -1
- package/dist/412.5feece7f4c5164d2eadb.bundle.js +1 -1
- package/dist/42.72228fed050c414ecc9c.bundle.js +1 -1
- package/dist/43.53bafbaf1332f99c7e74.bundle.js +1 -1
- package/dist/61.f553a4c10a25b9af3cd7.bundle.js +1 -1
- package/dist/{7.61bf43af39c72953bed0.bundle.js → 7.ae3bc5d8b9fd54408aaf.bundle.js} +1 -1
- package/dist/72.6f58ccfef39ec2ee9614.bundle.js +1 -1
- package/dist/{bundle.4f8a2d193fc8fb5c96b2.bundle.js → bundle.9ddfa8388b9874fdbddd.bundle.js} +2 -2
- package/dist/index.html +3 -3
- package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
- package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
- package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
- package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
- package/dist/js/angular/security/templates/user.html +1 -1
- package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
- package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-item-detail.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +1 -1
- package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
- package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
- package/dist/license-checker.json +202 -202
- package/dist/pages/aclmanagement.html +2 -2
- package/dist/pages/autocomplete.html +1 -1
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/cluster-management/clusterInfo.html +3 -3
- package/dist/pages/create-index.html +1 -1
- package/dist/pages/dependencies.html +1 -1
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +1 -1
- package/dist/pages/explore.html +1 -1
- package/dist/pages/export.html +1 -1
- package/dist/pages/find.html +1 -1
- package/dist/pages/graph-config/saveGraphConfig.html +8 -8
- package/dist/pages/graphs-visualizations.html +7 -7
- package/dist/pages/guides.html +1 -1
- package/dist/pages/import.html +2 -2
- package/dist/pages/jdbc-create.html +1 -1
- package/dist/pages/monitor/backup-and-restore.html +1 -1
- package/dist/pages/monitor/queries.html +1 -1
- package/dist/pages/monitor/resources.html +1 -1
- package/dist/pages/namespaces.html +2 -2
- package/dist/pages/plugins.html +1 -1
- package/dist/pages/rdfClassHierarchyInfo.html +7 -7
- package/dist/pages/rdfrank.html +2 -2
- package/dist/pages/repositories.html +1 -1
- package/dist/pages/repository.html +1 -1
- package/dist/pages/similarity-indexes.html +1 -1
- package/dist/pages/sparql-editor.html +1 -1
- package/dist/pages/sparql-template-create.html +1 -1
- package/dist/pages/ux-test1.html +2 -2
- package/dist/pages/webapi.html +2 -2
- package/dist/res/swagger5/index.html +12 -12
- package/package.json +7 -3
- package/dist/112.a8e4b1e9ac3174ed7325.bundle.js +0 -1
- package/dist/113.c6b2b7df4083b02bb796.bundle.js +0 -1
- package/dist/114.c09525bd874619d0565c.bundle.js +0 -1
- package/dist/202.9a26adf3ff18016fd545.bundle.js +0 -1
- /package/dist/{vendor.43417cd30f5582ba3cff.bundle.js → vendor.92af725d37deb827ed5f.bundle.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[112,289],{289:function(t,e,a){"use strict";a.r(e),a.d(e,"ConnectionsChart",(function(){return s}));var r=a(87);class s extends r.ChartData{constructor(t){super(t,!1,!1)}createDataHolder(){return[{name:this.translateService.instant("resource.connections.active"),type:"line",showSymbol:!1,smooth:!0,data:[]},{name:this.translateService.instant("resource.connections.open"),type:"line",showSymbol:!1,smooth:!0,data:[]}]}translateLabels(){const[t,e]=this.dataHolder;t.name=this.translateService.instant("resource.connections.active"),e.name=this.translateService.instant("resource.connections.open")}addNewData(t,e,a){const[r,s]=t,{activeTransactions:i,openConnections:n}=a.performanceData;r.data.push({value:[e,i]}),s.data.push({value:[e,n]})}updateRange(t,e){const[a,s]=r.ChartData.getIntegerRangeForValues(t,e,this.selectedSeries);this.chartOptions.yAxis.max=a,this.chartOptions.yAxis.minInterval=s}}},87:function(t,e,a){"use strict";a.r(e),a.d(e,"ChartData",(function(){return s}));var r=a(541);class s{static get DEFAULT_MULTIPLIER(){return 1.2}static get MAXIMUM_DIVISIONS(){return 10}static get COLORS(){return[s.cssVar("--secondary-color"),s.cssVar("--primary-color"),s.cssVar("--tertiary-color"),s.cssVar("--gray-color")]}static get AREA_BAR_OPACITY(){return.5}static cssVar(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}constructor(t,e,a,r){this.filter=r,this.disableRangeUpdate=e,this.disableOldDataRemoval=a,this.translateService=t,this.refreshHandlers=[],this.initialChartSetup()}registerRefreshHandler(t){this.refreshHandlers.push(t)}unregisterRefreshHandler(t){const e=this.refreshHandlers.indexOf(t);e>-1&&this.refreshHandlers.splice(e,1)}initialChartSetup(t=!0){this.range=150,this.chartOptions=this.getDefaultChartOptions(this.translateService),t&&(this.dataHolder=this.createDataHolder(),this.chartOptions.series=this.dataHolder,this.firstLoad=!0),this.chartSetup(this.chartOptions)}refresh(t=!1){t||(this.chartSetup(this.chartOptions),this.updateRange(this.dataHolder)),this.refreshHandlers.forEach(t=>t(this.chartOptions))}setSubTitle(t,e=0){this.chartOptions.title.show=!0;let a="";t.forEach((r,s)=>{if(Array.isArray(r.value)&&!r.value.length)return;const i=Array.isArray(r.value)?r.value.join("/"):r.value;a+=`{a|${r.label}}`,void 0!==i&&(a+=`{b|${i}}`),s+1<t.length&&(a+=e>0&&(s+1)%e==0?"\n":"{a| · }")}),this.chartOptions.title.text=a}chartSetup(t){}createDataHolder(){throw new Error("Must implement data holder creation")}addData(t,e){this.removeOldData(this.dataHolder,this.range),this.addNewData(this.dataHolder,t,e,this.isFirstLoad()),this.hasSelectedSeries()&&(this.updateRange(this.dataHolder),this.firstLoad&&(this.firstLoad=!1),this.refresh(!0))}hasSelectedSeries(){return!this.selectedSeries||Object.values(this.selectedSeries).some(t=>!0===t)}removeOldData(t,e){this.disableOldDataRemoval||t[0].data.length>e&&t.forEach(t=>t.data.shift())}addNewData(t,e,a,r){}setSelectedSeries(t){this.selectedSeries=t}updateRange(t,e){if(this.disableRangeUpdate)return;const[a]=s.calculateMaxChartValueAndDivisions(t,e,this.selectedSeries);this.chartOptions.yAxis.max=a}isFirstLoad(){return this.firstLoad}getDefaultChartOptions(){return{title:{show:!1,text:"",left:"center",textStyle:{overflow:"breakAll",rich:{a:{fontWeight:400,fontSize:14},b:{color:s.cssVar("--secondary-color"),fontWeight:400,fontSize:14}}}},animation:!1,color:s.COLORS,legend:{right:"15%",top:"6%",textStyle:{overflow:"truncate"},icon:"circle"},tooltip:{trigger:"axis",axisPointer:{animation:!1,label:{formatter:function(t){return r.b.format(t.value,"{HH}:{mm}:{ss}",!1)}}}},grid:{containLabel:!0,left:40},xAxis:{type:"time",splitLine:{show:!0},axisLabel:{hideOverlap:!0,padding:8,formatter:{hour:"{bold|{HH}:{mm}}",minute:"{bold|{HH}:{mm}}",second:"{HH}:{mm}:{ss}"},color:s.cssVar("--gray-color-dark"),rich:{bold:{fontWeight:500}}}},yAxis:{type:"value",splitLine:{show:!0},axisLabel:{color:s.cssVar("--gray-color-dark")},axisTick:{lineStyle:{type:"solid"}}},textStyle:{fontFamily:s.cssVar("--main-font"),fontWeight:400}}}static getMaxValueFromDataHolder(t,e){const a=t.filter(t=>!e||angular.isUndefined(e[t.name])||!0===e[t.name]).map(t=>s.getMaxValueForDataSeries(t));return Math.max(1,...a)}static getMaxValueForDataSeries(t){return Math.max(...t.data.map(t=>t.value[1]))}static calculateMaxChartValueAndDivisions(t,e,a){let r;r=Array.isArray(t)?s.getMaxValueFromDataHolder(t,a):s.getMaxValueForDataSeries(t);const i=Math.ceil(r*(e||s.DEFAULT_MULTIPLIER))||1;return[i,Math.ceil(i/s.MAXIMUM_DIVISIONS)]}static getIntegerRangeForValues(t,e,a){const[r,i]=s.calculateMaxChartValueAndDivisions(t,e,a);return[r,i]}static formatBytesValue(t,e,a){let r=t;e&&(r=s.getMaxValueFromDataHolder(e,a));const i=Math.floor(Math.log(r)/Math.log(1024));return`${(parseFloat(t)/Math.pow(1024,i)).toFixed(2)} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}`}formatNumber(t){if(!angular.isUndefined(t)&&this.filter)return this.filter("currency")(t,"",0)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[113,289],{291:function(t,e,a){"use strict";a.r(e),a.d(e,"EpoolChart",(function(){return s}));var r=a(87);class s extends r.ChartData{constructor(t){super(t,!1,!1)}chartSetup(t){const e={grid:{containLabel:!0,left:40},yAxis:[{name:this.translateService.instant("resource.epool.reads"),nameLocation:"middle",type:"value",nameGap:50},{name:this.translateService.instant("resource.epool.writes"),nameLocation:"middle",type:"value",nameGap:50}]};_.merge(t,e)}createDataHolder(){return[{name:this.translateService.instant("resource.epool.reads"),type:"line",showSymbol:!1,smooth:!0,yAxisIndex:0,data:[]},{name:this.translateService.instant("resource.epool.writes"),type:"line",showSymbol:!1,smooth:!0,yAxisIndex:1,data:[]}]}translateLabels(){const[t,e]=this.dataHolder;t.name=this.translateService.instant("resource.epool.reads"),e.name=this.translateService.instant("resource.epool.writes"),this.chartSetup(this.chartOptions)}addNewData(t,e,a,r){const s=a.performanceData,[i,o]=t;let n=0,l=0;const h=s.entityPool.epoolReads,c=s.entityPool.epoolWrites;r||(n=h-this.lastestData.reads,l=c-this.lastestData.writes),this.lastestData={reads:h,writes:c},i.data.push({value:[e,n]}),o.data.push({value:[e,l]})}updateRange(t){t.forEach((t,e)=>{const[a,s]=r.ChartData.getIntegerRangeForValues(t,0,this.selectedSeries);this.chartOptions.yAxis[e].max=a,this.chartOptions.yAxis[e].minInterval=s})}}},87:function(t,e,a){"use strict";a.r(e),a.d(e,"ChartData",(function(){return s}));var r=a(541);class s{static get DEFAULT_MULTIPLIER(){return 1.2}static get MAXIMUM_DIVISIONS(){return 10}static get COLORS(){return[s.cssVar("--secondary-color"),s.cssVar("--primary-color"),s.cssVar("--tertiary-color"),s.cssVar("--gray-color")]}static get AREA_BAR_OPACITY(){return.5}static cssVar(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}constructor(t,e,a,r){this.filter=r,this.disableRangeUpdate=e,this.disableOldDataRemoval=a,this.translateService=t,this.refreshHandlers=[],this.initialChartSetup()}registerRefreshHandler(t){this.refreshHandlers.push(t)}unregisterRefreshHandler(t){const e=this.refreshHandlers.indexOf(t);e>-1&&this.refreshHandlers.splice(e,1)}initialChartSetup(t=!0){this.range=150,this.chartOptions=this.getDefaultChartOptions(this.translateService),t&&(this.dataHolder=this.createDataHolder(),this.chartOptions.series=this.dataHolder,this.firstLoad=!0),this.chartSetup(this.chartOptions)}refresh(t=!1){t||(this.chartSetup(this.chartOptions),this.updateRange(this.dataHolder)),this.refreshHandlers.forEach(t=>t(this.chartOptions))}setSubTitle(t,e=0){this.chartOptions.title.show=!0;let a="";t.forEach((r,s)=>{if(Array.isArray(r.value)&&!r.value.length)return;const i=Array.isArray(r.value)?r.value.join("/"):r.value;a+=`{a|${r.label}}`,void 0!==i&&(a+=`{b|${i}}`),s+1<t.length&&(a+=e>0&&(s+1)%e==0?"\n":"{a| · }")}),this.chartOptions.title.text=a}chartSetup(t){}createDataHolder(){throw new Error("Must implement data holder creation")}addData(t,e){this.removeOldData(this.dataHolder,this.range),this.addNewData(this.dataHolder,t,e,this.isFirstLoad()),this.hasSelectedSeries()&&(this.updateRange(this.dataHolder),this.firstLoad&&(this.firstLoad=!1),this.refresh(!0))}hasSelectedSeries(){return!this.selectedSeries||Object.values(this.selectedSeries).some(t=>!0===t)}removeOldData(t,e){this.disableOldDataRemoval||t[0].data.length>e&&t.forEach(t=>t.data.shift())}addNewData(t,e,a,r){}setSelectedSeries(t){this.selectedSeries=t}updateRange(t,e){if(this.disableRangeUpdate)return;const[a]=s.calculateMaxChartValueAndDivisions(t,e,this.selectedSeries);this.chartOptions.yAxis.max=a}isFirstLoad(){return this.firstLoad}getDefaultChartOptions(){return{title:{show:!1,text:"",left:"center",textStyle:{overflow:"breakAll",rich:{a:{fontWeight:400,fontSize:14},b:{color:s.cssVar("--secondary-color"),fontWeight:400,fontSize:14}}}},animation:!1,color:s.COLORS,legend:{right:"15%",top:"6%",textStyle:{overflow:"truncate"},icon:"circle"},tooltip:{trigger:"axis",axisPointer:{animation:!1,label:{formatter:function(t){return r.b.format(t.value,"{HH}:{mm}:{ss}",!1)}}}},grid:{containLabel:!0,left:40},xAxis:{type:"time",splitLine:{show:!0},axisLabel:{hideOverlap:!0,padding:8,formatter:{hour:"{bold|{HH}:{mm}}",minute:"{bold|{HH}:{mm}}",second:"{HH}:{mm}:{ss}"},color:s.cssVar("--gray-color-dark"),rich:{bold:{fontWeight:500}}}},yAxis:{type:"value",splitLine:{show:!0},axisLabel:{color:s.cssVar("--gray-color-dark")},axisTick:{lineStyle:{type:"solid"}}},textStyle:{fontFamily:s.cssVar("--main-font"),fontWeight:400}}}static getMaxValueFromDataHolder(t,e){const a=t.filter(t=>!e||angular.isUndefined(e[t.name])||!0===e[t.name]).map(t=>s.getMaxValueForDataSeries(t));return Math.max(1,...a)}static getMaxValueForDataSeries(t){return Math.max(...t.data.map(t=>t.value[1]))}static calculateMaxChartValueAndDivisions(t,e,a){let r;r=Array.isArray(t)?s.getMaxValueFromDataHolder(t,a):s.getMaxValueForDataSeries(t);const i=Math.ceil(r*(e||s.DEFAULT_MULTIPLIER))||1;return[i,Math.ceil(i/s.MAXIMUM_DIVISIONS)]}static getIntegerRangeForValues(t,e,a){const[r,i]=s.calculateMaxChartValueAndDivisions(t,e,a);return[r,i]}static formatBytesValue(t,e,a){let r=t;e&&(r=s.getMaxValueFromDataHolder(e,a));const i=Math.floor(Math.log(r)/Math.log(1024));return`${(parseFloat(t)/Math.pow(1024,i)).toFixed(2)} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}`}formatNumber(t){if(!angular.isUndefined(t)&&this.filter)return this.filter("currency")(t,"",0)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[114,289],{287:function(t,e,a){"use strict";a.r(e),a.d(e,"QueriesChart",(function(){return s}));var r=a(87);class s extends r.ChartData{constructor(t){super(t,!1,!1)}createDataHolder(){return[{name:this.translateService.instant("resource.queries.running"),type:"line",showSymbol:!1,smooth:!0,data:[]}]}translateLabels(){const[t]=this.dataHolder;t.name=this.translateService.instant("resource.queries.running"),this.configureSubtitle()}addNewData(t,e,a){const{activeQueryData:r,performanceData:s}=a;this.latestData={slowQueries:s.queries.slow,suboptimal:s.queries.suboptimal,activeQueryData:r,performanceData:s},t[0].data.push({value:[e,r.length]}),this.configureSubtitle()}updateRange(t,e){const[a,s]=r.ChartData.getIntegerRangeForValues(t,e,this.selectedSeries);this.chartOptions.yAxis.max=a,this.chartOptions.yAxis.minInterval=s}configureSubtitle(){const t=[{label:this.translateService.instant("resource.queries.slow"),value:this.latestData.slowQueries},{label:this.translateService.instant("resource.queries.suboptimal"),value:this.latestData.suboptimal}];this.setSubTitle(t)}}},87:function(t,e,a){"use strict";a.r(e),a.d(e,"ChartData",(function(){return s}));var r=a(541);class s{static get DEFAULT_MULTIPLIER(){return 1.2}static get MAXIMUM_DIVISIONS(){return 10}static get COLORS(){return[s.cssVar("--secondary-color"),s.cssVar("--primary-color"),s.cssVar("--tertiary-color"),s.cssVar("--gray-color")]}static get AREA_BAR_OPACITY(){return.5}static cssVar(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}constructor(t,e,a,r){this.filter=r,this.disableRangeUpdate=e,this.disableOldDataRemoval=a,this.translateService=t,this.refreshHandlers=[],this.initialChartSetup()}registerRefreshHandler(t){this.refreshHandlers.push(t)}unregisterRefreshHandler(t){const e=this.refreshHandlers.indexOf(t);e>-1&&this.refreshHandlers.splice(e,1)}initialChartSetup(t=!0){this.range=150,this.chartOptions=this.getDefaultChartOptions(this.translateService),t&&(this.dataHolder=this.createDataHolder(),this.chartOptions.series=this.dataHolder,this.firstLoad=!0),this.chartSetup(this.chartOptions)}refresh(t=!1){t||(this.chartSetup(this.chartOptions),this.updateRange(this.dataHolder)),this.refreshHandlers.forEach(t=>t(this.chartOptions))}setSubTitle(t,e=0){this.chartOptions.title.show=!0;let a="";t.forEach((r,s)=>{if(Array.isArray(r.value)&&!r.value.length)return;const i=Array.isArray(r.value)?r.value.join("/"):r.value;a+=`{a|${r.label}}`,void 0!==i&&(a+=`{b|${i}}`),s+1<t.length&&(a+=e>0&&(s+1)%e==0?"\n":"{a| · }")}),this.chartOptions.title.text=a}chartSetup(t){}createDataHolder(){throw new Error("Must implement data holder creation")}addData(t,e){this.removeOldData(this.dataHolder,this.range),this.addNewData(this.dataHolder,t,e,this.isFirstLoad()),this.hasSelectedSeries()&&(this.updateRange(this.dataHolder),this.firstLoad&&(this.firstLoad=!1),this.refresh(!0))}hasSelectedSeries(){return!this.selectedSeries||Object.values(this.selectedSeries).some(t=>!0===t)}removeOldData(t,e){this.disableOldDataRemoval||t[0].data.length>e&&t.forEach(t=>t.data.shift())}addNewData(t,e,a,r){}setSelectedSeries(t){this.selectedSeries=t}updateRange(t,e){if(this.disableRangeUpdate)return;const[a]=s.calculateMaxChartValueAndDivisions(t,e,this.selectedSeries);this.chartOptions.yAxis.max=a}isFirstLoad(){return this.firstLoad}getDefaultChartOptions(){return{title:{show:!1,text:"",left:"center",textStyle:{overflow:"breakAll",rich:{a:{fontWeight:400,fontSize:14},b:{color:s.cssVar("--secondary-color"),fontWeight:400,fontSize:14}}}},animation:!1,color:s.COLORS,legend:{right:"15%",top:"6%",textStyle:{overflow:"truncate"},icon:"circle"},tooltip:{trigger:"axis",axisPointer:{animation:!1,label:{formatter:function(t){return r.b.format(t.value,"{HH}:{mm}:{ss}",!1)}}}},grid:{containLabel:!0,left:40},xAxis:{type:"time",splitLine:{show:!0},axisLabel:{hideOverlap:!0,padding:8,formatter:{hour:"{bold|{HH}:{mm}}",minute:"{bold|{HH}:{mm}}",second:"{HH}:{mm}:{ss}"},color:s.cssVar("--gray-color-dark"),rich:{bold:{fontWeight:500}}}},yAxis:{type:"value",splitLine:{show:!0},axisLabel:{color:s.cssVar("--gray-color-dark")},axisTick:{lineStyle:{type:"solid"}}},textStyle:{fontFamily:s.cssVar("--main-font"),fontWeight:400}}}static getMaxValueFromDataHolder(t,e){const a=t.filter(t=>!e||angular.isUndefined(e[t.name])||!0===e[t.name]).map(t=>s.getMaxValueForDataSeries(t));return Math.max(1,...a)}static getMaxValueForDataSeries(t){return Math.max(...t.data.map(t=>t.value[1]))}static calculateMaxChartValueAndDivisions(t,e,a){let r;r=Array.isArray(t)?s.getMaxValueFromDataHolder(t,a):s.getMaxValueForDataSeries(t);const i=Math.ceil(r*(e||s.DEFAULT_MULTIPLIER))||1;return[i,Math.ceil(i/s.MAXIMUM_DIVISIONS)]}static getIntegerRangeForValues(t,e,a){const[r,i]=s.calculateMaxChartValueAndDivisions(t,e,a);return[r,i]}static formatBytesValue(t,e,a){let r=t;e&&(r=s.getMaxValueFromDataHolder(e,a));const i=Math.floor(Math.log(r)/Math.log(1024));return`${(parseFloat(t)/Math.pow(1024,i)).toFixed(2)} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}`}formatNumber(t){if(!angular.isUndefined(t)&&this.filter)return this.filter("currency")(t,"",0)}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[12,52,53,64,73,96,182,184,185,190,202,203,205,206,208,298,304,324,329],{101:function(e,t,r){"use strict";r.r(t),r.d(t,"removeSpecialChars",(function(){return i})),r.d(t,"toBoolean",(function(){return s})),r.d(t,"toTitleCase",(function(){return n}));var o=r(18);const i=e=>e.replace(/[()']/g,""),s=e=>"string"==typeof e?"true"===e:Boolean(e),n=e=>e?Object(o.upperFirst)(e.toLowerCase()):e},113:function(e,t,r){"use strict";r.r(t),r.d(t,"ImportResourceType",(function(){return o}));const o={DIRECTORY:"directory",FILE:"file",URL:"url",TEXT:"text"}},117:function(e,t,r){"use strict";r.r(t),r.d(t,"TABS",(function(){return s}));var o=r(18),i=r(91);const s={USER:"user",SERVER:"server"};function n(e){let t=s.USER,r=[],n=[],a=[],p=!0,c=[];return{updateActiveTabId:function(r){t=r,e.emitSync("activeTabIdUpdated",d())},getActiveTabId:d,onActiveTabIdUpdated:function(t){return e.subscribeSync("activeTabIdUpdated",e=>t(e))},getFiles:f,addFile:function(t){const r=f();r.push(t),m(r),e.emitSync("fileAdded",Object(o.cloneDeep)(t))},updateFiles:m,onFilesUpdated:function(t){return e.subscribeSync("filesUpdated",e=>t(e))},getImportedResources:g,updateImportedResources:function(t){r=t,e.emitSync("importedResourcesUpdated",g()),e.emitSync("resourcesUpdated",h())},onImportedResourcesUpdated:function(t){return e.subscribeSync("importedResourcesUpdated",e=>t(e))},getResources:h,onResourcesUpdated:function(t){return e.subscribeSync("resourcesUpdated",e=>t(e))},updateShowLoader:function(t){p=t,e.emitSync("showLoaderUpdated",u())},getShowLoader:u,onShowLoaderUpdated:function(t){return e.subscribeSync("showLoaderUpdated",e=>t(e))},updateSelectedFilesNames:function(t){c=Object(o.cloneDeep)(t),e.emitSync("selectedFilesNamesUpdated",l())},getSelectedFilesNames:l,onSelectedFilesNamesUpdated:function(t){return e.subscribeSync("selectedFilesNamesUpdated",e=>t(e))},updateResourceForUpload:function(e){const t=S(),r=t.find(({name:t})=>t===e.name);r?Object.assign(r,e):t.push(e);R(t)},getResourceForUpload:function(e){return Object(o.cloneDeep)(n.find(({name:t})=>t===e))},updateResourcesForUpload:R,getResourcesForUpload:S,onResourcesForUploadChanged:function(t){return e.subscribeSync("resourcesForUploadChanged",e=>t(e))}};function l(){return Object(o.cloneDeep)(c)}function u(){return p}function d(){return t}function m(t){a=Object(o.cloneDeep)(t),e.emitSync("filesUpdated",f())}function f(){return Object(o.cloneDeep)(a)}function g(){return Object(o.cloneDeep)(r)||[]}function h(){const e=g();let t=S();const r=[],o=[];return e.forEach(({name:e})=>{const s=t.find(({name:t})=>t===e);s&&(s.status===i.ImportResourceStatus.UPLOADED?r.push(s):o.push(s))}),r.length>0&&(t=t.filter(({name:e})=>!r.some(({name:t})=>t===e)),R(t,!1)),e.filter(({name:e})=>!o.some(t=>e===t)).concat(t)}function R(t,r=!0){n=Object(o.cloneDeep)(t),e.emitSync("resourcesForUploadChanged",S()),r&&e.emitSync("resourcesUpdated",h())}function S(){return Object(o.cloneDeep)(n)||[]}}angular.module("graphdb.framework.import.services.importcontext",[]).factory("ImportContextService",n),n.$inject=["EventEmitterService"]},146:function(e,t,r){"use strict";r.r(t),r.d(t,"ImportParsingSettings",(function(){return o}));class o{constructor(){this.contextLink=void 0,this.preserveBNodeIds=!1,this.failOnUnknownDataTypes=!1,this.verifyDataTypeValues=!1,this.normalizeDataTypeValues=!1,this.failOnUnknownLanguageTags=!1,this.verifyLanguageTags=!1,this.normalizeLanguageTags=!1,this.stopOnError=!0}}},178:function(e,t,r){"use strict";r.r(t),r.d(t,"ImportResource",(function(){return n}));var o=r(91),i=r(146),s=r(113);class n{constructor(e,t){this.hash=t(JSON.stringify(e)),this.name=e?e.name:void 0,this.status=e?e.status:o.ImportResourceStatus.NONE,this.message=e&&e.message?e.message:"",this.context=e&&e.context?e.context:"",this.replaceGraphs=e?e.replaceGraphs:[],this.baseURI=e?e.baseURI:void 0,this.forceSerial=!!e&&e.forceSerial,this.type=e?e.type:void 0,this.format=e?e.format:void 0,this.data=e?e.data:void 0,this.modifiedOn=e?e.lastModified:void 0,this.importedOn=e?e.imported:void 0,this.size=e?e.size:"",this.addedStatements=e?e.addedStatements:0,this.removedStatements=e?e.removedStatements:0,this.numReplacedGraphs=e?e.numReplacedGraphs:0,this.parserSettings=e?e.parserSettings:new i.ImportParsingSettings,this.requestIdHeadersToForward=e?e.requestIdHeadersToForward:void 0}isDirectory(){return s.ImportResourceType.DIRECTORY===this.type}isFile(){return s.ImportResourceType.FILE===this.type||s.ImportResourceType.URL===this.type||s.ImportResourceType.TEXT===this.type}isURL(){return s.ImportResourceType.URL===this.type}isText(){return s.ImportResourceType.TEXT===this.type}}},179:function(e,t,r){"use strict";r.r(t),r.d(t,"SortingType",(function(){return o}));const o={NAME:"NAME",SIZE:"SIZE",MODIFIED:"MODIFIED",IMPORTED:"IMPORTED",CONTEXT:"CONTEXT"}},266:function(e,t,r){"use strict";r.r(t),r.d(t,"Operation",(function(){return f}));r(9),r(44),r(267),r(268);var o=r(117),i=(r(269),r(270)),s=(r(271),r(272),r(273),r(274)),n=r(101),a=(r(25),r(275)),p=r(276),c=r(0),l=r(277),u=r(179),d=r(91);const m=angular.module("graphdb.framework.impex.import.controllers",["ui.bootstrap","toastr","graphdb.framework.core.services.repositories","graphdb.framework.utils.localstorageadapter","graphdb.framework.utils.uriutils","graphdb.framework.guides.services","graphdb.framework.rest.import.service","graphdb.framework.rest.upload.service","graphdb.framework.import.services.importcontext","graphdb.framework.impex.import.controllers.tab","graphdb.framework.impex.import.controllers.settings-modal","graphdb.framework.impex.import.controllers.import-url","graphdb.framework.impex.import.controllers.import-text-snippet","graphdb.framework.impex.import.controllers.file-override-confirmation"]),f={IMPORT:"import",BATCH_IMPORT:"batch_import",IMPORT_SNIPPET:"import_snippet",IMPORT_URL:"import_url",UPLOAD:"upload"},g="file",h="text",R="url";m.controller("ImportViewCtrl",["$scope","toastr","$interval","$repositories","$uibModal","$filter","$jwtAuth","$location","$translate","LicenseRestService","GuidesService","ModalService","ImportRestService","ImportContextService",function(e,t,r,a,l,m,g,h,R,S,I,v,F,y){const T=[];let b=null;let U=void 0;e.files=[],e.fileChecked={},e.activeTabId=y.getActiveTabId(),e.popoverTemplateUrl="settingsPopoverTemplate.html",e.fileFormatsExtended=s.FileFormats.getFileFormatsExtended(),e.fileFormatsHuman=s.FileFormats.getFileFormatsHuman()+R.instant("import.gz.zip"),e.textFileFormatsHuman=s.FileFormats.getTextFileFormatsHuman(),e.maxUploadFileSizeBytes=0,e.SORTING_TYPES=u.SortingType,e.TAB_IDS=o.TABS,e.toTitleCase=e=>n.toTitleCase(e),e.setSettingsFor=(t,r,o,s,n=(()=>{}))=>{A(t,r).then(r=>{e.settingsFor=t,e.settings=r,""===t||"application/ld+json"===o||"application/x-ld+ndjson"===o||t.endsWith("jsonld")||t.endsWith("zip")||t.endsWith("gz")||"directory"===e.settings.type?e.settings.hasContextLink=!0:e.settings.hasContextLink=!1;const a=_.cloneDeep(e.settings),c={templateUrl:"js/angular/import/templates/settingsModal.html",controller:"SettingsModalController",windowClass:"import-settings-modal",resolve:{dialogModel:function(){return{operation:s,settings:_.cloneDeep(e.settings),hasParserSettings:e.isLocalLocation,defaultSettings:a,isMultiple:!t,activeTab:e.activeTabId}}},size:"lg"};I.isActive()&&(c.backdrop="static",c.keyboard=!1),l.open(c).result.then(t=>{if(e.currentFiles&&t.action===i.SettingsModalActions.UPLOAD_AND_IMPORT){const t=Object(p.filesToImportResource)(e.currentFiles,d.ImportResourceStatus.UPLOADING);y.updateResourcesForUpload(t)}e.settings=t.settings,""===e.settingsFor?e.importSelected():e.importFile(e.settingsFor,!0)},t=>{if(e.settings=t.settings,t.action===i.SettingsModalActions.CANCEL&&(e.currentFiles=[],s===f.UPLOAD&&(e.files=[])),e.currentFiles&&t.action===i.SettingsModalActions.UPLOAD_ONLY){const t=Object(p.filesToImportResource)(e.currentFiles,d.ImportResourceStatus.UPLOADING);y.updateResourcesForUpload(t)}n&&n()})})},e.updateImport=(t,r,o)=>{A(t,r).then(r=>{e.settingsFor=t,e.settings=r,e.importFile(t,o)})},e.importSelected=t=>{const r=new Set([...O(),...x()]),o=Array.from(r),i=()=>{const r=o.shift();r&&A(r).then(o=>{t&&(e.settings=o),e.importFile(r,!0,i)})};i()},e.isLocalLocation=()=>{const e=a.getActiveLocation();return e&&e.local},e.updateList=t=>{e.canWriteActiveRepo()&&e.updateListHttp(t)},e.onRepositoryChange=()=>{e.setRestricted(),e.isRestricted||(e.updateList(!0),E())},e.onImport=t=>{e.setSettingsFor(t.importResource.name,!1,t.importResource.format,f.IMPORT)},e.onStopImport=r=>{const i=r.importResource;(e.activeTabId===o.TABS.USER?F.stopUserDataImport:F.stopServerImport)(a.getActiveRepository(),{name:i.name,type:i.type}).success((function(){e.updateList()})).error((function(e){t.warning(R.instant("import.error.could.not.stop",{data:getError(e)}))}))},e.onRemove=e=>{const t=e.map(e=>e.name);D(t)},e.onReset=e=>{$(e,!1)},e.importAll=(t,r)=>{if(r)e.importSelected(t,r);else{let o="";1===t.length&&(o=t[0].importResource.name),e.setSettingsFor(o,r,void 0,f.BATCH_IMPORT)}},e.onEditResource=t=>{t.importResource.isText()&&e.openTextSnippetDialog(t.importResource)};const E=()=>(U=void 0,e.canWriteActiveRepo()?F.getDefaultSettings(a.getActiveRepository()).success((function(e){return U=e,U})).error((function(e){t.warning(R.instant("import.error.default.settings",{data:getError(e)}))})):Promise.resolve(U)),x=()=>y.getSelectedFilesNames(),O=()=>e.currentFiles.filter(e=>e.name).map(e=>e.name),D=(e=[])=>{const t="<br/>"+e.join("<br/>"),r=Object(c.decodeHTML)(R.instant("import.remove.confirm.msg",{name:t}));v.openConfirmation(R.instant("common.confirm"),r,()=>{$(e,!0)})},A=(t,r)=>r||_.isEmpty(t)||_.isEmpty(e.savedSettings[t])?(U?Promise.resolve(angular.copy(U)):E().then(()=>angular.copy(U))).then(e=>e):Promise.resolve(e.savedSettings[t]);e.updateListHttp=r=>{if(!a.getActiveRepository())return Promise.resolve();const i=e.activeTabId===o.TABS.USER?F.getUploadedFiles:F.getServerFiles,s=e.activeTabId;return i(a.getActiveRepository()).success((function(t){s===y.getActiveTabId()&&(y.updateImportedResources(Object(p.toImportResource)(t)),0===e.files.length||r?(e.files=t,y.updateFiles(e.files),e.files.forEach((function(t){t.type||(t.type=e.defaultType)}))):e.files.forEach((function(r){const o=_.find(t,_.matches({name:r.name}));r.status&&o&&_.assign(r,o),r.type||(r.type=e.defaultType)})),r&&o.TABS.USER===e.activeTabId&&(e.files=_.filter(e.files,(function(e){return void 0!==e.status})),y.updateFiles(e.files)),e.savedSettings=_.mapKeys(_.filter(e.files,"parserSettings"),"name"))})).error((function(e){t.warning(R.instant("import.error.could.not.get.files",{data:getError(e)}))}))};const $=(r,i)=>{if(!r||r.length<1)return;(e.activeTabId===o.TABS.USER?F.resetUserDataStatus:F.resetServerFileStatus)(a.getActiveRepository(),r,i).success((function(){e.updateList(!0)})).error((function(e){t.warning(R.instant("import.error.could.not.clear",{data:getError(e)}))}))},L=()=>{T.forEach(e=>e())},P=t=>{e.activeTabId=t,y.updateImportedResources([]),y.updateResourcesForUpload([]),y.updateShowLoader(!0),e.updateListHttp(!0).finally(()=>y.updateShowLoader(!1))};e.importViewControllerInit=()=>{T.push(e.$on("repositoryIsSet",e.onRepositoryChange)),T.push(e.$on("$destroy",()=>r.cancel(b))),T.push(y.onActiveTabIdUpdated(e=>P(e))),e.$on("$destroy",L),S.getInfo().success((function(t){e.appData={},e.appData.properties={};for(let r=0;r<t.length;r++)e.appData.properties[t[r].key]={source:t[r].source,value:t[r].value};e.maxUploadFileSizeBytes=e.appData.properties["graphdb.workbench.maxUploadSize"].value})).error((function(e){const r=getError(e);t.error(r,R.instant("common.error"))})),E(),b=r(()=>{e.updating||e.updateList(!1)},4e3),P(y.getActiveTabId())}}]),m.controller("ImportCtrl",["$scope","toastr","$controller","$translate","$repositories","ImportRestService","ImportContextService",function(e,t,r,i,s,n,a){e.columnKeys={name:"import.import_resource_tree.header.name",size:"import.import_resource_tree.header.size",modified:"import.import_resource_tree.header.modified",imported:"import.import_resource_tree.header.imported",context:"import.import_resource_tree.header.context"},angular.extend(this,r("ImportViewCtrl",{$scope:e})),e.defaultType="server",e.tabId="#import-server",e.importSelected=e=>{p(a.getSelectedFilesNames(),e)},e.importFile=function(e){p([e])};const p=function(r,o){e.canWriteActiveRepo()&&n.importServerFiles(s.getActiveRepository(),{importSettings:o?null:e.settings,fileNames:r}).success((function(){e.updateList(),e.fileChecked={}})).error((function(e){t.error(i.instant("import.could.not.send.file",{data:getError(e)}))}))};o.TABS.SERVER===a.getActiveTabId()&&e.importViewControllerInit()}]),m.controller("UploadCtrl",["$scope","toastr","$controller","$uibModal","$translate","$repositories","ImportRestService","UploadRestService","ModalService","ImportContextService","EventEmitterService","$filter",function(e,t,r,i,s,n,p,c,u,m,S,I){const v=new l.FilePrefixRegistry,F=[];e.columnKeys={name:"import.import_resource_tree.header.name",size:"import.import_resource_tree.header.size",modified:"import.import_resource_tree.header.uploaded",imported:"import.import_resource_tree.header.imported",context:"import.import_resource_tree.header.context"},angular.extend(this,r("ImportViewCtrl",{$scope:e})),e.defaultType=g,e.tabId="#import-user",e.currentFiles=[];let y=!1;e.pastedDataIdx=1,e.fileSelected=function(t,r,o,i,s){const n={files:o,cancel:!1};S.emit("filesForUploadSelected",n,t=>{if(!t.cancel){const t=s||[];T(t);const r=t.map(e=>e.name);let i=o||[];i=i.filter(e=>!r.includes(e.name)),O(i);const n=[],a=[];i.forEach(t=>{e.files.some(e=>e.name===t.name)?n.push(t):a.push(t)}),n.length>0?D(n,a):(e.currentFiles=[...i],y=!0,A())}})},e.importFile=(r,o,i)=>{const n=e.files.find(e=>e.name===r);n?n.type===h?b(n,o,i):n.type===R?E(n,o,i):x(n,o,i):t.warning(s.instant("import.no.such.file",{name:r}))},e.openTextSnippetDialog=t=>{t&&t.data;i.open({templateUrl:"js/angular/import/templates/textSnippet.html",controller:"ImportTextSnippetController",resolve:{text:function(){return t?t.data:""},format:function(){return t?t.format:"text/turtle"}}}).result.then(r=>{t?(t.data===r.text&&t.format===r.format||t.status===d.ImportResourceStatus.NONE||(t.status=d.ImportResourceStatus.NONE,t.message=s.instant("import.text.snippet.not.imported")),t.data=r.text,t.format=r.format,U(t)):(t={type:"text",name:"Text snippet "+a.DateUtils.formatCurrentDateTime(),format:r.format,data:r.text},e.files.unshift(t),e.updateImport(t.name,!1,!1)),r.startImport&&e.setSettingsFor(t.name,!1,t.format,f.IMPORT_SNIPPET)})},e.rdfDataFromURL=()=>{i.open({templateUrl:"js/angular/import/templates/urlImport.html",controller:"ImportUrlController",scope:e}).result.then((function(t){const r=_.find(e.files,{type:"url",name:t.url});r?r.format=t.format:e.files.unshift({type:"url",name:t.url,format:t.format,data:t.url}),e.updateImport(t.url,!0,!1),t.startImport&&e.setSettingsFor(t.url,!0,t.format,f.IMPORT_URL)}))};const T=e=>{e.length>0&&e.forEach((function(e){t.warning(s.instant("import.large.file",{name:e.name,size:I("bytes")(e.size)}))}))},b=(r,o,i)=>{e.settings.name=r.name,e.settings.type=r.type,e.settings.data=r.data,e.settings.format=r.format,r.status=d.ImportResourceStatus.PENDING;(o?p.importTextSnippet:p.updateTextSnippet)(n.getActiveRepository(),e.settings).success((function(){e.updateList()})).error((function(e){t.error(s.instant("import.could.not.send.data",{data:getError(e)})),r.status=d.ImportResourceStatus.ERROR,r.message=getError(e)})).finally(i||function(){})},U=r=>{e.updating=!0,p.updateTextSnippet(n.getActiveRepository(),r).success((function(e){})).error((function(e){t.error(s.instant("import.could.not.update.text",{data:getError(e)}))})).finally((function(){e.updating=!1}))},E=(r,o,i)=>{e.settings.name=r.name,e.settings.type=r.type,e.settings.data=r.data,e.settings.format=r.format,r.status=d.ImportResourceStatus.PENDING;(o?p.importFromUrl:p.updateFromUrl)(n.getActiveRepository(),e.settings).success((function(){e.updateList()})).error((function(e){t.error(s.instant("import.could.not.send.url",{data:getError(e)}))})).finally(i||function(){})},x=(r,o,i)=>{e.settings.name=r.name;const a=c.createUploadPayload(r,e.settings);(o?c.uploadUserDataFile:c.updateUserDataFile)(n.getActiveRepository(),r,a).progress(e=>{const t=parseInt(100*e.loaded/e.total)||0,o=s.instant("import.file.upload.progress",{progress:t}),i=m.getResourceForUpload(r.name);i&&i.status!==d.ImportResourceStatus.UPLOAD_ERROR&&(i.status=t>=100?d.ImportResourceStatus.UPLOADED:d.ImportResourceStatus.UPLOADING,i.message=o,m.updateResourceForUpload(i))}).success(t=>{const o=m.getResourceForUpload(r.name);o&&o.status!==d.ImportResourceStatus.UPLOAD_ERROR&&(o.status=d.ImportResourceStatus.UPLOADED,o.message=void 0,m.updateResourceForUpload(o)),e.updateList()}).error(e=>{let o="";o=e?s.instant("import.could.not.upload.file",{data:o}):s.instant("import.upload.file.failure"),t.error(o),r.status=d.ImportResourceStatus.ERROR,r.message=o;const i=m.getResourceForUpload(r.name);i&&i.status!==d.ImportResourceStatus.UPLOADED&&(i.status=d.ImportResourceStatus.UPLOAD_ERROR,i.message=o,m.updateResourceForUpload(i))}).finally(()=>{e.currentFiles=e.currentFiles.filter(({name:e})=>e!==r.name),i()})},O=e=>{e.forEach((function(r){if("bz2"===r.name.substr(r.name.lastIndexOf(".")+1)){const o=e.indexOf(r);o>-1&&e.splice(o,1),t.error(s.instant("import.could.not.upload",{name:r.name}))}}))},D=(t,r)=>{const o=t.map(e=>e.name).join("<br/>");i.open({templateUrl:"js/angular/import/templates/file-override-confirmation.html",controller:"FileOverrideConfirmationController",windowClass:"confirm-duplicate-files-dialog",resolve:{duplicatedFiles:()=>o}}).result.then(o=>{if(o.overwrite)e.currentFiles.length?e.currentFiles=[...t,...r]:e.currentFiles.push(...t,...r);else{const o=v.prefixDuplicates(t);e.currentFiles=[...e.currentFiles,...o,...r]}y=!0,A()})},A=()=>{if(e.files=_.uniqBy(_.union(_.map(e.currentFiles,(function(e){return{name:e.name,type:"file",file:e}})),e.files),(function(e){return e.name})),e.savedSettings=_.mapKeys(_.filter(e.files,"parserSettings"),"name"),y&&e.currentFiles.length>0){$(),e.currentFiles.forEach(t=>{e.fileChecked[t.name]=!0});let t="";1===e.currentFiles.length&&(t=e.currentFiles[0].name),e.setSettingsFor(t,!1,void 0,f.UPLOAD,()=>{e.currentFiles.forEach(t=>{e.updateImport(t.name,!1,!1)})})}},$=()=>{Object.keys(e.fileChecked).forEach(t=>{e.fileChecked[t]=!1})};e.$on("$destroy",()=>{F.forEach(e=>e())});o.TABS.USER===m.getActiveTabId()&&(e.importViewControllerInit(),F.push(m.onFilesUpdated(e=>{v.buildPrefixesRegistry(e)})))}])},267:function(e,t){angular.module("graphdb.framework.rest.import.service",[]).factory("ImportRestService",o),o.$inject=["$http"];const r="rest/repositories";function o(e){return{getDefaultSettings:function(t){return e.get(`${r}/${t}/import/settings/default`)},getUploadedFiles:function(t){return e.get(`${r}/${t}/import/upload`)},getServerFiles:function(t){return e.get(`${r}/${t}/import/server`)},importServerFiles:function(t,o){return e.post(`${r}/${t}/import/server`,o)},importTextSnippet:function(t,o){return e.post(`${r}/${t}/import/upload/text`,o)},updateTextSnippet:function(t,o){return e.post(`${r}/${t}/import/upload/update/text`,o)},importFromUrl:function(t,o){return e.post(`${r}/${t}/import/upload/url`,o)},updateFromUrl:function(t,o){return e.post(`${r}/${t}/import/upload/update/url`,o)},stopServerImport:function(t,o){return e.delete(`${r}/${t}/import/server`,{params:o})},stopUserDataImport:function(t,o){return e.delete(`${r}/${t}/import/upload`,{params:o})},resetServerFileStatus:function(t,o,i=!0){return e({method:"DELETE",url:`${r}/${t}/import/server/status`,params:{remove:i},data:o,headers:{"Content-type":"application/json;charset=utf-8"}})},resetUserDataStatus:function(t,o,i=!0){return e({method:"DELETE",url:`${r}/${t}/import/upload/status`,params:{remove:i},data:o,headers:{"Content-type":"application/json;charset=utf-8"}})}}}},268:function(e,t){angular.module("graphdb.framework.rest.upload.service",[]).factory("UploadRestService",r),r.$inject=["$http","Upload","$translate"];function r(e,t,r){return{createUploadPayload:function(e,r){let o;o=e.file?{file:e.file,importSettings:t.jsonBlob(r)}:{importSettings:t.jsonBlob(r)};return o},uploadUserDataFile:function(e,r,o){return t.upload({url:`rest/repositories/${e}/import/upload/file`,data:o})},updateUserDataFile:function(e,r,o){return t.upload({url:`rest/repositories/${e}/import/upload/update/file`,data:o})}}}},269:function(e,t,r){"use strict";r.r(t);var o=r(117);function i(e,t,r){let i;e.isHelpVisible=!1,e.fileSizeLimitInfoTemplateUrl="js/angular/import/templates/fileSizeLimitInfo.html";const n=()=>{if(i.isPristine(e.activeTabId)){const t=r.getResources();e.isHelpVisible=!t||0===t.length}else e.isHelpVisible=i.isHelpVisible(e.activeTabId)};e.openTab=e=>{r.updateActiveTabId(e)},e.toggleHelp=()=>{i.setIsHelpVisible(e.activeTabId,!e.isHelpVisible),n()};const a=[];a.push(r.onActiveTabIdUpdated(r=>{e.activeTabId=r,t.hash(e.activeTabId),n()})),a.push(r.onResourcesUpdated(n));e.$on("$destroy",()=>a.forEach(e=>e())),(()=>{i=new s;const r=t.hash()||o.TABS.USER;e.openTab(r),n()})()}angular.module("graphdb.framework.impex.import.controllers.tab",[]).controller("TabController",i),i.$inject=["$scope","$location","ImportContextService"];class s{constructor(){this._helpVisibility={[o.TABS.USER]:{isHelpVisible:void 0},[o.TABS.SERVER]:{isHelpVisible:void 0}}}isPristine(e){return void 0===this._helpVisibility[e].isHelpVisible}setIsHelpVisible(e,t){this._helpVisibility[e].isHelpVisible=t}isHelpVisible(e){return this._helpVisibility[e]&&this._helpVisibility[e].isHelpVisible}}},270:function(e,t,r){"use strict";r.r(t),r.d(t,"SettingsModalActions",(function(){return s}));var o=r(117),i=r(266);angular.module("graphdb.framework.impex.import.controllers.settings-modal",[]).controller("SettingsModalController",n);const s={UPLOAD_ONLY:"upload_only",UPLOAD_AND_IMPORT:"upload_and_import",CANCEL:"cancel",CANCEL_IMPORT:"cancel_import"};function n(e,t,r,n,a,p){e.settings=p.settings,e.hasParserSettings=p.hasParserSettings,e.isMultiple=p.isMultiple,e.enableReplace=!(!e.settings.replaceGraphs||!e.settings.replaceGraphs.length),e.showAdvancedSettings=!1,e.activeTab=p.activeTab,e.userTabId=o.TABS.USER,e.isUploadOperation=p.operation===i.Operation.UPLOAD,e.hasError=function(e,t){return _.find(e,(function(e){return t===e.$name}))},e.ok=function(){e.settingsForm.replaceGraph.$setValidity("replaceGraph",!0),e.settingsForm.$valid&&(l(),t.close(c(s.UPLOAD_AND_IMPORT)))},e.cancel=function(){l(),t.dismiss(c(s.CANCEL))},e.onlyUpload=function(){l(),t.dismiss(c(s.UPLOAD_ONLY))},e.cancelImport=function(){l(),t.dismiss(c(s.CANCEL_IMPORT))},e.close=function(){l(),t.dismiss(c(s.CANCEL))},e.reset=function(){e.settings=_.cloneDeep(p.defaultSettings),e.target="data"},e.addReplaceGraph=function(t){let o=!0;"default"!==t&&(o=n.isValidIri(t,t.toString())),e.settingsForm.replaceGraph.$setTouched(),e.settingsForm.replaceGraph.$setValidity("replaceGraph",o),e.settingsForm.replaceGraph.$valid&&(e.settings.replaceGraphs=e.settings.replaceGraphs||[],-1===_.indexOf(e.settings.replaceGraphs,t)?(e.replaceGraph="",e.settings.replaceGraphs.push(t)):r.warning(a.instant("import.graph.already.in.list")))},e.checkEnterReplaceGraph=function(t,r){13===t.keyCode&&(t.preventDefault(),e.addReplaceGraph(r))},e.switchParserSettings=function(){e.showAdvancedSettings=!e.showAdvancedSettings};const c=function(t){return{settings:e.settings,action:t}},l=function(){"default"===e.target?e.settings.context="default":"data"===e.target&&(e.settings.context=""),e.enableReplace?"default"!==e.target&&"named"!==e.target||(e.settings.replaceGraphs=[e.settings.context]):e.settings.replaceGraphs=[]};e.settings.context?"default"===e.settings.context?(e.target="default",e.settings.context=""):e.target="named":e.target="data"}n.$inject=["$scope","$uibModalInstance","toastr","UriUtils","$translate","dialogModel"]},271:function(e,t){function r(e,t){e.importFormat={name:"Auto",type:""},e.startImport=!0,e.cancel=function(){t.dismiss()},e.ok=function(){t.close({url:e.dataUrl,format:e.importFormat.type,startImport:e.startImport})}}angular.module("graphdb.framework.impex.import.controllers.import-url",[]).controller("ImportUrlController",r),r.$inject=["$scope","$uibModalInstance","toastr"]},272:function(e,t){function r(e,t,r,o){e.importFormats=[{name:"RDF/JSON",type:"application/rdf+json"},{name:"JSON-LD",type:"application/ld+json"},{name:"NDJSON-LD",type:"application/x-ld+ndjson"},{name:"RDF/XML",type:"application/rdf+xml"},{name:"N3",type:"text/rdf+n3"},{name:"N-Triples",type:"text/plain"},{name:"N-Quads",type:"text/x-nquads"},{name:"Turtle",type:"text/turtle"},{name:"Turtle*",type:"application/x-turtlestar"},{name:"TriX",type:"application/trix"},{name:"TriG",type:"application/x-trig"},{name:"TriG*",type:"application/x-trigstar"}],e.rdfText=r,e.importFormat=e.importFormats.find(e=>e.type===o),e.startImport=!0,e.sizeLimit=1e5,e.setFormat=t=>{e.importFormat=t},e.cancel=()=>{t.dismiss()},e.ok=()=>{t.close({text:e.rdfText,format:e.importFormat.type,startImport:e.startImport})}}angular.module("graphdb.framework.impex.import.controllers.import-text-snippet",[]).controller("ImportTextSnippetController",r),r.$inject=["$scope","$uibModalInstance","text","format"]},273:function(e,t,r){"use strict";r.r(t);var o=r(0);function i(e,t,r,i,s){e.message=i.trustAsHtml(Object(o.decodeHTML)(r.instant("import.user_data.duplicates_confirmation.message",{duplicatedFiles:s}))),e.cancel=()=>{t.dismiss()},e.keepBoth=()=>{t.close({overwrite:!1})},e.overwrite=()=>{t.close({overwrite:!0})}}angular.module("graphdb.framework.impex.import.controllers.file-override-confirmation",[]).controller("FileOverrideConfirmationController",i),i.$inject=["$scope","$uibModalInstance","$translate","$sce","duplicatedFiles"]},274:function(e,t,r){"use strict";r.r(t),r.d(t,"FILE_FORMATS",(function(){return o})),r.d(t,"FileFormats",(function(){return i}));const o=["ttl","ttls","rdf","rj","n3","nt","nq","trig","trigs","trix","brf","owl","jsonld","xml","rdfs","ndjsonld","ndjson","jsonl"];class i{static getGZS(){return o.map(e=>`.${e}.gz`)}static getBasics(){return o.map(e=>"."+e)}static getFileFormatsExtended(){return[...this.getGZS(),...this.getBasics(),".zip"].join(", ")}static getFileFormatsHuman(){return[...this.getBasics()].join(" ")}static getTextFileFormatsHuman(){return this.getBasics().filter(e=>".brf"!==e).join(" ")}}},275:function(e,t,r){"use strict";r.r(t),r.d(t,"DateUtils",(function(){return o}));class o{static formatCurrentDateTime(){const e=new Date;return e.getFullYear()+"-"+_.padStart(e.getMonth()+1,2,"0")+"-"+_.padStart(e.getDate(),2,"0")+" "+_.padStart(e.getHours(),2,"0")+":"+_.padStart(e.getMinutes(),2,"0")+":"+_.padStart(e.getSeconds(),2,"0")+"."+_.padStart(e.getMilliseconds(),3,"0")}}},276:function(e,t,r){"use strict";r.r(t),r.d(t,"toImportResource",(function(){return s})),r.d(t,"fileToImportResource",(function(){return n})),r.d(t,"filesToImportResource",(function(){return a}));var o=r(178),i=r(20);const s=e=>{const t=Object(i.md5HashGenerator)();return e.map(e=>new o.ImportResource(e,t))},n=e=>{const t=Object(i.md5HashGenerator)();return new o.ImportResource({name:e.name,size:e.size,type:"file",modifiedOn:e.lastModified,file:e},t)},a=(e,t)=>{const r=Object(i.md5HashGenerator)();return e.map(e=>new o.ImportResource({name:e.name,size:e.size,type:"file",modifiedOn:void 0,file:e,status:t},r))}},277:function(e,t,r){"use strict";r.r(t),r.d(t,"FilePrefixRegistry",(function(){return i}));var o=r(25);class i{constructor(){this.filesPrefixRegistry={}}buildPrefixesRegistry(e){e.filter(e=>"file"===e.type).forEach(e=>{const t=o.FileUtils.getFilenameAndExtension(e.name).filename,r=t.lastIndexOf("-");let i=r<0?0:t.substring(r+1),s=t.substring(0,r);if(r<0?(i=0,s=t):(i=t.substring(r+1),s=t.substring(0,r)),i){i=parseInt(i);const e=this.filesPrefixRegistry[s]||0;this.filesPrefixRegistry[s]=e<i?i:e}else this.filesPrefixRegistry[s]=0})}prefixDuplicates(e){return e.map(e=>{const{filename:t,extension:r}=o.FileUtils.getFilenameAndExtension(e.name),i=`${t}-${this.getIndexForFile(t)}.${r}`;return new File([e],i,{type:e.type,lastModified:e.lastModified})})}getIndexForFile(e){let t=this.filesPrefixRegistry[e];return void 0!==t?t++:t=0,this.filesPrefixRegistry[e]=t,t}}},91:function(e,t,r){"use strict";r.r(t),r.d(t,"ImportResourceStatus",(function(){return o}));const o={NONE:"NONE",UPLOADING:"UPLOADING",UPLOAD_ERROR:"UPLOAD_ERROR",UPLOADED:"UPLOADED",PENDING:"PENDING",IMPORTING:"IMPORTING",DONE:"DONE",ERROR:"ERROR",INTERRUPTING:"INTERRUPTING"}}}]);
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[12,52,53,64,73,96,182,184,185,190,202,203,205,206,208,298,304,324,329],{101:function(e,t,r){"use strict";r.r(t),r.d(t,"removeSpecialChars",(function(){return i})),r.d(t,"toBoolean",(function(){return s})),r.d(t,"toTitleCase",(function(){return n}));var o=r(18);const i=e=>e.replace(/[()']/g,""),s=e=>"string"==typeof e?"true"===e:Boolean(e),n=e=>e?Object(o.upperFirst)(e.toLowerCase()):e},113:function(e,t,r){"use strict";r.r(t),r.d(t,"ImportResourceType",(function(){return o}));const o={DIRECTORY:"directory",FILE:"file",URL:"url",TEXT:"text"}},117:function(e,t,r){"use strict";r.r(t),r.d(t,"TABS",(function(){return s}));var o=r(18),i=r(91);const s={USER:"user",SERVER:"server"};function n(e){let t=s.USER,r=[],n=[],a=[],p=!0,c=[];return{updateActiveTabId:function(r){t=r,e.emitSync("activeTabIdUpdated",d())},getActiveTabId:d,onActiveTabIdUpdated:function(t){return e.subscribeSync("activeTabIdUpdated",e=>t(e))},getFiles:f,addFile:function(t){const r=f();r.push(t),m(r),e.emitSync("fileAdded",Object(o.cloneDeep)(t))},updateFiles:m,onFilesUpdated:function(t){return e.subscribeSync("filesUpdated",e=>t(e))},getImportedResources:g,updateImportedResources:function(t){r=t,e.emitSync("importedResourcesUpdated",g()),e.emitSync("resourcesUpdated",h())},onImportedResourcesUpdated:function(t){return e.subscribeSync("importedResourcesUpdated",e=>t(e))},getResources:h,onResourcesUpdated:function(t){return e.subscribeSync("resourcesUpdated",e=>t(e))},updateShowLoader:function(t){p=t,e.emitSync("showLoaderUpdated",u())},getShowLoader:u,onShowLoaderUpdated:function(t){return e.subscribeSync("showLoaderUpdated",e=>t(e))},updateSelectedFilesNames:function(t){c=Object(o.cloneDeep)(t),e.emitSync("selectedFilesNamesUpdated",l())},getSelectedFilesNames:l,onSelectedFilesNamesUpdated:function(t){return e.subscribeSync("selectedFilesNamesUpdated",e=>t(e))},updateResourceForUpload:function(e){const t=S(),r=t.find(({name:t})=>t===e.name);r?Object.assign(r,e):t.push(e);R(t)},getResourceForUpload:function(e){return Object(o.cloneDeep)(n.find(({name:t})=>t===e))},updateResourcesForUpload:R,getResourcesForUpload:S,onResourcesForUploadChanged:function(t){return e.subscribeSync("resourcesForUploadChanged",e=>t(e))}};function l(){return Object(o.cloneDeep)(c)}function u(){return p}function d(){return t}function m(t){a=Object(o.cloneDeep)(t),e.emitSync("filesUpdated",f())}function f(){return Object(o.cloneDeep)(a)}function g(){return Object(o.cloneDeep)(r)||[]}function h(){const e=g();let t=S();const r=[],o=[];return e.forEach(({name:e})=>{const s=t.find(({name:t})=>t===e);s&&(s.status===i.ImportResourceStatus.UPLOADED?r.push(s):o.push(s))}),r.length>0&&(t=t.filter(({name:e})=>!r.some(({name:t})=>t===e)),R(t,!1)),e.filter(({name:e})=>!o.some(t=>e===t)).concat(t)}function R(t,r=!0){n=Object(o.cloneDeep)(t),e.emitSync("resourcesForUploadChanged",S()),r&&e.emitSync("resourcesUpdated",h())}function S(){return Object(o.cloneDeep)(n)||[]}}angular.module("graphdb.framework.import.services.importcontext",[]).factory("ImportContextService",n),n.$inject=["EventEmitterService"]},146:function(e,t,r){"use strict";r.r(t),r.d(t,"ImportParsingSettings",(function(){return o}));class o{constructor(){this.contextLink=void 0,this.preserveBNodeIds=!1,this.failOnUnknownDataTypes=!1,this.verifyDataTypeValues=!1,this.normalizeDataTypeValues=!1,this.failOnUnknownLanguageTags=!1,this.verifyLanguageTags=!1,this.normalizeLanguageTags=!1,this.stopOnError=!0}}},178:function(e,t,r){"use strict";r.r(t),r.d(t,"ImportResource",(function(){return n}));var o=r(91),i=r(146),s=r(113);class n{constructor(e,t){this.hash=t(JSON.stringify(e)),this.name=e?e.name:void 0,this.status=e?e.status:o.ImportResourceStatus.NONE,this.message=e&&e.message?e.message:"",this.context=e&&e.context?e.context:"",this.replaceGraphs=e?e.replaceGraphs:[],this.baseURI=e?e.baseURI:void 0,this.forceSerial=!!e&&e.forceSerial,this.type=e?e.type:void 0,this.format=e?e.format:void 0,this.data=e?e.data:void 0,this.modifiedOn=e?e.lastModified:void 0,this.importedOn=e?e.imported:void 0,this.size=e?e.size:"",this.addedStatements=e?e.addedStatements:0,this.removedStatements=e?e.removedStatements:0,this.numReplacedGraphs=e?e.numReplacedGraphs:0,this.parserSettings=e?e.parserSettings:new i.ImportParsingSettings,this.requestIdHeadersToForward=e?e.requestIdHeadersToForward:void 0}isDirectory(){return s.ImportResourceType.DIRECTORY===this.type}isFile(){return s.ImportResourceType.FILE===this.type||s.ImportResourceType.URL===this.type||s.ImportResourceType.TEXT===this.type}isURL(){return s.ImportResourceType.URL===this.type}isText(){return s.ImportResourceType.TEXT===this.type}}},179:function(e,t,r){"use strict";r.r(t),r.d(t,"SortingType",(function(){return o}));const o={NAME:"NAME",SIZE:"SIZE",MODIFIED:"MODIFIED",IMPORTED:"IMPORTED",CONTEXT:"CONTEXT"}},266:function(e,t,r){"use strict";r.r(t),r.d(t,"Operation",(function(){return f}));r(9),r(44),r(267),r(268);var o=r(117),i=(r(269),r(270)),s=(r(271),r(272),r(273),r(274)),n=r(101),a=(r(25),r(275)),p=r(276),c=r(0),l=r(277),u=r(179),d=r(91);const m=angular.module("graphdb.framework.impex.import.controllers",["ui.bootstrap","toastr","graphdb.framework.core.services.repositories","graphdb.framework.utils.localstorageadapter","graphdb.framework.utils.uriutils","graphdb.framework.guides.services","graphdb.framework.rest.import.service","graphdb.framework.rest.upload.service","graphdb.framework.import.services.importcontext","graphdb.framework.impex.import.controllers.tab","graphdb.framework.impex.import.controllers.settings-modal","graphdb.framework.impex.import.controllers.import-url","graphdb.framework.impex.import.controllers.import-text-snippet","graphdb.framework.impex.import.controllers.file-override-confirmation"]),f={IMPORT:"import",BATCH_IMPORT:"batch_import",IMPORT_SNIPPET:"import_snippet",IMPORT_URL:"import_url",UPLOAD:"upload"},g="file",h="text",R="url";m.controller("ImportViewCtrl",["$scope","toastr","$interval","$repositories","$uibModal","$filter","$jwtAuth","$location","$translate","LicenseRestService","GuidesService","ModalService","ImportRestService","ImportContextService",function(e,t,r,a,l,m,g,h,R,S,I,v,F,y){const T=[];let b=null;let U=void 0;e.files=[],e.fileChecked={},e.activeTabId=y.getActiveTabId(),e.popoverTemplateUrl="settingsPopoverTemplate.html",e.fileFormatsExtended=s.FileFormats.getFileFormatsExtended(),e.fileFormatsHuman=s.FileFormats.getFileFormatsHuman()+R.instant("import.gz.zip"),e.textFileFormatsHuman=s.FileFormats.getTextFileFormatsHuman(),e.maxUploadFileSizeBytes=0,e.SORTING_TYPES=u.SortingType,e.TAB_IDS=o.TABS,e.toTitleCase=e=>n.toTitleCase(e),e.setSettingsFor=(t,r,o,s,n=(()=>{}))=>{A(t,r).then(r=>{e.settingsFor=t,e.settings=r,""===t||"application/ld+json"===o||"application/x-ld+ndjson"===o||t.endsWith("jsonld")||t.endsWith("zip")||t.endsWith("gz")||"directory"===e.settings.type?e.settings.hasContextLink=!0:e.settings.hasContextLink=!1;const a=_.cloneDeep(e.settings),c={templateUrl:"js/angular/import/templates/settingsModal.html",controller:"SettingsModalController",windowClass:"import-settings-modal",resolve:{dialogModel:function(){return{operation:s,settings:_.cloneDeep(e.settings),hasParserSettings:e.isLocalLocation,defaultSettings:a,isMultiple:!t,activeTab:e.activeTabId}}},size:"lg"};I.isActive()&&(c.backdrop="static",c.keyboard=!1),l.open(c).result.then(t=>{if(e.currentFiles&&t.action===i.SettingsModalActions.UPLOAD_AND_IMPORT){const t=Object(p.filesToImportResource)(e.currentFiles,d.ImportResourceStatus.UPLOADING);y.updateResourcesForUpload(t)}e.settings=t.settings,""===e.settingsFor?e.importSelected():e.importFile(e.settingsFor,!0)},t=>{if(e.settings=t.settings,t.action===i.SettingsModalActions.CANCEL&&(e.currentFiles=[],s===f.UPLOAD&&(e.files=[])),e.currentFiles&&t.action===i.SettingsModalActions.UPLOAD_ONLY){const t=Object(p.filesToImportResource)(e.currentFiles,d.ImportResourceStatus.UPLOADING);y.updateResourcesForUpload(t)}n&&n()})})},e.updateImport=(t,r,o)=>{A(t,r).then(r=>{e.settingsFor=t,e.settings=r,e.importFile(t,o)})},e.importSelected=t=>{const r=new Set([...O(),...x()]),o=Array.from(r),i=()=>{const r=o.shift();r&&A(r).then(o=>{t&&(e.settings=o),e.importFile(r,!0,i)})};i()},e.isLocalLocation=()=>{const e=a.getActiveLocation();return e&&e.local},e.updateList=t=>{e.canWriteActiveRepo()&&e.updateListHttp(t)},e.onRepositoryChange=()=>{e.setRestricted(),e.isRestricted||(e.updateList(!0),E())},e.onImport=t=>{e.setSettingsFor(t.importResource.name,!1,t.importResource.format,f.IMPORT)},e.onStopImport=r=>{const i=r.importResource;(e.activeTabId===o.TABS.USER?F.stopUserDataImport:F.stopServerImport)(a.getActiveRepository(),{name:i.name,type:i.type}).success((function(){e.updateList()})).error((function(e){t.warning(R.instant("import.error.could.not.stop",{data:getError(e)}))}))},e.onRemove=e=>{const t=e.map(e=>e.name);D(t)},e.onReset=e=>{$(e,!1)},e.importAll=(t,r)=>{if(r)e.importSelected(t,r);else{let o="";1===t.length&&(o=t[0].importResource.name),e.setSettingsFor(o,r,void 0,f.BATCH_IMPORT)}},e.onEditResource=t=>{t.importResource.isText()&&e.openTextSnippetDialog(t.importResource)};const E=()=>(U=void 0,e.canWriteActiveRepo()?F.getDefaultSettings(a.getActiveRepository()).success((function(e){return U=e,U})).error((function(e){t.warning(R.instant("import.error.default.settings",{data:getError(e)}))})):Promise.resolve(U)),x=()=>y.getSelectedFilesNames(),O=()=>e.currentFiles.filter(e=>e.name).map(e=>e.name),D=(e=[])=>{const t="<br/>"+e.join("<br/>"),r=Object(c.decodeHTML)(R.instant("import.remove.confirm.msg",{name:t}));v.openConfirmation(R.instant("common.confirm"),r,()=>{$(e,!0)})},A=(t,r)=>r||_.isEmpty(t)||_.isEmpty(e.savedSettings[t])?(U?Promise.resolve(angular.copy(U)):E().then(()=>angular.copy(U))).then(e=>e):Promise.resolve(e.savedSettings[t]);e.updateListHttp=r=>{if(!a.getActiveRepository())return Promise.resolve();const i=e.activeTabId===o.TABS.USER?F.getUploadedFiles:F.getServerFiles,s=e.activeTabId;return i(a.getActiveRepository()).success((function(t){s===y.getActiveTabId()&&(y.updateImportedResources(Object(p.toImportResource)(t)),0===e.files.length||r?(e.files=t,y.updateFiles(e.files),e.files.forEach((function(t){t.type||(t.type=e.defaultType)}))):e.files.forEach((function(r){const o=_.find(t,_.matches({name:r.name}));r.status&&o&&_.assign(r,o),r.type||(r.type=e.defaultType)})),r&&o.TABS.USER===e.activeTabId&&(e.files=_.filter(e.files,(function(e){return void 0!==e.status})),y.updateFiles(e.files)),e.savedSettings=_.mapKeys(_.filter(e.files,"parserSettings"),"name"))})).error((function(e){t.warning(R.instant("import.error.could.not.get.files",{data:getError(e)}))}))};const $=(r,i)=>{if(!r||r.length<1)return;(e.activeTabId===o.TABS.USER?F.resetUserDataStatus:F.resetServerFileStatus)(a.getActiveRepository(),r,i).success((function(){e.updateList(!0)})).error((function(e){t.warning(R.instant("import.error.could.not.clear",{data:getError(e)}))}))},L=()=>{T.forEach(e=>e())},P=t=>{e.activeTabId=t,y.updateImportedResources([]),y.updateResourcesForUpload([]),y.updateShowLoader(!0),e.updateListHttp(!0).finally(()=>y.updateShowLoader(!1))};e.importViewControllerInit=()=>{T.push(e.$on("repositoryIsSet",e.onRepositoryChange)),T.push(e.$on("$destroy",()=>r.cancel(b))),T.push(y.onActiveTabIdUpdated(e=>P(e))),e.$on("$destroy",L),S.getInfo().success((function(t){e.appData={},e.appData.properties={};for(let r=0;r<t.length;r++)e.appData.properties[t[r].key]={source:t[r].source,value:t[r].value};e.maxUploadFileSizeBytes=e.appData.properties["graphdb.workbench.maxUploadSize"].value})).error((function(e){const r=getError(e);t.error(r,R.instant("common.error"))})),E(),b=r(()=>{e.updating||e.updateList(!1)},4e3),P(y.getActiveTabId())}}]),m.controller("ImportCtrl",["$scope","toastr","$controller","$translate","$repositories","ImportRestService","ImportContextService",function(e,t,r,i,s,n,a){e.columnKeys={name:"import.import_resource_tree.header.name",size:"import.import_resource_tree.header.size",modified:"import.import_resource_tree.header.modified",imported:"import.import_resource_tree.header.imported",context:"import.import_resource_tree.header.context"},angular.extend(this,r("ImportViewCtrl",{$scope:e})),e.defaultType="server",e.tabId="#import-server",e.importSelected=e=>{p(a.getSelectedFilesNames(),e)},e.importFile=function(e){p([e])};const p=function(r,o){e.canWriteActiveRepo()&&n.importServerFiles(s.getActiveRepository(),{importSettings:o?null:e.settings,fileNames:r}).success((function(){e.updateList(),e.fileChecked={}})).error((function(e){t.error(i.instant("import.could.not.send.file",{data:getError(e)}))}))};o.TABS.SERVER===a.getActiveTabId()&&e.importViewControllerInit()}]),m.controller("UploadCtrl",["$scope","toastr","$controller","$uibModal","$translate","$repositories","ImportRestService","UploadRestService","ModalService","ImportContextService","EventEmitterService","$filter",function(e,t,r,i,s,n,p,c,u,m,S,I){const v=new l.FilePrefixRegistry,F=[];e.columnKeys={name:"import.import_resource_tree.header.name",size:"import.import_resource_tree.header.size",modified:"import.import_resource_tree.header.uploaded",imported:"import.import_resource_tree.header.imported",context:"import.import_resource_tree.header.context"},angular.extend(this,r("ImportViewCtrl",{$scope:e})),e.defaultType=g,e.tabId="#import-user",e.currentFiles=[];let y=!1;e.pastedDataIdx=1,e.fileSelected=function(t,r,o,i,s){const n={files:o,cancel:!1};S.emit("filesForUploadSelected",n,t=>{if(!t.cancel){const t=s||[];T(t);const r=t.map(e=>e.name);let i=o||[];i=i.filter(e=>!r.includes(e.name)),O(i);const n=[],a=[];i.forEach(t=>{e.files.some(e=>e.name===t.name)?n.push(t):a.push(t)}),n.length>0?D(n,a):(e.currentFiles=[...i],y=!0,A())}})},e.importFile=(r,o,i)=>{const n=e.files.find(e=>e.name===r);n?n.type===h?b(n,o,i):n.type===R?E(n,o,i):x(n,o,i):t.warning(s.instant("import.no.such.file",{name:r}))},e.openTextSnippetDialog=t=>{t&&t.data;i.open({templateUrl:"js/angular/import/templates/textSnippet.html",controller:"ImportTextSnippetController",resolve:{text:function(){return t?t.data:""},format:function(){return t?t.format:"text/turtle"}}}).result.then(r=>{t?(t.data===r.text&&t.format===r.format||t.status===d.ImportResourceStatus.NONE||(t.status=d.ImportResourceStatus.NONE,t.message=s.instant("import.text.snippet.not.imported")),t.data=r.text,t.format=r.format,U(t).then(()=>e.updateListHttp(!0)).then(()=>{r.startImport&&e.setSettingsFor(t.name,!1,t.format,f.IMPORT_SNIPPET)})):(t={type:"text",name:"Text snippet "+a.DateUtils.formatCurrentDateTime(),format:r.format,data:r.text},e.files.unshift(t),e.updateImport(t.name,!1,!1),r.startImport&&e.setSettingsFor(t.name,!1,t.format,f.IMPORT_SNIPPET))})},e.rdfDataFromURL=()=>{i.open({templateUrl:"js/angular/import/templates/urlImport.html",controller:"ImportUrlController",scope:e}).result.then((function(t){const r=_.find(e.files,{type:"url",name:t.url});r?r.format=t.format:e.files.unshift({type:"url",name:t.url,format:t.format,data:t.url}),e.updateImport(t.url,!0,!1),t.startImport&&e.setSettingsFor(t.url,!0,t.format,f.IMPORT_URL)}))};const T=e=>{e.length>0&&e.forEach((function(e){t.warning(s.instant("import.large.file",{name:e.name,size:I("bytes")(e.size)}))}))},b=(r,o,i)=>{e.settings.name=r.name,e.settings.type=r.type,e.settings.data=r.data,e.settings.format=r.format,r.status=d.ImportResourceStatus.PENDING;(o?p.importTextSnippet:p.updateTextSnippet)(n.getActiveRepository(),e.settings).success((function(){e.updateList()})).error((function(e){t.error(s.instant("import.could.not.send.data",{data:getError(e)})),r.status=d.ImportResourceStatus.ERROR,r.message=getError(e)})).finally(i||function(){})},U=r=>(e.updating=!0,p.updateTextSnippet(n.getActiveRepository(),r).success((function(e){})).error((function(e){t.error(s.instant("import.could.not.update.text",{data:getError(e)}))})).finally((function(){e.updating=!1}))),E=(r,o,i)=>{e.settings.name=r.name,e.settings.type=r.type,e.settings.data=r.data,e.settings.format=r.format,r.status=d.ImportResourceStatus.PENDING;(o?p.importFromUrl:p.updateFromUrl)(n.getActiveRepository(),e.settings).success((function(){e.updateList()})).error((function(e){t.error(s.instant("import.could.not.send.url",{data:getError(e)}))})).finally(i||function(){})},x=(r,o,i)=>{e.settings.name=r.name;const a=c.createUploadPayload(r,e.settings);(o?c.uploadUserDataFile:c.updateUserDataFile)(n.getActiveRepository(),r,a).progress(e=>{const t=parseInt(100*e.loaded/e.total)||0,o=s.instant("import.file.upload.progress",{progress:t}),i=m.getResourceForUpload(r.name);i&&i.status!==d.ImportResourceStatus.UPLOAD_ERROR&&(i.status=t>=100?d.ImportResourceStatus.UPLOADED:d.ImportResourceStatus.UPLOADING,i.message=o,m.updateResourceForUpload(i))}).success(t=>{const o=m.getResourceForUpload(r.name);o&&o.status!==d.ImportResourceStatus.UPLOAD_ERROR&&(o.status=d.ImportResourceStatus.UPLOADED,o.message=void 0,m.updateResourceForUpload(o)),e.updateList()}).error(e=>{let o="";o=e?s.instant("import.could.not.upload.file",{data:o}):s.instant("import.upload.file.failure"),t.error(o),r.status=d.ImportResourceStatus.ERROR,r.message=o;const i=m.getResourceForUpload(r.name);i&&i.status!==d.ImportResourceStatus.UPLOADED&&(i.status=d.ImportResourceStatus.UPLOAD_ERROR,i.message=o,m.updateResourceForUpload(i))}).finally(()=>{e.currentFiles=e.currentFiles.filter(({name:e})=>e!==r.name),i()})},O=e=>{e.forEach((function(r){if("bz2"===r.name.substr(r.name.lastIndexOf(".")+1)){const o=e.indexOf(r);o>-1&&e.splice(o,1),t.error(s.instant("import.could.not.upload",{name:r.name}))}}))},D=(t,r)=>{const o=t.map(e=>e.name).join("<br/>");i.open({templateUrl:"js/angular/import/templates/file-override-confirmation.html",controller:"FileOverrideConfirmationController",windowClass:"confirm-duplicate-files-dialog",resolve:{duplicatedFiles:()=>o}}).result.then(o=>{if(o.overwrite)e.currentFiles.length?e.currentFiles=[...t,...r]:e.currentFiles.push(...t,...r);else{const o=v.prefixDuplicates(t);e.currentFiles=[...e.currentFiles,...o,...r]}y=!0,A()})},A=()=>{if(e.files=_.uniqBy(_.union(_.map(e.currentFiles,(function(e){return{name:e.name,type:"file",file:e}})),e.files),(function(e){return e.name})),e.savedSettings=_.mapKeys(_.filter(e.files,"parserSettings"),"name"),y&&e.currentFiles.length>0){$(),e.currentFiles.forEach(t=>{e.fileChecked[t.name]=!0});let t="";1===e.currentFiles.length&&(t=e.currentFiles[0].name),e.setSettingsFor(t,!1,void 0,f.UPLOAD,()=>{e.currentFiles.forEach(t=>{e.updateImport(t.name,!1,!1)})})}},$=()=>{Object.keys(e.fileChecked).forEach(t=>{e.fileChecked[t]=!1})};e.$on("$destroy",()=>{F.forEach(e=>e())});o.TABS.USER===m.getActiveTabId()&&(e.importViewControllerInit(),F.push(m.onFilesUpdated(e=>{v.buildPrefixesRegistry(e)})))}])},267:function(e,t){angular.module("graphdb.framework.rest.import.service",[]).factory("ImportRestService",o),o.$inject=["$http"];const r="rest/repositories";function o(e){return{getDefaultSettings:function(t){return e.get(`${r}/${t}/import/settings/default`)},getUploadedFiles:function(t){return e.get(`${r}/${t}/import/upload`)},getServerFiles:function(t){return e.get(`${r}/${t}/import/server`)},importServerFiles:function(t,o){return e.post(`${r}/${t}/import/server`,o)},importTextSnippet:function(t,o){return e.post(`${r}/${t}/import/upload/text`,o)},updateTextSnippet:function(t,o){return e.post(`${r}/${t}/import/upload/update/text`,o)},importFromUrl:function(t,o){return e.post(`${r}/${t}/import/upload/url`,o)},updateFromUrl:function(t,o){return e.post(`${r}/${t}/import/upload/update/url`,o)},stopServerImport:function(t,o){return e.delete(`${r}/${t}/import/server`,{params:o})},stopUserDataImport:function(t,o){return e.delete(`${r}/${t}/import/upload`,{params:o})},resetServerFileStatus:function(t,o,i=!0){return e({method:"DELETE",url:`${r}/${t}/import/server/status`,params:{remove:i},data:o,headers:{"Content-type":"application/json;charset=utf-8"}})},resetUserDataStatus:function(t,o,i=!0){return e({method:"DELETE",url:`${r}/${t}/import/upload/status`,params:{remove:i},data:o,headers:{"Content-type":"application/json;charset=utf-8"}})}}}},268:function(e,t){angular.module("graphdb.framework.rest.upload.service",[]).factory("UploadRestService",r),r.$inject=["$http","Upload","$translate"];function r(e,t,r){return{createUploadPayload:function(e,r){let o;o=e.file?{file:e.file,importSettings:t.jsonBlob(r)}:{importSettings:t.jsonBlob(r)};return o},uploadUserDataFile:function(e,r,o){return t.upload({url:`rest/repositories/${e}/import/upload/file`,data:o})},updateUserDataFile:function(e,r,o){return t.upload({url:`rest/repositories/${e}/import/upload/update/file`,data:o})}}}},269:function(e,t,r){"use strict";r.r(t);var o=r(117);function i(e,t,r){let i;e.isHelpVisible=!1,e.fileSizeLimitInfoTemplateUrl="js/angular/import/templates/fileSizeLimitInfo.html";const n=()=>{if(i.isPristine(e.activeTabId)){const t=r.getResources();e.isHelpVisible=!t||0===t.length}else e.isHelpVisible=i.isHelpVisible(e.activeTabId)};e.openTab=e=>{r.updateActiveTabId(e)},e.toggleHelp=()=>{i.setIsHelpVisible(e.activeTabId,!e.isHelpVisible),n()};const a=[];a.push(r.onActiveTabIdUpdated(r=>{e.activeTabId=r,t.hash(e.activeTabId),n()})),a.push(r.onResourcesUpdated(n));e.$on("$destroy",()=>a.forEach(e=>e())),(()=>{i=new s;const r=t.hash()||o.TABS.USER;e.openTab(r),n()})()}angular.module("graphdb.framework.impex.import.controllers.tab",[]).controller("TabController",i),i.$inject=["$scope","$location","ImportContextService"];class s{constructor(){this._helpVisibility={[o.TABS.USER]:{isHelpVisible:void 0},[o.TABS.SERVER]:{isHelpVisible:void 0}}}isPristine(e){return void 0===this._helpVisibility[e].isHelpVisible}setIsHelpVisible(e,t){this._helpVisibility[e].isHelpVisible=t}isHelpVisible(e){return this._helpVisibility[e]&&this._helpVisibility[e].isHelpVisible}}},270:function(e,t,r){"use strict";r.r(t),r.d(t,"SettingsModalActions",(function(){return s}));var o=r(117),i=r(266);angular.module("graphdb.framework.impex.import.controllers.settings-modal",[]).controller("SettingsModalController",n);const s={UPLOAD_ONLY:"upload_only",UPLOAD_AND_IMPORT:"upload_and_import",CANCEL:"cancel",CANCEL_IMPORT:"cancel_import"};function n(e,t,r,n,a,p){e.settings=p.settings,e.hasParserSettings=p.hasParserSettings,e.isMultiple=p.isMultiple,e.enableReplace=!(!e.settings.replaceGraphs||!e.settings.replaceGraphs.length),e.showAdvancedSettings=!1,e.activeTab=p.activeTab,e.userTabId=o.TABS.USER,e.isUploadOperation=p.operation===i.Operation.UPLOAD,e.hasError=function(e,t){return _.find(e,(function(e){return t===e.$name}))},e.ok=function(){e.settingsForm.replaceGraph.$setValidity("replaceGraph",!0),e.settingsForm.$valid&&(l(),t.close(c(s.UPLOAD_AND_IMPORT)))},e.cancel=function(){l(),t.dismiss(c(s.CANCEL))},e.onlyUpload=function(){l(),t.dismiss(c(s.UPLOAD_ONLY))},e.cancelImport=function(){l(),t.dismiss(c(s.CANCEL_IMPORT))},e.close=function(){l(),t.dismiss(c(s.CANCEL))},e.reset=function(){e.settings=_.cloneDeep(p.defaultSettings),e.target="data"},e.addReplaceGraph=function(t){let o=!0;"default"!==t&&(o=n.isValidIri(t,t.toString())),e.settingsForm.replaceGraph.$setTouched(),e.settingsForm.replaceGraph.$setValidity("replaceGraph",o),e.settingsForm.replaceGraph.$valid&&(e.settings.replaceGraphs=e.settings.replaceGraphs||[],-1===_.indexOf(e.settings.replaceGraphs,t)?(e.replaceGraph="",e.settings.replaceGraphs.push(t)):r.warning(a.instant("import.graph.already.in.list")))},e.checkEnterReplaceGraph=function(t,r){13===t.keyCode&&(t.preventDefault(),e.addReplaceGraph(r))},e.switchParserSettings=function(){e.showAdvancedSettings=!e.showAdvancedSettings};const c=function(t){return{settings:e.settings,action:t}},l=function(){"default"===e.target?e.settings.context="default":"data"===e.target&&(e.settings.context=""),e.enableReplace?"default"!==e.target&&"named"!==e.target||(e.settings.replaceGraphs=[e.settings.context]):e.settings.replaceGraphs=[]};e.settings.context?"default"===e.settings.context?(e.target="default",e.settings.context=""):e.target="named":e.target="data"}n.$inject=["$scope","$uibModalInstance","toastr","UriUtils","$translate","dialogModel"]},271:function(e,t){function r(e,t){e.importFormat={name:"Auto",type:""},e.startImport=!0,e.cancel=function(){t.dismiss()},e.ok=function(){t.close({url:e.dataUrl,format:e.importFormat.type,startImport:e.startImport})}}angular.module("graphdb.framework.impex.import.controllers.import-url",[]).controller("ImportUrlController",r),r.$inject=["$scope","$uibModalInstance","toastr"]},272:function(e,t){function r(e,t,r,o){e.importFormats=[{name:"RDF/JSON",type:"application/rdf+json"},{name:"JSON-LD",type:"application/ld+json"},{name:"NDJSON-LD",type:"application/x-ld+ndjson"},{name:"RDF/XML",type:"application/rdf+xml"},{name:"N3",type:"text/rdf+n3"},{name:"N-Triples",type:"text/plain"},{name:"N-Quads",type:"text/x-nquads"},{name:"Turtle",type:"text/turtle"},{name:"Turtle*",type:"application/x-turtlestar"},{name:"TriX",type:"application/trix"},{name:"TriG",type:"application/x-trig"},{name:"TriG*",type:"application/x-trigstar"}],e.rdfText=r,e.importFormat=e.importFormats.find(e=>e.type===o),e.startImport=!0,e.sizeLimit=1e5,e.setFormat=t=>{e.importFormat=t},e.cancel=()=>{t.dismiss()},e.ok=()=>{t.close({text:e.rdfText,format:e.importFormat.type,startImport:e.startImport})}}angular.module("graphdb.framework.impex.import.controllers.import-text-snippet",[]).controller("ImportTextSnippetController",r),r.$inject=["$scope","$uibModalInstance","text","format"]},273:function(e,t,r){"use strict";r.r(t);var o=r(0);function i(e,t,r,i,s){e.message=i.trustAsHtml(Object(o.decodeHTML)(r.instant("import.user_data.duplicates_confirmation.message",{duplicatedFiles:s}))),e.cancel=()=>{t.dismiss()},e.keepBoth=()=>{t.close({overwrite:!1})},e.overwrite=()=>{t.close({overwrite:!0})}}angular.module("graphdb.framework.impex.import.controllers.file-override-confirmation",[]).controller("FileOverrideConfirmationController",i),i.$inject=["$scope","$uibModalInstance","$translate","$sce","duplicatedFiles"]},274:function(e,t,r){"use strict";r.r(t),r.d(t,"FILE_FORMATS",(function(){return o})),r.d(t,"FileFormats",(function(){return i}));const o=["ttl","ttls","rdf","rj","n3","nt","nq","trig","trigs","trix","brf","owl","jsonld","xml","rdfs","ndjsonld","ndjson","jsonl"];class i{static getGZS(){return o.map(e=>`.${e}.gz`)}static getBasics(){return o.map(e=>"."+e)}static getFileFormatsExtended(){return[...this.getGZS(),...this.getBasics(),".zip",".gz","application/gzip","application/x-gzip"].join(", ")}static getFileFormatsHuman(){return[...this.getBasics()].join(" ")}static getTextFileFormatsHuman(){return this.getBasics().filter(e=>".brf"!==e).join(" ")}}},275:function(e,t,r){"use strict";r.r(t),r.d(t,"DateUtils",(function(){return o}));class o{static formatCurrentDateTime(){const e=new Date;return e.getFullYear()+"-"+_.padStart(e.getMonth()+1,2,"0")+"-"+_.padStart(e.getDate(),2,"0")+" "+_.padStart(e.getHours(),2,"0")+":"+_.padStart(e.getMinutes(),2,"0")+":"+_.padStart(e.getSeconds(),2,"0")+"."+_.padStart(e.getMilliseconds(),3,"0")}}},276:function(e,t,r){"use strict";r.r(t),r.d(t,"toImportResource",(function(){return s})),r.d(t,"fileToImportResource",(function(){return n})),r.d(t,"filesToImportResource",(function(){return a}));var o=r(178),i=r(20);const s=e=>{const t=Object(i.md5HashGenerator)();return e.map(e=>new o.ImportResource(e,t))},n=e=>{const t=Object(i.md5HashGenerator)();return new o.ImportResource({name:e.name,size:e.size,type:"file",modifiedOn:e.lastModified,file:e},t)},a=(e,t)=>{const r=Object(i.md5HashGenerator)();return e.map(e=>new o.ImportResource({name:e.name,size:e.size,type:"file",modifiedOn:void 0,file:e,status:t},r))}},277:function(e,t,r){"use strict";r.r(t),r.d(t,"FilePrefixRegistry",(function(){return i}));var o=r(25);class i{constructor(){this.filesPrefixRegistry={}}buildPrefixesRegistry(e){e.filter(e=>"file"===e.type).forEach(e=>{const t=o.FileUtils.getFilenameAndExtension(e.name).filename,r=t.lastIndexOf("-");let i=r<0?0:t.substring(r+1),s=t.substring(0,r);if(r<0?(i=0,s=t):(i=t.substring(r+1),s=t.substring(0,r)),i){i=parseInt(i);const e=this.filesPrefixRegistry[s]||0;this.filesPrefixRegistry[s]=e<i?i:e}else this.filesPrefixRegistry[s]=0})}prefixDuplicates(e){return e.map(e=>{const{filename:t,extension:r}=o.FileUtils.getFilenameAndExtension(e.name),i=`${t}-${this.getIndexForFile(t)}.${r}`;return new File([e],i,{type:e.type,lastModified:e.lastModified})})}getIndexForFile(e){let t=this.filesPrefixRegistry[e];return void 0!==t?t++:t=0,this.filesPrefixRegistry[e]=t,t}}},91:function(e,t,r){"use strict";r.r(t),r.d(t,"ImportResourceStatus",(function(){return o}));const o={NONE:"NONE",UPLOADING:"UPLOADING",UPLOAD_ERROR:"UPLOAD_ERROR",UPLOADED:"UPLOADED",PENDING:"PENDING",IMPORTING:"IMPORTING",DONE:"DONE",ERROR:"ERROR",INTERRUPTING:"INTERRUPTING"}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[186],{279:function(t,e){function o(){return{link:function(t,e,o){t.$watch("file.status",(function(){"IMPORTING"!==t.file.status&&"UPLOADING"!==t.file.status||!$(e).has("object").length>0&&$(e).append('<object width="'+o.size+'" height="'+o.size+'" data="js/angular/templates/loader/ot-loader.svg?v=2.8.6-
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[186],{279:function(t,e){function o(){return{link:function(t,e,o){t.$watch("file.status",(function(){"IMPORTING"!==t.file.status&&"UPLOADING"!==t.file.status||!$(e).has("object").length>0&&$(e).append('<object width="'+o.size+'" height="'+o.size+'" data="js/angular/templates/loader/ot-loader.svg?v=2.8.6-RC2">{{\'common.loading\' | translate}}</object>')}))}}}angular.module("graphdb.framework.import.directives.import-progress-indicator",[]).directive("ImportProgressIndicator",o),o.$inject=[]}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[202],{274:function(t,i,s){"use strict";s.r(i),s.d(i,"FILE_FORMATS",(function(){return n})),s.d(i,"FileFormats",(function(){return r}));const n=["ttl","ttls","rdf","rj","n3","nt","nq","trig","trigs","trix","brf","owl","jsonld","xml","rdfs","ndjsonld","ndjson","jsonl"];class r{static getGZS(){return n.map(t=>`.${t}.gz`)}static getBasics(){return n.map(t=>"."+t)}static getFileFormatsExtended(){return[...this.getGZS(),...this.getBasics(),".zip",".gz","application/gzip","application/x-gzip"].join(", ")}static getFileFormatsHuman(){return[...this.getBasics()].join(" ")}static getTextFileFormatsHuman(){return this.getBasics().filter(t=>".brf"!==t).join(" ")}}}}]);
|