diff --git a/src/vue-poc/data/vue-poc/entities/quodatum/cmpx.xml b/src/vue-poc/data/vue-poc/entities/quodatum/cmpx.xml
new file mode 100644
index 0000000..677fb81
--- /dev/null
+++ b/src/vue-poc/data/vue-poc/entities/quodatum/cmpx.xml
@@ -0,0 +1,24 @@
+
+ Cmpx library components
+
+
+
+ name of component
+ @name
+
+
+ browser or ??
+ cmpx:type
+
+
+ url for component
+ cmpx:home
+
+
+ description of component
+ cmpx:description
+
+
+
+ collection('~qd-cmpx')/cmpx:cmp
+
\ No newline at end of file
diff --git a/src/vue-poc/features/collection/components.vue b/src/vue-poc/features/collection/components.vue
new file mode 100644
index 0000000..daf5757
--- /dev/null
+++ b/src/vue-poc/features/collection/components.vue
@@ -0,0 +1,34 @@
+
+
+
+
+ AAA
+
+
+ {{ item.home }}
+
+
+
+
+ No matching results.
+
+
+
+ No matching items.
+
+
+
+
+
\ No newline at end of file
diff --git a/src/vue-poc/features/edit/tabs.vue b/src/vue-poc/features/edit/tabs.vue
index d38e01d..07c0592 100644
--- a/src/vue-poc/features/edit/tabs.vue
+++ b/src/vue-poc/features/edit/tabs.vue
@@ -157,7 +157,8 @@
+ :mode="item.mode" :wrap="wrap" :settings="aceSettings" v-on:annotation="annotation"
+ placeholder="Type..">
diff --git a/src/vue-poc/features/eval/eval.vue b/src/vue-poc/features/eval/eval.vue
index 6bea75e..b9dd4a0 100644
--- a/src/vue-poc/features/eval/eval.vue
+++ b/src/vue-poc/features/eval/eval.vue
@@ -63,7 +63,7 @@
@@ -74,7 +74,8 @@
-
@@ -90,7 +91,7 @@
data: function(){
return {
- xq: '(: type your XQuery :)\n',
+ xq: null,
result: '',
done: false,
elapsed: null,
@@ -212,6 +213,7 @@
},
computed: {
},
+
beforeRouteEnter (to, from, next) {
Settings.getItem('settings/ace')
.then( v =>{
@@ -221,9 +223,15 @@
vm.aceSettings = v;
})})
},
+
+ beforeRouteLeave (to, from, next) {
+ localforage.setItem('eval/xq',this.xq);
+ next()
+ },
+
created:function(){
console.log("eval: creatd");
- localforage.getItem('eval/xq').then((value) => { this.xq=value || this.xq});
+ localforage.getItem('eval/xq').then((value) => { this.xq= value || this.xq});
},
beforeDestroy:function(){
this.destroyed=true;
diff --git a/src/vue-poc/features/history/taskhistory.vue b/src/vue-poc/features/history/taskhistory.vue
index c1bd608..019b37b 100644
--- a/src/vue-poc/features/history/taskhistory.vue
+++ b/src/vue-poc/features/history/taskhistory.vue
@@ -64,8 +64,8 @@
q: null,
headers: [
{ text: 'Id', value: 'id' },
- { text: 'Task', value: 'task' },
{ text: 'Created', value: 'created' },
+ { text: 'Task', value: 'task' },
{ text: 'Summary', value: 'summary' },
{ text: 'Params', value: 'arity' }
]
diff --git a/src/vue-poc/features/model/entity.vue b/src/vue-poc/features/model/entity.vue
index ea6f3cf..a28e0ed 100644
--- a/src/vue-poc/features/model/entity.vue
+++ b/src/vue-poc/features/model/entity.vue
@@ -36,28 +36,30 @@
-
-
+
+
-
+
-
+
-
-
+
+
{{ item.iconclass }}
- {{ item.name }}
-
+ {{ item.name }}
-
-
- {{ item.nfields }}
-
{{ item.description }}
+
+
+ Fields: {{ item.nfields }}
+
+ Xml
+ Json
+
@@ -82,7 +84,7 @@
methods:{
getItems(){
this.loading=true
- HTTP.get("data/entity",{params:{q:this.q}})
+ HTTP.get("data/entity",{params:{q:this.q, sort:'name'}})
.then(r=>{
this.loading=false
//console.log(r.data)
diff --git a/src/vue-poc/models.gen.xqm b/src/vue-poc/models.gen.xqm
index a27510c..7f7fd43 100644
--- a/src/vue-poc/models.gen.xqm
+++ b/src/vue-poc/models.gen.xqm
@@ -1,5 +1,5 @@
(: entity access maps
- : auto generated from xml files in entities folder at: 2020-11-27T21:35:19.672Z
+ : auto generated from xml files in entities folder at: 2021-01-13T22:12:01.894Z
:)
module namespace entity = 'quodatum.models.generated';
@@ -8,6 +8,7 @@ declare namespace ent='https://github.com/Quodatum/app-doc/entity';
declare namespace h='urn:quodatum:vue-poc.history';
declare namespace xqdoc='http://www.xqdoc.org/1.0';
declare namespace qns='https://github.com/Quodatum/namespaces';
+declare namespace cmpx='urn:quodatum:qd-cmpx:component';
declare namespace t='https://github.com/Quodatum/task';
declare namespace c='http://www.w3.org/ns/xproc-step';
@@ -734,6 +735,44 @@ hof:top-k-by(admin:logs(), string#1, 2)
"views": map{
'filter': 'name description'
+ }
+ },
+ "quodatum.cmpx": map{
+ "name": "quodatum.cmpx",
+ "description": "Cmpx library components ",
+ "access": map{
+'description': function($_ as element(cmpx:cmp)) as xs:string { $_! cmpx:description },
+'home': function($_ as element(cmpx:cmp)) as xs:string { $_! cmpx:home },
+'name': function($_ as element(cmpx:cmp)) as xs:string { $_! @name },
+'type': function($_ as element(cmpx:cmp)) as xs:string { $_! cmpx:type } },
+
+ "filter": function($item,$q) as xs:boolean{
+ some $e in ( ) satisfies
+ fn:contains($e,$q, 'http://www.w3.org/2005/xpath-functions/collation/html-ascii-case-insensitive')
+ },
+ "json": map{
+ "description": function($_ as element(cmpx:cmp)) as element(description)? {
+ (: xs:string :)
+ fn:data($_!cmpx:description)!element description { .}
+ },
+ "home": function($_ as element(cmpx:cmp)) as element(home)? {
+ (: xs:string :)
+ fn:data($_!cmpx:home)!element home { .}
+ },
+ "name": function($_ as element(cmpx:cmp)) as element(name)? {
+ (: xs:string :)
+ fn:data($_!@name)!element name { .}
+ },
+ "type": function($_ as element(cmpx:cmp)) as element(type)? {
+ (: xs:string :)
+ fn:data($_!cmpx:type)!element type { .}
+ } },
+
+ "data": function() as element(cmpx:cmp)*
+ { collection('~qd-cmpx')/cmpx:cmp },
+
+ "views": map{
+
}
},
"quodatum.logfile": map{
diff --git a/src/vue-poc/router.js b/src/vue-poc/router.js
index 1dee459..77cd852 100644
--- a/src/vue-poc/router.js
+++ b/src/vue-poc/router.js
@@ -16,8 +16,27 @@ const router = new VueRouter({
},
routes: [
{ path: '/', component: Home, meta:{title:"Home"} },
- { path: '/session', component: Session ,meta: {title:"Session"}},
-
+
+ { path: '/about', component: { template: '' } ,children:[
+ {path: '', component: About, meta:{title:"About Vue-poc"} },
+ {path: 'package', component: Package, meta:{title:"Javascript components"} },
+ {path: 'routes', component: Routes, meta:{title:"Routes"} },
+ {path: 'routes2', name: 'routes', component: Routes2, meta:{title:"Routes2"} },
+ {path: 'vue-cmps', component: VueComps, meta:{title:"Vue components"} },
+ ]},
+
+ { path: '/components', component: Components,meta:{title:"Components"},props:{protocol:"xmldb"} },
+
+ { path: '/database', component: Files,meta:{title:"Databases"},props:{protocol:"xmldb"} },
+ { path: '/documentation', component: Documentation, meta:{title:"documentation"} },
+ { path: '/documentation/xqdoc', component: Xqdocs, meta:{title:"XQdoc"} },
+
+ { path: '/edit', name: "edit",component: Edit,meta:{title:"Ace editor"} },
+ { path: '/eval', component: Eval, meta:{title:"Evaluate XQuery"} },
+ { path: '/eval/:id', component: Evalid, props: true, meta:{title:"Run details"} },
+
+ { path: '/files', component: Files,meta:{title:"File system"},props:{protocol:"webfile"} },
+
{path: '/images', component: { template: '' },
children: [
{path: '', redirect: 'item' },
@@ -31,8 +50,7 @@ const router = new VueRouter({
]},
- { path: '/documentation', component: Documentation, meta:{title:"documentation"} },
- { path: '/documentation/xqdoc', component: Xqdocs, meta:{title:"XQdoc"} },
+
{ path: '/logdate', component: Basexlogdate, meta:{title:"log files"} },
{ path: '/logdate/:date', component: Basexlogdate1, props:true, meta:{title:"log files"} },
@@ -58,15 +76,13 @@ const router = new VueRouter({
]
}
]},
-
+ { path: '/session', component: Session ,meta: {title:"Session"}},
{ path: '/select', component: Select, meta:{title:"Select"} },
{ path: '/search', component: Search, meta:{title:"Search"} },
{ path: '/tabs', name: "multi-edit", component: Tabs,meta:{title:"tab test"} },
-
- { path: '/edit', name: "edit",component: Edit,meta:{title:"Ace editor"} },
-
- { path: '/files', component: Files,meta:{title:"File system"},props:{protocol:"webfile"} },
- { path: '/database', component: Files,meta:{title:"Databases"},props:{protocol:"xmldb"} },
+
+
+
{ path: '/login', component: Login,meta:{title:"login"} },
{ path: '/settings', component: { template: '' }
@@ -89,10 +105,10 @@ const router = new VueRouter({
},
{ path: '/performance', component: { template: '' }
- ,children: [
- { path: 'ping', component: Ping, meta:{title:"Ping"} },
- { path: 'dicetest', component: Dicetest, meta:{title: "Dice test"} }
- ]
+ ,children: [
+ { path: 'ping', component: Ping, meta:{title:"Ping"} },
+ { path: 'dicetest', component: Dicetest, meta:{title: "Dice test"} }
+ ]
},
{ path: '/server', component: { template: '' }
@@ -152,8 +168,7 @@ const router = new VueRouter({
{ path: '/transform', component: Transform, meta:{title:"XSLT2 Transform"} },
{ path: '/validate', component: Validate, meta:{title:"Validate"} },
- { path: '/eval', component: Eval, meta:{title:"Evaluate XQuery"} },
- { path: '/eval/:id', component: Evalid, props: true, meta:{title:"Run details"} },
+
{ path: '/logs', component: Log, meta:{title:"Server logs"} },
@@ -170,13 +185,7 @@ const router = new VueRouter({
{ path: '/map', component: Leaflet,meta:{title:"map"} },
- { path: '/about', component: { template: '' } ,children:[
- {path: '', component: About, meta:{title:"About Vue-poc"} },
- {path: 'package', component: Package, meta:{title:"Javascript components"} },
- {path: 'routes', component: Routes, meta:{title:"Routes"} },
- {path: 'routes2', name: 'routes', component: Routes2, meta:{title:"Routes2"} },
- {path: 'vue-cmps', component: VueComps, meta:{title:"Vue components"} },
- ]},
+
{ path: '*', component: Notfound, meta:{title:"Page not found"} }
],
diff --git a/src/vue-poc/static/app-gen.js b/src/vue-poc/static/app-gen.js
index 99fc550..851af7d 100644
--- a/src/vue-poc/static/app-gen.js
+++ b/src/vue-poc/static/app-gen.js
@@ -1,4 +1,4 @@
-// generated 2021-01-13T18:11:28.088Z
+// generated 2021-01-14T23:08:56.115Z
// src: C:\Users\andy\git\vue-poc\src\vue-poc\imports.js
import { parseISO, formatDistanceToNow, format, roundToNearestMinutes, addSeconds } from 'https://cdn.jsdelivr.net/npm/date-fns@2.16.1/+esm';
@@ -766,6 +766,7 @@ Vue.component('vis-time-line',{template:`
data(){
return {timeline:Object}
},
+
methods:{
select(properties){
this.$emit('select',properties.items);
@@ -777,6 +778,7 @@ Vue.component('vis-time-line',{template:`
this.timeline.fit(true)
}
},
+
watch:{
items(newItems){
console.log("vis-time-line: new items:" + newItems.length)
@@ -786,8 +788,8 @@ Vue.component('vis-time-line',{template:`
console.log("opts: ",newOpts)
}
},
+
mounted: function () {
-
var options = this.options;
var groups = this.groups;
var items = new vis.DataSet(this.items);
@@ -1212,7 +1214,8 @@ Vue.component('vue-ace',{template:`
'settings',
'minLines',
'completer',
- 'snippets'
+ 'snippets',
+ 'placeholder'
],
data () {
return {
@@ -1223,9 +1226,9 @@ Vue.component('vue-ace',{template:`
themeDark: "chaos",
keybinding: "ace",
fontsize: 16,
- enableSnippets:true,
- enableBasicAutocompletion:true,
- enableLiveAutocompletion:true
+ enableSnippets: true,
+ enableBasicAutocompletion: true,
+ enableLiveAutocompletion: true
},
annots:{
@@ -1293,10 +1296,10 @@ Vue.component('vue-ace',{template:`
},
applySettings(aceSettings){
- var theme=this.$vuetify.theme.dark?aceSettings.themeDark:aceSettings.theme;
- this.editor.setTheme(`ace/theme/${theme}`)
+ this.editor.setTheme()
//this.editor.setKeyboardHandler(`ace/keyboard//${aceSettings.keybinding}`)
this.editor.setFontSize(parseInt(aceSettings.fontsize,10))
+ this.editor.setOption("placeholder", this.placeholder)
this.editor.setOptions({
enableSnippets : aceSettings.enableSnippets,
enableBasicAutocompletion : aceSettings.enableBasicAutocompletion,
@@ -1305,6 +1308,7 @@ Vue.component('vue-ace',{template:`
useSoftTabs: true
});
}
+
},
@@ -1362,6 +1366,9 @@ Vue.component('vue-ace',{template:`
this.$emit('token', token);
});
+ //this.editor.on("input", this.update);
+ //setTimeout(this.update, 100);
+
if(this.events){
this.events.$on('eventFired', (cmd) => {
if(cmd=="outline"){
@@ -2686,6 +2693,42 @@ const Log=Vue.extend({template:`
);
+// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/collection/components.vue
+const Components=Vue.extend({template:`
+
+
+ AAA
+
+
+ {{ item.home }}
+
+
+
+
+ No matching results.
+
+
+
+ No matching items.
+
+
+
+ `,
+
+ data: function(){
+ return {
+ headers: [
+ { text: 'name', value: 'name'},
+ { text: 'type', value: 'type' },
+ { text: 'home', value: 'home' },
+ { text: 'description', value: 'description' }
+ ]
+ }
+ }
+}
+
+ );
+
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/collection/documentation.vue
const Documentation=Vue.extend({template:`
@@ -4014,7 +4057,7 @@ const Tabs=Vue.extend({template:`
-
+
@@ -4246,7 +4289,7 @@ const Eval=Vue.extend({template:`
-
+
@@ -4270,7 +4313,7 @@ const Eval=Vue.extend({template:`
data: function(){
return {
- xq: '(: type your XQuery :)\n',
+ xq: null,
result: '',
done: false,
elapsed: null,
@@ -4392,6 +4435,7 @@ const Eval=Vue.extend({template:`
},
computed: {
},
+
beforeRouteEnter (to, from, next) {
Settings.getItem('settings/ace')
.then( v =>{
@@ -4401,9 +4445,15 @@ const Eval=Vue.extend({template:`
vm.aceSettings = v;
})})
},
+
+ beforeRouteLeave (to, from, next) {
+ localforage.setItem('eval/xq',this.xq);
+ next()
+ },
+
created:function(){
console.log("eval: creatd");
- localforage.getItem('eval/xq').then((value) => { this.xq=value || this.xq});
+ localforage.getItem('eval/xq').then((value) => { this.xq= value || this.xq});
},
beforeDestroy:function(){
this.destroyed=true;
@@ -4652,8 +4702,8 @@ const Taskhistory=Vue.extend({template:`
q: null,
headers: [
{ text: 'Id', value: 'id' },
- { text: 'Task', value: 'task' },
{ text: 'Created', value: 'created' },
+ { text: 'Task', value: 'task' },
{ text: 'Summary', value: 'summary' },
{ text: 'Params', value: 'arity' }
]
@@ -6005,26 +6055,28 @@ const Entity=Vue.extend({template:`
-
-
+
+
-
+
-
+
-
-
+
+
{{ item.iconclass }}
- {{ item.name }}
-
+ {{ item.name }}
-
-
- {{ item.nfields }}
-
{{ item.description }}
+
+
+ Fields: {{ item.nfields }}
+
+ Xml
+ Json
+
@@ -6048,7 +6100,7 @@ const Entity=Vue.extend({template:`
methods:{
getItems(){
this.loading=true
- HTTP.get("data/entity",{params:{q:this.q}})
+ HTTP.get("data/entity",{params:{q:this.q, sort:'name'}})
.then(r=>{
this.loading=false
//console.log(r.data)
@@ -8754,8 +8806,27 @@ const router = new VueRouter({
},
routes: [
{ path: '/', component: Home, meta:{title:"Home"} },
- { path: '/session', component: Session ,meta: {title:"Session"}},
-
+
+ { path: '/about', component: { template: '' } ,children:[
+ {path: '', component: About, meta:{title:"About Vue-poc"} },
+ {path: 'package', component: Package, meta:{title:"Javascript components"} },
+ {path: 'routes', component: Routes, meta:{title:"Routes"} },
+ {path: 'routes2', name: 'routes', component: Routes2, meta:{title:"Routes2"} },
+ {path: 'vue-cmps', component: VueComps, meta:{title:"Vue components"} },
+ ]},
+
+ { path: '/components', component: Components,meta:{title:"Components"},props:{protocol:"xmldb"} },
+
+ { path: '/database', component: Files,meta:{title:"Databases"},props:{protocol:"xmldb"} },
+ { path: '/documentation', component: Documentation, meta:{title:"documentation"} },
+ { path: '/documentation/xqdoc', component: Xqdocs, meta:{title:"XQdoc"} },
+
+ { path: '/edit', name: "edit",component: Edit,meta:{title:"Ace editor"} },
+ { path: '/eval', component: Eval, meta:{title:"Evaluate XQuery"} },
+ { path: '/eval/:id', component: Evalid, props: true, meta:{title:"Run details"} },
+
+ { path: '/files', component: Files,meta:{title:"File system"},props:{protocol:"webfile"} },
+
{path: '/images', component: { template: '' },
children: [
{path: '', redirect: 'item' },
@@ -8769,8 +8840,7 @@ const router = new VueRouter({
]},
- { path: '/documentation', component: Documentation, meta:{title:"documentation"} },
- { path: '/documentation/xqdoc', component: Xqdocs, meta:{title:"XQdoc"} },
+
{ path: '/logdate', component: Basexlogdate, meta:{title:"log files"} },
{ path: '/logdate/:date', component: Basexlogdate1, props:true, meta:{title:"log files"} },
@@ -8796,15 +8866,13 @@ const router = new VueRouter({
]
}
]},
-
+ { path: '/session', component: Session ,meta: {title:"Session"}},
{ path: '/select', component: Select, meta:{title:"Select"} },
{ path: '/search', component: Search, meta:{title:"Search"} },
{ path: '/tabs', name: "multi-edit", component: Tabs,meta:{title:"tab test"} },
-
- { path: '/edit', name: "edit",component: Edit,meta:{title:"Ace editor"} },
-
- { path: '/files', component: Files,meta:{title:"File system"},props:{protocol:"webfile"} },
- { path: '/database', component: Files,meta:{title:"Databases"},props:{protocol:"xmldb"} },
+
+
+
{ path: '/login', component: Login,meta:{title:"login"} },
{ path: '/settings', component: { template: '' }
@@ -8827,10 +8895,10 @@ const router = new VueRouter({
},
{ path: '/performance', component: { template: '' }
- ,children: [
- { path: 'ping', component: Ping, meta:{title:"Ping"} },
- { path: 'dicetest', component: Dicetest, meta:{title: "Dice test"} }
- ]
+ ,children: [
+ { path: 'ping', component: Ping, meta:{title:"Ping"} },
+ { path: 'dicetest', component: Dicetest, meta:{title: "Dice test"} }
+ ]
},
{ path: '/server', component: { template: '' }
@@ -8890,8 +8958,7 @@ const router = new VueRouter({
{ path: '/transform', component: Transform, meta:{title:"XSLT2 Transform"} },
{ path: '/validate', component: Validate, meta:{title:"Validate"} },
- { path: '/eval', component: Eval, meta:{title:"Evaluate XQuery"} },
- { path: '/eval/:id', component: Evalid, props: true, meta:{title:"Run details"} },
+
{ path: '/logs', component: Log, meta:{title:"Server logs"} },
@@ -8908,13 +8975,7 @@ const router = new VueRouter({
{ path: '/map', component: Leaflet,meta:{title:"map"} },
- { path: '/about', component: { template: '' } ,children:[
- {path: '', component: About, meta:{title:"About Vue-poc"} },
- {path: 'package', component: Package, meta:{title:"Javascript components"} },
- {path: 'routes', component: Routes, meta:{title:"Routes"} },
- {path: 'routes2', name: 'routes', component: Routes2, meta:{title:"Routes2"} },
- {path: 'vue-cmps', component: VueComps, meta:{title:"Vue components"} },
- ]},
+
{ path: '*', component: Notfound, meta:{title:"Page not found"} }
],
@@ -8974,7 +9035,7 @@ const Vuepoc=Vue.extend({template:`
-
+
{{$route.meta.title}}
@@ -9037,7 +9098,7 @@ const Vuepoc=Vue.extend({template:`
-
+
@@ -9048,7 +9109,9 @@ const Vuepoc=Vue.extend({template:`
-
+
+ keyboard_arrow_up
+
`,
@@ -9066,6 +9129,7 @@ const Vuepoc=Vue.extend({template:`
drawer: true,
showNotifications: false,
mini: false,
+ fab: false,
alert: {show:false,msg:"Hello"},
frmfav: false,
@@ -9099,6 +9163,7 @@ const Vuepoc=Vue.extend({template:`
children: [
{href: '/database', text: 'Databases',icon: 'developer_mode' },
{href: '/files', text: 'File system',icon: 'folder' },
+ {href: '/components', text: 'Component library',icon: 'engineering' },
{href: '/documentation', text: 'Documentation',icon: 'library_books' },
{href: '/history/files',text: 'history',icon: 'history'}
]},
@@ -9202,7 +9267,15 @@ const Vuepoc=Vue.extend({template:`
showAlert(msg){
this.alert.msg=format(new Date())+" "+ msg
this.alert.show=true
- }
+ },
+ onScroll (e) {
+ if (typeof window === 'undefined') return
+ const top = window.pageYOffset || e.target.scrollTop || 0
+ this.fab = top > 20
+ },
+ toTop () {
+ this.$vuetify.goTo(0)
+ }
},
watch: {
showNotifications: function (val) {