@tinisoftin/tsdatagrid 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1272 -0
- package/dist/components/TSDataGrid.vue.d.ts +1285 -0
- package/dist/components/TSDataGrid.vue.d.ts.map +1 -0
- package/dist/components/TSDataGridActiveFilters.vue.d.ts +24 -0
- package/dist/components/TSDataGridActiveFilters.vue.d.ts.map +1 -0
- package/dist/components/TSDataGridBody.vue.d.ts +259 -0
- package/dist/components/TSDataGridBody.vue.d.ts.map +1 -0
- package/dist/components/TSDataGridCell.vue.d.ts +83 -0
- package/dist/components/TSDataGridCell.vue.d.ts.map +1 -0
- package/dist/components/TSDataGridColumnChooser.vue.d.ts +56 -0
- package/dist/components/TSDataGridColumnChooser.vue.d.ts.map +1 -0
- package/dist/components/TSDataGridContextMenu.vue.d.ts +46 -0
- package/dist/components/TSDataGridContextMenu.vue.d.ts.map +1 -0
- package/dist/components/TSDataGridFilter.vue.d.ts +92 -0
- package/dist/components/TSDataGridFilter.vue.d.ts.map +1 -0
- package/dist/components/TSDataGridFooter.vue.d.ts +95 -0
- package/dist/components/TSDataGridFooter.vue.d.ts.map +1 -0
- package/dist/components/TSDataGridGroupPanel.vue.d.ts +47 -0
- package/dist/components/TSDataGridGroupPanel.vue.d.ts.map +1 -0
- package/dist/components/TSDataGridHeader.vue.d.ts +221 -0
- package/dist/components/TSDataGridHeader.vue.d.ts.map +1 -0
- package/dist/components/TSDataGridRow.vue.d.ts +83 -0
- package/dist/components/TSDataGridRow.vue.d.ts.map +1 -0
- package/dist/components/TSDataGridToolbar.vue.d.ts +139 -0
- package/dist/components/TSDataGridToolbar.vue.d.ts.map +1 -0
- package/dist/composables/index.d.ts +28 -0
- package/dist/composables/index.d.ts.map +1 -0
- package/dist/composables/useClipboard.d.ts +863 -0
- package/dist/composables/useClipboard.d.ts.map +1 -0
- package/dist/composables/useColumnChooser.d.ts +36 -0
- package/dist/composables/useColumnChooser.d.ts.map +1 -0
- package/dist/composables/useColumnReorder.d.ts +40 -0
- package/dist/composables/useColumnReorder.d.ts.map +1 -0
- package/dist/composables/useColumnResize.d.ts +36 -0
- package/dist/composables/useColumnResize.d.ts.map +1 -0
- package/dist/composables/useContextMenu.d.ts +55 -0
- package/dist/composables/useContextMenu.d.ts.map +1 -0
- package/dist/composables/useDataSource.d.ts +1770 -0
- package/dist/composables/useDataSource.d.ts.map +1 -0
- package/dist/composables/useEditing.d.ts +54 -0
- package/dist/composables/useEditing.d.ts.map +1 -0
- package/dist/composables/useExport.d.ts +72 -0
- package/dist/composables/useExport.d.ts.map +1 -0
- package/dist/composables/useFiltering.d.ts +42 -0
- package/dist/composables/useFiltering.d.ts.map +1 -0
- package/dist/composables/useGridApi.d.ts +85 -0
- package/dist/composables/useGridApi.d.ts.map +1 -0
- package/dist/composables/useGrouping.d.ts +879 -0
- package/dist/composables/useGrouping.d.ts.map +1 -0
- package/dist/composables/useInfiniteScroll.d.ts +49 -0
- package/dist/composables/useInfiniteScroll.d.ts.map +1 -0
- package/dist/composables/useKeyboardNavigation.d.ts +47 -0
- package/dist/composables/useKeyboardNavigation.d.ts.map +1 -0
- package/dist/composables/useLoadingState.d.ts +36 -0
- package/dist/composables/useLoadingState.d.ts.map +1 -0
- package/dist/composables/usePagination.d.ts +45 -0
- package/dist/composables/usePagination.d.ts.map +1 -0
- package/dist/composables/useRowExpansion.d.ts +47 -0
- package/dist/composables/useRowExpansion.d.ts.map +1 -0
- package/dist/composables/useSearch.d.ts +97 -0
- package/dist/composables/useSearch.d.ts.map +1 -0
- package/dist/composables/useSelection.d.ts +32 -0
- package/dist/composables/useSelection.d.ts.map +1 -0
- package/dist/composables/useSorting.d.ts +859 -0
- package/dist/composables/useSorting.d.ts.map +1 -0
- package/dist/composables/useStatePersistence.d.ts +26 -0
- package/dist/composables/useStatePersistence.d.ts.map +1 -0
- package/dist/composables/useSummary.d.ts +49 -0
- package/dist/composables/useSummary.d.ts.map +1 -0
- package/dist/composables/useUndo.d.ts +27 -0
- package/dist/composables/useUndo.d.ts.map +1 -0
- package/dist/composables/useVirtualization.d.ts +40 -0
- package/dist/composables/useVirtualization.d.ts.map +1 -0
- package/dist/html2canvas.esm-1a1724a1.js +4886 -0
- package/dist/index-541cb5f8.js +38398 -0
- package/dist/index.d.ts +108 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es-713282db.js +5771 -0
- package/dist/plugin.d.ts +22 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/purify.es-35a15df8.js +480 -0
- package/dist/style.css +1 -0
- package/dist/tsdatagrid.es.js +358 -0
- package/dist/tsdatagrid.umd.js +450 -0
- package/dist/types/core/base.d.ts +143 -0
- package/dist/types/core/base.d.ts.map +1 -0
- package/dist/types/core/column.d.ts +354 -0
- package/dist/types/core/column.d.ts.map +1 -0
- package/dist/types/core/datasource.d.ts +247 -0
- package/dist/types/core/datasource.d.ts.map +1 -0
- package/dist/types/core/events.d.ts +297 -0
- package/dist/types/core/events.d.ts.map +1 -0
- package/dist/types/core/models.d.ts +74 -0
- package/dist/types/core/models.d.ts.map +1 -0
- package/dist/types/features/accessibility.d.ts +75 -0
- package/dist/types/features/accessibility.d.ts.map +1 -0
- package/dist/types/features/editing.d.ts +185 -0
- package/dist/types/features/editing.d.ts.map +1 -0
- package/dist/types/features/export.d.ts +145 -0
- package/dist/types/features/export.d.ts.map +1 -0
- package/dist/types/features/filtering.d.ts +193 -0
- package/dist/types/features/filtering.d.ts.map +1 -0
- package/dist/types/features/grouping.d.ts +148 -0
- package/dist/types/features/grouping.d.ts.map +1 -0
- package/dist/types/features/keyboard.d.ts +126 -0
- package/dist/types/features/keyboard.d.ts.map +1 -0
- package/dist/types/features/pagination.d.ts +85 -0
- package/dist/types/features/pagination.d.ts.map +1 -0
- package/dist/types/features/searching.d.ts +90 -0
- package/dist/types/features/searching.d.ts.map +1 -0
- package/dist/types/features/selection.d.ts +99 -0
- package/dist/types/features/selection.d.ts.map +1 -0
- package/dist/types/features/sorting.d.ts +81 -0
- package/dist/types/features/sorting.d.ts.map +1 -0
- package/dist/types/features/summary.d.ts +99 -0
- package/dist/types/features/summary.d.ts.map +1 -0
- package/dist/types/features/virtualization.d.ts +88 -0
- package/dist/types/features/virtualization.d.ts.map +1 -0
- package/dist/types/index.d.ts +60 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/state/grid-state.d.ts +70 -0
- package/dist/types/state/grid-state.d.ts.map +1 -0
- package/dist/types/state/persistence.d.ts +65 -0
- package/dist/types/state/persistence.d.ts.map +1 -0
- package/dist/types/ui/styling.d.ts +72 -0
- package/dist/types/ui/styling.d.ts.map +1 -0
- package/dist/types/ui/templates.d.ts +80 -0
- package/dist/types/ui/templates.d.ts.map +1 -0
- package/dist/types/ui/toolbar.d.ts +63 -0
- package/dist/types/ui/toolbar.d.ts.map +1 -0
- package/dist/types/validation/validators.d.ts +134 -0
- package/dist/types/validation/validators.d.ts.map +1 -0
- package/dist/utils/accessibility.d.ts +35 -0
- package/dist/utils/accessibility.d.ts.map +1 -0
- package/dist/utils/array.d.ts +88 -0
- package/dist/utils/array.d.ts.map +1 -0
- package/dist/utils/cache.d.ts +92 -0
- package/dist/utils/cache.d.ts.map +1 -0
- package/dist/utils/clipboard.d.ts +25 -0
- package/dist/utils/clipboard.d.ts.map +1 -0
- package/dist/utils/column-searcher.d.ts +44 -0
- package/dist/utils/column-searcher.d.ts.map +1 -0
- package/dist/utils/constants.d.ts +76 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/date.d.ts +101 -0
- package/dist/utils/date.d.ts.map +1 -0
- package/dist/utils/dom.d.ts +128 -0
- package/dist/utils/dom.d.ts.map +1 -0
- package/dist/utils/error-handling.d.ts +190 -0
- package/dist/utils/error-handling.d.ts.map +1 -0
- package/dist/utils/export.d.ts +37 -0
- package/dist/utils/export.d.ts.map +1 -0
- package/dist/utils/formatters.d.ts +60 -0
- package/dist/utils/formatters.d.ts.map +1 -0
- package/dist/utils/index.d.ts +25 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/keyboard.d.ts +58 -0
- package/dist/utils/keyboard.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +45 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/number.d.ts +77 -0
- package/dist/utils/number.d.ts.map +1 -0
- package/dist/utils/object.d.ts +101 -0
- package/dist/utils/object.d.ts.map +1 -0
- package/dist/utils/odata.d.ts +87 -0
- package/dist/utils/odata.d.ts.map +1 -0
- package/dist/utils/performance.d.ts +75 -0
- package/dist/utils/performance.d.ts.map +1 -0
- package/dist/utils/storage.d.ts +83 -0
- package/dist/utils/storage.d.ts.map +1 -0
- package/dist/utils/string.d.ts +105 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/validators.d.ts +60 -0
- package/dist/utils/validators.d.ts.map +1 -0
- package/package.json +90 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../src/utils/number.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAErE;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAU,GAAG,MAAM,CAGjE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EACb,QAAQ,GAAE,MAAc,EACxB,MAAM,GAAE,MAAgB,GACvB,MAAM,CAKR;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAIxD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,MAAM,CAEpD;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK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AE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,eAAe,GAAE,MAAU,GAC1B,MAAM,CAER"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Object utilities
|
|
3
|
+
* @module utils/object
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Deep clone object
|
|
7
|
+
*/
|
|
8
|
+
export declare function deepClone<T>(obj: T): T;
|
|
9
|
+
/**
|
|
10
|
+
* Deep merge objects
|
|
11
|
+
*/
|
|
12
|
+
export declare function deepMerge<T extends object>(...objects: Partial<T>[]): T;
|
|
13
|
+
/**
|
|
14
|
+
* Deep equality check
|
|
15
|
+
*/
|
|
16
|
+
export declare function deepEqual(obj1: any, obj2: any): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Get nested value by path
|
|
19
|
+
*/
|
|
20
|
+
export declare function getNestedValue(obj: any, path: string, defaultValue?: any): any;
|
|
21
|
+
/**
|
|
22
|
+
* Set nested value by path
|
|
23
|
+
*/
|
|
24
|
+
export declare function setNestedValue(obj: any, path: string, value: any): void;
|
|
25
|
+
/**
|
|
26
|
+
* Pick properties from object
|
|
27
|
+
*/
|
|
28
|
+
export declare function pick<T extends object, K extends keyof T>(obj: T, keys: K[]): Pick<T, K>;
|
|
29
|
+
/**
|
|
30
|
+
* Omit properties from object
|
|
31
|
+
*/
|
|
32
|
+
export declare function omit<T extends object, K extends keyof T>(obj: T, keys: K[]): Omit<T, K>;
|
|
33
|
+
/**
|
|
34
|
+
* Check if object is empty
|
|
35
|
+
*/
|
|
36
|
+
export declare function isObjectEmpty(obj: any): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Flatten nested object
|
|
39
|
+
*/
|
|
40
|
+
export declare function flattenObject(obj: any, prefix?: string, separator?: string): Record<string, any>;
|
|
41
|
+
/**
|
|
42
|
+
* Unflatten object
|
|
43
|
+
*/
|
|
44
|
+
export declare function unflatten(obj: Record<string, any>, separator?: string): any;
|
|
45
|
+
/**
|
|
46
|
+
* Map object values
|
|
47
|
+
*/
|
|
48
|
+
export declare function mapValues<T, U>(obj: Record<string, T>, mapper: (value: T, key: string) => U): Record<string, U>;
|
|
49
|
+
/**
|
|
50
|
+
* Filter object entries
|
|
51
|
+
*/
|
|
52
|
+
export declare function filterObject<T>(obj: Record<string, T>, predicate: (value: T, key: string) => boolean): Record<string, T>;
|
|
53
|
+
/**
|
|
54
|
+
* Invert object keys/values
|
|
55
|
+
*/
|
|
56
|
+
export declare function invert(obj: Record<string, string | number>): Record<string, string>;
|
|
57
|
+
/**
|
|
58
|
+
* Get object keys with type safety
|
|
59
|
+
*/
|
|
60
|
+
export declare function keys<T extends object>(obj: T): (keyof T)[];
|
|
61
|
+
/**
|
|
62
|
+
* Get object values with type safety
|
|
63
|
+
*/
|
|
64
|
+
export declare function values<T extends object>(obj: T): T[keyof T][];
|
|
65
|
+
/**
|
|
66
|
+
* Get object entries with type safety
|
|
67
|
+
*/
|
|
68
|
+
export declare function entries<T extends object>(obj: T): [keyof T, T[keyof T]][];
|
|
69
|
+
/**
|
|
70
|
+
* Create object from entries
|
|
71
|
+
*/
|
|
72
|
+
export declare function fromEntries<K extends string | number | symbol, V>(entries: [K, V][]): Record<K, V>;
|
|
73
|
+
/**
|
|
74
|
+
* Check if value is object
|
|
75
|
+
*/
|
|
76
|
+
export declare function isObject(value: any): value is object;
|
|
77
|
+
/**
|
|
78
|
+
* Check if value is plain object
|
|
79
|
+
*/
|
|
80
|
+
export declare function isPlainObject(value: any): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Safe object assign with type checking
|
|
83
|
+
*/
|
|
84
|
+
export declare function assign<T extends object>(target: T, ...sources: Partial<T>[]): T;
|
|
85
|
+
/**
|
|
86
|
+
* Create a shallow copy of an object
|
|
87
|
+
*/
|
|
88
|
+
export declare function shallowClone<T extends object>(obj: T): T;
|
|
89
|
+
/**
|
|
90
|
+
* Check if two objects have the same keys
|
|
91
|
+
*/
|
|
92
|
+
export declare function hasSameKeys(obj1: object, obj2: object): boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Get difference between two objects
|
|
95
|
+
*/
|
|
96
|
+
export declare function diff<T extends object>(obj1: T, obj2: T): Partial<T>;
|
|
97
|
+
/**
|
|
98
|
+
* Freeze object deeply
|
|
99
|
+
*/
|
|
100
|
+
export declare function deepFreeze<T>(obj: T): Readonly<T>;
|
|
101
|
+
//# sourceMappingURL=object.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../src/utils/object.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAkBtC;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAqBvE;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAiBvD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,GAAG,GAAG,GAAG,CAY9E;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAavE;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CAAC,EACtD,GAAG,EAAE,CAAC,EACN,IAAI,EAAE,CAAC,EAAE,GACR,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAUZ;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,S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,0 +1,87 @@
|
|
|
1
|
+
import { FilterCondition, LoadOptions, DataResult, DataSourceConfig, ColumnDefinition, SortDescriptor, GroupDescriptor } from '../types';
|
|
2
|
+
|
|
3
|
+
export interface ODataOptions {
|
|
4
|
+
$top?: number;
|
|
5
|
+
$skip?: number;
|
|
6
|
+
$count?: boolean;
|
|
7
|
+
$filter?: string;
|
|
8
|
+
$orderby?: string;
|
|
9
|
+
$select?: string;
|
|
10
|
+
$expand?: string;
|
|
11
|
+
$apply?: string;
|
|
12
|
+
$search?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare enum ODataVersion {
|
|
15
|
+
V2 = "2",
|
|
16
|
+
V3 = "3",
|
|
17
|
+
V4 = "4"
|
|
18
|
+
}
|
|
19
|
+
export declare class ODataQueryBuilder {
|
|
20
|
+
private options;
|
|
21
|
+
private filters;
|
|
22
|
+
private orderByParts;
|
|
23
|
+
private version;
|
|
24
|
+
constructor(baseOptions?: Partial<ODataOptions>, version?: ODataVersion);
|
|
25
|
+
top(value: number): this;
|
|
26
|
+
skip(value: number): this;
|
|
27
|
+
orderBy(field: string, direction?: 'asc' | 'desc'): this;
|
|
28
|
+
clearOrderBy(): this;
|
|
29
|
+
filter(condition: FilterCondition): this;
|
|
30
|
+
clearFilters(): this;
|
|
31
|
+
addFilter(filterStr: string): this;
|
|
32
|
+
addFilters(conditions: FilterCondition[]): this;
|
|
33
|
+
select(...fields: string[]): this;
|
|
34
|
+
expand(...fields: string[]): this;
|
|
35
|
+
count(include?: boolean): this;
|
|
36
|
+
apply(aggregation: string): this;
|
|
37
|
+
search(term: string): this;
|
|
38
|
+
buildFilterString(condition: FilterCondition): string;
|
|
39
|
+
private inferType;
|
|
40
|
+
build(): ODataOptions;
|
|
41
|
+
toQueryString(): string;
|
|
42
|
+
static fromLoadOptions(options: LoadOptions, columns?: ColumnDefinition[]): ODataQueryBuilder;
|
|
43
|
+
static fetchOData(url: string, options: ODataOptions, fetchOptions?: RequestInit): Promise<DataResult<any>>;
|
|
44
|
+
static createDataSource(config: DataSourceConfig): ODataDataSource;
|
|
45
|
+
}
|
|
46
|
+
export declare class ODataDataSource {
|
|
47
|
+
private config;
|
|
48
|
+
private cache;
|
|
49
|
+
private cacheDuration;
|
|
50
|
+
constructor(config: DataSourceConfig);
|
|
51
|
+
load(options?: LoadOptions): Promise<DataResult<any>>;
|
|
52
|
+
reload(): Promise<DataResult<any>>;
|
|
53
|
+
updateConfig(updates: Partial<DataSourceConfig>): void;
|
|
54
|
+
getQueryOptions(options?: LoadOptions): ODataOptions;
|
|
55
|
+
executeQuery(options: ODataOptions): Promise<DataResult<any>>;
|
|
56
|
+
private getCacheKey;
|
|
57
|
+
private getFromCache;
|
|
58
|
+
private setToCache;
|
|
59
|
+
clearCache(): void;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Build OData filter from conditions
|
|
63
|
+
*/
|
|
64
|
+
export declare function buildODataFilter(conditions: FilterCondition[]): string;
|
|
65
|
+
/**
|
|
66
|
+
* Build OData orderby from sort descriptors
|
|
67
|
+
*/
|
|
68
|
+
export declare function buildODataOrderBy(sorts: SortDescriptor[]): string;
|
|
69
|
+
/**
|
|
70
|
+
* Build OData groupby from group descriptors
|
|
71
|
+
*/
|
|
72
|
+
export declare function buildODataGroupBy(groups: GroupDescriptor[]): string;
|
|
73
|
+
/**
|
|
74
|
+
* Parse OData error response
|
|
75
|
+
*/
|
|
76
|
+
export declare function parseODataError(response: any): {
|
|
77
|
+
code: string;
|
|
78
|
+
message: string;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Validate OData query parameters
|
|
82
|
+
*/
|
|
83
|
+
export declare function validateODataQuery(options: ODataOptions): {
|
|
84
|
+
valid: boolean;
|
|
85
|
+
errors: string[];
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=odata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"odata.d.ts","sourceRoot":"","sources":["../../src/utils/odata.ts"],"names":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CAAC,UAAU;IAalB,UAAU,IAAI,IAAI;CAGnB;AAID;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,eAAe,EAAE,GAAG,MAAM,CAItE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,MAAM,CAMjE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,CAEnE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,GAAG,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAYhF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,YAAY,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CA2B9F"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Enhanced performance utilities
|
|
3
|
+
* @module utils/performance
|
|
4
|
+
*/
|
|
5
|
+
export declare const debounce: <T extends (...args: any[]) => any>(func: T, wait: number, options?: {
|
|
6
|
+
leading?: boolean;
|
|
7
|
+
trailing?: boolean;
|
|
8
|
+
maxWait?: number;
|
|
9
|
+
}) => ((...args: Parameters<T>) => void) & {
|
|
10
|
+
cancel: () => void;
|
|
11
|
+
flush: () => void;
|
|
12
|
+
};
|
|
13
|
+
export declare const throttle: <T extends (...args: any[]) => any>(func: T, wait: number, options?: {
|
|
14
|
+
leading?: boolean;
|
|
15
|
+
trailing?: boolean;
|
|
16
|
+
}) => ((...args: Parameters<T>) => void) & {
|
|
17
|
+
cancel: () => void;
|
|
18
|
+
};
|
|
19
|
+
export declare const memoize: <T extends (...args: any[]) => any>(fn: T, options?: {
|
|
20
|
+
keyGenerator?: (...args: Parameters<T>) => string;
|
|
21
|
+
maxSize?: number;
|
|
22
|
+
ttl?: number;
|
|
23
|
+
}) => T & {
|
|
24
|
+
cache: Map<string, any>;
|
|
25
|
+
clear: () => void;
|
|
26
|
+
};
|
|
27
|
+
export declare class PerformanceMonitor {
|
|
28
|
+
private marks;
|
|
29
|
+
private measurements;
|
|
30
|
+
private enabled;
|
|
31
|
+
constructor(enabled?: boolean);
|
|
32
|
+
start(label: string): void;
|
|
33
|
+
end(label: string): number;
|
|
34
|
+
measure<T>(label: string, fn: () => T): T;
|
|
35
|
+
measureAsync<T>(label: string, fn: () => Promise<T>): Promise<T>;
|
|
36
|
+
getStats(label: string): {
|
|
37
|
+
count: number;
|
|
38
|
+
total: number;
|
|
39
|
+
average: number;
|
|
40
|
+
min: number;
|
|
41
|
+
max: number;
|
|
42
|
+
} | null;
|
|
43
|
+
clearMarks(): void;
|
|
44
|
+
clearMeasurements(label?: string): void;
|
|
45
|
+
clear(): void;
|
|
46
|
+
enable(): void;
|
|
47
|
+
disable(): void;
|
|
48
|
+
getAllStats(): Map<string, ReturnType<PerformanceMonitor['getStats']>>;
|
|
49
|
+
}
|
|
50
|
+
export declare class BatchProcessor<T> {
|
|
51
|
+
private processor;
|
|
52
|
+
private options;
|
|
53
|
+
private queue;
|
|
54
|
+
private processing;
|
|
55
|
+
private timer;
|
|
56
|
+
constructor(processor: (items: T[]) => Promise<void> | void, options?: {
|
|
57
|
+
batchSize?: number;
|
|
58
|
+
delay?: number;
|
|
59
|
+
maxWait?: number;
|
|
60
|
+
});
|
|
61
|
+
add(item: T): void;
|
|
62
|
+
addBatch(items: T[]): void;
|
|
63
|
+
private schedule;
|
|
64
|
+
private process;
|
|
65
|
+
flush(): Promise<void>;
|
|
66
|
+
clear(): void;
|
|
67
|
+
size(): number;
|
|
68
|
+
}
|
|
69
|
+
export declare const rafThrottle: <T extends (...args: any[]) => any>(fn: T) => ((...args: Parameters<T>) => void) & {
|
|
70
|
+
cancel: () => void;
|
|
71
|
+
};
|
|
72
|
+
export declare const idleCallback: (callback: () => void, options?: IdleRequestOptions) => number;
|
|
73
|
+
export declare const cancelIdleCallback: (id: number) => void;
|
|
74
|
+
export declare const perfMonitor: PerformanceMonitor;
|
|
75
|
+
//# sourceMappingURL=performance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"performance.d.ts","sourceRoot":"","sources":["../../src/utils/performance.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACxD,MAAM,CAAC,EACP,MAAM,MAAM,EACZ,UAAS;IACP,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;CACZ,KACL,CAAC,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,GAAG;IAAE,MAAM,EAAE,MAAM,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,IAAI,CAAA;CA2H9E,CAAA;AAGD,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACxD,MAAM,CAAC,EACP,MAAM,MAAM,EACZ,UAAS;IACP,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACd,KACL,CAAC,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,GAAG;IAAE,MAAM,EAAE,MAAM,IAAI,CAAA;CAQ3D,CAAA;AAGD,eAAO,MAAM,OAAO,GAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACvD,IAAI,CAAC,EACL,UAAS;IACP,YAAY,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,MAAM,CAAA;IACjD,OAAO,CAAC,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,CAAQ;IAC1B,OAAO,CAAC,KAAK,CAA6C;gBAGhD,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,EAC/C,OAAO,GAAE;QACf,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,OAAO,CAAC,EAAE,MAAM,CAAA;KACZ;IAUR,GAAG,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI;IAKlB,QAAQ,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,IAAI;IAK1B,OAAO,CAAC,QAAQ;YAgBF,OAAO;IAmBf,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAW5B,KAAK,IAAI,IAAI;IAQb,IAAI,IAAI,MAAM;CAGf;AAGD,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAC3D,IAAI,CAAC,KACJ,CAAC,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,GAAG;IAAE,MAAM,EAAE,MAAM,IAAI,CAAA;CAyB3D,CAAA;AAGD,eAAO,MAAM,YAAY,GACvB,UAAU,MAAM,IAAI,EACpB,UAAU,kBAAkB,KAC3B,MAOF,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,IAAI,MAAM,KAAG,IAM/C,CAAA;AAGD,eAAO,MAAM,WAAW,oBAEvB,CAAA"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Storage utilities (localStorage/sessionStorage)
|
|
3
|
+
* @module utils/storage
|
|
4
|
+
*/
|
|
5
|
+
export type StorageType = 'local' | 'session';
|
|
6
|
+
export interface StorageOptions {
|
|
7
|
+
type?: StorageType;
|
|
8
|
+
prefix?: string;
|
|
9
|
+
encrypt?: boolean;
|
|
10
|
+
ttl?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface StorageItem<T = any> {
|
|
13
|
+
value: T;
|
|
14
|
+
timestamp: number;
|
|
15
|
+
ttl?: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Storage manager class
|
|
19
|
+
*/
|
|
20
|
+
export declare class StorageManager {
|
|
21
|
+
private storageBackend;
|
|
22
|
+
private prefix;
|
|
23
|
+
constructor(type?: StorageType, prefix?: string);
|
|
24
|
+
private getKey;
|
|
25
|
+
/**
|
|
26
|
+
* Set item
|
|
27
|
+
*/
|
|
28
|
+
set<T>(key: string, value: T, ttl?: number): void;
|
|
29
|
+
/**
|
|
30
|
+
* Get item
|
|
31
|
+
*/
|
|
32
|
+
get<T>(key: string, defaultValue?: T): T | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Remove item
|
|
35
|
+
*/
|
|
36
|
+
remove(key: string): void;
|
|
37
|
+
/**
|
|
38
|
+
* Clear all items
|
|
39
|
+
*/
|
|
40
|
+
clear(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Check if key exists
|
|
43
|
+
*/
|
|
44
|
+
has(key: string): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Get all keys
|
|
47
|
+
*/
|
|
48
|
+
keys(): string[];
|
|
49
|
+
/**
|
|
50
|
+
* Get storage size
|
|
51
|
+
*/
|
|
52
|
+
size(): number;
|
|
53
|
+
/**
|
|
54
|
+
* Get all items
|
|
55
|
+
*/
|
|
56
|
+
getAll(): Record<string, any>;
|
|
57
|
+
/**
|
|
58
|
+
* Check if storage is available
|
|
59
|
+
*/
|
|
60
|
+
static isAvailable(type?: StorageType): boolean;
|
|
61
|
+
}
|
|
62
|
+
export declare const localStorageManager: StorageManager;
|
|
63
|
+
export declare const sessionStorageManager: StorageManager;
|
|
64
|
+
/**
|
|
65
|
+
* Create storage manager with prefix
|
|
66
|
+
*/
|
|
67
|
+
export declare function createStorage(type?: StorageType, prefix?: string): StorageManager;
|
|
68
|
+
/**
|
|
69
|
+
* Quick storage helpers
|
|
70
|
+
*/
|
|
71
|
+
export declare const storage: {
|
|
72
|
+
local: StorageManager;
|
|
73
|
+
session: StorageManager;
|
|
74
|
+
get: <T>(key: string, defaultValue?: T) => T | undefined;
|
|
75
|
+
set: <T>(key: string, value: T, ttl?: number) => void;
|
|
76
|
+
remove: (key: string) => void;
|
|
77
|
+
clear: () => void;
|
|
78
|
+
has: (key: string) => boolean;
|
|
79
|
+
keys: () => string[];
|
|
80
|
+
size: () => number;
|
|
81
|
+
getAll: () => Record<string, any>;
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/utils/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,CAAA;AAE7C,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,GAAG;IAClC,KAAK,EAAE,CAAC,CAAA;IACR,SAAS,EAAE,MAAM,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAED;;GAEG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,MAAM,CAAQ;gBAEV,IAAI,GAAE,WAAqB,EAAE,MAAM,GAAE,MAAW;IAK5D,OAAO,CAAC,MAAM;IAId;;OAEG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI;IAcjD;;OAEG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS;IAoBpD;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAQzB;;OAEG;IACH,KAAK,IAAI,IAAI;IAcb;;OAEG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIzB;;OAEG;IACH,IAAI,IAAI,MAAM,EAAE;IAqBhB;;OAEG;IACH,IAAI,IAAI,MAAM;IAId;;OAEG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAW7B;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,IAAI,GAAE,WAAqB,GAAG,OAAO;CAWzD;AAGD,eAAO,MAAM,mBAAmB,gBAA8B,CAAA;AAC9D,eAAO,MAAM,qBAAqB,gBAAgC,CAAA;AAElE;;GAEG;AACH,wBAAgB,aAAa,CAC3B,IAAI,GAAE,WAAqB,EAC3B,MAAM,GAAE,MAAW,GAClB,cAAc,CAEhB;AAED;;GAEG;AACH,eAAO,MAAM,OAAO;;;UAKZ,CAAC,OAAO,MAAM,iBAAiB,CAAC;UAChC,CAAC,OAAO,MAAM,SAAS,CAAC,QAAQ,MAAM;kBAC9B,MAAM;;eAET,MAAM;;;;CAIlB,CAAA"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview String manipulation utilities
|
|
3
|
+
* @module utils/string
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Capitalize first letter
|
|
7
|
+
*/
|
|
8
|
+
export declare function capitalize(str: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Capitalize all words
|
|
11
|
+
*/
|
|
12
|
+
export declare function titleCase(str: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Convert to camelCase
|
|
15
|
+
*/
|
|
16
|
+
export declare function camelCase(str: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Convert to PascalCase
|
|
19
|
+
*/
|
|
20
|
+
export declare function pascalCase(str: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Convert to snake_case
|
|
23
|
+
*/
|
|
24
|
+
export declare function snakeCase(str: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* Convert to kebab-case
|
|
27
|
+
*/
|
|
28
|
+
export declare function kebabCase(str: string): string;
|
|
29
|
+
/**
|
|
30
|
+
* Truncate string
|
|
31
|
+
*/
|
|
32
|
+
export declare function truncate(str: string, length: number, suffix?: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* Pad start
|
|
35
|
+
*/
|
|
36
|
+
export declare function padStart(str: string, length: number, char?: string): string;
|
|
37
|
+
/**
|
|
38
|
+
* Pad end
|
|
39
|
+
*/
|
|
40
|
+
export declare function padEnd(str: string, length: number, char?: string): string;
|
|
41
|
+
/**
|
|
42
|
+
* Remove whitespace
|
|
43
|
+
*/
|
|
44
|
+
export declare function trim(str: string): string;
|
|
45
|
+
/**
|
|
46
|
+
* Remove all whitespace
|
|
47
|
+
*/
|
|
48
|
+
export declare function removeWhitespace(str: string): string;
|
|
49
|
+
/**
|
|
50
|
+
* Escape HTML
|
|
51
|
+
*/
|
|
52
|
+
export declare function escapeHtml(str: string): string;
|
|
53
|
+
/**
|
|
54
|
+
* Unescape HTML
|
|
55
|
+
*/
|
|
56
|
+
export declare function unescapeHtml(str: string): string;
|
|
57
|
+
/**
|
|
58
|
+
* Slugify string
|
|
59
|
+
*/
|
|
60
|
+
export declare function slugify(str: string): string;
|
|
61
|
+
/**
|
|
62
|
+
* Count occurrences
|
|
63
|
+
*/
|
|
64
|
+
export declare function countOccurrences(str: string, search: string): number;
|
|
65
|
+
/**
|
|
66
|
+
* Reverse string
|
|
67
|
+
*/
|
|
68
|
+
export declare function reverse(str: string): string;
|
|
69
|
+
/**
|
|
70
|
+
* Check if string is empty
|
|
71
|
+
*/
|
|
72
|
+
export declare function isEmpty(str: string | null | undefined): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Check if string contains
|
|
75
|
+
*/
|
|
76
|
+
export declare function contains(str: string, search: string, caseSensitive?: boolean): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Replace all occurrences
|
|
79
|
+
*/
|
|
80
|
+
export declare function replaceAll(str: string, search: string, replace: string): string;
|
|
81
|
+
/**
|
|
82
|
+
* Word count
|
|
83
|
+
*/
|
|
84
|
+
export declare function wordCount(str: string): number;
|
|
85
|
+
/**
|
|
86
|
+
* Character count (excluding spaces)
|
|
87
|
+
*/
|
|
88
|
+
export declare function charCount(str: string, includeSpaces?: boolean): number;
|
|
89
|
+
/**
|
|
90
|
+
* Extract numbers from string
|
|
91
|
+
*/
|
|
92
|
+
export declare function extractNumbers(str: string): number[];
|
|
93
|
+
/**
|
|
94
|
+
* Format bytes
|
|
95
|
+
*/
|
|
96
|
+
export declare function formatBytesString(bytes: number, decimals?: number): string;
|
|
97
|
+
/**
|
|
98
|
+
* Format number with commas
|
|
99
|
+
*/
|
|
100
|
+
export declare function formatNumberString(num: number): string;
|
|
101
|
+
/**
|
|
102
|
+
* Parse template string
|
|
103
|
+
*/
|
|
104
|
+
export declare function template(str: string, data: Record<string, any>): string;
|
|
105
|
+
//# sourceMappingURL=string.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/utils/string.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAK7C;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAI7C;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG9C;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAM7C;AAED;;GAEG;AACH,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E,MAAM,EACX,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,MAAM,CAER;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,GAAE,OAAc,GAAG,MAAM,CAK5E;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAGpD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAU,GAAG,MAAM,CAU7E;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CACtB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACxB,MAAM,CAIR"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { ColumnDefinition } from '../types';
|
|
2
|
+
|
|
3
|
+
export type Validator = (value: any, context?: {
|
|
4
|
+
row?: any;
|
|
5
|
+
column?: ColumnDefinition;
|
|
6
|
+
}) => boolean | string | Promise<boolean | string>;
|
|
7
|
+
export type ValidationResult = {
|
|
8
|
+
isValid: boolean;
|
|
9
|
+
errors: Record<string, string>;
|
|
10
|
+
warnings?: Record<string, string>;
|
|
11
|
+
pending?: Set<string>;
|
|
12
|
+
};
|
|
13
|
+
export declare const createValidator: (validateFn: (value: any, context?: {
|
|
14
|
+
row?: any;
|
|
15
|
+
column?: ColumnDefinition;
|
|
16
|
+
}) => boolean | string | Promise<boolean | string>, message?: string) => Validator;
|
|
17
|
+
export declare const required: (customMessage?: string) => Validator;
|
|
18
|
+
export declare const email: (customMessage?: string) => Validator;
|
|
19
|
+
export declare const url: (customMessage?: string) => Validator;
|
|
20
|
+
export declare const minLength: (min: number, customMessage?: string) => Validator;
|
|
21
|
+
export declare const maxLength: (max: number, customMessage?: string) => Validator;
|
|
22
|
+
export declare const pattern: (regex: RegExp, customMessage?: string) => Validator;
|
|
23
|
+
export declare const range: (min: number, max: number, customMessage?: string) => Validator;
|
|
24
|
+
export declare const minValue: (min: number, customMessage?: string) => Validator;
|
|
25
|
+
export declare const maxValue: (max: number, customMessage?: string) => Validator;
|
|
26
|
+
export declare const validDate: (customMessage?: string) => Validator;
|
|
27
|
+
export declare const minDate: (minDate: Date | string, customMessage?: string) => Validator;
|
|
28
|
+
export declare const maxDate: (maxDate: Date | string, customMessage?: string) => Validator;
|
|
29
|
+
export declare const unique: (data: any[], keyField: string, customMessage?: string) => Validator;
|
|
30
|
+
export declare const custom: (validatorFn: Validator, message?: string) => Validator;
|
|
31
|
+
export declare const alphanumeric: (customMessage?: string) => Validator;
|
|
32
|
+
export declare const numeric: (customMessage?: string) => Validator;
|
|
33
|
+
export declare const alpha: (customMessage?: string) => Validator;
|
|
34
|
+
export declare const phone: (customMessage?: string) => Validator;
|
|
35
|
+
export declare const zipCode: (customMessage?: string) => Validator;
|
|
36
|
+
export declare const creditCard: (customMessage?: string) => Validator;
|
|
37
|
+
export declare function combineValidators(...validators: Validator[]): Promise<Validator>;
|
|
38
|
+
export declare function validateRow(row: any, columns: ColumnDefinition[], customValidators?: Record<string, Validator>, options?: {
|
|
39
|
+
skipAsync?: boolean;
|
|
40
|
+
}): Promise<ValidationResult>;
|
|
41
|
+
export declare const validateField: (value: any, column: ColumnDefinition, context?: {
|
|
42
|
+
row?: any;
|
|
43
|
+
}) => Promise<{
|
|
44
|
+
isValid: boolean;
|
|
45
|
+
error?: string;
|
|
46
|
+
pending?: boolean;
|
|
47
|
+
}>;
|
|
48
|
+
export declare const createColumnValidator: (column: ColumnDefinition) => Promise<Validator>;
|
|
49
|
+
export declare function batchValidateRows(rows: any[], columns: ColumnDefinition[], options?: {
|
|
50
|
+
maxConcurrent?: number;
|
|
51
|
+
skipAsync?: boolean;
|
|
52
|
+
}): Promise<{
|
|
53
|
+
validRows: any[];
|
|
54
|
+
invalidRows: {
|
|
55
|
+
row: any;
|
|
56
|
+
errors: Record<string, string>;
|
|
57
|
+
}[];
|
|
58
|
+
}>;
|
|
59
|
+
export declare function getDefaultErrorMessage(column: ColumnDefinition): string;
|
|
60
|
+
//# sourceMappingURL=validators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/utils/validators.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAGhD,MAAM,MAAM,SAAS,GAAG,CACtB,KAAK,EAAE,GAAG,EACV,OAAO,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC;IAAC,MAAM,CAAC,EAAE,gBAAgB,CAAA;CAAE,KAC/C,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAAA;AAEjD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACjC,OAAO,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CACtB,CAAA;AAGD,eAAO,MAAM,eAAe,GAC1B,YAAY,CACV,KAAK,EAAE,GAAG,EACV,OAAO,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC;IAAC,MAAM,CAAC,EAAE,gBAAgB,CAAA;CAAE,KAC/C,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,EACjD,UAAU,MAAM,KACf,SASF,CAAA;AAID,eAAO,MAAM,QAAQ,GAAI,gBAAgB,MAAM,cAI5C,CAA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E,gBAAgB,GAAG,MAAM,CAYvE"}
|
package/package.json
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tinisoftin/tsdatagrid",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Advanced, feature-rich data grid component for Vue 3 with TypeScript support",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/tsdatagrid.umd.js",
|
|
7
|
+
"module": "./dist/tsdatagrid.es.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/tsdatagrid.es.js",
|
|
12
|
+
"require": "./dist/tsdatagrid.umd.js",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
},
|
|
15
|
+
"./dist/style.css": "./dist/style.css"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"dev": "vite",
|
|
22
|
+
"build": "vite build --mode lib",
|
|
23
|
+
"build:dev": "vite build",
|
|
24
|
+
"preview": "vite preview",
|
|
25
|
+
"type-check": "vue-tsc --noEmit",
|
|
26
|
+
"test": "vitest",
|
|
27
|
+
"test:ui": "vitest --ui",
|
|
28
|
+
"test:e2e": "playwright test",
|
|
29
|
+
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"vue",
|
|
33
|
+
"vue3",
|
|
34
|
+
"typescript",
|
|
35
|
+
"datagrid",
|
|
36
|
+
"datatable",
|
|
37
|
+
"grid",
|
|
38
|
+
"table",
|
|
39
|
+
"odata",
|
|
40
|
+
"components"
|
|
41
|
+
],
|
|
42
|
+
"author": "Tinisoft",
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "git",
|
|
46
|
+
"url": "https://github.com/tinisoft/tstable.git"
|
|
47
|
+
},
|
|
48
|
+
"bugs": {
|
|
49
|
+
"url": "https://github.com/tinisoft/tstable/issues"
|
|
50
|
+
},
|
|
51
|
+
"homepage": "https://github.com/tinisoft/tstable#readme",
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"vue": "^3.3.0"
|
|
54
|
+
},
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"jspdf": "^2.5.1",
|
|
57
|
+
"jspdf-autotable": "^3.8.4",
|
|
58
|
+
"papaparse": "^5.4.1",
|
|
59
|
+
"vue-router": "^4.6.3",
|
|
60
|
+
"xlsx": "^0.18.5"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@playwright/test": "^1.40.1",
|
|
64
|
+
"@types/node": "^20.19.21",
|
|
65
|
+
"@types/papaparse": "^5.3.14",
|
|
66
|
+
"@types/xlsx": "^0.0.35",
|
|
67
|
+
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
68
|
+
"@typescript-eslint/parser": "^6.21.0",
|
|
69
|
+
"@vitejs/plugin-vue": "^4.6.2",
|
|
70
|
+
"@vue/test-utils": "^2.4.6",
|
|
71
|
+
"@vue/tsconfig": "^0.5.1",
|
|
72
|
+
"eslint": "^8.57.1",
|
|
73
|
+
"eslint-plugin-vue": "^9.33.0",
|
|
74
|
+
"jsdom": "^23.0.1",
|
|
75
|
+
"prettier": "^3.6.2",
|
|
76
|
+
"sass": "^1.93.2",
|
|
77
|
+
"typescript": "^5.9.3",
|
|
78
|
+
"vite": "^4.5.14",
|
|
79
|
+
"vite-plugin-dts": "^3.9.1",
|
|
80
|
+
"vitepress": "^1.6.4",
|
|
81
|
+
"vitest": "^0.34.6",
|
|
82
|
+
"vue": "^3.5.22",
|
|
83
|
+
"vue-tsc": "^1.8.27"
|
|
84
|
+
},
|
|
85
|
+
"compilerOptions": {
|
|
86
|
+
"skipLibCheck": true,
|
|
87
|
+
"noUnusedLocals": false,
|
|
88
|
+
"noUnusedParameters": false
|
|
89
|
+
}
|
|
90
|
+
}
|