@dxtmisha/functional-basic 1.8.10 → 1.10.1

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.
Files changed (199) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/ai-description.md +10 -3
  3. package/ai-mcp-resources.json +14 -2
  4. package/ai-resources/design-config.md +104 -0
  5. package/ai-resources/error-center.md +150 -0
  6. package/ai-types.md +1091 -1744
  7. package/dist/library.d.ts +9991 -189
  8. package/dist/library.js +851 -835
  9. package/package.json +7 -2
  10. package/dist/classes/Api.d.ts +0 -209
  11. package/dist/classes/ApiCache.d.ts +0 -152
  12. package/dist/classes/ApiDataReturn.d.ts +0 -79
  13. package/dist/classes/ApiDefault.d.ts +0 -49
  14. package/dist/classes/ApiError.d.ts +0 -39
  15. package/dist/classes/ApiErrorItem.d.ts +0 -70
  16. package/dist/classes/ApiErrorStorage.d.ts +0 -92
  17. package/dist/classes/ApiHeaders.d.ts +0 -37
  18. package/dist/classes/ApiHydration.d.ts +0 -40
  19. package/dist/classes/ApiInstance.d.ts +0 -299
  20. package/dist/classes/ApiPreparation.d.ts +0 -58
  21. package/dist/classes/ApiResponse.d.ts +0 -154
  22. package/dist/classes/ApiStatus.d.ts +0 -131
  23. package/dist/classes/BroadcastMessage.d.ts +0 -76
  24. package/dist/classes/Cache.d.ts +0 -39
  25. package/dist/classes/CacheItem.d.ts +0 -65
  26. package/dist/classes/CacheStatic.d.ts +0 -36
  27. package/dist/classes/Cookie.d.ts +0 -54
  28. package/dist/classes/CookieBlock.d.ts +0 -30
  29. package/dist/classes/CookieBlockInstance.d.ts +0 -24
  30. package/dist/classes/CookieStorage.d.ts +0 -175
  31. package/dist/classes/DataStorage.d.ts +0 -107
  32. package/dist/classes/Datetime.d.ts +0 -571
  33. package/dist/classes/ErrorCenter.d.ts +0 -86
  34. package/dist/classes/ErrorCenterHandler.d.ts +0 -85
  35. package/dist/classes/ErrorCenterInstance.d.ts +0 -101
  36. package/dist/classes/EventItem.d.ts +0 -230
  37. package/dist/classes/Formatters.d.ts +0 -157
  38. package/dist/classes/Geo.d.ts +0 -172
  39. package/dist/classes/GeoFlag.d.ts +0 -135
  40. package/dist/classes/GeoInstance.d.ts +0 -264
  41. package/dist/classes/GeoIntl.d.ts +0 -291
  42. package/dist/classes/GeoPhone.d.ts +0 -110
  43. package/dist/classes/GeoUnit.d.ts +0 -207
  44. package/dist/classes/Global.d.ts +0 -29
  45. package/dist/classes/Hash.d.ts +0 -57
  46. package/dist/classes/HashInstance.d.ts +0 -29
  47. package/dist/classes/Icons.d.ts +0 -128
  48. package/dist/classes/Loading.d.ts +0 -62
  49. package/dist/classes/LoadingInstance.d.ts +0 -87
  50. package/dist/classes/Meta.d.ts +0 -189
  51. package/dist/classes/MetaManager.d.ts +0 -123
  52. package/dist/classes/MetaOg.d.ts +0 -120
  53. package/dist/classes/MetaStatic.d.ts +0 -179
  54. package/dist/classes/MetaTwitter.d.ts +0 -120
  55. package/dist/classes/Query.d.ts +0 -57
  56. package/dist/classes/QueryInstance.d.ts +0 -29
  57. package/dist/classes/ResumableTimer.d.ts +0 -85
  58. package/dist/classes/ScrollbarWidth.d.ts +0 -52
  59. package/dist/classes/SearchList.d.ts +0 -132
  60. package/dist/classes/SearchListData.d.ts +0 -144
  61. package/dist/classes/SearchListItem.d.ts +0 -49
  62. package/dist/classes/SearchListMatcher.d.ts +0 -58
  63. package/dist/classes/SearchListOptions.d.ts +0 -66
  64. package/dist/classes/ServerStorage.d.ts +0 -110
  65. package/dist/classes/StorageCallback.d.ts +0 -86
  66. package/dist/classes/Translate.d.ts +0 -117
  67. package/dist/classes/TranslateFile.d.ts +0 -81
  68. package/dist/classes/TranslateInstance.d.ts +0 -203
  69. package/dist/classes/UrlInstanceAbstract.d.ts +0 -98
  70. package/dist/classes/UrlItem.d.ts +0 -119
  71. package/dist/functions/addTagHighlightMatch.d.ts +0 -11
  72. package/dist/functions/anyToString.d.ts +0 -10
  73. package/dist/functions/applyTemplate.d.ts +0 -10
  74. package/dist/functions/arrFill.d.ts +0 -9
  75. package/dist/functions/blobToBase64.d.ts +0 -9
  76. package/dist/functions/capitalize.d.ts +0 -9
  77. package/dist/functions/copyObject.d.ts +0 -10
  78. package/dist/functions/copyObjectLite.d.ts +0 -9
  79. package/dist/functions/createElement.d.ts +0 -21
  80. package/dist/functions/domContentLoaded.d.ts +0 -13
  81. package/dist/functions/domQuerySelector.d.ts +0 -8
  82. package/dist/functions/domQuerySelectorAll.d.ts +0 -8
  83. package/dist/functions/encodeAttribute.d.ts +0 -8
  84. package/dist/functions/encodeLiteAttribute.d.ts +0 -8
  85. package/dist/functions/ensureMaxSize.d.ts +0 -10
  86. package/dist/functions/escapeExp.d.ts +0 -7
  87. package/dist/functions/eventStopPropagation.d.ts +0 -7
  88. package/dist/functions/executeFunction.d.ts +0 -12
  89. package/dist/functions/executePromise.d.ts +0 -11
  90. package/dist/functions/forEach.d.ts +0 -14
  91. package/dist/functions/frame.d.ts +0 -10
  92. package/dist/functions/getArrayHighlightMatch.d.ts +0 -10
  93. package/dist/functions/getAttributes.d.ts +0 -9
  94. package/dist/functions/getClipboardData.d.ts +0 -9
  95. package/dist/functions/getColumn.d.ts +0 -10
  96. package/dist/functions/getCurrentDate.d.ts +0 -19
  97. package/dist/functions/getCurrentTime.d.ts +0 -15
  98. package/dist/functions/getElement.d.ts +0 -9
  99. package/dist/functions/getElementId.d.ts +0 -26
  100. package/dist/functions/getElementImage.d.ts +0 -8
  101. package/dist/functions/getElementItem.d.ts +0 -12
  102. package/dist/functions/getElementOrWindow.d.ts +0 -8
  103. package/dist/functions/getElementSafeScript.d.ts +0 -9
  104. package/dist/functions/getExactSearchExp.d.ts +0 -8
  105. package/dist/functions/getExp.d.ts +0 -14
  106. package/dist/functions/getFirst.d.ts +0 -8
  107. package/dist/functions/getHydrationData.d.ts +0 -10
  108. package/dist/functions/getItemByPath.d.ts +0 -9
  109. package/dist/functions/getKey.d.ts +0 -8
  110. package/dist/functions/getLast.d.ts +0 -8
  111. package/dist/functions/getLength.d.ts +0 -10
  112. package/dist/functions/getLengthOfAllArray.d.ts +0 -8
  113. package/dist/functions/getMaxLengthAllArray.d.ts +0 -9
  114. package/dist/functions/getMinLengthAllArray.d.ts +0 -8
  115. package/dist/functions/getMouseClient.d.ts +0 -9
  116. package/dist/functions/getMouseClientX.d.ts +0 -8
  117. package/dist/functions/getMouseClientY.d.ts +0 -8
  118. package/dist/functions/getObjectByKeys.d.ts +0 -8
  119. package/dist/functions/getObjectNoUndefined.d.ts +0 -9
  120. package/dist/functions/getObjectOrNone.d.ts +0 -8
  121. package/dist/functions/getOnlyText.d.ts +0 -8
  122. package/dist/functions/getRandomItem.d.ts +0 -10
  123. package/dist/functions/getRandomText.d.ts +0 -12
  124. package/dist/functions/getRequestString.d.ts +0 -11
  125. package/dist/functions/getSearchExp.d.ts +0 -12
  126. package/dist/functions/getSeparatingSearchExp.d.ts +0 -9
  127. package/dist/functions/getStepPercent.d.ts +0 -9
  128. package/dist/functions/getStepValue.d.ts +0 -9
  129. package/dist/functions/goScroll.d.ts +0 -10
  130. package/dist/functions/goScrollSmooth.d.ts +0 -10
  131. package/dist/functions/goScrollTo.d.ts +0 -10
  132. package/dist/functions/handleShare.d.ts +0 -10
  133. package/dist/functions/inArray.d.ts +0 -9
  134. package/dist/functions/initScrollbarOffset.d.ts +0 -7
  135. package/dist/functions/intersectKey.d.ts +0 -9
  136. package/dist/functions/isApiSuccess.d.ts +0 -9
  137. package/dist/functions/isArray.d.ts +0 -8
  138. package/dist/functions/isDifferent.d.ts +0 -10
  139. package/dist/functions/isDomData.d.ts +0 -7
  140. package/dist/functions/isDomRuntime.d.ts +0 -10
  141. package/dist/functions/isElementVisible.d.ts +0 -11
  142. package/dist/functions/isEnter.d.ts +0 -9
  143. package/dist/functions/isFilled.d.ts +0 -10
  144. package/dist/functions/isFloat.d.ts +0 -8
  145. package/dist/functions/isFunction.d.ts +0 -9
  146. package/dist/functions/isInDom.d.ts +0 -9
  147. package/dist/functions/isInput.d.ts +0 -8
  148. package/dist/functions/isIntegerBetween.d.ts +0 -9
  149. package/dist/functions/isMetaKey.d.ts +0 -8
  150. package/dist/functions/isNull.d.ts +0 -9
  151. package/dist/functions/isNumber.d.ts +0 -8
  152. package/dist/functions/isObject.d.ts +0 -8
  153. package/dist/functions/isObjectNotArray.d.ts +0 -8
  154. package/dist/functions/isOnLine.d.ts +0 -7
  155. package/dist/functions/isSelected.d.ts +0 -9
  156. package/dist/functions/isSelectedByList.d.ts +0 -9
  157. package/dist/functions/isShare.d.ts +0 -7
  158. package/dist/functions/isString.d.ts +0 -8
  159. package/dist/functions/isTab.d.ts +0 -8
  160. package/dist/functions/isWindow.d.ts +0 -7
  161. package/dist/functions/random.d.ts +0 -9
  162. package/dist/functions/removeCommonPrefix.d.ts +0 -9
  163. package/dist/functions/replaceComponentName.d.ts +0 -9
  164. package/dist/functions/replaceRecursive.d.ts +0 -11
  165. package/dist/functions/replaceTemplate.d.ts +0 -10
  166. package/dist/functions/resizeImageByMax.d.ts +0 -19
  167. package/dist/functions/secondToTime.d.ts +0 -9
  168. package/dist/functions/setElementItem.d.ts +0 -11
  169. package/dist/functions/setValues.d.ts +0 -18
  170. package/dist/functions/sleep.d.ts +0 -8
  171. package/dist/functions/sortList.d.ts +0 -11
  172. package/dist/functions/splice.d.ts +0 -13
  173. package/dist/functions/strFill.d.ts +0 -9
  174. package/dist/functions/strSplit.d.ts +0 -12
  175. package/dist/functions/toArray.d.ts +0 -17
  176. package/dist/functions/toCamelCase.d.ts +0 -8
  177. package/dist/functions/toCamelCaseFirst.d.ts +0 -8
  178. package/dist/functions/toDate.d.ts +0 -8
  179. package/dist/functions/toKebabCase.d.ts +0 -15
  180. package/dist/functions/toNumber.d.ts +0 -19
  181. package/dist/functions/toNumberByMax.d.ts +0 -11
  182. package/dist/functions/toNumberPositive.d.ts +0 -9
  183. package/dist/functions/toPercent.d.ts +0 -9
  184. package/dist/functions/toPercentBy100.d.ts +0 -9
  185. package/dist/functions/toString.d.ts +0 -8
  186. package/dist/functions/transformation.d.ts +0 -21
  187. package/dist/functions/uint8ArrayToBase64.d.ts +0 -8
  188. package/dist/functions/uniqueArray.d.ts +0 -8
  189. package/dist/functions/writeClipboardData.d.ts +0 -8
  190. package/dist/media/errorCauseList.d.ts +0 -2
  191. package/dist/types/apiTypes.d.ts +0 -259
  192. package/dist/types/basicTypes.d.ts +0 -131
  193. package/dist/types/errorCenterTypes.d.ts +0 -50
  194. package/dist/types/formattersTypes.d.ts +0 -224
  195. package/dist/types/geoTypes.d.ts +0 -142
  196. package/dist/types/metaTypes.d.ts +0 -586
  197. package/dist/types/searchTypes.d.ts +0 -53
  198. package/dist/types/sortTypes.d.ts +0 -20
  199. package/dist/types/translateTypes.d.ts +0 -54
