@rxap/pipes 21.0.1 → 22.0.0-dev.0

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.
Files changed (48) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/compodoc/changelog.html +2 -0
  3. package/compodoc/dependencies.html +4 -4
  4. package/compodoc/js/search/search_index.js +2 -2
  5. package/compodoc/properties.html +1 -1
  6. package/docs/documentation.json +31 -31
  7. package/docs/html/classes/DeleteIdentifierPipe.html +2 -2
  8. package/docs/html/classes/EscapeQuotationMarkPipe.html +2 -2
  9. package/docs/html/classes/GetFromObjectPipe.html +2 -2
  10. package/docs/html/classes/JoinPipe.html +2 -2
  11. package/docs/html/classes/LimitPipe.html +2 -2
  12. package/docs/html/classes/ReplacePipe.html +2 -2
  13. package/docs/html/classes/RxapCurrencyPipe.html +2 -2
  14. package/docs/html/classes/SlicePipe.html +2 -2
  15. package/docs/html/classes/ToDisplayPipe.html +2 -2
  16. package/docs/html/classes/TruncatePipe.html +2 -2
  17. package/docs/html/index.html +2 -2
  18. package/docs/html/modules.html +1 -1
  19. package/docs/markdown/README.md +1 -1
  20. package/docs/markdown/classes/DeleteIdentifierPipe.md +3 -3
  21. package/docs/markdown/classes/EscapeQuotationMarkPipe.md +3 -3
  22. package/docs/markdown/classes/GetFromObjectPipe.md +3 -3
  23. package/docs/markdown/classes/JoinPipe.md +3 -3
  24. package/docs/markdown/classes/LimitPipe.md +3 -3
  25. package/docs/markdown/classes/ReplacePipe.md +3 -3
  26. package/docs/markdown/classes/RxapCurrencyPipe.md +3 -3
  27. package/docs/markdown/classes/SlicePipe.md +3 -3
  28. package/docs/markdown/classes/ToDisplayPipe.md +3 -3
  29. package/docs/markdown/classes/TruncatePipe.md +3 -3
  30. package/docs/markdown/globals.md +2 -2
  31. package/docs/wiki/Class.DeleteIdentifierPipe.md +2 -2
  32. package/docs/wiki/Class.EscapeQuotationMarkPipe.md +2 -2
  33. package/docs/wiki/Class.GetFromObjectPipe.md +2 -2
  34. package/docs/wiki/Class.JoinPipe.md +2 -2
  35. package/docs/wiki/Class.LimitPipe.md +2 -2
  36. package/docs/wiki/Class.ReplacePipe.md +2 -2
  37. package/docs/wiki/Class.RxapCurrencyPipe.md +2 -2
  38. package/docs/wiki/Class.SlicePipe.md +2 -2
  39. package/docs/wiki/Class.ToDisplayPipe.md +2 -2
  40. package/docs/wiki/Class.TruncatePipe.md +2 -2
  41. package/docs/wiki/globals.md +1 -1
  42. package/fesm2022/rxap-pipes-santization.mjs +91 -63
  43. package/fesm2022/rxap-pipes-santization.mjs.map +1 -1
  44. package/fesm2022/rxap-pipes.mjs +399 -223
  45. package/fesm2022/rxap-pipes.mjs.map +1 -1
  46. package/package.json +9 -9
  47. package/types/rxap-pipes-santization.d.ts +17 -18
  48. package/types/rxap-pipes.d.ts +82 -91
