@taiga-ui/cdk 3.38.0 → 3.39.0-dev.main.c989f60
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/bundles/taiga-ui-cdk-components-dialog-host.umd.js +13 -7
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.js +52 -1
- package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-click-outside.umd.js +89 -0
- package/bundles/taiga-ui-cdk-directives-click-outside.umd.js.map +1 -0
- package/bundles/taiga-ui-cdk-directives.umd.js +10 -4
- package/bundles/taiga-ui-cdk-directives.umd.js.map +1 -1
- package/components/dialog-host/dialog-host.component.d.ts +3 -2
- package/constants/index.d.ts +1 -0
- package/constants/used-icons.d.ts +7 -0
- package/constants/version.d.ts +1 -1
- package/constants/version.js +1 -1
- package/directives/click-outside/click-outside.directive.d.ts +13 -0
- package/directives/click-outside/click-outside.module.d.ts +7 -0
- package/directives/click-outside/index.d.ts +2 -0
- package/directives/click-outside/package.json +10 -0
- package/directives/click-outside/taiga-ui-cdk-directives-click-outside.d.ts +5 -0
- package/directives/index.d.ts +1 -0
- package/esm2015/components/dialog-host/dialog-host.component.js +10 -3
- package/esm2015/constants/index.js +2 -1
- package/esm2015/constants/used-icons.js +50 -0
- package/esm2015/constants/version.js +2 -2
- package/esm2015/directives/click-outside/click-outside.directive.js +39 -0
- package/esm2015/directives/click-outside/click-outside.module.js +16 -0
- package/esm2015/directives/click-outside/index.js +3 -0
- package/esm2015/directives/click-outside/taiga-ui-cdk-directives-click-outside.js +5 -0
- package/esm2015/directives/index.js +2 -1
- package/fesm2015/taiga-ui-cdk-components-dialog-host.js +10 -4
- package/fesm2015/taiga-ui-cdk-components-dialog-host.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-constants.js +52 -2
- package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-click-outside.js +59 -0
- package/fesm2015/taiga-ui-cdk-directives-click-outside.js.map +1 -0
- package/fesm2015/taiga-ui-cdk-directives.js +1 -0
- package/fesm2015/taiga-ui-cdk-directives.js.map +1 -1
- package/package.json +2 -2
- package/schematics/constants/file-globs.js +2 -2
- package/schematics/migration.json +5 -0
- package/schematics/ng-update/v3-37/index.d.ts +3 -0
- package/schematics/ng-update/v3-37/index.js +27 -0
- package/schematics/utils/is-ci.d.ts +1 -0
- package/schematics/utils/is-ci.js +20 -0
- package/schematics/utils/progress.js +5 -0
@@ -0,0 +1,59 @@
|
|
1
|
+
import { DOCUMENT } from '@angular/common';
|
2
|
+
import * as i0 from '@angular/core';
|
3
|
+
import { NgZone, ElementRef, Directive, Inject, Output, NgModule } from '@angular/core';
|
4
|
+
import { tuiZoneOptimized } from '@taiga-ui/cdk/observables';
|
5
|
+
import { tuiGetActualTarget, tuiContainsOrAfter } from '@taiga-ui/cdk/utils';
|
6
|
+
import { fromEvent } from 'rxjs';
|
7
|
+
import { map, filter } from 'rxjs/operators';
|
8
|
+
|
9
|
+
class TuiClickOutsideDirective {
|
10
|
+
constructor(zone, doc, el) {
|
11
|
+
this.zone = zone;
|
12
|
+
this.doc = doc;
|
13
|
+
this.el = el;
|
14
|
+
this.tuiClickOutside = fromEvent(this.doc, 'mouseup').pipe(map(tuiGetActualTarget), filter(target => this.isOutside(target)), tuiZoneOptimized(this.zone));
|
15
|
+
}
|
16
|
+
isOutside(target) {
|
17
|
+
return (target === this.el.nativeElement ||
|
18
|
+
!tuiContainsOrAfter(this.el.nativeElement, target));
|
19
|
+
}
|
20
|
+
}
|
21
|
+
TuiClickOutsideDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiClickOutsideDirective, deps: [{ token: NgZone }, { token: DOCUMENT }, { token: ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
22
|
+
TuiClickOutsideDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiClickOutsideDirective, selector: "[tuiClickOutside]", outputs: { tuiClickOutside: "tuiClickOutside" }, ngImport: i0 });
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiClickOutsideDirective, decorators: [{
|
24
|
+
type: Directive,
|
25
|
+
args: [{
|
26
|
+
selector: '[tuiClickOutside]',
|
27
|
+
}]
|
28
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone, decorators: [{
|
29
|
+
type: Inject,
|
30
|
+
args: [NgZone]
|
31
|
+
}] }, { type: Document, decorators: [{
|
32
|
+
type: Inject,
|
33
|
+
args: [DOCUMENT]
|
34
|
+
}] }, { type: i0.ElementRef, decorators: [{
|
35
|
+
type: Inject,
|
36
|
+
args: [ElementRef]
|
37
|
+
}] }]; }, propDecorators: { tuiClickOutside: [{
|
38
|
+
type: Output
|
39
|
+
}] } });
|
40
|
+
|
41
|
+
class TuiClickOutsideModule {
|
42
|
+
}
|
43
|
+
TuiClickOutsideModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiClickOutsideModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
44
|
+
TuiClickOutsideModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiClickOutsideModule, declarations: [TuiClickOutsideDirective], exports: [TuiClickOutsideDirective] });
|
45
|
+
TuiClickOutsideModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiClickOutsideModule });
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiClickOutsideModule, decorators: [{
|
47
|
+
type: NgModule,
|
48
|
+
args: [{
|
49
|
+
declarations: [TuiClickOutsideDirective],
|
50
|
+
exports: [TuiClickOutsideDirective],
|
51
|
+
}]
|
52
|
+
}] });
|
53
|
+
|
54
|
+
/**
|
55
|
+
* Generated bundle index. Do not edit.
|
56
|
+
*/
|
57
|
+
|
58
|
+
export { TuiClickOutsideDirective, TuiClickOutsideModule };
|
59
|
+
//# sourceMappingURL=taiga-ui-cdk-directives-click-outside.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-click-outside.js","sources":["../../../projects/cdk/directives/click-outside/click-outside.directive.ts","../../../projects/cdk/directives/click-outside/click-outside.module.ts","../../../projects/cdk/directives/click-outside/taiga-ui-cdk-directives-click-outside.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {Directive, ElementRef, Inject, NgZone, Output} from '@angular/core';\nimport {tuiZoneOptimized} from '@taiga-ui/cdk/observables';\nimport {tuiContainsOrAfter, tuiGetActualTarget} from '@taiga-ui/cdk/utils';\nimport {fromEvent, Observable} from 'rxjs';\nimport {filter, map} from 'rxjs/operators';\n\n@Directive({\n selector: '[tuiClickOutside]',\n})\nexport class TuiClickOutsideDirective {\n @Output()\n readonly tuiClickOutside: Observable<unknown> = fromEvent(this.doc, 'mouseup').pipe(\n map(tuiGetActualTarget),\n filter(target => this.isOutside(target)),\n tuiZoneOptimized(this.zone),\n );\n\n constructor(\n @Inject(NgZone) private readonly zone: NgZone,\n @Inject(DOCUMENT) private readonly doc: Document,\n @Inject(ElementRef) private readonly el: ElementRef<HTMLElement>,\n ) {}\n\n private isOutside(target: Node): boolean {\n return (\n target === this.el.nativeElement ||\n !tuiContainsOrAfter(this.el.nativeElement, target)\n );\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiClickOutsideDirective} from './click-outside.directive';\n\n@NgModule({\n declarations: [TuiClickOutsideDirective],\n exports: [TuiClickOutsideDirective],\n})\nexport class TuiClickOutsideModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAUa,wBAAwB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C,iBAAA,CAAA;;0BAUQ,MAAM;2BAAC,MAAM,CAAA;8BAC0B,QAAQ,EAAA,UAAA,EAAA,CAAA;0BAA/C,MAAM;2BAAC,QAAQ,CAAA;;0BACf,MAAM;2BAAC,UAAU,CAAA;4CATb,eAAe,EAAA,CAAA;sBADvB,MAAM;;;MCHE,qBAAqB,CAAA;;mHAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;oHAArB,qBAAqB,EAAA,YAAA,EAAA,CAHf,wBAAwB,CAAA,EAAA,OAAA,EAAA,CAC7B,wBAAwB,CAAA,EAAA,CAAA,CAAA;oHAEzB,qBAAqB,EAAA,CAAA,CAAA;4FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,wBAAwB,CAAC;oBACxC,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACtC,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
@@ -2,6 +2,7 @@ export * from '@taiga-ui/cdk/directives/active-zone';
|
|
2
2
|
export * from '@taiga-ui/cdk/directives/auto-focus';
|
3
3
|
export * from '@taiga-ui/cdk/directives/autofilled';
|
4
4
|
export * from '@taiga-ui/cdk/directives/checked';
|
5
|
+
export * from '@taiga-ui/cdk/directives/click-outside';
|
5
6
|
export * from '@taiga-ui/cdk/directives/control';
|
6
7
|
export * from '@taiga-ui/cdk/directives/copy-processor';
|
7
8
|
export * from '@taiga-ui/cdk/directives/drag';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives.js","sources":["../../../projects/cdk/directives/taiga-ui-cdk-directives.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives.js","sources":["../../../projects/cdk/directives/taiga-ui-cdk-directives.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEG"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@taiga-ui/cdk",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.39.0-dev.main.c989f60",
|
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",
|
@@ -20,7 +20,7 @@
|
|
20
20
|
"@ng-web-apis/resize-observer": "3.0.1",
|
21
21
|
"@tinkoff/ng-event-plugins": "3.1.0",
|
22
22
|
"@tinkoff/ng-polymorpheus": "4.1.0",
|
23
|
-
"tslib": "2.6.
|
23
|
+
"tslib": "2.6.1"
|
24
24
|
},
|
25
25
|
"peerDependencies": {
|
26
26
|
"@angular/animations": ">=12.0.0",
|
@@ -34,6 +34,6 @@ exports.ALL_TS_FILES = [
|
|
34
34
|
`!(${EXCLUDE_DIRECTORIES})/**/!(${EXCLUDE_FILE_PATTERNS}).ts`,
|
35
35
|
];
|
36
36
|
exports.ALL_FILES = [
|
37
|
-
`!(${EXCLUDE_FILE_PATTERNS}).{html,ts,less,json}`,
|
38
|
-
`!(${EXCLUDE_DIRECTORIES})/**/!(${EXCLUDE_FILE_PATTERNS}).{html,ts,less,json}`,
|
37
|
+
`!(${EXCLUDE_FILE_PATTERNS}).{html,ts,less,sass,scss,css,json}`,
|
38
|
+
`!(${EXCLUDE_DIRECTORIES})/**/!(${EXCLUDE_FILE_PATTERNS}).{html,ts,less,sass,scss,css,json}`,
|
39
39
|
];
|
@@ -26,6 +26,11 @@
|
|
26
26
|
"version": "3.36.0",
|
27
27
|
"factory": "./ng-update/v3-36/index#updateToV3_36"
|
28
28
|
},
|
29
|
+
"updateToV3_37": {
|
30
|
+
"description": "Rename tui-text-area to tui-textarea",
|
31
|
+
"version": "3.37.0",
|
32
|
+
"factory": "./ng-update/v3-37/index#updateToV3_37"
|
33
|
+
},
|
29
34
|
"updateToV4": {
|
30
35
|
"description": "Updates Taiga UI packages to v4",
|
31
36
|
"version": "4.0.0",
|
@@ -0,0 +1,27 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.updateToV3_37 = void 0;
|
4
|
+
const ng_morph_1 = require("ng-morph");
|
5
|
+
const constants_1 = require("../../constants");
|
6
|
+
const colored_log_1 = require("../../utils/colored-log");
|
7
|
+
const get_file_system_1 = require("../utils/get-file-system");
|
8
|
+
const replace_text_1 = require("../utils/replace-text");
|
9
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
10
|
+
function updateToV3_37(options) {
|
11
|
+
return (tree, _) => {
|
12
|
+
const fileSystem = get_file_system_1.getFileSystem(tree);
|
13
|
+
!options[`skip-logs`] &&
|
14
|
+
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing TuiTextArea* to TuiTextarea*...`);
|
15
|
+
replace_text_1.replaceText([{ from: `tui-text-area`, to: `tui-textarea` }], constants_1.ALL_FILES);
|
16
|
+
replace_text_1.replaceText([
|
17
|
+
{ from: `TuiTextAreaComponent`, to: `TuiTextareaComponent` },
|
18
|
+
{ from: `TuiTextAreaDirective`, to: `TuiTextareaDirective` },
|
19
|
+
{ from: `TuiTextAreaModule`, to: `TuiTextareaModule` },
|
20
|
+
], constants_1.ALL_TS_FILES);
|
21
|
+
fileSystem.commitEdits();
|
22
|
+
ng_morph_1.saveActiveProject();
|
23
|
+
!options[`skip-logs`] &&
|
24
|
+
colored_log_1.titleLog(`${colored_log_1.FINISH_SYMBOL} TuiTextarea* successfully migrated \n`);
|
25
|
+
};
|
26
|
+
}
|
27
|
+
exports.updateToV3_37 = updateToV3_37;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function tuiIsCI(): boolean;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
/// <reference types="node" />
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
+
exports.tuiIsCI = void 0;
|
5
|
+
function tuiIsCI() {
|
6
|
+
return (process.env.TUI_CI === `true` ||
|
7
|
+
!!process.env.CI || // Another CI
|
8
|
+
!!process.env.GITHUB_ACTION || // Github CI
|
9
|
+
!!process.env.GITLAB_CI || // Gitlab CI
|
10
|
+
!!process.env.CIRCLECI || // Circle CI
|
11
|
+
!!process.env.TF_BUILD || // Azure CI
|
12
|
+
!!process.env.CIRRUS_CI || // Cirrus CI
|
13
|
+
!!process.env.BUILDKITE || // Build Kite CI
|
14
|
+
!!process.env.HEROKU_TEST_RUN_ID || // Heroku CI
|
15
|
+
!!process.env.CODEBUILD_BUILD_ID || // CodeBuild CI
|
16
|
+
!!process.env.TEAMCITY_VERSION || // TeamCity CI
|
17
|
+
!!process.env.BUILD_ID // Jenkins/Hudson
|
18
|
+
);
|
19
|
+
}
|
20
|
+
exports.tuiIsCI = tuiIsCI;
|
@@ -1,11 +1,16 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.setupProgressLogger = void 0;
|
4
|
+
/// <reference types="node" />
|
4
5
|
const readline_1 = require("readline");
|
5
6
|
const colored_log_1 = require("./colored-log");
|
7
|
+
const is_ci_1 = require("./is-ci");
|
6
8
|
function setupProgressLogger({ total, prefix = ``, tabs = 2, }) {
|
7
9
|
let i = 1;
|
8
10
|
return (message, incrementIndex = true) => {
|
11
|
+
if (is_ci_1.tuiIsCI()) {
|
12
|
+
return;
|
13
|
+
}
|
9
14
|
const isLast = i === total;
|
10
15
|
const progressLog = `(${i} / ${total}) ${prefix} ${isLast ? colored_log_1.SUCCESS_SYMBOL : message}`;
|
11
16
|
i = incrementIndex ? i + 1 : i;
|