@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.
- package/CHANGELOG.md +32 -0
- package/ai-description.md +10 -3
- package/ai-mcp-resources.json +14 -2
- package/ai-resources/design-config.md +104 -0
- package/ai-resources/error-center.md +150 -0
- package/ai-types.md +1091 -1744
- package/dist/library.d.ts +9991 -189
- package/dist/library.js +851 -835
- package/package.json +7 -2
- package/dist/classes/Api.d.ts +0 -209
- package/dist/classes/ApiCache.d.ts +0 -152
- package/dist/classes/ApiDataReturn.d.ts +0 -79
- package/dist/classes/ApiDefault.d.ts +0 -49
- package/dist/classes/ApiError.d.ts +0 -39
- package/dist/classes/ApiErrorItem.d.ts +0 -70
- package/dist/classes/ApiErrorStorage.d.ts +0 -92
- package/dist/classes/ApiHeaders.d.ts +0 -37
- package/dist/classes/ApiHydration.d.ts +0 -40
- package/dist/classes/ApiInstance.d.ts +0 -299
- package/dist/classes/ApiPreparation.d.ts +0 -58
- package/dist/classes/ApiResponse.d.ts +0 -154
- package/dist/classes/ApiStatus.d.ts +0 -131
- package/dist/classes/BroadcastMessage.d.ts +0 -76
- package/dist/classes/Cache.d.ts +0 -39
- package/dist/classes/CacheItem.d.ts +0 -65
- package/dist/classes/CacheStatic.d.ts +0 -36
- package/dist/classes/Cookie.d.ts +0 -54
- package/dist/classes/CookieBlock.d.ts +0 -30
- package/dist/classes/CookieBlockInstance.d.ts +0 -24
- package/dist/classes/CookieStorage.d.ts +0 -175
- package/dist/classes/DataStorage.d.ts +0 -107
- package/dist/classes/Datetime.d.ts +0 -571
- package/dist/classes/ErrorCenter.d.ts +0 -86
- package/dist/classes/ErrorCenterHandler.d.ts +0 -85
- package/dist/classes/ErrorCenterInstance.d.ts +0 -101
- package/dist/classes/EventItem.d.ts +0 -230
- package/dist/classes/Formatters.d.ts +0 -157
- package/dist/classes/Geo.d.ts +0 -172
- package/dist/classes/GeoFlag.d.ts +0 -135
- package/dist/classes/GeoInstance.d.ts +0 -264
- package/dist/classes/GeoIntl.d.ts +0 -291
- package/dist/classes/GeoPhone.d.ts +0 -110
- package/dist/classes/GeoUnit.d.ts +0 -207
- package/dist/classes/Global.d.ts +0 -29
- package/dist/classes/Hash.d.ts +0 -57
- package/dist/classes/HashInstance.d.ts +0 -29
- package/dist/classes/Icons.d.ts +0 -128
- package/dist/classes/Loading.d.ts +0 -62
- package/dist/classes/LoadingInstance.d.ts +0 -87
- package/dist/classes/Meta.d.ts +0 -189
- package/dist/classes/MetaManager.d.ts +0 -123
- package/dist/classes/MetaOg.d.ts +0 -120
- package/dist/classes/MetaStatic.d.ts +0 -179
- package/dist/classes/MetaTwitter.d.ts +0 -120
- package/dist/classes/Query.d.ts +0 -57
- package/dist/classes/QueryInstance.d.ts +0 -29
- package/dist/classes/ResumableTimer.d.ts +0 -85
- package/dist/classes/ScrollbarWidth.d.ts +0 -52
- package/dist/classes/SearchList.d.ts +0 -132
- package/dist/classes/SearchListData.d.ts +0 -144
- package/dist/classes/SearchListItem.d.ts +0 -49
- package/dist/classes/SearchListMatcher.d.ts +0 -58
- package/dist/classes/SearchListOptions.d.ts +0 -66
- package/dist/classes/ServerStorage.d.ts +0 -110
- package/dist/classes/StorageCallback.d.ts +0 -86
- package/dist/classes/Translate.d.ts +0 -117
- package/dist/classes/TranslateFile.d.ts +0 -81
- package/dist/classes/TranslateInstance.d.ts +0 -203
- package/dist/classes/UrlInstanceAbstract.d.ts +0 -98
- package/dist/classes/UrlItem.d.ts +0 -119
- package/dist/functions/addTagHighlightMatch.d.ts +0 -11
- package/dist/functions/anyToString.d.ts +0 -10
- package/dist/functions/applyTemplate.d.ts +0 -10
- package/dist/functions/arrFill.d.ts +0 -9
- package/dist/functions/blobToBase64.d.ts +0 -9
- package/dist/functions/capitalize.d.ts +0 -9
- package/dist/functions/copyObject.d.ts +0 -10
- package/dist/functions/copyObjectLite.d.ts +0 -9
- package/dist/functions/createElement.d.ts +0 -21
- package/dist/functions/domContentLoaded.d.ts +0 -13
- package/dist/functions/domQuerySelector.d.ts +0 -8
- package/dist/functions/domQuerySelectorAll.d.ts +0 -8
- package/dist/functions/encodeAttribute.d.ts +0 -8
- package/dist/functions/encodeLiteAttribute.d.ts +0 -8
- package/dist/functions/ensureMaxSize.d.ts +0 -10
- package/dist/functions/escapeExp.d.ts +0 -7
- package/dist/functions/eventStopPropagation.d.ts +0 -7
- package/dist/functions/executeFunction.d.ts +0 -12
- package/dist/functions/executePromise.d.ts +0 -11
- package/dist/functions/forEach.d.ts +0 -14
- package/dist/functions/frame.d.ts +0 -10
- package/dist/functions/getArrayHighlightMatch.d.ts +0 -10
- package/dist/functions/getAttributes.d.ts +0 -9
- package/dist/functions/getClipboardData.d.ts +0 -9
- package/dist/functions/getColumn.d.ts +0 -10
- package/dist/functions/getCurrentDate.d.ts +0 -19
- package/dist/functions/getCurrentTime.d.ts +0 -15
- package/dist/functions/getElement.d.ts +0 -9
- package/dist/functions/getElementId.d.ts +0 -26
- package/dist/functions/getElementImage.d.ts +0 -8
- package/dist/functions/getElementItem.d.ts +0 -12
- package/dist/functions/getElementOrWindow.d.ts +0 -8
- package/dist/functions/getElementSafeScript.d.ts +0 -9
- package/dist/functions/getExactSearchExp.d.ts +0 -8
- package/dist/functions/getExp.d.ts +0 -14
- package/dist/functions/getFirst.d.ts +0 -8
- package/dist/functions/getHydrationData.d.ts +0 -10
- package/dist/functions/getItemByPath.d.ts +0 -9
- package/dist/functions/getKey.d.ts +0 -8
- package/dist/functions/getLast.d.ts +0 -8
- package/dist/functions/getLength.d.ts +0 -10
- package/dist/functions/getLengthOfAllArray.d.ts +0 -8
- package/dist/functions/getMaxLengthAllArray.d.ts +0 -9
- package/dist/functions/getMinLengthAllArray.d.ts +0 -8
- package/dist/functions/getMouseClient.d.ts +0 -9
- package/dist/functions/getMouseClientX.d.ts +0 -8
- package/dist/functions/getMouseClientY.d.ts +0 -8
- package/dist/functions/getObjectByKeys.d.ts +0 -8
- package/dist/functions/getObjectNoUndefined.d.ts +0 -9
- package/dist/functions/getObjectOrNone.d.ts +0 -8
- package/dist/functions/getOnlyText.d.ts +0 -8
- package/dist/functions/getRandomItem.d.ts +0 -10
- package/dist/functions/getRandomText.d.ts +0 -12
- package/dist/functions/getRequestString.d.ts +0 -11
- package/dist/functions/getSearchExp.d.ts +0 -12
- package/dist/functions/getSeparatingSearchExp.d.ts +0 -9
- package/dist/functions/getStepPercent.d.ts +0 -9
- package/dist/functions/getStepValue.d.ts +0 -9
- package/dist/functions/goScroll.d.ts +0 -10
- package/dist/functions/goScrollSmooth.d.ts +0 -10
- package/dist/functions/goScrollTo.d.ts +0 -10
- package/dist/functions/handleShare.d.ts +0 -10
- package/dist/functions/inArray.d.ts +0 -9
- package/dist/functions/initScrollbarOffset.d.ts +0 -7
- package/dist/functions/intersectKey.d.ts +0 -9
- package/dist/functions/isApiSuccess.d.ts +0 -9
- package/dist/functions/isArray.d.ts +0 -8
- package/dist/functions/isDifferent.d.ts +0 -10
- package/dist/functions/isDomData.d.ts +0 -7
- package/dist/functions/isDomRuntime.d.ts +0 -10
- package/dist/functions/isElementVisible.d.ts +0 -11
- package/dist/functions/isEnter.d.ts +0 -9
- package/dist/functions/isFilled.d.ts +0 -10
- package/dist/functions/isFloat.d.ts +0 -8
- package/dist/functions/isFunction.d.ts +0 -9
- package/dist/functions/isInDom.d.ts +0 -9
- package/dist/functions/isInput.d.ts +0 -8
- package/dist/functions/isIntegerBetween.d.ts +0 -9
- package/dist/functions/isMetaKey.d.ts +0 -8
- package/dist/functions/isNull.d.ts +0 -9
- package/dist/functions/isNumber.d.ts +0 -8
- package/dist/functions/isObject.d.ts +0 -8
- package/dist/functions/isObjectNotArray.d.ts +0 -8
- package/dist/functions/isOnLine.d.ts +0 -7
- package/dist/functions/isSelected.d.ts +0 -9
- package/dist/functions/isSelectedByList.d.ts +0 -9
- package/dist/functions/isShare.d.ts +0 -7
- package/dist/functions/isString.d.ts +0 -8
- package/dist/functions/isTab.d.ts +0 -8
- package/dist/functions/isWindow.d.ts +0 -7
- package/dist/functions/random.d.ts +0 -9
- package/dist/functions/removeCommonPrefix.d.ts +0 -9
- package/dist/functions/replaceComponentName.d.ts +0 -9
- package/dist/functions/replaceRecursive.d.ts +0 -11
- package/dist/functions/replaceTemplate.d.ts +0 -10
- package/dist/functions/resizeImageByMax.d.ts +0 -19
- package/dist/functions/secondToTime.d.ts +0 -9
- package/dist/functions/setElementItem.d.ts +0 -11
- package/dist/functions/setValues.d.ts +0 -18
- package/dist/functions/sleep.d.ts +0 -8
- package/dist/functions/sortList.d.ts +0 -11
- package/dist/functions/splice.d.ts +0 -13
- package/dist/functions/strFill.d.ts +0 -9
- package/dist/functions/strSplit.d.ts +0 -12
- package/dist/functions/toArray.d.ts +0 -17
- package/dist/functions/toCamelCase.d.ts +0 -8
- package/dist/functions/toCamelCaseFirst.d.ts +0 -8
- package/dist/functions/toDate.d.ts +0 -8
- package/dist/functions/toKebabCase.d.ts +0 -15
- package/dist/functions/toNumber.d.ts +0 -19
- package/dist/functions/toNumberByMax.d.ts +0 -11
- package/dist/functions/toNumberPositive.d.ts +0 -9
- package/dist/functions/toPercent.d.ts +0 -9
- package/dist/functions/toPercentBy100.d.ts +0 -9
- package/dist/functions/toString.d.ts +0 -8
- package/dist/functions/transformation.d.ts +0 -21
- package/dist/functions/uint8ArrayToBase64.d.ts +0 -8
- package/dist/functions/uniqueArray.d.ts +0 -8
- package/dist/functions/writeClipboardData.d.ts +0 -8
- package/dist/media/errorCauseList.d.ts +0 -2
- package/dist/types/apiTypes.d.ts +0 -259
- package/dist/types/basicTypes.d.ts +0 -131
- package/dist/types/errorCenterTypes.d.ts +0 -50
- package/dist/types/formattersTypes.d.ts +0 -224
- package/dist/types/geoTypes.d.ts +0 -142
- package/dist/types/metaTypes.d.ts +0 -586
- package/dist/types/searchTypes.d.ts +0 -53
- package/dist/types/sortTypes.d.ts +0 -20
- package/dist/types/translateTypes.d.ts +0 -54
package/ai-types.md
CHANGED
|
@@ -1,186 +1,160 @@
|
|
|
1
|
-
All these methods are in the @dxtmisha/functional-basic (v1.
|
|
1
|
+
All these methods are in the @dxtmisha/functional-basic (v1.10.1) library.
|
|
2
2
|
|
|
3
|
-
/**
|
|
3
|
+
/** Class for managing HTTP requests and global API configuration. @keywords api, http, request, fetch */
|
|
4
4
|
export declare class Api {
|
|
5
|
-
/**
|
|
5
|
+
/** Checks if the current server environment is running on localhost. @keywords localhost, environment, check */
|
|
6
6
|
static isLocalhost(): boolean;
|
|
7
|
-
/**
|
|
7
|
+
/** Returns the singleton instance of the ApiInstance class. @keywords singleton, instance */
|
|
8
8
|
static getItem(): ApiInstance;
|
|
9
|
-
/**
|
|
9
|
+
/** Returns the status handler for the last executed request. @keywords status, response_status */
|
|
10
10
|
static getStatus(): ApiStatus;
|
|
11
|
-
/**
|
|
11
|
+
/** Returns the response processor and handler instance. @keywords response, handler */
|
|
12
12
|
static getResponse(): ApiResponse;
|
|
13
|
-
/**
|
|
13
|
+
/** Returns the API hydration handler. @keywords hydration, ssr */
|
|
14
14
|
static getHydration(): ApiHydration;
|
|
15
|
-
/**
|
|
15
|
+
/** Returns a serialized HTML script tag containing client hydration data. @keywords hydration_script, ssr, script */
|
|
16
16
|
static getHydrationScript(): string;
|
|
17
|
-
/**
|
|
17
|
+
/** Returns the base origin URL combined with the API path. @keywords origin, base_url, endpoint */
|
|
18
18
|
static getOrigin(): string;
|
|
19
|
-
/**
|
|
19
|
+
/** Returns the full URL for a given script path. @keywords url, endpoint, path */
|
|
20
20
|
static getUrl(path: string, api?: boolean): string;
|
|
21
|
-
/**
|
|
21
|
+
/** Formats and retrieves request body data for non-GET requests. @keywords body, payload, form_data */
|
|
22
22
|
static getBody(request?: ApiFetch['request'], method?: ApiMethodItem): string | FormData | undefined;
|
|
23
|
-
/**
|
|
23
|
+
/** Builds a query string or appended URL for GET requests. @keywords query_string, get_params, url_query */
|
|
24
24
|
static getBodyForGet(request: ApiFetch['request'], path?: string, method?: ApiMethodItem): string;
|
|
25
|
-
/**
|
|
25
|
+
/** Updates default global HTTP request headers. @keywords headers, default_headers, config */
|
|
26
26
|
static setHeaders(headers: ApiHeadersValue): void;
|
|
27
|
-
/**
|
|
27
|
+
/** Sets default request parameter values. @keywords defaults, request_defaults */
|
|
28
28
|
static setRequestDefault(request: ApiDefaultValue): void;
|
|
29
|
-
/**
|
|
29
|
+
/** Sets the default base script URL path. @keywords base_url, path, endpoint */
|
|
30
30
|
static setUrl(url: string): void;
|
|
31
|
-
/**
|
|
31
|
+
/** Sets a hook callback to be executed before executing requests. @keywords preparation, interceptor, pre_request */
|
|
32
32
|
static setPreparation(callback: (apiFetch: ApiFetch) => Promise<void>): void;
|
|
33
|
-
/**
|
|
33
|
+
/** Sets a hook callback to be executed after receiving a response. @keywords post_request, response_interceptor, end_hook */
|
|
34
34
|
static setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): void;
|
|
35
|
-
/**
|
|
35
|
+
/** Sets global request timeout in milliseconds. @keywords timeout, request_timeout */
|
|
36
36
|
static setTimeout(timeout: number): void;
|
|
37
|
-
/**
|
|
37
|
+
/** Sets the base origin protocol and domain. @keywords origin, domain, host */
|
|
38
38
|
static setOrigin(origin: string): void;
|
|
39
|
-
/**
|
|
39
|
+
/** Sets a custom execution wrapper around requests. @keywords wrapper, middleware, interceptor */
|
|
40
40
|
static setWrapper(wrapper: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>): void;
|
|
41
|
-
/**
|
|
41
|
+
/** Applies multiple API configuration options at once. @keywords config, options, setup */
|
|
42
42
|
static setConfig(config?: ApiConfig): void;
|
|
43
|
-
/**
|
|
43
|
+
/** Executes an HTTP request using a path string or request config. @keywords request, http, fetch */
|
|
44
44
|
static request<T>(pathRequest: string | ApiFetch): Promise<T>;
|
|
45
|
-
/**
|
|
45
|
+
/** Sends a GET HTTP request. @keywords get, fetch */
|
|
46
46
|
static get<T>(request: ApiFetch): Promise<T>;
|
|
47
|
-
/**
|
|
47
|
+
/** Sends a POST HTTP request. @keywords post, fetch */
|
|
48
48
|
static post<T>(request: ApiFetch): Promise<T>;
|
|
49
|
-
/**
|
|
49
|
+
/** Sends a PUT HTTP request. @keywords put, fetch */
|
|
50
50
|
static put<T>(request: ApiFetch): Promise<T>;
|
|
51
|
-
/**
|
|
51
|
+
/** Sends a PATCH HTTP request. @keywords patch, fetch */
|
|
52
52
|
static patch<T>(request: ApiFetch): Promise<T>;
|
|
53
|
-
/**
|
|
53
|
+
/** Sends a DELETE HTTP request. @keywords delete, fetch */
|
|
54
54
|
static delete<T>(request: ApiFetch): Promise<T>;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
/**
|
|
57
|
+
/** Handles caching of API responses. @keywords api cache, response caching, cache storage */
|
|
58
58
|
export declare class ApiCache {
|
|
59
|
-
/** Initializes storage
|
|
59
|
+
/** Initializes cache storage mechanism and cleanup settings. @keywords init, cache storage, listeners */
|
|
60
60
|
static init(getListener: (key: string) => Promise<ApiCacheItem | undefined>, setListener: (key: string, value: ApiCacheItem) => Promise<boolean>, removeListener: (key: string) => Promise<boolean>, cacheStepAgeClearOld?: number): void;
|
|
61
|
-
/** Resets the cache by clearing memory items and listeners. @keywords reset cache */
|
|
61
|
+
/** Resets the cache by clearing in-memory items and resetting listeners. @keywords reset, clear cache */
|
|
62
62
|
static reset(): void;
|
|
63
|
-
/**
|
|
63
|
+
/** Retrieves cached data by key. @keywords get, fetch cache, cache item */
|
|
64
64
|
static get<T>(key: string): Promise<T | undefined>;
|
|
65
|
-
/**
|
|
65
|
+
/** Retrieves cached data based on fetch request configuration. @keywords get by fetch, api request cache */
|
|
66
66
|
static getByFetch<T>(fetch: ApiFetch): Promise<T | undefined>;
|
|
67
|
-
/**
|
|
67
|
+
/** Stores data in the cache with optional TTL. @keywords set, save cache, store item */
|
|
68
68
|
static set<T>(key: string, value: T, age?: number): Promise<void>;
|
|
69
|
-
/**
|
|
69
|
+
/** Stores data in cache using fetch request configuration. @keywords set by fetch, cache api response */
|
|
70
70
|
static setByFetch<T>(fetch: ApiFetch, value: T): Promise<void>;
|
|
71
|
-
/**
|
|
71
|
+
/** Deletes an item from the cache by key. @keywords remove, delete cache, invalidate */
|
|
72
72
|
static remove(key: string): Promise<void>;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
/**
|
|
75
|
+
/** Handles and processes data returned from an API request. @keywords api, response, data handler, parser */
|
|
76
76
|
export declare class ApiDataReturn<T = any> {
|
|
77
|
-
/**
|
|
77
|
+
/** Initializes the API data return handler instance. @keywords constructor, api data */
|
|
78
78
|
constructor(apiFetch: ApiFetch, query: Response, end: ApiPreparationEnd, error?: ApiErrorItem | undefined);
|
|
79
|
-
/** Initializes
|
|
79
|
+
/** Initializes instance by reading data from the response. @keywords init, parse, read response */
|
|
80
80
|
init(): Promise<this>;
|
|
81
|
-
/**
|
|
81
|
+
/** Retrieves processed API response data. @keywords get, data, payload */
|
|
82
82
|
get(): ApiData<T>;
|
|
83
|
-
/**
|
|
83
|
+
/** Retrieves processed data along with the status object. @keywords get, status, api data */
|
|
84
84
|
getAndStatus(status: ApiStatus): ApiData<T>;
|
|
85
|
-
/**
|
|
85
|
+
/** Retrieves raw data received from the API. @keywords raw data, get */
|
|
86
86
|
getData(): ApiData<T> | undefined;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
/**
|
|
89
|
+
/** Class for managing default API request data. @keywords api default request */
|
|
90
90
|
export declare class ApiDefault {
|
|
91
|
-
/** Checks if default request data
|
|
91
|
+
/** Checks if default request data exists. @keywords is check default */
|
|
92
92
|
is(): boolean;
|
|
93
|
-
/** Gets default request data. @keywords
|
|
93
|
+
/** Gets the default request data. @keywords get default data */
|
|
94
94
|
get(): Record<string, any> | undefined;
|
|
95
|
-
/** Merges default data into request. @keywords
|
|
95
|
+
/** Merges default data into the provided request data. @keywords request merge default */
|
|
96
96
|
request(request: ApiFetch['request']): ApiFetch['request'];
|
|
97
|
-
/** Sets default request data. @keywords
|
|
97
|
+
/** Sets the default request data. @keywords set default data */
|
|
98
98
|
set(request: ApiDefaultValue): this;
|
|
99
|
-
/** Adds default data to FormData. @keywords api form data add */
|
|
100
|
-
protected addByFormData(request: FormData, value: ApiDefaultValue): this;
|
|
101
99
|
}
|
|
102
100
|
|
|
103
|
-
/**
|
|
101
|
+
/** Utility class for managing API error storage and resolving structured error items. @keywords api, error, error-storage, response-handling */
|
|
104
102
|
export declare class ApiError {
|
|
105
|
-
/**
|
|
103
|
+
/** Retrieves the singleton instance of the API error storage. @keywords storage, singleton, instance */
|
|
106
104
|
static getStorage(): ApiErrorStorage;
|
|
107
|
-
/** Adds error items to storage. @keywords add error
|
|
105
|
+
/** Adds error items to the storage matching optional URL and HTTP method criteria. @keywords add, register, error-item, filter */
|
|
108
106
|
static add(item: Partial<ApiErrorStorageItem> | Partial<ApiErrorStorageItem>[], url?: string | RegExp, method?: ApiMethodItem): void;
|
|
109
|
-
/**
|
|
107
|
+
/** Creates an ApiErrorItem by matching the response against stored error criteria. @keywords get-item, match, parse-error, response */
|
|
110
108
|
static getItem(method: ApiMethodItem, response: Response): Promise<ApiErrorItem>;
|
|
111
109
|
}
|
|
112
110
|
|
|
113
|
-
/**
|
|
111
|
+
/** Manages and extracts error codes, messages, and status from API error responses. @keywords api error response handler parser */
|
|
114
112
|
export declare class ApiErrorItem {
|
|
115
|
-
/**
|
|
113
|
+
/** Initializes an ApiErrorItem instance. @keywords constructor init */
|
|
116
114
|
constructor(method: ApiMethodItem, response: Response, error: ApiErrorStorageItem);
|
|
117
|
-
/**
|
|
115
|
+
/** Retrieves the HTTP method used for the request. @keywords method http */
|
|
118
116
|
getMethod(): ApiMethodItem;
|
|
119
|
-
/**
|
|
117
|
+
/** Retrieves the raw Fetch response object. @keywords response fetch raw */
|
|
120
118
|
getResponse(): Response;
|
|
121
|
-
/**
|
|
119
|
+
/** Retrieves the matched error storage item. @keywords error item storage */
|
|
122
120
|
getError(): ApiErrorStorageItem;
|
|
123
|
-
/**
|
|
121
|
+
/** Retrieves the error code from storage or the response body. @keywords code error */
|
|
124
122
|
getCode(): string | undefined;
|
|
125
|
-
/**
|
|
123
|
+
/** Retrieves the error message from storage, response body, or status text. @keywords message error */
|
|
126
124
|
getMessage(): string | undefined;
|
|
127
|
-
/**
|
|
125
|
+
/** Retrieves the HTTP status code of the response. @keywords status http code */
|
|
128
126
|
getStatus(): number;
|
|
129
127
|
}
|
|
130
128
|
|
|
131
|
-
/**
|
|
129
|
+
/** Centralized storage and matcher for identifying API error states based on response criteria. @keywords api error storage matcher status handler */
|
|
132
130
|
export declare class ApiErrorStorage {
|
|
133
|
-
/** Finds a matching error item in
|
|
131
|
+
/** Finds a matching error item in storage by analyzing the API method and response. @keywords find match error response */
|
|
134
132
|
find(method: ApiMethodItem, response: Response): Promise<ApiErrorStorageItem>;
|
|
135
|
-
/** Adds error items or
|
|
133
|
+
/** Adds one or more API error items or patterns to the internal storage. @keywords add register error rule pattern */
|
|
136
134
|
add(item: Partial<ApiErrorStorageItem> | Partial<ApiErrorStorageItem>[], url?: string | RegExp, method?: ApiMethodItem): this;
|
|
137
135
|
}
|
|
138
136
|
|
|
139
|
-
/**
|
|
140
|
-
* Manages HTTP request headers.
|
|
141
|
-
* @keywords api headers request content-type
|
|
142
|
-
*/
|
|
137
|
+
/** Class for managing and resolving HTTP request headers. @keywords http headers, request headers, api headers */
|
|
143
138
|
export declare class ApiHeaders {
|
|
144
|
-
/**
|
|
145
|
-
* Retrieves request headers.
|
|
146
|
-
* @keywords get headers content-type
|
|
147
|
-
*/
|
|
139
|
+
/** Resolves and merges HTTP request headers with optional Content-Type. @keywords get headers, merge headers, content-type */
|
|
148
140
|
get(value?: Record<string, string> | null, type?: string | undefined | null): Record<string, string> | undefined;
|
|
149
|
-
/**
|
|
150
|
-
* Retrieves headers based on request data.
|
|
151
|
-
* @keywords get headers request content-type
|
|
152
|
-
*/
|
|
141
|
+
/** Resolves headers tailored to the specific request configuration. @keywords headers by request, request headers */
|
|
153
142
|
getByRequest(request: ApiFetch['request'], value?: Record<string, string> | null, type?: string): Record<string, string> | undefined;
|
|
154
|
-
/**
|
|
155
|
-
* Sets default headers.
|
|
156
|
-
* @keywords set headers defaults
|
|
157
|
-
*/
|
|
143
|
+
/** Sets the default headers. @keywords default headers, set headers */
|
|
158
144
|
set(headers: ApiHeadersValue): this;
|
|
159
145
|
}
|
|
160
146
|
|
|
161
|
-
/**
|
|
162
|
-
* Manages API response hydration for server-side rendering (SSR).
|
|
163
|
-
* @keywords api, hydration, ssr, client, cache
|
|
164
|
-
*/
|
|
147
|
+
/** Collects API data during SSR for client-side hydration. @keywords ssr hydration api data transfer */
|
|
165
148
|
export declare class ApiHydration {
|
|
166
|
-
/**
|
|
167
|
-
* Initializes response collection from client data.
|
|
168
|
-
* @keywords init, response, hydration
|
|
169
|
-
*/
|
|
149
|
+
/** Initializes the API response with hydration payload. @keywords ssr init response hydration */
|
|
170
150
|
initResponse(response: ApiResponse): void;
|
|
171
|
-
/**
|
|
172
|
-
* Stores API fetch and response pair for client hydration.
|
|
173
|
-
* @keywords to, client, hydration, save
|
|
174
|
-
*/
|
|
151
|
+
/** Saves an API response for client-side hydration. @keywords ssr cache response hydration state */
|
|
175
152
|
toClient<T>(apiFetch: ApiFetch, response: T): void;
|
|
176
|
-
/**
|
|
177
|
-
* Serializes hydration data into a script string.
|
|
178
|
-
* @keywords to, string, serialize, html
|
|
179
|
-
*/
|
|
153
|
+
/** Serializes hydration data into a string for client injection. @keywords serialize hydration string ssr */
|
|
180
154
|
toString(): string;
|
|
181
155
|
}
|
|
182
156
|
|
|
183
|
-
/** Options for
|
|
157
|
+
/** Options for configuring an ApiInstance. @keywords api, options, config */
|
|
184
158
|
export type ApiInstanceOptions = {
|
|
185
159
|
headersClass?: typeof ApiHeaders;
|
|
186
160
|
requestDefaultClass?: typeof ApiDefault;
|
|
@@ -192,272 +166,201 @@ export type ApiInstanceOptions = {
|
|
|
192
166
|
hydrationClass?: typeof ApiHydration;
|
|
193
167
|
wrapper?: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>;
|
|
194
168
|
};
|
|
195
|
-
|
|
196
|
-
/** Core class for managing HTTP requests using the Fetch API. @keywords api,client,fetch,request */
|
|
169
|
+
/** Core class for managing HTTP requests using the Fetch API. @keywords api, fetch, http, client */
|
|
197
170
|
export declare class ApiInstance {
|
|
198
|
-
|
|
199
|
-
/** @keywords constructor,init */
|
|
171
|
+
/** Creates an ApiInstance with an optional base URL and configuration options. @keywords constructor, init */
|
|
200
172
|
constructor(url?: string, options?: ApiInstanceOptions);
|
|
201
|
-
/** Checks if the server is running on localhost. @keywords localhost,
|
|
173
|
+
/** Checks if the server is running on localhost. @keywords localhost, environment, host */
|
|
202
174
|
isLocalhost(): boolean;
|
|
203
|
-
/** Returns the status of the last request. @keywords status,state */
|
|
175
|
+
/** Returns the status handler of the last request. @keywords status, state */
|
|
204
176
|
getStatus(): ApiStatus;
|
|
205
|
-
/** Gets the response handler. @keywords response,handler */
|
|
177
|
+
/** Gets the response handler instance. @keywords response, handler */
|
|
206
178
|
getResponse(): ApiResponse;
|
|
207
|
-
/** Gets the hydration handler. @keywords hydration,ssr */
|
|
179
|
+
/** Gets the hydration handler instance. @keywords hydration, ssr */
|
|
208
180
|
getHydration(): ApiHydration;
|
|
209
|
-
/** Gets the base origin URL combined with the API path. @keywords origin,url */
|
|
181
|
+
/** Gets the base origin URL combined with the API path. @keywords origin, url, base */
|
|
210
182
|
getOrigin(): string;
|
|
211
|
-
/** Gets the full path
|
|
183
|
+
/** Gets the full URL path for a request script. @keywords url, endpoint, path */
|
|
212
184
|
getUrl(path: string, api?: boolean): string;
|
|
213
|
-
/**
|
|
185
|
+
/** Serializes request data into a body payload or FormData. @keywords body, payload, formdata */
|
|
214
186
|
getBody(request?: ApiFetch['request'], method?: ApiMethod): string | FormData | undefined;
|
|
215
|
-
/**
|
|
187
|
+
/** Generates a formatted query string for GET requests. @keywords query, search_params, url_params */
|
|
216
188
|
getBodyForGet(request: ApiFetch['request'], path?: string, method?: ApiMethod): string;
|
|
217
|
-
/** Returns a string
|
|
189
|
+
/** Returns a script tag string containing client hydration data. @keywords hydration, script, ssr */
|
|
218
190
|
getHydrationScript(): string;
|
|
219
|
-
/**
|
|
191
|
+
/** Updates default headers applied to requests. @keywords headers, config */
|
|
220
192
|
setHeaders(headers: ApiHeadersValue): this;
|
|
221
|
-
/**
|
|
193
|
+
/** Updates default request configuration parameters. @keywords default, config, options */
|
|
222
194
|
setRequestDefault(request: ApiDefaultValue): this;
|
|
223
|
-
/**
|
|
195
|
+
/** Sets the base script path. @keywords url, endpoint, base */
|
|
224
196
|
setUrl(url: string): this;
|
|
225
|
-
/**
|
|
197
|
+
/** Sets an interceptor callback to run before request execution. @keywords interceptor, preparation, middleware */
|
|
226
198
|
setPreparation(callback: (apiFetch: ApiFetch) => Promise<void>): this;
|
|
227
|
-
/**
|
|
199
|
+
/** Sets an interceptor callback to run after request completion. @keywords interceptor, response, callback */
|
|
228
200
|
setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): this;
|
|
229
|
-
/**
|
|
201
|
+
/** Sets the default request timeout in milliseconds. @keywords timeout, delay */
|
|
230
202
|
setTimeout(timeout: number): this;
|
|
231
|
-
/**
|
|
203
|
+
/** Sets the base origin protocol and domain. @keywords origin, domain, host */
|
|
232
204
|
setOrigin(origin: string): this;
|
|
233
|
-
/** Sets
|
|
205
|
+
/** Sets a wrapper function wrapping request execution. @keywords wrapper, middleware */
|
|
234
206
|
setWrapper(wrapper: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>): this;
|
|
235
|
-
/** Executes
|
|
207
|
+
/** Executes an HTTP request with the given path or configuration. @keywords request, fetch, http */
|
|
236
208
|
request<T>(pathRequest: string | ApiFetch): Promise<T>;
|
|
237
|
-
/** Sends
|
|
209
|
+
/** Sends an HTTP GET request. @keywords get, fetch, query */
|
|
238
210
|
get<T>(request: ApiFetch): Promise<T>;
|
|
239
|
-
/** Sends
|
|
211
|
+
/** Sends an HTTP POST request. @keywords post, submit, mutation */
|
|
240
212
|
post<T>(request: ApiFetch): Promise<T>;
|
|
241
|
-
/** Sends
|
|
213
|
+
/** Sends an HTTP PUT request. @keywords put, update */
|
|
242
214
|
put<T>(request: ApiFetch): Promise<T>;
|
|
243
|
-
/** Sends
|
|
215
|
+
/** Sends an HTTP PATCH request. @keywords patch, update */
|
|
244
216
|
patch<T>(request: ApiFetch): Promise<T>;
|
|
245
|
-
/** Sends
|
|
217
|
+
/** Sends an HTTP DELETE request. @keywords delete, remove */
|
|
246
218
|
delete<T>(request: ApiFetch): Promise<T>;
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
protected fetch<T>(apiFetch: ApiFetch, retryCount?: number): Promise<T>;
|
|
251
|
-
/** Executing the HTTP request. @keywords makeQuery,fetch */
|
|
252
|
-
protected makeQuery(apiFetch: ApiFetch, pathToApi: string): Promise<{
|
|
253
|
-
query: Response;
|
|
254
|
-
timeoutId: any;
|
|
255
|
-
}>;
|
|
256
|
-
/** Processing an error. @keywords error,handle */
|
|
257
|
-
protected makeError(error: Record<string, any> & {
|
|
258
|
-
name: string;
|
|
259
|
-
}, group?: string): void;
|
|
260
|
-
/** Processes an error response. @keywords error,query */
|
|
261
|
-
protected makeErrorQuery(error: ApiErrorItem | Response): void;
|
|
262
|
-
/** Initialize controller for request with timeout support. @keywords controller,timeout */
|
|
263
|
-
protected initController(apiFetch: ApiFetch, fetchInit: RequestInit): any;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
/** Class for preparing requests. @keywords api, preparation, request */
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/** Handles pre-request preparation and post-request analysis hooks. @keywords api preparation, interceptor, request lifecycle */
|
|
267
222
|
export declare class ApiPreparation {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
223
|
+
/** Executes pre-request preparation logic if active. @keywords pre-request, prepare */
|
|
224
|
+
make(active: boolean, apiFetch: ApiFetch): Promise<void>;
|
|
225
|
+
/** Analyzes and processes response data after request execution. @keywords post-request, response interceptor */
|
|
226
|
+
makeEnd(active: boolean, query: Response, apiFetch: ApiFetch): Promise<ApiPreparationEnd>;
|
|
227
|
+
/** Registers the pre-request callback hook. @keywords pre-request hook, interceptor */
|
|
228
|
+
set(callback: (apiFetch: ApiFetch) => Promise<void>): this;
|
|
229
|
+
/** Registers the post-request callback hook. @keywords post-request hook, response handler */
|
|
230
|
+
setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): this;
|
|
276
231
|
}
|
|
277
232
|
|
|
278
|
-
/**
|
|
233
|
+
/** Manages cached API responses, mocking, and request emulation. @keywords api response cache emulator mock */
|
|
279
234
|
export declare class ApiResponse {
|
|
280
|
-
/**
|
|
235
|
+
/** Initializes API response manager with default request configuration. @keywords constructor init */
|
|
281
236
|
constructor(requestDefault: ApiDefault);
|
|
282
|
-
/**
|
|
237
|
+
/** Retrieves a matching cached API response if available. @keywords get cache lookup */
|
|
283
238
|
get(path: string | undefined, method: ApiMethod, request?: ApiFetch['request'], devMode?: boolean): ApiResponseItem | undefined;
|
|
284
|
-
/** Returns
|
|
239
|
+
/** Returns all locally cached API response items. @keywords list items cache */
|
|
285
240
|
getList(): (ApiResponseItem & Record<string, any>)[];
|
|
286
|
-
/** Adds cached
|
|
241
|
+
/** Adds one or multiple cached API response entries. @keywords add register cache */
|
|
287
242
|
add(response: ApiResponseItem | ApiResponseItem[]): this;
|
|
288
|
-
/**
|
|
243
|
+
/** Enables or disables developer mode. @keywords dev mode toggle */
|
|
289
244
|
setDevMode(devMode: boolean): this;
|
|
290
|
-
/**
|
|
245
|
+
/** Asynchronously executes mock or emulated API response handler. @keywords emulator mock async request */
|
|
291
246
|
emulator<T>(apiFetch: ApiFetch): Promise<T | undefined>;
|
|
292
|
-
/**
|
|
247
|
+
/** Synchronously executes mock or emulated API response handler. @keywords emulator mock sync request */
|
|
293
248
|
emulatorAsync<T>(apiFetch: ApiFetch): T | undefined;
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
protected isPath(item: ApiResponseItem, path: string): boolean;
|
|
298
|
-
/** Checks if developer mode is active. @keywords check, devMode, mode */
|
|
299
|
-
protected isDevMode(devMode?: boolean): boolean;
|
|
300
|
-
/** Checks if request is first. @keywords check, first, request */
|
|
301
|
-
protected isFirst(item: ApiResponseItem, devMode?: boolean): boolean;
|
|
302
|
-
/** Checks if request matches cached one. @keywords check, response, match */
|
|
303
|
-
protected isResponse(item: ApiResponseItem, request?: ApiFetch['request']): boolean;
|
|
304
|
-
/** Reads cached data configuration. @keywords read, data, cache */
|
|
305
|
-
protected readData(apiFetch: ApiFetch): {
|
|
306
|
-
response: ApiResponseItem;
|
|
307
|
-
request: string | Record<string, any> | FormData | undefined;
|
|
308
|
-
} | undefined;
|
|
309
|
-
/** Emulates execution request. @keywords fetch, emulate, request */
|
|
310
|
-
protected fetch<T>(response: ApiResponseItem, request?: ApiFetch['request']): Promise<T>;
|
|
311
|
-
/** Emulates execution request synchronously. @keywords fetch, emulate, sync */
|
|
312
|
-
protected fetchAsync<T>(response: ApiResponseItem): T;
|
|
313
|
-
/** Enables loading for request emulation. @keywords start, loading, response */
|
|
314
|
-
protected startResponseLoading(): void;
|
|
315
|
-
/** Disables loading for request emulation. @keywords stop, loading, response */
|
|
316
|
-
protected stopResponseLoading(): void;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
/** Manages API request status and tracking. @keywords api status tracker */
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/** Class for managing API request status. @keywords api, status, request, response */
|
|
320
252
|
export declare class ApiStatus {
|
|
321
|
-
/**
|
|
253
|
+
/** Returns the last status item data. @keywords status item, state */
|
|
322
254
|
get(): ApiStatusItem | undefined;
|
|
323
|
-
/**
|
|
255
|
+
/** Returns the HTTP execution status code. @keywords http status, status code */
|
|
324
256
|
getStatus(): number | undefined;
|
|
325
|
-
/**
|
|
257
|
+
/** Returns the execution status text. @keywords status text, http message */
|
|
326
258
|
getStatusText(): string | undefined;
|
|
327
|
-
/**
|
|
259
|
+
/** Returns the last status type. @keywords status type, state */
|
|
328
260
|
getStatusType(): ApiStatusType | undefined;
|
|
329
|
-
/**
|
|
261
|
+
/** Returns the execution status code from the response. @keywords code, response code */
|
|
330
262
|
getCode(): string | undefined;
|
|
331
|
-
/**
|
|
263
|
+
/** Returns the script execution error message. @keywords error, failure */
|
|
332
264
|
getError(): string | undefined;
|
|
333
|
-
/**
|
|
265
|
+
/** Returns the data of the last request response. @keywords response, payload, data */
|
|
334
266
|
getResponse<T>(): T | undefined;
|
|
335
|
-
/**
|
|
267
|
+
/** Returns messages from the last request. @keywords message, response message */
|
|
336
268
|
getMessage(): string;
|
|
337
|
-
/** Sets
|
|
269
|
+
/** Sets the status item data. @keywords set status, state */
|
|
338
270
|
set(data: ApiStatusItem): this;
|
|
339
|
-
/** Sets
|
|
271
|
+
/** Sets the status code and optional status text. @keywords set status, http code */
|
|
340
272
|
setStatus(status?: number, statusText?: string): this;
|
|
341
|
-
/** Sets the error message
|
|
273
|
+
/** Sets the error message. @keywords set error, failure */
|
|
342
274
|
setError(error?: string): this;
|
|
343
|
-
/** Sets
|
|
275
|
+
/** Sets last response data and auto-extracts status or message. @keywords set response, payload */
|
|
344
276
|
setLastResponse(response?: any): this;
|
|
345
|
-
/** Sets the last status type. @keywords set
|
|
277
|
+
/** Sets the last status type. @keywords set status, status type */
|
|
346
278
|
setLastStatus(status?: ApiStatusType): this;
|
|
347
|
-
/** Sets the last execution code. @keywords set
|
|
279
|
+
/** Sets the last execution status code. @keywords set code, status code */
|
|
348
280
|
setLastCode(code?: string): this;
|
|
349
|
-
/** Sets the last
|
|
281
|
+
/** Sets messages from the last request. @keywords set message */
|
|
350
282
|
setLastMessage(message?: string): this;
|
|
351
283
|
}
|
|
352
284
|
|
|
353
|
-
/**
|
|
285
|
+
/** Manages cross-context messaging using the BroadcastChannel API. @keywords broadcast channel, messaging, cross-tab, communication */
|
|
354
286
|
export declare class BroadcastMessage<Message = any> {
|
|
355
|
-
/** @keywords
|
|
287
|
+
/** Initializes the broadcast channel with handlers. @keywords broadcast, channel, init */
|
|
356
288
|
constructor(name: string, callback?: ((event: MessageEvent<Message>) => void) | undefined, callbackError?: ((event: MessageEvent<Message>) => void) | undefined, errorCenter?: ErrorCenterInstance);
|
|
357
|
-
/** Gets the underlying BroadcastChannel instance @keywords
|
|
289
|
+
/** Gets the underlying BroadcastChannel instance if available. @keywords broadcast channel, instance */
|
|
358
290
|
getChannel(): BroadcastChannel | undefined;
|
|
359
|
-
/**
|
|
291
|
+
/** Sends a message through the broadcast channel. @keywords post message, broadcast, send */
|
|
360
292
|
post(message: Message): this;
|
|
361
|
-
/** Sets the message reception callback @keywords
|
|
293
|
+
/** Sets the message reception callback handler. @keywords onmessage, listener, callback */
|
|
362
294
|
setCallback(callback: (event: MessageEvent<Message>) => void): this;
|
|
363
|
-
/** Sets the message error callback @keywords
|
|
295
|
+
/** Sets the message error callback handler. @keywords onmessageerror, error handler */
|
|
364
296
|
setCallbackError(callbackError: (event: MessageEvent<Message>) => void): this;
|
|
365
|
-
/**
|
|
297
|
+
/** Closes the broadcast channel and stops listening for messages. @keywords destroy, close, cleanup */
|
|
366
298
|
destroy(): this;
|
|
367
299
|
}
|
|
368
300
|
|
|
369
|
-
/**
|
|
301
|
+
/** In-memory key-value cache with dependency-based invalidation. @keywords cache, memoize, storage, in-memory */
|
|
370
302
|
export declare class Cache {
|
|
371
|
-
/**
|
|
303
|
+
/** Retrieves or computes a cached value by key with optional invalidation dependencies. @keywords cache get, memoize, compute */
|
|
372
304
|
get<T>(name: string, callback: () => T, comparison?: any[]): T;
|
|
373
|
-
/** Asynchronously
|
|
305
|
+
/** Asynchronously retrieves or computes a cached value by key with optional invalidation dependencies. @keywords async cache, memoize promise, async storage */
|
|
374
306
|
getAsync<T>(name: string, callback: () => T, comparison?: any[]): Promise<T>;
|
|
375
307
|
}
|
|
376
308
|
|
|
377
|
-
/** Manages cached value with dependency tracking @keywords cache
|
|
309
|
+
/** Manages a single cached value with dependency tracking for invalidation. @keywords cache memoize dependency invalidation */
|
|
378
310
|
export declare class CacheItem<T> {
|
|
379
|
-
/** Creates a CacheItem
|
|
311
|
+
/** Creates a CacheItem with a value computation callback. @keywords cache construct */
|
|
380
312
|
constructor(callback: () => T);
|
|
381
|
-
/**
|
|
313
|
+
/** Returns cached value, recomputing if dependency array changes. @keywords get cache memoize */
|
|
382
314
|
getCache(comparison: any[]): T;
|
|
383
|
-
/**
|
|
315
|
+
/** Returns previous cached value before last recalculation. @keywords previous cache history */
|
|
384
316
|
getCacheOld(): T | undefined;
|
|
385
|
-
/** Asynchronously
|
|
317
|
+
/** Asynchronously returns cached value, recomputing if dependency array changes. @keywords async cache memoize */
|
|
386
318
|
getCacheAsync(comparison: any[]): Promise<T>;
|
|
387
319
|
}
|
|
388
320
|
|
|
389
|
-
/** Static cache
|
|
321
|
+
/** Static cache utility using ServerStorage for persistent application-wide caching. @warning Obsolete. @keywords cache static server storage memoize */
|
|
390
322
|
export declare class CacheStatic {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
/** Asynchronously returns cached value or computes it via callback. @keywords get async cache */
|
|
396
|
-
static getAsync<T>(name: string, callback: () => T, comparison?: any[]): Promise<T>;
|
|
323
|
+
/** Gets a cached value by key, or computes and caches the result using the callback. @keywords cache memoize get */
|
|
324
|
+
static get<T>(name: string, callback: () => T, comparison?: any[]): T;
|
|
325
|
+
/** Asynchronously gets a cached value by key, or computes and caches the result using the callback. @keywords async cache memoize getAsync */
|
|
326
|
+
static getAsync<T>(name: string, callback: () => T, comparison?: any[]): Promise<T>;
|
|
397
327
|
}
|
|
398
328
|
|
|
399
|
-
/** Cookie
|
|
400
|
-
export type CookieOptions = {
|
|
401
|
-
/** Max age in seconds @keywords max_age, age */
|
|
402
|
-
age?: number;
|
|
403
|
-
/** SameSite policy @keywords same_site, policy */
|
|
404
|
-
sameSite?: 'Strict' | 'Lax' | 'None';
|
|
405
|
-
/** Cookie path @keywords path */
|
|
406
|
-
path?: string;
|
|
407
|
-
/** Cookie domain @keywords domain */
|
|
408
|
-
domain?: string;
|
|
409
|
-
/** Secure flag @keywords secure */
|
|
410
|
-
secure?: boolean;
|
|
411
|
-
/** HttpOnly flag @keywords httponly */
|
|
412
|
-
httpOnly?: boolean;
|
|
413
|
-
/** Partitioned flag @keywords partitioned */
|
|
414
|
-
partitioned?: boolean;
|
|
415
|
-
/** Additional cookie arguments @keywords arguments */
|
|
416
|
-
arguments?: Record<string, any> | string[];
|
|
417
|
-
};
|
|
418
|
-
|
|
419
|
-
/** Class for working with cookies @keywords cookie, storage, browser */
|
|
329
|
+
/** Cookie management utility. @keywords cookie, storage, browser */
|
|
420
330
|
export declare class Cookie<T> {
|
|
421
|
-
/** Cookie
|
|
422
|
-
value: string | T | undefined;
|
|
423
|
-
/** Cookie options @keywords options */
|
|
424
|
-
options: CookieOptions;
|
|
425
|
-
/** Cookie name @keywords name */
|
|
426
|
-
name: string;
|
|
427
|
-
/** Returns an instance of the class according to the specified cookie name @keywords get_instance, cookie */
|
|
331
|
+
/** Gets a Cookie instance by name. @keywords cookie, getInstance, singleton */
|
|
428
332
|
static getInstance<T>(name: string): Cookie<T>;
|
|
429
|
-
/** Creates a
|
|
333
|
+
/** Creates a new Cookie instance. @keywords cookie, constructor */
|
|
430
334
|
constructor(name: string);
|
|
431
|
-
/** Gets cookie data or
|
|
335
|
+
/** Gets cookie data or initializes with default value if absent. @keywords cookie, get, read */
|
|
432
336
|
get(defaultValue?: T | string | (() => (T | string)), options?: CookieOptions): string | T | undefined;
|
|
433
|
-
/**
|
|
337
|
+
/** Updates the cookie value. @keywords cookie, set, write */
|
|
434
338
|
set(value?: T | string | (() => (T | string)), options?: CookieOptions): void;
|
|
435
|
-
/**
|
|
339
|
+
/** Deletes the cookie. @keywords cookie, remove, delete */
|
|
436
340
|
remove(): void;
|
|
437
|
-
/** Updates the cookie with current value and options @keywords update, cookie */
|
|
438
|
-
update(): void;
|
|
439
341
|
}
|
|
440
342
|
|
|
441
|
-
/**
|
|
343
|
+
/** Manages cookie access block status. @keywords cookie, block, access */
|
|
442
344
|
export declare class CookieBlock {
|
|
443
|
-
/** Returns a request-isolated
|
|
345
|
+
/** Returns a request-isolated CookieBlockInstance. @keywords cookie, instance, isolated */
|
|
444
346
|
static getItem(): CookieBlockInstance;
|
|
445
|
-
/**
|
|
347
|
+
/** Retrieves the current cookie block status. @keywords cookie, block, status, get */
|
|
446
348
|
static get(): boolean;
|
|
447
|
-
/**
|
|
349
|
+
/** Sets the cookie block status. @keywords cookie, block, status, set */
|
|
448
350
|
static set(value: boolean): void;
|
|
449
351
|
}
|
|
450
352
|
|
|
451
|
-
/**
|
|
353
|
+
/** Manages cookie access blocking status. @keywords cookie block status access */
|
|
452
354
|
export declare class CookieBlockInstance {
|
|
453
|
-
/** Gets cookie block status @keywords get
|
|
355
|
+
/** Gets the current cookie block status. @keywords get cookie block status */
|
|
454
356
|
get(): boolean;
|
|
455
|
-
/** Sets cookie block status @keywords set
|
|
357
|
+
/** Sets the cookie block status. @keywords set cookie block status */
|
|
456
358
|
set(value: boolean): void;
|
|
457
359
|
}
|
|
458
360
|
|
|
459
361
|
export type CookieSameSite = 'strict' | 'lax';
|
|
460
362
|
|
|
363
|
+
/** Options for setting and configuring cookies. @keywords cookie, options, samesite, secure */
|
|
461
364
|
export type CookieOptions = {
|
|
462
365
|
age?: number;
|
|
463
366
|
sameSite?: CookieSameSite;
|
|
@@ -469,1217 +372,1014 @@ export type CookieOptions = {
|
|
|
469
372
|
arguments?: string[] | Record<string, string | number | boolean>;
|
|
470
373
|
};
|
|
471
374
|
|
|
472
|
-
/**
|
|
473
|
-
* Cookie storage management class with DOM and SSR support.
|
|
474
|
-
* @keywords cookie storage manager web storage
|
|
475
|
-
*/
|
|
375
|
+
/** Manages cookie storage with custom listeners across DOM and SSR environments. @keywords cookie, storage, ssr, browser, persistence */
|
|
476
376
|
export declare class CookieStorage {
|
|
477
|
-
|
|
478
|
-
protected static getListenerRaw?: () => string;
|
|
479
|
-
protected static setListener?: (key: string, value: any, cookie: string, options?: CookieOptions) => void;
|
|
480
|
-
|
|
481
|
-
/**
|
|
482
|
-
* Initializes storage listeners.
|
|
483
|
-
* @keywords cookie init storage
|
|
484
|
-
*/
|
|
377
|
+
/** Initializes cookie storage with custom getter and setter listeners. @keywords init, listener, ssr */
|
|
485
378
|
static init(getListener?: (key: string) => any | undefined, getListenerRaw?: () => string, setListener?: (key: string, value: any, cookie: string, options?: CookieOptions) => void): void;
|
|
486
|
-
|
|
487
|
-
/**
|
|
488
|
-
* Resets storage state and clears items.
|
|
489
|
-
* @keywords cookie reset storage
|
|
490
|
-
*/
|
|
379
|
+
/** Resets the storage by clearing all in-memory items and resetting listeners. @keywords reset, clear */
|
|
491
380
|
static reset(): void;
|
|
492
|
-
|
|
493
|
-
/**
|
|
494
|
-
* Gets cookie value by name.
|
|
495
|
-
* @keywords cookie get value
|
|
496
|
-
*/
|
|
381
|
+
/** Retrieves a typed cookie value from storage or returns a default fallback. @keywords get, read, retrieve */
|
|
497
382
|
static get<T>(name: string, defaultValue?: T | (() => T)): T | undefined;
|
|
498
|
-
|
|
499
|
-
/**
|
|
500
|
-
* Sets cookie value.
|
|
501
|
-
* @keywords cookie set value
|
|
502
|
-
*/
|
|
383
|
+
/** Saves a value to cookie storage with configurable options. @keywords set, write, store */
|
|
503
384
|
static set<T>(name: string, value: T | (() => T), options?: CookieOptions): T;
|
|
504
|
-
|
|
505
|
-
/**
|
|
506
|
-
* Removes cookie by name.
|
|
507
|
-
* @keywords cookie remove delete
|
|
508
|
-
*/
|
|
385
|
+
/** Removes a cookie by name from storage. @keywords remove, delete, clear */
|
|
509
386
|
static remove(name: string): void;
|
|
510
|
-
|
|
511
|
-
/**
|
|
512
|
-
* Updates cookies from DOM.
|
|
513
|
-
* @keywords cookie update
|
|
514
|
-
*/
|
|
387
|
+
/** Synchronizes and updates in-memory storage cache from current cookies. @keywords update, sync, refresh */
|
|
515
388
|
static update(): void;
|
|
516
|
-
|
|
517
|
-
protected static format(name: string, value: string, options?: CookieOptions): string;
|
|
518
|
-
|
|
519
|
-
protected static hasDom(): boolean;
|
|
520
|
-
|
|
521
|
-
protected static parse(cookie: string): Record<string, any>;
|
|
522
|
-
|
|
523
|
-
protected static initItems(): Record<string, any>;
|
|
524
|
-
|
|
525
|
-
protected static toMaxAge(stringValue: string, age?: CookieOptions['age']): string;
|
|
526
|
-
|
|
527
|
-
protected static toSameSite(sameSite?: CookieOptions['sameSite']): string;
|
|
528
|
-
|
|
529
|
-
protected static toPath(path?: CookieOptions['path']): string;
|
|
530
|
-
|
|
531
|
-
protected static toDomain(domain?: CookieOptions['domain']): string | undefined;
|
|
532
|
-
|
|
533
|
-
protected static toSecure(secure?: CookieOptions['secure']): string | undefined;
|
|
534
|
-
|
|
535
|
-
protected static toHttpOnly(httpOnly?: CookieOptions['httpOnly']): string | undefined;
|
|
536
|
-
|
|
537
|
-
protected static toPartitioned(partitioned?: CookieOptions['partitioned']): string | undefined;
|
|
538
|
-
|
|
539
|
-
protected static toArguments(args?: CookieOptions['arguments']): string[];
|
|
540
389
|
}
|
|
541
390
|
|
|
542
|
-
/**
|
|
391
|
+
/** Storage wrapper for localStorage and sessionStorage with prefix, TTL expiration, and SSR isolation. @keywords storage, localStorage, sessionStorage, cache, ssr */
|
|
543
392
|
export declare class DataStorage<T> {
|
|
544
|
-
/** Sets
|
|
393
|
+
/** Sets global key prefix for storage items. @keywords prefix, key, storage */
|
|
545
394
|
static setPrefix(newPrefix: string): void;
|
|
546
|
-
/** Initializes a
|
|
395
|
+
/** Initializes storage instance for a named key. @keywords storage, constructor, session */
|
|
547
396
|
constructor(name: string, isSession?: boolean, errorCenter?: ErrorCenterInstance);
|
|
548
|
-
/** Retrieves value
|
|
397
|
+
/** Retrieves stored item value or fallback default value with optional cache expiration. @keywords get, retrieve, cache, ttl */
|
|
549
398
|
get(defaultValue?: T | (() => T), cache?: number): T | undefined;
|
|
550
|
-
/** Sets
|
|
399
|
+
/** Sets or updates stored item value. @keywords set, save, update, store */
|
|
551
400
|
set(value?: T | (() => T)): T | undefined;
|
|
552
|
-
/** Removes
|
|
401
|
+
/** Removes item from storage. @keywords remove, delete, clear */
|
|
553
402
|
remove(): this;
|
|
554
|
-
/**
|
|
403
|
+
/** Synchronizes data from underlying storage. @keywords update, sync, refresh */
|
|
555
404
|
update(): this;
|
|
556
405
|
}
|
|
557
406
|
|
|
558
407
|
/**
|
|
559
|
-
*
|
|
560
|
-
* @
|
|
408
|
+
* Utility class for date manipulation, calculation, and localization.
|
|
409
|
+
* @remarks Creating a `Datetime` instance without a specific date (using the current time) for SSR rendering may lead to hydration mismatches due to server/client timezone differences.
|
|
410
|
+
* @keywords datetime date time calendar localization
|
|
561
411
|
*/
|
|
562
412
|
export declare class Datetime {
|
|
563
|
-
|
|
413
|
+
/** Creates a Datetime instance. @keywords constructor datetime */
|
|
564
414
|
constructor(date?: NumberOrStringOrDate, type?: GeoDate, code?: string);
|
|
565
|
-
/** Returns
|
|
415
|
+
/** Returns the GeoIntl formatting instance. @keywords intl format */
|
|
566
416
|
getIntl(): GeoIntl;
|
|
567
|
-
/** Returns
|
|
417
|
+
/** Returns the underlying native Date object. @keywords date native */
|
|
568
418
|
getDate(): Date;
|
|
569
|
-
/** Returns the
|
|
419
|
+
/** Returns the configured date display format type. @keywords type format */
|
|
570
420
|
getType(): GeoDate;
|
|
571
|
-
/** Returns the format
|
|
421
|
+
/** Returns the hour format type. @keywords hours format */
|
|
572
422
|
getHoursType(): GeoHours;
|
|
573
|
-
/**
|
|
423
|
+
/** Returns whether 24-hour time format is enabled. @keywords 24-hour format */
|
|
574
424
|
getHour24(): boolean;
|
|
575
|
-
/** Returns the time zone offset in minutes. */
|
|
425
|
+
/** Returns the time zone offset in minutes relative to UTC. @keywords timezone offset utc */
|
|
576
426
|
getTimeZoneOffset(): number;
|
|
577
|
-
/** Returns the time zone
|
|
427
|
+
/** Returns the time zone string. @keywords timezone */
|
|
578
428
|
getTimeZone(style?: GeoTimeZoneStyle): string;
|
|
579
|
-
/** Returns the code of the first day of the week. */
|
|
429
|
+
/** Returns the code of the first day of the week for the current locale. @keywords first day weekday */
|
|
580
430
|
getFirstDayCode(): GeoFirstDay;
|
|
581
|
-
/** Returns the year
|
|
431
|
+
/** Returns the four-digit year according to local time. @keywords year local */
|
|
582
432
|
getYear(): number;
|
|
583
|
-
/** Returns the month
|
|
433
|
+
/** Returns the 1-based month index (1-12) according to local time. @keywords month local */
|
|
584
434
|
getMonth(): number;
|
|
585
|
-
/** Returns the day of the month (1-31). */
|
|
435
|
+
/** Returns the day of the month (1-31) according to local time. @keywords day month local */
|
|
586
436
|
getDay(): number;
|
|
587
|
-
/** Returns the hour (0-23). */
|
|
437
|
+
/** Returns the hour (0-23) according to local time. @keywords hour local */
|
|
588
438
|
getHour(): number;
|
|
589
|
-
/** Returns the
|
|
439
|
+
/** Returns the minute (0-59) according to local time. @keywords minute local */
|
|
590
440
|
getMinute(): number;
|
|
591
|
-
/** Returns the
|
|
441
|
+
/** Returns the second (0-59) according to local time. @keywords second local */
|
|
592
442
|
getSecond(): number;
|
|
593
|
-
/** Returns the
|
|
443
|
+
/** Returns the total number of days (28-31) in the current month. @keywords days in month max day */
|
|
594
444
|
getMaxDay(): number;
|
|
595
|
-
/** Formats date and time according to locale. */
|
|
445
|
+
/** Formats the date and time according to the current locale. @keywords locale format intl */
|
|
596
446
|
locale(type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions): string;
|
|
597
|
-
/**
|
|
447
|
+
/** Formats the year according to the current locale. @keywords locale year format */
|
|
598
448
|
localeYear(style?: Intl.DateTimeFormatOptions['year']): string;
|
|
599
|
-
/**
|
|
449
|
+
/** Formats the month according to the current locale. @keywords locale month format */
|
|
600
450
|
localeMonth(style?: Intl.DateTimeFormatOptions['month']): string;
|
|
601
|
-
/**
|
|
451
|
+
/** Formats the day according to the current locale. @keywords locale day format */
|
|
602
452
|
localeDay(style?: Intl.DateTimeFormatOptions['day']): string;
|
|
603
|
-
/**
|
|
453
|
+
/** Formats the hour according to the current locale. @keywords locale hour format */
|
|
604
454
|
localeHour(style?: Intl.DateTimeFormatOptions['hour']): string;
|
|
605
|
-
/**
|
|
455
|
+
/** Formats the minute according to the current locale. @keywords locale minute format */
|
|
606
456
|
localeMinute(style?: Intl.DateTimeFormatOptions['minute']): string;
|
|
607
|
-
/**
|
|
457
|
+
/** Formats the second according to the current locale. @keywords locale second format */
|
|
608
458
|
localeSecond(style?: Intl.DateTimeFormatOptions['second']): string;
|
|
609
|
-
/** Returns
|
|
459
|
+
/** Returns the date in standard ISO-like format. @keywords standard format iso */
|
|
610
460
|
standard(timeZone?: boolean): string;
|
|
611
|
-
/** Sets the date
|
|
461
|
+
/** Sets the date value from a number, string, or Date instance. @keywords set date */
|
|
612
462
|
setDate(value: NumberOrStringOrDate): this;
|
|
613
|
-
/** Sets the
|
|
463
|
+
/** Sets the date display format type. @keywords set format type */
|
|
614
464
|
setType(value: GeoDate): this;
|
|
615
|
-
/** Sets whether to use 24-hour time format. */
|
|
465
|
+
/** Sets whether to use 24-hour time format. @keywords set 24-hour format */
|
|
616
466
|
setHour24(value: boolean): this;
|
|
617
|
-
/** Sets the
|
|
467
|
+
/** Sets the country and language locale code. @keywords set locale code */
|
|
618
468
|
setCode(code: string): this;
|
|
619
|
-
/**
|
|
469
|
+
/** Registers a callback invoked when the date value is updated. @keywords watch listener callback */
|
|
620
470
|
setWatch(watch: (date: Date, type: GeoDate, hour24: boolean) => void): this;
|
|
621
|
-
/** Sets the full year. */
|
|
471
|
+
/** Sets the full year according to local time. @keywords set year */
|
|
622
472
|
setYear(value: number): this;
|
|
623
|
-
/** Sets the month (1-12). */
|
|
473
|
+
/** Sets the 1-based month (1-12) according to local time. @keywords set month */
|
|
624
474
|
setMonth(value: number): this;
|
|
625
|
-
/** Sets the day of the month. */
|
|
475
|
+
/** Sets the day of the month (1-31) according to local time. @keywords set day */
|
|
626
476
|
setDay(value: number): this;
|
|
627
|
-
/** Sets the
|
|
477
|
+
/** Sets the hour (0-23) according to local time. @keywords set hour */
|
|
628
478
|
setHour(value: number): this;
|
|
629
|
-
/** Sets the
|
|
479
|
+
/** Sets the minute (0-59) according to local time. @keywords set minute */
|
|
630
480
|
setMinute(value: number): this;
|
|
631
|
-
/** Sets the
|
|
481
|
+
/** Sets the second (0-59) according to local time. @keywords set second */
|
|
632
482
|
setSecond(value: number): this;
|
|
633
|
-
/** Shifts the date by years. */
|
|
483
|
+
/** Shifts the date by the specified number of years. @keywords move shift year */
|
|
634
484
|
moveByYear(value: number): this;
|
|
635
|
-
/** Shifts the date by months. */
|
|
485
|
+
/** Shifts the date by the specified number of months. @keywords move shift month */
|
|
636
486
|
moveByMonth(value: number): this;
|
|
637
|
-
/** Shifts the date by days. */
|
|
487
|
+
/** Shifts the date by the specified number of days. @keywords move shift day */
|
|
638
488
|
moveByDay(value: number): this;
|
|
639
|
-
/** Shifts the date by hours. */
|
|
489
|
+
/** Shifts the date by the specified number of hours. @keywords move shift hour */
|
|
640
490
|
moveByHour(value: number): this;
|
|
641
|
-
/** Shifts the date by minutes. */
|
|
491
|
+
/** Shifts the date by the specified number of minutes. @keywords move shift minute */
|
|
642
492
|
moveByMinute(value: number): this;
|
|
643
|
-
/** Shifts the date by seconds. */
|
|
493
|
+
/** Shifts the date by the specified number of seconds. @keywords move shift second */
|
|
644
494
|
moveBySecond(value: number): this;
|
|
645
|
-
/**
|
|
495
|
+
/** Sets the month to January. @keywords january first month */
|
|
646
496
|
moveMonthFirst(): this;
|
|
647
|
-
/**
|
|
497
|
+
/** Sets the month to December. @keywords december last month */
|
|
648
498
|
moveMonthLast(): this;
|
|
649
|
-
/**
|
|
499
|
+
/** Advances the date to the first day of the next month. @keywords next month */
|
|
650
500
|
moveMonthNext(): this;
|
|
651
|
-
/** Moves to the first day of the previous month. */
|
|
501
|
+
/** Moves the date to the first day of the previous month. @keywords previous month */
|
|
652
502
|
moveMonthPrevious(): this;
|
|
653
|
-
/** Moves to the first day of the week. */
|
|
503
|
+
/** Moves the date to the first day of the current week. @keywords first weekday week start */
|
|
654
504
|
moveWeekdayFirst(): this;
|
|
655
|
-
/** Moves to the last day of the week. */
|
|
505
|
+
/** Moves the date to the last day of the current week. @keywords last weekday week end */
|
|
656
506
|
moveWeekdayLast(): this;
|
|
657
|
-
/** Moves to the first
|
|
507
|
+
/** Moves the date to the first day of the month's first week. @keywords month first weekday */
|
|
658
508
|
moveWeekdayFirstByMonth(): this;
|
|
659
|
-
/** Moves to the
|
|
509
|
+
/** Moves the date to the first day of the next month's first full week. @keywords month last weekday */
|
|
660
510
|
moveWeekdayLastByMonth(): this;
|
|
661
|
-
/**
|
|
511
|
+
/** Advances the date by one week. @keywords next week */
|
|
662
512
|
moveWeekdayNext(): this;
|
|
663
|
-
/** Moves
|
|
513
|
+
/** Moves the date back by one week. @keywords previous week */
|
|
664
514
|
moveWeekdayPrevious(): this;
|
|
665
|
-
/** Moves to the first day of the month. */
|
|
515
|
+
/** Moves the date to the first day of the current month. @keywords first day month start */
|
|
666
516
|
moveDayFirst(): this;
|
|
667
|
-
/** Moves to the last day of the month. */
|
|
517
|
+
/** Moves the date to the last day of the current month. @keywords last day month end */
|
|
668
518
|
moveDayLast(): this;
|
|
669
|
-
/**
|
|
519
|
+
/** Advances the date to the next day. @keywords next day tomorrow */
|
|
670
520
|
moveDayNext(): this;
|
|
671
|
-
/** Moves to the previous day. */
|
|
521
|
+
/** Moves the date to the previous day. @keywords previous day yesterday */
|
|
672
522
|
moveDayPrevious(): this;
|
|
673
|
-
/**
|
|
523
|
+
/** Creates a clone of the underlying native Date object. @keywords clone date */
|
|
674
524
|
clone(): Date;
|
|
675
|
-
/**
|
|
525
|
+
/** Creates a clone of this Datetime instance. @keywords clone datetime */
|
|
676
526
|
cloneClass(): Datetime;
|
|
677
|
-
/** Clones
|
|
527
|
+
/** Clones the Datetime instance with month set to January. @keywords clone january */
|
|
678
528
|
cloneMonthFirst(): Datetime;
|
|
679
|
-
/** Clones
|
|
529
|
+
/** Clones the Datetime instance with month set to December. @keywords clone december */
|
|
680
530
|
cloneMonthLast(): Datetime;
|
|
681
|
-
/** Clones and
|
|
531
|
+
/** Clones the Datetime instance and advances it by one month. @keywords clone next month */
|
|
682
532
|
cloneMonthNext(): Datetime;
|
|
683
|
-
/** Clones and moves
|
|
533
|
+
/** Clones the Datetime instance and moves it back by one month. @keywords clone previous month */
|
|
684
534
|
cloneMonthPrevious(): Datetime;
|
|
685
|
-
/** Clones
|
|
535
|
+
/** Clones the Datetime instance set to the first day of the current week. @keywords clone week start */
|
|
686
536
|
cloneWeekdayFirst(): Datetime;
|
|
687
|
-
/** Clones
|
|
537
|
+
/** Clones the Datetime instance set to the last day of the current week. @keywords clone week end */
|
|
688
538
|
cloneWeekdayLast(): Datetime;
|
|
689
|
-
/** Clones
|
|
539
|
+
/** Clones the Datetime instance set to the first day of the month's first week. @keywords clone month week start */
|
|
690
540
|
cloneWeekdayFirstByMonth(): Datetime;
|
|
691
|
-
/** Clones
|
|
541
|
+
/** Clones the Datetime instance set to the last day of the month's last week. @keywords clone month week end */
|
|
692
542
|
cloneWeekdayLastByMonth(): Datetime;
|
|
693
|
-
/** Clones
|
|
543
|
+
/** Clones the Datetime instance advanced by one week. @keywords clone next week */
|
|
694
544
|
cloneWeekdayNext(): Datetime;
|
|
695
|
-
/** Clones
|
|
545
|
+
/** Clones the Datetime instance moved back by one week. @keywords clone previous week */
|
|
696
546
|
cloneWeekdayPrevious(): Datetime;
|
|
697
|
-
/** Clones
|
|
547
|
+
/** Clones the Datetime instance set to the first day of the month. @keywords clone month start */
|
|
698
548
|
cloneDayFirst(): Datetime;
|
|
699
|
-
/** Clones
|
|
549
|
+
/** Clones the Datetime instance set to the last day of the month. @keywords clone month end */
|
|
700
550
|
cloneDayLast(): Datetime;
|
|
701
|
-
/** Clones
|
|
551
|
+
/** Clones the Datetime instance advanced by one day. @keywords clone next day */
|
|
702
552
|
cloneDayNext(): Datetime;
|
|
703
|
-
/** Clones
|
|
553
|
+
/** Clones the Datetime instance moved back by one day. @keywords clone previous day */
|
|
704
554
|
cloneDayPrevious(): Datetime;
|
|
705
|
-
protected toTimeZoneHourFormat(hour: number): string;
|
|
706
|
-
protected update(): this;
|
|
707
555
|
}
|
|
708
556
|
|
|
709
|
-
/** Error management and
|
|
557
|
+
/** Error management and handling center. @keywords error, handler, registry, storage */
|
|
710
558
|
export declare class ErrorCenter {
|
|
711
|
-
/** Returns request-isolated
|
|
559
|
+
/** Returns request-isolated ErrorCenter instance. @keywords instance, singleton, context */
|
|
712
560
|
static getItem(): ErrorCenterInstance;
|
|
713
|
-
/** Checks if error cause exists @keywords
|
|
561
|
+
/** Checks if an error cause exists by code and optional group. @keywords exists, check, has */
|
|
714
562
|
static has(code: string, group?: string): boolean;
|
|
715
|
-
/**
|
|
563
|
+
/** Retrieves an error cause item by code and group. @keywords get, find, cause */
|
|
716
564
|
static get(code: string, group?: string): ErrorCenterCauseItem | undefined;
|
|
717
|
-
/**
|
|
565
|
+
/** Registers an error cause. @keywords add, register, cause */
|
|
718
566
|
static add(cause: ErrorCenterCauseItem): void;
|
|
719
|
-
/**
|
|
567
|
+
/** Registers multiple error causes. @keywords addList, batch, causes */
|
|
720
568
|
static addList(causes: ErrorCenterCauseList): void;
|
|
721
|
-
/** Registers error handler @keywords
|
|
569
|
+
/** Registers an error handler for a specific group. @keywords handler, group, listen */
|
|
722
570
|
static addHandler(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): void;
|
|
723
|
-
/** Registers
|
|
571
|
+
/** Registers multiple error handlers. @keywords handlers, list, batch */
|
|
724
572
|
static addHandlerList(handlers: ErrorCenterHandlerList): void;
|
|
725
|
-
/**
|
|
573
|
+
/** Registers a global callback executed on any error. @keywords callback, global, hook */
|
|
726
574
|
static addCallback(callback: ErrorCenterHandlerCallback): void;
|
|
727
|
-
/**
|
|
575
|
+
/** Configures console output logging or filter. @keywords console, log, filter */
|
|
728
576
|
static setIsConsole(isConsole: ErrorCenterHandlerIsConsole): void;
|
|
729
|
-
/** Triggers error
|
|
577
|
+
/** Triggers error handling workflow for an error cause. @keywords trigger, dispatch, emit */
|
|
730
578
|
static on(cause: ErrorCenterCauseItem): void;
|
|
731
579
|
}
|
|
732
580
|
|
|
733
|
-
/**
|
|
581
|
+
/** Manages and triggers error handlers by group or globally. @keywords error center, handler, error handling */
|
|
734
582
|
export declare class ErrorCenterHandler {
|
|
735
|
-
/**
|
|
583
|
+
/** Initializes the error center handler manager. @keywords constructor, init */
|
|
736
584
|
constructor(handlers?: ErrorCenterHandlerList, isConsole?: ErrorCenterHandlerIsConsole);
|
|
737
|
-
/** Checks if handlers exist for a group. @keywords has error group */
|
|
585
|
+
/** Checks if handlers exist for a specific error group. @keywords has, error group, check */
|
|
738
586
|
has(group: ErrorCenterGroup): boolean;
|
|
739
|
-
/**
|
|
587
|
+
/** Retrieves handlers associated with an error group. @keywords get, handler item */
|
|
740
588
|
get(group: ErrorCenterGroup): ErrorCenterHandlerItem | undefined;
|
|
741
|
-
/**
|
|
589
|
+
/** Registers an error handler callback for a specific group. @keywords add, register, error handler */
|
|
742
590
|
add(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): this;
|
|
743
|
-
/**
|
|
591
|
+
/** Registers a list of group-based error handlers. @keywords add list, batch register */
|
|
744
592
|
addList(handlers: ErrorCenterHandlerList): this;
|
|
745
|
-
/**
|
|
593
|
+
/** Registers a global callback executed on any error. @keywords add callback, global handler */
|
|
746
594
|
addCallback(callback: ErrorCenterHandlerCallback): this;
|
|
747
|
-
/** Sets console
|
|
595
|
+
/** Sets the console logging flag or filter predicate. @keywords console output, logging, filter */
|
|
748
596
|
setIsConsole(isConsole: ErrorCenterHandlerIsConsole): this;
|
|
749
|
-
/**
|
|
597
|
+
/** Dispatches error handlers matching the cause and handles console logging. @keywords dispatch, trigger, handle error */
|
|
750
598
|
on(cause: ErrorCenterCauseItem): this;
|
|
751
599
|
}
|
|
752
600
|
|
|
753
|
-
/**
|
|
601
|
+
/** Manages error storage and handling within an instance. @keywords error center, error manager, error storage */
|
|
754
602
|
export declare class ErrorCenterInstance {
|
|
755
|
-
/** @keywords constructor
|
|
603
|
+
/** Initializes the error center instance with optional causes and handler. @keywords constructor, error center */
|
|
756
604
|
constructor(causes?: ErrorCenterCauseList, handler?: ErrorCenterHandler);
|
|
757
|
-
/**
|
|
605
|
+
/** Checks if an error cause exists by code and optional group. @keywords error check, has cause */
|
|
758
606
|
has(code: string, group?: string): boolean;
|
|
759
|
-
/**
|
|
607
|
+
/** Retrieves an error cause item by code and optional group. @keywords get error, find cause */
|
|
760
608
|
get(code: string, group?: string): ErrorCenterCauseItem | undefined;
|
|
761
|
-
/**
|
|
609
|
+
/** Adds an error cause item to storage. @keywords add error, register cause */
|
|
762
610
|
add(cause: ErrorCenterCauseItem): this;
|
|
763
|
-
/**
|
|
611
|
+
/** Adds a list of error causes to storage. @keywords add error list, batch causes */
|
|
764
612
|
addList(causes: ErrorCenterCauseList): this;
|
|
765
|
-
/**
|
|
613
|
+
/** Registers an error handler callback for a specific group. @keywords add handler, register callback */
|
|
766
614
|
addHandler(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): this;
|
|
767
|
-
/**
|
|
615
|
+
/** Registers multiple error handlers from a list. @keywords add handlers, batch handlers */
|
|
768
616
|
addHandlerList(handlers: ErrorCenterHandlerList): this;
|
|
769
|
-
/**
|
|
617
|
+
/** Registers a global callback executed on any error. @keywords error callback, global listener */
|
|
770
618
|
addCallback(callback: ErrorCenterHandlerCallback): this;
|
|
771
|
-
/**
|
|
619
|
+
/** Sets console logging behavior or filter function. @keywords console logging, debug output */
|
|
772
620
|
setIsConsole(isConsole: ErrorCenterHandlerIsConsole): this;
|
|
773
|
-
/**
|
|
621
|
+
/** Triggers error handling for an error cause item. @keywords trigger error, dispatch cause */
|
|
774
622
|
on(cause: ErrorCenterCauseItem): this;
|
|
775
|
-
/** Merge cause with stored data @keywords assign merge error cause */
|
|
776
|
-
protected assign(cause: ErrorCenterCauseItem): ErrorCenterCauseItem;
|
|
777
623
|
}
|
|
778
624
|
|
|
779
625
|
/**
|
|
780
|
-
* Advanced wrapper for managing event listeners
|
|
781
|
-
* @keywords
|
|
626
|
+
* Advanced wrapper for managing DOM event listeners with lifecycle control, safety checks, and optimizations.
|
|
627
|
+
* @keywords event listener, dom events, resize observer, scroll sync, event item
|
|
782
628
|
*/
|
|
783
629
|
export declare class EventItem<E extends ElementOrWindow, O extends Event, D extends Record<string, any> = Record<string, any>> {
|
|
784
|
-
/**
|
|
785
|
-
protected listenerRecent: (event?: O | ResizeObserverEntry) => void;
|
|
786
|
-
/**
|
|
787
|
-
* Create an EventItem instance.
|
|
788
|
-
* @keywords constructor
|
|
789
|
-
*/
|
|
630
|
+
/** Creates an EventItem instance. @keywords event item, constructor */
|
|
790
631
|
constructor(elementSelector?: ElementOrString<E>, type?: string | string[], listener?: EventListenerDetail<O, D> | undefined, options?: EventOptions, detail?: D | undefined);
|
|
791
|
-
/**
|
|
632
|
+
/** Checks whether event listening is active. @keywords is active, listening status */
|
|
792
633
|
isActive(): boolean;
|
|
793
|
-
/**
|
|
634
|
+
/** Returns the target DOM element or window. @keywords get element, target */
|
|
794
635
|
getElement(): E | undefined;
|
|
795
|
-
/**
|
|
636
|
+
/** Sets the target DOM element or selector for event listening. @keywords set element, target */
|
|
796
637
|
setElement(elementSelector?: ElementOrString<E>): this;
|
|
797
|
-
/**
|
|
638
|
+
/** Sets the control element for DOM safety checks. @keywords element control, dom safety */
|
|
798
639
|
setElementControl<EC extends HTMLElement>(elementSelector?: ElementOrString<EC>): this;
|
|
799
|
-
/**
|
|
640
|
+
/** Sets the handled event type or types. @keywords set type, event type */
|
|
800
641
|
setType(type: string | string[]): this;
|
|
801
|
-
/**
|
|
642
|
+
/** Sets the event handler listener function. @keywords set listener, handler */
|
|
802
643
|
setListener(listener: EventListenerDetail<O, D>): this;
|
|
803
|
-
/**
|
|
644
|
+
/** Sets the event listener options. @keywords set options, event options */
|
|
804
645
|
setOptions(options?: EventOptions): this;
|
|
805
|
-
/**
|
|
646
|
+
/** Sets custom detail data passed to the listener or dispatch. @keywords set detail, custom data */
|
|
806
647
|
setDetail(detail?: D): this;
|
|
807
|
-
/**
|
|
648
|
+
/** Dispatches a CustomEvent on the target element with optional detail data. @keywords dispatch, trigger event, custom event */
|
|
808
649
|
dispatch(detail?: D | undefined): this;
|
|
809
|
-
/**
|
|
650
|
+
/** Starts listening to configured events. @keywords start, add event listener, attach */
|
|
810
651
|
start(): this;
|
|
811
|
-
/**
|
|
652
|
+
/** Stops listening to events. @keywords stop, remove event listener, detach */
|
|
812
653
|
stop(): this;
|
|
813
|
-
/**
|
|
654
|
+
/** Toggles event listening state based on the provided active flag. @keywords toggle, enable, disable */
|
|
814
655
|
toggle(activity: boolean): this;
|
|
815
|
-
/**
|
|
656
|
+
/** Restarts active event listeners. @keywords reset, restart listener, reload */
|
|
816
657
|
reset(): this;
|
|
817
|
-
/** Check if ResizeObserver exists @keywords is_observer */
|
|
818
|
-
protected isObserver(): boolean;
|
|
819
|
-
/** Implementation of resize event @keywords make_resize */
|
|
820
|
-
protected makeResize(): boolean;
|
|
821
|
-
/** Implementation of scroll event @keywords make_scroll */
|
|
822
|
-
protected makeScroll(): boolean;
|
|
823
658
|
}
|
|
824
659
|
|
|
825
|
-
/** @keywords
|
|
660
|
+
/** Formats a list or single data item based on provided column formatting options. @keywords format, list, data, options */
|
|
826
661
|
export declare class Formatters<Options extends FormattersOptionsList = FormattersOptionsList, List extends FormattersListProp = FormattersListProp, Item extends FormattersItemProp<List> = FormattersItemProp<List>> {
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
protected transformation<Type extends FormattersType>(valueOriginal: any, item: any, type?: Type, options?: FormattersOptionsInformation<Type>): string;
|
|
849
|
-
/** @keywords format_currency, money */
|
|
850
|
-
protected formatCurrency(value: any, item: Item, options?: FormattersOptionsCurrency): string;
|
|
851
|
-
/** @keywords format_date, time */
|
|
852
|
-
protected formatDate(value: any, options?: FormattersOptionsDate): string;
|
|
853
|
-
/** @keywords format_name, person */
|
|
854
|
-
protected formatName(item: Item, options?: FormattersOptionsName): string;
|
|
855
|
-
/** @keywords format_number, digit */
|
|
856
|
-
protected formatNumber(value: any, options?: FormattersOptionsNumber): string;
|
|
857
|
-
/** @keywords format_plural, words */
|
|
858
|
-
protected formatPlural(value: any, options?: FormattersOptionsPlural): string;
|
|
859
|
-
/** @keywords format_unit, measurement */
|
|
860
|
-
protected formatUnit(value: any, options?: FormattersOptionsUnit): string;
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
/** @keywords Geo, localization, country, timezone, language */
|
|
662
|
+
/** Initializes the formatters instance with options and optional list data. @keywords constructor, init, setup */
|
|
663
|
+
constructor(options: Options, list?: List | undefined);
|
|
664
|
+
/** Checks if the list data is set. @keywords check, is set, exists */
|
|
665
|
+
is(): boolean;
|
|
666
|
+
/** Type guard checking if the list data is an array. @keywords isArray, type guard */
|
|
667
|
+
isArray(): this is this & {
|
|
668
|
+
list: FormattersList<Item>;
|
|
669
|
+
};
|
|
670
|
+
/** Returns the number of records in the list. @keywords count, length, size */
|
|
671
|
+
length(): number;
|
|
672
|
+
/** Returns the current list of items as an array. @keywords getList, items, array */
|
|
673
|
+
getList(): FormattersList<Item>;
|
|
674
|
+
/** Returns the current formatting options configuration. @keywords getOptions, configuration, settings */
|
|
675
|
+
getOptions(): Options;
|
|
676
|
+
/** Sets the list of data to be formatted. @keywords setList, update, list */
|
|
677
|
+
setList(list?: List): this;
|
|
678
|
+
/** Formats the entire list or single item, appending formatted values with 'Format' suffixes. @keywords to, format, transform */
|
|
679
|
+
to(): FormattersReturn<List, Options>;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/** Static utility class for managing geographical data, locale, country, and time zone. @keywords geo, locale, country, timezone */
|
|
864
683
|
export declare class Geo {
|
|
865
|
-
/** @keywords
|
|
866
|
-
static getObject():
|
|
867
|
-
/** @keywords
|
|
684
|
+
/** Returns a request-isolated instance of GeoInstance. @keywords geo, instance, isolate */
|
|
685
|
+
static getObject(): GeoInstance;
|
|
686
|
+
/** Returns information about the current country and language. @keywords current, geo, locale */
|
|
868
687
|
static get(): GeoItemFull;
|
|
869
|
-
/** @keywords
|
|
688
|
+
/** Returns the 2-letter code of the current country. @keywords country, code, iso */
|
|
870
689
|
static getCountry(): string;
|
|
871
|
-
/** @keywords
|
|
690
|
+
/** Returns the 2-letter code of the current language. @keywords language, code, iso */
|
|
872
691
|
static getLanguage(): string;
|
|
873
|
-
/** @keywords
|
|
692
|
+
/** Returns the combined locale string in standard format (e.g., 'en-US'). @keywords locale, standard, format */
|
|
874
693
|
static getStandard(): string;
|
|
875
|
-
/** @keywords
|
|
694
|
+
/** Returns the code for the first day of the week for the current locale. @keywords first-day, week, calendar */
|
|
876
695
|
static getFirstDay(): string;
|
|
877
|
-
/** @keywords
|
|
696
|
+
/** Returns the current location string. @keywords location, current */
|
|
878
697
|
static getLocation(): string;
|
|
879
|
-
/** @keywords
|
|
698
|
+
/** Returns the country code extracted from the location string. @keywords location, country, code */
|
|
880
699
|
static getLocationCountry(): string;
|
|
881
|
-
/** @keywords
|
|
700
|
+
/** Returns the language code extracted from the location string. @keywords location, language, code */
|
|
882
701
|
static getLocationLanguage(): string;
|
|
883
|
-
/** @keywords
|
|
702
|
+
/** Returns fully processed geo data updated with the current language. @keywords geo, item, processed */
|
|
884
703
|
static getItem(): GeoItemFull;
|
|
885
|
-
/** @keywords
|
|
704
|
+
/** Returns the complete list of available countries and regions. @keywords list, countries, regions */
|
|
886
705
|
static getList(): GeoItem[];
|
|
887
|
-
/** @keywords
|
|
706
|
+
/** Returns geo data by country or language code from the global database. @keywords search, code, lookup */
|
|
888
707
|
static getByCode(code?: string): GeoItemFull;
|
|
889
|
-
/** @keywords
|
|
708
|
+
/** Returns exact geo data by searching for full locale match (e.g., 'en-US'). @keywords full, locale, lookup */
|
|
890
709
|
static getByCodeFull(code: string): GeoItem | undefined;
|
|
891
|
-
/** @keywords
|
|
710
|
+
/** Returns geo data for a specific country by its code. @keywords country, lookup */
|
|
892
711
|
static getByCountry(country: string): GeoItem | undefined;
|
|
893
|
-
/** @keywords
|
|
712
|
+
/** Returns geo data for a specific language by its code. @keywords language, lookup */
|
|
894
713
|
static getByLanguage(language: string): GeoItem | undefined;
|
|
895
|
-
/** @keywords
|
|
714
|
+
/** Returns the time zone offset in minutes for the current context. @keywords timezone, offset, minutes */
|
|
896
715
|
static getTimezone(): number;
|
|
897
|
-
/** @keywords
|
|
716
|
+
/** Returns the formatted time zone string (e.g., '+00:00') for the current context. @keywords timezone, format, offset */
|
|
898
717
|
static getTimezoneFormat(): string;
|
|
899
|
-
/** @keywords find, geo */
|
|
718
|
+
/** Finds or determines the geo data for a given code (alias for getByCode). @keywords find, search, geo */
|
|
900
719
|
static find(code: string): GeoItemFull;
|
|
901
|
-
/** @keywords
|
|
720
|
+
/** Returns a standard concatenated string for a geo item (e.g., 'en-US'). @keywords standard, format, locale */
|
|
902
721
|
static toStandard(item: GeoItem): string;
|
|
903
|
-
/** @keywords set, location */
|
|
722
|
+
/** Sets the current geographical location and updates instance state. @keywords set, location, state */
|
|
904
723
|
static set(code: string, save?: boolean): void;
|
|
905
|
-
/** @keywords
|
|
724
|
+
/** Sets a custom time zone offset in minutes for the current context. @keywords set, timezone, offset */
|
|
906
725
|
static setTimezone(timezone: number): void;
|
|
907
|
-
/** @keywords
|
|
726
|
+
/** Sets the default value or resolver function for the country code. @keywords default, country, fallback */
|
|
908
727
|
static setValueDefault(code?: string | (() => string)): void;
|
|
728
|
+
/** Adds or updates country geo data and merges with existing entries. @keywords add, country, merge */
|
|
729
|
+
static add(country: string, item: Partial<GeoItem>): GeoInstance;
|
|
730
|
+
/** Adds or updates multiple countries in the geo list. @keywords add, batch, list */
|
|
731
|
+
static addList(list: Record<string, Partial<GeoItem>>): GeoInstance;
|
|
909
732
|
}
|
|
910
733
|
|
|
911
734
|
export declare const GEO_FLAG_ICON_NAME = "f";
|
|
912
|
-
/**
|
|
735
|
+
/** Handles flags, country names, languages, and geographic metadata. @keywords geo, flag, country, language, locale */
|
|
913
736
|
export declare class GeoFlag {
|
|
914
|
-
/** @keywords
|
|
737
|
+
/** Mapping of country codes to flag icon names. @keywords flags, country codes, icon map */
|
|
738
|
+
static flags: Record<string, string>;
|
|
739
|
+
/** Initializes GeoFlag with an optional country/language code. @keywords geo flag, constructor, locale */
|
|
915
740
|
constructor(code?: string);
|
|
916
|
-
/**
|
|
741
|
+
/** Retrieves country information and flag data by country code. @keywords country, flag, metadata */
|
|
917
742
|
get(code?: string): GeoFlagItem | undefined;
|
|
918
|
-
/**
|
|
743
|
+
/** Retrieves language information and associated flag by code. @keywords language, flag, metadata */
|
|
919
744
|
getLanguage(code?: string): GeoFlagItem | undefined;
|
|
920
|
-
/**
|
|
745
|
+
/** Returns the active country code. @keywords get code, country code, locale */
|
|
921
746
|
getCode(): string;
|
|
922
|
-
/**
|
|
747
|
+
/** Returns the flag icon identifier for a given country code. @keywords flag icon, icon id */
|
|
923
748
|
getFlag(code?: string): string | undefined;
|
|
924
|
-
/**
|
|
749
|
+
/** Retrieves a list of countries for specified codes or all available countries. @keywords country list, countries */
|
|
925
750
|
getList(codes?: string[], sort?: boolean): GeoFlagItem[];
|
|
926
|
-
/**
|
|
751
|
+
/** Retrieves a list of languages for specified codes or all available languages. @keywords language list, languages */
|
|
927
752
|
getListLanguage(codes?: string[], sort?: boolean): GeoFlagItem[];
|
|
928
|
-
/**
|
|
753
|
+
/** Retrieves a list of countries with names in their native languages. @keywords national countries, native names */
|
|
929
754
|
getNational(codes?: string[], sort?: boolean): GeoFlagNational[];
|
|
930
|
-
/**
|
|
755
|
+
/** Retrieves a list of languages with their native names. @keywords national languages, native names */
|
|
931
756
|
getNationalLanguage(codes?: string[], sort?: boolean): GeoFlagNational[];
|
|
932
|
-
/**
|
|
757
|
+
/** Updates the current country/language code. @keywords set code, update locale */
|
|
933
758
|
setCode(code: string): this;
|
|
934
|
-
/** Gets GeoIntl instance. @keywords get, location, intl */
|
|
935
|
-
protected getLocation(): GeoIntl;
|
|
936
|
-
/** Gets codes array. @keywords get, codes */
|
|
937
|
-
protected getCodes(codes?: string[]): string[];
|
|
938
|
-
/** Gets language name. @keywords get, language, name */
|
|
939
|
-
protected getLanguageName(data: GeoItemFull): string;
|
|
940
|
-
/** Gets country name. @keywords get, country, name */
|
|
941
|
-
protected getCountry(data: GeoItemFull): string;
|
|
942
759
|
}
|
|
943
760
|
|
|
761
|
+
/** Cookie key for storing the geo code. @keywords cookie, geo_key */
|
|
944
762
|
export declare const UI_GEO_COOKIE_KEY = "ui-geo-code";
|
|
945
|
-
/**
|
|
946
|
-
* Base class for working with geographic data.
|
|
947
|
-
* @keywords geo location country language timezone
|
|
948
|
-
*/
|
|
763
|
+
/** Base class for managing geographic data, location, language, and timezone settings. @keywords geo, location, language, timezone */
|
|
949
764
|
export declare class GeoInstance {
|
|
950
|
-
/**
|
|
951
|
-
* Initializes the location and related data.
|
|
952
|
-
* @keywords constructor geo instance
|
|
953
|
-
*/
|
|
765
|
+
/** Initializes the geographic instance and resolves default location data. @keywords constructor, geo, init */
|
|
954
766
|
constructor();
|
|
955
|
-
/**
|
|
956
|
-
* Getting information about the current country.
|
|
957
|
-
* @keywords get geo item
|
|
958
|
-
*/
|
|
767
|
+
/** Retrieves full geographic data for the current country. @keywords current, country, geo */
|
|
959
768
|
get(): GeoItemFull;
|
|
960
|
-
/**
|
|
961
|
-
* Getting the current country code.
|
|
962
|
-
* @keywords get country code
|
|
963
|
-
*/
|
|
769
|
+
/** Retrieves the current country code. @keywords country, code */
|
|
964
770
|
getCountry(): string;
|
|
965
|
-
/**
|
|
966
|
-
* Getting the current language code.
|
|
967
|
-
* @keywords get language code
|
|
968
|
-
*/
|
|
771
|
+
/** Retrieves the current language code. @keywords language, code */
|
|
969
772
|
getLanguage(): string;
|
|
970
|
-
/**
|
|
971
|
-
* Getting the full format according to the standard (language-country).
|
|
972
|
-
* @keywords get standard string
|
|
973
|
-
*/
|
|
773
|
+
/** Retrieves the standardized locale string (language-country). @keywords standard, locale, language, country */
|
|
974
774
|
getStandard(): string;
|
|
975
|
-
/**
|
|
976
|
-
* Getting the first day of the week for the current country.
|
|
977
|
-
* @keywords get first day week
|
|
978
|
-
*/
|
|
775
|
+
/** Retrieves the first day of the week for the current country. @keywords first_day, week, calendar */
|
|
979
776
|
getFirstDay(): string;
|
|
980
|
-
/**
|
|
981
|
-
* Getting the current location string.
|
|
982
|
-
* @keywords get location string
|
|
983
|
-
*/
|
|
777
|
+
/** Retrieves the current raw location string. @keywords location */
|
|
984
778
|
getLocation(): string;
|
|
985
|
-
/**
|
|
986
|
-
* Getting the country code from the location.
|
|
987
|
-
* @keywords get location country
|
|
988
|
-
*/
|
|
779
|
+
/** Extracts the country code from the current location. @keywords location, country */
|
|
989
780
|
getLocationCountry(): string;
|
|
990
|
-
/**
|
|
991
|
-
* Getting the language code from the location.
|
|
992
|
-
* @keywords get location language
|
|
993
|
-
*/
|
|
781
|
+
/** Extracts the language code from the current location. @keywords location, language */
|
|
994
782
|
getLocationLanguage(): string;
|
|
995
|
-
/**
|
|
996
|
-
* Getting processed data including the current language.
|
|
997
|
-
* @keywords get geo item full
|
|
998
|
-
*/
|
|
783
|
+
/** Retrieves processed geographic item data including active language. @keywords item, language, geo */
|
|
999
784
|
getItem(): GeoItemFull;
|
|
1000
|
-
/**
|
|
1001
|
-
* Returns the full list of available countries.
|
|
1002
|
-
* @keywords get list countries
|
|
1003
|
-
*/
|
|
785
|
+
/** Retrieves the complete list of available country geo records. @keywords list, countries */
|
|
1004
786
|
getList(): GeoItem[];
|
|
1005
|
-
/**
|
|
1006
|
-
* Returns data about the country by its code.
|
|
1007
|
-
* @keywords get by code geo
|
|
1008
|
-
*/
|
|
787
|
+
/** Retrieves full geographic data by locale, country, or language code. @keywords by_code, search, locale */
|
|
1009
788
|
getByCode(code?: string): GeoItemFull;
|
|
1010
|
-
/**
|
|
1011
|
-
* Returns full data by language and country combination.
|
|
1012
|
-
* @keywords get by code full
|
|
1013
|
-
*/
|
|
789
|
+
/** Retrieves geographic data matching an exact language-country standard code. @keywords by_code_full, lookup */
|
|
1014
790
|
getByCodeFull(code: string): GeoItem | undefined;
|
|
1015
|
-
/**
|
|
1016
|
-
* Returns full data by country code.
|
|
1017
|
-
* @keywords get by country
|
|
1018
|
-
*/
|
|
791
|
+
/** Retrieves geographic data by country code. @keywords by_country, lookup */
|
|
1019
792
|
getByCountry(country: string): GeoItem | undefined;
|
|
1020
|
-
/**
|
|
1021
|
-
* Returns full data by language code.
|
|
1022
|
-
* @keywords get by language
|
|
1023
|
-
*/
|
|
793
|
+
/** Retrieves geographic data by language code. @keywords by_language, lookup */
|
|
1024
794
|
getByLanguage(language: string): GeoItem | undefined;
|
|
1025
|
-
/**
|
|
1026
|
-
* Returns the current time zone offset in minutes.
|
|
1027
|
-
* @keywords get timezone offset
|
|
1028
|
-
*/
|
|
795
|
+
/** Retrieves the current timezone offset in minutes. @keywords timezone, offset, minutes */
|
|
1029
796
|
getTimezone(): number;
|
|
1030
|
-
/**
|
|
1031
|
-
* Returns the current time zone offset in a formatted string.
|
|
1032
|
-
* @keywords get timezone format
|
|
1033
|
-
*/
|
|
797
|
+
/** Retrieves the formatted timezone offset string (e.g. '+03:00'). @keywords timezone, format */
|
|
1034
798
|
getTimezoneFormat(): string;
|
|
1035
|
-
/**
|
|
1036
|
-
* Finds the country data by its code or name.
|
|
1037
|
-
* @keywords find geo
|
|
1038
|
-
*/
|
|
799
|
+
/** Finds country geo data by code or name. @keywords find, search, country */
|
|
1039
800
|
find(code: string): GeoItemFull;
|
|
1040
|
-
/**
|
|
1041
|
-
* Converts a geo item to its standard string representation.
|
|
1042
|
-
* @keywords to standard geo
|
|
1043
|
-
*/
|
|
801
|
+
/** Formats a geo item into a standard locale string. @keywords to_standard, format, locale */
|
|
1044
802
|
toStandard(item: GeoItem, language?: string): string;
|
|
1045
|
-
/**
|
|
1046
|
-
* Updates the current location and related data.
|
|
1047
|
-
* @keywords set geo location
|
|
1048
|
-
*/
|
|
803
|
+
/** Sets the active location code and optionally persists it to storage. @keywords set, location, save */
|
|
1049
804
|
set(code: string, save?: boolean): void;
|
|
1050
|
-
/**
|
|
1051
|
-
* Updates the default time zone offset.
|
|
1052
|
-
* @keywords set timezone
|
|
1053
|
-
*/
|
|
805
|
+
/** Sets the default timezone offset in minutes. @keywords set_timezone, offset */
|
|
1054
806
|
setTimezone(timezone: number): void;
|
|
1055
|
-
/**
|
|
1056
|
-
* Sets the default value for the country code.
|
|
1057
|
-
* @keywords set value default
|
|
1058
|
-
*/
|
|
807
|
+
/** Sets the default country code or dynamic resolver. @keywords default_value, country */
|
|
1059
808
|
setValueDefault(code?: string | (() => string)): void;
|
|
809
|
+
/** Adds or merges geographic data for a specific country code. @keywords add, country, merge */
|
|
810
|
+
add(country: string, item: Partial<GeoItem>): this;
|
|
811
|
+
/** Adds or merges multiple country geographic records. @keywords add_list, countries, batch */
|
|
812
|
+
addList(list: Record<string, Partial<GeoItem>>): this;
|
|
1060
813
|
}
|
|
1061
814
|
|
|
1062
|
-
/**
|
|
815
|
+
/** Internationalization and localization utility providing language-sensitive formatting and comparison. @keywords intl localization i18n formatter */
|
|
1063
816
|
export declare class GeoIntl {
|
|
1064
|
-
/** Checks if an instance exists for the specified country code. @keywords
|
|
817
|
+
/** Checks if an instance exists for the specified country or locale code. @keywords localization check locale */
|
|
1065
818
|
static isItem(code?: string): boolean;
|
|
1066
|
-
/**
|
|
819
|
+
/** Resolves and returns the standard location/locale code. @keywords locale location standard code */
|
|
1067
820
|
static getLocation(code?: string): string;
|
|
1068
|
-
/** Returns
|
|
821
|
+
/** Returns a cached or new GeoIntl instance for the specified locale code. @keywords singleton instance factory */
|
|
1069
822
|
static getInstance(code?: string): GeoIntl;
|
|
823
|
+
/** Creates a new GeoIntl instance for internationalization formatting. @keywords intl constructor init */
|
|
1070
824
|
constructor(code?: string, errorCenter?: ErrorCenterInstance);
|
|
1071
|
-
/**
|
|
825
|
+
/** Gets the current country and language locale code. @keywords locale location code */
|
|
1072
826
|
getLocation(): string;
|
|
1073
|
-
/** Returns the first day of the week. @keywords
|
|
827
|
+
/** Returns the first day of the week for the current locale. @keywords first day week calendar */
|
|
1074
828
|
getFirstDay(): string;
|
|
1075
|
-
/**
|
|
829
|
+
/** Formats display names for languages, regions, scripts, or currencies. @keywords display names translation region */
|
|
1076
830
|
display(value?: string, typeOptions?: Intl.DisplayNamesOptions['type'] | Intl.DisplayNamesOptions): string;
|
|
1077
|
-
/**
|
|
831
|
+
/** Gets the localized display name of a language. @keywords language name locale */
|
|
1078
832
|
languageName(value?: string, style?: Intl.RelativeTimeFormatStyle): string;
|
|
1079
|
-
/**
|
|
833
|
+
/** Gets the localized display name of a country or region. @keywords country name region */
|
|
1080
834
|
countryName(value?: string, style?: Intl.RelativeTimeFormatStyle): string;
|
|
1081
|
-
/**
|
|
835
|
+
/** Formats a full person name according to locale conventions. @keywords person full name formatting */
|
|
1082
836
|
fullName(last: string, first: string, surname?: string, short?: boolean): string;
|
|
1083
|
-
/** Formats
|
|
837
|
+
/** Formats numbers, strings, or bigints with localized numeric formatting. @keywords number format numeric */
|
|
1084
838
|
number(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1085
|
-
/**
|
|
839
|
+
/** Gets the localized decimal separator symbol. @keywords decimal separator point */
|
|
1086
840
|
decimal(): string;
|
|
1087
|
-
/** Formats
|
|
841
|
+
/** Formats numbers as localized currency strings. @keywords currency money format */
|
|
1088
842
|
currency(value: NumberOrString, currencyOptions?: string | Intl.NumberFormatOptions, numberOnly?: boolean): string;
|
|
1089
|
-
/** Returns the currency symbol or code. @keywords
|
|
843
|
+
/** Returns the currency symbol or code for a given currency. @keywords currency symbol sign */
|
|
1090
844
|
currencySymbol(currency: string, currencyDisplay?: keyof Intl.NumberFormatOptionsCurrencyDisplayRegistry): string;
|
|
1091
|
-
/** Formats a
|
|
845
|
+
/** Formats a number with localized measurement units. @keywords unit measure format */
|
|
1092
846
|
unit(value: NumberOrString, unitOptions?: string | Intl.NumberFormatOptions): string;
|
|
1093
|
-
/** Formats
|
|
847
|
+
/** Formats digital file sizes into localized unit strings. @keywords file size byte format */
|
|
1094
848
|
sizeFile(value: NumberOrString, unitOptions?: 'byte' | 'kilobyte' | 'megabyte' | 'gigabyte' | 'terabyte' | 'petabyte' | Intl.NumberFormatOptions): string;
|
|
1095
|
-
/** Formats a
|
|
849
|
+
/** Formats a ratio value (e.g. 0.5) as a localized percentage. @keywords percent percentage format */
|
|
1096
850
|
percent(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1097
|
-
/** Formats a
|
|
851
|
+
/** Formats a 0-100 numeric value as a localized percentage. @keywords percentage percent 100 */
|
|
1098
852
|
percentBy100(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1099
|
-
/** Formats
|
|
853
|
+
/** Formats pluralized words matching locale rules (format: one|two|few|many|other|zero). @keywords plural pluralization words */
|
|
1100
854
|
plural(value: NumberOrString, words: string, options?: Intl.PluralRulesOptions, optionsNumber?: Intl.NumberFormatOptions): string;
|
|
1101
|
-
/** Formats date and time. @keywords
|
|
855
|
+
/** Formats date and time values according to locale rules. @keywords date time format */
|
|
1102
856
|
date(value: NumberOrStringOrDate, type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, hour24?: boolean): string;
|
|
1103
|
-
/** Formats relative time. @keywords
|
|
857
|
+
/** Formats language-sensitive relative time strings (e.g. 'yesterday', 'in 2 days'). @keywords relative time format ago */
|
|
1104
858
|
relative(value: NumberOrStringOrDate, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, todayValue?: Date): string;
|
|
1105
|
-
/** Formats relative time with a limit
|
|
859
|
+
/** Formats relative time with a day limit, falling back to absolute date formatting. @keywords relative limit fallback time */
|
|
1106
860
|
relativeLimit(value: NumberOrStringOrDate, limit: number, todayValue?: Date, relativeOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, dateOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, type?: GeoDate, hour24?: boolean): string;
|
|
1107
|
-
/** Formats
|
|
861
|
+
/** Formats an explicit numeric difference and time unit into relative time. @keywords relative by value time unit */
|
|
1108
862
|
relativeByValue(value: NumberOrString, unit: Intl.RelativeTimeFormatUnit, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions): string;
|
|
1109
|
-
/**
|
|
863
|
+
/** Gets the localized month name for a given date. @keywords month name calendar */
|
|
1110
864
|
month(value?: NumberOrStringOrDate, style?: Intl.DateTimeFormatOptions['month']): string;
|
|
1111
|
-
/** Returns an array of
|
|
865
|
+
/** Returns an array of localized month names (1-12). @keywords months list options select */
|
|
1112
866
|
months(style?: Intl.DateTimeFormatOptions['month']): ItemValue<number | undefined>[];
|
|
1113
|
-
/**
|
|
867
|
+
/** Gets the localized weekday name for a given date. @keywords weekday name day */
|
|
1114
868
|
weekday(value?: NumberOrStringOrDate, style?: Intl.DateTimeFormatOptions['weekday']): string;
|
|
1115
|
-
/** Returns an array of
|
|
869
|
+
/** Returns an array of localized weekday names (0-6). @keywords weekdays list options select */
|
|
1116
870
|
weekdays(style?: Intl.DateTimeFormatOptions['weekday']): ItemValue<number | undefined>[];
|
|
1117
|
-
/** Formats time. @keywords
|
|
871
|
+
/** Formats the time portion of a date according to locale conventions. @keywords time format clock */
|
|
1118
872
|
time(value: NumberOrStringOrDate): string;
|
|
1119
|
-
/** Sorts
|
|
873
|
+
/** Sorts string items or objects locale-sensitively using Intl.Collator. @keywords sort collator locale */
|
|
1120
874
|
sort<T>(data: T[], compareFn?: (a: T, b: T) => [string, string]): T[];
|
|
1121
875
|
}
|
|
1122
876
|
|
|
1123
|
-
/**
|
|
877
|
+
/** Class for storing and processing phone number masks and country dialing codes. @keywords phone, mask, country code, dialing */
|
|
1124
878
|
export declare class GeoPhone {
|
|
1125
|
-
/** Retrieves phone
|
|
879
|
+
/** Retrieves phone code and country information by country code. @keywords phone info, country code */
|
|
1126
880
|
static get(code: string): GeoPhoneValue | undefined;
|
|
1127
|
-
/** Retrieves
|
|
881
|
+
/** Retrieves country and mask information from a phone number. @keywords parse phone, phone lookup */
|
|
1128
882
|
static getByPhone(phone: string): GeoPhoneMapInfo;
|
|
1129
|
-
/** Retrieves mask data by country code @keywords
|
|
883
|
+
/** Retrieves complete phone mask data by country code. @keywords mask by code, country mask */
|
|
1130
884
|
static getByCode(code: string): GeoPhoneMap | undefined;
|
|
1131
|
-
/**
|
|
885
|
+
/** Returns a list of all phone country codes and metadata. @keywords phone list, country codes */
|
|
1132
886
|
static getList(): GeoPhoneValue[];
|
|
1133
|
-
/**
|
|
887
|
+
/** Returns a map tree of phone data indexed by country code. @keywords phone map, dial tree */
|
|
1134
888
|
static getMap(): Record<string, GeoPhoneMap>;
|
|
1135
|
-
/**
|
|
889
|
+
/** Formats a phone number according to provided or matched masks. @keywords format phone, apply mask */
|
|
1136
890
|
static toMask(phone: string, masks?: string[]): string | undefined;
|
|
1137
|
-
/** Removes country
|
|
891
|
+
/** Removes country prefixes or trunk zeroes from an input phone number. @keywords clean phone, strip prefix */
|
|
1138
892
|
static removeZero(phone: string): string;
|
|
1139
893
|
}
|
|
1140
894
|
|
|
1141
|
-
/**
|
|
1142
|
-
* Class for localized unit formatting and automatic conversions.
|
|
1143
|
-
* @keywords geo unit format convert metric imperial
|
|
1144
|
-
*/
|
|
895
|
+
/** Localized unit formatting and automatic conversions based on locale. @keywords unit measurement locale conversion format */
|
|
1145
896
|
export declare class GeoUnit {
|
|
1146
|
-
/**
|
|
897
|
+
/** Gets an isolated or cached GeoUnit instance by country or language code. @keywords instance singleton cache factory */
|
|
1147
898
|
static getInstance(code?: string): GeoUnit;
|
|
1148
|
-
/**
|
|
899
|
+
/** Creates a GeoUnit instance for a country or language code. @keywords constructor init */
|
|
1149
900
|
constructor(code?: string);
|
|
1150
|
-
/**
|
|
901
|
+
/** Gets the standard location code. @keywords location locale country */
|
|
1151
902
|
getLocation(): string;
|
|
1152
|
-
/** Formats millimeter value, converting to inches
|
|
903
|
+
/** Formats millimeter value, converting to inches for imperial locales. @keywords millimeter mm inch */
|
|
1153
904
|
millimeter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1154
|
-
/** Formats centimeter value, converting to inches
|
|
905
|
+
/** Formats centimeter value, converting to inches for imperial locales. @keywords centimeter cm inch */
|
|
1155
906
|
centimeter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1156
|
-
/** Formats meter value, converting to feet
|
|
907
|
+
/** Formats meter value, converting to feet for imperial locales. @keywords meter m foot feet */
|
|
1157
908
|
meter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1158
|
-
/** Formats kilometer value, converting to miles
|
|
909
|
+
/** Formats kilometer value, converting to miles for imperial locales. @keywords kilometer km mile */
|
|
1159
910
|
kilometer(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1160
|
-
/** Formats square meter value, converting to square feet
|
|
911
|
+
/** Formats square meter value, converting to square feet for imperial locales. @keywords square meter m2 sqft */
|
|
1161
912
|
squareMeter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1162
|
-
/** Formats hectare value, converting to acres
|
|
913
|
+
/** Formats hectare value, converting to acres for imperial locales. @keywords hectare ha acre */
|
|
1163
914
|
hectare(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1164
|
-
/** Formats gram value, converting to ounces
|
|
915
|
+
/** Formats gram value, converting to ounces for imperial locales. @keywords gram g ounce oz */
|
|
1165
916
|
gram(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1166
|
-
/** Formats kilogram value, converting to pounds
|
|
917
|
+
/** Formats kilogram value, converting to pounds for imperial locales. @keywords kilogram kg pound lb */
|
|
1167
918
|
kilogram(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1168
|
-
/** Formats tonne value, converting to short tons
|
|
919
|
+
/** Formats metric tonne value, converting to short tons for imperial locales. @keywords tonne ton */
|
|
1169
920
|
tonne(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1170
|
-
/** Formats milliliter value, converting to fluid ounces
|
|
921
|
+
/** Formats milliliter value, converting to fluid ounces for imperial locales. @keywords milliliter ml floz */
|
|
1171
922
|
milliliter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1172
|
-
/** Formats liter value, converting to gallons
|
|
923
|
+
/** Formats liter value, converting to gallons for imperial locales. @keywords liter l gallon gal */
|
|
1173
924
|
liter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1174
|
-
/** Formats
|
|
925
|
+
/** Formats Celsius value, converting to Fahrenheit for imperial locales. @keywords celsius fahrenheit temperature */
|
|
1175
926
|
celsius(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1176
|
-
/** Formats
|
|
927
|
+
/** Formats speed in km/h, converting to mph for imperial locales. @keywords kmh mph speed */
|
|
1177
928
|
kilometerPerHour(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1178
|
-
/** Formats
|
|
929
|
+
/** Formats a numeric value for the specified unit according to locale settings. @keywords format unit locale convert */
|
|
1179
930
|
format(value: NumberOrString, unit: string, options?: Intl.NumberFormatOptions): string;
|
|
1180
931
|
}
|
|
1181
932
|
|
|
1182
|
-
/** Static utility class for storing application-wide global data. @keywords global
|
|
933
|
+
/** Static utility class for storing and retrieving application-wide global data. @keywords global state storage data */
|
|
1183
934
|
export declare class Global {
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
935
|
+
/** Returns global data storage instance. @keywords global storage data */
|
|
936
|
+
static getItem(): Record<string, any>;
|
|
937
|
+
/** Returns a value by its property name. @keywords get global value property */
|
|
938
|
+
static get<R = any>(name: string): R;
|
|
939
|
+
/** Adds global data (works only once). @keywords add set global data init */
|
|
940
|
+
static add(data: Record<string, any>): void;
|
|
1190
941
|
}
|
|
1191
942
|
|
|
1192
|
-
/** Static
|
|
943
|
+
/** Static interface for managing URL hash state via HashInstance. @keywords url hash, router state, hash params */
|
|
1193
944
|
export declare class Hash {
|
|
1194
|
-
/** Returns HashInstance
|
|
945
|
+
/** Returns a request-isolated HashInstance. @keywords instance, singleton, context */
|
|
1195
946
|
static getItem(): HashInstance;
|
|
1196
|
-
/**
|
|
947
|
+
/** Retrieves a value from the URL hash. @keywords hash get, read url param */
|
|
1197
948
|
static get<T>(name: string, defaultValue?: T | (() => T)): T;
|
|
1198
|
-
/** Sets
|
|
949
|
+
/** Sets or updates a value in the URL hash. @keywords hash set, update url param */
|
|
1199
950
|
static set<T>(name: string, callback: T | (() => T)): void;
|
|
1200
|
-
/**
|
|
951
|
+
/** Subscribes a listener callback to changes for a specific hash variable. @keywords watch, subscribe, listener, observe */
|
|
1201
952
|
static addWatch<T>(name: string, callback: (value: T) => void): void;
|
|
1202
|
-
/**
|
|
953
|
+
/** Unsubscribes a listener callback from hash variable changes. @keywords unwatch, unsubscribe, remove listener */
|
|
1203
954
|
static removeWatch<T>(name: string, callback: (value: T) => void): void;
|
|
1204
|
-
/** Reloads hash
|
|
955
|
+
/** Reloads and synchronizes hash variables from the current URL string. @keywords reload, refresh, sync url */
|
|
1205
956
|
static reload(): void;
|
|
1206
957
|
}
|
|
1207
958
|
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
/** Class for working with URL hash data. @keywords hash, url, instance */
|
|
959
|
+
/** Class for managing and synchronizing data stored in the URL hash. @keywords url hash, location hash, hash state, url parameters */
|
|
1211
960
|
export declare class HashInstance extends UrlInstanceAbstract {
|
|
1212
|
-
/** Initializes hash data and registers hashchange listener. @keywords init, hash */
|
|
1213
|
-
protected init(): this;
|
|
1214
|
-
/** Obtains data from the URL hash string. @keywords get, location, hash */
|
|
1215
|
-
protected getLocation(): Record<string, any>;
|
|
1216
|
-
/** Updates the hash string in the URL. @keywords update, hash */
|
|
1217
|
-
protected update(): this;
|
|
1218
961
|
}
|
|
1219
962
|
|
|
1220
|
-
/** @keywords icon item type */
|
|
1221
963
|
export type IconsItem = string | Promise<string | any> | (() => Promise<string | any>);
|
|
1222
|
-
|
|
1223
|
-
/** @keywords icon configuration */
|
|
1224
964
|
export type IconsConfig = {
|
|
1225
965
|
url?: string;
|
|
1226
966
|
list?: Record<string, IconsItem>;
|
|
1227
967
|
};
|
|
1228
|
-
|
|
1229
|
-
/** @keywords icons manager, svg */
|
|
968
|
+
/** Icon manager utility for registering and loading icons. @keywords icons, icon-loader, assets */
|
|
1230
969
|
export declare class Icons {
|
|
1231
|
-
/** @keywords
|
|
970
|
+
/** Checks if an icon is registered. @keywords icons, has-icon, exists */
|
|
1232
971
|
static is(index: string): boolean;
|
|
1233
|
-
/** @keywords get icon
|
|
972
|
+
/** Retrieves icon content or path asynchronously. @keywords get-icon, async-icon, fetch-icon */
|
|
1234
973
|
static get(index: string, url?: string, wait?: number): Promise<string>;
|
|
1235
|
-
/** @keywords get icon
|
|
974
|
+
/** Synchronously returns an icon if loaded or string-based. @keywords get-sync, cached-icon */
|
|
1236
975
|
static getAsync(index: string, url?: string): string;
|
|
1237
|
-
/**
|
|
976
|
+
/** Retrieves a list of all registered icon names. @keywords icon-list, names */
|
|
1238
977
|
static getNameList(): string[];
|
|
1239
|
-
/** @keywords
|
|
978
|
+
/** Retrieves the global icon storage URL. @keywords global-url, base-url */
|
|
1240
979
|
static getUrlGlobal(): string;
|
|
1241
|
-
/** @keywords add
|
|
980
|
+
/** Registers a custom icon definition. @keywords register-icon, add-icon */
|
|
1242
981
|
static add(index: string, file: IconsItem): void;
|
|
1243
|
-
/** @keywords add
|
|
982
|
+
/** Registers an icon in pending loading state. @keywords add-loading, placeholder */
|
|
1244
983
|
static addLoad(index: string): void;
|
|
1245
|
-
/** @keywords add
|
|
984
|
+
/** Registers a global icon path. @keywords add-global, icon-url */
|
|
1246
985
|
static addGlobal(index: string, file: string): void;
|
|
1247
|
-
/**
|
|
986
|
+
/** Registers multiple icons from a key-value record. @keywords batch-register, icon-list */
|
|
1248
987
|
static addByList(list: Record<string, IconsItem>): void;
|
|
1249
|
-
/** @keywords set
|
|
988
|
+
/** Sets the base icon storage URL. @keywords set-url, icon-path */
|
|
1250
989
|
static setUrl(url: string): void;
|
|
1251
|
-
/** @keywords
|
|
990
|
+
/** Updates the icon configuration. @keywords config, setup */
|
|
1252
991
|
static setConfig(config: IconsConfig): void;
|
|
1253
992
|
}
|
|
1254
993
|
|
|
1255
|
-
/** Class for
|
|
994
|
+
/** Class for managing global loading state. @keywords loading, loader, spinner, global */
|
|
1256
995
|
export declare class Loading {
|
|
1257
|
-
/**
|
|
996
|
+
/** Checks if the loader is currently active. @keywords is loading, active */
|
|
1258
997
|
static is(): boolean;
|
|
1259
|
-
/**
|
|
998
|
+
/** Gets the current loading count or value. @keywords loading count, status */
|
|
1260
999
|
static get(): number;
|
|
1261
|
-
/**
|
|
1000
|
+
/** Returns a request-isolated instance of LoadingInstance. @keywords loading instance, isolated */
|
|
1262
1001
|
static getItem(): LoadingInstance;
|
|
1263
|
-
/**
|
|
1002
|
+
/** Shows the loader. @keywords show loader, start loading */
|
|
1264
1003
|
static show(): void;
|
|
1265
|
-
/**
|
|
1004
|
+
/** Hides the loader. @keywords hide loader, stop loading */
|
|
1266
1005
|
static hide(): void;
|
|
1267
|
-
/**
|
|
1006
|
+
/** Registers an event listener for loading state changes. @keywords loading event, add listener */
|
|
1268
1007
|
static registrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
|
|
1269
|
-
/**
|
|
1008
|
+
/** Unregisters a loading state event listener. @keywords remove listener, unsubscribe */
|
|
1270
1009
|
static unregistrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
|
|
1271
1010
|
}
|
|
1272
1011
|
|
|
1273
1012
|
export type LoadingDetail = {
|
|
1274
1013
|
loading: boolean;
|
|
1275
1014
|
};
|
|
1015
|
+
|
|
1276
1016
|
export type LoadingRegistrationItem = {
|
|
1277
1017
|
item: EventItem<Window, CustomEvent, LoadingDetail>;
|
|
1278
1018
|
listener: EventListenerDetail<CustomEvent, LoadingDetail>;
|
|
1279
1019
|
element?: ElementOrString<HTMLElement>;
|
|
1280
1020
|
};
|
|
1281
|
-
|
|
1021
|
+
|
|
1022
|
+
/** Manages global loading state counters and event notifications. @keywords loading, state, loader, progress */
|
|
1282
1023
|
export declare class LoadingInstance {
|
|
1283
|
-
/**
|
|
1024
|
+
/** Initializes the loading tracker. @param eventName Name of the event to broadcast loading state @keywords init, constructor */
|
|
1284
1025
|
constructor(eventName?: string);
|
|
1285
|
-
/**
|
|
1026
|
+
/** Checks whether the loader is currently active. @keywords is, status, active */
|
|
1286
1027
|
is(): boolean;
|
|
1287
|
-
/**
|
|
1028
|
+
/** Gets the current loading count value. @keywords get, count, counter */
|
|
1288
1029
|
get(): number;
|
|
1289
|
-
/**
|
|
1030
|
+
/** Increments loading counter and activates loader. @keywords show, start, display */
|
|
1290
1031
|
show(): void;
|
|
1291
|
-
/**
|
|
1032
|
+
/** Decrements loading counter and hides loader when count reaches zero. @keywords hide, stop, dismiss */
|
|
1292
1033
|
hide(): void;
|
|
1293
|
-
/**
|
|
1034
|
+
/** Registers an event listener for loading state changes. @param listener Event listener callback @param element Target DOM element @keywords register, listener, subscribe */
|
|
1294
1035
|
registrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
|
|
1295
|
-
/**
|
|
1036
|
+
/** Unregisters a loading state event listener. @param listener Event listener callback @param element Target DOM element @keywords unregister, unsubscribe, remove */
|
|
1296
1037
|
unregistrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
|
|
1297
1038
|
}
|
|
1298
1039
|
|
|
1299
|
-
/** Unified
|
|
1040
|
+
/** Unified manager for standard HTML, Open Graph, and Twitter Card meta tags. @keywords meta, tags, head, html, seo */
|
|
1300
1041
|
export declare class Meta extends MetaManager<MetaTag[]> {
|
|
1301
|
-
/** Creates an instance of Meta with integrated Open Graph and Twitter Card support. @keywords
|
|
1042
|
+
/** Creates an instance of Meta with integrated Open Graph and Twitter Card support. @keywords constructor, init */
|
|
1302
1043
|
constructor();
|
|
1303
|
-
/** Gets the MetaOg instance for
|
|
1044
|
+
/** Gets the MetaOg instance for Open Graph operations. @keywords og, opengraph */
|
|
1304
1045
|
getOg(): MetaOg;
|
|
1305
|
-
/** Gets the MetaTwitter instance for
|
|
1046
|
+
/** Gets the MetaTwitter instance for Twitter Card operations. @keywords twitter, card */
|
|
1306
1047
|
getTwitter(): MetaTwitter;
|
|
1307
1048
|
/** Gets the page title without suffix. @keywords title, get */
|
|
1308
1049
|
getTitle(): string;
|
|
1309
|
-
/** Gets the keywords meta tag. @keywords keywords,
|
|
1050
|
+
/** Gets the keywords meta tag content. @keywords keywords, get */
|
|
1310
1051
|
getKeywords(): string;
|
|
1311
|
-
/** Gets the description meta tag. @keywords description,
|
|
1052
|
+
/** Gets the description meta tag content. @keywords description, get */
|
|
1312
1053
|
getDescription(): string;
|
|
1313
|
-
/** Gets the Open Graph image URL. @keywords image, og */
|
|
1054
|
+
/** Gets the Open Graph image URL. @keywords image, og, get */
|
|
1314
1055
|
getImage(): string;
|
|
1315
|
-
/** Gets the canonical URL. @keywords canonical, url */
|
|
1056
|
+
/** Gets the canonical URL. @keywords canonical, url, get */
|
|
1316
1057
|
getCanonical(): string;
|
|
1317
|
-
/** Gets the robots meta tag
|
|
1058
|
+
/** Gets the robots meta tag directive. @keywords robots, crawler, get */
|
|
1318
1059
|
getRobots(): MetaRobots;
|
|
1319
|
-
/** Gets the author meta tag. @keywords author,
|
|
1060
|
+
/** Gets the author meta tag content. @keywords author, get */
|
|
1320
1061
|
getAuthor(): string;
|
|
1321
|
-
/** Gets the Open Graph site name. @keywords
|
|
1062
|
+
/** Gets the Open Graph site name. @keywords site_name, og, get */
|
|
1322
1063
|
getSiteName(): string;
|
|
1323
|
-
/** Gets the Open Graph locale. @keywords locale, og */
|
|
1064
|
+
/** Gets the Open Graph locale. @keywords locale, og, get */
|
|
1324
1065
|
getLocale(): string;
|
|
1325
|
-
/** Sets the page title
|
|
1066
|
+
/** Sets the page title with suffix and updates Open Graph and Twitter Card titles. @keywords title, set */
|
|
1326
1067
|
setTitle(title: string): this;
|
|
1327
1068
|
/** Sets the keywords meta tag. @keywords keywords, set */
|
|
1328
1069
|
setKeywords(keywords: string | string[]): this;
|
|
1329
1070
|
/** Sets the description meta tag. @keywords description, set */
|
|
1330
1071
|
setDescription(description: string): this;
|
|
1331
|
-
/** Sets the image for Open Graph and Twitter Card. @keywords image, set */
|
|
1072
|
+
/** Sets the image for Open Graph and Twitter Card. @keywords image, og, twitter, set */
|
|
1332
1073
|
setImage(image: string): this;
|
|
1333
|
-
/** Sets the canonical URL and updates Open Graph and Twitter Card URLs. @keywords canonical, set */
|
|
1074
|
+
/** Sets the canonical URL and updates Open Graph and Twitter Card URLs. @keywords canonical, url, set */
|
|
1334
1075
|
setCanonical(canonical: string): this;
|
|
1335
|
-
/** Sets the robots meta tag. @keywords robots, set */
|
|
1076
|
+
/** Sets the robots meta tag directive. @keywords robots, indexing, set */
|
|
1336
1077
|
setRobots(robots: MetaRobots): this;
|
|
1337
1078
|
/** Sets the author meta tag. @keywords author, set */
|
|
1338
1079
|
setAuthor(author: string): this;
|
|
1339
|
-
/** Sets the site name for Open Graph and Twitter Card. @keywords
|
|
1080
|
+
/** Sets the site name for Open Graph and Twitter Card. @keywords site_name, og, set */
|
|
1340
1081
|
setSiteName(siteName: string): this;
|
|
1341
|
-
/** Sets the
|
|
1082
|
+
/** Sets the Open Graph locale. @keywords locale, og, set */
|
|
1342
1083
|
setLocale(locale: string): this;
|
|
1343
|
-
/** Sets the suffix to append to page title. @keywords suffix, title */
|
|
1084
|
+
/** Sets the suffix to append to page title. @keywords suffix, title, set */
|
|
1344
1085
|
setSuffix(suffix?: string): void;
|
|
1345
|
-
/** Generates the complete HTML for all meta
|
|
1086
|
+
/** Generates the complete HTML string for all meta tags. @keywords html, render, serialize */
|
|
1346
1087
|
html(): string;
|
|
1347
|
-
/** Generates the title as an HTML-safe string. @keywords html,
|
|
1088
|
+
/** Generates the title as an HTML-safe string. @keywords title, html, render */
|
|
1348
1089
|
htmlTitle(): string;
|
|
1349
1090
|
}
|
|
1350
1091
|
|
|
1351
1092
|
type MetaList<T extends readonly string[]> = {
|
|
1352
1093
|
[K in T[number]]?: string;
|
|
1353
1094
|
};
|
|
1354
|
-
/** @keywords
|
|
1095
|
+
/** Manages HTML meta tag creation, retrieval, and rendering. @keywords meta, head, seo, html, tags */
|
|
1355
1096
|
export declare class MetaManager<T extends readonly string[], Key extends keyof MetaList<T> = keyof MetaList<T>> {
|
|
1356
|
-
/** @keywords
|
|
1097
|
+
/** Initializes manager with meta tag names and optional property attribute mode. @keywords meta, init, head */
|
|
1357
1098
|
constructor(listMeta: T, isProperty?: boolean);
|
|
1358
|
-
/** @keywords
|
|
1099
|
+
/** Returns managed meta tag names list. @keywords meta, list, names */
|
|
1359
1100
|
getListMeta(): T;
|
|
1360
|
-
/** @keywords get
|
|
1101
|
+
/** Gets content of specified meta tag by name. @keywords meta, get, value, content */
|
|
1361
1102
|
get(name: Key): string;
|
|
1362
|
-
/** @keywords
|
|
1103
|
+
/** Returns all configured meta tag key-value pairs. @keywords meta, items, dictionary, all */
|
|
1363
1104
|
getItems(): MetaList<T>;
|
|
1364
|
-
/** @keywords html render meta
|
|
1105
|
+
/** Renders all meta tags as an HTML string. @keywords html, render, markup, meta */
|
|
1365
1106
|
html(): string;
|
|
1366
|
-
/** @keywords set
|
|
1107
|
+
/** Sets content for a specific meta tag. @keywords meta, set, update */
|
|
1367
1108
|
set(name: Key, content: string): this;
|
|
1368
|
-
/**
|
|
1109
|
+
/** Sets multiple meta tags from a dictionary object. @keywords meta, batch, set, dictionary */
|
|
1369
1110
|
setByList(metaList: MetaList<T>): this;
|
|
1370
1111
|
}
|
|
1371
|
-
export {};
|
|
1372
1112
|
|
|
1113
|
+
/** Manages Open Graph meta tags. @keywords meta open graph og seo tags */
|
|
1373
1114
|
export declare class MetaOg extends MetaManager<MetaOpenGraphTag[]> {
|
|
1374
|
-
/**
|
|
1115
|
+
/** Initializes a new MetaOg instance. @keywords constructor og */
|
|
1375
1116
|
constructor();
|
|
1376
|
-
/** Gets the Open Graph title. @keywords
|
|
1117
|
+
/** Gets the Open Graph title (`og:title`). @keywords og title */
|
|
1377
1118
|
getTitle(): string;
|
|
1378
|
-
/** Gets the Open Graph type. @keywords
|
|
1119
|
+
/** Gets the Open Graph type (`og:type`). @keywords og type */
|
|
1379
1120
|
getType(): MetaOpenGraphType;
|
|
1380
|
-
/** Gets the Open Graph URL. @keywords
|
|
1121
|
+
/** Gets the Open Graph URL (`og:url`). @keywords og url */
|
|
1381
1122
|
getUrl(): string;
|
|
1382
|
-
/** Gets the Open Graph image URL. @keywords
|
|
1123
|
+
/** Gets the Open Graph image URL (`og:image`). @keywords og image */
|
|
1383
1124
|
getImage(): string;
|
|
1384
|
-
/** Gets the Open Graph description. @keywords
|
|
1125
|
+
/** Gets the Open Graph description (`og:description`). @keywords og description */
|
|
1385
1126
|
getDescription(): string;
|
|
1386
|
-
/** Gets the Open Graph locale. @keywords
|
|
1127
|
+
/** Gets the Open Graph locale (`og:locale`). @keywords og locale */
|
|
1387
1128
|
getLocale(): string;
|
|
1388
|
-
/** Gets the Open Graph site name. @keywords
|
|
1129
|
+
/** Gets the Open Graph site name (`og:site_name`). @keywords og site name */
|
|
1389
1130
|
getSiteName(): string;
|
|
1390
|
-
/** Sets the Open Graph title. @keywords
|
|
1131
|
+
/** Sets the Open Graph title (`og:title`). @keywords og title */
|
|
1391
1132
|
setTitle(title: string): this;
|
|
1392
|
-
/** Sets the Open Graph type. @keywords
|
|
1133
|
+
/** Sets the Open Graph type (`og:type`). @keywords og type */
|
|
1393
1134
|
setType(type: MetaOpenGraphType): this;
|
|
1394
|
-
/** Sets the Open Graph URL. @keywords
|
|
1135
|
+
/** Sets the Open Graph URL (`og:url`). @keywords og url */
|
|
1395
1136
|
setUrl(url: string): this;
|
|
1396
|
-
/** Sets the Open Graph image URL. @keywords
|
|
1137
|
+
/** Sets the Open Graph image URL (`og:image`). @keywords og image */
|
|
1397
1138
|
setImage(url: string): this;
|
|
1398
|
-
/** Sets the Open Graph description. @keywords
|
|
1139
|
+
/** Sets the Open Graph description (`og:description`). @keywords og description */
|
|
1399
1140
|
setDescription(description: string): this;
|
|
1400
|
-
/** Sets the Open Graph locale. @keywords
|
|
1141
|
+
/** Sets the Open Graph locale (`og:locale`, e.g. 'en_US'). @keywords og locale */
|
|
1401
1142
|
setLocale(locale: string): this;
|
|
1402
|
-
/** Sets the Open Graph site name. @keywords
|
|
1143
|
+
/** Sets the Open Graph site name (`og:site_name`). @keywords og site name */
|
|
1403
1144
|
setSiteName(siteName: string): this;
|
|
1404
1145
|
}
|
|
1405
1146
|
|
|
1406
|
-
/** Static
|
|
1147
|
+
/** Static helper for managing meta tags, Open Graph, and Twitter Cards. @keywords meta, tags, head, seo */
|
|
1407
1148
|
export declare class MetaStatic {
|
|
1408
|
-
/**
|
|
1409
|
-
static getItem():
|
|
1410
|
-
/**
|
|
1411
|
-
static getOg():
|
|
1412
|
-
/**
|
|
1413
|
-
static getTwitter():
|
|
1414
|
-
/** Gets page title @keywords
|
|
1149
|
+
/** Returns singleton instance of Meta. @keywords instance, singleton, meta */
|
|
1150
|
+
static getItem(): Meta;
|
|
1151
|
+
/** Returns MetaOg instance for Open Graph tags. @keywords og, open graph, social */
|
|
1152
|
+
static getOg(): MetaOg;
|
|
1153
|
+
/** Returns MetaTwitter instance for Twitter Card tags. @keywords twitter, twitter card, social */
|
|
1154
|
+
static getTwitter(): MetaTwitter;
|
|
1155
|
+
/** Gets page title without suffix. @keywords title, get, seo */
|
|
1415
1156
|
static getTitle(): string;
|
|
1416
|
-
/** Gets meta
|
|
1157
|
+
/** Gets keywords meta tag content. @keywords keywords, meta, seo */
|
|
1417
1158
|
static getKeywords(): string;
|
|
1418
|
-
/** Gets meta
|
|
1159
|
+
/** Gets description meta tag content. @keywords description, meta, seo */
|
|
1419
1160
|
static getDescription(): string;
|
|
1420
|
-
/** Gets image URL @keywords
|
|
1161
|
+
/** Gets Open Graph image URL. @keywords image, og, preview */
|
|
1421
1162
|
static getImage(): string;
|
|
1422
|
-
/** Gets canonical URL @keywords
|
|
1163
|
+
/** Gets canonical URL. @keywords canonical, url, link */
|
|
1423
1164
|
static getCanonical(): string;
|
|
1424
|
-
/** Gets robots directive @keywords
|
|
1165
|
+
/** Gets robots meta directive. @keywords robots, crawler, indexing */
|
|
1425
1166
|
static getRobots(): MetaRobots;
|
|
1426
|
-
/** Gets author
|
|
1167
|
+
/** Gets author meta tag value. @keywords author, meta */
|
|
1427
1168
|
static getAuthor(): string;
|
|
1428
|
-
/** Gets site name @keywords
|
|
1169
|
+
/** Gets Open Graph site name. @keywords siteName, og, name */
|
|
1429
1170
|
static getSiteName(): string;
|
|
1430
|
-
/** Gets locale @keywords
|
|
1171
|
+
/** Gets Open Graph locale. @keywords locale, language, og */
|
|
1431
1172
|
static getLocale(): string;
|
|
1432
|
-
/** Sets page title @keywords
|
|
1433
|
-
static setTitle(
|
|
1434
|
-
/** Sets meta
|
|
1435
|
-
static setKeywords(
|
|
1436
|
-
/** Sets meta
|
|
1437
|
-
static setDescription(
|
|
1438
|
-
/** Sets image
|
|
1439
|
-
static setImage(
|
|
1440
|
-
/** Sets canonical URL @keywords
|
|
1441
|
-
static setCanonical(
|
|
1442
|
-
/** Sets robots directive @keywords
|
|
1443
|
-
static setRobots(
|
|
1444
|
-
/** Sets author
|
|
1445
|
-
static setAuthor(
|
|
1446
|
-
/** Sets site name @keywords
|
|
1447
|
-
static setSiteName(
|
|
1448
|
-
/** Sets locale @keywords
|
|
1449
|
-
static setLocale(
|
|
1450
|
-
/** Sets title
|
|
1451
|
-
static setSuffix(
|
|
1452
|
-
/**
|
|
1173
|
+
/** Sets page title and synchronizes Open Graph and Twitter Card titles. @keywords setTitle, title, seo */
|
|
1174
|
+
static setTitle(title: string): typeof MetaStatic;
|
|
1175
|
+
/** Sets keywords meta tag. @keywords setKeywords, keywords, seo */
|
|
1176
|
+
static setKeywords(keywords: string | string[]): typeof MetaStatic;
|
|
1177
|
+
/** Sets description meta tag. @keywords setDescription, description, seo */
|
|
1178
|
+
static setDescription(description: string): typeof MetaStatic;
|
|
1179
|
+
/** Sets preview image for Open Graph and Twitter Card. @keywords setImage, image, og, twitter */
|
|
1180
|
+
static setImage(image: string): typeof MetaStatic;
|
|
1181
|
+
/** Sets canonical URL and updates Open Graph and Twitter Card URLs. @keywords setCanonical, canonical, url */
|
|
1182
|
+
static setCanonical(canonical: string): typeof MetaStatic;
|
|
1183
|
+
/** Sets robots meta tag directive. @keywords setRobots, robots, crawler */
|
|
1184
|
+
static setRobots(robots: MetaRobots): typeof MetaStatic;
|
|
1185
|
+
/** Sets author meta tag. @keywords setAuthor, author */
|
|
1186
|
+
static setAuthor(author: string): typeof MetaStatic;
|
|
1187
|
+
/** Sets site name for Open Graph and Twitter Card. @keywords setSiteName, siteName, og */
|
|
1188
|
+
static setSiteName(siteName: string): typeof MetaStatic;
|
|
1189
|
+
/** Sets locale for Open Graph. @keywords setLocale, locale, lang */
|
|
1190
|
+
static setLocale(locale: string): typeof MetaStatic;
|
|
1191
|
+
/** Sets suffix appended to page title. @keywords setSuffix, suffix, title */
|
|
1192
|
+
static setSuffix(suffix?: string): typeof MetaStatic;
|
|
1193
|
+
/** Renders complete HTML string for all meta, Open Graph, and Twitter Card tags. @keywords html, render, tags */
|
|
1453
1194
|
static html(): string;
|
|
1454
|
-
/**
|
|
1195
|
+
/** Renders page title tag as HTML-safe string. @keywords htmlTitle, title, render */
|
|
1455
1196
|
static htmlTitle(): string;
|
|
1456
1197
|
}
|
|
1457
1198
|
|
|
1458
|
-
/**
|
|
1199
|
+
/** Manages Twitter Card meta tags. @keywords twitter card, meta tags, social share */
|
|
1459
1200
|
export declare class MetaTwitter extends MetaManager<MetaTwitterTag[]> {
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
}
|
|
1491
|
-
|
|
1492
|
-
/** Static
|
|
1201
|
+
/** Initializes the MetaTwitter instance. @keywords constructor, init */
|
|
1202
|
+
constructor();
|
|
1203
|
+
/** Gets the Twitter Card type. @keywords twitter card, type, get */
|
|
1204
|
+
getCard(): MetaTwitterCard;
|
|
1205
|
+
/** Gets the website or brand @username. @keywords twitter site, username, get */
|
|
1206
|
+
getSite(): string;
|
|
1207
|
+
/** Gets the content creator @username. @keywords twitter creator, author, get */
|
|
1208
|
+
getCreator(): string;
|
|
1209
|
+
/** Gets the page URL. @keywords twitter url, get */
|
|
1210
|
+
getUrl(): string;
|
|
1211
|
+
/** Gets the card title. @keywords twitter title, get */
|
|
1212
|
+
getTitle(): string;
|
|
1213
|
+
/** Gets the card description. @keywords twitter description, get */
|
|
1214
|
+
getDescription(): string;
|
|
1215
|
+
/** Gets the card image URL. @keywords twitter image, get */
|
|
1216
|
+
getImage(): string;
|
|
1217
|
+
/** Sets the Twitter Card type. @keywords twitter card, type, set */
|
|
1218
|
+
setCard(card: MetaTwitterCard): this;
|
|
1219
|
+
/** Sets the website or brand @username. @keywords twitter site, username, set */
|
|
1220
|
+
setSite(site: string): this;
|
|
1221
|
+
/** Sets the content creator @username. @keywords twitter creator, author, set */
|
|
1222
|
+
setCreator(creator: string): this;
|
|
1223
|
+
/** Sets the page URL. @keywords twitter url, set */
|
|
1224
|
+
setUrl(url: string): this;
|
|
1225
|
+
/** Sets the card title. @keywords twitter title, set */
|
|
1226
|
+
setTitle(title: string): this;
|
|
1227
|
+
/** Sets the card description. @keywords twitter description, set */
|
|
1228
|
+
setDescription(description: string): this;
|
|
1229
|
+
/** Sets the card image URL. @keywords twitter image, set */
|
|
1230
|
+
setImage(image: string): this;
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
/** Static facade for managing URL query parameters. @keywords url, query params, search params, routing */
|
|
1493
1234
|
export declare class Query {
|
|
1494
|
-
/** Returns
|
|
1235
|
+
/** Returns a request-isolated QueryInstance. @keywords instance, query instance, singleton */
|
|
1495
1236
|
static getItem(): QueryInstance;
|
|
1496
|
-
/**
|
|
1237
|
+
/** Retrieves a parameter value from the query string with an optional default. @keywords get query, query parameter, read url */
|
|
1497
1238
|
static get<T>(name: string, defaultValue?: T | (() => T)): T;
|
|
1498
|
-
/** Sets
|
|
1239
|
+
/** Sets or updates a parameter in the URL query string. @keywords set query, update query, write url */
|
|
1499
1240
|
static set<T>(name: string, callback: T | (() => T)): void;
|
|
1500
|
-
/**
|
|
1241
|
+
/** Subscribes a listener to changes for a specific query parameter. @keywords watch, query listener, observer, event */
|
|
1501
1242
|
static addWatch<T>(name: string, callback: (value: T) => void): void;
|
|
1502
|
-
/**
|
|
1243
|
+
/** Unsubscribes a listener from changes for a specific query parameter. @keywords unwatch, remove listener, unsubscribe */
|
|
1503
1244
|
static removeWatch<T>(name: string, callback: (value: T) => void): void;
|
|
1504
|
-
/**
|
|
1245
|
+
/** Synchronizes query state with the current URL search string. @keywords reload query, sync url, refresh query */
|
|
1505
1246
|
static reload(): void;
|
|
1506
1247
|
}
|
|
1507
1248
|
|
|
1508
|
-
/**
|
|
1249
|
+
/** Manages data stored in URL query parameters. @keywords query, url, searchParams, parameters */
|
|
1509
1250
|
export declare class QueryInstance extends UrlInstanceAbstract {
|
|
1510
|
-
/** Initializes query data and registers popstate listener. @keywords init, query, popstate */
|
|
1511
|
-
protected init(): this;
|
|
1512
|
-
/** Obtains data from the URL string. @keywords get, location, query */
|
|
1513
|
-
protected getLocation(): Record<string, any>;
|
|
1514
|
-
/** Updates query string in URL. @keywords update, url, query */
|
|
1515
|
-
protected update(): this;
|
|
1516
1251
|
}
|
|
1517
1252
|
|
|
1518
|
-
/** Timer that can be paused and
|
|
1253
|
+
/** Timer that can be paused, resumed, reset, and cleared. @keywords timer, pause, resume, timeout, delay */
|
|
1519
1254
|
export declare class ResumableTimer {
|
|
1520
|
-
/** Creates a resumable timer */
|
|
1255
|
+
/** Creates a resumable timer instance. @param blockStart If true, timer will not start immediately. @keywords timer, init */
|
|
1521
1256
|
constructor(callback: FunctionVoid, delay?: number, blockStart?: boolean);
|
|
1522
|
-
/** Resumes the timer @keywords resume start
|
|
1257
|
+
/** Resumes the timer if paused, or starts it. @keywords resume, start, continue */
|
|
1523
1258
|
resume(): this;
|
|
1524
|
-
/** Pauses the timer @keywords pause
|
|
1259
|
+
/** Pauses the timer and tracks remaining time. @keywords pause, stop, hold */
|
|
1525
1260
|
pause(): this;
|
|
1526
|
-
/** Resets and restarts the timer @keywords reset restart */
|
|
1261
|
+
/** Resets and restarts the timer with the original delay. @keywords reset, restart */
|
|
1527
1262
|
reset(): this;
|
|
1528
|
-
/**
|
|
1263
|
+
/** Completely clears and cancels the timer. @keywords clear, cancel, destroy */
|
|
1529
1264
|
clear(): this;
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
protected getStartTime(): number;
|
|
1534
|
-
/** Executes the callback */
|
|
1535
|
-
protected go(): this;
|
|
1536
|
-
/** Updates the remaining time */
|
|
1537
|
-
protected updateRemaining(): this;
|
|
1538
|
-
/** Updates the start time */
|
|
1539
|
-
protected updateStartTime(): this;
|
|
1540
|
-
/** Stops the timer */
|
|
1541
|
-
protected stop(): this;
|
|
1542
|
-
}
|
|
1543
|
-
|
|
1544
|
-
/** Scrollbar width helper utility @keywords scrollbar, width, scroll */
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
/** Utility class for calculating and managing scrollbar width. @keywords scrollbar, scroll width, layout, measurement */
|
|
1545
1268
|
export declare class ScrollbarWidth {
|
|
1546
|
-
/** Checks whether
|
|
1269
|
+
/** Checks whether scrollbar hiding should be enabled. @keywords scrollbar, visibility, check, hide */
|
|
1547
1270
|
static is(): Promise<boolean>;
|
|
1548
|
-
/**
|
|
1271
|
+
/** Computes and returns the scrollbar width in pixels. @keywords scrollbar, width, measure, pixels */
|
|
1549
1272
|
static get(): Promise<number>;
|
|
1550
|
-
/** Returns the storage
|
|
1273
|
+
/** Returns the storage instance holding the cached scrollbar width. @keywords scrollbar, storage, cache */
|
|
1551
1274
|
static getStorage(): DataStorage<number>;
|
|
1552
|
-
/**
|
|
1275
|
+
/** Checks if scrollbar width calculation is currently in progress. @keywords scrollbar, calculate, state, status */
|
|
1553
1276
|
static getCalculate(): boolean;
|
|
1554
|
-
/** Creates elements to check the width of the scroll @keywords scrollbar, element, create */
|
|
1555
|
-
static createElement(): HTMLElement | void;
|
|
1556
1277
|
}
|
|
1557
1278
|
|
|
1558
|
-
/**
|
|
1559
|
-
* Manages searchable list with options, state, and matching logic.
|
|
1560
|
-
* @keywords search, list, filter, match
|
|
1561
|
-
*/
|
|
1279
|
+
/** Manages searchable lists, coordinating options, item state, matching logic, and storage. @keywords search, list, filter, data */
|
|
1562
1280
|
export declare class SearchList<T extends SearchItem, K extends SearchColumns<T>> {
|
|
1563
|
-
/** @keywords
|
|
1281
|
+
/** Initializes a new SearchList instance. @keywords search list, constructor */
|
|
1564
1282
|
constructor(list: SearchListValue<T>, columns?: K, value?: string, options?: SearchOptions);
|
|
1565
|
-
/**
|
|
1283
|
+
/** Gets the search data management instance. @keywords search data, storage */
|
|
1566
1284
|
getData(): SearchListData<T, K>;
|
|
1567
|
-
/**
|
|
1285
|
+
/** Gets the current list of items. @keywords list, items, search list */
|
|
1568
1286
|
getList(): SearchListValue<T>;
|
|
1569
|
-
/**
|
|
1287
|
+
/** Gets the active search columns. @keywords columns, fields, search columns */
|
|
1570
1288
|
getColumns(): K | undefined;
|
|
1571
|
-
/**
|
|
1289
|
+
/** Gets the search item instance. @keywords item, search item */
|
|
1572
1290
|
getItem(): SearchListItem;
|
|
1573
|
-
/**
|
|
1291
|
+
/** Gets the current search query value. @keywords query, search value */
|
|
1574
1292
|
getValue(): string | undefined;
|
|
1575
|
-
/**
|
|
1293
|
+
/** Gets the search options manager instance. @keywords options, configuration, search options */
|
|
1576
1294
|
getOptions(): SearchListOptions;
|
|
1577
|
-
/**
|
|
1295
|
+
/** Sets a new list of items and resets the cache. @keywords set list, update items */
|
|
1578
1296
|
setList(list: SearchListValue<T>): this;
|
|
1579
|
-
/**
|
|
1297
|
+
/** Sets target search columns and resets the cache. @keywords set columns, search fields */
|
|
1580
1298
|
setColumns(columns?: K): this;
|
|
1581
|
-
/**
|
|
1299
|
+
/** Sets the search query value and updates the matcher. @keywords set value, search query */
|
|
1582
1300
|
setValue(value?: string): this;
|
|
1583
|
-
/**
|
|
1301
|
+
/** Sets search options and updates the matcher. @keywords set options, configuration */
|
|
1584
1302
|
setOptions(options: SearchOptions): this;
|
|
1585
|
-
/** Processes and
|
|
1303
|
+
/** Processes and returns the formatted list based on the current search state. @keywords format, process, filter results */
|
|
1586
1304
|
to(): SearchFormatList<T, K>;
|
|
1587
|
-
/** Processes item when search is active. @keywords callback, selection */
|
|
1588
|
-
protected readonly callbackToSelection: (item: SearchCacheItem<T>["item"], value: SearchCacheItem<T>["value"]) => SearchFormatItem<T, K> | undefined;
|
|
1589
|
-
/** Processes item when search is inactive. @keywords callback, none */
|
|
1590
|
-
protected readonly callbackToNone: (item: SearchCacheItem<T>["item"]) => SearchFormatItem<T, K>;
|
|
1591
1305
|
}
|
|
1592
1306
|
|
|
1593
|
-
/** @keywords search list
|
|
1307
|
+
/** Manages and formats search data list and item cache. @keywords search, list, cache, format */
|
|
1594
1308
|
export declare class SearchListData<T extends SearchItem, K extends SearchColumns<T>> {
|
|
1595
|
-
/** @keywords constructor init */
|
|
1309
|
+
/** Creates an instance of SearchListData. @keywords constructor, init */
|
|
1596
1310
|
constructor(list: SearchListValue<T>, columns: K | undefined, item: SearchListItem, options: SearchListOptions);
|
|
1597
|
-
/** @keywords check
|
|
1311
|
+
/** Checks if both list and columns are provided for column-based search. @keywords type guard, check, columns */
|
|
1598
1312
|
is(): this is this & {
|
|
1599
1313
|
list: T[];
|
|
1600
1314
|
columns: string[];
|
|
1601
1315
|
};
|
|
1602
|
-
/** @keywords check list */
|
|
1316
|
+
/** Checks if the search list is provided. @keywords type guard, check, list */
|
|
1603
1317
|
isList(): this is this & {
|
|
1604
1318
|
list: T[];
|
|
1605
1319
|
};
|
|
1606
|
-
/** @keywords get list */
|
|
1320
|
+
/** Returns the original list. @keywords get list, source */
|
|
1607
1321
|
getList(): SearchListValue<T>;
|
|
1608
|
-
/** @keywords get columns */
|
|
1322
|
+
/** Returns search columns. @keywords get columns, keys */
|
|
1609
1323
|
getColumns(): K | undefined;
|
|
1610
|
-
/** @keywords
|
|
1611
|
-
protected getCache(): SearchCache<T>;
|
|
1612
|
-
/** @keywords set list */
|
|
1324
|
+
/** Sets a new list and updates the cache. @keywords set list, cache */
|
|
1613
1325
|
setList(list: SearchListValue<T>): this;
|
|
1614
|
-
/** @keywords set columns */
|
|
1326
|
+
/** Sets search columns and updates the cache. @keywords set columns, cache */
|
|
1615
1327
|
setColumns(columns?: SearchColumns<T>): this;
|
|
1616
|
-
/** @keywords find cache
|
|
1328
|
+
/** Finds a cached item for the given original item. @keywords find, cache, lookup */
|
|
1617
1329
|
findCacheItem(item: T): SearchCacheItem<T> | undefined;
|
|
1618
|
-
/** @keywords iterate
|
|
1330
|
+
/** Iterates over cached items and applies a formatting callback. @keywords iterate, format, callback */
|
|
1619
1331
|
forEach(callback: (item: SearchCacheItem<T>['item'], value: SearchCacheItem<T>['value']) => SearchFormatItem<T, K> | undefined): SearchFormatList<T, K>;
|
|
1620
|
-
/** @keywords format item */
|
|
1332
|
+
/** Formats an item, optionally highlighting matching search terms. @keywords format item, highlight, match */
|
|
1621
1333
|
toFormatItem(item: T, selection: boolean): SearchFormatItem<T, K>;
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
protected addTag(value: any): string;
|
|
1626
|
-
/** @keywords generate cache */
|
|
1627
|
-
protected generateCache(): SearchCache<T>;
|
|
1628
|
-
/** @keywords init cache */
|
|
1629
|
-
protected initCache(): void;
|
|
1630
|
-
/** @keywords reset cache */
|
|
1631
|
-
protected resetCache(): void;
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1634
|
-
/** Search item value and state @keywords search_item, value */
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
/** Manages search item value and query state. @keywords search item value query state */
|
|
1635
1337
|
export declare class SearchListItem {
|
|
1636
|
-
/**
|
|
1338
|
+
/** Initializes a new SearchListItem instance. @keywords search item constructor init */
|
|
1637
1339
|
constructor(value: string | undefined, options: SearchListOptions);
|
|
1638
|
-
/** Checks
|
|
1340
|
+
/** Checks whether the search value is defined. @keywords check value exists defined */
|
|
1639
1341
|
is(): this is this & {
|
|
1640
1342
|
value: string;
|
|
1641
1343
|
};
|
|
1642
|
-
/** Checks if search length meets limit @keywords search
|
|
1344
|
+
/** Checks if the search value length meets the minimum limit. @keywords search threshold limit length */
|
|
1643
1345
|
isSearch(): boolean;
|
|
1644
|
-
/**
|
|
1346
|
+
/** Gets the current search string value. @keywords get search query string */
|
|
1645
1347
|
get(): string;
|
|
1646
|
-
/** Sets
|
|
1348
|
+
/** Sets the search string value. @keywords set search query update */
|
|
1647
1349
|
set(value?: string): this;
|
|
1648
1350
|
}
|
|
1649
1351
|
|
|
1650
|
-
/** Matches search values against
|
|
1352
|
+
/** Matches search values against list data using regular expressions. @keywords search matcher regex pattern */
|
|
1651
1353
|
export declare class SearchListMatcher {
|
|
1652
|
-
/**
|
|
1354
|
+
/** Initializes the search matcher with item and options. @keywords constructor init */
|
|
1653
1355
|
constructor(item: SearchListItem, options: SearchListOptions);
|
|
1654
|
-
/** Checks if the matcher is initialized. */
|
|
1356
|
+
/** Checks if the matcher is active or initialized. @keywords is initialized check active */
|
|
1655
1357
|
is(): boolean;
|
|
1656
|
-
/** Checks if value matches search expression. */
|
|
1358
|
+
/** Checks if the given value matches the current search expression. @keywords test match selection */
|
|
1657
1359
|
isSelection(value: SearchCacheItem<any>['value']): boolean;
|
|
1658
|
-
/**
|
|
1360
|
+
/** Gets the compiled regular expression matcher. @keywords regex pattern get */
|
|
1659
1361
|
get(): RegExp | undefined;
|
|
1660
|
-
/** Updates matcher
|
|
1362
|
+
/** Updates the regex matcher from current item value and options. @keywords update refresh compile */
|
|
1661
1363
|
update(): void;
|
|
1662
|
-
/** Initializes or resets regular expression matcher. */
|
|
1663
|
-
protected initMatcher(): void;
|
|
1664
1364
|
}
|
|
1665
1365
|
|
|
1666
|
-
/**
|
|
1366
|
+
/** Manages search list options and configuration settings. @keywords search, options, list, config */
|
|
1667
1367
|
export declare class SearchListOptions {
|
|
1668
|
-
/** @keywords constructor
|
|
1368
|
+
/** Initializes search list options. @keywords constructor, init */
|
|
1669
1369
|
constructor(options?: SearchOptions | undefined);
|
|
1670
|
-
/**
|
|
1370
|
+
/** Retrieves current search options. @keywords get, options, search */
|
|
1671
1371
|
getOptions(): SearchOptions;
|
|
1672
|
-
/**
|
|
1372
|
+
/** Retrieves the minimum character length required to trigger search. @keywords limit, min, length, trigger */
|
|
1673
1373
|
getLimit(): number;
|
|
1674
|
-
/**
|
|
1374
|
+
/** Checks if all items are returned regardless of search match. @keywords return, all, match, filter */
|
|
1675
1375
|
getReturnEverything(): boolean;
|
|
1676
|
-
/**
|
|
1376
|
+
/** Retrieves search debounce delay in milliseconds. @keywords delay, debounce, time */
|
|
1677
1377
|
getDelay(): number;
|
|
1678
|
-
/**
|
|
1378
|
+
/** Checks whether exact match searching is enabled. @keywords exact, match, strict */
|
|
1679
1379
|
getFindExactMatch(): boolean;
|
|
1680
|
-
/**
|
|
1380
|
+
/** Retrieves the CSS class name used for highlighting matches. @keywords class, highlight, css */
|
|
1681
1381
|
getClassName(): string;
|
|
1682
|
-
/**
|
|
1382
|
+
/** Updates search options. @keywords set, options, update */
|
|
1683
1383
|
setOptions(options: SearchOptions): this;
|
|
1684
1384
|
}
|
|
1685
1385
|
|
|
@@ -1688,581 +1388,518 @@ type ServerStorageItem = {
|
|
|
1688
1388
|
hydration: boolean;
|
|
1689
1389
|
};
|
|
1690
1390
|
type ServerStorageList = Record<string, ServerStorageItem>;
|
|
1691
|
-
/** @keywords
|
|
1391
|
+
/** Manages isolated data storage during SSR across parallel requests. @keywords ssr, storage, isolation, context */
|
|
1692
1392
|
export declare class ServerStorage {
|
|
1693
|
-
/** @keywords init, context,
|
|
1393
|
+
/** Initializes storage with a request context listener function. @keywords init, context, ssr */
|
|
1694
1394
|
static init(listener: () => Record<string, any> | undefined): typeof ServerStorage;
|
|
1695
|
-
/** @keywords reset, clear */
|
|
1395
|
+
/** Resets the storage state. @keywords reset, clear */
|
|
1696
1396
|
static reset(): void;
|
|
1697
|
-
/** @keywords has,
|
|
1397
|
+
/** Checks if a value exists in storage by key. @keywords has, exists, key */
|
|
1698
1398
|
static has(key: string): boolean;
|
|
1699
|
-
/** @keywords get,
|
|
1399
|
+
/** Retrieves a value or creates it using a factory function with optional hydration. @keywords get, hydration, cache */
|
|
1700
1400
|
static get<T = any>(key: string, defaultValue?: () => T, hydration?: boolean): T;
|
|
1701
|
-
/** @keywords set,
|
|
1401
|
+
/** Stores a value from a factory function with optional hydration. @keywords set, store, hydration */
|
|
1702
1402
|
static set<T = any>(key: string, value: () => T, hydration?: boolean, storageList?: ServerStorageList): T;
|
|
1703
|
-
/** @keywords error, status,
|
|
1403
|
+
/** Sets whether error messages should be hidden or shown. @keywords error, status, logging */
|
|
1704
1404
|
static setErrorStatus(hide: boolean): void;
|
|
1705
|
-
/** @keywords remove, delete */
|
|
1405
|
+
/** Removes a value from storage by key. @keywords remove, delete */
|
|
1706
1406
|
static remove(key: string): void;
|
|
1707
|
-
/** @keywords
|
|
1407
|
+
/** Serializes the hydration storage into an executable script tag string. @keywords hydration, serialize, toString */
|
|
1708
1408
|
static toString(): string;
|
|
1709
1409
|
}
|
|
1710
1410
|
export {};
|
|
1711
1411
|
|
|
1712
|
-
/**
|
|
1412
|
+
/** Manages storage callback lists and execution state. @keywords storage callback subscriber listener */
|
|
1713
1413
|
export declare class StorageCallback<T = any, Callback = (value: T) => void | Promise<void>> {
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1414
|
+
/** Gets a StorageCallback singleton instance by name and group. @keywords singleton instance storage */
|
|
1415
|
+
static getInstance<T>(name: string, group?: string): StorageCallback<T, (value: T) => void | Promise<void>>;
|
|
1416
|
+
/** Initializes a new StorageCallback instance. @keywords constructor init */
|
|
1417
|
+
constructor(name: string, group?: string);
|
|
1418
|
+
/** Checks whether storage is currently in a loading state. @keywords loading state check */
|
|
1419
|
+
isLoading(): boolean;
|
|
1420
|
+
/** Gets the storage identifier name. @keywords name identifier */
|
|
1421
|
+
getName(): string;
|
|
1422
|
+
/** Gets the current loading state value. @keywords loading status */
|
|
1423
|
+
getLoading(): boolean;
|
|
1424
|
+
/** Subscribes a callback function to storage events. @keywords subscribe listener add once */
|
|
1425
|
+
addCallback(callback: Callback, isOnce?: boolean): this;
|
|
1426
|
+
/** Unsubscribes a callback function from storage events. @keywords unsubscribe listener remove */
|
|
1427
|
+
removeCallback(callback: Callback): this;
|
|
1428
|
+
/** Prepares storage callback state prior to execution. @keywords prepare init state */
|
|
1429
|
+
preparation(): this;
|
|
1430
|
+
/** Executes all registered callbacks asynchronously with the provided value. @keywords trigger emit execute dispatch */
|
|
1431
|
+
run(value: T): Promise<this>;
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
/** Translation service for loading and resolving localized texts. @keywords translate, i18n, localization, dictionary */
|
|
1734
1435
|
export declare class Translate {
|
|
1735
|
-
/**
|
|
1436
|
+
/** Asynchronously retrieves translation text by code with optional replacements. @keywords translate, get, async, i18n */
|
|
1736
1437
|
static get(name: string, replacement?: string[] | Record<string, string | number>): Promise<string>;
|
|
1737
|
-
/** Returns TranslateInstance
|
|
1438
|
+
/** Returns a request-isolated TranslateInstance. @keywords translate, instance, context */
|
|
1738
1439
|
static getItem(): TranslateInstance;
|
|
1739
|
-
/**
|
|
1440
|
+
/** Synchronously retrieves translation text by code with optional replacements. @keywords translate, sync, lookup */
|
|
1740
1441
|
static getSync(name: string, first?: boolean, replacement?: string[] | Record<string, string | number>): string;
|
|
1741
|
-
/**
|
|
1442
|
+
/** Asynchronously retrieves multiple translations by key list. @keywords translate, list, batch, async */
|
|
1742
1443
|
static getList<T extends TranslateCode[]>(names: T): Promise<TranslateList<T>>;
|
|
1743
|
-
/**
|
|
1444
|
+
/** Synchronously retrieves multiple translations by key list. @keywords translate, list, sync */
|
|
1744
1445
|
static getListSync<T extends TranslateCode[]>(names: T, first?: boolean): TranslateList<T>;
|
|
1745
|
-
/**
|
|
1446
|
+
/** Asynchronously loads translated texts for specified codes. @keywords translate, add, load, async */
|
|
1746
1447
|
static add(names: string | string[]): Promise<void>;
|
|
1747
|
-
/**
|
|
1448
|
+
/** Synchronously registers a dictionary of key-value translations. @keywords translate, addSync, register, dictionary */
|
|
1748
1449
|
static addSync(data: Record<string, string>): void;
|
|
1749
|
-
/** Adds
|
|
1450
|
+
/** Adds translation data via request or directly depending on environment. @keywords translate, add, hybrid */
|
|
1750
1451
|
static addNormalOrSync(data: Record<string, string>): Promise<void>;
|
|
1751
|
-
/**
|
|
1452
|
+
/** Synchronously registers translations grouped by location. @keywords translate, location, namespace */
|
|
1752
1453
|
static addSyncByLocation(data: Record<string, Record<string, string>>): void;
|
|
1753
|
-
/**
|
|
1454
|
+
/** Synchronously registers translations from a structured translation file. @keywords translate, file, import */
|
|
1754
1455
|
static addSyncByFile(data: TranslateDataFile): void;
|
|
1755
|
-
/** Sets the
|
|
1456
|
+
/** Sets the endpoint URL for translation requests. @keywords translate, url, endpoint */
|
|
1756
1457
|
static setUrl(url: string): void;
|
|
1757
|
-
/** Sets the property name
|
|
1458
|
+
/** Sets the property name used to resolve translations. @keywords translate, property, config */
|
|
1758
1459
|
static setPropsName(name: string): void;
|
|
1759
|
-
/**
|
|
1460
|
+
/** Toggles the API read mode for fetching translations. @keywords translate, api, mode */
|
|
1760
1461
|
static setReadApi(value: boolean): void;
|
|
1761
|
-
/**
|
|
1462
|
+
/** Applies translation service configuration. @keywords translate, config, options */
|
|
1762
1463
|
static setConfig(config: TranslateConfig): void;
|
|
1763
1464
|
}
|
|
1764
1465
|
|
|
1765
|
-
/** Manages translation
|
|
1466
|
+
/** Manages translation file loading and resolution based on language and location. @keywords translation, localization, i18n, files, translate */
|
|
1766
1467
|
export declare class TranslateFile {
|
|
1767
|
-
|
|
1768
|
-
protected location: string | (() => string);
|
|
1769
|
-
/** Creates an instance of the class. @keywords constructor, translate */
|
|
1468
|
+
/** Creates an instance of TranslateFile. @keywords constructor, init */
|
|
1770
1469
|
constructor(data?: TranslateDataFile, language?: string | (() => string), location?: string | (() => string));
|
|
1771
|
-
/** Checks if files exist for the current location or language. @keywords isFile, check,
|
|
1470
|
+
/** Checks if translation files exist for the current location or language. @keywords isFile, check, exists */
|
|
1772
1471
|
isFile(): boolean;
|
|
1773
|
-
/**
|
|
1472
|
+
/** Retrieves the current location identifier. @keywords getLocation, location, path */
|
|
1774
1473
|
getLocation(): string;
|
|
1775
|
-
/**
|
|
1474
|
+
/** Retrieves the current active language code. @keywords getLanguage, language, locale, i18n */
|
|
1776
1475
|
getLanguage(): string;
|
|
1777
|
-
/**
|
|
1476
|
+
/** Loads and returns the translation data list for the current location. @keywords getList, load, translations, async */
|
|
1778
1477
|
getList(): Promise<TranslateDataFileList | undefined>;
|
|
1779
|
-
/**
|
|
1478
|
+
/** Registers additional translation file data sources. @keywords add, register, files */
|
|
1780
1479
|
add(data: TranslateDataFile): void;
|
|
1781
1480
|
}
|
|
1782
1481
|
|
|
1783
|
-
/**
|
|
1482
|
+
/** Translation management instance for fetching and resolving localized strings. @keywords translate, i18n, localization, locale */
|
|
1784
1483
|
export declare class TranslateInstance {
|
|
1785
|
-
/**
|
|
1484
|
+
/** Initializes a new translation instance with optional endpoint and files. @keywords init, translate */
|
|
1786
1485
|
constructor(url?: string, propsName?: string, files?: TranslateFile);
|
|
1787
|
-
/**
|
|
1486
|
+
/** Fetches translation text asynchronously by code with optional replacements. @keywords get, translate, async */
|
|
1788
1487
|
get(name: string, replacement?: string[] | Record<string, string | number>): Promise<string>;
|
|
1789
|
-
/** Gets
|
|
1488
|
+
/** Gets translation text synchronously by code with optional fallback and replacements. @keywords getSync, translate, sync */
|
|
1790
1489
|
getSync(name: string, first?: boolean, replacement?: string[] | Record<string, string | number>): string;
|
|
1791
|
-
/**
|
|
1490
|
+
/** Fetches multiple translations asynchronously by code array. @keywords getList, batch, translate */
|
|
1792
1491
|
getList<T extends TranslateCode[]>(names: T): Promise<TranslateList<T>>;
|
|
1793
|
-
/** Gets
|
|
1492
|
+
/** Gets multiple translations synchronously by code array. @keywords getListSync, batch, sync */
|
|
1794
1493
|
getListSync<T extends TranslateCode[]>(names: T, first?: boolean): TranslateList<T>;
|
|
1795
|
-
/** Adds
|
|
1494
|
+
/** Adds translation codes to be loaded. @keywords add, load, translations */
|
|
1796
1495
|
add(names: string | string[]): Promise<void>;
|
|
1797
|
-
/** Adds
|
|
1496
|
+
/** Adds translation key-value pairs synchronously. @keywords addSync, register, dictionary */
|
|
1798
1497
|
addSync(data: Record<string, string>): void;
|
|
1799
|
-
/** Adds
|
|
1498
|
+
/** Adds translations via network request or directly depending on runtime environment. @keywords addNormalOrSync, environment */
|
|
1800
1499
|
addNormalOrSync(data: Record<string, string>): Promise<void>;
|
|
1801
|
-
/** Adds
|
|
1500
|
+
/** Adds translations grouped by location synchronously. @keywords addSyncByLocation, locale, location */
|
|
1802
1501
|
addSyncByLocation(data: Record<string, Record<string, string>>): void;
|
|
1803
|
-
/** Adds
|
|
1502
|
+
/** Adds translations synchronously from a file data object. @keywords addSyncByFile, file, import */
|
|
1804
1503
|
addSyncByFile(data: TranslateDataFile): void;
|
|
1805
|
-
/** Sets the
|
|
1504
|
+
/** Sets the API URL endpoint for fetching translations. @keywords setUrl, config, endpoint */
|
|
1806
1505
|
setUrl(url: string): this;
|
|
1807
|
-
/** Sets the
|
|
1506
|
+
/** Sets the property name used for translation lookups. @keywords setPropsName, property, config */
|
|
1808
1507
|
setPropsName(name: string): this;
|
|
1809
|
-
/**
|
|
1508
|
+
/** Toggles the translation API read mode. @keywords setReadApi, mode, config */
|
|
1810
1509
|
setReadApi(value: boolean): this;
|
|
1811
1510
|
}
|
|
1812
1511
|
|
|
1813
|
-
/**
|
|
1512
|
+
/** Abstract base class managing URL-based state storage and synchronization. @keywords url, hash, query, state */
|
|
1814
1513
|
export declare abstract class UrlInstanceAbstract {
|
|
1815
|
-
/**
|
|
1816
|
-
protected watch: Record<string, ((value: any) => void)[]>;
|
|
1817
|
-
/** Update block flag */
|
|
1818
|
-
protected block: boolean;
|
|
1819
|
-
/** Timeout identifier */
|
|
1820
|
-
protected time: any;
|
|
1821
|
-
/** Data record storage */
|
|
1822
|
-
protected data: Record<string, any> | undefined;
|
|
1823
|
-
/** Get data by name with optional default value. @keywords get data */
|
|
1514
|
+
/** Retrieves stored URL state value or falls back to a default value or factory. @keywords get, url state, read */
|
|
1824
1515
|
get<T>(name: string, defaultValue?: T | (() => T)): T;
|
|
1825
|
-
/**
|
|
1516
|
+
/** Updates URL state variable with a value or transformation callback. @keywords set, update, url state */
|
|
1826
1517
|
set<T>(name: string, callback: T | (() => T)): this;
|
|
1827
|
-
/**
|
|
1518
|
+
/** Subscribes a listener callback to variable change events. @keywords watch, observe, listener, subscribe */
|
|
1828
1519
|
addWatch<T>(name: string, callback: (value: T) => void): this;
|
|
1829
|
-
/**
|
|
1520
|
+
/** Unsubscribes a listener callback from variable change events. @keywords unwatch, unsubscribe, listener */
|
|
1830
1521
|
removeWatch<T>(name: string, callback: (value: T) => void): this;
|
|
1831
|
-
/**
|
|
1522
|
+
/** Reloads and syncs state variables directly from the current URL. @keywords reload, sync, refresh */
|
|
1832
1523
|
reload(): this;
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
protected initData(): this;
|
|
1837
|
-
/** Trigger watch callbacks on change. @keywords make watch */
|
|
1838
|
-
protected makeWatch(location: Record<string, any>): this;
|
|
1839
|
-
/** Initialize instance and listeners. @keywords init */
|
|
1840
|
-
protected abstract init(): this;
|
|
1841
|
-
/** Get location data from URL. @keywords get location */
|
|
1842
|
-
protected abstract getLocation(): Record<string, any>;
|
|
1843
|
-
/** Update URL state representation. @keywords update */
|
|
1844
|
-
protected abstract update(): this;
|
|
1845
|
-
}
|
|
1846
|
-
|
|
1847
|
-
/** Isomorphic utility class for working with URLs. @keywords url, parse, query, params */
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
/** Isomorphic utility class for URL parsing, manipulation, and query parameter management. @keywords url, parser, query, uri */
|
|
1848
1527
|
export declare class UrlItem {
|
|
1849
|
-
/** Returns a request-isolated instance of UrlItem. @keywords instance,
|
|
1528
|
+
/** Returns a request-isolated instance of UrlItem. @keywords singleton, instance, request, isolated */
|
|
1850
1529
|
static getInstance(): UrlItem;
|
|
1851
|
-
/** Constructs a new UrlItem instance. @keywords constructor,
|
|
1530
|
+
/** Constructs a new UrlItem instance. @param url URL string or URL object @keywords constructor, create, init */
|
|
1852
1531
|
constructor(url?: string | URL);
|
|
1853
|
-
/** Full URL string. @keywords href, url */
|
|
1532
|
+
/** Full URL string representation. @keywords href, url, link */
|
|
1854
1533
|
get href(): string;
|
|
1855
|
-
/** Protocol including trailing colon. @keywords protocol,
|
|
1534
|
+
/** Protocol scheme including trailing colon. @keywords protocol, scheme, http, https */
|
|
1856
1535
|
get protocol(): string;
|
|
1857
|
-
/** Username. @keywords username, auth,
|
|
1536
|
+
/** Username component of URL credentials. @keywords username, auth, credentials */
|
|
1858
1537
|
get username(): string;
|
|
1859
|
-
/** Password. @keywords password, auth,
|
|
1538
|
+
/** Password component of URL credentials. @keywords password, auth, credentials */
|
|
1860
1539
|
get password(): string;
|
|
1861
|
-
/** Host
|
|
1540
|
+
/** Host containing hostname and port. @keywords host, domain, port */
|
|
1862
1541
|
get host(): string;
|
|
1863
|
-
/** Hostname
|
|
1542
|
+
/** Hostname excluding port number. @keywords hostname, domain */
|
|
1864
1543
|
get hostname(): string;
|
|
1865
|
-
/** Port. @keywords port,
|
|
1544
|
+
/** Port number string. @keywords port, network */
|
|
1866
1545
|
get port(): string;
|
|
1867
|
-
/**
|
|
1546
|
+
/** URL path component starting with slash. @keywords pathname, path, route */
|
|
1868
1547
|
get pathname(): string;
|
|
1869
|
-
/**
|
|
1548
|
+
/** Query string including leading question mark. @keywords search, querystring, query */
|
|
1870
1549
|
get search(): string;
|
|
1871
|
-
/**
|
|
1550
|
+
/** Read-only URLSearchParams query parameters object. @keywords searchParams, query, params */
|
|
1872
1551
|
get searchParams(): URLSearchParams;
|
|
1873
|
-
/**
|
|
1552
|
+
/** Fragment identifier including leading hash sign. @keywords hash, fragment, anchor */
|
|
1874
1553
|
get hash(): string;
|
|
1875
|
-
/**
|
|
1554
|
+
/** Read-only origin of the URL (scheme + host). @keywords origin, domain, base */
|
|
1876
1555
|
get origin(): string;
|
|
1877
|
-
/** Checks if the specified query parameter exists. @keywords hasParam, query,
|
|
1556
|
+
/** Checks if the specified query parameter exists. @param name Parameter name @keywords hasParam, query, exists, search */
|
|
1878
1557
|
hasParam(name: string): boolean;
|
|
1879
|
-
/**
|
|
1558
|
+
/** Gets the value of a specific query parameter. @param name Parameter name @keywords getParam, query, parameter */
|
|
1880
1559
|
getParam(name: string): string | undefined;
|
|
1881
|
-
/** Returns all query parameters as an object with transformed types. @keywords getParams, query,
|
|
1560
|
+
/** Returns all query parameters as an object with transformed types. @keywords getParams, query, search, dictionary */
|
|
1882
1561
|
getParams(): Record<string, any>;
|
|
1883
|
-
/** Updates the URL value. @keywords set,
|
|
1562
|
+
/** Updates the URL value and reinitializes state. @param url URL string or URL instance @keywords set, update, parse */
|
|
1884
1563
|
set(url?: string | URL): this;
|
|
1885
|
-
/** Sets the value of a query parameter. @keywords setParam, query, update */
|
|
1564
|
+
/** Sets or updates the value of a query parameter. @param name Parameter name @param value Parameter value @keywords setParam, query, update */
|
|
1886
1565
|
setParam(name: string, value: string): this;
|
|
1887
|
-
/** Replaces all query parameters with the
|
|
1566
|
+
/** Replaces all query parameters with the provided key-value object. @param params Key-value parameter object @keywords setParams, query, batch */
|
|
1888
1567
|
setParams(params: Record<string, any>): this;
|
|
1889
|
-
/** Deletes a query parameter. @keywords deleteParam,
|
|
1568
|
+
/** Deletes a query parameter by name. @param name Parameter name @keywords deleteParam, remove, query */
|
|
1890
1569
|
deleteParam(name: string): this;
|
|
1891
|
-
/**
|
|
1570
|
+
/** Serializes the URL instance to its full string representation. @keywords toString, serialize, string */
|
|
1892
1571
|
toString(): string;
|
|
1893
|
-
/**
|
|
1572
|
+
/** Serializes the URL instance to a JSON string representation. @keywords toJSON, serialize, json */
|
|
1894
1573
|
toJSON(): string;
|
|
1895
1574
|
}
|
|
1896
1575
|
|
|
1897
|
-
/**
|
|
1576
|
+
/** Wraps matched search substrings with an HTML highlight tag. @keywords highlight match search replace tag html */
|
|
1898
1577
|
export declare function addTagHighlightMatch(value: string, search?: string | RegExp, className?: string, shouldEscape?: boolean): string;
|
|
1899
1578
|
|
|
1900
|
-
/** Converts
|
|
1579
|
+
/** Converts any value to a string with optional array formatting and trimming. @keywords anyToString, stringify, to string, convert, cast */
|
|
1901
1580
|
export declare function anyToString<V>(value: V, isArrayString?: boolean, trim?: boolean): string;
|
|
1902
1581
|
|
|
1903
|
-
/**
|
|
1582
|
+
/** Replaces template placeholder keys in square or curly brackets with values from a replacement object or array. @keywords template, string interpolation, placeholder, replace */
|
|
1904
1583
|
export declare const applyTemplate: (text: string, replacement?: Record<string, string | number | boolean> | string[]) => string;
|
|
1905
1584
|
|
|
1906
|
-
/** Creates an array of
|
|
1585
|
+
/** Creates an array of specified length filled with the given value. @keywords array, fill, repeat, populate, initialize */
|
|
1907
1586
|
export declare function arrFill<T>(value: T, count: number): T[];
|
|
1908
1587
|
|
|
1909
|
-
/** Converts a Blob to a Base64 string. @keywords blob base64 convert */
|
|
1588
|
+
/** Converts a Blob to a Base64 string, optionally stripping the data URL prefix. @param clean If true, removes the data URL prefix. @keywords blob, base64, encode, convert */
|
|
1910
1589
|
export declare function blobToBase64(blob: Blob, clean?: boolean): Promise<string | undefined>;
|
|
1911
1590
|
|
|
1912
|
-
/** Capitalizes the first letter of a string @keywords capitalize string
|
|
1591
|
+
/** Capitalizes the first letter of a string. @keywords capitalize, uppercase, first letter, string */
|
|
1913
1592
|
export declare function capitalize(value: string, isLocale?: boolean): string;
|
|
1914
1593
|
|
|
1915
|
-
/** Creates a deep copy of an object. @keywords copy clone
|
|
1594
|
+
/** Creates a deep copy of an object to prevent unwanted mutations. @keywords deep copy, clone, duplicate */
|
|
1916
1595
|
export declare function copyObject<T>(value: T): T;
|
|
1917
1596
|
|
|
1918
|
-
/** Copies a simple object
|
|
1597
|
+
/** Copies a simple object with optional additional source properties. @keywords copy, clone, shallow copy, object clone */
|
|
1919
1598
|
export declare function copyObjectLite<T, R = T>(value: T, source?: any): R;
|
|
1920
1599
|
|
|
1921
1600
|
/**
|
|
1922
|
-
* Creates
|
|
1601
|
+
* Creates an HTML element, applies properties or a setup callback, and inserts it into the DOM.
|
|
1602
|
+
* @remarks Returns `undefined` during SSR. Call within client-only lifecycle hooks (e.g., `onMounted`, `useEffect`) to prevent hydration mismatches.
|
|
1603
|
+
* @keywords createElement, create dom element, html node, ssr safe
|
|
1923
1604
|
*/
|
|
1924
1605
|
export declare function createElement<T extends HTMLElement>(parentElement?: HTMLElement, tagName?: string, options?: Partial<T> | Record<keyof T, T[keyof T]> | ((element: T) => void), referenceElement?: HTMLElement): T | undefined;
|
|
1925
1606
|
|
|
1926
|
-
/** Executes callback when DOM is
|
|
1607
|
+
/** Executes a callback when the DOM is ready or immediately if already loaded. @keywords dom, ready, domcontentloaded, lifecycle, event */
|
|
1927
1608
|
export declare function domContentLoaded<T = void>(callback: () => T | Promise<T>): Promise<T>;
|
|
1928
1609
|
|
|
1929
|
-
/**
|
|
1930
|
-
* Selects the first element matching the specified selectors.
|
|
1931
|
-
* @keywords querySelector, dom, element, select
|
|
1932
|
-
*/
|
|
1610
|
+
/** Selects the first element matching specified CSS selectors. @keywords dom, querySelector, element, find, select */
|
|
1933
1611
|
export declare function domQuerySelector<E extends Element = Element>(selectors: string): E | undefined;
|
|
1934
1612
|
|
|
1935
|
-
/** Selects all elements matching the
|
|
1613
|
+
/** Selects all elements matching the specified selectors. @keywords dom, querySelectorAll, query, selector, elements */
|
|
1936
1614
|
export declare function domQuerySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E> | undefined;
|
|
1937
1615
|
|
|
1938
|
-
/** @keywords
|
|
1616
|
+
/** Encodes special characters in a string for safe use in HTML attributes. @keywords html attribute encode escape sanitize */
|
|
1939
1617
|
export declare function encodeAttribute(text: string): string;
|
|
1940
1618
|
|
|
1941
|
-
/** Encodes special characters in a string for safe use in HTML attributes. @keywords
|
|
1619
|
+
/** Encodes special characters in a string for safe use in HTML attributes. @keywords html attribute encode sanitize escape */
|
|
1942
1620
|
export declare function encodeLiteAttribute(text: string): string;
|
|
1943
1621
|
|
|
1944
|
-
/**
|
|
1622
|
+
/** Resizes an image if it exceeds the maximum size, returning base64 data. @keywords image resize compress max-size base64 */
|
|
1945
1623
|
export declare function ensureMaxSize(file: Uint8Array, compress?: number, type?: string): Promise<string>;
|
|
1946
1624
|
|
|
1947
|
-
/** Escapes special regex characters in a string. @keywords escape,
|
|
1625
|
+
/** Escapes special regex characters in a string for safe use in a RegExp. @keywords regex, escape, sanitize, regexp */
|
|
1948
1626
|
export declare function escapeExp(value: string): string;
|
|
1949
1627
|
|
|
1950
|
-
/**
|
|
1628
|
+
/** Prevents further propagation of the given event in the DOM. @keywords event, stopPropagation, prevent bubbling */
|
|
1951
1629
|
export declare function eventStopPropagation(event: Event): void;
|
|
1952
1630
|
|
|
1953
|
-
/** Executes
|
|
1631
|
+
/** Executes callback with args if it is a function, otherwise returns value as is. @keywords execute, invoke, call, callback, function, resolve */
|
|
1954
1632
|
export declare function executeFunction<T>(callback: T | FunctionArgs<any, T>, ...args: any[]): T;
|
|
1955
1633
|
|
|
1956
|
-
/** Safely executes a function
|
|
1634
|
+
/** Safely executes a sync/async function or resolves a static value in a Promise with provided arguments. @keywords execute, promise, async, runner, callback */
|
|
1957
1635
|
export declare function executePromise<T>(callback: ((...args: any[]) => Promise<T>) | ((...args: any[]) => T) | T, ...args: any[]): Promise<T>;
|
|
1958
1636
|
|
|
1959
|
-
/**
|
|
1637
|
+
/** Iterates over items in an array, record, Map, or Set, executing a callback and returning an array of results. @keywords forEach, iterate, map, loop, collection, transform */
|
|
1960
1638
|
export declare function forEach<T, R, D extends T[] | Record<string, T> | Map<string, T> | Set<T> = T[] | Record<string, T> | Map<string, T> | Set<T>, K = D extends T[] ? number : string>(data: D & (T[] | Record<string, T> | Map<string, T> | Set<T>), callback: (item: T, key: K, dataMain: typeof data) => R, saveUndefined?: boolean): R[];
|
|
1961
1639
|
|
|
1962
|
-
/**
|
|
1963
|
-
* Cyclically calls requestAnimationFrame until next returns true.
|
|
1964
|
-
* @keywords frame animation requestAnimationFrame loop
|
|
1965
|
-
*/
|
|
1640
|
+
/** Cyclically executes a callback via requestAnimationFrame while next returns true, then calls end. @keywords animation, requestAnimationFrame, raf loop, frame */
|
|
1966
1641
|
export declare function frame(callback: () => void, next?: () => boolean, end?: () => void): void;
|
|
1967
1642
|
|
|
1968
|
-
/**
|
|
1643
|
+
/** Splits a string into segments to highlight search matches. @keywords highlight, match, search, split, text */
|
|
1969
1644
|
export declare function getArrayHighlightMatch(value: string, search?: string | RegExp): HighlightMatchItem[];
|
|
1970
1645
|
|
|
1971
|
-
/**
|
|
1972
|
-
* Gets a list of attributes of an element.
|
|
1973
|
-
* @keywords get_attributes element dom
|
|
1974
|
-
*/
|
|
1646
|
+
/** Retrieves all attributes from the specified DOM element as a key-value map. @keywords get attributes, element attributes, dom attributes */
|
|
1975
1647
|
export declare function getAttributes<E extends ElementOrWindow>(element?: ElementOrString<E>): Record<string, string | undefined>;
|
|
1976
1648
|
|
|
1977
|
-
/**
|
|
1978
|
-
* Retrieves drag or clipboard text data.
|
|
1979
|
-
* @keywords clipboard, read, text, get
|
|
1980
|
-
*/
|
|
1649
|
+
/** Retrieves text data from a clipboard event or the clipboard. @keywords clipboard, paste, copy, read text */
|
|
1981
1650
|
export declare function getClipboardData(event?: ClipboardEvent): Promise<string>;
|
|
1982
1651
|
|
|
1983
|
-
/**
|
|
1652
|
+
/** Extracts an array of values for a specific property or column from an array of objects. @keywords column, pluck, extract, values, property */
|
|
1984
1653
|
export declare function getColumn<T, K extends keyof T>(array: ObjectOrArray<T>, column: K): (T[K] | undefined)[];
|
|
1985
1654
|
|
|
1986
|
-
/**
|
|
1655
|
+
/**
|
|
1656
|
+
* Returns the current date in the specified format.
|
|
1657
|
+
* @remarks Using for SSR rendering may lead to hydration mismatches due to timezone differences. Use within client-side hooks.
|
|
1658
|
+
* @keywords current date, today, now, format, ssr
|
|
1659
|
+
*/
|
|
1987
1660
|
export declare function getCurrentDate(format?: GeoDate): string;
|
|
1988
1661
|
|
|
1989
|
-
/** Returns the current time in milliseconds. @keywords getCurrentTime time milliseconds timestamp */
|
|
1990
|
-
export declare function getCurrentTime(): number;
|
|
1991
|
-
|
|
1992
1662
|
/**
|
|
1993
|
-
* Returns the
|
|
1994
|
-
* @
|
|
1663
|
+
* Returns the current time in milliseconds.
|
|
1664
|
+
* @remarks Warning (SSR): Using this function during SSR rendering can cause hydration mismatches due to server/client timestamp differences.
|
|
1665
|
+
* @keywords current time, timestamp, now, milliseconds, epoch
|
|
1995
1666
|
*/
|
|
1667
|
+
export declare function getCurrentTime(): number;
|
|
1668
|
+
|
|
1669
|
+
/** Returns the first Element matching the specified selector or the element itself. @keywords getElement, querySelector, dom, selector */
|
|
1996
1670
|
export declare function getElement<E extends ElementOrWindow, R extends Exclude<E, Window>>(element?: ElementOrString<E>): R | undefined;
|
|
1997
1671
|
|
|
1998
|
-
/**
|
|
1999
|
-
* Returns the identifier (ID) of the element or creates it if missing.
|
|
2000
|
-
* @keywords getElementId, element, id, dom
|
|
2001
|
-
* @param element element to get ID from
|
|
2002
|
-
* @param selector optional selector suffix
|
|
2003
|
-
*/
|
|
1672
|
+
/** Returns the element ID or generates a new unique ID if missing. @keywords element id, generate id, get id, dom id */
|
|
2004
1673
|
export declare function getElementId<E extends ElementOrWindow>(element?: ElementOrString<E>, selector?: string): string;
|
|
2005
|
-
|
|
2006
1674
|
/**
|
|
2007
|
-
* Initializes the
|
|
2008
|
-
* @
|
|
2009
|
-
* @
|
|
1675
|
+
* Initializes the element ID generator listener for SSR context synchronization.
|
|
1676
|
+
* @warning Initialization is mandatory for correct functioning of SSR on both server and client sides.
|
|
1677
|
+
* @example
|
|
1678
|
+
* ```typescript
|
|
1679
|
+
* import { useId } from 'vue'
|
|
1680
|
+
* import { initGetElementId } from '@dxtmisha/functional-basic'
|
|
1681
|
+
*
|
|
1682
|
+
* initGetElementId(() => useId())
|
|
1683
|
+
* ```
|
|
1684
|
+
* @keywords init id, ssr id listener, setup getElementId
|
|
2010
1685
|
*/
|
|
2011
1686
|
export declare function initGetElementId(newListener: () => string | number): void;
|
|
2012
1687
|
|
|
2013
|
-
/**
|
|
2014
|
-
* Get image element from HTMLImageElement or string source.
|
|
2015
|
-
* @keywords getElementImage, image, html, element
|
|
2016
|
-
*/
|
|
1688
|
+
/** Resolves an HTMLImageElement from an image element or source URL string. @keywords image, html image, img element, source */
|
|
2017
1689
|
export declare function getElementImage(image: HTMLImageElement | string): HTMLImageElement | undefined;
|
|
2018
1690
|
|
|
2019
|
-
/**
|
|
2020
|
-
* Returns element property value or default value.
|
|
2021
|
-
* @keywords getElementItem, element property, value
|
|
2022
|
-
*/
|
|
1691
|
+
/** Retrieves an element property value by key with an optional fallback. @keywords element, get, property, item, value */
|
|
2023
1692
|
export declare function getElementItem<T extends ElementOrWindow, K extends keyof T, D>(element: ElementOrString<T>, index: K | string, defaultValue?: D): T[K] | D | undefined;
|
|
2024
1693
|
|
|
2025
|
-
/** Returns window or element @keywords element, window,
|
|
1694
|
+
/** Returns the window or DOM element matching a selector or element reference. @keywords get element, window, dom selector, element or window */
|
|
2026
1695
|
export declare function getElementOrWindow<E extends ElementOrWindow>(element?: ElementOrString<E>): E | undefined;
|
|
2027
1696
|
|
|
2028
|
-
/** Generates a safe script tag for data hydration. @keywords
|
|
1697
|
+
/** Generates a safe script tag for data hydration. @keywords safe script tag, data hydration, html script */
|
|
2029
1698
|
export declare function getElementSafeScript(id: string, data: any): string;
|
|
2030
1699
|
|
|
2031
|
-
/** Creates a case-insensitive regular expression for exact match of a phrase. @keywords
|
|
1700
|
+
/** Creates a case-insensitive regular expression for an exact match of a phrase without anchors. @keywords regex, regular expression, exact match, search pattern */
|
|
2032
1701
|
export declare function getExactSearchExp(search: string): RegExp;
|
|
2033
1702
|
|
|
2034
|
-
/**
|
|
2035
|
-
* Creates a regular expression object to match text against a pattern.
|
|
2036
|
-
* @keywords regex, regular expression, pattern matching, getExp
|
|
2037
|
-
*/
|
|
1703
|
+
/** Creates a RegExp object substituting :value in the pattern with the provided value. @keywords regex regexp pattern match getExp */
|
|
2038
1704
|
export declare function getExp(value: string, flags?: string, pattern?: string): RegExp;
|
|
2039
1705
|
|
|
2040
|
-
/** Returns the first element of an array or
|
|
1706
|
+
/** Returns the first element of an array, object, or single value. @keywords first, head, initial, array, object */
|
|
2041
1707
|
export declare function getFirst<T>(value: T | T[] | Record<string, T>): T | undefined;
|
|
2042
1708
|
|
|
2043
|
-
/** Retrieves and parses JSON data from a DOM script
|
|
1709
|
+
/** Retrieves and parses JSON hydration data from a DOM script element. @keywords hydration, json, script tag, dom, parse, ssr */
|
|
2044
1710
|
export declare function getHydrationData<T>(id: string, defaultValue: T, remove?: boolean): T;
|
|
2045
1711
|
|
|
2046
|
-
/**
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
*/
|
|
1712
|
+
/** Returns the source URL string from an HTMLImageElement or string. @keywords image, src, url, source, element */
|
|
1713
|
+
export declare function getImageSrc(image?: HTMLImageElement | string): string;
|
|
1714
|
+
|
|
1715
|
+
/** Retrieves a nested value from an object by its path. @keywords get, path, nested, object, property */
|
|
2050
1716
|
export declare function getItemByPath<T extends Record<string, any>, R = string>(item: T, path: string): R | undefined;
|
|
2051
1717
|
|
|
2052
|
-
/** Returns the pressed key from keyboard event. @keywords
|
|
1718
|
+
/** Returns the pressed key from a keyboard event. @keywords keyboard, key, event, pressed key */
|
|
2053
1719
|
export declare function getKey(event: KeyboardEvent): string | number | undefined;
|
|
2054
1720
|
|
|
2055
|
-
/**
|
|
2056
|
-
* Returns the last element of an array or object.
|
|
2057
|
-
* @keywords last, element, array, object
|
|
2058
|
-
* @param value input value
|
|
2059
|
-
*/
|
|
1721
|
+
/** Returns the last element of an array or object. @keywords last, tail, array, object */
|
|
2060
1722
|
export declare function getLast<T>(value: T | T[] | Record<string, T>): T | undefined;
|
|
2061
1723
|
|
|
2062
|
-
/** Returns the length or size of
|
|
1724
|
+
/** Returns the length or size of an Array, Object, Map, Set, or String, returning 0 for unsupported or nullish types. @keywords length, size, count, array, object, map, set, string */
|
|
2063
1725
|
export declare function getLength(value: any): number;
|
|
2064
1726
|
|
|
2065
|
-
/** Returns lengths of all elements in an array. @keywords
|
|
1727
|
+
/** Returns the lengths of all string elements in an array or object. @keywords length, count, elements, array, string length */
|
|
2066
1728
|
export declare function getLengthOfAllArray(value: ObjectOrArray<string>): number[];
|
|
2067
1729
|
|
|
2068
|
-
/**
|
|
1730
|
+
/** Finds the length of the longest string in an array or object. @keywords max length, longest string, array, object */
|
|
2069
1731
|
export declare function getMaxLengthAllArray(data: ObjectOrArray<string>): number;
|
|
2070
1732
|
|
|
2071
|
-
/**
|
|
2072
|
-
* Returns the minimum length among all string values in an object or array.
|
|
2073
|
-
* @keywords getMinLengthAllArray, min_length, array, length
|
|
2074
|
-
*/
|
|
1733
|
+
/** Returns the length of the shortest string in an array or object. @keywords shortest string, min length, minimum string length */
|
|
2075
1734
|
export declare function getMinLengthAllArray(data: ObjectOrArray<string>): number;
|
|
2076
1735
|
|
|
2077
|
-
/**
|
|
1736
|
+
/** Retrieves the position of the mouse cursor or touch point from an event. @keywords mouse touch coordinates client position cursor */
|
|
2078
1737
|
export declare function getMouseClient(event: MouseEvent | TouchEvent): ImageCoordinator;
|
|
2079
1738
|
|
|
2080
|
-
/** Returns mouse
|
|
1739
|
+
/** Returns the mouse cursor or touch clientX coordinate. @keywords mouse, touch, clientX, cursor position, coordinates */
|
|
2081
1740
|
export declare function getMouseClientX(event: MouseEvent | TouchEvent): number;
|
|
2082
1741
|
|
|
2083
|
-
/** Returns the
|
|
1742
|
+
/** Returns the vertical client coordinate (Y) of a mouse or touch event. @keywords mouse, touch, clientY, cursor position, Y coordinate */
|
|
2084
1743
|
export declare function getMouseClientY(event: MouseEvent | TouchEvent): number;
|
|
2085
1744
|
|
|
2086
|
-
/**
|
|
1745
|
+
/** Creates a new object containing only the specified keys from the source object. @keywords pick, filter keys, subset, extract properties */
|
|
2087
1746
|
export declare function getObjectByKeys<T extends Record<string, any>, K extends keyof T>(data: T, keys: K[]): Pick<T, K>;
|
|
2088
1747
|
|
|
2089
|
-
/** Removes properties
|
|
1748
|
+
/** Removes all properties matching an exception value from an object. @keywords object filter remove undefined clean */
|
|
2090
1749
|
export declare function getObjectNoUndefined<T extends Record<string | number, any>>(data: T, exception?: any): T;
|
|
2091
1750
|
|
|
2092
|
-
/** Returns the object if values are
|
|
1751
|
+
/** Returns the object if its values are defined, otherwise an empty object. @keywords object fallback default getObjectOrNone */
|
|
2093
1752
|
export declare function getObjectOrNone<T>(value: T): T & Record<string, any>;
|
|
2094
1753
|
|
|
2095
|
-
/**
|
|
1754
|
+
/** Strips special characters, returning only alphanumeric characters and spaces. @keywords sanitize, clean, alphanumeric, strip, text */
|
|
2096
1755
|
export declare function getOnlyText(text: any): string;
|
|
2097
1756
|
|
|
2098
|
-
/**
|
|
2099
|
-
* Returns a random element from an array, object, or value.
|
|
2100
|
-
* @keywords random element, get random, pick item
|
|
2101
|
-
*/
|
|
1757
|
+
/** Returns a random element from an array, object, or value, or undefined if empty. @keywords random, item, sample, choice, array, object */
|
|
2102
1758
|
export declare function getRandomItem<T>(value?: T | T[] | Record<string, T>): T | undefined;
|
|
2103
1759
|
|
|
2104
|
-
/**
|
|
2105
|
-
* Generates random text.
|
|
2106
|
-
* @keywords generate text random string
|
|
2107
|
-
*/
|
|
1760
|
+
/** Generates random text with configurable word count and word length constraints. @keywords random text generator words string placeholder */
|
|
2108
1761
|
export declare function getRandomText(min: number, max: number, symbol?: string, lengthMin?: number, lengthMax?: number): string;
|
|
2109
1762
|
|
|
2110
|
-
/**
|
|
1763
|
+
/** Serializes an object or array into a delimited key-value query string. @keywords serialize, query string, key-value, url params */
|
|
2111
1764
|
export declare function getRequestString(request: Record<string, any> | any[], sign?: string, separator?: string, subKey?: string): string;
|
|
2112
1765
|
|
|
2113
|
-
/**
|
|
2114
|
-
* Builds a case-insensitive global RegExp for multi-word search matching all terms.
|
|
2115
|
-
* @keywords get_search_exp, regexp, search, filter
|
|
2116
|
-
* @param search Search string with space-separated words
|
|
2117
|
-
* @param limit Maximum search string length
|
|
2118
|
-
*/
|
|
1766
|
+
/** Builds a case-insensitive RegExp matching strings containing all space-separated search words in any order. @keywords regex, search, multi-word, lookahead, filter, match */
|
|
2119
1767
|
export declare function getSearchExp(search: string, limit?: number): RegExp;
|
|
2120
1768
|
|
|
2121
|
-
/** Creates a
|
|
1769
|
+
/** Creates a case-insensitive regular expression for space-separated word search. @keywords regex, search, pattern, word matching */
|
|
2122
1770
|
export declare function getSeparatingSearchExp(search: string | RegExp, limit?: number): RegExp;
|
|
2123
1771
|
|
|
2124
|
-
/**
|
|
1772
|
+
/** Calculates the step value as a percentage within a min-max range. @keywords step, percent, range, slider, scale */
|
|
2125
1773
|
export declare function getStepPercent(min: number | undefined, max: number): number;
|
|
2126
1774
|
|
|
2127
|
-
/**
|
|
1775
|
+
/** Calculates the step value unit relative to the given min and max range. @keywords step, step value, range, interval */
|
|
2128
1776
|
export declare function getStepValue(min: number | undefined, max: number): number;
|
|
2129
1777
|
|
|
2130
|
-
/**
|
|
1778
|
+
/** Scrolls a container element to a target element with optional centering. @keywords scroll, scroll-to, element, center */
|
|
2131
1779
|
export declare function goScroll(selector: string, elementTo: HTMLElement | undefined, elementCenter?: HTMLElement): void;
|
|
2132
1780
|
|
|
2133
|
-
/**
|
|
2134
|
-
* Smooth scrolling to the target element.
|
|
2135
|
-
* @keywords scroll, smooth, element, animation
|
|
2136
|
-
*/
|
|
1781
|
+
/** Smoothly scrolls the viewport to the specified HTML element with an optional offset. @keywords scroll, smooth, scrollIntoView, viewport, offset */
|
|
2137
1782
|
export declare function goScrollSmooth<E extends HTMLElement>(element: E, options?: ScrollIntoViewOptions, shift?: number): void;
|
|
2138
1783
|
|
|
2139
|
-
/** Scrolls the container to make the target element visible. @keywords scroll
|
|
1784
|
+
/** Scrolls the container to make the target element visible. @keywords scroll, scrollTo, scrollIntoView, dom */
|
|
2140
1785
|
export declare function goScrollTo(element?: HTMLElement, elementTo?: HTMLElement, behavior?: ScrollBehavior): void;
|
|
2141
1786
|
|
|
2142
|
-
/** Invokes
|
|
1787
|
+
/** Invokes the native sharing mechanism via the Web Share API. @keywords share, web share api, navigator share, device share */
|
|
2143
1788
|
export declare function handleShare(data: ShareData): Promise<boolean>;
|
|
2144
1789
|
|
|
2145
|
-
/** Checks if
|
|
1790
|
+
/** Checks if a value exists within the specified array. @keywords inArray, array, includes, contains, search */
|
|
2146
1791
|
export declare function inArray<T>(array: T[], value: T): boolean;
|
|
2147
1792
|
|
|
2148
|
-
/**
|
|
2149
|
-
* Initialization of data for scroll control. @keywords init scrollbar offset layout ui
|
|
2150
|
-
*/
|
|
1793
|
+
/** Initializes data for scrollbar offset and scroll control. @keywords scrollbar, offset, scroll control, initialize */
|
|
2151
1794
|
export declare function initScrollbarOffset(): Promise<void>;
|
|
2152
1795
|
|
|
2153
|
-
/** Computes the intersection
|
|
1796
|
+
/** Computes the key-based intersection between two objects. @keywords intersect, intersection, key comparison, object keys */
|
|
2154
1797
|
export declare function intersectKey<T, KT extends keyof T, C, KC extends keyof C>(data?: T, comparison?: C): Record<KT & KC, T[KT]>;
|
|
2155
1798
|
|
|
2156
|
-
/** Checks if API response is successful @keywords api, success, validate */
|
|
1799
|
+
/** Checks if an API response is successful. @keywords api, response, success, check, validate */
|
|
2157
1800
|
export declare const isApiSuccess: <T>(data: ApiData<T>) => boolean;
|
|
2158
1801
|
|
|
2159
|
-
/** Checks if
|
|
1802
|
+
/** Checks if a value is an array. @keywords isArray, array, type guard, validation */
|
|
2160
1803
|
export declare function isArray<T, R>(value: T): value is Extract<T, R[]>;
|
|
2161
1804
|
|
|
2162
|
-
/** Checks if the values of two objects are different. @keywords
|
|
1805
|
+
/** Checks if the values of two objects are different. @keywords compare, difference, object, equality */
|
|
2163
1806
|
export declare function isDifferent<T>(value: ObjectItem<T>, old: ObjectItem<T>): boolean;
|
|
2164
1807
|
|
|
2165
|
-
/** Checks if the current environment is a data URL. @keywords isDomData, data url,
|
|
1808
|
+
/** Checks if the current environment is a data URL. @keywords isDomData, dom, data url, environment */
|
|
2166
1809
|
export declare function isDomData(): boolean;
|
|
2167
1810
|
|
|
2168
|
-
/** Checks if code is running in a browser environment
|
|
1811
|
+
/** Checks if the code is running in a DOM / browser environment where the `window` object is available. @keywords dom runtime browser window environment check */
|
|
2169
1812
|
export declare function isDomRuntime(): boolean;
|
|
2170
1813
|
|
|
2171
|
-
/** Checks if an element is visible in DOM and not hidden by CSS. @keywords
|
|
1814
|
+
/** Checks if an element is visible in the DOM and not hidden by CSS (can be off-screen). @keywords element, dom, visible, visibility, is-visible, display, css */
|
|
2172
1815
|
export declare function isElementVisible<E extends ElementOrWindow>(elementSelectors?: ElementOrString<E>): boolean;
|
|
2173
1816
|
|
|
2174
|
-
/** Checks if the pressed key is Enter or Space. @keywords enter, space, keyboard, key */
|
|
1817
|
+
/** Checks if the pressed key is Enter or Space. @keywords enter, space, keydown, keyboard event, key check */
|
|
2175
1818
|
export declare const isEnter: (event: KeyboardEvent, isInputElement?: boolean) => boolean;
|
|
2176
1819
|
|
|
2177
|
-
/** Checks if
|
|
1820
|
+
/** Checks if a value is filled and not empty. @param zeroTrue Treats 0 or '0' as filled if true @keywords isFilled, filled, empty check, validation, presence */
|
|
2178
1821
|
export declare function isFilled<T>(value: T, zeroTrue?: boolean): value is Exclude<T, EmptyValue>;
|
|
2179
1822
|
|
|
2180
|
-
/** Checks if the value is an integer or floating-point number. @keywords isFloat number check */
|
|
1823
|
+
/** Checks if the value is an integer or floating-point number. @keywords isFloat, float, number, numeric, check */
|
|
2181
1824
|
export declare function isFloat(value: any): boolean;
|
|
2182
1825
|
|
|
2183
|
-
/** Checks if the value is a function. @keywords isFunction, function,
|
|
1826
|
+
/** Checks if the value is a callable function. @keywords isFunction, callback, function, type guard, callable */
|
|
2184
1827
|
export declare function isFunction<T>(callback: T): callback is Extract<T, FunctionArgs<any, any>>;
|
|
2185
1828
|
|
|
2186
|
-
/**
|
|
2187
|
-
* Checks if an element is still in the DOM tree.
|
|
2188
|
-
* @keywords isInDom dom element check connected
|
|
2189
|
-
*/
|
|
1829
|
+
/** Checks if an element or selector is attached to the DOM tree. @keywords dom, attached, is connected, element in dom, is in document */
|
|
2190
1830
|
export declare function isInDom<E extends ElementOrWindow>(element?: ElementOrString<E>): boolean;
|
|
2191
1831
|
|
|
2192
|
-
/** Checks if the element is an input field or editable. @keywords isInput input editable form
|
|
1832
|
+
/** Checks if the element is an input field or editable. @keywords isInput, input, textarea, editable, form */
|
|
2193
1833
|
export declare const isInput: (element: HTMLElement | EventTarget | null) => boolean;
|
|
2194
1834
|
|
|
2195
|
-
/**
|
|
2196
|
-
* Checks if the value is between integers. @keywords isIntegerBetween, integer, between, range, check */
|
|
1835
|
+
/** Checks if a value is between integers relative to a rounding step. @keywords isIntegerBetween, integer, between, range, bounds */
|
|
2197
1836
|
export declare function isIntegerBetween(value: number, between: number): boolean;
|
|
2198
1837
|
|
|
2199
|
-
/** Checks if a
|
|
1838
|
+
/** Checks if a keyboard event has active modifier or meta keys pressed. @keywords keyboard, event, modifier, meta, ctrl, alt, shift, cmd */
|
|
2200
1839
|
export declare const isMetaKey: (event: KeyboardEvent) => boolean;
|
|
2201
1840
|
|
|
2202
|
-
/** Checks if value is null or undefined. @keywords isNull null undefined */
|
|
2203
|
-
export declare function isNull<T>(value: T): value is Extract<T,
|
|
1841
|
+
/** Checks if a value is null or undefined. @keywords isNull, isNil, null, undefined, check */
|
|
1842
|
+
export declare function isNull<T>(value: T): value is Extract<T, Undefined>;
|
|
2204
1843
|
|
|
2205
|
-
/** Checks if the value is a number. @keywords isNumber
|
|
2206
|
-
export declare function isNumber(value: any):
|
|
1844
|
+
/** Checks if the value is a number. @keywords isNumber, number, numeric, check, type guard */
|
|
1845
|
+
export declare function isNumber(value: any): value is number;
|
|
2207
1846
|
|
|
2208
|
-
/** Checks if a value is an object. @keywords isObject object type
|
|
1847
|
+
/** Checks if a value is an object. @keywords isObject, object check, type guard, validation */
|
|
2209
1848
|
export declare function isObject<T>(value: T): value is Extract<T, Record<any, any>>;
|
|
2210
1849
|
|
|
2211
|
-
/** Checks if value is an object and not an array. @keywords isObjectNotArray object
|
|
1850
|
+
/** Checks if the value is an object and not an array. @keywords isObjectNotArray, is object, not array, type guard */
|
|
2212
1851
|
export declare function isObjectNotArray<T>(value: T): value is Exclude<Extract<T, Record<any, any>>, any[] | undefined | null>;
|
|
2213
1852
|
|
|
2214
|
-
/** Check if the device is online. @keywords online
|
|
1853
|
+
/** Check if the device is currently online. @keywords online, network, connectivity, internet */
|
|
2215
1854
|
export declare function isOnLine(): boolean;
|
|
2216
1855
|
|
|
2217
|
-
/**
|
|
2218
|
-
* Checks if value is selected within an array or equals a string.
|
|
2219
|
-
* @keywords isSelected, check, selected, value, match
|
|
2220
|
-
*/
|
|
1856
|
+
/** Checks if a value matches or is included within the selected value or array. @keywords is selected, check selected, match selection, contains */
|
|
2221
1857
|
export declare function isSelected<T, S>(value: T, selected: T | T[] | S): boolean;
|
|
2222
1858
|
|
|
2223
|
-
/** Checks if all
|
|
1859
|
+
/** Checks if all items in a list are present in the selected values. @keywords isSelectedByList, selection, contains all, match list */
|
|
2224
1860
|
export declare function isSelectedByList<T>(values: T | T[], selected: T | T[]): boolean;
|
|
2225
1861
|
|
|
2226
|
-
/** Checks if the Web Share API is supported in the current environment. @keywords share api support */
|
|
1862
|
+
/** Checks if the Web Share API is supported in the current environment. @keywords web share, navigator.share, share api, support check */
|
|
2227
1863
|
export declare function isShare(): boolean;
|
|
2228
1864
|
|
|
2229
|
-
/** Checks if value is
|
|
1865
|
+
/** Checks if a value is of type string. @keywords isString, string, type guard, validation */
|
|
2230
1866
|
export declare function isString<T>(value: T): value is Extract<T, string>;
|
|
2231
1867
|
|
|
2232
|
-
/** Checks if the pressed key is Tab. @keywords tab key
|
|
1868
|
+
/** Checks if the pressed key in a keyboard event is Tab. @keywords keyboard event, tab key, keydown, keypress */
|
|
2233
1869
|
export declare const isTab: (event: KeyboardEvent) => boolean;
|
|
2234
1870
|
|
|
2235
|
-
/** Checks if object is Window. @keywords isWindow
|
|
1871
|
+
/** Checks if the given object is a Window instance. @keywords window, isWindow, dom, type guard */
|
|
2236
1872
|
export declare function isWindow<E>(element: E): element is Extract<E, Window>;
|
|
2237
1873
|
|
|
2238
|
-
/**
|
|
1874
|
+
/** Generates a random integer within a specified range. @keywords random integer number math range */
|
|
2239
1875
|
export declare function random(min: number, max: number): number;
|
|
2240
1876
|
|
|
2241
|
-
/** Removes common prefix from string. @keywords
|
|
1877
|
+
/** Removes the common prefix from the main string. @keywords string, prefix, remove, strip, trim */
|
|
2242
1878
|
export declare function removeCommonPrefix(mainStr: string, prefix: string): string;
|
|
2243
1879
|
|
|
2244
|
-
/** Replaces component name in text @keywords replace component name */
|
|
1880
|
+
/** Replaces the component name in the text with a new component name. @keywords replace component name, rename, string replace */
|
|
2245
1881
|
export declare const replaceComponentName: (text: string | undefined, name: string, componentName: string) => string | undefined;
|
|
2246
1882
|
|
|
2247
|
-
/** Recursively merges objects
|
|
1883
|
+
/** Recursively replaces or merges elements of objects or arrays into the target. @keywords replace recursive, merge recursive, deep merge, object replace */
|
|
2248
1884
|
export declare function replaceRecursive<I>(array: ObjectItem<I>, replacement?: ObjectOrArray<I>, isMerge?: boolean): ObjectItem<I>;
|
|
2249
1885
|
|
|
2250
|
-
/** Replaces template
|
|
1886
|
+
/** Replaces placeholders in a template string with values or function returns from a map. @keywords replace template placeholder interpolation substitute */
|
|
2251
1887
|
export declare function replaceTemplate(value: string, replaces: Record<string, string | FunctionReturn<string>>): string;
|
|
2252
1888
|
|
|
2253
|
-
/**
|
|
1889
|
+
/** Asynchronously resizes an image to fit within maximum dimension constraints. @keywords resize, image, scale, canvas, thumbnail, base64 */
|
|
1890
|
+
export declare function resizeImage(image: HTMLImageElement | string, maxSize?: number, typeData?: string): Promise<string>;
|
|
1891
|
+
|
|
2254
1892
|
type ResizeImageByMaxType = 'auto' | 'width' | 'height';
|
|
2255
|
-
/** Resizes an image to fit within a maximum
|
|
1893
|
+
/** Resizes an image to fit within a maximum dimension constraint. @keywords image, resize, scale, dimension, max-size */
|
|
2256
1894
|
export declare function resizeImageByMax(image: HTMLImageElement | string, maxSize: number, type?: ResizeImageByMaxType, typeData?: string): string | undefined;
|
|
2257
|
-
export {};
|
|
2258
1895
|
|
|
2259
|
-
/** Converts seconds into a time string. @keywords time,
|
|
1896
|
+
/** Converts seconds into a formatted time string (e.g. HH:MM:SS or MM:SS). @keywords time, format, seconds, duration, timestamp, clock */
|
|
2260
1897
|
export declare function secondToTime(second: number | string | undefined, hasHour?: boolean): string;
|
|
2261
1898
|
|
|
2262
|
-
/**
|
|
1899
|
+
/** Sets or updates a property value on a DOM element or window. @keywords set element item, update property, dom mutate */
|
|
2263
1900
|
export declare function setElementItem<E extends ElementOrWindow, K extends keyof E, V extends E[K] = E[K]>(element: ElementOrString<E>, index: K, value: V | Record<string, V>): E | undefined;
|
|
2264
1901
|
|
|
2265
|
-
/** Modifies
|
|
1902
|
+
/** Modifies and updates values according to type and configuration settings. @keywords set values, update selection, multiple, maxlength */
|
|
2266
1903
|
export declare function setValues<T>(selected: T | T[] | undefined, value: any, { multiple, maxlength, alwaysChange, notEmpty }: {
|
|
2267
1904
|
multiple?: boolean | undefined;
|
|
2268
1905
|
maxlength?: number | undefined;
|
|
@@ -2270,88 +1907,77 @@ export declare function setValues<T>(selected: T | T[] | undefined, value: any,
|
|
|
2270
1907
|
notEmpty?: boolean | undefined;
|
|
2271
1908
|
}): T | T[] | undefined;
|
|
2272
1909
|
|
|
2273
|
-
/**
|
|
1910
|
+
/** Pauses execution for the specified number of milliseconds. @keywords sleep, delay, wait, pause, timeout */
|
|
2274
1911
|
export declare function sleep(ms: number): Promise<void>;
|
|
2275
1912
|
|
|
2276
|
-
/** Sorts an array of items by
|
|
1913
|
+
/** Sorts an array of items by column sorting specifications or a custom comparison function. @keywords sort, order, multi-column, comparator */
|
|
2277
1914
|
export declare function sortList<T = any>(list: T[], sortColumns: SortColumnItem[], customSort?: SortFunction<T>): T[];
|
|
2278
1915
|
|
|
2279
|
-
/** Copies enumerable properties from source to target object. @keywords splice,
|
|
1916
|
+
/** Copies enumerable own properties from a source to a target object according to priority list. @keywords splice, copy, assign, merge, object */
|
|
2280
1917
|
export declare function splice<I>(array: ObjectItem<I>, replacement?: ObjectItem<I> | I, indexStart?: string): ObjectItem<I>;
|
|
2281
1918
|
|
|
2282
|
-
/**
|
|
2283
|
-
* The method creates a string of length count, consisting of the characters value. @keywords string fill repeat characters @param value character for filling @param count length of the string */
|
|
1919
|
+
/** Creates a string of the specified length filled with the given character. @keywords string fill repeat pad */
|
|
2284
1920
|
export declare function strFill(value: string, count: number): string;
|
|
2285
1921
|
|
|
2286
|
-
/** Splits a string by
|
|
1922
|
+
/** Splits a string by separator, placing the remainder in the last element if limit is set. @keywords string, split, separator, limit */
|
|
2287
1923
|
export declare function strSplit(value: number | string, separator: string, limit?: number): string[];
|
|
2288
1924
|
|
|
2289
|
-
/**
|
|
2290
|
-
* Converts a value to an array.
|
|
2291
|
-
* @keywords toArray array convert wrap
|
|
2292
|
-
*/
|
|
1925
|
+
/** Converts a value to an array, returning it as is if already an array or wrapping it in an array. @keywords toArray, cast array, wrap array, normalize array */
|
|
2293
1926
|
export declare function toArray<T>(value: T): T extends any[] ? T : [T];
|
|
2294
1927
|
|
|
2295
|
-
/**
|
|
1928
|
+
/** Converts a string to upper camel case (PascalCase). @keywords camelCase, pascalCase, string conversion, casing */
|
|
2296
1929
|
export declare function toCamelCase(value: string): string;
|
|
2297
1930
|
|
|
2298
|
-
/**
|
|
1931
|
+
/** Converts a string to PascalCase (CamelCase with capitalized first letter). @keywords camelCase pascalCase string transform format */
|
|
2299
1932
|
export declare function toCamelCaseFirst(value: string): string;
|
|
2300
1933
|
|
|
2301
|
-
/**
|
|
2302
|
-
* Conversion to Date object.
|
|
2303
|
-
* @keywords toDate, date, parse, time, transform
|
|
2304
|
-
*/
|
|
1934
|
+
/** Converts a Date, timestamp, or date string into a Date object. @keywords date, parse date, to date, convert date */
|
|
2305
1935
|
export declare function toDate<T extends Date | number | string>(value?: T): (T & Date) | Date;
|
|
2306
1936
|
|
|
2307
|
-
/** Converts a string to kebab-case format. @keywords kebab
|
|
1937
|
+
/** Converts a string to kebab-case format by lowercasing letters and replacing delimiters with hyphens. @keywords kebab-case, slugify, string, transform, dashes */
|
|
2308
1938
|
export declare function toKebabCase(value: string): string;
|
|
2309
1939
|
|
|
2310
|
-
/**
|
|
1940
|
+
/**
|
|
1941
|
+
* Converts a string or number to a finite floating-point number, handling various separators and stripping non-numeric characters.
|
|
1942
|
+
* @keywords toNumber, parse float, string to number, sanitize number, numeric conversion
|
|
1943
|
+
* @example
|
|
1944
|
+
* toNumber("1 234,56") // 1234.56
|
|
1945
|
+
* toNumber("1,234.56") // 1234.56
|
|
1946
|
+
* toNumber("1,234") // 1.234
|
|
1947
|
+
*/
|
|
2311
1948
|
export declare function toNumber(value?: NumberOrString): number;
|
|
2312
1949
|
|
|
2313
|
-
/** Converts
|
|
1950
|
+
/** Converts a value to a number clamped to a maximum allowed value, with optional locale formatting. @keywords toNumberByMax, clamp, max, number conversion, formatting */
|
|
2314
1951
|
export declare function toNumberByMax(value: string | number, max?: string | number, formatting?: boolean, language?: string): string | number;
|
|
2315
1952
|
|
|
2316
|
-
/** Converts a value to a positive finite number (> 0), or returns default value
|
|
1953
|
+
/** Converts a value to a positive finite number (> 0), or returns a default fallback value. @keywords positive number, parse number, finite number, toNumberPositive */
|
|
2317
1954
|
export declare function toNumberPositive(value?: number | string | null, defaultValue?: number): number;
|
|
2318
1955
|
|
|
2319
|
-
/** Converts
|
|
1956
|
+
/** Converts a value to a percentage relative to a maximum value. @keywords percentage, percent, ratio, calculate, convert */
|
|
2320
1957
|
export declare function toPercent(maxValue: number, value: number): number;
|
|
2321
1958
|
|
|
2322
|
-
/**
|
|
1959
|
+
/** Converts a value to a percentage scaled by 100 relative to a maximum value. @keywords percent, percentage, ratio, scale, math */
|
|
2323
1960
|
export declare function toPercentBy100(maxValue: number, value: number): number;
|
|
2324
1961
|
|
|
2325
|
-
/** Converts
|
|
1962
|
+
/** Converts a value to a string, returning an empty string for null or undefined. @keywords stringify, convert, format, serialize */
|
|
2326
1963
|
export declare function toString<T>(value: T): string;
|
|
2327
1964
|
|
|
2328
|
-
/** Transforms a string
|
|
1965
|
+
/** Transforms a string into its corresponding data type (`undefined`, `null`, boolean, object, number, or function). @keywords transform parse convert cast deserialize @param isFunction Flag to check for function in global window object */
|
|
2329
1966
|
export declare function transformation(value: any, isFunction?: boolean): any;
|
|
2330
1967
|
|
|
2331
|
-
/**
|
|
2332
|
-
* Converts a Uint8Array to a base64 encoded string.
|
|
2333
|
-
* @keywords uint8array, base64, encode, binary
|
|
2334
|
-
*/
|
|
1968
|
+
/** Converts a Uint8Array to a base64-encoded string. @keywords base64, uint8array, encode, binary, string */
|
|
2335
1969
|
export declare function uint8ArrayToBase64(bytes: Uint8Array): string;
|
|
2336
1970
|
|
|
2337
|
-
/**
|
|
2338
|
-
* Removes duplicate entries in an array.
|
|
2339
|
-
* @keywords unique array duplicates remove
|
|
2340
|
-
*/
|
|
1971
|
+
/** Removes duplicate elements from an array. @keywords unique, deduplicate, distinct, array, filter */
|
|
2341
1972
|
export declare function uniqueArray<T>(value: T[]): T[];
|
|
2342
1973
|
|
|
2343
|
-
/** Writes data to the clipboard. @keywords
|
|
1974
|
+
/** Writes text data to the system clipboard. @keywords clipboard, copy, write, buffer */
|
|
2344
1975
|
export declare function writeClipboardData(text: string): Promise<void>;
|
|
2345
1976
|
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
/** Error cause list configuration array. @keywords error, cause, list, configuration */
|
|
1977
|
+
/** Default list of predefined error causes and messages for ErrorCenter. @keywords error_causes error_list error_center */
|
|
2349
1978
|
export declare const errorCauseList: ErrorCenterCauseList;
|
|
2350
1979
|
|
|
2351
|
-
/**
|
|
2352
|
-
* Supported HTTP methods for API requests.
|
|
2353
|
-
* Поддерживаемые HTTP-методы для API-запросов.
|
|
2354
|
-
*/
|
|
1980
|
+
/** HTTP methods for API requests @keywords http method get post put patch delete */
|
|
2355
1981
|
export declare enum ApiMethodItem {
|
|
2356
1982
|
delete = "DELETE",
|
|
2357
1983
|
get = "GET",
|
|
@@ -2359,12 +1985,14 @@ export declare enum ApiMethodItem {
|
|
|
2359
1985
|
put = "PUT",
|
|
2360
1986
|
patch = "PATCH"
|
|
2361
1987
|
}
|
|
1988
|
+
/** Cached API response entry @keywords cache store item */
|
|
2362
1989
|
export type ApiCacheItem<T = any> = {
|
|
2363
1990
|
value: T;
|
|
2364
1991
|
age?: number;
|
|
2365
1992
|
cacheAge: number;
|
|
2366
1993
|
};
|
|
2367
1994
|
export type ApiCacheList = Record<string, ApiCacheItem>;
|
|
1995
|
+
/** Global API client configuration options @keywords api config options fetch */
|
|
2368
1996
|
export type ApiConfig = {
|
|
2369
1997
|
urlRoot?: string;
|
|
2370
1998
|
origin?: string;
|
|
@@ -2377,6 +2005,7 @@ export type ApiConfig = {
|
|
|
2377
2005
|
wrapper?: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>;
|
|
2378
2006
|
};
|
|
2379
2007
|
export type ApiData<T = any> = T extends any[] ? T : ApiDataItem<T>;
|
|
2008
|
+
/** API response validation result structure @keywords validation response status */
|
|
2380
2009
|
export type ApiDataValidation = {
|
|
2381
2010
|
status?: ApiStatusType;
|
|
2382
2011
|
code?: string | number;
|
|
@@ -2386,6 +2015,7 @@ export type ApiDataValidation = {
|
|
|
2386
2015
|
message?: string;
|
|
2387
2016
|
};
|
|
2388
2017
|
};
|
|
2018
|
+
/** API response payload and metadata wrapper @keywords response payload data */
|
|
2389
2019
|
export type ApiDataItem<T = any> = T & ApiDataValidation & {
|
|
2390
2020
|
data?: T;
|
|
2391
2021
|
success?: boolean;
|
|
@@ -2394,6 +2024,7 @@ export type ApiDataItem<T = any> = T & ApiDataValidation & {
|
|
|
2394
2024
|
};
|
|
2395
2025
|
export type ApiHeadersValue = Record<string, string> | (() => Record<string, string>);
|
|
2396
2026
|
export type ApiDefaultValue = Record<string, any> | (() => Record<string, any>);
|
|
2027
|
+
/** API request execution options and parameters @keywords fetch request options query */
|
|
2397
2028
|
export type ApiFetch = {
|
|
2398
2029
|
api?: boolean;
|
|
2399
2030
|
path?: string;
|
|
@@ -2423,6 +2054,7 @@ export type ApiFetch = {
|
|
|
2423
2054
|
endResetLimit?: number;
|
|
2424
2055
|
wrapper?: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>;
|
|
2425
2056
|
};
|
|
2057
|
+
/** Preloaded hydration data for API response matching @keywords hydration preload ssr */
|
|
2426
2058
|
export type ApiHydrationItem = {
|
|
2427
2059
|
path: string;
|
|
2428
2060
|
method: ApiMethod;
|
|
@@ -2430,6 +2062,7 @@ export type ApiHydrationItem = {
|
|
|
2430
2062
|
response: any;
|
|
2431
2063
|
};
|
|
2432
2064
|
export type ApiHydrationList = ApiHydrationItem[];
|
|
2065
|
+
/** API error mapping and interception configuration @keywords error storage interceptor */
|
|
2433
2066
|
export type ApiErrorStorageItem = Record<string, any> & {
|
|
2434
2067
|
url: string | RegExp;
|
|
2435
2068
|
method: ApiMethodItem;
|
|
@@ -2440,10 +2073,12 @@ export type ApiErrorStorageItem = Record<string, any> & {
|
|
|
2440
2073
|
};
|
|
2441
2074
|
export type ApiErrorStorageList = ApiErrorStorageItem[];
|
|
2442
2075
|
export type ApiMethod = string | ApiMethodItem;
|
|
2076
|
+
/** Global preparation and teardown hook execution result @keywords hook lifecycle reset */
|
|
2443
2077
|
export type ApiPreparationEnd = {
|
|
2444
2078
|
reset?: boolean;
|
|
2445
2079
|
data?: any;
|
|
2446
2080
|
};
|
|
2081
|
+
/** Mock API response descriptor and matching rules @keywords mock response stub */
|
|
2447
2082
|
export type ApiResponseItem = {
|
|
2448
2083
|
path: string | RegExp;
|
|
2449
2084
|
method: ApiMethod;
|
|
@@ -2453,6 +2088,7 @@ export type ApiResponseItem = {
|
|
|
2453
2088
|
isForGlobal?: boolean;
|
|
2454
2089
|
lag?: any;
|
|
2455
2090
|
};
|
|
2091
|
+
/** API request status and error tracking descriptor @keywords status tracker state */
|
|
2456
2092
|
export type ApiStatusItem = {
|
|
2457
2093
|
status?: number;
|
|
2458
2094
|
statusText?: string;
|
|
@@ -2465,6 +2101,7 @@ export type ApiStatusItem = {
|
|
|
2465
2101
|
export type ApiStatusType = 'success' | 'error' | 'warning' | 'info';
|
|
2466
2102
|
|
|
2467
2103
|
export type Undefined = undefined | null;
|
|
2104
|
+
/** Union of nullish, falsy values and their string representations. @keywords empty, falsy, nullish */
|
|
2468
2105
|
export type EmptyValue = Undefined | 0 | false | '' | 'undefined' | 'null' | '0' | 'false' | '[]';
|
|
2469
2106
|
export type NumberOrString = number | string;
|
|
2470
2107
|
export type NumberOrStringOrBoolean = number | string | boolean;
|
|
@@ -2473,6 +2110,7 @@ export type NormalOrArray<T = NumberOrString> = T | T[];
|
|
|
2473
2110
|
export type NormalOrPromise<T> = T | Promise<T>;
|
|
2474
2111
|
export type ObjectItem<T = any> = Record<string, T>;
|
|
2475
2112
|
export type ObjectOrArray<T = any> = T[] | ObjectItem<T>;
|
|
2113
|
+
/** Extracts item type from an array or returns the type itself. @keywords array, item, unwrap */
|
|
2476
2114
|
export type ArrayToItem<T> = T extends any[] ? T[number] : T;
|
|
2477
2115
|
export type FunctionReturn<R = any> = () => R;
|
|
2478
2116
|
export type FunctionVoid = () => void;
|
|
@@ -2480,709 +2118,419 @@ export type FunctionArgs<T, R> = (...args: T[]) => R;
|
|
|
2480
2118
|
export type FunctionAnyType<T = any, R = any> = (...args: T[]) => R;
|
|
2481
2119
|
export type ItemList<T = any> = Record<string, T>;
|
|
2482
2120
|
export type Item<V> = {
|
|
2483
|
-
|
|
2484
|
-
|
|
2121
|
+
index: string;
|
|
2122
|
+
value: V;
|
|
2485
2123
|
};
|
|
2486
2124
|
export type ItemValue<V> = {
|
|
2487
|
-
|
|
2488
|
-
|
|
2125
|
+
label: string;
|
|
2126
|
+
value: V;
|
|
2489
2127
|
};
|
|
2490
2128
|
export type ItemName<V> = {
|
|
2491
|
-
|
|
2492
|
-
|
|
2129
|
+
name: string | number;
|
|
2130
|
+
value: V;
|
|
2493
2131
|
};
|
|
2494
2132
|
export type ElementOrWindow = HTMLElement | Window;
|
|
2495
2133
|
export type ElementOrString<E extends ElementOrWindow> = E | string;
|
|
2496
2134
|
export type EventOptions = AddEventListenerOptions | boolean | undefined;
|
|
2135
|
+
/** Event listener callback with optional detail payload. @keywords event, listener, detail */
|
|
2497
2136
|
export type EventListenerDetail<O extends Event, D extends Record<string, any>> = (event: O, detail?: D) => void;
|
|
2137
|
+
/** Tracks active DOM event listeners and ResizeObservers. @keywords event, listener, observer, activity */
|
|
2498
2138
|
export type EventActivityItem<E extends ElementOrWindow> = {
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2139
|
+
element: E | undefined;
|
|
2140
|
+
type: string;
|
|
2141
|
+
listener?: (event: any | Event) => void;
|
|
2142
|
+
observer?: ResizeObserver;
|
|
2503
2143
|
};
|
|
2504
2144
|
export type ImageCoordinator = {
|
|
2505
|
-
|
|
2506
|
-
|
|
2145
|
+
x: number;
|
|
2146
|
+
y: number;
|
|
2507
2147
|
};
|
|
2508
2148
|
|
|
2509
|
-
/** Manages error groups, codes, handlers, and console reporting. @keywords error_center, handler, management */
|
|
2510
|
-
export declare class ErrorCenterHandler {
|
|
2511
|
-
/** List of error handlers grouped by category. @keywords error_handlers, group */
|
|
2512
|
-
handlers: ErrorCenterHandlerItem[];
|
|
2513
|
-
/** Global callbacks executed on any error. @keywords error_callbacks, global */
|
|
2514
|
-
callbacks: ErrorCenterHandlerCallback[];
|
|
2515
|
-
/** Configuration for console logging. @keywords console_logging, config */
|
|
2516
|
-
isConsole: ErrorCenterHandlerIsConsole;
|
|
2517
|
-
/** Initializes error center handler with optional initial list and console setting. @keywords constructor, init */
|
|
2518
|
-
constructor(e?: ErrorCenterHandlerList, t?: ErrorCenterHandlerIsConsole);
|
|
2519
|
-
/** Checks if a handler group exists. @keywords has_group, check */
|
|
2520
|
-
has(e: ErrorCenterGroup): boolean;
|
|
2521
|
-
/** Retrieves handler item by group. @keywords get_handler, lookup */
|
|
2522
|
-
get(e: ErrorCenterGroup): ErrorCenterHandlerItem | undefined;
|
|
2523
|
-
/** Adds a callback handler for a specific group. @keywords add_handler, register */
|
|
2524
|
-
add(e: ErrorCenterGroup, t: ErrorCenterHandlerCallback): this;
|
|
2525
|
-
/** Adds a list of handlers. @keywords add_list, batch */
|
|
2526
|
-
addList(e: ErrorCenterHandlerList): this;
|
|
2527
|
-
/** Adds a global error callback. @keywords add_callback, global */
|
|
2528
|
-
addCallback(e: ErrorCenterHandlerCallback): this;
|
|
2529
|
-
/** Sets console logging behavior. @keywords set_console, config */
|
|
2530
|
-
setIsConsole(e: ErrorCenterHandlerIsConsole): this;
|
|
2531
|
-
/** Triggers error handling for a given cause. @keywords trigger_error, dispatch */
|
|
2532
|
-
on(e: ErrorCenterCauseItem): this;
|
|
2533
|
-
/** Outputs error details to the console if enabled. @keywords log_console, print */
|
|
2534
|
-
toConsole(e: ErrorCenterCauseItem): this;
|
|
2535
|
-
}
|
|
2536
|
-
/** Manages causes and error handling pipelines. @keywords error_cause_manager, pipeline */
|
|
2537
|
-
export declare class ErrorCenterInstance {
|
|
2538
|
-
/** Internal error handler instance. @keywords handler_instance, error_center */
|
|
2539
|
-
handler: ErrorCenterHandler;
|
|
2540
|
-
/** List of known error causes. @keywords causes_list, errors */
|
|
2541
|
-
causes: ErrorCenterCauseList;
|
|
2542
|
-
/** Initializes error instance with causes and handler. @keywords constructor, init */
|
|
2543
|
-
constructor(e?: ErrorCenterCauseList, t?: ErrorCenterHandler);
|
|
2544
|
-
/** Checks if a specific error cause exists. @keywords has_cause, check */
|
|
2545
|
-
has(e: string, t?: ErrorCenterGroup): boolean;
|
|
2546
|
-
/** Retrieves a specific error cause item. @keywords get_cause, lookup */
|
|
2547
|
-
get(e: string, t?: ErrorCenterGroup): ErrorCenterCauseItem | undefined;
|
|
2548
|
-
/** Adds a new error cause. @keywords add_cause, register */
|
|
2549
|
-
add(e: ErrorCenterCauseItem): this;
|
|
2550
|
-
/** Adds a list of error causes. @keywords add_causes, batch */
|
|
2551
|
-
addList(e: ErrorCenterCauseList): this;
|
|
2552
|
-
/** Adds an error handler for a group. @keywords add_handler, register */
|
|
2553
|
-
addHandler(e: ErrorCenterGroup, t: ErrorCenterHandlerCallback): this;
|
|
2554
|
-
/** Adds a list of error handlers. @keywords add_handlers, batch */
|
|
2555
|
-
addHandlerList(e: ErrorCenterHandlerList): this;
|
|
2556
|
-
/** Adds a global error callback. @keywords add_callback, global */
|
|
2557
|
-
addCallback(e: ErrorCenterHandlerCallback): this;
|
|
2558
|
-
/** Sets console logging behavior. @keywords set_console, config */
|
|
2559
|
-
setIsConsole(e: ErrorCenterHandlerIsConsole): this;
|
|
2560
|
-
/** Dispatches an error through the handler pipeline. @keywords trigger_error, dispatch */
|
|
2561
|
-
on(e: ErrorCenterCauseItem): this;
|
|
2562
|
-
/** Assigns or merges error details with a registered cause template. @keywords assign_cause, merge */
|
|
2563
|
-
assign(e: ErrorCenterCauseItem): ErrorCenterCauseItem;
|
|
2564
|
-
}
|
|
2565
|
-
/** Static accessor for global error management. @keywords error_center_static, global */
|
|
2566
|
-
export declare class ErrorCenter {
|
|
2567
|
-
/** Retrieves the global error instance. @keywords get_item, instance */
|
|
2568
|
-
static getItem(): ErrorCenterInstance;
|
|
2569
|
-
/** Checks if a specific error cause exists globally. @keywords has_cause, check */
|
|
2570
|
-
static has(e: string, t?: ErrorCenterGroup): boolean;
|
|
2571
|
-
/** Retrieves a global error cause item. @keywords get_cause, lookup */
|
|
2572
|
-
static get(e: string, t?: ErrorCenterGroup): ErrorCenterCauseItem | undefined;
|
|
2573
|
-
/** Adds a global error cause. @keywords add_cause, register */
|
|
2574
|
-
static add(e: ErrorCenterCauseItem): void;
|
|
2575
|
-
/** Adds a list of global error causes. @keywords add_causes, batch */
|
|
2576
|
-
static addList(e: ErrorCenterCauseList): void;
|
|
2577
|
-
/** Adds a global error handler. @keywords add_handler, register */
|
|
2578
|
-
static addHandler(e: ErrorCenterGroup, t: ErrorCenterHandlerCallback): void;
|
|
2579
|
-
/** Adds a list of global error handlers. @keywords add_handlers, batch */
|
|
2580
|
-
static addHandlerList(e: ErrorCenterHandlerList): void;
|
|
2581
|
-
/** Adds a global error callback. @keywords add_callback, global */
|
|
2582
|
-
static addCallback(e: ErrorCenterHandlerCallback): void;
|
|
2583
|
-
/** Sets global console logging behavior. @keywords set_console, config */
|
|
2584
|
-
static setIsConsole(e: ErrorCenterHandlerIsConsole): void;
|
|
2585
|
-
/** Dispatches a global error. @keywords trigger_error, dispatch */
|
|
2586
|
-
static on(e: ErrorCenterCauseItem): void;
|
|
2587
|
-
}
|
|
2588
|
-
/** Error group identifier / Идентификатор группы ошибок */
|
|
2589
2149
|
export type ErrorCenterGroup = string | undefined;
|
|
2590
|
-
|
|
2150
|
+
|
|
2151
|
+
/** Error item descriptor with metadata and custom payload details. @keywords error cause item */
|
|
2591
2152
|
export type ErrorCenterCauseItem<D = any> = {
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2153
|
+
group?: ErrorCenterGroup;
|
|
2154
|
+
code: string;
|
|
2155
|
+
priority?: number;
|
|
2156
|
+
label?: string;
|
|
2157
|
+
message?: string;
|
|
2158
|
+
details?: D;
|
|
2598
2159
|
};
|
|
2599
|
-
|
|
2160
|
+
|
|
2600
2161
|
export type ErrorCenterCauseList = ErrorCenterCauseItem[];
|
|
2601
|
-
|
|
2162
|
+
|
|
2163
|
+
/** Callback function for processing error items. @keywords error handler callback */
|
|
2602
2164
|
export type ErrorCenterHandlerCallback = (cause: ErrorCenterCauseItem) => void;
|
|
2603
|
-
|
|
2165
|
+
|
|
2166
|
+
/** Error handler registration entry mapped to an optional error group. @keywords error handler item */
|
|
2604
2167
|
export type ErrorCenterHandlerItem = {
|
|
2605
|
-
|
|
2606
|
-
|
|
2168
|
+
group?: ErrorCenterGroup;
|
|
2169
|
+
handlers: ErrorCenterHandlerCallback[];
|
|
2607
2170
|
};
|
|
2608
|
-
|
|
2171
|
+
|
|
2609
2172
|
export type ErrorCenterHandlerList = ErrorCenterHandlerItem[];
|
|
2610
|
-
|
|
2173
|
+
|
|
2174
|
+
/** Predicate determining whether an error should be logged to the console. @keywords error console filter */
|
|
2611
2175
|
export type ErrorCenterHandlerIsConsoleCallback = (cause: ErrorCenterCauseItem) => boolean;
|
|
2612
|
-
|
|
2176
|
+
|
|
2177
|
+
/** Console logging configuration flag or dynamic predicate. @keywords error console logging */
|
|
2613
2178
|
export type ErrorCenterHandlerIsConsole = boolean | ErrorCenterHandlerIsConsoleCallback;
|
|
2614
2179
|
|
|
2180
|
+
/** Supported formatter types. @keywords formatter, types, formatting */
|
|
2615
2181
|
export declare enum FormattersType {
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2182
|
+
currency = "currency",
|
|
2183
|
+
date = "date",
|
|
2184
|
+
name = "name",
|
|
2185
|
+
number = "number",
|
|
2186
|
+
plural = "plural",
|
|
2187
|
+
unit = "unit"
|
|
2622
2188
|
}
|
|
2623
2189
|
export type FormattersOptionsCurrency = {
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2190
|
+
currencyPropName?: string;
|
|
2191
|
+
options?: string | Intl.NumberFormatOptions;
|
|
2192
|
+
numberOnly?: boolean;
|
|
2627
2193
|
};
|
|
2628
2194
|
export type FormattersOptionsDate = {
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2195
|
+
type?: GeoDate;
|
|
2196
|
+
options?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions;
|
|
2197
|
+
hour24?: boolean;
|
|
2632
2198
|
};
|
|
2633
2199
|
export type FormattersOptionsName = {
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2200
|
+
lastPropName?: string;
|
|
2201
|
+
firstPropName?: string;
|
|
2202
|
+
surname?: string;
|
|
2203
|
+
short?: boolean;
|
|
2638
2204
|
};
|
|
2639
2205
|
export type FormattersOptionsNumber = {
|
|
2640
|
-
|
|
2206
|
+
options?: Intl.NumberFormatOptions;
|
|
2641
2207
|
};
|
|
2642
2208
|
export type FormattersOptionsPlural = {
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2209
|
+
words: string;
|
|
2210
|
+
options?: Intl.PluralRulesOptions;
|
|
2211
|
+
optionsNumber?: Intl.NumberFormatOptions;
|
|
2646
2212
|
};
|
|
2647
2213
|
export type FormattersOptionsUnit = {
|
|
2648
|
-
|
|
2214
|
+
unit: string | Intl.NumberFormatOptions;
|
|
2649
2215
|
};
|
|
2216
|
+
/** Resolves option configuration type based on formatter type. @keywords options, type mapping */
|
|
2650
2217
|
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>;
|
|
2218
|
+
/** Single property formatter configuration. @keywords formatter, item, configuration */
|
|
2651
2219
|
export type FormattersOptionsItem<Type extends FormattersType = FormattersType, R = string> = {
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2220
|
+
type?: Type;
|
|
2221
|
+
transformation?: (valueOriginal: any, item: any, options?: FormattersOptionsInformation<Type>) => R;
|
|
2222
|
+
options?: FormattersOptionsInformation<Type>;
|
|
2655
2223
|
};
|
|
2656
2224
|
export type FormattersOptionsList = Record<string, FormattersOptionsItem>;
|
|
2657
2225
|
export type FormattersListItem = Record<string, any>;
|
|
2658
2226
|
export type FormattersList<Item extends FormattersListItem> = Item[];
|
|
2227
|
+
/** Capitalizes dot-notated property paths into camelCase. @keywords capitalize, path, utility */
|
|
2659
2228
|
export type FormattersCapitalize<K extends string> = K extends `${infer First}.${infer Rest}` ? `${First}${Capitalize<FormattersCapitalize<Rest>>}` : K;
|
|
2660
2229
|
export type FormattersColumns<T extends FormattersOptionsList> = (keyof T & string)[];
|
|
2661
2230
|
export type FormattersKey<K, A extends string = 'Format'> = K extends string ? `${FormattersCapitalize<K>}${A}` : never;
|
|
2231
|
+
/** Appends formatted string properties to an item type. @keywords data item, format */
|
|
2662
2232
|
export type FormattersDataItem<T extends FormattersListItem, KT extends string[]> = {
|
|
2663
|
-
|
|
2233
|
+
[K in keyof T | FormattersKey<KT[number]>]: K extends keyof T ? T[K] : string;
|
|
2664
2234
|
};
|
|
2665
2235
|
export type FormattersListFormat<T extends FormattersListItem, K extends string[]> = FormattersDataItem<T, K>[];
|
|
2666
2236
|
export type FormattersListColumnItem<T extends FormattersListItem, O extends FormattersOptionsList> = FormattersDataItem<T, FormattersColumns<O>>;
|
|
2667
2237
|
export type FormattersListColumns<T extends FormattersListItem, O extends FormattersOptionsList> = FormattersListFormat<T, FormattersColumns<O>>;
|
|
2668
2238
|
export type FormattersListProp = FormattersList<FormattersListItem> | FormattersListItem;
|
|
2669
2239
|
export type FormattersItemProp<List extends FormattersListProp> = ArrayToItem<List>;
|
|
2240
|
+
/** Resulting formatted list or item preserving input collection shape. @keywords return type, formatters */
|
|
2670
2241
|
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);
|
|
2671
|
-
|
|
2672
|
-
export declare class Formatters {
|
|
2673
|
-
/** @keywords constructor init */
|
|
2674
|
-
constructor(options: FormattersOptionsList, list: FormattersListProp);
|
|
2675
|
-
/** @keywords is list available */
|
|
2676
|
-
is(): boolean;
|
|
2677
|
-
/** @keywords check if list is array */
|
|
2678
|
-
isArray(): boolean;
|
|
2679
|
-
/** @keywords get list length */
|
|
2680
|
-
length(): number;
|
|
2681
|
-
/** @keywords get list array */
|
|
2682
|
-
getList(): FormattersListItem[];
|
|
2683
|
-
/** @keywords get options */
|
|
2684
|
-
getOptions(): FormattersOptionsList;
|
|
2685
|
-
/** @keywords set list data */
|
|
2686
|
-
setList(e: FormattersListProp): this;
|
|
2687
|
-
/** @keywords apply formatting */
|
|
2688
|
-
to(): any;
|
|
2689
|
-
/** @keywords get format data */
|
|
2690
|
-
getFormatData(e: any): Record<string, any>;
|
|
2691
|
-
/** @keywords transform value */
|
|
2692
|
-
transformation(e: any, t: any, n?: FormattersType, r?: any): any;
|
|
2693
|
-
/** @keywords format currency */
|
|
2694
|
-
formatCurrency(e: any, t: any, n?: FormattersOptionsCurrency): string;
|
|
2695
|
-
/** @keywords format date */
|
|
2696
|
-
formatDate(e: any, t?: FormattersOptionsDate): string;
|
|
2697
|
-
/** @keywords format name */
|
|
2698
|
-
formatName(e: any, t?: FormattersOptionsName): string;
|
|
2699
|
-
/** @keywords format number */
|
|
2700
|
-
formatNumber(e: any, t?: Intl.NumberFormatOptions): string;
|
|
2701
|
-
/** @keywords format plural */
|
|
2702
|
-
formatPlural(e: any, t?: FormattersOptionsPlural): string;
|
|
2703
|
-
/** @keywords format unit */
|
|
2704
|
-
formatUnit(e: any, t?: FormattersOptionsUnit): string;
|
|
2705
|
-
}
|
|
2706
|
-
|
|
2707
|
-
/** @keywords geo, date, format, types */
|
|
2242
|
+
|
|
2708
2243
|
export type GeoDate = 'full' | 'datetime' | 'date' | 'year-month' | 'year' | 'month' | 'day' | 'day-month' | 'time' | 'hour-minute' | 'hour' | 'minute' | 'second';
|
|
2709
|
-
/** @keywords geo, weekday, first, day */
|
|
2710
2244
|
export type GeoFirstDay = 1 | 6 | 0;
|
|
2711
|
-
/** @keywords geo, hours, time, format */
|
|
2712
2245
|
export type GeoHours = '12' | '24';
|
|
2713
|
-
/** @keywords geo, timezone, style, format */
|
|
2714
2246
|
export type GeoTimeZoneStyle = 'minute' | 'hour' | 'ISO8601' | 'RFC';
|
|
2715
|
-
|
|
2247
|
+
|
|
2248
|
+
/** Geographic configuration item containing country, language, and locale formatting rules @keywords geo, locale, country, language */
|
|
2716
2249
|
export interface GeoItem {
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
}
|
|
2743
|
-
|
|
2250
|
+
country: string;
|
|
2251
|
+
countryAlternative?: string[];
|
|
2252
|
+
language: string;
|
|
2253
|
+
languageAlternative?: string[];
|
|
2254
|
+
firstDay?: string | null;
|
|
2255
|
+
zone?: string | null;
|
|
2256
|
+
phoneCode?: string;
|
|
2257
|
+
phoneWithin?: string;
|
|
2258
|
+
phoneMask?: string | string[];
|
|
2259
|
+
nameFormat?: 'fl' | 'fsl' | 'lf' | 'lsf' | string;
|
|
2260
|
+
unit?: {
|
|
2261
|
+
'millimeter'?: string;
|
|
2262
|
+
'centimeter'?: string;
|
|
2263
|
+
'meter'?: string;
|
|
2264
|
+
'kilometer'?: string;
|
|
2265
|
+
'square-meter'?: string;
|
|
2266
|
+
'hectare'?: string;
|
|
2267
|
+
'gram'?: string;
|
|
2268
|
+
'kilogram'?: string;
|
|
2269
|
+
'tonne'?: string;
|
|
2270
|
+
'milliliter'?: string;
|
|
2271
|
+
'liter'?: string;
|
|
2272
|
+
'celsius'?: string;
|
|
2273
|
+
'kilometer-per-hour'?: string;
|
|
2274
|
+
};
|
|
2275
|
+
}
|
|
2276
|
+
|
|
2277
|
+
/** Extended geographic item with resolved required locale fields @keywords geo, locale, full */
|
|
2744
2278
|
export interface GeoItemFull extends Omit<GeoItem, 'firstDay'> {
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2279
|
+
standard: string;
|
|
2280
|
+
firstDay: string;
|
|
2281
|
+
location: string;
|
|
2282
|
+
locationCountry: string;
|
|
2283
|
+
locationLanguage: string;
|
|
2750
2284
|
}
|
|
2751
|
-
|
|
2285
|
+
|
|
2286
|
+
/** Geographic flag and country display metadata @keywords flag, country, language */
|
|
2752
2287
|
export interface GeoFlagItem {
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
}
|
|
2763
|
-
|
|
2288
|
+
language: string;
|
|
2289
|
+
languageCode: string;
|
|
2290
|
+
country: string;
|
|
2291
|
+
countryCode: string;
|
|
2292
|
+
standard: string;
|
|
2293
|
+
icon?: string;
|
|
2294
|
+
label: string;
|
|
2295
|
+
value: string;
|
|
2296
|
+
phoneCode?: string;
|
|
2297
|
+
}
|
|
2298
|
+
|
|
2299
|
+
/** Geographic flag item with localized native language descriptions @keywords flag, national, localized */
|
|
2764
2300
|
export interface GeoFlagNational extends GeoFlagItem {
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2301
|
+
description: string;
|
|
2302
|
+
nationalLanguage: string;
|
|
2303
|
+
nationalCountry: string;
|
|
2768
2304
|
}
|
|
2769
|
-
|
|
2305
|
+
|
|
2306
|
+
/** Country phone prefix and mask pattern metadata @keywords phone, mask, countryCode */
|
|
2770
2307
|
export interface GeoPhoneValue {
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2308
|
+
phone: number;
|
|
2309
|
+
within: number;
|
|
2310
|
+
mask: string[];
|
|
2311
|
+
value: string;
|
|
2775
2312
|
}
|
|
2776
|
-
|
|
2313
|
+
|
|
2314
|
+
/** Prefix tree node for phone code lookup and mask formatting @keywords phone, trie, prefix, mask */
|
|
2777
2315
|
export interface GeoPhoneMap {
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
}
|
|
2785
|
-
|
|
2316
|
+
items: GeoPhoneValue[];
|
|
2317
|
+
info: GeoPhoneValue | undefined;
|
|
2318
|
+
value: string | undefined;
|
|
2319
|
+
mask: string[];
|
|
2320
|
+
maskFull: string[];
|
|
2321
|
+
next: Record<string, GeoPhoneMap>;
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2324
|
+
/** Result of a phone number lookup against the prefix tree @keywords phone, lookup, result */
|
|
2786
2325
|
export interface GeoPhoneMapInfo {
|
|
2787
|
-
|
|
2788
|
-
|
|
2326
|
+
item?: GeoPhoneMap;
|
|
2327
|
+
phone?: string;
|
|
2789
2328
|
}
|
|
2790
2329
|
|
|
2791
|
-
/** Standard HTML meta tags @keywords meta_tag title description keywords robots author */
|
|
2792
2330
|
export declare enum MetaTag {
|
|
2793
|
-
/** Page title */
|
|
2794
2331
|
title = "title",
|
|
2795
|
-
/** Page description */
|
|
2796
2332
|
description = "description",
|
|
2797
|
-
/** Keywords */
|
|
2798
2333
|
keywords = "keywords",
|
|
2799
|
-
/** Canonical URL */
|
|
2800
2334
|
canonical = "canonical",
|
|
2801
|
-
/** Search engine instructions */
|
|
2802
2335
|
robots = "robots",
|
|
2803
|
-
/** Content author */
|
|
2804
2336
|
author = "author"
|
|
2805
2337
|
}
|
|
2806
|
-
|
|
2807
|
-
/** Search engine crawler directives @keywords robots_directive index follow archive snippet */
|
|
2808
2338
|
export declare enum MetaRobots {
|
|
2809
|
-
/** Allow indexing and following links */
|
|
2810
2339
|
indexFollow = "index, follow",
|
|
2811
|
-
/** Do not index the page, but follow its links */
|
|
2812
2340
|
noIndexFollow = "noindex, follow",
|
|
2813
|
-
/** Index the page, but do not follow its links */
|
|
2814
2341
|
indexNoFollow = "index, nofollow",
|
|
2815
|
-
/** Do not index the page and do not follow its links */
|
|
2816
2342
|
noIndexNoFollow = "noindex, nofollow",
|
|
2817
|
-
/** Prevent caching of the page */
|
|
2818
2343
|
noArchive = "noarchive",
|
|
2819
|
-
/** Do not show a snippet or description in search results */
|
|
2820
2344
|
noSnippet = "nosnippet",
|
|
2821
|
-
/** Do not display image preview in search results */
|
|
2822
2345
|
noImageIndex = "noimageindex",
|
|
2823
|
-
/** Allow indexing images only */
|
|
2824
2346
|
images = "images",
|
|
2825
|
-
/** Do not show cached version or translation link */
|
|
2826
2347
|
noTranslate = "notranslate",
|
|
2827
|
-
/** Prevent page being shown in preview */
|
|
2828
2348
|
noPreview = "nopreview",
|
|
2829
|
-
/** Allow only text content indexing */
|
|
2830
2349
|
textOnly = "textonly",
|
|
2831
|
-
/** Do not index subpages or parameters */
|
|
2832
2350
|
noIndexSubpages = "noindex, noarchive",
|
|
2833
|
-
/** Use meta directives from HTTP headers */
|
|
2834
2351
|
none = "none"
|
|
2835
2352
|
}
|
|
2836
|
-
|
|
2837
|
-
/** Open Graph metadata tags @keywords open_graph og_tag social_meta */
|
|
2838
2353
|
export declare enum MetaOpenGraphTag {
|
|
2839
|
-
/** Page title */
|
|
2840
2354
|
title = "og:title",
|
|
2841
|
-
/** Content type */
|
|
2842
2355
|
type = "og:type",
|
|
2843
|
-
/** Canonical URL of the page */
|
|
2844
2356
|
url = "og:url",
|
|
2845
|
-
/** Preview image URL */
|
|
2846
2357
|
image = "og:image",
|
|
2847
|
-
/** Brief page description */
|
|
2848
2358
|
description = "og:description",
|
|
2849
|
-
/** Page language */
|
|
2850
2359
|
locale = "og:locale",
|
|
2851
|
-
/** Site name */
|
|
2852
2360
|
siteName = "og:site_name",
|
|
2853
|
-
/** Alternative language versions */
|
|
2854
2361
|
localeAlternate = "og:locale:alternate",
|
|
2855
|
-
/** Alternative form of image */
|
|
2856
2362
|
imageUrl = "og:image:url",
|
|
2857
|
-
/** HTTPS version of the image */
|
|
2858
2363
|
imageSecureUrl = "og:image:secure_url",
|
|
2859
|
-
/** Image MIME type */
|
|
2860
2364
|
imageType = "og:image:type",
|
|
2861
|
-
/** Image width in pixels */
|
|
2862
2365
|
imageWidth = "og:image:width",
|
|
2863
|
-
/** Image height in pixels */
|
|
2864
2366
|
imageHeight = "og:image:height",
|
|
2865
|
-
/** Alternative image text */
|
|
2866
2367
|
imageAlt = "og:image:alt",
|
|
2867
|
-
/** Video URL */
|
|
2868
2368
|
video = "og:video",
|
|
2869
|
-
/** Alternative video URL */
|
|
2870
2369
|
videoUrl = "og:video:url",
|
|
2871
|
-
/** HTTPS version of video */
|
|
2872
2370
|
videoSecureUrl = "og:video:secure_url",
|
|
2873
|
-
/** Video MIME type */
|
|
2874
2371
|
videoType = "og:video:type",
|
|
2875
|
-
/** Video width */
|
|
2876
2372
|
videoWidth = "og:video:width",
|
|
2877
|
-
/** Video height */
|
|
2878
2373
|
videoHeight = "og:video:height",
|
|
2879
|
-
/** Audio file URL */
|
|
2880
2374
|
audio = "og:audio",
|
|
2881
|
-
/** HTTPS version of audio */
|
|
2882
2375
|
audioSecureUrl = "og:audio:secure_url",
|
|
2883
|
-
/** Audio MIME type */
|
|
2884
2376
|
audioType = "og:audio:type",
|
|
2885
|
-
/** Publication date */
|
|
2886
2377
|
articlePublishedTime = "article:published_time",
|
|
2887
|
-
/** Last update date */
|
|
2888
2378
|
articleModifiedTime = "article:modified_time",
|
|
2889
|
-
/** Expiration date */
|
|
2890
2379
|
articleExpirationTime = "article:expiration_time",
|
|
2891
|
-
/** Author */
|
|
2892
2380
|
articleAuthor = "article:author",
|
|
2893
|
-
/** Article category */
|
|
2894
2381
|
articleSection = "article:section",
|
|
2895
|
-
/** Tags or keywords */
|
|
2896
2382
|
articleTag = "article:tag",
|
|
2897
|
-
/** Book author */
|
|
2898
2383
|
bookAuthor = "book:author",
|
|
2899
|
-
/** Book ISBN */
|
|
2900
2384
|
bookIsbn = "book:isbn",
|
|
2901
|
-
/** Book publication date */
|
|
2902
2385
|
bookReleaseDate = "book:release_date",
|
|
2903
|
-
/** Topics or tags */
|
|
2904
2386
|
bookTag = "book:tag",
|
|
2905
|
-
/** Track duration in seconds */
|
|
2906
2387
|
musicDuration = "music:duration",
|
|
2907
|
-
/** Album URL */
|
|
2908
2388
|
musicAlbum = "music:album",
|
|
2909
|
-
/** Disc number */
|
|
2910
2389
|
musicAlbumDisc = "music:album:disc",
|
|
2911
|
-
/** Track number in album */
|
|
2912
2390
|
musicAlbumTrack = "music:album:track",
|
|
2913
|
-
/** Musician */
|
|
2914
2391
|
musicMusician = "music:musician",
|
|
2915
|
-
/** Song URL */
|
|
2916
2392
|
musicSong = "music:song",
|
|
2917
|
-
/** Disc number where the song is */
|
|
2918
2393
|
musicSongDisc = "music:song:disc",
|
|
2919
|
-
/** Track number in song */
|
|
2920
2394
|
musicSongTrack = "music:song:track",
|
|
2921
|
-
/** Release date */
|
|
2922
2395
|
musicReleaseDate = "music:release_date",
|
|
2923
|
-
/** Content creator */
|
|
2924
2396
|
musicCreator = "music:creator",
|
|
2925
|
-
/** Actor */
|
|
2926
2397
|
videoActor = "video:actor",
|
|
2927
|
-
/** Actor's role */
|
|
2928
2398
|
videoActorRole = "video:actor:role",
|
|
2929
|
-
/** Director */
|
|
2930
2399
|
videoDirector = "video:director",
|
|
2931
|
-
/** Screenwriter */
|
|
2932
2400
|
videoWriter = "video:writer",
|
|
2933
|
-
/** Video duration in seconds */
|
|
2934
2401
|
videoDuration = "video:duration",
|
|
2935
|
-
/** Video release date */
|
|
2936
2402
|
videoReleaseDate = "video:release_date",
|
|
2937
|
-
/** Tags or topics */
|
|
2938
2403
|
videoTag = "video:tag",
|
|
2939
|
-
/** Series to which the episode belongs */
|
|
2940
2404
|
videoSeries = "video:series",
|
|
2941
|
-
/** First name */
|
|
2942
2405
|
profileFirstName = "profile:first_name",
|
|
2943
|
-
/** Last name */
|
|
2944
2406
|
profileLastName = "profile:last_name",
|
|
2945
|
-
/** Username or login */
|
|
2946
2407
|
profileUsername = "profile:username",
|
|
2947
|
-
/** Gender */
|
|
2948
2408
|
profileGender = "profile:gender",
|
|
2949
|
-
/** Brand name */
|
|
2950
2409
|
productBrand = "product:brand",
|
|
2951
|
-
/** Product availability */
|
|
2952
2410
|
productAvailability = "product:availability",
|
|
2953
|
-
/** Product condition */
|
|
2954
2411
|
productCondition = "product:condition",
|
|
2955
|
-
/** Price amount */
|
|
2956
2412
|
productPriceAmount = "product:price:amount",
|
|
2957
|
-
/** Currency code */
|
|
2958
2413
|
productPriceCurrency = "product:price:currency",
|
|
2959
|
-
/** Internal product ID */
|
|
2960
2414
|
productRetailerItemId = "product:retailer_item_id",
|
|
2961
|
-
/** Product category */
|
|
2962
2415
|
productCategory = "product:category",
|
|
2963
|
-
/** EAN code */
|
|
2964
2416
|
productEan = "product:ean",
|
|
2965
|
-
/** ISBN if product is a book */
|
|
2966
2417
|
productIsbn = "product:isbn",
|
|
2967
|
-
/** Manufacturer part number */
|
|
2968
2418
|
productMfrPartNo = "product:mfr_part_no",
|
|
2969
|
-
/** UPC code */
|
|
2970
2419
|
productUpc = "product:upc",
|
|
2971
|
-
/** Weight value */
|
|
2972
2420
|
productWeightValue = "product:weight:value",
|
|
2973
|
-
/** Weight units */
|
|
2974
2421
|
productWeightUnits = "product:weight:units",
|
|
2975
|
-
/** Product color */
|
|
2976
2422
|
productColor = "product:color",
|
|
2977
|
-
/** Product material */
|
|
2978
2423
|
productMaterial = "product:material",
|
|
2979
|
-
/** Pattern or design */
|
|
2980
2424
|
productPattern = "product:pattern",
|
|
2981
|
-
/** Age group */
|
|
2982
2425
|
productAgeGroup = "product:age_group",
|
|
2983
|
-
/** Gender target */
|
|
2984
2426
|
productGender = "product:gender"
|
|
2985
2427
|
}
|
|
2986
|
-
|
|
2987
|
-
/** Open Graph content types @keywords og_type website article video product */
|
|
2988
2428
|
export declare enum MetaOpenGraphType {
|
|
2989
|
-
/** Regular web page or article */
|
|
2990
2429
|
website = "website",
|
|
2991
|
-
/** News article or blog post */
|
|
2992
2430
|
article = "article",
|
|
2993
|
-
/** Video content */
|
|
2994
2431
|
video = "video.other",
|
|
2995
|
-
/** Entire TV series */
|
|
2996
2432
|
videoTvShow = "video.tv_show",
|
|
2997
|
-
/** Specific TV series episode */
|
|
2998
2433
|
videoEpisode = "video.episode",
|
|
2999
|
-
/** Movie */
|
|
3000
2434
|
videoMovie = "video.movie",
|
|
3001
|
-
/** Music album */
|
|
3002
2435
|
musicAlbum = "music.album",
|
|
3003
|
-
/** Music playlist */
|
|
3004
2436
|
musicPlaylist = "music.playlist",
|
|
3005
|
-
/** Individual track or song */
|
|
3006
2437
|
musicSong = "music.song",
|
|
3007
|
-
/** Radio station or audio stream */
|
|
3008
2438
|
musicRadioStation = "music.radio_station",
|
|
3009
|
-
/** Application */
|
|
3010
2439
|
app = "app",
|
|
3011
|
-
/** Product or item */
|
|
3012
2440
|
product = "product",
|
|
3013
|
-
/** Brand, company, or organization */
|
|
3014
2441
|
business = "business.business",
|
|
3015
|
-
/** Place or geolocation */
|
|
3016
2442
|
place = "place",
|
|
3017
|
-
/** Event or meeting */
|
|
3018
2443
|
event = "event",
|
|
3019
|
-
/** User profile */
|
|
3020
2444
|
profile = "profile",
|
|
3021
|
-
/** Book page */
|
|
3022
2445
|
book = "book"
|
|
3023
2446
|
}
|
|
3024
|
-
|
|
3025
|
-
/** Product availability states @keywords availability stock preorder */
|
|
3026
2447
|
export declare enum MetaOpenGraphAvailability {
|
|
3027
|
-
/** In stock and available */
|
|
3028
2448
|
inStock = "in stock",
|
|
3029
|
-
/** Out of stock */
|
|
3030
2449
|
outOfStock = "out of stock",
|
|
3031
|
-
/** Available for pre-order */
|
|
3032
2450
|
preorder = "preorder",
|
|
3033
|
-
/** Backordered and temporarily out of stock */
|
|
3034
2451
|
backorder = "backorder",
|
|
3035
|
-
/** Discontinued and no longer available */
|
|
3036
2452
|
discontinued = "discontinued",
|
|
3037
|
-
/** Pending availability status */
|
|
3038
2453
|
pending = "pending"
|
|
3039
2454
|
}
|
|
3040
|
-
|
|
3041
|
-
/** Product condition states @keywords condition new used refurbished */
|
|
3042
2455
|
export declare enum MetaOpenGraphCondition {
|
|
3043
|
-
/** Brand new product */
|
|
3044
2456
|
new = "new",
|
|
3045
|
-
/** Used product */
|
|
3046
2457
|
used = "used",
|
|
3047
|
-
/** Refurbished product */
|
|
3048
2458
|
refurbished = "refurbished"
|
|
3049
2459
|
}
|
|
3050
|
-
|
|
3051
|
-
/** Product age groups @keywords age_group newborn infant toddler kids adult */
|
|
3052
2460
|
export declare enum MetaOpenGraphAge {
|
|
3053
|
-
/** For newborns */
|
|
3054
2461
|
newborn = "newborn",
|
|
3055
|
-
/** For infants */
|
|
3056
2462
|
infant = "infant",
|
|
3057
|
-
/** For toddlers */
|
|
3058
2463
|
toddler = "toddler",
|
|
3059
|
-
/** For kids */
|
|
3060
2464
|
kids = "kids",
|
|
3061
|
-
/** For adults */
|
|
3062
2465
|
adult = "adult"
|
|
3063
2466
|
}
|
|
3064
|
-
|
|
3065
|
-
/** Product gender categories @keywords gender female male unisex */
|
|
3066
2467
|
export declare enum MetaOpenGraphGender {
|
|
3067
|
-
/** For women */
|
|
3068
2468
|
female = "female",
|
|
3069
|
-
/** For men */
|
|
3070
2469
|
male = "male",
|
|
3071
|
-
/** Universal for everyone */
|
|
3072
2470
|
unisex = "unisex"
|
|
3073
2471
|
}
|
|
3074
|
-
|
|
3075
|
-
/** Twitter Card meta-properties @keywords twitter_tag card site creator */
|
|
3076
2472
|
export declare enum MetaTwitterTag {
|
|
3077
|
-
/** Type of card */
|
|
3078
2473
|
card = "twitter:card",
|
|
3079
|
-
/** Website or brand username */
|
|
3080
2474
|
site = "twitter:site",
|
|
3081
|
-
/** Content creator username */
|
|
3082
2475
|
creator = "twitter:creator",
|
|
3083
|
-
/** Page URL */
|
|
3084
2476
|
url = "twitter:url",
|
|
3085
|
-
/** Title of the card */
|
|
3086
2477
|
title = "twitter:title",
|
|
3087
|
-
/** Short description of the card */
|
|
3088
2478
|
description = "twitter:description",
|
|
3089
|
-
/** Main image for the card */
|
|
3090
2479
|
image = "twitter:image",
|
|
3091
|
-
/** Alternative text for the image */
|
|
3092
2480
|
imageAlt = "twitter:image:alt",
|
|
3093
|
-
/** Alternative image source */
|
|
3094
2481
|
imageSrc = "twitter:image:src",
|
|
3095
|
-
/** Image width */
|
|
3096
2482
|
imageWidth = "twitter:image:width",
|
|
3097
|
-
/** Image height */
|
|
3098
2483
|
imageHeight = "twitter:image:height",
|
|
3099
|
-
/** Custom label 1 */
|
|
3100
2484
|
label1 = "twitter:label1",
|
|
3101
|
-
/** Custom value 1 */
|
|
3102
2485
|
data1 = "twitter:data1",
|
|
3103
|
-
/** Custom label 2 */
|
|
3104
2486
|
label2 = "twitter:label2",
|
|
3105
|
-
/** Custom value 2 */
|
|
3106
2487
|
data2 = "twitter:data2",
|
|
3107
|
-
/** iPhone app name */
|
|
3108
2488
|
appNameIphone = "twitter:app:name:iphone",
|
|
3109
|
-
/** iPhone app ID */
|
|
3110
2489
|
appIdIphone = "twitter:app:id:iphone",
|
|
3111
|
-
/** iPhone app URL */
|
|
3112
2490
|
appUrlIphone = "twitter:app:url:iphone",
|
|
3113
|
-
/** iPad app name */
|
|
3114
2491
|
appNameIpad = "twitter:app:name:ipad",
|
|
3115
|
-
/** iPad app ID */
|
|
3116
2492
|
appIdIpad = "twitter:app:id:ipad",
|
|
3117
|
-
/** iPad app URL */
|
|
3118
2493
|
appUrlIpad = "twitter:app:url:ipad",
|
|
3119
|
-
/** Google Play app name */
|
|
3120
2494
|
appNameGooglePlay = "twitter:app:name:googleplay",
|
|
3121
|
-
/** Google Play app ID */
|
|
3122
2495
|
appIdGooglePlay = "twitter:app:id:googleplay",
|
|
3123
|
-
/** Google Play app URL */
|
|
3124
2496
|
appUrlGooglePlay = "twitter:app:url:googleplay",
|
|
3125
|
-
/** Player iframe URL */
|
|
3126
2497
|
player = "twitter:player",
|
|
3127
|
-
/** Player width */
|
|
3128
2498
|
playerWidth = "twitter:player:width",
|
|
3129
|
-
/** Player height */
|
|
3130
2499
|
playerHeight = "twitter:player:height",
|
|
3131
|
-
/** Direct media stream URL */
|
|
3132
2500
|
playerStream = "twitter:player:stream",
|
|
3133
|
-
/** MIME type of the media stream */
|
|
3134
2501
|
playerStreamContentType = "twitter:player:stream:content_type"
|
|
3135
2502
|
}
|
|
3136
|
-
|
|
3137
|
-
/** Twitter Card types @keywords twitter_card summary large_image app player */
|
|
3138
2503
|
export declare enum MetaTwitterCard {
|
|
3139
|
-
/** Summary card with small image */
|
|
3140
2504
|
summary = "summary",
|
|
3141
|
-
/** Summary card with large image */
|
|
3142
2505
|
summaryLargeImage = "summary_large_image",
|
|
3143
|
-
/** App card for mobile applications */
|
|
3144
2506
|
app = "app",
|
|
3145
|
-
/** Player card for rich media */
|
|
3146
2507
|
player = "player",
|
|
3147
|
-
/** Product card for e-commerce */
|
|
3148
2508
|
product = "product",
|
|
3149
|
-
/** Gallery card for multiple images */
|
|
3150
2509
|
gallery = "gallery",
|
|
3151
|
-
/** Photo card */
|
|
3152
2510
|
photo = "photo",
|
|
3153
|
-
/** Lead generation card */
|
|
3154
2511
|
leadGeneration = "lead_generation",
|
|
3155
|
-
/** Audio card */
|
|
3156
2512
|
audio = "audio",
|
|
3157
|
-
/** Poll card */
|
|
3158
2513
|
poll = "poll"
|
|
3159
2514
|
}
|
|
3160
2515
|
|
|
3161
|
-
/** Search item type @keywords search item, record */
|
|
3162
2516
|
export type SearchItem = Record<string, any>;
|
|
3163
|
-
/** Type for generating a column path @keywords search column path */
|
|
3164
2517
|
export type SearchColumnPath<K, P> = K extends string ? P extends string ? `${K}.${P}` : never : never;
|
|
3165
|
-
/**
|
|
2518
|
+
/** Resolves flat and nested dot-notated property paths for an item. @keywords search column path */
|
|
3166
2519
|
export type SearchColumn<T extends SearchItem> = {
|
|
3167
2520
|
[K in keyof T]-?: NonNullable<T[K]> extends object ? K | SearchColumnPath<K, keyof NonNullable<T[K]>> : K;
|
|
3168
2521
|
}[keyof T];
|
|
3169
|
-
/** Type for a list of columns @keywords search columns */
|
|
3170
2522
|
export type SearchColumns<T extends SearchItem> = (SearchColumn<T> & string)[];
|
|
3171
|
-
/** Type for formatting the key @keywords search format capitalize */
|
|
3172
2523
|
export type SearchFormatCapitalize<K extends string> = K extends `${infer First}.${infer Rest}` ? `${First}${Capitalize<SearchFormatCapitalize<Rest>>}` : K;
|
|
3173
|
-
/** Type for generating a search key @keywords search format key */
|
|
3174
2524
|
export type SearchFormatKey<K> = K extends string ? `${SearchFormatCapitalize<K>}Search` : never;
|
|
3175
|
-
/**
|
|
2525
|
+
/** Formats search item with search keys and active status. @keywords search format item */
|
|
3176
2526
|
export type SearchFormatItem<T extends SearchItem, KT extends string[]> = {
|
|
3177
2527
|
[K in keyof T | SearchFormatKey<KT[number]>]: K extends keyof T ? T[K] : string;
|
|
3178
2528
|
} & {
|
|
3179
2529
|
searchActive?: boolean;
|
|
3180
2530
|
};
|
|
3181
|
-
/** Type for a list of formatted search items @keywords search format list */
|
|
3182
2531
|
export type SearchFormatList<T extends SearchItem, K extends string[]> = SearchFormatItem<T, K>[];
|
|
3183
|
-
/** Search list value @keywords search list value */
|
|
3184
2532
|
export type SearchListValue<T extends SearchItem> = T[] | undefined;
|
|
3185
|
-
/** Search options @keywords search options
|
|
2533
|
+
/** Search configuration options. @keywords search options config */
|
|
3186
2534
|
export type SearchOptions = {
|
|
3187
2535
|
limit?: number;
|
|
3188
2536
|
returnEverything?: boolean;
|
|
@@ -3190,45 +2538,44 @@ export type SearchOptions = {
|
|
|
3190
2538
|
findExactMatch?: boolean;
|
|
3191
2539
|
classSearchName?: string;
|
|
3192
2540
|
};
|
|
3193
|
-
/** Search cache item @keywords search cache item */
|
|
3194
2541
|
export type SearchCacheItem<T extends SearchItem> = {
|
|
3195
2542
|
item: T;
|
|
3196
2543
|
value: string;
|
|
3197
2544
|
};
|
|
3198
|
-
/** Search cache list @keywords search cache */
|
|
3199
2545
|
export type SearchCache<T extends SearchItem> = SearchCacheItem<T>[];
|
|
3200
|
-
/** Highlight match item type @keywords highlight match item */
|
|
3201
2546
|
export type HighlightMatchItem = {
|
|
3202
2547
|
text: string;
|
|
3203
2548
|
isMatch: boolean;
|
|
3204
2549
|
};
|
|
3205
2550
|
|
|
3206
|
-
/** Sort direction @keywords sort direction asc desc */
|
|
3207
2551
|
export type SortDir = 'asc' | 'desc';
|
|
3208
|
-
/** Single column sorting specification item @keywords sort column item */
|
|
3209
2552
|
export type SortColumnItem = {
|
|
3210
|
-
/** Column or property key for sorting @keywords sort column property */
|
|
3211
2553
|
column?: string;
|
|
3212
|
-
/** Sorting direction @keywords sort dir */
|
|
3213
2554
|
dir?: SortDir;
|
|
3214
2555
|
};
|
|
3215
|
-
/** Custom
|
|
2556
|
+
/** Custom comparison function for sorting items. @keywords sort, comparator, order */
|
|
3216
2557
|
export type SortFunction<T = any> = (a: T, b: T, column?: string, dir?: SortDir) => number;
|
|
3217
2558
|
|
|
2559
|
+
/** Translation plugin configuration options @keywords i18n, translate, config, options */
|
|
3218
2560
|
export type TranslateConfig = {
|
|
3219
2561
|
url?: string;
|
|
3220
2562
|
propsName?: string;
|
|
3221
2563
|
readApi?: boolean;
|
|
3222
2564
|
};
|
|
2565
|
+
/** Translation code or list of translation codes @keywords i18n, key, code */
|
|
3223
2566
|
export type TranslateCode = string | string[];
|
|
2567
|
+
/** Map of translation keys to resolved translated strings @keywords i18n, list, dictionary */
|
|
3224
2568
|
export type TranslateList<T extends TranslateCode[]> = {
|
|
3225
2569
|
[K in T[number] as K extends readonly string[] ? K[0] : K]: string;
|
|
3226
2570
|
};
|
|
2571
|
+
/** Conditional translation result resolving to an object for multiple keys or a string for single key @keywords i18n, translate, resolver */
|
|
3227
2572
|
export type TranslateItemOrList<T extends TranslateCode> = T extends string[] ? TranslateList<T> : string;
|
|
3228
2573
|
export type TranslateDataFileList = Record<string, string>;
|
|
2574
|
+
/** Asynchronous loader function for translation data @keywords i18n, loader, async */
|
|
3229
2575
|
export type TranslateDataFileItem = () => Promise<TranslateDataFileList>;
|
|
2576
|
+
/** Mapping of locale identifiers to translation file loaders @keywords i18n, locale, dictionary */
|
|
3230
2577
|
export type TranslateDataFile = Record<string, TranslateDataFileItem>;
|
|
3231
|
-
/**
|
|
2578
|
+
/** Prefix identifier for global translations @keywords i18n, global, prefix */
|
|
3232
2579
|
export declare const TRANSLATE_GLOBAL_PREFIX = "global";
|
|
3233
|
-
/**
|
|
2580
|
+
/** Batch loading request timeout in milliseconds @keywords i18n, timeout, batch */
|
|
3234
2581
|
export declare const TRANSLATE_TIME_OUT = 160;
|