@bootkit/ng0 0.0.0-alpha.26 → 0.0.0-alpha.28
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/common/index.d.ts +15 -29
- package/components/form-field/index.d.ts +24 -41
- package/components/list/index.d.ts +47 -28
- package/components/select/index.d.ts +78 -42
- package/components/sidenav/index.d.ts +1 -1
- package/fesm2022/bootkit-ng0-common.mjs +23 -36
- package/fesm2022/bootkit-ng0-common.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-form-field.mjs +47 -78
- package/fesm2022/bootkit-ng0-components-form-field.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-list.mjs +131 -108
- package/fesm2022/bootkit-ng0-components-list.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-select.mjs +261 -174
- package/fesm2022/bootkit-ng0-components-select.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-sidenav.mjs +1 -1
- package/fesm2022/bootkit-ng0-components-sidenav.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-localization.mjs +131 -67
- package/fesm2022/bootkit-ng0-localization.mjs.map +1 -1
- package/localization/index.d.ts +27 -21
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootkit-ng0-localization.mjs","sources":["../../../projects/ng0/localization/locale.ts","../../../projects/ng0/localization/locale-definition.ts","../../../projects/ng0/localization/localization.service.ts","../../../projects/ng0/localization/translate.pipe.ts","../../../projects/ng0/localization/translate-enum.pipe.ts","../../../projects/ng0/localization/translate-boolean-pipe.ts","../../../projects/ng0/localization/date.pipe.ts","../../../projects/ng0/localization/localize.pipe.ts","../../../projects/ng0/localization/localize-enum.pipe.ts","../../../projects/ng0/localization/localize-boolean-pipe.ts","../../../projects/ng0/localization/localize-date.pipe.ts","../../../projects/ng0/localization/localization.module.ts","../../../projects/ng0/localization/types.ts","../../../projects/ng0/localization/value-formatter.ts","../../../projects/ng0/localization/bootkit-ng0-localization.ts"],"sourcesContent":["import { LocaleDefinition } from \"./locale-definition\";\r\nimport { TranslatedValidationError } from \"./types\";\r\nimport { ObjectFormatter } from \"./value-formatter\";\r\n\r\n/** Locale */\r\nexport class Locale {\r\n constructor(public readonly definition: LocaleDefinition) {\r\n }\r\n\r\n /** \r\n * Returns the name of the locale\r\n * @returns The name of the locale\r\n */\r\n get name(): string {\r\n return this.definition.name;\r\n }\r\n\r\n /** \r\n * Translates a key in the dictionary\r\n * @param key The key to look up\r\n * @param fallback Optional fallback value if the key is not found\r\n * @returns The translated string or the fallbackValue if not found\r\n */\r\n translate(key: string, fallback?: string): string | undefined {\r\n return this.definition.dictionary?.[key] ?? fallback;\r\n }\r\n\r\n /**\r\n * Translates an enum value \r\n * @param enumName The name of the enum \r\n * @param enumValue The value of the enum to translate \r\n * @param fallback\r\n * @returns The translated string or the enum value itself if not found \r\n */\r\n\r\n translateEnum(enumName: string, enumValue: string | number | null | undefined, fallback?: string): string | undefined {\r\n let e = this.definition.enums?.[enumName];\r\n\r\n if (!e) {\r\n return fallback || enumValue?.toString();\r\n }\r\n\r\n if (enumValue === null) {\r\n return e['[null]'] || e['[empty]'];\r\n } else if (enumValue === undefined) {\r\n return e['[undefined]'] || e['[empty]'];\r\n } else if (enumValue === '') {\r\n return e['empty'];\r\n } else {\r\n return e[enumValue] || e['[?]'] || fallback || enumValue?.toString();\r\n }\r\n }\r\n\r\n /** \r\n * Translates a form validation error\r\n * @param errorKey The key of the error to translate\r\n * @param error The error object\r\n */\r\n translateError(errorKey: string, error: any, fallbackMessage: string | undefined = undefined): string | undefined {\r\n const errors = this.definition?.form?.validation?.errors;\r\n\r\n if (!errors) {\r\n return fallbackMessage;\r\n }\r\n\r\n const translatorFunc = errors[errorKey] ?? errors['*'];\r\n return typeof translatorFunc === 'function' ? translatorFunc(error) : fallbackMessage;\r\n }\r\n\r\n /** \r\n * Translates validation errors \r\n * @param errors Validation errors object\r\n * @returns Array of translated validation errors\r\n */\r\n translateErrors(errors: any): TranslatedValidationError[] {\r\n const result: TranslatedValidationError[] = [];\r\n for (const key in errors) {\r\n if (Object.prototype.hasOwnProperty.call(errors, key)) {\r\n result.push({\r\n key: key,\r\n value: errors[key],\r\n text: this.translateError(key, errors[key])\r\n });\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n /** \r\n * Translates the first error in the validation errors object \r\n * @param errors Validation errors object\r\n * @returns TranslatedValidationError or undefined if no errors\r\n */\r\n translateFirstError(errors: any, fallbackMessage: string | undefined = undefined): TranslatedValidationError | undefined {\r\n const keys = Object.keys(errors);\r\n if (keys.length === 0) {\r\n return undefined;\r\n }\r\n\r\n const key = keys[0];\r\n const value = errors[key];\r\n return {\r\n key,\r\n value,\r\n text: this.translateError(key, value, fallbackMessage)\r\n };\r\n }\r\n\r\n /**\r\n * Clones and extends this object and returns a new Locale (without modifying this object).\r\n */\r\n extend(definition?: Omit<LocaleDefinition, 'name' | 'rtl'>): Locale {\r\n return new Locale({ ...this.definition, ...definition });\r\n }\r\n\r\n /**\r\n * \r\n * @param date Date string or timestamp\r\n * @returns Formatted date string based on the locale \r\n */\r\n formatDate(date: Date | string | number, format?: string): string {\r\n return date ? new Date(date).toLocaleDateString(this.definition.name, { hour: '2-digit', minute: '2-digit' }) : '';\r\n }\r\n\r\n /**\r\n * Returns a formatter function by its name and parameters.\r\n * @param formatterName The format string in the form of \"formatterName:param1:param2:...\"\r\n * @returns A ValueFormatterFunction\r\n */\r\n getFormatter(formatterName: string): ObjectFormatter {\r\n let formatter = this.definition.formatters?.[formatterName];\r\n let formatterType = typeof formatter;\r\n\r\n if (!formatter) {\r\n console.warn(`The formatter \"${formatterName}\" is not defined in locale ${this.definition.name}`);\r\n return (value) => value?.toString() || '' // return a default formatter\r\n }\r\n\r\n if (formatterType === 'function') {\r\n return formatter as ObjectFormatter;\r\n } else if (Array.isArray(formatter)) {\r\n return (value: number | boolean) => formatter[+value]; // use + to cast boolean values to numbers\r\n } else if (formatterType == 'object' && formatter != null) {\r\n return (value: string) => (formatter as any)[value] || ''\r\n } else {\r\n throw Error(`Invalid locale formatter: ${formatterName}`);\r\n }\r\n }\r\n}\r\n","import { ObjectFormatter } from \"./value-formatter\";\r\n\r\n/** Locale dictionary */\r\nexport type LocaleDictionary = { [key: string]: string; };\r\nexport type LocaleEnums = { [enumName: string]: { [enumValue: string]: string } };\r\n\r\n/** Locale Error Translator */\r\nexport type LocaleValidationErrorTranslator = (error: any) => string;\r\n\r\n\r\n/** Locale validation error translator functions */\r\nexport type LocaleValidationErrorTranslators = {\r\n [key: string]: LocaleValidationErrorTranslator;\r\n};\r\n\r\n/**\r\n * A function to format the paging info of a table.\r\n * \r\n */\r\nexport type TableComponentPagingFormatter = (info: {\r\n /**\r\n * The first record in the current page.\r\n */\r\n firstRecord: number,\r\n\r\n /**\r\n * The last record in the current page.\r\n */\r\n lastRecord: number,\r\n\r\n /**\r\n * The total number of records.\r\n */\r\n totalRecords?: number,\r\n\r\n /**\r\n * The current page index.\r\n */\r\n currentPage: number\r\n}) => string;\r\n\r\n/** \r\n * Locale definition\r\n */\r\nexport interface LocaleDefinition {\r\n /** Locale name */\r\n readonly name: string;\r\n\r\n /** Does this locale belongs to a RTL language */\r\n readonly rtl?: boolean;\r\n\r\n /** Locale dictionary */\r\n dictionary?: LocaleDictionary;\r\n enums?: LocaleEnums,\r\n form?: {\r\n validation?: {\r\n /** Form validation error translators. */\r\n errors?: LocaleValidationErrorTranslators\r\n }\r\n },\r\n data?: {\r\n logicalOperators?: {\r\n [operator: string]: string\r\n }\r\n },\r\n components?: {\r\n table?: {\r\n /**\r\n * No records found message.\r\n */\r\n noRecords?: string;\r\n\r\n /** \r\n * Error message displayed when loading data fails. \r\n */\r\n loadError?: string;\r\n\r\n /**\r\n * A format function to format the paging info.\r\n */\r\n pagingInfo?: TableComponentPagingFormatter;\r\n },\r\n select?: {\r\n placeholder?: string;\r\n }\r\n },\r\n\r\n formatters?: {\r\n // boolean?: {\r\n // [booleanKind: string]: string[] // [false, true]\r\n // },\r\n // enum?: {\r\n // [enumName: string]: { [enumValue: string]: string }\r\n // }\r\n // custom?: {\r\n [formatterName: string]: ObjectFormatter | string[] | {\r\n [value: string]: string\r\n }\r\n // },\r\n // date?: {\r\n // calendars?: {\r\n // [calendar: string]: {\r\n // days: string[],\r\n // daysShort: string[],\r\n // months: string[],\r\n // monthsShort: string[],\r\n // }\r\n // }\r\n // };\r\n // }\r\n }\r\n};\r\n\r\n","import { Injectable } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\nimport { Locale } from './locale';\r\nimport { LocaleChangeEvent } from './types';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class LocalizationService {\r\n private _locales: Locale[] = [];\r\n private _activeLocale?: Locale;\r\n private _changeSubject = new Subject<LocaleChangeEvent>();\r\n readonly change = this._changeSubject.asObservable();\r\n\r\n constructor() {\r\n }\r\n\r\n /** \r\n * Adds a Locale \r\n */\r\n add(locale: Locale): void;\r\n /** Adds an array of Locales to this LocaleProvider */\r\n add(locales: Locale[]): void;\r\n add(l: any): void {\r\n if (l instanceof Locale) {\r\n this._locales.push(l);\r\n } else if (Array.isArray(l)) {\r\n l.forEach(x => this.add(x));\r\n } else {\r\n throw Error('Invalid locale');\r\n }\r\n\r\n if (this._locales.length == 1) {\r\n this._activeLocale = this._locales[0];\r\n }\r\n }\r\n\r\n /** Changes the active locale */\r\n set(localeName: string): void {\r\n const locale = this._locales.find(x => x.name === localeName);\r\n if (locale) {\r\n this._changeSubject.next({ old: this._activeLocale, new: locale });\r\n this._activeLocale = locale;\r\n return;\r\n }\r\n\r\n throw Error('Locale not found.');\r\n }\r\n\r\n /** Gets the active locale */\r\n get(): Locale | undefined {\r\n return this._activeLocale;\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { LocalizationService } from './localization.service';\r\n\r\n\r\n/**\r\n * Pipe to translate a dictionary key into a localized string.\r\n * It uses the LocalizationService to fetch the translation.\r\n * If the translation is not found, it returns the fallback string if provided.\r\n */\r\n@Pipe({\r\n name: 'ng0Translate',\r\n standalone: true,\r\n pure: true\r\n})\r\nexport class TranslatePipe implements PipeTransform {\r\n constructor(private _ls: LocalizationService) {\r\n }\r\n\r\n transform(dictionaryKey: string, fallback?: string) {\r\n return this._ls.get()?.translate(dictionaryKey, fallback) || dictionaryKey;\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { LocalizationService } from './localization.service';\r\n\r\n@Pipe({\r\n name: 'ng0TranslateEnum',\r\n standalone: true,\r\n pure: true\r\n})\r\nexport class TranslateEnumPipe implements PipeTransform {\r\n constructor(private _ls: LocalizationService) {\r\n }\r\n\r\n /**\r\n * \r\n * @param enumValue \r\n * @param enumName \r\n * @param nullValueKey \r\n * @param returnEnumAsFallback\r\n * @param fallbackKey \r\n * @returns \r\n */\r\n transform(enumValue: string | number | null | undefined, enumName: string, fallback?: string): any {\r\n return this._ls.get()?.translateEnum(enumName, enumValue, fallback);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { LocalizationService } from './localization.service';\r\n\r\n@Pipe({\r\n name: 'ng0TranslateBool',\r\n standalone: true,\r\n pure: true\r\n})\r\nexport class TranslateBooleanPipe implements PipeTransform {\r\n\r\n constructor(private localeProvider: LocalizationService) {\r\n }\r\n\r\n transform(value: any, falseKey: string = 'true', trueKey: string = 'false'): any {\r\n return this.localeProvider.get()?.translate(value ? trueKey : falseKey);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { LocalizationService } from './localization.service';\r\n\r\n@Pipe({\r\n name: 'ng0Date',\r\n standalone: true,\r\n pure: true\r\n})\r\nexport class DatePipe implements PipeTransform {\r\n constructor(private _ls: LocalizationService) {\r\n }\r\n\r\n transform(value: Date | string | number, format?: string) {\r\n return this._ls.get()?.formatDate(value, format);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { LocalizationService } from './localization.service';\r\n\r\n@Pipe({\r\n name: 'ng0Localize',\r\n standalone: true,\r\n pure: false\r\n})\r\nexport class LocalizePipe implements PipeTransform {\r\n constructor(private _ls: LocalizationService) {\r\n }\r\n\r\n transform(dictionaryKey: string) {\r\n return this._ls.get()?.translate(dictionaryKey);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { LocalizationService } from './localization.service';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\n\r\n@Pipe({\r\n name: 'ng0LocalizeEnum',\r\n standalone: true,\r\n pure: false\r\n})\r\nexport class LocalizeEnumPipe implements PipeTransform {\r\n private _recompute = true;\r\n private _value?: string;\r\n\r\n constructor(private _ls: LocalizationService) {\r\n _ls.change.pipe(takeUntilDestroyed()).subscribe(x => this._recompute = true);\r\n }\r\n\r\n /**\r\n * \r\n * @param enumValue \r\n * @param enumName \r\n * @param nullValueKey \r\n * @param returnEnumAsFallback\r\n * @param fallbackKey \r\n * @returns \r\n */\r\n transform(enumValue: string | number | null | undefined, enumName: string, fallback?: string): any {\r\n if (this._recompute) {\r\n this._value = this._ls.get()?.translateEnum(enumName, enumValue, fallback);\r\n this._recompute = false;\r\n }\r\n\r\n return this._value;\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { LocalizationService } from './localization.service';\r\n\r\n@Pipe({\r\n name: 'ng0LocalizeBool',\r\n standalone: true,\r\n pure: false\r\n})\r\nexport class LocalizeBooleanPipe implements PipeTransform {\r\n constructor(private _ls: LocalizationService) {\r\n }\r\n\r\n transform(value: any, falseKey = 'true', trueKey: 'false') {\r\n return this._ls.get()?.translate(value ? trueKey : falseKey);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { Locale } from './locale';\r\nimport { LocalizationService } from './localization.service';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\n\r\n@Pipe({\r\n name: 'ng0LocalizeDate',\r\n standalone: true,\r\n pure: false\r\n})\r\nexport class LocalizeDatePipe implements PipeTransform {\r\n private _value?: string;\r\n private _recompute = true;\r\n\r\n constructor(private _ls: LocalizationService) {\r\n _ls.change.pipe(takeUntilDestroyed()).subscribe(x => this._recompute = true);\r\n }\r\n\r\n transform(value: number | string, format?: string) {\r\n if (this._recompute) {\r\n this._value = this._ls.get()?.formatDate(value, format);\r\n this._recompute = false;\r\n }\r\n\r\n return this._value;\r\n }\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { TranslatePipe } from './translate.pipe';\r\nimport { TranslateEnumPipe } from './translate-enum.pipe';\r\nimport { TranslateBooleanPipe } from './translate-boolean-pipe';\r\nimport { DatePipe } from './date.pipe';\r\nimport { LocalizePipe } from './localize.pipe';\r\nimport { LocalizeEnumPipe } from './localize-enum.pipe';\r\nimport { LocalizeBooleanPipe } from './localize-boolean-pipe';\r\nimport { LocalizeDatePipe } from './localize-date.pipe';\r\n\r\nconst Declares = [\r\n // Pure pipes\r\n TranslatePipe,\r\n TranslateEnumPipe,\r\n TranslateBooleanPipe,\r\n DatePipe,\r\n\r\n // Impure pipes\r\n LocalizePipe,\r\n LocalizeEnumPipe,\r\n LocalizeBooleanPipe,\r\n LocalizeDatePipe\r\n];\r\n\r\n@NgModule({\r\n imports: Declares,\r\n exports: Declares\r\n})\r\nexport class LocalizationModule {\r\n}\r\n\r\n","import { InjectionToken } from '@angular/core';\r\nimport { LocalizationService } from './localization.service';\r\nimport { Locale } from './locale';\r\n\r\nexport const LOCALE = new InjectionToken<Locale | LocalizationService>('LOCALE');\r\n\r\nexport interface TranslatedValidationError {\r\n /** Error key */\r\n key: string;\r\n \r\n /** Error object */\r\n value: any;\r\n \r\n /** localized error text */\r\n text?: string;\r\n }\r\n \r\n export interface LocaleChangeEvent {\r\n old?: Locale;\r\n new: Locale;\r\n }\r\n ","import { Locale } from \"./locale\";\r\n\r\n/**\r\n * Object formatter function type.\r\n * @param obj The object to format.\r\n * @param options Additional options for formatting.\r\n * @returns The formatted value.\r\n */\r\nexport type ObjectFormatter = (obj: any, ...options: any[]) => string;\r\n\r\n/**\r\n * ObjectFormatterLike \r\n */\r\nexport type ObjectFormatterLike = ObjectFormatter | string;\r\n\r\n/**\r\n * Default format function.\r\n * @param value The item to format.\r\n * @returns The formatted string.\r\n */\r\nexport function defaultObjectFormatter(obj: any): string {\r\n return obj?.toString() || '';\r\n}\r\n\r\n/**\r\n * Creates an object formatter attribute function.\r\n * The returned function takes a ObjectFormatterLike and returns a ObjectFormatterFunction.\r\n * If the input is a function, it is returned as is.\r\n * If the input is a string starting with '@', it returns a function that retrieves the corresponding property from the item.\r\n * If the input is a string representing a locale format, it uses the provided locale to get the appropriate formatter.\r\n * If no locale is provided and a locale format string is used, an error is thrown.\r\n * @param locale Optional locale object for locale-based formatting.\r\n * @returns A function that takes a ValueFormatterLike and returns a ValueFormatterFunction.\r\n */\r\nexport function objectFormatterAttribute(locale?: Locale): ((v: ObjectFormatterLike) => ObjectFormatter) {\r\n return (v) => {\r\n if (typeof v === 'function')\r\n return v;\r\n else if (typeof v === 'string') {\r\n if (v.startsWith('@')) {\r\n // Locale-based formatting\r\n if (locale == null) {\r\n throw Error('For using locale value formatters, provide a locale object.')\r\n }\r\n let formatterName = v.substring(1);\r\n return locale.getFormatter(formatterName);\r\n } else {\r\n // Field-based formatting\r\n return (item: any) => (item?.[v]?.toString() as string) ?? '';\r\n }\r\n }\r\n\r\n throw Error('invalid value');\r\n }\r\n}\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.LocalizationService"],"mappings":";;;;;AAIA;MACa,MAAM,CAAA;AACW,IAAA,UAAA;AAA5B,IAAA,WAAA,CAA4B,UAA4B,EAAA;QAA5B,IAAA,CAAA,UAAU,GAAV,UAAU;IACtC;AAEA;;;AAGG;AACH,IAAA,IAAI,IAAI,GAAA;AACN,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI;IAC7B;AAEA;;;;;AAKG;IACH,SAAS,CAA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,EAAE;AAC5B,YAAA,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;;AAEnB,gBAAA,IAAI,MAAM,IAAI,IAAI,EAAE;AAChB,oBAAA,MAAM,KAAK,CAAC,6DAA6D,CAAC;gBAC9E;gBACA,IAAI,aAAa,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAClC,gBAAA,OAAO,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC;YAC7C;iBAAO;;AAEH,gBAAA,OAAO,CAAC,IAAS,KAAM,IAAI,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAa,IAAI,EAAE;YACjE;QACJ;AAEA,QAAA,MAAM,KAAK,CAAC,eAAe,CAAC;AAChC,IAAA,CAAC;AACL;;ACtDA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"bootkit-ng0-localization.mjs","sources":["../../../projects/ng0/localization/locale.ts","../../../projects/ng0/localization/locale-definition.ts","../../../projects/ng0/localization/localization.service.ts","../../../projects/ng0/localization/translate.pipe.ts","../../../projects/ng0/localization/translate-enum.pipe.ts","../../../projects/ng0/localization/translate-boolean-pipe.ts","../../../projects/ng0/localization/date.pipe.ts","../../../projects/ng0/localization/localize.pipe.ts","../../../projects/ng0/localization/localize-enum.pipe.ts","../../../projects/ng0/localization/localize-boolean-pipe.ts","../../../projects/ng0/localization/localize-date.pipe.ts","../../../projects/ng0/localization/formatter.ts","../../../projects/ng0/localization/format.pipe.ts","../../../projects/ng0/localization/localization.module.ts","../../../projects/ng0/localization/types.ts","../../../projects/ng0/localization/bootkit-ng0-localization.ts"],"sourcesContent":["import { LocaleDefinition } from \"./locale-definition\";\r\nimport { TranslatedValidationError } from \"./types\";\r\nimport { ObjectFormatter } from \"./formatter\";\r\n\r\n/** Locale */\r\nexport class Locale {\r\n constructor(public readonly definition: LocaleDefinition) {\r\n }\r\n\r\n /** \r\n * Returns the name of the locale\r\n * @returns The name of the locale\r\n */\r\n get name(): string {\r\n return this.definition.name;\r\n }\r\n\r\n /** \r\n * Translates a key in the dictionary\r\n * @param key The key to look up\r\n * @param fallback Optional fallback value if the key is not found\r\n * @returns The translated string or the fallbackValue if not found\r\n */\r\n translate(key: string, fallback?: string): string | undefined {\r\n return this.definition.dictionary?.[key] ?? fallback;\r\n }\r\n\r\n /**\r\n * Translates an enum value \r\n * @param enumName The name of the enum \r\n * @param enumValue The value of the enum to translate \r\n * @param fallback\r\n * @returns The translated string or the enum value itself if not found \r\n */\r\n\r\n translateEnum(enumName: string, enumValue: string | number | null | undefined, fallback?: string): string | undefined {\r\n let e = this.definition.enums?.[enumName];\r\n\r\n if (!e) {\r\n return fallback || enumValue?.toString();\r\n }\r\n\r\n if (enumValue === null) {\r\n return e['[null]'] || e['[empty]'];\r\n } else if (enumValue === undefined) {\r\n return e['[undefined]'] || e['[empty]'];\r\n } else if (enumValue === '') {\r\n return e['empty'];\r\n } else {\r\n return e[enumValue] || e['[?]'] || fallback || enumValue?.toString();\r\n }\r\n }\r\n\r\n /** \r\n * Translates a form validation error\r\n * @param errorKey The key of the error to translate\r\n * @param error The error object\r\n */\r\n translateError(errorKey: string, error: any, fallbackMessage: string | undefined = undefined): string | undefined {\r\n const errors = this.definition?.form?.validation?.errors;\r\n\r\n if (!errors) {\r\n return fallbackMessage;\r\n }\r\n\r\n const translatorFunc = errors[errorKey] ?? errors['*'];\r\n return typeof translatorFunc === 'function' ? translatorFunc(error) : fallbackMessage;\r\n }\r\n\r\n /** \r\n * Translates validation errors \r\n * @param errors Validation errors object\r\n * @returns Array of translated validation errors\r\n */\r\n translateErrors(errors: any): TranslatedValidationError[] {\r\n const result: TranslatedValidationError[] = [];\r\n for (const key in errors) {\r\n if (Object.prototype.hasOwnProperty.call(errors, key)) {\r\n result.push({\r\n key: key,\r\n value: errors[key],\r\n text: this.translateError(key, errors[key])\r\n });\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n /** \r\n * Translates the first error in the validation errors object \r\n * @param errors Validation errors object\r\n * @returns TranslatedValidationError or undefined if no errors\r\n */\r\n translateFirstError(errors: any, fallbackMessage: string | undefined = undefined): TranslatedValidationError | undefined {\r\n const keys = Object.keys(errors);\r\n if (keys.length === 0) {\r\n return undefined;\r\n }\r\n\r\n const key = keys[0];\r\n const value = errors[key];\r\n return {\r\n key,\r\n value,\r\n text: this.translateError(key, value, fallbackMessage)\r\n };\r\n }\r\n\r\n /**\r\n * Clones and extends this object and returns a new Locale (without modifying this object).\r\n */\r\n extend(definition?: Omit<LocaleDefinition, 'name' | 'rtl'>): Locale {\r\n return new Locale({ ...this.definition, ...definition });\r\n }\r\n\r\n /**\r\n * \r\n * @param date Date string or timestamp\r\n * @returns Formatted date string based on the locale \r\n */\r\n formatDate(date: Date | string | number, format?: string): string {\r\n return date ? new Date(date).toLocaleDateString(this.definition.name, { hour: '2-digit', minute: '2-digit' }) : '';\r\n }\r\n}\r\n","import { ObjectFormatter } from \"./formatter\";\r\n\r\n/** Locale dictionary */\r\nexport type LocaleDictionary = { [key: string]: string; };\r\nexport type LocaleEnums = { [enumName: string]: { [enumValue: string]: string } };\r\n\r\n/** Locale Error Translator */\r\nexport type LocaleValidationErrorTranslator = (error: any) => string;\r\n\r\n\r\n/** Locale validation error translator functions */\r\nexport type LocaleValidationErrorTranslators = {\r\n [key: string]: LocaleValidationErrorTranslator;\r\n};\r\n\r\n/**\r\n * A function to format the paging info of a table.\r\n * \r\n */\r\nexport type TableComponentPagingFormatter = (info: {\r\n /**\r\n * The first record in the current page.\r\n */\r\n firstRecord: number,\r\n\r\n /**\r\n * The last record in the current page.\r\n */\r\n lastRecord: number,\r\n\r\n /**\r\n * The total number of records.\r\n */\r\n totalRecords?: number,\r\n\r\n /**\r\n * The current page index.\r\n */\r\n currentPage: number\r\n}) => string;\r\n\r\n/** \r\n * Locale definition\r\n */\r\nexport interface LocaleDefinition {\r\n /** Locale name */\r\n readonly name: string;\r\n\r\n /** Does this locale belongs to a RTL language */\r\n readonly rtl?: boolean;\r\n\r\n /** Locale dictionary */\r\n dictionary?: LocaleDictionary;\r\n enums?: LocaleEnums,\r\n form?: {\r\n validation?: {\r\n /** Form validation error translators. */\r\n errors?: LocaleValidationErrorTranslators\r\n }\r\n },\r\n data?: {\r\n logicalOperators?: {\r\n [operator: string]: string\r\n }\r\n },\r\n components?: {\r\n table?: {\r\n /**\r\n * No records found message.\r\n */\r\n noRecords?: string;\r\n\r\n /** \r\n * Error message displayed when loading data fails. \r\n */\r\n loadError?: string;\r\n\r\n /**\r\n * A format function to format the paging info.\r\n */\r\n pagingInfo?: TableComponentPagingFormatter;\r\n },\r\n select?: {\r\n placeholder?: string;\r\n }\r\n },\r\n\r\n formatters?: {\r\n // boolean?: {\r\n // [booleanKind: string]: string[] // [false, true]\r\n // },\r\n // enum?: {\r\n // [enumName: string]: { [enumValue: string]: string }\r\n // }\r\n // custom?: {\r\n [formatterName: string]: ObjectFormatter | string[] | {\r\n [value: string]: string\r\n }\r\n // },\r\n // date?: {\r\n // calendars?: {\r\n // [calendar: string]: {\r\n // days: string[],\r\n // daysShort: string[],\r\n // months: string[],\r\n // monthsShort: string[],\r\n // }\r\n // }\r\n // };\r\n // }\r\n }\r\n};\r\n\r\n","import { Injectable } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\nimport { Locale } from './locale';\r\nimport { LocaleChangeEvent } from './types';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class LocalizationService {\r\n private _locales: Locale[] = [];\r\n private _activeLocale?: Locale;\r\n private _changeSubject = new Subject<LocaleChangeEvent>();\r\n readonly change = this._changeSubject.asObservable();\r\n\r\n constructor() {\r\n }\r\n\r\n /** \r\n * Adds a Locale \r\n */\r\n add(locale: Locale): void;\r\n /** Adds an array of Locales to this LocaleProvider */\r\n add(locales: Locale[]): void;\r\n add(l: any): void {\r\n if (l instanceof Locale) {\r\n this._locales.push(l);\r\n } else if (Array.isArray(l)) {\r\n l.forEach(x => this.add(x));\r\n } else {\r\n throw Error('Invalid locale');\r\n }\r\n\r\n if (this._locales.length == 1) {\r\n this._activeLocale = this._locales[0];\r\n }\r\n }\r\n\r\n /** Changes the active locale */\r\n set(localeName: string): void {\r\n const locale = this._locales.find(x => x.name === localeName);\r\n if (locale) {\r\n this._changeSubject.next({ old: this._activeLocale, new: locale });\r\n this._activeLocale = locale;\r\n return;\r\n }\r\n\r\n throw Error('Locale not found.');\r\n }\r\n\r\n /** Gets the active locale */\r\n get(): Locale | undefined {\r\n return this._activeLocale;\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { LocalizationService } from './localization.service';\r\n\r\n\r\n/**\r\n * Pipe to translate a dictionary key into a localized string.\r\n * It uses the LocalizationService to fetch the translation.\r\n * If the translation is not found, it returns the fallback string if provided.\r\n */\r\n@Pipe({\r\n name: 'ng0Translate',\r\n standalone: true,\r\n pure: true\r\n})\r\nexport class TranslatePipe implements PipeTransform {\r\n constructor(private _ls: LocalizationService) {\r\n }\r\n\r\n transform(dictionaryKey: string, fallback?: string) {\r\n return this._ls.get()?.translate(dictionaryKey, fallback) || dictionaryKey;\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { LocalizationService } from './localization.service';\r\n\r\n@Pipe({\r\n name: 'ng0TranslateEnum',\r\n standalone: true,\r\n pure: true\r\n})\r\nexport class TranslateEnumPipe implements PipeTransform {\r\n constructor(private _ls: LocalizationService) {\r\n }\r\n\r\n /**\r\n * \r\n * @param enumValue \r\n * @param enumName \r\n * @param nullValueKey \r\n * @param returnEnumAsFallback\r\n * @param fallbackKey \r\n * @returns \r\n */\r\n transform(enumValue: string | number | null | undefined, enumName: string, fallback?: string): any {\r\n return this._ls.get()?.translateEnum(enumName, enumValue, fallback);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { LocalizationService } from './localization.service';\r\n\r\n@Pipe({\r\n name: 'ng0TranslateBool',\r\n standalone: true,\r\n pure: true\r\n})\r\nexport class TranslateBooleanPipe implements PipeTransform {\r\n\r\n constructor(private localeProvider: LocalizationService) {\r\n }\r\n\r\n transform(value: any, falseKey: string = 'true', trueKey: string = 'false'): any {\r\n return this.localeProvider.get()?.translate(value ? trueKey : falseKey);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { LocalizationService } from './localization.service';\r\n\r\n@Pipe({\r\n name: 'ng0Date',\r\n standalone: true,\r\n pure: true\r\n})\r\nexport class DatePipe implements PipeTransform {\r\n constructor(private _ls: LocalizationService) {\r\n }\r\n\r\n transform(value: Date | string | number, format?: string) {\r\n return this._ls.get()?.formatDate(value, format);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { LocalizationService } from './localization.service';\r\n\r\n@Pipe({\r\n name: 'ng0Localize',\r\n standalone: true,\r\n pure: false\r\n})\r\nexport class LocalizePipe implements PipeTransform {\r\n constructor(private _ls: LocalizationService) {\r\n }\r\n\r\n transform(dictionaryKey: string) {\r\n return this._ls.get()?.translate(dictionaryKey);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { LocalizationService } from './localization.service';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\n\r\n@Pipe({\r\n name: 'ng0LocalizeEnum',\r\n standalone: true,\r\n pure: false\r\n})\r\nexport class LocalizeEnumPipe implements PipeTransform {\r\n private _recompute = true;\r\n private _value?: string;\r\n\r\n constructor(private _ls: LocalizationService) {\r\n _ls.change.pipe(takeUntilDestroyed()).subscribe(x => this._recompute = true);\r\n }\r\n\r\n /**\r\n * \r\n * @param enumValue \r\n * @param enumName \r\n * @param nullValueKey \r\n * @param returnEnumAsFallback\r\n * @param fallbackKey \r\n * @returns \r\n */\r\n transform(enumValue: string | number | null | undefined, enumName: string, fallback?: string): any {\r\n if (this._recompute) {\r\n this._value = this._ls.get()?.translateEnum(enumName, enumValue, fallback);\r\n this._recompute = false;\r\n }\r\n\r\n return this._value;\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { LocalizationService } from './localization.service';\r\n\r\n@Pipe({\r\n name: 'ng0LocalizeBool',\r\n standalone: true,\r\n pure: false\r\n})\r\nexport class LocalizeBooleanPipe implements PipeTransform {\r\n constructor(private _ls: LocalizationService) {\r\n }\r\n\r\n transform(value: any, falseKey = 'true', trueKey: 'false') {\r\n return this._ls.get()?.translate(value ? trueKey : falseKey);\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { Locale } from './locale';\r\nimport { LocalizationService } from './localization.service';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\n\r\n@Pipe({\r\n name: 'ng0LocalizeDate',\r\n standalone: true,\r\n pure: false\r\n})\r\nexport class LocalizeDatePipe implements PipeTransform {\r\n private _value?: string;\r\n private _recompute = true;\r\n\r\n constructor(private _ls: LocalizationService) {\r\n _ls.change.pipe(takeUntilDestroyed()).subscribe(x => this._recompute = true);\r\n }\r\n\r\n transform(value: number | string, format?: string) {\r\n if (this._recompute) {\r\n this._value = this._ls.get()?.formatDate(value, format);\r\n this._recompute = false;\r\n }\r\n\r\n return this._value;\r\n }\r\n}\r\n","import { Locale } from \"./locale\";\r\n\r\n/**\r\n * Object formatter function type.\r\n * @param obj The object to format.\r\n * @param params Additional parameters for formatting.\r\n * @returns The formatted value.\r\n */\r\nexport type ObjectFormatter = (obj: any, ...params: any[]) => any;\r\n\r\n/**\r\n * Object formatter-like types. \r\n */\r\nexport type ObjectFormatterLike = ObjectFormatter | string | number | Array<ObjectFormatter | string | number>;\r\n\r\n/**\r\n * Default object formatter function.\r\n * @param value The item to format.\r\n * @returns The formatted string.\r\n */\r\nexport function defaultFormatter(obj: any): string {\r\n return obj?.toString() || '';\r\n}\r\n\r\n/**\r\n * Creates a field formatter function.\r\n * @param field \r\n * @returns\r\n * @private\r\n */\r\nfunction createFieldFormatter(field: string): ObjectFormatter {\r\n return (obj: any) => obj?.[field];\r\n}\r\n\r\n/**\r\n * Creates an array index formatter function.\r\n * An array index formatter always returns the item at the specified index from an array object.\r\n * @param index \r\n * @returns an ObjectFormatter function.\r\n * @private\r\n */\r\nfunction createIndexFormatter(index: number | boolean): ObjectFormatter {\r\n return (obj: any) => {\r\n if (Array.isArray(obj)) {\r\n return obj[+index]; // use + to cast boolean values to numbers\r\n }\r\n\r\n throw Error('Object is not an array');\r\n }\r\n}\r\n\r\nfunction createArrayFormatter(array: any[]): ObjectFormatter {\r\n if (!Array.isArray(array)) {\r\n throw Error('Object is not an array');\r\n }\r\n\r\n return (index: number | boolean) => array[+index];\r\n}\r\n\r\n\r\n/**\r\n * Returns a formatter function by its name and parameters.\r\n * @param formatterName The format string in the form of \"formatterName:param1:param2:...\"\r\n * @returns A ValueFormatterFunction\r\n * @private\r\n */\r\nfunction createLocaleFormatter(locale: Locale, formatterName: string): ObjectFormatter {\r\n let formatter = locale.definition.formatters?.[formatterName];\r\n let formatterType = typeof formatter;\r\n\r\n if (!formatter) {\r\n console.warn(`The formatter \"${formatterName}\" is not defined in locale ${locale.definition.name}`);\r\n return defaultFormatter;\r\n }\r\n\r\n if (formatterType === 'function') {\r\n return formatter as ObjectFormatter;\r\n } else if (Array.isArray(formatter)) {\r\n return createArrayFormatter(formatter);\r\n } else if (formatterType == 'object' && formatter != null) {\r\n return (value: string) => (formatter as any)[value] || '';\r\n } else {\r\n throw Error(`Invalid locale formatter: ${formatterName}`);\r\n }\r\n}\r\n\r\n/**\r\n * Creates an ObjectFormatter from various ObjectFormatterLike types.\r\n * @param formatter The ObjectFormatterLike value to convert. \r\n * @param locale Optional locale object for locale-based formatting. \r\n * @returns An ObjectFormatter function.\r\n */\r\nexport function createObjectFormatter(formatter: ObjectFormatterLike, locale?: Locale): ObjectFormatter {\r\n switch (typeof formatter) {\r\n case 'function':\r\n return formatter;\r\n case 'number':\r\n return createIndexFormatter(formatter);\r\n case 'string':\r\n if (formatter.startsWith('@')) {\r\n if (locale == null) {\r\n throw Error('For using locale formatters, provide a Locale object.')\r\n }\r\n return createLocaleFormatter(locale, formatter.substring(1));\r\n } else {\r\n return createFieldFormatter(formatter);\r\n }\r\n case 'object':\r\n if (Array.isArray(formatter)) {\r\n // Create a composite formatter from multiple formatters.\r\n const formatters = formatter.map(item => createObjectFormatter(item, locale));\r\n return (obj: any) => formatters.reduce((previous, current, index) => index == 0 ? current(obj) : current(previous));\r\n }\r\n break;\r\n }\r\n\r\n throw Error('invalid formatter value', { cause: formatter });\r\n}\r\n\r\n/**\r\n * Creates a function that converts a ObjectFormatterLike value into a ObjectFormatter.\r\n * @param locale Optional locale object for locale-based formatting.\r\n * @returns A function that takes a ObjectFormatterLike and returns a ObjectFormatter.\r\n */\r\nexport function objectFormatterAttribute(locale?: Locale): ((v: ObjectFormatterLike) => ObjectFormatter) {\r\n return (v) => createObjectFormatter(v, locale);\r\n};\r\n","import { inject, Pipe, PipeTransform } from '@angular/core';\r\nimport { LocalizationService } from './localization.service';\r\nimport { createObjectFormatter, ObjectFormatterLike } from './formatter';\r\n\r\n/**\r\n * Format pipe to format objects using various formatter types.\r\n */\r\n@Pipe({\r\n name: 'ng0Format',\r\n standalone: true,\r\n pure: true\r\n})\r\nexport class FormatPipe implements PipeTransform {\r\n private _localizationService = inject(LocalizationService, { optional: true });\r\n\r\n transform(obj: any, formatter: ObjectFormatterLike, ...params: any[]): any {\r\n return createObjectFormatter(formatter, this._localizationService?.get())(obj, ...params);\r\n }\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { TranslatePipe } from './translate.pipe';\r\nimport { TranslateEnumPipe } from './translate-enum.pipe';\r\nimport { TranslateBooleanPipe } from './translate-boolean-pipe';\r\nimport { DatePipe } from './date.pipe';\r\nimport { LocalizePipe } from './localize.pipe';\r\nimport { LocalizeEnumPipe } from './localize-enum.pipe';\r\nimport { LocalizeBooleanPipe } from './localize-boolean-pipe';\r\nimport { LocalizeDatePipe } from './localize-date.pipe';\r\nimport { FormatPipe } from './format.pipe';\r\n\r\nconst Declares = [\r\n // Pure pipes\r\n TranslatePipe,\r\n TranslateEnumPipe,\r\n TranslateBooleanPipe,\r\n DatePipe,\r\n FormatPipe,\r\n\r\n // Impure pipes\r\n LocalizePipe,\r\n LocalizeEnumPipe,\r\n LocalizeBooleanPipe,\r\n LocalizeDatePipe\r\n];\r\n\r\n@NgModule({\r\n imports: Declares,\r\n exports: Declares\r\n})\r\nexport class LocalizationModule {\r\n}\r\n\r\n","import { InjectionToken } from '@angular/core';\r\nimport { LocalizationService } from './localization.service';\r\nimport { Locale } from './locale';\r\n\r\nexport const LOCALE = new InjectionToken<Locale | LocalizationService>('LOCALE');\r\n\r\nexport interface TranslatedValidationError {\r\n /** Error key */\r\n key: string;\r\n \r\n /** Error object */\r\n value: any;\r\n \r\n /** localized error text */\r\n text?: string;\r\n }\r\n \r\n export interface LocaleChangeEvent {\r\n old?: Locale;\r\n new: Locale;\r\n }\r\n ","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.LocalizationService"],"mappings":";;;;;AAIA;MACa,MAAM,CAAA;AACW,IAAA,UAAA;AAA5B,IAAA,WAAA,CAA4B,UAA4B,EAAA;QAA5B,IAAA,CAAA,UAAU,GAAV,UAAU;IACtC;AAEA;;;AAGG;AACH,IAAA,IAAI,IAAI,GAAA;AACN,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI;IAC7B;AAEA;;;;;AAKG;IACH,SAAS,CAAC,GAAW,EAAE,QAAiB,EAAA;QACtC,OAAO,IAAI,CAAC,UAAU,CAAC,UAAU,GAAG,GAAG,CAAC,IAAI,QAAQ;IACtD;AAEA;;;;;;AAMG;AAEH,IAAA,aAAa,CAAC,QAAgB,EAAE,SAA6C,EAAE,QAAiB,EAAA;QAC9F,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,GAAG,QAAQ,CAAC;QAEzC,IAAI,CAAC,CAAC,EAAE;AACN,YAAA,OAAO,QAAQ,IAAI,SAAS,EAAE,QAAQ,EAAE;QAC1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EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAlB,kBAAkB,EAAA,OAAA,EAAA;;YAjB7B,aAAa;YACb,iBAAiB;YACjB,oBAAoB;YACpB,QAAQ;YACR,UAAU;;YAGV,YAAY;YACZ,gBAAgB;YAChB,mBAAmB;YACnB,gBAAgB,CAAA,EAAA,OAAA,EAAA;;YAVhB,aAAa;YACb,iBAAiB;YACjB,oBAAoB;YACpB,QAAQ;YACR,UAAU;;YAGV,YAAY;YACZ,gBAAgB;YAChB,mBAAmB;YACnB,gBAAgB,CAAA,EAAA,CAAA;wGAOL,kBAAkB,EAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,QAAQ;AACjB,oBAAA,OAAO,EAAE;AACV,iBAAA;;;MC1BY,MAAM,GAAG,IAAI,cAAc,CAA+B,QAAQ;;ACJ/E;;AAEG;;;;"}
|
package/localization/index.d.ts
CHANGED
|
@@ -5,29 +5,31 @@ import * as rxjs from 'rxjs';
|
|
|
5
5
|
/**
|
|
6
6
|
* Object formatter function type.
|
|
7
7
|
* @param obj The object to format.
|
|
8
|
-
* @param
|
|
8
|
+
* @param params Additional parameters for formatting.
|
|
9
9
|
* @returns The formatted value.
|
|
10
10
|
*/
|
|
11
|
-
type ObjectFormatter = (obj: any, ...
|
|
11
|
+
type ObjectFormatter = (obj: any, ...params: any[]) => any;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Object formatter-like types.
|
|
14
14
|
*/
|
|
15
|
-
type ObjectFormatterLike = ObjectFormatter | string
|
|
15
|
+
type ObjectFormatterLike = ObjectFormatter | string | number | Array<ObjectFormatter | string | number>;
|
|
16
16
|
/**
|
|
17
|
-
* Default
|
|
17
|
+
* Default object formatter function.
|
|
18
18
|
* @param value The item to format.
|
|
19
19
|
* @returns The formatted string.
|
|
20
20
|
*/
|
|
21
|
-
declare function
|
|
21
|
+
declare function defaultFormatter(obj: any): string;
|
|
22
22
|
/**
|
|
23
|
-
* Creates an
|
|
24
|
-
*
|
|
25
|
-
* If the input is a function, it is returned as is.
|
|
26
|
-
* If the input is a string starting with '@', it returns a function that retrieves the corresponding property from the item.
|
|
27
|
-
* If the input is a string representing a locale format, it uses the provided locale to get the appropriate formatter.
|
|
28
|
-
* If no locale is provided and a locale format string is used, an error is thrown.
|
|
23
|
+
* Creates an ObjectFormatter from various ObjectFormatterLike types.
|
|
24
|
+
* @param formatter The ObjectFormatterLike value to convert.
|
|
29
25
|
* @param locale Optional locale object for locale-based formatting.
|
|
30
|
-
* @returns
|
|
26
|
+
* @returns An ObjectFormatter function.
|
|
27
|
+
*/
|
|
28
|
+
declare function createObjectFormatter(formatter: ObjectFormatterLike, locale?: Locale): ObjectFormatter;
|
|
29
|
+
/**
|
|
30
|
+
* Creates a function that converts a ObjectFormatterLike value into a ObjectFormatter.
|
|
31
|
+
* @param locale Optional locale object for locale-based formatting.
|
|
32
|
+
* @returns A function that takes a ObjectFormatterLike and returns a ObjectFormatter.
|
|
31
33
|
*/
|
|
32
34
|
declare function objectFormatterAttribute(locale?: Locale): ((v: ObjectFormatterLike) => ObjectFormatter);
|
|
33
35
|
|
|
@@ -202,12 +204,6 @@ declare class Locale {
|
|
|
202
204
|
* @returns Formatted date string based on the locale
|
|
203
205
|
*/
|
|
204
206
|
formatDate(date: Date | string | number, format?: string): string;
|
|
205
|
-
/**
|
|
206
|
-
* Returns a formatter function by its name and parameters.
|
|
207
|
-
* @param formatterName The format string in the form of "formatterName:param1:param2:..."
|
|
208
|
-
* @returns A ValueFormatterFunction
|
|
209
|
-
*/
|
|
210
|
-
getFormatter(formatterName: string): ObjectFormatter;
|
|
211
207
|
}
|
|
212
208
|
|
|
213
209
|
/**
|
|
@@ -256,6 +252,16 @@ declare class DatePipe implements PipeTransform {
|
|
|
256
252
|
static ɵpipe: i0.ɵɵPipeDeclaration<DatePipe, "ng0Date", true>;
|
|
257
253
|
}
|
|
258
254
|
|
|
255
|
+
/**
|
|
256
|
+
* Format pipe to format objects using various formatter types.
|
|
257
|
+
*/
|
|
258
|
+
declare class FormatPipe implements PipeTransform {
|
|
259
|
+
private _localizationService;
|
|
260
|
+
transform(obj: any, formatter: ObjectFormatterLike, ...params: any[]): any;
|
|
261
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormatPipe, never>;
|
|
262
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<FormatPipe, "ng0Format", true>;
|
|
263
|
+
}
|
|
264
|
+
|
|
259
265
|
declare class LocalizePipe implements PipeTransform {
|
|
260
266
|
private _ls;
|
|
261
267
|
constructor(_ls: LocalizationService);
|
|
@@ -303,9 +309,9 @@ declare class LocalizeDatePipe implements PipeTransform {
|
|
|
303
309
|
|
|
304
310
|
declare class LocalizationModule {
|
|
305
311
|
static ɵfac: i0.ɵɵFactoryDeclaration<LocalizationModule, never>;
|
|
306
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<LocalizationModule, never, [typeof TranslatePipe, typeof TranslateEnumPipe, typeof TranslateBooleanPipe, typeof DatePipe, typeof LocalizePipe, typeof LocalizeEnumPipe, typeof LocalizeBooleanPipe, typeof LocalizeDatePipe], [typeof TranslatePipe, typeof TranslateEnumPipe, typeof TranslateBooleanPipe, typeof DatePipe, typeof LocalizePipe, typeof LocalizeEnumPipe, typeof LocalizeBooleanPipe, typeof LocalizeDatePipe]>;
|
|
312
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<LocalizationModule, never, [typeof TranslatePipe, typeof TranslateEnumPipe, typeof TranslateBooleanPipe, typeof DatePipe, typeof FormatPipe, typeof LocalizePipe, typeof LocalizeEnumPipe, typeof LocalizeBooleanPipe, typeof LocalizeDatePipe], [typeof TranslatePipe, typeof TranslateEnumPipe, typeof TranslateBooleanPipe, typeof DatePipe, typeof FormatPipe, typeof LocalizePipe, typeof LocalizeEnumPipe, typeof LocalizeBooleanPipe, typeof LocalizeDatePipe]>;
|
|
307
313
|
static ɵinj: i0.ɵɵInjectorDeclaration<LocalizationModule>;
|
|
308
314
|
}
|
|
309
315
|
|
|
310
|
-
export { DatePipe, LOCALE, Locale, LocalizationModule, LocalizationService, LocalizeBooleanPipe, LocalizeDatePipe, LocalizeEnumPipe, LocalizePipe, TranslateBooleanPipe, TranslateEnumPipe, TranslatePipe,
|
|
316
|
+
export { DatePipe, FormatPipe, LOCALE, Locale, LocalizationModule, LocalizationService, LocalizeBooleanPipe, LocalizeDatePipe, LocalizeEnumPipe, LocalizePipe, TranslateBooleanPipe, TranslateEnumPipe, TranslatePipe, createObjectFormatter, defaultFormatter, objectFormatterAttribute };
|
|
311
317
|
export type { LocaleChangeEvent, LocaleDefinition, LocaleDictionary, LocaleEnums, LocaleValidationErrorTranslator, LocaleValidationErrorTranslators, ObjectFormatter, ObjectFormatterLike, TableComponentPagingFormatter, TranslatedValidationError };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bootkit/ng0",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.28",
|
|
4
4
|
"description": "Angular+Bootstrap Component Library",
|
|
5
5
|
"homepage": "https://bootkitlib.github.io/",
|
|
6
6
|
"author": "BootKit",
|
|
@@ -87,14 +87,14 @@
|
|
|
87
87
|
"types": "./components/button/index.d.ts",
|
|
88
88
|
"default": "./fesm2022/bootkit-ng0-components-button.mjs"
|
|
89
89
|
},
|
|
90
|
-
"./components/code": {
|
|
91
|
-
"types": "./components/code/index.d.ts",
|
|
92
|
-
"default": "./fesm2022/bootkit-ng0-components-code.mjs"
|
|
93
|
-
},
|
|
94
90
|
"./components/card": {
|
|
95
91
|
"types": "./components/card/index.d.ts",
|
|
96
92
|
"default": "./fesm2022/bootkit-ng0-components-card.mjs"
|
|
97
93
|
},
|
|
94
|
+
"./components/code": {
|
|
95
|
+
"types": "./components/code/index.d.ts",
|
|
96
|
+
"default": "./fesm2022/bootkit-ng0-components-code.mjs"
|
|
97
|
+
},
|
|
98
98
|
"./components/collapse": {
|
|
99
99
|
"types": "./components/collapse/index.d.ts",
|
|
100
100
|
"default": "./fesm2022/bootkit-ng0-components-collapse.mjs"
|
|
@@ -111,17 +111,13 @@
|
|
|
111
111
|
"types": "./components/form-field/index.d.ts",
|
|
112
112
|
"default": "./fesm2022/bootkit-ng0-components-form-field.mjs"
|
|
113
113
|
},
|
|
114
|
-
"./components/list": {
|
|
115
|
-
"types": "./components/list/index.d.ts",
|
|
116
|
-
"default": "./fesm2022/bootkit-ng0-components-list.mjs"
|
|
117
|
-
},
|
|
118
114
|
"./components/modal": {
|
|
119
115
|
"types": "./components/modal/index.d.ts",
|
|
120
116
|
"default": "./fesm2022/bootkit-ng0-components-modal.mjs"
|
|
121
117
|
},
|
|
122
|
-
"./components/
|
|
123
|
-
"types": "./components/
|
|
124
|
-
"default": "./fesm2022/bootkit-ng0-components-
|
|
118
|
+
"./components/list": {
|
|
119
|
+
"types": "./components/list/index.d.ts",
|
|
120
|
+
"default": "./fesm2022/bootkit-ng0-components-list.mjs"
|
|
125
121
|
},
|
|
126
122
|
"./components/offcanvas": {
|
|
127
123
|
"types": "./components/offcanvas/index.d.ts",
|
|
@@ -131,6 +127,10 @@
|
|
|
131
127
|
"types": "./components/overlay/index.d.ts",
|
|
132
128
|
"default": "./fesm2022/bootkit-ng0-components-overlay.mjs"
|
|
133
129
|
},
|
|
130
|
+
"./components/nav": {
|
|
131
|
+
"types": "./components/nav/index.d.ts",
|
|
132
|
+
"default": "./fesm2022/bootkit-ng0-components-nav.mjs"
|
|
133
|
+
},
|
|
134
134
|
"./components/pagination": {
|
|
135
135
|
"types": "./components/pagination/index.d.ts",
|
|
136
136
|
"default": "./fesm2022/bootkit-ng0-components-pagination.mjs"
|