@sumaris-net/ngx-components 2.0.0-rc20 → 2.0.0-rc22
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 +7 -6
- package/esm2020/src/app/core/services/platform.service.mjs +6 -6
- package/esm2020/src/app/shared/dates.mjs +19 -2
- package/esm2020/src/app/shared/file/file.service.mjs +3 -2
- package/esm2020/src/app/shared/material/datetime/material.date.mjs +4 -3
- package/esm2020/src/app/shared/material/datetime/material.datetime.mjs +4 -3
- package/esm2020/src/app/shared/material/datetime/testing/mat-date-time.test.mjs +4 -3
- package/esm2020/src/app/shared/material/datetime/testing/mat-date.test.mjs +5 -4
- package/esm2020/src/app/shared/material/swipe/testing/swipe.test.mjs +5 -3
- package/esm2020/src/app/shared/pipes/date-diff-duration.pipe.mjs +3 -2
- package/esm2020/src/app/shared/testing/observable.test.mjs +5 -4
- package/esm2020/src/app/shared/validator/validators.mjs +3 -2
- package/esm2020/src/app/social/user-event/testing/user-event.testing.mjs +11 -9
- package/esm2020/src/app/social/user-event/user-event.service.mjs +5 -4
- package/fesm2015/sumaris-net.ngx-components.mjs +67 -37
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +67 -37
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/dates.d.ts +7 -1
- package/src/app/shared/validator/validators.d.ts +0 -1
|
@@ -65,8 +65,8 @@ 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
|
|
69
|
-
import { isMoment } from 'moment';
|
|
68
|
+
import * as momentImported from 'moment';
|
|
69
|
+
import { isMoment, locale } from 'moment';
|
|
70
70
|
import * as i1 from '@angular/material-moment-adapter';
|
|
71
71
|
import { MatMomentDateModule } from '@angular/material-moment-adapter';
|
|
72
72
|
import 'moment-timezone';
|
|
@@ -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$b = 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$b.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$b(0)
|
|
2553
2554
|
.hour(duration.hours())
|
|
2554
2555
|
.minute(duration.minutes());
|
|
2555
2556
|
if (withSeconds) {
|
|
@@ -2990,10 +2991,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
2990
2991
|
args: [{ name: 'fileSize' }]
|
|
2991
2992
|
}] });
|
|
2992
2993
|
|
|
2994
|
+
const moment$a = momentImported;
|
|
2993
2995
|
const DATE_UNIX_TIMESTAMP = 'X';
|
|
2994
2996
|
const DATE_UNIX_MS_TIMESTAMP = 'x';
|
|
2995
2997
|
const MOMENT_NO_TIME_PROPERTY = '_hasNoTime';
|
|
2996
2998
|
class DateUtils {
|
|
2999
|
+
static isEsModule(value) {
|
|
3000
|
+
return moment$a && moment$a['__esModule'] === true;
|
|
3001
|
+
}
|
|
3002
|
+
static get moment() {
|
|
3003
|
+
if (this.__momentResolved)
|
|
3004
|
+
return this.__momentResolved;
|
|
3005
|
+
if (this.isEsModule(moment$a)) {
|
|
3006
|
+
this.__momentResolved = moment$a.default;
|
|
3007
|
+
return this.__momentResolved;
|
|
3008
|
+
}
|
|
3009
|
+
if (typeof moment$a['isMoment'] === 'function') {
|
|
3010
|
+
this.__momentResolved = moment$a;
|
|
3011
|
+
return this.__momentResolved;
|
|
3012
|
+
}
|
|
3013
|
+
throw Error('Cannot find a valid \'moment\' namespace');
|
|
3014
|
+
}
|
|
2997
3015
|
static min(date1, date2) {
|
|
2998
3016
|
return date1 && (!date2 || date1.isSameOrBefore(date2)) ? date1 : date2;
|
|
2999
3017
|
}
|
|
@@ -3078,37 +3096,37 @@ function fromDateISOString(value) {
|
|
|
3078
3096
|
return value;
|
|
3079
3097
|
if (typeof value === 'string' && value.length === 10) {
|
|
3080
3098
|
// Parse the input value, as a date only
|
|
3081
|
-
const dateOnly = moment(value, DATE_PATTERN);
|
|
3099
|
+
const dateOnly = moment$a(value, DATE_PATTERN);
|
|
3082
3100
|
if (dateOnly.isValid())
|
|
3083
3101
|
return DateUtils.markNoTime(dateOnly);
|
|
3084
3102
|
}
|
|
3085
3103
|
// Parse the input value, as a ISO date time
|
|
3086
|
-
const date = moment(value, DATE_ISO_PATTERN);
|
|
3104
|
+
const date = moment$a(value, DATE_ISO_PATTERN);
|
|
3087
3105
|
if (date.isValid())
|
|
3088
3106
|
return date;
|
|
3089
3107
|
// Not valid: trying to convert from unix timestamp
|
|
3090
3108
|
if (typeof value === 'string') {
|
|
3091
3109
|
console.warn('Wrong date format - Trying to convert from local time: ' + value);
|
|
3092
3110
|
if (value.length === 10) {
|
|
3093
|
-
return moment(value, DATE_UNIX_TIMESTAMP);
|
|
3111
|
+
return moment$a(value, DATE_UNIX_TIMESTAMP);
|
|
3094
3112
|
}
|
|
3095
3113
|
else if (value.length === 13) {
|
|
3096
|
-
return moment(value, DATE_UNIX_MS_TIMESTAMP);
|
|
3114
|
+
return moment$a(value, DATE_UNIX_MS_TIMESTAMP);
|
|
3097
3115
|
}
|
|
3098
3116
|
}
|
|
3099
3117
|
console.warn('Unable to parse date: ' + value);
|
|
3100
3118
|
return undefined;
|
|
3101
3119
|
}
|
|
3102
3120
|
function fromUnixTimestamp(timeInSec) {
|
|
3103
|
-
return moment(timeInSec, DATE_UNIX_TIMESTAMP);
|
|
3121
|
+
return moment$a(timeInSec, DATE_UNIX_TIMESTAMP);
|
|
3104
3122
|
}
|
|
3105
3123
|
function fromUnixMsTimestamp(timeInMs) {
|
|
3106
|
-
return moment(timeInMs, DATE_UNIX_MS_TIMESTAMP);
|
|
3124
|
+
return moment$a(timeInMs, DATE_UNIX_MS_TIMESTAMP);
|
|
3107
3125
|
}
|
|
3108
3126
|
function toDuration(value, unit) {
|
|
3109
3127
|
if (!value)
|
|
3110
3128
|
return undefined;
|
|
3111
|
-
const duration = moment.duration(value, unit);
|
|
3129
|
+
const duration = moment$a.duration(value, unit);
|
|
3112
3130
|
// fix 990+ ms
|
|
3113
3131
|
if (duration.milliseconds() >= 990) {
|
|
3114
3132
|
duration.add(1000 - duration.milliseconds(), 'ms');
|
|
@@ -3383,6 +3401,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
3383
3401
|
type: Injectable
|
|
3384
3402
|
}] });
|
|
3385
3403
|
|
|
3404
|
+
const moment$9 = momentImported;
|
|
3386
3405
|
// @dynamic
|
|
3387
3406
|
class SharedValidators {
|
|
3388
3407
|
static getDoubleRegexp(maxDecimals) {
|
|
@@ -3463,7 +3482,7 @@ class SharedValidators {
|
|
|
3463
3482
|
}
|
|
3464
3483
|
static validDate(control) {
|
|
3465
3484
|
const value = control.value;
|
|
3466
|
-
const date = !value || moment.isMoment(value) ? value : moment(value, DATE_ISO_PATTERN);
|
|
3485
|
+
const date = !value || moment$9.isMoment(value) ? value : moment$9(value, DATE_ISO_PATTERN);
|
|
3467
3486
|
if (date && (!date.isValid() || date.year() < 1970)) {
|
|
3468
3487
|
return { validDate: true };
|
|
3469
3488
|
}
|
|
@@ -5720,6 +5739,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
5720
5739
|
}]
|
|
5721
5740
|
}] });
|
|
5722
5741
|
|
|
5742
|
+
const moment$8 = momentImported;
|
|
5723
5743
|
const DEFAULT_VALUE_ACCESSOR$5 = {
|
|
5724
5744
|
provide: NG_VALUE_ACCESSOR,
|
|
5725
5745
|
useExisting: forwardRef(() => MatDate),
|
|
@@ -5901,7 +5921,7 @@ class MatDate {
|
|
|
5901
5921
|
// No value, but mobile mode: use the current date
|
|
5902
5922
|
if (!value && this.mobile) {
|
|
5903
5923
|
this._writing = true;
|
|
5904
|
-
value = DateUtils.resetTime(moment().locale(this.locale), this.timezone);
|
|
5924
|
+
value = DateUtils.resetTime(DateUtils.moment().locale(this.locale), this.timezone);
|
|
5905
5925
|
this.formControl.setValue(value, { emitEvent: false });
|
|
5906
5926
|
this.markForCheck();
|
|
5907
5927
|
this._writing = false;
|
|
@@ -6079,6 +6099,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
6079
6099
|
args: ['matInput', { static: false }]
|
|
6080
6100
|
}] } });
|
|
6081
6101
|
|
|
6102
|
+
const moment$7 = momentImported;
|
|
6082
6103
|
const DEFAULT_VALUE_ACCESSOR$4 = {
|
|
6083
6104
|
provide: NG_VALUE_ACCESSOR,
|
|
6084
6105
|
useExisting: forwardRef(() => MatDateTime),
|
|
@@ -6273,7 +6294,7 @@ class MatDateTime {
|
|
|
6273
6294
|
// No value, but mobile mode: use the current date
|
|
6274
6295
|
if (!value && this.mobile) {
|
|
6275
6296
|
this._writing = true;
|
|
6276
|
-
value = DateUtils.resetTime(moment().locale(this.locale));
|
|
6297
|
+
value = DateUtils.resetTime(DateUtils.moment().locale(this.locale));
|
|
6277
6298
|
this.formControl.setValue(value, { emitEvent: false });
|
|
6278
6299
|
this.markForCheck();
|
|
6279
6300
|
this._writing = false;
|
|
@@ -10476,6 +10497,7 @@ class ImagesUtils {
|
|
|
10476
10497
|
}
|
|
10477
10498
|
}
|
|
10478
10499
|
|
|
10500
|
+
const uuidv4$1 = uuidv4Imported;
|
|
10479
10501
|
class FileService {
|
|
10480
10502
|
constructor(platform,
|
|
10481
10503
|
//private transfer: FileTransfer,
|
|
@@ -10511,7 +10533,7 @@ class FileService {
|
|
|
10511
10533
|
const lastSlashIndex = fileUrl.lastIndexOf('/');
|
|
10512
10534
|
if (lastSlashIndex === -1)
|
|
10513
10535
|
throw new Error('Invalid URL: ' + fileUrl);
|
|
10514
|
-
const fileName = lastSlashIndex < (fileUrl.length - 1) && fileUrl.substring(lastSlashIndex + 1) || uuidv4();
|
|
10536
|
+
const fileName = lastSlashIndex < (fileUrl.length - 1) && fileUrl.substring(lastSlashIndex + 1) || uuidv4$1();
|
|
10515
10537
|
// Download into the file system
|
|
10516
10538
|
if (outputType === 'fileUrl' && this.canUseFileSystem) {
|
|
10517
10539
|
console.warn(`WARN: [file] Downloading image {${fileUrl}} in local filesystem...`);
|
|
@@ -12999,6 +13021,7 @@ Peer = Peer_1 = __decorate([
|
|
|
12999
13021
|
EntityClass({ typename: 'PeerVO' })
|
|
13000
13022
|
], Peer);
|
|
13001
13023
|
|
|
13024
|
+
const moment$6 = momentImported;
|
|
13002
13025
|
const SETTINGS_STORAGE_KEY = 'settings';
|
|
13003
13026
|
const SETTINGS_TRANSIENT_PROPERTIES = ['mobile', 'touchUi' /*deprecated*/];
|
|
13004
13027
|
// fixme: this constant points to static environment
|
|
@@ -13226,11 +13249,11 @@ class LocalSettingsService extends StartableService {
|
|
|
13226
13249
|
if (!feature) {
|
|
13227
13250
|
feature = {
|
|
13228
13251
|
name: featureName.toLowerCase(),
|
|
13229
|
-
lastSyncDate: moment().toISOString()
|
|
13252
|
+
lastSyncDate: DateUtils.moment().toISOString()
|
|
13230
13253
|
};
|
|
13231
13254
|
}
|
|
13232
13255
|
else {
|
|
13233
|
-
feature.lastSyncDate = moment().toISOString();
|
|
13256
|
+
feature.lastSyncDate = DateUtils.moment().toISOString();
|
|
13234
13257
|
}
|
|
13235
13258
|
this.saveOfflineFeature(feature);
|
|
13236
13259
|
}
|
|
@@ -13385,7 +13408,7 @@ class LocalSettingsService extends StartableService {
|
|
|
13385
13408
|
if (!page || !page.title || !page.path)
|
|
13386
13409
|
throw Error('Missing required argument \'page\', \'page.path\' or \'page.title\'');
|
|
13387
13410
|
// Set time
|
|
13388
|
-
page.time = page.time || moment();
|
|
13411
|
+
page.time = page.time || DateUtils.moment();
|
|
13389
13412
|
// Clean the title (remove <small> tags)
|
|
13390
13413
|
if (!opts || opts.removeTitleSmallTag !== false) {
|
|
13391
13414
|
const tagIndex = page.title.indexOf('</small>');
|
|
@@ -14775,6 +14798,7 @@ function accountToString(data) {
|
|
|
14775
14798
|
(data.lastName || '')) || '';
|
|
14776
14799
|
}
|
|
14777
14800
|
|
|
14801
|
+
const uuidv4 = uuidv4Imported;
|
|
14778
14802
|
const _global = typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : {});
|
|
14779
14803
|
const NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
|
|
14780
14804
|
/**
|
|
@@ -17586,16 +17610,16 @@ class PlatformService extends StartableService {
|
|
|
17586
17610
|
}
|
|
17587
17611
|
// config moment lib
|
|
17588
17612
|
try {
|
|
17589
|
-
|
|
17613
|
+
locale(event.lang);
|
|
17590
17614
|
console.debug('[platform] Use locale {' + event.lang + '}');
|
|
17591
17615
|
}
|
|
17592
17616
|
// If error, fallback to en
|
|
17593
17617
|
catch (err) {
|
|
17594
|
-
|
|
17595
|
-
console.warn('[platform] Unknown
|
|
17618
|
+
locale('en');
|
|
17619
|
+
console.warn('[platform] Unknown locale for moment lib. Using default [en]');
|
|
17596
17620
|
}
|
|
17597
17621
|
// Config date adapter
|
|
17598
|
-
this.dateAdapter.setLocale(
|
|
17622
|
+
this.dateAdapter.setLocale(locale());
|
|
17599
17623
|
}
|
|
17600
17624
|
});
|
|
17601
17625
|
this.settings.onChange.subscribe(data => {
|
|
@@ -28374,6 +28398,7 @@ const SocialErrorCodes = {
|
|
|
28374
28398
|
SUBSCRIBE_JOB_PROGRESSION_ERROR: 50010
|
|
28375
28399
|
};
|
|
28376
28400
|
|
|
28401
|
+
const moment$5 = momentImported;
|
|
28377
28402
|
const APP_USER_EVENT_SERVICE = new InjectionToken('UserEventService');
|
|
28378
28403
|
class AbstractUserEventService extends BaseGraphqlService {
|
|
28379
28404
|
constructor(graphql, accountService, network, translate, options) {
|
|
@@ -28733,7 +28758,7 @@ class AbstractUserEventService extends BaseGraphqlService {
|
|
|
28733
28758
|
}
|
|
28734
28759
|
resetCount() {
|
|
28735
28760
|
this._countSubject.next(undefined);
|
|
28736
|
-
this.resetCountDate = moment();
|
|
28761
|
+
this.resetCountDate = DateUtils.moment();
|
|
28737
28762
|
// restart listening count changes
|
|
28738
28763
|
this.startListenCountChanges();
|
|
28739
28764
|
}
|
|
@@ -28785,7 +28810,7 @@ class AbstractUserEventService extends BaseGraphqlService {
|
|
|
28785
28810
|
if (!userEvents.length)
|
|
28786
28811
|
return;
|
|
28787
28812
|
// set read date
|
|
28788
|
-
userEvents.forEach(userEvent => userEvent.readDate = moment());
|
|
28813
|
+
userEvents.forEach(userEvent => userEvent.readDate = DateUtils.moment());
|
|
28789
28814
|
// split local/remote entities
|
|
28790
28815
|
const localEntities = userEvents.filter(EntityUtils.isLocal);
|
|
28791
28816
|
const remoteEntities = userEvents.filter(EntityUtils.isRemote);
|
|
@@ -30590,12 +30615,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
30590
30615
|
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
30616
|
}], ctorParameters: function () { return [{ type: i1$2.UntypedFormBuilder }]; } });
|
|
30592
30617
|
|
|
30618
|
+
const moment$4 = momentImported;
|
|
30593
30619
|
class SwipeTestPage {
|
|
30594
30620
|
constructor(formBuilder, dateFormatPipe) {
|
|
30595
30621
|
this.formBuilder = formBuilder;
|
|
30596
30622
|
this.dateFormatPipe = dateFormatPipe;
|
|
30597
30623
|
this.$dates = new BehaviorSubject(undefined);
|
|
30598
|
-
this._today = moment().startOf('day');
|
|
30624
|
+
this._today = DateUtils.moment().startOf('day');
|
|
30599
30625
|
this.form = formBuilder.group({
|
|
30600
30626
|
empty: [null, Validators.required],
|
|
30601
30627
|
date: [null, Validators.compose([Validators.required, SharedValidators.validDate])],
|
|
@@ -30608,7 +30634,7 @@ class SwipeTestPage {
|
|
|
30608
30634
|
ngOnInit() {
|
|
30609
30635
|
const dates = [];
|
|
30610
30636
|
for (let d = 0; d < 7; d++) {
|
|
30611
|
-
dates[d] = moment(this._today).add(d - 3, 'day');
|
|
30637
|
+
dates[d] = moment$4(this._today).add(d - 3, 'day');
|
|
30612
30638
|
}
|
|
30613
30639
|
this.$dates.next(dates);
|
|
30614
30640
|
this.loadData();
|
|
@@ -30643,6 +30669,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
30643
30669
|
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
30670
|
}], ctorParameters: function () { return [{ type: i1$2.UntypedFormBuilder }, { type: DateFormatPipe }]; } });
|
|
30645
30671
|
|
|
30672
|
+
const moment$3 = momentImported;
|
|
30646
30673
|
class DateTimeTestPage {
|
|
30647
30674
|
constructor(platform, formBuilder, cd) {
|
|
30648
30675
|
this.platform = platform;
|
|
@@ -30675,7 +30702,7 @@ class DateTimeTestPage {
|
|
|
30675
30702
|
}
|
|
30676
30703
|
// Load the form with data
|
|
30677
30704
|
async loadData() {
|
|
30678
|
-
const now = moment();
|
|
30705
|
+
const now = DateUtils.moment();
|
|
30679
30706
|
const data = {
|
|
30680
30707
|
empty: null,
|
|
30681
30708
|
emptyRequired: null,
|
|
@@ -30909,6 +30936,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
30909
30936
|
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
30937
|
}], ctorParameters: function () { return [{ type: i1$2.UntypedFormBuilder }]; } });
|
|
30911
30938
|
|
|
30939
|
+
const moment$2 = momentImported;
|
|
30912
30940
|
class DateTestPage {
|
|
30913
30941
|
constructor(formBuilder, cd) {
|
|
30914
30942
|
this.formBuilder = formBuilder;
|
|
@@ -30940,7 +30968,7 @@ class DateTestPage {
|
|
|
30940
30968
|
}
|
|
30941
30969
|
// Load the form with data
|
|
30942
30970
|
async loadData() {
|
|
30943
|
-
const now = moment();
|
|
30971
|
+
const now = DateUtils.moment();
|
|
30944
30972
|
const nowAtMahe = now.clone().tz(this.timezone).startOf('day');
|
|
30945
30973
|
const data = {
|
|
30946
30974
|
empty: null,
|
|
@@ -31002,6 +31030,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
31002
31030
|
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
31031
|
}], ctorParameters: function () { return [{ type: i1$2.UntypedFormBuilder }, { type: i0.ChangeDetectorRef }]; } });
|
|
31004
31032
|
|
|
31033
|
+
const moment$1 = momentImported;
|
|
31005
31034
|
class ObservableTestPage {
|
|
31006
31035
|
constructor() {
|
|
31007
31036
|
this._stopSubject = new Subject();
|
|
@@ -31069,7 +31098,7 @@ class ObservableTestPage {
|
|
|
31069
31098
|
this._stopSubject.next();
|
|
31070
31099
|
}
|
|
31071
31100
|
log(message, ...args) {
|
|
31072
|
-
let fullMessage = `${toDateISOString(moment())} - ${message}`;
|
|
31101
|
+
let fullMessage = `${toDateISOString(DateUtils.moment())} - ${message}`;
|
|
31073
31102
|
if (args?.length) {
|
|
31074
31103
|
fullMessage += ' - <small>' + args.map(JSON.stringify).join(', ') + '</small>';
|
|
31075
31104
|
}
|
|
@@ -32497,6 +32526,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
32497
32526
|
args: [ENVIRONMENT]
|
|
32498
32527
|
}] }]; } });
|
|
32499
32528
|
|
|
32529
|
+
const moment = momentImported;
|
|
32500
32530
|
class UserEventTestingPage {
|
|
32501
32531
|
constructor(userEventService, router, alertController, translateService) {
|
|
32502
32532
|
this.userEventService = userEventService;
|
|
@@ -32557,7 +32587,7 @@ class UserEventTestingPage {
|
|
|
32557
32587
|
type: 'message',
|
|
32558
32588
|
level: 'INFO',
|
|
32559
32589
|
message: 'message test message test message test message test message test message test message test message test',
|
|
32560
|
-
creationDate: moment(),
|
|
32590
|
+
creationDate: DateUtils.moment(),
|
|
32561
32591
|
}));
|
|
32562
32592
|
}
|
|
32563
32593
|
addError() {
|
|
@@ -32567,7 +32597,7 @@ class UserEventTestingPage {
|
|
|
32567
32597
|
type: 'upload',
|
|
32568
32598
|
level: 'ERROR',
|
|
32569
32599
|
message: 'message error',
|
|
32570
|
-
creationDate: moment(),
|
|
32600
|
+
creationDate: DateUtils.moment(),
|
|
32571
32601
|
}));
|
|
32572
32602
|
}
|
|
32573
32603
|
addWarning() {
|
|
@@ -32577,7 +32607,7 @@ class UserEventTestingPage {
|
|
|
32577
32607
|
type: 'download',
|
|
32578
32608
|
level: 'WARNING',
|
|
32579
32609
|
message: 'message warning',
|
|
32580
|
-
creationDate: moment(),
|
|
32610
|
+
creationDate: DateUtils.moment(),
|
|
32581
32611
|
}));
|
|
32582
32612
|
}
|
|
32583
32613
|
addDebug() {
|
|
@@ -32587,7 +32617,7 @@ class UserEventTestingPage {
|
|
|
32587
32617
|
type: 'debug',
|
|
32588
32618
|
level: 'DEBUG',
|
|
32589
32619
|
message: 'message DEBUG',
|
|
32590
|
-
creationDate: moment(),
|
|
32620
|
+
creationDate: DateUtils.moment(),
|
|
32591
32621
|
}));
|
|
32592
32622
|
}
|
|
32593
32623
|
addNotificationWithLink() {
|
|
@@ -32597,7 +32627,7 @@ class UserEventTestingPage {
|
|
|
32597
32627
|
type: 'message',
|
|
32598
32628
|
level: 'INFO',
|
|
32599
32629
|
message: 'message with link',
|
|
32600
|
-
creationDate: moment(),
|
|
32630
|
+
creationDate: DateUtils.moment(),
|
|
32601
32631
|
actions: [{
|
|
32602
32632
|
name: 'click here',
|
|
32603
32633
|
iconRef: {
|
|
@@ -32614,7 +32644,7 @@ class UserEventTestingPage {
|
|
|
32614
32644
|
type: 'message',
|
|
32615
32645
|
level: 'INFO',
|
|
32616
32646
|
message: 'message with action',
|
|
32617
|
-
creationDate: moment(),
|
|
32647
|
+
creationDate: DateUtils.moment(),
|
|
32618
32648
|
actions: [
|
|
32619
32649
|
{
|
|
32620
32650
|
name: 'click here',
|
|
@@ -32684,7 +32714,7 @@ class UserEventTestingPage {
|
|
|
32684
32714
|
type: 'message',
|
|
32685
32715
|
level: 'INFO',
|
|
32686
32716
|
message: 'message with action',
|
|
32687
|
-
creationDate: moment(),
|
|
32717
|
+
creationDate: DateUtils.moment(),
|
|
32688
32718
|
actions: [
|
|
32689
32719
|
{
|
|
32690
32720
|
default: true,
|