@ionic/angular 7.5.8 → 7.6.1-dev.11701921257.1d512d3c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/common/directives/navigation/back-button.d.ts +2 -2
  2. package/common/directives/navigation/router-outlet.d.ts +5 -5
  3. package/common/index.d.ts +1 -1
  4. package/common/providers/nav-controller.d.ts +2 -2
  5. package/directives/control-value-accessors/select-value-accessor.d.ts +2 -2
  6. package/directives/control-value-accessors/text-value-accessor.d.ts +2 -2
  7. package/directives/navigation/ion-router-outlet.d.ts +1 -1
  8. package/directives/proxies.d.ts +2 -2
  9. package/esm2020/common/directives/navigation/back-button.mjs +3 -3
  10. package/esm2020/common/directives/navigation/router-outlet.mjs +6 -6
  11. package/esm2020/common/index.mjs +2 -2
  12. package/esm2020/common/providers/nav-controller.mjs +1 -1
  13. package/esm2020/directives/control-value-accessors/select-value-accessor.mjs +3 -3
  14. package/esm2020/directives/control-value-accessors/text-value-accessor.mjs +4 -3
  15. package/esm2020/directives/navigation/ion-router-outlet.mjs +2 -2
  16. package/esm2020/directives/proxies.mjs +7 -7
  17. package/esm2020/standalone/directives/proxies.mjs +4 -4
  18. package/esm2020/standalone/directives/range.mjs +5 -5
  19. package/esm2020/standalone/navigation/back-button.mjs +38 -7
  20. package/esm2020/standalone/navigation/router-outlet.mjs +2 -2
  21. package/fesm2015/ionic-angular-common.mjs +8 -8
  22. package/fesm2015/ionic-angular-common.mjs.map +1 -1
  23. package/fesm2015/ionic-angular-standalone.mjs +46 -14
  24. package/fesm2015/ionic-angular-standalone.mjs.map +1 -1
  25. package/fesm2015/ionic-angular.mjs +13 -12
  26. package/fesm2015/ionic-angular.mjs.map +1 -1
  27. package/fesm2020/ionic-angular-common.mjs +8 -8
  28. package/fesm2020/ionic-angular-common.mjs.map +1 -1
  29. package/fesm2020/ionic-angular-standalone.mjs +45 -14
  30. package/fesm2020/ionic-angular-standalone.mjs.map +1 -1
  31. package/fesm2020/ionic-angular.mjs +13 -12
  32. package/fesm2020/ionic-angular.mjs.map +1 -1
  33. package/package.json +2 -2
  34. package/standalone/directives/proxies.d.ts +1 -1
  35. package/standalone/directives/range.d.ts +1 -1
  36. package/standalone/navigation/back-button.d.ts +15 -3
  37. package/standalone/navigation/router-outlet.d.ts +1 -1
@@ -1,8 +1,8 @@
1
1
  import { __decorate } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
- import { Directive, Attribute, Optional, SkipSelf, Component, ChangeDetectionStrategy, ViewChild, ContentChild, ContentChildren, inject, Injector, EnvironmentInjector, Injectable, APP_INITIALIZER, forwardRef, HostListener } from '@angular/core';
3
+ import { Directive, Attribute, Optional, SkipSelf, Component, ChangeDetectionStrategy, Input, HostListener, ViewChild, ContentChild, ContentChildren, inject, Injector, EnvironmentInjector, Injectable, APP_INITIALIZER, forwardRef } from '@angular/core';
4
4
  import * as i2$1 from '@ionic/angular/common';
5
- import { IonRouterOutlet as IonRouterOutlet$1, ProxyCmp as ProxyCmp$1, IonBackButton as IonBackButton$1, IonModal as IonModal$1, IonPopover as IonPopover$1, RouterLinkDelegateDirective, RouterLinkWithHrefDelegateDirective, IonTabs as IonTabs$1, OverlayBaseController, AngularDelegate, ConfigToken, provideComponentInputBinding, MenuController as MenuController$1, IonNav as IonNav$1, ValueAccessor, setIonicClasses } from '@ionic/angular/common';
5
+ import { IonRouterOutletBase, ProxyCmp as ProxyCmp$1, IonModal as IonModal$1, IonPopover as IonPopover$1, RouterLinkDelegateDirective, RouterLinkWithHrefDelegateDirective, IonTabs as IonTabs$1, OverlayBaseController, AngularDelegate, ConfigToken, provideComponentInputBinding, MenuController as MenuController$1, IonNav as IonNav$1, ValueAccessor, setIonicClasses } from '@ionic/angular/common';
6
6
  export { Config, DomController, IonicRouteStrategy, NavController, NavParams, Platform } from '@ionic/angular/common';
7
7
  import { defineCustomElement as defineCustomElement$2 } from '@ionic/core/components/ion-back-button.js';
8
8
  import { defineCustomElement as defineCustomElement$1 } from '@ionic/core/components/ion-router-outlet.js';
