@ieeesa-npm/presentation 0.31.3 → 0.31.5
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/esm2022/lib/components/data-table/data-table.component.mjs +3 -3
- package/esm2022/lib/components/export-format-popover/export-format-popover.component.mjs +3 -3
- package/esm2022/lib/components/filter-popover/filter-popover.component.mjs +198 -0
- package/esm2022/lib/components/legend/legend.component.mjs +3 -3
- package/esm2022/lib/models/filter-popover.model.mjs +2 -0
- package/esm2022/lib/models/legend.model.mjs +1 -1
- package/esm2022/lib/models/table-schema.model.mjs +1 -1
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/ieeesa-npm-presentation.mjs +197 -7
- package/fesm2022/ieeesa-npm-presentation.mjs.map +1 -1
- package/lib/components/filter-popover/filter-popover.component.d.ts +84 -0
- package/lib/models/filter-popover.model.d.ts +24 -0
- package/lib/models/legend.model.d.ts +1 -0
- package/lib/models/table-schema.model.d.ts +2 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { FilterPopoverCategory, FilterPopoverOption, FilterPopoverSelection } from '../../models/filter-popover.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* FilterPopoverComponent renders a configurable multi-category filter popup.
|
|
6
|
+
* Positioned via CSS absolute — parent must wrap trigger + this component
|
|
7
|
+
* in a `position: relative` container.
|
|
8
|
+
*
|
|
9
|
+
* Supports single or multi-category mode:
|
|
10
|
+
* - Single category: left nav is hidden, only checkbox list shown.
|
|
11
|
+
* - Multi-category: left nav with category selection + right panel.
|
|
12
|
+
*
|
|
13
|
+
* @export
|
|
14
|
+
* @class FilterPopoverComponent
|
|
15
|
+
* @implements {OnChanges}
|
|
16
|
+
*/
|
|
17
|
+
export declare class FilterPopoverComponent implements OnChanges {
|
|
18
|
+
/** Controls visibility */
|
|
19
|
+
isOpen: boolean;
|
|
20
|
+
/** Filter categories with their options — parent defines what to show */
|
|
21
|
+
categories: FilterPopoverCategory[];
|
|
22
|
+
/** Header title text */
|
|
23
|
+
title: string;
|
|
24
|
+
/** Clear all button text */
|
|
25
|
+
clearAllLabel: string;
|
|
26
|
+
/** Select all link text */
|
|
27
|
+
selectAllLabel: string;
|
|
28
|
+
/** Deselect all link text */
|
|
29
|
+
deselectAllLabel: string;
|
|
30
|
+
/** Reset button text */
|
|
31
|
+
resetLabel: string;
|
|
32
|
+
/** Apply button text */
|
|
33
|
+
applyLabel: string;
|
|
34
|
+
/** No results message */
|
|
35
|
+
noResultsMessage: string;
|
|
36
|
+
/** Search placeholder prefix (appended with category label) */
|
|
37
|
+
searchPlaceholderPrefix: string;
|
|
38
|
+
/** Emits the current selection when user clicks Apply */
|
|
39
|
+
filterApplied: EventEmitter<FilterPopoverSelection>;
|
|
40
|
+
/** Emits when user clicks Reset */
|
|
41
|
+
filterReset: EventEmitter<void>;
|
|
42
|
+
/** Emits when the popover should be closed (backdrop click or after Apply). */
|
|
43
|
+
closed: EventEmitter<void>;
|
|
44
|
+
/** Currently active category index */
|
|
45
|
+
activeCategoryIndex: number;
|
|
46
|
+
/** Search term for filtering options */
|
|
47
|
+
searchTerm: string;
|
|
48
|
+
/** Internal working copy of categories */
|
|
49
|
+
workingCategories: FilterPopoverCategory[];
|
|
50
|
+
/**
|
|
51
|
+
* Refreshes working copy when opening or categories change.
|
|
52
|
+
*/
|
|
53
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
54
|
+
/** Whether this is a single-category filter (hides left nav) */
|
|
55
|
+
get isSingleCategory(): boolean;
|
|
56
|
+
/** Total number of selected options across all categories */
|
|
57
|
+
get totalSelectedCount(): number;
|
|
58
|
+
/** Currently active category */
|
|
59
|
+
get activeCategory(): FilterPopoverCategory | undefined;
|
|
60
|
+
/** Options filtered by search term for the active category */
|
|
61
|
+
get filteredOptions(): FilterPopoverOption[];
|
|
62
|
+
/** Whether all visible options are checked */
|
|
63
|
+
get isAllVisibleSelected(): boolean;
|
|
64
|
+
/** Selects a category from the left nav */
|
|
65
|
+
onCategorySelect(index: number): void;
|
|
66
|
+
/** Toggles a single checkbox option */
|
|
67
|
+
onOptionToggle(option: FilterPopoverOption): void;
|
|
68
|
+
/** Toggles all visible options */
|
|
69
|
+
onSelectAll(): void;
|
|
70
|
+
/** Applies filter and emits selection */
|
|
71
|
+
onApply(): void;
|
|
72
|
+
/** Resets all selections */
|
|
73
|
+
onReset(): void;
|
|
74
|
+
/** Clears all (same as reset) */
|
|
75
|
+
onClearAll(): void;
|
|
76
|
+
/** Closes via backdrop click */
|
|
77
|
+
onBackdropClick(): void;
|
|
78
|
+
trackByCategory(index: number): number;
|
|
79
|
+
trackByOption(_index: number, option: FilterPopoverOption): string;
|
|
80
|
+
private initWorkingCopy;
|
|
81
|
+
private recalculateSelectedCount;
|
|
82
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FilterPopoverComponent, never>;
|
|
83
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FilterPopoverComponent, "ieeesa-filter-popover", never, { "isOpen": { "alias": "isOpen"; "required": false; }; "categories": { "alias": "categories"; "required": false; }; "title": { "alias": "title"; "required": false; }; "clearAllLabel": { "alias": "clearAllLabel"; "required": false; }; "selectAllLabel": { "alias": "selectAllLabel"; "required": false; }; "deselectAllLabel": { "alias": "deselectAllLabel"; "required": false; }; "resetLabel": { "alias": "resetLabel"; "required": false; }; "applyLabel": { "alias": "applyLabel"; "required": false; }; "noResultsMessage": { "alias": "noResultsMessage"; "required": false; }; "searchPlaceholderPrefix": { "alias": "searchPlaceholderPrefix"; "required": false; }; }, { "filterApplied": "filterApplied"; "filterReset": "filterReset"; "closed": "closed"; }, never, never, true, never>;
|
|
84
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a single filter category (e.g. "Member Type", "Status").
|
|
3
|
+
*/
|
|
4
|
+
export interface FilterPopoverCategory {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
options: FilterPopoverOption[];
|
|
8
|
+
selectedCount?: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Represents an individual option within a filter category.
|
|
12
|
+
*/
|
|
13
|
+
export interface FilterPopoverOption {
|
|
14
|
+
id: string;
|
|
15
|
+
label: string;
|
|
16
|
+
checked: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The complete filter state emitted on Apply.
|
|
20
|
+
* Key = category id, Value = array of selected option labels.
|
|
21
|
+
*/
|
|
22
|
+
export interface FilterPopoverSelection {
|
|
23
|
+
[categoryId: string]: string[];
|
|
24
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export * from './lib/components/image-preview/image-preview.component';
|
|
|
42
42
|
export * from './lib/components/rich-text-editor/rich-text-editor.component';
|
|
43
43
|
export * from './lib/components/multi-select-autocomplete/multi-select-autocomplete.component';
|
|
44
44
|
export * from './lib/components/export-format-popover/export-format-popover.component';
|
|
45
|
+
export * from './lib/components/filter-popover/filter-popover.component';
|
|
45
46
|
export * from './lib/components/policy-confirmation-dialog/policy-confirmation-dialog.component';
|
|
46
47
|
export * from './lib/components/export-success-dialog/export-success-dialog.component';
|
|
47
48
|
export * from './lib/directives/dynamic-form-field/dynamic-form-field.directive';
|
|
@@ -101,6 +102,7 @@ export * from './lib/models/file-upload-response.model';
|
|
|
101
102
|
export * from './lib/models/inactive-tenant.model';
|
|
102
103
|
export * from './lib/models/table-column-menu-info.model';
|
|
103
104
|
export * from './lib/models/export-format-popover.model';
|
|
105
|
+
export * from './lib/models/filter-popover.model';
|
|
104
106
|
export * from './lib/models/policy-confirmation-dialog.model';
|
|
105
107
|
export * from './lib/models/export-success-dialog.model';
|
|
106
108
|
export * from './lib/services/datepicker.service';
|