ag-grid-url-sync 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,112 +1,245 @@
1
- import type { GridApi as AGGridApi } from 'ag-grid-community';
1
+ import type { GridApi as AGGridApi, TextFilterModel, NumberFilterModel, DateFilterModel } from 'ag-grid-community';
2
2
  /**
3
3
  * Configuration options for AG Grid URL Sync
4
+ *
5
+ * @example
6
+ * ```typescript
7
+ * const config: AGGridUrlSyncConfig = {
8
+ * paramPrefix: 'filter_',
9
+ * maxValueLength: 500,
10
+ * onParseError: (error) => console.warn('Filter parse error:', error)
11
+ * }
12
+ * ```
4
13
  */
5
14
  export interface AGGridUrlSyncConfig {
6
15
  /**
7
- * Prefix for URL parameters. Default: 'f_'
16
+ * Prefix for URL parameters
17
+ * @default 'f_'
18
+ * @example 'filter_' results in URLs like '?filter_name_contains=john'
8
19
  */
9
20
  paramPrefix?: string;
10
21
  /**
11
- * Maximum length for filter values. Default: 200
22
+ * Maximum length for filter values to prevent URL length issues
23
+ * @default 200
12
24
  */
13
25
  maxValueLength?: number;
14
26
  /**
15
- * Optional error handler for parsing errors
27
+ * Optional error handler for parsing errors.
28
+ * Allows graceful error handling without breaking the application.
16
29
  */
17
30
  onParseError?: (error: Error) => void;
18
31
  }
19
32
  /**
20
- * Supported filter operations
33
+ * Internal configuration with all required fields and runtime dependencies
34
+ */
35
+ export interface InternalConfig extends Required<AGGridUrlSyncConfig> {
36
+ /** AG Grid API instance for filter operations */
37
+ gridApi: AGGridApi;
38
+ }
39
+ /**
40
+ * Text-only filter operations for string-based filtering
41
+ */
42
+ export declare const TEXT_ONLY_OPERATIONS: readonly ["contains", "notContains", "startsWith", "endsWith"];
43
+ /**
44
+ * Number-only filter operations for numeric comparisons
45
+ */
46
+ export declare const NUMBER_ONLY_OPERATIONS: readonly ["lessThan", "lessThanOrEqual", "greaterThan", "greaterThanOrEqual", "inRange"];
47
+ /**
48
+ * Date-specific filter operations for temporal comparisons
49
+ */
50
+ export declare const DATE_ONLY_OPERATIONS: readonly ["dateBefore", "dateBeforeOrEqual", "dateAfter", "dateAfterOrEqual", "dateRange"];
51
+ /**
52
+ * Operations shared across multiple filter types
53
+ */
54
+ export declare const SHARED_OPERATIONS: readonly ["eq", "notEqual", "blank", "notBlank"];
55
+ /**
56
+ * All supported filter operations across text, number, and date filters
57
+ */
58
+ export type FilterOperation = (typeof TEXT_ONLY_OPERATIONS)[number] | (typeof NUMBER_ONLY_OPERATIONS)[number] | (typeof DATE_ONLY_OPERATIONS)[number] | (typeof SHARED_OPERATIONS)[number];
59
+ /**
60
+ * Complete list of valid text filter operations
61
+ */
62
+ export declare const TEXT_FILTER_OPERATIONS: readonly ["contains", "notContains", "startsWith", "endsWith", "eq", "notEqual", "blank", "notBlank"];
63
+ /**
64
+ * Complete list of valid number filter operations
65
+ */
66
+ export declare const NUMBER_FILTER_OPERATIONS: readonly ["lessThan", "lessThanOrEqual", "greaterThan", "greaterThanOrEqual", "inRange", "eq", "notEqual", "blank", "notBlank"];
67
+ /**
68
+ * Valid date filter operations as const array
69
+ */
70
+ export declare const DATE_FILTER_OPERATIONS: readonly ["dateBefore", "dateBeforeOrEqual", "dateAfter", "dateAfterOrEqual", "dateRange", "eq", "notEqual", "blank", "notBlank"];
71
+ /**
72
+ * Text-specific filter operations
21
73
  */