@@ -94,7 +94,7 @@ import { defineCustomElement as defineCustomElement$1g } from '@ionic/core/compo
94
94
  import { defineCustomElement as defineCustomElement$1h } from '@ionic/core/components/ion-textarea.js';
95
95
  import { defineCustomElement as defineCustomElement$1i } from '@ionic/core/components/ion-toggle.js';
96
96
 
97
- let IonRouterOutlet = class IonRouterOutlet extends IonRouterOutlet$1 {
97
+ let IonRouterOutlet = class IonRouterOutlet extends IonRouterOutletBase {
98
98
  /**
99
99
  * We need to pass in the correct instance of IonRouterOutlet
100
100
  * otherwise parentOutlet will be null in a nested outlet context.
@@ -135,16 +135,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
135
135
  }] }];
136
136
  } });
137
137
 
138
- let IonBackButton = class IonBackButton extends IonBackButton$1 {
138
+ const BACK_BUTTON_INPUTS = ['color', 'defaultHref', 'disabled', 'icon', 'mode', 'routerAnimation', 'text', 'type'];
139
+ let IonBackButton = class IonBackButton {
139
140
  constructor(routerOutlet, navCtrl, config, r, z, c) {
140
- super(routerOutlet, navCtrl, config, r, z, c);
141
+ this.routerOutlet = routerOutlet;
142
+ this.navCtrl = navCtrl;
143
+ this.config = config;
144
+ this.z = z;
145
+ c.detach();
146
+ this.el = r.nativeElement;
147
+ }
148
+ /**
149
+ * @internal
150
+ */
151
+ onClick(ev) {
152
+ var _a;
153
+ const defaultHref = this.defaultHref || this.config.get('backButtonDefaultHref');
154
+ if ((_a = this.routerOutlet) === null || _a === void 0 ? void 0 : _a.canGoBack()) {
155
+ this.navCtrl.setDirection('back', undefined, undefined, this.routerAnimation);
156
+ this.routerOutlet.pop();
157
+ ev.preventDefault();
158
+ }
159
+ else if (defaultHref != null) {
160
+ this.navCtrl.navigateBack(defaultHref, { animation: this.routerAnimation });
161
+ ev.preventDefault();
162
+ }
141
163
  }
142
164
  };
143
165
  /** @nocollapse */ IonBackButton.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonBackButton, deps: [{ token: IonRouterOutlet, optional: true }, { token: i2$1.NavController }, { token: i2$1.Config }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
144
- /** @nocollapse */ IonBackButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: IonBackButton, isStandalone: true, selector: "ion-back-button", usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
166
+ /** @nocollapse */ IonBackButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: IonBackButton, isStandalone: true, selector: "ion-back-button", inputs: { color: "color", defaultHref: "defaultHref", disabled: "disabled", icon: "icon", mode: "mode", routerAnimation: "routerAnimation", text: "text", type: "type" }, host: { listeners: { "click": "onClick($event)" } }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
145
167
  IonBackButton = __decorate([
146
168
  ProxyCmp$1({
147
169
  defineCustomElementFn: defineCustomElement$2,
170
+ inputs: BACK_BUTTON_INPUTS,
148
171
  })
149
172
  ], IonBackButton);
150
173
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonBackButton, decorators: [{
@@ -153,13 +176,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
153
176
  selector: 'ion-back-button',
154
177
  changeDetection: ChangeDetectionStrategy.OnPush,
155
178
  template: '<ng-content></ng-content>',
179
+ // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
180
+ inputs: BACK_BUTTON_INPUTS,
156
181
  standalone: true,
157
182
  }]
158
183
  }], ctorParameters: function () {
159
184
  return [{ type: IonRouterOutlet, decorators: [{
160
185
  type: Optional
161
186
  }] }, { type: i2$1.NavController }, { type: i2$1.Config }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }];
162
- } });
187
+ }, propDecorators: { defaultHref: [{
188
+ type: Input
189
+ }], routerAnimation: [{
190
+ type: Input
191
+ }], onClick: [{
192
+ type: HostListener,
193
+ args: ['click', ['$event']]
194
+ }] } });
163
195
 
164
196
  let IonModal = class IonModal extends IonModal$1 {
165
197
  };
@@ -1960,11 +1992,11 @@ let IonToast = class IonToast {
1960
1992
  }
1961
1993
  };
1962
1994
  /** @nocollapse */ IonToast.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonToast, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
