@taiga-ui/cdk 3.15.0 → 3.16.0-dev.main-e7166ca

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 (107) hide show
  1. package/bundles/taiga-ui-cdk-constants.umd.js +3 -1
  2. package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
  3. package/bundles/taiga-ui-cdk-directives-droppable.umd.js +1 -1
  4. package/bundles/taiga-ui-cdk-directives-droppable.umd.js.map +1 -1
  5. package/bundles/taiga-ui-cdk-directives-hovered.umd.js +6 -6
  6. package/bundles/taiga-ui-cdk-directives-hovered.umd.js.map +1 -1
  7. package/bundles/taiga-ui-cdk-observables.umd.js +21 -12
  8. package/bundles/taiga-ui-cdk-observables.umd.js.map +1 -1
  9. package/bundles/taiga-ui-cdk-services.umd.js +3 -3
  10. package/bundles/taiga-ui-cdk-services.umd.js.map +1 -1
  11. package/bundles/taiga-ui-cdk-tokens.umd.js +23 -12
  12. package/bundles/taiga-ui-cdk-tokens.umd.js.map +1 -1
  13. package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js +8 -0
  14. package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js.map +1 -1
  15. package/bundles/taiga-ui-cdk-utils-svg.umd.js +5 -5
  16. package/bundles/taiga-ui-cdk-utils-svg.umd.js.map +1 -1
  17. package/constants/always-false-handler.js +9 -0
  18. package/constants/always-true-handler.js +9 -0
  19. package/constants/browser.js +8 -0
  20. package/constants/empty.js +26 -0
  21. package/constants/index.js +14 -0
  22. package/constants/matcher.js +32 -0
  23. package/constants/parent-animation.js +10 -0
  24. package/constants/polling-time.js +4 -0
  25. package/constants/stringify.js +8 -0
  26. package/constants/svg-node-filter.js +8 -0
  27. package/constants/unicode-chars.js +66 -0
  28. package/constants/version.d.ts +1 -1
  29. package/constants/version.js +1 -1
  30. package/esm2015/constants/always-false-handler.js +2 -1
  31. package/esm2015/constants/always-true-handler.js +2 -1
  32. package/esm2015/constants/version.js +2 -2
  33. package/esm2015/directives/droppable/droppable.directive.js +3 -3
  34. package/esm2015/directives/hovered/hovered.service.js +5 -4
  35. package/esm2015/observables/focus-visible-observable.js +4 -3
  36. package/esm2015/observables/is-alive.js +4 -3
  37. package/esm2015/observables/is-observed.js +5 -5
  38. package/esm2015/observables/items-query-list-observable.js +6 -2
  39. package/esm2015/observables/pressed-observable.js +4 -3
  40. package/esm2015/observables/typed-from-event.js +5 -1
  41. package/esm2015/services/pan.service.js +3 -3
  42. package/esm2015/services/parents-scroll.service.js +1 -1
  43. package/esm2015/services/resize.service.js +3 -3
  44. package/esm2015/tokens/active-element.js +19 -6
  45. package/esm2015/tokens/removed-element.js +5 -5
  46. package/esm2015/tokens/take-only-trusted-events.js +3 -4
  47. package/esm2015/utils/miscellaneous/index.js +2 -1
  48. package/esm2015/utils/miscellaneous/is-number.js +2 -1
  49. package/esm2015/utils/miscellaneous/is-object.js +5 -0
  50. package/esm2015/utils/miscellaneous/is-string.js +2 -1
  51. package/esm2015/utils/svg/svg-linear-gradient-processor.js +3 -2
  52. package/fesm2015/taiga-ui-cdk-constants.js +3 -1
  53. package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
  54. package/fesm2015/taiga-ui-cdk-directives-droppable.js +2 -2
  55. package/fesm2015/taiga-ui-cdk-directives-droppable.js.map +1 -1
  56. package/fesm2015/taiga-ui-cdk-directives-hovered.js +4 -3
  57. package/fesm2015/taiga-ui-cdk-directives-hovered.js.map +1 -1
  58. package/fesm2015/taiga-ui-cdk-observables.js +19 -10
  59. package/fesm2015/taiga-ui-cdk-observables.js.map +1 -1
  60. package/fesm2015/taiga-ui-cdk-services.js +3 -3
  61. package/fesm2015/taiga-ui-cdk-services.js.map +1 -1
  62. package/fesm2015/taiga-ui-cdk-tokens.js +21 -9
  63. package/fesm2015/taiga-ui-cdk-tokens.js.map +1 -1
  64. package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js +8 -1
  65. package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js.map +1 -1
  66. package/fesm2015/taiga-ui-cdk-utils-svg.js +3 -1
  67. package/fesm2015/taiga-ui-cdk-utils-svg.js.map +1 -1
  68. package/interfaces/alert-context.js +2 -0
  69. package/interfaces/aria-dialog-context.js +2 -0
  70. package/interfaces/base-dialog-context.js +2 -0
  71. package/interfaces/base-dialog.js +2 -0
  72. package/interfaces/context-with-implicit.js +2 -0
  73. package/interfaces/control-value-transformer.js +2 -0
  74. package/interfaces/day-like.js +2 -0
  75. package/interfaces/focusable-element-accessor.js +2 -0
  76. package/interfaces/index.js +16 -0
  77. package/interfaces/month-like.js +2 -0
  78. package/interfaces/swipe.js +2 -0
  79. package/interfaces/time-like.js +2 -0
  80. package/interfaces/year-like.js +2 -0
  81. package/interfaces/zoom.js +2 -0
  82. package/observables/is-observed.d.ts +0 -3
  83. package/observables/items-query-list-observable.d.ts +5 -1
  84. package/package.json +2 -2
  85. package/schematics/ng-update/v3/constants/deprecated-functions.js +1 -1
  86. package/schematics/ng-update/v3/constants/types.js +1 -0
  87. package/schematics/ng-update/v3/steps/migrate-taiga-proprietary-icons.js +2 -1
  88. package/schematics/ng-update/v3/steps/replace-styles.js +5 -2
  89. package/schematics/utils/angular-json-manipulations.js +5 -3
  90. package/schematics/utils/templates/elements.js +3 -3
  91. package/schematics/utils/templates/ng-component-input-manipulations.js +2 -1
  92. package/types/autocomplete.js +2 -0
  93. package/types/date-mode.js +2 -0
  94. package/types/dialog.js +2 -0
  95. package/types/event-with.js +2 -0
  96. package/types/handler.js +2 -0
  97. package/types/index.js +15 -0
  98. package/types/injection-token-type.js +2 -0
  99. package/types/input-mode.js +2 -0
  100. package/types/input-type.js +2 -0
  101. package/types/mapper.js +2 -0
  102. package/types/matcher.js +2 -0
  103. package/types/overscroll-mode.js +2 -0
  104. package/types/time-mode.js +2 -0
  105. package/utils/miscellaneous/index.d.ts +1 -0
  106. package/utils/miscellaneous/is-object.d.ts +1 -0
  107. package/utils/miscellaneous/is-string.js +8 -0
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-utils-miscellaneous.js","sources":["../../../projects/cdk/utils/miscellaneous/array-remove.ts","../../../projects/cdk/utils/miscellaneous/array-shallow-equals.ts","../../../projects/cdk/utils/miscellaneous/array-toggle.ts","../../../projects/cdk/utils/miscellaneous/distance-between-touches.ts","../../../projects/cdk/utils/miscellaneous/ease-in-out-quad.ts","../../../projects/cdk/utils/miscellaneous/flat-length.ts","../../../projects/cdk/utils/miscellaneous/get-original-array-from-query-list.ts","../../../projects/cdk/utils/miscellaneous/get-swipe-direction.ts","../../../projects/cdk/utils/miscellaneous/is-number.ts","../../../projects/cdk/utils/miscellaneous/is-present.ts","../../../projects/cdk/utils/miscellaneous/is-string.ts","../../../projects/cdk/utils/miscellaneous/mark-control-as-touched-and-validate.ts","../../../projects/cdk/utils/miscellaneous/nullable-same.ts","../../../projects/cdk/utils/miscellaneous/uniq-by.ts","../../../projects/cdk/utils/miscellaneous/taiga-ui-cdk-utils-miscellaneous.ts"],"sourcesContent":["export function tuiArrayRemove<T>(array: readonly T[], index: number): T[] {\n return array.slice(0, Math.max(index, 0)).concat(array.slice(Math.max(index + 1, 0)));\n}\n","export function tuiArrayShallowEquals<T>(a: readonly T[], b: readonly T[]): boolean {\n return a.length === b.length && a.every((item, index) => item === b[index]);\n}\n","import {tuiArrayRemove} from './array-remove';\n\nexport function tuiArrayToggle<T>(array: readonly T[], item: T): T[] {\n const index = array.indexOf(item);\n\n return index === -1 ? [...array, item] : tuiArrayRemove(array, index);\n}\n","export function tuiDistanceBetweenTouches({touches}: TouchEvent): number {\n return Math.hypot(\n touches[0].clientX - touches[1].clientX,\n touches[0].clientY - touches[1].clientY,\n );\n}\n","import {tuiAssert} from '@taiga-ui/cdk/classes';\n\nexport function tuiEaseInOutQuad(t: number): number {\n tuiAssert.assert(\n t >= 0 && t <= 1,\n `Input must be between 0 and 1 inclusive but received `,\n t,\n );\n\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n}\n","/**\n * Flattens two-dimensional array and calculates resulting length\n *\n * @param array twi dimensional array\n */\nexport function tuiFlatLength(array: ReadonlyArray<readonly unknown[]>): number {\n return array.reduce((count, section) => count + section.length, 0);\n}\n","import {QueryList} from '@angular/core';\n\n/**\n * Extracts original array from {@link QueryList} rather than\n * creating a copy like {@link QueryList.toArray} does.\n * @param queryList\n * @returns original array from {@link QueryList}.\n */\nexport function tuiGetOriginalArrayFromQueryList<T>(\n queryList: QueryList<T>,\n): readonly T[] {\n let array: readonly T[] = [];\n\n queryList.find((_item, _index, originalArray) => {\n array = originalArray;\n\n return true;\n });\n\n return array;\n}\n","import {TuiSwipeDirection} from '@taiga-ui/cdk/interfaces';\n\nexport function tuiGetSwipeDirection(deltaX: number, deltaY: number): TuiSwipeDirection {\n if (Math.abs(deltaY) > Math.abs(deltaX)) {\n return deltaY > 0 ? `top` : `bottom`;\n }\n\n return deltaX > 0 ? `left` : `right`;\n}\n","export function tuiIsNumber(value: unknown): value is number {\n return typeof value === `number`;\n}\n","export function tuiIsPresent<T>(value?: T | null): value is T {\n return value !== null && value !== undefined;\n}\n","export function tuiIsString(value: unknown): value is string {\n return typeof value === `string`;\n}\n","import {AbstractControl, FormArray, FormGroup} from '@angular/forms';\n\nexport function tuiMarkControlAsTouchedAndValidate(control: AbstractControl): void {\n if (control instanceof FormArray) {\n control.controls.forEach(nestedControl => {\n tuiMarkControlAsTouchedAndValidate(nestedControl);\n });\n }\n\n if (control instanceof FormGroup) {\n Object.values(control.controls).forEach(nestedControl => {\n tuiMarkControlAsTouchedAndValidate(nestedControl);\n });\n }\n\n control.markAsTouched();\n control.updateValueAndValidity();\n}\n","import {TuiIdentityMatcher} from '@taiga-ui/cdk/types';\n\n/**\n * Checks identity for nullable elements.\n *\n * @param a element a\n * @param b element b\n * @param handler called if both elements are not null\n * @return true if either both are null or they pass identity handler\n */\nexport function tuiNullableSame<T>(\n a: T | null,\n b: T | null,\n handler: TuiIdentityMatcher<T>,\n): boolean {\n if (a === null) {\n return b === null;\n }\n\n if (b === null) {\n return false;\n }\n\n return handler(a, b);\n}\n","export function tuiUniqBy<T extends Record<string, any>>(\n array: readonly T[],\n key: keyof T,\n): readonly T[] {\n return Array.from(\n array\n .reduce(\n (map, item) => (map.has(item[key]) ? map : map.set(item[key], item)),\n new Map<T[keyof T], T>(),\n )\n .values(),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAgB,SAAA,cAAc,CAAI,KAAmB,EAAE,KAAa,EAAA;AAChE,IAAA,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1F;;ACFgB,SAAA,qBAAqB,CAAI,CAAe,EAAE,CAAe,EAAA;IACrE,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AAChF;;ACAgB,SAAA,cAAc,CAAI,KAAmB,EAAE,IAAO,EAAA;IAC1D,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAElC,OAAO,KAAK,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC,GAAG,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAC1E;;ACNgB,SAAA,yBAAyB,CAAC,EAAC,OAAO,EAAa,EAAA;AAC3D,IAAA,OAAO,IAAI,CAAC,KAAK,CACb,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,EACvC,O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AM,CACH,CAAC,GAAG,EAAE,IAAI,MAAM,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC,EACpE,IAAI,GAAG,EAAiB,CAC3B;SACA,MAAM,EAAE,CAChB,CAAC;AACN;;ACZA;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-utils-miscellaneous.js","sources":["../../../projects/cdk/utils/miscellaneous/array-remove.ts","../../../projects/cdk/utils/miscellaneous/array-shallow-equals.ts","../../../projects/cdk/utils/miscellaneous/array-toggle.ts","../../../projects/cdk/utils/miscellaneous/distance-between-touches.ts","../../../projects/cdk/utils/miscellaneous/ease-in-out-quad.ts","../../../projects/cdk/utils/miscellaneous/flat-length.ts","../../../projects/cdk/utils/miscellaneous/get-original-array-from-query-list.ts","../../../projects/cdk/utils/miscellaneous/get-swipe-direction.ts","../../../projects/cdk/utils/miscellaneous/is-number.ts","../../../projects/cdk/utils/miscellaneous/is-object.ts","../../../projects/cdk/utils/miscellaneous/is-present.ts","../../../projects/cdk/utils/miscellaneous/is-string.ts","../../../projects/cdk/utils/miscellaneous/mark-control-as-touched-and-validate.ts","../../../projects/cdk/utils/miscellaneous/nullable-same.ts","../../../projects/cdk/utils/miscellaneous/uniq-by.ts","../../../projects/cdk/utils/miscellaneous/taiga-ui-cdk-utils-miscellaneous.ts"],"sourcesContent":["export function tuiArrayRemove<T>(array: readonly T[], index: number): T[] {\n return array.slice(0, Math.max(index, 0)).concat(array.slice(Math.max(index + 1, 0)));\n}\n","export function tuiArrayShallowEquals<T>(a: readonly T[], b: readonly T[]): boolean {\n return a.length === b.length && a.every((item, index) => item === b[index]);\n}\n","import {tuiArrayRemove} from './array-remove';\n\nexport function tuiArrayToggle<T>(array: readonly T[], item: T): T[] {\n const index = array.indexOf(item);\n\n return index === -1 ? [...array, item] : tuiArrayRemove(array, index);\n}\n","export function tuiDistanceBetweenTouches({touches}: TouchEvent): number {\n return Math.hypot(\n touches[0].clientX - touches[1].clientX,\n touches[0].clientY - touches[1].clientY,\n );\n}\n","import {tuiAssert} from '@taiga-ui/cdk/classes';\n\nexport function tuiEaseInOutQuad(t: number): number {\n tuiAssert.assert(\n t >= 0 && t <= 1,\n `Input must be between 0 and 1 inclusive but received `,\n t,\n );\n\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n}\n","/**\n * Flattens two-dimensional array and calculates resulting length\n *\n * @param array twi dimensional array\n */\nexport function tuiFlatLength(array: ReadonlyArray<readonly unknown[]>): number {\n return array.reduce((count, section) => count + section.length, 0);\n}\n","import {QueryList} from '@angular/core';\n\n/**\n * Extracts original array from {@link QueryList} rather than\n * creating a copy like {@link QueryList.toArray} does.\n * @param queryList\n * @returns original array from {@link QueryList}.\n */\nexport function tuiGetOriginalArrayFromQueryList<T>(\n queryList: QueryList<T>,\n): readonly T[] {\n let array: readonly T[] = [];\n\n queryList.find((_item, _index, originalArray) => {\n array = originalArray;\n\n return true;\n });\n\n return array;\n}\n","import {TuiSwipeDirection} from '@taiga-ui/cdk/interfaces';\n\nexport function tuiGetSwipeDirection(deltaX: number, deltaY: number): TuiSwipeDirection {\n if (Math.abs(deltaY) > Math.abs(deltaX)) {\n return deltaY > 0 ? `top` : `bottom`;\n }\n\n return deltaX > 0 ? `left` : `right`;\n}\n","export function tuiIsNumber(value: unknown): value is number {\n // eslint-disable-next-line @taiga-ui/no-typeof\n return typeof value === `number`;\n}\n","export function tuiIsObject<T extends Record<string, any>>(\n value: unknown,\n): value is NonNullable<T> {\n // eslint-disable-next-line @taiga-ui/no-typeof\n return typeof value === `object` && !!value;\n}\n","export function tuiIsPresent<T>(value?: T | null): value is T {\n return value !== null && value !== undefined;\n}\n","export function tuiIsString(value: unknown): value is string {\n // eslint-disable-next-line @taiga-ui/no-typeof\n return typeof value === `string`;\n}\n","import {AbstractControl, FormArray, FormGroup} from '@angular/forms';\n\nexport function tuiMarkControlAsTouchedAndValidate(control: AbstractControl): void {\n if (control instanceof FormArray) {\n control.controls.forEach(nestedControl => {\n tuiMarkControlAsTouchedAndValidate(nestedControl);\n });\n }\n\n if (control instanceof FormGroup) {\n Object.values(control.controls).forEach(nestedControl => {\n tuiMarkControlAsTouchedAndValidate(nestedControl);\n });\n }\n\n control.markAsTouched();\n control.updateValueAndValidity();\n}\n","import {TuiIdentityMatcher} from '@taiga-ui/cdk/types';\n\n/**\n * Checks identity for nullable elements.\n *\n * @param a element a\n * @param b element b\n * @param handler called if both elements are not null\n * @return true if either both are null or they pass identity handler\n */\nexport function tuiNullableSame<T>(\n a: T | null,\n b: T | null,\n handler: TuiIdentityMatcher<T>,\n): boolean {\n if (a === null) {\n return b === null;\n }\n\n if (b === null) {\n return false;\n }\n\n return handler(a, b);\n}\n","export function tuiUniqBy<T extends Record<string, any>>(\n array: readonly T[],\n key: keyof T,\n): readonly T[] {\n return Array.from(\n array\n .reduce(\n (map, item) => (map.has(item[key]) ? map : map.set(item[key], item)),\n new Map<T[keyof T], T>(),\n )\n .values(),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAgB,SAAA,cAAc,CAAI,KAAmB,EAAE,KAAa,EAAA;AAChE,IAAA,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1F;;ACFgB,SAAA,qBAAqB,CAAI,CAAe,EAAE,CAAe,EAAA;IACrE,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,KAAK,CAAC,CA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AC,OAAO,CAAC,aAAa,IAAG;YACpD,kCAAkC,CAAC,aAAa,CAAC,CAAC;AACtD,SAAC,CAAC,CAAC;AACN,KAAA;IAED,OAAO,CAAC,aAAa,EAAE,CAAC;IACxB,OAAO,CAAC,sBAAsB,EAAE,CAAC;AACrC;;ACfA;;;;;;;AAOG;SACa,eAAe,CAC3B,CAAW,EACX,CAAW,EACX,OAA8B,EAAA;IAE9B,IAAI,CAAC,KAAK,IAAI,EAAE;QACZ,OAAO,CAAC,KAAK,IAAI,CAAC;AACrB,KAAA;IAED,IAAI,CAAC,KAAK,IAAI,EAAE;AACZ,QAAA,OAAO,KAAK,CAAC;AAChB,KAAA;AAED,IAAA,OAAO,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACzB;;ACxBgB,SAAA,SAAS,CACrB,KAAmB,EACnB,GAAY,EAAA;AAEZ,IAAA,OAAO,KAAK,CAAC,IAAI,CACb,KAAK;AACA,SAAA,MAAM,CACH,CAAC,GAAG,EAAE,IAAI,MAAM,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC,EACpE,IAAI,GAAG,EAAiB,CAC3B;SACA,MAAM,EAAE,CAChB,CAAC;AACN;;ACZA;;AAEG;;;;"}
@@ -1,3 +1,5 @@
1
+ import { tuiIsString } from '@taiga-ui/cdk/utils/miscellaneous';
2
+
1
3
  /**
2
4
  * @description:
3
5
  * Any ‘linearGradient’ attributes which are defined on the referenced
@@ -13,7 +15,7 @@
13
15
  *
14
16
  */
15
17
  function tuiSvgLinearGradientProcessor(svg, salt) {
16
- if (typeof svg === `string`) {
18
+ if (tuiIsString(svg)) {
17
19
  const uniqueIds = extractLinearGradientIdsFromSvg(svg);
18
20
  return uniqueIds.reduce((processed, previousId) => processed.replace(new RegExp(previousId, `g`), `${previousId}_${salt || makeRandomSalt()}`), svg);
19
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-utils-svg.js","sources":["../../../projects/cdk/utils/svg/svg-linear-gradient-processor.ts","../../../projects/cdk/utils/svg/taiga-ui-cdk-utils-svg.ts"],"sourcesContent":["import {SafeHtml} from '@angular/platform-browser';\n\n/**\n * @description:\n * Any ‘linearGradient’ attributes which are defined on the referenced\n * element which are not defined on this element are inherited by this element.\n * If this element has no defined gradient stops, and the referenced element does\n * (possibly due to its own ‘xlink:href’ attribute), then this element inherits\n * the gradient stop from the referenced element. Inheritance can be indirect\n * to an arbitrary level; thus, if the referenced element inherits attribute\n * or gradient stops due to its own ‘xlink:href’ attribute, then the current\n * element can inherit those attributes or gradient stops.\n *\n * Documentation: https://www.w3.org/TR/SVG11/pservers.html\n *\n */\nexport function tuiSvgLinearGradientProcessor(\n svg: SafeHtml | string,\n salt?: number | string,\n): SafeHtml | string {\n if (typeof svg === `string`) {\n const uniqueIds = extractLinearGradientIdsFromSvg(svg);\n\n return uniqueIds.reduce(\n (processed, previousId) =>\n processed.replace(\n new RegExp(previousId, `g`),\n `${previousId}_${salt || makeRandomSalt()}`,\n ),\n svg,\n );\n }\n\n return svg;\n}\n\nfunction makeRandomSalt(): number {\n return Math.floor(Math.random() * Date.now());\n}\n\nfunction extractLinearGradientIdsFromSvg(svg: string): string[] {\n const matchedIdsWithPrefix = svg.match(/url\\(#(\\w\\w+)/g) || [];\n\n return [...new Set(matchedIdsWithPrefix)].map(\n matched => matched.slice(5), // remove prefix `url(#`\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;AAaG;AACa,SAAA,6BAA6B,CACzC,GAAsB,EACtB,IAAsB,EAAA;AAEtB,IAAA,IAAI,OAAO,GAAG,KAAK,CAAA,MAAA,CAAQ,EAAE;AACzB,QAAA,MAAM,SAAS,GAAG,+BAA+B,CAAC,GAAG,CAAC,CAAC;AAEvD,QAAA,OAAO,SAAS,CAAC,MAAM,CACnB,CAAC,SAAS,EAAE,UAAU,KAClB,SAAS,CAAC,OAAO,CACb,IAAI,MAAM,CAAC,UAAU,EAAE,CAAG,CAAA,CAAA,CAAC,EAC3B,CAAA,EAAG,UAAU,CAAI,CAAA,EAAA,IAAI,IAAI,cAAc,EAAE,CAAE,CAAA,CAC9C,EACL,GAAG,CACN,CAAC;AACL,KAAA;AAED,IAAA,OAAO,GAAG,CAAC;AACf,CAAC;AAED,SAAS,cAAc,GAAA;AACnB,IAAA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,+BAA+B,CAAC,GAAW,EAAA;IAChD,MAAM,oBAAoB,GAAG,GAAG,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;IAE/D,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,oBAAoB,CAAC,CAAC,CAAC,GAAG,CACzC,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAC9B,CAAC;AACN;;AC9CA;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-utils-svg.js","sources":["../../../projects/cdk/utils/svg/svg-linear-gradient-processor.ts","../../../projects/cdk/utils/svg/taiga-ui-cdk-utils-svg.ts"],"sourcesContent":["import {SafeHtml} from '@angular/platform-browser';\nimport {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\n\n/**\n * @description:\n * Any ‘linearGradient’ attributes which are defined on the referenced\n * element which are not defined on this element are inherited by this element.\n * If this element has no defined gradient stops, and the referenced element does\n * (possibly due to its own ‘xlink:href’ attribute), then this element inherits\n * the gradient stop from the referenced element. Inheritance can be indirect\n * to an arbitrary level; thus, if the referenced element inherits attribute\n * or gradient stops due to its own ‘xlink:href’ attribute, then the current\n * element can inherit those attributes or gradient stops.\n *\n * Documentation: https://www.w3.org/TR/SVG11/pservers.html\n *\n */\nexport function tuiSvgLinearGradientProcessor(\n svg: SafeHtml | string,\n salt?: number | string,\n): SafeHtml | string {\n if (tuiIsString(svg)) {\n const uniqueIds = extractLinearGradientIdsFromSvg(svg);\n\n return uniqueIds.reduce(\n (processed, previousId) =>\n processed.replace(\n new RegExp(previousId, `g`),\n `${previousId}_${salt || makeRandomSalt()}`,\n ),\n svg,\n );\n }\n\n return svg;\n}\n\nfunction makeRandomSalt(): number {\n return Math.floor(Math.random() * Date.now());\n}\n\nfunction extractLinearGradientIdsFromSvg(svg: string): string[] {\n const matchedIdsWithPrefix = svg.match(/url\\(#(\\w\\w+)/g) || [];\n\n return [...new Set(matchedIdsWithPrefix)].map(\n matched => matched.slice(5), // remove prefix `url(#`\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAGA;;;;;;;;;;;;;AAaG;AACa,SAAA,6BAA6B,CACzC,GAAsB,EACtB,IAAsB,EAAA;AAEtB,IAAA,IAAI,WAAW,CAAC,GAAG,CAAC,EAAE;AAClB,QAAA,MAAM,SAAS,GAAG,+BAA+B,CAAC,GAAG,CAAC,CAAC;AAEvD,QAAA,OAAO,SAAS,CAAC,MAAM,CACnB,CAAC,SAAS,EAAE,UAAU,KAClB,SAAS,CAAC,OAAO,CACb,IAAI,MAAM,CAAC,UAAU,EAAE,CAAG,CAAA,CAAA,CAAC,EAC3B,CAAA,EAAG,UAAU,CAAI,CAAA,EAAA,IAAI,IAAI,cAAc,EAAE,CAAE,CAAA,CAC9C,EACL,GAAG,CACN,CAAC;AACL,KAAA;AAED,IAAA,OAAO,GAAG,CAAC;AACf,CAAC;AAED,SAAS,cAAc,GAAA;AACnB,IAAA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,+BAA+B,CAAC,GAAW,EAAA;IAChD,MAAM,oBAAoB,GAAG,GAAG,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;IAE/D,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,oBAAoB,CAAC,CAAC,CAAC,GAAG,CACzC,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAC9B,CAAC;AACN;;AC/CA;;AAEG;;;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./alert-context"), exports);
5
+ tslib_1.__exportStar(require("./aria-dialog-context"), exports);
6
+ tslib_1.__exportStar(require("./base-dialog"), exports);
7
+ tslib_1.__exportStar(require("./base-dialog-context"), exports);
8
+ tslib_1.__exportStar(require("./context-with-implicit"), exports);
9
+ tslib_1.__exportStar(require("./control-value-transformer"), exports);
10
+ tslib_1.__exportStar(require("./day-like"), exports);
11
+ tslib_1.__exportStar(require("./focusable-element-accessor"), exports);
12
+ tslib_1.__exportStar(require("./month-like"), exports);
13
+ tslib_1.__exportStar(require("./swipe"), exports);
14
+ tslib_1.__exportStar(require("./time-like"), exports);
15
+ tslib_1.__exportStar(require("./year-like"), exports);
16
+ tslib_1.__exportStar(require("./zoom"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,2 @@
1
1
  import { Subject } from 'rxjs';
2
- /**
3
- * In RxJS 8 `observers` will be removed, this util is for future safety
4
- */
5
2
  export declare function tuiIsObserved<T>(observable: Subject<T>): boolean;
@@ -3,4 +3,8 @@ import { Observable } from 'rxjs';
3
3
  /**
4
4
  * Converts changes observable of a QueryList to an Observable of arrays
5
5
  */
6
- export declare function tuiItemsQueryListObservable<T>(queryList: QueryList<T>): Observable<readonly T[]>;
6
+ export declare function tuiQueryListChanges<T>(queryList: QueryList<T>): Observable<readonly T[]>;
7
+ /**
8
+ * @deprecated An alias, use {@link tuiQueryListChanges} instead
9
+ */
10
+ export declare const tuiItemsQueryListObservable: typeof tuiQueryListChanges;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/cdk",
3
- "version": "3.15.0",
3
+ "version": "3.16.0-dev.main-e7166ca",
4
4
  "description": "Base library for creating Angular components and applications using Taiga UI principles regarding of actual visual appearance",
5
5
  "keywords": [
6
6
  "angular",
@@ -15,7 +15,7 @@
15
15
  "repository": "https://github.com/tinkoff/taiga-ui",
16
16
  "license": "Apache-2.0",
17
17
  "dependencies": {
18
- "@ng-web-apis/common": "2.0.1",
18
+ "@ng-web-apis/common": "2.1.0",
19
19
  "@ng-web-apis/mutation-observer": "2.0.0",
20
20
  "@ng-web-apis/resize-observer": "2.0.0",
21
21
  "@tinkoff/ng-event-plugins": "3.1.0",
@@ -194,7 +194,7 @@ exports.DEPRECATED_FUNCTIONS = [
194
194
  },
195
195
  {
196
196
  from: `itemsQueryListObservable`,
197
- to: `tuiItemsQueryListObservable`,
197
+ to: `tuiQueryListChanges`,
198
198
  moduleSpecifier: [`@taiga-ui/cdk`],
199
199
  },
200
200
  {
@@ -71,6 +71,7 @@ exports.TYPES_TO_RENAME = [
71
71
  },
72
72
  {
73
73
  from: `Country`,
74
+ moduleSpecifier: [`@taiga-ui/kit`],
74
75
  },
75
76
  {
76
77
  from: `NumberFormatSettings`,
@@ -4,6 +4,7 @@ exports.migrateTaigaProprietaryIcons = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const workspace_1 = require("@schematics/angular/utility/workspace");
6
6
  const ng_morph_1 = require("ng-morph");
7
+ const is_string_1 = require("../../../../utils/miscellaneous/is-string");
7
8
  const angular_json_manipulations_1 = require("../../../utils/angular-json-manipulations");
8
9
  const get_project_target_options_1 = require("../../../utils/get-project-target-options");
9
10
  const get_projects_1 = require("../../../utils/get-projects");
@@ -52,7 +53,7 @@ function migrateTaigaProprietaryIcons(options) {
52
53
  const tdsSrc = `@taiga-ui/proprietary-tds-icons/src`;
53
54
  const hasIcons = targetOptions.assets.find(asset => {
54
55
  var _a;
55
- return typeof asset === `string`
56
+ return is_string_1.tuiIsString(asset)
56
57
  ? asset.includes(tdsSrc)
57
58
  : (_a = asset === null || asset === void 0 ? void 0 : asset.input) === null || _a === void 0 ? void 0 : _a.includes(tdsSrc);
58
59
  });
@@ -22,8 +22,11 @@ function replaceStyles() {
22
22
  .replace(`&[data-state='hovered']`, `&[data-state='hover']`)
23
23
  .replace(`&[data-state='pressed']`, `&[data-state='active']`)
24
24
  .replace(`tui-portal-host`, `tui-dropdown-host`)
25
- .replace(`tui-dropdown-box`, `tui-dropdown`);
26
- sourceFile.replaceWithText(fullText.replace(`@import '~@taiga-ui/core/styles/taiga-ui-global';`, `${exports.TUI_WARNING_NORMALIZE}\n@import '~@taiga-ui/styles/taiga-ui-global';`));
25
+ .replace(`tui-dropdown-box`, `tui-dropdown`)
26
+ .replace(`@import '~@taiga-ui/core/styles/taiga-ui-global';`, `${exports.TUI_WARNING_NORMALIZE}\n@import '@taiga-ui/styles/taiga-ui-global.less';`)
27
+ .replace(/@import '~@taiga-ui/g, `@import '@taiga-ui`)
28
+ .replace(/@import '@taiga-ui\/.+(.less)?';/g, val => `${val.replace(`';`, ``)}.less';`.replace(`.less.less`, `.less`));
29
+ sourceFile.replaceWithText(fullText);
27
30
  });
28
31
  }
29
32
  exports.replaceStyles = replaceStyles;
@@ -5,25 +5,27 @@ const tslib_1 = require("tslib");
5
5
  const tasks_1 = require("@angular-devkit/schematics/tasks");
6
6
  const workspace_1 = require("@schematics/angular/utility/workspace");
7
7
  const ng_morph_1 = require("ng-morph");
8
+ const constants_1 = require("../../constants");
9
+ const is_string_1 = require("../../utils/miscellaneous/is-string");
8
10
  const versions_1 = require("../ng-add/constants/versions");
9
11
  const get_project_target_options_1 = require("./get-project-target-options");
10
12
  const get_projects_1 = require("./get-projects");
11
13
  function isInvalidAngularJson(tree) {
12
14
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
13
15
  return (workspace_1.getWorkspace(tree)
14
- .then(() => false)
16
+ .then(constants_1.ALWAYS_FALSE_HANDLER)
15
17
  /**
16
18
  * Possible error – "Invalid format version detected - Expected:[ 1 ] Found: [ 2 ]"
17
19
  * @see https://github.com/angular/angular-cli/blob/main/packages/angular_devkit/core/src/workspace/json/reader.ts#L67-L69
18
20
  */
19
- .catch(() => true));
21
+ .catch(constants_1.ALWAYS_TRUE_HANDLER));
20
22
  });
21
23
  }
22
24
  exports.isInvalidAngularJson = isInvalidAngularJson;
23
25
  function hasTaigaIcons(assets) {
24
26
  return !!(assets === null || assets === void 0 ? void 0 : assets.find(asset => {
25
27
  var _a;
26
- return typeof asset === `string`
28
+ return is_string_1.tuiIsString(asset)
27
29
  ? asset.includes(`taiga-ui`)
28
30
  : (_a = asset === null || asset === void 0 ? void 0 : asset.input) === null || _a === void 0 ? void 0 : _a.includes(`taiga-ui`);
29
31
  }));
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getStartOffsetOfAttribute = exports.hasElementAttribute = exports.findAttributeOnElementWithAttrs = exports.findAttributeOnElementWithTag = exports.findElementsWithAttribute = exports.findElementsByTagNames = exports.findElementsByTagName = exports.findElementsInTemplateByFn = exports.findElementsByFn = void 0;
4
4
  const parse5_1 = require("parse5");
5
- const ALWAYS_TRUE_HANDLER = () => true;
5
+ const constants_1 = require("../../../constants");
6
6
  function findElementsByFn(nodes, predicateFn) {
7
7
  const elements = [];
8
8
  const visitNodes = (nodes) => {
@@ -49,7 +49,7 @@ exports.findElementsWithAttribute = findElementsWithAttribute;
49
49
  * Finds elements with explicit tag names that also contain the specified attribute. Returns the
50
50
  * attribute start offset based on the specified HTML.
51
51
  */
52
- function findAttributeOnElementWithTag(html, name, tagNames, filterFn = ALWAYS_TRUE_HANDLER) {
52
+ function findAttributeOnElementWithTag(html, name, tagNames, filterFn = constants_1.ALWAYS_TRUE_HANDLER) {
53
53
  return findElementsWithAttribute(html, name)
54
54
  .filter(element => (tagNames.includes(element.tagName) || tagNames.includes(`*`)) &&
55
55
  filterFn(element))
@@ -60,7 +60,7 @@ exports.findAttributeOnElementWithTag = findAttributeOnElementWithTag;
60
60
  * Finds elements that contain the given attribute and contain at least one of the other
61
61
  * specified attributes. Returns the primary attribute's start offset based on the specified HTML.
62
62
  */
63
- function findAttributeOnElementWithAttrs(html, name, attrs, filterFn = ALWAYS_TRUE_HANDLER) {
63
+ function findAttributeOnElementWithAttrs(html, name, attrs, filterFn = constants_1.ALWAYS_TRUE_HANDLER) {
64
64
  return findElementsWithAttribute(html, name)
65
65
  .filter(element => attrs.some(attr => hasElementAttribute(element, attr)) &&
66
66
  filterFn(element))
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.removeInputProperty = exports.replaceInputPropertyByDirective = exports.getInputPropertyValueOffsets = exports.getInputPropertyOffsets = exports.replaceInputProperty = void 0;
4
+ const constants_1 = require("../../../constants");
4
5
  const add_import_to_closest_module_1 = require("../add-import-to-closest-module");
5
6
  const elements_1 = require("./elements");
6
7
  const template_resource_1 = require("./template-resource");
@@ -76,7 +77,7 @@ exports.replaceInputProperty = replaceInputProperty;
76
77
  *
77
78
  * getInputPropertyOffsets(template, 'size', ['tui-card']) // [[10, 18]]
78
79
  */
79
- function getInputPropertyOffsets(html, attrName, tags, filterFn = () => true) {
80
+ function getInputPropertyOffsets(html, attrName, tags, filterFn = constants_1.ALWAYS_TRUE_HANDLER) {
80
81
  return elements_1.findElementsWithAttribute(html, attrName)
81
82
  .filter(element => (tags.includes(element.tagName) || tags.includes(`*`)) &&
82
83
  filterFn(element))
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/types/index.js ADDED
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./autocomplete"), exports);
5
+ tslib_1.__exportStar(require("./date-mode"), exports);
6
+ tslib_1.__exportStar(require("./dialog"), exports);
7
+ tslib_1.__exportStar(require("./event-with"), exports);
8
+ tslib_1.__exportStar(require("./handler"), exports);
9
+ tslib_1.__exportStar(require("./injection-token-type"), exports);
10
+ tslib_1.__exportStar(require("./input-mode"), exports);
11
+ tslib_1.__exportStar(require("./input-type"), exports);
12
+ tslib_1.__exportStar(require("./mapper"), exports);
13
+ tslib_1.__exportStar(require("./matcher"), exports);
14
+ tslib_1.__exportStar(require("./overscroll-mode"), exports);
15
+ tslib_1.__exportStar(require("./time-mode"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,6 +7,7 @@ export * from './flat-length';
7
7
  export * from './get-original-array-from-query-list';
8
8
  export * from './get-swipe-direction';
9
9
  export * from './is-number';
10
+ export * from './is-object';
10
11
  export * from './is-present';
11
12
  export * from './is-string';
12
13
  export * from './mark-control-as-touched-and-validate';
@@ -0,0 +1 @@
1
+ export declare function tuiIsObject<T extends Record<string, any>>(value: unknown): value is NonNullable<T>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tuiIsString = void 0;
4
+ function tuiIsString(value) {
5
+ // eslint-disable-next-line @taiga-ui/no-typeof
6
+ return typeof value === `string`;
7
+ }
8
+ exports.tuiIsString = tuiIsString;