22
- export type FilterOperation = 'contains' | 'eq' | 'notContains' | 'notEqual' | 'startsWith' | 'endsWith' | 'blank' | 'notBlank';
74
+ export type TextFilterOperation = (typeof TEXT_FILTER_OPERATIONS)[number];
23
75
  /**
24
- * Filter state for a single column
76
+ * Number-specific filter operations
25
77
  */
26
- export interface ColumnFilter {
78
+ export type NumberFilterOperation = (typeof NUMBER_FILTER_OPERATIONS)[number];
79
+ /**
80
+ * Date-specific filter operations
81
+ */
82
+ export type DateFilterOperation = (typeof DATE_FILTER_OPERATIONS)[number];
83
+ /**
84
+ * Range operations that require two values (from/to)
85
+ */
86
+ export type RangeOperation = 'inRange' | 'dateRange';
87
+ /**
88
+ * Operations that don't require a filter value
89
+ */
90
+ export type BlankOperation = 'blank' | 'notBlank';
91
+ /**
92
+ * Supported filter types
93
+ */
94
+ export type FilterType = 'text' | 'number' | 'date';
95
+ /**
96
+ * Base interface for all column filters with common properties
97
+ */
98
+ interface BaseColumnFilter<T extends FilterOperation = FilterOperation> {
99
+ /** The filter operation type */
100
+ type: T;
101
+ }
102
+ /**
103
+ * Text filter configuration for string-based filtering
104
+ */
105
+ export interface TextColumnFilter extends BaseColumnFilter<TextFilterOperation> {
27
106
  filterType: 'text';
28
- type: FilterOperation;
107
+ /** The text value to filter by */
29
108
  filter: string;
30
109
  }
31
110
  /**
32
- * Complete filter state mapping
111
+ * Number filter configuration for numeric filtering
112
+ */
113
+ export interface NumberColumnFilter extends BaseColumnFilter<NumberFilterOperation> {
114
+ filterType: 'number';
115
+ /** The numeric value to filter by */
116
+ filter: number;
117
+ /** Optional second value for range operations */
118
+ filterTo?: number;
119
+ }
120
+ /**
121
+ * Date filter configuration for temporal filtering.
122
+ * Uses ISO date format (YYYY-MM-DD) for consistency and parseability.
123
+ */
124
+ export interface DateColumnFilter extends BaseColumnFilter<DateFilterOperation> {
125
+ filterType: 'date';
126
+ /** ISO date string (YYYY-MM-DD) */
127
+ filter: string;
128
+ /** Optional end date for range operations (ISO format) */
129
+ filterTo?: string;
130
+ }
131
+ /**
132
+ * Union type for all possible column filters
133
+ */
134
+ export type ColumnFilter = TextColumnFilter | NumberColumnFilter | DateColumnFilter;
135
+ /**
136
+ * Complete filter state mapping column IDs to their filters
33
137
  */
34
138
  export interface FilterState {
35
139
  [columnId: string]: ColumnFilter;
36
140
  }
37
141
  /**
38
- * Internal configuration with defaults
142
+ * Type guard to check if an operation is text-specific
39
143
  */
40
- export interface InternalConfig extends Required<AGGridUrlSyncConfig> {
41
- gridApi: AGGridApi;
42
- }
144
+ export declare function isTextFilterOperation(op: FilterOperation): op is TextFilterOperation;
145
+ /**
146
+ * Type guard to check if an operation is number-specific
147
+ */
148
+ export declare function isNumberFilterOperation(op: FilterOperation): op is NumberFilterOperation;
149
+ /**
150
+ * Type guard to check if an operation is date-specific
151
+ */
152
+ export declare function isDateFilterOperation(op: FilterOperation): op is DateFilterOperation;
153
+ /**
154
+ * Type guard to check if an operation requires a range (two values)
155
+ */
156
+ export declare function isRangeOperation(op: FilterOperation): op is RangeOperation;
157
+ /**
158
+ * Type guard to check if an operation is a blank operation
159
+ */
160
+ export declare function isBlankOperation(op: FilterOperation): op is BlankOperation;
43
161
  /**
44
- * Error types for URL sync operations
162
+ * Type guard to check if a filter is a text filter
163
+ */
164
+ export declare function isTextFilter(filter: ColumnFilter): filter is TextColumnFilter;
165
+ /**
166
+ * Type guard to check if a filter is a number filter
167
+ */
168
+ export declare function isNumberFilter(filter: ColumnFilter): filter is NumberColumnFilter;
169
+ /**
170
+ * Type guard to check if a filter is a date filter
171
+ */
172
+ export declare function isDateFilter(filter: ColumnFilter): filter is DateColumnFilter;
173
+ /**
174
+ * Base error class for all URL sync operations
45
175
  */
46
176
  export declare class URLSyncError extends Error {
47
- constructor(message: string);
177
+ readonly cause?: Error | undefined;
178
+ constructor(message: string, cause?: Error | undefined);
48
179
  }
180
+ /**
181
+ * Error thrown when filter validation fails
182
+ */
49
183
  export declare class InvalidFilterError extends URLSyncError {
50
- constructor(message: string);
184
+ constructor(message: string, cause?: Error);
51
185
  }
186
+ /**
187
+ * Error thrown when URL parsing fails
188
+ */
52
189
  export declare class InvalidURLError extends URLSyncError {
53
- constructor(message: string);
190
+ constructor(message: string, cause?: Error);
191
+ }
192
+ /**
193
+ * Error thrown when date validation fails
194
+ */
195
+ export declare class InvalidDateError extends InvalidFilterError {
196
+ constructor(message: string, cause?: Error);
54
197
  }
55
- export type ParsedFilterParam = {
198
+ /**
199
+ * Parsed filter parameter information for internal processing
200
+ */
201
+ export interface ParsedFilterParam {
56
202
  columnName: string;
57
203
  operation: FilterOperation;
58
- value: string;
204
+ filterType: FilterType | 'auto';
205
+ value: string | number;
206
+ filterTo?: number | string;
59
207
  action: 'apply' | 'remove';
60
- };
208
+ }
209
+ /**
210
+ * Re-export GridApi for convenience
211
+ */
61
212
  export type GridApi = AGGridApi;
62
213
  /**
63
- * Operation Mapping Strategy:
64
- *
65
- * We use three different naming conventions for better user experience:
66
- *
67
- * 1. URL Parameters: Short, clean names for URLs (e.g., 'eq', 'neq')
68
- * 2. Internal Types: Consistent naming for our FilterOperation type
69
- * 3. AG Grid Operations: Exact names expected by AG Grid API (e.g., 'equals', 'notEqual')
70
- *
71
- * This approach keeps URLs readable while maintaining compatibility with AG Grid.
72
- */
73
- export declare const OPERATION_MAP: {
74
- readonly contains: "contains";
75
- readonly eq: "eq";
76
- readonly notContains: "notContains";
77
- readonly neq: "notEqual";
78
- readonly startsWith: "startsWith";
79
- readonly endsWith: "endsWith";
80
- readonly blank: "blank";
81
- readonly notBlank: "notBlank";
82
- };
83
- export declare const INTERNAL_TO_URL_OPERATION_MAP: {
84
- readonly contains: "contains";
85
- readonly eq: "eq";
86
- readonly notContains: "notContains";
87
- readonly notEqual: "neq";
88
- readonly startsWith: "startsWith";
89
- readonly endsWith: "endsWith";
90
- readonly blank: "blank";
91
- readonly notBlank: "notBlank";
92
- };
93
- export declare const AG_GRID_OPERATION_NAMES: {
94
- readonly contains: "contains";
95
- readonly eq: "equals";
96
- readonly notContains: "notContains";
97
- readonly notEqual: "notEqual";
98
- readonly startsWith: "startsWith";
99
- readonly endsWith: "endsWith";
100
- readonly blank: "blank";
101
- readonly notBlank: "notBlank";
102
- };
103
- export declare const REVERSE_AG_GRID_OPERATION_NAMES: {
104
- readonly contains: "contains";
105
- readonly equals: "eq";
106
- readonly notContains: "notContains";
107
- readonly notEqual: "notEqual";
108
- readonly startsWith: "startsWith";
109
- readonly endsWith: "endsWith";
110
- readonly blank: "blank";
111
- readonly notBlank: "notBlank";
112
- };
214
+ * Union type for AG Grid filters using official AG Grid types
215
+ */
216
+ export type AGGridFilter = TextFilterModel | NumberFilterModel | DateFilterModel;
217
+ /**
218
+ * Raw AG Grid filter object structure from getFilterModel()
219
+ * Used for type-safe destructuring of filter objects
220
+ */
221
+ export interface RawAGGridFilter {
222
+ filterType?: string;
223
+ type?: string;
224
+ filter?: string | number;
225
+ filterTo?: string | number;
226
+ dateFrom?: string;
227
+ dateTo?: string;
228
+ }
229
+ /**
230
+ * Maps URL operation names to internal operation types
231
+ */
232
+ export declare const OPERATION_MAP: Record<string, FilterOperation>;
233
+ /**
234
+ * Maps internal operation types to URL operation names
235
+ */
236
+ export declare const INTERNAL_TO_URL_OPERATION_MAP: Record<FilterOperation, string>;
237
+ /**
238
+ * Maps internal operation types to AG Grid operation names
239
+ */
240
+ export declare const AG_GRID_OPERATION_NAMES: Record<string, string>;
241
+ /**
242
+ * Maps AG Grid operation names to internal operation types
243
+ */
244
+ export declare const REVERSE_AG_GRID_OPERATION_NAMES: Record<string, FilterOperation>;
245
+ export {};
@@ -1,79 +1,259 @@
1
+ // ============================================================================
2
+ // FILTER OPERATION DEFINITIONS
3
+ // ============================================================================
1
4
  /**
2
- * Error types for URL sync operations
5
+ * Text-only filter operations for string-based filtering
6
+ */
7
+ export const TEXT_ONLY_OPERATIONS = [
8
+ 'contains',
9
+ 'notContains',
10
+ 'startsWith',
11
+ 'endsWith'
12
+ ];
13
+ /**
14
+ * Number-only filter operations for numeric comparisons
15
+ */
16
+ export const NUMBER_ONLY_OPERATIONS = [
17
+ 'lessThan',
18
+ 'lessThanOrEqual',
19
+ 'greaterThan',
20
+ 'greaterThanOrEqual',
21
+ 'inRange'
22
+ ];
23
+ /**
24
+ * Date-specific filter operations for temporal comparisons
25
+ */
26
+ export const DATE_ONLY_OPERATIONS = [
27
+ 'dateBefore',
28
+ 'dateBeforeOrEqual',
29
+ 'dateAfter',
30
+ 'dateAfterOrEqual',
31
+ 'dateRange'
32
+ ];
33
+ /**
34
+ * Operations shared across multiple filter types
35
+ */
36
+ export const SHARED_OPERATIONS = [
37
+ 'eq',
38
+ 'notEqual',
39
+ 'blank',
40
+ 'notBlank'
41
+ ];
42
+ /**
43
+ * Complete list of valid text filter operations
44
+ */
45
+ export const TEXT_FILTER_OPERATIONS = [
46
+ ...TEXT_ONLY_OPERATIONS,
47
+ ...SHARED_OPERATIONS
48
+ ];
49
+ /**
50
+ * Complete list of valid number filter operations
51
+ */
52
+ export const NUMBER_FILTER_OPERATIONS = [
53
+ ...NUMBER_ONLY_OPERATIONS,
54
+ ...SHARED_OPERATIONS
55
+ ];
56
+ /**
57
+ * Valid date filter operations as const array
58
+ */
59
+ export const DATE_FILTER_OPERATIONS = [
60
+ ...DATE_ONLY_OPERATIONS,
61
+ ...SHARED_OPERATIONS
62
+ ];
63
+ // ============================================================================
64
+ // TYPE GUARDS
65
+ // ============================================================================
66
+ /**
67
+ * Type guard to check if an operation is text-specific
68
+ */
69
+ export function isTextFilterOperation(op) {
70
+ return TEXT_FILTER_OPERATIONS.includes(op);
71
+ }
72
+ /**
73
+ * Type guard to check if an operation is number-specific
74
+ */
75
+ export function isNumberFilterOperation(op) {
76
+ return NUMBER_FILTER_OPERATIONS.includes(op);
77
+ }
78
+ /**
79
+ * Type guard to check if an operation is date-specific
80
+ */
81
+ export function isDateFilterOperation(op) {
82
+ return DATE_FILTER_OPERATIONS.includes(op);
83
+ }
84
+ /**
85
+ * Type guard to check if an operation requires a range (two values)
86
+ */
87
+ export function isRangeOperation(op) {
88
+ return op === 'inRange' || op === 'dateRange';
89
+ }
90
+ /**
91
+ * Type guard to check if an operation is a blank operation
92
+ */
93
+ export function isBlankOperation(op) {
94
+ return op === 'blank' || op === 'notBlank';
95
+ }
96
+ /**
97
+ * Type guard to check if a filter is a text filter
98
+ */
99
+ export function isTextFilter(filter) {
100
+ return filter.filterType === 'text';
101
+ }
102
+ /**
103
+ * Type guard to check if a filter is a number filter
104
+ */
105
+ export function isNumberFilter(filter) {
106
+ return filter.filterType === 'number';
107
+ }
108
+ /**
109
+ * Type guard to check if a filter is a date filter
110
+ */
111
+ export function isDateFilter(filter) {
112
+ return filter.filterType === 'date';
113
+ }
114
+ // ============================================================================
115
+ // ERROR TYPES
116
+ // ============================================================================
117
+ /**
118
+ * Base error class for all URL sync operations
3
119
  */
4
120
  export class URLSyncError extends Error {
5
- constructor(message) {
121
+ cause;
122
+ constructor(message, cause) {
6
123
  super(message);
124
+ this.cause = cause;
7
125
  this.name = 'URLSyncError';
8
126
  }
9
127
  }
128
+ /**
129
+ * Error thrown when filter validation fails
130
+ */
10
131
  export class InvalidFilterError extends URLSyncError {
11
- constructor(message) {
12
- super(message);
132
+ constructor(message, cause) {
133
+ super(message, cause);
13
134
  this.name = 'InvalidFilterError';
14
135
  }
15
136
  }
137
+ /**
138
+ * Error thrown when URL parsing fails
139
+ */
16
140
  export class InvalidURLError extends URLSyncError {
17
- constructor(message) {
18
- super(message);
141
+ constructor(message, cause) {
142
+ super(message, cause);
19
143
  this.name = 'InvalidURLError';
20
144
  }
21
145
  }
146
+ /**
147
+ * Error thrown when date validation fails
148
+ */
149
+ export class InvalidDateError extends InvalidFilterError {
150
+ constructor(message, cause) {
151
+ super(message, cause);
152
+ this.name = 'InvalidDateError';
153
+ }
154
+ }
155
+ // ============================================================================
156
+ // OPERATION MAPPINGS
157
+ // ============================================================================
22
158
  /**
23
159
  * Operation Mapping Strategy:
24
160
  *
25
161
  * We use three different naming conventions for better user experience:
26
162
  *
27
- * 1. URL Parameters: Short, clean names for URLs (e.g., 'eq', 'neq')
163
+ * 1. URL Parameters: Short, clean names for URLs (e.g., 'eq', 'neq', 'before', 'after')
28
164
  * 2. Internal Types: Consistent naming for our FilterOperation type
29
- * 3. AG Grid Operations: Exact names expected by AG Grid API (e.g., 'equals', 'notEqual')
165
+ * 3. AG Grid Operations: Exact names expected by AG Grid API (e.g., 'equals', 'notEqual', 'lessThan')
30
166
  *
31
167
  * This approach keeps URLs readable while maintaining compatibility with AG Grid.
32
168
  */
33
- // URL parameter names to internal operation types
34
- // Uses short names for cleaner URLs: 'eq' instead of 'equals', 'neq' instead of 'notEqual'
35
- export const OPERATION_MAP = {
36
- contains: 'contains',
37
- eq: 'eq', // Short form for URL brevity
38
- notContains: 'notContains',
39
- neq: 'notEqual', // Short form: 'neq' -> 'notEqual'
40
- startsWith: 'startsWith',
41
- endsWith: 'endsWith',
42
- blank: 'blank',
43
- notBlank: 'notBlank'
44
- };
45
- // Internal operation types to URL parameter names
46
- export const INTERNAL_TO_URL_OPERATION_MAP = {
47
- contains: 'contains',
48
- eq: 'eq',
49
- notContains: 'notContains',
50
- notEqual: 'neq', // Internal 'notEqual' -> URL 'neq'
51
- startsWith: 'startsWith',
52
- endsWith: 'endsWith',
53
- blank: 'blank',
54
- notBlank: 'notBlank'
55
- };
56
- // Internal operation types to AG Grid operation names
57
- // AG Grid expects 'equals' not 'eq', 'notEqual' not 'neq'
58
- export const AG_GRID_OPERATION_NAMES = {
59
- contains: 'contains',
60
- eq: 'equals', // Internal 'eq' -> AG Grid 'equals'
61
- notContains: 'notContains',
62
- notEqual: 'notEqual',
63
- startsWith: 'startsWith',
64
- endsWith: 'endsWith',
65
- blank: 'blank',
66
- notBlank: 'notBlank'
169
+ /**
170
+ * URL shorthand mappings for cleaner URLs.
171
+ * Maps internal operation names to shorter URL parameter names.
172
+ * Operations not listed here use their internal name as URL param.
173
+ */
174
+ const URL_SHORTHAND_MAPPINGS = {
175
+ // Shared operations
176
+ notEqual: 'neq',
177
+ // Number operations
178
+ lessThan: 'lt',
179
+ lessThanOrEqual: 'lte',
180
+ greaterThan: 'gt',
181
+ greaterThanOrEqual: 'gte',
182
+ inRange: 'range',
183
+ // Date operations
184
+ dateBefore: 'before',
185
+ dateBeforeOrEqual: 'beforeEq',
186
+ dateAfter: 'after',
187
+ dateAfterOrEqual: 'afterEq',
188
+ dateRange: 'daterange'
67
189
  };
68
- // AG Grid operation names to internal operation types (reverse mapping)
69
- export const REVERSE_AG_GRID_OPERATION_NAMES = {
70
- contains: 'contains',
71
- equals: 'eq', // AG Grid 'equals' -> Internal 'eq'
72
- notContains: 'notContains',
73
- notEqual: 'notEqual',
74
- startsWith: 'startsWith',
75
- endsWith: 'endsWith',
76
- blank: 'blank',
77
- notBlank: 'notBlank'
190
+ /**
191
+ * AG Grid operation name mappings.
192
+ * Maps internal operation names to AG Grid API operation names.
193
+ * Operations not listed here use their internal name for AG Grid.
194
+ */
195
+ const AG_GRID_NAME_MAPPINGS = {
196
+ // Shared operations
197
+ eq: 'equals',
198
+ // Date operations (AG Grid uses generic names)
199
+ dateBefore: 'lessThan',
200
+ dateBeforeOrEqual: 'lessThanOrEqual',
201
+ dateAfter: 'greaterThan',
202
+ dateAfterOrEqual: 'greaterThanOrEqual',
203
+ dateRange: 'inRange'
78
204
  };
205
+ /**
206
+ * Creates operation mapping tables for URL and AG Grid integration
207
+ */
208
+ function createOperationMaps() {
209
+ // Get all unique operations across filter types
210
+ const allOperations = [
211
+ ...TEXT_FILTER_OPERATIONS,
212
+ ...NUMBER_FILTER_OPERATIONS,
213
+ ...DATE_FILTER_OPERATIONS
214
+ ];
215
+ // Remove duplicates (operations like 'eq', 'blank' appear in multiple arrays)
216
+ const uniqueOperations = [...new Set(allOperations)];
217
+ // Generate URL mappings (bidirectional)
218
+ const operationMap = {};
219
+ const internalToUrlMap = {};
220
+ uniqueOperations.forEach(operation => {
221
+ const urlName = URL_SHORTHAND_MAPPINGS[operation] || operation;
222
+ operationMap[urlName] = operation;
223
+ internalToUrlMap[operation] = urlName;
224
+ });
225
+ // Generate AG Grid mappings (bidirectional)
226
+ const agGridMap = {};
227
+ const reverseAgGridMap = {};
228
+ uniqueOperations.forEach(operation => {
229
+ const agGridName = AG_GRID_NAME_MAPPINGS[operation] ||
230
+ operation;
231
+ agGridMap[operation] = agGridName;
232
+ reverseAgGridMap[agGridName] = operation;
233
+ });
234
+ return {
235
+ operationMap,
236
+ internalToUrlMap,
237
+ agGridMap,
238
+ reverseAgGridMap
239
+ };
240
+ }
241
+ // Generate all mappings dynamically
242
+ const mappings = createOperationMaps();
243
+ /**
244
+ * Maps URL operation names to internal operation types
245
+ */
246
+ export const OPERATION_MAP = mappings.operationMap;
247
+ /**
248
+ * Maps internal operation types to URL operation names
249
+ */
250
+ export const INTERNAL_TO_URL_OPERATION_MAP = mappings.internalToUrlMap;
251
+ /**
252
+ * Maps internal operation types to AG Grid operation names
253
+ */
254
+ export const AG_GRID_OPERATION_NAMES = mappings.agGridMap;
255
+ /**
256
+ * Maps AG Grid operation names to internal operation types
257
+ */
258
+ export const REVERSE_AG_GRID_OPERATION_NAMES = mappings.reverseAgGridMap;
79
259
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AA0DA;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK;IACrC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,cAAc,CAAA;IAC5B,CAAC;CACF;AAED,MAAM,OAAO,kBAAmB,SAAQ,YAAY;IAClD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAA;IAClC,CAAC;CACF;AAED,MAAM,OAAO,eAAgB,SAAQ,YAAY;IAC/C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAA;IAC/B,CAAC;CACF;AAYD;;;;;;;;;;GAUG;AAEH,kDAAkD;AAClD,2FAA2F;AAC3F,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,QAAQ,EAAE,UAAU;IACpB,EAAE,EAAE,IAAI,EAAE,6BAA6B;IACvC,WAAW,EAAE,aAAa;IAC1B,GAAG,EAAE,UAAU,EAAE,kCAAkC;IACnD,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE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