@sumaris-net/ngx-components 1.14.1 → 1.15.0
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/bundles/sumaris-net.ngx-components.umd.js +362 -194
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/doc/changelog.md +9 -0
- package/esm2015/src/app/shared/dates.js +23 -1
- package/esm2015/src/app/shared/material/datetime/material.date.js +124 -101
- package/esm2015/src/app/shared/material/datetime/material.datetime.js +58 -59
- package/esm2015/src/app/shared/material/datetime/testing/mat-date.test.js +102 -0
- package/esm2015/src/app/shared/material/material.testing.module.js +10 -1
- package/esm2015/src/app/shared/validator/validators.js +20 -9
- package/esm2015/sumaris-net.ngx-components.js +6 -5
- package/fesm2015/sumaris-net.ngx-components.js +342 -187
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +2 -1
- package/src/app/shared/dates.d.ts +8 -0
- package/src/app/shared/material/datetime/material.date.d.ts +19 -14
- package/src/app/shared/material/datetime/material.datetime.d.ts +5 -5
- package/src/app/shared/material/datetime/testing/mat-date.test.d.ts +28 -0
- package/src/app/shared/validator/validators.d.ts +3 -1
- package/src/assets/i18n/en-US.json +1 -0
- package/src/assets/i18n/en.json +1 -0
- package/src/assets/i18n/fr.json +1 -0
- package/sumaris-net.ngx-components.d.ts +5 -4
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -46,6 +46,7 @@ import * as momentImported from 'moment';
|
|
|
46
46
|
import { isMoment } from 'moment';
|
|
47
47
|
import * as i1 from '@angular/material-moment-adapter';
|
|
48
48
|
import { MomentDateAdapter, MatMomentDateModule } from '@angular/material-moment-adapter';
|
|
49
|
+
import * as momentTZImported from 'moment-timezone';
|
|
49
50
|
import { Keyboard } from '@ionic-native/keyboard/ngx';
|
|
50
51
|
import { TextMaskModule } from 'angular2-text-mask';
|
|
51
52
|
import { NgxMaterialTimepickerModule } from 'ngx-material-timepicker';
|
|
@@ -1732,7 +1733,7 @@ DateFormatPipe.ctorParameters = () => [
|
|
|
1732
1733
|
{ type: TranslateService }
|
|
1733
1734
|
];
|
|
1734
1735
|
|
|
1735
|
-
const moment$
|
|
1736
|
+
const moment$7 = momentImported;
|
|
1736
1737
|
class DateDiffDurationPipe {
|
|
1737
1738
|
constructor(dateAdapter, translate) {
|
|
1738
1739
|
this.dateAdapter = dateAdapter;
|
|
@@ -1748,10 +1749,10 @@ class DateDiffDurationPipe {
|
|
|
1748
1749
|
return this.format(startDate, endDate);
|
|
1749
1750
|
}
|
|
1750
1751
|
format(startDate, endDate) {
|
|
1751
|
-
const duration = moment$
|
|
1752
|
+
const duration = moment$7.duration(endDate.diff(startDate));
|
|
1752
1753
|
if (duration.asMinutes() < 0)
|
|
1753
1754
|
return '';
|
|
1754
|
-
const timeDuration = moment$
|
|
1755
|
+
const timeDuration = moment$7(0)
|
|
1755
1756
|
.hour(duration.hours())
|
|
1756
1757
|
.minute(duration.minutes());
|
|
1757
1758
|
const days = Math.floor(duration.asDays());
|
|
@@ -2195,7 +2196,8 @@ FileSizePipe.decorators = [
|
|
|
2195
2196
|
{ type: Pipe, args: [{ name: 'fileSize' },] }
|
|
2196
2197
|
];
|
|
2197
2198
|
|
|
2198
|
-
const moment$
|
|
2199
|
+
const moment$6 = momentImported;
|
|
2200
|
+
const tz = momentTZImported;
|
|
2199
2201
|
const DATE_UNIX_TIMESTAMP = 'X';
|
|
2200
2202
|
const DATE_UNIX_MS_TIMESTAMP = 'x';
|
|
2201
2203
|
class DateUtils {
|
|
@@ -2218,6 +2220,26 @@ class DateUtils {
|
|
|
2218
2220
|
const d2 = fromDateISOString(date2);
|
|
2219
2221
|
return (!d1 && !d2) || d1.isSame(d2, granularity);
|
|
2220
2222
|
}
|
|
2223
|
+
/**
|
|
2224
|
+
* Create a copy of a date, without time fields (always return a new Moment object, or undefined).
|
|
2225
|
+
* Same implementation as the Java class Dates.resetTime() (see any SUMARiS like Pod)
|
|
2226
|
+
* @param value
|
|
2227
|
+
* @param timezone a timezone (see https://momentjs.com/timezone/)
|
|
2228
|
+
* @param keepLocalTime if true, only the timezone (and offset) is updated, keeping the local time same. Consequently, it will now point to a different point in time if the offset has changed.
|
|
2229
|
+
*/
|
|
2230
|
+
static resetTime(value, timezone, keepLocalTime) {
|
|
2231
|
+
if (!value)
|
|
2232
|
+
return undefined;
|
|
2233
|
+
const date = fromDateISOString(value);
|
|
2234
|
+
// No timezone
|
|
2235
|
+
if (!timezone) {
|
|
2236
|
+
return date.clone().startOf('day');
|
|
2237
|
+
}
|
|
2238
|
+
// Use timezone
|
|
2239
|
+
return date.clone() // clone the original date
|
|
2240
|
+
.tz(timezone, keepLocalTime)
|
|
2241
|
+
.startOf('day');
|
|
2242
|
+
}
|
|
2221
2243
|
}
|
|
2222
2244
|
function toDateISOString(value) {
|
|
2223
2245
|
if (!value)
|
|
@@ -2237,32 +2259,32 @@ function fromDateISOString(value) {
|
|
|
2237
2259
|
if (!value || isMoment(value))
|
|
2238
2260
|
return value;
|
|
2239
2261
|
// Parse the input value, as a ISO date time
|
|
2240
|
-
const date = moment$
|
|
2262
|
+
const date = moment$6(value, DATE_ISO_PATTERN);
|
|
2241
2263
|
if (date.isValid())
|
|
2242
2264
|
return date;
|
|
2243
2265
|
// Not valid: trying to convert from unix timestamp
|
|
2244
2266
|
if (typeof value === 'string') {
|
|
2245
2267
|
console.warn('Wrong date format - Trying to convert from local time: ' + value);
|
|
2246
2268
|
if (value.length === 10) {
|
|
2247
|
-
return moment$
|
|
2269
|
+
return moment$6(value, DATE_UNIX_TIMESTAMP);
|
|
2248
2270
|
}
|
|
2249
2271
|
else if (value.length === 13) {
|
|
2250
|
-
return moment$
|
|
2272
|
+
return moment$6(value, DATE_UNIX_MS_TIMESTAMP);
|
|
2251
2273
|
}
|
|
2252
2274
|
}
|
|
2253
2275
|
console.warn('Unable to parse date: ' + value);
|
|
2254
2276
|
return undefined;
|
|
2255
2277
|
}
|
|
2256
2278
|
function fromUnixTimestamp(timeInSec) {
|
|
2257
|
-
return moment$
|
|
2279
|
+
return moment$6(timeInSec, DATE_UNIX_TIMESTAMP);
|
|
2258
2280
|
}
|
|
2259
2281
|
function fromUnixMsTimestamp(timeInMs) {
|
|
2260
|
-
return moment$
|
|
2282
|
+
return moment$6(timeInMs, DATE_UNIX_MS_TIMESTAMP);
|
|
2261
2283
|
}
|
|
2262
2284
|
function toDuration(value, unit) {
|
|
2263
2285
|
if (!value)
|
|
2264
2286
|
return undefined;
|
|
2265
|
-
const duration = moment$
|
|
2287
|
+
const duration = moment$6.duration(value, unit);
|
|
2266
2288
|
// fix 990+ ms
|
|
2267
2289
|
if (duration.milliseconds() >= 990) {
|
|
2268
2290
|
duration.add(1000 - duration.milliseconds(), 'ms');
|
|
@@ -2685,7 +2707,7 @@ NgInitDirective.propDecorators = {
|
|
|
2685
2707
|
ngInit: [{ type: Output }]
|
|
2686
2708
|
};
|
|
2687
2709
|
|
|
2688
|
-
const moment$
|
|
2710
|
+
const moment$5 = momentImported;
|
|
2689
2711
|
// @dynamic
|
|
2690
2712
|
class SharedValidators {
|
|
2691
2713
|
static getDoubleRegexp(maxDecimals) {
|
|
@@ -2700,14 +2722,6 @@ class SharedValidators {
|
|
|
2700
2722
|
this._REGEXP_CACHE.DOUBLE_BY_MAX_DECIMALS[maxDecimals] = new RegExp(`^[-]?[0-9]+([.,][0-9]{1,${maxDecimals}})?$`);
|
|
2701
2723
|
return this._REGEXP_CACHE.DOUBLE_BY_MAX_DECIMALS[maxDecimals];
|
|
2702
2724
|
}
|
|
2703
|
-
static validDate(control) {
|
|
2704
|
-
const value = control.value;
|
|
2705
|
-
const date = !value || moment$4.isMoment(value) ? value : moment$4(control.value, DATE_ISO_PATTERN);
|
|
2706
|
-
if (date && (!date.isValid() || date.year() < 1970)) {
|
|
2707
|
-
return { validDate: true };
|
|
2708
|
-
}
|
|
2709
|
-
return null;
|
|
2710
|
-
}
|
|
2711
2725
|
static latitude(control) {
|
|
2712
2726
|
const value = control.value;
|
|
2713
2727
|
if (isNotNil(value) && (value < -90 || value > 90)) {
|
|
@@ -2772,6 +2786,14 @@ class SharedValidators {
|
|
|
2772
2786
|
return null;
|
|
2773
2787
|
};
|
|
2774
2788
|
}
|
|
2789
|
+
static validDate(control) {
|
|
2790
|
+
const value = control.value;
|
|
2791
|
+
const date = !value || moment$5.isMoment(value) ? value : moment$5(control.value, DATE_ISO_PATTERN);
|
|
2792
|
+
if (date && (!date.isValid() || date.year() < 1970)) {
|
|
2793
|
+
return { validDate: true };
|
|
2794
|
+
}
|
|
2795
|
+
return null;
|
|
2796
|
+
}
|
|
2775
2797
|
static dateIsAfter(previousValue, errorParam, granularity) {
|
|
2776
2798
|
return (control) => {
|
|
2777
2799
|
const value = fromDateISOString(control.value);
|
|
@@ -2782,6 +2804,16 @@ class SharedValidators {
|
|
|
2782
2804
|
return null;
|
|
2783
2805
|
};
|
|
2784
2806
|
}
|
|
2807
|
+
static dateIsBefore(maxValue, errorParam, granularity) {
|
|
2808
|
+
return (control) => {
|
|
2809
|
+
const value = fromDateISOString(control.value);
|
|
2810
|
+
if (isNotNil(value) && isNotNil(maxValue) && value.isSameOrAfter(maxValue, granularity)) {
|
|
2811
|
+
// Return the error
|
|
2812
|
+
return { dateIsBefore: { maxDate: errorParam } };
|
|
2813
|
+
}
|
|
2814
|
+
return null;
|
|
2815
|
+
};
|
|
2816
|
+
}
|
|
2785
2817
|
static dateRangeEnd(startDateFieldName, msg) {
|
|
2786
2818
|
const errorCode = msg ? 'msg' : 'dateRange';
|
|
2787
2819
|
const error = msg ? { msg } : { dateRange: true };
|
|
@@ -2876,6 +2908,7 @@ SharedValidators.I18N_ERROR_KEYS = {
|
|
|
2876
2908
|
pubkey: 'ERROR.FIELD_NOT_VALID_PUBKEY',
|
|
2877
2909
|
validDate: 'ERROR.FIELD_NOT_VALID_DATE',
|
|
2878
2910
|
dateIsAfter: 'ERROR.FIELD_NOT_VALID_DATE_AFTER',
|
|
2911
|
+
dateIsBefore: 'ERROR.FIELD_NOT_VALID_DATE_BEFORE',
|
|
2879
2912
|
dateRange: 'ERROR.FIELD_NOT_VALID_DATE_RANGE',
|
|
2880
2913
|
dateMinDuration: 'ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION',
|
|
2881
2914
|
dateMaxDuration: 'ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION',
|
|
@@ -4716,6 +4749,7 @@ const noop$6 = () => { };
|
|
|
4716
4749
|
const ɵ0$9 = noop$6;
|
|
4717
4750
|
class MatDate {
|
|
4718
4751
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
4752
|
+
this.platform = platform;
|
|
4719
4753
|
this.dateAdapter = dateAdapter;
|
|
4720
4754
|
this.translate = translate;
|
|
4721
4755
|
this.formBuilder = formBuilder;
|
|
@@ -4725,21 +4759,25 @@ class MatDate {
|
|
|
4725
4759
|
this._onChangeCallback = noop$6;
|
|
4726
4760
|
this._onTouchedCallback = noop$6;
|
|
4727
4761
|
this._subscription = new Subscription();
|
|
4728
|
-
this.
|
|
4729
|
-
this.
|
|
4762
|
+
this._writing = true;
|
|
4763
|
+
this._disabling = false;
|
|
4764
|
+
this._readonly = false;
|
|
4730
4765
|
this.dayMask = DAY_MASK$2;
|
|
4731
|
-
this.disabled = false;
|
|
4732
4766
|
this.floatLabel = 'auto';
|
|
4733
|
-
this.readonly = false;
|
|
4734
4767
|
this.compact = false;
|
|
4735
4768
|
this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
|
|
4736
4769
|
this.autofocus = false;
|
|
4770
|
+
this.startDate = null;
|
|
4737
4771
|
this.clearable = false;
|
|
4738
|
-
// Workaround because ion-datetime has issue (do not returned a ISO date)
|
|
4739
|
-
this.mobile = platform.is('mobile');
|
|
4740
|
-
this.keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
|
|
4741
4772
|
this.locale = (translate.currentLang || translate.defaultLang).substr(0, 2);
|
|
4742
4773
|
}
|
|
4774
|
+
set readonly(value) {
|
|
4775
|
+
this._readonly = value;
|
|
4776
|
+
this.markForCheck();
|
|
4777
|
+
}
|
|
4778
|
+
get readonly() {
|
|
4779
|
+
return this._readonly;
|
|
4780
|
+
}
|
|
4743
4781
|
set tabindex(value) {
|
|
4744
4782
|
if (this._tabindex !== value) {
|
|
4745
4783
|
this._tabindex = value;
|
|
@@ -4750,67 +4788,65 @@ class MatDate {
|
|
|
4750
4788
|
return this._tabindex;
|
|
4751
4789
|
}
|
|
4752
4790
|
get value() {
|
|
4753
|
-
return
|
|
4791
|
+
return this.formControl.value;
|
|
4754
4792
|
}
|
|
4755
4793
|
ngOnInit() {
|
|
4794
|
+
this.mobile = isNil(this.mobile) ? this.platform.is('mobile') : this.mobile;
|
|
4795
|
+
this._keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
|
|
4756
4796
|
this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
|
|
4757
4797
|
if (!this.formControl)
|
|
4758
4798
|
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-field>.');
|
|
4759
4799
|
this.required = toBoolean(this.required, this.formControl.validator === Validators.required);
|
|
4760
|
-
//
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4800
|
+
// Add 'validDate' validator (when existing validator are null or required, to be sure to keep it)
|
|
4801
|
+
if (!this.formControl.validator || this.formControl.validator === Validators.required) {
|
|
4802
|
+
this.formControl.setValidators(this.required ? [Validators.required, SharedValidators.validDate] : SharedValidators.validDate);
|
|
4803
|
+
}
|
|
4804
|
+
else {
|
|
4805
|
+
this.formControl.setValidators(this.required ? [this.formControl.validator, Validators.required, SharedValidators.validDate] :
|
|
4806
|
+
[this.formControl.validator, SharedValidators.validDate]);
|
|
4807
|
+
}
|
|
4808
|
+
this.dayControl = this.formBuilder.control(null, () => this.formControl.errors);
|
|
4765
4809
|
// Get patterns to display date
|
|
4766
|
-
this.updatePattern(this.translate.instant('COMMON.DATE_PATTERN'));
|
|
4767
4810
|
this._subscription.add(this.translate.get('COMMON.DATE_PATTERN')
|
|
4768
4811
|
.subscribe((pattern) => this.updatePattern(pattern)));
|
|
4769
4812
|
this._subscription.add(this.dayControl.valueChanges
|
|
4770
4813
|
.subscribe((value) => this.onFormChange(value)));
|
|
4771
|
-
// Listen status changes outside the component
|
|
4814
|
+
// Listen status changes (when done outside the component - e.g. when setErrors() is calling on the formControl)
|
|
4772
4815
|
this._subscription.add(this.formControl.statusChanges
|
|
4773
|
-
.pipe(filter(() => !this.readonly && !this.
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
}
|
|
4778
|
-
else if (status === 'VALID') {
|
|
4779
|
-
$error.next(null);
|
|
4780
|
-
}
|
|
4781
|
-
this.dayControl.updateValueAndValidity({ onlySelf: true, emitEvent: false });
|
|
4816
|
+
.pipe(filter((_) => !this.readonly && !this._writing && !this._disabling) // Skip
|
|
4817
|
+
)
|
|
4818
|
+
.subscribe(() => {
|
|
4819
|
+
this.dayControl.updateValueAndValidity({ emitEvent: false });
|
|
4782
4820
|
this.markForCheck();
|
|
4783
4821
|
}));
|
|
4784
4822
|
this.updateTabIndex();
|
|
4785
|
-
this.
|
|
4823
|
+
this._writing = false;
|
|
4786
4824
|
}
|
|
4787
4825
|
ngOnDestroy() {
|
|
4788
4826
|
this._subscription.unsubscribe();
|
|
4789
4827
|
}
|
|
4790
|
-
writeValue(
|
|
4791
|
-
if (this.
|
|
4792
|
-
return;
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4828
|
+
writeValue(valueStr) {
|
|
4829
|
+
if (this._writing)
|
|
4830
|
+
return; // Skip
|
|
4831
|
+
this._writing = true;
|
|
4832
|
+
// DEBUG
|
|
4833
|
+
// console.debug("[mat-date] writeValue() with:", valueStr);
|
|
4834
|
+
const value = fromDateISOString(valueStr);
|
|
4835
|
+
if (!value || !value.isValid()) {
|
|
4796
4836
|
this.dayControl.patchValue(null, { emitEvent: false });
|
|
4797
|
-
this._value = undefined;
|
|
4798
4837
|
if (this.formControl.value) {
|
|
4799
4838
|
this.formControl.patchValue(null, { emitEvent: false });
|
|
4800
4839
|
this._onChangeCallback(null);
|
|
4801
4840
|
}
|
|
4802
|
-
this.writing = false;
|
|
4803
|
-
this.markForCheck();
|
|
4804
|
-
return;
|
|
4805
4841
|
}
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4842
|
+
else {
|
|
4843
|
+
// Format day
|
|
4844
|
+
const day = value.clone().startOf('day');
|
|
4845
|
+
const dayStr = this.dateAdapter.format(day, this.dayPattern);
|
|
4846
|
+
// Update control
|
|
4847
|
+
this.dayControl.patchValue(dayStr, { emitEvent: false });
|
|
4809
4848
|
}
|
|
4810
|
-
this.
|
|
4811
|
-
// Set form value
|
|
4812
|
-
this.dayControl.patchValue(this.dateAdapter.format(this._value.clone().startOf('day'), this.dayPattern), { emitEvent: false });
|
|
4813
|
-
this.writing = false;
|
|
4849
|
+
this._writing = false;
|
|
4814
4850
|
this.markForCheck();
|
|
4815
4851
|
}
|
|
4816
4852
|
registerOnChange(fn) {
|
|
@@ -4820,37 +4856,36 @@ class MatDate {
|
|
|
4820
4856
|
this._onTouchedCallback = fn;
|
|
4821
4857
|
}
|
|
4822
4858
|
setDisabledState(isDisabled) {
|
|
4823
|
-
if (this.
|
|
4859
|
+
if (this._disabling)
|
|
4824
4860
|
return;
|
|
4825
|
-
this.
|
|
4826
|
-
this.disabled = isDisabled;
|
|
4861
|
+
this._disabling = true;
|
|
4827
4862
|
if (isDisabled) {
|
|
4828
|
-
this.dayControl.disable({
|
|
4863
|
+
this.dayControl.disable({ emitEvent: false });
|
|
4829
4864
|
}
|
|
4830
4865
|
else {
|
|
4831
|
-
this.dayControl.enable({
|
|
4866
|
+
this.dayControl.enable({ emitEvent: false });
|
|
4832
4867
|
}
|
|
4833
|
-
this.
|
|
4868
|
+
this._disabling = false;
|
|
4834
4869
|
this.markForCheck();
|
|
4835
4870
|
}
|
|
4836
4871
|
onDatePickerChange(event) {
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
this.dayControl.
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4872
|
+
// Make sure event is valid
|
|
4873
|
+
if (!event || (event.value !== null && !isMoment(event.value))) {
|
|
4874
|
+
console.warn('Invalid MatDatepicker event. Skipping', event);
|
|
4875
|
+
return; // Skip
|
|
4876
|
+
}
|
|
4877
|
+
const date = event.value && event.value
|
|
4878
|
+
.locale(this.locale) // set as time as locale time
|
|
4879
|
+
.minute(0).seconds(0).millisecond(0) // Reset hour
|
|
4880
|
+
.utc(true);
|
|
4881
|
+
const dateStr = date && this.dateAdapter.format(date, this.dayPattern) || null;
|
|
4882
|
+
if (this.dayControl.value !== dateStr) {
|
|
4883
|
+
// DEBUG
|
|
4884
|
+
console.debug("[mat-date] onDatePickerChange() new value:", dateStr);
|
|
4885
|
+
this.dayControl.setValue(dateStr, {
|
|
4886
|
+
emitEvent: true // Will call onFormChange
|
|
4887
|
+
});
|
|
4888
|
+
}
|
|
4854
4889
|
}
|
|
4855
4890
|
openDatePickerIfMobile(event, datePicker) {
|
|
4856
4891
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -4891,6 +4926,13 @@ class MatDate {
|
|
|
4891
4926
|
}
|
|
4892
4927
|
});
|
|
4893
4928
|
}
|
|
4929
|
+
clear() {
|
|
4930
|
+
this.dayControl.patchValue(null, { emitEvent: false });
|
|
4931
|
+
this.formControl.setValue(null, { emitEvent: false });
|
|
4932
|
+
this._onChangeCallback(null);
|
|
4933
|
+
this.markAsTouched();
|
|
4934
|
+
this.markAsDirty();
|
|
4935
|
+
}
|
|
4894
4936
|
/* -- private method -- */
|
|
4895
4937
|
updatePattern(pattern) {
|
|
4896
4938
|
pattern = pattern !== 'COMMON.DATE_PATTERN' ? pattern : 'L';
|
|
@@ -4900,35 +4942,28 @@ class MatDate {
|
|
|
4900
4942
|
this.markForCheck();
|
|
4901
4943
|
}
|
|
4902
4944
|
}
|
|
4903
|
-
onFormChange(dayValue) {
|
|
4904
|
-
if (this.writing)
|
|
4905
|
-
return; // Skip if call by self
|
|
4906
|
-
this.writing = true;
|
|
4907
|
-
// Make to remove placeholder chars
|
|
4908
|
-
while (dayValue && dayValue.indexOf(this.placeholderChar) !== -1) {
|
|
4909
|
-
dayValue = dayValue.replace(this.placeholderChar, '');
|
|
4910
|
-
}
|
|
4911
|
-
let date;
|
|
4912
|
-
// Parse day string
|
|
4913
|
-
date = dayValue && this.dateAdapter.parse(dayValue, this.dayPattern) || null;
|
|
4914
|
-
// Reset time
|
|
4915
|
-
date = date && date.utc(true).hour(0).minute(0).seconds(0).millisecond(0);
|
|
4916
|
-
// update date picker
|
|
4917
|
-
this._value = date && this.dateAdapter.parse(date.clone(), DATE_ISO_PATTERN);
|
|
4918
|
-
// Get the model value
|
|
4919
|
-
const dateStr = date && date.isValid() && this.dateAdapter.format(date, DATE_ISO_PATTERN).replace('+00:00', 'Z') || date;
|
|
4920
|
-
//console.debug("[mat-date-time] Setting date: ", dateStr);
|
|
4921
|
-
this.formControl.patchValue(dateStr, { emitEvent: false });
|
|
4922
|
-
//this.formControl.updateValueAndValidity();
|
|
4923
|
-
this.writing = false;
|
|
4924
|
-
this.markForCheck();
|
|
4925
|
-
this._onChangeCallback(dateStr);
|
|
4926
|
-
}
|
|
4927
4945
|
checkIfTouched() {
|
|
4928
4946
|
if (this.dayControl.touched) {
|
|
4929
|
-
this.markForCheck();
|
|
4930
4947
|
this._onTouchedCallback();
|
|
4948
|
+
this.markForCheck();
|
|
4949
|
+
}
|
|
4950
|
+
}
|
|
4951
|
+
onFormChange(dayStr) {
|
|
4952
|
+
if (this._writing)
|
|
4953
|
+
return; // Skip if call by self
|
|
4954
|
+
this._writing = true;
|
|
4955
|
+
// Make to remove placeholder chars
|
|
4956
|
+
while (dayStr && dayStr.indexOf(this.placeholderChar) !== -1) {
|
|
4957
|
+
dayStr = dayStr.replace(this.placeholderChar, '');
|
|
4931
4958
|
}
|
|
4959
|
+
// Parse day
|
|
4960
|
+
let date = dayStr && this.dateAdapter.parse(dayStr, this.dayPattern) || null;
|
|
4961
|
+
// Reset time
|
|
4962
|
+
date = date && date.minute(0).seconds(0).millisecond(0)
|
|
4963
|
+
.utc(); // Convert local date into utc (avoid TZ offset to be in the final string)
|
|
4964
|
+
// Set model value
|
|
4965
|
+
this.emitChange(date);
|
|
4966
|
+
this._writing = false;
|
|
4932
4967
|
}
|
|
4933
4968
|
waitKeyboardHide(waitKeyboardDelay) {
|
|
4934
4969
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -4939,11 +4974,23 @@ class MatDate {
|
|
|
4939
4974
|
// Wait hide occur
|
|
4940
4975
|
yield this.keyboard.onKeyboardHide().pipe(first()).toPromise();
|
|
4941
4976
|
// Wait an additional delay if need (depending on the OS)
|
|
4942
|
-
if (this.
|
|
4943
|
-
yield sleep(this.
|
|
4977
|
+
if (this._keyboardHideDelay > 0 && waitKeyboardDelay) {
|
|
4978
|
+
yield sleep(this._keyboardHideDelay);
|
|
4944
4979
|
}
|
|
4945
4980
|
});
|
|
4946
4981
|
}
|
|
4982
|
+
emitChange(value) {
|
|
4983
|
+
// Get the model value
|
|
4984
|
+
const dateStr = toDateISOString(value) || null;
|
|
4985
|
+
if (this.formControl.value !== dateStr) {
|
|
4986
|
+
// DEBUG
|
|
4987
|
+
//console.debug('[matèdate-time] Emit new value: ' + dateStr);
|
|
4988
|
+
// Changes comes from inside function: use the callback
|
|
4989
|
+
this._onChangeCallback(dateStr);
|
|
4990
|
+
// Check if need to update controls
|
|
4991
|
+
this.checkIfTouched();
|
|
4992
|
+
}
|
|
4993
|
+
}
|
|
4947
4994
|
updateTabIndex() {
|
|
4948
4995
|
if (isNil(this._tabindex) || this._tabindex === -1)
|
|
4949
4996
|
return; // skip
|
|
@@ -4955,6 +5002,14 @@ class MatDate {
|
|
|
4955
5002
|
this.markForCheck();
|
|
4956
5003
|
});
|
|
4957
5004
|
}
|
|
5005
|
+
markAsTouched(opts) {
|
|
5006
|
+
this.dayControl.markAsTouched(opts);
|
|
5007
|
+
this._onTouchedCallback();
|
|
5008
|
+
this.markForCheck();
|
|
5009
|
+
}
|
|
5010
|
+
markAsDirty(opts) {
|
|
5011
|
+
this.formControl.markAsDirty(opts);
|
|
5012
|
+
}
|
|
4958
5013
|
markForCheck() {
|
|
4959
5014
|
this.cd.markForCheck();
|
|
4960
5015
|
}
|
|
@@ -4962,7 +5017,7 @@ class MatDate {
|
|
|
4962
5017
|
MatDate.decorators = [
|
|
4963
5018
|
{ type: Component, args: [{
|
|
4964
5019
|
selector: 'mat-date-field',
|
|
4965
|
-
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly else writable\">\n <input matInput hidden type=\"text\"
|
|
5020
|
+
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput hidden type=\"text\"\n readonly\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\">\n <ion-text>{{formControl.value|dateFormat: {pattern: displayPattern} }}</ion-text>\n</mat-form-field>\n\n<!-- writable -->\n<ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\">\n\n <mat-label>{{placeholder}}</mat-label>\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"dayControl\"\n [textMask]=\"{mask: dayMask, keepCharPositions: true, placeholderChar: placeholderChar}\"\n [placeholder]=\"'COMMON.DATE_PLACEHOLDER'|translate\"\n (blur)=\"checkIfTouched()\"\n (keyup.arrowdown)=\"openDatePicker($event, datePicker)\"\n (keyup.escape)=\"preventEvent($event)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [appAutofocus]=\"autofocus\">\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"dayControl\"\n (click)=\"openDatePickerIfMobile($event, datePicker)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n readonly>\n\n <!-- Hide the final input -->\n <input matInput type=\"text\" [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button type=\"button\" mat-icon-button tabindex=\"-1\" matSuffix\n (click)=\"openDatePicker($event, datePicker)\"\n [disabled]=\"formControl.disabled\">\n <div *ngIf=\"mobile; then iconDate; else iconDesktop\"></div>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"clear()\"\n [hidden]=\"formControl.disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n\n <!-- errors -->\n <mat-error *ngIf=\"formControl.touched && formControl.errors|mapKeys|arrayFirst; let errorKey\">\n <ng-container [ngSwitch]=\"errorKey\">\n <span *ngSwitchCase=\"'required'\" translate>ERROR.FIELD_REQUIRED</span>\n <span *ngSwitchCase=\"'validDate'\" translate>ERROR.FIELD_NOT_VALID_DATE_TIME</span>\n <span *ngSwitchCase=\"'dateIsAfter'\">{{'ERROR.FIELD_NOT_VALID_DATE_AFTER' | translate: formControl.errors.dateIsAfter }}</span>\n <span *ngSwitchCase=\"'dateIsBefore'\">{{'ERROR.FIELD_NOT_VALID_DATE_BEFORE' | translate: formControl.errors.dateIsBefore }}</span>\n <span *ngSwitchCase=\"'dateRange'\" translate>ERROR.FIELD_NOT_VALID_DATE_RANGE</span>\n <span *ngSwitchCase=\"'dateMaxDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION</span>\n <span *ngSwitchCase=\"'dateMinDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION</span>\n <span *ngSwitchCase=\"'msg'\">{{(formControl.errors.msg?.key || formControl.errors.msg) | translate: formControl.errors.msg?.params}}</span>\n </ng-container>\n </mat-error>\n <ng-content select=\"mat-error\"></ng-content>\n\n <!-- mat hint -->\n <div class=\"mat-form-field-hint-wrapper\" [class.cdk-visually-hidden]=\"formControl.invalid\">\n <div class=\"mat-form-field-hint-spacer\"></div>\n <ng-content select=\"mat-hint\"></ng-content>\n </div>\n </mat-form-field>\n\n <mat-datepicker #datePicker\n [touchUi]=\"mobile\"\n [disabled]=\"formControl.disabled\"\n [startAt]=\"startDate\"></mat-datepicker>\n\n\n\n</ng-template>\n\n<ng-template #iconDesktop>\n <mat-icon>keyboard_arrow_down</mat-icon>\n</ng-template>\n\n<ng-template #iconDate>\n <mat-icon>date_range</mat-icon>\n</ng-template>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n",
|
|
4966
5021
|
providers: [
|
|
4967
5022
|
DEFAULT_VALUE_ACCESSOR$5,
|
|
4968
5023
|
],
|
|
@@ -4980,19 +5035,19 @@ MatDate.ctorParameters = () => [
|
|
|
4980
5035
|
{ type: FormGroupDirective, decorators: [{ type: Optional }] }
|
|
4981
5036
|
];
|
|
4982
5037
|
MatDate.propDecorators = {
|
|
4983
|
-
disabled: [{ type: Input }],
|
|
4984
5038
|
formControl: [{ type: Input }],
|
|
4985
5039
|
formControlName: [{ type: Input }],
|
|
4986
5040
|
placeholder: [{ type: Input }],
|
|
4987
5041
|
floatLabel: [{ type: Input }],
|
|
4988
|
-
readonly: [{ type: Input }],
|
|
4989
5042
|
required: [{ type: Input }],
|
|
5043
|
+
mobile: [{ type: Input }],
|
|
4990
5044
|
compact: [{ type: Input }],
|
|
4991
5045
|
placeholderChar: [{ type: Input }],
|
|
4992
5046
|
autofocus: [{ type: Input }],
|
|
4993
|
-
tabindex: [{ type: Input }],
|
|
4994
5047
|
startDate: [{ type: Input }],
|
|
4995
5048
|
clearable: [{ type: Input }],
|
|
5049
|
+
readonly: [{ type: Input }],
|
|
5050
|
+
tabindex: [{ type: Input }],
|
|
4996
5051
|
datePicker: [{ type: ViewChild, args: ['datePicker',] }],
|
|
4997
5052
|
matInputs: [{ type: ViewChildren, args: ['matInput',] }]
|
|
4998
5053
|
};
|
|
@@ -5005,8 +5060,7 @@ const DEFAULT_VALUE_ACCESSOR$4 = {
|
|
|
5005
5060
|
const DAY_MASK$1 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
5006
5061
|
const HOUR_REGEXP = /^[012][0-9][:][012345][0-9]$/;
|
|
5007
5062
|
const HOUR_MASK$1 = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
5008
|
-
const noop$5 = () => {
|
|
5009
|
-
};
|
|
5063
|
+
const noop$5 = () => { };
|
|
5010
5064
|
const ɵ0$8 = noop$5;
|
|
5011
5065
|
class MatDateTime {
|
|
5012
5066
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
@@ -5020,8 +5074,8 @@ class MatDateTime {
|
|
|
5020
5074
|
this._onChangeCallback = noop$5;
|
|
5021
5075
|
this._onTouchedCallback = noop$5;
|
|
5022
5076
|
this._subscription = new Subscription();
|
|
5023
|
-
this.
|
|
5024
|
-
this.
|
|
5077
|
+
this._writing = true;
|
|
5078
|
+
this._disabling = false;
|
|
5025
5079
|
this._readonly = false;
|
|
5026
5080
|
this.dayMask = DAY_MASK$1;
|
|
5027
5081
|
this.hourMask = HOUR_MASK$1;
|
|
@@ -5054,7 +5108,7 @@ class MatDateTime {
|
|
|
5054
5108
|
}
|
|
5055
5109
|
ngOnInit() {
|
|
5056
5110
|
this.mobile = isNil(this.mobile) ? this.platform.is('mobile') : this.mobile;
|
|
5057
|
-
this.
|
|
5111
|
+
this._keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
|
|
5058
5112
|
this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
|
|
5059
5113
|
if (!this.formControl)
|
|
5060
5114
|
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-time-field>.');
|
|
@@ -5081,19 +5135,19 @@ class MatDateTime {
|
|
|
5081
5135
|
.subscribe((event) => this.onFormChange(event)));
|
|
5082
5136
|
// Listen status changes (when done outside the component - e.g. when setErrors() is calling on the formControl)
|
|
5083
5137
|
this._subscription.add(this.formControl.statusChanges
|
|
5084
|
-
.pipe(filter((_) => !this.readonly && !this.
|
|
5138
|
+
.pipe(filter((_) => !this.readonly && !this._writing && !this._disabling) // Skip
|
|
5085
5139
|
)
|
|
5086
5140
|
.subscribe(() => this.markForCheck()));
|
|
5087
5141
|
this.updateTabIndex();
|
|
5088
|
-
this.
|
|
5142
|
+
this._writing = false;
|
|
5089
5143
|
}
|
|
5090
5144
|
ngOnDestroy() {
|
|
5091
5145
|
this._subscription.unsubscribe();
|
|
5092
5146
|
}
|
|
5093
5147
|
writeValue(valueStr) {
|
|
5094
|
-
if (this.
|
|
5148
|
+
if (this._writing)
|
|
5095
5149
|
return; // Skip
|
|
5096
|
-
this.
|
|
5150
|
+
this._writing = true;
|
|
5097
5151
|
// DEBUG
|
|
5098
5152
|
// console.debug("[mat-date-time] writeValue() with:", valueStr);
|
|
5099
5153
|
const value = fromDateISOString(valueStr);
|
|
@@ -5102,10 +5156,10 @@ class MatDateTime {
|
|
|
5102
5156
|
this.timeFormControl.patchValue(null, { emitEvent: false });
|
|
5103
5157
|
}
|
|
5104
5158
|
else {
|
|
5105
|
-
//
|
|
5159
|
+
// Format day
|
|
5106
5160
|
const day = value.clone().startOf('day');
|
|
5107
5161
|
const dayStr = this.dateAdapter.format(day, this.dayPattern);
|
|
5108
|
-
//
|
|
5162
|
+
// Format time
|
|
5109
5163
|
// - Format hh
|
|
5110
5164
|
let hour = value.hour();
|
|
5111
5165
|
hour = hour < 10 ? ('0' + hour) : hour;
|
|
@@ -5117,46 +5171,9 @@ class MatDateTime {
|
|
|
5117
5171
|
this.dateFormControl.patchValue(dayStr, { emitEvent: false });
|
|
5118
5172
|
this.timeFormControl.patchValue(timeStr, { emitEvent: false });
|
|
5119
5173
|
}
|
|
5120
|
-
this.
|
|
5174
|
+
this._writing = false;
|
|
5121
5175
|
this.markForCheck();
|
|
5122
5176
|
}
|
|
5123
|
-
onFormChange(event) {
|
|
5124
|
-
if (this.writing)
|
|
5125
|
-
return; // Skip if call by self
|
|
5126
|
-
this.writing = true;
|
|
5127
|
-
let dayStr = this.dateFormControl.value;
|
|
5128
|
-
const time = this.timeFormControl.value;
|
|
5129
|
-
// DEBUG
|
|
5130
|
-
//console.debug(`[mat-date-time] onFormChange() from event: ${event} - controls values: `, [dayStr, time]);
|
|
5131
|
-
const incompleteValue = isNilOrBlank(time) !== isNilOrBlank(dayStr);
|
|
5132
|
-
if (incompleteValue || this.dateFormControl.invalid || this.timeFormControl.invalid) {
|
|
5133
|
-
this.formControl.markAsPending({ onlySelf: true });
|
|
5134
|
-
this.formControl.setErrors(Object.assign(Object.assign(Object.assign({ validDate: incompleteValue }, this.formControl.errors), this.dateFormControl.errors), this.timeFormControl.errors));
|
|
5135
|
-
this.formControl.markAsDirty();
|
|
5136
|
-
// Reset the value
|
|
5137
|
-
//this.emitChange(null);
|
|
5138
|
-
this.writing = false;
|
|
5139
|
-
return;
|
|
5140
|
-
}
|
|
5141
|
-
// Make to remove placeholder chars
|
|
5142
|
-
while (dayStr && dayStr.indexOf(this.placeholderChar) !== -1) {
|
|
5143
|
-
dayStr = dayStr.replace(this.placeholderChar, '');
|
|
5144
|
-
}
|
|
5145
|
-
// Parse day
|
|
5146
|
-
const day = dayStr && this.dateAdapter.parse(dayStr, this.dayPattern) || null;
|
|
5147
|
-
// Parse time
|
|
5148
|
-
const hourParts = (time || '').split(':');
|
|
5149
|
-
const hour = parseInt(hourParts[0] || 0);
|
|
5150
|
-
const minutes = parseInt(hourParts[1] || 0);
|
|
5151
|
-
const dateTime = day && day
|
|
5152
|
-
.locale(this.locale) // set as time as locale time
|
|
5153
|
-
.hour(hour).minute(minutes) // Set local hour
|
|
5154
|
-
.seconds(0).millisecond(0) // Reset seconds/millisecond
|
|
5155
|
-
.utc(); // Convert to UTC (avoid TZ offset in final string)
|
|
5156
|
-
// Set model value
|
|
5157
|
-
this.emitChange(dateTime);
|
|
5158
|
-
this.writing = false;
|
|
5159
|
-
}
|
|
5160
5177
|
registerOnChange(fn) {
|
|
5161
5178
|
this._onChangeCallback = fn;
|
|
5162
5179
|
}
|
|
@@ -5164,9 +5181,9 @@ class MatDateTime {
|
|
|
5164
5181
|
this._onTouchedCallback = fn;
|
|
5165
5182
|
}
|
|
5166
5183
|
setDisabledState(isDisabled) {
|
|
5167
|
-
if (this.
|
|
5184
|
+
if (this._disabling)
|
|
5168
5185
|
return; // Skip
|
|
5169
|
-
this.
|
|
5186
|
+
this._disabling = true;
|
|
5170
5187
|
if (isDisabled) {
|
|
5171
5188
|
this.dateFormControl.disable({ emitEvent: false });
|
|
5172
5189
|
this.timeFormControl.disable({ emitEvent: false });
|
|
@@ -5175,7 +5192,7 @@ class MatDateTime {
|
|
|
5175
5192
|
this.dateFormControl.enable({ emitEvent: false });
|
|
5176
5193
|
this.timeFormControl.enable({ emitEvent: false });
|
|
5177
5194
|
}
|
|
5178
|
-
this.
|
|
5195
|
+
this._disabling = false;
|
|
5179
5196
|
this.markForCheck();
|
|
5180
5197
|
}
|
|
5181
5198
|
onDatePickerChange(event) {
|
|
@@ -5281,6 +5298,43 @@ class MatDateTime {
|
|
|
5281
5298
|
this.markForCheck();
|
|
5282
5299
|
}
|
|
5283
5300
|
}
|
|
5301
|
+
onFormChange(event) {
|
|
5302
|
+
if (this._writing)
|
|
5303
|
+
return; // Skip if call by self
|
|
5304
|
+
this._writing = true;
|
|
5305
|
+
let dayStr = this.dateFormControl.value;
|
|
5306
|
+
const time = this.timeFormControl.value;
|
|
5307
|
+
// DEBUG
|
|
5308
|
+
//console.debug(`[mat-date-time] onFormChange() from event: ${event} - controls values: `, [dayStr, time]);
|
|
5309
|
+
const incompleteValue = isNilOrBlank(time) !== isNilOrBlank(dayStr);
|
|
5310
|
+
if (incompleteValue || this.dateFormControl.invalid || this.timeFormControl.invalid) {
|
|
5311
|
+
this.formControl.markAsPending({ onlySelf: true });
|
|
5312
|
+
this.formControl.setErrors(Object.assign(Object.assign(Object.assign({ validDate: incompleteValue }, this.formControl.errors), this.dateFormControl.errors), this.timeFormControl.errors));
|
|
5313
|
+
this.formControl.markAsDirty();
|
|
5314
|
+
// Reset the value
|
|
5315
|
+
//this.emitChange(null);
|
|
5316
|
+
this._writing = false;
|
|
5317
|
+
return;
|
|
5318
|
+
}
|
|
5319
|
+
// Make to remove placeholder chars
|
|
5320
|
+
while (dayStr && dayStr.indexOf(this.placeholderChar) !== -1) {
|
|
5321
|
+
dayStr = dayStr.replace(this.placeholderChar, '');
|
|
5322
|
+
}
|
|
5323
|
+
// Parse day
|
|
5324
|
+
const day = dayStr && this.dateAdapter.parse(dayStr, this.dayPattern) || null;
|
|
5325
|
+
// Parse time
|
|
5326
|
+
const hourParts = (time || '').split(':');
|
|
5327
|
+
const hour = parseInt(hourParts[0] || 0);
|
|
5328
|
+
const minutes = parseInt(hourParts[1] || 0);
|
|
5329
|
+
const dateTime = day && day
|
|
5330
|
+
.locale(this.locale) // set as time as locale time
|
|
5331
|
+
.hour(hour).minute(minutes) // Set local hour
|
|
5332
|
+
.seconds(0).millisecond(0) // Reset seconds/millisecond
|
|
5333
|
+
.utc(); // Convert to UTC (avoid TZ offset in final string)
|
|
5334
|
+
// Set model value
|
|
5335
|
+
this.emitChange(dateTime);
|
|
5336
|
+
this._writing = false;
|
|
5337
|
+
}
|
|
5284
5338
|
waitKeyboardHide(waitKeyboardDelay) {
|
|
5285
5339
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5286
5340
|
if (!this.keyboard || !this.keyboard.isVisible)
|
|
@@ -5290,8 +5344,8 @@ class MatDateTime {
|
|
|
5290
5344
|
// Wait hide occur
|
|
5291
5345
|
yield this.keyboard.onKeyboardHide().pipe(first()).toPromise();
|
|
5292
5346
|
// Wait an additional delay if need (depending on the OS)
|
|
5293
|
-
if (this.
|
|
5294
|
-
yield sleep(this.
|
|
5347
|
+
if (this._keyboardHideDelay > 0 && waitKeyboardDelay) {
|
|
5348
|
+
yield sleep(this._keyboardHideDelay);
|
|
5295
5349
|
}
|
|
5296
5350
|
});
|
|
5297
5351
|
}
|
|
@@ -5318,9 +5372,9 @@ class MatDateTime {
|
|
|
5318
5372
|
this.markForCheck();
|
|
5319
5373
|
});
|
|
5320
5374
|
}
|
|
5321
|
-
markAsTouched() {
|
|
5322
|
-
this.dateFormControl.markAsTouched();
|
|
5323
|
-
this.timeFormControl.markAsTouched();
|
|
5375
|
+
markAsTouched(opts) {
|
|
5376
|
+
this.dateFormControl.markAsTouched(opts);
|
|
5377
|
+
this.timeFormControl.markAsTouched(opts);
|
|
5324
5378
|
this._onTouchedCallback();
|
|
5325
5379
|
this.markForCheck();
|
|
5326
5380
|
}
|
|
@@ -5334,7 +5388,7 @@ class MatDateTime {
|
|
|
5334
5388
|
MatDateTime.decorators = [
|
|
5335
5389
|
{ type: Component, args: [{
|
|
5336
5390
|
selector: 'mat-date-time-field',
|
|
5337
|
-
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput hidden type=\"text\"\n readonly\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\">\n <ion-text>{{formControl.value|dateFormat: {pattern: displayPattern} }}</ion-text>\n</mat-form-field>\n\n<!-- writable + time -->\n<ng-template #writable >\n <ion-grid class=\"ion-no-padding\">\n <ion-row class=\"ion-no-padding no-wrap\" nowrap>\n\n <!-- day -->\n <ion-col class=\"day ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-invalid]=\"formControl.touched && formControl.invalid\">\n\n <mat-label>{{placeholder}}</mat-label>\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"dateFormControl\"\n [textMask]=\"{mask: dayMask, keepCharPositions: true, placeholderChar: placeholderChar}\"\n [placeholder]=\"'COMMON.DATE_PLACEHOLDER'|translate\"\n (blur)=\"checkIfTouched()\"\n (keyup.arrowdown)=\"openDatePicker($event, datePicker)\"\n (keyup.escape)=\"preventEvent($event)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [appAutofocus]=\"autofocus\">\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"dateFormControl\"\n (click)=\"openDatePickerIfMobile($event, datePicker)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n readonly>\n <input matInput type=\"text\" [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button type=\"button\" mat-icon-button tabindex=\"-1\" matSuffix
|
|
5391
|
+
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput hidden type=\"text\"\n readonly\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\">\n <ion-text>{{formControl.value|dateFormat: {pattern: displayPattern} }}</ion-text>\n</mat-form-field>\n\n<!-- writable + time -->\n<ng-template #writable >\n <ion-grid class=\"ion-no-padding\">\n <ion-row class=\"ion-no-padding no-wrap\" nowrap>\n\n <!-- day -->\n <ion-col class=\"day ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-invalid]=\"formControl.touched && formControl.invalid\">\n\n <mat-label>{{placeholder}}</mat-label>\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"dateFormControl\"\n [textMask]=\"{mask: dayMask, keepCharPositions: true, placeholderChar: placeholderChar}\"\n [placeholder]=\"'COMMON.DATE_PLACEHOLDER'|translate\"\n (blur)=\"checkIfTouched()\"\n (keyup.arrowdown)=\"openDatePicker($event, datePicker)\"\n (keyup.escape)=\"preventEvent($event)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [appAutofocus]=\"autofocus\">\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"dateFormControl\"\n (click)=\"openDatePickerIfMobile($event, datePicker)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n readonly>\n\n <!-- Hide the final input -->\n <input matInput type=\"text\" [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button type=\"button\" mat-icon-button tabindex=\"-1\" matSuffix\n (click)=\"openDatePicker($event, datePicker)\"\n [disabled]=\"formControl.disabled\">\n <div *ngIf=\"mobile; then iconDate; else iconDesktop\"></div>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"clear()\"\n [hidden]=\"formControl.disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n <mat-datepicker #datePicker\n [touchUi]=\"mobile\"\n [disabled]=\"formControl.disabled\"\n [startAt]=\"startDate\"></mat-datepicker>\n <div class=\"mat-form-field-subscript mat-form-field-subscript-wrapper\" >\n <!-- errors -->\n <ng-container [ngSwitch]=\"formControl.touched && formControl.errors|mapKeys|arrayFirst\">\n <mat-error *ngSwitchCase=\"'required'\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngSwitchCase=\"'validDate'\" translate>ERROR.FIELD_NOT_VALID_DATE_TIME</mat-error>\n <mat-error *ngSwitchCase=\"'dateIsAfter'\">{{'ERROR.FIELD_NOT_VALID_DATE_AFTER' | translate: formControl.errors.dateIsAfter }}</mat-error>\n <mat-error *ngSwitchCase=\"'dateIsBefore'\">{{'ERROR.FIELD_NOT_VALID_DATE_BEFORE' | translate: formControl.errors.dateIsBefore }}</mat-error>\n <mat-error *ngSwitchCase=\"'dateRange'\" translate>ERROR.FIELD_NOT_VALID_DATE_RANGE</mat-error>\n <mat-error *ngSwitchCase=\"'dateMaxDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION</mat-error>\n <mat-error *ngSwitchCase=\"'dateMinDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION</mat-error>\n <mat-error *ngSwitchCase=\"'msg'\">{{(formControl.errors.msg?.key || formControl.errors.msg) | translate: formControl.errors.msg?.params}}</mat-error>\n </ng-container>\n <ng-content select=\"mat-error\"></ng-content>\n\n <!-- mat hint -->\n <div class=\"mat-form-field-hint-wrapper\" [class.cdk-visually-hidden]=\"formControl.invalid\">\n <div class=\"mat-form-field-hint-spacer\"></div>\n <ng-content select=\"mat-hint\"></ng-content>\n </div>\n </div>\n\n </ion-col>\n\n <!-- hour -->\n <ion-col class=\"hour ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-invalid]=\"formControl.touched && (timeFormControl.invalid || formControl.invalid)\">\n <mat-label *ngIf=\"placeholder && floatLabel != 'never'\" translate>COMMON.TIME</mat-label>\n <input matInput #matInput type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"timeFormControl\"\n autocomplete=\"off\"\n min=\"0\" max=\"23\"\n [textMask]=\"{mask: hourMask, keepCharPositions: true, placeholderChar: placeholderChar, guide: true}\"\n [placeholder]=\"'COMMON.TIME_PLACEHOLDER'|translate\"\n [required]=\"required\"\n (keyup.arrowdown)=\"openTimePicker($event)\"\n (keyup.escape)=\"preventEvent($event)\"\n (blur)=\"checkIfTouched()\"\n [tabindex]=\"tabindex !== undefined ? tabindex+1 : undefined\">\n\n <input matInput #matInput type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"timeFormControl\"\n (click)=\"openTimePickerIfMobile($event)\"\n readonly>\n\n <input matInput type=\"text\"\n [formControl]=\"timeFormControl\"\n hidden\n [ngxTimepicker]=\"timePicker\"\n [format]=\"24\">\n\n <button matSuffix type=\"button\" mat-icon-button\n tabindex=\"-1\"\n *ngIf=\"!compact && !mobile\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openTimePicker($event)\" >\n <mat-icon>keyboard_arrow_down</mat-icon>\n </button>\n <button matSuffix type=\"button\" mat-icon-button\n tabindex=\"-1\"\n *ngIf=\"!compact && mobile\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openTimePickerIfMobile($event)\">\n <mat-icon>access_time</mat-icon>\n </button>\n\n <ngx-material-timepicker #timePicker [@.disabled]=\"true\"\n (timeSet)=\"onTimePickerChange($event)\"\n [ESC]=\"!mobile\"\n [defaultTime]=\"'00:00'\"\n [cancelBtnTmpl]=\"timePickerCancelButton\"\n [confirmBtnTmpl]=\"timePickerOkButton\"\n [preventOverlayClick]=\"mobile\"\n [enableKeyboardInput]=\"false\"\n [disableAnimation]=\"true\">\n <!-- cancel button -->\n <ng-template #timePickerCancelButton>\n <ion-button fill=\"clear\" color=\"dark\">\n <ion-label translate>COMMON.BTN_CANCEL</ion-label>\n </ion-button>\n </ng-template>\n\n <!-- confirm button -->\n <ng-template #timePickerOkButton>\n <ion-button fill=\"solid\" color=\"tertiary\">\n <ion-label translate>COMMON.BTN_VALIDATE</ion-label>\n </ion-button>\n </ng-template>\n\n </ngx-material-timepicker>\n </mat-form-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n\n</ng-template>\n\n<ng-template #iconDesktop>\n <mat-icon>keyboard_arrow_down</mat-icon>\n</ng-template>\n\n<ng-template #iconDate>\n <mat-icon>date_range</mat-icon>\n</ng-template>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n",
|
|
5338
5392
|
providers: [
|
|
5339
5393
|
DEFAULT_VALUE_ACCESSOR$4,
|
|
5340
5394
|
],
|
|
@@ -10230,7 +10284,7 @@ SelectPeerModal.propDecorators = {
|
|
|
10230
10284
|
onRefresh: [{ type: Input }]
|
|
10231
10285
|
};
|
|
10232
10286
|
|
|
10233
|
-
const moment$
|
|
10287
|
+
const moment$4 = momentImported;
|
|
10234
10288
|
const SETTINGS_STORAGE_KEY = 'settings';
|
|
10235
10289
|
const SETTINGS_TRANSIENT_PROPERTIES = ['mobile', 'touchUi' /*deprecated*/];
|
|
10236
10290
|
// fixme: this constant points to static environment
|
|
@@ -10473,11 +10527,11 @@ class LocalSettingsService extends StartableService {
|
|
|
10473
10527
|
if (!feature) {
|
|
10474
10528
|
feature = {
|
|
10475
10529
|
name: featureName.toLowerCase(),
|
|
10476
|
-
lastSyncDate: moment$
|
|
10530
|
+
lastSyncDate: moment$4().toISOString()
|
|
10477
10531
|
};
|
|
10478
10532
|
}
|
|
10479
10533
|
else {
|
|
10480
|
-
feature.lastSyncDate = moment$
|
|
10534
|
+
feature.lastSyncDate = moment$4().toISOString();
|
|
10481
10535
|
}
|
|
10482
10536
|
this.saveOfflineFeature(feature);
|
|
10483
10537
|
}
|
|
@@ -10638,7 +10692,7 @@ class LocalSettingsService extends StartableService {
|
|
|
10638
10692
|
if (!page || !page.title || !page.path)
|
|
10639
10693
|
throw Error('Missing required argument \'page\', \'page.path\' or \'page.title\'');
|
|
10640
10694
|
// Set time
|
|
10641
|
-
page.time = page.time || moment$
|
|
10695
|
+
page.time = page.time || moment$4();
|
|
10642
10696
|
// Clean the title (remove <small> tags)
|
|
10643
10697
|
if (!opts || opts.removeTitleSmallTag !== false) {
|
|
10644
10698
|
const tagIndex = page.title.indexOf('</small>');
|
|
@@ -15465,7 +15519,7 @@ ConfigService.ctorParameters = () => [
|
|
|
15465
15519
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_CONFIG_OPTIONS,] }] }
|
|
15466
15520
|
];
|
|
15467
15521
|
|
|
15468
|
-
const moment$
|
|
15522
|
+
const moment$3 = momentImported;
|
|
15469
15523
|
class PlatformService extends StartableService {
|
|
15470
15524
|
constructor(platform, cdkPlatform, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, storage, audioProvider, environment, statusBar, keyboard, splashScreen, browser, downloader) {
|
|
15471
15525
|
super(platform);
|
|
@@ -15689,16 +15743,16 @@ class PlatformService extends StartableService {
|
|
|
15689
15743
|
}
|
|
15690
15744
|
// config moment lib
|
|
15691
15745
|
try {
|
|
15692
|
-
moment$
|
|
15746
|
+
moment$3.locale(event.lang);
|
|
15693
15747
|
console.debug('[platform] Use locale {' + event.lang + '}');
|
|
15694
15748
|
}
|
|
15695
15749
|
// If error, fallback to en
|
|
15696
15750
|
catch (err) {
|
|
15697
|
-
moment$
|
|
15751
|
+
moment$3.locale('en');
|
|
15698
15752
|
console.warn('[platform] Unknown local for moment lib. Using default [en]');
|
|
15699
15753
|
}
|
|
15700
15754
|
// Config date adapter
|
|
15701
|
-
this.dateAdapter.setLocale(moment$
|
|
15755
|
+
this.dateAdapter.setLocale(moment$3.locale());
|
|
15702
15756
|
}
|
|
15703
15757
|
});
|
|
15704
15758
|
this.settings.onChange.subscribe(data => {
|
|
@@ -25785,13 +25839,13 @@ LatLongTestPage.ctorParameters = () => [
|
|
|
25785
25839
|
{ type: FormBuilder }
|
|
25786
25840
|
];
|
|
25787
25841
|
|
|
25788
|
-
const moment$
|
|
25842
|
+
const moment$2 = momentImported;
|
|
25789
25843
|
class SwipeTestPage {
|
|
25790
25844
|
constructor(formBuilder, dateFormatPipe) {
|
|
25791
25845
|
this.formBuilder = formBuilder;
|
|
25792
25846
|
this.dateFormatPipe = dateFormatPipe;
|
|
25793
25847
|
this.$dates = new BehaviorSubject(undefined);
|
|
25794
|
-
this._today = moment$
|
|
25848
|
+
this._today = moment$2().startOf('day');
|
|
25795
25849
|
this.form = formBuilder.group({
|
|
25796
25850
|
empty: [null, Validators.required],
|
|
25797
25851
|
date: [null, Validators.compose([Validators.required, SharedValidators.validDate])],
|
|
@@ -25804,7 +25858,7 @@ class SwipeTestPage {
|
|
|
25804
25858
|
ngOnInit() {
|
|
25805
25859
|
const dates = [];
|
|
25806
25860
|
for (let d = 0; d < 7; d++) {
|
|
25807
|
-
dates[d] = moment$
|
|
25861
|
+
dates[d] = moment$2(this._today).add(d - 3, 'day');
|
|
25808
25862
|
}
|
|
25809
25863
|
this.$dates.next(dates);
|
|
25810
25864
|
this.loadData();
|
|
@@ -25845,7 +25899,7 @@ SwipeTestPage.ctorParameters = () => [
|
|
|
25845
25899
|
{ type: DateFormatPipe }
|
|
25846
25900
|
];
|
|
25847
25901
|
|
|
25848
|
-
const moment = momentImported;
|
|
25902
|
+
const moment$1 = momentImported;
|
|
25849
25903
|
class DateTimeTestPage {
|
|
25850
25904
|
constructor(platform, formBuilder, cd) {
|
|
25851
25905
|
this.platform = platform;
|
|
@@ -25877,7 +25931,7 @@ class DateTimeTestPage {
|
|
|
25877
25931
|
// Load the form with data
|
|
25878
25932
|
loadData() {
|
|
25879
25933
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25880
|
-
const now = moment();
|
|
25934
|
+
const now = moment$1();
|
|
25881
25935
|
const data = {
|
|
25882
25936
|
empty: toDateISOString(now.clone().add(2, 'hours')),
|
|
25883
25937
|
enable: toDateISOString(now),
|
|
@@ -26121,9 +26175,103 @@ NumpadTestPage.ctorParameters = () => [
|
|
|
26121
26175
|
{ type: FormBuilder }
|
|
26122
26176
|
];
|
|
26123
26177
|
|
|
26178
|
+
const moment = momentImported;
|
|
26179
|
+
class DateTestPage {
|
|
26180
|
+
constructor(platform, formBuilder, cd) {
|
|
26181
|
+
this.platform = platform;
|
|
26182
|
+
this.formBuilder = formBuilder;
|
|
26183
|
+
this.cd = cd;
|
|
26184
|
+
this.showLogPanel = true;
|
|
26185
|
+
this.logContent = '';
|
|
26186
|
+
this.memoryHide = false;
|
|
26187
|
+
this.memoryMobile = true;
|
|
26188
|
+
this.stringify = JSON.stringify;
|
|
26189
|
+
this.form = formBuilder.group({
|
|
26190
|
+
empty: [null, Validators.required],
|
|
26191
|
+
enable: [null, Validators.required],
|
|
26192
|
+
disable: [null, Validators.required],
|
|
26193
|
+
readonly: [null]
|
|
26194
|
+
}, {
|
|
26195
|
+
validators: SharedFormGroupValidators.dateRange('empty', 'enable')
|
|
26196
|
+
});
|
|
26197
|
+
const disableControl = this.form.get('disable');
|
|
26198
|
+
disableControl.disable();
|
|
26199
|
+
// Copy the 'enable' value, into the disable control
|
|
26200
|
+
this.form.get('enable').valueChanges.subscribe(value => disableControl.setValue(value));
|
|
26201
|
+
const mobile = platform.is('mobile');
|
|
26202
|
+
this.showLogPanel = this.showLogPanel || mobile;
|
|
26203
|
+
}
|
|
26204
|
+
ngOnInit() {
|
|
26205
|
+
setTimeout(() => this.loadData(), 250);
|
|
26206
|
+
}
|
|
26207
|
+
// Load the form with data
|
|
26208
|
+
loadData() {
|
|
26209
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26210
|
+
const now = moment();
|
|
26211
|
+
const data = {
|
|
26212
|
+
empty: toDateISOString(now.clone().add(2, 'hours')),
|
|
26213
|
+
enable: toDateISOString(now),
|
|
26214
|
+
disable: now,
|
|
26215
|
+
readonly: now
|
|
26216
|
+
};
|
|
26217
|
+
this.form.setValue(data);
|
|
26218
|
+
this.log('[test-page] Data loaded: ' + JSON.stringify(data));
|
|
26219
|
+
this.form.get('empty').valueChanges
|
|
26220
|
+
.pipe(debounceTime(300))
|
|
26221
|
+
.subscribe(value => this.log('[test-page] Value n°1: ' + JSON.stringify(value)));
|
|
26222
|
+
this.form.get('enable').valueChanges
|
|
26223
|
+
.pipe(debounceTime(300))
|
|
26224
|
+
.subscribe(value => this.log('[test-page] Value n°2: ' + JSON.stringify(value)));
|
|
26225
|
+
});
|
|
26226
|
+
}
|
|
26227
|
+
doSubmit(event) {
|
|
26228
|
+
this.form.markAllAsTouched();
|
|
26229
|
+
this.log('[test-page] Form content: ' + JSON.stringify(this.form.value));
|
|
26230
|
+
this.log('[test-page] Form status: ' + this.form.status);
|
|
26231
|
+
if (this.form.invalid) {
|
|
26232
|
+
this.log('[test-page] Form errors: ' + JSON.stringify(this.form.errors));
|
|
26233
|
+
// DEBUG
|
|
26234
|
+
AppFormUtils.logFormErrors(this.form);
|
|
26235
|
+
}
|
|
26236
|
+
}
|
|
26237
|
+
log(message) {
|
|
26238
|
+
console.debug(message);
|
|
26239
|
+
if (this.showLogPanel) {
|
|
26240
|
+
this.logContent += message + '<br/>';
|
|
26241
|
+
this.cd.markForCheck();
|
|
26242
|
+
}
|
|
26243
|
+
}
|
|
26244
|
+
clearLogPanel() {
|
|
26245
|
+
this.logContent = '';
|
|
26246
|
+
this.cd.markForCheck();
|
|
26247
|
+
}
|
|
26248
|
+
startMemoryTimer() {
|
|
26249
|
+
this.memoryTimer = setInterval(() => {
|
|
26250
|
+
this.memoryHide = !this.memoryHide;
|
|
26251
|
+
}, 50);
|
|
26252
|
+
}
|
|
26253
|
+
stopMemoryTimer() {
|
|
26254
|
+
clearInterval(this.memoryTimer);
|
|
26255
|
+
this.memoryTimer = null;
|
|
26256
|
+
this.memoryHide = false;
|
|
26257
|
+
}
|
|
26258
|
+
}
|
|
26259
|
+
DateTestPage.decorators = [
|
|
26260
|
+
{ type: Component, args: [{
|
|
26261
|
+
selector: 'app-data-test',
|
|
26262
|
+
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/Time 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 <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=\"2\">\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=\"2\">\n <mat-form-field floatLabel=\"never\">\n <input matInput type=\"text\" hidden>\n <mat-checkbox (change)=\"memoryMobile=$event.checked\" [value]=\"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/Time\"\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/Time\"\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/Time\"\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/Time\"\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 </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 <!-- 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/Time\"\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/Time\"\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/Time\"\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 <!-- 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)=\"readonlyField.readonly=$event.checked\" [checked]=\"readonlyField.readonly\">\n </mat-checkbox>\n\n <mat-date-field #readonlyField formControlName=\"readonly\"\n placeholder=\"Date/Time\"\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 </ion-row>\n </ion-grid>\n </form>\n\n</ion-content>\n"
|
|
26263
|
+
},] }
|
|
26264
|
+
];
|
|
26265
|
+
DateTestPage.ctorParameters = () => [
|
|
26266
|
+
{ type: Platform },
|
|
26267
|
+
{ type: FormBuilder },
|
|
26268
|
+
{ type: ChangeDetectorRef }
|
|
26269
|
+
];
|
|
26270
|
+
|
|
26124
26271
|
const SHARED_MATERIAL_TESTING_PAGES = [
|
|
26125
26272
|
{ label: 'Shared Material components', divider: true },
|
|
26126
26273
|
{ label: 'Date/Time field', page: '/testing/shared/datetime' },
|
|
26274
|
+
{ label: 'Date field', page: '/testing/shared/date' },
|
|
26127
26275
|
{ label: 'Autocomplete field', page: '/testing/shared/autocomplete' },
|
|
26128
26276
|
{ label: 'Lat/Long field', page: '/testing/shared/latlong' },
|
|
26129
26277
|
{ label: 'Numeric pad component', page: '/testing/shared/numpad' },
|
|
@@ -26148,6 +26296,11 @@ const routes$4 = [
|
|
|
26148
26296
|
pathMatch: 'full',
|
|
26149
26297
|
component: DateTimeTestPage
|
|
26150
26298
|
},
|
|
26299
|
+
{
|
|
26300
|
+
path: 'date',
|
|
26301
|
+
pathMatch: 'full',
|
|
26302
|
+
component: DateTestPage
|
|
26303
|
+
},
|
|
26151
26304
|
{
|
|
26152
26305
|
path: 'latlong',
|
|
26153
26306
|
pathMatch: 'full',
|
|
@@ -26188,6 +26341,7 @@ MaterialTestingModule.decorators = [
|
|
|
26188
26341
|
],
|
|
26189
26342
|
declarations: [
|
|
26190
26343
|
DateTimeTestPage,
|
|
26344
|
+
DateTestPage,
|
|
26191
26345
|
AutocompleteTestPage,
|
|
26192
26346
|
LatLongTestPage,
|
|
26193
26347
|
NumpadTestPage,
|
|
@@ -26199,6 +26353,7 @@ MaterialTestingModule.decorators = [
|
|
|
26199
26353
|
SharedMaterialModule,
|
|
26200
26354
|
RouterModule,
|
|
26201
26355
|
DateTimeTestPage,
|
|
26356
|
+
DateTestPage,
|
|
26202
26357
|
AutocompleteTestPage,
|
|
26203
26358
|
LatLongTestPage,
|
|
26204
26359
|
NumpadTestPage,
|
|
@@ -26793,5 +26948,5 @@ CoreTestingModule.decorators = [
|
|
|
26793
26948
|
* Generated bundle index. Do not edit.
|
|
26794
26949
|
*/
|
|
26795
26950
|
|
|
26796
|
-
export { APP_ABOUT_DEVELOPERS, APP_ABOUT_PARTNERS, APP_CONFIG_OPTIONS, APP_FORM_ERROR_I18N_KEYS, APP_GRAPHQL_TYPE_POLICIES, APP_HOME_BUTTONS, APP_LOCALES, APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS, APP_LOCAL_STORAGE_TYPE_POLICIES, APP_MENU_ITEMS, APP_TESTING_PAGES, AboutModal, Account, AccountPage, AccountService, AccountToStringPipe, ActionsColumnComponent, AdminModule, AdminRoutingModule, Alerts, AnimationState, AppEditor, AppEditorOptions, AppEntityEditor, AppForm, AppFormField, AppFormProvider, AppFormUtils, AppGestureConfig, AppGraphQLModule, AppHelpModal, AppInMemoryTable, AppInstallUpgradeCard, AppListForm, AppLoadingSpinner, AppMenuModule, AppNullForm, AppPropertiesForm, AppTabEditor, AppTabEditorOptions, AppTable, AppTableDataSourceOptions, AppTableUtils, AppValidatorService, AppendToInputDirective, ArrayFilterPipe, ArrayFirstPipe, ArrayIncludesPipe, ArrayLengthPipe, ArrayPluckPipe, AudioProvider, AuthForm, AuthGuardService, AuthModal, AutocompleteTestPage, AutofocusDirective, Base58, BaseEntityService, BaseGraphqlService, BaseGraphqlServiceOptions, BaseReferential, Beans, CORE_CONFIG_OPTIONS, CORE_TESTING_PAGES, CellValueChangeListener, ChipsTestPage, Color, ColorScale, ComponentDirtyGuard, ConfigService, Configuration, CoreModule, CoreTestingModule, CryptoService, DATE_ISO_PATTERN, DATE_UNIX_MS_TIMESTAMP, DATE_UNIX_TIMESTAMP, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_PLACEHOLDER_CHAR, DEFAULT_REQUIRED_COLUMNS, DateDiffDurationPipe, DateFormatPipe, DateFromNowPipe, DateTimeTestPage, DateUtils, Department, DepartmentToStringPipe, DragAndDropDirective, DurationPipe, ENTITIES_STORAGE_KEY_PREFIX, ENVIRONMENT, EmptyArrayPipe, EntitiesService, EntitiesStorage, EntitiesTableDataSource, Entity, EntityClass, EntityClasses, EntityFilter, EntityFilterUtils, EntityMetadataComponent, EntityStore, EntityUtils, Environment, ErrorCodes, EvenPipe, FileResponse, FileService, FileSizePipe, FilesUtils, FormArrayHelper, FormButtonsBarComponent, FormButtonsBarToken, FormErrorTranslatePipe, FormErrorTranslator, FormFieldValuesHolder, FormGetArrayPipe, FormGetControlPipe, FormGetPipe, Fragments, GraphqlService, HAMMER_PRESS_TIME, HAMMER_TAP_TIME, HighlightPipe, HomePage, Hotkeys, HotkeysDialogComponent, InMemoryEntitiesService, IsLoginAccountPipe, IsNilOrBlankPipe, IsNotNilOrBlankPipe, IsNotOnFieldModePipe, IsOnFieldModePipe, JobUtils, KEYBOARD_HIDE_DELAY_MS, LAT_LONG_DEFAULT_MAX_DECIMALS, LAT_LONG_PATTERNS, LatLongFormatPipe, LatLongTestPage, LatitudeFormatPipe, LocalSettingsService, LongitudeFormatPipe, MINIFY_ENTITY_FOR_LOCAL_STORAGE, MINIFY_ENTITY_FOR_POD, MapGetPipe, MapKeysPipe, MapValuesPipe, MatAutocompleteConfigHolder, MatAutocompleteField, MatBadgeIconDirective, MatBooleanField, MatChipsField, MatDate, MatDateShort, MatDateTime, MatDuration, MatLatLongField, MatNumpadComponent, MatNumpadContainerComponent, MatNumpadContent, MatPaginatorI18n, MatStepperI18n, MatSwipeField, MaterialTestingModule, MathAbsPipe, MenuComponent, MenuItems, MenuService, ModalToolbarComponent, NetworkService, NgInitDirective, NgVarDirective, NotEmptyArrayPipe, NumberFormatPipe, NumpadDirective, OddPipe, PRIORITIZED_AUTHORITIES, PUBKEY_REGEXP, Peer, Person, PersonFilter, PersonFragments, PersonService, PersonToStringPipe, PersonUtils, PersonValidatorService, PlatformService, ProgressBarService, ProgressInterceptor, PropertyGetPipe, RESERVED_END_COLUMNS, RESERVED_START_COLUMNS, Referential, ReferentialFilter, ReferentialRef, ReferentialUtils, ReferentialValidatorService, RegisterConfirmPage, SETTINGS_DISPLAY_COLUMNS, SETTINGS_FILTER, SETTINGS_PAGE_SIZE, SETTINGS_SORTED_COLUMN, SETTINGS_STORAGE_KEY, SETTINGS_TRANSIENT_PROPERTIES, SHARED_MATERIAL_TESTING_PAGES, SHARED_TESTING_PAGES, SPACE_PLACEHOLDER_CHAR, SelectPeerModal, SettingsPage, SharedAsyncValidators, SharedDirectivesModule, SharedFormArrayValidators, SharedFormGroupValidators, SharedHotkeysModule, SharedMatAutocompleteModule, SharedMatBadgeIconModule, SharedMatBooleanModule, SharedMatChipsModule, SharedMatDateTimeModule, SharedMatDurationModule, SharedMatLatLongModule, SharedMatNumpadModule, SharedMatSwipeModule, SharedMaterialModule, SharedModule, SharedPipesModule, SharedRoutingModule, SharedTestingModule, SharedTestsPage, SharedValidators, SocialModule, Software, StartableService, StatusById, StatusIds, StatusList, StrIncludesPipe, StrLengthPipe, SwipeTestPage, TableSelectColumnsComponent, TableTestPage, TableTestingModule, TextForm, TextPopover, TextPopoverTestingModule, TextPopoverTestingPage, ToStringPipe, Toasts, ToolbarComponent, ToolbarToken, TranslatablePipe, TranslateContextPipe, TranslateContextService, UploadFile, UploadFileComponent, UploadFilePopover, UploadFileTestingModule, UploadFileTestingPage, UserEvent, UserEventFilter, UserEventService, UserEventTypes, UserEventsTable, UserSettings, UsersPage, accountToString, adaptValueToControl, addValueInArray, arrayDistinct, arrayGroupBy, arraySize, asInputElement, canHaveFocus, capitalizeFirstLetter, chainPromises, changeCaseToUnderscore, clearValueInArray, copyEntity2Form, createPromiseEvent, createPromiseEventEmitter, departmentToString, departmentsToString, disableControls, emitPromiseEvent, entityToString, equals, equalsOrNil, fadeInAnimation, fadeInOutAnimation, filterFalse, filterNotNil, filterNumberInput, filterTrue, firstArrayValue, firstFalse, firstFalsePromise, firstNotNil, firstNotNilPromise, firstTrue, firstTruePromise, focusInput, focusNextInput, focusPreviousInput, formatLatitude, formatLongitude, fromDateISOString, fromScrollEndEvent, fromUnixMsTimestamp, fromUnixTimestamp, getCaretPosition, getColorContrast, getColorShade, getColorTint, getConnectionType, getControlFromPath, getFocusableInputElements, getFormErrors, getFormValueFromEntity, getProperty, getPropertyByPath, getPropertyByPathAsString, getRandomImage, hexToRgb, hexToRgbArray, isAndroid, isControlHasInput, isCordova, isDesktop, isEmptyArray, isIOS, isInputElement, isInstanceOf, isInt, isMobile, isNil, isNilOrBlank, isNilOrNaN, isNotEmptyArray, isNotNil, isNotNilOrBlank, isNotNilOrNaN, isNotNilString, isNumber, isNumberRange, isProgressEvent, isResponseEvent, isTouchUi, isWindow, joinProperties, joinPropertiesPath, logFormErrors, markAllAsTouched, markAsUntouched, markControlAsTouched, markFormGroupAsTouched, matchMedia, matchUpperCase, mergeLoadResult, mixHex, moveInputCaretToSeparator, noTrailingSlash, notNilOrDefault, nullIfUndefined, parseLatitudeOrLongitude, propertiesPathComparator, propertyComparator, propertyPathComparator, referentialToString, referentialsToString, remove, removeAll, removeDiacritics, removeDuplicatesFromArray, removeEnd, removeValueInArray, replaceAll, resetCalculatedValue, resizeArray, rgbArrayToHex, rgbToHex, round, scrollFactory, selectInputContent, selectInputRange, setCalculatedValue, setTabIndex, sleep, slideInOutAnimation, slideUpDownAnimation, sort, splitById, splitByProperty, startsWithUpperCase, suggestFromArray, suggestFromStringArray, tabindexComparator, testUserAgent, toBoolean, toDateISOString, toDuration, toFloat, toInt, toNotNil, toNumber, trimEmptyToNull, uncapitalizeFirstLetter, updateValueAndValidity, waitFor, waitForTrue, waitIdle, waitWhilePending, ɵ0$b as ɵ0, CustomReuseStrategy as ɵa, MatNumpadDomService as ɵb, isFocusableElement as ɵc, RegisterForm as ɵd, AccountValidatorService as ɵe, RegisterModal as ɵf, UserSettingsValidatorService as ɵg, LocalSettingsValidatorService as ɵh, AppIconComponent as ɵi,
|
|
26951
|
+
export { APP_ABOUT_DEVELOPERS, APP_ABOUT_PARTNERS, APP_CONFIG_OPTIONS, APP_FORM_ERROR_I18N_KEYS, APP_GRAPHQL_TYPE_POLICIES, APP_HOME_BUTTONS, APP_LOCALES, APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS, APP_LOCAL_STORAGE_TYPE_POLICIES, APP_MENU_ITEMS, APP_TESTING_PAGES, AboutModal, Account, AccountPage, AccountService, AccountToStringPipe, ActionsColumnComponent, AdminModule, AdminRoutingModule, Alerts, AnimationState, AppEditor, AppEditorOptions, AppEntityEditor, AppForm, AppFormField, AppFormProvider, AppFormUtils, AppGestureConfig, AppGraphQLModule, AppHelpModal, AppInMemoryTable, AppInstallUpgradeCard, AppListForm, AppLoadingSpinner, AppMenuModule, AppNullForm, AppPropertiesForm, AppTabEditor, AppTabEditorOptions, AppTable, AppTableDataSourceOptions, AppTableUtils, AppValidatorService, AppendToInputDirective, ArrayFilterPipe, ArrayFirstPipe, ArrayIncludesPipe, ArrayLengthPipe, ArrayPluckPipe, AudioProvider, AuthForm, AuthGuardService, AuthModal, AutocompleteTestPage, AutofocusDirective, Base58, BaseEntityService, BaseGraphqlService, BaseGraphqlServiceOptions, BaseReferential, Beans, CORE_CONFIG_OPTIONS, CORE_TESTING_PAGES, CellValueChangeListener, ChipsTestPage, Color, ColorScale, ComponentDirtyGuard, ConfigService, Configuration, CoreModule, CoreTestingModule, CryptoService, DATE_ISO_PATTERN, DATE_UNIX_MS_TIMESTAMP, DATE_UNIX_TIMESTAMP, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_PLACEHOLDER_CHAR, DEFAULT_REQUIRED_COLUMNS, DateDiffDurationPipe, DateFormatPipe, DateFromNowPipe, DateTimeTestPage, DateUtils, Department, DepartmentToStringPipe, DragAndDropDirective, DurationPipe, ENTITIES_STORAGE_KEY_PREFIX, ENVIRONMENT, EmptyArrayPipe, EntitiesService, EntitiesStorage, EntitiesTableDataSource, Entity, EntityClass, EntityClasses, EntityFilter, EntityFilterUtils, EntityMetadataComponent, EntityStore, EntityUtils, Environment, ErrorCodes, EvenPipe, FileResponse, FileService, FileSizePipe, FilesUtils, FormArrayHelper, FormButtonsBarComponent, FormButtonsBarToken, FormErrorTranslatePipe, FormErrorTranslator, FormFieldValuesHolder, FormGetArrayPipe, FormGetControlPipe, FormGetPipe, Fragments, GraphqlService, HAMMER_PRESS_TIME, HAMMER_TAP_TIME, HighlightPipe, HomePage, Hotkeys, HotkeysDialogComponent, InMemoryEntitiesService, IsLoginAccountPipe, IsNilOrBlankPipe, IsNotNilOrBlankPipe, IsNotOnFieldModePipe, IsOnFieldModePipe, JobUtils, KEYBOARD_HIDE_DELAY_MS, LAT_LONG_DEFAULT_MAX_DECIMALS, LAT_LONG_PATTERNS, LatLongFormatPipe, LatLongTestPage, LatitudeFormatPipe, LocalSettingsService, LongitudeFormatPipe, MINIFY_ENTITY_FOR_LOCAL_STORAGE, MINIFY_ENTITY_FOR_POD, MapGetPipe, MapKeysPipe, MapValuesPipe, MatAutocompleteConfigHolder, MatAutocompleteField, MatBadgeIconDirective, MatBooleanField, MatChipsField, MatDate, MatDateShort, MatDateTime, MatDuration, MatLatLongField, MatNumpadComponent, MatNumpadContainerComponent, MatNumpadContent, MatPaginatorI18n, MatStepperI18n, MatSwipeField, MaterialTestingModule, MathAbsPipe, MenuComponent, MenuItems, MenuService, ModalToolbarComponent, NetworkService, NgInitDirective, NgVarDirective, NotEmptyArrayPipe, NumberFormatPipe, NumpadDirective, OddPipe, PRIORITIZED_AUTHORITIES, PUBKEY_REGEXP, Peer, Person, PersonFilter, PersonFragments, PersonService, PersonToStringPipe, PersonUtils, PersonValidatorService, PlatformService, ProgressBarService, ProgressInterceptor, PropertyGetPipe, RESERVED_END_COLUMNS, RESERVED_START_COLUMNS, Referential, ReferentialFilter, ReferentialRef, ReferentialUtils, ReferentialValidatorService, RegisterConfirmPage, SETTINGS_DISPLAY_COLUMNS, SETTINGS_FILTER, SETTINGS_PAGE_SIZE, SETTINGS_SORTED_COLUMN, SETTINGS_STORAGE_KEY, SETTINGS_TRANSIENT_PROPERTIES, SHARED_MATERIAL_TESTING_PAGES, SHARED_TESTING_PAGES, SPACE_PLACEHOLDER_CHAR, SelectPeerModal, SettingsPage, SharedAsyncValidators, SharedDirectivesModule, SharedFormArrayValidators, SharedFormGroupValidators, SharedHotkeysModule, SharedMatAutocompleteModule, SharedMatBadgeIconModule, SharedMatBooleanModule, SharedMatChipsModule, SharedMatDateTimeModule, SharedMatDurationModule, SharedMatLatLongModule, SharedMatNumpadModule, SharedMatSwipeModule, SharedMaterialModule, SharedModule, SharedPipesModule, SharedRoutingModule, SharedTestingModule, SharedTestsPage, SharedValidators, SocialModule, Software, StartableService, StatusById, StatusIds, StatusList, StrIncludesPipe, StrLengthPipe, SwipeTestPage, TableSelectColumnsComponent, TableTestPage, TableTestingModule, TextForm, TextPopover, TextPopoverTestingModule, TextPopoverTestingPage, ToStringPipe, Toasts, ToolbarComponent, ToolbarToken, TranslatablePipe, TranslateContextPipe, TranslateContextService, UploadFile, UploadFileComponent, UploadFilePopover, UploadFileTestingModule, UploadFileTestingPage, UserEvent, UserEventFilter, UserEventService, UserEventTypes, UserEventsTable, UserSettings, UsersPage, accountToString, adaptValueToControl, addValueInArray, arrayDistinct, arrayGroupBy, arraySize, asInputElement, canHaveFocus, capitalizeFirstLetter, chainPromises, changeCaseToUnderscore, clearValueInArray, copyEntity2Form, createPromiseEvent, createPromiseEventEmitter, departmentToString, departmentsToString, disableControls, emitPromiseEvent, entityToString, equals, equalsOrNil, fadeInAnimation, fadeInOutAnimation, filterFalse, filterNotNil, filterNumberInput, filterTrue, firstArrayValue, firstFalse, firstFalsePromise, firstNotNil, firstNotNilPromise, firstTrue, firstTruePromise, focusInput, focusNextInput, focusPreviousInput, formatLatitude, formatLongitude, fromDateISOString, fromScrollEndEvent, fromUnixMsTimestamp, fromUnixTimestamp, getCaretPosition, getColorContrast, getColorShade, getColorTint, getConnectionType, getControlFromPath, getFocusableInputElements, getFormErrors, getFormValueFromEntity, getProperty, getPropertyByPath, getPropertyByPathAsString, getRandomImage, hexToRgb, hexToRgbArray, isAndroid, isControlHasInput, isCordova, isDesktop, isEmptyArray, isIOS, isInputElement, isInstanceOf, isInt, isMobile, isNil, isNilOrBlank, isNilOrNaN, isNotEmptyArray, isNotNil, isNotNilOrBlank, isNotNilOrNaN, isNotNilString, isNumber, isNumberRange, isProgressEvent, isResponseEvent, isTouchUi, isWindow, joinProperties, joinPropertiesPath, logFormErrors, markAllAsTouched, markAsUntouched, markControlAsTouched, markFormGroupAsTouched, matchMedia, matchUpperCase, mergeLoadResult, mixHex, moveInputCaretToSeparator, noTrailingSlash, notNilOrDefault, nullIfUndefined, parseLatitudeOrLongitude, propertiesPathComparator, propertyComparator, propertyPathComparator, referentialToString, referentialsToString, remove, removeAll, removeDiacritics, removeDuplicatesFromArray, removeEnd, removeValueInArray, replaceAll, resetCalculatedValue, resizeArray, rgbArrayToHex, rgbToHex, round, scrollFactory, selectInputContent, selectInputRange, setCalculatedValue, setTabIndex, sleep, slideInOutAnimation, slideUpDownAnimation, sort, splitById, splitByProperty, startsWithUpperCase, suggestFromArray, suggestFromStringArray, tabindexComparator, testUserAgent, toBoolean, toDateISOString, toDuration, toFloat, toInt, toNotNil, toNumber, trimEmptyToNull, uncapitalizeFirstLetter, updateValueAndValidity, waitFor, waitForTrue, waitIdle, waitWhilePending, ɵ0$b as ɵ0, CustomReuseStrategy as ɵa, MatNumpadDomService as ɵb, isFocusableElement as ɵc, RegisterForm as ɵd, AccountValidatorService as ɵe, RegisterModal as ɵf, UserSettingsValidatorService as ɵg, LocalSettingsValidatorService as ɵh, AppIconComponent as ɵi, DateTestPage as ɵj, NumpadTestPage as ɵk, MatBadgeIconTestPage as ɵl, ToastTestingModule as ɵm, ToastTestingPage as ɵn };
|
|
26797
26952
|
//# sourceMappingURL=sumaris-net.ngx-components.js.map
|