This commit is contained in:
Andy Bunce 2018-07-15 22:55:09 +01:00
parent 5506b42789
commit a8dff34139
32 changed files with 428 additions and 259 deletions

View file

@ -50,21 +50,7 @@ function vue-api:search($q )
return dice:response($items,$entity,web:dice())
};
(:~
: Returns data results
:)
declare
%rest:path("/vue-poc/api/data/{$entity}")
%rest:query-param("q", "{$q}")
%rest:produces("application/json")
%output:method("json")
function vue-api:data($entity as xs:string,$q )
{
let $entity:=$entity:list($entity)
let $items:=$entity("data")()
return dice:response($items,$entity,web:dice())
};
(:~
: Returns test list for select.

View file

@ -264,7 +264,8 @@
HTTP.get("status")
.then(r=>{
console.log("status",r)
//Object.assign(Auth,r.data)
this.$auth=Object.assign(this.$auth,r.data);
console.log("AFTER: ",this.$auth);
//this.$forceUpdate()
})
},

View file

@ -51,6 +51,8 @@ const axios_json={ headers: {accept: 'application/json'}};
const Auth={
user:"guest",
permission:null,
session:null,
created:null,
install: function(Vue){
Object.defineProperty(Vue.prototype, '$auth', {
get () { return Auth }

View file

@ -32,13 +32,16 @@
<v-layout row wrap>
<v-flex xs6>
<ul>
<li><a href="https://vuejs.org/"
target="new">vue.js</a></li>
<li><a href="https://vuejs.org/" target="new">vue.js</a></li>
<li><a href="https://vuetifyjs.com/vuetify/quick-start"
target="new">vuetifyjs</a></li>
<li><a href="https://github.com/axios/axios" target="new">axios</a></li>
<li><a href="https://github.com/beautify-web/js-beautify"
target="new">js-beautify</a></li>
<li><a href="https://developers.google.com/web/tools/workbox/"
target="new">workbox</a></li>
</ul>

View file

@ -44,7 +44,7 @@ function vue-api:response($r,$query)
return (
replace value of node $vue-api:id with $id,
db:replace($vue-api:db,"/jobruns/" || $id || ".xml",$jobrun),
db:output($out)
update:output($out)
)
};
@ -98,7 +98,7 @@ function vue-api:invoke($path )
let $opts:=map{"base-uri":$path,"cache":true()}
let $r:=jobs:eval($xq,$bindings,$opts)
return db:output(
return update:output(
<json type="object" >
<job>{$r}</job>
</json>

View file

@ -2,7 +2,7 @@
<template id="formsjson">
<v-container fluid>
<v-card>
<v-card-title><qd-link href="https://github.com/formschema/native">vue-json-schema@1.1.0</qd-link> </v-card-title>
<v-card-title><qd-link href="https://gitlab.com/formschema/native">vue-json-schema@1.1.1</qd-link> </v-card-title>
<form-schema ref="formSchema" :schema="schema" v-model="model" input-wrapping-class="fooclass">
<v-btn color="success" @click.stop="submit">Send</v-btn>

View file

@ -23,4 +23,4 @@ return (for $f in subsequence($todo,1, $CHUNK)
let $dbpath:=$meta || $f || "/meta.xml"
let $meta:=imgmeta:read($spath)
return db:replace($cfg:DB-IMAGE,$dbpath,$meta),
db:output($todo=>count()))
update:output($todo=>count()))

View file

@ -15,7 +15,7 @@ declare %updating function local:store-thumb($f as xs:string)
return try{
fetch:binary($src)=>t:size(80)=>local:write-binary($trg)
} catch * {
db:output("bad: " || $f)
update:output("bad: " || $f)
}
};
(:~ create folder if missing) :)
@ -41,5 +41,5 @@ let $todo:= $relpath=>subsequence(1, $CHUNK)
return (
$todo!local:store-thumb(.),
db:output($relpath=>count())
update:output($relpath=>count())
)

View file

@ -21,7 +21,8 @@
row
wrap
:loading="loading"
:items="filtered"
:items="items"
:search="q"
:rows-per-page-items="rowsPerPageItems"
:pagination.sync="pagination"
select-all
@ -90,11 +91,7 @@
q: this.q }})
}
},
computed: {
filtered(){
return this.items.filter(item=>{return ((!this.q) || item.name.includes(this.q))})
}
},
created:function(){
this.getItems()
},

View file

