mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 03:00:58 +08:00
refactor(angular): use Stencil output target for Angular bindings (#23986)
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import { ComponentFactoryResolver, Directive, ElementRef, Injector, ViewContainerRef } from '@angular/core';
|
||||
|
||||
import { AngularDelegate } from '../../providers/angular-delegate';
|
||||
import { ProxyCmp, proxyOutputs } from '../proxies-utils';
|
||||
import { ProxyCmp, proxyOutputs } from '../angular-component-lib/utils';
|
||||
|
||||
@ProxyCmp({
|
||||
inputs: ['animated', 'animation', 'root', 'rootParams', 'swipeGesture'],
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* eslint-disable */
|
||||
/* tslint:disable */
|
||||
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, ElementRef, EventEmitter, NgZone, TemplateRef } from "@angular/core";
|
||||
import { ProxyCmp, proxyOutputs } from "../proxies-utils";
|
||||
import { ProxyCmp, proxyOutputs } from "../angular-component-lib/utils";
|
||||
import { Components } from "@ionic/core";
|
||||
export declare interface IonModal extends Components.IonModal {
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* eslint-disable */
|
||||
/* tslint:disable */
|
||||
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, ElementRef, EventEmitter, NgZone, TemplateRef } from "@angular/core";
|
||||
import { ProxyCmp, proxyOutputs } from "../proxies-utils";
|
||||
import { ProxyCmp, proxyOutputs } from "../angular-component-lib/utils";
|
||||
import { Components } from "@ionic/core";
|
||||
export declare interface IonPopover extends Components.IonPopover {
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
import type * as d from './proxies';
|
||||
import * as d from './proxies';
|
||||
|
||||
export const DIRECTIVES = [
|
||||
d.IonAccordion,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
import { ChangeDetectionStrategy, Component, ContentChild, ElementRef, EmbeddedViewRef, IterableDiffer, IterableDiffers, NgZone, SimpleChanges, TrackByFunction } from '@angular/core';
|
||||
import { Cell, CellType, FooterHeightFn, HeaderFn, HeaderHeightFn, ItemHeightFn } from '@ionic/core';
|
||||
|
||||
import { ProxyCmp } from '../proxies-utils';
|
||||
import { ProxyCmp } from '../angular-component-lib/utils';
|
||||
|
||||
import { VirtualFooter } from './virtual-footer';
|
||||
import { VirtualHeader } from './virtual-header';
|
||||
|
13
core/package-lock.json
generated
13
core/package-lock.json
generated
@ -18,6 +18,7 @@
|
||||
"@jest/core": "^26.6.3",
|
||||
"@rollup/plugin-node-resolve": "^8.4.0",
|
||||
"@rollup/plugin-virtual": "^2.0.3",
|
||||
"@stencil/angular-output-target": "^0.2.0",
|
||||
"@stencil/react-output-target": "^0.1.0",
|
||||
"@stencil/sass": "1.3.2",
|
||||
"@stencil/vue-output-target": "^0.5.1",
|
||||
@ -1356,6 +1357,12 @@
|
||||
"@sinonjs/commons": "^1.7.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@stencil/angular-output-target": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@stencil/angular-output-target/-/angular-output-target-0.2.0.tgz",
|
||||
"integrity": "sha512-Ptr5vigf8v+EnF9Y9LXTKimcVPfB9arC5FnSuKt5ZdNQ8IATWGLx4fhoD2/LThhkPwG9QtjDj9A4GPidu0Fomg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@stencil/core": {
|
||||
"version": "2.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.6.0.tgz",
|
||||
@ -15015,6 +15022,12 @@
|
||||
"@sinonjs/commons": "^1.7.0"
|
||||
}
|
||||
},
|
||||
"@stencil/angular-output-target": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@stencil/angular-output-target/-/angular-output-target-0.2.0.tgz",
|
||||
"integrity": "sha512-Ptr5vigf8v+EnF9Y9LXTKimcVPfB9arC5FnSuKt5ZdNQ8IATWGLx4fhoD2/LThhkPwG9QtjDj9A4GPidu0Fomg==",
|
||||
"dev": true
|
||||
},
|
||||
"@stencil/core": {
|
||||
"version": "2.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.6.0.tgz",
|
||||
|
@ -40,6 +40,7 @@
|
||||
"@jest/core": "^26.6.3",
|
||||
"@rollup/plugin-node-resolve": "^8.4.0",
|
||||
"@rollup/plugin-virtual": "^2.0.3",
|
||||
"@stencil/angular-output-target": "^0.2.0",
|
||||
"@stencil/react-output-target": "^0.1.0",
|
||||
"@stencil/sass": "1.3.2",
|
||||
"@stencil/vue-output-target": "^0.5.1",
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { Config } from '@stencil/core';
|
||||
import { sass } from '@stencil/sass';
|
||||
import { angularOutputTarget } from '@stencil/angular-output-target';
|
||||
import { vueOutputTarget } from '@stencil/vue-output-target';
|
||||
import { reactOutputTarget } from '@stencil/react-output-target';
|
||||
|
||||
@ -180,11 +181,9 @@ export const config: Config = {
|
||||
// type: 'stats',
|
||||
// file: 'stats.json'
|
||||
// },
|
||||
{
|
||||
type: 'angular',
|
||||
angularOutputTarget({
|
||||
componentCorePackage: '@ionic/core',
|
||||
directivesProxyFile: '../angular/src/directives/proxies.ts',
|
||||
directivesUtilsFile: '../angular/src/directives/proxies-utils.ts',
|
||||
directivesArrayFile: '../angular/src/directives/proxies-list.txt',
|
||||
excludeComponents: [
|
||||
// overlays
|
||||
@ -211,8 +210,44 @@ export const config: Config = {
|
||||
// auxiliar
|
||||
'ion-picker-column',
|
||||
'ion-virtual-scroll'
|
||||
]
|
||||
}
|
||||
],
|
||||
/**
|
||||
* TODO: Abstract custom Ionic value accessor functionality
|
||||
* to be configurable with Stencil generated value accessors.
|
||||
*/
|
||||
// valueAccessorConfigs: [
|
||||
// {
|
||||
// elementSelectors: ['ion-input:not([type=number])', 'ion-textarea', 'ion-searchbar'],
|
||||
// event: 'ionChange',
|
||||
// targetAttr: 'value',
|
||||
// type: 'text',
|
||||
// },
|
||||
// {
|
||||
// elementSelectors: ['ion-input[type=number]'],
|
||||
// event: 'ionChange',
|
||||
// targetAttr: 'value',
|
||||
// type: 'number',
|
||||
// },
|
||||
// {
|
||||
// elementSelectors: ['ion-checkbox', 'ion-toggle'],
|
||||
// event: 'ionChange',
|
||||
// targetAttr: 'checked',
|
||||
// type: 'boolean',
|
||||
// },
|
||||
// {
|
||||
// elementSelectors: ['ion-range', 'ion-select', 'ion-radio-group', 'ion-segment', 'ion-datetime'],
|
||||
// event: 'ionChange',
|
||||
// targetAttr: 'value',
|
||||
// type: 'select',
|
||||
// },
|
||||
// {
|
||||
// elementSelectors: ['ion-radio'],
|
||||
// event: 'ionSelect',
|
||||
// targetAttr: 'checked',
|
||||
// type: 'radio',
|
||||
// },
|
||||
// ]
|
||||
}),
|
||||
],
|
||||
buildEs5: 'prod',
|
||||
extras: {
|
||||
|
Reference in New Issue
Block a user