@bytebrand/fe-ui-core-autobahn 1.0.53 → 1.0.54
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/constants/core.js +2 -1
- package/constants/core.ts +1 -1
- package/package.json +1 -1
- package/utils/DateUtils.ts +1 -1
package/constants/core.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var _a;
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.checkoutSubStep = exports.checkoutSteps = exports.checkoutStepUrls = exports.checkoutWarranties = exports.aboFaq = exports.aboIncludedServices = exports.aboColorOptions = exports.comparableKeys = exports.checkoutOffers = exports.offers = exports.WLTP_ENERGY_EFFICIENCY_CLASS = exports.DELIVERY_PERIODS_EXTRA = exports.GENERAL_INSPECTION_KEY = exports.PARTICULATE_FILTER_KEY = exports.EMISSION_STICKER_KEY = exports.EMISSION_CLASS_KEY = exports.CONSUMPTION_KEY = exports.ONLINE_SINCE_KEY = exports.COLUMN_STYLES = exports.ROW_STYLES = exports.DEFAULT_LANG = exports.LOCAL_STORAGE_KEY = exports.CONTAINER_STYLES = exports.PREDICTABLE_PRICE_INDEX = exports.THOUSAND = exports.HUNDRED = exports.FOURTEEN = exports.FIFTEEN = exports.FIVE = exports.FOUR = exports.THREE = exports.N = void 0;
|
|
4
5
|
const selectors_1 = require("./selectors");
|
|
@@ -41,7 +42,7 @@ exports.LOCAL_STORAGE_KEY = {
|
|
|
41
42
|
JWT_USER_NAME_KEY: 'auto_jwt_username',
|
|
42
43
|
i18n_KEY: 'i18nLanguage'
|
|
43
44
|
};
|
|
44
|
-
exports.DEFAULT_LANG = typeof window !== 'undefined' ? window.localStorage.getItem(exports.LOCAL_STORAGE_KEY.i18n_KEY) : 'de';
|
|
45
|
+
exports.DEFAULT_LANG = (_a = (typeof window !== 'undefined' ? window.localStorage.getItem(exports.LOCAL_STORAGE_KEY.i18n_KEY) : null)) !== null && _a !== void 0 ? _a : 'de';
|
|
45
46
|
exports.ROW_STYLES = {
|
|
46
47
|
marginBottom: 10
|
|
47
48
|
};
|
package/constants/core.ts
CHANGED
|
@@ -35,7 +35,7 @@ export const LOCAL_STORAGE_KEY = {
|
|
|
35
35
|
i18n_KEY: 'i18nLanguage'
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
export const DEFAULT_LANG: string = typeof window !== 'undefined' ? window.localStorage.getItem(LOCAL_STORAGE_KEY.i18n_KEY) : 'de';
|
|
38
|
+
export const DEFAULT_LANG: string = (typeof window !== 'undefined' ? window.localStorage.getItem(LOCAL_STORAGE_KEY.i18n_KEY) : null) ?? 'de';
|
|
39
39
|
|
|
40
40
|
export const ROW_STYLES = {
|
|
41
41
|
marginBottom: 10
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bytebrand/fe-ui-core-autobahn",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.54",
|
|
4
4
|
"description": "auto.de md3 (Autobahn) design system — UI primitives, cards, chrome, VDP modules, theme CSS and locales. Ships raw TypeScript source (like fe-ui-core before it); each consumer's bundler compiles it. A small set of pure, asset-require-free leaf modules (see tsconfig.node-safe.json) additionally ship a compiled .js/.d.ts sibling next to their .ts source, so plain-Node backends (e.g. image-generator's Meta AIA renderer) can require() them directly without a bundler — frontend consumers are unaffected (webpack resolves .ts/.tsx before .js).",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"scripts": {
|
package/utils/DateUtils.ts
CHANGED
|
@@ -21,7 +21,7 @@ export const formatTimestamp = ({ timestamp, format = 'X', parseFormat }: IForma
|
|
|
21
21
|
// try to parse number timestamp as unix timestamp in case if parseFormat is not specified
|
|
22
22
|
// use undefined for string timestamps with no parseFormat in hope that it will either be
|
|
23
23
|
// ISO 8601 or RFC 2822 and moment will be able to figure it out
|
|
24
|
-
let parseAs: string = parseFormat;
|
|
24
|
+
let parseAs: string | undefined = parseFormat;
|
|
25
25
|
if (!parseFormat && typeof timestamp === 'number') parseAs = 'X';
|
|
26
26
|
return moment.utc(timestamp, parseAs).format(format);
|
|
27
27
|
};
|