Skip to content

Commit a6fdbdf

Browse files
authored
Merge branch 'master' into rkaraivanov/toolbar-tweaks
2 parents 8720d2a + e293d83 commit a6fdbdf

File tree

41 files changed

+148
-126
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+148
-126
lines changed

.github/workflows/nodejs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
node-version: [10.x, 12.x, 14.x]
19+
node-version: [12.x, 14.x, 15.x]
2020

2121
steps:
2222
- uses: actions/checkout@v2

CHANGELOG.md

Lines changed: 23 additions & 23 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 48 additions & 48 deletions
Large diffs are not rendered by default.

projects/igniteui-angular/migrations/common/tsUtils.ts

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -223,23 +223,39 @@ export function createProjectService(serverHost: tss.server.ServerHost): tss.ser
223223
export function getTypeDefinitionAtPosition(langServ: tss.LanguageService, entryPath: string, position: number): tss.DefinitionInfo | null {
224224
const definition = langServ.getDefinitionAndBoundSpan(entryPath, position)?.definitions[0];
225225
if (!definition) { return null; }
226+
227+
// if the definition's kind is a reference, the identifier is a template variable referred in an internal/external template
226228
if (definition.kind.toString() === 'reference') {
227-
// template variable in an internal/external template
228229
return langServ.getDefinitionAndBoundSpan(entryPath, definition.textSpan.start).definitions[0];
229230
}
230231
let typeDefs = langServ.getTypeDefinitionAtPosition(entryPath, definition.textSpan.start);
232+
// if there are no type definitions found, the identifier is a ts property, referred in an internal/external template
233+
// or is a reference in a decorator
231234
if (!typeDefs) {
232-
// ts property referred in an internal/external template
233-
const classDeclaration = langServ
234-
.getProgram()
235-
.getSourceFile(definition.fileName)
235+
/*
236+
normally, the tsserver will consider non .ts files as external to the project
237+
however, we load .html files which we can handle with the Angular language service
238+
here we're only looking for definitions in a .ts source file
239+
we call the getSourceFile function which accesses a map of files, previously loaded by the tsserver
240+
at this point the map contains all .html files that we've included
241+
we have to ignore them, since the language service will attempt to parse them as .ts files
242+
*/
243+
if (!definition.fileName.endsWith('.ts')) { return null; }
244+
245+
const sourceFile = langServ.getProgram().getSourceFile(definition.fileName);
246+
if (!sourceFile) { return null; }
247+
248+
const classDeclaration = sourceFile
236249
.statements
237250
.filter(<(a: tss.Statement) => a is tss.ClassDeclaration>(m => m.kind === tss.SyntaxKind.ClassDeclaration))
238251
.find(m => m.name.getText() === definition.containerName);
239-
const member: ts.ClassElement = classDeclaration
240-
?.members
241-
.find(m => m.name.getText() === definition.name);
242-
if (!member || !member.name) { return null; }
252+
253+
// there must be at least one class declaration in the .ts file and the property must belong to it
254+
if (!classDeclaration) { return null; }
255+
256+
const member: ts.ClassElement = classDeclaration.members.find(m => m.name.getText() === definition.name);
257+
if (!member?.name) { return null; }
258+
243259
typeDefs = langServ.getTypeDefinitionAtPosition(definition.fileName, member.name.getStart() + 1);
244260
}
245261
if (typeDefs?.length) {

projects/igniteui-angular/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@
7777
"@igniteui/material-icons-extended": "^2.4.0"
7878
},
7979
"peerDependencies": {
80-
"@angular/common": "^10.0.0",
81-
"@angular/core": "^10.0.0",
82-
"@angular/animations": "^10.0.0",
83-
"@angular/forms": "^10.0.0",
80+
"@angular/common": "^11.0.0-rc.1",
81+
"@angular/core": "^11.0.0-rc.1",
82+
"@angular/animations": "^11.0.0-rc.1",
83+
"@angular/forms": "^11.0.0-rc.1",
8484
"web-animations-js": "^2.3.2"
8585
},
8686
"igxDevDependencies": {

projects/igniteui-angular/src/lib/directives/toggle/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# IgxToggle Directive
22

33
The **IgxToggle** provides a way for user to make a given content togglable.
4-
A walkthrough of how to get started can be found [here](https://www.infragistics.com/products/ignite-ui-angular/angular/components/toggle.html)
4+
A walkthrough of how to get started can be found [here](https://www.infragistics.com/products/ignite-ui-angular/angular/components/toggle)
55

66
#Usage
77
```typescript
@@ -60,7 +60,7 @@ handlers when the toggle is opened and respectively closed.
6060

6161
The **IgxToggleAction** provides a way for user to Open/Close(toggle) every Component/Directive which implements **IToggleView** interface by providing the reference to this particular Component/Directive or ID which is registered into **IgxNavigationService**. It is also applicable upon **IgxToggle**. When applied **IgxToggleAction** will set its host element as the position strategy target.
6262

63-
You can see it in action [here](https://www.infragistics.com/products/ignite-ui-angular/angular/components/toggle.html)
63+
You can see it in action [here](https://www.infragistics.com/products/ignite-ui-angular/angular/components/toggle)
6464

6565
## Usage
6666
```typescript

projects/igniteui-angular/src/lib/directives/tooltip/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ _Directives_
55

66
## Description
77
The **IgxTooltip** directive provides us a way to make a given element a tooltip. Then we can assign it to be a tooltip for another element (for example a button) by using the **IgxTooltipTarget** directive.
8-
A walkthrough of how to get started can be found [here](https://www.infragistics.com/products/ignite-ui-angular/angular/components/tooltip.html).
8+
A walkthrough of how to get started can be found [here](https://www.infragistics.com/products/ignite-ui-angular/angular/components/tooltip).
99

1010
## Usage
1111
First we will have to import the IgxTooltipModule.

projects/igniteui-angular/src/lib/directives/tooltip/tooltip.directive.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface ITooltipHideEventArgs extends IBaseEventArgs {
2727

2828
/**
2929
* **Ignite UI for Angular Tooltip Target** -
30-
* [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/tooltip.html)
30+
* [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/tooltip)
3131
*
3232
* The Ignite UI for Angular Tooltip Target directive is used to mark an HTML element in the markup as one that has a tooltip.
3333
* The tooltip target is used in combination with the Ignite UI for Angular Tooltip by assigning the exported tooltip reference to the
@@ -411,7 +411,7 @@ export class IgxTooltipTargetDirective extends IgxToggleActionDirective implemen
411411
let NEXT_ID = 0;
412412
/**
413413
* **Ignite UI for Angular Tooltip** -
414-
* [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/tooltip.html)
414+
* [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/tooltip)
415415
*
416416
* The Ignite UI for Angular Tooltip directive is used to mark an HTML element in the markup as one that should behave as a tooltip.
417417
* The tooltip is used in combination with the Ignite UI for Angular Tooltip Target by assigning the exported tooltip reference to the

projects/igniteui-angular/src/lib/drop-down/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
**igxDropDown** displays a scrollable list of items which may be visually grouped and supports selection of a single item. Clicking or tapping an item selects it and closes the Drop Down.
55

6-
A walkthrough of how to get started can be found [here](https://www.infragistics.com/products/ignite-ui-angular/angular/components/drop_down.html)
6+
A walkthrough of how to get started can be found [here](https://www.infragistics.com/products/ignite-ui-angular/angular/components/drop-down)
77

88
# Usage
99
## Drop downs are done by adding **igxDropDownListItems** to **igxDropDown** component

projects/igniteui-angular/src/lib/drop-down/drop-down.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import { DisplayDensityToken, IDisplayDensityOptions } from '../core/density';
3434

3535
/**
3636
* **Ignite UI for Angular DropDown** -
37-
* [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/drop_down.html)
37+
* [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/drop-down)
3838
*
3939
* The Ignite UI for Angular Drop Down displays a scrollable list of items which may be visually grouped and
4040
* supports selection of a single item. Clicking or tapping an item selects it and closes the Drop Down

0 commit comments

Comments
 (0)