@taiga-ui/cdk 3.10.0 → 3.12.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/abstract/dialog.service.d.ts +1 -1
- package/bundles/taiga-ui-cdk-abstract.umd.js +1 -1
- package/bundles/taiga-ui-cdk-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-coercion.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.js +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-date-time.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-decorators.umd.js +18 -0
- package/bundles/taiga-ui-cdk-decorators.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-checked.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-droppable.umd.js +3 -1
- package/bundles/taiga-ui-cdk-directives-droppable.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-element.umd.js +18 -332
- package/bundles/taiga-ui-cdk-directives-element.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-for-async.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-overscroll.umd.js +3 -1
- package/bundles/taiga-ui-cdk-directives-overscroll.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-prevent-default.umd.js +3 -1
- package/bundles/taiga-ui-cdk-directives-prevent-default.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-observables.umd.js +16 -16
- package/bundles/taiga-ui-cdk-observables.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-services.umd.js +9 -3
- package/bundles/taiga-ui-cdk-services.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-calendar.umd.js +26 -0
- package/bundles/taiga-ui-cdk-utils-calendar.umd.js.map +1 -0
- package/bundles/taiga-ui-cdk-utils-dom.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-focus.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-math.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js +5 -0
- package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-svg.umd.js +5 -2
- package/bundles/taiga-ui-cdk-utils-svg.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils.umd.js +10 -4
- package/bundles/taiga-ui-cdk-utils.umd.js.map +1 -1
- package/coercion/coerce-boolean-property.d.ts +1 -1
- package/constants/version.d.ts +1 -1
- package/constants/version.js +1 -1
- package/date-time/time.d.ts +1 -1
- package/date-time/year.d.ts +1 -1
- package/decorators/debounce.d.ts +1 -0
- package/decorators/index.d.ts +1 -0
- package/directives/auto-focus/autofocus.directive.d.ts +1 -1
- package/directives/checked/checked.directive.d.ts +1 -1
- package/directives/droppable/droppable.directive.d.ts +1 -1
- package/directives/element/element.directive.d.ts +2 -1
- package/directives/for-async/for-async.directive.d.ts +1 -1
- package/directives/overscroll/overscroll.directive.d.ts +1 -1
- package/directives/prevent-default/prevent-default.directive.d.ts +1 -1
- package/esm2015/abstract/dialog.directive.js +3 -3
- package/esm2015/abstract/dialog.service.js +1 -1
- package/esm2015/coercion/coerce-boolean-property.js +1 -1
- package/esm2015/constants/version.js +2 -2
- package/esm2015/date-time/time.js +1 -1
- package/esm2015/date-time/year.js +1 -1
- package/esm2015/decorators/debounce.js +12 -0
- package/esm2015/decorators/index.js +2 -1
- package/esm2015/directives/auto-focus/autofocus.directive.js +1 -1
- package/esm2015/directives/checked/checked.directive.js +1 -1
- package/esm2015/directives/droppable/droppable.directive.js +5 -3
- package/esm2015/directives/element/element.directive.js +18 -4
- package/esm2015/directives/for-async/for-async.directive.js +1 -1
- package/esm2015/directives/overscroll/overscroll.directive.js +5 -3
- package/esm2015/directives/prevent-default/prevent-default.directive.js +5 -3
- package/esm2015/interfaces/alert-context.js +1 -1
- package/esm2015/interfaces/swipe.js +1 -1
- package/esm2015/interfaces/zoom.js +1 -1
- package/esm2015/observables/control-value.js +15 -0
- package/esm2015/observables/index.js +2 -2
- package/esm2015/observables/must-be-present.js +1 -1
- package/esm2015/services/focus-visible.service.js +5 -3
- package/esm2015/services/obscured.service.js +4 -2
- package/esm2015/services/resize.service.js +5 -3
- package/esm2015/types/autocomplete.js +1 -1
- package/esm2015/types/dialog.js +1 -1
- package/esm2015/types/event-with.js +1 -1
- package/esm2015/types/input-mode.js +1 -1
- package/esm2015/types/input-type.js +1 -1
- package/esm2015/types/overscroll-mode.js +1 -1
- package/esm2015/types/time-mode.js +1 -1
- package/esm2015/utils/calendar/date-clamp.js +10 -0
- package/esm2015/utils/calendar/index.js +2 -0
- package/esm2015/utils/calendar/taiga-ui-cdk-utils-calendar.js +5 -0
- package/esm2015/utils/dom/element-checks.js +1 -1
- package/esm2015/utils/focus/set-native-mouse-focused.js +1 -1
- package/esm2015/utils/index.js +2 -1
- package/esm2015/utils/math/to-int.js +1 -1
- package/esm2015/utils/miscellaneous/array-shallow-equals.js +4 -0
- package/esm2015/utils/miscellaneous/index.js +2 -1
- package/esm2015/utils/svg/svg-linear-gradient-processor.js +6 -3
- package/fesm2015/taiga-ui-cdk-abstract.js +2 -2
- package/fesm2015/taiga-ui-cdk-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-coercion.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-constants.js +1 -1
- package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-date-time.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-decorators.js +13 -1
- package/fesm2015/taiga-ui-cdk-decorators.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-auto-focus.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-checked.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-droppable.js +4 -2
- package/fesm2015/taiga-ui-cdk-directives-droppable.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-element.js +17 -3
- package/fesm2015/taiga-ui-cdk-directives-element.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-for-async.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-overscroll.js +4 -2
- package/fesm2015/taiga-ui-cdk-directives-overscroll.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-prevent-default.js +4 -2
- package/fesm2015/taiga-ui-cdk-directives-prevent-default.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-observables.js +15 -15
- package/fesm2015/taiga-ui-cdk-observables.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-services.js +10 -4
- package/fesm2015/taiga-ui-cdk-services.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-calendar.js +16 -0
- package/fesm2015/taiga-ui-cdk-utils-calendar.js.map +1 -0
- package/fesm2015/taiga-ui-cdk-utils-dom.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-focus.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-math.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js +5 -1
- package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-svg.js +5 -2
- package/fesm2015/taiga-ui-cdk-utils-svg.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils.js +1 -0
- package/fesm2015/taiga-ui-cdk-utils.js.map +1 -1
- package/interfaces/alert-context.d.ts +1 -1
- package/interfaces/swipe.d.ts +1 -1
- package/interfaces/zoom.d.ts +1 -1
- package/observables/{replay-control-value-changes.d.ts → control-value.d.ts} +0 -0
- package/observables/index.d.ts +1 -1
- package/observables/must-be-present.d.ts +1 -1
- package/package.json +5 -5
- package/schematics/constants/file-globs.js +2 -2
- package/schematics/constants/taiga-styles.js +4 -4
- package/schematics/ng-add/constants/modules.d.ts +4 -4
- package/schematics/ng-add/constants/modules.js +12 -12
- package/schematics/ng-add/constants/packages.js +1 -1
- package/schematics/ng-add/constants/versions.js +3 -3
- package/schematics/ng-add/index.d.ts +2 -2
- package/schematics/ng-add/index.js +11 -12
- package/schematics/ng-add/schema.d.ts +9 -2
- package/schematics/ng-add/schema.json +1 -1
- package/schematics/ng-add/setup-project.d.ts +2 -2
- package/schematics/ng-add/steps/add-taiga-icons.d.ts +3 -3
- package/schematics/ng-add/steps/add-taiga-icons.js +8 -9
- package/schematics/ng-add/steps/add-taiga-modules.d.ts +2 -2
- package/schematics/ng-add/steps/add-taiga-modules.js +7 -7
- package/schematics/ng-add/steps/add-taiga-styles.d.ts +2 -2
- package/schematics/ng-add/steps/add-taiga-styles.js +3 -4
- package/schematics/ng-add/steps/wrap-with-tui-root.d.ts +2 -2
- package/schematics/ng-add/steps/wrap-with-tui-root.js +14 -14
- package/schematics/ng-update/constants/consts.d.ts +1 -1
- package/schematics/ng-update/constants/consts.js +177 -177
- package/schematics/ng-update/constants/deprecated-functions.js +410 -405
- package/schematics/ng-update/constants/enums.js +123 -123
- package/schematics/ng-update/constants/modules.js +4 -4
- package/schematics/ng-update/constants/services.d.ts +2 -2
- package/schematics/ng-update/constants/services.js +16 -16
- package/schematics/ng-update/constants/templates.d.ts +5 -3
- package/schematics/ng-update/constants/templates.js +280 -280
- package/schematics/ng-update/constants/tui-interactive-selectors.js +50 -50
- package/schematics/ng-update/constants/types.d.ts +1 -1
- package/schematics/ng-update/constants/types.js +87 -87
- package/schematics/ng-update/constants/warnings.js +62 -62
- package/schematics/ng-update/index.d.ts +3 -3
- package/schematics/ng-update/index.js +44 -40
- package/schematics/ng-update/interfaces/asset.d.ts +6 -0
- package/schematics/ng-update/interfaces/asset.js +2 -0
- package/schematics/ng-update/steps/migrate-date-time.d.ts +2 -1
- package/schematics/ng-update/steps/migrate-date-time.js +55 -49
- package/schematics/ng-update/steps/migrate-polymorpheus.d.ts +1 -1
- package/schematics/ng-update/steps/migrate-polymorpheus.js +14 -14
- package/schematics/ng-update/steps/migrate-progress.d.ts +2 -1
- package/schematics/ng-update/steps/migrate-progress.js +16 -12
- package/schematics/ng-update/steps/migrate-sliders/index.d.ts +2 -1
- package/schematics/ng-update/steps/migrate-sliders/index.js +13 -9
- package/schematics/ng-update/steps/migrate-sliders/migrate-input-range.d.ts +2 -1
- package/schematics/ng-update/steps/migrate-sliders/migrate-input-range.js +35 -33
- package/schematics/ng-update/steps/migrate-sliders/migrate-input-slider.d.ts +2 -1
- package/schematics/ng-update/steps/migrate-sliders/migrate-input-slider.js +34 -33
- package/schematics/ng-update/steps/migrate-taiga-proprietary-icons.d.ts +2 -2
- package/schematics/ng-update/steps/migrate-taiga-proprietary-icons.js +29 -27
- package/schematics/ng-update/steps/migrate-templates.d.ts +2 -1
- package/schematics/ng-update/steps/migrate-templates.js +36 -34
- package/schematics/ng-update/steps/migrate-textfield-controller.d.ts +1 -1
- package/schematics/ng-update/steps/migrate-textfield-controller.js +34 -34
- package/schematics/ng-update/steps/miscellaneous.d.ts +2 -1
- package/schematics/ng-update/steps/miscellaneous.js +21 -19
- package/schematics/ng-update/steps/remove-module.d.ts +2 -1
- package/schematics/ng-update/steps/remove-module.js +6 -4
- package/schematics/ng-update/steps/rename-types.d.ts +2 -1
- package/schematics/ng-update/steps/rename-types.js +10 -8
- package/schematics/ng-update/steps/replace-const.d.ts +2 -1
- package/schematics/ng-update/steps/replace-const.js +8 -6
- package/schematics/ng-update/steps/replace-deep-import.d.ts +2 -1
- package/schematics/ng-update/steps/replace-deep-import.js +10 -5
- package/schematics/ng-update/steps/replace-enums.d.ts +2 -1
- package/schematics/ng-update/steps/replace-enums.js +8 -6
- package/schematics/ng-update/steps/replace-functions.d.ts +2 -1
- package/schematics/ng-update/steps/replace-functions.js +17 -15
- package/schematics/ng-update/steps/replace-services.d.ts +2 -1
- package/schematics/ng-update/steps/replace-services.js +13 -11
- package/schematics/ng-update/steps/replace-styles.js +7 -5
- package/schematics/ng-update/steps/show-warnings.js +2 -2
- package/schematics/ng-update/v3-5/steps/migrate-expand-templates.d.ts +2 -1
- package/schematics/ng-update/v3-5/steps/migrate-expand-templates.js +12 -10
- package/schematics/utils/add-import-to-closest-module.js +2 -2
- package/schematics/utils/add-unique-import.js +1 -1
- package/schematics/utils/angular/ng-component.js +1 -1
- package/schematics/utils/angular/ng-module.js +1 -1
- package/schematics/utils/angular-json-manipulations.d.ts +3 -3
- package/schematics/utils/angular-json-manipulations.js +52 -37
- package/schematics/utils/colored-log.js +5 -5
- package/schematics/utils/create-angular-json.d.ts +1 -0
- package/schematics/utils/create-angular-json.js +28 -2
- package/schematics/utils/get-named-import-references.d.ts +1 -1
- package/schematics/utils/get-named-import-references.js +2 -2
- package/schematics/utils/get-project-target-options.d.ts +1 -1
- package/schematics/utils/get-project-target-options.js +1 -1
- package/schematics/utils/get-projects.d.ts +3 -0
- package/schematics/utils/get-projects.js +15 -0
- package/schematics/utils/progress.js +2 -2
- package/schematics/utils/replace-tag.d.ts +1 -1
- package/schematics/utils/replace-tag.js +4 -4
- package/schematics/utils/templates/elements.js +4 -4
- package/schematics/utils/templates/get-component-templates.js +6 -6
- package/schematics/utils/templates/ng-component-input-manipulations.d.ts +4 -4
- package/schematics/utils/templates/ng-component-input-manipulations.js +7 -7
- package/schematics/utils/templates/template-resource.d.ts +1 -1
- package/schematics/utils/templates/template-resource.js +3 -3
- package/services/focus-visible.service.d.ts +1 -1
- package/services/obscured.service.d.ts +2 -2
- package/services/resize.service.d.ts +1 -1
- package/types/autocomplete.d.ts +1 -1
- package/types/dialog.d.ts +2 -2
- package/types/event-with.d.ts +2 -2
- package/types/input-mode.d.ts +1 -1
- package/types/input-type.d.ts +1 -1
- package/types/overscroll-mode.d.ts +1 -1
- package/types/time-mode.d.ts +1 -1
- package/utils/calendar/date-clamp.d.ts +2 -0
- package/utils/calendar/index.d.ts +1 -0
- package/utils/calendar/package.json +10 -0
- package/utils/calendar/taiga-ui-cdk-utils-calendar.d.ts +5 -0
- package/utils/dom/element-checks.d.ts +1 -1
- package/utils/focus/set-native-mouse-focused.d.ts +1 -1
- package/utils/index.d.ts +1 -0
- package/utils/math/to-int.d.ts +1 -1
- package/utils/miscellaneous/array-shallow-equals.d.ts +1 -0
- package/utils/miscellaneous/index.d.ts +1 -0
- package/utils/svg/svg-linear-gradient-processor.d.ts +2 -1
- package/esm2015/observables/replay-control-value-changes.js +0 -15
- package/schematics/ng-update/constants/functions.d.ts +0 -0
- package/schematics/ng-update/constants/functions.js +0 -1
- package/schematics/utils/get-project.d.ts +0 -3
- package/schematics/utils/get-project.js +0 -13
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getNgComponents = void 0;
|
|
4
4
|
const ng_morph_1 = require("ng-morph");
|
|
5
5
|
function getNgComponents(pattern, query) {
|
|
6
|
-
return ng_morph_1.getClasses(pattern, query).filter(declaration => !!declaration.getDecorator(
|
|
6
|
+
return ng_morph_1.getClasses(pattern, query).filter(declaration => !!declaration.getDecorator(`Component`));
|
|
7
7
|
}
|
|
8
8
|
exports.getNgComponents = getNgComponents;
|
|
@@ -4,7 +4,7 @@ exports.findNgModule = exports.getNgModules = void 0;
|
|
|
4
4
|
const ng_morph_1 = require("ng-morph");
|
|
5
5
|
const constants_1 = require("../../constants");
|
|
6
6
|
function getNgModules(pattern, query) {
|
|
7
|
-
return ng_morph_1.getClasses(pattern, query).filter(declaration => !!declaration.getDecorator(
|
|
7
|
+
return ng_morph_1.getClasses(pattern, query).filter(declaration => !!declaration.getDecorator(`NgModule`));
|
|
8
8
|
}
|
|
9
9
|
exports.getNgModules = getNgModules;
|
|
10
10
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Schema } from '../ng-add/schema';
|
|
2
|
-
import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
|
|
3
1
|
import { JsonArray } from '@angular-devkit/core';
|
|
2
|
+
import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
|
|
3
|
+
import { TuiSchema } from '../ng-add/schema';
|
|
4
4
|
export declare function isInvalidAngularJson(tree: Tree): Promise<boolean>;
|
|
5
|
-
export declare function addStylesToAngularJson(options:
|
|
5
|
+
export declare function addStylesToAngularJson(options: TuiSchema, context: SchematicContext, taigaStyles: string[], filter?: (styles: JsonArray | undefined) => boolean, stylesToReplace?: {
|
|
6
6
|
from: string;
|
|
7
7
|
to: string[];
|
|
8
8
|
}, tree?: Tree): Rule;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addStylesToAngularJson = exports.isInvalidAngularJson = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
6
|
-
const get_project_target_options_1 = require("./get-project-target-options");
|
|
5
|
+
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
7
6
|
const workspace_1 = require("@schematics/angular/utility/workspace");
|
|
8
7
|
const ng_morph_1 = require("ng-morph");
|
|
9
8
|
const versions_1 = require("../ng-add/constants/versions");
|
|
10
|
-
const
|
|
9
|
+
const get_project_target_options_1 = require("./get-project-target-options");
|
|
10
|
+
const get_projects_1 = require("./get-projects");
|
|
11
11
|
function isInvalidAngularJson(tree) {
|
|
12
12
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
13
13
|
return (workspace_1.getWorkspace(tree)
|
|
@@ -20,45 +20,60 @@ function isInvalidAngularJson(tree) {
|
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
exports.isInvalidAngularJson = isInvalidAngularJson;
|
|
23
|
+
function hasTaigaIcons(assets) {
|
|
24
|
+
return !!(assets === null || assets === void 0 ? void 0 : assets.find(asset => {
|
|
25
|
+
var _a;
|
|
26
|
+
return typeof asset === `string`
|
|
27
|
+
? asset.includes(`taiga-ui`)
|
|
28
|
+
: (_a = asset === null || asset === void 0 ? void 0 : asset.input) === null || _a === void 0 ? void 0 : _a.includes(`taiga-ui`);
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
23
31
|
function addStylesToAngularJson(options, context, taigaStyles, filter, stylesToReplace, tree) {
|
|
24
|
-
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
33
|
+
const MANUAL_MIGRATION_TIPS = `Add styles ${taigaStyles.join(`,`)} to angular.json manually.`;
|
|
25
34
|
return workspace_1.updateWorkspace(workspace => {
|
|
26
|
-
const
|
|
27
|
-
if (!
|
|
35
|
+
const projects = get_projects_1.getProjects(options, workspace);
|
|
36
|
+
if (!projects.length) {
|
|
28
37
|
context.logger.warn(`[WARNING]: Target project not found. ${MANUAL_MIGRATION_TIPS}`);
|
|
29
38
|
return;
|
|
30
39
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
40
|
+
for (const project of projects) {
|
|
41
|
+
let targetOptions;
|
|
42
|
+
try {
|
|
43
|
+
targetOptions = get_project_target_options_1.getProjectTargetOptions(project, `build`);
|
|
44
|
+
}
|
|
45
|
+
catch (_a) {
|
|
46
|
+
context.logger.warn(`[WARNING]: No buildable project was found. ${MANUAL_MIGRATION_TIPS}`);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (stylesToReplace && !hasTaigaIcons(targetOptions.assets)) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const styles = targetOptions.styles;
|
|
53
|
+
if (filter === null || filter === void 0 ? void 0 : filter(styles)) {
|
|
54
|
+
taigaStyles = [];
|
|
55
|
+
}
|
|
56
|
+
if (!styles && taigaStyles.length) {
|
|
57
|
+
targetOptions.styles = taigaStyles;
|
|
58
|
+
}
|
|
59
|
+
if (stylesToReplace &&
|
|
60
|
+
(styles === null || styles === void 0 ? void 0 : styles.filter(style => style !== stylesToReplace.from))) {
|
|
61
|
+
targetOptions.styles = Array.from(new Set([
|
|
62
|
+
...taigaStyles,
|
|
63
|
+
...stylesToReplace.to,
|
|
64
|
+
...styles.filter(style => style !== stylesToReplace.from),
|
|
65
|
+
]));
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
targetOptions.styles = Array.from(new Set([...taigaStyles, ...(styles || [])]));
|
|
69
|
+
}
|
|
70
|
+
if (tree && stylesToReplace) {
|
|
71
|
+
ng_morph_1.addPackageJsonDependency(tree, {
|
|
72
|
+
name: `@taiga-ui/styles`,
|
|
73
|
+
version: versions_1.TAIGA_VERSION,
|
|
74
|
+
});
|
|
75
|
+
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
76
|
+
}
|
|
62
77
|
}
|
|
63
78
|
});
|
|
64
79
|
}
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SUCCESS_SYMBOL = exports.PROCESSING_SYMBOL = exports.REPLACE_SYMBOL = exports.FINISH_SYMBOL = exports.START_SYMBOL = exports.SMALL_TAB_SYMBOL = exports.titleLog = exports.infoLog = exports.successLog = exports.errorLog = exports.processLog = void 0;
|
|
4
4
|
function processLog(message) {
|
|
5
|
-
console.info(
|
|
5
|
+
console.info(`\x1B[36m%s\x1B[0m`, message);
|
|
6
6
|
}
|
|
7
7
|
exports.processLog = processLog;
|
|
8
8
|
function errorLog(message) {
|
|
9
|
-
console.info(
|
|
9
|
+
console.info(`\x1B[31m%s\x1B[0m`, message);
|
|
10
10
|
}
|
|
11
11
|
exports.errorLog = errorLog;
|
|
12
12
|
function successLog(message) {
|
|
13
|
-
console.info(
|
|
13
|
+
console.info(`\x1B[32m%s\x1B[0m`, message);
|
|
14
14
|
}
|
|
15
15
|
exports.successLog = successLog;
|
|
16
16
|
function infoLog(message) {
|
|
17
|
-
console.info(
|
|
17
|
+
console.info(`\x1B[34m%s\x1B[0m`, message);
|
|
18
18
|
}
|
|
19
19
|
exports.infoLog = infoLog;
|
|
20
20
|
function titleLog(message) {
|
|
21
|
-
console.info(
|
|
21
|
+
console.info(`\x1B[35m`, message);
|
|
22
22
|
}
|
|
23
23
|
exports.titleLog = titleLog;
|
|
24
24
|
exports.SMALL_TAB_SYMBOL = ` `; // @note: if you use \t then we have big gaps
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createAngularJson = void 0;
|
|
3
|
+
exports.createAngularJsonWithAssets = exports.createAngularJson = void 0;
|
|
4
4
|
const ng_morph_1 = require("ng-morph");
|
|
5
5
|
function createAngularJson({ stylesExist } = { stylesExist: false }) {
|
|
6
|
-
ng_morph_1.createSourceFile(
|
|
6
|
+
ng_morph_1.createSourceFile(`angular.json`, `
|
|
7
7
|
{
|
|
8
8
|
"version": 1,
|
|
9
9
|
"defaultProject": "demo",
|
|
@@ -27,3 +27,29 @@ function createAngularJson({ stylesExist } = { stylesExist: false }) {
|
|
|
27
27
|
}`, { overwrite: true });
|
|
28
28
|
}
|
|
29
29
|
exports.createAngularJson = createAngularJson;
|
|
30
|
+
function createAngularJsonWithAssets() {
|
|
31
|
+
ng_morph_1.createSourceFile(`angular.json`, `
|
|
32
|
+
{
|
|
33
|
+
"version": 1,
|
|
34
|
+
"defaultProject": "demo",
|
|
35
|
+
"projects": {
|
|
36
|
+
"demo": {
|
|
37
|
+
"architect": {
|
|
38
|
+
"build": {
|
|
39
|
+
"options": {
|
|
40
|
+
"main": "test/main.ts",
|
|
41
|
+
"assets": [
|
|
42
|
+
{
|
|
43
|
+
"glob": "**/*",
|
|
44
|
+
"input": "node_modules/@taiga-ui/icons/src",
|
|
45
|
+
"output": "assets/taiga-ui/icons"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}`, { overwrite: true });
|
|
54
|
+
}
|
|
55
|
+
exports.createAngularJsonWithAssets = createAngularJsonWithAssets;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Node } from 'ng-morph';
|
|
2
|
-
export declare function getNamedImportReferences(namedImport: string, moduleSpecifier?: string | string
|
|
2
|
+
export declare function getNamedImportReferences(namedImport: string, moduleSpecifier?: string[] | string): Node[];
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getNamedImportReferences = void 0;
|
|
4
4
|
const ng_morph_1 = require("ng-morph");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
|
-
function getNamedImportReferences(namedImport, moduleSpecifier =
|
|
6
|
+
function getNamedImportReferences(namedImport, moduleSpecifier = `**/**`) {
|
|
7
7
|
const importDeclarations = ng_morph_1.getImports(constants_1.ALL_TS_FILES, {
|
|
8
8
|
namedImports: [namedImport],
|
|
9
|
-
moduleSpecifier
|
|
9
|
+
moduleSpecifier,
|
|
10
10
|
});
|
|
11
11
|
const namedImports = importDeclarations.map(declaration => {
|
|
12
12
|
var _a;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { JsonArray, JsonObject, workspaces } from '@angular-devkit/core';
|
|
2
|
-
export declare function getProjectTargetOptions(project: workspaces.ProjectDefinition, buildTarget: string): Record<string,
|
|
2
|
+
export declare function getProjectTargetOptions(project: workspaces.ProjectDefinition, buildTarget: string): Record<string, JsonArray | JsonObject | boolean | number | string | null | undefined>;
|
|
@@ -5,7 +5,7 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
5
5
|
function getProjectTargetOptions(project, buildTarget) {
|
|
6
6
|
var _a;
|
|
7
7
|
const buildTargetObject = (_a = project.targets) === null || _a === void 0 ? void 0 : _a.get(buildTarget);
|
|
8
|
-
if (buildTargetObject
|
|
8
|
+
if (buildTargetObject === null || buildTargetObject === void 0 ? void 0 : buildTargetObject.options) {
|
|
9
9
|
return buildTargetObject.options;
|
|
10
10
|
}
|
|
11
11
|
throw new schematics_1.SchematicsException(`Cannot determine project target configuration for: ${buildTarget}.`);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getProjects = void 0;
|
|
4
|
+
function getProjects(options, workspace) {
|
|
5
|
+
var _a;
|
|
6
|
+
const projects = Array.from(workspace.projects.entries())
|
|
7
|
+
.filter(([_, project]) => project.targets.get(`build`))
|
|
8
|
+
.map(([_, project]) => project);
|
|
9
|
+
const nameFromContext =
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
|
11
|
+
options.project || ((_a = workspace.extensions.defaultProject) === null || _a === void 0 ? void 0 : _a.toString()) || ``;
|
|
12
|
+
const projectFromContext = workspace.projects.get(nameFromContext);
|
|
13
|
+
return projectFromContext ? [projectFromContext] : projects;
|
|
14
|
+
}
|
|
15
|
+
exports.getProjects = getProjects;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.setupProgressLogger = void 0;
|
|
4
4
|
const readline_1 = require("readline");
|
|
5
5
|
const colored_log_1 = require("./colored-log");
|
|
6
|
-
function setupProgressLogger({ total, prefix =
|
|
6
|
+
function setupProgressLogger({ total, prefix = ``, tabs = 2, }) {
|
|
7
7
|
let i = 1;
|
|
8
8
|
return (message, incrementIndex = true) => {
|
|
9
9
|
const isLast = i === total;
|
|
@@ -13,7 +13,7 @@ function setupProgressLogger({ total, prefix = '', tabs = 2, }) {
|
|
|
13
13
|
readline_1.cursorTo(process.stdout, 0);
|
|
14
14
|
process.stdout.write(colored_log_1.SMALL_TAB_SYMBOL.repeat(tabs) + progressLog);
|
|
15
15
|
if (isLast && incrementIndex) {
|
|
16
|
-
process.stdout.write(
|
|
16
|
+
process.stdout.write(`\n`);
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { UpdateRecorder } from '@angular-devkit/schematics';
|
|
2
2
|
import { ElementLocation } from 'parse5';
|
|
3
|
-
export declare function replaceTag(recorder: UpdateRecorder, sourceCodeLocation: ElementLocation, from: string, to: string, templateOffset?: number, addAttributes?: string[]): void;
|
|
3
|
+
export declare function replaceTag(recorder: UpdateRecorder, sourceCodeLocation: ElementLocation | undefined, from: string, to: string, templateOffset?: number, addAttributes?: string[]): void;
|
|
@@ -5,13 +5,13 @@ const START_TAG_OFFSET = 1;
|
|
|
5
5
|
const END_TAG_OFFSET = 2;
|
|
6
6
|
function replaceTag(recorder, sourceCodeLocation, from, to, templateOffset = 0, addAttributes = []) {
|
|
7
7
|
var _a;
|
|
8
|
-
const startTagOffset = sourceCodeLocation.startTag.startOffset;
|
|
9
|
-
const endTagOffset = (_a = sourceCodeLocation.endTag) === null || _a === void 0 ? void 0 : _a.startOffset;
|
|
8
|
+
const startTagOffset = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.startTag.startOffset;
|
|
9
|
+
const endTagOffset = (_a = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.endTag) === null || _a === void 0 ? void 0 : _a.startOffset;
|
|
10
10
|
if (endTagOffset) {
|
|
11
11
|
recorder.remove(endTagOffset + templateOffset + END_TAG_OFFSET, from.length);
|
|
12
12
|
recorder.insertRight(endTagOffset + templateOffset + END_TAG_OFFSET, to);
|
|
13
13
|
}
|
|
14
|
-
recorder.remove(startTagOffset + templateOffset + START_TAG_OFFSET, from.length);
|
|
15
|
-
recorder.insertRight(startTagOffset + templateOffset + START_TAG_OFFSET, `${to} ${addAttributes.join(
|
|
14
|
+
recorder.remove((startTagOffset !== null && startTagOffset !== void 0 ? startTagOffset : 0) + templateOffset + START_TAG_OFFSET, from.length);
|
|
15
|
+
recorder.insertRight((startTagOffset !== null && startTagOffset !== void 0 ? startTagOffset : 0) + templateOffset + START_TAG_OFFSET, `${to} ${addAttributes.join(` `)}`);
|
|
16
16
|
}
|
|
17
17
|
exports.replaceTag = replaceTag;
|
|
@@ -23,7 +23,7 @@ exports.findElementsByFn = findElementsByFn;
|
|
|
23
23
|
function findElementsInTemplateByFn(html, predicateFn) {
|
|
24
24
|
// utf8 with BOM adds an extra character to the beginning of the string
|
|
25
25
|
if (html.charCodeAt(0) === 0xfeff) {
|
|
26
|
-
html = html.
|
|
26
|
+
html = html.slice(1);
|
|
27
27
|
}
|
|
28
28
|
const document = parse5_1.parseFragment(html, { sourceCodeLocationInfo: true });
|
|
29
29
|
return findElementsByFn(document.childNodes, predicateFn);
|
|
@@ -51,7 +51,7 @@ exports.findElementsWithAttribute = findElementsWithAttribute;
|
|
|
51
51
|
*/
|
|
52
52
|
function findAttributeOnElementWithTag(html, name, tagNames, filterFn = ALWAYS_TRUE_HANDLER) {
|
|
53
53
|
return findElementsWithAttribute(html, name)
|
|
54
|
-
.filter(element => (tagNames.includes(element.tagName) || tagNames.includes(
|
|
54
|
+
.filter(element => (tagNames.includes(element.tagName) || tagNames.includes(`*`)) &&
|
|
55
55
|
filterFn(element))
|
|
56
56
|
.map(element => getStartOffsetOfAttribute(element, name));
|
|
57
57
|
}
|
|
@@ -69,8 +69,8 @@ function findAttributeOnElementWithAttrs(html, name, attrs, filterFn = ALWAYS_TR
|
|
|
69
69
|
exports.findAttributeOnElementWithAttrs = findAttributeOnElementWithAttrs;
|
|
70
70
|
/** Shorthand function that checks if the specified element contains the given attribute. */
|
|
71
71
|
function hasElementAttribute(element, attributeName) {
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
var _a;
|
|
73
|
+
return (_a = element.attrs) === null || _a === void 0 ? void 0 : _a.some(attr => attr.name === attributeName.toLowerCase());
|
|
74
74
|
}
|
|
75
75
|
exports.hasElementAttribute = hasElementAttribute;
|
|
76
76
|
/** Gets the start offset of the given attribute from a Parse5 element. */
|
|
@@ -6,7 +6,7 @@ const ng_morph_1 = require("ng-morph");
|
|
|
6
6
|
const path = tslib_1.__importStar(require("path"));
|
|
7
7
|
function getComponentTemplates(pattern, query) {
|
|
8
8
|
return ng_morph_1.getClasses(pattern, query)
|
|
9
|
-
.map(declaration => declaration.getDecorator(
|
|
9
|
+
.map(declaration => declaration.getDecorator(`Component`))
|
|
10
10
|
.filter((decorator) => !!decorator)
|
|
11
11
|
.map(decoratorToTemplateResource)
|
|
12
12
|
.filter((x) => Boolean(x));
|
|
@@ -15,20 +15,20 @@ exports.getComponentTemplates = getComponentTemplates;
|
|
|
15
15
|
function decoratorToTemplateResource(decorator) {
|
|
16
16
|
var _a, _b, _c;
|
|
17
17
|
const [metadata] = decorator.getArguments();
|
|
18
|
-
const templateUrl = metadata.getProperty(
|
|
19
|
-
const template = metadata.getProperty(
|
|
18
|
+
const templateUrl = metadata.getProperty(`templateUrl`);
|
|
19
|
+
const template = metadata.getProperty(`template`);
|
|
20
20
|
const componentPath = decorator.getSourceFile().getFilePath();
|
|
21
21
|
if (templateUrl) {
|
|
22
|
-
const templatePath = path.parse(((_a = templateUrl === null || templateUrl === void 0 ? void 0 : templateUrl.getInitializer()) === null || _a === void 0 ? void 0 : _a.getText().replace(/['"`]/g,
|
|
22
|
+
const templatePath = path.parse(((_a = templateUrl === null || templateUrl === void 0 ? void 0 : templateUrl.getInitializer()) === null || _a === void 0 ? void 0 : _a.getText().replace(/['"`]/g, ``)) || ``);
|
|
23
23
|
return {
|
|
24
24
|
componentPath,
|
|
25
25
|
templatePath: getFullTemplatePath(templatePath, path.parse(componentPath)),
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
if (template) {
|
|
29
29
|
return {
|
|
30
30
|
componentPath,
|
|
31
|
-
template: ((_b = template.getInitializer()) === null || _b === void 0 ? void 0 : _b.getText()) ||
|
|
31
|
+
template: ((_b = template.getInitializer()) === null || _b === void 0 ? void 0 : _b.getText()) || ``,
|
|
32
32
|
offset: ((_c = template.getInitializer()) === null || _c === void 0 ? void 0 : _c.getStart()) || 0,
|
|
33
33
|
};
|
|
34
34
|
}
|
|
@@ -29,7 +29,7 @@ import { TemplateResource } from '../../ng-update/interfaces/template-resourse';
|
|
|
29
29
|
export declare function replaceInputProperty({ templateResource, fileSystem, componentSelector, from, to, newValue, filterFn, }: {
|
|
30
30
|
templateResource: TemplateResource;
|
|
31
31
|
fileSystem: DevkitFileSystem;
|
|
32
|
-
componentSelector: string | string
|
|
32
|
+
componentSelector: string[] | string;
|
|
33
33
|
from: string;
|
|
34
34
|
to: string;
|
|
35
35
|
newValue?: string;
|
|
@@ -42,7 +42,7 @@ export declare function replaceInputProperty({ templateResource, fileSystem, com
|
|
|
42
42
|
*
|
|
43
43
|
* getInputPropertyOffsets(template, 'size', ['tui-card']) // [[10, 18]]
|
|
44
44
|
*/
|
|
45
|
-
export declare function getInputPropertyOffsets(html: string, attrName: string, tags: string[], filterFn?: (element: Element) => boolean): [number, number]
|
|
45
|
+
export declare function getInputPropertyOffsets(html: string, attrName: string, tags: string[], filterFn?: (element: Element) => boolean): Array<[number, number]>;
|
|
46
46
|
/**
|
|
47
47
|
* @example
|
|
48
48
|
* // `<tui-card size="` has 16-symbols length
|
|
@@ -50,11 +50,11 @@ export declare function getInputPropertyOffsets(html: string, attrName: string,
|
|
|
50
50
|
*
|
|
51
51
|
* getInputPropertyValueOffsets(template, 'size', ['tui-card']) // [ [16, 18] ]
|
|
52
52
|
*/
|
|
53
|
-
export declare function getInputPropertyValueOffsets(template: string, attrName: string, tags: string[]): [number, number]
|
|
53
|
+
export declare function getInputPropertyValueOffsets(template: string, attrName: string, tags: string[]): Array<[number, number]>;
|
|
54
54
|
export declare function replaceInputPropertyByDirective({ templateResource, fileSystem, componentSelector, inputProperty, directive, directiveModule, filterFn, }: {
|
|
55
55
|
templateResource: TemplateResource;
|
|
56
56
|
fileSystem: DevkitFileSystem;
|
|
57
|
-
componentSelector: string | string
|
|
57
|
+
componentSelector: string[] | string;
|
|
58
58
|
inputProperty: string;
|
|
59
59
|
directive: string;
|
|
60
60
|
directiveModule?: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.removeInputProperty = exports.replaceInputPropertyByDirective = exports.getInputPropertyValueOffsets = exports.getInputPropertyOffsets = exports.replaceInputProperty = void 0;
|
|
4
|
-
const template_resource_1 = require("./template-resource");
|
|
5
|
-
const elements_1 = require("./elements");
|
|
6
4
|
const add_import_to_closest_module_1 = require("../add-import-to-closest-module");
|
|
5
|
+
const elements_1 = require("./elements");
|
|
6
|
+
const template_resource_1 = require("./template-resource");
|
|
7
7
|
/**
|
|
8
8
|
* Replace component input property by new value
|
|
9
9
|
* ___
|
|
@@ -29,7 +29,7 @@ const add_import_to_closest_module_1 = require("../add-import-to-closest-module"
|
|
|
29
29
|
* ___
|
|
30
30
|
* @return true if something was changed
|
|
31
31
|
*/
|
|
32
|
-
function replaceInputProperty({ templateResource, fileSystem, componentSelector, from, to, newValue =
|
|
32
|
+
function replaceInputProperty({ templateResource, fileSystem, componentSelector, from, to, newValue = ``, filterFn, }) {
|
|
33
33
|
const template = template_resource_1.getTemplateFromTemplateResource(templateResource, fileSystem);
|
|
34
34
|
const path = fileSystem.resolve(template_resource_1.getPathFromTemplateResource(templateResource));
|
|
35
35
|
const recorder = fileSystem.edit(path);
|
|
@@ -60,7 +60,7 @@ function replaceInputProperty({ templateResource, fileSystem, componentSelector,
|
|
|
60
60
|
});
|
|
61
61
|
propertyBindings.forEach(offset => {
|
|
62
62
|
recorder.remove(offset, `[${from}]`.length);
|
|
63
|
-
recorder.insertRight(offset, to.startsWith(
|
|
63
|
+
recorder.insertRight(offset, to.startsWith(`[`) ? to : `[${to}]`);
|
|
64
64
|
});
|
|
65
65
|
propertyValues.forEach(([startOffset, endOffset]) => {
|
|
66
66
|
recorder.remove(startOffset, endOffset - startOffset);
|
|
@@ -78,7 +78,7 @@ exports.replaceInputProperty = replaceInputProperty;
|
|
|
78
78
|
*/
|
|
79
79
|
function getInputPropertyOffsets(html, attrName, tags, filterFn = () => true) {
|
|
80
80
|
return elements_1.findElementsWithAttribute(html, attrName)
|
|
81
|
-
.filter(element => (tags.includes(element.tagName) || tags.includes(
|
|
81
|
+
.filter(element => (tags.includes(element.tagName) || tags.includes(`*`)) &&
|
|
82
82
|
filterFn(element))
|
|
83
83
|
.map((element) => {
|
|
84
84
|
var _a, _b;
|
|
@@ -95,8 +95,8 @@ exports.getInputPropertyOffsets = getInputPropertyOffsets;
|
|
|
95
95
|
* getInputPropertyValueOffsets(template, 'size', ['tui-card']) // [ [16, 18] ]
|
|
96
96
|
*/
|
|
97
97
|
function getInputPropertyValueOffsets(template, attrName, tags) {
|
|
98
|
-
const stringProperties = getInputPropertyOffsets(template, attrName, tags).map(([start, end]) => [start + attrName.length +
|
|
99
|
-
const propertyBindings = getInputPropertyOffsets(template, `[${attrName}]`, tags).map(([start, end]) => [start + `[${attrName}]`.length +
|
|
98
|
+
const stringProperties = getInputPropertyOffsets(template, attrName, tags).map(([start, end]) => [start + attrName.length + `="`.length, end - 1]);
|
|
99
|
+
const propertyBindings = getInputPropertyOffsets(template, `[${attrName}]`, tags).map(([start, end]) => [start + `[${attrName}]`.length + `="`.length, end - 1]);
|
|
100
100
|
return [...stringProperties, ...propertyBindings];
|
|
101
101
|
}
|
|
102
102
|
exports.getInputPropertyValueOffsets = getInputPropertyValueOffsets;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TemplateResource } from '../../ng-update/interfaces/template-resourse';
|
|
2
1
|
import { DevkitFileSystem } from 'ng-morph';
|
|
2
|
+
import { TemplateResource } from '../../ng-update/interfaces/template-resourse';
|
|
3
3
|
export declare function getTemplateFromTemplateResource(templateRes: TemplateResource, fileSystem: DevkitFileSystem): string;
|
|
4
4
|
export declare function getPathFromTemplateResource(templateRes: TemplateResource): string;
|
|
5
5
|
export declare function getTemplateOffset(templateRes: TemplateResource): number;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getTemplateOffset = exports.getPathFromTemplateResource = exports.getTemplateFromTemplateResource = void 0;
|
|
4
4
|
function getTemplateFromTemplateResource(templateRes, fileSystem) {
|
|
5
|
-
if (
|
|
5
|
+
if (`template` in templateRes) {
|
|
6
6
|
return templateRes.template;
|
|
7
7
|
}
|
|
8
8
|
const path = fileSystem.resolve(templateRes.templatePath);
|
|
@@ -10,13 +10,13 @@ function getTemplateFromTemplateResource(templateRes, fileSystem) {
|
|
|
10
10
|
}
|
|
11
11
|
exports.getTemplateFromTemplateResource = getTemplateFromTemplateResource;
|
|
12
12
|
function getPathFromTemplateResource(templateRes) {
|
|
13
|
-
if (
|
|
13
|
+
if (`templatePath` in templateRes) {
|
|
14
14
|
return templateRes.templatePath;
|
|
15
15
|
}
|
|
16
16
|
return templateRes.componentPath;
|
|
17
17
|
}
|
|
18
18
|
exports.getPathFromTemplateResource = getPathFromTemplateResource;
|
|
19
19
|
function getTemplateOffset(templateRes) {
|
|
20
|
-
return
|
|
20
|
+
return `offset` in templateRes ? templateRes.offset : 0;
|
|
21
21
|
}
|
|
22
22
|
exports.getTemplateOffset = getTemplateOffset;
|
|
@@ -9,6 +9,6 @@ import * as i0 from "@angular/core";
|
|
|
9
9
|
export declare class TuiFocusVisibleService extends Observable<boolean> {
|
|
10
10
|
private readonly focusVisible$;
|
|
11
11
|
constructor({ nativeElement }: ElementRef<Element>, changeDetectorRef: ChangeDetectorRef, destroy$: Observable<void>);
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiFocusVisibleService,
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TuiFocusVisibleService, [null, null, { self: true; }]>;
|
|
13
13
|
static ɵprov: i0.ɵɵInjectableDeclaration<TuiFocusVisibleService>;
|
|
14
14
|
}
|
|
@@ -7,9 +7,9 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
* and polling with set interval, returns either null or an array
|
|
8
8
|
* of elements that overlap given element edges
|
|
9
9
|
*/
|
|
10
|
-
export declare class TuiObscuredService extends Observable<
|
|
10
|
+
export declare class TuiObscuredService extends Observable<readonly Element[] | null> {
|
|
11
11
|
private readonly obscured$;
|
|
12
12
|
constructor(parentsScroll$: TuiParentsScrollService, { nativeElement }: ElementRef<Element>, ngZone: NgZone, windowRef: Window, destroy$: Observable<void>, animationFrame$: Observable<number>);
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiObscuredService, [{ self: true; }, null, null, null,
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TuiObscuredService, [{ self: true; }, null, null, null, { self: true; }, null]>;
|
|
14
14
|
static ɵprov: i0.ɵɵInjectableDeclaration<TuiObscuredService>;
|
|
15
15
|
}
|
|
@@ -4,6 +4,6 @@ import { Observable } from 'rxjs';
|
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class TuiResizeService extends ResizeObserverService {
|
|
6
6
|
constructor(elementRef: ElementRef<HTMLElement>, ngZone: NgZone, destroy$: Observable<void>, support: boolean, box: ResizeObserverBoxOptions, animationFrame$: Observable<number>);
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiResizeService,
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TuiResizeService, [null, null, { self: true; }, null, null, null]>;
|
|
8
8
|
static ɵprov: i0.ɵɵInjectableDeclaration<TuiResizeService>;
|
|
9
9
|
}
|
package/types/autocomplete.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare type TuiAutofillFieldName = '
|
|
1
|
+
export declare type TuiAutofillFieldName = 'additional-name' | 'bday' | 'cc-csc' | 'cc-exp-month' | 'cc-exp-year' | 'cc-exp' | 'cc-name' | 'cc-number' | 'cc-type' | 'country-name' | 'current-password' | 'email' | 'family-name' | 'given-name' | 'name' | 'new-password' | 'off' | 'postal-code' | 'street-address' | 'tel' | 'transaction-amount' | 'transaction-currency' | 'username';
|
package/types/dialog.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TuiBaseDialogContext } from '@taiga-ui/cdk/interfaces';
|
|
2
2
|
import { PolymorpheusContent } from '@tinkoff/ng-polymorpheus';
|
|
3
|
-
export declare type TuiDialog<T, O> = TuiBaseDialogContext<O> &
|
|
4
|
-
content: PolymorpheusContent<TuiBaseDialogContext<O
|
|
3
|
+
export declare type TuiDialog<T, O> = T & TuiBaseDialogContext<O> & {
|
|
4
|
+
content: PolymorpheusContent<T & TuiBaseDialogContext<O>>;
|
|
5
5
|
};
|
package/types/event-with.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface TuiTypedEventTarget<E> {
|
|
2
|
-
addEventListener(type: string, listener: ((evt: E) => void) | null, options?:
|
|
3
|
-
removeEventListener(type: string, listener?: ((evt: E) => void) | null, options?:
|
|
2
|
+
addEventListener(type: string, listener: ((evt: E) => void) | null, options?: AddEventListenerOptions | boolean): void;
|
|
3
|
+
removeEventListener(type: string, listener?: ((evt: E) => void) | null, options?: EventListenerOptions | boolean): void;
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
6
|
* Wrapper around {@link Event} to add typings to target and currentTarget.
|
package/types/input-mode.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare type TuiInputMode = '
|
|
1
|
+
export declare type TuiInputMode = 'decimal' | 'email' | 'none' | 'numeric' | 'search' | 'tel' | 'text' | 'url';
|
package/types/input-type.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare type TuiInputType = '
|
|
1
|
+
export declare type TuiInputType = 'email' | 'password' | 'tel' | 'text' | 'url';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare type TuiOverscrollMode = 'all' | '
|
|
1
|
+
export declare type TuiOverscrollMode = 'all' | 'none' | 'scroll';
|
package/types/time-mode.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare type TuiTimeMode = 'HH:MM' | 'HH:MM:SS' | 'HH:MM
|
|
1
|
+
export declare type TuiTimeMode = 'HH:MM:SS.MSS' | 'HH:MM:SS' | 'HH:MM';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './date-clamp';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"main": "../../bundles/taiga-ui-cdk-utils-calendar.umd.js",
|
|
3
|
+
"module": "../../fesm2015/taiga-ui-cdk-utils-calendar.js",
|
|
4
|
+
"es2015": "../../fesm2015/taiga-ui-cdk-utils-calendar.js",
|
|
5
|
+
"esm2015": "../../esm2015/utils/calendar/taiga-ui-cdk-utils-calendar.js",
|
|
6
|
+
"fesm2015": "../../fesm2015/taiga-ui-cdk-utils-calendar.js",
|
|
7
|
+
"typings": "taiga-ui-cdk-utils-calendar.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"name": "@taiga-ui/cdk/utils/calendar"
|
|
10
|
+
}
|