@dxtmisha/functional-basic 1.1.5 → 1.1.6
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 +15 -0
- package/ai-description.txt +1 -0
- package/ai-types.txt +1055 -951
- package/dist/classes/Api.d.ts +201 -0
- package/dist/classes/ApiCache.d.ts +152 -0
- package/dist/classes/ApiDataReturn.d.ts +76 -0
- package/dist/classes/ApiDefault.d.ts +49 -0
- package/dist/classes/ApiHeaders.d.ts +37 -0
- package/dist/classes/ApiHydration.d.ts +39 -0
- package/dist/classes/ApiInstance.d.ts +283 -0
- package/dist/classes/ApiPreparation.d.ts +58 -0
- package/dist/classes/ApiResponse.d.ts +154 -0
- package/dist/classes/ApiStatus.d.ts +130 -0
- package/dist/classes/BroadcastMessage.d.ts +75 -0
- package/dist/classes/Cache.d.ts +38 -0
- package/dist/classes/CacheItem.d.ts +62 -0
- package/dist/classes/CacheStatic.d.ts +36 -0
- package/dist/classes/Cookie.d.ts +54 -0
- package/dist/classes/CookieBlock.d.ts +30 -0
- package/dist/classes/CookieBlockInstance.d.ts +23 -0
- package/dist/classes/CookieStorage.d.ts +174 -0
- package/dist/classes/DataStorage.d.ts +107 -0
- package/dist/classes/Datetime.d.ts +570 -0
- package/dist/classes/ErrorCenter.d.ts +72 -0
- package/dist/classes/ErrorCenterHandler.d.ts +64 -0
- package/dist/classes/ErrorCenterInstance.d.ts +85 -0
- package/dist/classes/EventItem.d.ts +251 -0
- package/dist/classes/Formatters.d.ts +161 -0
- package/dist/classes/Geo.d.ts +151 -0
- package/dist/classes/GeoFlag.d.ts +98 -0
- package/dist/classes/GeoInstance.d.ts +215 -0
- package/dist/classes/GeoIntl.d.ts +304 -0
- package/dist/classes/GeoPhone.d.ts +108 -0
- package/dist/classes/Global.d.ts +29 -0
- package/dist/classes/Hash.d.ts +57 -0
- package/dist/classes/HashInstance.d.ts +95 -0
- package/dist/classes/Icons.d.ts +128 -0
- package/dist/classes/Loading.d.ts +66 -0
- package/dist/classes/LoadingInstance.d.ts +99 -0
- package/dist/classes/Meta.d.ts +186 -0
- package/dist/classes/MetaManager.d.ts +121 -0
- package/dist/classes/MetaOg.d.ts +115 -0
- package/dist/classes/MetaStatic.d.ts +179 -0
- package/dist/classes/MetaTwitter.d.ts +115 -0
- package/dist/classes/ResumableTimer.d.ts +81 -0
- package/dist/classes/ScrollbarWidth.d.ts +51 -0
- package/dist/classes/SearchList.d.ts +128 -0
- package/dist/classes/SearchListData.d.ts +143 -0
- package/dist/classes/SearchListItem.d.ts +49 -0
- package/dist/classes/SearchListMatcher.d.ts +57 -0
- package/dist/classes/SearchListOptions.d.ts +66 -0
- package/dist/classes/ServerStorage.d.ts +106 -0
- package/dist/classes/StorageCallback.d.ts +84 -0
- package/dist/classes/Translate.d.ts +119 -0
- package/dist/classes/TranslateFile.d.ts +81 -0
- package/dist/classes/TranslateInstance.d.ts +206 -0
- package/dist/functions/addTagHighlightMatch.d.ts +11 -0
- package/dist/functions/anyToString.d.ts +10 -0
- package/dist/functions/applyTemplate.d.ts +10 -0
- package/dist/functions/arrFill.d.ts +9 -0
- package/dist/functions/blobToBase64.d.ts +9 -0
- package/dist/functions/capitalize.d.ts +9 -0
- package/dist/functions/copyObject.d.ts +10 -0
- package/dist/functions/copyObjectLite.d.ts +9 -0
- package/dist/functions/createElement.d.ts +21 -0
- package/dist/functions/domQuerySelector.d.ts +8 -0
- package/dist/functions/domQuerySelectorAll.d.ts +8 -0
- package/dist/functions/encodeAttribute.d.ts +8 -0
- package/dist/functions/encodeLiteAttribute.d.ts +8 -0
- package/dist/functions/ensureMaxSize.d.ts +10 -0
- package/dist/functions/escapeExp.d.ts +7 -0
- package/dist/functions/eventStopPropagation.d.ts +7 -0
- package/dist/functions/executeFunction.d.ts +12 -0
- package/dist/functions/executePromise.d.ts +11 -0
- package/dist/functions/forEach.d.ts +14 -0
- package/dist/functions/frame.d.ts +10 -0
- package/dist/functions/getArrayHighlightMatch.d.ts +10 -0
- package/dist/functions/getAttributes.d.ts +9 -0
- package/dist/functions/getClipboardData.d.ts +9 -0
- package/dist/functions/getColumn.d.ts +10 -0
- package/dist/functions/getCurrentDate.d.ts +19 -0
- package/dist/functions/getCurrentTime.d.ts +15 -0
- package/dist/functions/getElement.d.ts +9 -0
- package/dist/functions/getElementId.d.ts +26 -0
- package/dist/functions/getElementImage.d.ts +8 -0
- package/dist/functions/getElementItem.d.ts +12 -0
- package/dist/functions/getElementOrWindow.d.ts +8 -0
- package/dist/functions/getElementSafeScript.d.ts +9 -0
- package/dist/functions/getExactSearchExp.d.ts +8 -0
- package/dist/functions/getExp.d.ts +14 -0
- package/dist/functions/getHydrationData.d.ts +10 -0
- package/dist/functions/getItemByPath.d.ts +9 -0
- package/dist/functions/getKey.d.ts +8 -0
- package/dist/functions/getLengthOfAllArray.d.ts +8 -0
- package/dist/functions/getMaxLengthAllArray.d.ts +9 -0
- package/dist/functions/getMinLengthAllArray.d.ts +8 -0
- package/dist/functions/getMouseClient.d.ts +9 -0
- package/dist/functions/getMouseClientX.d.ts +8 -0
- package/dist/functions/getMouseClientY.d.ts +8 -0
- package/dist/functions/getObjectByKeys.d.ts +8 -0
- package/dist/functions/getObjectNoUndefined.d.ts +9 -0
- package/dist/functions/getObjectOrNone.d.ts +8 -0
- package/dist/functions/getOnlyText.d.ts +8 -0
- package/dist/functions/getRandomText.d.ts +12 -0
- package/dist/functions/getRequestString.d.ts +11 -0
- package/dist/functions/getSearchExp.d.ts +12 -0
- package/dist/functions/getSeparatingSearchExp.d.ts +9 -0
- package/dist/functions/getStepPercent.d.ts +9 -0
- package/dist/functions/getStepValue.d.ts +9 -0
- package/dist/functions/goScroll.d.ts +10 -0
- package/dist/functions/goScrollSmooth.d.ts +10 -0
- package/dist/functions/goScrollTo.d.ts +10 -0
- package/dist/functions/handleShare.d.ts +10 -0
- package/dist/functions/inArray.d.ts +9 -0
- package/dist/functions/initScrollbarOffset.d.ts +7 -0
- package/dist/functions/intersectKey.d.ts +9 -0
- package/dist/functions/isApiSuccess.d.ts +9 -0
- package/dist/functions/isArray.d.ts +8 -0
- package/dist/functions/isDifferent.d.ts +10 -0
- package/dist/functions/isDomData.d.ts +7 -0
- package/dist/functions/isDomRuntime.d.ts +10 -0
- package/dist/functions/isElementVisible.d.ts +11 -0
- package/dist/functions/isEnter.d.ts +9 -0
- package/dist/functions/isFilled.d.ts +10 -0
- package/dist/functions/isFloat.d.ts +8 -0
- package/dist/functions/isFunction.d.ts +9 -0
- package/dist/functions/isInDom.d.ts +9 -0
- package/dist/functions/isInput.d.ts +8 -0
- package/dist/functions/isIntegerBetween.d.ts +9 -0
- package/dist/functions/isNull.d.ts +9 -0
- package/dist/functions/isNumber.d.ts +8 -0
- package/dist/functions/isObject.d.ts +8 -0
- package/dist/functions/isObjectNotArray.d.ts +8 -0
- package/dist/functions/isOnLine.d.ts +7 -0
- package/dist/functions/isSelected.d.ts +9 -0
- package/dist/functions/isSelectedByList.d.ts +9 -0
- package/dist/functions/isShare.d.ts +7 -0
- package/dist/functions/isString.d.ts +8 -0
- package/dist/functions/isWindow.d.ts +7 -0
- package/dist/functions/random.d.ts +9 -0
- package/dist/functions/removeCommonPrefix.d.ts +9 -0
- package/dist/functions/replaceComponentName.d.ts +9 -0
- package/dist/functions/replaceRecursive.d.ts +11 -0
- package/dist/functions/replaceTemplate.d.ts +10 -0
- package/dist/functions/resizeImageByMax.d.ts +19 -0
- package/dist/functions/secondToTime.d.ts +9 -0
- package/dist/functions/setElementItem.d.ts +11 -0
- package/dist/functions/setValues.d.ts +18 -0
- package/dist/functions/sleep.d.ts +8 -0
- package/dist/functions/splice.d.ts +13 -0
- package/dist/functions/strFill.d.ts +9 -0
- package/dist/functions/strSplit.d.ts +12 -0
- package/dist/functions/toArray.d.ts +17 -0
- package/dist/functions/toCamelCase.d.ts +8 -0
- package/dist/functions/toCamelCaseFirst.d.ts +8 -0
- package/dist/functions/toDate.d.ts +8 -0
- package/dist/functions/toKebabCase.d.ts +15 -0
- package/dist/functions/toNumber.d.ts +19 -0
- package/dist/functions/toNumberByMax.d.ts +11 -0
- package/dist/functions/toPercent.d.ts +9 -0
- package/dist/functions/toPercentBy100.d.ts +9 -0
- package/dist/functions/toString.d.ts +8 -0
- package/dist/functions/transformation.d.ts +21 -0
- package/dist/functions/uint8ArrayToBase64.d.ts +8 -0
- package/dist/functions/uniqueArray.d.ts +8 -0
- package/dist/functions/writeClipboardData.d.ts +8 -0
- package/dist/library.d.ts +171 -8891
- package/dist/library.js +5 -5
- package/dist/media/errorCauseList.d.ts +2 -0
- package/dist/types/apiTypes.d.ts +217 -0
- package/dist/types/basicTypes.d.ts +131 -0
- package/dist/types/errorCenter.d.ts +42 -0
- package/dist/types/formattersTypes.d.ts +224 -0
- package/dist/types/geoTypes.d.ts +86 -0
- package/dist/types/metaTypes.d.ts +586 -0
- package/dist/types/searchTypes.d.ts +53 -0
- package/dist/types/translateTypes.d.ts +54 -0
- package/package.json +5 -4
package/ai-types.txt
CHANGED
|
@@ -14,467 +14,320 @@ The following is the content of "exports" from package.json:
|
|
|
14
14
|
"./types/**/*.d.ts": "./dist/**/*.d.ts"
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
// File:
|
|
18
|
-
/**
|
|
19
|
-
* @param value input string
|
|
20
|
-
* @param search search string or RegExp
|
|
21
|
-
* @param className CSS class for highlight
|
|
22
|
-
* @param shouldEscape escape string flag
|
|
23
|
-
*/
|
|
24
|
-
export declare function addTagHighlightMatch(value: string, search?: string | RegExp, className?: string, shouldEscape?: boolean): string;
|
|
25
|
-
|
|
26
|
-
/** Converts a value to a string.
|
|
27
|
-
* @param value value to convert
|
|
28
|
-
* @param isArrayString convert arrays to strings
|
|
29
|
-
* @param trim trim result
|
|
30
|
-
*/
|
|
31
|
-
export declare function anyToString<V>(value: V, isArrayString?: boolean, trim?: boolean): string;
|
|
32
|
-
|
|
33
|
-
/** HTTP request utility class. */
|
|
17
|
+
// File: classes/Api.d.ts
|
|
18
|
+
/** HTTP request handler. */
|
|
34
19
|
export declare class Api {
|
|
35
20
|
/** Check if localhost. */
|
|
36
21
|
static isLocalhost(): boolean;
|
|
37
22
|
/** Get ApiInstance singleton. */
|
|
38
23
|
static getItem(): ApiInstance;
|
|
39
|
-
/** Get last request
|
|
24
|
+
/** Get status of last request. */
|
|
40
25
|
static getStatus(): ApiStatus;
|
|
41
26
|
/** Get response handler. */
|
|
42
27
|
static getResponse(): ApiResponse;
|
|
43
28
|
/** Get hydration handler. */
|
|
44
29
|
static getHydration(): ApiHydration;
|
|
45
|
-
/** Get
|
|
30
|
+
/** Get HTML script for hydration data. */
|
|
46
31
|
static getHydrationScript(): string;
|
|
47
|
-
/** Get base origin URL. */
|
|
32
|
+
/** Get base origin URL with API path. */
|
|
48
33
|
static getOrigin(): string;
|
|
49
|
-
/** Get full script
|
|
34
|
+
/** Get full script path. */
|
|
50
35
|
static getUrl(path: string, api?: boolean): string;
|
|
51
36
|
/** Get request body data. */
|
|
52
37
|
static getBody(request?: ApiFetch['request'], method?: ApiMethodItem): string | FormData | undefined;
|
|
53
|
-
/** Get
|
|
38
|
+
/** Get query string for GET requests. */
|
|
54
39
|
static getBodyForGet(request: ApiFetch['request'], path?: string, method?: ApiMethodItem): string;
|
|
55
40
|
/** Set default headers. */
|
|
56
41
|
static setHeaders(headers: Record<string, string>): void;
|
|
57
42
|
/** Set default request data. */
|
|
58
43
|
static setRequestDefault(request: Record<string, any>): void;
|
|
59
|
-
/** Set base
|
|
44
|
+
/** Set base path. */
|
|
60
45
|
static setUrl(url: string): void;
|
|
61
46
|
/** Set pre-request callback. */
|
|
62
47
|
static setPreparation(callback: (apiFetch: ApiFetch) => Promise<void>): void;
|
|
63
48
|
/** Set post-request callback. */
|
|
64
49
|
static setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): void;
|
|
65
|
-
/** Set request timeout. */
|
|
50
|
+
/** Set request timeout (ms). */
|
|
66
51
|
static setTimeout(timeout: number): void;
|
|
67
52
|
/** Set base origin. */
|
|
68
53
|
static setOrigin(origin: string): void;
|
|
69
|
-
/** Set
|
|
54
|
+
/** Set bulk API config. */
|
|
70
55
|
static setConfig(config?: ApiConfig): void;
|
|
71
56
|
/** Execute request. */
|
|
72
57
|
static request<T>(pathRequest: string | ApiFetch): Promise<T>;
|
|
73
|
-
/** Send GET request. */
|
|
74
58
|
static get<T>(request: ApiFetch): Promise<T>;
|
|
75
|
-
/** Send POST request. */
|
|
76
59
|
static post<T>(request: ApiFetch): Promise<T>;
|
|
77
|
-
/** Send PUT request. */
|
|
78
60
|
static put<T>(request: ApiFetch): Promise<T>;
|
|
79
|
-
/** Send PATCH request. */
|
|
80
61
|
static patch<T>(request: ApiFetch): Promise<T>;
|
|
81
|
-
/** Send DELETE request. */
|
|
82
62
|
static delete<T>(request: ApiFetch): Promise<T>;
|
|
83
63
|
}
|
|
84
|
-
|
|
85
|
-
/** API response caching. */
|
|
64
|
+
// File: classes/ApiCache.d.ts
|
|
65
|
+
/** API response caching handler. */
|
|
86
66
|
export declare class ApiCache {
|
|
87
|
-
/**
|
|
67
|
+
/** Init storage with listeners. */
|
|
88
68
|
static init(getListener: (key: string) => Promise<ApiCacheItem | undefined>, setListener: (key: string, value: ApiCacheItem) => Promise<boolean>, removeListener: (key: string) => Promise<boolean>, cacheStepAgeClearOld?: number): void;
|
|
89
|
-
/** Clear all cache. */
|
|
69
|
+
/** Clear all cache and reset listeners. */
|
|
90
70
|
static reset(): void;
|
|
91
|
-
/** Get
|
|
71
|
+
/** Get cached data by key. */
|
|
92
72
|
static get<T>(key: string): Promise<T | undefined>;
|
|
93
|
-
/** Get
|
|
73
|
+
/** Get cached data by fetch options. */
|
|
94
74
|
static getByFetch<T>(fetch: ApiFetch): Promise<T | undefined>;
|
|
95
|
-
/** Save to cache. */
|
|
75
|
+
/** Save data to cache. */
|
|
96
76
|
static set<T>(key: string, value: T, age?: number): Promise<void>;
|
|
97
|
-
/** Save to cache using fetch options. */
|
|
77
|
+
/** Save data to cache using fetch options. */
|
|
98
78
|
static setByFetch<T>(fetch: ApiFetch, value: T): Promise<void>;
|
|
99
|
-
/** Remove from cache. */
|
|
79
|
+
/** Remove key from cache. */
|
|
100
80
|
static remove(key: string): Promise<void>;
|
|
101
81
|
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
export declare type ApiCacheItem<T = any> = {
|
|
105
|
-
value: T;
|
|
106
|
-
age?: number;
|
|
107
|
-
cacheAge: number;
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
/** Cache list record. */
|
|
111
|
-
export declare type ApiCacheList = Record<string, ApiCacheItem>;
|
|
112
|
-
|
|
113
|
-
/** API Configuration. */
|
|
114
|
-
export declare type ApiConfig = {
|
|
115
|
-
urlRoot?: string;
|
|
116
|
-
origin?: string;
|
|
117
|
-
headers?: Record<string, string>;
|
|
118
|
-
requestDefault?: Record<string, any>;
|
|
119
|
-
preparation?: (apiFetch: ApiFetch) => Promise<void>;
|
|
120
|
-
end?: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>;
|
|
121
|
-
timeout?: number;
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
/** API data wrapper. */
|
|
125
|
-
export declare type ApiData<T = any> = T extends any[] ? T : ApiDataItem<T>;
|
|
126
|
-
|
|
127
|
-
/** API data item. */
|
|
128
|
-
export declare type ApiDataItem<T = any> = T & ApiDataValidation & {
|
|
129
|
-
data?: T;
|
|
130
|
-
success?: boolean;
|
|
131
|
-
statusObject?: ApiStatusItem;
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
/** Processes data from API request. */
|
|
82
|
+
// File: classes/ApiDataReturn.d.ts
|
|
83
|
+
/** Processes and formats API response data. */
|
|
135
84
|
export declare class ApiDataReturn<T = any> {
|
|
136
85
|
constructor(apiFetch: ApiFetch, query: Response, end: ApiPreparationEnd);
|
|
137
|
-
/** Read
|
|
86
|
+
/** Read and parse response data. */
|
|
138
87
|
init(): Promise<this>;
|
|
139
88
|
/** Get processed data. */
|
|
140
89
|
get(): ApiData<T>;
|
|
141
|
-
/** Get
|
|
90
|
+
/** Get data with status object. */
|
|
142
91
|
getAndStatus(status: ApiStatus): ApiData<T>;
|
|
143
92
|
/** Get raw API data. */
|
|
144
93
|
getData(): ApiData<T> | undefined;
|
|
145
94
|
}
|
|
146
|
-
|
|
147
|
-
/** API
|
|
148
|
-
export declare type ApiDataValidation = {
|
|
149
|
-
status?: ApiStatusType;
|
|
150
|
-
code?: string | number;
|
|
151
|
-
message?: string;
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
/** Manages default request data. */
|
|
95
|
+
// File: classes/ApiDefault.d.ts
|
|
96
|
+
/** Manages default API request data. */
|
|
155
97
|
export declare class ApiDefault {
|
|
156
98
|
/** Check if default data exists. */
|
|
157
99
|
is(): boolean;
|
|
158
100
|
/** Get default data. */
|
|
159
101
|
get(): ApiDefaultValue | undefined;
|
|
160
|
-
/** Merge defaults into request. */
|
|
102
|
+
/** Merge defaults into request data. */
|
|
161
103
|
request(request: ApiFetch['request']): ApiFetch['request'];
|
|
162
|
-
/** Set
|
|
104
|
+
/** Set default data. */
|
|
163
105
|
set(request: ApiDefaultValue): this;
|
|
164
106
|
}
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
export declare type ApiDefaultValue = Record<string, any>;
|
|
168
|
-
|
|
169
|
-
/** API fetch options. */
|
|
170
|
-
export declare type ApiFetch = {
|
|
171
|
-
api?: boolean;
|
|
172
|
-
path?: string;
|
|
173
|
-
pathFull?: string;
|
|
174
|
-
method?: ApiMethod;
|
|
175
|
-
request?: FormData | Record<string, any> | string;
|
|
176
|
-
auth?: boolean;
|
|
177
|
-
headers?: Record<string, string> | null;
|
|
178
|
-
type?: string;
|
|
179
|
-
toData?: boolean;
|
|
180
|
-
global?: boolean;
|
|
181
|
-
devMode?: boolean;
|
|
182
|
-
hideError?: boolean;
|
|
183
|
-
hideLoading?: boolean;
|
|
184
|
-
retry?: number;
|
|
185
|
-
retryDelay?: number;
|
|
186
|
-
queryReturn?: (query: Response) => Promise<any | ApiDataValidation>;
|
|
187
|
-
globalPreparation?: boolean;
|
|
188
|
-
globalEnd?: boolean;
|
|
189
|
-
init?: RequestInit;
|
|
190
|
-
timeout?: number;
|
|
191
|
-
controller?: AbortController;
|
|
192
|
-
cache?: number;
|
|
193
|
-
enableClientCache?: boolean;
|
|
194
|
-
cacheId?: number | string;
|
|
195
|
-
endResetLimit?: number;
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
/** Manages HTTP headers. */
|
|
107
|
+
// File: classes/ApiHeaders.d.ts
|
|
108
|
+
/** HTTP header manager. */
|
|
199
109
|
export declare class ApiHeaders {
|
|
200
|
-
/** Get
|
|
110
|
+
/** Get request headers. */
|
|
201
111
|
get(value?: Record<string, string> | null, type?: string | undefined | null): Record<string, string> | undefined;
|
|
202
|
-
/** Get headers
|
|
112
|
+
/** Get headers by request context. */
|
|
203
113
|
getByRequest(request: ApiFetch['request'], value?: Record<string, string> | null, type?: string): Record<string, string> | undefined;
|
|
204
114
|
/** Set default headers. */
|
|
205
115
|
set(headers: Record<string, string>): this;
|
|
206
116
|
}
|
|
207
|
-
|
|
208
|
-
/** Collects
|
|
117
|
+
// File: classes/ApiHydration.d.ts
|
|
118
|
+
/** Collects SSR data for client hydration. */
|
|
209
119
|
export declare class ApiHydration {
|
|
210
|
-
/**
|
|
120
|
+
/** Add hydration data to response. */
|
|
211
121
|
initResponse(response: ApiResponse): void;
|
|
212
|
-
/** Save response for client. */
|
|
122
|
+
/** Save response for client side. */
|
|
213
123
|
toClient<T>(apiFetch: ApiFetch, response: T): void;
|
|
214
|
-
/** Get
|
|
124
|
+
/** Get script string for client. */
|
|
215
125
|
toString(): string;
|
|
216
126
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
127
|
+
// File: classes/ApiInstance.d.ts
|
|
128
|
+
export type ApiInstanceOptions = {
|
|
129
|
+
headersClass?: typeof ApiHeaders;
|
|
130
|
+
requestDefaultClass?: typeof ApiDefault;
|
|
131
|
+
statusClass?: typeof ApiStatus;
|
|
132
|
+
responseClass?: typeof ApiResponse;
|
|
133
|
+
preparationClass?: typeof ApiPreparation;
|
|
134
|
+
loadingClass?: LoadingInstance;
|
|
135
|
+
errorCenterClass?: ErrorCenterInstance;
|
|
136
|
+
hydrationClass?: typeof ApiHydration;
|
|
224
137
|
};
|
|
225
|
-
|
|
226
|
-
/** List of hydration items. */
|
|
227
|
-
export declare type ApiHydrationList = ApiHydrationItem[];
|
|
228
|
-
|
|
229
|
-
/** Core fetch manager. */
|
|
138
|
+
/** Core Fetch API request manager. */
|
|
230
139
|
export declare class ApiInstance {
|
|
231
140
|
constructor(url?: string, options?: ApiInstanceOptions);
|
|
232
141
|
/** Check if localhost. */
|
|
233
142
|
isLocalhost(): boolean;
|
|
234
|
-
/** Get last status. */
|
|
143
|
+
/** Get last request status. */
|
|
235
144
|
getStatus(): ApiStatus;
|
|
236
145
|
/** Get response handler. */
|
|
237
146
|
getResponse(): ApiResponse;
|
|
238
147
|
/** Get hydration handler. */
|
|
239
148
|
getHydration(): ApiHydration;
|
|
240
|
-
/** Get base origin. */
|
|
149
|
+
/** Get base origin with API path. */
|
|
241
150
|
getOrigin(): string;
|
|
242
|
-
/** Get full
|
|
151
|
+
/** Get full URL. */
|
|
243
152
|
getUrl(path: string, api?: boolean): string;
|
|
244
|
-
/** Get
|
|
245
|
-
getBody(request?: ApiFetch['request'], method?:
|
|
246
|
-
/** Get query string
|
|
247
|
-
getBodyForGet(request: ApiFetch['request'], path?: string, method?:
|
|
248
|
-
/** Get hydration script. */
|
|
153
|
+
/** Get body for non-GET requests. */
|
|
154
|
+
getBody(request?: ApiFetch['request'], method?: ApiMethod): string | FormData | undefined;
|
|
155
|
+
/** Get GET query string. */
|
|
156
|
+
getBodyForGet(request: ApiFetch['request'], path?: string, method?: ApiMethod): string;
|
|
157
|
+
/** Get client hydration script. */
|
|
249
158
|
getHydrationScript(): string;
|
|
250
159
|
/** Set default headers. */
|
|
251
160
|
setHeaders(headers: Record<string, string>): this;
|
|
252
|
-
/** Set default
|
|
161
|
+
/** Set default params. */
|
|
253
162
|
setRequestDefault(request: Record<string, any>): this;
|
|
254
|
-
/** Set base
|
|
163
|
+
/** Set base path. */
|
|
255
164
|
setUrl(url: string): this;
|
|
256
|
-
/** Set pre-request
|
|
165
|
+
/** Set pre-request callback. */
|
|
257
166
|
setPreparation(callback: (apiFetch: ApiFetch) => Promise<void>): this;
|
|
258
|
-
/** Set post-request
|
|
167
|
+
/** Set post-request callback. */
|
|
259
168
|
setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): this;
|
|
260
|
-
/** Set timeout. */
|
|
169
|
+
/** Set timeout (ms). */
|
|
261
170
|
setTimeout(timeout: number): this;
|
|
262
171
|
/** Set origin. */
|
|
263
172
|
setOrigin(origin: string): this;
|
|
264
173
|
/** Execute request. */
|
|
265
174
|
request<T>(pathRequest: string | ApiFetch): Promise<T>;
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
put<T>(request: ApiFetch): Promise<T>;
|
|
272
|
-
/** PATCH request. */
|
|
273
|
-
patch<T>(request: ApiFetch): Promise<T>;
|
|
274
|
-
/** DELETE request. */
|
|
275
|
-
delete<T>(request: ApiFetch): Promise<T>;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
/** API instance configuration. */
|
|
279
|
-
export declare type ApiInstanceOptions = {
|
|
280
|
-
headersClass?: typeof ApiHeaders;
|
|
281
|
-
requestDefaultClass?: typeof ApiDefault;
|
|
282
|
-
statusClass?: typeof ApiStatus;
|
|
283
|
-
responseClass?: typeof ApiResponse;
|
|
284
|
-
preparationClass?: typeof ApiPreparation;
|
|
285
|
-
loadingClass?: LoadingInstance;
|
|
286
|
-
errorCenterClass?: ErrorCenterInstance;
|
|
287
|
-
hydrationClass?: typeof ApiHydration;
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
/** HTTP Method type. */
|
|
291
|
-
export declare type ApiMethod = string & ApiMethodItem;
|
|
292
|
-
|
|
293
|
-
/** Supported HTTP methods. */
|
|
294
|
-
export declare enum ApiMethodItem {
|
|
295
|
-
delete = "DELETE",
|
|
296
|
-
get = "GET",
|
|
297
|
-
post = "POST",
|
|
298
|
-
put = "PUT",
|
|
299
|
-
patch = "PATCH"
|
|
175
|
+
static get<T>(request: ApiFetch): Promise<T>;
|
|
176
|
+
static post<T>(request: ApiFetch): Promise<T>;
|
|
177
|
+
static put<T>(request: ApiFetch): Promise<T>;
|
|
178
|
+
static patch<T>(request: ApiFetch): Promise<T>;
|
|
179
|
+
static delete<T>(request: ApiFetch): Promise<T>;
|
|
300
180
|
}
|
|
301
|
-
|
|
302
|
-
/** Request preparation
|
|
181
|
+
// File: classes/ApiPreparation.d.ts
|
|
182
|
+
/** Request preparation handler. */
|
|
303
183
|
export declare class ApiPreparation {
|
|
304
|
-
/** Run pre-request
|
|
184
|
+
/** Run pre-request logic. */
|
|
305
185
|
make(active: boolean, apiFetch: ApiFetch): Promise<void>;
|
|
306
|
-
/** Run post-request
|
|
186
|
+
/** Run post-request logic. */
|
|
307
187
|
makeEnd(active: boolean, query: Response, apiFetch: ApiFetch): Promise<ApiPreparationEnd>;
|
|
308
188
|
/** Set pre-request callback. */
|
|
309
189
|
set(callback: (apiFetch: ApiFetch) => Promise<void>): this;
|
|
310
190
|
/** Set post-request callback. */
|
|
311
191
|
setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): this;
|
|
312
192
|
}
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
export declare type ApiPreparationEnd = {
|
|
316
|
-
reset?: boolean;
|
|
317
|
-
data?: any;
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
/** Manages API response mocks and cache. */
|
|
193
|
+
// File: classes/ApiResponse.d.ts
|
|
194
|
+
/** API response cache and emulation manager. */
|
|
321
195
|
export declare class ApiResponse {
|
|
322
196
|
constructor(requestDefault: ApiDefault);
|
|
323
|
-
/** Get cached
|
|
197
|
+
/** Get cached response. */
|
|
324
198
|
get(path: string | undefined, method: ApiMethod, request?: ApiFetch['request'], devMode?: boolean): ApiResponseItem | undefined;
|
|
325
|
-
/** Get list of cached responses. */
|
|
199
|
+
/** Get list of non-global cached responses. */
|
|
326
200
|
getList(): (ApiResponseItem & Record<string, any>)[];
|
|
327
|
-
/** Add
|
|
201
|
+
/** Add items to cache. */
|
|
328
202
|
add(response: ApiResponseItem | ApiResponseItem[]): this;
|
|
329
203
|
/** Set dev mode. */
|
|
330
204
|
setDevMode(devMode: boolean): this;
|
|
331
|
-
/**
|
|
205
|
+
/** Emulate request. */
|
|
332
206
|
emulator<T>(apiFetch: ApiFetch): Promise<T | undefined>;
|
|
207
|
+
/** Emulate request sync. */
|
|
208
|
+
emulatorAsync<T>(apiFetch: ApiFetch): T | undefined;
|
|
333
209
|
}
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
export declare type ApiResponseItem = {
|
|
337
|
-
path: string | RegExp;
|
|
338
|
-
method: ApiMethod;
|
|
339
|
-
request?: ApiFetch['request'] | '*any';
|
|
340
|
-
response: any | ((request?: ApiFetch['request']) => any);
|
|
341
|
-
disable?: any;
|
|
342
|
-
isForGlobal?: boolean;
|
|
343
|
-
lag?: any;
|
|
344
|
-
};
|
|
345
|
-
|
|
346
|
-
/** API status manager. */
|
|
210
|
+
// File: classes/ApiStatus.d.ts
|
|
211
|
+
/** API request status manager. */
|
|
347
212
|
export declare class ApiStatus {
|
|
348
213
|
/** Get status data. */
|
|
349
214
|
get(): ApiStatusItem | undefined;
|
|
350
215
|
/** Get HTTP status code. */
|
|
351
216
|
getStatus(): number | undefined;
|
|
352
|
-
/** Get status text. */
|
|
217
|
+
/** Get HTTP status text. */
|
|
353
218
|
getStatusText(): string | undefined;
|
|
354
219
|
/** Get status type. */
|
|
355
220
|
getStatusType(): ApiStatusType | undefined;
|
|
356
|
-
/** Get
|
|
221
|
+
/** Get response status code. */
|
|
357
222
|
getCode(): string | undefined;
|
|
358
223
|
/** Get error message. */
|
|
359
224
|
getError(): string | undefined;
|
|
360
|
-
/** Get
|
|
225
|
+
/** Get response data. */
|
|
361
226
|
getResponse<T>(): T | undefined;
|
|
362
|
-
/** Get
|
|
227
|
+
/** Get message. */
|
|
363
228
|
getMessage(): string;
|
|
364
229
|
/** Set status data. */
|
|
365
230
|
set(data: ApiStatusItem): this;
|
|
366
231
|
/** Set HTTP status. */
|
|
367
232
|
setStatus(status?: number, statusText?: string): this;
|
|
368
|
-
/** Set error
|
|
233
|
+
/** Set error. */
|
|
369
234
|
setError(error?: string): this;
|
|
370
|
-
/** Set last response
|
|
235
|
+
/** Set last response and parse metadata. */
|
|
371
236
|
setLastResponse(response?: any): this;
|
|
372
237
|
/** Set status type. */
|
|
373
238
|
setLastStatus(status?: ApiStatusType): this;
|
|
374
|
-
/** Set
|
|
239
|
+
/** Set status code. */
|
|
375
240
|
setLastCode(code?: string): this;
|
|
376
241
|
/** Set message. */
|
|
377
242
|
setLastMessage(message?: string): this;
|
|
378
243
|
}
|
|
379
|
-
|
|
380
|
-
/**
|
|
381
|
-
export declare type ApiStatusItem = {
|
|
382
|
-
status?: number;
|
|
383
|
-
statusText?: string;
|
|
384
|
-
error?: string;
|
|
385
|
-
lastResponse?: any;
|
|
386
|
-
lastStatus?: ApiStatusType;
|
|
387
|
-
lastCode?: string;
|
|
388
|
-
lastMessage?: string;
|
|
389
|
-
};
|
|
390
|
-
|
|
391
|
-
export declare type ApiStatusType = 'success' | 'error' | 'warning' | 'info';
|
|
392
|
-
|
|
393
|
-
/** Template applier. */
|
|
394
|
-
export declare const applyTemplate: (text: string, replacement?: Record<string, string | number | boolean> | string[]) => string;
|
|
395
|
-
|
|
396
|
-
export declare type ArrayToItem<T> = T extends any[] ? T[number] : T;
|
|
397
|
-
|
|
398
|
-
/** Create filled array. */
|
|
399
|
-
export declare function arrFill<T>(value: T, count: number): T[];
|
|
400
|
-
|
|
401
|
-
/** Blob to Base64. */
|
|
402
|
-
export declare function blobToBase64(blob: Blob, clean?: boolean): Promise<string | undefined>;
|
|
403
|
-
|
|
404
|
-
/** BroadcastChannel manager. */
|
|
244
|
+
// File: classes/BroadcastMessage.d.ts
|
|
245
|
+
/** BroadcastChannel message handler. */
|
|
405
246
|
export declare class BroadcastMessage<Message = any> {
|
|
406
247
|
constructor(name: string, callback?: ((event: MessageEvent<Message>) => void) | undefined, callbackError?: ((event: MessageEvent<Message>) => void) | undefined, errorCenter?: ErrorCenterInstance);
|
|
407
248
|
/** Get BroadcastChannel instance. */
|
|
408
249
|
getChannel(): BroadcastChannel | undefined;
|
|
409
250
|
/** Send message. */
|
|
410
251
|
post(message: Message): this;
|
|
411
|
-
/** Set
|
|
252
|
+
/** Set success callback. */
|
|
412
253
|
setCallback(callback: (event: MessageEvent<Message>) => void): this;
|
|
413
254
|
/** Set error callback. */
|
|
414
255
|
setCallbackError(callbackError: (event: MessageEvent<Message>) => void): this;
|
|
415
256
|
/** Close channel. */
|
|
416
257
|
destroy(): this;
|
|
417
258
|
}
|
|
418
|
-
|
|
419
|
-
/**
|
|
420
|
-
|
|
259
|
+
// File: classes/Cache.d.ts
|
|
260
|
+
/**
|
|
261
|
+
* In-memory key-value cache.
|
|
262
|
+
* @deprecated
|
|
263
|
+
*/
|
|
264
|
+
export declare class Cache {
|
|
421
265
|
/** Get or compute cached value. */
|
|
422
266
|
get<T>(name: string, callback: () => T, comparison?: any[]): T;
|
|
423
|
-
/**
|
|
267
|
+
/** Async get or compute cached value. */
|
|
424
268
|
getAsync<T>(name: string, callback: () => T, comparison?: any[]): Promise<T>;
|
|
425
269
|
}
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
270
|
+
// File: classes/CacheItem.d.ts
|
|
271
|
+
/**
|
|
272
|
+
* Single cached value with dependencies.
|
|
273
|
+
* @deprecated
|
|
274
|
+
*/
|
|
429
275
|
export declare class CacheItem<T> {
|
|
430
276
|
constructor(callback: () => T);
|
|
431
|
-
/** Get
|
|
277
|
+
/** Get value. Recomputes if dependencies change. */
|
|
432
278
|
getCache(comparison: any[]): T;
|
|
433
|
-
/** Get
|
|
279
|
+
/** Get value before last recomputation. */
|
|
434
280
|
getCacheOld(): T | undefined;
|
|
435
|
-
/**
|
|
281
|
+
/** Async get value. */
|
|
436
282
|
getCacheAsync(comparison: any[]): Promise<T>;
|
|
437
283
|
}
|
|
438
|
-
|
|
439
|
-
/**
|
|
284
|
+
// File: classes/CacheStatic.d.ts
|
|
285
|
+
/**
|
|
286
|
+
* Global persistent cache using ServerStorage.
|
|
287
|
+
* @deprecated
|
|
288
|
+
*/
|
|
440
289
|
export declare class CacheStatic {
|
|
441
|
-
/** Get cached value. */
|
|
290
|
+
/** Get or compute cached value. */
|
|
442
291
|
static get<T>(name: string, callback: () => T, comparison?: any[]): T;
|
|
443
|
-
/**
|
|
292
|
+
/** Async get or compute cached value. */
|
|
444
293
|
static getAsync<T>(name: string, callback: () => T, comparison?: any[]): Promise<T>;
|
|
445
294
|
}
|
|
446
|
-
|
|
447
|
-
/**
|
|
448
|
-
export declare function capitalize(value: string, isLocale?: boolean): string;
|
|
449
|
-
|
|
450
|
-
/** Cookie manager. */
|
|
295
|
+
// File: classes/Cookie.d.ts
|
|
296
|
+
/** Cookie management. */
|
|
451
297
|
export declare class Cookie<T> {
|
|
452
|
-
constructor(name: string);
|
|
453
298
|
/** Get instance by name. */
|
|
454
299
|
static getInstance<T>(name: string): Cookie<unknown>;
|
|
455
|
-
|
|
300
|
+
constructor(name: string);
|
|
301
|
+
/** Get value or update if missing. */
|
|
456
302
|
get(defaultValue?: T | string | (() => (T | string)), options?: CookieOptions): string | T | undefined;
|
|
457
|
-
/**
|
|
303
|
+
/** Update value. */
|
|
458
304
|
set(value?: T | string | (() => (T | string)), options?: CookieOptions): void;
|
|
459
|
-
/**
|
|
305
|
+
/** Delete cookie. */
|
|
460
306
|
remove(): void;
|
|
461
307
|
}
|
|
462
|
-
|
|
463
|
-
/**
|
|
308
|
+
// File: classes/CookieBlock.d.ts
|
|
309
|
+
/** Static interface for cookie access blocking. */
|
|
464
310
|
export declare class CookieBlock {
|
|
311
|
+
/** Get request-isolated instance. */
|
|
465
312
|
static getItem(): CookieBlockInstance;
|
|
313
|
+
/** Get blocking status. */
|
|
466
314
|
static get(): boolean;
|
|
315
|
+
/** Set blocking status. */
|
|
467
316
|
static set(value: boolean): void;
|
|
468
317
|
}
|
|
469
|
-
|
|
318
|
+
// File: classes/CookieBlockInstance.d.ts
|
|
319
|
+
/** Cookie access state handler. */
|
|
470
320
|
export declare class CookieBlockInstance {
|
|
321
|
+
/** Get current block state. */
|
|
471
322
|
get(): boolean;
|
|
323
|
+
/** Set block state. */
|
|
472
324
|
set(value: boolean): void;
|
|
473
325
|
}
|
|
474
|
-
|
|
475
|
-
export
|
|
326
|
+
// File: classes/CookieStorage.d.ts
|
|
327
|
+
export type CookieSameSite = 'strict' | 'lax';
|
|
328
|
+
export type CookieOptions = {
|
|
476
329
|
age?: number;
|
|
477
|
-
sameSite?:
|
|
330
|
+
sameSite?: CookieSameSite;
|
|
478
331
|
path?: string;
|
|
479
332
|
domain?: string;
|
|
480
333
|
secure?: boolean;
|
|
@@ -482,15 +335,11 @@ export declare type CookieOptions = {
|
|
|
482
335
|
partitioned?: boolean;
|
|
483
336
|
arguments?: string[] | Record<string, string | number | boolean>;
|
|
484
337
|
};
|
|
485
|
-
|
|
486
|
-
declare type CookieSameSite_2 = 'strict' | 'lax';
|
|
487
|
-
export { CookieSameSite_2 as CookieSameSite }
|
|
488
|
-
|
|
489
|
-
/** Cross-environment cookie storage. */
|
|
338
|
+
/** Global cookie storage with SSR support. */
|
|
490
339
|
export declare class CookieStorage {
|
|
491
|
-
/** Set
|
|
340
|
+
/** Set get/set listeners. */
|
|
492
341
|
static init(getListener?: (key: string) => any | undefined, getListenerRaw?: () => string, setListener?: (key: string, value: any, cookie: string, options?: CookieOptions) => void): void;
|
|
493
|
-
/**
|
|
342
|
+
/** Reset storage. */
|
|
494
343
|
static reset(): void;
|
|
495
344
|
/** Get cookie value. */
|
|
496
345
|
static get<T>(name: string, defaultValue?: T | (() => T)): T | undefined;
|
|
@@ -498,55 +347,57 @@ export declare class CookieStorage {
|
|
|
498
347
|
static set<T>(name: string, value: T | (() => T), options?: CookieOptions): T;
|
|
499
348
|
/** Remove cookie. */
|
|
500
349
|
static remove(name: string): void;
|
|
501
|
-
/** Refresh from
|
|
350
|
+
/** Refresh data from cookies. */
|
|
502
351
|
static update(): void;
|
|
503
352
|
}
|
|
504
|
-
|
|
505
|
-
/**
|
|
506
|
-
export declare function copyObject<T>(value: T): T;
|
|
507
|
-
|
|
508
|
-
/** Shallow copy with source merge. */
|
|
509
|
-
export declare function copyObjectLite<T, R = T>(value: T, source?: any): R;
|
|
510
|
-
|
|
511
|
-
/** Create DOM element.
|
|
512
|
-
* @remarks Client-only. Returns undefined in SSR.
|
|
513
|
-
*/
|
|
514
|
-
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;
|
|
515
|
-
|
|
516
|
-
/** Local/Session storage wrapper. */
|
|
353
|
+
// File: classes/DataStorage.d.ts
|
|
354
|
+
/** LocalStorage/SessionStorage wrapper with TTL and SSR isolation. */
|
|
517
355
|
export declare class DataStorage<T> {
|
|
518
|
-
|
|
356
|
+
/** Set global key prefix. */
|
|
519
357
|
static setPrefix(newPrefix: string): void;
|
|
520
|
-
|
|
358
|
+
constructor(name: string, isSession?: boolean, errorCenter?: ErrorCenterInstance);
|
|
359
|
+
/** Get data with TTL check. */
|
|
521
360
|
get(defaultValue?: T | (() => T), cache?: number): T | undefined;
|
|
522
|
-
/**
|
|
361
|
+
/** Save data. */
|
|
523
362
|
set(value?: T | (() => T)): T | undefined;
|
|
524
|
-
/**
|
|
363
|
+
/** Clear data. */
|
|
525
364
|
remove(): this;
|
|
526
|
-
/** Sync
|
|
365
|
+
/** Sync from storage. */
|
|
527
366
|
update(): this;
|
|
528
367
|
}
|
|
529
|
-
|
|
530
|
-
/**
|
|
531
|
-
*
|
|
368
|
+
// File: classes/Datetime.d.ts
|
|
369
|
+
/**
|
|
370
|
+
* Date manipulation and formatting.
|
|
371
|
+
* @remarks Creating instance without date in SSR may cause hydration mismatch.
|
|
532
372
|
*/
|
|
533
373
|
export declare class Datetime {
|
|
534
374
|
constructor(date?: NumberOrStringOrDate, type?: GeoDate, code?: string);
|
|
375
|
+
/** Get GeoIntl formatter. */
|
|
535
376
|
getIntl(): GeoIntl;
|
|
377
|
+
/** Get Date object. */
|
|
536
378
|
getDate(): Date;
|
|
379
|
+
/** Get output format type. */
|
|
537
380
|
getType(): GeoDate;
|
|
381
|
+
/** Get hours type (12/24). */
|
|
538
382
|
getHoursType(): GeoHours;
|
|
383
|
+
/** Check if 24-hour format. */
|
|
539
384
|
getHour24(): boolean;
|
|
385
|
+
/** Get timezone offset (minutes). */
|
|
540
386
|
getTimeZoneOffset(): number;
|
|
387
|
+
/** Get timezone string. */
|
|
541
388
|
getTimeZone(style?: GeoTimeZoneStyle): string;
|
|
389
|
+
/** Get first day of week. */
|
|
542
390
|
getFirstDayCode(): GeoFirstDay;
|
|
543
391
|
getYear(): number;
|
|
392
|
+
/** Month (1-12). */
|
|
544
393
|
getMonth(): number;
|
|
545
394
|
getDay(): number;
|
|
546
395
|
getHour(): number;
|
|
547
396
|
getMinute(): number;
|
|
548
397
|
getSecond(): number;
|
|
398
|
+
/** Days in current month. */
|
|
549
399
|
getMaxDay(): number;
|
|
400
|
+
/** Format locale string. */
|
|
550
401
|
locale(type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions): string;
|
|
551
402
|
localeYear(style?: Intl.DateTimeFormatOptions['year']): string;
|
|
552
403
|
localeMonth(style?: Intl.DateTimeFormatOptions['month']): string;
|
|
@@ -554,11 +405,17 @@ export declare class Datetime {
|
|
|
554
405
|
localeHour(style?: Intl.DateTimeFormatOptions['hour']): string;
|
|
555
406
|
localeMinute(style?: Intl.DateTimeFormatOptions['minute']): string;
|
|
556
407
|
localeSecond(style?: Intl.DateTimeFormatOptions['second']): string;
|
|
408
|
+
/** ISO-like standard string. */
|
|
557
409
|
standard(timeZone?: boolean): string;
|
|
410
|
+
/** Set new date. */
|
|
558
411
|
setDate(value: NumberOrStringOrDate): this;
|
|
412
|
+
/** Set format type. */
|
|
559
413
|
setType(value: GeoDate): this;
|
|
414
|
+
/** Set 24h mode. */
|
|
560
415
|
setHour24(value: boolean): this;
|
|
416
|
+
/** Set locale code. */
|
|
561
417
|
setCode(code: string): this;
|
|
418
|
+
/** Set update listener. */
|
|
562
419
|
setWatch(watch: (date: Date, type: GeoDate, hour24: boolean) => void): this;
|
|
563
420
|
setYear(value: number): this;
|
|
564
421
|
setMonth(value: number): this;
|
|
@@ -586,7 +443,9 @@ export declare class Datetime {
|
|
|
586
443
|
moveDayLast(): this;
|
|
587
444
|
moveDayNext(): this;
|
|
588
445
|
moveDayPrevious(): this;
|
|
446
|
+
/** Copy Date object. */
|
|
589
447
|
clone(): Date;
|
|
448
|
+
/** Copy Datetime instance. */
|
|
590
449
|
cloneClass(): Datetime;
|
|
591
450
|
cloneMonthFirst(): Datetime;
|
|
592
451
|
cloneMonthLast(): Datetime;
|
|
@@ -603,73 +462,43 @@ export declare class Datetime {
|
|
|
603
462
|
cloneDayNext(): Datetime;
|
|
604
463
|
cloneDayPrevious(): Datetime;
|
|
605
464
|
}
|
|
606
|
-
|
|
607
|
-
/**
|
|
608
|
-
export declare function domQuerySelector<E extends Element = Element>(selectors: string): E | undefined;
|
|
609
|
-
|
|
610
|
-
/** DOM query all elements. */
|
|
611
|
-
export declare function domQuerySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E> | undefined;
|
|
612
|
-
|
|
613
|
-
export declare type ElementOrString<E extends ElementOrWindow> = E | string;
|
|
614
|
-
|
|
615
|
-
export declare type ElementOrWindow = HTMLElement | Window;
|
|
616
|
-
|
|
617
|
-
export declare type EmptyValue = Undefined | 0 | false | '' | 'undefined' | 'null' | '0' | 'false' | '[]';
|
|
618
|
-
|
|
619
|
-
/** Encode string for HTML attributes. */
|
|
620
|
-
export declare function encodeAttribute(text: string): string;
|
|
621
|
-
|
|
622
|
-
/** Simple HTML attribute encoding. */
|
|
623
|
-
export declare function encodeLiteAttribute(text: string): string;
|
|
624
|
-
|
|
625
|
-
/** Resize image if exceeds max size. */
|
|
626
|
-
export declare function ensureMaxSize(file: Uint8Array, compress?: number, type?: string): Promise<string>;
|
|
627
|
-
|
|
628
|
-
/** Global error management. */
|
|
465
|
+
// File: classes/ErrorCenter.d.ts
|
|
466
|
+
/** Centralized error management. */
|
|
629
467
|
export declare class ErrorCenter {
|
|
468
|
+
/** Get request-isolated instance. */
|
|
630
469
|
static getItem(): ErrorCenterInstance;
|
|
470
|
+
/** Check if error code exists. */
|
|
631
471
|
static has(code: string, group?: string): boolean;
|
|
472
|
+
/** Get error item. */
|
|
632
473
|
static get(code: string, group?: string): ErrorCenterCauseItem | undefined;
|
|
474
|
+
/** Add single cause. */
|
|
633
475
|
static add(cause: ErrorCenterCauseItem): void;
|
|
476
|
+
/** Add multiple causes. */
|
|
634
477
|
static addList(causes: ErrorCenterCauseList): void;
|
|
478
|
+
/** Register handler. */
|
|
635
479
|
static addHandler(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): void;
|
|
480
|
+
/** Register handlers list. */
|
|
636
481
|
static addHandlerList(handlers: ErrorCenterHandlerList): void;
|
|
482
|
+
/** Trigger error handling. */
|
|
637
483
|
static on(cause: ErrorCenterCauseItem): void;
|
|
638
484
|
}
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
group?: ErrorCenterGroup;
|
|
642
|
-
code: string;
|
|
643
|
-
priority?: number;
|
|
644
|
-
label?: string;
|
|
645
|
-
message?: string;
|
|
646
|
-
details?: any;
|
|
647
|
-
};
|
|
648
|
-
|
|
649
|
-
export declare type ErrorCenterCauseList = ErrorCenterCauseItem[];
|
|
650
|
-
|
|
651
|
-
export declare type ErrorCenterGroup = string | undefined;
|
|
652
|
-
|
|
653
|
-
/** Registry for error handlers. */
|
|
485
|
+
// File: classes/ErrorCenterHandler.d.ts
|
|
486
|
+
/** Manages and executes error handlers. */
|
|
654
487
|
export declare class ErrorCenterHandler {
|
|
655
488
|
constructor(handlers?: ErrorCenterHandlerList);
|
|
489
|
+
/** Check for group handlers. */
|
|
656
490
|
has(group: ErrorCenterGroup): boolean;
|
|
491
|
+
/** Get group handler. */
|
|
657
492
|
get(group: ErrorCenterGroup): ErrorCenterHandlerItem | undefined;
|
|
493
|
+
/** Add handler. */
|
|
658
494
|
add(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): this;
|
|
495
|
+
/** Add multiple handlers. */
|
|
659
496
|
addList(handlers: ErrorCenterHandlerList): this;
|
|
497
|
+
/** Trigger group handlers. */
|
|
660
498
|
on(cause: ErrorCenterCauseItem): this;
|
|
661
499
|
}
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
export declare type ErrorCenterHandlerItem = {
|
|
666
|
-
group?: ErrorCenterGroup;
|
|
667
|
-
handlers: ErrorCenterHandlerCallback[];
|
|
668
|
-
};
|
|
669
|
-
|
|
670
|
-
export declare type ErrorCenterHandlerList = ErrorCenterHandlerItem[];
|
|
671
|
-
|
|
672
|
-
/** Error context instance. */
|
|
500
|
+
// File: classes/ErrorCenterInstance.d.ts
|
|
501
|
+
/** Instance-level error registry and dispatcher. */
|
|
673
502
|
export declare class ErrorCenterInstance {
|
|
674
503
|
constructor(causes?: ErrorCenterCauseList, handler?: ErrorCenterHandler);
|
|
675
504
|
has(code: string, group?: string): boolean;
|
|
@@ -680,161 +509,122 @@ export declare class ErrorCenterInstance {
|
|
|
680
509
|
addHandlerList(handlers: ErrorCenterHandlerList): this;
|
|
681
510
|
on(cause: ErrorCenterCauseItem): this;
|
|
682
511
|
}
|
|
683
|
-
|
|
684
|
-
/**
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
observer?: ResizeObserver;
|
|
692
|
-
};
|
|
693
|
-
|
|
694
|
-
/** Lifecycle-controlled event listener wrapper. */
|
|
512
|
+
// File: classes/EventItem.d.ts
|
|
513
|
+
/**
|
|
514
|
+
* Event listener wrapper for DOM/Window.
|
|
515
|
+
* Supports specialized optimizations for 'resize' and 'scroll-sync'.
|
|
516
|
+
* @example
|
|
517
|
+
* const clickEvent = new EventItem('.btn', 'click', () => console.log('Clicked!'));
|
|
518
|
+
* clickEvent.start();
|
|
519
|
+
*/
|
|
695
520
|
export declare class EventItem<E extends ElementOrWindow, O extends Event, D extends Record<string, any> = Record<string, any>> {
|
|
696
521
|
constructor(elementSelector?: ElementOrString<E>, type?: string | string[], listener?: EventListenerDetail<O, D> | undefined, options?: EventOptions, detail?: D | undefined);
|
|
522
|
+
/** Check if active. */
|
|
697
523
|
isActive(): boolean;
|
|
524
|
+
/** Get target element. */
|
|
698
525
|
getElement(): E | undefined;
|
|
526
|
+
/** Change target element. */
|
|
699
527
|
setElement(elementSelector?: ElementOrString<E>): this;
|
|
528
|
+
/** Change safety control element. */
|
|
700
529
|
setElementControl<EC extends HTMLElement>(elementSelector?: ElementOrString<EC>): this;
|
|
530
|
+
/** Change event type. */
|
|
701
531
|
setType(type: string | string[]): this;
|
|
532
|
+
/** Change listener. */
|
|
702
533
|
setListener(listener: EventListenerDetail<O, D>): this;
|
|
534
|
+
/** Change options. */
|
|
703
535
|
setOptions(options?: EventOptions): this;
|
|
536
|
+
/** Change detail data. */
|
|
704
537
|
setDetail(detail?: D): this;
|
|
538
|
+
/** Manually trigger event. */
|
|
705
539
|
dispatch(detail?: D | undefined): this;
|
|
540
|
+
/** Start listening. */
|
|
706
541
|
start(): this;
|
|
542
|
+
/** Stop listening. */
|
|
707
543
|
stop(): this;
|
|
544
|
+
/** Set activity state. */
|
|
708
545
|
toggle(activity: boolean): this;
|
|
546
|
+
/** Restart listener. */
|
|
709
547
|
reset(): this;
|
|
710
548
|
}
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
export declare type EventOptions = AddEventListenerOptions | boolean | undefined;
|
|
715
|
-
|
|
716
|
-
/** Stop event propagation. */
|
|
717
|
-
export declare function eventStopPropagation(event: Event): void;
|
|
718
|
-
|
|
719
|
-
/** Execute value as function if applicable. */
|
|
720
|
-
export declare function executeFunction<T>(callback: T | FunctionArgs<any, T>, ...args: any[]): T;
|
|
721
|
-
|
|
722
|
-
/** Execute async or sync function. */
|
|
723
|
-
export declare function executePromise<T>(callback: ((...args: any[]) => Promise<T>) | ((...args: any[]) => T) | T, ...args: any[]): Promise<T>;
|
|
724
|
-
|
|
725
|
-
/** Iterate object/array and map results. */
|
|
726
|
-
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[];
|
|
727
|
-
|
|
728
|
-
/** Data list formatter. */
|
|
549
|
+
// File: classes/Formatters.d.ts
|
|
550
|
+
/** Data formatting engine. */
|
|
729
551
|
export declare class Formatters<Options extends FormattersOptionsList = FormattersOptionsList, List extends FormattersListProp = FormattersListProp, Item extends FormattersItemProp<List> = FormattersItemProp<List>> {
|
|
730
552
|
constructor(options: Options, list?: List | undefined);
|
|
553
|
+
/** Check if list set. */
|
|
731
554
|
is(): boolean;
|
|
732
|
-
|
|
555
|
+
/** Check if list is array. */
|
|
556
|
+
isArray(): this is this & {
|
|
557
|
+
list: FormattersList<Item>;
|
|
558
|
+
};
|
|
559
|
+
/** Get list length. */
|
|
733
560
|
length(): number;
|
|
561
|
+
/** Get original list. */
|
|
734
562
|
getList(): FormattersList<Item>;
|
|
563
|
+
/** Get options. */
|
|
735
564
|
getOptions(): Options;
|
|
565
|
+
/** Update list. */
|
|
736
566
|
setList(list?: List): this;
|
|
737
|
-
/**
|
|
567
|
+
/** Format and return data. */
|
|
738
568
|
to(): FormattersReturn<List, Options>;
|
|
739
569
|
}
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
export declare type FormattersColumns<T extends FormattersOptionsList> = (keyof T & string)[];
|
|
743
|
-
export declare type FormattersDataItem<T extends FormattersListItem, KT extends string[]> = { [K in keyof T | FormattersKey<KT[number]>]: K extends keyof T ? T[K] : string; };
|
|
744
|
-
export declare type FormattersItemProp<List extends FormattersListProp> = ArrayToItem<List>;
|
|
745
|
-
export declare type FormattersKey<K, A extends string = 'Format'> = K extends string ? `${FormattersCapitalize<K>}${A}` : never;
|
|
746
|
-
export declare type FormattersList<Item extends FormattersListItem> = Item[];
|
|
747
|
-
export declare type FormattersListColumnItem<T extends FormattersListItem, O extends FormattersOptionsList> = FormattersDataItem<T, FormattersColumns<O>>;
|
|
748
|
-
export declare type FormattersListColumns<T extends FormattersListItem, O extends FormattersOptionsList> = FormattersListFormat<T, FormattersColumns<O>>;
|
|
749
|
-
export declare type FormattersListFormat<T extends FormattersListItem, K extends string[]> = FormattersDataItem<T, K>[];
|
|
750
|
-
export declare type FormattersListItem = Record<string, any>;
|
|
751
|
-
export declare type FormattersListProp = FormattersList<FormattersListItem> | FormattersListItem;
|
|
752
|
-
|
|
753
|
-
export declare type FormattersOptionsCurrency = { currencyPropName?: string; options?: string | Intl.NumberFormatOptions; numberOnly?: boolean; };
|
|
754
|
-
export declare type FormattersOptionsDate = { type?: GeoDate; options?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions; hour24?: boolean; };
|
|
755
|
-
export declare 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>;
|
|
756
|
-
export declare type FormattersOptionsItem<Type extends FormattersType = FormattersType, R = string> = { type?: Type; transformation?: (valueOriginal: any, item: any, options?: FormattersOptionsInformation<Type>) => R; options?: FormattersOptionsInformation<Type>; };
|
|
757
|
-
export declare type FormattersOptionsList = Record<string, FormattersOptionsItem>;
|
|
758
|
-
export declare type FormattersOptionsName = { lastPropName?: string; firstPropName?: string; surname?: string; short?: boolean; };
|
|
759
|
-
export declare type FormattersOptionsNumber = { options?: Intl.NumberFormatOptions; };
|
|
760
|
-
export declare type FormattersOptionsPlural = { words: string; options?: Intl.PluralRulesOptions; optionsNumber?: Intl.NumberFormatOptions; };
|
|
761
|
-
export declare type FormattersOptionsUnit = { unit: string | Intl.NumberFormatOptions; };
|
|
762
|
-
export declare 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);
|
|
763
|
-
|
|
764
|
-
export declare enum FormattersType {
|
|
765
|
-
currency = "currency",
|
|
766
|
-
date = "date",
|
|
767
|
-
name = "name",
|
|
768
|
-
number = "number",
|
|
769
|
-
plural = "plural",
|
|
770
|
-
unit = "unit"
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
/** Cyclic requestAnimationFrame. */
|
|
774
|
-
export declare function frame(callback: () => void, next?: () => boolean, end?: () => void): void;
|
|
775
|
-
|
|
776
|
-
export declare type FunctionAnyType<T = any, R = any> = (...args: T[]) => R;
|
|
777
|
-
export declare type FunctionArgs<T, R> = (...args: T[]) => R;
|
|
778
|
-
export declare type FunctionReturn<R = any> = () => R;
|
|
779
|
-
export declare type FunctionVoid = () => void;
|
|
780
|
-
|
|
781
|
-
/** Geographical data manager. */
|
|
570
|
+
// File: classes/Geo.d.ts
|
|
571
|
+
/** Geographic data static interface. */
|
|
782
572
|
export declare class Geo {
|
|
573
|
+
/** Get request-isolated instance. */
|
|
783
574
|
static getObject(): GeoInstance;
|
|
575
|
+
/** Get current geo full item. */
|
|
784
576
|
static get(): GeoItemFull;
|
|
577
|
+
/** Get 2-letter country code. */
|
|
785
578
|
static getCountry(): string;
|
|
579
|
+
/** Get 2-letter language code. */
|
|
786
580
|
static getLanguage(): string;
|
|
581
|
+
/** Get 'en-US' style locale. */
|
|
787
582
|
static getStandard(): string;
|
|
583
|
+
/** Get week start code. */
|
|
788
584
|
static getFirstDay(): string;
|
|
585
|
+
/** Get current location string. */
|
|
789
586
|
static getLocation(): string;
|
|
587
|
+
/** Get updated full item. */
|
|
790
588
|
static getItem(): GeoItemFull;
|
|
589
|
+
/** Get all available geo data. */
|
|
791
590
|
static getList(): GeoItem[];
|
|
591
|
+
/** Get data by country/language code. */
|
|
792
592
|
static getByCode(code?: string): GeoItemFull;
|
|
593
|
+
/** Match exact full locale string. */
|
|
793
594
|
static getByCodeFull(code: string): GeoItem | undefined;
|
|
794
595
|
static getByCountry(country: string): GeoItem | undefined;
|
|
795
596
|
static getByLanguage(language: string): GeoItem | undefined;
|
|
597
|
+
/** Get timezone offset. */
|
|
796
598
|
static getTimezone(): number;
|
|
599
|
+
/** Get '+HH:MM' timezone string. */
|
|
797
600
|
static getTimezoneFormat(): string;
|
|
601
|
+
/** Alias for getByCode. */
|
|
798
602
|
static find(code: string): GeoItemFull;
|
|
603
|
+
/** Convert item to 'lang-COUNTRY' string. */
|
|
799
604
|
static toStandard(item: GeoItem): string;
|
|
605
|
+
/** Set location. */
|
|
800
606
|
static set(code: string, save?: boolean): void;
|
|
607
|
+
/** Set timezone offset. */
|
|
801
608
|
static setTimezone(timezone: number): void;
|
|
802
609
|
}
|
|
803
|
-
|
|
610
|
+
// File: classes/GeoFlag.d.ts
|
|
804
611
|
export declare const GEO_FLAG_ICON_NAME = "f";
|
|
805
|
-
|
|
806
|
-
export declare type GeoDate = 'full' | 'datetime' | 'date' | 'year-month' | 'year' | 'month' | 'day' | 'day-month' | 'time' | 'hour-minute' | 'hour' | 'minute' | 'second';
|
|
807
|
-
export declare type GeoFirstDay = 1 | 6 | 0;
|
|
808
|
-
|
|
809
|
-
/** Flag and country info. */
|
|
612
|
+
/** Country flag and name provider. */
|
|
810
613
|
export declare class GeoFlag {
|
|
811
|
-
static flags: Record<string, string>;
|
|
812
614
|
constructor(code?: string);
|
|
615
|
+
/** Get country info by code. */
|
|
813
616
|
get(code?: string): GeoFlagItem | undefined;
|
|
617
|
+
/** Get icon ID. */
|
|
814
618
|
getFlag(code?: string): string | undefined;
|
|
619
|
+
/** Get list of country items. */
|
|
815
620
|
getList(codes?: string[]): GeoFlagItem[];
|
|
621
|
+
/** Get country items in native languages. */
|
|
816
622
|
getNational(codes?: string[]): GeoFlagNational[];
|
|
623
|
+
/** Set locale. */
|
|
817
624
|
setCode(code: string): this;
|
|
818
625
|
}
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
language: string;
|
|
822
|
-
country: string;
|
|
823
|
-
standard: string;
|
|
824
|
-
icon?: string;
|
|
825
|
-
label: string;
|
|
826
|
-
value: string;
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
export declare interface GeoFlagNational extends GeoFlagItem {
|
|
830
|
-
description: string;
|
|
831
|
-
nationalLanguage: string;
|
|
832
|
-
nationalCountry: string;
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
export declare type GeoHours = '12' | '24';
|
|
836
|
-
|
|
837
|
-
/** Geo context instance. */
|
|
626
|
+
// File: classes/GeoInstance.d.ts
|
|
627
|
+
/** Geographic state handler. */
|
|
838
628
|
export declare class GeoInstance {
|
|
839
629
|
constructor();
|
|
840
630
|
get(): GeoItemFull;
|
|
@@ -856,8 +646,8 @@ export declare class GeoInstance {
|
|
|
856
646
|
set(code: string, save?: boolean): void;
|
|
857
647
|
setTimezone(timezone: number): void;
|
|
858
648
|
}
|
|
859
|
-
|
|
860
|
-
/**
|
|
649
|
+
// File: classes/GeoIntl.d.ts
|
|
650
|
+
/** Wrapper for Intl API formatting. */
|
|
861
651
|
export declare class GeoIntl {
|
|
862
652
|
static isItem(code?: string): boolean;
|
|
863
653
|
static getLocation(code?: string): string;
|
|
@@ -865,11 +655,14 @@ export declare class GeoIntl {
|
|
|
865
655
|
constructor(code?: string, errorCenter?: ErrorCenterInstance);
|
|
866
656
|
getLocation(): string;
|
|
867
657
|
getFirstDay(): string;
|
|
658
|
+
/** Format display names. */
|
|
868
659
|
display(value?: string, typeOptions?: Intl.DisplayNamesOptions['type'] | Intl.DisplayNamesOptions): string;
|
|
869
660
|
languageName(value?: string, style?: Intl.RelativeTimeFormatStyle): string;
|
|
870
661
|
countryName(value?: string, style?: Intl.RelativeTimeFormatStyle): string;
|
|
662
|
+
/** Format localized full name. */
|
|
871
663
|
fullName(last: string, first: string, surname?: string, short?: boolean): string;
|
|
872
664
|
number(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
665
|
+
/** Get decimal separator. */
|
|
873
666
|
decimal(): string;
|
|
874
667
|
currency(value: NumberOrString, currencyOptions?: string | Intl.NumberFormatOptions, numberOnly?: boolean): string;
|
|
875
668
|
currencySymbol(currency: string, currencyDisplay?: keyof Intl.NumberFormatOptionsCurrencyDisplayRegistry): string;
|
|
@@ -877,9 +670,11 @@ export declare class GeoIntl {
|
|
|
877
670
|
sizeFile(value: NumberOrString, unitOptions?: 'byte' | 'kilobyte' | 'megabyte' | 'gigabyte' | 'terabyte' | 'petabyte' | Intl.NumberFormatOptions): string;
|
|
878
671
|
percent(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
879
672
|
percentBy100(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
673
|
+
/** Localized plural formatting. */
|
|
880
674
|
plural(value: NumberOrString, words: string, options?: Intl.PluralRulesOptions, optionsNumber?: Intl.NumberFormatOptions): string;
|
|
881
675
|
date(value: NumberOrStringOrDate, type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, hour24?: boolean): string;
|
|
882
676
|
relative(value: NumberOrStringOrDate, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, todayValue?: Date): string;
|
|
677
|
+
/** Relative time with fallback to standard date. */
|
|
883
678
|
relativeLimit(value: NumberOrStringOrDate, limit: number, todayValue?: Date, relativeOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, dateOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, type?: GeoDate, hour24?: boolean): string;
|
|
884
679
|
relativeByValue(value: NumberOrString, unit: Intl.RelativeTimeFormatUnit, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions): string;
|
|
885
680
|
month(value?: NumberOrStringOrDate, style?: Intl.DateTimeFormatOptions['month']): string;
|
|
@@ -887,181 +682,46 @@ export declare class GeoIntl {
|
|
|
887
682
|
weekday(value?: NumberOrStringOrDate, style?: Intl.DateTimeFormatOptions['weekday']): string;
|
|
888
683
|
weekdays(style?: Intl.DateTimeFormatOptions['weekday']): ItemValue<number | undefined>[];
|
|
889
684
|
time(value: NumberOrStringOrDate): string;
|
|
685
|
+
/** Locale-aware string sorting. */
|
|
890
686
|
sort<T>(data: T[], compareFn?: (a: T, b: T) => [string, string]): T[];
|
|
891
687
|
}
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
country: string;
|
|
895
|
-
countryAlternative?: string[];
|
|
896
|
-
language: string;
|
|
897
|
-
languageAlternative?: string[];
|
|
898
|
-
firstDay?: string | null;
|
|
899
|
-
zone?: string | null;
|
|
900
|
-
phoneCode?: string;
|
|
901
|
-
phoneWithin?: string;
|
|
902
|
-
phoneMask?: string | string[];
|
|
903
|
-
nameFormat?: 'fl' | 'fsl' | 'lf' | 'lsf' | string;
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
export declare interface GeoItemFull extends Omit<GeoItem, 'firstDay'> {
|
|
907
|
-
standard: string;
|
|
908
|
-
firstDay: string;
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
/** Phone mask and country code info. */
|
|
688
|
+
// File: classes/GeoPhone.d.ts
|
|
689
|
+
/** Phone mask processing. */
|
|
912
690
|
export declare class GeoPhone {
|
|
691
|
+
/** Get phone info by locale code. */
|
|
913
692
|
static get(code: string): GeoPhoneValue | undefined;
|
|
693
|
+
/** Match info by raw phone number. */
|
|
914
694
|
static getByPhone(phone: string): GeoPhoneMapInfo;
|
|
695
|
+
/** Get mask data by locale. */
|
|
915
696
|
static getByCode(code: string): GeoPhoneMap | undefined;
|
|
916
697
|
static getList(): GeoPhoneValue[];
|
|
917
698
|
static getMap(): Record<string, GeoPhoneMap>;
|
|
699
|
+
/** Apply phone mask. */
|
|
918
700
|
static toMask(phone: string, masks?: string[]): string | undefined;
|
|
701
|
+
/** Remove domestic zero/prefix. */
|
|
919
702
|
static removeZero(phone: string): string;
|
|
920
703
|
}
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
items: GeoPhoneValue[];
|
|
924
|
-
info: GeoPhoneValue | undefined;
|
|
925
|
-
value: string | undefined;
|
|
926
|
-
mask: string[];
|
|
927
|
-
maskFull: string[];
|
|
928
|
-
next: Record<string, GeoPhoneMap>;
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
export declare interface GeoPhoneMapInfo {
|
|
932
|
-
item?: GeoPhoneMap;
|
|
933
|
-
phone?: string;
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
export declare interface GeoPhoneValue {
|
|
937
|
-
phone: number;
|
|
938
|
-
within: number;
|
|
939
|
-
mask: string[];
|
|
940
|
-
value: string;
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
export declare type GeoTimeZoneStyle = 'minute' | 'hour' | 'ISO8601' | 'RFC';
|
|
944
|
-
|
|
945
|
-
/** Split string for highlight rendering. */
|
|
946
|
-
export declare function getArrayHighlightMatch(value: string, search?: string | RegExp): HighlightMatchItem[];
|
|
947
|
-
|
|
948
|
-
/** Get element attributes. */
|
|
949
|
-
export declare function getAttributes<E extends ElementOrWindow>(element?: ElementOrString<E>): Record<string, string | undefined>;
|
|
950
|
-
|
|
951
|
-
/** Get clipboard text. */
|
|
952
|
-
export declare function getClipboardData(event?: ClipboardEvent): Promise<string>;
|
|
953
|
-
|
|
954
|
-
/** Get values of a specific column. */
|
|
955
|
-
export declare function getColumn<T, K extends keyof T>(array: ObjectOrArray<T>, column: K): (T[K] | undefined)[];
|
|
956
|
-
|
|
957
|
-
/** Get current formatted date.
|
|
958
|
-
* @remarks Client-only for SSR stability.
|
|
959
|
-
*/
|
|
960
|
-
export declare function getCurrentDate(format?: GeoDate): string;
|
|
961
|
-
|
|
962
|
-
/** Get timestamp. @remarks SSR warning: hydration mismatch likely. */
|
|
963
|
-
export declare function getCurrentTime(): number;
|
|
964
|
-
|
|
965
|
-
/** Get element by selector. */
|
|
966
|
-
export declare function getElement<E extends ElementOrWindow, R extends Exclude<E, Window>>(element?: ElementOrString<E>): R | undefined;
|
|
967
|
-
|
|
968
|
-
/** Get or generate element ID. */
|
|
969
|
-
export declare function getElementId<E extends ElementOrWindow>(element?: ElementOrString<E>, selector?: string): string;
|
|
970
|
-
|
|
971
|
-
/** Get HTMLImageElement from source. */
|
|
972
|
-
export declare function getElementImage(image: HTMLImageElement | string): HTMLImageElement | undefined;
|
|
973
|
-
|
|
974
|
-
/** Get element property value. */
|
|
975
|
-
export declare function getElementItem<T extends ElementOrWindow, K extends keyof T, D>(element: ElementOrString<T>, index: K | string, defaultValue?: D): T[K] | D | undefined;
|
|
976
|
-
|
|
977
|
-
export declare function getElementOrWindow<E extends ElementOrWindow>(element?: ElementOrString<E>): E | undefined;
|
|
978
|
-
|
|
979
|
-
/** Generate hydration script tag. */
|
|
980
|
-
export declare function getElementSafeScript(id: string, data: any): string;
|
|
981
|
-
|
|
982
|
-
/** Exact phrase RegExp. */
|
|
983
|
-
export declare function getExactSearchExp(search: string): RegExp;
|
|
984
|
-
|
|
985
|
-
/** Pattern-based RegExp creator. */
|
|
986
|
-
export declare function getExp(value: string, flags?: string, pattern?: string): RegExp;
|
|
987
|
-
|
|
988
|
-
/** Parse hydration JSON from script tag. */
|
|
989
|
-
export declare function getHydrationData<T>(id: string, defaultValue: T, remove?: boolean): T;
|
|
990
|
-
|
|
991
|
-
/** Get value from object by path. */
|
|
992
|
-
export declare function getItemByPath<T extends Record<string, any>, R = string>(item: T, path: string): R | undefined;
|
|
993
|
-
|
|
994
|
-
/** Get KeyboardEvent key. */
|
|
995
|
-
export declare function getKey(event: KeyboardEvent): string;
|
|
996
|
-
|
|
997
|
-
export declare function getLengthOfAllArray(value: ObjectOrArray<string>): number[];
|
|
998
|
-
|
|
999
|
-
export declare function getMaxLengthAllArray(data: ObjectOrArray<string>): number;
|
|
1000
|
-
|
|
1001
|
-
export declare function getMinLengthAllArray(data: ObjectOrArray<string>): number;
|
|
1002
|
-
|
|
1003
|
-
/** Get mouse/touch coordinates. */
|
|
1004
|
-
export declare function getMouseClient(event: MouseEvent & TouchEvent): ImageCoordinator;
|
|
1005
|
-
export declare function getMouseClientX(event: MouseEvent & TouchEvent): number;
|
|
1006
|
-
export declare function getMouseClientY(event: MouseEvent & TouchEvent): number;
|
|
1007
|
-
|
|
1008
|
-
/** Pick object keys. */
|
|
1009
|
-
export declare function getObjectByKeys<T extends Record<string, any>, K extends keyof T>(data: T, keys: K[]): Pick<T, K>;
|
|
1010
|
-
|
|
1011
|
-
/** Remove properties by value. */
|
|
1012
|
-
export declare function getObjectNoUndefined<T extends Record<string | number, any>>(data: T, exception?: any): T;
|
|
1013
|
-
|
|
1014
|
-
/** Ensure value is object. */
|
|
1015
|
-
export declare function getObjectOrNone<T>(value: T): T & Record<string, any>;
|
|
1016
|
-
|
|
1017
|
-
/** Strip non-alphanumeric. */
|
|
1018
|
-
export declare function getOnlyText(text: any): string;
|
|
1019
|
-
|
|
1020
|
-
/** Random text generator. */
|
|
1021
|
-
export declare function getRandomText(min: number, max: number, symbol?: string, lengthMin?: number, lengthMax?: number): string;
|
|
1022
|
-
|
|
1023
|
-
/** Convert object to key-value string. */
|
|
1024
|
-
export declare function getRequestString(request: Record<string, any> | any[], sign?: string, separator?: string, subKey?: string): string;
|
|
1025
|
-
|
|
1026
|
-
/** Multi-word search RegExp. */
|
|
1027
|
-
export declare function getSearchExp(search: string, limit?: number): RegExp;
|
|
1028
|
-
|
|
1029
|
-
/** Word-separating search RegExp. */
|
|
1030
|
-
export declare function getSeparatingSearchExp(search: string | RegExp, limit?: number): RegExp;
|
|
1031
|
-
|
|
1032
|
-
export declare function getStepPercent(min: number | undefined, max: number): number;
|
|
1033
|
-
|
|
1034
|
-
export declare function getStepValue(min: number | undefined, max: number): number;
|
|
1035
|
-
|
|
1036
|
-
/** Application-wide global storage. */
|
|
704
|
+
// File: classes/Global.d.ts
|
|
705
|
+
/** Application-wide data storage. */
|
|
1037
706
|
export declare class Global {
|
|
1038
707
|
static getItem(): Record<string, any>;
|
|
1039
708
|
static get<R = any>(name: string): R;
|
|
709
|
+
/** Add data (runs once). */
|
|
1040
710
|
static add(data: Record<string, any>): void;
|
|
1041
711
|
}
|
|
1042
|
-
|
|
1043
|
-
/**
|
|
1044
|
-
export declare function goScroll(selector: string, elementTo: HTMLElement | undefined, elementCenter?: HTMLElement): void;
|
|
1045
|
-
|
|
1046
|
-
/** Smooth scroll to element. */
|
|
1047
|
-
export declare function goScrollSmooth<E extends HTMLElement>(element: E, options?: ScrollIntoViewOptions, shift?: number): void;
|
|
1048
|
-
|
|
1049
|
-
export declare function goScrollTo(element?: HTMLElement, elementTo?: HTMLElement, behavior?: ScrollBehavior): void;
|
|
1050
|
-
|
|
1051
|
-
/** Web Share API wrapper. */
|
|
1052
|
-
export declare function handleShare(data: ShareData): Promise<boolean>;
|
|
1053
|
-
|
|
1054
|
-
/** URL Hash storage. */
|
|
712
|
+
// File: classes/Hash.d.ts
|
|
713
|
+
/** URL hash state management interface. */
|
|
1055
714
|
export declare class Hash {
|
|
1056
715
|
static getItem(): HashInstance;
|
|
1057
716
|
static get<T>(name: string, defaultValue?: T | (() => T)): T;
|
|
1058
717
|
static set<T>(name: string, callback: T | (() => T)): void;
|
|
1059
718
|
static addWatch<T>(name: string, callback: (value: T) => void): void;
|
|
1060
719
|
static removeWatch<T>(name: string, callback: (value: T) => void): void;
|
|
720
|
+
/** Sync variables from URL. */
|
|
1061
721
|
static reload(): void;
|
|
1062
722
|
}
|
|
1063
|
-
|
|
1064
|
-
/**
|
|
723
|
+
// File: classes/HashInstance.d.ts
|
|
724
|
+
/** URL hash data controller. */
|
|
1065
725
|
export declare class HashInstance {
|
|
1066
726
|
get<T>(name: string, defaultValue?: T | (() => T)): T;
|
|
1067
727
|
set<T>(name: string, callback: T | (() => T)): this;
|
|
@@ -1069,16 +729,18 @@ export declare class HashInstance {
|
|
|
1069
729
|
removeWatch<T>(name: string, callback: (value: T) => void): this;
|
|
1070
730
|
reload(): this;
|
|
1071
731
|
}
|
|
1072
|
-
|
|
1073
|
-
export
|
|
1074
|
-
|
|
1075
|
-
|
|
732
|
+
// File: classes/Icons.d.ts
|
|
733
|
+
export type IconsItem = string | Promise<string | any> | (() => Promise<string | any>);
|
|
734
|
+
export type IconsConfig = {
|
|
735
|
+
url?: string;
|
|
736
|
+
list?: Record<string, IconsItem>;
|
|
1076
737
|
};
|
|
1077
|
-
|
|
1078
|
-
/** Icon registry and loader. */
|
|
738
|
+
/** Global icon registry. */
|
|
1079
739
|
export declare class Icons {
|
|
1080
740
|
static is(index: string): boolean;
|
|
741
|
+
/** Get icon by name (async). */
|
|
1081
742
|
static get(index: string, url?: string, wait?: number): Promise<string>;
|
|
743
|
+
/** Get icon by name (sync). */
|
|
1082
744
|
static getAsync(index: string, url?: string): string;
|
|
1083
745
|
static getNameList(): string[];
|
|
1084
746
|
static getUrlGlobal(): string;
|
|
@@ -1089,88 +751,8 @@ export declare class Icons {
|
|
|
1089
751
|
static setUrl(url: string): void;
|
|
1090
752
|
static setConfig(config: IconsConfig): void;
|
|
1091
753
|
}
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
url?: string;
|
|
1095
|
-
list?: Record<string, IconsItem>;
|
|
1096
|
-
};
|
|
1097
|
-
|
|
1098
|
-
export declare type IconsItem = string | Promise<string | any> | (() => Promise<string | any>);
|
|
1099
|
-
|
|
1100
|
-
export declare type ImageCoordinator = {
|
|
1101
|
-
x: number;
|
|
1102
|
-
y: number;
|
|
1103
|
-
};
|
|
1104
|
-
|
|
1105
|
-
export declare function inArray<T>(array: T[], value: T): boolean;
|
|
1106
|
-
|
|
1107
|
-
/** Init element ID listener for SSR context. */
|
|
1108
|
-
export declare function initGetElementId(newListener: () => string | number): void;
|
|
1109
|
-
|
|
1110
|
-
export declare function initScrollbarOffset(): Promise<void>;
|
|
1111
|
-
|
|
1112
|
-
/** Compute key intersection. */
|
|
1113
|
-
export declare function intersectKey<T, KT extends keyof T, C, KC extends keyof C>(data?: T, comparison?: C): Record<KT & KC, T[KT]>;
|
|
1114
|
-
|
|
1115
|
-
/** Check API success flag. */
|
|
1116
|
-
export declare const isApiSuccess: <T>(data: ApiData<T>) => boolean;
|
|
1117
|
-
|
|
1118
|
-
export declare function isArray<T, R>(value: T): value is Extract<T, R[]>;
|
|
1119
|
-
|
|
1120
|
-
export declare function isDifferent<T>(value: ObjectItem<T>, old: ObjectItem<T>): boolean;
|
|
1121
|
-
|
|
1122
|
-
export declare function isDomData(): boolean;
|
|
1123
|
-
|
|
1124
|
-
/** Check for window object. */
|
|
1125
|
-
export declare function isDomRuntime(): boolean;
|
|
1126
|
-
|
|
1127
|
-
/** Check element visibility (not display: none). */
|
|
1128
|
-
export declare function isElementVisible<E extends ElementOrWindow>(elementSelectors?: ElementOrString<E>): boolean;
|
|
1129
|
-
|
|
1130
|
-
/** Check Enter/Space key. */
|
|
1131
|
-
export declare const isEnter: (event: KeyboardEvent, isInputElement?: boolean) => boolean;
|
|
1132
|
-
|
|
1133
|
-
/** Check if value is not empty. */
|
|
1134
|
-
export declare function isFilled<T>(value: T, zeroTrue?: boolean): value is Exclude<T, EmptyValue>;
|
|
1135
|
-
|
|
1136
|
-
export declare function isFloat(value: any): boolean;
|
|
1137
|
-
|
|
1138
|
-
export declare function isFunction<T>(callback: T): callback is Extract<T, FunctionArgs<any, any>>;
|
|
1139
|
-
|
|
1140
|
-
/** Check if element is in DOM. */
|
|
1141
|
-
export declare function isInDom<E extends ElementOrWindow>(element?: ElementOrString<E>): boolean;
|
|
1142
|
-
|
|
1143
|
-
/** Check if input/editable element. */
|
|
1144
|
-
export declare const isInput: (element: HTMLElement | EventTarget | null) => boolean;
|
|
1145
|
-
|
|
1146
|
-
export declare function isIntegerBetween(value: number, between: number): boolean;
|
|
1147
|
-
|
|
1148
|
-
export declare function isNull<T>(value: T): value is Extract<T, Undefined>;
|
|
1149
|
-
|
|
1150
|
-
export declare function isNumber(value: any): boolean;
|
|
1151
|
-
|
|
1152
|
-
export declare function isObject<T>(value: T): value is Extract<T, Record<any, any>>;
|
|
1153
|
-
|
|
1154
|
-
export declare function isObjectNotArray<T>(value: T): value is Exclude<Extract<T, Record<any, any>>, any[] | undefined | null>;
|
|
1155
|
-
|
|
1156
|
-
export declare function isOnLine(): boolean;
|
|
1157
|
-
|
|
1158
|
-
export declare function isSelected<T, S>(value: T, selected: T | T[] | S): boolean;
|
|
1159
|
-
|
|
1160
|
-
export declare function isSelectedByList<T>(values: T | T[], selected: T | T[]): boolean;
|
|
1161
|
-
|
|
1162
|
-
export declare function isShare(): boolean;
|
|
1163
|
-
|
|
1164
|
-
export declare function isString<T>(value: T): value is Extract<T, string>;
|
|
1165
|
-
|
|
1166
|
-
export declare function isWindow<E>(element: E): element is Extract<E, Window>;
|
|
1167
|
-
|
|
1168
|
-
export declare type Item<V> = { index: string; value: V; };
|
|
1169
|
-
export declare type ItemList<T = any> = Record<string, T>;
|
|
1170
|
-
export declare type ItemName<V> = { name: string | number; value: V; };
|
|
1171
|
-
export declare type ItemValue<V> = { label: string; value: V; };
|
|
1172
|
-
|
|
1173
|
-
/** Global loading indicator. */
|
|
754
|
+
// File: classes/Loading.d.ts
|
|
755
|
+
/** Global loader controller. */
|
|
1174
756
|
export declare class Loading {
|
|
1175
757
|
static is(): boolean;
|
|
1176
758
|
static get(): number;
|
|
@@ -1180,10 +762,16 @@ export declare class Loading {
|
|
|
1180
762
|
static registrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
|
|
1181
763
|
static unregistrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
|
|
1182
764
|
}
|
|
1183
|
-
|
|
1184
|
-
export
|
|
1185
|
-
|
|
1186
|
-
|
|
765
|
+
// File: classes/LoadingInstance.d.ts
|
|
766
|
+
export type LoadingDetail = {
|
|
767
|
+
loading: boolean;
|
|
768
|
+
};
|
|
769
|
+
export type LoadingRegistrationItem = {
|
|
770
|
+
item: EventItem<Window, CustomEvent, LoadingDetail>;
|
|
771
|
+
listener: EventListenerDetail<CustomEvent, LoadingDetail>;
|
|
772
|
+
element?: ElementOrString<HTMLElement>;
|
|
773
|
+
};
|
|
774
|
+
/** Loading state instance. */
|
|
1187
775
|
export declare class LoadingInstance {
|
|
1188
776
|
constructor(eventName?: string);
|
|
1189
777
|
is(): boolean;
|
|
@@ -1193,14 +781,8 @@ export declare class LoadingInstance {
|
|
|
1193
781
|
registrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
|
|
1194
782
|
unregistrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
|
|
1195
783
|
}
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
item: EventItem<Window, CustomEvent, LoadingDetail>;
|
|
1199
|
-
listener: EventListenerDetail<CustomEvent, LoadingDetail>;
|
|
1200
|
-
element?: ElementOrString<HTMLElement>;
|
|
1201
|
-
};
|
|
1202
|
-
|
|
1203
|
-
/** Unified SEO Meta tag manager. */
|
|
784
|
+
// File: classes/Meta.d.ts
|
|
785
|
+
/** Integrated SEO and social meta-tag manager. */
|
|
1204
786
|
export declare class Meta extends MetaManager<MetaTag[]> {
|
|
1205
787
|
constructor();
|
|
1206
788
|
getOg(): MetaOg;
|
|
@@ -1214,6 +796,7 @@ export declare class Meta extends MetaManager<MetaTag[]> {
|
|
|
1214
796
|
getAuthor(): string;
|
|
1215
797
|
getSiteName(): string;
|
|
1216
798
|
getLocale(): string;
|
|
799
|
+
/** Set title and sync social tags. */
|
|
1217
800
|
setTitle(title: string): this;
|
|
1218
801
|
setKeywords(keywords: string | string[]): this;
|
|
1219
802
|
setDescription(description: string): this;
|
|
@@ -1223,14 +806,14 @@ export declare class Meta extends MetaManager<MetaTag[]> {
|
|
|
1223
806
|
setAuthor(author: string): this;
|
|
1224
807
|
setSiteName(siteName: string): this;
|
|
1225
808
|
setLocale(locale: string): this;
|
|
809
|
+
/** Set global title suffix. */
|
|
1226
810
|
setSuffix(suffix?: string): void;
|
|
811
|
+
/** Get all meta HTML. */
|
|
1227
812
|
html(): string;
|
|
813
|
+
/** Get title HTML. */
|
|
1228
814
|
htmlTitle(): string;
|
|
1229
815
|
}
|
|
1230
|
-
|
|
1231
|
-
export declare type MetaList<T extends readonly string[]> = { [K in T[number]]?: string; };
|
|
1232
|
-
|
|
1233
|
-
/** Meta tag base manager. */
|
|
816
|
+
// File: classes/MetaManager.d.ts
|
|
1234
817
|
export declare class MetaManager<T extends readonly string[], Key extends keyof MetaList<T> = keyof MetaList<T>> {
|
|
1235
818
|
constructor(listMeta: T, isProperty?: boolean);
|
|
1236
819
|
getListMeta(): T;
|
|
@@ -1240,8 +823,8 @@ export declare class MetaManager<T extends readonly string[], Key extends keyof
|
|
|
1240
823
|
set(name: Key, content: string): this;
|
|
1241
824
|
setByList(metaList: MetaList<T>): this;
|
|
1242
825
|
}
|
|
1243
|
-
|
|
1244
|
-
/** Open Graph manager. */
|
|
826
|
+
// File: classes/MetaOg.d.ts
|
|
827
|
+
/** Open Graph metadata manager. */
|
|
1245
828
|
export declare class MetaOg extends MetaManager<MetaOpenGraphTag[]> {
|
|
1246
829
|
constructor();
|
|
1247
830
|
getTitle(): string;
|
|
@@ -1259,60 +842,8 @@ export declare class MetaOg extends MetaManager<MetaOpenGraphTag[]> {
|
|
|
1259
842
|
setLocale(locale: string): this;
|
|
1260
843
|
setSiteName(siteName: string): this;
|
|
1261
844
|
}
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
export declare enum MetaOpenGraphAvailability { inStock = "in stock", outOfStock = "out of stock", preorder = "preorder", backorder = "backorder", discontinued = "discontinued", pending = "pending" }
|
|
1265
|
-
export declare enum MetaOpenGraphCondition { new = "new", used = "used", refurbished = "refurbished" }
|
|
1266
|
-
export declare enum MetaOpenGraphGender { female = "female", male = "male", unisex = "unisex" }
|
|
1267
|
-
|
|
1268
|
-
/** Common OG tags. */
|
|
1269
|
-
export declare enum MetaOpenGraphTag {
|
|
1270
|
-
title = "og:title",
|
|
1271
|
-
type = "og:type",
|
|
1272
|
-
url = "og:url",
|
|
1273
|
-
image = "og:image",
|
|
1274
|
-
description = "og:description",
|
|
1275
|
-
locale = "og:locale",
|
|
1276
|
-
siteName = "og:site_name",
|
|
1277
|
-
imageUrl = "og:image:url",
|
|
1278
|
-
imageSecureUrl = "og:image:secure_url",
|
|
1279
|
-
imageType = "og:image:type",
|
|
1280
|
-
imageWidth = "og:image:width",
|
|
1281
|
-
imageHeight = "og:image:height",
|
|
1282
|
-
articlePublishedTime = "article:published_time",
|
|
1283
|
-
articleModifiedTime = "article:modified_time",
|
|
1284
|
-
productPriceAmount = "product:price:amount",
|
|
1285
|
-
productPriceCurrency = "product:price:currency"
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
|
-
export declare enum MetaOpenGraphType {
|
|
1289
|
-
website = "website",
|
|
1290
|
-
article = "article",
|
|
1291
|
-
video = "video.other",
|
|
1292
|
-
videoTvShow = "video.tv_show",
|
|
1293
|
-
videoEpisode = "video.episode",
|
|
1294
|
-
videoMovie = "video.movie",
|
|
1295
|
-
musicAlbum = "music.album",
|
|
1296
|
-
musicPlaylist = "music.playlist",
|
|
1297
|
-
musicSong = "music.song",
|
|
1298
|
-
product = "product",
|
|
1299
|
-
profile = "profile",
|
|
1300
|
-
book = "book"
|
|
1301
|
-
}
|
|
1302
|
-
|
|
1303
|
-
export declare enum MetaRobots {
|
|
1304
|
-
indexFollow = "index, follow",
|
|
1305
|
-
noIndexFollow = "noindex, follow",
|
|
1306
|
-
indexNoFollow = "index, nofollow",
|
|
1307
|
-
noIndexNoFollow = "noindex, nofollow",
|
|
1308
|
-
noArchive = "noarchive",
|
|
1309
|
-
noSnippet = "nosnippet",
|
|
1310
|
-
noImageIndex = "noimageindex",
|
|
1311
|
-
noTranslate = "notranslate",
|
|
1312
|
-
none = "none"
|
|
1313
|
-
}
|
|
1314
|
-
|
|
1315
|
-
/** Static SEO manager singleton. */
|
|
845
|
+
// File: classes/MetaStatic.d.ts
|
|
846
|
+
/** SEO static interface. */
|
|
1316
847
|
export declare class MetaStatic {
|
|
1317
848
|
static getItem(): Meta;
|
|
1318
849
|
static getOg(): MetaOg;
|
|
@@ -1339,18 +870,10 @@ export declare class MetaStatic {
|
|
|
1339
870
|
static html(): string;
|
|
1340
871
|
static htmlTitle(): string;
|
|
1341
872
|
}
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
keywords = "keywords",
|
|
1347
|
-
canonical = "canonical",
|
|
1348
|
-
robots = "robots",
|
|
1349
|
-
author = "author"
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
/** Twitter Card manager. */
|
|
1353
|
-
export declare class MetaTwitter {
|
|
873
|
+
// File: classes/MetaTwitter.d.ts
|
|
874
|
+
/** Twitter Card metadata manager. */
|
|
875
|
+
export declare class MetaTwitter extends MetaManager<MetaTwitterTag[]> {
|
|
876
|
+
constructor();
|
|
1354
877
|
getCard(): MetaTwitterCard;
|
|
1355
878
|
getSite(): string;
|
|
1356
879
|
getCreator(): string;
|
|
@@ -1366,56 +889,8 @@ export declare class MetaTwitter {
|
|
|
1366
889
|
setDescription(description: string): this;
|
|
1367
890
|
setImage(image: string): this;
|
|
1368
891
|
}
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
summary = "summary",
|
|
1372
|
-
summaryLargeImage = "summary_large_image",
|
|
1373
|
-
app = "app",
|
|
1374
|
-
player = "player"
|
|
1375
|
-
}
|
|
1376
|
-
|
|
1377
|
-
/** Twitter Card tags. */
|
|
1378
|
-
export declare enum MetaTwitterTag {
|
|
1379
|
-
card = "twitter:card",
|
|
1380
|
-
site = "twitter:site",
|
|
1381
|
-
creator = "twitter:creator",
|
|
1382
|
-
url = "twitter:url",
|
|
1383
|
-
title = "twitter:title",
|
|
1384
|
-
description = "twitter:description",
|
|
1385
|
-
image = "twitter:image",
|
|
1386
|
-
player = "twitter:player",
|
|
1387
|
-
playerWidth = "twitter:player:width",
|
|
1388
|
-
playerHeight = "twitter:player:height"
|
|
1389
|
-
}
|
|
1390
|
-
|
|
1391
|
-
export declare type NormalOrArray<T = NumberOrString> = T | T[];
|
|
1392
|
-
export declare type NormalOrPromise<T> = T | Promise<T>;
|
|
1393
|
-
export declare type NumberOrString = number | string;
|
|
1394
|
-
export declare type NumberOrStringOrBoolean = number | string | boolean;
|
|
1395
|
-
export declare type NumberOrStringOrDate = NumberOrString | Date;
|
|
1396
|
-
export declare type ObjectItem<T = any> = Record<string, T>;
|
|
1397
|
-
export declare type ObjectOrArray<T = any> = T[] | ObjectItem<T>;
|
|
1398
|
-
|
|
1399
|
-
/** Random integer. */
|
|
1400
|
-
export declare function random(min: number, max: number): number;
|
|
1401
|
-
|
|
1402
|
-
/** Remove prefix from string. */
|
|
1403
|
-
export declare function removeCommonPrefix(mainStr: string, prefix: string): string;
|
|
1404
|
-
|
|
1405
|
-
export declare const replaceComponentName: (text: string | undefined, name: string, componentName: string) => string | undefined;
|
|
1406
|
-
|
|
1407
|
-
/** Recursive object merge. */
|
|
1408
|
-
export declare function replaceRecursive<I>(array: ObjectItem<I>, replacement?: ObjectOrArray<I>, isMerge?: boolean): ObjectItem<I>;
|
|
1409
|
-
|
|
1410
|
-
/** Template replacement. */
|
|
1411
|
-
export declare function replaceTemplate(value: string, replaces: Record<string, string | FunctionReturn<string>>): string;
|
|
1412
|
-
|
|
1413
|
-
/** Resize image by constraints. */
|
|
1414
|
-
export declare function resizeImageByMax(image: HTMLImageElement | string, maxSize: number, type?: ResizeImageByMaxType, typeData?: string): string | undefined;
|
|
1415
|
-
|
|
1416
|
-
declare type ResizeImageByMaxType = 'auto' | 'width' | 'height';
|
|
1417
|
-
|
|
1418
|
-
/** Pausable/resumable timer. */
|
|
892
|
+
// File: classes/ResumableTimer.d.ts
|
|
893
|
+
/** Timer with pause/resume support. */
|
|
1419
894
|
export declare class ResumableTimer {
|
|
1420
895
|
constructor(callback: FunctionVoid, delay?: number, blockStart?: boolean);
|
|
1421
896
|
resume(): this;
|
|
@@ -1423,27 +898,16 @@ export declare class ResumableTimer {
|
|
|
1423
898
|
reset(): this;
|
|
1424
899
|
clear(): this;
|
|
1425
900
|
}
|
|
1426
|
-
|
|
1427
|
-
/**
|
|
901
|
+
// File: classes/ScrollbarWidth.d.ts
|
|
902
|
+
/** Utility to detect scrollbar width. */
|
|
1428
903
|
export declare class ScrollbarWidth {
|
|
1429
904
|
static is(): Promise<boolean>;
|
|
1430
905
|
static get(): Promise<number>;
|
|
1431
906
|
static getStorage(): DataStorage<number>;
|
|
1432
907
|
static getCalculate(): boolean;
|
|
1433
908
|
}
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
export declare type SearchCacheItem<T extends SearchItem> = { item: T; value: string; };
|
|
1437
|
-
export declare type SearchColumn<T extends SearchItem> = { [K in keyof T]-?: NonNullable<T[K]> extends object ? K | SearchColumnPath<K, keyof NonNullable<T[K]>> : K; }[keyof T];
|
|
1438
|
-
export declare type SearchColumnPath<K, P> = K extends string ? P extends string ? `${K}.${P}` : never : never;
|
|
1439
|
-
export declare type SearchColumns<T extends SearchItem> = (SearchColumn<T> & string)[];
|
|
1440
|
-
export declare type SearchFormatCapitalize<K extends string> = K extends `${infer First}.${infer Rest}` ? `${First}${Capitalize<SearchFormatCapitalize<Rest>>}` : K;
|
|
1441
|
-
export declare type SearchFormatItem<T extends SearchItem, KT extends string[]> = { [K in keyof T | SearchFormatKey<KT[number]>]: K extends keyof T ? T[K] : string; } & { searchActive?: boolean; };
|
|
1442
|
-
export declare type SearchFormatKey<K> = K extends string ? `${SearchFormatCapitalize<K>}Search` : never;
|
|
1443
|
-
export declare type SearchFormatList<T extends SearchItem, K extends string[]> = SearchFormatItem<T, K>[];
|
|
1444
|
-
export declare type SearchItem = Record<string, any>;
|
|
1445
|
-
|
|
1446
|
-
/** Searchable list manager. */
|
|
909
|
+
// File: classes/SearchList.d.ts
|
|
910
|
+
/** Searchable list coordinator. */
|
|
1447
911
|
export declare class SearchList<T extends SearchItem, K extends SearchColumns<T>> {
|
|
1448
912
|
constructor(list: SearchListValue<T>, columns?: K, value?: string, options?: SearchOptions);
|
|
1449
913
|
getData(): SearchListData<T, K>;
|
|
@@ -1456,10 +920,11 @@ export declare class SearchList<T extends SearchItem, K extends SearchColumns<T>
|
|
|
1456
920
|
setColumns(columns?: K): this;
|
|
1457
921
|
setValue(value?: string): this;
|
|
1458
922
|
setOptions(options: SearchOptions): this;
|
|
923
|
+
/** Process and return formatted matches. */
|
|
1459
924
|
to(): SearchFormatList<T, K>;
|
|
1460
925
|
}
|
|
1461
|
-
|
|
1462
|
-
/**
|
|
926
|
+
// File: classes/SearchListData.d.ts
|
|
927
|
+
/** Search list data and cache store. */
|
|
1463
928
|
export declare class SearchListData<T extends SearchItem, K extends SearchColumns<T>> {
|
|
1464
929
|
constructor(list: SearchListValue<T>, columns: K | undefined, item: SearchListItem, options: SearchListOptions);
|
|
1465
930
|
is(): this is this & { list: T[]; columns: string[]; };
|
|
@@ -1472,8 +937,8 @@ export declare class SearchListData<T extends SearchItem, K extends SearchColumn
|
|
|
1472
937
|
forEach(callback: (item: SearchCacheItem<T>['item'], value: SearchCacheItem<T>['value']) => SearchFormatItem<T, K> | undefined): SearchFormatList<T, K>;
|
|
1473
938
|
toFormatItem(item: T, selection: boolean): SearchFormatItem<T, K>;
|
|
1474
939
|
}
|
|
1475
|
-
|
|
1476
|
-
/** Individual search
|
|
940
|
+
// File: classes/SearchListItem.d.ts
|
|
941
|
+
/** Individual search term state. */
|
|
1477
942
|
export declare class SearchListItem {
|
|
1478
943
|
constructor(value: string | undefined, options: SearchListOptions);
|
|
1479
944
|
is(): this is this & { value: string; };
|
|
@@ -1481,8 +946,8 @@ export declare class SearchListItem {
|
|
|
1481
946
|
get(): string;
|
|
1482
947
|
set(value?: string): this;
|
|
1483
948
|
}
|
|
1484
|
-
|
|
1485
|
-
/**
|
|
949
|
+
// File: classes/SearchListMatcher.d.ts
|
|
950
|
+
/** Regex-based search matcher. */
|
|
1486
951
|
export declare class SearchListMatcher {
|
|
1487
952
|
constructor(item: SearchListItem, options: SearchListOptions);
|
|
1488
953
|
is(): boolean;
|
|
@@ -1490,8 +955,8 @@ export declare class SearchListMatcher {
|
|
|
1490
955
|
get(): RegExp | undefined;
|
|
1491
956
|
update(): void;
|
|
1492
957
|
}
|
|
1493
|
-
|
|
1494
|
-
/** Search
|
|
958
|
+
// File: classes/SearchListOptions.d.ts
|
|
959
|
+
/** Search configuration state. */
|
|
1495
960
|
export declare class SearchListOptions {
|
|
1496
961
|
constructor(options?: SearchOptions | undefined);
|
|
1497
962
|
getOptions(): SearchOptions;
|
|
@@ -1502,21 +967,10 @@ export declare class SearchListOptions {
|
|
|
1502
967
|
getClassName(): string;
|
|
1503
968
|
setOptions(options: SearchOptions): this;
|
|
1504
969
|
}
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
export declare type SearchOptions = {
|
|
1508
|
-
limit?: number;
|
|
1509
|
-
returnEverything?: boolean;
|
|
1510
|
-
delay?: number;
|
|
1511
|
-
findExactMatch?: boolean;
|
|
1512
|
-
classSearchName?: string;
|
|
1513
|
-
};
|
|
1514
|
-
|
|
1515
|
-
/** Seconds to HH:MM:SS string. */
|
|
1516
|
-
export declare function secondToTime(second: number | string | undefined, hasHour?: boolean): string;
|
|
1517
|
-
|
|
1518
|
-
/** Context-isolated server storage for SSR. */
|
|
970
|
+
// File: classes/ServerStorage.d.ts
|
|
971
|
+
/** SSR data isolation and hydration store. */
|
|
1519
972
|
export declare class ServerStorage {
|
|
973
|
+
/** Init with request context listener. */
|
|
1520
974
|
static init(listener: () => Record<string, any> | undefined): typeof ServerStorage;
|
|
1521
975
|
static reset(): void;
|
|
1522
976
|
static has(key: string): boolean;
|
|
@@ -1524,30 +978,14 @@ export declare class ServerStorage {
|
|
|
1524
978
|
static set<T = any>(key: string, value: () => T, hydration?: boolean): T;
|
|
1525
979
|
static setErrorStatus(hide: boolean): void;
|
|
1526
980
|
static remove(key: string): void;
|
|
981
|
+
/** Get hydration script string. */
|
|
1527
982
|
static toString(): string;
|
|
1528
983
|
}
|
|
1529
|
-
|
|
1530
|
-
/**
|
|
1531
|
-
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;
|
|
1532
|
-
|
|
1533
|
-
/** Dynamic value state modifier for multiple/maxlength support. */
|
|
1534
|
-
export declare function setValues<T>(selected: T | T[] | undefined, value: any, { multiple, maxlength, alwaysChange, notEmpty }: {
|
|
1535
|
-
multiple?: boolean | undefined;
|
|
1536
|
-
maxlength?: number | undefined;
|
|
1537
|
-
alwaysChange?: boolean | undefined;
|
|
1538
|
-
notEmpty?: boolean | undefined;
|
|
1539
|
-
}): T | T[] | undefined;
|
|
1540
|
-
|
|
1541
|
-
/** Delay execution. */
|
|
1542
|
-
export declare function sleep(ms: number): Promise<void>;
|
|
1543
|
-
|
|
1544
|
-
/** Copy object properties into another by start index. */
|
|
1545
|
-
export declare function splice<I>(array: ObjectItem<I>, replacement?: ObjectItem<I> | I, indexStart?: string): ObjectItem<I>;
|
|
1546
|
-
|
|
1547
|
-
/** Callback registry for storage changes. */
|
|
984
|
+
// File: classes/StorageCallback.d.ts
|
|
985
|
+
/** Callback registry for storage events. */
|
|
1548
986
|
export declare class StorageCallback<T = any, Callback = (value: T) => void | Promise<void>> {
|
|
1549
|
-
constructor(name: string, group?: string);
|
|
1550
987
|
static getInstance<T>(name: string, group?: string): StorageCallback<T, (value: T) => void | Promise<void>>;
|
|
988
|
+
constructor(name: string, group?: string);
|
|
1551
989
|
isLoading(): boolean;
|
|
1552
990
|
getName(): string;
|
|
1553
991
|
getLoading(): boolean;
|
|
@@ -1556,45 +994,8 @@ export declare class StorageCallback<T = any, Callback = (value: T) => void | Pr
|
|
|
1556
994
|
preparation(): this;
|
|
1557
995
|
run(value: T): Promise<this>;
|
|
1558
996
|
}
|
|
1559
|
-
|
|
1560
|
-
/**
|
|
1561
|
-
export declare function strFill(value: string, count: number): string;
|
|
1562
|
-
|
|
1563
|
-
/** Split string with limit (last element contains remainder). */
|
|
1564
|
-
export declare function strSplit(value: number | string, separator: string, limit?: number): string[];
|
|
1565
|
-
|
|
1566
|
-
/** Force value to array. */
|
|
1567
|
-
export declare function toArray<T>(value: T): T extends any[] ? T : [T];
|
|
1568
|
-
|
|
1569
|
-
/** String to camelCase. */
|
|
1570
|
-
export declare function toCamelCase(value: string): string;
|
|
1571
|
-
|
|
1572
|
-
/** String to CamelCase. */
|
|
1573
|
-
export declare function toCamelCaseFirst(value: string): string;
|
|
1574
|
-
|
|
1575
|
-
/** Convert to Date object. */
|
|
1576
|
-
export declare function toDate<T extends Date | number | string>(value?: T): (T & Date) | Date;
|
|
1577
|
-
|
|
1578
|
-
/** String to kebab-case. */
|
|
1579
|
-
export declare function toKebabCase(value: string): string;
|
|
1580
|
-
|
|
1581
|
-
/** Parse string/number to float. SSR safe. */
|
|
1582
|
-
export declare function toNumber(value?: NumberOrString): number;
|
|
1583
|
-
|
|
1584
|
-
/** Parse number with max constraint. */
|
|
1585
|
-
export declare function toNumberByMax(value: string | number, max?: string | number, formatting?: boolean, language?: string): string | number;
|
|
1586
|
-
|
|
1587
|
-
export declare function toPercent(maxValue: number, value: number): number;
|
|
1588
|
-
export declare function toPercentBy100(maxValue: number, value: number): number;
|
|
1589
|
-
|
|
1590
|
-
/** Value to string. */
|
|
1591
|
-
declare function toString_2<T>(value: T): string;
|
|
1592
|
-
export { toString_2 as toString }
|
|
1593
|
-
|
|
1594
|
-
/** Type transformation (detects boolean, number, null, object, function). */
|
|
1595
|
-
export declare function transformation(value: any, isFunction?: boolean): any;
|
|
1596
|
-
|
|
1597
|
-
/** Translation manager. */
|
|
997
|
+
// File: classes/Translate.d.ts
|
|
998
|
+
/** Localization interface. */
|
|
1598
999
|
export declare class Translate {
|
|
1599
1000
|
static get(name: string, replacement?: string[] | Record<string, string | number>): Promise<string>;
|
|
1600
1001
|
static getItem(): TranslateInstance;
|
|
@@ -1611,17 +1012,8 @@ export declare class Translate {
|
|
|
1611
1012
|
static setReadApi(value: boolean): void;
|
|
1612
1013
|
static setConfig(config: TranslateConfig): void;
|
|
1613
1014
|
}
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
export declare const TRANSLATE_TIME_OUT = 160;
|
|
1617
|
-
|
|
1618
|
-
export declare type TranslateCode = string | string[];
|
|
1619
|
-
export declare type TranslateConfig = { url?: string; propsName?: string; readApi?: boolean; };
|
|
1620
|
-
export declare type TranslateDataFile = Record<string, TranslateDataFileItem>;
|
|
1621
|
-
export declare type TranslateDataFileItem = () => Promise<TranslateDataFileList>;
|
|
1622
|
-
export declare type TranslateDataFileList = Record<string, string>;
|
|
1623
|
-
|
|
1624
|
-
/** Localized translation file manager. */
|
|
1015
|
+
// File: classes/TranslateFile.d.ts
|
|
1016
|
+
/** File-based translation loader. */
|
|
1625
1017
|
export declare class TranslateFile {
|
|
1626
1018
|
constructor(data?: TranslateDataFile, language?: string | (() => string), location?: string | (() => string));
|
|
1627
1019
|
isFile(): boolean;
|
|
@@ -1630,8 +1022,8 @@ export declare class TranslateFile {
|
|
|
1630
1022
|
getList(): Promise<TranslateDataFileList | undefined>;
|
|
1631
1023
|
add(data: TranslateDataFile): void;
|
|
1632
1024
|
}
|
|
1633
|
-
|
|
1634
|
-
/**
|
|
1025
|
+
// File: classes/TranslateInstance.d.ts
|
|
1026
|
+
/** Localized text resolver. */
|
|
1635
1027
|
export declare class TranslateInstance {
|
|
1636
1028
|
constructor(url?: string, propsName?: string, files?: TranslateFile);
|
|
1637
1029
|
get(name: string, replacement?: string[] | Record<string, string | number>): Promise<string>;
|
|
@@ -1647,17 +1039,729 @@ export declare class TranslateInstance {
|
|
|
1647
1039
|
setPropsName(name: string): this;
|
|
1648
1040
|
setReadApi(value: boolean): this;
|
|
1649
1041
|
}
|
|
1650
|
-
|
|
1651
|
-
export declare
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1042
|
+
// File: functions/addTagHighlightMatch.d.ts
|
|
1043
|
+
export declare function addTagHighlightMatch(value: string, search?: string | RegExp, className?: string, shouldEscape?: boolean): string;
|
|
1044
|
+
// File: functions/anyToString.d.ts
|
|
1045
|
+
export declare function anyToString<V>(value: V, isArrayString?: boolean, trim?: boolean): string;
|
|
1046
|
+
// File: functions/applyTemplate.d.ts
|
|
1047
|
+
export declare const applyTemplate: (text: string, replacement?: Record<string, string | number | boolean> | string[]) => string;
|
|
1048
|
+
// File: functions/arrFill.d.ts
|
|
1049
|
+
export declare function arrFill<T>(value: T, count: number): T[];
|
|
1050
|
+
// File: functions/blobToBase64.d.ts
|
|
1051
|
+
export declare function blobToBase64(blob: Blob, clean?: boolean): Promise<string | undefined>;
|
|
1052
|
+
// File: functions/capitalize.d.ts
|
|
1053
|
+
export declare function capitalize(value: string, isLocale?: boolean): string;
|
|
1054
|
+
// File: functions/copyObject.d.ts
|
|
1055
|
+
export declare function copyObject<T>(value: T): T;
|
|
1056
|
+
// File: functions/copyObjectLite.d.ts
|
|
1057
|
+
export declare function copyObjectLite<T, R = T>(value: T, source?: any): R;
|
|
1058
|
+
// File: functions/createElement.d.ts
|
|
1059
|
+
/** @remarks Returns undefined in SSR. Use in client-only hooks. */
|
|
1060
|
+
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;
|
|
1061
|
+
// File: functions/domQuerySelector.d.ts
|
|
1062
|
+
export declare function domQuerySelector<E extends Element = Element>(selectors: string): E | undefined;
|
|
1063
|
+
// File: functions/domQuerySelectorAll.d.ts
|
|
1064
|
+
export declare function domQuerySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E> | undefined;
|
|
1065
|
+
// File: functions/encodeAttribute.d.ts
|
|
1066
|
+
export declare function encodeAttribute(text: string): string;
|
|
1067
|
+
// File: functions/encodeLiteAttribute.d.ts
|
|
1068
|
+
export declare function encodeLiteAttribute(text: string): string;
|
|
1069
|
+
// File: functions/ensureMaxSize.d.ts
|
|
1070
|
+
export declare function ensureMaxSize(file: Uint8Array, compress?: number, type?: string): Promise<string>;
|
|
1071
|
+
// File: functions/escapeExp.d.ts
|
|
1072
|
+
export declare function escapeExp(value: string): string;
|
|
1073
|
+
// File: functions/eventStopPropagation.d.ts
|
|
1074
|
+
export declare function eventStopPropagation(event: Event): void;
|
|
1075
|
+
// File: functions/executeFunction.d.ts
|
|
1076
|
+
export declare function executeFunction<T>(callback: T | FunctionArgs<any, T>, ...args: any[]): T;
|
|
1077
|
+
// File: functions/executePromise.d.ts
|
|
1078
|
+
export declare function executePromise<T>(callback: ((...args: any[]) => Promise<T>) | ((...args: any[]) => T) | T, ...args: any[]): Promise<T>;
|
|
1079
|
+
// File: functions/forEach.d.ts
|
|
1080
|
+
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[];
|
|
1081
|
+
// File: functions/frame.d.ts
|
|
1082
|
+
export declare function frame(callback: () => void, next?: () => boolean, end?: () => void): void;
|
|
1083
|
+
// File: functions/getArrayHighlightMatch.d.ts
|
|
1084
|
+
export declare function getArrayHighlightMatch(value: string, search?: string | RegExp): HighlightMatchItem[];
|
|
1085
|
+
// File: functions/getAttributes.d.ts
|
|
1086
|
+
export declare function getAttributes<E extends ElementOrWindow>(element?: ElementOrString<E>): Record<string, string | undefined>;
|
|
1087
|
+
// File: functions/getClipboardData.d.ts
|
|
1088
|
+
export declare function getClipboardData(event?: ClipboardEvent): Promise<string>;
|
|
1089
|
+
// File: functions/getColumn.d.ts
|
|
1090
|
+
export declare function getColumn<T, K extends keyof T>(array: ObjectOrArray<T>, column: K): (T[K] | undefined)[];
|
|
1091
|
+
// File: functions/getCurrentDate.d.ts
|
|
1092
|
+
/** @remarks SSR usage can cause hydration mismatch. */
|
|
1093
|
+
export declare function getCurrentDate(format?: GeoDate): string;
|
|
1094
|
+
// File: functions/getCurrentTime.d.ts
|
|
1095
|
+
/** @remarks SSR usage can cause hydration mismatch. */
|
|
1096
|
+
export declare function getCurrentTime(): number;
|
|
1097
|
+
// File: functions/getElement.d.ts
|
|
1098
|
+
export declare function getElement<E extends ElementOrWindow, R extends Exclude<E, Window>>(element?: ElementOrString<E>): R | undefined;
|
|
1099
|
+
// File: functions/getElementId.d.ts
|
|
1100
|
+
export declare function getElementId<E extends ElementOrWindow>(element?: ElementOrString<E>, selector?: string): string;
|
|
1101
|
+
/** @note Call this to enable useId-based IDs in SSR frameworks. */
|
|
1102
|
+
export declare function initGetElementId(newListener: () => string | number): void;
|
|
1103
|
+
// File: functions/getElementImage.d.ts
|
|
1104
|
+
export declare function getElementImage(image: HTMLImageElement | string): HTMLImageElement | undefined;
|
|
1105
|
+
// File: functions/getElementItem.d.ts
|
|
1106
|
+
export declare function getElementItem<T extends ElementOrWindow, K extends keyof T, D>(element: ElementOrString<T>, index: K | string, defaultValue?: D): T[K] | D | undefined;
|
|
1107
|
+
// File: functions/getElementOrWindow.d.ts
|
|
1108
|
+
export declare function getElementOrWindow<E extends ElementOrWindow>(element?: ElementOrString<E>): E | undefined;
|
|
1109
|
+
// File: functions/getElementSafeScript.d.ts
|
|
1110
|
+
export declare function getElementSafeScript(id: string, data: any): string;
|
|
1111
|
+
// File: functions/getExactSearchExp.d.ts
|
|
1112
|
+
export declare function getExactSearchExp(search: string): RegExp;
|
|
1113
|
+
// File: functions/getExp.d.ts
|
|
1114
|
+
export declare function getExp(value: string, flags?: string, pattern?: string): RegExp;
|
|
1115
|
+
// File: functions/getHydrationData.d.ts
|
|
1116
|
+
export declare function getHydrationData<T>(id: string, defaultValue: T, remove?: boolean): T;
|
|
1117
|
+
// File: functions/getItemByPath.d.ts
|
|
1118
|
+
export declare function getItemByPath<T extends Record<string, any>, R = string>(item: T, path: string): R | undefined;
|
|
1119
|
+
// File: functions/getKey.d.ts
|
|
1120
|
+
export declare function getKey(event: KeyboardEvent): string;
|
|
1121
|
+
// File: functions/getLengthOfAllArray.d.ts
|
|
1122
|
+
export declare function getLengthOfAllArray(value: ObjectOrArray<string>): number[];
|
|
1123
|
+
// File: functions/getMaxLengthAllArray.d.ts
|
|
1124
|
+
export declare function getMaxLengthAllArray(data: ObjectOrArray<string>): number;
|
|
1125
|
+
// File: functions/getMinLengthAllArray.d.ts
|
|
1126
|
+
export declare function getMinLengthAllArray(data: ObjectOrArray<string>): number;
|
|
1127
|
+
// File: functions/getMouseClient.d.ts
|
|
1128
|
+
export declare function getMouseClient(event: MouseEvent & TouchEvent): ImageCoordinator;
|
|
1129
|
+
// File: functions/getMouseClientX.d.ts
|
|
1130
|
+
export declare function getMouseClientX(event: MouseEvent & TouchEvent): number;
|
|
1131
|
+
// File: functions/getMouseClientY.d.ts
|
|
1132
|
+
export declare function getMouseClientY(event: MouseEvent & TouchEvent): number;
|
|
1133
|
+
// File: functions/getObjectByKeys.d.ts
|
|
1134
|
+
export declare function getObjectByKeys<T extends Record<string, any>, K extends keyof T>(data: T, keys: K[]): Pick<T, K>;
|
|
1135
|
+
// File: functions/getObjectNoUndefined.d.ts
|
|
1136
|
+
export declare function getObjectNoUndefined<T extends Record<string | number, any>>(data: T, exception?: any): T;
|
|
1137
|
+
// File: functions/getObjectOrNone.d.ts
|
|
1138
|
+
export declare function getObjectOrNone<T>(value: T): T & Record<string, any>;
|
|
1139
|
+
// File: functions/getOnlyText.d.ts
|
|
1140
|
+
export declare function getOnlyText(text: any): string;
|
|
1141
|
+
// File: functions/getRandomText.d.ts
|
|
1142
|
+
export declare function getRandomText(min: number, max: number, symbol?: string, lengthMin?: number, lengthMax?: number): string;
|
|
1143
|
+
// File: functions/getRequestString.d.ts
|
|
1144
|
+
export declare function getRequestString(request: Record<string, any> | any[], sign?: string, separator?: string, subKey?: string): string;
|
|
1145
|
+
// File: functions/getSearchExp.d.ts
|
|
1146
|
+
export declare function getSearchExp(search: string, limit?: number): RegExp;
|
|
1147
|
+
// File: functions/getSeparatingSearchExp.d.ts
|
|
1148
|
+
export declare function getSeparatingSearchExp(search: string | RegExp, limit?: number): RegExp;
|
|
1149
|
+
// File: functions/getStepPercent.d.ts
|
|
1150
|
+
export declare function getStepPercent(min: number | undefined, max: number): number;
|
|
1151
|
+
// File: functions/getStepValue.d.ts
|
|
1152
|
+
export declare function getStepValue(min: number | undefined, max: number): number;
|
|
1153
|
+
// File: functions/goScroll.d.ts
|
|
1154
|
+
export declare function goScroll(selector: string, elementTo: HTMLElement | undefined, elementCenter?: HTMLElement): void;
|
|
1155
|
+
// File: functions/goScrollSmooth.d.ts
|
|
1156
|
+
export declare function goScrollSmooth<E extends HTMLElement>(element: E, options?: ScrollIntoViewOptions, shift?: number): void;
|
|
1157
|
+
// File: functions/goScrollTo.d.ts
|
|
1158
|
+
export declare function goScrollTo(element?: HTMLElement, elementTo?: HTMLElement, behavior?: ScrollBehavior): void;
|
|
1159
|
+
// File: functions/handleShare.d.ts
|
|
1160
|
+
export declare function handleShare(data: ShareData): Promise<boolean>;
|
|
1161
|
+
// File: functions/inArray.d.ts
|
|
1162
|
+
export declare function inArray<T>(array: T[], value: T): boolean;
|
|
1163
|
+
// File: functions/initScrollbarOffset.d.ts
|
|
1164
|
+
export declare function initScrollbarOffset(): Promise<void>;
|
|
1165
|
+
// File: functions/intersectKey.d.ts
|
|
1166
|
+
export declare function intersectKey<T, KT extends keyof T, C, KC extends keyof C>(data?: T, comparison?: C): Record<KT & KC, T[KT]>;
|
|
1167
|
+
// File: functions/isApiSuccess.d.ts
|
|
1168
|
+
export declare const isApiSuccess: <T>(data: ApiData<T>) => boolean;
|
|
1169
|
+
// File: functions/isArray.d.ts
|
|
1170
|
+
export declare function isArray<T, R>(value: T): value is Extract<T, R[]>;
|
|
1171
|
+
// File: functions/isDifferent.d.ts
|
|
1172
|
+
export declare function isDifferent<T>(value: ObjectItem<T>, old: ObjectItem<T>): boolean;
|
|
1173
|
+
// File: functions/isDomData.d.ts
|
|
1174
|
+
export declare function isDomData(): boolean;
|
|
1175
|
+
// File: functions/isDomRuntime.d.ts
|
|
1176
|
+
export declare function isDomRuntime(): boolean;
|
|
1177
|
+
// File: functions/isElementVisible.d.ts
|
|
1178
|
+
export declare function isElementVisible<E extends ElementOrWindow>(elementSelectors?: ElementOrString<E>): boolean;
|
|
1179
|
+
// File: functions/isEnter.d.ts
|
|
1180
|
+
export declare const isEnter: (event: KeyboardEvent, isInputElement?: boolean) => boolean;
|
|
1181
|
+
// File: functions/isFilled.d.ts
|
|
1182
|
+
export declare function isFilled<T>(value: T, zeroTrue?: boolean): value is Exclude<T, EmptyValue>;
|
|
1183
|
+
// File: functions/isFloat.d.ts
|
|
1184
|
+
export declare function isFloat(value: any): boolean;
|
|
1185
|
+
// File: functions/isFunction.d.ts
|
|
1186
|
+
export declare function isFunction<T>(callback: T): callback is Extract<T, FunctionArgs<any, any>>;
|
|
1187
|
+
// File: functions/isInDom.d.ts
|
|
1188
|
+
export declare function isInDom<E extends ElementOrWindow>(element?: ElementOrString<E>): boolean;
|
|
1189
|
+
// File: functions/isInput.d.ts
|
|
1190
|
+
export declare const isInput: (element: HTMLElement | EventTarget | null) => boolean;
|
|
1191
|
+
// File: functions/isIntegerBetween.d.ts
|
|
1192
|
+
export declare function isIntegerBetween(value: number, between: number): boolean;
|
|
1193
|
+
// File: functions/isNull.d.ts
|
|
1194
|
+
export declare function isNull<T>(value: T): value is Extract<T, Undefined>;
|
|
1195
|
+
// File: functions/isNumber.d.ts
|
|
1196
|
+
export declare function isNumber(value: any): boolean;
|
|
1197
|
+
// File: functions/isObject.d.ts
|
|
1198
|
+
export declare function isObject<T>(value: T): value is Extract<T, Record<any, any>>;
|
|
1199
|
+
// File: functions/isObjectNotArray.d.ts
|
|
1200
|
+
export declare function isObjectNotArray<T>(value: T): value is Exclude<Extract<T, Record<any, any>>, any[] | undefined | null>;
|
|
1201
|
+
// File: functions/isOnLine.d.ts
|
|
1202
|
+
export declare function isOnLine(): boolean;
|
|
1203
|
+
// File: functions/isSelected.d.ts
|
|
1204
|
+
export declare function isSelected<T, S>(value: T, selected: T | T[] | S): boolean;
|
|
1205
|
+
// File: functions/isSelectedByList.d.ts
|
|
1206
|
+
export declare function isSelectedByList<T>(values: T | T[], selected: T | T[]): boolean;
|
|
1207
|
+
// File: functions/isShare.d.ts
|
|
1208
|
+
export declare function isShare(): boolean;
|
|
1209
|
+
// File: functions/isString.d.ts
|
|
1210
|
+
export declare function isString<T>(value: T): value is Extract<T, string>;
|
|
1211
|
+
// File: functions/isWindow.d.ts
|
|
1212
|
+
export declare function isWindow<E>(element: E): element is Extract<E, Window>;
|
|
1213
|
+
// File: functions/random.d.ts
|
|
1214
|
+
export declare function random(min: number, max: number): number;
|
|
1215
|
+
// File: functions/removeCommonPrefix.d.ts
|
|
1216
|
+
export declare function removeCommonPrefix(mainStr: string, prefix: string): string;
|
|
1217
|
+
// File: functions/replaceComponentName.d.ts
|
|
1218
|
+
export declare const replaceComponentName: (text: string | undefined, name: string, componentName: string) => string | undefined;
|
|
1219
|
+
// File: functions/replaceRecursive.d.ts
|
|
1220
|
+
export declare function replaceRecursive<I>(array: ObjectItem<I>, replacement?: ObjectOrArray<I>, isMerge?: boolean): ObjectItem<I>;
|
|
1221
|
+
// File: functions/replaceTemplate.d.ts
|
|
1222
|
+
export declare function replaceTemplate(value: string, replaces: Record<string, string | FunctionReturn<string>>): string;
|
|
1223
|
+
// File: functions/resizeImageByMax.d.ts
|
|
1224
|
+
export declare function resizeImageByMax(image: HTMLImageElement | string, maxSize: number, type?: 'auto' | 'width' | 'height', typeData?: string): string | undefined;
|
|
1225
|
+
// File: functions/secondToTime.d.ts
|
|
1226
|
+
export declare function secondToTime(second: number | string | undefined, hasHour?: boolean): string;
|
|
1227
|
+
// File: functions/setElementItem.d.ts
|
|
1228
|
+
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;
|
|
1229
|
+
// File: functions/setValues.d.ts
|
|
1230
|
+
export declare function setValues<T>(selected: T | T[] | undefined, value: any, { multiple, maxlength, alwaysChange, notEmpty }: {
|
|
1231
|
+
multiple?: boolean | undefined;
|
|
1232
|
+
maxlength?: number | undefined;
|
|
1233
|
+
alwaysChange?: boolean | undefined;
|
|
1234
|
+
notEmpty?: boolean | undefined;
|
|
1235
|
+
}): T | T[] | undefined;
|
|
1236
|
+
// File: functions/sleep.d.ts
|
|
1237
|
+
export declare function sleep(ms: number): Promise<void>;
|
|
1238
|
+
// File: functions/splice.d.ts
|
|
1239
|
+
export declare function splice<I>(array: ObjectItem<I>, replacement?: ObjectItem<I> | I, indexStart?: string): ObjectItem<I>;
|
|
1240
|
+
// File: functions/strFill.d.ts
|
|
1241
|
+
export declare function strFill(value: string, count: number): string;
|
|
1242
|
+
// File: functions/strSplit.d.ts
|
|
1243
|
+
export declare function strSplit(value: number | string, separator: string, limit?: number): string[];
|
|
1244
|
+
// File: functions/toArray.d.ts
|
|
1245
|
+
export declare function toArray<T>(value: T): T extends any[] ? T : [T];
|
|
1246
|
+
// File: functions/toCamelCase.d.ts
|
|
1247
|
+
export declare function toCamelCase(value: string): string;
|
|
1248
|
+
// File: functions/toCamelCaseFirst.d.ts
|
|
1249
|
+
export declare function toCamelCaseFirst(value: string): string;
|
|
1250
|
+
// File: functions/toDate.d.ts
|
|
1251
|
+
export declare function toDate<T extends Date | number | string>(value?: T): (T & Date) | Date;
|
|
1252
|
+
// File: functions/toKebabCase.d.ts
|
|
1253
|
+
export declare function toKebabCase(value: string): string;
|
|
1254
|
+
// File: functions/toNumber.d.ts
|
|
1255
|
+
/** @remarks Parses strings with various separators to float. Safe for SSR. */
|
|
1256
|
+
export declare function toNumber(value?: NumberOrString): number;
|
|
1257
|
+
// File: functions/toNumberByMax.d.ts
|
|
1258
|
+
export declare function toNumberByMax(value: string | number, max?: string | number, formatting?: boolean, language?: string): string | number;
|
|
1259
|
+
// File: functions/toPercent.d.ts
|
|
1260
|
+
export declare function toPercent(maxValue: number, value: number): number;
|
|
1261
|
+
// File: functions/toPercentBy100.d.ts
|
|
1262
|
+
export declare function toPercentBy100(maxValue: number, value: number): number;
|
|
1263
|
+
// File: functions/toString.d.ts
|
|
1264
|
+
export declare function toString<T>(value: T): string;
|
|
1265
|
+
// File: functions/transformation.d.ts
|
|
1266
|
+
export declare function transformation(value: any, isFunction?: boolean): any;
|
|
1267
|
+
// File: functions/uint8ArrayToBase64.d.ts
|
|
1655
1268
|
export declare function uint8ArrayToBase64(bytes: Uint8Array): string;
|
|
1656
|
-
|
|
1657
|
-
export declare type Undefined = undefined | null;
|
|
1658
|
-
|
|
1659
|
-
/** Remove array duplicates. */
|
|
1269
|
+
// File: functions/uniqueArray.d.ts
|
|
1660
1270
|
export declare function uniqueArray<T>(value: T[]): T[];
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1271
|
+
// File: functions/writeClipboardData.d.ts
|
|
1272
|
+
export declare function writeClipboardData(text: string): Promise<void>;
|
|
1273
|
+
// File: types/apiTypes.d.ts
|
|
1274
|
+
export declare enum ApiMethodItem {
|
|
1275
|
+
delete = "DELETE",
|
|
1276
|
+
get = "GET",
|
|
1277
|
+
post = "POST",
|
|
1278
|
+
put = "PUT",
|
|
1279
|
+
patch = "PATCH"
|
|
1280
|
+
}
|
|
1281
|
+
export type ApiCacheItem<T = any> = {
|
|
1282
|
+
value: T;
|
|
1283
|
+
age?: number;
|
|
1284
|
+
cacheAge: number;
|
|
1285
|
+
};
|
|
1286
|
+
export type ApiCacheList = Record<string, ApiCacheItem>;
|
|
1287
|
+
export type ApiConfig = {
|
|
1288
|
+
urlRoot?: string;
|
|
1289
|
+
origin?: string;
|
|
1290
|
+
headers?: Record<string, string>;
|
|
1291
|
+
requestDefault?: Record<string, any>;
|
|
1292
|
+
preparation?: (apiFetch: ApiFetch) => Promise<void>;
|
|
1293
|
+
end?: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>;
|
|
1294
|
+
timeout?: number;
|
|
1295
|
+
};
|
|
1296
|
+
export type ApiData<T = any> = T extends any[] ? T : ApiDataItem<T>;
|
|
1297
|
+
export type ApiDataValidation = {
|
|
1298
|
+
status?: ApiStatusType;
|
|
1299
|
+
code?: string | number;
|
|
1300
|
+
message?: string;
|
|
1301
|
+
};
|
|
1302
|
+
export type ApiDataItem<T = any> = T & ApiDataValidation & {
|
|
1303
|
+
data?: T;
|
|
1304
|
+
success?: boolean;
|
|
1305
|
+
statusObject?: ApiStatusItem;
|
|
1306
|
+
};
|
|
1307
|
+
export type ApiDefaultValue = Record<string, any>;
|
|
1308
|
+
export type ApiFetch = {
|
|
1309
|
+
api?: boolean;
|
|
1310
|
+
path?: string;
|
|
1311
|
+
pathFull?: string;
|
|
1312
|
+
method?: ApiMethod;
|
|
1313
|
+
request?: FormData | Record<string, any> | string;
|
|
1314
|
+
auth?: boolean;
|
|
1315
|
+
headers?: Record<string, string> | null;
|
|
1316
|
+
type?: string;
|
|
1317
|
+
toData?: boolean;
|
|
1318
|
+
global?: boolean;
|
|
1319
|
+
devMode?: boolean;
|
|
1320
|
+
hideError?: boolean;
|
|
1321
|
+
hideLoading?: boolean;
|
|
1322
|
+
retry?: number;
|
|
1323
|
+
retryDelay?: number;
|
|
1324
|
+
queryReturn?: (query: Response) => Promise<any | ApiDataValidation>;
|
|
1325
|
+
globalPreparation?: boolean;
|
|
1326
|
+
globalEnd?: boolean;
|
|
1327
|
+
init?: RequestInit;
|
|
1328
|
+
timeout?: number;
|
|
1329
|
+
controller?: AbortController;
|
|
1330
|
+
cache?: number;
|
|
1331
|
+
enableClientCache?: boolean;
|
|
1332
|
+
cacheId?: number | string;
|
|
1333
|
+
endResetLimit?: number;
|
|
1334
|
+
};
|
|
1335
|
+
export type ApiHydrationItem = {
|
|
1336
|
+
path: string;
|
|
1337
|
+
method: ApiMethod;
|
|
1338
|
+
request?: ApiFetch['request'];
|
|
1339
|
+
response: any;
|
|
1340
|
+
};
|
|
1341
|
+
export type ApiHydrationList = ApiHydrationItem[];
|
|
1342
|
+
export type ApiMethod = string | ApiMethodItem;
|
|
1343
|
+
export type ApiPreparationEnd = {
|
|
1344
|
+
reset?: boolean;
|
|
1345
|
+
data?: any;
|
|
1346
|
+
};
|
|
1347
|
+
export type ApiResponseItem = {
|
|
1348
|
+
path: string | RegExp;
|
|
1349
|
+
method: ApiMethod;
|
|
1350
|
+
request?: ApiFetch['request'] | '*any';
|
|
1351
|
+
response: any | ((request?: ApiFetch['request']) => any);
|
|
1352
|
+
disable?: any;
|
|
1353
|
+
isForGlobal?: boolean;
|
|
1354
|
+
lag?: any;
|
|
1355
|
+
};
|
|
1356
|
+
export type ApiStatusItem = {
|
|
1357
|
+
status?: number;
|
|
1358
|
+
statusText?: string;
|
|
1359
|
+
error?: string;
|
|
1360
|
+
lastResponse?: any;
|
|
1361
|
+
lastStatus?: ApiStatusType;
|
|
1362
|
+
lastCode?: string;
|
|
1363
|
+
lastMessage?: string;
|
|
1364
|
+
};
|
|
1365
|
+
export type ApiStatusType = 'success' | 'error' | 'warning' | 'info';
|
|
1366
|
+
// File: types/basicTypes.d.ts
|
|
1367
|
+
export type Undefined = undefined | null;
|
|
1368
|
+
export type EmptyValue = Undefined | 0 | false | '' | 'undefined' | 'null' | '0' | 'false' | '[]';
|
|
1369
|
+
export type NumberOrString = number | string;
|
|
1370
|
+
export type NumberOrStringOrBoolean = number | string | boolean;
|
|
1371
|
+
export type NumberOrStringOrDate = NumberOrString | Date;
|
|
1372
|
+
export type NormalOrArray<T = NumberOrString> = T | T[];
|
|
1373
|
+
export type NormalOrPromise<T> = T | Promise<T>;
|
|
1374
|
+
export type ObjectItem<T = any> = Record<string, T>;
|
|
1375
|
+
export type ObjectOrArray<T = any> = T[] | ObjectItem<T>;
|
|
1376
|
+
export type ArrayToItem<T> = T extends any[] ? T[number] : T;
|
|
1377
|
+
export type FunctionReturn<R = any> = () => R;
|
|
1378
|
+
export type FunctionVoid = () => void;
|
|
1379
|
+
export type FunctionArgs<T, R> = (...args: T[]) => R;
|
|
1380
|
+
export type FunctionAnyType<T = any, R = any> = (...args: T[]) => R;
|
|
1381
|
+
export type ItemList<T = any> = Record<string, T>;
|
|
1382
|
+
export type Item<V> = {
|
|
1383
|
+
index: string;
|
|
1384
|
+
value: V;
|
|
1385
|
+
};
|
|
1386
|
+
export type ItemValue<V> = {
|
|
1387
|
+
label: string;
|
|
1388
|
+
value: V;
|
|
1389
|
+
};
|
|
1390
|
+
export type ItemName<V> = {
|
|
1391
|
+
name: string | number;
|
|
1392
|
+
value: V;
|
|
1393
|
+
};
|
|
1394
|
+
export type ElementOrWindow = HTMLElement | Window;
|
|
1395
|
+
export type ElementOrString<E extends ElementOrWindow> = E | string;
|
|
1396
|
+
export type EventOptions = AddEventListenerOptions | boolean | undefined;
|
|
1397
|
+
export type EventListenerDetail<O extends Event, D extends Record<string, any>> = (event: O, detail?: D) => void;
|
|
1398
|
+
export type EventActivityItem<E extends ElementOrWindow> = {
|
|
1399
|
+
element: E | undefined;
|
|
1400
|
+
type: string;
|
|
1401
|
+
listener?: (event: any | Event) => void;
|
|
1402
|
+
observer?: ResizeObserver;
|
|
1403
|
+
};
|
|
1404
|
+
export type ImageCoordinator = {
|
|
1405
|
+
x: number;
|
|
1406
|
+
y: number;
|
|
1407
|
+
};
|
|
1408
|
+
// File: types/errorCenter.d.ts
|
|
1409
|
+
export type ErrorCenterGroup = string | undefined;
|
|
1410
|
+
export type ErrorCenterCauseItem = {
|
|
1411
|
+
group?: ErrorCenterGroup;
|
|
1412
|
+
code: string;
|
|
1413
|
+
priority?: number;
|
|
1414
|
+
label?: string;
|
|
1415
|
+
message?: string;
|
|
1416
|
+
details?: any;
|
|
1417
|
+
};
|
|
1418
|
+
export type ErrorCenterCauseList = ErrorCenterCauseItem[];
|
|
1419
|
+
export type ErrorCenterHandlerCallback = (cause: ErrorCenterCauseItem) => void;
|
|
1420
|
+
export type ErrorCenterHandlerItem = {
|
|
1421
|
+
group?: ErrorCenterGroup;
|
|
1422
|
+
handlers: ErrorCenterHandlerCallback[];
|
|
1423
|
+
};
|
|
1424
|
+
export type ErrorCenterHandlerList = ErrorCenterHandlerItem[];
|
|
1425
|
+
// File: types/formattersTypes.d.ts
|
|
1426
|
+
export declare enum FormattersType {
|
|
1427
|
+
currency = "currency",
|
|
1428
|
+
date = "date",
|
|
1429
|
+
name = "name",
|
|
1430
|
+
number = "number",
|
|
1431
|
+
plural = "plural",
|
|
1432
|
+
unit = "unit"
|
|
1433
|
+
}
|
|
1434
|
+
export type FormattersOptionsCurrency = {
|
|
1435
|
+
currencyPropName?: string;
|
|
1436
|
+
options?: string | Intl.NumberFormatOptions;
|
|
1437
|
+
numberOnly?: boolean;
|
|
1438
|
+
};
|
|
1439
|
+
export type FormattersOptionsDate = {
|
|
1440
|
+
type?: GeoDate;
|
|
1441
|
+
options?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions;
|
|
1442
|
+
hour24?: boolean;
|
|
1443
|
+
};
|
|
1444
|
+
export type FormattersOptionsName = {
|
|
1445
|
+
lastPropName?: string;
|
|
1446
|
+
firstPropName?: string;
|
|
1447
|
+
surname?: string;
|
|
1448
|
+
short?: boolean;
|
|
1449
|
+
};
|
|
1450
|
+
export type FormattersOptionsNumber = {
|
|
1451
|
+
options?: Intl.NumberFormatOptions;
|
|
1452
|
+
};
|
|
1453
|
+
export type FormattersOptionsPlural = {
|
|
1454
|
+
words: string;
|
|
1455
|
+
options?: Intl.PluralRulesOptions;
|
|
1456
|
+
optionsNumber?: Intl.NumberFormatOptions;
|
|
1457
|
+
};
|
|
1458
|
+
export type FormattersOptionsUnit = {
|
|
1459
|
+
unit: string | Intl.NumberFormatOptions;
|
|
1460
|
+
};
|
|
1461
|
+
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>;
|
|
1462
|
+
export type FormattersOptionsItem<Type extends FormattersType = FormattersType, R = string> = {
|
|
1463
|
+
type?: Type;
|
|
1464
|
+
transformation?: (valueOriginal: any, item: any, options?: FormattersOptionsInformation<Type>) => R;
|
|
1465
|
+
options?: FormattersOptionsInformation<Type>;
|
|
1466
|
+
};
|
|
1467
|
+
export type FormattersOptionsList = Record<string, FormattersOptionsItem>;
|
|
1468
|
+
export type FormattersListItem = Record<string, any>;
|
|
1469
|
+
export type FormattersList<Item extends FormattersListItem> = Item[];
|
|
1470
|
+
export type FormattersCapitalize<K extends string> = K extends `${infer First}.${infer Rest}` ? `${First}${Capitalize<FormattersCapitalize<Rest>>}` : K;
|
|
1471
|
+
export type FormattersColumns<T extends FormattersOptionsList> = (keyof T & string)[];
|
|
1472
|
+
export type FormattersKey<K, A extends string = 'Format'> = K extends string ? `${FormattersCapitalize<K>}${A}` : never;
|
|
1473
|
+
export type FormattersDataItem<T extends FormattersListItem, KT extends string[]> = {
|
|
1474
|
+
[K in keyof T | FormattersKey<KT[number]>]: K extends keyof T ? T[K] : string;
|
|
1475
|
+
};
|
|
1476
|
+
export type FormattersListFormat<T extends FormattersListItem, K extends string[]> = FormattersDataItem<T, K>[];
|
|
1477
|
+
export type FormattersListColumnItem<T extends FormattersListItem, O extends FormattersOptionsList> = FormattersDataItem<T, FormattersColumns<O>>;
|
|
1478
|
+
export type FormattersListColumns<T extends FormattersListItem, O extends FormattersOptionsList> = FormattersListFormat<T, FormattersColumns<O>>;
|
|
1479
|
+
export type FormattersListProp = FormattersList<FormattersListItem> | FormattersListItem;
|
|
1480
|
+
export type FormattersItemProp<List extends FormattersListProp> = ArrayToItem<List>;
|
|
1481
|
+
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);
|
|
1482
|
+
// File: types/geoTypes.d.ts
|
|
1483
|
+
export type GeoDate = 'full' | 'datetime' | 'date' | 'year-month' | 'year' | 'month' | 'day' | 'day-month' | 'time' | 'hour-minute' | 'hour' | 'minute' | 'second';
|
|
1484
|
+
export type GeoFirstDay = 1 | 6 | 0;
|
|
1485
|
+
export type GeoHours = '12' | '24';
|
|
1486
|
+
export type GeoTimeZoneStyle = 'minute' | 'hour' | 'ISO8601' | 'RFC';
|
|
1487
|
+
export interface GeoItem {
|
|
1488
|
+
country: string;
|
|
1489
|
+
countryAlternative?: string[];
|
|
1490
|
+
language: string;
|
|
1491
|
+
languageAlternative?: string[];
|
|
1492
|
+
firstDay?: string | null;
|
|
1493
|
+
zone?: string | null;
|
|
1494
|
+
phoneCode?: string;
|
|
1495
|
+
phoneWithin?: string;
|
|
1496
|
+
phoneMask?: string | string[];
|
|
1497
|
+
nameFormat?: 'fl' | 'fsl' | 'lf' | 'lsf' | string;
|
|
1498
|
+
}
|
|
1499
|
+
export interface GeoItemFull extends Omit<GeoItem, 'firstDay'> {
|
|
1500
|
+
standard: string;
|
|
1501
|
+
firstDay: string;
|
|
1502
|
+
}
|
|
1503
|
+
export interface GeoFlagItem {
|
|
1504
|
+
language: string;
|
|
1505
|
+
country: string;
|
|
1506
|
+
standard: string;
|
|
1507
|
+
icon?: string;
|
|
1508
|
+
label: string;
|
|
1509
|
+
value: string;
|
|
1510
|
+
}
|
|
1511
|
+
export interface GeoFlagNational extends GeoFlagItem {
|
|
1512
|
+
description: string;
|
|
1513
|
+
nationalLanguage: string;
|
|
1514
|
+
nationalCountry: string;
|
|
1515
|
+
}
|
|
1516
|
+
export interface GeoPhoneValue {
|
|
1517
|
+
phone: number;
|
|
1518
|
+
within: number;
|
|
1519
|
+
mask: string[];
|
|
1520
|
+
value: string;
|
|
1521
|
+
}
|
|
1522
|
+
export interface GeoPhoneMap {
|
|
1523
|
+
items: GeoPhoneValue[];
|
|
1524
|
+
info: GeoPhoneValue | undefined;
|
|
1525
|
+
value: string | undefined;
|
|
1526
|
+
mask: string[];
|
|
1527
|
+
maskFull: string[];
|
|
1528
|
+
next: Record<string, GeoPhoneMap>;
|
|
1529
|
+
}
|
|
1530
|
+
export interface GeoPhoneMapInfo {
|
|
1531
|
+
item?: GeoPhoneMap;
|
|
1532
|
+
phone?: string;
|
|
1533
|
+
}
|
|
1534
|
+
// File: types/metaTypes.d.ts
|
|
1535
|
+
export declare enum MetaTag {
|
|
1536
|
+
title = "title",
|
|
1537
|
+
description = "description",
|
|
1538
|
+
keywords = "keywords",
|
|
1539
|
+
canonical = "canonical",
|
|
1540
|
+
robots = "robots",
|
|
1541
|
+
author = "author"
|
|
1542
|
+
}
|
|
1543
|
+
export declare enum MetaRobots {
|
|
1544
|
+
indexFollow = "index, follow",
|
|
1545
|
+
noIndexFollow = "noindex, follow",
|
|
1546
|
+
indexNoFollow = "index, nofollow",
|
|
1547
|
+
noIndexNoFollow = "noindex, nofollow",
|
|
1548
|
+
noArchive = "noarchive",
|
|
1549
|
+
noSnippet = "nosnippet",
|
|
1550
|
+
noImageIndex = "noimageindex",
|
|
1551
|
+
images = "images",
|
|
1552
|
+
noTranslate = "notranslate",
|
|
1553
|
+
noPreview = "nopreview",
|
|
1554
|
+
textOnly = "textonly",
|
|
1555
|
+
noIndexSubpages = "noindex, noarchive",
|
|
1556
|
+
none = "none"
|
|
1557
|
+
}
|
|
1558
|
+
export declare enum MetaOpenGraphTag {
|
|
1559
|
+
title = "og:title",
|
|
1560
|
+
type = "og:type",
|
|
1561
|
+
url = "og:url",
|
|
1562
|
+
image = "og:image",
|
|
1563
|
+
description = "og:description",
|
|
1564
|
+
locale = "og:locale",
|
|
1565
|
+
siteName = "og:site_name",
|
|
1566
|
+
localeAlternate = "og:locale:alternate",
|
|
1567
|
+
imageUrl = "og:image:url",
|
|
1568
|
+
imageSecureUrl = "og:image:secure_url",
|
|
1569
|
+
imageType = "og:image:type",
|
|
1570
|
+
imageWidth = "og:image:width",
|
|
1571
|
+
imageHeight = "og:image:height",
|
|
1572
|
+
imageAlt = "og:image:alt",
|
|
1573
|
+
video = "og:video",
|
|
1574
|
+
videoUrl = "og:video:url",
|
|
1575
|
+
videoSecureUrl = "og:video:secure_url",
|
|
1576
|
+
videoType = "og:video:type",
|
|
1577
|
+
videoWidth = "og:video:width",
|
|
1578
|
+
videoHeight = "og:video:height",
|
|
1579
|
+
audio = "og:audio",
|
|
1580
|
+
audioSecureUrl = "og:audio:secure_url",
|
|
1581
|
+
audioType = "og:audio:type",
|
|
1582
|
+
articlePublishedTime = "article:published_time",
|
|
1583
|
+
articleModifiedTime = "article:modified_time",
|
|
1584
|
+
articleExpirationTime = "article:expiration_time",
|
|
1585
|
+
articleAuthor = "article:author",
|
|
1586
|
+
articleSection = "article:section",
|
|
1587
|
+
articleTag = "article:tag",
|
|
1588
|
+
bookAuthor = "book:author",
|
|
1589
|
+
bookIsbn = "book:isbn",
|
|
1590
|
+
bookReleaseDate = "book:release_date",
|
|
1591
|
+
bookTag = "book:tag",
|
|
1592
|
+
musicDuration = "music:duration",
|
|
1593
|
+
musicAlbum = "music:album",
|
|
1594
|
+
musicAlbumDisc = "music:album:disc",
|
|
1595
|
+
musicAlbumTrack = "music:album:track",
|
|
1596
|
+
musicMusician = "music:musician",
|
|
1597
|
+
musicSong = "music.song",
|
|
1598
|
+
musicSongDisc = "music:song:disc",
|
|
1599
|
+
musicSongTrack = "music:song:track",
|
|
1600
|
+
musicReleaseDate = "music:release_date",
|
|
1601
|
+
musicCreator = "music:creator",
|
|
1602
|
+
videoActor = "video:actor",
|
|
1603
|
+
videoActorRole = "video:actor:role",
|
|
1604
|
+
videoDirector = "video:director",
|
|
1605
|
+
videoWriter = "video:writer",
|
|
1606
|
+
videoDuration = "video:duration",
|
|
1607
|
+
videoReleaseDate = "video:release_date",
|
|
1608
|
+
videoTag = "video:tag",
|
|
1609
|
+
videoSeries = "video:series",
|
|
1610
|
+
profileFirstName = "profile:first_name",
|
|
1611
|
+
profileLastName = "profile:last_name",
|
|
1612
|
+
profileUsername = "profile:username",
|
|
1613
|
+
profileGender = "profile:gender",
|
|
1614
|
+
productBrand = "product:brand",
|
|
1615
|
+
productAvailability = "product:availability",
|
|
1616
|
+
productCondition = "product:condition",
|
|
1617
|
+
productPriceAmount = "product:price:amount",
|
|
1618
|
+
productPriceCurrency = "product:price:currency",
|
|
1619
|
+
productRetailerItemId = "product:retailer_item_id",
|
|
1620
|
+
productCategory = "product:category",
|
|
1621
|
+
productEan = "product:ean",
|
|
1622
|
+
productIsbn = "product:isbn",
|
|
1623
|
+
productMfrPartNo = "product:mfr_part_no",
|
|
1624
|
+
productUpc = "product:upc",
|
|
1625
|
+
productWeightValue = "product:weight:value",
|
|
1626
|
+
productWeightUnits = "product:weight:units",
|
|
1627
|
+
productColor = "product:color",
|
|
1628
|
+
productMaterial = "product:material",
|
|
1629
|
+
productPattern = "product:pattern",
|
|
1630
|
+
productAgeGroup = "product:age_group",
|
|
1631
|
+
productGender = "product:gender"
|
|
1632
|
+
}
|
|
1633
|
+
export declare enum MetaOpenGraphType {
|
|
1634
|
+
website = "website",
|
|
1635
|
+
article = "article",
|
|
1636
|
+
video = "video.other",
|
|
1637
|
+
videoTvShow = "video.tv_show",
|
|
1638
|
+
videoEpisode = "video.episode",
|
|
1639
|
+
videoMovie = "video.movie",
|
|
1640
|
+
musicAlbum = "music.album",
|
|
1641
|
+
musicPlaylist = "music.playlist",
|
|
1642
|
+
musicSong = "music.song",
|
|
1643
|
+
musicRadioStation = "music.radio_station",
|
|
1644
|
+
app = "app",
|
|
1645
|
+
product = "product",
|
|
1646
|
+
business = "business.business",
|
|
1647
|
+
place = "place",
|
|
1648
|
+
event = "event",
|
|
1649
|
+
profile = "profile",
|
|
1650
|
+
book = "book"
|
|
1651
|
+
}
|
|
1652
|
+
export declare enum MetaOpenGraphAvailability {
|
|
1653
|
+
inStock = "in stock",
|
|
1654
|
+
outOfStock = "out of stock",
|
|
1655
|
+
preorder = "preorder",
|
|
1656
|
+
backorder = "backorder",
|
|
1657
|
+
discontinued = "discontinued",
|
|
1658
|
+
pending = "pending"
|
|
1659
|
+
}
|
|
1660
|
+
export declare enum MetaOpenGraphCondition {
|
|
1661
|
+
new = "new",
|
|
1662
|
+
used = "used",
|
|
1663
|
+
refurbished = "refurbished"
|
|
1664
|
+
}
|
|
1665
|
+
export declare enum MetaOpenGraphAge {
|
|
1666
|
+
newborn = "newborn",
|
|
1667
|
+
infant = "infant",
|
|
1668
|
+
toddler = "toddler",
|
|
1669
|
+
kids = "kids",
|
|
1670
|
+
adult = "adult"
|
|
1671
|
+
}
|
|
1672
|
+
export declare enum MetaOpenGraphGender {
|
|
1673
|
+
female = "female",
|
|
1674
|
+
male = "male",
|
|
1675
|
+
unisex = "unisex"
|
|
1676
|
+
}
|
|
1677
|
+
export declare enum MetaTwitterTag {
|
|
1678
|
+
card = "twitter:card",
|
|
1679
|
+
site = "twitter:site",
|
|
1680
|
+
creator = "twitter:creator",
|
|
1681
|
+
url = "twitter:url",
|
|
1682
|
+
title = "twitter:title",
|
|
1683
|
+
description = "twitter:description",
|
|
1684
|
+
image = "twitter:image",
|
|
1685
|
+
imageAlt = "twitter:image:alt",
|
|
1686
|
+
imageSrc = "twitter:image:src",
|
|
1687
|
+
imageWidth = "twitter:image:width",
|
|
1688
|
+
imageHeight = "twitter:image:height",
|
|
1689
|
+
label1 = "twitter:label1",
|
|
1690
|
+
data1 = "twitter:data1",
|
|
1691
|
+
label2 = "twitter:label2",
|
|
1692
|
+
data2 = "twitter:data2",
|
|
1693
|
+
appNameIphone = "twitter:app:name:iphone",
|
|
1694
|
+
appIdIphone = "twitter:app:id:iphone",
|
|
1695
|
+
appUrlIphone = "twitter:app:url:iphone",
|
|
1696
|
+
appNameIpad = "twitter:app:name:ipad",
|
|
1697
|
+
appIdIpad = "twitter:app:id:ipad",
|
|
1698
|
+
appUrlIpad = "twitter:app:url:ipad",
|
|
1699
|
+
appNameGooglePlay = "twitter:app:name:googleplay",
|
|
1700
|
+
appIdGooglePlay = "twitter:app:id:googleplay",
|
|
1701
|
+
appUrlGooglePlay = "twitter:app:url:googleplay",
|
|
1702
|
+
player = "twitter:player",
|
|
1703
|
+
playerWidth = "twitter:player:width",
|
|
1704
|
+
playerHeight = "twitter:player:height",
|
|
1705
|
+
playerStream = "twitter:player:stream",
|
|
1706
|
+
playerStreamContentType = "twitter:player:stream:content_type"
|
|
1707
|
+
}
|
|
1708
|
+
export declare enum MetaTwitterCard {
|
|
1709
|
+
summary = "summary",
|
|
1710
|
+
summaryLargeImage = "summary_large_image",
|
|
1711
|
+
app = "app",
|
|
1712
|
+
player = "player",
|
|
1713
|
+
product = "product",
|
|
1714
|
+
gallery = "gallery",
|
|
1715
|
+
photo = "photo",
|
|
1716
|
+
leadGeneration = "lead_generation",
|
|
1717
|
+
audio = "audio",
|
|
1718
|
+
poll = "poll"
|
|
1719
|
+
}
|
|
1720
|
+
// File: types/searchTypes.d.ts
|
|
1721
|
+
export type SearchItem = Record<string, any>;
|
|
1722
|
+
export type SearchColumnPath<K, P> = K extends string ? P extends string ? `${K}.${P}` : never : never;
|
|
1723
|
+
export type SearchColumn<T extends SearchItem> = {
|
|
1724
|
+
[K in keyof T]-?: NonNullable<T[K]> extends object ? K | SearchColumnPath<K, keyof NonNullable<T[K]>> : K;
|
|
1725
|
+
}[keyof T];
|
|
1726
|
+
export type SearchColumns<T extends SearchItem> = (SearchColumn<T> & string)[];
|
|
1727
|
+
export type SearchFormatCapitalize<K extends string> = K extends `${infer First}.${infer Rest}` ? `${First}${Capitalize<SearchFormatCapitalize<Rest>>}` : K;
|
|
1728
|
+
export type SearchFormatKey<K> = K extends string ? `${SearchFormatCapitalize<K>}Search` : never;
|
|
1729
|
+
export type SearchFormatItem<T extends SearchItem, KT extends string[]> = {
|
|
1730
|
+
[K in keyof T | SearchFormatKey<KT[number]>]: K extends keyof T ? T[K] : string;
|
|
1731
|
+
} & {
|
|
1732
|
+
searchActive?: boolean;
|
|
1733
|
+
};
|
|
1734
|
+
export type SearchFormatList<T extends SearchItem, K extends string[]> = SearchFormatItem<T, K>[];
|
|
1735
|
+
export type SearchListValue<T extends SearchItem> = T[] | undefined;
|
|
1736
|
+
export type SearchOptions = {
|
|
1737
|
+
limit?: number;
|
|
1738
|
+
returnEverything?: boolean;
|
|
1739
|
+
delay?: number;
|
|
1740
|
+
findExactMatch?: boolean;
|
|
1741
|
+
classSearchName?: string;
|
|
1742
|
+
};
|
|
1743
|
+
export type SearchCacheItem<T extends SearchItem> = {
|
|
1744
|
+
item: T;
|
|
1745
|
+
value: string;
|
|
1746
|
+
};
|
|
1747
|
+
export type SearchCache<T extends SearchItem> = SearchCacheItem<T>[];
|
|
1748
|
+
export type HighlightMatchItem = {
|
|
1749
|
+
text: string;
|
|
1750
|
+
isMatch: boolean;
|
|
1751
|
+
};
|
|
1752
|
+
// File: types/translateTypes.d.ts
|
|
1753
|
+
export type TranslateConfig = {
|
|
1754
|
+
url?: string;
|
|
1755
|
+
propsName?: string;
|
|
1756
|
+
readApi?: boolean;
|
|
1757
|
+
};
|
|
1758
|
+
export type TranslateCode = string | string[];
|
|
1759
|
+
export type TranslateList<T extends TranslateCode[]> = {
|
|
1760
|
+
[K in T[number] as K extends readonly string[] ? K[0] : K]: string;
|
|
1761
|
+
};
|
|
1762
|
+
export type TranslateItemOrList<T extends TranslateCode> = T extends string[] ? TranslateList<T> : string;
|
|
1763
|
+
export type TranslateDataFileList = Record<string, string>;
|
|
1764
|
+
export type TranslateDataFileItem = () => Promise<TranslateDataFileList>;
|
|
1765
|
+
export type TranslateDataFile = Record<string, TranslateDataFileItem>;
|
|
1766
|
+
export declare const TRANSLATE_GLOBAL_PREFIX = "global";
|
|
1767
|
+
export declare const TRANSLATE_TIME_OUT = 160;
|