Skip to content

Commit b40f7d3

Browse files
authored
fix(): update to Stencil One 🎉🎊
1 parent 7f1829e commit b40f7d3

File tree

572 files changed

+14833
-10323
lines changed

Some content is hidden

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

572 files changed

+14833
-10323
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ log.txt
1515
coverage/
1616
collection/
1717
dist/
18+
dist-transpiled/
1819
node_modules/
1920
tmp/
2021
temp/
@@ -49,10 +50,16 @@ demos/src/**/*.ngfactory.ts
4950
demos/src/**/*.d.ts
5051
demos/src/**/*.metadata.json
5152
demos/src/**/*.css.shim.ts
53+
prerender.html
54+
prerender-domino.html
55+
prerender-hydrated.html
56+
prerender-static.html
5257

5358
# stencil
5459
angular/css/
5560
core/css/
61+
core/hydrated/
5662
core/loader/
63+
core/www/
5764
.stencil/
5865
angular/build/

.scripts/release-dev.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const fs = require('fs-extra');
77

88
const common = require('./common');
99

10+
const DIST_NPM_TAG = 'dev';
1011
const DIST_TAG = 'dev';
1112

1213
async function main() {
@@ -37,7 +38,7 @@ async function main() {
3738
packages.forEach(package => {
3839
common.prepareDevPackage(tasks, package, devVersion);
3940
});
40-
common.publishPackages(tasks, packages, devVersion, DIST_TAG);
41+
common.publishPackages(tasks, packages, devVersion, DIST_NPM_TAG);
4142

4243
const listr = new Listr(tasks);
4344
await listr.run();

angular/scripts/rollup.config.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ export default {
77
format: 'es'
88
},
99
external: (id) => {
10-
// inline @ionic/core deps
11-
if (id === '@ionic/core') {
12-
return false;
13-
}
1410
// anything else is external
1511
// Windows: C:\xxxxxx\xxx
1612
const colonPosition = 1;

angular/src/app-initialize.ts

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineCustomElements } from '@ionic/core/loader';
1+
import { applyPolyfills, defineCustomElements } from '@ionic/core/loader';
22

33
import { Config } from './providers/config';
44
import { IonicWindow } from './types/interfaces';
@@ -10,26 +10,27 @@ export function appInitialize(config: Config, doc: Document) {
1010
const Ionic = win.Ionic = win.Ionic || {};
1111

1212
Ionic.config = config;
13-
Ionic.asyncQueue = false;
14-
15-
Ionic.ael = (elm, eventName, cb, opts) => {
16-
if (elm.__zone_symbol__addEventListener && skipZone(eventName)) {
17-
elm.__zone_symbol__addEventListener(eventName, cb, opts);
18-
} else {
19-
elm.addEventListener(eventName, cb, opts);
20-
}
21-
};
22-
23-
Ionic.rel = (elm, eventName, cb, opts) => {
24-
if (elm.__zone_symbol__removeEventListener && skipZone(eventName)) {
25-
elm.__zone_symbol__removeEventListener(eventName, cb, opts);
26-
} else {
27-
elm.removeEventListener(eventName, cb, opts);
28-
}
29-
};
30-
31-
return defineCustomElements(win, {
32-
exclude: ['ion-tabs', 'ion-tab']
13+
14+
return applyPolyfills().then(() => {
15+
return defineCustomElements(win, {
16+
exclude: ['ion-tabs', 'ion-tab'],
17+
syncQueue: true,
18+
raf: h => (win.__zone_symbol__requestAnimationFrame) ? win.__zone_symbol__requestAnimationFrame(h) : requestAnimationFrame(h),
19+
ael(elm, eventName, cb, opts) {
20+
if ((elm as any).__zone_symbol__addEventListener && skipZone(eventName)) {
21+
(elm as any).__zone_symbol__addEventListener(eventName, cb, opts);
22+
} else {
23+
elm.addEventListener(eventName, cb, opts);
24+
}
25+
},
26+
rel(elm, eventName, cb, opts) {
27+
if ((elm as any).__zone_symbol__removeEventListener && skipZone(eventName)) {
28+
(elm as any).__zone_symbol__removeEventListener(eventName, cb, opts);
29+
} else {
30+
elm.removeEventListener(eventName, cb, opts);
31+
}
32+
}
33+
});
3334
});
3435
}
3536
};

angular/src/directives/navigation/ion-router-outlet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export class IonRouterOutlet implements OnDestroy, OnInit {
9494
if ((this.nativeEl as any).componentOnReady) {
9595
this.nativeEl.componentOnReady().then(() => {
9696
if (this._swipeGesture === undefined) {
97-
this.swipeGesture = this.config.getBoolean('swipeBackEnabled', this.nativeEl.mode === 'ios');
97+
this.swipeGesture = this.config.getBoolean('swipeBackEnabled', (this.nativeEl as any).mode === 'ios');
9898
}
9999
});
100100
}

angular/src/directives/proxies.ts

Lines changed: 180 additions & 180 deletions
Large diffs are not rendered by default.
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
import { DOCUMENT } from '@angular/common';
2-
import { Inject, Injectable } from '@angular/core';
3-
import { ActionSheetOptions } from '@ionic/core';
1+
import { Injectable } from '@angular/core';
2+
import { ActionSheetOptions, actionSheetController } from '@ionic/core';
43

54
import { OverlayBaseController } from '../util/overlay';
65

76
@Injectable({
87
providedIn: 'root',
98
})
109
export class ActionSheetController extends OverlayBaseController<ActionSheetOptions, HTMLIonActionSheetElement> {
11-
constructor(@Inject(DOCUMENT) doc: any) {
12-
super('ion-action-sheet-controller', doc);
10+
constructor() {
11+
super(actionSheetController);
1312
}
1413
}
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
import { DOCUMENT } from '@angular/common';
2-
import { Inject, Injectable } from '@angular/core';
3-
import { AlertOptions } from '@ionic/core';
1+
import { Injectable } from '@angular/core';
2+
import { AlertOptions, alertController } from '@ionic/core';
43

54
import { OverlayBaseController } from '../util/overlay';
65

76
@Injectable({
87
providedIn: 'root',
98
})
109
export class AlertController extends OverlayBaseController<AlertOptions, HTMLIonAlertElement> {
11-
constructor(@Inject(DOCUMENT) doc: any) {
12-
super('ion-alert-controller', doc);
10+
constructor() {
11+
super(alertController);
1312
}
1413
}
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
import { DOCUMENT } from '@angular/common';
2-
import { Inject, Injectable } from '@angular/core';
3-
import { LoadingOptions } from '@ionic/core';
1+
import { Injectable } from '@angular/core';
2+
import { LoadingOptions, loadingController } from '@ionic/core';
43

54
import { OverlayBaseController } from '../util/overlay';
65

76
@Injectable({
87
providedIn: 'root',
98
})
109
export class LoadingController extends OverlayBaseController<LoadingOptions, HTMLIonLoadingElement> {
11-
constructor(@Inject(DOCUMENT) doc: any) {
12-
super('ion-loading-controller', doc);
10+
constructor() {
11+
super(loadingController);
1312
}
1413
}

angular/src/providers/modal-controller.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { DOCUMENT } from '@angular/common';
2-
import { ComponentFactoryResolver, Inject, Injectable, Injector } from '@angular/core';
3-
import { ModalOptions } from '@ionic/core';
1+
import { ComponentFactoryResolver, Injectable, Injector } from '@angular/core';
2+
import { ModalOptions, modalController } from '@ionic/core';
43

54
import { OverlayBaseController } from '../util/overlay';
65

@@ -13,9 +12,8 @@ export class ModalController extends OverlayBaseController<ModalOptions, HTMLIon
1312
private angularDelegate: AngularDelegate,
1413
private resolver: ComponentFactoryResolver,
1514
private injector: Injector,
16-
@Inject(DOCUMENT) doc: any
1715
) {
18-
super('ion-modal-controller', doc);
16+
super(modalController);
1917
}
2018

2119
create(opts: ModalOptions): Promise<HTMLIonModalElement> {

0 commit comments

Comments
 (0)