@sumaris-net/ngx-components 1.14.3 → 1.15.2
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 +358 -195
- 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 +10 -0
- package/esm2015/src/app/shared/dates.js +6 -5
- package/esm2015/src/app/shared/material/datetime/material.date.js +133 -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 +109 -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 +341 -191
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/dates.d.ts +2 -1
- package/src/app/shared/material/datetime/material.date.d.ts +20 -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 +29 -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
|
@@ -1733,7 +1733,7 @@ DateFormatPipe.ctorParameters = () => [
|
|
|
1733
1733
|
{ type: TranslateService }
|
|
1734
1734
|
];
|
|
1735
1735
|
|
|
1736
|
-
const moment$
|
|
1736
|
+
const moment$7 = momentImported;
|
|
1737
1737
|
class DateDiffDurationPipe {
|
|
1738
1738
|
constructor(dateAdapter, translate) {
|
|
1739
1739
|
this.dateAdapter = dateAdapter;
|
|
@@ -1749,10 +1749,10 @@ class DateDiffDurationPipe {
|
|
|
1749
1749
|
return this.format(startDate, endDate);
|
|
1750
1750
|
}
|
|
1751
1751
|
format(startDate, endDate) {
|
|
1752
|
-
const duration = moment$
|
|
1752
|
+
const duration = moment$7.duration(endDate.diff(startDate));
|
|
1753
1753
|
if (duration.asMinutes() < 0)
|
|
1754
1754
|
return '';
|
|
1755
|
-
const timeDuration = moment$
|
|
1755
|
+
const timeDuration = moment$7(0)
|
|
1756
1756
|
.hour(duration.hours())
|
|
1757
1757
|
.minute(duration.minutes());
|
|
1758
1758
|
const days = Math.floor(duration.asDays());
|
|
@@ -2196,7 +2196,7 @@ FileSizePipe.decorators = [
|
|
|
2196
2196
|
{ type: Pipe, args: [{ name: 'fileSize' },] }
|
|
2197
2197
|
];
|
|
2198
2198
|
|
|
2199
|
-
const moment$
|
|
2199
|
+
const moment$6 = momentImported;
|
|
2200
2200
|
const tz = momentTZImported;
|
|
2201
2201
|
const DATE_UNIX_TIMESTAMP = 'X';
|
|
2202
2202
|
const DATE_UNIX_MS_TIMESTAMP = 'x';
|
|
@@ -2225,18 +2225,19 @@ class DateUtils {
|
|
|
2225
2225
|
* Same implementation as the Java class Dates.resetTime() (see any SUMARiS like Pod)
|
|
2226
2226
|
* @param value
|
|
2227
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.
|
|
2228
2229
|
*/
|
|
2229
|
-
static resetTime(value, timezone) {
|
|
2230
|
+
static resetTime(value, timezone, keepLocalTime) {
|
|
2230
2231
|
if (!value)
|
|
2231
2232
|
return undefined;
|
|
2232
2233
|
const date = fromDateISOString(value);
|
|
2233
2234
|
// No timezone
|
|
2234
2235
|
if (!timezone) {
|
|
2235
|
-
return
|
|
2236
|
+
return date.clone().startOf('day');
|
|
2236
2237
|
}
|
|
2237
2238
|
// Use timezone
|
|
2238
|
-
|
|
2239
|
-
.tz(timezone,
|
|
2239
|
+
return date.clone() // clone the original date
|
|
2240
|
+
.tz(timezone, keepLocalTime)
|
|
2240
2241
|
.startOf('day');
|
|
2241
2242
|
}
|
|
2242
2243
|
}
|
|
@@ -2258,32 +2259,32 @@ function fromDateISOString(value) {
|
|
|
2258
2259
|
if (!value || isMoment(value))
|
|
2259
2260
|
return value;
|
|
2260
2261
|
// Parse the input value, as a ISO date time
|
|
2261
|
-
const date = moment$
|
|
2262
|
+
const date = moment$6(value, DATE_ISO_PATTERN);
|
|
2262
2263
|
if (date.isValid())
|
|
2263
2264
|
return date;
|
|
2264
2265
|
// Not valid: trying to convert from unix timestamp
|
|
2265
2266
|
if (typeof value === 'string') {
|
|
2266
2267
|
console.warn('Wrong date format - Trying to convert from local time: ' + value);
|
|
2267
2268
|
if (value.length === 10) {
|
|
2268
|
-
return moment$
|
|
2269
|
+
return moment$6(value, DATE_UNIX_TIMESTAMP);
|
|
2269
2270
|
}
|
|
2270
2271
|
else if (value.length === 13) {
|
|
2271
|
-
return moment$
|
|
2272
|
+
return moment$6(value, DATE_UNIX_MS_TIMESTAMP);
|
|
2272
2273
|
}
|
|
2273
2274
|
}
|
|
2274
2275
|
console.warn('Unable to parse date: ' + value);
|
|
2275
2276
|
return undefined;
|
|
2276
2277
|
}
|
|
2277
2278
|
function fromUnixTimestamp(timeInSec) {
|
|
2278
|
-
return moment$
|
|
2279
|
+
return moment$6(timeInSec, DATE_UNIX_TIMESTAMP);
|
|
2279
2280
|
}
|
|
2280
2281
|
function fromUnixMsTimestamp(timeInMs) {
|
|
2281
|
-
return moment$
|
|
2282
|
+
return moment$6(timeInMs, DATE_UNIX_MS_TIMESTAMP);
|
|
2282
2283
|
}
|
|
2283
2284
|
function toDuration(value, unit) {
|
|
2284
2285
|
if (!value)
|
|
2285
2286
|
return undefined;
|
|
2286
|
-
const duration = moment$
|
|
2287
|
+
const duration = moment$6.duration(value, unit);
|
|
2287
2288
|
// fix 990+ ms
|
|
2288
2289
|
if (duration.milliseconds() >= 990) {
|
|
2289
2290
|
duration.add(1000 - duration.milliseconds(), 'ms');
|
|
@@ -2706,7 +2707,7 @@ NgInitDirective.propDecorators = {
|
|
|
2706
2707
|
ngInit: [{ type: Output }]
|
|
2707
2708
|
};
|
|
2708
2709
|
|
|
2709
|
-
const moment$
|
|
2710
|
+
const moment$5 = momentImported;
|
|
2710
2711
|
// @dynamic
|
|
2711
2712
|
class SharedValidators {
|
|
2712
2713
|
static getDoubleRegexp(maxDecimals) {
|
|
@@ -2721,14 +2722,6 @@ class SharedValidators {
|
|
|
2721
2722
|
this._REGEXP_CACHE.DOUBLE_BY_MAX_DECIMALS[maxDecimals] = new RegExp(`^[-]?[0-9]+([.,][0-9]{1,${maxDecimals}})?$`);
|
|
2722
2723
|
return this._REGEXP_CACHE.DOUBLE_BY_MAX_DECIMALS[maxDecimals];
|
|
2723
2724
|
}
|
|
2724
|
-
static validDate(control) {
|
|
2725
|
-
const value = control.value;
|
|
2726
|
-
const date = !value || moment$4.isMoment(value) ? value : moment$4(control.value, DATE_ISO_PATTERN);
|
|
2727
|
-
if (date && (!date.isValid() || date.year() < 1970)) {
|
|
2728
|
-
return { validDate: true };
|
|
2729
|
-
}
|
|
2730
|
-
return null;
|
|
2731
|
-
}
|
|
2732
2725
|
static latitude(control) {
|
|
2733
2726
|
const value = control.value;
|
|
2734
2727
|
if (isNotNil(value) && (value < -90 || value > 90)) {
|
|
@@ -2793,6 +2786,14 @@ class SharedValidators {
|
|
|
2793
2786
|
return null;
|
|
2794
2787
|
};
|
|
2795
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
|
+
}
|
|
2796
2797
|
static dateIsAfter(previousValue, errorParam, granularity) {
|
|
2797
2798
|
return (control) => {
|
|
2798
2799
|
const value = fromDateISOString(control.value);
|
|
@@ -2803,6 +2804,16 @@ class SharedValidators {
|
|
|
2803
2804
|
return null;
|
|
2804
2805
|
};
|
|
2805
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
|
+
}
|
|
2806
2817
|
static dateRangeEnd(startDateFieldName, msg) {
|
|
2807
2818
|
const errorCode = msg ? 'msg' : 'dateRange';
|
|
2808
2819
|
const error = msg ? { msg } : { dateRange: true };
|
|
@@ -2897,6 +2908,7 @@ SharedValidators.I18N_ERROR_KEYS = {
|
|
|
2897
2908
|
pubkey: 'ERROR.FIELD_NOT_VALID_PUBKEY',
|
|
2898
2909
|
validDate: 'ERROR.FIELD_NOT_VALID_DATE',
|
|
2899
2910
|
dateIsAfter: 'ERROR.FIELD_NOT_VALID_DATE_AFTER',
|
|
2911
|
+
dateIsBefore: 'ERROR.FIELD_NOT_VALID_DATE_BEFORE',
|
|
2900
2912
|
dateRange: 'ERROR.FIELD_NOT_VALID_DATE_RANGE',
|
|
2901
2913
|
dateMinDuration: 'ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION',
|
|
2902
2914
|
dateMaxDuration: 'ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION',
|
|
@@ -4737,6 +4749,7 @@ const noop$6 = () => { };
|
|
|
4737
4749
|
const ɵ0$9 = noop$6;
|
|
4738
4750
|
class MatDate {
|
|
4739
4751
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
4752
|
+
this.platform = platform;
|
|
4740
4753
|
this.dateAdapter = dateAdapter;
|
|
4741
4754
|
this.translate = translate;
|
|
4742
4755
|
this.formBuilder = formBuilder;
|
|
@@ -4746,21 +4759,26 @@ class MatDate {
|
|
|
4746
4759
|
this._onChangeCallback = noop$6;
|
|
4747
4760
|
this._onTouchedCallback = noop$6;
|
|
4748
4761
|
this._subscription = new Subscription();
|
|
4749
|
-
this.
|
|
4750
|
-
this.
|
|
4762
|
+
this._writing = true;
|
|
4763
|
+
this._disabling = false;
|
|
4764
|
+
this._readonly = false;
|
|
4751
4765
|
this.dayMask = DAY_MASK$2;
|
|
4752
|
-
this.disabled = false;
|
|
4753
4766
|
this.floatLabel = 'auto';
|
|
4754
|
-
this.readonly = false;
|
|
4755
4767
|
this.compact = false;
|
|
4756
4768
|
this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
|
|
4757
4769
|
this.autofocus = false;
|
|
4770
|
+
this.startDate = null;
|
|
4758
4771
|
this.clearable = false;
|
|
4759
|
-
|
|
4760
|
-
this.mobile = platform.is('mobile');
|
|
4761
|
-
this.keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
|
|
4772
|
+
this.timezone = null;
|
|
4762
4773
|
this.locale = (translate.currentLang || translate.defaultLang).substr(0, 2);
|
|
4763
4774
|
}
|
|
4775
|
+
set readonly(value) {
|
|
4776
|
+
this._readonly = value;
|
|
4777
|
+
this.markForCheck();
|
|
4778
|
+
}
|
|
4779
|
+
get readonly() {
|
|
4780
|
+
return this._readonly;
|
|
4781
|
+
}
|
|
4764
4782
|
set tabindex(value) {
|
|
4765
4783
|
if (this._tabindex !== value) {
|
|
4766
4784
|
this._tabindex = value;
|
|
@@ -4771,67 +4789,68 @@ class MatDate {
|
|
|
4771
4789
|
return this._tabindex;
|
|
4772
4790
|
}
|
|
4773
4791
|
get value() {
|
|
4774
|
-
return
|
|
4792
|
+
return this.formControl.value;
|
|
4775
4793
|
}
|
|
4776
4794
|
ngOnInit() {
|
|
4795
|
+
this.mobile = isNil(this.mobile) ? this.platform.is('mobile') : this.mobile;
|
|
4796
|
+
this._keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
|
|
4777
4797
|
this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
|
|
4778
4798
|
if (!this.formControl)
|
|
4779
4799
|
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-field>.');
|
|
4780
4800
|
this.required = toBoolean(this.required, this.formControl.validator === Validators.required);
|
|
4781
|
-
//
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4801
|
+
// Add 'validDate' validator (when existing validator are null or required, to be sure to keep it)
|
|
4802
|
+
if (!this.formControl.validator || this.formControl.validator === Validators.required) {
|
|
4803
|
+
this.formControl.setValidators(this.required ? [Validators.required, SharedValidators.validDate] : SharedValidators.validDate);
|
|
4804
|
+
}
|
|
4805
|
+
else {
|
|
4806
|
+
this.formControl.setValidators(this.required ? [this.formControl.validator, Validators.required, SharedValidators.validDate] :
|
|
4807
|
+
[this.formControl.validator, SharedValidators.validDate]);
|
|
4808
|
+
}
|
|
4809
|
+
this.dayControl = this.formBuilder.control(null, () => this.formControl.errors);
|
|
4786
4810
|
// Get patterns to display date
|
|
4787
|
-
this.updatePattern(this.translate.instant('COMMON.DATE_PATTERN'));
|
|
4788
4811
|
this._subscription.add(this.translate.get('COMMON.DATE_PATTERN')
|
|
4789
4812
|
.subscribe((pattern) => this.updatePattern(pattern)));
|
|
4790
4813
|
this._subscription.add(this.dayControl.valueChanges
|
|
4791
4814
|
.subscribe((value) => this.onFormChange(value)));
|
|
4792
|
-
// Listen status changes outside the component
|
|
4815
|
+
// Listen status changes (when done outside the component - e.g. when setErrors() is calling on the formControl)
|
|
4793
4816
|
this._subscription.add(this.formControl.statusChanges
|
|
4794
|
-
.pipe(filter(() => !this.readonly && !this.
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
}
|
|
4799
|
-
else if (status === 'VALID') {
|
|
4800
|
-
$error.next(null);
|
|
4801
|
-
}
|
|
4802
|
-
this.dayControl.updateValueAndValidity({ onlySelf: true, emitEvent: false });
|
|
4817
|
+
.pipe(filter((_) => !this.readonly && !this._writing && !this._disabling) // Skip
|
|
4818
|
+
)
|
|
4819
|
+
.subscribe(() => {
|
|
4820
|
+
this.dayControl.updateValueAndValidity({ emitEvent: false });
|
|
4803
4821
|
this.markForCheck();
|
|
4804
4822
|
}));
|
|
4805
4823
|
this.updateTabIndex();
|
|
4806
|
-
this.
|
|
4824
|
+
this._writing = false;
|
|
4807
4825
|
}
|
|
4808
4826
|
ngOnDestroy() {
|
|
4809
4827
|
this._subscription.unsubscribe();
|
|
4810
4828
|
}
|
|
4811
|
-
writeValue(
|
|
4812
|
-
if (this.
|
|
4813
|
-
return;
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4829
|
+
writeValue(valueStr) {
|
|
4830
|
+
if (this._writing)
|
|
4831
|
+
return; // Skip
|
|
4832
|
+
this._writing = true;
|
|
4833
|
+
// DEBUG
|
|
4834
|
+
// console.debug("[mat-date] writeValue() with:", valueStr);
|
|
4835
|
+
const value = fromDateISOString(valueStr);
|
|
4836
|
+
if (!value || !value.isValid()) {
|
|
4817
4837
|
this.dayControl.patchValue(null, { emitEvent: false });
|
|
4818
|
-
this._value = undefined;
|
|
4819
4838
|
if (this.formControl.value) {
|
|
4820
4839
|
this.formControl.patchValue(null, { emitEvent: false });
|
|
4821
4840
|
this._onChangeCallback(null);
|
|
4822
4841
|
}
|
|
4823
|
-
this.writing = false;
|
|
4824
|
-
this.markForCheck();
|
|
4825
|
-
return;
|
|
4826
4842
|
}
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4843
|
+
else {
|
|
4844
|
+
// Format day
|
|
4845
|
+
// Move to the expected TZ (keeping local hour - e.g. midnight)
|
|
4846
|
+
let day = value && this.timezone ? value.clone().tz(this.timezone) : value.clone();
|
|
4847
|
+
// Reset hour
|
|
4848
|
+
day = day.startOf('day');
|
|
4849
|
+
const dayStr = this.dateAdapter.format(day, this.dayPattern);
|
|
4850
|
+
// Update control
|
|
4851
|
+
this.dayControl.patchValue(dayStr, { emitEvent: false });
|
|
4830
4852
|
}
|
|
4831
|
-
this.
|
|
4832
|
-
// Set form value
|
|
4833
|
-
this.dayControl.patchValue(this.dateAdapter.format(this._value.clone().startOf('day'), this.dayPattern), { emitEvent: false });
|
|
4834
|
-
this.writing = false;
|
|
4853
|
+
this._writing = false;
|
|
4835
4854
|
this.markForCheck();
|
|
4836
4855
|
}
|
|
4837
4856
|
registerOnChange(fn) {
|
|
@@ -4841,37 +4860,39 @@ class MatDate {
|
|
|
4841
4860
|
this._onTouchedCallback = fn;
|
|
4842
4861
|
}
|
|
4843
4862
|
setDisabledState(isDisabled) {
|
|
4844
|
-
if (this.
|
|
4863
|
+
if (this._disabling)
|
|
4845
4864
|
return;
|
|
4846
|
-
this.
|
|
4847
|
-
this.disabled = isDisabled;
|
|
4865
|
+
this._disabling = true;
|
|
4848
4866
|
if (isDisabled) {
|
|
4849
|
-
this.dayControl.disable({
|
|
4867
|
+
this.dayControl.disable({ emitEvent: false });
|
|
4850
4868
|
}
|
|
4851
4869
|
else {
|
|
4852
|
-
this.dayControl.enable({
|
|
4870
|
+
this.dayControl.enable({ emitEvent: false });
|
|
4853
4871
|
}
|
|
4854
|
-
this.
|
|
4872
|
+
this._disabling = false;
|
|
4855
4873
|
this.markForCheck();
|
|
4856
4874
|
}
|
|
4857
4875
|
onDatePickerChange(event) {
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
let
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
this.
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4876
|
+
// Make sure event is valid
|
|
4877
|
+
if (!event || (event.value !== null && !isMoment(event.value))) {
|
|
4878
|
+
console.warn('Invalid MatDatepicker event. Skipping', event);
|
|
4879
|
+
return; // Skip
|
|
4880
|
+
}
|
|
4881
|
+
let dateStr = null;
|
|
4882
|
+
if (event.value) {
|
|
4883
|
+
let date = event.value
|
|
4884
|
+
.locale(this.locale) // set as time as locale time
|
|
4885
|
+
.minute(0).seconds(0).millisecond(0) // Reset hour
|
|
4886
|
+
.utc(true);
|
|
4887
|
+
dateStr = this.dateAdapter.format(date, this.dayPattern) || null;
|
|
4888
|
+
}
|
|
4889
|
+
if (this.dayControl.value !== dateStr) {
|
|
4890
|
+
// DEBUG
|
|
4891
|
+
console.debug("[mat-date] onDatePickerChange() new value:", dateStr);
|
|
4892
|
+
this.dayControl.setValue(dateStr, {
|
|
4893
|
+
emitEvent: true // Will call onFormChange
|
|
4894
|
+
});
|
|
4895
|
+
}
|
|
4875
4896
|
}
|
|
4876
4897
|
openDatePickerIfMobile(event, datePicker) {
|
|
4877
4898
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -4912,6 +4933,13 @@ class MatDate {
|
|
|
4912
4933
|
}
|
|
4913
4934
|
});
|
|
4914
4935
|
}
|
|
4936
|
+
clear() {
|
|
4937
|
+
this.dayControl.patchValue(null, { emitEvent: false });
|
|
4938
|
+
this.formControl.setValue(null, { emitEvent: false });
|
|
4939
|
+
this._onChangeCallback(null);
|
|
4940
|
+
this.markAsTouched();
|
|
4941
|
+
this.markAsDirty();
|
|
4942
|
+
}
|
|
4915
4943
|
/* -- private method -- */
|
|
4916
4944
|
updatePattern(pattern) {
|
|
4917
4945
|
pattern = pattern !== 'COMMON.DATE_PATTERN' ? pattern : 'L';
|
|
@@ -4921,36 +4949,30 @@ class MatDate {
|
|
|
4921
4949
|
this.markForCheck();
|
|
4922
4950
|
}
|
|
4923
4951
|
}
|
|
4924
|
-
onFormChange(dayValue) {
|
|
4925
|
-
if (this.writing)
|
|
4926
|
-
return; // Skip if call by self
|
|
4927
|
-
this.writing = true;
|
|
4928
|
-
// Make to remove placeholder chars
|
|
4929
|
-
while (dayValue && dayValue.indexOf(this.placeholderChar) !== -1) {
|
|
4930
|
-
dayValue = dayValue.replace(this.placeholderChar, '');
|
|
4931
|
-
}
|
|
4932
|
-
let date;
|
|
4933
|
-
// Parse day string
|
|
4934
|
-
date = dayValue && this.dateAdapter.parse(dayValue, this.dayPattern) || null;
|
|
4935
|
-
// Reset time
|
|
4936
|
-
date = date && date.utc(true).hour(0).minute(0).seconds(0).millisecond(0);
|
|
4937
|
-
// update date picker
|
|
4938
|
-
this._value = date && this.dateAdapter.parse(date.clone(), DATE_ISO_PATTERN);
|
|
4939
|
-
// Get the model value
|
|
4940
|
-
const dateStr = date && date.isValid() && this.dateAdapter.format(date, DATE_ISO_PATTERN).replace('+00:00', 'Z') || date;
|
|
4941
|
-
//console.debug("[mat-date-time] Setting date: ", dateStr);
|
|
4942
|
-
this.formControl.patchValue(dateStr, { emitEvent: false });
|
|
4943
|
-
//this.formControl.updateValueAndValidity();
|
|
4944
|
-
this.writing = false;
|
|
4945
|
-
this.markForCheck();
|
|
4946
|
-
this._onChangeCallback(dateStr);
|
|
4947
|
-
}
|
|
4948
4952
|
checkIfTouched() {
|
|
4949
4953
|
if (this.dayControl.touched) {
|
|
4950
|
-
this.markForCheck();
|
|
4951
4954
|
this._onTouchedCallback();
|
|
4955
|
+
this.markForCheck();
|
|
4952
4956
|
}
|
|
4953
4957
|
}
|
|
4958
|
+
onFormChange(dayStr) {
|
|
4959
|
+
if (this._writing)
|
|
4960
|
+
return; // Skip if call by self
|
|
4961
|
+
this._writing = true;
|
|
4962
|
+
// Make to remove placeholder chars
|
|
4963
|
+
while (dayStr && dayStr.indexOf(this.placeholderChar) !== -1) {
|
|
4964
|
+
dayStr = dayStr.replace(this.placeholderChar, '');
|
|
4965
|
+
}
|
|
4966
|
+
// Parse day
|
|
4967
|
+
let date = dayStr && this.dateAdapter.parse(dayStr, this.dayPattern);
|
|
4968
|
+
// Move to the expected TZ (keeping local hour - e.g. midnight)
|
|
4969
|
+
date = date && (this.timezone ? date.tz(this.timezone, true) : date);
|
|
4970
|
+
date = date && date.startOf('day') // Reset hrou
|
|
4971
|
+
.utc(); // Convert local date into utc (avoid TZ offset to be in the final string)
|
|
4972
|
+
// Set model value
|
|
4973
|
+
this.emitChange(date);
|
|
4974
|
+
this._writing = false;
|
|
4975
|
+
}
|
|
4954
4976
|
waitKeyboardHide(waitKeyboardDelay) {
|
|
4955
4977
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4956
4978
|
if (!this.keyboard || !this.keyboard.isVisible)
|
|
@@ -4960,11 +4982,23 @@ class MatDate {
|
|
|
4960
4982
|
// Wait hide occur
|
|
4961
4983
|
yield this.keyboard.onKeyboardHide().pipe(first()).toPromise();
|
|
4962
4984
|
// Wait an additional delay if need (depending on the OS)
|
|
4963
|
-
if (this.
|
|
4964
|
-
yield sleep(this.
|
|
4985
|
+
if (this._keyboardHideDelay > 0 && waitKeyboardDelay) {
|
|
4986
|
+
yield sleep(this._keyboardHideDelay);
|
|
4965
4987
|
}
|
|
4966
4988
|
});
|
|
4967
4989
|
}
|
|
4990
|
+
emitChange(value) {
|
|
4991
|
+
// Get the model value
|
|
4992
|
+
const dateStr = toDateISOString(value) || null;
|
|
4993
|
+
if (this.formControl.value !== dateStr) {
|
|
4994
|
+
// DEBUG
|
|
4995
|
+
//console.debug('[matèdate-time] Emit new value: ' + dateStr);
|
|
4996
|
+
// Changes comes from inside function: use the callback
|
|
4997
|
+
this._onChangeCallback(dateStr);
|
|
4998
|
+
// Check if need to update controls
|
|
4999
|
+
this.checkIfTouched();
|
|
5000
|
+
}
|
|
5001
|
+
}
|
|
4968
5002
|
updateTabIndex() {
|
|
4969
5003
|
if (isNil(this._tabindex) || this._tabindex === -1)
|
|
4970
5004
|
return; // skip
|
|
@@ -4976,6 +5010,14 @@ class MatDate {
|
|
|
4976
5010
|
this.markForCheck();
|
|
4977
5011
|
});
|
|
4978
5012
|
}
|
|
5013
|
+
markAsTouched(opts) {
|
|
5014
|
+
this.dayControl.markAsTouched(opts);
|
|
5015
|
+
this._onTouchedCallback();
|
|
5016
|
+
this.markForCheck();
|
|
5017
|
+
}
|
|
5018
|
+
markAsDirty(opts) {
|
|
5019
|
+
this.formControl.markAsDirty(opts);
|
|
5020
|
+
}
|
|
4979
5021
|
markForCheck() {
|
|
4980
5022
|
this.cd.markForCheck();
|
|
4981
5023
|
}
|
|
@@ -4983,7 +5025,7 @@ class MatDate {
|
|
|
4983
5025
|
MatDate.decorators = [
|
|
4984
5026
|
{ type: Component, args: [{
|
|
4985
5027
|
selector: 'mat-date-field',
|
|
4986
|
-
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly else writable\">\n <input matInput hidden type=\"text\"
|
|
5028
|
+
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",
|
|
4987
5029
|
providers: [
|
|
4988
5030
|
DEFAULT_VALUE_ACCESSOR$5,
|
|
4989
5031
|
],
|
|
@@ -5001,19 +5043,20 @@ MatDate.ctorParameters = () => [
|
|
|
5001
5043
|
{ type: FormGroupDirective, decorators: [{ type: Optional }] }
|
|
5002
5044
|
];
|
|
5003
5045
|
MatDate.propDecorators = {
|
|
5004
|
-
disabled: [{ type: Input }],
|
|
5005
5046
|
formControl: [{ type: Input }],
|
|
5006
5047
|
formControlName: [{ type: Input }],
|
|
5007
5048
|
placeholder: [{ type: Input }],
|
|
5008
5049
|
floatLabel: [{ type: Input }],
|
|
5009
|
-
readonly: [{ type: Input }],
|
|
5010
5050
|
required: [{ type: Input }],
|
|
5051
|
+
mobile: [{ type: Input }],
|
|
5011
5052
|
compact: [{ type: Input }],
|
|
5012
5053
|
placeholderChar: [{ type: Input }],
|
|
5013
5054
|
autofocus: [{ type: Input }],
|
|
5014
|
-
tabindex: [{ type: Input }],
|
|
5015
5055
|
startDate: [{ type: Input }],
|
|
5016
5056
|
clearable: [{ type: Input }],
|
|
5057
|
+
timezone: [{ type: Input }],
|
|
5058
|
+
readonly: [{ type: Input }],
|
|
5059
|
+
tabindex: [{ type: Input }],
|
|
5017
5060
|
datePicker: [{ type: ViewChild, args: ['datePicker',] }],
|
|
5018
5061
|
matInputs: [{ type: ViewChildren, args: ['matInput',] }]
|
|
5019
5062
|
};
|
|
@@ -5026,8 +5069,7 @@ const DEFAULT_VALUE_ACCESSOR$4 = {
|
|
|
5026
5069
|
const DAY_MASK$1 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
5027
5070
|
const HOUR_REGEXP = /^[012][0-9][:][012345][0-9]$/;
|
|
5028
5071
|
const HOUR_MASK$1 = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
5029
|
-
const noop$5 = () => {
|
|
5030
|
-
};
|
|
5072
|
+
const noop$5 = () => { };
|
|
5031
5073
|
const ɵ0$8 = noop$5;
|
|
5032
5074
|
class MatDateTime {
|
|
5033
5075
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
@@ -5041,8 +5083,8 @@ class MatDateTime {
|
|
|
5041
5083
|
this._onChangeCallback = noop$5;
|
|
5042
5084
|
this._onTouchedCallback = noop$5;
|
|
5043
5085
|
this._subscription = new Subscription();
|
|
5044
|
-
this.
|
|
5045
|
-
this.
|
|
5086
|
+
this._writing = true;
|
|
5087
|
+
this._disabling = false;
|
|
5046
5088
|
this._readonly = false;
|
|
5047
5089
|
this.dayMask = DAY_MASK$1;
|
|
5048
5090
|
this.hourMask = HOUR_MASK$1;
|
|
@@ -5075,7 +5117,7 @@ class MatDateTime {
|
|
|
5075
5117
|
}
|
|
5076
5118
|
ngOnInit() {
|
|
5077
5119
|
this.mobile = isNil(this.mobile) ? this.platform.is('mobile') : this.mobile;
|
|
5078
|
-
this.
|
|
5120
|
+
this._keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
|
|
5079
5121
|
this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
|
|
5080
5122
|
if (!this.formControl)
|
|
5081
5123
|
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-time-field>.');
|
|
@@ -5102,19 +5144,19 @@ class MatDateTime {
|
|
|
5102
5144
|
.subscribe((event) => this.onFormChange(event)));
|
|
5103
5145
|
// Listen status changes (when done outside the component - e.g. when setErrors() is calling on the formControl)
|
|
5104
5146
|
this._subscription.add(this.formControl.statusChanges
|
|
5105
|
-
.pipe(filter((_) => !this.readonly && !this.
|
|
5147
|
+
.pipe(filter((_) => !this.readonly && !this._writing && !this._disabling) // Skip
|
|
5106
5148
|
)
|
|
5107
5149
|
.subscribe(() => this.markForCheck()));
|
|
5108
5150
|
this.updateTabIndex();
|
|
5109
|
-
this.
|
|
5151
|
+
this._writing = false;
|
|
5110
5152
|
}
|
|
5111
5153
|
ngOnDestroy() {
|
|
5112
5154
|
this._subscription.unsubscribe();
|
|
5113
5155
|
}
|
|
5114
5156
|
writeValue(valueStr) {
|
|
5115
|
-
if (this.
|
|
5157
|
+
if (this._writing)
|
|
5116
5158
|
return; // Skip
|
|
5117
|
-
this.
|
|
5159
|
+
this._writing = true;
|
|
5118
5160
|
// DEBUG
|
|
5119
5161
|
// console.debug("[mat-date-time] writeValue() with:", valueStr);
|
|
5120
5162
|
const value = fromDateISOString(valueStr);
|
|
@@ -5123,10 +5165,10 @@ class MatDateTime {
|
|
|
5123
5165
|
this.timeFormControl.patchValue(null, { emitEvent: false });
|
|
5124
5166
|
}
|
|
5125
5167
|
else {
|
|
5126
|
-
//
|
|
5168
|
+
// Format day
|
|
5127
5169
|
const day = value.clone().startOf('day');
|
|
5128
5170
|
const dayStr = this.dateAdapter.format(day, this.dayPattern);
|
|
5129
|
-
//
|
|
5171
|
+
// Format time
|
|
5130
5172
|
// - Format hh
|
|
5131
5173
|
let hour = value.hour();
|
|
5132
5174
|
hour = hour < 10 ? ('0' + hour) : hour;
|
|
@@ -5138,46 +5180,9 @@ class MatDateTime {
|
|
|
5138
5180
|
this.dateFormControl.patchValue(dayStr, { emitEvent: false });
|
|
5139
5181
|
this.timeFormControl.patchValue(timeStr, { emitEvent: false });
|
|
5140
5182
|
}
|
|
5141
|
-
this.
|
|
5183
|
+
this._writing = false;
|
|
5142
5184
|
this.markForCheck();
|
|
5143
5185
|
}
|
|
5144
|
-
onFormChange(event) {
|
|
5145
|
-
if (this.writing)
|
|
5146
|
-
return; // Skip if call by self
|
|
5147
|
-
this.writing = true;
|
|
5148
|
-
let dayStr = this.dateFormControl.value;
|
|
5149
|
-
const time = this.timeFormControl.value;
|
|
5150
|
-
// DEBUG
|
|
5151
|
-
//console.debug(`[mat-date-time] onFormChange() from event: ${event} - controls values: `, [dayStr, time]);
|
|
5152
|
-
const incompleteValue = isNilOrBlank(time) !== isNilOrBlank(dayStr);
|
|
5153
|
-
if (incompleteValue || this.dateFormControl.invalid || this.timeFormControl.invalid) {
|
|
5154
|
-
this.formControl.markAsPending({ onlySelf: true });
|
|
5155
|
-
this.formControl.setErrors(Object.assign(Object.assign(Object.assign({ validDate: incompleteValue }, this.formControl.errors), this.dateFormControl.errors), this.timeFormControl.errors));
|
|
5156
|
-
this.formControl.markAsDirty();
|
|
5157
|
-
// Reset the value
|
|
5158
|
-
//this.emitChange(null);
|
|
5159
|
-
this.writing = false;
|
|
5160
|
-
return;
|
|
5161
|
-
}
|
|
5162
|
-
// Make to remove placeholder chars
|
|
5163
|
-
while (dayStr && dayStr.indexOf(this.placeholderChar) !== -1) {
|
|
5164
|
-
dayStr = dayStr.replace(this.placeholderChar, '');
|
|
5165
|
-
}
|
|
5166
|
-
// Parse day
|
|
5167
|
-
const day = dayStr && this.dateAdapter.parse(dayStr, this.dayPattern) || null;
|
|
5168
|
-
// Parse time
|
|
5169
|
-
const hourParts = (time || '').split(':');
|
|
5170
|
-
const hour = parseInt(hourParts[0] || 0);
|
|
5171
|
-
const minutes = parseInt(hourParts[1] || 0);
|
|
5172
|
-
const dateTime = day && day
|
|
5173
|
-
.locale(this.locale) // set as time as locale time
|
|
5174
|
-
.hour(hour).minute(minutes) // Set local hour
|
|
5175
|
-
.seconds(0).millisecond(0) // Reset seconds/millisecond
|
|
5176
|
-
.utc(); // Convert to UTC (avoid TZ offset in final string)
|
|
5177
|
-
// Set model value
|
|
5178
|
-
this.emitChange(dateTime);
|
|
5179
|
-
this.writing = false;
|
|
5180
|
-
}
|
|
5181
5186
|
registerOnChange(fn) {
|
|
5182
5187
|
this._onChangeCallback = fn;
|
|
5183
5188
|
}
|
|
@@ -5185,9 +5190,9 @@ class MatDateTime {
|
|
|
5185
5190
|
this._onTouchedCallback = fn;
|
|
5186
5191
|
}
|
|
5187
5192
|
setDisabledState(isDisabled) {
|
|
5188
|
-
if (this.
|
|
5193
|
+
if (this._disabling)
|
|
5189
5194
|
return; // Skip
|
|
5190
|
-
this.
|
|
5195
|
+
this._disabling = true;
|
|
5191
5196
|
if (isDisabled) {
|
|
5192
5197
|
this.dateFormControl.disable({ emitEvent: false });
|
|
5193
5198
|
this.timeFormControl.disable({ emitEvent: false });
|
|
@@ -5196,7 +5201,7 @@ class MatDateTime {
|
|
|
5196
5201
|
this.dateFormControl.enable({ emitEvent: false });
|
|
5197
5202
|
this.timeFormControl.enable({ emitEvent: false });
|
|
5198
5203
|
}
|
|
5199
|
-
this.
|
|
5204
|
+
this._disabling = false;
|
|
5200
5205
|
this.markForCheck();
|
|
5201
5206
|
}
|
|
5202
5207
|
onDatePickerChange(event) {
|
|
@@ -5302,6 +5307,43 @@ class MatDateTime {
|
|
|
5302
5307
|
this.markForCheck();
|
|
5303
5308
|
}
|
|
5304
5309
|
}
|
|
5310
|
+
onFormChange(event) {
|
|
5311
|
+
if (this._writing)
|
|
5312
|
+
return; // Skip if call by self
|
|
5313
|
+
this._writing = true;
|
|
5314
|
+
let dayStr = this.dateFormControl.value;
|
|
5315
|
+
const time = this.timeFormControl.value;
|
|
5316
|
+
// DEBUG
|
|
5317
|
+
//console.debug(`[mat-date-time] onFormChange() from event: ${event} - controls values: `, [dayStr, time]);
|
|
5318
|
+
const incompleteValue = isNilOrBlank(time) !== isNilOrBlank(dayStr);
|
|
5319
|
+
if (incompleteValue || this.dateFormControl.invalid || this.timeFormControl.invalid) {
|
|
5320
|
+
this.formControl.markAsPending({ onlySelf: true });
|
|
5321
|
+
this.formControl.setErrors(Object.assign(Object.assign(Object.assign({ validDate: incompleteValue }, this.formControl.errors), this.dateFormControl.errors), this.timeFormControl.errors));
|
|
5322
|
+
this.formControl.markAsDirty();
|
|
5323
|
+
// Reset the value
|
|
5324
|
+
//this.emitChange(null);
|
|
5325
|
+
this._writing = false;
|
|
5326
|
+
return;
|
|
5327
|
+
}
|
|
5328
|
+
// Make to remove placeholder chars
|
|
5329
|
+
while (dayStr && dayStr.indexOf(this.placeholderChar) !== -1) {
|
|
5330
|
+
dayStr = dayStr.replace(this.placeholderChar, '');
|
|
5331
|
+
}
|
|
5332
|
+
// Parse day
|
|
5333
|
+
const day = dayStr && this.dateAdapter.parse(dayStr, this.dayPattern) || null;
|
|
5334
|
+
// Parse time
|
|
5335
|
+
const hourParts = (time || '').split(':');
|
|
5336
|
+
const hour = parseInt(hourParts[0] || 0);
|
|
5337
|
+
const minutes = parseInt(hourParts[1] || 0);
|
|
5338
|
+
const dateTime = day && day
|
|
5339
|
+
.locale(this.locale) // set as time as locale time
|
|
5340
|
+
.hour(hour).minute(minutes) // Set local hour
|
|
5341
|
+
.seconds(0).millisecond(0) // Reset seconds/millisecond
|
|
5342
|
+
.utc(); // Convert to UTC (avoid TZ offset in final string)
|
|
5343
|
+
// Set model value
|
|
5344
|
+
this.emitChange(dateTime);
|
|
5345
|
+
this._writing = false;
|
|
5346
|
+
}
|
|
5305
5347
|
waitKeyboardHide(waitKeyboardDelay) {
|
|
5306
5348
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5307
5349
|
if (!this.keyboard || !this.keyboard.isVisible)
|
|
@@ -5311,8 +5353,8 @@ class MatDateTime {
|
|
|
5311
5353
|
// Wait hide occur
|
|
5312
5354
|
yield this.keyboard.onKeyboardHide().pipe(first()).toPromise();
|
|
5313
5355
|
// Wait an additional delay if need (depending on the OS)
|
|
5314
|
-
if (this.
|
|
5315
|
-
yield sleep(this.
|
|
5356
|
+
if (this._keyboardHideDelay > 0 && waitKeyboardDelay) {
|
|
5357
|
+
yield sleep(this._keyboardHideDelay);
|
|
5316
5358
|
}
|
|
5317
5359
|
});
|
|
5318
5360
|
}
|
|
@@ -5339,9 +5381,9 @@ class MatDateTime {
|
|
|
5339
5381
|
this.markForCheck();
|
|
5340
5382
|
});
|
|
5341
5383
|
}
|
|
5342
|
-
markAsTouched() {
|
|
5343
|
-
this.dateFormControl.markAsTouched();
|
|
5344
|
-
this.timeFormControl.markAsTouched();
|
|
5384
|
+
markAsTouched(opts) {
|
|
5385
|
+
this.dateFormControl.markAsTouched(opts);
|
|
5386
|
+
this.timeFormControl.markAsTouched(opts);
|
|
5345
5387
|
this._onTouchedCallback();
|
|
5346
5388
|
this.markForCheck();
|
|
5347
5389
|
}
|
|
@@ -5355,7 +5397,7 @@ class MatDateTime {
|
|
|
5355
5397
|
MatDateTime.decorators = [
|
|
5356
5398
|
{ type: Component, args: [{
|
|
5357
5399
|
selector: 'mat-date-time-field',
|
|
5358
|
-
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
|
|
5400
|
+
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",
|
|
5359
5401
|
providers: [
|
|
5360
5402
|
DEFAULT_VALUE_ACCESSOR$4,
|
|
5361
5403
|
],
|
|
@@ -10251,7 +10293,7 @@ SelectPeerModal.propDecorators = {
|
|
|
10251
10293
|
onRefresh: [{ type: Input }]
|
|
10252
10294
|
};
|
|
10253
10295
|
|
|
10254
|
-
const moment$
|
|
10296
|
+
const moment$4 = momentImported;
|
|
10255
10297
|
const SETTINGS_STORAGE_KEY = 'settings';
|
|
10256
10298
|
const SETTINGS_TRANSIENT_PROPERTIES = ['mobile', 'touchUi' /*deprecated*/];
|
|
10257
10299
|
// fixme: this constant points to static environment
|
|
@@ -10494,11 +10536,11 @@ class LocalSettingsService extends StartableService {
|
|
|
10494
10536
|
if (!feature) {
|
|
10495
10537
|
feature = {
|
|
10496
10538
|
name: featureName.toLowerCase(),
|
|
10497
|
-
lastSyncDate: moment$
|
|
10539
|
+
lastSyncDate: moment$4().toISOString()
|
|
10498
10540
|
};
|
|
10499
10541
|
}
|
|
10500
10542
|
else {
|
|
10501
|
-
feature.lastSyncDate = moment$
|
|
10543
|
+
feature.lastSyncDate = moment$4().toISOString();
|
|
10502
10544
|
}
|
|
10503
10545
|
this.saveOfflineFeature(feature);
|
|
10504
10546
|
}
|
|
@@ -10659,7 +10701,7 @@ class LocalSettingsService extends StartableService {
|
|
|
10659
10701
|
if (!page || !page.title || !page.path)
|
|
10660
10702
|
throw Error('Missing required argument \'page\', \'page.path\' or \'page.title\'');
|
|
10661
10703
|
// Set time
|
|
10662
|
-
page.time = page.time || moment$
|
|
10704
|
+
page.time = page.time || moment$4();
|
|
10663
10705
|
// Clean the title (remove <small> tags)
|
|
10664
10706
|
if (!opts || opts.removeTitleSmallTag !== false) {
|
|
10665
10707
|
const tagIndex = page.title.indexOf('</small>');
|
|
@@ -15486,7 +15528,7 @@ ConfigService.ctorParameters = () => [
|
|
|
15486
15528
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_CONFIG_OPTIONS,] }] }
|
|
15487
15529
|
];
|
|
15488
15530
|
|
|
15489
|
-
const moment$
|
|
15531
|
+
const moment$3 = momentImported;
|
|
15490
15532
|
class PlatformService extends StartableService {
|
|
15491
15533
|
constructor(platform, cdkPlatform, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, storage, audioProvider, environment, statusBar, keyboard, splashScreen, browser, downloader) {
|
|
15492
15534
|
super(platform);
|
|
@@ -15710,16 +15752,16 @@ class PlatformService extends StartableService {
|
|
|
15710
15752
|
}
|
|
15711
15753
|
// config moment lib
|
|
15712
15754
|
try {
|
|
15713
|
-
moment$
|
|
15755
|
+
moment$3.locale(event.lang);
|
|
15714
15756
|
console.debug('[platform] Use locale {' + event.lang + '}');
|
|
15715
15757
|
}
|
|
15716
15758
|
// If error, fallback to en
|
|
15717
15759
|
catch (err) {
|
|
15718
|
-
moment$
|
|
15760
|
+
moment$3.locale('en');
|
|
15719
15761
|
console.warn('[platform] Unknown local for moment lib. Using default [en]');
|
|
15720
15762
|
}
|
|
15721
15763
|
// Config date adapter
|
|
15722
|
-
this.dateAdapter.setLocale(moment$
|
|
15764
|
+
this.dateAdapter.setLocale(moment$3.locale());
|
|
15723
15765
|
}
|
|
15724
15766
|
});
|
|
15725
15767
|
this.settings.onChange.subscribe(data => {
|
|
@@ -25806,13 +25848,13 @@ LatLongTestPage.ctorParameters = () => [
|
|
|
25806
25848
|
{ type: FormBuilder }
|
|
25807
25849
|
];
|
|
25808
25850
|
|
|
25809
|
-
const moment$
|
|
25851
|
+
const moment$2 = momentImported;
|
|
25810
25852
|
class SwipeTestPage {
|
|
25811
25853
|
constructor(formBuilder, dateFormatPipe) {
|
|
25812
25854
|
this.formBuilder = formBuilder;
|
|
25813
25855
|
this.dateFormatPipe = dateFormatPipe;
|
|
25814
25856
|
this.$dates = new BehaviorSubject(undefined);
|
|
25815
|
-
this._today = moment$
|
|
25857
|
+
this._today = moment$2().startOf('day');
|
|
25816
25858
|
this.form = formBuilder.group({
|
|
25817
25859
|
empty: [null, Validators.required],
|
|
25818
25860
|
date: [null, Validators.compose([Validators.required, SharedValidators.validDate])],
|
|
@@ -25825,7 +25867,7 @@ class SwipeTestPage {
|
|
|
25825
25867
|
ngOnInit() {
|
|
25826
25868
|
const dates = [];
|
|
25827
25869
|
for (let d = 0; d < 7; d++) {
|
|
25828
|
-
dates[d] = moment$
|
|
25870
|
+
dates[d] = moment$2(this._today).add(d - 3, 'day');
|
|
25829
25871
|
}
|
|
25830
25872
|
this.$dates.next(dates);
|
|
25831
25873
|
this.loadData();
|
|
@@ -25866,7 +25908,7 @@ SwipeTestPage.ctorParameters = () => [
|
|
|
25866
25908
|
{ type: DateFormatPipe }
|
|
25867
25909
|
];
|
|
25868
25910
|
|
|
25869
|
-
const moment = momentImported;
|
|
25911
|
+
const moment$1 = momentImported;
|
|
25870
25912
|
class DateTimeTestPage {
|
|
25871
25913
|
constructor(platform, formBuilder, cd) {
|
|
25872
25914
|
this.platform = platform;
|
|
@@ -25898,7 +25940,7 @@ class DateTimeTestPage {
|
|
|
25898
25940
|
// Load the form with data
|
|
25899
25941
|
loadData() {
|
|
25900
25942
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25901
|
-
const now = moment();
|
|
25943
|
+
const now = moment$1();
|
|
25902
25944
|
const data = {
|
|
25903
25945
|
empty: toDateISOString(now.clone().add(2, 'hours')),
|
|
25904
25946
|
enable: toDateISOString(now),
|
|
@@ -26142,9 +26184,110 @@ NumpadTestPage.ctorParameters = () => [
|
|
|
26142
26184
|
{ type: FormBuilder }
|
|
26143
26185
|
];
|
|
26144
26186
|
|
|
26187
|
+
const moment = momentImported;
|
|
26188
|
+
class DateTestPage {
|
|
26189
|
+
constructor(platform, formBuilder, cd) {
|
|
26190
|
+
this.platform = platform;
|
|
26191
|
+
this.formBuilder = formBuilder;
|
|
26192
|
+
this.cd = cd;
|
|
26193
|
+
this.showLogPanel = true;
|
|
26194
|
+
this.logContent = '';
|
|
26195
|
+
this.memoryHide = false;
|
|
26196
|
+
this.memoryMobile = true;
|
|
26197
|
+
this.timezone = 'Indian/Mahe';
|
|
26198
|
+
this.stringify = JSON.stringify;
|
|
26199
|
+
this.form = formBuilder.group({
|
|
26200
|
+
empty: [null, Validators.required],
|
|
26201
|
+
enable: [null, Validators.required],
|
|
26202
|
+
disable: [null, Validators.required],
|
|
26203
|
+
readonly: [null],
|
|
26204
|
+
timezone: [null]
|
|
26205
|
+
}, {
|
|
26206
|
+
validators: SharedFormGroupValidators.dateRange('empty', 'enable')
|
|
26207
|
+
});
|
|
26208
|
+
const disableControl = this.form.get('disable');
|
|
26209
|
+
disableControl.disable();
|
|
26210
|
+
// Copy the 'enable' value, into the disable control
|
|
26211
|
+
this.form.get('enable').valueChanges.subscribe(value => disableControl.setValue(value));
|
|
26212
|
+
const mobile = platform.is('mobile');
|
|
26213
|
+
this.showLogPanel = this.showLogPanel || mobile;
|
|
26214
|
+
}
|
|
26215
|
+
ngOnInit() {
|
|
26216
|
+
setTimeout(() => this.loadData(), 250);
|
|
26217
|
+
}
|
|
26218
|
+
// Load the form with data
|
|
26219
|
+
loadData() {
|
|
26220
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26221
|
+
const now = moment();
|
|
26222
|
+
const nowAtMahe = now.clone().tz(this.timezone).startOf('day');
|
|
26223
|
+
const data = {
|
|
26224
|
+
empty: toDateISOString(now.clone().add(2, 'hours')),
|
|
26225
|
+
enable: toDateISOString(now),
|
|
26226
|
+
disable: now.clone(),
|
|
26227
|
+
readonly: now.clone(),
|
|
26228
|
+
timezone: nowAtMahe
|
|
26229
|
+
};
|
|
26230
|
+
this.form.setValue(data);
|
|
26231
|
+
this.log('[test-page] Data loaded: ' + JSON.stringify(data));
|
|
26232
|
+
this.form.get('empty').valueChanges
|
|
26233
|
+
.pipe(debounceTime(300))
|
|
26234
|
+
.subscribe(value => this.log('[test-page] Value n°1: ' + JSON.stringify(value)));
|
|
26235
|
+
this.form.get('enable').valueChanges
|
|
26236
|
+
.pipe(debounceTime(300))
|
|
26237
|
+
.subscribe(value => this.log('[test-page] Value n°2: ' + JSON.stringify(value)));
|
|
26238
|
+
this.form.get('timezone').valueChanges
|
|
26239
|
+
.pipe(debounceTime(300))
|
|
26240
|
+
.subscribe(value => this.log('[test-page] Value with timezone: ' + JSON.stringify(value)));
|
|
26241
|
+
});
|
|
26242
|
+
}
|
|
26243
|
+
doSubmit(event) {
|
|
26244
|
+
this.form.markAllAsTouched();
|
|
26245
|
+
this.log('[test-page] Form content: ' + JSON.stringify(this.form.value));
|
|
26246
|
+
this.log('[test-page] Form status: ' + this.form.status);
|
|
26247
|
+
if (this.form.invalid) {
|
|
26248
|
+
this.log('[test-page] Form errors: ' + JSON.stringify(this.form.errors));
|
|
26249
|
+
// DEBUG
|
|
26250
|
+
AppFormUtils.logFormErrors(this.form);
|
|
26251
|
+
}
|
|
26252
|
+
}
|
|
26253
|
+
log(message) {
|
|
26254
|
+
console.debug(message);
|
|
26255
|
+
if (this.showLogPanel) {
|
|
26256
|
+
this.logContent += message + '<br/>';
|
|
26257
|
+
this.cd.markForCheck();
|
|
26258
|
+
}
|
|
26259
|
+
}
|
|
26260
|
+
clearLogPanel() {
|
|
26261
|
+
this.logContent = '';
|
|
26262
|
+
this.cd.markForCheck();
|
|
26263
|
+
}
|
|
26264
|
+
startMemoryTimer() {
|
|
26265
|
+
this.memoryTimer = setInterval(() => {
|
|
26266
|
+
this.memoryHide = !this.memoryHide;
|
|
26267
|
+
}, 50);
|
|
26268
|
+
}
|
|
26269
|
+
stopMemoryTimer() {
|
|
26270
|
+
clearInterval(this.memoryTimer);
|
|
26271
|
+
this.memoryTimer = null;
|
|
26272
|
+
this.memoryHide = false;
|
|
26273
|
+
}
|
|
26274
|
+
}
|
|
26275
|
+
DateTestPage.decorators = [
|
|
26276
|
+
{ type: Component, args: [{
|
|
26277
|
+
selector: 'app-data-test',
|
|
26278
|
+
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 <!-- 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 #readonlyField formControlName=\"timezone\"\n placeholder=\"Date\"\n [mobile]=\"false\"\n [clearable]=\"true\"\n timezone=\"Indian/Mahe\">\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)=\"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\n </ion-row>\n </ion-grid>\n </form>\n\n</ion-content>\n"
|
|
26279
|
+
},] }
|
|
26280
|
+
];
|
|
26281
|
+
DateTestPage.ctorParameters = () => [
|
|
26282
|
+
{ type: Platform },
|
|
26283
|
+
{ type: FormBuilder },
|
|
26284
|
+
{ type: ChangeDetectorRef }
|
|
26285
|
+
];
|
|
26286
|
+
|
|
26145
26287
|
const SHARED_MATERIAL_TESTING_PAGES = [
|
|
26146
26288
|
{ label: 'Shared Material components', divider: true },
|
|
26147
26289
|
{ label: 'Date/Time field', page: '/testing/shared/datetime' },
|
|
26290
|
+
{ label: 'Date field', page: '/testing/shared/date' },
|
|
26148
26291
|
{ label: 'Autocomplete field', page: '/testing/shared/autocomplete' },
|
|
26149
26292
|
{ label: 'Lat/Long field', page: '/testing/shared/latlong' },
|
|
26150
26293
|
{ label: 'Numeric pad component', page: '/testing/shared/numpad' },
|
|
@@ -26169,6 +26312,11 @@ const routes$4 = [
|
|
|
26169
26312
|
pathMatch: 'full',
|
|
26170
26313
|
component: DateTimeTestPage
|
|
26171
26314
|
},
|
|
26315
|
+
{
|
|
26316
|
+
path: 'date',
|
|
26317
|
+
pathMatch: 'full',
|
|
26318
|
+
component: DateTestPage
|
|
26319
|
+
},
|
|
26172
26320
|
{
|
|
26173
26321
|
path: 'latlong',
|
|
26174
26322
|
pathMatch: 'full',
|
|
@@ -26209,6 +26357,7 @@ MaterialTestingModule.decorators = [
|
|
|
26209
26357
|
],
|
|
26210
26358
|
declarations: [
|
|
26211
26359
|
DateTimeTestPage,
|
|
26360
|
+
DateTestPage,
|
|
26212
26361
|
AutocompleteTestPage,
|
|
26213
26362
|
LatLongTestPage,
|
|
26214
26363
|
NumpadTestPage,
|
|
@@ -26220,6 +26369,7 @@ MaterialTestingModule.decorators = [
|
|
|
26220
26369
|
SharedMaterialModule,
|
|
26221
26370
|
RouterModule,
|
|
26222
26371
|
DateTimeTestPage,
|
|
26372
|
+
DateTestPage,
|
|
26223
26373
|
AutocompleteTestPage,
|
|
26224
26374
|
LatLongTestPage,
|
|
26225
26375
|
NumpadTestPage,
|
|
@@ -26814,5 +26964,5 @@ CoreTestingModule.decorators = [
|
|
|
26814
26964
|
* Generated bundle index. Do not edit.
|
|
26815
26965
|
*/
|
|
26816
26966
|
|
|
26817
|
-
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,
|
|
26967
|
+
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 };
|
|
26818
26968
|
//# sourceMappingURL=sumaris-net.ngx-components.js.map
|