@taiga-ui/kit 4.7.0 → 4.8.1-canary.d818d28

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 (70) hide show
  1. package/components/badged-content/badged-content.directive.d.ts +2 -1
  2. package/components/files/file/file.options.d.ts +1 -1
  3. package/components/index.d.ts +1 -0
  4. package/components/like/index.d.ts +2 -0
  5. package/components/like/like.component.d.ts +16 -0
  6. package/components/like/like.options.d.ts +11 -0
  7. package/components/line-clamp/line-clamp.component.d.ts +4 -4
  8. package/directives/copy/copy.directive.d.ts +1 -1
  9. package/directives/copy/copy.options.d.ts +1 -1
  10. package/directives/highlight/highlight.directive.d.ts +5 -0
  11. package/directives/lazy-loading/lazy-loading.directive.d.ts +8 -9
  12. package/directives/password/index.d.ts +1 -0
  13. package/directives/password/password.options.d.ts +1 -1
  14. package/esm2022/components/avatar/avatar.component.mjs +5 -4
  15. package/esm2022/components/badged-content/badged-content.directive.mjs +1 -1
  16. package/esm2022/components/calendar-month/calendar-month.component.mjs +3 -3
  17. package/esm2022/components/calendar-range/calendar-range.component.mjs +4 -2
  18. package/esm2022/components/data-list-wrapper/data-list-group-wrapper.component.mjs +3 -3
  19. package/esm2022/components/data-list-wrapper/data-list-wrapper.component.mjs +3 -3
  20. package/esm2022/components/files/file/file.options.mjs +3 -3
  21. package/esm2022/components/files/input-files/input-files.directive.mjs +3 -3
  22. package/esm2022/components/index.mjs +2 -1
  23. package/esm2022/components/input-phone-international/input-phone-international.component.mjs +3 -3
  24. package/esm2022/components/like/index.mjs +3 -0
  25. package/esm2022/components/like/like.component.mjs +46 -0
  26. package/esm2022/components/like/like.options.mjs +10 -0
  27. package/esm2022/components/like/taiga-ui-kit-components-like.mjs +5 -0
  28. package/esm2022/components/line-clamp/line-clamp.component.mjs +21 -21
  29. package/esm2022/components/routable-dialog/routable-dialog.component.mjs +1 -1
  30. package/esm2022/directives/chevron/chevron.directive.mjs +2 -2
  31. package/esm2022/directives/copy/copy.directive.mjs +3 -3
  32. package/esm2022/directives/highlight/highlight.directive.mjs +6 -2
  33. package/esm2022/directives/lazy-loading/lazy-loading.directive.mjs +27 -28
  34. package/esm2022/directives/password/index.mjs +2 -1
  35. package/esm2022/directives/password/password.directive.mjs +2 -2
  36. package/esm2022/pipes/filter-by-input/filter-by-input.pipe.mjs +2 -2
  37. package/fesm2022/taiga-ui-kit-components-avatar.mjs +4 -3
  38. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  39. package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
  40. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +2 -2
  41. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  42. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +3 -1
  43. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
  44. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +4 -4
  45. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
  46. package/fesm2022/taiga-ui-kit-components-files.mjs +6 -5
  47. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  48. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +2 -2
  49. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
  50. package/fesm2022/taiga-ui-kit-components-like.mjs +61 -0
  51. package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -0
  52. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +23 -22
  53. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
  54. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
  55. package/fesm2022/taiga-ui-kit-components.mjs +1 -0
  56. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  57. package/fesm2022/taiga-ui-kit-directives-chevron.mjs +2 -2
  58. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  59. package/fesm2022/taiga-ui-kit-directives-copy.mjs +2 -2
  60. package/fesm2022/taiga-ui-kit-directives-copy.mjs.map +1 -1
  61. package/fesm2022/taiga-ui-kit-directives-highlight.mjs +6 -2
  62. package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
  63. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +26 -27
  64. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +1 -1
  65. package/fesm2022/taiga-ui-kit-directives-password.mjs +2 -2
  66. package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
  67. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +1 -1
  68. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
  69. package/package.json +523 -517
  70. package/styles/components/like.less +69 -0
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-pipes-filter-by-input.mjs","sources":["../../../projects/kit/pipes/filter-by-input/filter-by-input.pipe.ts","../../../projects/kit/pipes/filter-by-input/taiga-ui-kit-pipes-filter-by-input.ts"],"sourcesContent":["import type {PipeTransform} from '@angular/core';\nimport {inject, Pipe} from '@angular/core';\nimport {TUI_DEFAULT_MATCHER} from '@taiga-ui/cdk/constants';\nimport type {TuiStringHandler, TuiStringMatcher} from '@taiga-ui/cdk/types';\nimport {tuiIsPresent, tuiPure} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_DATA_LIST_HOST} from '@taiga-ui/core/components/data-list';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {tuiIsFlat} from '@taiga-ui/kit/utils';\n\n// TODO: Consider replacing TuiTextfieldComponent with proper token once we refactor textfields\n@Pipe({\n standalone: true,\n name: 'tuiFilterByInput',\n pure: false,\n})\nexport class TuiFilterByInputPipe implements PipeTransform {\n // TODO: Remove optional after legacy controls are dropped\n private readonly textfield = inject(TuiTextfieldComponent, {optional: true});\n private readonly host = inject(TUI_DATA_LIST_HOST);\n\n public transform<T>(items: readonly T[], matcher?: TuiStringMatcher<T>): readonly T[];\n public transform<T>(\n items: ReadonlyArray<readonly T[]> | readonly T[] | null,\n matcher: TuiStringMatcher<T> = TUI_DEFAULT_MATCHER,\n ): ReadonlyArray<readonly T[]> | readonly T[] | null {\n return this.filter<T>(\n items,\n matcher,\n this.host.stringify || String,\n this.textfield?.el?.nativeElement.value ||\n (this.host as any).nativeFocusableElement?.value ||\n '',\n );\n }\n\n @tuiPure\n private filter<T>(\n items: ReadonlyArray<readonly T[]> | readonly T[] | null,\n matcher: TuiStringMatcher<T>,\n stringify: TuiStringHandler<T>,\n query: string,\n ): ReadonlyArray<readonly T[]> | readonly T[] | null {\n if (!items) {\n return null;\n }\n\n return tuiIsFlat(items)\n ? this.filterFlat(items, matcher, stringify, query)\n : this.filter2d(items, matcher, stringify, query);\n }\n\n private filterFlat<T>(\n items: readonly T[],\n matcher: TuiStringMatcher<T>,\n stringify: TuiStringHandler<T>,\n query: string,\n ): readonly T[] {\n const match = this.getMatch(items, stringify, query);\n\n return tuiIsPresent(match)\n ? items\n : items.filter((item) => matcher(item, query, stringify));\n }\n\n private filter2d<T>(\n items: ReadonlyArray<readonly T[]>,\n matcher: TuiStringMatcher<T>,\n stringify: TuiStringHandler<T>,\n query: string,\n ): ReadonlyArray<readonly T[]> {\n const match = items.find((item) =>\n tuiIsPresent(this.getMatch(item, stringify, query)),\n );\n\n return tuiIsPresent(match)\n ? items\n : items.map((inner) => this.filterFlat(inner, matcher, stringify, query));\n }\n\n private getMatch<T>(\n items: readonly T[],\n stringify: TuiStringHandler<T>,\n query: string,\n ): T | undefined {\n return items.find(\n (item) => stringify(item).toLocaleLowerCase() === query.toLocaleLowerCase(),\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AASA;AACA,MAKa,oBAAoB,CAAA;AALjC,IAAA,WAAA,GAAA;;QAOqB,IAAS,CAAA,SAAA,GAAG,MAAM,CAAC,qBAA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/kit/pipes/filter-by-input/filter-by-input.pipe.ts","../../../projects/kit/pipes/filter-by-input/taiga-ui-kit-pipes-filter-by-input.ts"],"sourcesContent":["import type {PipeTransform} from '@angular/core';\nimport {inject, Pipe} from '@angular/core';\nimport {TUI_DEFAULT_MATCHER} from '@taiga-ui/cdk/constants';\nimport type {TuiStringHandler, TuiStringMatcher} from '@taiga-ui/cdk/types';\nimport {tuiIsPresent, tuiPure} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_DATA_LIST_HOST} from '@taiga-ui/core/components/data-list';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {tuiIsFlat} from '@taiga-ui/kit/utils';\n\n// TODO: Consider replacing TuiTextfieldComponent with proper token once we refactor textfields\n@Pipe({\n standalone: true,\n name: 'tuiFilterByInput',\n pure: false,\n})\nexport class TuiFilterByInputPipe implements PipeTransform {\n // TODO: Remove optional after legacy controls are dropped\n private readonly textfield = inject(TuiTextfieldComponent, {optional: true});\n private readonly host = inject(TUI_DATA_LIST_HOST);\n\n public transform<T>(items: readonly T[], matcher?: TuiStringMatcher<T>): readonly T[];\n public transform<T>(\n items: ReadonlyArray<readonly T[]> | readonly T[] | null,\n matcher: TuiStringMatcher<T> = TUI_DEFAULT_MATCHER,\n ): ReadonlyArray<readonly T[]> | readonly T[] | null {\n return this.filter<T>(\n items,\n matcher,\n this.host.stringify || String,\n this.textfield?.input?.nativeElement.value ||\n (this.host as any).nativeFocusableElement?.value ||\n '',\n );\n }\n\n @tuiPure\n private filter<T>(\n items: ReadonlyArray<readonly T[]> | readonly T[] | null,\n matcher: TuiStringMatcher<T>,\n stringify: TuiStringHandler<T>,\n query: string,\n ): ReadonlyArray<readonly T[]> | readonly T[] | null {\n if (!items) {\n return null;\n }\n\n return tuiIsFlat(items)\n ? this.filterFlat(items, matcher, stringify, query)\n : this.filter2d(items, matcher, stringify, query);\n }\n\n private filterFlat<T>(\n items: readonly T[],\n matcher: TuiStringMatcher<T>,\n stringify: TuiStringHandler<T>,\n query: string,\n ): readonly T[] {\n const match = this.getMatch(items, stringify, query);\n\n return tuiIsPresent(match)\n ? items\n : items.filter((item) => matcher(item, query, stringify));\n }\n\n private filter2d<T>(\n items: ReadonlyArray<readonly T[]>,\n matcher: TuiStringMatcher<T>,\n stringify: TuiStringHandler<T>,\n query: string,\n ): ReadonlyArray<readonly T[]> {\n const match = items.find((item) =>\n tuiIsPresent(this.getMatch(item, stringify, query)),\n );\n\n return tuiIsPresent(match)\n ? items\n : items.map((inner) => this.filterFlat(inner, matcher, stringify, query));\n }\n\n private getMatch<T>(\n items: readonly T[],\n stringify: TuiStringHandler<T>,\n query: string,\n ): T | undefined {\n return items.find(\n (item) => stringify(item).toLocaleLowerCase() === query.toLocaleLowerCase(),\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AASA;AACA,MAKa,oBAAoB,CAAA;AALjC,IAAA,WAAA,GAAA;;QAOqB,IAAS,CAAA,SAAA,GAAG,MAAM,CAAC,qBAAqB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC;AAC5D,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;AAsEtD,KAAA;AAnEU,IAAA,SAAS,CACZ,KAAwD,EACxD,OAAA,GAA+B,mBAAmB,EAAA;QAElD,OAAO,IAAI,CAAC,MAAM,CACd,KAAK,EACL,OAAO,EACP,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,MAAM,EAC7B,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,aAAa,CAAC,KAAK;AACrC,YAAA,IAAI,CAAC,IAAY,CAAC,sBAAsB,EAAE,KAAK;AAChD,YAAA,EAAE,CACT,CAAC;KACL;AAGO,IAAA,MAAM,CACV,KAAwD,EACxD,OAA4B,EAC5B,SAA8B,EAC9B,KAAa,EAAA;QAEb,IAAI,CAAC,KAAK,EAAE;AACR,YAAA,O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