@@ -1 +1 @@
1
- {"version":3,"file":"rxap-pipes.mjs","sources":["../../../../../packages/angular/pipes/src/lib/currency.pipe.ts","../../../../../packages/angular/pipes/src/lib/delete-identifier.pipe.ts","../../../../../packages/angular/pipes/src/lib/replace.pipe.ts","../../../../../packages/angular/pipes/src/lib/escape-quotation-mark.pipe.ts","../../../../../packages/angular/pipes/src/lib/get-from-object.pipe.ts","../../../../../packages/angular/pipes/src/lib/join.pipe.ts","../../../../../packages/angular/pipes/src/lib/limit.pipe.ts","../../../../../packages/angular/pipes/src/lib/slice.pipe.ts","../../../../../packages/angular/pipes/src/lib/to-display.pipe.ts","../../../../../packages/angular/pipes/src/lib/truncate.pipe.ts","../../../../../packages/angular/pipes/src/index.ts","../../../../../packages/angular/pipes/src/rxap-pipes.ts"],"sourcesContent":["import { DEFAULT_CURRENCY_CODE, LOCALE_ID, Pipe, PipeTransform, inject } from '@angular/core';\nimport { CurrencyPipe } from '@angular/common';\n\n@Pipe({\n name: 'currency',\n standalone: true,\n})\nexport class RxapCurrencyPipe implements PipeTransform {\n private readonly currency = new CurrencyPipe(inject(LOCALE_ID), inject(DEFAULT_CURRENCY_CODE, { optional: true }) ?? undefined);\n\n\n /**\n *\n * @param value The number to be formatted as currency.\n * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code,\n * such as `USD` for the US dollar and `EUR` for the euro. The default currency code can be\n * configured using the `DEFAULT_CURRENCY_CODE` injection token.\n * @param display The format for the currency indicator. One of the following:\n * - `code`: Show the code (such as `USD`).\n * - `symbol`(default): Show the symbol (such as `$`).\n * - `symbol-narrow`: Use the narrow symbol for locales that have two symbols for their\n * currency.\n * For example, the Canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`. If the\n * locale has no narrow symbol, uses the standard symbol for the locale.\n * - String: Use the given string value instead of a code or a symbol.\n * For example, an empty string will suppress the currency & symbol.\n * - Boolean (marked deprecated in v5): `true` for symbol and false for `code`.\n *\n * @param digitsInfo Decimal representation options, specified by a string\n * in the following format:<br>\n * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n * Default is `1`.\n * - `minFractionDigits`: The minimum number of digits after the decimal point.\n * Default is `2`.\n * - `maxFractionDigits`: The maximum number of digits after the decimal point.\n * Default is `2`.\n * If not provided, the number will be formatted with the proper amount of digits,\n * depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies.\n * For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none.\n * @param locale A locale code for the locale format rules to use.\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).\n */\n public transform(\n value: number,\n currencyCode?: string,\n display?: 'code' | 'symbol' | 'symbol-narrow' | string | boolean,\n digitsInfo?: string,\n locale?: string,\n ): string | null {\n return this.currency.transform(value / 100, currencyCode, display, digitsInfo, locale);\n }\n\n}\n","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\nimport {\n clone,\n getIdentifierProperties,\n hasIdentifierProperty,\n WithIdentifier,\n} from '@rxap/utilities';\n\n@Pipe({\n name: 'deleteIdentifier',\n standalone: true,\n})\nexport class DeleteIdentifierPipe implements PipeTransform {\n\n public transform<T>(value: (WithIdentifier & T) | null): T | null {\n if (!value) {\n return value;\n }\n const copy: any = clone(value);\n if (hasIdentifierProperty(copy)) {\n for (const pk of getIdentifierProperties(copy)) {\n delete copy[pk];\n }\n }\n return copy;\n }\n\n}\n\n\n","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\n\n@Pipe({\n name: 'replace',\n standalone: true,\n})\nexport class ReplacePipe implements PipeTransform {\n\n public transform(value: string, replace: RegExp, replaceValue: string): string {\n return value ? value.replace(replace, replaceValue) : '';\n }\n\n}\n\n\n","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\nimport { ReplacePipe } from './replace.pipe';\n\n@Pipe({\n name: 'escapeQuotationMark',\n standalone: true,\n})\nexport class EscapeQuotationMarkPipe implements PipeTransform {\n\n public transform(value: string, reverse = false): string {\n if (reverse) {\n return new ReplacePipe().transform(value, /\\\\\"/g, '\"');\n } else {\n return new ReplacePipe().transform(value, /\"/g, '\\\\\"');\n }\n }\n\n}\n\n\n","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\nimport { getFromObject } from '@rxap/utilities';\n\n@Pipe({\n name: 'getFromObject',\n standalone: true,\n})\nexport class GetFromObjectPipe implements PipeTransform {\n transform(value: any, path: string): any {\n return getFromObject(value, path);\n }\n}\n\n\n","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\n\n@Pipe({\n name: 'join',\n pure: true,\n standalone: true,\n})\nexport class JoinPipe implements PipeTransform {\n\n transform(list: any[], separator?: string): string {\n return list.join(separator);\n }\n\n}\n","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\n\n@Pipe({\n name: 'limit',\n standalone: true,\n})\nexport class LimitPipe implements PipeTransform {\n\n transform<T>(value: readonly T[], limit: number): T[] {\n return value.slice(0, limit);\n }\n\n}\n","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\n\n@Pipe({\n name: 'slice',\n standalone: true,\n})\nexport class SlicePipe implements PipeTransform {\n\n transform<T>(value: readonly T[], start: number, end?: number): T[] {\n return value.slice(start, end);\n }\n\n}\n","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\nimport { ToDisplayFunction } from '@rxap/utilities';\nimport { JsonPipe } from '@angular/common';\n\n@Pipe({\n name: 'toDisplay',\n standalone: true,\n})\nexport class ToDisplayPipe implements PipeTransform {\n\n private jsonPipe = new JsonPipe();\n\n public transform(value: any, toDisplay: ToDisplayFunction = this.jsonPipe.transform): string {\n return toDisplay(value);\n }\n\n}\n\n\n","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\n\n@Pipe({\n name: 'truncate',\n standalone: true,\n})\nexport class TruncatePipe implements PipeTransform {\n\n transform(value?: string | null, length = 64, ellipsis = '...'): string {\n if (!value) {\n return '';\n }\n if (value.length <= length) {\n return value;\n }\n return value.substring(0, length) + ellipsis;\n }\n\n}\n","// region \nexport * from './lib/currency.pipe';\nexport * from './lib/delete-identifier.pipe';\nexport * from './lib/escape-quotation-mark.pipe';\nexport * from './lib/get-from-object.pipe';\nexport * from './lib/join.pipe';\nexport * from './lib/limit.pipe';\nexport * from './lib/replace.pipe';\nexport * from './lib/slice.pipe';\nexport * from './lib/to-display.pipe';\nexport * from './lib/truncate.pipe';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAOa,gBAAgB,CAAA;AAJ7B,IAAA,WAAA,GAAA;QAKmB,IAAA,CAAA,QAAQ,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,qBAAqB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,SAAS,CAAC;AA8ChI,IAAA;AA3CC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;IACI,SAAS,CACd,KAAa,EACb,YAAqB,EACrB,OAAgE,EAChE,UAAmB,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AAI;AACjB,iBAAA;;;MCDY,YAAY,CAAA;IAEvB,SAAS,CAAC,KAAqB,EAAE,MAAM,GAAG,EAAE,EAAE,QAAQ,GAAG,KAAK,EAAA;QAC5D,IAAI,CAAC,KAAK,EAAE;AACV,YAAA,OAAO,EAAE;QACX;AACA,QAAA,IAAI,KAAK,CAAC,MAAM,IAAI,MAAM,EAAE;AAC1B,YAAA,OAAO,KAAK;QACd;QACA,OAAO,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,QAAQ;IAC9C;8GAVW,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,CAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,UAAU;AAChB,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACRD;AAWA;;ACXA;;AAEG;;;;"}
1
+ {"version":3,"file":"rxap-pipes.mjs","names":[],"sources":["../../../../../packages/angular/pipes/src/lib/currency.pipe.ts","../../../../../packages/angular/pipes/src/lib/delete-identifier.pipe.ts","../../../../../packages/angular/pipes/src/lib/replace.pipe.ts","../../../../../packages/angular/pipes/src/lib/escape-quotation-mark.pipe.ts","../../../../../packages/angular/pipes/src/lib/get-from-object.pipe.ts","../../../../../packages/angular/pipes/src/lib/join.pipe.ts","../../../../../packages/angular/pipes/src/lib/limit.pipe.ts","../../../../../packages/angular/pipes/src/lib/slice.pipe.ts","../../../../../packages/angular/pipes/src/lib/to-display.pipe.ts","../../../../../packages/angular/pipes/src/lib/truncate.pipe.ts"],"sourcesContent":["import { DEFAULT_CURRENCY_CODE, LOCALE_ID, Pipe, PipeTransform, inject } from '@angular/core';\nimport { CurrencyPipe } from '@angular/common';\n\n@Pipe({\n name: 'currency',\n standalone: true,\n})\nexport class RxapCurrencyPipe implements PipeTransform {\n private readonly currency = new CurrencyPipe(inject(LOCALE_ID), inject(DEFAULT_CURRENCY_CODE, { optional: true }) ?? undefined);\n\n\n /**\n *\n * @param value The number to be formatted as currency.\n * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code,\n * such as `USD` for the US dollar and `EUR` for the euro. The default currency code can be\n * configured using the `DEFAULT_CURRENCY_CODE` injection token.\n * @param display The format for the currency indicator. One of the following:\n * - `code`: Show the code (such as `USD`).\n * - `symbol`(default): Show the symbol (such as `$`).\n * - `symbol-narrow`: Use the narrow symbol for locales that have two symbols for their\n * currency.\n * For example, the Canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`. If the\n * locale has no narrow symbol, uses the standard symbol for the locale.\n * - String: Use the given string value instead of a code or a symbol.\n * For example, an empty string will suppress the currency & symbol.\n * - Boolean (marked deprecated in v5): `true` for symbol and false for `code`.\n *\n * @param digitsInfo Decimal representation options, specified by a string\n * in the following format:<br>\n * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n * Default is `1`.\n * - `minFractionDigits`: The minimum number of digits after the decimal point.\n * Default is `2`.\n * - `maxFractionDigits`: The maximum number of digits after the decimal point.\n * Default is `2`.\n * If not provided, the number will be formatted with the proper amount of digits,\n * depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies.\n * For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none.\n * @param locale A locale code for the locale format rules to use.\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).\n */\n public transform(\n value: number,\n currencyCode?: string,\n display?: 'code' | 'symbol' | 'symbol-narrow' | string | boolean,\n digitsInfo?: string,\n locale?: string,\n ): string | null {\n return this.currency.transform(value / 100, currencyCode, display, digitsInfo, locale);\n }\n\n}\n","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\nimport {\n clone,\n getIdentifierProperties,\n hasIdentifierProperty,\n WithIdentifier,\n} from '@rxap/utilities';\n\n@Pipe({\n name: 'deleteIdentifier',\n standalone: true,\n})\nexport class DeleteIdentifierPipe implements PipeTransform {\n\n public transform<T>(value: (WithIdentifier & T) | null): T | null {\n if (!value) {\n return value;\n }\n const copy: any = clone(value);\n if (hasIdentifierProperty(copy)) {\n for (const pk of getIdentifierProperties(copy)) {\n delete copy[pk];\n }\n }\n return copy;\n }\n\n}\n\n\n","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\n\n@Pipe({\n name: 'replace',\n standalone: true,\n})\nexport class ReplacePipe implements PipeTransform {\n\n public transform(value: string, replace: RegExp, replaceValue: string): string {\n return value ? value.replace(replace, replaceValue) : '';\n }\n\n}\n\n\n","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\nimport { ReplacePipe } from './replace.pipe';\n\n@Pipe({\n name: 'escapeQuotationMark',\n standalone: true,\n})\nexport class EscapeQuotationMarkPipe implements PipeTransform {\n\n public transform(value: string, reverse = false): string {\n if (reverse) {\n return new ReplacePipe().transform(value, /\\\\\"/g, '\"');\n } else {\n return new ReplacePipe().transform(value, /\"/g, '\\\\\"');\n }\n }\n\n}\n\n\n","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\nimport { getFromObject } from '@rxap/utilities';\n\n@Pipe({\n name: 'getFromObject',\n standalone: true,\n})\nexport class GetFromObjectPipe implements PipeTransform {\n transform(value: any, path: string): any {\n return getFromObject(value, path);\n }\n}\n\n\n","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\n\n@Pipe({\n name: 'join',\n pure: true,\n standalone: true,\n})\nexport class JoinPipe implements PipeTransform {\n\n transform(list: any[], separator?: string): string {\n return list.join(separator);\n }\n\n}\n","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\n\n@Pipe({\n name: 'limit',\n standalone: true,\n})\nexport class LimitPipe implements PipeTransform {\n\n transform<T>(value: readonly T[], limit: number): T[] {\n return value.slice(0, limit);\n }\n\n}\n","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\n\n@Pipe({\n name: 'slice',\n standalone: true,\n})\nexport class SlicePipe implements PipeTransform {\n\n transform<T>(value: readonly T[], start: number, end?: number): T[] {\n return value.slice(start, end);\n }\n\n}\n","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\nimport { ToDisplayFunction } from '@rxap/utilities';\nimport { JsonPipe } from '@angular/common';\n\n@Pipe({\n name: 'toDisplay',\n standalone: true,\n})\nexport class ToDisplayPipe implements PipeTransform {\n\n private jsonPipe = new JsonPipe();\n\n public transform(value: any, toDisplay: ToDisplayFunction = this.jsonPipe.transform): string {\n return toDisplay(value);\n }\n\n}\n\n\n","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\n\n@Pipe({\n name: 'truncate',\n standalone: true,\n})\nexport class TruncatePipe implements PipeTransform {\n\n transform(value?: string | null, length = 64, ellipsis = '...'): string {\n if (!value) {\n return '';\n }\n if (value.length <= length) {\n return value;\n }\n return value.substring(0, length) + ellipsis;\n }\n\n}\n"],"mappings":";;;;AAOA,IAAa,mBAAb,MAAa,iBAAgB;CAJ7B,cAAA;EAKmB,KAAA,WAAW,IAAI,aAAa,OAAO,SAAS,GAAG,OAAO,uBAAuB,EAAE,UAAU,KAAI,CAAE,KAAK,MAAS;CA8C/H;CAVQ,UACL,OACA,cACA,SACA,YACA,QAAe;EAEf,OAAO,KAAK,SAAS,UAAU,QAAQ,KAAK,cAAc,SAAS,YAAY,MAAM;CACvF;CA7CW;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAgB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAhB;EAAA,KAAA,QAAA,GAAA,gBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAA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MAAM,IAAI;CACtC;CAVW;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAY,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAZ;EAAA,KAAA,QAAA,GAAA,gBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAY,cAAA;GAAA,MAAA;EAAA,CAAA;CAAA;;AAAZ,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAY,YAAA,CAAA;EAJxB,MAAA;EAAK,MAAA,CAAA;GACJ,MAAM;GACN,YAAY;EACb,CAAA"}
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
- "version": "21.0.1",
2
+ "version": "22.0.0-dev.0",
3
3
  "name": "@rxap/pipes",
4
4
  "description": "Provides a set of Angular pipes for common data transformations, including currency formatting, string manipulation, and object property access. These pipes offer standalone functionality for easy integration into Angular templates. The package includes pipes for escaping quotation marks, joining arrays, limiting array length, replacing substrings, slicing arrays, truncating strings, and deleting identifier properties from objects.\n",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "dependencies": {
7
- "@nx/devkit": "22.7.5",
7
+ "@nx/devkit": "24.0.6",
8
8
  "tslib": "2.6.2"
9
9
  },
10
10
  "peerDependencies": {
11
- "@angular/common": "^21.2.9",
12
- "@angular/core": "^21.2.9",
13
- "@angular/platform-browser": "^21.2.9",
11
+ "@angular/common": "^22.3.0",
12
+ "@angular/core": "^22.3.0",
13
+ "@angular/platform-browser": "^22.3.0",
14
14
  "@rxap/utilities": "^16.5.2"
15
15
  },
16
16
  "author": {
@@ -36,19 +36,19 @@
36
36
  "packageGroup": [
37
37
  {
38
38
  "package": "@angular/animations",
39
- "version": "21.2.9"
39
+ "version": "22.3.0"
40
40
  },
41
41
  {
42
42
  "package": "@angular/common",
43
- "version": "21.2.9"
43
+ "version": "22.3.0"
44
44
  },
45
45
  {
46
46
  "package": "@angular/core",
47
- "version": "21.2.9"
47
+ "version": "22.3.0"
48
48
  },
49
49
  {
50
50
  "package": "@angular/platform-browser",
51
- "version": "21.2.9"
51
+ "version": "22.3.0"
52
52
  },
53
53
  {
54
54
  "package": "@rxap/utilities",
@@ -1,19 +1,18 @@
1
- import * as i0 from '@angular/core';
2
- import { PipeTransform } from '@angular/core';
3
- import { SafeValue } from '@angular/platform-browser';
4
-
5
- declare class SantizationPipe implements PipeTransform {
6
- private readonly santizationService;
7
- transform(value: string | null, type?: 'html' | 'style' | 'script' | 'url' | 'resourceUrl'): SafeValue | null;
8
- static ɵfac: i0.ɵɵFactoryDeclaration<SantizationPipe, never>;
9
- static ɵpipe: i0.ɵɵPipeDeclaration<SantizationPipe, "santization", true>;
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ import * as i0 from "@angular/core";
5
+ import { PipeTransform } from "@angular/core";
6
+ import { SafeValue } from "@angular/platform-browser";
7
+ export declare class SantizationPipe implements PipeTransform {
8
+ private readonly santizationService;
9
+ transform(value: string | null, type?: 'html' | 'style' | 'script' | 'url' | 'resourceUrl'): SafeValue | null;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<SantizationPipe, never>;
11
+ static ɵpipe: i0.ɵɵPipeDeclaration<SantizationPipe, "santization", true>;
10
12
  }
11
-
12
- declare class SantizationService {
13
- private _sanitizer;
14
- transform(value: string | null, type?: 'html' | 'style' | 'script' | 'url' | 'resourceUrl'): SafeValue | null;
15
- static ɵfac: i0.ɵɵFactoryDeclaration<SantizationService, never>;
16
- static ɵprov: i0.ɵɵInjectableDeclaration<SantizationService>;
17
- }
18
-
19
- export { SantizationPipe, SantizationService };
13
+ export declare class SantizationService {
14
+ private _sanitizer;
15
+ transform(value: string | null, type?: 'html' | 'style' | 'script' | 'url' | 'resourceUrl'): SafeValue | null;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<SantizationService, never>;
17
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
18
+ }
@@ -1,100 +1,91 @@
1
- import * as i0 from '@angular/core';
2
- import { PipeTransform } from '@angular/core';
3
- import { WithIdentifier, ToDisplayFunction } from '@rxap/utilities';
4
-
5
- declare class RxapCurrencyPipe implements PipeTransform {
6
- private readonly currency;
7
- /**
8
- *
9
- * @param value The number to be formatted as currency.
10
- * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code,
11
- * such as `USD` for the US dollar and `EUR` for the euro. The default currency code can be
12
- * configured using the `DEFAULT_CURRENCY_CODE` injection token.
13
- * @param display The format for the currency indicator. One of the following:
14
- * - `code`: Show the code (such as `USD`).
15
- * - `symbol`(default): Show the symbol (such as `$`).
16
- * - `symbol-narrow`: Use the narrow symbol for locales that have two symbols for their
17
- * currency.
18
- * For example, the Canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`. If the
19
- * locale has no narrow symbol, uses the standard symbol for the locale.
20
- * - String: Use the given string value instead of a code or a symbol.
21
- * For example, an empty string will suppress the currency & symbol.
22
- * - Boolean (marked deprecated in v5): `true` for symbol and false for `code`.
23
- *
24
- * @param digitsInfo Decimal representation options, specified by a string
25
- * in the following format:<br>
26
- * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.
27
- * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.
28
- * Default is `1`.
29
- * - `minFractionDigits`: The minimum number of digits after the decimal point.
30
- * Default is `2`.
31
- * - `maxFractionDigits`: The maximum number of digits after the decimal point.
32
- * Default is `2`.
33
- * If not provided, the number will be formatted with the proper amount of digits,
34
- * depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies.
35
- * For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none.
36
- * @param locale A locale code for the locale format rules to use.
37
- * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.
38
- * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).
39
- */
40
- transform(value: number, currencyCode?: string, display?: 'code' | 'symbol' | 'symbol-narrow' | string | boolean, digitsInfo?: string, locale?: string): string | null;
41
- static ɵfac: i0.ɵɵFactoryDeclaration<RxapCurrencyPipe, never>;
42
- static ɵpipe: i0.ɵɵPipeDeclaration<RxapCurrencyPipe, "currency", true>;
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ import * as i0 from "@angular/core";
5
+ import { PipeTransform } from "@angular/core";
6
+ import { ToDisplayFunction, WithIdentifier } from "@rxap/utilities";
7
+ export declare class RxapCurrencyPipe implements PipeTransform {
8
+ private readonly currency;
9
+ /**
10
+ *
11
+ * @param value The number to be formatted as currency.
12
+ * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code,
13
+ * such as `USD` for the US dollar and `EUR` for the euro. The default currency code can be
14
+ * configured using the `DEFAULT_CURRENCY_CODE` injection token.
15
+ * @param display The format for the currency indicator. One of the following:
16
+ * - `code`: Show the code (such as `USD`).
17
+ * - `symbol`(default): Show the symbol (such as `$`).
18
+ * - `symbol-narrow`: Use the narrow symbol for locales that have two symbols for their
19
+ * currency.
20
+ * For example, the Canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`. If the
21
+ * locale has no narrow symbol, uses the standard symbol for the locale.
22
+ * - String: Use the given string value instead of a code or a symbol.
23
+ * For example, an empty string will suppress the currency & symbol.
24
+ * - Boolean (marked deprecated in v5): `true` for symbol and false for `code`.
25
+ *
26
+ * @param digitsInfo Decimal representation options, specified by a string
27
+ * in the following format:<br>
28
+ * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.
29
+ * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.
30
+ * Default is `1`.
31
+ * - `minFractionDigits`: The minimum number of digits after the decimal point.
32
+ * Default is `2`.
33
+ * - `maxFractionDigits`: The maximum number of digits after the decimal point.
34
+ * Default is `2`.
35
+ * If not provided, the number will be formatted with the proper amount of digits,
36
+ * depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies.
37
+ * For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none.
38
+ * @param locale A locale code for the locale format rules to use.
39
+ * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.
40
+ * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).
41
+ */
42
+ transform(value: number, currencyCode?: string, display?: 'code' | 'symbol' | 'symbol-narrow' | string | boolean, digitsInfo?: string, locale?: string): string | null;
43
+ static ɵfac: i0.ɵɵFactoryDeclaration<RxapCurrencyPipe, never>;
44
+ static ɵpipe: i0.ɵɵPipeDeclaration<RxapCurrencyPipe, "currency", true>;
43
45
  }
44
-
45
- declare class DeleteIdentifierPipe implements PipeTransform {
46
- transform<T>(value: (WithIdentifier & T) | null): T | null;
47
- static ɵfac: i0.ɵɵFactoryDeclaration<DeleteIdentifierPipe, never>;
48
- static ɵpipe: i0.ɵɵPipeDeclaration<DeleteIdentifierPipe, "deleteIdentifier", true>;
46
+ export declare class DeleteIdentifierPipe implements PipeTransform {
47
+ transform<T>(value: (WithIdentifier & T) | null): T | null;
48
+ static ɵfac: i0.ɵɵFactoryDeclaration<DeleteIdentifierPipe, never>;
49
+ static ɵpipe: i0.ɵɵPipeDeclaration<DeleteIdentifierPipe, "deleteIdentifier", true>;
49
50
  }
50
-
51
- declare class EscapeQuotationMarkPipe implements PipeTransform {
52
- transform(value: string, reverse?: boolean): string;
53
- static ɵfac: i0.ɵɵFactoryDeclaration<EscapeQuotationMarkPipe, never>;
54
- static ɵpipe: i0.ɵɵPipeDeclaration<EscapeQuotationMarkPipe, "escapeQuotationMark", true>;
51
+ export declare class EscapeQuotationMarkPipe implements PipeTransform {
52
+ transform(value: string, reverse?: boolean): string;
53
+ static ɵfac: i0.ɵɵFactoryDeclaration<EscapeQuotationMarkPipe, never>;
54
+ static ɵpipe: i0.ɵɵPipeDeclaration<EscapeQuotationMarkPipe, "escapeQuotationMark", true>;
55
55
  }
56
-
57
- declare class GetFromObjectPipe implements PipeTransform {
58
- transform(value: any, path: string): any;
59
- static ɵfac: i0.ɵɵFactoryDeclaration<GetFromObjectPipe, never>;
60
- static ɵpipe: i0.ɵɵPipeDeclaration<GetFromObjectPipe, "getFromObject", true>;
56
+ export declare class GetFromObjectPipe implements PipeTransform {
57
+ transform(value: any, path: string): any;
58
+ static ɵfac: i0.ɵɵFactoryDeclaration<GetFromObjectPipe, never>;
59
+ static ɵpipe: i0.ɵɵPipeDeclaration<GetFromObjectPipe, "getFromObject", true>;
61
60
  }
62
-
63
- declare class JoinPipe implements PipeTransform {
64
- transform(list: any[], separator?: string): string;
65
- static ɵfac: i0.ɵɵFactoryDeclaration<JoinPipe, never>;
66
- static ɵpipe: i0.ɵɵPipeDeclaration<JoinPipe, "join", true>;
61
+ export declare class JoinPipe implements PipeTransform {
62
+ transform(list: any[], separator?: string): string;
63
+ static ɵfac: i0.ɵɵFactoryDeclaration<JoinPipe, never>;
64
+ static ɵpipe: i0.ɵɵPipeDeclaration<JoinPipe, "join", true>;
67
65
  }
68
-
69
- declare class LimitPipe implements PipeTransform {
70
- transform<T>(value: readonly T[], limit: number): T[];
71
- static ɵfac: i0.ɵɵFactoryDeclaration<LimitPipe, never>;
72
- static ɵpipe: i0.ɵɵPipeDeclaration<LimitPipe, "limit", true>;
66
+ export declare class LimitPipe implements PipeTransform {
67
+ transform<T>(value: readonly T[], limit: number): T[];
68
+ static ɵfac: i0.ɵɵFactoryDeclaration<LimitPipe, never>;
69
+ static ɵpipe: i0.ɵɵPipeDeclaration<LimitPipe, "limit", true>;
73
70
  }
74
-
75
- declare class ReplacePipe implements PipeTransform {
76
- transform(value: string, replace: RegExp, replaceValue: string): string;
77
- static ɵfac: i0.ɵɵFactoryDeclaration<ReplacePipe, never>;
78
- static ɵpipe: i0.ɵɵPipeDeclaration<ReplacePipe, "replace", true>;
71
+ export declare class ReplacePipe implements PipeTransform {
72
+ transform(value: string, replace: RegExp, replaceValue: string): string;
73
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReplacePipe, never>;
74
+ static ɵpipe: i0.ɵɵPipeDeclaration<ReplacePipe, "replace", true>;
79
75
  }
80
-
81
- declare class SlicePipe implements PipeTransform {
82
- transform<T>(value: readonly T[], start: number, end?: number): T[];
83
- static ɵfac: i0.ɵɵFactoryDeclaration<SlicePipe, never>;
84
- static ɵpipe: i0.ɵɵPipeDeclaration<SlicePipe, "slice", true>;
76
+ export declare class SlicePipe implements PipeTransform {
77
+ transform<T>(value: readonly T[], start: number, end?: number): T[];
78
+ static ɵfac: i0.ɵɵFactoryDeclaration<SlicePipe, never>;
79
+ static ɵpipe: i0.ɵɵPipeDeclaration<SlicePipe, "slice", true>;
85
80
  }
86
-
87
- declare class ToDisplayPipe implements PipeTransform {
88
- private jsonPipe;
89
- transform(value: any, toDisplay?: ToDisplayFunction): string;
90
- static ɵfac: i0.ɵɵFactoryDeclaration<ToDisplayPipe, never>;
91
- static ɵpipe: i0.ɵɵPipeDeclaration<ToDisplayPipe, "toDisplay", true>;
81
+ export declare class ToDisplayPipe implements PipeTransform {
82
+ private jsonPipe;
83
+ transform(value: any, toDisplay?: ToDisplayFunction): string;
84
+ static ɵfac: i0.ɵɵFactoryDeclaration<ToDisplayPipe, never>;
85
+ static ɵpipe: i0.ɵɵPipeDeclaration<ToDisplayPipe, "toDisplay", true>;
92
86
  }
93
-
94
- declare class TruncatePipe implements PipeTransform {
95
- transform(value?: string | null, length?: number, ellipsis?: string): string;
96
- static ɵfac: i0.ɵɵFactoryDeclaration<TruncatePipe, never>;
97
- static ɵpipe: i0.ɵɵPipeDeclaration<TruncatePipe, "truncate", true>;
98
- }
99
-
100
- export { DeleteIdentifierPipe, EscapeQuotationMarkPipe, GetFromObjectPipe, JoinPipe, LimitPipe, ReplacePipe, RxapCurrencyPipe, SlicePipe, ToDisplayPipe, TruncatePipe };
87
+ export declare class TruncatePipe implements PipeTransform {
88
+ transform(value?: string | null, length?: number, ellipsis?: string): string;
89
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruncatePipe, never>;
90
+ static ɵpipe: i0.ɵɵPipeDeclaration<TruncatePipe, "truncate", true>;
91
+ }