@rededor/site-front-end-lib 0.0.54 → 0.0.55

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/esm2022/lib/components/breadcrumbs/breadcrumbs.component.mjs +6 -4
  2. package/esm2022/lib/components/cards/card-unidade-planos-convenios/card-unidade-planos-convenios.component.mjs +59 -0
  3. package/esm2022/lib/components/cta-wrapper/cta-wrapper.component.mjs +4 -4
  4. package/esm2022/lib/components/error/error-service/error.service.mjs +1 -1
  5. package/esm2022/lib/components/error/error.component.mjs +46 -19
  6. package/esm2022/lib/components/image/image.component.mjs +61 -0
  7. package/esm2022/lib/components/index.mjs +3 -1
  8. package/esm2022/lib/components/page-header/page-header.component.mjs +11 -8
  9. package/esm2022/lib/components/page-template-sidebar/page-template-sidebar.component.mjs +3 -3
  10. package/esm2022/lib/enums/ImageMimeType.enum.mjs +7 -0
  11. package/esm2022/lib/enums/UnidadeCoverageType.enum.mjs +7 -0
  12. package/esm2022/lib/enums/index.mjs +3 -1
  13. package/esm2022/lib/models/images/rdsite-image.model.mjs +2 -0
  14. package/esm2022/lib/services/cura/cura.service.mjs +3 -3
  15. package/esm2022/lib/tokens/LibConfig.mjs +1 -1
  16. package/fesm2022/rededor-site-front-end-lib.mjs +190 -35
  17. package/fesm2022/rededor-site-front-end-lib.mjs.map +1 -1
  18. package/lib/components/cards/card-unidade-planos-convenios/card-unidade-planos-convenios.component.d.ts +40 -0
  19. package/lib/components/error/error-service/error.service.d.ts +2 -2
  20. package/lib/components/error/error.component.d.ts +8 -6
  21. package/lib/components/image/image.component.d.ts +22 -0
  22. package/lib/components/index.d.ts +2 -0
  23. package/lib/components/page-header/page-header.component.d.ts +3 -4
  24. package/lib/enums/ImageMimeType.enum.d.ts +5 -0
  25. package/lib/enums/UnidadeCoverageType.enum.d.ts +5 -0
  26. package/lib/enums/index.d.ts +2 -0
  27. package/lib/models/images/rdsite-image.model.d.ts +5 -0
  28. package/lib/services/cura/cura.service.d.ts +1 -1
  29. package/lib/tokens/LibConfig.d.ts +1 -0
  30. package/package.json +1 -1
