@taiga-ui/cdk 3.33.1 → 3.34.0-dev.main-23baa20

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 (61) hide show
  1. package/bundles/taiga-ui-cdk-abstract.umd.js +4 -25
  2. package/bundles/taiga-ui-cdk-abstract.umd.js.map +1 -1
  3. package/bundles/taiga-ui-cdk-constants.umd.js +1 -1
  4. package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
  5. package/bundles/taiga-ui-cdk-decorators.umd.js +53 -16
  6. package/bundles/taiga-ui-cdk-decorators.umd.js.map +1 -1
  7. package/bundles/taiga-ui-cdk-directives-active-zone.umd.js +0 -3
  8. package/bundles/taiga-ui-cdk-directives-active-zone.umd.js.map +1 -1
  9. package/bundles/taiga-ui-cdk-directives-copy-processor.umd.js +4 -325
  10. package/bundles/taiga-ui-cdk-directives-copy-processor.umd.js.map +1 -1
  11. package/bundles/taiga-ui-cdk-directives-media.umd.js +4 -334
  12. package/bundles/taiga-ui-cdk-directives-media.umd.js.map +1 -1
  13. package/bundles/taiga-ui-cdk-directives-obscured.umd.js +4 -325
  14. package/bundles/taiga-ui-cdk-directives-obscured.umd.js.map +1 -1
  15. package/bundles/taiga-ui-cdk-directives-repeat-times.umd.js +4 -325
  16. package/bundles/taiga-ui-cdk-directives-repeat-times.umd.js.map +1 -1
  17. package/bundles/taiga-ui-cdk-directives-resizer.umd.js +4 -7
  18. package/bundles/taiga-ui-cdk-directives-resizer.umd.js.map +1 -1
  19. package/bundles/taiga-ui-cdk-directives-validator.umd.js +4 -325
  20. package/bundles/taiga-ui-cdk-directives-validator.umd.js.map +1 -1
  21. package/constants/version.d.ts +1 -1
  22. package/constants/version.js +1 -1
  23. package/decorators/debounce.d.ts +4 -0
  24. package/decorators/default-prop.d.ts +3 -0
  25. package/decorators/pure.d.ts +21 -2
  26. package/decorators/required-setter.d.ts +3 -0
  27. package/esm2015/abstract/control.js +1 -9
  28. package/esm2015/abstract/interactive.js +1 -18
  29. package/esm2015/constants/version.js +2 -2
  30. package/esm2015/decorators/debounce.js +5 -1
  31. package/esm2015/decorators/default-prop.js +4 -1
  32. package/esm2015/decorators/pure.js +39 -16
  33. package/esm2015/decorators/required-setter.js +4 -1
  34. package/esm2015/directives/active-zone/active-zone.directive.js +2 -5
  35. package/esm2015/directives/copy-processor/copy-processor.directive.js +1 -6
  36. package/esm2015/directives/media/media.directive.js +1 -15
  37. package/esm2015/directives/obscured/obscured.directive.js +1 -6
  38. package/esm2015/directives/repeat-times/repeat-times.directive.js +1 -6
  39. package/esm2015/directives/resizer/resizer.directive.js +1 -6
  40. package/esm2015/directives/validator/validator.directive.js +1 -6
  41. package/fesm2015/taiga-ui-cdk-abstract.js +0 -23
  42. package/fesm2015/taiga-ui-cdk-abstract.js.map +1 -1
  43. package/fesm2015/taiga-ui-cdk-constants.js +1 -1
  44. package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
  45. package/fesm2015/taiga-ui-cdk-decorators.js +48 -15
  46. package/fesm2015/taiga-ui-cdk-decorators.js.map +1 -1
  47. package/fesm2015/taiga-ui-cdk-directives-active-zone.js +1 -4
  48. package/fesm2015/taiga-ui-cdk-directives-active-zone.js.map +1 -1
  49. package/fesm2015/taiga-ui-cdk-directives-copy-processor.js +0 -5
  50. package/fesm2015/taiga-ui-cdk-directives-copy-processor.js.map +1 -1
  51. package/fesm2015/taiga-ui-cdk-directives-media.js +0 -14
  52. package/fesm2015/taiga-ui-cdk-directives-media.js.map +1 -1
  53. package/fesm2015/taiga-ui-cdk-directives-obscured.js +0 -5
  54. package/fesm2015/taiga-ui-cdk-directives-obscured.js.map +1 -1
  55. package/fesm2015/taiga-ui-cdk-directives-repeat-times.js +0 -5
  56. package/fesm2015/taiga-ui-cdk-directives-repeat-times.js.map +1 -1
  57. package/fesm2015/taiga-ui-cdk-directives-resizer.js +0 -5
  58. package/fesm2015/taiga-ui-cdk-directives-resizer.js.map +1 -1
  59. package/fesm2015/taiga-ui-cdk-directives-validator.js +0 -5
  60. package/fesm2015/taiga-ui-cdk-directives-validator.js.map +1 -1
  61. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-decorators.js","sources":["../../../projects/cdk/decorators/debounce.ts","../../../projects/cdk/decorators/default-prop.ts","../../../projects/cdk/decorators/pure.ts","../../../projects/cdk/decorators/required-setter.ts","../../../projects/cdk/decorators/taiga-ui-cdk-decorators.ts"],"sourcesContent":["export function tuiDebounce(timeout: number): MethodDecorator {\n let timeoutRef: ReturnType<typeof setTimeout> | undefined;\n\n return function (_target, _key: string | symbol, descriptor: PropertyDescriptor) {\n const {value} = descriptor;\n\n descriptor.value = function (...args: unknown[]) {\n clearTimeout(timeoutRef);\n timeoutRef = setTimeout(() => value.apply(this, args), timeout);\n };\n\n return descriptor;\n };\n}\n","import {tuiAssert} from '@taiga-ui/cdk/classes';\nimport {TuiBooleanHandler} from '@taiga-ui/cdk/types';\n\n/**\n * Decorator for checking input values for undefined. You can also pass\n * optional assertion to check input against.\n *\n * CAUTION: This decorator overwrites other getters and setters.\n */\nexport function tuiDefaultProp<T extends Record<string, any>, K extends keyof T>(\n assertion?: TuiBooleanHandler<T[K]>,\n ...args: unknown[]\n): PropertyDecorator {\n return (target, key) => {\n const {name} = target.constructor;\n const errorGetDefaultMessage = ngDevMode && errorGetDefault(key, name);\n const errorSetDefaultMessage = ngDevMode && errorSetDefault(key, name);\n\n Object.defineProperty(target, key, {\n configurable: true,\n get(): undefined {\n ngDevMode && tuiAssert.assert(false, errorGetDefaultMessage);\n\n return undefined;\n },\n set(this: T, initialValue: T[K]) {\n const isValid = initialValue !== undefined;\n const errorMessage = ngDevMode && errorSetDefaultInitial(key, name);\n let currentValue = initialValue;\n\n ngDevMode && tuiAssert.assert(isValid, errorMessage);\n\n if (ngDevMode && isValid && assertion && tuiAssert) {\n tuiAssert.assert(\n assertion.call(this, initialValue),\n `${String(key)} in ${name} received:`,\n initialValue,\n ...args,\n );\n }\n\n Object.defineProperty(this, key, {\n configurable: true,\n get(): T[K] {\n return currentValue;\n },\n set(this: T, value: T[K]) {\n const isValid = value !== undefined;\n const backupValue = initialValue;\n\n ngDevMode &&\n tuiAssert.assert(\n isValid,\n errorSetDefaultMessage,\n String(backupValue),\n );\n\n if (ngDevMode && isValid && assertion && tuiAssert) {\n tuiAssert.assert(\n assertion.call(this, value),\n `${String(key)} in ${name} received:`,\n value,\n ...args,\n );\n }\n\n currentValue = isValid ? value : backupValue;\n },\n });\n },\n });\n };\n}\n\nfunction errorGetDefault(key: string | symbol, component: string): string {\n return `Default value for ${String(\n key,\n )} was not provided in ${component}, error in Taiga UI Angular Kit`;\n}\n\nfunction errorSetDefault(key: string | symbol, component: string): string {\n return `Undefined was passed as ${String(\n key,\n )} to ${component}, which is invalid input, using default value:`;\n}\n\nfunction errorSetDefaultInitial(key: string | symbol, component: string): string {\n return `Undefined was passed as default value for ${String(\n key,\n )} to ${component}, error in Taiga UI Angular Kit`;\n}\n","import {TuiPureException} from '@taiga-ui/cdk/exceptions';\n\n/**\n * Implements lazy initialization for getter or memoization of a function call similar to pure {@link: Pipe}.\n * Replaces getter with its calculated value upon first call or keeps track of last call arguments and returned\n * value for function, skipping calculation when arguments are strictly the same.\n *\n * @throws error if used not on getter or function\n *\n * CAUTION: `this` is not available inside such functions/getters, they must be pure.\n */\nexport function tuiPure<T>(\n _target: Record<string, any>,\n propertyKey: string,\n {get, enumerable, value}: TypedPropertyDescriptor<T>,\n): TypedPropertyDescriptor<T> {\n if (get) {\n return {\n configurable: true,\n enumerable,\n get(): T {\n const value = get.call(this);\n\n Object.defineProperty(this, propertyKey, {enumerable, value});\n\n return value;\n },\n };\n }\n\n if (typeof value !== `function`) {\n throw new TuiPureException();\n }\n\n const original = value;\n\n return {\n configurable: true,\n enumerable,\n get(): T {\n let previousArgs: readonly unknown[] = [];\n let originalFnWasCalledLeastAtOnce = false;\n let pureValue: unknown;\n\n const patched = (...args: unknown[]): unknown => {\n const isPure =\n originalFnWasCalledLeastAtOnce &&\n previousArgs.length === args.length &&\n args.every((arg, index) => arg === previousArgs[index]);\n\n if (isPure) {\n return pureValue;\n }\n\n previousArgs = args;\n pureValue = original.apply(this, args);\n originalFnWasCalledLeastAtOnce = true;\n\n return pureValue;\n };\n\n Object.defineProperty(this, propertyKey, {\n configurable: true,\n value: patched,\n });\n\n return patched as unknown as T;\n },\n };\n}\n","import {tuiAssert} from '@taiga-ui/cdk/classes';\nimport {TuiBooleanHandler} from '@taiga-ui/cdk/types';\n\n/**\n * Decorator for checking input setter values against a custom assertion which\n * takes value passed to input setter and component instance as arguments.\n * It specifically checks for undefined values and prevents calls to the\n * original setter in this case.\n */\nexport function tuiRequiredSetter<T extends Record<string, any>, K extends keyof T>(\n assertion?: TuiBooleanHandler<T[K]>,\n ...args: any[]\n): MethodDecorator {\n return (\n target: Record<string, any>,\n key,\n {configurable, enumerable, get, set}: PropertyDescriptor,\n ): PropertyDescriptor => {\n const {name} = target.constructor;\n\n return {\n configurable,\n enumerable,\n get,\n set(this: T, value: T[K]) {\n if (ngDevMode && value !== undefined && assertion && tuiAssert) {\n tuiAssert.assert(\n assertion.call(this, value),\n `${String(key)} in ${name} received:`,\n value,\n ...args,\n );\n }\n\n if (!set || value === undefined) {\n ngDevMode &&\n tuiAssert.assert(value !== undefined, errorSet(key, name));\n\n return;\n }\n\n set.call(this, value);\n },\n };\n };\n}\n\nfunction errorSet(key: string | symbol, component: string): string {\n return `Undefined was passed as ${String(\n key,\n )} to ${component}, setter will not be called`;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAM,SAAU,WAAW,CAAC,OAAe,EAAA;AACvC,IAAA,IAAI,UAAqD,CAAC;AAE1D,IAAA,OAAO,UAAU,OAAO,EAAE,IAAqB,EAAE,UAA8B,EAAA;AAC3E,QAAA,MAAM,EAAC,KAAK,EAAC,GAAG,UAAU,CAAC;AAE3B,QAAA,UAAU,CAAC,KAAK,G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EAAE,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;oBAE/D,OAAO;AACV,iBAAA;AAED,gBAAA,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;aACzB;SACJ,CAAC;AACN,KAAC,CAAC;AACN,CAAC;AAED,SAAS,QAAQ,CAAC,GAAoB,EAAE,SAAiB,EAAA;IACrD,OAAO,CAAA,wBAAA,EAA2B,MAAM,CACpC,GAAG,CACN,CAAO,IAAA,EAAA,SAAS,6BAA6B,CAAC;AACnD;;ACnDA;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-decorators.js","sources":["../../../projects/cdk/decorators/debounce.ts","../../../projects/cdk/decorators/default-prop.ts","../../../projects/cdk/decorators/pure.ts","../../../projects/cdk/decorators/required-setter.ts","../../../projects/cdk/decorators/taiga-ui-cdk-decorators.ts"],"sourcesContent":["/**\n * @deprecated:\n * not compatible with TypeScript 5\n */\nexport function tuiDebounce(timeout: number): MethodDecorator {\n let timeoutRef: ReturnType<typeof setTimeout> | undefined;\n\n return function (_target, _key: string | symbol, descriptor: PropertyDescriptor) {\n const {value} = descriptor;\n\n descriptor.value = function (...args: unknown[]) {\n clearTimeout(timeoutRef);\n timeoutRef = setTimeout(() => value.apply(this, args), timeout);\n };\n\n return descriptor;\n };\n}\n","import {tuiAssert} from '@taiga-ui/cdk/classes';\nimport {TuiBooleanHandler} from '@taiga-ui/cdk/types';\n\n/**\n * @deprecated:\n * not compatible with TypeScript 5\n *\n * Decorator for checking input values for undefined. You can also pass\n * optional assertion to check input against.\n *\n * CAUTION: This decorator overwrites other getters and setters.\n */\nexport function tuiDefaultProp<T extends Record<string, any>, K extends keyof T>(\n assertion?: TuiBooleanHandler<T[K]>,\n ...args: unknown[]\n): PropertyDecorator {\n return (target, key) => {\n const {name} = target.constructor;\n const errorGetDefaultMessage = ngDevMode && errorGetDefault(key, name);\n const errorSetDefaultMessage = ngDevMode && errorSetDefault(key, name);\n\n Object.defineProperty(target, key, {\n configurable: true,\n get(): undefined {\n ngDevMode && tuiAssert.assert(false, errorGetDefaultMessage);\n\n return undefined;\n },\n set(this: T, initialValue: T[K]) {\n const isValid = initialValue !== undefined;\n const errorMessage = ngDevMode && errorSetDefaultInitial(key, name);\n let currentValue = initialValue;\n\n ngDevMode && tuiAssert.assert(isValid, errorMessage);\n\n if (ngDevMode && isValid && assertion && tuiAssert) {\n tuiAssert.assert(\n assertion.call(this, initialValue),\n `${String(key)} in ${name} received:`,\n initialValue,\n ...args,\n );\n }\n\n Object.defineProperty(this, key, {\n configurable: true,\n get(): T[K] {\n return currentValue;\n },\n set(this: T, value: T[K]) {\n const isValid = value !== undefined;\n const backupValue = initialValue;\n\n ngDevMode &&\n tuiAssert.assert(\n isValid,\n errorSetDefaultMessage,\n String(backupValue),\n );\n\n if (ngDevMode && isValid && assertion && tuiAssert) {\n tuiAssert.assert(\n assertion.call(this, value),\n `${String(key)} in ${name} received:`,\n value,\n ...args,\n );\n }\n\n currentValue = isValid ? value : backupValue;\n },\n });\n },\n });\n };\n}\n\nfunction errorGetDefault(key: string | symbol, component: string): string {\n return `Default value for ${String(\n key,\n )} was not provided in ${component}, error in Taiga UI Angular Kit`;\n}\n\nfunction errorSetDefault(key: string | symbol, component: string): string {\n return `Undefined was passed as ${String(\n key,\n )} to ${component}, which is invalid input, using default value:`;\n}\n\nfunction errorSetDefaultInitial(key: string | symbol, component: string): string {\n return `Undefined was passed as default value for ${String(\n key,\n )} to ${component}, error in Taiga UI Angular Kit`;\n}\n","import {TuiPureException} from '@taiga-ui/cdk/exceptions';\n\n/** TODO Delete after updating typescript to version 5 and when backward compatibility will not be required */\ninterface ClassGetterDecoratorContext {\n kind: 'getter';\n name: string;\n}\n\n/** TODO Delete after updating typescript to version 5 and when backward compatibility will not be required */\ninterface ClassMethodDecoratorContext {\n kind: 'method';\n name: string;\n}\n\nfunction decorateMethod(\n originalMethod: (...args: unknown[]) => unknown,\n): (this: object, ...args: unknown[]) => unknown {\n let previousArgs: readonly unknown[] = [];\n let originalFnWasCalledLeastAtOnce = false;\n let pureValue: unknown;\n\n return function tuiPureMethodPatched(this: object, ...args: unknown[]): unknown {\n const isPure =\n originalFnWasCalledLeastAtOnce &&\n previousArgs.length === args.length &&\n args.every((arg, index) => arg === previousArgs[index]);\n\n if (isPure) {\n return pureValue;\n }\n\n previousArgs = args;\n pureValue = originalMethod.apply(this, args);\n originalFnWasCalledLeastAtOnce = true;\n\n return pureValue;\n };\n}\n\nfunction decorateGetter(\n originalGetter: () => unknown,\n propertyKey: string | symbol,\n enumerable: boolean = true,\n): (this: object) => unknown {\n return function tuiPureGetterPatched(this: object): unknown {\n const value = originalGetter.call(this);\n\n Object.defineProperty(this, propertyKey, {enumerable, value});\n\n return value;\n };\n}\n\n/**\n * Implements lazy initialization for getter or memoization of a function call similar to pure {@link: Pipe}.\n * Replaces getter with its calculated value upon first call or keeps track of last call arguments and returned\n * value for function, skipping calculation when arguments are strictly the same.\n *\n * @throws error if used not on getter or function\n *\n * CAUTION: they must be pure.\n */\nexport function tuiPure<T>(\n target: object,\n propertyKey: string,\n {get, enumerable, value}: TypedPropertyDescriptor<T>,\n): TypedPropertyDescriptor<T>;\n\n/**\n * Implements lazy initialization for getter or memoization of a function call similar to pure {@link: Pipe}.\n * Replaces getter with its calculated value upon first call or keeps track of last call arguments and returned\n * value for function, skipping calculation when arguments are strictly the same.\n *\n * CAUTION: they must be pure.\n */\nexport function tuiPure<A extends unknown[], R>(\n target: (...args: A) => R,\n context: ClassGetterDecoratorContext | ClassMethodDecoratorContext,\n): (...args: A) => R;\n\nexport function tuiPure(\n target: object | ((...args: unknown[]) => unknown),\n propertyKeyOrContext:\n | ClassGetterDecoratorContext\n | ClassMethodDecoratorContext\n | string,\n descriptor?: TypedPropertyDescriptor<(...args: unknown[]) => unknown>,\n): TypedPropertyDescriptor<unknown> | ((...args: unknown[]) => unknown) {\n if (typeof target === `function`) {\n const context = propertyKeyOrContext as\n | ClassGetterDecoratorContext\n | ClassMethodDecoratorContext;\n\n if (context.kind === `getter`) {\n return decorateGetter(target as () => unknown, context.name);\n }\n\n if (context.kind === `method`) {\n return decorateMethod(target as (...args: unknown[]) => unknown);\n }\n\n throw new TuiPureException();\n }\n\n const {get, enumerable, value} = descriptor!;\n const propertyKey = propertyKeyOrContext as string;\n\n if (get) {\n return {\n configurable: true,\n enumerable,\n get: decorateGetter(get, propertyKey, enumerable),\n };\n }\n\n if (typeof value !== `function`) {\n throw new TuiPureException();\n }\n\n const original = value;\n\n return {\n configurable: true,\n enumerable,\n get(): unknown {\n let previousArgs: readonly unknown[] = [];\n let originalFnWasCalledLeastAtOnce = false;\n let pureValue: unknown;\n\n const patched = (...args: unknown[]): unknown => {\n const isPure =\n originalFnWasCalledLeastAtOnce &&\n previousArgs.length === args.length &&\n args.every((arg, index) => arg === previousArgs[index]);\n\n if (isPure) {\n return pureValue;\n }\n\n previousArgs = args;\n pureValue = original.apply(this, args);\n originalFnWasCalledLeastAtOnce = true;\n\n return pureValue;\n };\n\n Object.defineProperty(this, propertyKey, {\n configurable: true,\n value: patched,\n });\n\n return patched as unknown;\n },\n };\n}\n","import {tuiAssert} from '@taiga-ui/cdk/classes';\nimport {TuiBooleanHandler} from '@taiga-ui/cdk/types';\n\n/**\n * @deprecated:\n * not compatible with TypeScript 5\n *\n * Decorator for checking input setter values against a custom assertion which\n * takes value passed to input setter and component instance as arguments.\n * It specifically checks for undefined values and prevents calls to the\n * original setter in this case.\n */\nexport function tuiRequiredSetter<T extends Record<string, any>, K extends keyof T>(\n assertion?: TuiBooleanHandler<T[K]>,\n ...args: any[]\n): MethodDecorator {\n return (\n target: Record<string, any>,\n key,\n {configurable, enumerable, get, set}: PropertyDescriptor,\n ): PropertyDescriptor => {\n const {name} = target.constructor;\n\n return {\n configurable,\n enumerable,\n get,\n set(this: T, value: T[K]) {\n if (ngDevMode && value !== undefined && assertion && tuiAssert) {\n tuiAssert.assert(\n assertion.call(this, value),\n `${String(key)} in ${name} received:`,\n value,\n ...args,\n );\n }\n\n if (!set || value === undefined) {\n ngDevMode &&\n tuiAssert.assert(value !== undefined, errorSet(key, name));\n\n return;\n }\n\n set.call(this, value);\n },\n };\n };\n}\n\nfunction errorSet(key: string | symbol, component: string): string {\n return `Undefined was passed as ${String(\n key,\n )} to ${component}, setter will not be called`;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;AAGG;AACG,SAAU,WAAW,CAAC,OAAe,EAAA;AACvC,IAAA,IAAI,UAAqD,CAAC;AAE1D,IAAA,OAAO,UAAU,OAAO,EAAE,IAAqB,EAAE,UAA8B,EAAA;AAC3E,QAAA,MAAM,EAAC,KAAK,EAAC,GAAG,UAAU,CAAC;AAE3B,QAAA,UAAU,CAAC,KAAK,GAAG,UAAU,GAAG,IAAe,EAAA;YAC3C,YAAY,CAAC,UAAU,CAAC,CAAC;AACzB,YAAA,UAAU,GAAG,UAAU,CAAC,MAAM,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;AACpE,SAAC,CAAC;AAEF,QAAA,OAAO,UAAU,CAAC;AACtB,KAAC,CAAC;AACN;;ACdA;;;;;;;;AAQG;SACa,cAAc,CAC1B,SAAmC,EACnC,GAAG,IAAe,EAAA;AAElB,IAAA,OAAO,CAAC,MAAM,EAAE,GAAG,KAAI;AACnB,QAAA,MAAM,EAAC,IAAI,EAAC,GAAG,MAAM,CAAC,WAAW,CAAC;QAClC,MAAM,sBAAsB,GAAG,SAAS,IAAI,eAAe,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACvE,MAAM,sBAAsB,GAAG,SAAS,IAAI,eAAe,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAEvE,QAAA,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE;AAC/B,YAAA,YAAY,EAAE,IAAI;YAClB,GAAG,GAAA;gBACC,SAAS,IAAI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,GAAG,EAAqB,KACpC;AACpB,QAAA,MAAM,EAAC,IAAI,EAAC,GAAG,MAAM,CAAC,WAAW,CAAC;QAElC,OAAO;YACH,YAAY;YACZ,UAAU;YACV,GAAG;AACH,YAAA,GAAG,CAAU,KAAW,EAAA;gBACpB,IAAI,SAAS,IAAI,KAAK,KAAK,SAAS,IAAI,SAAS,IAAI,SAAS,EAAE;oBAC5D,SAAS,CAAC,MAAM,CACZ,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAC3B,CAAA,EAAG,MAAM,CAAC,GAAG,CAAC,CAAA,IAAA,EAAO,IAAI,CAAA,UAAA,CAAY,EACrC,KAAK,EACL,GAAG,IAAI,CACV,CAAC;AACL,iBAAA;AAED,gBAAA,IAAI,CAAC,GAAG,IAAI,KAAK,KAAK,SAAS,EAAE;oBAC7B,SAAS;AACL,wBAAA,SAAS,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS,EAAE,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;oBAE/D,OAAO;AACV,iBAAA;AAED,gBAAA,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;aACzB;SACJ,CAAC;AACN,KAAC,CAAC;AACN,CAAC;AAED,SAAS,QAAQ,CAAC,GAAoB,EAAE,SAAiB,EAAA;IACrD,OAAO,CAAA,wBAAA,EAA2B,MAAM,CACpC,GAAG,CACN,CAAO,IAAA,EAAA,SAAS,6BAA6B,CAAC;AACnD;;ACtDA;;AAEG;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { __decorate } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
3
  import { NgZone, ElementRef, Directive, Inject, Optional, SkipSelf, Input, Output, NgModule } from '@angular/core';
4
- import { tuiDefaultProp, tuiPure } from '@taiga-ui/cdk/decorators';
4
+ import { tuiPure } from '@taiga-ui/cdk/decorators';
5
5
  import { tuiZoneOptimized } from '@taiga-ui/cdk/observables';
6
6
  import { TUI_ACTIVE_ELEMENT } from '@taiga-ui/cdk/tokens';
7
7
  import { tuiArrayRemove } from '@taiga-ui/cdk/utils';
@@ -54,9 +54,6 @@ class TuiActiveZoneDirective {
54
54
  }
55
55
  TuiActiveZoneDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiActiveZoneDirective, deps: [{ token: TUI_ACTIVE_ELEMENT }, { token: NgZone }, { token: ElementRef }, { token: TuiActiveZoneDirective, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
56
56
  TuiActiveZoneDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: { tuiActiveZoneParentSetter: ["tuiActiveZoneParent", "tuiActiveZoneParentSetter"] }, outputs: { tuiActiveZoneChange: "tuiActiveZoneChange" }, exportAs: ["tuiActiveZone"], ngImport: i0 });
57
- __decorate([
58
- tuiDefaultProp()
59
- ], TuiActiveZoneDirective.prototype, "tuiActiveZoneParentSetter", null);
60
57
  __decorate([
61
58
  tuiPure
62
59
  ], TuiActiveZoneDirective.prototype, "setZone", null);
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-directives-active-zone.js","sources":["../../../projects/cdk/directives/active-zone/active-zone.directive.ts","../../../projects/cdk/directives/active-zone/active-zone.module.ts","../../../projects/cdk/directives/active-zone/taiga-ui-cdk-directives-active-zone.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n SkipSelf,\n} from '@angular/core';\nimport {tuiDefaultProp, tuiPure} from '@taiga-ui/cdk/decorators';\nimport {tuiZoneOptimized} from '@taiga-ui/cdk/observables';\nimport {TUI_ACTIVE_ELEMENT} from '@taiga-ui/cdk/tokens';\nimport {tuiArrayRemove} from '@taiga-ui/cdk/utils';\nimport {Observable} from 'rxjs';\nimport {distinctUntilChanged, map, skip, startWith} from 'rxjs/operators';\n\n@Directive({\n selector:\n '[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)',\n exportAs: 'tuiActiveZone',\n})\nexport class TuiActiveZoneDirective implements OnDestroy {\n private subActiveZones: readonly TuiActiveZoneDirective[] = [];\n\n private tuiActiveZoneParent: TuiActiveZoneDirective | null = null;\n\n @Input('tuiActiveZoneParent')\n @tuiDefaultProp()\n set tuiActiveZoneParentSetter(zone: TuiActiveZoneDirective | null) {\n this.setZone(zone);\n }\n\n @Output()\n readonly tuiActiveZoneChange = this.active$.pipe(\n map(element => !!element && this.contains(element)),\n startWith(false),\n distinctUntilChanged(),\n skip(1),\n tuiZoneOptimized(this.ngZone),\n );\n\n constructor(\n @Inject(TUI_ACTIVE_ELEMENT)\n private readonly active$: Observable<Element | null>,\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(ElementRef) private readonly el: ElementRef<Element>,\n @Optional()\n @SkipSelf()\n @Inject(TuiActiveZoneDirective)\n private readonly directParentActiveZone: TuiActiveZoneDirective | null,\n ) {\n if (this.directParentActiveZone) {\n this.directParentActiveZone.addSubActiveZone(this);\n }\n }\n\n ngOnDestroy(): void {\n if (this.directParentActiveZone) {\n this.directParentActiveZone.removeSubActiveZone(this);\n }\n\n if (this.tuiActiveZoneParent) {\n this.tuiActiveZoneParent.removeSubActiveZone(this);\n }\n }\n\n contains(node: Node): boolean {\n return (\n this.el.nativeElement.contains(node) ||\n this.subActiveZones.some(\n (item, index, array) =>\n array.indexOf(item) === index && item.contains(node),\n )\n );\n }\n\n @tuiPure\n private setZone(zone: TuiActiveZoneDirective | null): void {\n if (this.tuiActiveZoneParent) {\n this.tuiActiveZoneParent.removeSubActiveZone(this);\n }\n\n if (zone) {\n zone.addSubActiveZone(this);\n }\n\n this.tuiActiveZoneParent = zone;\n }\n\n private addSubActiveZone(activeZone: TuiActiveZoneDirective): void {\n this.subActiveZones = [...this.subActiveZones, activeZone];\n }\n\n private removeSubActiveZone(activeZone: TuiActiveZoneDirective): void {\n this.subActiveZones = tuiArrayRemove(\n this.subActiveZones,\n this.subActiveZones.indexOf(activeZone),\n );\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiActiveZoneDirective} from './active-zone.directive';\n\n@NgModule({\n declarations: [TuiActiveZoneDirective],\n exports: [TuiActiveZoneDirective],\n})\nexport class TuiActiveZoneModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAuBa,sBAAsB,CAAA;AAoB/B,IAAA,WAAA,CAEqB,OAAmC,EACnB,MAAc,EACV,EAAuB,EAI3C,sBAAqD,EAAA;QANrD,IAAO,CAAA,OAAA,GAAP,OAAO,CAA4B;QACnB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QACV,IAAE,CAAA,EAAA,GAAF,EAAE,CAAqB;QAI3C,IAAsB,CAAA,sBAAA,GAAtB,sBAAsB,CAA+B;QA3BlE,IAAc,CAAA,cAAA,GAAsC,EAAE,CAAC;QAEvD,IAAmB,CAAA,mBAAA,GAAkC,IAAI,CAAC;QASzD,IAAmB,CAAA,mBAAA,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAC5C,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,EACnD,SAAS,CAAC,KAAK,CAAC,EAChB,oBAAoB,EAAE,EACtB,IAAI,CAAC,CAAC,CAAC,EACP,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAChC,CAAC;QAYE,IAAI,IAAI,CAAC,sBAAsB,EAAE;AAC7B,YAAA,IAAI,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;AACtD,SAAA;KACJ;IA1BD,IAAI,yBAAyB,CAAC,IAAm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R,QAAQ;;0BACR,MAAM;2BAAC,sBAAsB,CAAA;4CApB9B,yBAAyB,EAAA,CAAA;sBAF5B,KAAK;uBAAC,qBAAqB,CAAA;gBAOnB,mBAAmB,EAAA,CAAA;sBAD3B,MAAM;gBA6CC,OAAO,EAAA,EAAA,EAAA,EAAA,CAAA;;MCvEN,mBAAmB,CAAA;;iHAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kHAAnB,mBAAmB,EAAA,YAAA,EAAA,CAHb,sBAAsB,CAAA,EAAA,OAAA,EAAA,CAC3B,sBAAsB,CAAA,EAAA,CAAA,CAAA;kHAEvB,mBAAmB,EAAA,CAAA,CAAA;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE,CAAC,sBAAsB,CAAC;AACpC,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-directives-active-zone.js","sources":["../../../projects/cdk/directives/active-zone/active-zone.directive.ts","../../../projects/cdk/directives/active-zone/active-zone.module.ts","../../../projects/cdk/directives/active-zone/taiga-ui-cdk-directives-active-zone.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n SkipSelf,\n} from '@angular/core';\nimport {tuiPure} from '@taiga-ui/cdk/decorators';\nimport {tuiZoneOptimized} from '@taiga-ui/cdk/observables';\nimport {TUI_ACTIVE_ELEMENT} from '@taiga-ui/cdk/tokens';\nimport {tuiArrayRemove} from '@taiga-ui/cdk/utils';\nimport {Observable} from 'rxjs';\nimport {distinctUntilChanged, map, skip, startWith} from 'rxjs/operators';\n\n@Directive({\n selector:\n '[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)',\n exportAs: 'tuiActiveZone',\n})\nexport class TuiActiveZoneDirective implements OnDestroy {\n private subActiveZones: readonly TuiActiveZoneDirective[] = [];\n\n private tuiActiveZoneParent: TuiActiveZoneDirective | null = null;\n\n @Input('tuiActiveZoneParent')\n set tuiActiveZoneParentSetter(zone: TuiActiveZoneDirective | null) {\n this.setZone(zone);\n }\n\n @Output()\n readonly tuiActiveZoneChange = this.active$.pipe(\n map(element => !!element && this.contains(element)),\n startWith(false),\n distinctUntilChanged(),\n skip(1),\n tuiZoneOptimized(this.ngZone),\n );\n\n constructor(\n @Inject(TUI_ACTIVE_ELEMENT)\n private readonly active$: Observable<Element | null>,\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(ElementRef) private readonly el: ElementRef<Element>,\n @Optional()\n @SkipSelf()\n @Inject(TuiActiveZoneDirective)\n private readonly directParentActiveZone: TuiActiveZoneDirective | null,\n ) {\n if (this.directParentActiveZone) {\n this.directParentActiveZone.addSubActiveZone(this);\n }\n }\n\n ngOnDestroy(): void {\n if (this.directParentActiveZone) {\n this.directParentActiveZone.removeSubActiveZone(this);\n }\n\n if (this.tuiActiveZoneParent) {\n this.tuiActiveZoneParent.removeSubActiveZone(this);\n }\n }\n\n contains(node: Node): boolean {\n return (\n this.el.nativeElement.contains(node) ||\n this.subActiveZones.some(\n (item, index, array) =>\n array.indexOf(item) === index && item.contains(node),\n )\n );\n }\n\n @tuiPure\n private setZone(zone: TuiActiveZoneDirective | null): void {\n if (this.tuiActiveZoneParent) {\n this.tuiActiveZoneParent.removeSubActiveZone(this);\n }\n\n if (zone) {\n zone.addSubActiveZone(this);\n }\n\n this.tuiActiveZoneParent = zone;\n }\n\n private addSubActiveZone(activeZone: TuiActiveZoneDirective): void {\n this.subActiveZones = [...this.subActiveZones, activeZone];\n }\n\n private removeSubActiveZone(activeZone: TuiActiveZoneDirective): void {\n this.subActiveZones = tuiArrayRemove(\n this.subActiveZones,\n this.subActiveZones.indexOf(activeZone),\n );\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiActiveZoneDirective} from './active-zone.directive';\n\n@NgModule({\n declarations: [TuiActiveZoneDirective],\n exports: [TuiActiveZoneDirective],\n})\nexport class TuiActiveZoneModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAuBa,sBAAsB,CAAA;AAmB/B,IAAA,WAAA,CAEqB,OAAmC,EACnB,MAAc,EACV,EAAuB,EAI3C,sBAAqD,EAAA;QANrD,IAAO,CAAA,OAAA,GAAP,OAAO,CAA4B;QACnB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QACV,IAAE,CAAA,EAAA,GAAF,EAAE,CAAqB;QAI3C,IAAsB,CAAA,sBAAA,GAAtB,sBAAsB,CAA+B;QA1BlE,IAAc,CAAA,cAAA,GAAsC,EAAE,CAAC;QAEvD,IAAmB,CAAA,mBAAA,GAAkC,IAAI,CAAC;QAQzD,IAAmB,CAAA,mBAAA,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAC5C,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,EACnD,SAAS,CAAC,KAAK,CAAC,EAChB,oBAAoB,EAAE,EACtB,IAAI,CAAC,CAAC,CAAC,EACP,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAChC,CAAC;QAYE,IAAI,IAAI,CAAC,sBAAsB,EAAE;AAC7B,YAAA,IAAI,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;AACtD,SAAA;KACJ;IA3BD,IACI,yBAAyB,CAAC,IAAmC,EAAA;AAC7D,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KACtB;IA0BD,WAAW,GAAA;QACP,IAAI,IAAI,CAAC,sBAAsB,EAAE;AAC7B,YAAA,IAAI,CAAC,sBA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A,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kHAAnB,mBAAmB,EAAA,YAAA,EAAA,CAHb,sBAAsB,CAAA,EAAA,OAAA,EAAA,CAC3B,sBAAsB,CAAA,EAAA,CAAA,CAAA;kHAEvB,mBAAmB,EAAA,CAAA,CAAA;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE,CAAC,sBAAsB,CAAC;AACpC,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
@@ -1,8 +1,6 @@
1
- import { __decorate } from 'tslib';
2
1
  import * as i0 from '@angular/core';
3
2
  import { Directive, Inject, Input, HostListener, NgModule } from '@angular/core';
4
3
  import { WINDOW } from '@ng-web-apis/common';
5
- import { tuiDefaultProp } from '@taiga-ui/cdk/decorators';
6
4
  import { tuiGetSelectedText } from '@taiga-ui/cdk/utils';
7
5
  import { identity } from 'rxjs';
8
6
 
@@ -21,9 +19,6 @@ class TuiCopyProcessorDirective {
21
19
  }
22
20
  TuiCopyProcessorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiCopyProcessorDirective, deps: [{ token: WINDOW }], target: i0.ɵɵFactoryTarget.Directive });
