2018-05-23 17:56:05 -04:00
|
|
|
{% import "lib/githubLinks.html" as github -%}
|
2017-06-29 17:23:27 -04:00
|
|
|
{% import "lib/paramList.html" as params -%}
|
|
|
|
|
|
|
|
{%- macro renderHeritage(exportDoc) -%}
|
|
|
|
{%- if exportDoc.extendsClauses.length %} extends {% for clause in exportDoc.extendsClauses -%}
|
2017-08-28 12:46:32 -04:00
|
|
|
<a class="code-anchor" href="{$ clause.doc.path $}">{$ clause.text $}</a>{% if not loop.last %}, {% endif -%}
|
2017-06-29 17:23:27 -04:00
|
|
|
{% endfor %}{% endif %}
|
|
|
|
{%- if exportDoc.implementsClauses.length %} implements {% for clause in exportDoc.implementsClauses -%}
|
2017-08-28 12:46:32 -04:00
|
|
|
<a class="code-anchor" href="{$ clause.doc.path $}">{$ clause.text $}</a>{% if not loop.last %}, {% endif -%}
|
2017-06-29 17:23:27 -04:00
|
|
|
{% endfor %}{% endif %}
|
|
|
|
{%- endmacro -%}
|
|
|
|
|
2017-08-28 12:46:32 -04:00
|
|
|
{%- macro renderMembers(doc) -%}
|
2018-02-25 05:40:21 -05:00
|
|
|
{%- for member in doc.staticProperties %}{% if not member.internal %}
|
|
|
|
<a class="code-anchor" href="{$ doc.path $}#{$ member.anchor | urlencode $}">{$ renderMemberSyntax(member, 1) $}</a>{% endif %}{% endfor -%}
|
|
|
|
{% for member in doc.staticMethods %}{% if not member.internal %}
|
|
|
|
<a class="code-anchor" href="{$ doc.path $}#{$ member.anchor | urlencode $}">{$ renderMemberSyntax(member, 1) $}</a>{% endif %}{% endfor -%}
|
|
|
|
{% if doc.constructorDoc and not doc.constructorDoc.internal %}
|
|
|
|
<a class="code-anchor" href="{$ doc.path $}#{$ doc.constructorDoc.anchor | urlencode $}">{$ renderMemberSyntax(doc.constructorDoc, 1) $}</a>{% endif -%}
|
|
|
|
{% for member in doc.properties %}{% if not member.internal %}
|
|
|
|
<a class="code-anchor" href="{$ doc.path $}#{$ member.anchor | urlencode $}">{$ renderMemberSyntax(member, 1) $}</a>{% endif %}{% endfor -%}
|
|
|
|
{% for member in doc.methods %}{% if not member.internal %}
|
|
|
|
<a class="code-anchor" href="{$ doc.path $}#{$ member.anchor | urlencode $}">{$ renderMemberSyntax(member, 1) $}</a>{% endif %}{% endfor -%}
|
|
|
|
|
|
|
|
{%- for ancestor in doc.extendsClauses %}{% if ancestor.doc %}
|
|
|
|
|
|
|
|
// inherited from <a class="code-anchor" href="{$ ancestor.doc.path $}">{$ ancestor.doc.id $}</a>{$ renderMembers(ancestor.doc) $}{% endif %}{% endfor -%}
|
2017-08-28 12:46:32 -04:00
|
|
|
{%- endmacro -%}
|
|
|
|
|
2018-02-08 10:00:53 -05:00
|
|
|
{%- macro renderMemberSyntax(member, truncateLines) -%}
|
2018-09-21 09:06:57 -04:00
|
|
|
{%- if member.boundTo %}<span class="property-binding">@{$ member.boundTo.type $}(
|
|
|
|
{%- if member.boundTo.propertyName != member.boundTo.bindingName %}'{$ member.boundTo.bindingName $}'{% endif -%}
|
|
|
|
)</span><br>{% endif -%}
|
2017-06-29 17:23:27 -04:00
|
|
|
{%- if member.accessibility !== 'public' %}{$ member.accessibility $} {% endif -%}
|
2018-03-02 17:53:50 -05:00
|
|
|
{%- if member.isAbstract %}abstract {% endif -%}
|
|
|
|
{%- if member.isStatic %}static {% endif -%}
|
2018-09-21 09:06:57 -04:00
|
|
|
<span class="member-name">{$ member.name $}</span>{$ member.typeParameters | escape $}{% if not member.isGetAccessor %}{$ params.paramList(member.parameters, truncateLines) | trim $}{% endif %}
|
2017-06-29 17:23:27 -04:00
|
|
|
{%- if member.isOptional %}?{% endif -%}
|
2017-07-13 08:33:48 -04:00
|
|
|
{$ params.returnType(member.type) | trim | truncateCode(truncateLines) $}
|
2017-06-29 17:23:27 -04:00
|
|
|
{%- endmacro -%}
|
|
|
|
|
2018-02-08 10:00:53 -05:00
|
|
|
{%- macro renderOverloadInfo(overload, cssClass, method) -%}
|
2018-10-18 15:53:07 -04:00
|
|
|
<div class="overload-info">
|
|
|
|
{% if overload.shortDescription and (overload.shortDescription != method.shortDescription) %}
|
|
|
|
<div class="short-description">
|
|
|
|
{$ overload.shortDescription | marked $}
|
|
|
|
</div>{% endif %}
|
2018-02-08 10:00:53 -05:00
|
|
|
|
2018-10-18 15:53:07 -04:00
|
|
|
<code-example language="ts" hideCopy="true" linenums="false" class="no-box api-heading">{$ renderMemberSyntax(overload) $}</code-example>
|
2018-02-08 10:00:53 -05:00
|
|
|
|
2018-10-18 15:53:07 -04:00
|
|
|
{% if overload.deprecated !== undefined %}
|
|
|
|
<div class="deprecated">
|
|
|
|
{$ ('**Deprecated** ' + overload.deprecated) | marked $}
|
|
|
|
</div>{% endif %}
|
2018-06-14 17:06:59 -04:00
|
|
|
|
2018-10-18 15:53:07 -04:00
|
|
|
<h6 class="no-anchor">Parameters</h6>
|
|
|
|
{$ params.renderParameters(overload.parameterDocs, cssClass + '-parameters', cssClass + '-parameter', true) $}
|
2018-08-25 10:44:56 -04:00
|
|
|
|
2018-10-18 15:53:07 -04:00
|
|
|
{% if overload.type or overload.returns.type %}
|
|
|
|
<h6 class="no-anchor">Returns</h6>
|
|
|
|
{% marked %}`{$ (overload.type or overload.returns.type) $}`{% if overload.returns %}: {$ overload.returns.description $}{% endif %}{% endmarked %}
|
|
|
|
{% endif %}
|
2018-03-04 15:57:42 -05:00
|
|
|
|
|
|
|
|
2018-10-18 15:53:07 -04:00
|
|
|
{% if overload.throws.length %}
|
|
|
|
<h6 class="no-anchor">Throws</h6>
|
|
|
|
{% for error in overload.throws %}
|
|
|
|
{% marked %}`{$ (error.typeList or 'Error') $}` {$ error.description $}{% endmarked %}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2018-03-04 15:57:42 -05:00
|
|
|
|
2018-10-18 15:53:07 -04:00
|
|
|
{% if overload.description and (overload.description != method.description) -%}
|
|
|
|
<div class="description">
|
|
|
|
{$ overload.description | marked $}
|
|
|
|
</div>
|
|
|
|
{%- endif %}
|
2018-03-04 15:57:42 -05:00
|
|
|
</div>
|
2018-02-08 10:00:53 -05:00
|
|
|
{%- endmacro -%}
|
|
|
|
|
2018-05-23 17:56:05 -04:00
|
|
|
{%- macro renderMethodDetail(versionInfo, method, cssClass) -%}
|
2018-02-08 10:00:53 -05:00
|
|
|
<a id="{$ method.anchor $}"></a>
|
|
|
|
<table class="is-full-width method-table {$ cssClass $}">
|
2018-10-18 15:53:07 -04:00
|
|
|
{% if method.name !== 'constructor' %}<thead><tr><th>
|
2018-07-17 05:14:18 -04:00
|
|
|
<div class="with-github-links">
|
2018-07-18 14:34:59 -04:00
|
|
|
<h3>
|
|
|
|
{% if method.isCallMember %}<i>call signature</i>
|
|
|
|
{% elseif method.isNewMember %}<i>construct signature</i>
|
|
|
|
{% else %}{$ method.name $}()
|
|
|
|
{% endif %}
|
|
|
|
</h3>
|
|
|
|
{$ github.githubLinks(method, versionInfo) $}
|
2018-07-17 05:14:18 -04:00
|
|
|
</div>
|
2018-05-23 17:56:05 -04:00
|
|
|
</th></tr></thead>{% endif %}
|
2018-02-08 10:00:53 -05:00
|
|
|
<tbody>
|
2018-03-04 15:57:42 -05:00
|
|
|
{% if method.shortDescription %}<tr>
|
|
|
|
<td class="short-description">
|
|
|
|
{$ method.shortDescription | marked $}
|
2019-01-11 06:16:27 -05:00
|
|
|
{%- if method.see.length %}
|
|
|
|
<p>See also:</p>
|
|
|
|
<ul>
|
|
|
|
{% for see in method.see %}
|
|
|
|
<li>{$ see | marked $}</li>{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
2018-02-08 10:00:53 -05:00
|
|
|
</td>
|
2018-02-22 15:54:38 -05:00
|
|
|
</tr>{% endif %}
|
2018-02-08 10:00:53 -05:00
|
|
|
{% if method.overloads.length == 0 %}
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
{$ renderOverloadInfo(method, cssClass + '-overload', method) $}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% elseif method.overloads.length < 3 -%}
|
2018-08-25 10:44:56 -04:00
|
|
|
{% if method.isAbstract %}
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
{$ renderOverloadInfo(method, cssClass + '-overload', method) $}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
2018-02-08 10:00:53 -05:00
|
|
|
{% for overload in method.overloads -%}
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
{$ renderOverloadInfo(overload, cssClass + '-overload', method) $}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor -%}
|
|
|
|
{% else -%}
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<details class="overloads">
|
2018-07-18 14:34:59 -04:00
|
|
|
<summary>
|
|
|
|
<div class="icon-action-header">
|
2018-10-18 15:53:07 -04:00
|
|
|
<h4 class="no-anchor">{$ method.overloads.length $} overloads...</h4>
|
2018-08-13 02:23:45 -04:00
|
|
|
<a>
|
|
|
|
<span class="show-all">Show All</span>
|
2018-10-18 15:53:07 -04:00
|
|
|
<span class="collapse-all">Hide All</span>
|
2018-08-13 02:23:45 -04:00
|
|
|
<i class="material-icons expand">expand_more</i>
|
|
|
|
</a>
|
2018-07-18 14:34:59 -04:00
|
|
|
</div>
|
|
|
|
</summary>
|
2018-02-08 10:00:53 -05:00
|
|
|
<div class="detail-contents">
|
2018-07-18 14:34:59 -04:00
|
|
|
{% if method.isAbstract %}
|
|
|
|
{$ renderOverloadInfo(method, cssClass + '-overload', method) $}
|
|
|
|
<hr class="hr-margin fullwidth">
|
|
|
|
{% endif %}
|
|
|
|
{% for overload in method.overloads %}
|
2018-10-18 15:53:07 -04:00
|
|
|
<h5 class="no-anchor">Overload #{$ loop.index $}</h5>
|
|
|
|
{$ renderOverloadInfo(overload, cssClass + '-overload', method) $}
|
|
|
|
{% if not loop.last %}<hr class="hr-margin">{% endif %}
|
|
|
|
{% endfor %}
|
2018-02-08 10:00:53 -05:00
|
|
|
</div>
|
|
|
|
</details>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
2018-05-18 10:07:11 -04:00
|
|
|
|
|
|
|
{% if method.description -%}
|
|
|
|
<tr>
|
2018-03-04 15:57:42 -05:00
|
|
|
<td class="description">
|
2018-08-13 03:13:03 -04:00
|
|
|
{$ method.description | marked({ h3: 'h5' }) $}
|
2018-03-04 15:57:42 -05:00
|
|
|
</td>
|
2018-05-18 10:07:11 -04:00
|
|
|
</tr>
|
|
|
|
{%- endif %}
|
|
|
|
|
|
|
|
{% if method.usageNotes -%}
|
|
|
|
<tr>
|
|
|
|
<td class="usage-notes">
|
2018-08-13 03:13:03 -04:00
|
|
|
<h4 id="{$ method.anchor $}-usage-notes">Usage Notes</h4>
|
|
|
|
{$ method.usageNotes | marked({ h3: 'h5' }) $}
|
2018-05-18 10:07:11 -04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{%- endif %}
|
|
|
|
</tbody>
|
2018-02-08 10:00:53 -05:00
|
|
|
</table>
|
2017-06-29 17:23:27 -04:00
|
|
|
{% endmacro -%}
|
|
|
|
|
2018-05-23 17:56:05 -04:00
|
|
|
{%- macro renderMethodDetails(versionInfo, methods, containerClass, itemClass, headingText) -%}
|
2018-02-27 04:07:29 -05:00
|
|
|
{% set nonInternalMethods = methods | filterByPropertyValue('internal', undefined) %}
|
|
|
|
{% if nonInternalMethods.length %}
|
2017-06-29 17:23:27 -04:00
|
|
|
<section class="{$ containerClass $}">
|
2018-02-08 10:00:53 -05:00
|
|
|
<h2>{$ headingText $}</h2>
|
2018-02-27 04:07:29 -05:00
|
|
|
{% for member in nonInternalMethods %}
|
2018-05-23 17:56:05 -04:00
|
|
|
{$ renderMethodDetail(versionInfo, member, itemClass) $}
|
2018-02-27 04:07:29 -05:00
|
|
|
{% endfor %}
|
2017-06-29 17:23:27 -04:00
|
|
|
</section>
|
|
|
|
{% endif %}
|
2018-02-08 10:00:53 -05:00
|
|
|
{%- endmacro -%}
|
|
|
|
|
|
|
|
|
2018-09-20 07:57:34 -04:00
|
|
|
{%- macro renderProperties(properties, containerClass, propertyClass, headingText, headings, headingLevel = 2) -%}
|
2018-02-27 04:07:29 -05:00
|
|
|
{% set nonInternalProperties = properties | filterByPropertyValue('internal', undefined) %}
|
|
|
|
{% if nonInternalProperties.length -%}
|
|
|
|
<section class="{$ containerClass $}">
|
2018-09-20 07:57:34 -04:00
|
|
|
<h{$ headingLevel $}>{$ headingText $}</h{$ headingLevel $}>
|
2018-05-23 13:31:54 -04:00
|
|
|
<table class="is-full-width list-table property-table">
|
2018-02-27 04:07:29 -05:00
|
|
|
<thead>
|
2018-05-12 08:30:19 -04:00
|
|
|
<tr>
|
|
|
|
<th>{$ headings[0] or 'Property' $}</th>
|
2018-09-26 08:31:52 -04:00
|
|
|
<th>{$ headings[1] or 'Description' $}</th>
|
2018-05-12 08:30:19 -04:00
|
|
|
</tr>
|
2018-02-27 04:07:29 -05:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for property in nonInternalProperties %}
|
|
|
|
<tr class="{$ propertyClass $}">
|
2018-09-19 16:25:30 -04:00
|
|
|
<td>
|
2018-09-21 09:06:57 -04:00
|
|
|
<a id="{$ property.anchor $}"></a>
|
|
|
|
<code>{$ renderMemberSyntax(property) $}</code>
|
2018-09-19 16:25:30 -04:00
|
|
|
</td>
|
2018-02-27 04:07:29 -05:00
|
|
|
<td>
|
2018-03-04 16:11:54 -05:00
|
|
|
{%- if (property.isGetAccessor or property.isReadonly) and not property.isSetAccessor %}<span class='read-only-property'>Read-only.</span>{% endif %}
|
2018-09-26 08:39:51 -04:00
|
|
|
{%- if property.isSetAccessor and not property.isGetAccessor %}<span class='write-only-property'>Write-only.</span>{% endif %}
|
2019-01-11 06:16:27 -05:00
|
|
|
{% if property.constructorParamDoc %} <span class='from-constructor'>Declared in constructor.</span>{% endif %}
|
2018-03-04 15:57:42 -05:00
|
|
|
{% if property.shortDescription %}{$ property.shortDescription | marked $}{% endif %}
|
2018-02-27 04:07:29 -05:00
|
|
|
{$ (property.description or property.constructorParamDoc.description) | marked $}
|
2019-01-11 06:16:27 -05:00
|
|
|
{%- if property.see.length %}
|
|
|
|
<p>See also:</p>
|
|
|
|
<ul>
|
|
|
|
{% for see in property.see %}
|
|
|
|
<li>{$ see | marked $}</li>{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
2018-02-27 04:07:29 -05:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</section>
|
2018-02-08 10:00:53 -05:00
|
|
|
{%- endif -%}
|
|
|
|
{%- endmacro -%}
|
2018-09-21 09:06:57 -04:00
|
|
|
|
|
|
|
{% macro renderDirectiveAncestors(doc, collectionName) %}
|
|
|
|
{%- for ancestor in doc.extendsClauses %}{% if ancestor.doc %}
|
|
|
|
{% set nonInternalMembers = ancestor.doc[collectionName] | filterByPropertyValue('internal', undefined) %}
|
|
|
|
{% if nonInternalMembers.length -%}
|
|
|
|
<section class="inherited-members-list">
|
2018-10-11 02:58:07 -04:00
|
|
|
<h3>Inherited from <code><a class="code-anchor" href="{$ ancestor.doc.path $}">{$ ancestor.doc.name $}</a></code></h3>
|
2018-09-21 09:06:57 -04:00
|
|
|
<ul>
|
|
|
|
{% for member in nonInternalMembers %}
|
|
|
|
<li>
|
|
|
|
<code><a class="code-anchor" href="{$ ancestor.doc.path $}#{$ member.anchor | urlencode $}">{$ renderMemberSyntax(member) $}</a></code>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
{% endif %}
|
|
|
|
{$ renderDirectiveAncestors(ancestor.doc, collectionName) $}
|
|
|
|
{% endif %}{% endfor -%}
|
|
|
|
{% endmacro %}
|
|
|
|
|
|
|
|
{% macro renderDirectiveProperties(doc, heading) %}
|
|
|
|
{$ renderProperties(doc.properties, 'instance-properties', 'instance-property', heading) $}
|
|
|
|
{$ renderDirectiveAncestors(doc, 'properties') $}
|
|
|
|
{% endmacro %}
|