@bytebrand/fe-ui-core 4.2.250 → 4.3.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/__tests__/utils/CommonUtils/getOfferSliders.test.ts +2 -4
- package/common.ts +2 -6
- package/package.json +2 -4
- package/source/components/AccordionWidget/AccordionWidget.tsx +3 -1
- package/source/components/Breadcrumbs/Breadcrumbs.tsx +3 -3
- package/source/components/Checkout/CheckoutStepper/CheckoutStepper.styl +190 -2
- package/source/components/Checkout/CheckoutStepper/CheckoutStepper.tsx +16 -15
- package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.styl +2 -2
- package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.tsx +3 -3
- package/source/components/FormattedNumber/FormattedNumber.tsx +3 -2
- package/source/components/InfoBlocks/FirstInfoBlock/FirstInfoBlockItem/FirstInfoBlockItem.styl +6 -4
- package/source/components/OfferDetailedSection/partials/PanelConfig.tsx +3 -0
- package/source/components/OfferPanel/MuiOfferPeriod/{MuiOfferPeriod.theme.tsx → MuiOfferPeriod.theme.js} +13 -8
- package/source/components/OfferPanel/MuiOfferPeriod/MuiOfferPeriod.tsx +4 -28
- package/source/components/OfferPanel/OfferCheckboxGroup/CheckboxContainer.tsx +12 -6
- package/source/components/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.tsx +1 -1
- package/source/components/OfferPanel/OfferPanel.tsx +1 -1
- package/source/components/OfferPanel/OfferPeriod/OfferPeriod.tsx +4 -0
- package/source/components/OfferPanel/RangeGroup/RangeGroup.tsx +4 -6
- package/source/components/PriceRatingDetailed/PriceRatingDetailed.tsx +2 -6
- package/source/components/SearchFilters/filters/AlternativeID.tsx +53 -42
- package/source/components/SearchFilters/filters/DriveType.tsx +1 -1
- package/source/components/SearchFilters/filters/EmissionSticker.tsx +1 -1
- package/source/components/SearchFilters/filters/FirstRegistration.tsx +1 -0
- package/source/components/SearchFilters/filters/InteriorColor.tsx +1 -1
- package/source/components/SearchFilters/filters/InteriorMaterial.tsx +1 -2
- package/source/components/SearchFilters/filters/Mileage.tsx +1 -1
- package/source/components/SearchFilters/filters/Power.tsx +17 -36
- package/source/components/SearchFilters/filters/StateOptions.tsx +1 -0
- package/source/components/SearchFilters/filters/Transmission.tsx +1 -1
- package/source/components/SearchPage/SearchChips/SearchChips.tsx +1 -1
- package/source/components/SearchPageMobile/FiltersDetailed/BodyType.tsx +3 -3
- package/source/components/SearchPageMobile/FiltersDetailed/Consumption.tsx +2 -2
- package/source/components/SearchPageMobile/FiltersDetailed/Doors.tsx +1 -1
- package/source/components/SearchPageMobile/FiltersDetailed/MakeModel.tsx +1 -1
- package/source/components/SearchWidget/ColorWidget/BodyColorWidget.tsx +3 -3
- package/source/components/SearchWidget/EnvironmentWidget/EnvironmentWidget.tsx +3 -3
- package/source/components/SearchWidget/HighlightsWidget/HighlightsWidget.tsx +2 -2
- package/source/components/SearchWidget/StateWidget/StateWidget.tsx +2 -1
- package/source/components/SearchWidgetsMobile/BasicDataWidgetMobile/BasicDataWidgetMobile.tsx +4 -4
- package/source/components/SearchWidgetsMobile/EquipmentsWidget/EquipmentsWidget.tsx +16 -16
- package/source/components/SearchWidgetsMobile/HighlightsWidgetMobile/HighlightsWidgetMobile.tsx +1 -1
- package/source/components/SearchWidgetsMobile/InteriorWidget/InteriorWidget.tsx +1 -1
- package/source/components/SearchWidgetsMobile/SafetyWidget/SafetyWidget.tsx +6 -6
- package/source/components/Stepper/Stepper.tsx +3 -4
- package/source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo.styl +2 -11
- package/source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo.tsx +5 -5
- package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusCar.tsx +38 -57
- package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusCard.tsx +2 -2
- package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.tsx +101 -183
- package/source/components/UserDashboardPage/sections/RequestedCarsSection/RequestedCarsSection.tsx +7 -5
- package/source/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.tsx +7 -33
- package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.styl +2 -10
- package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.tsx +14 -54
- package/source/components/VehicleDetailedSidebar/partials/Price.styl +1 -5
- package/source/components/VehicleDetailedSidebar/partials/Price.tsx +1 -2
- package/source/components/VehicleDetailedSidebar/partials/PriceContent.styl +5 -16
- package/source/components/VehicleDetailedSidebar/partials/PriceContent.tsx +4 -9
- package/source/components/VehicleDetailedSidebar/partials/Properties.tsx +1 -1
- package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.styl +0 -45
- package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.tsx +42 -121
- package/source/components/VehicleDetailedSlider/partials/PriceData.styl +1 -4
- package/source/components/VehicleDetailedSlider/partials/PriceData.tsx +1 -8
- package/source/components/VehicleDetailedSlider/partials/Stats.tsx +2 -2
- package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx +7 -9
- package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.styl +1 -35
- package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.tsx +3 -9
- package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.styl +2 -11
- package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.tsx +1 -2
- package/source/components/VehicleSmallCard/VehicleSmallCard.styl +1 -3
- package/source/components/VehicleSmallCard/VehicleSmallCard.tsx +7 -3
- package/source/components/_common/Badge/Badge.styl +0 -3
- package/source/components/_common/Badge/Badge.tsx +1 -1
- package/source/components/_common/Button/Button.tsx +4 -5
- package/source/components/_common/Checkbox/FormCheckbox.tsx +4 -4
- package/source/components/_common/CheckboxMaterial/CheckboxMaterial.tsx +1 -1
- package/source/components/_common/Chip/Chip.tsx +3 -1
- package/source/components/_common/ExpansionPanel/ExpansionPanel.tsx +3 -3
- package/source/components/_common/IconSVG/IconSVGConfig.tsx +0 -2
- package/source/components/_common/IconSVG/SVG/flags/SK.tsx +1 -0
- package/source/components/_common/IconSVG/SVG/slider/360New.tsx +1 -1
- package/source/components/_common/MaterialAccordion/MaterialAccordion.tsx +30 -22
- package/source/components/_common/MaterialAutocomplete/MaterialAutocomplete.styled.tsx +8 -8
- package/source/components/_common/MaterialDatePicker/MaterialDatePicker.styled.tsx +1 -0
- package/source/components/_common/MaterialSelect/MaterialSelect.styled.tsx +15 -12
- package/source/components/_common/MaterialSelect/MaterialSelect.tsx +3 -3
- package/source/components/_common/MaterialSwitch/MaterialSwitch.tsx +1 -3
- package/source/components/_common/MaterialTooltip/MaterialTooltip.styled.tsx +1 -1
- package/source/components/_common/MaterialTooltip/MaterialTooltip.tsx +3 -3
- package/source/components/_common/Modal/CookieModal.tsx +3 -1
- package/source/components/_common/Modal/Modal.styled.tsx +1 -2
- package/source/components/_common/Modal/Modal.tsx +5 -1
- package/source/components/_common/Modal/ModalsConfig.tsx +1 -5
- package/source/components/_common/Modal/modals/ManageCookieModal/ManageCookieModal.styl +7 -23
- package/source/components/_common/Modal/modals/ManageCookieModal/ManageCookieModal.tsx +36 -84
- package/source/components/_common/Modal/modals/PreviewCookieModal/PreviewCookieModal.styl +14 -29
- package/source/components/_common/Modal/modals/PreviewCookieModal/PreviewCookieModal.tsx +10 -17
- package/source/components/_common/OfferRequestButtonWrapper/OfferRequestButtonWrapper.tsx +4 -12
- package/source/components/_common/Range/Range.tsx +14 -27
- package/source/components/_common/UserMenu/MaterialMenu.styled.tsx +1 -0
- package/source/components/_common/UserMenu/MaterialMenu.tsx +3 -3
- package/source/components/_common/UserMenu/MaterialMenuItem.tsx +20 -42
- package/source/components/_common/UserMenu/NestedMenu.tsx +1 -1
- package/source/components/_common/withStats/withStats.styl +0 -3
- package/source/components/_common/withStats/withStats.tsx +16 -19
- package/source/components/containers/SearchPage/FiltersContainer/FiltersContainer.styl +1 -14
- package/source/components/containers/SearchPage/FiltersContainer/FiltersContainer.tsx +42 -78
- package/source/framework/constants/common.ts +60 -89
- package/source/framework/constants/highlights.ts +1 -1
- package/source/framework/constants.ts +1 -1
- package/source/framework/types/types.ts +4 -9
- package/source/framework/utils/CommonUtils.ts +62 -73
- package/source/framework/utils/DateUtils.ts +2 -10
- package/source/locales/data.ts +2 -2
- package/tslint.json +2 -1
- package/utils.ts +0 -2
- package/__tests__/components/UserDasboardPage/sections/CheckoutSection/CheckoutSection.test.tsx +0 -613
- package/__tests__/components/UserDasboardPage/sections/FavoriteSection/FavoriteSection.test.tsx +0 -335
- package/source/components/UserDashboardPage/sections/CheckoutSection/CheckoutSection.styl +0 -38
- package/source/components/UserDashboardPage/sections/CheckoutSection/CheckoutSection.tsx +0 -120
- package/source/components/UserDashboardPage/sections/FavoriteSection/FavoriteSection.styl +0 -22
- package/source/components/UserDashboardPage/sections/FavoriteSection/FavoriteSection.tsx +0 -84
- package/source/components/_common/IconSVG/SVG/slider/YoutubeButton.tsx +0 -26
|
@@ -7,19 +7,23 @@ import {
|
|
|
7
7
|
DROP_DOWN_GROUP, RATE_DEFAULT, MMS_GROUPS_KEY, MMS_GROUP_FIELDS
|
|
8
8
|
} from '../constants/SearchWidget';
|
|
9
9
|
import { priceRatings, priceRatingConfig } from '../constants/price';
|
|
10
|
-
import { HUNDRED } from '../constants/common';
|
|
10
|
+
import { GOOGLE_BUNDLE_COOKIES, HUNDRED } from '../constants/common';
|
|
11
11
|
import { offers } from '../constants';
|
|
12
12
|
import { FILTERS_IN_TITLE, MANUFACTURER_KEY, MAX_FILTERS_IN_TITLE, MODEL_KEY } from '../constants/Search';
|
|
13
13
|
import { SearchPage as SearchPageTranslate } from '../../locales/data';
|
|
14
|
-
import { isArray } from 'lodash';
|
|
15
14
|
|
|
16
15
|
const PRICE_DEFAULT = DROP_DOWN_GROUP[PRICE].defaultValue;
|
|
17
16
|
|
|
18
17
|
declare global {
|
|
19
18
|
// tslint:disable-next-line:interface-name
|
|
20
19
|
interface Window {
|
|
20
|
+
grantHotjarCookieConsent?: () => void;
|
|
21
|
+
grantCookieConsentClarity?: () => void;
|
|
22
|
+
grantCookieConsentMicrosoft?: () => void;
|
|
23
|
+
grantCookieConsentFacebook?: () => void;
|
|
21
24
|
grantCookieConsentSentry?: () => void;
|
|
22
|
-
grantCookieConsent?: (
|
|
25
|
+
grantCookieConsent?: (list: string[]) => void;
|
|
26
|
+
allowGoogle?: () => void;
|
|
23
27
|
}
|
|
24
28
|
}
|
|
25
29
|
|
|
@@ -216,11 +220,10 @@ export const buildQueryForSearch = (filters: any) => {
|
|
|
216
220
|
|
|
217
221
|
if (filterValue && filterValue.value) {
|
|
218
222
|
if (MMS_GROUP_FIELDS.indexOf(filter) !== -1) {
|
|
223
|
+
MMS_GROUP[filter] = filterValue.value;
|
|
219
224
|
|
|
220
225
|
if (filterValue.isSeries) {
|
|
221
226
|
MMS_GROUP.SERIES = filterValue.value;
|
|
222
|
-
} else {
|
|
223
|
-
MMS_GROUP[filter] = filterValue.value;
|
|
224
227
|
}
|
|
225
228
|
}
|
|
226
229
|
}
|
|
@@ -373,19 +376,15 @@ export const getOfferSliders = (financingConfig: any, t: (key: string, options?:
|
|
|
373
376
|
financingConfig.common ?
|
|
374
377
|
financingConfig.common.currentSalesPrice :
|
|
375
378
|
financingConfig.currentSalesPrice; // TODO: fix deprecated. Correct is "financingConfig.common.currentSalesPrice"
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
return slider;
|
|
386
|
-
}).filter(Boolean);
|
|
387
|
-
}
|
|
388
|
-
|
|
379
|
+
return offerObj.sliders
|
|
380
|
+
.map((slider: any, index) => {
|
|
381
|
+
if (componentType === 'checkout' && index === 1 && priceTabIndex === 0) return; // remove checkout annual mileage for financing
|
|
382
|
+
if (slider.name === 'firstInstallment') slider.max = offerConfig.firstInstallmentMax || currentSalesPrice;
|
|
383
|
+
slider.value = offerConfig[slider.name];
|
|
384
|
+
slider.unitName = t(`modals:financing.${slider.unit}`);
|
|
385
|
+
slider.caption = t(`modals:financing.${slider.name}`);
|
|
386
|
+
return slider;
|
|
387
|
+
}).filter(Boolean);
|
|
389
388
|
};
|
|
390
389
|
|
|
391
390
|
export const checkWebpFeature = async () => {
|
|
@@ -463,9 +462,7 @@ export function getChipFilterValue(
|
|
|
463
462
|
case 'SEATS':
|
|
464
463
|
case 'CUBIC_CAPACITY':
|
|
465
464
|
title = t(`SearchPage:filters.${chipFilterKey.toLocaleLowerCase()}`);
|
|
466
|
-
|
|
467
|
-
to = !!chipFilterValue.to ? `${t('SearchPage:filters.to')} ${chipFilterValue.to}` : '';
|
|
468
|
-
const fromTo = (from && to) ? `${chipFilterValue.from} - ${chipFilterValue.to}` : `${from || to}`;
|
|
465
|
+
const fromTo = `${chipFilterValue.from} - ${chipFilterValue.to}`;
|
|
469
466
|
filterValue = `${title} ${fromTo}`;
|
|
470
467
|
break;
|
|
471
468
|
|
|
@@ -547,29 +544,64 @@ export function setUtmParameters() {
|
|
|
547
544
|
const domain = parsedUrl.hostname.split('.').slice(-2).join('.');
|
|
548
545
|
|
|
549
546
|
document.cookie = `marketing=${JSON.stringify(marketing)};expires=${expiresDate};domain=.${domain};path=/`;
|
|
550
|
-
|
|
551
547
|
}
|
|
552
548
|
|
|
553
549
|
export const updateCookieList = (handleSentryInit: () => void) => {
|
|
554
|
-
|
|
550
|
+
let cookieConsentList = Object.keys(GOOGLE_BUNDLE_COOKIES);
|
|
551
|
+
let isHomeGoogleGranted = true; // home page google cookie
|
|
552
|
+
let isMicrosoftGranted = true; // Microsoft _uetvid _uetsid
|
|
553
|
+
let isMicrosoftClarity = true; // Microsoft Clarity _clck _clsk
|
|
554
|
+
let isFacebookGranted = true; // Facebook Clarity _fbp _f
|
|
555
555
|
let isSentryGranted = true; // Sentry
|
|
556
|
-
let
|
|
556
|
+
let isHotjarGranted = true;
|
|
557
|
+
const cookieConfig = JSON.parse(localStorage.getItem('cookieConfig')) || {};
|
|
558
|
+
|
|
557
559
|
const parsedUrl = new URL(window.location.href);
|
|
558
560
|
const domain = parsedUrl.hostname.split('.').slice(-2).join('.');
|
|
559
|
-
|
|
560
561
|
Object.keys(cookieConfig).forEach((group: string) => {
|
|
561
562
|
cookieConfig[group].forEach((cookie: string) => {
|
|
562
563
|
Cookies.remove(cookie, { domain, path: '/' }); // manually remove selected cookies
|
|
563
|
-
|
|
564
|
-
|
|
564
|
+
// google
|
|
565
|
+
if (cookieConsentList.includes(cookie)) {
|
|
566
|
+
cookieConsentList = cookieConsentList.filter(i => i !== cookie); // deny google cookie consent for _gcl_au, _ga, _gid, _gat_UA-31842-13, etc
|
|
567
|
+
|
|
568
|
+
isHomeGoogleGranted = false;
|
|
565
569
|
}
|
|
566
|
-
|
|
570
|
+
else if (cookie === 'hotjar') isHotjarGranted = false;
|
|
571
|
+
else if (cookie === '_uetvid' || cookie === '_uetsid') isMicrosoftGranted = false;
|
|
572
|
+
else if (cookie === '_clck' || cookie === '_clsk') isMicrosoftClarity = false;
|
|
573
|
+
else if (cookie === '_fbp') isFacebookGranted = false;
|
|
574
|
+
else if (cookie === 'sentry') isSentryGranted = false;
|
|
567
575
|
});
|
|
568
576
|
});
|
|
569
577
|
|
|
570
578
|
// grant google cookies
|
|
571
579
|
if (typeof window.grantCookieConsent === 'function') {
|
|
572
|
-
window.grantCookieConsent(
|
|
580
|
+
window.grantCookieConsent(cookieConsentList);
|
|
581
|
+
};
|
|
582
|
+
|
|
583
|
+
// grant Microsoft cookies
|
|
584
|
+
if (isMicrosoftGranted && typeof window.grantCookieConsentMicrosoft === 'function') {
|
|
585
|
+
window.grantCookieConsentMicrosoft();
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
// grant Microsoft Clarity cookies
|
|
589
|
+
if (isMicrosoftClarity && typeof window.grantCookieConsentClarity === 'function') {
|
|
590
|
+
window.grantCookieConsentClarity();
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
// grant Facebook cookies
|
|
594
|
+
if (!isFacebookGranted && typeof window.grantCookieConsentFacebook === 'function') {
|
|
595
|
+
window.grantCookieConsentFacebook();
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
if (isHomeGoogleGranted && typeof window.allowGoogle === 'function') {
|
|
599
|
+
window.allowGoogle();
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
// grant Hotjar cookies
|
|
603
|
+
if (isHotjarGranted && typeof window.grantHotjarCookieConsent === 'function') {
|
|
604
|
+
window.grantHotjarCookieConsent();
|
|
573
605
|
}
|
|
574
606
|
|
|
575
607
|
// grant Sentry cookies
|
|
@@ -587,49 +619,6 @@ export const getCents = (value: number, prefix?: string, postfix?: string): stri
|
|
|
587
619
|
return `${prefix}${result}${postfix}`;
|
|
588
620
|
};
|
|
589
621
|
|
|
590
|
-
/**
|
|
591
|
-
* Generates a timestamp (Unix time) after 14 days from the current date.
|
|
592
|
-
* @returns {number} Timestamp (Unix time) after 14 days.
|
|
593
|
-
*/
|
|
594
|
-
export const getUnixTimestampAfterTwoWeeks = () => {
|
|
595
|
-
const currentDate = new Date();
|
|
596
|
-
const futureDate = new Date();
|
|
597
|
-
|
|
598
|
-
futureDate.setDate(currentDate.getDate() + 14);
|
|
599
|
-
|
|
600
|
-
const unixTimestamp = Math.floor(futureDate.getTime() / 1000);
|
|
601
|
-
return unixTimestamp;
|
|
602
|
-
};
|
|
603
|
-
|
|
604
|
-
/**
|
|
605
|
-
* Converts a Unix timestamp to the day of the month.
|
|
606
|
-
* @param {number} unixTimestamp - The Unix timestamp to convert.
|
|
607
|
-
* @returns {number} Return the number of days as the result
|
|
608
|
-
*/
|
|
609
|
-
export const convertUnixTimestampToDays = (unixTimestamp: number) => {
|
|
610
|
-
const milliseconds = Number(unixTimestamp * 1000);
|
|
611
|
-
const date = new Date(milliseconds);
|
|
612
|
-
const currentDate = new Date();
|
|
613
|
-
|
|
614
|
-
// Calculate the difference between the current date and the obtained date
|
|
615
|
-
const timeDifference = currentDate.getTime() - date.getTime();
|
|
616
|
-
const daysDifference = -Math.floor(timeDifference / (1000 * 3600 * 24));
|
|
617
|
-
return daysDifference;
|
|
618
|
-
};
|
|
619
|
-
|
|
620
622
|
export const priceParse = (value: any) => {
|
|
621
623
|
return !!value ? Number.parseFloat(value) : null;
|
|
622
|
-
};
|
|
623
|
-
|
|
624
|
-
// iPad on iOS 13 detection
|
|
625
|
-
export const iOS = () => {
|
|
626
|
-
return [
|
|
627
|
-
'iPad Simulator',
|
|
628
|
-
'iPhone Simulator',
|
|
629
|
-
'iPod Simulator',
|
|
630
|
-
'iPad',
|
|
631
|
-
'iPhone',
|
|
632
|
-
'iPod'
|
|
633
|
-
].includes(navigator.platform)
|
|
634
|
-
|| (navigator.userAgent.includes("Mac") && "ontouchend" in document)
|
|
635
|
-
}
|
|
624
|
+
};
|
|
@@ -8,10 +8,10 @@ export interface IFormatTimestamp {
|
|
|
8
8
|
|
|
9
9
|
export const timestampToDate = (timestamp: number) => {
|
|
10
10
|
if (!timestamp) return 'N/A';
|
|
11
|
-
const date = new Date(timestamp * 1000)
|
|
11
|
+
const date = new Date(timestamp * 1000);// tslint:disable-line
|
|
12
12
|
const year = date.getFullYear();
|
|
13
13
|
const month = date.getMonth() + 1;
|
|
14
|
-
const monthFormatted = month < 10 ?
|
|
14
|
+
const monthFormatted = month < 10 ? '0' + month : month;// tslint:disable-line
|
|
15
15
|
return (`${monthFormatted}/${year}`);
|
|
16
16
|
};
|
|
17
17
|
|
|
@@ -91,11 +91,3 @@ export const getYears = (minYear = 1980, maxYear = moment().year(), reverse = fa
|
|
|
91
91
|
export const createDateAsUTC = (date: Date): Date => new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds()));
|
|
92
92
|
|
|
93
93
|
// end for checkout datepicker
|
|
94
|
-
|
|
95
|
-
export const fromUTCToDateString = (UTCDate: Date) => {
|
|
96
|
-
const date = new Date(UTCDate);
|
|
97
|
-
const day = date.getUTCDate().toString().padStart(2, '0');
|
|
98
|
-
const month = (date.getUTCMonth() + 1).toString().padStart(2, '0');
|
|
99
|
-
const year = date.getUTCFullYear();
|
|
100
|
-
return `${day}.${month}.${year}`;
|
|
101
|
-
}
|
package/source/locales/data.ts
CHANGED
|
@@ -56,7 +56,7 @@ export const vehicleProps = (car?: any, isOfferAvailable: boolean = true) => {
|
|
|
56
56
|
na: 'N/A',
|
|
57
57
|
priceSub: '/mtl.',
|
|
58
58
|
priceSubMtl: '/mtl.',
|
|
59
|
-
prefixOldPrice: '
|
|
59
|
+
prefixOldPrice: 'ab',
|
|
60
60
|
vehicleOwners: `${vehicleOption.vehicleOwners} Fahrzeughalter`,
|
|
61
61
|
vehicleOwners_plural: `${count} Fahrzeughalter`,
|
|
62
62
|
doorsOnly: `${vehicleOption.doorsOnly} Türen`,
|
|
@@ -164,7 +164,7 @@ export const vehicleProps = (car?: any, isOfferAvailable: boolean = true) => {
|
|
|
164
164
|
'firstRegistration': 'Erstzulassung',
|
|
165
165
|
'mileage': 'Kilometerstand',
|
|
166
166
|
'consumptionAndCo2': 'Kraftstoffverbrauch*',
|
|
167
|
-
'monthlyFrom': 'monatlich
|
|
167
|
+
'monthlyFrom': 'monatlich ab',
|
|
168
168
|
'buy': 'Kaufen',
|
|
169
169
|
'financingDescription': 'Bei der Finanzierung zahlen Sie lediglich die Zinsen des Darlehens und einen geringen Tilgungsanteil. Zum Vertragsende können Sie entscheiden, ob Sie den Restbetrag ablösen oder weiter finanzieren wollen.',
|
|
170
170
|
'leasingDescription': 'Beim Leasing zahlen Sie lediglich die Zinsen des Darlehens und einen geringen Tilgungsanteil. Zum Vertragsende geben Sie das Auto einfach wieder zurück.',
|
package/tslint.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"match-default-export-name": false,
|
|
14
14
|
"import-name": false,
|
|
15
15
|
"no-boolean-literal-compare": false,
|
|
16
|
-
"max-line-length": [
|
|
16
|
+
"max-line-length": [true, 200],
|
|
17
17
|
"semicolon": [true, "always", "ignore-bound-class-methods"],
|
|
18
18
|
"variable-name": [true, "allow-pascal-case", "allow-leading-underscore", "allow-trailing-underscore"],
|
|
19
19
|
"trailing-comma": [true, {"multiline": "never", "singleline": "never"}],
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"interface-name": [true, "always-prefix"],
|
|
33
33
|
"class-name": true,
|
|
34
34
|
"prefer-function-over-method": false,
|
|
35
|
+
"prefer-switch": [true, {"min-cases": 2}],
|
|
35
36
|
"switch-final-break": true
|
|
36
37
|
},
|
|
37
38
|
"rulesDirectory": []
|