@skyux/filter-bar 12.40.0 → 13.0.0-alpha.12

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 (27) hide show
  1. package/fesm2022/skyux-filter-bar-testing.mjs.map +1 -1
  2. package/fesm2022/skyux-filter-bar.mjs +24 -26
  3. package/fesm2022/skyux-filter-bar.mjs.map +1 -1
  4. package/index.d.ts +207 -11
  5. package/package.json +10 -10
  6. package/testing/index.d.ts +95 -3
  7. package/lib/modules/filter-bar/filter-bar.component.d.ts +0 -24
  8. package/lib/modules/filter-bar/filter-bar.module.d.ts +0 -8
  9. package/lib/modules/filter-bar/filter-bar.service.d.ts +0 -28
  10. package/lib/modules/filter-bar/filter-item-modal.component.d.ts +0 -45
  11. package/lib/modules/filter-bar/filter-item.token.d.ts +0 -7
  12. package/lib/modules/filter-bar/models/filter-bar-filter-item.d.ts +0 -14
  13. package/lib/modules/filter-bar/models/filter-bar-filter-value.d.ts +0 -13
  14. package/lib/modules/filter-bar/models/filter-bar-item.d.ts +0 -19
  15. package/lib/modules/filter-bar/models/filter-item-modal-context.d.ts +0 -24
  16. package/lib/modules/filter-bar/models/filter-item-modal-instance.d.ts +0 -20
  17. package/lib/modules/filter-bar/models/filter-item-modal-opened-args.d.ts +0 -14
  18. package/lib/modules/filter-bar/models/filter-item-modal-saved-args.d.ts +0 -10
  19. package/lib/modules/filter-bar/models/filter-item-modal-size.d.ts +0 -1
  20. package/lib/modules/filter-bar/models/filter-item-modal.d.ts +0 -10
  21. package/lib/modules/filter-bar/models/filter-item.d.ts +0 -26
  22. package/lib/modules/shared/sky-filter-bar-resources.module.d.ts +0 -10
  23. package/testing/modules/filter-bar/filter-bar-harness-filters.d.ts +0 -6
  24. package/testing/modules/filter-bar/filter-bar-harness.d.ts +0 -48
  25. package/testing/modules/filter-bar/filter-item-harness-filters.d.ts +0 -14
  26. package/testing/modules/filter-bar/filter-item-harness.d.ts +0 -30
  27. package/testing/public-api.d.ts +0 -4
