Skip to content

Commit cceb53a

Browse files
committed
style(format): reformat project files
1 parent fdb3706 commit cceb53a

22 files changed

+74
-84
lines changed

angular.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@
8484
"projects/demo/src/favicon.ico",
8585
"projects/demo/src/assets"
8686
],
87-
"styles": [
88-
"projects/demo/src/styles.css"
89-
],
87+
"styles": ["projects/demo/src/styles.css"],
9088
"scripts": []
9189
},
9290
"configurations": {

projects/demo/src/app/app.component.ts

+23-10
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,40 @@ import { Component } from '@angular/core';
55
template: `
66
<!--The content below is only a placeholder and can be replaced.-->
77
<div style="text-align:center" class="content">
8-
<h1>
9-
Welcome to {{title}}!
10-
</h1>
8+
<h1>Welcome to {{ title }}!</h1>
119
<span style="display: block">{{ title }} app is running!</span>
12-
<img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
10+
<img
11+
width="300"
12+
alt="Angular Logo"
13+
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg=="
14+
/>
1315
</div>
14-
<h2>Here are some links to help you start: </h2>
16+
<h2>Here are some links to help you start:</h2>
1517
<ul>
1618
<li>
17-
<h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2>
19+
<h2>
20+
<a target="_blank" rel="noopener" href="https://angular.io/tutorial"
21+
>Tour of Heroes</a
22+
>
23+
</h2>
1824
</li>
1925
<li>
20-
<h2><a target="_blank" rel="noopener" href="https://angular.io/cli">CLI Documentation</a></h2>
26+
<h2>
27+
<a target="_blank" rel="noopener" href="https://angular.io/cli"
28+
>CLI Documentation</a
29+
>
30+
</h2>
2131
</li>
2232
<li>
23-
<h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2>
33+
<h2>
34+
<a target="_blank" rel="noopener" href="https://blog.angular.io/"
35+
>Angular blog</a
36+
>
37+
</h2>
2438
</li>
2539
</ul>
26-
2740
`,
28-
styles: []
41+
styles: [],
2942
})
3043
export class AppComponent {
3144
title = 'demo';

projects/demo/src/app/app.module.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ export class AppModule {
4747

4848
constructor(
4949
private injector: Injector,
50-
private cfr: ComponentFactoryResolver
50+
private cfr: ComponentFactoryResolver,
5151
) {}
5252

5353
ngDoBootstrap(): void {
5454
this.componentDefs
5555
.map((component) => this.initComponent(component))
5656
.forEach(({ name, customElement }) =>
57-
customElements.define(name, customElement)
57+
customElements.define(name, customElement),
5858
);
5959
}
6060

@@ -64,12 +64,12 @@ export class AppModule {
6464

6565
const defaultNgElementStrategyFactory = new DefaultElementBoundaryNgElementStrategyFactory(
6666
type,
67-
this.injector
67+
this.injector,
6868
);
6969

7070
const connectedNgElementStrategyFactory = new CrossBoundaryNgElementStrategyFactory(
7171
defaultNgElementStrategyFactory,
72-
{ isRoot }
72+
{ isRoot },
7373
);
7474

7575
const customElement = createCustomElement(type, {

projects/demo/src/app/child3/child3.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class Child3Component {
1818

1919
constructor(
2020
@Optional() public exampleService?: ExampleService,
21-
@Optional() public child2?: Child2Component
21+
@Optional() public child2?: Child2Component,
2222
) {
2323
console.log('Child3 ExampleService', exampleService);
2424
console.log('Child3 Child2Component', child2);
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export const environment = {
2-
production: true
2+
production: true,
33
};

projects/demo/src/environments/environment.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// The list of file replacements can be found in `angular.json`.
44

55
export const environment = {
6-
production: false
6+
production: false,
77
};
88

99
/*

projects/demo/src/main.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ if (environment.production) {
88
enableProdMode();
99
}
1010

11-
platformBrowserDynamic().bootstrapModule(AppModule)
12-
.catch(err => console.error(err));
11+
platformBrowserDynamic()
12+
.bootstrapModule(AppModule)
13+
.catch((err) => console.error(err));

projects/demo/src/polyfills.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@
5555
/***************************************************************************************************
5656
* Zone JS is required by default for Angular itself.
5757
*/
58-
import 'zone.js/dist/zone'; // Included with Angular CLI.
59-
58+
import 'zone.js/dist/zone'; // Included with Angular CLI.
6059

6160
/***************************************************************************************************
6261
* APPLICATION IMPORTS

projects/demo/tsconfig.app.json

+2-7
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
"outDir": "../../out-tsc/app",
66
"types": []
77
},
8-
"files": [
9-
"src/main.ts",
10-
"src/polyfills.ts"
11-
],
12-
"include": [
13-
"src/**/*.d.ts"
14-
]
8+
"files": ["src/main.ts", "src/polyfills.ts"],
9+
"include": ["src/**/*.d.ts"]
1510
}

projects/ngx-element-boundary/element-strategy/default/src/default-ng-element-strategy.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
* used by {@link DefaultNgElementStrategyFactory}
1313
*/
1414
export type NgElementStrategyExtractor = (
15-
element: NgElement
15+
element: NgElement,
1616
) => NgElementStrategy;
1717

1818
/**
@@ -67,7 +67,7 @@ export class DefaultNgElementStrategyFactory
6767
constructor(
6868
component: Type<any>,
6969
injector: Injector,
70-
options?: DefaultNgElementStrategyFactoryOptions
70+
options?: DefaultNgElementStrategyFactoryOptions,
7171
) {
7272
this.options = new DefaultNgElementStrategyFactoryOptionsDefault(options);
7373

projects/ngx-element-boundary/element-strategy/default/src/element-boundary-ng-element-strategy.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
* used by {@link DefaultElementBoundaryNgElementStrategy}
1616
*/
1717
export type NgElementStrategyComponentRefExtractor = (
18-
strategy: NgElementStrategy
18+
strategy: NgElementStrategy,
1919
) => ComponentRef<any> | undefined;
2020

2121
/**
@@ -65,10 +65,10 @@ export class DefaultElementBoundaryNgElementStrategy
6565

6666
constructor(
6767
private defaultStrategy: NgElementStrategy,
68-
options?: DefaultElementBoundaryNgElementStrategyOptions
68+
options?: DefaultElementBoundaryNgElementStrategyOptions,
6969
) {
7070
this.options = new DefaultElementBoundaryNgElementStrategyOptionsDefault(
71-
options
71+
options,
7272
);
7373
}
7474

@@ -104,7 +104,7 @@ export interface DefaultNgElementStrategyFactoryStrategy<O = never> {
104104
create(
105105
component: Type<any>,
106106
injector: Injector,
107-
options?: O
107+
options?: O,
108108
): NgElementStrategyFactory;
109109
}
110110

@@ -151,7 +151,7 @@ export class DefaultNgElementStrategyFactoryStrategyDefault
151151
create(
152152
component: Type<any>,
153153
injector: Injector,
154-
options?: DefaultNgElementStrategyFactoryOptions
154+
options?: DefaultNgElementStrategyFactoryOptions,
155155
): NgElementStrategyFactory {
156156
return new DefaultNgElementStrategyFactory(component, injector, options);
157157
}
@@ -207,23 +207,23 @@ export class DefaultElementBoundaryNgElementStrategyFactory<
207207
constructor(
208208
component: Type<any>,
209209
injector: Injector,
210-
options?: DefaultElementBoundaryNgElementStrategyFactoryOptions<S>
210+
options?: DefaultElementBoundaryNgElementStrategyFactoryOptions<S>,
211211
) {
212212
this.options = new DefaultElementBoundaryNgElementStrategyFactoryOptionsDefault(
213-
options
213+
options,
214214
);
215215

216216
this.defaultStrategyFactory = this.options.factoryStrategy.create(
217217
component,
218218
injector,
219-
this.options.factoryStrategyOptions
219+
this.options.factoryStrategyOptions,
220220
);
221221
}
222222

223223
create(injector: Injector): ElementBoundaryNgElementStrategy {
224224
return new DefaultElementBoundaryNgElementStrategy(
225225
this.defaultStrategyFactory.create(injector),
226-
this.options.strategyOptions
226+
this.options.strategyOptions,
227227
);
228228
}
229229
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
coverageDirectory: "<rootDir>/coverage/ngx-element-boundary",
2+
coverageDirectory: '<rootDir>/coverage/ngx-element-boundary',
33
};

projects/ngx-element-boundary/ng-package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"lib": {
55
"entryFile": "src/public-api.ts"
66
}
7-
}
7+
}

projects/ngx-element-boundary/src/lib/boundary-sharing-strategy/global-boundary-sharing-strategy.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class GlobalBoundarySharingStrategy implements BoundarySharingStrategy {
4141

4242
private readonly boundaries$ = this.addBoundary$.pipe(
4343
scan((acc, boundary) => [...acc, boundary], [] as ElementBoundary[]),
44-
shareReplay({ bufferSize: 1, refCount: false })
44+
shareReplay({ bufferSize: 1, refCount: false }),
4545
);
4646

4747
private get _boundary$(): ReplaySubject<ElementBoundary> {
@@ -57,7 +57,7 @@ export class GlobalBoundarySharingStrategy implements BoundarySharingStrategy {
5757

5858
constructor(
5959
private options: GlobalBoundarySharingStrategyOptions,
60-
private globalRef: GlobalRef
60+
private globalRef: GlobalRef,
6161
) {}
6262

6363
getBoundaries(): Observable<ElementBoundary[]> {

projects/ngx-element-boundary/src/lib/boundary-sharing-strategy/single-app-boundary-sharing-strategy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class SingleAppBoundarySharingStrategy
1515

1616
private readonly boundaries$ = this.addBoundary$.pipe(
1717
scan((acc, boundary) => [...acc, boundary], [] as ElementBoundary[]),
18-
shareReplay({ bufferSize: 1, refCount: false })
18+
shareReplay({ bufferSize: 1, refCount: false }),
1919
);
2020

2121
getBoundaries(): Observable<ElementBoundary[]> {

projects/ngx-element-boundary/src/lib/component-selector-strategy/prefix-component-selector-strategy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class PrefixComponentSelectorStrategy
2525
* by using `ValueProvider` DI strategy
2626
*/
2727
static provideOptions(
28-
options: PrefixComponentSelectorStrategyOptions
28+
options: PrefixComponentSelectorStrategyOptions,
2929
): Provider {
3030
return {
3131
provide: PrefixComponentSelectorStrategyOptions,

projects/ngx-element-boundary/src/lib/cross-boundary-ng-element-strategy.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,19 @@ export class CrossBoundaryNgElementStrategy implements NgElementStrategy {
6666
events = this.baseStrategy.events;
6767

6868
private elementBoundaryService: ElementBoundaryService = this.hookableInjector.get(
69-
ElementBoundaryService
69+
ElementBoundaryService,
7070
);
7171

7272
private options = new CrossBoundaryNgElementStrategyOptionsDefault(
73-
this.incomingOptions
73+
this.incomingOptions,
7474
);
7575

7676
private disconnect$ = new Subject<void>();
7777

7878
constructor(
7979
private baseStrategy: ElementBoundaryNgElementStrategy,
8080
private hookableInjector: HookableInjector,
81-
private incomingOptions?: CrossBoundaryNgElementStrategyOptions
81+
private incomingOptions?: CrossBoundaryNgElementStrategyOptions,
8282
) {}
8383

8484
connect(element: HTMLElement): void {
@@ -94,7 +94,7 @@ export class CrossBoundaryNgElementStrategy implements NgElementStrategy {
9494
? o$.pipe(timeoutWith(this.options.boundaryTimeoutMs, of(null)))
9595
: o$,
9696
take(1),
97-
takeUntil(this.disconnect$)
97+
takeUntil(this.disconnect$),
9898
)
9999
.subscribe((boundary) => {
100100
if (boundary) {
@@ -142,7 +142,7 @@ export class CrossBoundaryNgElementStrategyFactory
142142
implements NgElementStrategyFactory {
143143
constructor(
144144
private baseStrategyFactory: ElementBoundaryNgElementStrategyFactory,
145-
private options?: CrossBoundaryNgElementStrategyOptions
145+
private options?: CrossBoundaryNgElementStrategyOptions,
146146
) {}
147147

148148
create(injector: Injector): NgElementStrategy {
@@ -151,7 +151,7 @@ export class CrossBoundaryNgElementStrategyFactory
151151
return new CrossBoundaryNgElementStrategy(
152152
this.baseStrategyFactory.create(hookableInjector),
153153
hookableInjector,
154-
this.options
154+
this.options,
155155
);
156156
}
157157
}

projects/ngx-element-boundary/src/lib/element-boundary.directive.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('ElementBoundaryDirective', () => {
2222
it('should attach to attribute', () => {
2323
const fixture = TestBed.createComponent(TestComponent);
2424
const directiveElem = fixture.debugElement.query(
25-
By.directive(ElementBoundaryDirective)
25+
By.directive(ElementBoundaryDirective),
2626
);
2727

2828
expect(directiveElem).toBeTruthy();

projects/ngx-element-boundary/src/lib/element-boundary.directive.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class ElementBoundaryDirective implements OnInit, OnChanges {
3434
constructor(
3535
private injector: Injector,
3636
private elemRef: ElementRef,
37-
private elementBoundaryService: ElementBoundaryService
37+
private elementBoundaryService: ElementBoundaryService,
3838
) {}
3939

4040
ngOnInit(): void {

projects/ngx-element-boundary/src/lib/element-boundary.service.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ import { isDefined } from './util';
1515
export class ElementBoundaryService {
1616
private boundaries$ = this.boundarySharingStrategy.getBoundaries().pipe(
1717
map((boundaries) =>
18-
boundaries.sort((b1, b2) => this.sortBoundariesByDepth(b1, b2))
18+
boundaries.sort((b1, b2) => this.sortBoundariesByDepth(b1, b2)),
1919
),
20-
shareReplay({ bufferSize: 1, refCount: false })
20+
shareReplay({ bufferSize: 1, refCount: false }),
2121
);
2222

2323
constructor(
2424
private boundarySharingStrategy: BoundarySharingStrategy,
25-
@Optional() private componentSelectorStrategy?: ComponentSelectorStrategy
25+
@Optional() private componentSelectorStrategy?: ComponentSelectorStrategy,
2626
) {}
2727

2828
/**
@@ -41,23 +41,23 @@ export class ElementBoundaryService {
4141
boundaries.find(
4242
(boundary) =>
4343
boundary.element.contains(element) &&
44-
!this.hasComponentsBetween(boundary.element, element)
45-
)
44+
!this.hasComponentsBetween(boundary.element, element),
45+
),
4646
),
47-
filter(isDefined)
47+
filter(isDefined),
4848
);
4949
}
5050

5151
private sortBoundariesByDepth(
5252
b1: ElementBoundary,
53-
b2: ElementBoundary
53+
b2: ElementBoundary,
5454
): number {
5555
return b1.element.contains(b2.element) ? 1 : -1;
5656
}
5757

5858
private hasComponentsBetween(
5959
parent: HTMLElement,
60-
child: HTMLElement
60+
child: HTMLElement,
6161
): boolean {
6262
if (!this.componentSelectorStrategy) {
6363
return false;

0 commit comments

Comments
 (0)