@ -23,8 +23,9 @@
<v-data-table
:headers="headers"
:items="filtered"
:items="items"
hide-actions
:search="q"
class="elevation-1"
>
<template slot="items" slot-scope="props">
@ -95,12 +96,7 @@
if(vnew.query.url != vold.query.url) this.load()
}
},
computed: {
filtered(){
var regex = new RegExp( this.q, "i");
return this.items.filter(item=>{return ((!this.q) || regex.test(item.description))})
}
},
created:function(){
this.q=this.$route.query.q || this.q;
this.load();

View file

@ -29,6 +29,23 @@ function model-list($q) {
return dice:response($items,$entity,web:dice())
};
(:~
: Returns data results
:)
declare
%rest:path("/vue-poc/api/data/{$entity}")
%rest:query-param("q", "{$q}")
%rest:produces("application/json")
%output:method("json")
function data($entity as xs:string,$q )
{
let $entity:=$entity:list($entity)
let $items:=$entity("data")()
return dice:response($items,$entity,web:dice())
};
(:~
: details of the entity $entity
:)

View file

@ -11,7 +11,7 @@ declare %updating
function ping:dopost()
{
(replace value of node $ping:state/ping with 1+$ping:state/ping,
db:output(1+$ping:state/ping))
update:output(1+$ping:state/ping))
};
(:~

View file

@ -4,24 +4,8 @@
<v-layout >
<v-btn v-on:click="redraw">this.$forceUpdate()</v-btn>
<v-btn v-on:click="logout">logout</v-btn>
<!--
<v-autocomplete :items="list"
v-model="fieldValue"
:search.sync="search"
label="Suburb" item-text="suburb"
item-value="suburb"
@selected="handleSelected"
strict="Unknown">
<template slot="item" slot-scope="data">
<v-list-tile-content>
<v-list-tile-title>{{data.item.suburb}}</v-list-tile-title>
<template v-if="!data.item.generatedItem">
<v-list-tile-sub-title>{{data.item.postcode}} - {{data.item.state}}</v-list-tile-sub-title>
</template>
</v-list-tile-content>
</template>
</v-autocomplete>
-->
<v-btn v-on:click="refresh">refresh</v-btn>
</v-layout>
<table class="table">
<thead>
@ -31,14 +15,17 @@
</tr>
</thead>
<tbody>
<tr>
<td>created</td><td>{{$auth.created}}</td>
<tr>
<td>user</td><td>{{ $auth.user }}</td>
</tr>
<tr>
<td>session</td><td>{{$auth.session}}</td>
<td>created</td><td>{{ $auth.created }}</td>
</tr>
<tr>
<td>permision</td><td>{{$auth.permission}}</td>
<td>session</td><td>{{ $auth.session }}</td>
</tr>
<tr>
<td>permision</td><td>{{ $auth.permission }}</td>
</tr>
</tbody>
</table>
@ -60,10 +47,17 @@
redraw(){
this.$forceUpdate()
},
refresh(){
HTTP.get("status")
.then(r=>{
console.log("status",r)
this.$auth=Object.assign(this.$auth,r.data);
console.log("AFTER: ",this.$auth);
//this.$forceUpdate()
})
},
handleSelected(){
}
}
}
</script>
}</script>

View file

@ -25,7 +25,7 @@ function vue-api:model($efolder ,$target )
return (
prof:variables(),
file:write-text($target,$src),
db:output(<json type="object"><msg>Updated: {$target}</msg></json>)
update:output(<json type="object"><msg>Updated: {$target}</msg></json>)
)
};

View file

