@tilde-nlp/ngx-common 8.1.6 → 8.1.8
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/fesm2022/tilde-nlp-ngx-common.mjs +47 -1
- package/fesm2022/tilde-nlp-ngx-common.mjs.map +1 -1
- package/index.d.ts +12 -2
- package/package.json +1 -1
- package/styles/contrast-themes/black-white.scss +12 -4
- package/styles/contrast-themes/black-yellow.scss +13 -5
- package/styles/contrast-themes/yellow-black.scss +12 -4
|
@@ -51,6 +51,7 @@ import * as i1$6 from '@angular/cdk/clipboard';
|
|
|
51
51
|
import { ClipboardModule } from '@angular/cdk/clipboard';
|
|
52
52
|
import * as i3$1 from '@angular/material/tabs';
|
|
53
53
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
54
|
+
import { catchError as catchError$1, map as map$1 } from 'rxjs/operators';
|
|
54
55
|
|
|
55
56
|
class IconService {
|
|
56
57
|
constructor(iconRegistry, sanitizer) {
|
|
@@ -8912,6 +8913,51 @@ class AccessibilityDialogComponent {
|
|
|
8912
8913
|
}], null, null); })();
|
|
8913
8914
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AccessibilityDialogComponent, { className: "AccessibilityDialogComponent", filePath: "lib/accessibility/accessibility-dialog.component.ts", lineNumber: 16 }); })();
|
|
8914
8915
|
|
|
8916
|
+
class CustomTranslateLoader {
|
|
8917
|
+
constructor(http) {
|
|
8918
|
+
this.http = http;
|
|
8919
|
+
}
|
|
8920
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8921
|
+
getTranslation(lang) {
|
|
8922
|
+
const defaultTranslationsDirectory = `./assets/i18n/${lang}.json`;
|
|
8923
|
+
const overrideDirectory = `./assets/i18n/overrides/${lang}.json`;
|
|
8924
|
+
const defaultTranslations$ = this.http.get(defaultTranslationsDirectory).pipe(catchError$1(() => of({})));
|
|
8925
|
+
const overrideTranslations$ = this.http.get(overrideDirectory).pipe(catchError$1(() => of({})));
|
|
8926
|
+
return forkJoin([defaultTranslations$, overrideTranslations$]).pipe(map$1(([defaultTranslations, overrideTranslations]) => {
|
|
8927
|
+
return this.mergeDeep(defaultTranslations, overrideTranslations);
|
|
8928
|
+
}));
|
|
8929
|
+
}
|
|
8930
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8931
|
+
mergeDeep(target, source) {
|
|
8932
|
+
const output = { ...target };
|
|
8933
|
+
if (this.isObject(target) && this.isObject(source)) {
|
|
8934
|
+
Object.keys(source).forEach((key) => {
|
|
8935
|
+
if (this.isObject(source[key])) {
|
|
8936
|
+
if (!(key in target)) {
|
|
8937
|
+
Object.assign(output, { [key]: source[key] });
|
|
8938
|
+
}
|
|
8939
|
+
else {
|
|
8940
|
+
output[key] = this.mergeDeep(target[key], source[key]);
|
|
8941
|
+
}
|
|
8942
|
+
}
|
|
8943
|
+
else {
|
|
8944
|
+
Object.assign(output, { [key]: source[key] });
|
|
8945
|
+
}
|
|
8946
|
+
});
|
|
8947
|
+
}
|
|
8948
|
+
return output;
|
|
8949
|
+
}
|
|
8950
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8951
|
+
isObject(item) {
|
|
8952
|
+
return item && typeof item === 'object' && !Array.isArray(item);
|
|
8953
|
+
}
|
|
8954
|
+
static { this.ɵfac = function CustomTranslateLoader_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CustomTranslateLoader)(i0.ɵɵinject(i1$3.HttpClient)); }; }
|
|
8955
|
+
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CustomTranslateLoader, factory: CustomTranslateLoader.ɵfac }); }
|
|
8956
|
+
}
|
|
8957
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CustomTranslateLoader, [{
|
|
8958
|
+
type: Injectable
|
|
8959
|
+
}], () => [{ type: i1$3.HttpClient }], null); })();
|
|
8960
|
+
|
|
8915
8961
|
/*
|
|
8916
8962
|
* Public API Surface of ngx-common
|
|
8917
8963
|
*/
|
|
@@ -8920,5 +8966,5 @@ class AccessibilityDialogComponent {
|
|
|
8920
8966
|
* Generated bundle index. Do not edit.
|
|
8921
8967
|
*/
|
|
8922
8968
|
|
|
8923
|
-
export { ALERT_CONFIGURATION_TOKEN, AccessibilityContrasts, AccessibilityDialogComponent, AccessibilityFontSizes, AccessibilityService, AccessibilityTextMagnifierService, AlertService, AuthHeadersHelper, COLLECTIONS_MENU, ClickOutsideDirective, ClickOutsideModule, CloseButtonComponent, CloseButtonModule, CombinedCollection, CombinedCollectionTooltipKey, CompanyProductComponent, CompanyProductModule, Confirmation, ConfirmationModalComponent, ConfirmationModalModule, ConfirmationService, ConversionHelper, CustomPaginatorInernationalizationHelper, CustomTitleStrategyService, DISABLE_EXPORT_ATTRIBUTE_NAME, DOMService, DateAgoModule, DateAgoPipe, DomainTranslatePipe, DragAndDropDirective, DragAndDropModule, ERROR_CODES, EngineTermApiService, EngineTermCollectionScope, EngineTermCollectionSource, EngineTermCollectionStatus, EngineTermCollectionSubStatus, ExportFormat, ExtensionDialogComponent, ExtensionDialogModule, ExtensionDialogService, FILE_SIZE_UNIT, FileCategories, FileExtensionHelper, FileExtensions, FileSizeLabelPipe, FileTypeIcons, FileTypes, FileUploadComponent, FileUploadErrorTypeEnum, FileUploadModule, FilterBarComponent, FilterBarModule, FilterWithHighlightModule, FilterWithHighlightPipe, FooterComponent, FooterModule, GlobalMessageComponent, HashHelper, HtmlElementParseHelper, HtmlHelper, IconService, InlineMessageComponent, InlineMessageIconPosition, InlineMessageModule, InlineMessageType, LAST_USED_SYSTEM_LOCAL_STORAGE_KEY, LLMActions, LLMComponent, LLMModule, LLM_CONFIGURATION_TOKEN, LanguageTranslateModule, LanguageTranslatePipe, LanguageTranslateService, MatButtonLoadingDirective, MatButtonLoadingModule, MissingTranslationHandlerService, MissingTranslationHelper, MtCollectionStatus, MultiFunctionalTableComponent, MultiFunctionalTableModule, NewFeatureDialogWrapperComponent, NotificationMessageComponent, NotificationMessageModule, NotificationMessageType, NotificationService, OPEN_CLOSE_BTN_ICONS_TOKEN, ObjectLengthModule, ObjectLengthPipe, OpenCloseButtonComponent, OpenCloseButtonModule, OpenExtensionDialogComponent, Operations, PlausibleEventDirective, PlausibleHelper, PlausibleModule, ResolutionHelper, SCREEN_SIZE, SaveFileHelper, SelectLanguageDialogComponent, SidebarComponent, SidebarService, SortAlphabeticallyModule, SortAlphabeticallyPipe, SortByNumberPipe, SortDomainsPipe, SortHelper, SortLanguageListPipe, SortTranslationsByPropertyModule, SortTranslationsByPropertyPipe, SortTranslationsModule, SortTranslationsPipe, StatusDisplayComponent, StatusDisplayModule, SubscriptionComponent, SubscriptionPlan, SystemService, TerminologyApiService, TerminologyCollectionService, TerminologyComponent, TerminologyConfigService, TerminologyCreateCollectionComponent, TerminologyModule, TerminologyService, TextToSpeechComponent, TldLoaderComponent, TldLoaderModule, ToastComponent, ToastService, getFileSizeLabel, provideCustomTitleStrategy };
|
|
8969
|
+
export { ALERT_CONFIGURATION_TOKEN, AccessibilityContrasts, AccessibilityDialogComponent, AccessibilityFontSizes, AccessibilityService, AccessibilityTextMagnifierService, AlertService, AuthHeadersHelper, COLLECTIONS_MENU, ClickOutsideDirective, ClickOutsideModule, CloseButtonComponent, CloseButtonModule, CombinedCollection, CombinedCollectionTooltipKey, CompanyProductComponent, CompanyProductModule, Confirmation, ConfirmationModalComponent, ConfirmationModalModule, ConfirmationService, ConversionHelper, CustomPaginatorInernationalizationHelper, CustomTitleStrategyService, CustomTranslateLoader, DISABLE_EXPORT_ATTRIBUTE_NAME, DOMService, DateAgoModule, DateAgoPipe, DomainTranslatePipe, DragAndDropDirective, DragAndDropModule, ERROR_CODES, EngineTermApiService, EngineTermCollectionScope, EngineTermCollectionSource, EngineTermCollectionStatus, EngineTermCollectionSubStatus, ExportFormat, ExtensionDialogComponent, ExtensionDialogModule, ExtensionDialogService, FILE_SIZE_UNIT, FileCategories, FileExtensionHelper, FileExtensions, FileSizeLabelPipe, FileTypeIcons, FileTypes, FileUploadComponent, FileUploadErrorTypeEnum, FileUploadModule, FilterBarComponent, FilterBarModule, FilterWithHighlightModule, FilterWithHighlightPipe, FooterComponent, FooterModule, GlobalMessageComponent, HashHelper, HtmlElementParseHelper, HtmlHelper, IconService, InlineMessageComponent, InlineMessageIconPosition, InlineMessageModule, InlineMessageType, LAST_USED_SYSTEM_LOCAL_STORAGE_KEY, LLMActions, LLMComponent, LLMModule, LLM_CONFIGURATION_TOKEN, LanguageTranslateModule, LanguageTranslatePipe, LanguageTranslateService, MatButtonLoadingDirective, MatButtonLoadingModule, MissingTranslationHandlerService, MissingTranslationHelper, MtCollectionStatus, MultiFunctionalTableComponent, MultiFunctionalTableModule, NewFeatureDialogWrapperComponent, NotificationMessageComponent, NotificationMessageModule, NotificationMessageType, NotificationService, OPEN_CLOSE_BTN_ICONS_TOKEN, ObjectLengthModule, ObjectLengthPipe, OpenCloseButtonComponent, OpenCloseButtonModule, OpenExtensionDialogComponent, Operations, PlausibleEventDirective, PlausibleHelper, PlausibleModule, ResolutionHelper, SCREEN_SIZE, SaveFileHelper, SelectLanguageDialogComponent, SidebarComponent, SidebarService, SortAlphabeticallyModule, SortAlphabeticallyPipe, SortByNumberPipe, SortDomainsPipe, SortHelper, SortLanguageListPipe, SortTranslationsByPropertyModule, SortTranslationsByPropertyPipe, SortTranslationsModule, SortTranslationsPipe, StatusDisplayComponent, StatusDisplayModule, SubscriptionComponent, SubscriptionPlan, SystemService, TerminologyApiService, TerminologyCollectionService, TerminologyComponent, TerminologyConfigService, TerminologyCreateCollectionComponent, TerminologyModule, TerminologyService, TextToSpeechComponent, TldLoaderComponent, TldLoaderModule, ToastComponent, ToastService, getFileSizeLabel, provideCustomTitleStrategy };
|
|
8924
8970
|
//# sourceMappingURL=tilde-nlp-ngx-common.mjs.map
|