@vini-wine/core-utils
Version:
Core package for Vini frontend utils.
36 lines (29 loc) • 1.86 kB
text/typescript
import { CurrencyCodeEnum, LocaleEnum } from '@vini-wine/core-enums';
import { WineModel, VintageModel, VintageProductModel } from '@vini-wine/admin-core-models';
import { WineModel as WineModel$1, VintageModel as VintageModel$3, VintageProductModel as VintageProductModel$2 } from '@vini-wine/analytic-core-models';
import { WineModel as WineModel$2, VintageModel as VintageModel$1, VintageProductModel as VintageProductModel$1 } from '@vini-wine/offer-core-models';
import { WineModel as WineModel$3, VintageModel as VintageModel$2 } from '@vini-wine/content-core-models';
declare const priceFormatter: (price: {
priceMicros: number;
currencyCode: CurrencyCodeEnum;
locale?: LocaleEnum;
}, showDecimals: boolean, roundPrice: boolean) => string;
declare const priceMicrosToFloat: (price: number, roundPrice: boolean) => number;
declare const numberFormatter: (number: number, config?: {
locale?: string;
suffix?: string | undefined;
prefix?: string | undefined;
minimumFractionDigits?: number;
maximumFractionDigits?: number;
millionSuffix?: string | undefined;
thousandSuffix?: string | undefined;
showAsMillion?: boolean;
showAsThousand?: boolean;
}) => string;
type WineModels = WineModel | WineModel$1 | WineModel$2 | WineModel$3;
declare const getWineNameConvention: (wine: WineModels) => string;
type VintageModels = VintageModel | VintageModel$1 | VintageModel$2 | VintageModel$3;
declare const getVintageNameConvention: (vintage: VintageModels) => string;
type VintageProductModels = VintageProductModel | VintageProductModel$1 | VintageProductModel$2;
declare const getVintageProductNameConvention: (vintageProduct: VintageProductModels) => string;
export { getVintageNameConvention, getVintageProductNameConvention, getWineNameConvention, numberFormatter, priceFormatter, priceMicrosToFloat };