@ngx-smz/core 21.9.0-next.17 → 21.9.0-next.18
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/fesm2022/ngx-smz-core.mjs +151 -124
- package/fesm2022/ngx-smz-core.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ngx-smz-core.d.ts +9 -1
|
@@ -8318,6 +8318,7 @@ class DynamicDialogComponent {
|
|
|
8318
8318
|
}
|
|
8319
8319
|
maximize() {
|
|
8320
8320
|
this.maximized = !this.maximized;
|
|
8321
|
+
this.syncSizeAroundMaximize();
|
|
8321
8322
|
if (!this.config.modal) {
|
|
8322
8323
|
if (this.maximized) {
|
|
8323
8324
|
SmzDomHandler.addClass(document.body, 'p-overflow-hidden');
|
|
@@ -8328,6 +8329,32 @@ class DynamicDialogComponent {
|
|
|
8328
8329
|
}
|
|
8329
8330
|
this.onMaximize.emit({ maximized: this.maximized });
|
|
8330
8331
|
}
|
|
8332
|
+
/**
|
|
8333
|
+
* O dialog tem tamanho automatico (segue o conteudo). Conteudo que fixa tamanho em px enquanto o dialog esta
|
|
8334
|
+
* maximizado (tabelas, graficos, componentes que medem o contentor) o deixaria maior ao restaurar. Guarda o
|
|
8335
|
+
* tamanho de antes de maximizar e, ao restaurar, o usa como teto (max-width/max-height): o dialog volta ao
|
|
8336
|
+
* tamanho original e ainda pode encolher se o conteudo encolher. Tamanhos definidos pelo consumidor (`width`,
|
|
8337
|
+
* `height`, `style`) sao respeitados e nao sao tocados.
|
|
8338
|
+
*/
|
|
8339
|
+
syncSizeAroundMaximize() {
|
|
8340
|
+
const container = this.container;
|
|
8341
|
+
if (!container)
|
|
8342
|
+
return;
|
|
8343
|
+
container.style.removeProperty('max-width');
|
|
8344
|
+
container.style.removeProperty('max-height');
|
|
8345
|
+
if (this.maximized) {
|
|
8346
|
+
this.preMaximizeContainerWidth = container.offsetWidth;
|
|
8347
|
+
this.preMaximizeContainerHeight = container.offsetHeight;
|
|
8348
|
+
return;
|
|
8349
|
+
}
|
|
8350
|
+
const style = (this.config.style ?? {});
|
|
8351
|
+
if (this.preMaximizeContainerWidth > 0 && !this.config.width && style['width'] == null && style['maxWidth'] == null) {
|
|
8352
|
+
container.style.maxWidth = `${this.preMaximizeContainerWidth}px`;
|
|
8353
|
+
}
|
|
8354
|
+
if (this.preMaximizeContainerHeight > 0 && !this.config.height && style['height'] == null && style['maxHeight'] == null) {
|
|
8355
|
+
container.style.maxHeight = `${this.preMaximizeContainerHeight}px`;
|
|
8356
|
+
}
|
|
8357
|
+
}
|
|
8331
8358
|
enableModality() {
|
|
8332
8359
|
if (this.config.closable !== false && this.config.dismissableMask) {
|
|
8333
8360
|
this.maskClickListener = this.renderer.listen(this.wrapper, 'mousedown', (event) => {
|
|
@@ -8462,68 +8489,68 @@ class DynamicDialogComponent {
|
|
|
8462
8489
|
this.overlayPanel?.kill();
|
|
8463
8490
|
}
|
|
8464
8491
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: DynamicDialogComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: DynamicDialogConfig }, { token: DynamicDialogRef }, { token: i0.NgZone }, { token: SmzDynamicDialogConfig }, { token: SmzDockService }], target: i0.ɵɵFactoryTarget.Component });
|
|
8465
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: DynamicDialogComponent, isStandalone: false, selector: "smz-dynamicDialog", outputs: { onMaximize: "onMaximize", onMinimize: "onMinimize" }, host: { listeners: { "document:keydown.escape": "onEscapeHandler($event)" }, properties: { "attr.id": "this.domId" }, classAttribute: "p-element" }, viewQueries: [{ propertyName: "insertionPoint", first: true, predicate: DynamicDialogContent, descendants: true }, { propertyName: "insertionFooter", first: true, predicate: DynamicDialogFooter, descendants: true }, { propertyName: "maskViewChild", first: true, predicate: ["mask"], descendants: true }, { propertyName: "containerViewChild", first: true, predicate: ["dialogContainer"], descendants: true }, { propertyName: "highlightPanelViewChild", first: true, predicate: ["highlightPanel"], descendants: true }, { propertyName: "overlayPanelClipViewChild", first: true, predicate: ["overlayPanelClip"], descendants: true }, { propertyName: "overlayBlendClipViewChild", first: true, predicate: ["overlayBlendClip"], descendants: true }], ngImport: i0, template: `
|
|
8466
|
-
|
|
8467
|
-
@if (dialogConfig.data.behaviors.showAsLinkedOverlayPanel) {
|
|
8468
|
-
<div #overlayBlendClip id="blend-clip" class="fixed inset-0" [ngClass]="dialogConfig.data.overlayPanel?.overlayBlendStylesClass"></div>
|
|
8469
|
-
}
|
|
8470
|
-
@if (dialogConfig.data.behaviors.showAsLinkedOverlayPanel) {
|
|
8471
|
-
<div #overlayPanelClip id="overlay-clip" class="fixed inset-0 p-component-overlay p-component-overlay-enter" [ngClass]="dialogConfig.data.overlayPanel?.overlayPanelStylesClass"></div>
|
|
8472
|
-
}
|
|
8473
|
-
@if (dialogConfig.data.behaviors.showAsLinkedOverlayPanel) {
|
|
8474
|
-
<div #highlightPanel id="highlight-clip" class="fixed inset-0" [ngClass]="dialogConfig.data.overlayPanel?.hightlightStyleClass"></div>
|
|
8475
|
-
}
|
|
8476
|
-
<div #mask id="dialog-mask" [attr.data-testid]="buildDialogTestId('mask')" [ngClass]="{'p-dialog-mask-free': dialogConfig.data.behaviors.showAsLinkedOverlayPanel, 'p-component-overlay p-component-overlay-enter' : config.modal !== false && !dialogConfig.data.behaviors.showAsLinkedOverlayPanel, 'p-dialog-mask-scrollblocker': config.modal !== false, 'smz-dialog-minimized': minimized }" class="smz_form_grid_container p-dialog-mask">
|
|
8477
|
-
@if (visible) {
|
|
8478
|
-
<div #dialogContainer id="dialog-container" [attr.data-testid]="buildDialogTestId()" [smzAutoFocus]="config.autoFocus" [ngClass]="{'p-dialog p-dynamic-dialog p-component': true, 'p-dialog-rtl': config.rtl, 'p-dialog-maximized': maximized}" [ngStyle]="config.style" class="{{ config.styleClass }} {{ dialogConfig?.data?.containerStyleClass }}"
|
|
8479
|
-
[@animation]="{value: 'visible', params: {transform: transformOptions, transition: config.transitionOptions || '150ms cubic-bezier(0, 0, 0.2, 1)'}}"
|
|
8480
|
-
(@animation.start)="onAnimationStart($event)" (@animation.done)="onAnimationEnd($event)" role="dialog"
|
|
8481
|
-
[style.width]="config.width" [style.height]="config.height">
|
|
8482
|
-
@if (config.showHeader === false ? false: true) {
|
|
8483
|
-
<div class="p-dialog-header" [attr.data-testid]="buildDialogTestId('header')" [ngStyle]="config.headerStyle">
|
|
8484
|
-
<div class="p-dialog-title w-full" [attr.data-testid]="buildDialogTestId('title')" [innerHTML]="config.header | safeHtml"></div>
|
|
8485
|
-
<div class="p-dialog-header-icons flex gap-3" [ngClass]="{ 'disable-a': dialogConfig.data._context.isGlobalDisabled }">
|
|
8486
|
-
@for (topbarButton of dialogConfig.data.topbarButtons; track $index) {
|
|
8487
|
-
@if (topbarButton.visible) {
|
|
8488
|
-
<button [ngClass]="'p-dialog-header-icon p-dialog-header-maximize p-link'" type="button" [attr.data-testid]="buildTopbarButtonTestId(topbarButton, $index)" (click)="topbarButton.onClick()" [smzTooltip]="topbarButton.tooltip">
|
|
8489
|
-
<span [ngClass]="topbarButton.class"></span>
|
|
8490
|
-
</button>
|
|
8491
|
-
}
|
|
8492
|
-
}
|
|
8493
|
-
@if (config.minimizable !== false) {
|
|
8494
|
-
<button [ngClass]="'p-dialog-header-icon p-dialog-header-maximize p-link'" type="button" [attr.data-testid]="buildDialogTestId('minimize')" (click)="minimize()" (keydown.enter)="minimize()">
|
|
8495
|
-
<span class="p-dialog-header-close-icon fa-solid fa-minus"></span>
|
|
8496
|
-
</button>
|
|
8497
|
-
}
|
|
8498
|
-
@if (config.maximizable !== false && !maximized) {
|
|
8499
|
-
<button [ngClass]="'p-dialog-header-icon p-dialog-header-maximize p-link'" type="button" [attr.data-testid]="buildDialogTestId('maximize')" (click)="maximize()" (keydown.enter)="maximize()">
|
|
8500
|
-
<span class="p-dialog-header-close-icon" [ngClass]="maximizeIcon"></span>
|
|
8501
|
-
</button>
|
|
8502
|
-
}
|
|
8503
|
-
@if (maximized && !config.blockRestoreButton) {
|
|
8504
|
-
<button [ngClass]="'p-dialog-header-icon p-dialog-header-maximize p-link'" type="button" [attr.data-testid]="buildDialogTestId('restore')" (click)="maximize()" (keydown.enter)="maximize()">
|
|
8505
|
-
<span class="p-dialog-header-close-icon" [ngClass]="minimizeIcon"></span>
|
|
8506
|
-
</button>
|
|
8507
|
-
}
|
|
8508
|
-
@if (config.closable !== false) {
|
|
8509
|
-
<button [ngClass]="'p-dialog-header-icon p-dialog-header-maximize p-link'" type="button" [attr.data-testid]="buildDialogTestId('close')" (click)="hide()" (keydown.enter)="hide()">
|
|
8510
|
-
<span class="p-dialog-header-close-icon fa-solid fa-xmark"></span>
|
|
8511
|
-
</button>
|
|
8512
|
-
}
|
|
8513
|
-
</div>
|
|
8514
|
-
</div>
|
|
8515
|
-
}
|
|
8516
|
-
<div class="p-dialog-content {{ dialogConfig?.data?.contentStyleClass }}" [attr.data-testid]="buildDialogTestId('content')" [ngStyle]="config.contentStyle" [ngClass]="{ 'disable-ui-dialog-content': dialogConfig.data._context.isGlobalDisabled }">
|
|
8517
|
-
<ng-template pDynamicDialogContent></ng-template>
|
|
8518
|
-
</div>
|
|
8519
|
-
@if (config.footer) {
|
|
8520
|
-
<div class="p-dialog-footer" [attr.data-testid]="buildDialogTestId('footer')" [ngStyle]="config.footerStyle" [ngClass]="{ 'disable-container': dialogConfig.data._context.isGlobalDisabled }">
|
|
8521
|
-
<ng-template pDynamicDialogFooter></ng-template>
|
|
8522
|
-
</div>
|
|
8523
|
-
}
|
|
8524
|
-
</div>
|
|
8525
|
-
}
|
|
8526
|
-
</div>
|
|
8492
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: DynamicDialogComponent, isStandalone: false, selector: "smz-dynamicDialog", outputs: { onMaximize: "onMaximize", onMinimize: "onMinimize" }, host: { listeners: { "document:keydown.escape": "onEscapeHandler($event)" }, properties: { "attr.id": "this.domId" }, classAttribute: "p-element" }, viewQueries: [{ propertyName: "insertionPoint", first: true, predicate: DynamicDialogContent, descendants: true }, { propertyName: "insertionFooter", first: true, predicate: DynamicDialogFooter, descendants: true }, { propertyName: "maskViewChild", first: true, predicate: ["mask"], descendants: true }, { propertyName: "containerViewChild", first: true, predicate: ["dialogContainer"], descendants: true }, { propertyName: "highlightPanelViewChild", first: true, predicate: ["highlightPanel"], descendants: true }, { propertyName: "overlayPanelClipViewChild", first: true, predicate: ["overlayPanelClip"], descendants: true }, { propertyName: "overlayBlendClipViewChild", first: true, predicate: ["overlayBlendClip"], descendants: true }], ngImport: i0, template: `
|
|
8493
|
+
|
|
8494
|
+
@if (dialogConfig.data.behaviors.showAsLinkedOverlayPanel) {
|
|
8495
|
+
<div #overlayBlendClip id="blend-clip" class="fixed inset-0" [ngClass]="dialogConfig.data.overlayPanel?.overlayBlendStylesClass"></div>
|
|
8496
|
+
}
|
|
8497
|
+
@if (dialogConfig.data.behaviors.showAsLinkedOverlayPanel) {
|
|
8498
|
+
<div #overlayPanelClip id="overlay-clip" class="fixed inset-0 p-component-overlay p-component-overlay-enter" [ngClass]="dialogConfig.data.overlayPanel?.overlayPanelStylesClass"></div>
|
|
8499
|
+
}
|
|
8500
|
+
@if (dialogConfig.data.behaviors.showAsLinkedOverlayPanel) {
|
|
8501
|
+
<div #highlightPanel id="highlight-clip" class="fixed inset-0" [ngClass]="dialogConfig.data.overlayPanel?.hightlightStyleClass"></div>
|
|
8502
|
+
}
|
|
8503
|
+
<div #mask id="dialog-mask" [attr.data-testid]="buildDialogTestId('mask')" [ngClass]="{'p-dialog-mask-free': dialogConfig.data.behaviors.showAsLinkedOverlayPanel, 'p-component-overlay p-component-overlay-enter' : config.modal !== false && !dialogConfig.data.behaviors.showAsLinkedOverlayPanel, 'p-dialog-mask-scrollblocker': config.modal !== false, 'smz-dialog-minimized': minimized }" class="smz_form_grid_container p-dialog-mask">
|
|
8504
|
+
@if (visible) {
|
|
8505
|
+
<div #dialogContainer id="dialog-container" [attr.data-testid]="buildDialogTestId()" [smzAutoFocus]="config.autoFocus" [ngClass]="{'p-dialog p-dynamic-dialog p-component': true, 'p-dialog-rtl': config.rtl, 'p-dialog-maximized': maximized}" [ngStyle]="config.style" class="{{ config.styleClass }} {{ dialogConfig?.data?.containerStyleClass }}"
|
|
8506
|
+
[@animation]="{value: 'visible', params: {transform: transformOptions, transition: config.transitionOptions || '150ms cubic-bezier(0, 0, 0.2, 1)'}}"
|
|
8507
|
+
(@animation.start)="onAnimationStart($event)" (@animation.done)="onAnimationEnd($event)" role="dialog"
|
|
8508
|
+
[style.width]="config.width" [style.height]="config.height">
|
|
8509
|
+
@if (config.showHeader === false ? false: true) {
|
|
8510
|
+
<div class="p-dialog-header" [attr.data-testid]="buildDialogTestId('header')" [ngStyle]="config.headerStyle">
|
|
8511
|
+
<div class="p-dialog-title w-full" [attr.data-testid]="buildDialogTestId('title')" [innerHTML]="config.header | safeHtml"></div>
|
|
8512
|
+
<div class="p-dialog-header-icons flex gap-3" [ngClass]="{ 'disable-a': dialogConfig.data._context.isGlobalDisabled }">
|
|
8513
|
+
@for (topbarButton of dialogConfig.data.topbarButtons; track $index) {
|
|
8514
|
+
@if (topbarButton.visible) {
|
|
8515
|
+
<button [ngClass]="'p-dialog-header-icon p-dialog-header-maximize p-link'" type="button" [attr.data-testid]="buildTopbarButtonTestId(topbarButton, $index)" (click)="topbarButton.onClick()" [smzTooltip]="topbarButton.tooltip">
|
|
8516
|
+
<span [ngClass]="topbarButton.class"></span>
|
|
8517
|
+
</button>
|
|
8518
|
+
}
|
|
8519
|
+
}
|
|
8520
|
+
@if (config.minimizable !== false) {
|
|
8521
|
+
<button [ngClass]="'p-dialog-header-icon p-dialog-header-maximize p-link'" type="button" [attr.data-testid]="buildDialogTestId('minimize')" (click)="minimize()" (keydown.enter)="minimize()">
|
|
8522
|
+
<span class="p-dialog-header-close-icon fa-solid fa-minus"></span>
|
|
8523
|
+
</button>
|
|
8524
|
+
}
|
|
8525
|
+
@if (config.maximizable !== false && !maximized) {
|
|
8526
|
+
<button [ngClass]="'p-dialog-header-icon p-dialog-header-maximize p-link'" type="button" [attr.data-testid]="buildDialogTestId('maximize')" (click)="maximize()" (keydown.enter)="maximize()">
|
|
8527
|
+
<span class="p-dialog-header-close-icon" [ngClass]="maximizeIcon"></span>
|
|
8528
|
+
</button>
|
|
8529
|
+
}
|
|
8530
|
+
@if (maximized && !config.blockRestoreButton) {
|
|
8531
|
+
<button [ngClass]="'p-dialog-header-icon p-dialog-header-maximize p-link'" type="button" [attr.data-testid]="buildDialogTestId('restore')" (click)="maximize()" (keydown.enter)="maximize()">
|
|
8532
|
+
<span class="p-dialog-header-close-icon" [ngClass]="minimizeIcon"></span>
|
|
8533
|
+
</button>
|
|
8534
|
+
}
|
|
8535
|
+
@if (config.closable !== false) {
|
|
8536
|
+
<button [ngClass]="'p-dialog-header-icon p-dialog-header-maximize p-link'" type="button" [attr.data-testid]="buildDialogTestId('close')" (click)="hide()" (keydown.enter)="hide()">
|
|
8537
|
+
<span class="p-dialog-header-close-icon fa-solid fa-xmark"></span>
|
|
8538
|
+
</button>
|
|
8539
|
+
}
|
|
8540
|
+
</div>
|
|
8541
|
+
</div>
|
|
8542
|
+
}
|
|
8543
|
+
<div class="p-dialog-content {{ dialogConfig?.data?.contentStyleClass }}" [attr.data-testid]="buildDialogTestId('content')" [ngStyle]="config.contentStyle" [ngClass]="{ 'disable-ui-dialog-content': dialogConfig.data._context.isGlobalDisabled }">
|
|
8544
|
+
<ng-template pDynamicDialogContent></ng-template>
|
|
8545
|
+
</div>
|
|
8546
|
+
@if (config.footer) {
|
|
8547
|
+
<div class="p-dialog-footer" [attr.data-testid]="buildDialogTestId('footer')" [ngStyle]="config.footerStyle" [ngClass]="{ 'disable-container': dialogConfig.data._context.isGlobalDisabled }">
|
|
8548
|
+
<ng-template pDynamicDialogFooter></ng-template>
|
|
8549
|
+
</div>
|
|
8550
|
+
}
|
|
8551
|
+
</div>
|
|
8552
|
+
}
|
|
8553
|
+
</div>
|
|
8527
8554
|
`, isInline: true, styles: [".p-dialog-mask{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none}.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog-mask-free{position:fixed;top:0;left:0;width:100%;height:100%;display:block!important;pointer-events:none}.p-dialog{display:flex;flex-direction:column;pointer-events:auto;max-height:90%;transform:scale(1);position:relative;padding:unset}.p-dialog-content{overflow-y:auto;flex-grow:1}.p-dialog-header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{display:flex;align-items:center}.p-dialog .p-dialog-header-icon{display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-top .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog{margin:.75rem;transform:translateZ(0)}.p-dialog-maximized{-webkit-transition:none;transition:none;transform:none;width:100vw!important;height:100vh!important;top:0!important;left:0!important;max-height:100%;height:100%}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start;align-items:flex-start}.p-dialog-top-right{justify-content:flex-end;align-items:flex-start}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{justify-content:flex-start;align-items:flex-end}.p-dialog-bottom-right{justify-content:flex-end;align-items:flex-end}.p-dialog .p-resizable-handle{position:absolute;font-size:.1px;display:block;cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.p-confirm-dialog .p-dialog-content{display:flex;align-items:center}.p-component-overlay{background-color:#0006}.p-component-overlay-enter{animation:smz-dialog-mask-enter var(--smz-duration, .15s) forwards}.p-component-overlay-leave{animation:smz-dialog-mask-leave var(--smz-duration, .15s) forwards}@keyframes smz-dialog-mask-enter{0%{background-color:transparent}to{background-color:#0006}}@keyframes smz-dialog-mask-leave{0%{background-color:#0006}to{background-color:transparent}}.p-dialog{background:rgb(var(--smz-color-surface-2));color:rgb(var(--smz-color-fg));font-family:var(--smz-font-sans);font-size:var(--smz-text-md);border:1px solid rgb(var(--smz-color-line));border-radius:var(--smz-radius-overlay);box-shadow:var(--smz-shadow-overlay)}.p-dialog-header{padding:1.25rem;gap:.5rem;background:transparent;color:inherit;border-top-left-radius:var(--smz-radius-overlay);border-top-right-radius:var(--smz-radius-overlay)}.p-dialog-title{font-size:1.25rem;font-weight:600}.p-dialog-content{padding:0 1.25rem 1.25rem;background:transparent;color:inherit}.p-dialog-footer{display:flex;justify-content:flex-end;gap:.5rem;padding:0 1.25rem 1.25rem;background:transparent;border-bottom-left-radius:var(--smz-radius-overlay);border-bottom-right-radius:var(--smz-radius-overlay)}.p-dialog-footer button{width:auto}.p-dialog .p-dialog-header-icon{width:2rem;height:2rem;border:0;border-radius:9999px;background:transparent;color:rgb(var(--smz-color-fg-muted));cursor:pointer;transition:background-color var(--smz-duration)}.p-dialog .p-dialog-header-icon:hover{background:rgb(var(--smz-color-surface-3));color:rgb(var(--smz-color-fg))}.p-dialog .p-dialog-header-icon:focus-visible{outline:2px solid rgb(var(--smz-color-focus))}.p-dialog-footer .p-toolbar,.p-dialog-footer [class*=toolbar],.p-dialog-footer ui-toolbar{border:0!important;background:transparent!important;padding:0!important}.p-dialog-mask[popover]{margin:0;padding:0;border:0;background:transparent;color:inherit;overflow:visible;inset:0;max-width:none;max-height:none;width:100%;height:100%}.p-dialog-mask[popover]::backdrop{display:none}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => i1.NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgStyle), selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i0.forwardRef(() => SmzTooltipDirective), selector: "[smzTooltip]", inputs: ["smzTooltip", "tooltipPosition", "showDelay", "hideDelay", "tooltipEvent", "escape", "tooltipStyleClass", "tooltipZIndex", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "directive", type: i0.forwardRef(() => SmzAutoFocusDirective), selector: "[smzAutoFocus]", inputs: ["smzAutoFocus"] }, { kind: "directive", type: i0.forwardRef(() => DynamicDialogContent), selector: "[pDynamicDialogContent]" }, { kind: "directive", type: i0.forwardRef(() => DynamicDialogFooter), selector: "[pDynamicDialogFooter]" }, { kind: "pipe", type: i0.forwardRef(() => SafeHtmlPipe$1), name: "safeHtml" }], animations: [
|
|
8528
8555
|
trigger('animation', [
|
|
8529
8556
|
transition('void => visible', [
|
|
@@ -8537,68 +8564,68 @@ class DynamicDialogComponent {
|
|
|
8537
8564
|
}
|
|
8538
8565
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: DynamicDialogComponent, decorators: [{
|
|
8539
8566
|
type: Component,
|
|
8540
|
-
args: [{ selector: 'smz-dynamicDialog', template: `
|
|
8541
|
-
|
|
8542
|
-
@if (dialogConfig.data.behaviors.showAsLinkedOverlayPanel) {
|
|
8543
|
-
<div #overlayBlendClip id="blend-clip" class="fixed inset-0" [ngClass]="dialogConfig.data.overlayPanel?.overlayBlendStylesClass"></div>
|
|
8544
|
-
}
|
|
8545
|
-
@if (dialogConfig.data.behaviors.showAsLinkedOverlayPanel) {
|
|
8546
|
-
<div #overlayPanelClip id="overlay-clip" class="fixed inset-0 p-component-overlay p-component-overlay-enter" [ngClass]="dialogConfig.data.overlayPanel?.overlayPanelStylesClass"></div>
|
|
8547
|
-
}
|
|
8548
|
-
@if (dialogConfig.data.behaviors.showAsLinkedOverlayPanel) {
|
|
8549
|
-
<div #highlightPanel id="highlight-clip" class="fixed inset-0" [ngClass]="dialogConfig.data.overlayPanel?.hightlightStyleClass"></div>
|
|
8550
|
-
}
|
|
8551
|
-
<div #mask id="dialog-mask" [attr.data-testid]="buildDialogTestId('mask')" [ngClass]="{'p-dialog-mask-free': dialogConfig.data.behaviors.showAsLinkedOverlayPanel, 'p-component-overlay p-component-overlay-enter' : config.modal !== false && !dialogConfig.data.behaviors.showAsLinkedOverlayPanel, 'p-dialog-mask-scrollblocker': config.modal !== false, 'smz-dialog-minimized': minimized }" class="smz_form_grid_container p-dialog-mask">
|
|
8552
|
-
@if (visible) {
|
|
8553
|
-
<div #dialogContainer id="dialog-container" [attr.data-testid]="buildDialogTestId()" [smzAutoFocus]="config.autoFocus" [ngClass]="{'p-dialog p-dynamic-dialog p-component': true, 'p-dialog-rtl': config.rtl, 'p-dialog-maximized': maximized}" [ngStyle]="config.style" class="{{ config.styleClass }} {{ dialogConfig?.data?.containerStyleClass }}"
|
|
8554
|
-
[@animation]="{value: 'visible', params: {transform: transformOptions, transition: config.transitionOptions || '150ms cubic-bezier(0, 0, 0.2, 1)'}}"
|
|
8555
|
-
(@animation.start)="onAnimationStart($event)" (@animation.done)="onAnimationEnd($event)" role="dialog"
|
|
8556
|
-
[style.width]="config.width" [style.height]="config.height">
|
|
8557
|
-
@if (config.showHeader === false ? false: true) {
|
|
8558
|
-
<div class="p-dialog-header" [attr.data-testid]="buildDialogTestId('header')" [ngStyle]="config.headerStyle">
|
|
8559
|
-
<div class="p-dialog-title w-full" [attr.data-testid]="buildDialogTestId('title')" [innerHTML]="config.header | safeHtml"></div>
|
|
8560
|
-
<div class="p-dialog-header-icons flex gap-3" [ngClass]="{ 'disable-a': dialogConfig.data._context.isGlobalDisabled }">
|
|
8561
|
-
@for (topbarButton of dialogConfig.data.topbarButtons; track $index) {
|
|
8562
|
-
@if (topbarButton.visible) {
|
|
8563
|
-
<button [ngClass]="'p-dialog-header-icon p-dialog-header-maximize p-link'" type="button" [attr.data-testid]="buildTopbarButtonTestId(topbarButton, $index)" (click)="topbarButton.onClick()" [smzTooltip]="topbarButton.tooltip">
|
|
8564
|
-
<span [ngClass]="topbarButton.class"></span>
|
|
8565
|
-
</button>
|
|
8566
|
-
}
|
|
8567
|
-
}
|
|
8568
|
-
@if (config.minimizable !== false) {
|
|
8569
|
-
<button [ngClass]="'p-dialog-header-icon p-dialog-header-maximize p-link'" type="button" [attr.data-testid]="buildDialogTestId('minimize')" (click)="minimize()" (keydown.enter)="minimize()">
|
|
8570
|
-
<span class="p-dialog-header-close-icon fa-solid fa-minus"></span>
|
|
8571
|
-
</button>
|
|
8572
|
-
}
|
|
8573
|
-
@if (config.maximizable !== false && !maximized) {
|
|
8574
|
-
<button [ngClass]="'p-dialog-header-icon p-dialog-header-maximize p-link'" type="button" [attr.data-testid]="buildDialogTestId('maximize')" (click)="maximize()" (keydown.enter)="maximize()">
|
|
8575
|
-
<span class="p-dialog-header-close-icon" [ngClass]="maximizeIcon"></span>
|
|
8576
|
-
</button>
|
|
8577
|
-
}
|
|
8578
|
-
@if (maximized && !config.blockRestoreButton) {
|
|
8579
|
-
<button [ngClass]="'p-dialog-header-icon p-dialog-header-maximize p-link'" type="button" [attr.data-testid]="buildDialogTestId('restore')" (click)="maximize()" (keydown.enter)="maximize()">
|
|
8580
|
-
<span class="p-dialog-header-close-icon" [ngClass]="minimizeIcon"></span>
|
|
8581
|
-
</button>
|
|
8582
|
-
}
|
|
8583
|
-
@if (config.closable !== false) {
|
|
8584
|
-
<button [ngClass]="'p-dialog-header-icon p-dialog-header-maximize p-link'" type="button" [attr.data-testid]="buildDialogTestId('close')" (click)="hide()" (keydown.enter)="hide()">
|
|
8585
|
-
<span class="p-dialog-header-close-icon fa-solid fa-xmark"></span>
|
|
8586
|
-
</button>
|
|
8587
|
-
}
|
|
8588
|
-
</div>
|
|
8589
|
-
</div>
|
|
8590
|
-
}
|
|
8591
|
-
<div class="p-dialog-content {{ dialogConfig?.data?.contentStyleClass }}" [attr.data-testid]="buildDialogTestId('content')" [ngStyle]="config.contentStyle" [ngClass]="{ 'disable-ui-dialog-content': dialogConfig.data._context.isGlobalDisabled }">
|
|
8592
|
-
<ng-template pDynamicDialogContent></ng-template>
|
|
8593
|
-
</div>
|
|
8594
|
-
@if (config.footer) {
|
|
8595
|
-
<div class="p-dialog-footer" [attr.data-testid]="buildDialogTestId('footer')" [ngStyle]="config.footerStyle" [ngClass]="{ 'disable-container': dialogConfig.data._context.isGlobalDisabled }">
|
|
8596
|
-
<ng-template pDynamicDialogFooter></ng-template>
|
|
8597
|
-
</div>
|
|
8598
|
-
}
|
|
8599
|
-
</div>
|
|
8600
|
-
}
|
|
8601
|
-
</div>
|
|
8567
|
+
args: [{ selector: 'smz-dynamicDialog', template: `
|
|
8568
|
+
|
|
8569
|
+
@if (dialogConfig.data.behaviors.showAsLinkedOverlayPanel) {
|
|
8570
|
+
<div #overlayBlendClip id="blend-clip" class="fixed inset-0" [ngClass]="dialogConfig.data.overlayPanel?.overlayBlendStylesClass"></div>
|
|
8571
|
+
}
|
|
8572
|
+
@if (dialogConfig.data.behaviors.showAsLinkedOverlayPanel) {
|
|
8573
|
+
<div #overlayPanelClip id="overlay-clip" class="fixed inset-0 p-component-overlay p-component-overlay-enter" [ngClass]="dialogConfig.data.overlayPanel?.overlayPanelStylesClass"></div>
|
|
8574
|
+
}
|
|
8575
|
+
@if (dialogConfig.data.behaviors.showAsLinkedOverlayPanel) {
|
|
8576
|
+
<div #highlightPanel id="highlight-clip" class="fixed inset-0" [ngClass]="dialogConfig.data.overlayPanel?.hightlightStyleClass"></div>
|
|
8577
|
+
}
|
|
8578
|
+
<div #mask id="dialog-mask" [attr.data-testid]="buildDialogTestId('mask')" [ngClass]="{'p-dialog-mask-free': dialogConfig.data.behaviors.showAsLinkedOverlayPanel, 'p-component-overlay p-component-overlay-enter' : config.modal !== false && !dialogConfig.data.behaviors.showAsLinkedOverlayPanel, 'p-dialog-mask-scrollblocker': config.modal !== false, 'smz-dialog-minimized': minimized }" class="smz_form_grid_container p-dialog-mask">
|
|
8579
|
+
@if (visible) {
|
|
8580
|
+
<div #dialogContainer id="dialog-container" [attr.data-testid]="buildDialogTestId()" [smzAutoFocus]="config.autoFocus" [ngClass]="{'p-dialog p-dynamic-dialog p-component': true, 'p-dialog-rtl': config.rtl, 'p-dialog-maximized': maximized}" [ngStyle]="config.style" class="{{ config.styleClass }} {{ dialogConfig?.data?.containerStyleClass }}"
|
|
8581
|
+
[@animation]="{value: 'visible', params: {transform: transformOptions, transition: config.transitionOptions || '150ms cubic-bezier(0, 0, 0.2, 1)'}}"
|
|
8582
|
+
(@animation.start)="onAnimationStart($event)" (@animation.done)="onAnimationEnd($event)" role="dialog"
|
|
8583
|
+
[style.width]="config.width" [style.height]="config.height">
|
|
8584
|
+
@if (config.showHeader === false ? false: true) {
|
|
8585
|
+
<div class="p-dialog-header" [attr.data-testid]="buildDialogTestId('header')" [ngStyle]="config.headerStyle">
|
|
8586
|
+
<div class="p-dialog-title w-full" [attr.data-testid]="buildDialogTestId('title')" [innerHTML]="config.header | safeHtml"></div>
|
|
8587
|
+
<div class="p-dialog-header-icons flex gap-3" [ngClass]="{ 'disable-a': dialogConfig.data._context.isGlobalDisabled }">
|
|
8588
|
+
@for (topbarButton of dialogConfig.data.topbarButtons; track $index) {
|
|
8589
|
+
@if (topbarButton.visible) {
|
|
8590
|
+
<button [ngClass]="'p-dialog-header-icon p-dialog-header-maximize p-link'" type="button" [attr.data-testid]="buildTopbarButtonTestId(topbarButton, $index)" (click)="topbarButton.onClick()" [smzTooltip]="topbarButton.tooltip">
|
|
8591
|
+
<span [ngClass]="topbarButton.class"></span>
|
|
8592
|
+
</button>
|
|
8593
|
+
}
|
|
8594
|
+
}
|
|
8595
|
+
@if (config.minimizable !== false) {
|
|
8596
|
+
<button [ngClass]="'p-dialog-header-icon p-dialog-header-maximize p-link'" type="button" [attr.data-testid]="buildDialogTestId('minimize')" (click)="minimize()" (keydown.enter)="minimize()">
|
|
8597
|
+
<span class="p-dialog-header-close-icon fa-solid fa-minus"></span>
|
|
8598
|
+
</button>
|
|
8599
|
+
}
|
|
8600
|
+
@if (config.maximizable !== false && !maximized) {
|
|
8601
|
+
<button [ngClass]="'p-dialog-header-icon p-dialog-header-maximize p-link'" type="button" [attr.data-testid]="buildDialogTestId('maximize')" (click)="maximize()" (keydown.enter)="maximize()">
|
|
8602
|
+
<span class="p-dialog-header-close-icon" [ngClass]="maximizeIcon"></span>
|
|
8603
|
+
</button>
|
|
8604
|
+
}
|
|
8605
|
+
@if (maximized && !config.blockRestoreButton) {
|
|
8606
|
+
<button [ngClass]="'p-dialog-header-icon p-dialog-header-maximize p-link'" type="button" [attr.data-testid]="buildDialogTestId('restore')" (click)="maximize()" (keydown.enter)="maximize()">
|
|
8607
|
+
<span class="p-dialog-header-close-icon" [ngClass]="minimizeIcon"></span>
|
|
8608
|
+
</button>
|
|
8609
|
+
}
|
|
8610
|
+
@if (config.closable !== false) {
|
|
8611
|
+
<button [ngClass]="'p-dialog-header-icon p-dialog-header-maximize p-link'" type="button" [attr.data-testid]="buildDialogTestId('close')" (click)="hide()" (keydown.enter)="hide()">
|
|
8612
|
+
<span class="p-dialog-header-close-icon fa-solid fa-xmark"></span>
|
|
8613
|
+
</button>
|
|
8614
|
+
}
|
|
8615
|
+
</div>
|
|
8616
|
+
</div>
|
|
8617
|
+
}
|
|
8618
|
+
<div class="p-dialog-content {{ dialogConfig?.data?.contentStyleClass }}" [attr.data-testid]="buildDialogTestId('content')" [ngStyle]="config.contentStyle" [ngClass]="{ 'disable-ui-dialog-content': dialogConfig.data._context.isGlobalDisabled }">
|
|
8619
|
+
<ng-template pDynamicDialogContent></ng-template>
|
|
8620
|
+
</div>
|
|
8621
|
+
@if (config.footer) {
|
|
8622
|
+
<div class="p-dialog-footer" [attr.data-testid]="buildDialogTestId('footer')" [ngStyle]="config.footerStyle" [ngClass]="{ 'disable-container': dialogConfig.data._context.isGlobalDisabled }">
|
|
8623
|
+
<ng-template pDynamicDialogFooter></ng-template>
|
|
8624
|
+
</div>
|
|
8625
|
+
}
|
|
8626
|
+
</div>
|
|
8627
|
+
}
|
|
8628
|
+
</div>
|
|
8602
8629
|
`, animations: [
|
|
8603
8630
|
trigger('animation', [
|
|
8604
8631
|
transition('void => visible', [
|