@tilde-nlp/ngx-common 8.0.5 → 8.0.7
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 +58 -20
- package/fesm2022/tilde-nlp-ngx-common.mjs.map +1 -1
- package/index.d.ts +24 -16
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import * as i0 from '@angular/core';
|
|
|
5
5
|
import { OnInit, EventEmitter, PipeTransform, ElementRef, ViewContainerRef, Renderer2, AfterViewInit, OnDestroy, ChangeDetectorRef, AfterContentInit, QueryList, OnChanges, SimpleChanges, InjectionToken, TemplateRef, Provider } from '@angular/core';
|
|
6
6
|
import * as rxjs from 'rxjs';
|
|
7
7
|
import { Observable, Subscription, Subject } from 'rxjs';
|
|
8
|
-
import { HttpClient } from '@angular/common/http';
|
|
8
|
+
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
9
9
|
import * as i3 from '@ngx-translate/core';
|
|
10
10
|
import { TranslateService, MissingTranslationHandler, MissingTranslationHandlerParams } from '@ngx-translate/core';
|
|
11
11
|
import * as i2 from '@angular/common';
|
|
@@ -675,6 +675,7 @@ declare class HtmlElementParseHelper {
|
|
|
675
675
|
declare class AuthHeadersHelper {
|
|
676
676
|
static getAuthHeaders(clientId: string): any;
|
|
677
677
|
static getAppIdAuthHeaders(appId: string): any;
|
|
678
|
+
static getLangHeaders(lang: string): HttpHeaders;
|
|
678
679
|
}
|
|
679
680
|
|
|
680
681
|
declare class FileExtensionHelper {
|
|
@@ -698,24 +699,31 @@ declare class SortHelper {
|
|
|
698
699
|
*/
|
|
699
700
|
static sortByArray(objectArr: any[], sortByArray: any[], fieldName: string): void;
|
|
700
701
|
/**
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
702
|
+
* Transforms the input array of objects by sorting them based on the specified sortingValueKey.
|
|
703
|
+
* @param values - An array of objects to be sorted.
|
|
704
|
+
* @param sortingValueKey - The key by which the provided values should be sorted, leave it empty if you want to sort string[].
|
|
705
|
+
*/
|
|
705
706
|
static sortAlphabetically(values: any[], sortingValueKey?: string): any;
|
|
706
707
|
/**
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
static sortByNumber(values:
|
|
708
|
+
* Sorts an array of values by a specified numeric property or by their numeric value if no property is specified.
|
|
709
|
+
* @param values - The array of values to be sorted. Can be an array of objects or primitive numeric values.
|
|
710
|
+
* @param sortingValueKey - The key of the numeric property in the objects to sort by.
|
|
711
|
+
* @param desc - Flag indicating whether to sort in descending (true) or ascending (false) order.
|
|
712
|
+
*/
|
|
713
|
+
static sortByNumber<T>(values: T[], sortingValueKey?: string, desc?: boolean): T[];
|
|
713
714
|
/**
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
715
|
+
* Sorts an array of values by a specified boolean property or by their boolean value if no property is specified.
|
|
716
|
+
* @param values - The array of values to be sorted. Can be an array of objects or primitive boolean values.
|
|
717
|
+
* @param sortingValueKey - The key of the boolean property in the objects to sort by.
|
|
718
|
+
* @param desc - Flag indicating whether to sort in descending (true) or ascending (false) order.
|
|
719
|
+
*/
|
|
720
|
+
static sortByBoolean<T>(values: T[], sortingValueKey?: string, desc?: boolean): T[];
|
|
721
|
+
/**
|
|
722
|
+
* This method is intended to be used with sorting methods like Array.sort(). It compares two strings, a and b, against a reference substring input.
|
|
723
|
+
* @param a - The first string to be compared.
|
|
724
|
+
* @param b - The second string to be compared.
|
|
725
|
+
* @param input - The reference substring used to influence the sorting order.
|
|
726
|
+
*/
|
|
719
727
|
static sortByStartingLetter(a: string, b: string, input: string): number;
|
|
720
728
|
}
|
|
721
729
|
|