denwa-web-shared 1.0.35 → 1.0.37
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.
|
@@ -37,3 +37,9 @@ export declare const THEME: {
|
|
|
37
37
|
8: number;
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
|
+
export declare const CITY_MASK: {
|
|
41
|
+
readonly CITY: "{{CITY}}";
|
|
42
|
+
readonly CITY_DECL: "{{CITY_DECL}}";
|
|
43
|
+
readonly CITY_REGION: "{{CITY_REGION}}";
|
|
44
|
+
readonly CITY_REGION_DECL: "{{CITY_REGION_DECL}}";
|
|
45
|
+
};
|
package/dist/server/index.cjs.js
CHANGED
|
@@ -40,6 +40,12 @@ const THEME = {
|
|
|
40
40
|
8: 64
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
+
const CITY_MASK = {
|
|
44
|
+
CITY: "{{CITY}}",
|
|
45
|
+
CITY_DECL: "{{CITY_DECL}}",
|
|
46
|
+
CITY_REGION: "{{CITY_REGION}}",
|
|
47
|
+
CITY_REGION_DECL: "{{CITY_REGION_DECL}}"
|
|
48
|
+
};
|
|
43
49
|
const getNumberFormatter = (local) => {
|
|
44
50
|
return new Intl.NumberFormat(local);
|
|
45
51
|
};
|
|
@@ -81,6 +87,7 @@ const updateTextByTemplate = ({
|
|
|
81
87
|
const key = SUBDOMAIN_NAME[subdomain];
|
|
82
88
|
if (!subdomain || !key) return text;
|
|
83
89
|
const subdomainData = getByKey(SUBDOMAIN_NAME, subdomain);
|
|
90
|
+
if (!subdomainData) return text;
|
|
84
91
|
let result = text;
|
|
85
92
|
const { name, declination, region, regionDeclination } = subdomainData;
|
|
86
93
|
const cityReg = new RegExp(SUBDOMAIN_MASK.CITY, "g");
|
|
@@ -6836,6 +6843,7 @@ const BasePicture = ({
|
|
|
6836
6843
|
] });
|
|
6837
6844
|
};
|
|
6838
6845
|
exports.BasePicture = BasePicture;
|
|
6846
|
+
exports.CITY_MASK = CITY_MASK;
|
|
6839
6847
|
exports.THEME = THEME;
|
|
6840
6848
|
exports.TIME = TIME;
|
|
6841
6849
|
exports.arrayToKeyValueObject = arrayToKeyValueObject;
|
package/dist/server/index.es.js
CHANGED
|
@@ -38,6 +38,12 @@ const THEME = {
|
|
|
38
38
|
8: 64
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
+
const CITY_MASK = {
|
|
42
|
+
CITY: "{{CITY}}",
|
|
43
|
+
CITY_DECL: "{{CITY_DECL}}",
|
|
44
|
+
CITY_REGION: "{{CITY_REGION}}",
|
|
45
|
+
CITY_REGION_DECL: "{{CITY_REGION_DECL}}"
|
|
46
|
+
};
|
|
41
47
|
const getNumberFormatter = (local) => {
|
|
42
48
|
return new Intl.NumberFormat(local);
|
|
43
49
|
};
|
|
@@ -79,6 +85,7 @@ const updateTextByTemplate = ({
|
|
|
79
85
|
const key = SUBDOMAIN_NAME[subdomain];
|
|
80
86
|
if (!subdomain || !key) return text;
|
|
81
87
|
const subdomainData = getByKey(SUBDOMAIN_NAME, subdomain);
|
|
88
|
+
if (!subdomainData) return text;
|
|
82
89
|
let result = text;
|
|
83
90
|
const { name, declination, region, regionDeclination } = subdomainData;
|
|
84
91
|
const cityReg = new RegExp(SUBDOMAIN_MASK.CITY, "g");
|
|
@@ -6835,6 +6842,7 @@ const BasePicture = ({
|
|
|
6835
6842
|
};
|
|
6836
6843
|
export {
|
|
6837
6844
|
BasePicture,
|
|
6845
|
+
CITY_MASK,
|
|
6838
6846
|
THEME,
|
|
6839
6847
|
TIME,
|
|
6840
6848
|
arrayToKeyValueObject,
|
|
@@ -9,7 +9,7 @@ export declare const getNumberFormatter: (local: string) => Intl.NumberFormat;
|
|
|
9
9
|
* @param obj - Объект
|
|
10
10
|
* @param key - Ключ
|
|
11
11
|
*/
|
|
12
|
-
export declare const getByKey: <T extends object, K extends keyof T>(obj: T, key: K) => T[K];
|
|
12
|
+
export declare const getByKey: <T extends object, K extends keyof T>(obj: T, key: K | string) => T[K] | undefined;
|
|
13
13
|
/**
|
|
14
14
|
* @description Преобразует value у инпута в поле маски телефона
|
|
15
15
|
* @param eventValue - исходное значение инпута
|