@taiga-ui/cdk 3.41.1-canary.fe67f26 → 3.42.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/bundles/taiga-ui-cdk-components-dialog-host.umd.js +5 -7
- package/bundles/taiga-ui-cdk-components-dialog-host.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 +17 -10
- package/bundles/taiga-ui-cdk-date-time.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-active-zone.umd.js +3 -3
- package/bundles/taiga-ui-cdk-directives-active-zone.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js +6 -6
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focused.umd.js +2 -2
- package/bundles/taiga-ui-cdk-directives-focused.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-hovered.umd.js +3 -3
- package/bundles/taiga-ui-cdk-directives-hovered.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-overscroll.umd.js +3 -3
- package/bundles/taiga-ui-cdk-directives-overscroll.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-platform.umd.js +89 -0
- package/bundles/taiga-ui-cdk-directives-platform.umd.js.map +1 -0
- package/bundles/taiga-ui-cdk-directives-prevent-default.umd.js +3 -3
- package/bundles/taiga-ui-cdk-directives-prevent-default.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives.umd.js +10 -4
- package/bundles/taiga-ui-cdk-directives.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-observables.umd.js +8 -8
- package/bundles/taiga-ui-cdk-observables.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-services.umd.js +5 -5
- package/bundles/taiga-ui-cdk-services.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-tokens.umd.js +26 -12
- package/bundles/taiga-ui-cdk-tokens.umd.js.map +1 -1
- 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 +16 -10
- package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils.umd.js +4 -10
- package/bundles/taiga-ui-cdk-utils.umd.js.map +1 -1
- package/components/dialog-host/dialog-host.component.d.ts +2 -2
- package/constants/version.d.ts +1 -1
- package/constants/version.js +1 -1
- package/{utils/calendar → date-time}/date-clamp.d.ts +1 -1
- package/date-time/date-format.d.ts +1 -2
- package/date-time/date-separator.d.ts +1 -2
- package/date-time/index.d.ts +1 -0
- package/directives/active-zone/active-zone.directive.d.ts +2 -2
- package/directives/auto-focus/autofocus.options.d.ts +1 -1
- package/directives/auto-focus/handlers/ios.handler.d.ts +2 -2
- package/directives/focused/focused.directive.d.ts +1 -1
- package/directives/hovered/hovered.service.d.ts +2 -2
- package/directives/index.d.ts +1 -0
- package/directives/overscroll/overscroll.directive.d.ts +1 -1
- package/directives/platform/index.d.ts +2 -0
- package/directives/platform/package.json +10 -0
- package/directives/platform/platform.directive.d.ts +7 -0
- package/directives/platform/platform.module.d.ts +7 -0
- package/{utils/calendar/taiga-ui-cdk-utils-calendar.d.ts → directives/platform/taiga-ui-cdk-directives-platform.d.ts} +1 -1
- package/directives/prevent-default/prevent-default.directive.d.ts +2 -2
- package/esm2015/components/dialog-host/dialog-host.component.js +4 -5
- package/esm2015/constants/version.js +2 -2
- package/esm2015/date-time/date-clamp.js +10 -0
- package/esm2015/date-time/date-format.js +3 -5
- package/esm2015/date-time/date-separator.js +3 -5
- package/esm2015/date-time/index.js +2 -1
- package/esm2015/directives/active-zone/active-zone.directive.js +4 -4
- package/esm2015/directives/auto-focus/autofocus.options.js +5 -5
- package/esm2015/directives/auto-focus/handlers/ios.handler.js +4 -4
- package/esm2015/directives/focused/focused.directive.js +3 -3
- package/esm2015/directives/hovered/hovered.service.js +4 -4
- package/esm2015/directives/index.js +2 -1
- package/esm2015/directives/overscroll/overscroll.directive.js +4 -4
- package/esm2015/directives/platform/index.js +3 -0
- package/esm2015/directives/platform/platform.directive.js +32 -0
- package/esm2015/directives/platform/platform.module.js +16 -0
- package/esm2015/directives/platform/taiga-ui-cdk-directives-platform.js +5 -0
- package/esm2015/directives/prevent-default/prevent-default.directive.js +4 -4
- package/esm2015/interfaces/aria-dialog-context.js +1 -1
- package/esm2015/interfaces/control-value-transformer.js +1 -1
- package/esm2015/interfaces/focusable-element-accessor.js +1 -1
- package/esm2015/interfaces/time-like.js +1 -1
- package/esm2015/observables/zone-free.js +9 -9
- package/esm2015/services/obscured.service.js +3 -3
- package/esm2015/services/resize.service.js +4 -4
- package/esm2015/tokens/alerts.js +3 -5
- package/esm2015/tokens/dialogs.js +3 -5
- package/esm2015/tokens/ensure-base-href.js +6 -1
- package/esm2015/tokens/index.js +2 -1
- package/esm2015/tokens/platform.js +16 -0
- package/esm2015/tokens/swipe-options.js +5 -4
- package/esm2015/tokens/zoom-options.js +4 -6
- package/esm2015/types/index.js +2 -1
- package/esm2015/types/platform.js +2 -0
- package/esm2015/utils/dom/get-element-offset.js +1 -1
- package/esm2015/utils/focus/get-closest-focusable.js +1 -1
- package/esm2015/utils/index.js +1 -2
- package/esm2015/utils/math/round-with.js +1 -1
- package/esm2015/utils/miscellaneous/create-options.js +2 -1
- package/esm2015/utils/miscellaneous/create-token.js +7 -0
- package/esm2015/utils/miscellaneous/default-sort.js +5 -8
- package/esm2015/utils/miscellaneous/index.js +2 -1
- package/fesm2015/taiga-ui-cdk-components-dialog-host.js +3 -4
- package/fesm2015/taiga-ui-cdk-components-dialog-host.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 +14 -8
- package/fesm2015/taiga-ui-cdk-date-time.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-active-zone.js +3 -3
- package/fesm2015/taiga-ui-cdk-directives-active-zone.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-auto-focus.js +7 -7
- package/fesm2015/taiga-ui-cdk-directives-auto-focus.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-focused.js +2 -2
- package/fesm2015/taiga-ui-cdk-directives-focused.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-hovered.js +3 -3
- package/fesm2015/taiga-ui-cdk-directives-hovered.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-overscroll.js +3 -3
- package/fesm2015/taiga-ui-cdk-directives-overscroll.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-platform.js +52 -0
- package/fesm2015/taiga-ui-cdk-directives-platform.js.map +1 -0
- package/fesm2015/taiga-ui-cdk-directives-prevent-default.js +3 -3
- package/fesm2015/taiga-ui-cdk-directives-prevent-default.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives.js +1 -0
- package/fesm2015/taiga-ui-cdk-directives.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-observables.js +8 -8
- package/fesm2015/taiga-ui-cdk-observables.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-services.js +5 -5
- package/fesm2015/taiga-ui-cdk-services.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-tokens.js +26 -14
- package/fesm2015/taiga-ui-cdk-tokens.js.map +1 -1
- 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 +12 -8
- package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils.js +0 -1
- package/fesm2015/taiga-ui-cdk-utils.js.map +1 -1
- package/interfaces/aria-dialog-context.d.ts +1 -1
- package/interfaces/control-value-transformer.d.ts +1 -1
- package/interfaces/focusable-element-accessor.d.ts +1 -1
- package/interfaces/time-like.d.ts +1 -1
- package/observables/zone-free.d.ts +3 -3
- package/package.json +1 -1
- package/schematics/ng-add/schema.d.ts +3 -3
- package/schematics/ng-update/interfaces/asset.d.ts +1 -1
- package/schematics/ng-update/interfaces/migration-warning.d.ts +2 -2
- package/schematics/ng-update/interfaces/removed-module.d.ts +1 -1
- package/schematics/ng-update/interfaces/replaceable-attribute.d.ts +2 -2
- package/schematics/ng-update/interfaces/replacement-const.d.ts +2 -2
- package/schematics/ng-update/interfaces/replacement-enum.d.ts +1 -1
- package/schematics/ng-update/interfaces/template-resource.d.ts +2 -2
- package/schematics/ng-update/interfaces/type-to-rename.d.ts +1 -1
- package/schematics/ng-update/utils/templates/replace-attr-values.d.ts +2 -2
- package/schematics/ng-update/v3/index.js +3 -1
- package/schematics/ng-update/v3/interfaces/attribute-to-directive.d.ts +3 -3
- package/schematics/ng-update/v3/interfaces/replaceable-tag.d.ts +1 -1
- package/schematics/ng-update/v3/steps/migrate-polymorpheus.d.ts +2 -2
- package/schematics/ng-update/v3/steps/migrate-textfield-controller.d.ts +2 -2
- package/schematics/ng-update/v3/steps/replace-styles.js +1 -1
- package/schematics/ng-update/v3-35/constants/icons.js +26 -2
- package/schematics/ng-update/v4/index.js +16 -9
- package/schematics/ng-update/v4/steps/replace-thumbnail-card.d.ts +3 -0
- package/schematics/ng-update/v4/steps/replace-thumbnail-card.js +58 -0
- package/schematics/utils/progress.d.ts +1 -1
- package/schematics/utils/push-to-array-property.d.ts +1 -1
- package/schematics/utils/templates/ng-component-input-manipulations.d.ts +11 -11
- package/services/obscured.service.d.ts +1 -1
- package/services/resize.service.d.ts +1 -1
- package/tokens/alerts.d.ts +2 -2
- package/tokens/dialogs.d.ts +2 -2
- package/tokens/index.d.ts +1 -0
- package/tokens/platform.d.ts +3 -0
- package/tokens/swipe-options.d.ts +1 -2
- package/tokens/zoom-options.d.ts +1 -2
- package/types/index.d.ts +1 -0
- package/types/platform.d.ts +1 -0
- package/utils/dom/get-element-offset.d.ts +1 -1
- package/utils/focus/get-closest-focusable.d.ts +4 -4
- package/utils/index.d.ts +0 -1
- package/utils/math/round-with.d.ts +2 -2
- package/utils/miscellaneous/create-options.d.ts +1 -0
- package/utils/miscellaneous/create-token.d.ts +2 -0
- package/utils/miscellaneous/index.d.ts +1 -0
- package/bundles/taiga-ui-cdk-utils-calendar.umd.js +0 -26
- package/bundles/taiga-ui-cdk-utils-calendar.umd.js.map +0 -1
- package/esm2015/utils/calendar/date-clamp.js +0 -10
- package/esm2015/utils/calendar/index.js +0 -2
- package/esm2015/utils/calendar/taiga-ui-cdk-utils-calendar.js +0 -5
- package/fesm2015/taiga-ui-cdk-utils-calendar.js +0 -16
- package/fesm2015/taiga-ui-cdk-utils-calendar.js.map +0 -1
- package/utils/calendar/index.d.ts +0 -1
- package/utils/calendar/package.json +0 -10
@@ -1,5 +1,5 @@
|
|
1
1
|
import { NgZone } from '@angular/core';
|
2
2
|
import { MonoTypeOperatorFunction } from 'rxjs';
|
3
|
-
export declare function tuiZonefull<T>(
|
4
|
-
export declare function tuiZonefree<T>(
|
5
|
-
export declare function tuiZoneOptimized<T>(
|
3
|
+
export declare function tuiZonefull<T>(zone: NgZone): MonoTypeOperatorFunction<T>;
|
4
|
+
export declare function tuiZonefree<T>(zone: NgZone): MonoTypeOperatorFunction<T>;
|
5
|
+
export declare function tuiZoneOptimized<T>(zone: NgZone): MonoTypeOperatorFunction<T>;
|
package/package.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
export interface TuiSchema {
|
2
|
-
readonly project: string;
|
3
|
-
readonly addons: readonly string[];
|
4
|
-
readonly addGlobalStyles: boolean;
|
5
2
|
readonly addAlertModule: boolean;
|
6
3
|
readonly addDialogsModule: boolean;
|
4
|
+
readonly addGlobalStyles: boolean;
|
7
5
|
readonly addSanitizer: boolean;
|
6
|
+
readonly addons: readonly string[];
|
7
|
+
readonly project: string;
|
8
8
|
/**
|
9
9
|
* @example
|
10
10
|
* ```console
|
@@ -2,9 +2,9 @@ import { Element } from 'parse5';
|
|
2
2
|
export interface ReplaceableAttribute {
|
3
3
|
readonly from: {
|
4
4
|
readonly attrName: string;
|
5
|
-
readonly withTagNames?: string[];
|
6
|
-
readonly withAttrsNames?: string[];
|
7
5
|
readonly filterFn?: (element: Element) => boolean;
|
6
|
+
readonly withAttrsNames?: string[];
|
7
|
+
readonly withTagNames?: string[];
|
8
8
|
};
|
9
9
|
readonly to: {
|
10
10
|
readonly attrName: string;
|
@@ -1,11 +1,11 @@
|
|
1
1
|
export interface ReplacementConst {
|
2
2
|
readonly from: {
|
3
|
-
readonly name: string;
|
4
3
|
readonly moduleSpecifier?: string[] | string;
|
4
|
+
readonly name: string;
|
5
5
|
};
|
6
6
|
readonly to: {
|
7
|
+
readonly moduleSpecifier: string;
|
7
8
|
readonly name: string;
|
8
9
|
readonly namedImport?: string;
|
9
|
-
readonly moduleSpecifier: string;
|
10
10
|
};
|
11
11
|
}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
export declare type TemplateResource = {
|
2
|
-
readonly template: string;
|
3
2
|
readonly componentPath: string;
|
4
3
|
readonly offset: number;
|
4
|
+
readonly template: string;
|
5
5
|
} | {
|
6
|
-
readonly templatePath: string;
|
7
6
|
componentPath: string;
|
7
|
+
readonly templatePath: string;
|
8
8
|
};
|
@@ -3,8 +3,8 @@ import { DevkitFileSystem } from 'ng-morph';
|
|
3
3
|
import { TemplateResource } from '../../interfaces/template-resource';
|
4
4
|
import { ReplaceableAttributeValue } from '../../v3/interfaces/replaceable-attribute-value';
|
5
5
|
export declare function replaceAttrValues({ resource, recorder, fileSystem, replaceableItems, }: {
|
6
|
-
resource: TemplateResource;
|
7
|
-
recorder: UpdateRecorder;
|
8
6
|
fileSystem: DevkitFileSystem;
|
7
|
+
recorder: UpdateRecorder;
|
9
8
|
replaceableItems: ReplaceableAttributeValue[];
|
9
|
+
resource: TemplateResource;
|
10
10
|
}): void;
|
@@ -99,7 +99,9 @@ function addTaigaStyles(options) {
|
|
99
99
|
`– Manually replace "${taiga_styles_1.TAIGA_GLOBAL_OLD_STYLE}" with "${taiga_styles_1.TAIGA_GLOBAL_NEW_STYLE}" inside "styles" of angular.json (don't forget to install "@taiga-ui/styles")`);
|
100
100
|
return;
|
101
101
|
}
|
102
|
-
return angular_json_manipulations_1.addStylesToAngularJson(options, context, taigaStyles, existingStyles => !!(existingStyles === null || existingStyles === void 0 ? void 0 : existingStyles.some(
|
102
|
+
return angular_json_manipulations_1.addStylesToAngularJson(options, context, taigaStyles, existingStyles => !!(existingStyles === null || existingStyles === void 0 ? void 0 : existingStyles.some(
|
103
|
+
// eslint-disable-next-line @taiga-ui/experience/no-typeof
|
104
|
+
style => typeof style === `string` && style.includes(`tinkoff-theme`))), stylesToReplace, tree);
|
103
105
|
});
|
104
106
|
}
|
105
107
|
function showNormalizeWarning() {
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { Element } from 'parse5';
|
2
2
|
export interface AttributeToDirective {
|
3
3
|
readonly componentSelector: string[] | string;
|
4
|
-
readonly filterFn?: (element: Element) => boolean;
|
5
|
-
readonly inputProperty: string;
|
6
4
|
readonly directive: string;
|
7
5
|
readonly directiveModule: {
|
8
|
-
readonly name: string;
|
9
6
|
readonly moduleSpecifier: string;
|
7
|
+
readonly name: string;
|
10
8
|
};
|
9
|
+
readonly filterFn?: (element: Element) => boolean;
|
10
|
+
readonly inputProperty: string;
|
11
11
|
}
|
@@ -2,7 +2,7 @@ import { UpdateRecorder } from '@angular-devkit/schematics';
|
|
2
2
|
import { DevkitFileSystem } from 'ng-morph/project/classes/devkit-file-system';
|
3
3
|
import { TemplateResource } from '../../interfaces/template-resource';
|
4
4
|
export declare function migratePolymorpheus({ resource, fileSystem, recorder, }: {
|
5
|
-
resource: TemplateResource;
|
6
|
-
recorder: UpdateRecorder;
|
7
5
|
fileSystem: DevkitFileSystem;
|
6
|
+
recorder: UpdateRecorder;
|
7
|
+
resource: TemplateResource;
|
8
8
|
}): void;
|
@@ -2,7 +2,7 @@ import { UpdateRecorder } from '@angular-devkit/schematics';
|
|
2
2
|
import { DevkitFileSystem } from 'ng-morph/project/classes/devkit-file-system';
|
3
3
|
import { TemplateResource } from '../../interfaces/template-resource';
|
4
4
|
export declare function migrateTextfieldController({ resource, fileSystem, recorder, }: {
|
5
|
-
resource: TemplateResource;
|
6
|
-
recorder: UpdateRecorder;
|
7
5
|
fileSystem: DevkitFileSystem;
|
6
|
+
recorder: UpdateRecorder;
|
7
|
+
resource: TemplateResource;
|
8
8
|
}): void;
|
@@ -25,7 +25,7 @@ function replaceStyles() {
|
|
25
25
|
.replace(`tui-dropdown-box`, `tui-dropdown`)
|
26
26
|
.replace(`--tui-color-link`, `--tui-link`)
|
27
27
|
.replace(/@import '~@taiga-ui/g, `@import '@taiga-ui`)
|
28
|
-
.replace(
|
28
|
+
.replace(/@import '@taiga-ui\/core\/styles\/taiga-ui-global/g, `${exports.TUI_WARNING_NORMALIZE}\n@import '@taiga-ui/styles/taiga-ui-global`)
|
29
29
|
.replace(/@import '@taiga-ui\/.+(.less)?';/g, val => `${val.replace(`';`, ``)}.less';`.replace(`.less.less`, `.less`));
|
30
30
|
sourceFile.replaceWithText(fullText);
|
31
31
|
});
|
@@ -6,6 +6,26 @@ exports.ICONS = [
|
|
6
6
|
to: `tuiIconTdsGridMediumPragmatic`,
|
7
7
|
from: `tuiIconAddProductLarge`,
|
8
8
|
},
|
9
|
+
{
|
10
|
+
to: `tuiIconTdsTexMediumPragmatic`,
|
11
|
+
from: `tuiIconTeXLarge`,
|
12
|
+
},
|
13
|
+
{
|
14
|
+
to: `tuiIconTdsWysiwygSpoilerMediumPragmatic`,
|
15
|
+
from: `tuiIconSpoilerLarge`,
|
16
|
+
},
|
17
|
+
{
|
18
|
+
to: `tuiIconTdsWysiwygSpoilerRemoveMediumPragmatic`,
|
19
|
+
from: `tuiIconSpoilerDeleteLarge`,
|
20
|
+
},
|
21
|
+
{
|
22
|
+
to: `tuiIconTdsLinkOffMediumPragmatic`,
|
23
|
+
from: `tuiIconUnlinkLarge`,
|
24
|
+
},
|
25
|
+
{
|
26
|
+
to: `tuiIconTdsWysiwygHighlighterMediumPragmatic`,
|
27
|
+
from: `tuiIconHiliteLarge`,
|
28
|
+
},
|
9
29
|
{
|
10
30
|
to: `tuiIconTdsWysiwygTableAddRowMediumPragmatic`,
|
11
31
|
from: `tuiIconAddRowLarge`,
|
@@ -1655,11 +1675,11 @@ exports.ICONS = [
|
|
1655
1675
|
from: `tuiIconReceiptLargeOutline`,
|
1656
1676
|
},
|
1657
1677
|
{
|
1658
|
-
to: `
|
1678
|
+
to: `tuiIconTdsArrowRepeatSmallPragmatic`,
|
1659
1679
|
from: `tuiIconRedo`,
|
1660
1680
|
},
|
1661
1681
|
{
|
1662
|
-
to: `
|
1682
|
+
to: `tuiIconTdsArrowRepeatMediumPragmatic`,
|
1663
1683
|
from: `tuiIconRedoLarge`,
|
1664
1684
|
},
|
1665
1685
|
{
|
@@ -1986,6 +2006,10 @@ exports.ICONS = [
|
|
1986
2006
|
to: `tuiIconTdsArrowRewindSmallPragmatic`,
|
1987
2007
|
from: `tuiIconUndo`,
|
1988
2008
|
},
|
2009
|
+
{
|
2010
|
+
to: `tuiIconTdsWysiwygFontBoldMediumPragmatic`,
|
2011
|
+
from: `tuiIconBoldLarge`,
|
2012
|
+
},
|
1989
2013
|
{
|
1990
2014
|
to: `tuiIconTdsArrowRewindMediumPragmatic`,
|
1991
2015
|
from: `tuiIconUndoLarge`,
|
@@ -1,17 +1,24 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.updateToV4 = void 0;
|
4
|
-
|
4
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
5
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
6
|
+
const perf_hooks_1 = require("perf_hooks");
|
5
7
|
const versions_1 = require("../../ng-add/constants/versions");
|
6
8
|
const colored_log_1 = require("../../utils/colored-log");
|
7
|
-
const
|
9
|
+
const get_execution_time_1 = require("../../utils/get-execution-time");
|
10
|
+
const replace_thumbnail_card_1 = require("./steps/replace-thumbnail-card");
|
8
11
|
function updateToV4(options) {
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
const t0 = perf_hooks_1.performance.now();
|
13
|
+
!options[`skip-logs`] &&
|
14
|
+
colored_log_1.titleLog(`\n\n${colored_log_1.START_SYMBOL} Your packages will be updated to @taiga-ui/*@${versions_1.TAIGA_VERSION}\n`);
|
15
|
+
return schematics_1.chain([
|
16
|
+
replace_thumbnail_card_1.replaceThumbnailCard(options),
|
17
|
+
() => {
|
18
|
+
const executionTime = get_execution_time_1.getExecutionTime(t0, perf_hooks_1.performance.now());
|
19
|
+
!options[`skip-logs`] &&
|
20
|
+
colored_log_1.titleLog(`${colored_log_1.FINISH_SYMBOL} We migrated packages to @taiga-ui/*@${versions_1.TAIGA_VERSION} in ${executionTime}. \n`);
|
21
|
+
},
|
22
|
+
]);
|
16
23
|
}
|
17
24
|
exports.updateToV4 = updateToV4;
|
@@ -0,0 +1,58 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.replaceThumbnailCard = 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 project_root_1 = require("../../../utils/project-root");
|
8
|
+
const replace_tag_1 = require("../../../utils/replace-tag");
|
9
|
+
const elements_1 = require("../../../utils/templates/elements");
|
10
|
+
const get_component_templates_1 = require("../../../utils/templates/get-component-templates");
|
11
|
+
const template_resource_1 = require("../../../utils/templates/template-resource");
|
12
|
+
const get_file_system_1 = require("../../utils/get-file-system");
|
13
|
+
const replace_text_1 = require("../../utils/replace-text");
|
14
|
+
function replaceThumbnailCard(options) {
|
15
|
+
return (tree, _) => {
|
16
|
+
const fileSystem = get_file_system_1.getFileSystem(tree);
|
17
|
+
replaceCardTag(options, fileSystem);
|
18
|
+
replaceReferenceTypes(options, fileSystem);
|
19
|
+
!options[`skip-logs`] && colored_log_1.titleLog(`${colored_log_1.FINISH_SYMBOL} successfully migrated \n`);
|
20
|
+
};
|
21
|
+
}
|
22
|
+
exports.replaceThumbnailCard = replaceThumbnailCard;
|
23
|
+
function replaceCardTag(options, fileSystem) {
|
24
|
+
!options[`skip-logs`] &&
|
25
|
+
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing <tui-card /> to <tui-thumbnail-card />`);
|
26
|
+
const templateResources = get_component_templates_1.getComponentTemplates(constants_1.ALL_TS_FILES);
|
27
|
+
for (const resource of templateResources) {
|
28
|
+
const template = template_resource_1.getTemplateFromTemplateResource(resource, fileSystem);
|
29
|
+
const elements = elements_1.findElementsByTagName(template, `tui-card`);
|
30
|
+
const path = fileSystem.resolve(template_resource_1.getPathFromTemplateResource(resource));
|
31
|
+
const recorder = fileSystem.edit(path);
|
32
|
+
elements.forEach(({ sourceCodeLocation }) => {
|
33
|
+
if (sourceCodeLocation) {
|
34
|
+
replace_tag_1.replaceTag(recorder, sourceCodeLocation, `tui-card`, `tui-thumbnail-card`);
|
35
|
+
}
|
36
|
+
});
|
37
|
+
}
|
38
|
+
fileSystem.commitEdits();
|
39
|
+
ng_morph_1.saveActiveProject();
|
40
|
+
ng_morph_1.setActiveProject(ng_morph_1.createProject(fileSystem.tree, project_root_1.projectRoot(), constants_1.ALL_FILES));
|
41
|
+
}
|
42
|
+
function replaceReferenceTypes(options, fileSystem) {
|
43
|
+
!options[`skip-logs`] &&
|
44
|
+
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing TuiCard(Module|Component) to TuiThumbnailCard(Module|Component)`);
|
45
|
+
replace_text_1.replaceText([
|
46
|
+
{
|
47
|
+
from: `TuiCardModule`,
|
48
|
+
to: `TuiThumbnailCardModule`,
|
49
|
+
},
|
50
|
+
{
|
51
|
+
from: `TuiCardComponent`,
|
52
|
+
to: `TuiThumbnailCardComponent`,
|
53
|
+
},
|
54
|
+
]);
|
55
|
+
fileSystem.commitEdits();
|
56
|
+
ng_morph_1.saveActiveProject();
|
57
|
+
ng_morph_1.setActiveProject(ng_morph_1.createProject(fileSystem.tree, project_root_1.projectRoot(), constants_1.ALL_FILES));
|
58
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ObjectLiteralExpression } from 'ng-morph';
|
2
2
|
export declare function pushToObjectArrayProperty(objectExpression: ObjectLiteralExpression, propertyName: string, initializer: string, { unique, forceToArray, }?: {
|
3
|
-
unique?: boolean;
|
4
3
|
forceToArray?: boolean;
|
4
|
+
unique?: boolean;
|
5
5
|
}): void;
|
@@ -27,13 +27,13 @@ import { TemplateResource } from '../../ng-update/interfaces/template-resource';
|
|
27
27
|
* @return true if something was changed
|
28
28
|
*/
|
29
29
|
export declare function replaceInputProperty({ templateResource, fileSystem, componentSelector, from, to, newValue, filterFn, }: {
|
30
|
-
templateResource: TemplateResource;
|
31
|
-
fileSystem: DevkitFileSystem;
|
32
30
|
componentSelector: string[] | string;
|
31
|
+
fileSystem: DevkitFileSystem;
|
32
|
+
filterFn?: (element: Element) => boolean;
|
33
33
|
from: string;
|
34
|
-
to: string;
|
35
34
|
newValue?: string;
|
36
|
-
|
35
|
+
templateResource: TemplateResource;
|
36
|
+
to: string;
|
37
37
|
}): boolean;
|
38
38
|
/**
|
39
39
|
* @example
|
@@ -52,16 +52,16 @@ export declare function getInputPropertyOffsets(html: string, attrName: string,
|
|
52
52
|
*/
|
53
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
|
-
templateResource: TemplateResource;
|
56
|
-
fileSystem: DevkitFileSystem;
|
57
55
|
componentSelector: string[] | string;
|
58
|
-
inputProperty: string;
|
59
56
|
directive: string;
|
60
57
|
directiveModule?: {
|
61
|
-
name: string;
|
62
58
|
moduleSpecifier: string;
|
59
|
+
name: string;
|
63
60
|
};
|
61
|
+
fileSystem: DevkitFileSystem;
|
64
62
|
filterFn?: (element: Element) => boolean;
|
63
|
+
inputProperty: string;
|
64
|
+
templateResource: TemplateResource;
|
65
65
|
}): void;
|
66
66
|
/**
|
67
67
|
* After removing property from the tag (which uses multi lines inside template) it can leave redundant space.
|
@@ -69,9 +69,9 @@ export declare function replaceInputPropertyByDirective({ templateResource, file
|
|
69
69
|
* TODO: Find a way to fix it
|
70
70
|
*/
|
71
71
|
export declare function removeInputProperty({ templateResource, fileSystem, componentSelector, inputProperty, filterFn, }: {
|
72
|
-
templateResource: TemplateResource;
|
73
|
-
fileSystem: DevkitFileSystem;
|
74
72
|
componentSelector: string;
|
75
|
-
|
73
|
+
fileSystem: DevkitFileSystem;
|
76
74
|
filterFn?: (element: Element) => boolean;
|
75
|
+
inputProperty: string;
|
76
|
+
templateResource: TemplateResource;
|
77
77
|
}): void;
|
@@ -9,7 +9,7 @@ import * as i0 from "@angular/core";
|
|
9
9
|
*/
|
10
10
|
export declare class TuiObscuredService extends Observable<readonly Element[] | null> {
|
11
11
|
private readonly obscured$;
|
12
|
-
constructor(parentsScroll$: TuiParentsScrollService, { nativeElement }: ElementRef<Element>,
|
12
|
+
constructor(parentsScroll$: TuiParentsScrollService, { nativeElement }: ElementRef<Element>, zone: NgZone, win: Window, destroy$: Observable<void>, animationFrame$: Observable<number>);
|
13
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiObscuredService, [{ self: true; }, null, null, null, { self: true; }, null]>;
|
14
14
|
static ɵprov: i0.ɵɵInjectableDeclaration<TuiObscuredService>;
|
15
15
|
}
|
@@ -3,7 +3,7 @@ import { ResizeObserverService } from '@ng-web-apis/resize-observer';
|
|
3
3
|
import { Observable } from 'rxjs';
|
4
4
|
import * as i0 from "@angular/core";
|
5
5
|
export declare class TuiResizeService extends ResizeObserverService {
|
6
|
-
constructor(el: ElementRef<HTMLElement>,
|
6
|
+
constructor(el: ElementRef<HTMLElement>, zone: NgZone, destroy$: Observable<void>, support: boolean, box: ResizeObserverBoxOptions, animationFrame$: Observable<number>);
|
7
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiResizeService, [null, null, { self: true; }, null, null, null]>;
|
8
8
|
static ɵprov: i0.ɵɵInjectableDeclaration<TuiResizeService>;
|
9
9
|
}
|
package/tokens/alerts.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import {
|
1
|
+
import { Provider, Type } from '@angular/core';
|
2
2
|
import { TuiAriaDialogContext } from '@taiga-ui/cdk/interfaces';
|
3
3
|
import { Observable } from 'rxjs';
|
4
4
|
/**
|
5
5
|
* A stream of alerts
|
6
6
|
*/
|
7
|
-
export declare const TUI_ALERTS: InjectionToken<readonly Observable<readonly TuiAriaDialogContext[]>[]>;
|
7
|
+
export declare const TUI_ALERTS: import("@angular/core").InjectionToken<readonly Observable<readonly TuiAriaDialogContext[]>[]>;
|
8
8
|
export declare function tuiAsAlerts(useExisting: Type<Observable<readonly TuiAriaDialogContext[]>>): Provider;
|
package/tokens/dialogs.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import {
|
1
|
+
import { Provider, Type } from '@angular/core';
|
2
2
|
import { TuiAriaDialogContext } from '@taiga-ui/cdk/interfaces';
|
3
3
|
import { Observable } from 'rxjs';
|
4
4
|
/**
|
5
5
|
* A stream of dialogs
|
6
6
|
*/
|
7
|
-
export declare const TUI_DIALOGS: InjectionToken<readonly Observable<readonly TuiAriaDialogContext[]>[]>;
|
7
|
+
export declare const TUI_DIALOGS: import("@angular/core").InjectionToken<readonly Observable<readonly TuiAriaDialogContext[]>[]>;
|
8
8
|
export declare function tuiAsDialog(useExisting: Type<Observable<readonly TuiAriaDialogContext[]>>): Provider;
|
package/tokens/index.d.ts
CHANGED
@@ -15,6 +15,7 @@ export * from './is-mobile';
|
|
15
15
|
export * from './is-playwright';
|
16
16
|
export * from './is-stackblitz';
|
17
17
|
export * from './is-webkit';
|
18
|
+
export * from './platform';
|
18
19
|
export * from './range';
|
19
20
|
export * from './removed-element';
|
20
21
|
export * from './swipe-options';
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
2
1
|
import { TuiSwipeOptions } from '@taiga-ui/cdk/interfaces';
|
3
2
|
/**
|
4
3
|
* Swipe options
|
5
4
|
*/
|
6
|
-
export declare const TUI_SWIPE_OPTIONS: InjectionToken<TuiSwipeOptions>;
|
5
|
+
export declare const TUI_SWIPE_OPTIONS: import("@angular/core").InjectionToken<TuiSwipeOptions>;
|
package/tokens/zoom-options.d.ts
CHANGED
@@ -1,6 +1,5 @@
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
2
1
|
import { TuiZoomOptions } from '@taiga-ui/cdk/interfaces';
|
3
2
|
/**
|
4
3
|
* Zoom options
|
5
4
|
*/
|
6
|
-
export declare const TUI_ZOOM_OPTIONS: InjectionToken<TuiZoomOptions>;
|
5
|
+
export declare const TUI_ZOOM_OPTIONS: import("@angular/core").InjectionToken<TuiZoomOptions>;
|
package/types/index.d.ts
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
export declare type TuiPlatform = 'android' | 'ios' | 'web';
|
@@ -6,9 +6,9 @@ export interface TuiGetClosestFocusableOptions {
|
|
6
6
|
initial: Element;
|
7
7
|
/**
|
8
8
|
* @description:
|
9
|
-
*
|
9
|
+
* determine if only keyboard focus is of interest
|
10
10
|
*/
|
11
|
-
|
11
|
+
keyboard?: boolean;
|
12
12
|
/**
|
13
13
|
* @description:
|
14
14
|
* should it look backwards instead (find item that will be focused with Shift + Tab)
|
@@ -16,9 +16,9 @@ export interface TuiGetClosestFocusableOptions {
|
|
16
16
|
previous?: boolean;
|
17
17
|
/**
|
18
18
|
* @description:
|
19
|
-
*
|
19
|
+
* top Node limiting the search area
|
20
20
|
*/
|
21
|
-
|
21
|
+
root: Node;
|
22
22
|
}
|
23
23
|
/**
|
24
24
|
* @description:
|
package/utils/index.d.ts
CHANGED
@@ -3,6 +3,7 @@ export * from './array-shallow-equals';
|
|
3
3
|
export * from './array-toggle';
|
4
4
|
export * from './clean-object';
|
5
5
|
export * from './create-options';
|
6
|
+
export * from './create-token';
|
6
7
|
export * from './default-sort';
|
7
8
|
export * from './distance-between-touches';
|
8
9
|
export * from './ease-in-out-quad';
|
@@ -1,26 +0,0 @@
|
|
1
|
-
(function (global, factory) {
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
3
|
-
typeof define === 'function' && define.amd ? define('@taiga-ui/cdk/utils/calendar', ['exports'], factory) :
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].cdk = global["taiga-ui"].cdk || {}, global["taiga-ui"].cdk.utils = global["taiga-ui"].cdk.utils || {}, global["taiga-ui"].cdk.utils.calendar = {})));
|
5
|
-
})(this, (function (exports) { 'use strict';
|
6
|
-
|
7
|
-
function tuiDateClamp(date, min, max) {
|
8
|
-
if (max && max < date) {
|
9
|
-
return max;
|
10
|
-
}
|
11
|
-
if (min && min > date) {
|
12
|
-
return min;
|
13
|
-
}
|
14
|
-
return date;
|
15
|
-
}
|
16
|
-
|
17
|
-
/**
|
18
|
-
* Generated bundle index. Do not edit.
|
19
|
-
*/
|
20
|
-
|
21
|
-
exports.tuiDateClamp = tuiDateClamp;
|
22
|
-
|
23
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
24
|
-
|
25
|
-
}));
|
26
|
-
//# sourceMappingURL=taiga-ui-cdk-utils-calendar.umd.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-utils-calendar.umd.js","sources":["../../../projects/cdk/utils/calendar/date-clamp.ts","../../../projects/cdk/utils/calendar/taiga-ui-cdk-utils-calendar.ts"],"sourcesContent":["import {TuiYear} from '@taiga-ui/cdk/date-time';\n\nexport function tuiDateClamp<T extends TuiYear>(date: T, min?: T, max?: T): T {\n if (max && max < date) {\n return max;\n }\n\n if (min && min > date) {\n return min;\n }\n\n return date;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;aAEgB,YAAY,CAAoB,IAAO,EAAE,GAAO,EAAE,GAAO,EAAA;IACrE,IAAA,IAAI,GAAG,IAAI,GAAG,GAAG,IAAI,EAAE;IACnB,QAAA,OAAO,GAAG,CAAC;IACd,KAAA;IAED,IAAA,IAAI,GAAG,IAAI,GAAG,GAAG,IAAI,EAAE;IACnB,QAAA,OAAO,GAAG,CAAC;IACd,KAAA;IAED,IAAA,OAAO,IAAI,CAAC;IAChB;;ICZA;;IAEG;;;;;;;;;;"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
export function tuiDateClamp(date, min, max) {
|
2
|
-
if (max && max < date) {
|
3
|
-
return max;
|
4
|
-
}
|
5
|
-
if (min && min > date) {
|
6
|
-
return min;
|
7
|
-
}
|
8
|
-
return date;
|
9
|
-
}
|
10
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS1jbGFtcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Nkay91dGlscy9jYWxlbmRhci9kYXRlLWNsYW1wLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE1BQU0sVUFBVSxZQUFZLENBQW9CLElBQU8sRUFBRSxHQUFPLEVBQUUsR0FBTztJQUNyRSxJQUFJLEdBQUcsSUFBSSxHQUFHLEdBQUcsSUFBSSxFQUFFO1FBQ25CLE9BQU8sR0FBRyxDQUFDO0tBQ2Q7SUFFRCxJQUFJLEdBQUcsSUFBSSxHQUFHLEdBQUcsSUFBSSxFQUFFO1FBQ25CLE9BQU8sR0FBRyxDQUFDO0tBQ2Q7SUFFRCxPQUFPLElBQUksQ0FBQztBQUNoQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtUdWlZZWFyfSBmcm9tICdAdGFpZ2EtdWkvY2RrL2RhdGUtdGltZSc7XG5cbmV4cG9ydCBmdW5jdGlvbiB0dWlEYXRlQ2xhbXA8VCBleHRlbmRzIFR1aVllYXI+KGRhdGU6IFQsIG1pbj86IFQsIG1heD86IFQpOiBUIHtcbiAgICBpZiAobWF4ICYmIG1heCA8IGRhdGUpIHtcbiAgICAgICAgcmV0dXJuIG1heDtcbiAgICB9XG5cbiAgICBpZiAobWluICYmIG1pbiA+IGRhdGUpIHtcbiAgICAgICAgcmV0dXJuIG1pbjtcbiAgICB9XG5cbiAgICByZXR1cm4gZGF0ZTtcbn1cbiJdfQ==
|
@@ -1,2 +0,0 @@
|
|
1
|
-
export * from './date-clamp';
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jZGsvdXRpbHMvY2FsZW5kYXIvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2RhdGUtY2xhbXAnO1xuIl19
|
@@ -1,5 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Generated bundle index. Do not edit.
|
3
|
-
*/
|
4
|
-
export * from './index';
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFpZ2EtdWktY2RrLXV0aWxzLWNhbGVuZGFyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY2RrL3V0aWxzL2NhbGVuZGFyL3RhaWdhLXVpLWNkay11dGlscy1jYWxlbmRhci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==
|