@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
|
@@ -66,8 +66,8 @@ import { Capacitor } from '@capacitor/core';
|
|
|
66
66
|
import { Keyboard } from '@capacitor/keyboard';
|
|
67
67
|
import * as i1$1 from '@ngx-translate/core';
|
|
68
68
|
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
69
|
-
import * as
|
|
70
|
-
import { isMoment } from 'moment';
|
|
69
|
+
import * as momentImported from 'moment';
|
|
70
|
+
import { isMoment, locale } from 'moment';
|
|
71
71
|
import * as i1 from '@angular/material-moment-adapter';
|
|
72
72
|
import { MatMomentDateModule } from '@angular/material-moment-adapter';
|
|
73
73
|
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';
|
|
@@ -2543,6 +2543,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
2543
2543
|
type: Input
|
|
2544
2544
|
}] } });
|
|
2545
2545
|
|
|
2546
|
+
const moment$b = momentImported;
|
|
2546
2547
|
class DateDiffDurationPipe {
|
|
2547
2548
|
constructor(dateAdapter, translate) {
|
|
2548
2549
|
this.dateAdapter = dateAdapter;
|
|
@@ -2558,11 +2559,11 @@ class DateDiffDurationPipe {
|
|
|
2558
2559
|
return this.format(startDate, endDate, args);
|
|
2559
2560
|
}
|
|
2560
2561
|
format(startDate, endDate, args) {
|
|
2561
|
-
const duration = moment.duration(endDate.diff(startDate));
|
|
2562
|
+
const duration = moment$b.duration(endDate.diff(startDate));
|
|
2562
2563
|
if (duration.asMinutes() < 0)
|
|
2563
2564
|
return '';
|
|
2564
2565
|
const withSeconds = args === null || args === void 0 ? void 0 : args.seconds;
|
|
2565
|
-
const timeDuration = moment(0)
|
|
2566
|
+
const timeDuration = moment$b(0)
|
|
2566
2567
|
.hour(duration.hours())
|
|
2567
2568
|
.minute(duration.minutes());
|
|
2568
2569
|
if (withSeconds) {
|
|
@@ -2997,10 +2998,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
2997
2998
|
args: [{ name: 'fileSize' }]
|
|
2998
2999
|
}] });
|
|
2999
3000
|
|
|
3001
|
+
const moment$a = momentImported;
|
|
3000
3002
|
const DATE_UNIX_TIMESTAMP = 'X';
|
|
3001
3003
|
const DATE_UNIX_MS_TIMESTAMP = 'x';
|
|
3002
3004
|
const MOMENT_NO_TIME_PROPERTY = '_hasNoTime';
|
|
3003
3005
|
class DateUtils {
|
|
3006
|
+
static isEsModule(value) {
|
|
3007
|
+
return moment$a && moment$a['__esModule'] === true;
|
|
3008
|
+
}
|
|
3009
|
+
static get moment() {
|
|
3010
|
+
if (this.__momentResolved)
|
|
3011
|
+
return this.__momentResolved;
|
|
3012
|
+
if (this.isEsModule(moment$a)) {
|
|
3013
|
+
this.__momentResolved = moment$a.default;
|
|
3014
|
+
return this.__momentResolved;
|
|
3015
|
+
}
|
|
3016
|
+
if (typeof moment$a['isMoment'] === 'function') {
|
|
3017
|
+
this.__momentResolved = moment$a;
|
|
3018
|
+
return this.__momentResolved;
|
|
3019
|
+
}
|
|
3020
|
+
throw Error('Cannot find a valid \'moment\' namespace');
|
|
3021
|
+
}
|
|
3004
3022
|
static min(date1, date2) {
|
|
3005
3023
|
return date1 && (!date2 || date1.isSameOrBefore(date2)) ? date1 : date2;
|
|
3006
3024
|
}
|
|
@@ -3085,37 +3103,37 @@ function fromDateISOString(value) {
|
|
|
3085
3103
|
return value;
|
|
3086
3104
|
if (typeof value === 'string' && value.length === 10) {
|
|
3087
3105
|
// Parse the input value, as a date only
|
|
3088
|
-
const dateOnly = moment(value, DATE_PATTERN);
|
|
3106
|
+
const dateOnly = moment$a(value, DATE_PATTERN);
|
|
3089
3107
|
if (dateOnly.isValid())
|
|
3090
3108
|
return DateUtils.markNoTime(dateOnly);
|
|
3091
3109
|
}
|
|
3092
3110
|
// Parse the input value, as a ISO date time
|
|
3093
|
-
const date = moment(value, DATE_ISO_PATTERN);
|
|
3111
|
+
const date = moment$a(value, DATE_ISO_PATTERN);
|
|
3094
3112
|
if (date.isValid())
|
|
3095
3113
|
return date;
|
|
3096
3114
|
// Not valid: trying to convert from unix timestamp
|
|
3097
3115
|
if (typeof value === 'string') {
|
|
3098
3116
|
console.warn('Wrong date format - Trying to convert from local time: ' + value);
|
|
3099
3117
|
if (value.length === 10) {
|
|
3100
|
-
return moment(value, DATE_UNIX_TIMESTAMP);
|
|
3118
|
+
return moment$a(value, DATE_UNIX_TIMESTAMP);
|
|
3101
3119
|
}
|
|
3102
3120
|
else if (value.length === 13) {
|
|
3103
|
-
return moment(value, DATE_UNIX_MS_TIMESTAMP);
|
|
3121
|
+
return moment$a(value, DATE_UNIX_MS_TIMESTAMP);
|
|
3104
3122
|
}
|
|
3105
3123
|
}
|
|
3106
3124
|
console.warn('Unable to parse date: ' + value);
|
|
3107
3125
|
return undefined;
|
|
3108
3126
|
}
|
|
3109
3127
|
function fromUnixTimestamp(timeInSec) {
|
|
3110
|
-
return moment(timeInSec, DATE_UNIX_TIMESTAMP);
|
|
3128
|
+
return moment$a(timeInSec, DATE_UNIX_TIMESTAMP);
|
|
3111
3129
|
}
|
|
3112
3130
|
function fromUnixMsTimestamp(timeInMs) {
|
|
3113
|
-
return moment(timeInMs, DATE_UNIX_MS_TIMESTAMP);
|
|
3131
|
+
return moment$a(timeInMs, DATE_UNIX_MS_TIMESTAMP);
|
|
3114
3132
|
}
|
|
3115
3133
|
function toDuration(value, unit) {
|
|
3116
3134
|
if (!value)
|
|
3117
3135
|
return undefined;
|
|
3118
|
-
const duration = moment.duration(value, unit);
|
|
3136
|
+
const duration = moment$a.duration(value, unit);
|
|
3119
3137
|
// fix 990+ ms
|
|
3120
3138
|
if (duration.milliseconds() >= 990) {
|
|
3121
3139
|
duration.add(1000 - duration.milliseconds(), 'ms');
|
|
@@ -3391,6 +3409,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
3391
3409
|
type: Injectable
|
|
3392
3410
|
}] });
|
|
3393
3411
|
|
|
3412
|
+
const moment$9 = momentImported;
|
|
3394
3413
|
// @dynamic
|
|
3395
3414
|
class SharedValidators {
|
|
3396
3415
|
static getDoubleRegexp(maxDecimals) {
|
|
@@ -3471,7 +3490,7 @@ class SharedValidators {
|
|
|
3471
3490
|
}
|
|
3472
3491
|
static validDate(control) {
|
|
3473
3492
|
const value = control.value;
|
|
3474
|
-
const date = !value || moment.isMoment(value) ? value : moment(value, DATE_ISO_PATTERN);
|
|
3493
|
+
const date = !value || moment$9.isMoment(value) ? value : moment$9(value, DATE_ISO_PATTERN);
|
|
3475
3494
|
if (date && (!date.isValid() || date.year() < 1970)) {
|
|
3476
3495
|
return { validDate: true };
|
|
3477
3496
|
}
|
|
@@ -5708,6 +5727,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
5708
5727
|
}]
|
|
5709
5728
|
}] });
|
|
5710
5729
|
|
|
5730
|
+
const moment$8 = momentImported;
|
|
5711
5731
|
const DEFAULT_VALUE_ACCESSOR$5 = {
|
|
5712
5732
|
provide: NG_VALUE_ACCESSOR,
|
|
5713
5733
|
useExisting: forwardRef(() => MatDate),
|
|
@@ -5889,7 +5909,7 @@ class MatDate {
|
|
|
5889
5909
|
// No value, but mobile mode: use the current date
|
|
5890
5910
|
if (!value && this.mobile) {
|
|
5891
5911
|
this._writing = true;
|
|
5892
|
-
value = DateUtils.resetTime(moment().locale(this.locale), this.timezone);
|
|
5912
|
+
value = DateUtils.resetTime(DateUtils.moment().locale(this.locale), this.timezone);
|
|
5893
5913
|
this.formControl.setValue(value, { emitEvent: false });
|
|
5894
5914
|
this.markForCheck();
|
|
5895
5915
|
this._writing = false;
|
|
@@ -6068,6 +6088,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
6068
6088
|
args: ['matInput', { static: false }]
|
|
6069
6089
|
}] } });
|
|
6070
6090
|
|
|
6091
|
+
const moment$7 = momentImported;
|
|
6071
6092
|
const DEFAULT_VALUE_ACCESSOR$4 = {
|
|
6072
6093
|
provide: NG_VALUE_ACCESSOR,
|
|
6073
6094
|
useExisting: forwardRef(() => MatDateTime),
|
|
@@ -6262,7 +6283,7 @@ class MatDateTime {
|
|
|
6262
6283
|
// No value, but mobile mode: use the current date
|
|
6263
6284
|
if (!value && this.mobile) {
|
|
6264
6285
|
this._writing = true;
|
|
6265
|
-
value = DateUtils.resetTime(moment().locale(this.locale));
|
|
6286
|
+
value = DateUtils.resetTime(DateUtils.moment().locale(this.locale));
|
|
6266
6287
|
this.formControl.setValue(value, { emitEvent: false });
|
|
6267
6288
|
this.markForCheck();
|
|
6268
6289
|
this._writing = false;
|
|
@@ -10522,6 +10543,7 @@ class ImagesUtils {
|
|
|
10522
10543
|
}
|
|
10523
10544
|
}
|
|
10524
10545
|
|
|
10546
|
+
const uuidv4$1 = uuidv4Imported;
|
|
10525
10547
|
class FileService {
|
|
10526
10548
|
constructor(platform,
|
|
10527
10549
|
//private transfer: FileTransfer,
|
|
@@ -10558,7 +10580,7 @@ class FileService {
|
|
|
10558
10580
|
const lastSlashIndex = fileUrl.lastIndexOf('/');
|
|
10559
10581
|
if (lastSlashIndex === -1)
|
|
10560
10582
|
throw new Error('Invalid URL: ' + fileUrl);
|
|
10561
|
-
const fileName = lastSlashIndex < (fileUrl.length - 1) && fileUrl.substring(lastSlashIndex + 1) || uuidv4();
|
|
10583
|
+
const fileName = lastSlashIndex < (fileUrl.length - 1) && fileUrl.substring(lastSlashIndex + 1) || uuidv4$1();
|
|
10562
10584
|
// Download into the file system
|
|
10563
10585
|
if (outputType === 'fileUrl' && this.canUseFileSystem) {
|
|
10564
10586
|
console.warn(`WARN: [file] Downloading image {${fileUrl}} in local filesystem...`);
|
|
@@ -13120,6 +13142,7 @@ Peer = Peer_1 = __decorate([
|
|
|
13120
13142
|
EntityClass({ typename: 'PeerVO' })
|
|
13121
13143
|
], Peer);
|
|
13122
13144
|
|
|
13145
|
+
const moment$6 = momentImported;
|
|
13123
13146
|
const SETTINGS_STORAGE_KEY = 'settings';
|
|
13124
13147
|
const SETTINGS_TRANSIENT_PROPERTIES = ['mobile', 'touchUi' /*deprecated*/];
|
|
13125
13148
|
// fixme: this constant points to static environment
|
|
@@ -13357,11 +13380,11 @@ class LocalSettingsService extends StartableService {
|
|
|
13357
13380
|
if (!feature) {
|
|
13358
13381
|
feature = {
|
|
13359
13382
|
name: featureName.toLowerCase(),
|
|
13360
|
-
lastSyncDate: moment().toISOString()
|
|
13383
|
+
lastSyncDate: DateUtils.moment().toISOString()
|
|
13361
13384
|
};
|
|
13362
13385
|
}
|
|
13363
13386
|
else {
|
|
13364
|
-
feature.lastSyncDate = moment().toISOString();
|
|
13387
|
+
feature.lastSyncDate = DateUtils.moment().toISOString();
|
|
13365
13388
|
}
|
|
13366
13389
|
this.saveOfflineFeature(feature);
|
|
13367
13390
|
}
|
|
@@ -13522,7 +13545,7 @@ class LocalSettingsService extends StartableService {
|
|
|
13522
13545
|
if (!page || !page.title || !page.path)
|
|
13523
13546
|
throw Error('Missing required argument \'page\', \'page.path\' or \'page.title\'');
|
|
13524
13547
|
// Set time
|
|
13525
|
-
page.time = page.time || moment();
|
|
13548
|
+
page.time = page.time || DateUtils.moment();
|
|
13526
13549
|
// Clean the title (remove <small> tags)
|
|
13527
13550
|
if (!opts || opts.removeTitleSmallTag !== false) {
|
|
13528
13551
|
const tagIndex = page.title.indexOf('</small>');
|
|
@@ -14966,6 +14989,7 @@ function accountToString(data) {
|
|
|
14966
14989
|
(data.lastName || '')) || '';
|
|
14967
14990
|
}
|
|
14968
14991
|
|
|
14992
|
+
const uuidv4 = uuidv4Imported;
|
|
14969
14993
|
const _global = typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : {});
|
|
14970
14994
|
const NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
|
|
14971
14995
|
/**
|
|
@@ -17844,16 +17868,16 @@ class PlatformService extends StartableService {
|
|
|
17844
17868
|
}
|
|
17845
17869
|
// config moment lib
|
|
17846
17870
|
try {
|
|
17847
|
-
|
|
17871
|
+
locale(event.lang);
|
|
17848
17872
|
console.debug('[platform] Use locale {' + event.lang + '}');
|
|
17849
17873
|
}
|
|
17850
17874
|
// If error, fallback to en
|
|
17851
17875
|
catch (err) {
|
|
17852
|
-
|
|
17853
|
-
console.warn('[platform] Unknown
|
|
17876
|
+
locale('en');
|
|
17877
|
+
console.warn('[platform] Unknown locale for moment lib. Using default [en]');
|
|
17854
17878
|
}
|
|
17855
17879
|
// Config date adapter
|
|
17856
|
-
this.dateAdapter.setLocale(
|
|
17880
|
+
this.dateAdapter.setLocale(locale());
|
|
17857
17881
|
}
|
|
17858
17882
|
});
|
|
17859
17883
|
this.settings.onChange.subscribe(data => {
|
|
@@ -29005,6 +29029,7 @@ const SocialErrorCodes = {
|
|
|
29005
29029
|
SUBSCRIBE_JOB_PROGRESSION_ERROR: 50010
|
|
29006
29030
|
};
|
|
29007
29031
|
|
|
29032
|
+
const moment$5 = momentImported;
|
|
29008
29033
|
const APP_USER_EVENT_SERVICE = new InjectionToken('UserEventService');
|
|
29009
29034
|
class AbstractUserEventService extends BaseGraphqlService {
|
|
29010
29035
|
constructor(graphql, accountService, network, translate, options) {
|
|
@@ -29380,7 +29405,7 @@ class AbstractUserEventService extends BaseGraphqlService {
|
|
|
29380
29405
|
}
|
|
29381
29406
|
resetCount() {
|
|
29382
29407
|
this._countSubject.next(undefined);
|
|
29383
|
-
this.resetCountDate = moment();
|
|
29408
|
+
this.resetCountDate = DateUtils.moment();
|
|
29384
29409
|
// restart listening count changes
|
|
29385
29410
|
this.startListenCountChanges();
|
|
29386
29411
|
}
|
|
@@ -29439,7 +29464,7 @@ class AbstractUserEventService extends BaseGraphqlService {
|
|
|
29439
29464
|
if (!userEvents.length)
|
|
29440
29465
|
return;
|
|
29441
29466
|
// set read date
|
|
29442
|
-
userEvents.forEach(userEvent => userEvent.readDate = moment());
|
|
29467
|
+
userEvents.forEach(userEvent => userEvent.readDate = DateUtils.moment());
|
|
29443
29468
|
// split local/remote entities
|
|
29444
29469
|
const localEntities = userEvents.filter(EntityUtils.isLocal);
|
|
29445
29470
|
const remoteEntities = userEvents.filter(EntityUtils.isRemote);
|
|
@@ -31291,12 +31316,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
31291
31316
|
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" }]
|
|
31292
31317
|
}], ctorParameters: function () { return [{ type: i1$2.UntypedFormBuilder }]; } });
|
|
31293
31318
|
|
|
31319
|
+
const moment$4 = momentImported;
|
|
31294
31320
|
class SwipeTestPage {
|
|
31295
31321
|
constructor(formBuilder, dateFormatPipe) {
|
|
31296
31322
|
this.formBuilder = formBuilder;
|
|
31297
31323
|
this.dateFormatPipe = dateFormatPipe;
|
|
31298
31324
|
this.$dates = new BehaviorSubject(undefined);
|
|
31299
|
-
this._today = moment().startOf('day');
|
|
31325
|
+
this._today = DateUtils.moment().startOf('day');
|
|
31300
31326
|
this.form = formBuilder.group({
|
|
31301
31327
|
empty: [null, Validators.required],
|
|
31302
31328
|
date: [null, Validators.compose([Validators.required, SharedValidators.validDate])],
|
|
@@ -31309,7 +31335,7 @@ class SwipeTestPage {
|
|
|
31309
31335
|
ngOnInit() {
|
|
31310
31336
|
const dates = [];
|
|
31311
31337
|
for (let d = 0; d < 7; d++) {
|
|
31312
|
-
dates[d] = moment(this._today).add(d - 3, 'day');
|
|
31338
|
+
dates[d] = moment$4(this._today).add(d - 3, 'day');
|
|
31313
31339
|
}
|
|
31314
31340
|
this.$dates.next(dates);
|
|
31315
31341
|
this.loadData();
|
|
@@ -31346,6 +31372,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
31346
31372
|
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" }]
|
|
31347
31373
|
}], ctorParameters: function () { return [{ type: i1$2.UntypedFormBuilder }, { type: DateFormatPipe }]; } });
|
|
31348
31374
|
|
|
31375
|
+
const moment$3 = momentImported;
|
|
31349
31376
|
class DateTimeTestPage {
|
|
31350
31377
|
constructor(platform, formBuilder, cd) {
|
|
31351
31378
|
this.platform = platform;
|
|
@@ -31379,7 +31406,7 @@ class DateTimeTestPage {
|
|
|
31379
31406
|
// Load the form with data
|
|
31380
31407
|
loadData() {
|
|
31381
31408
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31382
|
-
const now = moment();
|
|
31409
|
+
const now = DateUtils.moment();
|
|
31383
31410
|
const data = {
|
|
31384
31411
|
empty: null,
|
|
31385
31412
|
emptyRequired: null,
|
|
@@ -31619,6 +31646,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
31619
31646
|
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" }]
|
|
31620
31647
|
}], ctorParameters: function () { return [{ type: i1$2.UntypedFormBuilder }]; } });
|
|
31621
31648
|
|
|
31649
|
+
const moment$2 = momentImported;
|
|
31622
31650
|
class DateTestPage {
|
|
31623
31651
|
constructor(formBuilder, cd) {
|
|
31624
31652
|
this.formBuilder = formBuilder;
|
|
@@ -31651,7 +31679,7 @@ class DateTestPage {
|
|
|
31651
31679
|
// Load the form with data
|
|
31652
31680
|
loadData() {
|
|
31653
31681
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31654
|
-
const now = moment();
|
|
31682
|
+
const now = DateUtils.moment();
|
|
31655
31683
|
const nowAtMahe = now.clone().tz(this.timezone).startOf('day');
|
|
31656
31684
|
const data = {
|
|
31657
31685
|
empty: null,
|
|
@@ -31714,6 +31742,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
31714
31742
|
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" }]
|
|
31715
31743
|
}], ctorParameters: function () { return [{ type: i1$2.UntypedFormBuilder }, { type: i0.ChangeDetectorRef }]; } });
|
|
31716
31744
|
|
|
31745
|
+
const moment$1 = momentImported;
|
|
31717
31746
|
class ObservableTestPage {
|
|
31718
31747
|
constructor() {
|
|
31719
31748
|
this._stopSubject = new Subject();
|
|
@@ -31781,7 +31810,7 @@ class ObservableTestPage {
|
|
|
31781
31810
|
this._stopSubject.next();
|
|
31782
31811
|
}
|
|
31783
31812
|
log(message, ...args) {
|
|
31784
|
-
let fullMessage = `${toDateISOString(moment())} - ${message}`;
|
|
31813
|
+
let fullMessage = `${toDateISOString(DateUtils.moment())} - ${message}`;
|
|
31785
31814
|
if (args === null || args === void 0 ? void 0 : args.length) {
|
|
31786
31815
|
fullMessage += ' - <small>' + args.map(JSON.stringify).join(', ') + '</small>';
|
|
31787
31816
|
}
|
|
@@ -33216,6 +33245,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
33216
33245
|
}] }];
|
|
33217
33246
|
} });
|
|
33218
33247
|
|
|
33248
|
+
const moment = momentImported;
|
|
33219
33249
|
class UserEventTestingPage {
|
|
33220
33250
|
constructor(userEventService, router, alertController, translateService) {
|
|
33221
33251
|
this.userEventService = userEventService;
|
|
@@ -33276,7 +33306,7 @@ class UserEventTestingPage {
|
|
|
33276
33306
|
type: 'message',
|
|
33277
33307
|
level: 'INFO',
|
|
33278
33308
|
message: 'message test message test message test message test message test message test message test message test',
|
|
33279
|
-
creationDate: moment(),
|
|
33309
|
+
creationDate: DateUtils.moment(),
|
|
33280
33310
|
}));
|
|
33281
33311
|
}
|
|
33282
33312
|
addError() {
|
|
@@ -33286,7 +33316,7 @@ class UserEventTestingPage {
|
|
|
33286
33316
|
type: 'upload',
|
|
33287
33317
|
level: 'ERROR',
|
|
33288
33318
|
message: 'message error',
|
|
33289
|
-
creationDate: moment(),
|
|
33319
|
+
creationDate: DateUtils.moment(),
|
|
33290
33320
|
}));
|
|
33291
33321
|
}
|
|
33292
33322
|
addWarning() {
|
|
@@ -33296,7 +33326,7 @@ class UserEventTestingPage {
|
|
|
33296
33326
|
type: 'download',
|
|
33297
33327
|
level: 'WARNING',
|
|
33298
33328
|
message: 'message warning',
|
|
33299
|
-
creationDate: moment(),
|
|
33329
|
+
creationDate: DateUtils.moment(),
|
|
33300
33330
|
}));
|
|
33301
33331
|
}
|
|
33302
33332
|
addDebug() {
|
|
@@ -33306,7 +33336,7 @@ class UserEventTestingPage {
|
|
|
33306
33336
|
type: 'debug',
|
|
33307
33337
|
level: 'DEBUG',
|
|
33308
33338
|
message: 'message DEBUG',
|
|
33309
|
-
creationDate: moment(),
|
|
33339
|
+
creationDate: DateUtils.moment(),
|
|
33310
33340
|
}));
|
|
33311
33341
|
}
|
|
33312
33342
|
addNotificationWithLink() {
|
|
@@ -33316,7 +33346,7 @@ class UserEventTestingPage {
|
|
|
33316
33346
|
type: 'message',
|
|
33317
33347
|
level: 'INFO',
|
|
33318
33348
|
message: 'message with link',
|
|
33319
|
-
creationDate: moment(),
|
|
33349
|
+
creationDate: DateUtils.moment(),
|
|
33320
33350
|
actions: [{
|
|
33321
33351
|
name: 'click here',
|
|
33322
33352
|
iconRef: {
|
|
@@ -33333,7 +33363,7 @@ class UserEventTestingPage {
|
|
|
33333
33363
|
type: 'message',
|
|
33334
33364
|
level: 'INFO',
|
|
33335
33365
|
message: 'message with action',
|
|
33336
|
-
creationDate: moment(),
|
|
33366
|
+
creationDate: DateUtils.moment(),
|
|
33337
33367
|
actions: [
|
|
33338
33368
|
{
|
|
33339
33369
|
name: 'click here',
|
|
@@ -33405,7 +33435,7 @@ class UserEventTestingPage {
|
|
|
33405
33435
|
type: 'message',
|
|
33406
33436
|
level: 'INFO',
|
|
33407
33437
|
message: 'message with action',
|
|
33408
|
-
creationDate: moment(),
|
|
33438
|
+
creationDate: DateUtils.moment(),
|
|
33409
33439
|
actions: [
|
|
33410
33440
|
{
|
|
33411
33441
|
default: true,
|