denwa-web-shared 1.0.34 → 1.0.36

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
+ };
@@ -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
  };
@@ -278,6 +284,12 @@ const preparePageParam = (page) => {
278
284
  }
279
285
  return 1;
280
286
  };
287
+ const isNotEmptyHtml = (html) => {
288
+ return !!html && html !== '<p class="content-paragraph" ></p>';
289
+ };
290
+ const createCityLink = (city, href) => {
291
+ return `/${city}${href}`;
292
+ };
281
293
  function r(e) {
282
294
  var t, f, n = "";
283
295
  if ("string" == typeof e || "number" == typeof e) n += e;
@@ -6830,6 +6842,7 @@ const BasePicture = ({
6830
6842
  ] });
6831
6843
  };
6832
6844
  exports.BasePicture = BasePicture;
6845
+ exports.CITY_MASK = CITY_MASK;
6833
6846
  exports.THEME = THEME;
6834
6847
  exports.TIME = TIME;
6835
6848
  exports.arrayToKeyValueObject = arrayToKeyValueObject;
@@ -6837,6 +6850,7 @@ exports.checkCorrectFileObject = checkCorrectFileObject;
6837
6850
  exports.checkCorrectImageObject = checkCorrectImageObject;
6838
6851
  exports.cn = cn;
6839
6852
  exports.convertPhoneMask = convertPhoneMask;
6853
+ exports.createCityLink = createCityLink;
6840
6854
  exports.generatePaginationArray = generatePaginationArray;
6841
6855
  exports.getByKey = getByKey;
6842
6856
  exports.getImagePrefix = getImagePrefix;
@@ -6844,6 +6858,7 @@ exports.getNumberFormatter = getNumberFormatter;
6844
6858
  exports.getSubdomain = getSubdomain;
6845
6859
  exports.getUploadFileUrl = getUploadFileUrl;
6846
6860
  exports.getUploadImageUrl = getUploadImageUrl;
6861
+ exports.isNotEmptyHtml = isNotEmptyHtml;
6847
6862
  exports.parseStringToKeyValue = parseStringToKeyValue;
6848
6863
  exports.prepareColor = prepareColor;
6849
6864
  exports.prepareLocalMetaData = prepareLocalMetaData;
@@ -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
  };
@@ -276,6 +282,12 @@ const preparePageParam = (page) => {
276
282
  }
277
283
  return 1;
278
284
  };
285
+ const isNotEmptyHtml = (html) => {
286
+ return !!html && html !== '<p class="content-paragraph" ></p>';
287
+ };
288
+ const createCityLink = (city, href) => {
289
+ return `/${city}${href}`;
290
+ };
279
291
  function r(e) {
280
292
  var t, f, n = "";
281
293
  if ("string" == typeof e || "number" == typeof e) n += e;
@@ -6829,6 +6841,7 @@ const BasePicture = ({
6829
6841
  };
6830
6842
  export {
6831
6843
  BasePicture,
6844
+ CITY_MASK,
6832
6845
  THEME,
6833
6846
  TIME,
6834
6847
  arrayToKeyValueObject,
@@ -6836,6 +6849,7 @@ export {
6836
6849
  checkCorrectImageObject,
6837
6850
  cn,
6838
6851
  convertPhoneMask,
6852
+ createCityLink,
6839
6853
  generatePaginationArray,
6840
6854
  getByKey,
6841
6855
  getImagePrefix,
@@ -6843,6 +6857,7 @@ export {
6843
6857
  getSubdomain,
6844
6858
  getUploadFileUrl,
6845
6859
  getUploadImageUrl,
6860
+ isNotEmptyHtml,
6846
6861
  parseStringToKeyValue,
6847
6862
  prepareColor,
6848
6863
  prepareLocalMetaData,
@@ -134,3 +134,14 @@ export declare const arrayToKeyValueObject: <T extends string>(arr: T[]) => Reco
134
134
  * @param page - Номер страницы
135
135
  */
136
136
  export declare const preparePageParam: (page: string | number | undefined) => number;
137
+ /**
138
+ * @description Проверка html на пустоту
139
+ * @param html - Html разметка редактора
140
+ */
141
+ export declare const isNotEmptyHtml: (html: string | null | undefined) => boolean;
142
+ /**
143
+ * @description Подстановка города в путь ссылки
144
+ * @param city - Город
145
+ * @param href - Ссылка
146
+ */
147
+ export declare const createCityLink: (city: string, href: string) => string;
@@ -62,3 +62,9 @@ export type GetErrorType = ({ error, message }: {
62
62
  error?: unknown;
63
63
  message?: string;
64
64
  }) => void;
65
+ export type CityNamesType = Record<string, {
66
+ name: string;
67
+ declination: string;
68
+ region: string;
69
+ regionDeclination: string;
70
+ }>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "denwa-web-shared",
3
3
  "private": false,
4
- "version": "1.0.34",
4
+ "version": "1.0.36",
5
5
  "type": "module",
6
6
  "author": "Denwa",
7
7
  "main": "dist/denwa-web-shared.cjs.js",