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