@dxtmisha/functional-basic 1.3.5 → 1.3.7
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/CHANGELOG.md +10 -0
- package/ai-description.txt +21 -7
- package/ai-types.txt +686 -103
- package/dist/library.js +633 -624
- package/dist/src/classes/Geo.d.ts +7 -0
- package/dist/src/classes/GeoInstance.d.ts +33 -0
- package/package.json +1 -1
|
@@ -148,4 +148,11 @@ export declare class Geo {
|
|
|
148
148
|
* @param timezone timezone offset in minutes / смещение часового пояса в минутах
|
|
149
149
|
*/
|
|
150
150
|
static setTimezone(timezone: number): void;
|
|
151
|
+
/**
|
|
152
|
+
* Sets the default value for the country code.
|
|
153
|
+
*
|
|
154
|
+
* Устанавливает значение по умолчанию для кода страны.
|
|
155
|
+
* @param code default code value / значение кода по умолчанию
|
|
156
|
+
*/
|
|
157
|
+
static setValueDefault(code?: string): void;
|
|
151
158
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { GeoItem, GeoItemFull } from '../types/geoTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Cookie key for storing the geo code/
|
|
4
|
+
* Ключ куки для хранения кода гео
|
|
5
|
+
*/
|
|
6
|
+
export declare const UI_GEO_COOKIE_KEY = "ui-geo-code";
|
|
2
7
|
/**
|
|
3
8
|
* Base class for working with geographic data.
|
|
4
9
|
* Includes methods for determining location, language, and time zone.
|
|
@@ -17,6 +22,11 @@ export declare class GeoInstance {
|
|
|
17
22
|
* Текущий код локации (например, 'en-GB')
|
|
18
23
|
*/
|
|
19
24
|
private location;
|
|
25
|
+
/**
|
|
26
|
+
* Value by default for the country code/
|
|
27
|
+
* Значение по умолчанию для кода страны
|
|
28
|
+
*/
|
|
29
|
+
private valueDefault?;
|
|
20
30
|
/**
|
|
21
31
|
* Detailed data about the current country/
|
|
22
32
|
* Детальные данные о текущей стране
|
|
@@ -173,6 +183,20 @@ export declare class GeoInstance {
|
|
|
173
183
|
* @param timezone new time zone offset / новое смещение часового пояса
|
|
174
184
|
*/
|
|
175
185
|
setTimezone(timezone: number): void;
|
|
186
|
+
/**
|
|
187
|
+
* Sets the default value for the country code.
|
|
188
|
+
*
|
|
189
|
+
* Устанавливает значение по умолчанию для кода страны.
|
|
190
|
+
* @param code default code value / значение кода по умолчанию
|
|
191
|
+
*/
|
|
192
|
+
setValueDefault(code?: string): void;
|
|
193
|
+
/**
|
|
194
|
+
* Internal method to get the geo cookie instance.
|
|
195
|
+
*
|
|
196
|
+
* Внутренний метод для получения экземпляра гео-куки.
|
|
197
|
+
* @returns Cookie instance for geo code / экземпляр куки для гео-кода
|
|
198
|
+
*/
|
|
199
|
+
private getCookie;
|
|
176
200
|
/**
|
|
177
201
|
* Internal method to determine the initial location.
|
|
178
202
|
*
|
|
@@ -180,6 +204,15 @@ export declare class GeoInstance {
|
|
|
180
204
|
* @returns initial location code / начальный код локации
|
|
181
205
|
*/
|
|
182
206
|
private findLocation;
|
|
207
|
+
/**
|
|
208
|
+
* Internal method to determine the location from DOM-specific sources.
|
|
209
|
+
* Returns an empty string (falsy) when not in a DOM runtime.
|
|
210
|
+
*
|
|
211
|
+
* Внутренний метод для определения местоположения из DOM-источников.
|
|
212
|
+
* Возвращает пустую строку (falsy) вне DOM-окружения.
|
|
213
|
+
* @returns location code from DOM or empty string / код локации из DOM или пустая строка
|
|
214
|
+
*/
|
|
215
|
+
private findLocationDom;
|
|
183
216
|
/**
|
|
184
217
|
* Internal method to determine the language from the provided code.
|
|
185
218
|
*
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxtmisha/functional-basic",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.7",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Foundational utility library for modern web development — HTTP client, geolocation, i18n, SEO meta tags, caching, storage, DOM utilities, and more. Framework-agnostic, zero dependencies, TypeScript-first.",
|
|
7
7
|
"keywords": [
|