package/index.d.ts CHANGED
@@ -1,11 +1,207 @@
1
- export { SkyFilterBarModule } from './lib/modules/filter-bar/filter-bar.module';
2
- export { SkyFilterBarFilterItem } from './lib/modules/filter-bar/models/filter-bar-filter-item';
3
- export { SkyFilterBarFilterValue } from './lib/modules/filter-bar/models/filter-bar-filter-value';
4
- export { SkyFilterItemModal } from './lib/modules/filter-bar/models/filter-item-modal';
5
- export { SkyFilterItemModalContext } from './lib/modules/filter-bar/models/filter-item-modal-context';
6
- export { SkyFilterItemModalInstance } from './lib/modules/filter-bar/models/filter-item-modal-instance';
7
- export { SkyFilterItemModalOpenedArgs } from './lib/modules/filter-bar/models/filter-item-modal-opened-args';
8
- export { SkyFilterItemModalSavedArgs } from './lib/modules/filter-bar/models/filter-item-modal-saved-args';
9
- export { SkyFilterItemModalSizeType } from './lib/modules/filter-bar/models/filter-item-modal-size';
10
- export { SkyFilterBarComponent as λ1 } from './lib/modules/filter-bar/filter-bar.component';
11
- export { SkyFilterItemModalComponent as λ2 } from './lib/modules/filter-bar/filter-item-modal.component';
1
+ import * as _angular_core from '@angular/core';
2
+ import { Signal, TemplateRef, Type, EventEmitter } from '@angular/core';
3
+ import * as _skyux_filter_bar from '@skyux/filter-bar';
4
+ import { Observable } from 'rxjs';
5
+
6
+ /**
7
+ * Represents a value for a filter item.
8
+ */
9
+ interface SkyFilterBarFilterValue {
10
+ /**
11
+ * The real value for the filter.
12
+ */
13
+ value: unknown;
14
+ /**
15
+ * A human-readable string for use with values that can't be displayed to the user.
16
+ */
17
+ displayValue?: string;
18
+ }
19
+
20
+ /**
21
+ * Represents a specific filter item and its selected value, if any.
22
+ */
23
+ interface SkyFilterBarFilterItem {
24
+ /**
25
+ * A unique identifier for the filter item.
26
+ */
27
+ filterId: string;
28
+ /**
29
+ * The value of the filter item.
30
+ */
31
+ filterValue?: SkyFilterBarFilterValue;
32
+ }
33
+
34
+ /**
35
+ * Defines the common properties various filter item types must implement to work with the filter bar component.
36
+ * @internal
37
+ */
38
+ interface SkyFilterItem {
39
+ /**
40
+ * A unique identifier for the filter item.
41
+ */
42
+ filterId: Signal<string>;
43
+ /**
44
+ * The label for the filter item.
45
+ */
46
+ labelText: Signal<string>;
47
+ /**
48
+ * The template of the filter that is rendered by the filter bar.
49
+ * @internal
50
+ */
51
+ templateRef: Signal<TemplateRef<unknown> | undefined>;
52
+ /**
53
+ * The value of the filter item.
54
+ * @internal
55
+ */
56
+ filterValue: Signal<SkyFilterBarFilterValue | undefined>;
57
+ }
58
+
59
+ /**
60
+ * The top-level filter bar component.
61
+ */
62
+ declare class SkyFilterBarComponent {
63
+ #private;
64
+ /**
65
+ * An array of filter items containing the IDs and values of the filters that have been set.
66
+ */
67
+ readonly appliedFilters: _angular_core.ModelSignal<SkyFilterBarFilterItem[] | undefined>;
68
+ /**
69
+ * An array of filter IDs that the user has selected using the built-in selection modal. Setting this input to undefined results in all filters being displayed.
70
+ */
71
+ readonly selectedFilterIds: _angular_core.ModelSignal<string[] | undefined>;
72
+ protected readonly filterItems: _angular_core.Signal<readonly SkyFilterItem[]>;
73
+ protected readonly visibleFilters: _angular_core.Signal<SkyFilterItem[]>;
74
+ constructor();
75
+ protected openFilters(): void;
76
+ protected clearFilters(): void;
77
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SkyFilterBarComponent, never>;
78
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SkyFilterBarComponent, "sky-filter-bar", never, { "appliedFilters": { "alias": "appliedFilters"; "required": false; "isSignal": true; }; "selectedFilterIds": { "alias": "selectedFilterIds"; "required": false; "isSignal": true; }; }, { "appliedFilters": "appliedFiltersChange"; "selectedFilterIds": "selectedFilterIdsChange"; }, ["filterItems"], never, true, never>;
79
+ }
80
+
81
+ /**
82
+ * The context object that is provided to a filter modal.
83
+ */
84
+ declare class SkyFilterItemModalContext<TData = Record<string, unknown>> {
85
+ /**
86
+ * The name of the filter. We recommend using this value for the modal's heading.
87
+ */
88
+ readonly filterLabelText: string;
89
+ /**
90
+ * The value of the filter.
91
+ */
92
+ readonly filterValue?: SkyFilterBarFilterValue;
93
+ /**
94
+ * An untyped property that can track any config information relevant to the filter modal
95
+ * that existing options do not include.
96
+ */
97
+ readonly additionalContext?: TData;
98
+ constructor(args: {
99
+ filterLabelText: string;
100
+ filterValue?: SkyFilterBarFilterValue;
101
+ additionalContext?: TData;
102
+ });
103
+ }
104
+
105
+ /**
106
+ * Arguments passed back from a filter modal when the user has saved.
107
+ */
108
+ interface SkyFilterItemModalSavedArgs {
109
+ /**
110
+ * The filter value.
111
+ */
112
+ filterValue: SkyFilterBarFilterValue | undefined;
113
+ }
114
+
115
+ /**
116
+ * A specialized `SkyModalInstance` wrapper.
117
+ */
118
+ declare abstract class SkyFilterItemModalInstance<TData = Record<string, unknown>> {
119
+ /**
120
+ * The context provided to the filter modal component.
121
+ */
122
+ abstract readonly context: SkyFilterItemModalContext<TData>;
123
+ /**
124
+ * Closes the modal instance with `reason="cancel"`.
125
+ */
126
+ abstract cancel(): void;
127
+ /**
128
+ * Closes the modal instance with `reason="save"`.
129
+ * @param args
130
+ */
131
+ abstract save(args: SkyFilterItemModalSavedArgs): void;
132
+ }
133
+
134
+ /**
135
+ * A type marker for passing context object data types into the filter modal component.
136
+ */
137
+ interface SkyFilterItemModal<TData = Record<string, unknown> | undefined> {
138
+ /**
139
+ * The filter modal instance to be injected into the component.
140
+ */
141
+ readonly modalInstance: SkyFilterItemModalInstance<TData>;
142
+ }
143
+
144
+ /**
145
+ * Arguments passed to a filter modal when it opens.
146
+ */
147
+ interface SkyFilterItemModalOpenedArgs<TData = Record<string, unknown> | undefined> {
148
+ /**
149
+ * The unique identifier for the filter.
150
+ */
151
+ filterId: string;
152
+ /**
153
+ * An observable representing data that is passed to the filter modal as additional context.
154
+ */
155
+ data?: Observable<TData>;
156
+ }
157
+
158
+ type SkyFilterItemModalSizeType = 'small' | 'medium' | 'large' | 'fullScreen';
159
+
160
+ /**
161
+ * A filter bar item that opens a modal for complex filter configuration.
162
+ * Use this component when your filter requires a rich UI with multiple inputs,
163
+ * date pickers, or other complex controls that don't fit in an inline filter.
164
+ */
165
+ declare class SkyFilterItemModalComponent<TData = Record<string, unknown> | undefined> implements SkyFilterItem {
166
+ #private;
167
+ /**
168
+ * A unique identifier for the filter item.
169
+ * @required
170
+ */
171
+ readonly filterId: _angular_core.InputSignal<string>;
172
+ /**
173
+ * The label to display for the filter item.
174
+ * @required
175
+ */
176
+ readonly labelText: _angular_core.InputSignal<string>;
177
+ /**
178
+ * The modal component to display when the user selects the filter.
179
+ * The component needs to inject a `SkyFilterItemModalInstance` object on instantiation to receive the modal instance and context from the modal service.
180
+ * The return value of the modal save action needs to be a `SkyFilterBarFilterValue`.
181
+ * @required
182
+ */
183
+ readonly modalComponent: _angular_core.InputSignal<Type<SkyFilterItemModal<TData>>>;
184
+ /**
185
+ * The size of the modal to display. The valid options are `"small"`, `"medium"`, `"large"`, and `"fullScreen"`.
186
+ */
187
+ readonly modalSize: _angular_core.InputSignal<SkyFilterItemModalSizeType>;
188
+ /**
189
+ * Fires when the user clicks the filter item. To pass additional context data to a filter modal, consumers
190
+ * must subscribe to this event and return the context using the observable property on the event args.
191
+ */
192
+ modalOpened: EventEmitter<SkyFilterItemModalOpenedArgs<TData>>;
193
+ readonly templateRef: _angular_core.Signal<TemplateRef<any> | undefined>;
194
+ readonly filterValue: _angular_core.Signal<_skyux_filter_bar.SkyFilterBarFilterValue | undefined>;
195
+ protected openFilter(): void;
196
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SkyFilterItemModalComponent<any>, never>;
197
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SkyFilterItemModalComponent<any>, "sky-filter-item-modal", never, { "filterId": { "alias": "filterId"; "required": true; "isSignal": true; }; "labelText": { "alias": "labelText"; "required": true; "isSignal": true; }; "modalComponent": { "alias": "modalComponent"; "required": true; "isSignal": true; }; "modalSize": { "alias": "modalSize"; "required": true; "isSignal": true; }; }, { "modalOpened": "modalOpened"; }, never, never, true, never>;
198
+ }
199
+
200
+ declare class SkyFilterBarModule {
201
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SkyFilterBarModule, never>;
202
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<SkyFilterBarModule, never, [typeof SkyFilterBarComponent, typeof SkyFilterItemModalComponent], [typeof SkyFilterBarComponent, typeof SkyFilterItemModalComponent]>;
203
+ static ɵinj: _angular_core.ɵɵInjectorDeclaration<SkyFilterBarModule>;
204
+ }
205
+
206
+ export { SkyFilterBarModule, SkyFilterItemModalContext, SkyFilterItemModalInstance, SkyFilterBarComponent as λ1, SkyFilterItemModalComponent as λ2 };
207
+ export type { SkyFilterBarFilterItem, SkyFilterBarFilterValue, SkyFilterItemModal, SkyFilterItemModalOpenedArgs, SkyFilterItemModalSavedArgs, SkyFilterItemModalSizeType };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/filter-bar",
3
- "version": "12.40.0",
3
+ "version": "13.0.0-alpha.12",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "keywords": [
6
6
  "blackbaud",
@@ -16,15 +16,15 @@
16
16
  },
