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-03-04 15:57:42 -05:00
|
|
|
{% 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-06-14 17:06:59 -04:00
|
|
|
<code-example language="ts" hideCopy="true" linenums="false" class="no-box api-heading">{$ renderMemberSyntax(overload) $}</code-example>
|
|
|
|
|
2018-08-25 10:44:56 -04:00
|
|
|
{% if overload.deprecated !== undefined %}
|
|
|
|
<div class="deprecated">
|
|
|
|
{$ ('**Deprecated** ' + overload.deprecated) | marked $}
|
|
|
|
</div>{% endif %}
|
|
|
|
|
2018-07-18 14:34:59 -04:00
|
|
|
<h6 class="no-anchor">Parameters</h6>
|
2018-03-04 15:57:42 -05:00
|
|
|
{$ params.renderParameters(overload.parameterDocs, cssClass + '-parameters', cssClass + '-parameter') $}
|
2018-02-08 10:00:53 -05:00
|
|
|
|
2018-03-04 15:57:42 -05:00
|
|
|
{% if overload.type or overload.returns.type %}
|
2018-07-18 14:34:59 -04:00
|
|
|
<h6 class="no-anchor">Returns</h6>
|
2018-03-04 15:57:42 -05:00
|
|
|
{% marked %}`{$ (overload.type or overload.returns.type) $}`{% if overload.returns %}: {$ overload.returns.description $}{% endif %}{% endmarked %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
{% if overload.throws.length %}
|
2018-07-18 14:34:59 -04:00
|
|
|
<h6 class="no-anchor">Throws</h6>
|
2018-03-04 15:57:42 -05:00
|
|
|
{% for error in overload.throws %}
|
|
|
|
{% marked %}`{$ (error.typeList or 'Error') $}` {$ error.description $}{% endmarked %}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if overload.description and (overload.description != method.description) -%}
|
|
|
|
<div class="description">
|
|
|
|
{$ overload.description | marked $}
|
|
|
|
</div>
|
|
|
|
{%- endif %}
|
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-07-18 14:34:59 -04:00
|
|
|
{% if method.name !== 'constructor' %}<thead><tr><th class="icon-action-header">
|
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 $}
|
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">
|
|
|
|
<h4 class="no-anchor">Overloads</h4>
|
2018-08-13 02:23:45 -04:00
|
|
|
<a>
|
|
|
|
<span class="show-all">Show All</span>
|
|
|
|
<span class="collapse-all">Collapse All</span>
|
|
|
|
<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-08-13 02:23:45 -04:00
|
|
|
<details class="overload"{% if loop.first %} open{% endif %}>
|
|
|
|
<summary>
|
|
|
|
<div class="icon-action-header">
|
|
|
|
<h5 class="no-anchor">Overload #{$ loop.index $} of {$ method.overloads.length $}</h5>
|
|
|
|
<a><i class="material-icons expand">expand_more</i></a>
|
|
|
|
</div>
|
|
|
|
</summary>
|
2018-02-08 10:00:53 -05:00
|
|
|
{$ renderOverloadInfo(overload, cssClass + '-overload', method) $}
|
2018-07-18 14:34:59 -04:00
|
|
|
{% if not loop.last %}<hr class="hr-margin">{% endif %}
|
2018-08-13 02:23:45 -04:00
|
|
|
</details>
|
2018-02-08 10:00:53 -05:00
|
|
|
{% endfor %}
|
|
|
|
</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-05-18 10:07:11 -04:00
|
|
|
{$ method.description | marked({ h3: 'h4' }) $}
|
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">
|
|
|
|
{$ method.usageNotes | marked({ h3: 'h4' }) $}
|
|
|
|
</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 %}
|
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 $}
|
|
|
|
{% if property.constructorParamDoc %} <span class='from-constructor'>Declared in constructor.</span>{% endif %}
|
|
|
|
</td>
|
|
|
|
</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 %}
|