@taiga-ui/cdk 4.52.0-canary.eb5ffe3 → 4.52.0-canary.ec0802b
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.
- package/README.md +1 -1
- package/classes/control.d.ts +4 -6
- package/constants/used-icons.d.ts +1 -1
- package/constants/version.d.ts +1 -1
- package/constants/version.js +1 -1
- package/directives/auto-focus/autofocus.directive.d.ts +2 -3
- package/directives/click-outside/click-outside.directive.d.ts +2 -2
- package/directives/copy-processor/copy-processor.directive.d.ts +2 -2
- package/directives/droppable/droppable.directive.d.ts +4 -2
- package/directives/hovered/hovered.directive.d.ts +1 -2
- package/directives/index.d.ts +0 -1
- package/directives/media/media.directive.d.ts +8 -12
- package/directives/native-validator/native-validator.directive.d.ts +2 -2
- package/directives/obscured/obscured.directive.d.ts +4 -4
- package/directives/pan/pan.directive.d.ts +1 -2
- package/directives/platform/platform.directive.d.ts +2 -2
- package/directives/repeat-times/repeat-times.directive.d.ts +3 -2
- package/directives/resizer/resizer.directive.d.ts +3 -4
- package/directives/swipe/swipe.directive.d.ts +1 -2
- package/directives/value-changes/value-changes.directive.d.ts +2 -2
- package/fesm2022/taiga-ui-cdk-classes.mjs +5 -17
- package/fesm2022/taiga-ui-cdk-classes.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-constants.mjs +12 -3
- package/fesm2022/taiga-ui-cdk-constants.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-date-time.mjs +1 -1
- package/fesm2022/taiga-ui-cdk-date-time.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-active-zone.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-directives-active-zone.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-animated.mjs +0 -2
- package/fesm2022/taiga-ui-cdk-directives-animated.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-auto-focus.mjs +8 -11
- package/fesm2022/taiga-ui-cdk-directives-auto-focus.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-click-outside.mjs +5 -6
- package/fesm2022/taiga-ui-cdk-directives-click-outside.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-control.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-directives-control.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-copy-processor.mjs +5 -8
- package/fesm2022/taiga-ui-cdk-directives-copy-processor.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-droppable.mjs +7 -9
- package/fesm2022/taiga-ui-cdk-directives-droppable.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-element.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-directives-element.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-focus-trap.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-directives-focus-trap.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-font-size.mjs +1 -4
- package/fesm2022/taiga-ui-cdk-directives-font-size.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-high-dpi.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-directives-high-dpi.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-hovered.mjs +4 -7
- package/fesm2022/taiga-ui-cdk-directives-hovered.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-item.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-directives-item.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-let.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-directives-let.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-media.mjs +30 -55
- package/fesm2022/taiga-ui-cdk-directives-media.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-native-validator.mjs +5 -8
- package/fesm2022/taiga-ui-cdk-directives-native-validator.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-obscured.mjs +8 -14
- package/fesm2022/taiga-ui-cdk-directives-obscured.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-pan.mjs +4 -6
- package/fesm2022/taiga-ui-cdk-directives-pan.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-platform.mjs +7 -10
- package/fesm2022/taiga-ui-cdk-directives-platform.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-repeat-times.mjs +15 -16
- package/fesm2022/taiga-ui-cdk-directives-repeat-times.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-resizer.mjs +14 -18
- package/fesm2022/taiga-ui-cdk-directives-resizer.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-swipe.mjs +4 -6
- package/fesm2022/taiga-ui-cdk-directives-swipe.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-transitioned.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-directives-transitioned.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-validator.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-directives-validator.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-value-changes.mjs +5 -6
- package/fesm2022/taiga-ui-cdk-directives-value-changes.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-visual-viewport.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-directives-visual-viewport.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-zoom.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-directives-zoom.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-directives.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-observables.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-pipes-animation.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-animation.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-pipes-filter.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-filter.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-pipes-is-present.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-is-present.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-pipes-keys.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-keys.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-pipes-mapper.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-mapper.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-pipes-obfuscate.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-obfuscate.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-pipes-repeat-times.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-repeat-times.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-pipes-replace.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-replace.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-pipes-to-array.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-to-array.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-portals.mjs +2 -1
- package/fesm2022/taiga-ui-cdk-portals.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-services.mjs +3 -43
- package/fesm2022/taiga-ui-cdk-services.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils-browser.mjs +1 -23
- package/fesm2022/taiga-ui-cdk-utils-browser.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils-color.mjs +2 -1
- package/fesm2022/taiga-ui-cdk-utils-color.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils-dom.mjs +1 -0
- package/fesm2022/taiga-ui-cdk-utils-dom.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs +6 -2
- package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs.map +1 -1
- package/package.json +13 -14
- package/pipes/obfuscate/obfuscate.options.d.ts +1 -1
- package/portals/portal.d.ts +1 -1
- package/schematics/collection.json +2 -1
- package/schematics/migrate-tui-let/index.js +2 -1
- package/schematics/migrate-tui-let/index.js.map +1 -1
- package/schematics/migrate-tui-let/schema.json +7 -0
- package/schematics/ng-add/constants/versions.d.ts +1 -1
- package/schematics/ng-update/interfaces/html-comment.d.ts +1 -1
- package/schematics/ng-update/interfaces/removable-input.d.ts +1 -1
- package/schematics/ng-update/interfaces/replacement-attribute-to-directive.d.ts +1 -1
- package/schematics/ng-update/interfaces/replacement-attribute-value.d.ts +1 -1
- package/schematics/ng-update/interfaces/replacement-attribute.d.ts +1 -1
- package/schematics/ng-update/interfaces/replacement-tag.d.ts +1 -1
- package/schematics/ng-update/v4/migrate-css-vars/rename-css-vars.js +1 -1
- package/schematics/ng-update/v4/migrate-css-vars/rename-css-vars.js.map +1 -1
- package/schematics/ng-update/v4/steps/migrate-templates.d.ts +2 -2
- package/schematics/ng-update/v4/steps/styles/migrate-space-mixins.js +1 -1
- package/schematics/ng-update/v4/steps/styles/migrate-space-mixins.js.map +1 -1
- package/schematics/ng-update/v5/index.js +3 -0
- package/schematics/ng-update/v5/index.js.map +1 -1
- package/schematics/ng-update/v5/steps/constants/attrs-to-replace.d.ts +2 -0
- package/schematics/ng-update/v5/steps/constants/attrs-to-replace.js +22 -0
- package/schematics/ng-update/v5/steps/constants/attrs-to-replace.js.map +1 -0
- package/schematics/ng-update/v5/steps/constants/functions.js +36 -0
- package/schematics/ng-update/v5/steps/constants/functions.js.map +1 -1
- package/schematics/ng-update/v5/steps/constants/identifiers-to-replace.d.ts +2 -0
- package/schematics/ng-update/v5/steps/constants/identifiers-to-replace.js +22 -0
- package/schematics/ng-update/v5/steps/constants/identifiers-to-replace.js.map +1 -0
- package/schematics/ng-update/v5/steps/migrate-templates.d.ts +2 -2
- package/schematics/ng-update/v5/steps/migrate-templates.js +4 -0
- package/schematics/ng-update/v5/steps/migrate-templates.js.map +1 -1
- package/schematics/ng-update/v5/steps/templates/migrate-input-year.d.ts +8 -0
- package/schematics/ng-update/v5/steps/templates/migrate-input-year.js +52 -0
- package/schematics/ng-update/v5/steps/templates/migrate-input-year.js.map +1 -0
- package/schematics/utils/angular-json-manipulations.js +0 -2
- package/schematics/utils/angular-json-manipulations.js.map +1 -1
- package/schematics/utils/run-migration.d.ts +14 -0
- package/schematics/utils/run-migration.js +26 -0
- package/schematics/utils/run-migration.js.map +1 -0
- package/schematics/utils/templates/elements.js +4 -12
- package/schematics/utils/templates/elements.js.map +1 -1
- package/schematics/utils/templates/ng-component-input-manipulations.d.ts +3 -3
- package/schematics/utils/templates/ng-component-input-manipulations.js +1 -3
- package/schematics/utils/templates/ng-component-input-manipulations.js.map +1 -1
- package/services/index.d.ts +0 -1
- package/utils/browser/index.d.ts +0 -2
- package/utils/miscellaneous/index.d.ts +1 -0
- package/utils/miscellaneous/object-shallow-equals.d.ts +1 -0
- package/directives/popover/index.d.ts +0 -1
- package/directives/popover/popover.directive.d.ts +0 -14
- package/fesm2022/taiga-ui-cdk-directives-popover.mjs +0 -32
- package/fesm2022/taiga-ui-cdk-directives-popover.mjs.map +0 -1
- package/services/popover.service.d.ts +0 -25
- package/utils/browser/is-apple.d.ts +0 -11
- package/utils/browser/is-ios.d.ts +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-control.mjs","sources":["../../../projects/cdk/directives/control/control.directive.ts","../../../projects/cdk/directives/control/taiga-ui-cdk-directives-control.ts"],"sourcesContent":["import {Directive, inject} from '@angular/core';\nimport {type AbstractControl, NgControl} from '@angular/forms';\n\n@Directive({\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-control.mjs","sources":["../../../projects/cdk/directives/control/control.directive.ts","../../../projects/cdk/directives/control/taiga-ui-cdk-directives-control.ts"],"sourcesContent":["import {Directive, inject} from '@angular/core';\nimport {type AbstractControl, NgControl} from '@angular/forms';\n\n@Directive({\n selector: '[tuiControl]',\n exportAs: 'ngControl',\n})\nexport class TuiNgControl {\n private readonly ngControl = inject(NgControl);\n\n public get control(): AbstractControl {\n return this.ngControl.control!;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAOa,YAAY,CAAA;AAJzB,IAAA,WAAA,GAAA;AAKqB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAKjD;AAHG,IAAA,IAAW,OAAO,GAAA;AACd,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,OAAQ;;+GAJzB,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,QAAQ,EAAE,WAAW;AACxB,iBAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject,
|
|
2
|
+
import { inject, input, Directive } from '@angular/core';
|
|
3
3
|
import { WA_WINDOW } from '@ng-web-apis/common';
|
|
4
4
|
import { tuiGetSelectedText } from '@taiga-ui/cdk/utils';
|
|
5
5
|
import { identity } from 'rxjs';
|
|
@@ -7,29 +7,26 @@ import { identity } from 'rxjs';
|
|
|
7
7
|
class TuiCopyProcessor {
|
|
8
8
|
constructor() {
|
|
9
9
|
this.win = inject(WA_WINDOW);
|
|
10
|
-
this.tuiCopyProcessor = identity;
|
|
10
|
+
this.tuiCopyProcessor = input(identity);
|
|
11
11
|
}
|
|
12
12
|
onCopy(event) {
|
|
13
13
|
const text = tuiGetSelectedText(this.win);
|
|
14
14
|
if (text) {
|
|
15
|
-
event.clipboardData?.setData('text/plain', this.tuiCopyProcessor(text));
|
|
15
|
+
event.clipboardData?.setData('text/plain', this.tuiCopyProcessor()(text));
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiCopyProcessor, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
19
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
19
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiCopyProcessor, isStandalone: true, selector: "[tuiCopyProcessor]", inputs: { tuiCopyProcessor: { classPropertyName: "tuiCopyProcessor", publicName: "tuiCopyProcessor", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "copy.prevent": "onCopy($event)" } }, ngImport: i0 }); }
|
|
20
20
|
}
|
|
21
21
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiCopyProcessor, decorators: [{
|
|
22
22
|
type: Directive,
|
|
23
23
|
args: [{
|
|
24
|
-
standalone: true,
|
|
25
24
|
selector: '[tuiCopyProcessor]',
|
|
26
25
|
host: {
|
|
27
26
|
'(copy.prevent)': 'onCopy($event)',
|
|
28
27
|
},
|
|
29
28
|
}]
|
|
30
|
-
}]
|
|
31
|
-
type: Input
|
|
32
|
-
}] } });
|
|
29
|
+
}] });
|
|
33
30
|
|
|
34
31
|
/**
|
|
35
32
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-copy-processor.mjs","sources":["../../../projects/cdk/directives/copy-processor/copy-processor.directive.ts","../../../projects/cdk/directives/copy-processor/taiga-ui-cdk-directives-copy-processor.ts"],"sourcesContent":["import {Directive, inject,
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-copy-processor.mjs","sources":["../../../projects/cdk/directives/copy-processor/copy-processor.directive.ts","../../../projects/cdk/directives/copy-processor/taiga-ui-cdk-directives-copy-processor.ts"],"sourcesContent":["import {Directive, inject, input} from '@angular/core';\nimport {WA_WINDOW} from '@ng-web-apis/common';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiGetSelectedText} from '@taiga-ui/cdk/utils';\nimport {identity} from 'rxjs';\n\n@Directive({\n selector: '[tuiCopyProcessor]',\n host: {\n '(copy.prevent)': 'onCopy($event)',\n },\n})\nexport class TuiCopyProcessor {\n private readonly win = inject(WA_WINDOW);\n\n public readonly tuiCopyProcessor = input<TuiStringHandler<string>>(identity);\n\n protected 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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAYa,gBAAgB,CAAA;AAN7B,IAAA,WAAA,GAAA;AAOqB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC;AAExB,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAA2B,QAAQ,CAAC;AAS/E;AAPa,IAAA,MAAM,CAAC,KAAqB,EAAA;QAClC,MAAM,IAAI,GAAG,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC;QAEzC,IAAI,IAAI,EAAE;AACN,YAAA,KAAK,CAAC,aAAa,EAAE,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAC,IAAI,CAAC,CAAC;;;+GATxE,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,EAAA,gBAAA,EAAA,EAAA,iBAAA,EAAA,kBAAA,EAAA,UAAA,EAAA,kBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAN5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,IAAI,EAAE;AACF,wBAAA,gBAAgB,EAAE,gBAAgB;AACrC,qBAAA;AACJ,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Directive } from '@angular/core';
|
|
3
|
+
import { outputFromObservable } from '@angular/core/rxjs-interop';
|
|
3
4
|
import { tuiTypedFromEvent, tuiPreventDefault } from '@taiga-ui/cdk/observables';
|
|
4
5
|
import { tuiInjectElement } from '@taiga-ui/cdk/utils';
|
|
5
6
|
import { tuiIsPresent } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
@@ -8,8 +9,10 @@ import { map, filter, switchMap, merge, startWith, distinctUntilChanged } from '
|
|
|
8
9
|
class TuiDroppable {
|
|
9
10
|
constructor() {
|
|
10
11
|
this.el = tuiInjectElement();
|
|
11
|
-
this.tuiDroppableDropped = tuiTypedFromEvent(this.el, 'drop').pipe(tuiPreventDefault(), map((event) => event.dataTransfer), filter(tuiIsPresent));
|
|
12
|
-
this.tuiDroppableDragOverChange = tuiTypedFromEvent(this.el, 'dragenter').pipe(switchMap(({ target, dataTransfer }) => merge(tuiTypedFromEvent(this.el, 'dragleave').pipe(filter((event) => event.target === target)), tuiTypedFromEvent(this.el, 'drop')).pipe(map(() => null), startWith(dataTransfer))), distinctUntilChanged((a, b) => (!!a && !!b) || (!a && !b)));
|
|
12
|
+
this.tuiDroppableDropped$ = tuiTypedFromEvent(this.el, 'drop').pipe(tuiPreventDefault(), map((event) => event.dataTransfer), filter(tuiIsPresent));
|
|
13
|
+
this.tuiDroppableDragOverChange$ = tuiTypedFromEvent(this.el, 'dragenter').pipe(switchMap(({ target, dataTransfer }) => merge(tuiTypedFromEvent(this.el, 'dragleave').pipe(filter((event) => event.target === target)), tuiTypedFromEvent(this.el, 'drop')).pipe(map(() => null), startWith(dataTransfer))), distinctUntilChanged((a, b) => (!!a && !!b) || (!a && !b)));
|
|
14
|
+
this.tuiDroppableDropped = outputFromObservable(this.tuiDroppableDropped$);
|
|
15
|
+
this.tuiDroppableDragOverChange = outputFromObservable(this.tuiDroppableDragOverChange$);
|
|
13
16
|
}
|
|
14
17
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDroppable, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
15
18
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiDroppable, isStandalone: true, selector: "[tuiDroppableDropped], [tuiDroppableDragOverChange]", outputs: { tuiDroppableDropped: "tuiDroppableDropped", tuiDroppableDragOverChange: "tuiDroppableDragOverChange" }, host: { listeners: { "dragover.prevent.zoneless": "0" } }, ngImport: i0 }); }
|
|
@@ -17,17 +20,12 @@ class TuiDroppable {
|
|
|
17
20
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDroppable, decorators: [{
|
|
18
21
|
type: Directive,
|
|
19
22
|
args: [{
|
|
20
|
-
standalone: true,
|
|
21
23
|
selector: '[tuiDroppableDropped], [tuiDroppableDragOverChange]',
|
|
22
24
|
host: {
|
|
23
25
|
'(dragover.prevent.zoneless)': '0',
|
|
24
26
|
},
|
|
25
27
|
}]
|
|
26
|
-
}]
|
|
27
|
-
type: Output
|
|
28
|
-
}], tuiDroppableDragOverChange: [{
|
|
29
|
-
type: Output
|
|
30
|
-
}] } });
|
|
28
|
+
}] });
|
|
31
29
|
|
|
32
30
|
/**
|
|
33
31
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-droppable.mjs","sources":["../../../projects/cdk/directives/droppable/droppable.directive.ts","../../../projects/cdk/directives/droppable/taiga-ui-cdk-directives-droppable.ts"],"sourcesContent":["import {Directive
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-droppable.mjs","sources":["../../../projects/cdk/directives/droppable/droppable.directive.ts","../../../projects/cdk/directives/droppable/taiga-ui-cdk-directives-droppable.ts"],"sourcesContent":["import {Directive} from '@angular/core';\nimport {outputFromObservable} from '@angular/core/rxjs-interop';\nimport {tuiPreventDefault, tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils';\nimport {tuiIsPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {distinctUntilChanged, filter, map, merge, startWith, switchMap} from 'rxjs';\n\n@Directive({\n selector: '[tuiDroppableDropped], [tuiDroppableDragOverChange]',\n host: {\n '(dragover.prevent.zoneless)': '0',\n },\n})\nexport class TuiDroppable {\n private readonly el = tuiInjectElement();\n\n private readonly tuiDroppableDropped$ = tuiTypedFromEvent(this.el, 'drop').pipe(\n tuiPreventDefault(),\n map((event) => event.dataTransfer),\n filter(tuiIsPresent),\n );\n\n private readonly tuiDroppableDragOverChange$ = tuiTypedFromEvent(\n this.el,\n 'dragenter',\n ).pipe(\n switchMap(({target, dataTransfer}) =>\n merge(\n tuiTypedFromEvent(this.el, 'dragleave').pipe(\n filter((event) => event.target === target),\n ),\n tuiTypedFromEvent(this.el, 'drop'),\n ).pipe(\n map(() => null),\n startWith(dataTransfer),\n ),\n ),\n distinctUntilChanged((a, b) => (!!a && !!b) || (!a && !b)),\n );\n\n public readonly tuiDroppableDropped = outputFromObservable(this.tuiDroppableDropped$);\n\n public readonly tuiDroppableDragOverChange = outputFromObservable(\n this.tuiDroppableDragOverChange$,\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAaa,YAAY,CAAA;AANzB,IAAA,WAAA,GAAA;QAOqB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AAEvB,QAAA,IAAA,CAAA,oBAAoB,GAAG,iBAAiB,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,IAAI,CAC3E,iBAAiB,EAAE,EACnB,GAAG,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,YAAY,CAAC,EAClC,MAAM,CAAC,YAAY,CAAC,CACvB;QAEgB,IAA2B,CAAA,2BAAA,GAAG,iBAAiB,CAC5D,IAAI,CAAC,EAAE,EACP,WAAW,CACd,CAAC,IAAI,CACF,SAAS,CAAC,CAAC,EAAC,MAAM,EAAE,YAAY,EAAC,KAC7B,KAAK,CACD,iBAAiB,CAAC,IAAI,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC,IAAI,CACxC,MAAM,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,CAC7C,EACD,iBAAiB,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CACrC,CAAC,IAAI,CACF,GAAG,CAAC,MAAM,IAAI,CAAC,EACf,SAAS,CAAC,YAAY,CAAC,CAC1B,CACJ,EACD,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAC7D;AAEe,QAAA,IAAA,CAAA,mBAAmB,GAAG,oBAAoB,CAAC,IAAI,CAAC,oBAAoB,CAAC;AAErE,QAAA,IAAA,CAAA,0BAA0B,GAAG,oBAAoB,CAC7D,IAAI,CAAC,2BAA2B,CACnC;AACJ;+GAhCY,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qDAAA,EAAA,OAAA,EAAA,EAAA,mBAAA,EAAA,qBAAA,EAAA,0BAAA,EAAA,4BAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,2BAAA,EAAA,GAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBANxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,qDAAqD;AAC/D,oBAAA,IAAI,EAAE;AACF,wBAAA,6BAA6B,EAAE,GAAG;AACrC,qBAAA;AACJ,iBAAA;;;ACZD;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-element.mjs","sources":["../../../projects/cdk/directives/element/element.directive.ts","../../../projects/cdk/directives/element/taiga-ui-cdk-directives-element.ts"],"sourcesContent":["import {Directive, ElementRef} from '@angular/core';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils';\n\n@Directive({\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-element.mjs","sources":["../../../projects/cdk/directives/element/element.directive.ts","../../../projects/cdk/directives/element/taiga-ui-cdk-directives-element.ts"],"sourcesContent":["import {Directive, ElementRef} from '@angular/core';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils';\n\n@Directive({\n selector: '[tuiElement]',\n exportAs: 'elementRef',\n})\nexport class TuiElement<T extends Element = HTMLElement> implements ElementRef<T> {\n public nativeElement = tuiInjectElement<T>();\n\n constructor() {\n /**\n * @note:\n * Typically, when your constructor is invoked with new,\n * an object is created, its constructor is assigned to\n * the invoked constructor and the object is then assigned\n * to this before executing any operations specified\n * in your constructor method.\n *\n * ERROR TypeError: Class constructor ElementRef cannot be invoked without 'new'\n * https://github.com/taiga-family/taiga-ui/issues/3072\n *\n * This way we can instantiate object creation\n * without additional prototype chain for possible fix bug.\n */\n return new ElementRef<T>(this.nativeElement);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAOa,UAAU,CAAA;AAGnB,IAAA,WAAA,GAAA;QAFO,IAAa,CAAA,aAAA,GAAG,gBAAgB,EAAK;AAGxC;;;;;;;;;;;;;AAaG;AACH,QAAA,OAAO,IAAI,UAAU,CAAI,IAAI,CAAC,aAAa,CAAC;;+GAlBvC,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAV,UAAU,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAV,UAAU,EAAA,UAAA,EAAA,CAAA;kBAJtB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,QAAQ,EAAE,YAAY;AACzB,iBAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-focus-trap.mjs","sources":["../../../projects/cdk/directives/focus-trap/focus-trap.directive.ts","../../../projects/cdk/directives/focus-trap/taiga-ui-cdk-directives-focus-trap.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {Directive, inject, type OnDestroy} from '@angular/core';\nimport {\n tuiContainsOrAfter,\n tuiInjectElement,\n tuiIsHTMLElement,\n} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGetClosestFocusable, tuiGetFocused} from '@taiga-ui/cdk/utils/focus';\n\n@Directive({\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-focus-trap.mjs","sources":["../../../projects/cdk/directives/focus-trap/focus-trap.directive.ts","../../../projects/cdk/directives/focus-trap/taiga-ui-cdk-directives-focus-trap.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {Directive, inject, type OnDestroy} from '@angular/core';\nimport {\n tuiContainsOrAfter,\n tuiInjectElement,\n tuiIsHTMLElement,\n} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGetClosestFocusable, tuiGetFocused} from '@taiga-ui/cdk/utils/focus';\n\n@Directive({\n selector: '[tuiFocusTrap]',\n host: {\n tabIndex: '0',\n '(window:focusin.zoneless)': 'initialized && onFocusIn($event.target)',\n },\n})\nexport class TuiFocusTrap implements OnDestroy {\n private readonly doc = inject(DOCUMENT);\n private readonly el = tuiInjectElement();\n private activeElement: Element | null = null;\n protected initialized = false;\n\n constructor() {\n /**\n * This would cause currently focused element to lose focus,\n * but it might cause ExpressionChanged error due to potential HostBinding.\n * Microtask keeps it in the same frame but allows change detection to run\n */\n Promise.resolve().then(() => {\n /**\n * The same event can synchronously close already opened focus trap and open another one.\n * All focus traps have microtask inside its `ngOnDestroy` –\n * they should be resolved before enabling of new focus trap.\n * Don't enable any new event listeners before `initialized` is equal to `true`!\n */\n this.initialized = true;\n this.activeElement = tuiGetFocused(this.doc);\n this.el.focus();\n });\n }\n\n public ngOnDestroy(): void {\n this.initialized = false;\n\n if (tuiIsHTMLElement(this.activeElement)) {\n this.activeElement.focus();\n }\n }\n\n protected onFocusIn(node: Node): void {\n const {firstElementChild} = this.el;\n\n if (!tuiContainsOrAfter(this.el, node) && firstElementChild) {\n tuiGetClosestFocusable({\n initial: firstElementChild,\n root: this.el,\n })?.focus();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAgBa,YAAY,CAAA;AAMrB,IAAA,WAAA,GAAA;AALiB,QA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AAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAPxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,IAAI,EAAE;AACF,wBAAA,QAAQ,EAAE,GAAG;AACb,wBAAA,2BAA2B,EAAE,yCAAyC;AACzE,qBAAA;AACJ,iBAAA;;;ACfD;;AAEG;;;;"}
|
|
@@ -19,10 +19,7 @@ class TuiFontSize {
|
|
|
19
19
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiFontSize, isStandalone: true, ngImport: i0 }); }
|
|
20
20
|
}
|
|
21
21
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFontSize, decorators: [{
|
|
22
|
-
type: Directive
|
|
23
|
-
args: [{
|
|
24
|
-
standalone: true,
|
|
25
|
-
}]
|
|
22
|
+
type: Directive
|
|
26
23
|
}] });
|
|
27
24
|
|
|
28
25
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-font-size.mjs","sources":["../../../projects/cdk/directives/font-size/font-size.directive.ts","../../../projects/cdk/directives/font-size/taiga-ui-cdk-directives-font-size.ts"],"sourcesContent":["import {isPlatformBrowser} from '@angular/common';\nimport {DestroyRef, Directive, inject, InjectionToken, PLATFORM_ID} from '@angular/core';\nimport {WA_WINDOW} from '@ng-web-apis/common';\nimport {EMPTY_FUNCTION} from '@taiga-ui/cdk/constants';\nimport {tuiFontSizeWatcher} from '@taiga-ui/cdk/utils/miscellaneous';\n\nexport const TUI_FONT_SIZE_HANDLER = new InjectionToken<(size: number) => void>(\n ngDevMode ? 'TUI_FONT_SIZE_HANDLER' : '',\n);\n\n@Directive(
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-font-size.mjs","sources":["../../../projects/cdk/directives/font-size/font-size.directive.ts","../../../projects/cdk/directives/font-size/taiga-ui-cdk-directives-font-size.ts"],"sourcesContent":["import {isPlatformBrowser} from '@angular/common';\nimport {DestroyRef, Directive, inject, InjectionToken, PLATFORM_ID} from '@angular/core';\nimport {WA_WINDOW} from '@ng-web-apis/common';\nimport {EMPTY_FUNCTION} from '@taiga-ui/cdk/constants';\nimport {tuiFontSizeWatcher} from '@taiga-ui/cdk/utils/miscellaneous';\n\nexport const TUI_FONT_SIZE_HANDLER = new InjectionToken<(size: number) => void>(\n ngDevMode ? 'TUI_FONT_SIZE_HANDLER' : '',\n);\n\n@Directive()\nexport class TuiFontSize {\n private readonly handler = inject(TUI_FONT_SIZE_HANDLER, {optional: true});\n protected readonly nothing = inject(DestroyRef).onDestroy(\n this.handler &&\n isPlatformBrowser(inject(PLATFORM_ID)) &&\n typeof ResizeObserver !== 'undefined'\n ? tuiFontSizeWatcher(this.handler, inject(WA_WINDOW))\n : EMPTY_FUNCTION,\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAMa,MAAA,qBAAqB,GAAG,IAAI,cAAc,CACnD,SAAS,GAAG,uBAAuB,GAAG,EAAE;MAI/B,WAAW,CAAA;AADxB,IAAA,WAAA,GAAA;QAEqB,IAAO,CAAA,OAAA,GAAG,MAAM,CAAC,qBAAqB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;QACvD,IAAO,CAAA,OAAA,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,CACrD,IAAI,CAAC,OAAO;AACR,YAAA,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YACtC,OAAO,cAAc,KAAK;cACxB,kBAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC;cAClD,cAAc,CACvB;AACJ;+GATY,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAX,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBADvB;;;ACVD;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-high-dpi.mjs","sources":["../../../projects/cdk/directives/high-dpi/high-dpi.directive.ts","../../../projects/cdk/directives/high-dpi/taiga-ui-cdk-directives-high-dpi.ts"],"sourcesContent":["import {Directive, inject, TemplateRef, ViewContainerRef} from '@angular/core';\nimport {WA_WINDOW} from '@ng-web-apis/common';\n\n/**\n * Only adds current content if user has High DPI display\n */\n@Directive({\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-high-dpi.mjs","sources":["../../../projects/cdk/directives/high-dpi/high-dpi.directive.ts","../../../projects/cdk/directives/high-dpi/taiga-ui-cdk-directives-high-dpi.ts"],"sourcesContent":["import {Directive, inject, TemplateRef, ViewContainerRef} from '@angular/core';\nimport {WA_WINDOW} from '@ng-web-apis/common';\n\n/**\n * Only adds current content if user has High DPI display\n */\n@Directive({\n selector: '[tuiHighDpi]',\n})\nexport class TuiHighDpi {\n protected readonly ref =\n inject(WA_WINDOW).devicePixelRatio > 1 &&\n inject(ViewContainerRef).createEmbeddedView(inject(TemplateRef));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA;;AAEG;MAIU,UAAU,CAAA;AAHvB,IAAA,WAAA,GAAA;QAIuB,IAAG,CAAA,GAAA,GAClB,MAAM,CAAC,SAAS,CAAC,CAAC,gBAAgB,GAAG,CAAC;YACtC,MAAM,CAAC,gBAAgB,CAAC,CAAC,kBAAkB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AACvE;+GAJY,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAV,UAAU,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAV,UAAU,EAAA,UAAA,EAAA,CAAA;kBAHtB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,cAAc;AAC3B,iBAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, NgZone, Injectable,
|
|
3
|
-
import { toSignal } from '@angular/core/rxjs-interop';
|
|
2
|
+
import { inject, NgZone, Injectable, Directive } from '@angular/core';
|
|
3
|
+
import { toSignal, outputFromObservable } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { TUI_TRUE_HANDLER, TUI_FALSE_HANDLER } from '@taiga-ui/cdk/constants';
|
|
5
5
|
import { tuiTypedFromEvent, tuiZoneOptimized, tuiWatch } from '@taiga-ui/cdk/observables';
|
|
6
6
|
import { TUI_IS_MOBILE } from '@taiga-ui/cdk/tokens';
|
|
@@ -35,7 +35,7 @@ function tuiHovered() {
|
|
|
35
35
|
|
|
36
36
|
class TuiHovered {
|
|
37
37
|
constructor() {
|
|
38
|
-
this.tuiHoveredChange = inject(TuiHoveredService);
|
|
38
|
+
this.tuiHoveredChange = outputFromObservable(inject(TuiHoveredService));
|
|
39
39
|
}
|
|
40
40
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHovered, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
41
41
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiHovered, isStandalone: true, selector: "[tuiHoveredChange]", outputs: { tuiHoveredChange: "tuiHoveredChange" }, providers: [TuiHoveredService], ngImport: i0 }); }
|
|
@@ -43,13 +43,10 @@ class TuiHovered {
|
|
|
43
43
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHovered, decorators: [{
|
|
44
44
|
type: Directive,
|
|
45
45
|
args: [{
|
|
46
|
-
standalone: true,
|
|
47
46
|
selector: '[tuiHoveredChange]',
|
|
48
47
|
providers: [TuiHoveredService],
|
|
49
48
|
}]
|
|
50
|
-
}]
|
|
51
|
-
type: Output
|
|
52
|
-
}] } });
|
|
49
|
+
}] });
|
|
53
50
|
|
|
54
51
|
/**
|
|
55
52
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-hovered.mjs","sources":["../../../projects/cdk/directives/hovered/hovered.service.ts","../../../projects/cdk/directives/hovered/hovered.directive.ts","../../../projects/cdk/directives/hovered/taiga-ui-cdk-directives-hovered.ts"],"sourcesContent":["import {inject, Injectable, NgZone, type Signal} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {TUI_FALSE_HANDLER, TUI_TRUE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {tuiTypedFromEvent, tuiWatch, tuiZoneOptimized} from '@taiga-ui/cdk/observables';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiInjectElement, tuiIsElement} from '@taiga-ui/cdk/utils';\nimport {distinctUntilChanged, filter, map, merge, Observable, of} from 'rxjs';\n\nfunction movedOut({currentTarget, relatedTarget}: MouseEvent): boolean {\n return (\n !tuiIsElement(relatedTarget) ||\n !tuiIsElement(currentTarget) ||\n !currentTarget.contains(relatedTarget)\n );\n}\n\n@Injectable()\nexport class TuiHoveredService extends Observable<boolean> {\n private readonly el = tuiInjectElement();\n private readonly zone = inject(NgZone);\n\n private readonly stream$ = merge(\n tuiTypedFromEvent(this.el, 'mouseenter').pipe(map(TUI_TRUE_HANDLER)),\n tuiTypedFromEvent(this.el, 'mouseleave').pipe(map(TUI_FALSE_HANDLER)),\n // Hello, Safari\n tuiTypedFromEvent(this.el, 'mouseout').pipe(\n filter(movedOut),\n map(TUI_FALSE_HANDLER),\n ),\n ).pipe(distinctUntilChanged(), tuiZoneOptimized(this.zone));\n\n constructor() {\n super((subscriber) => this.stream$.subscribe(subscriber));\n }\n}\n\nexport function tuiHovered(): Signal<boolean> {\n return toSignal(\n inject(TUI_IS_MOBILE) ? of(false) : inject(TuiHoveredService).pipe(tuiWatch()),\n {\n initialValue: false,\n },\n );\n}\n","import {Directive, inject
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-hovered.mjs","sources":["../../../projects/cdk/directives/hovered/hovered.service.ts","../../../projects/cdk/directives/hovered/hovered.directive.ts","../../../projects/cdk/directives/hovered/taiga-ui-cdk-directives-hovered.ts"],"sourcesContent":["import {inject, Injectable, NgZone, type Signal} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {TUI_FALSE_HANDLER, TUI_TRUE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {tuiTypedFromEvent, tuiWatch, tuiZoneOptimized} from '@taiga-ui/cdk/observables';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiInjectElement, tuiIsElement} from '@taiga-ui/cdk/utils';\nimport {distinctUntilChanged, filter, map, merge, Observable, of} from 'rxjs';\n\nfunction movedOut({currentTarget, relatedTarget}: MouseEvent): boolean {\n return (\n !tuiIsElement(relatedTarget) ||\n !tuiIsElement(currentTarget) ||\n !currentTarget.contains(relatedTarget)\n );\n}\n\n@Injectable()\nexport class TuiHoveredService extends Observable<boolean> {\n private readonly el = tuiInjectElement();\n private readonly zone = inject(NgZone);\n\n private readonly stream$ = merge(\n tuiTypedFromEvent(this.el, 'mouseenter').pipe(map(TUI_TRUE_HANDLER)),\n tuiTypedFromEvent(this.el, 'mouseleave').pipe(map(TUI_FALSE_HANDLER)),\n // Hello, Safari\n tuiTypedFromEvent(this.el, 'mouseout').pipe(\n filter(movedOut),\n map(TUI_FALSE_HANDLER),\n ),\n ).pipe(distinctUntilChanged(), tuiZoneOptimized(this.zone));\n\n constructor() {\n super((subscriber) => this.stream$.subscribe(subscriber));\n }\n}\n\nexport function tuiHovered(): Signal<boolean> {\n return toSignal(\n inject(TUI_IS_MOBILE) ? of(false) : inject(TuiHoveredService).pipe(tuiWatch()),\n {\n initialValue: false,\n },\n );\n}\n","import {Directive, inject} from '@angular/core';\nimport {outputFromObservable} from '@angular/core/rxjs-interop';\n\nimport {TuiHoveredService} from './hovered.service';\n\n@Directive({\n selector: '[tuiHoveredChange]',\n providers: [TuiHoveredService],\n})\nexport class TuiHovered {\n public readonly tuiHoveredChange = outputFromObservable(inject(TuiHoveredService));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAQA,SAAS,QAAQ,CAAC,EAAC,aAAa,EAAE,aAAa,EAAa,EAAA;AACxD,IAAA,QACI,CAAC,YAAY,CAAC,aAAa,CAAC;QAC5B,CAAC,YAAY,CAAC,aAAa,CAAC;AAC5B,QAAA,CAAC,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC;AAE9C;AAGM,MAAO,iBAAkB,SAAQ,UAAmB,CAAA;AActD,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,CAAC,CAAC,UAAU,KAAK,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAd5C,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;AAErB,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAC5B,iBAAiB,CAAC,IAAI,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,EACpE,iBAAiB,CAAC,IAAI,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,iB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,EAAE,CAAC,iBAAiB,CAAC;AACjC,iBAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-item.mjs","sources":["../../../projects/cdk/directives/item/item.directive.ts","../../../projects/cdk/directives/item/taiga-ui-cdk-directives-item.ts"],"sourcesContent":["import {Directive} from '@angular/core';\n\n/**\n * Blank directive for queries via `@ContentChildren` / `@ViewChildren` / `querySelector`\n */\n@Directive({\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-item.mjs","sources":["../../../projects/cdk/directives/item/item.directive.ts","../../../projects/cdk/directives/item/taiga-ui-cdk-directives-item.ts"],"sourcesContent":["import {Directive} from '@angular/core';\n\n/**\n * Blank directive for queries via `@ContentChildren` / `@ViewChildren` / `querySelector`\n */\n@Directive({\n selector: '[tuiItem]',\n})\nexport class TuiItem {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA;;AAEG;MAIU,OAAO,CAAA;+GAAP,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAP,OAAO,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,WAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAP,OAAO,EAAA,UAAA,EAAA,CAAA;kBAHnB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,WAAW;AACxB,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -38,7 +38,6 @@ class TuiLet {
|
|
|
38
38
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLet, decorators: [{
|
|
39
39
|
type: Directive,
|
|
40
40
|
args: [{
|
|
41
|
-
standalone: true,
|
|
42
41
|
selector: '[tuiLet]',
|
|
43
42
|
}]
|
|
44
43
|
}], ctorParameters: () => [], propDecorators: { tuiLet: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-let.mjs","sources":["../../../projects/cdk/directives/let/let-context.ts","../../../projects/cdk/directives/let/let.directive.ts","../../../projects/cdk/directives/let/taiga-ui-cdk-directives-let.ts"],"sourcesContent":["import {type TuiContext} from '@taiga-ui/cdk/types';\n\nimport {type TuiLet} from './let.directive';\n\n/**\n * @internal\n */\nexport class TuiLetContext<T> implements TuiContext<T> {\n constructor(private readonly internalDirectiveInstance: TuiLet<T>) {}\n\n public get $implicit(): T {\n return this.internalDirectiveInstance.tuiLet;\n }\n\n public get tuiLet(): T {\n return this.internalDirectiveInstance.tuiLet;\n }\n}\n","import {Directive, inject, Input, TemplateRef, ViewContainerRef} from '@angular/core';\n\nimport {TuiLetContext} from './let-context';\n\n/**\n * @deprecated use @let instead\n */\n@Directive({\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-let.mjs","sources":["../../../projects/cdk/directives/let/let-context.ts","../../../projects/cdk/directives/let/let.directive.ts","../../../projects/cdk/directives/let/taiga-ui-cdk-directives-let.ts"],"sourcesContent":["import {type TuiContext} from '@taiga-ui/cdk/types';\n\nimport {type TuiLet} from './let.directive';\n\n/**\n * @internal\n */\nexport class TuiLetContext<T> implements TuiContext<T> {\n constructor(private readonly internalDirectiveInstance: TuiLet<T>) {}\n\n public get $implicit(): T {\n return this.internalDirectiveInstance.tuiLet;\n }\n\n public get tuiLet(): T {\n return this.internalDirectiveInstance.tuiLet;\n }\n}\n","import {Directive, inject, Input, TemplateRef, ViewContainerRef} from '@angular/core';\n\nimport {TuiLetContext} from './let-context';\n\n/**\n * @deprecated use @let instead\n */\n@Directive({\n selector: '[tuiLet]',\n})\nexport class TuiLet<T> {\n @Input()\n public tuiLet!: T;\n\n constructor() {\n inject(ViewContainerRef).createEmbeddedView(\n inject(TemplateRef<TuiLetContext<T>>),\n new TuiLetContext<T>(this),\n );\n }\n\n /**\n * Asserts the correct type of the context for the template that `TuiLet` will render.\n *\n * The presence of this method is a signal to the Ivy template type-check compiler that the\n * `TuiLet` structural directive renders its template with a specific context type.\n */\n public static ngTemplateContextGuard<T>(\n _dir: TuiLet<T>,\n _ctx: unknown,\n ): _ctx is TuiLetContext<T> {\n return true;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAIA;;AAEG;MACU,aAAa,CAAA;AACtB,IAAA,WAAA,CAA6B,yBAAoC,EAAA;QAApC,IAAyB,CAAA,yBAAA,GAAzB,yBAAyB;;AAEtD,IAAA,IAAW,SAAS,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,yBAAyB,CAAC,MAAM;;AAGhD,IAAA,IAAW,MAAM,GAAA;AACb,QAAA,OAAO,IAAI,CAAC,yBAAyB,CAAC,MAAM;;AAEnD;;ACbD;;AAEG;MAIU,MAAM,CAAA;AAIf,IAAA,WAAA,GAAA;AACI,QAAA,MAAM,CAAC,gBAAgB,CAAC,CAAC,kBAAkB,CACvC,MAAM,EAAC,WAA6B,EAAC,EACrC,IAAI,aAAa,CAAI,IAAI,CAAC,CAC7B;;AAGL;;;;;AAKG;AACI,IAAA,OAAO,sBAAsB,CAChC,IAAe,EACf,IAAa,EAAA;AAEb,QAAA,OAAO,IAAI;;+GArBN,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAN,MAAM,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAN,MAAM,EAAA,UAAA,EAAA,CAAA;kBAHlB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,UAAU;AACvB,iBAAA;wDAGU,MAAM,EAAA,CAAA;sBADZ;;;ACXL;;AAEG;;;;"}
|
|
@@ -1,65 +1,55 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { effect, untracked, input, model, Directive } from '@angular/core';
|
|
3
3
|
import { tuiInjectElement } from '@taiga-ui/cdk/utils';
|
|
4
4
|
|
|
5
5
|
class TuiMedia {
|
|
6
6
|
constructor() {
|
|
7
7
|
this.el = tuiInjectElement();
|
|
8
|
-
this.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
this.
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
get currentTime() {
|
|
32
|
-
return this.el.currentTime ?? 0;
|
|
33
|
-
}
|
|
34
|
-
get paused() {
|
|
35
|
-
return this.el.paused;
|
|
8
|
+
this.setElCurrentTime = effect(() => {
|
|
9
|
+
if (Math.abs(this.currentTime() - this.el.currentTime) > 0.05) {
|
|
10
|
+
this.el.currentTime = this.currentTime();
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
this.setElPlaybackRate = effect(() => {
|
|
14
|
+
this.updatePlaybackRate(this.playbackRate());
|
|
15
|
+
});
|
|
16
|
+
this.setElPaused = effect(() => {
|
|
17
|
+
const paused = this.paused();
|
|
18
|
+
if (paused) {
|
|
19
|
+
this.el.pause?.();
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
void this.el.play?.();
|
|
23
|
+
}
|
|
24
|
+
this.updatePlaybackRate(untracked(this.playbackRate));
|
|
25
|
+
});
|
|
26
|
+
this.playbackRate = input(1);
|
|
27
|
+
this.volume = model(1);
|
|
28
|
+
this.currentTime = model(this.el.currentTime ?? 0);
|
|
29
|
+
this.paused = model(this.el.paused);
|
|
36
30
|
}
|
|
37
31
|
onPausedChange(paused) {
|
|
38
|
-
this.
|
|
39
|
-
this.updatePlaybackRate(this.playbackRate);
|
|
32
|
+
this.paused.set(paused);
|
|
40
33
|
}
|
|
41
34
|
onVolumeChange() {
|
|
42
|
-
this.volume
|
|
43
|
-
this.volumeChange.emit(this.volume);
|
|
35
|
+
this.volume.set(this.el.volume);
|
|
44
36
|
}
|
|
45
37
|
onCurrentTimeChange() {
|
|
46
|
-
this.
|
|
38
|
+
this.currentTime.set(this.el.currentTime);
|
|
47
39
|
}
|
|
48
40
|
updatePlaybackRate(playbackRate) {
|
|
49
|
-
this.playbackRate = playbackRate;
|
|
50
|
-
this.el.playbackRate = this.playbackRate;
|
|
41
|
+
this.el.playbackRate = playbackRate;
|
|
51
42
|
}
|
|
52
43
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiMedia, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
53
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
44
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiMedia, isStandalone: true, selector: "video[tuiMedia], audio[tuiMedia]", inputs: { playbackRate: { classPropertyName: "playbackRate", publicName: "playbackRate", isSignal: true, isRequired: false, transformFunction: null }, volume: { classPropertyName: "volume", publicName: "volume", isSignal: true, isRequired: false, transformFunction: null }, currentTime: { classPropertyName: "currentTime", publicName: "currentTime", isSignal: true, isRequired: false, transformFunction: null }, paused: { classPropertyName: "paused", publicName: "paused", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { volume: "volumeChange", currentTime: "currentTimeChange", paused: "pausedChange" }, host: { listeners: { "durationchange": "0", "ended": "onPausedChange(true)", "pause": "onPausedChange(true)", "play": "onPausedChange(false)", "volumechange": "onVolumeChange()", "timeupdate": "onCurrentTimeChange()", "seeking": "onCurrentTimeChange()", "seeked": "onCurrentTimeChange()" }, properties: { "volume": "volume()" } }, exportAs: ["tuiMedia"], ngImport: i0 }); }
|
|
54
45
|
}
|
|
55
46
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiMedia, decorators: [{
|
|
56
47
|
type: Directive,
|
|
57
48
|
args: [{
|
|
58
|
-
standalone: true,
|
|
59
49
|
selector: 'video[tuiMedia], audio[tuiMedia]',
|
|
60
50
|
exportAs: 'tuiMedia',
|
|
61
51
|
host: {
|
|
62
|
-
'[volume]': 'volume',
|
|
52
|
+
'[volume]': 'volume()',
|
|
63
53
|
'(durationchange)': '0',
|
|
64
54
|
'(ended)': 'onPausedChange(true)',
|
|
65
55
|
'(pause)': 'onPausedChange(true)',
|
|
@@ -70,22 +60,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
70
60
|
'(seeked)': 'onCurrentTimeChange()',
|
|
71
61
|
},
|
|
72
62
|
}]
|
|
73
|
-
}]
|
|
74
|
-
type: Input
|
|
75
|
-
}], currentTimeChange: [{
|
|
76
|
-
type: Output
|
|
77
|
-
}], pausedChange: [{
|
|
78
|
-
type: Output
|
|
79
|
-
}], volumeChange: [{
|
|
80
|
-
type: Output
|
|
81
|
-
}], playbackRateSetter: [{
|
|
82
|
-
type: Input,
|
|
83
|
-
args: ['playbackRate']
|
|
84
|
-
}], currentTime: [{
|
|
85
|
-
type: Input
|
|
86
|
-
}], paused: [{
|
|
87
|
-
type: Input
|
|
88
|
-
}] } });
|
|
63
|
+
}] });
|
|
89
64
|
|
|
90
65
|
/**
|
|
91
66
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-media.mjs","sources":["../../../projects/cdk/directives/media/media.directive.ts","../../../projects/cdk/directives/media/taiga-ui-cdk-directives-media.ts"],"sourcesContent":["import {Directive,
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-media.mjs","sources":["../../../projects/cdk/directives/media/media.directive.ts","../../../projects/cdk/directives/media/taiga-ui-cdk-directives-media.ts"],"sourcesContent":["import {Directive, effect, input, model, untracked} from '@angular/core';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils';\n\n@Directive({\n selector: 'video[tuiMedia], audio[tuiMedia]',\n exportAs: 'tuiMedia',\n host: {\n '[volume]': 'volume()',\n '(durationchange)': '0',\n '(ended)': 'onPausedChange(true)',\n '(pause)': 'onPausedChange(true)',\n '(play)': 'onPausedChange(false)',\n '(volumechange)': 'onVolumeChange()',\n '(timeupdate)': 'onCurrentTimeChange()',\n '(seeking)': 'onCurrentTimeChange()',\n '(seeked)': 'onCurrentTimeChange()',\n },\n})\nexport class TuiMedia {\n private readonly el = tuiInjectElement<HTMLMediaElement>();\n\n protected readonly setElCurrentTime = effect(() => {\n if (Math.abs(this.currentTime() - this.el.currentTime) > 0.05) {\n this.el.currentTime = this.currentTime();\n }\n });\n\n protected readonly setElPlaybackRate = effect(() => {\n this.updatePlaybackRate(this.playbackRate());\n });\n\n protected readonly setElPaused = effect(() => {\n const paused = this.paused();\n\n if (paused) {\n this.el.pause?.();\n } else {\n void this.el.play?.();\n }\n\n this.updatePlaybackRate(untracked(this.playbackRate));\n });\n\n public readonly playbackRate = input<number>(1);\n\n public readonly volume = model<number>(1);\n\n public readonly currentTime = model<number>(this.el.currentTime ?? 0);\n\n public readonly paused = model<boolean>(this.el.paused);\n\n protected onPausedChange(paused: boolean): void {\n this.paused.set(paused);\n }\n\n protected onVolumeChange(): void {\n this.volume.set(this.el.volume);\n }\n\n protected onCurrentTimeChange(): void {\n this.currentTime.set(this.el.currentTime);\n }\n\n private updatePlaybackRate(playbackRate: number): void {\n this.el.playbackRate = playbackRate;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAkBa,QAA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,GAAA,EAAA,OAAA,EAAA,sBAAA,EAAA,OAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,uBAAA,EAAA,cAAA,EAAA,kBAAA,EAAA,YAAA,EAAA,uBAAA,EAAA,SAAA,EAAA,uBAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,EAAA,UAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAR,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAfpB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,kCAAkC;AAC5C,oBAAA,QAAQ,EAAE,UAAU;AACpB,oBAAA,IAAI,EAAE;AACF,wBAAA,UAAU,EAAE,UAAU;AACtB,wBAAA,kBAAkB,EAAE,GAAG;AACvB,wBAAA,SAAS,EAAE,sBAAsB;AACjC,wBAAA,SAAS,EAAE,sBAAsB;AACjC,wBAAA,QAAQ,EAAE,uBAAuB;AACjC,wBAAA,gBAAgB,EAAE,kBAAkB;AACpC,wBAAA,cAAc,EAAE,uBAAuB;AACvC,wBAAA,WAAW,EAAE,uBAAuB;AACpC,wBAAA,UAAU,EAAE,uBAAuB;AACtC,qBAAA;AACJ,iBAAA;;;ACjBD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { input, Directive } from '@angular/core';
|
|
3
3
|
import { NG_VALIDATORS } from '@angular/forms';
|
|
4
4
|
import { tuiZonefree, tuiTakeUntilDestroyed } from '@taiga-ui/cdk/observables';
|
|
5
5
|
import { tuiInjectElement, tuiProvide } from '@taiga-ui/cdk/utils';
|
|
@@ -12,7 +12,7 @@ class TuiNativeValidator {
|
|
|
12
12
|
this.sub = this.control$
|
|
13
13
|
.pipe(switchMap((control) => control?.events || of(null)), delay(0), tuiZonefree(), tuiTakeUntilDestroyed())
|
|
14
14
|
.subscribe(() => this.handleValidation());
|
|
15
|
-
this.tuiNativeValidator = 'Invalid';
|
|
15
|
+
this.tuiNativeValidator = input('Invalid');
|
|
16
16
|
}
|
|
17
17
|
validate(control) {
|
|
18
18
|
this.control$.next(control);
|
|
@@ -22,24 +22,21 @@ class TuiNativeValidator {
|
|
|
22
22
|
const invalid = !!this.control$.value?.touched && this.control$.value?.invalid;
|
|
23
23
|
// TODO: Replace with :has(:invalid) when supported
|
|
24
24
|
this.el.closest('tui-textfield')?.classList.toggle('tui-invalid', invalid);
|
|
25
|
-
this.el.setCustomValidity?.(invalid ? this.tuiNativeValidator : '');
|
|
25
|
+
this.el.setCustomValidity?.(invalid ? this.tuiNativeValidator() : '');
|
|
26
26
|
}
|
|
27
27
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiNativeValidator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
28
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
28
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiNativeValidator, isStandalone: true, selector: "[tuiNativeValidator]", inputs: { tuiNativeValidator: { classPropertyName: "tuiNativeValidator", publicName: "tuiNativeValidator", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focusout": "handleValidation()" } }, providers: [tuiProvide(NG_VALIDATORS, TuiNativeValidator, true)], ngImport: i0 }); }
|
|
29
29
|
}
|
|
30
30
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiNativeValidator, decorators: [{
|
|
31
31
|
type: Directive,
|
|
32
32
|
args: [{
|
|
33
|
-
standalone: true,
|
|
34
33
|
selector: '[tuiNativeValidator]',
|
|
35
34
|
providers: [tuiProvide(NG_VALIDATORS, TuiNativeValidator, true)],
|
|
36
35
|
host: {
|
|
37
36
|
'(focusout)': 'handleValidation()',
|
|
38
37
|
},
|
|
39
38
|
}]
|
|
40
|
-
}]
|
|
41
|
-
type: Input
|
|
42
|
-
}] } });
|
|
39
|
+
}] });
|
|
43
40
|
|
|
44
41
|
/**
|
|
45
42
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-native-validator.mjs","sources":["../../../projects/cdk/directives/native-validator/native-validator.directive.ts","../../../projects/cdk/directives/native-validator/taiga-ui-cdk-directives-native-validator.ts"],"sourcesContent":["import {Directive,
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-native-validator.mjs","sources":["../../../projects/cdk/directives/native-validator/native-validator.directive.ts","../../../projects/cdk/directives/native-validator/taiga-ui-cdk-directives-native-validator.ts"],"sourcesContent":["import {Directive, input} from '@angular/core';\nimport {type AbstractControl, NG_VALIDATORS, type Validator} from '@angular/forms';\nimport {tuiTakeUntilDestroyed, tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement, tuiProvide} from '@taiga-ui/cdk/utils';\nimport {BehaviorSubject, delay, of, switchMap} from 'rxjs';\n\n@Directive({\n selector: '[tuiNativeValidator]',\n providers: [tuiProvide(NG_VALIDATORS, TuiNativeValidator, true)],\n host: {\n '(focusout)': 'handleValidation()',\n },\n})\nexport class TuiNativeValidator implements Validator {\n private readonly el = tuiInjectElement<HTMLInputElement>();\n private readonly control$ = new BehaviorSubject<AbstractControl | null>(null);\n\n protected readonly sub = this.control$\n .pipe(\n switchMap((control: any) => control?.events || of(null)),\n delay(0),\n tuiZonefree(),\n tuiTakeUntilDestroyed(),\n )\n .subscribe(() => this.handleValidation());\n\n public readonly tuiNativeValidator = input('Invalid');\n\n public validate(control: AbstractControl): null {\n this.control$.next(control);\n\n return null;\n }\n\n protected handleValidation(): void {\n const invalid = !!this.control$.value?.touched && this.control$.value?.invalid;\n\n // TODO: Replace with :has(:invalid) when supported\n this.el.closest('tui-textfield')?.classList.toggle('tui-invalid', invalid);\n this.el.setCustomValidity?.(invalid ? this.tuiNativeValidator() : '');\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAaa,kBAAkB,CAAA;AAP/B,IAAA,WAAA,GAAA;QAQqB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAoB;AACzC,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,eAAe,CAAyB,IAAI,CAAC;QAE1D,IAAG,CAAA,GAAA,GAAG,IAAI,CAAC;AACzB,aAAA,IAAI,CACD,SAAS,CAAC,CAAC,OAAY,KAAK,OAAO,EAAE,MAAM,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,EACxD,KAAK,CAAC,CAAC,CAAC,EACR,WAAW,EAAE,EACb,qBAAqB,EAAE;aAE1B,SAAS,CAAC,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC;AAE7B,QAAA,IAAA,CAAA,kBAAkB,GAAG,KAAK,CAAC,SAAS,CAAC;AAexD;AAbU,IAAA,QAAQ,CAAC,OAAwB,EAAA;AACpC,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC;AAE3B,QAAA,OAAO,IAAI;;IAGL,gBAAgB,GAAA;AACtB,QAAA,MAAM,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO;;AAG9E,QAAA,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,aAAa,EAAE,OAAO,CAAC;AAC1E,QAAA,IAAI,CAAC,EAAE,CAAC,iBAAiB,GAAG,OAAO,GAAG,IAAI,CAAC,kBAAkB,EAAE,GAAG,EAAE,CAAC;;+GA1BhE,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EA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