1963
- /** @nocollapse */ IonToast.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: IonToast, isStandalone: true, selector: "ion-toast", inputs: { animated: "animated", buttons: "buttons", color: "color", cssClass: "cssClass", duration: "duration", enterAnimation: "enterAnimation", header: "header", htmlAttributes: "htmlAttributes", icon: "icon", isOpen: "isOpen", keyboardClose: "keyboardClose", layout: "layout", leaveAnimation: "leaveAnimation", message: "message", mode: "mode", position: "position", positionAnchor: "positionAnchor", translucent: "translucent", trigger: "trigger" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1995
+ /** @nocollapse */ IonToast.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: IonToast, isStandalone: true, selector: "ion-toast", inputs: { animated: "animated", buttons: "buttons", color: "color", cssClass: "cssClass", duration: "duration", enterAnimation: "enterAnimation", header: "header", htmlAttributes: "htmlAttributes", icon: "icon", isOpen: "isOpen", keyboardClose: "keyboardClose", layout: "layout", leaveAnimation: "leaveAnimation", message: "message", mode: "mode", position: "position", positionAnchor: "positionAnchor", swipeGesture: "swipeGesture", translucent: "translucent", trigger: "trigger" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1964
1996
  IonToast = __decorate([
1965
1997
  ProxyCmp({
1966
1998
  defineCustomElementFn: defineCustomElement$14,
1967
- inputs: ['animated', 'buttons', 'color', 'cssClass', 'duration', 'enterAnimation', 'header', 'htmlAttributes', 'icon', 'isOpen', 'keyboardClose', 'layout', 'leaveAnimation', 'message', 'mode', 'position', 'positionAnchor', 'translucent', 'trigger'],
1999
+ inputs: ['animated', 'buttons', 'color', 'cssClass', 'duration', 'enterAnimation', 'header', 'htmlAttributes', 'icon', 'isOpen', 'keyboardClose', 'layout', 'leaveAnimation', 'message', 'mode', 'position', 'positionAnchor', 'swipeGesture', 'translucent', 'trigger'],
1968
2000
  methods: ['present', 'dismiss', 'onDidDismiss', 'onWillDismiss']
1969
2001
  })
1970
2002
  ], IonToast);
@@ -1975,7 +2007,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
1975
2007
  changeDetection: ChangeDetectionStrategy.OnPush,
1976
2008
  template: '<ng-content></ng-content>',
1977
2009
  // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
1978
- inputs: ['animated', 'buttons', 'color', 'cssClass', 'duration', 'enterAnimation', 'header', 'htmlAttributes', 'icon', 'isOpen', 'keyboardClose', 'layout', 'leaveAnimation', 'message', 'mode', 'position', 'positionAnchor', 'translucent', 'trigger'],
2010
+ inputs: ['animated', 'buttons', 'color', 'cssClass', 'duration', 'enterAnimation', 'header', 'htmlAttributes', 'icon', 'isOpen', 'keyboardClose', 'layout', 'leaveAnimation', 'message', 'mode', 'position', 'positionAnchor', 'swipeGesture', 'translucent', 'trigger'],
1979
2011
  standalone: true
1980
2012
  }]
1981
2013
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
@@ -2711,12 +2743,12 @@ let IonRange = class IonRange extends ValueAccessor {
2711
2743
  this.el = r.nativeElement;
2712
2744
  proxyOutputs(this, this.el, ['ionChange', 'ionInput', 'ionFocus', 'ionBlur', 'ionKnobMoveStart', 'ionKnobMoveEnd']);
2713
2745
  }
2714
- handleIonChange(el) {
2746
+ handleIonInput(el) {
2715
2747
  this.handleValueChange(el, el.value);
2716
2748
  }
2717
2749
  };
2718
2750
  /** @nocollapse */ IonRange.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonRange, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
2719
- /** @nocollapse */ IonRange.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: IonRange, isStandalone: true, selector: "ion-range", inputs: { activeBarStart: "activeBarStart", color: "color", debounce: "debounce", disabled: "disabled", dualKnobs: "dualKnobs", label: "label", labelPlacement: "labelPlacement", legacy: "legacy", max: "max", min: "min", mode: "mode", name: "name", pin: "pin", pinFormatter: "pinFormatter", snaps: "snaps", step: "step", ticks: "ticks", value: "value" }, host: { listeners: { "ionChange": "handleIonChange($event.target)" } }, providers: [accessorProvider$5], usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
2751
+ /** @nocollapse */ IonRange.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: IonRange, isStandalone: true, selector: "ion-range", inputs: { activeBarStart: "activeBarStart", color: "color", debounce: "debounce", disabled: "disabled", dualKnobs: "dualKnobs", label: "label", labelPlacement: "labelPlacement", legacy: "legacy", max: "max", min: "min", mode: "mode", name: "name", pin: "pin", pinFormatter: "pinFormatter", snaps: "snaps", step: "step", ticks: "ticks", value: "value" }, host: { listeners: { "ionInput": "handleIonInput($event.target)" } }, providers: [accessorProvider$5], usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
2720
2752
  IonRange = __decorate([
2721
2753
  ProxyCmp({
2722
2754
  defineCustomElementFn: defineCustomElement$1d,
@@ -2734,9 +2766,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
2734
2766
  providers: [accessorProvider$5],
2735
2767
  standalone: true,
2736
2768
  }]
2737
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Injector }]; }, propDecorators: { handleIonChange: [{
2769
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Injector }]; }, propDecorators: { handleIonInput: [{
2738
2770
  type: HostListener,
2739
- args: ['ionChange', ['$event.target']]
2771
+ args: ['ionInput', ['$event.target']]
2740
2772
  }] } });
2741
2773
 
2742
2774
  const SEARCHBAR_INPUTS = [