@veloceapps/sdk 8.0.0-88 → 8.0.0-89
Sign up to get free protection for your applications and to get access to all the features.
- package/cms/vendor-map.d.ts +5 -1
- package/core/pipes/date.pipe.d.ts +2 -1
- package/core/types/index.d.ts +1 -0
- package/core/types/pipe.types.d.ts +1 -0
- package/esm2020/cms/vendor-map.mjs +6 -2
- package/esm2020/core/pipes/date.pipe.mjs +10 -4
- package/esm2020/core/types/index.mjs +2 -1
- package/esm2020/core/types/pipe.types.mjs +2 -0
- package/fesm2015/veloceapps-sdk-cms.mjs +6 -2
- package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk-core.mjs +9 -3
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-cms.mjs +5 -1
- package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +9 -3
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/package.json +1 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
2
|
import { InjectionToken, Injectable, NgModule, inject, Directive, Input, LOCALE_ID, Pipe } from '@angular/core';
|
3
|
-
import { UUID, ConfigurationContextMode, ConfigurationContext, ChargeGroupUtils, DEFAULT_CURRENCY_ISO_CODE, DEFAULT_CURRENCY_SYMBOL, validateDateFormat, DEFAULT_DATE_FORMAT, DEFAULT_DECIMALS_COUNT, getSupportedDateFormats, DEFAULT_DECIMAL_SEPARATOR, DEFAULT_THOUSANDS_SEPARATOR, DEFAULT_ACTION_CODE_LABELS, parseJsonSafely, ConfigurationMode, ConfigurationTranslatorUtils, RuntimeModel, isNotLegacyUIDefinition, SalesforceIdUtils, EntityUtil, formatNumber } from '@veloceapps/core';
|
3
|
+
import { UUID, ConfigurationContextMode, ConfigurationContext, ChargeGroupUtils, DEFAULT_CURRENCY_ISO_CODE, DEFAULT_CURRENCY_SYMBOL, validateDateFormat, DEFAULT_DATE_FORMAT, DEFAULT_DECIMALS_COUNT, getSupportedDateFormats, DEFAULT_DECIMAL_SEPARATOR, DEFAULT_THOUSANDS_SEPARATOR, DEFAULT_ACTION_CODE_LABELS, parseJsonSafely, ConfigurationMode, ConfigurationTranslatorUtils, RuntimeModel, isNotLegacyUIDefinition, SalesforceIdUtils, EntityUtil, DEFAULT_TIME_FORMAT, formatNumber } from '@veloceapps/core';
|
4
4
|
import { BehaviorSubject, zip, noop, combineLatest, map as map$2, tap as tap$1, throwError, shareReplay as shareReplay$1, of, switchMap as switchMap$1, catchError as catchError$1, Subject, take as take$1, distinctUntilChanged } from 'rxjs';
|
5
5
|
import { map, filter, tap, switchMap, skip, take, shareReplay, catchError, finalize, first } from 'rxjs/operators';
|
6
6
|
import * as i1 from '@veloceapps/api';
|
@@ -1685,13 +1685,19 @@ class DatePipe {
|
|
1685
1685
|
this.destroy$.next();
|
1686
1686
|
this.destroy$.complete();
|
1687
1687
|
}
|
1688
|
-
transform(date) {
|
1688
|
+
transform(date, type = 'date') {
|
1689
1689
|
var _a, _b;
|
1690
1690
|
if (!date) {
|
1691
1691
|
return '';
|
1692
1692
|
}
|
1693
|
+
const dateFormat = ((_a = this.formattingSettings) === null || _a === void 0 ? void 0 : _a.dateFormats.datePipeFormat) || DEFAULT_DATE_FORMAT;
|
1694
|
+
const formatMap = {
|
1695
|
+
date: dateFormat,
|
1696
|
+
time: DEFAULT_TIME_FORMAT,
|
1697
|
+
datetime: `${dateFormat} ${DEFAULT_TIME_FORMAT}`,
|
1698
|
+
};
|
1693
1699
|
try {
|
1694
|
-
return formatDate(date,
|
1700
|
+
return formatDate(date, formatMap[type], this.locale, (_b = this.defaultOptions) === null || _b === void 0 ? void 0 : _b.timezone);
|
1695
1701
|
}
|
1696
1702
|
catch (error) {
|
1697
1703
|
return new Date(date).toString();
|