@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.
Files changed (175) hide show
  1. package/README.md +1272 -0
  2. package/dist/components/TSDataGrid.vue.d.ts +1285 -0
  3. package/dist/components/TSDataGrid.vue.d.ts.map +1 -0
  4. package/dist/components/TSDataGridActiveFilters.vue.d.ts +24 -0
  5. package/dist/components/TSDataGridActiveFilters.vue.d.ts.map +1 -0
  6. package/dist/components/TSDataGridBody.vue.d.ts +259 -0
  7. package/dist/components/TSDataGridBody.vue.d.ts.map +1 -0
  8. package/dist/components/TSDataGridCell.vue.d.ts +83 -0
  9. package/dist/components/TSDataGridCell.vue.d.ts.map +1 -0
  10. package/dist/components/TSDataGridColumnChooser.vue.d.ts +56 -0
  11. package/dist/components/TSDataGridColumnChooser.vue.d.ts.map +1 -0
  12. package/dist/components/TSDataGridContextMenu.vue.d.ts +46 -0
  13. package/dist/components/TSDataGridContextMenu.vue.d.ts.map +1 -0
  14. package/dist/components/TSDataGridFilter.vue.d.ts +92 -0
  15. package/dist/components/TSDataGridFilter.vue.d.ts.map +1 -0
  16. package/dist/components/TSDataGridFooter.vue.d.ts +95 -0
  17. package/dist/components/TSDataGridFooter.vue.d.ts.map +1 -0
  18. package/dist/components/TSDataGridGroupPanel.vue.d.ts +47 -0
  19. package/dist/components/TSDataGridGroupPanel.vue.d.ts.map +1 -0
  20. package/dist/components/TSDataGridHeader.vue.d.ts +221 -0
  21. package/dist/components/TSDataGridHeader.vue.d.ts.map +1 -0
  22. package/dist/components/TSDataGridRow.vue.d.ts +83 -0
  23. package/dist/components/TSDataGridRow.vue.d.ts.map +1 -0
  24. package/dist/components/TSDataGridToolbar.vue.d.ts +139 -0
  25. package/dist/components/TSDataGridToolbar.vue.d.ts.map +1 -0
  26. package/dist/composables/index.d.ts +28 -0
  27. package/dist/composables/index.d.ts.map +1 -0
  28. package/dist/composables/useClipboard.d.ts +863 -0
  29. package/dist/composables/useClipboard.d.ts.map +1 -0
  30. package/dist/composables/useColumnChooser.d.ts +36 -0
  31. package/dist/composables/useColumnChooser.d.ts.map +1 -0
  32. package/dist/composables/useColumnReorder.d.ts +40 -0
  33. package/dist/composables/useColumnReorder.d.ts.map +1 -0
  34. package/dist/composables/useColumnResize.d.ts +36 -0
  35. package/dist/composables/useColumnResize.d.ts.map +1 -0
  36. package/dist/composables/useContextMenu.d.ts +55 -0
  37. package/dist/composables/useContextMenu.d.ts.map +1 -0
  38. package/dist/composables/useDataSource.d.ts +1770 -0
  39. package/dist/composables/useDataSource.d.ts.map +1 -0
  40. package/dist/composables/useEditing.d.ts +54 -0
  41. package/dist/composables/useEditing.d.ts.map +1 -0
  42. package/dist/composables/useExport.d.ts +72 -0
  43. package/dist/composables/useExport.d.ts.map +1 -0
  44. package/dist/composables/useFiltering.d.ts +42 -0
  45. package/dist/composables/useFiltering.d.ts.map +1 -0
  46. package/dist/composables/useGridApi.d.ts +85 -0
  47. package/dist/composables/useGridApi.d.ts.map +1 -0
  48. package/dist/composables/useGrouping.d.ts +879 -0
  49. package/dist/composables/useGrouping.d.ts.map +1 -0
  50. package/dist/composables/useInfiniteScroll.d.ts +49 -0
  51. package/dist/composables/useInfiniteScroll.d.ts.map +1 -0
  52. package/dist/composables/useKeyboardNavigation.d.ts +47 -0
  53. package/dist/composables/useKeyboardNavigation.d.ts.map +1 -0
  54. package/dist/composables/useLoadingState.d.ts +36 -0
  55. package/dist/composables/useLoadingState.d.ts.map +1 -0
  56. package/dist/composables/usePagination.d.ts +45 -0
  57. package/dist/composables/usePagination.d.ts.map +1 -0
  58. package/dist/composables/useRowExpansion.d.ts +47 -0
  59. package/dist/composables/useRowExpansion.d.ts.map +1 -0
  60. package/dist/composables/useSearch.d.ts +97 -0
  61. package/dist/composables/useSearch.d.ts.map +1 -0
  62. package/dist/composables/useSelection.d.ts +32 -0
  63. package/dist/composables/useSelection.d.ts.map +1 -0
  64. package/dist/composables/useSorting.d.ts +859 -0
  65. package/dist/composables/useSorting.d.ts.map +1 -0
  66. package/dist/composables/useStatePersistence.d.ts +26 -0
  67. package/dist/composables/useStatePersistence.d.ts.map +1 -0
  68. package/dist/composables/useSummary.d.ts +49 -0
  69. package/dist/composables/useSummary.d.ts.map +1 -0
  70. package/dist/composables/useUndo.d.ts +27 -0
  71. package/dist/composables/useUndo.d.ts.map +1 -0
  72. package/dist/composables/useVirtualization.d.ts +40 -0
  73. package/dist/composables/useVirtualization.d.ts.map +1 -0
  74. package/dist/html2canvas.esm-1a1724a1.js +4886 -0
  75. package/dist/index-541cb5f8.js +38398 -0
  76. package/dist/index.d.ts +108 -0
  77. package/dist/index.d.ts.map +1 -0
  78. package/dist/index.es-713282db.js +5771 -0
  79. package/dist/plugin.d.ts +22 -0
  80. package/dist/plugin.d.ts.map +1 -0
  81. package/dist/purify.es-35a15df8.js +480 -0
  82. package/dist/style.css +1 -0
  83. package/dist/tsdatagrid.es.js +358 -0
  84. package/dist/tsdatagrid.umd.js +450 -0
  85. package/dist/types/core/base.d.ts +143 -0
  86. package/dist/types/core/base.d.ts.map +1 -0
  87. package/dist/types/core/column.d.ts +354 -0
  88. package/dist/types/core/column.d.ts.map +1 -0
  89. package/dist/types/core/datasource.d.ts +247 -0
  90. package/dist/types/core/datasource.d.ts.map +1 -0
  91. package/dist/types/core/events.d.ts +297 -0
  92. package/dist/types/core/events.d.ts.map +1 -0
  93. package/dist/types/core/models.d.ts +74 -0
  94. package/dist/types/core/models.d.ts.map +1 -0
  95. package/dist/types/features/accessibility.d.ts +75 -0
  96. package/dist/types/features/accessibility.d.ts.map +1 -0
  97. package/dist/types/features/editing.d.ts +185 -0
  98. package/dist/types/features/editing.d.ts.map +1 -0
  99. package/dist/types/features/export.d.ts +145 -0
  100. package/dist/types/features/export.d.ts.map +1 -0
  101. package/dist/types/features/filtering.d.ts +193 -0
  102. package/dist/types/features/filtering.d.ts.map +1 -0
  103. package/dist/types/features/grouping.d.ts +148 -0
  104. package/dist/types/features/grouping.d.ts.map +1 -0
  105. package/dist/types/features/keyboard.d.ts +126 -0
  106. package/dist/types/features/keyboard.d.ts.map +1 -0
  107. package/dist/types/features/pagination.d.ts +85 -0
  108. package/dist/types/features/pagination.d.ts.map +1 -0
  109. package/dist/types/features/searching.d.ts +90 -0
  110. package/dist/types/features/searching.d.ts.map +1 -0
  111. package/dist/types/features/selection.d.ts +99 -0
  112. package/dist/types/features/selection.d.ts.map +1 -0
  113. package/dist/types/features/sorting.d.ts +81 -0
  114. package/dist/types/features/sorting.d.ts.map +1 -0
  115. package/dist/types/features/summary.d.ts +99 -0
  116. package/dist/types/features/summary.d.ts.map +1 -0
  117. package/dist/types/features/virtualization.d.ts +88 -0
  118. package/dist/types/features/virtualization.d.ts.map +1 -0
  119. package/dist/types/index.d.ts +60 -0
  120. package/dist/types/index.d.ts.map +1 -0
  121. package/dist/types/state/grid-state.d.ts +70 -0
  122. package/dist/types/state/grid-state.d.ts.map +1 -0
  123. package/dist/types/state/persistence.d.ts +65 -0
  124. package/dist/types/state/persistence.d.ts.map +1 -0
  125. package/dist/types/ui/styling.d.ts +72 -0
  126. package/dist/types/ui/styling.d.ts.map +1 -0
  127. package/dist/types/ui/templates.d.ts +80 -0
  128. package/dist/types/ui/templates.d.ts.map +1 -0
  129. package/dist/types/ui/toolbar.d.ts +63 -0
  130. package/dist/types/ui/toolbar.d.ts.map +1 -0
  131. package/dist/types/validation/validators.d.ts +134 -0
  132. package/dist/types/validation/validators.d.ts.map +1 -0
  133. package/dist/utils/accessibility.d.ts +35 -0
  134. package/dist/utils/accessibility.d.ts.map +1 -0
  135. package/dist/utils/array.d.ts +88 -0
  136. package/dist/utils/array.d.ts.map +1 -0
  137. package/dist/utils/cache.d.ts +92 -0
  138. package/dist/utils/cache.d.ts.map +1 -0
  139. package/dist/utils/clipboard.d.ts +25 -0
  140. package/dist/utils/clipboard.d.ts.map +1 -0
  141. package/dist/utils/column-searcher.d.ts +44 -0
  142. package/dist/utils/column-searcher.d.ts.map +1 -0
  143. package/dist/utils/constants.d.ts +76 -0
  144. package/dist/utils/constants.d.ts.map +1 -0
  145. package/dist/utils/date.d.ts +101 -0
  146. package/dist/utils/date.d.ts.map +1 -0
  147. package/dist/utils/dom.d.ts +128 -0
  148. package/dist/utils/dom.d.ts.map +1 -0
  149. package/dist/utils/error-handling.d.ts +190 -0
  150. package/dist/utils/error-handling.d.ts.map +1 -0
  151. package/dist/utils/export.d.ts +37 -0
  152. package/dist/utils/export.d.ts.map +1 -0
  153. package/dist/utils/formatters.d.ts +60 -0
  154. package/dist/utils/formatters.d.ts.map +1 -0
  155. package/dist/utils/index.d.ts +25 -0
  156. package/dist/utils/index.d.ts.map +1 -0
  157. package/dist/utils/keyboard.d.ts +58 -0
  158. package/dist/utils/keyboard.d.ts.map +1 -0
  159. package/dist/utils/logger.d.ts +45 -0
  160. package/dist/utils/logger.d.ts.map +1 -0
  161. package/dist/utils/number.d.ts +77 -0
  162. package/dist/utils/number.d.ts.map +1 -0
  163. package/dist/utils/object.d.ts +101 -0
  164. package/dist/utils/object.d.ts.map +1 -0
  165. package/dist/utils/odata.d.ts +87 -0
  166. package/dist/utils/odata.d.ts.map +1 -0
  167. package/dist/utils/performance.d.ts +75 -0
  168. package/dist/utils/performance.d.ts.map +1 -0
  169. package/dist/utils/storage.d.ts +83 -0
  170. package/dist/utils/storage.d.ts.map +1 -0
  171. package/dist/utils/string.d.ts +105 -0
  172. package/dist/utils/string.d.ts.map +1 -0
  173. package/dist/utils/validators.d.ts +60 -0
  174. package/dist/utils/validators.d.ts.map +1 -0
  175. package/package.json +90 -0
