@rededor/site-front-end-lib 20.0.2 → 20.0.4
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/fesm2022/rededor-site-front-end-lib-components-page-header.mjs +2 -2
- package/fesm2022/rededor-site-front-end-lib-components-page-header.mjs.map +1 -1
- package/fesm2022/rededor-site-front-end-lib-services-transfer-state.mjs +49 -0
- package/fesm2022/rededor-site-front-end-lib-services-transfer-state.mjs.map +1 -0
- package/package.json +5 -1
- package/services/transfer-state/index.d.ts +13 -0
|
@@ -28,11 +28,11 @@ class PageHeaderComponent {
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PageHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
31
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: PageHeaderComponent, isStandalone: true, selector: "rdsite-page-header", inputs: { pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, pageHeaderText: { classPropertyName: "pageHeaderText", publicName: "pageHeaderText", isSignal: true, isRequired: false, transformFunction: null }, hasPadding: { classPropertyName: "hasPadding", publicName: "hasPadding", isSignal: true, isRequired: false, transformFunction: null }, breadcrumbs: { classPropertyName: "breadcrumbs", publicName: "breadcrumbs", isSignal: true, isRequired: false, transformFunction: null }, bgColor: { classPropertyName: "bgColor", publicName: "bgColor", isSignal: true, isRequired: false, transformFunction: null }, imgUrl: { classPropertyName: "imgUrl", publicName: "imgUrl", isSignal: true, isRequired: false, transformFunction: null }, imgMimeType: { classPropertyName: "imgMimeType", publicName: "imgMimeType", isSignal: true, isRequired: false, transformFunction: null }, imgAlt: { classPropertyName: "imgAlt", publicName: "imgAlt", isSignal: true, isRequired: false, transformFunction: null }, imgTitle: { classPropertyName: "imgTitle", publicName: "imgTitle", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style": "this.style" } }, ngImport: i0, template: "<div class=\"page-header\" [ngClass]=\"{ 'more-padding': hasPadding() }\">\
|
|
31
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: PageHeaderComponent, isStandalone: true, selector: "rdsite-page-header", inputs: { pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, pageHeaderText: { classPropertyName: "pageHeaderText", publicName: "pageHeaderText", isSignal: true, isRequired: false, transformFunction: null }, hasPadding: { classPropertyName: "hasPadding", publicName: "hasPadding", isSignal: true, isRequired: false, transformFunction: null }, breadcrumbs: { classPropertyName: "breadcrumbs", publicName: "breadcrumbs", isSignal: true, isRequired: false, transformFunction: null }, bgColor: { classPropertyName: "bgColor", publicName: "bgColor", isSignal: true, isRequired: false, transformFunction: null }, imgUrl: { classPropertyName: "imgUrl", publicName: "imgUrl", isSignal: true, isRequired: false, transformFunction: null }, imgMimeType: { classPropertyName: "imgMimeType", publicName: "imgMimeType", isSignal: true, isRequired: false, transformFunction: null }, imgAlt: { classPropertyName: "imgAlt", publicName: "imgAlt", isSignal: true, isRequired: false, transformFunction: null }, imgTitle: { classPropertyName: "imgTitle", publicName: "imgTitle", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style": "this.style" } }, ngImport: i0, template: "<div class=\"page-header\" [ngClass]=\"{ 'more-padding': hasPadding() }\">\n <div class=\"page-header-container\">\n @if (breadcrumbs().length) {\n <rdsite-breadcrumbs [breadcrumbs]=\"breadcrumbs()\"></rdsite-breadcrumbs>\n }\n <div class=\"page-header-content\">\n @if (imgUrl()) {\n <rdsite-image [imageDefaultSrc]=\"imgUrl()\" [mimeType]=\"imgMimeType()\" [alt]=\"imgAlt()\" [title]=\"imgTitle()\" loading=\"eager\"></rdsite-image>\n }\n\n <div class=\"page-header-content-info\">\n @if (pageTitle()) {\n <h1>{{ pageTitle() }}</h1>\n }\n @if (pageHeaderText()) {\n <cura-paragraph color=\"neutral-purewhite\" marginBlock=\"0\">{{ pageHeaderText() }}</cura-paragraph>\n }\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n</div>\n", styles: [".page-header{background-color:var(--bg-color)}.page-header-container{display:flex;flex-direction:column;gap:16px;padding:30px 0;box-sizing:border-box;width:90%;position:relative;max-width:1366px;margin-left:auto;margin-right:auto}.page-header-container.full-container{width:100%;max-width:100%}.page-header-container .page-header-content{display:flex;flex-direction:column;align-items:center;gap:16px}.page-header-container .page-header-content rdsite-image{width:120px;height:120px;border-radius:50%;margin-top:16px}.page-header-container .page-header-content-info{flex:1 0 0;display:flex;flex-direction:column;align-items:center;gap:12px}.page-header-container .page-header-content-info h1{color:var(--neutral-purewhite);font-family:var(--font-family);font-size:32px;font-weight:700;line-height:--fonts-Display-S-lineHeight,43px;letter-spacing:-1.68px}@media screen and (min-width: 769px){.page-header-container .page-header-content-info h1{font-size:48px;line-height:57px;letter-spacing:-1.92px}}@media screen and (min-width: 769px){.page-header .page-header-container{gap:12px;padding:50px 0}.page-header .page-header-container .page-header-content{flex-direction:row;align-items:flex-start;gap:40px}.page-header .page-header-container .page-header-content rdsite-image{margin-top:0}.page-header .page-header-container .page-header-content-info{align-items:flex-start}.page-header.more-padding{padding-inline:102px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: BreadcrumbsComponent, selector: "rdsite-breadcrumbs", inputs: ["labelIconColor", "fontWeight", "breadcrumbs"] }, { kind: "component", type: CuraParagraphComponent, selector: "cura-paragraph", inputs: ["size", "spotColor", "color", "marginBlock", "lineHeight", "textOverflow"] }, { kind: "component", type: ImageComponent, selector: "rdsite-image", inputs: ["imageWebpSrc", "imageDefaultSrc", "imageSizes", "mimeType", "alt", "title", "loading"], outputs: ["imageDefaultSrcChange", "mimeTypeChange"] }] }); }
|
|
32
32
|
}
|
|
33
33
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PageHeaderComponent, decorators: [{
|
|
34
34
|
type: Component,
|
|
35
|
-
args: [{ selector: 'rdsite-page-header', imports: [CommonModule, BreadcrumbsComponent, CuraParagraphComponent, ImageComponent], template: "<div class=\"page-header\" [ngClass]=\"{ 'more-padding': hasPadding() }\">\
|
|
35
|
+
args: [{ selector: 'rdsite-page-header', imports: [CommonModule, BreadcrumbsComponent, CuraParagraphComponent, ImageComponent], template: "<div class=\"page-header\" [ngClass]=\"{ 'more-padding': hasPadding() }\">\n <div class=\"page-header-container\">\n @if (breadcrumbs().length) {\n <rdsite-breadcrumbs [breadcrumbs]=\"breadcrumbs()\"></rdsite-breadcrumbs>\n }\n <div class=\"page-header-content\">\n @if (imgUrl()) {\n <rdsite-image [imageDefaultSrc]=\"imgUrl()\" [mimeType]=\"imgMimeType()\" [alt]=\"imgAlt()\" [title]=\"imgTitle()\" loading=\"eager\"></rdsite-image>\n }\n\n <div class=\"page-header-content-info\">\n @if (pageTitle()) {\n <h1>{{ pageTitle() }}</h1>\n }\n @if (pageHeaderText()) {\n <cura-paragraph color=\"neutral-purewhite\" marginBlock=\"0\">{{ pageHeaderText() }}</cura-paragraph>\n }\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n</div>\n", styles: [".page-header{background-color:var(--bg-color)}.page-header-container{display:flex;flex-direction:column;gap:16px;padding:30px 0;box-sizing:border-box;width:90%;position:relative;max-width:1366px;margin-left:auto;margin-right:auto}.page-header-container.full-container{width:100%;max-width:100%}.page-header-container .page-header-content{display:flex;flex-direction:column;align-items:center;gap:16px}.page-header-container .page-header-content rdsite-image{width:120px;height:120px;border-radius:50%;margin-top:16px}.page-header-container .page-header-content-info{flex:1 0 0;display:flex;flex-direction:column;align-items:center;gap:12px}.page-header-container .page-header-content-info h1{color:var(--neutral-purewhite);font-family:var(--font-family);font-size:32px;font-weight:700;line-height:--fonts-Display-S-lineHeight,43px;letter-spacing:-1.68px}@media screen and (min-width: 769px){.page-header-container .page-header-content-info h1{font-size:48px;line-height:57px;letter-spacing:-1.92px}}@media screen and (min-width: 769px){.page-header .page-header-container{gap:12px;padding:50px 0}.page-header .page-header-container .page-header-content{flex-direction:row;align-items:flex-start;gap:40px}.page-header .page-header-container .page-header-content rdsite-image{margin-top:0}.page-header .page-header-container .page-header-content-info{align-items:flex-start}.page-header.more-padding{padding-inline:102px}}\n"] }]
|
|
36
36
|
}], propDecorators: { pageTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageTitle", required: false }] }], pageHeaderText: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageHeaderText", required: false }] }], hasPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasPadding", required: false }] }], breadcrumbs: [{ type: i0.Input, args: [{ isSignal: true, alias: "breadcrumbs", required: false }] }], bgColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "bgColor", required: false }] }], imgUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "imgUrl", required: false }] }], imgMimeType: [{ type: i0.Input, args: [{ isSignal: true, alias: "imgMimeType", required: false }] }], imgAlt: [{ type: i0.Input, args: [{ isSignal: true, alias: "imgAlt", required: false }] }], imgTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "imgTitle", required: false }] }], style: [{
|
|
37
37
|
type: HostBinding,
|
|
38
38
|
args: ['style']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rededor-site-front-end-lib-components-page-header.mjs","sources":["../../../projects/site-front-end-lib/components/page-header/page-header.component.ts","../../../projects/site-front-end-lib/components/page-header/page-header.component.html","../../../projects/site-front-end-lib/components/page-header/rededor-site-front-end-lib-components-page-header.ts"],"sourcesContent":["import { Component, HostBinding, input, inject } from '@angular/core';\
|
|
1
|
+
{"version":3,"file":"rededor-site-front-end-lib-components-page-header.mjs","sources":["../../../projects/site-front-end-lib/components/page-header/page-header.component.ts","../../../projects/site-front-end-lib/components/page-header/page-header.component.html","../../../projects/site-front-end-lib/components/page-header/rededor-site-front-end-lib-components-page-header.ts"],"sourcesContent":["import { Component, HostBinding, input, inject } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { BreadcrumbsItems } from '@rededor/site-front-end-lib/core';\nimport { CuraApiService } from '@rededor/site-front-end-lib/cura/api';\nimport { BreadcrumbsComponent } from '@rededor/site-front-end-lib/components/breadcrumbs';\nimport { CuraParagraphComponent } from '@rededor/site-front-end-lib/cura/texts/cura-paragraph';\nimport { ImageComponent } from '@rededor/site-front-end-lib/components/image';\n\n@Component({\n selector: 'rdsite-page-header',\n imports: [CommonModule, BreadcrumbsComponent, CuraParagraphComponent, ImageComponent],\n templateUrl: './page-header.component.html',\n styleUrls: ['./page-header.component.scss'],\n})\nexport class PageHeaderComponent {\n private readonly curaApiService = inject(CuraApiService);\n\n readonly pageTitle = input<string>('');\n readonly pageHeaderText = input<string>('');\n readonly hasPadding = input<boolean>(false);\n readonly breadcrumbs = input<BreadcrumbsItems[]>([]);\n readonly bgColor = input('primary-base');\n readonly imgUrl = input<string>('');\n readonly imgMimeType = input<any>('');\n readonly imgAlt = input<string>('Imagem do header');\n readonly imgTitle = input<string>('Imagem do header');\n\n @HostBinding('style') get style() {\n return {\n '--bg-color': this.curaApiService.theme.colors.getColor(this.bgColor()),\n '--neutral-purewhite': this.curaApiService.theme.colors.getColor('neutral-purewhite'),\n '--font-family': this.curaApiService.theme.fonts.getFamily(''),\n };\n }\n}\n","<div class=\"page-header\" [ngClass]=\"{ 'more-padding': hasPadding() }\">\n <div class=\"page-header-container\">\n @if (breadcrumbs().length) {\n <rdsite-breadcrumbs [breadcrumbs]=\"breadcrumbs()\"></rdsite-breadcrumbs>\n }\n <div class=\"page-header-content\">\n @if (imgUrl()) {\n <rdsite-image [imageDefaultSrc]=\"imgUrl()\" [mimeType]=\"imgMimeType()\" [alt]=\"imgAlt()\" [title]=\"imgTitle()\" loading=\"eager\"></rdsite-image>\n }\n\n <div class=\"page-header-content-info\">\n @if (pageTitle()) {\n <h1>{{ pageTitle() }}</h1>\n }\n @if (pageHeaderText()) {\n <cura-paragraph color=\"neutral-purewhite\" marginBlock=\"0\">{{ pageHeaderText() }}</cura-paragraph>\n }\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAca,mBAAmB,CAAA;AANhC,IAAA,WAAA,GAAA;AAOmB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AAE/C,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAS,EAAE,qDAAC;AAC7B,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAS,EAAE,0DAAC;AAClC,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAU,KAAK,sDAAC;AAClC,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAqB,EAAE,uDAAC;AAC3C,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,cAAc,mDAAC;AAC/B,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAS,EAAE,kDAAC;AAC1B,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAM,EAAE,uDAAC;AAC5B,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAS,kBAAkB,kDAAC;AAC1C,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,kBAAkB,oDAAC;AAStD,IAAA;AAPC,IAAA,IAA0B,KAAK,GAAA;QAC7B,OAAO;AACL,YAAA,YAAY,EAAE,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;AACvE,YAAA,qBAAqB,EAAE,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC;AACrF,YAAA,eA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AS;+BACE,oBAAoB,EAAA,OAAA,EACrB,CAAC,YAAY,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,cAAc,CAAC,EAAA,QAAA,EAAA,u0BAAA,EAAA,MAAA,EAAA,CAAA,g5CAAA,CAAA,EAAA;;sBAiBpF,WAAW;uBAAC,OAAO;;;AE3BtB;;AAEG;;;;"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, TransferState, makeStateKey, Injectable } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
class TransferStateService {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.transferState = inject(TransferState);
|
|
7
|
+
this.keys = new Map();
|
|
8
|
+
}
|
|
9
|
+
setKey(name, response) {
|
|
10
|
+
let key = this.keys.get(name);
|
|
11
|
+
if (!key) {
|
|
12
|
+
key = makeStateKey(name);
|
|
13
|
+
this.keys.set(name, key);
|
|
14
|
+
}
|
|
15
|
+
this.transferState.set(key, response);
|
|
16
|
+
}
|
|
17
|
+
getKey(name, defaultValue = null) {
|
|
18
|
+
let key = this.keys.get(name);
|
|
19
|
+
if (!key) {
|
|
20
|
+
key = makeStateKey(name);
|
|
21
|
+
this.keys.set(name, key);
|
|
22
|
+
}
|
|
23
|
+
const response = this.transferState.get(key, defaultValue);
|
|
24
|
+
return response;
|
|
25
|
+
}
|
|
26
|
+
remove(name) {
|
|
27
|
+
let key = this.keys.get(name);
|
|
28
|
+
if (!key) {
|
|
29
|
+
key = makeStateKey(name);
|
|
30
|
+
this.keys.set(name, key);
|
|
31
|
+
}
|
|
32
|
+
this.transferState.remove(key);
|
|
33
|
+
}
|
|
34
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TransferStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
35
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TransferStateService, providedIn: 'root' }); }
|
|
36
|
+
}
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TransferStateService, decorators: [{
|
|
38
|
+
type: Injectable,
|
|
39
|
+
args: [{
|
|
40
|
+
providedIn: 'root',
|
|
41
|
+
}]
|
|
42
|
+
}] });
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Generated bundle index. Do not edit.
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
export { TransferStateService };
|
|
49
|
+
//# sourceMappingURL=rededor-site-front-end-lib-services-transfer-state.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rededor-site-front-end-lib-services-transfer-state.mjs","sources":["../../../projects/site-front-end-lib/services/transfer-state/transfer-state.service.ts","../../../projects/site-front-end-lib/services/transfer-state/rededor-site-front-end-lib-services-transfer-state.ts"],"sourcesContent":["import { inject, Injectable, makeStateKey, StateKey, TransferState } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TransferStateService {\n private transferState = inject(TransferState);\n\n private keys = new Map<string, StateKey<string>>();\n\n setKey(name: any, response: any | any[]) {\n let key = this.keys.get(name);\n if (!key) {\n key = makeStateKey(name);\n this.keys.set(name, key);\n }\n this.transferState.set(key, response);\n }\n\n getKey(name: string, defaultValue: any | any[] = null): any | any[] {\n let key = this.keys.get(name);\n if (!key) {\n key = makeStateKey(name);\n this.keys.set(name, key);\n }\n const response = this.transferState.get(key, defaultValue);\n return response;\n }\n\n remove(name: string) {\n let key = this.keys.get(name);\n if (!key) {\n key = makeStateKey(name);\n this.keys.set(name, key);\n }\n this.transferState.remove(key);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAKa,oBAAoB,CAAA;AAHjC,IAAA,WAAA,GAAA;AAIU,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,aAAa,CAA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A,EAAA,CAAA,CAAA;AAApB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,cAFnB,MAAM,EAAA,CAAA,CAAA;;4FAEP,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAHhC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACJD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rededor/site-front-end-lib",
|
|
3
|
-
"version": "20.0.
|
|
3
|
+
"version": "20.0.4",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^20.0.0",
|
|
6
6
|
"@angular/core": "^20.0.0",
|
|
@@ -313,6 +313,10 @@
|
|
|
313
313
|
"types": "./services/ssr-loading/index.d.ts",
|
|
314
314
|
"default": "./fesm2022/rededor-site-front-end-lib-services-ssr-loading.mjs"
|
|
315
315
|
},
|
|
316
|
+
"./services/transfer-state": {
|
|
317
|
+
"types": "./services/transfer-state/index.d.ts",
|
|
318
|
+
"default": "./fesm2022/rededor-site-front-end-lib-services-transfer-state.mjs"
|
|
319
|
+
},
|
|
316
320
|
"./services/youtube": {
|
|
317
321
|
"types": "./services/youtube/index.d.ts",
|
|
318
322
|
"default": "./fesm2022/rededor-site-front-end-lib-services-youtube.mjs"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
|
|
3
|
+
declare class TransferStateService {
|
|
4
|
+
private transferState;
|
|
5
|
+
private keys;
|
|
6
|
+
setKey(name: any, response: any | any[]): void;
|
|
7
|
+
getKey(name: string, defaultValue?: any | any[]): any | any[];
|
|
8
|
+
remove(name: string): void;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TransferStateService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TransferStateService>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { TransferStateService };
|