feat: enhance tiered billing functionality and UI components

- Introduced new fields for billing mode and expression in the Pricing model.
- Implemented dynamic pricing breakdown component to display tiered billing details.
- Updated various components to support and render tiered billing information.
- Enhanced pricing calculation logic to accommodate dynamic pricing scenarios.
- Added tests for new billing expression functionalities and UI components.
This commit is contained in:
CaIon
2026-03-17 16:59:25 +08:00
parent 91ed4e196a
commit f0589cc478
23 changed files with 1237 additions and 695 deletions
@@ -14,17 +14,17 @@ export const MATCH_RANGE = 'range';
export const TIME_FUNCS = ['hour', 'minute', 'weekday', 'month', 'day'];
export const COMMON_TIMEZONES = [
{ value: 'Asia/Shanghai', label: 'CST (UTC+8 北京)' },
{ value: 'Asia/Shanghai', label: 'UTC+8 北京 (Asia/Shanghai)' },
{ value: 'UTC', label: 'UTC' },
{ value: 'America/New_York', label: 'EST (UTC-5 纽约)' },
{ value: 'America/Los_Angeles', label: 'PST (UTC-8 洛杉矶)' },
{ value: 'America/Chicago', label: 'CST (UTC-6 芝加哥)' },
{ value: 'Europe/London', label: 'GMT (UTC+0 伦敦)' },
{ value: 'Europe/Berlin', label: 'CET (UTC+1 柏林)' },
{ value: 'Asia/Tokyo', label: 'JST (UTC+9 东京)' },
{ value: 'Asia/Singapore', label: 'SGT (UTC+8 新加坡)' },
{ value: 'Asia/Seoul', label: 'KST (UTC+9 首尔)' },
{ value: 'Australia/Sydney', label: 'AEST (UTC+10 悉尼)' },
{ value: 'America/New_York', label: 'UTC-5 纽约 (America/New_York)' },
{ value: 'America/Los_Angeles', label: 'UTC-8 洛杉矶 (America/Los_Angeles)' },
{ value: 'America/Chicago', label: 'UTC-6 芝加哥 (America/Chicago)' },
{ value: 'Europe/London', label: 'UTC+0 伦敦 (Europe/London)' },
{ value: 'Europe/Berlin', label: 'UTC+1 柏林 (Europe/Berlin)' },
{ value: 'Asia/Tokyo', label: 'UTC+9 东京 (Asia/Tokyo)' },
{ value: 'Asia/Singapore', label: 'UTC+8 新加坡 (Asia/Singapore)' },
{ value: 'Asia/Seoul', label: 'UTC+9 首尔 (Asia/Seoul)' },
{ value: 'Australia/Sydney', label: 'UTC+10 悉尼 (Australia/Sydney)' },
];
export const NUMERIC_LITERAL_REGEX =