parent
9dce39875e
commit
09671c7651
File diff suppressed because one or more lines are too long
@ -1,720 +0,0 @@ |
||||
import { |
||||
MenuService, |
||||
NzIsMenuInsideDropDownToken, |
||||
NzMenuModule |
||||
} from "./chunk-WKTPWT5U.js"; |
||||
import { |
||||
POSITION_MAP |
||||
} from "./chunk-6RXUTAFR.js"; |
||||
import { |
||||
slideMotion |
||||
} from "./chunk-XAGDQPFO.js"; |
||||
import { |
||||
NzNoAnimationDirective |
||||
} from "./chunk-55A2ZGND.js"; |
||||
import { |
||||
ConnectionPositionPair, |
||||
Overlay, |
||||
TemplatePortal |
||||
} from "./chunk-6U656R5M.js"; |
||||
import { |
||||
ESCAPE, |
||||
hasModifierKey |
||||
} from "./chunk-JGP5BR6B.js"; |
||||
import { |
||||
NzButtonGroupComponent |
||||
} from "./chunk-KMGBCF4T.js"; |
||||
import { |
||||
NzConfigService, |
||||
WithConfig |
||||
} from "./chunk-ZHMJ6SNN.js"; |
||||
import { |
||||
Directionality |
||||
} from "./chunk-6NZ2BEBG.js"; |
||||
import { |
||||
Platform |
||||
} from "./chunk-IAC53GOD.js"; |
||||
import { |
||||
InputBoolean |
||||
} from "./chunk-M5GY4FCO.js"; |
||||
import { |
||||
NgClass, |
||||
NgStyle |
||||
} from "./chunk-OSQBUYO6.js"; |
||||
import { |
||||
BehaviorSubject, |
||||
ChangeDetectionStrategy, |
||||
ChangeDetectorRef, |
||||
Component, |
||||
Directive, |
||||
EMPTY, |
||||
ElementRef, |
||||
EventEmitter, |
||||
Host, |
||||
Injectable, |
||||
Input, |
||||
NgModule, |
||||
NgZone, |
||||
Optional, |
||||
Output, |
||||
Renderer2, |
||||
Subject, |
||||
Subscription, |
||||
TemplateRef, |
||||
ViewChild, |
||||
ViewContainerRef, |
||||
ViewEncapsulation$1, |
||||
__decorate, |
||||
auditTime, |
||||
combineLatest, |
||||
distinctUntilChanged, |
||||
filter, |
||||
first, |
||||
fromEvent, |
||||
map, |
||||
mapTo, |
||||
merge, |
||||
setClassMetadata, |
||||
switchMap, |
||||
takeUntil, |
||||
ɵɵNgOnChangesFeature, |
||||
ɵɵProvidersFeature, |
||||
ɵɵStandaloneFeature, |
||||
ɵɵclassProp, |
||||
ɵɵdefineComponent, |
||||
ɵɵdefineDirective, |
||||
ɵɵdefineInjectable, |
||||
ɵɵdefineInjector, |
||||
ɵɵdefineNgModule, |
||||
ɵɵdirectiveInject, |
||||
ɵɵelementEnd, |
||||
ɵɵelementStart, |
||||
ɵɵgetCurrentView, |
||||
ɵɵinject, |
||||
ɵɵlistener, |
||||
ɵɵloadQuery, |
||||
ɵɵnextContext, |
||||
ɵɵprojection, |
||||
ɵɵprojectionDef, |
||||
ɵɵproperty, |
||||
ɵɵqueryRefresh, |
||||
ɵɵresetView, |
||||
ɵɵrestoreView, |
||||
ɵɵtemplate, |
||||
ɵɵviewQuery |
||||
} from "./chunk-FGESKT7O.js"; |
||||
|
||||
// node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-dropdown.mjs
|
||||
function NzDropdownMenuComponent_ng_template_0_Template(rf, ctx) { |
||||
if (rf & 1) { |
||||
const _r2 = ɵɵgetCurrentView(); |
||||
ɵɵelementStart(0, "div", 0); |
||||
ɵɵlistener("@slideMotion.done", function NzDropdownMenuComponent_ng_template_0_Template_div_animation_slideMotion_done_0_listener($event) { |
||||
ɵɵrestoreView(_r2); |
||||
const ctx_r1 = ɵɵnextContext(); |
||||
return ɵɵresetView(ctx_r1.onAnimationEvent($event)); |
||||
})("mouseenter", function NzDropdownMenuComponent_ng_template_0_Template_div_mouseenter_0_listener() { |
||||
ɵɵrestoreView(_r2); |
||||
const ctx_r3 = ɵɵnextContext(); |
||||
return ɵɵresetView(ctx_r3.setMouseState(true)); |
||||
})("mouseleave", function NzDropdownMenuComponent_ng_template_0_Template_div_mouseleave_0_listener() { |
||||
ɵɵrestoreView(_r2); |
||||
const ctx_r4 = ɵɵnextContext(); |
||||
return ɵɵresetView(ctx_r4.setMouseState(false)); |
||||
}); |
||||
ɵɵprojection(1); |
||||
ɵɵelementEnd(); |
||||
} |
||||
if (rf & 2) { |
||||
const ctx_r0 = ɵɵnextContext(); |
||||
ɵɵclassProp("ant-dropdown-rtl", ctx_r0.dir === "rtl"); |
||||
ɵɵproperty("ngClass", ctx_r0.nzOverlayClassName)("ngStyle", ctx_r0.nzOverlayStyle)("@slideMotion", void 0)("@.disabled", !!(ctx_r0.noAnimation == null ? null : ctx_r0.noAnimation.nzNoAnimation))("nzNoAnimation", ctx_r0.noAnimation == null ? null : ctx_r0.noAnimation.nzNoAnimation); |
||||
} |
||||
} |
||||
var _c0 = ["*"]; |
||||
var NZ_CONFIG_MODULE_NAME = "dropDown"; |
||||
var listOfPositions = [POSITION_MAP.bottomLeft, POSITION_MAP.bottomRight, POSITION_MAP.topRight, POSITION_MAP.topLeft]; |
||||
var _NzDropDownDirective = class _NzDropDownDirective { |
||||
setDropdownMenuValue(key, value) { |
||||
if (this.nzDropdownMenu) { |
||||
this.nzDropdownMenu.setValue(key, value); |
||||
} |
||||
} |
||||
constructor(nzConfigService, elementRef, overlay, renderer, viewContainerRef, platform) { |
||||
this.nzConfigService = nzConfigService; |
||||
this.elementRef = elementRef; |
||||
this.overlay = overlay; |
||||
this.renderer = renderer; |
||||
this.viewContainerRef = viewContainerRef; |
||||
this.platform = platform; |
||||
this._nzModuleName = NZ_CONFIG_MODULE_NAME; |
||||
this.overlayRef = null; |
||||
this.destroy$ = new Subject(); |
||||
this.positionStrategy = this.overlay.position().flexibleConnectedTo(this.elementRef.nativeElement).withLockedPosition().withTransformOriginOn(".ant-dropdown"); |
||||
this.inputVisible$ = new BehaviorSubject(false); |
||||
this.nzTrigger$ = new BehaviorSubject("hover"); |
||||
this.overlayClose$ = new Subject(); |
||||
this.nzDropdownMenu = null; |
||||
this.nzTrigger = "hover"; |
||||
this.nzMatchWidthElement = null; |
||||
this.nzBackdrop = false; |
||||
this.nzClickHide = true; |
||||
this.nzDisabled = false; |
||||
this.nzVisible = false; |
||||
this.nzOverlayClassName = ""; |
||||
this.nzOverlayStyle = {}; |
||||
this.nzPlacement = "bottomLeft"; |
||||
this.nzVisibleChange = new EventEmitter(); |
||||
} |
||||
ngAfterViewInit() { |
||||
if (this.nzDropdownMenu) { |
||||
const nativeElement = this.elementRef.nativeElement; |
||||
const hostMouseState$ = merge(fromEvent(nativeElement, "mouseenter").pipe(mapTo(true)), fromEvent(nativeElement, "mouseleave").pipe(mapTo(false))); |
||||
const menuMouseState$ = this.nzDropdownMenu.mouseState$; |
||||
const mergedMouseState$ = merge(menuMouseState$, hostMouseState$); |
||||
const hostClickState$ = fromEvent(nativeElement, "click").pipe(map(() => !this.nzVisible)); |
||||
const visibleStateByTrigger$ = this.nzTrigger$.pipe(switchMap((trigger) => { |
||||
if (trigger === "hover") { |
||||
return mergedMouseState$; |
||||
} else if (trigger === "click") { |
||||
return hostClickState$; |
||||
} else { |
||||
return EMPTY; |
||||
} |
||||
})); |
||||
const descendantMenuItemClick$ = this.nzDropdownMenu.descendantMenuItemClick$.pipe(filter(() => this.nzClickHide), mapTo(false)); |
||||
const domTriggerVisible$ = merge(visibleStateByTrigger$, descendantMenuItemClick$, this.overlayClose$).pipe(filter(() => !this.nzDisabled)); |
||||
const visible$ = merge(this.inputVisible$, domTriggerVisible$); |
||||
combineLatest([visible$, this.nzDropdownMenu.isChildSubMenuOpen$]).pipe(map(([visible, sub]) => visible || sub), auditTime(150), distinctUntilChanged(), filter(() => this.platform.isBrowser), takeUntil(this.destroy$)).subscribe((visible) => { |
||||
const element = this.nzMatchWidthElement ? this.nzMatchWidthElement.nativeElement : nativeElement; |
||||
const triggerWidth = element.getBoundingClientRect().width; |
||||
if (this.nzVisible !== visible) { |
||||
this.nzVisibleChange.emit(visible); |
||||
} |
||||
this.nzVisible = visible; |
||||
if (visible) { |
||||
if (!this.overlayRef) { |
||||
this.overlayRef = this.overlay.create({ |
||||
positionStrategy: this.positionStrategy, |
||||
minWidth: triggerWidth, |
||||
disposeOnNavigation: true, |
||||
hasBackdrop: this.nzBackdrop && this.nzTrigger === "click", |
||||
scrollStrategy: this.overlay.scrollStrategies.reposition() |
||||
}); |
||||
merge(this.overlayRef.backdropClick(), this.overlayRef.detachments(), this.overlayRef.outsidePointerEvents().pipe(filter((e) => !this.elementRef.nativeElement.contains(e.target))), this.overlayRef.keydownEvents().pipe(filter((e) => e.keyCode === ESCAPE && !hasModifierKey(e)))).pipe(takeUntil(this.destroy$)).subscribe(() => { |
||||
this.overlayClose$.next(false); |
||||
}); |
||||
} else { |
||||
const overlayConfig = this.overlayRef.getConfig(); |
||||
overlayConfig.minWidth = triggerWidth; |
||||
} |
||||
this.positionStrategy.withPositions([POSITION_MAP[this.nzPlacement], ...listOfPositions]); |
||||
if (!this.portal || this.portal.templateRef !== this.nzDropdownMenu.templateRef) { |
||||
this.portal = new TemplatePortal(this.nzDropdownMenu.templateRef, this.viewContainerRef); |
||||
} |
||||
this.overlayRef.attach(this.portal); |
||||
} else { |
||||
if (this.overlayRef) { |
||||
this.overlayRef.detach(); |
||||
} |
||||
} |
||||
}); |
||||
this.nzDropdownMenu.animationStateChange$.pipe(takeUntil(this.destroy$)).subscribe((event) => { |
||||
if (event.toState === "void") { |
||||
if (this.overlayRef) { |
||||
this.overlayRef.dispose(); |
||||
} |
||||
this.overlayRef = null; |
||||
} |
||||
}); |
||||
} |
||||
} |
||||
ngOnDestroy() { |
||||
this.destroy$.next(true); |
||||
this.destroy$.complete(); |
||||
if (this.overlayRef) { |
||||
this.overlayRef.dispose(); |
||||
this.overlayRef = null; |
||||
} |
||||
} |
||||
ngOnChanges(changes) { |
||||
const { |
||||
nzVisible, |
||||
nzDisabled, |
||||
nzOverlayClassName, |
||||
nzOverlayStyle, |
||||
nzTrigger |
||||
} = changes; |
||||
if (nzTrigger) { |
||||
this.nzTrigger$.next(this.nzTrigger); |
||||
} |
||||
if (nzVisible) { |
||||
this.inputVisible$.next(this.nzVisible); |
||||
} |
||||
if (nzDisabled) { |
||||
const nativeElement = this.elementRef.nativeElement; |
||||
if (this.nzDisabled) { |
||||
this.renderer.setAttribute(nativeElement, "disabled", ""); |
||||
this.inputVisible$.next(false); |
||||
} else { |
||||
this.renderer.removeAttribute(nativeElement, "disabled"); |
||||
} |
||||
} |
||||
if (nzOverlayClassName) { |
||||
this.setDropdownMenuValue("nzOverlayClassName", this.nzOverlayClassName); |
||||
} |
||||
if (nzOverlayStyle) { |
||||
this.setDropdownMenuValue("nzOverlayStyle", this.nzOverlayStyle); |
||||
} |
||||
} |
||||
}; |
||||
_NzDropDownDirective.ɵfac = function NzDropDownDirective_Factory(t) { |
||||
return new (t || _NzDropDownDirective)(ɵɵdirectiveInject(NzConfigService), ɵɵdirectiveInject(ElementRef), ɵɵdirectiveInject(Overlay), ɵɵdirectiveInject(Renderer2), ɵɵdirectiveInject(ViewContainerRef), ɵɵdirectiveInject(Platform)); |
||||
}; |
||||
_NzDropDownDirective.ɵdir = ɵɵdefineDirective({ |
||||
type: _NzDropDownDirective, |
||||
selectors: [["", "nz-dropdown", ""]], |
||||
hostAttrs: [1, "ant-dropdown-trigger"], |
||||
inputs: { |
||||
nzDropdownMenu: "nzDropdownMenu", |
||||
nzTrigger: "nzTrigger", |
||||
nzMatchWidthElement: "nzMatchWidthElement", |
||||
nzBackdrop: "nzBackdrop", |
||||
nzClickHide: "nzClickHide", |
||||
nzDisabled: "nzDisabled", |
||||
nzVisible: "nzVisible", |
||||
nzOverlayClassName: "nzOverlayClassName", |
||||
nzOverlayStyle: "nzOverlayStyle", |
||||
nzPlacement: "nzPlacement" |
||||
}, |
||||
outputs: { |
||||
nzVisibleChange: "nzVisibleChange" |
||||
}, |
||||
exportAs: ["nzDropdown"], |
||||
standalone: true, |
||||
features: [ɵɵNgOnChangesFeature] |
||||
}); |
||||
var NzDropDownDirective = _NzDropDownDirective; |
||||
__decorate([WithConfig(), InputBoolean()], NzDropDownDirective.prototype, "nzBackdrop", void 0); |
||||
__decorate([InputBoolean()], NzDropDownDirective.prototype, "nzClickHide", void 0); |
||||
__decorate([InputBoolean()], NzDropDownDirective.prototype, "nzDisabled", void 0); |
||||
__decorate([InputBoolean()], NzDropDownDirective.prototype, "nzVisible", void 0); |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzDropDownDirective, [{ |
||||
type: Directive, |
||||
args: [{ |
||||
selector: "[nz-dropdown]", |
||||
exportAs: "nzDropdown", |
||||
host: { |
||||
class: "ant-dropdown-trigger" |
||||
}, |
||||
standalone: true |
||||
}] |
||||
}], () => [{ |
||||
type: NzConfigService |
||||
}, { |
||||
type: ElementRef |
||||
}, { |
||||
type: Overlay |
||||
}, { |
||||
type: Renderer2 |
||||
}, { |
||||
type: ViewContainerRef |
||||
}, { |
||||
type: Platform |
||||
}], { |
||||
nzDropdownMenu: [{ |
||||
type: Input |
||||
}], |
||||
nzTrigger: [{ |
||||
type: Input |
||||
}], |
||||
nzMatchWidthElement: [{ |
||||
type: Input |
||||
}], |
||||
nzBackdrop: [{ |
||||
type: Input |
||||
}], |
||||
nzClickHide: [{ |
||||
type: Input |
||||
}], |
||||
nzDisabled: [{ |
||||
type: Input |
||||
}], |
||||
nzVisible: [{ |
||||
type: Input |
||||
}], |
||||
nzOverlayClassName: [{ |
||||
type: Input |
||||
}], |
||||
nzOverlayStyle: [{ |
||||
type: Input |
||||
}], |
||||
nzPlacement: [{ |
||||
type: Input |
||||
}], |
||||
nzVisibleChange: [{ |
||||
type: Output |
||||
}] |
||||
}); |
||||
})(); |
||||
var _NzContextMenuServiceModule = class _NzContextMenuServiceModule { |
||||
}; |
||||
_NzContextMenuServiceModule.ɵfac = function NzContextMenuServiceModule_Factory(t) { |
||||
return new (t || _NzContextMenuServiceModule)(); |
||||
}; |
||||
_NzContextMenuServiceModule.ɵmod = ɵɵdefineNgModule({ |
||||
type: _NzContextMenuServiceModule |
||||
}); |
||||
_NzContextMenuServiceModule.ɵinj = ɵɵdefineInjector({}); |
||||
var NzContextMenuServiceModule = _NzContextMenuServiceModule; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzContextMenuServiceModule, [{ |
||||
type: NgModule |
||||
}], null, null); |
||||
})(); |
||||
var _NzDropDownADirective = class _NzDropDownADirective { |
||||
constructor() { |
||||
} |
||||
}; |
||||
_NzDropDownADirective.ɵfac = function NzDropDownADirective_Factory(t) { |
||||
return new (t || _NzDropDownADirective)(); |
||||
}; |
||||
_NzDropDownADirective.ɵdir = ɵɵdefineDirective({ |
||||
type: _NzDropDownADirective, |
||||
selectors: [["a", "nz-dropdown", ""]], |
||||
hostAttrs: [1, "ant-dropdown-link"], |
||||
standalone: true |
||||
}); |
||||
var NzDropDownADirective = _NzDropDownADirective; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzDropDownADirective, [{ |
||||
type: Directive, |
||||
args: [{ |
||||
selector: "a[nz-dropdown]", |
||||
host: { |
||||
class: "ant-dropdown-link" |
||||
}, |
||||
standalone: true |
||||
}] |
||||
}], () => [], null); |
||||
})(); |
||||
var _NzDropdownButtonDirective = class _NzDropdownButtonDirective { |
||||
constructor(renderer, nzButtonGroupComponent, elementRef) { |
||||
this.renderer = renderer; |
||||
this.nzButtonGroupComponent = nzButtonGroupComponent; |
||||
this.elementRef = elementRef; |
||||
} |
||||
ngAfterViewInit() { |
||||
const parentElement = this.renderer.parentNode(this.elementRef.nativeElement); |
||||
if (this.nzButtonGroupComponent && parentElement) { |
||||
this.renderer.addClass(parentElement, "ant-dropdown-button"); |
||||
} |
||||
} |
||||
}; |
||||
_NzDropdownButtonDirective.ɵfac = function NzDropdownButtonDirective_Factory(t) { |
||||
return new (t || _NzDropdownButtonDirective)(ɵɵdirectiveInject(Renderer2), ɵɵdirectiveInject(NzButtonGroupComponent, 9), ɵɵdirectiveInject(ElementRef)); |
||||
}; |
||||
_NzDropdownButtonDirective.ɵdir = ɵɵdefineDirective({ |
||||
type: _NzDropdownButtonDirective, |
||||
selectors: [["", "nz-button", "", "nz-dropdown", ""]], |
||||
standalone: true |
||||
}); |
||||
var NzDropdownButtonDirective = _NzDropdownButtonDirective; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzDropdownButtonDirective, [{ |
||||
type: Directive, |
||||
args: [{ |
||||
selector: "[nz-button][nz-dropdown]", |
||||
standalone: true |
||||
}] |
||||
}], () => [{ |
||||
type: Renderer2 |
||||
}, { |
||||
type: NzButtonGroupComponent, |
||||
decorators: [{ |
||||
type: Host |
||||
}, { |
||||
type: Optional |
||||
}] |
||||
}, { |
||||
type: ElementRef |
||||
}], null); |
||||
})(); |
||||
var _NzDropdownMenuComponent = class _NzDropdownMenuComponent { |
||||
onAnimationEvent(event) { |
||||
this.animationStateChange$.emit(event); |
||||
} |
||||
setMouseState(visible) { |
||||
this.mouseState$.next(visible); |
||||
} |
||||
setValue(key, value) { |
||||
this[key] = value; |
||||
this.cdr.markForCheck(); |
||||
} |
||||
constructor(cdr, elementRef, renderer, viewContainerRef, nzMenuService, directionality, noAnimation) { |
||||
this.cdr = cdr; |
||||
this.elementRef = elementRef; |
||||
this.renderer = renderer; |
||||
this.viewContainerRef = viewContainerRef; |
||||
this.nzMenuService = nzMenuService; |
||||
this.directionality = directionality; |
||||
this.noAnimation = noAnimation; |
||||
this.mouseState$ = new BehaviorSubject(false); |
||||
this.isChildSubMenuOpen$ = this.nzMenuService.isChildSubMenuOpen$; |
||||
this.descendantMenuItemClick$ = this.nzMenuService.descendantMenuItemClick$; |
||||
this.animationStateChange$ = new EventEmitter(); |
||||
this.nzOverlayClassName = ""; |
||||
this.nzOverlayStyle = {}; |
||||
this.dir = "ltr"; |
||||
this.destroy$ = new Subject(); |
||||
} |
||||
ngOnInit() { |
||||
this.directionality.change?.pipe(takeUntil(this.destroy$)).subscribe((direction) => { |
||||
this.dir = direction; |
||||
this.cdr.detectChanges(); |
||||
}); |
||||
this.dir = this.directionality.value; |
||||
} |
||||
ngAfterContentInit() { |
||||
this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement), this.elementRef.nativeElement); |
||||
} |
||||
ngOnDestroy() { |
||||
this.destroy$.next(); |
||||
this.destroy$.complete(); |
||||
} |
||||
}; |
||||
_NzDropdownMenuComponent.ɵfac = function NzDropdownMenuComponent_Factory(t) { |
||||
return new (t || _NzDropdownMenuComponent)(ɵɵdirectiveInject(ChangeDetectorRef), ɵɵdirectiveInject(ElementRef), ɵɵdirectiveInject(Renderer2), ɵɵdirectiveInject(ViewContainerRef), ɵɵdirectiveInject(MenuService), ɵɵdirectiveInject(Directionality, 8), ɵɵdirectiveInject(NzNoAnimationDirective, 9)); |
||||
}; |
||||
_NzDropdownMenuComponent.ɵcmp = ɵɵdefineComponent({ |
||||
type: _NzDropdownMenuComponent, |
||||
selectors: [["nz-dropdown-menu"]], |
||||
viewQuery: function NzDropdownMenuComponent_Query(rf, ctx) { |
||||
if (rf & 1) { |
||||
ɵɵviewQuery(TemplateRef, 7); |
||||
} |
||||
if (rf & 2) { |
||||
let _t; |
||||
ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.templateRef = _t.first); |
||||
} |
||||
}, |
||||
exportAs: ["nzDropdownMenu"], |
||||
standalone: true, |
||||
features: [ɵɵProvidersFeature([ |
||||
MenuService, |
||||
/** menu is inside dropdown-menu component **/ |
||||
{ |
||||
provide: NzIsMenuInsideDropDownToken, |
||||
useValue: true |
||||
} |
||||
]), ɵɵStandaloneFeature], |
||||
ngContentSelectors: _c0, |
||||
decls: 1, |
||||
vars: 0, |
||||
consts: [[1, "ant-dropdown", 3, "ngClass", "ngStyle", "nzNoAnimation", "mouseenter", "mouseleave"]], |
||||
template: function NzDropdownMenuComponent_Template(rf, ctx) { |
||||
if (rf & 1) { |
||||
ɵɵprojectionDef(); |
||||
ɵɵtemplate(0, NzDropdownMenuComponent_ng_template_0_Template, 2, 7, "ng-template"); |
||||
} |
||||
}, |
||||
dependencies: [NgClass, NgStyle, NzNoAnimationDirective], |
||||
encapsulation: 2, |
||||
data: { |
||||
animation: [slideMotion] |
||||
}, |
||||
changeDetection: 0 |
||||
}); |
||||
var NzDropdownMenuComponent = _NzDropdownMenuComponent; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzDropdownMenuComponent, [{ |
||||
type: Component, |
||||
args: [{ |
||||
selector: `nz-dropdown-menu`, |
||||
exportAs: `nzDropdownMenu`, |
||||
animations: [slideMotion], |
||||
providers: [ |
||||
MenuService, |
||||
/** menu is inside dropdown-menu component **/ |
||||
{ |
||||
provide: NzIsMenuInsideDropDownToken, |
||||
useValue: true |
||||
} |
||||
], |
||||
template: ` |
||||
<ng-template> |
||||
<div |
||||
class="ant-dropdown" |
||||
[class.ant-dropdown-rtl]="dir === 'rtl'" |
||||
[ngClass]="nzOverlayClassName" |
||||
[ngStyle]="nzOverlayStyle" |
||||
@slideMotion |
||||
(@slideMotion.done)="onAnimationEvent($event)" |
||||
[@.disabled]="!!noAnimation?.nzNoAnimation" |
||||
[nzNoAnimation]="noAnimation?.nzNoAnimation" |
||||
(mouseenter)="setMouseState(true)" |
||||
(mouseleave)="setMouseState(false)" |
||||
> |
||||
<ng-content></ng-content> |
||||
</div> |
||||
</ng-template> |
||||
`,
|
||||
preserveWhitespaces: false, |
||||
encapsulation: ViewEncapsulation$1.None, |
||||
changeDetection: ChangeDetectionStrategy.OnPush, |
||||
imports: [NgClass, NgStyle, NzNoAnimationDirective], |
||||
standalone: true |
||||
}] |
||||
}], () => [{ |
||||
type: ChangeDetectorRef |
||||
}, { |
||||
type: ElementRef |
||||
}, { |
||||
type: Renderer2 |
||||
}, { |
||||
type: ViewContainerRef |
||||
}, { |
||||
type: MenuService |
||||
}, { |
||||
type: Directionality, |
||||
decorators: [{ |
||||
type: Optional |
||||
}] |
||||
}, { |
||||
type: NzNoAnimationDirective, |
||||
decorators: [{ |
||||
type: Host |
||||
}, { |
||||
type: Optional |
||||
}] |
||||
}], { |
||||
templateRef: [{ |
||||
type: ViewChild, |
||||
args: [TemplateRef, { |
||||
static: true |
||||
}] |
||||
}] |
||||
}); |
||||
})(); |
||||
var _NzDropDownModule = class _NzDropDownModule { |
||||
}; |
||||
_NzDropDownModule.ɵfac = function NzDropDownModule_Factory(t) { |
||||
return new (t || _NzDropDownModule)(); |
||||
}; |
||||
_NzDropDownModule.ɵmod = ɵɵdefineNgModule({ |
||||
type: _NzDropDownModule, |
||||
imports: [NzDropDownDirective, NzDropDownADirective, NzDropdownMenuComponent, NzDropdownButtonDirective, NzContextMenuServiceModule], |
||||
exports: [NzMenuModule, NzDropDownDirective, NzDropDownADirective, NzDropdownMenuComponent, NzDropdownButtonDirective] |
||||
}); |
||||
_NzDropDownModule.ɵinj = ɵɵdefineInjector({ |
||||
imports: [NzContextMenuServiceModule, NzMenuModule] |
||||
}); |
||||
var NzDropDownModule = _NzDropDownModule; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzDropDownModule, [{ |
||||
type: NgModule, |
||||
args: [{ |
||||
imports: [NzDropDownDirective, NzDropDownADirective, NzDropdownMenuComponent, NzDropdownButtonDirective, NzContextMenuServiceModule], |
||||
exports: [NzMenuModule, NzDropDownDirective, NzDropDownADirective, NzDropdownMenuComponent, NzDropdownButtonDirective] |
||||
}] |
||||
}], null, null); |
||||
})(); |
||||
var LIST_OF_POSITIONS = [new ConnectionPositionPair({ |
||||
originX: "start", |
||||
originY: "top" |
||||
}, { |
||||
overlayX: "start", |
||||
overlayY: "top" |
||||
}), new ConnectionPositionPair({ |
||||
originX: "start", |
||||
originY: "top" |
||||
}, { |
||||
overlayX: "start", |
||||
overlayY: "bottom" |
||||
}), new ConnectionPositionPair({ |
||||
originX: "start", |
||||
originY: "top" |
||||
}, { |
||||
overlayX: "end", |
||||
overlayY: "bottom" |
||||
}), new ConnectionPositionPair({ |
||||
originX: "start", |
||||
originY: "top" |
||||
}, { |
||||
overlayX: "end", |
||||
overlayY: "top" |
||||
})]; |
||||
var _NzContextMenuService = class _NzContextMenuService { |
||||
constructor(ngZone, overlay) { |
||||
this.ngZone = ngZone; |
||||
this.overlay = overlay; |
||||
this.overlayRef = null; |
||||
this.closeSubscription = Subscription.EMPTY; |
||||
} |
||||
create($event, nzDropdownMenuComponent) { |
||||
this.close(true); |
||||
const { |
||||
x, |
||||
y |
||||
} = $event; |
||||
if ($event instanceof MouseEvent) { |
||||
$event.preventDefault(); |
||||
} |
||||
const positionStrategy = this.overlay.position().flexibleConnectedTo({ |
||||
x, |
||||
y |
||||
}).withPositions(LIST_OF_POSITIONS).withTransformOriginOn(".ant-dropdown"); |
||||
this.overlayRef = this.overlay.create({ |
||||
positionStrategy, |
||||
disposeOnNavigation: true, |
||||
scrollStrategy: this.overlay.scrollStrategies.close() |
||||
}); |
||||
this.closeSubscription = new Subscription(); |
||||
this.closeSubscription.add(nzDropdownMenuComponent.descendantMenuItemClick$.subscribe(() => this.close())); |
||||
this.closeSubscription.add(this.ngZone.runOutsideAngular(() => merge(fromEvent(document, "click").pipe( |
||||
filter((event) => !!this.overlayRef && !this.overlayRef.overlayElement.contains(event.target)), |
||||
/** handle firefox contextmenu event **/ |
||||
filter((event) => event.button !== 2) |
||||
), fromEvent(document, "keydown").pipe(filter((event) => event.key === "Escape"))).pipe(first()).subscribe(() => this.ngZone.run(() => this.close())))); |
||||
return this.overlayRef.attach(new TemplatePortal(nzDropdownMenuComponent.templateRef, nzDropdownMenuComponent.viewContainerRef)); |
||||
} |
||||
close(clear = false) { |
||||
if (this.overlayRef) { |
||||
this.overlayRef.detach(); |
||||
if (clear) { |
||||
this.overlayRef.dispose(); |
||||
} |
||||
this.overlayRef = null; |
||||
this.closeSubscription.unsubscribe(); |
||||
} |
||||
} |
||||
}; |
||||
_NzContextMenuService.ɵfac = function NzContextMenuService_Factory(t) { |
||||
return new (t || _NzContextMenuService)(ɵɵinject(NgZone), ɵɵinject(Overlay)); |
||||
}; |
||||
_NzContextMenuService.ɵprov = ɵɵdefineInjectable({ |
||||
token: _NzContextMenuService, |
||||
factory: _NzContextMenuService.ɵfac, |
||||
providedIn: NzContextMenuServiceModule |
||||
}); |
||||
var NzContextMenuService = _NzContextMenuService; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzContextMenuService, [{ |
||||
type: Injectable, |
||||
args: [{ |
||||
providedIn: NzContextMenuServiceModule |
||||
}] |
||||
}], () => [{ |
||||
type: NgZone |
||||
}, { |
||||
type: Overlay |
||||
}], null); |
||||
})(); |
||||
|
||||
export { |
||||
NzDropDownDirective, |
||||
NzDropdownMenuComponent, |
||||
NzDropDownModule |
||||
}; |
||||
//# sourceMappingURL=chunk-2CQTWQUI.js.map
|
File diff suppressed because one or more lines are too long
@ -1,116 +0,0 @@ |
||||
import { |
||||
InputBoolean, |
||||
coerceElement |
||||
} from "./chunk-M5GY4FCO.js"; |
||||
import { |
||||
ANIMATION_MODULE_TYPE, |
||||
Directive, |
||||
ElementRef, |
||||
Inject, |
||||
Input, |
||||
NgModule, |
||||
Optional, |
||||
Renderer2, |
||||
__decorate, |
||||
setClassMetadata, |
||||
ɵɵNgOnChangesFeature, |
||||
ɵɵdefineDirective, |
||||
ɵɵdefineInjector, |
||||
ɵɵdefineNgModule, |
||||
ɵɵdirectiveInject |
||||
} from "./chunk-FGESKT7O.js"; |
||||
|
||||
// node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-core-no-animation.mjs
|
||||
var DISABLED_CLASSNAME = "nz-animate-disabled"; |
||||
var _NzNoAnimationDirective = class _NzNoAnimationDirective { |
||||
constructor(element, renderer, animationType) { |
||||
this.element = element; |
||||
this.renderer = renderer; |
||||
this.animationType = animationType; |
||||
this.nzNoAnimation = false; |
||||
} |
||||
ngOnChanges() { |
||||
this.updateClass(); |
||||
} |
||||
ngAfterViewInit() { |
||||
this.updateClass(); |
||||
} |
||||
updateClass() { |
||||
const element = coerceElement(this.element); |
||||
if (!element) { |
||||
return; |
||||
} |
||||
if (this.nzNoAnimation || this.animationType === "NoopAnimations") { |
||||
this.renderer.addClass(element, DISABLED_CLASSNAME); |
||||
} else { |
||||
this.renderer.removeClass(element, DISABLED_CLASSNAME); |
||||
} |
||||
} |
||||
}; |
||||
_NzNoAnimationDirective.ɵfac = function NzNoAnimationDirective_Factory(t) { |
||||
return new (t || _NzNoAnimationDirective)(ɵɵdirectiveInject(ElementRef), ɵɵdirectiveInject(Renderer2), ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8)); |
||||
}; |
||||
_NzNoAnimationDirective.ɵdir = ɵɵdefineDirective({ |
||||
type: _NzNoAnimationDirective, |
||||
selectors: [["", "nzNoAnimation", ""]], |
||||
inputs: { |
||||
nzNoAnimation: "nzNoAnimation" |
||||
}, |
||||
exportAs: ["nzNoAnimation"], |
||||
standalone: true, |
||||
features: [ɵɵNgOnChangesFeature] |
||||
}); |
||||
var NzNoAnimationDirective = _NzNoAnimationDirective; |
||||
__decorate([InputBoolean()], NzNoAnimationDirective.prototype, "nzNoAnimation", void 0); |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzNoAnimationDirective, [{ |
||||
type: Directive, |
||||
args: [{ |
||||
selector: "[nzNoAnimation]", |
||||
exportAs: "nzNoAnimation", |
||||
standalone: true |
||||
}] |
||||
}], () => [{ |
||||
type: ElementRef |
||||
}, { |
||||
type: Renderer2 |
||||
}, { |
||||
type: void 0, |
||||
decorators: [{ |
||||
type: Optional |
||||
}, { |
||||
type: Inject, |
||||
args: [ANIMATION_MODULE_TYPE] |
||||
}] |
||||
}], { |
||||
nzNoAnimation: [{ |
||||
type: Input |
||||
}] |
||||
}); |
||||
})(); |
||||
var _NzNoAnimationModule = class _NzNoAnimationModule { |
||||
}; |
||||
_NzNoAnimationModule.ɵfac = function NzNoAnimationModule_Factory(t) { |
||||
return new (t || _NzNoAnimationModule)(); |
||||
}; |
||||
_NzNoAnimationModule.ɵmod = ɵɵdefineNgModule({ |
||||
type: _NzNoAnimationModule, |
||||
imports: [NzNoAnimationDirective], |
||||
exports: [NzNoAnimationDirective] |
||||
}); |
||||
_NzNoAnimationModule.ɵinj = ɵɵdefineInjector({}); |
||||
var NzNoAnimationModule = _NzNoAnimationModule; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzNoAnimationModule, [{ |
||||
type: NgModule, |
||||
args: [{ |
||||
imports: [NzNoAnimationDirective], |
||||
exports: [NzNoAnimationDirective] |
||||
}] |
||||
}], null, null); |
||||
})(); |
||||
|
||||
export { |
||||
NzNoAnimationDirective |
||||
}; |
||||
//# sourceMappingURL=chunk-55A2ZGND.js.map
|
@ -1,7 +0,0 @@ |
||||
{ |
||||
"version": 3, |
||||
"sources": ["../../../../../node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-core-no-animation.mjs"], |
||||
"sourcesContent": ["import * as i0 from '@angular/core';\nimport { Directive, Optional, Inject, Input, NgModule } from '@angular/core';\nimport { __decorate } from 'tslib';\nimport { coerceElement } from '@angular/cdk/coercion';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\nimport { InputBoolean } from 'ng-zorro-antd/core/util';\nconst DISABLED_CLASSNAME = 'nz-animate-disabled';\nclass NzNoAnimationDirective {\n constructor(element, renderer, animationType) {\n this.element = element;\n this.renderer = renderer;\n this.animationType = animationType;\n this.nzNoAnimation = false;\n }\n ngOnChanges() {\n this.updateClass();\n }\n ngAfterViewInit() {\n this.updateClass();\n }\n updateClass() {\n const element = coerceElement(this.element);\n if (!element) {\n return;\n }\n if (this.nzNoAnimation || this.animationType === 'NoopAnimations') {\n this.renderer.addClass(element, DISABLED_CLASSNAME);\n } else {\n this.renderer.removeClass(element, DISABLED_CLASSNAME);\n }\n }\n static {\n this.ɵfac = function NzNoAnimationDirective_Factory(t) {\n return new (t || NzNoAnimationDirective)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: NzNoAnimationDirective,\n selectors: [[\"\", \"nzNoAnimation\", \"\"]],\n inputs: {\n nzNoAnimation: \"nzNoAnimation\"\n },\n exportAs: [\"nzNoAnimation\"],\n standalone: true,\n features: [i0.ɵɵNgOnChangesFeature]\n });\n }\n}\n__decorate([InputBoolean()], NzNoAnimationDirective.prototype, \"nzNoAnimation\", void 0);\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(NzNoAnimationDirective, [{\n type: Directive,\n args: [{\n selector: '[nzNoAnimation]',\n exportAs: 'nzNoAnimation',\n standalone: true\n }]\n }], () => [{\n type: i0.ElementRef\n }, {\n type: i0.Renderer2\n }, {\n type: undefined,\n decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }]\n }], {\n nzNoAnimation: [{\n type: Input\n }]\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 */\nclass NzNoAnimationModule {\n static {\n this.ɵfac = function NzNoAnimationModule_Factory(t) {\n return new (t || NzNoAnimationModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: NzNoAnimationModule,\n imports: [NzNoAnimationDirective],\n exports: [NzNoAnimationDirective]\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n }\n}\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(NzNoAnimationModule, [{\n type: NgModule,\n args: [{\n imports: [NzNoAnimationDirective],\n exports: [NzNoAnimationDirective]\n }]\n }], null, 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\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { NzNoAnimationDirective, NzNoAnimationModule };\n"], |
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAM,qBAAqB;AAC3B,IAAM,0BAAN,MAAM,wBAAuB;AAAA,EAC3B,YAAY,SAAS,UAAU,eAAe;AAC5C,SAAK,UAAU;AACf,SAAK,WAAW;AAChB,SAAK,gBAAgB;AACrB,SAAK,gBAAgB;AAAA,EACvB;AAAA,EACA,cAAc;AACZ,SAAK,YAAY;AAAA,EACnB;AAAA,EACA,kBAAkB;AAChB,SAAK,YAAY;AAAA,EACnB;AAAA,EACA,cAAc;AACZ,UAAM,UAAU,cAAc,KAAK,OAAO;AAC1C,QAAI,CAAC,SAAS;AACZ;AAAA,IACF;AACA,QAAI,KAAK,iBAAiB,KAAK,kBAAkB,kBAAkB;AACjE,WAAK,SAAS,SAAS,SAAS,kBAAkB;AAAA,IACpD,OAAO;AACL,WAAK,SAAS,YAAY,SAAS,kBAAkB;AAAA,IACvD;AAAA,EACF;AAkBF;AAhBI,wBAAK,OAAO,SAAS,+BAA+B,GAAG;AACrD,SAAO,KAAK,KAAK,yBAA2B,kBAAqB,UAAU,GAAM,kBAAqB,SAAS,GAAM,kBAAkB,uBAAuB,CAAC,CAAC;AAClK;AAGA,wBAAK,OAAyB,kBAAkB;AAAA,EAC9C,MAAM;AAAA,EACN,WAAW,CAAC,CAAC,IAAI,iBAAiB,EAAE,CAAC;AAAA,EACrC,QAAQ;AAAA,IACN,eAAe;AAAA,EACjB;AAAA,EACA,UAAU,CAAC,eAAe;AAAA,EAC1B,YAAY;AAAA,EACZ,UAAU,CAAI,oBAAoB;AACpC,CAAC;AAvCL,IAAM,yBAAN;AA0CA,WAAW,CAAC,aAAa,CAAC,GAAG,uBAAuB,WAAW,iBAAiB,MAAM;AAAA,CACrF,MAAM;AACL,GAAC,OAAO,cAAc,eAAe,cAAiB,iBAAkB,wBAAwB,CAAC;AAAA,IAC/F,MAAM;AAAA,IACN,MAAM,CAAC;AAAA,MACL,UAAU;AAAA,MACV,UAAU;AAAA,MACV,YAAY;AAAA,IACd,CAAC;AAAA,EACH,CAAC,GAAG,MAAM,CAAC;AAAA,IACT,MAAS;AAAA,EACX,GAAG;AAAA,IACD,MAAS;AAAA,EACX,GAAG;AAAA,IACD,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,MACX,MAAM;AAAA,IACR,GAAG;AAAA,MACD,MAAM;AAAA,MACN,MAAM,CAAC,qBAAqB;AAAA,IAC9B,CAAC;AAAA,EACH,CAAC,GAAG;AAAA,IACF,eAAe,CAAC;AAAA,MACd,MAAM;AAAA,IACR,CAAC;AAAA,EACH,CAAC;AACH,GAAG;AAMH,IAAM,uBAAN,MAAM,qBAAoB;AAgB1B;AAdI,qBAAK,OAAO,SAAS,4BAA4B,GAAG;AAClD,SAAO,KAAK,KAAK,sBAAqB;AACxC;AAGA,qBAAK,OAAyB,iBAAiB;AAAA,EAC7C,MAAM;AAAA,EACN,SAAS,CAAC,sBAAsB;AAAA,EAChC,SAAS,CAAC,sBAAsB;AAClC,CAAC;AAGD,qBAAK,OAAyB,iBAAiB,CAAC,CAAC;AAdrD,IAAM,sBAAN;AAAA,CAiBC,MAAM;AACL,GAAC,OAAO,cAAc,eAAe,cAAiB,iBAAkB,qBAAqB,CAAC;AAAA,IAC5F,MAAM;AAAA,IACN,MAAM,CAAC;AAAA,MACL,SAAS,CAAC,sBAAsB;AAAA,MAChC,SAAS,CAAC,sBAAsB;AAAA,IAClC,CAAC;AAAA,EACH,CAAC,GAAG,MAAM,IAAI;AAChB,GAAG;", |
||||
"names": [] |
||||
} |
@ -1,791 +0,0 @@ |
||||
import { |
||||
DEFAULT_TOOLTIP_POSITIONS, |
||||
NzConnectedOverlayDirective, |
||||
NzOverlayModule, |
||||
POSITION_MAP, |
||||
getPlacementName |
||||
} from "./chunk-6RXUTAFR.js"; |
||||
import { |
||||
zoomBigMotion |
||||
} from "./chunk-XAGDQPFO.js"; |
||||
import { |
||||
NzNoAnimationDirective |
||||
} from "./chunk-55A2ZGND.js"; |
||||
import { |
||||
CdkConnectedOverlay, |
||||
OverlayModule |
||||
} from "./chunk-6U656R5M.js"; |
||||
import { |
||||
NzOutletModule, |
||||
NzStringTemplateOutletDirective |
||||
} from "./chunk-VOD2PKZN.js"; |
||||
import { |
||||
NzConfigService, |
||||
isPresetColor |
||||
} from "./chunk-ZHMJ6SNN.js"; |
||||
import { |
||||
Directionality |
||||
} from "./chunk-6NZ2BEBG.js"; |
||||
import { |
||||
InputBoolean, |
||||
isNotNil, |
||||
toBoolean |
||||
} from "./chunk-M5GY4FCO.js"; |
||||
import { |
||||
NgClass, |
||||
NgStyle |
||||
} from "./chunk-OSQBUYO6.js"; |
||||
import { |
||||
ChangeDetectionStrategy, |
||||
ChangeDetectorRef, |
||||
Component, |
||||
Directive, |
||||
ElementRef, |
||||
EventEmitter, |
||||
Host, |
||||
Input, |
||||
NgModule, |
||||
Optional, |
||||
Output, |
||||
Renderer2, |
||||
Subject, |
||||
TemplateRef, |
||||
ViewChild, |
||||
ViewContainerRef, |
||||
ViewEncapsulation$1, |
||||
__decorate, |
||||
asapScheduler, |
||||
delay, |
||||
distinctUntilChanged, |
||||
filter, |
||||
setClassMetadata, |
||||
takeUntil, |
||||
ɵɵInheritDefinitionFeature, |
||||
ɵɵNgOnChangesFeature, |
||||
ɵɵStandaloneFeature, |
||||
ɵɵadvance, |
||||
ɵɵclassProp, |
||||
ɵɵdefineComponent, |
||||
ɵɵdefineDirective, |
||||
ɵɵdefineInjector, |
||||
ɵɵdefineNgModule, |
||||
ɵɵdirectiveInject, |
||||
ɵɵelement, |
||||
ɵɵelementContainerEnd, |
||||
ɵɵelementContainerStart, |
||||
ɵɵelementEnd, |
||||
ɵɵelementStart, |
||||
ɵɵlistener, |
||||
ɵɵloadQuery, |
||||
ɵɵnextContext, |
||||
ɵɵproperty, |
||||
ɵɵqueryRefresh, |
||||
ɵɵtemplate, |
||||
ɵɵtemplateRefExtractor, |
||||
ɵɵtext, |
||||
ɵɵtextInterpolate, |
||||
ɵɵviewQuery |
||||
} from "./chunk-FGESKT7O.js"; |
||||
import { |
||||
__spreadProps, |
||||
__spreadValues |
||||
} from "./chunk-HSNDBVJ3.js"; |
||||
|
||||
// node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-tooltip.mjs
|
||||
var _c0 = ["overlay"]; |
||||
function NzToolTipComponent_ng_template_0_ng_container_5_Template(rf, ctx) { |
||||
if (rf & 1) { |
||||
ɵɵelementContainerStart(0); |
||||
ɵɵtext(1); |
||||
ɵɵelementContainerEnd(); |
||||
} |
||||
if (rf & 2) { |
||||
const ctx_r2 = ɵɵnextContext(2); |
||||
ɵɵadvance(1); |
||||
ɵɵtextInterpolate(ctx_r2.nzTitle); |
||||
} |
||||
} |
||||
function NzToolTipComponent_ng_template_0_Template(rf, ctx) { |
||||
if (rf & 1) { |
||||
ɵɵelementStart(0, "div", 2)(1, "div", 3)(2, "div", 4); |
||||
ɵɵelement(3, "span", 5); |
||||
ɵɵelementEnd(); |
||||
ɵɵelementStart(4, "div", 6); |
||||
ɵɵtemplate(5, NzToolTipComponent_ng_template_0_ng_container_5_Template, 2, 1, "ng-container", 7); |
||||
ɵɵelementEnd()()(); |
||||
} |
||||
if (rf & 2) { |
||||
const ctx_r0 = ɵɵnextContext(); |
||||
ɵɵclassProp("ant-tooltip-rtl", ctx_r0.dir === "rtl"); |
||||
ɵɵproperty("ngClass", ctx_r0._classMap)("ngStyle", ctx_r0.nzOverlayStyle)("@.disabled", !!(ctx_r0.noAnimation == null ? null : ctx_r0.noAnimation.nzNoAnimation))("nzNoAnimation", ctx_r0.noAnimation == null ? null : ctx_r0.noAnimation.nzNoAnimation)("@zoomBigMotion", "active"); |
||||
ɵɵadvance(3); |
||||
ɵɵproperty("ngStyle", ctx_r0._contentStyleMap); |
||||
ɵɵadvance(1); |
||||
ɵɵproperty("ngStyle", ctx_r0._contentStyleMap); |
||||
ɵɵadvance(1); |
||||
ɵɵproperty("nzStringTemplateOutlet", ctx_r0.nzTitle)("nzStringTemplateOutletContext", ctx_r0.nzTitleContext); |
||||
} |
||||
} |
||||
var _NzTooltipBaseDirective = class _NzTooltipBaseDirective { |
||||
/** |
||||
* This true title that would be used in other parts on this component. |
||||
*/ |
||||
get _title() { |
||||
return this.title || this.directiveTitle || null; |
||||
} |
||||
get _content() { |
||||
return this.content || this.directiveContent || null; |
||||
} |
||||
get _trigger() { |
||||
return typeof this.trigger !== "undefined" ? this.trigger : "hover"; |
||||
} |
||||
get _placement() { |
||||
const p = this.placement; |
||||
return Array.isArray(p) && p.length > 0 ? p : typeof p === "string" && p ? [p] : ["top"]; |
||||
} |
||||
get _visible() { |
||||
return (typeof this.visible !== "undefined" ? this.visible : this.internalVisible) || false; |
||||
} |
||||
get _mouseEnterDelay() { |
||||
return this.mouseEnterDelay || 0.15; |
||||
} |
||||
get _mouseLeaveDelay() { |
||||
return this.mouseLeaveDelay || 0.1; |
||||
} |
||||
get _overlayClassName() { |
||||
return this.overlayClassName || null; |
||||
} |
||||
get _overlayStyle() { |
||||
return this.overlayStyle || null; |
||||
} |
||||
getProxyPropertyMap() { |
||||
return { |
||||
noAnimation: ["noAnimation", () => !!this.noAnimation] |
||||
}; |
||||
} |
||||
constructor(elementRef, hostView, renderer, noAnimation, nzConfigService) { |
||||
this.elementRef = elementRef; |
||||
this.hostView = hostView; |
||||
this.renderer = renderer; |
||||
this.noAnimation = noAnimation; |
||||
this.nzConfigService = nzConfigService; |
||||
this.visibleChange = new EventEmitter(); |
||||
this.internalVisible = false; |
||||
this.destroy$ = new Subject(); |
||||
this.triggerDisposables = []; |
||||
} |
||||
ngOnChanges(changes) { |
||||
const { |
||||
trigger |
||||
} = changes; |
||||
if (trigger && !trigger.isFirstChange()) { |
||||
this.registerTriggers(); |
||||
} |
||||
if (this.component) { |
||||
this.updatePropertiesByChanges(changes); |
||||
} |
||||
} |
||||
ngAfterViewInit() { |
||||
this.createComponent(); |
||||
this.registerTriggers(); |
||||
} |
||||
ngOnDestroy() { |
||||
this.destroy$.next(); |
||||
this.destroy$.complete(); |
||||
this.clearTogglingTimer(); |
||||
this.removeTriggerListeners(); |
||||
} |
||||
show() { |
||||
this.component?.show(); |
||||
} |
||||
hide() { |
||||
this.component?.hide(); |
||||
} |
||||
/** |
||||
* Force the component to update its position. |
||||
*/ |
||||
updatePosition() { |
||||
if (this.component) { |
||||
this.component.updatePosition(); |
||||
} |
||||
} |
||||
/** |
||||
* Create a dynamic tooltip component. This method can be override. |
||||
*/ |
||||
createComponent() { |
||||
const componentRef = this.componentRef; |
||||
this.component = componentRef.instance; |
||||
this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement), componentRef.location.nativeElement); |
||||
this.component.setOverlayOrigin(this.origin || this.elementRef); |
||||
this.initProperties(); |
||||
const ngVisibleChange$ = this.component.nzVisibleChange.pipe(distinctUntilChanged()); |
||||
ngVisibleChange$.pipe(takeUntil(this.destroy$)).subscribe((visible) => { |
||||
this.internalVisible = visible; |
||||
this.visibleChange.emit(visible); |
||||
}); |
||||
ngVisibleChange$.pipe(filter((visible) => visible), delay(0, asapScheduler), filter(() => Boolean(this.component?.overlay?.overlayRef)), takeUntil(this.destroy$)).subscribe(() => { |
||||
this.component?.updatePosition(); |
||||
}); |
||||
} |
||||
registerTriggers() { |
||||
const el = this.elementRef.nativeElement; |
||||
const trigger = this.trigger; |
||||
this.removeTriggerListeners(); |
||||
if (trigger === "hover") { |
||||
let overlayElement; |
||||
this.triggerDisposables.push(this.renderer.listen(el, "mouseenter", () => { |
||||
this.delayEnterLeave(true, true, this._mouseEnterDelay); |
||||
})); |
||||
this.triggerDisposables.push(this.renderer.listen(el, "mouseleave", () => { |
||||
this.delayEnterLeave(true, false, this._mouseLeaveDelay); |
||||
if (this.component?.overlay.overlayRef && !overlayElement) { |
||||
overlayElement = this.component.overlay.overlayRef.overlayElement; |
||||
this.triggerDisposables.push(this.renderer.listen(overlayElement, "mouseenter", () => { |
||||
this.delayEnterLeave(false, true, this._mouseEnterDelay); |
||||
})); |
||||
this.triggerDisposables.push(this.renderer.listen(overlayElement, "mouseleave", () => { |
||||
this.delayEnterLeave(false, false, this._mouseLeaveDelay); |
||||
})); |
||||
} |
||||
})); |
||||
} else if (trigger === "focus") { |
||||
this.triggerDisposables.push(this.renderer.listen(el, "focusin", () => this.show())); |
||||
this.triggerDisposables.push(this.renderer.listen(el, "focusout", () => this.hide())); |
||||
} else if (trigger === "click") { |
||||
this.triggerDisposables.push(this.renderer.listen(el, "click", (e) => { |
||||
e.preventDefault(); |
||||
this.show(); |
||||
})); |
||||
} |
||||
} |
||||
updatePropertiesByChanges(changes) { |
||||
this.updatePropertiesByKeys(Object.keys(changes)); |
||||
} |
||||
updatePropertiesByKeys(keys) { |
||||
const mappingProperties = __spreadValues({ |
||||
// common mappings
|
||||
title: ["nzTitle", () => this._title], |
||||
directiveTitle: ["nzTitle", () => this._title], |
||||
content: ["nzContent", () => this._content], |
||||
directiveContent: ["nzContent", () => this._content], |
||||
trigger: ["nzTrigger", () => this._trigger], |
||||
placement: ["nzPlacement", () => this._placement], |
||||
visible: ["nzVisible", () => this._visible], |
||||
mouseEnterDelay: ["nzMouseEnterDelay", () => this._mouseEnterDelay], |
||||
mouseLeaveDelay: ["nzMouseLeaveDelay", () => this._mouseLeaveDelay], |
||||
overlayClassName: ["nzOverlayClassName", () => this._overlayClassName], |
||||
overlayStyle: ["nzOverlayStyle", () => this._overlayStyle], |
||||
arrowPointAtCenter: ["nzArrowPointAtCenter", () => this.arrowPointAtCenter], |
||||
cdkConnectedOverlayPush: ["cdkConnectedOverlayPush", () => this.cdkConnectedOverlayPush] |
||||
}, this.getProxyPropertyMap()); |
||||
(keys || Object.keys(mappingProperties).filter((key) => !key.startsWith("directive"))).forEach((property) => { |
||||
if (mappingProperties[property]) { |
||||
const [name, valueFn] = mappingProperties[property]; |
||||
this.updateComponentValue(name, valueFn()); |
||||
} |
||||
}); |
||||
this.component?.updateByDirective(); |
||||
} |
||||
initProperties() { |
||||
this.updatePropertiesByKeys(); |
||||
} |
||||
updateComponentValue(key, value) { |
||||
if (typeof value !== "undefined") { |
||||
this.component[key] = value; |
||||
} |
||||
} |
||||
delayEnterLeave(isOrigin, isEnter, delay2 = -1) { |
||||
if (this.delayTimer) { |
||||
this.clearTogglingTimer(); |
||||
} else if (delay2 > 0) { |
||||
this.delayTimer = setTimeout(() => { |
||||
this.delayTimer = void 0; |
||||
isEnter ? this.show() : this.hide(); |
||||
}, delay2 * 1e3); |
||||
} else { |
||||
isEnter && isOrigin ? this.show() : this.hide(); |
||||
} |
||||
} |
||||
removeTriggerListeners() { |
||||
this.triggerDisposables.forEach((dispose) => dispose()); |
||||
this.triggerDisposables.length = 0; |
||||
} |
||||
clearTogglingTimer() { |
||||
if (this.delayTimer) { |
||||
clearTimeout(this.delayTimer); |
||||
this.delayTimer = void 0; |
||||
} |
||||
} |
||||
}; |
||||
_NzTooltipBaseDirective.ɵfac = function NzTooltipBaseDirective_Factory(t) { |
||||
return new (t || _NzTooltipBaseDirective)(ɵɵdirectiveInject(ElementRef), ɵɵdirectiveInject(ViewContainerRef), ɵɵdirectiveInject(Renderer2), ɵɵdirectiveInject(NzNoAnimationDirective), ɵɵdirectiveInject(NzConfigService)); |
||||
}; |
||||
_NzTooltipBaseDirective.ɵdir = ɵɵdefineDirective({ |
||||
type: _NzTooltipBaseDirective, |
||||
features: [ɵɵNgOnChangesFeature] |
||||
}); |
||||
var NzTooltipBaseDirective = _NzTooltipBaseDirective; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzTooltipBaseDirective, [{ |
||||
type: Directive |
||||
}], () => [{ |
||||
type: ElementRef |
||||
}, { |
||||
type: ViewContainerRef |
||||
}, { |
||||
type: Renderer2 |
||||
}, { |
||||
type: NzNoAnimationDirective |
||||
}, { |
||||
type: NzConfigService |
||||
}], null); |
||||
})(); |
||||
var _NzTooltipBaseComponent = class _NzTooltipBaseComponent { |
||||
set nzVisible(value) { |
||||
const visible = toBoolean(value); |
||||
if (this._visible !== visible) { |
||||
this._visible = visible; |
||||
this.nzVisibleChange.next(visible); |
||||
} |
||||
} |
||||
get nzVisible() { |
||||
return this._visible; |
||||
} |
||||
set nzTrigger(value) { |
||||
this._trigger = value; |
||||
} |
||||
get nzTrigger() { |
||||
return this._trigger; |
||||
} |
||||
set nzPlacement(value) { |
||||
const preferredPosition = value.map((placement) => POSITION_MAP[placement]); |
||||
this._positions = [...preferredPosition, ...DEFAULT_TOOLTIP_POSITIONS]; |
||||
} |
||||
constructor(cdr, directionality, noAnimation) { |
||||
this.cdr = cdr; |
||||
this.directionality = directionality; |
||||
this.noAnimation = noAnimation; |
||||
this.nzTitle = null; |
||||
this.nzContent = null; |
||||
this.nzArrowPointAtCenter = false; |
||||
this.nzOverlayStyle = {}; |
||||
this.nzBackdrop = false; |
||||
this.cdkConnectedOverlayPush = true; |
||||
this.nzVisibleChange = new Subject(); |
||||
this._visible = false; |
||||
this._trigger = "hover"; |
||||
this.preferredPlacement = "top"; |
||||
this.dir = "ltr"; |
||||
this._classMap = {}; |
||||
this._prefix = "ant-tooltip"; |
||||
this._positions = [...DEFAULT_TOOLTIP_POSITIONS]; |
||||
this.destroy$ = new Subject(); |
||||
} |
||||
ngOnInit() { |
||||
this.directionality.change?.pipe(takeUntil(this.destroy$)).subscribe((direction) => { |
||||
this.dir = direction; |
||||
this.cdr.detectChanges(); |
||||
}); |
||||
this.dir = this.directionality.value; |
||||
} |
||||
ngOnDestroy() { |
||||
this.nzVisibleChange.complete(); |
||||
this.destroy$.next(); |
||||
this.destroy$.complete(); |
||||
} |
||||
show() { |
||||
if (this.nzVisible) { |
||||
return; |
||||
} |
||||
if (!this.isEmpty()) { |
||||
this.nzVisible = true; |
||||
this.nzVisibleChange.next(true); |
||||
this.cdr.detectChanges(); |
||||
} |
||||
if (this.origin && this.overlay && this.overlay.overlayRef && this.overlay.overlayRef.getDirection() === "rtl") { |
||||
this.overlay.overlayRef.setDirection("ltr"); |
||||
} |
||||
} |
||||
hide() { |
||||
if (!this.nzVisible) { |
||||
return; |
||||
} |
||||
this.nzVisible = false; |
||||
this.nzVisibleChange.next(false); |
||||
this.cdr.detectChanges(); |
||||
} |
||||
updateByDirective() { |
||||
this.updateStyles(); |
||||
this.cdr.detectChanges(); |
||||
Promise.resolve().then(() => { |
||||
this.updatePosition(); |
||||
this.updateVisibilityByTitle(); |
||||
}); |
||||
} |
||||
/** |
||||
* Force the component to update its position. |
||||
*/ |
||||
updatePosition() { |
||||
if (this.origin && this.overlay && this.overlay.overlayRef) { |
||||
this.overlay.overlayRef.updatePosition(); |
||||
} |
||||
} |
||||
onPositionChange(position) { |
||||
this.preferredPlacement = getPlacementName(position); |
||||
this.updateStyles(); |
||||
this.cdr.detectChanges(); |
||||
} |
||||
setOverlayOrigin(origin) { |
||||
this.origin = origin; |
||||
this.cdr.markForCheck(); |
||||
} |
||||
onClickOutside(event) { |
||||
if (!this.origin.nativeElement.contains(event.target) && this.nzTrigger !== null) { |
||||
this.hide(); |
||||
} |
||||
} |
||||
/** |
||||
* Hide the component while the content is empty. |
||||
*/ |
||||
updateVisibilityByTitle() { |
||||
if (this.isEmpty()) { |
||||
this.hide(); |
||||
} |
||||
} |
||||
updateStyles() { |
||||
this._classMap = { |
||||
[this.nzOverlayClassName]: true, |
||||
[`${this._prefix}-placement-${this.preferredPlacement}`]: true |
||||
}; |
||||
} |
||||
}; |
||||
_NzTooltipBaseComponent.ɵfac = function NzTooltipBaseComponent_Factory(t) { |
||||
return new (t || _NzTooltipBaseComponent)(ɵɵdirectiveInject(ChangeDetectorRef), ɵɵdirectiveInject(Directionality, 8), ɵɵdirectiveInject(NzNoAnimationDirective)); |
||||
}; |
||||
_NzTooltipBaseComponent.ɵdir = ɵɵdefineDirective({ |
||||
type: _NzTooltipBaseComponent, |
||||
viewQuery: function NzTooltipBaseComponent_Query(rf, ctx) { |
||||
if (rf & 1) { |
||||
ɵɵviewQuery(_c0, 5); |
||||
} |
||||
if (rf & 2) { |
||||
let _t; |
||||
ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.overlay = _t.first); |
||||
} |
||||
} |
||||
}); |
||||
var NzTooltipBaseComponent = _NzTooltipBaseComponent; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzTooltipBaseComponent, [{ |
||||
type: Directive |
||||
}], () => [{ |
||||
type: ChangeDetectorRef |
||||
}, { |
||||
type: Directionality, |
||||
decorators: [{ |
||||
type: Optional |
||||
}] |
||||
}, { |
||||
type: NzNoAnimationDirective |
||||
}], { |
||||
overlay: [{ |
||||
type: ViewChild, |
||||
args: ["overlay", { |
||||
static: false |
||||
}] |
||||
}] |
||||
}); |
||||
})(); |
||||
function isTooltipEmpty(value) { |
||||
return value instanceof TemplateRef ? false : value === "" || !isNotNil(value); |
||||
} |
||||
var _NzTooltipDirective = class _NzTooltipDirective extends NzTooltipBaseDirective { |
||||
constructor(elementRef, hostView, renderer, noAnimation) { |
||||
super(elementRef, hostView, renderer, noAnimation); |
||||
this.titleContext = null; |
||||
this.trigger = "hover"; |
||||
this.placement = "top"; |
||||
this.cdkConnectedOverlayPush = true; |
||||
this.visibleChange = new EventEmitter(); |
||||
this.componentRef = this.hostView.createComponent(NzToolTipComponent); |
||||
} |
||||
getProxyPropertyMap() { |
||||
return __spreadProps(__spreadValues({}, super.getProxyPropertyMap()), { |
||||
nzTooltipColor: ["nzColor", () => this.nzTooltipColor], |
||||
titleContext: ["nzTitleContext", () => this.titleContext] |
||||
}); |
||||
} |
||||
}; |
||||
_NzTooltipDirective.ɵfac = function NzTooltipDirective_Factory(t) { |
||||
return new (t || _NzTooltipDirective)(ɵɵdirectiveInject(ElementRef), ɵɵdirectiveInject(ViewContainerRef), ɵɵdirectiveInject(Renderer2), ɵɵdirectiveInject(NzNoAnimationDirective, 9)); |
||||
}; |
||||
_NzTooltipDirective.ɵdir = ɵɵdefineDirective({ |
||||
type: _NzTooltipDirective, |
||||
selectors: [["", "nz-tooltip", ""]], |
||||
hostVars: 2, |
||||
hostBindings: function NzTooltipDirective_HostBindings(rf, ctx) { |
||||
if (rf & 2) { |
||||
ɵɵclassProp("ant-tooltip-open", ctx.visible); |
||||
} |
||||
}, |
||||
inputs: { |
||||
title: ["nzTooltipTitle", "title"], |
||||
titleContext: ["nzTooltipTitleContext", "titleContext"], |
||||
directiveTitle: ["nz-tooltip", "directiveTitle"], |
||||
trigger: ["nzTooltipTrigger", "trigger"], |
||||
placement: ["nzTooltipPlacement", "placement"], |
||||
origin: ["nzTooltipOrigin", "origin"], |
||||
visible: ["nzTooltipVisible", "visible"], |
||||
mouseEnterDelay: ["nzTooltipMouseEnterDelay", "mouseEnterDelay"], |
||||
mouseLeaveDelay: ["nzTooltipMouseLeaveDelay", "mouseLeaveDelay"], |
||||
overlayClassName: ["nzTooltipOverlayClassName", "overlayClassName"], |
||||
overlayStyle: ["nzTooltipOverlayStyle", "overlayStyle"], |
||||
arrowPointAtCenter: ["nzTooltipArrowPointAtCenter", "arrowPointAtCenter"], |
||||
cdkConnectedOverlayPush: "cdkConnectedOverlayPush", |
||||
nzTooltipColor: "nzTooltipColor" |
||||
}, |
||||
outputs: { |
||||
visibleChange: "nzTooltipVisibleChange" |
||||
}, |
||||
exportAs: ["nzTooltip"], |
||||
standalone: true, |
||||
features: [ɵɵInheritDefinitionFeature] |
||||
}); |
||||
var NzTooltipDirective = _NzTooltipDirective; |
||||
__decorate([InputBoolean()], NzTooltipDirective.prototype, "arrowPointAtCenter", void 0); |
||||
__decorate([InputBoolean()], NzTooltipDirective.prototype, "cdkConnectedOverlayPush", void 0); |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzTooltipDirective, [{ |
||||
type: Directive, |
||||
args: [{ |
||||
selector: "[nz-tooltip]", |
||||
exportAs: "nzTooltip", |
||||
host: { |
||||
"[class.ant-tooltip-open]": "visible" |
||||
}, |
||||
standalone: true |
||||
}] |
||||
}], () => [{ |
||||
type: ElementRef |
||||
}, { |
||||
type: ViewContainerRef |
||||
}, { |
||||
type: Renderer2 |
||||
}, { |
||||
type: NzNoAnimationDirective, |
||||
decorators: [{ |
||||
type: Host |
||||
}, { |
||||
type: Optional |
||||
}] |
||||
}], { |
||||
title: [{ |
||||
type: Input, |
||||
args: ["nzTooltipTitle"] |
||||
}], |
||||
titleContext: [{ |
||||
type: Input, |
||||
args: ["nzTooltipTitleContext"] |
||||
}], |
||||
directiveTitle: [{ |
||||
type: Input, |
||||
args: ["nz-tooltip"] |
||||
}], |
||||
trigger: [{ |
||||
type: Input, |
||||
args: ["nzTooltipTrigger"] |
||||
}], |
||||
placement: [{ |
||||
type: Input, |
||||
args: ["nzTooltipPlacement"] |
||||
}], |
||||
origin: [{ |
||||
type: Input, |
||||
args: ["nzTooltipOrigin"] |
||||
}], |
||||
visible: [{ |
||||
type: Input, |
||||
args: ["nzTooltipVisible"] |
||||
}], |
||||
mouseEnterDelay: [{ |
||||
type: Input, |
||||
args: ["nzTooltipMouseEnterDelay"] |
||||
}], |
||||
mouseLeaveDelay: [{ |
||||
type: Input, |
||||
args: ["nzTooltipMouseLeaveDelay"] |
||||
}], |
||||
overlayClassName: [{ |
||||
type: Input, |
||||
args: ["nzTooltipOverlayClassName"] |
||||
}], |
||||
overlayStyle: [{ |
||||
type: Input, |
||||
args: ["nzTooltipOverlayStyle"] |
||||
}], |
||||
arrowPointAtCenter: [{ |
||||
type: Input, |
||||
args: ["nzTooltipArrowPointAtCenter"] |
||||
}], |
||||
cdkConnectedOverlayPush: [{ |
||||
type: Input |
||||
}], |
||||
nzTooltipColor: [{ |
||||
type: Input |
||||
}], |
||||
visibleChange: [{ |
||||
type: Output, |
||||
args: ["nzTooltipVisibleChange"] |
||||
}] |
||||
}); |
||||
})(); |
||||
var _NzToolTipComponent = class _NzToolTipComponent extends NzTooltipBaseComponent { |
||||
constructor(cdr, directionality, noAnimation) { |
||||
super(cdr, directionality, noAnimation); |
||||
this.nzTitle = null; |
||||
this.nzTitleContext = null; |
||||
this._contentStyleMap = {}; |
||||
} |
||||
isEmpty() { |
||||
return isTooltipEmpty(this.nzTitle); |
||||
} |
||||
updateStyles() { |
||||
const isColorPreset = this.nzColor && isPresetColor(this.nzColor); |
||||
this._classMap = { |
||||
[this.nzOverlayClassName]: true, |
||||
[`${this._prefix}-placement-${this.preferredPlacement}`]: true, |
||||
[`${this._prefix}-${this.nzColor}`]: isColorPreset |
||||
}; |
||||
this._contentStyleMap = { |
||||
backgroundColor: !!this.nzColor && !isColorPreset ? this.nzColor : null, |
||||
"--color": this.nzColor |
||||
}; |
||||
} |
||||
}; |
||||
_NzToolTipComponent.ɵfac = function NzToolTipComponent_Factory(t) { |
||||
return new (t || _NzToolTipComponent)(ɵɵdirectiveInject(ChangeDetectorRef), ɵɵdirectiveInject(Directionality, 8), ɵɵdirectiveInject(NzNoAnimationDirective, 9)); |
||||
}; |
||||
_NzToolTipComponent.ɵcmp = ɵɵdefineComponent({ |
||||
type: _NzToolTipComponent, |
||||
selectors: [["nz-tooltip"]], |
||||
exportAs: ["nzTooltipComponent"], |
||||
standalone: true, |
||||
features: [ɵɵInheritDefinitionFeature, ɵɵStandaloneFeature], |
||||
decls: 2, |
||||
vars: 5, |
||||
consts: [["cdkConnectedOverlay", "", "nzConnectedOverlay", "", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPush", "nzArrowPointAtCenter", "overlayOutsideClick", "detach", "positionChange"], ["overlay", "cdkConnectedOverlay"], [1, "ant-tooltip", 3, "ngClass", "ngStyle", "nzNoAnimation"], [1, "ant-tooltip-content"], [1, "ant-tooltip-arrow"], [1, "ant-tooltip-arrow-content", 3, "ngStyle"], [1, "ant-tooltip-inner", 3, "ngStyle"], [4, "nzStringTemplateOutlet", "nzStringTemplateOutletContext"]], |
||||
template: function NzToolTipComponent_Template(rf, ctx) { |
||||
if (rf & 1) { |
||||
ɵɵtemplate(0, NzToolTipComponent_ng_template_0_Template, 6, 11, "ng-template", 0, 1, ɵɵtemplateRefExtractor); |
||||
ɵɵlistener("overlayOutsideClick", function NzToolTipComponent_Template_ng_template_overlayOutsideClick_0_listener($event) { |
||||
return ctx.onClickOutside($event); |
||||
})("detach", function NzToolTipComponent_Template_ng_template_detach_0_listener() { |
||||
return ctx.hide(); |
||||
})("positionChange", function NzToolTipComponent_Template_ng_template_positionChange_0_listener($event) { |
||||
return ctx.onPositionChange($event); |
||||
}); |
||||
} |
||||
if (rf & 2) { |
||||
ɵɵproperty("cdkConnectedOverlayOrigin", ctx.origin)("cdkConnectedOverlayOpen", ctx._visible)("cdkConnectedOverlayPositions", ctx._positions)("cdkConnectedOverlayPush", ctx.cdkConnectedOverlayPush)("nzArrowPointAtCenter", ctx.nzArrowPointAtCenter); |
||||
} |
||||
}, |
||||
dependencies: [OverlayModule, CdkConnectedOverlay, NgClass, NgStyle, NzNoAnimationDirective, NzOutletModule, NzStringTemplateOutletDirective, NzOverlayModule, NzConnectedOverlayDirective], |
||||
encapsulation: 2, |
||||
data: { |
||||
animation: [zoomBigMotion] |
||||
}, |
||||
changeDetection: 0 |
||||
}); |
||||
var NzToolTipComponent = _NzToolTipComponent; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzToolTipComponent, [{ |
||||
type: Component, |
||||
args: [{ |
||||
selector: "nz-tooltip", |
||||
exportAs: "nzTooltipComponent", |
||||
changeDetection: ChangeDetectionStrategy.OnPush, |
||||
encapsulation: ViewEncapsulation$1.None, |
||||
animations: [zoomBigMotion], |
||||
template: ` |
||||
<ng-template |
||||
#overlay="cdkConnectedOverlay" |
||||
cdkConnectedOverlay |
||||
nzConnectedOverlay |
||||
[cdkConnectedOverlayOrigin]="origin" |
||||
[cdkConnectedOverlayOpen]="_visible" |
||||
[cdkConnectedOverlayPositions]="_positions" |
||||
[cdkConnectedOverlayPush]="cdkConnectedOverlayPush" |
||||
[nzArrowPointAtCenter]="nzArrowPointAtCenter" |
||||
(overlayOutsideClick)="onClickOutside($event)" |
||||
(detach)="hide()" |
||||
(positionChange)="onPositionChange($event)" |
||||
> |
||||
<div |
||||
class="ant-tooltip" |
||||
[class.ant-tooltip-rtl]="dir === 'rtl'" |
||||
[ngClass]="_classMap" |
||||
[ngStyle]="nzOverlayStyle" |
||||
[@.disabled]="!!noAnimation?.nzNoAnimation" |
||||
[nzNoAnimation]="noAnimation?.nzNoAnimation" |
||||
[@zoomBigMotion]="'active'" |
||||
> |
||||
<div class="ant-tooltip-content"> |
||||
<div class="ant-tooltip-arrow"> |
||||
<span class="ant-tooltip-arrow-content" [ngStyle]="_contentStyleMap"></span> |
||||
</div> |
||||
<div class="ant-tooltip-inner" [ngStyle]="_contentStyleMap"> |
||||
<ng-container *nzStringTemplateOutlet="nzTitle; context: nzTitleContext">{{ nzTitle }}</ng-container> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</ng-template> |
||||
`,
|
||||
preserveWhitespaces: false, |
||||
imports: [OverlayModule, NgClass, NgStyle, NzNoAnimationDirective, NzOutletModule, NzOverlayModule], |
||||
standalone: true |
||||
}] |
||||
}], () => [{ |
||||
type: ChangeDetectorRef |
||||
}, { |
||||
type: Directionality, |
||||
decorators: [{ |
||||
type: Optional |
||||
}] |
||||
}, { |
||||
type: NzNoAnimationDirective, |
||||
decorators: [{ |
||||
type: Host |
||||
}, { |
||||
type: Optional |
||||
}] |
||||
}], null); |
||||
})(); |
||||
var _NzToolTipModule = class _NzToolTipModule { |
||||
}; |
||||
_NzToolTipModule.ɵfac = function NzToolTipModule_Factory(t) { |
||||
return new (t || _NzToolTipModule)(); |
||||
}; |
||||
_NzToolTipModule.ɵmod = ɵɵdefineNgModule({ |
||||
type: _NzToolTipModule, |
||||
imports: [NzToolTipComponent, NzTooltipDirective], |
||||
exports: [NzToolTipComponent, NzTooltipDirective] |
||||
}); |
||||
_NzToolTipModule.ɵinj = ɵɵdefineInjector({ |
||||
imports: [NzToolTipComponent] |
||||
}); |
||||
var NzToolTipModule = _NzToolTipModule; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzToolTipModule, [{ |
||||
type: NgModule, |
||||
args: [{ |
||||
imports: [NzToolTipComponent, NzTooltipDirective], |
||||
exports: [NzToolTipComponent, NzTooltipDirective] |
||||
}] |
||||
}], null, null); |
||||
})(); |
||||
|
||||
export { |
||||
NzTooltipDirective, |
||||
NzToolTipModule |
||||
}; |
||||
//# sourceMappingURL=chunk-5MZJ5XYV.js.map
|
File diff suppressed because one or more lines are too long
@ -1,309 +0,0 @@ |
||||
import { |
||||
NzDestroyService |
||||
} from "./chunk-D5ODNR6D.js"; |
||||
import { |
||||
CdkConnectedOverlay, |
||||
CdkOverlayOrigin, |
||||
ConnectionPositionPair |
||||
} from "./chunk-6U656R5M.js"; |
||||
import { |
||||
InputBoolean |
||||
} from "./chunk-M5GY4FCO.js"; |
||||
import { |
||||
Directive, |
||||
ElementRef, |
||||
Input, |
||||
NgModule, |
||||
__decorate, |
||||
setClassMetadata, |
||||
takeUntil, |
||||
ɵɵProvidersFeature, |
||||
ɵɵdefineDirective, |
||||
ɵɵdefineInjector, |
||||
ɵɵdefineNgModule, |
||||
ɵɵdirectiveInject |
||||
} from "./chunk-FGESKT7O.js"; |
||||
|
||||
// node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-core-overlay.mjs
|
||||
var POSITION_MAP = { |
||||
top: new ConnectionPositionPair({ |
||||
originX: "center", |
||||
originY: "top" |
||||
}, { |
||||
overlayX: "center", |
||||
overlayY: "bottom" |
||||
}), |
||||
topCenter: new ConnectionPositionPair({ |
||||
originX: "center", |
||||
originY: "top" |
||||
}, { |
||||
overlayX: "center", |
||||
overlayY: "bottom" |
||||
}), |
||||
topLeft: new ConnectionPositionPair({ |
||||
originX: "start", |
||||
originY: "top" |
||||
}, { |
||||
overlayX: "start", |
||||
overlayY: "bottom" |
||||
}), |
||||
topRight: new ConnectionPositionPair({ |
||||
originX: "end", |
||||
originY: "top" |
||||
}, { |
||||
overlayX: "end", |
||||
overlayY: "bottom" |
||||
}), |
||||
right: new ConnectionPositionPair({ |
||||
originX: "end", |
||||
originY: "center" |
||||
}, { |
||||
overlayX: "start", |
||||
overlayY: "center" |
||||
}), |
||||
rightTop: new ConnectionPositionPair({ |
||||
originX: "end", |
||||
originY: "top" |
||||
}, { |
||||
overlayX: "start", |
||||
overlayY: "top" |
||||
}), |
||||
rightBottom: new ConnectionPositionPair({ |
||||
originX: "end", |
||||
originY: "bottom" |
||||
}, { |
||||
overlayX: "start", |
||||
overlayY: "bottom" |
||||
}), |
||||
bottom: new ConnectionPositionPair({ |
||||
originX: "center", |
||||
originY: "bottom" |
||||
}, { |
||||
overlayX: "center", |
||||
overlayY: "top" |
||||
}), |
||||
bottomCenter: new ConnectionPositionPair({ |
||||
originX: "center", |
||||
originY: "bottom" |
||||
}, { |
||||
overlayX: "center", |
||||
overlayY: "top" |
||||
}), |
||||
bottomLeft: new ConnectionPositionPair({ |
||||
originX: "start", |
||||
originY: "bottom" |
||||
}, { |
||||
overlayX: "start", |
||||
overlayY: "top" |
||||
}), |
||||
bottomRight: new ConnectionPositionPair({ |
||||
originX: "end", |
||||
originY: "bottom" |
||||
}, { |
||||
overlayX: "end", |
||||
overlayY: "top" |
||||
}), |
||||
left: new ConnectionPositionPair({ |
||||
originX: "start", |
||||
originY: "center" |
||||
}, { |
||||
overlayX: "end", |
||||
overlayY: "center" |
||||
}), |
||||
leftTop: new ConnectionPositionPair({ |
||||
originX: "start", |
||||
originY: "top" |
||||
}, { |
||||
overlayX: "end", |
||||
overlayY: "top" |
||||
}), |
||||
leftBottom: new ConnectionPositionPair({ |
||||
originX: "start", |
||||
originY: "bottom" |
||||
}, { |
||||
overlayX: "end", |
||||
overlayY: "bottom" |
||||
}) |
||||
}; |
||||
var DEFAULT_TOOLTIP_POSITIONS = [POSITION_MAP.top, POSITION_MAP.right, POSITION_MAP.bottom, POSITION_MAP.left]; |
||||
var DEFAULT_CASCADER_POSITIONS = [POSITION_MAP.bottomLeft, POSITION_MAP.bottomRight, POSITION_MAP.topLeft, POSITION_MAP.topRight, POSITION_MAP.topCenter, POSITION_MAP.bottomCenter]; |
||||
var DEFAULT_MENTION_TOP_POSITIONS = [new ConnectionPositionPair({ |
||||
originX: "start", |
||||
originY: "bottom" |
||||
}, { |
||||
overlayX: "start", |
||||
overlayY: "bottom" |
||||
}), new ConnectionPositionPair({ |
||||
originX: "start", |
||||
originY: "bottom" |
||||
}, { |
||||
overlayX: "end", |
||||
overlayY: "bottom" |
||||
})]; |
||||
var DEFAULT_MENTION_BOTTOM_POSITIONS = [POSITION_MAP.bottomLeft, new ConnectionPositionPair({ |
||||
originX: "start", |
||||
originY: "bottom" |
||||
}, { |
||||
overlayX: "end", |
||||
overlayY: "top" |
||||
})]; |
||||
function getPlacementName(position) { |
||||
for (const placement in POSITION_MAP) { |
||||
if (position.connectionPair.originX === POSITION_MAP[placement].originX && position.connectionPair.originY === POSITION_MAP[placement].originY && position.connectionPair.overlayX === POSITION_MAP[placement].overlayX && position.connectionPair.overlayY === POSITION_MAP[placement].overlayY) { |
||||
return placement; |
||||
} |
||||
} |
||||
return void 0; |
||||
} |
||||
var DATE_PICKER_POSITION_MAP = { |
||||
bottomLeft: new ConnectionPositionPair({ |
||||
originX: "start", |
||||
originY: "bottom" |
||||
}, { |
||||
overlayX: "start", |
||||
overlayY: "top" |
||||
}, void 0, 2), |
||||
topLeft: new ConnectionPositionPair({ |
||||
originX: "start", |
||||
originY: "top" |
||||
}, { |
||||
overlayX: "start", |
||||
overlayY: "bottom" |
||||
}, void 0, -2), |
||||
bottomRight: new ConnectionPositionPair({ |
||||
originX: "end", |
||||
originY: "bottom" |
||||
}, { |
||||
overlayX: "end", |
||||
overlayY: "top" |
||||
}, void 0, 2), |
||||
topRight: new ConnectionPositionPair({ |
||||
originX: "end", |
||||
originY: "top" |
||||
}, { |
||||
overlayX: "end", |
||||
overlayY: "bottom" |
||||
}, void 0, -2) |
||||
}; |
||||
var DEFAULT_DATE_PICKER_POSITIONS = [DATE_PICKER_POSITION_MAP.bottomLeft, DATE_PICKER_POSITION_MAP.topLeft, DATE_PICKER_POSITION_MAP.bottomRight, DATE_PICKER_POSITION_MAP.topRight]; |
||||
var _NzConnectedOverlayDirective = class _NzConnectedOverlayDirective { |
||||
constructor(cdkConnectedOverlay, nzDestroyService) { |
||||
this.cdkConnectedOverlay = cdkConnectedOverlay; |
||||
this.nzDestroyService = nzDestroyService; |
||||
this.nzArrowPointAtCenter = false; |
||||
this.cdkConnectedOverlay.backdropClass = "nz-overlay-transparent-backdrop"; |
||||
this.cdkConnectedOverlay.positionChange.pipe(takeUntil(this.nzDestroyService)).subscribe((position) => { |
||||
if (this.nzArrowPointAtCenter) { |
||||
this.updateArrowPosition(position); |
||||
} |
||||
}); |
||||
} |
||||
updateArrowPosition(position) { |
||||
const originRect = this.getOriginRect(); |
||||
const placement = getPlacementName(position); |
||||
let offsetX = 0; |
||||
let offsetY = 0; |
||||
if (placement === "topLeft" || placement === "bottomLeft") { |
||||
offsetX = originRect.width / 2 - 14; |
||||
} else if (placement === "topRight" || placement === "bottomRight") { |
||||
offsetX = -(originRect.width / 2 - 14); |
||||
} else if (placement === "leftTop" || placement === "rightTop") { |
||||
offsetY = originRect.height / 2 - 10; |
||||
} else if (placement === "leftBottom" || placement === "rightBottom") { |
||||
offsetY = -(originRect.height / 2 - 10); |
||||
} |
||||
if (this.cdkConnectedOverlay.offsetX !== offsetX || this.cdkConnectedOverlay.offsetY !== offsetY) { |
||||
this.cdkConnectedOverlay.offsetY = offsetY; |
||||
this.cdkConnectedOverlay.offsetX = offsetX; |
||||
this.cdkConnectedOverlay.overlayRef.updatePosition(); |
||||
} |
||||
} |
||||
getFlexibleConnectedPositionStrategyOrigin() { |
||||
if (this.cdkConnectedOverlay.origin instanceof CdkOverlayOrigin) { |
||||
return this.cdkConnectedOverlay.origin.elementRef; |
||||
} else { |
||||
return this.cdkConnectedOverlay.origin; |
||||
} |
||||
} |
||||
getOriginRect() { |
||||
const origin = this.getFlexibleConnectedPositionStrategyOrigin(); |
||||
if (origin instanceof ElementRef) { |
||||
return origin.nativeElement.getBoundingClientRect(); |
||||
} |
||||
if (origin instanceof Element) { |
||||
return origin.getBoundingClientRect(); |
||||
} |
||||
const width = origin.width || 0; |
||||
const height = origin.height || 0; |
||||
return { |
||||
top: origin.y, |
||||
bottom: origin.y + height, |
||||
left: origin.x, |
||||
right: origin.x + width, |
||||
height, |
||||
width |
||||
}; |
||||
} |
||||
}; |
||||
_NzConnectedOverlayDirective.ɵfac = function NzConnectedOverlayDirective_Factory(t) { |
||||
return new (t || _NzConnectedOverlayDirective)(ɵɵdirectiveInject(CdkConnectedOverlay), ɵɵdirectiveInject(NzDestroyService)); |
||||
}; |
||||
_NzConnectedOverlayDirective.ɵdir = ɵɵdefineDirective({ |
||||
type: _NzConnectedOverlayDirective, |
||||
selectors: [["", "cdkConnectedOverlay", "", "nzConnectedOverlay", ""]], |
||||
inputs: { |
||||
nzArrowPointAtCenter: "nzArrowPointAtCenter" |
||||
}, |
||||
exportAs: ["nzConnectedOverlay"], |
||||
features: [ɵɵProvidersFeature([NzDestroyService])] |
||||
}); |
||||
var NzConnectedOverlayDirective = _NzConnectedOverlayDirective; |
||||
__decorate([InputBoolean()], NzConnectedOverlayDirective.prototype, "nzArrowPointAtCenter", void 0); |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzConnectedOverlayDirective, [{ |
||||
type: Directive, |
||||
args: [{ |
||||
selector: "[cdkConnectedOverlay][nzConnectedOverlay]", |
||||
exportAs: "nzConnectedOverlay", |
||||
providers: [NzDestroyService] |
||||
}] |
||||
}], () => [{ |
||||
type: CdkConnectedOverlay |
||||
}, { |
||||
type: NzDestroyService |
||||
}], { |
||||
nzArrowPointAtCenter: [{ |
||||
type: Input |
||||
}] |
||||
}); |
||||
})(); |
||||
var _NzOverlayModule = class _NzOverlayModule { |
||||
}; |
||||
_NzOverlayModule.ɵfac = function NzOverlayModule_Factory(t) { |
||||
return new (t || _NzOverlayModule)(); |
||||
}; |
||||
_NzOverlayModule.ɵmod = ɵɵdefineNgModule({ |
||||
type: _NzOverlayModule, |
||||
declarations: [NzConnectedOverlayDirective], |
||||
exports: [NzConnectedOverlayDirective] |
||||
}); |
||||
_NzOverlayModule.ɵinj = ɵɵdefineInjector({}); |
||||
var NzOverlayModule = _NzOverlayModule; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzOverlayModule, [{ |
||||
type: NgModule, |
||||
args: [{ |
||||
declarations: [NzConnectedOverlayDirective], |
||||
exports: [NzConnectedOverlayDirective] |
||||
}] |
||||
}], null, null); |
||||
})(); |
||||
|
||||
export { |
||||
POSITION_MAP, |
||||
DEFAULT_TOOLTIP_POSITIONS, |
||||
getPlacementName, |
||||
NzConnectedOverlayDirective, |
||||
NzOverlayModule |
||||
}; |
||||
//# sourceMappingURL=chunk-6RXUTAFR.js.map
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -1,574 +0,0 @@ |
||||
import { |
||||
MediaMatcher |
||||
} from "./chunk-WB57DPWD.js"; |
||||
import { |
||||
Platform |
||||
} from "./chunk-IAC53GOD.js"; |
||||
import { |
||||
environment, |
||||
getEventPosition, |
||||
isTouchEvent |
||||
} from "./chunk-M5GY4FCO.js"; |
||||
import { |
||||
DOCUMENT |
||||
} from "./chunk-OSQBUYO6.js"; |
||||
import { |
||||
Inject, |
||||
Injectable, |
||||
NgZone, |
||||
RendererFactory2, |
||||
Subject, |
||||
auditTime, |
||||
distinctUntilChanged, |
||||
filter, |
||||
finalize, |
||||
map, |
||||
setClassMetadata, |
||||
startWith, |
||||
takeUntil, |
||||
ɵɵdefineInjectable, |
||||
ɵɵgetInheritedFactory, |
||||
ɵɵinject |
||||
} from "./chunk-FGESKT7O.js"; |
||||
|
||||
// node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-core-polyfill.mjs
|
||||
var availablePrefixes = ["moz", "ms", "webkit"]; |
||||
function requestAnimationFramePolyfill() { |
||||
let lastTime = 0; |
||||
return function(callback) { |
||||
const currTime = (/* @__PURE__ */ new Date()).getTime(); |
||||
const timeToCall = Math.max(0, 16 - (currTime - lastTime)); |
||||
const id = setTimeout(() => { |
||||
callback(currTime + timeToCall); |
||||
}, timeToCall); |
||||
lastTime = currTime + timeToCall; |
||||
return id; |
||||
}; |
||||
} |
||||
function getRequestAnimationFrame() { |
||||
if (typeof window === "undefined") { |
||||
return () => 0; |
||||
} |
||||
if (window.requestAnimationFrame) { |
||||
return window.requestAnimationFrame.bind(window); |
||||
} |
||||
const prefix = availablePrefixes.filter((key) => `${key}RequestAnimationFrame` in window)[0]; |
||||
return prefix ? window[`${prefix}RequestAnimationFrame`] : requestAnimationFramePolyfill(); |
||||
} |
||||
var reqAnimFrame = getRequestAnimationFrame(); |
||||
|
||||
// node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-core-services.mjs
|
||||
var NOOP = () => { |
||||
}; |
||||
var _NzResizeService = class _NzResizeService { |
||||
constructor(ngZone, rendererFactory2) { |
||||
this.ngZone = ngZone; |
||||
this.rendererFactory2 = rendererFactory2; |
||||
this.resizeSource$ = new Subject(); |
||||
this.listeners = 0; |
||||
this.disposeHandle = NOOP; |
||||
this.handler = () => { |
||||
this.ngZone.run(() => { |
||||
this.resizeSource$.next(); |
||||
}); |
||||
}; |
||||
this.renderer = this.rendererFactory2.createRenderer(null, null); |
||||
} |
||||
ngOnDestroy() { |
||||
this.handler = NOOP; |
||||
} |
||||
subscribe() { |
||||
this.registerListener(); |
||||
return this.resizeSource$.pipe(auditTime(16), finalize(() => this.unregisterListener())); |
||||
} |
||||
unsubscribe() { |
||||
this.unregisterListener(); |
||||
} |
||||
registerListener() { |
||||
if (this.listeners === 0) { |
||||
this.ngZone.runOutsideAngular(() => { |
||||
this.disposeHandle = this.renderer.listen("window", "resize", this.handler); |
||||
}); |
||||
} |
||||
this.listeners += 1; |
||||
} |
||||
unregisterListener() { |
||||
this.listeners -= 1; |
||||
if (this.listeners === 0) { |
||||
this.disposeHandle(); |
||||
this.disposeHandle = NOOP; |
||||
} |
||||
} |
||||
}; |
||||
_NzResizeService.ɵfac = function NzResizeService_Factory(t) { |
||||
return new (t || _NzResizeService)(ɵɵinject(NgZone), ɵɵinject(RendererFactory2)); |
||||
}; |
||||
_NzResizeService.ɵprov = ɵɵdefineInjectable({ |
||||
token: _NzResizeService, |
||||
factory: _NzResizeService.ɵfac, |
||||
providedIn: "root" |
||||
}); |
||||
var NzResizeService = _NzResizeService; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzResizeService, [{ |
||||
type: Injectable, |
||||
args: [{ |
||||
providedIn: "root" |
||||
}] |
||||
}], () => [{ |
||||
type: NgZone |
||||
}, { |
||||
type: RendererFactory2 |
||||
}], null); |
||||
})(); |
||||
var testSingleRegistry = /* @__PURE__ */ new Map(); |
||||
var _NzSingletonService = class _NzSingletonService { |
||||
constructor() { |
||||
this._singletonRegistry = /* @__PURE__ */ new Map(); |
||||
} |
||||
get singletonRegistry() { |
||||
return environment.isTestMode ? testSingleRegistry : this._singletonRegistry; |
||||
} |
||||
registerSingletonWithKey(key, target) { |
||||
const alreadyHave = this.singletonRegistry.has(key); |
||||
const item = alreadyHave ? this.singletonRegistry.get(key) : this.withNewTarget(target); |
||||
if (!alreadyHave) { |
||||
this.singletonRegistry.set(key, item); |
||||
} |
||||
} |
||||
unregisterSingletonWithKey(key) { |
||||
if (this.singletonRegistry.has(key)) { |
||||
this.singletonRegistry.delete(key); |
||||
} |
||||
} |
||||
getSingletonWithKey(key) { |
||||
return this.singletonRegistry.has(key) ? this.singletonRegistry.get(key).target : null; |
||||
} |
||||
withNewTarget(target) { |
||||
return { |
||||
target |
||||
}; |
||||
} |
||||
}; |
||||
_NzSingletonService.ɵfac = function NzSingletonService_Factory(t) { |
||||
return new (t || _NzSingletonService)(); |
||||
}; |
||||
_NzSingletonService.ɵprov = ɵɵdefineInjectable({ |
||||
token: _NzSingletonService, |
||||
factory: _NzSingletonService.ɵfac, |
||||
providedIn: "root" |
||||
}); |
||||
var NzSingletonService = _NzSingletonService; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzSingletonService, [{ |
||||
type: Injectable, |
||||
args: [{ |
||||
providedIn: "root" |
||||
}] |
||||
}], null, null); |
||||
})(); |
||||
function getPagePosition(event) { |
||||
const e = getEventPosition(event); |
||||
return { |
||||
x: e.pageX, |
||||
y: e.pageY |
||||
}; |
||||
} |
||||
var _NzDragService = class _NzDragService { |
||||
constructor(rendererFactory2) { |
||||
this.draggingThreshold = 5; |
||||
this.currentDraggingSequence = null; |
||||
this.currentStartingPoint = null; |
||||
this.handleRegistry = /* @__PURE__ */ new Set(); |
||||
this.renderer = rendererFactory2.createRenderer(null, null); |
||||
} |
||||
requestDraggingSequence(event) { |
||||
if (!this.handleRegistry.size) { |
||||
this.registerDraggingHandler(isTouchEvent(event)); |
||||
} |
||||
if (this.currentDraggingSequence) { |
||||
this.currentDraggingSequence.complete(); |
||||
} |
||||
this.currentStartingPoint = getPagePosition(event); |
||||
this.currentDraggingSequence = new Subject(); |
||||
return this.currentDraggingSequence.pipe(map((e) => ({ |
||||
x: e.pageX - this.currentStartingPoint.x, |
||||
y: e.pageY - this.currentStartingPoint.y |
||||
})), filter((e) => Math.abs(e.x) > this.draggingThreshold || Math.abs(e.y) > this.draggingThreshold), finalize(() => this.teardownDraggingSequence())); |
||||
} |
||||
registerDraggingHandler(isTouch) { |
||||
if (isTouch) { |
||||
this.handleRegistry.add({ |
||||
teardown: this.renderer.listen("document", "touchmove", (e) => { |
||||
if (this.currentDraggingSequence) { |
||||
this.currentDraggingSequence.next(e.touches[0] || e.changedTouches[0]); |
||||
} |
||||
}) |
||||
}); |
||||
this.handleRegistry.add({ |
||||
teardown: this.renderer.listen("document", "touchend", () => { |
||||
if (this.currentDraggingSequence) { |
||||
this.currentDraggingSequence.complete(); |
||||
} |
||||
}) |
||||
}); |
||||
} else { |
||||
this.handleRegistry.add({ |
||||
teardown: this.renderer.listen("document", "mousemove", (e) => { |
||||
if (this.currentDraggingSequence) { |
||||
this.currentDraggingSequence.next(e); |
||||
} |
||||
}) |
||||
}); |
||||
this.handleRegistry.add({ |
||||
teardown: this.renderer.listen("document", "mouseup", () => { |
||||
if (this.currentDraggingSequence) { |
||||
this.currentDraggingSequence.complete(); |
||||
} |
||||
}) |
||||
}); |
||||
} |
||||
} |
||||
teardownDraggingSequence() { |
||||
this.currentDraggingSequence = null; |
||||
} |
||||
}; |
||||
_NzDragService.ɵfac = function NzDragService_Factory(t) { |
||||
return new (t || _NzDragService)(ɵɵinject(RendererFactory2)); |
||||
}; |
||||
_NzDragService.ɵprov = ɵɵdefineInjectable({ |
||||
token: _NzDragService, |
||||
factory: _NzDragService.ɵfac, |
||||
providedIn: "root" |
||||
}); |
||||
var NzDragService = _NzDragService; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzDragService, [{ |
||||
type: Injectable, |
||||
args: [{ |
||||
providedIn: "root" |
||||
}] |
||||
}], () => [{ |
||||
type: RendererFactory2 |
||||
}], null); |
||||
})(); |
||||
function easeInOutCubic(t, b, c, d) { |
||||
const cc = c - b; |
||||
let tt = t / (d / 2); |
||||
if (tt < 1) { |
||||
return cc / 2 * tt * tt * tt + b; |
||||
} else { |
||||
return cc / 2 * ((tt -= 2) * tt * tt + 2) + b; |
||||
} |
||||
} |
||||
var _NzScrollService = class _NzScrollService { |
||||
constructor(ngZone, doc) { |
||||
this.ngZone = ngZone; |
||||
this.doc = doc; |
||||
} |
||||
/** Set the position of the scroll bar of `el`. */ |
||||
setScrollTop(el, topValue = 0) { |
||||
if (el === window) { |
||||
this.doc.body.scrollTop = topValue; |
||||
this.doc.documentElement.scrollTop = topValue; |
||||
} else { |
||||
el.scrollTop = topValue; |
||||
} |
||||
} |
||||
/** Get position of `el` against window. */ |
||||
getOffset(el) { |
||||
const ret = { |
||||
top: 0, |
||||
left: 0 |
||||
}; |
||||
if (!el || !el.getClientRects().length) { |
||||
return ret; |
||||
} |
||||
const rect = el.getBoundingClientRect(); |
||||
if (rect.width || rect.height) { |
||||
const doc = el.ownerDocument.documentElement; |
||||
ret.top = rect.top - doc.clientTop; |
||||
ret.left = rect.left - doc.clientLeft; |
||||
} else { |
||||
ret.top = rect.top; |
||||
ret.left = rect.left; |
||||
} |
||||
return ret; |
||||
} |
||||
/** Get the position of the scoll bar of `el`. */ |
||||
// TODO: remove '| Window' as the fallback already happens here
|
||||
getScroll(target, top = true) { |
||||
if (typeof window === "undefined") { |
||||
return 0; |
||||
} |
||||
const method = top ? "scrollTop" : "scrollLeft"; |
||||
let result = 0; |
||||
if (this.isWindow(target)) { |
||||
result = target[top ? "pageYOffset" : "pageXOffset"]; |
||||
} else if (target instanceof Document) { |
||||
result = target.documentElement[method]; |
||||
} else if (target) { |
||||
result = target[method]; |
||||
} |
||||
if (target && !this.isWindow(target) && typeof result !== "number") { |
||||
result = (target.ownerDocument || target).documentElement[method]; |
||||
} |
||||
return result; |
||||
} |
||||
isWindow(obj) { |
||||
return obj !== null && obj !== void 0 && obj === obj.window; |
||||
} |
||||
/** |
||||
* Scroll `el` to some position with animation. |
||||
* |
||||
* @param containerEl container, `window` by default |
||||
* @param y Scroll to `top`, 0 by default |
||||
*/ |
||||
scrollTo(containerEl, y = 0, options = {}) { |
||||
const target = containerEl ? containerEl : window; |
||||
const scrollTop = this.getScroll(target); |
||||
const startTime = Date.now(); |
||||
const { |
||||
easing, |
||||
callback, |
||||
duration = 450 |
||||
} = options; |
||||
const frameFunc = () => { |
||||
const timestamp = Date.now(); |
||||
const time = timestamp - startTime; |
||||
const nextScrollTop = (easing || easeInOutCubic)(time > duration ? duration : time, scrollTop, y, duration); |
||||
if (this.isWindow(target)) { |
||||
target.scrollTo(window.pageXOffset, nextScrollTop); |
||||
} else if (target instanceof HTMLDocument || target.constructor.name === "HTMLDocument") { |
||||
target.documentElement.scrollTop = nextScrollTop; |
||||
} else { |
||||
target.scrollTop = nextScrollTop; |
||||
} |
||||
if (time < duration) { |
||||
reqAnimFrame(frameFunc); |
||||
} else if (typeof callback === "function") { |
||||
this.ngZone.run(callback); |
||||
} |
||||
}; |
||||
this.ngZone.runOutsideAngular(() => reqAnimFrame(frameFunc)); |
||||
} |
||||
}; |
||||
_NzScrollService.ɵfac = function NzScrollService_Factory(t) { |
||||
return new (t || _NzScrollService)(ɵɵinject(NgZone), ɵɵinject(DOCUMENT)); |
||||
}; |
||||
_NzScrollService.ɵprov = ɵɵdefineInjectable({ |
||||
token: _NzScrollService, |
||||
factory: _NzScrollService.ɵfac, |
||||
providedIn: "root" |
||||
}); |
||||
var NzScrollService = _NzScrollService; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzScrollService, [{ |
||||
type: Injectable, |
||||
args: [{ |
||||
providedIn: "root" |
||||
}] |
||||
}], () => [{ |
||||
type: NgZone |
||||
}, { |
||||
type: void 0, |
||||
decorators: [{ |
||||
type: Inject, |
||||
args: [DOCUMENT] |
||||
}] |
||||
}], null); |
||||
})(); |
||||
var NzBreakpointEnum; |
||||
(function(NzBreakpointEnum2) { |
||||
NzBreakpointEnum2["xxl"] = "xxl"; |
||||
NzBreakpointEnum2["xl"] = "xl"; |
||||
NzBreakpointEnum2["lg"] = "lg"; |
||||
NzBreakpointEnum2["md"] = "md"; |
||||
NzBreakpointEnum2["sm"] = "sm"; |
||||
NzBreakpointEnum2["xs"] = "xs"; |
||||
})(NzBreakpointEnum || (NzBreakpointEnum = {})); |
||||
var gridResponsiveMap = { |
||||
xs: "(max-width: 575px)", |
||||
sm: "(min-width: 576px)", |
||||
md: "(min-width: 768px)", |
||||
lg: "(min-width: 992px)", |
||||
xl: "(min-width: 1200px)", |
||||
xxl: "(min-width: 1600px)" |
||||
}; |
||||
var siderResponsiveMap = { |
||||
xs: "(max-width: 479.98px)", |
||||
sm: "(max-width: 575.98px)", |
||||
md: "(max-width: 767.98px)", |
||||
lg: "(max-width: 991.98px)", |
||||
xl: "(max-width: 1199.98px)", |
||||
xxl: "(max-width: 1599.98px)" |
||||
}; |
||||
var _NzBreakpointService = class _NzBreakpointService { |
||||
constructor(resizeService, mediaMatcher) { |
||||
this.resizeService = resizeService; |
||||
this.mediaMatcher = mediaMatcher; |
||||
this.destroy$ = new Subject(); |
||||
this.resizeService.subscribe().pipe(takeUntil(this.destroy$)).subscribe(() => { |
||||
}); |
||||
} |
||||
ngOnDestroy() { |
||||
this.destroy$.next(); |
||||
} |
||||
subscribe(breakpointMap, fullMap) { |
||||
if (fullMap) { |
||||
const get = () => this.matchMedia(breakpointMap, true); |
||||
return this.resizeService.subscribe().pipe(map(get), startWith(get()), distinctUntilChanged((x, y) => x[0] === y[0]), map((x) => x[1])); |
||||
} else { |
||||
const get = () => this.matchMedia(breakpointMap); |
||||
return this.resizeService.subscribe().pipe(map(get), startWith(get()), distinctUntilChanged()); |
||||
} |
||||
} |
||||
matchMedia(breakpointMap, fullMap) { |
||||
let bp = NzBreakpointEnum.md; |
||||
const breakpointBooleanMap = {}; |
||||
Object.keys(breakpointMap).map((breakpoint) => { |
||||
const castBP = breakpoint; |
||||
const matched = this.mediaMatcher.matchMedia(gridResponsiveMap[castBP]).matches; |
||||
breakpointBooleanMap[breakpoint] = matched; |
||||
if (matched) { |
||||
bp = castBP; |
||||
} |
||||
}); |
||||
if (fullMap) { |
||||
return [bp, breakpointBooleanMap]; |
||||
} else { |
||||
return bp; |
||||
} |
||||
} |
||||
}; |
||||
_NzBreakpointService.ɵfac = function NzBreakpointService_Factory(t) { |
||||
return new (t || _NzBreakpointService)(ɵɵinject(NzResizeService), ɵɵinject(MediaMatcher)); |
||||
}; |
||||
_NzBreakpointService.ɵprov = ɵɵdefineInjectable({ |
||||
token: _NzBreakpointService, |
||||
factory: _NzBreakpointService.ɵfac, |
||||
providedIn: "root" |
||||
}); |
||||
var NzBreakpointService = _NzBreakpointService; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzBreakpointService, [{ |
||||
type: Injectable, |
||||
args: [{ |
||||
providedIn: "root" |
||||
}] |
||||
}], () => [{ |
||||
type: NzResizeService |
||||
}, { |
||||
type: MediaMatcher |
||||
}], null); |
||||
})(); |
||||
var _NzDestroyService = class _NzDestroyService extends Subject { |
||||
ngOnDestroy() { |
||||
this.next(); |
||||
this.complete(); |
||||
} |
||||
}; |
||||
_NzDestroyService.ɵfac = (() => { |
||||
let ɵNzDestroyService_BaseFactory; |
||||
return function NzDestroyService_Factory(t) { |
||||
return (ɵNzDestroyService_BaseFactory || (ɵNzDestroyService_BaseFactory = ɵɵgetInheritedFactory(_NzDestroyService)))(t || _NzDestroyService); |
||||
}; |
||||
})(); |
||||
_NzDestroyService.ɵprov = ɵɵdefineInjectable({ |
||||
token: _NzDestroyService, |
||||
factory: _NzDestroyService.ɵfac |
||||
}); |
||||
var NzDestroyService = _NzDestroyService; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzDestroyService, [{ |
||||
type: Injectable |
||||
}], null, null); |
||||
})(); |
||||
var _ImagePreloadService = class _ImagePreloadService { |
||||
constructor(document, platform) { |
||||
this.document = document; |
||||
this.platform = platform; |
||||
this.counter = /* @__PURE__ */ new Map(); |
||||
this.linkRefs = /* @__PURE__ */ new Map(); |
||||
} |
||||
addPreload(option) { |
||||
if (this.platform.isBrowser) { |
||||
return () => void 0; |
||||
} |
||||
const uniqueKey = `${option.src}${option.srcset}`; |
||||
let currentCount = this.counter.get(uniqueKey) || 0; |
||||
currentCount++; |
||||
this.counter.set(uniqueKey, currentCount); |
||||
if (!this.linkRefs.has(uniqueKey)) { |
||||
const linkNode = this.appendPreloadLink(option); |
||||
this.linkRefs.set(uniqueKey, linkNode); |
||||
} |
||||
return () => { |
||||
if (this.counter.has(uniqueKey)) { |
||||
let count = this.counter.get(uniqueKey); |
||||
count--; |
||||
if (count === 0) { |
||||
const linkNode = this.linkRefs.get(uniqueKey); |
||||
this.removePreloadLink(linkNode); |
||||
this.counter.delete(uniqueKey); |
||||
this.linkRefs.delete(uniqueKey); |
||||
} else { |
||||
this.counter.set(uniqueKey, count); |
||||
} |
||||
} |
||||
}; |
||||
} |
||||
appendPreloadLink(option) { |
||||
const linkNode = this.document.createElement("link"); |
||||
linkNode.setAttribute("rel", "preload"); |
||||
linkNode.setAttribute("as", "image"); |
||||
linkNode.setAttribute("href", option.src); |
||||
if (option.srcset) { |
||||
linkNode.setAttribute("imagesrcset", option.srcset); |
||||
} |
||||
this.document.head.appendChild(linkNode); |
||||
return linkNode; |
||||
} |
||||
removePreloadLink(linkNode) { |
||||
if (this.document.head.contains(linkNode)) { |
||||
this.document.head.removeChild(linkNode); |
||||
} |
||||
} |
||||
}; |
||||
_ImagePreloadService.ɵfac = function ImagePreloadService_Factory(t) { |
||||
return new (t || _ImagePreloadService)(ɵɵinject(DOCUMENT), ɵɵinject(Platform)); |
||||
}; |
||||
_ImagePreloadService.ɵprov = ɵɵdefineInjectable({ |
||||
token: _ImagePreloadService, |
||||
factory: _ImagePreloadService.ɵfac, |
||||
providedIn: "root" |
||||
}); |
||||
var ImagePreloadService = _ImagePreloadService; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ImagePreloadService, [{ |
||||
type: Injectable, |
||||
args: [{ |
||||
providedIn: "root" |
||||
}] |
||||
}], () => [{ |
||||
type: void 0, |
||||
decorators: [{ |
||||
type: Inject, |
||||
args: [DOCUMENT] |
||||
}] |
||||
}, { |
||||
type: Platform |
||||
}], null); |
||||
})(); |
||||
|
||||
export { |
||||
reqAnimFrame, |
||||
NzResizeService, |
||||
NzSingletonService, |
||||
NzDragService, |
||||
gridResponsiveMap, |
||||
siderResponsiveMap, |
||||
NzBreakpointService, |
||||
NzDestroyService |
||||
}; |
||||
//# sourceMappingURL=chunk-D5ODNR6D.js.map
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -1,191 +0,0 @@ |
||||
import { |
||||
NzIconDirective, |
||||
NzIconModule |
||||
} from "./chunk-VWMHIMW7.js"; |
||||
import { |
||||
CommonModule, |
||||
NgIf |
||||
} from "./chunk-OSQBUYO6.js"; |
||||
import { |
||||
BehaviorSubject, |
||||
ChangeDetectionStrategy, |
||||
ChangeDetectorRef, |
||||
Component, |
||||
Injectable, |
||||
Input, |
||||
NgModule, |
||||
ReplaySubject, |
||||
ViewEncapsulation$1, |
||||
setClassMetadata, |
||||
ɵɵNgOnChangesFeature, |
||||
ɵɵclassProp, |
||||
ɵɵdefineComponent, |
||||
ɵɵdefineInjectable, |
||||
ɵɵdefineInjector, |
||||
ɵɵdefineNgModule, |
||||
ɵɵdirectiveInject, |
||||
ɵɵelement, |
||||
ɵɵnextContext, |
||||
ɵɵproperty, |
||||
ɵɵtemplate |
||||
} from "./chunk-FGESKT7O.js"; |
||||
|
||||
// node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-core-form.mjs
|
||||
function NzFormItemFeedbackIconComponent_span_0_Template(rf, ctx) { |
||||
if (rf & 1) { |
||||
ɵɵelement(0, "span", 1); |
||||
} |
||||
if (rf & 2) { |
||||
const ctx_r0 = ɵɵnextContext(); |
||||
ɵɵproperty("nzType", ctx_r0.iconType); |
||||
} |
||||
} |
||||
var _NzFormStatusService = class _NzFormStatusService { |
||||
constructor() { |
||||
this.formStatusChanges = new ReplaySubject(1); |
||||
} |
||||
}; |
||||
_NzFormStatusService.ɵfac = function NzFormStatusService_Factory(t) { |
||||
return new (t || _NzFormStatusService)(); |
||||
}; |
||||
_NzFormStatusService.ɵprov = ɵɵdefineInjectable({ |
||||
token: _NzFormStatusService, |
||||
factory: _NzFormStatusService.ɵfac |
||||
}); |
||||
var NzFormStatusService = _NzFormStatusService; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzFormStatusService, [{ |
||||
type: Injectable |
||||
}], null, null); |
||||
})(); |
||||
var _NzFormNoStatusService = class _NzFormNoStatusService { |
||||
constructor() { |
||||
this.noFormStatus = new BehaviorSubject(false); |
||||
} |
||||
}; |
||||
_NzFormNoStatusService.ɵfac = function NzFormNoStatusService_Factory(t) { |
||||
return new (t || _NzFormNoStatusService)(); |
||||
}; |
||||
_NzFormNoStatusService.ɵprov = ɵɵdefineInjectable({ |
||||
token: _NzFormNoStatusService, |
||||
factory: _NzFormNoStatusService.ɵfac |
||||
}); |
||||
var NzFormNoStatusService = _NzFormNoStatusService; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzFormNoStatusService, [{ |
||||
type: Injectable |
||||
}], null, null); |
||||
})(); |
||||
var iconTypeMap = { |
||||
error: "close-circle-fill", |
||||
validating: "loading", |
||||
success: "check-circle-fill", |
||||
warning: "exclamation-circle-fill" |
||||
}; |
||||
var _NzFormItemFeedbackIconComponent = class _NzFormItemFeedbackIconComponent { |
||||
constructor(cdr) { |
||||
this.cdr = cdr; |
||||
this.status = ""; |
||||
this.iconType = null; |
||||
} |
||||
ngOnChanges(_changes) { |
||||
this.updateIcon(); |
||||
} |
||||
updateIcon() { |
||||
this.iconType = this.status ? iconTypeMap[this.status] : null; |
||||
this.cdr.markForCheck(); |
||||
} |
||||
}; |
||||
_NzFormItemFeedbackIconComponent.ɵfac = function NzFormItemFeedbackIconComponent_Factory(t) { |
||||
return new (t || _NzFormItemFeedbackIconComponent)(ɵɵdirectiveInject(ChangeDetectorRef)); |
||||
}; |
||||
_NzFormItemFeedbackIconComponent.ɵcmp = ɵɵdefineComponent({ |
||||
type: _NzFormItemFeedbackIconComponent, |
||||
selectors: [["nz-form-item-feedback-icon"]], |
||||
hostAttrs: [1, "ant-form-item-feedback-icon"], |
||||
hostVars: 8, |
||||
hostBindings: function NzFormItemFeedbackIconComponent_HostBindings(rf, ctx) { |
||||
if (rf & 2) { |
||||
ɵɵclassProp("ant-form-item-feedback-icon-error", ctx.status === "error")("ant-form-item-feedback-icon-warning", ctx.status === "warning")("ant-form-item-feedback-icon-success", ctx.status === "success")("ant-form-item-feedback-icon-validating", ctx.status === "validating"); |
||||
} |
||||
}, |
||||
inputs: { |
||||
status: "status" |
||||
}, |
||||
exportAs: ["nzFormFeedbackIcon"], |
||||
features: [ɵɵNgOnChangesFeature], |
||||
decls: 1, |
||||
vars: 1, |
||||
consts: [["nz-icon", "", 3, "nzType", 4, "ngIf"], ["nz-icon", "", 3, "nzType"]], |
||||
template: function NzFormItemFeedbackIconComponent_Template(rf, ctx) { |
||||
if (rf & 1) { |
||||
ɵɵtemplate(0, NzFormItemFeedbackIconComponent_span_0_Template, 1, 1, "span", 0); |
||||
} |
||||
if (rf & 2) { |
||||
ɵɵproperty("ngIf", ctx.iconType); |
||||
} |
||||
}, |
||||
dependencies: [NgIf, NzIconDirective], |
||||
encapsulation: 2, |
||||
changeDetection: 0 |
||||
}); |
||||
var NzFormItemFeedbackIconComponent = _NzFormItemFeedbackIconComponent; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzFormItemFeedbackIconComponent, [{ |
||||
type: Component, |
||||
args: [{ |
||||
selector: "nz-form-item-feedback-icon", |
||||
exportAs: "nzFormFeedbackIcon", |
||||
preserveWhitespaces: false, |
||||
encapsulation: ViewEncapsulation$1.None, |
||||
changeDetection: ChangeDetectionStrategy.OnPush, |
||||
template: ` <span *ngIf="iconType" nz-icon [nzType]="iconType"></span> `, |
||||
host: { |
||||
class: "ant-form-item-feedback-icon", |
||||
"[class.ant-form-item-feedback-icon-error]": 'status==="error"', |
||||
"[class.ant-form-item-feedback-icon-warning]": 'status==="warning"', |
||||
"[class.ant-form-item-feedback-icon-success]": 'status==="success"', |
||||
"[class.ant-form-item-feedback-icon-validating]": 'status==="validating"' |
||||
} |
||||
}] |
||||
}], () => [{ |
||||
type: ChangeDetectorRef |
||||
}], { |
||||
status: [{ |
||||
type: Input |
||||
}] |
||||
}); |
||||
})(); |
||||
var _NzFormPatchModule = class _NzFormPatchModule { |
||||
}; |
||||
_NzFormPatchModule.ɵfac = function NzFormPatchModule_Factory(t) { |
||||
return new (t || _NzFormPatchModule)(); |
||||
}; |
||||
_NzFormPatchModule.ɵmod = ɵɵdefineNgModule({ |
||||
type: _NzFormPatchModule, |
||||
declarations: [NzFormItemFeedbackIconComponent], |
||||
imports: [CommonModule, NzIconModule], |
||||
exports: [NzFormItemFeedbackIconComponent] |
||||
}); |
||||
_NzFormPatchModule.ɵinj = ɵɵdefineInjector({ |
||||
imports: [CommonModule, NzIconModule] |
||||
}); |
||||
var NzFormPatchModule = _NzFormPatchModule; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzFormPatchModule, [{ |
||||
type: NgModule, |
||||
args: [{ |
||||
imports: [CommonModule, NzIconModule], |
||||
exports: [NzFormItemFeedbackIconComponent], |
||||
declarations: [NzFormItemFeedbackIconComponent] |
||||
}] |
||||
}], null, null); |
||||
})(); |
||||
|
||||
export { |
||||
NzFormStatusService, |
||||
NzFormNoStatusService, |
||||
NzFormItemFeedbackIconComponent, |
||||
NzFormPatchModule |
||||
}; |
||||
//# sourceMappingURL=chunk-FGZVIKKA.js.map
|
File diff suppressed because one or more lines are too long
@ -1,760 +0,0 @@ |
||||
import { |
||||
NzIconDirective, |
||||
NzIconModule |
||||
} from "./chunk-VWMHIMW7.js"; |
||||
import { |
||||
NzConfigService, |
||||
WithConfig |
||||
} from "./chunk-ZHMJ6SNN.js"; |
||||
import { |
||||
Directionality |
||||
} from "./chunk-6NZ2BEBG.js"; |
||||
import { |
||||
Platform |
||||
} from "./chunk-IAC53GOD.js"; |
||||
import { |
||||
InputBoolean |
||||
} from "./chunk-M5GY4FCO.js"; |
||||
import { |
||||
NgIf |
||||
} from "./chunk-OSQBUYO6.js"; |
||||
import { |
||||
ANIMATION_MODULE_TYPE, |
||||
CSP_NONCE, |
||||
ChangeDetectionStrategy, |
||||
ChangeDetectorRef, |
||||
Component, |
||||
ContentChild, |
||||
Directive, |
||||
ElementRef, |
||||
Inject, |
||||
InjectionToken, |
||||
Input, |
||||
NgModule, |
||||
NgZone, |
||||
Optional, |
||||
PLATFORM_ID, |
||||
Renderer2, |
||||
Subject, |
||||
ViewEncapsulation$1, |
||||
__decorate, |
||||
filter, |
||||
fromEvent, |
||||
makeEnvironmentProviders, |
||||
setClassMetadata, |
||||
startWith, |
||||
takeUntil, |
||||
ɵɵNgOnChangesFeature, |
||||
ɵɵStandaloneFeature, |
||||
ɵɵattribute, |
||||
ɵɵclassProp, |
||||
ɵɵcontentQuery, |
||||
ɵɵdefineComponent, |
||||
ɵɵdefineDirective, |
||||
ɵɵdefineInjector, |
||||
ɵɵdefineNgModule, |
||||
ɵɵdirectiveInject, |
||||
ɵɵelement, |
||||
ɵɵloadQuery, |
||||
ɵɵprojection, |
||||
ɵɵprojectionDef, |
||||
ɵɵproperty, |
||||
ɵɵqueryRefresh, |
||||
ɵɵtemplate |
||||
} from "./chunk-FGESKT7O.js"; |
||||
|
||||
// node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-core-transition-patch.mjs
|
||||
var _NzTransitionPatchDirective = class _NzTransitionPatchDirective { |
||||
setHiddenAttribute() { |
||||
if (this.hidden) { |
||||
if (typeof this.hidden === "string") { |
||||
this.renderer.setAttribute(this.elementRef.nativeElement, "hidden", this.hidden); |
||||
} else { |
||||
this.renderer.setAttribute(this.elementRef.nativeElement, "hidden", ""); |
||||
} |
||||
} else { |
||||
this.renderer.removeAttribute(this.elementRef.nativeElement, "hidden"); |
||||
} |
||||
} |
||||
constructor(elementRef, renderer) { |
||||
this.elementRef = elementRef; |
||||
this.renderer = renderer; |
||||
this.hidden = null; |
||||
this.renderer.setAttribute(this.elementRef.nativeElement, "hidden", ""); |
||||
} |
||||
ngOnChanges() { |
||||
this.setHiddenAttribute(); |
||||
} |
||||
ngAfterViewInit() { |
||||
this.setHiddenAttribute(); |
||||
} |
||||
}; |
||||
_NzTransitionPatchDirective.ɵfac = function NzTransitionPatchDirective_Factory(t) { |
||||
return new (t || _NzTransitionPatchDirective)(ɵɵdirectiveInject(ElementRef), ɵɵdirectiveInject(Renderer2)); |
||||
}; |
||||
_NzTransitionPatchDirective.ɵdir = ɵɵdefineDirective({ |
||||
type: _NzTransitionPatchDirective, |
||||
selectors: [["", "nz-button", ""], ["nz-button-group"], ["", "nz-icon", ""], ["", "nz-menu-item", ""], ["", "nz-submenu", ""], ["nz-select-top-control"], ["nz-select-placeholder"], ["nz-input-group"]], |
||||
inputs: { |
||||
hidden: "hidden" |
||||
}, |
||||
standalone: true, |
||||
features: [ɵɵNgOnChangesFeature] |
||||
}); |
||||
var NzTransitionPatchDirective = _NzTransitionPatchDirective; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzTransitionPatchDirective, [{ |
||||
type: Directive, |
||||
args: [{ |
||||
selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", |
||||
standalone: true |
||||
}] |
||||
}], () => [{ |
||||
type: ElementRef |
||||
}, { |
||||
type: Renderer2 |
||||
}], { |
||||
hidden: [{ |
||||
type: Input |
||||
}] |
||||
}); |
||||
})(); |
||||
var _NzTransitionPatchModule = class _NzTransitionPatchModule { |
||||
}; |
||||
_NzTransitionPatchModule.ɵfac = function NzTransitionPatchModule_Factory(t) { |
||||
return new (t || _NzTransitionPatchModule)(); |
||||
}; |
||||
_NzTransitionPatchModule.ɵmod = ɵɵdefineNgModule({ |
||||
type: _NzTransitionPatchModule, |
||||
imports: [NzTransitionPatchDirective], |
||||
exports: [NzTransitionPatchDirective] |
||||
}); |
||||
_NzTransitionPatchModule.ɵinj = ɵɵdefineInjector({}); |
||||
var NzTransitionPatchModule = _NzTransitionPatchModule; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzTransitionPatchModule, [{ |
||||
type: NgModule, |
||||
args: [{ |
||||
imports: [NzTransitionPatchDirective], |
||||
exports: [NzTransitionPatchDirective] |
||||
}] |
||||
}], null, null); |
||||
})(); |
||||
|
||||
// node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-core-wave.mjs
|
||||
var NzWaveRenderer = class { |
||||
get waveAttributeName() { |
||||
return this.insertExtraNode ? "ant-click-animating" : "ant-click-animating-without-extra-node"; |
||||
} |
||||
constructor(triggerElement, ngZone, insertExtraNode, platformId, cspNonce) { |
||||
this.triggerElement = triggerElement; |
||||
this.ngZone = ngZone; |
||||
this.insertExtraNode = insertExtraNode; |
||||
this.platformId = platformId; |
||||
this.cspNonce = cspNonce; |
||||
this.waveTransitionDuration = 400; |
||||
this.styleForPseudo = null; |
||||
this.extraNode = null; |
||||
this.lastTime = 0; |
||||
this.onClick = (event) => { |
||||
if (!this.triggerElement || !this.triggerElement.getAttribute || this.triggerElement.getAttribute("disabled") || event.target.tagName === "INPUT" || this.triggerElement.className.indexOf("disabled") >= 0) { |
||||
return; |
||||
} |
||||
this.fadeOutWave(); |
||||
}; |
||||
this.platform = new Platform(this.platformId); |
||||
this.clickHandler = this.onClick.bind(this); |
||||
this.bindTriggerEvent(); |
||||
} |
||||
bindTriggerEvent() { |
||||
if (this.platform.isBrowser) { |
||||
this.ngZone.runOutsideAngular(() => { |
||||
this.removeTriggerEvent(); |
||||
if (this.triggerElement) { |
||||
this.triggerElement.addEventListener("click", this.clickHandler, true); |
||||
} |
||||
}); |
||||
} |
||||
} |
||||
removeTriggerEvent() { |
||||
if (this.triggerElement) { |
||||
this.triggerElement.removeEventListener("click", this.clickHandler, true); |
||||
} |
||||
} |
||||
removeStyleAndExtraNode() { |
||||
if (this.styleForPseudo && document.body.contains(this.styleForPseudo)) { |
||||
document.body.removeChild(this.styleForPseudo); |
||||
this.styleForPseudo = null; |
||||
} |
||||
if (this.insertExtraNode && this.triggerElement.contains(this.extraNode)) { |
||||
this.triggerElement.removeChild(this.extraNode); |
||||
} |
||||
} |
||||
destroy() { |
||||
this.removeTriggerEvent(); |
||||
this.removeStyleAndExtraNode(); |
||||
} |
||||
fadeOutWave() { |
||||
const node = this.triggerElement; |
||||
const waveColor = this.getWaveColor(node); |
||||
node.setAttribute(this.waveAttributeName, "true"); |
||||
if (Date.now() < this.lastTime + this.waveTransitionDuration) { |
||||
return; |
||||
} |
||||
if (this.isValidColor(waveColor)) { |
||||
if (!this.styleForPseudo) { |
||||
this.styleForPseudo = document.createElement("style"); |
||||
if (this.cspNonce) { |
||||
this.styleForPseudo.nonce = this.cspNonce; |
||||
} |
||||
} |
||||
this.styleForPseudo.innerHTML = ` |
||||
[ant-click-animating-without-extra-node='true']::after, .ant-click-animating-node { |
||||
--antd-wave-shadow-color: ${waveColor}; |
||||
}`;
|
||||
document.body.appendChild(this.styleForPseudo); |
||||
} |
||||
if (this.insertExtraNode) { |
||||
if (!this.extraNode) { |
||||
this.extraNode = document.createElement("div"); |
||||
} |
||||
this.extraNode.className = "ant-click-animating-node"; |
||||
node.appendChild(this.extraNode); |
||||
} |
||||
this.lastTime = Date.now(); |
||||
this.runTimeoutOutsideZone(() => { |
||||
node.removeAttribute(this.waveAttributeName); |
||||
this.removeStyleAndExtraNode(); |
||||
}, this.waveTransitionDuration); |
||||
} |
||||
isValidColor(color) { |
||||
return !!color && color !== "#ffffff" && color !== "rgb(255, 255, 255)" && this.isNotGrey(color) && !/rgba\(\d*, \d*, \d*, 0\)/.test(color) && color !== "transparent"; |
||||
} |
||||
isNotGrey(color) { |
||||
const match = color.match(/rgba?\((\d*), (\d*), (\d*)(, [\.\d]*)?\)/); |
||||
if (match && match[1] && match[2] && match[3]) { |
||||
return !(match[1] === match[2] && match[2] === match[3]); |
||||
} |
||||
return true; |
||||
} |
||||
getWaveColor(node) { |
||||
const nodeStyle = getComputedStyle(node); |
||||
return nodeStyle.getPropertyValue("border-top-color") || // Firefox Compatible
|
||||
nodeStyle.getPropertyValue("border-color") || nodeStyle.getPropertyValue("background-color"); |
||||
} |
||||
runTimeoutOutsideZone(fn, delay) { |
||||
this.ngZone.runOutsideAngular(() => setTimeout(fn, delay)); |
||||
} |
||||
}; |
||||
var NZ_WAVE_GLOBAL_DEFAULT_CONFIG = { |
||||
disabled: false |
||||
}; |
||||
var NZ_WAVE_GLOBAL_CONFIG = new InjectionToken("nz-wave-global-options"); |
||||
function provideNzWave(config) { |
||||
return makeEnvironmentProviders([{ |
||||
provide: NZ_WAVE_GLOBAL_CONFIG, |
||||
useValue: config |
||||
}]); |
||||
} |
||||
var _NzWaveDirective = class _NzWaveDirective { |
||||
get disabled() { |
||||
return this.waveDisabled; |
||||
} |
||||
get rendererRef() { |
||||
return this.waveRenderer; |
||||
} |
||||
constructor(ngZone, elementRef, config, animationType, platformId, cspNonce) { |
||||
this.ngZone = ngZone; |
||||
this.elementRef = elementRef; |
||||
this.config = config; |
||||
this.animationType = animationType; |
||||
this.platformId = platformId; |
||||
this.cspNonce = cspNonce; |
||||
this.nzWaveExtraNode = false; |
||||
this.waveDisabled = false; |
||||
this.waveDisabled = this.isConfigDisabled(); |
||||
} |
||||
isConfigDisabled() { |
||||
let disabled = false; |
||||
if (this.config && typeof this.config.disabled === "boolean") { |
||||
disabled = this.config.disabled; |
||||
} |
||||
if (this.animationType === "NoopAnimations") { |
||||
disabled = true; |
||||
} |
||||
return disabled; |
||||
} |
||||
ngOnDestroy() { |
||||
if (this.waveRenderer) { |
||||
this.waveRenderer.destroy(); |
||||
} |
||||
} |
||||
ngOnInit() { |
||||
this.renderWaveIfEnabled(); |
||||
} |
||||
renderWaveIfEnabled() { |
||||
if (!this.waveDisabled && this.elementRef.nativeElement) { |
||||
this.waveRenderer = new NzWaveRenderer(this.elementRef.nativeElement, this.ngZone, this.nzWaveExtraNode, this.platformId, this.cspNonce); |
||||
} |
||||
} |
||||
disable() { |
||||
this.waveDisabled = true; |
||||
if (this.waveRenderer) { |
||||
this.waveRenderer.removeTriggerEvent(); |
||||
this.waveRenderer.removeStyleAndExtraNode(); |
||||
} |
||||
} |
||||
enable() { |
||||
this.waveDisabled = this.isConfigDisabled() || false; |
||||
if (this.waveRenderer) { |
||||
this.waveRenderer.bindTriggerEvent(); |
||||
} |
||||
} |
||||
}; |
||||
_NzWaveDirective.ɵfac = function NzWaveDirective_Factory(t) { |
||||
return new (t || _NzWaveDirective)(ɵɵdirectiveInject(NgZone), ɵɵdirectiveInject(ElementRef), ɵɵdirectiveInject(NZ_WAVE_GLOBAL_CONFIG, 8), ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8), ɵɵdirectiveInject(PLATFORM_ID), ɵɵdirectiveInject(CSP_NONCE, 8)); |
||||
}; |
||||
_NzWaveDirective.ɵdir = ɵɵdefineDirective({ |
||||
type: _NzWaveDirective, |
||||
selectors: [["", "nz-wave", ""], ["button", "nz-button", "", 3, "nzType", "link", 3, "nzType", "text"]], |
||||
inputs: { |
||||
nzWaveExtraNode: "nzWaveExtraNode" |
||||
}, |
||||
exportAs: ["nzWave"], |
||||
standalone: true |
||||
}); |
||||
var NzWaveDirective = _NzWaveDirective; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzWaveDirective, [{ |
||||
type: Directive, |
||||
args: [{ |
||||
selector: '[nz-wave],button[nz-button]:not([nzType="link"]):not([nzType="text"])', |
||||
exportAs: "nzWave", |
||||
standalone: true |
||||
}] |
||||
}], () => [{ |
||||
type: NgZone |
||||
}, { |
||||
type: ElementRef |
||||
}, { |
||||
type: void 0, |
||||
decorators: [{ |
||||
type: Optional |
||||
}, { |
||||
type: Inject, |
||||
args: [NZ_WAVE_GLOBAL_CONFIG] |
||||
}] |
||||
}, { |
||||
type: void 0, |
||||
decorators: [{ |
||||
type: Optional |
||||
}, { |
||||
type: Inject, |
||||
args: [ANIMATION_MODULE_TYPE] |
||||
}] |
||||
}, { |
||||
type: void 0, |
||||
decorators: [{ |
||||
type: Inject, |
||||
args: [PLATFORM_ID] |
||||
}] |
||||
}, { |
||||
type: void 0, |
||||
decorators: [{ |
||||
type: Optional |
||||
}, { |
||||
type: Inject, |
||||
args: [CSP_NONCE] |
||||
}] |
||||
}], { |
||||
nzWaveExtraNode: [{ |
||||
type: Input |
||||
}] |
||||
}); |
||||
})(); |
||||
var _NzWaveModule = class _NzWaveModule { |
||||
}; |
||||
_NzWaveModule.ɵfac = function NzWaveModule_Factory(t) { |
||||
return new (t || _NzWaveModule)(); |
||||
}; |
||||
_NzWaveModule.ɵmod = ɵɵdefineNgModule({ |
||||
type: _NzWaveModule, |
||||
imports: [NzWaveDirective], |
||||
exports: [NzWaveDirective] |
||||
}); |
||||
_NzWaveModule.ɵinj = ɵɵdefineInjector({ |
||||
providers: [provideNzWave(NZ_WAVE_GLOBAL_DEFAULT_CONFIG)] |
||||
}); |
||||
var NzWaveModule = _NzWaveModule; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzWaveModule, [{ |
||||
type: NgModule, |
||||
args: [{ |
||||
imports: [NzWaveDirective], |
||||
exports: [NzWaveDirective], |
||||
providers: [provideNzWave(NZ_WAVE_GLOBAL_DEFAULT_CONFIG)] |
||||
}] |
||||
}], null, null); |
||||
})(); |
||||
|
||||
// node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-button.mjs
|
||||
var _c0 = ["nz-button", ""]; |
||||
function NzButtonComponent_span_0_Template(rf, ctx) { |
||||
if (rf & 1) { |
||||
ɵɵelement(0, "span", 1); |
||||
} |
||||
} |
||||
var _c1 = ["*"]; |
||||
var NZ_CONFIG_MODULE_NAME = "button"; |
||||
var _NzButtonComponent = class _NzButtonComponent { |
||||
insertSpan(nodes, renderer) { |
||||
nodes.forEach((node) => { |
||||
if (node.nodeName === "#text") { |
||||
const span = renderer.createElement("span"); |
||||
const parent = renderer.parentNode(node); |
||||
renderer.insertBefore(parent, span, node); |
||||
renderer.appendChild(span, node); |
||||
} |
||||
}); |
||||
} |
||||
get iconOnly() { |
||||
const listOfNode = Array.from(this.elementRef?.nativeElement?.childNodes || []); |
||||
const noText = listOfNode.every((node) => node.nodeName !== "#text"); |
||||
const noSpan = listOfNode.filter((node) => { |
||||
return !(node.nodeName === "#comment" || !!node?.attributes?.getNamedItem("nz-icon")); |
||||
}).length == 0; |
||||
const isIconOnly = !!this.nzIconDirectiveElement && noSpan && noText; |
||||
return isIconOnly; |
||||
} |
||||
constructor(ngZone, elementRef, cdr, renderer, nzConfigService, directionality) { |
||||
this.ngZone = ngZone; |
||||
this.elementRef = elementRef; |
||||
this.cdr = cdr; |
||||
this.renderer = renderer; |
||||
this.nzConfigService = nzConfigService; |
||||
this.directionality = directionality; |
||||
this._nzModuleName = NZ_CONFIG_MODULE_NAME; |
||||
this.nzBlock = false; |
||||
this.nzGhost = false; |
||||
this.nzSearch = false; |
||||
this.nzLoading = false; |
||||
this.nzDanger = false; |
||||
this.disabled = false; |
||||
this.tabIndex = null; |
||||
this.nzType = null; |
||||
this.nzShape = null; |
||||
this.nzSize = "default"; |
||||
this.dir = "ltr"; |
||||
this.destroy$ = new Subject(); |
||||
this.loading$ = new Subject(); |
||||
this.nzConfigService.getConfigChangeEventForComponent(NZ_CONFIG_MODULE_NAME).pipe(takeUntil(this.destroy$)).subscribe(() => { |
||||
this.cdr.markForCheck(); |
||||
}); |
||||
} |
||||
ngOnInit() { |
||||
this.directionality.change?.pipe(takeUntil(this.destroy$)).subscribe((direction) => { |
||||
this.dir = direction; |
||||
this.cdr.detectChanges(); |
||||
}); |
||||
this.dir = this.directionality.value; |
||||
this.ngZone.runOutsideAngular(() => { |
||||
fromEvent(this.elementRef.nativeElement, "click", { |
||||
capture: true |
||||
}).pipe(takeUntil(this.destroy$)).subscribe((event) => { |
||||
if (this.disabled && event.target?.tagName === "A" || this.nzLoading) { |
||||
event.preventDefault(); |
||||
event.stopImmediatePropagation(); |
||||
} |
||||
}); |
||||
}); |
||||
} |
||||
ngOnChanges(changes) { |
||||
const { |
||||
nzLoading |
||||
} = changes; |
||||
if (nzLoading) { |
||||
this.loading$.next(this.nzLoading); |
||||
} |
||||
} |
||||
ngAfterViewInit() { |
||||
this.insertSpan(this.elementRef.nativeElement.childNodes, this.renderer); |
||||
} |
||||
ngAfterContentInit() { |
||||
this.loading$.pipe(startWith(this.nzLoading), filter(() => !!this.nzIconDirectiveElement), takeUntil(this.destroy$)).subscribe((loading) => { |
||||
const nativeElement = this.nzIconDirectiveElement.nativeElement; |
||||
if (loading) { |
||||
this.renderer.setStyle(nativeElement, "display", "none"); |
||||
} else { |
||||
this.renderer.removeStyle(nativeElement, "display"); |
||||
} |
||||
}); |
||||
} |
||||
ngOnDestroy() { |
||||
this.destroy$.next(); |
||||
this.destroy$.complete(); |
||||
} |
||||
}; |
||||
_NzButtonComponent.ɵfac = function NzButtonComponent_Factory(t) { |
||||
return new (t || _NzButtonComponent)(ɵɵdirectiveInject(NgZone), ɵɵdirectiveInject(ElementRef), ɵɵdirectiveInject(ChangeDetectorRef), ɵɵdirectiveInject(Renderer2), ɵɵdirectiveInject(NzConfigService), ɵɵdirectiveInject(Directionality, 8)); |
||||
}; |
||||
_NzButtonComponent.ɵcmp = ɵɵdefineComponent({ |
||||
type: _NzButtonComponent, |
||||
selectors: [["button", "nz-button", ""], ["a", "nz-button", ""]], |
||||
contentQueries: function NzButtonComponent_ContentQueries(rf, ctx, dirIndex) { |
||||
if (rf & 1) { |
||||
ɵɵcontentQuery(dirIndex, NzIconDirective, 5, ElementRef); |
||||
} |
||||
if (rf & 2) { |
||||
let _t; |
||||
ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.nzIconDirectiveElement = _t.first); |
||||
} |
||||
}, |
||||
hostAttrs: [1, "ant-btn"], |
||||
hostVars: 32, |
||||
hostBindings: function NzButtonComponent_HostBindings(rf, ctx) { |
||||
if (rf & 2) { |
||||
ɵɵattribute("tabindex", ctx.disabled ? -1 : ctx.tabIndex === null ? null : ctx.tabIndex)("disabled", ctx.disabled || null); |
||||
ɵɵclassProp("ant-btn-primary", ctx.nzType === "primary")("ant-btn-dashed", ctx.nzType === "dashed")("ant-btn-link", ctx.nzType === "link")("ant-btn-text", ctx.nzType === "text")("ant-btn-circle", ctx.nzShape === "circle")("ant-btn-round", ctx.nzShape === "round")("ant-btn-lg", ctx.nzSize === "large")("ant-btn-sm", ctx.nzSize === "small")("ant-btn-dangerous", ctx.nzDanger)("ant-btn-loading", ctx.nzLoading)("ant-btn-background-ghost", ctx.nzGhost)("ant-btn-block", ctx.nzBlock)("ant-input-search-button", ctx.nzSearch)("ant-btn-rtl", ctx.dir === "rtl")("ant-btn-icon-only", ctx.iconOnly); |
||||
} |
||||
}, |
||||
inputs: { |
||||
nzBlock: "nzBlock", |
||||
nzGhost: "nzGhost", |
||||
nzSearch: "nzSearch", |
||||
nzLoading: "nzLoading", |
||||
nzDanger: "nzDanger", |
||||
disabled: "disabled", |
||||
tabIndex: "tabIndex", |
||||
nzType: "nzType", |
||||
nzShape: "nzShape", |
||||
nzSize: "nzSize" |
||||
}, |
||||
exportAs: ["nzButton"], |
||||
standalone: true, |
||||
features: [ɵɵNgOnChangesFeature, ɵɵStandaloneFeature], |
||||
attrs: _c0, |
||||
ngContentSelectors: _c1, |
||||
decls: 2, |
||||
vars: 1, |
||||
consts: [["nz-icon", "", "nzType", "loading", 4, "ngIf"], ["nz-icon", "", "nzType", "loading"]], |
||||
template: function NzButtonComponent_Template(rf, ctx) { |
||||
if (rf & 1) { |
||||
ɵɵprojectionDef(); |
||||
ɵɵtemplate(0, NzButtonComponent_span_0_Template, 1, 0, "span", 0); |
||||
ɵɵprojection(1); |
||||
} |
||||
if (rf & 2) { |
||||
ɵɵproperty("ngIf", ctx.nzLoading); |
||||
} |
||||
}, |
||||
dependencies: [NzIconModule, NzIconDirective, NgIf], |
||||
encapsulation: 2, |
||||
changeDetection: 0 |
||||
}); |
||||
var NzButtonComponent = _NzButtonComponent; |
||||
__decorate([InputBoolean()], NzButtonComponent.prototype, "nzBlock", void 0); |
||||
__decorate([InputBoolean()], NzButtonComponent.prototype, "nzGhost", void 0); |
||||
__decorate([InputBoolean()], NzButtonComponent.prototype, "nzSearch", void 0); |
||||
__decorate([InputBoolean()], NzButtonComponent.prototype, "nzLoading", void 0); |
||||
__decorate([InputBoolean()], NzButtonComponent.prototype, "nzDanger", void 0); |
||||
__decorate([InputBoolean()], NzButtonComponent.prototype, "disabled", void 0); |
||||
__decorate([WithConfig()], NzButtonComponent.prototype, "nzSize", void 0); |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzButtonComponent, [{ |
||||
type: Component, |
||||
args: [{ |
||||
selector: "button[nz-button], a[nz-button]", |
||||
exportAs: "nzButton", |
||||
preserveWhitespaces: false, |
||||
changeDetection: ChangeDetectionStrategy.OnPush, |
||||
encapsulation: ViewEncapsulation$1.None, |
||||
template: ` |
||||
<span nz-icon nzType="loading" *ngIf="nzLoading"></span> |
||||
<ng-content></ng-content> |
||||
`,
|
||||
host: { |
||||
class: "ant-btn", |
||||
"[class.ant-btn-primary]": `nzType === 'primary'`, |
||||
"[class.ant-btn-dashed]": `nzType === 'dashed'`, |
||||
"[class.ant-btn-link]": `nzType === 'link'`, |
||||
"[class.ant-btn-text]": `nzType === 'text'`, |
||||
"[class.ant-btn-circle]": `nzShape === 'circle'`, |
||||
"[class.ant-btn-round]": `nzShape === 'round'`, |
||||
"[class.ant-btn-lg]": `nzSize === 'large'`, |
||||
"[class.ant-btn-sm]": `nzSize === 'small'`, |
||||
"[class.ant-btn-dangerous]": `nzDanger`, |
||||
"[class.ant-btn-loading]": `nzLoading`, |
||||
"[class.ant-btn-background-ghost]": `nzGhost`, |
||||
"[class.ant-btn-block]": `nzBlock`, |
||||
"[class.ant-input-search-button]": `nzSearch`, |
||||
"[class.ant-btn-rtl]": `dir === 'rtl'`, |
||||
"[class.ant-btn-icon-only]": `iconOnly`, |
||||
"[attr.tabindex]": "disabled ? -1 : (tabIndex === null ? null : tabIndex)", |
||||
"[attr.disabled]": "disabled || null" |
||||
}, |
||||
imports: [NzIconModule, NgIf], |
||||
standalone: true |
||||
}] |
||||
}], () => [{ |
||||
type: NgZone |
||||
}, { |
||||
type: ElementRef |
||||
}, { |
||||
type: ChangeDetectorRef |
||||
}, { |
||||
type: Renderer2 |
||||
}, { |
||||
type: NzConfigService |
||||
}, { |
||||
type: Directionality, |
||||
decorators: [{ |
||||
type: Optional |
||||
}] |
||||
}], { |
||||
nzIconDirectiveElement: [{ |
||||
type: ContentChild, |
||||
args: [NzIconDirective, { |
||||
read: ElementRef |
||||
}] |
||||
}], |
||||
nzBlock: [{ |
||||
type: Input |
||||
}], |
||||
nzGhost: [{ |
||||
type: Input |
||||
}], |
||||
nzSearch: [{ |
||||
type: Input |
||||
}], |
||||
nzLoading: [{ |
||||
type: Input |
||||
}], |
||||
nzDanger: [{ |
||||
type: Input |
||||
}], |
||||
disabled: [{ |
||||
type: Input |
||||
}], |
||||
tabIndex: [{ |
||||
type: Input |
||||
}], |
||||
nzType: [{ |
||||
type: Input |
||||
}], |
||||
nzShape: [{ |
||||
type: Input |
||||
}], |
||||
nzSize: [{ |
||||
type: Input |
||||
}] |
||||
}); |
||||
})(); |
||||
var _NzButtonGroupComponent = class _NzButtonGroupComponent { |
||||
constructor(directionality) { |
||||
this.directionality = directionality; |
||||
this.nzSize = "default"; |
||||
this.dir = "ltr"; |
||||
this.destroy$ = new Subject(); |
||||
} |
||||
ngOnInit() { |
||||
this.dir = this.directionality.value; |
||||
this.directionality.change?.pipe(takeUntil(this.destroy$)).subscribe((direction) => { |
||||
this.dir = direction; |
||||
}); |
||||
} |
||||
ngOnDestroy() { |
||||
this.destroy$.next(); |
||||
this.destroy$.complete(); |
||||
} |
||||
}; |
||||
_NzButtonGroupComponent.ɵfac = function NzButtonGroupComponent_Factory(t) { |
||||
return new (t || _NzButtonGroupComponent)(ɵɵdirectiveInject(Directionality, 8)); |
||||
}; |
||||
_NzButtonGroupComponent.ɵcmp = ɵɵdefineComponent({ |
||||
type: _NzButtonGroupComponent, |
||||
selectors: [["nz-button-group"]], |
||||
hostAttrs: [1, "ant-btn-group"], |
||||
hostVars: 6, |
||||
hostBindings: function NzButtonGroupComponent_HostBindings(rf, ctx) { |
||||
if (rf & 2) { |
||||
ɵɵclassProp("ant-btn-group-lg", ctx.nzSize === "large")("ant-btn-group-sm", ctx.nzSize === "small")("ant-btn-group-rtl", ctx.dir === "rtl"); |
||||
} |
||||
}, |
||||
inputs: { |
||||
nzSize: "nzSize" |
||||
}, |
||||
exportAs: ["nzButtonGroup"], |
||||
standalone: true, |
||||
features: [ɵɵStandaloneFeature], |
||||
ngContentSelectors: _c1, |
||||
decls: 1, |
||||
vars: 0, |
||||
template: function NzButtonGroupComponent_Template(rf, ctx) { |
||||
if (rf & 1) { |
||||
ɵɵprojectionDef(); |
||||
ɵɵprojection(0); |
||||
} |
||||
}, |
||||
encapsulation: 2, |
||||
changeDetection: 0 |
||||
}); |
||||
var NzButtonGroupComponent = _NzButtonGroupComponent; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzButtonGroupComponent, [{ |
||||
type: Component, |
||||
args: [{ |
||||
selector: "nz-button-group", |
||||
exportAs: "nzButtonGroup", |
||||
changeDetection: ChangeDetectionStrategy.OnPush, |
||||
encapsulation: ViewEncapsulation$1.None, |
||||
host: { |
||||
class: "ant-btn-group", |
||||
"[class.ant-btn-group-lg]": `nzSize === 'large'`, |
||||
"[class.ant-btn-group-sm]": `nzSize === 'small'`, |
||||
"[class.ant-btn-group-rtl]": `dir === 'rtl'` |
||||
}, |
||||
preserveWhitespaces: false, |
||||
template: ` <ng-content></ng-content> `, |
||||
standalone: true |
||||
}] |
||||
}], () => [{ |
||||
type: Directionality, |
||||
decorators: [{ |
||||
type: Optional |
||||
}] |
||||
}], { |
||||
nzSize: [{ |
||||
type: Input |
||||
}] |
||||
}); |
||||
})(); |
||||
var _NzButtonModule = class _NzButtonModule { |
||||
}; |
||||
_NzButtonModule.ɵfac = function NzButtonModule_Factory(t) { |
||||
return new (t || _NzButtonModule)(); |
||||
}; |
||||
_NzButtonModule.ɵmod = ɵɵdefineNgModule({ |
||||
type: _NzButtonModule, |
||||
imports: [NzButtonComponent, NzButtonGroupComponent], |
||||
exports: [NzButtonComponent, NzButtonGroupComponent, NzTransitionPatchModule, NzWaveModule] |
||||
}); |
||||
_NzButtonModule.ɵinj = ɵɵdefineInjector({ |
||||
imports: [NzButtonComponent, NzTransitionPatchModule, NzWaveModule] |
||||
}); |
||||
var NzButtonModule = _NzButtonModule; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzButtonModule, [{ |
||||
type: NgModule, |
||||
args: [{ |
||||
imports: [NzButtonComponent, NzButtonGroupComponent], |
||||
exports: [NzButtonComponent, NzButtonGroupComponent, NzTransitionPatchModule, NzWaveModule] |
||||
}] |
||||
}], null, null); |
||||
})(); |
||||
|
||||
export { |
||||
NzButtonComponent, |
||||
NzButtonGroupComponent, |
||||
NzButtonModule |
||||
}; |
||||
//# sourceMappingURL=chunk-KMGBCF4T.js.map
|
File diff suppressed because one or more lines are too long
@ -1,275 +0,0 @@ |
||||
import { |
||||
ElementRef, |
||||
Subject, |
||||
from, |
||||
isDevMode, |
||||
isObservable, |
||||
of, |
||||
take |
||||
} from "./chunk-FGESKT7O.js"; |
||||
|
||||
// node_modules/@angular/cdk/fesm2022/coercion.mjs
|
||||
function coerceBooleanProperty(value) { |
||||
return value != null && `${value}` !== "false"; |
||||
} |
||||
function coerceNumberProperty(value, fallbackValue = 0) { |
||||
return _isNumberValue(value) ? Number(value) : fallbackValue; |
||||
} |
||||
function _isNumberValue(value) { |
||||
return !isNaN(parseFloat(value)) && !isNaN(Number(value)); |
||||
} |
||||
function coerceArray(value) { |
||||
return Array.isArray(value) ? value : [value]; |
||||
} |
||||
function coerceCssPixelValue(value) { |
||||
if (value == null) { |
||||
return ""; |
||||
} |
||||
return typeof value === "string" ? value : `${value}px`; |
||||
} |
||||
function coerceElement(elementOrRef) { |
||||
return elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef; |
||||
} |
||||
|
||||
// node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-core-environments.mjs
|
||||
var environment = { |
||||
isTestMode: false |
||||
}; |
||||
|
||||
// node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-core-logger.mjs
|
||||
var record = {}; |
||||
var PREFIX = "[NG-ZORRO]:"; |
||||
function notRecorded(...args) { |
||||
const asRecord = args.reduce((acc, c) => acc + c.toString(), ""); |
||||
if (record[asRecord]) { |
||||
return false; |
||||
} else { |
||||
record[asRecord] = true; |
||||
return true; |
||||
} |
||||
} |
||||
function consoleCommonBehavior(consoleFunc, ...args) { |
||||
if (environment.isTestMode || isDevMode() && notRecorded(...args)) { |
||||
consoleFunc(...args); |
||||
} |
||||
} |
||||
var warn = (...args) => consoleCommonBehavior((...arg) => console.warn(PREFIX, ...arg), ...args); |
||||
|
||||
// node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-core-util.mjs
|
||||
function arraysEqual(array1, array2) { |
||||
if (!array1 || !array2 || array1.length !== array2.length) { |
||||
return false; |
||||
} |
||||
const len = array1.length; |
||||
for (let i = 0; i < len; i++) { |
||||
if (array1[i] !== array2[i]) { |
||||
return false; |
||||
} |
||||
} |
||||
return true; |
||||
} |
||||
function isNotNil(value) { |
||||
return typeof value !== "undefined" && value !== null; |
||||
} |
||||
function isNil(value) { |
||||
return typeof value === "undefined" || value === null; |
||||
} |
||||
function toBoolean(value) { |
||||
return coerceBooleanProperty(value); |
||||
} |
||||
function toNumber(value, fallbackValue = 0) { |
||||
return _isNumberValue(value) ? Number(value) : fallbackValue; |
||||
} |
||||
function toCssPixel(value) { |
||||
return coerceCssPixelValue(value); |
||||
} |
||||
function propDecoratorFactory(name, fallback) { |
||||
function propDecorator(target, propName, originalDescriptor) { |
||||
const privatePropName = `$$__zorroPropDecorator__${propName}`; |
||||
if (Object.prototype.hasOwnProperty.call(target, privatePropName)) { |
||||
warn(`The prop "${privatePropName}" is already exist, it will be overrided by ${name} decorator.`); |
||||
} |
||||
Object.defineProperty(target, privatePropName, { |
||||
configurable: true, |
||||
writable: true |
||||
}); |
||||
return { |
||||
get() { |
||||
return originalDescriptor && originalDescriptor.get ? originalDescriptor.get.bind(this)() : this[privatePropName]; |
||||
}, |
||||
set(value) { |
||||
if (originalDescriptor && originalDescriptor.set) { |
||||
originalDescriptor.set.bind(this)(fallback(value)); |
||||
} |
||||
this[privatePropName] = fallback(value); |
||||
} |
||||
}; |
||||
} |
||||
return propDecorator; |
||||
} |
||||
function InputBoolean() { |
||||
return propDecoratorFactory("InputBoolean", toBoolean); |
||||
} |
||||
function InputNumber(fallbackValue) { |
||||
return propDecoratorFactory("InputNumber", (value) => toNumber(value, fallbackValue)); |
||||
} |
||||
function silentEvent(e) { |
||||
e.stopPropagation(); |
||||
e.preventDefault(); |
||||
} |
||||
function getElementOffset(elem) { |
||||
if (!elem.getClientRects().length) { |
||||
return { top: 0, left: 0 }; |
||||
} |
||||
const rect = elem.getBoundingClientRect(); |
||||
const win = elem.ownerDocument.defaultView; |
||||
return { |
||||
top: rect.top + win.pageYOffset, |
||||
left: rect.left + win.pageXOffset |
||||
}; |
||||
} |
||||
function isTouchEvent(event) { |
||||
return event.type.startsWith("touch"); |
||||
} |
||||
function getEventPosition(event) { |
||||
return isTouchEvent(event) ? event.touches[0] || event.changedTouches[0] : event; |
||||
} |
||||
function isPromise(obj) { |
||||
return !!obj && typeof obj.then === "function" && typeof obj.catch === "function"; |
||||
} |
||||
function getPercent(min, max, value) { |
||||
return (value - min) / (max - min) * 100; |
||||
} |
||||
function getPrecision(num) { |
||||
const numStr = num.toString(); |
||||
const dotIndex = numStr.indexOf("."); |
||||
return dotIndex >= 0 ? numStr.length - dotIndex - 1 : 0; |
||||
} |
||||
function ensureNumberInRange(num, min, max) { |
||||
if (isNaN(num) || num < min) { |
||||
return min; |
||||
} else if (num > max) { |
||||
return max; |
||||
} else { |
||||
return num; |
||||
} |
||||
} |
||||
var isBrowser = typeof window !== "undefined"; |
||||
var isFirefox = isBrowser && window.mozInnerScreenX != null; |
||||
function inNextTick() { |
||||
const timer = new Subject(); |
||||
Promise.resolve().then(() => timer.next()); |
||||
return timer.pipe(take(1)); |
||||
} |
||||
function wrapIntoObservable(value) { |
||||
if (isObservable(value)) { |
||||
return value; |
||||
} |
||||
if (isPromise(value)) { |
||||
return from(Promise.resolve(value)); |
||||
} |
||||
return of(value); |
||||
} |
||||
function canUseDom() { |
||||
return !!(typeof window !== "undefined" && window.document && window.document.createElement); |
||||
} |
||||
var MARK_KEY = `rc-util-key`; |
||||
function getMark({ mark } = {}) { |
||||
if (mark) { |
||||
return mark.startsWith("data-") ? mark : `data-${mark}`; |
||||
} |
||||
return MARK_KEY; |
||||
} |
||||
function getContainer(option) { |
||||
if (option.attachTo) { |
||||
return option.attachTo; |
||||
} |
||||
const head = document.querySelector("head"); |
||||
return head || document.body; |
||||
} |
||||
function injectCSS(css, options = {}) { |
||||
if (!canUseDom()) { |
||||
return null; |
||||
} |
||||
const styleNode = document.createElement("style"); |
||||
if (options.cspNonce) { |
||||
styleNode.nonce = options.cspNonce; |
||||
} |
||||
styleNode.innerHTML = css; |
||||
const container = getContainer(options); |
||||
const { firstChild } = container; |
||||
if (options.prepend && container.prepend) { |
||||
container.prepend(styleNode); |
||||
} else if (options.prepend && firstChild) { |
||||
container.insertBefore(styleNode, firstChild); |
||||
} else { |
||||
container.appendChild(styleNode); |
||||
} |
||||
return styleNode; |
||||
} |
||||
var containerCache = /* @__PURE__ */ new Map(); |
||||
function findExistNode(key, option = {}) { |
||||
const container = getContainer(option); |
||||
return Array.from(containerCache.get(container)?.children || []).find((node) => node.tagName === "STYLE" && node.getAttribute(getMark(option)) === key); |
||||
} |
||||
function updateCSS(css, key, options = {}) { |
||||
const container = getContainer(options); |
||||
if (!containerCache.has(container)) { |
||||
const placeholderStyle = injectCSS("", options); |
||||
const { parentNode } = placeholderStyle; |
||||
containerCache.set(container, parentNode); |
||||
parentNode.removeChild(placeholderStyle); |
||||
} |
||||
const existNode = findExistNode(key, options); |
||||
if (existNode) { |
||||
if (options.cspNonce && existNode.nonce !== options.cspNonce) { |
||||
existNode.nonce = options.cspNonce; |
||||
} |
||||
if (existNode.innerHTML !== css) { |
||||
existNode.innerHTML = css; |
||||
} |
||||
return existNode; |
||||
} |
||||
const newNode = injectCSS(css, options); |
||||
newNode?.setAttribute(getMark(options), key); |
||||
return newNode; |
||||
} |
||||
function getStatusClassNames(prefixCls, status, hasFeedback) { |
||||
return { |
||||
[`${prefixCls}-status-success`]: status === "success", |
||||
[`${prefixCls}-status-warning`]: status === "warning", |
||||
[`${prefixCls}-status-error`]: status === "error", |
||||
[`${prefixCls}-status-validating`]: status === "validating", |
||||
[`${prefixCls}-has-feedback`]: hasFeedback |
||||
}; |
||||
} |
||||
|
||||
export { |
||||
coerceNumberProperty, |
||||
coerceArray, |
||||
coerceCssPixelValue, |
||||
coerceElement, |
||||
environment, |
||||
PREFIX, |
||||
warn, |
||||
arraysEqual, |
||||
isNotNil, |
||||
isNil, |
||||
toBoolean, |
||||
toCssPixel, |
||||
InputBoolean, |
||||
InputNumber, |
||||
silentEvent, |
||||
getElementOffset, |
||||
isTouchEvent, |
||||
getEventPosition, |
||||
getPercent, |
||||
getPrecision, |
||||
ensureNumberInRange, |
||||
inNextTick, |
||||
wrapIntoObservable, |
||||
canUseDom, |
||||
updateCSS, |
||||
getStatusClassNames |
||||
}; |
||||
//# sourceMappingURL=chunk-M5GY4FCO.js.map
|
File diff suppressed because one or more lines are too long
@ -1,430 +0,0 @@ |
||||
import { |
||||
NzBreakpointService, |
||||
gridResponsiveMap |
||||
} from "./chunk-D5ODNR6D.js"; |
||||
import { |
||||
MediaMatcher |
||||
} from "./chunk-WB57DPWD.js"; |
||||
import { |
||||
Directionality |
||||
} from "./chunk-6NZ2BEBG.js"; |
||||
import { |
||||
Platform |
||||
} from "./chunk-IAC53GOD.js"; |
||||
import { |
||||
isNotNil |
||||
} from "./chunk-M5GY4FCO.js"; |
||||
import { |
||||
Directive, |
||||
ElementRef, |
||||
Host, |
||||
Input, |
||||
NgModule, |
||||
NgZone, |
||||
Optional, |
||||
Renderer2, |
||||
ReplaySubject, |
||||
Subject, |
||||
setClassMetadata, |
||||
takeUntil, |
||||
ɵɵNgOnChangesFeature, |
||||
ɵɵclassProp, |
||||
ɵɵdefineDirective, |
||||
ɵɵdefineInjector, |
||||
ɵɵdefineNgModule, |
||||
ɵɵdirectiveInject, |
||||
ɵɵstyleProp |
||||
} from "./chunk-FGESKT7O.js"; |
||||
import { |
||||
__spreadValues |
||||
} from "./chunk-HSNDBVJ3.js"; |
||||
|
||||
// node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-grid.mjs
|
||||
var _NzRowDirective = class _NzRowDirective { |
||||
getGutter() { |
||||
const results = [null, null]; |
||||
const gutter = this.nzGutter || 0; |
||||
const normalizedGutter = Array.isArray(gutter) ? gutter : [gutter, null]; |
||||
normalizedGutter.forEach((g, index) => { |
||||
if (typeof g === "object" && g !== null) { |
||||
results[index] = null; |
||||
Object.keys(gridResponsiveMap).map((screen) => { |
||||
const bp = screen; |
||||
if (this.mediaMatcher.matchMedia(gridResponsiveMap[bp]).matches && g[bp]) { |
||||
results[index] = g[bp]; |
||||
} |
||||
}); |
||||
} else { |
||||
results[index] = Number(g) || null; |
||||
} |
||||
}); |
||||
return results; |
||||
} |
||||
setGutterStyle() { |
||||
const [horizontalGutter, verticalGutter] = this.getGutter(); |
||||
this.actualGutter$.next([horizontalGutter, verticalGutter]); |
||||
const renderGutter = (name, gutter) => { |
||||
const nativeElement = this.elementRef.nativeElement; |
||||
if (gutter !== null) { |
||||
this.renderer.setStyle(nativeElement, name, `-${gutter / 2}px`); |
||||
} |
||||
}; |
||||
renderGutter("margin-left", horizontalGutter); |
||||
renderGutter("margin-right", horizontalGutter); |
||||
renderGutter("margin-top", verticalGutter); |
||||
renderGutter("margin-bottom", verticalGutter); |
||||
} |
||||
constructor(elementRef, renderer, mediaMatcher, ngZone, platform, breakpointService, directionality) { |
||||
this.elementRef = elementRef; |
||||
this.renderer = renderer; |
||||
this.mediaMatcher = mediaMatcher; |
||||
this.ngZone = ngZone; |
||||
this.platform = platform; |
||||
this.breakpointService = breakpointService; |
||||
this.directionality = directionality; |
||||
this.nzAlign = null; |
||||
this.nzJustify = null; |
||||
this.nzGutter = null; |
||||
this.actualGutter$ = new ReplaySubject(1); |
||||
this.dir = "ltr"; |
||||
this.destroy$ = new Subject(); |
||||
} |
||||
ngOnInit() { |
||||
this.dir = this.directionality.value; |
||||
this.directionality.change?.pipe(takeUntil(this.destroy$)).subscribe((direction) => { |
||||
this.dir = direction; |
||||
}); |
||||
this.setGutterStyle(); |
||||
} |
||||
ngOnChanges(changes) { |
||||
if (changes.nzGutter) { |
||||
this.setGutterStyle(); |
||||
} |
||||
} |
||||
ngAfterViewInit() { |
||||
if (this.platform.isBrowser) { |
||||
this.breakpointService.subscribe(gridResponsiveMap).pipe(takeUntil(this.destroy$)).subscribe(() => { |
||||
this.setGutterStyle(); |
||||
}); |
||||
} |
||||
} |
||||
ngOnDestroy() { |
||||
this.destroy$.next(true); |
||||
this.destroy$.complete(); |
||||
} |
||||
}; |
||||
_NzRowDirective.ɵfac = function NzRowDirective_Factory(t) { |
||||
return new (t || _NzRowDirective)(ɵɵdirectiveInject(ElementRef), ɵɵdirectiveInject(Renderer2), ɵɵdirectiveInject(MediaMatcher), ɵɵdirectiveInject(NgZone), ɵɵdirectiveInject(Platform), ɵɵdirectiveInject(NzBreakpointService), ɵɵdirectiveInject(Directionality, 8)); |
||||
}; |
||||
_NzRowDirective.ɵdir = ɵɵdefineDirective({ |
||||
type: _NzRowDirective, |
||||
selectors: [["", "nz-row", ""], ["nz-row"], ["nz-form-item"]], |
||||
hostAttrs: [1, "ant-row"], |
||||
hostVars: 20, |
||||
hostBindings: function NzRowDirective_HostBindings(rf, ctx) { |
||||
if (rf & 2) { |
||||
ɵɵclassProp("ant-row-top", ctx.nzAlign === "top")("ant-row-middle", ctx.nzAlign === "middle")("ant-row-bottom", ctx.nzAlign === "bottom")("ant-row-start", ctx.nzJustify === "start")("ant-row-end", ctx.nzJustify === "end")("ant-row-center", ctx.nzJustify === "center")("ant-row-space-around", ctx.nzJustify === "space-around")("ant-row-space-between", ctx.nzJustify === "space-between")("ant-row-space-evenly", ctx.nzJustify === "space-evenly")("ant-row-rtl", ctx.dir === "rtl"); |
||||
} |
||||
}, |
||||
inputs: { |
||||
nzAlign: "nzAlign", |
||||
nzJustify: "nzJustify", |
||||
nzGutter: "nzGutter" |
||||
}, |
||||
exportAs: ["nzRow"], |
||||
standalone: true, |
||||
features: [ɵɵNgOnChangesFeature] |
||||
}); |
||||
var NzRowDirective = _NzRowDirective; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzRowDirective, [{ |
||||
type: Directive, |
||||
args: [{ |
||||
selector: "[nz-row],nz-row,nz-form-item", |
||||
exportAs: "nzRow", |
||||
host: { |
||||
class: "ant-row", |
||||
"[class.ant-row-top]": `nzAlign === 'top'`, |
||||
"[class.ant-row-middle]": `nzAlign === 'middle'`, |
||||
"[class.ant-row-bottom]": `nzAlign === 'bottom'`, |
||||
"[class.ant-row-start]": `nzJustify === 'start'`, |
||||
"[class.ant-row-end]": `nzJustify === 'end'`, |
||||
"[class.ant-row-center]": `nzJustify === 'center'`, |
||||
"[class.ant-row-space-around]": `nzJustify === 'space-around'`, |
||||
"[class.ant-row-space-between]": `nzJustify === 'space-between'`, |
||||
"[class.ant-row-space-evenly]": `nzJustify === 'space-evenly'`, |
||||
"[class.ant-row-rtl]": `dir === "rtl"` |
||||
}, |
||||
standalone: true |
||||
}] |
||||
}], () => [{ |
||||
type: ElementRef |
||||
}, { |
||||
type: Renderer2 |
||||
}, { |
||||
type: MediaMatcher |
||||
}, { |
||||
type: NgZone |
||||
}, { |
||||
type: Platform |
||||
}, { |
||||
type: NzBreakpointService |
||||
}, { |
||||
type: Directionality, |
||||
decorators: [{ |
||||
type: Optional |
||||
}] |
||||
}], { |
||||
nzAlign: [{ |
||||
type: Input |
||||
}], |
||||
nzJustify: [{ |
||||
type: Input |
||||
}], |
||||
nzGutter: [{ |
||||
type: Input |
||||
}] |
||||
}); |
||||
})(); |
||||
var _NzColDirective = class _NzColDirective { |
||||
setHostClassMap() { |
||||
const hostClassMap = __spreadValues({ |
||||
["ant-col"]: true, |
||||
[`ant-col-${this.nzSpan}`]: isNotNil(this.nzSpan), |
||||
[`ant-col-order-${this.nzOrder}`]: isNotNil(this.nzOrder), |
||||
[`ant-col-offset-${this.nzOffset}`]: isNotNil(this.nzOffset), |
||||
[`ant-col-pull-${this.nzPull}`]: isNotNil(this.nzPull), |
||||
[`ant-col-push-${this.nzPush}`]: isNotNil(this.nzPush), |
||||
["ant-col-rtl"]: this.dir === "rtl" |
||||
}, this.generateClass()); |
||||
for (const i in this.classMap) { |
||||
if (this.classMap.hasOwnProperty(i)) { |
||||
this.renderer.removeClass(this.elementRef.nativeElement, i); |
||||
} |
||||
} |
||||
this.classMap = __spreadValues({}, hostClassMap); |
||||
for (const i in this.classMap) { |
||||
if (this.classMap.hasOwnProperty(i) && this.classMap[i]) { |
||||
this.renderer.addClass(this.elementRef.nativeElement, i); |
||||
} |
||||
} |
||||
} |
||||
setHostFlexStyle() { |
||||
this.hostFlexStyle = this.parseFlex(this.nzFlex); |
||||
} |
||||
parseFlex(flex) { |
||||
if (typeof flex === "number") { |
||||
return `${flex} ${flex} auto`; |
||||
} else if (typeof flex === "string") { |
||||
if (/^\d+(\.\d+)?(px|em|rem|%)$/.test(flex)) { |
||||
return `0 0 ${flex}`; |
||||
} |
||||
} |
||||
return flex; |
||||
} |
||||
generateClass() { |
||||
const listOfSizeInputName = ["nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"]; |
||||
const listClassMap = {}; |
||||
listOfSizeInputName.forEach((name) => { |
||||
const sizeName = name.replace("nz", "").toLowerCase(); |
||||
if (isNotNil(this[name])) { |
||||
if (typeof this[name] === "number" || typeof this[name] === "string") { |
||||
listClassMap[`ant-col-${sizeName}-${this[name]}`] = true; |
||||
} else { |
||||
const embedded = this[name]; |
||||
const prefixArray = ["span", "pull", "push", "offset", "order"]; |
||||
prefixArray.forEach((prefix) => { |
||||
const prefixClass = prefix === "span" ? "-" : `-${prefix}-`; |
||||
listClassMap[`ant-col-${sizeName}${prefixClass}${embedded[prefix]}`] = embedded && isNotNil(embedded[prefix]); |
||||
}); |
||||
} |
||||
} |
||||
}); |
||||
return listClassMap; |
||||
} |
||||
constructor(elementRef, nzRowDirective, renderer, directionality) { |
||||
this.elementRef = elementRef; |
||||
this.nzRowDirective = nzRowDirective; |
||||
this.renderer = renderer; |
||||
this.directionality = directionality; |
||||
this.classMap = {}; |
||||
this.destroy$ = new Subject(); |
||||
this.hostFlexStyle = null; |
||||
this.dir = "ltr"; |
||||
this.nzFlex = null; |
||||
this.nzSpan = null; |
||||
this.nzOrder = null; |
||||
this.nzOffset = null; |
||||
this.nzPush = null; |
||||
this.nzPull = null; |
||||
this.nzXs = null; |
||||
this.nzSm = null; |
||||
this.nzMd = null; |
||||
this.nzLg = null; |
||||
this.nzXl = null; |
||||
this.nzXXl = null; |
||||
} |
||||
ngOnInit() { |
||||
this.dir = this.directionality.value; |
||||
this.directionality.change?.pipe(takeUntil(this.destroy$)).subscribe((direction) => { |
||||
this.dir = direction; |
||||
this.setHostClassMap(); |
||||
}); |
||||
this.setHostClassMap(); |
||||
this.setHostFlexStyle(); |
||||
} |
||||
ngOnChanges(changes) { |
||||
this.setHostClassMap(); |
||||
const { |
||||
nzFlex |
||||
} = changes; |
||||
if (nzFlex) { |
||||
this.setHostFlexStyle(); |
||||
} |
||||
} |
||||
ngAfterViewInit() { |
||||
if (this.nzRowDirective) { |
||||
this.nzRowDirective.actualGutter$.pipe(takeUntil(this.destroy$)).subscribe(([horizontalGutter, verticalGutter]) => { |
||||
const renderGutter = (name, gutter) => { |
||||
const nativeElement = this.elementRef.nativeElement; |
||||
if (gutter !== null) { |
||||
this.renderer.setStyle(nativeElement, name, `${gutter / 2}px`); |
||||
} |
||||
}; |
||||
renderGutter("padding-left", horizontalGutter); |
||||
renderGutter("padding-right", horizontalGutter); |
||||
renderGutter("padding-top", verticalGutter); |
||||
renderGutter("padding-bottom", verticalGutter); |
||||
}); |
||||
} |
||||
} |
||||
ngOnDestroy() { |
||||
this.destroy$.next(true); |
||||
this.destroy$.complete(); |
||||
} |
||||
}; |
||||
_NzColDirective.ɵfac = function NzColDirective_Factory(t) { |
||||
return new (t || _NzColDirective)(ɵɵdirectiveInject(ElementRef), ɵɵdirectiveInject(NzRowDirective, 9), ɵɵdirectiveInject(Renderer2), ɵɵdirectiveInject(Directionality, 8)); |
||||
}; |
||||
_NzColDirective.ɵdir = ɵɵdefineDirective({ |
||||
type: _NzColDirective, |
||||
selectors: [["", "nz-col", ""], ["nz-col"], ["nz-form-control"], ["nz-form-label"]], |
||||
hostVars: 2, |
||||
hostBindings: function NzColDirective_HostBindings(rf, ctx) { |
||||
if (rf & 2) { |
||||
ɵɵstyleProp("flex", ctx.hostFlexStyle); |
||||
} |
||||
}, |
||||
inputs: { |
||||
nzFlex: "nzFlex", |
||||
nzSpan: "nzSpan", |
||||
nzOrder: "nzOrder", |
||||
nzOffset: "nzOffset", |
||||
nzPush: "nzPush", |
||||
nzPull: "nzPull", |
||||
nzXs: "nzXs", |
||||
nzSm: "nzSm", |
||||
nzMd: "nzMd", |
||||
nzLg: "nzLg", |
||||
nzXl: "nzXl", |
||||
nzXXl: "nzXXl" |
||||
}, |
||||
exportAs: ["nzCol"], |
||||
standalone: true, |
||||
features: [ɵɵNgOnChangesFeature] |
||||
}); |
||||
var NzColDirective = _NzColDirective; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzColDirective, [{ |
||||
type: Directive, |
||||
args: [{ |
||||
selector: "[nz-col],nz-col,nz-form-control,nz-form-label", |
||||
exportAs: "nzCol", |
||||
host: { |
||||
"[style.flex]": "hostFlexStyle" |
||||
}, |
||||
standalone: true |
||||
}] |
||||
}], () => [{ |
||||
type: ElementRef |
||||
}, { |
||||
type: NzRowDirective, |
||||
decorators: [{ |
||||
type: Optional |
||||
}, { |
||||
type: Host |
||||
}] |
||||
}, { |
||||
type: Renderer2 |
||||
}, { |
||||
type: Directionality, |
||||
decorators: [{ |
||||
type: Optional |
||||
}] |
||||
}], { |
||||
nzFlex: [{ |
||||
type: Input |
||||
}], |
||||
nzSpan: [{ |
||||
type: Input |
||||
}], |
||||
nzOrder: [{ |
||||
type: Input |
||||
}], |
||||
nzOffset: [{ |
||||
type: Input |
||||
}], |
||||
nzPush: [{ |
||||
type: Input |
||||
}], |
||||
nzPull: [{ |
||||
type: Input |
||||
}], |
||||
nzXs: [{ |
||||
type: Input |
||||
}], |
||||
nzSm: [{ |
||||
type: Input |
||||
}], |
||||
nzMd: [{ |
||||
type: Input |
||||
}], |
||||
nzLg: [{ |
||||
type: Input |
||||
}], |
||||
nzXl: [{ |
||||
type: Input |
||||
}], |
||||
nzXXl: [{ |
||||
type: Input |
||||
}] |
||||
}); |
||||
})(); |
||||
var _NzGridModule = class _NzGridModule { |
||||
}; |
||||
_NzGridModule.ɵfac = function NzGridModule_Factory(t) { |
||||
return new (t || _NzGridModule)(); |
||||
}; |
||||
_NzGridModule.ɵmod = ɵɵdefineNgModule({ |
||||
type: _NzGridModule, |
||||
imports: [NzColDirective, NzRowDirective], |
||||
exports: [NzColDirective, NzRowDirective] |
||||
}); |
||||
_NzGridModule.ɵinj = ɵɵdefineInjector({}); |
||||
var NzGridModule = _NzGridModule; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NzGridModule, [{ |
||||
type: NgModule, |
||||
args: [{ |
||||
imports: [NzColDirective, NzRowDirective], |
||||
exports: [NzColDirective, NzRowDirective] |
||||
}] |
||||
}], null, null); |
||||
})(); |
||||
|
||||
export { |
||||
NzRowDirective, |
||||
NzColDirective, |
||||
NzGridModule |
||||
}; |
||||
//# sourceMappingURL=chunk-QP2OUFNR.js.map
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -1,233 +0,0 @@ |
||||
import { |
||||
Platform |
||||
} from "./chunk-IAC53GOD.js"; |
||||
import { |
||||
coerceArray |
||||
} from "./chunk-M5GY4FCO.js"; |
||||
import { |
||||
CSP_NONCE, |
||||
Inject, |
||||
Injectable, |
||||
NgModule, |
||||
NgZone, |
||||
Observable, |
||||
Optional, |
||||
Subject, |
||||
combineLatest, |
||||
concat, |
||||
debounceTime, |
||||
map, |
||||
setClassMetadata, |
||||
skip, |
||||
startWith, |
||||
take, |
||||
takeUntil, |
||||
ɵɵdefineInjectable, |
||||
ɵɵdefineInjector, |
||||
ɵɵdefineNgModule, |
||||
ɵɵinject |
||||
} from "./chunk-FGESKT7O.js"; |
||||
|
||||
// node_modules/@angular/cdk/fesm2022/layout.mjs
|
||||
var _LayoutModule = class _LayoutModule { |
||||
}; |
||||
_LayoutModule.ɵfac = function LayoutModule_Factory(t) { |
||||
return new (t || _LayoutModule)(); |
||||
}; |
||||
_LayoutModule.ɵmod = ɵɵdefineNgModule({ |
||||
type: _LayoutModule |
||||
}); |
||||
_LayoutModule.ɵinj = ɵɵdefineInjector({}); |
||||
var LayoutModule = _LayoutModule; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(LayoutModule, [{ |
||||
type: NgModule, |
||||
args: [{}] |
||||
}], null, null); |
||||
})(); |
||||
var mediaQueriesForWebkitCompatibility = /* @__PURE__ */ new Set(); |
||||
var mediaQueryStyleNode; |
||||
var _MediaMatcher = class _MediaMatcher { |
||||
constructor(_platform, _nonce) { |
||||
this._platform = _platform; |
||||
this._nonce = _nonce; |
||||
this._matchMedia = this._platform.isBrowser && window.matchMedia ? ( |
||||
// matchMedia is bound to the window scope intentionally as it is an illegal invocation to
|
||||
// call it from a different scope.
|
||||
window.matchMedia.bind(window) |
||||
) : noopMatchMedia; |
||||
} |
||||
/** |
||||
* Evaluates the given media query and returns the native MediaQueryList from which results |
||||
* can be retrieved. |
||||
* Confirms the layout engine will trigger for the selector query provided and returns the |
||||
* MediaQueryList for the query provided. |
||||
*/ |
||||
matchMedia(query) { |
||||
if (this._platform.WEBKIT || this._platform.BLINK) { |
||||
createEmptyStyleRule(query, this._nonce); |
||||
} |
||||
return this._matchMedia(query); |
||||
} |
||||
}; |
||||
_MediaMatcher.ɵfac = function MediaMatcher_Factory(t) { |
||||
return new (t || _MediaMatcher)(ɵɵinject(Platform), ɵɵinject(CSP_NONCE, 8)); |
||||
}; |
||||
_MediaMatcher.ɵprov = ɵɵdefineInjectable({ |
||||
token: _MediaMatcher, |
||||
factory: _MediaMatcher.ɵfac, |
||||
providedIn: "root" |
||||
}); |
||||
var MediaMatcher = _MediaMatcher; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(MediaMatcher, [{ |
||||
type: Injectable, |
||||
args: [{ |
||||
providedIn: "root" |
||||
}] |
||||
}], () => [{ |
||||
type: Platform |
||||
}, { |
||||
type: void 0, |
||||
decorators: [{ |
||||
type: Optional |
||||
}, { |
||||
type: Inject, |
||||
args: [CSP_NONCE] |
||||
}] |
||||
}], null); |
||||
})(); |
||||
function createEmptyStyleRule(query, nonce) { |
||||
if (mediaQueriesForWebkitCompatibility.has(query)) { |
||||
return; |
||||
} |
||||
try { |
||||
if (!mediaQueryStyleNode) { |
||||
mediaQueryStyleNode = document.createElement("style"); |
||||
if (nonce) { |
||||
mediaQueryStyleNode.nonce = nonce; |
||||
} |
||||
mediaQueryStyleNode.setAttribute("type", "text/css"); |
||||
document.head.appendChild(mediaQueryStyleNode); |
||||
} |
||||
if (mediaQueryStyleNode.sheet) { |
||||
mediaQueryStyleNode.sheet.insertRule(`@media ${query} {body{ }}`, 0); |
||||
mediaQueriesForWebkitCompatibility.add(query); |
||||
} |
||||
} catch (e) { |
||||
console.error(e); |
||||
} |
||||
} |
||||
function noopMatchMedia(query) { |
||||
return { |
||||
matches: query === "all" || query === "", |
||||
media: query, |
||||
addListener: () => { |
||||
}, |
||||
removeListener: () => { |
||||
} |
||||
}; |
||||
} |
||||
var _BreakpointObserver = class _BreakpointObserver { |
||||
constructor(_mediaMatcher, _zone) { |
||||
this._mediaMatcher = _mediaMatcher; |
||||
this._zone = _zone; |
||||
this._queries = /* @__PURE__ */ new Map(); |
||||
this._destroySubject = new Subject(); |
||||
} |
||||
/** Completes the active subject, signalling to all other observables to complete. */ |
||||
ngOnDestroy() { |
||||
this._destroySubject.next(); |
||||
this._destroySubject.complete(); |
||||
} |
||||
/** |
||||
* Whether one or more media queries match the current viewport size. |
||||
* @param value One or more media queries to check. |
||||
* @returns Whether any of the media queries match. |
||||
*/ |
||||
isMatched(value) { |
||||
const queries = splitQueries(coerceArray(value)); |
||||
return queries.some((mediaQuery) => this._registerQuery(mediaQuery).mql.matches); |
||||
} |
||||
/** |
||||
* Gets an observable of results for the given queries that will emit new results for any changes |
||||
* in matching of the given queries. |
||||
* @param value One or more media queries to check. |
||||
* @returns A stream of matches for the given queries. |
||||
*/ |
||||
observe(value) { |
||||
const queries = splitQueries(coerceArray(value)); |
||||
const observables = queries.map((query) => this._registerQuery(query).observable); |
||||
let stateObservable = combineLatest(observables); |
||||
stateObservable = concat(stateObservable.pipe(take(1)), stateObservable.pipe(skip(1), debounceTime(0))); |
||||
return stateObservable.pipe(map((breakpointStates) => { |
||||
const response = { |
||||
matches: false, |
||||
breakpoints: {} |
||||
}; |
||||
breakpointStates.forEach(({ |
||||
matches, |
||||
query |
||||
}) => { |
||||
response.matches = response.matches || matches; |
||||
response.breakpoints[query] = matches; |
||||
}); |
||||
return response; |
||||
})); |
||||
} |
||||
/** Registers a specific query to be listened for. */ |
||||
_registerQuery(query) { |
||||
if (this._queries.has(query)) { |
||||
return this._queries.get(query); |
||||
} |
||||
const mql = this._mediaMatcher.matchMedia(query); |
||||
const queryObservable = new Observable((observer) => { |
||||
const handler = (e) => this._zone.run(() => observer.next(e)); |
||||
mql.addListener(handler); |
||||
return () => { |
||||
mql.removeListener(handler); |
||||
}; |
||||
}).pipe(startWith(mql), map(({ |
||||
matches |
||||
}) => ({ |
||||
query, |
||||
matches |
||||
})), takeUntil(this._destroySubject)); |
||||
const output = { |
||||
observable: queryObservable, |
||||
mql |
||||
}; |
||||
this._queries.set(query, output); |
||||
return output; |
||||
} |
||||
}; |
||||
_BreakpointObserver.ɵfac = function BreakpointObserver_Factory(t) { |
||||
return new (t || _BreakpointObserver)(ɵɵinject(MediaMatcher), ɵɵinject(NgZone)); |
||||
}; |
||||
_BreakpointObserver.ɵprov = ɵɵdefineInjectable({ |
||||
token: _BreakpointObserver, |
||||
factory: _BreakpointObserver.ɵfac, |
||||
providedIn: "root" |
||||
}); |
||||
var BreakpointObserver = _BreakpointObserver; |
||||
(() => { |
||||
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(BreakpointObserver, [{ |
||||
type: Injectable, |
||||
args: [{ |
||||
providedIn: "root" |
||||
}] |
||||
}], () => [{ |
||||
type: MediaMatcher |
||||
}, { |
||||
type: NgZone |
||||
}], null); |
||||
})(); |
||||
function splitQueries(queries) { |
||||
return queries.map((query) => query.split(",")).reduce((a1, a2) => a1.concat(a2)).map((query) => query.trim()); |
||||
} |
||||
|
||||
export { |
||||
MediaMatcher, |
||||
BreakpointObserver |
||||
}; |
||||
//# sourceMappingURL=chunk-WB57DPWD.js.map
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -1,213 +0,0 @@ |
||||
import { |
||||
animate, |
||||
query, |
||||
stagger, |
||||
state, |
||||
style, |
||||
transition, |
||||
trigger |
||||
} from "./chunk-KI2JSLP6.js"; |
||||
|
||||
// node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-core-animation.mjs
|
||||
var _AnimationDuration = class _AnimationDuration { |
||||
// Tooltip
|
||||
}; |
||||
_AnimationDuration.SLOW = "0.3s"; |
||||
_AnimationDuration.BASE = "0.2s"; |
||||
_AnimationDuration.FAST = "0.1s"; |
||||
var AnimationDuration = _AnimationDuration; |
||||
var _AnimationCurves = class _AnimationCurves { |
||||
}; |
||||
_AnimationCurves.EASE_BASE_OUT = "cubic-bezier(0.7, 0.3, 0.1, 1)"; |
||||
_AnimationCurves.EASE_BASE_IN = "cubic-bezier(0.9, 0, 0.3, 0.7)"; |
||||
_AnimationCurves.EASE_OUT = "cubic-bezier(0.215, 0.61, 0.355, 1)"; |
||||
_AnimationCurves.EASE_IN = "cubic-bezier(0.55, 0.055, 0.675, 0.19)"; |
||||
_AnimationCurves.EASE_IN_OUT = "cubic-bezier(0.645, 0.045, 0.355, 1)"; |
||||
_AnimationCurves.EASE_OUT_BACK = "cubic-bezier(0.12, 0.4, 0.29, 1.46)"; |
||||
_AnimationCurves.EASE_IN_BACK = "cubic-bezier(0.71, -0.46, 0.88, 0.6)"; |
||||
_AnimationCurves.EASE_IN_OUT_BACK = "cubic-bezier(0.71, -0.46, 0.29, 1.46)"; |
||||
_AnimationCurves.EASE_OUT_CIRC = "cubic-bezier(0.08, 0.82, 0.17, 1)"; |
||||
_AnimationCurves.EASE_IN_CIRC = "cubic-bezier(0.6, 0.04, 0.98, 0.34)"; |
||||
_AnimationCurves.EASE_IN_OUT_CIRC = "cubic-bezier(0.78, 0.14, 0.15, 0.86)"; |
||||
_AnimationCurves.EASE_OUT_QUINT = "cubic-bezier(0.23, 1, 0.32, 1)"; |
||||
_AnimationCurves.EASE_IN_QUINT = "cubic-bezier(0.755, 0.05, 0.855, 0.06)"; |
||||
_AnimationCurves.EASE_IN_OUT_QUINT = "cubic-bezier(0.86, 0, 0.07, 1)"; |
||||
var AnimationCurves = _AnimationCurves; |
||||
var collapseMotion = trigger("collapseMotion", [ |
||||
state("expanded", style({ height: "*" })), |
||||
state("collapsed", style({ height: 0, overflow: "hidden" })), |
||||
state("hidden", style({ height: 0, overflow: "hidden", borderTopWidth: "0" })), |
||||
transition("expanded => collapsed", animate(`150ms ${AnimationCurves.EASE_IN_OUT}`)), |
||||
transition("expanded => hidden", animate(`150ms ${AnimationCurves.EASE_IN_OUT}`)), |
||||
transition("collapsed => expanded", animate(`150ms ${AnimationCurves.EASE_IN_OUT}`)), |
||||
transition("hidden => expanded", animate(`150ms ${AnimationCurves.EASE_IN_OUT}`)) |
||||
]); |
||||
var treeCollapseMotion = trigger("treeCollapseMotion", [ |
||||
transition("* => *", [ |
||||
query("nz-tree-node:leave,nz-tree-builtin-node:leave", [ |
||||
style({ overflow: "hidden" }), |
||||
stagger(0, [ |
||||
animate(`150ms ${AnimationCurves.EASE_IN_OUT}`, style({ height: 0, opacity: 0, "padding-bottom": 0 })) |
||||
]) |
||||
], { |
||||
optional: true |
||||
}), |
||||
query("nz-tree-node:enter,nz-tree-builtin-node:enter", [ |
||||
style({ overflow: "hidden", height: 0, opacity: 0, "padding-bottom": 0 }), |
||||
stagger(0, [ |
||||
animate(`150ms ${AnimationCurves.EASE_IN_OUT}`, style({ overflow: "hidden", height: "*", opacity: "*", "padding-bottom": "*" })) |
||||
]) |
||||
], { |
||||
optional: true |
||||
}) |
||||
]) |
||||
]); |
||||
var fadeMotion = trigger("fadeMotion", [ |
||||
transition(":enter", [style({ opacity: 0 }), animate(`${AnimationDuration.BASE}`, style({ opacity: 1 }))]), |
||||
transition(":leave", [style({ opacity: 1 }), animate(`${AnimationDuration.BASE}`, style({ opacity: 0 }))]) |
||||
]); |
||||
var helpMotion = trigger("helpMotion", [ |
||||
transition(":enter", [ |
||||
style({ |
||||
opacity: 0, |
||||
transform: "translateY(-5px)" |
||||
}), |
||||
animate(`${AnimationDuration.SLOW} ${AnimationCurves.EASE_IN_OUT}`, style({ |
||||
opacity: 1, |
||||
transform: "translateY(0)" |
||||
})) |
||||
]), |
||||
transition(":leave", [ |
||||
style({ |
||||
opacity: 1, |
||||
transform: "translateY(0)" |
||||
}), |
||||
animate(`${AnimationDuration.SLOW} ${AnimationCurves.EASE_IN_OUT}`, style({ |
||||
opacity: 0, |
||||
transform: "translateY(-5px)" |
||||
})) |
||||
]) |
||||
]); |
||||
var moveUpMotion = trigger("moveUpMotion", [ |
||||
transition("* => enter", [ |
||||
style({ |
||||
transformOrigin: "0 0", |
||||
transform: "translateY(-100%)", |
||||
opacity: 0 |
||||
}), |
||||
animate(`${AnimationDuration.BASE}`, style({ |
||||
transformOrigin: "0 0", |
||||
transform: "translateY(0%)", |
||||
opacity: 1 |
||||
})) |
||||
]), |
||||
transition("* => leave", [ |
||||
style({ |
||||
transformOrigin: "0 0", |
||||
transform: "translateY(0%)", |
||||
opacity: 1 |
||||
}), |
||||
animate(`${AnimationDuration.BASE}`, style({ |
||||
transformOrigin: "0 0", |
||||
transform: "translateY(-100%)", |
||||
opacity: 0 |
||||
})) |
||||
]) |
||||
]); |
||||
var notificationMotion = trigger("notificationMotion", [ |
||||
state("enterRight", style({ opacity: 1, transform: "translateX(0)" })), |
||||
transition("* => enterRight", [style({ opacity: 0, transform: "translateX(5%)" }), animate("100ms linear")]), |
||||
state("enterLeft", style({ opacity: 1, transform: "translateX(0)" })), |
||||
transition("* => enterLeft", [style({ opacity: 0, transform: "translateX(-5%)" }), animate("100ms linear")]), |
||||
state("enterTop", style({ opacity: 1, transform: "translateY(0)" })), |
||||
transition("* => enterTop", [style({ opacity: 0, transform: "translateY(-5%)" }), animate("100ms linear")]), |
||||
state("enterBottom", style({ opacity: 1, transform: "translateY(0)" })), |
||||
transition("* => enterBottom", [style({ opacity: 0, transform: "translateY(5%)" }), animate("100ms linear")]), |
||||
state("leave", style({ |
||||
opacity: 0, |
||||
transform: "scaleY(0.8)", |
||||
transformOrigin: "0% 0%" |
||||
})), |
||||
transition("* => leave", [ |
||||
style({ |
||||
opacity: 1, |
||||
transform: "scaleY(1)", |
||||
transformOrigin: "0% 0%" |
||||
}), |
||||
animate("100ms linear") |
||||
]) |
||||
]); |
||||
var ANIMATION_TRANSITION_IN = `${AnimationDuration.BASE} ${AnimationCurves.EASE_OUT_QUINT}`; |
||||
var ANIMATION_TRANSITION_OUT = `${AnimationDuration.BASE} ${AnimationCurves.EASE_IN_QUINT}`; |
||||
var slideMotion = trigger("slideMotion", [ |
||||
state("void", style({ |
||||
opacity: 0, |
||||
transform: "scaleY(0.8)" |
||||
})), |
||||
state("enter", style({ |
||||
opacity: 1, |
||||
transform: "scaleY(1)" |
||||
})), |
||||
transition("void => *", [animate(ANIMATION_TRANSITION_IN)]), |
||||
transition("* => void", [animate(ANIMATION_TRANSITION_OUT)]) |
||||
]); |
||||
var slideAlertMotion = trigger("slideAlertMotion", [ |
||||
transition(":leave", [ |
||||
style({ opacity: 1, transform: "scaleY(1)", transformOrigin: "0% 0%" }), |
||||
animate(`${AnimationDuration.SLOW} ${AnimationCurves.EASE_IN_OUT_CIRC}`, style({ |
||||
opacity: 0, |
||||
transform: "scaleY(0)", |
||||
transformOrigin: "0% 0%" |
||||
})) |
||||
]) |
||||
]); |
||||
var zoomBigMotion = trigger("zoomBigMotion", [ |
||||
transition("void => active", [ |
||||
style({ opacity: 0, transform: "scale(0.8)" }), |
||||
animate(`${AnimationDuration.BASE} ${AnimationCurves.EASE_OUT_CIRC}`, style({ |
||||
opacity: 1, |
||||
transform: "scale(1)" |
||||
})) |
||||
]), |
||||
transition("active => void", [ |
||||
style({ opacity: 1, transform: "scale(1)" }), |
||||
animate(`${AnimationDuration.BASE} ${AnimationCurves.EASE_IN_OUT_CIRC}`, style({ |
||||
opacity: 0, |
||||
transform: "scale(0.8)" |
||||
})) |
||||
]) |
||||
]); |
||||
var zoomBadgeMotion = trigger("zoomBadgeMotion", [ |
||||
transition(":enter", [ |
||||
style({ opacity: 0, transform: "scale(0) translate(50%, -50%)" }), |
||||
animate(`${AnimationDuration.SLOW} ${AnimationCurves.EASE_OUT_BACK}`, style({ |
||||
opacity: 1, |
||||
transform: "scale(1) translate(50%, -50%)" |
||||
})) |
||||
]), |
||||
transition(":leave", [ |
||||
style({ opacity: 1, transform: "scale(1) translate(50%, -50%)" }), |
||||
animate(`${AnimationDuration.SLOW} ${AnimationCurves.EASE_IN_BACK}`, style({ |
||||
opacity: 0, |
||||
transform: "scale(0) translate(50%, -50%)" |
||||
})) |
||||
]) |
||||
]); |
||||
var thumbMotion = trigger("thumbMotion", [ |
||||
state("from", style({ transform: "translateX({{ transform }}px)", width: "{{ width }}px" }), { |
||||
params: { transform: 0, width: 0 } |
||||
}), |
||||
state("to", style({ transform: "translateX({{ transform }}px)", width: "{{ width }}px" }), { |
||||
params: { transform: 100, width: 0 } |
||||
}), |
||||
transition("from => to", animate(`300ms ${AnimationCurves.EASE_IN_OUT}`)) |
||||
]); |
||||
|
||||
export { |
||||
collapseMotion, |
||||
helpMotion, |
||||
moveUpMotion, |
||||
slideMotion, |
||||
zoomBigMotion |
||||
}; |
||||
//# sourceMappingURL=chunk-XAGDQPFO.js.map
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -0,0 +1,12 @@ |
||||
import { NgModule } from '@angular/core'; |
||||
import { CommonModule } from '@angular/common'; |
||||
|
||||
|
||||
|
||||
@NgModule({ |
||||
declarations: [], |
||||
imports: [ |
||||
CommonModule |
||||
] |
||||
}) |
||||
export class MenuModule { } |
@ -1,7 +1,9 @@ |
||||
<div class="card-container" style="width: 100%;height: 100%"> |
||||
|
||||
<nz-tabset nzType="card"> |
||||
<nz-tab *ngFor="let tab of tabs" [nzTitle]="'Tab Title ' + tab"> |
||||
<nz-tab *ngFor="let item of menuTabs" [nzTitle]="item"> |
||||
<router-outlet></router-outlet> |
||||
</nz-tab> |
||||
</nz-tabset> |
||||
|
||||
</div> |
||||
|
@ -1 +1 @@ |
||||
<div style="width: 100%; height: calc(100vh - 134px); background: red"></div> |
||||
<div style="width: 100%; height: calc(100vh - 134px);"></div> |
||||
|
@ -1 +0,0 @@ |
||||
<p>menu works!</p> |
@ -1,23 +0,0 @@ |
||||
import { ComponentFixture, TestBed } from '@angular/core/testing'; |
||||
|
||||
import { MenuComponent } from './menu.component'; |
||||
|
||||
describe('MenuComponent', () => { |
||||
let component: MenuComponent; |
||||
let fixture: ComponentFixture<MenuComponent>; |
||||
|
||||
beforeEach(async () => { |
||||
await TestBed.configureTestingModule({ |
||||
imports: [MenuComponent] |
||||
}) |
||||
.compileComponents(); |
||||
|
||||
fixture = TestBed.createComponent(MenuComponent); |
||||
component = fixture.componentInstance; |
||||
fixture.detectChanges(); |
||||
}); |
||||
|
||||
it('should create', () => { |
||||
expect(component).toBeTruthy(); |
||||
}); |
||||
}); |
@ -1,12 +0,0 @@ |
||||
import { Component } from '@angular/core'; |
||||
|
||||
@Component({ |
||||
selector: 'app-menu', |
||||
standalone: true, |
||||
imports: [], |
||||
templateUrl: './menu.component.html', |
||||
styleUrl: './menu.component.less' |
||||
}) |
||||
export class MenuComponent { |
||||
|
||||
} |
@ -0,0 +1,26 @@ |
||||
<nz-tree |
||||
nzBlockNode |
||||
[nzData]="menuData" |
||||
|
||||
[nzTreeTemplate]="nzTreeTemplate" |
||||
></nz-tree> |
||||
<ng-template #nzTreeTemplate let-node let-origin="origin"> |
||||
<!--<span class="custom-node"> |
||||
<span *ngIf="!node.isLeaf" (contextmenu)="contextMenu($event, menu)"> |
||||
<span nz-icon [nzType]="node.isExpanded ? 'folder-open' : 'folder'" (click)="openFolder(node)"></span> |
||||
<span class="folder-name">{{ node.title }}</span> |
||||
<span class="folder-desc">created by {{ origin.author | lowercase }}</span> |
||||
</span> |
||||
<span *ngIf="node.isLeaf" (contextmenu)="contextMenu($event, menu)"> |
||||
<span nz-icon nzType="file"></span> |
||||
<span class="file-name">{{ node.title }}</span> |
||||
<span class="file-desc">modified by {{ origin.author | lowercase }}</span> |
||||
</span> |
||||
</span>--> |
||||
</ng-template> |
||||
<nz-dropdown-menu #menu="nzDropdownMenu"> |
||||
<ul nz-menu> |
||||
<!-- <li nz-menu-item (click)="selectDropdown()">Action 1</li> |
||||
<li nz-menu-item (click)="selectDropdown()">Action 2</li>--> |
||||
</ul> |
||||
</nz-dropdown-menu> |
@ -0,0 +1,37 @@ |
||||
import { Component } from '@angular/core'; |
||||
import {NzTreeComponent} from "ng-zorro-antd/tree"; |
||||
import {NgIf} from "@angular/common"; |
||||
import {NzIconDirective} from "ng-zorro-antd/icon"; |
||||
import {NzDropdownMenuComponent} from "ng-zorro-antd/dropdown"; |
||||
import {MenuService} from "../../../servies/menu/menu.service"; |
||||
import {menuData} from "../../../data/menu/menu.namespace"; |
||||
|
||||
@Component({ |
||||
selector: 'app-menu', |
||||
standalone: true, |
||||
imports: [ |
||||
NzTreeComponent, |
||||
NgIf, |
||||
NzIconDirective, |
||||
NzDropdownMenuComponent |
||||
], |
||||
templateUrl: './menu.component.html', |
||||
styleUrl: './menu.component.less' |
||||
}) |
||||
export class MenuComponent { |
||||
|
||||
menuData = []; |
||||
|
||||
constructor(private menuService: MenuService) { |
||||
|
||||
} |
||||
|
||||
queryMenu() { |
||||
this.menuService.queryRoleMenuTree('', (data: any) => { |
||||
this.menuData = data['return_data']; |
||||
console.log(data) |
||||
}); |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,12 @@ |
||||
import { NgModule } from '@angular/core'; |
||||
import { CommonModule } from '@angular/common'; |
||||
|
||||
|
||||
|
||||
@NgModule({ |
||||
declarations: [], |
||||
imports: [ |
||||
CommonModule, |
||||
] |
||||
}) |
||||
export class SystemModule { } |
@ -0,0 +1,6 @@ |
||||
import { Routes } from '@angular/router'; |
||||
import {MenuComponent} from "./menu/menu.component"; |
||||
|
||||
export const SYSTEM_ROUTES: Routes = [ |
||||
{ path: 'menu', component: MenuComponent} |
||||
]; |
@ -0,0 +1,49 @@ |
||||
import { Injectable } from '@angular/core'; |
||||
import {HttpClient} from "@angular/common/http"; |
||||
import {environment} from "../../../environments/environment"; |
||||
import {ObjectData} from "../../utils/objectData.service"; |
||||
|
||||
@Injectable({ |
||||
providedIn: 'root' |
||||
}) |
||||
export class MenuService { |
||||
|
||||
constructor(private http: HttpClient) { } |
||||
|
||||
/** |
||||
* 分盘菜单 |
||||
* @param params |
||||
* @param callBack |
||||
*/ |
||||
public assignMenu(params: object, callBack:any) { |
||||
this.http.post(environment.userUrl + 'secMenu/assignMenu', params).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 分盘菜单 |
||||
* @param roleId |
||||
* @param callBack |
||||
*/ |
||||
public queryRoleMenuTree(roleId: string, callBack:any) { |
||||
const param = { |
||||
roleId: roleId |
||||
} |
||||
this.http.get(environment.userUrl + 'secMenu/queryRoleMenuTree?' + ObjectData.objectByString(param)).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* 编辑菜单 |
||||
* @param params |
||||
* @param callBack |
||||
*/ |
||||
public editMenu(params: object, callBack:any) { |
||||
this.http.post(environment.userUrl + 'secMenu/editMenu', params).subscribe(data => { |
||||
callBack(data); |
||||
}); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue