@rededor/site-front-end-lib 1.3.8 → 1.3.10
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/filter-letter-and-terms/filter-letter-and-terms.component.mjs +6 -3
- package/esm2022/lib/components/filters/filter-generic/filter-generic.component.mjs +217 -0
- package/esm2022/lib/components/filters/filter-planos-convenios/filter-planos-convenios.component.mjs +3 -3
- package/esm2022/lib/components/index.mjs +2 -1
- package/esm2022/lib/enums/Filter.enum.mjs +9 -0
- package/esm2022/lib/enums/index.mjs +2 -1
- package/esm2022/lib/models/centro-medico.model.mjs +1 -1
- package/esm2022/lib/models/filters/filter-planos-convenios.model.mjs +1 -1
- package/esm2022/lib/models/filters/filter-section.type.mjs +2 -0
- package/esm2022/lib/models/filters/filter-sections.model.mjs +2 -0
- package/fesm2022/rededor-site-front-end-lib.mjs +227 -5
- package/fesm2022/rededor-site-front-end-lib.mjs.map +1 -1
- package/lib/components/filter-letter-and-terms/filter-letter-and-terms.component.d.ts +3 -0
- package/lib/components/filters/filter-generic/filter-generic.component.d.ts +56 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/enums/Filter.enum.d.ts +7 -0
- package/lib/enums/index.d.ts +1 -0
- package/lib/models/centro-medico.model.d.ts +5 -0
- package/lib/models/filters/filter-planos-convenios.model.d.ts +11 -0
- package/lib/models/filters/filter-section.type.d.ts +12 -0
- package/lib/models/filters/filter-sections.model.d.ts +51 -0
- package/package.json +1 -1
|
@@ -17,6 +17,9 @@ export declare class FilterLetterAndTermsComponent implements AfterViewInit {
|
|
|
17
17
|
get style(): {
|
|
18
18
|
'--font-family': string | null;
|
|
19
19
|
'--neutral-purewhite': string | null;
|
|
20
|
+
'--neutral-pale': string | null;
|
|
21
|
+
'--neutral-light': string | null;
|
|
22
|
+
'--neutral-dark': string | null;
|
|
20
23
|
'--neutral-black': string | null;
|
|
21
24
|
'--color-one-light': string | null;
|
|
22
25
|
'--color-one-base': string | null;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { FormControl } from '@angular/forms';
|
|
3
|
+
import { CuraService } from '../../../services';
|
|
4
|
+
import { FilterControlValue, FilterSection } from '../../../models/filters/filter-section.type';
|
|
5
|
+
import { FilterPlanosConveniosChange } from '../../../models/filters/filter-planos-convenios.model';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class FilterGenericComponent implements OnInit {
|
|
8
|
+
private readonly curaService;
|
|
9
|
+
private readonly cdr;
|
|
10
|
+
private readonly platformId;
|
|
11
|
+
filterChange: EventEmitter<FilterPlanosConveniosChange | null>;
|
|
12
|
+
closeModal: EventEmitter<boolean>;
|
|
13
|
+
openMobileFilter: EventEmitter<void>;
|
|
14
|
+
withContainerStyle: boolean;
|
|
15
|
+
showClearButton: boolean;
|
|
16
|
+
showApplyButton: boolean;
|
|
17
|
+
showCloseButton: boolean;
|
|
18
|
+
disableButtonsWithoutSelection: boolean;
|
|
19
|
+
showBadge: boolean;
|
|
20
|
+
showToggleIcon: boolean;
|
|
21
|
+
isFilterOpen: boolean;
|
|
22
|
+
mobileBehavior: boolean;
|
|
23
|
+
forceCollapsed: boolean;
|
|
24
|
+
emitOnReset: boolean;
|
|
25
|
+
textTitle: string;
|
|
26
|
+
sections: FilterSection[];
|
|
27
|
+
selectedFiltersCount: number;
|
|
28
|
+
windowWidth: number;
|
|
29
|
+
styleBinding: {
|
|
30
|
+
'--neutral-darker': string | null;
|
|
31
|
+
'--neutral-light': string | null;
|
|
32
|
+
'--neutral-lighter': string | null;
|
|
33
|
+
'--neutral-purewhite': string | null;
|
|
34
|
+
};
|
|
35
|
+
constructor(curaService: CuraService, cdr: ChangeDetectorRef, platformId: object);
|
|
36
|
+
ngOnInit(): void;
|
|
37
|
+
handleInputChange(event: any, control: FormControl): void;
|
|
38
|
+
handleSelectChange(event: any, control: FormControl): void;
|
|
39
|
+
handleCheckboxChange(event: any, options: any[]): void;
|
|
40
|
+
handleRadioChange(event: any, control: FormControl): void;
|
|
41
|
+
filter(): void;
|
|
42
|
+
reset(): void;
|
|
43
|
+
close(): void;
|
|
44
|
+
toggleFilter(): void;
|
|
45
|
+
hasSelection(): boolean;
|
|
46
|
+
isMobile(): boolean;
|
|
47
|
+
getRadioGroupValue(control?: FormControl<FilterControlValue>): any;
|
|
48
|
+
private emitFilterChange;
|
|
49
|
+
private updateSelectedFiltersCount;
|
|
50
|
+
private resetAllControls;
|
|
51
|
+
private updateCheckboxGroup;
|
|
52
|
+
private buildFilterData;
|
|
53
|
+
private isFilterDataEmpty;
|
|
54
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FilterGenericComponent, never>;
|
|
55
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FilterGenericComponent, "rdsite-filter-generic", never, { "withContainerStyle": { "alias": "withContainerStyle"; "required": false; }; "showClearButton": { "alias": "showClearButton"; "required": false; }; "showApplyButton": { "alias": "showApplyButton"; "required": false; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; }; "disableButtonsWithoutSelection": { "alias": "disableButtonsWithoutSelection"; "required": false; }; "showBadge": { "alias": "showBadge"; "required": false; }; "showToggleIcon": { "alias": "showToggleIcon"; "required": false; }; "isFilterOpen": { "alias": "isFilterOpen"; "required": false; }; "mobileBehavior": { "alias": "mobileBehavior"; "required": false; }; "forceCollapsed": { "alias": "forceCollapsed"; "required": false; }; "emitOnReset": { "alias": "emitOnReset"; "required": false; }; "textTitle": { "alias": "textTitle"; "required": false; }; "sections": { "alias": "sections"; "required": false; }; }, { "filterChange": "filterChange"; "closeModal": "closeModal"; "openMobileFilter": "openMobileFilter"; }, never, never, true, never>;
|
|
56
|
+
}
|
|
@@ -27,6 +27,7 @@ export * from './cta-wrapper/cta-wrapper.component';
|
|
|
27
27
|
export * from './page-header/page-header.component';
|
|
28
28
|
export * from './breadcrumbs/breadcrumbs.component';
|
|
29
29
|
export * from './page-template-sidebar/page-template-sidebar.component';
|
|
30
|
+
export * from './filters/filter-generic/filter-generic.component';
|
|
30
31
|
export * from './filters/filter-planos-convenios/filter-planos-convenios.component';
|
|
31
32
|
export * from './filter-letter-and-terms/filter-letter-and-terms.component';
|
|
32
33
|
export * from './section-navigation/section-navigation.component';
|
package/lib/enums/index.d.ts
CHANGED
|
@@ -10,3 +10,14 @@ export interface FilterPlanosConveniosChange {
|
|
|
10
10
|
estado: string | number | null;
|
|
11
11
|
cobertura: FilterPlanosConveniosCobertura[];
|
|
12
12
|
}
|
|
13
|
+
export interface FilterOption {
|
|
14
|
+
label: string;
|
|
15
|
+
value: string | number;
|
|
16
|
+
checked?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface FilterSectionBase<T extends string, C> {
|
|
20
|
+
type: T;
|
|
21
|
+
config: C;
|
|
22
|
+
visible?: boolean;
|
|
23
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FormControl } from '@angular/forms';
|
|
2
|
+
import { InputFilterSection } from './filter-sections.model';
|
|
3
|
+
import { SelectFilterSection } from './filter-sections.model';
|
|
4
|
+
import { CheckboxGroupFilterSection } from './filter-sections.model';
|
|
5
|
+
import { RadioGroupFilterSection } from './filter-sections.model';
|
|
6
|
+
import { CustomFilterSection } from './filter-sections.model';
|
|
7
|
+
export interface RadioGroupValue {
|
|
8
|
+
value: any;
|
|
9
|
+
}
|
|
10
|
+
export type FilterSection = InputFilterSection | SelectFilterSection | CheckboxGroupFilterSection | RadioGroupFilterSection | CustomFilterSection;
|
|
11
|
+
export type FilterControl = FormControl<FilterControlValue>;
|
|
12
|
+
export type FilterControlValue = string | number | boolean | any[] | RadioGroupValue | null;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import { FormControl } from '@angular/forms';
|
|
3
|
+
import { FilterOption, FilterSectionBase } from './filter-planos-convenios.model';
|
|
4
|
+
import { FilterControl } from './filter-section.type';
|
|
5
|
+
import { FilterType } from '../../enums';
|
|
6
|
+
export interface InputFilterConfig {
|
|
7
|
+
name: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
iconName?: string;
|
|
10
|
+
control: FilterControl;
|
|
11
|
+
options?: FilterOption[];
|
|
12
|
+
}
|
|
13
|
+
export interface SelectFilterConfig {
|
|
14
|
+
name: string;
|
|
15
|
+
label?: string;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
includeDefaultOption?: boolean;
|
|
18
|
+
defaultOptionText?: string;
|
|
19
|
+
control: FilterControl;
|
|
20
|
+
options?: FilterOption[];
|
|
21
|
+
}
|
|
22
|
+
export interface CheckboxGroupFilterConfig {
|
|
23
|
+
name: string;
|
|
24
|
+
title?: string;
|
|
25
|
+
subtitle?: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
control: FormControl<any[]>;
|
|
28
|
+
options: FilterOption[];
|
|
29
|
+
}
|
|
30
|
+
export interface RadioGroupFilterConfig {
|
|
31
|
+
name: string;
|
|
32
|
+
title?: string;
|
|
33
|
+
control: FilterControl;
|
|
34
|
+
options: FilterOption[];
|
|
35
|
+
}
|
|
36
|
+
export interface CustomFilterConfig {
|
|
37
|
+
template: TemplateRef<any>;
|
|
38
|
+
control?: any;
|
|
39
|
+
context?: any;
|
|
40
|
+
options?: FilterOption[];
|
|
41
|
+
}
|
|
42
|
+
export interface InputFilterSection extends FilterSectionBase<FilterType.INPUT, InputFilterConfig> {
|
|
43
|
+
}
|
|
44
|
+
export interface SelectFilterSection extends FilterSectionBase<FilterType.SELECT, SelectFilterConfig> {
|
|
45
|
+
}
|
|
46
|
+
export interface CheckboxGroupFilterSection extends FilterSectionBase<FilterType.CHECKBOX_GROUP, CheckboxGroupFilterConfig> {
|
|
47
|
+
}
|
|
48
|
+
export interface RadioGroupFilterSection extends FilterSectionBase<FilterType.RADIO_GROUP, RadioGroupFilterConfig> {
|
|
49
|
+
}
|
|
50
|
+
export interface CustomFilterSection extends FilterSectionBase<FilterType.CUSTOM, CustomFilterConfig> {
|
|
51
|
+
}
|