uni-app-fe 0.2.8 → 0.2.10
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/uni-app-fe-component.mjs +4 -4
- package/fesm2022/uni-app-fe-component.mjs.map +1 -1
- package/fesm2022/uni-app-fe-pipe.mjs +103 -99
- package/fesm2022/uni-app-fe-pipe.mjs.map +1 -1
- package/package.json +2 -2
- package/types/uni-app-fe-component.d.ts +1 -1
- package/types/uni-app-fe-pipe.d.ts +43 -34
|
@@ -4,7 +4,7 @@ import * as i0 from '@angular/core';
|
|
|
4
4
|
import { input, ChangeDetectionStrategy, Component, Pipe, inject, output, signal, linkedSignal, computed, ElementRef, HostListener } from '@angular/core';
|
|
5
5
|
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
|
6
6
|
import { faTriangleExclamation, faComputer, faHouseSignal, faTowerBroadcast, faDesktop, faCircleInfo, faCopy, faClock, faInbox, faBell, faLanguage, faMoon, faSun, faArrowRightFromBracket, faArrowRightToBracket, faUser } from '@fortawesome/free-solid-svg-icons';
|
|
7
|
-
import { UniTranslatePipe, UniParsePipe,
|
|
7
|
+
import { UniTranslatePipe, UniParsePipe, UniToUrlStringPipe } from 'uni-app-fe/pipe';
|
|
8
8
|
import * as i2 from 'devextreme-angular/ui/button';
|
|
9
9
|
import { DxButtonModule } from 'devextreme-angular/ui/button';
|
|
10
10
|
import * as i1$1 from 'devextreme-angular/ui/tooltip';
|
|
@@ -355,7 +355,7 @@ class UniDialogError {
|
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
357
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniDialogError, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
358
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: UniDialogError, isStandalone: true, selector: "uni-dialog-error", inputs: { storeItems: { classPropertyName: "storeItems", publicName: "storeItems", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div\r\n class=\"squircle relative flex h-full w-full flex-col gap-6 overflow-hidden rounded-[4rem] bg-linear-to-br from-[#2b080d]/90 via-[#651525]/90 to-[#21060b]/90 p-6 shadow-[0_40px_100px_-20px_rgba(0,0,0,.8)] backdrop-blur-3xl\">\r\n <div\r\n class=\"absolute inset-0 bg-[radial-gradient(circle_at_15%_10%,rgba(255,120,130,.22),transparent_35%),radial-gradient(circle_at_85%_85%,rgba(255,50,90,.18),transparent_40%)]\"></div>\r\n\r\n <!-- Titolo -->\r\n <header class=\"flex items-center justify-between gap-4 border-b border-rose-400/25 pb-4\">\r\n <!-- Titolo: led -->\r\n <span class=\"relative flex size-3\">\r\n <span\r\n class=\"absolute inline-flex h-full w-full animate-ping rounded-full bg-rose-400 opacity-40\"></span>\r\n <span\r\n class=\"relative inline-flex size-3 rounded-full bg-linear-to-tr from-rose-500 to-rose-300 shadow-[0_0_20px_rgba(244,63,94,0.8)]\"></span>\r\n </span>\r\n\r\n <!-- Titolo: scritta -->\r\n <h1 class=\"mr-auto truncate text-2xl font-black tracking-tight text-white antialiased\">\r\n {{ 'Errors' | translate }}\r\n </h1>\r\n\r\n <!-- Titolo: totale -->\r\n <span\r\n class=\"xs:block hidden rounded-xl border border-white/7.5 bg-white/5 px-3 py-1.5 font-mono text-xs font-semibold tracking-wider text-neutral-200\">\r\n {{ 'Total' | translate }}: {{ storeItemsVisibile().length }}\r\n </span>\r\n\r\n <!-- Titolo: bottone chiusura -->\r\n <dx-button\r\n class=\"w-8 transition-colors duration-200 hover:bg-rose-400! focus:bg-transparent! active:bg-rose-500!\"\r\n [stylingMode]=\"'text'\"\r\n [icon]=\"'close'\"\r\n (onClick)=\"onCloseDialog()\"></dx-button>\r\n </header>\r\n\r\n <!-- Lista Errori -->\r\n <main\r\n class=\"scrollbar-none overflow-y-auto [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden\">\r\n <ul class=\"flex flex-col gap-6 overflow-x-auto p-2\">\r\n @for (storeItem of storeItemsVisibile(); track $index) {\r\n <!-- Data -->\r\n @let uniError = storeItem.uniError; @let storeItemData = storeItem | get_data;\r\n <li\r\n class=\"group squircle @container/item relative flex w-full min-w-32 flex-col overflow-hidden rounded-[3rem] border-[1.5px] border-white/7.5 bg-white/2.5 text-left shadow-[0_4px_12px_-4px_rgba(0,0,0,0.5)] transition duration-300\"\r\n [ngClass]=\"{\r\n 'bg-white/7.5! shadow-[0_30px_40px_-18px_rgba(0,0,0,0.75),inset_0_1px_1px_rgba(255,255,255,0.15)]! hover:border-rose-400!': storeItem.isOpen,\r\n 'hover:scale-[1.01] hover:border-white/33 hover:bg-white/5': !storeItem.isOpen\r\n }\">\r\n <!-- Badges -->\r\n <div class=\"absolute -top-2 -right-1 flex gap-2 text-white\">\r\n @if(storeItem.isCopied) {\r\n <span class=\"squircle rounded-full bg-amber-500 px-3 py-px\">\r\n {{ 'Copied' | translate }}\r\n </span>\r\n } @if(storeItem.isSaved) {\r\n <span class=\"squircle rounded-full bg-emerald-500 px-3 py-px\">\r\n {{ 'Saved' | translate }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <!-- Header -->\r\n <div class=\"@container/header flex items-center justify-between gap-4 p-4\">\r\n <!-- Header: titolo -->\r\n <div class=\"flex min-w-0 items-center gap-3.5\">\r\n <button\r\n class=\"squircle flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-full border border-white/10 bg-white/5 text-neutral-400 transition duration-300 group-hover:border-white/30 group-hover:bg-white/10 group-hover:text-white hover:bg-rose-400\"\r\n [ngClass]=\"{ 'rotate-90': storeItem.isOpen }\"\r\n [title]=\"(storeItem.isOpen ? 'Close' : 'Open') | translate: { prefix: 'btn' }\"\r\n (click)=\"onToggleIsOpen(storeItem.id)\">\r\n <span class=\"font-mono text-xs font-bold\">></span>\r\n </button>\r\n <span\r\n class=\"truncate font-sans text-base font-bold tracking-tight text-neutral-200 transition-colors duration-300 group-hover:text-white\">\r\n {{ storeItemData.title }}\r\n </span>\r\n </div>\r\n\r\n <!-- Header: type -->\r\n <div\r\n class=\"squircle hidden items-center gap-2 rounded-full border border-white/10 bg-white/5 px-3 py-1.5 text-rose-400 transition-colors duration-300 group-hover:border-white/30 group-hover:bg-white/10 group-hover:text-white @xs/header:flex\">\r\n @if(uniError.type === 'network' || uniError.type === 'server') {\r\n <fa-icon [icon]=\"ICON_FE\" />\r\n <span class=\"font-mono text-xs opacity-30\">/</span>\r\n }\r\n <fa-icon [icon]=\"storeItemData.icon\" [title]=\"uniError.type\" />\r\n <span class=\"font-mono text-xs tracking-wider uppercase\"> {{ uniError.type }} </span>\r\n </div>\r\n </div>\r\n\r\n <!-- Main -->\r\n <div class=\"flex flex-col gap-8 p-4\">\r\n <!-- Messaggio -->\r\n <div\r\n class=\"flex flex-col gap-4 [&_article]:border-0 [&_article]:p-0 [&_article_h3]:text-neutral-400 [&_article_h3]:group-hover:text-neutral-200 [&_article_h3_div_*]:hover:text-white [&_article_p]:text-white\">\r\n <!-- Messaggio default -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Message'\"\r\n [property]=\"{ value: uniError.exception.message, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Messaggio intero -->\r\n @if(uniError.type === 'be' && uniError.innerException) {\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'InnerMessage'\"\r\n [property]=\"{ value: uniError.innerException.message, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n }\r\n </div>\r\n\r\n <!-- Dettagli -->\r\n @if(storeItem.isOpen) {\r\n <div class=\"flex flex-col gap-6 border-t border-t-white/12.5 pt-4\">\r\n <h1\r\n class=\"text-3xl! font-bold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'Details' | translate }}\r\n </h1>\r\n <div class=\"flex flex-col gap-12\">\r\n @if(uniError.type === 'be' || uniError.type === 'server') {\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Dettagli: request -->\r\n <h2\r\n class=\"text-lg! font-semibold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'Request' | translate }}\r\n </h2>\r\n <div class=\"flex flex-col gap-4\">\r\n <div class=\"flex flex-col gap-x-16 gap-y-4 @md/item:flex-row\">\r\n <!-- Dettagli: request metodo http -->\r\n <uni-dialog-error-article\r\n class=\"shrink-0 @md/item:basis-24\"\r\n [lblTitle]=\"'Method'\"\r\n [property]=\"{ value: uniError.request.method, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n <!-- Dettagli: request url -->\r\n <uni-dialog-error-article\r\n class=\"flex-1\"\r\n [lblTitle]=\"'Url'\"\r\n [property]=\"{ value: uniError.request.url, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n </div>\r\n\r\n <!-- Dettagli: request query params -->\r\n @let queryParams = [...(uniError.request.url | url).searchParams];\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'QueryParams'\"\r\n [property]=\"{ value: queryParams, type: 'array' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: request headers -->\r\n @let headers = [...uniError.request.headers.entries()];\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Headers'\"\r\n [property]=\"{ value: headers, type: 'array' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: request body -->\r\n @let body = uniError.request | get_body_async | async;\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Body'\"\r\n [property]=\"{ value: body | parse, type: 'json'}\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: request info -->\r\n <div class=\"flex flex-col gap-4 @md/item:flex-row\">\r\n <!-- Dettagli: request info mode -->\r\n <uni-dialog-error-article\r\n class=\"flex-1\"\r\n [lblTitle]=\"'Mode'\"\r\n [property]=\"{ value: uniError.request.mode, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: request info credentials -->\r\n <uni-dialog-error-article\r\n class=\"flex-1\"\r\n [lblTitle]=\"'Credentials'\"\r\n [property]=\"{ value: uniError.request.credentials, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: request info cache -->\r\n <uni-dialog-error-article\r\n class=\"flex-1\"\r\n [lblTitle]=\"'CacheMode'\"\r\n [property]=\"{ value: uniError.request.cache, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Dettagli: info -->\r\n <div class=\"flex flex-col gap-4\">\r\n <h2\r\n class=\"text-lg! font-semibold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'Diagnostic' | translate }}\r\n </h2>\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Dettagli: info durata -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Duration'\"\r\n [property]=\"{ value: `${uniError.durationMs / 1000}s`, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: info user agent -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'UserAgent'\"\r\n [property]=\"{ value: uniError.userAgent, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- Dettagli: eccezione -->\r\n <div class=\"flex flex-col gap-4\">\r\n <h2\r\n class=\"text-lg! font-semibold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'Exception' | translate }} ({{ uniError.type }})\r\n </h2>\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Dettagli: eccezione nome funzione -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Function'\"\r\n [property]=\"{ value: uniError.exception.functionName, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: eccezione tipo eccezione -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Type'\"\r\n [property]=\"{ value: uniError.exception.type, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: eccezione stack trace -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'StackTrace'\"\r\n [property]=\"{ value: uniError.exception.stackTrace, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n @if(uniError.type !== 'fe' && uniError.exception.html) {\r\n <!-- Dettagli: eccezione html -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Html'\"\r\n [property]=\"{ value: uniError.exception.html, type: 'html' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n }\r\n\r\n <!-- Dettagli: eccezione frames -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Frames'\"\r\n [property]=\"{ value: uniError.exception.stackTraceFrames.map(x => ([x.file, `LINE ${x.line}`])), type: 'array' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- Interno -->\r\n @if(storeItem.isOpen) { @if((uniError.type === 'be' || uniError.type === 'server') &&\r\n uniError.innerException) {\r\n <div class=\"flex flex-col gap-6 border-t border-t-white/12.5 pt-4\">\r\n <h1\r\n class=\"text-3xl! font-bold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'Inner' | translate }}\r\n </h1>\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Interno: nome funzione -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Function'\"\r\n [property]=\"{ value: uniError.innerException.functionName, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Interno: tipo -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Type'\"\r\n [property]=\"{ value: uniError.innerException.type, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Interno: stack trace -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'StackTrace'\"\r\n [property]=\"{ value: uniError.innerException.stackTrace, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n @if(uniError.exception.html) {\r\n <!-- Dettagli: eccezione html -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Html'\"\r\n [property]=\"{ value: uniError.exception.html, type: 'html' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n }\r\n </div>\r\n </div>\r\n } }\r\n\r\n <!-- Storico -->\r\n @if(storeItem.isOpen){ @if(storeItem.historyItems.length > 0) {\r\n <div class=\"flex flex-col gap-6 border-t border-t-white/12.5 pt-4\">\r\n <h1\r\n class=\"text-3xl! font-bold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'History' | translate }}\r\n </h1>\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Timestamp'\"\r\n [property]=\"{ value: (storeItem.historyItems | get_timestamp_formatted).map(x => ([x.message, x.date])), type: 'array' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n </div>\r\n } }\r\n </div>\r\n\r\n <!-- Footer -->\r\n <div\r\n class=\"@container/footer flex flex-col justify-between gap-4 border-t border-white/5 bg-white/1 px-6 py-4 @lg/item:flex-row @lg/item:items-center\">\r\n <!-- Footer: metadata -->\r\n <div\r\n class=\"flex min-w-0 flex-col items-center justify-between gap-x-4 gap-y-2 overflow-hidden text-xs @2xs/footer:flex-row\">\r\n <!-- Footer: metadata http -->\r\n <p\r\n class=\"squircle flex h-6 max-w-full min-w-22 items-center justify-center gap-2 overflow-hidden rounded-full border border-white/7.5 bg-white/2.5 px-2.5 py-1 font-mono\">\r\n <span\r\n class=\"font-mono font-bold text-rose-400 transition-colors duration-300 group-hover:text-white\">\r\n HTTP\r\n </span>\r\n <span class=\"font-mono text-neutral-300\"> {{ storeItemData.httpStatus }} </span>\r\n </p>\r\n\r\n <!-- Footer: metadata timestamp -->\r\n <p class=\"flex h-6 max-w-full min-w-22 items-center gap-2 overflow-hidden font-mono\">\r\n <fa-icon\r\n [icon]=\"ICON_TIMER\"\r\n class=\"text-rose-400 transition-colors duration-300 group-hover:text-white\" />\r\n <span class=\"flex-1 truncate overflow-hidden font-mono text-neutral-300\">\r\n {{ storeItem.historyItems.at(-1)?.timestamp| date:'HH:mm:ss' }}\r\n </span>\r\n </p>\r\n\r\n <!-- Footer: metadata count -->\r\n <p class=\"flex h-6 max-w-full min-w-22 items-center gap-2 overflow-hidden font-mono\">\r\n <fa-icon\r\n [icon]=\"ICON_COUNT\"\r\n class=\"text-rose-400 transition-colors duration-300 group-hover:text-white\" />\r\n <span class=\"truncate font-mono text-nowrap text-neutral-300 lowercase\">\r\n {{ storeItem.historyItems.length }} {{ ('Times' | translate) }}\r\n </span>\r\n </p>\r\n </div>\r\n\r\n <!-- Footer: bottoni -->\r\n <div\r\n class=\"touch:opacity-100 flex flex-col items-center justify-center gap-2 transition duration-300 group-hover:opacity-100 @[110px]/footer:flex-row @sm/footer:opacity-10\">\r\n <dx-button\r\n class=\"h-6! min-w-8! transition-colors duration-200 hover:bg-rose-400! focus:bg-transparent! active:bg-rose-500!\"\r\n [stylingMode]=\"'text'\"\r\n [icon]=\"storeItem.isCopied ? 'check' : 'copy'\"\r\n [hint]=\"'Copy' | translate : { prefix: 'btn' }\"\r\n [disabled]=\"storeItem.isCopied\"\r\n (click)=\"onCopyAll(storeItem.id)\">\r\n </dx-button>\r\n <dx-button\r\n class=\"h-6! min-w-8! transition-colors duration-200 hover:bg-rose-400! focus:bg-transparent! active:bg-rose-500!\"\r\n [stylingMode]=\"'text'\"\r\n [icon]=\"storeItem.isSaved ? 'check' : 'save'\"\r\n [hint]=\"'Save' | translate : { prefix: 'btn' }\"\r\n [disabled]=\"storeItem.isSaved\"\r\n (click)=\"onSave(storeItem.id)\">\r\n </dx-button>\r\n <dx-button\r\n class=\"h-6! min-w-8! transition-colors duration-200 hover:bg-rose-400! focus:bg-transparent! active:bg-rose-500!\"\r\n [stylingMode]=\"'text'\"\r\n [icon]=\"'trash'\"\r\n [hint]=\"'Delete' | translate : { prefix: 'btn' }\"\r\n [disabled]=\"false\"\r\n (click)=\"onDelete(storeItem.id)\"></dx-button>\r\n </div>\r\n </div>\r\n </li>\r\n }\r\n </ul>\r\n </main>\r\n\r\n @if (toast(); as toast) {\r\n <div\r\n class=\"pointer-events-none absolute bottom-6 left-1/2 flex -translate-x-1/2 rounded-lg border border-emerald-500/20 bg-emerald-950/90 px-4 py-2.5 shadow-[0_4px_12px_rgba(0,0,0,0.5),0_2px_4px_rgba(16,185,129,0.1)] backdrop-blur-md transition duration-300\">\r\n <span\r\n class=\"flex items-center gap-2 font-sans text-xs font-medium tracking-wide text-emerald-200\">\r\n <span class=\"font-mono text-sm font-bold text-emerald-400\">\u2713</span>\r\n {{ toast.label | translate : { prefix: 'toast' } }}\r\n </span>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block;height:min(700px,80%);max-height:80%;width:min(1000px,60%);max-width:80%}@media(max-width:768px){:host{width:100%!important;max-width:100%!important;height:100%!important;max-height:100%!important}}:host ::ng-deep .dx-icon{color:#fff!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: DxButtonModule }, { kind: "component", type: i2.DxButtonComponent, selector: "dx-button", inputs: ["accessKey", "activeStateEnabled", "disabled", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "icon", "rtlEnabled", "stylingMode", "tabIndex", "template", "text", "type", "useSubmitBehavior", "validationGroup", "visible", "width"], outputs: ["onClick", "onContentReady", "onDisposing", "onInitialized", "onOptionChanged", "accessKeyChange", "activeStateEnabledChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "iconChange", "rtlEnabledChange", "stylingModeChange", "tabIndexChange", "templateChange", "textChange", "typeChange", "useSubmitBehaviorChange", "validationGroupChange", "visibleChange", "widthChange"] }, { kind: "ngmodule", type: DxTooltipModule }, { kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }, { kind: "component", type: UniDialogErrorArticle, selector: "uni-dialog-error-article", inputs: ["lblTitle", "property"], outputs: ["onCopyEvt"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: UniTranslatePipe, name: "translate" }, { kind: "pipe", type: GetDataPipe, name: "get_data" }, { kind: "pipe", type: GetBodyAsyncPipe, name: "get_body_async" }, { kind: "pipe", type: GetTimestampFormattedPipe, name: "get_timestamp_formatted" }, { kind: "pipe", type: UniParsePipe, name: "parse" }, { kind: "pipe", type: UniUrlPipe, name: "url" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
358
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: UniDialogError, isStandalone: true, selector: "uni-dialog-error", inputs: { storeItems: { classPropertyName: "storeItems", publicName: "storeItems", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div\r\n class=\"squircle relative flex h-full w-full flex-col gap-6 overflow-hidden rounded-[4rem] bg-linear-to-br from-[#2b080d]/90 via-[#651525]/90 to-[#21060b]/90 p-6 shadow-[0_40px_100px_-20px_rgba(0,0,0,.8)] backdrop-blur-3xl\">\r\n <div\r\n class=\"absolute inset-0 bg-[radial-gradient(circle_at_15%_10%,rgba(255,120,130,.22),transparent_35%),radial-gradient(circle_at_85%_85%,rgba(255,50,90,.18),transparent_40%)]\"></div>\r\n\r\n <!-- Titolo -->\r\n <header class=\"flex items-center justify-between gap-4 border-b border-rose-400/25 pb-4\">\r\n <!-- Titolo: led -->\r\n <span class=\"relative flex size-3\">\r\n <span\r\n class=\"absolute inline-flex h-full w-full animate-ping rounded-full bg-rose-400 opacity-40\"></span>\r\n <span\r\n class=\"relative inline-flex size-3 rounded-full bg-linear-to-tr from-rose-500 to-rose-300 shadow-[0_0_20px_rgba(244,63,94,0.8)]\"></span>\r\n </span>\r\n\r\n <!-- Titolo: scritta -->\r\n <h1 class=\"mr-auto truncate text-2xl font-black tracking-tight text-white antialiased\">\r\n {{ 'Errors' | translate }}\r\n </h1>\r\n\r\n <!-- Titolo: totale -->\r\n <span\r\n class=\"xs:block hidden rounded-xl border border-white/7.5 bg-white/5 px-3 py-1.5 font-mono text-xs font-semibold tracking-wider text-neutral-200\">\r\n {{ 'Total' | translate }}: {{ storeItemsVisibile().length }}\r\n </span>\r\n\r\n <!-- Titolo: bottone chiusura -->\r\n <dx-button\r\n class=\"w-8 transition-colors duration-200 hover:bg-rose-400! focus:bg-transparent! active:bg-rose-500!\"\r\n [stylingMode]=\"'text'\"\r\n [icon]=\"'close'\"\r\n (onClick)=\"onCloseDialog()\"></dx-button>\r\n </header>\r\n\r\n <!-- Lista Errori -->\r\n <main\r\n class=\"scrollbar-none overflow-y-auto [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden\">\r\n <ul class=\"flex flex-col gap-6 overflow-x-auto p-2\">\r\n @for (storeItem of storeItemsVisibile(); track $index) {\r\n <!-- Data -->\r\n @let uniError = storeItem.uniError; @let storeItemData = storeItem | get_data;\r\n <li\r\n class=\"group squircle @container/item relative flex w-full min-w-32 flex-col overflow-hidden rounded-[3rem] border-[1.5px] border-white/7.5 bg-white/2.5 text-left shadow-[0_4px_12px_-4px_rgba(0,0,0,0.5)] transition duration-300\"\r\n [ngClass]=\"{\r\n 'bg-white/7.5! shadow-[0_30px_40px_-18px_rgba(0,0,0,0.75),inset_0_1px_1px_rgba(255,255,255,0.15)]! hover:border-rose-400!': storeItem.isOpen,\r\n 'hover:scale-[1.01] hover:border-white/33 hover:bg-white/5': !storeItem.isOpen\r\n }\">\r\n <!-- Badges -->\r\n <div class=\"absolute -top-2 -right-1 flex gap-2 text-white\">\r\n @if(storeItem.isCopied) {\r\n <span class=\"squircle rounded-full bg-amber-500 px-3 py-px\">\r\n {{ 'Copied' | translate }}\r\n </span>\r\n } @if(storeItem.isSaved) {\r\n <span class=\"squircle rounded-full bg-emerald-500 px-3 py-px\">\r\n {{ 'Saved' | translate }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <!-- Header -->\r\n <div class=\"@container/header flex items-center justify-between gap-4 p-4\">\r\n <!-- Header: titolo -->\r\n <div class=\"flex min-w-0 items-center gap-3.5\">\r\n <button\r\n class=\"squircle flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-full border border-white/10 bg-white/5 text-neutral-400 transition duration-300 group-hover:border-white/30 group-hover:bg-white/10 group-hover:text-white hover:bg-rose-400\"\r\n [ngClass]=\"{ 'rotate-90': storeItem.isOpen }\"\r\n [title]=\"(storeItem.isOpen ? 'Close' : 'Open') | translate: { prefix: 'btn' }\"\r\n (click)=\"onToggleIsOpen(storeItem.id)\">\r\n <span class=\"font-mono text-xs font-bold\">></span>\r\n </button>\r\n <span\r\n class=\"truncate font-sans text-base font-bold tracking-tight text-neutral-200 transition-colors duration-300 group-hover:text-white\">\r\n {{ storeItemData.title }}\r\n </span>\r\n </div>\r\n\r\n <!-- Header: type -->\r\n <div\r\n class=\"squircle hidden items-center gap-2 rounded-full border border-white/10 bg-white/5 px-3 py-1.5 text-rose-400 transition-colors duration-300 group-hover:border-white/30 group-hover:bg-white/10 group-hover:text-white @xs/header:flex\">\r\n @if(uniError.type === 'network' || uniError.type === 'server') {\r\n <fa-icon [icon]=\"ICON_FE\" />\r\n <span class=\"font-mono text-xs opacity-30\">/</span>\r\n }\r\n <fa-icon [icon]=\"storeItemData.icon\" [title]=\"uniError.type\" />\r\n <span class=\"font-mono text-xs tracking-wider uppercase\"> {{ uniError.type }} </span>\r\n </div>\r\n </div>\r\n\r\n <!-- Main -->\r\n <div class=\"flex flex-col gap-8 p-4\">\r\n <!-- Messaggio -->\r\n <div\r\n class=\"flex flex-col gap-4 [&_article]:border-0 [&_article]:p-0 [&_article_h3]:text-neutral-400 [&_article_h3]:group-hover:text-neutral-200 [&_article_h3_div_*]:hover:text-white [&_article_p]:text-white\">\r\n <!-- Messaggio default -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Message'\"\r\n [property]=\"{ value: uniError.exception.message, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Messaggio intero -->\r\n @if(uniError.type === 'be' && uniError.innerException) {\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'InnerMessage'\"\r\n [property]=\"{ value: uniError.innerException.message, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n }\r\n </div>\r\n\r\n <!-- Dettagli -->\r\n @if(storeItem.isOpen) {\r\n <div class=\"flex flex-col gap-6 border-t border-t-white/12.5 pt-4\">\r\n <h1\r\n class=\"text-3xl! font-bold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'Details' | translate }}\r\n </h1>\r\n <div class=\"flex flex-col gap-12\">\r\n @if(uniError.type === 'be' || uniError.type === 'server') {\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Dettagli: request -->\r\n <h2\r\n class=\"text-lg! font-semibold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'Request' | translate }}\r\n </h2>\r\n <div class=\"flex flex-col gap-4\">\r\n <div class=\"flex flex-col gap-x-16 gap-y-4 @md/item:flex-row\">\r\n <!-- Dettagli: request metodo http -->\r\n <uni-dialog-error-article\r\n class=\"shrink-0 @md/item:basis-24\"\r\n [lblTitle]=\"'Method'\"\r\n [property]=\"{ value: uniError.request.method, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n <!-- Dettagli: request url -->\r\n <uni-dialog-error-article\r\n class=\"flex-1\"\r\n [lblTitle]=\"'Url'\"\r\n [property]=\"{ value: uniError.request.url, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n </div>\r\n\r\n <!-- Dettagli: request query params -->\r\n @let queryParams = [...(uniError.request.url | to_url).searchParams];\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'QueryParams'\"\r\n [property]=\"{ value: queryParams, type: 'array' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: request headers -->\r\n @let headers = [...uniError.request.headers.entries()];\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Headers'\"\r\n [property]=\"{ value: headers, type: 'array' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: request body -->\r\n @let body = uniError.request | get_body_async | async;\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Body'\"\r\n [property]=\"{ value: body | parse, type: 'json'}\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: request info -->\r\n <div class=\"flex flex-col gap-4 @md/item:flex-row\">\r\n <!-- Dettagli: request info mode -->\r\n <uni-dialog-error-article\r\n class=\"flex-1\"\r\n [lblTitle]=\"'Mode'\"\r\n [property]=\"{ value: uniError.request.mode, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: request info credentials -->\r\n <uni-dialog-error-article\r\n class=\"flex-1\"\r\n [lblTitle]=\"'Credentials'\"\r\n [property]=\"{ value: uniError.request.credentials, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: request info cache -->\r\n <uni-dialog-error-article\r\n class=\"flex-1\"\r\n [lblTitle]=\"'CacheMode'\"\r\n [property]=\"{ value: uniError.request.cache, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Dettagli: info -->\r\n <div class=\"flex flex-col gap-4\">\r\n <h2\r\n class=\"text-lg! font-semibold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'Diagnostic' | translate }}\r\n </h2>\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Dettagli: info durata -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Duration'\"\r\n [property]=\"{ value: `${uniError.durationMs / 1000}s`, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: info user agent -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'UserAgent'\"\r\n [property]=\"{ value: uniError.userAgent, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- Dettagli: eccezione -->\r\n <div class=\"flex flex-col gap-4\">\r\n <h2\r\n class=\"text-lg! font-semibold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'Exception' | translate }} ({{ uniError.type }})\r\n </h2>\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Dettagli: eccezione nome funzione -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Function'\"\r\n [property]=\"{ value: uniError.exception.functionName, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: eccezione tipo eccezione -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Type'\"\r\n [property]=\"{ value: uniError.exception.type, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: eccezione stack trace -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'StackTrace'\"\r\n [property]=\"{ value: uniError.exception.stackTrace, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n @if(uniError.type !== 'fe' && uniError.exception.html) {\r\n <!-- Dettagli: eccezione html -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Html'\"\r\n [property]=\"{ value: uniError.exception.html, type: 'html' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n }\r\n\r\n <!-- Dettagli: eccezione frames -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Frames'\"\r\n [property]=\"{ value: uniError.exception.stackTraceFrames.map(x => ([x.file, `LINE ${x.line}`])), type: 'array' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- Interno -->\r\n @if(storeItem.isOpen) { @if((uniError.type === 'be' || uniError.type === 'server') &&\r\n uniError.innerException) {\r\n <div class=\"flex flex-col gap-6 border-t border-t-white/12.5 pt-4\">\r\n <h1\r\n class=\"text-3xl! font-bold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'Inner' | translate }}\r\n </h1>\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Interno: nome funzione -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Function'\"\r\n [property]=\"{ value: uniError.innerException.functionName, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Interno: tipo -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Type'\"\r\n [property]=\"{ value: uniError.innerException.type, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Interno: stack trace -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'StackTrace'\"\r\n [property]=\"{ value: uniError.innerException.stackTrace, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n @if(uniError.exception.html) {\r\n <!-- Dettagli: eccezione html -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Html'\"\r\n [property]=\"{ value: uniError.exception.html, type: 'html' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n }\r\n </div>\r\n </div>\r\n } }\r\n\r\n <!-- Storico -->\r\n @if(storeItem.isOpen){ @if(storeItem.historyItems.length > 0) {\r\n <div class=\"flex flex-col gap-6 border-t border-t-white/12.5 pt-4\">\r\n <h1\r\n class=\"text-3xl! font-bold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'History' | translate }}\r\n </h1>\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Timestamp'\"\r\n [property]=\"{ value: (storeItem.historyItems | get_timestamp_formatted).map(x => ([x.message, x.date])), type: 'array' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n </div>\r\n } }\r\n </div>\r\n\r\n <!-- Footer -->\r\n <div\r\n class=\"@container/footer flex flex-col justify-between gap-4 border-t border-white/5 bg-white/1 px-6 py-4 @lg/item:flex-row @lg/item:items-center\">\r\n <!-- Footer: metadata -->\r\n <div\r\n class=\"flex min-w-0 flex-col items-center justify-between gap-x-4 gap-y-2 overflow-hidden text-xs @2xs/footer:flex-row\">\r\n <!-- Footer: metadata http -->\r\n <p\r\n class=\"squircle flex h-6 max-w-full min-w-22 items-center justify-center gap-2 overflow-hidden rounded-full border border-white/7.5 bg-white/2.5 px-2.5 py-1 font-mono\">\r\n <span\r\n class=\"font-mono font-bold text-rose-400 transition-colors duration-300 group-hover:text-white\">\r\n HTTP\r\n </span>\r\n <span class=\"font-mono text-neutral-300\"> {{ storeItemData.httpStatus }} </span>\r\n </p>\r\n\r\n <!-- Footer: metadata timestamp -->\r\n <p class=\"flex h-6 max-w-full min-w-22 items-center gap-2 overflow-hidden font-mono\">\r\n <fa-icon\r\n [icon]=\"ICON_TIMER\"\r\n class=\"text-rose-400 transition-colors duration-300 group-hover:text-white\" />\r\n <span class=\"flex-1 truncate overflow-hidden font-mono text-neutral-300\">\r\n {{ storeItem.historyItems.at(-1)?.timestamp| date:'HH:mm:ss' }}\r\n </span>\r\n </p>\r\n\r\n <!-- Footer: metadata count -->\r\n <p class=\"flex h-6 max-w-full min-w-22 items-center gap-2 overflow-hidden font-mono\">\r\n <fa-icon\r\n [icon]=\"ICON_COUNT\"\r\n class=\"text-rose-400 transition-colors duration-300 group-hover:text-white\" />\r\n <span class=\"truncate font-mono text-nowrap text-neutral-300 lowercase\">\r\n {{ storeItem.historyItems.length }} {{ ('Times' | translate) }}\r\n </span>\r\n </p>\r\n </div>\r\n\r\n <!-- Footer: bottoni -->\r\n <div\r\n class=\"touch:opacity-100 flex flex-col items-center justify-center gap-2 transition duration-300 group-hover:opacity-100 @[110px]/footer:flex-row @sm/footer:opacity-10\">\r\n <dx-button\r\n class=\"h-6! min-w-8! transition-colors duration-200 hover:bg-rose-400! focus:bg-transparent! active:bg-rose-500!\"\r\n [stylingMode]=\"'text'\"\r\n [icon]=\"storeItem.isCopied ? 'check' : 'copy'\"\r\n [hint]=\"'Copy' | translate : { prefix: 'btn' }\"\r\n [disabled]=\"storeItem.isCopied\"\r\n (click)=\"onCopyAll(storeItem.id)\">\r\n </dx-button>\r\n <dx-button\r\n class=\"h-6! min-w-8! transition-colors duration-200 hover:bg-rose-400! focus:bg-transparent! active:bg-rose-500!\"\r\n [stylingMode]=\"'text'\"\r\n [icon]=\"storeItem.isSaved ? 'check' : 'save'\"\r\n [hint]=\"'Save' | translate : { prefix: 'btn' }\"\r\n [disabled]=\"storeItem.isSaved\"\r\n (click)=\"onSave(storeItem.id)\">\r\n </dx-button>\r\n <dx-button\r\n class=\"h-6! min-w-8! transition-colors duration-200 hover:bg-rose-400! focus:bg-transparent! active:bg-rose-500!\"\r\n [stylingMode]=\"'text'\"\r\n [icon]=\"'trash'\"\r\n [hint]=\"'Delete' | translate : { prefix: 'btn' }\"\r\n [disabled]=\"false\"\r\n (click)=\"onDelete(storeItem.id)\"></dx-button>\r\n </div>\r\n </div>\r\n </li>\r\n }\r\n </ul>\r\n </main>\r\n\r\n @if (toast(); as toast) {\r\n <div\r\n class=\"pointer-events-none absolute bottom-6 left-1/2 flex -translate-x-1/2 rounded-lg border border-emerald-500/20 bg-emerald-950/90 px-4 py-2.5 shadow-[0_4px_12px_rgba(0,0,0,0.5),0_2px_4px_rgba(16,185,129,0.1)] backdrop-blur-md transition duration-300\">\r\n <span\r\n class=\"flex items-center gap-2 font-sans text-xs font-medium tracking-wide text-emerald-200\">\r\n <span class=\"font-mono text-sm font-bold text-emerald-400\">\u2713</span>\r\n {{ toast.label | translate : { prefix: 'toast' } }}\r\n </span>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block;height:min(700px,80%);max-height:80%;width:min(1000px,60%);max-width:80%}@media(max-width:768px){:host{width:100%!important;max-width:100%!important;height:100%!important;max-height:100%!important}}:host ::ng-deep .dx-icon{color:#fff!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: DxButtonModule }, { kind: "component", type: i2.DxButtonComponent, selector: "dx-button", inputs: ["accessKey", "activeStateEnabled", "disabled", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "icon", "rtlEnabled", "stylingMode", "tabIndex", "template", "text", "type", "useSubmitBehavior", "validationGroup", "visible", "width"], outputs: ["onClick", "onContentReady", "onDisposing", "onInitialized", "onOptionChanged", "accessKeyChange", "activeStateEnabledChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "iconChange", "rtlEnabledChange", "stylingModeChange", "tabIndexChange", "templateChange", "textChange", "typeChange", "useSubmitBehaviorChange", "validationGroupChange", "visibleChange", "widthChange"] }, { kind: "ngmodule", type: DxTooltipModule }, { kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }, { kind: "component", type: UniDialogErrorArticle, selector: "uni-dialog-error-article", inputs: ["lblTitle", "property"], outputs: ["onCopyEvt"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: UniTranslatePipe, name: "translate" }, { kind: "pipe", type: GetDataPipe, name: "get_data" }, { kind: "pipe", type: GetBodyAsyncPipe, name: "get_body_async" }, { kind: "pipe", type: GetTimestampFormattedPipe, name: "get_timestamp_formatted" }, { kind: "pipe", type: UniParsePipe, name: "parse" }, { kind: "pipe", type: UniToUrlStringPipe, name: "to_url" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
359
359
|
}
|
|
360
360
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UniDialogError, decorators: [{
|
|
361
361
|
type: Component,
|
|
@@ -371,8 +371,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
371
371
|
GetBodyAsyncPipe,
|
|
372
372
|
GetTimestampFormattedPipe,
|
|
373
373
|
UniParsePipe,
|
|
374
|
-
|
|
375
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"squircle relative flex h-full w-full flex-col gap-6 overflow-hidden rounded-[4rem] bg-linear-to-br from-[#2b080d]/90 via-[#651525]/90 to-[#21060b]/90 p-6 shadow-[0_40px_100px_-20px_rgba(0,0,0,.8)] backdrop-blur-3xl\">\r\n <div\r\n class=\"absolute inset-0 bg-[radial-gradient(circle_at_15%_10%,rgba(255,120,130,.22),transparent_35%),radial-gradient(circle_at_85%_85%,rgba(255,50,90,.18),transparent_40%)]\"></div>\r\n\r\n <!-- Titolo -->\r\n <header class=\"flex items-center justify-between gap-4 border-b border-rose-400/25 pb-4\">\r\n <!-- Titolo: led -->\r\n <span class=\"relative flex size-3\">\r\n <span\r\n class=\"absolute inline-flex h-full w-full animate-ping rounded-full bg-rose-400 opacity-40\"></span>\r\n <span\r\n class=\"relative inline-flex size-3 rounded-full bg-linear-to-tr from-rose-500 to-rose-300 shadow-[0_0_20px_rgba(244,63,94,0.8)]\"></span>\r\n </span>\r\n\r\n <!-- Titolo: scritta -->\r\n <h1 class=\"mr-auto truncate text-2xl font-black tracking-tight text-white antialiased\">\r\n {{ 'Errors' | translate }}\r\n </h1>\r\n\r\n <!-- Titolo: totale -->\r\n <span\r\n class=\"xs:block hidden rounded-xl border border-white/7.5 bg-white/5 px-3 py-1.5 font-mono text-xs font-semibold tracking-wider text-neutral-200\">\r\n {{ 'Total' | translate }}: {{ storeItemsVisibile().length }}\r\n </span>\r\n\r\n <!-- Titolo: bottone chiusura -->\r\n <dx-button\r\n class=\"w-8 transition-colors duration-200 hover:bg-rose-400! focus:bg-transparent! active:bg-rose-500!\"\r\n [stylingMode]=\"'text'\"\r\n [icon]=\"'close'\"\r\n (onClick)=\"onCloseDialog()\"></dx-button>\r\n </header>\r\n\r\n <!-- Lista Errori -->\r\n <main\r\n class=\"scrollbar-none overflow-y-auto [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden\">\r\n <ul class=\"flex flex-col gap-6 overflow-x-auto p-2\">\r\n @for (storeItem of storeItemsVisibile(); track $index) {\r\n <!-- Data -->\r\n @let uniError = storeItem.uniError; @let storeItemData = storeItem | get_data;\r\n <li\r\n class=\"group squircle @container/item relative flex w-full min-w-32 flex-col overflow-hidden rounded-[3rem] border-[1.5px] border-white/7.5 bg-white/2.5 text-left shadow-[0_4px_12px_-4px_rgba(0,0,0,0.5)] transition duration-300\"\r\n [ngClass]=\"{\r\n 'bg-white/7.5! shadow-[0_30px_40px_-18px_rgba(0,0,0,0.75),inset_0_1px_1px_rgba(255,255,255,0.15)]! hover:border-rose-400!': storeItem.isOpen,\r\n 'hover:scale-[1.01] hover:border-white/33 hover:bg-white/5': !storeItem.isOpen\r\n }\">\r\n <!-- Badges -->\r\n <div class=\"absolute -top-2 -right-1 flex gap-2 text-white\">\r\n @if(storeItem.isCopied) {\r\n <span class=\"squircle rounded-full bg-amber-500 px-3 py-px\">\r\n {{ 'Copied' | translate }}\r\n </span>\r\n } @if(storeItem.isSaved) {\r\n <span class=\"squircle rounded-full bg-emerald-500 px-3 py-px\">\r\n {{ 'Saved' | translate }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <!-- Header -->\r\n <div class=\"@container/header flex items-center justify-between gap-4 p-4\">\r\n <!-- Header: titolo -->\r\n <div class=\"flex min-w-0 items-center gap-3.5\">\r\n <button\r\n class=\"squircle flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-full border border-white/10 bg-white/5 text-neutral-400 transition duration-300 group-hover:border-white/30 group-hover:bg-white/10 group-hover:text-white hover:bg-rose-400\"\r\n [ngClass]=\"{ 'rotate-90': storeItem.isOpen }\"\r\n [title]=\"(storeItem.isOpen ? 'Close' : 'Open') | translate: { prefix: 'btn' }\"\r\n (click)=\"onToggleIsOpen(storeItem.id)\">\r\n <span class=\"font-mono text-xs font-bold\">></span>\r\n </button>\r\n <span\r\n class=\"truncate font-sans text-base font-bold tracking-tight text-neutral-200 transition-colors duration-300 group-hover:text-white\">\r\n {{ storeItemData.title }}\r\n </span>\r\n </div>\r\n\r\n <!-- Header: type -->\r\n <div\r\n class=\"squircle hidden items-center gap-2 rounded-full border border-white/10 bg-white/5 px-3 py-1.5 text-rose-400 transition-colors duration-300 group-hover:border-white/30 group-hover:bg-white/10 group-hover:text-white @xs/header:flex\">\r\n @if(uniError.type === 'network' || uniError.type === 'server') {\r\n <fa-icon [icon]=\"ICON_FE\" />\r\n <span class=\"font-mono text-xs opacity-30\">/</span>\r\n }\r\n <fa-icon [icon]=\"storeItemData.icon\" [title]=\"uniError.type\" />\r\n <span class=\"font-mono text-xs tracking-wider uppercase\"> {{ uniError.type }} </span>\r\n </div>\r\n </div>\r\n\r\n <!-- Main -->\r\n <div class=\"flex flex-col gap-8 p-4\">\r\n <!-- Messaggio -->\r\n <div\r\n class=\"flex flex-col gap-4 [&_article]:border-0 [&_article]:p-0 [&_article_h3]:text-neutral-400 [&_article_h3]:group-hover:text-neutral-200 [&_article_h3_div_*]:hover:text-white [&_article_p]:text-white\">\r\n <!-- Messaggio default -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Message'\"\r\n [property]=\"{ value: uniError.exception.message, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Messaggio intero -->\r\n @if(uniError.type === 'be' && uniError.innerException) {\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'InnerMessage'\"\r\n [property]=\"{ value: uniError.innerException.message, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n }\r\n </div>\r\n\r\n <!-- Dettagli -->\r\n @if(storeItem.isOpen) {\r\n <div class=\"flex flex-col gap-6 border-t border-t-white/12.5 pt-4\">\r\n <h1\r\n class=\"text-3xl! font-bold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'Details' | translate }}\r\n </h1>\r\n <div class=\"flex flex-col gap-12\">\r\n @if(uniError.type === 'be' || uniError.type === 'server') {\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Dettagli: request -->\r\n <h2\r\n class=\"text-lg! font-semibold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'Request' | translate }}\r\n </h2>\r\n <div class=\"flex flex-col gap-4\">\r\n <div class=\"flex flex-col gap-x-16 gap-y-4 @md/item:flex-row\">\r\n <!-- Dettagli: request metodo http -->\r\n <uni-dialog-error-article\r\n class=\"shrink-0 @md/item:basis-24\"\r\n [lblTitle]=\"'Method'\"\r\n [property]=\"{ value: uniError.request.method, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n <!-- Dettagli: request url -->\r\n <uni-dialog-error-article\r\n class=\"flex-1\"\r\n [lblTitle]=\"'Url'\"\r\n [property]=\"{ value: uniError.request.url, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n </div>\r\n\r\n <!-- Dettagli: request query params -->\r\n @let queryParams = [...(uniError.request.url | url).searchParams];\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'QueryParams'\"\r\n [property]=\"{ value: queryParams, type: 'array' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: request headers -->\r\n @let headers = [...uniError.request.headers.entries()];\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Headers'\"\r\n [property]=\"{ value: headers, type: 'array' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: request body -->\r\n @let body = uniError.request | get_body_async | async;\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Body'\"\r\n [property]=\"{ value: body | parse, type: 'json'}\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: request info -->\r\n <div class=\"flex flex-col gap-4 @md/item:flex-row\">\r\n <!-- Dettagli: request info mode -->\r\n <uni-dialog-error-article\r\n class=\"flex-1\"\r\n [lblTitle]=\"'Mode'\"\r\n [property]=\"{ value: uniError.request.mode, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: request info credentials -->\r\n <uni-dialog-error-article\r\n class=\"flex-1\"\r\n [lblTitle]=\"'Credentials'\"\r\n [property]=\"{ value: uniError.request.credentials, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: request info cache -->\r\n <uni-dialog-error-article\r\n class=\"flex-1\"\r\n [lblTitle]=\"'CacheMode'\"\r\n [property]=\"{ value: uniError.request.cache, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Dettagli: info -->\r\n <div class=\"flex flex-col gap-4\">\r\n <h2\r\n class=\"text-lg! font-semibold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'Diagnostic' | translate }}\r\n </h2>\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Dettagli: info durata -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Duration'\"\r\n [property]=\"{ value: `${uniError.durationMs / 1000}s`, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: info user agent -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'UserAgent'\"\r\n [property]=\"{ value: uniError.userAgent, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- Dettagli: eccezione -->\r\n <div class=\"flex flex-col gap-4\">\r\n <h2\r\n class=\"text-lg! font-semibold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'Exception' | translate }} ({{ uniError.type }})\r\n </h2>\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Dettagli: eccezione nome funzione -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Function'\"\r\n [property]=\"{ value: uniError.exception.functionName, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: eccezione tipo eccezione -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Type'\"\r\n [property]=\"{ value: uniError.exception.type, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: eccezione stack trace -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'StackTrace'\"\r\n [property]=\"{ value: uniError.exception.stackTrace, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n @if(uniError.type !== 'fe' && uniError.exception.html) {\r\n <!-- Dettagli: eccezione html -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Html'\"\r\n [property]=\"{ value: uniError.exception.html, type: 'html' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n }\r\n\r\n <!-- Dettagli: eccezione frames -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Frames'\"\r\n [property]=\"{ value: uniError.exception.stackTraceFrames.map(x => ([x.file, `LINE ${x.line}`])), type: 'array' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- Interno -->\r\n @if(storeItem.isOpen) { @if((uniError.type === 'be' || uniError.type === 'server') &&\r\n uniError.innerException) {\r\n <div class=\"flex flex-col gap-6 border-t border-t-white/12.5 pt-4\">\r\n <h1\r\n class=\"text-3xl! font-bold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'Inner' | translate }}\r\n </h1>\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Interno: nome funzione -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Function'\"\r\n [property]=\"{ value: uniError.innerException.functionName, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Interno: tipo -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Type'\"\r\n [property]=\"{ value: uniError.innerException.type, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Interno: stack trace -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'StackTrace'\"\r\n [property]=\"{ value: uniError.innerException.stackTrace, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n @if(uniError.exception.html) {\r\n <!-- Dettagli: eccezione html -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Html'\"\r\n [property]=\"{ value: uniError.exception.html, type: 'html' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n }\r\n </div>\r\n </div>\r\n } }\r\n\r\n <!-- Storico -->\r\n @if(storeItem.isOpen){ @if(storeItem.historyItems.length > 0) {\r\n <div class=\"flex flex-col gap-6 border-t border-t-white/12.5 pt-4\">\r\n <h1\r\n class=\"text-3xl! font-bold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'History' | translate }}\r\n </h1>\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Timestamp'\"\r\n [property]=\"{ value: (storeItem.historyItems | get_timestamp_formatted).map(x => ([x.message, x.date])), type: 'array' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n </div>\r\n } }\r\n </div>\r\n\r\n <!-- Footer -->\r\n <div\r\n class=\"@container/footer flex flex-col justify-between gap-4 border-t border-white/5 bg-white/1 px-6 py-4 @lg/item:flex-row @lg/item:items-center\">\r\n <!-- Footer: metadata -->\r\n <div\r\n class=\"flex min-w-0 flex-col items-center justify-between gap-x-4 gap-y-2 overflow-hidden text-xs @2xs/footer:flex-row\">\r\n <!-- Footer: metadata http -->\r\n <p\r\n class=\"squircle flex h-6 max-w-full min-w-22 items-center justify-center gap-2 overflow-hidden rounded-full border border-white/7.5 bg-white/2.5 px-2.5 py-1 font-mono\">\r\n <span\r\n class=\"font-mono font-bold text-rose-400 transition-colors duration-300 group-hover:text-white\">\r\n HTTP\r\n </span>\r\n <span class=\"font-mono text-neutral-300\"> {{ storeItemData.httpStatus }} </span>\r\n </p>\r\n\r\n <!-- Footer: metadata timestamp -->\r\n <p class=\"flex h-6 max-w-full min-w-22 items-center gap-2 overflow-hidden font-mono\">\r\n <fa-icon\r\n [icon]=\"ICON_TIMER\"\r\n class=\"text-rose-400 transition-colors duration-300 group-hover:text-white\" />\r\n <span class=\"flex-1 truncate overflow-hidden font-mono text-neutral-300\">\r\n {{ storeItem.historyItems.at(-1)?.timestamp| date:'HH:mm:ss' }}\r\n </span>\r\n </p>\r\n\r\n <!-- Footer: metadata count -->\r\n <p class=\"flex h-6 max-w-full min-w-22 items-center gap-2 overflow-hidden font-mono\">\r\n <fa-icon\r\n [icon]=\"ICON_COUNT\"\r\n class=\"text-rose-400 transition-colors duration-300 group-hover:text-white\" />\r\n <span class=\"truncate font-mono text-nowrap text-neutral-300 lowercase\">\r\n {{ storeItem.historyItems.length }} {{ ('Times' | translate) }}\r\n </span>\r\n </p>\r\n </div>\r\n\r\n <!-- Footer: bottoni -->\r\n <div\r\n class=\"touch:opacity-100 flex flex-col items-center justify-center gap-2 transition duration-300 group-hover:opacity-100 @[110px]/footer:flex-row @sm/footer:opacity-10\">\r\n <dx-button\r\n class=\"h-6! min-w-8! transition-colors duration-200 hover:bg-rose-400! focus:bg-transparent! active:bg-rose-500!\"\r\n [stylingMode]=\"'text'\"\r\n [icon]=\"storeItem.isCopied ? 'check' : 'copy'\"\r\n [hint]=\"'Copy' | translate : { prefix: 'btn' }\"\r\n [disabled]=\"storeItem.isCopied\"\r\n (click)=\"onCopyAll(storeItem.id)\">\r\n </dx-button>\r\n <dx-button\r\n class=\"h-6! min-w-8! transition-colors duration-200 hover:bg-rose-400! focus:bg-transparent! active:bg-rose-500!\"\r\n [stylingMode]=\"'text'\"\r\n [icon]=\"storeItem.isSaved ? 'check' : 'save'\"\r\n [hint]=\"'Save' | translate : { prefix: 'btn' }\"\r\n [disabled]=\"storeItem.isSaved\"\r\n (click)=\"onSave(storeItem.id)\">\r\n </dx-button>\r\n <dx-button\r\n class=\"h-6! min-w-8! transition-colors duration-200 hover:bg-rose-400! focus:bg-transparent! active:bg-rose-500!\"\r\n [stylingMode]=\"'text'\"\r\n [icon]=\"'trash'\"\r\n [hint]=\"'Delete' | translate : { prefix: 'btn' }\"\r\n [disabled]=\"false\"\r\n (click)=\"onDelete(storeItem.id)\"></dx-button>\r\n </div>\r\n </div>\r\n </li>\r\n }\r\n </ul>\r\n </main>\r\n\r\n @if (toast(); as toast) {\r\n <div\r\n class=\"pointer-events-none absolute bottom-6 left-1/2 flex -translate-x-1/2 rounded-lg border border-emerald-500/20 bg-emerald-950/90 px-4 py-2.5 shadow-[0_4px_12px_rgba(0,0,0,0.5),0_2px_4px_rgba(16,185,129,0.1)] backdrop-blur-md transition duration-300\">\r\n <span\r\n class=\"flex items-center gap-2 font-sans text-xs font-medium tracking-wide text-emerald-200\">\r\n <span class=\"font-mono text-sm font-bold text-emerald-400\">\u2713</span>\r\n {{ toast.label | translate : { prefix: 'toast' } }}\r\n </span>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block;height:min(700px,80%);max-height:80%;width:min(1000px,60%);max-width:80%}@media(max-width:768px){:host{width:100%!important;max-width:100%!important;height:100%!important;max-height:100%!important}}:host ::ng-deep .dx-icon{color:#fff!important}\n"] }]
|
|
374
|
+
UniToUrlStringPipe,
|
|
375
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"squircle relative flex h-full w-full flex-col gap-6 overflow-hidden rounded-[4rem] bg-linear-to-br from-[#2b080d]/90 via-[#651525]/90 to-[#21060b]/90 p-6 shadow-[0_40px_100px_-20px_rgba(0,0,0,.8)] backdrop-blur-3xl\">\r\n <div\r\n class=\"absolute inset-0 bg-[radial-gradient(circle_at_15%_10%,rgba(255,120,130,.22),transparent_35%),radial-gradient(circle_at_85%_85%,rgba(255,50,90,.18),transparent_40%)]\"></div>\r\n\r\n <!-- Titolo -->\r\n <header class=\"flex items-center justify-between gap-4 border-b border-rose-400/25 pb-4\">\r\n <!-- Titolo: led -->\r\n <span class=\"relative flex size-3\">\r\n <span\r\n class=\"absolute inline-flex h-full w-full animate-ping rounded-full bg-rose-400 opacity-40\"></span>\r\n <span\r\n class=\"relative inline-flex size-3 rounded-full bg-linear-to-tr from-rose-500 to-rose-300 shadow-[0_0_20px_rgba(244,63,94,0.8)]\"></span>\r\n </span>\r\n\r\n <!-- Titolo: scritta -->\r\n <h1 class=\"mr-auto truncate text-2xl font-black tracking-tight text-white antialiased\">\r\n {{ 'Errors' | translate }}\r\n </h1>\r\n\r\n <!-- Titolo: totale -->\r\n <span\r\n class=\"xs:block hidden rounded-xl border border-white/7.5 bg-white/5 px-3 py-1.5 font-mono text-xs font-semibold tracking-wider text-neutral-200\">\r\n {{ 'Total' | translate }}: {{ storeItemsVisibile().length }}\r\n </span>\r\n\r\n <!-- Titolo: bottone chiusura -->\r\n <dx-button\r\n class=\"w-8 transition-colors duration-200 hover:bg-rose-400! focus:bg-transparent! active:bg-rose-500!\"\r\n [stylingMode]=\"'text'\"\r\n [icon]=\"'close'\"\r\n (onClick)=\"onCloseDialog()\"></dx-button>\r\n </header>\r\n\r\n <!-- Lista Errori -->\r\n <main\r\n class=\"scrollbar-none overflow-y-auto [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden\">\r\n <ul class=\"flex flex-col gap-6 overflow-x-auto p-2\">\r\n @for (storeItem of storeItemsVisibile(); track $index) {\r\n <!-- Data -->\r\n @let uniError = storeItem.uniError; @let storeItemData = storeItem | get_data;\r\n <li\r\n class=\"group squircle @container/item relative flex w-full min-w-32 flex-col overflow-hidden rounded-[3rem] border-[1.5px] border-white/7.5 bg-white/2.5 text-left shadow-[0_4px_12px_-4px_rgba(0,0,0,0.5)] transition duration-300\"\r\n [ngClass]=\"{\r\n 'bg-white/7.5! shadow-[0_30px_40px_-18px_rgba(0,0,0,0.75),inset_0_1px_1px_rgba(255,255,255,0.15)]! hover:border-rose-400!': storeItem.isOpen,\r\n 'hover:scale-[1.01] hover:border-white/33 hover:bg-white/5': !storeItem.isOpen\r\n }\">\r\n <!-- Badges -->\r\n <div class=\"absolute -top-2 -right-1 flex gap-2 text-white\">\r\n @if(storeItem.isCopied) {\r\n <span class=\"squircle rounded-full bg-amber-500 px-3 py-px\">\r\n {{ 'Copied' | translate }}\r\n </span>\r\n } @if(storeItem.isSaved) {\r\n <span class=\"squircle rounded-full bg-emerald-500 px-3 py-px\">\r\n {{ 'Saved' | translate }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <!-- Header -->\r\n <div class=\"@container/header flex items-center justify-between gap-4 p-4\">\r\n <!-- Header: titolo -->\r\n <div class=\"flex min-w-0 items-center gap-3.5\">\r\n <button\r\n class=\"squircle flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-full border border-white/10 bg-white/5 text-neutral-400 transition duration-300 group-hover:border-white/30 group-hover:bg-white/10 group-hover:text-white hover:bg-rose-400\"\r\n [ngClass]=\"{ 'rotate-90': storeItem.isOpen }\"\r\n [title]=\"(storeItem.isOpen ? 'Close' : 'Open') | translate: { prefix: 'btn' }\"\r\n (click)=\"onToggleIsOpen(storeItem.id)\">\r\n <span class=\"font-mono text-xs font-bold\">></span>\r\n </button>\r\n <span\r\n class=\"truncate font-sans text-base font-bold tracking-tight text-neutral-200 transition-colors duration-300 group-hover:text-white\">\r\n {{ storeItemData.title }}\r\n </span>\r\n </div>\r\n\r\n <!-- Header: type -->\r\n <div\r\n class=\"squircle hidden items-center gap-2 rounded-full border border-white/10 bg-white/5 px-3 py-1.5 text-rose-400 transition-colors duration-300 group-hover:border-white/30 group-hover:bg-white/10 group-hover:text-white @xs/header:flex\">\r\n @if(uniError.type === 'network' || uniError.type === 'server') {\r\n <fa-icon [icon]=\"ICON_FE\" />\r\n <span class=\"font-mono text-xs opacity-30\">/</span>\r\n }\r\n <fa-icon [icon]=\"storeItemData.icon\" [title]=\"uniError.type\" />\r\n <span class=\"font-mono text-xs tracking-wider uppercase\"> {{ uniError.type }} </span>\r\n </div>\r\n </div>\r\n\r\n <!-- Main -->\r\n <div class=\"flex flex-col gap-8 p-4\">\r\n <!-- Messaggio -->\r\n <div\r\n class=\"flex flex-col gap-4 [&_article]:border-0 [&_article]:p-0 [&_article_h3]:text-neutral-400 [&_article_h3]:group-hover:text-neutral-200 [&_article_h3_div_*]:hover:text-white [&_article_p]:text-white\">\r\n <!-- Messaggio default -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Message'\"\r\n [property]=\"{ value: uniError.exception.message, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Messaggio intero -->\r\n @if(uniError.type === 'be' && uniError.innerException) {\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'InnerMessage'\"\r\n [property]=\"{ value: uniError.innerException.message, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n }\r\n </div>\r\n\r\n <!-- Dettagli -->\r\n @if(storeItem.isOpen) {\r\n <div class=\"flex flex-col gap-6 border-t border-t-white/12.5 pt-4\">\r\n <h1\r\n class=\"text-3xl! font-bold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'Details' | translate }}\r\n </h1>\r\n <div class=\"flex flex-col gap-12\">\r\n @if(uniError.type === 'be' || uniError.type === 'server') {\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Dettagli: request -->\r\n <h2\r\n class=\"text-lg! font-semibold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'Request' | translate }}\r\n </h2>\r\n <div class=\"flex flex-col gap-4\">\r\n <div class=\"flex flex-col gap-x-16 gap-y-4 @md/item:flex-row\">\r\n <!-- Dettagli: request metodo http -->\r\n <uni-dialog-error-article\r\n class=\"shrink-0 @md/item:basis-24\"\r\n [lblTitle]=\"'Method'\"\r\n [property]=\"{ value: uniError.request.method, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n <!-- Dettagli: request url -->\r\n <uni-dialog-error-article\r\n class=\"flex-1\"\r\n [lblTitle]=\"'Url'\"\r\n [property]=\"{ value: uniError.request.url, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n </div>\r\n\r\n <!-- Dettagli: request query params -->\r\n @let queryParams = [...(uniError.request.url | to_url).searchParams];\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'QueryParams'\"\r\n [property]=\"{ value: queryParams, type: 'array' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: request headers -->\r\n @let headers = [...uniError.request.headers.entries()];\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Headers'\"\r\n [property]=\"{ value: headers, type: 'array' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: request body -->\r\n @let body = uniError.request | get_body_async | async;\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Body'\"\r\n [property]=\"{ value: body | parse, type: 'json'}\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: request info -->\r\n <div class=\"flex flex-col gap-4 @md/item:flex-row\">\r\n <!-- Dettagli: request info mode -->\r\n <uni-dialog-error-article\r\n class=\"flex-1\"\r\n [lblTitle]=\"'Mode'\"\r\n [property]=\"{ value: uniError.request.mode, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: request info credentials -->\r\n <uni-dialog-error-article\r\n class=\"flex-1\"\r\n [lblTitle]=\"'Credentials'\"\r\n [property]=\"{ value: uniError.request.credentials, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: request info cache -->\r\n <uni-dialog-error-article\r\n class=\"flex-1\"\r\n [lblTitle]=\"'CacheMode'\"\r\n [property]=\"{ value: uniError.request.cache, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Dettagli: info -->\r\n <div class=\"flex flex-col gap-4\">\r\n <h2\r\n class=\"text-lg! font-semibold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'Diagnostic' | translate }}\r\n </h2>\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Dettagli: info durata -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Duration'\"\r\n [property]=\"{ value: `${uniError.durationMs / 1000}s`, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: info user agent -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'UserAgent'\"\r\n [property]=\"{ value: uniError.userAgent, type: 'string' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- Dettagli: eccezione -->\r\n <div class=\"flex flex-col gap-4\">\r\n <h2\r\n class=\"text-lg! font-semibold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'Exception' | translate }} ({{ uniError.type }})\r\n </h2>\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Dettagli: eccezione nome funzione -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Function'\"\r\n [property]=\"{ value: uniError.exception.functionName, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: eccezione tipo eccezione -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Type'\"\r\n [property]=\"{ value: uniError.exception.type, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Dettagli: eccezione stack trace -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'StackTrace'\"\r\n [property]=\"{ value: uniError.exception.stackTrace, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n @if(uniError.type !== 'fe' && uniError.exception.html) {\r\n <!-- Dettagli: eccezione html -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Html'\"\r\n [property]=\"{ value: uniError.exception.html, type: 'html' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n }\r\n\r\n <!-- Dettagli: eccezione frames -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Frames'\"\r\n [property]=\"{ value: uniError.exception.stackTraceFrames.map(x => ([x.file, `LINE ${x.line}`])), type: 'array' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- Interno -->\r\n @if(storeItem.isOpen) { @if((uniError.type === 'be' || uniError.type === 'server') &&\r\n uniError.innerException) {\r\n <div class=\"flex flex-col gap-6 border-t border-t-white/12.5 pt-4\">\r\n <h1\r\n class=\"text-3xl! font-bold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'Inner' | translate }}\r\n </h1>\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Interno: nome funzione -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Function'\"\r\n [property]=\"{ value: uniError.innerException.functionName, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Interno: tipo -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Type'\"\r\n [property]=\"{ value: uniError.innerException.type, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n <!-- Interno: stack trace -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'StackTrace'\"\r\n [property]=\"{ value: uniError.innerException.stackTrace, type: 'pre' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n\r\n @if(uniError.exception.html) {\r\n <!-- Dettagli: eccezione html -->\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Html'\"\r\n [property]=\"{ value: uniError.exception.html, type: 'html' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n }\r\n </div>\r\n </div>\r\n } }\r\n\r\n <!-- Storico -->\r\n @if(storeItem.isOpen){ @if(storeItem.historyItems.length > 0) {\r\n <div class=\"flex flex-col gap-6 border-t border-t-white/12.5 pt-4\">\r\n <h1\r\n class=\"text-3xl! font-bold text-rose-400/50 transition-colors duration-300 group-hover:text-rose-400\">\r\n {{ 'History' | translate }}\r\n </h1>\r\n <uni-dialog-error-article\r\n [lblTitle]=\"'Timestamp'\"\r\n [property]=\"{ value: (storeItem.historyItems | get_timestamp_formatted).map(x => ([x.message, x.date])), type: 'array' }\"\r\n (onCopyEvt)=\"onCopy($event)\" />\r\n </div>\r\n } }\r\n </div>\r\n\r\n <!-- Footer -->\r\n <div\r\n class=\"@container/footer flex flex-col justify-between gap-4 border-t border-white/5 bg-white/1 px-6 py-4 @lg/item:flex-row @lg/item:items-center\">\r\n <!-- Footer: metadata -->\r\n <div\r\n class=\"flex min-w-0 flex-col items-center justify-between gap-x-4 gap-y-2 overflow-hidden text-xs @2xs/footer:flex-row\">\r\n <!-- Footer: metadata http -->\r\n <p\r\n class=\"squircle flex h-6 max-w-full min-w-22 items-center justify-center gap-2 overflow-hidden rounded-full border border-white/7.5 bg-white/2.5 px-2.5 py-1 font-mono\">\r\n <span\r\n class=\"font-mono font-bold text-rose-400 transition-colors duration-300 group-hover:text-white\">\r\n HTTP\r\n </span>\r\n <span class=\"font-mono text-neutral-300\"> {{ storeItemData.httpStatus }} </span>\r\n </p>\r\n\r\n <!-- Footer: metadata timestamp -->\r\n <p class=\"flex h-6 max-w-full min-w-22 items-center gap-2 overflow-hidden font-mono\">\r\n <fa-icon\r\n [icon]=\"ICON_TIMER\"\r\n class=\"text-rose-400 transition-colors duration-300 group-hover:text-white\" />\r\n <span class=\"flex-1 truncate overflow-hidden font-mono text-neutral-300\">\r\n {{ storeItem.historyItems.at(-1)?.timestamp| date:'HH:mm:ss' }}\r\n </span>\r\n </p>\r\n\r\n <!-- Footer: metadata count -->\r\n <p class=\"flex h-6 max-w-full min-w-22 items-center gap-2 overflow-hidden font-mono\">\r\n <fa-icon\r\n [icon]=\"ICON_COUNT\"\r\n class=\"text-rose-400 transition-colors duration-300 group-hover:text-white\" />\r\n <span class=\"truncate font-mono text-nowrap text-neutral-300 lowercase\">\r\n {{ storeItem.historyItems.length }} {{ ('Times' | translate) }}\r\n </span>\r\n </p>\r\n </div>\r\n\r\n <!-- Footer: bottoni -->\r\n <div\r\n class=\"touch:opacity-100 flex flex-col items-center justify-center gap-2 transition duration-300 group-hover:opacity-100 @[110px]/footer:flex-row @sm/footer:opacity-10\">\r\n <dx-button\r\n class=\"h-6! min-w-8! transition-colors duration-200 hover:bg-rose-400! focus:bg-transparent! active:bg-rose-500!\"\r\n [stylingMode]=\"'text'\"\r\n [icon]=\"storeItem.isCopied ? 'check' : 'copy'\"\r\n [hint]=\"'Copy' | translate : { prefix: 'btn' }\"\r\n [disabled]=\"storeItem.isCopied\"\r\n (click)=\"onCopyAll(storeItem.id)\">\r\n </dx-button>\r\n <dx-button\r\n class=\"h-6! min-w-8! transition-colors duration-200 hover:bg-rose-400! focus:bg-transparent! active:bg-rose-500!\"\r\n [stylingMode]=\"'text'\"\r\n [icon]=\"storeItem.isSaved ? 'check' : 'save'\"\r\n [hint]=\"'Save' | translate : { prefix: 'btn' }\"\r\n [disabled]=\"storeItem.isSaved\"\r\n (click)=\"onSave(storeItem.id)\">\r\n </dx-button>\r\n <dx-button\r\n class=\"h-6! min-w-8! transition-colors duration-200 hover:bg-rose-400! focus:bg-transparent! active:bg-rose-500!\"\r\n [stylingMode]=\"'text'\"\r\n [icon]=\"'trash'\"\r\n [hint]=\"'Delete' | translate : { prefix: 'btn' }\"\r\n [disabled]=\"false\"\r\n (click)=\"onDelete(storeItem.id)\"></dx-button>\r\n </div>\r\n </div>\r\n </li>\r\n }\r\n </ul>\r\n </main>\r\n\r\n @if (toast(); as toast) {\r\n <div\r\n class=\"pointer-events-none absolute bottom-6 left-1/2 flex -translate-x-1/2 rounded-lg border border-emerald-500/20 bg-emerald-950/90 px-4 py-2.5 shadow-[0_4px_12px_rgba(0,0,0,0.5),0_2px_4px_rgba(16,185,129,0.1)] backdrop-blur-md transition duration-300\">\r\n <span\r\n class=\"flex items-center gap-2 font-sans text-xs font-medium tracking-wide text-emerald-200\">\r\n <span class=\"font-mono text-sm font-bold text-emerald-400\">\u2713</span>\r\n {{ toast.label | translate : { prefix: 'toast' } }}\r\n </span>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block;height:min(700px,80%);max-height:80%;width:min(1000px,60%);max-width:80%}@media(max-width:768px){:host{width:100%!important;max-width:100%!important;height:100%!important;max-height:100%!important}}:host ::ng-deep .dx-icon{color:#fff!important}\n"] }]
|
|
376
376
|
}], propDecorators: { storeItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "storeItems", required: true }] }] } });
|
|
377
377
|
|
|
378
378
|
class UniHeader {
|