@rededor/site-front-end-lib 0.0.4-alpha.0 → 0.0.4-alpha.2
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/README.md +80 -18
- package/esm2022/lib/directives/rdsite-link/rdsite-link.directive.mjs +8 -2
- package/esm2022/lib/services/modal/modal.service.mjs +1 -1
- package/esm2022/lib/services/seo/seo.service.mjs +2 -2
- package/esm2022/lib/services/transfer-state/transfer-state.service.mjs +28 -7
- package/esm2022/lib/tokens/LibConfig.mjs +1 -1
- package/fesm2022/rededor-site-front-end-lib.mjs +33 -7
- package/fesm2022/rededor-site-front-end-lib.mjs.map +1 -1
- package/lib/directives/rdsite-link/rdsite-link.directive.d.ts +2 -1
- package/lib/services/modal/modal.service.d.ts +1 -1
- package/lib/services/transfer-state/transfer-state.service.d.ts +4 -1
- package/lib/tokens/LibConfig.d.ts +1 -0
- package/package.json +1 -1
|
@@ -32652,7 +32652,7 @@ class SeoService {
|
|
|
32652
32652
|
title: this.getTitle(),
|
|
32653
32653
|
description: this.activeDescription || '',
|
|
32654
32654
|
url: `${siteurl}${pagePath}`,
|
|
32655
|
-
image: `${siteurl}/assets/imgs/logo-
|
|
32655
|
+
image: this.libConfig?.logoPath ? `${siteurl}${this.libConfig.logoPath}` : 'https://www.rededorsaoluiz.com.br/assets/imgs/logo-rededor-blue.png',
|
|
32656
32656
|
};
|
|
32657
32657
|
if (properties) {
|
|
32658
32658
|
defaultProperties = { ...defaultProperties, ...properties };
|
|
@@ -33112,8 +33112,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
|
|
|
33112
33112
|
}] }] });
|
|
33113
33113
|
|
|
33114
33114
|
class TransferStateService {
|
|
33115
|
-
constructor(transferState) {
|
|
33115
|
+
constructor(transferState, platformId) {
|
|
33116
33116
|
this.transferState = transferState;
|
|
33117
|
+
this.platformId = platformId;
|
|
33117
33118
|
this.keys = new Map();
|
|
33118
33119
|
}
|
|
33119
33120
|
setKey(name, response) {
|
|
@@ -33122,7 +33123,8 @@ class TransferStateService {
|
|
|
33122
33123
|
key = makeStateKey(name);
|
|
33123
33124
|
this.keys.set(name, key);
|
|
33124
33125
|
}
|
|
33125
|
-
this.
|
|
33126
|
+
const newResponse = this.encryptResponseBase64(response);
|
|
33127
|
+
this.transferState.set(key, newResponse);
|
|
33126
33128
|
}
|
|
33127
33129
|
getKey(name, defaultValue = null) {
|
|
33128
33130
|
let key = this.keys.get(name);
|
|
@@ -33131,7 +33133,8 @@ class TransferStateService {
|
|
|
33131
33133
|
this.keys.set(name, key);
|
|
33132
33134
|
}
|
|
33133
33135
|
const response = this.transferState.get(key, defaultValue);
|
|
33134
|
-
|
|
33136
|
+
const newResponse = this.decryptResponseBase64(response);
|
|
33137
|
+
return newResponse;
|
|
33135
33138
|
}
|
|
33136
33139
|
remove(name) {
|
|
33137
33140
|
let key = this.keys.get(name);
|
|
@@ -33141,7 +33144,21 @@ class TransferStateService {
|
|
|
33141
33144
|
}
|
|
33142
33145
|
this.transferState.remove(key);
|
|
33143
33146
|
}
|
|
33144
|
-
|
|
33147
|
+
encryptResponseBase64(response) {
|
|
33148
|
+
const responseString = JSON.stringify(response);
|
|
33149
|
+
if (isPlatformBrowser(this.platformId) && typeof window !== 'undefined') {
|
|
33150
|
+
return atob(responseString);
|
|
33151
|
+
}
|
|
33152
|
+
return Buffer.from(responseString).toString('base64');
|
|
33153
|
+
}
|
|
33154
|
+
decryptResponseBase64(response) {
|
|
33155
|
+
const responseParsed = JSON.parse(response);
|
|
33156
|
+
if (isPlatformBrowser(this.platformId) && typeof window !== 'undefined') {
|
|
33157
|
+
return btoa(responseParsed);
|
|
33158
|
+
}
|
|
33159
|
+
return Buffer.from(responseParsed, 'base64').toString();
|
|
33160
|
+
}
|
|
33161
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: TransferStateService, deps: [{ token: i0.TransferState }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
33145
33162
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: TransferStateService, providedIn: 'root' }); }
|
|
33146
33163
|
}
|
|
33147
33164
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: TransferStateService, decorators: [{
|
|
@@ -33149,7 +33166,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
|
|
|
33149
33166
|
args: [{
|
|
33150
33167
|
providedIn: 'root',
|
|
33151
33168
|
}]
|
|
33152
|
-
}], ctorParameters: () => [{ type: i0.TransferState }
|
|
33169
|
+
}], ctorParameters: () => [{ type: i0.TransferState }, { type: undefined, decorators: [{
|
|
33170
|
+
type: Inject,
|
|
33171
|
+
args: [PLATFORM_ID]
|
|
33172
|
+
}] }] });
|
|
33153
33173
|
|
|
33154
33174
|
class TestComponent {
|
|
33155
33175
|
constructor(curaService) {
|
|
@@ -33269,6 +33289,7 @@ class RdsiteLinkDirective {
|
|
|
33269
33289
|
this.siteUrlList = ['rededorsaoluiz', 'rededorlabs'];
|
|
33270
33290
|
this.allowedTags = ['A', 'CURA-BUTTON', 'CURA-BUTTON-OUTLINE', 'CURA-BUTTON-TRANSPARENT'];
|
|
33271
33291
|
this.anchorAdjustment = null;
|
|
33292
|
+
this.anchorExtraAdjustment = null;
|
|
33272
33293
|
this.phonemodal = null;
|
|
33273
33294
|
}
|
|
33274
33295
|
onClick(event) {
|
|
@@ -33329,6 +33350,9 @@ class RdsiteLinkDirective {
|
|
|
33329
33350
|
if (this.anchorAdjustment) {
|
|
33330
33351
|
adjustment = this.anchorAdjustment;
|
|
33331
33352
|
}
|
|
33353
|
+
if (this.anchorExtraAdjustment) {
|
|
33354
|
+
adjustment += this.anchorExtraAdjustment;
|
|
33355
|
+
}
|
|
33332
33356
|
const bodyTop = this.document?.body?.getBoundingClientRect()?.top ?? 0;
|
|
33333
33357
|
const hrefTop = this.document?.querySelector(href)?.getBoundingClientRect()?.top ?? 0;
|
|
33334
33358
|
const scrollTop = bodyTop * -1 + hrefTop - adjustment;
|
|
@@ -33350,7 +33374,7 @@ class RdsiteLinkDirective {
|
|
|
33350
33374
|
this.router.navigate([path], { queryParams: queryParams });
|
|
33351
33375
|
}
|
|
33352
33376
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: RdsiteLinkDirective, deps: [{ token: i1$2.Router }, { token: PLATFORM_ID }, { token: DOCUMENT }, { token: LIB_CONFIG }, { token: i0.ElementRef }, { token: PhoneService }, { token: RdsitePhoneModalDirective }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
33353
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.11", type: RdsiteLinkDirective, isStandalone: true, selector: "[rdsitelink]", inputs: { anchorAdjustment: "anchorAdjustment", phonemodal: "phonemodal" }, host: { listeners: { "click": "onClick($event)" } }, providers: [RdsitePhoneModalDirective], ngImport: i0 }); }
|
|
33377
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.11", type: RdsiteLinkDirective, isStandalone: true, selector: "[rdsitelink]", inputs: { anchorAdjustment: "anchorAdjustment", anchorExtraAdjustment: "anchorExtraAdjustment", phonemodal: "phonemodal" }, host: { listeners: { "click": "onClick($event)" } }, providers: [RdsitePhoneModalDirective], ngImport: i0 }); }
|
|
33354
33378
|
}
|
|
33355
33379
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: RdsiteLinkDirective, decorators: [{
|
|
33356
33380
|
type: Directive,
|
|
@@ -33371,6 +33395,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
|
|
|
33371
33395
|
args: [LIB_CONFIG]
|
|
33372
33396
|
}] }, { type: i0.ElementRef }, { type: PhoneService }, { type: RdsitePhoneModalDirective }], propDecorators: { anchorAdjustment: [{
|
|
33373
33397
|
type: Input
|
|
33398
|
+
}], anchorExtraAdjustment: [{
|
|
33399
|
+
type: Input
|
|
33374
33400
|
}], phonemodal: [{
|
|
33375
33401
|
type: Input
|
|
33376
33402
|
}], onClick: [{
|