LfMetadataValidationUtils
: addisNullOrEmpty
to test if an string is consisted of white-space character
LfLocalizationService
: If Language cookie exists in expected LF format, language will default to that UI culture- Add
convertBytesToString
inStringUtils
to convert a raw number of bytes to an abbreviated string (MB, GB, etc.)
- Update build pipeline to use Node 16
StringUtils
now containstrimEnd
function remove all the trailing occurrences of a character from a string.
IconUtils
references icon url fromlfxstatic
instead ofjsdelivr
.localizationService
documentation references language resource files fromlfxstatic
instead ofjsdelivr
.
localizationService
Change default language to been-US
.- example:
// this will throw an error "Required language resource en-US is not found in provided map." const resources = new Map([['en', { TEST_STRING: 'test string' }]]); let lfLocalizationService = new LfLocalizationService(resources); // change to this instead const resources = new Map([['en-US', { TEST_STRING: 'test string' }]]); let lfLocalizationService = new LfLocalizationService(resources);
- example:
- Requested language without culture will default to the closes language with culture.
- example:
let lfLocalizationService = new LfLocalizationService(); lfLocalizationService.setLanguage('fr'); await lfLocalizationService.initResourcesFromUrlAsync(...); lfLocalizationService.currentResource?.language => 'fr-FR';
- example:
localizationService
Fix localizationService returns en when requested zh-CN (52).localizationService
Fix switching language from es to unavailable language resource does not default to en (51).
- Compatible with
@laserfiche/resource-library@4
.
- Refactor utils and add general purpose
CoreUtils
.
- Use
@laserfiche/resource-library@3
. - Remove documentation in npm package.
- [BREAKING]
jwtUtils
has been moved to@laserfiche/lf-api-client-core
.
- First stable release to NPM.