@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,134 @@
|
|
|
1
|
+
import { ValidationSeverity, ValidationResult } from '../core/base';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Validation rule type
|
|
5
|
+
*/
|
|
6
|
+
export declare const enum ValidationRuleType {
|
|
7
|
+
Required = "required",
|
|
8
|
+
Email = "email",
|
|
9
|
+
Numeric = "numeric",
|
|
10
|
+
Range = "range",
|
|
11
|
+
StringLength = "stringLength",
|
|
12
|
+
Pattern = "pattern",
|
|
13
|
+
Compare = "compare",
|
|
14
|
+
Custom = "custom"
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Base validation rule
|
|
18
|
+
*/
|
|
19
|
+
export interface BaseValidationRule {
|
|
20
|
+
/** Rule type */
|
|
21
|
+
type: ValidationRuleType;
|
|
22
|
+
/** Error message */
|
|
23
|
+
message?: string;
|
|
24
|
+
/** Severity */
|
|
25
|
+
severity?: ValidationSeverity;
|
|
26
|
+
/** Ignore empty values */
|
|
27
|
+
ignoreEmptyValue?: boolean;
|
|
28
|
+
/** Enabled */
|
|
29
|
+
enabled?: boolean | ((value: any, row: any) => boolean);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Required validation rule
|
|
33
|
+
*/
|
|
34
|
+
export interface RequiredRule extends BaseValidationRule {
|
|
35
|
+
type: ValidationRuleType.Required;
|
|
36
|
+
/** Trim whitespace */
|
|
37
|
+
trim?: boolean;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Email validation rule
|
|
41
|
+
*/
|
|
42
|
+
export interface EmailRule extends BaseValidationRule {
|
|
43
|
+
type: ValidationRuleType.Email;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Numeric validation rule
|
|
47
|
+
*/
|
|
48
|
+
export interface NumericRule extends BaseValidationRule {
|
|
49
|
+
type: ValidationRuleType.Numeric;
|
|
50
|
+
/** Allow decimal */
|
|
51
|
+
allowDecimal?: boolean;
|
|
52
|
+
/** Allow negative */
|
|
53
|
+
allowNegative?: boolean;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Range validation rule
|
|
57
|
+
*/
|
|
58
|
+
export interface RangeRule extends BaseValidationRule {
|
|
59
|
+
type: ValidationRuleType.Range;
|
|
60
|
+
/** Minimum value */
|
|
61
|
+
min?: number;
|
|
62
|
+
/** Maximum value */
|
|
63
|
+
max?: number;
|
|
64
|
+
/** Inclusive */
|
|
65
|
+
inclusive?: boolean;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* String length validation rule
|
|
69
|
+
*/
|
|
70
|
+
export interface StringLengthRule extends BaseValidationRule {
|
|
71
|
+
type: ValidationRuleType.StringLength;
|
|
72
|
+
/** Minimum length */
|
|
73
|
+
min?: number;
|
|
74
|
+
/** Maximum length */
|
|
75
|
+
max?: number;
|
|
76
|
+
/** Trim before check */
|
|
77
|
+
trim?: boolean;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Pattern validation rule
|
|
81
|
+
*/
|
|
82
|
+
export interface PatternRule extends BaseValidationRule {
|
|
83
|
+
type: ValidationRuleType.Pattern;
|
|
84
|
+
/** Pattern (RegExp or string) */
|
|
85
|
+
pattern: RegExp | string;
|
|
86
|
+
/** Flags */
|
|
87
|
+
flags?: string;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Compare validation rule
|
|
91
|
+
*/
|
|
92
|
+
export interface CompareRule extends BaseValidationRule {
|
|
93
|
+
type: ValidationRuleType.Compare;
|
|
94
|
+
/** Comparison type */
|
|
95
|
+
comparisonType: 'equals' | 'notEquals' | 'greaterThan' | 'lessThan' | 'greaterThanOrEqual' | 'lessThanOrEqual';
|
|
96
|
+
/** Comparison value or field */
|
|
97
|
+
comparisonValue?: any;
|
|
98
|
+
/** Comparison field */
|
|
99
|
+
comparisonField?: string;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Custom validation rule
|
|
103
|
+
*/
|
|
104
|
+
export interface CustomRule extends BaseValidationRule {
|
|
105
|
+
type: ValidationRuleType.Custom;
|
|
106
|
+
/** Validator function */
|
|
107
|
+
validator: (value: any, row: any) => boolean | string | Promise<boolean | string>;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Validation rule union
|
|
111
|
+
*/
|
|
112
|
+
export type ValidationRule = RequiredRule | EmailRule | NumericRule | RangeRule | StringLengthRule | PatternRule | CompareRule | CustomRule;
|
|
113
|
+
/**
|
|
114
|
+
* Validator interface
|
|
115
|
+
*/
|
|
116
|
+
export interface IValidator {
|
|
117
|
+
/** Validate value */
|
|
118
|
+
validate(value: any, row: any): ValidationResult | Promise<ValidationResult>;
|
|
119
|
+
/** Validation rules */
|
|
120
|
+
rules: ValidationRule[];
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Async validator
|
|
124
|
+
*/
|
|
125
|
+
export type AsyncValidator = (value: any, row: any) => Promise<boolean | string>;
|
|
126
|
+
/**
|
|
127
|
+
* Sync validator
|
|
128
|
+
*/
|
|
129
|
+
export type SyncValidator = (value: any, row: any) => boolean | string;
|
|
130
|
+
/**
|
|
131
|
+
* Validator function
|
|
132
|
+
*/
|
|
133
|
+
export type Validator = SyncValidator | AsyncValidator;
|
|
134
|
+
//# sourceMappingURL=validators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../src/types/validation/validators.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAExE;;GAEG;AACH,0BAAkB,kBAAkB;IAClC,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,YAAY,iBAAiB;IAC7B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,gBAAgB;IAChB,IAAI,EAAE,kBAAkB,CAAA;IAExB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,eAAe;IACf,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAE7B,0BAA0B;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAE1B,cAAc;IACd,OAAO,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC,CAAA;CACxD;AAED;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,kBAAkB;IACtD,IAAI,EAAE,kBAAkB,CAAC,QAAQ,CAAA;IAEjC,sBAAsB;IACtB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,kBAAkB;IACnD,IAAI,EAAE,kBAAkB,CAAC,KAAK,CAAA;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,IAAI,EAAE,kBAAkB,CAAC,OAAO,CAAA;IAE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AA;IAE/B,yBAAyB;IACzB,SAAS,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAAA;CAClF;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,YAAY,GACZ,SAAS,GACT,WAAW,GACX,SAAS,GACT,gBAAgB,GAChB,WAAW,GACX,WAAW,GACX,UAAU,CAAA;AAEd;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,qBAAqB;IACrB,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAE5E,uBAAuB;IACvB,KAAK,EAAE,cAAc,EAAE,CAAA;CACxB;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAAA;AAEhF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,GAAG,MAAM,CAAA;AAEtE;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,cAAc,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { AriaAttributes } from '../types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Generate ARIA attributes for grid
|
|
5
|
+
*/
|
|
6
|
+
export declare function getGridAriaAttributes(totalRows: number, totalColumns: number): AriaAttributes;
|
|
7
|
+
/**
|
|
8
|
+
* Generate ARIA attributes for row
|
|
9
|
+
*/
|
|
10
|
+
export declare function getRowAriaAttributes(rowIndex: number, isSelected: boolean, isExpanded?: boolean): AriaAttributes;
|
|
11
|
+
/**
|
|
12
|
+
* Generate ARIA attributes for cell
|
|
13
|
+
*/
|
|
14
|
+
export declare function getCellAriaAttributes(rowIndex: number, columnIndex: number, isEditing?: boolean): AriaAttributes;
|
|
15
|
+
/**
|
|
16
|
+
* Generate ARIA attributes for column header
|
|
17
|
+
*/
|
|
18
|
+
export declare function getColumnHeaderAriaAttributes(columnIndex: number, sortDirection?: 'ascending' | 'descending' | 'none'): AriaAttributes;
|
|
19
|
+
/**
|
|
20
|
+
* Announce to screen reader
|
|
21
|
+
*/
|
|
22
|
+
export declare function announceToScreenReader(message: string, priority?: 'polite' | 'assertive'): void;
|
|
23
|
+
/**
|
|
24
|
+
* Add screen reader only class
|
|
25
|
+
*/
|
|
26
|
+
export declare function addSROnlyClass(): string;
|
|
27
|
+
/**
|
|
28
|
+
* Focus element with screen reader announcement
|
|
29
|
+
*/
|
|
30
|
+
export declare function focusWithAnnouncement(element: HTMLElement, announcement: string): void;
|
|
31
|
+
/**
|
|
32
|
+
* Get accessible label for action
|
|
33
|
+
*/
|
|
34
|
+
export declare function getActionLabel(action: string, context?: any): string;
|
|
35
|
+
//# sourceMappingURL=accessibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessibility.d.ts","sourceRoot":"","sources":["../../src/utils/accessibility.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAG9C;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,cAAc,CAO7F;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,OAAO,EACnB,UAAU,CAAC,EAAE,OAAO,GACnB,cAAc,CAOhB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,SAAS,GAAE,OAAe,GACzB,cAAc,CAOhB;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAC3C,WAAW,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,WAAW,GAAG,YAAY,GAAG,MAAM,GAClD,cAAc,CAMhB;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,QAAQ,GAAE,QAAQ,GAAG,WAAsB,GAC1C,IAAI,CAaN;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,EACpB,YAAY,EAAE,MAAM,GACnB,IAAI,CAGN;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,MAAM,CAapE"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Array manipulation utilities
|
|
3
|
+
* @module utils/array
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Group array by key
|
|
7
|
+
*/
|
|
8
|
+
export declare function groupBy<T>(array: T[], keyFn: (item: T) => string | number): Record<string, T[]>;
|
|
9
|
+
/**
|
|
10
|
+
* Unique array values
|
|
11
|
+
*/
|
|
12
|
+
export declare function uniqueArray<T>(array: T[], keyFn?: (item: T) => any): T[];
|
|
13
|
+
/**
|
|
14
|
+
* Flatten nested array
|
|
15
|
+
*/
|
|
16
|
+
export declare function flatten<T>(array: any[], depth?: number): T[];
|
|
17
|
+
/**
|
|
18
|
+
* Chunk array into smaller arrays
|
|
19
|
+
*/
|
|
20
|
+
export declare function chunk<T>(array: T[], size: number): T[][];
|
|
21
|
+
/**
|
|
22
|
+
* Sort array by multiple keys
|
|
23
|
+
*/
|
|
24
|
+
export declare function sortBy<T>(array: T[], ...keys: ((item: T) => any)[]): T[];
|
|
25
|
+
/**
|
|
26
|
+
* Find duplicates in array
|
|
27
|
+
*/
|
|
28
|
+
export declare function findDuplicates<T>(array: T[], keyFn?: (item: T) => any): T[];
|
|
29
|
+
/**
|
|
30
|
+
* Difference between two arrays
|
|
31
|
+
*/
|
|
32
|
+
export declare function difference<T>(array1: T[], array2: T[]): T[];
|
|
33
|
+
/**
|
|
34
|
+
* Intersection of two arrays
|
|
35
|
+
*/
|
|
36
|
+
export declare function intersection<T>(array1: T[], array2: T[]): T[];
|
|
37
|
+
/**
|
|
38
|
+
* Union of two arrays
|
|
39
|
+
*/
|
|
40
|
+
export declare function union<T>(...arrays: T[][]): T[];
|
|
41
|
+
/**
|
|
42
|
+
* Move item in array
|
|
43
|
+
*/
|
|
44
|
+
export declare function move<T>(array: T[], fromIndex: number, toIndex: number): T[];
|
|
45
|
+
/**
|
|
46
|
+
* Shuffle array
|
|
47
|
+
*/
|
|
48
|
+
export declare function shuffle<T>(array: T[]): T[];
|
|
49
|
+
/**
|
|
50
|
+
* Sample random items from array
|
|
51
|
+
*/
|
|
52
|
+
export declare function sample<T>(array: T[], count?: number): T[];
|
|
53
|
+
/**
|
|
54
|
+
* Partition array by predicate
|
|
55
|
+
*/
|
|
56
|
+
export declare function partition<T>(array: T[], predicate: (item: T) => boolean): [T[], T[]];
|
|
57
|
+
/**
|
|
58
|
+
* Get array statistics
|
|
59
|
+
*/
|
|
60
|
+
export declare function stats(numbers: number[]): {
|
|
61
|
+
sum: number;
|
|
62
|
+
avg: number;
|
|
63
|
+
min: number;
|
|
64
|
+
max: number;
|
|
65
|
+
median: number;
|
|
66
|
+
count: number;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Range array
|
|
70
|
+
*/
|
|
71
|
+
export declare function arrayRange(start: number, end: number, step?: number): number[];
|
|
72
|
+
/**
|
|
73
|
+
* Take first n items
|
|
74
|
+
*/
|
|
75
|
+
export declare function take<T>(array: T[], count: number): T[];
|
|
76
|
+
/**
|
|
77
|
+
* Take last n items
|
|
78
|
+
*/
|
|
79
|
+
export declare function takeLast<T>(array: T[], count: number): T[];
|
|
80
|
+
/**
|
|
81
|
+
* Drop first n items
|
|
82
|
+
*/
|
|
83
|
+
export declare function drop<T>(array: T[], count: number): T[];
|
|
84
|
+
/**
|
|
85
|
+
* Drop last n items
|
|
86
|
+
*/
|
|
87
|
+
export declare function dropLast<T>(array: T[], count: number): T[];
|
|
88
|
+
//# sourceMappingURL=array.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/utils/array.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,wBAAgB,OAAO,CAAC,CAAC,EACvB,KAAK,EAAE,CAAC,EAAE,EACV,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,GAClC,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CASrB;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,GAAG,CAAC,EAAE,CAcxE;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,KAAK,GAAE,MAAiB,GAAG,CAAC,EAAE,CAWtE;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,EAAE,EAAE,CAQxD;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,CAAC,EACtB,KAAK,EAAE,CAAC,EAAE,EACV,GAAG,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,CAAC,EAAE,GAC5B,CAAC,EAAE,CAWL;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAC9B,KAAK,EAAE,CAAC,EAAE,EACV,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,GACvB,CAAC,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E,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,MAAU,GAAG,MAAM,EAAE,CAgBjF;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,EAAE,CAEtD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,EAAE,CAE1D;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,EAAE,CAEtD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,EAAE,CAE1D"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Caching utilities
|
|
3
|
+
* @module utils/cache
|
|
4
|
+
*/
|
|
5
|
+
export interface CacheOptions {
|
|
6
|
+
ttl?: number;
|
|
7
|
+
maxSize?: number;
|
|
8
|
+
onEvict?: (key: string, value: any) => void;
|
|
9
|
+
}
|
|
10
|
+
export interface CacheEntry<T> {
|
|
11
|
+
value: T;
|
|
12
|
+
timestamp: number;
|
|
13
|
+
ttl?: number;
|
|
14
|
+
hits: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* LRU Cache implementation
|
|
18
|
+
*/
|
|
19
|
+
export declare class LRUCache<T = any> {
|
|
20
|
+
private cache;
|
|
21
|
+
private accessOrder;
|
|
22
|
+
private options;
|
|
23
|
+
constructor(options?: CacheOptions);
|
|
24
|
+
/**
|
|
25
|
+
* Get value from cache
|
|
26
|
+
*/
|
|
27
|
+
get(key: string): T | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Set value in cache
|
|
30
|
+
*/
|
|
31
|
+
set(key: string, value: T, ttl?: number): void;
|
|
32
|
+
/**
|
|
33
|
+
* Check if key exists
|
|
34
|
+
*/
|
|
35
|
+
has(key: string): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Delete key
|
|
38
|
+
*/
|
|
39
|
+
delete(key: string): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Clear cache
|
|
42
|
+
*/
|
|
43
|
+
clear(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Get cache size
|
|
46
|
+
*/
|
|
47
|
+
size(): number;
|
|
48
|
+
/**
|
|
49
|
+
* Get all keys
|
|
50
|
+
*/
|
|
51
|
+
keys(): string[];
|
|
52
|
+
/**
|
|
53
|
+
* Get all values
|
|
54
|
+
*/
|
|
55
|
+
values(): T[];
|
|
56
|
+
/**
|
|
57
|
+
* Get cache statistics
|
|
58
|
+
*/
|
|
59
|
+
stats(): {
|
|
60
|
+
size: number;
|
|
61
|
+
maxSize: number;
|
|
62
|
+
hitRate: number;
|
|
63
|
+
entries: Array<{
|
|
64
|
+
key: string;
|
|
65
|
+
hits: number;
|
|
66
|
+
age: number;
|
|
67
|
+
}>;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Update access order (LRU)
|
|
71
|
+
*/
|
|
72
|
+
private updateAccessOrder;
|
|
73
|
+
/**
|
|
74
|
+
* Evict least recently used
|
|
75
|
+
*/
|
|
76
|
+
private evictLRU;
|
|
77
|
+
/**
|
|
78
|
+
* Cleanup expired entries
|
|
79
|
+
*/
|
|
80
|
+
cleanup(): void;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Create cache instance
|
|
84
|
+
*/
|
|
85
|
+
export declare function createCache<T = any>(options?: CacheOptions): LRUCache<T>;
|
|
86
|
+
/**
|
|
87
|
+
* Memoize function with cache
|
|
88
|
+
*/
|
|
89
|
+
export declare function catchMemoize<T extends (...args: any[]) => any>(fn: T, options?: CacheOptions & {
|
|
90
|
+
keyGenerator?: (...args: Parameters<T>) => string;
|
|
91
|
+
}): T;
|
|
92
|
+
//# sourceMappingURL=cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/utils/cache.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,CAAA;CAC5C;AAED,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,KAAK,EAAE,CAAC,CAAA;IACR,SAAS,EAAE,MAAM,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;GAEG;AACH,qBAAa,QAAQ,CAAC,CAAC,GAAG,GAAG;IAC3B,OAAO,CAAC,KAAK,CAAmC;IAChD,OAAO,CAAC,WAAW,CAAe;IAClC,OAAO,CAAC,OAAO,CAAwB;gBAE3B,OAAO,GAAE,YAAiB;IAStC;;OAEG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAqB/B;;OAEG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI;IAgB9C;;OAEG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAKzB;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAY5B;;OAEG;IACH,KAAK,IAAI,IAAI;IASb;;OAEG;IACH,IAAI,IAAI,MAAM;IAId;;OAEG;IACH,IAAI,IAAI,MAAM,EAAE;IAIhB;;OAEG;IACH,MAAM,IAAI,CAAC,EAAE;IAIb;;OAEG;IACH,KAAK,IAAI;QACP,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,EAAE,KAAK,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAC3D;IAkBD;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAKzB;;OAEG;IACH,OAAO,CAAC,QAAQ;IAOhB;;OAEG;IACH,OAAO,IAAI,IAAI;CAYhB;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,QAAQ,CAAC,CAAC,CAAC,CAExE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAC5D,EAAE,EAAE,CAAC,EACL,OAAO,CAAC,EAAE,YAAY,GAAG;IACvB,YAAY,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,MAAM,CAAA;CAClD,GACA,CAAC,CAgBH"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Clipboard utilities
|
|
3
|
+
* @module utils/clipboard
|
|
4
|
+
*/
|
|
5
|
+
export interface ClipboardOptions {
|
|
6
|
+
format?: 'text' | 'html' | 'both';
|
|
7
|
+
mimeType?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Copy text to clipboard
|
|
11
|
+
*/
|
|
12
|
+
export declare function copyToClipboard(text: string, options?: ClipboardOptions): Promise<boolean>;
|
|
13
|
+
/**
|
|
14
|
+
* Read text from clipboard
|
|
15
|
+
*/
|
|
16
|
+
export declare function readFromClipboard(): Promise<string | null>;
|
|
17
|
+
/**
|
|
18
|
+
* Check if clipboard API is supported
|
|
19
|
+
*/
|
|
20
|
+
export declare function isClipboardSupported(): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Copy HTML table to clipboard
|
|
23
|
+
*/
|
|
24
|
+
export declare function copyTableToClipboard(rows: any[][], headers?: string[]): Promise<boolean>;
|
|
25
|
+
//# sourceMappingURL=clipboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../src/utils/clipboard.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,OAAO,CAAC,CAuBlB;AAuBD;;GAEG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAUhE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,GAAG,EAAE,EAAE,EACb,OAAO,CAAC,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC,OAAO,CAAC,CAoBlB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ColumnDefinition } from '../types/core/column';
|
|
2
|
+
import { SearchConfig, SearchMatch, SearchResult } from '../types/features/searching';
|
|
3
|
+
|
|
4
|
+
export declare class ColumnSearcher {
|
|
5
|
+
private columns;
|
|
6
|
+
private config;
|
|
7
|
+
private cache;
|
|
8
|
+
private searchIndex;
|
|
9
|
+
constructor(columns: ColumnDefinition[], config?: Partial<SearchConfig>);
|
|
10
|
+
private buildSearchIndex;
|
|
11
|
+
private searchWithIndex;
|
|
12
|
+
search(data: any[], term: string, immediate?: boolean): SearchResult[];
|
|
13
|
+
private performSearch;
|
|
14
|
+
private calculateScore;
|
|
15
|
+
private findMatch;
|
|
16
|
+
private getRowKey;
|
|
17
|
+
getSearchableFields(): string[];
|
|
18
|
+
clearCache(): void;
|
|
19
|
+
getHighlightHTML(value: any, matches: SearchMatch[]): string;
|
|
20
|
+
searchWithFilters(data: any[], term: string, filters?: Record<string, any>): SearchResult[];
|
|
21
|
+
updateColumns(columns: ColumnDefinition[]): void;
|
|
22
|
+
getStats(): {
|
|
23
|
+
cacheSize: number;
|
|
24
|
+
searchableFields: number;
|
|
25
|
+
indexSize: number;
|
|
26
|
+
};
|
|
27
|
+
rebuildIndex(data: any[]): void;
|
|
28
|
+
}
|
|
29
|
+
export declare const createColumnSearcher: (columns: ColumnDefinition[], config?: Partial<SearchConfig>) => ColumnSearcher;
|
|
30
|
+
export declare const useColumnSearch: (columns: ColumnDefinition[], config?: Partial<SearchConfig>) => {
|
|
31
|
+
search: (data: any[], term: string, immediate?: boolean) => SearchResult[];
|
|
32
|
+
searchWithFilters: (data: any[], term: string, filters?: Record<string, any>) => SearchResult[];
|
|
33
|
+
clearCache: () => void;
|
|
34
|
+
getSearchableFields: () => string[];
|
|
35
|
+
getStats: () => {
|
|
36
|
+
cacheSize: number;
|
|
37
|
+
searchableFields: number;
|
|
38
|
+
indexSize: number;
|
|
39
|
+
};
|
|
40
|
+
highlight: (value: any, matches: SearchMatch[]) => string;
|
|
41
|
+
updateColumns: (columns: ColumnDefinition[]) => void;
|
|
42
|
+
rebuildIndex: (data: any[]) => void;
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=column-searcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"column-searcher.d.ts","sourceRoot":"","sources":["../../src/utils/column-searcher.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EAAc,KAAK,YAAY,EAAE,KAAK,WAAW,EA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AO,CAAC,YAAY,CAAC;mBA3QjB,GAAG,EAAE,QAAQ,MAAM,0BAAsB,YAAY,EAAE;8BAuN5D,GAAG,EAAE,QACL,MAAM,YACH,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC3B,YAAY,EAAE;sBAhCH,IAAI;+BAlBK,MAAM,EAAE;oBA2EnB;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE;uBAnDtD,GAAG,WAAW,WAAW,EAAE,KAAG,MAAM;6BA6CrC,gBAAgB,EAAE,KAAG,IAAI;yBAe7B,GAAG,EAAE,KAAG,IAAI;CA6BhC,CAAA"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Grid constants
|
|
3
|
+
* @module utils/constants
|
|
4
|
+
*/
|
|
5
|
+
export declare const GRID_CONSTANTS: {
|
|
6
|
+
readonly DEFAULT_ROW_HEIGHT: 40;
|
|
7
|
+
readonly DEFAULT_HEADER_HEIGHT: 48;
|
|
8
|
+
readonly DEFAULT_FOOTER_HEIGHT: 52;
|
|
9
|
+
readonly DEFAULT_PAGE_SIZE: 20;
|
|
10
|
+
readonly DEFAULT_COLUMN_WIDTH: 150;
|
|
11
|
+
readonly MIN_COLUMN_WIDTH: 50;
|
|
12
|
+
readonly MAX_COLUMN_WIDTH: 1000;
|
|
13
|
+
readonly DEFAULT_PAGE_SIZES: readonly [10, 20, 50, 100];
|
|
14
|
+
readonly MAX_VISIBLE_PAGES: 7;
|
|
15
|
+
readonly VIRTUAL_ROW_BUFFER: 5;
|
|
16
|
+
readonly VIRTUAL_COLUMN_BUFFER: 3;
|
|
17
|
+
readonly VIRTUAL_THRESHOLD: 50;
|
|
18
|
+
readonly DEBOUNCE_DELAY: 300;
|
|
19
|
+
readonly THROTTLE_DELAY: 16;
|
|
20
|
+
readonly SEARCH_MIN_LENGTH: 2;
|
|
21
|
+
readonly DEFAULT_CACHE_TTL: number;
|
|
22
|
+
readonly MAX_CACHE_SIZE: 100;
|
|
23
|
+
readonly LOADING_DELAY: 200;
|
|
24
|
+
readonly ANIMATION_DURATION: 200;
|
|
25
|
+
readonly SELECTION_CHECKBOX_WIDTH: 40;
|
|
26
|
+
readonly EXPORT_MAX_ROWS: 10000;
|
|
27
|
+
readonly ODATA_MAX_PAGE_SIZE: 1000;
|
|
28
|
+
readonly COLORS: {
|
|
29
|
+
readonly PRIMARY: "#1976d2";
|
|
30
|
+
readonly SUCCESS: "#4caf50";
|
|
31
|
+
readonly WARNING: "#ff9800";
|
|
32
|
+
readonly ERROR: "#f44336";
|
|
33
|
+
readonly INFO: "#2196f3";
|
|
34
|
+
};
|
|
35
|
+
readonly Z_INDEX: {
|
|
36
|
+
readonly DROPDOWN: 1000;
|
|
37
|
+
readonly MODAL: 1050;
|
|
38
|
+
readonly TOOLTIP: 1100;
|
|
39
|
+
readonly NOTIFICATION: 1150;
|
|
40
|
+
};
|
|
41
|
+
readonly KEYBOARD: {
|
|
42
|
+
readonly ENTER: "Enter";
|
|
43
|
+
readonly ESCAPE: "Escape";
|
|
44
|
+
readonly TAB: "Tab";
|
|
45
|
+
readonly ARROW_UP: "ArrowUp";
|
|
46
|
+
readonly ARROW_DOWN: "ArrowDown";
|
|
47
|
+
readonly ARROW_LEFT: "ArrowLeft";
|
|
48
|
+
readonly ARROW_RIGHT: "ArrowRight";
|
|
49
|
+
readonly SPACE: " ";
|
|
50
|
+
readonly DELETE: "Delete";
|
|
51
|
+
readonly BACKSPACE: "Backspace";
|
|
52
|
+
readonly F2: "F2";
|
|
53
|
+
};
|
|
54
|
+
readonly CSS_CLASSES: {
|
|
55
|
+
readonly GRID: "ts-datagrid";
|
|
56
|
+
readonly HEADER: "ts-datagrid-header";
|
|
57
|
+
readonly BODY: "ts-datagrid-body";
|
|
58
|
+
readonly FOOTER: "ts-datagrid-footer";
|
|
59
|
+
readonly ROW: "ts-datagrid-row";
|
|
60
|
+
readonly CELL: "ts-datagrid-cell";
|
|
61
|
+
readonly SELECTED: "ts-datagrid-selected";
|
|
62
|
+
readonly EDITING: "ts-datagrid-editing";
|
|
63
|
+
readonly LOADING: "ts-datagrid-loading";
|
|
64
|
+
readonly DRAGGING: "ts-datagrid-dragging";
|
|
65
|
+
readonly FOCUSED: "ts-datagrid-focused";
|
|
66
|
+
};
|
|
67
|
+
readonly BREAKPOINTS: {
|
|
68
|
+
readonly XS: 0;
|
|
69
|
+
readonly SM: 600;
|
|
70
|
+
readonly MD: 960;
|
|
71
|
+
readonly LG: 1280;
|
|
72
|
+
readonly XL: 1920;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
export type GridConstants = typeof GRID_CONSTANTS;
|
|
76
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkGjB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,OAAO,cAAc,CAAA"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Date manipulation utilities
|
|
3
|
+
* @module utils/date
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Format date
|
|
7
|
+
*/
|
|
8
|
+
export declare function formatDateString(date: Date | string | number, format?: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Parse date string
|
|
11
|
+
*/
|
|
12
|
+
export declare function parseDate(dateStr: string, format?: string): Date | null;
|
|
13
|
+
/**
|
|
14
|
+
* Add days to date
|
|
15
|
+
*/
|
|
16
|
+
export declare function addDays(date: Date, days: number): Date;
|
|
17
|
+
/**
|
|
18
|
+
* Add months to date
|
|
19
|
+
*/
|
|
20
|
+
export declare function addMonths(date: Date, months: number): Date;
|
|
21
|
+
/**
|
|
22
|
+
* Add years to date
|
|
23
|
+
*/
|
|
24
|
+
export declare function addYears(date: Date, years: number): Date;
|
|
25
|
+
/**
|
|
26
|
+
* Get start of day
|
|
27
|
+
*/
|
|
28
|
+
export declare function startOfDay(date: Date): Date;
|
|
29
|
+
/**
|
|
30
|
+
* Get end of day
|
|
31
|
+
*/
|
|
32
|
+
export declare function endOfDay(date: Date): Date;
|
|
33
|
+
/**
|
|
34
|
+
* Get start of week
|
|
35
|
+
*/
|
|
36
|
+
export declare function startOfWeek(date: Date, weekStartsOn?: number): Date;
|
|
37
|
+
/**
|
|
38
|
+
* Get end of week
|
|
39
|
+
*/
|
|
40
|
+
export declare function endOfWeek(date: Date, weekStartsOn?: number): Date;
|
|
41
|
+
/**
|
|
42
|
+
* Get start of month
|
|
43
|
+
*/
|
|
44
|
+
export declare function startOfMonth(date: Date): Date;
|
|
45
|
+
/**
|
|
46
|
+
* Get end of month
|
|
47
|
+
*/
|
|
48
|
+
export declare function endOfMonth(date: Date): Date;
|
|
49
|
+
/**
|
|
50
|
+
* Get start of year
|
|
51
|
+
*/
|
|
52
|
+
export declare function startOfYear(date: Date): Date;
|
|
53
|
+
/**
|
|
54
|
+
* Get end of year
|
|
55
|
+
*/
|
|
56
|
+
export declare function endOfYear(date: Date): Date;
|
|
57
|
+
/**
|
|
58
|
+
* Get difference in days
|
|
59
|
+
*/
|
|
60
|
+
export declare function differenceInDays(dateLeft: Date, dateRight: Date): number;
|
|
61
|
+
/**
|
|
62
|
+
* Get difference in hours
|
|
63
|
+
*/
|
|
64
|
+
export declare function differenceInHours(dateLeft: Date, dateRight: Date): number;
|
|
65
|
+
/**
|
|
66
|
+
* Get difference in minutes
|
|
67
|
+
*/
|
|
68
|
+
export declare function differenceInMinutes(dateLeft: Date, dateRight: Date): number;
|
|
69
|
+
/**
|
|
70
|
+
* Check if date is today
|
|
71
|
+
*/
|
|
72
|
+
export declare function isToday(date: Date): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Check if date is yesterday
|
|
75
|
+
*/
|
|
76
|
+
export declare function isYesterday(date: Date): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Check if date is this week
|
|
79
|
+
*/
|
|
80
|
+
export declare function isThisWeek(date: Date): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Check if date is this month
|
|
83
|
+
*/
|
|
84
|
+
export declare function isThisMonth(date: Date): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Check if date is this year
|
|
87
|
+
*/
|
|
88
|
+
export declare function isThisYear(date: Date): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Check if date is weekend
|
|
91
|
+
*/
|
|
92
|
+
export declare function isWeekend(date: Date): boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Check if date is valid
|
|
95
|
+
*/
|
|
96
|
+
export declare function isValidDate(date: any): boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Format relative time (e.g., "2 hours ago")
|
|
99
|
+
*/
|
|
100
|
+
export declare function formatRelative(date: Date, baseDate?: Date): string;
|
|
101
|
+
//# sourceMappingURL=date.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/utils/date.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,EAC5B,MAAM,GAAE,MAAqB,GAC5B,MAAM,CAqBR;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,GAAE,MAAqB,GAAG,IAAI,GAAG,IAAI,CAmBrF;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAItD;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,E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