@sumaris-net/ngx-components 2.0.0-rc20 → 2.0.0-rc21
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/esm2020/src/app/core/graphql/graphql.utils.mjs +3 -2
- package/esm2020/src/app/core/services/local-settings.service.mjs +3 -2
- package/esm2020/src/app/core/services/platform.service.mjs +3 -2
- package/esm2020/src/app/shared/dates.mjs +3 -2
- package/esm2020/src/app/shared/file/file.service.mjs +3 -2
- package/esm2020/src/app/shared/material/datetime/material.date.mjs +3 -2
- package/esm2020/src/app/shared/material/datetime/material.datetime.mjs +3 -2
- package/esm2020/src/app/shared/material/datetime/testing/mat-date-time.test.mjs +3 -2
- package/esm2020/src/app/shared/material/datetime/testing/mat-date.test.mjs +3 -2
- package/esm2020/src/app/shared/material/swipe/testing/swipe.test.mjs +3 -2
- package/esm2020/src/app/shared/pipes/date-diff-duration.pipe.mjs +3 -2
- package/esm2020/src/app/shared/testing/observable.test.mjs +3 -2
- package/esm2020/src/app/shared/validator/validators.mjs +3 -2
- package/esm2020/src/app/social/user-event/testing/user-event.testing.mjs +3 -2
- package/esm2020/src/app/social/user-event/user-event.service.mjs +3 -2
- package/fesm2015/sumaris-net.ngx-components.mjs +43 -28
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +43 -28
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/dates.d.ts +0 -1
- package/src/app/shared/validator/validators.d.ts +0 -1
|
@@ -65,7 +65,7 @@ import { Capacitor } from '@capacitor/core';
|
|
|
65
65
|
import { Keyboard } from '@capacitor/keyboard';
|
|
66
66
|
import * as i1$1 from '@ngx-translate/core';
|
|
67
67
|
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
68
|
-
import * as
|
|
68
|
+
import * as momentImported from 'moment';
|
|
69
69
|
import { isMoment } from 'moment';
|
|
70
70
|
import * as i1 from '@angular/material-moment-adapter';
|
|
71
71
|
import { MatMomentDateModule } from '@angular/material-moment-adapter';
|
|
@@ -92,7 +92,7 @@ import { Haptics } from '@capacitor/haptics';
|
|
|
92
92
|
import { NativeAudio } from '@capacitor-community/native-audio';
|
|
93
93
|
import * as i1$4 from '@angular/platform-browser';
|
|
94
94
|
import { HammerGestureConfig, HammerModule } from '@angular/platform-browser';
|
|
95
|
-
import * as
|
|
95
|
+
import * as uuidv4Imported from 'uuid/v4';
|
|
96
96
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
97
97
|
import * as i6$4 from 'ngx-markdown';
|
|
98
98
|
import { MarkdownModule } from 'ngx-markdown';
|
|
@@ -2530,6 +2530,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
2530
2530
|
type: Input
|
|
2531
2531
|
}] } });
|
|
2532
2532
|
|
|
2533
|
+
const moment$c = momentImported;
|
|
2533
2534
|
class DateDiffDurationPipe {
|
|
2534
2535
|
constructor(dateAdapter, translate) {
|
|
2535
2536
|
this.dateAdapter = dateAdapter;
|
|
@@ -2545,11 +2546,11 @@ class DateDiffDurationPipe {
|
|
|
2545
2546
|
return this.format(startDate, endDate, args);
|
|
2546
2547
|
}
|
|
2547
2548
|
format(startDate, endDate, args) {
|
|
2548
|
-
const duration = moment.duration(endDate.diff(startDate));
|
|
2549
|
+
const duration = moment$c.duration(endDate.diff(startDate));
|
|
2549
2550
|
if (duration.asMinutes() < 0)
|
|
2550
2551
|
return '';
|
|
2551
2552
|
const withSeconds = args?.seconds;
|
|
2552
|
-
const timeDuration = moment(0)
|
|
2553
|
+
const timeDuration = moment$c(0)
|
|
2553
2554
|
.hour(duration.hours())
|
|
2554
2555
|
.minute(duration.minutes());
|
|
2555
2556
|
if (withSeconds) {
|
|
@@ -2990,6 +2991,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
2990
2991
|
args: [{ name: 'fileSize' }]
|
|
2991
2992
|
}] });
|
|
2992
2993
|
|
|
2994
|
+
const moment$b = momentImported;
|
|
2993
2995
|
const DATE_UNIX_TIMESTAMP = 'X';
|
|
2994
2996
|
const DATE_UNIX_MS_TIMESTAMP = 'x';
|
|
2995
2997
|
const MOMENT_NO_TIME_PROPERTY = '_hasNoTime';
|
|
@@ -3078,37 +3080,37 @@ function fromDateISOString(value) {
|
|
|
3078
3080
|
return value;
|
|
3079
3081
|
if (typeof value === 'string' && value.length === 10) {
|
|
3080
3082
|
// Parse the input value, as a date only
|
|
3081
|
-
const dateOnly = moment(value, DATE_PATTERN);
|
|
3083
|
+
const dateOnly = moment$b(value, DATE_PATTERN);
|
|
3082
3084
|
if (dateOnly.isValid())
|
|
3083
3085
|
return DateUtils.markNoTime(dateOnly);
|
|
3084
3086
|
}
|
|
3085
3087
|
// Parse the input value, as a ISO date time
|
|
3086
|
-
const date = moment(value, DATE_ISO_PATTERN);
|
|
3088
|
+
const date = moment$b(value, DATE_ISO_PATTERN);
|
|
3087
3089
|
if (date.isValid())
|
|
3088
3090
|
return date;
|
|
3089
3091
|
// Not valid: trying to convert from unix timestamp
|
|
3090
3092
|
if (typeof value === 'string') {
|
|
3091
3093
|
console.warn('Wrong date format - Trying to convert from local time: ' + value);
|
|
3092
3094
|
if (value.length === 10) {
|
|
3093
|
-
return moment(value, DATE_UNIX_TIMESTAMP);
|
|
3095
|
+
return moment$b(value, DATE_UNIX_TIMESTAMP);
|
|
3094
3096
|
}
|
|
3095
3097
|
else if (value.length === 13) {
|
|
3096
|
-
return moment(value, DATE_UNIX_MS_TIMESTAMP);
|
|
3098
|
+
return moment$b(value, DATE_UNIX_MS_TIMESTAMP);
|
|
3097
3099
|
}
|
|
3098
3100
|
}
|
|
3099
3101
|
console.warn('Unable to parse date: ' + value);
|
|
3100
3102
|
return undefined;
|
|
3101
3103
|
}
|
|
3102
3104
|
function fromUnixTimestamp(timeInSec) {
|
|
3103
|
-
return moment(timeInSec, DATE_UNIX_TIMESTAMP);
|
|
3105
|
+
return moment$b(timeInSec, DATE_UNIX_TIMESTAMP);
|
|
3104
3106
|
}
|
|
3105
3107
|
function fromUnixMsTimestamp(timeInMs) {
|
|
3106
|
-
return moment(timeInMs, DATE_UNIX_MS_TIMESTAMP);
|
|
3108
|
+
return moment$b(timeInMs, DATE_UNIX_MS_TIMESTAMP);
|
|
3107
3109
|
}
|
|
3108
3110
|
function toDuration(value, unit) {
|
|
3109
3111
|
if (!value)
|
|
3110
3112
|
return undefined;
|
|
3111
|
-
const duration = moment.duration(value, unit);
|
|
3113
|
+
const duration = moment$b.duration(value, unit);
|
|
3112
3114
|
// fix 990+ ms
|
|
3113
3115
|
if (duration.milliseconds() >= 990) {
|
|
3114
3116
|
duration.add(1000 - duration.milliseconds(), 'ms');
|
|
@@ -3383,6 +3385,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
3383
3385
|
type: Injectable
|
|
3384
3386
|
}] });
|
|
3385
3387
|
|
|
3388
|
+
const moment$a = momentImported;
|
|
3386
3389
|
// @dynamic
|
|
3387
3390
|
class SharedValidators {
|
|
3388
3391
|
static getDoubleRegexp(maxDecimals) {
|
|
@@ -3463,7 +3466,7 @@ class SharedValidators {
|
|
|
3463
3466
|
}
|
|
3464
3467
|
static validDate(control) {
|
|
3465
3468
|
const value = control.value;
|
|
3466
|
-
const date = !value || moment.isMoment(value) ? value : moment(value, DATE_ISO_PATTERN);
|
|
3469
|
+
const date = !value || moment$a.isMoment(value) ? value : moment$a(value, DATE_ISO_PATTERN);
|
|
3467
3470
|
if (date && (!date.isValid() || date.year() < 1970)) {
|
|
3468
3471
|
return { validDate: true };
|
|
3469
3472
|
}
|
|
@@ -5720,6 +5723,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
5720
5723
|
}]
|
|
5721
5724
|
}] });
|
|
5722
5725
|
|
|
5726
|
+
const moment$9 = momentImported;
|
|
5723
5727
|
const DEFAULT_VALUE_ACCESSOR$5 = {
|
|
5724
5728
|
provide: NG_VALUE_ACCESSOR,
|
|
5725
5729
|
useExisting: forwardRef(() => MatDate),
|
|
@@ -5901,7 +5905,7 @@ class MatDate {
|
|
|
5901
5905
|
// No value, but mobile mode: use the current date
|
|
5902
5906
|
if (!value && this.mobile) {
|
|
5903
5907
|
this._writing = true;
|
|
5904
|
-
value = DateUtils.resetTime(moment().locale(this.locale), this.timezone);
|
|
5908
|
+
value = DateUtils.resetTime(moment$9().locale(this.locale), this.timezone);
|
|
5905
5909
|
this.formControl.setValue(value, { emitEvent: false });
|
|
5906
5910
|
this.markForCheck();
|
|
5907
5911
|
this._writing = false;
|
|
@@ -6079,6 +6083,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
6079
6083
|
args: ['matInput', { static: false }]
|
|
6080
6084
|
}] } });
|
|
6081
6085
|
|
|
6086
|
+
const moment$8 = momentImported;
|
|
6082
6087
|
const DEFAULT_VALUE_ACCESSOR$4 = {
|
|
6083
6088
|
provide: NG_VALUE_ACCESSOR,
|
|
6084
6089
|
useExisting: forwardRef(() => MatDateTime),
|
|
@@ -6273,7 +6278,7 @@ class MatDateTime {
|
|
|
6273
6278
|
// No value, but mobile mode: use the current date
|
|
6274
6279
|
if (!value && this.mobile) {
|
|
6275
6280
|
this._writing = true;
|
|
6276
|
-
value = DateUtils.resetTime(moment().locale(this.locale));
|
|
6281
|
+
value = DateUtils.resetTime(moment$8().locale(this.locale));
|
|
6277
6282
|
this.formControl.setValue(value, { emitEvent: false });
|
|
6278
6283
|
this.markForCheck();
|
|
6279
6284
|
this._writing = false;
|
|
@@ -10476,6 +10481,7 @@ class ImagesUtils {
|
|
|
10476
10481
|
}
|
|
10477
10482
|
}
|
|
10478
10483
|
|
|
10484
|
+
const uuidv4$1 = uuidv4Imported;
|
|
10479
10485
|
class FileService {
|
|
10480
10486
|
constructor(platform,
|
|
10481
10487
|
//private transfer: FileTransfer,
|
|
@@ -10511,7 +10517,7 @@ class FileService {
|
|
|
10511
10517
|
const lastSlashIndex = fileUrl.lastIndexOf('/');
|
|
10512
10518
|
if (lastSlashIndex === -1)
|
|
10513
10519
|
throw new Error('Invalid URL: ' + fileUrl);
|
|
10514
|
-
const fileName = lastSlashIndex < (fileUrl.length - 1) && fileUrl.substring(lastSlashIndex + 1) || uuidv4();
|
|
10520
|
+
const fileName = lastSlashIndex < (fileUrl.length - 1) && fileUrl.substring(lastSlashIndex + 1) || uuidv4$1();
|
|
10515
10521
|
// Download into the file system
|
|
10516
10522
|
if (outputType === 'fileUrl' && this.canUseFileSystem) {
|
|
10517
10523
|
console.warn(`WARN: [file] Downloading image {${fileUrl}} in local filesystem...`);
|
|
@@ -12999,6 +13005,7 @@ Peer = Peer_1 = __decorate([
|
|
|
12999
13005
|
EntityClass({ typename: 'PeerVO' })
|
|
13000
13006
|
], Peer);
|
|
13001
13007
|
|
|
13008
|
+
const moment$7 = momentImported;
|
|
13002
13009
|
const SETTINGS_STORAGE_KEY = 'settings';
|
|
13003
13010
|
const SETTINGS_TRANSIENT_PROPERTIES = ['mobile', 'touchUi' /*deprecated*/];
|
|
13004
13011
|
// fixme: this constant points to static environment
|
|
@@ -13226,11 +13233,11 @@ class LocalSettingsService extends StartableService {
|
|
|
13226
13233
|
if (!feature) {
|
|
13227
13234
|
feature = {
|
|
13228
13235
|
name: featureName.toLowerCase(),
|
|
13229
|
-
lastSyncDate: moment().toISOString()
|
|
13236
|
+
lastSyncDate: moment$7().toISOString()
|
|
13230
13237
|
};
|
|
13231
13238
|
}
|
|
13232
13239
|
else {
|
|
13233
|
-
feature.lastSyncDate = moment().toISOString();
|
|
13240
|
+
feature.lastSyncDate = moment$7().toISOString();
|
|
13234
13241
|
}
|
|
13235
13242
|
this.saveOfflineFeature(feature);
|
|
13236
13243
|
}
|
|
@@ -13385,7 +13392,7 @@ class LocalSettingsService extends StartableService {
|
|
|
13385
13392
|
if (!page || !page.title || !page.path)
|
|
13386
13393
|
throw Error('Missing required argument \'page\', \'page.path\' or \'page.title\'');
|
|
13387
13394
|
// Set time
|
|
13388
|
-
page.time = page.time || moment();
|
|
13395
|
+
page.time = page.time || moment$7();
|
|
13389
13396
|
// Clean the title (remove <small> tags)
|
|
13390
13397
|
if (!opts || opts.removeTitleSmallTag !== false) {
|
|
13391
13398
|
const tagIndex = page.title.indexOf('</small>');
|
|
@@ -14775,6 +14782,7 @@ function accountToString(data) {
|
|
|
14775
14782
|
(data.lastName || '')) || '';
|
|
14776
14783
|
}
|
|
14777
14784
|
|
|
14785
|
+
const uuidv4 = uuidv4Imported;
|
|
14778
14786
|
const _global = typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : {});
|
|
14779
14787
|
const NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
|
|
14780
14788
|
/**
|
|
@@ -17301,6 +17309,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
17301
17309
|
args: [APP_CONFIG_OPTIONS]
|
|
17302
17310
|
}] }]; } });
|
|
17303
17311
|
|
|
17312
|
+
const moment$6 = momentImported;
|
|
17304
17313
|
const AndroidOsEnvironment = Object.freeze({
|
|
17305
17314
|
DIRECTORY_DOWNLOADS: 'Download',
|
|
17306
17315
|
DIRECTORY_DOWNLOADS_OLD: 'Downloads', // Old name, for older Android version
|
|
@@ -17586,16 +17595,16 @@ class PlatformService extends StartableService {
|
|
|
17586
17595
|
}
|
|
17587
17596
|
// config moment lib
|
|
17588
17597
|
try {
|
|
17589
|
-
moment.locale(event.lang);
|
|
17598
|
+
moment$6.locale(event.lang);
|
|
17590
17599
|
console.debug('[platform] Use locale {' + event.lang + '}');
|
|
17591
17600
|
}
|
|
17592
17601
|
// If error, fallback to en
|
|
17593
17602
|
catch (err) {
|
|
17594
|
-
moment.locale('en');
|
|
17603
|
+
moment$6.locale('en');
|
|
17595
17604
|
console.warn('[platform] Unknown local for moment lib. Using default [en]');
|
|
17596
17605
|
}
|
|
17597
17606
|
// Config date adapter
|
|
17598
|
-
this.dateAdapter.setLocale(moment.locale());
|
|
17607
|
+
this.dateAdapter.setLocale(moment$6.locale());
|
|
17599
17608
|
}
|
|
17600
17609
|
});
|
|
17601
17610
|
this.settings.onChange.subscribe(data => {
|
|
@@ -28374,6 +28383,7 @@ const SocialErrorCodes = {
|
|
|
28374
28383
|
SUBSCRIBE_JOB_PROGRESSION_ERROR: 50010
|
|
28375
28384
|
};
|
|
28376
28385
|
|
|
28386
|
+
const moment$5 = momentImported;
|
|
28377
28387
|
const APP_USER_EVENT_SERVICE = new InjectionToken('UserEventService');
|
|
28378
28388
|
class AbstractUserEventService extends BaseGraphqlService {
|
|
28379
28389
|
constructor(graphql, accountService, network, translate, options) {
|
|
@@ -28733,7 +28743,7 @@ class AbstractUserEventService extends BaseGraphqlService {
|
|
|
28733
28743
|
}
|
|
28734
28744
|
resetCount() {
|
|
28735
28745
|
this._countSubject.next(undefined);
|
|
28736
|
-
this.resetCountDate = moment();
|
|
28746
|
+
this.resetCountDate = moment$5();
|
|
28737
28747
|
// restart listening count changes
|
|
28738
28748
|
this.startListenCountChanges();
|
|
28739
28749
|
}
|
|
@@ -28785,7 +28795,7 @@ class AbstractUserEventService extends BaseGraphqlService {
|
|
|
28785
28795
|
if (!userEvents.length)
|
|
28786
28796
|
return;
|
|
28787
28797
|
// set read date
|
|
28788
|
-
userEvents.forEach(userEvent => userEvent.readDate = moment());
|
|
28798
|
+
userEvents.forEach(userEvent => userEvent.readDate = moment$5());
|
|
28789
28799
|
// split local/remote entities
|
|
28790
28800
|
const localEntities = userEvents.filter(EntityUtils.isLocal);
|
|
28791
28801
|
const remoteEntities = userEvents.filter(EntityUtils.isRemote);
|
|
@@ -30590,12 +30600,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
30590
30600
|
args: [{ selector: 'app-latlong-test', template: "<ion-header>\n <ion-toolbar color=\"primary\">\n\n <ion-buttons slot=\"start\">\n <ion-back-button></ion-back-button>\n </ion-buttons>\n\n <ion-title>Lat/Long field test page</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n\n <form class=\"form-container\" [formGroup]=\"form\" (ngSubmit)=\"doSubmit($event)\">\n\n <!-- Empty value -->\n <form *ngIf=\"form|formGetGroup:'empty' as formGroup\" [formGroup]=\"formGroup\">\n <ion-grid>\n <ion-row><ion-col><ion-text><h4>Empty, with defaults</h4></ion-text></ion-col></ion-row>\n\n <ion-row >\n\n <!-- DD Default sign -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Format DD, defaultSign '-'\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(formGroup.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col>\n <mat-latlong-field formControlName=\"latitude\"\n type=\"latitude\"\n latLongPattern=\"DD\"\n defaultSign=\"-\"\n placeholder=\"Latitude\">\n <mat-icon matPrefix>room</mat-icon>\n <button matSuffix mat-icon-button (click)=\"geoPosition($event)\">\n <mat-icon>gps_fixed</mat-icon>\n </button>\n </mat-latlong-field>\n </ion-col>\n <ion-col>\n <mat-latlong-field formControlName=\"longitude\"\n type=\"longitude\"\n latLongPattern=\"DD\"\n defaultSign=\"-\"\n placeholder=\"Longitude\">\n <mat-icon matPrefix>room</mat-icon>\n <button type=\"button\" mat-icon-button matSuffix\n (click)=\"geoPosition($event)\">\n <mat-icon>gps_fixed</mat-icon>\n </button>\n </mat-latlong-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- DDMM Default sign -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Format DDMM, defaultSign '+'\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(formGroup.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col>\n <mat-latlong-field formControlName=\"latitude\"\n type=\"latitude\"\n latLongPattern=\"DDMM\"\n defaultSign=\"+\"\n placeholder=\"Latitude\">\n\n <mat-icon matPrefix >room</mat-icon>\n <button type=\"button\" mat-icon-button matSuffix\n (click)=\"geoPosition($event)\">\n <mat-icon>gps_fixed</mat-icon>\n </button>\n </mat-latlong-field>\n </ion-col>\n <ion-col>\n <mat-latlong-field formControlName=\"longitude\"\n type=\"longitude\"\n latLongPattern=\"DDMM\"\n defaultSign=\"+\"\n placeholder=\"Longitude\">\n <mat-icon matPrefix>room</mat-icon>\n <button type=\"button\" mat-icon-button matSuffix\n (click)=\"geoPosition($event)\">\n <mat-icon>gps_fixed</mat-icon>\n </button>\n </mat-latlong-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n </ion-row>\n </ion-grid>\n </form>\n\n <form *ngIf=\"form|formGetGroup:'enable' as formGroup\" [formGroup]=\"formGroup\">\n <ion-grid>\n <!-- With value -->\n <ion-row><ion-col><ion-text><h4>With value</h4></ion-text></ion-col></ion-row>\n\n <ion-row>\n\n <!-- DD -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Format DD\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(formGroup.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col>\n <mat-latlong-field formControlName=\"latitude\"\n type=\"latitude\"\n latLongPattern=\"DD\"\n placeholder=\"Latitude\">\n </mat-latlong-field>\n </ion-col>\n <ion-col>\n <mat-latlong-field formControlName=\"longitude\"\n type=\"longitude\"\n latLongPattern=\"DD\"\n placeholder=\"Longitude\">\n </mat-latlong-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- DDMMSS -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Format DDMM\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(formGroup.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col>\n <mat-latlong-field formControlName=\"latitude\"\n type=\"latitude\"\n latLongPattern=\"DDMM\"\n placeholder=\"Latitude\">\n </mat-latlong-field>\n </ion-col>\n <ion-col>\n <mat-latlong-field formControlName=\"longitude\"\n type=\"longitude\"\n latLongPattern=\"DDMM\"\n placeholder=\"Longitude\">\n </mat-latlong-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n\n <!-- DDMMSS -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Format DDMMSS\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(formGroup.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col>\n <mat-latlong-field formControlName=\"latitude\"\n type=\"latitude\"\n latLongPattern=\"DDMMSS\"\n placeholder=\"Latitude\">\n </mat-latlong-field>\n </ion-col>\n <ion-col>\n <mat-latlong-field formControlName=\"longitude\"\n type=\"longitude\"\n latLongPattern=\"DDMMSS\"\n placeholder=\"Longitude\">\n </mat-latlong-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n </ion-grid>\n </form>\n\n <!-- Disable -->\n <form *ngIf=\"form|formGetGroup:'disable' as formGroup\" [formGroup]=\"formGroup\">\n <ion-grid>\n <ion-row><ion-col><ion-text><h4>Disabled control</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disabled control\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(formGroup.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col>\n <mat-latlong-field formControlName=\"latitude\"\n type=\"latitude\"\n latLongPattern=\"DDMM\"\n placeholder=\"Latitude\">\n <mat-icon matPrefix>room</mat-icon>\n <mat-icon matSuffix>gps_fixed</mat-icon>\n </mat-latlong-field>\n </ion-col>\n <ion-col>\n <mat-latlong-field formControlName=\"longitude\"\n type=\"longitude\"\n latLongPattern=\"DDMM\"\n placeholder=\"Longitude\">\n <mat-icon matPrefix>room</mat-icon>\n <button type=\"button\" mat-icon-button matSuffix\n (click)=\"geoPosition($event)\">\n <mat-icon>gps_fixed</mat-icon>\n </button>\n </mat-latlong-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Readonly (control is enable)\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n\n <mat-checkbox (change)=\"readonlyField.readonly=$event.checked\" [checked]=\"readonlyField.readonly\">\n </mat-checkbox>\n\n <ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col>\n <mat-latlong-field #readonlyField [formControl]=\"form|formGetControl: 'enable.latitude'\"\n type=\"latitude\"\n latLongPattern=\"DDMM\"\n placeholder=\"Latitude\"\n [readonly]=\"true\">\n <mat-icon matPrefix>room</mat-icon>\n <mat-icon matSuffix>gps_fixed</mat-icon>\n </mat-latlong-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n </ion-grid>\n </form>\n\n </form>\n\n</ion-content>\n" }]
|
|
30591
30601
|
}], ctorParameters: function () { return [{ type: i1$2.UntypedFormBuilder }]; } });
|
|
30592
30602
|
|
|
30603
|
+
const moment$4 = momentImported;
|
|
30593
30604
|
class SwipeTestPage {
|
|
30594
30605
|
constructor(formBuilder, dateFormatPipe) {
|
|
30595
30606
|
this.formBuilder = formBuilder;
|
|
30596
30607
|
this.dateFormatPipe = dateFormatPipe;
|
|
30597
30608
|
this.$dates = new BehaviorSubject(undefined);
|
|
30598
|
-
this._today = moment().startOf('day');
|
|
30609
|
+
this._today = moment$4().startOf('day');
|
|
30599
30610
|
this.form = formBuilder.group({
|
|
30600
30611
|
empty: [null, Validators.required],
|
|
30601
30612
|
date: [null, Validators.compose([Validators.required, SharedValidators.validDate])],
|
|
@@ -30608,7 +30619,7 @@ class SwipeTestPage {
|
|
|
30608
30619
|
ngOnInit() {
|
|
30609
30620
|
const dates = [];
|
|
30610
30621
|
for (let d = 0; d < 7; d++) {
|
|
30611
|
-
dates[d] = moment(this._today).add(d - 3, 'day');
|
|
30622
|
+
dates[d] = moment$4(this._today).add(d - 3, 'day');
|
|
30612
30623
|
}
|
|
30613
30624
|
this.$dates.next(dates);
|
|
30614
30625
|
this.loadData();
|
|
@@ -30643,6 +30654,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
30643
30654
|
args: [{ selector: 'app-swipe-test', template: "<ion-header>\n <ion-toolbar color=\"primary\">\n\n <ion-buttons slot=\"start\">\n <ion-back-button></ion-back-button>\n </ion-buttons>\n\n <ion-title>Swipe test page</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n\n <h1>Swipe page:</h1>\n\n <form class=\"form-container\" [formGroup]=\"form\" (ngSubmit)=\"doSubmit($event)\">\n\n <ion-grid>\n\n <ion-row>\n <!-- empty -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-swipe-field formControlName=\"empty\"\n placeholder=\"placeholder\"\n [items]=\"$dates\"\n [displayWith]=\"displayDate()\"\n [equals]=\"compareDate()\"\n [tabindex]=\"1\"\n [debug]=\"true\"\n >\n </mat-swipe-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- date -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Date\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-swipe-field formControlName=\"date\"\n placeholder=\"placeholder\"\n [items]=\"$dates\"\n [displayWith]=\"displayDate()\"\n [equals]=\"compareDate()\"\n [clearable]=\"true\"\n [tabindex]=\"2\"\n [debug]=\"true\"\n >\n </mat-swipe-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n\n <ion-row>\n <!-- disable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disabled empty\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-swipe-field formControlName=\"disabledEmpty\"\n placeholder=\"placeholder\"\n [items]=\"$dates\"\n [displayWith]=\"displayDate()\"\n [equals]=\"compareDate()\"\n [clearable]=\"true\"\n [tabindex]=\"3\"\n [debug]=\"true\"\n >\n </mat-swipe-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n<!-- read-only-->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disabled with date\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-swipe-field formControlName=\"disabledDate\"\n placeholder=\"placeholder\"\n [items]=\"$dates\"\n [displayWith]=\"displayDate()\"\n [equals]=\"compareDate()\"\n [clearable]=\"true\"\n [tabindex]=\"4\"\n [debug]=\"true\"\n >\n </mat-swipe-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n </ion-row>\n\n </ion-grid>\n\n </form>\n\n</ion-content>\n" }]
|
|
30644
30655
|
}], ctorParameters: function () { return [{ type: i1$2.UntypedFormBuilder }, { type: DateFormatPipe }]; } });
|
|
30645
30656
|
|
|
30657
|
+
const moment$3 = momentImported;
|
|
30646
30658
|
class DateTimeTestPage {
|
|
30647
30659
|
constructor(platform, formBuilder, cd) {
|
|
30648
30660
|
this.platform = platform;
|
|
@@ -30675,7 +30687,7 @@ class DateTimeTestPage {
|
|
|
30675
30687
|
}
|
|
30676
30688
|
// Load the form with data
|
|
30677
30689
|
async loadData() {
|
|
30678
|
-
const now = moment();
|
|
30690
|
+
const now = moment$3();
|
|
30679
30691
|
const data = {
|
|
30680
30692
|
empty: null,
|
|
30681
30693
|
emptyRequired: null,
|
|
@@ -30909,6 +30921,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
30909
30921
|
args: [{ selector: 'app-numpad-test', template: "<ion-header>\n <ion-toolbar color=\"primary\">\n\n <ion-buttons slot=\"start\">\n <ion-back-button></ion-back-button>\n </ion-buttons>\n\n <ion-title>Numeric pad test page</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n\n <h1>Numpad test page:</h1>\n\n <form class=\"form-container\" [formGroup]=\"form\" (ngSubmit)=\"doSubmit($event)\">\n\n <ion-grid>\n\n <ion-row>\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Decimal field, readonly\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-form-field >\n <input matInput type=\"text\" formControlName=\"empty\" placeholder=\"Empty decimal field\"\n autocomplete=\"off\"\n [matNumpad]=\"numpadDecimal\"\n readonly>\n <mat-numpad [decimal]=\"true\" #numpadDecimal></mat-numpad>\n </mat-form-field>\n\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- filled -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Integer field\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-form-field >\n <input matInput type=\"number\" formControlName=\"integer\" placeholder=\"Filled integer field\"\n autocomplete=\"off\"\n [matNumpad]=\"numpadInteger\">\n <mat-numpad #numpadInteger [decimal]=\"false\"></mat-numpad>\n\n </mat-form-field>\n\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- append to input -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Attach to input, readonly\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-form-field >\n <input matInput type=\"text\" formControlName=\"integer\" placeholder=\"A number\"\n autocomplete=\"off\"\n [matNumpad]=\"numpadAppendToInput\"\n readonly>\n <mat-numpad #numpadAppendToInput [appendToInput]=\"true\"></mat-numpad>\n </mat-form-field>\n\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- disable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disabled control\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-form-field >\n <input matInput type=\"number\" formControlName=\"disable\" placeholder=\"Disabled field\"\n autocomplete=\"off\"\n [matNumpad]=\"numpadDisabled\">\n <mat-numpad #numpadDisabled></mat-numpad>\n </mat-form-field>\n\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n\n\n <!-- Other field (for comparision) -->\n <ion-row><ion-col><ion-text><h4>Other field type (for style comparision)</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Mat date time\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-date-time-field formControlName=\"datetime\" placeholder=\"Date/Time field (desktop)\">\n </mat-date-time-field>\n\n <mat-date-time-field formControlName=\"datetime\"\n placeholder=\"Date/Time field (mobile)\"\n [mobile]=\"true\">\n </mat-date-time-field>\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n </form>\n\n</ion-content>\n" }]
|
|
30910
30922
|
}], ctorParameters: function () { return [{ type: i1$2.UntypedFormBuilder }]; } });
|
|
30911
30923
|
|
|
30924
|
+
const moment$2 = momentImported;
|
|
30912
30925
|
class DateTestPage {
|
|
30913
30926
|
constructor(formBuilder, cd) {
|
|
30914
30927
|
this.formBuilder = formBuilder;
|
|
@@ -30940,7 +30953,7 @@ class DateTestPage {
|
|
|
30940
30953
|
}
|
|
30941
30954
|
// Load the form with data
|
|
30942
30955
|
async loadData() {
|
|
30943
|
-
const now = moment();
|
|
30956
|
+
const now = moment$2();
|
|
30944
30957
|
const nowAtMahe = now.clone().tz(this.timezone).startOf('day');
|
|
30945
30958
|
const data = {
|
|
30946
30959
|
empty: null,
|
|
@@ -31002,6 +31015,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
31002
31015
|
args: [{ selector: 'app-data-test', template: "<ion-header>\n <ion-toolbar color=\"primary\">\n\n <ion-buttons slot=\"start\">\n <ion-back-button></ion-back-button>\n </ion-buttons>\n\n <ion-title>Date field test page</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n\n <form class=\"form-container\" [formGroup]=\"form\" (ngSubmit)=\"doSubmit($event)\">\n\n\n <ion-grid>\n\n <!-- debugging memory leak -->\n <ion-row><ion-col><ion-text><h4>Debug memory leak</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col size=\"auto\">\n <ion-button *ngIf=\"!memoryTimer\" (click)=\"startMemoryTimer()\">Start timer</ion-button>\n <ion-button *ngIf=\"memoryTimer\" (click)=\"stopMemoryTimer()\">Stop timer</ion-button>\n </ion-col>\n <ion-col size=\"4\">\n <mat-form-field floatLabel=\"never\">\n <input matInput type=\"text\" hidden>\n <mat-checkbox (change)=\"memoryMobile=$event.checked\" [checked]=\"memoryMobile\">\n Mobile ?\n </mat-checkbox>\n </mat-form-field>\n </ion-col>\n <ion-col>\n <mat-date-field formControlName=\"empty\"\n *ngIf=\"!memoryHide\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"memoryMobile\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-col>\n </ion-row>\n\n <!-- Mobile mode -->\n <ion-row><ion-col><ion-text><h4>Mobile mode</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col>\n\n <!-- Empty value -->\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.empty.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"empty\"\n placeholder=\"Date\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n\n <!-- Empty value -->\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value (required)\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.emptyRequired.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"emptyRequired\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Enable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n With value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.enable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"enable\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Disable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disable\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.disable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"disable\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- TimeZone -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n TimeZone\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>timezone=\"{{timezone}}\" value=\"{{stringify(form.controls.timezone.value)}}\"</pre></small>\n <pre>Should display using the browser TZ,<br/>but serialize/deserialize for the given TZ</pre>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"timezone\"\n placeholder=\"Date\"\n [mobile]=\"true\"\n [clearable]=\"true\"\n [timezone]=\"timezone\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Readonly -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Readonly toggle\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.readonly.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-checkbox (change)=\"mobileReadonlyField.readonly=$event.checked\" [checked]=\"mobileReadonlyField.readonly\">\n </mat-checkbox>\n\n <mat-date-field #mobileReadonlyField formControlName=\"readonly\"\n placeholder=\"Date\"\n [readonly]=\"true\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n <!-- debug console -->\n <ion-row>\n <!-- buttons -->\n <ion-col size=\"2\">\n <!-- submit form -->\n <ion-button (click)=\"doSubmit($event)\"\n fill=\"outline\">\n <ion-icon name=\"checkmark\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n\n <!-- clear log -->\n <ion-button (click)=\"clearLogPanel()\"\n fill=\"outline\">\n <ion-icon name=\"trash\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n </ion-col>\n <ion-col size=\"10\" *ngIf=\"showLogPanel\">\n <ion-text color=\"primary\">Log:<br/></ion-text>\n <div class=\"ion-padding-start\">\n <ion-text color=\"medium\">\n <small [innerHTML]=\"logContent\"></small>\n </ion-text>\n </div>\n </ion-col>\n </ion-row>\n\n <hr/>\n\n <!-- Desktop mode -->\n <ion-row><ion-col><ion-text><h4>Desktop mode</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col>\n\n <!-- Empty value -->\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.empty.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"empty\"\n placeholder=\"Date\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n\n <!-- Empty value -->\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value (required)\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.emptyRequired.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"emptyRequired\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Enable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n With value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.enable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"enable\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Disable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disable\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.disable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"disable\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"false\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- TimeZone -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n TimeZone\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>timezone=\"{{timezone}}\" value={{stringify(form.controls.timezone.value)}}</pre></small>\n <pre>Should display using the browser TZ,<br/>but serialize/deserialize for the given TZ</pre>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"timezone\"\n placeholder=\"Date\"\n [mobile]=\"false\"\n [clearable]=\"true\"\n [timezone]=\"timezone\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Readonly -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Readonly toggle\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.readonly.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-checkbox (change)=\"desktopReadonlyField.readonly=$event.checked\" [checked]=\"desktopReadonlyField.readonly\">\n </mat-checkbox>\n\n <mat-date-field #desktopReadonlyField formControlName=\"readonly\"\n placeholder=\"Date\"\n [readonly]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n </ion-row>\n </ion-grid>\n\n </form>\n</ion-content>\n" }]
|
|
31003
31016
|
}], ctorParameters: function () { return [{ type: i1$2.UntypedFormBuilder }, { type: i0.ChangeDetectorRef }]; } });
|
|
31004
31017
|
|
|
31018
|
+
const moment$1 = momentImported;
|
|
31005
31019
|
class ObservableTestPage {
|
|
31006
31020
|
constructor() {
|
|
31007
31021
|
this._stopSubject = new Subject();
|
|
@@ -31069,7 +31083,7 @@ class ObservableTestPage {
|
|
|
31069
31083
|
this._stopSubject.next();
|
|
31070
31084
|
}
|
|
31071
31085
|
log(message, ...args) {
|
|
31072
|
-
let fullMessage = `${toDateISOString(moment())} - ${message}`;
|
|
31086
|
+
let fullMessage = `${toDateISOString(moment$1())} - ${message}`;
|
|
31073
31087
|
if (args?.length) {
|
|
31074
31088
|
fullMessage += ' - <small>' + args.map(JSON.stringify).join(', ') + '</small>';
|
|
31075
31089
|
}
|
|
@@ -32497,6 +32511,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
32497
32511
|
args: [ENVIRONMENT]
|
|
32498
32512
|
}] }]; } });
|
|
32499
32513
|
|
|
32514
|
+
const moment = momentImported;
|
|
32500
32515
|
class UserEventTestingPage {
|
|
32501
32516
|
constructor(userEventService, router, alertController, translateService) {
|
|
32502
32517
|
this.userEventService = userEventService;
|