@je-es/client 0.2.2 → 0.2.3
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/README.md +2 -2
- package/dist/main.cjs +14 -18
- package/dist/main.cjs.map +1 -1
- package/dist/main.d.cts +13 -13
- package/dist/main.d.ts +13 -13
- package/dist/main.js +14 -18
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
package/dist/main.d.cts
CHANGED
|
@@ -731,7 +731,7 @@ declare class StyleManager {
|
|
|
731
731
|
* CSS template literal tag
|
|
732
732
|
* Usage: css`.class { color: red; }`
|
|
733
733
|
*/
|
|
734
|
-
declare function css(strings: TemplateStringsArray, ...values:
|
|
734
|
+
declare function css(strings: TemplateStringsArray, ...values: (string | number | boolean | null | undefined)[]): string;
|
|
735
735
|
|
|
736
736
|
declare class I18nManager {
|
|
737
737
|
private translations;
|
|
@@ -1203,7 +1203,7 @@ interface PopupOptions {
|
|
|
1203
1203
|
}
|
|
1204
1204
|
interface ActivePopup extends PopupOptions {
|
|
1205
1205
|
id: number;
|
|
1206
|
-
resolve?: (value: boolean | string | null | unknown) => void;
|
|
1206
|
+
resolve?: (value: boolean | string | null | Record<string, unknown>) => void;
|
|
1207
1207
|
inputValue?: string;
|
|
1208
1208
|
isSubmitting?: boolean;
|
|
1209
1209
|
}
|
|
@@ -1218,11 +1218,11 @@ declare class Popup extends Component {
|
|
|
1218
1218
|
/**
|
|
1219
1219
|
* Show a custom popup
|
|
1220
1220
|
*/
|
|
1221
|
-
show(options: PopupOptions): Promise<boolean | string | null | unknown
|
|
1221
|
+
show(options: PopupOptions): Promise<boolean | string | null | Record<string, unknown>>;
|
|
1222
1222
|
/**
|
|
1223
1223
|
* Show a form popup
|
|
1224
1224
|
*/
|
|
1225
|
-
showForm(options: PopupFormOptions): Promise<unknown
|
|
1225
|
+
showForm(options: PopupFormOptions): Promise<boolean | string | null | Record<string, unknown>>;
|
|
1226
1226
|
/**
|
|
1227
1227
|
* Show a confirmation dialog
|
|
1228
1228
|
*/
|
|
@@ -1276,7 +1276,7 @@ declare class Popup extends Component {
|
|
|
1276
1276
|
/**
|
|
1277
1277
|
* Close a specific popup
|
|
1278
1278
|
*/
|
|
1279
|
-
closePopup(id: number, result: boolean | string | null | unknown): void;
|
|
1279
|
+
closePopup(id: number, result: boolean | string | null | Record<string, unknown>): void;
|
|
1280
1280
|
/**
|
|
1281
1281
|
* Close all popups
|
|
1282
1282
|
*/
|
|
@@ -1288,7 +1288,7 @@ declare class Popup extends Component {
|
|
|
1288
1288
|
declare function initPopup(container?: HTMLElement): Popup;
|
|
1289
1289
|
declare function getPopup(): Popup;
|
|
1290
1290
|
declare const popup: {
|
|
1291
|
-
show: (options: PopupOptions) => Promise<unknown>;
|
|
1291
|
+
show: (options: PopupOptions) => Promise<string | boolean | Record<string, unknown> | null>;
|
|
1292
1292
|
confirm: (options: Parameters<Popup["confirm"]>[0]) => Promise<boolean>;
|
|
1293
1293
|
alert: (options: Parameters<Popup["alert"]>[0]) => Promise<boolean>;
|
|
1294
1294
|
prompt: (options: {
|
|
@@ -1299,8 +1299,8 @@ declare const popup: {
|
|
|
1299
1299
|
messageTranslateKey?: string;
|
|
1300
1300
|
onConfirm?: () => void | Promise<void>;
|
|
1301
1301
|
}) => Promise<string | null>;
|
|
1302
|
-
showForm: (options: PopupFormOptions) => Promise<unknown>;
|
|
1303
|
-
closePopup: (id: number, result: boolean | string | null | unknown) => void;
|
|
1302
|
+
showForm: (options: PopupFormOptions) => Promise<string | boolean | Record<string, unknown> | null>;
|
|
1303
|
+
closePopup: (id: number, result: boolean | string | null | Record<string, unknown>) => void;
|
|
1304
1304
|
closeLastPopup: () => void;
|
|
1305
1305
|
closeFirstPopup: () => void;
|
|
1306
1306
|
closeAll: () => void;
|
|
@@ -1410,8 +1410,8 @@ interface ItemsLoaderConfig<T> {
|
|
|
1410
1410
|
onLoadMore?: (page: number, items: T[]) => void;
|
|
1411
1411
|
onError?: (error: Error) => void;
|
|
1412
1412
|
initialItems?: T[];
|
|
1413
|
-
extractItems?: (response:
|
|
1414
|
-
extractTotal?: (response:
|
|
1413
|
+
extractItems?: (response: Record<string, unknown>) => T[];
|
|
1414
|
+
extractTotal?: (response: Record<string, unknown>) => number;
|
|
1415
1415
|
getAuthToken?: () => string | null;
|
|
1416
1416
|
enableInfiniteScroll?: boolean;
|
|
1417
1417
|
scrollThreshold?: number;
|
|
@@ -1500,7 +1500,7 @@ interface DropdownConfig {
|
|
|
1500
1500
|
trigger: {
|
|
1501
1501
|
text?: string;
|
|
1502
1502
|
icon?: string;
|
|
1503
|
-
element?: () =>
|
|
1503
|
+
element?: () => VNode | HTMLElement;
|
|
1504
1504
|
className?: string;
|
|
1505
1505
|
};
|
|
1506
1506
|
items: (DropdownItemConfig | 'divider')[];
|
|
@@ -1556,12 +1556,12 @@ declare function createDropdown(config: DropdownConfig): Dropdown;
|
|
|
1556
1556
|
* Debounce function
|
|
1557
1557
|
* Delays function execution until after wait time
|
|
1558
1558
|
*/
|
|
1559
|
-
declare function debounce<T extends (...args: never[]) =>
|
|
1559
|
+
declare function debounce<T extends (...args: never[]) => any>(fn: T, delay: number): (...args: Parameters<T>) => void;
|
|
1560
1560
|
/**
|
|
1561
1561
|
* Throttle function
|
|
1562
1562
|
* Limits function execution to once per time period
|
|
1563
1563
|
*/
|
|
1564
|
-
declare function throttle<T extends (...args: never[]) =>
|
|
1564
|
+
declare function throttle<T extends (...args: never[]) => any>(fn: T, delay: number): (...args: Parameters<T>) => void;
|
|
1565
1565
|
/**
|
|
1566
1566
|
* Class names utility
|
|
1567
1567
|
* Combines class names conditionally
|
package/dist/main.d.ts
CHANGED
|
@@ -731,7 +731,7 @@ declare class StyleManager {
|
|
|
731
731
|
* CSS template literal tag
|
|
732
732
|
* Usage: css`.class { color: red; }`
|
|
733
733
|
*/
|
|
734
|
-
declare function css(strings: TemplateStringsArray, ...values:
|
|
734
|
+
declare function css(strings: TemplateStringsArray, ...values: (string | number | boolean | null | undefined)[]): string;
|
|
735
735
|
|
|
736
736
|
declare class I18nManager {
|
|
737
737
|
private translations;
|
|
@@ -1203,7 +1203,7 @@ interface PopupOptions {
|
|
|
1203
1203
|
}
|
|
1204
1204
|
interface ActivePopup extends PopupOptions {
|
|
1205
1205
|
id: number;
|
|
1206
|
-
resolve?: (value: boolean | string | null | unknown) => void;
|
|
1206
|
+
resolve?: (value: boolean | string | null | Record<string, unknown>) => void;
|
|
1207
1207
|
inputValue?: string;
|
|
1208
1208
|
isSubmitting?: boolean;
|
|
1209
1209
|
}
|
|
@@ -1218,11 +1218,11 @@ declare class Popup extends Component {
|
|
|
1218
1218
|
/**
|
|
1219
1219
|
* Show a custom popup
|
|
1220
1220
|
*/
|
|
1221
|
-
show(options: PopupOptions): Promise<boolean | string | null | unknown
|
|
1221
|
+
show(options: PopupOptions): Promise<boolean | string | null | Record<string, unknown>>;
|
|
1222
1222
|
/**
|
|
1223
1223
|
* Show a form popup
|
|
1224
1224
|
*/
|
|
1225
|
-
showForm(options: PopupFormOptions): Promise<unknown
|
|
1225
|
+
showForm(options: PopupFormOptions): Promise<boolean | string | null | Record<string, unknown>>;
|
|
1226
1226
|
/**
|
|
1227
1227
|
* Show a confirmation dialog
|
|
1228
1228
|
*/
|
|
@@ -1276,7 +1276,7 @@ declare class Popup extends Component {
|
|
|
1276
1276
|
/**
|
|
1277
1277
|
* Close a specific popup
|
|
1278
1278
|
*/
|
|
1279
|
-
closePopup(id: number, result: boolean | string | null | unknown): void;
|
|
1279
|
+
closePopup(id: number, result: boolean | string | null | Record<string, unknown>): void;
|
|
1280
1280
|
/**
|
|
1281
1281
|
* Close all popups
|
|
1282
1282
|
*/
|
|
@@ -1288,7 +1288,7 @@ declare class Popup extends Component {
|
|
|
1288
1288
|
declare function initPopup(container?: HTMLElement): Popup;
|
|
1289
1289
|
declare function getPopup(): Popup;
|
|
1290
1290
|
declare const popup: {
|
|
1291
|
-
show: (options: PopupOptions) => Promise<unknown>;
|
|
1291
|
+
show: (options: PopupOptions) => Promise<string | boolean | Record<string, unknown> | null>;
|
|
1292
1292
|
confirm: (options: Parameters<Popup["confirm"]>[0]) => Promise<boolean>;
|
|
1293
1293
|
alert: (options: Parameters<Popup["alert"]>[0]) => Promise<boolean>;
|
|
1294
1294
|
prompt: (options: {
|
|
@@ -1299,8 +1299,8 @@ declare const popup: {
|
|
|
1299
1299
|
messageTranslateKey?: string;
|
|
1300
1300
|
onConfirm?: () => void | Promise<void>;
|
|
1301
1301
|
}) => Promise<string | null>;
|
|
1302
|
-
showForm: (options: PopupFormOptions) => Promise<unknown>;
|
|
1303
|
-
closePopup: (id: number, result: boolean | string | null | unknown) => void;
|
|
1302
|
+
showForm: (options: PopupFormOptions) => Promise<string | boolean | Record<string, unknown> | null>;
|
|
1303
|
+
closePopup: (id: number, result: boolean | string | null | Record<string, unknown>) => void;
|
|
1304
1304
|
closeLastPopup: () => void;
|
|
1305
1305
|
closeFirstPopup: () => void;
|
|
1306
1306
|
closeAll: () => void;
|
|
@@ -1410,8 +1410,8 @@ interface ItemsLoaderConfig<T> {
|
|
|
1410
1410
|
onLoadMore?: (page: number, items: T[]) => void;
|
|
1411
1411
|
onError?: (error: Error) => void;
|
|
1412
1412
|
initialItems?: T[];
|
|
1413
|
-
extractItems?: (response:
|
|
1414
|
-
extractTotal?: (response:
|
|
1413
|
+
extractItems?: (response: Record<string, unknown>) => T[];
|
|
1414
|
+
extractTotal?: (response: Record<string, unknown>) => number;
|
|
1415
1415
|
getAuthToken?: () => string | null;
|
|
1416
1416
|
enableInfiniteScroll?: boolean;
|
|
1417
1417
|
scrollThreshold?: number;
|
|
@@ -1500,7 +1500,7 @@ interface DropdownConfig {
|
|
|
1500
1500
|
trigger: {
|
|
1501
1501
|
text?: string;
|
|
1502
1502
|
icon?: string;
|
|
1503
|
-
element?: () =>
|
|
1503
|
+
element?: () => VNode | HTMLElement;
|
|
1504
1504
|
className?: string;
|
|
1505
1505
|
};
|
|
1506
1506
|
items: (DropdownItemConfig | 'divider')[];
|
|
@@ -1556,12 +1556,12 @@ declare function createDropdown(config: DropdownConfig): Dropdown;
|
|
|
1556
1556
|
* Debounce function
|
|
1557
1557
|
* Delays function execution until after wait time
|
|
1558
1558
|
*/
|
|
1559
|
-
declare function debounce<T extends (...args: never[]) =>
|
|
1559
|
+
declare function debounce<T extends (...args: never[]) => any>(fn: T, delay: number): (...args: Parameters<T>) => void;
|
|
1560
1560
|
/**
|
|
1561
1561
|
* Throttle function
|
|
1562
1562
|
* Limits function execution to once per time period
|
|
1563
1563
|
*/
|
|
1564
|
-
declare function throttle<T extends (...args: never[]) =>
|
|
1564
|
+
declare function throttle<T extends (...args: never[]) => any>(fn: T, delay: number): (...args: Parameters<T>) => void;
|
|
1565
1565
|
/**
|
|
1566
1566
|
* Class names utility
|
|
1567
1567
|
* Combines class names conditionally
|