You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* $filterProvider - $filter - provider in module ng
3
+
*
4
+
* Filters are just functions which transform input to an output. However filters need to be Dependency Injected. To achieve this a filter definition consists of a factory function which is annotated with dependencies and is responsible for creating a filter function.
5
+
* @extends {ng.ServiceProvider}
6
+
*/
1
7
exportclassFilterProvider{
2
8
static$inject: string[];
3
9
/**
@@ -6,18 +12,14 @@ export class FilterProvider {
6
12
constructor($provide: ng.ProvideService);
7
13
$provide: import("../../interface.ts").Provider;
8
14
/**
9
-
* @param {string|Record<string, ng.FilterFn>} name
* @param fractionSize Number of decimal places to round the number to. If this is not provided then the fraction size is computed from the current locale's number formatting pattern. In the case of the default locale, it will be 3.
417
-
* @return Number rounded to decimalPlaces and places a “,” after each third digit.
* Formats date to a string based on the requested format.
425
-
*
426
-
* @param date Date to format either as Date object, milliseconds (string or number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is specified in the string input, the time is considered to be in the local timezone.
427
-
* @param format Formatting rules (see Description). If not specified, mediumDate is used.
428
-
* @param timezone Timezone to be used for formatting. It understands UTC/GMT and the continental US time zone abbreviations, but for general use, use a time zone offset, for example, '+0430' (4 hours, 30 minutes east of the Greenwich meridian) If not specified, the timezone of the browser will be used.
429
-
* @return Formatted string or the input if input is not recognized as date/millis.
* Allows you to convert a JavaScript object into JSON string.
437
-
* @param object Any JavaScript object (including arrays and primitive types) to filter.
438
-
* @param spacing The number of spaces to use per indentation, defaults to 2.
439
-
* @return JSON string.
440
-
*/
441
-
(object: any,spacing?: number): string;
442
-
}
443
-
444
-
interfaceIFilterLowercase{
445
-
/**
446
-
* Converts string to lowercase.
447
-
*/
448
-
(value: string): string;
449
-
}
450
-
451
-
interfaceIFilterUppercase{
452
-
/**
453
-
* Converts string to uppercase.
454
-
*/
455
-
(value: string): string;
456
-
}
457
-
458
-
interfaceIFilterLimitTo{
459
-
/**
460
-
* Creates a new array containing only a specified number of elements. The elements are taken from either the beginning or the end of the source array, string or number, as specified by the value and sign (positive or negative) of limit.
461
-
* @param input Source array to be limited.
462
-
* @param limit The length of the returned array. If the limit number is positive, limit number of items from the beginning of the source array/string are copied. If the number is negative, limit number of items from the end of the source array are copied. The limit will be trimmed if it exceeds array.length. If limit is undefined, the input will be returned unchanged.
463
-
* @param begin Index at which to begin limitation. As a negative index, begin indicates an offset from the end of input. Defaults to 0.
464
-
* @return A new sub-array of length limit or less if input array had less than limit elements.
* Creates a new string containing only a specified number of elements. The elements are taken from either the beginning or the end of the source string or number, as specified by the value and sign (positive or negative) of limit. If a number is used as input, it is converted to a string.
469
-
* @param input Source string or number to be limited.
470
-
* @param limit The length of the returned string. If the limit number is positive, limit number of items from the beginning of the source string are copied. If the number is negative, limit number of items from the end of the source string are copied. The limit will be trimmed if it exceeds input.length. If limit is undefined, the input will be returned unchanged.
471
-
* @param begin Index at which to begin limitation. As a negative index, begin indicates an offset from the end of input. Defaults to 0.
472
-
* @return A new substring of length limit or less if input had less than limit elements.
473
-
*/
474
-
(
475
-
input: string|number,
476
-
limit: string|number,
477
-
begin?: string|number,
478
-
): string;
479
-
}
480
-
481
-
interfaceIFilterOrderBy{
482
-
/**
483
-
* Orders a specified array by the expression predicate. It is ordered alphabetically for strings and numerically for numbers. Note: if you notice numbers are not being sorted as expected, make sure they are actually being saved as numbers and not strings.
484
-
* @param array The array to sort.
485
-
* @param expression A predicate to be used by the comparator to determine the order of elements.
486
-
* @param reverse Reverse the order of the array.
487
-
* @param comparator Function used to determine the relative order of value pairs.
488
-
* @return An array containing the items from the specified collection, ordered by a comparator function based on the values computed using the expression predicate.
489
-
*/
490
-
<T>(
491
-
array: T[],
492
-
expression:
493
-
|string
494
-
|((value: T)=>any)
495
-
|Array<((value: T)=>any)|string>,
496
-
reverse?: boolean,
497
-
comparator?: IFilterOrderByComparatorFunc,
498
-
): T[];
499
-
}
500
-
501
-
/**
502
-
* $filterProvider - $filter - provider in module ng
503
-
*
504
-
* Filters are just functions which transform input to an output. However filters need to be Dependency Injected. To achieve this a filter definition consists of a factory function which is annotated with dependencies and is responsible for creating a filter function.
505
-
*
506
-
* see https://docs.angularjs.org/api/ng/provider/$filterProvider
507
-
*/
508
-
interfaceIFilterProviderextendsIServiceProvider{
509
-
/**
510
-
* register(name);
511
-
*
512
-
* @param name Name of the filter function, or an object map of filters where the keys are the filter names and the values are the filter factories. Note: Filter names must be valid angular Expressions identifiers, such as uppercase or orderBy. Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace your filters, then you can use capitalization (myappSubsectionFilterx) or underscores (myapp_subsection_filterx).
513
-
*/
514
-
register(name: string|{}): IServiceProvider;
515
-
}
516
-
517
-
interfaceILogProviderextendsIServiceProvider{
518
-
debugEnabled(): boolean;
519
-
debugEnabled(enabled: boolean): ILogProvider;
520
-
}
521
-
522
-
// We define this as separate interface so we can reopen it later for
0 commit comments