merge release-6.3.5

Release 6.3.5
This commit is contained in:
Liam DeBeasi
2022-11-09 09:32:22 -05:00
committed by GitHub
67 changed files with 28599 additions and 238 deletions

View File

@ -37,7 +37,7 @@ runs:
shell: bash
working-directory: ./angular/test
- name: Install Dependencies
run: npm install
run: npm install --legacy-peer-deps
shell: bash
working-directory: ./angular/test/build/${{ inputs.app }}
- name: Sync Built Changes

View File

@ -145,7 +145,7 @@ jobs:
strategy:
fail-fast: false
matrix:
apps: [ng12, ng13, ng14]
apps: [ng12, ng13, ng14, ng15]
needs: [build-angular, build-angular-server]
runs-on: ubuntu-latest
steps:

View File

@ -3,6 +3,21 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [6.3.5](https://github.com/ionic-team/ionic-framework/compare/v6.3.4...v6.3.5) (2022-11-09)
### Bug Fixes
* **android:** account for chrome 108 resize ([#26244](https://github.com/ionic-team/ionic-framework/issues/26244)) ([1a0b9ed](https://github.com/ionic-team/ionic-framework/commit/1a0b9ed3bacffa9f602637c204f52cb3face5a3e))
* **datetime:** min/max correctly display available day periods ([#26241](https://github.com/ionic-team/ionic-framework/issues/26241)) ([526e411](https://github.com/ionic-team/ionic-framework/commit/526e4113d82d244e2574b24d72fda632bb2aa143)), closes [#26216](https://github.com/ionic-team/ionic-framework/issues/26216)
* **overlays:** presenting an overlay does not create nested elements ([#26154](https://github.com/ionic-team/ionic-framework/issues/26154)) ([bb00595](https://github.com/ionic-team/ionic-framework/commit/bb005956eaff7401cfe1d6befcbf512424ddd283)), closes [#26117](https://github.com/ionic-team/ionic-framework/issues/26117)
* **react:** loading layout is correct with no message ([#26222](https://github.com/ionic-team/ionic-framework/issues/26222)) ([57105d5](https://github.com/ionic-team/ionic-framework/commit/57105d54ea259fc9cd1a63e3d361ec8a57dd2971)), closes [#26219](https://github.com/ionic-team/ionic-framework/issues/26219)
* **vue:** generate web-types for components ([#26205](https://github.com/ionic-team/ionic-framework/issues/26205)) ([1f7fc8f](https://github.com/ionic-team/ionic-framework/commit/1f7fc8f05c03316560e0b58c3bf58db6b189d0e1)), closes [#26198](https://github.com/ionic-team/ionic-framework/issues/26198)
## [6.3.4](https://github.com/ionic-team/ionic-framework/compare/v6.3.3...v6.3.4) (2022-11-02)

View File

@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [6.3.5](https://github.com/ionic-team/ionic/compare/v6.3.4...v6.3.5) (2022-11-09)
**Note:** Version bump only for package @ionic/angular
## [6.3.4](https://github.com/ionic-team/ionic/compare/v6.3.3...v6.3.4) (2022-11-02)
**Note:** Version bump only for package @ionic/angular

View File

@ -1,15 +1,15 @@
{
"name": "@ionic/angular",
"version": "6.3.4",
"version": "6.3.5",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/angular",
"version": "6.3.4",
"version": "6.3.5",
"license": "MIT",
"dependencies": {
"@ionic/core": "^6.3.4",
"@ionic/core": "^6.3.5",
"jsonc-parser": "^3.0.0",
"tslib": "^2.0.0"
},
@ -1023,9 +1023,9 @@
"dev": true
},
"node_modules/@ionic/core": {
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"version": "6.3.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.5.tgz",
"integrity": "sha512-srAZbD1ThJPNHr/6WolC89PFnJ8AA+MKYkZF/Wjq7ysHO+qdg5gP5GtlEN/sfO8DM5J3GZHEbRW3m+jCepNoxA==",
"dependencies": {
"@stencil/core": "^2.18.0",
"ionicons": "^6.0.3",
@ -7951,9 +7951,9 @@
"dev": true
},
"@ionic/core": {
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"version": "6.3.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.5.tgz",
"integrity": "sha512-srAZbD1ThJPNHr/6WolC89PFnJ8AA+MKYkZF/Wjq7ysHO+qdg5gP5GtlEN/sfO8DM5J3GZHEbRW3m+jCepNoxA==",
"requires": {
"@stencil/core": "^2.18.0",
"ionicons": "^6.0.3",

View File

@ -1,6 +1,6 @@
{
"name": "@ionic/angular",
"version": "6.3.4",
"version": "6.3.5",
"description": "Angular specific wrappers for @ionic/core",
"keywords": [
"ionic",
@ -45,7 +45,7 @@
"validate": "npm i && npm run lint && npm run test && npm run build"
},
"dependencies": {
"@ionic/core": "^6.3.4",
"@ionic/core": "^6.3.5",
"jsonc-parser": "^3.0.0",
"tslib": "^2.0.0"
},

View File

@ -30,7 +30,7 @@ export class FormComponent {
formControl.markAsTouched();
}
onSubmit(_ev) {
onSubmit() {
this.submitted = 'true';
}

View File

@ -30,7 +30,7 @@ export class FormComponent {
formControl.markAsTouched();
}
onSubmit(_ev) {
onSubmit() {
this.submitted = 'true';
}

View File

@ -0,0 +1,9 @@
describe('Routing with Standalone Components', () => {
beforeEach(() => {
cy.visit('/version-test/standalone');
});
it('should render the component', () => {
cy.get('ion-content').contains('This is a standalone component rendered from a route.');
});
});

27969
angular/test/apps/ng15/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,68 @@
{
"name": "ionic-angular-test-app",
"version": "0.0.0",
"private": true,
"scripts": {
"ng": "ng",
"start": "ng serve",
"sync:build": "sh scripts/build-ionic.sh",
"sync": "sh scripts/sync.sh",
"build": "ng build --configuration production --no-progress",
"lint": "ng lint",
"postinstall": "ngcc",
"serve:ssr": "node dist/test-app/server/main.js",
"build:ssr": "ng build --prod && ng run test-app:server:production",
"dev:ssr": "ng run test-app:serve-ssr",
"prerender": "ng run test-app:prerender",
"cy.open": "cypress open",
"cy.run": "cypress run",
"test": "concurrently \"npm run start -- --configuration production\" \"wait-on http-get://localhost:4200 && npm run cy.run\" --kill-others --success first",
"test.watch": "concurrently \"npm run start\" \"wait-on http-get://localhost:4200 && npm run cy.open\" --kill-others --success first"
},
"dependencies": {
"@angular/animations": "^15.0.0-rc.1",
"@angular/common": "^15.0.0-rc.1",
"@angular/compiler": "^15.0.0-rc.1",
"@angular/core": "^15.0.0-rc.1",
"@angular/forms": "^15.0.0-rc.1",
"@angular/platform-browser": "^15.0.0-rc.1",
"@angular/platform-browser-dynamic": "^15.0.0-rc.1",
"@angular/platform-server": "^15.0.0-rc.1",
"@angular/router": "^15.0.0-rc.1",
"@ionic/angular": "^6.1.15",
"@ionic/angular-server": "^6.1.15",
"@nguniversal/express-engine": "^14.0.3",
"angular-in-memory-web-api": "^0.11.0",
"core-js": "^2.6.11",
"express": "^4.15.2",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
"typescript-eslint-language-service": "^4.1.5",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^15.0.0-rc.1",
"@angular-eslint/builder": "^14.0.2",
"@angular-eslint/eslint-plugin": "^14.0.2",
"@angular-eslint/eslint-plugin-template": "^14.0.2",
"@angular-eslint/schematics": "^14.0.2",
"@angular-eslint/template-parser": "^14.0.2",
"@angular/cli": "^15.0.0-rc.1",
"@angular/compiler-cli": "^15.0.0-rc.1",
"@angular/language-service": "^15.0.0-rc.1",
"@nguniversal/builders": "^15.0.0-next.0",
"@types/express": "^4.17.7",
"@types/node": "^12.12.54",
"@typescript-eslint/eslint-plugin": "4.28.2",
"@typescript-eslint/parser": "4.28.2",
"concurrently": "^6.0.0",
"cypress": "^10.2.0",
"eslint": "^7.26.0",
"ts-loader": "^6.2.2",
"ts-node": "^8.3.0",
"typescript": "~4.8.4",
"wait-on": "^5.2.1",
"webpack": "^5.61.0",
"webpack-cli": "^4.9.2"
}
}

View File

@ -0,0 +1,3 @@
<ion-app>
<ion-router-outlet [environmentInjector]="environmentInjector"></ion-router-outlet>
</ion-app>

View File

@ -0,0 +1,11 @@
import { Component, EnvironmentInjector } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
constructor(public environmentInjector: EnvironmentInjector) { }
}

View File

@ -0,0 +1,4 @@
<ion-content>
<p>This is a standalone component rendered from a route.</p>
<ion-button routerLink="/">Return home</ion-button>
</ion-content>

View File

@ -0,0 +1,12 @@
import { Component } from "@angular/core";
import { RouterModule } from "@angular/router";
import { IonicModule } from '@ionic/angular';
@Component({
selector: 'app-standalone',
templateUrl: './standalone.component.html',
standalone: true,
imports: [IonicModule, RouterModule]
})
export class StandaloneComponent { }

View File

@ -0,0 +1,15 @@
import { NgModule } from "@angular/core";
import { RouterModule } from "@angular/router";
@NgModule({
imports: [
RouterModule.forChild([
{
path: 'standalone',
loadComponent: () => import('./standalone/standalone.component').then(m => m.StandaloneComponent)
}
])
],
exports: [RouterModule]
})
export class VersionTestRoutingModule { }

View File

@ -0,0 +1,35 @@
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "ES2022",
"module": "es2020",
"emitDecoratorMetadata": true,
"typeRoots": ["node_modules/@types"],
"lib": ["es2020", "dom"],
"plugins": [
{
"name": "typescript-eslint-language-service"
}
],
"useDefineForClassFields": false
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}

View File

@ -5,7 +5,7 @@ import { Component } from '@angular/core';
templateUrl: './accordion-modal.component.html',
})
export class AccordionModalComponent {
modal: HTMLIonModalElement;
modal!: HTMLIonModalElement;
constructor() {}
}

View File

@ -7,7 +7,7 @@
</ion-header>
<ion-content>
<form [formGroup]="profileForm" (ngSubmit)="onSubmit($event)">
<form [formGroup]="profileForm" (ngSubmit)="onSubmit()">
<ion-list>
<ion-item>

View File

@ -27,10 +27,12 @@ export class FormComponent {
setTouched() {
const formControl = this.profileForm.get('input');
if (formControl) {
formControl.markAsTouched();
}
}
onSubmit(_ev) {
onSubmit() {
this.submitted = 'true';
}

View File

@ -6,12 +6,12 @@ import { Component } from '@angular/core';
})
export class InputsComponent {
datetime = '1994-03-15';
input = 'some text';
datetime? = '1994-03-15';
input? = 'some text';
checkbox = true;
toggle = true;
select = 'nes';
range = 10;
select? = 'nes';
range? = 10;
changes = 0;
setValues() {

View File

@ -8,7 +8,7 @@ import { ModalController, NavParams, IonNav, ViewWillLeave, ViewDidEnter, ViewDi
})
export class ModalExampleComponent implements OnInit, ViewWillLeave, ViewDidEnter, ViewWillLeave, ViewDidLeave {
@Input() value: string;
@Input() value?: string;
form = new UntypedFormGroup({
select: new UntypedFormControl([])
@ -21,7 +21,7 @@ export class ModalExampleComponent implements OnInit, ViewWillLeave, ViewDidEnte
willLeave = 0;
didLeave = 0;
modal: HTMLElement;
modal!: HTMLElement;
constructor(
private modalCtrl: ModalController,

View File

@ -1,5 +1,7 @@
import { Component } from "@angular/core";
import { IonPopover } from "@ionic/angular";
/**
* Validates that inline popovers will correctly display
* dynamic contents that are updated after the modal is
@ -13,7 +15,7 @@ export class PopoverInlineComponent {
items: string[] = [];
openPopover(popover: HTMLIonPopoverElement) {
openPopover(popover: IonPopover) {
popover.present();
setTimeout(() => {

View File

@ -16,9 +16,9 @@ export class ProvidersComponent {
isResumed = false;
isPaused = false;
isResized = false;
isTesting: boolean = undefined;
isDesktop: boolean = undefined;
isMobile: boolean = undefined;
isTesting?: boolean = undefined;
isDesktop?: boolean = undefined;
isMobile?: boolean = undefined;
keyboardHeight = 0;
queryParams = '';

View File

@ -12,7 +12,7 @@ export class RouterLinkPageComponent implements OnInit, ViewWillLeave, ViewDidEn
didEnter = 0;
willLeave = 0;
didLeave = 0;
canGoBack: boolean = null;
canGoBack: boolean | null | undefined = null;
constructor(
private ionRouterOutlet: IonRouterOutlet

View File

@ -6,11 +6,11 @@ import { IonSlides } from '@ionic/angular';
templateUrl: './slides.component.html',
})
export class SlidesComponent implements AfterViewInit {
@ViewChild(IonSlides, { static: true }) slides: IonSlides;
@ViewChild(IonSlides, { static: true }) slides!: IonSlides;
slideIndex = 0;
slideIndex2 = 0;
slidesData = [];
slidesData: string[] = [];
constructor() { }

View File

@ -7,7 +7,7 @@ import { NavController } from '@ionic/angular';
templateUrl: './tabs-tab1-nested.component.html',
})
export class TabsTab1NestedComponent implements OnInit {
id = '';
id: string | null = '';
constructor(
private route: ActivatedRoute,
public navCtrl: NavController
@ -18,6 +18,9 @@ export class TabsTab1NestedComponent implements OnInit {
}
next() {
if (this.id === null) {
return '1';
}
return parseInt(this.id, 10) + 1;
}

View File

@ -9,13 +9,13 @@ import { IonTabBar } from '@ionic/angular';
export class TabsComponent {
tabsDidChangeCounter = 0;
tabsDidChangeEvent = '';
tabsDidChangeSelectedTab = '';
tabsDidChangeSelectedTab? = '';
tabsWillChangeCounter = 0;
tabsWillChangeEvent = '';
tabsWillChangeSelectedTab = '';
tabsWillChangeSelectedTab? = '';
@ViewChild(IonTabBar) tabBar: IonTabBar;
@ViewChild(IonTabBar) tabBar!: IonTabBar;
tabChanged(ev: { tab: string }) {
console.log('ionTabsDidChange', this.tabBar.selectedTab);

View File

@ -7,11 +7,11 @@ import { IonTabs, IonButton, IonSlides, IonSlide } from '@ionic/angular';
})
export class ViewChildComponent implements AfterViewInit {
@ViewChild(IonSlides, { static: true }) slides: IonSlides;
@ViewChild(IonButton, { static: true }) button: IonButton;
@ViewChild(IonTabs, { static: true }) tabs: IonTabs;
@ViewChild('div', { static: true }) div: ElementRef;
@ViewChild('slide', { static: true }) slide: IonSlide;
@ViewChild(IonSlides, { static: true }) slides!: IonSlides;
@ViewChild(IonButton, { static: true }) button!: IonButton;
@ViewChild(IonTabs, { static: true }) tabs!: IonTabs;
@ViewChild('div', { static: true }) div!: ElementRef;
@ViewChild('slide', { static: true }) slide!: IonSlide;
ngAfterViewInit() {
const loaded = !!(this.slides && this.button && this.tabs && this.div && this.slide);

View File

@ -14,7 +14,7 @@ export class VirtualScrollDetailComponent implements OnInit, ViewWillEnter, View
willLeave = 0;
didLeave = 0;
itemNu = 'none';
itemNu: string | null = 'none';
constructor(private route: ActivatedRoute) {}

View File

@ -6,7 +6,7 @@ import { Component, OnInit, NgZone, Input } from '@angular/core';
})
export class VirtualScrollInnerComponent implements OnInit {
@Input() value: string;
@Input() value?: string;
onInit = 0;
ngOnInit() {

View File

@ -8,7 +8,7 @@ import { IonVirtualScroll } from '@ionic/angular';
})
export class VirtualScrollComponent {
@ViewChild(IonVirtualScroll, { static: true }) virtualScroll: IonVirtualScroll;
@ViewChild(IonVirtualScroll, { static: true }) virtualScroll!: IonVirtualScroll;
items = Array.from({length: 100}, (_, i) => ({ name: `${i}`, checked: true}));
@ -18,12 +18,14 @@ export class VirtualScrollComponent {
if ((index % 10) === 0) {
return `Header ${index}`;
}
return '';
}
myFooterFn: HeaderFn = (_, index) => {
if ((index % 5) === 0) {
return `Footer ${index}`;
}
return '';
}
addItems() {

View File

@ -3,6 +3,19 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [6.3.5](https://github.com/ionic-team/ionic/compare/v6.3.4...v6.3.5) (2022-11-09)
### Bug Fixes
* **android:** account for chrome 108 resize ([#26244](https://github.com/ionic-team/ionic/issues/26244)) ([1a0b9ed](https://github.com/ionic-team/ionic/commit/1a0b9ed3bacffa9f602637c204f52cb3face5a3e))
* **datetime:** min/max correctly display available day periods ([#26241](https://github.com/ionic-team/ionic/issues/26241)) ([526e411](https://github.com/ionic-team/ionic/commit/526e4113d82d244e2574b24d72fda632bb2aa143)), closes [#26216](https://github.com/ionic-team/ionic/issues/26216)
* **overlays:** presenting an overlay does not create nested elements ([#26154](https://github.com/ionic-team/ionic/issues/26154)) ([bb00595](https://github.com/ionic-team/ionic/commit/bb005956eaff7401cfe1d6befcbf512424ddd283)), closes [#26117](https://github.com/ionic-team/ionic/issues/26117)
## [6.3.4](https://github.com/ionic-team/ionic/compare/v6.3.3...v6.3.4) (2022-11-02)

View File

@ -1,12 +1,12 @@
{
"name": "@ionic/core",
"version": "6.3.4",
"version": "6.3.5",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/core",
"version": "6.3.4",
"version": "6.3.5",
"license": "MIT",
"dependencies": {
"@stencil/core": "^2.18.0",

View File

@ -1,6 +1,6 @@
{
"name": "@ionic/core",
"version": "6.3.4",
"version": "6.3.5",
"description": "Base components for Ionic",
"keywords": [
"ionic",

View File

@ -25,7 +25,12 @@ export class App implements ComponentInterface {
import('../../utils/status-tap').then((module) => module.startStatusTap());
}
if (config.getBoolean('inputShims', needInputShims())) {
import('../../utils/input-shims/input-shims').then((module) => module.startInputShims(config));
/**
* needInputShims() ensures that only iOS and Android
* platforms proceed into this block.
*/
const platform = isPlatform(window, 'ios') ? 'ios' : 'android';
import('../../utils/input-shims/input-shims').then((module) => module.startInputShims(config, platform));
}
const hardwareBackButtonModule = await import('../../utils/hardware-back-button');
if (config.getBoolean('hardwareBackButton', isHybrid)) {
@ -73,7 +78,25 @@ export class App implements ComponentInterface {
}
const needInputShims = () => {
return isPlatform(window, 'ios') && isPlatform(window, 'mobile');
/**
* iOS always needs input shims
*/
const needsShimsIOS = isPlatform(window, 'ios') && isPlatform(window, 'mobile');
if (needsShimsIOS) {
return true;
}
/**
* Android only needs input shims when running
* in the browser and only if the browser is using the
* new Chrome 108+ resize behavior: https://developer.chrome.com/blog/viewport-resize-behavior/
*/
const isAndroidMobileWeb = isPlatform(window, 'android') && isPlatform(window, 'mobileweb');
if (isAndroidMobileWeb) {
return true;
}
return false;
};
const rIC = (callback: () => void) => {

View File

@ -17,6 +17,7 @@ test.describe('datetime-button: switching to correct view', () => {
expect(datetime).toHaveJSProperty('presentation', 'date-time');
await page.locator('#date-button').click();
await page.waitForChanges();
expect(datetime).toHaveJSProperty('presentation', 'date');
});
@ -25,6 +26,7 @@ test.describe('datetime-button: switching to correct view', () => {
expect(datetime).toHaveJSProperty('presentation', 'date-time');
await page.locator('#time-button').click();
await page.waitForChanges();
expect(datetime).toHaveJSProperty('presentation', 'time');
});

View File

@ -205,6 +205,36 @@ describe('generateTime()', () => {
expect(minutes).toStrictEqual([10, 15, 20]);
});
it('should allow both am/pm when min is am and max is pm', () => {
// https://github.com/ionic-team/ionic-framework/issues/26216
const today = {
day: 22,
month: 5,
year: 2021,
hour: 5,
minute: 43,
};
const min = {
day: 22,
month: 5,
year: 2021,
hour: 11,
minute: 14,
};
const max = {
day: 22,
month: 5,
year: 2021,
hour: 12,
minute: 14,
};
const { am, pm } = generateTime(today, 'h12', min, max);
expect(am).toBe(true);
expect(pm).toBe(true);
});
describe('hourCycle is 23', () => {
it('should return hours in 24 hour format', () => {
const refValue = {

View File

@ -221,7 +221,7 @@ export const generateTime = (
const convertedHour = refParts.ampm === 'pm' ? (hour + 12) % 24 : hour;
return (use24Hour ? hour : convertedHour) <= maxParts.hour!;
});
isPMAllowed = maxParts.hour >= 13;
isPMAllowed = maxParts.hour >= 12;
}
if (maxParts.minute !== undefined && refParts.hour === maxParts.hour) {
// The available minutes should only be filtered when the hour is the same as the max hour.
@ -533,7 +533,7 @@ export const getTimeColumnsData = (
minParts?: DatetimeParts,
maxParts?: DatetimeParts,
allowedHourValues?: number[],
allowedMinuteVaues?: number[]
allowedMinuteValues?: number[]
): { [key: string]: PickerColumnItem[] } => {
const use24Hour = is24Hour(locale, hourCycle);
const { hours, minutes, am, pm } = generateTime(
@ -542,7 +542,7 @@ export const getTimeColumnsData = (
minParts,
maxParts,
allowedHourValues,
allowedMinuteVaues
allowedMinuteValues
);
const hoursItems = hours.map((hour) => {

View File

@ -105,12 +105,10 @@
}
}
.native-input[disabled] {
.native-input[disabled]:not(.cloned-input) {
opacity: .4;
}
// Input Cover: Unfocused
// --------------------------------------------------
// The input cover is the div that actually receives the
@ -127,6 +125,15 @@
pointer-events: none;
}
/**
* The cloned input needs to be disabled on
* Android otherwise the viewport will still
* shift when running scroll assist.
*/
.cloned-input:disabled {
opacity: 1;
}
// Clear Input Icon
// --------------------------------------------------

View File

@ -21,4 +21,44 @@ test.describe('modal: inline', () => {
expect(await page.screenshot()).toMatchSnapshot(`modal-inline-dismiss-${page.getSnapshotSettings()}.png`);
});
test('presenting should create a single root element with the ion-page class', async ({ page, skip }, testInfo) => {
skip.mode('md');
skip.rtl();
testInfo.annotations.push({
type: 'issue',
description: 'https://github.com/ionic-team/ionic-framework/issues/26117',
});
await page.setContent(`
<ion-datetime-button datetime="datetime"></ion-datetime-button>
<ion-modal>
<ion-datetime id="datetime" presentation="date-time"></ion-datetime>
</ion-modal>
`);
const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent');
const ionModalDidDismiss = await page.spyOnEvent('ionModalDidDismiss');
const modal = page.locator('ion-modal');
await page.locator('#date-button').click();
await ionModalDidPresent.next();
// Verifies that the host element exists with the .ion-page class
expect(await modal.evaluate((el: HTMLIonModalElement) => el.firstElementChild!.className)).toContain('ion-page');
await modal.evaluate((el: HTMLIonModalElement) => el.dismiss());
await ionModalDidDismiss.next();
await page.locator('#date-button').click();
await ionModalDidPresent.next();
// Verifies that presenting the overlay again does not create a new host element
expect(await modal.evaluate((el: HTMLIonModalElement) => el.firstElementChild!.className)).toContain('ion-page');
expect(
await modal.evaluate((el: HTMLIonModalElement) => el.firstElementChild!.firstElementChild!.className)
).not.toContain('ion-page');
});
});

View File

@ -139,7 +139,7 @@
}
}
.native-textarea[disabled] {
.native-textarea[disabled]:not(.cloned-input) {
opacity: 0.4;
}
@ -159,6 +159,15 @@
pointer-events: none;
}
/**
* The cloned input needs to be disabled on
* Android otherwise the viewport will still
* shift when running scroll assist.
*/
.cloned-input:disabled {
opacity: 1;
}
:host([auto-grow]) .cloned-input {
// Workaround for webkit rendering issue with scroll assist.
// When cloning the textarea and scrolling into view,

View File

@ -87,15 +87,23 @@ export const CoreDelegate = () => {
await new Promise((resolve) => componentOnReady(el, resolve));
} else if (BaseComponent.children.length > 0) {
// If there is no component, then we need to create a new parent
// element to apply the css classes to.
const root = BaseComponent.children[0] as HTMLElement;
if (!root.classList.contains('ion-delegate-host')) {
/**
* If the root element is not a delegate host, it means
* that the overlay has not been presented yet and we need
* to create the containing element with the specified classes.
*/
const el = BaseComponent.ownerDocument?.createElement('div');
// Add a class to track if the root element was created by the delegate.
el.classList.add('ion-delegate-host');
cssClasses.forEach((c) => el.classList.add(c));
// Move each child from the original template to the new parent element.
el.append(...BaseComponent.children);
// Append the new parent element to the original parent element.
BaseComponent.appendChild(el);
}
}
/**
* Get the root of the app and

View File

@ -4,14 +4,15 @@ export const relocateInput = (
componentEl: HTMLElement,
inputEl: HTMLInputElement | HTMLTextAreaElement,
shouldRelocate: boolean,
inputRelativeY = 0
inputRelativeY = 0,
disabledClonedInput = false
) => {
if (cloneMap.has(componentEl) === shouldRelocate) {
return;
}
if (shouldRelocate) {
addClone(componentEl, inputEl, inputRelativeY);
addClone(componentEl, inputEl, inputRelativeY, disabledClonedInput);
} else {
removeClone(componentEl, inputEl);
}
@ -24,7 +25,8 @@ export const isFocused = (input: HTMLInputElement | HTMLTextAreaElement): boolea
const addClone = (
componentEl: HTMLElement,
inputEl: HTMLInputElement | HTMLTextAreaElement,
inputRelativeY: number
inputRelativeY: number,
disabledClonedInput = false
) => {
// this allows for the actual input to receive the focus from
// the user's touch event, but before it receives focus, it
@ -38,9 +40,25 @@ const addClone = (
const parentEl = inputEl.parentNode!;
// DOM WRITES
const clonedEl = inputEl.cloneNode(false) as HTMLElement;
const clonedEl = inputEl.cloneNode(false) as HTMLInputElement | HTMLTextAreaElement;
clonedEl.classList.add('cloned-input');
clonedEl.tabIndex = -1;
/**
* Making the cloned input disabled prevents
* Chrome for Android from still scrolling
* the entire page since this cloned input
* will briefly be hidden by the keyboard
* even though it is not focused.
*
* This is not needed on iOS. While this
* does not cause functional issues on iOS,
* the input still appears slightly dimmed even
* if we set opacity: 1.
*/
if (disabledClonedInput) {
clonedEl.disabled = true;
}
parentEl.appendChild(clonedEl);
cloneMap.set(componentEl, clonedEl);

View File

@ -9,7 +9,8 @@ export const enableScrollAssist = (
inputEl: HTMLInputElement | HTMLTextAreaElement,
contentEl: HTMLElement | null,
footerEl: HTMLIonFooterElement | null,
keyboardHeight: number
keyboardHeight: number,
disableClonedInput = false
) => {
let coord: any;
const touchStart = (ev: Event) => {
@ -28,7 +29,7 @@ export const enableScrollAssist = (
// and the input doesn't already have focus
if (!hasPointerMoved(6, coord, endCoord) && !isFocused(inputEl)) {
// begin the input focus process
jsSetFocus(componentEl, inputEl, contentEl, footerEl, keyboardHeight);
jsSetFocus(componentEl, inputEl, contentEl, footerEl, keyboardHeight, disableClonedInput);
}
};
componentEl.addEventListener('touchstart', touchStart, { capture: true, passive: true });
@ -45,7 +46,8 @@ const jsSetFocus = async (
inputEl: HTMLInputElement | HTMLTextAreaElement,
contentEl: HTMLElement | null,
footerEl: HTMLIonFooterElement | null,
keyboardHeight: number
keyboardHeight: number,
disableClonedInput = false
) => {
if (!contentEl && !footerEl) {
return;
@ -62,7 +64,7 @@ const jsSetFocus = async (
// temporarily move the focus to the focus holder so the browser
// doesn't freak out while it's trying to get the input in place
// at this point the native text input still does not have focus
relocateInput(componentEl, inputEl, true, scrollData.inputSafeY);
relocateInput(componentEl, inputEl, true, scrollData.inputSafeY, disableClonedInput);
inputEl.focus();
/**

View File

@ -12,12 +12,20 @@ const SCROLL_ASSIST = true;
const SCROLL_PADDING = true;
const HIDE_CARET = true;
export const startInputShims = (config: Config) => {
export const startInputShims = (config: Config, platform: 'ios' | 'android') => {
const doc = document;
const isIOS = platform === 'ios';
const isAndroid = platform === 'android';
/**
* Hide Caret and Input Blurring are needed on iOS.
* Scroll Assist and Scroll Padding are needed on iOS and Android
* with Chrome web browser (not Chrome webview).
*/
const keyboardHeight = config.getNumber('keyboardHeight', 290);
const scrollAssist = config.getBoolean('scrollAssist', true);
const hideCaret = config.getBoolean('hideCaretOnScroll', true);
const inputBlurring = config.getBoolean('inputBlurring', true);
const hideCaret = config.getBoolean('hideCaretOnScroll', isIOS);
const inputBlurring = config.getBoolean('inputBlurring', isIOS);
const scrollPadding = config.getBoolean('scrollPadding', true);
const inputs = Array.from(doc.querySelectorAll('ion-input, ion-textarea')) as HTMLElement[];
@ -55,7 +63,7 @@ export const startInputShims = (config: Config) => {
scrollAssist &&
!scrollAssistMap.has(componentEl)
) {
const rmFn = enableScrollAssist(componentEl, inputEl, scrollEl, footerEl, keyboardHeight);
const rmFn = enableScrollAssist(componentEl, inputEl, scrollEl, footerEl, keyboardHeight, isAndroid);
scrollAssistMap.set(componentEl, rmFn);
}
};

View File

@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [6.3.5](https://github.com/ionic-team/ionic-docs/compare/v6.3.4...v6.3.5) (2022-11-09)
**Note:** Version bump only for package @ionic/docs
## [6.3.4](https://github.com/ionic-team/ionic-docs/compare/v6.3.3...v6.3.4) (2022-11-02)
**Note:** Version bump only for package @ionic/docs

View File

@ -1,12 +1,12 @@
{
"name": "@ionic/docs",
"version": "6.3.4",
"version": "6.3.5",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/docs",
"version": "6.3.4",
"version": "6.3.5",
"license": "MIT"
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@ionic/docs",
"version": "6.3.4",
"version": "6.3.5",
"description": "Pre-packaged API documentation for the Ionic docs.",
"main": "core.json",
"types": "core.d.ts",

View File

@ -5,5 +5,5 @@
"angular",
"packages/*"
],
"version": "6.3.4"
"version": "6.3.5"
}

View File

@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [6.3.5](https://github.com/ionic-team/ionic/compare/v6.3.4...v6.3.5) (2022-11-09)
**Note:** Version bump only for package @ionic/angular-server
## [6.3.4](https://github.com/ionic-team/ionic/compare/v6.3.3...v6.3.4) (2022-11-02)
**Note:** Version bump only for package @ionic/angular-server

View File

@ -1,12 +1,12 @@
{
"name": "@ionic/angular-server",
"version": "6.3.4",
"version": "6.3.5",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/angular-server",
"version": "6.3.4",
"version": "6.3.5",
"license": "MIT",
"devDependencies": {
"@angular-eslint/eslint-plugin": "^12.6.1",
@ -18,7 +18,7 @@
"@angular/platform-browser": "^12.0.0",
"@angular/platform-browser-dynamic": "^12.2.10",
"@angular/platform-server": "^12.0.0",
"@ionic/core": "^6.3.4",
"@ionic/core": "^6.3.5",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^5.2.0",
@ -786,9 +786,9 @@
"license": "BSD-3-Clause"
},
"node_modules/@ionic/core": {
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"version": "6.3.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.5.tgz",
"integrity": "sha512-srAZbD1ThJPNHr/6WolC89PFnJ8AA+MKYkZF/Wjq7ysHO+qdg5gP5GtlEN/sfO8DM5J3GZHEbRW3m+jCepNoxA==",
"dev": true,
"dependencies": {
"@stencil/core": "^2.18.0",
@ -7116,9 +7116,9 @@
"dev": true
},
"@ionic/core": {
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"version": "6.3.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.5.tgz",
"integrity": "sha512-srAZbD1ThJPNHr/6WolC89PFnJ8AA+MKYkZF/Wjq7ysHO+qdg5gP5GtlEN/sfO8DM5J3GZHEbRW3m+jCepNoxA==",
"dev": true,
"requires": {
"@stencil/core": "^2.18.0",

View File

@ -1,6 +1,6 @@
{
"name": "@ionic/angular-server",
"version": "6.3.4",
"version": "6.3.5",
"description": "Angular SSR Module for Ionic",
"keywords": [
"ionic",
@ -56,7 +56,7 @@
"@angular/platform-browser": "^12.0.0",
"@angular/platform-browser-dynamic": "^12.2.10",
"@angular/platform-server": "^12.0.0",
"@ionic/core": "^6.3.4",
"@ionic/core": "^6.3.5",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^5.2.0",

View File

@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [6.3.5](https://github.com/ionic-team/ionic/compare/v6.3.4...v6.3.5) (2022-11-09)
**Note:** Version bump only for package @ionic/react-router
## [6.3.4](https://github.com/ionic-team/ionic/compare/v6.3.3...v6.3.4) (2022-11-02)
**Note:** Version bump only for package @ionic/react-router

View File

@ -1,15 +1,15 @@
{
"name": "@ionic/react-router",
"version": "6.3.4",
"version": "6.3.5",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/react-router",
"version": "6.3.4",
"version": "6.3.5",
"license": "MIT",
"dependencies": {
"@ionic/react": "^6.3.4",
"@ionic/react": "^6.3.5",
"tslib": "*"
},
"devDependencies": {
@ -147,9 +147,9 @@
}
},
"node_modules/@ionic/core": {
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"version": "6.3.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.5.tgz",
"integrity": "sha512-srAZbD1ThJPNHr/6WolC89PFnJ8AA+MKYkZF/Wjq7ysHO+qdg5gP5GtlEN/sfO8DM5J3GZHEbRW3m+jCepNoxA==",
"dependencies": {
"@stencil/core": "^2.18.0",
"ionicons": "^6.0.3",
@ -157,11 +157,11 @@
}
},
"node_modules/@ionic/react": {
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/react/-/react-6.3.4.tgz",
"integrity": "sha512-0AHyFpzk2Q3BikzbfQryiAwkzW+Y+GaXfaxPvKm+vmFiwCDcIwsCS/JZGDxcmR7G5Ps1QrfNLq5IgvZb+XSjAA==",
"version": "6.3.5",
"resolved": "https://registry.npmjs.org/@ionic/react/-/react-6.3.5.tgz",
"integrity": "sha512-IidgWTx6mCugDdQ/D4B5hCK/wZ/j3n/ugXswr5SM2m71Ri6emML2gcifOKCCnpqzE28qzvMIwOiXVu/iLUWLKQ==",
"dependencies": {
"@ionic/core": "^6.3.4",
"@ionic/core": "^6.3.5",
"ionicons": "^6.0.2",
"tslib": "*"
},
@ -493,23 +493,11 @@
"license": "ISC"
},
"node_modules/ionicons": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.0.3.tgz",
"integrity": "sha512-kVOWER991EMqLiVShrCSWKMHkgHZP7XfVdyN6YPMuoO33W7pc5CPNVNfR8OMe/I8rYEbaunyBs6dXNYpR6gGZw==",
"version": "6.0.4",
"resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.0.4.tgz",
"integrity": "sha512-uDNOkBo0OVYV+kIhb51g9mb7r3Z0b+78GPZQBsjXuaetNmrB/mNTqN/uFtO+vxL/rQySKjzk8qeKJI5NWL9Ueg==",
"dependencies": {
"@stencil/core": "~2.16.0"
}
},
"node_modules/ionicons/node_modules/@stencil/core": {
"version": "2.16.1",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.16.1.tgz",
"integrity": "sha512-s/UJp9qxExL3DyQPT70kiuWeb3AdjbUZM+5lEIXn30I2DLcLYPOPXfsoWJODieQywq+3vPiLZeIdkoqjf6jcSw==",
"bin": {
"stencil": "bin/stencil"
},
"engines": {
"node": ">=12.10.0",
"npm": ">=6.0.0"
"@stencil/core": "^2.18.0"
}
},
"node_modules/is-core-module": {
@ -1157,9 +1145,9 @@
}
},
"@ionic/core": {
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"version": "6.3.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.5.tgz",
"integrity": "sha512-srAZbD1ThJPNHr/6WolC89PFnJ8AA+MKYkZF/Wjq7ysHO+qdg5gP5GtlEN/sfO8DM5J3GZHEbRW3m+jCepNoxA==",
"requires": {
"@stencil/core": "^2.18.0",
"ionicons": "^6.0.3",
@ -1167,11 +1155,11 @@
}
},
"@ionic/react": {
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/react/-/react-6.3.4.tgz",
"integrity": "sha512-0AHyFpzk2Q3BikzbfQryiAwkzW+Y+GaXfaxPvKm+vmFiwCDcIwsCS/JZGDxcmR7G5Ps1QrfNLq5IgvZb+XSjAA==",
"version": "6.3.5",
"resolved": "https://registry.npmjs.org/@ionic/react/-/react-6.3.5.tgz",
"integrity": "sha512-IidgWTx6mCugDdQ/D4B5hCK/wZ/j3n/ugXswr5SM2m71Ri6emML2gcifOKCCnpqzE28qzvMIwOiXVu/iLUWLKQ==",
"requires": {
"@ionic/core": "^6.3.4",
"@ionic/core": "^6.3.5",
"ionicons": "^6.0.2",
"tslib": "*"
}
@ -1397,18 +1385,11 @@
"dev": true
},
"ionicons": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.0.3.tgz",
"integrity": "sha512-kVOWER991EMqLiVShrCSWKMHkgHZP7XfVdyN6YPMuoO33W7pc5CPNVNfR8OMe/I8rYEbaunyBs6dXNYpR6gGZw==",
"version": "6.0.4",
"resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.0.4.tgz",
"integrity": "sha512-uDNOkBo0OVYV+kIhb51g9mb7r3Z0b+78GPZQBsjXuaetNmrB/mNTqN/uFtO+vxL/rQySKjzk8qeKJI5NWL9Ueg==",
"requires": {
"@stencil/core": "~2.16.0"
},
"dependencies": {
"@stencil/core": {
"version": "2.16.1",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.16.1.tgz",
"integrity": "sha512-s/UJp9qxExL3DyQPT70kiuWeb3AdjbUZM+5lEIXn30I2DLcLYPOPXfsoWJODieQywq+3vPiLZeIdkoqjf6jcSw=="
}
"@stencil/core": "^2.18.0"
}
},
"is-core-module": {

View File

@ -1,6 +1,6 @@
{
"name": "@ionic/react-router",
"version": "6.3.4",
"version": "6.3.5",
"description": "React Router wrapper for @ionic/react",
"keywords": [
"ionic",
@ -37,7 +37,7 @@
"dist/"
],
"dependencies": {
"@ionic/react": "^6.3.4",
"@ionic/react": "^6.3.5",
"tslib": "*"
},
"peerDependencies": {

View File

@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [6.3.5](https://github.com/ionic-team/ionic/compare/v6.3.4...v6.3.5) (2022-11-09)
### Bug Fixes
* **react:** loading layout is correct with no message ([#26222](https://github.com/ionic-team/ionic/issues/26222)) ([57105d5](https://github.com/ionic-team/ionic/commit/57105d54ea259fc9cd1a63e3d361ec8a57dd2971)), closes [#26219](https://github.com/ionic-team/ionic/issues/26219)
## [6.3.4](https://github.com/ionic-team/ionic/compare/v6.3.3...v6.3.4) (2022-11-02)
**Note:** Version bump only for package @ionic/react

View File

@ -1,15 +1,15 @@
{
"name": "@ionic/react",
"version": "6.3.4",
"version": "6.3.5",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/react",
"version": "6.3.4",
"version": "6.3.5",
"license": "MIT",
"dependencies": {
"@ionic/core": "^6.3.4",
"@ionic/core": "^6.3.5",
"ionicons": "^6.0.2",
"tslib": "*"
},
@ -607,9 +607,9 @@
}
},
"node_modules/@ionic/core": {
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"version": "6.3.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.5.tgz",
"integrity": "sha512-srAZbD1ThJPNHr/6WolC89PFnJ8AA+MKYkZF/Wjq7ysHO+qdg5gP5GtlEN/sfO8DM5J3GZHEbRW3m+jCepNoxA==",
"dependencies": {
"@stencil/core": "^2.18.0",
"ionicons": "^6.0.3",
@ -9534,9 +9534,9 @@
}
},
"@ionic/core": {
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"version": "6.3.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.5.tgz",
"integrity": "sha512-srAZbD1ThJPNHr/6WolC89PFnJ8AA+MKYkZF/Wjq7ysHO+qdg5gP5GtlEN/sfO8DM5J3GZHEbRW3m+jCepNoxA==",
"requires": {
"@stencil/core": "^2.18.0",
"ionicons": "^6.0.3",

View File

@ -1,6 +1,6 @@
{
"name": "@ionic/react",
"version": "6.3.4",
"version": "6.3.5",
"description": "React specific wrapper for @ionic/core",
"keywords": [
"ionic",
@ -41,7 +41,7 @@
"css/"
],
"dependencies": {
"@ionic/core": "^6.3.4",
"@ionic/core": "^6.3.5",
"ionicons": "^6.0.2",
"tslib": "*"
},

View File

@ -18,7 +18,7 @@ export function useIonLoading(): UseIonLoadingResult {
const present = useCallback(
(
messageOrOptions: string | (LoadingOptions & HookOverlayOptions) = '',
messageOrOptions: string | (LoadingOptions & HookOverlayOptions) = {},
duration?: number,
spinner?: SpinnerTypes
) => {
@ -26,7 +26,7 @@ export function useIonLoading(): UseIonLoadingResult {
return controller.present({
message: messageOrOptions,
duration,
spinner: spinner ?? 'lines',
spinner,
});
} else {
return controller.present(messageOrOptions);

View File

@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [6.3.5](https://github.com/ionic-team/ionic/compare/v6.3.4...v6.3.5) (2022-11-09)
**Note:** Version bump only for package @ionic/vue-router
## [6.3.4](https://github.com/ionic-team/ionic/compare/v6.3.3...v6.3.4) (2022-11-02)
**Note:** Version bump only for package @ionic/vue-router

View File

@ -1,15 +1,15 @@
{
"name": "@ionic/vue-router",
"version": "6.3.4",
"version": "6.3.5",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/vue-router",
"version": "6.3.4",
"version": "6.3.5",
"license": "MIT",
"dependencies": {
"@ionic/vue": "^6.3.4"
"@ionic/vue": "^6.3.5"
},
"devDependencies": {
"@types/jest": "^28.1.1",
@ -578,9 +578,9 @@
"dev": true
},
"node_modules/@ionic/core": {
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"version": "6.3.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.5.tgz",
"integrity": "sha512-srAZbD1ThJPNHr/6WolC89PFnJ8AA+MKYkZF/Wjq7ysHO+qdg5gP5GtlEN/sfO8DM5J3GZHEbRW3m+jCepNoxA==",
"dependencies": {
"@stencil/core": "^2.18.0",
"ionicons": "^6.0.3",
@ -588,11 +588,11 @@
}
},
"node_modules/@ionic/vue": {
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-6.3.4.tgz",
"integrity": "sha512-Ww1qa+5iaF+Qmm131/5YxCQg+sL7GmKvTe1ODrLkP8l06Hp3usWft848dM1zP2yw5M+CdEOTBmLFpOitRGUQ1Q==",
"version": "6.3.5",
"resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-6.3.5.tgz",
"integrity": "sha512-qYG8fzwtUcuifj0WnSZOOj+9WRWqtGIxeoevMfv+Zw0Gl2NULKwMzpDgrbArWtn0DP3l/vBYj+qkefzlLPo+wQ==",
"dependencies": {
"@ionic/core": "^6.3.4",
"@ionic/core": "^6.3.5",
"ionicons": "^6.0.2"
}
},
@ -2374,23 +2374,11 @@
"license": "ISC"
},
"node_modules/ionicons": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.0.3.tgz",
"integrity": "sha512-kVOWER991EMqLiVShrCSWKMHkgHZP7XfVdyN6YPMuoO33W7pc5CPNVNfR8OMe/I8rYEbaunyBs6dXNYpR6gGZw==",
"version": "6.0.4",
"resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.0.4.tgz",
"integrity": "sha512-uDNOkBo0OVYV+kIhb51g9mb7r3Z0b+78GPZQBsjXuaetNmrB/mNTqN/uFtO+vxL/rQySKjzk8qeKJI5NWL9Ueg==",
"dependencies": {
"@stencil/core": "~2.16.0"
}
},
"node_modules/ionicons/node_modules/@stencil/core": {
"version": "2.16.1",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.16.1.tgz",
"integrity": "sha512-s/UJp9qxExL3DyQPT70kiuWeb3AdjbUZM+5lEIXn30I2DLcLYPOPXfsoWJODieQywq+3vPiLZeIdkoqjf6jcSw==",
"bin": {
"stencil": "bin/stencil"
},
"engines": {
"node": ">=12.10.0",
"npm": ">=6.0.0"
"@stencil/core": "^2.18.0"
}
},
"node_modules/is-arrayish": {
@ -5233,9 +5221,9 @@
"dev": true
},
"@ionic/core": {
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"version": "6.3.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.5.tgz",
"integrity": "sha512-srAZbD1ThJPNHr/6WolC89PFnJ8AA+MKYkZF/Wjq7ysHO+qdg5gP5GtlEN/sfO8DM5J3GZHEbRW3m+jCepNoxA==",
"requires": {
"@stencil/core": "^2.18.0",
"ionicons": "^6.0.3",
@ -5243,11 +5231,11 @@
}
},
"@ionic/vue": {
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-6.3.4.tgz",
"integrity": "sha512-Ww1qa+5iaF+Qmm131/5YxCQg+sL7GmKvTe1ODrLkP8l06Hp3usWft848dM1zP2yw5M+CdEOTBmLFpOitRGUQ1Q==",
"version": "6.3.5",
"resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-6.3.5.tgz",
"integrity": "sha512-qYG8fzwtUcuifj0WnSZOOj+9WRWqtGIxeoevMfv+Zw0Gl2NULKwMzpDgrbArWtn0DP3l/vBYj+qkefzlLPo+wQ==",
"requires": {
"@ionic/core": "^6.3.4",
"@ionic/core": "^6.3.5",
"ionicons": "^6.0.2"
}
},
@ -6646,18 +6634,11 @@
"dev": true
},
"ionicons": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.0.3.tgz",
"integrity": "sha512-kVOWER991EMqLiVShrCSWKMHkgHZP7XfVdyN6YPMuoO33W7pc5CPNVNfR8OMe/I8rYEbaunyBs6dXNYpR6gGZw==",
"version": "6.0.4",
"resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.0.4.tgz",
"integrity": "sha512-uDNOkBo0OVYV+kIhb51g9mb7r3Z0b+78GPZQBsjXuaetNmrB/mNTqN/uFtO+vxL/rQySKjzk8qeKJI5NWL9Ueg==",
"requires": {
"@stencil/core": "~2.16.0"
},
"dependencies": {
"@stencil/core": {
"version": "2.16.1",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.16.1.tgz",
"integrity": "sha512-s/UJp9qxExL3DyQPT70kiuWeb3AdjbUZM+5lEIXn30I2DLcLYPOPXfsoWJODieQywq+3vPiLZeIdkoqjf6jcSw=="
}
"@stencil/core": "^2.18.0"
}
},
"is-arrayish": {

View File

@ -1,6 +1,6 @@
{
"name": "@ionic/vue-router",
"version": "6.3.4",
"version": "6.3.5",
"description": "Vue Router integration for @ionic/vue",
"scripts": {
"prepublishOnly": "npm run build",
@ -44,7 +44,7 @@
},
"homepage": "https://github.com/ionic-team/ionic#readme",
"dependencies": {
"@ionic/vue": "^6.3.4"
"@ionic/vue": "^6.3.5"
},
"devDependencies": {
"@types/jest": "^28.1.1",

View File

@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [6.3.5](https://github.com/ionic-team/ionic/compare/v6.3.4...v6.3.5) (2022-11-09)
### Bug Fixes
* **vue:** generate web-types for components ([#26205](https://github.com/ionic-team/ionic/issues/26205)) ([1f7fc8f](https://github.com/ionic-team/ionic/commit/1f7fc8f05c03316560e0b58c3bf58db6b189d0e1)), closes [#26198](https://github.com/ionic-team/ionic/issues/26198)
## [6.3.4](https://github.com/ionic-team/ionic/compare/v6.3.3...v6.3.4) (2022-11-02)
**Note:** Version bump only for package @ionic/vue

View File

@ -1,15 +1,15 @@
{
"name": "@ionic/vue",
"version": "6.3.4",
"version": "6.3.5",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/vue",
"version": "6.3.4",
"version": "6.3.5",
"license": "MIT",
"dependencies": {
"@ionic/core": "^6.3.4",
"@ionic/core": "^6.3.5",
"ionicons": "^6.0.2"
},
"devDependencies": {
@ -59,9 +59,9 @@
}
},
"node_modules/@ionic/core": {
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"version": "6.3.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.5.tgz",
"integrity": "sha512-srAZbD1ThJPNHr/6WolC89PFnJ8AA+MKYkZF/Wjq7ysHO+qdg5gP5GtlEN/sfO8DM5J3GZHEbRW3m+jCepNoxA==",
"dependencies": {
"@stencil/core": "^2.18.0",
"ionicons": "^6.0.3",
@ -768,9 +768,9 @@
}
},
"@ionic/core": {
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"version": "6.3.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.5.tgz",
"integrity": "sha512-srAZbD1ThJPNHr/6WolC89PFnJ8AA+MKYkZF/Wjq7ysHO+qdg5gP5GtlEN/sfO8DM5J3GZHEbRW3m+jCepNoxA==",
"requires": {
"@stencil/core": "^2.18.0",
"ionicons": "^6.0.3",

View File

@ -1,6 +1,6 @@
{
"name": "@ionic/vue",
"version": "6.3.4",
"version": "6.3.5",
"description": "Vue specific wrapper for @ionic/core",
"scripts": {
"prepublishOnly": "npm run build",
@ -61,7 +61,7 @@
"vue-router": "^4.0.16"
},
"dependencies": {
"@ionic/core": "^6.3.4",
"@ionic/core": "^6.3.5",
"ionicons": "^6.0.2"
},
"vetur": {

View File

@ -1,16 +1,37 @@
const fs = require("fs")
const docs = require("@ionic/core/dist/docs.json")
const { pascalCase } = require('change-case')
const fs = require("fs");
const docs = require("@ionic/core/dist/docs.json");
const { pascalCase } = require("change-case");
const components = []
const components = [];
for (const component of docs.components) {
if (!component.usage.vue) continue
const attributes = []
const slots = []
const events = []
const componentName = pascalCase(component.tag)
const docUrl = "https://ionicframework.com/docs/api/" + component.tag.substr(4)
/**
* The list of tag names to ignore generating web types for.
*/
const excludeComponents = [
"ion-app",
"ion-icon",
"ion-nav",
"ion-nav-link",
"ion-router",
"ion-route-redirect",
"ion-router-link",
"ion-router-outlet",
];
/**
* The filtered set of components to generate web types for.
*/
const filteredComponents = docs.components.filter(
(c) => !excludeComponents.includes(c.tag)
);
for (const component of filteredComponents) {
const attributes = [];
const slots = [];
const events = [];
const componentName = pascalCase(component.tag);
const docUrl =
"https://ionicframework.com/docs/api/" + component.tag.substr(4);
for (const prop of component.props || []) {
attributes.push({
@ -20,9 +41,9 @@ for (const component of docs.components) {
default: prop.default,
value: {
kind: "expression",
type: prop.type
}
})
type: prop.type,
},
});
}
for (const event of component.events || []) {
@ -33,18 +54,20 @@ for (const component of docs.components) {
events.push({
name: eventName,
description: event.docs,
arguments: [{
arguments: [
{
name: "detail",
type: event.detail
}]
})
type: event.detail,
},
],
});
}
for (const slot of component.slots || []) {
slots.push({
name: slot.name === "" ? "default" : slot.name,
description: slot.docs
})
description: slot.docs,
});
}
components.push({
@ -52,13 +75,17 @@ for (const component of docs.components) {
"doc-url": docUrl,
description: component.docs,
source: {
module: "@ionic/core/" + component.filePath.replace("./src/", "dist/types/").replace(".tsx", ".d.ts"),
symbol: componentName.substr(3)
module:
"@ionic/core/" +
component.filePath
.replace("./src/", "dist/types/")
.replace(".tsx", ".d.ts"),
symbol: componentName.substr(3),
},
attributes,
slots,
events
})
events,
});
}
const webTypes = {
@ -70,9 +97,9 @@ const webTypes = {
html: {
"types-syntax": "typescript",
"description-markup": "markdown",
tags: components
}
}
}
tags: components,
},
},
};
fs.writeFileSync("dist/web-types.json", JSON.stringify(webTypes, null, 2))
fs.writeFileSync("dist/web-types.json", JSON.stringify(webTypes, null, 2));