@osovitny/anatoly 2.14.38 → 2.14.40
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/esm2020/lib/core/localization/localizationSettings.module.mjs +10 -6
- package/esm2020/lib/core/services/appcontext.service.mjs +5 -4
- package/esm2020/lib/core/services/google-analytics.service.mjs +8 -6
- package/esm2020/lib/core/services/idle.service.mjs +14 -10
- package/esm2020/lib/data/base/grid/base-grid-edit.service.mjs +21 -14
- package/esm2020/lib/data/base/grid/base-grid-read.service.mjs +11 -8
- package/esm2020/lib/data/consts.mjs +1 -3
- package/esm2020/lib/data/data.module.mjs +1 -4
- package/esm2020/lib/data/index.mjs +1 -2
- package/esm2020/lib/data/services/core-api.service.mjs +22 -4
- package/esm2020/lib/data/services/emails-api.service.mjs +12 -7
- package/esm2020/lib/ui/components/billing/buyaccess-button.component.mjs +5 -21
- package/esm2020/lib/ui/components/billing/subscribe-plan-button.component.mjs +18 -16
- package/esm2020/lib/ui/components/index.mjs +4 -4
- package/esm2020/lib/ui/components/spinners/loading/loading.component.mjs +5 -3
- package/esm2020/lib/ui/components/spinners/pagespinner/pagespinner.component.mjs +13 -10
- package/esm2020/lib/ui/forms/components/urlslug/urlslug.component.mjs +12 -8
- package/esm2020/lib/ui/ui.module.mjs +44 -79
- package/fesm2015/osovitny-anatoly.mjs +184 -272
- package/fesm2015/osovitny-anatoly.mjs.map +1 -1
- package/fesm2020/osovitny-anatoly.mjs +184 -272
- package/fesm2020/osovitny-anatoly.mjs.map +1 -1
- package/lib/data/consts.d.ts +0 -1
- package/lib/data/index.d.ts +0 -1
- package/lib/ui/components/billing/buyaccess-button.component.d.ts +2 -2
- package/lib/ui/components/billing/subscribe-plan-button.component.d.ts +7 -5
- package/lib/ui/components/index.d.ts +0 -1
- package/lib/ui/components/spinners/pagespinner/pagespinner.component.d.ts +2 -2
- package/lib/ui/ui.module.d.ts +33 -34
- package/package.json +1 -1
- package/esm2020/lib/data/services/billing-api.service.mjs +0 -53
- package/esm2020/lib/ui/components/billing/upgrade-plan-button.component.mjs +0 -49
- package/lib/data/services/billing-api.service.d.ts +0 -11
- package/lib/ui/components/billing/upgrade-plan-button.component.d.ts +0 -12
package/lib/data/consts.d.ts
CHANGED
package/lib/data/index.d.ts
CHANGED
|
@@ -2,6 +2,5 @@ export * from './base/grid/base-grid-edit.service';
|
|
|
2
2
|
export * from './base/grid/base-grid-read.service';
|
|
3
3
|
export * from './base/base-api.service';
|
|
4
4
|
export * from './services/notifications/notifications-api-service';
|
|
5
|
-
export * from './services/billing-api.service';
|
|
6
5
|
export * from './services/emails-api.service';
|
|
7
6
|
export * from './services/core-api.service';
|
|
@@ -8,12 +8,12 @@ export declare class BuyAccessButtonComponent implements OnInit {
|
|
|
8
8
|
currentPlan: number;
|
|
9
9
|
currentPlanTitle: string;
|
|
10
10
|
plan: number;
|
|
11
|
-
|
|
11
|
+
planTitle: string;
|
|
12
12
|
visibleIfUserSignedIn: boolean;
|
|
13
13
|
buy: EventEmitter<any>;
|
|
14
14
|
constructor(appContext: AppContextService);
|
|
15
15
|
ngOnInit(): void;
|
|
16
16
|
onBuyAccess(): void;
|
|
17
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<BuyAccessButtonComponent, never>;
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BuyAccessButtonComponent, "anatoly-buyaccess-button", never, { "plan": "plan"; "
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BuyAccessButtonComponent, "anatoly-buyaccess-button", never, { "plan": "plan"; "planTitle": "planTitle"; "visibleIfUserSignedIn": "visibleIfUserSignedIn"; }, { "buy": "buy"; }, never, never, false>;
|
|
19
19
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { OnInit } from "@angular/core";
|
|
1
|
+
import { EventEmitter, OnInit } from "@angular/core";
|
|
2
2
|
import { AppContextService } from "../../../core/services/appcontext.service";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SubscribePlanButtonComponent implements OnInit {
|
|
5
|
-
private
|
|
5
|
+
private appContext;
|
|
6
6
|
contextUpdated: boolean;
|
|
7
7
|
isUserSignedIn: boolean;
|
|
8
8
|
currentPlan: number;
|
|
@@ -10,10 +10,12 @@ export declare class SubscribePlanButtonComponent implements OnInit {
|
|
|
10
10
|
requestedPlan: number;
|
|
11
11
|
requestedPlanTitle: string;
|
|
12
12
|
plan: number;
|
|
13
|
-
|
|
13
|
+
planTitle: string;
|
|
14
14
|
visibleIfUserSignedIn: boolean;
|
|
15
|
-
|
|
15
|
+
subscribe: EventEmitter<any>;
|
|
16
|
+
constructor(appContext: AppContextService);
|
|
16
17
|
ngOnInit(): void;
|
|
18
|
+
onSubscribe(): void;
|
|
17
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<SubscribePlanButtonComponent, never>;
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SubscribePlanButtonComponent, "anatoly-subscribe-plan-button", never, { "plan": "plan"; "
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SubscribePlanButtonComponent, "anatoly-subscribe-plan-button", never, { "plan": "plan"; "planTitle": "planTitle"; "visibleIfUserSignedIn": "visibleIfUserSignedIn"; }, { "subscribe": "subscribe"; }, never, never, false>;
|
|
19
21
|
}
|
|
@@ -3,7 +3,6 @@ export * from './base-edit.component';
|
|
|
3
3
|
export * from './base.dialog';
|
|
4
4
|
export * from './billing/buyaccess-button.component';
|
|
5
5
|
export * from './billing/subscribe-plan-button.component';
|
|
6
|
-
export * from './billing/upgrade-plan-button.component';
|
|
7
6
|
export * from './html-editor/html-editor.defaultoptions';
|
|
8
7
|
export * from './html-editor/base-html-editor.component';
|
|
9
8
|
export * from './html-editor/forms-html-editor.component';
|
|
@@ -4,8 +4,6 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
export declare class PageSpinnerComponent implements OnDestroy {
|
|
5
5
|
private router;
|
|
6
6
|
private document;
|
|
7
|
-
backgroundColor: string;
|
|
8
|
-
spinner: string;
|
|
9
7
|
isSpinnerVisible: boolean;
|
|
10
8
|
Spinkit: {
|
|
11
9
|
skChasingDots: string;
|
|
@@ -18,6 +16,8 @@ export declare class PageSpinnerComponent implements OnDestroy {
|
|
|
18
16
|
skWave: string;
|
|
19
17
|
skLine: string;
|
|
20
18
|
};
|
|
19
|
+
backgroundColor: string;
|
|
20
|
+
spinner: string;
|
|
21
21
|
constructor(router: Router, document: Document);
|
|
22
22
|
ngOnDestroy(): void;
|
|
23
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<PageSpinnerComponent, never>;
|
package/lib/ui/ui.module.d.ts
CHANGED
|
@@ -1,42 +1,41 @@
|
|
|
1
1
|
import { FroalaEditorModule, FroalaViewModule } from "angular-froala-wysiwyg";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "./components/billing/
|
|
4
|
-
import * as i2 from "./components/billing/
|
|
5
|
-
import * as i3 from "./components/
|
|
6
|
-
import * as i4 from "./components/identity/
|
|
7
|
-
import * as i5 from "./components/identity/
|
|
8
|
-
import * as i6 from "./components/
|
|
9
|
-
import * as i7 from "./components/
|
|
10
|
-
import * as i8 from "./components/spinners/
|
|
11
|
-
import * as i9 from "./components/
|
|
12
|
-
import * as i10 from "./components/card/card.component";
|
|
13
|
-
import * as i11 from "./components/card/card-
|
|
14
|
-
import * as i12 from "./components/card/card-
|
|
15
|
-
import * as i13 from "./components/
|
|
16
|
-
import * as i14 from "./components/html-editor/html-editor.component";
|
|
17
|
-
import * as i15 from "./
|
|
18
|
-
import * as i16 from "./
|
|
19
|
-
import * as i17 from "./forms/components/
|
|
20
|
-
import * as i18 from "./forms/components/
|
|
21
|
-
import * as i19 from "./forms/components/
|
|
22
|
-
import * as i20 from "./forms/
|
|
23
|
-
import * as i21 from "./
|
|
24
|
-
import * as i22 from "./
|
|
25
|
-
import * as i23 from "./pipes/
|
|
26
|
-
import * as i24 from "./pipes/
|
|
27
|
-
import * as i25 from "./
|
|
28
|
-
import * as i26 from "./validation/
|
|
29
|
-
import * as i27 from "
|
|
30
|
-
import * as i28 from "@progress/kendo-angular-
|
|
31
|
-
import * as i29 from "@
|
|
32
|
-
import * as i30 from "@angular/
|
|
33
|
-
import * as i31 from "
|
|
34
|
-
import * as i32 from "
|
|
35
|
-
import * as i33 from "angular-froala-wysiwyg";
|
|
3
|
+
import * as i1 from "./components/billing/buyaccess-button.component";
|
|
4
|
+
import * as i2 from "./components/billing/subscribe-plan-button.component";
|
|
5
|
+
import * as i3 from "./components/identity/signin-button.component";
|
|
6
|
+
import * as i4 from "./components/identity/signup-button.component";
|
|
7
|
+
import * as i5 from "./components/identity/signout-button.component";
|
|
8
|
+
import * as i6 from "./components/nodata/nodata.component";
|
|
9
|
+
import * as i7 from "./components/spinners/pagespinner/pagespinner.component";
|
|
10
|
+
import * as i8 from "./components/spinners/loading/loading.component";
|
|
11
|
+
import * as i9 from "./components/card/card.component";
|
|
12
|
+
import * as i10 from "./components/card/card-header.component";
|
|
13
|
+
import * as i11 from "./components/card/card-body.component";
|
|
14
|
+
import * as i12 from "./components/card/card-footer.component";
|
|
15
|
+
import * as i13 from "./components/html-editor/html-editor.component";
|
|
16
|
+
import * as i14 from "./components/html-editor/forms-html-editor.component";
|
|
17
|
+
import * as i15 from "./directives/native-element.directive";
|
|
18
|
+
import * as i16 from "./forms/components/address/address.component";
|
|
19
|
+
import * as i17 from "./forms/components/company/company.component";
|
|
20
|
+
import * as i18 from "./forms/components/urlslug/urlslug.component";
|
|
21
|
+
import * as i19 from "./forms/components/dropdownlists/timezone/timezone.dropdownlist";
|
|
22
|
+
import * as i20 from "./forms/contact-us/contact-us";
|
|
23
|
+
import * as i21 from "./dialogs/contact-us/contact-us.dialog";
|
|
24
|
+
import * as i22 from "./pipes/safeHtml.pipe";
|
|
25
|
+
import * as i23 from "./pipes/replace-text.pipe";
|
|
26
|
+
import * as i24 from "./pipes/filesize.pipe";
|
|
27
|
+
import * as i25 from "./validation/form-validation-summary.component";
|
|
28
|
+
import * as i26 from "./validation/item-validation-summary.component";
|
|
29
|
+
import * as i27 from "@progress/kendo-angular-dialog";
|
|
30
|
+
import * as i28 from "@progress/kendo-angular-buttons";
|
|
31
|
+
import * as i29 from "@angular/common";
|
|
32
|
+
import * as i30 from "@angular/forms";
|
|
33
|
+
import * as i31 from "ngx-captcha";
|
|
34
|
+
import * as i32 from "angular-froala-wysiwyg";
|
|
36
35
|
export declare const FroalaEditorModuleWithProviders: import("@angular/core").ModuleWithProviders<FroalaEditorModule>;
|
|
37
36
|
export declare const FroalaViewModuleWithProviders: import("@angular/core").ModuleWithProviders<FroalaViewModule>;
|
|
38
37
|
export declare class AnatolyUIModule {
|
|
39
38
|
static ɵfac: i0.ɵɵFactoryDeclaration<AnatolyUIModule, never>;
|
|
40
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AnatolyUIModule, [typeof i1.
|
|
39
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AnatolyUIModule, [typeof i1.BuyAccessButtonComponent, typeof i2.SubscribePlanButtonComponent, typeof i3.SignInButtonComponent, typeof i4.SignUpButtonComponent, typeof i5.SignOutButtonComponent, typeof i6.NodataComponent, typeof i7.PageSpinnerComponent, typeof i8.LoadingComponent, typeof i9.CardComponent, typeof i10.CardHeaderComponent, typeof i11.CardBodyComponent, typeof i12.CardFooterComponent, typeof i13.HtmlEditorComponent, typeof i14.FormsHtmlEditorComponent, typeof i15.NativeElementDirective, typeof i16.AddressComponent, typeof i17.CompanyComponent, typeof i18.UrlSlugComponent, typeof i19.TimezoneDropdownlist, typeof i20.ContactUsForm, typeof i21.ContactUsDialog, typeof i22.SafeHtmlPipe, typeof i23.ReplaceTextPipe, typeof i24.FileSizePipe, typeof i25.FormValidationSummaryComponent, typeof i26.ItemValidationSummaryComponent], [typeof i27.DialogsModule, typeof i28.ButtonsModule, typeof i29.CommonModule, typeof i30.ReactiveFormsModule, typeof i30.FormsModule, typeof i31.NgxCaptchaModule, typeof i32.FroalaEditorModule, typeof i32.FroalaViewModule], [typeof i1.BuyAccessButtonComponent, typeof i2.SubscribePlanButtonComponent, typeof i3.SignInButtonComponent, typeof i4.SignUpButtonComponent, typeof i5.SignOutButtonComponent, typeof i6.NodataComponent, typeof i7.PageSpinnerComponent, typeof i8.LoadingComponent, typeof i9.CardComponent, typeof i10.CardHeaderComponent, typeof i11.CardBodyComponent, typeof i12.CardFooterComponent, typeof i13.HtmlEditorComponent, typeof i14.FormsHtmlEditorComponent, typeof i15.NativeElementDirective, typeof i16.AddressComponent, typeof i17.CompanyComponent, typeof i18.UrlSlugComponent, typeof i19.TimezoneDropdownlist, typeof i20.ContactUsForm, typeof i21.ContactUsDialog, typeof i22.SafeHtmlPipe, typeof i23.ReplaceTextPipe, typeof i24.FileSizePipe, typeof i25.FormValidationSummaryComponent, typeof i26.ItemValidationSummaryComponent]>;
|
|
41
40
|
static ɵinj: i0.ɵɵInjectorDeclaration<AnatolyUIModule>;
|
|
42
41
|
}
|
package/package.json
CHANGED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
<file>
|
|
3
|
-
Project:
|
|
4
|
-
@osovitny/anatoly
|
|
5
|
-
|
|
6
|
-
Authors:
|
|
7
|
-
Vadim Osovitny
|
|
8
|
-
Anatoly Osovitny
|
|
9
|
-
|
|
10
|
-
Created:
|
|
11
|
-
12 Nov 2017
|
|
12
|
-
|
|
13
|
-
Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
|
|
14
|
-
</file>
|
|
15
|
-
*/
|
|
16
|
-
//Node
|
|
17
|
-
import { Injectable } from "@angular/core";
|
|
18
|
-
//App
|
|
19
|
-
import { BaseApiService } from "../base/base-api.service";
|
|
20
|
-
import { Consts } from '../consts';
|
|
21
|
-
import * as i0 from "@angular/core";
|
|
22
|
-
import * as i1 from "@angular/common/http";
|
|
23
|
-
export class BillingApiService extends BaseApiService {
|
|
24
|
-
constructor(http) {
|
|
25
|
-
super(http);
|
|
26
|
-
this.http = http;
|
|
27
|
-
this.baseUrl = Consts.billingApiPath;
|
|
28
|
-
}
|
|
29
|
-
requestNewSubscription(requestedPlan, success, error) {
|
|
30
|
-
this.postQS("requestNewSubscription", { requestedPlan: requestedPlan }).subscribe((data) => {
|
|
31
|
-
if (success)
|
|
32
|
-
success();
|
|
33
|
-
}, (e) => {
|
|
34
|
-
if (error)
|
|
35
|
-
error();
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
cancelRequestedSubscription(success, error) {
|
|
39
|
-
this.postQS("cancelRequestedSubscription", null).subscribe((data) => {
|
|
40
|
-
if (success)
|
|
41
|
-
success();
|
|
42
|
-
}, (e) => {
|
|
43
|
-
if (error)
|
|
44
|
-
error();
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
BillingApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BillingApiService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
49
|
-
BillingApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BillingApiService });
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: BillingApiService, decorators: [{
|
|
51
|
-
type: Injectable
|
|
52
|
-
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
|
53
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmlsbGluZy1hcGkuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FuYXRvbHkvc3JjL2xpYi9kYXRhL3NlcnZpY2VzL2JpbGxpbmctYXBpLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7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
|
|
12
|
-
|
|
13
|
-
Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
|
|
14
|
-
</file>
|
|
15
|
-
*/
|
|
16
|
-
// Node
|
|
17
|
-
import { Component, Input } from '@angular/core';
|
|
18
|
-
import { Alerts } from '../../../core/notifications/alerts';
|
|
19
|
-
import * as i0 from "@angular/core";
|
|
20
|
-
import * as i1 from "../../../data/services/billing-api.service";
|
|
21
|
-
export class UpgradePlanButtonComponent {
|
|
22
|
-
constructor(api) {
|
|
23
|
-
this.api = api;
|
|
24
|
-
}
|
|
25
|
-
onUpgradePlan() {
|
|
26
|
-
const text = `Current plan: ${this.currentplantitle} New plan: ${this.requestedplantitle}`;
|
|
27
|
-
const that = this;
|
|
28
|
-
Alerts.areYouSure(text, 'Change billing plan', 'Confirm change', 'Cancel', () => {
|
|
29
|
-
that.api.requestNewSubscription(that.requestedplan, () => {
|
|
30
|
-
Alerts.success('Your request for changing plan has been sent.', null, null, () => {
|
|
31
|
-
window.location.reload();
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
UpgradePlanButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: UpgradePlanButtonComponent, deps: [{ token: i1.BillingApiService }], target: i0.ɵɵFactoryTarget.Component });
|
|
38
|
-
UpgradePlanButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: UpgradePlanButtonComponent, selector: "anatoly-upgrade-plan-button", inputs: { currentplantitle: "currentplantitle", requestedplan: "requestedplan", requestedplantitle: "requestedplantitle" }, ngImport: i0, template: "<button class=\"btn btn-block btn-primary\" (click)=\"onUpgradePlan()\">\r\n Upgrade\r\n</button>\r\n" });
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: UpgradePlanButtonComponent, decorators: [{
|
|
40
|
-
type: Component,
|
|
41
|
-
args: [{ selector: 'anatoly-upgrade-plan-button', template: "<button class=\"btn btn-block btn-primary\" (click)=\"onUpgradePlan()\">\r\n Upgrade\r\n</button>\r\n" }]
|
|
42
|
-
}], ctorParameters: function () { return [{ type: i1.BillingApiService }]; }, propDecorators: { currentplantitle: [{
|
|
43
|
-
type: Input
|
|
44
|
-
}], requestedplan: [{
|
|
45
|
-
type: Input
|
|
46
|
-
}], requestedplantitle: [{
|
|
47
|
-
type: Input
|
|
48
|
-
}] } });
|
|
49
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXBncmFkZS1wbGFuLWJ1dHRvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmF0b2x5L3NyYy9saWIvdWkvY29tcG9uZW50cy9iaWxsaW5nL3VwZ3JhZGUtcGxhbi1idXR0b24uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYW5hdG9seS9zcmMvbGliL3VpL2NvbXBvbmVudHMvYmlsbGluZy91cGdyYWRlLXBsYW4tYnV0dG9uLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7OztFQWNFO0FBRUYsT0FBTztBQUNQLE9BQU8sRUFBQyxTQUFTLEVBQUUsS0FBSyxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBSS9DLE9BQU8sRUFBQyxNQUFNLEVBQUMsTUFBTSxvQ0FBb0MsQ0FBQzs7O0FBTTFELE1BQU0sT0FBTywwQkFBMEI7SUFLckMsWUFBb0IsR0FBc0I7UUFBdEIsUUFBRyxHQUFILEdBQUcsQ0FBbUI7SUFBRyxDQUFDO0lBRTlDLGFBQWE7UUFDWCxNQUFNLElBQUksR0FBRyxpQkFBaUIsSUFB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GluZyBwbGFuJyxcclxuICAgICAgJ0NvbmZpcm0gY2hhbmdlJyxcclxuICAgICAgJ0NhbmNlbCcsXHJcbiAgICAgICgpID0+IHtcclxuICAgICAgICB0aGF0LmFwaS5yZXF1ZXN0TmV3U3Vic2NyaXB0aW9uKHRoYXQucmVxdWVzdGVkcGxhbiwgKCkgPT4ge1xyXG4gICAgICAgICAgQWxlcnRzLnN1Y2Nlc3MoXHJcbiAgICAgICAgICAgICdZb3VyIHJlcXVlc3QgZm9yIGNoYW5naW5nIHBsYW4gaGFzIGJlZW4gc2VudC4nLFxyXG4gICAgICAgICAgICBudWxsLG51bGwsXHJcbiAgICAgICAgICAgICgpID0+IHtcclxuICAgICAgICAgICAgICAod2luZG93IGFzIGFueSkubG9jYXRpb24ucmVsb2FkKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICk7XHJcbiAgICAgICAgfSk7XHJcbiAgICAgIH1cclxuICAgICk7XHJcbiAgfVxyXG59XHJcbiIsIjxidXR0b24gY2xhc3M9XCJidG4gYnRuLWJsb2NrIGJ0bi1wcmltYXJ5XCIgKGNsaWNrKT1cIm9uVXBncmFkZVBsYW4oKVwiPlxyXG4gIFVwZ3JhZGVcclxuPC9idXR0b24+XHJcbiJdfQ==
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from "@angular/common/http";
|
|
2
|
-
import { BaseApiService } from "../base/base-api.service";
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class BillingApiService extends BaseApiService {
|
|
5
|
-
protected http: HttpClient;
|
|
6
|
-
constructor(http: HttpClient);
|
|
7
|
-
requestNewSubscription(requestedPlan: Number, success?: Function, error?: Function): void;
|
|
8
|
-
cancelRequestedSubscription(success?: Function, error?: Function): void;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BillingApiService, never>;
|
|
10
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<BillingApiService>;
|
|
11
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { BillingApiService } from '../../../data/services/billing-api.service';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class UpgradePlanButtonComponent {
|
|
4
|
-
private api;
|
|
5
|
-
currentplantitle: string;
|
|
6
|
-
requestedplan: number;
|
|
7
|
-
requestedplantitle: string;
|
|
8
|
-
constructor(api: BillingApiService);
|
|
9
|
-
onUpgradePlan(): void;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<UpgradePlanButtonComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<UpgradePlanButtonComponent, "anatoly-upgrade-plan-button", never, { "currentplantitle": "currentplantitle"; "requestedplan": "requestedplan"; "requestedplantitle": "requestedplantitle"; }, {}, never, never, false>;
|
|
12
|
-
}
|