@veloceapps/sdk 8.0.0-87 → 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/core.module.mjs +2 -12
- 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 -13
- 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 -13
- 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';
|
@@ -1660,11 +1660,6 @@ class SdkCoreModule {
|
|
1660
1660
|
SdkCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1661
1661
|
SdkCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SdkCoreModule, imports: [ConfigurationModule, FlowConfigurationModule] });
|
1662
1662
|
SdkCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkCoreModule, providers: [
|
1663
|
-
ContextService,
|
1664
|
-
QuoteDraftService,
|
1665
|
-
ProductImagesService,
|
1666
|
-
MetricsCalculationService,
|
1667
|
-
RuntimeSettingsService,
|
1668
1663
|
{
|
1669
1664
|
provide: FORMATTING_SETTINGS_TOKEN,
|
1670
1665
|
useExisting: RuntimeSettingsService,
|
@@ -1675,11 +1670,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1675
1670
|
args: [{
|
1676
1671
|
imports: [ConfigurationModule, FlowConfigurationModule],
|
1677
1672
|
providers: [
|
1678
|
-
ContextService,
|
1679
|
-
QuoteDraftService,
|
1680
|
-
ProductImagesService,
|
1681
|
-
MetricsCalculationService,
|
1682
|
-
RuntimeSettingsService,
|
1683
1673
|
{
|
1684
1674
|
provide: FORMATTING_SETTINGS_TOKEN,
|
1685
1675
|
useExisting: RuntimeSettingsService,
|
@@ -1746,12 +1736,18 @@ class DatePipe {
|
|
1746
1736
|
this.destroy$.next();
|
1747
1737
|
this.destroy$.complete();
|
1748
1738
|
}
|
1749
|
-
transform(date) {
|
1739
|
+
transform(date, type = 'date') {
|
1750
1740
|
if (!date) {
|
1751
1741
|
return '';
|
1752
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
|
+
};
|
1753
1749
|
try {
|
1754
|
-
return formatDate(date,
|
1750
|
+
return formatDate(date, formatMap[type], this.locale, this.defaultOptions?.timezone);
|
1755
1751
|
}
|
1756
1752
|
catch (error) {
|
1757
1753
|
return new Date(date).toString();
|