From cf2c56c7061b7ed40fdd3b40a352ddb9c9b7371f Mon Sep 17 00:00:00 2001 From: alexwl Date: Tue, 2 Oct 2018 13:17:04 +0300 Subject: Initial commit --- javascript/app/templates/components/.gitkeep | 0 .../app/templates/components/bottom-panel.hbs | 9 ++++ .../app/templates/components/expression-info.hbs | 8 +++ javascript/app/templates/components/file-tree.hbs | 8 +++ .../app/templates/components/haskell-module.hbs | 57 ++++++++++++++++++++++ .../app/templates/components/identifier-info.hbs | 39 +++++++++++++++ .../app/templates/components/identifier-name.hbs | 12 +++++ .../app/templates/components/infinite-list.hbs | 3 ++ .../app/templates/components/info-window.hbs | 12 +++++ .../components/input-with-autocomplete.hbs | 19 ++++++++ .../app/templates/components/instance-info.hbs | 10 ++++ .../app/templates/components/paginated-list.hbs | 17 +++++++ .../app/templates/components/resizable-panel.hbs | 5 ++ javascript/app/templates/components/text-file.hbs | 3 ++ .../app/templates/components/type-component.hbs | 3 ++ .../templates/components/type-signature-text.hbs | 2 + .../app/templates/components/type-signature.hbs | 10 ++++ 17 files changed, 217 insertions(+) create mode 100644 javascript/app/templates/components/.gitkeep create mode 100644 javascript/app/templates/components/bottom-panel.hbs create mode 100644 javascript/app/templates/components/expression-info.hbs create mode 100644 javascript/app/templates/components/file-tree.hbs create mode 100644 javascript/app/templates/components/haskell-module.hbs create mode 100644 javascript/app/templates/components/identifier-info.hbs create mode 100644 javascript/app/templates/components/identifier-name.hbs create mode 100644 javascript/app/templates/components/infinite-list.hbs create mode 100644 javascript/app/templates/components/info-window.hbs create mode 100644 javascript/app/templates/components/input-with-autocomplete.hbs create mode 100644 javascript/app/templates/components/instance-info.hbs create mode 100644 javascript/app/templates/components/paginated-list.hbs create mode 100644 javascript/app/templates/components/resizable-panel.hbs create mode 100644 javascript/app/templates/components/text-file.hbs create mode 100644 javascript/app/templates/components/type-component.hbs create mode 100644 javascript/app/templates/components/type-signature-text.hbs create mode 100644 javascript/app/templates/components/type-signature.hbs (limited to 'javascript/app/templates/components') diff --git a/javascript/app/templates/components/.gitkeep b/javascript/app/templates/components/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/javascript/app/templates/components/bottom-panel.hbs b/javascript/app/templates/components/bottom-panel.hbs new file mode 100644 index 0000000..26b1919 --- /dev/null +++ b/javascript/app/templates/components/bottom-panel.hbs @@ -0,0 +1,9 @@ +
+ {{yield "header"}} + + Close + +
+
+ {{yield "body"}} +
diff --git a/javascript/app/templates/components/expression-info.hbs b/javascript/app/templates/components/expression-info.hbs new file mode 100644 index 0000000..509fb24 --- /dev/null +++ b/javascript/app/templates/components/expression-info.hbs @@ -0,0 +1,8 @@ +
+ {{#each expressions as |expression|}} +
+ {{expression.sourceCode}} +
:: {{type-signature type=expression.info.exprType identifiers=identifiers currentLineNumber=currentLineNumber}} +
+ {{/each}} +
diff --git a/javascript/app/templates/components/file-tree.hbs b/javascript/app/templates/components/file-tree.hbs new file mode 100644 index 0000000..b5e38ef --- /dev/null +++ b/javascript/app/templates/components/file-tree.hbs @@ -0,0 +1,8 @@ +
+
+ {{input class="form-control" value=query placeholder="Filename"}}Hide +
+
+
+
+
diff --git a/javascript/app/templates/components/haskell-module.hbs b/javascript/app/templates/components/haskell-module.hbs new file mode 100644 index 0000000..77b9df7 --- /dev/null +++ b/javascript/app/templates/components/haskell-module.hbs @@ -0,0 +1,57 @@ +
+{{#if declarations}} +
+
+
+ {{input class="form-control" value=query placeholder="Identifier"}}{{showDeclarationsLabel}} +
+
+ {{#if showDeclarations}} +
+ +
+ {{/if}} +
+{{/if}} +{{#info-window + targetElement=selectedIdentifier + isHoveredOverIdentifier=isHoveredOverIdentifier + hasSelectedExpression=hasSelectedExpression + containerElementId="right-panel" as |section|}} + {{#if (eq section "header")}} + {{#if hasSelectedExpression}} +
Selected expressions
+ {{else}} + {{identifier-name + identifierInfo=identifierInfo + identifierOccurrence=identifierOccurrence + identifierElement=selectedIdentifier + currentPackageId=packageId + isBinder=identifierOccurrence.isBinder + currentLineNumber=currentLineNumber + findReferences=findReferences}} + {{/if}} + {{else}} + {{#unless hasSelectedExpression}} + {{identifier-info + identifierInfo=identifierInfo + identifierOccurrence=identifierOccurrence + identifiers=identifiers + currentLineNumber=currentLineNumber}} + {{else}} + {{expression-info + expressions=expressions + identifiers=identifiers + currentLineNumber=currentLineNumber}} + {{/unless}} + {{/if}} +{{/info-window}} diff --git a/javascript/app/templates/components/identifier-info.hbs b/javascript/app/templates/components/identifier-info.hbs new file mode 100644 index 0000000..7146a2e --- /dev/null +++ b/javascript/app/templates/components/identifier-info.hbs @@ -0,0 +1,39 @@ +{{#if (or identifierInfo identifierOccurrence.idOccType)}} +
+ {{#if identifierInfo}} + {{#if isNaughtyRecSel}} + This record selector can never be called because its type mentions a type variable that isn't in the result type of the constructor + {{else}} + {{type-signature + type=identifierInfo.idType + identifiers=identifiers + currentLineNumber=currentLineNumber}} + {{/if}} + {{/if}} + {{#if (and identifierInfo identifierOccurrence identifierOccurrence.idOccType)}} +
+ {{/if}} + {{#if (and identifierOccurrence identifierOccurrence.idOccType)}} + {{type-signature + type=identifierOccurrence.idOccType + identifiers=identifiers + currentLineNumber=currentLineNumber}} + {{/if}} +
+ {{{identifierInfo.doc}}} + {{{downloadedDocumentation}}} +
+ {{#if identifierOccurrence.instanceResolution}} +
+ {{/if}} +
+ {{#if identifierOccurrence.instanceResolution}} + {{instance-info + instance=identifierOccurrence.instanceResolution + identifiers=identifiers + nestedLevel=0 + currentLineNumber=currentLineNumber}} + {{/if}} +
+
+{{/if}} diff --git a/javascript/app/templates/components/identifier-name.hbs b/javascript/app/templates/components/identifier-name.hbs new file mode 100644 index 0000000..ca16e23 --- /dev/null +++ b/javascript/app/templates/components/identifier-name.hbs @@ -0,0 +1,12 @@ +
+ {{#if identifierInfo.demangledOccName}}{{identifierInfo.demangledOccName}}{{else}}{{name}}{{/if}} + {{#unless isBinder}} + {{#if location}} + {{location}} + Go to definition + {{/if}} + {{/unless}} + {{#if isExternalIdentifier}} + Find references + {{/if}} +
diff --git a/javascript/app/templates/components/infinite-list.hbs b/javascript/app/templates/components/infinite-list.hbs new file mode 100644 index 0000000..ab103d4 --- /dev/null +++ b/javascript/app/templates/components/infinite-list.hbs @@ -0,0 +1,3 @@ +{{#each renderedElements as |element|}} + {{yield element}} +{{/each}} diff --git a/javascript/app/templates/components/info-window.hbs b/javascript/app/templates/components/info-window.hbs new file mode 100644 index 0000000..003e2c5 --- /dev/null +++ b/javascript/app/templates/components/info-window.hbs @@ -0,0 +1,12 @@ +
+
+ + {{yield "header"}} +
+
+ {{yield "body"}} +
+
diff --git a/javascript/app/templates/components/input-with-autocomplete.hbs b/javascript/app/templates/components/input-with-autocomplete.hbs new file mode 100644 index 0000000..eb0100d --- /dev/null +++ b/javascript/app/templates/components/input-with-autocomplete.hbs @@ -0,0 +1,19 @@ +
+ {{input class="form-control search-input" value=query placeholder=placeholder}} +
+ {{# if items}} +
    + {{#each items as |item index|}} +
  • +
    + {{yield item}} +
    +
  • + {{/each}} +
+ {{/if}} +
+
+ +
+
diff --git a/javascript/app/templates/components/instance-info.hbs b/javascript/app/templates/components/instance-info.hbs new file mode 100644 index 0000000..b5c2fdf --- /dev/null +++ b/javascript/app/templates/components/instance-info.hbs @@ -0,0 +1,10 @@ +{{#if instance}} +
+ + instance {{type-signature type=instance.instanceType identifiers=identifiers currentLineNumber=currentLineNumber noExpand=true}} + (Go to definition) + {{#each instance.instances as |inst|}} + {{instance-info instance=inst identifiers=identifiers nestedLevel=nextNestedLevel currentLineNumber=currentLineNumber}} + {{/each}} +
+{{/if}} diff --git a/javascript/app/templates/components/paginated-list.hbs b/javascript/app/templates/components/paginated-list.hbs new file mode 100644 index 0000000..2ae9813 --- /dev/null +++ b/javascript/app/templates/components/paginated-list.hbs @@ -0,0 +1,17 @@ +
+ Found {{total}} + {{#if (or next prev)}} +   +   + + {{#if first}}{{/if}} + {{#if prev}}{{/if}} + {{firstItemOnPage}} - {{lastItemOnPage}} + {{#if next}}{{/if}} + {{#if last}}{{/if}} + + {{/if}} +
+
+ {{yield items}} +
diff --git a/javascript/app/templates/components/resizable-panel.hbs b/javascript/app/templates/components/resizable-panel.hbs new file mode 100644 index 0000000..0fd3aa7 --- /dev/null +++ b/javascript/app/templates/components/resizable-panel.hbs @@ -0,0 +1,5 @@ +
{{yield (action "hide")}} +
+ {{{hideButtonLabel}}} +
+
diff --git a/javascript/app/templates/components/text-file.hbs b/javascript/app/templates/components/text-file.hbs new file mode 100644 index 0000000..6a50453 --- /dev/null +++ b/javascript/app/templates/components/text-file.hbs @@ -0,0 +1,3 @@ +
+{{{html}}} +
diff --git a/javascript/app/templates/components/type-component.hbs b/javascript/app/templates/components/type-component.hbs new file mode 100644 index 0000000..775324e --- /dev/null +++ b/javascript/app/templates/components/type-component.hbs @@ -0,0 +1,3 @@ +{{#if (and expanded identifierInfo)}}({{/if}} +{{occName}} +{{#if (and expanded identifierInfo)}} :: {{type-signature type=identifierInfo.idType identifiers=identifiers noExpand=true}}){{/if}} diff --git a/javascript/app/templates/components/type-signature-text.hbs b/javascript/app/templates/components/type-signature-text.hbs new file mode 100644 index 0000000..505a466 --- /dev/null +++ b/javascript/app/templates/components/type-signature-text.hbs @@ -0,0 +1,2 @@ +{{!-- No newlines to get rid of spaces between spans --}} +{{#each components as |typeComponent|}}{{#if (eq typeComponent.tag "Text")}}{{typeComponent.contents}}{{else}}{{typeComponent.name}}{{/if}}{{/each}} diff --git a/javascript/app/templates/components/type-signature.hbs b/javascript/app/templates/components/type-signature.hbs new file mode 100644 index 0000000..249f1b8 --- /dev/null +++ b/javascript/app/templates/components/type-signature.hbs @@ -0,0 +1,10 @@ +{{!-- No newlines to get rid of spaces between spans --}} +{{#each components as |typeComponent|}}{{#if (eq typeComponent.tag "Text")}}{{typeComponent.contents}}{{else}}{{type-component occName=typeComponent.name internalId=typeComponent.internalId identifiers=identifiers currentLineNumber=currentLineNumber}}{{/if}}{{/each}} +{{#unless noExpand}} + {{#if type.componentsExpanded}} +
+ +
+ {{/if}} +{{/unless}} -- cgit v1.2.3