ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
1 lines • 31.6 kB
Source Map (JSON)
{"version":3,"file":"ng-zorro-antd-resizable.mjs","names":[],"sources":["../../components/resizable/resizable-utils.ts","../../components/resizable/resizable.service.ts","../../components/resizable/resizable.directive.ts","../../components/resizable/resize-handle.component.ts","../../components/resizable/resize-handles.component.ts","../../components/resizable/resizable.module.ts"],"sourcesContent":["/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { isTouchEvent } from 'ng-zorro-antd/core/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","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { DOCUMENT, inject, Injectable, NgZone, OnDestroy } from '@angular/core';\nimport { Subject } from 'rxjs';\n\nimport { isTouchEvent } from 'ng-zorro-antd/core/util';\n\nimport { NzResizeHandleMouseDownEvent } from './resize-handle.component';\n\n@Injectable()\nexport class NzResizableService implements OnDestroy {\n private readonly document: Document = inject(DOCUMENT);\n private readonly ngZone = inject(NgZone);\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 * nzResizableService.handleMouseDownOutsideAngular$.subscribe(event => {\n * console.log(Zone.current); // <root>\n * console.log(NgZone.isInAngularZone()); // false\n * });\n * ```\n */\n handleMouseDownOutsideAngular$ = new Subject<NzResizeHandleMouseDownEvent>();\n documentMouseUpOutsideAngular$ = new Subject<MouseEvent | TouchEvent | null>();\n documentMouseMoveOutsideAngular$ = new Subject<MouseEvent | TouchEvent>();\n mouseEnteredOutsideAngular$ = new Subject<boolean>();\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): void => {\n this.documentMouseMoveOutsideAngular$.next(e);\n };\n const upEventHandler = (e: MouseEvent | TouchEvent): void => {\n this.documentMouseUpOutsideAngular$.next(e);\n this.clearListeners();\n };\n\n this.listeners.set(moveEvent, moveEventHandler);\n this.listeners.set(upEvent, upEventHandler);\n\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","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Platform } from '@angular/cdk/platform';\nimport {\n AfterViewInit,\n booleanAttribute,\n DestroyRef,\n Directive,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n NgZone,\n numberAttribute,\n OnDestroy,\n Output,\n Renderer2\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { filter } from 'rxjs/operators';\n\nimport { ensureInBounds, fromEventOutsideAngular } from 'ng-zorro-antd/core/util';\n\nimport { getEventWithPoint } from './resizable-utils';\nimport { NzResizableService } from './resizable.service';\nimport { NzResizeDirection, NzResizeHandleMouseDownEvent } from './resize-handle.component';\n\nexport interface NzResizeEvent {\n width?: number;\n height?: number;\n col?: number;\n mouseEvent?: MouseEvent | TouchEvent;\n direction?: NzResizeDirection;\n}\n\n@Directive({\n selector: '[nz-resizable]',\n exportAs: 'nzResizable',\n providers: [NzResizableService],\n host: {\n class: 'nz-resizable',\n '[class.nz-resizable-resizing]': 'resizing',\n '[class.nz-resizable-disabled]': 'nzDisabled'\n }\n})\nexport class NzResizableDirective implements AfterViewInit, OnDestroy {\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n private readonly renderer = inject(Renderer2);\n private readonly nzResizableService = inject(NzResizableService);\n private readonly platform = inject(Platform);\n private readonly ngZone = inject(NgZone);\n private readonly destroyRef = inject(DestroyRef);\n\n @Input() nzBounds: 'window' | 'parent' | ElementRef<HTMLElement> = 'parent';\n @Input() nzMaxHeight?: number;\n @Input() nzMaxWidth?: number;\n @Input({ transform: numberAttribute }) nzMinHeight: number = 40;\n @Input({ transform: numberAttribute }) nzMinWidth: number = 40;\n @Input({ transform: numberAttribute }) nzGridColumnCount: number = -1;\n @Input({ transform: numberAttribute }) nzMaxColumn: number = -1;\n @Input({ transform: numberAttribute }) nzMinColumn: number = -1;\n @Input({ transform: booleanAttribute }) nzLockAspectRatio: boolean = false;\n @Input({ transform: booleanAttribute }) nzPreview: boolean = false;\n @Input({ transform: booleanAttribute }) nzDisabled: boolean = false;\n @Output() readonly nzResize = new EventEmitter<NzResizeEvent>();\n @Output() readonly nzResizeEnd = new EventEmitter<NzResizeEvent>();\n @Output() readonly nzResizeStart = new EventEmitter<NzResizeEvent>();\n\n resizing = false;\n private elRect!: DOMRect;\n private currentHandleEvent: NzResizeHandleMouseDownEvent | null = null;\n private ghostElement: HTMLDivElement | null = null;\n private el!: HTMLElement;\n private sizeCache: NzResizeEvent | null = null;\n\n constructor() {\n this.nzResizableService.handleMouseDownOutsideAngular$.pipe(takeUntilDestroyed()).subscribe(event => {\n if (this.nzDisabled) {\n return;\n }\n this.resizing = true;\n this.nzResizableService.startResizing(event.mouseEvent);\n this.currentHandleEvent = event;\n if (this.nzResizeStart.observers.length) {\n this.ngZone.run(() => this.nzResizeStart.emit({ mouseEvent: event.mouseEvent, direction: event.direction }));\n }\n this.elRect = this.el.getBoundingClientRect();\n });\n\n this.nzResizableService.documentMouseUpOutsideAngular$\n .pipe(takeUntilDestroyed(), filter(Boolean))\n .subscribe(event => {\n if (this.resizing) {\n this.resizing = false;\n this.nzResizableService.documentMouseUpOutsideAngular$.next(null);\n this.endResize(event);\n }\n });\n\n this.nzResizableService.documentMouseMoveOutsideAngular$.pipe(takeUntilDestroyed()).subscribe(event => {\n if (this.resizing) {\n this.resize(event);\n }\n });\n }\n\n setPosition(): void {\n const position = getComputedStyle(this.el).position;\n if (position === 'static' || !position) {\n this.renderer.setStyle(this.el, 'position', 'relative');\n }\n }\n\n calcSize(width: number, height: number, ratio: number): NzResizeEvent {\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.nzMinWidth;\n let boundWidth = Infinity;\n let boundHeight = Infinity;\n if (this.nzBounds === 'parent') {\n const parent = this.renderer.parentNode(this.el);\n if (parent instanceof HTMLElement) {\n const parentRect = parent.getBoundingClientRect();\n boundWidth = parentRect.width;\n boundHeight = parentRect.height;\n }\n } else if (this.nzBounds === 'window') {\n if (typeof window !== 'undefined') {\n boundWidth = window.innerWidth;\n boundHeight = window.innerHeight;\n }\n } else if (this.nzBounds && this.nzBounds.nativeElement && this.nzBounds.nativeElement instanceof HTMLElement) {\n const boundsRect = this.nzBounds.nativeElement.getBoundingClientRect();\n boundWidth = boundsRect.width;\n boundHeight = boundsRect.height;\n }\n\n maxWidth = ensureInBounds(this.nzMaxWidth!, boundWidth);\n // eslint-disable-next-line prefer-const\n maxHeight = ensureInBounds(this.nzMaxHeight!, boundHeight);\n\n if (this.nzGridColumnCount !== -1) {\n spanWidth = maxWidth / this.nzGridColumnCount;\n minWidth = this.nzMinColumn !== -1 ? spanWidth * this.nzMinColumn : minWidth;\n maxWidth = this.nzMaxColumn !== -1 ? spanWidth * this.nzMaxColumn : 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.nzMinHeight), maxHeight);\n if (newHeight >= maxHeight || newHeight <= this.nzMinHeight) {\n newWidth = Math.min(Math.max(newHeight * ratio, minWidth), maxWidth);\n }\n } else {\n newHeight = Math.min(Math.max(height, this.nzMinHeight), 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.nzMinHeight), maxHeight);\n }\n }\n } else {\n newWidth = Math.min(Math.max(width, minWidth), maxWidth);\n newHeight = Math.min(Math.max(height, this.nzMinHeight), maxHeight);\n }\n\n if (this.nzGridColumnCount !== -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 resize(event: MouseEvent | TouchEvent): void {\n const elRect = this.elRect;\n const resizeEvent = getEventWithPoint(event);\n const handleEvent = getEventWithPoint(this.currentHandleEvent!.mouseEvent);\n let width = elRect.width;\n let height = elRect.height;\n const ratio = this.nzLockAspectRatio ? width / height : -1;\n switch (this.currentHandleEvent!.direction) {\n case 'bottomRight':\n width = resizeEvent.clientX - elRect.left;\n height = resizeEvent.clientY - elRect.top;\n break;\n case 'bottomLeft':\n width = elRect.width + handleEvent.clientX - resizeEvent.clientX;\n height = resizeEvent.clientY - elRect.top;\n break;\n case 'topRight':\n width = resizeEvent.clientX - elRect.left;\n height = elRect.height + handleEvent.clientY - resizeEvent.clientY;\n break;\n case 'topLeft':\n width = elRect.width + handleEvent.clientX - resizeEvent.clientX;\n height = elRect.height + handleEvent.clientY - resizeEvent.clientY;\n break;\n case 'top':\n height = elRect.height + handleEvent.clientY - resizeEvent.clientY;\n break;\n case 'right':\n width = resizeEvent.clientX - elRect.left;\n break;\n case 'bottom':\n height = resizeEvent.clientY - elRect.top;\n break;\n case 'left':\n width = elRect.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 are any `nzResize` listeners,\n // e.g.: `<div nz-resizable (nzResize)=\"...\"></div>`.\n if (this.nzResize.observers.length) {\n this.ngZone.run(() => {\n this.nzResize.emit({\n ...size,\n mouseEvent: event,\n direction: this.currentHandleEvent!.direction\n });\n });\n }\n if (this.nzPreview) {\n this.previewResize(size);\n }\n }\n\n endResize(event: MouseEvent | TouchEvent): void {\n this.removeGhostElement();\n const size = this.sizeCache\n ? { ...this.sizeCache }\n : {\n width: this.elRect.width,\n height: this.elRect.height\n };\n // Re-enter the Angular zone and run the change detection only if there are any `nzResizeEnd` listeners,\n // e.g.: `<div nz-resizable (nzResizeEnd)=\"...\"></div>`.\n if (this.nzResizeEnd.observers.length) {\n this.ngZone.run(() => {\n this.nzResizeEnd.emit({\n ...size,\n mouseEvent: event,\n direction: this.currentHandleEvent!.direction\n });\n });\n }\n this.sizeCache = null;\n this.currentHandleEvent = null;\n }\n\n previewResize({ width, height }: NzResizeEvent): 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', 'nz-resizable-preview');\n }\n this.renderer.appendChild(this.el, this.ghostElement);\n }\n\n removeGhostElement(): void {\n if (this.ghostElement) {\n this.renderer.removeChild(this.el, this.ghostElement);\n }\n }\n\n ngAfterViewInit(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n\n this.el = this.elementRef.nativeElement;\n this.setPosition();\n\n fromEventOutsideAngular(this.el, 'mouseenter')\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.nzResizableService.mouseEnteredOutsideAngular$.next(true);\n });\n\n fromEventOutsideAngular(this.el, 'mouseleave')\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.nzResizableService.mouseEnteredOutsideAngular$.next(false);\n });\n }\n\n ngOnDestroy(): void {\n this.ghostElement = null;\n this.sizeCache = null;\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport {\n Component,\n DestroyRef,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n OnInit,\n Output,\n Renderer2\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { merge } from 'rxjs';\n\nimport { fromEventOutsideAngular } from 'ng-zorro-antd/core/util';\n\nimport { NzResizableService } from './resizable.service';\n\nexport type NzCursorType = 'window' | 'grid';\n\nexport type NzResizeDirection =\n 'top' | 'right' | 'bottom' | 'left' | 'topRight' | 'bottomRight' | 'bottomLeft' | 'topLeft';\n\nexport class NzResizeHandleMouseDownEvent {\n constructor(\n public direction: NzResizeDirection,\n public mouseEvent: MouseEvent | TouchEvent\n ) {}\n}\n\nconst passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: true }) as AddEventListenerOptions;\n\n@Component({\n selector: 'nz-resize-handle, [nz-resize-handle]',\n exportAs: 'nzResizeHandle',\n template: `<ng-content />`,\n host: {\n class: 'nz-resizable-handle',\n '[class.nz-resizable-handle-top]': `nzDirection === 'top'`,\n '[class.nz-resizable-handle-right]': `nzDirection === 'right'`,\n '[class.nz-resizable-handle-bottom]': `nzDirection === 'bottom'`,\n '[class.nz-resizable-handle-left]': `nzDirection === 'left'`,\n '[class.nz-resizable-handle-topRight]': `nzDirection === 'topRight'`,\n '[class.nz-resizable-handle-bottomRight]': `nzDirection === 'bottomRight'`,\n '[class.nz-resizable-handle-bottomLeft]': `nzDirection === 'bottomLeft'`,\n '[class.nz-resizable-handle-topLeft]': `nzDirection === 'topLeft'`,\n '[class.nz-resizable-handle-cursor-type-grid]': `nzCursorType === 'grid'`,\n '[class.nz-resizable-handle-cursor-type-window]': `nzCursorType === 'window'`,\n '(pointerdown)': 'onPointerDown($event)',\n '(pointerup)': 'onPointerUp($event)'\n }\n})\nexport class NzResizeHandleComponent implements OnInit {\n private readonly nzResizableService = inject(NzResizableService);\n private readonly renderer = inject(Renderer2);\n private readonly el: HTMLElement = inject(ElementRef<HTMLElement>).nativeElement;\n private readonly destroyRef = inject(DestroyRef);\n\n @Input() nzDirection: NzResizeDirection = 'bottomRight';\n @Input() nzCursorType: NzCursorType = 'window';\n @Output() readonly nzMouseDown = new EventEmitter<NzResizeHandleMouseDownEvent>();\n\n ngOnInit(): void {\n this.nzResizableService.mouseEnteredOutsideAngular$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(entered => {\n if (entered) {\n this.renderer.addClass(this.el, 'nz-resizable-handle-box-hover');\n } else {\n this.renderer.removeClass(this.el, 'nz-resizable-handle-box-hover');\n }\n });\n\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 fromEventOutsideAngular<MouseEvent>(this.el, 'mousedown', passiveEventListenerOptions),\n fromEventOutsideAngular<TouchEvent>(this.el, 'touchstart', passiveEventListenerOptions)\n )\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n this.nzResizableService.handleMouseDownOutsideAngular$.next(\n new NzResizeHandleMouseDownEvent(this.nzDirection, event)\n );\n });\n }\n\n onPointerDown(event: PointerEvent): void {\n (event.target as HTMLElement).setPointerCapture(event.pointerId);\n }\n\n onPointerUp(event: PointerEvent): void {\n (event.target as HTMLElement).releasePointerCapture(event.pointerId);\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Component, Input, OnChanges, SimpleChanges } from '@angular/core';\n\nimport { NzCursorType, NzResizeDirection, NzResizeHandleComponent } from './resize-handle.component';\n\nexport const DEFAULT_RESIZE_DIRECTION: NzResizeDirection[] = [\n 'bottomRight',\n 'topRight',\n 'bottomLeft',\n 'topLeft',\n 'bottom',\n 'right',\n 'top',\n 'left'\n];\n\nexport interface NzResizeHandleOption {\n direction: NzResizeDirection;\n cursorType: NzCursorType;\n}\n\nfunction normalizeResizeHandleOptions(value: Array<NzResizeDirection | NzResizeHandleOption>): NzResizeHandleOption[] {\n return value.map(val => {\n if (typeof val === 'string') {\n return {\n direction: val,\n cursorType: 'window'\n };\n }\n\n return val;\n });\n}\n\n@Component({\n selector: 'nz-resize-handles',\n exportAs: 'nzResizeHandles',\n template: `\n @for (option of resizeHandleOptions; track option) {\n <nz-resize-handle [nzDirection]=\"option.direction\" [nzCursorType]=\"option.cursorType\" />\n }\n `,\n imports: [NzResizeHandleComponent]\n})\nexport class NzResizeHandlesComponent implements OnChanges {\n @Input() nzDirections: Array<NzResizeDirection | NzResizeHandleOption> = DEFAULT_RESIZE_DIRECTION;\n\n resizeHandleOptions = normalizeResizeHandleOptions(this.nzDirections);\n\n ngOnChanges(changes: SimpleChanges): void {\n const { nzDirections } = changes;\n if (nzDirections) {\n this.resizeHandleOptions = normalizeResizeHandleOptions(nzDirections.currentValue);\n }\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { NzResizableDirective } from './resizable.directive';\nimport { NzResizeHandleComponent } from './resize-handle.component';\nimport { NzResizeHandlesComponent } from './resize-handles.component';\n\n@NgModule({\n imports: [NzResizableDirective, NzResizeHandleComponent, NzResizeHandlesComponent],\n exports: [NzResizableDirective, NzResizeHandleComponent, NzResizeHandlesComponent]\n})\n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