vuetify 1.2.10
This commit is contained in:
parent
526c528f06
commit
d30eacc8fe
@ -7,21 +7,21 @@
|
||||
<v-layout align-center>
|
||||
<v-flex>
|
||||
<h3 class="display-3">Vue-poc<v-spacer></v-spacer>
|
||||
<v-speed-dial v-model="fab" hover right direction="bottom"
|
||||
<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-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>
|
||||
</h3>
|
||||
<span class="subheading">A development environment for managing XML sources and processes.</span>
|
||||
|
109
src/vue-poc/features/tasks/xqdoc/tx-xqrest2.xq
Normal file
109
src/vue-poc/features/tasks/xqdoc/tx-xqrest2.xq
Normal file
@ -0,0 +1,109 @@
|
||||
(:~
|
||||
: XQDoc: generate restxq.html from resources located at $target
|
||||
:)
|
||||
import module namespace xqd = 'quodatum:build.xqdoc' at "../../../lib/xqdoc/xqdoc-proj.xqm";
|
||||
import module namespace store = 'quodatum.store' at "../../../lib/store.xqm";
|
||||
import module namespace tree = 'quodatum.data.tree' at "../../../lib/tree.xqm";
|
||||
|
||||
declare namespace c="http://www.w3.org/ns/xproc-step";
|
||||
declare namespace xqdoc="http://www.xqdoc.org/1.0";
|
||||
|
||||
|
||||
(:~ URL of the doc source
|
||||
: @default file:///C:/tmp/xqdoc/
|
||||
:)
|
||||
declare variable $target as xs:anyURI external :=
|
||||
"file:///C:/tmp/xqdoc/" cast as xs:anyURI;
|
||||
|
||||
declare variable $nsRESTXQ:= 'http://exquery.org/ns/restxq';
|
||||
|
||||
(:~ map for each restxq:path :)
|
||||
declare function local:import($path,$id as item(),$folder)
|
||||
as map(*)*
|
||||
{
|
||||
let $uri:=``[F`{ string($id) }`/]``
|
||||
let $doc:=doc(resolve-uri($uri || "xqdoc.xml",$folder))
|
||||
let $annots:=xqd:annotations($doc/*, $nsRESTXQ,"path")
|
||||
return $annots!map{
|
||||
"id": $id,
|
||||
"uri": $uri,
|
||||
"path": $path,
|
||||
"annot": .,
|
||||
"function": ./../../(xqdoc:name/string(),@arity/string()),
|
||||
"description": ./../../xqdoc:comment/xqdoc:description/node()
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
declare function local:page($reps as map(*)*)
|
||||
{
|
||||
let $op:= <div>
|
||||
<nav id="toc">
|
||||
<div>
|
||||
<a href="index.html">
|
||||
Index
|
||||
</a>
|
||||
</div>
|
||||
<h2>
|
||||
<a id="contents"></a>
|
||||
<span class="namespace">
|
||||
RestXQ
|
||||
</span>
|
||||
</h2>
|
||||
<ol class="toc">
|
||||
<li>
|
||||
<a href="#main">
|
||||
<span class="secno">1 </span>
|
||||
<span class="content">Introduction</span>
|
||||
</a>
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
<a href="index.html">index: </a>
|
||||
<ul>{$reps!local:path-to-html(.)}</ul>
|
||||
</div>
|
||||
return xqd:page($op,map{"resources": "resources/"})
|
||||
};
|
||||
|
||||
declare function local:path-to-html($rep as map(*))
|
||||
as element(li){
|
||||
<li id="{ $rep?uri }">
|
||||
<h4>{ $rep?uri }</h4>
|
||||
<ul>{
|
||||
let $methods as map(*) :=$rep?methods
|
||||
for $method in map:keys($methods)
|
||||
let $d:=$methods?($method)
|
||||
let $id:=head($d?function)
|
||||
return <li><a href="{$d?uri}index.html#{$id }">{ $method }</a>
|
||||
<div>{$d?description}</div></li>
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
};
|
||||
|
||||
|
||||
(:sequence of maps :map{id:,path:,annot:} :)
|
||||
let $reports:= doc(resolve-uri("files.xml",$target))
|
||||
//c:file!local:import(string-join(ancestor-or-self::*/@name,"/"),position(),$target)
|
||||
|
||||
(: map keyed on uris :)
|
||||
let $data:=map:merge(for $report in $reports
|
||||
group by $uri:=$report?annot/xqdoc:literal/string()
|
||||
let $methods:= map:merge(
|
||||
for $annot in $report
|
||||
let $hits:=for $method in $xqd:methods
|
||||
let $hit:= xqd:methods($annot?annot/.., $nsRESTXQ, $method)
|
||||
return if(empty($hit)) then () else map{$method: $annot}
|
||||
return if(exists($hits))then $hits else map{"ALL":$annot}
|
||||
|
||||
)
|
||||
return map:entry($uri,map{ "uri": $uri, "methods": $methods})
|
||||
)
|
||||
|
||||
|
||||
let $uris:=sort(map:keys($data))
|
||||
|
||||
return local:page( $data?($uris))
|
||||
=>xqd:store2("restxq.html",$xqd:HTML5)
|
||||
=>store:store($target)
|
||||
|
@ -11,7 +11,7 @@ declare %updating
|
||||
function store:store($docs as map(*)*,$base as xs:string)
|
||||
{
|
||||
let $base:=if(contains($base,"\"))then file:path-to-uri($base) else $base
|
||||
return $docs!store:store1(.,$base)
|
||||
return $docs!store:store1(.,trace($base,">>>>>"))
|
||||
};
|
||||
|
||||
declare %updating
|
||||
|
@ -16,6 +16,9 @@ declare variable $xqd:XML:=map{"indent": "no"};
|
||||
declare variable $xqd:mod-xslt external :="html-module.xsl";
|
||||
declare variable $xqd:index-xslt external :="html-index.xsl";
|
||||
|
||||
(:~ @see https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods :)
|
||||
declare variable $xqd:methods:=("GET","HEAD","POST","PUT","DELETE","PATCH");
|
||||
|
||||
(:~
|
||||
: save documentation for files to target
|
||||
: @param $files c:directory-list
|
||||
@ -171,6 +174,20 @@ as element(xqdoc:annotation)*
|
||||
|
||||
};
|
||||
|
||||
(:~
|
||||
: return annotations with namespace and name
|
||||
:)
|
||||
declare function xqd:methods($annots as element(xqdoc:annotations),
|
||||
$annotns as xs:string,
|
||||
$aname as xs:string)
|
||||
as element(xqdoc:annotation)*
|
||||
{
|
||||
let $ns:=$annots/ancestor::xqdoc:xqdoc/xqdoc:namespaces
|
||||
let $prefixes:=$ns/xqdoc:namespace[@uri=$annotns]/@prefix/string()
|
||||
return $annots/xqdoc:annotation[@name=(for $p in $prefixes return concat($p,':',$aname))]
|
||||
|
||||
};
|
||||
|
||||
(:~
|
||||
: generate standard page wrapper
|
||||
:)
|
||||
|
@ -10,7 +10,7 @@
|
||||
<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="//use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="//unpkg.com/vuetify@1.2.6/dist/vuetify.min.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="//unpkg.com/vuetify@1.2.10/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="/vue-poc/ui/prism/prism.css" rel="stylesheet" type="text/css"/>>
|
||||
<link rel="stylesheet" href="//unpkg.com/leaflet@1.0.3/dist/leaflet.css"/>
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
<body>
|
||||
<div id="app">
|
||||
<h3><code>vue-poc</code> <small>(v0.3.9)</small> </h3>
|
||||
<h3><code>vue-poc</code> <small>(v0.3.10)</small> </h3>
|
||||
|
||||
<div class="spinner">
|
||||
<div class="rect1"></div>
|
||||
@ -36,9 +36,9 @@
|
||||
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/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/axios/0.17.1/axios.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/qs/6.4.0/qs.js" crossorigin="anonymous" ></script>
|
||||
<script src="//unpkg.com/vuetify@1.2.6/dist/vuetify.min.js" crossorigin="anonymous"></script>
|
||||
<script src="//unpkg.com/vuetify@1.2.10/dist/vuetify.min.js" crossorigin="anonymous"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.1/ace.js" crossorigin="anonymous"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.1/ext-language_tools.js" crossorigin="anonymous"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.1/ext-linking.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user