simpo-component-library 3.8.13 → 3.8.15
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/ecommerce/sections/product-desc/scheme-plan-dialog/scheme-plan-dialog.component.mjs +4 -17
- package/esm2022/lib/sections/header-section/header-section.component.mjs +18 -3
- package/esm2022/lib/services/scheme-plan.service.mjs +5 -8
- package/fesm2022/simpo-component-library.mjs +24 -25
- package/fesm2022/simpo-component-library.mjs.map +1 -1
- package/lib/ecommerce/sections/product-desc/scheme-plan-dialog/scheme-plan-dialog.component.d.ts +1 -4
- package/lib/sections/header-section/header-section.component.d.ts +6 -0
- package/lib/services/scheme-plan.service.d.ts +2 -6
- package/package.json +1 -1
- package/simpo-component-library-3.8.15.tgz +0 -0
- package/simpo-component-library-3.8.13.tgz +0 -0
package/lib/ecommerce/sections/product-desc/scheme-plan-dialog/scheme-plan-dialog.component.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
3
|
import { Router } from '@angular/router';
|
|
4
|
-
import { SchemePlan, SchemePlanService,
|
|
4
|
+
import { SchemePlan, SchemePlanService, SchemePlanStore } from '../../../../services/scheme-plan.service';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export interface SchemePlanDialogData {
|
|
7
7
|
scheme: any;
|
|
@@ -22,16 +22,13 @@ export declare class SchemePlanDialogComponent implements OnInit {
|
|
|
22
22
|
label: string;
|
|
23
23
|
}[];
|
|
24
24
|
stores: SchemePlanStore[];
|
|
25
|
-
staffMembers: SchemePlanStaff[];
|
|
26
25
|
selectedStoreId: string;
|
|
27
|
-
selectedStaffId: string;
|
|
28
26
|
loading: boolean;
|
|
29
27
|
errorMessage: string;
|
|
30
28
|
constructor(data: SchemePlanDialogData, dialogRef: MatDialogRef<SchemePlanDialogComponent>, schemePlanService: SchemePlanService, router: Router);
|
|
31
29
|
ngOnInit(): void;
|
|
32
30
|
/** The shopper must pick a store when there is more than one (the PDP has no other store picker). */
|
|
33
31
|
get needsStore(): boolean;
|
|
34
|
-
get needsStaff(): boolean;
|
|
35
32
|
/** Part of the product the plan can't cover (when even the maximum instalment falls short). */
|
|
36
33
|
get shortfall(): number;
|
|
37
34
|
get noStoreAvailable(): boolean;
|
|
@@ -108,6 +108,12 @@ export declare class HeaderSectionComponent implements OnInit, AfterViewInit, On
|
|
|
108
108
|
get backgroundInfo(): any;
|
|
109
109
|
get simpoColor(): any;
|
|
110
110
|
get accentColor(): any;
|
|
111
|
+
/** Accent colour for the Schemes / Stores / Deliver-to buttons (a neutral brand red if none is set). */
|
|
112
|
+
get utilAccent(): string;
|
|
113
|
+
/** Soft tint of the accent: the chip's resting background and the button's hover background. */
|
|
114
|
+
get utilAccentSoft(): string;
|
|
115
|
+
/** Icon colour on the solid accent chip (hover state): dark or white, whichever reads better. */
|
|
116
|
+
get utilOnAccent(): string;
|
|
111
117
|
get isTransparent(): any;
|
|
112
118
|
redirectTo(content: any): void;
|
|
113
119
|
showSearchBar: boolean;
|
|
@@ -35,10 +35,6 @@ export interface SchemePlanStore {
|
|
|
35
35
|
id: string;
|
|
36
36
|
name: string;
|
|
37
37
|
}
|
|
38
|
-
export interface SchemePlanStaff {
|
|
39
|
-
id: string;
|
|
40
|
-
name: string;
|
|
41
|
-
}
|
|
42
38
|
export type SchemePlanEnrollResult = 'STARTED' | 'LOGIN_REQUIRED';
|
|
43
39
|
export declare class SchemePlanService {
|
|
44
40
|
private readonly restService;
|
|
@@ -55,7 +51,6 @@ export declare class SchemePlanService {
|
|
|
55
51
|
* Passbook app, no eligible scheme, or the calls fail (the button then simply isn't shown).
|
|
56
52
|
*/
|
|
57
53
|
loadPlanScheme(): Observable<any | null>;
|
|
58
|
-
loadStaff(): Observable<SchemePlanStaff[]>;
|
|
59
54
|
/** Highest value of `jewellerBenefit` (same rule the Returns Calculator uses). */
|
|
60
55
|
highestBenefit(scheme: any): number;
|
|
61
56
|
/**
|
|
@@ -77,8 +72,9 @@ export declare class SchemePlanService {
|
|
|
77
72
|
* Same sequence the Returns Calculator uses: charges check, then initiate payment, then hand the
|
|
78
73
|
* Cashfree session to the host app through `cashFreeEvent`. Differences: a 403 refreshes the token
|
|
79
74
|
* and retries the charges call once, and failures are surfaced to the caller (the observable errors).
|
|
75
|
+
* No staff member is sent: the backend assigns it.
|
|
80
76
|
*/
|
|
81
|
-
enroll(scheme: any, amount: number, store: SchemePlanStore | null
|
|
77
|
+
enroll(scheme: any, amount: number, store: SchemePlanStore | null): Observable<SchemePlanEnrollResult>;
|
|
82
78
|
private refreshToken;
|
|
83
79
|
private buildPayload;
|
|
84
80
|
private readStorage;
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|