@dxtmisha/functional-basic 1.8.10 → 1.10.0
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 +21 -0
- package/ai-description.md +7 -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 +1 -3233
- 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,3234 +1,2 @@
|
|
|
1
|
-
All these methods are in the @dxtmisha/functional-basic (v1.
|
|
1
|
+
All these methods are in the @dxtmisha/functional-basic (v1.10.0) library.
|
|
2
2
|
|
|
3
|
-
/** Check if server runs on localhost @keywords api, localhost */
|
|
4
|
-
export declare class Api {
|
|
5
|
-
/** Check if server is running on localhost. @keywords api, localhost */
|
|
6
|
-
static isLocalhost(): boolean;
|
|
7
|
-
/** Get ApiInstance singleton. @keywords api, instance */
|
|
8
|
-
static getItem(): ApiInstance;
|
|
9
|
-
/** Get last request status. @keywords api, status */
|
|
10
|
-
static getStatus(): ApiStatus;
|
|
11
|
-
/** Get response handler. @keywords api, response */
|
|
12
|
-
static getResponse(): ApiResponse;
|
|
13
|
-
/** Get hydration handler. @keywords api, hydration */
|
|
14
|
-
static getHydration(): ApiHydration;
|
|
15
|
-
/** Get hydration data script string. @keywords api, hydration, script */
|
|
16
|
-
static getHydrationScript(): string;
|
|
17
|
-
/** Get base origin URL. @keywords api, origin, url */
|
|
18
|
-
static getOrigin(): string;
|
|
19
|
-
/** Get full request URL. @keywords api, url */
|
|
20
|
-
static getUrl(path: string, api?: boolean): string;
|
|
21
|
-
/** Get request body data. @keywords api, body, request */
|
|
22
|
-
static getBody(request?: ApiFetch['request'], method?: ApiMethodItem): string | FormData | undefined;
|
|
23
|
-
/** Get query string for GET requests. @keywords api, query, get */
|
|
24
|
-
static getBodyForGet(request: ApiFetch['request'], path?: string, method?: ApiMethodItem): string;
|
|
25
|
-
/** Set default headers. @keywords api, headers */
|
|
26
|
-
static setHeaders(headers: ApiHeadersValue): void;
|
|
27
|
-
/** Set default request data. @keywords api, request, default */
|
|
28
|
-
static setRequestDefault(request: ApiDefaultValue): void;
|
|
29
|
-
/** Set base URL. @keywords api, url */
|
|
30
|
-
static setUrl(url: string): void;
|
|
31
|
-
/** Set preparation callback. @keywords api, preparation */
|
|
32
|
-
static setPreparation(callback: (apiFetch: ApiFetch) => Promise<void>): void;
|
|
33
|
-
/** Set end callback. @keywords api, end */
|
|
34
|
-
static setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): void;
|
|
35
|
-
/** Set request timeout. @keywords api, timeout */
|
|
36
|
-
static setTimeout(timeout: number): void;
|
|
37
|
-
/** Set base origin. @keywords api, origin */
|
|
38
|
-
static setOrigin(origin: string): void;
|
|
39
|
-
/** Set request wrapper function. @keywords api, wrapper */
|
|
40
|
-
static setWrapper(wrapper: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>): void;
|
|
41
|
-
/** Set API configuration. @keywords api, config */
|
|
42
|
-
static setConfig(config?: ApiConfig): void;
|
|
43
|
-
/** Execute HTTP request. @keywords api, request */
|
|
44
|
-
static request<T>(pathRequest: string | ApiFetch): Promise<T>;
|
|
45
|
-
/** Execute GET request. @keywords api, get, request */
|
|
46
|
-
static get<T>(request: ApiFetch): Promise<T>;
|
|
47
|
-
/** Execute POST request. @keywords api, post, request */
|
|
48
|
-
static post<T>(request: ApiFetch): Promise<T>;
|
|
49
|
-
/** Execute PUT request. @keywords api, put, request */
|
|
50
|
-
static put<T>(request: ApiFetch): Promise<T>;
|
|
51
|
-
/** Execute PATCH request. @keywords api, patch, request */
|
|
52
|
-
static patch<T>(request: ApiFetch): Promise<T>;
|
|
53
|
-
/** Execute DELETE request. @keywords api, delete, request */
|
|
54
|
-
static delete<T>(request: ApiFetch): Promise<T>;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/** Manages API response caching. @keywords api cache storage */
|
|
58
|
-
export declare class ApiCache {
|
|
59
|
-
/** Initializes storage with custom listeners and options. @keywords init listeners */
|
|
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 */
|
|
62
|
-
static reset(): void;
|
|
63
|
-
/** Gets data from cache by key. @keywords get cache */
|
|
64
|
-
static get<T>(key: string): Promise<T | undefined>;
|
|
65
|
-
/** Gets data from cache using fetch options. @keywords fetch cache */
|
|
66
|
-
static getByFetch<T>(fetch: ApiFetch): Promise<T | undefined>;
|
|
67
|
-
/** Saves data to cache by key. @keywords set cache */
|
|
68
|
-
static set<T>(key: string, value: T, age?: number): Promise<void>;
|
|
69
|
-
/** Saves data to cache using fetch options. @keywords set fetch cache */
|
|
70
|
-
static setByFetch<T>(fetch: ApiFetch, value: T): Promise<void>;
|
|
71
|
-
/** Removes data from cache by key. @keywords remove cache */
|
|
72
|
-
static remove(key: string): Promise<void>;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/** Processes and formats API response data @keywords api, response, data, transform */
|
|
76
|
-
export declare class ApiDataReturn<T = any> {
|
|
77
|
-
/** Creates ApiDataReturn instance @keywords constructor, api */
|
|
78
|
-
constructor(apiFetch: ApiFetch, query: Response, end: ApiPreparationEnd, error?: ApiErrorItem | undefined);
|
|
79
|
-
/** Initializes response data @keywords init, parse */
|
|
80
|
-
init(): Promise<this>;
|
|
81
|
-
/** Returns processed data @keywords get, data */
|
|
82
|
-
get(): ApiData<T>;
|
|
83
|
-
/** Returns processed data with status object @keywords get, status */
|
|
84
|
-
getAndStatus(status: ApiStatus): ApiData<T>;
|
|
85
|
-
/** Returns raw API data @keywords get, raw, data */
|
|
86
|
-
getData(): ApiData<T> | undefined;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/** Manages default request data and parameters. @keywords api default request parameters */
|
|
90
|
-
export declare class ApiDefault {
|
|
91
|
-
/** Checks if default request data is defined. @keywords api check default */
|
|
92
|
-
is(): boolean;
|
|
93
|
-
/** Gets default request data. @keywords api get default */
|
|
94
|
-
get(): Record<string, any> | undefined;
|
|
95
|
-
/** Merges default data into request. @keywords api request merge */
|
|
96
|
-
request(request: ApiFetch['request']): ApiFetch['request'];
|
|
97
|
-
/** Sets default request data. @keywords api set default */
|
|
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
|
-
}
|
|
102
|
-
|
|
103
|
-
/** Manages API error storage and error items. @keywords api error storage handler */
|
|
104
|
-
export declare class ApiError {
|
|
105
|
-
/** Gets the API error storage instance. @keywords get storage error */
|
|
106
|
-
static getStorage(): ApiErrorStorage;
|
|
107
|
-
/** Adds error items to storage. @keywords add error item */
|
|
108
|
-
static add(item: Partial<ApiErrorStorageItem> | Partial<ApiErrorStorageItem>[], url?: string | RegExp, method?: ApiMethodItem): void;
|
|
109
|
-
/** Gets structured error item from response. @keywords get error item response */
|
|
110
|
-
static getItem(method: ApiMethodItem, response: Response): Promise<ApiErrorItem>;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/** Retrieves or manages API error response details. @keywords api error item response status */
|
|
114
|
-
export declare class ApiErrorItem {
|
|
115
|
-
/** Creates an instance of ApiErrorItem. @keywords create constructor api error item */
|
|
116
|
-
constructor(method: ApiMethodItem, response: Response, error: ApiErrorStorageItem);
|
|
117
|
-
/** Gets the HTTP request method. @keywords get method http */
|
|
118
|
-
getMethod(): ApiMethodItem;
|
|
119
|
-
/** Gets the raw fetch response object. @keywords get response fetch */
|
|
120
|
-
getResponse(): Response;
|
|
121
|
-
/** Gets the matched error storage item. @keywords get error storage item */
|
|
122
|
-
getError(): ApiErrorStorageItem;
|
|
123
|
-
/** Gets the error code. @keywords get error code */
|
|
124
|
-
getCode(): string | undefined;
|
|
125
|
-
/** Gets the error message. @keywords get error message */
|
|
126
|
-
getMessage(): string | undefined;
|
|
127
|
-
/** Gets the HTTP response status code. @keywords get status code */
|
|
128
|
-
getStatus(): number;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/** Manager for handling and identifying API error states @keywords api error storage matcher */
|
|
132
|
-
export declare class ApiErrorStorage {
|
|
133
|
-
/** Finds a matching error item in the storage by analyzing the response @keywords find api error */
|
|
134
|
-
find(method: ApiMethodItem, response: Response): Promise<ApiErrorStorageItem>;
|
|
135
|
-
/** Adds error items or lists to internal storage @keywords add api error */
|
|
136
|
-
add(item: Partial<ApiErrorStorageItem> | Partial<ApiErrorStorageItem>[], url?: string | RegExp, method?: ApiMethodItem): this;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Manages HTTP request headers.
|
|
141
|
-
* @keywords api headers request content-type
|
|
142
|
-
*/
|
|
143
|
-
export declare class ApiHeaders {
|
|
144
|
-
/**
|
|
145
|
-
* Retrieves request headers.
|
|
146
|
-
* @keywords get headers content-type
|
|
147
|
-
*/
|
|
148
|
-
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
|
-
*/
|
|
153
|
-
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
|
-
*/
|
|
158
|
-
set(headers: ApiHeadersValue): this;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Manages API response hydration for server-side rendering (SSR).
|
|
163
|
-
* @keywords api, hydration, ssr, client, cache
|
|
164
|
-
*/
|
|
165
|
-
export declare class ApiHydration {
|
|
166
|
-
/**
|
|
167
|
-
* Initializes response collection from client data.
|
|
168
|
-
* @keywords init, response, hydration
|
|
169
|
-
*/
|
|
170
|
-
initResponse(response: ApiResponse): void;
|
|
171
|
-
/**
|
|
172
|
-
* Stores API fetch and response pair for client hydration.
|
|
173
|
-
* @keywords to, client, hydration, save
|
|
174
|
-
*/
|
|
175
|
-
toClient<T>(apiFetch: ApiFetch, response: T): void;
|
|
176
|
-
/**
|
|
177
|
-
* Serializes hydration data into a script string.
|
|
178
|
-
* @keywords to, string, serialize, html
|
|
179
|
-
*/
|
|
180
|
-
toString(): string;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/** Options for the API instance @keywords api,options,config */
|
|
184
|
-
export type ApiInstanceOptions = {
|
|
185
|
-
headersClass?: typeof ApiHeaders;
|
|
186
|
-
requestDefaultClass?: typeof ApiDefault;
|
|
187
|
-
statusClass?: typeof ApiStatus;
|
|
188
|
-
responseClass?: typeof ApiResponse;
|
|
189
|
-
preparationClass?: typeof ApiPreparation;
|
|
190
|
-
loadingClass?: LoadingInstance;
|
|
191
|
-
errorCenterClass?: ErrorCenterInstance;
|
|
192
|
-
hydrationClass?: typeof ApiHydration;
|
|
193
|
-
wrapper?: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>;
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
/** Core class for managing HTTP requests using the Fetch API. @keywords api,client,fetch,request */
|
|
197
|
-
export declare class ApiInstance {
|
|
198
|
-
protected wrapper?: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>;
|
|
199
|
-
/** @keywords constructor,init */
|
|
200
|
-
constructor(url?: string, options?: ApiInstanceOptions);
|
|
201
|
-
/** Checks if the server is running on localhost. @keywords localhost,env */
|
|
202
|
-
isLocalhost(): boolean;
|
|
203
|
-
/** Returns the status of the last request. @keywords status,state */
|
|
204
|
-
getStatus(): ApiStatus;
|
|
205
|
-
/** Gets the response handler. @keywords response,handler */
|
|
206
|
-
getResponse(): ApiResponse;
|
|
207
|
-
/** Gets the hydration handler. @keywords hydration,ssr */
|
|
208
|
-
getHydration(): ApiHydration;
|
|
209
|
-
/** Gets the base origin URL combined with the API path. @keywords origin,url */
|
|
210
|
-
getOrigin(): string;
|
|
211
|
-
/** Gets the full path to the request script. @keywords url,path */
|
|
212
|
-
getUrl(path: string, api?: boolean): string;
|
|
213
|
-
/** Gets data for the request body. @keywords body,payload */
|
|
214
|
-
getBody(request?: ApiFetch['request'], method?: ApiMethod): string | FormData | undefined;
|
|
215
|
-
/** Gets query string for GET method requests. @keywords query,params,get */
|
|
216
|
-
getBodyForGet(request: ApiFetch['request'], path?: string, method?: ApiMethod): string;
|
|
217
|
-
/** Returns a string representation of the hydration data for the client. @keywords hydration,script */
|
|
218
|
-
getHydrationScript(): string;
|
|
219
|
-
/** Modifies the default header data. @keywords headers,config */
|
|
220
|
-
setHeaders(headers: ApiHeadersValue): this;
|
|
221
|
-
/** Modifies the default request data. @keywords request,default */
|
|
222
|
-
setRequestDefault(request: ApiDefaultValue): this;
|
|
223
|
-
/** Changes the base path to the script. @keywords url,base */
|
|
224
|
-
setUrl(url: string): this;
|
|
225
|
-
/** Modifies the function to be called before the request. @keywords preparation,hook */
|
|
226
|
-
setPreparation(callback: (apiFetch: ApiFetch) => Promise<void>): this;
|
|
227
|
-
/** Modifies the function to be called after the request. @keywords end,hook */
|
|
228
|
-
setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): this;
|
|
229
|
-
/** Changes the timeout for the request in milliseconds. @keywords timeout,delay */
|
|
230
|
-
setTimeout(timeout: number): this;
|
|
231
|
-
/** Changes the origin (protocol and domain) for the base URL. @keywords origin,domain */
|
|
232
|
-
setOrigin(origin: string): this;
|
|
233
|
-
/** Sets the wrapper function for requests. @keywords wrapper,middleware */
|
|
234
|
-
setWrapper(wrapper: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>): this;
|
|
235
|
-
/** Executes a request with the given path or configuration. @keywords request,fetch */
|
|
236
|
-
request<T>(pathRequest: string | ApiFetch): Promise<T>;
|
|
237
|
-
/** Sends a GET method request. @keywords get,request */
|
|
238
|
-
get<T>(request: ApiFetch): Promise<T>;
|
|
239
|
-
/** Sends a POST method request. @keywords post,request */
|
|
240
|
-
post<T>(request: ApiFetch): Promise<T>;
|
|
241
|
-
/** Sends a PUT method request. @keywords put,request */
|
|
242
|
-
put<T>(request: ApiFetch): Promise<T>;
|
|
243
|
-
/** Sends a PATCH method request. @keywords patch,request */
|
|
244
|
-
patch<T>(request: ApiFetch): Promise<T>;
|
|
245
|
-
/** Sends a DELETE method request. @keywords delete,request */
|
|
246
|
-
delete<T>(request: ApiFetch): Promise<T>;
|
|
247
|
-
/** Gets retry delay with jitter. @keywords retry,delay */
|
|
248
|
-
protected getRetryDelay(retryCount: number, retryDelay: number): number;
|
|
249
|
-
/** Execute API request with retry support. @keywords fetch,retry */
|
|
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 */
|
|
267
|
-
export declare class ApiPreparation {
|
|
268
|
-
/** Executes preparation before the request. @keywords api, make, preparation */
|
|
269
|
-
make(active: boolean, apiFetch: ApiFetch): Promise<void>;
|
|
270
|
-
/** Analyzes the request after execution. @keywords api, makeEnd, response */
|
|
271
|
-
makeEnd(active: boolean, query: Response, apiFetch: ApiFetch): Promise<ApiPreparationEnd>;
|
|
272
|
-
/** Modifies the function to be called before the request. @keywords api, set, callback */
|
|
273
|
-
set(callback: (apiFetch: ApiFetch) => Promise<void>): this;
|
|
274
|
-
/** Modifies the function to be called after the request. @keywords api, setEnd, callback */
|
|
275
|
-
setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): this;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
/** Class for working with API responses. @keywords api, response, emulator */
|
|
279
|
-
export declare class ApiResponse {
|
|
280
|
-
/** Constructor @keywords constructor */
|
|
281
|
-
constructor(requestDefault: ApiDefault);
|
|
282
|
-
/** Checks for global cached request and returns it if found. @keywords get, cache, response */
|
|
283
|
-
get(path: string | undefined, method: ApiMethod, request?: ApiFetch['request'], devMode?: boolean): ApiResponseItem | undefined;
|
|
284
|
-
/** Returns list of cached API responses excluding global ones. @keywords list, cache, response */
|
|
285
|
-
getList(): (ApiResponseItem & Record<string, any>)[];
|
|
286
|
-
/** Adds cached requests. @keywords add, cache, response */
|
|
287
|
-
add(response: ApiResponseItem | ApiResponseItem[]): this;
|
|
288
|
-
/** Sets developer mode flag. @keywords set, devMode, developer */
|
|
289
|
-
setDevMode(devMode: boolean): this;
|
|
290
|
-
/** Executes emulator if available. @keywords emulator, fetch, async */
|
|
291
|
-
emulator<T>(apiFetch: ApiFetch): Promise<T | undefined>;
|
|
292
|
-
/** Executes emulator synchronously if available. @keywords emulator, sync, fetch */
|
|
293
|
-
emulatorAsync<T>(apiFetch: ApiFetch): T | undefined;
|
|
294
|
-
/** Checks if cached item is disabled. @keywords check, disable, item */
|
|
295
|
-
protected isDisable(item: ApiResponseItem): boolean;
|
|
296
|
-
/** Checks if path matches cached one. @keywords check, path, match */
|
|
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 */
|
|
320
|
-
export declare class ApiStatus {
|
|
321
|
-
/** Gets the current API status data. @keywords get status */
|
|
322
|
-
get(): ApiStatusItem | undefined;
|
|
323
|
-
/** Gets the HTTP response status code. @keywords get status code */
|
|
324
|
-
getStatus(): number | undefined;
|
|
325
|
-
/** Gets the HTTP response status text. @keywords get status text */
|
|
326
|
-
getStatusText(): string | undefined;
|
|
327
|
-
/** Gets the last status type. @keywords get status type */
|
|
328
|
-
getStatusType(): ApiStatusType | undefined;
|
|
329
|
-
/** Gets the last error code. @keywords get code */
|
|
330
|
-
getCode(): string | undefined;
|
|
331
|
-
/** Gets the current error string. @keywords get error */
|
|
332
|
-
getError(): string | undefined;
|
|
333
|
-
/** Gets the last response data payload. @keywords get response data */
|
|
334
|
-
getResponse<T>(): T | undefined;
|
|
335
|
-
/** Gets the last response message string. @keywords get message */
|
|
336
|
-
getMessage(): string;
|
|
337
|
-
/** Sets full status data object. @keywords set status data */
|
|
338
|
-
set(data: ApiStatusItem): this;
|
|
339
|
-
/** Sets HTTP status code and optional text. @keywords set status */
|
|
340
|
-
setStatus(status?: number, statusText?: string): this;
|
|
341
|
-
/** Sets the error message state. @keywords set error */
|
|
342
|
-
setError(error?: string): this;
|
|
343
|
-
/** Sets the last response and extracts metadata. @keywords set last response */
|
|
344
|
-
setLastResponse(response?: any): this;
|
|
345
|
-
/** Sets the last status type. @keywords set last status */
|
|
346
|
-
setLastStatus(status?: ApiStatusType): this;
|
|
347
|
-
/** Sets the last execution code. @keywords set last code */
|
|
348
|
-
setLastCode(code?: string): this;
|
|
349
|
-
/** Sets the last response message. @keywords set last message */
|
|
350
|
-
setLastMessage(message?: string): this;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
/** BroadcastChannel message handler utility @keywords broadcast, channel, message, worker */
|
|
354
|
-
export declare class BroadcastMessage<Message = any> {
|
|
355
|
-
/** @keywords constructor, init, channel */
|
|
356
|
-
constructor(name: string, callback?: ((event: MessageEvent<Message>) => void) | undefined, callbackError?: ((event: MessageEvent<Message>) => void) | undefined, errorCenter?: ErrorCenterInstance);
|
|
357
|
-
/** Gets the underlying BroadcastChannel instance @keywords get, channel, broadcast */
|
|
358
|
-
getChannel(): BroadcastChannel | undefined;
|
|
359
|
-
/** Posts a message to the channel @keywords post, send, message */
|
|
360
|
-
post(message: Message): this;
|
|
361
|
-
/** Sets the message reception callback @keywords set, callback, message */
|
|
362
|
-
setCallback(callback: (event: MessageEvent<Message>) => void): this;
|
|
363
|
-
/** Sets the message error callback @keywords set, callback, error */
|
|
364
|
-
setCallbackError(callbackError: (event: MessageEvent<Message>) => void): this;
|
|
365
|
-
/** Destroys the channel connection @keywords destroy, close, channel */
|
|
366
|
-
destroy(): this;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
/** Simple in-memory cache class for computed values @keywords cache, memory, compute */
|
|
370
|
-
export declare class Cache {
|
|
371
|
-
/** Gets cached value or computes and stores it @keywords get, cache, value */
|
|
372
|
-
get<T>(name: string, callback: () => T, comparison?: any[]): T;
|
|
373
|
-
/** Asynchronously gets cached value or computes and stores it @keywords get, async, cache */
|
|
374
|
-
getAsync<T>(name: string, callback: () => T, comparison?: any[]): Promise<T>;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
/** Manages cached value with dependency tracking @keywords cache, item, memory, memoize */
|
|
378
|
-
export declare class CacheItem<T> {
|
|
379
|
-
/** Creates a CacheItem instance @keywords constructor, create */
|
|
380
|
-
constructor(callback: () => T);
|
|
381
|
-
/** Gets cached value, recomputing if dependencies change @keywords get, cache, memoize */
|
|
382
|
-
getCache(comparison: any[]): T;
|
|
383
|
-
/** Gets previous cached value before last update @keywords get, cache, old, previous */
|
|
384
|
-
getCacheOld(): T | undefined;
|
|
385
|
-
/** Asynchronously gets cached value, recomputing if dependencies change @keywords get, cache, async */
|
|
386
|
-
getCacheAsync(comparison: any[]): Promise<T>;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
/** Static cache class using ServerStorage. @keywords cache static storage */
|
|
390
|
-
export declare class CacheStatic {
|
|
391
|
-
/** Retrieves the Cache instance. @keywords get item storage */
|
|
392
|
-
protected static getItem(): Cache;
|
|
393
|
-
/** Returns cached value or computes it via callback. @keywords get cache value */
|
|
394
|
-
static get<T>(name: string, callback: () => T, comparison?: any[]): T;
|
|
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>;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
/** Cookie options definition @keywords cookie_options, options */
|
|
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 */
|
|
420
|
-
export declare class Cookie<T> {
|
|
421
|
-
/** Cookie value @keywords value */
|
|
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 */
|
|
428
|
-
static getInstance<T>(name: string): Cookie<T>;
|
|
429
|
-
/** Creates a cookie instance @keywords constructor, cookie */
|
|
430
|
-
constructor(name: string);
|
|
431
|
-
/** Gets cookie data or sets default value if undefined @keywords get, cookie */
|
|
432
|
-
get(defaultValue?: T | string | (() => (T | string)), options?: CookieOptions): string | T | undefined;
|
|
433
|
-
/** Sets cookie value and options @keywords set, cookie */
|
|
434
|
-
set(value?: T | string | (() => (T | string)), options?: CookieOptions): void;
|
|
435
|
-
/** Removes the cookie @keywords remove, delete, cookie */
|
|
436
|
-
remove(): void;
|
|
437
|
-
/** Updates the cookie with current value and options @keywords update, cookie */
|
|
438
|
-
update(): void;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
/** Class for changing cookie access status. @keywords cookie, block, status */
|
|
442
|
-
export declare class CookieBlock {
|
|
443
|
-
/** Returns a request-isolated instance of CookieBlockInstance. @keywords instance, get, item */
|
|
444
|
-
static getItem(): CookieBlockInstance;
|
|
445
|
-
/** Obtaining status. @keywords get, status, blocked */
|
|
446
|
-
static get(): boolean;
|
|
447
|
-
/** Changing status. @keywords set, status, block */
|
|
448
|
-
static set(value: boolean): void;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
/** Cookie block instance class @keywords cookie, block, status */
|
|
452
|
-
export declare class CookieBlockInstance {
|
|
453
|
-
/** Gets cookie block status @keywords get, cookie, block */
|
|
454
|
-
get(): boolean;
|
|
455
|
-
/** Sets cookie block status @keywords set, cookie, block */
|
|
456
|
-
set(value: boolean): void;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
export type CookieSameSite = 'strict' | 'lax';
|
|
460
|
-
|
|
461
|
-
export type CookieOptions = {
|
|
462
|
-
age?: number;
|
|
463
|
-
sameSite?: CookieSameSite;
|
|
464
|
-
path?: string;
|
|
465
|
-
domain?: string;
|
|
466
|
-
secure?: boolean;
|
|
467
|
-
httpOnly?: boolean;
|
|
468
|
-
partitioned?: boolean;
|
|
469
|
-
arguments?: string[] | Record<string, string | number | boolean>;
|
|
470
|
-
};
|
|
471
|
-
|
|
472
|
-
/**
|
|
473
|
-
* Cookie storage management class with DOM and SSR support.
|
|
474
|
-
* @keywords cookie storage manager web storage
|
|
475
|
-
*/
|
|
476
|
-
export declare class CookieStorage {
|
|
477
|
-
protected static getListener?: (key: string) => any | undefined;
|
|
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
|
-
*/
|
|
485
|
-
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
|
-
*/
|
|
491
|
-
static reset(): void;
|
|
492
|
-
|
|
493
|
-
/**
|
|
494
|
-
* Gets cookie value by name.
|
|
495
|
-
* @keywords cookie get value
|
|
496
|
-
*/
|
|
497
|
-
static get<T>(name: string, defaultValue?: T | (() => T)): T | undefined;
|
|
498
|
-
|
|
499
|
-
/**
|
|
500
|
-
* Sets cookie value.
|
|
501
|
-
* @keywords cookie set value
|
|
502
|
-
*/
|
|
503
|
-
static set<T>(name: string, value: T | (() => T), options?: CookieOptions): T;
|
|
504
|
-
|
|
505
|
-
/**
|
|
506
|
-
* Removes cookie by name.
|
|
507
|
-
* @keywords cookie remove delete
|
|
508
|
-
*/
|
|
509
|
-
static remove(name: string): void;
|
|
510
|
-
|
|
511
|
-
/**
|
|
512
|
-
* Updates cookies from DOM.
|
|
513
|
-
* @keywords cookie update
|
|
514
|
-
*/
|
|
515
|
-
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
|
-
}
|
|
541
|
-
|
|
542
|
-
/** Class for managing localStorage and sessionStorage with prefix, expiration, and SSR isolation support. @keywords storage local session cache */
|
|
543
|
-
export declare class DataStorage<T> {
|
|
544
|
-
/** Sets a custom prefix for storage keys. @keywords prefix key */
|
|
545
|
-
static setPrefix(newPrefix: string): void;
|
|
546
|
-
/** Initializes a storage instance. @keywords constructor storage */
|
|
547
|
-
constructor(name: string, isSession?: boolean, errorCenter?: ErrorCenterInstance);
|
|
548
|
-
/** Retrieves value from storage with optional cache duration and default fallback. @keywords get read storage */
|
|
549
|
-
get(defaultValue?: T | (() => T), cache?: number): T | undefined;
|
|
550
|
-
/** Sets a value in storage. @keywords set write storage */
|
|
551
|
-
set(value?: T | (() => T)): T | undefined;
|
|
552
|
-
/** Removes the item from storage. @keywords remove delete storage */
|
|
553
|
-
remove(): this;
|
|
554
|
-
/** Updates or reloads storage data. @keywords update refresh storage */
|
|
555
|
-
update(): this;
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
/**
|
|
559
|
-
* A class for working with dates.
|
|
560
|
-
* @keywords date datetime calendar timezone format
|
|
561
|
-
*/
|
|
562
|
-
export declare class Datetime {
|
|
563
|
-
protected watch?: (date: Date, type: GeoDate, hour24: boolean) => void;
|
|
564
|
-
constructor(date?: NumberOrStringOrDate, type?: GeoDate, code?: string);
|
|
565
|
-
/** Returns an object for working with formatting. */
|
|
566
|
-
getIntl(): GeoIntl;
|
|
567
|
-
/** Returns a Date object. */
|
|
568
|
-
getDate(): Date;
|
|
569
|
-
/** Returns the type of data output. */
|
|
570
|
-
getType(): GeoDate;
|
|
571
|
-
/** Returns the format of hours. */
|
|
572
|
-
getHoursType(): GeoHours;
|
|
573
|
-
/** Whether to use 24-hour time format. */
|
|
574
|
-
getHour24(): boolean;
|
|
575
|
-
/** Returns the time zone offset in minutes. */
|
|
576
|
-
getTimeZoneOffset(): number;
|
|
577
|
-
/** Returns the time zone as a string. */
|
|
578
|
-
getTimeZone(style?: GeoTimeZoneStyle): string;
|
|
579
|
-
/** Returns the code of the first day of the week. */
|
|
580
|
-
getFirstDayCode(): GeoFirstDay;
|
|
581
|
-
/** Returns the year of the specified date. */
|
|
582
|
-
getYear(): number;
|
|
583
|
-
/** Returns the month of the specified date (1-12). */
|
|
584
|
-
getMonth(): number;
|
|
585
|
-
/** Returns the day of the month (1-31). */
|
|
586
|
-
getDay(): number;
|
|
587
|
-
/** Returns the hour (0-23). */
|
|
588
|
-
getHour(): number;
|
|
589
|
-
/** Returns the minutes (0-59). */
|
|
590
|
-
getMinute(): number;
|
|
591
|
-
/** Returns the seconds (0-59). */
|
|
592
|
-
getSecond(): number;
|
|
593
|
-
/** Returns the last day of the month (28-31). */
|
|
594
|
-
getMaxDay(): number;
|
|
595
|
-
/** Formats date and time according to locale. */
|
|
596
|
-
locale(type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions): string;
|
|
597
|
-
/** Returns the formatted year. */
|
|
598
|
-
localeYear(style?: Intl.DateTimeFormatOptions['year']): string;
|
|
599
|
-
/** Returns the formatted month. */
|
|
600
|
-
localeMonth(style?: Intl.DateTimeFormatOptions['month']): string;
|
|
601
|
-
/** Returns the formatted day. */
|
|
602
|
-
localeDay(style?: Intl.DateTimeFormatOptions['day']): string;
|
|
603
|
-
/** Returns the formatted hour. */
|
|
604
|
-
localeHour(style?: Intl.DateTimeFormatOptions['hour']): string;
|
|
605
|
-
/** Returns the formatted minute. */
|
|
606
|
-
localeMinute(style?: Intl.DateTimeFormatOptions['minute']): string;
|
|
607
|
-
/** Returns the formatted second. */
|
|
608
|
-
localeSecond(style?: Intl.DateTimeFormatOptions['second']): string;
|
|
609
|
-
/** Returns standard date format string. */
|
|
610
|
-
standard(timeZone?: boolean): string;
|
|
611
|
-
/** Sets the date completely. */
|
|
612
|
-
setDate(value: NumberOrStringOrDate): this;
|
|
613
|
-
/** Sets the type of data output. */
|
|
614
|
-
setType(value: GeoDate): this;
|
|
615
|
-
/** Sets whether to use 24-hour time format. */
|
|
616
|
-
setHour24(value: boolean): this;
|
|
617
|
-
/** Sets the location code. */
|
|
618
|
-
setCode(code: string): this;
|
|
619
|
-
/** Sets the update watch callback. */
|
|
620
|
-
setWatch(watch: (date: Date, type: GeoDate, hour24: boolean) => void): this;
|
|
621
|
-
/** Sets the full year. */
|
|
622
|
-
setYear(value: number): this;
|
|
623
|
-
/** Sets the month (1-12). */
|
|
624
|
-
setMonth(value: number): this;
|
|
625
|
-
/** Sets the day of the month. */
|
|
626
|
-
setDay(value: number): this;
|
|
627
|
-
/** Sets the hours. */
|
|
628
|
-
setHour(value: number): this;
|
|
629
|
-
/** Sets the minutes. */
|
|
630
|
-
setMinute(value: number): this;
|
|
631
|
-
/** Sets the seconds. */
|
|
632
|
-
setSecond(value: number): this;
|
|
633
|
-
/** Shifts the date by years. */
|
|
634
|
-
moveByYear(value: number): this;
|
|
635
|
-
/** Shifts the date by months. */
|
|
636
|
-
moveByMonth(value: number): this;
|
|
637
|
-
/** Shifts the date by days. */
|
|
638
|
-
moveByDay(value: number): this;
|
|
639
|
-
/** Shifts the date by hours. */
|
|
640
|
-
moveByHour(value: number): this;
|
|
641
|
-
/** Shifts the date by minutes. */
|
|
642
|
-
moveByMinute(value: number): this;
|
|
643
|
-
/** Shifts the date by seconds. */
|
|
644
|
-
moveBySecond(value: number): this;
|
|
645
|
-
/** Moves to January of the current year. */
|
|
646
|
-
moveMonthFirst(): this;
|
|
647
|
-
/** Moves to December of the current year. */
|
|
648
|
-
moveMonthLast(): this;
|
|
649
|
-
/** Moves to the first day of the next month. */
|
|
650
|
-
moveMonthNext(): this;
|
|
651
|
-
/** Moves to the first day of the previous month. */
|
|
652
|
-
moveMonthPrevious(): this;
|
|
653
|
-
/** Moves to the first day of the week. */
|
|
654
|
-
moveWeekdayFirst(): this;
|
|
655
|
-
/** Moves to the last day of the week. */
|
|
656
|
-
moveWeekdayLast(): this;
|
|
657
|
-
/** Moves to the first weekday of the month. */
|
|
658
|
-
moveWeekdayFirstByMonth(): this;
|
|
659
|
-
/** Moves to the last weekday of the month. */
|
|
660
|
-
moveWeekdayLastByMonth(): this;
|
|
661
|
-
/** Moves to the next week. */
|
|
662
|
-
moveWeekdayNext(): this;
|
|
663
|
-
/** Moves to the previous week. */
|
|
664
|
-
moveWeekdayPrevious(): this;
|
|
665
|
-
/** Moves to the first day of the month. */
|
|
666
|
-
moveDayFirst(): this;
|
|
667
|
-
/** Moves to the last day of the month. */
|
|
668
|
-
moveDayLast(): this;
|
|
669
|
-
/** Moves to the next day. */
|
|
670
|
-
moveDayNext(): this;
|
|
671
|
-
/** Moves to the previous day. */
|
|
672
|
-
moveDayPrevious(): this;
|
|
673
|
-
/** Clones the Date object. */
|
|
674
|
-
clone(): Date;
|
|
675
|
-
/** Clones the Datetime instance. */
|
|
676
|
-
cloneClass(): Datetime;
|
|
677
|
-
/** Clones and moves to the first month. */
|
|
678
|
-
cloneMonthFirst(): Datetime;
|
|
679
|
-
/** Clones and moves to the last month. */
|
|
680
|
-
cloneMonthLast(): Datetime;
|
|
681
|
-
/** Clones and moves to the next month. */
|
|
682
|
-
cloneMonthNext(): Datetime;
|
|
683
|
-
/** Clones and moves to the previous month. */
|
|
684
|
-
cloneMonthPrevious(): Datetime;
|
|
685
|
-
/** Clones and moves to the first day of the week. */
|
|
686
|
-
cloneWeekdayFirst(): Datetime;
|
|
687
|
-
/** Clones and moves to the last day of the week. */
|
|
688
|
-
cloneWeekdayLast(): Datetime;
|
|
689
|
-
/** Clones and moves to the first weekday of the month. */
|
|
690
|
-
cloneWeekdayFirstByMonth(): Datetime;
|
|
691
|
-
/** Clones and moves to the last weekday of the month. */
|
|
692
|
-
cloneWeekdayLastByMonth(): Datetime;
|
|
693
|
-
/** Clones and moves to the next week. */
|
|
694
|
-
cloneWeekdayNext(): Datetime;
|
|
695
|
-
/** Clones and moves to the previous week. */
|
|
696
|
-
cloneWeekdayPrevious(): Datetime;
|
|
697
|
-
/** Clones and moves to the first day of the month. */
|
|
698
|
-
cloneDayFirst(): Datetime;
|
|
699
|
-
/** Clones and moves to the last day of the month. */
|
|
700
|
-
cloneDayLast(): Datetime;
|
|
701
|
-
/** Clones and moves to the next day. */
|
|
702
|
-
cloneDayNext(): Datetime;
|
|
703
|
-
/** Clones and moves to the previous day. */
|
|
704
|
-
cloneDayPrevious(): Datetime;
|
|
705
|
-
protected toTimeZoneHourFormat(hour: number): string;
|
|
706
|
-
protected update(): this;
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
/** Error management and storage class @keywords error center handler */
|
|
710
|
-
export declare class ErrorCenter {
|
|
711
|
-
/** Returns request-isolated ErrorCenterInstance @keywords get item instance */
|
|
712
|
-
static getItem(): ErrorCenterInstance;
|
|
713
|
-
/** Checks if error cause exists @keywords has check error */
|
|
714
|
-
static has(code: string, group?: string): boolean;
|
|
715
|
-
/** Gets specific error cause @keywords get error cause */
|
|
716
|
-
static get(code: string, group?: string): ErrorCenterCauseItem | undefined;
|
|
717
|
-
/** Adds error cause @keywords add error cause */
|
|
718
|
-
static add(cause: ErrorCenterCauseItem): void;
|
|
719
|
-
/** Adds list of error causes @keywords add list causes */
|
|
720
|
-
static addList(causes: ErrorCenterCauseList): void;
|
|
721
|
-
/** Registers error handler @keywords add handler */
|
|
722
|
-
static addHandler(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): void;
|
|
723
|
-
/** Registers list of error handlers @keywords add handler list */
|
|
724
|
-
static addHandlerList(handlers: ErrorCenterHandlerList): void;
|
|
725
|
-
/** Adds global error callback @keywords add callback */
|
|
726
|
-
static addCallback(callback: ErrorCenterHandlerCallback): void;
|
|
727
|
-
/** Sets console output configuration @keywords set console */
|
|
728
|
-
static setIsConsole(isConsole: ErrorCenterHandlerIsConsole): void;
|
|
729
|
-
/** Triggers error event handling @keywords on error */
|
|
730
|
-
static on(cause: ErrorCenterCauseItem): void;
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
/** ErrorCenterHandler class for managing and triggering error handlers. @keywords error center handler */
|
|
734
|
-
export declare class ErrorCenterHandler {
|
|
735
|
-
/** Constructor @keywords constructor error handler */
|
|
736
|
-
constructor(handlers?: ErrorCenterHandlerList, isConsole?: ErrorCenterHandlerIsConsole);
|
|
737
|
-
/** Checks if handlers exist for a group. @keywords has error group */
|
|
738
|
-
has(group: ErrorCenterGroup): boolean;
|
|
739
|
-
/** Gets handlers for a group. @keywords get error group */
|
|
740
|
-
get(group: ErrorCenterGroup): ErrorCenterHandlerItem | undefined;
|
|
741
|
-
/** Adds a handler for a specific group. @keywords add error handler */
|
|
742
|
-
add(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): this;
|
|
743
|
-
/** Adds a list of group-based handlers. @keywords add error handler list */
|
|
744
|
-
addList(handlers: ErrorCenterHandlerList): this;
|
|
745
|
-
/** Adds a callback to be executed on any error. @keywords add error callback */
|
|
746
|
-
addCallback(callback: ErrorCenterHandlerCallback): this;
|
|
747
|
-
/** Sets console output flag or filter function. @keywords set error console */
|
|
748
|
-
setIsConsole(isConsole: ErrorCenterHandlerIsConsole): this;
|
|
749
|
-
/** Triggers handlers for a group and logs to console. @keywords trigger error on */
|
|
750
|
-
on(cause: ErrorCenterCauseItem): this;
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
/** Manage error storage and handling within an instance @keywords error_center instance handler */
|
|
754
|
-
export declare class ErrorCenterInstance {
|
|
755
|
-
/** @keywords constructor init */
|
|
756
|
-
constructor(causes?: ErrorCenterCauseList, handler?: ErrorCenterHandler);
|
|
757
|
-
/** Check if error cause exists @keywords check exists error cause */
|
|
758
|
-
has(code: string, group?: string): boolean;
|
|
759
|
-
/** Get specific error cause item @keywords get error cause */
|
|
760
|
-
get(code: string, group?: string): ErrorCenterCauseItem | undefined;
|
|
761
|
-
/** Add error cause to storage @keywords add error cause */
|
|
762
|
-
add(cause: ErrorCenterCauseItem): this;
|
|
763
|
-
/** Add list of error causes to storage @keywords add error cause list */
|
|
764
|
-
addList(causes: ErrorCenterCauseList): this;
|
|
765
|
-
/** Register new error handler @keywords add error handler */
|
|
766
|
-
addHandler(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): this;
|
|
767
|
-
/** Register list of error handlers @keywords add error handler list */
|
|
768
|
-
addHandlerList(handlers: ErrorCenterHandlerList): this;
|
|
769
|
-
/** Add global error callback @keywords add error callback */
|
|
770
|
-
addCallback(callback: ErrorCenterHandlerCallback): this;
|
|
771
|
-
/** Set console output option @keywords set console output */
|
|
772
|
-
setIsConsole(isConsole: ErrorCenterHandlerIsConsole): this;
|
|
773
|
-
/** Trigger error handling @keywords trigger handle error */
|
|
774
|
-
on(cause: ErrorCenterCauseItem): this;
|
|
775
|
-
/** Merge cause with stored data @keywords assign merge error cause */
|
|
776
|
-
protected assign(cause: ErrorCenterCauseItem): ErrorCenterCauseItem;
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
/**
|
|
780
|
-
* Advanced wrapper for managing event listeners on DOM elements or window.
|
|
781
|
-
* @keywords event_item dom_events event_listener resize scroll
|
|
782
|
-
*/
|
|
783
|
-
export declare class EventItem<E extends ElementOrWindow, O extends Event, D extends Record<string, any> = Record<string, any>> {
|
|
784
|
-
/** Event listener callback wrapper */
|
|
785
|
-
protected listenerRecent: (event?: O | ResizeObserverEntry) => void;
|
|
786
|
-
/**
|
|
787
|
-
* Create an EventItem instance.
|
|
788
|
-
* @keywords constructor
|
|
789
|
-
*/
|
|
790
|
-
constructor(elementSelector?: ElementOrString<E>, type?: string | string[], listener?: EventListenerDetail<O, D> | undefined, options?: EventOptions, detail?: D | undefined);
|
|
791
|
-
/** Check whether event listening is currently enabled @keywords is_active */
|
|
792
|
-
isActive(): boolean;
|
|
793
|
-
/** Return the target element @keywords get_element */
|
|
794
|
-
getElement(): E | undefined;
|
|
795
|
-
/** Change of an element for tracking @keywords set_element */
|
|
796
|
-
setElement(elementSelector?: ElementOrString<E>): this;
|
|
797
|
-
/** Modify the control element for DOM safety checks @keywords set_element_control */
|
|
798
|
-
setElementControl<EC extends HTMLElement>(elementSelector?: ElementOrString<EC>): this;
|
|
799
|
-
/** Change the type of the handled event @keywords set_type */
|
|
800
|
-
setType(type: string | string[]): this;
|
|
801
|
-
/** Modify the listener function @keywords set_listener */
|
|
802
|
-
setListener(listener: EventListenerDetail<O, D>): this;
|
|
803
|
-
/** Modify the options object that defines event listener characteristics @keywords set_options */
|
|
804
|
-
setOptions(options?: EventOptions): this;
|
|
805
|
-
/** Modify additional data provided to the listener @keywords set_detail */
|
|
806
|
-
setDetail(detail?: D): this;
|
|
807
|
-
/** Trigger events on the target element @keywords dispatch custom_event */
|
|
808
|
-
dispatch(detail?: D | undefined): this;
|
|
809
|
-
/** Start event listening @keywords start */
|
|
810
|
-
start(): this;
|
|
811
|
-
/** Stop event listening @keywords stop */
|
|
812
|
-
stop(): this;
|
|
813
|
-
/** Toggle event handler state @keywords toggle */
|
|
814
|
-
toggle(activity: boolean): this;
|
|
815
|
-
/** Reset listening events @keywords reset */
|
|
816
|
-
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
|
-
}
|
|
824
|
-
|
|
825
|
-
/** @keywords formatters, format_data, formatting */
|
|
826
|
-
export declare class Formatters<Options extends FormattersOptionsList = FormattersOptionsList, List extends FormattersListProp = FormattersListProp, Item extends FormattersItemProp<List> = FormattersItemProp<List>> {
|
|
827
|
-
/** @keywords constructor, init */
|
|
828
|
-
constructor(options: Options, list?: List | undefined);
|
|
829
|
-
/** @keywords is, check, exists */
|
|
830
|
-
is(): boolean;
|
|
831
|
-
/** @keywords is_array, check */
|
|
832
|
-
isArray(): this is this & {
|
|
833
|
-
list: FormattersList<Item>;
|
|
834
|
-
};
|
|
835
|
-
/** @keywords length, count */
|
|
836
|
-
length(): number;
|
|
837
|
-
/** @keywords get_list, array */
|
|
838
|
-
getList(): FormattersList<Item>;
|
|
839
|
-
/** @keywords get_options, config */
|
|
840
|
-
getOptions(): Options;
|
|
841
|
-
/** @keywords set_list, update */
|
|
842
|
-
setList(list?: List): this;
|
|
843
|
-
/** @keywords to, format, transform */
|
|
844
|
-
to(): FormattersReturn<List, Options>;
|
|
845
|
-
/** @keywords get_format_data, record */
|
|
846
|
-
protected getFormatData(item: Item): Record<string, string>;
|
|
847
|
-
/** @keywords transformation, format */
|
|
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 */
|
|
864
|
-
export declare class Geo {
|
|
865
|
-
/** @keywords getObject, instance */
|
|
866
|
-
static getObject(): GeoItemInstance;
|
|
867
|
-
/** @keywords get, current, geo */
|
|
868
|
-
static get(): GeoItemFull;
|
|
869
|
-
/** @keywords getCountry, country */
|
|
870
|
-
static getCountry(): string;
|
|
871
|
-
/** @keywords getLanguage, language */
|
|
872
|
-
static getLanguage(): string;
|
|
873
|
-
/** @keywords getStandard, standard, locale */
|
|
874
|
-
static getStandard(): string;
|
|
875
|
-
/** @keywords getFirstDay, week */
|
|
876
|
-
static getFirstDay(): string;
|
|
877
|
-
/** @keywords getLocation, location */
|
|
878
|
-
static getLocation(): string;
|
|
879
|
-
/** @keywords getLocationCountry, country */
|
|
880
|
-
static getLocationCountry(): string;
|
|
881
|
-
/** @keywords getLocationLanguage, language */
|
|
882
|
-
static getLocationLanguage(): string;
|
|
883
|
-
/** @keywords getItem, geo */
|
|
884
|
-
static getItem(): GeoItemFull;
|
|
885
|
-
/** @keywords getList, countries, regions */
|
|
886
|
-
static getList(): GeoItem[];
|
|
887
|
-
/** @keywords getByCode, geo */
|
|
888
|
-
static getByCode(code?: string): GeoItemFull;
|
|
889
|
-
/** @keywords getByCodeFull, locale */
|
|
890
|
-
static getByCodeFull(code: string): GeoItem | undefined;
|
|
891
|
-
/** @keywords getByCountry, country */
|
|
892
|
-
static getByCountry(country: string): GeoItem | undefined;
|
|
893
|
-
/** @keywords getByLanguage, language */
|
|
894
|
-
static getByLanguage(language: string): GeoItem | undefined;
|
|
895
|
-
/** @keywords getTimezone, timezone */
|
|
896
|
-
static getTimezone(): number;
|
|
897
|
-
/** @keywords getTimezoneFormat, timezone */
|
|
898
|
-
static getTimezoneFormat(): string;
|
|
899
|
-
/** @keywords find, geo */
|
|
900
|
-
static find(code: string): GeoItemFull;
|
|
901
|
-
/** @keywords toStandard, geo */
|
|
902
|
-
static toStandard(item: GeoItem): string;
|
|
903
|
-
/** @keywords set, location */
|
|
904
|
-
static set(code: string, save?: boolean): void;
|
|
905
|
-
/** @keywords setTimezone, timezone */
|
|
906
|
-
static setTimezone(timezone: number): void;
|
|
907
|
-
/** @keywords setValueDefault, default */
|
|
908
|
-
static setValueDefault(code?: string | (() => string)): void;
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
export declare const GEO_FLAG_ICON_NAME = "f";
|
|
912
|
-
/** GeoFlag helper for country codes and flag icons. @keywords geo, flag, country, language */
|
|
913
|
-
export declare class GeoFlag {
|
|
914
|
-
/** @keywords constructor */
|
|
915
|
-
constructor(code?: string);
|
|
916
|
-
/** Gets country item and flag. @keywords get, flag, country */
|
|
917
|
-
get(code?: string): GeoFlagItem | undefined;
|
|
918
|
-
/** Gets language item and flag. @keywords get, language, flag */
|
|
919
|
-
getLanguage(code?: string): GeoFlagItem | undefined;
|
|
920
|
-
/** Gets current flag code. @keywords get, code */
|
|
921
|
-
getCode(): string;
|
|
922
|
-
/** Gets flag icon name. @keywords get, flag, icon */
|
|
923
|
-
getFlag(code?: string): string | undefined;
|
|
924
|
-
/** Gets country list. @keywords get, list, country */
|
|
925
|
-
getList(codes?: string[], sort?: boolean): GeoFlagItem[];
|
|
926
|
-
/** Gets language list. @keywords get, list, language */
|
|
927
|
-
getListLanguage(codes?: string[], sort?: boolean): GeoFlagItem[];
|
|
928
|
-
/** Gets national country list. @keywords get, national, country */
|
|
929
|
-
getNational(codes?: string[], sort?: boolean): GeoFlagNational[];
|
|
930
|
-
/** Gets national language list. @keywords get, national, language */
|
|
931
|
-
getNationalLanguage(codes?: string[], sort?: boolean): GeoFlagNational[];
|
|
932
|
-
/** Sets current code. @keywords set, code */
|
|
933
|
-
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
|
-
}
|
|
943
|
-
|
|
944
|
-
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
|
-
*/
|
|
949
|
-
export declare class GeoInstance {
|
|
950
|
-
/**
|
|
951
|
-
* Initializes the location and related data.
|
|
952
|
-
* @keywords constructor geo instance
|
|
953
|
-
*/
|
|
954
|
-
constructor();
|
|
955
|
-
/**
|
|
956
|
-
* Getting information about the current country.
|
|
957
|
-
* @keywords get geo item
|
|
958
|
-
*/
|
|
959
|
-
get(): GeoItemFull;
|
|
960
|
-
/**
|
|
961
|
-
* Getting the current country code.
|
|
962
|
-
* @keywords get country code
|
|
963
|
-
*/
|
|
964
|
-
getCountry(): string;
|
|
965
|
-
/**
|
|
966
|
-
* Getting the current language code.
|
|
967
|
-
* @keywords get language code
|
|
968
|
-
*/
|
|
969
|
-
getLanguage(): string;
|
|
970
|
-
/**
|
|
971
|
-
* Getting the full format according to the standard (language-country).
|
|
972
|
-
* @keywords get standard string
|
|
973
|
-
*/
|
|
974
|
-
getStandard(): string;
|
|
975
|
-
/**
|
|
976
|
-
* Getting the first day of the week for the current country.
|
|
977
|
-
* @keywords get first day week
|
|
978
|
-
*/
|
|
979
|
-
getFirstDay(): string;
|
|
980
|
-
/**
|
|
981
|
-
* Getting the current location string.
|
|
982
|
-
* @keywords get location string
|
|
983
|
-
*/
|
|
984
|
-
getLocation(): string;
|
|
985
|
-
/**
|
|
986
|
-
* Getting the country code from the location.
|
|
987
|
-
* @keywords get location country
|
|
988
|
-
*/
|
|
989
|
-
getLocationCountry(): string;
|
|
990
|
-
/**
|
|
991
|
-
* Getting the language code from the location.
|
|
992
|
-
* @keywords get location language
|
|
993
|
-
*/
|
|
994
|
-
getLocationLanguage(): string;
|
|
995
|
-
/**
|
|
996
|
-
* Getting processed data including the current language.
|
|
997
|
-
* @keywords get geo item full
|
|
998
|
-
*/
|
|
999
|
-
getItem(): GeoItemFull;
|
|
1000
|
-
/**
|
|
1001
|
-
* Returns the full list of available countries.
|
|
1002
|
-
* @keywords get list countries
|
|
1003
|
-
*/
|
|
1004
|
-
getList(): GeoItem[];
|
|
1005
|
-
/**
|
|
1006
|
-
* Returns data about the country by its code.
|
|
1007
|
-
* @keywords get by code geo
|
|
1008
|
-
*/
|
|
1009
|
-
getByCode(code?: string): GeoItemFull;
|
|
1010
|
-
/**
|
|
1011
|
-
* Returns full data by language and country combination.
|
|
1012
|
-
* @keywords get by code full
|
|
1013
|
-
*/
|
|
1014
|
-
getByCodeFull(code: string): GeoItem | undefined;
|
|
1015
|
-
/**
|
|
1016
|
-
* Returns full data by country code.
|
|
1017
|
-
* @keywords get by country
|
|
1018
|
-
*/
|
|
1019
|
-
getByCountry(country: string): GeoItem | undefined;
|
|
1020
|
-
/**
|
|
1021
|
-
* Returns full data by language code.
|
|
1022
|
-
* @keywords get by language
|
|
1023
|
-
*/
|
|
1024
|
-
getByLanguage(language: string): GeoItem | undefined;
|
|
1025
|
-
/**
|
|
1026
|
-
* Returns the current time zone offset in minutes.
|
|
1027
|
-
* @keywords get timezone offset
|
|
1028
|
-
*/
|
|
1029
|
-
getTimezone(): number;
|
|
1030
|
-
/**
|
|
1031
|
-
* Returns the current time zone offset in a formatted string.
|
|
1032
|
-
* @keywords get timezone format
|
|
1033
|
-
*/
|
|
1034
|
-
getTimezoneFormat(): string;
|
|
1035
|
-
/**
|
|
1036
|
-
* Finds the country data by its code or name.
|
|
1037
|
-
* @keywords find geo
|
|
1038
|
-
*/
|
|
1039
|
-
find(code: string): GeoItemFull;
|
|
1040
|
-
/**
|
|
1041
|
-
* Converts a geo item to its standard string representation.
|
|
1042
|
-
* @keywords to standard geo
|
|
1043
|
-
*/
|
|
1044
|
-
toStandard(item: GeoItem, language?: string): string;
|
|
1045
|
-
/**
|
|
1046
|
-
* Updates the current location and related data.
|
|
1047
|
-
* @keywords set geo location
|
|
1048
|
-
*/
|
|
1049
|
-
set(code: string, save?: boolean): void;
|
|
1050
|
-
/**
|
|
1051
|
-
* Updates the default time zone offset.
|
|
1052
|
-
* @keywords set timezone
|
|
1053
|
-
*/
|
|
1054
|
-
setTimezone(timezone: number): void;
|
|
1055
|
-
/**
|
|
1056
|
-
* Sets the default value for the country code.
|
|
1057
|
-
* @keywords set value default
|
|
1058
|
-
*/
|
|
1059
|
-
setValueDefault(code?: string | (() => string)): void;
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
|
-
/** Intl internationalization and localization helper class. @keywords geo, intl, format, locale */
|
|
1063
|
-
export declare class GeoIntl {
|
|
1064
|
-
/** Checks if an instance exists for the specified country code. @keywords geo, intl, check */
|
|
1065
|
-
static isItem(code?: string): boolean;
|
|
1066
|
-
/** Returns the standard location code. @keywords geo, intl, location */
|
|
1067
|
-
static getLocation(code?: string): string;
|
|
1068
|
-
/** Returns an instance of the class for the specified country code. @keywords geo, intl, instance */
|
|
1069
|
-
static getInstance(code?: string): GeoIntl;
|
|
1070
|
-
constructor(code?: string, errorCenter?: ErrorCenterInstance);
|
|
1071
|
-
/** Returns the location code. @keywords intl, location */
|
|
1072
|
-
getLocation(): string;
|
|
1073
|
-
/** Returns the first day of the week. @keywords intl, first_day, calendar */
|
|
1074
|
-
getFirstDay(): string;
|
|
1075
|
-
/** Translates language, region, and script display names. @keywords intl, display, name */
|
|
1076
|
-
display(value?: string, typeOptions?: Intl.DisplayNamesOptions['type'] | Intl.DisplayNamesOptions): string;
|
|
1077
|
-
/** Get display names of language. @keywords intl, language, name */
|
|
1078
|
-
languageName(value?: string, style?: Intl.RelativeTimeFormatStyle): string;
|
|
1079
|
-
/** Get display names of region. @keywords intl, country, region, name */
|
|
1080
|
-
countryName(value?: string, style?: Intl.RelativeTimeFormatStyle): string;
|
|
1081
|
-
/** Returns a string containing the full name in a specific format. @keywords intl, full_name, person */
|
|
1082
|
-
fullName(last: string, first: string, surname?: string, short?: boolean): string;
|
|
1083
|
-
/** Formats a number using locale options. @keywords intl, number, format */
|
|
1084
|
-
number(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1085
|
-
/** Returns the decimal point symbol. @keywords intl, decimal, symbol */
|
|
1086
|
-
decimal(): string;
|
|
1087
|
-
/** Formats a currency value. @keywords intl, currency, money */
|
|
1088
|
-
currency(value: NumberOrString, currencyOptions?: string | Intl.NumberFormatOptions, numberOnly?: boolean): string;
|
|
1089
|
-
/** Returns the currency symbol or code. @keywords intl, currency, symbol */
|
|
1090
|
-
currencySymbol(currency: string, currencyDisplay?: keyof Intl.NumberFormatOptionsCurrencyDisplayRegistry): string;
|
|
1091
|
-
/** Formats a unit value. @keywords intl, unit, format */
|
|
1092
|
-
unit(value: NumberOrString, unitOptions?: string | Intl.NumberFormatOptions): string;
|
|
1093
|
-
/** Formats a file size value. @keywords intl, file_size, unit */
|
|
1094
|
-
sizeFile(value: NumberOrString, unitOptions?: 'byte' | 'kilobyte' | 'megabyte' | 'gigabyte' | 'terabyte' | 'petabyte' | Intl.NumberFormatOptions): string;
|
|
1095
|
-
/** Formats a number as a percentage. @keywords intl, percent, number */
|
|
1096
|
-
percent(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1097
|
-
/** Formats a number as a percentage by 100. @keywords intl, percent, number */
|
|
1098
|
-
percentBy100(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1099
|
-
/** Formats text with plural rules and language specifics. @keywords intl, plural, rules */
|
|
1100
|
-
plural(value: NumberOrString, words: string, options?: Intl.PluralRulesOptions, optionsNumber?: Intl.NumberFormatOptions): string;
|
|
1101
|
-
/** Formats date and time. @keywords intl, date, time, format */
|
|
1102
|
-
date(value: NumberOrStringOrDate, type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, hour24?: boolean): string;
|
|
1103
|
-
/** Formats relative time. @keywords intl, relative, time */
|
|
1104
|
-
relative(value: NumberOrStringOrDate, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, todayValue?: Date): string;
|
|
1105
|
-
/** Formats relative time with a limit fallback to standard date. @keywords intl, relative, limit, date */
|
|
1106
|
-
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 relative time by numerical value and unit. @keywords intl, relative, value, unit */
|
|
1108
|
-
relativeByValue(value: NumberOrString, unit: Intl.RelativeTimeFormatUnit, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions): string;
|
|
1109
|
-
/** Returns the formatted name of a month. @keywords intl, month, name */
|
|
1110
|
-
month(value?: NumberOrStringOrDate, style?: Intl.DateTimeFormatOptions['month']): string;
|
|
1111
|
-
/** Returns an array of months. @keywords intl, months, list */
|
|
1112
|
-
months(style?: Intl.DateTimeFormatOptions['month']): ItemValue<number | undefined>[];
|
|
1113
|
-
/** Returns the formatted name of a weekday. @keywords intl, weekday, name */
|
|
1114
|
-
weekday(value?: NumberOrStringOrDate, style?: Intl.DateTimeFormatOptions['weekday']): string;
|
|
1115
|
-
/** Returns an array of weekdays. @keywords intl, weekdays, list */
|
|
1116
|
-
weekdays(style?: Intl.DateTimeFormatOptions['weekday']): ItemValue<number | undefined>[];
|
|
1117
|
-
/** Formats time. @keywords intl, time, format */
|
|
1118
|
-
time(value: NumberOrStringOrDate): string;
|
|
1119
|
-
/** Sorts an array of items considering locale rules. @keywords intl, sort, collator */
|
|
1120
|
-
sort<T>(data: T[], compareFn?: (a: T, b: T) => [string, string]): T[];
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
/** Stores and processes phone number masks @keywords geophone phone mask country code */
|
|
1124
|
-
export declare class GeoPhone {
|
|
1125
|
-
/** Retrieves phone info by country code @keywords get phone info country */
|
|
1126
|
-
static get(code: string): GeoPhoneValue | undefined;
|
|
1127
|
-
/** Retrieves phone info by phone number @keywords get by phone number */
|
|
1128
|
-
static getByPhone(phone: string): GeoPhoneMapInfo;
|
|
1129
|
-
/** Retrieves mask data by country code @keywords get by code country */
|
|
1130
|
-
static getByCode(code: string): GeoPhoneMap | undefined;
|
|
1131
|
-
/** Retrieves list of all phone values @keywords get list phone values */
|
|
1132
|
-
static getList(): GeoPhoneValue[];
|
|
1133
|
-
/** Retrieves tree map sorted by code @keywords get map tree */
|
|
1134
|
-
static getMap(): Record<string, GeoPhoneMap>;
|
|
1135
|
-
/** Converts number to phone mask @keywords to mask format */
|
|
1136
|
-
static toMask(phone: string, masks?: string[]): string | undefined;
|
|
1137
|
-
/** Removes country code from phone number @keywords remove zero prefix */
|
|
1138
|
-
static removeZero(phone: string): string;
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
/**
|
|
1142
|
-
* Class for localized unit formatting and automatic conversions.
|
|
1143
|
-
* @keywords geo unit format convert metric imperial
|
|
1144
|
-
*/
|
|
1145
|
-
export declare class GeoUnit {
|
|
1146
|
-
/** Returns a request-isolated instance of GeoUnit or cached instance. @keywords get instance geo unit */
|
|
1147
|
-
static getInstance(code?: string): GeoUnit;
|
|
1148
|
-
/** Constructor. @keywords constructor geo unit */
|
|
1149
|
-
constructor(code?: string);
|
|
1150
|
-
/** Returns the standard location code. @keywords get location standard */
|
|
1151
|
-
getLocation(): string;
|
|
1152
|
-
/** Formats millimeter value, converting to inches if overridden by locale unit settings. @keywords format millimeter inch */
|
|
1153
|
-
millimeter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1154
|
-
/** Formats centimeter value, converting to inches if overridden by locale unit settings. @keywords format centimeter inch */
|
|
1155
|
-
centimeter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1156
|
-
/** Formats meter value, converting to feet if overridden by locale unit settings. @keywords format meter foot */
|
|
1157
|
-
meter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1158
|
-
/** Formats kilometer value, converting to miles if overridden by locale unit settings. @keywords format kilometer mile */
|
|
1159
|
-
kilometer(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1160
|
-
/** Formats square meter value, converting to square feet if overridden by locale unit settings. @keywords format square meter foot */
|
|
1161
|
-
squareMeter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1162
|
-
/** Formats hectare value, converting to acres if overridden by locale unit settings. @keywords format hectare acre */
|
|
1163
|
-
hectare(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1164
|
-
/** Formats gram value, converting to ounces if overridden by locale unit settings. @keywords format gram ounce */
|
|
1165
|
-
gram(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1166
|
-
/** Formats kilogram value, converting to pounds if overridden by locale unit settings. @keywords format kilogram pound */
|
|
1167
|
-
kilogram(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1168
|
-
/** Formats tonne value, converting to short tons if overridden by locale unit settings. @keywords format tonne ton */
|
|
1169
|
-
tonne(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1170
|
-
/** Formats milliliter value, converting to fluid ounces if overridden by locale unit settings. @keywords format milliliter fluid ounce */
|
|
1171
|
-
milliliter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1172
|
-
/** Formats liter value, converting to gallons if overridden by locale unit settings. @keywords format liter gallon */
|
|
1173
|
-
liter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1174
|
-
/** Formats celsius value, converting to fahrenheit if overridden by locale unit settings. @keywords format celsius fahrenheit temperature */
|
|
1175
|
-
celsius(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1176
|
-
/** Formats kilometer per hour value, converting to miles per hour if overridden by locale unit settings. @keywords format speed kmh mph */
|
|
1177
|
-
kilometerPerHour(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1178
|
-
/** Formats the value for the specified unit, converting and formatting it according to the locale. @keywords format unit value */
|
|
1179
|
-
format(value: NumberOrString, unit: string, options?: Intl.NumberFormatOptions): string;
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
/** Static utility class for storing application-wide global data. @keywords global, storage, data */
|
|
1183
|
-
export declare class Global {
|
|
1184
|
-
/** Returns the global data store instance. @keywords get, item, store */
|
|
1185
|
-
static getItem(): Record<string, any>;
|
|
1186
|
-
/** Returns a value by name. @keywords get, property, value */
|
|
1187
|
-
static get<R = any>(name: string): R;
|
|
1188
|
-
/** Adds global data once. @keywords add, data, set */
|
|
1189
|
-
static add(data: Record<string, any>): void;
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
/** Static class for working with URL hash data. @keywords hash, url, parameters, state */
|
|
1193
|
-
export declare class Hash {
|
|
1194
|
-
/** Returns HashInstance item. @keywords get, instance, item */
|
|
1195
|
-
static getItem(): HashInstance;
|
|
1196
|
-
/** Gets value by name from hash. @keywords get, read, value */
|
|
1197
|
-
static get<T>(name: string, defaultValue?: T | (() => T)): T;
|
|
1198
|
-
/** Sets value by name in hash. @keywords set, write, update */
|
|
1199
|
-
static set<T>(name: string, callback: T | (() => T)): void;
|
|
1200
|
-
/** Adds watch callback for hash property. @keywords watch, event, listener, add */
|
|
1201
|
-
static addWatch<T>(name: string, callback: (value: T) => void): void;
|
|
1202
|
-
/** Removes watch callback for hash property. @keywords watch, event, listener, remove */
|
|
1203
|
-
static removeWatch<T>(name: string, callback: (value: T) => void): void;
|
|
1204
|
-
/** Reloads hash state. @keywords reload, refresh, update */
|
|
1205
|
-
static reload(): void;
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
import { UrlInstanceAbstract } from "@dxtmisha/media";
|
|
1209
|
-
|
|
1210
|
-
/** Class for working with URL hash data. @keywords hash, url, instance */
|
|
1211
|
-
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
|
-
}
|
|
1219
|
-
|
|
1220
|
-
/** @keywords icon item type */
|
|
1221
|
-
export type IconsItem = string | Promise<string | any> | (() => Promise<string | any>);
|
|
1222
|
-
|
|
1223
|
-
/** @keywords icon configuration */
|
|
1224
|
-
export type IconsConfig = {
|
|
1225
|
-
url?: string;
|
|
1226
|
-
list?: Record<string, IconsItem>;
|
|
1227
|
-
};
|
|
1228
|
-
|
|
1229
|
-
/** @keywords icons manager, svg */
|
|
1230
|
-
export declare class Icons {
|
|
1231
|
-
/** @keywords check icon existence */
|
|
1232
|
-
static is(index: string): boolean;
|
|
1233
|
-
/** @keywords get icon value or promise */
|
|
1234
|
-
static get(index: string, url?: string, wait?: number): Promise<string>;
|
|
1235
|
-
/** @keywords get icon async */
|
|
1236
|
-
static getAsync(index: string, url?: string): string;
|
|
1237
|
-
/** @keywords get icon name list */
|
|
1238
|
-
static getNameList(): string[];
|
|
1239
|
-
/** @keywords get global url */
|
|
1240
|
-
static getUrlGlobal(): string;
|
|
1241
|
-
/** @keywords add icon */
|
|
1242
|
-
static add(index: string, file: IconsItem): void;
|
|
1243
|
-
/** @keywords add icon load */
|
|
1244
|
-
static addLoad(index: string): void;
|
|
1245
|
-
/** @keywords add global icon */
|
|
1246
|
-
static addGlobal(index: string, file: string): void;
|
|
1247
|
-
/** @keywords add icons by list */
|
|
1248
|
-
static addByList(list: Record<string, IconsItem>): void;
|
|
1249
|
-
/** @keywords set icons url */
|
|
1250
|
-
static setUrl(url: string): void;
|
|
1251
|
-
/** @keywords set icons config */
|
|
1252
|
-
static setConfig(config: IconsConfig): void;
|
|
1253
|
-
}
|
|
1254
|
-
|
|
1255
|
-
/** Class for working with global loading. @keywords loading loader global */
|
|
1256
|
-
export declare class Loading {
|
|
1257
|
-
/** Check if the loader is active. @keywords loading active check */
|
|
1258
|
-
static is(): boolean;
|
|
1259
|
-
/** Get current loading value. @keywords loading get count */
|
|
1260
|
-
static get(): number;
|
|
1261
|
-
/** Get LoadingInstance item. @keywords loading instance item */
|
|
1262
|
-
static getItem(): LoadingInstance;
|
|
1263
|
-
/** Show the loader. @keywords loading show start */
|
|
1264
|
-
static show(): void;
|
|
1265
|
-
/** Hide the loader. @keywords loading hide stop */
|
|
1266
|
-
static hide(): void;
|
|
1267
|
-
/** Register loading event. @keywords loading event register */
|
|
1268
|
-
static registrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
|
|
1269
|
-
/** Unregister loading event. @keywords loading event unregister */
|
|
1270
|
-
static unregistrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
|
|
1271
|
-
}
|
|
1272
|
-
|
|
1273
|
-
export type LoadingDetail = {
|
|
1274
|
-
loading: boolean;
|
|
1275
|
-
};
|
|
1276
|
-
export type LoadingRegistrationItem = {
|
|
1277
|
-
item: EventItem<Window, CustomEvent, LoadingDetail>;
|
|
1278
|
-
listener: EventListenerDetail<CustomEvent, LoadingDetail>;
|
|
1279
|
-
element?: ElementOrString<HTMLElement>;
|
|
1280
|
-
};
|
|
1281
|
-
/** Loading instance manager class @keywords loading, loader, spinner, global */
|
|
1282
|
-
export declare class LoadingInstance {
|
|
1283
|
-
/** Create loading instance @keywords constructor, init */
|
|
1284
|
-
constructor(eventName?: string);
|
|
1285
|
-
/** Check if loading is active @keywords is, active, check */
|
|
1286
|
-
is(): boolean;
|
|
1287
|
-
/** Get current loading counter value @keywords get, count, value */
|
|
1288
|
-
get(): number;
|
|
1289
|
-
/** Show loading indicator @keywords show, start, loading */
|
|
1290
|
-
show(): void;
|
|
1291
|
-
/** Hide loading indicator @keywords hide, stop, loading */
|
|
1292
|
-
hide(): void;
|
|
1293
|
-
/** Register loading event listener @keywords register, event, listener */
|
|
1294
|
-
registrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
|
|
1295
|
-
/** Unregister loading event listener @keywords unregister, remove, event */
|
|
1296
|
-
unregistrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
|
|
1297
|
-
}
|
|
1298
|
-
|
|
1299
|
-
/** Unified class for managing all types of meta tags. @keywords meta, seo, openGraph, twitter */
|
|
1300
|
-
export declare class Meta extends MetaManager<MetaTag[]> {
|
|
1301
|
-
/** Creates an instance of Meta with integrated Open Graph and Twitter Card support. @keywords meta, constructor */
|
|
1302
|
-
constructor();
|
|
1303
|
-
/** Gets the MetaOg instance for advanced Open Graph operations. @keywords og, openGraph */
|
|
1304
|
-
getOg(): MetaOg;
|
|
1305
|
-
/** Gets the MetaTwitter instance for advanced Twitter Card operations. @keywords twitter, card */
|
|
1306
|
-
getTwitter(): MetaTwitter;
|
|
1307
|
-
/** Gets the page title without suffix. @keywords title, get */
|
|
1308
|
-
getTitle(): string;
|
|
1309
|
-
/** Gets the keywords meta tag. @keywords keywords, seo */
|
|
1310
|
-
getKeywords(): string;
|
|
1311
|
-
/** Gets the description meta tag. @keywords description, seo */
|
|
1312
|
-
getDescription(): string;
|
|
1313
|
-
/** Gets the Open Graph image URL. @keywords image, og */
|
|
1314
|
-
getImage(): string;
|
|
1315
|
-
/** Gets the canonical URL. @keywords canonical, url */
|
|
1316
|
-
getCanonical(): string;
|
|
1317
|
-
/** Gets the robots meta tag value. @keywords robots, index */
|
|
1318
|
-
getRobots(): MetaRobots;
|
|
1319
|
-
/** Gets the author meta tag. @keywords author, meta */
|
|
1320
|
-
getAuthor(): string;
|
|
1321
|
-
/** Gets the Open Graph site name. @keywords siteName, og */
|
|
1322
|
-
getSiteName(): string;
|
|
1323
|
-
/** Gets the Open Graph locale. @keywords locale, og */
|
|
1324
|
-
getLocale(): string;
|
|
1325
|
-
/** Sets the page title (with suffix) and updates Open Graph and Twitter Card titles. @keywords title, set */
|
|
1326
|
-
setTitle(title: string): this;
|
|
1327
|
-
/** Sets the keywords meta tag. @keywords keywords, set */
|
|
1328
|
-
setKeywords(keywords: string | string[]): this;
|
|
1329
|
-
/** Sets the description meta tag. @keywords description, set */
|
|
1330
|
-
setDescription(description: string): this;
|
|
1331
|
-
/** Sets the image for Open Graph and Twitter Card. @keywords image, set */
|
|
1332
|
-
setImage(image: string): this;
|
|
1333
|
-
/** Sets the canonical URL and updates Open Graph and Twitter Card URLs. @keywords canonical, set */
|
|
1334
|
-
setCanonical(canonical: string): this;
|
|
1335
|
-
/** Sets the robots meta tag. @keywords robots, set */
|
|
1336
|
-
setRobots(robots: MetaRobots): this;
|
|
1337
|
-
/** Sets the author meta tag. @keywords author, set */
|
|
1338
|
-
setAuthor(author: string): this;
|
|
1339
|
-
/** Sets the site name for Open Graph and Twitter Card. @keywords siteName, set */
|
|
1340
|
-
setSiteName(siteName: string): this;
|
|
1341
|
-
/** Sets the locale for Open Graph. @keywords locale, set */
|
|
1342
|
-
setLocale(locale: string): this;
|
|
1343
|
-
/** Sets the suffix to append to page title. @keywords suffix, title */
|
|
1344
|
-
setSuffix(suffix?: string): void;
|
|
1345
|
-
/** Generates the complete HTML for all meta-tags including Open Graph and Twitter Card. @keywords html, render */
|
|
1346
|
-
html(): string;
|
|
1347
|
-
/** Generates the title as an HTML-safe string. @keywords html, title */
|
|
1348
|
-
htmlTitle(): string;
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
type MetaList<T extends readonly string[]> = {
|
|
1352
|
-
[K in T[number]]?: string;
|
|
1353
|
-
};
|
|
1354
|
-
/** @keywords MetaManager meta tags management */
|
|
1355
|
-
export declare class MetaManager<T extends readonly string[], Key extends keyof MetaList<T> = keyof MetaList<T>> {
|
|
1356
|
-
/** @keywords constructor MetaManager */
|
|
1357
|
-
constructor(listMeta: T, isProperty?: boolean);
|
|
1358
|
-
/** @keywords getListMeta meta list */
|
|
1359
|
-
getListMeta(): T;
|
|
1360
|
-
/** @keywords get meta value */
|
|
1361
|
-
get(name: Key): string;
|
|
1362
|
-
/** @keywords getItems all meta tags */
|
|
1363
|
-
getItems(): MetaList<T>;
|
|
1364
|
-
/** @keywords html render meta tags */
|
|
1365
|
-
html(): string;
|
|
1366
|
-
/** @keywords set meta value */
|
|
1367
|
-
set(name: Key, content: string): this;
|
|
1368
|
-
/** @keywords setByList multiple meta tags */
|
|
1369
|
-
setByList(metaList: MetaList<T>): this;
|
|
1370
|
-
}
|
|
1371
|
-
export {};
|
|
1372
|
-
|
|
1373
|
-
export declare class MetaOg extends MetaManager<MetaOpenGraphTag[]> {
|
|
1374
|
-
/** Creates MetaOg instance. @keywords constructor, open, graph */
|
|
1375
|
-
constructor();
|
|
1376
|
-
/** Gets the Open Graph title. @keywords get, title, og */
|
|
1377
|
-
getTitle(): string;
|
|
1378
|
-
/** Gets the Open Graph type. @keywords get, type, og */
|
|
1379
|
-
getType(): MetaOpenGraphType;
|
|
1380
|
-
/** Gets the Open Graph URL. @keywords get, url, og */
|
|
1381
|
-
getUrl(): string;
|
|
1382
|
-
/** Gets the Open Graph image URL. @keywords get, image, og */
|
|
1383
|
-
getImage(): string;
|
|
1384
|
-
/** Gets the Open Graph description. @keywords get, description, og */
|
|
1385
|
-
getDescription(): string;
|
|
1386
|
-
/** Gets the Open Graph locale. @keywords get, locale, og */
|
|
1387
|
-
getLocale(): string;
|
|
1388
|
-
/** Gets the Open Graph site name. @keywords get, site, name, og */
|
|
1389
|
-
getSiteName(): string;
|
|
1390
|
-
/** Sets the Open Graph title. @keywords set, title, og */
|
|
1391
|
-
setTitle(title: string): this;
|
|
1392
|
-
/** Sets the Open Graph type. @keywords set, type, og */
|
|
1393
|
-
setType(type: MetaOpenGraphType): this;
|
|
1394
|
-
/** Sets the Open Graph URL. @keywords set, url, og */
|
|
1395
|
-
setUrl(url: string): this;
|
|
1396
|
-
/** Sets the Open Graph image URL. @keywords set, image, og */
|
|
1397
|
-
setImage(url: string): this;
|
|
1398
|
-
/** Sets the Open Graph description. @keywords set, description, og */
|
|
1399
|
-
setDescription(description: string): this;
|
|
1400
|
-
/** Sets the Open Graph locale. @keywords set, locale, og */
|
|
1401
|
-
setLocale(locale: string): this;
|
|
1402
|
-
/** Sets the Open Graph site name. @keywords set, site, name, og */
|
|
1403
|
-
setSiteName(siteName: string): this;
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
/** Static class for managing page meta tags @keywords meta static manager tags */
|
|
1407
|
-
export declare class MetaStatic {
|
|
1408
|
-
/** Gets singleton instance @keywords meta singleton item */
|
|
1409
|
-
static getItem(): At;
|
|
1410
|
-
/** Gets Open Graph instance @keywords meta og get */
|
|
1411
|
-
static getOg(): Ot;
|
|
1412
|
-
/** Gets Twitter Card instance @keywords meta twitter get */
|
|
1413
|
-
static getTwitter(): kt;
|
|
1414
|
-
/** Gets page title @keywords meta title get */
|
|
1415
|
-
static getTitle(): string;
|
|
1416
|
-
/** Gets meta keywords @keywords meta keywords get */
|
|
1417
|
-
static getKeywords(): string;
|
|
1418
|
-
/** Gets meta description @keywords meta description get */
|
|
1419
|
-
static getDescription(): string;
|
|
1420
|
-
/** Gets image URL @keywords meta image get */
|
|
1421
|
-
static getImage(): string;
|
|
1422
|
-
/** Gets canonical URL @keywords meta canonical get */
|
|
1423
|
-
static getCanonical(): string;
|
|
1424
|
-
/** Gets robots directive @keywords meta robots get */
|
|
1425
|
-
static getRobots(): MetaRobots;
|
|
1426
|
-
/** Gets author name @keywords meta author get */
|
|
1427
|
-
static getAuthor(): string;
|
|
1428
|
-
/** Gets site name @keywords meta sitename get */
|
|
1429
|
-
static getSiteName(): string;
|
|
1430
|
-
/** Gets locale @keywords meta locale get */
|
|
1431
|
-
static getLocale(): string;
|
|
1432
|
-
/** Sets page title @keywords meta title set */
|
|
1433
|
-
static setTitle(e: string): typeof MetaStatic;
|
|
1434
|
-
/** Sets meta keywords @keywords meta keywords set */
|
|
1435
|
-
static setKeywords(e: string | string[]): typeof MetaStatic;
|
|
1436
|
-
/** Sets meta description @keywords meta description set */
|
|
1437
|
-
static setDescription(e: string): typeof MetaStatic;
|
|
1438
|
-
/** Sets image URL @keywords meta image set */
|
|
1439
|
-
static setImage(e: string): typeof MetaStatic;
|
|
1440
|
-
/** Sets canonical URL @keywords meta canonical set */
|
|
1441
|
-
static setCanonical(e: string): typeof MetaStatic;
|
|
1442
|
-
/** Sets robots directive @keywords meta robots set */
|
|
1443
|
-
static setRobots(e: MetaRobots): typeof MetaStatic;
|
|
1444
|
-
/** Sets author name @keywords meta author set */
|
|
1445
|
-
static setAuthor(e: string): typeof MetaStatic;
|
|
1446
|
-
/** Sets site name @keywords meta sitename set */
|
|
1447
|
-
static setSiteName(e: string): typeof MetaStatic;
|
|
1448
|
-
/** Sets locale @keywords meta locale set */
|
|
1449
|
-
static setLocale(e: string): typeof MetaStatic;
|
|
1450
|
-
/** Sets title suffix @keywords meta suffix set */
|
|
1451
|
-
static setSuffix(e?: string): typeof MetaStatic;
|
|
1452
|
-
/** Generates meta tags HTML @keywords meta html generate */
|
|
1453
|
-
static html(): string;
|
|
1454
|
-
/** Generates safe title HTML @keywords meta title html */
|
|
1455
|
-
static htmlTitle(): string;
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
|
-
/** Manage Twitter Card meta tags @keywords meta twitter card tags */
|
|
1459
|
-
export declare class MetaTwitter extends MetaManager<MetaTwitterTag[]> {
|
|
1460
|
-
/** Initialize MetaTwitter instance @keywords constructor create */
|
|
1461
|
-
constructor();
|
|
1462
|
-
/** Get Twitter Card type @keywords get card type */
|
|
1463
|
-
getCard(): MetaTwitterCard;
|
|
1464
|
-
/** Get website or brand username @keywords get site username */
|
|
1465
|
-
getSite(): string;
|
|
1466
|
-
/** Get content creator username @keywords get creator username */
|
|
1467
|
-
getCreator(): string;
|
|
1468
|
-
/** Get page URL @keywords get url */
|
|
1469
|
-
getUrl(): string;
|
|
1470
|
-
/** Get card title @keywords get title */
|
|
1471
|
-
getTitle(): string;
|
|
1472
|
-
/** Get card description @keywords get description */
|
|
1473
|
-
getDescription(): string;
|
|
1474
|
-
/** Get card image URL @keywords get image */
|
|
1475
|
-
getImage(): string;
|
|
1476
|
-
/** Set Twitter Card type @keywords set card type */
|
|
1477
|
-
setCard(card: MetaTwitterCard): this;
|
|
1478
|
-
/** Set website or brand username @keywords set site username */
|
|
1479
|
-
setSite(site: string): this;
|
|
1480
|
-
/** Set content creator username @keywords set creator username */
|
|
1481
|
-
setCreator(creator: string): this;
|
|
1482
|
-
/** Set page URL @keywords set url */
|
|
1483
|
-
setUrl(url: string): this;
|
|
1484
|
-
/** Set card title @keywords set title */
|
|
1485
|
-
setTitle(title: string): this;
|
|
1486
|
-
/** Set card description @keywords set description */
|
|
1487
|
-
setDescription(description: string): this;
|
|
1488
|
-
/** Set card image URL @keywords set image */
|
|
1489
|
-
setImage(image: string): this;
|
|
1490
|
-
}
|
|
1491
|
-
|
|
1492
|
-
/** Static class for working with URL query parameters. @keywords query, url, parameters, search */
|
|
1493
|
-
export declare class Query {
|
|
1494
|
-
/** Returns the QueryInstance item. @keywords query, instance, storage */
|
|
1495
|
-
static getItem(): QueryInstance;
|
|
1496
|
-
/** Gets data from query parameters. @keywords query, get, read */
|
|
1497
|
-
static get<T>(name: string, defaultValue?: T | (() => T)): T;
|
|
1498
|
-
/** Sets data in query parameters. @keywords query, set, update */
|
|
1499
|
-
static set<T>(name: string, callback: T | (() => T)): void;
|
|
1500
|
-
/** Adds a change watcher for query parameters. @keywords query, watch, event */
|
|
1501
|
-
static addWatch<T>(name: string, callback: (value: T) => void): void;
|
|
1502
|
-
/** Removes a change watcher. @keywords query, unwatch, remove */
|
|
1503
|
-
static removeWatch<T>(name: string, callback: (value: T) => void): void;
|
|
1504
|
-
/** Reloads query data from URL. @keywords query, reload, refresh */
|
|
1505
|
-
static reload(): void;
|
|
1506
|
-
}
|
|
1507
|
-
|
|
1508
|
-
/** Class for working with data stored in URL query parameters. @keywords query, url, search_params */
|
|
1509
|
-
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
|
-
}
|
|
1517
|
-
|
|
1518
|
-
/** Timer that can be paused and resumed @keywords timer resumable pause resume delay */
|
|
1519
|
-
export declare class ResumableTimer {
|
|
1520
|
-
/** Creates a resumable timer */
|
|
1521
|
-
constructor(callback: FunctionVoid, delay?: number, blockStart?: boolean);
|
|
1522
|
-
/** Resumes the timer @keywords resume start timer */
|
|
1523
|
-
resume(): this;
|
|
1524
|
-
/** Pauses the timer @keywords pause timer */
|
|
1525
|
-
pause(): this;
|
|
1526
|
-
/** Resets and restarts the timer @keywords reset restart */
|
|
1527
|
-
reset(): this;
|
|
1528
|
-
/** Clears the timer and resets state @keywords clear */
|
|
1529
|
-
clear(): this;
|
|
1530
|
-
/** Gets the remaining time */
|
|
1531
|
-
protected getRemaining(): number;
|
|
1532
|
-
/** Gets the start time */
|
|
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 */
|
|
1545
|
-
export declare class ScrollbarWidth {
|
|
1546
|
-
/** Checks whether to enable scroll hiding @keywords scrollbar, hide, check */
|
|
1547
|
-
static is(): Promise<boolean>;
|
|
1548
|
-
/** Returns the width of the scroll @keywords scrollbar, width, size */
|
|
1549
|
-
static get(): Promise<number>;
|
|
1550
|
-
/** Returns the storage for scroll width @keywords scrollbar, storage */
|
|
1551
|
-
static getStorage(): DataStorage<number>;
|
|
1552
|
-
/** Returns the calculation flag @keywords scrollbar, calculate, state */
|
|
1553
|
-
static getCalculate(): boolean;
|
|
1554
|
-
/** Creates elements to check the width of the scroll @keywords scrollbar, element, create */
|
|
1555
|
-
static createElement(): HTMLElement | void;
|
|
1556
|
-
}
|
|
1557
|
-
|
|
1558
|
-
/**
|
|
1559
|
-
* Manages searchable list with options, state, and matching logic.
|
|
1560
|
-
* @keywords search, list, filter, match
|
|
1561
|
-
*/
|
|
1562
|
-
export declare class SearchList<T extends SearchItem, K extends SearchColumns<T>> {
|
|
1563
|
-
/** @keywords constructor, init */
|
|
1564
|
-
constructor(list: SearchListValue<T>, columns?: K, value?: string, options?: SearchOptions);
|
|
1565
|
-
/** Retrieves search data management instance. @keywords get, data */
|
|
1566
|
-
getData(): SearchListData<T, K>;
|
|
1567
|
-
/** Retrieves current items list. @keywords get, list */
|
|
1568
|
-
getList(): SearchListValue<T>;
|
|
1569
|
-
/** Retrieves current search columns. @keywords get, columns */
|
|
1570
|
-
getColumns(): K | undefined;
|
|
1571
|
-
/** Retrieves search item instance. @keywords get, item */
|
|
1572
|
-
getItem(): SearchListItem;
|
|
1573
|
-
/** Retrieves current search value string. @keywords get, value */
|
|
1574
|
-
getValue(): string | undefined;
|
|
1575
|
-
/** Retrieves search options instance. @keywords get, options */
|
|
1576
|
-
getOptions(): SearchListOptions;
|
|
1577
|
-
/** Updates item list and resets cache. @keywords set, list */
|
|
1578
|
-
setList(list: SearchListValue<T>): this;
|
|
1579
|
-
/** Updates search columns and resets cache. @keywords set, columns */
|
|
1580
|
-
setColumns(columns?: K): this;
|
|
1581
|
-
/** Updates search value and matcher. @keywords set, value */
|
|
1582
|
-
setValue(value?: string): this;
|
|
1583
|
-
/** Updates search options and matcher. @keywords set, options */
|
|
1584
|
-
setOptions(options: SearchOptions): this;
|
|
1585
|
-
/** Processes and formats items based on search state. @keywords process, format, to */
|
|
1586
|
-
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
|
-
}
|
|
1592
|
-
|
|
1593
|
-
/** @keywords search list data cache format */
|
|
1594
|
-
export declare class SearchListData<T extends SearchItem, K extends SearchColumns<T>> {
|
|
1595
|
-
/** @keywords constructor init */
|
|
1596
|
-
constructor(list: SearchListValue<T>, columns: K | undefined, item: SearchListItem, options: SearchListOptions);
|
|
1597
|
-
/** @keywords check ready */
|
|
1598
|
-
is(): this is this & {
|
|
1599
|
-
list: T[];
|
|
1600
|
-
columns: string[];
|
|
1601
|
-
};
|
|
1602
|
-
/** @keywords check list */
|
|
1603
|
-
isList(): this is this & {
|
|
1604
|
-
list: T[];
|
|
1605
|
-
};
|
|
1606
|
-
/** @keywords get list */
|
|
1607
|
-
getList(): SearchListValue<T>;
|
|
1608
|
-
/** @keywords get columns */
|
|
1609
|
-
getColumns(): K | undefined;
|
|
1610
|
-
/** @keywords get cache */
|
|
1611
|
-
protected getCache(): SearchCache<T>;
|
|
1612
|
-
/** @keywords set list */
|
|
1613
|
-
setList(list: SearchListValue<T>): this;
|
|
1614
|
-
/** @keywords set columns */
|
|
1615
|
-
setColumns(columns?: SearchColumns<T>): this;
|
|
1616
|
-
/** @keywords find cache item */
|
|
1617
|
-
findCacheItem(item: T): SearchCacheItem<T> | undefined;
|
|
1618
|
-
/** @keywords iterate foreach */
|
|
1619
|
-
forEach(callback: (item: SearchCacheItem<T>['item'], value: SearchCacheItem<T>['value']) => SearchFormatItem<T, K> | undefined): SearchFormatList<T, K>;
|
|
1620
|
-
/** @keywords format item */
|
|
1621
|
-
toFormatItem(item: T, selection: boolean): SearchFormatItem<T, K>;
|
|
1622
|
-
/** @keywords get column name */
|
|
1623
|
-
protected getColumnName(column: string): string;
|
|
1624
|
-
/** @keywords add tag highlight */
|
|
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 */
|
|
1635
|
-
export declare class SearchListItem {
|
|
1636
|
-
/** Creates SearchListItem @keywords constructor, init */
|
|
1637
|
-
constructor(value: string | undefined, options: SearchListOptions);
|
|
1638
|
-
/** Checks if value is filled @keywords check, exists */
|
|
1639
|
-
is(): this is this & {
|
|
1640
|
-
value: string;
|
|
1641
|
-
};
|
|
1642
|
-
/** Checks if search length meets limit @keywords search, limit */
|
|
1643
|
-
isSearch(): boolean;
|
|
1644
|
-
/** Returns current search value @keywords get, value */
|
|
1645
|
-
get(): string;
|
|
1646
|
-
/** Sets new search value @keywords set, value */
|
|
1647
|
-
set(value?: string): this;
|
|
1648
|
-
}
|
|
1649
|
-
|
|
1650
|
-
/** Matches search values against dataset using regex. @keywords search list matcher filter regex */
|
|
1651
|
-
export declare class SearchListMatcher {
|
|
1652
|
-
/** Creates a search list matcher instance. */
|
|
1653
|
-
constructor(item: SearchListItem, options: SearchListOptions);
|
|
1654
|
-
/** Checks if the matcher is initialized. */
|
|
1655
|
-
is(): boolean;
|
|
1656
|
-
/** Checks if value matches search expression. */
|
|
1657
|
-
isSelection(value: SearchCacheItem<any>['value']): boolean;
|
|
1658
|
-
/** Returns current regular expression matcher. */
|
|
1659
|
-
get(): RegExp | undefined;
|
|
1660
|
-
/** Updates matcher based on current item and options. */
|
|
1661
|
-
update(): void;
|
|
1662
|
-
/** Initializes or resets regular expression matcher. */
|
|
1663
|
-
protected initMatcher(): void;
|
|
1664
|
-
}
|
|
1665
|
-
|
|
1666
|
-
/** Manage search list options @keywords search_list_options search_options */
|
|
1667
|
-
export declare class SearchListOptions {
|
|
1668
|
-
/** @keywords constructor search_list_options */
|
|
1669
|
-
constructor(options?: SearchOptions | undefined);
|
|
1670
|
-
/** Get current search options @keywords get_options search_options */
|
|
1671
|
-
getOptions(): SearchOptions;
|
|
1672
|
-
/** Get minimum character limit for search @keywords get_limit search_limit */
|
|
1673
|
-
getLimit(): number;
|
|
1674
|
-
/** Check if all items should be returned regardless of match @keywords get_return_everything search_all */
|
|
1675
|
-
getReturnEverything(): boolean;
|
|
1676
|
-
/** Get search delay in milliseconds @keywords get_delay search_delay */
|
|
1677
|
-
getDelay(): number;
|
|
1678
|
-
/** Check if exact match search is enabled @keywords get_find_exact_match exact_search */
|
|
1679
|
-
getFindExactMatch(): boolean;
|
|
1680
|
-
/** Get CSS class name for match highlighting @keywords get_class_name search_highlight_class */
|
|
1681
|
-
getClassName(): string;
|
|
1682
|
-
/** Set new search options @keywords set_options search_options */
|
|
1683
|
-
setOptions(options: SearchOptions): this;
|
|
1684
|
-
}
|
|
1685
|
-
|
|
1686
|
-
type ServerStorageItem = {
|
|
1687
|
-
value: any;
|
|
1688
|
-
hydration: boolean;
|
|
1689
|
-
};
|
|
1690
|
-
type ServerStorageList = Record<string, ServerStorageItem>;
|
|
1691
|
-
/** @keywords ServerStorage, SSR, storage, isolation */
|
|
1692
|
-
export declare class ServerStorage {
|
|
1693
|
-
/** @keywords init, context, listener */
|
|
1694
|
-
static init(listener: () => Record<string, any> | undefined): typeof ServerStorage;
|
|
1695
|
-
/** @keywords reset, clear */
|
|
1696
|
-
static reset(): void;
|
|
1697
|
-
/** @keywords has, check, key */
|
|
1698
|
-
static has(key: string): boolean;
|
|
1699
|
-
/** @keywords get, retrieve, value */
|
|
1700
|
-
static get<T = any>(key: string, defaultValue?: () => T, hydration?: boolean): T;
|
|
1701
|
-
/** @keywords set, save, store */
|
|
1702
|
-
static set<T = any>(key: string, value: () => T, hydration?: boolean, storageList?: ServerStorageList): T;
|
|
1703
|
-
/** @keywords error, status, hide */
|
|
1704
|
-
static setErrorStatus(hide: boolean): void;
|
|
1705
|
-
/** @keywords remove, delete */
|
|
1706
|
-
static remove(key: string): void;
|
|
1707
|
-
/** @keywords toString, hydration, html */
|
|
1708
|
-
static toString(): string;
|
|
1709
|
-
}
|
|
1710
|
-
export {};
|
|
1711
|
-
|
|
1712
|
-
/** Storage callback manager @keywords storage callback manager register run */
|
|
1713
|
-
export declare class StorageCallback<T = any, Callback = (value: T) => void | Promise<void>> {
|
|
1714
|
-
/** Returns StorageCallback instance by name @keywords get instance storage callback */
|
|
1715
|
-
static getInstance<T>(name: string, group?: string): StorageCallback<T, (value: T) => void | Promise<void>>;
|
|
1716
|
-
constructor(name: string, group?: string);
|
|
1717
|
-
/** Returns loading state @keywords is loading state */
|
|
1718
|
-
isLoading(): boolean;
|
|
1719
|
-
/** Returns storage name @keywords get name */
|
|
1720
|
-
getName(): string;
|
|
1721
|
-
/** Returns loading state @keywords get loading state */
|
|
1722
|
-
getLoading(): boolean;
|
|
1723
|
-
/** Adds callback to list @keywords add callback */
|
|
1724
|
-
addCallback(callback: Callback, isOnce?: boolean): this;
|
|
1725
|
-
/** Removes callback from list @keywords remove callback */
|
|
1726
|
-
removeCallback(callback: Callback): this;
|
|
1727
|
-
/** Prepares before run @keywords preparation */
|
|
1728
|
-
preparation(): this;
|
|
1729
|
-
/** Executes all callbacks @keywords run execute */
|
|
1730
|
-
run(value: T): Promise<this>;
|
|
1731
|
-
}
|
|
1732
|
-
|
|
1733
|
-
/** Class for getting the translated text. @keywords translate, i18n, localization */
|
|
1734
|
-
export declare class Translate {
|
|
1735
|
-
/** Gets translated text by code. @keywords get, translate */
|
|
1736
|
-
static get(name: string, replacement?: string[] | Record<string, string | number>): Promise<string>;
|
|
1737
|
-
/** Returns TranslateInstance singleton. @keywords get, instance, translate */
|
|
1738
|
-
static getItem(): TranslateInstance;
|
|
1739
|
-
/** Gets translated text by code synchronously. @keywords get, sync, translate */
|
|
1740
|
-
static getSync(name: string, first?: boolean, replacement?: string[] | Record<string, string | number>): string;
|
|
1741
|
-
/** Gets a list of translations by codes. @keywords get, list, translate */
|
|
1742
|
-
static getList<T extends TranslateCode[]>(names: T): Promise<TranslateList<T>>;
|
|
1743
|
-
/** Gets a list of translations by codes synchronously. @keywords get, list, sync, translate */
|
|
1744
|
-
static getListSync<T extends TranslateCode[]>(names: T, first?: boolean): TranslateList<T>;
|
|
1745
|
-
/** Adds translations. @keywords add, translate */
|
|
1746
|
-
static add(names: string | string[]): Promise<void>;
|
|
1747
|
-
/** Adds translations synchronously. @keywords add, sync, translate */
|
|
1748
|
-
static addSync(data: Record<string, string>): void;
|
|
1749
|
-
/** Adds translations normally or synchronously based on environment. @keywords add, normal, sync, translate */
|
|
1750
|
-
static addNormalOrSync(data: Record<string, string>): Promise<void>;
|
|
1751
|
-
/** Adds translations synchronously by location. @keywords add, location, sync, translate */
|
|
1752
|
-
static addSyncByLocation(data: Record<string, Record<string, string>>): void;
|
|
1753
|
-
/** Adds translations synchronously from file. @keywords add, file, sync, translate */
|
|
1754
|
-
static addSyncByFile(data: TranslateDataFile): void;
|
|
1755
|
-
/** Sets the translation endpoint URL. @keywords set, url, translate */
|
|
1756
|
-
static setUrl(url: string): void;
|
|
1757
|
-
/** Sets the property name for request payload. @keywords set, props, name, translate */
|
|
1758
|
-
static setPropsName(name: string): void;
|
|
1759
|
-
/** Enables or disables API reading mode. @keywords set, api, read, translate */
|
|
1760
|
-
static setReadApi(value: boolean): void;
|
|
1761
|
-
/** Sets the translation configuration. @keywords set, config, translate */
|
|
1762
|
-
static setConfig(config: TranslateConfig): void;
|
|
1763
|
-
}
|
|
1764
|
-
|
|
1765
|
-
/** Manages translation files and loading data @keywords translate, file, localization */
|
|
1766
|
-
export declare class TranslateFile {
|
|
1767
|
-
protected language: string | (() => string);
|
|
1768
|
-
protected location: string | (() => string);
|
|
1769
|
-
/** Creates an instance of the class. @keywords constructor, translate */
|
|
1770
|
-
constructor(data?: TranslateDataFile, language?: string | (() => string), location?: string | (() => string));
|
|
1771
|
-
/** Checks if files exist for the current location or language. @keywords isFile, check, translate */
|
|
1772
|
-
isFile(): boolean;
|
|
1773
|
-
/** Returns the current location. @keywords getLocation, location, translate */
|
|
1774
|
-
getLocation(): string;
|
|
1775
|
-
/** Returns the current language. @keywords getLanguage, language, translate */
|
|
1776
|
-
getLanguage(): string;
|
|
1777
|
-
/** Returns translation list for the current location. @keywords getList, translations, load */
|
|
1778
|
-
getList(): Promise<TranslateDataFileList | undefined>;
|
|
1779
|
-
/** Adds a list of translation files. @keywords add, files, translate */
|
|
1780
|
-
add(data: TranslateDataFile): void;
|
|
1781
|
-
}
|
|
1782
|
-
|
|
1783
|
-
/** Class for managing translations and fetching localized text. @keywords translate translation i18n localization */
|
|
1784
|
-
export declare class TranslateInstance {
|
|
1785
|
-
/** @param url URL for getting translations @param propsName Property name for getting translations @param files List of files with translations */
|
|
1786
|
-
constructor(url?: string, propsName?: string, files?: TranslateFile);
|
|
1787
|
-
/** Gets translated text by its code. @keywords translate text get */
|
|
1788
|
-
get(name: string, replacement?: string[] | Record<string, string | number>): Promise<string>;
|
|
1789
|
-
/** Gets translated text synchronously by its code. @keywords translate text sync */
|
|
1790
|
-
getSync(name: string, first?: boolean, replacement?: string[] | Record<string, string | number>): string;
|
|
1791
|
-
/** Gets a list of translations by an array of codes. @keywords translate list async */
|
|
1792
|
-
getList<T extends TranslateCode[]>(names: T): Promise<TranslateList<T>>;
|
|
1793
|
-
/** Gets a list of translations synchronously by an array of codes. @keywords translate list sync */
|
|
1794
|
-
getListSync<T extends TranslateCode[]>(names: T, first?: boolean): TranslateList<T>;
|
|
1795
|
-
/** Adds a list of translated texts. @keywords translate add */
|
|
1796
|
-
add(names: string | string[]): Promise<void>;
|
|
1797
|
-
/** Adds texts in synchronous mode. @keywords translate add sync */
|
|
1798
|
-
addSync(data: Record<string, string>): void;
|
|
1799
|
-
/** Adds data via query or directly based on runtime environment. @keywords translate add normal sync */
|
|
1800
|
-
addNormalOrSync(data: Record<string, string>): Promise<void>;
|
|
1801
|
-
/** Adds texts synchronously by location. @keywords translate add location */
|
|
1802
|
-
addSyncByLocation(data: Record<string, Record<string, string>>): void;
|
|
1803
|
-
/** Adds texts synchronously from a file. @keywords translate add file */
|
|
1804
|
-
addSyncByFile(data: TranslateDataFile): void;
|
|
1805
|
-
/** Sets the translation endpoint URL. @keywords translate url set */
|
|
1806
|
-
setUrl(url: string): this;
|
|
1807
|
-
/** Sets the translation property name. @keywords translate propsName set */
|
|
1808
|
-
setPropsName(name: string): this;
|
|
1809
|
-
/** Sets the API read mode. @keywords translate readApi set */
|
|
1810
|
-
setReadApi(value: boolean): this;
|
|
1811
|
-
}
|
|
1812
|
-
|
|
1813
|
-
/** Base abstract class for URL-based state management. @keywords url_instance abstract state */
|
|
1814
|
-
export declare abstract class UrlInstanceAbstract {
|
|
1815
|
-
/** Watchers map for URL state variables */
|
|
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 */
|
|
1824
|
-
get<T>(name: string, defaultValue?: T | (() => T)): T;
|
|
1825
|
-
/** Set data value by name. @keywords set data */
|
|
1826
|
-
set<T>(name: string, callback: T | (() => T)): this;
|
|
1827
|
-
/** Add a watch callback for a specific property. @keywords add watch event */
|
|
1828
|
-
addWatch<T>(name: string, callback: (value: T) => void): this;
|
|
1829
|
-
/** Remove a watch callback. @keywords remove watch event */
|
|
1830
|
-
removeWatch<T>(name: string, callback: (value: T) => void): this;
|
|
1831
|
-
/** Reload state data. @keywords reload data */
|
|
1832
|
-
reload(): this;
|
|
1833
|
-
/** Get internal data record. @keywords get data record */
|
|
1834
|
-
protected getData(): Record<string, any>;
|
|
1835
|
-
/** Initialize internal data. @keywords init data */
|
|
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 */
|
|
1848
|
-
export declare class UrlItem {
|
|
1849
|
-
/** Returns a request-isolated instance of UrlItem. @keywords instance, singleton, url */
|
|
1850
|
-
static getInstance(): UrlItem;
|
|
1851
|
-
/** Constructs a new UrlItem instance. @keywords constructor, url */
|
|
1852
|
-
constructor(url?: string | URL);
|
|
1853
|
-
/** Full URL string. @keywords href, url */
|
|
1854
|
-
get href(): string;
|
|
1855
|
-
/** Protocol including trailing colon. @keywords protocol, url */
|
|
1856
|
-
get protocol(): string;
|
|
1857
|
-
/** Username. @keywords username, auth, url */
|
|
1858
|
-
get username(): string;
|
|
1859
|
-
/** Password. @keywords password, auth, url */
|
|
1860
|
-
get password(): string;
|
|
1861
|
-
/** Host (hostname and port). @keywords host, url */
|
|
1862
|
-
get host(): string;
|
|
1863
|
-
/** Hostname (excluding port). @keywords hostname, url */
|
|
1864
|
-
get hostname(): string;
|
|
1865
|
-
/** Port. @keywords port, url */
|
|
1866
|
-
get port(): string;
|
|
1867
|
-
/** Path name. @keywords pathname, path, url */
|
|
1868
|
-
get pathname(): string;
|
|
1869
|
-
/** Search string including leading question mark. @keywords search, query, url */
|
|
1870
|
-
get search(): string;
|
|
1871
|
-
/** Readonly search params object. @keywords searchParams, query, url */
|
|
1872
|
-
get searchParams(): URLSearchParams;
|
|
1873
|
-
/** Hash string including leading hash sign. @keywords hash, anchor, url */
|
|
1874
|
-
get hash(): string;
|
|
1875
|
-
/** Origin of the URL. @keywords origin, url */
|
|
1876
|
-
get origin(): string;
|
|
1877
|
-
/** Checks if the specified query parameter exists. @keywords hasParam, query, check */
|
|
1878
|
-
hasParam(name: string): boolean;
|
|
1879
|
-
/** Returns the value of a query parameter. @keywords getParam, query, value */
|
|
1880
|
-
getParam(name: string): string | undefined;
|
|
1881
|
-
/** Returns all query parameters as an object with transformed types. @keywords getParams, query, object */
|
|
1882
|
-
getParams(): Record<string, any>;
|
|
1883
|
-
/** Updates the URL value. @keywords set, url */
|
|
1884
|
-
set(url?: string | URL): this;
|
|
1885
|
-
/** Sets the value of a query parameter. @keywords setParam, query, update */
|
|
1886
|
-
setParam(name: string, value: string): this;
|
|
1887
|
-
/** Replaces all query parameters with the specified object. @keywords setParams, query, replace */
|
|
1888
|
-
setParams(params: Record<string, any>): this;
|
|
1889
|
-
/** Deletes a query parameter. @keywords deleteParam, query, remove */
|
|
1890
|
-
deleteParam(name: string): this;
|
|
1891
|
-
/** Converts the Url instance to its string representation. @keywords toString, string, url */
|
|
1892
|
-
toString(): string;
|
|
1893
|
-
/** Converts the Url instance to JSON string representation. @keywords toJSON, json, url */
|
|
1894
|
-
toJSON(): string;
|
|
1895
|
-
}
|
|
1896
|
-
|
|
1897
|
-
/** Adds a tag to highlight matching text within a string. @keywords highlight match search wrap tag @param value target string @param search search query or pattern */
|
|
1898
|
-
export declare function addTagHighlightMatch(value: string, search?: string | RegExp, className?: string, shouldEscape?: boolean): string;
|
|
1899
|
-
|
|
1900
|
-
/** Converts a value to a string. @keywords convert, string, to_string */
|
|
1901
|
-
export declare function anyToString<V>(value: V, isArrayString?: boolean, trim?: boolean): string;
|
|
1902
|
-
|
|
1903
|
-
/** Applies a template to text, replacing keys with values. @keywords apply template replace string format */
|
|
1904
|
-
export declare const applyTemplate: (text: string, replacement?: Record<string, string | number | boolean> | string[]) => string;
|
|
1905
|
-
|
|
1906
|
-
/** Creates an array of elements filled with the specified value. @keywords array fill generate repeat */
|
|
1907
|
-
export declare function arrFill<T>(value: T, count: number): T[];
|
|
1908
|
-
|
|
1909
|
-
/** Converts a Blob to a Base64 string. @keywords blob base64 convert */
|
|
1910
|
-
export declare function blobToBase64(blob: Blob, clean?: boolean): Promise<string | undefined>;
|
|
1911
|
-
|
|
1912
|
-
/** Capitalizes the first letter of a string @keywords capitalize string formatting */
|
|
1913
|
-
export declare function capitalize(value: string, isLocale?: boolean): string;
|
|
1914
|
-
|
|
1915
|
-
/** Creates a deep copy of an object. @keywords copy clone object mutate */
|
|
1916
|
-
export declare function copyObject<T>(value: T): T;
|
|
1917
|
-
|
|
1918
|
-
/** Copies a simple object. @keywords copy object lite clone @param value Object for copying @param source Additional properties for copying */
|
|
1919
|
-
export declare function copyObjectLite<T, R = T>(value: T, source?: any): R;
|
|
1920
|
-
|
|
1921
|
-
/**
|
|
1922
|
-
* Creates a DOM element with the specified tag name, attributes, and options. @keywords createElement dom html tag
|
|
1923
|
-
*/
|
|
1924
|
-
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
|
-
|
|
1926
|
-
/** Executes callback when DOM is loaded or immediately if already ready @keywords dom content loaded ready */
|
|
1927
|
-
export declare function domContentLoaded<T = void>(callback: () => T | Promise<T>): Promise<T>;
|
|
1928
|
-
|
|
1929
|
-
/**
|
|
1930
|
-
* Selects the first element matching the specified selectors.
|
|
1931
|
-
* @keywords querySelector, dom, element, select
|
|
1932
|
-
*/
|
|
1933
|
-
export declare function domQuerySelector<E extends Element = Element>(selectors: string): E | undefined;
|
|
1934
|
-
|
|
1935
|
-
/** Selects all elements matching the given CSS selector. @keywords dom query selector all list elements */
|
|
1936
|
-
export declare function domQuerySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E> | undefined;
|
|
1937
|
-
|
|
1938
|
-
/** @keywords encode, attribute, html, escape */
|
|
1939
|
-
export declare function encodeAttribute(text: string): string;
|
|
1940
|
-
|
|
1941
|
-
/** Encodes special characters in a string for safe use in HTML attributes. @keywords encode, attribute, html, escape */
|
|
1942
|
-
export declare function encodeLiteAttribute(text: string): string;
|
|
1943
|
-
|
|
1944
|
-
/** Ensures maximum image size by resizing. @keywords image, resize, max, size, compress */
|
|
1945
|
-
export declare function ensureMaxSize(file: Uint8Array, compress?: number, type?: string): Promise<string>;
|
|
1946
|
-
|
|
1947
|
-
/** Escapes special regex characters in a string. @keywords escape, regex, regexp */
|
|
1948
|
-
export declare function escapeExp(value: string): string;
|
|
1949
|
-
|
|
1950
|
-
/** Stop event propagation and default behavior @keywords stop propagation event prevent default */
|
|
1951
|
-
export declare function eventStopPropagation(event: Event): void;
|
|
1952
|
-
|
|
1953
|
-
/** Executes the argument if it is a function, otherwise returns it as is. @keywords execute, function, callback */
|
|
1954
|
-
export declare function executeFunction<T>(callback: T | FunctionArgs<any, T>, ...args: any[]): T;
|
|
1955
|
-
|
|
1956
|
-
/** Safely executes a function and awaits its result if it returns a Promise. @keywords execute, promise, async, function */
|
|
1957
|
-
export declare function executePromise<T>(callback: ((...args: any[]) => Promise<T>) | ((...args: any[]) => T) | T, ...args: any[]): Promise<T>;
|
|
1958
|
-
|
|
1959
|
-
/** Executes a callback for each element in an object or collection and returns the results. @keywords foreach iterate collection map array object */
|
|
1960
|
-
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
|
-
|
|
1962
|
-
/**
|
|
1963
|
-
* Cyclically calls requestAnimationFrame until next returns true.
|
|
1964
|
-
* @keywords frame animation requestAnimationFrame loop
|
|
1965
|
-
*/
|
|
1966
|
-
export declare function frame(callback: () => void, next?: () => boolean, end?: () => void): void;
|
|
1967
|
-
|
|
1968
|
-
/** Split a string into an array of objects to highlight matches. @keywords highlight match search array */
|
|
1969
|
-
export declare function getArrayHighlightMatch(value: string, search?: string | RegExp): HighlightMatchItem[];
|
|
1970
|
-
|
|
1971
|
-
/**
|
|
1972
|
-
* Gets a list of attributes of an element.
|
|
1973
|
-
* @keywords get_attributes element dom
|
|
1974
|
-
*/
|
|
1975
|
-
export declare function getAttributes<E extends ElementOrWindow>(element?: ElementOrString<E>): Record<string, string | undefined>;
|
|
1976
|
-
|
|
1977
|
-
/**
|
|
1978
|
-
* Retrieves drag or clipboard text data.
|
|
1979
|
-
* @keywords clipboard, read, text, get
|
|
1980
|
-
*/
|
|
1981
|
-
export declare function getClipboardData(event?: ClipboardEvent): Promise<string>;
|
|
1982
|
-
|
|
1983
|
-
/** Returns column values from an array or object. @keywords get_column, column, array */
|
|
1984
|
-
export declare function getColumn<T, K extends keyof T>(array: ObjectOrArray<T>, column: K): (T[K] | undefined)[];
|
|
1985
|
-
|
|
1986
|
-
/** Returns the current date in the specified format. @keywords getCurrentDate, date, time */
|
|
1987
|
-
export declare function getCurrentDate(format?: GeoDate): string;
|
|
1988
|
-
|
|
1989
|
-
/** Returns the current time in milliseconds. @keywords getCurrentTime time milliseconds timestamp */
|
|
1990
|
-
export declare function getCurrentTime(): number;
|
|
1991
|
-
|
|
1992
|
-
/**
|
|
1993
|
-
* Returns the first Element matching the specified selector or element.
|
|
1994
|
-
* @keywords getElement querySelector dom element
|
|
1995
|
-
*/
|
|
1996
|
-
export declare function getElement<E extends ElementOrWindow, R extends Exclude<E, Window>>(element?: ElementOrString<E>): R | undefined;
|
|
1997
|
-
|
|
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
|
-
*/
|
|
2004
|
-
export declare function getElementId<E extends ElementOrWindow>(element?: ElementOrString<E>, selector?: string): string;
|
|
2005
|
-
|
|
2006
|
-
/**
|
|
2007
|
-
* Initializes the getElementId function with a custom listener.
|
|
2008
|
-
* @keywords initGetElementId, id, generator, ssr
|
|
2009
|
-
* @warning Initialization is mandatory for correct SSR functioning.
|
|
2010
|
-
*/
|
|
2011
|
-
export declare function initGetElementId(newListener: () => string | number): void;
|
|
2012
|
-
|
|
2013
|
-
/**
|
|
2014
|
-
* Get image element from HTMLImageElement or string source.
|
|
2015
|
-
* @keywords getElementImage, image, html, element
|
|
2016
|
-
*/
|
|
2017
|
-
export declare function getElementImage(image: HTMLImageElement | string): HTMLImageElement | undefined;
|
|
2018
|
-
|
|
2019
|
-
/**
|
|
2020
|
-
* Returns element property value or default value.
|
|
2021
|
-
* @keywords getElementItem, element property, value
|
|
2022
|
-
*/
|
|
2023
|
-
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
|
-
|
|
2025
|
-
/** Returns window or element @keywords element, window, match */
|
|
2026
|
-
export declare function getElementOrWindow<E extends ElementOrWindow>(element?: ElementOrString<E>): E | undefined;
|
|
2027
|
-
|
|
2028
|
-
/** Generates a safe script tag for data hydration. @keywords hydration script tag data @param id script tag ID @param data data to be stored */
|
|
2029
|
-
export declare function getElementSafeScript(id: string, data: any): string;
|
|
2030
|
-
|
|
2031
|
-
/** Creates a case-insensitive regular expression for exact match of a phrase. @keywords exact search expression regular expression */
|
|
2032
|
-
export declare function getExactSearchExp(search: string): RegExp;
|
|
2033
|
-
|
|
2034
|
-
/**
|
|
2035
|
-
* Creates a regular expression object to match text against a pattern.
|
|
2036
|
-
* @keywords regex, regular expression, pattern matching, getExp
|
|
2037
|
-
*/
|
|
2038
|
-
export declare function getExp(value: string, flags?: string, pattern?: string): RegExp;
|
|
2039
|
-
|
|
2040
|
-
/** Returns the first element of an array or object. @keywords get first element array object */
|
|
2041
|
-
export declare function getFirst<T>(value: T | T[] | Record<string, T>): T | undefined;
|
|
2042
|
-
|
|
2043
|
-
/** Retrieves and parses JSON data from a DOM script tag. @keywords hydration, json, script, dom */
|
|
2044
|
-
export declare function getHydrationData<T>(id: string, defaultValue: T, remove?: boolean): T;
|
|
2045
|
-
|
|
2046
|
-
/**
|
|
2047
|
-
* Returns data by path.
|
|
2048
|
-
* @keywords get item by path, object path resolver
|
|
2049
|
-
*/
|
|
2050
|
-
export declare function getItemByPath<T extends Record<string, any>, R = string>(item: T, path: string): R | undefined;
|
|
2051
|
-
|
|
2052
|
-
/** Returns the pressed key from keyboard event. @keywords key, keyboard, event */
|
|
2053
|
-
export declare function getKey(event: KeyboardEvent): string | number | undefined;
|
|
2054
|
-
|
|
2055
|
-
/**
|
|
2056
|
-
* Returns the last element of an array or object.
|
|
2057
|
-
* @keywords last, element, array, object
|
|
2058
|
-
* @param value input value
|
|
2059
|
-
*/
|
|
2060
|
-
export declare function getLast<T>(value: T | T[] | Record<string, T>): T | undefined;
|
|
2061
|
-
|
|
2062
|
-
/** Returns the length or size of various data types including Arrays, Objects, Maps, Sets, and Strings. @keywords length size count getLength */
|
|
2063
|
-
export declare function getLength(value: any): number;
|
|
2064
|
-
|
|
2065
|
-
/** Returns lengths of all elements in an array. @keywords getLengthOfAllArray array lengths */
|
|
2066
|
-
export declare function getLengthOfAllArray(value: ObjectOrArray<string>): number[];
|
|
2067
|
-
|
|
2068
|
-
/** Searches for the longest string in the array and returns its length. @keywords getMaxLengthAllArray max length array string */
|
|
2069
|
-
export declare function getMaxLengthAllArray(data: ObjectOrArray<string>): number;
|
|
2070
|
-
|
|
2071
|
-
/**
|
|
2072
|
-
* Returns the minimum length among all string values in an object or array.
|
|
2073
|
-
* @keywords getMinLengthAllArray, min_length, array, length
|
|
2074
|
-
*/
|
|
2075
|
-
export declare function getMinLengthAllArray(data: ObjectOrArray<string>): number;
|
|
2076
|
-
|
|
2077
|
-
/** Returns the position of the mouse cursor or click. @keywords getMouseClient mouse touch event coordinates */
|
|
2078
|
-
export declare function getMouseClient(event: MouseEvent | TouchEvent): ImageCoordinator;
|
|
2079
|
-
|
|
2080
|
-
/** Returns mouse X coordinate or click location. @keywords mouse client x coordinate */
|
|
2081
|
-
export declare function getMouseClientX(event: MouseEvent | TouchEvent): number;
|
|
2082
|
-
|
|
2083
|
-
/** Returns the Y coordinate of the mouse cursor or touch event. @keywords getMouseClientY mouse touch Y coordinate */
|
|
2084
|
-
export declare function getMouseClientY(event: MouseEvent | TouchEvent): number;
|
|
2085
|
-
|
|
2086
|
-
/** Filter object by keys @keywords getObjectByKeys pick keys */
|
|
2087
|
-
export declare function getObjectByKeys<T extends Record<string, any>, K extends keyof T>(data: T, keys: K[]): Pick<T, K>;
|
|
2088
|
-
|
|
2089
|
-
/** Removes properties equal to the exception value from the object. @keywords object filter remove undefined */
|
|
2090
|
-
export declare function getObjectNoUndefined<T extends Record<string | number, any>>(data: T, exception?: any): T;
|
|
2091
|
-
|
|
2092
|
-
/** Returns the object if values are set, otherwise an empty object. @keywords object none check @param value The value to evaluate */
|
|
2093
|
-
export declare function getObjectOrNone<T>(value: T): T & Record<string, any>;
|
|
2094
|
-
|
|
2095
|
-
/** Returns only letters, numbers, and spaces from a string. @keywords get only text sanitize alphanumeric */
|
|
2096
|
-
export declare function getOnlyText(text: any): string;
|
|
2097
|
-
|
|
2098
|
-
/**
|
|
2099
|
-
* Returns a random element from an array, object, or value.
|
|
2100
|
-
* @keywords random element, get random, pick item
|
|
2101
|
-
*/
|
|
2102
|
-
export declare function getRandomItem<T>(value?: T | T[] | Record<string, T>): T | undefined;
|
|
2103
|
-
|
|
2104
|
-
/**
|
|
2105
|
-
* Generates random text.
|
|
2106
|
-
* @keywords generate text random string
|
|
2107
|
-
*/
|
|
2108
|
-
export declare function getRandomText(min: number, max: number, symbol?: string, lengthMin?: number, lengthMax?: number): string;
|
|
2109
|
-
|
|
2110
|
-
/** Returns a key-value request string @keywords request string query encode */
|
|
2111
|
-
export declare function getRequestString(request: Record<string, any> | any[], sign?: string, separator?: string, subKey?: string): string;
|
|
2112
|
-
|
|
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
|
-
*/
|
|
2119
|
-
export declare function getSearchExp(search: string, limit?: number): RegExp;
|
|
2120
|
-
|
|
2121
|
-
/** Creates a separating search expression for word-based searching. @keywords search, regex, separator, words */
|
|
2122
|
-
export declare function getSeparatingSearchExp(search: string | RegExp, limit?: number): RegExp;
|
|
2123
|
-
|
|
2124
|
-
/** Returns the percentage step value between min and max. @keywords getStepPercent step percent calculation */
|
|
2125
|
-
export declare function getStepPercent(min: number | undefined, max: number): number;
|
|
2126
|
-
|
|
2127
|
-
/** Returns the step value relative to the given minimum and maximum. @keywords getStepValue step value minimum maximum */
|
|
2128
|
-
export declare function getStepValue(min: number | undefined, max: number): number;
|
|
2129
|
-
|
|
2130
|
-
/** Quick scroll element to target. @keywords scroll, element */
|
|
2131
|
-
export declare function goScroll(selector: string, elementTo: HTMLElement | undefined, elementCenter?: HTMLElement): void;
|
|
2132
|
-
|
|
2133
|
-
/**
|
|
2134
|
-
* Smooth scrolling to the target element.
|
|
2135
|
-
* @keywords scroll, smooth, element, animation
|
|
2136
|
-
*/
|
|
2137
|
-
export declare function goScrollSmooth<E extends HTMLElement>(element: E, options?: ScrollIntoViewOptions, shift?: number): void;
|
|
2138
|
-
|
|
2139
|
-
/** Scrolls the container to make the target element visible. @keywords scroll container target visible @param element container element @param elementTo target element @param behavior scroll behavior */
|
|
2140
|
-
export declare function goScrollTo(element?: HTMLElement, elementTo?: HTMLElement, behavior?: ScrollBehavior): void;
|
|
2141
|
-
|
|
2142
|
-
/** Invokes Web Share API native sharing mechanism. @keywords share api web_share */
|
|
2143
|
-
export declare function handleShare(data: ShareData): Promise<boolean>;
|
|
2144
|
-
|
|
2145
|
-
/** Checks if the value is in the current array. @keywords inArray array search contains */
|
|
2146
|
-
export declare function inArray<T>(array: T[], value: T): boolean;
|
|
2147
|
-
|
|
2148
|
-
/**
|
|
2149
|
-
* Initialization of data for scroll control. @keywords init scrollbar offset layout ui
|
|
2150
|
-
*/
|
|
2151
|
-
export declare function initScrollbarOffset(): Promise<void>;
|
|
2152
|
-
|
|
2153
|
-
/** Computes the intersection of object keys. @keywords intersect key object */
|
|
2154
|
-
export declare function intersectKey<T, KT extends keyof T, C, KC extends keyof C>(data?: T, comparison?: C): Record<KT & KC, T[KT]>;
|
|
2155
|
-
|
|
2156
|
-
/** Checks if API response is successful @keywords api, success, validate */
|
|
2157
|
-
export declare const isApiSuccess: <T>(data: ApiData<T>) => boolean;
|
|
2158
|
-
|
|
2159
|
-
/** Checks if the value is an array @keywords isArray, array, type_check */
|
|
2160
|
-
export declare function isArray<T, R>(value: T): value is Extract<T, R[]>;
|
|
2161
|
-
|
|
2162
|
-
/** Checks if the values of two objects are different. @keywords isDifferent object compare */
|
|
2163
|
-
export declare function isDifferent<T>(value: ObjectItem<T>, old: ObjectItem<T>): boolean;
|
|
2164
|
-
|
|
2165
|
-
/** Checks if the current environment is a data URL. @keywords isDomData, data url, dom */
|
|
2166
|
-
export declare function isDomData(): boolean;
|
|
2167
|
-
|
|
2168
|
-
/** Checks if code is running in a browser environment with window available. @keywords dom runtime browser window */
|
|
2169
|
-
export declare function isDomRuntime(): boolean;
|
|
2170
|
-
|
|
2171
|
-
/** Checks if an element is visible in DOM and not hidden by CSS. @keywords isElementVisible visible element check dom */
|
|
2172
|
-
export declare function isElementVisible<E extends ElementOrWindow>(elementSelectors?: ElementOrString<E>): boolean;
|
|
2173
|
-
|
|
2174
|
-
/** Checks if the pressed key is Enter or Space. @keywords enter, space, keyboard, key */
|
|
2175
|
-
export declare const isEnter: (event: KeyboardEvent, isInputElement?: boolean) => boolean;
|
|
2176
|
-
|
|
2177
|
-
/** Checks if field is filled. @keywords isFilled, check, filled, empty */
|
|
2178
|
-
export declare function isFilled<T>(value: T, zeroTrue?: boolean): value is Exclude<T, EmptyValue>;
|
|
2179
|
-
|
|
2180
|
-
/** Checks if the value is an integer or floating-point number. @keywords isFloat number check */
|
|
2181
|
-
export declare function isFloat(value: any): boolean;
|
|
2182
|
-
|
|
2183
|
-
/** Checks if the value is a function. @keywords isFunction, function, callback */
|
|
2184
|
-
export declare function isFunction<T>(callback: T): callback is Extract<T, FunctionArgs<any, any>>;
|
|
2185
|
-
|
|
2186
|
-
/**
|
|
2187
|
-
* Checks if an element is still in the DOM tree.
|
|
2188
|
-
* @keywords isInDom dom element check connected
|
|
2189
|
-
*/
|
|
2190
|
-
export declare function isInDom<E extends ElementOrWindow>(element?: ElementOrString<E>): boolean;
|
|
2191
|
-
|
|
2192
|
-
/** Checks if the element is an input field or editable. @keywords isInput input editable form @param element The element to check */
|
|
2193
|
-
export declare const isInput: (element: HTMLElement | EventTarget | null) => boolean;
|
|
2194
|
-
|
|
2195
|
-
/**
|
|
2196
|
-
* Checks if the value is between integers. @keywords isIntegerBetween, integer, between, range, check */
|
|
2197
|
-
export declare function isIntegerBetween(value: number, between: number): boolean;
|
|
2198
|
-
|
|
2199
|
-
/** Checks if a key event contains active modifier/meta keys. @keywords meta_key modifier_key keyboard */
|
|
2200
|
-
export declare const isMetaKey: (event: KeyboardEvent) => boolean;
|
|
2201
|
-
|
|
2202
|
-
/** Checks if value is null or undefined. @keywords isNull null undefined */
|
|
2203
|
-
export declare function isNull<T>(value: T): value is Extract<T, undefined>;
|
|
2204
|
-
|
|
2205
|
-
/** Checks if the value is a number. @keywords isNumber check number numeric */
|
|
2206
|
-
export declare function isNumber(value: any): boolean;
|
|
2207
|
-
|
|
2208
|
-
/** Checks if a value is an object. @keywords isObject object type check */
|
|
2209
|
-
export declare function isObject<T>(value: T): value is Extract<T, Record<any, any>>;
|
|
2210
|
-
|
|
2211
|
-
/** Checks if value is an object and not an array. @keywords isObjectNotArray object check */
|
|
2212
|
-
export declare function isObjectNotArray<T>(value: T): value is Exclude<Extract<T, Record<any, any>>, any[] | undefined | null>;
|
|
2213
|
-
|
|
2214
|
-
/** Check if the device is online. @keywords online status connection network */
|
|
2215
|
-
export declare function isOnLine(): boolean;
|
|
2216
|
-
|
|
2217
|
-
/**
|
|
2218
|
-
* Checks if value is selected within an array or equals a string.
|
|
2219
|
-
* @keywords isSelected, check, selected, value, match
|
|
2220
|
-
*/
|
|
2221
|
-
export declare function isSelected<T, S>(value: T, selected: T | T[] | S): boolean;
|
|
2222
|
-
|
|
2223
|
-
/** Checks if all values in the list are selected. @keywords isSelectedByList, select, match */
|
|
2224
|
-
export declare function isSelectedByList<T>(values: T | T[], selected: T | T[]): boolean;
|
|
2225
|
-
|
|
2226
|
-
/** Checks if the Web Share API is supported in the current environment. @keywords share api support */
|
|
2227
|
-
export declare function isShare(): boolean;
|
|
2228
|
-
|
|
2229
|
-
/** Checks if value is a string. @keywords isString, string, type */
|
|
2230
|
-
export declare function isString<T>(value: T): value is Extract<T, string>;
|
|
2231
|
-
|
|
2232
|
-
/** Checks if the pressed key is Tab. @keywords tab key keyboard event */
|
|
2233
|
-
export declare const isTab: (event: KeyboardEvent) => boolean;
|
|
2234
|
-
|
|
2235
|
-
/** Checks if object is Window. @keywords isWindow window dom */
|
|
2236
|
-
export declare function isWindow<E>(element: E): element is Extract<E, Window>;
|
|
2237
|
-
|
|
2238
|
-
/** Generate a random integer. @keywords random integer number */
|
|
2239
|
-
export declare function random(min: number, max: number): number;
|
|
2240
|
-
|
|
2241
|
-
/** Removes common prefix from string. @keywords remove_prefix string */
|
|
2242
|
-
export declare function removeCommonPrefix(mainStr: string, prefix: string): string;
|
|
2243
|
-
|
|
2244
|
-
/** Replaces component name in text @keywords replace component name */
|
|
2245
|
-
export declare const replaceComponentName: (text: string | undefined, name: string, componentName: string) => string | undefined;
|
|
2246
|
-
|
|
2247
|
-
/** Recursively merges objects and arrays. @keywords merge, replace, object, array */
|
|
2248
|
-
export declare function replaceRecursive<I>(array: ObjectItem<I>, replacement?: ObjectOrArray<I>, isMerge?: boolean): ObjectItem<I>;
|
|
2249
|
-
|
|
2250
|
-
/** Replaces template placeholders with values. @keywords replace template string */
|
|
2251
|
-
export declare function replaceTemplate(value: string, replaces: Record<string, string | FunctionReturn<string>>): string;
|
|
2252
|
-
|
|
2253
|
-
/** Resize type for image scaling. @keywords resize, image, scale, max */
|
|
2254
|
-
type ResizeImageByMaxType = 'auto' | 'width' | 'height';
|
|
2255
|
-
/** Resizes an image to fit within a maximum size constraint. @keywords resize, image, scale, max, dimensions */
|
|
2256
|
-
export declare function resizeImageByMax(image: HTMLImageElement | string, maxSize: number, type?: ResizeImageByMaxType, typeData?: string): string | undefined;
|
|
2257
|
-
export {};
|
|
2258
|
-
|
|
2259
|
-
/** Converts seconds into a time string. @keywords time, seconds, format, clock @param second specified seconds @param hasHour whether to include hours */
|
|
2260
|
-
export declare function secondToTime(second: number | string | undefined, hasHour?: boolean): string;
|
|
2261
|
-
|
|
2262
|
-
/** Modifies the value of an element identified by its key. @keywords set element property value */
|
|
2263
|
-
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
|
-
|
|
2265
|
-
/** Modifies data according to its type and settings. @keywords set values modify multiple */
|
|
2266
|
-
export declare function setValues<T>(selected: T | T[] | undefined, value: any, { multiple, maxlength, alwaysChange, notEmpty }: {
|
|
2267
|
-
multiple?: boolean | undefined;
|
|
2268
|
-
maxlength?: number | undefined;
|
|
2269
|
-
alwaysChange?: boolean | undefined;
|
|
2270
|
-
notEmpty?: boolean | undefined;
|
|
2271
|
-
}): T | T[] | undefined;
|
|
2272
|
-
|
|
2273
|
-
/** Pause execution for specified milliseconds. @keywords sleep delay timer timeout */
|
|
2274
|
-
export declare function sleep(ms: number): Promise<void>;
|
|
2275
|
-
|
|
2276
|
-
/** Sorts an array of items by specified columns or custom comparison function. @keywords sort, order, array */
|
|
2277
|
-
export declare function sortList<T = any>(list: T[], sortColumns: SortColumnItem[], customSort?: SortFunction<T>): T[];
|
|
2278
|
-
|
|
2279
|
-
/** Copies enumerable properties from source to target object. @keywords splice, object, copy, merge */
|
|
2280
|
-
export declare function splice<I>(array: ObjectItem<I>, replacement?: ObjectItem<I> | I, indexStart?: string): ObjectItem<I>;
|
|
2281
|
-
|
|
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 */
|
|
2284
|
-
export declare function strFill(value: string, count: number): string;
|
|
2285
|
-
|
|
2286
|
-
/** Splits a string by a separator with an optional limit. @keywords string split divide limit */
|
|
2287
|
-
export declare function strSplit(value: number | string, separator: string, limit?: number): string[];
|
|
2288
|
-
|
|
2289
|
-
/**
|
|
2290
|
-
* Converts a value to an array.
|
|
2291
|
-
* @keywords toArray array convert wrap
|
|
2292
|
-
*/
|
|
2293
|
-
export declare function toArray<T>(value: T): T extends any[] ? T : [T];
|
|
2294
|
-
|
|
2295
|
-
/** Convert a string to Upper Camel Case. @keywords toCamelCase upper camel case format case */
|
|
2296
|
-
export declare function toCamelCase(value: string): string;
|
|
2297
|
-
|
|
2298
|
-
/** Convert string to camel case with first letter uppercase @keywords to_camel_case_first, camelcase, string */
|
|
2299
|
-
export declare function toCamelCaseFirst(value: string): string;
|
|
2300
|
-
|
|
2301
|
-
/**
|
|
2302
|
-
* Conversion to Date object.
|
|
2303
|
-
* @keywords toDate, date, parse, time, transform
|
|
2304
|
-
*/
|
|
2305
|
-
export declare function toDate<T extends Date | number | string>(value?: T): (T & Date) | Date;
|
|
2306
|
-
|
|
2307
|
-
/** Converts a string to kebab-case format. @keywords kebab case dash string format */
|
|
2308
|
-
export declare function toKebabCase(value: string): string;
|
|
2309
|
-
|
|
2310
|
-
/** Converts a value to a finite number @keywords number, parse, float, toNumber */
|
|
2311
|
-
export declare function toNumber(value?: NumberOrString): number;
|
|
2312
|
-
|
|
2313
|
-
/** Converts data to a number considering the maximum value. @keywords toNumberByMax, limit, number */
|
|
2314
|
-
export declare function toNumberByMax(value: string | number, max?: string | number, formatting?: boolean, language?: string): string | number;
|
|
2315
|
-
|
|
2316
|
-
/** Converts a value to a positive finite number (> 0), or returns default value if invalid. @keywords toNumberPositive positive number validate */
|
|
2317
|
-
export declare function toNumberPositive(value?: number | string | null, defaultValue?: number): number;
|
|
2318
|
-
|
|
2319
|
-
/** Converts values to percentages @keywords toPercent percent ratio calculate */
|
|
2320
|
-
export declare function toPercent(maxValue: number, value: number): number;
|
|
2321
|
-
|
|
2322
|
-
/** Convert values to percentages with 100 multiplier @keywords percentage percent math value */
|
|
2323
|
-
export declare function toPercentBy100(maxValue: number, value: number): number;
|
|
2324
|
-
|
|
2325
|
-
/** Converts the value to a string. @keywords to_string convert string */
|
|
2326
|
-
export declare function toString<T>(value: T): string;
|
|
2327
|
-
|
|
2328
|
-
/** Transforms a string or value into its corresponding data type. @keywords transformation, parse, cast, data_type */
|
|
2329
|
-
export declare function transformation(value: any, isFunction?: boolean): any;
|
|
2330
|
-
|
|
2331
|
-
/**
|
|
2332
|
-
* Converts a Uint8Array to a base64 encoded string.
|
|
2333
|
-
* @keywords uint8array, base64, encode, binary
|
|
2334
|
-
*/
|
|
2335
|
-
export declare function uint8ArrayToBase64(bytes: Uint8Array): string;
|
|
2336
|
-
|
|
2337
|
-
/**
|
|
2338
|
-
* Removes duplicate entries in an array.
|
|
2339
|
-
* @keywords unique array duplicates remove
|
|
2340
|
-
*/
|
|
2341
|
-
export declare function uniqueArray<T>(value: T[]): T[];
|
|
2342
|
-
|
|
2343
|
-
/** Writes data to the clipboard. @keywords write clipboard text copy */
|
|
2344
|
-
export declare function writeClipboardData(text: string): Promise<void>;
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
/** Error cause list configuration array. @keywords error, cause, list, configuration */
|
|
2349
|
-
export declare const errorCauseList: ErrorCenterCauseList;
|
|
2350
|
-
|
|
2351
|
-
/**
|
|
2352
|
-
* Supported HTTP methods for API requests.
|
|
2353
|
-
* Поддерживаемые HTTP-методы для API-запросов.
|
|
2354
|
-
*/
|
|
2355
|
-
export declare enum ApiMethodItem {
|
|
2356
|
-
delete = "DELETE",
|
|
2357
|
-
get = "GET",
|
|
2358
|
-
post = "POST",
|
|
2359
|
-
put = "PUT",
|
|
2360
|
-
patch = "PATCH"
|
|
2361
|
-
}
|
|
2362
|
-
export type ApiCacheItem<T = any> = {
|
|
2363
|
-
value: T;
|
|
2364
|
-
age?: number;
|
|
2365
|
-
cacheAge: number;
|
|
2366
|
-
};
|
|
2367
|
-
export type ApiCacheList = Record<string, ApiCacheItem>;
|
|
2368
|
-
export type ApiConfig = {
|
|
2369
|
-
urlRoot?: string;
|
|
2370
|
-
origin?: string;
|
|
2371
|
-
headers?: ApiHeadersValue;
|
|
2372
|
-
requestDefault?: ApiDefaultValue;
|
|
2373
|
-
preparation?: (apiFetch: ApiFetch) => Promise<void>;
|
|
2374
|
-
end?: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>;
|
|
2375
|
-
timeout?: number;
|
|
2376
|
-
devMode?: boolean;
|
|
2377
|
-
wrapper?: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>;
|
|
2378
|
-
};
|
|
2379
|
-
export type ApiData<T = any> = T extends any[] ? T : ApiDataItem<T>;
|
|
2380
|
-
export type ApiDataValidation = {
|
|
2381
|
-
status?: ApiStatusType;
|
|
2382
|
-
code?: string | number;
|
|
2383
|
-
message?: string;
|
|
2384
|
-
error?: {
|
|
2385
|
-
code?: string | number;
|
|
2386
|
-
message?: string;
|
|
2387
|
-
};
|
|
2388
|
-
};
|
|
2389
|
-
export type ApiDataItem<T = any> = T & ApiDataValidation & {
|
|
2390
|
-
data?: T;
|
|
2391
|
-
success?: boolean;
|
|
2392
|
-
statusObject?: ApiStatusItem;
|
|
2393
|
-
errorObject?: ApiErrorItem;
|
|
2394
|
-
};
|
|
2395
|
-
export type ApiHeadersValue = Record<string, string> | (() => Record<string, string>);
|
|
2396
|
-
export type ApiDefaultValue = Record<string, any> | (() => Record<string, any>);
|
|
2397
|
-
export type ApiFetch = {
|
|
2398
|
-
api?: boolean;
|
|
2399
|
-
path?: string;
|
|
2400
|
-
pathFull?: string;
|
|
2401
|
-
method?: ApiMethod;
|
|
2402
|
-
request?: FormData | Record<string, any> | string;
|
|
2403
|
-
auth?: boolean;
|
|
2404
|
-
headers?: Record<string, string> | null;
|
|
2405
|
-
type?: string;
|
|
2406
|
-
toData?: boolean;
|
|
2407
|
-
global?: boolean;
|
|
2408
|
-
devMode?: boolean;
|
|
2409
|
-
hideError?: boolean;
|
|
2410
|
-
hideLoading?: boolean;
|
|
2411
|
-
retry?: number;
|
|
2412
|
-
retryDelay?: number;
|
|
2413
|
-
queryReturn?: (query: Response) => Promise<any | ApiDataValidation>;
|
|
2414
|
-
globalPreparation?: boolean;
|
|
2415
|
-
globalEnd?: boolean;
|
|
2416
|
-
init?: RequestInit;
|
|
2417
|
-
initError?: boolean;
|
|
2418
|
-
timeout?: number;
|
|
2419
|
-
controller?: AbortController;
|
|
2420
|
-
cache?: number;
|
|
2421
|
-
enableClientCache?: boolean;
|
|
2422
|
-
cacheId?: number | string;
|
|
2423
|
-
endResetLimit?: number;
|
|
2424
|
-
wrapper?: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>;
|
|
2425
|
-
};
|
|
2426
|
-
export type ApiHydrationItem = {
|
|
2427
|
-
path: string;
|
|
2428
|
-
method: ApiMethod;
|
|
2429
|
-
request?: ApiFetch['request'];
|
|
2430
|
-
response: any;
|
|
2431
|
-
};
|
|
2432
|
-
export type ApiHydrationList = ApiHydrationItem[];
|
|
2433
|
-
export type ApiErrorStorageItem = Record<string, any> & {
|
|
2434
|
-
url: string | RegExp;
|
|
2435
|
-
method: ApiMethodItem;
|
|
2436
|
-
code?: string;
|
|
2437
|
-
status?: number;
|
|
2438
|
-
validation?: (response: Response) => boolean;
|
|
2439
|
-
message?: string | ((response?: Response) => string);
|
|
2440
|
-
};
|
|
2441
|
-
export type ApiErrorStorageList = ApiErrorStorageItem[];
|
|
2442
|
-
export type ApiMethod = string | ApiMethodItem;
|
|
2443
|
-
export type ApiPreparationEnd = {
|
|
2444
|
-
reset?: boolean;
|
|
2445
|
-
data?: any;
|
|
2446
|
-
};
|
|
2447
|
-
export type ApiResponseItem = {
|
|
2448
|
-
path: string | RegExp;
|
|
2449
|
-
method: ApiMethod;
|
|
2450
|
-
request?: ApiFetch['request'] | '*any';
|
|
2451
|
-
response: any | ((request?: ApiFetch['request']) => any);
|
|
2452
|
-
disable?: any;
|
|
2453
|
-
isForGlobal?: boolean;
|
|
2454
|
-
lag?: any;
|
|
2455
|
-
};
|
|
2456
|
-
export type ApiStatusItem = {
|
|
2457
|
-
status?: number;
|
|
2458
|
-
statusText?: string;
|
|
2459
|
-
error?: string;
|
|
2460
|
-
lastResponse?: any;
|
|
2461
|
-
lastStatus?: ApiStatusType;
|
|
2462
|
-
lastCode?: string;
|
|
2463
|
-
lastMessage?: string;
|
|
2464
|
-
};
|
|
2465
|
-
export type ApiStatusType = 'success' | 'error' | 'warning' | 'info';
|
|
2466
|
-
|
|
2467
|
-
export type Undefined = undefined | null;
|
|
2468
|
-
export type EmptyValue = Undefined | 0 | false | '' | 'undefined' | 'null' | '0' | 'false' | '[]';
|
|
2469
|
-
export type NumberOrString = number | string;
|
|
2470
|
-
export type NumberOrStringOrBoolean = number | string | boolean;
|
|
2471
|
-
export type NumberOrStringOrDate = NumberOrString | Date;
|
|
2472
|
-
export type NormalOrArray<T = NumberOrString> = T | T[];
|
|
2473
|
-
export type NormalOrPromise<T> = T | Promise<T>;
|
|
2474
|
-
export type ObjectItem<T = any> = Record<string, T>;
|
|
2475
|
-
export type ObjectOrArray<T = any> = T[] | ObjectItem<T>;
|
|
2476
|
-
export type ArrayToItem<T> = T extends any[] ? T[number] : T;
|
|
2477
|
-
export type FunctionReturn<R = any> = () => R;
|
|
2478
|
-
export type FunctionVoid = () => void;
|
|
2479
|
-
export type FunctionArgs<T, R> = (...args: T[]) => R;
|
|
2480
|
-
export type FunctionAnyType<T = any, R = any> = (...args: T[]) => R;
|
|
2481
|
-
export type ItemList<T = any> = Record<string, T>;
|
|
2482
|
-
export type Item<V> = {
|
|
2483
|
-
index: string;
|
|
2484
|
-
value: V;
|
|
2485
|
-
};
|
|
2486
|
-
export type ItemValue<V> = {
|
|
2487
|
-
label: string;
|
|
2488
|
-
value: V;
|
|
2489
|
-
};
|
|
2490
|
-
export type ItemName<V> = {
|
|
2491
|
-
name: string | number;
|
|
2492
|
-
value: V;
|
|
2493
|
-
};
|
|
2494
|
-
export type ElementOrWindow = HTMLElement | Window;
|
|
2495
|
-
export type ElementOrString<E extends ElementOrWindow> = E | string;
|
|
2496
|
-
export type EventOptions = AddEventListenerOptions | boolean | undefined;
|
|
2497
|
-
export type EventListenerDetail<O extends Event, D extends Record<string, any>> = (event: O, detail?: D) => void;
|
|
2498
|
-
export type EventActivityItem<E extends ElementOrWindow> = {
|
|
2499
|
-
element: E | undefined;
|
|
2500
|
-
type: string;
|
|
2501
|
-
listener?: (event: any | Event) => void;
|
|
2502
|
-
observer?: ResizeObserver;
|
|
2503
|
-
};
|
|
2504
|
-
export type ImageCoordinator = {
|
|
2505
|
-
x: number;
|
|
2506
|
-
y: number;
|
|
2507
|
-
};
|
|
2508
|
-
|
|
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
|
-
export type ErrorCenterGroup = string | undefined;
|
|
2590
|
-
/** Interface for an error item / Интерфейс для элемента ошибки */
|
|
2591
|
-
export type ErrorCenterCauseItem<D = any> = {
|
|
2592
|
-
group?: ErrorCenterGroup;
|
|
2593
|
-
code: string;
|
|
2594
|
-
priority?: number;
|
|
2595
|
-
label?: string;
|
|
2596
|
-
message?: string;
|
|
2597
|
-
details?: D;
|
|
2598
|
-
};
|
|
2599
|
-
/** List of error items / Список элементов ошибок */
|
|
2600
|
-
export type ErrorCenterCauseList = ErrorCenterCauseItem[];
|
|
2601
|
-
/** Callback function for error handling / Функция обратного вызова для обработки ошибок */
|
|
2602
|
-
export type ErrorCenterHandlerCallback = (cause: ErrorCenterCauseItem) => void;
|
|
2603
|
-
/** Interface for error handler storage / Интерфейс для хранения обработчика ошибок */
|
|
2604
|
-
export type ErrorCenterHandlerItem = {
|
|
2605
|
-
group?: ErrorCenterGroup;
|
|
2606
|
-
handlers: ErrorCenterHandlerCallback[];
|
|
2607
|
-
};
|
|
2608
|
-
/** List of error handlers / Список обработчиков ошибок */
|
|
2609
|
-
export type ErrorCenterHandlerList = ErrorCenterHandlerItem[];
|
|
2610
|
-
/** Callback function to check whether to log error to console / Функция обратного вызова для проверки вывода ошибки в консоль */
|
|
2611
|
-
export type ErrorCenterHandlerIsConsoleCallback = (cause: ErrorCenterCauseItem) => boolean;
|
|
2612
|
-
/** Type for console logging configuration / Тип для конфигурации вывода в консоль */
|
|
2613
|
-
export type ErrorCenterHandlerIsConsole = boolean | ErrorCenterHandlerIsConsoleCallback;
|
|
2614
|
-
|
|
2615
|
-
export declare enum FormattersType {
|
|
2616
|
-
currency = "currency",
|
|
2617
|
-
date = "date",
|
|
2618
|
-
name = "name",
|
|
2619
|
-
number = "number",
|
|
2620
|
-
plural = "plural",
|
|
2621
|
-
unit = "unit"
|
|
2622
|
-
}
|
|
2623
|
-
export type FormattersOptionsCurrency = {
|
|
2624
|
-
currencyPropName?: string;
|
|
2625
|
-
options?: string | Intl.NumberFormatOptions;
|
|
2626
|
-
numberOnly?: boolean;
|
|
2627
|
-
};
|
|
2628
|
-
export type FormattersOptionsDate = {
|
|
2629
|
-
type?: GeoDate;
|
|
2630
|
-
options?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions;
|
|
2631
|
-
hour24?: boolean;
|
|
2632
|
-
};
|
|
2633
|
-
export type FormattersOptionsName = {
|
|
2634
|
-
lastPropName?: string;
|
|
2635
|
-
firstPropName?: string;
|
|
2636
|
-
surname?: string;
|
|
2637
|
-
short?: boolean;
|
|
2638
|
-
};
|
|
2639
|
-
export type FormattersOptionsNumber = {
|
|
2640
|
-
options?: Intl.NumberFormatOptions;
|
|
2641
|
-
};
|
|
2642
|
-
export type FormattersOptionsPlural = {
|
|
2643
|
-
words: string;
|
|
2644
|
-
options?: Intl.PluralRulesOptions;
|
|
2645
|
-
optionsNumber?: Intl.NumberFormatOptions;
|
|
2646
|
-
};
|
|
2647
|
-
export type FormattersOptionsUnit = {
|
|
2648
|
-
unit: string | Intl.NumberFormatOptions;
|
|
2649
|
-
};
|
|
2650
|
-
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>;
|
|
2651
|
-
export type FormattersOptionsItem<Type extends FormattersType = FormattersType, R = string> = {
|
|
2652
|
-
type?: Type;
|
|
2653
|
-
transformation?: (valueOriginal: any, item: any, options?: FormattersOptionsInformation<Type>) => R;
|
|
2654
|
-
options?: FormattersOptionsInformation<Type>;
|
|
2655
|
-
};
|
|
2656
|
-
export type FormattersOptionsList = Record<string, FormattersOptionsItem>;
|
|
2657
|
-
export type FormattersListItem = Record<string, any>;
|
|
2658
|
-
export type FormattersList<Item extends FormattersListItem> = Item[];
|
|
2659
|
-
export type FormattersCapitalize<K extends string> = K extends `${infer First}.${infer Rest}` ? `${First}${Capitalize<FormattersCapitalize<Rest>>}` : K;
|
|
2660
|
-
export type FormattersColumns<T extends FormattersOptionsList> = (keyof T & string)[];
|
|
2661
|
-
export type FormattersKey<K, A extends string = 'Format'> = K extends string ? `${FormattersCapitalize<K>}${A}` : never;
|
|
2662
|
-
export type FormattersDataItem<T extends FormattersListItem, KT extends string[]> = {
|
|
2663
|
-
[K in keyof T | FormattersKey<KT[number]>]: K extends keyof T ? T[K] : string;
|
|
2664
|
-
};
|
|
2665
|
-
export type FormattersListFormat<T extends FormattersListItem, K extends string[]> = FormattersDataItem<T, K>[];
|
|
2666
|
-
export type FormattersListColumnItem<T extends FormattersListItem, O extends FormattersOptionsList> = FormattersDataItem<T, FormattersColumns<O>>;
|
|
2667
|
-
export type FormattersListColumns<T extends FormattersListItem, O extends FormattersOptionsList> = FormattersListFormat<T, FormattersColumns<O>>;
|
|
2668
|
-
export type FormattersListProp = FormattersList<FormattersListItem> | FormattersListItem;
|
|
2669
|
-
export type FormattersItemProp<List extends FormattersListProp> = ArrayToItem<List>;
|
|
2670
|
-
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
|
-
/** Formatters utility class for transforming data lists and items. @keywords formatters transform data ui */
|
|
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 */
|
|
2708
|
-
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
|
-
export type GeoFirstDay = 1 | 6 | 0;
|
|
2711
|
-
/** @keywords geo, hours, time, format */
|
|
2712
|
-
export type GeoHours = '12' | '24';
|
|
2713
|
-
/** @keywords geo, timezone, style, format */
|
|
2714
|
-
export type GeoTimeZoneStyle = 'minute' | 'hour' | 'ISO8601' | 'RFC';
|
|
2715
|
-
/** @keywords geo, item, country, language */
|
|
2716
|
-
export interface GeoItem {
|
|
2717
|
-
country: string;
|
|
2718
|
-
countryAlternative?: string[];
|
|
2719
|
-
language: string;
|
|
2720
|
-
languageAlternative?: string[];
|
|
2721
|
-
firstDay?: string | null;
|
|
2722
|
-
zone?: string | null;
|
|
2723
|
-
phoneCode?: string;
|
|
2724
|
-
phoneWithin?: string;
|
|
2725
|
-
phoneMask?: string | string[];
|
|
2726
|
-
nameFormat?: 'fl' | 'fsl' | 'lf' | 'lsf' | string;
|
|
2727
|
-
unit?: {
|
|
2728
|
-
'millimeter'?: string;
|
|
2729
|
-
'centimeter'?: string;
|
|
2730
|
-
'meter'?: string;
|
|
2731
|
-
'kilometer'?: string;
|
|
2732
|
-
'square-meter'?: string;
|
|
2733
|
-
'hectare'?: string;
|
|
2734
|
-
'gram'?: string;
|
|
2735
|
-
'kilogram'?: string;
|
|
2736
|
-
'tonne'?: string;
|
|
2737
|
-
'milliliter'?: string;
|
|
2738
|
-
'liter'?: string;
|
|
2739
|
-
'celsius'?: string;
|
|
2740
|
-
'kilometer-per-hour'?: string;
|
|
2741
|
-
};
|
|
2742
|
-
}
|
|
2743
|
-
/** @keywords geo, item, full, standard */
|
|
2744
|
-
export interface GeoItemFull extends Omit<GeoItem, 'firstDay'> {
|
|
2745
|
-
standard: string;
|
|
2746
|
-
firstDay: string;
|
|
2747
|
-
location: string;
|
|
2748
|
-
locationCountry: string;
|
|
2749
|
-
locationLanguage: string;
|
|
2750
|
-
}
|
|
2751
|
-
/** @keywords geo, flag, item, country */
|
|
2752
|
-
export interface GeoFlagItem {
|
|
2753
|
-
language: string;
|
|
2754
|
-
languageCode: string;
|
|
2755
|
-
country: string;
|
|
2756
|
-
countryCode: string;
|
|
2757
|
-
standard: string;
|
|
2758
|
-
icon?: string;
|
|
2759
|
-
label: string;
|
|
2760
|
-
value: string;
|
|
2761
|
-
phoneCode?: string;
|
|
2762
|
-
}
|
|
2763
|
-
/** @keywords geo, flag, national, language */
|
|
2764
|
-
export interface GeoFlagNational extends GeoFlagItem {
|
|
2765
|
-
description: string;
|
|
2766
|
-
nationalLanguage: string;
|
|
2767
|
-
nationalCountry: string;
|
|
2768
|
-
}
|
|
2769
|
-
/** @keywords geo, phone, value, metadata */
|
|
2770
|
-
export interface GeoPhoneValue {
|
|
2771
|
-
phone: number;
|
|
2772
|
-
within: number;
|
|
2773
|
-
mask: string[];
|
|
2774
|
-
value: string;
|
|
2775
|
-
}
|
|
2776
|
-
/** @keywords geo, phone, map, trie */
|
|
2777
|
-
export interface GeoPhoneMap {
|
|
2778
|
-
items: GeoPhoneValue[];
|
|
2779
|
-
info: GeoPhoneValue | undefined;
|
|
2780
|
-
value: string | undefined;
|
|
2781
|
-
mask: string[];
|
|
2782
|
-
maskFull: string[];
|
|
2783
|
-
next: Record<string, GeoPhoneMap>;
|
|
2784
|
-
}
|
|
2785
|
-
/** @keywords geo, phone, map, info */
|
|
2786
|
-
export interface GeoPhoneMapInfo {
|
|
2787
|
-
item?: GeoPhoneMap;
|
|
2788
|
-
phone?: string;
|
|
2789
|
-
}
|
|
2790
|
-
|
|
2791
|
-
/** Standard HTML meta tags @keywords meta_tag title description keywords robots author */
|
|
2792
|
-
export declare enum MetaTag {
|
|
2793
|
-
/** Page title */
|
|
2794
|
-
title = "title",
|
|
2795
|
-
/** Page description */
|
|
2796
|
-
description = "description",
|
|
2797
|
-
/** Keywords */
|
|
2798
|
-
keywords = "keywords",
|
|
2799
|
-
/** Canonical URL */
|
|
2800
|
-
canonical = "canonical",
|
|
2801
|
-
/** Search engine instructions */
|
|
2802
|
-
robots = "robots",
|
|
2803
|
-
/** Content author */
|
|
2804
|
-
author = "author"
|
|
2805
|
-
}
|
|
2806
|
-
|
|
2807
|
-
/** Search engine crawler directives @keywords robots_directive index follow archive snippet */
|
|
2808
|
-
export declare enum MetaRobots {
|
|
2809
|
-
/** Allow indexing and following links */
|
|
2810
|
-
indexFollow = "index, follow",
|
|
2811
|
-
/** Do not index the page, but follow its links */
|
|
2812
|
-
noIndexFollow = "noindex, follow",
|
|
2813
|
-
/** Index the page, but do not follow its links */
|
|
2814
|
-
indexNoFollow = "index, nofollow",
|
|
2815
|
-
/** Do not index the page and do not follow its links */
|
|
2816
|
-
noIndexNoFollow = "noindex, nofollow",
|
|
2817
|
-
/** Prevent caching of the page */
|
|
2818
|
-
noArchive = "noarchive",
|
|
2819
|
-
/** Do not show a snippet or description in search results */
|
|
2820
|
-
noSnippet = "nosnippet",
|
|
2821
|
-
/** Do not display image preview in search results */
|
|
2822
|
-
noImageIndex = "noimageindex",
|
|
2823
|
-
/** Allow indexing images only */
|
|
2824
|
-
images = "images",
|
|
2825
|
-
/** Do not show cached version or translation link */
|
|
2826
|
-
noTranslate = "notranslate",
|
|
2827
|
-
/** Prevent page being shown in preview */
|
|
2828
|
-
noPreview = "nopreview",
|
|
2829
|
-
/** Allow only text content indexing */
|
|
2830
|
-
textOnly = "textonly",
|
|
2831
|
-
/** Do not index subpages or parameters */
|
|
2832
|
-
noIndexSubpages = "noindex, noarchive",
|
|
2833
|
-
/** Use meta directives from HTTP headers */
|
|
2834
|
-
none = "none"
|
|
2835
|
-
}
|
|
2836
|
-
|
|
2837
|
-
/** Open Graph metadata tags @keywords open_graph og_tag social_meta */
|
|
2838
|
-
export declare enum MetaOpenGraphTag {
|
|
2839
|
-
/** Page title */
|
|
2840
|
-
title = "og:title",
|
|
2841
|
-
/** Content type */
|
|
2842
|
-
type = "og:type",
|
|
2843
|
-
/** Canonical URL of the page */
|
|
2844
|
-
url = "og:url",
|
|
2845
|
-
/** Preview image URL */
|
|
2846
|
-
image = "og:image",
|
|
2847
|
-
/** Brief page description */
|
|
2848
|
-
description = "og:description",
|
|
2849
|
-
/** Page language */
|
|
2850
|
-
locale = "og:locale",
|
|
2851
|
-
/** Site name */
|
|
2852
|
-
siteName = "og:site_name",
|
|
2853
|
-
/** Alternative language versions */
|
|
2854
|
-
localeAlternate = "og:locale:alternate",
|
|
2855
|
-
/** Alternative form of image */
|
|
2856
|
-
imageUrl = "og:image:url",
|
|
2857
|
-
/** HTTPS version of the image */
|
|
2858
|
-
imageSecureUrl = "og:image:secure_url",
|
|
2859
|
-
/** Image MIME type */
|
|
2860
|
-
imageType = "og:image:type",
|
|
2861
|
-
/** Image width in pixels */
|
|
2862
|
-
imageWidth = "og:image:width",
|
|
2863
|
-
/** Image height in pixels */
|
|
2864
|
-
imageHeight = "og:image:height",
|
|
2865
|
-
/** Alternative image text */
|
|
2866
|
-
imageAlt = "og:image:alt",
|
|
2867
|
-
/** Video URL */
|
|
2868
|
-
video = "og:video",
|
|
2869
|
-
/** Alternative video URL */
|
|
2870
|
-
videoUrl = "og:video:url",
|
|
2871
|
-
/** HTTPS version of video */
|
|
2872
|
-
videoSecureUrl = "og:video:secure_url",
|
|
2873
|
-
/** Video MIME type */
|
|
2874
|
-
videoType = "og:video:type",
|
|
2875
|
-
/** Video width */
|
|
2876
|
-
videoWidth = "og:video:width",
|
|
2877
|
-
/** Video height */
|
|
2878
|
-
videoHeight = "og:video:height",
|
|
2879
|
-
/** Audio file URL */
|
|
2880
|
-
audio = "og:audio",
|
|
2881
|
-
/** HTTPS version of audio */
|
|
2882
|
-
audioSecureUrl = "og:audio:secure_url",
|
|
2883
|
-
/** Audio MIME type */
|
|
2884
|
-
audioType = "og:audio:type",
|
|
2885
|
-
/** Publication date */
|
|
2886
|
-
articlePublishedTime = "article:published_time",
|
|
2887
|
-
/** Last update date */
|
|
2888
|
-
articleModifiedTime = "article:modified_time",
|
|
2889
|
-
/** Expiration date */
|
|
2890
|
-
articleExpirationTime = "article:expiration_time",
|
|
2891
|
-
/** Author */
|
|
2892
|
-
articleAuthor = "article:author",
|
|
2893
|
-
/** Article category */
|
|
2894
|
-
articleSection = "article:section",
|
|
2895
|
-
/** Tags or keywords */
|
|
2896
|
-
articleTag = "article:tag",
|
|
2897
|
-
/** Book author */
|
|
2898
|
-
bookAuthor = "book:author",
|
|
2899
|
-
/** Book ISBN */
|
|
2900
|
-
bookIsbn = "book:isbn",
|
|
2901
|
-
/** Book publication date */
|
|
2902
|
-
bookReleaseDate = "book:release_date",
|
|
2903
|
-
/** Topics or tags */
|
|
2904
|
-
bookTag = "book:tag",
|
|
2905
|
-
/** Track duration in seconds */
|
|
2906
|
-
musicDuration = "music:duration",
|
|
2907
|
-
/** Album URL */
|
|
2908
|
-
musicAlbum = "music:album",
|
|
2909
|
-
/** Disc number */
|
|
2910
|
-
musicAlbumDisc = "music:album:disc",
|
|
2911
|
-
/** Track number in album */
|
|
2912
|
-
musicAlbumTrack = "music:album:track",
|
|
2913
|
-
/** Musician */
|
|
2914
|
-
musicMusician = "music:musician",
|
|
2915
|
-
/** Song URL */
|
|
2916
|
-
musicSong = "music:song",
|
|
2917
|
-
/** Disc number where the song is */
|
|
2918
|
-
musicSongDisc = "music:song:disc",
|
|
2919
|
-
/** Track number in song */
|
|
2920
|
-
musicSongTrack = "music:song:track",
|
|
2921
|
-
/** Release date */
|
|
2922
|
-
musicReleaseDate = "music:release_date",
|
|
2923
|
-
/** Content creator */
|
|
2924
|
-
musicCreator = "music:creator",
|
|
2925
|
-
/** Actor */
|
|
2926
|
-
videoActor = "video:actor",
|
|
2927
|
-
/** Actor's role */
|
|
2928
|
-
videoActorRole = "video:actor:role",
|
|
2929
|
-
/** Director */
|
|
2930
|
-
videoDirector = "video:director",
|
|
2931
|
-
/** Screenwriter */
|
|
2932
|
-
videoWriter = "video:writer",
|
|
2933
|
-
/** Video duration in seconds */
|
|
2934
|
-
videoDuration = "video:duration",
|
|
2935
|
-
/** Video release date */
|
|
2936
|
-
videoReleaseDate = "video:release_date",
|
|
2937
|
-
/** Tags or topics */
|
|
2938
|
-
videoTag = "video:tag",
|
|
2939
|
-
/** Series to which the episode belongs */
|
|
2940
|
-
videoSeries = "video:series",
|
|
2941
|
-
/** First name */
|
|
2942
|
-
profileFirstName = "profile:first_name",
|
|
2943
|
-
/** Last name */
|
|
2944
|
-
profileLastName = "profile:last_name",
|
|
2945
|
-
/** Username or login */
|
|
2946
|
-
profileUsername = "profile:username",
|
|
2947
|
-
/** Gender */
|
|
2948
|
-
profileGender = "profile:gender",
|
|
2949
|
-
/** Brand name */
|
|
2950
|
-
productBrand = "product:brand",
|
|
2951
|
-
/** Product availability */
|
|
2952
|
-
productAvailability = "product:availability",
|
|
2953
|
-
/** Product condition */
|
|
2954
|
-
productCondition = "product:condition",
|
|
2955
|
-
/** Price amount */
|
|
2956
|
-
productPriceAmount = "product:price:amount",
|
|
2957
|
-
/** Currency code */
|
|
2958
|
-
productPriceCurrency = "product:price:currency",
|
|
2959
|
-
/** Internal product ID */
|
|
2960
|
-
productRetailerItemId = "product:retailer_item_id",
|
|
2961
|
-
/** Product category */
|
|
2962
|
-
productCategory = "product:category",
|
|
2963
|
-
/** EAN code */
|
|
2964
|
-
productEan = "product:ean",
|
|
2965
|
-
/** ISBN if product is a book */
|
|
2966
|
-
productIsbn = "product:isbn",
|
|
2967
|
-
/** Manufacturer part number */
|
|
2968
|
-
productMfrPartNo = "product:mfr_part_no",
|
|
2969
|
-
/** UPC code */
|
|
2970
|
-
productUpc = "product:upc",
|
|
2971
|
-
/** Weight value */
|
|
2972
|
-
productWeightValue = "product:weight:value",
|
|
2973
|
-
/** Weight units */
|
|
2974
|
-
productWeightUnits = "product:weight:units",
|
|
2975
|
-
/** Product color */
|
|
2976
|
-
productColor = "product:color",
|
|
2977
|
-
/** Product material */
|
|
2978
|
-
productMaterial = "product:material",
|
|
2979
|
-
/** Pattern or design */
|
|
2980
|
-
productPattern = "product:pattern",
|
|
2981
|
-
/** Age group */
|
|
2982
|
-
productAgeGroup = "product:age_group",
|
|
2983
|
-
/** Gender target */
|
|
2984
|
-
productGender = "product:gender"
|
|
2985
|
-
}
|
|
2986
|
-
|
|
2987
|
-
/** Open Graph content types @keywords og_type website article video product */
|
|
2988
|
-
export declare enum MetaOpenGraphType {
|
|
2989
|
-
/** Regular web page or article */
|
|
2990
|
-
website = "website",
|
|
2991
|
-
/** News article or blog post */
|
|
2992
|
-
article = "article",
|
|
2993
|
-
/** Video content */
|
|
2994
|
-
video = "video.other",
|
|
2995
|
-
/** Entire TV series */
|
|
2996
|
-
videoTvShow = "video.tv_show",
|
|
2997
|
-
/** Specific TV series episode */
|
|
2998
|
-
videoEpisode = "video.episode",
|
|
2999
|
-
/** Movie */
|
|
3000
|
-
videoMovie = "video.movie",
|
|
3001
|
-
/** Music album */
|
|
3002
|
-
musicAlbum = "music.album",
|
|
3003
|
-
/** Music playlist */
|
|
3004
|
-
musicPlaylist = "music.playlist",
|
|
3005
|
-
/** Individual track or song */
|
|
3006
|
-
musicSong = "music.song",
|
|
3007
|
-
/** Radio station or audio stream */
|
|
3008
|
-
musicRadioStation = "music.radio_station",
|
|
3009
|
-
/** Application */
|
|
3010
|
-
app = "app",
|
|
3011
|
-
/** Product or item */
|
|
3012
|
-
product = "product",
|
|
3013
|
-
/** Brand, company, or organization */
|
|
3014
|
-
business = "business.business",
|
|
3015
|
-
/** Place or geolocation */
|
|
3016
|
-
place = "place",
|
|
3017
|
-
/** Event or meeting */
|
|
3018
|
-
event = "event",
|
|
3019
|
-
/** User profile */
|
|
3020
|
-
profile = "profile",
|
|
3021
|
-
/** Book page */
|
|
3022
|
-
book = "book"
|
|
3023
|
-
}
|
|
3024
|
-
|
|
3025
|
-
/** Product availability states @keywords availability stock preorder */
|
|
3026
|
-
export declare enum MetaOpenGraphAvailability {
|
|
3027
|
-
/** In stock and available */
|
|
3028
|
-
inStock = "in stock",
|
|
3029
|
-
/** Out of stock */
|
|
3030
|
-
outOfStock = "out of stock",
|
|
3031
|
-
/** Available for pre-order */
|
|
3032
|
-
preorder = "preorder",
|
|
3033
|
-
/** Backordered and temporarily out of stock */
|
|
3034
|
-
backorder = "backorder",
|
|
3035
|
-
/** Discontinued and no longer available */
|
|
3036
|
-
discontinued = "discontinued",
|
|
3037
|
-
/** Pending availability status */
|
|
3038
|
-
pending = "pending"
|
|
3039
|
-
}
|
|
3040
|
-
|
|
3041
|
-
/** Product condition states @keywords condition new used refurbished */
|
|
3042
|
-
export declare enum MetaOpenGraphCondition {
|
|
3043
|
-
/** Brand new product */
|
|
3044
|
-
new = "new",
|
|
3045
|
-
/** Used product */
|
|
3046
|
-
used = "used",
|
|
3047
|
-
/** Refurbished product */
|
|
3048
|
-
refurbished = "refurbished"
|
|
3049
|
-
}
|
|
3050
|
-
|
|
3051
|
-
/** Product age groups @keywords age_group newborn infant toddler kids adult */
|
|
3052
|
-
export declare enum MetaOpenGraphAge {
|
|
3053
|
-
/** For newborns */
|
|
3054
|
-
newborn = "newborn",
|
|
3055
|
-
/** For infants */
|
|
3056
|
-
infant = "infant",
|
|
3057
|
-
/** For toddlers */
|
|
3058
|
-
toddler = "toddler",
|
|
3059
|
-
/** For kids */
|
|
3060
|
-
kids = "kids",
|
|
3061
|
-
/** For adults */
|
|
3062
|
-
adult = "adult"
|
|
3063
|
-
}
|
|
3064
|
-
|
|
3065
|
-
/** Product gender categories @keywords gender female male unisex */
|
|
3066
|
-
export declare enum MetaOpenGraphGender {
|
|
3067
|
-
/** For women */
|
|
3068
|
-
female = "female",
|
|
3069
|
-
/** For men */
|
|
3070
|
-
male = "male",
|
|
3071
|
-
/** Universal for everyone */
|
|
3072
|
-
unisex = "unisex"
|
|
3073
|
-
}
|
|
3074
|
-
|
|
3075
|
-
/** Twitter Card meta-properties @keywords twitter_tag card site creator */
|
|
3076
|
-
export declare enum MetaTwitterTag {
|
|
3077
|
-
/** Type of card */
|
|
3078
|
-
card = "twitter:card",
|
|
3079
|
-
/** Website or brand username */
|
|
3080
|
-
site = "twitter:site",
|
|
3081
|
-
/** Content creator username */
|
|
3082
|
-
creator = "twitter:creator",
|
|
3083
|
-
/** Page URL */
|
|
3084
|
-
url = "twitter:url",
|
|
3085
|
-
/** Title of the card */
|
|
3086
|
-
title = "twitter:title",
|
|
3087
|
-
/** Short description of the card */
|
|
3088
|
-
description = "twitter:description",
|
|
3089
|
-
/** Main image for the card */
|
|
3090
|
-
image = "twitter:image",
|
|
3091
|
-
/** Alternative text for the image */
|
|
3092
|
-
imageAlt = "twitter:image:alt",
|
|
3093
|
-
/** Alternative image source */
|
|
3094
|
-
imageSrc = "twitter:image:src",
|
|
3095
|
-
/** Image width */
|
|
3096
|
-
imageWidth = "twitter:image:width",
|
|
3097
|
-
/** Image height */
|
|
3098
|
-
imageHeight = "twitter:image:height",
|
|
3099
|
-
/** Custom label 1 */
|
|
3100
|
-
label1 = "twitter:label1",
|
|
3101
|
-
/** Custom value 1 */
|
|
3102
|
-
data1 = "twitter:data1",
|
|
3103
|
-
/** Custom label 2 */
|
|
3104
|
-
label2 = "twitter:label2",
|
|
3105
|
-
/** Custom value 2 */
|
|
3106
|
-
data2 = "twitter:data2",
|
|
3107
|
-
/** iPhone app name */
|
|
3108
|
-
appNameIphone = "twitter:app:name:iphone",
|
|
3109
|
-
/** iPhone app ID */
|
|
3110
|
-
appIdIphone = "twitter:app:id:iphone",
|
|
3111
|
-
/** iPhone app URL */
|
|
3112
|
-
appUrlIphone = "twitter:app:url:iphone",
|
|
3113
|
-
/** iPad app name */
|
|
3114
|
-
appNameIpad = "twitter:app:name:ipad",
|
|
3115
|
-
/** iPad app ID */
|
|
3116
|
-
appIdIpad = "twitter:app:id:ipad",
|
|
3117
|
-
/** iPad app URL */
|
|
3118
|
-
appUrlIpad = "twitter:app:url:ipad",
|
|
3119
|
-
/** Google Play app name */
|
|
3120
|
-
appNameGooglePlay = "twitter:app:name:googleplay",
|
|
3121
|
-
/** Google Play app ID */
|
|
3122
|
-
appIdGooglePlay = "twitter:app:id:googleplay",
|
|
3123
|
-
/** Google Play app URL */
|
|
3124
|
-
appUrlGooglePlay = "twitter:app:url:googleplay",
|
|
3125
|
-
/** Player iframe URL */
|
|
3126
|
-
player = "twitter:player",
|
|
3127
|
-
/** Player width */
|
|
3128
|
-
playerWidth = "twitter:player:width",
|
|
3129
|
-
/** Player height */
|
|
3130
|
-
playerHeight = "twitter:player:height",
|
|
3131
|
-
/** Direct media stream URL */
|
|
3132
|
-
playerStream = "twitter:player:stream",
|
|
3133
|
-
/** MIME type of the media stream */
|
|
3134
|
-
playerStreamContentType = "twitter:player:stream:content_type"
|
|
3135
|
-
}
|
|
3136
|
-
|
|
3137
|
-
/** Twitter Card types @keywords twitter_card summary large_image app player */
|
|
3138
|
-
export declare enum MetaTwitterCard {
|
|
3139
|
-
/** Summary card with small image */
|
|
3140
|
-
summary = "summary",
|
|
3141
|
-
/** Summary card with large image */
|
|
3142
|
-
summaryLargeImage = "summary_large_image",
|
|
3143
|
-
/** App card for mobile applications */
|
|
3144
|
-
app = "app",
|
|
3145
|
-
/** Player card for rich media */
|
|
3146
|
-
player = "player",
|
|
3147
|
-
/** Product card for e-commerce */
|
|
3148
|
-
product = "product",
|
|
3149
|
-
/** Gallery card for multiple images */
|
|
3150
|
-
gallery = "gallery",
|
|
3151
|
-
/** Photo card */
|
|
3152
|
-
photo = "photo",
|
|
3153
|
-
/** Lead generation card */
|
|
3154
|
-
leadGeneration = "lead_generation",
|
|
3155
|
-
/** Audio card */
|
|
3156
|
-
audio = "audio",
|
|
3157
|
-
/** Poll card */
|
|
3158
|
-
poll = "poll"
|
|
3159
|
-
}
|
|
3160
|
-
|
|
3161
|
-
/** Search item type @keywords search item, record */
|
|
3162
|
-
export type SearchItem = Record<string, any>;
|
|
3163
|
-
/** Type for generating a column path @keywords search column path */
|
|
3164
|
-
export type SearchColumnPath<K, P> = K extends string ? P extends string ? `${K}.${P}` : never : never;
|
|
3165
|
-
/** Type for getting a column @keywords search column */
|
|
3166
|
-
export type SearchColumn<T extends SearchItem> = {
|
|
3167
|
-
[K in keyof T]-?: NonNullable<T[K]> extends object ? K | SearchColumnPath<K, keyof NonNullable<T[K]>> : K;
|
|
3168
|
-
}[keyof T];
|
|
3169
|
-
/** Type for a list of columns @keywords search columns */
|
|
3170
|
-
export type SearchColumns<T extends SearchItem> = (SearchColumn<T> & string)[];
|
|
3171
|
-
/** Type for formatting the key @keywords search format capitalize */
|
|
3172
|
-
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
|
-
export type SearchFormatKey<K> = K extends string ? `${SearchFormatCapitalize<K>}Search` : never;
|
|
3175
|
-
/** Type for a formatted search item @keywords search format item */
|
|
3176
|
-
export type SearchFormatItem<T extends SearchItem, KT extends string[]> = {
|
|
3177
|
-
[K in keyof T | SearchFormatKey<KT[number]>]: K extends keyof T ? T[K] : string;
|
|
3178
|
-
} & {
|
|
3179
|
-
searchActive?: boolean;
|
|
3180
|
-
};
|
|
3181
|
-
/** Type for a list of formatted search items @keywords search format list */
|
|
3182
|
-
export type SearchFormatList<T extends SearchItem, K extends string[]> = SearchFormatItem<T, K>[];
|
|
3183
|
-
/** Search list value @keywords search list value */
|
|
3184
|
-
export type SearchListValue<T extends SearchItem> = T[] | undefined;
|
|
3185
|
-
/** Search options @keywords search options, limit, delay */
|
|
3186
|
-
export type SearchOptions = {
|
|
3187
|
-
limit?: number;
|
|
3188
|
-
returnEverything?: boolean;
|
|
3189
|
-
delay?: number;
|
|
3190
|
-
findExactMatch?: boolean;
|
|
3191
|
-
classSearchName?: string;
|
|
3192
|
-
};
|
|
3193
|
-
/** Search cache item @keywords search cache item */
|
|
3194
|
-
export type SearchCacheItem<T extends SearchItem> = {
|
|
3195
|
-
item: T;
|
|
3196
|
-
value: string;
|
|
3197
|
-
};
|
|
3198
|
-
/** Search cache list @keywords search cache */
|
|
3199
|
-
export type SearchCache<T extends SearchItem> = SearchCacheItem<T>[];
|
|
3200
|
-
/** Highlight match item type @keywords highlight match item */
|
|
3201
|
-
export type HighlightMatchItem = {
|
|
3202
|
-
text: string;
|
|
3203
|
-
isMatch: boolean;
|
|
3204
|
-
};
|
|
3205
|
-
|
|
3206
|
-
/** Sort direction @keywords sort direction asc desc */
|
|
3207
|
-
export type SortDir = 'asc' | 'desc';
|
|
3208
|
-
/** Single column sorting specification item @keywords sort column item */
|
|
3209
|
-
export type SortColumnItem = {
|
|
3210
|
-
/** Column or property key for sorting @keywords sort column property */
|
|
3211
|
-
column?: string;
|
|
3212
|
-
/** Sorting direction @keywords sort dir */
|
|
3213
|
-
dir?: SortDir;
|
|
3214
|
-
};
|
|
3215
|
-
/** Custom sort function signature @keywords custom sort function */
|
|
3216
|
-
export type SortFunction<T = any> = (a: T, b: T, column?: string, dir?: SortDir) => number;
|
|
3217
|
-
|
|
3218
|
-
export type TranslateConfig = {
|
|
3219
|
-
url?: string;
|
|
3220
|
-
propsName?: string;
|
|
3221
|
-
readApi?: boolean;
|
|
3222
|
-
};
|
|
3223
|
-
export type TranslateCode = string | string[];
|
|
3224
|
-
export type TranslateList<T extends TranslateCode[]> = {
|
|
3225
|
-
[K in T[number] as K extends readonly string[] ? K[0] : K]: string;
|
|
3226
|
-
};
|
|
3227
|
-
export type TranslateItemOrList<T extends TranslateCode> = T extends string[] ? TranslateList<T> : string;
|
|
3228
|
-
export type TranslateDataFileList = Record<string, string>;
|
|
3229
|
-
export type TranslateDataFileItem = () => Promise<TranslateDataFileList>;
|
|
3230
|
-
export type TranslateDataFile = Record<string, TranslateDataFileItem>;
|
|
3231
|
-
/** Global translation prefix @keywords prefix, global, translate */
|
|
3232
|
-
export declare const TRANSLATE_GLOBAL_PREFIX = "global";
|
|
3233
|
-
/** Request timeout for batch loading @keywords timeout, delay, translate */
|
|
3234
|
-
export declare const TRANSLATE_TIME_OUT = 160;
|