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) -%}
|
|
|
|
{%- if doc.members.length %}{% for member in doc.members %}{% if not member.internal %}
|
|
|
|
<a class="code-anchor" href="{$ doc.path $}#{$ member.anchor $}">{$ renderMember(member, 1) $}</a>{% endif %}{% endfor %}{% endif %}
|
|
|
|
{%- 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 %}
|
|
|
|
{%- endmacro -%}
|
|
|
|
|
2017-07-13 08:33:48 -04:00
|
|
|
{%- macro renderMember(member, truncateLines) -%}
|
2017-06-29 17:23:27 -04:00
|
|
|
{%- if member.accessibility !== 'public' %}{$ member.accessibility $} {% endif -%}
|
|
|
|
{%- if member.isGetAccessor %}get {% endif -%}
|
|
|
|
{%- if member.isSetAccessor %}set {% endif -%}
|
|
|
|
{%- if member.isStatic %}static {% endif -%}
|
2017-07-13 08:33:48 -04:00
|
|
|
{$ member.name $}{$ member.typeParameters | escape $}{$ params.paramList(member.parameters, truncateLines) | trim $}
|
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 -%}
|
|
|
|
|
|
|
|
{%- macro renderMemberDetail(member, cssClass) -%}
|
|
|
|
<div class="{$ cssClass $}">
|
|
|
|
<a id="{$ member.anchor $}"></a>
|
2017-07-12 18:06:02 -04:00
|
|
|
<code-example hideCopy="true" class="no-box api-heading">{$ renderMember(member) $}</code-example>
|
2017-06-29 17:23:27 -04:00
|
|
|
{%- if not member.notYetDocumented %}
|
|
|
|
{$ member.description | marked $}
|
|
|
|
{% endif -%}
|
|
|
|
</div>
|
|
|
|
{% endmacro -%}
|
|
|
|
|
|
|
|
{% macro renderMemberDetails(members, containerClass, itemClass, titleText) %}
|
|
|
|
{% if members.length %}
|
|
|
|
<section class="{$ containerClass $}">
|
|
|
|
<h2>{$ titleText $}</h2>
|
|
|
|
{% for member in members %}{% if not member.internal %}
|
|
|
|
{$ renderMemberDetail(member, itemClass) $}
|
2017-07-12 18:06:02 -04:00
|
|
|
{% if member.overloads.length %}
|
|
|
|
<details class="overloads">
|
|
|
|
<summary>Overloads</summary>
|
|
|
|
<div class="detail-contents">
|
|
|
|
{% for overload in member.overloads %}
|
|
|
|
{$ renderMemberDetail(overload, itemClass + '-overload') $}
|
2017-07-13 17:20:10 -04:00
|
|
|
{% if not loop.last %}<hr>{% endif %}
|
2017-07-12 18:06:02 -04:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</details>
|
|
|
|
{% endif %}
|
|
|
|
{% if not loop.last %}<hr class="hr-margin">{% endif %}
|
2017-06-29 17:23:27 -04:00
|
|
|
{% endif %}{% endfor %}
|
|
|
|
</section>
|
|
|
|
{% endif %}
|
|
|
|
{% endmacro %}
|