@taiga-ui/cdk 4.52.0-canary.ec0802b → 4.52.0-canary.efbd0d4
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/constants/used-icons.d.ts +2 -2
- package/constants/version.d.ts +1 -1
- package/constants/version.js +1 -1
- package/date-time/date-fillers.d.ts +5 -5
- package/date-time/day-range.d.ts +1 -1
- package/date-time/day.d.ts +3 -3
- package/date-time/types.d.ts +1 -7
- package/directives/active-zone/active-zone.directive.d.ts +0 -2
- package/directives/animated/animated.directive.d.ts +1 -3
- package/directives/animated/index.d.ts +0 -1
- package/directives/index.d.ts +0 -4
- package/directives/transitioned/transitioned.directive.d.ts +1 -0
- package/fesm2022/taiga-ui-cdk-classes.mjs +4 -4
- package/fesm2022/taiga-ui-cdk-classes.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-constants.mjs +3 -3
- package/fesm2022/taiga-ui-cdk-constants.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-date-time.mjs +22 -23
- package/fesm2022/taiga-ui-cdk-date-time.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-active-zone.mjs +12 -16
- package/fesm2022/taiga-ui-cdk-directives-active-zone.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-animated.mjs +23 -70
- package/fesm2022/taiga-ui-cdk-directives-animated.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-auto-focus.mjs +5 -4
- package/fesm2022/taiga-ui-cdk-directives-auto-focus.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-control.mjs +3 -3
- package/fesm2022/taiga-ui-cdk-directives-copy-processor.mjs +4 -4
- package/fesm2022/taiga-ui-cdk-directives-copy-processor.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-element.mjs +4 -4
- package/fesm2022/taiga-ui-cdk-directives-element.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-focus-trap.mjs +5 -7
- package/fesm2022/taiga-ui-cdk-directives-focus-trap.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-font-size.mjs +3 -3
- package/fesm2022/taiga-ui-cdk-directives-high-dpi.mjs +3 -3
- package/fesm2022/taiga-ui-cdk-directives-hovered.mjs +7 -7
- package/fesm2022/taiga-ui-cdk-directives-hovered.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-item.mjs +3 -3
- package/fesm2022/taiga-ui-cdk-directives-media.mjs +4 -4
- package/fesm2022/taiga-ui-cdk-directives-media.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-native-validator.mjs +5 -4
- package/fesm2022/taiga-ui-cdk-directives-native-validator.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-obscured.mjs +7 -13
- package/fesm2022/taiga-ui-cdk-directives-obscured.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-pan.mjs +6 -6
- package/fesm2022/taiga-ui-cdk-directives-platform.mjs +3 -3
- package/fesm2022/taiga-ui-cdk-directives-resizer.mjs +6 -6
- package/fesm2022/taiga-ui-cdk-directives-swipe.mjs +6 -6
- package/fesm2022/taiga-ui-cdk-directives-transitioned.mjs +8 -14
- package/fesm2022/taiga-ui-cdk-directives-transitioned.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-validator.mjs +4 -4
- package/fesm2022/taiga-ui-cdk-directives-validator.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-value-changes.mjs +3 -3
- package/fesm2022/taiga-ui-cdk-directives-visual-viewport.mjs +5 -4
- package/fesm2022/taiga-ui-cdk-directives-visual-viewport.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-with-styles.mjs +3 -3
- package/fesm2022/taiga-ui-cdk-directives-zoom.mjs +8 -7
- package/fesm2022/taiga-ui-cdk-directives-zoom.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives.mjs +0 -4
- package/fesm2022/taiga-ui-cdk-directives.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-observables.mjs +2 -24
- package/fesm2022/taiga-ui-cdk-observables.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-pipes-filter.mjs +3 -3
- package/fesm2022/taiga-ui-cdk-pipes-mapper.mjs +3 -3
- package/fesm2022/taiga-ui-cdk-pipes-obfuscate.mjs +5 -4
- package/fesm2022/taiga-ui-cdk-pipes-obfuscate.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-pipes.mjs +0 -6
- package/fesm2022/taiga-ui-cdk-pipes.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-portals.mjs +15 -16
- package/fesm2022/taiga-ui-cdk-portals.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-tokens.mjs +14 -47
- package/fesm2022/taiga-ui-cdk-tokens.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils-browser.mjs +2 -3
- package/fesm2022/taiga-ui-cdk-utils-browser.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils-di.mjs +45 -4
- package/fesm2022/taiga-ui-cdk-utils-di.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils-dom.mjs +1 -74
- package/fesm2022/taiga-ui-cdk-utils-dom.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils-focus.mjs +22 -38
- package/fesm2022/taiga-ui-cdk-utils-focus.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils-math.mjs +1 -12
- package/fesm2022/taiga-ui-cdk-utils-math.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs +45 -123
- package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-utils.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk.mjs +0 -1
- package/fesm2022/taiga-ui-cdk.mjs.map +1 -1
- package/index.d.ts +0 -1
- package/observables/index.d.ts +0 -2
- package/package.json +18 -67
- package/pipes/index.d.ts +0 -6
- package/portals/portal.d.ts +0 -1
- package/schematics/index.d.ts +1 -0
- package/schematics/index.js +1 -0
- package/schematics/index.js.map +1 -1
- package/schematics/ng-add/constants/versions.d.ts +1 -1
- package/schematics/ng-add/steps/add-taiga-modules.js +0 -15
- package/schematics/ng-add/steps/add-taiga-modules.js.map +1 -1
- package/schematics/ng-update/v4/migrate-css-vars/palette.d.ts +4 -4
- package/schematics/ng-update/v4/migrate-css-vars/palette.js +4 -4
- package/schematics/ng-update/v4/migrate-css-vars/palette.js.map +1 -1
- package/schematics/ng-update/v4/steps/styles/migrate-text-mixins.js +13 -13
- package/schematics/ng-update/v4/steps/styles/migrate-text-mixins.js.map +1 -1
- package/schematics/ng-update/v5/index.js +2 -0
- package/schematics/ng-update/v5/index.js.map +1 -1
- package/schematics/ng-update/v5/steps/constants/functions.js +1 -6
- package/schematics/ng-update/v5/steps/constants/functions.js.map +1 -1
- package/schematics/ng-update/v5/steps/migrate-css-variables.d.ts +3 -0
- package/schematics/ng-update/v5/steps/migrate-css-variables.js +30 -0
- package/schematics/ng-update/v5/steps/migrate-css-variables.js.map +1 -0
- package/schematics/ng-update/v5/steps/migrate-templates.js +4 -0
- package/schematics/ng-update/v5/steps/migrate-templates.js.map +1 -1
- package/schematics/ng-update/v5/steps/templates/migrate-avatar.d.ts +8 -0
- package/schematics/ng-update/v5/steps/templates/migrate-avatar.js +111 -0
- package/schematics/ng-update/v5/steps/templates/migrate-avatar.js.map +1 -0
- package/schematics/ng-update/v5/steps/templates/migrate-notification.d.ts +8 -0
- package/schematics/ng-update/v5/steps/templates/migrate-notification.js +45 -0
- package/schematics/ng-update/v5/steps/templates/migrate-notification.js.map +1 -0
- package/schematics/utils/run-migration.d.ts +2 -2
- package/schematics/utils/run-migration.js +4 -3
- package/schematics/utils/run-migration.js.map +1 -1
- package/schematics/utils/templates/elements.d.ts +4 -1
- package/schematics/utils/templates/elements.js.map +1 -1
- package/tokens/environment.d.ts +0 -13
- package/tokens/index.d.ts +0 -2
- package/tokens/removed-element.d.ts +0 -3
- package/types/index.d.ts +0 -2
- package/utils/di/index.d.ts +3 -0
- package/utils/dom/index.d.ts +0 -6
- package/utils/focus/get-closest-focusable.d.ts +1 -6
- package/utils/focus/index.d.ts +4 -6
- package/utils/focus/{is-native-keyboard-focusable.d.ts → is-focusable.d.ts} +1 -1
- package/utils/index.d.ts +0 -1
- package/utils/math/index.d.ts +0 -2
- package/utils/miscellaneous/generate-id.d.ts +1 -0
- package/utils/miscellaneous/index.d.ts +2 -11
- package/utils/miscellaneous/sanitize-text.d.ts +23 -0
- package/directives/animated/animated-parent.directive.d.ts +0 -10
- package/directives/click-outside/click-outside.directive.d.ts +0 -14
- package/directives/click-outside/index.d.ts +0 -1
- package/directives/droppable/droppable.directive.d.ts +0 -10
- package/directives/droppable/index.d.ts +0 -1
- package/directives/let/index.d.ts +0 -2
- package/directives/let/let-context.d.ts +0 -11
- package/directives/let/let.directive.d.ts +0 -18
- package/directives/repeat-times/index.d.ts +0 -1
- package/directives/repeat-times/repeat-times.directive.d.ts +0 -23
- package/fesm2022/taiga-ui-cdk-directives-click-outside.mjs +0 -38
- package/fesm2022/taiga-ui-cdk-directives-click-outside.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-directives-droppable.mjs +0 -35
- package/fesm2022/taiga-ui-cdk-directives-droppable.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-directives-let.mjs +0 -52
- package/fesm2022/taiga-ui-cdk-directives-let.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-directives-repeat-times.mjs +0 -60
- package/fesm2022/taiga-ui-cdk-directives-repeat-times.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-animation.mjs +0 -32
- package/fesm2022/taiga-ui-cdk-pipes-animation.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-is-present.mjs +0 -24
- package/fesm2022/taiga-ui-cdk-pipes-is-present.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-keys.mjs +0 -23
- package/fesm2022/taiga-ui-cdk-pipes-keys.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-repeat-times.mjs +0 -24
- package/fesm2022/taiga-ui-cdk-pipes-repeat-times.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-replace.mjs +0 -25
- package/fesm2022/taiga-ui-cdk-pipes-replace.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-to-array.mjs +0 -23
- package/fesm2022/taiga-ui-cdk-pipes-to-array.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-services.mjs +0 -111
- package/fesm2022/taiga-ui-cdk-services.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-utils-color.mjs +0 -196
- package/fesm2022/taiga-ui-cdk-utils-color.mjs.map +0 -1
- package/observables/must-be-present.d.ts +0 -5
- package/observables/query-list-observable.d.ts +0 -6
- package/pipes/animation/animation.pipe.d.ts +0 -13
- package/pipes/animation/index.d.ts +0 -1
- package/pipes/is-present/index.d.ts +0 -1
- package/pipes/is-present/is-present.pipe.d.ts +0 -7
- package/pipes/keys/index.d.ts +0 -1
- package/pipes/keys/keys.pipe.d.ts +0 -7
- package/pipes/repeat-times/index.d.ts +0 -7
- package/pipes/replace/index.d.ts +0 -1
- package/pipes/replace/replace.pipe.d.ts +0 -7
- package/pipes/to-array/index.d.ts +0 -1
- package/pipes/to-array/to-array.pipe.d.ts +0 -7
- package/services/id.service.d.ts +0 -8
- package/services/index.d.ts +0 -3
- package/services/scroll.service.d.ts +0 -13
- package/services/theme-color.service.d.ts +0 -18
- package/tokens/base-href.d.ts +0 -2
- package/tokens/range.d.ts +0 -5
- package/types/safe-html.d.ts +0 -2
- package/types/values-of.d.ts +0 -1
- package/utils/color/get-gradient-data.d.ts +0 -1
- package/utils/color/hex-to-rgb.d.ts +0 -1
- package/utils/color/hex-to-rgba.d.ts +0 -3
- package/utils/color/hsv-to-rgb.d.ts +0 -4
- package/utils/color/index.d.ts +0 -9
- package/utils/color/parse-color.d.ts +0 -1
- package/utils/color/parse-gradient.d.ts +0 -10
- package/utils/color/rgb-to-hex.d.ts +0 -1
- package/utils/color/rgb-to-hsv.d.ts +0 -1
- package/utils/color/rgba-to-hex.d.ts +0 -2
- package/utils/dom/get-element-point.d.ts +0 -2
- package/utils/dom/is-current-target.d.ts +0 -1
- package/utils/dom/is-inside-iframe.d.ts +0 -4
- package/utils/dom/is-node-in.d.ts +0 -8
- package/utils/dom/retarget-boundary-crossing.d.ts +0 -1
- package/utils/dom/value-binding.d.ts +0 -3
- package/utils/focus/blur-native-focused.d.ts +0 -4
- package/utils/focus/is-native-mouse-focusable.d.ts +0 -1
- package/utils/math/to-integer.d.ts +0 -1
- package/utils/math/to-radians.d.ts +0 -4
- package/utils/miscellaneous/change-date-separator.d.ts +0 -1
- package/utils/miscellaneous/create-token.d.ts +0 -9
- package/utils/miscellaneous/flat-length.d.ts +0 -6
- package/utils/miscellaneous/get-original-array-from-query-list.d.ts +0 -8
- package/utils/miscellaneous/is-falsy.d.ts +0 -1
- package/utils/miscellaneous/is-valid-url.d.ts +0 -4
- package/utils/miscellaneous/object-shallow-equals.d.ts +0 -1
- package/utils/miscellaneous/uniq-by.d.ts +0 -1
- /package/utils/{miscellaneous → di}/directive-binding.d.ts +0 -0
- /package/utils/{miscellaneous → di}/provide-options.d.ts +0 -0
- /package/utils/{miscellaneous → di}/provide.d.ts +0 -0
- /package/utils/focus/{get-native-focused.d.ts → get-focused.d.ts} +0 -0
- /package/utils/focus/{is-native-focused-in.d.ts → is-focused-in.d.ts} +0 -0
- /package/utils/focus/{is-native-focused.d.ts → is-focused.d.ts} +0 -0
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* @description:
|
|
3
3
|
* AUTOGENERATED
|
|
4
4
|
*
|
|
5
|
-
* Array of icons used in
|
|
5
|
+
* Array of icons used in ./projects
|
|
6
6
|
*/
|
|
7
|
-
export declare const TUI_USED_ICONS: readonly ["@tui.mir", "@tui.visa", "@tui.electron", "@img.mastercard", "@img.maestro", "@img.amex", "@img.diners-club", "@img.discover", "@img.humo", "@img.jcb", "@img.ru-pay", "@img.union-pay", "@img.uzcard", "@img.verve", "@tui.search", "@tui.sun", "@tui.moon", "@tui.code", "@tui.menu", "@tui.copy", "@tui.check", "@tui.link", "@tui.external-link", "@tui.languages", "@tui.shrink", "@tui.expand", "@tui.a-large-small", "@tui.arrow-right-left", "@tui.eye-off", "@tui.eye", "@tui.grip-vertical", "@tui.chevron-up", "@tui.chevron-down", "@tui.chevrons-up-down", "@tui.info", "@tui.circle-check", "@tui.circle-x", "@tui.circle-alert", "@tui.circle-help", "@tui.x", "@tui.chevron-right", "@tui.ellipsis", "@tui.chevron-left", "@tui.clock", "@tui.trash", "@tui.minus", "@tui.file", "@tui.calendar", "@tui.plus", "@tui.heart", "@tui.heart-filled", "@tui.
|
|
7
|
+
export declare const TUI_USED_ICONS: readonly ["@tui.mir", "@tui.visa", "@tui.electron", "@img.mastercard", "@img.maestro", "@img.amex", "@img.diners-club", "@img.discover", "@img.humo", "@img.jcb", "@img.ru-pay", "@img.union-pay", "@img.uzcard", "@img.verve", "@tui.search", "@tui.sun", "@tui.moon", "@tui.code", "@tui.menu", "@tui.copy", "@tui.check", "@tui.link", "@tui.external-link", "@tui.languages", "@tui.shrink", "@tui.expand", "@tui.a-large-small", "@tui.arrow-right-left", "@tui.eye-off", "@tui.eye", "@tui.grip-vertical", "@tui.chevron-up", "@tui.chevron-down", "@tui.chevrons-up-down", "@tui.info", "@tui.circle-check", "@tui.circle-x", "@tui.circle-alert", "@tui.circle-help", "@tui.x", "@tui.chevron-right", "@tui.ellipsis", "@tui.chevron-left", "@tui.clock", "@tui.trash", "@tui.minus", "@tui.file", "@tui.calendar", "@tui.plus", "@tui.heart", "@tui.heart-filled", "@tui.rotate-ccw-square", "@tui.arrow-left", "@tui.arrow-right", "@tui.minimize", "@tui.star", "@tui.filter", "@tui.layout-grid"];
|
package/constants/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const TUI_VERSION = "4.52.0-canary.
|
|
1
|
+
export declare const TUI_VERSION = "4.52.0-canary.efbd0d4";
|
package/constants/version.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @internal 'dd
|
|
2
|
+
* @internal 'dd/mm/yyyy'.length
|
|
3
3
|
* Used in:
|
|
4
|
-
* - {@link
|
|
5
|
-
* - {@link
|
|
6
|
-
* - {@link
|
|
4
|
+
* - {@link TuiInputDate}
|
|
5
|
+
* - {@link TuiInputDateRange}
|
|
6
|
+
* - {@link TuiInputDateTime}
|
|
7
7
|
*/
|
|
8
8
|
export declare const DATE_FILLER_LENGTH = 10;
|
|
9
9
|
/**
|
|
10
10
|
* @internal
|
|
11
|
-
* Used in {@link
|
|
11
|
+
* Used in {@link TuiInputDateRange}
|
|
12
12
|
*/
|
|
13
13
|
export declare const DATE_RANGE_FILLER_LENGTH: number;
|
package/date-time/day-range.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare class TuiDayRange extends TuiMonthRange {
|
|
|
19
19
|
/**
|
|
20
20
|
* Parse and correct a day range in string format
|
|
21
21
|
*
|
|
22
|
-
* @param rangeString a string of dates in a format dd
|
|
22
|
+
* @param rangeString a string of dates in a format dd/mm/yyyy - dd/mm/yyyy
|
|
23
23
|
* @param dateMode {@link TuiDateMode}
|
|
24
24
|
* @return normalized day range object
|
|
25
25
|
*/
|
package/date-time/day.d.ts
CHANGED
|
@@ -55,17 +55,17 @@ export declare class TuiDay extends TuiMonth {
|
|
|
55
55
|
* Parsing a string with date with normalization
|
|
56
56
|
*
|
|
57
57
|
* @param rawDate date string
|
|
58
|
-
* @param dateMode date format of the date string (
|
|
58
|
+
* @param dateMode date format of the date string (dd/mm/yyyy | mm/dd/yyyy | yyyy/mm/dd)
|
|
59
59
|
* @return normalized date
|
|
60
60
|
*/
|
|
61
61
|
static normalizeParse(rawDate: string, dateMode?: TuiDateMode): TuiDay;
|
|
62
62
|
/**
|
|
63
63
|
* Parsing a date stringified in a toJSON format
|
|
64
|
-
* @param
|
|
64
|
+
* @param ymdString date string in format of YYYY-MM-DD
|
|
65
65
|
* @return date
|
|
66
66
|
* @throws exceptions if any part of the date is invalid
|
|
67
67
|
*/
|
|
68
|
-
static jsonParse(
|
|
68
|
+
static jsonParse(ymdString: string): TuiDay;
|
|
69
69
|
static normalizeDayPart(day: number, month: number, year: number): number;
|
|
70
70
|
get formattedDayPart(): string;
|
|
71
71
|
get isWeekend(): boolean;
|
package/date-time/types.d.ts
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* * DMY - dd.mm.yyyy
|
|
3
|
-
* * MDY - mm.dd.yyyy
|
|
4
|
-
* * YMD - yyyy.mm.dd
|
|
5
|
-
* TODO: Change to be MaskitoDateMode compatible in v5
|
|
6
|
-
*/
|
|
7
|
-
export type TuiDateMode = 'DMY' | 'MDY' | 'YMD';
|
|
1
|
+
export type TuiDateMode = 'dd/mm/yyyy' | 'mm/dd/yyyy' | 'yyyy/mm/dd';
|
|
8
2
|
/**
|
|
9
3
|
* Optionally has year and/or month and/or day
|
|
10
4
|
*/
|
|
@@ -2,9 +2,7 @@ import { type OnDestroy } from '@angular/core';
|
|
|
2
2
|
import { type Observable } from 'rxjs';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class TuiActiveZone implements OnDestroy {
|
|
5
|
-
private readonly control;
|
|
6
5
|
private readonly active$;
|
|
7
|
-
private readonly zone;
|
|
8
6
|
private tuiActiveZoneParent;
|
|
9
7
|
private readonly parent;
|
|
10
8
|
private readonly el;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { type OnDestroy } from '@angular/core';
|
|
2
1
|
import * as i0 from "@angular/core";
|
|
3
2
|
export declare const TUI_ENTER = "tui-enter";
|
|
4
3
|
export declare const TUI_LEAVE = "tui-leave";
|
|
5
|
-
export declare class TuiAnimated
|
|
4
|
+
export declare class TuiAnimated {
|
|
6
5
|
private readonly renderer;
|
|
7
6
|
private readonly el;
|
|
8
7
|
constructor();
|
|
9
|
-
ngOnDestroy(): void;
|
|
10
8
|
protected remove(): void;
|
|
11
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiAnimated, never>;
|
|
12
10
|
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiAnimated, "[tuiAnimated]", never, {}, {}, never, never, true, never>;
|
package/directives/index.d.ts
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
export * from '@taiga-ui/cdk/directives/active-zone';
|
|
2
2
|
export * from '@taiga-ui/cdk/directives/animated';
|
|
3
3
|
export * from '@taiga-ui/cdk/directives/auto-focus';
|
|
4
|
-
export * from '@taiga-ui/cdk/directives/click-outside';
|
|
5
4
|
export * from '@taiga-ui/cdk/directives/control';
|
|
6
5
|
export * from '@taiga-ui/cdk/directives/copy-processor';
|
|
7
|
-
export * from '@taiga-ui/cdk/directives/droppable';
|
|
8
6
|
export * from '@taiga-ui/cdk/directives/element';
|
|
9
7
|
export * from '@taiga-ui/cdk/directives/focus-trap';
|
|
10
8
|
export * from '@taiga-ui/cdk/directives/font-size';
|
|
11
9
|
export * from '@taiga-ui/cdk/directives/high-dpi';
|
|
12
10
|
export * from '@taiga-ui/cdk/directives/hovered';
|
|
13
11
|
export * from '@taiga-ui/cdk/directives/item';
|
|
14
|
-
export * from '@taiga-ui/cdk/directives/let';
|
|
15
12
|
export * from '@taiga-ui/cdk/directives/media';
|
|
16
13
|
export * from '@taiga-ui/cdk/directives/native-validator';
|
|
17
14
|
export * from '@taiga-ui/cdk/directives/obscured';
|
|
18
15
|
export * from '@taiga-ui/cdk/directives/pan';
|
|
19
16
|
export * from '@taiga-ui/cdk/directives/platform';
|
|
20
|
-
export * from '@taiga-ui/cdk/directives/repeat-times';
|
|
21
17
|
export * from '@taiga-ui/cdk/directives/resizer';
|
|
22
18
|
export * from '@taiga-ui/cdk/directives/swipe';
|
|
23
19
|
export * from '@taiga-ui/cdk/directives/transitioned';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class TuiTransitioned {
|
|
3
|
+
private readonly el;
|
|
3
4
|
constructor();
|
|
4
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiTransitioned, never>;
|
|
5
6
|
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiTransitioned, "[tuiTransitioned]", never, {}, {}, never, never, true, never>;
|
|
@@ -4,7 +4,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
|
4
4
|
import { NgControl, NgModel } from '@angular/forms';
|
|
5
5
|
import { EMPTY_FUNCTION } from '@taiga-ui/cdk/constants';
|
|
6
6
|
import { TUI_FALLBACK_VALUE } from '@taiga-ui/cdk/tokens';
|
|
7
|
-
import { tuiProvide } from '@taiga-ui/cdk/utils';
|
|
7
|
+
import { tuiProvide } from '@taiga-ui/cdk/utils/di';
|
|
8
8
|
import { identity, Subject, delay, startWith, map, filter, distinctUntilChanged, switchMap, merge, EMPTY } from 'rxjs';
|
|
9
9
|
|
|
10
10
|
class TuiValueTransformer {
|
|
@@ -94,10 +94,10 @@ class TuiControl {
|
|
|
94
94
|
this.touched.set(!!this.control.control?.touched);
|
|
95
95
|
this.cdr.markForCheck();
|
|
96
96
|
}
|
|
97
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
98
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.
|
|
97
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiControl, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
98
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiControl, isStandalone: true, inputs: { readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, pseudoInvalid: { classPropertyName: "pseudoInvalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
99
99
|
}
|
|
100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiControl, decorators: [{
|
|
101
101
|
type: Directive
|
|
102
102
|
}], ctorParameters: () => [] });
|
|
103
103
|
function tuiAsControl(control) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-classes.mjs","sources":["../../../projects/cdk/classes/value-transformer.ts","../../../projects/cdk/classes/control.ts","../../../projects/cdk/classes/validation-error.ts","../../../projects/cdk/classes/taiga-ui-cdk-classes.ts"],"sourcesContent":["import {type FactoryProvider, inject, type ProviderToken} from '@angular/core';\nimport {identity} from 'rxjs';\n\nexport abstract class TuiValueTransformer<From, To = unknown> {\n public abstract toControlValue(componentValue: From): To;\n public abstract fromControlValue(controlValue: To): From;\n}\n\nexport function tuiValueTransformerFrom<\n T extends {valueTransformer: TuiValueTransformer<unknown>},\n>(token: ProviderToken<T>): FactoryProvider {\n return {\n provide: TuiValueTransformer,\n useFactory: () => inject(token).valueTransformer,\n };\n}\n\nexport class TuiNonNullableValueTransformer<T> extends TuiValueTransformer<T | null, T> {\n private prevValue!: T;\n\n public fromControlValue(value: T): T {\n this.prevValue = value;\n\n return value;\n }\n\n public toControlValue(value: T | null): T {\n this.prevValue = value ?? this.prevValue;\n\n return this.prevValue;\n }\n}\n\nexport const TUI_IDENTITY_VALUE_TRANSFORMER: TuiValueTransformer<any, any> = {\n fromControlValue: identity,\n toControlValue: identity,\n};\n","import {\n ChangeDetectorRef,\n computed,\n Directive,\n inject,\n input,\n type Provider,\n signal,\n type Type,\n untracked,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {\n type ControlValueAccessor,\n type FormControlStatus,\n NgControl,\n NgModel,\n} from '@angular/forms';\nimport {EMPTY_FUNCTION} from '@taiga-ui/cdk/constants';\nimport {TUI_FALLBACK_VALUE} from '@taiga-ui/cdk/tokens';\nimport {tuiProvide} from '@taiga-ui/cdk/utils';\nimport {\n delay,\n distinctUntilChanged,\n EMPTY,\n filter,\n map,\n merge,\n startWith,\n Subject,\n switchMap,\n} from 'rxjs';\n\nimport {TUI_IDENTITY_VALUE_TRANSFORMER, TuiValueTransformer} from './value-transformer';\n\nconst FLAGS = {self: true, optional: true};\n\n/**\n * Basic ControlValueAccessor class to build form components upon\n */\n@Directive()\nexport abstract class TuiControl<T> implements ControlValueAccessor {\n private readonly fallback = inject(TUI_FALLBACK_VALUE, FLAGS) as T;\n private readonly refresh$ = new Subject<void>();\n private readonly internal = signal(this.fallback);\n\n protected readonly control = inject(NgControl, {self: true});\n protected readonly cdr = inject(ChangeDetectorRef);\n protected transformer =\n inject(TuiValueTransformer, FLAGS) ?? TUI_IDENTITY_VALUE_TRANSFORMER;\n\n public readonly value = computed(() => this.internal() ?? this.fallback);\n public readonly readOnly = input(false);\n public readonly pseudoInvalid = input<boolean | null>(null, {alias: 'invalid'});\n public readonly touched = signal(false);\n public readonly status = signal<FormControlStatus | undefined>(undefined);\n public readonly disabled = computed(() => this.status() === 'DISABLED');\n public readonly interactive = computed(() => !this.disabled() && !this.readOnly());\n public readonly invalid = computed(() =>\n this.pseudoInvalid() !== null\n ? !!this.pseudoInvalid() && this.interactive()\n : this.interactive() && this.touched() && this.status() === 'INVALID',\n );\n\n public readonly mode = computed(() =>\n // eslint-disable-next-line no-nested-ternary\n this.readOnly() ? 'readonly' : this.invalid() ? 'invalid' : 'valid',\n );\n\n public onTouched = EMPTY_FUNCTION;\n public onChange: (value: T) => void = EMPTY_FUNCTION;\n\n constructor() {\n this.control.valueAccessor = this;\n this.refresh$\n .pipe(\n delay(0),\n startWith(null),\n map(() => this.control.control),\n filter(Boolean),\n distinctUntilChanged(),\n switchMap((c) =>\n merge(\n c.valueChanges,\n c.statusChanges,\n (c as any).events || EMPTY,\n ).pipe(startWith(null)),\n ),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.update());\n }\n\n public registerOnChange(onChange: (value: unknown) => void): void {\n this.refresh$.next();\n\n this.onChange = (value: T) => {\n const internal = untracked(() => this.internal());\n\n if (value === internal) {\n return;\n }\n\n onChange(this.transformer.toControlValue(value));\n this.internal.set(value);\n this.update();\n };\n }\n\n public registerOnTouched(onTouched: () => void): void {\n this.onTouched = () => {\n onTouched();\n this.update();\n };\n }\n\n public setDisabledState(): void {\n this.update();\n }\n\n public writeValue(value: T | null): void {\n // TODO: https://github.com/angular/angular/issues/14988\n const safe = this.control instanceof NgModel ? this.control.model : value;\n\n this.internal.set(this.transformer.fromControlValue(safe));\n this.update();\n }\n\n private update(): void {\n this.status.set(this.control.control?.status);\n this.touched.set(!!this.control.control?.touched);\n this.cdr.markForCheck();\n }\n}\n\nexport function tuiAsControl<T>(control: Type<TuiControl<T>>): Provider {\n return tuiProvide(TuiControl, control);\n}\n","import {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\nexport class TuiValidationError<T extends Record<string, any> = Record<string, unknown>> {\n constructor(\n public readonly message: PolymorpheusContent<T>,\n public readonly context: T = {} as T,\n ) {}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAGsB,mBAAmB,CAAA;AAGxC;AAEK,SAAU,uBAAuB,CAErC,KAAuB,EAAA;IACrB,OAAO;AACH,QAAA,OAAO,EAAE,mBAAmB;QAC5B,UAAU,EAAE,MAAM,MAAM,CAAC,KAAK,CAAC,CAAC,gBAAgB;KACnD;AACL;AAEM,MAAO,8BAAkC,SAAQ,mBAAgC,CAAA;AAG5E,IAAA,gBAAgB,CAAC,KAAQ,EAAA;AAC5B,QAAA,IAAI,CAAC,SAAS,GAAG,KAAK;AAEtB,QAAA,OAAO,KAAK;;AAG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EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAV,UAAU,EAAA,YAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,aAAA,EAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAV,UAAU,EAAA,UAAA,EAAA,CAAA;kBAD/B;;AA+FK,SAAU,YAAY,CAAI,OAA4B,EAAA;AACxD,IAAA,OAAO,UAAU,CAAC,UAAU,EAAE,OAAO,CAAC;AAC1C;;MCvIa,kBAAkB,CAAA;IAC3B,WACoB,CAAA,OAA+B,EAC/B,OAAA,GAAa,EAAO,EAAA;QADpB,IAAO,CAAA,OAAA,GAAP,OAAO;QACP,IAAO,CAAA,OAAA,GAAP,OAAO;;AAE9B;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-classes.mjs","sources":["../../../projects/cdk/classes/value-transformer.ts","../../../projects/cdk/classes/control.ts","../../../projects/cdk/classes/validation-error.ts","../../../projects/cdk/classes/taiga-ui-cdk-classes.ts"],"sourcesContent":["import {type FactoryProvider, inject, type ProviderToken} from '@angular/core';\nimport {identity} from 'rxjs';\n\nexport abstract class TuiValueTransformer<From, To = unknown> {\n public abstract toControlValue(componentValue: From): To;\n public abstract fromControlValue(controlValue: To): From;\n}\n\nexport function tuiValueTransformerFrom<\n T extends {valueTransformer: TuiValueTransformer<unknown>},\n>(token: ProviderToken<T>): FactoryProvider {\n return {\n provide: TuiValueTransformer,\n useFactory: () => inject(token).valueTransformer,\n };\n}\n\nexport class TuiNonNullableValueTransformer<T> extends TuiValueTransformer<T | null, T> {\n private prevValue!: T;\n\n public fromControlValue(value: T): T {\n this.prevValue = value;\n\n return value;\n }\n\n public toControlValue(value: T | null): T {\n this.prevValue = value ?? this.prevValue;\n\n return this.prevValue;\n }\n}\n\nexport const TUI_IDENTITY_VALUE_TRANSFORMER: TuiValueTransformer<any, any> = {\n fromControlValue: identity,\n toControlValue: identity,\n};\n","import {\n ChangeDetectorRef,\n computed,\n Directive,\n inject,\n input,\n type Provider,\n signal,\n type Type,\n untracked,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {\n type ControlValueAccessor,\n type FormControlStatus,\n NgControl,\n NgModel,\n} from '@angular/forms';\nimport {EMPTY_FUNCTION} from '@taiga-ui/cdk/constants';\nimport {TUI_FALLBACK_VALUE} from '@taiga-ui/cdk/tokens';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/di';\nimport {\n delay,\n distinctUntilChanged,\n EMPTY,\n filter,\n map,\n merge,\n startWith,\n Subject,\n switchMap,\n} from 'rxjs';\n\nimport {TUI_IDENTITY_VALUE_TRANSFORMER, TuiValueTransformer} from './value-transformer';\n\nconst FLAGS = {self: true, optional: true};\n\n/**\n * Basic ControlValueAccessor class to build form components upon\n */\n@Directive()\nexport abstract class TuiControl<T> implements ControlValueAccessor {\n private readonly fallback = inject(TUI_FALLBACK_VALUE, FLAGS) as T;\n private readonly refresh$ = new Subject<void>();\n private readonly internal = signal(this.fallback);\n\n protected readonly control = inject(NgControl, {self: true});\n protected readonly cdr = inject(ChangeDetectorRef);\n protected transformer =\n inject(TuiValueTransformer, FLAGS) ?? TUI_IDENTITY_VALUE_TRANSFORMER;\n\n public readonly value = computed(() => this.internal() ?? this.fallback);\n public readonly readOnly = input(false);\n public readonly pseudoInvalid = input<boolean | null>(null, {alias: 'invalid'});\n public readonly touched = signal(false);\n public readonly status = signal<FormControlStatus | undefined>(undefined);\n public readonly disabled = computed(() => this.status() === 'DISABLED');\n public readonly interactive = computed(() => !this.disabled() && !this.readOnly());\n public readonly invalid = computed(() =>\n this.pseudoInvalid() !== null\n ? !!this.pseudoInvalid() && this.interactive()\n : this.interactive() && this.touched() && this.status() === 'INVALID',\n );\n\n public readonly mode = computed(() =>\n // eslint-disable-next-line no-nested-ternary\n this.readOnly() ? 'readonly' : this.invalid() ? 'invalid' : 'valid',\n );\n\n public onTouched = EMPTY_FUNCTION;\n public onChange: (value: T) => void = EMPTY_FUNCTION;\n\n constructor() {\n this.control.valueAccessor = this;\n this.refresh$\n .pipe(\n delay(0),\n startWith(null),\n map(() => this.control.control),\n filter(Boolean),\n distinctUntilChanged(),\n switchMap((c) =>\n merge(\n c.valueChanges,\n c.statusChanges,\n (c as any).events || EMPTY,\n ).pipe(startWith(null)),\n ),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.update());\n }\n\n public registerOnChange(onChange: (value: unknown) => void): void {\n this.refresh$.next();\n\n this.onChange = (value: T) => {\n const internal = untracked(() => this.internal());\n\n if (value === internal) {\n return;\n }\n\n onChange(this.transformer.toControlValue(value));\n this.internal.set(value);\n this.update();\n };\n }\n\n public registerOnTouched(onTouched: () => void): void {\n this.onTouched = () => {\n onTouched();\n this.update();\n };\n }\n\n public setDisabledState(): void {\n this.update();\n }\n\n public writeValue(value: T | null): void {\n // TODO: https://github.com/angular/angular/issues/14988\n const safe = this.control instanceof NgModel ? this.control.model : value;\n\n this.internal.set(this.transformer.fromControlValue(safe));\n this.update();\n }\n\n private update(): void {\n this.status.set(this.control.control?.status);\n this.touched.set(!!this.control.control?.touched);\n this.cdr.markForCheck();\n }\n}\n\nexport function tuiAsControl<T>(control: Type<TuiControl<T>>): Provider {\n return tuiProvide(TuiControl, control);\n}\n","import {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\nexport class TuiValidationError<T extends Record<string, any> = Record<string, unknown>> {\n constructor(\n public readonly message: PolymorpheusContent<T>,\n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AAEG;;;;"}
|
|
@@ -139,7 +139,7 @@ const CHAR_ZERO_WIDTH_SPACE = '\u200B';
|
|
|
139
139
|
* @description:
|
|
140
140
|
* AUTOGENERATED
|
|
141
141
|
*
|
|
142
|
-
* Array of icons used in
|
|
142
|
+
* Array of icons used in ./projects
|
|
143
143
|
*/
|
|
144
144
|
const TUI_USED_ICONS = [
|
|
145
145
|
'@tui.mir',
|
|
@@ -193,16 +193,16 @@ const TUI_USED_ICONS = [
|
|
|
193
193
|
'@tui.plus',
|
|
194
194
|
'@tui.heart',
|
|
195
195
|
'@tui.heart-filled',
|
|
196
|
-
'@tui.star',
|
|
197
196
|
'@tui.rotate-ccw-square',
|
|
198
197
|
'@tui.arrow-left',
|
|
199
198
|
'@tui.arrow-right',
|
|
200
199
|
'@tui.minimize',
|
|
200
|
+
'@tui.star',
|
|
201
201
|
'@tui.filter',
|
|
202
202
|
'@tui.layout-grid',
|
|
203
203
|
];
|
|
204
204
|
|
|
205
|
-
const TUI_VERSION = '4.52.0-canary.
|
|
205
|
+
const TUI_VERSION = '4.52.0-canary.efbd0d4';
|
|
206
206
|
|
|
207
207
|
/**
|
|
208
208
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-constants.mjs","sources":["../../../projects/cdk/constants/empty.ts","../../../projects/cdk/constants/handlers.ts","../../../projects/cdk/constants/matchers.ts","../../../projects/cdk/constants/regexp.ts","../../../projects/cdk/constants/svg-node-filter.ts","../../../projects/cdk/constants/unicode-chars.ts","../../../projects/cdk/constants/used-icons.ts","../../../projects/cdk/constants/version.ts","../../../projects/cdk/constants/taiga-ui-cdk-constants.ts"],"sourcesContent":["import {QueryList} from '@angular/core';\n\nconst rect = {\n bottom: 0,\n height: 0,\n left: 0,\n right: 0,\n top: 0,\n width: 0,\n x: 0,\n y: 0,\n} as const;\n\n/**\n * For type safety when using @ContentChildren and @ViewChildren\n *\n * NOTE: Be careful subscribing to 'changes'\n * @deprecated use viewChild(), viewChildren(), contentChild() and contentChildren() for strict type checking\n */\nexport const EMPTY_QUERY = new QueryList<any>();\nexport const EMPTY_ARRAY: [] = [];\nexport const EMPTY_FUNCTION: (...args: any[]) => void = () => {};\nexport const EMPTY_CLIENT_RECT: DOMRect = {\n ...rect,\n toJSON: () => rect,\n};\n","/**\n * Handler that always returns `false`.\n */\nexport const TUI_FALSE_HANDLER = (): false => false;\n\n/**\n * Handler that always returns `true`.\n */\nexport const TUI_TRUE_HANDLER = (): true => true;\n","import {type TuiHandler, type TuiIdentityMatcher} from '@taiga-ui/cdk/types';\n\nfunction bothEmpty(item1: unknown, item2: unknown): boolean {\n return Array.isArray(item1) && Array.isArray(item2) && !item1.length && !item2.length;\n}\n\n/**\n * Default handler for matching stringified version of an item and a search query\n * @param item arbitrary element to match with a string\n * @param search search query\n * @param stringify handler to turn item into a string\n */\nexport const TUI_DEFAULT_MATCHER = <T>(\n item: T,\n search: string,\n stringify: TuiHandler<T, string> = String,\n): boolean => stringify(item).toLowerCase().includes(search.toLowerCase());\n\n/**\n * Default handler for strict matching stringified version of an item and a search query\n * @param item arbitrary element to match with a string\n * @param search search query\n * @param stringify handler to turn item into a string\n */\nexport const TUI_STRICT_MATCHER = <T>(\n item: T,\n search: string,\n stringify: TuiHandler<T, string> = String,\n): boolean => stringify(item).toLowerCase() === search.toLowerCase();\n\n/**\n * Default handler to match equality of two elements\n * ATTENTION: considers two empty arrays equal\n *\n * @param item1 first element\n * @param item2 second element\n */\nexport const TUI_DEFAULT_IDENTITY_MATCHER: TuiIdentityMatcher<unknown> = (item1, item2) =>\n item1 === item2 || bothEmpty(item1, item2);\n","export const TUI_DIGIT_REGEXP = /\\d/;\nexport const TUI_NON_DIGIT_REGEXP = /\\D/;\nexport const TUI_NON_DIGITS_REGEXP = /\\D+/g;\n","export const svgNodeFilter: Exclude<NodeFilter, (node: Node) => number> = {\n acceptNode(node: Node): number {\n return 'ownerSVGElement' in node\n ? NodeFilter.FILTER_REJECT\n : NodeFilter.FILTER_ACCEPT;\n },\n};\n","/**\n * {@link https://unicode-table.com/en/00A0/ Non-breaking space}.\n */\nexport const CHAR_NO_BREAK_SPACE = '\\u00A0';\n\n/**\n * {@link https://unicode-table.com/en/2013/ EN dash}\n * is used to indicate a range of numbers or a span of time.\n * @example 2006–2022\n * ___\n * Don't confuse with {@link CHAR_EM_DASH} or {@link CHAR_HYPHEN}!\n */\nexport const CHAR_EN_DASH = '\\u2013';\n\n/**\n * {@link https://unicode-table.com/en/2014/ EM dash}\n * is used to mark a break in a sentence.\n * @example Taiga UI — powerful set of open source components for Angular\n * ___\n * Don't confuse with {@link CHAR_EN_DASH} or {@link CHAR_HYPHEN}!\n */\nexport const CHAR_EM_DASH = '\\u2014';\n\n/**\n * {@link https://unicode-table.com/en/00AB/ Left-Pointing Double Angle Quotation Mark}\n */\nexport const CHAR_LAQUO = '\\u00AB';\n\n/**\n * {@link https://unicode-table.com/en/00BB/ Right-Pointing Double Angle Quotation Mark}\n */\nexport const CHAR_RAQUO = '\\u00BB';\n\n/**\n * {@link https://unicode-table.com/en/002D/ Hyphen (minus sign)}\n * is used to combine words.\n * @example well-behaved\n * ___\n * Don't confuse with {@link CHAR_EN_DASH} or {@link CHAR_EM_DASH}!\n */\nexport const CHAR_HYPHEN = '\\u002D';\n\n/**\n * {@link https://unicode-table.com/en/2212/ Minus}\n * is used as math operator symbol or before negative digits.\n * ---\n * Can be used as `−`. Don't confuse with {@link CHAR_HYPHEN}\n */\nexport const CHAR_MINUS = '\\u2212';\n\n/**\n * {@link https://unicode-table.com/en/002B/ Plus}\n */\nexport const CHAR_PLUS = '\\u002B';\n\n/**\n * {@link https://unicode-table.com/en/2022/ Bullet}.\n */\nexport const CHAR_BULLET = '\\u2022';\n\n/**\n * {@link https://unicode-table.com/en/2026/ Suspension points}.\n */\nexport const CHAR_ELLIPSIS = '\\u2026';\n\n/**\n * {@link https://unicode-table.com/en/00A4/ Suspension points}.\n */\nexport const CHAR_CURRENCY_SIGN = '\\u00A4';\n\n/**\n * {@link https://unicode-table.com/en/200b/ Suspension points}.\n */\nexport const CHAR_ZERO_WIDTH_SPACE = '\\u200B';\n","/**\n * @description:\n * AUTOGENERATED\n *\n * Array of icons used in
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-constants.mjs","sources":["../../../projects/cdk/constants/empty.ts","../../../projects/cdk/constants/handlers.ts","../../../projects/cdk/constants/matchers.ts","../../../projects/cdk/constants/regexp.ts","../../../projects/cdk/constants/svg-node-filter.ts","../../../projects/cdk/constants/unicode-chars.ts","../../../projects/cdk/constants/used-icons.ts","../../../projects/cdk/constants/version.ts","../../../projects/cdk/constants/taiga-ui-cdk-constants.ts"],"sourcesContent":["import {QueryList} from '@angular/core';\n\nconst rect = {\n bottom: 0,\n height: 0,\n left: 0,\n right: 0,\n top: 0,\n width: 0,\n x: 0,\n y: 0,\n} as const;\n\n/**\n * For type safety when using @ContentChildren and @ViewChildren\n *\n * NOTE: Be careful subscribing to 'changes'\n * @deprecated use viewChild(), viewChildren(), contentChild() and contentChildren() for strict type checking\n */\nexport const EMPTY_QUERY = new QueryList<any>();\nexport const EMPTY_ARRAY: [] = [];\nexport const EMPTY_FUNCTION: (...args: any[]) => void = () => {};\nexport const EMPTY_CLIENT_RECT: DOMRect = {\n ...rect,\n toJSON: () => rect,\n};\n","/**\n * Handler that always returns `false`.\n */\nexport const TUI_FALSE_HANDLER = (): false => false;\n\n/**\n * Handler that always returns `true`.\n */\nexport const TUI_TRUE_HANDLER = (): true => true;\n","import {type TuiHandler, type TuiIdentityMatcher} from '@taiga-ui/cdk/types';\n\nfunction bothEmpty(item1: unknown, item2: unknown): boolean {\n return Array.isArray(item1) && Array.isArray(item2) && !item1.length && !item2.length;\n}\n\n/**\n * Default handler for matching stringified version of an item and a search query\n * @param item arbitrary element to match with a string\n * @param search search query\n * @param stringify handler to turn item into a string\n */\nexport const TUI_DEFAULT_MATCHER = <T>(\n item: T,\n search: string,\n stringify: TuiHandler<T, string> = String,\n): boolean => stringify(item).toLowerCase().includes(search.toLowerCase());\n\n/**\n * Default handler for strict matching stringified version of an item and a search query\n * @param item arbitrary element to match with a string\n * @param search search query\n * @param stringify handler to turn item into a string\n */\nexport const TUI_STRICT_MATCHER = <T>(\n item: T,\n search: string,\n stringify: TuiHandler<T, string> = String,\n): boolean => stringify(item).toLowerCase() === search.toLowerCase();\n\n/**\n * Default handler to match equality of two elements\n * ATTENTION: considers two empty arrays equal\n *\n * @param item1 first element\n * @param item2 second element\n */\nexport const TUI_DEFAULT_IDENTITY_MATCHER: TuiIdentityMatcher<unknown> = (item1, item2) =>\n item1 === item2 || bothEmpty(item1, item2);\n","export const TUI_DIGIT_REGEXP = /\\d/;\nexport const TUI_NON_DIGIT_REGEXP = /\\D/;\nexport const TUI_NON_DIGITS_REGEXP = /\\D+/g;\n","export const svgNodeFilter: Exclude<NodeFilter, (node: Node) => number> = {\n acceptNode(node: Node): number {\n return 'ownerSVGElement' in node\n ? NodeFilter.FILTER_REJECT\n : NodeFilter.FILTER_ACCEPT;\n },\n};\n","/**\n * {@link https://unicode-table.com/en/00A0/ Non-breaking space}.\n */\nexport const CHAR_NO_BREAK_SPACE = '\\u00A0';\n\n/**\n * {@link https://unicode-table.com/en/2013/ EN dash}\n * is used to indicate a range of numbers or a span of time.\n * @example 2006–2022\n * ___\n * Don't confuse with {@link CHAR_EM_DASH} or {@link CHAR_HYPHEN}!\n */\nexport const CHAR_EN_DASH = '\\u2013';\n\n/**\n * {@link https://unicode-table.com/en/2014/ EM dash}\n * is used to mark a break in a sentence.\n * @example Taiga UI — powerful set of open source components for Angular\n * ___\n * Don't confuse with {@link CHAR_EN_DASH} or {@link CHAR_HYPHEN}!\n */\nexport const CHAR_EM_DASH = '\\u2014';\n\n/**\n * {@link https://unicode-table.com/en/00AB/ Left-Pointing Double Angle Quotation Mark}\n */\nexport const CHAR_LAQUO = '\\u00AB';\n\n/**\n * {@link https://unicode-table.com/en/00BB/ Right-Pointing Double Angle Quotation Mark}\n */\nexport const CHAR_RAQUO = '\\u00BB';\n\n/**\n * {@link https://unicode-table.com/en/002D/ Hyphen (minus sign)}\n * is used to combine words.\n * @example well-behaved\n * ___\n * Don't confuse with {@link CHAR_EN_DASH} or {@link CHAR_EM_DASH}!\n */\nexport const CHAR_HYPHEN = '\\u002D';\n\n/**\n * {@link https://unicode-table.com/en/2212/ Minus}\n * is used as math operator symbol or before negative digits.\n * ---\n * Can be used as `−`. Don't confuse with {@link CHAR_HYPHEN}\n */\nexport const CHAR_MINUS = '\\u2212';\n\n/**\n * {@link https://unicode-table.com/en/002B/ Plus}\n */\nexport const CHAR_PLUS = '\\u002B';\n\n/**\n * {@link https://unicode-table.com/en/2022/ Bullet}.\n */\nexport const CHAR_BULLET = '\\u2022';\n\n/**\n * {@link https://unicode-table.com/en/2026/ Suspension points}.\n */\nexport const CHAR_ELLIPSIS = '\\u2026';\n\n/**\n * {@link https://unicode-table.com/en/00A4/ Suspension points}.\n */\nexport const CHAR_CURRENCY_SIGN = '\\u00A4';\n\n/**\n * {@link https://unicode-table.com/en/200b/ Suspension points}.\n */\nexport const CHAR_ZERO_WIDTH_SPACE = '\\u200B';\n","/**\n * @description:\n * AUTOGENERATED\n *\n * Array of icons used in ./projects\n */\nexport const TUI_USED_ICONS = [\n '@tui.mir',\n '@tui.visa',\n '@tui.electron',\n '@img.mastercard',\n '@img.maestro',\n '@img.amex',\n '@img.diners-club',\n '@img.discover',\n '@img.humo',\n '@img.jcb',\n '@img.ru-pay',\n '@img.union-pay',\n '@img.uzcard',\n '@img.verve',\n '@tui.search',\n '@tui.sun',\n '@tui.moon',\n '@tui.code',\n '@tui.menu',\n '@tui.copy',\n '@tui.check',\n '@tui.link',\n '@tui.external-link',\n '@tui.languages',\n '@tui.shrink',\n '@tui.expand',\n '@tui.a-large-small',\n '@tui.arrow-right-left',\n '@tui.eye-off',\n '@tui.eye',\n '@tui.grip-vertical',\n '@tui.chevron-up',\n '@tui.chevron-down',\n '@tui.chevrons-up-down',\n '@tui.info',\n '@tui.circle-check',\n '@tui.circle-x',\n '@tui.circle-alert',\n '@tui.circle-help',\n '@tui.x',\n '@tui.chevron-right',\n '@tui.ellipsis',\n '@tui.chevron-left',\n '@tui.clock',\n '@tui.trash',\n '@tui.minus',\n '@tui.file',\n '@tui.calendar',\n '@tui.plus',\n '@tui.heart',\n '@tui.heart-filled',\n '@tui.rotate-ccw-square',\n '@tui.arrow-left',\n '@tui.arrow-right',\n '@tui.minimize',\n '@tui.star',\n '@tui.filter',\n '@tui.layout-grid',\n] as const;\n","export const TUI_VERSION = '4.52.0-canary.efbd0d4';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAEA,MAAM,IAAI,GAAG;AACT,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,IAAI,EAAE,CAAC;AACP,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,GAAG,EAAE,CAAC;AACN,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,CAAC,EAAE,CAAC;AACJ,IAAA,CAAC,EAAE,CAAC;CACE;AAEV;;;;;AAKG;AACU,MAAA,WAAW,GAAG,IAAI,SAAS;AACjC,MAAM,WAAW,GAAO;MAClB,cAAc,GAA6B,MAAK;AAChD,MAAA,iBAAiB,GAAY;AACtC,IAAA,GAAG,IAAI;AACP,IAAA,MAAM,EAAE,MAAM,IAAI;;;ACxBtB;;AAEG;MACU,iBAAiB,GAAG,MAAa;AAE9C;;AAEG;MACU,gBAAgB,GAAG,MAAY;;ACN5C,SAAS,SAAS,CAAC,KAAc,EAAE,KAAc,EAAA;IAC7C,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM;AACzF;AAEA;;;;;AAKG;AACI,MAAM,mBAAmB,GAAG,CAC/B,IAAO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X,kBAAkB;IAClB,eAAe;IACf,WAAW;IACX,UAAU;IACV,aAAa;IACb,gBAAgB;IAChB,aAAa;IACb,YAAY;IACZ,aAAa;IACb,UAAU;IACV,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,YAAY;IACZ,WAAW;IACX,oBAAoB;IACpB,gBAAgB;IAChB,aAAa;IACb,aAAa;IACb,oBAAoB;IACpB,uBAAuB;IACvB,cAAc;IACd,UAAU;IACV,oBAAoB;IACpB,iBAAiB;IACjB,mBAAmB;IACnB,uBAAuB;IACvB,WAAW;IACX,mBAAmB;IACnB,eAAe;IACf,mBAAmB;IACnB,kBAAkB;IAClB,QAAQ;IACR,oBAAoB;IACpB,eAAe;IACf,mBAAmB;IACnB,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,eAAe;IACf,WAAW;IACX,YAAY;IACZ,mBAAmB;IACnB,wBAAwB;IACxB,iBAAiB;IACjB,kBAAkB;IAClB,eAAe;IACf,WAAW;IACX,aAAa;IACb,kBAAkB;;;AChEf,MAAM,WAAW,GAAG;;ACA3B;;AAEG;;;;"}
|
|
@@ -31,16 +31,16 @@ const MILLISECONDS_IN_HOUR = MILLISECONDS_IN_MINUTE * MINUTES_IN_HOUR;
|
|
|
31
31
|
const MILLISECONDS_IN_DAY = MILLISECONDS_IN_HOUR * HOURS_IN_DAY;
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
|
-
* @internal 'dd
|
|
34
|
+
* @internal 'dd/mm/yyyy'.length
|
|
35
35
|
* Used in:
|
|
36
|
-
* - {@link
|
|
37
|
-
* - {@link
|
|
38
|
-
* - {@link
|
|
36
|
+
* - {@link TuiInputDate}
|
|
37
|
+
* - {@link TuiInputDateRange}
|
|
38
|
+
* - {@link TuiInputDateTime}
|
|
39
39
|
*/
|
|
40
40
|
const DATE_FILLER_LENGTH = 10;
|
|
41
41
|
/**
|
|
42
42
|
* @internal
|
|
43
|
-
* Used in {@link
|
|
43
|
+
* Used in {@link TuiInputDateRange}
|
|
44
44
|
*/
|
|
45
45
|
const DATE_RANGE_FILLER_LENGTH = 2 * DATE_FILLER_LENGTH + RANGE_SEPARATOR_CHAR.length;
|
|
46
46
|
|
|
@@ -404,23 +404,23 @@ class TuiDay extends TuiMonth {
|
|
|
404
404
|
return Math.round((to.toLocalNativeDate().getTime() - from.toLocalNativeDate().getTime()) /
|
|
405
405
|
(1000 * 60 * 60 * 24));
|
|
406
406
|
}
|
|
407
|
-
static parseRawDateString(date, dateMode = '
|
|
407
|
+
static parseRawDateString(date, dateMode = 'dd/mm/yyyy') {
|
|
408
408
|
ngDevMode &&
|
|
409
409
|
console.assert(date.length === DATE_FILLER_LENGTH, '[parseRawDateString]: wrong date string length');
|
|
410
410
|
switch (dateMode) {
|
|
411
|
-
case '
|
|
411
|
+
case 'mm/dd/yyyy':
|
|
412
412
|
return {
|
|
413
413
|
day: parseInt(date.slice(3, 5), 10),
|
|
414
414
|
month: parseInt(date.slice(0, 2), 10) - 1,
|
|
415
415
|
year: parseInt(date.slice(6, 10), 10),
|
|
416
416
|
};
|
|
417
|
-
case '
|
|
417
|
+
case 'yyyy/mm/dd':
|
|
418
418
|
return {
|
|
419
419
|
day: parseInt(date.slice(8, 10), 10),
|
|
420
420
|
month: parseInt(date.slice(5, 7), 10) - 1,
|
|
421
421
|
year: parseInt(date.slice(0, 4), 10),
|
|
422
422
|
};
|
|
423
|
-
case '
|
|
423
|
+
case 'dd/mm/yyyy':
|
|
424
424
|
default:
|
|
425
425
|
return {
|
|
426
426
|
day: parseInt(date.slice(0, 2), 10),
|
|
@@ -434,21 +434,21 @@ class TuiDay extends TuiMonth {
|
|
|
434
434
|
* Parsing a string with date with normalization
|
|
435
435
|
*
|
|
436
436
|
* @param rawDate date string
|
|
437
|
-
* @param dateMode date format of the date string (
|
|
437
|
+
* @param dateMode date format of the date string (dd/mm/yyyy | mm/dd/yyyy | yyyy/mm/dd)
|
|
438
438
|
* @return normalized date
|
|
439
439
|
*/
|
|
440
|
-
static normalizeParse(rawDate, dateMode = '
|
|
440
|
+
static normalizeParse(rawDate, dateMode = 'dd/mm/yyyy') {
|
|
441
441
|
const { day, month, year } = this.parseRawDateString(rawDate, dateMode);
|
|
442
442
|
return TuiDay.normalizeOf(year, month, day);
|
|
443
443
|
}
|
|
444
444
|
/**
|
|
445
445
|
* Parsing a date stringified in a toJSON format
|
|
446
|
-
* @param
|
|
446
|
+
* @param ymdString date string in format of YYYY-MM-DD
|
|
447
447
|
* @return date
|
|
448
448
|
* @throws exceptions if any part of the date is invalid
|
|
449
449
|
*/
|
|
450
|
-
static jsonParse(
|
|
451
|
-
const { day, month, year } = this.parseRawDateString(
|
|
450
|
+
static jsonParse(ymdString) {
|
|
451
|
+
const { day, month, year } = this.parseRawDateString(ymdString, 'yyyy/mm/dd');
|
|
452
452
|
if (!TuiMonth.isValidMonth(year, month) ||
|
|
453
453
|
!Number.isInteger(day) ||
|
|
454
454
|
!tuiInRange(day, MIN_DAY, TuiMonth.getMonthDaysCount(month, TuiYear.isLeapYear(year)) + 1)) {
|
|
@@ -589,16 +589,16 @@ class TuiDay extends TuiMonth {
|
|
|
589
589
|
const mm = this.formattedMonthPart;
|
|
590
590
|
const yyyy = this.formattedYear;
|
|
591
591
|
switch (dateFormat) {
|
|
592
|
-
case '
|
|
592
|
+
case 'mm/dd/yyyy':
|
|
593
593
|
return `${mm}${separator}${dd}${separator}${yyyy}`;
|
|
594
|
-
case '
|
|
594
|
+
case 'yyyy/mm/dd':
|
|
595
595
|
return `${yyyy}${separator}${mm}${separator}${dd}`;
|
|
596
|
-
case '
|
|
596
|
+
case 'dd/mm/yyyy':
|
|
597
597
|
default:
|
|
598
598
|
return `${dd}${separator}${mm}${separator}${yyyy}`;
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
|
-
toString(dateFormat = '
|
|
601
|
+
toString(dateFormat = 'dd/mm/yyyy', separator = '.') {
|
|
602
602
|
return this.getFormattedDay(dateFormat, separator);
|
|
603
603
|
}
|
|
604
604
|
toJSON() {
|
|
@@ -677,11 +677,11 @@ class TuiDayRange extends TuiMonthRange {
|
|
|
677
677
|
/**
|
|
678
678
|
* Parse and correct a day range in string format
|
|
679
679
|
*
|
|
680
|
-
* @param rangeString a string of dates in a format dd
|
|
680
|
+
* @param rangeString a string of dates in a format dd/mm/yyyy - dd/mm/yyyy
|
|
681
681
|
* @param dateMode {@link TuiDateMode}
|
|
682
682
|
* @return normalized day range object
|
|
683
683
|
*/
|
|
684
|
-
static normalizeParse(rangeString, dateMode = '
|
|
684
|
+
static normalizeParse(rangeString, dateMode = 'dd/mm/yyyy') {
|
|
685
685
|
const leftDay = TuiDay.normalizeParse(rangeString.slice(0, DATE_FILLER_LENGTH), dateMode);
|
|
686
686
|
if (rangeString.length < DATE_RANGE_FILLER_LENGTH) {
|
|
687
687
|
return new TuiDayRange(leftDay, leftDay);
|
|
@@ -718,7 +718,7 @@ class TuiDayRange extends TuiMonthRange {
|
|
|
718
718
|
const to = this.to.getFormattedDay(dateFormat, dateSeparator);
|
|
719
719
|
return `${from}${RANGE_SEPARATOR_CHAR}${to}`;
|
|
720
720
|
}
|
|
721
|
-
toString(dateFormat = '
|
|
721
|
+
toString(dateFormat = 'dd/mm/yyyy', dateSeparator = '.') {
|
|
722
722
|
return this.getFormattedDayRange(dateFormat, dateSeparator);
|
|
723
723
|
}
|
|
724
724
|
toArray() {
|
|
@@ -789,9 +789,8 @@ class TuiTime {
|
|
|
789
789
|
* Calculates TuiTime from milliseconds
|
|
790
790
|
*/
|
|
791
791
|
static fromAbsoluteMilliseconds(milliseconds) {
|
|
792
|
-
ngDevMode && console.assert(Number.isInteger(milliseconds));
|
|
793
792
|
ngDevMode &&
|
|
794
|
-
console.assert(
|
|
793
|
+
console.assert(Number.isInteger(milliseconds) && milliseconds >= 0, 'Milliseconds must be a non-negative integer.');
|
|
795
794
|
const hours = Math.floor(milliseconds / MILLISECONDS_IN_HOUR);
|
|
796
795
|
const minutes = Math.floor((milliseconds % MILLISECONDS_IN_HOUR) / MILLISECONDS_IN_MINUTE);
|
|
797
796
|
const seconds = Math.floor(((milliseconds % MILLISECONDS_IN_HOUR) % MILLISECONDS_IN_MINUTE) / 1000) || 0;
|