23
21
  TuiCopyProcessorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiCopyProcessorDirective, selector: "[tuiCopyProcessor]", inputs: { tuiCopyProcessor: "tuiCopyProcessor" }, host: { listeners: { "copy.prevent": "onCopy($event)" } }, ngImport: i0 });
24
- __decorate([
25
- tuiDefaultProp()
26
- ], TuiCopyProcessorDirective.prototype, "tuiCopyProcessor", void 0);
27
22
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiCopyProcessorDirective, decorators: [{
28
23
  type: Directive,
29
24
  args: [{
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-directives-copy-processor.js","sources":["../../../projects/cdk/directives/copy-processor/copy-processor.directive.ts","../../../projects/cdk/directives/copy-processor/copy-processor.module.ts","../../../projects/cdk/directives/copy-processor/taiga-ui-cdk-directives-copy-processor.ts"],"sourcesContent":["import {Directive, HostListener, Inject, Input} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {tuiDefaultProp} from '@taiga-ui/cdk/decorators';\nimport {TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiGetSelectedText} from '@taiga-ui/cdk/utils';\nimport {identity} from 'rxjs';\n\n@Directive({\n selector: '[tuiCopyProcessor]',\n})\nexport class TuiCopyProcessorDirective {\n @Input()\n @tuiDefaultProp()\n tuiCopyProcessor: TuiStringHandler<string> = identity;\n\n constructor(@Inject(WINDOW) private readonly win: Window) {}\n\n @HostListener('copy.prevent', ['$event'])\n onCopy(event: ClipboardEvent): void {\n const text = tuiGetSelectedText(this.win);\n\n if (text) {\n event.clipboardData?.setData('text/plain', this.tuiCopyProcessor(text));\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiCopyProcessorDirective} from './copy-processor.directive';\n\n@NgModule({\n declarations: [TuiCopyProcessorDirective],\n exports: [TuiCopyProcessorDirective],\n})\nexport class TuiCopyProcessorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAUa,yBAAyB,CAAA;AAKlC,IAAA,WAAA,CAA6C,GAAW,EAAA;QAAX,IAAG,CAAA,GAAA,GAAH,GAAG,CAAQ;QAFxD,IAAgB,CAAA,gBAAA,GAA6B,QAAQ,CAAC;KAEM;AAG5D,IAAA,MAAM,CAAC,KAAqB,EAAA;;QACxB,MAAM,IAAI,GAAG,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE1C,QAAA,IAAI,IAAI,EAAE;AACN,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A,QAAA,EAAA,CAAA,CAAA;qHAAtB,sBAAsB,EAAA,YAAA,EAAA,CAHhB,yBAAyB,CAAA,EAAA,OAAA,EAAA,CAC9B,yBAAyB,CAAA,EAAA,CAAA,CAAA;qHAE1B,sBAAsB,EAAA,CAAA,CAAA;4FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,yBAAyB,CAAC;oBACzC,OAAO,EAAE,CAAC,yBAAyB,CAAC;AACvC,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-directives-copy-processor.js","sources":["../../../projects/cdk/directives/copy-processor/copy-processor.directive.ts","../../../projects/cdk/directives/copy-processor/copy-processor.module.ts","../../../projects/cdk/directives/copy-processor/taiga-ui-cdk-directives-copy-processor.ts"],"sourcesContent":["import {Directive, HostListener, Inject, Input} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiGetSelectedText} from '@taiga-ui/cdk/utils';\nimport {identity} from 'rxjs';\n\n@Directive({\n selector: '[tuiCopyProcessor]',\n})\nexport class TuiCopyProcessorDirective {\n @Input()\n tuiCopyProcessor: TuiStringHandler<string> = identity;\n\n constructor(@Inject(WINDOW) private readonly win: Window) {}\n\n @HostListener('copy.prevent', ['$event'])\n onCopy(event: ClipboardEvent): void {\n const text = tuiGetSelectedText(this.win);\n\n if (text) {\n event.clipboardData?.setData('text/plain', this.tuiCopyProcessor(text));\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiCopyProcessorDirective} from './copy-processor.directive';\n\n@NgModule({\n declarations: [TuiCopyProcessorDirective],\n exports: [TuiCopyProcessorDirective],\n})\nexport class TuiCopyProcessorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MASa,yBAAyB,CAAA;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,YAAY;uBAAC,cAAc,EAAE,CAAC,QAAQ,CAAC,CAAA;;;MCP/B,sBAAsB,CAAA;;oHAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;qHAAtB,sBAAsB,EAAA,YAAA,EAAA,CAHhB,yBAAyB,CAAA,EAAA,OAAA,EAAA,CAC9B,yBAAyB,CAAA,EAAA,CAAA,CAAA;qHAE1B,sBAAsB,EAAA,CAAA,CAAA;4FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,yBAAyB,CAAC;oBACzC,OAAO,EAAE,CAAC,yBAAyB,CAAC;AACvC,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
@@ -1,7 +1,5 @@
1
- import { __decorate } from 'tslib';
2
1
  import * as i0 from '@angular/core';
3
2
  import { EventEmitter, ElementRef, Directive, Inject, Input, HostBinding, Output, HostListener, NgModule } from '@angular/core';
4
- import { tuiDefaultProp, tuiRequiredSetter } from '@taiga-ui/cdk/decorators';
5
3
 
6
4
  class TuiMediaDirective {
7
5
  constructor(el) {
@@ -58,15 +56,6 @@ class TuiMediaDirective {
58
56
  }
59
57
  TuiMediaDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiMediaDirective, deps: [{ token: ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
60
58
  TuiMediaDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiMediaDirective, selector: "video[tuiMedia], audio[tuiMedia]", inputs: { volume: "volume", playbackRateSetter: ["playbackRate", "playbackRateSetter"], currentTime: "currentTime", paused: "paused" }, outputs: { currentTimeChange: "currentTimeChange", pausedChange: "pausedChange", volumeChange: "volumeChange" }, host: { listeners: { "ended": "onPausedChange(true)", "pause": "onPausedChange(true)", "play": "onPausedChange(false)", "volumechange": "onVolumeChange()", "timeupdate": "onCurrentTimeChange()", "seeking": "onCurrentTimeChange()", "seeked": "onCurrentTimeChange()", "durationchange": "changeDetectionTrigger()" }, properties: { "volume": "this.volume" } }, exportAs: ["tuiMedia"], ngImport: i0 });
61
- __decorate([
62
- tuiDefaultProp((volume) => Number.isFinite(volume) && volume >= 0 && volume <= 1)
63
- ], TuiMediaDirective.prototype, "volume", void 0);
64
- __decorate([
65
- tuiRequiredSetter(nonNegativeFiniteAssertion)
66
- ], TuiMediaDirective.prototype, "playbackRateSetter", null);
67
- __decorate([
68
- tuiRequiredSetter(nonNegativeFiniteAssertion)
69
- ], TuiMediaDirective.prototype, "currentTime", null);
70
59
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiMediaDirective, decorators: [{
71
60
  type: Directive,
72
61
  args: [{
@@ -119,9 +108,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
119
108
  type: HostListener,
120
109
  args: ['durationchange']
121
110
  }] } });
122
- function nonNegativeFiniteAssertion(value) {
123
- return Number.isFinite(value) && value >= 0;
124
- }
125
111
 
126
112
  class TuiMediaModule {
127
113
  }
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-directives-media.js","sources":["../../../projects/cdk/directives/media/media.directive.ts","../../../projects/cdk/directives/media/media.module.ts","../../../projects/cdk/directives/media/taiga-ui-cdk-directives-media.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Output,\n} from '@angular/core';\nimport {tuiDefaultProp, tuiRequiredSetter} from '@taiga-ui/cdk/decorators';\n\n@Directive({\n selector: 'video[tuiMedia], audio[tuiMedia]',\n exportAs: 'tuiMedia',\n})\nexport class TuiMediaDirective {\n private playbackRate = 1;\n\n @Input()\n @HostBinding('volume')\n @tuiDefaultProp(\n (volume: number) => Number.isFinite(volume) && volume >= 0 && volume <= 1,\n )\n volume = 1;\n\n @Input('playbackRate')\n @tuiRequiredSetter(nonNegativeFiniteAssertion)\n set playbackRateSetter(playbackRate: number) {\n this.updatePlaybackRate(playbackRate);\n }\n\n @Output()\n readonly currentTimeChange = new EventEmitter<number>();\n\n @Output()\n readonly pausedChange = new EventEmitter<boolean>();\n\n @Output()\n readonly volumeChange = new EventEmitter<number>();\n\n constructor(\n @Inject(ElementRef)\n private readonly el: ElementRef<HTMLMediaElement>,\n ) {}\n\n @Input()\n @tuiRequiredSetter(nonNegativeFiniteAssertion)\n set currentTime(currentTime: number) {\n if (Math.abs(currentTime - this.currentTime) > 0.05) {\n this.el.nativeElement.currentTime = currentTime;\n }\n }\n\n get currentTime(): number {\n return this.el.nativeElement.currentTime;\n }\n\n @Input()\n set paused(paused: boolean) {\n if (paused) {\n this.el.nativeElement.pause();\n } else {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.el.nativeElement.play();\n this.updatePlaybackRate(this.playbackRate);\n }\n }\n\n get paused(): boolean {\n return this.el.nativeElement.paused;\n }\n\n // @bad TODO: Make sure no other events can affect this like network issues etc.\n @HostListener('ended', ['true'])\n @HostListener('pause', ['true'])\n @HostListener('play', ['false'])\n onPausedChange(paused: boolean): void {\n this.pausedChange.emit(paused);\n this.updatePlaybackRate(this.playbackRate);\n }\n\n @HostListener('volumechange')\n onVolumeChange(): void {\n this.volume = this.el.nativeElement.volume;\n this.volumeChange.emit(this.volume);\n }\n\n @HostListener('timeupdate')\n @HostListener('seeking')\n @HostListener('seeked')\n onCurrentTimeChange(): void {\n this.currentTimeChange.emit(this.currentTime);\n }\n\n @HostListener('durationchange')\n changeDetectionTrigger(): void {\n // @bad TODO: consider if other events need to trigger CD\n }\n\n private updatePlaybackRate(playbackRate: number): void {\n this.playbackRate = playbackRate;\n this.el.nativeElement.playbackRate = this.playbackRate;\n }\n}\n\nfunction nonNegativeFiniteAssertion(value: number): boolean {\n return Number.isFinite(value) && value >= 0;\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiMediaDirective} from './media.directive';\n\n@NgModule({\n declarations: [TuiMediaDirective],\n exports: [TuiMediaDirective],\n})\nexport class TuiMediaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAgBa,iBAAiB,CAAA;AAyB1B,IAAA,WAAA,CAEqB,EAAgC,EAAA;QAAhC,IAAE,CAAA,EAAA,GAAF,EAAE,CAA8B;QA1B7C,IAAY,CAAA,YAAA,GAAG,CAAC,CAAC;QAOzB,IAAM,CAAA,MAAA,GAAG,CAAC,CAAC;AASF,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,YAAY,EAAU,CAAC;AAG/C,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,YAAY,EAAW,CAAC;AAG3C,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,YAAY,EAAU,CAAC;KAK/C;IAhBJ,IAAI,kBAAkB,CAAC,YAAoB,EAAA;AACvC,QAAA,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;KACzC;IAkBD,IAAI,WAAW,CAAC,WAAmB,EAAA;AAC/B,QAAA,IAAI,IAAI,CAAC,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,EAAE;YACjD,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,WAAW,GAAG,WAAW,CAAC;AACnD,SAAA;KACJ;AAED,IAAA,IAAI,WAAW,GAAA;AACX,QAAA,OAAO,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,WAAW,CAAC;KAC5C;IAED,IACI,MAAM,CAAC,MAAe,EAAA;AACtB,QAAA,IAAI,MAAM,EAAE;AACR,YAAA,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;AACjC,SAAA;AAAM,aAAA;;AAEH,YAAA,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,IA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QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,iBAAiB,CAAC;oBACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;AAC/B,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-directives-media.js","sources":["../../../projects/cdk/directives/media/media.directive.ts","../../../projects/cdk/directives/media/media.module.ts","../../../projects/cdk/directives/media/taiga-ui-cdk-directives-media.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Output,\n} from '@angular/core';\n\n@Directive({\n selector: 'video[tuiMedia], audio[tuiMedia]',\n exportAs: 'tuiMedia',\n})\nexport class TuiMediaDirective {\n private playbackRate = 1;\n\n @Input()\n @HostBinding('volume')\n volume = 1;\n\n @Input('playbackRate')\n set playbackRateSetter(playbackRate: number) {\n this.updatePlaybackRate(playbackRate);\n }\n\n @Output()\n readonly currentTimeChange = new EventEmitter<number>();\n\n @Output()\n readonly pausedChange = new EventEmitter<boolean>();\n\n @Output()\n readonly volumeChange = new EventEmitter<number>();\n\n constructor(\n @Inject(ElementRef)\n private readonly el: ElementRef<HTMLMediaElement>,\n ) {}\n\n @Input()\n set currentTime(currentTime: number) {\n if (Math.abs(currentTime - this.currentTime) > 0.05) {\n this.el.nativeElement.currentTime = currentTime;\n }\n }\n\n get currentTime(): number {\n return this.el.nativeElement.currentTime;\n }\n\n @Input()\n set paused(paused: boolean) {\n if (paused) {\n this.el.nativeElement.pause();\n } else {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.el.nativeElement.play();\n this.updatePlaybackRate(this.playbackRate);\n }\n }\n\n get paused(): boolean {\n return this.el.nativeElement.paused;\n }\n\n // @bad TODO: Make sure no other events can affect this like network issues etc.\n @HostListener('ended', ['true'])\n @HostListener('pause', ['true'])\n @HostListener('play', ['false'])\n onPausedChange(paused: boolean): void {\n this.pausedChange.emit(paused);\n this.updatePlaybackRate(this.playbackRate);\n }\n\n @HostListener('volumechange')\n onVolumeChange(): void {\n this.volume = this.el.nativeElement.volume;\n this.volumeChange.emit(this.volume);\n }\n\n @HostListener('timeupdate')\n @HostListener('seeking')\n @HostListener('seeked')\n onCurrentTimeChange(): void {\n this.currentTimeChange.emit(this.currentTime);\n }\n\n @HostListener('durationchange')\n changeDetectionTrigger(): void {\n // @bad TODO: consider if other events need to trigger CD\n }\n\n private updatePlaybackRate(playbackRate: number): void {\n this.playbackRate = playbackRate;\n this.el.nativeElement.playbackRate = this.playbackRate;\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiMediaDirective} from './media.directive';\n\n@NgModule({\n declarations: [TuiMediaDirective],\n exports: [TuiMediaDirective],\n})\nexport class TuiMediaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAea,iBAAiB,CAAA;AAqB1B,IAAA,WAAA,CAEqB,EAAgC,EAAA;QAAhC,IAAE,CAAA,EAAA,GAAF,EAAE,CAA8B;QAtB7C,IAAY,CAAA,YAAA,GAAG,CAAC,CAAC;QAIzB,IAAM,CAAA,MAAA,GAAG,CAAC,CAAC;AAQF,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,YAAY,EAAU,CAAC;AAG/C,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,YAAY,EAAW,CAAC;AAG3C,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,YAAY,EAAU,CAAC;KAK/C;IAjBJ,IACI,kBAAkB,CAAC,YAAoB,EAAA;AACvC,QAAA,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;KACzC;IAgBD,IACI,WAAW,CAAC,WAAmB,EAAA;AAC/B,QAAA,IAAI,IAAI,CAAC,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,EAAE;YACjD,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,WAAW,GAAG,WAAW,CAA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iB,EAAA,CAAA;sBADzB,MAAM;gBAIE,YAAY,EAAA,CAAA;sBADpB,MAAM;gBAIE,YAAY,EAAA,CAAA;sBADpB,MAAM;gBASH,WAAW,EAAA,CAAA;sBADd,KAAK;gBAYF,MAAM,EAAA,CAAA;sBADT,KAAK;gBAmBN,cAAc,EAAA,CAAA;sBAHb,YAAY;uBAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAA;;sBAC9B,YAAY;uBAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAA;;sBAC9B,YAAY;uBAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAA;gBAO/B,cAAc,EAAA,CAAA;sBADb,YAAY;uBAAC,cAAc,CAAA;gBAS5B,mBAAmB,EAAA,CAAA;sBAHlB,YAAY;uBAAC,YAAY,CAAA;;sBACzB,YAAY;uBAAC,SAAS,CAAA;;sBACtB,YAAY;uBAAC,QAAQ,CAAA;gBAMtB,sBAAsB,EAAA,CAAA;sBADrB,YAAY;uBAAC,gBAAgB,CAAA;;;MCjFrB,cAAc,CAAA;;4GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;6GAAd,cAAc,EAAA,YAAA,EAAA,CAHR,iBAAiB,CAAA,EAAA,OAAA,EAAA,CACtB,iBAAiB,CAAA,EAAA,CAAA,CAAA;6GAElB,cAAc,EAAA,CAAA,CAAA;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,iBAAiB,CAAC;oBACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;AAC/B,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
@@ -1,7 +1,5 @@
1
- import { __decorate } from 'tslib';
2
1
  import * as i0 from '@angular/core';
3
2
  import { Directive, Optional, Inject, Self, Input, Output, NgModule } from '@angular/core';
4
- import { tuiRequiredSetter } from '@taiga-ui/cdk/decorators';
5
3
  import * as i1 from '@taiga-ui/cdk/directives/active-zone';
6
4
  import { TuiActiveZoneDirective } from '@taiga-ui/cdk/directives/active-zone';
7
5
  import { tuiIfMap } from '@taiga-ui/cdk/observables';
@@ -28,9 +26,6 @@ class TuiObscuredDirective {
28
26
  }
29
27
  TuiObscuredDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiObscuredDirective, deps: [{ token: TuiActiveZoneDirective, optional: true }, { token: TuiObscuredService, self: true }], target: i0.ɵɵFactoryTarget.Directive });
30
28
  TuiObscuredDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiObscuredDirective, selector: "[tuiObscured]", inputs: { tuiObscuredEnabled: "tuiObscuredEnabled" }, outputs: { tuiObscured: "tuiObscured" }, providers: [TuiObscuredService, TuiParentsScrollService, TuiDestroyService], ngImport: i0 });
31
- __decorate([
32
- tuiRequiredSetter()
33
- ], TuiObscuredDirective.prototype, "tuiObscuredEnabled", null);
34
29
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiObscuredDirective, decorators: [{
35
30
  type: Directive,
36
31
  args: [{
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-directives-obscured.js","sources":["../../../projects/cdk/directives/obscured/obscured.directive.ts","../../../projects/cdk/directives/obscured/obscured.module.ts","../../../projects/cdk/directives/obscured/taiga-ui-cdk-directives-obscured.ts"],"sourcesContent":["import {Directive, Inject, Input, Optional, Output, Self} from '@angular/core';\nimport {tuiRequiredSetter} from '@taiga-ui/cdk/decorators';\nimport {TuiActiveZoneDirective} from '@taiga-ui/cdk/directives/active-zone';\nimport {tuiIfMap} from '@taiga-ui/cdk/observables';\nimport {\n TuiDestroyService,\n TuiObscuredService,\n TuiParentsScrollService,\n} from '@taiga-ui/cdk/services';\nimport {Observable, Subject} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\n/**\n * Directive that monitors element visibility\n */\n@Directive({\n selector: '[tuiObscured]',\n providers: [TuiObscuredService, TuiParentsScrollService, TuiDestroyService],\n})\nexport class TuiObscuredDirective {\n private readonly enabled$ = new Subject<boolean>();\n\n @Input()\n @tuiRequiredSetter()\n set tuiObscuredEnabled(enabled: boolean) {\n this.enabled$.next(enabled);\n }\n\n @Output()\n readonly tuiObscured: Observable<boolean>;\n\n constructor(\n @Optional()\n @Inject(TuiActiveZoneDirective)\n activeZone: TuiActiveZoneDirective | null,\n @Self()\n @Inject(TuiObscuredService)\n obscured$: TuiObscuredService,\n ) {\n const mapped$ = obscured$.pipe(\n map(\n obscuredBy =>\n !!obscuredBy &&\n (!activeZone ||\n !obscuredBy.length ||\n obscuredBy.every(element => !activeZone.contains(element))),\n ),\n );\n\n this.tuiObscured = this.enabled$.pipe(tuiIfMap(() => mapped$));\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiObscuredDirective} from './obscured.directive';\n\n@NgModule({\n declarations: [TuiObscuredDirective],\n exports: [TuiObscuredDirective],\n})\nexport class TuiObscuredModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAYA;;AAEG;MAKU,oBAAoB,CAAA;IAY7B,WAGI,CAAA,UAAyC,EAGzC,SAA6B,EAAA;AAjBhB,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,OAAO,EAAW,CAAC;AAmB/C,QAAA,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,CAC1B,GAAG,CACC,UAAU,IACN,CAAC,CAAC,UAAU;AACZ,aAAC,CAAC,UAAU;gBACR,CAAC,UAAU,CAAC,MAAM;AAClB,gBAAA,UAAU,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CACtE,CACJ,CAAC;AAEF,QAAA,IAAI,CAAC,WAAW,G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AiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAjB,iBAAiB,EAAA,YAAA,EAAA,CAHX,oBAAoB,CAAA,EAAA,OAAA,EAAA,CACzB,oBAAoB,CAAA,EAAA,CAAA,CAAA;gHAErB,iBAAiB,EAAA,CAAA,CAAA;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,oBAAoB,CAAC;oBACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAClC,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-directives-obscured.js","sources":["../../../projects/cdk/directives/obscured/obscured.directive.ts","../../../projects/cdk/directives/obscured/obscured.module.ts","../../../projects/cdk/directives/obscured/taiga-ui-cdk-directives-obscured.ts"],"sourcesContent":["import {Directive, Inject, Input, Optional, Output, Self} from '@angular/core';\nimport {TuiActiveZoneDirective} from '@taiga-ui/cdk/directives/active-zone';\nimport {tuiIfMap} from '@taiga-ui/cdk/observables';\nimport {\n TuiDestroyService,\n TuiObscuredService,\n TuiParentsScrollService,\n} from '@taiga-ui/cdk/services';\nimport {Observable, Subject} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\n/**\n * Directive that monitors element visibility\n */\n@Directive({\n selector: '[tuiObscured]',\n providers: [TuiObscuredService, TuiParentsScrollService, TuiDestroyService],\n})\nexport class TuiObscuredDirective {\n private readonly enabled$ = new Subject<boolean>();\n\n @Input()\n set tuiObscuredEnabled(enabled: boolean) {\n this.enabled$.next(enabled);\n }\n\n @Output()\n readonly tuiObscured: Observable<boolean>;\n\n constructor(\n @Optional()\n @Inject(TuiActiveZoneDirective)\n activeZone: TuiActiveZoneDirective | null,\n @Self()\n @Inject(TuiObscuredService)\n obscured$: TuiObscuredService,\n ) {\n const mapped$ = obscured$.pipe(\n map(\n obscuredBy =>\n !!obscuredBy &&\n (!activeZone ||\n !obscuredBy.length ||\n obscuredBy.every(element => !activeZone.contains(element))),\n ),\n );\n\n this.tuiObscured = this.enabled$.pipe(tuiIfMap(() => mapped$));\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiObscuredDirective} from './obscured.directive';\n\n@NgModule({\n declarations: [TuiObscuredDirective],\n exports: [TuiObscuredDirective],\n})\nexport class TuiObscuredModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAWA;;AAEG;MAKU,oBAAoB,CAAA;IAW7B,WAGI,CAAA,UAAyC,EAGzC,SAA6B,EAAA;AAhBhB,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,OAAO,EAAW,CAAC;AAkB/C,QAAA,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,CAC1B,GAAG,CACC,UAAU,IACN,CAAC,CAAC,UAAU;AACZ,aAAC,CAAC,UAAU;gBACR,CAAC,UAAU,CAAC,MAAM;AAClB,gBAAA,UAAU,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CACtE,CACJ,CAAC;AAEF,QAAA,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC;KAClE;IA3BD,IACI,kBAAkB,CAAC,OAAgB,EAAA;AACnC,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KAC/B;;kHANQ,oBAAoB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAajB,sBAAsB,EAAA,QAAA,EAAA,IAAA,EAAA,EAAA,EAAA,KAAA,EAGtB,kBAAkB,EAAA,IAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,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ject, Input, NgModule } from '@angular/core';
4
- import { tuiRequiredSetter } from '@taiga-ui/cdk/decorators';
5
3
  import { tuiClamp } from '@taiga-ui/cdk/utils/math';
6
4
 
7
5
  const MAX_VALUE = 0x10000;
@@ -45,9 +43,6 @@ class TuiRepeatTimesDirective {
45
43
  }
46
44
  TuiRepeatTimesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiRepeatTimesDirective, deps: [{ token: ViewContainerRef }, { token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
47
45
  TuiRepeatTimesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiRepeatTimesDirective, selector: "[tuiRepeatTimes][tuiRepeatTimesOf]", inputs: { tuiRepeatTimesOf: "tuiRepeatTimesOf" }, ngImport: i0 });
48
- __decorate([
49
- tuiRequiredSetter()
50
- ], TuiRepeatTimesDirective.prototype, "tuiRepeatTimesOf", null);
51
46
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiRepeatTimesDirective, decorators: [{
52
47
  type: Directive,
53
48
  args: [{
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-directives-repeat-times.js","sources":["../../../projects/cdk/directives/repeat-times/repeat-times.directive.ts","../../../projects/cdk/directives/repeat-times/repeat-times.module.ts","../../../projects/cdk/directives/repeat-times/taiga-ui-cdk-directives-repeat-times.ts"],"sourcesContent":["import {Directive, Inject, Input, TemplateRef, ViewContainerRef} from '@angular/core';\nimport {tuiRequiredSetter} from '@taiga-ui/cdk/decorators';\nimport {TuiContextWithImplicit} from '@taiga-ui/cdk/interfaces';\nimport {tuiClamp} from '@taiga-ui/cdk/utils/math';\n\nconst MAX_VALUE = 0x10000;\n\nexport class TuiRepeatTimesContext implements TuiContextWithImplicit<number> {\n constructor(readonly $implicit: number) {}\n}\n\n/**\n * Directive similar to ngFor but using a number of repetitions rather than an array\n *\n * {@link TuiRepeatTimesDirective.tuiRepeatTimesOf requested number of times}.\n * {@link TuiRepeatTimesContext context} for every instance of the template inherits outer context and stores\n * {@link TuiRepeatTimesContext.$implicit index} of a template instance.\n */\n@Directive({\n selector: '[tuiRepeatTimes][tuiRepeatTimesOf]',\n})\nexport class TuiRepeatTimesDirective {\n @Input()\n @tuiRequiredSetter()\n set tuiRepeatTimesOf(count: number) {\n const safeCount = Math.floor(tuiClamp(count, 0, MAX_VALUE));\n\n const {length} = this.viewContainer;\n\n if (count < length) {\n this.removeContainers(length - count);\n } else {\n this.addContainers(safeCount);\n }\n }\n\n constructor(\n @Inject(ViewContainerRef)\n private readonly viewContainer: ViewContainerRef,\n @Inject(TemplateRef)\n private readonly templateRef: TemplateRef<TuiRepeatTimesContext>,\n ) {}\n\n private addContainers(count: number): void {\n for (let index = this.viewContainer.length; index < count; index++) {\n this.viewContainer.createEmbeddedView<TuiRepeatTimesContext>(\n this.templateRef,\n new TuiRepeatTimesContext(index),\n );\n }\n }\n\n private removeContainers(amount: number): void {\n for (let index = 0; index < amount; index++) {\n this.viewContainer.remove();\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiRepeatTimesDirective} from './repeat-times.directive';\n\n@NgModule({\n declarations: [TuiRepeatTimesDirective],\n exports: [TuiRepeatTimesDirective],\n})\nexport class TuiRepeatTimesModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAKA,MAAM,SAAS,GAAG,OAAO,CAAC;MAEb,qBAAqB,CAAA;AAC9B,IAAA,WAAA,CAAqB,SAAiB,EAAA;QAAjB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAQ;KAAI;AAC7C,CAAA;AAED;;;;;;AAMG;MAIU,uBAAuB,CAAA;IAehC,WAEqB,CAAA,aAA+B,EAE/B,WAA+C,EAAA;QAF/C,IAAa,CAAA,aAAA,GAAb,aAAa,CAAkB;QAE/B,IAAW,CAAA,WAAA,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EAAA,EAAA,CAAA,CAAA;AAGhC,UAAA,CAAA;AADC,IAAA,iBAAiB,EAAE;AAWnB,CAAA,EAAA,uBAAA,CAAA,SAAA,EAAA,kBAAA,EAAA,IAAA,CAAA,CAAA;4FAbQ,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAHnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,oCAAoC;AACjD,iBAAA,CAAA;;0BAiBQ,MAAM;2BAAC,gBAAgB,CAAA;;0BAEvB,MAAM;2BAAC,WAAW,CAAA;4CAfnB,gBAAgB,EAAA,CAAA;sBAFnB,KAAK;;;MCdG,oBAAoB,CAAA;;kHAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;mHAApB,oBAAoB,EAAA,YAAA,EAAA,CAHd,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAC5B,uBAAuB,CAAA,EAAA,CAAA,CAAA;mHAExB,oBAAoB,EAAA,CAAA,CAAA;4FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,uBAAuB,CAAC;oBACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;AACrC,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-directives-repeat-times.js","sources":["../../../projects/cdk/directives/repeat-times/repeat-times.directive.ts","../../../projects/cdk/directives/repeat-times/repeat-times.module.ts","../../../projects/cdk/directives/repeat-times/taiga-ui-cdk-directives-repeat-times.ts"],"sourcesContent":["import {Directive, Inject, Input, TemplateRef, ViewContainerRef} from '@angular/core';\nimport {TuiContextWithImplicit} from '@taiga-ui/cdk/interfaces';\nimport {tuiClamp} from '@taiga-ui/cdk/utils/math';\n\nconst MAX_VALUE = 0x10000;\n\nexport class TuiRepeatTimesContext implements TuiContextWithImplicit<number> {\n constructor(readonly $implicit: number) {}\n}\n\n/**\n * Directive similar to ngFor but using a number of repetitions rather than an array\n *\n * {@link TuiRepeatTimesDirective.tuiRepeatTimesOf requested number of times}.\n * {@link TuiRepeatTimesContext context} for every instance of the template inherits outer context and stores\n * {@link TuiRepeatTimesContext.$implicit index} of a template instance.\n */\n@Directive({\n selector: '[tuiRepeatTimes][tuiRepeatTimesOf]',\n})\nexport class TuiRepeatTimesDirective {\n @Input()\n set tuiRepeatTimesOf(count: number) {\n const safeCount = Math.floor(tuiClamp(count, 0, MAX_VALUE));\n\n const {length} = this.viewContainer;\n\n if (count < length) {\n this.removeContainers(length - count);\n } else {\n this.addContainers(safeCount);\n }\n }\n\n constructor(\n @Inject(ViewContainerRef)\n private readonly viewContainer: ViewContainerRef,\n @Inject(TemplateRef)\n private readonly templateRef: TemplateRef<TuiRepeatTimesContext>,\n ) {}\n\n private addContainers(count: number): void {\n for (let index = this.viewContainer.length; index < count; index++) {\n this.viewContainer.createEmbeddedView<TuiRepeatTimesContext>(\n this.templateRef,\n new TuiRepeatTimesContext(index),\n );\n }\n }\n\n private removeContainers(amount: number): void {\n for (let index = 0; index < amount; index++) {\n this.viewContainer.remove();\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiRepeatTimesDirective} from './repeat-times.directive';\n\n@NgModule({\n declarations: [TuiRepeatTimesDirective],\n exports: [TuiRepeatTimesDirective],\n})\nexport class TuiRepeatTimesModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAIA,MAAM,SAAS,GAAG,OAAO,CAAC;MAEb,qBAAqB,CAAA;AAC9B,IAAA,WAAA,CAAqB,SAAiB,EAAA;QAAjB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAQ;KAAI;AAC7C,CAAA;AAED;;;;;;AAMG;MAIU,uBAAuB,CAAA;IAchC,WAEqB,CAAA,aAA+B,EAE/B,WAA+C,EAAA;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AA,MAAA,EAAA,EAAA,gBAAA,EAAA,kBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;4FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAHnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,oCAAoC;AACjD,iBAAA,CAAA;;0BAgBQ,MAAM;2BAAC,gBAAgB,CAAA;;0BAEvB,MAAM;2BAAC,WAAW,CAAA;4CAfnB,gBAAgB,EAAA,CAAA;sBADnB,KAAK;;;MCbG,oBAAoB,CAAA;;kHAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;mHAApB,oBAAoB,EAAA,YAAA,EAAA,CAHd,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAC5B,uBAAuB,CAAA,EAAA,CAAA,CAAA;mHAExB,oBAAoB,EAAA,CAAA,CAAA;4FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,uBAAuB,CAAC;oBACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;AACrC,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
@@ -1,8 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Directive, EventEmitter, Inject, Input, Output, HostBinding, HostListener, NgModule } from '@angular/core';
3
3
  import { TuiElementDirective } from '@taiga-ui/cdk/directives/element';
4
- import { __decorate } from 'tslib';
5
- import { tuiDefaultProp } from '@taiga-ui/cdk/decorators';
6
4
  import { tuiPx } from '@taiga-ui/cdk/utils/format';
7
5
 
8
6
  class TuiResizeableDirective extends TuiElementDirective {
@@ -82,9 +80,6 @@ class TuiResizerDirective {
82
80
  }
83
81
  TuiResizerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiResizerDirective, deps: [{ token: TuiResizeableDirective }], target: i0.ɵɵFactoryTarget.Directive });
84
82
  TuiResizerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiResizerDirective, selector: "[tuiResizer]", inputs: { tuiResizer: "tuiResizer" }, outputs: { tuiSizeChange: "tuiSizeChange" }, host: { listeners: { "touchstart.silent.passive": "onTouchStart($event)", "mousedown.silent.prevent": "onMouseDown($event.x,$event.y)", "document:mousemove.silent": "onMouseMove($event)", "document:touchmove.silent": "onTouchMove($event)", "document:mouseup.silent": "onMouseUp()", "document:touchend.silent": "onMouseUp()" }, properties: { "style.touchAction": "\"none\"", "style.cursor": "this.cursor" } }, ngImport: i0 });
85
- __decorate([
86
- tuiDefaultProp()
87
- ], TuiResizerDirective.prototype, "tuiResizer", void 0);
88
83
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiResizerDirective, decorators: [{
89
84
  type: Directive,
90
85
  args: [{
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-directives-resizer.js","sources":["../../../projects/cdk/directives/resizer/resizeable.directive.ts","../../../projects/cdk/directives/resizer/resizer.directive.ts","../../../projects/cdk/directives/resizer/resizer.module.ts","../../../projects/cdk/directives/resizer/taiga-ui-cdk-directives-resizer.ts"],"sourcesContent":["import {Directive} from '@angular/core';\nimport {TuiElementDirective} from '@taiga-ui/cdk/directives/element';\n\n@Directive({\n selector: '[tuiResizeable]',\n})\nexport class TuiResizeableDirective extends TuiElementDirective {}\n","import {\n Directive,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Output,\n} from '@angular/core';\nimport {tuiDefaultProp} from '@taiga-ui/cdk/decorators';\nimport {tuiPx} from '@taiga-ui/cdk/utils/format';\n\nimport {TuiResizeableDirective} from './resizeable.directive';\n\n// TODO: Migrate to PointerEvent in 4.0\n@Directive({\n selector: '[tuiResizer]',\n host: {'[style.touchAction]': '\"none\"'},\n})\nexport class TuiResizerDirective {\n @Input()\n @tuiDefaultProp()\n tuiResizer: readonly [x: number, y: number] = [0, 0];\n\n @Output()\n readonly tuiSizeChange = new EventEmitter<readonly [x: number, y: number]>();\n\n x = NaN;\n y = NaN;\n width = 0;\n height = 0;\n\n constructor(\n @Inject(TuiResizeableDirective)\n private readonly resizeable: ElementRef<HTMLElement>,\n ) {}\n\n @HostBinding('style.cursor')\n get cursor(): string {\n if (!this.tuiResizer[0]) {\n return 'ns-resize';\n }\n\n if (!this.tuiResizer[1]) {\n return 'ew-resize';\n }\n\n if (this.tuiResizer[0] * this.tuiResizer[1] > 0) {\n return 'nwse-resize';\n }\n\n return 'nesw-resize';\n }\n\n @HostListener('touchstart.silent.passive', ['$event'])\n onTouchStart({touches}: TouchEvent): void {\n this.onMouseDown(touches[0].clientX, touches[0].clientY);\n }\n\n @HostListener('mousedown.silent.prevent', ['$event.x', '$event.y'])\n onMouseDown(x: number, y: number): void {\n this.x = x;\n this.y = y;\n this.width = this.resizeable.nativeElement.clientWidth;\n this.height = this.resizeable.nativeElement.clientHeight;\n }\n\n @HostListener('document:mousemove.silent', ['$event'])\n onMouseMove({x, y, buttons}: MouseEvent): void {\n if (!buttons) {\n this.onMouseUp();\n } else {\n this.onMove(x, y);\n }\n }\n\n @HostListener('document:touchmove.silent', ['$event'])\n onTouchMove({touches}: TouchEvent): void {\n this.onMove(touches[0].clientX, touches[0].clientY);\n }\n\n @HostListener('document:mouseup.silent')\n @HostListener('document:touchend.silent')\n onMouseUp(): void {\n this.x = NaN;\n }\n\n onMove(x: number, y: number): void {\n if (Number.isNaN(this.x)) {\n return;\n }\n\n const {style} = this.resizeable.nativeElement;\n const size = [\n this.width + this.tuiResizer[0] * (x - this.x),\n this.height + this.tuiResizer[1] * (y - this.y),\n ] as const;\n\n if (this.tuiResizer[0]) {\n style.width = tuiPx(size[0]);\n }\n\n if (this.tuiResizer[1]) {\n style.height = tuiPx(size[1]);\n }\n\n this.tuiSizeChange.emit(size);\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiResizeableDirective} from './resizeable.directive';\nimport {TuiResizerDirective} from './resizer.directive';\n\n@NgModule({\n declarations: [TuiResizeableDirective, TuiResizerDirective],\n exports: [TuiResizeableDirective, TuiResizerDirective],\n})\nexport class TuiResizerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAMM,MAAO,sBAAuB,SAAQ,mBAAmB,CAAA;;oHAAlD,sBAAsB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;wGAAtB,sBAAsB,EAAA,QAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;4FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,iBAAiB;AAC9B,iBAAA,CAAA;;;ACUD;MAKa,mBAAmB,CAAA;AAa5B,IAAA,WAAA,CAEqB,UAAmC,EAAA;QAAnC,IAAU,CAAA,UAAA,GAAV,UAAU,CAAyB;AAZxD,QAAA,IAAA,CAAA,UAAU,GAAoC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAG5C,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,YAAY,EAAmC,CAAC;QAE7E,IAAC,CAAA,CAAA,GAAG,GAAG,CAAC;QACR,IAAC,CAAA,CAAA,GAAG,GAAG,CAAC;QACR,IAAK,CAAA,KAAA,GAAG,CAAC,CAAC;QACV,IAAM,CAAA,MAAA,GAAG,CAAC,CAAC;KAKP;AAEJ,IAAA,IACI,MAAM,GAAA;AACN,QAAA,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;AACrB,YAAA,OAAO,WAAW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AC,CAAA;gBAOrD,SAAS,EAAA,CAAA;sBAFR,YAAY;uBAAC,yBAAyB,CAAA;;sBACtC,YAAY;uBAAC,0BAA0B,CAAA;;;MC1E/B,gBAAgB,CAAA;;8GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAhB,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,iBAHV,sBAAsB,EAAE,mBAAmB,CAChD,EAAA,OAAA,EAAA,CAAA,sBAAsB,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA;+GAE5C,gBAAgB,EAAA,CAAA,CAAA;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,sBAAsB,EAAE,mBAAmB,CAAC;AAC3D,oBAAA,OAAO,EAAE,CAAC,sBAAsB,EAAE,mBAAmB,CAAC;AACzD,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-directives-resizer.js","sources":["../../../projects/cdk/directives/resizer/resizeable.directive.ts","../../../projects/cdk/directives/resizer/resizer.directive.ts","../../../projects/cdk/directives/resizer/resizer.module.ts","../../../projects/cdk/directives/resizer/taiga-ui-cdk-directives-resizer.ts"],"sourcesContent":["import {Directive} from '@angular/core';\nimport {TuiElementDirective} from '@taiga-ui/cdk/directives/element';\n\n@Directive({\n selector: '[tuiResizeable]',\n})\nexport class TuiResizeableDirective extends TuiElementDirective {}\n","import {\n Directive,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Output,\n} from '@angular/core';\nimport {tuiPx} from '@taiga-ui/cdk/utils/format';\n\nimport {TuiResizeableDirective} from './resizeable.directive';\n\n// TODO: Migrate to PointerEvent in 4.0\n@Directive({\n selector: '[tuiResizer]',\n host: {'[style.touchAction]': '\"none\"'},\n})\nexport class TuiResizerDirective {\n @Input()\n tuiResizer: readonly [x: number, y: number] = [0, 0];\n\n @Output()\n readonly tuiSizeChange = new EventEmitter<readonly [x: number, y: number]>();\n\n x = NaN;\n y = NaN;\n width = 0;\n height = 0;\n\n constructor(\n @Inject(TuiResizeableDirective)\n private readonly resizeable: ElementRef<HTMLElement>,\n ) {}\n\n @HostBinding('style.cursor')\n get cursor(): string {\n if (!this.tuiResizer[0]) {\n return 'ns-resize';\n }\n\n if (!this.tuiResizer[1]) {\n return 'ew-resize';\n }\n\n if (this.tuiResizer[0] * this.tuiResizer[1] > 0) {\n return 'nwse-resize';\n }\n\n return 'nesw-resize';\n }\n\n @HostListener('touchstart.silent.passive', ['$event'])\n onTouchStart({touches}: TouchEvent): void {\n this.onMouseDown(touches[0].clientX, touches[0].clientY);\n }\n\n @HostListener('mousedown.silent.prevent', ['$event.x', '$event.y'])\n onMouseDown(x: number, y: number): void {\n this.x = x;\n this.y = y;\n this.width = this.resizeable.nativeElement.clientWidth;\n this.height = this.resizeable.nativeElement.clientHeight;\n }\n\n @HostListener('document:mousemove.silent', ['$event'])\n onMouseMove({x, y, buttons}: MouseEvent): void {\n if (!buttons) {\n this.onMouseUp();\n } else {\n this.onMove(x, y);\n }\n }\n\n @HostListener('document:touchmove.silent', ['$event'])\n onTouchMove({touches}: TouchEvent): void {\n this.onMove(touches[0].clientX, touches[0].clientY);\n }\n\n @HostListener('document:mouseup.silent')\n @HostListener('document:touchend.silent')\n onMouseUp(): void {\n this.x = NaN;\n }\n\n onMove(x: number, y: number): void {\n if (Number.isNaN(this.x)) {\n return;\n }\n\n const {style} = this.resizeable.nativeElement;\n const size = [\n this.width + this.tuiResizer[0] * (x - this.x),\n this.height + this.tuiResizer[1] * (y - this.y),\n ] as const;\n\n if (this.tuiResizer[0]) {\n style.width = tuiPx(size[0]);\n }\n\n if (this.tuiResizer[1]) {\n style.height = tuiPx(size[1]);\n }\n\n this.tuiSizeChange.emit(size);\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiResizeableDirective} from './resizeable.directive';\nimport {TuiResizerDirective} from './resizer.directive';\n\n@NgModule({\n declarations: [TuiResizeableDirective, TuiResizerDirective],\n exports: [TuiResizeableDirective, TuiResizerDirective],\n})\nexport class TuiResizerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAMM,MAAO,sBAAuB,SAAQ,mBAAmB,CAAA;;oHAAlD,sBAAsB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;wGAAtB,sBAAsB,EAAA,QAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;4FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,iBAAiB;AAC9B,iBAAA,CAAA;;;ACSD;MAKa,mBAAmB,CAAA;AAY5B,IAAA,WAAA,CAEqB,UAAmC,EAAA;QAAnC,IAAU,CAAA,UAAA,GAAV,UAAU,CAAyB;AAZxD,QAAA,IAAA,CAAA,UAAU,GAAoC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAG5C,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,YAAY,EAAmC,CAAC;QAE7E,IAAC,CAAA,CAAA,GAAG,GAAG,CAAC;QACR,IAAC,CAAA,CAAA,GAAG,GAAG,CAAC;QACR,IAAK,CAAA,KAAA,GAAG,CAAC,CAAC;QACV,IAAM,CAAA,MAAA,GAAG,CAAC,CAAC;KAKP;AAEJ,IAAA,IACI,MAAM,GAAA;AACN,QAAA,IAAI,CAA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,yBAAyB,CAAA;;sBACtC,YAAY;uBAAC,0BAA0B,CAAA;;;MCxE/B,gBAAgB,CAAA;;8GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAhB,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,iBAHV,sBAAsB,EAAE,mBAAmB,CAChD,EAAA,OAAA,EAAA,CAAA,sBAAsB,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA;+GAE5C,gBAAgB,EAAA,CAAA,CAAA;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,sBAAsB,EAAE,mBAAmB,CAAC;AAC3D,oBAAA,OAAO,EAAE,CAAC,sBAAsB,EAAE,mBAAmB,CAAC;AACzD,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
@@ -1,9 +1,7 @@
1
- import { __decorate } from 'tslib';
2
1
  import * as i0 from '@angular/core';
3
2
  import { forwardRef, Directive, Input, NgModule } from '@angular/core';
4
3
  import { Validators, NG_VALIDATORS } from '@angular/forms';
5
4
  import { EMPTY_FUNCTION } from '@taiga-ui/cdk/constants';
6
- import { tuiDefaultProp } from '@taiga-ui/cdk/decorators';
7
5
 
8
6
  class TuiValidatorDirective {
9
7
  constructor() {
@@ -32,9 +30,6 @@ TuiValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0",
32
30
  multi: true,
33
31
  },
34
32
  ], usesOnChanges: true, ngImport: i0 });
35
- __decorate([
36
- tuiDefaultProp()
37
- ], TuiValidatorDirective.prototype, "tuiValidator", void 0);
38
33
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiValidatorDirective, decorators: [{
39
34
  type: Directive,
40
35
  args: [{
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-cdk-directives-validator.js","sources":["../../../projects/cdk/directives/validator/validator.directive.ts","../../../projects/cdk/directives/validator/validator.module.ts","../../../projects/cdk/directives/validator/taiga-ui-cdk-directives-validator.ts"],"sourcesContent":["import {Directive, forwardRef, Input, OnChanges, OnDestroy} from '@angular/core';\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n ValidatorFn,\n Validators,\n} from '@angular/forms';\nimport {EMPTY_FUNCTION} from '@taiga-ui/cdk/constants';\nimport {tuiDefaultProp} from '@taiga-ui/cdk/decorators';\n\n@Directive({\n selector: '[tuiValidator]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => TuiValidatorDirective),\n multi: true,\n },\n ],\n})\nexport class TuiValidatorDirective implements Validator, OnChanges, OnDestroy {\n private onChange = EMPTY_FUNCTION;\n\n @Input()\n @tuiDefaultProp()\n tuiValidator: ValidatorFn = Validators.nullValidator;\n\n validate(control: AbstractControl): ValidationErrors | null {\n return this.tuiValidator(control);\n }\n\n registerOnValidatorChange(onChange: (...args: any[]) => void): void {\n this.onChange = onChange;\n }\n\n ngOnChanges(): void {\n this.onChange();\n }\n\n ngOnDestroy(): void {\n this.tuiValidator = Validators.nullValidator;\n this.onChange();\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiValidatorDirective} from './validator.directive';\n\n@NgModule({\n declarations: [TuiValidatorDirective],\n exports: [TuiValidatorDirective],\n})\nexport class TuiValidatorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAsBa,qBAAqB,CAAA;AAVlC,IAAA,WAAA,GAAA;QAWY,IAAQ,CAAA,QAAA,GAAG,cAAc,CAAC;AAIlC,QAAA,IAAA,CAAA,YAAY,GAAg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AAE;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,aAAa;AACtB,4BAAA,WAAW,EAAE,UAAU,CAAC,2BAA2B,CAAC;AACpD,4BAAA,KAAK,EAAE,IAAI;AACd,yBAAA;AACJ,qBAAA;AACJ,iBAAA,CAAA;8BAMG,YAAY,EAAA,CAAA;sBAFX,KAAK;;;MCjBG,kBAAkB,CAAA;;gHAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;iHAAlB,kBAAkB,EAAA,YAAA,EAAA,CAHZ,qBAAqB,CAAA,EAAA,OAAA,EAAA,CAC1B,qBAAqB,CAAA,EAAA,CAAA,CAAA;iHAEtB,kBAAkB,EAAA,CAAA,CAAA;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;AACnC,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-cdk-directives-validator.js","sources":["../../../projects/cdk/directives/validator/validator.directive.ts","../../../projects/cdk/directives/validator/validator.module.ts","../../../projects/cdk/directives/validator/taiga-ui-cdk-directives-validator.ts"],"sourcesContent":["import {Directive, forwardRef, Input, OnChanges, OnDestroy} from '@angular/core';\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator,\n ValidatorFn,\n Validators,\n} from '@angular/forms';\nimport {EMPTY_FUNCTION} from '@taiga-ui/cdk/constants';\n\n@Directive({\n selector: '[tuiValidator]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => TuiValidatorDirective),\n multi: true,\n },\n ],\n})\nexport class TuiValidatorDirective implements Validator, OnChanges, OnDestroy {\n private onChange = EMPTY_FUNCTION;\n\n @Input()\n tuiValidator: ValidatorFn = Validators.nullValidator;\n\n validate(control: AbstractControl): ValidationErrors | null {\n return this.tuiValidator(control);\n }\n\n registerOnValidatorChange(onChange: (...args: any[]) => void): void {\n this.onChange = onChange;\n }\n\n ngOnChanges(): void {\n this.onChange();\n }\n\n ngOnDestroy(): void {\n this.tuiValidator = Validators.nullValidator;\n this.onChange();\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiValidatorDirective} from './validator.directive';\n\n@NgModule({\n declarations: [TuiValidatorDirective],\n exports: [TuiValidatorDirective],\n})\nexport class TuiValidatorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAqBa,qBAAqB,CAAA;AAVlC,IAAA,WAAA,GAAA;QAWY,IAAQ,CAAA,QAAA,GAAG,cAAc,CAAC;AAGlC,QAAA,IAAA,CAAA,YAAY,GAAgB,UAAU,CAAC,aAAa,CAAC;AAkBxD,KAAA;AAhBG,IAAA,QAAQ,CAAC,OAAwB,EAAA;AAC7B,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;KACrC;AAED,IAAA,yBAAyB,CAAC,QAAkC,EAAA;AACxD,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;KAC5B;IAED,WAAW,GAAA;QACP,IAAI,CAAC,QAAQ,EAAE,CAAC;KACnB;IAED,WAAW,GAAA;AACP,QAAA,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,aAAa,CAAC;QAC7C,IAAI,CAAC,QAAQ,EAAE,CAAC;KACnB;;mHArBQ,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArB,qBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,qBAAqB,EARnB,QAAA,EAAA,gBAAA,EA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",
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,9 +15,9 @@
15
15
  "repository": "https://github.com/tinkoff/taiga-ui",
16
16
  "license": "Apache-2.0",
17
17
  "dependencies": {
18
- "@ng-web-apis/common": "2.1.0",
19
- "@ng-web-apis/mutation-observer": "2.0.0",
20
- "@ng-web-apis/resize-observer": "2.0.0",
18
+ "@ng-web-apis/common": "3.0.0",
19
+ "@ng-web-apis/mutation-observer": "3.0.0",
20
+ "@ng-web-apis/resize-observer": "3.0.0",
21
21
  "@tinkoff/ng-event-plugins": "3.1.0",
22
22
  "@tinkoff/ng-polymorpheus": "4.1.0",
23
23
  "tslib": "2.5.3"
@@ -30,7 +30,7 @@
30
30
  "rxjs": ">=6.0.0"
31
31
  },
32
32
  "optionalDependencies": {
33
- "ng-morph": "2.2.4",
33
+ "ng-morph": "2.2.5",
34
34
  "parse5": "6.0.1"
35
35
  },
36
36
  "ng-update": {