@ionic/angular 7.3.4-dev.11694532574.1e397a21 → 7.3.4-dev.11694534020.12e16bee
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.
- package/common/index.d.ts +0 -2
- package/directives/control-value-accessors/boolean-value-accessor.d.ts +1 -1
- package/directives/control-value-accessors/numeric-value-accessor.d.ts +1 -1
- package/directives/control-value-accessors/radio-value-accessor.d.ts +1 -1
- package/directives/control-value-accessors/select-value-accessor.d.ts +1 -1
- package/directives/control-value-accessors/text-value-accessor.d.ts +1 -1
- package/{common/directives → directives}/control-value-accessors/value-accessor.d.ts +2 -2
- package/esm2020/app-initialize.mjs +2 -2
- package/esm2020/common/index.mjs +1 -3
- package/esm2020/directives/control-value-accessors/boolean-value-accessor.mjs +4 -4
- package/esm2020/directives/control-value-accessors/numeric-value-accessor.mjs +2 -2
- package/esm2020/directives/control-value-accessors/radio-value-accessor.mjs +3 -6
- package/esm2020/directives/control-value-accessors/select-value-accessor.mjs +2 -2
- package/esm2020/directives/control-value-accessors/text-value-accessor.mjs +2 -2
- package/esm2020/directives/control-value-accessors/value-accessor.mjs +141 -0
- package/esm2020/standalone/directives/proxies.mjs +476 -565
- package/esm2020/standalone/index.mjs +2 -2
- package/esm2020/util/util.mjs +10 -0
- package/fesm2015/ionic-angular-common.mjs +1 -149
- package/fesm2015/ionic-angular-common.mjs.map +1 -1
- package/fesm2015/ionic-angular-standalone.mjs +570 -1448
- package/fesm2015/ionic-angular-standalone.mjs.map +1 -1
- package/fesm2015/ionic-angular.mjs +152 -8
- package/fesm2015/ionic-angular.mjs.map +1 -1
- package/fesm2020/ionic-angular-common.mjs +1 -149
- package/fesm2020/ionic-angular-common.mjs.map +1 -1
- package/fesm2020/ionic-angular-standalone.mjs +570 -1448
- package/fesm2020/ionic-angular-standalone.mjs.map +1 -1
- package/fesm2020/ionic-angular.mjs +152 -8
- package/fesm2020/ionic-angular.mjs.map +1 -1
- package/package.json +3 -3
- package/standalone/directives/proxies.d.ts +314 -0
- package/standalone/index.d.ts +1 -1
- package/common/directives/control-value-accessors/index.d.ts +0 -1
- package/esm2020/common/directives/control-value-accessors/index.mjs +0 -2
- package/esm2020/common/directives/control-value-accessors/value-accessor.mjs +0 -141
- package/esm2020/common/utils/util.mjs +0 -10
- package/esm2020/standalone/directives/checkbox.mjs +0 -73
- package/esm2020/standalone/directives/datetime.mjs +0 -90
- package/esm2020/standalone/directives/index.mjs +0 -13
- package/esm2020/standalone/directives/input.mjs +0 -112
- package/esm2020/standalone/directives/radio-group.mjs +0 -58
- package/esm2020/standalone/directives/radio.mjs +0 -62
- package/esm2020/standalone/directives/range.mjs +0 -77
- package/esm2020/standalone/directives/searchbar.mjs +0 -80
- package/esm2020/standalone/directives/segment.mjs +0 -58
- package/esm2020/standalone/directives/select.mjs +0 -81
- package/esm2020/standalone/directives/textarea.mjs +0 -90
- package/esm2020/standalone/directives/toggle.mjs +0 -73
- package/standalone/directives/checkbox.d.ts +0 -30
- package/standalone/directives/datetime.d.ts +0 -30
- package/standalone/directives/index.d.ts +0 -12
- package/standalone/directives/input.d.ts +0 -47
- package/standalone/directives/radio-group.d.ts +0 -18
- package/standalone/directives/radio.d.ts +0 -22
- package/standalone/directives/range.d.ts +0 -47
- package/standalone/directives/searchbar.d.ts +0 -45
- package/standalone/directives/segment.d.ts +0 -19
- package/standalone/directives/select.d.ts +0 -34
- package/standalone/directives/textarea.d.ts +0 -37
- package/standalone/directives/toggle.d.ts +0 -28
- /package/{common/utils → util}/util.d.ts +0 -0
|
@@ -7,6 +7,6 @@ export { IonTabs } from './navigation/tabs';
|
|
|
7
7
|
export { provideIonicAngular } from './providers/ionic-angular';
|
|
8
8
|
export { ActionSheetController, AlertController, LoadingController, MenuController, ModalController, PickerController, PopoverController, ToastController, AnimationController, GestureController, DomController, NavController, Config, Platform, NavParams, IonicRouteStrategy, } from '@ionic/angular/common';
|
|
9
9
|
export { IonNav } from './navigation/nav';
|
|
10
|
-
export {
|
|
10
|
+
export { IonIcon } from './directives/icon';
|
|
11
11
|
export * from './directives/proxies';
|
|
12
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zdGFuZGFsb25lL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFDekQsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBQzVDLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUNoRCxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFDN0QsT0FBTyxFQUFFLGFBQWEsRUFBRSxxQkFBcUIsRUFBRSxNQUFNLG1DQUFtQyxDQUFDO0FBQ3pGLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUM1QyxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUNoRSxPQUFPLEVBQ0wscUJBQXFCLEVBQ3JCLGVBQWUsRUFDZixpQkFBaUIsRUFDakIsY0FBYyxFQUNkLGVBQWUsRUFDZixnQkFBZ0IsRUFDaEIsaUJBQWlCLEVBQ2pCLGVBQWUsRUFDZixtQkFBbUIsRUFDbkIsaUJBQWlCLEVBQ2pCLGFBQWEsRUFDYixhQUFhLEVBQ2IsTUFBTSxFQUNOLFFBQVEsRUFDUixTQUFTLEVBQ1Qsa0JBQWtCLEdBQ25CLE1BQU0sdUJBQXVCLENBQUM7QUFDL0IsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBQzFDLE9BQ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uaWNSb3V0ZVN0cmF0ZWd5LFxufSBmcm9tICdAaW9uaWMvYW5ndWxhci9jb21tb24nO1xuZXhwb3J0IHsgSW9uTmF2IH0gZnJvbSAnLi9uYXZpZ2F0aW9uL25hdic7XG5leHBvcnQgeyBJb25JY29uIH0gZnJvbSAnLi9kaXJlY3RpdmVzL2ljb24nO1xuZXhwb3J0ICogZnJvbSAnLi9kaXJlY3RpdmVzL3Byb3hpZXMnO1xuIl19
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const raf = (h) => {
|
|
2
|
+
if (typeof __zone_symbol__requestAnimationFrame === 'function') {
|
|
3
|
+
return __zone_symbol__requestAnimationFrame(h);
|
|
4
|
+
}
|
|
5
|
+
if (typeof requestAnimationFrame === 'function') {
|
|
6
|
+
return requestAnimationFrame(h);
|
|
7
|
+
}
|
|
8
|
+
return setTimeout(h);
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy91dGlsL3V0aWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR0EsTUFBTSxDQUFDLE1BQU0sR0FBRyxHQUFHLENBQUMsQ0FBTSxFQUFPLEVBQUU7SUFDakMsSUFBSSxPQUFPLG9DQUFvQyxLQUFLLFVBQVUsRUFBRTtRQUM5RCxPQUFPLG9DQUFvQyxDQUFDLENBQUMsQ0FBQyxDQUFDO0tBQ2hEO0lBQ0QsSUFBSSxPQUFPLHFCQUFxQixLQUFLLFVBQVUsRUFBRTtRQUMvQyxPQUFPLHFCQUFxQixDQUFDLENBQUMsQ0FBQyxDQUFDO0tBQ2pDO0lBQ0QsT0FBTyxVQUFVLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDdkIsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZGVjbGFyZSBjb25zdCBfX3pvbmVfc3ltYm9sX19yZXF1ZXN0QW5pbWF0aW9uRnJhbWU6IGFueTtcbmRlY2xhcmUgY29uc3QgcmVxdWVzdEFuaW1hdGlvbkZyYW1lOiBhbnk7XG5cbmV4cG9ydCBjb25zdCByYWYgPSAoaDogYW55KTogYW55ID0+IHtcbiAgaWYgKHR5cGVvZiBfX3pvbmVfc3ltYm9sX19yZXF1ZXN0QW5pbWF0aW9uRnJhbWUgPT09ICdmdW5jdGlvbicpIHtcbiAgICByZXR1cm4gX196b25lX3N5bWJvbF9fcmVxdWVzdEFuaW1hdGlvbkZyYW1lKGgpO1xuICB9XG4gIGlmICh0eXBlb2YgcmVxdWVzdEFuaW1hdGlvbkZyYW1lID09PSAnZnVuY3Rpb24nKSB7XG4gICAgcmV0dXJuIHJlcXVlc3RBbmltYXRpb25GcmFtZShoKTtcbiAgfVxuICByZXR1cm4gc2V0VGltZW91dChoKTtcbn07XG4iXX0=
|
|
@@ -8,7 +8,6 @@ import * as i1 from '@angular/common';
|
|
|
8
8
|
import { DOCUMENT } from '@angular/common';
|
|
9
9
|
import { Subject, fromEvent, BehaviorSubject, combineLatest, of } from 'rxjs';
|
|
10
10
|
import { filter, switchMap, distinctUntilChanged } from 'rxjs/operators';
|
|
11
|
-
import { NgControl } from '@angular/forms';
|
|
12
11
|
|
|
13
12
|
// TODO(FW-2827): types
|
|
14
13
|
class OverlayBaseController {
|
|
@@ -2410,153 +2409,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
2410
2409
|
args: ['ionTabButtonClick', ['$event']]
|
|
2411
2410
|
}] } });
|
|
2412
2411
|
|
|
2413
|
-
const raf = (h) => {
|
|
2414
|
-
if (typeof __zone_symbol__requestAnimationFrame === 'function') {
|
|
2415
|
-
return __zone_symbol__requestAnimationFrame(h);
|
|
2416
|
-
}
|
|
2417
|
-
if (typeof requestAnimationFrame === 'function') {
|
|
2418
|
-
return requestAnimationFrame(h);
|
|
2419
|
-
}
|
|
2420
|
-
return setTimeout(h);
|
|
2421
|
-
};
|
|
2422
|
-
|
|
2423
|
-
// TODO(FW-2827): types
|
|
2424
|
-
class ValueAccessor {
|
|
2425
|
-
constructor(injector, elementRef) {
|
|
2426
|
-
this.injector = injector;
|
|
2427
|
-
this.elementRef = elementRef;
|
|
2428
|
-
this.onChange = () => {
|
|
2429
|
-
/**/
|
|
2430
|
-
};
|
|
2431
|
-
this.onTouched = () => {
|
|
2432
|
-
/**/
|
|
2433
|
-
};
|
|
2434
|
-
}
|
|
2435
|
-
writeValue(value) {
|
|
2436
|
-
this.elementRef.nativeElement.value = this.lastValue = value;
|
|
2437
|
-
setIonicClasses(this.elementRef);
|
|
2438
|
-
}
|
|
2439
|
-
/**
|
|
2440
|
-
* Notifies the ControlValueAccessor of a change in the value of the control.
|
|
2441
|
-
*
|
|
2442
|
-
* This is called by each of the ValueAccessor directives when we want to update
|
|
2443
|
-
* the status and validity of the form control. For example with text components this
|
|
2444
|
-
* is called when the ionInput event is fired. For select components this is called
|
|
2445
|
-
* when the ionChange event is fired.
|
|
2446
|
-
*
|
|
2447
|
-
* This also updates the Ionic form status classes on the element.
|
|
2448
|
-
*
|
|
2449
|
-
* @param el The component element.
|
|
2450
|
-
* @param value The new value of the control.
|
|
2451
|
-
*/
|
|
2452
|
-
handleValueChange(el, value) {
|
|
2453
|
-
if (el === this.elementRef.nativeElement) {
|
|
2454
|
-
if (value !== this.lastValue) {
|
|
2455
|
-
this.lastValue = value;
|
|
2456
|
-
this.onChange(value);
|
|
2457
|
-
}
|
|
2458
|
-
setIonicClasses(this.elementRef);
|
|
2459
|
-
}
|
|
2460
|
-
}
|
|
2461
|
-
_handleBlurEvent(el) {
|
|
2462
|
-
if (el === this.elementRef.nativeElement) {
|
|
2463
|
-
this.onTouched();
|
|
2464
|
-
setIonicClasses(this.elementRef);
|
|
2465
|
-
}
|
|
2466
|
-
}
|
|
2467
|
-
registerOnChange(fn) {
|
|
2468
|
-
this.onChange = fn;
|
|
2469
|
-
}
|
|
2470
|
-
registerOnTouched(fn) {
|
|
2471
|
-
this.onTouched = fn;
|
|
2472
|
-
}
|
|
2473
|
-
setDisabledState(isDisabled) {
|
|
2474
|
-
this.elementRef.nativeElement.disabled = isDisabled;
|
|
2475
|
-
}
|
|
2476
|
-
ngOnDestroy() {
|
|
2477
|
-
if (this.statusChanges) {
|
|
2478
|
-
this.statusChanges.unsubscribe();
|
|
2479
|
-
}
|
|
2480
|
-
}
|
|
2481
|
-
ngAfterViewInit() {
|
|
2482
|
-
let ngControl;
|
|
2483
|
-
try {
|
|
2484
|
-
ngControl = this.injector.get(NgControl);
|
|
2485
|
-
}
|
|
2486
|
-
catch (_a) {
|
|
2487
|
-
/* No FormControl or ngModel binding */
|
|
2488
|
-
}
|
|
2489
|
-
if (!ngControl) {
|
|
2490
|
-
return;
|
|
2491
|
-
}
|
|
2492
|
-
// Listen for changes in validity, disabled, or pending states
|
|
2493
|
-
if (ngControl.statusChanges) {
|
|
2494
|
-
this.statusChanges = ngControl.statusChanges.subscribe(() => setIonicClasses(this.elementRef));
|
|
2495
|
-
}
|
|
2496
|
-
/**
|
|
2497
|
-
* TODO FW-2787: Remove this in favor of https://github.com/angular/angular/issues/10887
|
|
2498
|
-
* whenever it is implemented.
|
|
2499
|
-
*/
|
|
2500
|
-
const formControl = ngControl.control;
|
|
2501
|
-
if (formControl) {
|
|
2502
|
-
const methodsToPatch = ['markAsTouched', 'markAllAsTouched', 'markAsUntouched', 'markAsDirty', 'markAsPristine'];
|
|
2503
|
-
methodsToPatch.forEach((method) => {
|
|
2504
|
-
if (typeof formControl[method] !== 'undefined') {
|
|
2505
|
-
const oldFn = formControl[method].bind(formControl);
|
|
2506
|
-
formControl[method] = (...params) => {
|
|
2507
|
-
oldFn(...params);
|
|
2508
|
-
setIonicClasses(this.elementRef);
|
|
2509
|
-
};
|
|
2510
|
-
}
|
|
2511
|
-
});
|
|
2512
|
-
}
|
|
2513
|
-
}
|
|
2514
|
-
}
|
|
2515
|
-
/** @nocollapse */ ValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ValueAccessor, deps: [{ token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2516
|
-
/** @nocollapse */ ValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: ValueAccessor, host: { listeners: { "ionBlur": "_handleBlurEvent($event.target)" } }, ngImport: i0 });
|
|
2517
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ValueAccessor, decorators: [{
|
|
2518
|
-
type: Directive
|
|
2519
|
-
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { _handleBlurEvent: [{
|
|
2520
|
-
type: HostListener,
|
|
2521
|
-
args: ['ionBlur', ['$event.target']]
|
|
2522
|
-
}] } });
|
|
2523
|
-
const setIonicClasses = (element) => {
|
|
2524
|
-
raf(() => {
|
|
2525
|
-
const input = element.nativeElement;
|
|
2526
|
-
const hasValue = input.value != null && input.value.toString().length > 0;
|
|
2527
|
-
const classes = getClasses(input);
|
|
2528
|
-
setClasses(input, classes);
|
|
2529
|
-
const item = input.closest('ion-item');
|
|
2530
|
-
if (item) {
|
|
2531
|
-
if (hasValue) {
|
|
2532
|
-
setClasses(item, [...classes, 'item-has-value']);
|
|
2533
|
-
}
|
|
2534
|
-
else {
|
|
2535
|
-
setClasses(item, classes);
|
|
2536
|
-
}
|
|
2537
|
-
}
|
|
2538
|
-
});
|
|
2539
|
-
};
|
|
2540
|
-
const getClasses = (element) => {
|
|
2541
|
-
const classList = element.classList;
|
|
2542
|
-
const classes = [];
|
|
2543
|
-
for (let i = 0; i < classList.length; i++) {
|
|
2544
|
-
const item = classList.item(i);
|
|
2545
|
-
if (item !== null && startsWith(item, 'ng-')) {
|
|
2546
|
-
classes.push(`ion-${item.substring(3)}`);
|
|
2547
|
-
}
|
|
2548
|
-
}
|
|
2549
|
-
return classes;
|
|
2550
|
-
};
|
|
2551
|
-
const setClasses = (element, classes) => {
|
|
2552
|
-
const classList = element.classList;
|
|
2553
|
-
classList.remove('ion-valid', 'ion-invalid', 'ion-touched', 'ion-untouched', 'ion-dirty', 'ion-pristine');
|
|
2554
|
-
classList.add(...classes);
|
|
2555
|
-
};
|
|
2556
|
-
const startsWith = (input, search) => {
|
|
2557
|
-
return input.substring(0, search.length) === search;
|
|
2558
|
-
};
|
|
2559
|
-
|
|
2560
2412
|
/**
|
|
2561
2413
|
* Provides a way to customize when activated routes get reused.
|
|
2562
2414
|
*/
|
|
@@ -2616,5 +2468,5 @@ class IonicRouteStrategy {
|
|
|
2616
2468
|
* Generated bundle index. Do not edit.
|
|
2617
2469
|
*/
|
|
2618
2470
|
|
|
2619
|
-
export { ActionSheetController, AlertController, AngularDelegate, AnimationController, Config, ConfigToken, DomController, GestureController, IonBackButton, IonModal, IonNav, IonPopover, IonRouterOutlet, IonTabs, IonicRouteStrategy, LoadingController, MenuController, ModalController, NavController, NavParams, PickerController, Platform, PopoverController, ProxyCmp, RouterLinkDelegateDirective, RouterLinkWithHrefDelegateDirective, ToastController,
|
|
2471
|
+
export { ActionSheetController, AlertController, AngularDelegate, AnimationController, Config, ConfigToken, DomController, GestureController, IonBackButton, IonModal, IonNav, IonPopover, IonRouterOutlet, IonTabs, IonicRouteStrategy, LoadingController, MenuController, ModalController, NavController, NavParams, PickerController, Platform, PopoverController, ProxyCmp, RouterLinkDelegateDirective, RouterLinkWithHrefDelegateDirective, ToastController, bindLifecycleEvents, provideComponentInputBinding };
|
|
2620
2472
|
//# sourceMappingURL=ionic-angular-common.mjs.map
|