@memberjunction/ng-filter-builder 0.0.1 → 2.123.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 (30) hide show
  1. package/dist/lib/filter-builder/filter-builder.component.d.ts +155 -0
  2. package/dist/lib/filter-builder/filter-builder.component.d.ts.map +1 -0
  3. package/dist/lib/filter-builder/filter-builder.component.js +482 -0
  4. package/dist/lib/filter-builder/filter-builder.component.js.map +1 -0
  5. package/dist/lib/filter-builder.module.d.ts +39 -0
  6. package/dist/lib/filter-builder.module.d.ts.map +1 -0
  7. package/dist/lib/filter-builder.module.js +66 -0
  8. package/dist/lib/filter-builder.module.js.map +1 -0
  9. package/dist/lib/filter-group/filter-group.component.d.ts +102 -0
  10. package/dist/lib/filter-group/filter-group.component.d.ts.map +1 -0
  11. package/dist/lib/filter-group/filter-group.component.js +328 -0
  12. package/dist/lib/filter-group/filter-group.component.js.map +1 -0
  13. package/dist/lib/filter-rule/filter-rule.component.d.ts +165 -0
  14. package/dist/lib/filter-rule/filter-rule.component.d.ts.map +1 -0
  15. package/dist/lib/filter-rule/filter-rule.component.js +682 -0
  16. package/dist/lib/filter-rule/filter-rule.component.js.map +1 -0
  17. package/dist/lib/types/filter.types.d.ts +142 -0
  18. package/dist/lib/types/filter.types.d.ts.map +1 -0
  19. package/dist/lib/types/filter.types.js +82 -0
  20. package/dist/lib/types/filter.types.js.map +1 -0
  21. package/dist/lib/types/operators.d.ts +49 -0
  22. package/dist/lib/types/operators.d.ts.map +1 -0
  23. package/dist/lib/types/operators.js +99 -0
  24. package/dist/lib/types/operators.js.map +1 -0
  25. package/dist/public-api.d.ts +15 -0
  26. package/dist/public-api.d.ts.map +1 -0
  27. package/dist/public-api.js +19 -0
  28. package/dist/public-api.js.map +1 -0
  29. package/package.json +38 -6
  30. package/README.md +0 -45
