@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 { Injectable, InjectionToken, NgModule, inject, Directive, Input, LOCALE_ID, Pipe } from '@angular/core';
|
3
|
-
import { UUID, ConfigurationContextMode, ConfigurationContext, 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, ChargeGroupUtils, RuntimeModel, isNotLegacyUIDefinition, SalesforceIdUtils, EntityUtil, formatNumber } from '@veloceapps/core';
|
3
|
+
import { UUID, ConfigurationContextMode, ConfigurationContext, 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, ChargeGroupUtils, RuntimeModel, isNotLegacyUIDefinition, SalesforceIdUtils, EntityUtil, DEFAULT_TIME_FORMAT, formatNumber } from '@veloceapps/core';
|
4
4
|
import * as i1 from '@veloceapps/api';
|
5
5
|
import { PriceApiService, ContextApiService, ProductModelApiService, ConfigurationApiService } from '@veloceapps/api';
|
6
6
|
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';
|
@@ -1736,12 +1736,18 @@ class DatePipe {
|
|
1736
1736
|
this.destroy$.next();
|
1737
1737
|
this.destroy$.complete();
|
1738
1738
|
}
|
1739
|
-
transform(date) {
|
1739
|
+
transform(date, type = 'date') {
|
1740
1740
|
if (!date) {
|
1741
1741
|
return '';
|
1742
1742
|
}
|
1743
|
+
const dateFormat = this.formattingSettings?.dateFormats.datePipeFormat || DEFAULT_DATE_FORMAT;
|
1744
|
+
const formatMap = {
|
1745
|
+
date: dateFormat,
|
1746
|
+
time: DEFAULT_TIME_FORMAT,
|
1747
|
+
datetime: `${dateFormat} ${DEFAULT_TIME_FORMAT}`,
|
1748
|
+
};
|
1743
1749
|
try {
|
1744
|
-
return formatDate(date,
|
1750
|
+
return formatDate(date, formatMap[type], this.locale, this.defaultOptions?.timezone);
|
1745
1751
|
}
|
1746
1752
|
catch (error) {
|
1747
1753
|
return new Date(date).toString();
|