@ -15,7 +15,7 @@ declare
%updating
function vue-rest:vue($name)
{
db:output(<json type="object"><msg> { $name }.</msg></json>)
update:output(<json type="object"><msg> { $name }.</msg></json>)
};
(:~

View file

@ -18,5 +18,5 @@ declare
function vue-rest:vue($proj )
{
let $op:=vue:compile($proj)
return db:output(<json type="object"><msg> { $proj }.</msg></json>)
return update:output(<json type="object"><msg> { $proj }.</msg></json>)
};

View file

@ -3,9 +3,12 @@
:)
module namespace vue-api = 'quodatum:vue.api';
import module namespace xqd = 'quodatum:build.xqdoc' at "../../../lib/xqdoc/xqdoc-proj.xqm";
import module namespace query-a = 'vue-poc/query-a' at "../../../lib/query-a.xqm";
import module namespace fw="quodatum:file.walker";
declare namespace c="http://www.w3.org/ns/xproc-step";
declare variable $vue-api:query:="tx-xqdoc.xq";
declare variable $vue-api:state as element(state):=db:open("vue-poc","/state.xml")/state;
(:~
@ -13,28 +16,23 @@ declare variable $vue-api:state as element(state):=db:open("vue-poc","/state.xml
:)
declare
%rest:POST %rest:path("/vue-poc/api/tasks/xqdoc")
%rest:form-param("efolder", "{$efolder}")
%rest:form-param("target", "{$target}")
%rest:produces("application/json")
%output:method("json")
%updating
function vue-api:model($efolder ,$target )
%updating
function vue-api:model()
{
let $project:=tokenize($efolder,"[/\\]")[last()]=>trace("xqdoc: ")
let $files:= fw:directory-list($efolder,map{"include-filter":".*\.xqm"})
let $id:=$vue-api:state/last-id
let $opts:=map{
"project": $project,
"id": $id/string()
}
let $op:=xqd:save-xq($files,$target,$opts)
let $result:=<json type="object">
<msg> {$target}, {count($files//c:file)} files processed.</msg>
<id>{$id/string()}</id>
</json>
return (
db:output($result),
replace value of node $id with 1+$vue-api:state/last-id
)
resolve-uri($vue-api:query)=>query-a:update(query-a:params())
};
(:~
: get xqdoc settings.
:)
declare
%rest:GET %rest:path("/vue-poc/api/tasks/xqdoc")
%rest:produces("application/json")
%output:method("json")
function vue-api:settings()
{
let $xq:=resolve-uri($vue-api:query)
return query-a:fields($xq)
};

View file

@ -0,0 +1,35 @@
(:~
: Generate html for for XQuery sources
:)
import module namespace fw="quodatum:file.walker";
import module namespace xqd = 'quodatum:build.xqdoc' at "../../../lib/xqdoc/xqdoc-proj.xqm";
declare namespace c="http://www.w3.org/ns/xproc-step";
(:~ URL of the root folder to document
: @default C:/Users/andy/git/vue-poc/src/vue-poc
:)
declare variable $efolder as xs:anyURI external :="C:/Users/andy/git/vue-poc/src/vue-poc";
(:~ URL of the schema to use
: @default C:/tmp/xqdoc/
:)
declare variable $target as xs:anyURI external :="C:/tmp/xqdoc/";
declare variable $state as element(state):=db:open("vue-poc","/state.xml")/state;
let $project:=tokenize($efolder,"[/\\]")[last()]=>trace("xqdoc: ")
let $files:= fw:directory-list($efolder,map{"include-filter":".*\.xqm"})
let $id:=$state/last-id
let $opts:=map{
"project": $project,
"id": $id/string()
}
let $op:=xqd:save-xq($files,$target,$opts)
let $result:=<json type="object">
<msg> {$target}, {count($files//c:file)} files processed.</msg>
<id>{$id/string()}</id>
</json>
return (
update:output($result),
replace value of node $id with 1+$state/last-id
)

View file

@ -50,7 +50,7 @@
data: function(){
return {
params:{
efolder:"C:/Users/andy/git/graphxq/src",
efolder:"C:/Users/andy/git/vue-poc/src/vue-poc",
target:"C:/tmp/xqdoc/"
},
waiting:false,

View file

@ -5,7 +5,8 @@
:)
module namespace tx = 'quodatum:vue.api.validate';
import module namespace qv = 'quodatum.validate' at "validate.xqm";
import module namespace qv = 'quodatum.validate' at "../../lib/validate.xqm";
import module namespace query-a = 'vue-poc/query-a' at "../../lib/query-a.xqm";
(:~ run validation
@ -13,18 +14,25 @@ import module namespace qv = 'quodatum.validate' at "validate.xqm";
:)
declare
%rest:POST %rest:path("/vue-poc/api/validate")
%rest:form-param("doc", "{$doc}")
%rest:form-param("schema", "{$schema}")
%rest:produces("application/json")
%output:method("json")
function tx:validate-path($doc as xs:anyURI,
$schema as xs:anyURI)
%output:method("json")
%updating
function tx:run( )
{
(: tx:validate(doc($doc)) :)
let $_:=trace($doc,"doc ")
let $_:=trace($schema,"schema: ")
let $validators:=qv:xsd(?,$schema)
let $report:= qv:validation($doc ,$validators,attribute type {"xsd"})
return qv:json($report,map{})
let $r:= resolve-uri("tx-validate.xq")=>query-a:run(query-a:params())
return $r=>update:output()
};
(:~ validation settings
: @return json
:)
declare
%rest:GET %rest:path("/vue-poc/api/validate")
%rest:produces("application/json")
%output:method("json")
function tx:parameters( )
{
let $xq:=resolve-uri("tx-validate.xq")
return query-a:fields($xq)
};

View file

@ -0,0 +1,22 @@
(:~
: schema validation task
: @author andy bunce
: @since july 2018
:)
import module namespace qv = 'quodatum.validate' at "../../lib/validate.xqm";
(:~ URL of the doc to validate
: @default C:/Users/andy/git/vue-poc/src/vue-poc/models/entities/adminlog.xml
:)
declare variable $doc as xs:anyURI external :="C:/Users/andy/git/vue-poc/src/vue-poc/models/entities/adminlog.xml";
(:~ URL of the schema to use
: @default C:/Users/andy/git/vue-poc/src/vue-poc/models/schemas/entity.xsd
:)
declare variable $schema as xs:anyURI external :="C:/Users/andy/git/vue-poc/src/vue-poc/models/schemas/entity.xsd";
let $validators:=qv:xsd(?,$schema)
let $report:= qv:validation($doc ,$validators,attribute type {"xsd"})
return qv:json($report,map{})

View file

@ -11,14 +11,25 @@
</v-snackbar>
<v-card>
<v-toolbar class="orange">
<v-btn @click="validate" :loading="loading"
:disabled="loading"
><v-icon>play_circle_outline</v-icon>Validate</v-btn>
<span v-text="elapsed"></span>ms.
<v-btn @click="submit" :loading="loading" :disabled="false"
><v-icon>play_circle_outline</v-icon>validate</v-btn>
<span v-text="elapsed">?</span>ms.
<v-spacer></v-spacer>
<v-btn @click="clear" :loading="loading"
:disabled="loading"
>Clear</v-btn>
<v-btn @click="settings" :loading="loading"
:disabled="loading"
>Reset</v-btn>
<v-btn @click="valid2" :loading="loading"
:disabled="loading"
>is ok?</v-btn>
<v-menu offset-y left>
<v-btn icon dark slot="activator"><v-icon>settings</v-icon></v-btn>
<v-btn icon slot="activator"><v-icon>settings</v-icon></v-btn>
<v-card >
<v-toolbar class="green">
<v-card-title >@TODO.......</v-card-title>
@ -33,7 +44,8 @@
<v-container fluid>
<v-layout row wrap>
<v-flex xs8>
<v-flex xs8>
<v-form ref="form" v-model="valid" lazy-validation>
<v-flex v-for="field in fields" :key="field.model" >
<v-text-field xs10
v-model="params[field.model]" :label="field.label"
@ -41,6 +53,7 @@
append-outer-icon="send" @click:append-outer="source(field)"
></v-text-field>
</v-flex>
</v-form>
</v-flex>
<v-flex xs4 green fill-height style="height:100%;overflow:scroll">
<vp-validationreport :report="result"></vp-validationreport>
@ -60,18 +73,11 @@
elapsed: null,
height: null,
result: null,
fields:[
{model: "schema", label: "Schema (xsd url)"},
{model: "doc", label: "Doc (url)"}
],
fields:[],
rules: {
required: value => !!value || 'Required.'
},
params:{
doc: "C:/Users/andy/git/vue-poc/src/vue-poc/models/entities/adminlog.xml",
schema: "C:/Users/andy/git/vue-poc/src/vue-poc/models/schemas/entity.xsd"
},
params:null,
snackbar:{show:false,msg:"",context:"success"}
}
},
@ -84,12 +90,25 @@
//console.log("resize h",h,el.style)
el.style.height=h +"px";
},
submit () {
if (this.$refs.form.validate()) {
// Native form submission is not yet supported
this.validate()
}
},
clear () {
this.$refs.form.reset()
},
rules(field){
return [field.required?this.rules.required:[]];
},
source(field){
console.log("field: ",field);
router.push({ path: 'tabs', query: { url:this.params[field.model]}})
},
valid2(){
alert("State:"+ this.$refs.form.validate());
},
validate(){
this.loading=true
this.start = performance.now();
@ -112,6 +131,26 @@
this.loading=false
});
},
settings(){
HTTP.get("validate")
.then(r=>{
this.fields=r.data.fields;
this.params = Object.assign({}, this.params, r.data.values)
console.log("settings",this.params);
})
},
isvalid(){
return this.$refs && this.$refs.form && this.$refs.form.validate()
}
},
computed:{
valid(){
console.log("valid------------")
return this.$refs && this.$refs.form && this.$refs.form.validate()
}},
created: function(){
this.settings();
}
}
</script>

