ud-components 0.7.6 → 0.7.8
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i1$2 from '@angular/common';
|
|
2
2
|
import { CommonModule, formatDate, NgTemplateOutlet, DOCUMENT, NgClass, AsyncPipe, NgStyle, DatePipe } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { ViewChild, Input, CUSTOM_ELEMENTS_SCHEMA, Component, inject, EventEmitter, forwardRef, Output, HostBinding, Inject, Pipe, input, computed, TemplateRef, ChangeDetectionStrategy, ViewEncapsulation, ElementRef, ViewContainerRef, effect, Directive, Optional, Injectable, DestroyRef, isSignal, ContentChild, ContentChildren, output, viewChild,
|
|
4
|
+
import { ViewChild, Input, CUSTOM_ELEMENTS_SCHEMA, Component, inject, EventEmitter, forwardRef, Output, HostBinding, signal, Inject, Pipe, input, computed, TemplateRef, ChangeDetectionStrategy, ViewEncapsulation, ElementRef, ViewContainerRef, effect, Directive, Optional, Injectable, DestroyRef, isSignal, ContentChild, ContentChildren, output, viewChild, ViewChildren, HostListener } from '@angular/core';
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
6
6
|
import { ControlContainer, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule, FormControl, FormGroupDirective, FormGroup, Validators } from '@angular/forms';
|
|
7
7
|
import { Subject, startWith, takeUntil, interval, isObservable, of, debounceTime, distinctUntilChanged, filter, map as map$1 } from 'rxjs';
|
|
@@ -46,6 +46,7 @@ import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
|
|
|
46
46
|
import * as i2$6 from 'ngx-file-drop';
|
|
47
47
|
import { NgxFileDropModule } from 'ngx-file-drop';
|
|
48
48
|
import * as i1$5 from '@angular/platform-browser';
|
|
49
|
+
import { Clipboard } from '@angular/cdk/clipboard';
|
|
49
50
|
import * as i1$6 from '@angular/material/stepper';
|
|
50
51
|
import { MatStepperModule } from '@angular/material/stepper';
|
|
51
52
|
import { MatFormField as MatFormField$1 } from '@angular/material/form-field';
|
|
@@ -320,7 +321,8 @@ var SnackbarType;
|
|
|
320
321
|
class CustomSnackbarComponent {
|
|
321
322
|
data;
|
|
322
323
|
snackBarRef;
|
|
323
|
-
|
|
324
|
+
/** A signal so each tick schedules change detection in zoneless apps too. */
|
|
325
|
+
progress = signal(100);
|
|
324
326
|
subscription;
|
|
325
327
|
isPaused = false;
|
|
326
328
|
elapsedTime = 0;
|
|
@@ -342,7 +344,7 @@ class CustomSnackbarComponent {
|
|
|
342
344
|
if (!this.isPaused) {
|
|
343
345
|
this.elapsedTime += tickInterval;
|
|
344
346
|
// Calculate progress
|
|
345
|
-
this.progress
|
|
347
|
+
this.progress.set(100 - (this.elapsedTime / this.data.duration) * 100);
|
|
346
348
|
// Dismiss when time runs out
|
|
347
349
|
if (this.elapsedTime >= this.data.duration) {
|
|
348
350
|
this.subscription?.unsubscribe();
|
|
@@ -363,11 +365,11 @@ class CustomSnackbarComponent {
|
|
|
363
365
|
}
|
|
364
366
|
SnackbarType = SnackbarType;
|
|
365
367
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CustomSnackbarComponent, deps: [{ token: MAT_SNACK_BAR_DATA }, { token: i1$1.MatSnackBarRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
366
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: CustomSnackbarComponent, isStandalone: true, selector: "ud-custom-snackbar", ngImport: i0, template: "<div\n class=\"custom-snackbar\"\n [attr.data-type]=\"data.type\"\n (mouseenter)=\"pauseTimer()\"\n (mouseleave)=\"resumeTimer()\">\n <div class=\"snackbar-content\">\n <div class=\"snackbar-icon\">\n @switch (data.type) {\n @case (SnackbarType.SUCCESS) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M7.5 10L9.16667 11.6667L12.5 8.33333M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.ERROR) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M12.5 7.5L7.5 12.5M7.5 7.5L12.5 12.5M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.WARNING) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 6.66667V10M10 13.3333H10.0083M8.57465 3.21517L2.51132 13.3333C1.92535 14.3618 2.67592 15.6667 3.9368 15.6667H16.0632C17.3241 15.6667 18.0747 14.3618 17.4887 13.3333L11.4254 3.21517C10.8486 2.20371 9.15144 2.20371 8.57465 3.21517Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.INFO) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 13.3333V10M10 6.66667H10.0083M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n }\n </div>\n\n <span class=\"snackbar-message\">{{ data.message }}</span>\n\n @if (data.action) {\n <button class=\"snackbar-action\" (click)=\"dismiss()\">\n {{ data.action }}\n </button>\n }\n\n <button class=\"snackbar-close\" (click)=\"dismiss()\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M12 4L4 12M4 4L12 12\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n </button>\n </div>\n\n <div class=\"progress-bar\">\n <div class=\"progress-fill\" [style.width.%]=\"progress\"></div>\n </div>\n</div>\n", styles: [".custom-snackbar{display:flex;flex-direction:column;min-width:320px;max-width:500px;border-radius:12px;overflow:hidden;box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a,0 0 0 1px #0000000d;background:#fff;transition:transform .2s ease,box-shadow .2s ease}.custom-snackbar:hover{transform:translateY(-2px);box-shadow:0 25px 30px -5px #00000026,0 15px 15px -5px #0000000f,0 0 0 1px #0000000d}.snackbar-content{display:flex;align-items:center;gap:12px;padding:16px}.snackbar-icon{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:20px;height:20px}.snackbar-message{flex:1;font-size:14px;font-weight:500;line-height:1.5;color:#1f2937}.snackbar-action{flex-shrink:0;padding:6px 12px;font-size:13px;font-weight:600;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent}.snackbar-close{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent;color:#6b7280}.snackbar-close:hover{background:#0000000d;color:#374151}.progress-bar{height:4px;background:#00000014;position:relative}.progress-fill{height:100%;transition:width .1s linear;border-radius:0 2px 2px 0}.custom-snackbar[data-type=success]{border-top:3px solid #10b981}.custom-snackbar[data-type=success] .snackbar-icon,.custom-snackbar[data-type=success] .snackbar-action{color:#10b981}.custom-snackbar[data-type=success] .snackbar-action:hover{background:#10b9811a}.custom-snackbar[data-type=success] .progress-fill{background:#10b981}.custom-snackbar[data-type=error]{border-top:3px solid #ef4444}.custom-snackbar[data-type=error] .snackbar-icon,.custom-snackbar[data-type=error] .snackbar-action{color:#ef4444}.custom-snackbar[data-type=error] .snackbar-action:hover{background:#ef44441a}.custom-snackbar[data-type=error] .progress-fill{background:#ef4444}.custom-snackbar[data-type=warning]{border-top:3px solid #f59e0b}.custom-snackbar[data-type=warning] .snackbar-icon,.custom-snackbar[data-type=warning] .snackbar-action{color:#f59e0b}.custom-snackbar[data-type=warning] .snackbar-action:hover{background:#f59e0b1a}.custom-snackbar[data-type=warning] .progress-fill{background:#f59e0b}.custom-snackbar[data-type=info]{border-top:3px solid #3b82f6}.custom-snackbar[data-type=info] .snackbar-icon,.custom-snackbar[data-type=info] .snackbar-action{color:#3b82f6}.custom-snackbar[data-type=info] .snackbar-action:hover{background:#3b82f61a}.custom-snackbar[data-type=info] .progress-fill{background:#3b82f6}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
368
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: CustomSnackbarComponent, isStandalone: true, selector: "ud-custom-snackbar", ngImport: i0, template: "<div\n class=\"custom-snackbar\"\n [attr.data-type]=\"data.type\"\n (mouseenter)=\"pauseTimer()\"\n (mouseleave)=\"resumeTimer()\">\n <div class=\"snackbar-content\">\n <div class=\"snackbar-icon\">\n @switch (data.type) {\n @case (SnackbarType.SUCCESS) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M7.5 10L9.16667 11.6667L12.5 8.33333M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.ERROR) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M12.5 7.5L7.5 12.5M7.5 7.5L12.5 12.5M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.WARNING) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 6.66667V10M10 13.3333H10.0083M8.57465 3.21517L2.51132 13.3333C1.92535 14.3618 2.67592 15.6667 3.9368 15.6667H16.0632C17.3241 15.6667 18.0747 14.3618 17.4887 13.3333L11.4254 3.21517C10.8486 2.20371 9.15144 2.20371 8.57465 3.21517Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.INFO) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 13.3333V10M10 6.66667H10.0083M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n }\n </div>\n\n <span class=\"snackbar-message\">{{ data.message }}</span>\n\n @if (data.action) {\n <button class=\"snackbar-action\" (click)=\"dismiss()\">\n {{ data.action }}\n </button>\n }\n\n <button class=\"snackbar-close\" (click)=\"dismiss()\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M12 4L4 12M4 4L12 12\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n </button>\n </div>\n\n <div class=\"progress-bar\">\n <div class=\"progress-fill\" [style.width.%]=\"progress()\"></div>\n </div>\n</div>\n", styles: [".custom-snackbar{display:flex;flex-direction:column;min-width:320px;max-width:500px;border-radius:12px;overflow:hidden;box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a,0 0 0 1px #0000000d;background:#fff;transition:transform .2s ease,box-shadow .2s ease}.custom-snackbar:hover{transform:translateY(-2px);box-shadow:0 25px 30px -5px #00000026,0 15px 15px -5px #0000000f,0 0 0 1px #0000000d}.snackbar-content{display:flex;align-items:center;gap:12px;padding:16px}.snackbar-icon{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:20px;height:20px}.snackbar-message{flex:1;font-size:14px;font-weight:500;line-height:1.5;color:#1f2937}.snackbar-action{flex-shrink:0;padding:6px 12px;font-size:13px;font-weight:600;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent}.snackbar-close{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent;color:#6b7280}.snackbar-close:hover{background:#0000000d;color:#374151}.progress-bar{height:4px;background:#00000014;position:relative}.progress-fill{height:100%;transition:width .1s linear;border-radius:0 2px 2px 0}.custom-snackbar[data-type=success]{border-top:3px solid #10b981}.custom-snackbar[data-type=success] .snackbar-icon,.custom-snackbar[data-type=success] .snackbar-action{color:#10b981}.custom-snackbar[data-type=success] .snackbar-action:hover{background:#10b9811a}.custom-snackbar[data-type=success] .progress-fill{background:#10b981}.custom-snackbar[data-type=error]{border-top:3px solid #ef4444}.custom-snackbar[data-type=error] .snackbar-icon,.custom-snackbar[data-type=error] .snackbar-action{color:#ef4444}.custom-snackbar[data-type=error] .snackbar-action:hover{background:#ef44441a}.custom-snackbar[data-type=error] .progress-fill{background:#ef4444}.custom-snackbar[data-type=warning]{border-top:3px solid #f59e0b}.custom-snackbar[data-type=warning] .snackbar-icon,.custom-snackbar[data-type=warning] .snackbar-action{color:#f59e0b}.custom-snackbar[data-type=warning] .snackbar-action:hover{background:#f59e0b1a}.custom-snackbar[data-type=warning] .progress-fill{background:#f59e0b}.custom-snackbar[data-type=info]{border-top:3px solid #3b82f6}.custom-snackbar[data-type=info] .snackbar-icon,.custom-snackbar[data-type=info] .snackbar-action{color:#3b82f6}.custom-snackbar[data-type=info] .snackbar-action:hover{background:#3b82f61a}.custom-snackbar[data-type=info] .progress-fill{background:#3b82f6}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
367
369
|
}
|
|
368
370
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: CustomSnackbarComponent, decorators: [{
|
|
369
371
|
type: Component,
|
|
370
|
-
args: [{ selector: 'ud-custom-snackbar', standalone: true, imports: [CommonModule], template: "<div\n class=\"custom-snackbar\"\n [attr.data-type]=\"data.type\"\n (mouseenter)=\"pauseTimer()\"\n (mouseleave)=\"resumeTimer()\">\n <div class=\"snackbar-content\">\n <div class=\"snackbar-icon\">\n @switch (data.type) {\n @case (SnackbarType.SUCCESS) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M7.5 10L9.16667 11.6667L12.5 8.33333M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.ERROR) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M12.5 7.5L7.5 12.5M7.5 7.5L12.5 12.5M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.WARNING) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 6.66667V10M10 13.3333H10.0083M8.57465 3.21517L2.51132 13.3333C1.92535 14.3618 2.67592 15.6667 3.9368 15.6667H16.0632C17.3241 15.6667 18.0747 14.3618 17.4887 13.3333L11.4254 3.21517C10.8486 2.20371 9.15144 2.20371 8.57465 3.21517Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.INFO) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 13.3333V10M10 6.66667H10.0083M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n }\n </div>\n\n <span class=\"snackbar-message\">{{ data.message }}</span>\n\n @if (data.action) {\n <button class=\"snackbar-action\" (click)=\"dismiss()\">\n {{ data.action }}\n </button>\n }\n\n <button class=\"snackbar-close\" (click)=\"dismiss()\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M12 4L4 12M4 4L12 12\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n </button>\n </div>\n\n <div class=\"progress-bar\">\n <div class=\"progress-fill\" [style.width.%]=\"progress\"></div>\n </div>\n</div>\n", styles: [".custom-snackbar{display:flex;flex-direction:column;min-width:320px;max-width:500px;border-radius:12px;overflow:hidden;box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a,0 0 0 1px #0000000d;background:#fff;transition:transform .2s ease,box-shadow .2s ease}.custom-snackbar:hover{transform:translateY(-2px);box-shadow:0 25px 30px -5px #00000026,0 15px 15px -5px #0000000f,0 0 0 1px #0000000d}.snackbar-content{display:flex;align-items:center;gap:12px;padding:16px}.snackbar-icon{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:20px;height:20px}.snackbar-message{flex:1;font-size:14px;font-weight:500;line-height:1.5;color:#1f2937}.snackbar-action{flex-shrink:0;padding:6px 12px;font-size:13px;font-weight:600;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent}.snackbar-close{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent;color:#6b7280}.snackbar-close:hover{background:#0000000d;color:#374151}.progress-bar{height:4px;background:#00000014;position:relative}.progress-fill{height:100%;transition:width .1s linear;border-radius:0 2px 2px 0}.custom-snackbar[data-type=success]{border-top:3px solid #10b981}.custom-snackbar[data-type=success] .snackbar-icon,.custom-snackbar[data-type=success] .snackbar-action{color:#10b981}.custom-snackbar[data-type=success] .snackbar-action:hover{background:#10b9811a}.custom-snackbar[data-type=success] .progress-fill{background:#10b981}.custom-snackbar[data-type=error]{border-top:3px solid #ef4444}.custom-snackbar[data-type=error] .snackbar-icon,.custom-snackbar[data-type=error] .snackbar-action{color:#ef4444}.custom-snackbar[data-type=error] .snackbar-action:hover{background:#ef44441a}.custom-snackbar[data-type=error] .progress-fill{background:#ef4444}.custom-snackbar[data-type=warning]{border-top:3px solid #f59e0b}.custom-snackbar[data-type=warning] .snackbar-icon,.custom-snackbar[data-type=warning] .snackbar-action{color:#f59e0b}.custom-snackbar[data-type=warning] .snackbar-action:hover{background:#f59e0b1a}.custom-snackbar[data-type=warning] .progress-fill{background:#f59e0b}.custom-snackbar[data-type=info]{border-top:3px solid #3b82f6}.custom-snackbar[data-type=info] .snackbar-icon,.custom-snackbar[data-type=info] .snackbar-action{color:#3b82f6}.custom-snackbar[data-type=info] .snackbar-action:hover{background:#3b82f61a}.custom-snackbar[data-type=info] .progress-fill{background:#3b82f6}\n"] }]
|
|
372
|
+
args: [{ selector: 'ud-custom-snackbar', standalone: true, imports: [CommonModule], template: "<div\n class=\"custom-snackbar\"\n [attr.data-type]=\"data.type\"\n (mouseenter)=\"pauseTimer()\"\n (mouseleave)=\"resumeTimer()\">\n <div class=\"snackbar-content\">\n <div class=\"snackbar-icon\">\n @switch (data.type) {\n @case (SnackbarType.SUCCESS) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M7.5 10L9.16667 11.6667L12.5 8.33333M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.ERROR) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M12.5 7.5L7.5 12.5M7.5 7.5L12.5 12.5M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.WARNING) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 6.66667V10M10 13.3333H10.0083M8.57465 3.21517L2.51132 13.3333C1.92535 14.3618 2.67592 15.6667 3.9368 15.6667H16.0632C17.3241 15.6667 18.0747 14.3618 17.4887 13.3333L11.4254 3.21517C10.8486 2.20371 9.15144 2.20371 8.57465 3.21517Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n @case (SnackbarType.INFO) {\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M10 13.3333V10M10 6.66667H10.0083M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n }\n </div>\n\n <span class=\"snackbar-message\">{{ data.message }}</span>\n\n @if (data.action) {\n <button class=\"snackbar-action\" (click)=\"dismiss()\">\n {{ data.action }}\n </button>\n }\n\n <button class=\"snackbar-close\" (click)=\"dismiss()\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M12 4L4 12M4 4L12 12\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n </button>\n </div>\n\n <div class=\"progress-bar\">\n <div class=\"progress-fill\" [style.width.%]=\"progress()\"></div>\n </div>\n</div>\n", styles: [".custom-snackbar{display:flex;flex-direction:column;min-width:320px;max-width:500px;border-radius:12px;overflow:hidden;box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a,0 0 0 1px #0000000d;background:#fff;transition:transform .2s ease,box-shadow .2s ease}.custom-snackbar:hover{transform:translateY(-2px);box-shadow:0 25px 30px -5px #00000026,0 15px 15px -5px #0000000f,0 0 0 1px #0000000d}.snackbar-content{display:flex;align-items:center;gap:12px;padding:16px}.snackbar-icon{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:20px;height:20px}.snackbar-message{flex:1;font-size:14px;font-weight:500;line-height:1.5;color:#1f2937}.snackbar-action{flex-shrink:0;padding:6px 12px;font-size:13px;font-weight:600;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent}.snackbar-close{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:6px;cursor:pointer;transition:all .15s ease;background:transparent;color:#6b7280}.snackbar-close:hover{background:#0000000d;color:#374151}.progress-bar{height:4px;background:#00000014;position:relative}.progress-fill{height:100%;transition:width .1s linear;border-radius:0 2px 2px 0}.custom-snackbar[data-type=success]{border-top:3px solid #10b981}.custom-snackbar[data-type=success] .snackbar-icon,.custom-snackbar[data-type=success] .snackbar-action{color:#10b981}.custom-snackbar[data-type=success] .snackbar-action:hover{background:#10b9811a}.custom-snackbar[data-type=success] .progress-fill{background:#10b981}.custom-snackbar[data-type=error]{border-top:3px solid #ef4444}.custom-snackbar[data-type=error] .snackbar-icon,.custom-snackbar[data-type=error] .snackbar-action{color:#ef4444}.custom-snackbar[data-type=error] .snackbar-action:hover{background:#ef44441a}.custom-snackbar[data-type=error] .progress-fill{background:#ef4444}.custom-snackbar[data-type=warning]{border-top:3px solid #f59e0b}.custom-snackbar[data-type=warning] .snackbar-icon,.custom-snackbar[data-type=warning] .snackbar-action{color:#f59e0b}.custom-snackbar[data-type=warning] .snackbar-action:hover{background:#f59e0b1a}.custom-snackbar[data-type=warning] .progress-fill{background:#f59e0b}.custom-snackbar[data-type=info]{border-top:3px solid #3b82f6}.custom-snackbar[data-type=info] .snackbar-icon,.custom-snackbar[data-type=info] .snackbar-action{color:#3b82f6}.custom-snackbar[data-type=info] .snackbar-action:hover{background:#3b82f61a}.custom-snackbar[data-type=info] .progress-fill{background:#3b82f6}\n"] }]
|
|
371
373
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
372
374
|
type: Inject,
|
|
373
375
|
args: [MAT_SNACK_BAR_DATA]
|
|
@@ -5291,6 +5293,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
|
|
|
5291
5293
|
}], ctorParameters: () => [{ type: i1$4.TranslateService }, { type: i1$1.MatSnackBar }, { type: i0.DestroyRef }] });
|
|
5292
5294
|
|
|
5293
5295
|
class SummaryViewComponent {
|
|
5296
|
+
clipboard = inject(Clipboard);
|
|
5294
5297
|
title = '';
|
|
5295
5298
|
actions = [];
|
|
5296
5299
|
summaryFields = [];
|
|
@@ -5298,8 +5301,29 @@ class SummaryViewComponent {
|
|
|
5298
5301
|
layout = 'text-left';
|
|
5299
5302
|
skeletonTitleHeight = '20px';
|
|
5300
5303
|
skeletonBodyHeight = '150px';
|
|
5304
|
+
/** Tooltip of a copyable field's button; an i18n key or plain text, like action labels. */
|
|
5305
|
+
copyLabel = 'copy';
|
|
5306
|
+
/** Tooltip right after copying. */
|
|
5307
|
+
copiedLabel = 'copied';
|
|
5308
|
+
/** Index of the field just copied, so its button shows a check for a moment. */
|
|
5309
|
+
copiedIndex = signal(null);
|
|
5310
|
+
resetTimer;
|
|
5311
|
+
hasValue(field) {
|
|
5312
|
+
return field.value !== undefined && field.value !== null && String(field.value) !== '';
|
|
5313
|
+
}
|
|
5314
|
+
copy(field, index) {
|
|
5315
|
+
if (!this.hasValue(field) || !this.clipboard.copy(String(field.value))) {
|
|
5316
|
+
return;
|
|
5317
|
+
}
|
|
5318
|
+
this.copiedIndex.set(index);
|
|
5319
|
+
clearTimeout(this.resetTimer);
|
|
5320
|
+
this.resetTimer = setTimeout(() => this.copiedIndex.set(null), 1500);
|
|
5321
|
+
}
|
|
5322
|
+
ngOnDestroy() {
|
|
5323
|
+
clearTimeout(this.resetTimer);
|
|
5324
|
+
}
|
|
5301
5325
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: SummaryViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5302
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: SummaryViewComponent, isStandalone: true, selector: "ud-summary-view", inputs: { title: "title", actions: "actions", summaryFields: "summaryFields", loading: "loading", layout: "layout", skeletonTitleHeight: "skeletonTitleHeight", skeletonBodyHeight: "skeletonBodyHeight" }, ngImport: i0, template: "<div class=\"summary-view-container\">\n <div class=\"header\">\n @if (loading) {\n <ngx-skeleton-loader\n class=\"loading col-6\"\n [count]=\"1\"\n [theme]=\"{ height: skeletonTitleHeight }\" />\n } @else {\n <h5 class=\"header-title\">{{ title }}</h5>\n }\n <div class=\"header-actions\">\n @for (action of actions; track action.label) {\n @if (action.isAuthorized) {\n @if (action.path) {\n <ud-button\n variant=\"stroked\"\n color=\"primary\"\n size=\"sm\"\n [icon]=\"action.icon\"\n [routerLink]=\"action.path\">\n {{ action.label | translate | capitalize }}\n </ud-button>\n } @else if (action.onClick) {\n <ud-button\n variant=\"stroked\"\n color=\"primary\"\n size=\"sm\"\n [icon]=\"action.icon\"\n (buttonClick)=\"action.onClick!()\">\n {{ action.label | translate | capitalize }}\n </ud-button>\n }\n }\n }\n <ng-content select=\"[header-actions]\" />\n </div>\n </div>\n <div\n class=\"content\"\n [ngClass]=\"{\n reverse: layout === 'text-right',\n 'flex-column': layout === 'text-top',\n }\">\n @if (loading) {\n <ngx-skeleton-loader\n class=\"col\"\n [count]=\"1\"\n [theme]=\"{ height: skeletonBodyHeight }\" />\n } @else {\n @if (layout !== 'text-none') {\n <div [ngClass]=\"layout === 'text-top' || layout === 'text-all' ? 'col-12' : 'col-6'\">\n <div class=\"summary\" [ngClass]=\"{ 'summary-row-wrap': layout === 'text-top' || layout === 'text-all' }\">\n @for (summaryField of summaryFields; track $index) {\n <div class=\"summary-field\">\n @if (summaryField.label) {\n <span>{{ summaryField.label | capitalize }}</span>\n }\n <div class=\"summary-row\">\n <mat-icon matPrefix fontSet=\"material-icons-outlined\">\n {{ summaryField.icon }}\n </mat-icon>\n <mat-label>{{ summaryField.value }}</mat-label>\n </div>\n </div>\n }\n </div>\n </div>\n }\n @if (layout !== 'text-all') {\n <div\n class=\"content-body\"\n [ngClass]=\"{\n 'col-12': layout === 'text-none' || layout === 'text-top',\n 'col-6': layout !== 'text-none' && layout !== 'text-top',\n }\">\n <ng-content></ng-content>\n </div>\n }\n }\n </div>\n</div>\n", styles: [".summary-view-container{justify-self:center;width:100%;border-radius:12px;overflow:hidden;box-shadow:0 0 0 1px #1b253512,0 4px 16px #1b253514;font-family:DM Sans,system-ui,sans-serif}.header{display:flex;justify-content:space-between;align-items:center;padding:14px 20px;background:#1b2535;min-height:52px}.header .header-title{margin:0;font-family:DM Sans,system-ui,sans-serif;font-size:.9rem;font-weight:600;color:#fff;letter-spacing:.02em}.header .header-actions{display:flex;align-items:center;gap:8px}.header .header-actions ::ng-deep .ud-btn{border-color:#ffffff4d!important;color:#ffffffd9!important}.header .header-actions ::ng-deep .ud-btn:hover{background:#ffffff1a!important;border-color:#ffffff80!important;color:#fff!important}.header .header-actions ::ng-deep .ud-btn .mat-icon{color:inherit!important}.header .loading{padding:.5rem;border-radius:4px}.header .loading ::ng-deep .skeleton-loader{background:#ffffff1f!important;background-image:linear-gradient(90deg,#ffffff1f,#ffffff38,#ffffff1f 80px)!important}.content{display:flex;flex-wrap:wrap;background:#fff}.content:not(.flex-column):has(.content-body>*)>.col-6:first-child{border-right:1px solid #e8eaee}.content.reverse:has(.content-body>*)>.col-6:last-child{border-right:1px solid #e8eaee;border-left:none}.summary{display:flex;flex-direction:column;gap:0;padding:20px 24px}.summary.summary-row-wrap{flex-direction:row;flex-wrap:wrap;gap:.25rem;padding:16px 8px}.summary-field{display:flex;flex-direction:column;gap:3px;padding:10px 16px;border-radius:8px;transition:background .15s ease}.summary-field:hover{background:#f4f5f7}.summary-row-wrap .summary-field{padding:12px 16px;min-width:140px;border:1px solid #e8eaee}.summary-field span{font-family:DM Sans,system-ui,sans-serif;font-size:.65rem;font-weight:700;color:#6b7585;text-transform:uppercase;letter-spacing:.08em}.summary-row{display:flex;align-items:center;gap:6px}.summary-row mat-icon{height:16px;width:16px;min-width:16px;font-size:16px;color:#6b7585;flex-shrink:0}mat-label{font-family:DM Sans,system-ui,sans-serif;font-size:.9rem;font-weight:600;color:#1b2535;line-height:1.3}.content-body:has(>*){background:#f4f5f7;padding:20px 24px}.flex-column>.content-body:has(>*){border-top:1px solid #e8eaee}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: CapitalizePipe, name: "capitalize" }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "ngmodule", type: NgxSkeletonLoaderModule }, { kind: "component", type: i2$5.NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: ["count", "loadingText", "appearance", "animation", "ariaLabel", "theme"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "component", type: UdButtonComponent, selector: "ud-button", inputs: ["variant", "color", "size", "type", "icon", "iconPosition", "iconFontSet", "loading", "disabled", "fullWidth"], outputs: ["buttonClick"] }] });
|
|
5326
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: SummaryViewComponent, isStandalone: true, selector: "ud-summary-view", inputs: { title: "title", actions: "actions", summaryFields: "summaryFields", loading: "loading", layout: "layout", skeletonTitleHeight: "skeletonTitleHeight", skeletonBodyHeight: "skeletonBodyHeight", copyLabel: "copyLabel", copiedLabel: "copiedLabel" }, ngImport: i0, template: "<div class=\"summary-view-container\">\n <div class=\"header\">\n @if (loading) {\n <ngx-skeleton-loader\n class=\"loading col-6\"\n [count]=\"1\"\n [theme]=\"{ height: skeletonTitleHeight }\" />\n } @else {\n <h5 class=\"header-title\">{{ title }}</h5>\n }\n <div class=\"header-actions\">\n @for (action of actions; track action.label) {\n @if (action.isAuthorized) {\n @if (action.path) {\n <ud-button\n variant=\"stroked\"\n color=\"primary\"\n size=\"sm\"\n [icon]=\"action.icon\"\n [routerLink]=\"action.path\">\n {{ action.label | translate | capitalize }}\n </ud-button>\n } @else if (action.onClick) {\n <ud-button\n variant=\"stroked\"\n color=\"primary\"\n size=\"sm\"\n [icon]=\"action.icon\"\n (buttonClick)=\"action.onClick!()\">\n {{ action.label | translate | capitalize }}\n </ud-button>\n }\n }\n }\n <ng-content select=\"[header-actions]\" />\n </div>\n </div>\n <div\n class=\"content\"\n [ngClass]=\"{\n reverse: layout === 'text-right',\n 'flex-column': layout === 'text-top',\n }\">\n @if (loading) {\n <ngx-skeleton-loader\n class=\"col\"\n [count]=\"1\"\n [theme]=\"{ height: skeletonBodyHeight }\" />\n } @else {\n @if (layout !== 'text-none') {\n <div [ngClass]=\"layout === 'text-top' || layout === 'text-all' ? 'col-12' : 'col-6'\">\n <div class=\"summary\" [ngClass]=\"{ 'summary-row-wrap': layout === 'text-top' || layout === 'text-all' }\">\n @for (summaryField of summaryFields; track $index) {\n <div class=\"summary-field\">\n @if (summaryField.label) {\n <span>{{ summaryField.label | capitalize }}</span>\n }\n <div class=\"summary-row\">\n <mat-icon matPrefix fontSet=\"material-icons-outlined\">\n {{ summaryField.icon }}\n </mat-icon>\n <mat-label>{{ summaryField.value }}</mat-label>\n @if (summaryField.copyable && hasValue(summaryField)) {\n <div class=\"summary-copy\" [class.is-copied]=\"copiedIndex() === $index\">\n <ud-button\n variant=\"icon-only\"\n color=\"secondary\"\n size=\"sm\"\n [icon]=\"copiedIndex() === $index ? 'check' : 'content_copy'\"\n [udTooltip]=\"(copiedIndex() === $index ? copiedLabel : copyLabel) | translate | capitalize\"\n (buttonClick)=\"copy(summaryField, $index)\" />\n </div>\n }\n </div>\n </div>\n }\n </div>\n </div>\n }\n @if (layout !== 'text-all') {\n <div\n class=\"content-body\"\n [ngClass]=\"{\n 'col-12': layout === 'text-none' || layout === 'text-top',\n 'col-6': layout !== 'text-none' && layout !== 'text-top',\n }\">\n <ng-content></ng-content>\n </div>\n }\n }\n </div>\n</div>\n", styles: [".summary-view-container{justify-self:center;width:100%;border-radius:12px;overflow:hidden;box-shadow:0 0 0 1px #1b253512,0 4px 16px #1b253514;font-family:DM Sans,system-ui,sans-serif}.header{display:flex;justify-content:space-between;align-items:center;padding:14px 20px;background:#1b2535;min-height:52px}.header .header-title{margin:0;font-family:DM Sans,system-ui,sans-serif;font-size:.9rem;font-weight:600;color:#fff;letter-spacing:.02em}.header .header-actions{display:flex;align-items:center;gap:8px}.header .header-actions ::ng-deep .ud-btn{border-color:#ffffff4d!important;color:#ffffffd9!important}.header .header-actions ::ng-deep .ud-btn:hover{background:#ffffff1a!important;border-color:#ffffff80!important;color:#fff!important}.header .header-actions ::ng-deep .ud-btn .mat-icon{color:inherit!important}.header .loading{padding:.5rem;border-radius:4px}.header .loading ::ng-deep .skeleton-loader{background:#ffffff1f!important;background-image:linear-gradient(90deg,#ffffff1f,#ffffff38,#ffffff1f 80px)!important}.content{display:flex;flex-wrap:wrap;background:#fff}.content:not(.flex-column):has(.content-body>*)>.col-6:first-child{border-right:1px solid #e8eaee}.content.reverse:has(.content-body>*)>.col-6:last-child{border-right:1px solid #e8eaee;border-left:none}.summary{display:flex;flex-direction:column;gap:0;padding:20px 24px}.summary.summary-row-wrap{flex-direction:row;flex-wrap:wrap;gap:.25rem;padding:16px 8px}.summary-field{display:flex;flex-direction:column;gap:3px;padding:10px 16px;border-radius:8px;transition:background .15s ease}.summary-field:hover{background:#f4f5f7}.summary-row-wrap .summary-field{padding:12px 16px;min-width:140px;border:1px solid #e8eaee}.summary-field span{font-family:DM Sans,system-ui,sans-serif;font-size:.65rem;font-weight:700;color:#6b7585;text-transform:uppercase;letter-spacing:.08em}.summary-row{display:flex;align-items:center;gap:6px}.summary-row mat-icon{height:16px;width:16px;min-width:16px;font-size:16px;color:#6b7585;flex-shrink:0}mat-label{font-family:DM Sans,system-ui,sans-serif;font-size:.9rem;font-weight:600;color:#1b2535;line-height:1.3}.content-body:has(>*){background:#f4f5f7;padding:20px 24px}.flex-column>.content-body:has(>*){border-top:1px solid #e8eaee}.summary-copy{display:inline-flex;align-items:center;height:1em;margin-left:2px;opacity:0;transition:opacity .12s ease}.summary-field:hover .summary-copy,.summary-copy:focus-within,.summary-copy.is-copied{opacity:1}@media (hover: none){.summary-copy{opacity:1}}@media (prefers-reduced-motion: reduce){.summary-copy{transition:none}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: CapitalizePipe, name: "capitalize" }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "ngmodule", type: NgxSkeletonLoaderModule }, { kind: "component", type: i2$5.NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: ["count", "loadingText", "appearance", "animation", "ariaLabel", "theme"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "component", type: UdButtonComponent, selector: "ud-button", inputs: ["variant", "color", "size", "type", "icon", "iconPosition", "iconFontSet", "loading", "disabled", "fullWidth"], outputs: ["buttonClick"] }, { kind: "directive", type: UdTooltipDirective, selector: "[udTooltip]", inputs: ["udTooltip", "udTooltipPosition", "udTooltipDisabled", "udTooltipShowDelay"] }] });
|
|
5303
5327
|
}
|
|
5304
5328
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: SummaryViewComponent, decorators: [{
|
|
5305
5329
|
type: Component,
|
|
@@ -5314,7 +5338,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
|
|
|
5314
5338
|
CapitalizePipe,
|
|
5315
5339
|
MatPrefix,
|
|
5316
5340
|
UdButtonComponent,
|
|
5317
|
-
|
|
5341
|
+
UdTooltipDirective,
|
|
5342
|
+
], template: "<div class=\"summary-view-container\">\n <div class=\"header\">\n @if (loading) {\n <ngx-skeleton-loader\n class=\"loading col-6\"\n [count]=\"1\"\n [theme]=\"{ height: skeletonTitleHeight }\" />\n } @else {\n <h5 class=\"header-title\">{{ title }}</h5>\n }\n <div class=\"header-actions\">\n @for (action of actions; track action.label) {\n @if (action.isAuthorized) {\n @if (action.path) {\n <ud-button\n variant=\"stroked\"\n color=\"primary\"\n size=\"sm\"\n [icon]=\"action.icon\"\n [routerLink]=\"action.path\">\n {{ action.label | translate | capitalize }}\n </ud-button>\n } @else if (action.onClick) {\n <ud-button\n variant=\"stroked\"\n color=\"primary\"\n size=\"sm\"\n [icon]=\"action.icon\"\n (buttonClick)=\"action.onClick!()\">\n {{ action.label | translate | capitalize }}\n </ud-button>\n }\n }\n }\n <ng-content select=\"[header-actions]\" />\n </div>\n </div>\n <div\n class=\"content\"\n [ngClass]=\"{\n reverse: layout === 'text-right',\n 'flex-column': layout === 'text-top',\n }\">\n @if (loading) {\n <ngx-skeleton-loader\n class=\"col\"\n [count]=\"1\"\n [theme]=\"{ height: skeletonBodyHeight }\" />\n } @else {\n @if (layout !== 'text-none') {\n <div [ngClass]=\"layout === 'text-top' || layout === 'text-all' ? 'col-12' : 'col-6'\">\n <div class=\"summary\" [ngClass]=\"{ 'summary-row-wrap': layout === 'text-top' || layout === 'text-all' }\">\n @for (summaryField of summaryFields; track $index) {\n <div class=\"summary-field\">\n @if (summaryField.label) {\n <span>{{ summaryField.label | capitalize }}</span>\n }\n <div class=\"summary-row\">\n <mat-icon matPrefix fontSet=\"material-icons-outlined\">\n {{ summaryField.icon }}\n </mat-icon>\n <mat-label>{{ summaryField.value }}</mat-label>\n @if (summaryField.copyable && hasValue(summaryField)) {\n <div class=\"summary-copy\" [class.is-copied]=\"copiedIndex() === $index\">\n <ud-button\n variant=\"icon-only\"\n color=\"secondary\"\n size=\"sm\"\n [icon]=\"copiedIndex() === $index ? 'check' : 'content_copy'\"\n [udTooltip]=\"(copiedIndex() === $index ? copiedLabel : copyLabel) | translate | capitalize\"\n (buttonClick)=\"copy(summaryField, $index)\" />\n </div>\n }\n </div>\n </div>\n }\n </div>\n </div>\n }\n @if (layout !== 'text-all') {\n <div\n class=\"content-body\"\n [ngClass]=\"{\n 'col-12': layout === 'text-none' || layout === 'text-top',\n 'col-6': layout !== 'text-none' && layout !== 'text-top',\n }\">\n <ng-content></ng-content>\n </div>\n }\n }\n </div>\n</div>\n", styles: [".summary-view-container{justify-self:center;width:100%;border-radius:12px;overflow:hidden;box-shadow:0 0 0 1px #1b253512,0 4px 16px #1b253514;font-family:DM Sans,system-ui,sans-serif}.header{display:flex;justify-content:space-between;align-items:center;padding:14px 20px;background:#1b2535;min-height:52px}.header .header-title{margin:0;font-family:DM Sans,system-ui,sans-serif;font-size:.9rem;font-weight:600;color:#fff;letter-spacing:.02em}.header .header-actions{display:flex;align-items:center;gap:8px}.header .header-actions ::ng-deep .ud-btn{border-color:#ffffff4d!important;color:#ffffffd9!important}.header .header-actions ::ng-deep .ud-btn:hover{background:#ffffff1a!important;border-color:#ffffff80!important;color:#fff!important}.header .header-actions ::ng-deep .ud-btn .mat-icon{color:inherit!important}.header .loading{padding:.5rem;border-radius:4px}.header .loading ::ng-deep .skeleton-loader{background:#ffffff1f!important;background-image:linear-gradient(90deg,#ffffff1f,#ffffff38,#ffffff1f 80px)!important}.content{display:flex;flex-wrap:wrap;background:#fff}.content:not(.flex-column):has(.content-body>*)>.col-6:first-child{border-right:1px solid #e8eaee}.content.reverse:has(.content-body>*)>.col-6:last-child{border-right:1px solid #e8eaee;border-left:none}.summary{display:flex;flex-direction:column;gap:0;padding:20px 24px}.summary.summary-row-wrap{flex-direction:row;flex-wrap:wrap;gap:.25rem;padding:16px 8px}.summary-field{display:flex;flex-direction:column;gap:3px;padding:10px 16px;border-radius:8px;transition:background .15s ease}.summary-field:hover{background:#f4f5f7}.summary-row-wrap .summary-field{padding:12px 16px;min-width:140px;border:1px solid #e8eaee}.summary-field span{font-family:DM Sans,system-ui,sans-serif;font-size:.65rem;font-weight:700;color:#6b7585;text-transform:uppercase;letter-spacing:.08em}.summary-row{display:flex;align-items:center;gap:6px}.summary-row mat-icon{height:16px;width:16px;min-width:16px;font-size:16px;color:#6b7585;flex-shrink:0}mat-label{font-family:DM Sans,system-ui,sans-serif;font-size:.9rem;font-weight:600;color:#1b2535;line-height:1.3}.content-body:has(>*){background:#f4f5f7;padding:20px 24px}.flex-column>.content-body:has(>*){border-top:1px solid #e8eaee}.summary-copy{display:inline-flex;align-items:center;height:1em;margin-left:2px;opacity:0;transition:opacity .12s ease}.summary-field:hover .summary-copy,.summary-copy:focus-within,.summary-copy.is-copied{opacity:1}@media (hover: none){.summary-copy{opacity:1}}@media (prefers-reduced-motion: reduce){.summary-copy{transition:none}}\n"] }]
|
|
5318
5343
|
}], propDecorators: { title: [{
|
|
5319
5344
|
type: Input
|
|
5320
5345
|
}], actions: [{
|
|
@@ -5329,6 +5354,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
|
|
|
5329
5354
|
type: Input
|
|
5330
5355
|
}], skeletonBodyHeight: [{
|
|
5331
5356
|
type: Input
|
|
5357
|
+
}], copyLabel: [{
|
|
5358
|
+
type: Input
|
|
5359
|
+
}], copiedLabel: [{
|
|
5360
|
+
type: Input
|
|
5332
5361
|
}] } });
|
|
5333
5362
|
|
|
5334
5363
|
class UdStepContentDirective {
|