api-console-assets
Version:
This repo only exists to publish api console components to npm
96 lines (91 loc) • 3.6 kB
HTML
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
<title>raml-path-to-object demo</title>
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
<link rel="import" href="../../arc-demo-helpers/raml-demo-parser.html">
<link rel="import" href="../../raml-path-selector/raml-path-selector.html">
<link rel="import" href="../raml-path-to-object.html">
<script type="text/javascript" src="browser/index.js"></script>
<script src="test.js"></script>
<style is="custom-style" include="demo-pages-shared-styles">
.vertical-section-container {
max-width: 600px;
}
.content {
@apply(--layout-horizontal);
}
raml-path-selector {
width: 300px;
overflow: auto;
}
.details {
@apply(--layout-flex);
margin-left: 16px;
}
</style>
</head>
<body unresolved>
<template is="dom-bind" id="app">
<div class="vertical-section-container centered">
<raml-demo-parser raml="{{raml}}" ></raml-demo-parser>
<raml-path-to-object
raml="[[raml]]"
selected-path="{{selectedPath}}"
selected-object="{{selectedObject}}"
selected-parent="{{selectedParent}}"
is-method="{{isMethod}}"
is-resource="{{isResource}}"
is-documentation="{{isDocumentation}}"
is-type="{{isType}}"
is-summary="{{isSummary}}"></raml-path-to-object>
<h3>The `raml-path-to-object`</h3>
<div class="content">
<raml-path-selector raml="[[raml]]" selected-path="{{selectedPath}}"></raml-path-selector>
<section class="details">
<div hidden$="[[!isMethod]]">
<h3>Selected method</h3>
<p>[[selectedObject.method]] [[selectedObject.displayName]]</p>
<p>[[selectedObject.description]]</p>
<p>[[selectedObject.fullUrl]]</p>
<div hidden$="[[!selectedParent]]">
<p>Parent resource: [[selectedParent.relativeUri]]</p>
</div>
</div>
<div hidden$="[[!isResource]]">
<h3>Selected resource</h3>
<p>[[selectedObject.relativeUri]] [[selectedObject.displayName]]</p>
<p>[[selectedObject.description]]</p>
<p>[[selectedObject.fullUrl]]</p>
<div hidden$="[[!selectedParent]]">
<p>Parent resource: [[selectedParent.relativeUri]]</p>
</div>
</div>
<div hidden$="[[!isDocumentation]]">
<h3>Selected documentation</h3>
<p>[[selectedObject.title]]</p>
</div>
<div hidden$="[[!isType]]">
<h3>Selected type</h3>
<p>[[selectedObject.key]] [[selectedObject.name]] [[selectedObject.displayName]]</p>
<p>[[selectedObject.description]]</p>
</div>
</div>
</div>
</div>
</template>
</body>
</html>