@taiga-ui/cdk 4.52.0-canary.6c67ccf → 4.52.0-canary.6de148b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/classes/control.d.ts +4 -6
- package/classes/index.d.ts +0 -1
- package/constants/index.d.ts +0 -1
- 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 +4 -4
- package/date-time/time.d.ts +2 -2
- package/date-time/types.d.ts +1 -12
- package/directives/active-zone/active-zone.directive.d.ts +4 -5
- package/directives/animated/animated.directive.d.ts +0 -1
- package/directives/auto-focus/autofocus.directive.d.ts +2 -3
- package/directives/auto-focus/autofocus.options.d.ts +2 -2
- package/directives/copy-processor/copy-processor.directive.d.ts +2 -2
- package/directives/hovered/hovered.directive.d.ts +1 -2
- package/directives/index.d.ts +1 -5
- package/directives/media/media.directive.d.ts +8 -12
- package/directives/native-validator/native-validator.directive.d.ts +2 -2
- package/directives/obscured/obscured.directive.d.ts +4 -4
- package/directives/pan/pan.directive.d.ts +1 -2
- package/directives/platform/platform.directive.d.ts +2 -2
- package/directives/resizer/resizer.directive.d.ts +3 -4
- package/directives/swipe/swipe.directive.d.ts +1 -2
- package/directives/transitioned/transitioned.directive.d.ts +1 -0
- package/directives/value-changes/value-changes.directive.d.ts +2 -2
- package/directives/with-styles/index.d.ts +1 -0
- package/directives/with-styles/with-styles.directive.d.ts +10 -0
- package/fesm2022/taiga-ui-cdk-classes.mjs +6 -89
- package/fesm2022/taiga-ui-cdk-classes.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-constants.mjs +15 -17
- package/fesm2022/taiga-ui-cdk-constants.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-date-time.mjs +35 -23
- package/fesm2022/taiga-ui-cdk-date-time.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-active-zone.mjs +26 -35
- package/fesm2022/taiga-ui-cdk-directives-active-zone.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-animated.mjs +39 -40
- package/fesm2022/taiga-ui-cdk-directives-animated.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-auto-focus.mjs +8 -11
- package/fesm2022/taiga-ui-cdk-directives-auto-focus.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-control.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-directives-control.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-copy-processor.mjs +5 -8
- package/fesm2022/taiga-ui-cdk-directives-copy-processor.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-element.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-directives-element.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-focus-trap.mjs +10 -21
- package/fesm2022/taiga-ui-cdk-directives-focus-trap.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-font-size.mjs +1 -4
- package/fesm2022/taiga-ui-cdk-directives-font-size.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-high-dpi.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-directives-high-dpi.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-hovered.mjs +4 -7
- package/fesm2022/taiga-ui-cdk-directives-hovered.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-item.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-directives-item.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-media.mjs +30 -55
- package/fesm2022/taiga-ui-cdk-directives-media.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-native-validator.mjs +5 -8
- package/fesm2022/taiga-ui-cdk-directives-native-validator.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-obscured.mjs +8 -14
- package/fesm2022/taiga-ui-cdk-directives-obscured.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-pan.mjs +4 -6
- package/fesm2022/taiga-ui-cdk-directives-pan.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-platform.mjs +7 -10
- package/fesm2022/taiga-ui-cdk-directives-platform.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-resizer.mjs +14 -18
- package/fesm2022/taiga-ui-cdk-directives-resizer.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-swipe.mjs +4 -6
- package/fesm2022/taiga-ui-cdk-directives-swipe.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-transitioned.mjs +4 -11
- package/fesm2022/taiga-ui-cdk-directives-transitioned.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-validator.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-directives-validator.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-value-changes.mjs +5 -6
- package/fesm2022/taiga-ui-cdk-directives-value-changes.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-visual-viewport.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-directives-visual-viewport.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-with-styles.mjs +29 -0
- package/fesm2022/taiga-ui-cdk-directives-with-styles.mjs.map +1 -0
- package/fesm2022/taiga-ui-cdk-directives-zoom.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-directives-zoom.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives.mjs +1 -5
- package/fesm2022/taiga-ui-cdk-directives.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-observables.mjs +10 -28
- package/fesm2022/taiga-ui-cdk-observables.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-pipes-filter.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-filter.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-pipes-mapper.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-mapper.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-pipes-obfuscate.mjs +2 -2
- 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 +126 -0
- package/fesm2022/taiga-ui-cdk-portals.mjs.map +1 -0
- package/fesm2022/taiga-ui-cdk-tokens.mjs +19 -52
- package/fesm2022/taiga-ui-cdk-tokens.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils-browser.mjs +3 -26
- package/fesm2022/taiga-ui-cdk-utils-browser.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils-di.mjs +46 -6
- package/fesm2022/taiga-ui-cdk-utils-di.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils-dom.mjs +16 -96
- package/fesm2022/taiga-ui-cdk-utils-dom.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils-focus.mjs +27 -44
- 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 -125
- 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 +1 -1
- package/index.d.ts +1 -1
- package/observables/index.d.ts +0 -2
- package/package.json +21 -63
- package/pipes/index.d.ts +0 -6
- package/pipes/obfuscate/obfuscate.options.d.ts +2 -2
- package/portals/directive.d.ts +11 -0
- package/portals/index.d.ts +4 -0
- package/portals/portal.d.ts +24 -0
- package/portals/portals.d.ts +12 -0
- package/portals/service.d.ts +15 -0
- package/schematics/collection.json +2 -1
- package/schematics/migrate-tui-let/index.js +4 -3
- package/schematics/migrate-tui-let/index.js.map +1 -1
- package/schematics/migrate-tui-let/schema.json +7 -0
- package/schematics/ng-add/constants/versions.d.ts +1 -1
- package/schematics/ng-update/interfaces/html-comment.d.ts +1 -1
- package/schematics/ng-update/interfaces/removable-input.d.ts +1 -1
- package/schematics/ng-update/interfaces/replacement-attribute-to-directive.d.ts +1 -1
- package/schematics/ng-update/interfaces/replacement-attribute-value.d.ts +1 -1
- package/schematics/ng-update/interfaces/replacement-attribute.d.ts +1 -1
- package/schematics/ng-update/interfaces/replacement-tag.d.ts +1 -1
- package/schematics/ng-update/{v4/steps → utils}/replace-functions.d.ts +1 -1
- package/schematics/ng-update/{v4/steps → utils}/replace-functions.js +1 -1
- package/schematics/ng-update/utils/replace-functions.js.map +1 -0
- package/schematics/ng-update/v4/index.js +1 -1
- package/schematics/ng-update/v4/index.js.map +1 -1
- package/schematics/ng-update/v4/migrate-css-vars/rename-css-vars.js +1 -1
- package/schematics/ng-update/v4/migrate-css-vars/rename-css-vars.js.map +1 -1
- package/schematics/ng-update/v4/steps/constants/migration-warnings.js +1 -1
- package/schematics/ng-update/v4/steps/constants/migration-warnings.js.map +1 -1
- package/schematics/ng-update/v4/steps/migrate-templates.d.ts +2 -2
- package/schematics/ng-update/v4/steps/restore-tui-mapper.js +1 -1
- package/schematics/ng-update/v4/steps/restore-tui-mapper.js.map +1 -1
- package/schematics/ng-update/v4/steps/restore-tui-matcher.js +1 -1
- package/schematics/ng-update/v4/steps/restore-tui-matcher.js.map +1 -1
- package/schematics/ng-update/v4/steps/styles/migrate-space-mixins.js +1 -1
- package/schematics/ng-update/v4/steps/styles/migrate-space-mixins.js.map +1 -1
- package/schematics/ng-update/v5/index.js +12 -0
- package/schematics/ng-update/v5/index.js.map +1 -1
- package/schematics/ng-update/v5/steps/constants/attrs-to-replace.d.ts +2 -0
- package/schematics/ng-update/v5/steps/constants/attrs-to-replace.js +22 -0
- package/schematics/ng-update/v5/steps/constants/attrs-to-replace.js.map +1 -0
- package/schematics/ng-update/v5/steps/constants/functions.d.ts +2 -0
- package/schematics/ng-update/v5/steps/constants/functions.js +67 -0
- package/schematics/ng-update/v5/steps/constants/functions.js.map +1 -0
- package/schematics/ng-update/v5/steps/constants/html-comments.d.ts +2 -0
- package/schematics/ng-update/v5/steps/constants/html-comments.js +11 -0
- package/schematics/ng-update/v5/steps/constants/html-comments.js.map +1 -0
- package/schematics/ng-update/v5/steps/constants/identifiers-to-replace.d.ts +2 -0
- package/schematics/ng-update/v5/steps/constants/identifiers-to-replace.js +22 -0
- package/schematics/ng-update/v5/steps/constants/identifiers-to-replace.js.map +1 -0
- package/schematics/ng-update/v5/steps/migrate-templates.d.ts +17 -0
- package/schematics/ng-update/v5/steps/migrate-templates.js +46 -0
- package/schematics/ng-update/v5/steps/migrate-templates.js.map +1 -0
- 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-input-year.d.ts +8 -0
- package/schematics/ng-update/v5/steps/templates/migrate-input-year.js +52 -0
- package/schematics/ng-update/v5/steps/templates/migrate-input-year.js.map +1 -0
- package/schematics/utils/angular-json-manipulations.js +0 -2
- package/schematics/utils/angular-json-manipulations.js.map +1 -1
- package/schematics/utils/run-migration.d.ts +14 -0
- package/schematics/utils/run-migration.js +27 -0
- package/schematics/utils/run-migration.js.map +1 -0
- package/schematics/utils/templates/elements.js +4 -12
- package/schematics/utils/templates/elements.js.map +1 -1
- package/schematics/utils/templates/ng-component-input-manipulations.d.ts +3 -3
- package/schematics/utils/templates/ng-component-input-manipulations.js +1 -3
- package/schematics/utils/templates/ng-component-input-manipulations.js.map +1 -1
- package/tokens/environment.d.ts +5 -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/browser/index.d.ts +0 -2
- package/utils/di/create-options.d.ts +2 -2
- package/utils/di/index.d.ts +3 -0
- package/utils/di/provide-options.d.ts +2 -0
- package/utils/dom/get-element-obscurers.d.ts +1 -1
- package/utils/dom/index.d.ts +0 -6
- package/utils/focus/get-closest-focusable.d.ts +1 -6
- package/utils/focus/{get-native-focused.d.ts → get-focused.d.ts} +1 -1
- 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/focus/{is-native-focused-in.d.ts → is-focused-in.d.ts} +1 -1
- package/utils/focus/{is-native-focused.d.ts → is-focused.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/classes/portals.d.ts +0 -33
- package/constants/allow-signal-writes.d.ts +0 -2
- 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 -8
- 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 -19
- package/directives/popover/index.d.ts +0 -1
- package/directives/popover/popover.directive.d.ts +0 -14
- package/directives/repeat-times/index.d.ts +0 -1
- package/directives/repeat-times/repeat-times.directive.d.ts +0 -22
- package/fesm2022/taiga-ui-cdk-directives-click-outside.mjs +0 -39
- package/fesm2022/taiga-ui-cdk-directives-click-outside.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-directives-droppable.mjs +0 -37
- package/fesm2022/taiga-ui-cdk-directives-droppable.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-directives-let.mjs +0 -54
- package/fesm2022/taiga-ui-cdk-directives-let.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-directives-popover.mjs +0 -32
- package/fesm2022/taiga-ui-cdk-directives-popover.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-directives-repeat-times.mjs +0 -61
- package/fesm2022/taiga-ui-cdk-directives-repeat-times.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-animation.mjs +0 -33
- package/fesm2022/taiga-ui-cdk-pipes-animation.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-is-present.mjs +0 -25
- package/fesm2022/taiga-ui-cdk-pipes-is-present.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-keys.mjs +0 -24
- package/fesm2022/taiga-ui-cdk-pipes-keys.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-repeat-times.mjs +0 -25
- package/fesm2022/taiga-ui-cdk-pipes-repeat-times.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-replace.mjs +0 -26
- package/fesm2022/taiga-ui-cdk-pipes-replace.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-to-array.mjs +0 -24
- package/fesm2022/taiga-ui-cdk-pipes-to-array.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-services.mjs +0 -151
- package/fesm2022/taiga-ui-cdk-services.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-utils-color.mjs +0 -195
- 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/schematics/ng-update/v4/steps/replace-functions.js.map +0 -1
- package/services/id.service.d.ts +0 -8
- package/services/index.d.ts +0 -4
- package/services/popover.service.d.ts +0 -25
- 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/browser/is-apple.d.ts +0 -11
- package/utils/browser/is-ios.d.ts +0 -6
- 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/directive-listener.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/provide-options.d.ts +0 -2
- package/utils/miscellaneous/uniq-by.d.ts +0 -1
- /package/utils/{miscellaneous → di}/directive-binding.d.ts +0 -0
- /package/utils/{miscellaneous → di}/provide.d.ts +0 -0
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Pipe } from '@angular/core';
|
|
3
|
-
import { tuiClamp } from '@taiga-ui/cdk/utils';
|
|
4
|
-
|
|
5
|
-
class TuiRepeatTimesPipe {
|
|
6
|
-
transform(n) {
|
|
7
|
-
return Array.from({ length: tuiClamp(n, 0, n) }, (_, i) => i);
|
|
8
|
-
}
|
|
9
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiRepeatTimesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
10
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiRepeatTimesPipe, isStandalone: true, name: "tuiRepeatTimes" }); }
|
|
11
|
-
}
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiRepeatTimesPipe, decorators: [{
|
|
13
|
-
type: Pipe,
|
|
14
|
-
args: [{
|
|
15
|
-
standalone: true,
|
|
16
|
-
name: 'tuiRepeatTimes',
|
|
17
|
-
}]
|
|
18
|
-
}] });
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Generated bundle index. Do not edit.
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
export { TuiRepeatTimesPipe };
|
|
25
|
-
//# sourceMappingURL=taiga-ui-cdk-pipes-repeat-times.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-pipes-repeat-times.mjs","sources":["../../../projects/cdk/pipes/repeat-times/index.ts","../../../projects/cdk/pipes/repeat-times/taiga-ui-cdk-pipes-repeat-times.ts"],"sourcesContent":["import {Pipe, type PipeTransform} from '@angular/core';\nimport {tuiClamp} from '@taiga-ui/cdk/utils';\n\n@Pipe({\n standalone: true,\n name: 'tuiRepeatTimes',\n})\nexport class TuiRepeatTimesPipe implements PipeTransform {\n public transform(n: number): number[] {\n return Array.from({length: tuiClamp(n, 0, n)}, (_, i) => i);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAOa,kBAAkB,CAAA;AACpB,IAAA,SAAS,CAAC,CAAS,EAAA;QACtB,OAAO,KAAK,CAAC,IAAI,CAAC,EAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;;+GAFtD,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,gBAAA,EAAA,CAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,gBAAgB;AACzB,iBAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Pipe } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
class TuiReplacePipe {
|
|
5
|
-
transform(value, search, replaceValue) {
|
|
6
|
-
return (value?.replace(search,
|
|
7
|
-
// TS bug: https://github.com/microsoft/TypeScript/issues/22378
|
|
8
|
-
replaceValue) ?? '');
|
|
9
|
-
}
|
|
10
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiReplacePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
11
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiReplacePipe, isStandalone: true, name: "tuiReplace" }); }
|
|
12
|
-
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiReplacePipe, decorators: [{
|
|
14
|
-
type: Pipe,
|
|
15
|
-
args: [{
|
|
16
|
-
standalone: true,
|
|
17
|
-
name: 'tuiReplace',
|
|
18
|
-
}]
|
|
19
|
-
}] });
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Generated bundle index. Do not edit.
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
export { TuiReplacePipe };
|
|
26
|
-
//# sourceMappingURL=taiga-ui-cdk-pipes-replace.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-pipes-replace.mjs","sources":["../../../projects/cdk/pipes/replace/replace.pipe.ts","../../../projects/cdk/pipes/replace/taiga-ui-cdk-pipes-replace.ts"],"sourcesContent":["import {Pipe, type PipeTransform} from '@angular/core';\n\n@Pipe({\n standalone: true,\n name: 'tuiReplace',\n})\nexport class TuiReplacePipe implements PipeTransform {\n public transform(\n value: string | null | undefined,\n search: RegExp | string,\n replaceValue: string | ((substring: string, ...args: unknown[]) => string),\n ): string {\n return (\n value?.replace(\n search,\n // TS bug: https://github.com/microsoft/TypeScript/issues/22378\n replaceValue as unknown as string,\n ) ?? ''\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAMa,cAAc,CAAA;AAChB,IAAA,SAAS,CACZ,KAAgC,EAChC,MAAuB,EACvB,YAA0E,EAAA;AAE1E,QAAA,QACI,KAAK,EAAE,OAAO,CACV,MAAM;;AAEN,QAAA,YAAiC,CACpC,IAAI,EAAE;;+GAXN,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,CAAA;;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,YAAY;AACrB,iBAAA;;;ACLD;;AAEG;;;;"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Pipe } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
class TuiToArrayPipe {
|
|
5
|
-
transform(items) {
|
|
6
|
-
return Array.from(items);
|
|
7
|
-
}
|
|
8
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiToArrayPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
9
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiToArrayPipe, isStandalone: true, name: "tuiToArray" }); }
|
|
10
|
-
}
|
|
11
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiToArrayPipe, decorators: [{
|
|
12
|
-
type: Pipe,
|
|
13
|
-
args: [{
|
|
14
|
-
standalone: true,
|
|
15
|
-
name: 'tuiToArray',
|
|
16
|
-
}]
|
|
17
|
-
}] });
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Generated bundle index. Do not edit.
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
export { TuiToArrayPipe };
|
|
24
|
-
//# sourceMappingURL=taiga-ui-cdk-pipes-to-array.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-pipes-to-array.mjs","sources":["../../../projects/cdk/pipes/to-array/to-array.pipe.ts","../../../projects/cdk/pipes/to-array/taiga-ui-cdk-pipes-to-array.ts"],"sourcesContent":["import {Pipe, type PipeTransform, type QueryList} from '@angular/core';\n\n@Pipe({\n standalone: true,\n name: 'tuiToArray',\n})\nexport class TuiToArrayPipe implements PipeTransform {\n public transform<T>(items: Map<any, any> | QueryList<T> | Set<any>): readonly T[] {\n return Array.from(items);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAMa,cAAc,CAAA;AAChB,IAAA,SAAS,CAAI,KAA8C,EAAA;AAC9D,QAAA,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;;+GAFnB,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,CAAA;;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,YAAY;AACrB,iBAAA;;;ACLD;;AAEG;;;;"}
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, inject, INJECTOR, NgZone, InjectionToken } from '@angular/core';
|
|
3
|
-
import { tuiProvide } from '@taiga-ui/cdk/utils';
|
|
4
|
-
import { PolymorpheusComponent } from '@taiga-ui/polymorpheus';
|
|
5
|
-
import { Observable, of, defer, switchMap, map, takeUntil, timer, endWith, tap } from 'rxjs';
|
|
6
|
-
import { WA_PERFORMANCE, WA_ANIMATION_FRAME } from '@ng-web-apis/common';
|
|
7
|
-
import { tuiZonefreeScheduler } from '@taiga-ui/cdk/observables';
|
|
8
|
-
import { tuiClamp } from '@taiga-ui/cdk/utils/math';
|
|
9
|
-
import { tuiEaseInOutQuad } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
10
|
-
import { DOCUMENT } from '@angular/common';
|
|
11
|
-
import { Meta } from '@angular/platform-browser';
|
|
12
|
-
|
|
13
|
-
class TuiIdService {
|
|
14
|
-
static { this.autoId = 0; }
|
|
15
|
-
generate() {
|
|
16
|
-
return `tui_${TuiIdService.autoId++}${Date.now()}`;
|
|
17
|
-
}
|
|
18
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiIdService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
19
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiIdService, providedIn: 'root' }); }
|
|
20
|
-
}
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiIdService, decorators: [{
|
|
22
|
-
type: Injectable,
|
|
23
|
-
args: [{
|
|
24
|
-
providedIn: 'root',
|
|
25
|
-
}]
|
|
26
|
-
}] });
|
|
27
|
-
function tuiInjectId() {
|
|
28
|
-
return inject(TuiIdService).generate();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
class TuiPopoverService {
|
|
32
|
-
constructor(items, component, options = {}) {
|
|
33
|
-
this.options = options;
|
|
34
|
-
this.id = inject(TuiIdService);
|
|
35
|
-
this.component = new PolymorpheusComponent(component, inject(INJECTOR));
|
|
36
|
-
this.items$ = inject(items);
|
|
37
|
-
}
|
|
38
|
-
open(content, options = {}) {
|
|
39
|
-
return new Observable((observer) => {
|
|
40
|
-
const item = {
|
|
41
|
-
...this.options,
|
|
42
|
-
...options,
|
|
43
|
-
content,
|
|
44
|
-
$implicit: observer,
|
|
45
|
-
component: this.component,
|
|
46
|
-
createdAt: Date.now(),
|
|
47
|
-
id: this.id.generate(),
|
|
48
|
-
completeWith: (result) => {
|
|
49
|
-
observer.next(result);
|
|
50
|
-
observer.complete();
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
this.items$.next([...this.items$.value, item]);
|
|
54
|
-
return () => {
|
|
55
|
-
this.items$.next(this.items$.value.filter((value) => value !== item));
|
|
56
|
-
};
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPopoverService, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
60
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPopoverService }); }
|
|
61
|
-
}
|
|
62
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPopoverService, decorators: [{
|
|
63
|
-
type: Injectable
|
|
64
|
-
}], ctorParameters: () => [{ type: undefined }, { type: undefined }, { type: undefined }] });
|
|
65
|
-
function tuiAsPopover(popover) {
|
|
66
|
-
return tuiProvide(TuiPopoverService, popover);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/// <reference types="@taiga-ui/tsconfig/ng-dev-mode" />
|
|
70
|
-
const SCROLL_TIME = 300;
|
|
71
|
-
function getX(elementOrWindow) {
|
|
72
|
-
return 'scrollX' in elementOrWindow
|
|
73
|
-
? elementOrWindow.scrollX
|
|
74
|
-
: elementOrWindow.scrollLeft;
|
|
75
|
-
}
|
|
76
|
-
function getY(elementOrWindow) {
|
|
77
|
-
return 'scrollY' in elementOrWindow
|
|
78
|
-
? elementOrWindow.scrollY
|
|
79
|
-
: elementOrWindow.scrollTop;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* @deprecated: use native scroll
|
|
83
|
-
*/
|
|
84
|
-
class TuiScrollService {
|
|
85
|
-
constructor() {
|
|
86
|
-
this.performanceRef = inject(WA_PERFORMANCE);
|
|
87
|
-
this.animationFrame$ = inject(WA_ANIMATION_FRAME);
|
|
88
|
-
this.zone = inject(NgZone);
|
|
89
|
-
}
|
|
90
|
-
scroll$(elementOrWindow, scrollTop, scrollLeft = getX(elementOrWindow), duration = SCROLL_TIME) {
|
|
91
|
-
ngDevMode && console.assert(duration >= 0, 'duration cannot be negative');
|
|
92
|
-
ngDevMode && console.assert(scrollTop >= 0, 'scrollTop cannot be negative');
|
|
93
|
-
ngDevMode && console.assert(scrollLeft >= 0, 'scrollLeft cannot be negative');
|
|
94
|
-
const initialTop = getY(elementOrWindow);
|
|
95
|
-
const initialLeft = getX(elementOrWindow);
|
|
96
|
-
const deltaTop = scrollTop - initialTop;
|
|
97
|
-
const deltaLeft = scrollLeft - initialLeft;
|
|
98
|
-
const observable = !duration
|
|
99
|
-
? of([scrollTop, scrollLeft])
|
|
100
|
-
: defer(() => of(this.performanceRef.now())).pipe(switchMap((start) => this.animationFrame$.pipe(map((now) => now - start))), map((elapsed) => tuiEaseInOutQuad(tuiClamp(elapsed / duration, 0, 1))), map((percent) => [
|
|
101
|
-
initialTop + deltaTop * percent,
|
|
102
|
-
initialLeft + deltaLeft * percent,
|
|
103
|
-
]), takeUntil(timer(duration, tuiZonefreeScheduler(this.zone))), endWith([scrollTop, scrollLeft]));
|
|
104
|
-
return observable.pipe(tap(([scrollTop, scrollLeft]) => {
|
|
105
|
-
elementOrWindow.scrollTo?.(scrollLeft, scrollTop);
|
|
106
|
-
}));
|
|
107
|
-
}
|
|
108
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
109
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollService, providedIn: 'root' }); }
|
|
110
|
-
}
|
|
111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiScrollService, decorators: [{
|
|
112
|
-
type: Injectable,
|
|
113
|
-
args: [{
|
|
114
|
-
providedIn: 'root',
|
|
115
|
-
}]
|
|
116
|
-
}] });
|
|
117
|
-
|
|
118
|
-
const TUI_THEME_COLOR = new InjectionToken(ngDevMode ? 'TUI_THEME_COLOR' : '', {
|
|
119
|
-
factory: () => inject(Meta).getTag('name="theme-color"')?.content ?? '',
|
|
120
|
-
});
|
|
121
|
-
class TuiThemeColorService {
|
|
122
|
-
constructor() {
|
|
123
|
-
this.current = inject(TUI_THEME_COLOR);
|
|
124
|
-
this.doc = inject(DOCUMENT);
|
|
125
|
-
this.meta = inject(Meta);
|
|
126
|
-
this.color = this.current;
|
|
127
|
-
}
|
|
128
|
-
get color() {
|
|
129
|
-
return this.current;
|
|
130
|
-
}
|
|
131
|
-
set color(content) {
|
|
132
|
-
this.current = content;
|
|
133
|
-
this.meta.updateTag({ name: 'theme-color', content });
|
|
134
|
-
this.doc.documentElement.style.setProperty('--tui-theme-color', content);
|
|
135
|
-
}
|
|
136
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiThemeColorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
137
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiThemeColorService, providedIn: 'root' }); }
|
|
138
|
-
}
|
|
139
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiThemeColorService, decorators: [{
|
|
140
|
-
type: Injectable,
|
|
141
|
-
args: [{
|
|
142
|
-
providedIn: 'root',
|
|
143
|
-
}]
|
|
144
|
-
}], ctorParameters: () => [] });
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Generated bundle index. Do not edit.
|
|
148
|
-
*/
|
|
149
|
-
|
|
150
|
-
export { TUI_THEME_COLOR, TuiIdService, TuiPopoverService, TuiScrollService, TuiThemeColorService, tuiAsPopover, tuiInjectId };
|
|
151
|
-
//# sourceMappingURL=taiga-ui-cdk-services.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-services.mjs","sources":["../../../projects/cdk/services/id.service.ts","../../../projects/cdk/services/popover.service.ts","../../../projects/cdk/services/scroll.service.ts","../../../projects/cdk/services/theme-color.service.ts","../../../projects/cdk/services/taiga-ui-cdk-services.ts"],"sourcesContent":["import {inject, Injectable} from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiIdService {\n private static autoId = 0;\n\n public generate(): string {\n return `tui_${TuiIdService.autoId++}${Date.now()}`;\n }\n}\n\nexport function tuiInjectId(): string {\n return inject(TuiIdService).generate();\n}\n","import {\n inject,\n Injectable,\n INJECTOR,\n type Provider,\n type ProviderToken,\n type Type,\n} from '@angular/core';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {tuiProvide} from '@taiga-ui/cdk/utils';\nimport {PolymorpheusComponent, type PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {type BehaviorSubject, Observable, type Observer} from 'rxjs';\n\nimport {TuiIdService} from './id.service';\n\nexport interface TuiPopoverContext<O> extends TuiContext<Observer<O>> {\n readonly component: PolymorpheusComponent<any>;\n readonly createdAt: number;\n readonly id: string;\n readonly completeWith: (value: O) => void;\n}\n\nexport type TuiPopover<T, O> = T &\n TuiPopoverContext<O> & {\n content: PolymorpheusContent<T & TuiPopoverContext<O>>;\n };\n\n@Injectable()\nexport abstract class TuiPopoverService<T, K = void> {\n private readonly component: PolymorpheusComponent<any>;\n private readonly id = inject(TuiIdService);\n\n protected readonly items$: BehaviorSubject<ReadonlyArray<TuiPopover<T, any>>>;\n\n constructor(\n items: ProviderToken<BehaviorSubject<ReadonlyArray<TuiPopover<T, any>>>>,\n component: Type<any>,\n protected readonly options: T = {} as T,\n ) {\n this.component = new PolymorpheusComponent(component, inject(INJECTOR));\n this.items$ = inject(items);\n }\n\n public open<G = void>(\n content: PolymorpheusContent<T & TuiPopoverContext<K extends void ? G : K>>,\n options: Partial<T> = {},\n ): Observable<K extends void ? G : K> {\n return new Observable((observer) => {\n const item = {\n ...this.options,\n ...options,\n content,\n $implicit: observer,\n component: this.component,\n createdAt: Date.now(),\n id: this.id.generate(),\n completeWith: (result: K extends void ? G : K): void => {\n observer.next(result);\n observer.complete();\n },\n };\n\n this.items$.next([...this.items$.value, item]);\n\n return () => {\n this.items$.next(this.items$.value.filter((value) => value !== item));\n };\n });\n }\n}\n\nexport function tuiAsPopover(popover: Type<TuiPopoverService<any>>): Provider {\n return tuiProvide(TuiPopoverService, popover);\n}\n","/// <reference types=\"@taiga-ui/tsconfig/ng-dev-mode\" />\nimport {inject, Injectable, NgZone} from '@angular/core';\nimport {WA_ANIMATION_FRAME, WA_PERFORMANCE} from '@ng-web-apis/common';\nimport {tuiZonefreeScheduler} from '@taiga-ui/cdk/observables';\nimport {tuiClamp} from '@taiga-ui/cdk/utils/math';\nimport {tuiEaseInOutQuad} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n defer,\n endWith,\n map,\n type Observable,\n of,\n switchMap,\n takeUntil,\n tap,\n timer,\n} from 'rxjs';\n\nconst SCROLL_TIME = 300;\n\nfunction getX(elementOrWindow: Element | Window): number {\n return 'scrollX' in elementOrWindow\n ? elementOrWindow.scrollX\n : elementOrWindow.scrollLeft;\n}\n\nfunction getY(elementOrWindow: Element | Window): number {\n return 'scrollY' in elementOrWindow\n ? elementOrWindow.scrollY\n : elementOrWindow.scrollTop;\n}\n\n/**\n * @deprecated: use native scroll\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiScrollService {\n private readonly performanceRef = inject(WA_PERFORMANCE);\n private readonly animationFrame$ = inject(WA_ANIMATION_FRAME);\n private readonly zone = inject(NgZone);\n\n public scroll$(\n elementOrWindow: Element | Window,\n scrollTop: number,\n scrollLeft: number = getX(elementOrWindow),\n duration: number = SCROLL_TIME,\n ): Observable<[number, number]> {\n ngDevMode && console.assert(duration >= 0, 'duration cannot be negative');\n ngDevMode && console.assert(scrollTop >= 0, 'scrollTop cannot be negative');\n ngDevMode && console.assert(scrollLeft >= 0, 'scrollLeft cannot be negative');\n\n const initialTop = getY(elementOrWindow);\n const initialLeft = getX(elementOrWindow);\n const deltaTop = scrollTop - initialTop;\n const deltaLeft = scrollLeft - initialLeft;\n const observable = !duration\n ? of<[number, number]>([scrollTop, scrollLeft])\n : defer(() => of(this.performanceRef.now())).pipe(\n switchMap((start) =>\n this.animationFrame$.pipe(map((now) => now - start)),\n ),\n map((elapsed) => tuiEaseInOutQuad(tuiClamp(elapsed / duration, 0, 1))),\n map<number, [number, number]>((percent) => [\n initialTop + deltaTop * percent,\n initialLeft + deltaLeft * percent,\n ]),\n takeUntil(timer(duration, tuiZonefreeScheduler(this.zone))),\n endWith<[number, number]>([scrollTop, scrollLeft]),\n );\n\n return observable.pipe(\n tap(([scrollTop, scrollLeft]) => {\n elementOrWindow.scrollTo?.(scrollLeft, scrollTop);\n }),\n );\n }\n}\n","import {DOCUMENT} from '@angular/common';\nimport {inject, Injectable, InjectionToken} from '@angular/core';\nimport {Meta} from '@angular/platform-browser';\n\nexport const TUI_THEME_COLOR = new InjectionToken<string>(\n ngDevMode ? 'TUI_THEME_COLOR' : '',\n {\n factory: () => inject(Meta).getTag('name=\"theme-color\"')?.content ?? '',\n },\n);\n\ninterface TuiThemeColor {\n get color(): string;\n set color(value: string);\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiThemeColorService implements TuiThemeColor {\n private current = inject(TUI_THEME_COLOR);\n private readonly doc = inject(DOCUMENT);\n private readonly meta = inject(Meta);\n\n constructor() {\n this.color = this.current;\n }\n\n public get color(): string {\n return this.current;\n }\n\n public set color(content: string) {\n this.current = content;\n this.meta.updateTag({name: 'theme-color', content});\n this.doc.documentElement.style.setProperty('--tui-theme-color', content);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAKa,YAAY,CAAA;aACN,IAAM,CAAA,MAAA,GAAG,CAAH,CAAK;IAEnB,QAAQ,GAAA;QACX,OAAO,CAAA,IAAA,EAAO,YAAY,CAAC,MAAM,EAAE,CAAG,EAAA,IAAI,CAAC,GAAG,EAAE,CAAA,CAAE;;+GAJ7C,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAZ,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cAFT,MAAM,EAAA,CAAA,CAAA;;4FAET,YAAY,EAAA,UAAA,EAAA,CAAA;kBAHxB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE,MAAM;AACrB,iBAAA;;SASe,WAAW,GAAA;AACvB,IAAA,OAAO,MAAM,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE;AAC1C;;MCasB,iBAAiB,CAAA;AAMnC,IAAA,WAAA,CACI,KAAwE,EACxE,SAAoB,EACD,UAAa,EAAO,EAAA;QAApB,IAAO,CAAA,OAAA,GAAP,OAAO;AAPb,QAAA,IAAA,CAAA,EAAE,GAAG,MAAM,CAAC,YAAY,CAAC;AAStC,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI,qBAAqB,CAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;AACvE,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC;;AAGxB,IAAA,IAAI,CACP,OAA2E,EAC3E,OAAA,GAAsB,EAAE,EAAA;AAExB,QAA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'');
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
function tuiHexToRgb(hex) {
|
|
8
|
-
const matches = hex
|
|
9
|
-
.replace('#', '')
|
|
10
|
-
.split('')
|
|
11
|
-
.map((char, _, array) => (array.length === 3 ? char + char : char))
|
|
12
|
-
.join('')
|
|
13
|
-
.match(/.{2}/g);
|
|
14
|
-
return matches
|
|
15
|
-
? matches.map((x) => Number.parseInt(x, 16))
|
|
16
|
-
: [0, 0, 0];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const getChunksFromString = (hex, chunkSize) => hex.match(new RegExp(`.{${chunkSize}}`, 'g'));
|
|
20
|
-
const convertHexUnitTo256 = (hexStr) => parseInt(hexStr.repeat(2 / hexStr.length), 16);
|
|
21
|
-
const getAlphaFloat = (a, alpha) => {
|
|
22
|
-
if (a !== undefined) {
|
|
23
|
-
return Number((a / 255).toFixed(2));
|
|
24
|
-
}
|
|
25
|
-
if (typeof alpha !== 'number' || alpha < 0 || alpha > 1) {
|
|
26
|
-
return 1;
|
|
27
|
-
}
|
|
28
|
-
return alpha;
|
|
29
|
-
};
|
|
30
|
-
function tuiHexToRGBA(hex, alpha) {
|
|
31
|
-
const [r, g, b, a] = tuiParseHex(hex, alpha);
|
|
32
|
-
return a < 1 ? `rgba(${r}, ${g}, ${b}, ${a})` : `rgb(${r}, ${g}, ${b})`;
|
|
33
|
-
}
|
|
34
|
-
function tuiIsValidHex(hex) {
|
|
35
|
-
return /^#([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);
|
|
36
|
-
}
|
|
37
|
-
function tuiParseHex(hex, alpha) {
|
|
38
|
-
if (!tuiIsValidHex(hex)) {
|
|
39
|
-
throw new Error('Invalid HEX');
|
|
40
|
-
}
|
|
41
|
-
const chunkSize = Math.floor((hex.length - 1) / 3);
|
|
42
|
-
const hexArr = getChunksFromString(hex.slice(1), chunkSize);
|
|
43
|
-
const [r = NaN, g = NaN, b = NaN, a] = hexArr?.map(convertHexUnitTo256) ?? [];
|
|
44
|
-
const floatAlpha = getAlphaFloat(a, alpha);
|
|
45
|
-
return [r, g, b, floatAlpha];
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function hsvToColor(h, s, v, n) {
|
|
49
|
-
const k = (n + h / 60) % 6;
|
|
50
|
-
return Math.round(v - v * s * Math.max(Math.min(k, 4 - k, 1), 0));
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* https://stackoverflow.com/a/54024653/2706426
|
|
54
|
-
*/
|
|
55
|
-
function tuiHsvToRgb(h, s, v) {
|
|
56
|
-
return [hsvToColor(h, s, v, 5), hsvToColor(h, s, v, 3), hsvToColor(h, s, v, 1)];
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const DEFAULT = [0, 0, 0, 1];
|
|
60
|
-
function tuiParseColor(color) {
|
|
61
|
-
const stripped = color
|
|
62
|
-
.replace('#', '')
|
|
63
|
-
.replace('rgba(', '')
|
|
64
|
-
.replace('rgb(', '')
|
|
65
|
-
.replace(')', '');
|
|
66
|
-
const array = stripped.split(',').map((item) => parseFloat(item));
|
|
67
|
-
if (array.length === 4) {
|
|
68
|
-
return array;
|
|
69
|
-
}
|
|
70
|
-
if (array.length === 3) {
|
|
71
|
-
return array.concat(1);
|
|
72
|
-
}
|
|
73
|
-
const matches = stripped.match(new RegExp(`(.{${stripped.length / 3}})`, 'g'));
|
|
74
|
-
if (!matches) {
|
|
75
|
-
return DEFAULT;
|
|
76
|
-
}
|
|
77
|
-
const parsed = matches.map((char) => parseInt(stripped.length % 2 ? char + char : char, 16));
|
|
78
|
-
return [
|
|
79
|
-
parsed[0] ?? DEFAULT[0],
|
|
80
|
-
parsed[1] ?? DEFAULT[1],
|
|
81
|
-
parsed[2] ?? DEFAULT[2],
|
|
82
|
-
parsed[3] ?? DEFAULT[3],
|
|
83
|
-
];
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
//
|
|
87
|
-
// TypeScript parser based on Dean Taylor's answer:
|
|
88
|
-
// https://stackoverflow.com/a/20238168/2706426
|
|
89
|
-
//
|
|
90
|
-
// SETUP CODE
|
|
91
|
-
const COMMA = String.raw `\s*,\s*`; // Allow space around comma.
|
|
92
|
-
const HEX = '#(?:[a-f0-9]{6}|[a-f0-9]{3})'; // 3 or 6 character form
|
|
93
|
-
const RGB = String.raw `\(\s*(?:\d{1,3}\s*,\s*){2}\d{1,3}\s*\)`; // "(1, 2, 3)"
|
|
94
|
-
const RGBA = String.raw `\(\s*(?:\d{1,3}\s*,\s*){2}\d{1,3}\s*,\s*\d*\.?\d+\)`; // "(1, 2, 3, 4)"
|
|
95
|
-
const VALUE = String.raw `(?:[+-]?\d*\.?\d+)(?:%|[a-z]+)?`; // ".9", "-5px", "100%".
|
|
96
|
-
const KEYWORD = '[_a-z-][_a-z0-9-]*'; // "red", "transparent", "border-collapse".
|
|
97
|
-
const COLOR = [
|
|
98
|
-
'(?:',
|
|
99
|
-
HEX,
|
|
100
|
-
'|',
|
|
101
|
-
'(?:rgb|hsl)',
|
|
102
|
-
RGB,
|
|
103
|
-
'|',
|
|
104
|
-
'(?:rgba|hsla)',
|
|
105
|
-
RGBA,
|
|
106
|
-
'|',
|
|
107
|
-
KEYWORD,
|
|
108
|
-
')',
|
|
109
|
-
];
|
|
110
|
-
const REGEXP_ARRAY = [
|
|
111
|
-
String.raw `\s*(`,
|
|
112
|
-
...COLOR,
|
|
113
|
-
')',
|
|
114
|
-
String.raw `(?:\s+`,
|
|
115
|
-
'(',
|
|
116
|
-
VALUE,
|
|
117
|
-
'))?',
|
|
118
|
-
'(?:',
|
|
119
|
-
COMMA,
|
|
120
|
-
String.raw `\s*)?`,
|
|
121
|
-
];
|
|
122
|
-
function getPosition(match, stops) {
|
|
123
|
-
const fallback = stops === 1 ? '100%' : `${stops}%`;
|
|
124
|
-
return match?.includes('%') ? match : fallback;
|
|
125
|
-
}
|
|
126
|
-
function tuiParseGradient(input) {
|
|
127
|
-
const stopsRegexp = new RegExp(REGEXP_ARRAY.join(''), 'gi');
|
|
128
|
-
const stopsString = input.startsWith('to') || /^\d/.exec(input)
|
|
129
|
-
? input.slice(Math.max(0, input.indexOf(',') + 1)).trim()
|
|
130
|
-
: input;
|
|
131
|
-
const side = input.startsWith('to')
|
|
132
|
-
? input.split(',')[0]
|
|
133
|
-
: 'to bottom';
|
|
134
|
-
let stops = [];
|
|
135
|
-
let matchColorStop = stopsRegexp.exec(stopsString);
|
|
136
|
-
while (matchColorStop !== null) {
|
|
137
|
-
stops = stops.concat({
|
|
138
|
-
color: matchColorStop[1] || '',
|
|
139
|
-
position: getPosition(matchColorStop[2] || '', stops.length),
|
|
140
|
-
});
|
|
141
|
-
matchColorStop = stopsRegexp.exec(stopsString);
|
|
142
|
-
}
|
|
143
|
-
stops = stops.filter(({ color }) => color.startsWith('#') || color.startsWith('rgb'));
|
|
144
|
-
return {
|
|
145
|
-
stops,
|
|
146
|
-
side,
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
function tuiToGradient({ stops, side }) {
|
|
150
|
-
return `linear-gradient(${side}, ${stops
|
|
151
|
-
.map(({ color, position }) => `rgba(${tuiParseColor(color).join(', ')}) ${position}`)
|
|
152
|
-
.join(', ')})`;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
function tuiRgbToHex(r, g, b) {
|
|
156
|
-
return `#${[r, g, b].map((x) => x.toString(16).padStart(2, '0')).join('')}`;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
function tuiRgbToHsv(r, g, b) {
|
|
160
|
-
const v = Math.max(r, g, b);
|
|
161
|
-
const n = v - Math.min(r, g, b);
|
|
162
|
-
// eslint-disable-next-line no-nested-ternary
|
|
163
|
-
const h = n && (v === r ? (g - b) / n : v === g ? 2 + (b - r) / n : 4 + (r - g) / n);
|
|
164
|
-
return [60 * (h < 0 ? h + 6 : h), v && n / v, v];
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
function tuiRgbaToHex(color) {
|
|
168
|
-
if (!tuiIsValidRgba(color)) {
|
|
169
|
-
throw new Error('Invalid RGBa');
|
|
170
|
-
}
|
|
171
|
-
const rgb = /^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i.exec(color.replaceAll(/\s/g, '')) ??
|
|
172
|
-
null;
|
|
173
|
-
let alpha = (rgb?.[4] ?? '').trim();
|
|
174
|
-
let hex = rgb
|
|
175
|
-
? ((parseInt(rgb?.[1] ?? '', 10) || 0) | (1 << 8)).toString(16).slice(1) +
|
|
176
|
-
((parseInt(rgb?.[2] ?? '', 10) || 0) | (1 << 8)).toString(16).slice(1) +
|
|
177
|
-
((parseInt(rgb?.[3] ?? '', 10) || 0) | (1 << 8)).toString(16).slice(1)
|
|
178
|
-
: color;
|
|
179
|
-
alpha = alpha !== '' ? alpha : 0o1;
|
|
180
|
-
alpha = ((Number(alpha) * 255) | (1 << 8)).toString(16).slice(1);
|
|
181
|
-
hex += alpha;
|
|
182
|
-
return `#${hex.toUpperCase()}`;
|
|
183
|
-
}
|
|
184
|
-
function tuiIsValidRgba(rgba) {
|
|
185
|
-
const range = String.raw `(\d|[1-9]\d|1\d{2}|2[0-4]\d|2[0-5]{2})`;
|
|
186
|
-
const alpha = String.raw `([01]|0?\.\d+)`;
|
|
187
|
-
return new RegExp(`^(?:rgb\\(\\s*${range}\\s*,\\s*${range}\\s*,\\s*${range}\\s*\\)|rgba\\(\\s*${range}\\s*,\\s*${range}\\s*,\\s*${range}\\s*,\\s*${alpha}\\s*\\))$`).test(rgba);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* Generated bundle index. Do not edit.
|
|
192
|
-
*/
|
|
193
|
-
|
|
194
|
-
export { tuiGetGradientData, tuiHexToRGBA, tuiHexToRgb, tuiHsvToRgb, tuiIsValidHex, tuiIsValidRgba, tuiParseColor, tuiParseGradient, tuiParseHex, tuiRgbToHex, tuiRgbToHsv, tuiRgbaToHex, tuiToGradient };
|
|
195
|
-
//# sourceMappingURL=taiga-ui-cdk-utils-color.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-utils-color.mjs","sources":["../../../projects/cdk/utils/color/get-gradient-data.ts","../../../projects/cdk/utils/color/hex-to-rgb.ts","../../../projects/cdk/utils/color/hex-to-rgba.ts","../../../projects/cdk/utils/color/hsv-to-rgb.ts","../../../projects/cdk/utils/color/parse-color.ts","../../../projects/cdk/utils/color/parse-gradient.ts","../../../projects/cdk/utils/color/rgb-to-hex.ts","../../../projects/cdk/utils/color/rgb-to-hsv.ts","../../../projects/cdk/utils/color/rgba-to-hex.ts","../../../projects/cdk/utils/color/taiga-ui-cdk-utils-color.ts"],"sourcesContent":["export function tuiGetGradientData(gradient: string): string {\n return gradient\n .slice(0, Math.max(0, gradient.length - 1))\n .replace('linear-gradient(', '');\n}\n","export function tuiHexToRgb(hex: string): [number, number, number] {\n const matches = hex\n .replace('#', '')\n .split('')\n .map((char, _, array) => (array.length === 3 ? char + char : char))\n .join('')\n .match(/.{2}/g);\n\n return matches\n ? (matches.map((x) => Number.parseInt(x, 16)) as [number, number, number])\n : [0, 0, 0];\n}\n","const getChunksFromString = (hex: string, chunkSize: number): RegExpMatchArray | null =>\n hex.match(new RegExp(`.{${chunkSize}}`, 'g'));\n\nconst convertHexUnitTo256 = (hexStr: string): number =>\n parseInt(hexStr.repeat(2 / hexStr.length), 16);\n\nconst getAlphaFloat = (a?: number, alpha?: number): number => {\n if (a !== undefined) {\n return Number((a / 255).toFixed(2));\n }\n\n if (typeof alpha !== 'number' || alpha < 0 || alpha > 1) {\n return 1;\n }\n\n return alpha;\n};\n\nexport function tuiHexToRGBA(hex: string, alpha?: number): string {\n const [r, g, b, a] = tuiParseHex(hex, alpha);\n\n return a < 1 ? `rgba(${r}, ${g}, ${b}, ${a})` : `rgb(${r}, ${g}, ${b})`;\n}\n\nexport function tuiIsValidHex(hex: string): boolean {\n return /^#([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);\n}\n\nexport function tuiParseHex(\n hex: string,\n alpha?: number,\n): [number, number, number, number] {\n if (!tuiIsValidHex(hex)) {\n throw new Error('Invalid HEX');\n }\n\n const chunkSize = Math.floor((hex.length - 1) / 3);\n const hexArr = getChunksFromString(hex.slice(1), chunkSize);\n const [r = NaN, g = NaN, b = NaN, a] = hexArr?.map(convertHexUnitTo256) ?? [];\n const floatAlpha = getAlphaFloat(a, alpha);\n\n return [r, g, b, floatAlpha];\n}\n","function hsvToColor(h: number, s: number, v: number, n: number): number {\n const k = (n + h / 60) % 6;\n\n return Math.round(v - v * s * Math.max(Math.min(k, 4 - k, 1), 0));\n}\n\n/**\n * https://stackoverflow.com/a/54024653/2706426\n */\nexport function tuiHsvToRgb(h: number, s: number, v: number): [number, number, number] {\n return [hsvToColor(h, s, v, 5), hsvToColor(h, s, v, 3), hsvToColor(h, s, v, 1)];\n}\n","const DEFAULT: [number, number, number, number] = [0, 0, 0, 1];\n\nexport function tuiParseColor(color: string): [number, number, number, number] {\n const stripped = color\n .replace('#', '')\n .replace('rgba(', '')\n .replace('rgb(', '')\n .replace(')', '');\n const array = stripped.split(',').map((item) => parseFloat(item));\n\n if (array.length === 4) {\n return array as [number, number, number, number];\n }\n\n if (array.length === 3) {\n return array.concat(1) as [number, number, number, number];\n }\n\n const matches = stripped.match(new RegExp(`(.{${stripped.length / 3}})`, 'g'));\n\n if (!matches) {\n return DEFAULT;\n }\n\n const parsed = matches.map((char) =>\n parseInt(stripped.length % 2 ? char + char : char, 16),\n );\n\n return [\n parsed[0] ?? DEFAULT[0],\n parsed[1] ?? DEFAULT[1],\n parsed[2] ?? DEFAULT[2],\n parsed[3] ?? DEFAULT[3],\n ];\n}\n","import {tuiParseColor} from './parse-color';\n\nexport interface TuiParsedGradient {\n readonly side: TuiGradientDirection;\n readonly stops: ReadonlyArray<{\n readonly color: string;\n readonly position: string;\n }>;\n}\n\nexport type TuiGradientDirection =\n | 'to bottom left'\n | 'to bottom right'\n | 'to bottom'\n | 'to left'\n | 'to right'\n | 'to top left'\n | 'to top right'\n | 'to top';\n\n//\n// TypeScript parser based on Dean Taylor's answer:\n// https://stackoverflow.com/a/20238168/2706426\n//\n// SETUP CODE\nconst COMMA = String.raw`\\s*,\\s*`; // Allow space around comma.\nconst HEX = '#(?:[a-f0-9]{6}|[a-f0-9]{3})'; // 3 or 6 character form\nconst RGB = String.raw`\\(\\s*(?:\\d{1,3}\\s*,\\s*){2}\\d{1,3}\\s*\\)`; // \"(1, 2, 3)\"\nconst RGBA = String.raw`\\(\\s*(?:\\d{1,3}\\s*,\\s*){2}\\d{1,3}\\s*,\\s*\\d*\\.?\\d+\\)`; // \"(1, 2, 3, 4)\"\nconst VALUE = String.raw`(?:[+-]?\\d*\\.?\\d+)(?:%|[a-z]+)?`; // \".9\", \"-5px\", \"100%\".\nconst KEYWORD = '[_a-z-][_a-z0-9-]*'; // \"red\", \"transparent\", \"border-collapse\".\nconst COLOR = [\n '(?:',\n HEX,\n '|',\n '(?:rgb|hsl)',\n RGB,\n '|',\n '(?:rgba|hsla)',\n RGBA,\n '|',\n KEYWORD,\n ')',\n];\nconst REGEXP_ARRAY = [\n String.raw`\\s*(`,\n ...COLOR,\n ')',\n String.raw`(?:\\s+`,\n '(',\n VALUE,\n '))?',\n '(?:',\n COMMA,\n String.raw`\\s*)?`,\n];\n\nfunction getPosition(match: string, stops: number): string {\n const fallback = stops === 1 ? '100%' : `${stops}%`;\n\n return match?.includes('%') ? match : fallback;\n}\n\nexport function tuiParseGradient(input: string): TuiParsedGradient {\n const stopsRegexp = new RegExp(REGEXP_ARRAY.join(''), 'gi');\n const stopsString =\n input.startsWith('to') || /^\\d/.exec(input)\n ? input.slice(Math.max(0, input.indexOf(',') + 1)).trim()\n : input;\n\n const side = input.startsWith('to')\n ? (input.split(',')[0] as TuiGradientDirection)\n : 'to bottom';\n let stops: TuiParsedGradient['stops'] = [];\n\n let matchColorStop = stopsRegexp.exec(stopsString);\n\n while (matchColorStop !== null) {\n stops = stops.concat({\n color: matchColorStop[1] || '',\n position: getPosition(matchColorStop[2] || '', stops.length),\n });\n\n matchColorStop = stopsRegexp.exec(stopsString);\n }\n\n stops = stops.filter(({color}) => color.startsWith('#') || color.startsWith('rgb'));\n\n return {\n stops,\n side,\n };\n}\n\nexport function tuiToGradient({stops, side}: TuiParsedGradient): string {\n return `linear-gradient(${side}, ${stops\n .map(\n ({color, position}) => `rgba(${tuiParseColor(color).join(', ')}) ${position}`,\n )\n .join(', ')})`;\n}\n","export function tuiRgbToHex(r: number, g: number, b: number): string {\n return `#${[r, g, b].map((x) => x.toString(16).padStart(2, '0')).join('')}`;\n}\n","export function tuiRgbToHsv(r: number, g: number, b: number): [number, number, number] {\n const v = Math.max(r, g, b);\n const n = v - Math.min(r, g, b);\n\n // eslint-disable-next-line no-nested-ternary\n const h = n && (v === r ? (g - b) / n : v === g ? 2 + (b - r) / n : 4 + (r - g) / n);\n\n return [60 * (h < 0 ? h + 6 : h), v && n / v, v];\n}\n","export function tuiRgbaToHex(color: string): string {\n if (!tuiIsValidRgba(color)) {\n throw new Error('Invalid RGBa');\n }\n\n const rgb =\n /^rgba?\\((\\d+),(\\d+),(\\d+),?([^,\\s)]+)?/i.exec(color.replaceAll(/\\s/g, '')) ??\n null;\n\n let alpha: number | string = ((rgb?.[4] ?? '') satisfies string).trim();\n\n let hex = rgb\n ? ((parseInt(rgb?.[1] ?? '', 10) || 0) | (1 << 8)).toString(16).slice(1) +\n ((parseInt(rgb?.[2] ?? '', 10) || 0) | (1 << 8)).toString(16).slice(1) +\n ((parseInt(rgb?.[3] ?? '', 10) || 0) | (1 << 8)).toString(16).slice(1)\n : color;\n\n alpha = alpha !== '' ? alpha : 0o1;\n alpha = ((Number(alpha) * 255) | (1 << 8)).toString(16).slice(1);\n hex += alpha;\n\n return `#${hex.toUpperCase()}`;\n}\n\nexport function tuiIsValidRgba(rgba: string): boolean {\n const range = String.raw`(\\d|[1-9]\\d|1\\d{2}|2[0-4]\\d|2[0-5]{2})`;\n const alpha = String.raw`([01]|0?\\.\\d+)`;\n\n return new RegExp(\n `^(?:rgb\\\\(\\\\s*${range}\\\\s*,\\\\s*${range}\\\\s*,\\\\s*${range}\\\\s*\\\\)|rgba\\\\(\\\\s*${range}\\\\s*,\\\\s*${range}\\\\s*,\\\\s*${range}\\\\s*,\\\\s*${alpha}\\\\s*\\\\))$`,\n ).test(rgba);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAM,SAAU,kBAAkB,CAAC,QAAgB,EAAA;AAC/C,IAAA,OAAO;AACF,SAAA,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;AACzC,SAAA,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;AACxC;;ACJM,SAAU,WAAW,CAAC,GAAW,EAAA;IACnC,MAAM,OAAO,GAAG;AACX,SAAA,OAAO,CAAC,GAAG,EAAE,EAAE;SACf,KAAK,CAAC,EAAE;SACR,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,MAAM,KAAK,CAAC,MAAM,KAAK,CAAC,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;SACjE,IAAI,CAAC,EAAE;SACP,KAAK,CAAC,OAAO,CAAC;AAEnB,IAAA,OAAO;AACH,UAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC;UAC1C,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AACnB;;ACXA,MAAM,mBAAmB,GAAG,CAAC,GAAW,EAAE,SAAiB,KACvD,GAAG,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,CAAK,EAAA,EAAA,SAAS,GAAG,EAAE,GAAG,CAAC,CAAC;AAEjD,MAAM,mBAAmB,GAAG,CAAC,MAAc,KACvC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,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,CAAW,SAAA,CAAA,CACpJ,CAAC,IAAI,CAAC,IAAI,CAAC;AAChB;;AC/BA;;AAEG;;;;"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type QueryList } from '@angular/core';
|
|
2
|
-
import { type Observable } from 'rxjs';
|
|
3
|
-
/**
|
|
4
|
-
* Converts changes observable of a QueryList to an Observable of arrays
|
|
5
|
-
*/
|
|
6
|
-
export declare function tuiQueryListChanges<T>(queryList: QueryList<T>): Observable<readonly T[]>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type PipeTransform } from '@angular/core';
|
|
2
|
-
import { type TuiDurationOptions } from '@taiga-ui/core/animations';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class TuiAnimationPipe implements PipeTransform {
|
|
5
|
-
private readonly speed;
|
|
6
|
-
readonly transform: ({ duration, speed, value, ...params }?: Partial<{
|
|
7
|
-
duration: number;
|
|
8
|
-
speed: number;
|
|
9
|
-
value: string;
|
|
10
|
-
}> & Record<string, any>) => TuiDurationOptions;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiAnimationPipe, never>;
|
|
12
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<TuiAnimationPipe, "tuiAnimation", true>;
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './animation.pipe';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './is-present.pipe';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type PipeTransform } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class TuiIsPresentPipe implements PipeTransform {
|
|
4
|
-
transform<T>(value?: T | null): value is T;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiIsPresentPipe, never>;
|
|
6
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<TuiIsPresentPipe, "tuiIsPresent", true>;
|
|
7
|
-
}
|
package/pipes/keys/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './keys.pipe';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type PipeTransform } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class TuiKeysPipe implements PipeTransform {
|
|
4
|
-
transform(object: Record<any, any>): string[];
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiKeysPipe, never>;
|
|
6
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<TuiKeysPipe, "tuiKeys", true>;
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type PipeTransform } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class TuiRepeatTimesPipe implements PipeTransform {
|
|
4
|
-
transform(n: number): number[];
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiRepeatTimesPipe, never>;
|
|
6
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<TuiRepeatTimesPipe, "tuiRepeatTimes", true>;
|
|
7
|
-
}
|
package/pipes/replace/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './replace.pipe';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type PipeTransform } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class TuiReplacePipe implements PipeTransform {
|
|
4
|
-
transform(value: string | null | undefined, search: RegExp | string, replaceValue: string | ((substring: string, ...args: unknown[]) => string)): string;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiReplacePipe, never>;
|
|
6
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<TuiReplacePipe, "tuiReplace", true>;
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './to-array.pipe';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type PipeTransform, type QueryList } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class TuiToArrayPipe implements PipeTransform {
|
|
4
|
-
transform<T>(items: Map<any, any> | QueryList<T> | Set<any>): readonly T[];
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiToArrayPipe, never>;
|
|
6
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<TuiToArrayPipe, "tuiToArray", true>;
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replace-functions.js","sourceRoot":"","sources":["../../../../../../projects/cdk/schematics/ng-update/v4/steps/replace-functions.ts"],"names":[],"mappings":";;AAKA,4CAmBC;AAxBD,uCAA8B;AAE9B,4FAAoF;AAGpF,SAAgB,gBAAgB,CAAC,SAAqC;IAClE,SAAS,CAAC,OAAO,CAAC,CAAC,EAAC,IAAI,EAAE,EAAE,EAAE,eAAe,EAAC,EAAE,EAAE;QAC9C,IAAA,sDAAwB,EAAC,IAAI,EAAE,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YAC5D,IAAI,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC;gBACrB,OAAO;YACX,CAAC;YAED,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,EAAE,CAAC;YAE/B,IAAI,eAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,eAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC;gBAClE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,eAAe,CACnB,MAAM,aAAN,MAAM,uBAAN,MAAM,CACA,OAAO,CAAC,EAAC,oBAAoB,EAAE,KAAK,EAAC,EACtC,IAAI,GACJ,OAAO,CAAC,IAAI,EAAE,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,IAAI,CAAC,CACjC,CAAC;YACN,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/services/id.service.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class TuiIdService {
|
|
3
|
-
private static autoId;
|
|
4
|
-
generate(): string;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiIdService, never>;
|
|
6
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<TuiIdService>;
|
|
7
|
-
}
|
|
8
|
-
export declare function tuiInjectId(): string;
|
package/services/index.d.ts
DELETED