vuetify 1.5.3

This commit is contained in:
Andy Bunce 2019-03-01 23:17:24 +00:00
parent c5e27fffa0
commit 8de2101d99
53 changed files with 1619 additions and 845 deletions

View file

@ -50,6 +50,26 @@ function vue-api:test-select($q )
</json> </json>
}; };
(:~
: generate html report for test
:)
declare
%rest:GET %rest:path("/vue-poc/api/test/html")
%output:method("html") %output:version("5.0")
function vue-api:test-html()
{
<div id="A0">
something
<ol>
<li><a href="#A30" >A30</a></li>
<li><a href="#A50">A50</a></li>
</ol>
{for $i in 1 to 50 return <p>{$i}:
<a id="A{$i}" name="A{$i}">Lorem ipsum</a> dolor sit amet, consectetur adipiscing elit. Morbi aliquam sodales justo, aliquet eleifend ex bibendum eget. Nullam vitae maximus ipsum. Sed maximus felis in interdum maximus. Vestibulum quis urna vel dolor placerat iaculis non at metus. Curabitur nec dictum mauris. Duis placerat magna non pellentesque pulvinar. Nam a eleifend sapien. Suspendisse potenti. Vestibulum nunc massa, eleifend a dolor quis, feugiat condimentum est. Integer diam eros, blandit in purus in, euismod ultrices felis. Donec ipsum magna, elementum non lacus vel, rutrum ornare ante. Integer egestas sapien quam, ut posuere nisi rhoncus nec. Etiam ornare enim eu tellus laoreet, in laoreet urna sodales. Donec interdum, augue non lobortis sodales, leo elit tincidunt mi, vitae varius augue libero vel lectus. Cras imperdiet quis dolor nec gravida.
<a href="#A0">top</a></p>
}
</div>
};
(:~ (:~
: Returns wadl. : Returns wadl.
:) :)

View file

