ngx-tethys 19.1.13 → 19.1.15-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
4
4
 
5
+ ## [19.1.15-0](https://github.com/atinc/ngx-tethys/compare/19.1.14...19.1.15-0) (2025-12-19)
6
+
7
+
8
+ ### Features
9
+
10
+ * **anchor:** add thyDisabledContainerScroll to support disabling the scrolling container jump, and keep the link activation within the visible range #TINFR-3243 ([#3643](https://github.com/atinc/ngx-tethys/issues/3643)) ([9747da4](https://github.com/atinc/ngx-tethys/commit/9747da4ae1df4fb73705f6203851a6bd5188db90)), closes [#TINFR-3243](https://github.com/atinc/ngx-tethys/issues/TINFR-3243)
11
+
12
+
13
+
14
+ ## [19.1.14](https://github.com/atinc/ngx-tethys/compare/19.1.13...19.1.14) (2025-11-12)
15
+
16
+
17
+ ### Features
18
+
19
+ * **input-number:** support thyShowStepControls #TINFR-2994 ([#3605](https://github.com/atinc/ngx-tethys/issues/3605)) ([c06a6f8](https://github.com/atinc/ngx-tethys/commit/c06a6f813e619ef63ac99459f8c149439c93bafd)), closes [#TINFR-2994](https://github.com/atinc/ngx-tethys/issues/TINFR-2994)
20
+
21
+
22
+
5
23
  ## [19.1.13](https://github.com/atinc/ngx-tethys/compare/19.1.12...19.1.13) (2025-11-05)
6
24
 
7
25
 
@@ -34,6 +34,10 @@ export declare class ThyAnchor implements IThyAnchorComponent, OnDestroy, AfterV
34
34
  * 设置导航方向
35
35
  */
36
36
  readonly thyDirection: import("@angular/core").InputSignal<"horizontal" | "vertical">;
37
+ /**
38
+ * 是否禁用容器滚动
39
+ */
40
+ readonly thyDisabledContainerScroll: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
37
41
  /**
38
42
  * 点击项触发
39
43
  */
@@ -47,10 +51,11 @@ export declare class ThyAnchor implements IThyAnchorComponent, OnDestroy, AfterV
47
51
  'max-height': string;
48
52
  }>;
49
53
  readonly container: Signal<HTMLElement | Window>;
50
- private links;
54
+ links: ThyAnchorLink[];
51
55
  private animating;
52
56
  private destroy$;
53
57
  private handleScrollTimeoutID;
58
+ private wrapper;
54
59
  registerLink(link: ThyAnchorLink): void;
55
60
  unregisterLink(link: ThyAnchorLink): void;
56
61
  constructor();
@@ -60,9 +65,10 @@ export declare class ThyAnchor implements IThyAnchorComponent, OnDestroy, AfterV
60
65
  private registerScrollEvent;
61
66
  handleScroll(): void;
62
67
  private clearActive;
63
- private handleActive;
68
+ handleActive(linkComponent: ThyAnchorLink): void;
69
+ private linkVisible;
64
70
  private setVisible;
65
71
  handleScrollTo(linkComponent: ThyAnchorLink): void;
66
72
  static ɵfac: i0.ɵɵFactoryDeclaration<ThyAnchor, never>;
67
- static ɵcmp: i0.ɵɵComponentDeclaration<ThyAnchor, "thy-anchor", ["thyAnchor"], { "thyAffix": { "alias": "thyAffix"; "required": false; "isSignal": true; }; "thyBounds": { "alias": "thyBounds"; "required": false; "isSignal": true; }; "thyOffsetTop": { "alias": "thyOffsetTop"; "required": false; "isSignal": true; }; "thyContainer": { "alias": "thyContainer"; "required": false; "isSignal": true; }; "thyDirection": { "alias": "thyDirection"; "required": false; "isSignal": true; }; }, { "thyClick": "thyClick"; "thyScroll": "thyScroll"; }, never, ["*"], true, never>;
73
+ static ɵcmp: i0.ɵɵComponentDeclaration<ThyAnchor, "thy-anchor", ["thyAnchor"], { "thyAffix": { "alias": "thyAffix"; "required": false; "isSignal": true; }; "thyBounds": { "alias": "thyBounds"; "required": false; "isSignal": true; }; "thyOffsetTop": { "alias": "thyOffsetTop"; "required": false; "isSignal": true; }; "thyContainer": { "alias": "thyContainer"; "required": false; "isSignal": true; }; "thyDirection": { "alias": "thyDirection"; "required": false; "isSignal": true; }; "thyDisabledContainerScroll": { "alias": "thyDisabledContainerScroll"; "required": false; "isSignal": true; }; }, { "thyClick": "thyClick"; "thyScroll": "thyScroll"; }, never, ["*"], true, never>;
68
74
  }
