chore(): sync with main

chore(): sync with main
This commit is contained in:
Liam DeBeasi 2022-11-08 15:32:04 -05:00 committed by GitHub
commit d72390132a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
61 changed files with 28638 additions and 178 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,19 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [6.3.4](https://github.com/ionic-team/ionic-framework/compare/v6.3.3...v6.3.4) (2022-11-02)
### Bug Fixes
* **datetime:** account for allowed values when setting default date ([#26093](https://github.com/ionic-team/ionic-framework/issues/26093)) ([3745083](https://github.com/ionic-team/ionic-framework/commit/3745083b7cdf8651d1c7f5f1a0214b487ea286ca)), closes [#24722](https://github.com/ionic-team/ionic-framework/issues/24722)
* **modal, popover:** remove trigger click listeners when overlay is unmounted ([#26167](https://github.com/ionic-team/ionic-framework/issues/26167)) ([1320948](https://github.com/ionic-team/ionic-framework/commit/1320948b245be3defe8610b9f049e781a4903a6e))
* **modal:** buttons are highlighted with VoiceOver ([#26180](https://github.com/ionic-team/ionic-framework/issues/26180)) ([1504b88](https://github.com/ionic-team/ionic-framework/commit/1504b8888d6f79ea382935ed52b104b9f841d150)), closes [#26156](https://github.com/ionic-team/ionic-framework/issues/26156)
## [6.3.3](https://github.com/ionic-team/ionic-framework/compare/v6.3.2...v6.3.3) (2022-10-26)

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.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
## [6.3.3](https://github.com/ionic-team/ionic/compare/v6.3.2...v6.3.3) (2022-10-26)

View File

@ -1,15 +1,15 @@
{
"name": "@ionic/angular",
"version": "6.3.3",
"version": "6.3.4",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/angular",
"version": "6.3.3",
"version": "6.3.4",
"license": "MIT",
"dependencies": {
"@ionic/core": "^6.3.3",
"@ionic/core": "^6.3.4",
"jsonc-parser": "^3.0.0",
"tslib": "^2.0.0"
},
@ -1023,9 +1023,9 @@
"dev": true
},
"node_modules/@ionic/core": {
"version": "6.3.3",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.3.tgz",
"integrity": "sha512-I7eRsni/3blStScsQcITb4seuunNzS4mIK0GxHljeRRb8oQI9Xy/oP4rq9weo9lsuEVD0sHIqBIS7/Oo9iEymQ==",
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"dependencies": {
"@stencil/core": "^2.18.0",
"ionicons": "^6.0.3",
@ -7951,9 +7951,9 @@
"dev": true
},
"@ionic/core": {
"version": "6.3.3",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.3.tgz",
"integrity": "sha512-I7eRsni/3blStScsQcITb4seuunNzS4mIK0GxHljeRRb8oQI9Xy/oP4rq9weo9lsuEVD0sHIqBIS7/Oo9iEymQ==",
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"requires": {
"@stencil/core": "^2.18.0",
"ionicons": "^6.0.3",

View File

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

View File

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

View File

@ -29,7 +29,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

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

View File

@ -30,7 +30,7 @@ export class InputsComponent {
this.toggle = false;
this.select = undefined;
}
counter() {
this.changes++;
return Math.floor(this.changes / 2);

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,
@ -37,7 +37,7 @@ export class ModalExampleComponent implements OnInit, ViewWillLeave, ViewDidEnte
}
setSelect(value: null | undefined) {
this.form.get('select').setValue(value);
this.form.get('select')!.setValue(value);
}
ionViewWillEnter() {

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

@ -0,0 +1,40 @@
import { AfterViewInit, Component, ViewChild } from '@angular/core';
import { IonSlides } from '@ionic/angular';
@Component({
selector: 'app-slides',
templateUrl: './slides.component.html',
})
export class SlidesComponent implements AfterViewInit {
@ViewChild(IonSlides, { static: true }) slides!: IonSlides;
slideIndex = 0;
slideIndex2 = 0;
slidesData: string[] = [];
constructor() { }
ngAfterViewInit() {
this.slides.ionSlideDidChange.subscribe(async () => {
this.slideIndex2 = await this.slides.getActiveIndex();
});
}
addSlides() {
const start = this.slidesData.length + 1;
this.slidesData.push(`Slide ${start}`, `Slide ${start + 1}`, `Slide ${start + 2}`);
}
prevSlide() {
this.slides.slidePrev();
}
nextSlide() {
this.slides.slideNext();
}
async checkIndex() {
this.slideIndex = await this.slides.getActiveIndex();
}
}

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

@ -6,10 +6,9 @@ import { IonTabs, IonButton } from '@ionic/angular';
templateUrl: './view-child.component.html'
})
export class ViewChildComponent implements AfterViewInit {
@ViewChild(IonButton, { static: true }) button: IonButton;
@ViewChild(IonTabs, { static: true }) tabs: IonTabs;
@ViewChild('div', { static: true }) div: ElementRef;
@ViewChild(IonButton, { static: true }) button!: IonButton;
@ViewChild(IonTabs, { static: true }) tabs!: IonTabs;
@ViewChild('div', { static: true }) div!: ElementRef;
ngAfterViewInit() {
const loaded = !!(this.button && this.tabs && this.div);

View File

@ -0,0 +1,46 @@
import { Component, NgZone, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { ViewDidEnter, ViewDidLeave, ViewWillEnter, ViewWillLeave } from '@ionic/angular';
@Component({
selector: 'app-virtual-scroll-detail',
templateUrl: './virtual-scroll-detail.component.html',
})
export class VirtualScrollDetailComponent implements OnInit, ViewWillEnter, ViewDidEnter, ViewWillLeave, ViewDidLeave {
onInit = 0;
willEnter = 0;
didEnter = 0;
willLeave = 0;
didLeave = 0;
itemNu: string | null = 'none';
constructor(private route: ActivatedRoute) {}
ngOnInit() {
this.itemNu = this.route.snapshot.paramMap.get('itemId');
NgZone.assertInAngularZone();
this.onInit++;
}
ionViewWillEnter() {
if (this.onInit !== 1) {
throw new Error('ngOnInit was not called');
}
NgZone.assertInAngularZone();
this.willEnter++;
}
ionViewDidEnter() {
NgZone.assertInAngularZone();
this.didEnter++;
}
ionViewWillLeave() {
NgZone.assertInAngularZone();
this.willLeave++;
}
ionViewDidLeave() {
NgZone.assertInAngularZone();
this.didLeave++;
}
}

View File

@ -0,0 +1,17 @@
import { Component, OnInit, NgZone, Input } from '@angular/core';
@Component({
selector: 'app-virtual-scroll-inner',
templateUrl: './virtual-scroll-inner.component.html',
})
export class VirtualScrollInnerComponent implements OnInit {
@Input() value?: string;
onInit = 0;
ngOnInit() {
NgZone.assertInAngularZone();
this.onInit++;
console.log('created');
}
}

View File

@ -0,0 +1,38 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { HeaderFn } from '@ionic/core';
import { IonVirtualScroll } from '@ionic/angular';
@Component({
selector: 'app-virtual-scroll',
templateUrl: './virtual-scroll.component.html',
})
export class VirtualScrollComponent {
@ViewChild(IonVirtualScroll, { static: true }) virtualScroll!: IonVirtualScroll;
items = Array.from({length: 100}, (_, i) => ({ name: `${i}`, checked: true}));
itemHeight = () => 44;
myHeaderFn: HeaderFn = (_, index) => {
if ((index % 10) === 0) {
return `Header ${index}`;
}
return '';
}
myFooterFn: HeaderFn = (_, index) => {
if ((index % 5) === 0) {
return `Footer ${index}`;
}
return '';
}
addItems() {
console.log('adding items');
this.items.push(
{ name: `New Item`, checked: true}
);
this.virtualScroll.checkEnd();
}
}

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.4](https://github.com/ionic-team/ionic/compare/v6.3.3...v6.3.4) (2022-11-02)
### Bug Fixes
* **datetime:** account for allowed values when setting default date ([#26093](https://github.com/ionic-team/ionic/issues/26093)) ([3745083](https://github.com/ionic-team/ionic/commit/3745083b7cdf8651d1c7f5f1a0214b487ea286ca)), closes [#24722](https://github.com/ionic-team/ionic/issues/24722)
* **modal, popover:** remove trigger click listeners when overlay is unmounted ([#26167](https://github.com/ionic-team/ionic/issues/26167)) ([1320948](https://github.com/ionic-team/ionic/commit/1320948b245be3defe8610b9f049e781a4903a6e))
* **modal:** buttons are highlighted with VoiceOver ([#26180](https://github.com/ionic-team/ionic/issues/26180)) ([1504b88](https://github.com/ionic-team/ionic/commit/1504b8888d6f79ea382935ed52b104b9f841d150)), closes [#26156](https://github.com/ionic-team/ionic/issues/26156)
## [6.3.3](https://github.com/ionic-team/ionic/compare/v6.3.2...v6.3.3) (2022-10-26)

View File

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

View File

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

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

@ -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

@ -53,8 +53,6 @@ export const CoreDelegate = () => {
userComponentProps: any = {},
cssClasses: string[] = []
) => {
const hasUserDefinedComponent = userComponent !== undefined;
BaseComponent = parentElement;
/**
* If passing in a component via the `component` props
@ -88,15 +86,23 @@ export const CoreDelegate = () => {
BaseComponent.appendChild(el);
await new Promise((resolve) => componentOnReady(el, resolve));
} else if (hasUserDefinedComponent && 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 el = BaseComponent.ownerDocument?.createElement('div');
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);
} else if (BaseComponent.children.length > 0) {
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);
}
}
/**

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.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
## [6.3.3](https://github.com/ionic-team/ionic-docs/compare/v6.3.2...v6.3.3) (2022-10-26)
**Note:** Version bump only for package @ionic/docs

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@ionic/docs",
"version": "6.3.3",
"version": "6.3.4",
"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.3"
"version": "6.3.4"
}

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.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
## [6.3.3](https://github.com/ionic-team/ionic/compare/v6.3.2...v6.3.3) (2022-10-26)
**Note:** Version bump only for package @ionic/angular-server

View File

@ -1,12 +1,12 @@
{
"name": "@ionic/angular-server",
"version": "6.3.3",
"version": "6.3.4",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/angular-server",
"version": "6.3.3",
"version": "6.3.4",
"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.3",
"@ionic/core": "^6.3.4",
"@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.3",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.3.tgz",
"integrity": "sha512-I7eRsni/3blStScsQcITb4seuunNzS4mIK0GxHljeRRb8oQI9Xy/oP4rq9weo9lsuEVD0sHIqBIS7/Oo9iEymQ==",
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"dev": true,
"dependencies": {
"@stencil/core": "^2.18.0",
@ -7116,9 +7116,9 @@
"dev": true
},
"@ionic/core": {
"version": "6.3.3",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.3.tgz",
"integrity": "sha512-I7eRsni/3blStScsQcITb4seuunNzS4mIK0GxHljeRRb8oQI9Xy/oP4rq9weo9lsuEVD0sHIqBIS7/Oo9iEymQ==",
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"dev": true,
"requires": {
"@stencil/core": "^2.18.0",

View File

@ -1,6 +1,6 @@
{
"name": "@ionic/angular-server",
"version": "6.3.3",
"version": "6.3.4",
"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.3",
"@ionic/core": "^6.3.4",
"@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.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
## [6.3.3](https://github.com/ionic-team/ionic/compare/v6.3.2...v6.3.3) (2022-10-26)

View File

@ -1,15 +1,15 @@
{
"name": "@ionic/react-router",
"version": "6.3.3",
"version": "6.3.4",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/react-router",
"version": "6.3.3",
"version": "6.3.4",
"license": "MIT",
"dependencies": {
"@ionic/react": "^6.3.3",
"@ionic/react": "^6.3.4",
"tslib": "*"
},
"devDependencies": {
@ -147,9 +147,9 @@
}
},
"node_modules/@ionic/core": {
"version": "6.3.3",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.3.tgz",
"integrity": "sha512-I7eRsni/3blStScsQcITb4seuunNzS4mIK0GxHljeRRb8oQI9Xy/oP4rq9weo9lsuEVD0sHIqBIS7/Oo9iEymQ==",
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"dependencies": {
"@stencil/core": "^2.18.0",
"ionicons": "^6.0.3",
@ -157,11 +157,11 @@
}
},
"node_modules/@ionic/react": {
"version": "6.3.3",
"resolved": "https://registry.npmjs.org/@ionic/react/-/react-6.3.3.tgz",
"integrity": "sha512-qWUFSwZKV1iXNPptPqahqLLrIV33+aueEGfC7UWchGq0P6re3UkUTyCNRPcXtdYiglbVD1A+goHYLnG1Wf6vLg==",
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/react/-/react-6.3.4.tgz",
"integrity": "sha512-0AHyFpzk2Q3BikzbfQryiAwkzW+Y+GaXfaxPvKm+vmFiwCDcIwsCS/JZGDxcmR7G5Ps1QrfNLq5IgvZb+XSjAA==",
"dependencies": {
"@ionic/core": "^6.3.3",
"@ionic/core": "^6.3.4",
"ionicons": "^6.0.2",
"tslib": "*"
},
@ -207,9 +207,9 @@
}
},
"node_modules/@stencil/core": {
"version": "2.19.1",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.19.1.tgz",
"integrity": "sha512-cVNFnVEva6PfclBvTgyo6zgPYSmiXkIUwR66GwsVdj7LSlgBnlUSSFUeBV8VYf5zPg05W1AUyZfm+nnYkBI7Cw==",
"version": "2.19.2",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.19.2.tgz",
"integrity": "sha512-TK3sHqyQAACwcac4fWntypFtN9c/y+y9ioZojeCnNDY3dxF33Ax70lL9ZLDyQnWWR+aTh1WFoqB5sYOnZIUKMA==",
"bin": {
"stencil": "bin/stencil"
},
@ -1157,9 +1157,9 @@
}
},
"@ionic/core": {
"version": "6.3.3",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.3.tgz",
"integrity": "sha512-I7eRsni/3blStScsQcITb4seuunNzS4mIK0GxHljeRRb8oQI9Xy/oP4rq9weo9lsuEVD0sHIqBIS7/Oo9iEymQ==",
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"requires": {
"@stencil/core": "^2.18.0",
"ionicons": "^6.0.3",
@ -1167,11 +1167,11 @@
}
},
"@ionic/react": {
"version": "6.3.3",
"resolved": "https://registry.npmjs.org/@ionic/react/-/react-6.3.3.tgz",
"integrity": "sha512-qWUFSwZKV1iXNPptPqahqLLrIV33+aueEGfC7UWchGq0P6re3UkUTyCNRPcXtdYiglbVD1A+goHYLnG1Wf6vLg==",
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/react/-/react-6.3.4.tgz",
"integrity": "sha512-0AHyFpzk2Q3BikzbfQryiAwkzW+Y+GaXfaxPvKm+vmFiwCDcIwsCS/JZGDxcmR7G5Ps1QrfNLq5IgvZb+XSjAA==",
"requires": {
"@ionic/core": "^6.3.3",
"@ionic/core": "^6.3.4",
"ionicons": "^6.0.2",
"tslib": "*"
}
@ -1199,9 +1199,9 @@
}
},
"@stencil/core": {
"version": "2.19.1",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.19.1.tgz",
"integrity": "sha512-cVNFnVEva6PfclBvTgyo6zgPYSmiXkIUwR66GwsVdj7LSlgBnlUSSFUeBV8VYf5zPg05W1AUyZfm+nnYkBI7Cw=="
"version": "2.19.2",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.19.2.tgz",
"integrity": "sha512-TK3sHqyQAACwcac4fWntypFtN9c/y+y9ioZojeCnNDY3dxF33Ax70lL9ZLDyQnWWR+aTh1WFoqB5sYOnZIUKMA=="
},
"@types/estree": {
"version": "0.0.39",

View File

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

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.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
## [6.3.3](https://github.com/ionic-team/ionic/compare/v6.3.2...v6.3.3) (2022-10-26)

View File

@ -1,15 +1,15 @@
{
"name": "@ionic/react",
"version": "6.3.3",
"version": "6.3.4",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/react",
"version": "6.3.3",
"version": "6.3.4",
"license": "MIT",
"dependencies": {
"@ionic/core": "^6.3.3",
"@ionic/core": "^6.3.4",
"ionicons": "^6.0.2",
"tslib": "*"
},
@ -607,9 +607,9 @@
}
},
"node_modules/@ionic/core": {
"version": "6.3.3",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.3.tgz",
"integrity": "sha512-I7eRsni/3blStScsQcITb4seuunNzS4mIK0GxHljeRRb8oQI9Xy/oP4rq9weo9lsuEVD0sHIqBIS7/Oo9iEymQ==",
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"dependencies": {
"@stencil/core": "^2.18.0",
"ionicons": "^6.0.3",
@ -9534,9 +9534,9 @@
}
},
"@ionic/core": {
"version": "6.3.3",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.3.tgz",
"integrity": "sha512-I7eRsni/3blStScsQcITb4seuunNzS4mIK0GxHljeRRb8oQI9Xy/oP4rq9weo9lsuEVD0sHIqBIS7/Oo9iEymQ==",
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"requires": {
"@stencil/core": "^2.18.0",
"ionicons": "^6.0.3",

View File

@ -1,6 +1,6 @@
{
"name": "@ionic/react",
"version": "6.3.3",
"version": "6.3.4",
"description": "React specific wrapper for @ionic/core",
"keywords": [
"ionic",
@ -40,7 +40,7 @@
"css/"
],
"dependencies": {
"@ionic/core": "^6.3.3",
"@ionic/core": "^6.3.4",
"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.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
## [6.3.3](https://github.com/ionic-team/ionic/compare/v6.3.2...v6.3.3) (2022-10-26)

View File

@ -1,15 +1,15 @@
{
"name": "@ionic/vue-router",
"version": "6.3.3",
"version": "6.3.4",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/vue-router",
"version": "6.3.3",
"version": "6.3.4",
"license": "MIT",
"dependencies": {
"@ionic/vue": "^6.3.3"
"@ionic/vue": "^6.3.4"
},
"devDependencies": {
"@types/jest": "^28.1.1",
@ -578,9 +578,9 @@
"dev": true
},
"node_modules/@ionic/core": {
"version": "6.3.3",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.3.tgz",
"integrity": "sha512-I7eRsni/3blStScsQcITb4seuunNzS4mIK0GxHljeRRb8oQI9Xy/oP4rq9weo9lsuEVD0sHIqBIS7/Oo9iEymQ==",
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"dependencies": {
"@stencil/core": "^2.18.0",
"ionicons": "^6.0.3",
@ -588,11 +588,11 @@
}
},
"node_modules/@ionic/vue": {
"version": "6.3.3",
"resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-6.3.3.tgz",
"integrity": "sha512-MIbnZ1A046ugZroeoK+Tsaykl134bFd5P072JhNQtMAbUFiEfhTkWenbge2DJV8hKPfYmWtZzPze6i0tyw0wlw==",
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-6.3.4.tgz",
"integrity": "sha512-Ww1qa+5iaF+Qmm131/5YxCQg+sL7GmKvTe1ODrLkP8l06Hp3usWft848dM1zP2yw5M+CdEOTBmLFpOitRGUQ1Q==",
"dependencies": {
"@ionic/core": "^6.3.3",
"@ionic/core": "^6.3.4",
"ionicons": "^6.0.2"
}
},
@ -1005,9 +1005,9 @@
}
},
"node_modules/@stencil/core": {
"version": "2.19.1",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.19.1.tgz",
"integrity": "sha512-cVNFnVEva6PfclBvTgyo6zgPYSmiXkIUwR66GwsVdj7LSlgBnlUSSFUeBV8VYf5zPg05W1AUyZfm+nnYkBI7Cw==",
"version": "2.19.2",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.19.2.tgz",
"integrity": "sha512-TK3sHqyQAACwcac4fWntypFtN9c/y+y9ioZojeCnNDY3dxF33Ax70lL9ZLDyQnWWR+aTh1WFoqB5sYOnZIUKMA==",
"bin": {
"stencil": "bin/stencil"
},
@ -4501,9 +4501,9 @@
}
},
"node_modules/tslib": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
"integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
},
"node_modules/type-check": {
"version": "0.3.2",
@ -5233,9 +5233,9 @@
"dev": true
},
"@ionic/core": {
"version": "6.3.3",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.3.tgz",
"integrity": "sha512-I7eRsni/3blStScsQcITb4seuunNzS4mIK0GxHljeRRb8oQI9Xy/oP4rq9weo9lsuEVD0sHIqBIS7/Oo9iEymQ==",
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"requires": {
"@stencil/core": "^2.18.0",
"ionicons": "^6.0.3",
@ -5243,11 +5243,11 @@
}
},
"@ionic/vue": {
"version": "6.3.3",
"resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-6.3.3.tgz",
"integrity": "sha512-MIbnZ1A046ugZroeoK+Tsaykl134bFd5P072JhNQtMAbUFiEfhTkWenbge2DJV8hKPfYmWtZzPze6i0tyw0wlw==",
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-6.3.4.tgz",
"integrity": "sha512-Ww1qa+5iaF+Qmm131/5YxCQg+sL7GmKvTe1ODrLkP8l06Hp3usWft848dM1zP2yw5M+CdEOTBmLFpOitRGUQ1Q==",
"requires": {
"@ionic/core": "^6.3.3",
"@ionic/core": "^6.3.4",
"ionicons": "^6.0.2"
}
},
@ -5580,9 +5580,9 @@
}
},
"@stencil/core": {
"version": "2.19.1",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.19.1.tgz",
"integrity": "sha512-cVNFnVEva6PfclBvTgyo6zgPYSmiXkIUwR66GwsVdj7LSlgBnlUSSFUeBV8VYf5zPg05W1AUyZfm+nnYkBI7Cw=="
"version": "2.19.2",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.19.2.tgz",
"integrity": "sha512-TK3sHqyQAACwcac4fWntypFtN9c/y+y9ioZojeCnNDY3dxF33Ax70lL9ZLDyQnWWR+aTh1WFoqB5sYOnZIUKMA=="
},
"@tootallnate/once": {
"version": "2.0.0",
@ -8220,9 +8220,9 @@
}
},
"tslib": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
"integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
},
"type-check": {
"version": "0.3.2",

View File

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

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.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
## [6.3.3](https://github.com/ionic-team/ionic/compare/v6.3.2...v6.3.3) (2022-10-26)

View File

@ -1,15 +1,15 @@
{
"name": "@ionic/vue",
"version": "6.3.3",
"version": "6.3.4",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/vue",
"version": "6.3.3",
"version": "6.3.4",
"license": "MIT",
"dependencies": {
"@ionic/core": "^6.3.3",
"@ionic/core": "^6.3.4",
"ionicons": "^6.0.2"
},
"devDependencies": {
@ -59,9 +59,9 @@
}
},
"node_modules/@ionic/core": {
"version": "6.3.3",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.3.tgz",
"integrity": "sha512-I7eRsni/3blStScsQcITb4seuunNzS4mIK0GxHljeRRb8oQI9Xy/oP4rq9weo9lsuEVD0sHIqBIS7/Oo9iEymQ==",
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"dependencies": {
"@stencil/core": "^2.18.0",
"ionicons": "^6.0.3",
@ -768,9 +768,9 @@
}
},
"@ionic/core": {
"version": "6.3.3",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.3.tgz",
"integrity": "sha512-I7eRsni/3blStScsQcITb4seuunNzS4mIK0GxHljeRRb8oQI9Xy/oP4rq9weo9lsuEVD0sHIqBIS7/Oo9iEymQ==",
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.3.4.tgz",
"integrity": "sha512-3EnKqFdon7Im8JNvuPoq/iGyYK7hskdb9u5hlQE0fHU/9Q0DvFVh17QTq1sQjXntoJovfRhaPJhG+kvZK3mVAQ==",
"requires": {
"@stencil/core": "^2.18.0",
"ionicons": "^6.0.3",

View File

@ -1,6 +1,6 @@
{
"name": "@ionic/vue",
"version": "6.3.3",
"version": "6.3.4",
"description": "Vue specific wrapper for @ionic/core",
"scripts": {
"prepublishOnly": "npm run build",
@ -60,7 +60,7 @@
"vue-router": "^4.0.16"
},
"dependencies": {
"@ionic/core": "^6.3.3",
"@ionic/core": "^6.3.4",
"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: [{
name: "detail",
type: event.detail
}]
})
arguments: [
{
name: "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));