mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 16:24:25 +08:00
migrate statistics setting page to composition API and typescript
This commit is contained in:
+12
-6
@@ -1,4 +1,4 @@
|
||||
import type { TypeAndName } from '@/core/base.ts';
|
||||
import type { TypeAndName, TypeAndDisplayName } from '@/core/base.ts';
|
||||
|
||||
export interface YearQuarter {
|
||||
readonly year: number;
|
||||
@@ -57,6 +57,17 @@ export interface PresetDateRange {
|
||||
readonly value: Date[];
|
||||
}
|
||||
|
||||
export interface LocalizedMeridiemIndicator {
|
||||
readonly values: string[];
|
||||
readonly displayValues: string[];
|
||||
}
|
||||
|
||||
export interface LocalizedDateRange extends TypeAndDisplayName {
|
||||
readonly type: number;
|
||||
readonly displayName: string;
|
||||
readonly isBillingCycle?: boolean;
|
||||
}
|
||||
|
||||
export interface LocalizedRecentMonthDateRange {
|
||||
readonly dateType: number;
|
||||
readonly minTime: number;
|
||||
@@ -67,11 +78,6 @@ export interface LocalizedRecentMonthDateRange {
|
||||
readonly displayName: string;
|
||||
}
|
||||
|
||||
export interface LocalizedMeridiemIndicator {
|
||||
readonly values: string[];
|
||||
readonly displayValues: string[];
|
||||
}
|
||||
|
||||
export class YearUnixTime implements UnixTimeRange {
|
||||
public readonly year: number;
|
||||
public readonly minUnixTime: number;
|
||||
|
||||
+21
-3
@@ -1,4 +1,4 @@
|
||||
import type { TypeAndName } from '@/core/base.ts';
|
||||
import type { TypeAndName, TypeAndDisplayName } from '@/core/base.ts';
|
||||
|
||||
export interface NumberFormatOptions {
|
||||
digitGrouping?: number;
|
||||
@@ -8,7 +8,25 @@ export interface NumberFormatOptions {
|
||||
trimTailZero?: boolean;
|
||||
}
|
||||
|
||||
export class DecimalSeparator implements TypeAndName {
|
||||
export interface NumeralSymbolType {
|
||||
readonly type: number;
|
||||
readonly name: string;
|
||||
readonly symbol: string;
|
||||
}
|
||||
|
||||
export interface LocalizedNumeralSymbolType extends TypeAndDisplayName {
|
||||
readonly type: number;
|
||||
readonly symbol: string;
|
||||
readonly displayName: string;
|
||||
}
|
||||
|
||||
export interface LocalizedDigitGroupingType extends TypeAndDisplayName {
|
||||
readonly type: number;
|
||||
readonly enabled: boolean;
|
||||
readonly displayName: string;
|
||||
}
|
||||
|
||||
export class DecimalSeparator implements TypeAndName, NumeralSymbolType {
|
||||
private static readonly allInstances: DecimalSeparator[] = [];
|
||||
private static readonly allInstancesByType: Record<number, DecimalSeparator> = {};
|
||||
private static readonly allInstancesByTypeName: Record<string, DecimalSeparator> = {};
|
||||
@@ -47,7 +65,7 @@ export class DecimalSeparator implements TypeAndName {
|
||||
}
|
||||
}
|
||||
|
||||
export class DigitGroupingSymbol implements TypeAndName {
|
||||
export class DigitGroupingSymbol implements TypeAndName, NumeralSymbolType {
|
||||
private static readonly allInstances: DigitGroupingSymbol[] = [];
|
||||
private static readonly allInstancesByType: Record<number, DigitGroupingSymbol> = {};
|
||||
private static readonly allInstancesByTypeName: Record<string, DigitGroupingSymbol> = {};
|
||||
|
||||
Reference in New Issue
Block a user