ngx-tethys 19.0.5 → 19.0.6
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 +11 -0
- package/anchor/anchor-link.component.d.ts +2 -1
- package/anchor/anchor.component.d.ts +2 -1
- package/anchor/anchor.token.d.ts +9 -0
- package/carousel/carousel.component.d.ts +2 -1
- package/carousel/carousel.token.d.ts +7 -0
- package/carousel/engine/carousel-base.d.ts +3 -3
- package/carousel/engine/carousel-fade.d.ts +2 -2
- package/carousel/engine/carousel-noop.d.ts +2 -2
- package/carousel/engine/carousel-slide.d.ts +2 -2
- package/collapse/collapse-item.component.d.ts +2 -1
- package/collapse/collapse.component.d.ts +5 -5
- package/collapse/collapse.token.d.ts +15 -0
- package/core/theme/enum.d.ts +5 -0
- package/core/theme/index.d.ts +1 -0
- package/core/theme/store.d.ts +1 -1
- package/core/theme/theme.d.ts +0 -5
- package/date-picker/standard-types.d.ts +7 -2
- package/drag-drop/drag-drop.service.d.ts +2 -2
- package/drag-drop/{drop-container.class.d.ts → drag-drop.token.d.ts} +12 -7
- package/drag-drop/drag-handle.directive.d.ts +2 -1
- package/drag-drop/drag-ref.d.ts +3 -5
- package/drag-drop/drag.directive.d.ts +3 -3
- package/drag-drop/drop-container.directive.d.ts +1 -1
- package/drag-drop/index.d.ts +1 -1
- package/fesm2022/ngx-tethys-anchor.mjs +17 -4
- package/fesm2022/ngx-tethys-anchor.mjs.map +1 -1
- package/fesm2022/ngx-tethys-carousel.mjs +15 -3
- package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
- package/fesm2022/ngx-tethys-collapse.mjs +90 -77
- package/fesm2022/ngx-tethys-collapse.mjs.map +1 -1
- package/fesm2022/ngx-tethys-core.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-picker.mjs +1 -1
- package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-drag-drop.mjs +0 -3
- package/fesm2022/ngx-tethys-drag-drop.mjs.map +1 -1
- package/fesm2022/ngx-tethys-grid.mjs +11 -10
- package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
- package/fesm2022/ngx-tethys-guider.mjs +41 -46
- package/fesm2022/ngx-tethys-guider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-i18n.mjs +51 -54
- package/fesm2022/ngx-tethys-i18n.mjs.map +1 -1
- package/fesm2022/ngx-tethys-image.mjs +17 -4
- package/fesm2022/ngx-tethys-image.mjs.map +1 -1
- package/fesm2022/ngx-tethys-list.mjs.map +1 -1
- package/fesm2022/ngx-tethys-message.mjs +2 -2
- package/fesm2022/ngx-tethys-message.mjs.map +1 -1
- package/fesm2022/ngx-tethys-notify.mjs +2 -2
- package/fesm2022/ngx-tethys-notify.mjs.map +1 -1
- package/fesm2022/ngx-tethys-radio.mjs +118 -108
- package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
- package/fesm2022/ngx-tethys-resizable.mjs +1 -0
- package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
- package/fesm2022/ngx-tethys-segment.mjs.map +1 -1
- package/fesm2022/ngx-tethys-shared.mjs +3 -18
- package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
- package/fesm2022/ngx-tethys-table.mjs.map +1 -1
- package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tree.mjs +0 -3
- package/fesm2022/ngx-tethys-tree.mjs.map +1 -1
- package/fesm2022/ngx-tethys-util.mjs +4 -8
- package/fesm2022/ngx-tethys-util.mjs.map +1 -1
- package/fesm2022/ngx-tethys.mjs +1 -1
- package/fesm2022/ngx-tethys.mjs.map +1 -1
- package/grid/grid.type.d.ts +5 -0
- package/grid/index.d.ts +1 -0
- package/grid/thy-grid-item.component.d.ts +1 -1
- package/grid/thy-grid.component.d.ts +1 -11
- package/guider/guider-manager.d.ts +2 -1
- package/guider/guider-ref.d.ts +6 -6
- package/guider/guider-step-ref.d.ts +3 -4
- package/guider/guider.interface.d.ts +26 -0
- package/i18n/i18n.service.d.ts +1 -1
- package/i18n/index.d.ts +2 -5
- package/i18n/locale.d.ts +1 -7
- package/i18n/locales/index.d.ts +5 -0
- package/i18n/util.d.ts +3 -0
- package/image/image-group.component.d.ts +4 -4
- package/image/image.directive.d.ts +2 -1
- package/image/image.token.d.ts +17 -0
- package/list/selection/selection-list.d.ts +2 -1
- package/list/selection/selection.interface.d.ts +2 -3
- package/message/abstract/abstract-message-queue.service.d.ts +2 -2
- package/message/abstract/abstract-message-ref.d.ts +6 -2
- package/package.json +1 -1
- package/radio/group/radio-group.component.d.ts +2 -1
- package/radio/radio.component.d.ts +3 -3
- package/radio/radio.token.d.ts +12 -0
- package/resizable/interface.d.ts +5 -0
- package/resizable/resizable.directive.d.ts +6 -18
- package/resizable/resizable.service.d.ts +1 -1
- package/resizable/resize-handle.component.d.ts +1 -6
- package/schematics/version.d.ts +1 -1
- package/schematics/version.js +1 -1
- package/segment/segment-item.component.d.ts +2 -1
- package/segment/segment.token.d.ts +10 -4
- package/shared/index.d.ts +1 -0
- package/shared/option/list-option/list-option.component.d.ts +10 -5
- package/shared/option/option.component.d.ts +1 -3
- package/shared/option/option.token.d.ts +11 -11
- package/shared/shared.type.d.ts +1 -0
- package/table/index.d.ts +1 -0
- package/table/styles/table.scss +9 -1
- package/table/table-skeleton.component.d.ts +11 -3
- package/table/table.component.d.ts +1 -3
- package/table/table.type.d.ts +3 -0
- package/timeline/index.d.ts +1 -0
- package/timeline/timeline-item.component.d.ts +1 -1
- package/timeline/timeline.component.d.ts +1 -1
- package/timeline/timeline.type.d.ts +1 -0
- package/tree/index.d.ts +0 -1
- package/tree/tree-abstract.d.ts +1 -1
- package/tree/tree-node.component.d.ts +17 -8
- package/tree/tree.class.d.ts +40 -1
- package/tree/tree.component.d.ts +1 -1
- package/tree/tree.pipe.d.ts +1 -1
- package/tree/tree.service.d.ts +3 -9
- package/tree/tree-node.class.d.ts +0 -29
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
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.0.6](https://github.com/atinc/ngx-tethys/compare/19.0.5...19.0.6) (2025-04-23)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **date-picker:** update TinyDate initialization and methods to handle timezone correctly ([#3345](https://github.com/atinc/ngx-tethys/issues/3345)) ([95d4316](https://github.com/atinc/ngx-tethys/commit/95d43167f74ac8dba34046e45f86502c8f3b9d0b))
|
|
11
|
+
* **notify:** resolve auto close for multiple notifications #TINFR-1903 ([#3355](https://github.com/atinc/ngx-tethys/issues/3355)) ([e69f83b](https://github.com/atinc/ngx-tethys/commit/e69f83b90aaef6987cd84baeba41cf83f2676e7c)), closes [#TINFR-1903](https://github.com/atinc/ngx-tethys/issues/TINFR-1903)
|
|
12
|
+
* **table:** handle fixed header border style ([#3347](https://github.com/atinc/ngx-tethys/issues/3347)) ([d6828b5](https://github.com/atinc/ngx-tethys/commit/d6828b5919cb31a1663a133edcf7e81c9e2dcbcd))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
5
16
|
## [19.0.5](https://github.com/atinc/ngx-tethys/compare/19.0.4...19.0.5) (2025-04-16)
|
|
6
17
|
|
|
7
18
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ElementRef, OnDestroy, OnInit, TemplateRef } from '@angular/core';
|
|
2
|
+
import { IThyAnchorLinkComponent } from './anchor.token';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
/**
|
|
4
5
|
* 锚点链接组件,可供锚点跳转
|
|
5
6
|
* @name thy-anchor-link,thyAnchorLink
|
|
6
7
|
*/
|
|
7
|
-
export declare class ThyAnchorLink implements OnInit, OnDestroy {
|
|
8
|
+
export declare class ThyAnchorLink implements IThyAnchorLinkComponent, OnInit, OnDestroy {
|
|
8
9
|
elementRef: ElementRef<any>;
|
|
9
10
|
private anchorComponent;
|
|
10
11
|
private platform;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { AfterViewInit, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { ThyAnchorLink } from './anchor-link.component';
|
|
3
|
+
import { IThyAnchorComponent } from './anchor.token';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
/**
|
|
5
6
|
* 锚点组件
|
|
6
7
|
* @name thy-anchor
|
|
7
8
|
*/
|
|
8
|
-
export declare class ThyAnchor implements OnDestroy, AfterViewInit, OnChanges {
|
|
9
|
+
export declare class ThyAnchor implements IThyAnchorComponent, OnDestroy, AfterViewInit, OnChanges {
|
|
9
10
|
private document;
|
|
10
11
|
private cdr;
|
|
11
12
|
private platform;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
export interface IThyAnchorLinkComponent {
|
|
3
|
+
}
|
|
4
|
+
export interface IThyAnchorComponent {
|
|
5
|
+
registerLink(link: IThyAnchorLinkComponent): void;
|
|
6
|
+
unregisterLink(link: IThyAnchorLinkComponent): void;
|
|
7
|
+
handleScrollTo(linkComponent: IThyAnchorLinkComponent): void;
|
|
8
|
+
}
|
|
9
|
+
export declare const THY_ANCHOR_COMPONENT: InjectionToken<IThyAnchorComponent>;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { AfterContentInit, AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, QueryList, Renderer2, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
2
|
import { ThyCarouselItemDirective } from './carousel-item.directive';
|
|
3
3
|
import { ThyCarouselEffect, ThyCarouselPause, ThyCarouselSwitchData, ThyCarouselTrigger } from './typings';
|
|
4
|
+
import { IThyCarouselComponent } from './carousel.token';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
/**
|
|
6
7
|
* 走马灯组件
|
|
7
8
|
* @name thy-carousel
|
|
8
9
|
*/
|
|
9
|
-
export declare class ThyCarousel implements OnInit, AfterViewInit, AfterContentInit, OnChanges, OnDestroy {
|
|
10
|
+
export declare class ThyCarousel implements IThyCarouselComponent, OnInit, AfterViewInit, AfterContentInit, OnChanges, OnDestroy {
|
|
10
11
|
protected renderer: Renderer2;
|
|
11
12
|
private cdr;
|
|
12
13
|
private ngZone;
|
|
@@ -2,7 +2,7 @@ import { ChangeDetectorRef, Renderer2, QueryList } from '@angular/core';
|
|
|
2
2
|
import { Platform } from '@angular/cdk/platform';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { ThyCarouselItemDirective } from '../carousel-item.directive';
|
|
5
|
-
import {
|
|
5
|
+
import { IThyCarouselComponent } from '../carousel.token';
|
|
6
6
|
import { ThyDistanceVector, ThyCarouselEngine } from '../typings';
|
|
7
7
|
export declare abstract class ThyCarouselBaseEngine implements ThyCarouselEngine {
|
|
8
8
|
protected cdr: ChangeDetectorRef;
|
|
@@ -10,7 +10,7 @@ export declare abstract class ThyCarouselBaseEngine implements ThyCarouselEngine
|
|
|
10
10
|
protected platform: Platform;
|
|
11
11
|
protected contentWidth: number;
|
|
12
12
|
protected contentHeight: number;
|
|
13
|
-
protected readonly carouselComponent:
|
|
13
|
+
protected readonly carouselComponent: IThyCarouselComponent;
|
|
14
14
|
protected wrapperEl: HTMLElement;
|
|
15
15
|
protected playTime: number;
|
|
16
16
|
protected length: number;
|
|
@@ -18,7 +18,7 @@ export declare abstract class ThyCarouselBaseEngine implements ThyCarouselEngine
|
|
|
18
18
|
protected get maxIndex(): number;
|
|
19
19
|
protected get firstEl(): HTMLElement;
|
|
20
20
|
protected get lastEl(): HTMLElement;
|
|
21
|
-
protected constructor(thyCarouselComponent:
|
|
21
|
+
protected constructor(thyCarouselComponent: IThyCarouselComponent, cdr: ChangeDetectorRef, renderer: Renderer2, platform: Platform);
|
|
22
22
|
initializeContents(contents: QueryList<ThyCarouselItemDirective> | null): void;
|
|
23
23
|
abstract dragging(pointerVector: ThyDistanceVector, rect: DOMRect): void;
|
|
24
24
|
abstract initializeCarouselContents(contents: QueryList<ThyCarouselItemDirective> | null): void;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ChangeDetectorRef, QueryList, Renderer2 } from '@angular/core';
|
|
2
2
|
import { Platform } from '@angular/cdk/platform';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
|
-
import {
|
|
4
|
+
import { IThyCarouselComponent } from '../carousel.token';
|
|
5
5
|
import { ThyDistanceVector } from '../typings';
|
|
6
6
|
import { ThyCarouselItemDirective } from '../carousel-item.directive';
|
|
7
7
|
import { ThyCarouselBaseEngine } from '../engine/carousel-base';
|
|
8
8
|
export declare class ThyCarouselFadeEngine extends ThyCarouselBaseEngine {
|
|
9
9
|
contentsEl: HTMLElement[];
|
|
10
|
-
constructor(thyCarouselComponent:
|
|
10
|
+
constructor(thyCarouselComponent: IThyCarouselComponent, cdr: ChangeDetectorRef, renderer: Renderer2, platform: Platform);
|
|
11
11
|
dragging(pointerVector: ThyDistanceVector, rect: DOMRect): void;
|
|
12
12
|
initializeCarouselContents(contents: QueryList<ThyCarouselItemDirective> | null): void;
|
|
13
13
|
switch(to: number, from: number): Observable<void>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ChangeDetectorRef, QueryList, Renderer2 } from '@angular/core';
|
|
2
2
|
import { Platform } from '@angular/cdk/platform';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
|
-
import {
|
|
4
|
+
import { IThyCarouselComponent } from '../carousel.token';
|
|
5
5
|
import { ThyDistanceVector } from '../typings';
|
|
6
6
|
import { ThyCarouselItemDirective } from '../carousel-item.directive';
|
|
7
7
|
import { ThyCarouselBaseEngine } from '../engine/carousel-base';
|
|
8
8
|
export declare class ThyCarouselNoopEngine extends ThyCarouselBaseEngine {
|
|
9
|
-
constructor(thyCarouselComponent:
|
|
9
|
+
constructor(thyCarouselComponent: IThyCarouselComponent, cdr: ChangeDetectorRef, renderer: Renderer2, platform: Platform);
|
|
10
10
|
dragging(pointerVector: ThyDistanceVector, rect: DOMRect): void;
|
|
11
11
|
initializeCarouselContents(contents: QueryList<ThyCarouselItemDirective> | null): void;
|
|
12
12
|
switch(to: number, from: number): Observable<void>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ChangeDetectorRef, QueryList, Renderer2 } from '@angular/core';
|
|
2
2
|
import { Platform } from '@angular/cdk/platform';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
|
-
import {
|
|
4
|
+
import { IThyCarouselComponent } from '../carousel.token';
|
|
5
5
|
import { ThyDistanceVector } from '../typings';
|
|
6
6
|
import { ThyCarouselItemDirective } from '../carousel-item.directive';
|
|
7
7
|
import { ThyCarouselBaseEngine } from '../engine/carousel-base';
|
|
8
8
|
export declare class ThyCarouselSlideEngine extends ThyCarouselBaseEngine {
|
|
9
|
-
constructor(thyCarouselComponent:
|
|
9
|
+
constructor(thyCarouselComponent: IThyCarouselComponent, cdr: ChangeDetectorRef, renderer: Renderer2, platform: Platform);
|
|
10
10
|
private prepareHorizontalContext;
|
|
11
11
|
private resetContext;
|
|
12
12
|
initializeCarouselContents(contents: QueryList<ThyCarouselItemDirective> | null): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EventEmitter, OnDestroy, OnInit, TemplateRef } from '@angular/core';
|
|
2
|
+
import { IThyCollapseItemComponent } from './collapse.token';
|
|
2
3
|
import { SafeAny } from 'ngx-tethys/types';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
/**
|
|
@@ -6,7 +7,7 @@ import * as i0 from "@angular/core";
|
|
|
6
7
|
* @name thy-collapse-panel,thy-collapse-item
|
|
7
8
|
* @order 20
|
|
8
9
|
*/
|
|
9
|
-
export declare class ThyCollapseItem implements OnInit, OnDestroy {
|
|
10
|
+
export declare class ThyCollapseItem implements IThyCollapseItemComponent, OnInit, OnDestroy {
|
|
10
11
|
private cdr;
|
|
11
12
|
private thyCollapseComponent;
|
|
12
13
|
showArrow: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { IThyCollapseItemComponent, IThyCollapseComponent } from './collapse.token';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export type ThyCollapseTheme = 'divided' | 'bordered' | 'ghost';
|
|
5
5
|
export type ThyCollapsedIconPosition = 'left' | 'right';
|
|
@@ -8,7 +8,7 @@ export type ThyCollapsedIconPosition = 'left' | 'right';
|
|
|
8
8
|
* @name thy-collapse
|
|
9
9
|
* @order 10
|
|
10
10
|
*/
|
|
11
|
-
export declare class ThyCollapse implements OnInit {
|
|
11
|
+
export declare class ThyCollapse implements IThyCollapseComponent, OnInit {
|
|
12
12
|
/**
|
|
13
13
|
* 折叠面板主题,支持 `divided` | `bordered` | `ghost`
|
|
14
14
|
*/
|
|
@@ -26,9 +26,9 @@ export declare class ThyCollapse implements OnInit {
|
|
|
26
26
|
private listOfCollapsePanelComponent;
|
|
27
27
|
constructor();
|
|
28
28
|
ngOnInit(): void;
|
|
29
|
-
addPanel(value:
|
|
30
|
-
removePanel(value:
|
|
31
|
-
click(collapseItem:
|
|
29
|
+
addPanel(value: IThyCollapseItemComponent): void;
|
|
30
|
+
removePanel(value: IThyCollapseItemComponent): void;
|
|
31
|
+
click(collapseItem: IThyCollapseItemComponent, event: Event): void;
|
|
32
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<ThyCollapse, never>;
|
|
33
33
|
static ɵcmp: i0.ɵɵComponentDeclaration<ThyCollapse, "thy-collapse", never, { "thyTheme": { "alias": "thyTheme"; "required": false; }; "thyAccordion": { "alias": "thyAccordion"; "required": false; }; "thyArrowIconPosition": { "alias": "thyArrowIconPosition"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
34
34
|
static ngAcceptInputType_thyAccordion: boolean | string | number;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EventEmitter, InjectionToken } from '@angular/core';
|
|
2
|
+
export interface IThyCollapseItemComponent {
|
|
3
|
+
thyActive: boolean;
|
|
4
|
+
thyActiveChange: EventEmitter<{
|
|
5
|
+
active: boolean;
|
|
6
|
+
event: Event;
|
|
7
|
+
}>;
|
|
8
|
+
markForCheck: () => void;
|
|
9
|
+
}
|
|
10
|
+
export interface IThyCollapseComponent {
|
|
11
|
+
addPanel: (value: IThyCollapseItemComponent) => void;
|
|
12
|
+
removePanel: (value: IThyCollapseItemComponent) => void;
|
|
13
|
+
click: (collapseItem: IThyCollapseItemComponent, event: Event) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const THY_COLLAPSE_COMPONENT: InjectionToken<IThyCollapseComponent>;
|
package/core/theme/index.d.ts
CHANGED
package/core/theme/store.d.ts
CHANGED
package/core/theme/theme.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { TemplateRef } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { TinyDate } from 'ngx-tethys/util';
|
|
3
3
|
export type DisabledDateFn = (d: Date) => boolean;
|
|
4
4
|
export type ThyPanelMode = 'decade' | 'year' | 'month' | 'date' | 'week' | 'flexible' | 'quarter';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated use ThyCompatibleDate instead
|
|
7
|
+
*/
|
|
5
8
|
export type CompatibleDate = Date | Date[];
|
|
9
|
+
export type ThyCompatibleDate = Date | Date[];
|
|
10
|
+
export type ThyCompatibleTinyDate = TinyDate | TinyDate[];
|
|
6
11
|
export type CompatiblePresets = ThyShortcutPreset[] | (() => ThyShortcutPreset[]);
|
|
7
12
|
export type ThyShortcutPosition = 'left' | 'bottom';
|
|
8
13
|
export type ThyDateGranularity = 'year' | 'quarter' | 'month' | 'day';
|
|
@@ -35,6 +40,6 @@ export interface ThyShortcutPreset {
|
|
|
35
40
|
disabled?: boolean;
|
|
36
41
|
}
|
|
37
42
|
export interface ThyDateChangeEvent {
|
|
38
|
-
value:
|
|
43
|
+
value: ThyCompatibleTinyDate;
|
|
39
44
|
triggerPreset?: ThyShortcutPreset;
|
|
40
45
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IThyDragDirective } from './drag-drop.token';
|
|
2
2
|
import { ThyDropPosition } from './drag-drop.class';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
@@ -10,7 +10,7 @@ export declare class ThyDragDropService<T = any> {
|
|
|
10
10
|
/**
|
|
11
11
|
* 当前拖拽项,dragEnd 后重置为 undefined
|
|
12
12
|
*/
|
|
13
|
-
previousDrag:
|
|
13
|
+
previousDrag: IThyDragDirective<T>;
|
|
14
14
|
/**
|
|
15
15
|
* 拖拽的时候,针对 dragOver 的节点有三种情况,即拖拽到节点之上 before ,拖拽到节点上 in ,拖拽到节点之下 after
|
|
16
16
|
* @type ThyDropPosition
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
import { EventEmitter, QueryList, InjectionToken } from '@angular/core';
|
|
2
|
-
import { ThyDragDirective } from './drag.directive';
|
|
1
|
+
import { EventEmitter, QueryList, InjectionToken, ElementRef } from '@angular/core';
|
|
3
2
|
import { ThyDragDropEvent, ThyDragStartEvent, ThyDragEndEvent, ThyDragOverEvent } from './drag-drop.class';
|
|
4
|
-
|
|
3
|
+
import { SafeAny } from 'ngx-tethys/types';
|
|
4
|
+
export interface IThyDragDirective<T = SafeAny> {
|
|
5
|
+
data: T;
|
|
6
|
+
container: IThyDropContainerDirective<T>;
|
|
7
|
+
}
|
|
8
|
+
export interface IThyDragHandleDirective {
|
|
9
|
+
element: ElementRef<HTMLElement>;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface IThyDropContainerDirective<T = SafeAny> {
|
|
5
13
|
started: EventEmitter<ThyDragStartEvent<T>>;
|
|
6
14
|
ended: EventEmitter<ThyDragEndEvent<T>>;
|
|
7
15
|
overed: EventEmitter<ThyDragOverEvent<T>>;
|
|
@@ -11,9 +19,6 @@ export interface IThyDropContainerDirective<T = any> {
|
|
|
11
19
|
beforeDrop: (e: ThyDragDropEvent<T>) => boolean;
|
|
12
20
|
data: T[];
|
|
13
21
|
disabled: boolean;
|
|
14
|
-
draggables: QueryList<
|
|
22
|
+
draggables: QueryList<IThyDragDirective>;
|
|
15
23
|
}
|
|
16
|
-
/**
|
|
17
|
-
* Injection token used to provide the container directive to drag.
|
|
18
|
-
*/
|
|
19
24
|
export declare const THY_DROP_CONTAINER_DIRECTIVE: InjectionToken<IThyDropContainerDirective<any>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { IThyDragHandleDirective } from './drag-drop.token';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
/**
|
|
4
5
|
* 自定义可拖拽区域内容
|
|
@@ -6,7 +7,7 @@ import * as i0 from "@angular/core";
|
|
|
6
7
|
* @order 20
|
|
7
8
|
* @deprecated please use @angular/cdk/drag-drop
|
|
8
9
|
*/
|
|
9
|
-
export declare class ThyDragHandleDirective {
|
|
10
|
+
export declare class ThyDragHandleDirective implements IThyDragHandleDirective {
|
|
10
11
|
element: ElementRef<HTMLElement>;
|
|
11
12
|
private _disabled;
|
|
12
13
|
/**
|
package/drag-drop/drag-ref.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { NgZone, ElementRef, Renderer2 } from '@angular/core';
|
|
2
2
|
import { Subject } from 'rxjs';
|
|
3
|
-
import { ThyDragHandleDirective } from './drag-handle.directive';
|
|
4
3
|
import { ThyDragDropService } from './drag-drop.service';
|
|
5
4
|
import { ThyDragStartEvent, ThyDragEndEvent, ThyDragOverEvent, ThyDragDropEvent } from './drag-drop.class';
|
|
6
|
-
import {
|
|
7
|
-
import { IThyDropContainerDirective } from './drop-container.class';
|
|
5
|
+
import { IThyDragDirective, IThyDragHandleDirective, IThyDropContainerDirective } from './drag-drop.token';
|
|
8
6
|
export declare class DragRef<T = any> {
|
|
9
7
|
private drag;
|
|
10
8
|
private container;
|
|
@@ -27,11 +25,11 @@ export declare class DragRef<T = any> {
|
|
|
27
25
|
get disabled(): boolean;
|
|
28
26
|
set disabled(value: boolean);
|
|
29
27
|
private addPositionClass$;
|
|
30
|
-
constructor(element: ElementRef<HTMLElement> | HTMLElement, drag:
|
|
28
|
+
constructor(element: ElementRef<HTMLElement> | HTMLElement, drag: IThyDragDirective, container: IThyDropContainerDirective<T>, dragDropService: ThyDragDropService<T>, document: any, ngZone: NgZone, renderer: Renderer2);
|
|
31
29
|
subAddPositionClass(): void;
|
|
32
30
|
withRootElement(rootElement: ElementRef<HTMLElement> | HTMLElement): this;
|
|
33
31
|
withContentElement(contentElement: ElementRef<HTMLElement> | HTMLElement): this;
|
|
34
|
-
withHandles(handleOrHandles:
|
|
32
|
+
withHandles(handleOrHandles: IThyDragHandleDirective | IThyDragHandleDirective[]): this;
|
|
35
33
|
private registerDragDropEvents;
|
|
36
34
|
private dragStart;
|
|
37
35
|
private isTriggerHandle;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
2
|
import { DragRef } from './drag-ref';
|
|
3
|
-
import {
|
|
3
|
+
import { IThyDragDirective } from './drag-drop.token';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/**
|
|
6
6
|
* 拖拽项
|
|
@@ -8,8 +8,8 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
* @order 10
|
|
9
9
|
* @deprecated please use @angular/cdk/drag-drop
|
|
10
10
|
*/
|
|
11
|
-
export declare class ThyDragDirective<T = any> implements OnDestroy {
|
|
12
|
-
container: IThyDropContainerDirective<any>;
|
|
11
|
+
export declare class ThyDragDirective<T = any> implements IThyDragDirective, OnDestroy {
|
|
12
|
+
container: import("./drag-drop.token").IThyDropContainerDirective<any>;
|
|
13
13
|
private elementRef;
|
|
14
14
|
/**
|
|
15
15
|
* 元数据
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OnInit, EventEmitter, QueryList, AfterContentInit, OnDestroy } from '@angular/core';
|
|
2
2
|
import { ThyDragDirective } from './drag.directive';
|
|
3
3
|
import { ThyDragDropEvent, ThyDragStartEvent, ThyDragEndEvent, ThyDragOverEvent } from './drag-drop.class';
|
|
4
|
-
import { IThyDropContainerDirective } from './drop
|
|
4
|
+
import { IThyDropContainerDirective } from './drag-drop.token';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
/**
|
|
7
7
|
* @name thy-drop-container,[thyDropContainer]
|
package/drag-drop/index.d.ts
CHANGED
|
@@ -4,6 +4,6 @@ export * from './drag-handle.directive';
|
|
|
4
4
|
export * from './drag-content.directive';
|
|
5
5
|
export * from './drag-drop.class';
|
|
6
6
|
export * from './drop-container.directive';
|
|
7
|
-
export * from './drop
|
|
7
|
+
export * from './drag-drop.token';
|
|
8
8
|
export * from './module';
|
|
9
9
|
export * from './drag-drop.service';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ChangeDetectorRef, NgZone, Renderer2, EventEmitter, numberAttribute, Output, Input, ViewChild, ChangeDetectionStrategy, ViewEncapsulation, Component, TemplateRef, ElementRef, ContentChild, NgModule } from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, ChangeDetectorRef, NgZone, Renderer2, EventEmitter, numberAttribute, Output, Input, ViewChild, ChangeDetectionStrategy, ViewEncapsulation, Component, TemplateRef, ElementRef, ContentChild, NgModule } from '@angular/core';
|
|
3
3
|
import { DOCUMENT, NgTemplateOutlet, NgStyle, NgClass, CommonModule } from '@angular/common';
|
|
4
4
|
import { Platform, PlatformModule } from '@angular/cdk/platform';
|
|
5
5
|
import { Subject, fromEvent } from 'rxjs';
|
|
@@ -9,6 +9,8 @@ import { ThyScrollService } from 'ngx-tethys/core';
|
|
|
9
9
|
import { getOffset, coerceBooleanProperty } from 'ngx-tethys/util';
|
|
10
10
|
import { useHostRenderer } from '@tethys/cdk/dom';
|
|
11
11
|
|
|
12
|
+
const THY_ANCHOR_COMPONENT = new InjectionToken('THY_ANCHOR_COMPONENT');
|
|
13
|
+
|
|
12
14
|
const sharpMatcherRegx = /#([^#]+)$/;
|
|
13
15
|
/**
|
|
14
16
|
* 锚点组件
|
|
@@ -188,7 +190,12 @@ class ThyAnchor {
|
|
|
188
190
|
}
|
|
189
191
|
}
|
|
190
192
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ThyAnchor, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
191
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: ThyAnchor, isStandalone: true, selector: "thy-anchor", inputs: { thyAffix: ["thyAffix", "thyAffix", coerceBooleanProperty], thyBounds: ["thyBounds", "thyBounds", numberAttribute], thyOffsetTop: ["thyOffsetTop", "thyOffsetTop", numberAttribute], thyContainer: "thyContainer", thyDirection: "thyDirection" }, outputs: { thyClick: "thyClick", thyScroll: "thyScroll" },
|
|
193
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: ThyAnchor, isStandalone: true, selector: "thy-anchor", inputs: { thyAffix: ["thyAffix", "thyAffix", coerceBooleanProperty], thyBounds: ["thyBounds", "thyBounds", numberAttribute], thyOffsetTop: ["thyOffsetTop", "thyOffsetTop", numberAttribute], thyContainer: "thyContainer", thyDirection: "thyDirection" }, outputs: { thyClick: "thyClick", thyScroll: "thyScroll" }, providers: [
|
|
194
|
+
{
|
|
195
|
+
provide: THY_ANCHOR_COMPONENT,
|
|
196
|
+
useExisting: ThyAnchor
|
|
197
|
+
}
|
|
198
|
+
], viewQueries: [{ propertyName: "ink", first: true, predicate: ["ink"], descendants: true }], exportAs: ["thyAnchor"], usesOnChanges: true, ngImport: i0, template: `
|
|
192
199
|
@if (thyAffix) {
|
|
193
200
|
<thy-affix [thyOffsetTop]="thyOffsetTop" [thyContainer]="container">
|
|
194
201
|
<ng-template [ngTemplateOutlet]="content"></ng-template>
|
|
@@ -241,7 +248,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
241
248
|
`,
|
|
242
249
|
encapsulation: ViewEncapsulation.None,
|
|
243
250
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
244
|
-
imports: [ThyAffix, NgTemplateOutlet, NgStyle, NgClass]
|
|
251
|
+
imports: [ThyAffix, NgTemplateOutlet, NgStyle, NgClass],
|
|
252
|
+
providers: [
|
|
253
|
+
{
|
|
254
|
+
provide: THY_ANCHOR_COMPONENT,
|
|
255
|
+
useExisting: ThyAnchor
|
|
256
|
+
}
|
|
257
|
+
]
|
|
245
258
|
}]
|
|
246
259
|
}], propDecorators: { ink: [{
|
|
247
260
|
type: ViewChild,
|
|
@@ -284,7 +297,7 @@ class ThyAnchorLink {
|
|
|
284
297
|
}
|
|
285
298
|
constructor() {
|
|
286
299
|
this.elementRef = inject(ElementRef);
|
|
287
|
-
this.anchorComponent = inject(
|
|
300
|
+
this.anchorComponent = inject(THY_ANCHOR_COMPONENT, { optional: true });
|
|
288
301
|
this.platform = inject(Platform);
|
|
289
302
|
this.title = '';
|
|
290
303
|
this.hostRenderer = useHostRenderer();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-anchor.mjs","sources":["../../../src/anchor/anchor.component.ts","../../../src/anchor/anchor-link.component.ts","../../../src/anchor/anchor.module.ts","../../../src/anchor/ngx-tethys-anchor.ts"],"sourcesContent":["import { Platform } from '@angular/cdk/platform';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Output,\n Renderer2,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n numberAttribute,\n inject\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';\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})\nexport class ThyAnchor implements OnDestroy, AfterViewInit, OnChanges {\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 @ViewChild('ink') private ink!: ElementRef;\n\n /**\n * 固定模式\n */\n @Input({ transform: coerceBooleanProperty }) thyAffix = true;\n\n /**\n * 锚点区域边界,单位:px\n */\n @Input({ transform: numberAttribute })\n thyBounds = 5;\n\n /**\n * 缓冲的偏移量阈值\n */\n @Input({ transform: numberAttribute })\n thyOffsetTop?: number = undefined;\n\n /**\n * 指定滚动的容器\n * @type string | HTMLElement\n */\n @Input() thyContainer?: string | HTMLElement;\n\n /**\n * 设置导航方向\n * @type 'vertical' | 'horizontal'\n */\n @Input() thyDirection: 'vertical' | 'horizontal' = 'vertical';\n\n /**\n * 点击项触发\n */\n @Output() readonly thyClick = new EventEmitter<ThyAnchorLink>();\n\n /**\n * 滚动到某锚点时触发\n */\n @Output() readonly thyScroll = new EventEmitter<ThyAnchorLink>();\n\n visible = false;\n\n wrapperStyle = { 'max-height': '100vh' };\n\n container?: HTMLElement | Window;\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 private getContainer(): HTMLElement | Window {\n return this.container || window;\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.getContainer(), '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 = this.container instanceof HTMLElement ? this.container : (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.getContainer()).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 this.ink.nativeElement.style.top = horizontalAnchor ? '' : `${linkNode.offsetTop}px`;\n this.ink.nativeElement.style.height = horizontalAnchor ? '' : `${linkNode.clientHeight}px`;\n this.ink.nativeElement.style.left = horizontalAnchor ? `${linkNode.offsetLeft}px` : '';\n this.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 if (this.ink) {\n if (visible) {\n this.renderer.addClass(this.ink.nativeElement, visibleClassname);\n } else {\n this.renderer.removeClass(this.ink.nativeElement, visibleClassname);\n }\n }\n }\n\n handleScrollTo(linkComponent: ThyAnchorLink): void {\n const container: HTMLElement = this.container instanceof HTMLElement ? this.container : (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.getContainer());\n const elementOffsetTop = getOffset(linkElement, this.getContainer()).top;\n const targetScrollTop = containerScrollTop + elementOffsetTop - (this.thyOffsetTop || 0);\n this.scrollService.scrollTo(this.getContainer(), targetScrollTop, undefined, () => {\n this.animating = false;\n });\n this.handleActive(linkComponent);\n this.thyClick.emit(linkComponent);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const { thyOffsetTop, thyContainer } = changes;\n if (thyOffsetTop) {\n this.wrapperStyle = {\n 'max-height': `calc(100vh - ${this.thyOffsetTop}px)`\n };\n }\n if (thyContainer && this.thyContainer) {\n const container = this.thyContainer;\n this.container = typeof container === 'string' ? (this.document.querySelector(container) as HTMLElement) : container;\n this.registerScrollEvent();\n }\n }\n}\n","import { Platform } from '@angular/cdk/platform';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n Input,\n OnDestroy,\n OnInit,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n inject\n} from '@angular/core';\nimport { useHostRenderer } from '@tethys/cdk/dom';\n\nimport { ThyAnchor } from './anchor.component';\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 OnInit, OnDestroy {\n elementRef = inject(ElementRef);\n private anchorComponent = inject(ThyAnchor);\n private platform = inject(Platform);\n\n title: string | null = '';\n\n titleTemplate?: TemplateRef<any>;\n\n private hostRenderer = useHostRenderer();\n\n /**\n * 锚点链接\n */\n @Input() thyHref = '#';\n\n /**\n * 文字内容\n */\n @Input()\n set thyTitle(value: string | TemplateRef<void>) {\n if (value instanceof TemplateRef) {\n this.title = null;\n this.titleTemplate = value;\n } else {\n this.title = value;\n }\n }\n\n @ContentChild('thyTemplate') thyTemplate!: TemplateRef<void>;\n\n @ViewChild('linkTitle', { static: true }) linkTitle!: ElementRef<HTMLAnchorElement>;\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":";;;;;;;;;;;AAkCA,MAAM,gBAAgB,GAAG,WAAW;AAEpC;;;AAGG;MA+BU,SAAS,CAAA;AA9BtB,IAAA,WAAA,GAAA;AA+BY,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC/B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;AACrB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;AAC5B,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAIhD;;AAEG;QAC0C,IAAQ,CAAA,QAAA,GAAG,IAAI;AAE5D;;AAEG;QAEH,IAAS,CAAA,SAAA,GAAG,CAAC;AAEb;;AAEG;QAEH,IAAY,CAAA,YAAA,GAAY,SAAS;AAQjC;;;AAGG;QACM,IAAY,CAAA,YAAA,GAA8B,UAAU;AAE7D;;AAEG;AACgB,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,YAAY,EAAiB;AAE/D;;AAEG;AACgB,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,YAAY,EAAiB;QAEhE,IAAO,CAAA,OAAA,GAAG,KAAK;AAEf,QAAA,IAAA,CAAA,YAAY,GAAG,EAAE,YAAY,EAAE,OAAO,EAAE;QAIhC,IAAK,CAAA,KAAA,GAAoB,EAAE;QAE3B,IAAS,CAAA,SAAA,GAAG,KAAK;AAEjB,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,OAAO,EAAQ;QAE9B,IAAqB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BAEe,SAAS,EAAA,CAAA;sBAAlD,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,WAAW,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;MC7D/B,eAAe,CAAA;8GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAf,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,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;;;;"}
|
|
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 EventEmitter,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Output,\n Renderer2,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n numberAttribute,\n inject\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, OnChanges {\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 @ViewChild('ink') private ink!: ElementRef;\n\n /**\n * 固定模式\n */\n @Input({ transform: coerceBooleanProperty }) thyAffix = true;\n\n /**\n * 锚点区域边界,单位:px\n */\n @Input({ transform: numberAttribute })\n thyBounds = 5;\n\n /**\n * 缓冲的偏移量阈值\n */\n @Input({ transform: numberAttribute })\n thyOffsetTop?: number = undefined;\n\n /**\n * 指定滚动的容器\n * @type string | HTMLElement\n */\n @Input() thyContainer?: string | HTMLElement;\n\n /**\n * 设置导航方向\n * @type 'vertical' | 'horizontal'\n */\n @Input() thyDirection: 'vertical' | 'horizontal' = 'vertical';\n\n /**\n * 点击项触发\n */\n @Output() readonly thyClick = new EventEmitter<ThyAnchorLink>();\n\n /**\n * 滚动到某锚点时触发\n */\n @Output() readonly thyScroll = new EventEmitter<ThyAnchorLink>();\n\n visible = false;\n\n wrapperStyle = { 'max-height': '100vh' };\n\n container?: HTMLElement | Window;\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 private getContainer(): HTMLElement | Window {\n return this.container || window;\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.getContainer(), '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 = this.container instanceof HTMLElement ? this.container : (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.getContainer()).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 this.ink.nativeElement.style.top = horizontalAnchor ? '' : `${linkNode.offsetTop}px`;\n this.ink.nativeElement.style.height = horizontalAnchor ? '' : `${linkNode.clientHeight}px`;\n this.ink.nativeElement.style.left = horizontalAnchor ? `${linkNode.offsetLeft}px` : '';\n this.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 if (this.ink) {\n if (visible) {\n this.renderer.addClass(this.ink.nativeElement, visibleClassname);\n } else {\n this.renderer.removeClass(this.ink.nativeElement, visibleClassname);\n }\n }\n }\n\n handleScrollTo(linkComponent: ThyAnchorLink): void {\n const container: HTMLElement = this.container instanceof HTMLElement ? this.container : (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.getContainer());\n const elementOffsetTop = getOffset(linkElement, this.getContainer()).top;\n const targetScrollTop = containerScrollTop + elementOffsetTop - (this.thyOffsetTop || 0);\n this.scrollService.scrollTo(this.getContainer(), targetScrollTop, undefined, () => {\n this.animating = false;\n });\n this.handleActive(linkComponent);\n this.thyClick.emit(linkComponent);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const { thyOffsetTop, thyContainer } = changes;\n if (thyOffsetTop) {\n this.wrapperStyle = {\n 'max-height': `calc(100vh - ${this.thyOffsetTop}px)`\n };\n }\n if (thyContainer && this.thyContainer) {\n const container = this.thyContainer;\n this.container = typeof container === 'string' ? (this.document.querySelector(container) as HTMLElement) : container;\n this.registerScrollEvent();\n }\n }\n}\n","import { Platform } from '@angular/cdk/platform';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n Input,\n OnDestroy,\n OnInit,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n inject\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 title: string | null = '';\n\n titleTemplate?: TemplateRef<any>;\n\n private hostRenderer = useHostRenderer();\n\n /**\n * 锚点链接\n */\n @Input() thyHref = '#';\n\n /**\n * 文字内容\n */\n @Input()\n set thyTitle(value: string | TemplateRef<void>) {\n if (value instanceof TemplateRef) {\n this.title = null;\n this.titleTemplate = value;\n } else {\n this.title = value;\n }\n }\n\n @ContentChild('thyTemplate') thyTemplate!: TemplateRef<void>;\n\n @ViewChild('linkTitle', { static: true }) linkTitle!: ElementRef<HTMLAnchorElement>;\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;AApCtB,IAAA,WAAA,GAAA;AAqCY,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC/B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;AACrB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,SAA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