@taiga-ui/cdk 3.0.0 → 3.2.0
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 +3 -3
- package/bundles/taiga-ui-cdk-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.js +1 -1
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.js +7 -2
- package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-date-time.umd.js +2 -2
- package/bundles/taiga-ui-cdk-date-time.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js +1 -1
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-services.umd.js +5 -0
- package/bundles/taiga-ui-cdk-services.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-tokens.umd.js +23 -20
- package/bundles/taiga-ui-cdk-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-dom.umd.js +6 -1
- package/bundles/taiga-ui-cdk-utils-dom.umd.js.map +1 -1
- package/constants/empty.d.ts +1 -1
- package/constants/version.d.ts +1 -1
- package/constants/version.js +1 -1
- package/esm2015/abstract/control.js +1 -1
- package/esm2015/components/dialog-host/dialog-host.component.js +2 -2
- package/esm2015/constants/empty.js +7 -2
- package/esm2015/constants/version.js +2 -2
- package/esm2015/date-time/date-format.js +2 -2
- package/esm2015/date-time/date-separator.js +2 -2
- package/esm2015/date-time/day-range.js +1 -1
- package/esm2015/date-time/day.js +1 -1
- package/esm2015/date-time/month.js +1 -1
- package/esm2015/directives/auto-focus/autofocus.options.js +2 -2
- package/esm2015/services/destroy.service.js +6 -1
- package/esm2015/tokens/active-element.js +2 -2
- package/esm2015/tokens/alerts.js +2 -2
- package/esm2015/tokens/default-renderer.js +2 -2
- package/esm2015/tokens/dialogs.js +2 -2
- package/esm2015/tokens/focusable-item-accessor.js +2 -2
- package/esm2015/tokens/is-android.js +2 -2
- package/esm2015/tokens/is-apple.js +2 -2
- package/esm2015/tokens/is-chromium.js +2 -2
- package/esm2015/tokens/is-cypress.js +2 -2
- package/esm2015/tokens/is-firefox.js +2 -2
- package/esm2015/tokens/is-ios.js +2 -2
- package/esm2015/tokens/is-mobile.js +2 -2
- package/esm2015/tokens/is-webkit.js +6 -3
- package/esm2015/tokens/removed-element.js +2 -2
- package/esm2015/tokens/swipe-options.js +2 -2
- package/esm2015/tokens/take-only-trusted-events.js +2 -2
- package/esm2015/tokens/touch-supported.js +2 -2
- package/esm2015/tokens/window-height.js +2 -2
- package/esm2015/tokens/zoom-options.js +2 -2
- package/esm2015/utils/dom/point-to-client-rect.js +7 -2
- package/fesm2015/taiga-ui-cdk-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-components-dialog-host.js +1 -1
- package/fesm2015/taiga-ui-cdk-components-dialog-host.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-constants.js +7 -2
- package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-date-time.js +2 -2
- package/fesm2015/taiga-ui-cdk-date-time.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-auto-focus.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-auto-focus.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-services.js +5 -0
- package/fesm2015/taiga-ui-cdk-services.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-tokens.js +23 -20
- package/fesm2015/taiga-ui-cdk-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-dom.js +6 -1
- package/fesm2015/taiga-ui-cdk-utils-dom.js.map +1 -1
- package/package.json +6 -4
- package/schematics/constants/file-globs.d.ts +3 -2
- package/schematics/constants/file-globs.js +8 -3
- package/schematics/ng-update/constants/consts.js +10 -0
- package/schematics/ng-update/index.js +15 -1
- package/schematics/ng-update/steps/migrate-progress.js +1 -1
- package/schematics/ng-update/steps/migrate-sliders/migrate-input-range.js +17 -1
- package/schematics/ng-update/steps/migrate-sliders/migrate-input-slider.js +12 -1
- package/schematics/ng-update/steps/migrate-taiga-proprietary-icons.js +8 -1
- package/schematics/ng-update/steps/migrate-templates.js +5 -4
- package/schematics/ng-update/steps/migrate-textfield-controller.js +2 -2
- package/schematics/ng-update/steps/replace-styles.d.ts +1 -0
- package/schematics/ng-update/steps/replace-styles.js +6 -2
- package/schematics/utils/angular-json-manipulations.js +10 -2
- package/schematics/utils/colored-log.d.ts +1 -1
- package/schematics/utils/colored-log.js +1 -1
- package/schematics/utils/get-project.d.ts +2 -2
- package/schematics/utils/get-project.js +7 -4
- package/schematics/utils/progress.d.ts +5 -1
- package/schematics/utils/progress.js +16 -9
- package/services/destroy.service.d.ts +5 -0
- package/utils/dom/point-to-client-rect.d.ts +1 -1
|
@@ -32,6 +32,7 @@ function updateToV3(options) {
|
|
|
32
32
|
main(options),
|
|
33
33
|
addTaigaStyles(options),
|
|
34
34
|
migrate_taiga_proprietary_icons_1.migrateTaigaProprietaryIcons(options),
|
|
35
|
+
showNormalizeWarning(),
|
|
35
36
|
() => {
|
|
36
37
|
const executionTime = get_execution_time_1.getExecutionTime(t0, performance.now());
|
|
37
38
|
colored_log_1.titleLog(`${colored_log_1.FINISH_SYMBOL} We migrated packages to @taiga-ui/*@${versions_1.TAIGA_VERSION} in ${executionTime}. \n`);
|
|
@@ -79,7 +80,20 @@ function addTaigaStyles(options) {
|
|
|
79
80
|
});
|
|
80
81
|
}
|
|
81
82
|
function getFileSystem(tree) {
|
|
82
|
-
const project = ng_morph_1.createProject(tree, '/',
|
|
83
|
+
const project = ng_morph_1.createProject(tree, '/', constants_1.ALL_FILES);
|
|
83
84
|
ng_morph_1.setActiveProject(project);
|
|
84
85
|
return project.getFileSystem().fs;
|
|
85
86
|
}
|
|
87
|
+
function showNormalizeWarning() {
|
|
88
|
+
return (tree, context) => {
|
|
89
|
+
var _a;
|
|
90
|
+
try {
|
|
91
|
+
if (!!((_a = ng_morph_1.getPackageJsonDependency(tree, '@taiga-ui/styles')) === null || _a === void 0 ? void 0 : _a.version)) {
|
|
92
|
+
context.logger.warn(replace_styles_1.TUI_WARNING_NORMALIZE);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
catch (_b) {
|
|
96
|
+
// noop
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
}
|
|
@@ -17,7 +17,7 @@ function migrateProgress(fileSystem) {
|
|
|
17
17
|
}
|
|
18
18
|
fileSystem.commitEdits();
|
|
19
19
|
ng_morph_1.saveActiveProject();
|
|
20
|
-
ng_morph_1.setActiveProject(ng_morph_1.createProject(fileSystem.tree, '/',
|
|
20
|
+
ng_morph_1.setActiveProject(ng_morph_1.createProject(fileSystem.tree, '/', constants_1.ALL_FILES));
|
|
21
21
|
colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} progress bars migrated \n`);
|
|
22
22
|
}
|
|
23
23
|
exports.migrateProgress = migrateProgress;
|
|
@@ -7,18 +7,29 @@ const ng_morph_1 = require("ng-morph");
|
|
|
7
7
|
const ng_component_1 = require("../../../utils/angular/ng-component");
|
|
8
8
|
const add_unique_import_1 = require("../../../utils/add-unique-import");
|
|
9
9
|
const constants_1 = require("../../../constants");
|
|
10
|
+
const progress_1 = require("../../../utils/progress");
|
|
10
11
|
const MIN_LABELS_MIGRATION_METHOD_NAME = 'tuiMigrationInputRangeMinLabel';
|
|
11
12
|
const MAX_LABELS_MIGRATION_METHOD_NAME = 'tuiMigrationInputRangeMaxLabel';
|
|
12
13
|
function migrateInputRange(fileSystem) {
|
|
13
14
|
const templateResources = get_component_templates_1.getComponentTemplates(constants_1.ALL_TS_FILES);
|
|
14
15
|
const COMPONENTS_WITH_MIN_LABELS = new Set();
|
|
15
16
|
const COMPONENTS_WITH_MAX_LABELS = new Set();
|
|
17
|
+
let progressLog = progress_1.setupProgressLogger({
|
|
18
|
+
total: templateResources.length,
|
|
19
|
+
prefix: '[replaceMinMaxLabel]',
|
|
20
|
+
});
|
|
16
21
|
for (const templateResource of templateResources) {
|
|
22
|
+
progressLog(templateResource.componentPath);
|
|
17
23
|
replaceMinLabel(templateResource, fileSystem, COMPONENTS_WITH_MIN_LABELS);
|
|
18
24
|
replaceMaxLabel(templateResource, fileSystem, COMPONENTS_WITH_MAX_LABELS);
|
|
19
25
|
}
|
|
20
26
|
save(fileSystem);
|
|
27
|
+
progressLog = progress_1.setupProgressLogger({
|
|
28
|
+
total: COMPONENTS_WITH_MIN_LABELS.size,
|
|
29
|
+
prefix: '[COMPONENTS_WITH_MIN_LABELS]',
|
|
30
|
+
});
|
|
21
31
|
for (const componentPath of Array.from(COMPONENTS_WITH_MIN_LABELS)) {
|
|
32
|
+
progressLog(componentPath);
|
|
22
33
|
addMinMaxLabelMethod(componentPath, MIN_LABELS_MIGRATION_METHOD_NAME, [
|
|
23
34
|
'const currentValue = context.$implicit;',
|
|
24
35
|
'const minValue = 0; // TODO: (Taiga UI migration) replace with the MIN value of the input-range',
|
|
@@ -27,7 +38,12 @@ function migrateInputRange(fileSystem) {
|
|
|
27
38
|
'return String(currentValue);',
|
|
28
39
|
]);
|
|
29
40
|
}
|
|
41
|
+
progressLog = progress_1.setupProgressLogger({
|
|
42
|
+
total: COMPONENTS_WITH_MAX_LABELS.size,
|
|
43
|
+
prefix: '[COMPONENTS_WITH_MAX_LABELS]',
|
|
44
|
+
});
|
|
30
45
|
for (const componentPath of Array.from(COMPONENTS_WITH_MAX_LABELS)) {
|
|
46
|
+
progressLog(componentPath);
|
|
31
47
|
addMinMaxLabelMethod(componentPath, MAX_LABELS_MIGRATION_METHOD_NAME, [
|
|
32
48
|
'const currentValue = context.$implicit;',
|
|
33
49
|
'const maxValue = 100; // TODO: (Taiga UI migration) replace with the MAX value of the input',
|
|
@@ -83,5 +99,5 @@ function addMinMaxLabelMethod(componentPath, methodName, methodCode) {
|
|
|
83
99
|
function save(fileSystem) {
|
|
84
100
|
fileSystem.commitEdits();
|
|
85
101
|
ng_morph_1.saveActiveProject();
|
|
86
|
-
ng_morph_1.setActiveProject(ng_morph_1.createProject(fileSystem.tree, '/',
|
|
102
|
+
ng_morph_1.setActiveProject(ng_morph_1.createProject(fileSystem.tree, '/', constants_1.ALL_FILES));
|
|
87
103
|
}
|
|
@@ -8,10 +8,16 @@ const add_unique_import_1 = require("../../../utils/add-unique-import");
|
|
|
8
8
|
const get_component_templates_1 = require("../../../utils/templates/get-component-templates");
|
|
9
9
|
const elements_1 = require("../../../utils/templates/elements");
|
|
10
10
|
const constants_1 = require("../../../constants");
|
|
11
|
+
const progress_1 = require("../../../utils/progress");
|
|
11
12
|
function migrateInputSlider(fileSystem) {
|
|
12
13
|
const templateResources = get_component_templates_1.getComponentTemplates(constants_1.ALL_TS_FILES);
|
|
13
14
|
const COMPONENTS_WITH_MIN_MAX_LABELS = new Set();
|
|
15
|
+
let progressLog = progress_1.setupProgressLogger({
|
|
16
|
+
total: templateResources.length,
|
|
17
|
+
prefix: '[replaceMinMaxLabels]',
|
|
18
|
+
});
|
|
14
19
|
for (const templateResource of templateResources) {
|
|
20
|
+
progressLog(templateResource.componentPath);
|
|
15
21
|
replaceMinMaxLabels(templateResource, fileSystem, COMPONENTS_WITH_MIN_MAX_LABELS);
|
|
16
22
|
}
|
|
17
23
|
/**
|
|
@@ -20,8 +26,13 @@ function migrateInputSlider(fileSystem) {
|
|
|
20
26
|
* */
|
|
21
27
|
fileSystem.commitEdits();
|
|
22
28
|
ng_morph_1.saveActiveProject();
|
|
23
|
-
ng_morph_1.setActiveProject(ng_morph_1.createProject(fileSystem.tree, '/',
|
|
29
|
+
ng_morph_1.setActiveProject(ng_morph_1.createProject(fileSystem.tree, '/', constants_1.ALL_FILES));
|
|
30
|
+
progressLog = progress_1.setupProgressLogger({
|
|
31
|
+
total: COMPONENTS_WITH_MIN_MAX_LABELS.size,
|
|
32
|
+
prefix: '[addMinMaxLabelMethod]',
|
|
33
|
+
});
|
|
24
34
|
for (const componentPath of Array.from(COMPONENTS_WITH_MIN_MAX_LABELS)) {
|
|
35
|
+
progressLog(componentPath);
|
|
25
36
|
addMinMaxLabelMethod(componentPath);
|
|
26
37
|
}
|
|
27
38
|
}
|
|
@@ -39,7 +39,14 @@ function migrateTaigaProprietaryIcons(options) {
|
|
|
39
39
|
context.logger.warn(`[WARNING]: Target project not found. ${MANUAL_MIGRATION_TIPS}`);
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
let targetOptions;
|
|
43
|
+
try {
|
|
44
|
+
targetOptions = get_project_target_options_1.getProjectTargetOptions(project, 'build');
|
|
45
|
+
}
|
|
46
|
+
catch (_a) {
|
|
47
|
+
context.logger.warn(`[WARNING]: No buildable project was found. ${MANUAL_MIGRATION_TIPS}`);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
43
50
|
if (Array.isArray(targetOptions === null || targetOptions === void 0 ? void 0 : targetOptions.assets)) {
|
|
44
51
|
const tdsSrc = '@taiga-ui/proprietary-tds-icons/src';
|
|
45
52
|
const hasIcons = targetOptions.assets.find(asset => {
|
|
@@ -36,14 +36,15 @@ function migrateTemplates(fileSystem) {
|
|
|
36
36
|
migrateBinaryAttributes,
|
|
37
37
|
addWarningForFormatNumberPipe,
|
|
38
38
|
];
|
|
39
|
-
|
|
39
|
+
const progressLog = progress_1.setupProgressLogger({
|
|
40
|
+
total: componentWithTemplatesPaths.length,
|
|
41
|
+
});
|
|
42
|
+
componentWithTemplatesPaths.forEach(resource => {
|
|
40
43
|
const path = fileSystem.resolve(template_resource_1.getPathFromTemplateResource(resource));
|
|
41
44
|
const recorder = fileSystem.edit(path);
|
|
42
|
-
const isLastTemplate = templateIndex === templates.length - 1;
|
|
43
45
|
actions.forEach((action, actionIndex) => {
|
|
44
46
|
const isLastAction = actionIndex === actions.length - 1;
|
|
45
|
-
|
|
46
|
-
progress_1.printProgress(`${colored_log_1.SMALL_TAB_SYMBOL.repeat(2)}${progressLog}`, isLastTemplate && isLastAction);
|
|
47
|
+
progressLog(action.name, isLastAction);
|
|
47
48
|
action({ resource, fileSystem, recorder });
|
|
48
49
|
});
|
|
49
50
|
});
|
|
@@ -24,12 +24,12 @@ const TEXTFIELDS = [
|
|
|
24
24
|
];
|
|
25
25
|
const ATTRS_MAP = {
|
|
26
26
|
tuitextfieldautocomplete: 'autocomplete',
|
|
27
|
-
|
|
27
|
+
tuitextfieldinputmode: 'inputmode',
|
|
28
28
|
tuitextfieldmaxlength: 'maxlength',
|
|
29
29
|
tuitextfieldtype: 'type',
|
|
30
30
|
tuitextfieldexampletext: 'placeholder',
|
|
31
31
|
'[tuitextfieldautocomplete]': '[attr.autocomplete]',
|
|
32
|
-
'[
|
|
32
|
+
'[tuitextfieldinputmode]': '[attr.inputmode]',
|
|
33
33
|
'[tuitextfieldmaxlength]': '[attr.maxlength]',
|
|
34
34
|
'[tuitextfieldtype]': '[attr.type]',
|
|
35
35
|
'[tuitextfieldexampletext]': '[attr.placeholder]',
|
|
@@ -1 +1,2 @@
|
|
|
1
|
+
export declare const TUI_WARNING_NORMALIZE = "\n// [WARNING]: In version 3.0 we drop to support normalize(v7) out-of-the-box\n// You need to manually download css file from https://necolas.github.io/normalize.css/\n// If you're looking to use reset styles or you can write your own reset.css";
|
|
1
2
|
export declare function replaceStyles(): void;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.replaceStyles = void 0;
|
|
3
|
+
exports.replaceStyles = exports.TUI_WARNING_NORMALIZE = void 0;
|
|
4
4
|
const ng_morph_1 = require("ng-morph");
|
|
5
5
|
const breakpoints_1 = require("../constants/breakpoints");
|
|
6
|
+
exports.TUI_WARNING_NORMALIZE = `
|
|
7
|
+
// [WARNING]: In version 3.0 we drop to support normalize(v7) out-of-the-box
|
|
8
|
+
// You need to manually download css file from https://necolas.github.io/normalize.css/
|
|
9
|
+
// If you're looking to use reset styles or you can write your own reset.css`;
|
|
6
10
|
function replaceStyles() {
|
|
7
11
|
var _a;
|
|
8
12
|
(_a = ng_morph_1.getActiveProject()) === null || _a === void 0 ? void 0 : _a.getSourceFiles('**/**.less').forEach(sourceFile => {
|
|
@@ -12,7 +16,7 @@ function replaceStyles() {
|
|
|
12
16
|
fullText = fullText.replaceAll(new RegExp(`(?<=@media.*)(${from})(?=[\\s,{])`, 'g'), to);
|
|
13
17
|
});
|
|
14
18
|
}
|
|
15
|
-
sourceFile.replaceWithText(fullText.replace(`@import '~@taiga-ui/core/styles/taiga-ui-global';`,
|
|
19
|
+
sourceFile.replaceWithText(fullText.replace(`@import '~@taiga-ui/core/styles/taiga-ui-global';`, `${exports.TUI_WARNING_NORMALIZE}\n@import '~@taiga-ui/styles/taiga-ui-global';`));
|
|
16
20
|
});
|
|
17
21
|
}
|
|
18
22
|
exports.replaceStyles = replaceStyles;
|
|
@@ -21,13 +21,21 @@ function isInvalidAngularJson(tree) {
|
|
|
21
21
|
}
|
|
22
22
|
exports.isInvalidAngularJson = isInvalidAngularJson;
|
|
23
23
|
function addStylesToAngularJson(options, context, taigaStyles, filter, stylesToReplace, tree) {
|
|
24
|
+
const MANUAL_MIGRATION_TIPS = `Add styles ${taigaStyles.join(',')} to angular.json manually.`;
|
|
24
25
|
return workspace_1.updateWorkspace(workspace => {
|
|
25
26
|
const project = get_project_1.getProject(options, workspace);
|
|
26
27
|
if (!project) {
|
|
27
|
-
context.logger.warn(`[WARNING]: Target project not found.
|
|
28
|
+
context.logger.warn(`[WARNING]: Target project not found. ${MANUAL_MIGRATION_TIPS}`);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
let targetOptions;
|
|
32
|
+
try {
|
|
33
|
+
targetOptions = get_project_target_options_1.getProjectTargetOptions(project, 'build');
|
|
34
|
+
}
|
|
35
|
+
catch (_a) {
|
|
36
|
+
context.logger.warn(`[WARNING]: No buildable project was found. ${MANUAL_MIGRATION_TIPS}`);
|
|
28
37
|
return;
|
|
29
38
|
}
|
|
30
|
-
const targetOptions = get_project_target_options_1.getProjectTargetOptions(project, 'build');
|
|
31
39
|
const styles = targetOptions.styles;
|
|
32
40
|
if (filter && filter(styles)) {
|
|
33
41
|
return;
|
|
@@ -7,5 +7,5 @@ export declare const SMALL_TAB_SYMBOL = " ";
|
|
|
7
7
|
export declare const START_SYMBOL = "\uD83D\uDE80";
|
|
8
8
|
export declare const FINISH_SYMBOL = "\uD83C\uDFC6";
|
|
9
9
|
export declare const REPLACE_SYMBOL = "\u26A1\uFE0F";
|
|
10
|
-
export declare const PROCESSING_SYMBOL = "
|
|
10
|
+
export declare const PROCESSING_SYMBOL = "> ";
|
|
11
11
|
export declare const SUCCESS_SYMBOL = "\u2705 ";
|
|
@@ -25,5 +25,5 @@ exports.SMALL_TAB_SYMBOL = ` `; // @note: if you use \t then we have big gaps
|
|
|
25
25
|
exports.START_SYMBOL = `🚀`;
|
|
26
26
|
exports.FINISH_SYMBOL = `🏆`;
|
|
27
27
|
exports.REPLACE_SYMBOL = `⚡️`;
|
|
28
|
-
exports.PROCESSING_SYMBOL =
|
|
28
|
+
exports.PROCESSING_SYMBOL = `> `;
|
|
29
29
|
exports.SUCCESS_SYMBOL = `✅ `;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { workspaces } from '@angular-devkit/core';
|
|
2
1
|
import { Schema } from '../ng-add/schema';
|
|
3
|
-
|
|
2
|
+
import { ProjectDefinition, WorkspaceDefinition } from '@angular-devkit/core/src/workspace';
|
|
3
|
+
export declare function getProject(options: Schema, workspace: WorkspaceDefinition): ProjectDefinition | undefined;
|
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getProject = void 0;
|
|
4
4
|
function getProject(options, workspace) {
|
|
5
|
-
var _a;
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
5
|
+
var _a, _b;
|
|
6
|
+
const firstBuildableProjectName = (_a = Array.from(workspace.projects.entries()).find(([_, project]) => project.targets.get('build'))) === null || _a === void 0 ? void 0 : _a[0];
|
|
7
|
+
const projectName = options.project ||
|
|
8
|
+
((_b = workspace.extensions.defaultProject) === null || _b === void 0 ? void 0 : _b.toString()) ||
|
|
9
|
+
firstBuildableProjectName ||
|
|
10
|
+
'';
|
|
11
|
+
return workspace.projects.get(projectName);
|
|
9
12
|
}
|
|
10
13
|
exports.getProject = getProject;
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
export declare function
|
|
1
|
+
export declare function setupProgressLogger({ total, prefix, tabs, }: {
|
|
2
|
+
total: number;
|
|
3
|
+
prefix?: string;
|
|
4
|
+
tabs?: number;
|
|
5
|
+
}): (message: string, incrementIndex?: boolean) => void;
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.setupProgressLogger = void 0;
|
|
4
4
|
const readline_1 = require("readline");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
const colored_log_1 = require("./colored-log");
|
|
6
|
+
function setupProgressLogger({ total, prefix = '', tabs = 2, }) {
|
|
7
|
+
let i = 1;
|
|
8
|
+
return (message, incrementIndex = true) => {
|
|
9
|
+
const isLast = i === total;
|
|
10
|
+
const progressLog = `(${i} / ${total}) ${prefix} ${isLast ? colored_log_1.SUCCESS_SYMBOL : message}`;
|
|
11
|
+
i = incrementIndex ? i + 1 : i;
|
|
12
|
+
readline_1.clearLine(process.stdout, 0);
|
|
13
|
+
readline_1.cursorTo(process.stdout, 0);
|
|
14
|
+
process.stdout.write(colored_log_1.SMALL_TAB_SYMBOL.repeat(tabs) + progressLog);
|
|
15
|
+
if (isLast && incrementIndex) {
|
|
16
|
+
process.stdout.write('\n');
|
|
17
|
+
}
|
|
18
|
+
};
|
|
12
19
|
}
|
|
13
|
-
exports.
|
|
20
|
+
exports.setupProgressLogger = setupProgressLogger;
|
|
@@ -2,7 +2,12 @@ import { OnDestroy } from '@angular/core';
|
|
|
2
2
|
import { ReplaySubject } from 'rxjs';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
5
|
+
* @note:
|
|
5
6
|
* Observable abstraction over ngOnDestroy to use with takeUntil
|
|
7
|
+
*
|
|
8
|
+
* Why we use `ReplaySubject` instead of `Subject`?
|
|
9
|
+
* Well, we’ll use ReplaySubject to emit the last message in case
|
|
10
|
+
* the subscription is ended after the component is destroyed.
|
|
6
11
|
*/
|
|
7
12
|
export declare class TuiDestroyService extends ReplaySubject<void> implements OnDestroy {
|
|
8
13
|
constructor();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function tuiPointToClientRect(x?: number, y?: number):
|
|
1
|
+
export declare function tuiPointToClientRect(x?: number, y?: number): DOMRect;
|