Skip to content

Commit 68f3581

Browse files
authored
Package upgrades, Prettier alignment (#38)
- Package upgrades (non-breaking) - Align repo to Prettier 1.15.3 - [includes] Revert decorators to their previous position in components, before the change in 1.14.
1 parent 13ff801 commit 68f3581

File tree

117 files changed

+12991
-9076
lines changed

Some content is hidden

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

117 files changed

+12991
-9076
lines changed

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
22
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
3-
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
3+
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ For more information see the [Code of Conduct FAQ](https://opensource.microsoft.
1414
or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
1515

1616
## Pull Requests Reviews
17+
1718
This is a simple guide to assist in reviewing Github pull requests locally within VS Code.
1819

1920
See: https://gist.github.com/piscisaureus/3342247
@@ -66,4 +67,4 @@ Fast-forward
6667
...
6768
```
6869

69-
Note: "git pull" did not work for me by itself for the PR branch... Perhaps "git pull origin".
70+
Note: "git pull" did not work for me by itself for the PR branch... Perhaps "git pull origin".

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
[![npm version](https://badge.fury.io/js/%40angular-react%2Fcore.svg)](https://www.npmjs.com/package/@angular-react/core)
44

5-
Industry trends, organizational pressures, and other factors can lead to mandates regarding the use of component libraries or migration from one technology to another. In the case of [Office UI Fabric][fab], where its use is required, the client must be written in React (there is no Angular component library for the latest version). Rewrite from Angular to React may be cost-prohibitive or ill advised for other reasons.
5+
Industry trends, organizational pressures, and other factors can lead to mandates regarding the use of component libraries or migration from one technology to another. In the case of [Office UI Fabric][fab], where its use is required, the client must be written in React (there is no Angular component library for the latest version). Rewrite from Angular to React may be cost-prohibitive or ill advised for other reasons.
66

7-
Use of Angular-React allows consuming any React elements, but specifically Office UI Fabric, within an Angular [2+] application. The library of wrappers for Office UI Fabric simplifies the use of these components with Angular. However, any React code can make use of the custom Angular-React renderer.
7+
Use of Angular-React allows consuming any React elements, but specifically Office UI Fabric, within an Angular [2+] application. The library of wrappers for Office UI Fabric simplifies the use of these components with Angular. However, any React code can make use of the custom Angular-React renderer.
88

99
### Quick links
10+
1011
[@angular-react/fabric](https://www.npmjs.com/package/@angular-react/fabric) |
1112
[Documentation, quick start, and guides][ard] |
1213
[Demo][ard-demo] |
@@ -15,15 +16,18 @@ Use of Angular-React allows consuming any React elements, but specifically Offic
1516
[Office UI Fabric](https://developer.microsoft.com/en-us/fabric)
1617

1718
### Typical Use Cases
19+
1820
- Use React component libraries with Angular
1921
- Incrementally rewrite an Angular application into React (moving from atomic/leaf nodes upward into full features/pages until the entire app is re-written)
2022

2123
## Libraries
24+
2225
- [**core**][lib-core]: Includes the Renderer and supporting logic to render Angular components with React implementations as React components.
2326
- [**fabric**][lib-fab]: The light-weight Angular component wrappers that expose the Fabric React component api through common Angular components (including both imperative AND declrative syntax in many cases).
2427

2528
# Roadmap
26-
Initial work to prove the feasibility of adapting the Angular Renderer to output React managed components has concluded. We have moved beyond the initial simple Fabric components and expanded coverage to much of the available [Office UI Fabric][fab-c] component library.
29+
30+
Initial work to prove the feasibility of adapting the Angular Renderer to output React managed components has concluded. We have moved beyond the initial simple Fabric components and expanded coverage to much of the available [Office UI Fabric][fab-c] component library.
2731

2832
In the coming months we will continue to refine the component implementations as we use the angular-react core and fabric libraries in 2 real-world consumer facing production applications.
2933

@@ -41,4 +45,4 @@ You can look through the issues (which should be up-to-date on who is working on
4145
[fab]: https://developer.microsoft.com/en-us/fabric
4246
[fab-c]: https://developer.microsoft.com/en-us/fabric#/components
4347
[lib-core]: https://www.npmjs.com/package/@angular-react/core
44-
[lib-fab]: https://www.npmjs.com/package/@angular-react/fabric
48+
[lib-fab]: https://www.npmjs.com/package/@angular-react/fabric

apps/demo/karma.conf.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
21
// Karma configuration file, see link for more information
32
// https://karma-runner.github.io/1.0/config/configuration-file.html
43

5-
module.exports = function (config) {
4+
module.exports = function(config) {
65
config.set({
76
basePath: '',
87
frameworks: ['jasmine', '@angular-devkit/build-angular'],
@@ -11,23 +10,22 @@ module.exports = function (config) {
1110
require('karma-chrome-launcher'),
1211
require('karma-jasmine-html-reporter'),
1312
require('karma-coverage-istanbul-reporter'),
14-
require('@angular-devkit/build-angular/plugins/karma')
13+
require('@angular-devkit/build-angular/plugins/karma'),
1514
],
1615
client: {
17-
clearContext: false // leave Jasmine Spec Runner output visible in browser
16+
clearContext: false, // leave Jasmine Spec Runner output visible in browser
1817
},
1918
coverageIstanbulReporter: {
2019
dir: require('path').join(__dirname, '../../coverage'),
2120
reports: ['html', 'lcovonly'],
22-
fixWebpackSourcePaths: true
21+
fixWebpackSourcePaths: true,
2322
},
2423
reporters: ['progress', 'kjhtml'],
2524
port: 9876,
2625
colors: true,
2726
logLevel: config.LOG_INFO,
2827
autoWatch: true,
2928
browsers: ['Chrome'],
30-
singleRun: false
29+
singleRun: false,
3130
});
3231
};
33-

apps/demo/src/404.html

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,19 @@
11
<html lang="en">
2+
<head>
3+
<meta charset="utf-8" />
24

3-
<head>
4-
<meta charset="utf-8" />
5+
<title>Angular-React Demo</title>
56

6-
<title>Angular-React Demo</title>
7+
<script>
8+
// Store the URL the user was trying to access when receiving the 404.
9+
sessionStorage.redirect = location.href;
10+
</script>
711

8-
<script>
9-
// Store the URL the user was trying to access when receiving the 404.
10-
sessionStorage.redirect = location.href;
11-
</script>
12-
13-
<!-- Immediately redirect to the base URL so we can use the SPA routing. -->
14-
<meta http-equiv="refresh" content="0;URL='https://microsoft.github.io/angular-react/demo/'"></meta>
15-
</head>
16-
17-
<body>
18-
<!-- IE required at least 512 bytes of data to show non-default 404. -->
19-
20-
21-
22-
</body>
23-
24-
25-
</body>
12+
<!-- Immediately redirect to the base URL so we can use the SPA routing. -->
13+
<meta http-equiv="refresh" content="0;URL='https://microsoft.github.io/angular-react/demo/'" />
14+
</head>
2615

16+
<body>
17+
<!-- IE required at least 512 bytes of data to show non-default 404. -->
18+
</body>
2719
</html>

apps/demo/src/app/app.component.html

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,24 +117,56 @@ <h2>Getting up and running...</h2>
117117
<fab-calendar [strings]="strings" (onSelectDate)="onSelectDate($event)"></fab-calendar>
118118

119119
<fab-marquee-selection [isEnabled]="marqueeEnabled" [selection]="selection">
120-
<fab-details-list [selection]="selection" [items]="detailItems" (onColumnHeaderClick)="onColumnHeaderClicked($event)">
120+
<fab-details-list
121+
[selection]="selection"
122+
[items]="detailItems"
123+
(onColumnHeaderClick)="onColumnHeaderClicked($event)"
124+
>
121125
<columns>
122-
<fab-details-list-column key="column-1" [minWidth]="150" name="Column #1" fieldName="field1" [isResizable]="true">
126+
<fab-details-list-column
127+
key="column-1"
128+
[minWidth]="150"
129+
name="Column #1"
130+
fieldName="field1"
131+
[isResizable]="true"
132+
>
123133
</fab-details-list-column>
124-
<fab-details-list-column key="column-2" [minWidth]="150" name="Column #2" fieldName="field2" [isResizable]="true">
134+
<fab-details-list-column
135+
key="column-2"
136+
[minWidth]="150"
137+
name="Column #2"
138+
fieldName="field2"
139+
[isResizable]="true"
140+
>
125141
</fab-details-list-column>
126-
<fab-details-list-column key="column-3" [minWidth]="150" name="Custom Column" fieldName="field3" [isResizable]="true">
142+
<fab-details-list-column
143+
key="column-3"
144+
[minWidth]="150"
145+
name="Custom Column"
146+
fieldName="field3"
147+
[isResizable]="true"
148+
>
127149
<render>
128-
<ng-template let-index="index">
129-
Custom content for index {{ index }}
130-
</ng-template>
150+
<ng-template let-index="index"> Custom content for index {{ index }} </ng-template>
131151
</render>
132152
</fab-details-list-column>
133153
</columns>
134154
<groups>
135155
<fab-group-item key="group-1" name="Group #1" [count]="3" [startIndex]="0">
136-
<fab-group-item [level]="1" key="group-1-1" name="Nested Group #1.1" [count]="1" [startIndex]="0"></fab-group-item>
137-
<fab-group-item [level]="1" key="group-1-2" name="Nested Group #1.2" [count]="2" [startIndex]="1"></fab-group-item>
156+
<fab-group-item
157+
[level]="1"
158+
key="group-1-1"
159+
name="Nested Group #1.1"
160+
[count]="1"
161+
[startIndex]="0"
162+
></fab-group-item>
163+
<fab-group-item
164+
[level]="1"
165+
key="group-1-2"
166+
name="Nested Group #1.2"
167+
[count]="2"
168+
[startIndex]="1"
169+
></fab-group-item>
138170
</fab-group-item>
139171
<fab-group-item key="group-2" name="Group #2" [count]="1" [startIndex]="3"></fab-group-item>
140172
<fab-group-item key="group-3" name="Group #3" [count]="1" [startIndex]="4"></fab-group-item>

apps/demo/src/app/app.component.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ import { ICalendarStrings, IContextualMenuProps, ISelection, Selection } from 'o
88
encapsulation: ViewEncapsulation.None,
99
})
1010
export class AppComponent {
11-
@ViewChild('customRange')
12-
customRangeTemplate: TemplateRef<{ item: any; dismissMenu: (ev?: any, dismissAll?: boolean) => void }>;
11+
@ViewChild('customRange') customRangeTemplate: TemplateRef<{
12+
item: any;
13+
dismissMenu: (ev?: any, dismissAll?: boolean) => void;
14+
}>;
1315

1416
onClickEventHandler(ev) {
1517
console.log('onClick', { ev });

apps/demo/src/app/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ import { CounterComponent } from './counter/counter.component';
7272
FabCalendarModule,
7373
FabDetailsListModule,
7474
FabGroupModule,
75-
FabMarqueeSelectionModule
75+
FabMarqueeSelectionModule,
7676
],
7777
declarations: [AppComponent, CounterComponent],
7878
bootstrap: [AppComponent],

apps/demo/src/app/counter/counter.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component } from '@angular/
44
selector: 'counter',
55
template: `
66
<fab-default-button [text]="count + '+'" (onClick)="onClick()"></fab-default-button>
7-
`,
7+
`,
88
changeDetection: ChangeDetectionStrategy.OnPush,
99
})
1010
export class CounterComponent {

apps/demo/src/index.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<meta charset="utf-8">
5-
<title>Angular-React Demo</title>
6-
<base href="/">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>Angular-React Demo</title>
6+
<base href="/" />
77

8-
<meta name="viewport" content="width=device-width, initial-scale=1">
9-
<link rel="icon" type="image/x-icon" href="favicon.ico">
10-
</head>
11-
<body>
12-
<app-root></app-root>
13-
</body>
8+
<meta name="viewport" content="width=device-width, initial-scale=1" />
9+
<link rel="icon" type="image/x-icon" href="favicon.ico" />
10+
</head>
11+
<body>
12+
<app-root></app-root>
13+
</body>
1414
</html>

0 commit comments

Comments
 (0)