View file

@ -1,64 +0,0 @@
declare variable $body external :="{body}";
declare variable $version external :="{verson}";
declare variable $base external :="/doc/";
declare variable $static external :="/static/doc/";
declare variable $incl-css as element()* external :=();
declare variable $incl-js as element()* external :=();
declare variable $debug-js as element()* external :=();
<html ng-app="doc" ng-controller="AppController">
<head>
<meta charset="utf-8"/>
<base href="{$base}" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="description" content="doc"/>
<meta name="author" content="andy bunce"/>
<title>doc (v{$version})</title>
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="{$static}icon.png"/>
<!-- component css -->
{$incl-css}
<link href="{$static}app.css" rel="stylesheet"/>
<!--
<script type="text/javascript" src="/static/lib/firebug-lite/4/firebug-lite.js">
{{
overrideConsole: false,
startInNewWindow: true,
startOpened: true,
enableTrace: true
}}
</script>
-->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){{i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){{
(i[r].q=i[r].q||[]).push(arguments)}},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
}})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-39638119-1', 'auto');
</script>
</head>
<body>
{$body}
<!-- start component js -->
{$incl-js}
<!-- application -->
<script src="{$static}app.js" ></script>
<script src="{$static}services.js" ></script>
<script src="{$static}feats/apps/apps.js" ></script>
<script src="{$static}feats/components/components.js" ></script>
<script src="{$static}feats/history/history.js" ></script>
<script src="{$static}feats/files/files.js" ></script>
<script src="{$static}feats/jobs/jobs.js" ></script>
<script src="{$static}feats/schema/schema.js" ></script>
<script src="{$static}feats/entity/entity.js" ></script>
<script src="{$static}feats/xqmodules/xqm.js" ></script>
<script src="{$static}feats/tools/tools.js" ></script>
<script src="{$static}feats/tasks/tasks.js" ></script>
<script src="{$static}feats/database/database.js" ></script>
<script src="{$static}feats/directives/directives.js" ></script>
</body>
</html>

