diff --git a/src/vue-poc/app.vue b/src/vue-poc/app.vue index c6f22bb..f493f4a 100644 --- a/src/vue-poc/app.vue +++ b/src/vue-poc/app.vue @@ -175,8 +175,8 @@ model: false, children: [ - {href: '/form',text: 'Forms',icon: 'format_list_bulleted' }, - {href: '/form2',text: 'Forms 2',icon: 'format_list_bulleted' }, + {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' } ]}, { diff --git a/src/vue-poc/components/fullscreen.js b/src/vue-poc/components/fullscreen.js new file mode 100644 index 0000000..7c60a12 --- /dev/null +++ b/src/vue-poc/components/fullscreen.js @@ -0,0 +1,39 @@ +// https://stackoverflow.com/questions/36672561/how-to-exit-fullscreen-onclick-using-javascript +const Fullscreen={ + isInFullScreen(){ + return (document.fullscreenElement && document.fullscreenElement !== null) || + (document.webkitFullscreenElement && document.webkitFullscreenElement !== null) || + (document.mozFullScreenElement && document.mozFullScreenElement !== null) || + (document.msFullscreenElement && document.msFullscreenElement !== null); + }, + toggle(){ + var docElm = document.documentElement; + if (!this.isInFullScreen()) { + if (docElm.requestFullscreen) { + docElm.requestFullscreen(); + } else if (docElm.mozRequestFullScreen) { + docElm.mozRequestFullScreen(); + } else if (docElm.webkitRequestFullScreen) { + docElm.webkitRequestFullScreen(); + } else if (docElm.msRequestFullscreen) { + docElm.msRequestFullscreen(); + } + } else { + if (document.exitFullscreen) { + document.exitFullscreen(); + } else if (document.webkitExitFullscreen) { + document.webkitExitFullscreen(); + } else if (document.mozCancelFullScreen) { + document.mozCancelFullScreen(); + } else if (document.msExitFullscreen) { + document.msExitFullscreen(); + } + } + }, + install: function(Vue){ + Object.defineProperty(Vue.prototype, '$fullscreen', { + get () { return Fullscreen } + }) } +}; +Vue.use(Fullscreen); + diff --git a/src/vue-poc/components/mimetypes.js b/src/vue-poc/components/mimetypes.js index 408fc57..8afe3ab 100644 --- a/src/vue-poc/components/mimetypes.js +++ b/src/vue-poc/components/mimetypes.js @@ -1,6 +1,7 @@ // Mimetype info -const MimeTypes={ - toMode:[ +// +const MimeTypes=new function(){ + this.toMode=[ {name: "text/plain", mode: "text"}, {name: "text/xml", mode: "xml"}, {name: "application/xml", mode:"xml"}, @@ -12,17 +13,21 @@ const MimeTypes={ {name: "text/css", mode:"css"}, {name: "image/svg+xml", mode:"svg"} ], - mode:{ + this.formatdom= t=>html_beautify(t, { indent_size: 3 ,indent_inner_html:true}); + this.formatjs= t=>js_beautify(t, { indent_size: 2 }); + + this.mode={ "text": {}, "javascript": { - format(t){ return js_beautify(t, { indent_size: 2 })} + "format":this.formatjs }, - "xml": { - format(t){ return html_beautify(t, { indent_size: 3 ,indent_inner_html:true})} + "xml": { + "format":this.formatdom }, "css": {} - }, - install(Vue){ + }; + + this.install=function(Vue){ Object.defineProperty(Vue.prototype, '$MimeTypes', { get () { return MimeTypes } }) } diff --git a/src/vue-poc/components/notification.js b/src/vue-poc/components/notification.js new file mode 100644 index 0000000..edc6673 --- /dev/null +++ b/src/vue-poc/components/notification.js @@ -0,0 +1,22 @@ +//Notification Object +const Notification={ + messages:[], + nextId: 0, + unseen:0, + add(msg){ + var data={ + text: msg, + index: ++this.nextId, + created: new Date() + }; + this.messages.unshift(data); + this.messages.length = Math.min(this.messages.length, 30); + ++this.unseen; + + }, + install(Vue){ + Object.defineProperty(Vue.prototype, '$notification', { + get () { return Notification } + }) } +}; +Vue.use(Notification); diff --git a/src/vue-poc/core.js b/src/vue-poc/core.js index e59ae31..e840eb5 100644 --- a/src/vue-poc/core.js +++ b/src/vue-poc/core.js @@ -58,28 +58,6 @@ const Auth={ }; Vue.use(Auth); -//Notification Object -const Notification={ - messages:[], - nextId: 0, - unseen:0, - add(msg){ - var data={ - text: msg, - index: ++this.nextId, - created: new Date() - }; - this.messages.unshift(data); - this.messages.length = Math.min(this.messages.length, 30); - ++this.unseen; - - }, - install(Vue){ - Object.defineProperty(Vue.prototype, '$notification', { - get () { return Notification } - }) } -}; -Vue.use(Notification); // Settings read and write list clear @@ -112,13 +90,25 @@ ut aliquip ex ea commodo consequat.`}, text:`let $a:=1 to 5 return $a `}, - {name:"videos.xml", id:"3", mode:"xml",dirty: false, location: "/aaa/bca/", + {name:"videos.xml", id:"3", mode:"xml",dirty: false, location: "xmldb:/vue-poc/aaa/bca/videos.xml", text:` hello `} ], "edit/currentId": "?", - "system/serviceworker": true + "system/serviceworker": true, + "images/thumbtask":` + + + + + Some Text here + + + + + +` }, @@ -190,45 +180,6 @@ function debounce(func, wait, immediate) { }; }; -// https://stackoverflow.com/questions/36672561/how-to-exit-fullscreen-onclick-using-javascript -const Fullscreen={ - isInFullScreen(){ - return (document.fullscreenElement && document.fullscreenElement !== null) || - (document.webkitFullscreenElement && document.webkitFullscreenElement !== null) || - (document.mozFullScreenElement && document.mozFullScreenElement !== null) || - (document.msFullscreenElement && document.msFullscreenElement !== null); - }, - toggle(){ - var docElm = document.documentElement; - if (!this.isInFullScreen()) { - if (docElm.requestFullscreen) { - docElm.requestFullscreen(); - } else if (docElm.mozRequestFullScreen) { - docElm.mozRequestFullScreen(); - } else if (docElm.webkitRequestFullScreen) { - docElm.webkitRequestFullScreen(); - } else if (docElm.msRequestFullscreen) { - docElm.msRequestFullscreen(); - } - } else { - if (document.exitFullscreen) { - document.exitFullscreen(); - } else if (document.webkitExitFullscreen) { - document.webkitExitFullscreen(); - } else if (document.mozCancelFullScreen) { - document.mozCancelFullScreen(); - } else if (document.msExitFullscreen) { - document.msExitFullscreen(); - } - } - }, - install: function(Vue){ - Object.defineProperty(Vue.prototype, '$fullscreen', { - get () { return Fullscreen } - }) } -}; -Vue.use(Fullscreen); - Vue.component('treeselect', VueTreeselect.Treeselect); //Vue.use( VueFormJsonSchema); diff --git a/src/vue-poc/features/about.vue b/src/vue-poc/features/about.vue index 8a4c1c4..dd245ad 100644 --- a/src/vue-poc/features/about.vue +++ b/src/vue-poc/features/about.vue @@ -1,36 +1,66 @@ - + } +} diff --git a/src/vue-poc/features/collection/history.vue b/src/vue-poc/features/collection/history.vue index 881136d..c4c440d 100644 --- a/src/vue-poc/features/collection/history.vue +++ b/src/vue-poc/features/collection/history.vue @@ -10,8 +10,18 @@ Example Chip - + + + + info + + + + + info + + @@ -37,6 +47,9 @@ doEdit(item){ console.log("history: ",item) router.push({ path: 'edit', query: { url:item.url, protocol:item.protocol }}) + }, + doEdit2(item){ + alert("dd") } }, created:function(){ diff --git a/src/vue-poc/features/components/balisage-taxonomy.xml b/src/vue-poc/features/components/balisage-taxonomy.xml new file mode 100644 index 0000000..b24b968 --- /dev/null +++ b/src/vue-poc/features/components/balisage-taxonomy.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/vue-poc/features/components/components.xqm b/src/vue-poc/features/components/components.xqm new file mode 100644 index 0000000..541ae9e --- /dev/null +++ b/src/vue-poc/features/components/components.xqm @@ -0,0 +1,32 @@ +module namespace j = 'quodatum.test.components'; + + +declare function j:tax($items){ + for $a in $items +return <_ type="object"> +{$a/@id/string()} + +{if($a/item)then + {j:tax($a/item)} + else ()} + +}; + + + +(:~ + : tree + :) +declare +%rest:GET %rest:path("/vue-poc/api/components/tree") +%output:method("json") +function j:tree() +as element(json) +{ +let $d:=doc(resolve-uri("balisage-taxonomy.xml",static-base-uri()))/tax/item +return + +{j:tax($d)} + +}; + diff --git a/src/vue-poc/features/svg.vue b/src/vue-poc/features/components/svg.vue similarity index 100% rename from src/vue-poc/features/svg.vue rename to src/vue-poc/features/components/svg.vue diff --git a/src/vue-poc/features/svg2.vue b/src/vue-poc/features/components/svg2.vue similarity index 100% rename from src/vue-poc/features/svg2.vue rename to src/vue-poc/features/components/svg2.vue diff --git a/src/vue-poc/features/timeline.vue b/src/vue-poc/features/components/timeline.vue similarity index 100% rename from src/vue-poc/features/timeline.vue rename to src/vue-poc/features/components/timeline.vue diff --git a/src/vue-poc/features/tree.vue b/src/vue-poc/features/components/tree.vue similarity index 100% rename from src/vue-poc/features/tree.vue rename to src/vue-poc/features/components/tree.vue diff --git a/src/vue-poc/features/components/tree2.vue b/src/vue-poc/features/components/tree2.vue new file mode 100644 index 0000000..2b088c5 --- /dev/null +++ b/src/vue-poc/features/components/tree2.vue @@ -0,0 +1,70 @@ + + + + diff --git a/src/vue-poc/features/edit/tabs.vue b/src/vue-poc/features/edit/tabs.vue index 80a1d9a..fca7f75 100644 --- a/src/vue-poc/features/edit/tabs.vue +++ b/src/vue-poc/features/edit/tabs.vue @@ -1,6 +1,6 @@