17
17
  "homepage": "https://github.com/blackbaud/skyux#reamde",
18
18
  "peerDependencies": {
19
- "@angular/cdk": "^19.2.19",
20
- "@angular/common": "^19.2.14",
21
- "@angular/core": "^19.2.14",
22
- "@skyux/core": "12.40.0",
23
- "@skyux/i18n": "12.40.0",
24
- "@skyux/icon": "12.40.0",
25
- "@skyux/layout": "12.40.0",
26
- "@skyux/lookup": "12.40.0",
27
- "@skyux/modals": "12.40.0"
19
+ "@angular/cdk": "^20.0.4",
20
+ "@angular/common": "^20.0.5",
21
+ "@angular/core": "^20.0.5",
22
+ "@skyux/core": "13.0.0-alpha.12",
23
+ "@skyux/i18n": "13.0.0-alpha.12",
24
+ "@skyux/icon": "13.0.0-alpha.12",
25
+ "@skyux/layout": "13.0.0-alpha.12",
26
+ "@skyux/lookup": "13.0.0-alpha.12",
27
+ "@skyux/modals": "13.0.0-alpha.12"
28
28
  },
29
29
  "dependencies": {
30
30
  "tslib": "^2.8.1"
@@ -1,5 +1,97 @@
1
+ import { BaseHarnessFilters, HarnessPredicate } from '@angular/cdk/testing';
2
+ import { SkyHarnessFilters, SkyComponentHarness } from '@skyux/core/testing';
3
+ import { SkySelectionModalHarness } from '@skyux/lookup/testing';
4
+
1
5
  /**
2
- * Generated bundle index. Do not edit.
6
+ * A set of criteria that can be used to filter a list of `SkyFilterBarHarness` instances.
3
7
  */
4
- /// <amd-module name="@skyux/filter-bar/testing" />
5
- export * from './public-api';
8
+ interface SkyFilterBarHarnessFilters extends SkyHarnessFilters {
9
+ }
10
+
11
+ /**
12
+ * A set of criteria that can be used to filter a list of `SkyFilterItemHarness` instances.
13
+ */
14
+ interface SkyFilterItemHarnessFilters extends BaseHarnessFilters {
15
+ /**
16
+ * Finds a filter item whose filter id matches the given value.
17
+ */
18
+ filterId?: string;
19
+ /**
20
+ * Finds a filter item whose label text matches the given value.
21
+ */
22
+ labelText?: string;
23
+ }
24
+
25
+ /**
26
+ * Harness to interact with a filter item component in tests.
27
+ */
28
+ declare class SkyFilterItemHarness extends SkyComponentHarness {
29
+ #private;
30
+ /**
31
+ * @internal
32
+ */
33
+ static hostSelector: string;
34
+ /**
35
+ * Gets a `HarnessPredicate` that can be used to search for a
36
+ * `SkyFilterBarItemHarness` that meets certain criteria.
37
+ */
38
+ static with(filters: SkyFilterItemHarnessFilters): HarnessPredicate<SkyFilterItemHarness>;
39
+ /**
40
+ * Clicks the filter item to open its modal.
41
+ */
42
+ click(): Promise<void>;
43
+ /**
44
+ * Gets the filter item value.
45
+ */
46
+ getFilterValue(): Promise<string | undefined>;
47
+ /**
48
+ * Gets the filter item label.
49
+ */
50
+ getLabelText(): Promise<string>;
51
+ }
52
+
53
+ /**
54
+ * Harness for interacting with a filter bar component in tests.
55
+ */
56
+ declare class SkyFilterBarHarness extends SkyComponentHarness {
57
+ #private;
58
+ /**
59
+ * @internal
60
+ */
61
+ static hostSelector: string;
62
+ /**
63
+ * Gets a `HarnessPredicate` that can be used to search for a
64
+ * `SkyFilterBarHarness` that meets certain criteria.
65
+ */
66
+ static with(filters: SkyFilterBarHarnessFilters): HarnessPredicate<SkyFilterBarHarness>;
67
+ /**
68
+ * Clicks the clear filters button.
69
+ */
70
+ clickClearFilters(): Promise<void>;
71
+ /**
72
+ * Gets a specific filter item based on the filter criteria.
73
+ * @param filter The filter criteria.
74
+ */
75
+ getItem(filter: SkyFilterItemHarnessFilters): Promise<SkyFilterItemHarness>;
76
+ /**
77
+ * Gets an array of filter items based on the filter criteria.
78
+ * If no filter is provided, returns all filter items.
79
+ * @param filters The optional filter criteria.
80
+ */
81
+ getItems(filters?: SkyFilterItemHarnessFilters): Promise<SkyFilterItemHarness[]>;
82
+ /**
83
+ * Checks if the filter bar has active filters.
84
+ */
85
+ hasActiveFilters(): Promise<boolean>;
86
+ /**
87
+ * Checks if the filter picker button is visible.
88
+ */
89
+ hasFilterPicker(): Promise<boolean>;
90
+ /**
91
+ * Clicks the filter picker button and returns a harness for the selection modal that it opened.
92
+ */
93
+ openFilterPicker(): Promise<SkySelectionModalHarness>;
94
+ }
95
+
96
+ export { SkyFilterBarHarness, SkyFilterItemHarness };
97
+ export type { SkyFilterBarHarnessFilters, SkyFilterItemHarnessFilters };
@@ -1,24 +0,0 @@
1
- import { SkyFilterBarFilterItem } from './models/filter-bar-filter-item';
2
- import { SkyFilterItem } from './models/filter-item';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * The top-level filter bar component.
6
- */
7
- export declare class SkyFilterBarComponent {
8
- #private;
9
- /**
10
- * An array of filter items containing the IDs and values of the filters that have been set.
11
- */
12
- readonly appliedFilters: import("@angular/core").ModelSignal<SkyFilterBarFilterItem[] | undefined>;
13
- /**
14
- * An array of filter IDs that the user has selected using the built-in selection modal. Setting this input to undefined results in all filters being displayed.
15
- */
16
- readonly selectedFilterIds: import("@angular/core").ModelSignal<string[] | undefined>;
17
- protected readonly filterItems: import("@angular/core").Signal<readonly SkyFilterItem[]>;
18
- protected readonly visibleFilters: import("@angular/core").Signal<SkyFilterItem[]>;
19
- constructor();
20
- protected openFilters(): void;
21
- protected clearFilters(): void;
22
- static ɵfac: i0.ɵɵFactoryDeclaration<SkyFilterBarComponent, never>;
23
- static ɵcmp: i0.ɵɵComponentDeclaration<SkyFilterBarComponent, "sky-filter-bar", never, { "appliedFilters": { "alias": "appliedFilters"; "required": false; "isSignal": true; }; "selectedFilterIds": { "alias": "selectedFilterIds"; "required": false; "isSignal": true; }; }, { "appliedFilters": "appliedFiltersChange"; "selectedFilterIds": "selectedFilterIdsChange"; }, ["filterItems"], never, true, never>;
24
- }
@@ -1,8 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./filter-bar.component";
3
- import * as i2 from "./filter-item-modal.component";
4
- export declare class SkyFilterBarModule {
5
- static ɵfac: i0.ɵɵFactoryDeclaration<SkyFilterBarModule, never>;
6
- static ɵmod: i0.ɵɵNgModuleDeclaration<SkyFilterBarModule, never, [typeof i1.SkyFilterBarComponent, typeof i2.SkyFilterItemModalComponent], [typeof i1.SkyFilterBarComponent, typeof i2.SkyFilterItemModalComponent]>;
7
- static ɵinj: i0.ɵɵInjectorDeclaration<SkyFilterBarModule>;
8
- }
@@ -1,28 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { SkyFilterBarFilterItem } from './models/filter-bar-filter-item';
3
- import { SkyFilterBarFilterValue } from './models/filter-bar-filter-value';
4
- import * as i0 from "@angular/core";
5
- /**
6
- * Service for filter items to emit value changes to the filter bar.
7
- * @internal
8
- */
9
- export declare class SkyFilterBarService {
10
- #private;
11
- /**
12
- * Observable stream of filter item updates.
13
- */
14
- readonly filterItemUpdated: Observable<SkyFilterBarFilterItem>;
15
- /**
16
- * Filtered observable stream of filter value updates.
17
- * @param filterId the
18
- * @returns
19
- */
20
- getFilterValueUpdates(filterId: string): Observable<SkyFilterBarFilterValue | undefined>;
21
- /**
22
- * Emit a filter value update.
23
- */
24
- updateFilter(filter: SkyFilterBarFilterItem): void;
25
- updateFilters(filters: SkyFilterBarFilterItem[]): void;
26
- static ɵfac: i0.ɵɵFactoryDeclaration<SkyFilterBarService, never>;
27
- static ɵprov: i0.ɵɵInjectableDeclaration<SkyFilterBarService>;
28
- }
@@ -1,45 +0,0 @@
1
- import { EventEmitter, TemplateRef, Type } from '@angular/core';
2
- import { SkyFilterItem } from './models/filter-item';
3
- import { SkyFilterItemModal } from './models/filter-item-modal';
4
- import { SkyFilterItemModalOpenedArgs } from './models/filter-item-modal-opened-args';
5
- import { SkyFilterItemModalSizeType } from './models/filter-item-modal-size';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * A filter bar item that opens a modal for complex filter configuration.
9
- * Use this component when your filter requires a rich UI with multiple inputs,
10
- * date pickers, or other complex controls that don't fit in an inline filter.
11
- */
12
- export declare class SkyFilterItemModalComponent<TData = Record<string, unknown> | undefined> implements SkyFilterItem {
13
- #private;
14
- /**
15
- * A unique identifier for the filter item.
16
- * @required
17
- */
18
- readonly filterId: import("@angular/core").InputSignal<string>;
19
- /**
20
- * The label to display for the filter item.
21
- * @required
22
- */
23
- readonly labelText: import("@angular/core").InputSignal<string>;
24
- /**
25
- * The modal component to display when the user selects the filter.
26
- * The component needs to inject a `SkyFilterItemModalInstance` object on instantiation to receive the modal instance and context from the modal service.
27
- * The return value of the modal save action needs to be a `SkyFilterBarFilterValue`.
28
- * @required
29
- */
30
- readonly modalComponent: import("@angular/core").InputSignal<Type<SkyFilterItemModal<TData>>>;
31
- /**
32
- * The size of the modal to display. The valid options are `"small"`, `"medium"`, `"large"`, and `"fullScreen"`.
33
- */
34
- readonly modalSize: import("@angular/core").InputSignal<SkyFilterItemModalSizeType>;
35
- /**
36
- * Fires when the user clicks the filter item. To pass additional context data to a filter modal, consumers
37
- * must subscribe to this event and return the context using the observable property on the event args.
38
- */
39
- modalOpened: EventEmitter<SkyFilterItemModalOpenedArgs<TData>>;
40
- readonly templateRef: import("@angular/core").Signal<TemplateRef<any> | undefined>;
41
- readonly filterValue: import("@angular/core").Signal<import("@skyux/filter-bar").SkyFilterBarFilterValue | undefined>;
42
- protected openFilter(): void;
43
- static ɵfac: i0.ɵɵFactoryDeclaration<SkyFilterItemModalComponent<any>, never>;
44
- static ɵcmp: i0.ɵɵComponentDeclaration<SkyFilterItemModalComponent<any>, "sky-filter-item-modal", never, { "filterId": { "alias": "filterId"; "required": true; "isSignal": true; }; "labelText": { "alias": "labelText"; "required": true; "isSignal": true; }; "modalComponent": { "alias": "modalComponent"; "required": true; "isSignal": true; }; "modalSize": { "alias": "modalSize"; "required": true; "isSignal": true; }; }, { "modalOpened": "modalOpened"; }, never, never, true, never>;
45
- }
@@ -1,7 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import { SkyFilterItem } from './models/filter-item';
3
- /**
4
- * A token for filter bar items.
5
- * @internal
6
- */
7
- export declare const SKY_FILTER_ITEM: InjectionToken<SkyFilterItem>;
@@ -1,14 +0,0 @@
1
- import { SkyFilterBarFilterValue } from './filter-bar-filter-value';
2
- /**
3
- * Represents a specific filter item and its selected value, if any.
4
- */
5
- export interface SkyFilterBarFilterItem {
6
- /**
7
- * A unique identifier for the filter item.
8
- */
9
- filterId: string;
10
- /**
11
- * The value of the filter item.
12
- */
13
- filterValue?: SkyFilterBarFilterValue;
14
- }
@@ -1,13 +0,0 @@
1
- /**
2
- * Represents a value for a filter item.
3
- */
4
- export interface SkyFilterBarFilterValue {
5
- /**
6
- * The real value for the filter.
7
- */
8
- value: unknown;
9
- /**
10
- * A human-readable string for use with values that can't be displayed to the user.
11
- */
12
- displayValue?: string;
13
- }
@@ -1,19 +0,0 @@
1
- import { SkyFilterBarFilterValue } from './filter-bar-filter-value';
2
- /**
3
- * An internal representation of a filter item displayed on the filter bar.
4
- * @internal
5
- */
6
- export interface SkyFilterBarItem {
7
- /**
8
- * A unique identifier for the filter.
9
- */
10
- filterId: string;
11
- /**
12
- * The human-readable display string for the filter.
13
- */
14
- labelText: string;
15
- /**
16
- * The value of the filter, if it is set.
17
- */
18
- filterValue?: SkyFilterBarFilterValue;
19
- }
@@ -1,24 +0,0 @@
1
- import { SkyFilterBarFilterValue } from './filter-bar-filter-value';
2
- /**
3
- * The context object that is provided to a filter modal.
4
- */
5
- export declare class SkyFilterItemModalContext<TData = Record<string, unknown>> {
6
- /**
7
- * The name of the filter. We recommend using this value for the modal's heading.
8
- */
9
- readonly filterLabelText: string;
10
- /**
11
- * The value of the filter.
12
- */
13
- readonly filterValue?: SkyFilterBarFilterValue;
14
- /**
15
- * An untyped property that can track any config information relevant to the filter modal
16
- * that existing options do not include.
17
- */
18
- readonly additionalContext?: TData;
19
- constructor(args: {
20
- filterLabelText: string;
21
- filterValue?: SkyFilterBarFilterValue;
22
- additionalContext?: TData;
23
- });
24
- }
@@ -1,20 +0,0 @@
1
- import { SkyFilterItemModalContext } from './filter-item-modal-context';
2
- import { SkyFilterItemModalSavedArgs } from './filter-item-modal-saved-args';
3
- /**
4
- * A specialized `SkyModalInstance` wrapper.
5
- */
6
- export declare abstract class SkyFilterItemModalInstance<TData = Record<string, unknown>> {
7
- /**
8
- * The context provided to the filter modal component.
9
- */
10
- abstract readonly context: SkyFilterItemModalContext<TData>;
11
- /**
12
- * Closes the modal instance with `reason="cancel"`.
13
- */
14
- abstract cancel(): void;
15
- /**
16
- * Closes the modal instance with `reason="save"`.
17
- * @param args
18
- */
19
- abstract save(args: SkyFilterItemModalSavedArgs): void;
20
- }
@@ -1,14 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- /**
3
- * Arguments passed to a filter modal when it opens.
4
- */
5
- export interface SkyFilterItemModalOpenedArgs<TData = Record<string, unknown> | undefined> {
6
- /**
7
- * The unique identifier for the filter.
8
- */
9
- filterId: string;
10
- /**
11
- * An observable representing data that is passed to the filter modal as additional context.
12
- */
13
- data?: Observable<TData>;
14
- }
@@ -1,10 +0,0 @@
1
- import { SkyFilterBarFilterValue } from './filter-bar-filter-value';
2
- /**
3
- * Arguments passed back from a filter modal when the user has saved.
4
- */
5
- export interface SkyFilterItemModalSavedArgs {
6
- /**
7
- * The filter value.
8
- */
9
- filterValue: SkyFilterBarFilterValue | undefined;
10
- }
@@ -1 +0,0 @@
1
- export type SkyFilterItemModalSizeType = 'small' | 'medium' | 'large' | 'fullScreen';
@@ -1,10 +0,0 @@
1
- import { SkyFilterItemModalInstance } from './filter-item-modal-instance';
2
- /**
3
- * A type marker for passing context object data types into the filter modal component.
4
- */
5
- export interface SkyFilterItemModal<TData = Record<string, unknown> | undefined> {
6
- /**
7
- * The filter modal instance to be injected into the component.
8
- */
9
- readonly modalInstance: SkyFilterItemModalInstance<TData>;
10
- }
@@ -1,26 +0,0 @@
1
- import { Signal, TemplateRef } from '@angular/core';
2
- import { SkyFilterBarFilterValue } from './filter-bar-filter-value';
3
- /**
4
- * Defines the common properties various filter item types must implement to work with the filter bar component.
5
- * @internal
6
- */
7
- export interface SkyFilterItem {
8
- /**
9
- * A unique identifier for the filter item.
10
- */
11
- filterId: Signal<string>;
12
- /**
13
- * The label for the filter item.
14
- */
15
- labelText: Signal<string>;
16
- /**
17
- * The template of the filter that is rendered by the filter bar.
18
- * @internal
19
- */
20
- templateRef: Signal<TemplateRef<unknown> | undefined>;
21
- /**
22
- * The value of the filter item.
23
- * @internal
24
- */
25
- filterValue: Signal<SkyFilterBarFilterValue | undefined>;
26
- }
@@ -1,10 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "@skyux/i18n";
3
- /**
4
- * Import into any component library module that needs to use resource strings.
5
- */
6
- export declare class SkyFilterBarResourcesModule {
7
- static ɵfac: i0.ɵɵFactoryDeclaration<SkyFilterBarResourcesModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<SkyFilterBarResourcesModule, never, never, [typeof i1.SkyI18nModule]>;
9
- static ɵinj: i0.ɵɵInjectorDeclaration<SkyFilterBarResourcesModule>;
10
- }
@@ -1,6 +0,0 @@
1
- import { SkyHarnessFilters } from '@skyux/core/testing';
2
- /**
3
- * A set of criteria that can be used to filter a list of `SkyFilterBarHarness` instances.
4
- */
5
- export interface SkyFilterBarHarnessFilters extends SkyHarnessFilters {
6
- }