@@ -51,6 +51,10 @@ class ThyAnchor {
51
51
  * 设置导航方向
52
52
  */
53
53
  this.thyDirection = input('vertical');
54
+ /**
55
+ * 是否禁用容器滚动
56
+ */
57
+ this.thyDisabledContainerScroll = input(false, { transform: coerceBooleanProperty });
54
58
  /**
55
59
  * 点击项触发
56
60
  */
@@ -74,6 +78,7 @@ class ThyAnchor {
74
78
  this.animating = false;
75
79
  this.destroy$ = new Subject();
76
80
  this.handleScrollTimeoutID = -1;
81
+ this.wrapper = viewChild.required('wrapper');
77
82
  effect(() => {
78
83
  if (this.thyContainer()) {
79
84
  this.registerScrollEvent();
@@ -101,6 +106,9 @@ class ThyAnchor {
101
106
  if (!this.platform.isBrowser) {
102
107
  return;
103
108
  }
109
+ if (this.thyDisabledContainerScroll()) {
110
+ return;
111
+ }
104
112
  this.destroy$.next();
105
113
  this.zone.runOutsideAngular(() => {
106
114
  fromEvent(this.container(), 'scroll', { passive: true })
@@ -156,14 +164,39 @@ class ThyAnchor {
156
164
  const linkNode = linkComponent.getLinkTitleElement();
157
165
  const horizontalAnchor = this.thyDirection() === 'horizontal';
158
166
  const ink = this.ink();
159
- ink.nativeElement.style.top = horizontalAnchor ? '' : `${linkNode.offsetTop}px`;
160
- ink.nativeElement.style.height = horizontalAnchor ? '' : `${linkNode.clientHeight}px`;
161
- ink.nativeElement.style.left = horizontalAnchor ? `${linkNode.offsetLeft}px` : '';
162
- ink.nativeElement.style.width = horizontalAnchor ? `${linkNode.clientWidth}px` : '';
167
+ const linkOffset = {
168
+ top: linkNode.offsetTop,
169
+ left: linkNode.offsetLeft,
170
+ height: linkNode.clientHeight,
171
+ width: linkNode.clientWidth
172
+ };
173
+ ink.nativeElement.style.top = horizontalAnchor ? '' : `${linkOffset.top}px`;
174
+ ink.nativeElement.style.height = horizontalAnchor ? '' : `${linkOffset.height}px`;
175
+ ink.nativeElement.style.left = horizontalAnchor ? `${linkOffset.left}px` : '';
176
+ ink.nativeElement.style.width = horizontalAnchor ? `${linkOffset.width}px` : '';
163
177
  this.visible = true;
164
178
  this.setVisible();
179
+ this.linkVisible(linkOffset, horizontalAnchor);
165
180
  this.thyScroll.emit(linkComponent);
166
181
  }
182
+ linkVisible(linkOffset, horizontalAnchor) {
183
+ const wrapper = this.wrapper()?.nativeElement;
184
+ if (!wrapper) {
185
+ return;
186
+ }
187
+ const scrollTo = horizontalAnchor ? linkOffset.left : linkOffset.top;
188
+ const scrollPos = horizontalAnchor ? wrapper.scrollLeft : wrapper.scrollTop;
189
+ const wrapperSize = horizontalAnchor ? wrapper.offsetWidth : wrapper.offsetHeight;
190
+ const linkSize = horizontalAnchor ? linkOffset.width : linkOffset.height;
191
+ if (scrollTo < scrollPos || scrollTo + linkSize > scrollPos + wrapperSize) {
192
+ if (horizontalAnchor) {
193
+ wrapper.scrollLeft = scrollTo;
194
+ }
195
+ else {
196
+ wrapper.scrollTop = scrollTo;
197
+ }
198
+ }
199
+ }
167
200
  setVisible() {
168
201
  const visible = this.visible;
169
202
  const visibleClassname = 'visible';
@@ -178,28 +211,30 @@ class ThyAnchor {
178
211
  }
179
212
  }
180
213
  handleScrollTo(linkComponent) {
181
- const container = this.container() instanceof HTMLElement ? this.container() : this.document;
182
- const linkElement = container.querySelector(linkComponent.thyHref());
183
- if (!linkElement) {
184
- return;
214
+ if (!this.thyDisabledContainerScroll()) {
215
+ const container = this.container() instanceof HTMLElement ? this.container() : this.document;
216
+ const linkElement = container.querySelector(linkComponent.thyHref());
217
+ if (!linkElement) {
218
+ return;
219
+ }
220
+ this.animating = true;
221
+ const containerScrollTop = this.scrollService.getScroll(this.container());
222
+ const elementOffsetTop = getOffset(linkElement, this.container()).top;
223
+ const targetScrollTop = containerScrollTop + elementOffsetTop - (this.thyOffsetTop() || 0);
224
+ this.scrollService.scrollTo(this.container(), targetScrollTop, undefined, () => {
225
+ this.animating = false;
226
+ });
185
227
  }
186
- this.animating = true;
187
- const containerScrollTop = this.scrollService.getScroll(this.container());
188
- const elementOffsetTop = getOffset(linkElement, this.container()).top;
189
- const targetScrollTop = containerScrollTop + elementOffsetTop - (this.thyOffsetTop() || 0);
190
- this.scrollService.scrollTo(this.container(), targetScrollTop, undefined, () => {
191
- this.animating = false;
192
- });
193
228
  this.handleActive(linkComponent);
194
229
  this.thyClick.emit(linkComponent);
195
230
  }
196
231
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyAnchor, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
197
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyAnchor, isStandalone: true, selector: "thy-anchor", inputs: { thyAffix: { classPropertyName: "thyAffix", publicName: "thyAffix", isSignal: true, isRequired: false, transformFunction: null }, thyBounds: { classPropertyName: "thyBounds", publicName: "thyBounds", isSignal: true, isRequired: false, transformFunction: null }, thyOffsetTop: { classPropertyName: "thyOffsetTop", publicName: "thyOffsetTop", isSignal: true, isRequired: false, transformFunction: null }, thyContainer: { classPropertyName: "thyContainer", publicName: "thyContainer", isSignal: true, isRequired: false, transformFunction: null }, thyDirection: { classPropertyName: "thyDirection", publicName: "thyDirection", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyClick: "thyClick", thyScroll: "thyScroll" }, providers: [
232
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyAnchor, isStandalone: true, selector: "thy-anchor", inputs: { thyAffix: { classPropertyName: "thyAffix", publicName: "thyAffix", isSignal: true, isRequired: false, transformFunction: null }, thyBounds: { classPropertyName: "thyBounds", publicName: "thyBounds", isSignal: true, isRequired: false, transformFunction: null }, thyOffsetTop: { classPropertyName: "thyOffsetTop", publicName: "thyOffsetTop", isSignal: true, isRequired: false, transformFunction: null }, thyContainer: { classPropertyName: "thyContainer", publicName: "thyContainer", isSignal: true, isRequired: false, transformFunction: null }, thyDirection: { classPropertyName: "thyDirection", publicName: "thyDirection", isSignal: true, isRequired: false, transformFunction: null }, thyDisabledContainerScroll: { classPropertyName: "thyDisabledContainerScroll", publicName: "thyDisabledContainerScroll", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thyClick: "thyClick", thyScroll: "thyScroll" }, providers: [
198
233
  {
199
234
  provide: THY_ANCHOR_COMPONENT,
200
235
  useExisting: ThyAnchor
201
236
  }
202
- ], viewQueries: [{ propertyName: "ink", first: true, predicate: ["ink"], descendants: true, isSignal: true }], exportAs: ["thyAnchor"], ngImport: i0, template: `
237
+ ], viewQueries: [{ propertyName: "ink", first: true, predicate: ["ink"], descendants: true, isSignal: true }, { propertyName: "wrapper", first: true, predicate: ["wrapper"], descendants: true, isSignal: true }], exportAs: ["thyAnchor"], ngImport: i0, template: `
203
238
  @if (thyAffix()) {
204
239
  <thy-affix [thyOffsetTop]="thyOffsetTop()" [thyContainer]="container()">
205
240
  <ng-template [ngTemplateOutlet]="content"></ng-template>
@@ -209,6 +244,7 @@ class ThyAnchor {
209
244
  }
210
245
  <ng-template #content>
211
246
  <div
247
+ #wrapper
212
248
  class="thy-anchor-wrapper"
213
249
  [ngClass]="{ 'thy-anchor-wrapper-horizontal': thyDirection() === 'horizontal' }"
214
250
  [ngStyle]="wrapperStyle()">
@@ -238,6 +274,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
238
274
  }
239
275
  <ng-template #content>
240
276
  <div
277
+ #wrapper
241
278
  class="thy-anchor-wrapper"
242
279
  [ngClass]="{ 'thy-anchor-wrapper-horizontal': thyDirection() === 'horizontal' }"
243
280
  [ngStyle]="wrapperStyle()">
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-tethys-anchor.mjs","sources":["../../../src/anchor/anchor.token.ts","../../../src/anchor/anchor.component.ts","../../../src/anchor/anchor-link.component.ts","../../../src/anchor/anchor.module.ts","../../../src/anchor/ngx-tethys-anchor.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport interface IThyAnchorLinkComponent {}\n\nexport interface IThyAnchorComponent {\n registerLink(link: IThyAnchorLinkComponent): void;\n unregisterLink(link: IThyAnchorLinkComponent): void;\n handleScrollTo(linkComponent: IThyAnchorLinkComponent): void;\n}\n\nexport const THY_ANCHOR_COMPONENT = new InjectionToken<IThyAnchorComponent>('THY_ANCHOR_COMPONENT');\n","import { Platform } from '@angular/cdk/platform';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n NgZone,\n OnDestroy,\n Renderer2,\n ViewEncapsulation,\n numberAttribute,\n inject,\n input,\n viewChild,\n output,\n effect,\n computed,\n Signal\n} from '@angular/core';\nimport { Subject, fromEvent } from 'rxjs';\nimport { takeUntil, throttleTime } from 'rxjs/operators';\n\nimport { DOCUMENT, NgClass, NgStyle, NgTemplateOutlet } from '@angular/common';\nimport { ThyAffix } from 'ngx-tethys/affix';\nimport { ThyScrollService } from 'ngx-tethys/core';\nimport { coerceBooleanProperty, getOffset } from 'ngx-tethys/util';\nimport { ThyAnchorLink } from './anchor-link.component';\nimport { IThyAnchorComponent, THY_ANCHOR_COMPONENT } from './anchor.token';\n\ninterface Section {\n linkComponent: ThyAnchorLink;\n top: number;\n}\n\nconst sharpMatcherRegx = /#([^#]+)$/;\n\n/**\n * 锚点组件\n * @name thy-anchor\n */\n@Component({\n selector: 'thy-anchor',\n exportAs: 'thyAnchor',\n preserveWhitespaces: false,\n template: `\n @if (thyAffix()) {\n <thy-affix [thyOffsetTop]=\"thyOffsetTop()\" [thyContainer]=\"container()\">\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n </thy-affix>\n } @else {\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n }\n <ng-template #content>\n <div\n class=\"thy-anchor-wrapper\"\n [ngClass]=\"{ 'thy-anchor-wrapper-horizontal': thyDirection() === 'horizontal' }\"\n [ngStyle]=\"wrapperStyle()\">\n <div class=\"thy-anchor\">\n <div class=\"thy-anchor-ink\">\n <div class=\"thy-anchor-ink-full\" #ink></div>\n </div>\n <ng-content></ng-content>\n </div>\n </div>\n </ng-template>\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ThyAffix, NgTemplateOutlet, NgStyle, NgClass],\n providers: [\n {\n provide: THY_ANCHOR_COMPONENT,\n useExisting: ThyAnchor\n }\n ]\n})\nexport class ThyAnchor implements IThyAnchorComponent, OnDestroy, AfterViewInit {\n private document = inject(DOCUMENT);\n private cdr = inject(ChangeDetectorRef);\n private platform = inject(Platform);\n private zone = inject(NgZone);\n private renderer = inject(Renderer2);\n private scrollService = inject(ThyScrollService);\n\n readonly ink = viewChild.required<ElementRef>('ink');\n\n /**\n * 固定模式\n */\n readonly thyAffix = input(true, { transform: coerceBooleanProperty });\n\n /**\n * 锚点区域边界,单位:px\n */\n readonly thyBounds = input(5, { transform: numberAttribute });\n\n /**\n * 缓冲的偏移量阈值\n */\n readonly thyOffsetTop = input<number, unknown>(undefined, { transform: numberAttribute });\n\n /**\n * 指定滚动的容器\n */\n readonly thyContainer = input<string | HTMLElement>(undefined);\n\n /**\n * 设置导航方向\n */\n readonly thyDirection = input<'vertical' | 'horizontal'>('vertical');\n\n /**\n * 点击项触发\n */\n readonly thyClick = output<ThyAnchorLink>();\n\n /**\n * 滚动到某锚点时触发\n */\n readonly thyScroll = output<ThyAnchorLink>();\n\n visible = false;\n\n readonly wrapperStyle = computed(() => {\n return {\n 'max-height': this.thyOffsetTop() ? `calc(100vh - ${this.thyOffsetTop()}px)` : '100vh'\n };\n });\n\n readonly container: Signal<HTMLElement | Window> = computed(() => {\n return (\n (typeof this.thyContainer() === 'string'\n ? (this.document.querySelector(this.thyContainer() as string) as HTMLElement)\n : (this.thyContainer() as HTMLElement)) || window\n );\n });\n\n private links: ThyAnchorLink[] = [];\n\n private animating = false;\n\n private destroy$ = new Subject<void>();\n\n private handleScrollTimeoutID: any = -1;\n\n registerLink(link: ThyAnchorLink): void {\n this.links.push(link);\n }\n\n unregisterLink(link: ThyAnchorLink): void {\n this.links.splice(this.links.indexOf(link), 1);\n }\n\n constructor() {\n effect(() => {\n if (this.thyContainer()) {\n this.registerScrollEvent();\n }\n });\n }\n\n ngAfterViewInit(): void {\n this.warningPrompt();\n this.registerScrollEvent();\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.handleScrollTimeoutID);\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n private warningPrompt() {\n if (this.thyDirection() === 'horizontal') {\n const hasChildren = this.links.some(link =>\n Array.from(link?.elementRef?.nativeElement?.childNodes)?.some((item: HTMLElement) => item?.nodeName === 'THY-ANCHOR-LINK')\n );\n if (hasChildren) {\n console.warn(\"Anchor link nesting is not supported when 'Anchor' direction is horizontal.\");\n }\n }\n }\n\n private registerScrollEvent(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n this.destroy$.next();\n this.zone.runOutsideAngular(() => {\n fromEvent(this.container(), 'scroll', { passive: true })\n .pipe(throttleTime(50), takeUntil(this.destroy$))\n .subscribe(() => this.handleScroll());\n });\n // Browser would maintain the scrolling position when refreshing.\n // So we have to delay calculation in avoid of getting a incorrect result.\n this.handleScrollTimeoutID = setTimeout(() => this.handleScroll());\n }\n\n handleScroll(): void {\n if (typeof document === 'undefined' || this.animating) {\n return;\n }\n const container: HTMLElement =\n this.container() instanceof HTMLElement ? (this.container() as HTMLElement) : (this.document as unknown as HTMLElement);\n\n const sections: Section[] = [];\n const scope = (this.thyOffsetTop() || 0) + this.thyBounds();\n this.links.forEach(linkComponent => {\n const sharpLinkMatch = sharpMatcherRegx.exec(linkComponent.thyHref().toString());\n if (!sharpLinkMatch) {\n return;\n }\n const target = container.querySelector(`#${sharpLinkMatch[1]}`) as HTMLElement;\n if (target) {\n const top = getOffset(target, this.container()).top;\n if (top < scope) {\n sections.push({\n top,\n linkComponent\n });\n }\n }\n });\n\n this.visible = !!sections.length;\n if (!this.visible) {\n this.clearActive();\n this.cdr.detectChanges();\n } else {\n const maxSection = sections.reduce((prev, curr) => (curr.top > prev.top ? curr : prev));\n this.handleActive(maxSection.linkComponent);\n }\n this.setVisible();\n }\n\n private clearActive(): void {\n this.links.forEach(i => {\n i.unsetActive();\n });\n }\n\n private handleActive(linkComponent: ThyAnchorLink): void {\n this.clearActive();\n linkComponent.setActive();\n const linkNode = linkComponent.getLinkTitleElement();\n const horizontalAnchor = this.thyDirection() === 'horizontal';\n\n const ink = this.ink();\n ink.nativeElement.style.top = horizontalAnchor ? '' : `${linkNode.offsetTop}px`;\n ink.nativeElement.style.height = horizontalAnchor ? '' : `${linkNode.clientHeight}px`;\n ink.nativeElement.style.left = horizontalAnchor ? `${linkNode.offsetLeft}px` : '';\n ink.nativeElement.style.width = horizontalAnchor ? `${linkNode.clientWidth}px` : '';\n this.visible = true;\n this.setVisible();\n this.thyScroll.emit(linkComponent);\n }\n\n private setVisible(): void {\n const visible = this.visible;\n const visibleClassname = 'visible';\n const ink = this.ink();\n if (ink) {\n if (visible) {\n this.renderer.addClass(ink.nativeElement, visibleClassname);\n } else {\n this.renderer.removeClass(ink.nativeElement, visibleClassname);\n }\n }\n }\n\n handleScrollTo(linkComponent: ThyAnchorLink): void {\n const container: HTMLElement =\n this.container() instanceof HTMLElement ? (this.container() as HTMLElement) : (this.document as unknown as HTMLElement);\n const linkElement: HTMLElement = container.querySelector(linkComponent.thyHref());\n if (!linkElement) {\n return;\n }\n\n this.animating = true;\n const containerScrollTop = this.scrollService.getScroll(this.container());\n const elementOffsetTop = getOffset(linkElement, this.container()).top;\n const targetScrollTop = containerScrollTop + elementOffsetTop - (this.thyOffsetTop() || 0);\n this.scrollService.scrollTo(this.container(), targetScrollTop, undefined, () => {\n this.animating = false;\n });\n this.handleActive(linkComponent);\n this.thyClick.emit(linkComponent);\n }\n}\n","import { Platform } from '@angular/cdk/platform';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n OnDestroy,\n OnInit,\n TemplateRef,\n ViewEncapsulation,\n inject,\n input,\n contentChild,\n viewChild,\n Signal,\n computed\n} from '@angular/core';\nimport { useHostRenderer } from '@tethys/cdk/dom';\n\nimport { IThyAnchorLinkComponent, THY_ANCHOR_COMPONENT } from './anchor.token';\nimport { NgTemplateOutlet } from '@angular/common';\n\n/**\n * 锚点链接组件,可供锚点跳转\n * @name thy-anchor-link,thyAnchorLink\n */\n@Component({\n selector: 'thy-link,thy-anchor-link',\n exportAs: 'thyLink,thyAnchorLink',\n preserveWhitespaces: false,\n template: `\n <a #linkTitle (click)=\"goToClick($event)\" href=\"{{ thyHref() }}\" class=\"thy-anchor-link-title\" title=\"{{ title() }}\">\n @if (title()) {\n <span>{{ title() }}</span>\n } @else {\n <ng-template [ngTemplateOutlet]=\"titleTemplate() || thyTemplate()\"></ng-template>\n }\n </a>\n <ng-content></ng-content>\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet]\n})\nexport class ThyAnchorLink implements IThyAnchorLinkComponent, OnInit, OnDestroy {\n elementRef = inject(ElementRef);\n private anchorComponent = inject(THY_ANCHOR_COMPONENT, { optional: true })!;\n private platform = inject(Platform);\n\n readonly title: Signal<string | null> = computed(() => {\n return this.thyTitle() instanceof TemplateRef ? null : (this.thyTitle() as string);\n });\n\n readonly titleTemplate: Signal<TemplateRef<any>> = computed(() => {\n return this.thyTitle() instanceof TemplateRef ? (this.thyTitle() as TemplateRef<any>) : null;\n });\n\n private hostRenderer = useHostRenderer();\n\n /**\n * 锚点链接\n */\n readonly thyHref = input('#');\n\n /**\n * 文字内容\n */\n readonly thyTitle = input<string | TemplateRef<void>>('');\n\n readonly thyTemplate = contentChild.required<TemplateRef<void>>('thyTemplate');\n\n readonly linkTitle = viewChild.required<ElementRef<HTMLAnchorElement>>('linkTitle');\n\n constructor() {\n const elementRef = this.elementRef;\n\n this.hostRenderer.addClass('thy-anchor-link');\n if (elementRef.nativeElement.tagName.toLowerCase() === 'thy-link') {\n console.warn(`'thy-link' and 'thyLink' are deprecated, please use 'thy-anchor-link' and 'thyAnchorLink' instead.`);\n }\n }\n\n ngOnInit(): void {\n this.anchorComponent.registerLink(this);\n }\n\n getLinkTitleElement(): HTMLAnchorElement {\n return this.linkTitle().nativeElement;\n }\n\n setActive(): void {\n this.hostRenderer.addClass('thy-anchor-link-active');\n }\n\n unsetActive(): void {\n this.hostRenderer.removeClass('thy-anchor-link-active');\n }\n\n goToClick(e: Event): void {\n e.preventDefault();\n e.stopPropagation();\n if (this.platform.isBrowser) {\n this.anchorComponent.handleScrollTo(this);\n }\n }\n\n ngOnDestroy(): void {\n this.anchorComponent.unregisterLink(this);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { PlatformModule } from '@angular/cdk/platform';\nimport { ThyAnchor } from './anchor.component';\nimport { ThyAnchorLink } from './anchor-link.component';\nimport { ThyAffixModule } from 'ngx-tethys/affix';\n\n@NgModule({\n exports: [ThyAnchor, ThyAnchorLink],\n imports: [CommonModule, PlatformModule, ThyAffixModule, ThyAnchor, ThyAnchorLink]\n})\nexport class ThyAnchorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAUO,MAAM,oBAAoB,GAAG,IAAI,cAAc,CAAsB,sBAAsB,CAAC;;ACyBnG,MAAM,gBAAgB,GAAG,WAAW;AAEpC;;;AAGG;MAqCU,SAAS,CAAA;AAqElB,IAAA,YAAY,CAAC,IAAmB,EAAA;AAC5B,QAAA,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;;AAGzB,IAAA,cAAc,CAAC,IAAmB,EAAA;AAC9B,QAAA,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;;AAGlD,IAAA,WAAA,GAAA;AA5EQ,QAAA,I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QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAFd,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,CAAA,EAAA,CAAA,CAAA;;2FAExD,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC;oBACnC,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa;AACnF,iBAAA;;;ACVD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-tethys-anchor.mjs","sources":["../../../src/anchor/anchor.token.ts","../../../src/anchor/anchor.component.ts","../../../src/anchor/anchor-link.component.ts","../../../src/anchor/anchor.module.ts","../../../src/anchor/ngx-tethys-anchor.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport interface IThyAnchorLinkComponent {}\n\nexport interface IThyAnchorComponent {\n registerLink(link: IThyAnchorLinkComponent): void;\n unregisterLink(link: IThyAnchorLinkComponent): void;\n handleScrollTo(linkComponent: IThyAnchorLinkComponent): void;\n}\n\nexport const THY_ANCHOR_COMPONENT = new InjectionToken<IThyAnchorComponent>('THY_ANCHOR_COMPONENT');\n","import { Platform } from '@angular/cdk/platform';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n NgZone,\n OnDestroy,\n Renderer2,\n ViewEncapsulation,\n numberAttribute,\n inject,\n input,\n viewChild,\n output,\n effect,\n computed,\n Signal\n} from '@angular/core';\nimport { Subject, fromEvent } from 'rxjs';\nimport { takeUntil, throttleTime } from 'rxjs/operators';\n\nimport { DOCUMENT, NgClass, NgStyle, NgTemplateOutlet } from '@angular/common';\nimport { ThyAffix } from 'ngx-tethys/affix';\nimport { ThyScrollService } from 'ngx-tethys/core';\nimport { coerceBooleanProperty, getOffset } from 'ngx-tethys/util';\nimport { ThyAnchorLink } from './anchor-link.component';\nimport { IThyAnchorComponent, THY_ANCHOR_COMPONENT } from './anchor.token';\n\ninterface Section {\n linkComponent: ThyAnchorLink;\n top: number;\n}\n\nconst sharpMatcherRegx = /#([^#]+)$/;\n\n/**\n * 锚点组件\n * @name thy-anchor\n */\n@Component({\n selector: 'thy-anchor',\n exportAs: 'thyAnchor',\n preserveWhitespaces: false,\n template: `\n @if (thyAffix()) {\n <thy-affix [thyOffsetTop]=\"thyOffsetTop()\" [thyContainer]=\"container()\">\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n </thy-affix>\n } @else {\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n }\n <ng-template #content>\n <div\n #wrapper\n class=\"thy-anchor-wrapper\"\n [ngClass]=\"{ 'thy-anchor-wrapper-horizontal': thyDirection() === 'horizontal' }\"\n [ngStyle]=\"wrapperStyle()\">\n <div class=\"thy-anchor\">\n <div class=\"thy-anchor-ink\">\n <div class=\"thy-anchor-ink-full\" #ink></div>\n </div>\n <ng-content></ng-content>\n </div>\n </div>\n </ng-template>\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ThyAffix, NgTemplateOutlet, NgStyle, NgClass],\n providers: [\n {\n provide: THY_ANCHOR_COMPONENT,\n useExisting: ThyAnchor\n }\n ]\n})\nexport class ThyAnchor implements IThyAnchorComponent, OnDestroy, AfterViewInit {\n private document = inject(DOCUMENT);\n private cdr = inject(ChangeDetectorRef);\n private platform = inject(Platform);\n private zone = inject(NgZone);\n private renderer = inject(Renderer2);\n private scrollService = inject(ThyScrollService);\n\n readonly ink = viewChild.required<ElementRef>('ink');\n\n /**\n * 固定模式\n */\n readonly thyAffix = input(true, { transform: coerceBooleanProperty });\n\n /**\n * 锚点区域边界,单位:px\n */\n readonly thyBounds = input(5, { transform: numberAttribute });\n\n /**\n * 缓冲的偏移量阈值\n */\n readonly thyOffsetTop = input<number, unknown>(undefined, { transform: numberAttribute });\n\n /**\n * 指定滚动的容器\n */\n readonly thyContainer = input<string | HTMLElement>(undefined);\n\n /**\n * 设置导航方向\n */\n readonly thyDirection = input<'vertical' | 'horizontal'>('vertical');\n\n /**\n * 是否禁用容器滚动\n */\n readonly thyDisabledContainerScroll = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 点击项触发\n */\n readonly thyClick = output<ThyAnchorLink>();\n\n /**\n * 滚动到某锚点时触发\n */\n readonly thyScroll = output<ThyAnchorLink>();\n\n visible = false;\n\n readonly wrapperStyle = computed(() => {\n return {\n 'max-height': this.thyOffsetTop() ? `calc(100vh - ${this.thyOffsetTop()}px)` : '100vh'\n };\n });\n\n readonly container: Signal<HTMLElement | Window> = computed(() => {\n return (\n (typeof this.thyContainer() === 'string'\n ? (this.document.querySelector(this.thyContainer() as string) as HTMLElement)\n : (this.thyContainer() as HTMLElement)) || window\n );\n });\n\n public links: ThyAnchorLink[] = [];\n\n private animating = false;\n\n private destroy$ = new Subject<void>();\n\n private handleScrollTimeoutID: any = -1;\n\n private wrapper = viewChild.required<ElementRef<HTMLDivElement>>('wrapper');\n\n registerLink(link: ThyAnchorLink): void {\n this.links.push(link);\n }\n\n unregisterLink(link: ThyAnchorLink): void {\n this.links.splice(this.links.indexOf(link), 1);\n }\n\n constructor() {\n effect(() => {\n if (this.thyContainer()) {\n this.registerScrollEvent();\n }\n });\n }\n\n ngAfterViewInit(): void {\n this.warningPrompt();\n this.registerScrollEvent();\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.handleScrollTimeoutID);\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n private warningPrompt() {\n if (this.thyDirection() === 'horizontal') {\n const hasChildren = this.links.some(link =>\n Array.from(link?.elementRef?.nativeElement?.childNodes)?.some((item: HTMLElement) => item?.nodeName === 'THY-ANCHOR-LINK')\n );\n if (hasChildren) {\n console.warn(\"Anchor link nesting is not supported when 'Anchor' direction is horizontal.\");\n }\n }\n }\n\n private registerScrollEvent(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n if (this.thyDisabledContainerScroll()) {\n return;\n }\n this.destroy$.next();\n this.zone.runOutsideAngular(() => {\n fromEvent(this.container(), 'scroll', { passive: true })\n .pipe(throttleTime(50), takeUntil(this.destroy$))\n .subscribe(() => this.handleScroll());\n });\n // Browser would maintain the scrolling position when refreshing.\n // So we have to delay calculation in avoid of getting a incorrect result.\n this.handleScrollTimeoutID = setTimeout(() => this.handleScroll());\n }\n\n handleScroll(): void {\n if (typeof document === 'undefined' || this.animating) {\n return;\n }\n const container: HTMLElement =\n this.container() instanceof HTMLElement ? (this.container() as HTMLElement) : (this.document as unknown as HTMLElement);\n\n const sections: Section[] = [];\n const scope = (this.thyOffsetTop() || 0) + this.thyBounds();\n this.links.forEach(linkComponent => {\n const sharpLinkMatch = sharpMatcherRegx.exec(linkComponent.thyHref().toString());\n if (!sharpLinkMatch) {\n return;\n }\n const target = container.querySelector(`#${sharpLinkMatch[1]}`) as HTMLElement;\n if (target) {\n const top = getOffset(target, this.container()).top;\n if (top < scope) {\n sections.push({\n top,\n linkComponent\n });\n }\n }\n });\n\n this.visible = !!sections.length;\n if (!this.visible) {\n this.clearActive();\n this.cdr.detectChanges();\n } else {\n const maxSection = sections.reduce((prev, curr) => (curr.top > prev.top ? curr : prev));\n this.handleActive(maxSection.linkComponent);\n }\n this.setVisible();\n }\n\n private clearActive(): void {\n this.links.forEach(i => {\n i.unsetActive();\n });\n }\n\n public handleActive(linkComponent: ThyAnchorLink): void {\n this.clearActive();\n linkComponent.setActive();\n const linkNode = linkComponent.getLinkTitleElement();\n const horizontalAnchor = this.thyDirection() === 'horizontal';\n\n const ink = this.ink();\n const linkOffset = {\n top: linkNode.offsetTop,\n left: linkNode.offsetLeft,\n height: linkNode.clientHeight,\n width: linkNode.clientWidth\n };\n ink.nativeElement.style.top = horizontalAnchor ? '' : `${linkOffset.top}px`;\n ink.nativeElement.style.height = horizontalAnchor ? '' : `${linkOffset.height}px`;\n ink.nativeElement.style.left = horizontalAnchor ? `${linkOffset.left}px` : '';\n ink.nativeElement.style.width = horizontalAnchor ? `${linkOffset.width}px` : '';\n this.visible = true;\n this.setVisible();\n this.linkVisible(linkOffset, horizontalAnchor);\n this.thyScroll.emit(linkComponent);\n }\n\n private linkVisible(linkOffset: { top: number; left: number; height: number; width: number }, horizontalAnchor: boolean): void {\n const wrapper = this.wrapper()?.nativeElement;\n if (!wrapper) {\n return;\n }\n const scrollTo = horizontalAnchor ? linkOffset.left : linkOffset.top;\n const scrollPos = horizontalAnchor ? wrapper.scrollLeft : wrapper.scrollTop;\n const wrapperSize = horizontalAnchor ? wrapper.offsetWidth : wrapper.offsetHeight;\n const linkSize = horizontalAnchor ? linkOffset.width : linkOffset.height;\n if (scrollTo < scrollPos || scrollTo + linkSize > scrollPos + wrapperSize) {\n if (horizontalAnchor) {\n wrapper.scrollLeft = scrollTo;\n } else {\n wrapper.scrollTop = scrollTo;\n }\n }\n }\n\n private setVisible(): void {\n const visible = this.visible;\n const visibleClassname = 'visible';\n const ink = this.ink();\n if (ink) {\n if (visible) {\n this.renderer.addClass(ink.nativeElement, visibleClassname);\n } else {\n this.renderer.removeClass(ink.nativeElement, visibleClassname);\n }\n }\n }\n\n handleScrollTo(linkComponent: ThyAnchorLink): void {\n if (!this.thyDisabledContainerScroll()) {\n const container: HTMLElement =\n this.container() instanceof HTMLElement ? (this.container() as HTMLElement) : (this.document as unknown as HTMLElement);\n const linkElement: HTMLElement = container.querySelector(linkComponent.thyHref());\n if (!linkElement) {\n return;\n }\n\n this.animating = true;\n const containerScrollTop = this.scrollService.getScroll(this.container());\n const elementOffsetTop = getOffset(linkElement, this.container()).top;\n const targetScrollTop = containerScrollTop + elementOffsetTop - (this.thyOffsetTop() || 0);\n this.scrollService.scrollTo(this.container(), targetScrollTop, undefined, () => {\n this.animating = false;\n });\n }\n this.handleActive(linkComponent);\n this.thyClick.emit(linkComponent);\n }\n}\n","import { Platform } from '@angular/cdk/platform';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n OnDestroy,\n OnInit,\n TemplateRef,\n ViewEncapsulation,\n inject,\n input,\n contentChild,\n viewChild,\n Signal,\n computed\n} from '@angular/core';\nimport { useHostRenderer } from '@tethys/cdk/dom';\n\nimport { IThyAnchorLinkComponent, THY_ANCHOR_COMPONENT } from './anchor.token';\nimport { NgTemplateOutlet } from '@angular/common';\n\n/**\n * 锚点链接组件,可供锚点跳转\n * @name thy-anchor-link,thyAnchorLink\n */\n@Component({\n selector: 'thy-link,thy-anchor-link',\n exportAs: 'thyLink,thyAnchorLink',\n preserveWhitespaces: false,\n template: `\n <a #linkTitle (click)=\"goToClick($event)\" href=\"{{ thyHref() }}\" class=\"thy-anchor-link-title\" title=\"{{ title() }}\">\n @if (title()) {\n <span>{{ title() }}</span>\n } @else {\n <ng-template [ngTemplateOutlet]=\"titleTemplate() || thyTemplate()\"></ng-template>\n }\n </a>\n <ng-content></ng-content>\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet]\n})\nexport class ThyAnchorLink implements IThyAnchorLinkComponent, OnInit, OnDestroy {\n elementRef = inject(ElementRef);\n private anchorComponent = inject(THY_ANCHOR_COMPONENT, { optional: true })!;\n private platform = inject(Platform);\n\n readonly title: Signal<string | null> = computed(() => {\n return this.thyTitle() instanceof TemplateRef ? null : (this.thyTitle() as string);\n });\n\n readonly titleTemplate: Signal<TemplateRef<any>> = computed(() => {\n return this.thyTitle() instanceof TemplateRef ? (this.thyTitle() as TemplateRef<any>) : null;\n });\n\n private hostRenderer = useHostRenderer();\n\n /**\n * 锚点链接\n */\n readonly thyHref = input('#');\n\n /**\n * 文字内容\n */\n readonly thyTitle = input<string | TemplateRef<void>>('');\n\n readonly thyTemplate = contentChild.required<TemplateRef<void>>('thyTemplate');\n\n readonly linkTitle = viewChild.required<ElementRef<HTMLAnchorElement>>('linkTitle');\n\n constructor() {\n const elementRef = this.elementRef;\n\n this.hostRenderer.addClass('thy-anchor-link');\n if (elementRef.nativeElement.tagName.toLowerCase() === 'thy-link') {\n console.warn(`'thy-link' and 'thyLink' are deprecated, please use 'thy-anchor-link' and 'thyAnchorLink' instead.`);\n }\n }\n\n ngOnInit(): void {\n this.anchorComponent.registerLink(this);\n }\n\n getLinkTitleElement(): HTMLAnchorElement {\n return this.linkTitle().nativeElement;\n }\n\n setActive(): void {\n this.hostRenderer.addClass('thy-anchor-link-active');\n }\n\n unsetActive(): void {\n this.hostRenderer.removeClass('thy-anchor-link-active');\n }\n\n goToClick(e: Event): void {\n e.preventDefault();\n e.stopPropagation();\n if (this.platform.isBrowser) {\n this.anchorComponent.handleScrollTo(this);\n }\n }\n\n ngOnDestroy(): void {\n this.anchorComponent.unregisterLink(this);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { PlatformModule } from '@angular/cdk/platform';\nimport { ThyAnchor } from './anchor.component';\nimport { ThyAnchorLink } from './anchor-link.component';\nimport { ThyAffixModule } from 'ngx-tethys/affix';\n\n@NgModule({\n exports: [ThyAnchor, ThyAnchorLink],\n imports: [CommonModule, PlatformModule, ThyAffixModule, ThyAnchor, ThyAnchorLink]\n})\nexport class ThyAnchorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAUO,MAAM,oBAAoB,GAAG,IAAI,cAAc,CAAsB,sBAAsB,CAAC;;ACyBnG,MAAM,gBAAgB,GAAG,WAAW;AAEpC;;;AAGG;MAsCU,SAAS,CAAA;AA4ElB,IAAA,YAAY,CAAC,IAAmB,EAAA;AAC5B,QAAA,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;;AAGzB,IAAA,cAAc,CAAC,IAAmB,EAAA;AAC9B,QAAA,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;;AAGlD,IAAA,WAAA,G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EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAFd,OAAA,EAAA,CAAA,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa,CADtE,EAAA,OAAA,EAAA,CAAA,SAAS,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA;AAGzB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAFd,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,CAAA,EAAA,CAAA,CAAA;;2FAExD,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC;oBACnC,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa;AACnF,iBAAA;;;ACVD;;AAEG;;;;"}
@@ -708,7 +708,7 @@ class ThyColorInputs {
708
708
  this.colorChange.emit(newColor);
709
709
  }
710
710
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyColorInputs, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
711
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.8", type: ThyColorInputs, isStandalone: true, selector: "thy-color-inputs", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { colorChange: "colorChange" }, host: { properties: { "class.thy-color-inputs": "this.className" } }, ngImport: i0, template: "<div class=\"hex-column\">\n <thy-input-group class=\"hex-input-group\">\n <ng-template #prefix>\n <span>#</span>\n </ng-template>\n <input\n class=\"px-0 form-control-xs\"\n thyInput\n [(ngModel)]=\"hex\"\n maxlength=\"6\"\n (blur)=\"onInputChange($event, 'hex')\"\n (thyEnter)=\"onInputChange($event, 'hex')\" />\n </thy-input-group>\n <span>HEX</span>\n</div>\n<div class=\"column\">\n <thy-input-number\n thySize=\"xs\"\n [thyMin]=\"0\"\n [thyMax]=\"255\"\n class=\"px-0 text-center\"\n [(ngModel)]=\"color().rgba.red\"\n (thyBlur)=\"onInputChange($event, 'R')\"\n (thyEnter)=\"onInputChange($event, 'R')\"></thy-input-number>\n <span>R</span>\n</div>\n<div class=\"column\">\n <thy-input-number\n thySize=\"xs\"\n [thyMin]=\"0\"\n [thyMax]=\"255\"\n class=\"px-0 text-center\"\n [(ngModel)]=\"color().rgba.green\"\n (thyBlur)=\"onInputChange($event, 'G')\"\n (thyEnter)=\"onInputChange($event, 'G')\"></thy-input-number>\n <span>G</span>\n</div>\n<div class=\"column\">\n <thy-input-number\n thySize=\"xs\"\n [thyMin]=\"0\"\n [thyMax]=\"255\"\n class=\"px-0 text-center\"\n [(ngModel)]=\"color().rgba.blue\"\n (thyBlur)=\"onInputChange($event, 'B')\"\n (thyEnter)=\"onInputChange($event, 'B')\"></thy-input-number>\n <span>B</span>\n</div>\n<div class=\"column\">\n <thy-input-number\n [thyMin]=\"0\"\n [thyMax]=\"100\"\n thySize=\"xs\"\n class=\"px-0 text-center\"\n [(ngModel)]=\"alpha\"\n (thyBlur)=\"onInputChange($event, 'A')\"\n (thyEnter)=\"onInputChange($event, 'A')\"></thy-input-number>\n <span>A</span>\n</div>\n", dependencies: [{ kind: "directive", type: ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ThyEnterDirective, selector: "[thyEnter]", outputs: ["thyEnter"] }, { kind: "component", type: ThyInputNumber, selector: "thy-input-number", inputs: ["thyAutoFocus", "thyPlaceholder", "thyDisabled", "thyMax", "thyMin", "thyStep", "thyStepDelay", "thySize", "thyPrecision", "thySuffix"], outputs: ["thyBlur", "thyFocus", "thyStepChange"] }, { kind: "component", type: ThyInputGroup, selector: "thy-input-group", inputs: ["thyAppendText", "thyAppendTextTranslateKey", "thyPrependText", "thyPrependTextTranslateKey", "thySize"] }] }); }
711
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.8", type: ThyColorInputs, isStandalone: true, selector: "thy-color-inputs", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { colorChange: "colorChange" }, host: { properties: { "class.thy-color-inputs": "this.className" } }, ngImport: i0, template: "<div class=\"hex-column\">\n <thy-input-group class=\"hex-input-group\">\n <ng-template #prefix>\n <span>#</span>\n </ng-template>\n <input\n class=\"px-0 form-control-xs\"\n thyInput\n [(ngModel)]=\"hex\"\n maxlength=\"6\"\n (blur)=\"onInputChange($event, 'hex')\"\n (thyEnter)=\"onInputChange($event, 'hex')\" />\n </thy-input-group>\n <span>HEX</span>\n</div>\n<div class=\"column\">\n <thy-input-number\n thySize=\"xs\"\n [thyMin]=\"0\"\n [thyMax]=\"255\"\n class=\"px-0 text-center\"\n [(ngModel)]=\"color().rgba.red\"\n (thyBlur)=\"onInputChange($event, 'R')\"\n (thyEnter)=\"onInputChange($event, 'R')\"></thy-input-number>\n <span>R</span>\n</div>\n<div class=\"column\">\n <thy-input-number\n thySize=\"xs\"\n [thyMin]=\"0\"\n [thyMax]=\"255\"\n class=\"px-0 text-center\"\n [(ngModel)]=\"color().rgba.green\"\n (thyBlur)=\"onInputChange($event, 'G')\"\n (thyEnter)=\"onInputChange($event, 'G')\"></thy-input-number>\n <span>G</span>\n</div>\n<div class=\"column\">\n <thy-input-number\n thySize=\"xs\"\n [thyMin]=\"0\"\n [thyMax]=\"255\"\n class=\"px-0 text-center\"\n [(ngModel)]=\"color().rgba.blue\"\n (thyBlur)=\"onInputChange($event, 'B')\"\n (thyEnter)=\"onInputChange($event, 'B')\"></thy-input-number>\n <span>B</span>\n</div>\n<div class=\"column\">\n <thy-input-number\n [thyMin]=\"0\"\n [thyMax]=\"100\"\n thySize=\"xs\"\n class=\"px-0 text-center\"\n [(ngModel)]=\"alpha\"\n (thyBlur)=\"onInputChange($event, 'A')\"\n (thyEnter)=\"onInputChange($event, 'A')\"></thy-input-number>\n <span>A</span>\n</div>\n", dependencies: [{ kind: "directive", type: ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ThyEnterDirective, selector: "[thyEnter]", outputs: ["thyEnter"] }, { kind: "component", type: ThyInputNumber, selector: "thy-input-number", inputs: ["thyAutoFocus", "thyPlaceholder", "thyDisabled", "thyMax", "thyMin", "thyStep", "thyShowStepControls", "thyStepDelay", "thySize", "thyPrecision", "thySuffix"], outputs: ["thyBlur", "thyFocus", "thyStepChange"] }, { kind: "component", type: ThyInputGroup, selector: "thy-input-group", inputs: ["thyAppendText", "thyAppendTextTranslateKey", "thyPrependText", "thyPrependTextTranslateKey", "thySize"] }] }); }
712
712
  }
713
713
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyColorInputs, decorators: [{
714
714
  type: Component,