@@ -0,0 +1,128 @@
1
+ /**
2
+ * @fileoverview DOM manipulation utilities
3
+ * @module utils/dom
4
+ */
5
+ /**
6
+ * Get element offset relative to document
7
+ */
8
+ export declare function getOffset(element: HTMLElement): {
9
+ top: number;
10
+ left: number;
11
+ };
12
+ /**
13
+ * Get element position relative to parent
14
+ */
15
+ export declare function getPosition(element: HTMLElement): {
16
+ top: number;
17
+ left: number;
18
+ };
19
+ /**
20
+ * Get element dimensions
21
+ */
22
+ export declare function getDimensions(element: HTMLElement): {
23
+ width: number;
24
+ height: number;
25
+ innerWidth: number;
26
+ innerHeight: number;
27
+ outerWidth: number;
28
+ outerHeight: number;
29
+ };
30
+ /**
31
+ * Check if element is visible in viewport
32
+ */
33
+ export declare function isInViewport(element: HTMLElement, threshold?: number): boolean;
34
+ /**
35
+ * Scroll element into view if needed
36
+ */
37
+ export declare function scrollIntoViewIfNeeded(element: HTMLElement, options?: ScrollIntoViewOptions): void;
38
+ /**
39
+ * Get scroll position
40
+ */
41
+ export declare function getScrollPosition(element?: HTMLElement | Window): {
42
+ x: number;
43
+ y: number;
44
+ };
45
+ /**
46
+ * Set scroll position
47
+ */
48
+ export declare function setScrollPosition(element: HTMLElement | Window, x: number, y: number, smooth?: boolean): void;
49
+ /**
50
+ * Get parent element matching selector
51
+ */
52
+ export declare function getParent(element: HTMLElement, selector: string): HTMLElement | null;
53
+ /**
54
+ * Add class to element
55
+ */
56
+ export declare function addClass(element: HTMLElement, ...classNames: string[]): void;
57
+ /**
58
+ * Remove class from element
59
+ */
60
+ export declare function removeClass(element: HTMLElement, ...classNames: string[]): void;
61
+ /**
62
+ * Toggle class on element
63
+ */
64
+ export declare function toggleClass(element: HTMLElement, className: string, force?: boolean): void;
65
+ /**
66
+ * Check if element has class
67
+ */
68
+ export declare function hasClass(element: HTMLElement, className: string): boolean;
69
+ /**
70
+ * Set element attribute
71
+ */
72
+ export declare function setAttr(element: HTMLElement, name: string, value: string | number | boolean): void;
73
+ /**
74
+ * Get element attribute
75
+ */
76
+ export declare function getAttr(element: HTMLElement, name: string): string | null;
77
+ /**
78
+ * Remove element attribute
79
+ */
80
+ export declare function removeAttr(element: HTMLElement, name: string): void;
81
+ /**
82
+ * Set element style
83
+ */
84
+ export declare function setStyle(element: HTMLElement, styles: Partial<CSSStyleDeclaration>): void;
85
+ /**
86
+ * Get computed style
87
+ */
88
+ export declare function getStyle(element: HTMLElement, property: string): string;
89
+ /**
90
+ * Create element
91
+ */
92
+ export declare function createElement<K extends keyof HTMLElementTagNameMap>(tagName: K, options?: {
93
+ className?: string;
94
+ id?: string;
95
+ attrs?: Record<string, string | number | boolean>;
96
+ styles?: Partial<CSSStyleDeclaration>;
97
+ text?: string;
98
+ html?: string;
99
+ }): HTMLElementTagNameMap[K];
100
+ /**
101
+ * Remove element from DOM
102
+ */
103
+ export declare function removeElement(element: HTMLElement): void;
104
+ /**
105
+ * Get siblings
106
+ */
107
+ export declare function getSiblings(element: HTMLElement): HTMLElement[];
108
+ /**
109
+ * Get next sibling matching selector
110
+ */
111
+ export declare function getNextSibling(element: HTMLElement, selector?: string): HTMLElement | null;
112
+ /**
113
+ * Get previous sibling matching selector
114
+ */
115
+ export declare function getPreviousSibling(element: HTMLElement, selector?: string): HTMLElement | null;
116
+ /**
117
+ * Wait for element to be in DOM
118
+ */
119
+ export declare function waitForElement(selector: string, timeout?: number): Promise<HTMLElement | null>;
120
+ /**
121
+ * Create DocumentFragment from HTML string
122
+ */
123
+ export declare function createFragment(html: string): DocumentFragment;
124
+ /**
125
+ * Detect click outside element
126
+ */
127
+ export declare function onClickOutside(element: HTMLElement, callback: (event: MouseEvent) => void): () => void;
128
+ //# sourceMappingURL=dom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/utils/dom.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,WAAW,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAM7E;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAK/E;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,WAAW,GA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c,CAC5B,OAAO,EAAE,WAAW,EACpB,QAAQ,CAAC,EAAE,MAAM,GAChB,WAAW,GAAG,IAAI,CAapB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,WAAW,EACpB,QAAQ,CAAC,EAAE,MAAM,GAChB,WAAW,GAAG,IAAI,CAapB;AAED;;GAEG;AACH,wBAAsB,cAAc,CAClC,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,MAAa,GACrB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CA0B7B;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,CAI7D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GACpC,MAAM,IAAI,CAYZ"}
@@ -0,0 +1,190 @@
1
+ /**
2
+ * @fileoverview Enhanced error handling utility
3
+ * @module utils/error-handling
4
+ */
5
+ export declare enum GridErrorCode {
6
+ DATA_LOAD_FAILED = "DATA_LOAD_FAILED",
7
+ DATA_INVALID_FORMAT = "DATA_INVALID_FORMAT",
8
+ DATA_NETWORK_ERROR = "DATA_NETWORK_ERROR",
9
+ DATA_TIMEOUT = "DATA_TIMEOUT",
10
+ DATA_UNAUTHORIZED = "DATA_UNAUTHORIZED",
11
+ DATA_FORBIDDEN = "DATA_FORBIDDEN",
12
+ DATA_NOT_FOUND = "DATA_NOT_FOUND",
13
+ DATA_SERVER_ERROR = "DATA_SERVER_ERROR",
14
+ DATA_PARSE_ERROR = "DATA_PARSE_ERROR",
15
+ VALIDATION_FAILED = "VALIDATION_FAILED",
16
+ VALIDATION_REQUIRED_FIELD = "VALIDATION_REQUIRED_FIELD",
17
+ VALIDATION_INVALID_TYPE = "VALIDATION_INVALID_TYPE",
18
+ VALIDATION_OUT_OF_RANGE = "VALIDATION_OUT_OF_RANGE",
19
+ VALIDATION_INVALID_FORMAT = "VALIDATION_INVALID_FORMAT",
20
+ VALIDATION_DUPLICATE_VALUE = "VALIDATION_DUPLICATE_VALUE",
21
+ CONFIG_INVALID_COLUMN = "CONFIG_INVALID_COLUMN",
22
+ CONFIG_INVALID_DATASOURCE = "CONFIG_INVALID_DATASOURCE",
23
+ CONFIG_MISSING_KEY_FIELD = "CONFIG_MISSING_KEY_FIELD",
24
+ CONFIG_INVALID_PROPS = "CONFIG_INVALID_PROPS",
25
+ CONFIG_MISSING_REQUIRED = "CONFIG_MISSING_REQUIRED",
26
+ OP_EDIT_FAILED = "OP_EDIT_FAILED",
27
+ OP_DELETE_FAILED = "OP_DELETE_FAILED",
28
+ OP_INSERT_FAILED = "OP_INSERT_FAILED",
29
+ OP_EXPORT_FAILED = "OP_EXPORT_FAILED",
30
+ OP_SORT_FAILED = "OP_SORT_FAILED",
31
+ OP_FILTER_FAILED = "OP_FILTER_FAILED",
32
+ OP_GROUP_FAILED = "OP_GROUP_FAILED",
33
+ OP_SEARCH_FAILED = "OP_SEARCH_FAILED",
34
+ OP_SELECTION_FAILED = "OP_SELECTION_FAILED",
35
+ STATE_SAVE_FAILED = "STATE_SAVE_FAILED",
36
+ STATE_LOAD_FAILED = "STATE_LOAD_FAILED",
37
+ STATE_INVALID = "STATE_INVALID",
38
+ STATE_VERSION_MISMATCH = "STATE_VERSION_MISMATCH",
39
+ STATE_CORRUPTED = "STATE_CORRUPTED",
40
+ PERMISSION_DENIED = "PERMISSION_DENIED",
41
+ PERMISSION_READ_ONLY = "PERMISSION_READ_ONLY",
42
+ PERMISSION_INSUFFICIENT = "PERMISSION_INSUFFICIENT",
43
+ UNKNOWN_ERROR = "UNKNOWN_ERROR",
44
+ NOT_IMPLEMENTED = "NOT_IMPLEMENTED",
45
+ DEPRECATED = "DEPRECATED"
46
+ }
47
+ export declare enum ErrorSeverity {
48
+ Info = "info",
49
+ Warning = "warning",
50
+ Error = "error",
51
+ Critical = "critical"
52
+ }
53
+ export declare class GridError extends Error {
54
+ code: GridErrorCode;
55
+ severity: ErrorSeverity;
56
+ details?: any;
57
+ timestamp: Date;
58
+ recoverable: boolean;
59
+ userMessage?: string;
60
+ technicalMessage?: string;
61
+ stackTrace?: string;
62
+ context?: Record<string, any>;
63
+ constructor(code: GridErrorCode, message: string, options?: {
64
+ severity?: ErrorSeverity;
65
+ details?: any;
66
+ recoverable?: boolean;
67
+ userMessage?: string;
68
+ context?: Record<string, any>;
69
+ });
70
+ private inferSeverity;
71
+ private isRecoverable;
72
+ private generateUserMessage;
73
+ toJSON(): {
74
+ name: string;
75
+ code: GridErrorCode;
76
+ severity: ErrorSeverity;
77
+ message: string;
78
+ userMessage: string | undefined;
79
+ technicalMessage: string | undefined;
80
+ details: any;
81
+ timestamp: string;
82
+ recoverable: boolean;
83
+ context: Record<string, any> | undefined;
84
+ stack: string | undefined;
85
+ };
86
+ toString(): string;
87
+ }
88
+ export declare class GridErrorHandler {
89
+ private handlers;
90
+ private globalHandlers;
91
+ private errorLog;
92
+ private maxLogSize;
93
+ private enabled;
94
+ private reportToConsole;
95
+ on(code: GridErrorCode, handler: (error: GridError) => void): () => void;
96
+ onAny(handler: (error: GridError) => void): () => void;
97
+ onSeverity(severity: ErrorSeverity, handler: (error: GridError) => void): () => void;
98
+ handle(error: GridError | Error | unknown): void;
99
+ private normalizeError;
100
+ private inferErrorCode;
101
+ private consoleOutput;
102
+ private getConsoleStyle;
103
+ private logError;
104
+ getLog(options?: {
105
+ severity?: ErrorSeverity;
106
+ code?: GridErrorCode;
107
+ limit?: number;
108
+ since?: Date;
109
+ }): GridError[];
110
+ clearLog(): void;
111
+ getLastError(): GridError | undefined;
112
+ getErrorCount(code?: GridErrorCode): number;
113
+ enable(): void;
114
+ disable(): void;
115
+ setMaxLogSize(size: number): void;
116
+ setReportToConsole(report: boolean): void;
117
+ clear(): void;
118
+ exportLog(): string;
119
+ }
120
+ /**
121
+ * Wrap async operation with error handling
122
+ */
123
+ export declare function tryAsync<T>(operation: () => Promise<T>, errorCode: GridErrorCode, errorMessage?: string, options?: {
124
+ recoverable?: boolean;
125
+ context?: Record<string, any>;
126
+ }): Promise<{
127
+ success: true;
128
+ data: T;
129
+ } | {
130
+ success: false;
131
+ error: GridError;
132
+ }>;
133
+ /**
134
+ * Wrap sync operation with error handling
135
+ */
136
+ export declare function trySync<T>(operation: () => T, errorCode: GridErrorCode, errorMessage?: string, options?: {
137
+ recoverable?: boolean;
138
+ context?: Record<string, any>;
139
+ }): {
140
+ success: true;
141
+ data: T;
142
+ } | {
143
+ success: false;
144
+ error: GridError;
145
+ };
146
+ /**
147
+ * Validate and throw
148
+ */
149
+ export declare function validateOrThrow(condition: boolean, code: GridErrorCode, message: string, details?: any): asserts condition;
150
+ /**
151
+ * Assert not null
152
+ */
153
+ export declare function assertNotNull<T>(value: T | null | undefined, code: GridErrorCode, message: string): asserts value is T;
154
+ export declare function createDataLoadError(message: string, details?: any): GridError;
155
+ export declare function createValidationError(message: string, field?: string, value?: any): GridError;
156
+ export declare function createConfigError(message: string, details?: any): GridError;
157
+ export declare function createOperationError(operation: string, message: string, details?: any): GridError;
158
+ export declare function createNetworkError(statusCode: number, statusText: string, details?: any): GridError;
159
+ export interface RecoveryStrategy {
160
+ canRecover(error: GridError): boolean;
161
+ recover(error: GridError): Promise<void>;
162
+ }
163
+ export declare class RetryStrategy implements RecoveryStrategy {
164
+ private maxRetries;
165
+ private delayMs;
166
+ private backoffMultiplier;
167
+ constructor(maxRetries?: number, delayMs?: number, backoffMultiplier?: number);
168
+ canRecover(error: GridError): boolean;
169
+ recover(error: GridError): Promise<void>;
170
+ }
171
+ export declare class FallbackStrategy implements RecoveryStrategy {
172
+ private fallbackData;
173
+ constructor(fallbackData?: any[]);
174
+ canRecover(error: GridError): boolean;
175
+ recover(error: GridError): Promise<void>;
176
+ }
177
+ export declare class CacheStrategy implements RecoveryStrategy {
178
+ private cache;
179
+ constructor(cache?: Map<string, any>);
180
+ canRecover(error: GridError): boolean;
181
+ recover(error: GridError): Promise<void>;
182
+ }
183
+ export declare const globalErrorHandler: GridErrorHandler;
184
+ export declare class ErrorBoundary {
185
+ private strategies;
186
+ addStrategy(strategy: RecoveryStrategy): void;
187
+ handleError(error: GridError): Promise<boolean>;
188
+ }
189
+ export declare const defaultErrorBoundary: ErrorBoundary;
190
+ //# sourceMappingURL=error-handling.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-handling.d.ts","sourceRoot":"","sources":["../../src/utils/error-handling.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,oBAAY,aAAa;IAEvB,gBAAgB,qBAAqB;IACrC,mBAAmB,wBAAwB;IAC3C,kBAAkB,uBAAuB;IACzC,YAAY,iBAAiB;IAC7B,iBAAiB,sBAAsB;IACvC,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,iBAAiB,sBAAsB;IACvC,gBAAgB,qBAAqB;IAGrC,iBAAiB,sBAAsB;IACvC,yBAAyB,8BAA8B;IACvD,uBAAuB,4BAA4B;IACnD,uBAAuB,4BAA4B;IACnD,yBAAyB,8BAA8B;IACvD,0BAA0B,+BAA+B;IAGzD,qBAAqB,0BAA0B;IAC/C,yBAAyB,8BAA8B;IACvD,wBAAwB,6BAA6B;IACrD,oBAAoB,yBAAyB;IAC7C,uBAAuB,4BAA4B;IAGnD,cAAc,mBAAmB;IACjC,gBAAgB,qBAAqB;IACrC,gBAAgB,qBAAqB;IACrC,gBAAgB,qBAAqB;IACrC,cAAc,mBAAmB;IACjC,gBAAgB,qBAAqB;IACrC,eAAe,oBAAoB;IACnC,gBAAgB,qBAAqB;IACrC,mBAAmB,wBAAwB;IAG3C,iBAAiB,sBAAsB;IACvC,iBAAiB,sBAAsB;IACvC,aAAa,kBAAkB;IAC/B,sBAAsB,2BAA2B;IACjD,eAAe,oBAAoB;IAGnC,iBAAiB,sBAAsB;IACvC,oBAAoB,yBAAyB;IAC7C,uBAAuB,4BAA4B;IAGnD,aAAa,kBAAkB;IAC/B,eAAe,oBAAoB;IACnC,U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BAAgB,GAAG,IAAI;IAIvC,WAAW,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC;CAatD;AAGD,eAAO,MAAM,oBAAoB,eAAsB,CAAA"}
@@ -0,0 +1,37 @@
1
+ import { ColumnDefinition, ExportConfig, ExportFormat } from '../types';
2
+
3
+ export interface EnhancedExportResult {
4
+ success: boolean;
5
+ blob?: Blob;
6
+ url?: string;
7
+ fileName?: string;
8
+ error?: string;
9
+ duration?: number;
10
+ rowCount?: number;
11
+ columnCount?: number;
12
+ byteSize?: number;
13
+ metadata?: {
14
+ exportedAt: string;
15
+ format: ExportFormat;
16
+ rowCount: number;
17
+ columnCount: number;
18
+ compressedSize?: number;
19
+ };
20
+ }
21
+ export declare const exportToCSV: (data: any[], columns: ColumnDefinition[], config: ExportConfig) => Promise<EnhancedExportResult>;
22
+ export declare const exportToExcel: (data: any[], columns: ColumnDefinition[], config: ExportConfig) => Promise<EnhancedExportResult>;
23
+ export declare const exportToPDF: (data: any[], columns: ColumnDefinition[], config: ExportConfig) => Promise<EnhancedExportResult>;
24
+ export declare const exportToJSON: (data: any[], columns: ColumnDefinition[], config: ExportConfig) => Promise<EnhancedExportResult>;
25
+ export declare const exportToXML: (data: any[], columns: ColumnDefinition[], config: ExportConfig) => Promise<EnhancedExportResult>;
26
+ export declare const exportToHTML: (data: any[], columns: ColumnDefinition[], config: ExportConfig) => Promise<EnhancedExportResult>;
27
+ export declare const exportGridData: (data: any[], columns: ColumnDefinition[], config: ExportConfig) => Promise<EnhancedExportResult>;
28
+ export declare class ExportManager {
29
+ private queue;
30
+ private processing;
31
+ add(data: any[], columns: ColumnDefinition[], config: ExportConfig): Promise<EnhancedExportResult>;
32
+ private processQueue;
33
+ clear(): void;
34
+ size(): number;
35
+ }
36
+ export declare const globalExportManager: ExportManager;
37
+ //# sourceMappingURL=export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/utils/export.ts"],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E,EACX,SAAS,gBAAgB,EAAE,EAC3B,QAAQ,YAAY,KACnB,OAAO,CAAC,oBAAoB,CAyE9B,CAAA;AAGD,eAAO,MAAM,YAAY,GACvB,MAAM,GAAG,EAAE,EACX,SAAS,gBAAgB,EAAE,EAC3B,QAAQ,YAAY,KACnB,OAAO,CAAC,oBAAoB,CAmG9B,CAAA;AAGD,eAAO,MAAM,cAAc,GACzB,MAAM,GAAG,EAAE,EACX,SAAS,gBAAgB,EAAE,EAC3B,QAAQ,YAAY,KACnB,OAAO,CAAC,oBAAoB,CA2D9B,CAAA;AAsED,qBAAa,aAAa;IACxB,OAAO,CAAC,KAAK,CAAiD;IAC9D,OAAO,CAAC,UAAU,CAAQ;IAEpB,GAAG,CACP,IAAI,EAAE,GAAG,EAAE,EACX,OAAO,EAAE,gBAAgB,EAAE,EAC3B,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,oBAAoB,CAAC;YAiBlB,YAAY;IAmB1B,KAAK,IAAI,IAAI;IAIb,IAAI,IAAI,MAAM;CAGf;AAED,eAAO,MAAM,mBAAmB,eAAsB,CAAA"}
@@ -0,0 +1,60 @@
1
+ import { ColumnDefinition } from '../types/core/column';
2
+
3
+ export interface FormatOptions {
4
+ locale?: string;
5
+ currency?: string;
6
+ dateStyle?: 'short' | 'medium' | 'long' | 'full';
7
+ timeStyle?: 'short' | 'medium' | 'long' | 'full';
8
+ decimals?: number;
9
+ highlightNegative?: boolean;
10
+ nullDisplay?: string;
11
+ format?: 'datetime' | 'short' | 'medium' | 'long' | 'full';
12
+ useGrouping?: boolean;
13
+ minimumFractionDigits?: number;
14
+ maximumFractionDigits?: number;
15
+ timeZone?: string;
16
+ }
17
+ export declare const formatCurrency: (value: number | string, options?: FormatOptions & {
18
+ currency?: string;
19
+ }) => string;
20
+ export declare const formatPercent: (value: number | string, options?: FormatOptions & {
21
+ decimals?: number;
22
+ multiplier?: number;
23
+ }) => string;
24
+ export declare const formatNumber: (value: number | string, options?: FormatOptions & {
25
+ decimals?: number;
26
+ }) => string;
27
+ export declare const formatDate: (value: any, options?: FormatOptions) => string;
28
+ export declare const formatDateTime: (value: any, options?: FormatOptions) => string;
29
+ export declare const formatTime: (value: any, options?: FormatOptions) => string;
30
+ export declare const formatBoolean: (value: boolean | string | number, options?: {
31
+ trueText?: string;
32
+ falseText?: string;
33
+ nullText?: string;
34
+ }) => string;
35
+ export declare const formatBytes: (bytes: number | string, decimals?: number) => string;
36
+ export declare const formatPhone: (value: string | number, format?: "US" | "international") => string;
37
+ export declare const formatSSN: (value: string | number) => string;
38
+ export declare const formatCreditCard: (value: string | number) => string;
39
+ export declare const formatLookup: (value: any, lookupData: any[], keyField: string, displayField: string) => string;
40
+ export declare const formatArray: (value: any[], options?: {
41
+ separator?: string;
42
+ maxItems?: number;
43
+ moreText?: string;
44
+ }) => string;
45
+ export declare const formatDuration: (milliseconds: number, options?: {
46
+ format?: "long" | "short" | "compact";
47
+ maxUnits?: number;
48
+ }) => string;
49
+ export declare const formatRelativeTime: (date: Date | string | number, baseDate?: Date) => string;
50
+ export declare const formatOrdinal: (n: number) => string;
51
+ export declare function formatValue(value: any, row: any, column: ColumnDefinition, options?: FormatOptions): string;
52
+ export declare const formatRowValues: (row: any, columns: ColumnDefinition[], options?: FormatOptions) => Record<string, string>;
53
+ export declare const safeFormatValue: (value: any, row: any, column: ColumnDefinition, options?: FormatOptions) => string;
54
+ export declare const clearFormatterCache: () => void;
55
+ export declare const getFormatterCacheSize: () => number;
56
+ export declare const customFormatters: Map<string, (value: any, options?: any) => string>;
57
+ export declare const registerFormatter: (name: string, formatter: (value: any, options?: any) => string) => void;
58
+ export declare const getFormatter: (name: string) => ((value: any, options?: any) => string) | undefined;
59
+ export declare const hasFormatter: (name: string) => boolean;
60
+ //# sourceMappingURL=formatters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../src/utils/formatters.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,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5B,WAAU,IAAiB,KAC1B,MAgCF,CAAA;AAGD,eAAO,MAAM,aAAa,GAAI,GAAG,MAAM,KAAG,MAIzC,CAAA;AAWD,wBAAgB,WAAW,CACzB,KAAK,EAAE,GAAG,EACV,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,gBAAgB,EACxB,OAAO,GAAE,aAAkB,GAC1B,MAAM,CAgDR;AAGD,eAAO,MAAM,eAAe,GAC1B,KAAK,GAAG,EACR,SAAS,gBAAgB,EAAE,EAC3B,UAAS,aAAkB,KAC1B,MAAM,CAAC,MAAM,EAAE,MAAM,CAMvB,CAAA;AAGD,eAAO,MAAM,eAAe,GAC1B,OAAO,GAAG,EACV,KAAK,GAAG,EACR,QAAQ,gBAAgB,EACxB,UAAS,aAAkB,KAC1B,MAOF,CAAA;AAGD,eAAO,MAAM,mBAAmB,YAE/B,CAAA;AAGD,eAAO,MAAM,qBAAqB,QAAO,MAExC,CAAA;AAGD,eAAO,MAAM,gBAAgB,sBAA2B,GAAG,YAAY,GAAG,KAAK,MAAM,CAAG,CAAA;AAExF,eAAO,MAAM,iBAAiB,GAC5B,MAAM,MAAM,EACZ,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,MAAM,SAGjD,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,cATe,GAAG,YAAY,GAAG,KAAK,MAAM,aAWpF,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,KAAG,OAE3C,CAAA"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @fileoverview Utils barrel export
3
+ * @module utils
4
+ */
5
+ export * from './validators';
6
+ export * from './formatters';
7
+ export * from './odata';
8
+ export * from './export';
9
+ export * from './performance';
10
+ export * from './error-handling';
11
+ export * from './column-searcher';
12
+ export * from './dom';
13
+ export * from './date';
14
+ export * from './array';
15
+ export * from './string';
16
+ export * from './clipboard';
17
+ export * from './keyboard';
18
+ export * from './cache';
19
+ export * from './constants';
20
+ export * from './logger';
21
+ export * from './number';
22
+ export * from './object';
23
+ export * from './storage';
24
+ export * from './accessibility';
25
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AAGjC,cAAc,OAAO,CAAA;AACrB,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * @fileoverview Keyboard utilities
3
+ * @module utils/keyboard
4
+ */
5
+ export interface KeyboardEventInfo {
6
+ key: string;
7
+ code: string;
8
+ ctrlKey: boolean;
9
+ shiftKey: boolean;
10
+ altKey: boolean;
11
+ metaKey: boolean;
12
+ isModifierKey: boolean;
13
+ isNavigationKey: boolean;
14
+ isEditingKey: boolean;
15
+ }
16
+ /**
17
+ * Parse keyboard event
18
+ */
19
+ export declare function parseKeyboardEvent(event: KeyboardEvent): KeyboardEventInfo;
20
+ /**
21
+ * Check if key is modifier
22
+ */
23
+ export declare function isModifierKey(key: string): boolean;
24
+ /**
25
+ * Check if key is navigation
26
+ */
27
+ export declare function isNavigationKey(key: string): boolean;
28
+ /**
29
+ * Check if key is editing
30
+ */
31
+ export declare function isEditingKey(key: string): boolean;
32
+ /**
33
+ * Check if key combination matches
34
+ */
35
+ export declare function matchesKeyCombo(event: KeyboardEvent, key: string, modifiers?: {
36
+ ctrl?: boolean;
37
+ shift?: boolean;
38
+ alt?: boolean;
39
+ meta?: boolean;
40
+ }): boolean;
41
+ /**
42
+ * Get keyboard shortcut string
43
+ */
44
+ export declare function getShortcutString(key: string, modifiers?: {
45
+ ctrl?: boolean;
46
+ shift?: boolean;
47
+ alt?: boolean;
48
+ meta?: boolean;
49
+ }): string;
50
+ /**
51
+ * Prevent default key behavior
52
+ */
53
+ export declare function preventDefaultKeys(event: KeyboardEvent, keys: string[]): boolean;
54
+ /**
55
+ * Create keyboard event handler
56
+ */
57
+ export declare function createKeyHandler(handlers: Record<string, (event: KeyboardEvent) => void>): (event: KeyboardEvent) => void;
58
+ //# sourceMappingURL=keyboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../src/utils/keyboard.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,OAAO,CAAA;IAChB,aAAa,EAAE,OAAO,CAAA;IACtB,eAAe,EAAE,OAAO,CAAA;IACxB,YAAY,EAAE,OAAO,CAAA;CACtB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa,GAAG,iBAAiB,CAY1E;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAElD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAKpD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,aAAa,EACpB,GAAG,EAAE,MAAM,EACX,SAAS,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,GAC7E,OAAO,CAWT;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,MAAM,EACX,SAAS,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,GAC7E,MAAM,CAWR;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,aAAa,EACpB,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAMT;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC,GACvD,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAShC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @fileoverview Logging utilities
3
+ * @module utils/logger
4
+ */
5
+ export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
6
+ export interface LogOptions {
7
+ level?: LogLevel;
8
+ prefix?: string;
9
+ timestamp?: boolean;
10
+ enabled?: boolean;
11
+ }
12
+ export interface LogEntry {
13
+ level: LogLevel;
14
+ message: string;
15
+ data?: any;
16
+ timestamp: Date;
17
+ prefix?: string;
18
+ }
19
+ /**
20
+ * Logger class
21
+ */
22
+ export declare class Logger {
23
+ private options;
24
+ private logs;
25
+ private maxLogs;
26
+ constructor(options?: LogOptions);
27
+ private shouldLog;
28
+ private formatMessage;
29
+ private log;
30
+ debug(message: string, data?: any): void;
31
+ info(message: string, data?: any): void;
32
+ warn(message: string, data?: any): void;
33
+ error(message: string, data?: any): void;
34
+ getLogs(): LogEntry[];
35
+ clearLogs(): void;
36
+ setLevel(level: LogLevel): void;
37
+ enable(): void;
38
+ disable(): void;
39
+ }
40
+ export declare const logger: Logger;
41
+ /**
42
+ * Create logger with prefix
43
+ */
44
+ export declare function createLogger(prefix: string, options?: LogOptions): Logger;
45
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;AAE1D,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,QAAQ,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,QAAQ,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,GAAG,CAAA;IACV,SAAS,EAAE,IAAI,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,qBAAa,MAAM;IACjB,OAAO,CAAC,OAAO,CAAsB;IACrC,OAAO,CAAC,IAAI,CAAiB;IAC7B,OAAO,CAAC,OAAO,CAAe;gBAElB,OAAO,GAAE,UAAe;IAUpC,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,aAAa;IAkBrB,OAAO,CAAC,GAAG;IAoCX,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI;IAIxC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI;IAIvC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI;IAIvC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI;IAIxC,OAAO,IAAI,QAAQ,EAAE;IAIrB,SAAS,IAAI,IAAI;IAIjB,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAI/B,MAAM,IAAI,IAAI;IAId,OAAO,IAAI,IAAI;CAGhB;AAGD,eAAO,MAAM,MAAM,QAGjB,CAAA;AAEF;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,MAAM,CAEzE"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * @fileoverview Number utilities
3
+ * @module utils/number
4
+ */
5
+ /**
6
+ * Clamp number between min and max
7
+ */
8
+ export declare function clamp(value: number, min: number, max: number): number;
9
+ /**
10
+ * Round to decimal places
11
+ */
12
+ export declare function round(value: number, decimals?: number): number;
13
+ /**
14
+ * Format as currency
15
+ */
16
+ export declare function formatCurrencyString(value: number, currency?: string, locale?: string): string;
17
+ /**
18
+ * Parse number from string
19
+ */
20
+ export declare function parseNumber(value: string): number | null;
21
+ /**
22
+ * Check if value is number
23
+ */
24
+ export declare function isNumber(value: any): value is number;
25
+ /**
26
+ * Check if value is integer
27
+ */
28
+ export declare function isInteger(value: any): boolean;
29
+ /**
30
+ * Random number between min and max
31
+ */
32
+ export declare function random(min: number, max: number, decimals?: number): number;
33
+ /**
34
+ * Calculate percentage
35
+ */
36
+ export declare function percentage(value: number, total: number): number;
37
+ /**
38
+ * Calculate average
39
+ */
40
+ export declare function average(numbers: number[]): number;
41
+ /**
42
+ * Calculate median
43
+ */
44
+ export declare function median(numbers: number[]): number;
45
+ /**
46
+ * Calculate standard deviation
47
+ */
48
+ export declare function standardDeviation(numbers: number[]): number;
49
+ /**
50
+ * Calculate sum
51
+ */
52
+ export declare function sum(numbers: number[]): number;
53
+ /**
54
+ * Linear interpolation
55
+ */
56
+ export declare function lerp(start: number, end: number, t: number): number;
57
+ /**
58
+ * Map value from one range to another
59
+ */
60
+ export declare function mapRange(value: number, inMin: number, inMax: number, outMin: number, outMax: number): number;
61
+ /**
62
+ * Check if number is in range
63
+ */
64
+ export declare function inRange(value: number, min: number, max: number, inclusive?: boolean): boolean;
65
+ /**
66
+ * Convert to ordinal (1st, 2nd, 3rd, etc.)
67
+ */
68
+ export declare function toOrdinal(n: number): string;
69
+ /**
70
+ * Format file size
71
+ */
72
+ export declare function formatFileSize(bytes: number, decimals?: number): string;
73
+ /**
74
+ * Calculate compound interest
75
+ */
76
+ export declare function compoundInterest(principal: number, rate: number, years: number, timesCompounded?: number): number;
77
+ //# sourceMappingURL=number.d.ts.map