View file

@ -83,5 +83,5 @@ declare %updating function cons:redirect(
$url as xs:string,
$params as map(*)
) as empty-sequence() {
db:output(web:redirect($url, $params))
update:output(web:redirect($url, $params))
};

View file

@ -7,8 +7,6 @@
:)
module namespace dice = 'quodatum.web.dice/v4';
declare default function namespace 'quodatum.web.dice/v4';
declare namespace restxq = 'http://exquery.org/ns/restxq';
declare variable $dice:default:=map{
"start" : 1, (: start index :)
@ -19,10 +17,11 @@ declare variable $dice:default:=map{
(:~
: sort items
: @param sort field name to sort on optional leading +/-
: @param sort field name to sort on. Optional leading +/-
: @param $fmap as map(*) field
: @return sorted items
:)
declare function sort($items as item()*
declare function dice:sort($items as item()*
,$fmap as map(*)
,$sort as xs:string?)
as item()*{
@ -43,13 +42,13 @@ as item()*{
};
(:~ generate item xml for all fields in map :)
declare function json-flds($item,$fldmap)
declare function dice:json-flds($item,$fldmap)
as element(_){
json-flds($item,$fldmap,map:keys($fldmap))
dice:json-flds($item,$fldmap,map:keys($fldmap))
};
(:~ generate item xml for some fields in map :)
declare function json-flds($item as element(),
declare function dice:json-flds($item as element(),
$fldmap as map(*),
$keys as xs:string*)
as element(_){
@ -70,9 +69,10 @@ as element(_){
: @param $items sequence of source items
: @param $opts sort and slice values
:)
declare function response($items,
declare function dice:response($items,
$entity as map(*),
$opts as map(*))
as element(json)
{
let $total:=fn:count($items)
let $opts:=map:merge(($opts,$dice:default))
@ -93,31 +93,36 @@ declare function response($items,
};
(:~
: get data
: sort, slice, return json
:)
declare function get($entity as map(*),$name as xs:string)
declare function dice:response($items,$entity as map(*))
{
dice:response($items,$entity,map{})
};
(:~
: get data for object with key =name
:)
declare function dice:get($entity as map(*),$name as xs:string)
as element(*){
let $results:=$entity("data")()
return $results[$name=$entity?access?name(.)]
};
(:~
: sort, slice, return json
:)
declare function response($items,$entity as map(*)){
response($items,$entity,map{})
};
(:~
: @return json for item
:)
declare function one($item,$entity as map(*))
declare function dice:one($item,$entity as map(*))
{
one($item,$entity,map{})
dice:one($item,$entity,map{})
};
(:~
: @return json for item
:)
declare function one($item,$entity as map(*),$opts as map(*))
declare function dice:one($item,$entity as map(*),$opts as map(*))
as element(json)
{
let $jsonf:= map:get($entity,"json")
let $fields:=if ($opts?fields) then fn:tokenize($opts?fields) else map:keys($jsonf)=>fn:trace("FF")

View file

@ -0,0 +1,53 @@
(:~
: evaluTE query library
:
: @author Andy Bunce, 2018
:)
module namespace query-a = 'vue-poc/query-a';
import module namespace request = "http://exquery.org/ns/request";
(:~
: attributes of a stored query
:)
declare function query-a:fields($mod as xs:anyURI)
as element(json)
{
let $d:=inspect:module($mod)
let $vars:=$d/variable[@external="true"]
return <json type="object">
<description>{ $d/description/string() }</description>
<fields type="array">{
$vars!
<_ type="object">
<model>{ @name/string() }</model>
<label>{ description/string() }</label>
<type>{ @type/string() }</type>
</_>
}</fields>
<values type="object">{
$vars!element{@name}{default_tag/string()}
}</values>
</json>
};
declare
function query-a:params()
as map(*)
{
map:merge(
for $p in request:parameter-names() return map:entry($p,request:parameter($p))
)
};
declare
function query-a:run($query as xs:anyURI,$params as map(*))
{
xquery:invoke($query,$params)
};
declare
%updating
function query-a:update($query as xs:anyURI,$params as map(*))
{
xquery:invoke-update($query,$params)
};

View file

@ -1,5 +1,5 @@
(: entity access maps
: auto generated from xml files in entities folder at: 2018-07-07T11:46:28.985+01:00
: auto generated from xml files in entities folder at: 2018-07-12T21:56:08.166+01:00
:)
module namespace entity = 'quodatum.models.generated';

View file

@ -7,7 +7,7 @@
<xpath>@time</xpath>
</field>
<field name="address" type="xs:string">
<description>ip address</description>
<description>IP address</description>
<xpath>@address</xpath>
</field>
<field name="user" type="xs:string">

View file

@ -0,0 +1,51 @@
# Schema to model task pipelines in vue-poc.
#
# A pipeline consists of at least one step, to be executed
# by the processor sequentially, in document order.
#
# Steps act on the processor accumulator
#
# Author: Andy Bunce <andy@quodatum.com>
# Date: 20180606
# Version: 0.1
# Comments:
default namespace = "http://quodatum.com/ns/pipeline"
start =
element pipeline {
attribute id { xsd:ID },
attribute name { xsd:NCName },
step+
}
step = load |
xquery |
xslt |
validate |
store
load = element load {
attribute href { xsd:anyURI }
}
xquery = element xquery {
attribute href { xsd:anyURI }
}
xslt = element xslt {
attribute href { xsd:anyURI }
}
validate = element validate {
attribute failOnError { xsd:boolean }?, #whether to abort if validation errors occur
attribute href { xsd:anyURI },
attribute type {"relax-ng" | "schematron" | "xml-schema" } #type of @href schema
}
store = element store {
attribute href { xsd:anyURI }
}

View file

@ -1,4 +1,4 @@
// generated 2018-07-10T23:15:53.605+01:00
// generated 2018-07-15T22:47:31.919+01:00
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/components/qd-autoheight.vue
Vue.component('qd-autoheight',{template:`
@ -1002,9 +1002,13 @@ const About=Vue.extend({template:`
<v-flex xs6="">
<ul>
<li><a href="https://vuejs.org/" target="new">vue.js</a></li>
<li><a href="https://vuetifyjs.com/vuetify/quick-start" target="new">vuetifyjs</a></li>
<li><a href="https://github.com/axios/axios" target="new">axios</a></li>
<li><a href="https://github.com/beautify-web/js-beautify" target="new">js-beautify</a></li>
<li><a href="https://developers.google.com/web/tools/workbox/" target="new">workbox</a></li>
</ul>
</v-flex>
@ -2987,7 +2991,7 @@ const Formsschema=Vue.extend({template:`
const Formsjson=Vue.extend({template:`
<v-container fluid="">
<v-card>
<v-card-title><qd-link href="https://github.com/formschema/native">vue-json-schema@1.1.0</qd-link> </v-card-title>
<v-card-title><qd-link href="https://gitlab.com/formschema/native">vue-json-schema@1.1.1</qd-link> </v-card-title>
<form-schema ref="formSchema" :schema="schema" v-model="model" input-wrapping-class="fooclass">
<v-btn color="success" @click.stop="submit">Send</v-btn>
@ -3972,7 +3976,7 @@ const Entity=Vue.extend({template:`
<v-container fluid="" grid-list-md="">
<v-data-iterator content-tag="v-layout" row="" wrap="" :loading="loading" :items="filtered" :rows-per-page-items="rowsPerPageItems" :pagination.sync="pagination" select-all="" :value="selected">
<v-data-iterator content-tag="v-layout" row="" wrap="" :loading="loading" :items="items" :search="q" :rows-per-page-items="rowsPerPageItems" :pagination.sync="pagination" select-all="" :value="selected">
<v-flex slot="item" slot-scope="props" xs12="" sm6="" md4="" lg3="">
<v-card :hover="true" active-class="default-class qd-active">
@ -4028,11 +4032,7 @@ const Entity=Vue.extend({template:`
q: this.q }})
}
},
computed: {
filtered(){
return this.items.filter(item=>{return ((!this.q) || item.name.includes(this.q))})
}
},
created:function(){
this.getItems()
},
@ -4102,7 +4102,7 @@ const Namespace=Vue.extend({template:`
</v-toolbar>
<v-data-table :headers="headers" :items="filtered" hide-actions="" class="elevation-1">
<v-data-table :headers="headers" :items="items" hide-actions="" :search="q" class="elevation-1">
<template slot="items" slot-scope="props">
<td><router-link :to="{path:'namespace/item?xmlns='+ props.item.xmlns}">
{{ props.item.xmlns }}
@ -4170,12 +4170,7 @@ const Namespace=Vue.extend({template:`
if(vnew.query.url != vold.query.url) this.load()
}
},
computed: {
filtered(){
var regex = new RegExp( this.q, "i");
return this.items.filter(item=>{return ((!this.q) || regex.test(item.description))})
}
},
created:function(){
this.q=this.$route.query.q || this.q;
this.load();
@ -4718,24 +4713,8 @@ const Session=Vue.extend({template:`
<v-layout>
<v-btn v-on:click="redraw">this.$forceUpdate()</v-btn>
<v-btn v-on:click="logout">logout</v-btn>
<!--
<v-autocomplete :items="list"
v-model="fieldValue"
:search.sync="search"
label="Suburb" item-text="suburb"
item-value="suburb"
@selected="handleSelected"
strict="Unknown">
<template slot="item" slot-scope="data">
<v-list-tile-content>
<v-list-tile-title>{{data.item.suburb}}</v-list-tile-title>
<template v-if="!data.item.generatedItem">
<v-list-tile-sub-title>{{data.item.postcode}} - {{data.item.state}}</v-list-tile-sub-title>
</template>
</v-list-tile-content>
</template>
</v-autocomplete>
-->
<v-btn v-on:click="refresh">refresh</v-btn>
</v-layout>
<table class="table">
<thead>
@ -4745,14 +4724,17 @@ const Session=Vue.extend({template:`
</tr>
</thead>
<tbody>
<tr>
<td>created</td><td>{{$auth.created}}</td>
<tr>
<td>user</td><td>{{ $auth.user }}</td>
</tr>
<tr>
<td>session</td><td>{{$auth.session}}</td>
<td>created</td><td>{{ $auth.created }}</td>
</tr>
<tr>
<td>permision</td><td>{{$auth.permission}}</td>
<td>session</td><td>{{ $auth.session }}</td>
</tr>
<tr>
<td>permision</td><td>{{ $auth.permission }}</td>
</tr>
</tbody>
</table>
@ -4773,13 +4755,20 @@ const Session=Vue.extend({template:`
redraw(){
this.$forceUpdate()
},
refresh(){
HTTP.get("status")
.then(r=>{
console.log("status",r)
this.$auth=Object.assign(this.$auth,r.data);
console.log("AFTER: ",this.$auth);
//this.$forceUpdate()
})
},
handleSelected(){
}
}
}
);
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/settings/acesettings.vue
@ -5318,7 +5307,7 @@ const Xqdoc=Vue.extend({template:`
data: function(){
return {
params:{
efolder:"C:/Users/andy/git/graphxq/src",
efolder:"C:/Users/andy/git/vue-poc/src/vue-poc",
target:"C:/tmp/xqdoc/"
},
waiting:false,
@ -5512,12 +5501,18 @@ const Validate=Vue.extend({template:`
</v-snackbar>
<v-card>
<v-toolbar class="orange">
<v-btn @click="validate" :loading="loading" :disabled="loading"><v-icon>play_circle_outline</v-icon>Validate</v-btn>
<span v-text="elapsed"></span>ms.
<v-btn @click="submit" :loading="loading" :disabled="false"><v-icon>play_circle_outline</v-icon>validate</v-btn>
<span v-text="elapsed">?</span>ms.
<v-spacer></v-spacer>
<v-btn @click="clear" :loading="loading" :disabled="loading">Clear</v-btn>
<v-btn @click="settings" :loading="loading" :disabled="loading">Reset</v-btn>
<v-btn @click="valid2" :loading="loading" :disabled="loading">is ok?</v-btn>
<v-menu offset-y="" left="">
<v-btn icon="" dark="" slot="activator"><v-icon>settings</v-icon></v-btn>
<v-btn icon="" slot="activator"><v-icon>settings</v-icon></v-btn>
<v-card>
<v-toolbar class="green">
<v-card-title>@TODO.......</v-card-title>
@ -5532,10 +5527,12 @@ const Validate=Vue.extend({template:`
<v-container fluid="">
<v-layout row="" wrap="">
<v-flex xs8="">
<v-flex xs8="">
<v-form ref="form" v-model="valid" lazy-validation="">
<v-flex v-for="field in fields" :key="field.model">
<v-text-field xs10="" v-model="params[field.model]" :label="field.label" clearable="" :rules="[rules.required]" box="" append-outer-icon="send" @click:append-outer="source(field)"></v-text-field>
</v-flex>
</v-form>
</v-flex>
<v-flex xs4="" green="" fill-height="" style="height:100%;overflow:scroll">
<vp-validationreport :report="result"></vp-validationreport>
@ -5554,18 +5551,11 @@ const Validate=Vue.extend({template:`
elapsed: null,
height: null,
result: null,
fields:[
{model: "schema", label: "Schema (xsd url)"},
{model: "doc", label: "Doc (url)"}
],
fields:[],
rules: {
required: value => !!value || 'Required.'
},
params:{
doc: "C:/Users/andy/git/vue-poc/src/vue-poc/models/entities/adminlog.xml",
schema: "C:/Users/andy/git/vue-poc/src/vue-poc/models/schemas/entity.xsd"
},
params:null,
snackbar:{show:false,msg:"",context:"success"}
}
},
@ -5578,12 +5568,25 @@ const Validate=Vue.extend({template:`
//console.log("resize h",h,el.style)
el.style.height=h +"px";
},
submit () {
if (this.$refs.form.validate()) {
// Native form submission is not yet supported
this.validate()
}
},
clear () {
this.$refs.form.reset()
},
rules(field){
return [field.required?this.rules.required:[]];
},
source(field){
console.log("field: ",field);
router.push({ path: 'tabs', query: { url:this.params[field.model]}})
},
valid2(){
alert("State:"+ this.$refs.form.validate());
},
validate(){
this.loading=true
this.start = performance.now();
@ -5606,7 +5609,27 @@ const Validate=Vue.extend({template:`
this.loading=false
});
},
settings(){
HTTP.get("validate")
.then(r=>{
this.fields=r.data.fields;
this.params = Object.assign({}, this.params, r.data.values)
console.log("settings",this.params);
})
},
isvalid(){
return this.$refs && this.$refs.form && this.$refs.form.validate()
}
},
computed:{
valid(){
console.log("valid------------")
return this.$refs && this.$refs.form && this.$refs.form.validate()
}},
created: function(){
this.settings();
}
}
);
@ -6198,7 +6221,8 @@ const Vuepoc=Vue.extend({template:`
HTTP.get("status")
.then(r=>{
console.log("status",r)
//Object.assign(Auth,r.data)
this.$auth=Object.assign(this.$auth,r.data);
console.log("AFTER: ",this.$auth);
//this.$forceUpdate()
})
},
@ -6265,6 +6289,8 @@ const axios_json={ headers: {accept: 'application/json'}};
const Auth={
user:"guest",
permission:null,
session:null,
created:null,
install: function(Vue){
Object.defineProperty(Vue.prototype, '$auth', {
get () { return Auth }

View file

@ -54,7 +54,7 @@
<script src="//unpkg.com/@riophae/vue-treeselect@0.0.29/dist/vue-treeselect.min.js" crossorigin="anonymous"></script>
<script src="//unpkg.com/vue-form-generator@2.2.2/dist/vfg-core.js" crossorigin="anonymous"></script>
<script src="//unpkg.com/vue-json-schema@1.1.0/dist/vue-json-schema.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="/vue-poc/ui/svg/d3-svg.js"></script>