@alauda/ui 6.4.8-beta.48 → 6.4.8-beta.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/animation/animation-consts.d.ts +2 -0
- package/dialog/confirm-dialog/confirm-dialog-config.d.ts +2 -1
- package/dialog/dialog-animations.d.ts +4 -0
- package/dialog/dialog-config.d.ts +35 -1
- package/dialog/dialog.component.d.ts +31 -4
- package/dialog/dialog.service.d.ts +0 -2
- package/esm2020/core/animation/animation-consts.mjs +6 -0
- package/esm2020/dialog/confirm-dialog/confirm-dialog-config.mjs +4 -2
- package/esm2020/dialog/dialog-animations.mjs +24 -0
- package/esm2020/dialog/dialog-config.mjs +48 -2
- package/esm2020/dialog/dialog-ref.mjs +11 -6
- package/esm2020/dialog/dialog.component.mjs +114 -10
- package/esm2020/dialog/dialog.service.mjs +8 -6
- package/esm2020/utils/fn.mjs +12 -1
- package/fesm2015/alauda-ui.mjs +219 -26
- package/fesm2015/alauda-ui.mjs.map +1 -1
- package/fesm2020/alauda-ui.mjs +219 -26
- package/fesm2020/alauda-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/theme/_base-var.scss +8 -1
- package/theme/_mixin.scss +39 -1
- package/utils/fn.d.ts +4 -0
package/fesm2020/alauda-ui.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { FocusKeyManager, A11yModule } from '@angular/cdk/a11y';
|
|
|
8
8
|
import { Observable, ReplaySubject, share, startWith, map, distinctUntilChanged, Subject, takeUntil, filter, take, merge, fromEvent, combineLatest, debounceTime, switchMap, of, EMPTY, tap, BehaviorSubject, withLatestFrom, throttleTime, pluck, firstValueFrom, NEVER, observeOn, animationFrameScheduler, repeat, takeWhile, endWith, Subscription } from 'rxjs';
|
|
9
9
|
import * as i1 from '@angular/common/http';
|
|
10
10
|
import { HttpClient } from '@angular/common/http';
|
|
11
|
-
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
11
|
+
import { trigger, state, style, transition, animate, query } from '@angular/animations';
|
|
12
12
|
import * as i2$2 from '@angular/cdk/collections';
|
|
13
13
|
import { _VIEW_REPEATER_STRATEGY, _DisposeViewRepeaterStrategy } from '@angular/cdk/collections';
|
|
14
14
|
import * as i5 from '@angular/cdk/portal';
|
|
@@ -159,6 +159,17 @@ const last = (values) => values?.[values.length - 1];
|
|
|
159
159
|
const isTemplateRef = (label) => label instanceof TemplateRef;
|
|
160
160
|
const isString = (label) => typeof label === 'string';
|
|
161
161
|
const handlePixel = (value) => Number.isNaN(+value) ? value : value + 'px';
|
|
162
|
+
function getElementOffset(elem) {
|
|
163
|
+
if (!elem.getClientRects().length) {
|
|
164
|
+
return { top: 0, left: 0 };
|
|
165
|
+
}
|
|
166
|
+
const rect = elem.getBoundingClientRect();
|
|
167
|
+
const win = elem.ownerDocument.defaultView;
|
|
168
|
+
return {
|
|
169
|
+
top: rect.top + win.scrollY,
|
|
170
|
+
left: rect.left + win.scrollX,
|
|
171
|
+
};
|
|
172
|
+
}
|
|
162
173
|
|
|
163
174
|
const observeResizeOn = (target, options) => new Observable(observer => {
|
|
164
175
|
const resizeObserver = new ResizeObserver(entries => {
|
|
@@ -5555,8 +5566,63 @@ var ConfirmType;
|
|
|
5555
5566
|
ConfirmType["Danger"] = "danger";
|
|
5556
5567
|
})(ConfirmType || (ConfirmType = {}));
|
|
5557
5568
|
|
|
5558
|
-
class
|
|
5569
|
+
class BaseDialogConfig {
|
|
5570
|
+
constructor() {
|
|
5571
|
+
this.noAnimation = false;
|
|
5572
|
+
}
|
|
5573
|
+
}
|
|
5574
|
+
class DialogConfig extends BaseDialogConfig {
|
|
5575
|
+
constructor() {
|
|
5576
|
+
super(...arguments);
|
|
5577
|
+
this.size = DialogSize.Big;
|
|
5578
|
+
this.hasBackdrop = true;
|
|
5579
|
+
this.fitViewport = false;
|
|
5580
|
+
}
|
|
5581
|
+
}
|
|
5582
|
+
const ZOOM_CLASS_NAME_MAP = {
|
|
5583
|
+
enter: 'aui-zoom-enter',
|
|
5584
|
+
enterActive: 'aui-zoom-enter-active',
|
|
5585
|
+
leave: 'aui-zoom-leave',
|
|
5586
|
+
leaveActive: 'aui-zoom-leave-active',
|
|
5587
|
+
};
|
|
5588
|
+
const ZOOM_SLOW_CLASS_NAME_MAP = {
|
|
5589
|
+
enter: 'aui-zoom-slow-enter',
|
|
5590
|
+
enterActive: 'aui-zoom-slow-enter-active',
|
|
5591
|
+
leave: 'aui-zoom-slow-leave',
|
|
5592
|
+
leaveActive: 'aui-zoom-slow-leave-active',
|
|
5593
|
+
};
|
|
5594
|
+
const FADE_CLASS_NAME_MAP = {
|
|
5595
|
+
enter: 'aui-fade-enter',
|
|
5596
|
+
enterActive: 'aui-fade-enter-active',
|
|
5597
|
+
leave: 'aui-fade-leave',
|
|
5598
|
+
leaveActive: 'aui-fade-leave-active',
|
|
5599
|
+
};
|
|
5600
|
+
const FADE_SLOW_CLASS_NAME_MAP = {
|
|
5601
|
+
enter: 'aui-fade-slow-enter',
|
|
5602
|
+
enterActive: 'aui-fade-slow-enter-active',
|
|
5603
|
+
leave: 'aui-fade-slow-leave',
|
|
5604
|
+
leaveActive: 'aui-fade-slow-leave-active',
|
|
5605
|
+
};
|
|
5606
|
+
const ANIMATION_DURATION_CLASS_MAP = {
|
|
5607
|
+
base: [
|
|
5608
|
+
'.aui-dialog--small',
|
|
5609
|
+
'.aui-dialog--medium',
|
|
5610
|
+
'.aui-dialog--fit-content',
|
|
5611
|
+
],
|
|
5612
|
+
slow: [
|
|
5613
|
+
'.aui-dialog--big',
|
|
5614
|
+
'.aui-dialog--large',
|
|
5615
|
+
'.aui-dialog--fullscreen',
|
|
5616
|
+
'.aui-dialog--fit-viewport',
|
|
5617
|
+
],
|
|
5618
|
+
};
|
|
5619
|
+
const DIALOG_OVERLAY_PANE_CLASS = 'aui-dialog-overlay-pane';
|
|
5620
|
+
const DIALOG_OVERLAY_PANE_FIT_VIEWPORT_CLASS = 'aui-dialog-overlay-pane--fit-viewport';
|
|
5621
|
+
const DIALOG_BACKDROP_CLASS = 'aui-dialog-backdrop';
|
|
5622
|
+
|
|
5623
|
+
class ConfirmDialogConfig extends BaseDialogConfig {
|
|
5559
5624
|
constructor() {
|
|
5625
|
+
super(...arguments);
|
|
5560
5626
|
this.cancelButton = true;
|
|
5561
5627
|
this.confirmType = ConfirmType.Primary;
|
|
5562
5628
|
this.confirmText = 'OK';
|
|
@@ -5564,6 +5630,33 @@ class ConfirmDialogConfig {
|
|
|
5564
5630
|
}
|
|
5565
5631
|
}
|
|
5566
5632
|
|
|
5633
|
+
const AnimationDurationMap = {
|
|
5634
|
+
slow: '0.3s',
|
|
5635
|
+
base: '0.24s',
|
|
5636
|
+
fast: '0.2s',
|
|
5637
|
+
};
|
|
5638
|
+
|
|
5639
|
+
const getAnimationQueryMetadatas = (config) => {
|
|
5640
|
+
const animationMetadatas = [];
|
|
5641
|
+
Object.keys(config).forEach(key => {
|
|
5642
|
+
const classNames = config[key];
|
|
5643
|
+
classNames.forEach(className => {
|
|
5644
|
+
animationMetadatas.push(query(className, animate(AnimationDurationMap[key], style({})), {
|
|
5645
|
+
optional: true,
|
|
5646
|
+
}));
|
|
5647
|
+
});
|
|
5648
|
+
});
|
|
5649
|
+
return animationMetadatas;
|
|
5650
|
+
};
|
|
5651
|
+
const dialogAnimations = {
|
|
5652
|
+
dialogContainer: trigger('dialogContainer', [
|
|
5653
|
+
state('void, exit', style({})),
|
|
5654
|
+
state('enter', style({})),
|
|
5655
|
+
transition('* => enter', getAnimationQueryMetadatas(ANIMATION_DURATION_CLASS_MAP)),
|
|
5656
|
+
transition('* => void, * => exit', getAnimationQueryMetadatas(ANIMATION_DURATION_CLASS_MAP)),
|
|
5657
|
+
]),
|
|
5658
|
+
};
|
|
5659
|
+
|
|
5567
5660
|
function throwDialogContentAlreadyAttachedError() {
|
|
5568
5661
|
throw new Error('Attempting to attach dialog content after content is already attached');
|
|
5569
5662
|
}
|
|
@@ -5579,10 +5672,14 @@ function getClosestDialog(element, openDialogs) {
|
|
|
5579
5672
|
}
|
|
5580
5673
|
|
|
5581
5674
|
class DialogComponent {
|
|
5582
|
-
constructor(elementRef) {
|
|
5675
|
+
constructor(elementRef, render) {
|
|
5583
5676
|
this.elementRef = elementRef;
|
|
5677
|
+
this.render = render;
|
|
5584
5678
|
this.bem = buildBem('aui-dialog');
|
|
5585
5679
|
this.hidden = false;
|
|
5680
|
+
// animation state
|
|
5681
|
+
this.state = 'enter';
|
|
5682
|
+
this.animationStateChanged = new EventEmitter();
|
|
5586
5683
|
}
|
|
5587
5684
|
get id() {
|
|
5588
5685
|
return this._id;
|
|
@@ -5596,10 +5693,28 @@ class DialogComponent {
|
|
|
5596
5693
|
get customStyle() {
|
|
5597
5694
|
return this.hidden
|
|
5598
5695
|
? {
|
|
5599
|
-
|
|
5696
|
+
opacity: 0,
|
|
5600
5697
|
}
|
|
5601
5698
|
: {};
|
|
5602
5699
|
}
|
|
5700
|
+
get zoomClassMap() {
|
|
5701
|
+
return [
|
|
5702
|
+
DialogSize.Small,
|
|
5703
|
+
DialogSize.Medium,
|
|
5704
|
+
DialogSize.FitContent,
|
|
5705
|
+
].includes(this.config.size)
|
|
5706
|
+
? ZOOM_CLASS_NAME_MAP
|
|
5707
|
+
: ZOOM_SLOW_CLASS_NAME_MAP;
|
|
5708
|
+
}
|
|
5709
|
+
get fadeClassMap() {
|
|
5710
|
+
return [
|
|
5711
|
+
DialogSize.Small,
|
|
5712
|
+
DialogSize.Medium,
|
|
5713
|
+
DialogSize.FitContent,
|
|
5714
|
+
].includes(this.config.size)
|
|
5715
|
+
? FADE_CLASS_NAME_MAP
|
|
5716
|
+
: FADE_SLOW_CLASS_NAME_MAP;
|
|
5717
|
+
}
|
|
5603
5718
|
attachComponentPortal(portal) {
|
|
5604
5719
|
if (this.portalOutlet.hasAttached()) {
|
|
5605
5720
|
throwDialogContentAlreadyAttachedError();
|
|
@@ -5614,18 +5729,97 @@ class DialogComponent {
|
|
|
5614
5729
|
this.blurActiveElement();
|
|
5615
5730
|
return this.portalOutlet.attachTemplatePortal(portal);
|
|
5616
5731
|
}
|
|
5732
|
+
onAnimationDone(event) {
|
|
5733
|
+
this.cleanAnimationClass();
|
|
5734
|
+
this.animationStateChanged.emit(event);
|
|
5735
|
+
}
|
|
5736
|
+
onAnimationStart(event) {
|
|
5737
|
+
if (event.toState === 'enter') {
|
|
5738
|
+
this.setEnterAnimationClass();
|
|
5739
|
+
}
|
|
5740
|
+
else if (event.toState === 'exit') {
|
|
5741
|
+
this.setExitAnimationClass();
|
|
5742
|
+
}
|
|
5743
|
+
}
|
|
5744
|
+
startExitAnimation() {
|
|
5745
|
+
this.state = 'exit';
|
|
5746
|
+
}
|
|
5617
5747
|
blurActiveElement() {
|
|
5618
5748
|
if (document) {
|
|
5619
|
-
|
|
5749
|
+
this.elementFocusedBeforeModalWasOpened =
|
|
5750
|
+
document.activeElement;
|
|
5751
|
+
this.elementFocusedBeforeModalWasOpened.blur();
|
|
5752
|
+
}
|
|
5753
|
+
}
|
|
5754
|
+
cleanAnimationClass() {
|
|
5755
|
+
if (this.config.noAnimation) {
|
|
5756
|
+
return;
|
|
5757
|
+
}
|
|
5758
|
+
const backdropElement = this.overlayRef.backdropElement;
|
|
5759
|
+
const modalElement = this.elementRef.nativeElement.firstElementChild;
|
|
5760
|
+
if (backdropElement) {
|
|
5761
|
+
backdropElement.classList.remove(this.fadeClassMap.enter);
|
|
5762
|
+
backdropElement.classList.remove(this.fadeClassMap.enterActive);
|
|
5763
|
+
}
|
|
5764
|
+
modalElement.classList.remove(this.zoomClassMap.enter);
|
|
5765
|
+
modalElement.classList.remove(this.zoomClassMap.enterActive);
|
|
5766
|
+
modalElement.classList.remove(this.zoomClassMap.leave);
|
|
5767
|
+
modalElement.classList.remove(this.zoomClassMap.leaveActive);
|
|
5768
|
+
}
|
|
5769
|
+
setEnterAnimationClass() {
|
|
5770
|
+
if (this.config.noAnimation) {
|
|
5771
|
+
return;
|
|
5772
|
+
}
|
|
5773
|
+
this.setModalTransformOrigin();
|
|
5774
|
+
const modalElement = this.elementRef.nativeElement.firstElementChild;
|
|
5775
|
+
const backdropElement = this.overlayRef.backdropElement;
|
|
5776
|
+
modalElement.classList.add(this.zoomClassMap.enter);
|
|
5777
|
+
modalElement.classList.add(this.zoomClassMap.enterActive);
|
|
5778
|
+
if (backdropElement) {
|
|
5779
|
+
backdropElement.classList.add(this.fadeClassMap.enter);
|
|
5780
|
+
backdropElement.classList.add(this.fadeClassMap.enterActive);
|
|
5781
|
+
}
|
|
5782
|
+
}
|
|
5783
|
+
setExitAnimationClass() {
|
|
5784
|
+
if (this.config.noAnimation) {
|
|
5785
|
+
return;
|
|
5786
|
+
}
|
|
5787
|
+
const modalElement = this.elementRef.nativeElement.firstElementChild;
|
|
5788
|
+
modalElement.classList.add(this.zoomClassMap.leave);
|
|
5789
|
+
modalElement.classList.add(this.zoomClassMap.leaveActive);
|
|
5790
|
+
this.setMaskExitAnimationClass();
|
|
5791
|
+
}
|
|
5792
|
+
setMaskExitAnimationClass() {
|
|
5793
|
+
const backdropElement = this.overlayRef.backdropElement;
|
|
5794
|
+
if (backdropElement) {
|
|
5795
|
+
backdropElement.classList.add(this.fadeClassMap.leave);
|
|
5796
|
+
backdropElement.classList.add(this.fadeClassMap.leaveActive);
|
|
5797
|
+
}
|
|
5798
|
+
}
|
|
5799
|
+
setModalTransformOrigin() {
|
|
5800
|
+
const modalElement = this.elementRef.nativeElement
|
|
5801
|
+
.firstElementChild;
|
|
5802
|
+
if (this.elementFocusedBeforeModalWasOpened) {
|
|
5803
|
+
const previouslyDOMRect = this.elementFocusedBeforeModalWasOpened.getBoundingClientRect();
|
|
5804
|
+
const lastPosition = getElementOffset(this.elementFocusedBeforeModalWasOpened);
|
|
5805
|
+
const x = lastPosition.left + previouslyDOMRect.width / 2;
|
|
5806
|
+
const y = lastPosition.top + previouslyDOMRect.height / 2;
|
|
5807
|
+
const transformOrigin = `${x - modalElement.offsetLeft}px ${y - modalElement.offsetTop}px 0px`;
|
|
5808
|
+
this.render.setStyle(modalElement, 'transform-origin', transformOrigin);
|
|
5620
5809
|
}
|
|
5621
5810
|
}
|
|
5622
5811
|
}
|
|
5623
|
-
DialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: DialogComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5624
|
-
DialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: DialogComponent, selector: "aui-dialog", viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], ngImport: i0, template: "<div\n [ngClass]=\"rootClass\"\n [ngStyle]=\"customStyle\"\n>\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n", styles: [".cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}:root .cdk-overlay-backdrop.cdk-overlay-backdrop-showing.aui-dialog-backdrop{background-color:rgba(var(--aui-color-origin-shadow),.4)}html[aui-theme-mode=light] .cdk-overlay-backdrop.cdk-overlay-backdrop-showing.aui-dialog-backdrop{background-color:rgba(var(--aui-color-origin-shadow),.4)}@media (prefers-color-scheme: dark){html[aui-theme-mode=system] .cdk-overlay-backdrop.cdk-overlay-backdrop-showing.aui-dialog-backdrop{background-color:rgba(var(--aui-color-origin-shadow),.75)}}html[aui-theme-mode=dark] .cdk-overlay-backdrop.cdk-overlay-backdrop-showing.aui-dialog-backdrop{background-color:rgba(var(--aui-color-origin-shadow),.75)}.cdk-overlay-pane.aui-dialog-overlay-pane{justify-content:center;overflow:auto}.cdk-overlay-pane.aui-dialog-overlay-pane::-webkit-scrollbar{width:4px;height:4px}.cdk-overlay-pane.aui-dialog-overlay-pane::-webkit-scrollbar-thumb{border-radius:2px;background-color:rgba(var(--aui-color-n-1),.2)}.cdk-overlay-pane.aui-dialog-overlay-pane::-webkit-scrollbar-corner{background-color:transparent}.aui-dialog{margin:18vh auto 20px;display:flex;flex-direction:column;background-color:rgb(var(--aui-color-n-10));border-radius:var(--aui-border-radius-l);overflow:hidden;font-size:var(--aui-font-size-m);line-height:var(--aui-line-height-m);color:rgb(var(--aui-color-main-text))}:root .aui-dialog{box-shadow:0 2px 8px 0 rgba(var(--aui-color-origin-shadow),.2)}html[aui-theme-mode=light] .aui-dialog{box-shadow:0 2px 8px 0 rgba(var(--aui-color-origin-shadow),.2)}@media (prefers-color-scheme: dark){html[aui-theme-mode=system] .aui-dialog{box-shadow:0 4px 16px 0 rgba(var(--aui-color-origin-shadow),.75)}}html[aui-theme-mode=dark] .aui-dialog{box-shadow:0 4px 16px 0 rgba(var(--aui-color-origin-shadow),.75)}.aui-dialog aui-dialog-content{height:100%;overflow:auto}.aui-dialog aui-dialog-content::-webkit-scrollbar{width:4px;height:4px}.aui-dialog aui-dialog-content::-webkit-scrollbar-thumb{border-radius:2px;background-color:rgba(var(--aui-color-n-1),.2)}.aui-dialog aui-dialog-content::-webkit-scrollbar-corner{background-color:transparent}.aui-dialog aui-dialog-content:first-child .aui-dialog__content{padding-top:20px}.aui-dialog aui-dialog-content:last-child .aui-dialog__content{padding-bottom:20px}.aui-dialog__header{margin:0 20px;padding:20px 0 16px;display:flex;justify-content:space-between}.aui-dialog__header.hasDivider{margin-bottom:16px;border-bottom:1px solid rgb(var(--aui-color-divider))}.aui-dialog__header-title{width:100%;font-size:var(--aui-font-size-xl);line-height:var(--aui-line-height-xl);color:rgb(var(--aui-color-main-text));font-weight:var(--aui-font-weight-bold)}.aui-dialog__header-title>aui-icon:first-child{font-size:var(--aui-icon-size-xl);margin-right:var(--aui-spacing-m)}.aui-dialog__header-title>aui-icon:first-child[icon=info_circle_s]{color:rgb(var(--aui-color-primary))}.aui-dialog__header-title>aui-icon:first-child[icon=check_circle_s]{color:rgb(var(--aui-color-green))}.aui-dialog__header-title>aui-icon:first-child[icon=exclamation_circle_s]{color:rgb(var(--aui-color-yellow))}.aui-dialog__header-title>aui-icon:first-child[icon=exclamation_triangle_s]{color:rgb(var(--aui-color-red))}.aui-dialog__header-close{margin-left:var(--aui-spacing-xl);line-height:var(--aui-line-height-xl);font-size:var(--aui-font-size-l);color:rgb(var(--aui-color-n-4));cursor:pointer}.aui-dialog__header-close:hover{color:rgb(var(--aui-color-primary))}.aui-dialog__content{padding:0 20px;min-height:80px}.aui-dialog__footer{padding:20px;display:flex;justify-content:flex-end}.aui-dialog--small{width:400px}.aui-dialog--medium{width:600px}.aui-dialog--big{width:800px}.aui-dialog--large{width:960px}.aui-dialog--fit-content{width:-moz-fit-content;width:fit-content}.aui-dialog--fullscreen{width:90vw;height:calc(100vh - 40px);margin:0
|
|
5812
|
+
DialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: DialogComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
5813
|
+
DialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: DialogComponent, selector: "aui-dialog", host: { listeners: { "@dialogContainer.start": "onAnimationStart($event)", "@dialogContainer.done": "onAnimationDone($event)" }, properties: { "@.disabled": "config.noAnimation", "@dialogContainer": "state" } }, viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], ngImport: i0, template: "<div\n [ngClass]=\"rootClass\"\n [ngStyle]=\"customStyle\"\n>\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n", styles: ["@keyframes aui-fade-in{0%{opacity:0}to{opacity:1}}@keyframes aui-fade-out{0%{opacity:1}to{opacity:0}}@keyframes aui-zoom-in{0%{transform:scale(.2);opacity:0}to{transform:scale(1);opacity:1}}@keyframes aui-zoom-out{0%{transform:scale(1)}to{transform:scale(.2);opacity:0}}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}:root .cdk-overlay-backdrop.cdk-overlay-backdrop-showing.aui-dialog-backdrop{background-color:rgba(var(--aui-color-origin-shadow),.4)}html[aui-theme-mode=light] .cdk-overlay-backdrop.cdk-overlay-backdrop-showing.aui-dialog-backdrop{background-color:rgba(var(--aui-color-origin-shadow),.4)}@media (prefers-color-scheme: dark){html[aui-theme-mode=system] .cdk-overlay-backdrop.cdk-overlay-backdrop-showing.aui-dialog-backdrop{background-color:rgba(var(--aui-color-origin-shadow),.75)}}html[aui-theme-mode=dark] .cdk-overlay-backdrop.cdk-overlay-backdrop-showing.aui-dialog-backdrop{background-color:rgba(var(--aui-color-origin-shadow),.75)}.cdk-overlay-pane.aui-dialog-overlay-pane{justify-content:center;overflow:auto}.cdk-overlay-pane.aui-dialog-overlay-pane::-webkit-scrollbar{width:4px;height:4px}.cdk-overlay-pane.aui-dialog-overlay-pane::-webkit-scrollbar-thumb{border-radius:2px;background-color:rgba(var(--aui-color-n-1),.2)}.cdk-overlay-pane.aui-dialog-overlay-pane::-webkit-scrollbar-corner{background-color:transparent}.cdk-overlay-pane.aui-dialog-overlay-pane--fit-viewport{justify-content:center;overflow:auto;align-items:center}.cdk-overlay-pane.aui-dialog-overlay-pane--fit-viewport::-webkit-scrollbar{width:4px;height:4px}.cdk-overlay-pane.aui-dialog-overlay-pane--fit-viewport::-webkit-scrollbar-thumb{border-radius:2px;background-color:rgba(var(--aui-color-n-1),.2)}.cdk-overlay-pane.aui-dialog-overlay-pane--fit-viewport::-webkit-scrollbar-corner{background-color:transparent}.aui-zoom-enter,.aui-zoom-leave{animation-duration:.24s;animation-fill-mode:both;animation-play-state:paused}.aui-zoom-enter.aui-zoom-enter-active,.aui-zoom-leave.aui-zoom-leave-active{animation-play-state:running;pointer-events:none}.aui-zoom-enter.aui-zoom-enter-active{animation-name:aui-zoom-in}.aui-zoom-leave.aui-zoom-leave-active{animation-name:aui-zoom-out}.aui-zoom-enter{opacity:0;animation-timing-function:cubic-bezier(0,0,.2,1)}.aui-zoom-leave{animation-timing-function:cubic-bezier(.38,0,.24,1)}.aui-zoom-slow-enter,.aui-zoom-slow-leave{animation-duration:.3s;animation-fill-mode:both;animation-play-state:paused}.aui-zoom-slow-enter.aui-zoom-slow-enter-active,.aui-zoom-slow-leave.aui-zoom-slow-leave-active{animation-play-state:running;pointer-events:none}.aui-zoom-slow-enter.aui-zoom-slow-enter-active{animation-name:aui-zoom-in}.aui-zoom-slow-leave.aui-zoom-slow-leave-active{animation-name:aui-zoom-out}.aui-zoom-slow-enter{opacity:0;animation-timing-function:cubic-bezier(0,0,.2,1)}.aui-zoom-slow-leave{animation-timing-function:cubic-bezier(.38,0,.24,1)}.aui-fade-enter,.aui-fade-leave{animation-duration:.24s;animation-fill-mode:both;animation-play-state:paused}.aui-fade-enter.aui-fade-enter-active,.aui-fade-leave.aui-fade-leave-active{animation-play-state:running;pointer-events:none}.aui-fade-enter.aui-fade-enter-active{animation-name:aui-fade-in}.aui-fade-leave.aui-fade-leave-active{animation-name:aui-fade-out}.aui-fade-enter{opacity:0;animation-timing-function:linear}.aui-fade-leave{animation-timing-function:linear}.aui-fade-slow-enter,.aui-fade-slow-leave{animation-duration:.3s;animation-fill-mode:both;animation-play-state:paused}.aui-fade-slow-enter.aui-fade-slow-enter-active,.aui-fade-slow-leave.aui-fade-slow-leave-active{animation-play-state:running;pointer-events:none}.aui-fade-slow-enter.aui-fade-slow-enter-active{animation-name:aui-fade-in}.aui-fade-slow-leave.aui-fade-slow-leave-active{animation-name:aui-fade-out}.aui-fade-slow-enter{opacity:0;animation-timing-function:linear}.aui-fade-slow-leave{animation-timing-function:linear}.aui-dialog{margin:18vh auto 20px;display:flex;flex-direction:column;background-color:rgb(var(--aui-color-n-10));border-radius:var(--aui-border-radius-l);overflow:hidden;font-size:var(--aui-font-size-m);line-height:var(--aui-line-height-m);color:rgb(var(--aui-color-main-text))}:root .aui-dialog{box-shadow:0 2px 8px 0 rgba(var(--aui-color-origin-shadow),.2)}html[aui-theme-mode=light] .aui-dialog{box-shadow:0 2px 8px 0 rgba(var(--aui-color-origin-shadow),.2)}@media (prefers-color-scheme: dark){html[aui-theme-mode=system] .aui-dialog{box-shadow:0 4px 16px 0 rgba(var(--aui-color-origin-shadow),.75)}}html[aui-theme-mode=dark] .aui-dialog{box-shadow:0 4px 16px 0 rgba(var(--aui-color-origin-shadow),.75)}.aui-dialog aui-dialog-content{height:100%;overflow:auto}.aui-dialog aui-dialog-content::-webkit-scrollbar{width:4px;height:4px}.aui-dialog aui-dialog-content::-webkit-scrollbar-thumb{border-radius:2px;background-color:rgba(var(--aui-color-n-1),.2)}.aui-dialog aui-dialog-content::-webkit-scrollbar-corner{background-color:transparent}.aui-dialog aui-dialog-content:first-child .aui-dialog__content{padding-top:20px}.aui-dialog aui-dialog-content:last-child .aui-dialog__content{padding-bottom:20px}.aui-dialog__header{margin:0 20px;padding:20px 0 16px;display:flex;justify-content:space-between}.aui-dialog__header.hasDivider{margin-bottom:16px;border-bottom:1px solid rgb(var(--aui-color-divider))}.aui-dialog__header-title{width:100%;font-size:var(--aui-font-size-xl);line-height:var(--aui-line-height-xl);color:rgb(var(--aui-color-main-text));font-weight:var(--aui-font-weight-bold)}.aui-dialog__header-title>aui-icon:first-child{font-size:var(--aui-icon-size-xl);margin-right:var(--aui-spacing-m)}.aui-dialog__header-title>aui-icon:first-child[icon=info_circle_s]{color:rgb(var(--aui-color-primary))}.aui-dialog__header-title>aui-icon:first-child[icon=check_circle_s]{color:rgb(var(--aui-color-green))}.aui-dialog__header-title>aui-icon:first-child[icon=exclamation_circle_s]{color:rgb(var(--aui-color-yellow))}.aui-dialog__header-title>aui-icon:first-child[icon=exclamation_triangle_s]{color:rgb(var(--aui-color-red))}.aui-dialog__header-close{margin-left:var(--aui-spacing-xl);line-height:var(--aui-line-height-xl);font-size:var(--aui-font-size-l);color:rgb(var(--aui-color-n-4));cursor:pointer}.aui-dialog__header-close:hover{color:rgb(var(--aui-color-primary))}.aui-dialog__content{padding:0 20px;min-height:80px}.aui-dialog__footer{padding:20px;display:flex;justify-content:flex-end}.aui-dialog--small{width:400px}.aui-dialog--medium{width:600px}.aui-dialog--big{width:800px}.aui-dialog--large{width:960px}.aui-dialog--fit-content{width:-moz-fit-content;width:fit-content}.aui-dialog--fullscreen{width:90vw;height:calc(100vh - 40px);margin:0}.aui-dialog--fit-viewport{max-width:90vw;max-height:calc(100vh - 40px);margin:0}.aui-dialog--fit-viewport .aui-dialog__header{margin:0;padding:20px 20px 16px;border-bottom:1px solid rgb(var(--aui-color-divider))}.aui-dialog--fit-viewport .aui-dialog__footer{padding-top:16px;border-top:1px solid rgb(var(--aui-color-divider))}.aui-dialog--fit-viewport aui-dialog-content:not(:first-child) .aui-dialog__content{padding-top:16px}.aui-dialog--fit-viewport aui-dialog-content:not(:last-child) .aui-dialog__content{padding-bottom:16px}.aui-dialog--fit-viewport>ng-component{display:flex;flex-direction:column;overflow:auto}.aui-dialog--fit-viewport>ng-component:after{clear:both}\n"], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [dialogAnimations.dialogContainer], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
5625
5814
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: DialogComponent, decorators: [{
|
|
5626
5815
|
type: Component,
|
|
5627
|
-
args: [{ selector: 'aui-dialog', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, preserveWhitespaces: false,
|
|
5628
|
-
|
|
5816
|
+
args: [{ selector: 'aui-dialog', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, preserveWhitespaces: false, animations: [dialogAnimations.dialogContainer], host: {
|
|
5817
|
+
'[@.disabled]': 'config.noAnimation',
|
|
5818
|
+
'[@dialogContainer]': 'state',
|
|
5819
|
+
'(@dialogContainer.start)': 'onAnimationStart($event)',
|
|
5820
|
+
'(@dialogContainer.done)': 'onAnimationDone($event)',
|
|
5821
|
+
}, template: "<div\n [ngClass]=\"rootClass\"\n [ngStyle]=\"customStyle\"\n>\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n", styles: ["@keyframes aui-fade-in{0%{opacity:0}to{opacity:1}}@keyframes aui-fade-out{0%{opacity:1}to{opacity:0}}@keyframes aui-zoom-in{0%{transform:scale(.2);opacity:0}to{transform:scale(1);opacity:1}}@keyframes aui-zoom-out{0%{transform:scale(1)}to{transform:scale(.2);opacity:0}}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}:root .cdk-overlay-backdrop.cdk-overlay-backdrop-showing.aui-dialog-backdrop{background-color:rgba(var(--aui-color-origin-shadow),.4)}html[aui-theme-mode=light] .cdk-overlay-backdrop.cdk-overlay-backdrop-showing.aui-dialog-backdrop{background-color:rgba(var(--aui-color-origin-shadow),.4)}@media (prefers-color-scheme: dark){html[aui-theme-mode=system] .cdk-overlay-backdrop.cdk-overlay-backdrop-showing.aui-dialog-backdrop{background-color:rgba(var(--aui-color-origin-shadow),.75)}}html[aui-theme-mode=dark] .cdk-overlay-backdrop.cdk-overlay-backdrop-showing.aui-dialog-backdrop{background-color:rgba(var(--aui-color-origin-shadow),.75)}.cdk-overlay-pane.aui-dialog-overlay-pane{justify-content:center;overflow:auto}.cdk-overlay-pane.aui-dialog-overlay-pane::-webkit-scrollbar{width:4px;height:4px}.cdk-overlay-pane.aui-dialog-overlay-pane::-webkit-scrollbar-thumb{border-radius:2px;background-color:rgba(var(--aui-color-n-1),.2)}.cdk-overlay-pane.aui-dialog-overlay-pane::-webkit-scrollbar-corner{background-color:transparent}.cdk-overlay-pane.aui-dialog-overlay-pane--fit-viewport{justify-content:center;overflow:auto;align-items:center}.cdk-overlay-pane.aui-dialog-overlay-pane--fit-viewport::-webkit-scrollbar{width:4px;height:4px}.cdk-overlay-pane.aui-dialog-overlay-pane--fit-viewport::-webkit-scrollbar-thumb{border-radius:2px;background-color:rgba(var(--aui-color-n-1),.2)}.cdk-overlay-pane.aui-dialog-overlay-pane--fit-viewport::-webkit-scrollbar-corner{background-color:transparent}.aui-zoom-enter,.aui-zoom-leave{animation-duration:.24s;animation-fill-mode:both;animation-play-state:paused}.aui-zoom-enter.aui-zoom-enter-active,.aui-zoom-leave.aui-zoom-leave-active{animation-play-state:running;pointer-events:none}.aui-zoom-enter.aui-zoom-enter-active{animation-name:aui-zoom-in}.aui-zoom-leave.aui-zoom-leave-active{animation-name:aui-zoom-out}.aui-zoom-enter{opacity:0;animation-timing-function:cubic-bezier(0,0,.2,1)}.aui-zoom-leave{animation-timing-function:cubic-bezier(.38,0,.24,1)}.aui-zoom-slow-enter,.aui-zoom-slow-leave{animation-duration:.3s;animation-fill-mode:both;animation-play-state:paused}.aui-zoom-slow-enter.aui-zoom-slow-enter-active,.aui-zoom-slow-leave.aui-zoom-slow-leave-active{animation-play-state:running;pointer-events:none}.aui-zoom-slow-enter.aui-zoom-slow-enter-active{animation-name:aui-zoom-in}.aui-zoom-slow-leave.aui-zoom-slow-leave-active{animation-name:aui-zoom-out}.aui-zoom-slow-enter{opacity:0;animation-timing-function:cubic-bezier(0,0,.2,1)}.aui-zoom-slow-leave{animation-timing-function:cubic-bezier(.38,0,.24,1)}.aui-fade-enter,.aui-fade-leave{animation-duration:.24s;animation-fill-mode:both;animation-play-state:paused}.aui-fade-enter.aui-fade-enter-active,.aui-fade-leave.aui-fade-leave-active{animation-play-state:running;pointer-events:none}.aui-fade-enter.aui-fade-enter-active{animation-name:aui-fade-in}.aui-fade-leave.aui-fade-leave-active{animation-name:aui-fade-out}.aui-fade-enter{opacity:0;animation-timing-function:linear}.aui-fade-leave{animation-timing-function:linear}.aui-fade-slow-enter,.aui-fade-slow-leave{animation-duration:.3s;animation-fill-mode:both;animation-play-state:paused}.aui-fade-slow-enter.aui-fade-slow-enter-active,.aui-fade-slow-leave.aui-fade-slow-leave-active{animation-play-state:running;pointer-events:none}.aui-fade-slow-enter.aui-fade-slow-enter-active{animation-name:aui-fade-in}.aui-fade-slow-leave.aui-fade-slow-leave-active{animation-name:aui-fade-out}.aui-fade-slow-enter{opacity:0;animation-timing-function:linear}.aui-fade-slow-leave{animation-timing-function:linear}.aui-dialog{margin:18vh auto 20px;display:flex;flex-direction:column;background-color:rgb(var(--aui-color-n-10));border-radius:var(--aui-border-radius-l);overflow:hidden;font-size:var(--aui-font-size-m);line-height:var(--aui-line-height-m);color:rgb(var(--aui-color-main-text))}:root .aui-dialog{box-shadow:0 2px 8px 0 rgba(var(--aui-color-origin-shadow),.2)}html[aui-theme-mode=light] .aui-dialog{box-shadow:0 2px 8px 0 rgba(var(--aui-color-origin-shadow),.2)}@media (prefers-color-scheme: dark){html[aui-theme-mode=system] .aui-dialog{box-shadow:0 4px 16px 0 rgba(var(--aui-color-origin-shadow),.75)}}html[aui-theme-mode=dark] .aui-dialog{box-shadow:0 4px 16px 0 rgba(var(--aui-color-origin-shadow),.75)}.aui-dialog aui-dialog-content{height:100%;overflow:auto}.aui-dialog aui-dialog-content::-webkit-scrollbar{width:4px;height:4px}.aui-dialog aui-dialog-content::-webkit-scrollbar-thumb{border-radius:2px;background-color:rgba(var(--aui-color-n-1),.2)}.aui-dialog aui-dialog-content::-webkit-scrollbar-corner{background-color:transparent}.aui-dialog aui-dialog-content:first-child .aui-dialog__content{padding-top:20px}.aui-dialog aui-dialog-content:last-child .aui-dialog__content{padding-bottom:20px}.aui-dialog__header{margin:0 20px;padding:20px 0 16px;display:flex;justify-content:space-between}.aui-dialog__header.hasDivider{margin-bottom:16px;border-bottom:1px solid rgb(var(--aui-color-divider))}.aui-dialog__header-title{width:100%;font-size:var(--aui-font-size-xl);line-height:var(--aui-line-height-xl);color:rgb(var(--aui-color-main-text));font-weight:var(--aui-font-weight-bold)}.aui-dialog__header-title>aui-icon:first-child{font-size:var(--aui-icon-size-xl);margin-right:var(--aui-spacing-m)}.aui-dialog__header-title>aui-icon:first-child[icon=info_circle_s]{color:rgb(var(--aui-color-primary))}.aui-dialog__header-title>aui-icon:first-child[icon=check_circle_s]{color:rgb(var(--aui-color-green))}.aui-dialog__header-title>aui-icon:first-child[icon=exclamation_circle_s]{color:rgb(var(--aui-color-yellow))}.aui-dialog__header-title>aui-icon:first-child[icon=exclamation_triangle_s]{color:rgb(var(--aui-color-red))}.aui-dialog__header-close{margin-left:var(--aui-spacing-xl);line-height:var(--aui-line-height-xl);font-size:var(--aui-font-size-l);color:rgb(var(--aui-color-n-4));cursor:pointer}.aui-dialog__header-close:hover{color:rgb(var(--aui-color-primary))}.aui-dialog__content{padding:0 20px;min-height:80px}.aui-dialog__footer{padding:20px;display:flex;justify-content:flex-end}.aui-dialog--small{width:400px}.aui-dialog--medium{width:600px}.aui-dialog--big{width:800px}.aui-dialog--large{width:960px}.aui-dialog--fit-content{width:-moz-fit-content;width:fit-content}.aui-dialog--fullscreen{width:90vw;height:calc(100vh - 40px);margin:0}.aui-dialog--fit-viewport{max-width:90vw;max-height:calc(100vh - 40px);margin:0}.aui-dialog--fit-viewport .aui-dialog__header{margin:0;padding:20px 20px 16px;border-bottom:1px solid rgb(var(--aui-color-divider))}.aui-dialog--fit-viewport .aui-dialog__footer{padding-top:16px;border-top:1px solid rgb(var(--aui-color-divider))}.aui-dialog--fit-viewport aui-dialog-content:not(:first-child) .aui-dialog__content{padding-top:16px}.aui-dialog--fit-viewport aui-dialog-content:not(:last-child) .aui-dialog__content{padding-bottom:16px}.aui-dialog--fit-viewport>ng-component{display:flex;flex-direction:column;overflow:auto}.aui-dialog--fit-viewport>ng-component:after{clear:both}\n"] }]
|
|
5822
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { portalOutlet: [{
|
|
5629
5823
|
type: ViewChild,
|
|
5630
5824
|
args: [CdkPortalOutlet, { static: true }]
|
|
5631
5825
|
}] } });
|
|
@@ -5644,10 +5838,15 @@ class DialogRef {
|
|
|
5644
5838
|
}
|
|
5645
5839
|
close(result = null) {
|
|
5646
5840
|
this.scrollable.ngOnDestroy();
|
|
5647
|
-
this.
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5841
|
+
this.dialogInstance.animationStateChanged
|
|
5842
|
+
.pipe(filter(event => event.phaseName === 'done' && event.toState === 'exit'), take(1))
|
|
5843
|
+
.subscribe(() => {
|
|
5844
|
+
this.overlayRef.detachBackdrop();
|
|
5845
|
+
this.overlayRef.dispose();
|
|
5846
|
+
this.afterClosed$.next(result);
|
|
5847
|
+
this.afterClosed$.complete();
|
|
5848
|
+
});
|
|
5849
|
+
this.dialogInstance.startExitAnimation();
|
|
5651
5850
|
}
|
|
5652
5851
|
afterOpen() {
|
|
5653
5852
|
return this.afterOpen$.asObservable();
|
|
@@ -5746,14 +5945,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
5746
5945
|
args: [{ selector: 'aui-confirm-dialog', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, template: "<div [class]=\"bem.block()\">\n <div [class]=\"bem.element('title')\">\n <span [class]=\"bem.element('icon', config.confirmType + '')\">\n <aui-icon\n [icon]=\"iconMap(config.confirmType)\"\n [background]=\"\n iconMap(config.confirmType).endsWith('_triangle_s')\n ? 'triangle'\n : 'circle'\n \"\n ></aui-icon>\n </span>\n <span>{{ config.title }}</span>\n </div>\n <div [class]=\"bem.element('content')\">\n <ng-container *ngIf=\"config.content\">\n <ng-container\n *ngIf=\"\n isTemplateRef(config.content) || isString(config.content);\n else componentTemplate\n \"\n >\n <ng-container\n *ngIf=\"isTemplateRef(config.content); else stringTemplate\"\n >\n <ng-template *ngTemplateOutlet=\"config.content\"></ng-template>\n </ng-container>\n <ng-template #stringTemplate>\n {{ config.content }}\n </ng-template>\n </ng-container>\n <ng-template #componentTemplate>\n <ng-container *ngComponentOutlet=\"$any(config.content)\"></ng-container>\n </ng-template>\n </ng-container>\n </div>\n <div [class]=\"bem.element('button-wrapper')\">\n <div>\n <button\n [aui-button]=\"config.confirmType\"\n [ngClass]=\"bem.element('confirm-button')\"\n [loading]=\"waitConfirm\"\n [disabled]=\"waitConfirm || waitCancel\"\n (click)=\"confirm()\"\n >\n {{ config.confirmText }}\n </button>\n <button\n *ngIf=\"config.cancelButton\"\n aui-button\n [ngClass]=\"bem.element('cancel-button')\"\n [loading]=\"waitCancel\"\n [disabled]=\"waitConfirm || waitCancel\"\n (click)=\"cancel()\"\n >\n {{ config.cancelText }}\n </button>\n </div>\n </div>\n</div>\n", styles: [".aui-confirm-dialog{margin:auto;padding:32px 32px 20px;border-radius:var(--aui-border-radius-m);min-width:400px;max-width:600px;background-color:rgb(var(--aui-color-n-10))}.aui-confirm-dialog__title{margin-bottom:var(--aui-spacing-m);font-size:var(--aui-font-size-xl);line-height:var(--aui-line-height-xl);color:rgb(var(--aui-color-main-text));font-weight:var(--aui-font-weight-bold);display:flex;word-wrap:break-word;word-break:break-all}.aui-confirm-dialog__icon{margin-right:var(--aui-spacing-m);font-size:var(--aui-icon-size-xl)}.aui-confirm-dialog__icon--primary,.aui-confirm-dialog__icon--warning{color:rgb(var(--aui-color-yellow))}.aui-confirm-dialog__icon--success{color:rgb(var(--aui-color-green))}.aui-confirm-dialog__icon--danger{color:rgb(var(--aui-color-red))}.aui-confirm-dialog__content{padding-left:calc(var(--aui-spacing-m) + var(--aui-icon-size-xl));font-size:var(--aui-font-size-m);line-height:var(--aui-line-height-m);color:rgb(var(--aui-color-secondary-text));word-wrap:break-word;word-break:break-all}.aui-confirm-dialog__button-wrapper{margin:20px -12px 0 0;display:flex;flex-direction:row-reverse}\n"] }]
|
|
5747
5946
|
}], ctorParameters: function () { return [{ type: DialogRef }, { type: i0.ChangeDetectorRef }]; } });
|
|
5748
5947
|
|
|
5749
|
-
class DialogConfig {
|
|
5750
|
-
constructor() {
|
|
5751
|
-
this.size = DialogSize.Big;
|
|
5752
|
-
this.hasBackdrop = true;
|
|
5753
|
-
this.fitViewport = false;
|
|
5754
|
-
}
|
|
5755
|
-
}
|
|
5756
|
-
|
|
5757
5948
|
const DIALOG_DATA = new InjectionToken('aui-dialog-data');
|
|
5758
5949
|
class DialogService {
|
|
5759
5950
|
constructor(overlay, injector, scrollDispatcher, ngZone) {
|
|
@@ -5780,6 +5971,7 @@ class DialogService {
|
|
|
5780
5971
|
confirm(config) {
|
|
5781
5972
|
const dialogRef = this.open(ConfirmDialogComponent, {
|
|
5782
5973
|
size: DialogSize.FitContent,
|
|
5974
|
+
noAnimation: !!config.noAnimation,
|
|
5783
5975
|
});
|
|
5784
5976
|
dialogRef.componentInstance.setConfig(config);
|
|
5785
5977
|
return new Promise((resolve, reject) => {
|
|
@@ -5820,8 +6012,10 @@ class DialogService {
|
|
|
5820
6012
|
positionStrategy: this.overlay.position().global(),
|
|
5821
6013
|
scrollStrategy: this.overlay.scrollStrategies.block(),
|
|
5822
6014
|
hasBackdrop: dialogConfig.hasBackdrop && !this.openDialogs.length,
|
|
5823
|
-
backdropClass:
|
|
5824
|
-
panelClass:
|
|
6015
|
+
backdropClass: DIALOG_BACKDROP_CLASS,
|
|
6016
|
+
panelClass: dialogConfig.fitViewport || dialogConfig.size === DialogSize.Fullscreen
|
|
6017
|
+
? DIALOG_OVERLAY_PANE_FIT_VIEWPORT_CLASS
|
|
6018
|
+
: DIALOG_OVERLAY_PANE_CLASS,
|
|
5825
6019
|
width: '100vw',
|
|
5826
6020
|
height: '100vh',
|
|
5827
6021
|
};
|
|
@@ -5830,6 +6024,7 @@ class DialogService {
|
|
|
5830
6024
|
const dialogPortal = new ComponentPortal(DialogComponent, config.viewContainerRef);
|
|
5831
6025
|
const dialogRef = overlayRef.attach(dialogPortal);
|
|
5832
6026
|
dialogRef.instance.config = config;
|
|
6027
|
+
dialogRef.instance.overlayRef = overlayRef;
|
|
5833
6028
|
return dialogRef.instance;
|
|
5834
6029
|
}
|
|
5835
6030
|
attachDialogContent(compOrTempRef, dialogIns, overlayRef, config) {
|
|
@@ -5867,8 +6062,6 @@ class DialogService {
|
|
|
5867
6062
|
this.openDialogs.splice(index, 1);
|
|
5868
6063
|
}
|
|
5869
6064
|
}
|
|
5870
|
-
DialogService.DIALOG_OVERLAY_PANE_CLASS = 'aui-dialog-overlay-pane';
|
|
5871
|
-
DialogService.DIALOG_BACKDROP_CLASS = 'aui-dialog-backdrop';
|
|
5872
6065
|
DialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: DialogService, deps: [{ token: i1$2.Overlay }, { token: i0.Injector }, { token: i1$2.ScrollDispatcher }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5873
6066
|
DialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: DialogService });
|
|
5874
6067
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: DialogService, decorators: [{
|
|
@@ -11618,5 +11811,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
11618
11811
|
* Generated bundle index. Do not edit.
|
|
11619
11812
|
*/
|
|
11620
11813
|
|
|
11621
|
-
export { AccordionComponent, AccordionItemComponent, AccordionItemContentDirective, AccordionItemHeaderDirective, AccordionModule, AnchorComponent, AnchorDirective, AnchorDirectiveChild, AnchorLabelDirective, AnchorModule, AnchorTreeComponent, AuiSelectValidators, AutoCompleteDirective, AutocompleteComponent, AutocompleteModule, AutocompletePlaceholderComponent, AutosizeDirective, BackTopComponent, BackTopModule, BaseTooltip, Bem, BreadcrumbComponent, BreadcrumbItemComponent, BreadcrumbModule, ButtonComponent, ButtonGroupComponent, ButtonModule, ButtonType, CONTROL_ITEM_HEIGHT, CalendarFooterComponent, CalendarHeaderComponent, CardComponent, CardFooterDirective, CardHeaderDirective, CardModule, CheckTagComponent, CheckboxComponent, CheckboxGroupComponent, CheckboxModule, ColorPickerComponent, ColorPickerModule, CommonForm, CommonFormControl, ComponentSize, ConfirmDialogConfig, ConfirmType, CssVarPipe, CustomAutoCompleteDirective, DATA, DATE, DATE_NAV_RANGES, DATE_TYPES, DAY, DAY_PANEL_COLUMN_COUNT, DAY_PANEL_ROW_COUNT, DIALOG_DATA, DISPLAY_DELAY, DateNavRange, DatePickerComponent, DatePickerModule, DatePickerPanelComponent, DatePickerTriggerComponent, DatePickerType, DateRangePickerPanelComponent, DialogCloseDirective, DialogComponent, DialogConfig, DialogContentComponent, DialogFooterComponent, DialogHeaderComponent, DialogModule, DialogRef, DialogService, DialogSize, DrawerComponent, DrawerContentDirective, DrawerFooterDirective, DrawerHeaderDirective, DrawerModule, DrawerRef, DrawerService, DrawerSize, DropdownActiveDirective, DropdownButtonComponent, DropdownDirective, DropdownModule, FixedSizeTableVirtualScrollDirective, FixedSizeTableVirtualScrollStrategy, FixedSizeVirtualScrollDirective, FormDirective, FormItemAddonDirective, FormItemComponent, FormItemControlDirective, FormItemErrorDirective, FormItemHintDirective, FormItemLabelDirective, FormItemWidth, FormModule, HIDDEN_DELAY, HOUR, HOUR_ITEMS, I18NInterfaceToken, I18nModule, I18nPipe, I18nService, ICON_REGISTER_PROVIDER_FACTORY, ICON_REGISTER_SERVICE_PROVIDER, INPUT_ERROR_KEY, IconComponent, IconModule, IconRegisterService, IncludesDirective, InlineAlertComponent, InlineAlertModule, InlineAlertTitleDirective, InlineAlertType, InputAddonAfterDirective, InputAddonBeforeDirective, InputComponent, InputGroupComponent, InputModule, InputPrefixDirective, InputSuffixDirective, LabelPosition, MESSAGE_CONFIG, MESSAGE_DEFAULT_CONFIG, MINUTE, MINUTE_ITEMS, MONTH, MONTH_PANEL_COLUMN_COUNT, MONTH_PANEL_ROW_COUNT, MenuComponent, MenuContentDirective, MenuGroupComponent, MenuGroupTitleDirective, MenuItemComponent, MenuItemType, MessageConfig, MessageModule, MessageService, MessageType, MultiSelectComponent, NOTIFICATION_CONFIG, NOTIFICATION_DEFAULT_CONFIG, NotificationComponent, NotificationModule, NotificationService, NumberInputComponent, OptionComponent, OptionContentDirective, OptionGroupComponent, OptionGroupTitleDirective, OptionPlaceholderComponent, PAGINATOR_INTL_PROVIDER, PAGINATOR_INTL_PROVIDER_FACTORY, PageEvent, PaginatorComponent, PaginatorIntl, PaginatorModule, PickerPanelComponent, RadioButtonComponent, RadioComponent, RadioGroupComponent, RadioModule, RadioSize, RangePickerComponent, RgbColorPipe, RgbaColorPipe, SECOND, SECOND_ITEMS, ScrollingModule, SearchComponent, SectionComponent, SectionTitleDirective, SelectAllStatus, SelectComponent, SelectModule, Side, SortDirective, SortHeaderComponent, SortModule, StatusBarComponent, StatusBarModule, StatusBarSize, StatusType, StepState, StepsComponent, StepsModule, SubmenuComponent, SuggestionComponent, SuggestionGroupComponent, SuggestionGroupTitleDirective, SwitchComponent, SwitchModule, TOOLTIP_COPY_INTL_INTL_PROVIDER, TOOLTIP_COPY_INTL_PROVIDER_FACTORY, TabBodyComponent, TabBodyPortalDirective, TabChangeEvent, TabComponent, TabContentDirective, TabContextService, TabGroupComponent, TabHeaderActiveIndicatorComponent, TabHeaderAddonDirective, TabHeaderComponent, TabLabelDirective, TabLabelWrapperDirective, TabSize, TabTitleDirective, TabType, TableCellDefDirective, TableCellDirective, TableColumnDefDirective, TableComponent, TableExpandButtonCellComponent, TableExpandPanelCellComponent, TableHeaderCellDefDirective, TableHeaderCellDirective, TableHeaderRowComponent, TableHeaderRowDefDirective, TableModule, TableOfContentsModule, TablePlaceholderDefDirective, TablePlaceholderOutletDirective, TableRowComponent, TableRowDefDirective, TableScrollWrapperDirective, TableScrollableDirective, TabsModule, TagComponent, TagModule, TagType, TagsInputComponent, ThemeModule, ThemePickerPipe, ThemeService, TimePickerComponent, TimePickerControlType, TimePickerModule, TimePickerPanelComponent, TocContainerDirective, TocContentDirective, TocLinkDirective, TooltipActiveDirective, TooltipComponent, TooltipCopyDirective, TooltipCopyIntl, TooltipDirective, TooltipModule, TooltipTrigger, TooltipType, TreeNodeComponent, TreeNodePlaceholderComponent, TreeSelectComponent, TreeSelectModule, VirtualForOfDirective, VirtualScrollViewportComponent, YEAR, YEAR_PANEL_COLUMN_COUNT, YEAR_PANEL_ROW_COUNT, _isNumberValue, _tableVirtualScrollDirectiveStrategyFactory, buildBem, coerceAttrBoolean, coerceNumber, coerceString, cssVar, en, getAnchorTreeItems, getSortDuplicateSortableIdError, getSortHeaderMissingIdError, getSortHeaderNotContainedWithinSortError, getSortInvalidDirectionError, handlePixel, isString, isTemplateRef, isTimePickerModel, isUndefined, last, observeMutationOn, observeResizeOn, publishRef, rgbColor, rgbaColor, scrollIntoView, sleep, watchContentExist, zh };
|
|
11814
|
+
export { ANIMATION_DURATION_CLASS_MAP, AccordionComponent, AccordionItemComponent, AccordionItemContentDirective, AccordionItemHeaderDirective, AccordionModule, AnchorComponent, AnchorDirective, AnchorDirectiveChild, AnchorLabelDirective, AnchorModule, AnchorTreeComponent, AuiSelectValidators, AutoCompleteDirective, AutocompleteComponent, AutocompleteModule, AutocompletePlaceholderComponent, AutosizeDirective, BackTopComponent, BackTopModule, BaseDialogConfig, BaseTooltip, Bem, BreadcrumbComponent, BreadcrumbItemComponent, BreadcrumbModule, ButtonComponent, ButtonGroupComponent, ButtonModule, ButtonType, CONTROL_ITEM_HEIGHT, CalendarFooterComponent, CalendarHeaderComponent, CardComponent, CardFooterDirective, CardHeaderDirective, CardModule, CheckTagComponent, CheckboxComponent, CheckboxGroupComponent, CheckboxModule, ColorPickerComponent, ColorPickerModule, CommonForm, CommonFormControl, ComponentSize, ConfirmDialogConfig, ConfirmType, CssVarPipe, CustomAutoCompleteDirective, DATA, DATE, DATE_NAV_RANGES, DATE_TYPES, DAY, DAY_PANEL_COLUMN_COUNT, DAY_PANEL_ROW_COUNT, DIALOG_BACKDROP_CLASS, DIALOG_DATA, DIALOG_OVERLAY_PANE_CLASS, DIALOG_OVERLAY_PANE_FIT_VIEWPORT_CLASS, DISPLAY_DELAY, DateNavRange, DatePickerComponent, DatePickerModule, DatePickerPanelComponent, DatePickerTriggerComponent, DatePickerType, DateRangePickerPanelComponent, DialogCloseDirective, DialogComponent, DialogConfig, DialogContentComponent, DialogFooterComponent, DialogHeaderComponent, DialogModule, DialogRef, DialogService, DialogSize, DrawerComponent, DrawerContentDirective, DrawerFooterDirective, DrawerHeaderDirective, DrawerModule, DrawerRef, DrawerService, DrawerSize, DropdownActiveDirective, DropdownButtonComponent, DropdownDirective, DropdownModule, FADE_CLASS_NAME_MAP, FADE_SLOW_CLASS_NAME_MAP, FixedSizeTableVirtualScrollDirective, FixedSizeTableVirtualScrollStrategy, FixedSizeVirtualScrollDirective, FormDirective, FormItemAddonDirective, FormItemComponent, FormItemControlDirective, FormItemErrorDirective, FormItemHintDirective, FormItemLabelDirective, FormItemWidth, FormModule, HIDDEN_DELAY, HOUR, HOUR_ITEMS, I18NInterfaceToken, I18nModule, I18nPipe, I18nService, ICON_REGISTER_PROVIDER_FACTORY, ICON_REGISTER_SERVICE_PROVIDER, INPUT_ERROR_KEY, IconComponent, IconModule, IconRegisterService, IncludesDirective, InlineAlertComponent, InlineAlertModule, InlineAlertTitleDirective, InlineAlertType, InputAddonAfterDirective, InputAddonBeforeDirective, InputComponent, InputGroupComponent, InputModule, InputPrefixDirective, InputSuffixDirective, LabelPosition, MESSAGE_CONFIG, MESSAGE_DEFAULT_CONFIG, MINUTE, MINUTE_ITEMS, MONTH, MONTH_PANEL_COLUMN_COUNT, MONTH_PANEL_ROW_COUNT, MenuComponent, MenuContentDirective, MenuGroupComponent, MenuGroupTitleDirective, MenuItemComponent, MenuItemType, MessageConfig, MessageModule, MessageService, MessageType, MultiSelectComponent, NOTIFICATION_CONFIG, NOTIFICATION_DEFAULT_CONFIG, NotificationComponent, NotificationModule, NotificationService, NumberInputComponent, OptionComponent, OptionContentDirective, OptionGroupComponent, OptionGroupTitleDirective, OptionPlaceholderComponent, PAGINATOR_INTL_PROVIDER, PAGINATOR_INTL_PROVIDER_FACTORY, PageEvent, PaginatorComponent, PaginatorIntl, PaginatorModule, PickerPanelComponent, RadioButtonComponent, RadioComponent, RadioGroupComponent, RadioModule, RadioSize, RangePickerComponent, RgbColorPipe, RgbaColorPipe, SECOND, SECOND_ITEMS, ScrollingModule, SearchComponent, SectionComponent, SectionTitleDirective, SelectAllStatus, SelectComponent, SelectModule, Side, SortDirective, SortHeaderComponent, SortModule, StatusBarComponent, StatusBarModule, StatusBarSize, StatusType, StepState, StepsComponent, StepsModule, SubmenuComponent, SuggestionComponent, SuggestionGroupComponent, SuggestionGroupTitleDirective, SwitchComponent, SwitchModule, TOOLTIP_COPY_INTL_INTL_PROVIDER, TOOLTIP_COPY_INTL_PROVIDER_FACTORY, TabBodyComponent, TabBodyPortalDirective, TabChangeEvent, TabComponent, TabContentDirective, TabContextService, TabGroupComponent, TabHeaderActiveIndicatorComponent, TabHeaderAddonDirective, TabHeaderComponent, TabLabelDirective, TabLabelWrapperDirective, TabSize, TabTitleDirective, TabType, TableCellDefDirective, TableCellDirective, TableColumnDefDirective, TableComponent, TableExpandButtonCellComponent, TableExpandPanelCellComponent, TableHeaderCellDefDirective, TableHeaderCellDirective, TableHeaderRowComponent, TableHeaderRowDefDirective, TableModule, TableOfContentsModule, TablePlaceholderDefDirective, TablePlaceholderOutletDirective, TableRowComponent, TableRowDefDirective, TableScrollWrapperDirective, TableScrollableDirective, TabsModule, TagComponent, TagModule, TagType, TagsInputComponent, ThemeModule, ThemePickerPipe, ThemeService, TimePickerComponent, TimePickerControlType, TimePickerModule, TimePickerPanelComponent, TocContainerDirective, TocContentDirective, TocLinkDirective, TooltipActiveDirective, TooltipComponent, TooltipCopyDirective, TooltipCopyIntl, TooltipDirective, TooltipModule, TooltipTrigger, TooltipType, TreeNodeComponent, TreeNodePlaceholderComponent, TreeSelectComponent, TreeSelectModule, VirtualForOfDirective, VirtualScrollViewportComponent, YEAR, YEAR_PANEL_COLUMN_COUNT, YEAR_PANEL_ROW_COUNT, ZOOM_CLASS_NAME_MAP, ZOOM_SLOW_CLASS_NAME_MAP, _isNumberValue, _tableVirtualScrollDirectiveStrategyFactory, buildBem, coerceAttrBoolean, coerceNumber, coerceString, cssVar, en, getAnchorTreeItems, getElementOffset, getSortDuplicateSortableIdError, getSortHeaderMissingIdError, getSortHeaderNotContainedWithinSortError, getSortInvalidDirectionError, handlePixel, isString, isTemplateRef, isTimePickerModel, isUndefined, last, observeMutationOn, observeResizeOn, publishRef, rgbColor, rgbaColor, scrollIntoView, sleep, watchContentExist, zh };
|
|
11622
11815
|
//# sourceMappingURL=alauda-ui.mjs.map
|