@ -40,7 +40,7 @@
<qd-navlist :items="items" :mini="mini"></qd-navlist> <qd-navlist :items="items" :mini="mini"></qd-navlist>
</v-navigation-drawer> </v-navigation-drawer>
<v-toolbar class="indigo" app dark > <v-toolbar class="indigo" app dark dense >
<v-toolbar-side-icon @click.stop="drawer = !drawer" ></v-toolbar-side-icon> <v-toolbar-side-icon @click.stop="drawer = !drawer" ></v-toolbar-side-icon>
<v-toolbar-title class="hidden-sm-and-down" >{{$route.meta.title}}</v-toolbar-title> <v-toolbar-title class="hidden-sm-and-down" >{{$route.meta.title}}</v-toolbar-title>
<vp-favorite :frmfav.sync="frmfav"></vp-favorite> <vp-favorite :frmfav.sync="frmfav"></vp-favorite>
@ -110,6 +110,7 @@
<script>{ <script>{
router, router,
store,
data:function(){return { data:function(){return {
searchItems:[], searchItems:[],
@ -124,7 +125,7 @@
frmfav: false, frmfav: false,
items: [ items: [
{href: '/',text: 'Home', icon: 'home' }, {href: '/',text: 'Dashboard', icon: 'dashboard' },
{ {
icon: 'input', icon: 'input',
text: 'Actions' , text: 'Actions' ,
@ -167,7 +168,7 @@
{href: '/server/logs',text: 'Server logs',icon: 'dns'}, {href: '/server/logs',text: 'Server logs',icon: 'dns'},
{href: '/server/users',text: 'Users',icon: 'supervisor_account'}, {href: '/server/users',text: 'Users',icon: 'supervisor_account'},
{href: '/server/repo',text: 'Server code repository',icon: 'local_library'}, {href: '/server/repo',text: 'Server code repository',icon: 'local_library'},
{href: '/server/websocket',text: 'Web socket',icon: 'swap_calls'},
{href: '/server/upload',text: 'Upload to server',icon: 'file_upload'}, {href: '/server/upload',text: 'Upload to server',icon: 'file_upload'},
{href: '/server/ping',text: 'Ping',icon: 'update'}, {href: '/server/ping',text: 'Ping',icon: 'update'},
{href: '/server/dicetest',text: 'Dice performance',icon: 'update'}, {href: '/server/dicetest',text: 'Dice performance',icon: 'update'},
@ -188,40 +189,28 @@
{href: '/images/report',text: 'Reports',icon: 'report'} {href: '/images/report',text: 'Reports',icon: 'report'}
]}, ]},
{
icon: 'format_list_bulleted',
text: 'Forms' ,
model: false,
children: [
{href: '/form',text: 'vue-form-generator',icon: 'format_list_bulleted' },
{href: '/form2',text: 'vue-json-schema',icon: 'format_list_bulleted' },
{href: '/form3',text: 'vue-form-json-schema',icon: 'format_list_bulleted' }
]},
{ {
icon: 'more_horiz', icon: 'more_horiz',
text: 'More' , text: 'More' ,
model: false, model: false,
children: [ children: [
{href: '/timeline',text: 'Time line',icon: 'timelapse'}, {href: '/html',text: 'HTML test',icon: 'receipt'},
{href: '/select',text: 'Select',icon: 'extension'}, {href: '/select',text: 'Select',icon: 'extension'},
{href: '/puzzle',text: 'Puzzle',icon: 'extension'}, {href: '/puzzle',text: 'Puzzle',icon: 'extension'}
{href: '/svg',text: 'SVG',icon: 'extension'},
{href: '/svg2',text: 'SVG2',icon: 'extension'},
{href: '/tree',text: 'Tree',icon: 'nature'},
{href: '/tree2',text: 'Tree 2',icon: 'nature'}
]}, ]},
{ {
icon: 'toys', icon: 'toys',
text: 'Labs' , text: 'Labs' ,
model: false, model: false,
children: [ children: [
{href: '/labs/scratch',text: 'Scratch pad',icon: 'filter_frames'}, {href: '/labs/scratch',text: 'Scratch pad',icon: 'filter_frames'},
{href: '/labs/form',text: 'Forms',icon: 'subtitles' },
{href: '/labs/timeline',text: 'Time line',icon: 'timelapse'}, {href: '/labs/timeline',text: 'Time line',icon: 'timelapse'},
{href: '/labs/svg',text: 'SVG',icon: 'extension'}, {href: '/labs/svg',text: 'SVG',icon: 'extension'},
{href: '/labs/svg2',text: 'SVG2',icon: 'extension'}, {href: '/labs/svg2',text: 'SVG2',icon: 'extension'},
{href: '/labs/tree',text: 'Tree',icon: 'nature'}, {href: '/labs/tree',text: 'Tree',icon: 'nature'},
{href: '/labs/tree2',text: 'Tree 2',icon: 'nature'} {href: '/labs/tree2',text: 'Tree 2',icon: 'nature'},
{href: '/labs/websocket',text: 'Web socket',icon: 'swap_calls'},
]}, ]},
{href: '/settings',text: 'Settings',icon: 'settings' }, {href: '/settings',text: 'Settings',icon: 'settings' },
{href: '/about',text: 'About (v0.3.2)' , icon: 'help' }, {href: '/about',text: 'About (v0.3.2)' , icon: 'help' },
@ -288,7 +277,10 @@
(error) =>{ (error) =>{
// interupt restxq single // interupt restxq single
console.log("HTTP.interceptors.response.use ",error) console.log("HTTP.interceptors.response.use ",error)
if(460 != error.response.status)this.showAlert("http error:\n"+error.response.data) if (!error.response) {
// network error
this.showAlert("network error\n"+"server down")
}else if(460 != error.response.status)this.showAlert("http error:\n"+error.response.data)
return Promise.reject(error); return Promise.reject(error);
}); });

View file

@ -21,8 +21,8 @@ const GEditTabs={
methods: { methods: {
// add tab return index // add tab return index
addItem(tab){ addItem(tab,pos){
//console.log("new: ",tab); //console.log("new: ",tab," ,pos:",pos);
var def={name: "AA"+this.nextId, var def={name: "AA"+this.nextId,
contentType: "text/xml", contentType: "text/xml",
mode: "xml", mode: "xml",
@ -31,7 +31,11 @@ const GEditTabs={
}; };
var etab = Object.assign(def,tab); var etab = Object.assign(def,tab);
etab.id= "T" + this.nextId etab.id= "T" + this.nextId
this.items.push (etab); if(pos){
this.items.splice(pos, 0, etab)
}else{
this.items.push (etab);
};
this.length++ this.length++
this.nextId++; this.nextId++;
var ind=this.items.indexOf(etab) var ind=this.items.indexOf(etab)
@ -70,7 +74,7 @@ const GEditTabs={
that=this that=this
this.restored=Settings.getItem('edit/items') this.restored=Settings.getItem('edit/items')
.then(function (v){ .then(function (v){
console.log("items ",v) //console.log("items ",v)
v.forEach(v =>that.addItem(v)) v.forEach(v =>that.addItem(v))
}) })
.catch(error=> { .catch(error=> {

View file

@ -59,6 +59,8 @@ display button that invokes a save favorite form
}, },
favorite(){ favorite(){
this.$store.commit('increment')
console.log(this.$store.state.count)
alert("save"); alert("save");
} }
} }

View file

@ -23,9 +23,11 @@
<v-list-tile-title>{{ msg.created | fromNow("from") }}</v-list-tile-title> <v-list-tile-title>{{ msg.created | fromNow("from") }}</v-list-tile-title>
<v-list-tile-sub-title v-html="msg.html">msg</v-list-tile-sub-title> <v-list-tile-sub-title v-html="msg.html">msg</v-list-tile-sub-title>
</v-list-tile-content> </v-list-tile-content>
<v-list-tile-action-text>
<v-chip>#{{ msg.index }}</v-chip>
</v-list-tile-action-text>
<v-list-tile-action-text v-if="msg.elapsed"> ({{ msg.elapsed }} ms) </v-list-tile-action-text>
<v-list-tile-action-text v-if="msg.elapsed">{{ msg.elapsed }} ms </v-list-tile-action-text>
<v-list-tile-action-text>#{{ msg.index }}</v-list-tile-action-text>
</v-list-tile> </v-list-tile>
</template> </template>

View file

@ -31,7 +31,7 @@ HTTP.interceptors.request.use((config) => {
HTTP.interceptors.response.use((response) => { HTTP.interceptors.response.use((response) => {
// Do something with response data // Do something with response data
if(response.config && response.config.qdStartTime){ if( response && response.config && response.config.qdStartTime){
var s=Math.floor(performance.now() - response.config.qdStartTime); var s=Math.floor(performance.now() - response.config.qdStartTime);
var c=response.config; var c=response.config;
var url=response.config.url + "?" + c.paramsSerializer(c.params); var url=response.config.url + "?" + c.paramsSerializer(c.params);
@ -181,19 +181,11 @@ function debounce(func, wait, immediate) {
Vue.component('treeselect', VueTreeselect.Treeselect); Vue.component('treeselect', VueTreeselect.Treeselect);
//Vue.use( VueFormJsonSchema);
function install (Vue) {
Vue.component('vue-form-json-schema', VueFormJsonSchema);
};
Vue.use({ install: install });
var sockhost=('https:'==window.location.protocol?'wss:':'ws:')+'//'+ window.location.host +'/ws'; var sockhost=('https:'==window.location.protocol?'wss:':'ws:')+'//'+ window.location.host +'/ws';
//Vue.use(VueNativeSock.default, sockhost); //Vue.use(VueNativeSock.default, sockhost);
//console.log("SOCK UP",VueNativeSock,sockhost); //console.log("SOCK UP",VueNativeSock,sockhost);
//leaflet
Vue.component('l-map', Vue2Leaflet.LMap);
Vue.component('l-tilelayer', Vue2Leaflet.LTileLayer);
Vue.component('l-marker', Vue2Leaflet.LMarker);
//function install (Vue) { //function install (Vue) {
@ -202,4 +194,5 @@ Vue.component('l-marker', Vue2Leaflet.LMarker);
//Vue.use({ install: install }); //Vue.use({ install: install });
var EditTabs=new Vue(GEditTabs) var EditTabs=new Vue(GEditTabs)
Vue.use(Vuetify); Vue.use(Vuetify);
new Vuepoc().$mount('#app') new Vuepoc().$mount('#app')

View file

@ -0,0 +1,45 @@
<!-- common module namespaces -->
<namespaces>
<namespace uri="http://www.w3.org/2005/xpath-functions/math"
prefix="math">
<description>Xpath math </description>
</namespace>
<namespace uri="http://www.w3.org/2005/xpath-functions/map"
prefix="map">
<description>Xpath map </description>
</namespace>
<namespace uri="http://www.w3.org/2005/xpath-functions/array"
prefix="array">
<description>Xpath array </description>
</namespace>
<namespace uri="http://www.w3.org/2005/xqt-errors" prefix="err">
<description>Xpath errors </description>
</namespace>
<namespace uri="http://www.w3.org/2010/xslt-xquery-serialization"
prefix="output">
<description>serialization parameters </description>
</namespace>
<namespace uri="http://www.w3.org/2005/xpath-functions"
prefix="fn">
<description>XPath functions
</description>
</namespace>
<namespace uri="http://www.w3.org/2005/xquery-local-functions"
prefix="local">
<description>Xquery functions
</description>
</namespace>
<namespace uri="http://basex.org/modules/perm" prefix="perm">
<description>Web permissions
</description>
</namespace>
</namespaces>

View file

@ -1,12 +1,31 @@
<!DOCTYPE html> <!DOCTYPE html>
<template id="about"> <template id="about">
<v-jumbotron color="grey lighten-2">
<v-container fill-height> <v-container fill-height>
<v-card hover raised>
<v-card-title class="pa-5 indigo">
<div class="display-1 white--text text-xs-center">VUE-POC</div>
<v-spacer></v-spacer>
<v-speed-dial v-model="fab" hover right direction="bottom" transition="slide-y-reverse-transition">
<v-btn slot="activator" class="blue darken-2" dark fab hover v-model="fab">
<v-icon>account_circle</v-icon>
<v-icon>close</v-icon>
</v-btn>
<v-btn fab dark small class="green" >
<v-icon>edit</v-icon>
</v-btn>
<v-btn fab dark small class="indigo" >
<v-icon>add</v-icon>
</v-btn>
<v-btn fab dark small class="red" >
<v-icon>delete</v-icon>
</v-btn>
</v-speed-dial>
</v-card-title>
<v-card-text>
<v-layout align-center> <v-layout align-center>
<v-flex> <v-flex color="grey lighten-2">
<h3 class="display-3">Vue-poc</h3>
<span class="subheading">A development environment for managing XML sources and processes.</span> <span class="subheading">A development environment for managing XML sources and processes.</span>
<v-divider class="my-3"></v-divider> <v-divider class="my-3"></v-divider>
@ -42,9 +61,9 @@
</v-layout> </v-layout>
</v-flex> </v-flex>
</v-layout> </v-layout>
</v-card-text>
</v-card>
</v-container> </v-container>
</v-jumbotron>
</template> </template>
<script>{ <script>{

View file

@ -1,7 +1,16 @@
(:~
: support tree view
: @author apb
: @exampletag some value
:)
module namespace j = 'quodatum.test.components'; module namespace j = 'quodatum.test.components';
(:~
declare function j:tax($items){ : @return sequence of json arrary items for each item
:)
declare function j:tax($items)
as element(_)*
{
for $a in $items for $a in $items
return <_ type="object"> return <_ type="object">
<id>{$a/@id/string()}</id> <id>{$a/@id/string()}</id>

View file

@ -2,32 +2,79 @@
<template id="tree"> <template id="tree">
<v-container fluid> <v-container fluid>
<v-card> <v-card>
<v-toolbar class="lime darken-1"> <v-toolbar card color="grey lighten-3">
<v-card-title ><qd-link href="https://github.com/zdy1988/vue-jstree">vue-jstree@2.1.16</qd-link> </v-card-title> <v-card-title >Taxonomy test</v-card-title>
<v-spacer></v-spacer> <v-spacer></v-spacer>
<v-btn>todo</v-btn> <v-btn>todo</v-btn>
</v-toolbar> </v-toolbar>
<v-card-text> <v-card-text>
{{ selected }} <v-layout >
</v-card-text>
<v-flex xs6 >
<v-card-text> <v-sheet class="pa-3 primary lighten-2">
<v-layout> <v-text-field
v-model="search"
<v-flex xs6> label="Filter tag"
<v-jstree :data="data" text-field-name="label" ref="tree" :async="loadData" flat
show-checkbox multiple allow-batch whole-row @item-click="itemClick"></v-jstree> solo-inverted
</v-flex> hide-details
<v-flex xs6> clearable
<pre> ></v-text-field>
{{ JSON.stringify(data, null, '\t') }} <v-checkbox
</pre> v-model="caseSensitive"
</v-flex> dark
</v-layout> hide-details
label="Case sensitive search"
></v-checkbox>
</v-sheet>
<v-treeview :items="items" item-text="label"
v-model="tree" :search="search"
:open.sync="open" activatable
active-class="grey lighten-4 indigo--text"
selected-color="indigo"
open-on-click
selectable>
<template slot="prepend" slot-scope="{ item, open }">
<v-icon v-if="item.children">
{{ open ? 'folder_open' : 'folder' }}
</v-icon>
<v-icon v-else>
{{ 'label' }}
</v-icon>
</template>
</v-treeview>
</v-flex>
<v-divider vertical></v-divider>
<v-flex xs6>
<div
v-if="tree.length === 0"
key="title"
class="title font-weight-light grey--text pa-3 text-xs-center"
>
Select some tags
</div>
<v-scroll-x-transition
group
hide-on-leave
>
<v-chip
v-for="leaf, i) in tree"
:key="i"
color="grey"
dark
small
>
<v-icon left small>label</v-icon>
{{ leaf }}
</v-chip>
</v-scroll-x-transition>
</v-flex>
</v-layout>
</v-card-text>
</v-card-text>
</v-card> </v-card>
</v-container> </v-container>
</template> </template>
@ -36,54 +83,28 @@
data:function(){ data:function(){
return { return {
data: [], data: [],
items: [],
loadData: function (oriNode, resolve) { tree: [],
var id = oriNode.data.id ? oriNode.data.id : 0 search: null,
console.log("LOAD DATA",id); open: [1, 2],
HTTP.get("components/tree") caseSensitive: false
.then(r=>{
console.log(r);
resolve(r.data)
})
.catch(error=> {
console.log(error);
alert("Get query error"+url)
});
}
} }
}, },
methods: { methods: {
itemClick (node) {
node.model.selected= !node.model.selected;
console.log(' clicked !',node.model)
},
load(){
this.asyncData = [this.$refs.tree.initializeLoading()];
this.$refs.tree.handleAsyncLoad(this.asyncData, this.$refs.tree)
},
sel1(item){
if(item.children){
var res=[];
for (const node of item.children) {res.push(this.sel1(node))}
return res;
}else{
return item.selected?item.label:[]
}
}
}, },
computed:{ computed:{
selected(){
return this.sel1(this.data);
},
}, },
mounted: function(){
this.load() created:function(){
HTTP.get("components/tree")
.then(r=>{
console.log("loaded tree:",r);
this.items= r.data;
})
} }
} }

View file

@ -6,7 +6,7 @@
<vp-selectpath :frmfav.sync="showadd" @selectpath="add"> <v-icon>add_circle</v-icon></vp-selectpath> <vp-selectpath :frmfav.sync="showadd" @selectpath="add"> <v-icon>add_circle</v-icon></vp-selectpath>
<v-btn icon @click="openUri"><v-icon>insert_drive_file</v-icon></v-btn> <v-btn icon @click="openUri"><v-icon>insert_drive_file</v-icon></v-btn>
</v-toolbar-items> </v-toolbar-items>
<v-toolbar-title>{{ curIndex }} </v-toolbar-title> <v-toolbar-title>i={{ curIndex }} </v-toolbar-title>
<v-menu v-if="active" left transition="v-fade-transition" > <v-menu v-if="active" left transition="v-fade-transition" >
<v-chip label small slot="activator" >{{ active.mode }}</v-chip> <v-chip label small slot="activator" >{{ active.mode }}</v-chip>
@ -45,7 +45,9 @@
</v-chip> </v-chip>
<span>Annotations: Errors,Warning and Info</span> <span>Annotations: Errors,Warning and Info</span>
</v-tooltip> </v-tooltip>
<qd-mimelist v-if="active" :mimetype="active.contentType" @selected="setmime">{{ active.mode }}</qd-mimelist>
<v-menu left transition="v-fade-transition"> <v-menu left transition="v-fade-transition">
<v-btn :disabled="!active" icon slot="activator" title="display settings"> <v-btn :disabled="!active" icon slot="activator" title="display settings">
<v-icon>playlist_play</v-icon> <v-icon>playlist_play</v-icon>
@ -107,9 +109,9 @@
</v-list-tile> </v-list-tile>
</v-list> </v-list>
</v-menu> </v-menu>
<v-layout slot="extension">
<qd-tablist v-if="EditTabs" :edittabs="EditTabs" :current="curIndex" @selected="setItem">tab list</qd-tablist>
<v-flex xs11>
<v-tabs v-model="curIndex" slot="extension"> <v-tabs v-model="curIndex" slot="extension">
<v-tab <v-tab
v-for="item in EditTabs.items" v-for="item in EditTabs.items"
@ -129,6 +131,11 @@
</v-btn> </v-btn>
</v-tab> </v-tab>
</v-tabs> </v-tabs>
</v-flex>
<v-flex xs1>
<qd-tablist v-if="EditTabs" :edittabs="EditTabs" :current="curIndex" @selected="setItem">tab list</qd-tablist>
</v-flex>
</v-layout>
</v-toolbar> </v-toolbar>
@ -171,7 +178,10 @@
methods:{ methods:{
add(){ add(){
this.curIndex=this.EditTabs.addItem({text:"hi "+ new Date()}) var tab={name:"@" + this.active.name,
text:"active: "+ JSON.stringify(this.active, null, 2)
}
this.curIndex=this.EditTabs.addItem(tab, this.curIndex+1)
}, },
tabClose(item,index){ tabClose(item,index){
@ -229,7 +239,8 @@
var d=this.active.mode; var d=this.active.mode;
var f=this.$MimeTypes.mode[d]; var f=this.$MimeTypes.mode[d];
var f=f && f.validate; var f=f && f.validate;
this.curIndex=this.EditTabs.addItem({text:"validate: todo\n "+ this.curIndex +"\n" + new Date()}) var t={name:"validate", text:"validate: todo\n "+ this.curIndex +"\n" + new Date()};
this.curIndex=this.EditTabs.addItem(t)
}, },

View file

@ -30,7 +30,7 @@
<v-btn @click="submit" > <v-btn @click="submit" >
<v-icon>play_circle_outline</v-icon>jobs:run <v-icon>play_circle_outline</v-icon>jobs:run
</v-btn> </v-btn>
<v-menu offset-y> <v-menu offset-y left>
<v-btn slot="activator" flat icon> <v-btn slot="activator" flat icon>
<v-icon>more_vert</v-icon> <v-icon>more_vert</v-icon>
</v-btn> </v-btn>

View file

@ -2,17 +2,37 @@
<template id="brutusin"> <template id="brutusin">
<v-container fluid> <v-container fluid>
<v-card> <v-card>
<v-card-title><qd-link href="https://github.com/vue-generators/vue-form-generator">vue-form-generator@2.2.1</qd-link> </v-card-title> <v-toolbar flat>
<v-toolbar-title>Form </v-toolbar-title>
<v-chip v-if="formValid" color="success">valid</v-chip>
<v-chip v-else color="danger">invalid</v-chip>
<v-btn color="primary" @click="$refs.myForm.validate()">validate</v-btn>
<v-spacer></v-spacer>
<qd-link href="https://github.com/koumoul-dev/vuetify-jsonschema-form/">vuetify-jsonschema-form@0.21.0</qd-link>
</v-toolbar>
<v-card-actions>
<v-layout row wrap>
<v-flex xs2>
<v-select :items="schemas" v-model="schemaUri" label="Choose an Schema" @change="applyExample" />
</v-flex>
<v-flex>
<v-btn @click="showschema()">show</v-btn>
</v-flex>
</v-layout>
</v-card-actions>
<v-card-text> <v-card-text>
<v-container grid-list-md text-xs-center> <v-container grid-list-md >
<v-layout row wrap> <v-layout row wrap>
<v-flex xs8> <v-flex xs8>
<v-form> <v-form ref="myForm" v-model="formValid">
<vue-form-generator :schema="schema" :model="model" :options="formOptions"></vue-form-generator> <v-btn @click="submit" :disabled="!formValid">submit</v-btn>
<v-jsonschema-form v-if="schema" :schema="schema" :model="model" :options="options" @error="e => window.alert(e)" />
</v-form> </v-form>
</v-flex> </v-flex>
<v-flex xs4> <v-flex xs4 class="grey lighten-2">
<h2 class="title my-4">Data:</h2>
<pre style="text-align:left">{{ model | pretty }}</pre> <pre style="text-align:left">{{ model | pretty }}</pre>
</v-flex> </v-flex>
</v-layout> </v-layout>
@ -24,90 +44,28 @@
<script>{ <script>{
components: { components: {
"vue-form-generator": VueFormGenerator.component "v-jsonschema-form": VJsonschemaForm.default
}, },
data() { data() {
return { return {
model: { model: {},
id: 1, schema: null,
name: "John Doe", schemaUri: "person.json",
password: "J0hnD03!x4", schemas: [
age: 35, "person.json",
skills: ["Javascript", "VueJS"], "select.json",
email: "john.doe@gmail.com", "arrays.json"
status: true ],
}, formValid: false,
schema: { options: {
fields: [{ debug: true,
type: "input", disableAll: false,
inputType: "text", autoFoldObjects: true,
label: "ID", httpLib: HTTP
model: "id",
readonly: true,
featured: false,
disabled: true
}, {
type: "input",
inputType: "text",
label: "Name",
model: "name",
readonly: false,
featured: true,
required: true,
disabled: false,
placeholder: "User's name",
validator: VueFormGenerator.validators.string
}, {
type: "input",
inputType: "password",
label: "Password",
model: "password",
min: 6,
required: true,
hint: "Minimum 6 characters",
validator: VueFormGenerator.validators.string
}, {
type: "input",
inputType: "number",
label: "Age",
model: "age",
min: 18,
validator: VueFormGenerator.validators.number
}, {
type: "input",
inputType: "email",
label: "E-mail",
model: "email",
placeholder: "User's e-mail address",
validator: VueFormGenerator.validators.email
}, {
type: "checklist",
label: "Skills",
model: "skills",
multi: true,
required: true,
multiSelect: true,
values: ["HTML5", "Javascript", "CSS3", "CoffeeScript", "AngularJS", "ReactJS", "VueJS"]
}, {
type: "switch",
label: "Status",
model: "status",
multi: true,
readonly: false,
featured: false,
disabled: false,
default: true,
textOn: "Active",
textOff: "Inactive"
}]
},
formOptions: {
validateAfterLoad: true,
validateAfterChanged: true
} }
}; };
}, },
methods:{ methods:{
onResize(){ onResize(){
var el=this.$refs["page"] var el=this.$refs["page"]
@ -115,8 +73,24 @@
var h=Math.max(1,window.innerHeight - el.offsetTop)-60 var h=Math.max(1,window.innerHeight - el.offsetTop)-60
console.log("h",h) console.log("h",h)
el.style.height=h +"px" el.style.height=h +"px"
},
applyExample(uri){
console.log(uri);
this.model={}
this.schema=null
HTTP.get("form/schema",{params: {uri: uri}})
.then(r=>{
this.schema=r.data;
})
},
submit(){
alert("todo")
},
showschema(){
alert("as")
} }
}, },
filters: { filters: {
pretty: function(value) { pretty: function(value) {
return JSON.stringify(value, null, 2); return JSON.stringify(value, null, 2);
@ -124,6 +98,10 @@
}, },
created:function(){ created:function(){
console.log("form") console.log("form")
HTTP.get("form/schema",{})
.then(r=>{
this.schema=r.data;
})
} }
} }
</script> </script>

View file

@ -1,52 +0,0 @@
<!DOCTYPE html>
<template id="formsschema">
<v-container fluid>
<v-card>
<v-card-title><qd-link href="https://github.com/jarvelov/vue-form-json-schema">vue-form-json-schema@1.15.3</qd-link> </v-card-title>
<vue-form-json-schema
:model="model"
:schema="schema"
:ui-schema="uiSchema"
:on-change="onChange"
>
</vue-form-json-schema>
</v-card>
</v-container>
</template>
<script>{
data: () => ({
model: {},
// A valid JSON Schema object
schema: {
type: 'object',
properties: {
firstName: {
type: 'string',
},
},
},
// Array of HTML elements or Vue components
uiSchema: [{
component: 'input',
model: 'firstName',
// Same API as [Vue's render functions](https://vuejs.org/v2/guide/render-function.html#The-Data-Object-In-Depth)
fieldOptions: {
class: ['form-control'],
on: ['input'],
attrs: {
placeholder: 'Please enter your first name',
},
},
}]
}),
methods: {
onChange(value) {
this.model = value;
}
}
}</script>

View file

@ -6,14 +6,15 @@ module namespace page = 'quodatum.test.schema';
:) :)
declare declare
%rest:GET %rest:path("/vue-poc/api/form/schema") %rest:GET %rest:path("/vue-poc/api/form/schema")
%rest:query-param("uri", "{$uri}")
%output:method("json") %output:method("json")
function page:schema() function page:schema($uri as xs:string?)
as element(json) as element(json)
{ {
let $s:="schema.json" let $file:=if(empty($uri)) then"person.json" else $uri
=>resolve-uri(static-base-uri()) let $path:=resolve-uri("schema.json/" || $file ,static-base-uri())=>trace("full")
=>fetch:text() let $s:=$path=>fetch:text()
=>json:parse() =>json:parse()
return $s/* return trace($s,"JSON")/*
}; };

View file

@ -1,58 +0,0 @@
<!DOCTYPE html>
<template id="formsjson">
<v-container fluid>
<v-card>
<v-toolbar dense >
<v-card-title><qd-link href="https://gitlab.com/formschema/native">vue-json-schema@1.1.1</qd-link> </v-card-title>
</v-toolbar>
<v-card-text>
<v-container grid-list-md text-xs-center>
<v-layout row wrap>
<v-flex xs8>
<form-schema v-if="schema2" ref="formSchema" :schema="schema2" v-model="model" @submit.stop="submit"
input-wrapping-class="text-xs-left">
<v-btn color="success" type="submit">Send</v-btn>
</form-schema>
</v-flex>
<v-flex xs4>
<pre style="text-align:left">{{ model | pretty }}</pre>
</v-flex>
</v-layout>
</v-container>
</v-card-text>
</v-card>
</v-container>
</template>
<script>{
components: {
"form-schema": window["vue-json-schema"].default
},
data: () => ({
schema2: null,
model: {}
}),
methods: {
submit (e) {
// this.model contains the valid data according your JSON Schema.
// You can submit your model to the server here
console.log(this.model);
alert("no submit yet")
}
},
created:function(){
HTTP.get("form/schema",{})
.then(r=>{
this.schema2=r.data;
})
}
}
</script>

View file

@ -1,38 +0,0 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "server sourced schema",
"properties": {
"name": {
"type": "string",
"title": "Name ",
"minLength": 8,
"maxLength": 80,
"attrs": {
"placeholder": "Full Name",
"title": "Please enter your full name"
}
},
"email": {
"type": "string",
"title": "Email label ",
"maxLength": 120,
"attrs": {
"type": "email",
"placeholder": "Email"
}
},
"lists": {
"type": "string",
"title": "List label ",
"enum": ["Daily New", "Promotion", "Another"]
},
"arrayInput": {
"type": "array",
"title": "Array label ",
"items": {
"type": "string"
}
}
}
}

View file

@ -0,0 +1,49 @@
{
"id": "https://example.com/arrays.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "A representation of a person, company, organization, or place",
"type": "object",
"properties": {
"fruits": {
"type": "array",
"description": "This is a simple array of strings",
"items": {
"type": "string"
}
},
"sizes": {
"type": "array",
"items": {
"type": "string",
"enum": ["small", "medium", "large"]
},
"minItems": 1
},
"vegetables": {
"type": "array",
"description": "A list of vegetables as editable objects.",
"items": { "$ref": "#/definitions/veggie" }
},
"coordinate": {
"type": "array",
"title": "Lat/lon coordinates as a tuple",
"items": [{"type": "number", "title": "Latitude"}, {"type": "number", "title": "Longitude"}]
}
},
"definitions": {
"veggie": {
"type": "object",
"required": [ "veggieName", "veggieLike" ],
"properties": {
"veggieName": {
"type": "string",
"description": "The name of the vegetable."
},
"veggieLike": {
"type": "boolean",
"description": "Do I like this vegetable?"
}
}
}
}
}

View file

@ -0,0 +1,45 @@
{
"$id": "https://example.com/person.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Person",
"description": "A few metadata about some person.",
"type": "object",
"required": [
"firstName",
"lastName"
],
"properties": {
"type": {
"type": "string",
"const": "person"
},
"firstName": {
"type": "string",
"description": "\nThe person's first name.\n\nThis description can be a long text with markdown content.\n\n - a list item\n - another one\n "
},
"lastName": {
"type": "string",
"description": "The person's last name."
},
"age": {
"description": "Age in years which must be equal to or greater than zero.",
"type": "integer",
"minimum": 0
},
"citizen": {
"description": "Is this person a citizen of this country.",
"type": "boolean"
},
"description": {
"description": "A longer text for the description.",
"type": "string",
"maxLength": 2000
},
"homepage": {
"description": "A long string also, but display is forced on single line",
"type": "string",
"maxLength": 2000,
"x-display": "single-line"
}
}
}

View file

@ -0,0 +1,133 @@
{
"title": "Person",
"type": "object",
"required": ["gender", "fromAjaxObject", "fromAjaxString"],
"properties": {
"gender": {
"type": "string",
"description": "The person's gender.",
"enum": ["male", "female"]
},
"genderWithTitles": {
"type": "string",
"description": "The person's gender with separate value and title. Also clearable, because not required.",
"oneOf": [{"const": "m", "title": "male"}, {"const": "f", "title": "female"}]
},
"fromAjaxString": {
"type": "string",
"description": "The values come from an HTTP request.",
"x-fromUrl": "https://koumoul.com/s/data-fair/api/v1/datasets?status=finalized&select=title&owner={context.owner.type}:{context.owner.id}",
"x-itemsProp": "results",
"x-itemTitle": "title",
"x-itemKey": "href"
},
"fromAjaxStringArray": {
"type": "array",
"items": {
"type": "string"
},
"description": "The values come from an HTTP request.",
"x-fromUrl": "https://koumoul.com/s/data-fair/api/v1/datasets?status=finalized&select=title&owner={context.owner.type}:{context.owner.id}",
"x-itemsProp": "results",
"x-itemTitle": "title",
"x-itemKey": "href"
},
"fromAjaxObject": {
"type": "object",
"description": "The values come from an HTTP request and are stored as object.",
"x-fromUrl": "https://koumoul.com/s/data-fair/api/v1/datasets?status=finalized&select=title,schema&owner={context.owner.type}:{context.owner.id}",
"x-itemsProp": "results",
"x-itemTitle": "title",
"x-itemKey": "href",
"properties": {
"href": {"type": "string"},
"title": {"type": "string"},
"page": {"type": "string"},
"schema": {"type": "array"}
}
},
"fromData": {
"type": "object",
"description": "The values come from another part of the data.",
"x-fromData": "fromAjaxObject.schema",
"x-itemTitle": "x-originalName",
"x-itemKey": "key"
},
"fromAjaxWithQuery": {
"type": "object",
"description": "The values come from an HTTP request with textual filter.",
"x-fromUrl": "https://koumoul.com/s/data-fair/api/v1/datasets?status=finalized&select=title&q={q}&owner={context.owner.type}:{context.owner.id}",
"x-itemsProp": "results",
"x-itemTitle": "title",
"x-itemKey": "href"
},
"chartDef": {
"description": "Simple oneOf on object, the title of const property is used as title of the select",
"type": "object",
"x-itemKey": "type",
"oneOf": [{
"title": "Bar chart",
"properties": {
"type": {
"const": "bar",
"title": "Chose from a type"
},
"xLabel": {
"type": "string"
},
"yLabel": {
"type": "string"
},
"fromAjaxWithDep": {
"type": "object",
"title": "choisir un colonne",
"description": "The values come from an HTTP request with a part of the url that depends on another part of the model.",
"x-fromUrl": "{fromAjaxWithQuery.href}/schema",
"x-itemTitle": "label",
"x-itemKey": "key"
}
}
}, {
"title": "Pie chart",
"properties": {
"type": {
"const": "pie"
},
"diameter": {
"type": "integer"
}
}
}]
},
"chartDef2": {
"title": "Chose from a type",
"description": "A conditional form will be rendered below",
"type": "object",
"x-itemKey": "type",
"oneOf": [{
"title": "Bar chart",
"properties": {
"type": {
"const": "bar"
},
"xLabel": {
"type": "string"
},
"yLabel": {
"type": "string"
}
}
}, {
"title": "Pie chart",
"properties": {
"type": {
"const": "pie"
},
"diameter": {
"type": "integer"
}
}
}]
}
}
}

View file

@ -2,25 +2,6 @@
<template id="home"> <template id="home">
<v-card hover raised> <v-card hover raised>
<v-card-title class="pa-5 indigo">
<div class="display-1 white--text text-xs-center">VUE-POC</div>
<v-spacer></v-spacer>
<v-speed-dial v-model="fab" hover right direction="bottom" transition="slide-y-reverse-transition">
<v-btn slot="activator" class="blue darken-2" dark fab hover v-model="fab">
<v-icon>account_circle</v-icon>
<v-icon>close</v-icon>
</v-btn>
<v-btn fab dark small class="green" >
<v-icon>edit</v-icon>
</v-btn>
<v-btn fab dark small class="indigo" >
<v-icon>add</v-icon>
</v-btn>
<v-btn fab dark small class="red" >
<v-icon>delete</v-icon>
</v-btn>
</v-speed-dial>
</v-card-title>
<v-card-text> <v-card-text>

View file

@ -4,7 +4,7 @@
: @author Andy Bunce may-2017 : @author Andy Bunce may-2017
:) :)
module namespace vue-api = 'quodatum:vue.api.images'; module namespace vue-api = 'quodatum:vue.api.images';
import module namespace cfg = "quodatum:media.image.configure" at "../../config.xqm"; import module namespace cfg = "quodatum:media.image.configure" at "config.xqm";
import module namespace fw="quodatum:file.walker"; import module namespace fw="quodatum:file.walker";
import module namespace entity = 'quodatum.models.generated' at "../../models.gen.xqm"; import module namespace entity = 'quodatum.models.generated' at "../../models.gen.xqm";
declare namespace c="http://www.w3.org/ns/xproc-step"; declare namespace c="http://www.w3.org/ns/xproc-step";
@ -31,24 +31,15 @@ function vue-api:id( $id as xs:integer)
:) :)
declare declare
%rest:GET %rest:path("/vue-poc/api/images/report") %rest:GET %rest:path("/vue-poc/api/images/report")
%output:method("html") %output:version("5.0") %rest:produces("application/json")
%output:method("json")
function vue-api:report() function vue-api:report()
{ {
<div id="A0"> <json type="object" >
something <imagedir>{ $cfg:IMAGEDIR }</imagedir>
<ol> <thumbdir>{ $cfg:THUMBDIR }</thumbdir>
<li>$cfg:IMAGEDIR: <code>{ $cfg:IMAGEDIR }</code> </li> <imagedb>{ $cfg:DB-IMAGE }</imagedb>
<li>$cfg:THUMBDIR: <code>{ $cfg:THUMBDIR }</code> </li> </json>
<li>$cfg:DB-IMAGE: <code>{ $cfg:DB-IMAGE }</code> </li>
<li><a href="#A30" >A30</a></li>
<li><a href="#A50">A50</a></li>
</ol>
{for $i in 1 to 50 return <p>{$i}:
<a id="A{$i}" name="A{$i}">Lorem ipsum</a> dolor sit amet, consectetur adipiscing elit. Morbi aliquam sodales justo, aliquet eleifend ex bibendum eget. Nullam vitae maximus ipsum. Sed maximus felis in interdum maximus. Vestibulum quis urna vel dolor placerat iaculis non at metus. Curabitur nec dictum mauris. Duis placerat magna non pellentesque pulvinar. Nam a eleifend sapien. Suspendisse potenti. Vestibulum nunc massa, eleifend a dolor quis, feugiat condimentum est. Integer diam eros, blandit in purus in, euismod ultrices felis. Donec ipsum magna, elementum non lacus vel, rutrum ornare ante. Integer egestas sapien quam, ut posuere nisi rhoncus nec. Etiam ornare enim eu tellus laoreet, in laoreet urna sodales. Donec interdum, augue non lobortis sodales, leo elit tincidunt mi, vitae varius augue libero vel lectus. Cras imperdiet quis dolor nec gravida.
<a href="#A0">top</a></p>
}
</div>
}; };
(:~ (:~

View file

@ -9,14 +9,23 @@
<v-toolbar class="orange darken-1"> <v-toolbar class="orange darken-1">
<v-btn icon to="./"><v-icon>arrow_back</v-icon></v-btn> <v-btn icon to="./"><v-icon>arrow_back</v-icon></v-btn>
<v-card-title > <v-card-title >
<v-chip >todo</v-chip> <v-chip >Settings</v-chip>
</v-card-title> </v-card-title>
<v-spacer></v-spacer> <v-spacer></v-spacer>
</v-toolbar> </v-toolbar>
<v-progress-linear v-if="busy" v-bind:indeterminate="true" ></v-progress-linear> <v-progress-linear v-if="busy" v-bind:indeterminate="true" ></v-progress-linear>
<v-card-text v-if="!busy" v-html="report" @click.capture="onClick($event)"></v-card-text> <v-card-text >
<ul>
<li></li>
<li></li>
<li></li>
</ul>
<pre>
{{ report | pretty }}
</pre>
</v-card-text>
</v-card> </v-card>
</v-container> </v-container>
</template> </template>
@ -38,19 +47,6 @@
var t1 = performance.now(); var t1 = performance.now();
this.elapsed= 0.001 *(t1 - t0) this.elapsed= 0.001 *(t1 - t0)
}) })
},
onClick(event){
console.log("event",event);
var isA= "a"== event.originalTarget.localName
if(isA) {
// alert("stop this"+ event.originalTarget.hash);
console.log("tar",event.originalTarget.hash,document.querySelector(event.originalTarget.hash));
event.preventDefault();
this.$router.push({"hash":event.originalTarget.hash});
// this.$vuetify.goTo(event.originalTarget.hash, { duration: 600, offset: -200, easing: 'easeInOutCubic'});
}
} }
}, },
created:function(){ created:function(){

View file

@ -1,7 +1,7 @@
(:~ (:~
: create xml file list by scanning $cfg:IMAGEDIR and write to db $cfg:DB-IMAGE : create xml file list by scanning $cfg:IMAGEDIR and write to db $cfg:DB-IMAGE
:) :)
import module namespace cfg = "quodatum:media.image.configure" at "../../../config.xqm"; import module namespace cfg = "quodatum:media.image.configure" at "../config.xqm";
import module namespace fw="quodatum:file.walker"; import module namespace fw="quodatum:file.walker";
declare namespace c="http://www.w3.org/ns/xproc-step"; declare namespace c="http://www.w3.org/ns/xproc-step";

View file

@ -3,7 +3,7 @@
: done in batches of 1000 : done in batches of 1000
: @return initial number of missing docs : @return initial number of missing docs
:) :)
import module namespace cfg = "quodatum:media.image.configure" at "../../../config.xqm"; import module namespace cfg = "quodatum:media.image.configure" at "../config.xqm";
import module namespace imgmeta = "expkg-zone58:image.metadata" ; import module namespace imgmeta = "expkg-zone58:image.metadata" ;
declare namespace c="http://www.w3.org/ns/xproc-step"; declare namespace c="http://www.w3.org/ns/xproc-step";

View file

@ -3,7 +3,7 @@
: <metadata/> -> <image/> : <metadata/> -> <image/>
:) :)
import module namespace metadata = 'expkg-zone58:image.metadata'; import module namespace metadata = 'expkg-zone58:image.metadata';
import module namespace cfg = "quodatum:media.image.configure" at "../../../config.xqm"; import module namespace cfg = "quodatum:media.image.configure" at "../config.xqm";
for $meta in collection($cfg:DB-IMAGE || "/meta")/metadata for $meta in collection($cfg:DB-IMAGE || "/meta")/metadata
let $loc:=db:path($meta)=>tokenize("/") let $loc:=db:path($meta)=>tokenize("/")
let $name:=$loc[count($loc)-1] let $name:=$loc[count($loc)-1]

View file

@ -3,7 +3,7 @@
: @return initial number of missing docs : @return initial number of missing docs
:) :)
import module namespace t="expkg-zone58:image.thumbnailator"; import module namespace t="expkg-zone58:image.thumbnailator";
import module namespace cfg = "quodatum:media.image.configure" at "../../../config.xqm"; import module namespace cfg = "quodatum:media.image.configure" at "../config.xqm";
declare namespace c="http://www.w3.org/ns/xproc-step"; declare namespace c="http://www.w3.org/ns/xproc-step";
declare variable $CHUNK:=1000; declare variable $CHUNK:=1000;

View file

@ -1,5 +1,5 @@
(:~ set original:) (:~ set original:)
import module namespace cfg = "quodatum:media.image.configure" at "../../../config.xqm"; import module namespace cfg = "quodatum:media.image.configure" at "../config.xqm";
for $i in collection($cfg:DB-IMAGE || "/image")/image for $i in collection($cfg:DB-IMAGE || "/image")/image
where $i[file/@path=>contains('original')] where $i[file/@path=>contains('original')]

View file

@ -4,7 +4,7 @@
: <idref>14569796 14569818 </idref> : <idref>14569796 14569818 </idref>
: </keyword> : </keyword>
:) :)
import module namespace cfg = "quodatum:media.image.configure" at "../../../config.xqm"; import module namespace cfg = "quodatum:media.image.configure" at "../config.xqm";
declare %updating function local:put($data,$path){ declare %updating function local:put($data,$path){
db:replace($cfg:DB-IMAGE,$path,$data) db:replace($cfg:DB-IMAGE,$path,$data)
}; };

View file

@ -4,7 +4,7 @@
: <idref>14569796 14569818 </idref> : <idref>14569796 14569818 </idref>
: </keyword> : </keyword>
:) :)
import module namespace cfg = "quodatum:media.image.configure" at "../../../config.xqm"; import module namespace cfg = "quodatum:media.image.configure" at "../config.xqm";
declare %updating function local:put($data,$path){ declare %updating function local:put($data,$path){
db:replace($cfg:DB-IMAGE,$path,$data) db:replace($cfg:DB-IMAGE,$path,$data)
}; };

View file

@ -13,6 +13,13 @@
</template> </template>
<script>{ <script>{
//leaflet
components: {
"l-map": Vue2Leaflet.LMap,
"l-tilelayer": Vue2Leaflet.LTileLayer,
"l-marker": Vue2Leaflet.LMarker
},
data: function(){ data: function(){
return { return {
zoom: 13, zoom: 13,

View file

@ -2,6 +2,7 @@
<template id="namespace"> <template id="namespace">
<v-container fluid> <v-container fluid>
<v-card> <v-card>
<v-toolbar > <v-toolbar >
<v-toolbar-title> <v-toolbar-title>
<v-breadcrumbs :items="crumbs" > <v-breadcrumbs :items="crumbs" >
@ -12,10 +13,7 @@
</template> </template>
</v-breadcrumbs> </v-breadcrumbs>
</v-toolbar-title> </v-toolbar-title>
<v-btn @click="load" icon :loading="loading"
<v-btn @click="load" icon
:loading="loading"
:disabled="loading" :disabled="loading"
><v-icon>refresh</v-icon></v-btn> ><v-icon>refresh</v-icon></v-btn>
@ -26,9 +24,9 @@
clearable></v-text-field> clearable></v-text-field>
<v-spacer></v-spacer> <v-spacer></v-spacer>
<vp-entitylink entity="namespace"></vp-entitylink> <vp-entitylink entity="namespace"></vp-entitylink>
</v-toolbar> </v-toolbar>
<v-card-text> <v-card-text>
<v-data-table <v-data-table
:headers="headers" :headers="headers"
@ -47,14 +45,12 @@
</template> </template>
<template slot="no-data"> <template slot="no-results">
No result available. No matching results.
</template> </template>
<template slot="no-data"> <template slot="no-data">
<v-alert :value="true" icon="warning" >
No matching items. No matching items.
</v-alert>
</template> </template>
</v-data-table> </v-data-table>
</v-card-text> </v-card-text>
@ -93,11 +89,6 @@
this.items= r.data.items this.items= r.data.items
this.loading= false this.loading= false
}) })
.catch(error=> {
console.log(error);
this.loading= false
alert("Get query error"+url)
});
}, },
setfilter(){ setfilter(){

View file

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<template id="scratch"> <template id="scratch">
<v-container fluid> <v-container fluid>
<v-toolbar tabs dense> <v-toolbar tabs dense>
<v-toolbar-title>Tab index {{ curIndex }}</v-toolbar-title> <v-toolbar-title>Tab index {{ curIndex }}</v-toolbar-title>
<v-btn v-if="active">{{ active.mode }}</v-btn> <v-btn v-if="active">{{ active.mode }}</v-btn>
<qd-mimelist v-if="active" :mimetype="active.contentType" @selected="setmime">{{ active.mode }}</qd-mimelist> <qd-mimelist v-if="active" :mimetype="active.contentType" @selected="setmime">{{ active.mode }}</qd-mimelist>
@ -10,9 +10,10 @@
<v-btn @click="add">Add</v-btn> <v-btn @click="add">Add</v-btn>
<v-btn @click="curIndex=2">set</v-btn> <v-btn @click="curIndex=2">set</v-btn>
<qd-tablist v-if="EditTabs" :edittabs="EditTabs" :current="curIndex" @selected="setItem">tab list</qd-tablist> <v-layout slot="extension">
<v-tabs v-model="curIndex" slot="extension"> <v-flex xs11>
<v-tabs v-model="curIndex" >
<v-tab <v-tab
v-for="(item,index) in EditTabs.items" v-for="(item,index) in EditTabs.items"
:key="item.id" :key="item.id"
@ -30,8 +31,13 @@
</v-btn> </v-btn>
</v-tab> </v-tab>
</v-tabs> </v-tabs>
</v-flex>
<v-flex xs1>
<qd-tablist v-if="EditTabs" :edittabs="EditTabs" :current="curIndex" @selected="setItem">tab list</qd-tablist>
</v-flex>
</v-layout>
</v-toolbar> </v-toolbar>
<v-tabs-items v-model="curIndex"> <v-tabs-items v-model="curIndex">
<v-tab-item <v-tab-item

View file

@ -0,0 +1,102 @@
<system>
<generalinformation>
<version>9.2 beta</version>
<usedmemory>41 MB</usedmemory>
</generalinformation>
<globaloptions>
<authmethod>Basic</authmethod>
<cachetimeout>3600</cachetimeout>
<dbpath>C:/Users/andy/Desktop/basex-latest/data</dbpath>
<debug>false</debug>
<fairlock>false</fairlock>
<host>localhost</host>
<httplocal>false</httplocal>
<ignorecert>false</ignorecert>
<ignorehostname>false</ignorehostname>
<keepalive>600</keepalive>
<lang>English</lang>
<langkeys>false</langkeys>
<log>true</log>
<logmsgmaxlen>1000</logmsgmaxlen>
<logpath>.logs</logpath>
<nonproxyhosts/>
<parallel>8</parallel>
<parserestxq>3</parserestxq>
<password/>
<port>1984</port>
<proxyhost/>
<proxyport>0</proxyport>
<repopath>C:/Users/andy/Desktop/basex-latest/repo</repopath>
<restpath/>
<restxqerrors>true</restxqerrors>
<restxqpath/>
<serverhost/>
<serverport>1984</serverport>
<stopport>8985</stopport>
<timeout>30</timeout>
<user/>
<webpath>C:/Users/andy/Desktop/basex-latest/webapp</webpath>
</globaloptions>
<localoptions>
<addarchives>true</addarchives>
<addcache>false</addcache>
<addraw>false</addraw>
<archivename>false</archivename>
<attrinclude/>
<attrindex>true</attrindex>
<autoflush>true</autoflush>
<autooptimize>false</autooptimize>
<bindings/>
<casesens>false</casesens>
<catfile/>
<checkstrings>true</checkstrings>
<chop>true</chop>
<compplan>true</compplan>
<copynode>true</copynode>
<createfilter>*.xml</createfilter>
<createonly>false</createonly>
<csvparser/>
<defaultdb>false</defaultdb>
<diacritics>false</diacritics>
<dotcompact>false</dotcompact>
<dotplan>false</dotplan>
<dtd>false</dtd>
<enforceindex>false</enforceindex>
<exporter/>
<forcecreate>false</forcecreate>
<ftinclude/>
<ftindex>false</ftindex>
<htmlparser/>
<inlinelimit>100</inlinelimit>
<intparse>false</intparse>
<jsonparser/>
<language>en</language>
<lserror>0</lserror>
<mainmem>false</mainmem>
<maxcats>100</maxcats>
<maxlen>96</maxlen>
<maxstat>30</maxstat>
<mixupdates>false</mixupdates>
<parser>xml</parser>
<queryinfo>true</queryinfo>
<runquery>true</runquery>
<runs>1</runs>
<serialize>true</serialize>
<serializer/>
<skipcorrupt>false</skipcorrupt>
<splitsize>0</splitsize>
<stemming>false</stemming>
<stopwords/>
<stripns>false</stripns>
<tailcalls>256</tailcalls>
<textinclude/>
<textindex>true</textindex>
<textparser/>
<tokeninclude/>
<tokenindex>false</tokenindex>
<updindex>false</updindex>
<writeback>false</writeback>
<xinclude>true</xinclude>
<xmlplan>true</xmlplan>
</localoptions>
</system>

View file

@ -0,0 +1,101 @@
<system>
<generalinformation>
<version>9.1.2</version>
<usedmemory>55 MB</usedmemory>
</generalinformation>
<globaloptions>
<authmethod>Basic</authmethod>
<cachetimeout>3600</cachetimeout>
<dbpath>C:/Users/andy/Desktop/basex.versions/data</dbpath>
<debug>false</debug>
<fairlock>false</fairlock>
<host>localhost</host>
<httplocal>false</httplocal>
<ignorecert>false</ignorecert>
<ignorehostname>false</ignorehostname>
<keepalive>600</keepalive>
<lang>English</lang>
<langkeys>false</langkeys>
<log>true</log>
<logmsgmaxlen>1000</logmsgmaxlen>
<logpath>.logs</logpath>
<nonproxyhosts/>
<parallel>8</parallel>
<parserestxq>-1</parserestxq>
<password/>
<port>1984</port>
<proxyhost/>
<proxyport>0</proxyport>
<repopath>C:/Users/andy/Desktop/basex.versions/repo</repopath>
<restpath/>
<restxqpath/>
<serverhost/>
<serverport>1984</serverport>
<stopport>8985</stopport>
<timeout>30</timeout>
<user/>
<webpath>C:/Users/andy/Desktop/basex.versions/webapp</webpath>
</globaloptions>
<localoptions>
<addarchives>true</addarchives>
<addcache>false</addcache>
<addraw>false</addraw>
<archivename>false</archivename>
<attrinclude/>
<attrindex>true</attrindex>
<autoflush>true</autoflush>
<autooptimize>false</autooptimize>
<bindings/>
<casesens>false</casesens>
<catfile>C:/Users/andy/Desktop/basex.versions/etc/mycatalog.xml</catfile>
<checkstrings>true</checkstrings>
<chop>false</chop>
<compplan>true</compplan>
<copynode>true</copynode>
<createfilter>*.xml</createfilter>
<createonly>false</createonly>
<csvparser/>
<defaultdb>false</defaultdb>
<diacritics>false</diacritics>
<dotcompact>false</dotcompact>
<dotplan>false</dotplan>
<dtd>false</dtd>
<enforceindex>false</enforceindex>
<exporter/>
<forcecreate>false</forcecreate>
<ftinclude/>
<ftindex>false</ftindex>
<htmlparser/>
<inlinelimit>100</inlinelimit>
<intparse>false</intparse>
<jsonparser/>
<language>en</language>
<lserror>0</lserror>
<mainmem>false</mainmem>
<maxcats>100</maxcats>
<maxlen>96</maxlen>
<maxstat>30</maxstat>
<mixupdates>false</mixupdates>
<parser>xml</parser>
<queryinfo>true</queryinfo>
<runquery>true</runquery>
<runs>1</runs>
<serialize>true</serialize>
<serializer/>
<skipcorrupt>false</skipcorrupt>
<splitsize>0</splitsize>
<stemming>false</stemming>
<stopwords/>
<stripns>false</stripns>
<tailcalls>256</tailcalls>
<textinclude/>
<textindex>true</textindex>
<textparser/>
<tokeninclude/>
<tokenindex>false</tokenindex>
<updindex>false</updindex>
<writeback>false</writeback>
<xinclude>true</xinclude>
<xmlplan>true</xmlplan>
</localoptions>
</system>

View file

@ -1,16 +1,78 @@
<!DOCTYPE html> <!DOCTYPE html>
<template id="basexsettings"> <template id="basexsettings">
<v-card> <v-card>
<v-card-title>BaseX settings</v-card-title> <v-toolbar>
<v-card-actions> <v-toolbar-title>BaseX settings</v-toolbar-title>
todo <v-spacer></v-spacer>
</v-card-actions> <v-toolbar-items>
<v-checkbox
v-model="changed"
label="Changed only"
></v-checkbox>
</v-toolbar-items>
</v-toolbar>
<v-card-text>
<v-data-table
:headers="headers"
:items="filtered"
class="elevation-1" :pagination.sync="pagination"
>
<template slot="items" slot-scope="props">
<td>{{ props.item.name }}</td>
<td >{{ props.item.current }}</td>
<td >{{ props.item.changed }}</td>
<td class="text-xs-right">{{ props.item.default }}</td>
<td><qd-link href="http://docs.basex.org/wiki/Options#">description</qd-link></td>
</template>
</v-data-table>
</v-card-text>
</v-card> </v-card>
</template> </template>
<script>{ <script>{
data: function(){ data: ()=>({
return { busy: false,
fab: false items: [],
} changed: true,
headers: [
{ text: 'Name', value: 'name'},
{text: "current", value: "current"},
{text: "changed", value: "changed"},
{text: "default", value: "default"},
{text: "description"}
],
pagination: {
descending: false,
page: 1,
rowsPerPage: 100 ,// -1 for All
sortBy: 'name'
}
}),
methods:{
get(){
this.busy=true
HTTP.get("server/basexsettings")
.then(r=>{
this.busy=false
this.items=r.data
})
}
},
computed: {
// a computed getter
filtered: function () {
return this.items.filter(item=> item.changed == this.changed)
}
},
created:function(){
console.log("reports")
this.get()
} }
}</script> }</script>

View file

@ -0,0 +1,26 @@
module namespace set = 'quodatum.test.basexsettings';
(:~
: basex settings default and current
:)
declare
%rest:GET %rest:path("/vue-poc/api/server/basexsettings")
%rest:produces("application/json")
%output:method("json")
function set:values()
{
let $defaults:=doc("basexsettings-921.xml")//*[not(*)]
let $dm:=map:merge($defaults!map:entry(name(.),string(.)))
let $settings:=db:system()//*[not(*)]
let $sm:=map:merge($settings!map:entry(name(.),string(.)))
let $names:=distinct-values((map:keys( $dm),map:keys($sm)))=>sort()
return <json type="array">
{for $name in $names return <_ type="object">
<name>{$name}</name>
<default>{$dm($name)}</default>
<current>{$sm($name)}</current>
<changed type="boolean">{$dm($name) ne $sm($name)}</changed>
</_>}
</json>
};

View file

@ -19,7 +19,7 @@ declare variable $target as xs:anyURI external
:=xs:anyURI("C:/Users/andy/git/vue-poc/src/vue-poc/models.gen.xqm"); :=xs:anyURI("C:/Users/andy/git/vue-poc/src/vue-poc/models.gen.xqm");
let $config:='import module namespace cfg = "quodatum:media.image.configure" at "config.xqm";' let $config:='import module namespace cfg = "quodatum:media.image.configure" at "features/images/config.xqm";'
let $src:=bf:module(bf:entities($efolder),$config) let $src:=bf:module(bf:entities($efolder),$config)
return ( return (
prof:variables(), prof:variables(),

View file

@ -0,0 +1,58 @@
<!DOCTYPE html>
<template id="testhtml">
<v-container fluid>
<v-card >
<v-toolbar class="orange darken-1">
<v-btn icon to="./"><v-icon>arrow_back</v-icon></v-btn>
<v-card-title >
<v-chip >todo</v-chip>
</v-card-title>
<v-spacer></v-spacer>
</v-toolbar>
<v-progress-linear v-if="busy" v-bind:indeterminate="true" ></v-progress-linear>
<v-card-text v-if="!busy" v-html="report" @click.capture="onClick($event)"></v-card-text>
</v-card>
</v-container>
</template>
<script>{
data: ()=>({
busy: false,
report: null,
elapsed: null
}),
methods:{
get(){
this.busy=true
var t0 = performance.now();
HTTP.get("test/html")
.then(r=>{
this.busy=false
this.report=r.data
var t1 = performance.now();
this.elapsed= 0.001 *(t1 - t0)
})
},
onClick(event){
console.log("event",event);
var isA= "a"== event.originalTarget.localName
if(isA) {
// alert("stop this"+ event.originalTarget.hash);
console.log("tar",event.originalTarget.hash,document.querySelector(event.originalTarget.hash));
event.preventDefault();
this.$router.push({"hash":event.originalTarget.hash});
// this.$vuetify.goTo(event.originalTarget.hash, { duration: 600, offset: -200, easing: 'easeInOutCubic'});
}
}
},
created:function(){
console.log("reports")
this.get()
}
}
</script>

View file

@ -22,7 +22,7 @@ function vue-api:thumbnail($url,$task )
let $x:=fn:parse-xml($task)=>fn:trace("task: ") let $x:=fn:parse-xml($task)=>fn:trace("task: ")
let $thumb:=fetch:binary($url)=>t:task($x/thumbnail) let $thumb:=fetch:binary($url)=>t:task($x/thumbnail)
return (qweb:download-response("raw","xx.gif"), $thumb) return (qweb:download-response("basex","xx.gif"), $thumb)
}; };
(:~ (:~

View file

@ -58,7 +58,7 @@ declare function xqd:gendoc(
let $ip:= $f/@name/resolve-uri(.,base-uri(.)) let $ip:= $f/@name/resolve-uri(.,base-uri(.))
let $dest:= file:resolve-path($op,$target) let $dest:= file:resolve-path($op,$target)
let $xqdoc:= xqd:xqdoc($ip,map{}) let $xqdoc:= xqd:xqdoc($ip,map{"source": $ip})
let $xq:= fetch:text($ip) let $xq:= fetch:text($ip)
let $params:=map:merge((map{ let $params:=map:merge((map{
"source": $xq, "source": $xq,
@ -134,11 +134,18 @@ as element(*)
xp:parse($xq || "",map{"lang":"xquery","version":"3.1 basex-20161204"}) xp:parse($xq || "",map{"lang":"xquery","version":"3.1 basex-20161204"})
}; };
(:~ Generate xqdoc :) (:~
: Generate xqdoc adding custom opts
:)
declare function xqd:xqdoc($url as xs:string,$opts as map(*)) declare function xqd:xqdoc($url as xs:string,$opts as map(*))
as element(xqdoc:xqdoc) as element(xqdoc:xqdoc)
{ {
inspect:xqdoc($url) inspect:xqdoc($url)
transform with {
for $tag in map:keys($opts)
return insert node <xqdoc:custom tag="_{ $tag }">{ $opts[$tag] }</xqdoc:custom>
into xqdoc:module[@type="library"]/xqdoc:comment
}
}; };
(:~ transform xqdoc to html :) (:~ transform xqdoc to html :)

View file

@ -1,9 +1,9 @@
(: entity access maps (: entity access maps
: auto generated from xml files in entities folder at: 2019-01-23T21:27:22.427Z : auto generated from xml files in entities folder at: 2019-02-23T22:59:34.827Z
:) :)
module namespace entity = 'quodatum.models.generated'; module namespace entity = 'quodatum.models.generated';
import module namespace cfg = "quodatum:media.image.configure" at "config.xqm";declare namespace xqdoc='http://www.xqdoc.org/1.0'; import module namespace cfg = "quodatum:media.image.configure" at "features/images/config.xqm";declare namespace xqdoc='http://www.xqdoc.org/1.0';
declare namespace ent='https://github.com/Quodatum/app-doc/entity'; declare namespace ent='https://github.com/Quodatum/app-doc/entity';
declare namespace h='urn:quodatum:vue-poc.history'; declare namespace h='urn:quodatum:vue-poc.history';
declare namespace c='http://www.w3.org/ns/xproc-step'; declare namespace c='http://www.w3.org/ns/xproc-step';
@ -176,7 +176,7 @@ hof:top-k-by(admin:logs(), string#1, 2)
} }, } },
"data": function() as element(ent:field)* "data": function() as element(ent:field)*
{ collection("doc-doc")//ent:field }, { collection("doc-doc")/ent:entity/ent:fields/ent:field },
"views": map{ "views": map{
'filter': 'name description' 'filter': 'name description'
@ -254,7 +254,7 @@ hof:top-k-by(admin:logs(), string#1, 2)
} }, } },
"data": function() as element(ent:entity)* "data": function() as element(ent:entity)*
{ collection("vue-poc")//ent:entity }, { collection("vue-poc")/ent:entity },
"views": map{ "views": map{
'filter': 'name description' 'filter': 'name description'

View file

@ -27,5 +27,5 @@
<views iconclass="pin_drop"> <views iconclass="pin_drop">
<view name="filter">name description</view> <view name="filter">name description</view>
</views> </views>
<data type="element(ent:field)">collection("doc-doc")//ent:field</data> <data type="element(ent:field)">collection("doc-doc")/ent:entity/ent:fields/ent:field</data>
</entity> </entity>

View file

@ -55,5 +55,5 @@
<views iconclass="redeem"> <views iconclass="redeem">
<view name="filter">name description</view> <view name="filter">name description</view>
</views> </views>
<data type="element(ent:entity)">collection("vue-poc")//ent:entity</data> <data type="element(ent:entity)">collection("vue-poc")/ent:entity</data>
</entity> </entity>

View file

@ -4,9 +4,10 @@
"description": "A vue test", "description": "A vue test",
"dependencies": { "dependencies": {
"ace": "1.4.2", "ace": "1.4.2",
"vuetify": "1.4.2", "vuetify": "1.5.1",
"vue": "2.5.17", "vue": "2.6.7",
"vue-router": "2.5.3", "vuex": "3.0.1",
"vue-router": "3.0.2",
"vue-treeselect": "0.0.25", "vue-treeselect": "0.0.25",
"google-material": "0.0.0", "google-material": "0.0.0",
"js-beautify": "1.6.12", "js-beautify": "1.6.12",
@ -14,6 +15,6 @@
"qs": "6.4.0", "qs": "6.4.0",
"localforage": "1.7.1", "localforage": "1.7.1",
"momentjs": "2.18.1", "momentjs": "2.18.1",
"vue-form-generator": "2.2.2" "vuetify-jsonschema-form": "0.20.1"
} }
} }

View file

@ -82,11 +82,12 @@ const router = new VueRouter({
{ path: 'jobs', name:"jobs", component: Jobs, meta:{title:"Jobs running"} }, { path: 'jobs', name:"jobs", component: Jobs, meta:{title:"Jobs running"} },
{ path: 'jobs/:job', name:"jobShow", component: Job, props: true, meta:{title:"Job Status"} }, { path: 'jobs/:job', name:"jobShow", component: Job, props: true, meta:{title:"Job Status"} },
{ path: 'upload', component: Upload,meta:{title:"Upload"} },
{ path: 'settings', component: Basexsettings,meta:{title:"BaseX settings"} },
{ path: 'ping', component: Ping,meta:{title:"Ping"} }, { path: 'ping', component: Ping,meta:{title:"Ping"} },
{ path: 'dicetest', component: Dicetest,meta:{title:"Dice test"} }, { path: 'dicetest', component: Dicetest,meta:{title:"Dice test"} },
{ path: 'upload', component: Upload,meta:{title:"Upload"} },
{ path: 'websocket', component: Websocket,meta:{title:"Web socket"} },
{ path: 'settings', component: Basexsettings,meta:{title:"BaseX settings"} }
] ]
}, },
{ path: '/history', component: { template: '<router-view/>' } { path: '/history', component: { template: '<router-view/>' }
@ -103,11 +104,14 @@ const router = new VueRouter({
{ path: 'timeline', component: Timeline,meta:{title:"timeline"} }, { path: 'timeline', component: Timeline,meta:{title:"timeline"} },
{ path: 'tree', component: Tree, meta:{title:"tree"} }, { path: 'tree', component: Tree, meta:{title:"tree"} },
{ path: 'tree2', component: Tree2, meta:{title:"tree2"} }, { path: 'tree2', component: Tree2, meta:{title:"tree2"} },
{ path: 'form', component: Brutusin, meta:{title:"Form demo"} },
{ path: 'websocket', component: Websocket,meta:{title:"Web socket"} },
] ]
}, },
{ path: '/puzzle', component: Puzzle, meta:{title:"Jigsaw"} }, { path: '/puzzle', component: Puzzle, meta:{title:"Jigsaw"} },
{ path: '/html', component: Testhtml, meta:{title:"HTML test"} },
{ path: '/transform', component: Transform, meta:{title:"XSLT2 Transform"} }, { path: '/transform', component: Transform, meta:{title:"XSLT2 Transform"} },
{ path: '/validate', component: Validate, meta:{title:"Validate"} }, { path: '/validate', component: Validate, meta:{title:"Validate"} },
@ -126,10 +130,8 @@ const router = new VueRouter({
{ path: '/map', component: Leaflet,meta:{title:"map"} }, { path: '/map', component: Leaflet,meta:{title:"map"} },
{ path: '/form', component: Brutusin, meta:{title:"Form demo"} },
{ path: '/form2', component: Formsjson, meta:{title:"Form schema"} },
{ path: '/form3', component: Formsschema, meta:{title:"vue-form-json-schema"} },
{ path: '/about', component: About, meta:{title:"About Vue-poc"} }, { path: '/about', component: About, meta:{title:"About Vue-poc"} },
{ path: '*', component: Notfound, meta:{title:"Page not found"} } { path: '*', component: Notfound, meta:{title:"Page not found"} }

File diff suppressed because it is too large Load diff

View file

@ -10,10 +10,11 @@
<link rel="shortcut icon" href="/vue-poc/ui/icon.png"/> <link rel="shortcut icon" href="/vue-poc/ui/icon.png"/>
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic"/> <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic"/>
<link rel="stylesheet" href="//fonts.googleapis.com/icon?family=Material+Icons"/> <link rel="stylesheet" href="//fonts.googleapis.com/icon?family=Material+Icons"/>
<link rel="stylesheet" href="//unpkg.com/vuetify@1.5.0/dist/vuetify.min.css" type="text/css"/> <link rel="stylesheet" href="//unpkg.com/vuetify@1.5.4/dist/vuetify.min.css" type="text/css"/>
<link rel="stylesheet" href="//unpkg.com/@riophae/vue-treeselect@0.0.29/dist/vue-treeselect.min.css"/> <link rel="stylesheet" href="//unpkg.com/@riophae/vue-treeselect@0.0.29/dist/vue-treeselect.min.css"/>
<link rel="stylesheet" href="/vue-poc/ui/prism/prism.css" rel="stylesheet" type="text/css"/> <link rel="stylesheet" href="/vue-poc/ui/prism/prism.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="//unpkg.com/leaflet@1.0.3/dist/leaflet.css"/> <link rel="stylesheet" href="//unpkg.com/leaflet@1.0.3/dist/leaflet.css"/>
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@koumoul/vuetify-jsonschema-form@0.21.0/dist/main.css" />
<link href="/vue-poc/ui/app.css" rel="stylesheet" type="text/css"/> <link href="/vue-poc/ui/app.css" rel="stylesheet" type="text/css"/>
<link href="/vue-poc/ui/svg/d3-svg.css" rel="stylesheet" type="text/css"/> <link href="/vue-poc/ui/svg/d3-svg.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/vis/4.20.1/vis-timeline-graph2d.min.css" /> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/vis/4.20.1/vis-timeline-graph2d.min.css" />
@ -21,7 +22,7 @@
<body> <body>
<div id="app"> <div id="app">
<h3><code>vue-poc</code> <small>(v0.3.152)</small> </h3> <h3><code>vue-poc</code> <small>(v0.3.160)</small> </h3>
<div class="spinner"> <div class="spinner">
<div class="rect1"></div> <div class="rect1"></div>
@ -33,14 +34,15 @@
</div> </div>
</div> </div>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.21/vue.js" crossorigin="anonymous"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.6.7/vue.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vue-router/3.0.1/vue-router.js" crossorigin="anonymous"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/vue-router/3.0.2/vue-router.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.js" crossorigin="anonymous"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.js" crossorigin="anonymous"></script>
<script src="//unpkg.com/vuex@3.1.0/dist/vuex.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/qs/6.4.0/qs.js" crossorigin="anonymous" ></script> <script src="//cdnjs.cloudflare.com/ajax/libs/qs/6.4.0/qs.js" crossorigin="anonymous" ></script>
<script src="//unpkg.com/vuetify@1.5.0/dist/vuetify.min.js" crossorigin="anonymous"></script> <script src="//unpkg.com/vuetify@1.5.4/dist/vuetify.min.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.2/ace.js" crossorigin="anonymous"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.3/ace.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.2/ext-language_tools.js" crossorigin="anonymous"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.3/ext-language_tools.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.2/ext-linking.js" crossorigin="anonymous" charset="utf-8"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.3/ext-linking.js" crossorigin="anonymous" charset="utf-8"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/4.13.0/d3.js" crossorigin="anonymous"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/d3/4.13.0/d3.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/js-beautify/1.6.12/beautify.js" crossorigin="anonymous"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/js-beautify/1.6.12/beautify.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/js-beautify/1.6.12/beautify-css.js" crossorigin="anonymous"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/js-beautify/1.6.12/beautify-css.js" crossorigin="anonymous"></script>
@ -49,7 +51,6 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js" crossorigin="anonymous"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/vis/4.20.1/vis-timeline-graph2d.min.js" crossorigin="anonymous"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/vis/4.20.1/vis-timeline-graph2d.min.js" crossorigin="anonymous"></script>
<script src="//unpkg.com/vue-clip@1.0.0/dist/vue-clip.js" crossorigin="anonymous"></script> <script src="//unpkg.com/vue-clip@1.0.0/dist/vue-clip.js" crossorigin="anonymous"></script>
<script src="//unpkg.com/vue-jstree@2.1.6/dist/vue-jstree.js" crossorigin="anonymous"></script>
<script src="//unpkg.com/@riophae/vue-treeselect@0.0.29/dist/vue-treeselect.min.js" crossorigin="anonymous"></script> <script src="//unpkg.com/@riophae/vue-treeselect@0.0.29/dist/vue-treeselect.min.js" crossorigin="anonymous"></script>
<script src="/vue-poc/ui/prism/prism.js" crossorigin="anonymous"></script> <script src="/vue-poc/ui/prism/prism.js" crossorigin="anonymous"></script>
@ -58,11 +59,11 @@
<script src="//unpkg.com/leaflet@1.0.3/dist/leaflet.js" crossorigin="anonymous"></script> <script src="//unpkg.com/leaflet@1.0.3/dist/leaflet.js" crossorigin="anonymous"></script>
<script src="//unpkg.com/vue2-leaflet@1.0.2/dist/vue2-leaflet.js" crossorigin="anonymous"></script> <script src="//unpkg.com/vue2-leaflet@1.0.2/dist/vue2-leaflet.js" crossorigin="anonymous"></script>
<script src="//unpkg.com/vue-form-generator@2.2.2/dist/vfg-core.js" crossorigin="anonymous"></script> <script src="//cdn.jsdelivr.net/npm/@koumoul/vuetify-jsonschema-form@0.21.0/dist/main.js" crossorigin="anonymous"></script>
<script src="//unpkg.com/vue-json-schema@1.1.1/dist/vue-json-schema.js" crossorigin="anonymous"></script>
<script src="//unpkg.com/vue-form-json-schema@1.15.3/dist/vue-form-json-schema.umd.js" crossorigin="anonymous"></script>
<script src="//unpkg.com/vue-native-websocket@2.0.8/dist/build.js" crossorigin="anonymous"></script> <script src="//unpkg.com/vue-native-websocket@2.0.8/dist/build.js" crossorigin="anonymous"></script>
<script src="/vue-poc/ui/svg/d3-svg.js"></script> <script src="/vue-poc/ui/svg/d3-svg.js"></script>
<script src="/vue-poc/ui/state.js"></script>
<script src="/vue-poc/ui/perf-stat.js"></script> <script src="/vue-poc/ui/perf-stat.js"></script>
<script src="/vue-poc/ui/app-gen.js"></script> <script src="/vue-poc/ui/app-gen.js"></script>
<script> <script>

View file

@ -0,0 +1,40 @@
# xvrl
Extensible Validation Report Language
Schema, documentation and other resources for a generalized and extensible validation report language. It should incorporate main concepts that can be expressed in SVRL (Schematron Validation Report Language) and the output of other XML validators such as Jing for Relax NG or Xerces for XML Schema (XSD).
## Data Formats to be Validated
XVRL documents should not be limited to hold XML validation reports. It may be extended to hold also JSON Schema validation reports.
Messages from epubcheck should also be representable in XVRL.
## Locators
For individual XML files, the canonical error locator will be a hierarchical XPath expression. The paths should support several syntaxes that are already supported by SVRL, plus maybe an EQname (`Q{namespace-uri}local-name`) syntax.
For JSON documents, multiple locator syntaxes may be supported (JsonPath, JSON Pointer, XPath map/array selectors, …).
Locators should also be extensible to files that reside in archives.
A special and optional locator attribute called `@provenance` or `@srcpath` may hold the location in the original file, in a multi-step conversion pipeline. (For example, `file:///C:/myfile.docx!word/document.xml?xpath=/w:document/w:body/w:p[12]` the actual syntax and semantics of this attribute are not strictly specified)
## Syntaxes for Reports
A report document may be made available in an alternative JSON syntax.
XVRL messages can be given in plain text, XML (including XHTML), or JSON (which, if embedded in XML, appears as plain text but may be interpreted by an XPath-3.1-compliant report renderer if the text nodes are declared as containing JSON by some attribute).
## Localization
XVRL should be able to hold versions of a message in multiple natural languages.
There may also be a simple templating mechanism that can replace placeholders in natural-language messages with more formalized information that is somehow stored alongside the message. This allows late localization, while conventionally, in SVRL, messages are stored fully localized. In XVRL, all three approaches should be supported: All messages in a single language
## Severity
In contrast to Schematron/SVRL, there should be a fixed severity vocabulary (fatal-error, error, warning, info), and the severity should be an attribute called 'severity', not 'role'.
## Other Attributes
Reports may contain any other attributes unless they are in the `xml` and `xvrl` namespaces. (Namespace URI for `xvrl` still to be determined.)

View file

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="../schema/xvrl.rnc" type="application/relax-ng-compact-syntax"?>
<validation-reports xmlns="http://www.xproc.org/ns/xvrl"
xmlns:xvrl="http://www.xproc.org/ns/xvrl">
<metadata>
<timestamp>2017-12-04T12:21:37.381+01:00</timestamp>
</metadata>
<validation-report valid="false" errors="2" warnings="0">
<metadata>
<validator name="jing" version="1.0"/>
<schema href="xxx.rng" schematypens="http://relaxng.org/ns/structure/1.0" version="1.0"/>
</metadata>
<report severity="error" code="error-code-xxx">
<location xpath="/foo/bar[1]/test[1]" line="11" column="22"/>
<message xml:lang="en">Error message</message>
<message xml:lang="fr">Message derreur</message>
</report>
<report severity="error" code="invalid_attribute_value">
<location xpath="/foo/bar[1]/test[2]" line="12" column="24"/>
<message xml:lang="en">value of attribute "test" is invalid; must be equal to "xxx" or "yyy"</message>
<message xml:lang="fr">La valeur de l'attribut "test" est invalide ; doit être égale à "xxx" ou "yyy"</message>
</report>
</validation-report>
<validation-report valid="false" errors="2" warnings="0">
<metadata>
<validator name="saxon" version="9.8"/>
<schema href="my-schema.xsd" schematypens="http://www.w3.org/2001/XMLSchema" version="1.1"/>
</metadata>
<report severity="error" code="invalid_attribute_value">
<location xpath="/foo/bar[1]/test[2]" line="8" column="20"/>
<message xml:lang="en">value of attribute "test" is invalid; must be equal to "xxx" or "yyy"</message>
<message xml:lang="fr">La valeur de l'attribut "test" est invalide ; doit être égale à "xxx" ou "yyy"</message>
</report>
<report severity="error" code="invalid_attribute_value">
<location xpath="/foo/bar[1]/test[3]" line="16" column="12"/>
<message xml:lang="en">value of attribute "test" is invalid; must be equal to "xxx" or "yyy"</message>
<message xml:lang="fr">La valeur de l'attribut "test" est invalide ; doit être égale à "xxx" ou "yyy"</message>
</report>
</validation-report>
<validation-report valid="false" errors="2" warnings="0">
<metadata>
<validator name="saxon" version="9.8"/>
<schema href="my-schema.sch" schematypens="http://xml.ascc.net/schematron/" version="1.5"/>
</metadata>
<report severity="error" code="bad-col-number">
<location line="8" column="20" xpath="/foo/bar[1]/table[1]"/>
<message xml:lang="en">Number of column is not correct</message>
<message xml:lang="fr">Le nombre de colonnes n'est pas correct</message>
</report>
<report severity="warning" code="sum-cols-should-be-100">
<location line="26" column="17" xpath="/foo/bar[1]/table[1]"/>
<message xml:lang="en"><p xmlns="http://www.w3.org/1999/xhtml">The sum of these column values should be equal to 100</p></message>
<message xml:lang="fr"><p xmlns="http://www.w3.org/1999/xhtml">La somme des valeurs de cette colonnes devrait être égale à 100</p></message>
</report>
<report severity="warning" code="sum-cols">
<location line="26" column="17" xpath="/foo/bar[1]/table[1]"/>
<let name="target" value="100"/>
<message xml:lang="en" template="true">The sum of these column values should be equal <value xmlns="http://www.xproc.org/ns/xvrl" name="target"/>.</message>
<message xml:lang="fr" template="true">La somme des valeurs de cette colonnes devrait être égale à <value name="target"/>.</message>
</report>
</validation-report>
</validation-reports>

View file

@ -0,0 +1,173 @@
# Schema for XML Validation Report Language; adapted from a proposal
# by Matthieu Ricaud incorporating some suggestions by Gerrit Imsieke
# See https://github.com/xproc/3.0-steps/issues/15
datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes"
namespace xvrl = "http://www.xproc.org/ns/xvrl"
default namespace = "http://www.xproc.org/ns/xvrl"
namespace local = ""
start = validation-reports
xmllang.attr = attribute xml:lang { xsd:language }
xmlid.attr = attribute xml:id { xsd:ID }
xmlbase.attr = attribute xml:base { xsd:anyURI }
anyother.attr = attribute (* - (local:* | xvrl:* | xml:*)) { text }
any.attr = attribute (* - xvrl:*) { text }
message.attr = attribute (* - (xvrl:* | xml:*)) { text }
common.attr = xmllang.attr? & xmlid.attr? & xmlbase.attr? & anyother.attr*
any.element =
element (* - xvrl:*) {
(any.attr | text | any.element)*
}
message.element =
element (* - (xvrl:* - xvrl:value)) {
(message.attr | text | message.element | value)*
}
validation-reports =
element validation-reports {
common.attr,
attribute href { xsd:anyURI }?,
validation-reports.metadata,
validation-report+
}
validation-reports.metadata =
element metadata {
common.attr,
timestamp?,
title*,
summary*,
category*,
any.element*
}
validation-report =
element validation-report {
common.attr,
attribute valid { xsd:boolean },
attribute errors { xsd:integer }?,
attribute warnings { xsd:integer }?,
attribute href { xsd:anyURI }?,
validation-report.metadata,
report+
}
validation-report.metadata =
element metadata {
common.attr,
timestamp?,
validator,
title*,
summary*,
category*,
schema*,
any.element*
}
report =
element report {
common.attr,
attribute severity { "info" | "warning" | "error" | "fatal-error" },
attribute href { xsd:anyURI }?,
attribute code { text }?,
location?,
let*,
title*,
summary*,
category*,
message+,
supplemental*
}
location =
element location {
(
attribute xpath {
xsd:string { pattern = "/?([^/]+/)*[^/]+" }?
}
|
(
# these are different syntaxes to address JSON documents:
attribute xpath-map-array { xsd:string }
| attribute json-pointer { xsd:string }
| attribute JsonPath { xsd:string }
)
)?,
attribute line { xsd:positiveInteger }?,
attribute column { xsd:positiveInteger }?,
attribute provenance { xsd:string }?
}
message =
element message {
common.attr,
attribute template { xsd:boolean }?,
(text | message.element)*
}
let =
element let {
common.attr,
attribute name { xsd:QName },
(attribute value {xsd:string} | (text | any.element))*
}
value =
element value {
common.attr,
attribute name { xsd:QName }
}
supplemental =
element supplemental {
common.attr,
(text | any.element)*
}
validator =
element validator {
common.attr,
attribute name { text },
attribute version { text }?
}
schema =
element schema {
common.attr,
attribute href { xsd:anyURI }?,
attribute schematypens { xsd:anyURI },
attribute version { text }?
}
title =
element title {
common.attr,
(text | any.element)*
}
summary =
element summary {
common.attr,
(text | any.element)*
}
category =
element category {
common.attr,
(text | any.element)*
}
timestamp =
element timestamp {
common.attr,
xsd:dateTime
}

View file

@ -0,0 +1,11 @@
//
const store = new Vuex.Store({
state: {
count: 0
},
mutations: {
increment (state) {
state.count++
}
}
})