@@ -0,0 +1,165 @@
1
+ import { EventEmitter, OnInit, OnChanges, SimpleChanges, ElementRef } from '@angular/core';
2
+ import { FilterDescriptor, FilterFieldInfo, FilterOperator } from '../types/filter.types';
3
+ import { OperatorInfo } from '../types/operators';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * FilterRuleComponent - A single filter condition row
7
+ *
8
+ * Displays field selector, operator selector, and value editor
9
+ * based on the field type.
10
+ */
11
+ export declare class FilterRuleComponent implements OnInit, OnChanges {
12
+ private elementRef;
13
+ /**
14
+ * The filter descriptor for this rule
15
+ */
16
+ filter: FilterDescriptor;
17
+ /**
18
+ * Available fields to filter on
19
+ */
20
+ fields: FilterFieldInfo[];
21
+ /**
22
+ * Whether the component is disabled
23
+ */
24
+ disabled: boolean;
25
+ /**
26
+ * Whether to show the delete button
27
+ */
28
+ showDelete: boolean;
29
+ /**
30
+ * Emitted when the filter changes
31
+ */
32
+ filterChange: EventEmitter<FilterDescriptor>;
33
+ /**
34
+ * Emitted when the delete button is clicked
35
+ */
36
+ delete: EventEmitter<void>;
37
+ /**
38
+ * Currently selected field info
39
+ */
40
+ selectedField: FilterFieldInfo | null;
41
+ /**
42
+ * Available operators for the selected field type
43
+ */
44
+ availableOperators: OperatorInfo[];
45
+ /**
46
+ * Whether the current operator requires a value
47
+ */
48
+ requiresValue: boolean;
49
+ fieldDropdownOpen: boolean;
50
+ operatorDropdownOpen: boolean;
51
+ valueDropdownOpen: boolean;
52
+ fieldHighlightIndex: number;
53
+ operatorHighlightIndex: number;
54
+ valueHighlightIndex: number;
55
+ constructor(elementRef: ElementRef);
56
+ /**
57
+ * Close dropdowns when clicking outside the component
58
+ */
59
+ onDocumentClick(event: MouseEvent): void;
60
+ ngOnInit(): void;
61
+ ngOnChanges(changes: SimpleChanges): void;
62
+ /**
63
+ * Update the selected field and available operators
64
+ */
65
+ private updateFieldSelection;
66
+ toggleFieldDropdown(): void;
67
+ toggleOperatorDropdown(): void;
68
+ toggleValueDropdown(): void;
69
+ closeFieldDropdown(): void;
70
+ closeOperatorDropdown(): void;
71
+ closeValueDropdown(): void;
72
+ closeAllDropdowns(): void;
73
+ resetHighlightIndices(): void;
74
+ /**
75
+ * Handle keyboard events on the field dropdown trigger
76
+ */
77
+ onFieldKeydown(event: KeyboardEvent): void;
78
+ /**
79
+ * Handle keyboard events on the operator dropdown trigger
80
+ */
81
+ onOperatorKeydown(event: KeyboardEvent): void;
82
+ /**
83
+ * Handle keyboard events on the value dropdown trigger
84
+ */
85
+ onValueKeydown(event: KeyboardEvent): void;
86
+ /**
87
+ * Generic handler for dropdown keyboard navigation
88
+ */
89
+ private handleDropdownKeydown;
90
+ /**
91
+ * Scroll the highlighted dropdown item into view
92
+ */
93
+ private scrollHighlightedItemIntoView;
94
+ /**
95
+ * Get the display name for the currently selected field
96
+ */
97
+ getSelectedFieldDisplayName(): string;
98
+ /**
99
+ * Get the label for the currently selected operator
100
+ */
101
+ getSelectedOperatorLabel(): string;
102
+ /**
103
+ * Get the label for the currently selected value (for value list dropdowns)
104
+ */
105
+ getSelectedValueLabel(): string;
106
+ /**
107
+ * Handle field selection from custom dropdown
108
+ */
109
+ selectField(fieldName: string): void;
110
+ /**
111
+ * Handle operator selection from custom dropdown
112
+ */
113
+ selectOperator(operator: string): void;
114
+ /**
115
+ * Handle value selection from custom dropdown
116
+ */
117
+ selectValue(value: string): void;
118
+ /**
119
+ * Handle value selection from value list option (supports union type)
120
+ */
121
+ selectValueFromOption(value: string | number | boolean): void;
122
+ /**
123
+ * Handle field selection change
124
+ */
125
+ onFieldChange(fieldName: string): void;
126
+ /**
127
+ * Handle operator selection change
128
+ */
129
+ onOperatorChange(operator: FilterOperator): void;
130
+ /**
131
+ * Handle value change
132
+ */
133
+ onValueChange(value: unknown): void;
134
+ /**
135
+ * Handle boolean toggle
136
+ */
137
+ onBooleanChange(value: boolean): void;
138
+ /**
139
+ * Handle date change
140
+ */
141
+ onDateChange(event: Event): void;
142
+ /**
143
+ * Handle delete button click
144
+ */
145
+ onDelete(): void;
146
+ /**
147
+ * Emit the filter change event
148
+ */
149
+ private emitChange;
150
+ /**
151
+ * Get default value for a field type
152
+ */
153
+ private getDefaultValue;
154
+ /**
155
+ * Get the date value formatted for the date input
156
+ */
157
+ getDateInputValue(): string;
158
+ /**
159
+ * Check if the current field has a value list (dropdown options)
160
+ */
161
+ hasValueList(): boolean;
162
+ static ɵfac: i0.ɵɵFactoryDeclaration<FilterRuleComponent, never>;
163
+ static ɵcmp: i0.ɵɵComponentDeclaration<FilterRuleComponent, "mj-filter-rule", never, { "filter": { "alias": "filter"; "required": false; }; "fields": { "alias": "fields"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "showDelete": { "alias": "showDelete"; "required": false; }; }, { "filterChange": "filterChange"; "delete": "delete"; }, never, never, false, never>;
164
+ }
165
+ //# sourceMappingURL=filter-rule.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-rule.component.d.ts","sourceRoot":"","sources":["../../../src/lib/filter-rule/filter-rule.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAmC,UAAU,EAAE,MAAM,eAAe,CAAC;AACtJ,OAAO,EACL,gBAAgB,EAChB,eAAe,EAEf,cAAc,EACf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAuB,YAAY,EAAyB,MAAM,oBAAoB,CAAC;;AAE9F;;;;;GAKG;AACH,qBAMa,mBAAoB,YAAW,MAAM,EAAE,SAAS;IAwD/C,OAAO,CAAC,UAAU;IAvD9B;;OAEG;IACM,MAAM,EAAG,gBAAgB,CAAC;IAEnC;;OAEG;IACM,MAAM,EAAE,eAAe,EAAE,CAAM;IAExC;;OAEG;IACM,QAAQ,EAAE,OAAO,CAAS;IAEnC;;OAEG;IACM,UAAU,EAAE,OAAO,CAAQ;IAEpC;;OAEG;IACO,YAAY,iCAAwC;IAE9D;;OAEG;IACO,MAAM,qBAA4B;IAE5C;;OAEG;IACI,aAAa,EAAE,eAAe,GAAG,IAAI,CAAQ;IAEpD;;OAEG;IACI,kBAAkB,EAAE,YAAY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