@metrifox/angular-sdk 1.0.2 → 2.0.0
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 +310 -320
- package/dist/LICENSE +21 -0
- package/dist/README.md +477 -0
- package/dist/fesm2022/index.mjs +9653 -0
- package/{lib → dist/lib}/metrifox.module.d.ts +2 -2
- package/{lib → dist/lib}/metrifox.service.d.ts +22 -14
- package/{lib → dist/lib}/types/enum.d.ts +12 -2
- package/{lib → dist/lib}/types/interface.d.ts +390 -103
- package/dist/lib/utils/theme.d.ts +27 -0
- package/dist/modules/customer-portal/components/billing-history.component.d.ts +14 -0
- package/dist/modules/customer-portal/components/credit/credit-balance-section.component.d.ts +76 -0
- package/dist/modules/customer-portal/components/customer-portal.component.d.ts +64 -0
- package/dist/modules/customer-portal/components/entitlements/entitlement-summary.component.d.ts +15 -0
- package/dist/modules/customer-portal/components/entitlements/entitlement-usage.component.d.ts +35 -0
- package/dist/modules/customer-portal/components/entitlements/entitlements-section.component.d.ts +14 -0
- package/dist/modules/customer-portal/components/invoice-preview.component.d.ts +26 -0
- package/dist/modules/customer-portal/components/payment.component.d.ts +12 -0
- package/dist/modules/customer-portal/components/plan/plans-section.component.d.ts +70 -0
- package/dist/modules/customer-portal/components/subscription/subscription-actions.component.d.ts +22 -0
- package/dist/modules/customer-portal/components/subscription/subscription-details.component.d.ts +12 -0
- package/dist/modules/customer-portal/components/subscription/subscription-items.component.d.ts +27 -0
- package/dist/modules/customer-portal/components/subscription/subscription-section.component.d.ts +34 -0
- package/dist/modules/customer-portal/utils/defaults.d.ts +2 -0
- package/dist/modules/customer-portal/utils/helpers.d.ts +20 -0
- package/dist/modules/customer-portal/utils/icon-helpers.d.ts +3 -0
- package/dist/modules/customer-portal/utils/icons.d.ts +18 -0
- package/dist/modules/metrifox-ui/index.d.ts +1 -0
- package/dist/modules/metrifox-ui/themed-popover.component.d.ts +19 -0
- package/dist/modules/pricing-table/components/localization-select.component.d.ts +22 -0
- package/{lib/components/pricing-table → dist/modules/pricing-table/components}/pricing-table.component.d.ts +28 -6
- package/dist/modules/pricing-table/utils/defaults.d.ts +2 -0
- package/dist/public-api.d.ts +22 -0
- package/dist/styles.css +3 -0
- package/dist-storybook/3rdpartylicenses.txt +304 -0
- package/dist-storybook/index.html +12 -0
- package/dist-storybook/main.js +1 -0
- package/dist-storybook/polyfills.js +1 -0
- package/dist-storybook/runtime.js +1 -0
- package/dist-storybook/styles.css +2 -0
- package/package.json +53 -13
- package/vitest.config.ts +10 -0
- package/vitest.setup.ts +5 -0
- package/fesm2022/index.mjs +0 -5898
- package/lib/components/customer-portal/customer-portal.component.d.ts +0 -193
- package/public-api.d.ts +0 -20
- package/styles.css +0 -3
- /package/{index.d.ts → dist/index.d.ts} +0 -0
- /package/{lib → dist/lib}/types/index.d.ts +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CustomerPortalTheme, PricingTableTheme, CssVarMap } from '../types/interface';
|
|
2
|
+
/**
|
|
3
|
+
* Set CSS variable only when value is defined and non-empty.
|
|
4
|
+
*/
|
|
5
|
+
export declare function setIfDefined(vars: CssVarMap, key: string, value?: string): void;
|
|
6
|
+
/**
|
|
7
|
+
* Convert CustomerPortal theme to CSS variables.
|
|
8
|
+
* Matches the React SDK's customerPortalThemeToCssVars exactly.
|
|
9
|
+
*/
|
|
10
|
+
export declare function customerPortalThemeToCssVars(theme: CustomerPortalTheme): CssVarMap;
|
|
11
|
+
/**
|
|
12
|
+
* Convert PricingTable theme to CSS variables.
|
|
13
|
+
* Matches the React SDK's pricingThemeToCssVars exactly.
|
|
14
|
+
*/
|
|
15
|
+
export declare function pricingTableThemeToCssVars(theme: PricingTableTheme): CssVarMap;
|
|
16
|
+
/**
|
|
17
|
+
* Get gradient CSS for current plan card.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getGradient(theme: PricingTableTheme | CustomerPortalTheme): {
|
|
20
|
+
gradient: {
|
|
21
|
+
100: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Get background image CSS properties for current plan card gradient.
|
|
26
|
+
*/
|
|
27
|
+
export declare function getBackgroundImage(theme: PricingTableTheme | CustomerPortalTheme): CssVarMap;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BillingHistory, SectionConfig } from '../../../lib/types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class BillingHistorySectionComponent {
|
|
4
|
+
billingHistory: BillingHistory[];
|
|
5
|
+
sectionsConfig: SectionConfig[] | undefined;
|
|
6
|
+
_formatDate(d: string | null | undefined): string;
|
|
7
|
+
_formatCurrency(amount: number | null | undefined, currency: string | null | undefined): string;
|
|
8
|
+
_formatStatus(status: string | null | undefined): string;
|
|
9
|
+
_formatSourceType(sourceType: string | null | undefined): string;
|
|
10
|
+
_isSectionHidden(key: string): boolean;
|
|
11
|
+
_getSectionLabel(key: string): string;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BillingHistorySectionComponent, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BillingHistorySectionComponent, "cp-billing-history-section", never, { "billingHistory": { "alias": "billingHistory"; "required": false; }; "sectionsConfig": { "alias": "sectionsConfig"; "required": false; }; }, {}, never, never, true, never>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { EventEmitter, OnDestroy } from '@angular/core';
|
|
2
|
+
import { SafeHtml } from '@angular/platform-browser';
|
|
3
|
+
import { Wallet, SectionConfig, CreditAllocation, CreditTransaction, WalletSetting } from '../../../../lib/types';
|
|
4
|
+
import { IconName } from '../../utils/icons';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class CreditBalanceSectionComponent implements OnDestroy {
|
|
7
|
+
wallets: Wallet[];
|
|
8
|
+
creditAllocations: CreditAllocation[];
|
|
9
|
+
allocationsLoading: boolean;
|
|
10
|
+
customerKey: string;
|
|
11
|
+
sectionsConfig: SectionConfig[] | undefined;
|
|
12
|
+
walletTabChanged: EventEmitter<{
|
|
13
|
+
walletId: string;
|
|
14
|
+
tab: string;
|
|
15
|
+
}>;
|
|
16
|
+
walletSelected: EventEmitter<number>;
|
|
17
|
+
topup: EventEmitter<string>;
|
|
18
|
+
selectedWalletIndex: import("@angular/core").WritableSignal<number>;
|
|
19
|
+
walletTab: import("@angular/core").WritableSignal<"active" | "expired" | "overage">;
|
|
20
|
+
walletTabs: ({
|
|
21
|
+
key: "active";
|
|
22
|
+
label: string;
|
|
23
|
+
} | {
|
|
24
|
+
key: "expired";
|
|
25
|
+
label: string;
|
|
26
|
+
} | {
|
|
27
|
+
key: "overage";
|
|
28
|
+
label: string;
|
|
29
|
+
})[];
|
|
30
|
+
showCreditTransactions: import("@angular/core").WritableSignal<boolean>;
|
|
31
|
+
selectedAllocation: import("@angular/core").WritableSignal<CreditAllocation>;
|
|
32
|
+
creditTransactions: import("@angular/core").WritableSignal<CreditTransaction[]>;
|
|
33
|
+
creditTransactionsLoading: import("@angular/core").WritableSignal<boolean>;
|
|
34
|
+
showWalletSettings: import("@angular/core").WritableSignal<boolean>;
|
|
35
|
+
selectedWalletForSettings: string;
|
|
36
|
+
lowBalanceEnabled: boolean;
|
|
37
|
+
walletSettingThreshold: string;
|
|
38
|
+
walletSettingBehaviour: 'notify' | 'auto_top_up';
|
|
39
|
+
walletSettingTargetBalance: string;
|
|
40
|
+
walletSettingMonthlyLimit: string;
|
|
41
|
+
walletSettingsList: import("@angular/core").WritableSignal<WalletSetting[]>;
|
|
42
|
+
walletSettingsLoading: import("@angular/core").WritableSignal<boolean>;
|
|
43
|
+
walletSettingsSaving: import("@angular/core").WritableSignal<boolean>;
|
|
44
|
+
walletSettingsError: import("@angular/core").WritableSignal<string>;
|
|
45
|
+
walletSettingEditId: import("@angular/core").WritableSignal<string>;
|
|
46
|
+
Math: Math;
|
|
47
|
+
private destroy$;
|
|
48
|
+
private metrifoxService;
|
|
49
|
+
private sanitizer;
|
|
50
|
+
_isSectionHidden(key: string): boolean;
|
|
51
|
+
_getSectionLabel(key: string): string;
|
|
52
|
+
_getIcon(name: IconName): SafeHtml;
|
|
53
|
+
_formatPrice(value: number | undefined | null): string;
|
|
54
|
+
selectWallet(index: number): void;
|
|
55
|
+
changeWalletTab(tab: 'active' | 'expired' | 'overage'): void;
|
|
56
|
+
handleTopup(walletId: string): void;
|
|
57
|
+
formatAllocationDateShort(dateStr: string): string;
|
|
58
|
+
formatAllocationSource(type: string): string;
|
|
59
|
+
formatValidUntilDate(dateStr: string): string;
|
|
60
|
+
getAllocationBalance(allocation: CreditAllocation): number;
|
|
61
|
+
getAllocationProgressPercent(allocation: CreditAllocation): number;
|
|
62
|
+
openCreditTransactions(allocation: CreditAllocation): void;
|
|
63
|
+
closeCreditTransactions(): void;
|
|
64
|
+
openWalletSettings(): void;
|
|
65
|
+
closeWalletSettings(): void;
|
|
66
|
+
getWalletSettingsValidationErrors(): string[];
|
|
67
|
+
saveWalletSettings(): void;
|
|
68
|
+
onWalletSelectChange(event: Event): void;
|
|
69
|
+
toggleLowBalance(): void;
|
|
70
|
+
getSelectedWalletName(): string;
|
|
71
|
+
ngOnDestroy(): void;
|
|
72
|
+
private loadWalletSettings;
|
|
73
|
+
private applyExistingWalletSetting;
|
|
74
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CreditBalanceSectionComponent, never>;
|
|
75
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CreditBalanceSectionComponent, "cp-credit-balance-section", never, { "wallets": { "alias": "wallets"; "required": false; }; "creditAllocations": { "alias": "creditAllocations"; "required": false; }; "allocationsLoading": { "alias": "allocationsLoading"; "required": false; }; "customerKey": { "alias": "customerKey"; "required": false; }; "sectionsConfig": { "alias": "sectionsConfig"; "required": false; }; }, { "walletTabChanged": "walletTabChanged"; "walletSelected": "walletSelected"; "topup": "topup"; }, never, never, true, never>;
|
|
76
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { SafeHtml } from '@angular/platform-browser';
|
|
3
|
+
import { CustomerDetails, Wallet, SectionConfig, CustomerDataLoadedEvent, ErrorEvent, CustomerPortalTheme, BillingHistory, Invoice, Subscription, EntitlementSummary, EntitlementUsage, CreditAllocation, UpcomingInvoice, SubscriptionSettings } from '../../../lib/types';
|
|
4
|
+
import { ICONS } from '../utils/icons';
|
|
5
|
+
import { defaultCustomerPortalTheme } from '../utils/defaults';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export { defaultCustomerPortalTheme };
|
|
8
|
+
export declare class CustomerPortalComponent implements OnInit, OnChanges, OnDestroy {
|
|
9
|
+
private destroy$;
|
|
10
|
+
private isLoadingData;
|
|
11
|
+
private lastLoadedCustomerKey;
|
|
12
|
+
private iconCache;
|
|
13
|
+
customerKey: string;
|
|
14
|
+
sectionsConfig?: SectionConfig[];
|
|
15
|
+
private themeSignal;
|
|
16
|
+
set theme(value: CustomerPortalTheme | undefined);
|
|
17
|
+
dataLoaded: EventEmitter<CustomerDataLoadedEvent>;
|
|
18
|
+
errorOccurred: EventEmitter<ErrorEvent>;
|
|
19
|
+
private metrifoxService;
|
|
20
|
+
private sanitizer;
|
|
21
|
+
loading: import("@angular/core").WritableSignal<boolean>;
|
|
22
|
+
error: import("@angular/core").WritableSignal<string>;
|
|
23
|
+
customerDetails: import("@angular/core").WritableSignal<CustomerDetails>;
|
|
24
|
+
wallets: import("@angular/core").WritableSignal<Wallet[]>;
|
|
25
|
+
billingHistory: import("@angular/core").WritableSignal<BillingHistory[]>;
|
|
26
|
+
subscriptionSettings: import("@angular/core").WritableSignal<SubscriptionSettings>;
|
|
27
|
+
entitlementSummary: import("@angular/core").WritableSignal<EntitlementSummary[]>;
|
|
28
|
+
entitlementUsage: import("@angular/core").WritableSignal<EntitlementUsage[]>;
|
|
29
|
+
creditAllocations: import("@angular/core").WritableSignal<CreditAllocation[]>;
|
|
30
|
+
selectedTabIndex: import("@angular/core").WritableSignal<number>;
|
|
31
|
+
showInvoicePreview: import("@angular/core").WritableSignal<boolean>;
|
|
32
|
+
selectedInvoice: import("@angular/core").WritableSignal<Record<string, unknown>>;
|
|
33
|
+
invoiceDetails: import("@angular/core").WritableSignal<Invoice>;
|
|
34
|
+
invoiceDetailsLoading: import("@angular/core").WritableSignal<boolean>;
|
|
35
|
+
allocationsLoading: import("@angular/core").WritableSignal<boolean>;
|
|
36
|
+
subscriptions: import("@angular/core").Signal<Subscription[]>;
|
|
37
|
+
tenantCheckoutUsername: import("@angular/core").Signal<string>;
|
|
38
|
+
cssVars: import("@angular/core").Signal<{
|
|
39
|
+
'font-family': string;
|
|
40
|
+
'background-color': string;
|
|
41
|
+
'border-radius': string;
|
|
42
|
+
}>;
|
|
43
|
+
ngOnInit(): void;
|
|
44
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
45
|
+
ngOnDestroy(): void;
|
|
46
|
+
private loadCustomerDetails;
|
|
47
|
+
private loadAdditionalData;
|
|
48
|
+
private loadDataForSubscription;
|
|
49
|
+
private loadCreditAllocations;
|
|
50
|
+
selectTab(index: number): void;
|
|
51
|
+
getIcon(name: keyof typeof ICONS): SafeHtml;
|
|
52
|
+
reloadCustomerDetails(): void;
|
|
53
|
+
handleManagePlan(_subscription: unknown): void;
|
|
54
|
+
handleTopup(walletId: string): void;
|
|
55
|
+
openInvoicePreview(invoice: UpcomingInvoice): void;
|
|
56
|
+
closeInvoicePreview(): void;
|
|
57
|
+
onWalletTabChanged(event: {
|
|
58
|
+
walletId: string;
|
|
59
|
+
tab: string;
|
|
60
|
+
}): void;
|
|
61
|
+
onWalletSelected(index: number): void;
|
|
62
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CustomerPortalComponent, never>;
|
|
63
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CustomerPortalComponent, "metrifox-customer-portal", never, { "customerKey": { "alias": "customerKey"; "required": true; }; "sectionsConfig": { "alias": "sectionsConfig"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; }, { "dataLoaded": "dataLoaded"; "errorOccurred": "errorOccurred"; }, never, never, true, never>;
|
|
64
|
+
}
|
package/dist/modules/customer-portal/components/entitlements/entitlement-summary.component.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SafeHtml } from '@angular/platform-browser';
|
|
2
|
+
import { IconName } from '../../utils/icons';
|
|
3
|
+
import { EntitlementSummary } from '../../../../lib/types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class EntitlementSummaryComponent {
|
|
6
|
+
private sanitizer;
|
|
7
|
+
entitlementSummary: EntitlementSummary[];
|
|
8
|
+
_getIcon(name: IconName): SafeHtml;
|
|
9
|
+
_capitalize(str: string): string;
|
|
10
|
+
formatUsageModel(entitlement: EntitlementSummary): string;
|
|
11
|
+
formatIncludedAllowance(entitlement: EntitlementSummary): string;
|
|
12
|
+
formatUsageLimits(entitlement: EntitlementSummary): string;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EntitlementSummaryComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EntitlementSummaryComponent, "cp-entitlement-summary", never, { "entitlementSummary": { "alias": "entitlementSummary"; "required": false; }; }, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { SafeHtml } from '@angular/platform-browser';
|
|
2
|
+
import { IconName } from '../../utils/icons';
|
|
3
|
+
import { EntitlementUsage } from '../../../../lib/types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
interface ProcessedPool {
|
|
6
|
+
pool: string;
|
|
7
|
+
balance: number;
|
|
8
|
+
used: number;
|
|
9
|
+
amount: number;
|
|
10
|
+
color: string;
|
|
11
|
+
percent: number;
|
|
12
|
+
isUnlimited: boolean;
|
|
13
|
+
order: number;
|
|
14
|
+
nextResetAt: string | null;
|
|
15
|
+
}
|
|
16
|
+
export declare class EntitlementUsageComponent {
|
|
17
|
+
private sanitizer;
|
|
18
|
+
private expandedEntitlements;
|
|
19
|
+
Math: Math;
|
|
20
|
+
entitlementUsage: EntitlementUsage[];
|
|
21
|
+
get meteredEntitlements(): EntitlementUsage[];
|
|
22
|
+
_getIcon(name: IconName): SafeHtml;
|
|
23
|
+
_capitalize(str: string): string;
|
|
24
|
+
_formatNumber(num: number): string;
|
|
25
|
+
toggleExpand(id: string): void;
|
|
26
|
+
isExpanded(id: string): boolean;
|
|
27
|
+
getUsageBalance(usage: EntitlementUsage): string;
|
|
28
|
+
getUsagePercent(usage: EntitlementUsage): number;
|
|
29
|
+
getUsageText(usage: EntitlementUsage): string;
|
|
30
|
+
getProcessedPools(usage: EntitlementUsage): ProcessedPool[];
|
|
31
|
+
formatResetDate(dateStr: string): string;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EntitlementUsageComponent, never>;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EntitlementUsageComponent, "cp-entitlement-usage", never, { "entitlementUsage": { "alias": "entitlementUsage"; "required": false; }; }, {}, never, never, true, never>;
|
|
34
|
+
}
|
|
35
|
+
export {};
|
package/dist/modules/customer-portal/components/entitlements/entitlements-section.component.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SectionConfig, EntitlementSummary, EntitlementUsage } from '../../../../lib/types/interface';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class EntitlementsSectionComponent {
|
|
4
|
+
entitlementSummary: EntitlementSummary[];
|
|
5
|
+
entitlementUsage: EntitlementUsage[];
|
|
6
|
+
sectionsConfig: SectionConfig[] | undefined;
|
|
7
|
+
entitlementTab: import("@angular/core").WritableSignal<"usage" | "summary">;
|
|
8
|
+
get hasMeteredEntitlements(): boolean;
|
|
9
|
+
_isSectionHidden(key: string): boolean;
|
|
10
|
+
_getSectionLabel(key: string): string;
|
|
11
|
+
changeEntitlementTab(tab: 'summary' | 'usage'): void;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EntitlementsSectionComponent, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EntitlementsSectionComponent, "cp-entitlements-section", never, { "entitlementSummary": { "alias": "entitlementSummary"; "required": false; }; "entitlementUsage": { "alias": "entitlementUsage"; "required": false; }; "sectionsConfig": { "alias": "sectionsConfig"; "required": false; }; }, {}, never, never, true, never>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { Invoice, TenantAddress, CustomerDetails } from '../../../lib/types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class InvoicePreviewComponent {
|
|
5
|
+
show: boolean;
|
|
6
|
+
selectedInvoice: Record<string, any> | null;
|
|
7
|
+
invoiceDetails: Invoice | null;
|
|
8
|
+
invoiceDetailsLoading: boolean;
|
|
9
|
+
close: EventEmitter<void>;
|
|
10
|
+
closePreview(): void;
|
|
11
|
+
formatInvoiceDate(d: string | null | undefined): string;
|
|
12
|
+
formatInvoicePrice(amount: number): string;
|
|
13
|
+
toNumber(value: string | number | null | undefined): number;
|
|
14
|
+
getInvoiceCurrencySymbol(invoice: Invoice | null): string;
|
|
15
|
+
getInvoiceSummaryNumber(invoice: Invoice | null, ...keys: string[]): number;
|
|
16
|
+
getInvoiceLineItems(invoice: Invoice | null): Record<string, any>[];
|
|
17
|
+
private getInvoiceLineItemRangeLabel;
|
|
18
|
+
private normalizeInvoiceLineItem;
|
|
19
|
+
buildTenantAddress(addr: TenantAddress | null | undefined): string;
|
|
20
|
+
buildBilledToAddress(customer: CustomerDetails | null | undefined): string;
|
|
21
|
+
private escapeHtml;
|
|
22
|
+
triggerInvoicePrint(): void;
|
|
23
|
+
private buildInvoicePrintHtml;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InvoicePreviewComponent, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InvoicePreviewComponent, "cp-invoice-preview", never, { "show": { "alias": "show"; "required": false; }; "selectedInvoice": { "alias": "selectedInvoice"; "required": false; }; "invoiceDetails": { "alias": "invoiceDetails"; "required": false; }; "invoiceDetailsLoading": { "alias": "invoiceDetailsLoading"; "required": false; }; }, { "close": "close"; }, never, never, true, never>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Subscription, CustomerDetails, SectionConfig } from '../../../lib/types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class PaymentSectionComponent {
|
|
4
|
+
subscription: Subscription | undefined;
|
|
5
|
+
customerDetails: CustomerDetails | undefined;
|
|
6
|
+
sectionsConfig: SectionConfig[] | undefined;
|
|
7
|
+
_isSectionHidden(key: string): boolean;
|
|
8
|
+
_getSectionLabel(key: string): string;
|
|
9
|
+
getBillingAddress(): string;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PaymentSectionComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PaymentSectionComponent, "cp-payment-section", never, { "subscription": { "alias": "subscription"; "required": false; }; "customerDetails": { "alias": "customerDetails"; "required": false; }; "sectionsConfig": { "alias": "sectionsConfig"; "required": false; }; }, {}, never, never, true, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { SafeHtml } from '@angular/platform-browser';
|
|
3
|
+
import { formatPrice } from '../../utils/helpers';
|
|
4
|
+
import { IconName } from '../../utils/icons';
|
|
5
|
+
import { SectionConfig, Offering, PriceOption, Entitlement, CreditSystem, Subscription } from '../../../../lib/types';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class PlansSectionComponent implements OnChanges, OnDestroy {
|
|
8
|
+
subscription: Subscription | undefined;
|
|
9
|
+
customerKey: string;
|
|
10
|
+
tenantCheckoutUsername: string;
|
|
11
|
+
sectionsConfig: SectionConfig[] | undefined;
|
|
12
|
+
selectedPlanInterval: import("@angular/core").WritableSignal<string>;
|
|
13
|
+
explorePricesPlan: import("@angular/core").WritableSignal<Offering>;
|
|
14
|
+
plansData: import("@angular/core").WritableSignal<Offering[]>;
|
|
15
|
+
loadingPlans: import("@angular/core").WritableSignal<boolean>;
|
|
16
|
+
selectedCountry: import("@angular/core").WritableSignal<string>;
|
|
17
|
+
localizationOptions: import("@angular/core").WritableSignal<{
|
|
18
|
+
label: string;
|
|
19
|
+
value: string;
|
|
20
|
+
}[]>;
|
|
21
|
+
showLocalizationDropdown: import("@angular/core").WritableSignal<boolean>;
|
|
22
|
+
resolvingLocalization: import("@angular/core").WritableSignal<boolean>;
|
|
23
|
+
private sanitizer;
|
|
24
|
+
private metrifox;
|
|
25
|
+
private http;
|
|
26
|
+
private destroy$;
|
|
27
|
+
planIntervals: import("@angular/core").Signal<string[]>;
|
|
28
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
29
|
+
ngOnDestroy(): void;
|
|
30
|
+
private loadPublishedPlans;
|
|
31
|
+
private dedupePlans;
|
|
32
|
+
private buildLocalizationOptions;
|
|
33
|
+
onCountryChange(value: string): void;
|
|
34
|
+
private syncInterval;
|
|
35
|
+
currentPlanIndex: import("@angular/core").Signal<number>;
|
|
36
|
+
shouldShowPlanDescription: import("@angular/core").Signal<boolean>;
|
|
37
|
+
shouldShowDynamicPricesSlot: import("@angular/core").Signal<boolean>;
|
|
38
|
+
_isSectionHidden(key: string): boolean;
|
|
39
|
+
_getSectionLabel(key: string): string;
|
|
40
|
+
_getIcon(name: IconName): SafeHtml;
|
|
41
|
+
selectPlanInterval(interval: string): void;
|
|
42
|
+
formatPlanInterval(interval: string): string;
|
|
43
|
+
getPlanPriceOption(plan: Offering): PriceOption | undefined;
|
|
44
|
+
getPlanPriceInteger(plan: Offering): string;
|
|
45
|
+
getPlanPriceDecimal(plan: Offering): string;
|
|
46
|
+
getMultiplyNumber(interval: string, intervalValue: number): number;
|
|
47
|
+
getPlanFixedPriceBilledAmount(plan: Offering): number;
|
|
48
|
+
getPlanFixedPriceCurrencySymbol(plan: Offering): string;
|
|
49
|
+
hasFixedPrice(plan: Offering): boolean;
|
|
50
|
+
getDynamicPrices(plan: Offering): PriceOption[];
|
|
51
|
+
getDynamicPriceName(priceOption: PriceOption): string;
|
|
52
|
+
formatDynamicPrice(priceOption: PriceOption): string;
|
|
53
|
+
formatDynamicPriceFull(priceOption: PriceOption): string;
|
|
54
|
+
getDynamicPriceAmountDisplay(priceOption: PriceOption): string;
|
|
55
|
+
getMainDynamicPriceInteger(plan: Offering): string;
|
|
56
|
+
getMainDynamicPriceDecimal(plan: Offering): string;
|
|
57
|
+
getMainDynamicPriceUnit(plan: Offering): string;
|
|
58
|
+
getPluralizedUnit(plan: Offering): string;
|
|
59
|
+
getPlanButtonText(plan: Offering, index: number): string;
|
|
60
|
+
getVisibleEntitlements(plan: Offering): Entitlement[];
|
|
61
|
+
getVisibleCredits(plan: Offering): CreditSystem[];
|
|
62
|
+
formatEntitlement(entitlement: Entitlement): string;
|
|
63
|
+
getListingUrl(): string;
|
|
64
|
+
openExplorePricesModal(plan: Offering): void;
|
|
65
|
+
closeExplorePricesModal(): void;
|
|
66
|
+
handlePlanAction(plan: Offering): void;
|
|
67
|
+
formatPrice: typeof formatPrice;
|
|
68
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PlansSectionComponent, never>;
|
|
69
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PlansSectionComponent, "cp-plans-section", never, { "subscription": { "alias": "subscription"; "required": false; }; "customerKey": { "alias": "customerKey"; "required": false; }; "tenantCheckoutUsername": { "alias": "tenantCheckoutUsername"; "required": false; }; "sectionsConfig": { "alias": "sectionsConfig"; "required": false; }; }, {}, never, never, true, never>;
|
|
70
|
+
}
|
package/dist/modules/customer-portal/components/subscription/subscription-actions.component.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SafeHtml } from '@angular/platform-browser';
|
|
2
|
+
import { ThemedPopoverComponent } from '../../../metrifox-ui';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface SubscriptionActionItem {
|
|
5
|
+
label: string;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
danger?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** Class string for a subscription action row (popover menu item). Exported for unit tests. */
|
|
10
|
+
export declare function subscriptionActionItemClass(danger?: boolean): string;
|
|
11
|
+
export declare class SubscriptionActionsComponent {
|
|
12
|
+
private sanitizer;
|
|
13
|
+
actions: SubscriptionActionItem[];
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
readonly triggerClass = "inline-flex items-center justify-center text-[var(--cp-popover-trigger-icon-color)] hover:opacity-80 !bg-transparent !border-0 cursor-pointer p-1 outline-none";
|
|
16
|
+
readonly panelClass = "min-w-[10rem] py-1 rounded-[var(--cp-popover-menu-radius)] bg-[var(--cp-popover-menu-bg)] border border-[var(--cp-popover-menu-border)] shadow-lg";
|
|
17
|
+
moreIcon: SafeHtml;
|
|
18
|
+
itemClass(danger?: boolean): string;
|
|
19
|
+
run(action: SubscriptionActionItem, popover: ThemedPopoverComponent): void;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SubscriptionActionsComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SubscriptionActionsComponent, "cp-subscription-actions", never, { "actions": { "alias": "actions"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
|
|
22
|
+
}
|
package/dist/modules/customer-portal/components/subscription/subscription-details.component.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { SubscriptionDetails, UpcomingInvoice } from '../../../../lib/types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class SubscriptionDetailsComponent {
|
|
5
|
+
sub: SubscriptionDetails;
|
|
6
|
+
invoicePreview: EventEmitter<UpcomingInvoice>;
|
|
7
|
+
_formatDate(d: string | null | undefined): string;
|
|
8
|
+
_formatCurrency(amount: number | null | undefined, currency: string | null | undefined): string;
|
|
9
|
+
_formatStatus(status: string | null | undefined): string;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SubscriptionDetailsComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SubscriptionDetailsComponent, "cp-subscription-details", never, { "sub": { "alias": "sub"; "required": true; }; }, { "invoicePreview": "invoicePreview"; }, never, never, true, never>;
|
|
12
|
+
}
|
package/dist/modules/customer-portal/components/subscription/subscription-items.component.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { SubscriptionItem } from '../../../../lib/types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SubscriptionItemsComponent {
|
|
4
|
+
private expandedAddons;
|
|
5
|
+
items: SubscriptionItem[];
|
|
6
|
+
canUpdateQuantities: boolean;
|
|
7
|
+
tenantCheckoutUsername: string;
|
|
8
|
+
customerKey: string;
|
|
9
|
+
subscriptionId: string;
|
|
10
|
+
offeringKey: string;
|
|
11
|
+
toggleAddon(key: string): void;
|
|
12
|
+
isAddonExpanded(key: string): boolean;
|
|
13
|
+
openUpdateItems(): void;
|
|
14
|
+
handleAddAddon(): void;
|
|
15
|
+
getPlanLineItems(): SubscriptionItem[];
|
|
16
|
+
getAddonLineItems(): SubscriptionItem[];
|
|
17
|
+
getGroupedAddonItems(): {
|
|
18
|
+
key: string;
|
|
19
|
+
name: string;
|
|
20
|
+
baseItem: SubscriptionItem;
|
|
21
|
+
children: SubscriptionItem[];
|
|
22
|
+
}[];
|
|
23
|
+
_capitalize(str: string | undefined): string;
|
|
24
|
+
_formatCurrency(amount: number | null | undefined, currency: string | null | undefined): string;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SubscriptionItemsComponent, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SubscriptionItemsComponent, "cp-subscription-items", never, { "items": { "alias": "items"; "required": false; }; "canUpdateQuantities": { "alias": "canUpdateQuantities"; "required": false; }; "tenantCheckoutUsername": { "alias": "tenantCheckoutUsername"; "required": false; }; "customerKey": { "alias": "customerKey"; "required": false; }; "subscriptionId": { "alias": "subscriptionId"; "required": false; }; "offeringKey": { "alias": "offeringKey"; "required": false; }; }, {}, never, never, true, never>;
|
|
27
|
+
}
|
package/dist/modules/customer-portal/components/subscription/subscription-section.component.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { SectionConfig, Subscription, SubscriptionSettings, UpcomingInvoice } from '../../../../lib/types';
|
|
3
|
+
import { SubscriptionActionItem } from './subscription-actions.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class SubscriptionSectionComponent {
|
|
6
|
+
private metrifox;
|
|
7
|
+
subscription: Subscription | undefined;
|
|
8
|
+
sectionsConfig: SectionConfig[] | undefined;
|
|
9
|
+
customerKey: string;
|
|
10
|
+
tenantCheckoutUsername: string;
|
|
11
|
+
subscriptionSettings: SubscriptionSettings | null;
|
|
12
|
+
invoicePreview: EventEmitter<UpcomingInvoice>;
|
|
13
|
+
managePlan: EventEmitter<Subscription>;
|
|
14
|
+
subscriptionRefreshed: EventEmitter<void>;
|
|
15
|
+
openCancel: import("@angular/core").WritableSignal<boolean>;
|
|
16
|
+
openRevert: import("@angular/core").WritableSignal<boolean>;
|
|
17
|
+
openCancelScheduled: import("@angular/core").WritableSignal<boolean>;
|
|
18
|
+
actionLoading: import("@angular/core").WritableSignal<boolean>;
|
|
19
|
+
actionError: import("@angular/core").WritableSignal<string>;
|
|
20
|
+
subscriptionActions(): SubscriptionActionItem[];
|
|
21
|
+
hasScheduledChange(): boolean;
|
|
22
|
+
isDeactivated(): boolean;
|
|
23
|
+
shouldShowBanner(): boolean;
|
|
24
|
+
scheduledBannerMessage(): string;
|
|
25
|
+
cancelScheduledBannerLabel(): string;
|
|
26
|
+
cancelScheduledDescription(): string;
|
|
27
|
+
confirmCancelSubscription(): void;
|
|
28
|
+
confirmRevert(): void;
|
|
29
|
+
confirmCancelScheduled(): void;
|
|
30
|
+
_isSectionHidden(key: string): boolean;
|
|
31
|
+
_getSectionLabel(key: string): string;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SubscriptionSectionComponent, never>;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SubscriptionSectionComponent, "cp-subscription-section", never, { "subscription": { "alias": "subscription"; "required": false; }; "sectionsConfig": { "alias": "sectionsConfig"; "required": false; }; "customerKey": { "alias": "customerKey"; "required": false; }; "tenantCheckoutUsername": { "alias": "tenantCheckoutUsername"; "required": false; }; "subscriptionSettings": { "alias": "subscriptionSettings"; "required": false; }; }, { "invoicePreview": "invoicePreview"; "managePlan": "managePlan"; "subscriptionRefreshed": "subscriptionRefreshed"; }, never, never, true, never>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Offering, ParentOffering, SectionConfig } from '../../../lib/types';
|
|
2
|
+
/**
|
|
3
|
+
* Billing intervals for plan cards — matches pricing-table `intervals` when nested:
|
|
4
|
+
* use `published_version.price_options`; otherwise scan the resolved offering’s price option arrays.
|
|
5
|
+
*/
|
|
6
|
+
export declare function extractUniqueBillingIntervals(plans: (Offering | ParentOffering)[]): string[];
|
|
7
|
+
export declare function formatDate(dateString: string | null | undefined): string;
|
|
8
|
+
export declare function formatCurrency(amount: number | null | undefined, currency: string | null | undefined): string;
|
|
9
|
+
export declare function formatPrice(value: number | undefined | null): string;
|
|
10
|
+
export declare function formatNumber(num: number): string;
|
|
11
|
+
export declare function capitalize(str: string): string;
|
|
12
|
+
export declare function formatStatus(status: string | null | undefined): string;
|
|
13
|
+
export declare function formatSourceType(sourceType: string | null | undefined): string;
|
|
14
|
+
export declare function getCurrencySymbol(currency: string): string;
|
|
15
|
+
export declare function formatPriceAmount(amount: number): string;
|
|
16
|
+
export declare function getResetIntervalLabel(interval: string): string;
|
|
17
|
+
export declare function getStatusBgClass(status: string | null | undefined): string;
|
|
18
|
+
export declare function getInvoiceStatusBgClass(status: string | null | undefined): string;
|
|
19
|
+
export declare function isSectionHidden(sectionsConfig: SectionConfig[] | undefined, key: string): boolean;
|
|
20
|
+
export declare function getSectionLabel(sectionsConfig: SectionConfig[] | undefined, key: string): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const ICONS: {
|
|
2
|
+
readonly money: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M17 21.25H7c-3.65 0-5.75-2.1-5.75-5.75v-7c0-3.65 2.1-5.75 5.75-5.75h10c3.65 0 5.75 2.1 5.75 5.75v7c0 3.65-2.1 5.75-5.75 5.75Zm-10-17c-2.86 0-4.25 1.39-4.25 4.25v7c0 2.86 1.39 4.25 4.25 4.25h10c2.86 0 4.25-1.39 4.25-4.25v-7c0-2.86-1.39-4.25-4.25-4.25H7Z\"></path><path d=\"M12 15.75c-2.07 0-3.75-1.68-3.75-3.75 0-2.07 1.68-3.75 3.75-3.75 2.07 0 3.75 1.68 3.75 3.75 0 2.07-1.68 3.75-3.75 3.75Zm0-6c-1.24 0-2.25 1.01-2.25 2.25s1.01 2.25 2.25 2.25 2.25-1.01 2.25-2.25S13.24 9.75 12 9.75ZM5.5 15.25c-.41 0-.75-.34-.75-.75v-5c0-.41.34-.75.75-.75s.75.34.75.75v5c0 .41-.34.75-.75.75ZM18.5 15.25c-.41 0-.75-.34-.75-.75v-5c0-.41.34-.75.75-.75s.75.34.75.75v5c0 .41-.34.75-.75.75Z\"></path></svg>";
|
|
3
|
+
readonly cardReceive: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M2 8.5H14.5\"/><path d=\"M6 16.5H8\"/><path d=\"M10.5 16.5H14.5\"/><path d=\"M22 12.03V16.11C22 19.62 21.11 20.5 17.56 20.5H6.44C2.89 20.5 2 19.62 2 16.11V7.89C2 4.38 2.89 3.5 6.44 3.5H14.5\"/><path d=\"M20 3.5V9.5L22 7.5\"/><path d=\"M20 9.5L18 7.5\"/></svg>";
|
|
4
|
+
readonly settings: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"3\"/><path d=\"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z\"/></svg>";
|
|
5
|
+
readonly settingsAlt: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/></svg>";
|
|
6
|
+
readonly closeCircle: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2Zm3.36 12.3c.29.29.29.77 0 1.06-.15.15-.34.22-.53.22s-.38-.07-.53-.22l-2.3-2.3-2.3 2.3c-.15.15-.34.22-.53.22s-.38-.07-.53-.22a.754.754 0 0 1 0-1.06l2.3-2.3-2.3-2.3a.754.754 0 0 1 0-1.06c.29-.29.77-.29 1.06 0l2.3 2.3 2.3-2.3c.29-.29.77-.29 1.06 0 .29.29.29.77 0 1.06l-2.3 2.3 2.3 2.3Z\"/></svg>";
|
|
7
|
+
readonly walletEmpty: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"84\" height=\"84\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#9CA3AF\" stroke-width=\"1\"><path d=\"M18.04 13.55c-.42.41-.66 1-.6 1.63.09 1.08 1.08 1.87 2.16 1.87h1.9v1.19c0 2.07-1.69 3.76-3.76 3.76H6.26c-2.07 0-3.76-1.69-3.76-3.76v-6.73c0-2.07 1.69-3.76 3.76-3.76h11.48c2.07 0 3.76 1.69 3.76 3.76v1.44h-2.02c-.56 0-1.07.22-1.44.6Z\"/><path d=\"M2.5 12.41V7.84c0-1.19.73-2.25 1.84-2.67l7.94-3a1.9 1.9 0 0 1 2.57 1.78v3.8\"/><path d=\"M22.56 13.97v2.06c0 .55-.44 1-1 1.02h-1.96c-1.08 0-2.07-.79-2.16-1.87-.06-.63.18-1.22.6-1.63.37-.38.88-.6 1.44-.6h2.08c.56.02 1 .47 1 1.02Z\"/><path d=\"M7 12h7\"/></svg>";
|
|
8
|
+
readonly noteEmpty: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"72\" height=\"72\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#E5E5E5\" stroke-width=\"1\"><path d=\"M8 2v3M16 2v3M3.5 9.09h17M21 8.5V17c0 3-1.5 5-5 5H8c-3.5 0-5-2-5-5V8.5c0-3 1.5-5 5-5h8c3.5 0 5 2 5 5Z\"/><path d=\"M15.695 13.7h.009M15.695 16.7h.009M11.995 13.7h.01M11.995 16.7h.01M8.294 13.7h.01M8.294 16.7h.01\"/></svg>";
|
|
9
|
+
readonly receipt: "<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M22 6V8.42C22 10 21 11 19.42 11H16V4.01C16 2.9 16.91 2 18.02 2C19.11 2.01 20.11 2.45 20.83 3.17C21.55 3.9 22 4.9 22 6Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M2 7V21C2 21.83 2.94 22.3 3.6 21.8L5.31 20.52C5.71 20.22 6.27 20.26 6.63 20.62L8.29 22.29C8.68 22.68 9.32 22.68 9.71 22.29L11.39 20.61C11.74 20.26 12.3 20.22 12.69 20.52L14.4 21.8C15.06 22.29 16 21.82 16 21V4C16 2.9 16.9 2 18 2H7H6C3 2 2 3.79 2 6V7Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M9 13.01H12\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M9 9.01H12\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M5.99609 13H6.00508\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M5.99609 9H6.00508\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>";
|
|
10
|
+
readonly radar: "<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 17\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.99967 3.33333C5.11301 2.5 6.49967 2 7.99967 2C11.6797 2 14.6663 4.98667 14.6663 8.66667C14.6663 12.3467 11.6797 15.3333 7.99967 15.3333C4.31967 15.3333 1.33301 12.3467 1.33301 8.66667C1.33301 7.46 1.653 6.32666 2.21967 5.34666L7.99967 8.66667\" stroke=\"currentColor\" stroke-width=\"1.2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>";
|
|
11
|
+
readonly arrowDown: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m6 9 6 6 6-6\"></path></svg>";
|
|
12
|
+
readonly arrowDownRight: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M7 7l10 10M17 7v10H7\"/></svg>";
|
|
13
|
+
readonly subtitle: "<svg width=\"18\" height=\"18\" viewBox=\"0 0 16 16\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9.99967 15.1663H5.99967C2.37967 15.1663 0.833008 13.6197 0.833008 9.99967V5.99967C0.833008 2.37967 2.37967 0.833008 5.99967 0.833008H9.99967C13.6197 0.833008 15.1663 2.37967 15.1663 5.99967V9.99967C15.1663 13.6197 13.6197 15.1663 9.99967 15.1663ZM5.99967 1.83301C2.92634 1.83301 1.83301 2.92634 1.83301 5.99967V9.99967C1.83301 13.073 2.92634 14.1663 5.99967 14.1663H9.99967C13.073 14.1663 14.1663 13.073 14.1663 9.99967V5.99967C14.1663 2.92634 13.073 1.83301 9.99967 1.83301H5.99967Z\"/><path d=\"M11.6669 11.8867H10.4336C10.1603 11.8867 9.93359 11.6601 9.93359 11.3867C9.93359 11.1134 10.1603 10.8867 10.4336 10.8867H11.6669C11.9403 10.8867 12.1669 11.1134 12.1669 11.3867C12.1669 11.6601 11.9403 11.8867 11.6669 11.8867Z\"/><path d=\"M8.64634 11.8867H4.33301C4.05967 11.8867 3.83301 11.6601 3.83301 11.3867C3.83301 11.1134 4.05967 10.8867 4.33301 10.8867H8.64634C8.91967 10.8867 9.14634 11.1134 9.14634 11.3867C9.14634 11.6601 8.92634 11.8867 8.64634 11.8867Z\"/><path d=\"M11.6671 9.37988H7.98047C7.70714 9.37988 7.48047 9.15322 7.48047 8.87988C7.48047 8.60655 7.70714 8.37988 7.98047 8.37988H11.6671C11.9405 8.37988 12.1671 8.60655 12.1671 8.87988C12.1671 9.15322 11.9405 9.37988 11.6671 9.37988Z\"/><path d=\"M6.17967 9.37988H4.33301C4.05967 9.37988 3.83301 9.15322 3.83301 8.87988C3.83301 8.60655 4.05967 8.37988 4.33301 8.37988H6.17967C6.45301 8.37988 6.67967 8.60655 6.67967 8.87988C6.67967 9.15322 6.45301 9.37988 6.17967 9.37988Z\"/></svg>";
|
|
14
|
+
readonly subtitleLarge: "<svg width=\"40\" height=\"40\" viewBox=\"0 0 16 16\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9.99967 15.1663H5.99967C2.37967 15.1663 0.833008 13.6197 0.833008 9.99967V5.99967C0.833008 2.37967 2.37967 0.833008 5.99967 0.833008H9.99967C13.6197 0.833008 15.1663 2.37967 15.1663 5.99967V9.99967C15.1663 13.6197 13.6197 15.1663 9.99967 15.1663ZM5.99967 1.83301C2.92634 1.83301 1.83301 2.92634 1.83301 5.99967V9.99967C1.83301 13.073 2.92634 14.1663 5.99967 14.1663H9.99967C13.073 14.1663 14.1663 13.073 14.1663 9.99967V5.99967C14.1663 2.92634 13.073 1.83301 9.99967 1.83301H5.99967Z\"/><path d=\"M11.6669 11.8867H10.4336C10.1603 11.8867 9.93359 11.6601 9.93359 11.3867C9.93359 11.1134 10.1603 10.8867 10.4336 10.8867H11.6669C11.9403 10.8867 12.1669 11.1134 12.1669 11.3867C12.1669 11.6601 11.9403 11.8867 11.6669 11.8867Z\"/><path d=\"M8.64634 11.8867H4.33301C4.05967 11.8867 3.83301 11.6601 3.83301 11.3867C3.83301 11.1134 4.05967 10.8867 4.33301 10.8867H8.64634C8.91967 10.8867 9.14634 11.1134 9.14634 11.3867C9.14634 11.6601 8.92634 11.8867 8.64634 11.8867Z\"/><path d=\"M11.6671 9.37988H7.98047C7.70714 9.37988 7.48047 9.15322 7.48047 8.87988C7.48047 8.60655 7.70714 8.37988 7.98047 8.37988H11.6671C11.9405 8.37988 12.1671 8.60655 12.1671 8.87988C12.1671 9.15322 11.9405 9.37988 11.6671 9.37988Z\"/><path d=\"M6.17967 9.37988H4.33301C4.05967 9.37988 3.83301 9.15322 3.83301 8.87988C3.83301 8.60655 4.05967 8.37988 4.33301 8.37988H6.17967C6.45301 8.37988 6.67967 8.60655 6.67967 8.87988C6.67967 9.15322 6.45301 9.37988 6.17967 9.37988Z\"/></svg>";
|
|
15
|
+
readonly check: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20 6 9 17 4 12\"></polyline></svg>";
|
|
16
|
+
readonly moreVertical: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"5\" r=\"1\" fill=\"currentColor\"/><circle cx=\"12\" cy=\"12\" r=\"1\" fill=\"currentColor\"/><circle cx=\"12\" cy=\"19\" r=\"1\" fill=\"currentColor\"/></svg>";
|
|
17
|
+
};
|
|
18
|
+
export type IconName = keyof typeof ICONS;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ThemedPopoverComponent } from './themed-popover.component';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* In-place popover (no portal). Panel uses themed CSS variables (e.g. --cp-popover-*).
|
|
4
|
+
*/
|
|
5
|
+
export declare class ThemedPopoverComponent {
|
|
6
|
+
private el;
|
|
7
|
+
open: import("@angular/core").WritableSignal<boolean>;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
triggerClassName: string;
|
|
10
|
+
panelClassName: string;
|
|
11
|
+
position: 'bottom-end' | 'bottom-start' | 'top-end' | 'top-start';
|
|
12
|
+
private readonly positionClasses;
|
|
13
|
+
get panelPositionClass(): string;
|
|
14
|
+
onTriggerClick(e: Event): void;
|
|
15
|
+
onDocClick(ev: MouseEvent): void;
|
|
16
|
+
close(): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemedPopoverComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ThemedPopoverComponent, "cp-themed-popover", ["cpThemedPopover"], { "disabled": { "alias": "disabled"; "required": false; }; "triggerClassName": { "alias": "triggerClassName"; "required": false; }; "panelClassName": { "alias": "panelClassName"; "required": false; }; "position": { "alias": "position"; "required": false; }; }, {}, never, ["[cpPopoverTrigger]", "*"], true, never>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export interface LocalizationOption {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Themed country/localization dropdown. Uses --select-* CSS variables from pricing or customer portal theme.
|
|
9
|
+
*/
|
|
10
|
+
export declare class LocalizationSelectComponent {
|
|
11
|
+
value: string;
|
|
12
|
+
options: LocalizationOption[];
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
placeholderText: string;
|
|
15
|
+
containerClass: string;
|
|
16
|
+
valueChange: EventEmitter<string>;
|
|
17
|
+
/** Inline caret using currentColor so --select-caret can tint via color on a wrapper if needed */
|
|
18
|
+
readonly caretSvg = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E\")";
|
|
19
|
+
onSelect(ev: Event): void;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LocalizationSelectComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LocalizationSelectComponent, "cp-localization-select", never, { "value": { "alias": "value"; "required": false; }; "options": { "alias": "options"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "placeholderText": { "alias": "placeholderText"; "required": false; }; "containerClass": { "alias": "containerClass"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
22
|
+
}
|