@cranberry-money/shared-utils 8.17.8 → 8.17.10

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.
@@ -15,4 +15,3 @@ import type { AssetAllocation } from '@cranberry-money/shared-types';
15
15
  * validateAllocations(allocations); // returns true
16
16
  */
17
17
  export declare const validateAllocations: (allocations: readonly AssetAllocation[]) => boolean;
18
- //# sourceMappingURL=allocations.d.ts.map
package/dist/auth.d.ts CHANGED
@@ -52,4 +52,3 @@ export declare function getRefreshErrorMessage(error: TokenRefreshError): string
52
52
  * @returns Auto refresh handler with start/stop methods
53
53
  */
54
54
  export declare function createAutoRefreshHandler(refreshCallback: () => Promise<void>, checkInterval?: number): AutoRefreshHandler;
55
- //# sourceMappingURL=auth.d.ts.map
@@ -62,4 +62,3 @@ export declare function getLiquidationStatusBadge(status: LiquidationStatus, siz
62
62
  * ```
63
63
  */
64
64
  export declare function getTargetTradeStatusBadge(status: TargetTradeStatus, size?: BadgeSize): StatusBadgeStyle;
65
- //# sourceMappingURL=badge-status.d.ts.map
package/dist/badge.d.ts CHANGED
@@ -38,4 +38,3 @@ export declare function createBadge({ variant, size, className }: BadgeConfig, v
38
38
  */
39
39
  export declare const BADGE_VARIANTS: Record<BadgeVariant, string>;
40
40
  export declare const BADGE_SIZES: Record<BadgeSize, string>;
41
- //# sourceMappingURL=badge.d.ts.map
@@ -40,4 +40,3 @@ export declare const formatTransactionAmount: (amount: string | number) => strin
40
40
  * getTransactionTypeLabel('WITHDRAWAL'); // returns transaction type label from constants
41
41
  */
42
42
  export declare const getTransactionTypeLabel: <T extends string>(transactionType: T, labels?: Record<T, string>) => string;
43
- //# sourceMappingURL=cash-account.d.ts.map
@@ -78,4 +78,3 @@ export declare function hasItemWithFieldValue<T>(items: T[], fieldName: keyof T,
78
78
  * @returns Number of matching items
79
79
  */
80
80
  export declare function countByFieldValue<T>(items: T[], fieldName: keyof T, value: unknown): number;
81
- //# sourceMappingURL=collections.d.ts.map
package/dist/country.d.ts CHANGED
@@ -105,4 +105,3 @@ export declare const formatCountryWithDialCode: <T extends BaseCountry>(country:
105
105
  * const available = isCountryAvailable(country);
106
106
  */
107
107
  export declare const isCountryAvailable: <T extends BaseCountry>(country: T) => boolean;
108
- //# sourceMappingURL=country.d.ts.map
@@ -9,8 +9,8 @@
9
9
  */
10
10
  export declare const NUMBER_FORMAT_OPTIONS_CURRENCY: {
11
11
  readonly style: "currency";
12
- readonly minimumFractionDigits: 2;
13
- readonly maximumFractionDigits: 2;
12
+ readonly minimumFractionDigits: any;
13
+ readonly maximumFractionDigits: any;
14
14
  };
15
15
  /**
16
16
  * Number formatting options for currency with explicit sign display
@@ -18,8 +18,8 @@ export declare const NUMBER_FORMAT_OPTIONS_CURRENCY: {
18
18
  export declare const NUMBER_FORMAT_OPTIONS_CURRENCY_SIGNED: {
19
19
  readonly signDisplay: "always";
20
20
  readonly style: "currency";
21
- readonly minimumFractionDigits: 2;
22
- readonly maximumFractionDigits: 2;
21
+ readonly minimumFractionDigits: any;
22
+ readonly maximumFractionDigits: any;
23
23
  };
24
24
  /**
25
25
  * Formats a number as currency with commas and 2 decimal places
@@ -96,4 +96,3 @@ export declare function formatDefaultCurrency(value: number, minimumFractionDigi
96
96
  * ```
97
97
  */
98
98
  export declare function formatShares(shares: number, locale?: string): string;
99
- //# sourceMappingURL=currency.d.ts.map
@@ -69,4 +69,3 @@ export declare const formatPercentage: (value?: number) => string;
69
69
  * formatDashboardCurrency(undefined); // returns "—"
70
70
  */
71
71
  export declare const formatDashboardCurrency: (value?: number, currency?: string) => string;
72
- //# sourceMappingURL=dashboard.d.ts.map
package/dist/date.d.ts CHANGED
@@ -61,4 +61,3 @@ export declare function formatTime(dateString: string, locale?: string): string;
61
61
  * ```
62
62
  */
63
63
  export declare function formatDateTime(dateString: string, locale?: string): string;
64
- //# sourceMappingURL=date.d.ts.map
@@ -35,4 +35,3 @@ export declare const formatDocumentType: (documentType: string) => string;
35
35
  * formatDocumentStatus('archived'); // returns 'Archived'
36
36
  */
37
37
  export declare const formatDocumentStatus: (status: string) => string;
38
- //# sourceMappingURL=document.d.ts.map
@@ -43,4 +43,3 @@ export declare function downloadDataUrl(dataUrl: string, filename: string): void
43
43
  * @param headers - Optional custom headers (uses object keys if not provided)
44
44
  */
45
45
  export declare function downloadCsvFile<T extends Record<string, unknown>>(data: T[], filename: string, headers?: string[]): void;
46
- //# sourceMappingURL=downloads.d.ts.map
package/dist/filters.d.ts CHANGED
@@ -118,4 +118,3 @@ export declare function hasActiveTargetTradeFilters<T extends Record<string, unk
118
118
  * @returns number of active non-search filters
119
119
  */
120
120
  export declare function countActiveTargetTradeFilters<T extends Record<string, unknown>>(filters: T): number;
121
- //# sourceMappingURL=filters.d.ts.map
@@ -56,4 +56,3 @@ export declare function formatLabel(label: string): string;
56
56
  * camelToTitle('userProfileData') // 'User Profile Data'
57
57
  */
58
58
  export declare function camelToTitle(str: string): string;
59
- //# sourceMappingURL=formatting.d.ts.map
@@ -76,4 +76,3 @@ export declare const filterHoldingsByMinQuantity: (holdings: readonly AssetHoldi
76
76
  * sortHoldings(holdings, 'symbol', 'asc'); // Sort by symbol ascending
77
77
  */
78
78
  export declare const sortHoldings: (holdings: readonly AssetHolding[], sortBy: "quantity" | "symbol" | "name" | "createdAt", direction?: SortDirection) => AssetHolding[];
79
- //# sourceMappingURL=holdings.d.ts.map
package/dist/index.d.ts CHANGED
@@ -33,4 +33,3 @@ export { sortCountriesByName, filterCountriesByName, filterAvailableCountries, f
33
33
  export { calculateTotalAllocation, validateAllocationPercentages, formatRiskLevelDisplay, type BaseAllocation, } from './portfolio-template';
34
34
  export { validateInvestmentAmount, formatInvestmentAmount } from './investment-preference';
35
35
  export { formatBalance, formatTransactionAmount, getTransactionTypeLabel, type BaseTransactionType, } from './cash-account';
36
- //# sourceMappingURL=index.d.ts.map
@@ -125,4 +125,3 @@ export declare const countIndustriesBySector: <T extends BaseIndustry>(industrie
125
125
  * const belongsToSector = isIndustryInSector(industry, 'sector-123');
126
126
  */
127
127
  export declare const isIndustryInSector: <T extends BaseIndustry>(industry: T, sectorUuid: string) => boolean;
128
- //# sourceMappingURL=industry.d.ts.map
@@ -63,4 +63,3 @@ export declare function formatVolume(volume: number): string;
63
63
  * @returns true if market data is available, false otherwise
64
64
  */
65
65
  export declare function hasMarketData(marketData: MarketDataInfo): boolean;
66
- //# sourceMappingURL=instruments.d.ts.map
@@ -22,4 +22,3 @@ export declare const validateInvestmentAmount: (amount: number) => boolean;
22
22
  * formatInvestmentAmount('1500.50'); // returns '$1,500.50 USD'
23
23
  */
24
24
  export declare const formatInvestmentAmount: (amount: string) => string;
25
- //# sourceMappingURL=investment-preference.d.ts.map
package/dist/numbers.d.ts CHANGED
@@ -69,4 +69,3 @@ export declare function roundToDecimals(num: number, decimals?: number): number;
69
69
  * clampNumber(50, 0, 100) // 50
70
70
  */
71
71
  export declare function clampNumber(num: number, min: number, max: number): number;
72
- //# sourceMappingURL=numbers.d.ts.map
@@ -54,4 +54,3 @@ export declare const validateAllocationPercentages: <T extends BaseAllocation>(a
54
54
  * formatRiskLevelDisplay('moderate'); // returns 'Moderate'
55
55
  */
56
56
  export declare const formatRiskLevelDisplay: (riskLevel: string) => string;
57
- //# sourceMappingURL=portfolio-template.d.ts.map
@@ -39,4 +39,3 @@ export declare const isValidTemplateSelection: (selectedTemplateUuid: string | n
39
39
  * // }
40
40
  */
41
41
  export declare const validatePortfolioSelection: (state: PortfolioSelectionState) => PortfolioSelectionValidation;
42
- //# sourceMappingURL=portfolio-validation.d.ts.map
@@ -65,4 +65,3 @@ export declare function getMarketAllocation(marketValue: string | number, totalV
65
65
  * ```
66
66
  */
67
67
  export declare function getCashAllocation(cashBalance: string | number, totalValue: string | number): number;
68
- //# sourceMappingURL=portfolio.d.ts.map
package/dist/sector.d.ts CHANGED
@@ -121,4 +121,3 @@ export declare const sectorExists: <T extends BaseSector>(sectors: readonly T[],
121
121
  * // returns [Technology, Biotechnology, Healthcare Technology]
122
122
  */
123
123
  export declare const findSectorsByPartialName: <T extends BaseSector>(sectors: readonly T[], partialName: string) => T[];
124
- //# sourceMappingURL=sector.d.ts.map
@@ -86,4 +86,3 @@ export declare const sortExchangesByName: <T extends BaseStockExchange>(exchange
86
86
  * filterExchangesByCountry(exchanges, 'US'); // returns [NYSE exchange]
87
87
  */
88
88
  export declare const filterExchangesByCountry: <T extends BaseStockExchange>(exchanges: readonly T[], countryCode: string) => T[];
89
- //# sourceMappingURL=stock-exchange.d.ts.map
@@ -64,4 +64,3 @@ export declare const hasTaxResidencyInCountry: <T extends BaseTaxResidency>(taxR
64
64
  * getNonExemptedTaxResidencies(residencies); // returns US and UK residencies
65
65
  */
66
66
  export declare const getNonExemptedTaxResidencies: <T extends BaseTaxResidency>(taxResidencies: readonly T[]) => T[];
67
- //# sourceMappingURL=tax-residency.d.ts.map
package/dist/text.d.ts CHANGED
@@ -19,4 +19,3 @@
19
19
  * ```
20
20
  */
21
21
  export declare function truncateText(text: string, maxLength?: number): string;
22
- //# sourceMappingURL=text.d.ts.map
@@ -143,7 +143,7 @@ export declare function isNonNegativeNumber(value: number): boolean;
143
143
  * @param minParts - Minimum number of name parts required (default: 2)
144
144
  * @returns true if appears to contain required name parts, false otherwise
145
145
  */
146
- export declare function isValidFullName(fullName: string, minParts?: 2): boolean;
146
+ export declare function isValidFullName(fullName: string, minParts?: any): boolean;
147
147
  /**
148
148
  * Validates if a date is a valid date of birth (not in future, reasonable age range)
149
149
  * @param dateOfBirth - The date string in YYYY-MM-DD format
@@ -151,7 +151,7 @@ export declare function isValidFullName(fullName: string, minParts?: 2): boolean
151
151
  * @param maxAge - Maximum reasonable age (default: 120)
152
152
  * @returns true if valid date of birth, false otherwise
153
153
  */
154
- export declare function isValidDateOfBirth(dateOfBirth: string, minAge?: 13, maxAge?: 120): boolean;
154
+ export declare function isValidDateOfBirth(dateOfBirth: string, minAge?: any, maxAge?: any): boolean;
155
155
  /**
156
156
  * Formats a phone number by removing extra spaces and standardizing format
157
157
  * @param phoneNumber - The phone number to format
@@ -165,7 +165,7 @@ export declare function formatPhoneNumber(phoneNumber: string): string;
165
165
  * @param maxAmount - Maximum investment amount (default: 10000000)
166
166
  * @returns true if amount is within range, false otherwise
167
167
  */
168
- export declare function isValidInvestmentAmount(amount: number, minAmount?: 100, maxAmount?: 10000000): boolean;
168
+ export declare function isValidInvestmentAmount(amount: number, minAmount?: any, maxAmount?: any): boolean;
169
169
  /**
170
170
  * Validates if at least one source of funds is selected
171
171
  * @param sources - Array of selected source of funds
@@ -177,7 +177,7 @@ export declare function isValidInvestmentAmount(amount: number, minAmount?: 100,
177
177
  * isValidSourceOfFunds([]); // returns false
178
178
  * isValidSourceOfFunds(['salary', 'savings']); // returns true
179
179
  */
180
- export declare function isValidSourceOfFunds(sources: string[], minSources?: 1): boolean;
180
+ export declare function isValidSourceOfFunds(sources: string[], minSources?: any): boolean;
181
181
  /**
182
182
  * Validates if at least minimum number of items are selected
183
183
  * @param items - Array of selected items
@@ -235,4 +235,3 @@ export declare function isInNumberRange(value: number, min: number, max: number)
235
235
  * isValidPercentage(-10) // false
236
236
  */
237
237
  export declare function isValidPercentage(percentage: number): boolean;
238
- //# sourceMappingURL=validation.d.ts.map
@@ -69,4 +69,3 @@ export declare const getLiquidationStatusColor: (status: LiquidationStatus) => s
69
69
  * getLiquidationStatusLabel('executed'); // returns 'Executed'
70
70
  */
71
71
  export declare const getLiquidationStatusLabel: (status: LiquidationStatus) => string;
72
- //# sourceMappingURL=withdrawal-status.d.ts.map
@@ -84,4 +84,3 @@ export declare function calculateLiquidationProgress<T extends {
84
84
  export declare function getTotalEstimatedValue<T extends {
85
85
  estimatedValue?: string | null;
86
86
  }>(liquidations: T[]): number;
87
- //# sourceMappingURL=withdrawal.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cranberry-money/shared-utils",
3
- "version": "8.17.8",
3
+ "version": "8.17.10",
4
4
  "description": "Shared utility functions for MyPortfolio platform",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",