ngx-tethys 19.1.0-next.0 → 19.1.0-next.10
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 +126 -0
- package/README.md +0 -1
- package/action/action.component.d.ts +7 -8
- package/affix/affix.component.d.ts +3 -4
- package/arrow-switcher/arrow-switcher.component.d.ts +5 -1
- package/badge/badge.component.d.ts +1 -1
- package/button/button-group.component.d.ts +5 -12
- package/button/button-icon.component.d.ts +14 -28
- package/button/button.component.d.ts +17 -27
- package/color-picker/coordinates.directive.d.ts +1 -2
- package/date-picker/abstract-picker.component.d.ts +50 -52
- package/date-picker/abstract-picker.directive.d.ts +15 -40
- package/date-picker/base-picker.component.d.ts +12 -40
- package/date-picker/date-picker.config.d.ts +3 -0
- package/date-picker/lib/calendar/calendar-footer.component.d.ts +24 -19
- package/date-picker/lib/calendar/calendar-header.component.d.ts +15 -15
- package/date-picker/lib/calendar/calendar-table.component.d.ts +15 -16
- package/date-picker/lib/date/date-table-cell.component.d.ts +6 -3
- package/date-picker/lib/date/date-table.component.d.ts +2 -3
- package/date-picker/lib/date-carousel/date-carousel.component.d.ts +2 -3
- package/date-picker/lib/decade/decade-header.component.d.ts +2 -5
- package/date-picker/lib/decade/decade-table.component.d.ts +3 -5
- package/date-picker/lib/month/month-table.component.d.ts +1 -2
- package/date-picker/lib/popups/date-popup.component.d.ts +33 -34
- package/date-picker/lib/popups/inner-popup.component.d.ts +22 -29
- package/date-picker/lib/quarter/quarter-table.component.d.ts +1 -4
- package/date-picker/lib/year/year-header.component.d.ts +2 -4
- package/date-picker/lib/year/year-table.component.d.ts +2 -4
- package/date-picker/month-picker.component.d.ts +2 -2
- package/date-picker/picker.component.d.ts +31 -36
- package/date-picker/picker.pipes.d.ts +4 -5
- package/date-picker/picker.util.d.ts +5 -5
- package/date-picker/picker.validators.d.ts +4 -8
- package/date-picker/quarter-picker.component.d.ts +2 -3
- package/date-picker/styles/calendar.scss +1 -1
- package/date-picker/styles/range-picker.scss +1 -0
- package/date-picker/styles/week-picker.scss +1 -0
- package/date-picker/week-picker.component.d.ts +0 -1
- package/date-picker/year-picker.component.d.ts +2 -3
- package/dropdown/dropdown-active.directive.d.ts +4 -5
- package/dropdown/dropdown-menu-item.directive.d.ts +7 -15
- package/dropdown/dropdown-menu.component.d.ts +6 -13
- package/dropdown/dropdown-submenu.component.d.ts +2 -4
- package/dropdown/dropdown.directive.d.ts +15 -25
- package/empty/empty.component.d.ts +2 -1
- package/fesm2022/ngx-tethys-action.mjs +15 -16
- package/fesm2022/ngx-tethys-action.mjs.map +1 -1
- package/fesm2022/ngx-tethys-affix.mjs +14 -18
- package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
- package/fesm2022/ngx-tethys-arrow-switcher.mjs +15 -3
- package/fesm2022/ngx-tethys-arrow-switcher.mjs.map +1 -1
- package/fesm2022/ngx-tethys-autocomplete.mjs +4 -4
- package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
- package/fesm2022/ngx-tethys-badge.mjs.map +1 -1
- package/fesm2022/ngx-tethys-button.mjs +225 -322
- package/fesm2022/ngx-tethys-button.mjs.map +1 -1
- package/fesm2022/ngx-tethys-carousel.mjs +1 -0
- package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
- package/fesm2022/ngx-tethys-cascader.mjs +1 -1
- package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
- package/fesm2022/ngx-tethys-checkbox.mjs +2 -2
- package/fesm2022/ngx-tethys-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-tethys-collapse.mjs +2 -2
- package/fesm2022/ngx-tethys-collapse.mjs.map +1 -1
- package/fesm2022/ngx-tethys-color-picker.mjs +4 -6
- package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-copy.mjs +2 -2
- package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-picker.mjs +861 -1078
- package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-divider.mjs +5 -5
- package/fesm2022/ngx-tethys-divider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dropdown.mjs +159 -209
- package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
- package/fesm2022/ngx-tethys-empty.mjs +5 -2
- package/fesm2022/ngx-tethys-empty.mjs.map +1 -1
- package/fesm2022/ngx-tethys-flexible-text.mjs +68 -88
- package/fesm2022/ngx-tethys-flexible-text.mjs.map +1 -1
- package/fesm2022/ngx-tethys-grid.mjs +10 -15
- package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
- package/fesm2022/ngx-tethys-i18n.mjs +26 -6
- package/fesm2022/ngx-tethys-i18n.mjs.map +1 -1
- package/fesm2022/ngx-tethys-icon.mjs +44 -59
- package/fesm2022/ngx-tethys-icon.mjs.map +1 -1
- package/fesm2022/ngx-tethys-image.mjs +44 -42
- package/fesm2022/ngx-tethys-image.mjs.map +1 -1
- package/fesm2022/ngx-tethys-input-number.mjs.map +1 -1
- package/fesm2022/ngx-tethys-layout.mjs +291 -334
- package/fesm2022/ngx-tethys-layout.mjs.map +1 -1
- package/fesm2022/ngx-tethys-list.mjs +183 -217
- package/fesm2022/ngx-tethys-list.mjs.map +1 -1
- package/fesm2022/ngx-tethys-message.mjs +29 -36
- package/fesm2022/ngx-tethys-message.mjs.map +1 -1
- package/fesm2022/ngx-tethys-notify.mjs +33 -41
- package/fesm2022/ngx-tethys-notify.mjs.map +1 -1
- package/fesm2022/ngx-tethys-progress.mjs +7 -11
- package/fesm2022/ngx-tethys-progress.mjs.map +1 -1
- package/fesm2022/ngx-tethys-property.mjs +8 -19
- package/fesm2022/ngx-tethys-property.mjs.map +1 -1
- package/fesm2022/ngx-tethys-radio.mjs +46 -58
- package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
- package/fesm2022/ngx-tethys-rate.mjs +115 -157
- package/fesm2022/ngx-tethys-rate.mjs.map +1 -1
- package/fesm2022/ngx-tethys-resizable.mjs +100 -143
- package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
- package/fesm2022/ngx-tethys-segment.mjs +84 -103
- package/fesm2022/ngx-tethys-segment.mjs.map +1 -1
- package/fesm2022/ngx-tethys-select.mjs +164 -228
- package/fesm2022/ngx-tethys-select.mjs.map +1 -1
- package/fesm2022/ngx-tethys-shared.mjs +423 -586
- package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
- package/fesm2022/ngx-tethys-skeleton.mjs +1 -2
- package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
- package/fesm2022/ngx-tethys-slide.mjs +37 -56
- package/fesm2022/ngx-tethys-slide.mjs.map +1 -1
- package/fesm2022/ngx-tethys-slider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-space.mjs +2 -8
- package/fesm2022/ngx-tethys-space.mjs.map +1 -1
- package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
- package/fesm2022/ngx-tethys-strength.mjs +52 -66
- package/fesm2022/ngx-tethys-strength.mjs.map +1 -1
- package/fesm2022/ngx-tethys-table.mjs +1 -2
- package/fesm2022/ngx-tethys-table.mjs.map +1 -1
- package/fesm2022/ngx-tethys-time-picker.mjs +244 -271
- package/fesm2022/ngx-tethys-time-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tooltip.mjs +109 -93
- package/fesm2022/ngx-tethys-tooltip.mjs.map +1 -1
- package/fesm2022/ngx-tethys-transfer.mjs +98 -119
- package/fesm2022/ngx-tethys-transfer.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tree-select.mjs +216 -284
- package/fesm2022/ngx-tethys-tree-select.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tree.mjs +281 -401
- package/fesm2022/ngx-tethys-tree.mjs.map +1 -1
- package/fesm2022/ngx-tethys-upload.mjs +2 -2
- package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
- package/fesm2022/ngx-tethys-vote.mjs +53 -99
- package/fesm2022/ngx-tethys-vote.mjs.map +1 -1
- package/fesm2022/ngx-tethys.mjs +1 -1
- package/fesm2022/ngx-tethys.mjs.map +1 -1
- package/flexible-text/flexible-text.component.d.ts +9 -15
- package/grid/flex.d.ts +1 -3
- package/grid/thy-row.directive.d.ts +1 -4
- package/i18n/i18n.d.ts +7 -2
- package/i18n/locales/de-de.d.ts +5 -1
- package/i18n/locales/en-us.d.ts +5 -1
- package/i18n/locales/ja-jp.d.ts +5 -1
- package/i18n/locales/zh-hans.d.ts +5 -1
- package/i18n/locales/zh-hant.d.ts +5 -1
- package/icon/icon.component.d.ts +10 -18
- package/image/image.directive.d.ts +10 -13
- package/image/image.token.d.ts +5 -5
- package/image/preview/image-preview.component.d.ts +2 -2
- package/input-number/input-number.component.d.ts +1 -1
- package/layout/header.component.d.ts +15 -19
- package/layout/layout.component.d.ts +3 -2
- package/layout/sidebar-header.component.d.ts +7 -8
- package/layout/sidebar.component.d.ts +32 -62
- package/list/list-item-meta.component.d.ts +7 -9
- package/list/list-item.component.d.ts +0 -2
- package/list/list.component.d.ts +2 -8
- package/list/selection/selection-list.d.ts +33 -46
- package/message/abstract/abstract-message.component.d.ts +2 -3
- package/message/message-container.component.d.ts +0 -1
- package/message/message.component.d.ts +1 -3
- package/notify/notify-container.component.d.ts +0 -1
- package/notify/notify.component.d.ts +7 -12
- package/package.json +1 -1
- package/progress/progress-circle.component.d.ts +3 -5
- package/progress/progress.component.d.ts +2 -4
- package/property/properties.component.d.ts +0 -2
- package/property/property-item.component.d.ts +3 -10
- package/radio/group/radio-group.component.d.ts +5 -9
- package/rate/rate-item.component.d.ts +8 -11
- package/rate/rate.component.d.ts +18 -29
- package/resizable/resizable.directive.d.ts +20 -32
- package/resizable/resize-handle.component.d.ts +6 -7
- package/resizable/resize-handles.component.d.ts +5 -9
- package/schematics/version.d.ts +1 -1
- package/schematics/version.js +1 -1
- package/segment/segment-item.component.d.ts +9 -15
- package/segment/segment.component.d.ts +11 -15
- package/segment/segment.token.d.ts +4 -3
- package/select/custom-select/custom-select.component.d.ts +33 -56
- package/select/native-select/native-select.component.d.ts +7 -13
- package/shared/base-form-check.component.d.ts +6 -8
- package/shared/directives/string-or-template-outlet.directive.d.ts +5 -6
- package/shared/directives/thy-autofocus.directive.d.ts +4 -6
- package/shared/directives/thy-contextmenu.directive.d.ts +2 -2
- package/shared/directives/thy-ctrl-enter.directive.d.ts +2 -2
- package/shared/directives/thy-enter.directive.d.ts +2 -2
- package/shared/directives/thy-scroll.directive.d.ts +5 -8
- package/shared/directives/thy-show.d.ts +5 -6
- package/shared/directives/thy-stop-propagation.directive.d.ts +4 -4
- package/shared/directives/view-outlet.directive.d.ts +6 -7
- package/shared/ng-transclude.directive.d.ts +2 -3
- package/shared/option/group/option-group.component.d.ts +5 -9
- package/shared/option/list-option/list-option.component.d.ts +9 -13
- package/shared/option/option.component.d.ts +10 -17
- package/shared/option/option.token.d.ts +4 -3
- package/shared/option/options-container.component.d.ts +1 -1
- package/shared/select/select-control/select-control.component.d.ts +38 -53
- package/slide/slide-body/slide-body-section.component.d.ts +2 -6
- package/slide/slide-header/slide-header.component.d.ts +6 -9
- package/space/space.component.d.ts +5 -11
- package/stepper/stepper.component.d.ts +1 -1
- package/strength/strength.component.d.ts +8 -13
- package/table/table-column.component.d.ts +15 -5
- package/time-picker/inner/inner-time-picker.class.d.ts +15 -13
- package/time-picker/inner/inner-time-picker.component.d.ts +26 -26
- package/time-picker/time-picker-panel.component.d.ts +18 -20
- package/time-picker/time-picker.component.d.ts +22 -30
- package/tooltip/tooltip.directive.d.ts +20 -22
- package/transfer/transfer-list.component.d.ts +15 -15
- package/transfer/transfer.component.d.ts +20 -23
- package/tree/tree-abstract.d.ts +5 -5
- package/tree/tree-node.component.d.ts +24 -37
- package/tree/tree.class.d.ts +4 -4
- package/tree/tree.component.d.ts +47 -75
- package/tree/tree.service.d.ts +3 -4
- package/tree-select/tree-select.component.d.ts +54 -71
- package/vote/vote.component.d.ts +13 -33
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-resizable.mjs","sources":["../../../src/resizable/resizable.service.ts","../../../src/resizable/utils.ts","../../../src/resizable/resizable.directive.ts","../../../src/resizable/interface.ts","../../../src/resizable/resize-handle.component.ts","../../../src/resizable/resize-handles.component.ts","../../../src/resizable/module.ts","../../../src/resizable/ngx-tethys-resizable.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { Injectable, NgZone, OnDestroy, inject } from '@angular/core';\nimport { isTouchEvent } from 'ngx-tethys/util';\nimport { Subject } from 'rxjs';\nimport { ThyResizeHandleMouseDownEvent } from './interface';\n\n/**\n * @internal\n */\n@Injectable()\nexport class ThyResizableService implements OnDestroy {\n private ngZone = inject(NgZone);\n\n private document: Document;\n private listeners = new Map<string, (event: MouseEvent | TouchEvent) => void>();\n\n /**\n * The `OutsideAngular` prefix means that the subject will emit events outside of the Angular zone,\n * so that becomes a bit more descriptive for those who'll maintain the code in the future:\n * ```ts\n * thyResizableService.handleMouseDownOutsideAngular$.subscribe(event => {\n * console.log(Zone.current); // <root>\n * console.log(NgZone.isInAngularZone()); // false\n * });\n * ```\n */\n\n handleMouseDownOutsideAngular$ = new Subject<ThyResizeHandleMouseDownEvent>();\n documentMouseUpOutsideAngular$ = new Subject<MouseEvent | TouchEvent>();\n documentMouseMoveOutsideAngular$ = new Subject<MouseEvent | TouchEvent>();\n mouseEnteredOutsideAngular$ = new Subject<boolean>();\n\n constructor() {\n const document = inject(DOCUMENT);\n\n this.document = document;\n }\n\n startResizing(event: MouseEvent | TouchEvent): void {\n const _isTouchEvent = isTouchEvent(event);\n this.clearListeners();\n const moveEvent = _isTouchEvent ? 'touchmove' : 'mousemove';\n const upEvent = _isTouchEvent ? 'touchend' : 'mouseup';\n const moveEventHandler = (e: MouseEvent | TouchEvent) => {\n this.documentMouseMoveOutsideAngular$.next(e);\n };\n const upEventHandler = (e: MouseEvent | TouchEvent) => {\n this.documentMouseUpOutsideAngular$.next(e);\n this.clearListeners();\n };\n\n this.listeners.set(moveEvent, moveEventHandler);\n this.listeners.set(upEvent, upEventHandler);\n this.ngZone.runOutsideAngular(() => {\n this.listeners.forEach((handler, name) => {\n this.document.addEventListener(name, handler as EventListener);\n });\n });\n }\n\n private clearListeners(): void {\n this.listeners.forEach((handler, name) => {\n this.document.removeEventListener(name, handler as EventListener);\n });\n this.listeners.clear();\n }\n\n ngOnDestroy(): void {\n this.handleMouseDownOutsideAngular$.complete();\n this.documentMouseUpOutsideAngular$.complete();\n this.documentMouseMoveOutsideAngular$.complete();\n this.mouseEnteredOutsideAngular$.complete();\n this.clearListeners();\n }\n}\n","import { isTouchEvent } from 'ngx-tethys/util';\n\nexport function getEventWithPoint(event: MouseEvent | TouchEvent): MouseEvent | Touch {\n return isTouchEvent(event) ? event.touches[0] || event.changedTouches[0] : (event as MouseEvent);\n}\n\nexport function ensureInBounds(value: number, boundValue: number): number {\n return value ? (value < boundValue ? value : boundValue) : boundValue;\n}\n\nexport function setCompatibleStyle(element: HTMLElement, key: string, value: string) {\n element.style[key] = value;\n element.style[`-webkit-${key}`] = value;\n element.style[`-moz-${key}`] = value;\n element.style[`-ms-${key}`] = value;\n}\n","import {\n Directive,\n AfterViewInit,\n OnDestroy,\n ElementRef,\n Renderer2,\n NgZone,\n Input,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n inject,\n DestroyRef,\n numberAttribute\n} from '@angular/core';\nimport { ThyResizableService } from './resizable.service';\nimport { Platform } from '@angular/cdk/platform';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ThyResizeHandleMouseDownEvent } from './interface';\nimport { ThyResizeEvent } from './interface';\nimport { getEventWithPoint, ensureInBounds, setCompatibleStyle } from './utils';\nimport { fromEvent } from 'rxjs';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\n/**\n * 调整尺寸\n * @name thyResizable\n */\n@Directive({\n selector: '[thyResizable]',\n providers: [ThyResizableService],\n host: {\n class: 'thy-resizable',\n '[class.thy-resizable-resizing]': 'resizing',\n '[class.thy-resizable-disabled]': 'thyDisabled'\n }\n})\nexport class ThyResizableDirective implements AfterViewInit, OnDestroy {\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private renderer = inject(Renderer2);\n private platform = inject(Platform);\n private ngZone = inject(NgZone);\n private thyResizableService = inject(ThyResizableService);\n private changeDetectorRef = inject(ChangeDetectorRef);\n\n /**\n * 调整尺寸的边界\n * @default parent\n * @type 'window' | 'parent' | ElementRef<HTMLElement>\n */\n @Input() thyBounds: 'window' | 'parent' | ElementRef<HTMLElement> = 'parent';\n\n /**\n * 最大高度(超过边界部分忽略)\n */\n @Input({ transform: numberAttribute }) thyMaxHeight?: number;\n\n /**\n * 最大宽度(超过边界部分忽略)\n */\n @Input({ transform: numberAttribute }) thyMaxWidth?: number;\n\n /**\n * 最小高度\n */\n @Input({ transform: numberAttribute }) thyMinHeight: number = 40;\n\n /**\n * 最小宽度\n */\n @Input({ transform: numberAttribute }) thyMinWidth: number = 40;\n\n /**\n * 栅格列数(-1 为不栅格)\n */\n @Input({ transform: numberAttribute }) thyGridColumnCount: number = -1;\n\n /**\n * 栅格最大列数\n */\n @Input({ transform: numberAttribute }) thyMaxColumn: number = -1;\n\n /**\n * 栅格最小列数\n */\n @Input({ transform: numberAttribute }) thyMinColumn: number = -1;\n\n /**\n * 锁定宽高比\n */\n @Input({ transform: coerceBooleanProperty }) thyLockAspectRatio: boolean = false;\n\n /**\n * 是否预览模式\n */\n @Input({ transform: coerceBooleanProperty }) thyPreview: boolean = false;\n\n /**\n * 是否禁用调整大小\n */\n @Input({ transform: coerceBooleanProperty }) thyDisabled: boolean = false;\n\n /**\n * 调整尺寸时的事件\n */\n @Output() readonly thyResize = new EventEmitter<ThyResizeEvent>();\n\n /**\n * 开始调整尺寸时的事件\n */\n @Output() readonly thyResizeStart = new EventEmitter<ThyResizeEvent>();\n\n /**\n * 结束调整尺寸时的事件\n */\n @Output() readonly thyResizeEnd = new EventEmitter<ThyResizeEvent>();\n\n resizing = false;\n private nativeElement!: HTMLElement;\n private nativeElementRect!: ClientRect | DOMRect;\n private sizeCache: ThyResizeEvent | null = null;\n private ghostElement: HTMLDivElement | null = null;\n private currentHandleEvent: ThyResizeHandleMouseDownEvent | null = null;\n private readonly destroyRef = inject(DestroyRef);\n\n constructor() {\n this.thyResizableService.handleMouseDownOutsideAngular$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(event => {\n if (this.thyDisabled) {\n return;\n }\n this.resizing = true;\n const { mouseEvent } = event;\n this.thyResizableService.startResizing(mouseEvent);\n this.currentHandleEvent = event;\n this.setCursor();\n // Re-enter the Angular zone and run the change detection only if there're any `thyResizeStart` listeners,\n // e.g.: `<div thyResizable (thyResizeStart)=\"...\"></div>`.\n if (this.thyResizeStart.observers.length) {\n this.ngZone.run(() => this.thyResizeStart.emit({ mouseEvent }));\n }\n this.nativeElementRect = this.nativeElement.getBoundingClientRect();\n });\n\n this.thyResizableService.documentMouseUpOutsideAngular$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(event => {\n if (this.resizing) {\n this.ngZone.run(() => {\n this.resizing = false;\n this.changeDetectorRef.markForCheck();\n });\n this.thyResizableService.documentMouseUpOutsideAngular$.next(event);\n this.endResize(event);\n }\n });\n\n this.thyResizableService.documentMouseMoveOutsideAngular$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(event => {\n if (this.resizing) {\n this.resize(event);\n }\n });\n }\n\n ngAfterViewInit(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n this.nativeElement = this.elementRef.nativeElement;\n this.ngZone.runOutsideAngular(() => {\n fromEvent(this.nativeElement, 'mouseenter')\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.thyResizableService.mouseEnteredOutsideAngular$.next(true);\n });\n\n fromEvent(this.nativeElement, 'mouseleave')\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.thyResizableService.mouseEnteredOutsideAngular$.next(false);\n });\n });\n }\n\n setCursor(): void {\n switch (this.currentHandleEvent!.direction) {\n case 'left':\n case 'right':\n this.renderer.setStyle(document.body, 'cursor', 'ew-resize');\n break;\n case 'top':\n case 'bottom':\n this.renderer.setStyle(document.body, 'cursor', 'ns-resize');\n break;\n case 'topLeft':\n case 'bottomRight':\n this.renderer.setStyle(document.body, 'cursor', 'nwse-resize');\n break;\n case 'topRight':\n case 'bottomLeft':\n this.renderer.setStyle(document.body, 'cursor', 'nesw-resize');\n break;\n }\n setCompatibleStyle(document.body, 'user-select', 'none');\n }\n\n endResize(event: MouseEvent | TouchEvent): void {\n this.renderer.setStyle(document.body, 'cursor', '');\n setCompatibleStyle(document.body, 'user-select', '');\n this.removeGhostElement();\n const size = this.sizeCache\n ? { ...this.sizeCache }\n : {\n width: this.nativeElementRect.width,\n height: this.nativeElementRect.height\n };\n // Re-enter the Angular zone and run the change detection only if there're any `thyResizeEnd` listeners,\n // e.g.: `<div thyResizable (thyResizeEnd)=\"...\"></div>`.\n if (this.thyResizeEnd.observers.length) {\n this.ngZone.run(() => {\n this.thyResizeEnd.emit({\n ...size,\n mouseEvent: event\n });\n });\n }\n this.sizeCache = null;\n this.currentHandleEvent = null;\n }\n\n resize(event: MouseEvent | TouchEvent): void {\n const nativeElementRect = this.nativeElementRect;\n const resizeEvent = getEventWithPoint(event);\n const handleEvent = getEventWithPoint(this.currentHandleEvent!.mouseEvent);\n let width = nativeElementRect.width;\n let height = nativeElementRect.height;\n const ratio = this.thyLockAspectRatio ? width / height : -1;\n switch (this.currentHandleEvent!.direction) {\n case 'bottomRight':\n width = resizeEvent.clientX - nativeElementRect.left;\n height = resizeEvent.clientY - nativeElementRect.top;\n break;\n case 'bottomLeft':\n width = nativeElementRect.width + (handleEvent.clientX - resizeEvent.clientX);\n height = resizeEvent.clientY - nativeElementRect.top;\n break;\n case 'topRight':\n width = resizeEvent.clientX - nativeElementRect.left;\n height = nativeElementRect.height + (handleEvent.clientY - resizeEvent.clientY);\n break;\n case 'topLeft':\n width = nativeElementRect.width + (handleEvent.clientX - resizeEvent.clientX);\n height = nativeElementRect.height + (handleEvent.clientY - resizeEvent.clientY);\n break;\n case 'top':\n height = nativeElementRect.height + (handleEvent.clientY - resizeEvent.clientY);\n break;\n case 'right':\n width = resizeEvent.clientX - nativeElementRect.left;\n break;\n case 'bottom':\n height = resizeEvent.clientY - nativeElementRect.top;\n break;\n case 'left':\n width = nativeElementRect.width + (handleEvent.clientX - resizeEvent.clientX);\n }\n const size = this.calcSize(width, height, ratio);\n this.sizeCache = { ...size };\n // Re-enter the Angular zone and run the change detection only if there're any `thyResize` listeners,\n // e.g.: `<div thyResizable (thyResize)=\"...\"></div>`.\n if (this.thyResize.observers.length) {\n this.ngZone.run(() => {\n this.thyResize.emit({\n ...size,\n mouseEvent: event\n });\n });\n }\n\n if (this.thyPreview) {\n this.previewResize(size);\n }\n }\n\n calcSize(width: number, height: number, ratio: number): ThyResizeEvent {\n let newWidth: number;\n let newHeight: number;\n let maxWidth: number;\n let maxHeight: number;\n let col = 0;\n let spanWidth = 0;\n let minWidth = this.thyMinWidth;\n let boundWidth = Infinity;\n let boundHeight = Infinity;\n if (this.thyBounds === 'parent') {\n const parent = this.renderer.parentNode(this.nativeElement);\n if (parent instanceof HTMLElement) {\n const parentRect = parent.getBoundingClientRect();\n boundWidth = parentRect.width;\n boundHeight = parentRect.height;\n }\n } else if (this.thyBounds === 'window') {\n if (typeof window !== 'undefined') {\n boundWidth = window.innerWidth;\n boundHeight = window.innerHeight;\n }\n } else if (this.thyBounds && this.thyBounds.nativeElement && this.thyBounds.nativeElement instanceof HTMLElement) {\n const boundsRect = this.thyBounds.nativeElement.getBoundingClientRect();\n boundWidth = boundsRect.width;\n boundHeight = boundsRect.height;\n }\n\n maxWidth = ensureInBounds(this.thyMaxWidth!, boundWidth);\n maxHeight = ensureInBounds(this.thyMaxHeight!, boundHeight);\n\n if (this.thyGridColumnCount !== -1) {\n spanWidth = maxWidth / this.thyGridColumnCount;\n minWidth = this.thyMinColumn !== -1 ? spanWidth * this.thyMinColumn : minWidth;\n maxWidth = this.thyMaxColumn !== -1 ? spanWidth * this.thyMaxColumn : maxWidth;\n }\n\n if (ratio !== -1) {\n if (/(left|right)/i.test(this.currentHandleEvent!.direction)) {\n newWidth = Math.min(Math.max(width, minWidth), maxWidth);\n newHeight = Math.min(Math.max(newWidth / ratio, this.thyMinHeight), maxHeight);\n if (newHeight >= maxHeight || newHeight <= this.thyMinHeight) {\n newWidth = Math.min(Math.max(newHeight * ratio, minWidth), maxWidth);\n }\n } else {\n newHeight = Math.min(Math.max(height, this.thyMinHeight), maxHeight);\n newWidth = Math.min(Math.max(newHeight * ratio, minWidth), maxWidth);\n if (newWidth >= maxWidth || newWidth <= minWidth) {\n newHeight = Math.min(Math.max(newWidth / ratio, this.thyMinHeight), maxHeight);\n }\n }\n } else {\n newWidth = Math.min(Math.max(width, minWidth), maxWidth);\n newHeight = Math.min(Math.max(height, this.thyMinHeight), maxHeight);\n }\n\n if (this.thyGridColumnCount !== -1) {\n col = Math.round(newWidth / spanWidth);\n newWidth = col * spanWidth;\n }\n\n return {\n col,\n width: newWidth,\n height: newHeight\n };\n }\n\n previewResize({ width, height }: ThyResizeEvent): void {\n this.createGhostElement();\n this.renderer.setStyle(this.ghostElement, 'width', `${width}px`);\n this.renderer.setStyle(this.ghostElement, 'height', `${height}px`);\n }\n\n createGhostElement(): void {\n if (!this.ghostElement) {\n this.ghostElement = this.renderer.createElement('div');\n this.renderer.setAttribute(this.ghostElement, 'class', 'thy-resizable-preview');\n }\n this.renderer.appendChild(this.nativeElement, this.ghostElement);\n }\n\n removeGhostElement(): void {\n if (this.ghostElement) {\n this.renderer.removeChild(this.nativeElement, this.ghostElement);\n }\n }\n\n ngOnDestroy(): void {\n this.ghostElement = null;\n this.sizeCache = null;\n }\n}\n","export type ThyResizeDirection = 'top' | 'right' | 'bottom' | 'left' | 'topRight' | 'bottomRight' | 'bottomLeft' | 'topLeft';\n\nexport interface ThyResizeEvent {\n width?: number;\n height?: number;\n col?: number;\n mouseEvent?: MouseEvent | TouchEvent;\n}\n\nexport class ThyResizeHandleMouseDownEvent {\n constructor(\n public direction: ThyResizeDirection,\n public mouseEvent: MouseEvent | TouchEvent\n ) {}\n}\n","import {\n OnInit,\n Component,\n ChangeDetectionStrategy,\n Input,\n Output,\n NgZone,\n EventEmitter,\n ElementRef,\n inject,\n DestroyRef\n} from '@angular/core';\nimport { normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport { ThyResizeDirection, ThyResizeHandleMouseDownEvent } from './interface';\nimport { ThyResizableService } from './resizable.service';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { fromEvent, merge } from 'rxjs';\nimport { useHostRenderer } from '@tethys/cdk/dom';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\nconst passiveEventListenerOptions = <AddEventListenerOptions>normalizePassiveListenerOptions({ passive: true });\n\n/**\n * 定义调整手柄及方向\n * @name thy-resize-handle\n */\n@Component({\n selector: 'thy-resize-handle, [thy-resize-handle]',\n exportAs: 'thyResizeHandle',\n template: `\n <ng-content></ng-content>\n @if (thyLine) {\n <div class=\"thy-resizable-handle-line\"></div>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-resizable-handle',\n '[class.thy-resizable-handle-top]': `thyDirection === 'top'`,\n '[class.thy-resizable-handle-right]': `thyDirection === 'right'`,\n '[class.thy-resizable-handle-bottom]': `thyDirection === 'bottom'`,\n '[class.thy-resizable-handle-left]': `thyDirection === 'left'`,\n '[class.thy-resizable-handle-topRight]': `thyDirection === 'topRight'`,\n '[class.thy-resizable-handle-bottomRight]': `thyDirection === 'bottomRight'`,\n '[class.thy-resizable-handle-bottomLeft]': `thyDirection === 'bottomLeft'`,\n '[class.thy-resizable-handle-topLeft]': `thyDirection === 'topLeft'`,\n '[class.thy-resizable-handle-box-hover]': 'entered'\n },\n imports: []\n})\nexport class ThyResizeHandle implements OnInit {\n private ngZone = inject(NgZone);\n private thyResizableService = inject(ThyResizableService);\n private host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * 调整方向\n * @type top | right | bottom | left | topRight | bottomRight | bottomLeft | topLeft\n */\n @Input() thyDirection: ThyResizeDirection = 'bottomRight';\n\n /**\n * 是否展示拖拽线\n */\n @Input({ transform: coerceBooleanProperty }) thyLine = false;\n\n /**\n * MouseDown 回调事件\n */\n @Output() readonly thyMouseDown = new EventEmitter<ThyResizeHandleMouseDownEvent>();\n\n private hostRenderer = useHostRenderer();\n\n private readonly destroyRef = inject(DestroyRef);\n\n ngOnInit(): void {\n this.thyResizableService.mouseEnteredOutsideAngular$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(entered => {\n if (entered) {\n this.hostRenderer.addClass('thy-resizable-handle-box-hover');\n } else {\n this.hostRenderer.removeClass('thy-resizable-handle-box-hover');\n }\n });\n this.ngZone.runOutsideAngular(() => {\n // Note: since Chrome 56 defaults document level `touchstart` listener to passive.\n // The element `touchstart` listener is not passive by default\n // We never call `preventDefault()` on it, so we're safe making it passive too.\n merge(\n fromEvent<MouseEvent>(this.host.nativeElement, 'mousedown', passiveEventListenerOptions),\n fromEvent<TouchEvent>(this.host.nativeElement, 'touchstart', passiveEventListenerOptions)\n )\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((event: MouseEvent | TouchEvent) => {\n this.thyResizableService.handleMouseDownOutsideAngular$.next(\n new ThyResizeHandleMouseDownEvent(this.thyDirection, event)\n );\n });\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges } from '@angular/core';\nimport { ThyResizeDirection } from './interface';\nimport { ThyResizeHandle } from './resize-handle.component';\n\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\nexport const DEFAULT_RESIZE_DIRECTION: ThyResizeDirection[] = [\n 'bottomRight',\n 'topRight',\n 'bottomLeft',\n 'topLeft',\n 'bottom',\n 'right',\n 'top',\n 'left'\n];\n\n/**\n * 定义调整手柄的快捷组件\n * @name thy-resize-handles\n */\n@Component({\n selector: 'thy-resize-handles',\n exportAs: 'thyResizeHandles',\n template: `\n @for (dir of directions; track $index) {\n <thy-resize-handle [thyLine]=\"thyLine\" [thyDirection]=\"dir\"></thy-resize-handle>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ThyResizeHandle]\n})\nexport class ThyResizeHandles implements OnChanges {\n /**\n * 定义调整手柄的方向\n * @type ThyResizeDirection[]\n */\n @Input() thyDirections: ThyResizeDirection[] = DEFAULT_RESIZE_DIRECTION;\n\n /**\n * 是否展示拖拽线\n */\n @Input({ transform: coerceBooleanProperty }) thyLine = false;\n\n directions = new Set<ThyResizeDirection>(this.thyDirections);\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.thyDirections) {\n this.directions = new Set(changes.thyDirections.currentValue);\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ThyResizableDirective } from './resizable.directive';\nimport { ThyResizeHandle } from './resize-handle.component';\nimport { ThyResizeHandles } from './resize-handles.component';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule, ThyResizableDirective, ThyResizeHandle, ThyResizeHandles],\n exports: [ThyResizableDirective, ThyResizeHandle, ThyResizeHandles]\n})\nexport class ThyResizableModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAMA;;AAEG;MAEU,mBAAmB,CAAA;AAsB5B,IAAA,WAAA,GAAA;AArBQ,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAGvB,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,GAAG,EAAoD;AAE/E;;;;;;;;;AASG;AAEH,QAAA,IAAA,CAAA,8BAA8B,GAAG,IAAI,OAAO,EAAiC;AAC7E,QAAA,IAAA,CAAA,8BAA8B,GAAG,IAAI,OAAO,EAA2B;AACvE,QAAA,IAAA,CAAA,gCAAgC,GAAG,IAAI,OAAO,EAA2B;AACzE,QAAA,IAAA,CAAA,2BAA2B,GA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,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,OAAO,EAAE,CAAC,eAAe;AAC5B,iBAAA;8BAMY,aAAa,EAAA,CAAA;sBAArB;gBAK4C,OAAO,EAAA,CAAA;sBAAnD,KAAK;uBAAC,EAAE,SAAS,EAAE,qBAAqB,EAAE;;;MChClC,kBAAkB,CAAA;8GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAlB,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,kBAAkB,EAHjB,OAAA,EAAA,CAAA,YAAY,EAAE,qBAAqB,EAAE,eAAe,EAAE,gBAAgB,CACtE,EAAA,OAAA,EAAA,CAAA,qBAAqB,EAAE,eAAe,EAAE,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAEzD,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,kBAAkB,YAHjB,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGb,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,EAAE,qBAAqB,EAAE,eAAe,EAAE,gBAAgB,CAAC;AACjF,oBAAA,OAAO,EAAE,CAAC,qBAAqB,EAAE,eAAe,EAAE,gBAAgB;AACrE,iBAAA;;;ACTD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-tethys-resizable.mjs","sources":["../../../src/resizable/resizable.service.ts","../../../src/resizable/utils.ts","../../../src/resizable/resizable.directive.ts","../../../src/resizable/interface.ts","../../../src/resizable/resize-handle.component.ts","../../../src/resizable/resize-handles.component.ts","../../../src/resizable/module.ts","../../../src/resizable/ngx-tethys-resizable.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { Injectable, NgZone, OnDestroy, inject } from '@angular/core';\nimport { isTouchEvent } from 'ngx-tethys/util';\nimport { Subject } from 'rxjs';\nimport { ThyResizeHandleMouseDownEvent } from './interface';\n\n/**\n * @internal\n */\n@Injectable()\nexport class ThyResizableService implements OnDestroy {\n private ngZone = inject(NgZone);\n\n private document: Document;\n private listeners = new Map<string, (event: MouseEvent | TouchEvent) => void>();\n\n /**\n * The `OutsideAngular` prefix means that the subject will emit events outside of the Angular zone,\n * so that becomes a bit more descriptive for those who'll maintain the code in the future:\n * ```ts\n * thyResizableService.handleMouseDownOutsideAngular$.subscribe(event => {\n * console.log(Zone.current); // <root>\n * console.log(NgZone.isInAngularZone()); // false\n * });\n * ```\n */\n\n handleMouseDownOutsideAngular$ = new Subject<ThyResizeHandleMouseDownEvent>();\n documentMouseUpOutsideAngular$ = new Subject<MouseEvent | TouchEvent>();\n documentMouseMoveOutsideAngular$ = new Subject<MouseEvent | TouchEvent>();\n mouseEnteredOutsideAngular$ = new Subject<boolean>();\n\n constructor() {\n const document = inject(DOCUMENT);\n\n this.document = document;\n }\n\n startResizing(event: MouseEvent | TouchEvent): void {\n const _isTouchEvent = isTouchEvent(event);\n this.clearListeners();\n const moveEvent = _isTouchEvent ? 'touchmove' : 'mousemove';\n const upEvent = _isTouchEvent ? 'touchend' : 'mouseup';\n const moveEventHandler = (e: MouseEvent | TouchEvent) => {\n this.documentMouseMoveOutsideAngular$.next(e);\n };\n const upEventHandler = (e: MouseEvent | TouchEvent) => {\n this.documentMouseUpOutsideAngular$.next(e);\n this.clearListeners();\n };\n\n this.listeners.set(moveEvent, moveEventHandler);\n this.listeners.set(upEvent, upEventHandler);\n this.ngZone.runOutsideAngular(() => {\n this.listeners.forEach((handler, name) => {\n this.document.addEventListener(name, handler as EventListener);\n });\n });\n }\n\n private clearListeners(): void {\n this.listeners.forEach((handler, name) => {\n this.document.removeEventListener(name, handler as EventListener);\n });\n this.listeners.clear();\n }\n\n ngOnDestroy(): void {\n this.handleMouseDownOutsideAngular$.complete();\n this.documentMouseUpOutsideAngular$.complete();\n this.documentMouseMoveOutsideAngular$.complete();\n this.mouseEnteredOutsideAngular$.complete();\n this.clearListeners();\n }\n}\n","import { isTouchEvent } from 'ngx-tethys/util';\n\nexport function getEventWithPoint(event: MouseEvent | TouchEvent): MouseEvent | Touch {\n return isTouchEvent(event) ? event.touches[0] || event.changedTouches[0] : (event as MouseEvent);\n}\n\nexport function ensureInBounds(value: number, boundValue: number): number {\n return value ? (value < boundValue ? value : boundValue) : boundValue;\n}\n\nexport function setCompatibleStyle(element: HTMLElement, key: string, value: string) {\n element.style[key] = value;\n element.style[`-webkit-${key}`] = value;\n element.style[`-moz-${key}`] = value;\n element.style[`-ms-${key}`] = value;\n}\n","import {\n Directive,\n OnDestroy,\n ElementRef,\n Renderer2,\n NgZone,\n inject,\n DestroyRef,\n numberAttribute,\n input,\n output,\n signal\n} from '@angular/core';\nimport { ThyResizableService } from './resizable.service';\nimport { Platform } from '@angular/cdk/platform';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ThyResizeHandleMouseDownEvent } from './interface';\nimport { ThyResizeEvent } from './interface';\nimport { getEventWithPoint, ensureInBounds, setCompatibleStyle } from './utils';\nimport { fromEvent } from 'rxjs';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\n/**\n * 调整尺寸\n * @name thyResizable\n */\n@Directive({\n selector: '[thyResizable]',\n providers: [ThyResizableService],\n host: {\n class: 'thy-resizable',\n '[class.thy-resizable-resizing]': 'resizing()',\n '[class.thy-resizable-disabled]': 'thyDisabled()'\n }\n})\nexport class ThyResizableDirective implements OnDestroy {\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private renderer = inject(Renderer2);\n private platform = inject(Platform);\n private ngZone = inject(NgZone);\n private thyResizableService = inject(ThyResizableService);\n\n /**\n * 调整尺寸的边界\n * @default parent\n * @type 'window' | 'parent' | ElementRef<HTMLElement>\n */\n readonly thyBounds = input<'window' | 'parent' | ElementRef<HTMLElement>>('parent');\n\n /**\n * 最大高度(超过边界部分忽略)\n */\n readonly thyMaxHeight = input<number, unknown>(undefined, { transform: numberAttribute });\n\n /**\n * 最大宽度(超过边界部分忽略)\n */\n readonly thyMaxWidth = input<number, unknown>(undefined, { transform: numberAttribute });\n\n /**\n * 最小高度\n */\n readonly thyMinHeight = input(40, { transform: numberAttribute });\n\n /**\n * 最小宽度\n */\n readonly thyMinWidth = input(40, { transform: numberAttribute });\n\n /**\n * 栅格列数(-1 为不栅格)\n */\n readonly thyGridColumnCount = input(-1, { transform: numberAttribute });\n\n /**\n * 栅格最大列数\n */\n readonly thyMaxColumn = input(-1, { transform: numberAttribute });\n\n /**\n * 栅格最小列数\n */\n readonly thyMinColumn = input(-1, { transform: numberAttribute });\n\n /**\n * 锁定宽高比\n */\n readonly thyLockAspectRatio = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 是否预览模式\n */\n readonly thyPreview = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 是否禁用调整大小\n */\n readonly thyDisabled = input(false, { transform: coerceBooleanProperty });\n\n /**\n * 调整尺寸时的事件\n */\n readonly thyResize = output<ThyResizeEvent>();\n\n /**\n * 开始调整尺寸时的事件\n */\n readonly thyResizeStart = output<ThyResizeEvent>();\n\n /**\n * 结束调整尺寸时的事件\n */\n readonly thyResizeEnd = output<ThyResizeEvent>();\n\n resizing = signal(false);\n private get nativeElement() {\n return this.elementRef.nativeElement as HTMLElement;\n }\n private nativeElementRect!: ClientRect | DOMRect;\n private sizeCache: ThyResizeEvent | null = null;\n private ghostElement: HTMLDivElement | null = null;\n private currentHandleEvent: ThyResizeHandleMouseDownEvent | null = null;\n private readonly destroyRef = inject(DestroyRef);\n\n constructor() {\n this.thyResizableService.handleMouseDownOutsideAngular$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(event => {\n if (this.thyDisabled()) {\n return;\n }\n this.resizing.set(true);\n const { mouseEvent } = event;\n this.thyResizableService.startResizing(mouseEvent);\n this.currentHandleEvent = event;\n this.setCursor();\n // Re-enter the Angular zone and run the change detection only if there're any `thyResizeStart` listeners,\n // e.g.: `<div thyResizable (thyResizeStart)=\"...\"></div>`.\n this.ngZone.run(() => this.thyResizeStart.emit({ mouseEvent }));\n this.nativeElementRect = this.nativeElement.getBoundingClientRect();\n });\n\n this.thyResizableService.documentMouseUpOutsideAngular$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(event => {\n if (this.resizing()) {\n this.ngZone.run(() => {\n this.resizing.set(false);\n });\n this.thyResizableService.documentMouseUpOutsideAngular$.next(event);\n this.endResize(event);\n }\n });\n\n this.thyResizableService.documentMouseMoveOutsideAngular$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(event => {\n if (this.resizing()) {\n this.resize(event);\n }\n });\n\n this.bindMouseEnterAndLeaveEvents();\n }\n\n private bindMouseEnterAndLeaveEvents() {\n if (!this.platform.isBrowser) {\n return;\n }\n this.ngZone.runOutsideAngular(() => {\n fromEvent(this.nativeElement, 'mouseenter')\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.thyResizableService.mouseEnteredOutsideAngular$.next(true);\n });\n\n fromEvent(this.nativeElement, 'mouseleave')\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.thyResizableService.mouseEnteredOutsideAngular$.next(false);\n });\n });\n }\n\n setCursor(): void {\n switch (this.currentHandleEvent!.direction) {\n case 'left':\n case 'right':\n this.renderer.setStyle(document.body, 'cursor', 'ew-resize');\n break;\n case 'top':\n case 'bottom':\n this.renderer.setStyle(document.body, 'cursor', 'ns-resize');\n break;\n case 'topLeft':\n case 'bottomRight':\n this.renderer.setStyle(document.body, 'cursor', 'nwse-resize');\n break;\n case 'topRight':\n case 'bottomLeft':\n this.renderer.setStyle(document.body, 'cursor', 'nesw-resize');\n break;\n }\n setCompatibleStyle(document.body, 'user-select', 'none');\n }\n\n endResize(event: MouseEvent | TouchEvent): void {\n this.renderer.setStyle(document.body, 'cursor', '');\n setCompatibleStyle(document.body, 'user-select', '');\n this.removeGhostElement();\n const size = this.sizeCache\n ? { ...this.sizeCache }\n : {\n width: this.nativeElementRect.width,\n height: this.nativeElementRect.height\n };\n // Re-enter the Angular zone and run the change detection only if there're any `thyResizeEnd` listeners,\n // e.g.: `<div thyResizable (thyResizeEnd)=\"...\"></div>`.\n this.ngZone.run(() => {\n this.thyResizeEnd.emit({\n ...size,\n mouseEvent: event\n });\n });\n this.sizeCache = null;\n this.currentHandleEvent = null;\n }\n\n resize(event: MouseEvent | TouchEvent): void {\n const nativeElementRect = this.nativeElementRect;\n const resizeEvent = getEventWithPoint(event);\n const handleEvent = getEventWithPoint(this.currentHandleEvent!.mouseEvent);\n let width = nativeElementRect.width;\n let height = nativeElementRect.height;\n const ratio = this.thyLockAspectRatio() ? width / height : -1;\n switch (this.currentHandleEvent!.direction) {\n case 'bottomRight':\n width = resizeEvent.clientX - nativeElementRect.left;\n height = resizeEvent.clientY - nativeElementRect.top;\n break;\n case 'bottomLeft':\n width = nativeElementRect.width + (handleEvent.clientX - resizeEvent.clientX);\n height = resizeEvent.clientY - nativeElementRect.top;\n break;\n case 'topRight':\n width = resizeEvent.clientX - nativeElementRect.left;\n height = nativeElementRect.height + (handleEvent.clientY - resizeEvent.clientY);\n break;\n case 'topLeft':\n width = nativeElementRect.width + (handleEvent.clientX - resizeEvent.clientX);\n height = nativeElementRect.height + (handleEvent.clientY - resizeEvent.clientY);\n break;\n case 'top':\n height = nativeElementRect.height + (handleEvent.clientY - resizeEvent.clientY);\n break;\n case 'right':\n width = resizeEvent.clientX - nativeElementRect.left;\n break;\n case 'bottom':\n height = resizeEvent.clientY - nativeElementRect.top;\n break;\n case 'left':\n width = nativeElementRect.width + (handleEvent.clientX - resizeEvent.clientX);\n }\n const size = this.calcSize(width, height, ratio);\n this.sizeCache = { ...size };\n // Re-enter the Angular zone and run the change detection only if there're any `thyResize` listeners,\n // e.g.: `<div thyResizable (thyResize)=\"...\"></div>`.\n this.ngZone.run(() => {\n this.thyResize.emit({\n ...size,\n mouseEvent: event\n });\n });\n\n if (this.thyPreview()) {\n this.previewResize(size);\n }\n }\n\n calcSize(width: number, height: number, ratio: number): ThyResizeEvent {\n let newWidth: number;\n let newHeight: number;\n let maxWidth: number;\n let maxHeight: number;\n let col = 0;\n let spanWidth = 0;\n let minWidth = this.thyMinWidth();\n let boundWidth = Infinity;\n let boundHeight = Infinity;\n const bounds = this.thyBounds();\n if (bounds === 'parent') {\n const parent = this.renderer.parentNode(this.nativeElement);\n if (parent instanceof HTMLElement) {\n const parentRect = parent.getBoundingClientRect();\n boundWidth = parentRect.width;\n boundHeight = parentRect.height;\n }\n } else if (bounds === 'window') {\n if (typeof window !== 'undefined') {\n boundWidth = window.innerWidth;\n boundHeight = window.innerHeight;\n }\n } else if (bounds && bounds.nativeElement && bounds.nativeElement instanceof HTMLElement) {\n const boundsRect = bounds.nativeElement.getBoundingClientRect();\n boundWidth = boundsRect.width;\n boundHeight = boundsRect.height;\n }\n\n maxWidth = ensureInBounds(this.thyMaxWidth()!, boundWidth);\n maxHeight = ensureInBounds(this.thyMaxHeight()!, boundHeight);\n\n const gridColumnCount = this.thyGridColumnCount();\n if (gridColumnCount !== -1) {\n spanWidth = maxWidth / gridColumnCount;\n const minColumn = this.thyMinColumn();\n minWidth = minColumn !== -1 ? spanWidth * minColumn : minWidth;\n const maxColumn = this.thyMaxColumn();\n maxWidth = maxColumn !== -1 ? spanWidth * maxColumn : maxWidth;\n }\n\n const minHeight = this.thyMinHeight();\n if (ratio !== -1) {\n if (/(left|right)/i.test(this.currentHandleEvent!.direction)) {\n newWidth = Math.min(Math.max(width, minWidth), maxWidth);\n newHeight = Math.min(Math.max(newWidth / ratio, minHeight), maxHeight);\n if (newHeight >= maxHeight || newHeight <= minHeight) {\n newWidth = Math.min(Math.max(newHeight * ratio, minWidth), maxWidth);\n }\n } else {\n newHeight = Math.min(Math.max(height, minHeight), maxHeight);\n newWidth = Math.min(Math.max(newHeight * ratio, minWidth), maxWidth);\n if (newWidth >= maxWidth || newWidth <= minWidth) {\n newHeight = Math.min(Math.max(newWidth / ratio, minHeight), maxHeight);\n }\n }\n } else {\n newWidth = Math.min(Math.max(width, minWidth), maxWidth);\n newHeight = Math.min(Math.max(height, minHeight), maxHeight);\n }\n\n if (gridColumnCount !== -1) {\n col = Math.round(newWidth / spanWidth);\n newWidth = col * spanWidth;\n }\n\n return {\n col,\n width: newWidth,\n height: newHeight\n };\n }\n\n previewResize({ width, height }: ThyResizeEvent): void {\n this.createGhostElement();\n this.renderer.setStyle(this.ghostElement, 'width', `${width}px`);\n this.renderer.setStyle(this.ghostElement, 'height', `${height}px`);\n }\n\n createGhostElement(): void {\n if (!this.ghostElement) {\n this.ghostElement = this.renderer.createElement('div');\n this.renderer.setAttribute(this.ghostElement, 'class', 'thy-resizable-preview');\n }\n this.renderer.appendChild(this.nativeElement, this.ghostElement);\n }\n\n removeGhostElement(): void {\n if (this.ghostElement) {\n this.renderer.removeChild(this.nativeElement, this.ghostElement);\n }\n }\n\n ngOnDestroy(): void {\n this.ghostElement = null;\n this.sizeCache = null;\n }\n}\n","export type ThyResizeDirection = 'top' | 'right' | 'bottom' | 'left' | 'topRight' | 'bottomRight' | 'bottomLeft' | 'topLeft';\n\nexport interface ThyResizeEvent {\n width?: number;\n height?: number;\n col?: number;\n mouseEvent?: MouseEvent | TouchEvent;\n}\n\nexport class ThyResizeHandleMouseDownEvent {\n constructor(\n public direction: ThyResizeDirection,\n public mouseEvent: MouseEvent | TouchEvent\n ) {}\n}\n","import { OnInit, Component, ChangeDetectionStrategy, NgZone, ElementRef, inject, DestroyRef, input, output } from '@angular/core';\nimport { normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport { ThyResizeDirection, ThyResizeHandleMouseDownEvent } from './interface';\nimport { ThyResizableService } from './resizable.service';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { fromEvent, merge } from 'rxjs';\nimport { useHostRenderer } from '@tethys/cdk/dom';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\nconst passiveEventListenerOptions = <AddEventListenerOptions>normalizePassiveListenerOptions({ passive: true });\n\n/**\n * 定义调整手柄及方向\n * @name thy-resize-handle\n */\n@Component({\n selector: 'thy-resize-handle, [thy-resize-handle]',\n exportAs: 'thyResizeHandle',\n template: `\n <ng-content></ng-content>\n @if (thyLine()) {\n <div class=\"thy-resizable-handle-line\"></div>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'thy-resizable-handle',\n '[class.thy-resizable-handle-top]': `thyDirection() === 'top'`,\n '[class.thy-resizable-handle-right]': `thyDirection() === 'right'`,\n '[class.thy-resizable-handle-bottom]': `thyDirection() === 'bottom'`,\n '[class.thy-resizable-handle-left]': `thyDirection() === 'left'`,\n '[class.thy-resizable-handle-topRight]': `thyDirection() === 'topRight'`,\n '[class.thy-resizable-handle-bottomRight]': `thyDirection() === 'bottomRight'`,\n '[class.thy-resizable-handle-bottomLeft]': `thyDirection() === 'bottomLeft'`,\n '[class.thy-resizable-handle-topLeft]': `thyDirection() === 'topLeft'`,\n '[class.thy-resizable-handle-box-hover]': 'entered'\n },\n imports: []\n})\nexport class ThyResizeHandle implements OnInit {\n private ngZone = inject(NgZone);\n private thyResizableService = inject(ThyResizableService);\n private host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * 调整方向\n * @type top | right | bottom | left | topRight | bottomRight | bottomLeft | topLeft\n */\n readonly thyDirection = input<ThyResizeDirection>('bottomRight');\n\n /**\n * 是否展示拖拽线\n * @type boolean\n */\n readonly thyLine = input(false, { transform: coerceBooleanProperty });\n\n /**\n * MouseDown 回调事件\n */\n readonly thyMouseDown = output<ThyResizeHandleMouseDownEvent>();\n\n private hostRenderer = useHostRenderer();\n\n private readonly destroyRef = inject(DestroyRef);\n\n ngOnInit(): void {\n this.thyResizableService.mouseEnteredOutsideAngular$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(entered => {\n if (entered) {\n this.hostRenderer.addClass('thy-resizable-handle-box-hover');\n } else {\n this.hostRenderer.removeClass('thy-resizable-handle-box-hover');\n }\n });\n this.ngZone.runOutsideAngular(() => {\n // Note: since Chrome 56 defaults document level `touchstart` listener to passive.\n // The element `touchstart` listener is not passive by default\n // We never call `preventDefault()` on it, so we're safe making it passive too.\n merge(\n fromEvent<MouseEvent>(this.host.nativeElement, 'mousedown', passiveEventListenerOptions),\n fromEvent<TouchEvent>(this.host.nativeElement, 'touchstart', passiveEventListenerOptions)\n )\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((event: MouseEvent | TouchEvent) => {\n this.thyResizableService.handleMouseDownOutsideAngular$.next(\n new ThyResizeHandleMouseDownEvent(this.thyDirection(), event)\n );\n });\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { ThyResizeDirection } from './interface';\nimport { ThyResizeHandle } from './resize-handle.component';\n\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\nexport const DEFAULT_RESIZE_DIRECTION: ThyResizeDirection[] = [\n 'bottomRight',\n 'topRight',\n 'bottomLeft',\n 'topLeft',\n 'bottom',\n 'right',\n 'top',\n 'left'\n];\n\n/**\n * 定义调整手柄的快捷组件\n * @name thy-resize-handles\n */\n@Component({\n selector: 'thy-resize-handles',\n exportAs: 'thyResizeHandles',\n template: `\n @for (dir of directions(); track $index) {\n <thy-resize-handle [thyLine]=\"thyLine()\" [thyDirection]=\"dir\"></thy-resize-handle>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ThyResizeHandle]\n})\nexport class ThyResizeHandles {\n /**\n * 定义调整手柄的方向\n * @type ThyResizeDirection[]\n */\n readonly thyDirections = input<ThyResizeDirection[]>(DEFAULT_RESIZE_DIRECTION);\n\n /**\n * 是否展示拖拽线\n */\n readonly thyLine = input(false, { transform: coerceBooleanProperty });\n\n readonly directions = computed(() => {\n const directions = this.thyDirections();\n return new Set<ThyResizeDirection>(directions);\n });\n}\n","import { NgModule } from '@angular/core';\nimport { ThyResizableDirective } from './resizable.directive';\nimport { ThyResizeHandle } from './resize-handle.component';\nimport { ThyResizeHandles } from './resize-handles.component';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule, ThyResizableDirective, ThyResizeHandle, ThyResizeHandles],\n exports: [ThyResizableDirective, ThyResizeHandle, ThyResizeHandles]\n})\nexport class ThyResizableModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAMA;;AAEG;MAEU,mBAAmB,CAAA;AAsB5B,IAAA,WAAA,GAAA;AArBQ,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAGvB,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,GAAG,EAAoD;AAE/E;;;;;;;;;AASG;AAEH,QAAA,IAAA,CAAA,8BAA8B,GAAG,IAAI,OAAO,EAAiC;AAC7E,QAAA,IAAA,CAAA,8BAA8B,GAAG,IAAI,OAAO,EAA2B;AACvE,QAAA,IAAA,CAAA,gCAAgC,GAAG,IAAI,OAAO,EAA2B;AACzE,QAAA,IAAA,CAAA,2BAA2B,GAAG,IAAI,OAAO,EAAW;AAGhD,QAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAEjC,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ;;AAG5B,IAAA,aAAa,CAAC,KAA8B,EAAA;AACxC,QAAA,MAAM,aAAa,GAAG,YAAY,CAAC,KAAK,CAAC;QACzC,IAAI,CAAC,cAAc,EAAE;QACrB,MAAM,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,WAAW;QAC3D,MAAM,OAAO,GAAG,aAAa,GAAG,UAAU,GAAG,SA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AA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,EAHjB,OAAA,EAAA,CAAA,YAAY,EAAE,qBAAqB,EAAE,eAAe,EAAE,gBAAgB,CACtE,EAAA,OAAA,EAAA,CAAA,qBAAqB,EAAE,eAAe,EAAE,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAEzD,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,kBAAkB,YAHjB,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGb,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,EAAE,qBAAqB,EAAE,eAAe,EAAE,gBAAgB,CAAC;AACjF,oBAAA,OAAO,EAAE,CAAC,qBAAqB,EAAE,eAAe,EAAE,gBAAgB;AACrE,iBAAA;;;ACTD;;AAEG;;;;"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, ElementRef, NgZone,
|
|
2
|
+
import { InjectionToken, inject, ElementRef, NgZone, Renderer2, input, signal, DestroyRef, afterNextRender, ChangeDetectionStrategy, Component, ChangeDetectorRef, contentChildren, numberAttribute, output, effect, ViewEncapsulation, NgModule } from '@angular/core';
|
|
3
3
|
import { NgClass, CommonModule } from '@angular/common';
|
|
4
4
|
import { ThyIcon, ThyIconModule } from 'ngx-tethys/icon';
|
|
5
5
|
import { ThyTooltipModule } from 'ngx-tethys/tooltip';
|
|
6
6
|
import { thumbMotion } from 'ngx-tethys/core';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { takeUntil } from 'rxjs/operators';
|
|
7
|
+
import { coerceBooleanProperty, assertIconOnly } from 'ngx-tethys/util';
|
|
8
|
+
import { fromEvent } from 'rxjs';
|
|
10
9
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
11
10
|
|
|
12
11
|
const THY_SEGMENTED_COMPONENT = new InjectionToken('THY_SEGMENTED_COMPONENT');
|
|
@@ -19,32 +18,43 @@ class ThySegmentItem {
|
|
|
19
18
|
constructor() {
|
|
20
19
|
this.elementRef = inject(ElementRef);
|
|
21
20
|
this.ngZone = inject(NgZone);
|
|
22
|
-
this.cdr = inject(ChangeDetectorRef);
|
|
23
21
|
this.renderer = inject(Renderer2);
|
|
24
22
|
this.parent = inject(THY_SEGMENTED_COMPONENT, { optional: true });
|
|
23
|
+
/**
|
|
24
|
+
* 选项的值
|
|
25
|
+
*/
|
|
26
|
+
this.thyValue = input();
|
|
27
|
+
/**
|
|
28
|
+
* 选项的图标
|
|
29
|
+
*/
|
|
30
|
+
this.thyIcon = input();
|
|
25
31
|
/**
|
|
26
32
|
* 是否禁用该选项
|
|
27
33
|
*/
|
|
28
|
-
this.thyDisabled = false;
|
|
29
|
-
this.
|
|
34
|
+
this.thyDisabled = input(false, { transform: coerceBooleanProperty });
|
|
35
|
+
this.isOnlyIcon = signal(false);
|
|
36
|
+
this.isWithText = signal(false);
|
|
37
|
+
this.destroyRef = inject(DestroyRef);
|
|
30
38
|
const elementRef = this.elementRef;
|
|
31
39
|
const ngZone = this.ngZone;
|
|
32
40
|
ngZone.runOutsideAngular(() => fromEvent(elementRef.nativeElement, 'click')
|
|
33
|
-
.pipe(
|
|
41
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
34
42
|
.subscribe((event) => {
|
|
35
|
-
if (!this.thyDisabled &&
|
|
43
|
+
if (!this.thyDisabled() &&
|
|
44
|
+
!this.parent.thyDisabled() &&
|
|
45
|
+
this.parent.selectedItem &&
|
|
46
|
+
this.parent.selectedItem !== this) {
|
|
36
47
|
ngZone.run(() => {
|
|
37
48
|
this.parent.selectedItem.unselect();
|
|
38
49
|
this.parent.changeSelectedItem(this, event);
|
|
39
50
|
});
|
|
40
51
|
}
|
|
41
52
|
}));
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
this.wrapSpanForText(labelDiv.childNodes);
|
|
53
|
+
afterNextRender(() => {
|
|
54
|
+
const labelDiv = this.elementRef.nativeElement.children[0];
|
|
55
|
+
this.isOnlyIcon.set(assertIconOnly(labelDiv) && this.parent.thyMode() === 'inline');
|
|
56
|
+
this.wrapSpanForText(labelDiv.childNodes);
|
|
57
|
+
});
|
|
48
58
|
}
|
|
49
59
|
select() {
|
|
50
60
|
this.elementRef.nativeElement.classList.add('active');
|
|
@@ -61,34 +71,20 @@ class ThySegmentItem {
|
|
|
61
71
|
this.renderer.appendChild(span, node);
|
|
62
72
|
}
|
|
63
73
|
if (node.nodeName === '#text' || node.nodeName === 'SPAN') {
|
|
64
|
-
this.isWithText
|
|
65
|
-
this.cdr.detectChanges();
|
|
74
|
+
this.isWithText.set(true);
|
|
66
75
|
}
|
|
67
76
|
});
|
|
68
77
|
}
|
|
69
|
-
ngOnDestroy() {
|
|
70
|
-
this.destroy$.next();
|
|
71
|
-
this.destroy$.complete();
|
|
72
|
-
}
|
|
73
78
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThySegmentItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
74
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThySegmentItem, isStandalone: true, selector: "thy-segment-item,[thy-segment-item]", inputs: { thyValue: "thyValue", thyIcon: "thyIcon", thyDisabled:
|
|
79
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThySegmentItem, isStandalone: true, selector: "thy-segment-item,[thy-segment-item]", inputs: { thyValue: { classPropertyName: "thyValue", publicName: "thyValue", isSignal: true, isRequired: false, transformFunction: null }, thyIcon: { classPropertyName: "thyIcon", publicName: "thyIcon", isSignal: true, isRequired: false, transformFunction: null }, thyDisabled: { classPropertyName: "thyDisabled", publicName: "thyDisabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.disabled": "thyDisabled()" }, classAttribute: "thy-segment-item" }, ngImport: i0, template: "<div\n class=\"thy-segment-item-label\"\n [ngClass]=\"{\n 'thy-segment-item-label-only-icon': isOnlyIcon()\n }\"\n >\n @if (thyIcon()) {\n <thy-icon class=\"thy-segment-item-icon\" [ngClass]=\"{ 'icon-with-text': isWithText() }\" [thyIconName]=\"thyIcon()\"></thy-icon>\n }\n <ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
75
80
|
}
|
|
76
81
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThySegmentItem, decorators: [{
|
|
77
82
|
type: Component,
|
|
78
83
|
args: [{ selector: 'thy-segment-item,[thy-segment-item]', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
79
|
-
class: 'thy-segment-item'
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}], thyIcon: [{
|
|
84
|
-
type: Input
|
|
85
|
-
}], thyDisabled: [{
|
|
86
|
-
type: Input,
|
|
87
|
-
args: [{ transform: coerceBooleanProperty }]
|
|
88
|
-
}, {
|
|
89
|
-
type: HostBinding,
|
|
90
|
-
args: [`class.disabled`]
|
|
91
|
-
}] } });
|
|
84
|
+
class: 'thy-segment-item',
|
|
85
|
+
'[class.disabled]': 'thyDisabled()'
|
|
86
|
+
}, imports: [NgClass, ThyIcon], template: "<div\n class=\"thy-segment-item-label\"\n [ngClass]=\"{\n 'thy-segment-item-label-only-icon': isOnlyIcon()\n }\"\n >\n @if (thyIcon()) {\n <thy-icon class=\"thy-segment-item-icon\" [ngClass]=\"{ 'icon-with-text': isWithText() }\" [thyIconName]=\"thyIcon()\"></thy-icon>\n }\n <ng-content></ng-content>\n</div>\n" }]
|
|
87
|
+
}], ctorParameters: () => [] });
|
|
92
88
|
|
|
93
89
|
/**
|
|
94
90
|
* 分段控制器组件
|
|
@@ -98,92 +94,94 @@ class ThySegment {
|
|
|
98
94
|
constructor() {
|
|
99
95
|
this.cdr = inject(ChangeDetectorRef);
|
|
100
96
|
this.destroyRef = inject(DestroyRef);
|
|
97
|
+
/**
|
|
98
|
+
* @internal
|
|
99
|
+
*/
|
|
100
|
+
this.options = contentChildren(ThySegmentItem);
|
|
101
101
|
/**
|
|
102
102
|
* 大小
|
|
103
103
|
* @type xs | sm | md | default
|
|
104
104
|
*/
|
|
105
|
-
this.thySize = 'default';
|
|
105
|
+
this.thySize = input('default');
|
|
106
106
|
/**
|
|
107
107
|
* 模式
|
|
108
108
|
* @type block | inline
|
|
109
109
|
*/
|
|
110
|
-
this.thyMode = 'block';
|
|
110
|
+
this.thyMode = input('block');
|
|
111
111
|
/**
|
|
112
112
|
* 是否禁用分段控制器
|
|
113
113
|
*/
|
|
114
|
-
this.thyDisabled = false;
|
|
114
|
+
this.thyDisabled = input(false, { transform: coerceBooleanProperty });
|
|
115
|
+
/**
|
|
116
|
+
* 选中选项的索引
|
|
117
|
+
*/
|
|
118
|
+
this.thyActiveIndex = input(undefined, { transform: numberAttribute });
|
|
115
119
|
/**
|
|
116
120
|
* 选项被选中的回调事件
|
|
117
121
|
*/
|
|
118
|
-
this.thySelectChange =
|
|
119
|
-
this.animationState = null;
|
|
122
|
+
this.thySelectChange = output();
|
|
123
|
+
this.animationState = signal(null);
|
|
120
124
|
this.transitionedTo = null;
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
this.newActiveIndex = value;
|
|
127
|
-
if (value < 0 || value === this.activeIndex) {
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
setTimeout(() => {
|
|
131
|
-
const selectedItem = this.options?.get(this.activeIndex);
|
|
132
|
-
if (selectedItem) {
|
|
133
|
-
selectedItem.unselect();
|
|
134
|
-
this.changeSelectedItem(this.options.get(value));
|
|
135
|
-
}
|
|
136
|
-
else {
|
|
137
|
-
this.activeIndex = value;
|
|
125
|
+
effect(() => {
|
|
126
|
+
const value = this.thyActiveIndex();
|
|
127
|
+
this.newActiveIndex = value;
|
|
128
|
+
if (value < 0 || value === this.activeIndex) {
|
|
129
|
+
return;
|
|
138
130
|
}
|
|
131
|
+
setTimeout(() => {
|
|
132
|
+
const options = this.options();
|
|
133
|
+
const selectedItem = options?.[this.activeIndex];
|
|
134
|
+
if (selectedItem) {
|
|
135
|
+
selectedItem.unselect();
|
|
136
|
+
this.changeSelectedItem(options?.[value]);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
this.activeIndex = value;
|
|
140
|
+
}
|
|
141
|
+
});
|
|
139
142
|
});
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
this.selectedItem?.select();
|
|
144
|
-
this.options.changes.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
145
|
-
this.options.forEach(item => {
|
|
143
|
+
effect(() => {
|
|
144
|
+
const options = this.options();
|
|
145
|
+
(options || []).forEach(item => {
|
|
146
146
|
item.unselect();
|
|
147
147
|
});
|
|
148
|
-
this.selectedItem =
|
|
148
|
+
this.selectedItem = options?.[this.newActiveIndex] || options?.[0];
|
|
149
149
|
this.selectedItem?.select();
|
|
150
|
-
this.cdr.detectChanges();
|
|
151
150
|
});
|
|
152
151
|
}
|
|
153
152
|
changeSelectedItem(item, event) {
|
|
154
|
-
|
|
153
|
+
const options = this.options();
|
|
154
|
+
this.animationState.set({
|
|
155
155
|
value: 'from',
|
|
156
|
-
params: getThumbAnimationProps(
|
|
157
|
-
};
|
|
156
|
+
params: getThumbAnimationProps(options?.[this.activeIndex || 0]?.elementRef.nativeElement)
|
|
157
|
+
});
|
|
158
158
|
this.selectedItem = null;
|
|
159
159
|
this.cdr.detectChanges();
|
|
160
|
-
this.animationState
|
|
160
|
+
this.animationState.set({
|
|
161
161
|
value: 'to',
|
|
162
162
|
params: getThumbAnimationProps(item.elementRef.nativeElement)
|
|
163
|
-
};
|
|
163
|
+
});
|
|
164
164
|
this.transitionedTo = item;
|
|
165
|
-
this.activeIndex =
|
|
166
|
-
return option.thyValue === item?.thyValue;
|
|
165
|
+
this.activeIndex = options.findIndex(option => {
|
|
166
|
+
return option.thyValue() === item?.thyValue();
|
|
167
167
|
});
|
|
168
|
-
this.thySelectChange.emit({ event: event, value: item.thyValue, activeIndex: this.activeIndex });
|
|
169
|
-
this.cdr.detectChanges();
|
|
168
|
+
this.thySelectChange.emit({ event: event, value: item.thyValue(), activeIndex: this.activeIndex });
|
|
170
169
|
}
|
|
171
170
|
handleThumbAnimationDone(event) {
|
|
172
171
|
if (event.fromState === 'from') {
|
|
173
172
|
this.selectedItem = this.transitionedTo;
|
|
174
173
|
this.selectedItem?.select();
|
|
175
174
|
this.transitionedTo = null;
|
|
176
|
-
this.animationState
|
|
177
|
-
this.cdr.detectChanges();
|
|
175
|
+
this.animationState.set(null);
|
|
178
176
|
}
|
|
179
177
|
}
|
|
180
178
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThySegment, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
181
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThySegment, isStandalone: true, selector: "thy-segment", inputs: { thySize: "thySize", thyMode: "thyMode", thyDisabled:
|
|
179
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThySegment, isStandalone: true, selector: "thy-segment", inputs: { thySize: { classPropertyName: "thySize", publicName: "thySize", isSignal: true, isRequired: false, transformFunction: null }, thyMode: { classPropertyName: "thyMode", publicName: "thyMode", isSignal: true, isRequired: false, transformFunction: null }, thyDisabled: { classPropertyName: "thyDisabled", publicName: "thyDisabled", isSignal: true, isRequired: false, transformFunction: null }, thyActiveIndex: { classPropertyName: "thyActiveIndex", publicName: "thyActiveIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thySelectChange: "thySelectChange" }, host: { properties: { "class.thy-segment-xs": "thySize() === 'xs'", "class.thy-segment-sm": "thySize() === 'sm'", "class.thy-segment-md": "thySize() === 'md'", "class.thy-segment-default": "!thySize() || thySize() === 'default'", "class.thy-segment-block": "thyMode() === 'block'", "class.disabled": "thyDisabled()" }, classAttribute: "thy-segment" }, providers: [
|
|
182
180
|
{
|
|
183
181
|
provide: THY_SEGMENTED_COMPONENT,
|
|
184
182
|
useExisting: ThySegment
|
|
185
183
|
}
|
|
186
|
-
], queries: [{ propertyName: "options", predicate: ThySegmentItem }], exportAs: ["thySegment"], ngImport: i0, template: "<div class=\"thy-segment-group\">\n @if (animationState) {\n <div\n class=\"thy-segment-thumb thy-segment-thumb-motion\"\n [@thumbMotion]=\"animationState\"\n (@thumbMotion.done)=\"handleThumbAnimationDone($event)\"\n ></div>\n }\n\n <ng-content></ng-content>\n</div>\n", animations: [thumbMotion], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
184
|
+
], queries: [{ propertyName: "options", predicate: ThySegmentItem, isSignal: true }], exportAs: ["thySegment"], ngImport: i0, template: "<div class=\"thy-segment-group\">\n @if (animationState()) {\n <div\n class=\"thy-segment-thumb thy-segment-thumb-motion\"\n [@thumbMotion]=\"animationState()\"\n (@thumbMotion.done)=\"handleThumbAnimationDone($event)\"\n ></div>\n }\n\n <ng-content></ng-content>\n</div>\n", animations: [thumbMotion], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
187
185
|
}
|
|
188
186
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThySegment, decorators: [{
|
|
189
187
|
type: Component,
|
|
@@ -194,31 +192,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
194
192
|
}
|
|
195
193
|
], host: {
|
|
196
194
|
class: 'thy-segment',
|
|
197
|
-
'[class.thy-segment-xs]': `thySize === 'xs'`,
|
|
198
|
-
'[class.thy-segment-sm]': `thySize === 'sm'`,
|
|
199
|
-
'[class.thy-segment-md]': `thySize === 'md'`,
|
|
200
|
-
'[class.thy-segment-default]': `!thySize || thySize === 'default'`,
|
|
201
|
-
'[class.thy-segment-block]': `thyMode === 'block'
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
args: [ThySegmentItem]
|
|
206
|
-
}], thySize: [{
|
|
207
|
-
type: Input
|
|
208
|
-
}], thyMode: [{
|
|
209
|
-
type: Input
|
|
210
|
-
}], thyDisabled: [{
|
|
211
|
-
type: Input,
|
|
212
|
-
args: [{ transform: coerceBooleanProperty }]
|
|
213
|
-
}, {
|
|
214
|
-
type: HostBinding,
|
|
215
|
-
args: [`class.disabled`]
|
|
216
|
-
}], thyActiveIndex: [{
|
|
217
|
-
type: Input,
|
|
218
|
-
args: [{ transform: numberAttribute }]
|
|
219
|
-
}], thySelectChange: [{
|
|
220
|
-
type: Output
|
|
221
|
-
}] } });
|
|
195
|
+
'[class.thy-segment-xs]': `thySize() === 'xs'`,
|
|
196
|
+
'[class.thy-segment-sm]': `thySize() === 'sm'`,
|
|
197
|
+
'[class.thy-segment-md]': `thySize() === 'md'`,
|
|
198
|
+
'[class.thy-segment-default]': `!thySize() || thySize() === 'default'`,
|
|
199
|
+
'[class.thy-segment-block]': `thyMode() === 'block'`,
|
|
200
|
+
'[class.disabled]': 'thyDisabled()'
|
|
201
|
+
}, imports: [], template: "<div class=\"thy-segment-group\">\n @if (animationState()) {\n <div\n class=\"thy-segment-thumb thy-segment-thumb-motion\"\n [@thumbMotion]=\"animationState()\"\n (@thumbMotion.done)=\"handleThumbAnimationDone($event)\"\n ></div>\n }\n\n <ng-content></ng-content>\n</div>\n" }]
|
|
202
|
+
}], ctorParameters: () => [] });
|
|
222
203
|
function getThumbAnimationProps(element) {
|
|
223
204
|
return {
|
|
224
205
|
transform: element.offsetLeft,
|