@@ -0,0 +1,40 @@
1
+ import { CuraService } from '../../../services';
2
+ import { RdsiteImage } from '../../../models/images/rdsite-image.model';
3
+ import { ImageMimeType } from '../../../enums/ImageMimeType.enum';
4
+ import { UnidadeCoverageType } from '../../../enums';
5
+ import * as i0 from "@angular/core";
6
+ export declare class CardUnidadePlanosConveniosComponent {
7
+ private readonly curaService;
8
+ title: string;
9
+ subtitle?: string;
10
+ coverage?: {
11
+ title: UnidadeCoverageType;
12
+ list?: {
13
+ title: string;
14
+ isCovered: boolean;
15
+ }[];
16
+ };
17
+ address?: string;
18
+ cta1?: {
19
+ label: string;
20
+ link: string;
21
+ };
22
+ cta2?: {
23
+ label: string;
24
+ link: string;
25
+ };
26
+ logoWebpSrc: string;
27
+ logoDefaultSrc: string;
28
+ logoSizes: RdsiteImage[];
29
+ logoMimeType: ImageMimeType;
30
+ logoAlt: string;
31
+ logoTitle: string;
32
+ styleBinding: {
33
+ '--neutral-light': string | null;
34
+ '--neutral-white': string | null;
35
+ '--neutral-purewhite': string | null;
36
+ };
37
+ constructor(curaService: CuraService);
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<CardUnidadePlanosConveniosComponent, never>;
39
+ static ɵcmp: i0.ɵɵComponentDeclaration<CardUnidadePlanosConveniosComponent, "rdsite-card-unidade-planos-convenios", never, { "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "coverage": { "alias": "coverage"; "required": false; }; "address": { "alias": "address"; "required": false; }; "cta1": { "alias": "cta1"; "required": false; }; "cta2": { "alias": "cta2"; "required": false; }; "logoWebpSrc": { "alias": "logoWebpSrc"; "required": false; }; "logoDefaultSrc": { "alias": "logoDefaultSrc"; "required": false; }; "logoSizes": { "alias": "logoSizes"; "required": false; }; "logoMimeType": { "alias": "logoMimeType"; "required": false; }; "logoAlt": { "alias": "logoAlt"; "required": false; }; "logoTitle": { "alias": "logoTitle"; "required": false; }; }, {}, never, never, true, never>;
40
+ }
@@ -1,6 +1,6 @@
1
1
  import { BehaviorSubject } from 'rxjs';
2
2
  import * as i0 from "@angular/core";
3
- export interface ctas404_502 {
3
+ export interface ctasError {
4
4
  label: string;
5
5
  link: string;
6
6
  icon: string;
@@ -11,7 +11,7 @@ export interface ctasArea {
11
11
  icon: string;
12
12
  }
13
13
  export declare class ErrorService {
14
- ctas: BehaviorSubject<ctas404_502[]>;
14
+ ctas: BehaviorSubject<ctasError[]>;
15
15
  static ɵfac: i0.ɵɵFactoryDeclaration<ErrorService, never>;
16
16
  static ɵprov: i0.ɵɵInjectableDeclaration<ErrorService>;
17
17
  }
@@ -1,11 +1,11 @@
1
- import { AfterViewInit, ElementRef, OnDestroy, OnInit } from '@angular/core';
2
- import { ErrorService, ctas404_502 } from './error-service/error.service';
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
+ import { ErrorService, ctasError } from './error-service/error.service';
3
3
  import { Subscription } from 'rxjs';
4
4
  import { CuraService, LogService, SeoService, ServerResponseService } from '../../services';
5
5
  import { BreadcrumbsItems } from '../../models/breadcrumbs/breadcrumbs-items.model';
6
6
  import { Errors, Themes } from '../../enums';
7
7
  import * as i0 from "@angular/core";
8
- export declare class ErrorComponent implements OnInit, AfterViewInit, OnDestroy {
8
+ export declare class ErrorComponent implements OnInit, OnDestroy {
9
9
  private errorService;
10
10
  private curaService;
11
11
  private logService;
@@ -20,7 +20,7 @@ export declare class ErrorComponent implements OnInit, AfterViewInit, OnDestroy
20
20
  component: string;
21
21
  breadcrumbsItems: BreadcrumbsItems[];
22
22
  ctasSubscription: Subscription;
23
- ctas: ctas404_502[];
23
+ ctas: ctasError[];
24
24
  responseText: string;
25
25
  backgroundColor: string;
26
26
  labelColor: string;
@@ -30,10 +30,12 @@ export declare class ErrorComponent implements OnInit, AfterViewInit, OnDestroy
30
30
  ctasBorderColor: string;
31
31
  ctasIconColor: string;
32
32
  error: typeof Errors;
33
- errorElement: ElementRef<HTMLDivElement>;
33
+ get style(): {
34
+ '--backgroundColor': string | null;
35
+ '--labelColor': string | null;
36
+ };
34
37
  constructor(errorService: ErrorService, curaService: CuraService, logService: LogService, seoService: SeoService, serverResponse: ServerResponseService, platformId: object);
35
38
  ngOnInit(): void;
36
- ngAfterViewInit(): void;
37
39
  setTheme(theme: Themes): void;
38
40
  reloadPage(): void;
39
41
  ngOnDestroy(): void;
@@ -0,0 +1,22 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { ImageMimeType } from '../../enums/ImageMimeType.enum';
3
+ import { RdsiteImage } from '../../models/images/rdsite-image.model';
4
+ import { LibConfig } from '../../tokens/LibConfig';
5
+ import * as i0 from "@angular/core";
6
+ export declare class ImageComponent implements OnInit {
7
+ private libConfig;
8
+ private readonly platformId;
9
+ imageWebpSrc: string;
10
+ imageDefaultSrc: string;
11
+ imageSizes: RdsiteImage[];
12
+ mimeType: ImageMimeType;
13
+ alt: string;
14
+ title: string;
15
+ loading: 'eager' | 'lazy';
16
+ constructor(libConfig: LibConfig, platformId: object);
17
+ ngOnInit(): void;
18
+ private handleServerImageError;
19
+ handleImageError(): void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<ImageComponent, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<ImageComponent, "rdsite-image", never, { "imageWebpSrc": { "alias": "imageWebpSrc"; "required": false; }; "imageDefaultSrc": { "alias": "imageDefaultSrc"; "required": false; }; "imageSizes": { "alias": "imageSizes"; "required": false; }; "mimeType": { "alias": "mimeType"; "required": false; }; "alt": { "alias": "alt"; "required": false; }; "title": { "alias": "title"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; }, {}, never, never, true, never>;
22
+ }
@@ -33,3 +33,5 @@ export * from './breadcrumbs/breadcrumbs.component';
33
33
  export * from './page-template-sidebar/page-template-sidebar.component';
34
34
  export * from './filter-letter-and-terms/filter-letter-and-terms.component';
35
35
  export * from './section-navigation/section-navigation.component';
36
+ export * from './image/image.component';
37
+ export * from './cards/card-unidade-planos-convenios/card-unidade-planos-convenios.component';
@@ -7,12 +7,11 @@ export declare class PageHeaderComponent {
7
7
  pageHeaderText: string;
8
8
  hasPadding: boolean;
9
9
  breadcrumbs: BreadcrumbsItems[];
10
- style: {
11
- '--spacing': string | null;
12
- '--color': string | null;
10
+ bgColor: string;
11
+ get style(): {
13
12
  '--bg-color': string | null;
14
13
  };
15
14
  constructor(curaService: CuraService);
16
15
  static ɵfac: i0.ɵɵFactoryDeclaration<PageHeaderComponent, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<PageHeaderComponent, "rdsite-page-header", never, { "pageTitle": { "alias": "pageTitle"; "required": false; }; "pageHeaderText": { "alias": "pageHeaderText"; "required": false; }; "hasPadding": { "alias": "hasPadding"; "required": false; }; "breadcrumbs": { "alias": "breadcrumbs"; "required": false; }; }, {}, never, ["*"], true, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<PageHeaderComponent, "rdsite-page-header", never, { "pageTitle": { "alias": "pageTitle"; "required": false; }; "pageHeaderText": { "alias": "pageHeaderText"; "required": false; }; "hasPadding": { "alias": "hasPadding"; "required": false; }; "breadcrumbs": { "alias": "breadcrumbs"; "required": false; }; "bgColor": { "alias": "bgColor"; "required": false; }; }, {}, never, ["*"], true, never>;
18
17
  }
@@ -0,0 +1,5 @@
1
+ export declare enum ImageMimeType {
2
+ WEBP = "image/webp",
3
+ JPEG = "image/jpeg",
4
+ PNG = "image/png"
5
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum UnidadeCoverageType {
2
+ TOTAL = "Cobertura completa",
3
+ PARTIAL = "Cobertura apenas para",
4
+ NONE = "Esta unidade n\u00E3o oferece cobertura ao seu plano ou conv\u00EAnio"
5
+ }
@@ -1,7 +1,9 @@
1
1
  export * from './Estados.enum';
2
2
  export * from './EnumDoencaTaxonomy.enum';
3
3
  export * from './IconCuraDefaultType.enum';
4
+ export * from './ImageMimeType.enum';
4
5
  export * from './RdsiteModalComponentStyle.enum';
5
6
  export * from './RdsiteModalDrawerComponentStyle.enum';
6
7
  export * from './EnumThemes.enum';
7
8
  export * from './EnumError.enum';
9
+ export * from './UnidadeCoverageType.enum';
@@ -0,0 +1,5 @@
1
+ export interface RdsiteImage {
2
+ source_url: string;
3
+ media: string;
4
+ mime_type: string;
5
+ }
@@ -15,7 +15,7 @@ export declare class CuraService implements OnDestroy {
15
15
  private curaAPISubscriptionInit;
16
16
  private injectCuraAPI;
17
17
  loadTheme(theme: string): void;
18
- getColor(colorWithDepth: string): string | null;
18
+ getColor(colorWithDepth: string, opacity?: number): string | null;
19
19
  getSpacing(): string | null;
20
20
  getFontFamily(type: string): string | null;
21
21
  getFontWeights(): {
@@ -10,6 +10,7 @@ export interface LibConfig {
10
10
  client_id: string;
11
11
  xOriginApplication: string;
12
12
  searchApiEnv: string;
13
+ fallbackImgSrc: string;
13
14
  iconsetDefaultList: string[];
14
15
  siteApi: {
15
16
  auth: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rededor/site-front-end-lib",
3
- "version": "0.0.54",
3
+ "version": "0.0.55",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.0",
6
6
  "@angular/core": "^17.3.0",