@@ -1,224 +0,0 @@
1
- import { ArrayToItem } from './basicTypes';
2
- import { GeoDate } from './geoTypes';
3
- /**
4
- * Enumeration of available formatter types.
5
- *
6
- * Перечисление доступных типов форматировщиков.
7
- */
8
- export declare enum FormattersType {
9
- /** Currency formatting / Форматирование валюты. */
10
- currency = "currency",
11
- /** Date formatting / Форматирование даты. */
12
- date = "date",
13
- /** Name formatting / Форматирование имени. */
14
- name = "name",
15
- /** Number formatting / Форматирование чисел. */
16
- number = "number",
17
- /** Plural forms formatting / Форматирование форм множественного числа. */
18
- plural = "plural",
19
- /** Unit formatting (e.g., meters, kilograms) / Форматирование единиц измерения (например, метры, килограммы). */
20
- unit = "unit"
21
- }
22
- /**
23
- * Options for currency formatting.
24
- *
25
- * Параметры для форматирования валюты.
26
- */
27
- export type FormattersOptionsCurrency = {
28
- /** The name of the property in the data item that contains the currency code / Имя свойства в элементе данных, которое содержит код валюты. */
29
- currencyPropName?: string;
30
- /** Currency code or international number format options / Код валюты или международные параметры форматирования чисел. */
31
- options?: string | Intl.NumberFormatOptions;
32
- /** If true, only the numeric value will be returned / Если true, будет возвращено только числовое значение. */
33
- numberOnly?: boolean;
34
- };
35
- /**
36
- * Options for date formatting.
37
- *
38
- * Параметры для форматирования даты.
39
- */
40
- export type FormattersOptionsDate = {
41
- /** The type of date representation / Тип представления даты. */
42
- type?: GeoDate;
43
- /** International date-time format options / Междунар. параметры форматирования даты и времени. */
44
- options?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions;
45
- /** Use 24-hour format if true / Использовать 24-часовой формат, если true. */
46
- hour24?: boolean;
47
- };
48
- /**
49
- * Options for name formatting.
50
- *
51
- * Параметры для форматирования имени.
52
- */
53
- export type FormattersOptionsName = {
54
- /** Property name for the last name / Имя свойства для фамилии. */
55
- lastPropName?: string;
56
- /** Property name for the first name / Имя свойства для имени. */
57
- firstPropName?: string;
58
- /** Property name for the middle name / Имя свойства для отчества. */
59
- surname?: string;
60
- /** If true, returns a short version of the name / Если true, возвращает сокращенную версию имени. */
61
- short?: boolean;
62
- };
63
- /**
64
- * Options for number formatting.
65
- *
66
- * Параметры для форматирования чисел.
67
- */
68
- export type FormattersOptionsNumber = {
69
- /** International number format options / Междунар. параметры форматирования чисел. */
70
- options?: Intl.NumberFormatOptions;
71
- };
72
- /**
73
- * Options for plural forms formatting.
74
- *
75
- * Параметры для форматирования форм множественного числа.
76
- */
77
- export type FormattersOptionsPlural = {
78
- /** A string containing plural forms / Строка, содержащая формы множественного числа. */
79
- words: string;
80
- /** International plural rules options / Междунар. параметры правил множественного числа. */
81
- options?: Intl.PluralRulesOptions;
82
- /** International number format options for the numeric part / Междунар. параметры форматирования чисел для числовой части. */
83
- optionsNumber?: Intl.NumberFormatOptions;
84
- };
85
- /**
86
- * Options for unit formatting.
87
- *
88
- * Параметры для форматирования единиц измерения.
89
- */
90
- export type FormattersOptionsUnit = {
91
- /** The unit to format or international number format options / Ед. изм. для форматирования или междунар. параметры форматирования чисел. */
92
- unit: string | Intl.NumberFormatOptions;
93
- };
94
- /**
95
- * Mapping of formatter types to their respective option types.
96
- *
97
- * Соответствие типов форматировщиков их типам параметров.
98
- *
99
- * @template Type - The formatter type / Тип форматировщика.
100
- */
101
- export type FormattersOptionsInformation<Type extends FormattersType> = Type extends FormattersType.currency ? FormattersOptionsCurrency : Type extends FormattersType.date ? FormattersOptionsDate : Type extends FormattersType.name ? FormattersOptionsName : Type extends FormattersType.number ? FormattersOptionsNumber : Type extends FormattersType.plural ? FormattersOptionsPlural : Type extends FormattersType.unit ? FormattersOptionsUnit : Record<string, any>;
102
- /**
103
- * Configuration for a single property formatter.
104
- *
105
- * Конфигурация для форматировщика одного свойства.
106
- *
107
- * @template Type - The type of formatter / Тип форматировщика.
108
- * @template R - The return type / Возвращаемый тип.
109
- */
110
- export type FormattersOptionsItem<Type extends FormattersType = FormattersType, R = string> = {
111
- /** The type of formatter / Тип форматировщика. */
112
- type?: Type;
113
- /** Custom transformation function / Пользовательская функция преобразования. */
114
- transformation?: (valueOriginal: any, item: any, options?: FormattersOptionsInformation<Type>) => R;
115
- /** Options for the specified formatter type / Параметры для указанного типа форматировщика. */
116
- options?: FormattersOptionsInformation<Type>;
117
- };
118
- /**
119
- * A dictionary mapping property paths to their formatting configurations.
120
- *
121
- * Словарь, сопоставляющий пути к свойствам с их конфигурациями форматирования.
122
- */
123
- export type FormattersOptionsList = Record<string, FormattersOptionsItem>;
124
- /**
125
- * Represents a single data item as a key-value record.
126
- *
127
- * Представляет один элемент данных как запись "ключ-значение".
128
- */
129
- export type FormattersListItem = Record<string, any>;
130
- /**
131
- * An array of data items to be formatted.
132
- *
133
- * Массив элементов данных для форматирования.
134
- *
135
- * @template Item - The type of data items / Тип элементов данных.
136
- */
137
- export type FormattersList<Item extends FormattersListItem> = Item[];
138
- /**
139
- * Utility type to capitalize a camelCase or dot-notated string.
140
- *
141
- * Вспомогательный тип для капитализации строки.
142
- *
143
- * @template K - The string to capitalize / Строка для капитализации.
144
- */
145
- export type FormattersCapitalize<K extends string> = K extends `${infer First}.${infer Rest}` ? `${First}${Capitalize<FormattersCapitalize<Rest>>}` : K;
146
- /**
147
- * Utility type to extract column keys from formatting options.
148
- *
149
- * Вспомогательный тип для извлечения ключей столбцов.
150
- *
151
- * @template T - The formatting options list type / Тип списка параметров форматирования.
152
- */
153
- export type FormattersColumns<T extends FormattersOptionsList> = (keyof T & string)[];
154
- /**
155
- * Utility type to generate a formatted property key.
156
- *
157
- * Вспомогательный тип для генерации ключа отформатированного свойства.
158
- *
159
- * @template K - The original property key / Ключ исходного свойства.
160
- * @template A - The suffix to add / Суффикс.
161
- */
162
- export type FormattersKey<K, A extends string = 'Format'> = K extends string ? `${FormattersCapitalize<K>}${A}` : never;
163
- /**
164
- * Represents a data item with additional formatted properties.
165
- *
166
- * Представляет элемент данных с доп. отформатированными свойствами.
167
- *
168
- * @template T - The original item type / Исходный тип элемента.
169
- * @template KT - Array of property keys / Массив ключей свойств.
170
- */
171
- export type FormattersDataItem<T extends FormattersListItem, KT extends string[]> = {
172
- [K in keyof T | FormattersKey<KT[number]>]: K extends keyof T ? T[K] : string;
173
- };
174
- /**
175
- * An array of data items with additional formatted properties.
176
- *
177
- * Массив элементов данных с доп. отформатированными свойствами.
178
- *
179
- * @template T - The original item type / Исходный тип элемента.
180
- * @template K - Array of property keys / Массив ключей свойств.
181
- */
182
- export type FormattersListFormat<T extends FormattersListItem, K extends string[]> = FormattersDataItem<T, K>[];
183
- /**
184
- * A single data item formatted based on the provided options list.
185
- *
186
- * Один элемент данных, отформатированный на основе параметров.
187
- *
188
- * @template T - The original item type / Исходный тип элемента.
189
- * @template O - The formatting options / Параметры форматирования.
190
- */
191
- export type FormattersListColumnItem<T extends FormattersListItem, O extends FormattersOptionsList> = FormattersDataItem<T, FormattersColumns<O>>;
192
- /**
193
- * A list of data items formatted based on the provided options list.
194
- *
195
- * Список элементов данных, отформатированных на основе параметров.
196
- *
197
- * @template T - The original item type / Исходный тип элемента.
198
- * @template O - The formatting options / Параметры форматирования.
199
- */
200
- export type FormattersListColumns<T extends FormattersListItem, O extends FormattersOptionsList> = FormattersListFormat<T, FormattersColumns<O>>;
201
- /**
202
- * Possible formats for input data: either a single item or a list of items.
203
- *
204
- * Возможные форматы входных данных: либо один элемент, либо список элементов.
205
- */
206
- export type FormattersListProp = FormattersList<FormattersListItem> | FormattersListItem;
207
- /**
208
- * Extracts the single item type from a single item or a list of items.
209
- *
210
- * Извлекает тип одного элемента из одного элемента или из списка элементов.
211
- *
212
- * @template List - The type of the input data / Тип входных данных.
213
- */
214
- export type FormattersItemProp<List extends FormattersListProp> = ArrayToItem<List>;
215
- /**
216
- * The return type of the formatter, matching the structure of the input data.
217
- *
218
- * Возвращаемый тип форматировщика, соответствующий структуре входных данных.
219
- *
220
- * @template List - The input data type / Тип входных данных.
221
- * @template Options - The formatting options / Параметры форматирования.
222
- * @template Item - The type of a single item / Тип одного элемента.
223
- */
224
- export type FormattersReturn<List extends FormattersListProp, Options extends FormattersOptionsList = FormattersOptionsList, Item extends FormattersItemProp<List> = FormattersItemProp<List>> = List extends any[] ? FormattersListColumns<Item, Options> : (FormattersListColumnItem<Item, Options> | undefined);
@@ -1,142 +0,0 @@
1
- /**
2
- * Union type for date format options in geographic context /
3
- * Объединенный тип для опций формата даты в географическом контексте
4
- */
5
- export type GeoDate = 'full' | 'datetime' | 'date' | 'year-month' | 'year' | 'month' | 'day' | 'day-month' | 'time' | 'hour-minute' | 'hour' | 'minute' | 'second';
6
- /** First day of week code (0 = Sunday, 1 = Monday, 6 = Saturday) / Код первого дня недели (0 = воскресенье, 1 = понедельник, 6 = суббота) */
7
- export type GeoFirstDay = 1 | 6 | 0;
8
- /** Hour format type (12-hour or 24-hour) / Тип формата часов (12-часовой или 24-часовой) */
9
- export type GeoHours = '12' | '24';
10
- /** Timezone display style options / Опции стиля отображения часового пояса */
11
- export type GeoTimeZoneStyle = 'minute' | 'hour' | 'ISO8601' | 'RFC';
12
- /** Geographic item interface for country and language data / Интерфейс географического элемента для данных страны и языка */
13
- export interface GeoItem {
14
- /** Country code / Код страны */
15
- country: string;
16
- /** Alternative country codes / Альтернативные коды стран */
17
- countryAlternative?: string[];
18
- /** Language code / Код языка */
19
- language: string;
20
- /** Alternative language codes / Альтернативные коды языков */
21
- languageAlternative?: string[];
22
- /** First day of week / Первый день недели */
23
- firstDay?: string | null;
24
- /** Timezone / Часовой пояс */
25
- zone?: string | null;
26
- /** Phone country code / Телефонный код страны */
27
- phoneCode?: string;
28
- /** Phone code for domestic calls / Телефонный код для внутренних звонков */
29
- phoneWithin?: string;
30
- /** Phone number mask / Маска телефонного номера */
31
- phoneMask?: string | string[];
32
- /** Name format pattern / Шаблон формата имени */
33
- nameFormat?: 'fl' | 'fsl' | 'lf' | 'lsf' | string;
34
- /** Units of measurement configuration / Конфигурация единиц измерения */
35
- unit?: {
36
- /** Millimeter unit format or symbol / Формат или символ единицы измерения миллиметра */
37
- 'millimeter'?: string;
38
- /** Centimeter unit format or symbol / Формат или символ единицы измерения сантиметра */
39
- 'centimeter'?: string;
40
- /** Meter unit format or symbol / Формат или символ единицы измерения метра */
41
- 'meter'?: string;
42
- /** Kilometer unit format or symbol / Формат или символ единицы измерения километра */
43
- 'kilometer'?: string;
44
- /** Square meter unit format or symbol / Формат или символ единицы измерения квадратного метра */
45
- 'square-meter'?: string;
46
- /** Hectare unit format or symbol / Формат или символ единицы измерения гектара */
47
- 'hectare'?: string;
48
- /** Gram unit format or symbol / Формат или символ единицы измерения грамма */
49
- 'gram'?: string;
50
- /** Kilogram unit format or symbol / Формат или символ единицы измерения килограмма */
51
- 'kilogram'?: string;
52
- /** Tonne unit format or symbol / Формат или символ единицы измерения тонны */
53
- 'tonne'?: string;
54
- /** Milliliter unit format or symbol / Формат или символ единицы измерения миллилитра */
55
- 'milliliter'?: string;
56
- /** Liter unit format or symbol / Формат или символ единицы измерения литра */
57
- 'liter'?: string;
58
- /** Celsius unit format or symbol / Формат или символ единицы измерения градуса Цельсия */
59
- 'celsius'?: string;
60
- /** Kilometer per hour unit format or symbol / Формат или символ единицы измерения километра в час */
61
- 'kilometer-per-hour'?: string;
62
- };
63
- }
64
- /** Extended geographic item with required fields / Расширенный географический элемент с обязательными полями */
65
- export interface GeoItemFull extends Omit<GeoItem, 'firstDay'> {
66
- /** Standard locale code / Стандартный код локали */
67
- standard: string;
68
- /** First day of week (required) / Первый день недели (обязательный) */
69
- firstDay: string;
70
- /** Current location string / Строка текущего местоположения */
71
- location: string;
72
- /** Current country code from location / Текущий код страны из местоположения */
73
- locationCountry: string;
74
- /** Current language code from location / Текущий код языка из местоположения */
75
- locationLanguage: string;
76
- }
77
- /** Geographic flag item for country flag display / Элемент географического флага для отображения флага страны */
78
- export interface GeoFlagItem {
79
- /** Language name / Название языка */
80
- language: string;
81
- /** Language code / Код языка */
82
- languageCode: string;
83
- /** Country name / Название страны */
84
- country: string;
85
- /** Country code / Код страны */
86
- countryCode: string;
87
- /** Standard locale code / Стандартный код локали */
88
- standard: string;
89
- /** Flag icon identifier / Идентификатор иконки флага */
90
- icon?: string;
91
- /** Display label / Отображаемая метка */
92
- label: string;
93
- /** Value for selection / Значение для выбора */
94
- value: string;
95
- /** Phone country code / Телефонный код страны */
96
- phoneCode?: string;
97
- }
98
- /**
99
- * Extended geographic flag item with national language information /
100
- * Расширенный элемент географического флага с информацией о национальном языке
101
- */
102
- export interface GeoFlagNational extends GeoFlagItem {
103
- /** Description in national language / Описание на национальном языке */
104
- description: string;
105
- /** Language name in national language / Название языка на национальном языке */
106
- nationalLanguage: string;
107
- /** Country name in national language / Название страны на национальном языке */
108
- nationalCountry: string;
109
- }
110
- /** Phone configuration metadata for a country / Структура метаданных для конфигурации телефона страны */
111
- export interface GeoPhoneValue {
112
- /** Phone country code (e.g., 7) / Телефонный код страны (например, 7) */
113
- phone: number;
114
- /** Internal dialing rule code / Код внутреннего правила набора */
115
- within: number;
116
- /** Array of mask patterns assigned to the country / Массив паттернов масок, закрепленных за страной */
117
- mask: string[];
118
- /** Country identifier (ISO 3166) / Идентификатор страны (ISO 3166) */
119
- value: string;
120
- }
121
- /** Node in the internal phone prefix tree (Trie) / Узел внутреннего префиксного дерева телефонов (Trie) */
122
- export interface GeoPhoneMap {
123
- /** List of all items available in this branch of the tree / Список всех элементов, доступных в данной ветви дерева */
124
- items: GeoPhoneValue[];
125
- /** Phone metadata if the current node is a complete code / Метаданные телефона, если текущий узел является завершенным кодом */
126
- info: GeoPhoneValue | undefined;
127
- /** Country identifier for this node / Идентификатор страны для данного узла */
128
- value: string | undefined;
129
- /** Array of masks with substituted internal symbols / Массив масок с подставленными спецсимволами */
130
- mask: string[];
131
- /** Full masks including the international code / Полные маски, включая международный код */
132
- maskFull: string[];
133
- /** Pointers to the next digits in the search tree / Указатели на следующие цифры номера в дереве поиска */
134
- next: Record<string, GeoPhoneMap>;
135
- }
136
- /** Result of searching a country by phone number / Результат поиска страны по номеру телефона */
137
- export interface GeoPhoneMapInfo {
138
- /** The found tree node with country and mask information / Найденный узел дерева с информацией о стране и масках */
139
- item?: GeoPhoneMap;
140
- /** The remaining part of the number after separating the country code / Оставшаяся часть номера после отделения кода страны */
141
- phone?: string;
142
- }