@pumpkin-tech/pumpkin-tech-ng 0.2.55 → 0.2.57
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/pumpkin-tech-pumpkin-tech-ng.mjs +1091 -763
- package/fesm2022/pumpkin-tech-pumpkin-tech-ng.mjs.map +1 -1
- package/index.d.ts +142 -38
- package/package.json +1 -1
|
@@ -2,13 +2,13 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { HostBinding, Input, Directive, Injectable, NgModule, Optional, Self, EventEmitter, ElementRef, forwardRef, Output, ContentChild, ViewChild, ChangeDetectionStrategy, Component, HostListener, Inject, InjectionToken, Pipe, ContentChildren, inject } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/cdk/layout';
|
|
4
4
|
import * as i2$5 from 'rxjs';
|
|
5
|
-
import { Subject, BehaviorSubject, takeUntil as takeUntil$1, filter, delay, debounceTime, distinctUntilChanged, tap, switchMap, of, isObservable, from, map } from 'rxjs';
|
|
5
|
+
import { Subject, BehaviorSubject, takeUntil as takeUntil$1, filter, delay, debounceTime, distinctUntilChanged, tap, switchMap, of, isObservable, from, interval, map } from 'rxjs';
|
|
6
6
|
import { takeUntil, filter as filter$1, switchMap as switchMap$1 } from 'rxjs/operators';
|
|
7
7
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
8
8
|
import * as i2 from '@angular/forms';
|
|
9
9
|
import { FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR, FormControl } from '@angular/forms';
|
|
10
10
|
import * as i1$1 from '@angular/common';
|
|
11
|
-
import { CommonModule, NgIf, CurrencyPipe, formatNumber,
|
|
11
|
+
import { CommonModule, NgIf, formatDate, CurrencyPipe, formatNumber, formatCurrency } from '@angular/common';
|
|
12
12
|
import * as i3$3 from '@angular/material/toolbar';
|
|
13
13
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
14
14
|
import * as i5$1 from '@angular/material/sidenav';
|
|
@@ -4181,303 +4181,191 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
4181
4181
|
type: Input
|
|
4182
4182
|
}] } });
|
|
4183
4183
|
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
border: 1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, 0.12)));
|
|
4201
|
-
overflow: hidden;
|
|
4202
|
-
}
|
|
4203
|
-
|
|
4204
|
-
.ptech-dialog-header {
|
|
4205
|
-
display: grid;
|
|
4206
|
-
grid-template-columns: 52px 1fr 52px;
|
|
4207
|
-
align-items: center;
|
|
4208
|
-
gap: 12px;
|
|
4209
|
-
padding: 14px 16px;
|
|
4210
|
-
background: var(--ptech-dialog-header-bg, var(--app-surface-2, #f7f7f7));
|
|
4211
|
-
flex: 0 0 auto;
|
|
4212
|
-
}
|
|
4213
|
-
|
|
4214
|
-
.ptech-dialog-drag {
|
|
4215
|
-
width: 42px;
|
|
4216
|
-
height: 42px;
|
|
4217
|
-
border-radius: 12px;
|
|
4218
|
-
display: inline-flex;
|
|
4219
|
-
align-items: center;
|
|
4220
|
-
justify-content: center;
|
|
4221
|
-
border: 1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, 0.12)));
|
|
4222
|
-
color: var(--ptech-dialog-muted, var(--app-muted, #94a3b8));
|
|
4223
|
-
background: color-mix(in srgb, var(--app-surface, #fff) 92%, transparent);
|
|
4224
|
-
}
|
|
4225
|
-
|
|
4226
|
-
.ptech-dialog-heading h1[mat-dialog-title],
|
|
4227
|
-
.ptech-dialog-heading h2[mat-dialog-title] {
|
|
4228
|
-
margin: 0;
|
|
4229
|
-
line-height: 1.2;
|
|
4230
|
-
font-weight: 700;
|
|
4231
|
-
color: var(--ptech-dialog-text, var(--app-text, inherit));
|
|
4232
|
-
text-align: center;
|
|
4233
|
-
}
|
|
4234
|
-
|
|
4235
|
-
.ptech-dialog-heading {
|
|
4236
|
-
text-align: center;
|
|
4237
|
-
justify-self: center;
|
|
4238
|
-
width: 100%;
|
|
4239
|
-
}
|
|
4240
|
-
|
|
4241
|
-
.ptech-dialog-subtitle {
|
|
4242
|
-
margin: 2px 0 0;
|
|
4243
|
-
color: var(--ptech-dialog-muted, var(--app-muted, #94a3b8));
|
|
4244
|
-
font-size: 1rem;
|
|
4245
|
-
font-weight: 500;
|
|
4246
|
-
}
|
|
4247
|
-
|
|
4248
|
-
.ptech-dialog-close {
|
|
4249
|
-
width: 42px;
|
|
4250
|
-
height: 42px;
|
|
4251
|
-
border-radius: 12px;
|
|
4252
|
-
border: 1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, 0.12)));
|
|
4253
|
-
color: var(--ptech-dialog-text, var(--app-text, inherit));
|
|
4254
|
-
background: color-mix(in srgb, var(--app-surface, #fff) 92%, transparent);
|
|
4255
|
-
display: inline-flex;
|
|
4256
|
-
align-items: center;
|
|
4257
|
-
justify-content: center;
|
|
4258
|
-
padding: 0 !important;
|
|
4259
|
-
}
|
|
4260
|
-
|
|
4261
|
-
.ptech-dialog-close .mat-icon {
|
|
4262
|
-
margin: 0;
|
|
4263
|
-
width: 26px;
|
|
4264
|
-
height: 26px;
|
|
4265
|
-
font-size: 26px;
|
|
4266
|
-
line-height: 26px;
|
|
4267
|
-
}
|
|
4268
|
-
|
|
4269
|
-
.ptech-dialog-divider {
|
|
4270
|
-
border-top: 1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, 0.12)));
|
|
4271
|
-
}
|
|
4272
|
-
|
|
4273
|
-
.ptech-dialog-content {
|
|
4274
|
-
flex: 1 1 auto;
|
|
4275
|
-
min-height: 0;
|
|
4276
|
-
max-height: none;
|
|
4277
|
-
overflow-y: auto;
|
|
4278
|
-
overflow-x: hidden;
|
|
4279
|
-
padding: 16px;
|
|
4280
|
-
box-sizing: border-box;
|
|
4281
|
-
color: var(--ptech-dialog-content-text, var(--ptech-dialog-text, var(--app-text, inherit)));
|
|
4282
|
-
}
|
|
4283
|
-
|
|
4284
|
-
.ptech-dialog-content p,
|
|
4285
|
-
.ptech-dialog-content span,
|
|
4286
|
-
.ptech-dialog-content div,
|
|
4287
|
-
.ptech-dialog-content li,
|
|
4288
|
-
.ptech-dialog-content strong,
|
|
4289
|
-
.ptech-dialog-content em,
|
|
4290
|
-
.ptech-dialog-content small {
|
|
4291
|
-
color: var(--ptech-dialog-content-text, var(--ptech-dialog-text, var(--app-text, inherit)));
|
|
4292
|
-
}
|
|
4293
|
-
|
|
4294
|
-
.ptech-dialog-content::-webkit-scrollbar {
|
|
4295
|
-
width: 10px;
|
|
4296
|
-
height: 10px;
|
|
4297
|
-
}
|
|
4298
|
-
|
|
4299
|
-
.ptech-dialog-content::-webkit-scrollbar-track {
|
|
4300
|
-
background: var(--ptech-scroll-track, var(--app-scroll-track, color-mix(in srgb, var(--app-surface-2, #f7f7f7) 70%, transparent)));
|
|
4301
|
-
border-radius: 12px;
|
|
4302
|
-
}
|
|
4303
|
-
|
|
4304
|
-
.ptech-dialog-content::-webkit-scrollbar-thumb {
|
|
4305
|
-
background: var(--ptech-scroll-thumb, var(--app-scroll-thumb, color-mix(in srgb, var(--app-link-accent, #3b82f6) 70%, #6b7280 30%)));
|
|
4306
|
-
border-radius: 12px;
|
|
4307
|
-
border: 2px solid transparent;
|
|
4308
|
-
background-clip: padding-box;
|
|
4309
|
-
}
|
|
4310
|
-
|
|
4311
|
-
.ptech-dialog-content::-webkit-scrollbar-thumb:hover {
|
|
4312
|
-
background: var(--ptech-scroll-thumb-hover, var(--app-scroll-thumb-hover, var(--ptech-scroll-thumb, #60a5fa)));
|
|
4313
|
-
}
|
|
4314
|
-
|
|
4315
|
-
.ptech-dialog-content {
|
|
4316
|
-
scrollbar-width: thin;
|
|
4317
|
-
scrollbar-color: var(--ptech-scroll-thumb, var(--app-scroll-thumb, #60a5fa)) var(--ptech-scroll-track, var(--app-scroll-track, #1f2937));
|
|
4318
|
-
}
|
|
4319
|
-
|
|
4320
|
-
.ptech-dialog-actions {
|
|
4321
|
-
margin: 0;
|
|
4322
|
-
padding: 14px 16px 16px;
|
|
4323
|
-
border-top: 1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, 0.12)));
|
|
4324
|
-
background: var(--ptech-dialog-footer-bg, var(--app-surface-2, #f7f7f7));
|
|
4325
|
-
display: flex;
|
|
4326
|
-
justify-content: flex-end;
|
|
4327
|
-
gap: 8px;
|
|
4328
|
-
flex-wrap: wrap;
|
|
4329
|
-
flex: 0 0 auto;
|
|
4330
|
-
}
|
|
4331
|
-
|
|
4332
|
-
::ng-deep .ptech-dialog-panel .mat-mdc-dialog-surface {
|
|
4333
|
-
background: transparent !important;
|
|
4334
|
-
box-shadow: none !important;
|
|
4335
|
-
color: inherit;
|
|
4336
|
-
overflow: visible;
|
|
4337
|
-
border-radius: 16px;
|
|
4338
|
-
padding: 0;
|
|
4339
|
-
max-height: none !important;
|
|
4340
|
-
}
|
|
4341
|
-
|
|
4342
|
-
.ptech-dialog-content.mat-mdc-dialog-content {
|
|
4343
|
-
max-height: none !important;
|
|
4344
|
-
margin: 0;
|
|
4345
|
-
}
|
|
4346
|
-
|
|
4347
|
-
::ng-deep .cdk-overlay-pane.ptech-dialog-panel {
|
|
4348
|
-
display: flex !important;
|
|
4349
|
-
align-items: center !important;
|
|
4350
|
-
justify-content: center !important;
|
|
4351
|
-
max-width: 96vw !important;
|
|
4352
|
-
max-height: 96dvh !important;
|
|
4353
|
-
margin: 0 auto !important;
|
|
4354
|
-
z-index: var(--ptech-overlay-z-index, 10000) !important;
|
|
4355
|
-
}
|
|
4356
|
-
|
|
4357
|
-
::ng-deep .cdk-overlay-pane:not(.ptech-dialog-panel) {
|
|
4358
|
-
z-index: calc(var(--ptech-overlay-z-index, 10000) + 1) !important;
|
|
4359
|
-
}
|
|
4360
|
-
|
|
4361
|
-
::ng-deep .cdk-overlay-pane .mat-mdc-select-panel,
|
|
4362
|
-
::ng-deep .cdk-overlay-pane .ptech-select-enum-panel,
|
|
4363
|
-
::ng-deep .cdk-overlay-pane .ptech-select-entity-panel,
|
|
4364
|
-
::ng-deep .cdk-overlay-pane .ptech-select-quantity-panel {
|
|
4365
|
-
opacity: 1 !important;
|
|
4366
|
-
visibility: visible !important;
|
|
4367
|
-
pointer-events: auto !important;
|
|
4368
|
-
}
|
|
4369
|
-
|
|
4370
|
-
::ng-deep .cdk-overlay-pane .mat-mdc-tooltip-panel {
|
|
4371
|
-
z-index: var(--ptech-tooltip-z-index, 11000) !important;
|
|
4372
|
-
}
|
|
4373
|
-
|
|
4374
|
-
@media (max-width: 700px) {
|
|
4375
|
-
.ptech-dialog-shell {
|
|
4376
|
-
max-width: 94vw !important;
|
|
4377
|
-
max-height: calc(100dvh - 18px) !important;
|
|
4378
|
-
margin: 0 auto !important;
|
|
4379
|
-
}
|
|
4380
|
-
|
|
4381
|
-
::ng-deep .cdk-overlay-pane.ptech-dialog-panel {
|
|
4382
|
-
max-width: 96vw !important;
|
|
4383
|
-
max-height: calc(100dvh - 8px) !important;
|
|
4384
|
-
padding: 0 !important;
|
|
4385
|
-
}
|
|
4386
|
-
}
|
|
4387
|
-
`;
|
|
4388
|
-
|
|
4389
|
-
class ConfirmationDialogComponent {
|
|
4390
|
-
dialogRef;
|
|
4391
|
-
confirmation;
|
|
4392
|
-
constructor(dialogRef, confirmation) {
|
|
4393
|
-
this.dialogRef = dialogRef;
|
|
4394
|
-
this.confirmation = confirmation;
|
|
4395
|
-
}
|
|
4396
|
-
confirm() {
|
|
4397
|
-
this.confirmation.accept();
|
|
4398
|
-
this.dialogRef.close(true);
|
|
4399
|
-
}
|
|
4400
|
-
cancel() {
|
|
4401
|
-
this.dialogRef.close(false);
|
|
4402
|
-
}
|
|
4403
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ConfirmationDialogComponent, deps: [{ token: i1$3.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
4404
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: ConfirmationDialogComponent, isStandalone: true, selector: "ptech-confirmation-dialog", ngImport: i0, template: `
|
|
4405
|
-
<div class="ptech-dialog-shell" cdkDrag cdkDragRootElement=".cdk-overlay-pane">
|
|
4184
|
+
class DialogShellComponent {
|
|
4185
|
+
title = '';
|
|
4186
|
+
subtitle;
|
|
4187
|
+
draggable = true;
|
|
4188
|
+
showDrag = true;
|
|
4189
|
+
showClose = true;
|
|
4190
|
+
dragRootElement = '.cdk-overlay-pane';
|
|
4191
|
+
close = new EventEmitter();
|
|
4192
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DialogShellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4193
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: DialogShellComponent, isStandalone: true, selector: "ptech-dialog-shell", inputs: { title: "title", subtitle: "subtitle", draggable: "draggable", showDrag: "showDrag", showClose: "showClose", dragRootElement: "dragRootElement" }, outputs: { close: "close" }, ngImport: i0, template: `
|
|
4194
|
+
<div
|
|
4195
|
+
class="ptech-dialog-shell"
|
|
4196
|
+
cdkDrag
|
|
4197
|
+
[cdkDragDisabled]="!draggable"
|
|
4198
|
+
[cdkDragRootElement]="dragRootElement"
|
|
4199
|
+
>
|
|
4406
4200
|
<div class="ptech-dialog-header">
|
|
4407
|
-
<div class="ptech-dialog-drag" cdkDragHandle aria-hidden="true">
|
|
4201
|
+
<div class="ptech-dialog-drag" *ngIf="showDrag" cdkDragHandle aria-hidden="true">
|
|
4408
4202
|
<mat-icon>drag_indicator</mat-icon>
|
|
4409
4203
|
</div>
|
|
4204
|
+
<div class="ptech-dialog-drag ptech-dialog-drag--spacer" *ngIf="!showDrag" aria-hidden="true"></div>
|
|
4410
4205
|
|
|
4411
4206
|
<div class="ptech-dialog-heading">
|
|
4412
|
-
<
|
|
4207
|
+
<h2 mat-dialog-title>{{ title }}</h2>
|
|
4208
|
+
<p class="ptech-dialog-subtitle" *ngIf="subtitle">{{ subtitle }}</p>
|
|
4413
4209
|
</div>
|
|
4414
4210
|
|
|
4415
4211
|
<button
|
|
4416
|
-
|
|
4212
|
+
*ngIf="showClose"
|
|
4417
4213
|
type="button"
|
|
4418
4214
|
class="ptech-dialog-close"
|
|
4419
4215
|
aria-label="Fechar"
|
|
4420
|
-
(click)="
|
|
4216
|
+
(click)="close.emit()"
|
|
4217
|
+
>
|
|
4421
4218
|
<mat-icon>close</mat-icon>
|
|
4422
4219
|
</button>
|
|
4220
|
+
<div *ngIf="!showClose" class="ptech-dialog-drag ptech-dialog-drag--spacer" aria-hidden="true"></div>
|
|
4423
4221
|
</div>
|
|
4424
4222
|
|
|
4425
4223
|
<div class="ptech-dialog-divider"></div>
|
|
4426
4224
|
|
|
4427
|
-
<div
|
|
4428
|
-
<
|
|
4429
|
-
</div>
|
|
4430
|
-
|
|
4431
|
-
<div class="ptech-dialog-actions">
|
|
4432
|
-
<button mat-flat-button color="primary" (click)="confirm()">
|
|
4433
|
-
{{ confirmation.confirmText || 'OK' }}
|
|
4434
|
-
</button>
|
|
4435
|
-
<button mat-flat-button color="warn" (click)="cancel()">
|
|
4436
|
-
{{ confirmation.cancelText || 'Cancelar' }}
|
|
4437
|
-
</button>
|
|
4225
|
+
<div class="ptech-dialog-content">
|
|
4226
|
+
<ng-content></ng-content>
|
|
4438
4227
|
</div>
|
|
4439
4228
|
</div>
|
|
4440
|
-
`, isInline: true, styles: [":host{display:block;color:var(--ptech-dialog-text, var(--app-text, inherit))}.ptech-dialog-shell{display:flex;flex-direction:column;max-width:92vw;width:100%;max-height:88vh;min-height:0;background:var(--ptech-dialog-bg, var(--app-surface, #fff));color:var(--ptech-dialog-text, var(--app-text, inherit));border-radius:16px;border:1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, .12)));overflow:hidden}.ptech-dialog-header{display:grid;grid-template-columns:52px 1fr 52px;align-items:center;gap:12px;padding:14px 16px;background:var(--ptech-dialog-header-bg, var(--app-surface-2, #f7f7f7));flex:0 0 auto}.ptech-dialog-drag{width:42px;height:42px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, .12)));color:var(--ptech-dialog-muted, var(--app-muted, #94a3b8));background:color-mix(in srgb,var(--app-surface, #fff) 92%,transparent)}.ptech-dialog-heading h1[mat-dialog-title],.ptech-dialog-heading h2[mat-dialog-title]{margin:0;line-height:1.2;font-weight:700;color:var(--ptech-dialog-text, var(--app-text, inherit));text-align:center}.ptech-dialog-heading{text-align:center;justify-self:center;width:100%}.ptech-dialog-subtitle{margin:2px 0 0;color:var(--ptech-dialog-muted, var(--app-muted, #94a3b8));font-size:1rem;font-weight:500}.ptech-dialog-close{width:42px;height:42px;border-radius:12px;border:1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, .12)));color:var(--ptech-dialog-text, var(--app-text, inherit));background:color-mix(in srgb,var(--app-surface, #fff) 92%,transparent);display:inline-flex;align-items:center;justify-content:center;padding:0!important}.ptech-dialog-close .mat-icon{margin:0;width:26px;height:26px;font-size:26px;line-height:26px}.ptech-dialog-divider{border-top:1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, .12)))}.ptech-dialog-content{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;overflow-x:hidden;padding:16px;box-sizing:border-box;color:var(--ptech-dialog-content-text, var(--ptech-dialog-text, var(--app-text, inherit)))}.ptech-dialog-content
|
|
4229
|
+
`, isInline: true, styles: [":host{display:block;color:var(--ptech-dialog-text, var(--app-text, inherit))}.ptech-dialog-shell{display:flex;flex-direction:column;max-width:92vw;width:100%;max-height:88vh;min-height:0;background:var(--ptech-dialog-bg, var(--app-surface, #fff));color:var(--ptech-dialog-text, var(--app-text, inherit));border-radius:16px;border:1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, .12)));overflow:hidden}.ptech-dialog-header{display:grid;grid-template-columns:52px 1fr 52px;align-items:center;gap:12px;padding:14px 16px;background:var(--ptech-dialog-header-bg, var(--app-surface-2, #f7f7f7));flex:0 0 auto}.ptech-dialog-drag{width:42px;height:42px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, .12)));color:var(--ptech-dialog-muted, var(--app-muted, #94a3b8));background:color-mix(in srgb,var(--app-surface, #fff) 92%,transparent)}.ptech-dialog-heading h1[mat-dialog-title],.ptech-dialog-heading h2[mat-dialog-title]{margin:0;line-height:1.2;font-weight:700;color:var(--ptech-dialog-text, var(--app-text, inherit));text-align:center}.ptech-dialog-heading{text-align:center;justify-self:center;width:100%}.ptech-dialog-subtitle{margin:2px 0 0;color:var(--ptech-dialog-muted, var(--app-muted, #94a3b8));font-size:1rem;font-weight:500}.ptech-dialog-close{width:42px;height:42px;border-radius:12px;border:1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, .12)));color:var(--ptech-dialog-text, var(--app-text, inherit));background:color-mix(in srgb,var(--app-surface, #fff) 92%,transparent);display:inline-flex;align-items:center;justify-content:center;padding:0!important}.ptech-dialog-close .mat-icon{margin:0;width:26px;height:26px;font-size:26px;line-height:26px}.ptech-dialog-divider{border-top:1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, .12)))}.ptech-dialog-content{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;overflow-x:hidden;padding:16px;box-sizing:border-box;color:var(--ptech-dialog-content-text, var(--ptech-dialog-text, var(--app-text, inherit)))}.ptech-dialog-content::-webkit-scrollbar{width:10px;height:10px}.ptech-dialog-content::-webkit-scrollbar-track{background:var(--ptech-scroll-track, var(--app-scroll-track, color-mix(in srgb, var(--app-surface-2, #f7f7f7) 70%, transparent)));border-radius:12px}.ptech-dialog-content::-webkit-scrollbar-thumb{background:var(--ptech-scroll-thumb, var(--app-scroll-thumb, color-mix(in srgb, var(--app-link-accent, #3b82f6) 70%, #6b7280 30%)));border-radius:12px;border:2px solid transparent;background-clip:padding-box}.ptech-dialog-content::-webkit-scrollbar-thumb:hover{background:var(--ptech-scroll-thumb-hover, var(--app-scroll-thumb-hover, var(--ptech-scroll-thumb, #60a5fa)))}.ptech-dialog-content{scrollbar-width:thin;scrollbar-color:var(--ptech-scroll-thumb, var(--app-scroll-thumb, #60a5fa)) var(--ptech-scroll-track, var(--app-scroll-track, #1f2937))}::ng-deep .ptech-dialog-panel .mat-mdc-dialog-surface{background:transparent!important;box-shadow:none!important;color:inherit;overflow:visible;border-radius:16px;padding:0;max-height:none!important}::ng-deep .cdk-overlay-pane.ptech-dialog-panel{display:flex!important;align-items:center!important;justify-content:center!important;max-width:96vw!important;max-height:96dvh!important;margin:0 auto!important}::ng-deep .cdk-overlay-pane .mat-mdc-tooltip-panel{z-index:var(--ptech-tooltip-z-index, 11000)!important}\n", ".ptech-dialog-drag--spacer{border-color:transparent!important;background:transparent!important}@media (max-width: 700px){.ptech-dialog-shell{max-width:94vw!important;max-height:calc(100dvh - 18px)!important;margin:0 auto!important}::ng-deep .cdk-overlay-pane.ptech-dialog-panel{max-width:96vw!important;max-height:calc(100dvh - 8px)!important;padding:0!important}}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
4441
4230
|
}
|
|
4442
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
4231
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DialogShellComponent, decorators: [{
|
|
4443
4232
|
type: Component,
|
|
4444
|
-
args: [{ selector: 'ptech-
|
|
4445
|
-
<div
|
|
4233
|
+
args: [{ selector: 'ptech-dialog-shell', standalone: true, imports: [NgIf, CdkDrag, CdkDragHandle, MatIconModule], template: `
|
|
4234
|
+
<div
|
|
4235
|
+
class="ptech-dialog-shell"
|
|
4236
|
+
cdkDrag
|
|
4237
|
+
[cdkDragDisabled]="!draggable"
|
|
4238
|
+
[cdkDragRootElement]="dragRootElement"
|
|
4239
|
+
>
|
|
4446
4240
|
<div class="ptech-dialog-header">
|
|
4447
|
-
<div class="ptech-dialog-drag" cdkDragHandle aria-hidden="true">
|
|
4241
|
+
<div class="ptech-dialog-drag" *ngIf="showDrag" cdkDragHandle aria-hidden="true">
|
|
4448
4242
|
<mat-icon>drag_indicator</mat-icon>
|
|
4449
4243
|
</div>
|
|
4244
|
+
<div class="ptech-dialog-drag ptech-dialog-drag--spacer" *ngIf="!showDrag" aria-hidden="true"></div>
|
|
4450
4245
|
|
|
4451
4246
|
<div class="ptech-dialog-heading">
|
|
4452
|
-
<
|
|
4247
|
+
<h2 mat-dialog-title>{{ title }}</h2>
|
|
4248
|
+
<p class="ptech-dialog-subtitle" *ngIf="subtitle">{{ subtitle }}</p>
|
|
4453
4249
|
</div>
|
|
4454
4250
|
|
|
4455
4251
|
<button
|
|
4456
|
-
|
|
4252
|
+
*ngIf="showClose"
|
|
4457
4253
|
type="button"
|
|
4458
4254
|
class="ptech-dialog-close"
|
|
4459
4255
|
aria-label="Fechar"
|
|
4460
|
-
(click)="
|
|
4256
|
+
(click)="close.emit()"
|
|
4257
|
+
>
|
|
4461
4258
|
<mat-icon>close</mat-icon>
|
|
4462
4259
|
</button>
|
|
4260
|
+
<div *ngIf="!showClose" class="ptech-dialog-drag ptech-dialog-drag--spacer" aria-hidden="true"></div>
|
|
4463
4261
|
</div>
|
|
4464
4262
|
|
|
4465
4263
|
<div class="ptech-dialog-divider"></div>
|
|
4466
4264
|
|
|
4467
|
-
<div
|
|
4468
|
-
<
|
|
4265
|
+
<div class="ptech-dialog-content">
|
|
4266
|
+
<ng-content></ng-content>
|
|
4469
4267
|
</div>
|
|
4268
|
+
</div>
|
|
4269
|
+
`, styles: [":host{display:block;color:var(--ptech-dialog-text, var(--app-text, inherit))}.ptech-dialog-shell{display:flex;flex-direction:column;max-width:92vw;width:100%;max-height:88vh;min-height:0;background:var(--ptech-dialog-bg, var(--app-surface, #fff));color:var(--ptech-dialog-text, var(--app-text, inherit));border-radius:16px;border:1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, .12)));overflow:hidden}.ptech-dialog-header{display:grid;grid-template-columns:52px 1fr 52px;align-items:center;gap:12px;padding:14px 16px;background:var(--ptech-dialog-header-bg, var(--app-surface-2, #f7f7f7));flex:0 0 auto}.ptech-dialog-drag{width:42px;height:42px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, .12)));color:var(--ptech-dialog-muted, var(--app-muted, #94a3b8));background:color-mix(in srgb,var(--app-surface, #fff) 92%,transparent)}.ptech-dialog-heading h1[mat-dialog-title],.ptech-dialog-heading h2[mat-dialog-title]{margin:0;line-height:1.2;font-weight:700;color:var(--ptech-dialog-text, var(--app-text, inherit));text-align:center}.ptech-dialog-heading{text-align:center;justify-self:center;width:100%}.ptech-dialog-subtitle{margin:2px 0 0;color:var(--ptech-dialog-muted, var(--app-muted, #94a3b8));font-size:1rem;font-weight:500}.ptech-dialog-close{width:42px;height:42px;border-radius:12px;border:1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, .12)));color:var(--ptech-dialog-text, var(--app-text, inherit));background:color-mix(in srgb,var(--app-surface, #fff) 92%,transparent);display:inline-flex;align-items:center;justify-content:center;padding:0!important}.ptech-dialog-close .mat-icon{margin:0;width:26px;height:26px;font-size:26px;line-height:26px}.ptech-dialog-divider{border-top:1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, .12)))}.ptech-dialog-content{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;overflow-x:hidden;padding:16px;box-sizing:border-box;color:var(--ptech-dialog-content-text, var(--ptech-dialog-text, var(--app-text, inherit)))}.ptech-dialog-content::-webkit-scrollbar{width:10px;height:10px}.ptech-dialog-content::-webkit-scrollbar-track{background:var(--ptech-scroll-track, var(--app-scroll-track, color-mix(in srgb, var(--app-surface-2, #f7f7f7) 70%, transparent)));border-radius:12px}.ptech-dialog-content::-webkit-scrollbar-thumb{background:var(--ptech-scroll-thumb, var(--app-scroll-thumb, color-mix(in srgb, var(--app-link-accent, #3b82f6) 70%, #6b7280 30%)));border-radius:12px;border:2px solid transparent;background-clip:padding-box}.ptech-dialog-content::-webkit-scrollbar-thumb:hover{background:var(--ptech-scroll-thumb-hover, var(--app-scroll-thumb-hover, var(--ptech-scroll-thumb, #60a5fa)))}.ptech-dialog-content{scrollbar-width:thin;scrollbar-color:var(--ptech-scroll-thumb, var(--app-scroll-thumb, #60a5fa)) var(--ptech-scroll-track, var(--app-scroll-track, #1f2937))}::ng-deep .ptech-dialog-panel .mat-mdc-dialog-surface{background:transparent!important;box-shadow:none!important;color:inherit;overflow:visible;border-radius:16px;padding:0;max-height:none!important}::ng-deep .cdk-overlay-pane.ptech-dialog-panel{display:flex!important;align-items:center!important;justify-content:center!important;max-width:96vw!important;max-height:96dvh!important;margin:0 auto!important}::ng-deep .cdk-overlay-pane .mat-mdc-tooltip-panel{z-index:var(--ptech-tooltip-z-index, 11000)!important}\n", ".ptech-dialog-drag--spacer{border-color:transparent!important;background:transparent!important}@media (max-width: 700px){.ptech-dialog-shell{max-width:94vw!important;max-height:calc(100dvh - 18px)!important;margin:0 auto!important}::ng-deep .cdk-overlay-pane.ptech-dialog-panel{max-width:96vw!important;max-height:calc(100dvh - 8px)!important;padding:0!important}}\n"] }]
|
|
4270
|
+
}], propDecorators: { title: [{
|
|
4271
|
+
type: Input
|
|
4272
|
+
}], subtitle: [{
|
|
4273
|
+
type: Input
|
|
4274
|
+
}], draggable: [{
|
|
4275
|
+
type: Input
|
|
4276
|
+
}], showDrag: [{
|
|
4277
|
+
type: Input
|
|
4278
|
+
}], showClose: [{
|
|
4279
|
+
type: Input
|
|
4280
|
+
}], dragRootElement: [{
|
|
4281
|
+
type: Input
|
|
4282
|
+
}], close: [{
|
|
4283
|
+
type: Output
|
|
4284
|
+
}] } });
|
|
4470
4285
|
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4286
|
+
/**
|
|
4287
|
+
* Confirmation dialog built on the same ptech-dialog-shell/ptech-button chrome every other
|
|
4288
|
+
* dialog uses - it used to hand-roll its own header/footer markup (duplicating dialog-shell's
|
|
4289
|
+
* structure), which is exactly the per-dialog CSS this component now avoids by delegating the
|
|
4290
|
+
* shell entirely.
|
|
4291
|
+
*/
|
|
4292
|
+
class PtechConfirmationDialogComponent {
|
|
4293
|
+
dialogRef;
|
|
4294
|
+
data;
|
|
4295
|
+
constructor(dialogRef, data) {
|
|
4296
|
+
this.dialogRef = dialogRef;
|
|
4297
|
+
this.data = data;
|
|
4298
|
+
}
|
|
4299
|
+
get confirmColor() {
|
|
4300
|
+
return this.data.variant === 'danger' ? 'warn'
|
|
4301
|
+
: this.data.variant === 'warning' ? 'accent'
|
|
4302
|
+
: 'primary';
|
|
4303
|
+
}
|
|
4304
|
+
get confirmIcon() {
|
|
4305
|
+
return this.data.variant === 'danger' ? 'delete'
|
|
4306
|
+
: this.data.variant === 'warning' ? 'warning'
|
|
4307
|
+
: 'check';
|
|
4308
|
+
}
|
|
4309
|
+
confirm() {
|
|
4310
|
+
this.dialogRef.close(true);
|
|
4311
|
+
}
|
|
4312
|
+
cancel() {
|
|
4313
|
+
this.dialogRef.close(false);
|
|
4314
|
+
}
|
|
4315
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PtechConfirmationDialogComponent, deps: [{ token: i1$3.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
4316
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: PtechConfirmationDialogComponent, isStandalone: true, selector: "ptech-confirmation-dialog", ngImport: i0, template: `
|
|
4317
|
+
<ptech-dialog-shell
|
|
4318
|
+
[title]="data.title"
|
|
4319
|
+
[showClose]="data.disableClose !== true"
|
|
4320
|
+
(close)="cancel()"
|
|
4321
|
+
>
|
|
4322
|
+
<p class="ptech-confirmation-message">{{ data.message }}</p>
|
|
4323
|
+
|
|
4324
|
+
<div class="ptech-confirmation-actions">
|
|
4325
|
+
<ptech-button
|
|
4326
|
+
[label]="data.cancelText || 'Cancelar'"
|
|
4327
|
+
type="stroked"
|
|
4328
|
+
color="primary"
|
|
4329
|
+
(buttonClick)="cancel()"
|
|
4330
|
+
></ptech-button>
|
|
4331
|
+
<ptech-button
|
|
4332
|
+
[label]="data.confirmText || 'Confirmar'"
|
|
4333
|
+
[icon]="confirmIcon"
|
|
4334
|
+
[color]="confirmColor"
|
|
4335
|
+
type="raised"
|
|
4336
|
+
(buttonClick)="confirm()"
|
|
4337
|
+
></ptech-button>
|
|
4478
4338
|
</div>
|
|
4479
|
-
</
|
|
4480
|
-
`, styles: ["
|
|
4339
|
+
</ptech-dialog-shell>
|
|
4340
|
+
`, isInline: true, styles: [".ptech-confirmation-message{margin:0;font-size:15px;line-height:1.5;color:var(--ptech-dialog-text, var(--app-text, inherit))}.ptech-confirmation-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DialogShellComponent, selector: "ptech-dialog-shell", inputs: ["title", "subtitle", "draggable", "showDrag", "showClose", "dragRootElement"], outputs: ["close"] }, { kind: "component", type: ButtonComponent, selector: "ptech-button", inputs: ["type", "size", "tooltip", "icon", "iconColor", "iconWidth", "iconHeight", "textColor", "link", "target", "shape", "color", "backgroundColor", "hoverBackgroundColor", "radius"], outputs: ["buttonClick"] }] });
|
|
4341
|
+
}
|
|
4342
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PtechConfirmationDialogComponent, decorators: [{
|
|
4343
|
+
type: Component,
|
|
4344
|
+
args: [{ selector: 'ptech-confirmation-dialog', imports: [CommonModule, DialogShellComponent, ButtonComponent], template: `
|
|
4345
|
+
<ptech-dialog-shell
|
|
4346
|
+
[title]="data.title"
|
|
4347
|
+
[showClose]="data.disableClose !== true"
|
|
4348
|
+
(close)="cancel()"
|
|
4349
|
+
>
|
|
4350
|
+
<p class="ptech-confirmation-message">{{ data.message }}</p>
|
|
4351
|
+
|
|
4352
|
+
<div class="ptech-confirmation-actions">
|
|
4353
|
+
<ptech-button
|
|
4354
|
+
[label]="data.cancelText || 'Cancelar'"
|
|
4355
|
+
type="stroked"
|
|
4356
|
+
color="primary"
|
|
4357
|
+
(buttonClick)="cancel()"
|
|
4358
|
+
></ptech-button>
|
|
4359
|
+
<ptech-button
|
|
4360
|
+
[label]="data.confirmText || 'Confirmar'"
|
|
4361
|
+
[icon]="confirmIcon"
|
|
4362
|
+
[color]="confirmColor"
|
|
4363
|
+
type="raised"
|
|
4364
|
+
(buttonClick)="confirm()"
|
|
4365
|
+
></ptech-button>
|
|
4366
|
+
</div>
|
|
4367
|
+
</ptech-dialog-shell>
|
|
4368
|
+
`, styles: [".ptech-confirmation-message{margin:0;font-size:15px;line-height:1.5;color:var(--ptech-dialog-text, var(--app-text, inherit))}.ptech-confirmation-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}\n"] }]
|
|
4481
4369
|
}], ctorParameters: () => [{ type: i1$3.MatDialogRef }, { type: undefined, decorators: [{
|
|
4482
4370
|
type: Inject,
|
|
4483
4371
|
args: [MAT_DIALOG_DATA]
|
|
@@ -4778,9 +4666,217 @@ const DefaultConsoleMessageService = {
|
|
|
4778
4666
|
warnMessage: (title, message) => {
|
|
4779
4667
|
console.warn(`[Warn] ${title}: ${message}`);
|
|
4780
4668
|
},
|
|
4669
|
+
infoMessage: (title, message) => {
|
|
4670
|
+
console.info(`[Info] ${title}: ${message}`);
|
|
4671
|
+
},
|
|
4781
4672
|
};
|
|
4782
4673
|
const DefaultMessageService = DefaultConsoleMessageService;
|
|
4783
4674
|
|
|
4675
|
+
const PTECH_DIALOG_SHARED_STYLES = `
|
|
4676
|
+
:host {
|
|
4677
|
+
display: block;
|
|
4678
|
+
color: var(--ptech-dialog-text, var(--app-text, inherit));
|
|
4679
|
+
}
|
|
4680
|
+
|
|
4681
|
+
.ptech-dialog-shell {
|
|
4682
|
+
display: flex;
|
|
4683
|
+
flex-direction: column;
|
|
4684
|
+
max-width: 92vw;
|
|
4685
|
+
width: 100%;
|
|
4686
|
+
max-height: 88vh;
|
|
4687
|
+
min-height: 0;
|
|
4688
|
+
background: var(--ptech-dialog-bg, var(--app-surface, #fff));
|
|
4689
|
+
color: var(--ptech-dialog-text, var(--app-text, inherit));
|
|
4690
|
+
border-radius: 16px;
|
|
4691
|
+
border: 1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, 0.12)));
|
|
4692
|
+
overflow: hidden;
|
|
4693
|
+
}
|
|
4694
|
+
|
|
4695
|
+
.ptech-dialog-header {
|
|
4696
|
+
display: grid;
|
|
4697
|
+
grid-template-columns: 52px 1fr 52px;
|
|
4698
|
+
align-items: center;
|
|
4699
|
+
gap: 12px;
|
|
4700
|
+
padding: 14px 16px;
|
|
4701
|
+
background: var(--ptech-dialog-header-bg, var(--app-surface-2, #f7f7f7));
|
|
4702
|
+
flex: 0 0 auto;
|
|
4703
|
+
}
|
|
4704
|
+
|
|
4705
|
+
.ptech-dialog-drag {
|
|
4706
|
+
width: 42px;
|
|
4707
|
+
height: 42px;
|
|
4708
|
+
border-radius: 12px;
|
|
4709
|
+
display: inline-flex;
|
|
4710
|
+
align-items: center;
|
|
4711
|
+
justify-content: center;
|
|
4712
|
+
border: 1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, 0.12)));
|
|
4713
|
+
color: var(--ptech-dialog-muted, var(--app-muted, #94a3b8));
|
|
4714
|
+
background: color-mix(in srgb, var(--app-surface, #fff) 92%, transparent);
|
|
4715
|
+
}
|
|
4716
|
+
|
|
4717
|
+
.ptech-dialog-heading h1[mat-dialog-title],
|
|
4718
|
+
.ptech-dialog-heading h2[mat-dialog-title] {
|
|
4719
|
+
margin: 0;
|
|
4720
|
+
line-height: 1.2;
|
|
4721
|
+
font-weight: 700;
|
|
4722
|
+
color: var(--ptech-dialog-text, var(--app-text, inherit));
|
|
4723
|
+
text-align: center;
|
|
4724
|
+
}
|
|
4725
|
+
|
|
4726
|
+
.ptech-dialog-heading {
|
|
4727
|
+
text-align: center;
|
|
4728
|
+
justify-self: center;
|
|
4729
|
+
width: 100%;
|
|
4730
|
+
}
|
|
4731
|
+
|
|
4732
|
+
.ptech-dialog-subtitle {
|
|
4733
|
+
margin: 2px 0 0;
|
|
4734
|
+
color: var(--ptech-dialog-muted, var(--app-muted, #94a3b8));
|
|
4735
|
+
font-size: 1rem;
|
|
4736
|
+
font-weight: 500;
|
|
4737
|
+
}
|
|
4738
|
+
|
|
4739
|
+
.ptech-dialog-close {
|
|
4740
|
+
width: 42px;
|
|
4741
|
+
height: 42px;
|
|
4742
|
+
border-radius: 12px;
|
|
4743
|
+
border: 1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, 0.12)));
|
|
4744
|
+
color: var(--ptech-dialog-text, var(--app-text, inherit));
|
|
4745
|
+
background: color-mix(in srgb, var(--app-surface, #fff) 92%, transparent);
|
|
4746
|
+
display: inline-flex;
|
|
4747
|
+
align-items: center;
|
|
4748
|
+
justify-content: center;
|
|
4749
|
+
padding: 0 !important;
|
|
4750
|
+
}
|
|
4751
|
+
|
|
4752
|
+
.ptech-dialog-close .mat-icon {
|
|
4753
|
+
margin: 0;
|
|
4754
|
+
width: 26px;
|
|
4755
|
+
height: 26px;
|
|
4756
|
+
font-size: 26px;
|
|
4757
|
+
line-height: 26px;
|
|
4758
|
+
}
|
|
4759
|
+
|
|
4760
|
+
.ptech-dialog-divider {
|
|
4761
|
+
border-top: 1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, 0.12)));
|
|
4762
|
+
}
|
|
4763
|
+
|
|
4764
|
+
.ptech-dialog-content {
|
|
4765
|
+
flex: 1 1 auto;
|
|
4766
|
+
min-height: 0;
|
|
4767
|
+
max-height: none;
|
|
4768
|
+
overflow-y: auto;
|
|
4769
|
+
overflow-x: hidden;
|
|
4770
|
+
padding: 16px;
|
|
4771
|
+
box-sizing: border-box;
|
|
4772
|
+
color: var(--ptech-dialog-content-text, var(--ptech-dialog-text, var(--app-text, inherit)));
|
|
4773
|
+
}
|
|
4774
|
+
|
|
4775
|
+
.ptech-dialog-content p,
|
|
4776
|
+
.ptech-dialog-content span,
|
|
4777
|
+
.ptech-dialog-content div,
|
|
4778
|
+
.ptech-dialog-content li,
|
|
4779
|
+
.ptech-dialog-content strong,
|
|
4780
|
+
.ptech-dialog-content em,
|
|
4781
|
+
.ptech-dialog-content small {
|
|
4782
|
+
color: var(--ptech-dialog-content-text, var(--ptech-dialog-text, var(--app-text, inherit)));
|
|
4783
|
+
}
|
|
4784
|
+
|
|
4785
|
+
.ptech-dialog-content::-webkit-scrollbar {
|
|
4786
|
+
width: 10px;
|
|
4787
|
+
height: 10px;
|
|
4788
|
+
}
|
|
4789
|
+
|
|
4790
|
+
.ptech-dialog-content::-webkit-scrollbar-track {
|
|
4791
|
+
background: var(--ptech-scroll-track, var(--app-scroll-track, color-mix(in srgb, var(--app-surface-2, #f7f7f7) 70%, transparent)));
|
|
4792
|
+
border-radius: 12px;
|
|
4793
|
+
}
|
|
4794
|
+
|
|
4795
|
+
.ptech-dialog-content::-webkit-scrollbar-thumb {
|
|
4796
|
+
background: var(--ptech-scroll-thumb, var(--app-scroll-thumb, color-mix(in srgb, var(--app-link-accent, #3b82f6) 70%, #6b7280 30%)));
|
|
4797
|
+
border-radius: 12px;
|
|
4798
|
+
border: 2px solid transparent;
|
|
4799
|
+
background-clip: padding-box;
|
|
4800
|
+
}
|
|
4801
|
+
|
|
4802
|
+
.ptech-dialog-content::-webkit-scrollbar-thumb:hover {
|
|
4803
|
+
background: var(--ptech-scroll-thumb-hover, var(--app-scroll-thumb-hover, var(--ptech-scroll-thumb, #60a5fa)));
|
|
4804
|
+
}
|
|
4805
|
+
|
|
4806
|
+
.ptech-dialog-content {
|
|
4807
|
+
scrollbar-width: thin;
|
|
4808
|
+
scrollbar-color: var(--ptech-scroll-thumb, var(--app-scroll-thumb, #60a5fa)) var(--ptech-scroll-track, var(--app-scroll-track, #1f2937));
|
|
4809
|
+
}
|
|
4810
|
+
|
|
4811
|
+
.ptech-dialog-actions {
|
|
4812
|
+
margin: 0;
|
|
4813
|
+
padding: 14px 16px 16px;
|
|
4814
|
+
border-top: 1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, 0.12)));
|
|
4815
|
+
background: var(--ptech-dialog-footer-bg, var(--app-surface-2, #f7f7f7));
|
|
4816
|
+
display: flex;
|
|
4817
|
+
justify-content: flex-end;
|
|
4818
|
+
gap: 8px;
|
|
4819
|
+
flex-wrap: wrap;
|
|
4820
|
+
flex: 0 0 auto;
|
|
4821
|
+
}
|
|
4822
|
+
|
|
4823
|
+
::ng-deep .ptech-dialog-panel .mat-mdc-dialog-surface {
|
|
4824
|
+
background: transparent !important;
|
|
4825
|
+
box-shadow: none !important;
|
|
4826
|
+
color: inherit;
|
|
4827
|
+
overflow: visible;
|
|
4828
|
+
border-radius: 16px;
|
|
4829
|
+
padding: 0;
|
|
4830
|
+
max-height: none !important;
|
|
4831
|
+
}
|
|
4832
|
+
|
|
4833
|
+
.ptech-dialog-content.mat-mdc-dialog-content {
|
|
4834
|
+
max-height: none !important;
|
|
4835
|
+
margin: 0;
|
|
4836
|
+
}
|
|
4837
|
+
|
|
4838
|
+
::ng-deep .cdk-overlay-pane.ptech-dialog-panel {
|
|
4839
|
+
display: flex !important;
|
|
4840
|
+
align-items: center !important;
|
|
4841
|
+
justify-content: center !important;
|
|
4842
|
+
max-width: 96vw !important;
|
|
4843
|
+
max-height: 96dvh !important;
|
|
4844
|
+
margin: 0 auto !important;
|
|
4845
|
+
z-index: var(--ptech-overlay-z-index, 10000) !important;
|
|
4846
|
+
}
|
|
4847
|
+
|
|
4848
|
+
::ng-deep .cdk-overlay-pane:not(.ptech-dialog-panel) {
|
|
4849
|
+
z-index: calc(var(--ptech-overlay-z-index, 10000) + 1) !important;
|
|
4850
|
+
}
|
|
4851
|
+
|
|
4852
|
+
::ng-deep .cdk-overlay-pane .mat-mdc-select-panel,
|
|
4853
|
+
::ng-deep .cdk-overlay-pane .ptech-select-enum-panel,
|
|
4854
|
+
::ng-deep .cdk-overlay-pane .ptech-select-entity-panel,
|
|
4855
|
+
::ng-deep .cdk-overlay-pane .ptech-select-quantity-panel {
|
|
4856
|
+
opacity: 1 !important;
|
|
4857
|
+
visibility: visible !important;
|
|
4858
|
+
pointer-events: auto !important;
|
|
4859
|
+
}
|
|
4860
|
+
|
|
4861
|
+
::ng-deep .cdk-overlay-pane .mat-mdc-tooltip-panel {
|
|
4862
|
+
z-index: var(--ptech-tooltip-z-index, 11000) !important;
|
|
4863
|
+
}
|
|
4864
|
+
|
|
4865
|
+
@media (max-width: 700px) {
|
|
4866
|
+
.ptech-dialog-shell {
|
|
4867
|
+
max-width: 94vw !important;
|
|
4868
|
+
max-height: calc(100dvh - 18px) !important;
|
|
4869
|
+
margin: 0 auto !important;
|
|
4870
|
+
}
|
|
4871
|
+
|
|
4872
|
+
::ng-deep .cdk-overlay-pane.ptech-dialog-panel {
|
|
4873
|
+
max-width: 96vw !important;
|
|
4874
|
+
max-height: calc(100dvh - 8px) !important;
|
|
4875
|
+
padding: 0 !important;
|
|
4876
|
+
}
|
|
4877
|
+
}
|
|
4878
|
+
`;
|
|
4879
|
+
|
|
4784
4880
|
class ActionDialogComponent {
|
|
4785
4881
|
data;
|
|
4786
4882
|
dialogRef;
|
|
@@ -5350,11 +5446,11 @@ class AlertComponent {
|
|
|
5350
5446
|
});
|
|
5351
5447
|
}
|
|
5352
5448
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AlertComponent, deps: [{ token: MAT_SNACK_BAR_DATA }, { token: i1$4.MatSnackBarRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5353
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: AlertComponent, isStandalone: true, selector: "ptech-alert", ngImport: i0, template: "<div class=\"alert\" [ngClass]=\"data.type\" role=\"alert\">\n <mat-icon\n *ngIf=\"data.icon\"\n class=\"icon\"\n [ngStyle]=\"{ color: getIconColor(data.type) }\"\n >{{ data.icon }}</mat-icon\n >\n <div class=\"text-content\">\n <div class=\"title\">\n {{ data.title }}\n </div>\n <span class=\"text-content-date-hour\">{{\n data.timestamp | date : \"dd/MM/yyyy HH:mm:ss\"\n }}</span>\n <span>{{ data.message }}</span>\n <span *ngFor=\"let detail of data.details\">{{ detail }}</span>\n </div>\n\n <button mat-icon-button class=\"close-button\" (click)=\"closeSnackbar()\">\n <mat-icon>close</mat-icon>\n </button>\n</div>\n", styles: [".alert{position:relative;display:flex;align-items:center;justify-content:space-between;background:var(--ptech-alert-bg, var(--app-surface, #fff));border-radius:3px;padding:30px;border-left:5px solid var(--ptech-alert-border, var(--app-border-color, #ddd));box-shadow:var(--ptech-alert-shadow, 0 2px 7px rgba(0, 0, 0, .27));max-width:350px}.close-button{position:relative;bottom:30px;left:15px;margin:0;padding:0;color:var(--ptech-alert-close, var(--app-muted, #aaa));border:none;background:none;cursor:pointer}.close-button mat-icon{font-size:26px!important;margin-top:10px!important;margin-left:-3px!important}.alert mat-icon{height:35px;width:55px;font-size:35px;display:contents}.text-content{margin-left:10px!important;display:flex;flex-direction:column}.text-content-date-hour{margin-left:0!important;margin-bottom:10px}.title{font-family:Roboto,Nunito,Helvetica Neue,sans-serif;font-size:16px;color:var(--ptech-alert-title, var(--app-text, #606267));font-weight:600;margin-bottom:3px}span{font-family:Roboto,Nunito,Helvetica Neue,sans-serif;font-size:14px;color:var(--ptech-alert-text, var(--app-muted, #9ea0a9));font-weight:400}.success{border-left-color:var(--ptech-alert-success, var(--app-status-success, #7fcb78))}.error{border-left-color:var(--ptech-alert-error, var(--app-status-error, #f25158))}.warn{border-left-color:var(--ptech-alert-warn, var(--app-status-warning, #f0c943))}.info{border-left-color:var(--ptech-alert-info, var(--app-link-accent, #2c80d2))}
|
|
5449
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: AlertComponent, isStandalone: true, selector: "ptech-alert", ngImport: i0, template: "<div class=\"alert\" [ngClass]=\"data.type\" role=\"alert\">\n <mat-icon\n *ngIf=\"data.icon\"\n class=\"icon\"\n [ngStyle]=\"{ color: getIconColor(data.type) }\"\n >{{ data.icon }}</mat-icon\n >\n <div class=\"text-content\">\n <div class=\"title\">\n {{ data.title }}\n </div>\n <span class=\"text-content-date-hour\">{{\n data.timestamp | date : \"dd/MM/yyyy HH:mm:ss\"\n }}</span>\n <span>{{ data.message }}</span>\n <span *ngFor=\"let detail of data.details\">{{ detail }}</span>\n </div>\n\n <button mat-icon-button class=\"close-button\" (click)=\"closeSnackbar()\">\n <mat-icon>close</mat-icon>\n </button>\n</div>\n", styles: [".alert{position:relative;display:flex;align-items:center;justify-content:space-between;background:var(--ptech-alert-bg, var(--app-surface, #fff));border-radius:3px;padding:30px;border-left:5px solid var(--ptech-alert-border, var(--app-border-color, #ddd));box-shadow:var(--ptech-alert-shadow, 0 2px 7px rgba(0, 0, 0, .27));max-width:350px}.close-button{position:relative;bottom:30px;left:15px;margin:0;padding:0;color:var(--ptech-alert-close, var(--app-muted, #aaa));border:none;background:none;cursor:pointer}.close-button mat-icon{font-size:26px!important;margin-top:10px!important;margin-left:-3px!important}.alert mat-icon{height:35px;width:55px;font-size:35px;display:contents}.text-content{margin-left:10px!important;display:flex;flex-direction:column}.text-content-date-hour{margin-left:0!important;margin-bottom:10px}.title{font-family:Roboto,Nunito,Helvetica Neue,sans-serif;font-size:16px;color:var(--ptech-alert-title, var(--app-text, #606267));font-weight:600;margin-bottom:3px}span{font-family:Roboto,Nunito,Helvetica Neue,sans-serif;font-size:14px;color:var(--ptech-alert-text, var(--app-muted, #9ea0a9));font-weight:400}.success{border-left-color:var(--ptech-alert-success, var(--app-status-success, #7fcb78))}.error{border-left-color:var(--ptech-alert-error, var(--app-status-error, #f25158))}.warn{border-left-color:var(--ptech-alert-warn, var(--app-status-warning, #f0c943))}.info{border-left-color:var(--ptech-alert-info, var(--app-link-accent, #2c80d2))}::ng-deep .mat-mdc-snack-bar-container.ptech-snackbar{z-index:var(--ptech-snackbar-z-index, 12000)!important}::ng-deep .mat-mdc-snack-bar-container.ptech-snackbar .mdc-snackbar__surface{background:transparent!important;box-shadow:none!important;padding:0!important;min-height:unset!important;min-width:unset!important;border-radius:0!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5354
5450
|
}
|
|
5355
5451
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AlertComponent, decorators: [{
|
|
5356
5452
|
type: Component,
|
|
5357
|
-
args: [{ selector: 'ptech-alert', imports: [CommonModule, MatIconModule, MatButtonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"alert\" [ngClass]=\"data.type\" role=\"alert\">\n <mat-icon\n *ngIf=\"data.icon\"\n class=\"icon\"\n [ngStyle]=\"{ color: getIconColor(data.type) }\"\n >{{ data.icon }}</mat-icon\n >\n <div class=\"text-content\">\n <div class=\"title\">\n {{ data.title }}\n </div>\n <span class=\"text-content-date-hour\">{{\n data.timestamp | date : \"dd/MM/yyyy HH:mm:ss\"\n }}</span>\n <span>{{ data.message }}</span>\n <span *ngFor=\"let detail of data.details\">{{ detail }}</span>\n </div>\n\n <button mat-icon-button class=\"close-button\" (click)=\"closeSnackbar()\">\n <mat-icon>close</mat-icon>\n </button>\n</div>\n", styles: [".alert{position:relative;display:flex;align-items:center;justify-content:space-between;background:var(--ptech-alert-bg, var(--app-surface, #fff));border-radius:3px;padding:30px;border-left:5px solid var(--ptech-alert-border, var(--app-border-color, #ddd));box-shadow:var(--ptech-alert-shadow, 0 2px 7px rgba(0, 0, 0, .27));max-width:350px}.close-button{position:relative;bottom:30px;left:15px;margin:0;padding:0;color:var(--ptech-alert-close, var(--app-muted, #aaa));border:none;background:none;cursor:pointer}.close-button mat-icon{font-size:26px!important;margin-top:10px!important;margin-left:-3px!important}.alert mat-icon{height:35px;width:55px;font-size:35px;display:contents}.text-content{margin-left:10px!important;display:flex;flex-direction:column}.text-content-date-hour{margin-left:0!important;margin-bottom:10px}.title{font-family:Roboto,Nunito,Helvetica Neue,sans-serif;font-size:16px;color:var(--ptech-alert-title, var(--app-text, #606267));font-weight:600;margin-bottom:3px}span{font-family:Roboto,Nunito,Helvetica Neue,sans-serif;font-size:14px;color:var(--ptech-alert-text, var(--app-muted, #9ea0a9));font-weight:400}.success{border-left-color:var(--ptech-alert-success, var(--app-status-success, #7fcb78))}.error{border-left-color:var(--ptech-alert-error, var(--app-status-error, #f25158))}.warn{border-left-color:var(--ptech-alert-warn, var(--app-status-warning, #f0c943))}.info{border-left-color:var(--ptech-alert-info, var(--app-link-accent, #2c80d2))}
|
|
5453
|
+
args: [{ selector: 'ptech-alert', imports: [CommonModule, MatIconModule, MatButtonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"alert\" [ngClass]=\"data.type\" role=\"alert\">\n <mat-icon\n *ngIf=\"data.icon\"\n class=\"icon\"\n [ngStyle]=\"{ color: getIconColor(data.type) }\"\n >{{ data.icon }}</mat-icon\n >\n <div class=\"text-content\">\n <div class=\"title\">\n {{ data.title }}\n </div>\n <span class=\"text-content-date-hour\">{{\n data.timestamp | date : \"dd/MM/yyyy HH:mm:ss\"\n }}</span>\n <span>{{ data.message }}</span>\n <span *ngFor=\"let detail of data.details\">{{ detail }}</span>\n </div>\n\n <button mat-icon-button class=\"close-button\" (click)=\"closeSnackbar()\">\n <mat-icon>close</mat-icon>\n </button>\n</div>\n", styles: [".alert{position:relative;display:flex;align-items:center;justify-content:space-between;background:var(--ptech-alert-bg, var(--app-surface, #fff));border-radius:3px;padding:30px;border-left:5px solid var(--ptech-alert-border, var(--app-border-color, #ddd));box-shadow:var(--ptech-alert-shadow, 0 2px 7px rgba(0, 0, 0, .27));max-width:350px}.close-button{position:relative;bottom:30px;left:15px;margin:0;padding:0;color:var(--ptech-alert-close, var(--app-muted, #aaa));border:none;background:none;cursor:pointer}.close-button mat-icon{font-size:26px!important;margin-top:10px!important;margin-left:-3px!important}.alert mat-icon{height:35px;width:55px;font-size:35px;display:contents}.text-content{margin-left:10px!important;display:flex;flex-direction:column}.text-content-date-hour{margin-left:0!important;margin-bottom:10px}.title{font-family:Roboto,Nunito,Helvetica Neue,sans-serif;font-size:16px;color:var(--ptech-alert-title, var(--app-text, #606267));font-weight:600;margin-bottom:3px}span{font-family:Roboto,Nunito,Helvetica Neue,sans-serif;font-size:14px;color:var(--ptech-alert-text, var(--app-muted, #9ea0a9));font-weight:400}.success{border-left-color:var(--ptech-alert-success, var(--app-status-success, #7fcb78))}.error{border-left-color:var(--ptech-alert-error, var(--app-status-error, #f25158))}.warn{border-left-color:var(--ptech-alert-warn, var(--app-status-warning, #f0c943))}.info{border-left-color:var(--ptech-alert-info, var(--app-link-accent, #2c80d2))}::ng-deep .mat-mdc-snack-bar-container.ptech-snackbar{z-index:var(--ptech-snackbar-z-index, 12000)!important}::ng-deep .mat-mdc-snack-bar-container.ptech-snackbar .mdc-snackbar__surface{background:transparent!important;box-shadow:none!important;padding:0!important;min-height:unset!important;min-width:unset!important;border-radius:0!important}\n"] }]
|
|
5358
5454
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
5359
5455
|
type: Inject,
|
|
5360
5456
|
args: [MAT_SNACK_BAR_DATA]
|
|
@@ -8113,108 +8209,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
8113
8209
|
type: Output
|
|
8114
8210
|
}] } });
|
|
8115
8211
|
|
|
8116
|
-
class DialogShellComponent {
|
|
8117
|
-
title = '';
|
|
8118
|
-
subtitle;
|
|
8119
|
-
draggable = true;
|
|
8120
|
-
showDrag = true;
|
|
8121
|
-
showClose = true;
|
|
8122
|
-
dragRootElement = '.cdk-overlay-pane';
|
|
8123
|
-
close = new EventEmitter();
|
|
8124
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DialogShellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8125
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: DialogShellComponent, isStandalone: true, selector: "ptech-dialog-shell", inputs: { title: "title", subtitle: "subtitle", draggable: "draggable", showDrag: "showDrag", showClose: "showClose", dragRootElement: "dragRootElement" }, outputs: { close: "close" }, ngImport: i0, template: `
|
|
8126
|
-
<div
|
|
8127
|
-
class="ptech-dialog-shell"
|
|
8128
|
-
cdkDrag
|
|
8129
|
-
[cdkDragDisabled]="!draggable"
|
|
8130
|
-
[cdkDragRootElement]="dragRootElement"
|
|
8131
|
-
>
|
|
8132
|
-
<div class="ptech-dialog-header">
|
|
8133
|
-
<div class="ptech-dialog-drag" *ngIf="showDrag" cdkDragHandle aria-hidden="true">
|
|
8134
|
-
<mat-icon>drag_indicator</mat-icon>
|
|
8135
|
-
</div>
|
|
8136
|
-
<div class="ptech-dialog-drag ptech-dialog-drag--spacer" *ngIf="!showDrag" aria-hidden="true"></div>
|
|
8137
|
-
|
|
8138
|
-
<div class="ptech-dialog-heading">
|
|
8139
|
-
<h2 mat-dialog-title>{{ title }}</h2>
|
|
8140
|
-
<p class="ptech-dialog-subtitle" *ngIf="subtitle">{{ subtitle }}</p>
|
|
8141
|
-
</div>
|
|
8142
|
-
|
|
8143
|
-
<button
|
|
8144
|
-
*ngIf="showClose"
|
|
8145
|
-
type="button"
|
|
8146
|
-
class="ptech-dialog-close"
|
|
8147
|
-
aria-label="Fechar"
|
|
8148
|
-
(click)="close.emit()"
|
|
8149
|
-
>
|
|
8150
|
-
<mat-icon>close</mat-icon>
|
|
8151
|
-
</button>
|
|
8152
|
-
<div *ngIf="!showClose" class="ptech-dialog-drag ptech-dialog-drag--spacer" aria-hidden="true"></div>
|
|
8153
|
-
</div>
|
|
8154
|
-
|
|
8155
|
-
<div class="ptech-dialog-divider"></div>
|
|
8156
|
-
|
|
8157
|
-
<div class="ptech-dialog-content">
|
|
8158
|
-
<ng-content></ng-content>
|
|
8159
|
-
</div>
|
|
8160
|
-
</div>
|
|
8161
|
-
`, isInline: true, styles: [":host{display:block;color:var(--ptech-dialog-text, var(--app-text, inherit))}.ptech-dialog-shell{display:flex;flex-direction:column;max-width:92vw;width:100%;max-height:88vh;min-height:0;background:var(--ptech-dialog-bg, var(--app-surface, #fff));color:var(--ptech-dialog-text, var(--app-text, inherit));border-radius:16px;border:1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, .12)));overflow:hidden}.ptech-dialog-header{display:grid;grid-template-columns:52px 1fr 52px;align-items:center;gap:12px;padding:14px 16px;background:var(--ptech-dialog-header-bg, var(--app-surface-2, #f7f7f7));flex:0 0 auto}.ptech-dialog-drag{width:42px;height:42px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, .12)));color:var(--ptech-dialog-muted, var(--app-muted, #94a3b8));background:color-mix(in srgb,var(--app-surface, #fff) 92%,transparent)}.ptech-dialog-heading h1[mat-dialog-title],.ptech-dialog-heading h2[mat-dialog-title]{margin:0;line-height:1.2;font-weight:700;color:var(--ptech-dialog-text, var(--app-text, inherit));text-align:center}.ptech-dialog-heading{text-align:center;justify-self:center;width:100%}.ptech-dialog-subtitle{margin:2px 0 0;color:var(--ptech-dialog-muted, var(--app-muted, #94a3b8));font-size:1rem;font-weight:500}.ptech-dialog-close{width:42px;height:42px;border-radius:12px;border:1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, .12)));color:var(--ptech-dialog-text, var(--app-text, inherit));background:color-mix(in srgb,var(--app-surface, #fff) 92%,transparent);display:inline-flex;align-items:center;justify-content:center;padding:0!important}.ptech-dialog-close .mat-icon{margin:0;width:26px;height:26px;font-size:26px;line-height:26px}.ptech-dialog-divider{border-top:1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, .12)))}.ptech-dialog-content{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;overflow-x:hidden;padding:16px;box-sizing:border-box;color:var(--ptech-dialog-content-text, var(--ptech-dialog-text, var(--app-text, inherit)))}.ptech-dialog-content::-webkit-scrollbar{width:10px;height:10px}.ptech-dialog-content::-webkit-scrollbar-track{background:var(--ptech-scroll-track, var(--app-scroll-track, color-mix(in srgb, var(--app-surface-2, #f7f7f7) 70%, transparent)));border-radius:12px}.ptech-dialog-content::-webkit-scrollbar-thumb{background:var(--ptech-scroll-thumb, var(--app-scroll-thumb, color-mix(in srgb, var(--app-link-accent, #3b82f6) 70%, #6b7280 30%)));border-radius:12px;border:2px solid transparent;background-clip:padding-box}.ptech-dialog-content::-webkit-scrollbar-thumb:hover{background:var(--ptech-scroll-thumb-hover, var(--app-scroll-thumb-hover, var(--ptech-scroll-thumb, #60a5fa)))}.ptech-dialog-content{scrollbar-width:thin;scrollbar-color:var(--ptech-scroll-thumb, var(--app-scroll-thumb, #60a5fa)) var(--ptech-scroll-track, var(--app-scroll-track, #1f2937))}::ng-deep .ptech-dialog-panel .mat-mdc-dialog-surface{background:transparent!important;box-shadow:none!important;color:inherit;overflow:visible;border-radius:16px;padding:0;max-height:none!important}::ng-deep .cdk-overlay-pane.ptech-dialog-panel{display:flex!important;align-items:center!important;justify-content:center!important;max-width:96vw!important;max-height:96dvh!important;margin:0 auto!important}::ng-deep .cdk-overlay-pane .mat-mdc-tooltip-panel{z-index:var(--ptech-tooltip-z-index, 11000)!important}\n", ".ptech-dialog-drag--spacer{border-color:transparent!important;background:transparent!important}@media (max-width: 700px){.ptech-dialog-shell{max-width:94vw!important;max-height:calc(100dvh - 18px)!important;margin:0 auto!important}::ng-deep .cdk-overlay-pane.ptech-dialog-panel{max-width:96vw!important;max-height:calc(100dvh - 8px)!important;padding:0!important}}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
8162
|
-
}
|
|
8163
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DialogShellComponent, decorators: [{
|
|
8164
|
-
type: Component,
|
|
8165
|
-
args: [{ selector: 'ptech-dialog-shell', standalone: true, imports: [NgIf, CdkDrag, CdkDragHandle, MatIconModule], template: `
|
|
8166
|
-
<div
|
|
8167
|
-
class="ptech-dialog-shell"
|
|
8168
|
-
cdkDrag
|
|
8169
|
-
[cdkDragDisabled]="!draggable"
|
|
8170
|
-
[cdkDragRootElement]="dragRootElement"
|
|
8171
|
-
>
|
|
8172
|
-
<div class="ptech-dialog-header">
|
|
8173
|
-
<div class="ptech-dialog-drag" *ngIf="showDrag" cdkDragHandle aria-hidden="true">
|
|
8174
|
-
<mat-icon>drag_indicator</mat-icon>
|
|
8175
|
-
</div>
|
|
8176
|
-
<div class="ptech-dialog-drag ptech-dialog-drag--spacer" *ngIf="!showDrag" aria-hidden="true"></div>
|
|
8177
|
-
|
|
8178
|
-
<div class="ptech-dialog-heading">
|
|
8179
|
-
<h2 mat-dialog-title>{{ title }}</h2>
|
|
8180
|
-
<p class="ptech-dialog-subtitle" *ngIf="subtitle">{{ subtitle }}</p>
|
|
8181
|
-
</div>
|
|
8182
|
-
|
|
8183
|
-
<button
|
|
8184
|
-
*ngIf="showClose"
|
|
8185
|
-
type="button"
|
|
8186
|
-
class="ptech-dialog-close"
|
|
8187
|
-
aria-label="Fechar"
|
|
8188
|
-
(click)="close.emit()"
|
|
8189
|
-
>
|
|
8190
|
-
<mat-icon>close</mat-icon>
|
|
8191
|
-
</button>
|
|
8192
|
-
<div *ngIf="!showClose" class="ptech-dialog-drag ptech-dialog-drag--spacer" aria-hidden="true"></div>
|
|
8193
|
-
</div>
|
|
8194
|
-
|
|
8195
|
-
<div class="ptech-dialog-divider"></div>
|
|
8196
|
-
|
|
8197
|
-
<div class="ptech-dialog-content">
|
|
8198
|
-
<ng-content></ng-content>
|
|
8199
|
-
</div>
|
|
8200
|
-
</div>
|
|
8201
|
-
`, styles: [":host{display:block;color:var(--ptech-dialog-text, var(--app-text, inherit))}.ptech-dialog-shell{display:flex;flex-direction:column;max-width:92vw;width:100%;max-height:88vh;min-height:0;background:var(--ptech-dialog-bg, var(--app-surface, #fff));color:var(--ptech-dialog-text, var(--app-text, inherit));border-radius:16px;border:1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, .12)));overflow:hidden}.ptech-dialog-header{display:grid;grid-template-columns:52px 1fr 52px;align-items:center;gap:12px;padding:14px 16px;background:var(--ptech-dialog-header-bg, var(--app-surface-2, #f7f7f7));flex:0 0 auto}.ptech-dialog-drag{width:42px;height:42px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, .12)));color:var(--ptech-dialog-muted, var(--app-muted, #94a3b8));background:color-mix(in srgb,var(--app-surface, #fff) 92%,transparent)}.ptech-dialog-heading h1[mat-dialog-title],.ptech-dialog-heading h2[mat-dialog-title]{margin:0;line-height:1.2;font-weight:700;color:var(--ptech-dialog-text, var(--app-text, inherit));text-align:center}.ptech-dialog-heading{text-align:center;justify-self:center;width:100%}.ptech-dialog-subtitle{margin:2px 0 0;color:var(--ptech-dialog-muted, var(--app-muted, #94a3b8));font-size:1rem;font-weight:500}.ptech-dialog-close{width:42px;height:42px;border-radius:12px;border:1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, .12)));color:var(--ptech-dialog-text, var(--app-text, inherit));background:color-mix(in srgb,var(--app-surface, #fff) 92%,transparent);display:inline-flex;align-items:center;justify-content:center;padding:0!important}.ptech-dialog-close .mat-icon{margin:0;width:26px;height:26px;font-size:26px;line-height:26px}.ptech-dialog-divider{border-top:1px solid var(--ptech-dialog-border, var(--app-border-color, rgba(0, 0, 0, .12)))}.ptech-dialog-content{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;overflow-x:hidden;padding:16px;box-sizing:border-box;color:var(--ptech-dialog-content-text, var(--ptech-dialog-text, var(--app-text, inherit)))}.ptech-dialog-content::-webkit-scrollbar{width:10px;height:10px}.ptech-dialog-content::-webkit-scrollbar-track{background:var(--ptech-scroll-track, var(--app-scroll-track, color-mix(in srgb, var(--app-surface-2, #f7f7f7) 70%, transparent)));border-radius:12px}.ptech-dialog-content::-webkit-scrollbar-thumb{background:var(--ptech-scroll-thumb, var(--app-scroll-thumb, color-mix(in srgb, var(--app-link-accent, #3b82f6) 70%, #6b7280 30%)));border-radius:12px;border:2px solid transparent;background-clip:padding-box}.ptech-dialog-content::-webkit-scrollbar-thumb:hover{background:var(--ptech-scroll-thumb-hover, var(--app-scroll-thumb-hover, var(--ptech-scroll-thumb, #60a5fa)))}.ptech-dialog-content{scrollbar-width:thin;scrollbar-color:var(--ptech-scroll-thumb, var(--app-scroll-thumb, #60a5fa)) var(--ptech-scroll-track, var(--app-scroll-track, #1f2937))}::ng-deep .ptech-dialog-panel .mat-mdc-dialog-surface{background:transparent!important;box-shadow:none!important;color:inherit;overflow:visible;border-radius:16px;padding:0;max-height:none!important}::ng-deep .cdk-overlay-pane.ptech-dialog-panel{display:flex!important;align-items:center!important;justify-content:center!important;max-width:96vw!important;max-height:96dvh!important;margin:0 auto!important}::ng-deep .cdk-overlay-pane .mat-mdc-tooltip-panel{z-index:var(--ptech-tooltip-z-index, 11000)!important}\n", ".ptech-dialog-drag--spacer{border-color:transparent!important;background:transparent!important}@media (max-width: 700px){.ptech-dialog-shell{max-width:94vw!important;max-height:calc(100dvh - 18px)!important;margin:0 auto!important}::ng-deep .cdk-overlay-pane.ptech-dialog-panel{max-width:96vw!important;max-height:calc(100dvh - 8px)!important;padding:0!important}}\n"] }]
|
|
8202
|
-
}], propDecorators: { title: [{
|
|
8203
|
-
type: Input
|
|
8204
|
-
}], subtitle: [{
|
|
8205
|
-
type: Input
|
|
8206
|
-
}], draggable: [{
|
|
8207
|
-
type: Input
|
|
8208
|
-
}], showDrag: [{
|
|
8209
|
-
type: Input
|
|
8210
|
-
}], showClose: [{
|
|
8211
|
-
type: Input
|
|
8212
|
-
}], dragRootElement: [{
|
|
8213
|
-
type: Input
|
|
8214
|
-
}], close: [{
|
|
8215
|
-
type: Output
|
|
8216
|
-
}] } });
|
|
8217
|
-
|
|
8218
8212
|
class CardComponent {
|
|
8219
8213
|
title = '';
|
|
8220
8214
|
subtitle = '';
|
|
@@ -9772,197 +9766,529 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
9772
9766
|
(touchend)="onTouchEnd($event)"
|
|
9773
9767
|
(keydown)="onKeydown($event)">
|
|
9774
9768
|
|
|
9775
|
-
<div class="ptech-carousel__viewport">
|
|
9776
|
-
<div class="ptech-carousel__track" [style.transform]="'translateX(' + (-activeIndex * 100) + '%)'">
|
|
9777
|
-
<div class="ptech-carousel__slide"
|
|
9778
|
-
*ngFor="let item of items; let i = index; trackBy: trackByItem"
|
|
9779
|
-
[attr.aria-hidden]="i !== activeIndex"
|
|
9780
|
-
[attr.aria-roledescription]="'slide'"
|
|
9781
|
-
[attr.aria-label]="(i + 1) + ' / ' + items.length">
|
|
9782
|
-
<img *ngIf="item.image" [src]="item.image" [alt]="item.alt || item.title || ''" class="ptech-carousel__image" />
|
|
9783
|
-
<div class="ptech-carousel__fallback" *ngIf="!item.image">
|
|
9784
|
-
<ptech-icon icon="image"></ptech-icon>
|
|
9785
|
-
</div>
|
|
9786
|
-
<div class="ptech-carousel__caption" *ngIf="item.title || item.description || item.actionLabel">
|
|
9787
|
-
<h3 *ngIf="item.title">{{ item.title }}</h3>
|
|
9788
|
-
<p *ngIf="item.description">{{ item.description }}</p>
|
|
9789
|
-
<button type="button"
|
|
9790
|
-
*ngIf="item.actionLabel"
|
|
9791
|
-
class="ptech-carousel__action"
|
|
9792
|
-
(click)="onItemAction(item)">{{ item.actionLabel }}</button>
|
|
9769
|
+
<div class="ptech-carousel__viewport">
|
|
9770
|
+
<div class="ptech-carousel__track" [style.transform]="'translateX(' + (-activeIndex * 100) + '%)'">
|
|
9771
|
+
<div class="ptech-carousel__slide"
|
|
9772
|
+
*ngFor="let item of items; let i = index; trackBy: trackByItem"
|
|
9773
|
+
[attr.aria-hidden]="i !== activeIndex"
|
|
9774
|
+
[attr.aria-roledescription]="'slide'"
|
|
9775
|
+
[attr.aria-label]="(i + 1) + ' / ' + items.length">
|
|
9776
|
+
<img *ngIf="item.image" [src]="item.image" [alt]="item.alt || item.title || ''" class="ptech-carousel__image" />
|
|
9777
|
+
<div class="ptech-carousel__fallback" *ngIf="!item.image">
|
|
9778
|
+
<ptech-icon icon="image"></ptech-icon>
|
|
9779
|
+
</div>
|
|
9780
|
+
<div class="ptech-carousel__caption" *ngIf="item.title || item.description || item.actionLabel">
|
|
9781
|
+
<h3 *ngIf="item.title">{{ item.title }}</h3>
|
|
9782
|
+
<p *ngIf="item.description">{{ item.description }}</p>
|
|
9783
|
+
<button type="button"
|
|
9784
|
+
*ngIf="item.actionLabel"
|
|
9785
|
+
class="ptech-carousel__action"
|
|
9786
|
+
(click)="onItemAction(item)">{{ item.actionLabel }}</button>
|
|
9787
|
+
</div>
|
|
9788
|
+
</div>
|
|
9789
|
+
</div>
|
|
9790
|
+
</div>
|
|
9791
|
+
|
|
9792
|
+
<button type="button" class="ptech-carousel__nav ptech-carousel__nav--prev" (click)="prev()" aria-label="Slide anterior" *ngIf="showNavigation && items.length > 1">
|
|
9793
|
+
<mat-icon>chevron_left</mat-icon>
|
|
9794
|
+
</button>
|
|
9795
|
+
<button type="button" class="ptech-carousel__nav ptech-carousel__nav--next" (click)="next()" aria-label="Próximo slide" *ngIf="showNavigation && items.length > 1">
|
|
9796
|
+
<mat-icon>chevron_right</mat-icon>
|
|
9797
|
+
</button>
|
|
9798
|
+
|
|
9799
|
+
<div class="ptech-carousel__indicators" *ngIf="showIndicators && items.length > 1">
|
|
9800
|
+
<button type="button"
|
|
9801
|
+
*ngFor="let item of items; let i = index; trackBy: trackByItem"
|
|
9802
|
+
class="ptech-carousel__dot"
|
|
9803
|
+
[class.ptech-carousel__dot--active]="i === activeIndex"
|
|
9804
|
+
(click)="goTo(i)"
|
|
9805
|
+
[attr.aria-label]="'Ir para o slide ' + (i + 1)"
|
|
9806
|
+
[attr.aria-current]="i === activeIndex"></button>
|
|
9807
|
+
</div>
|
|
9808
|
+
</div>
|
|
9809
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;min-width:0}.ptech-carousel{position:relative;width:100%;min-width:0;border-radius:var(--ptech-carousel-radius, var(--app-radius-lg, 12px));overflow:hidden;background:var(--ptech-carousel-bg, var(--app-surface, #ffffff));box-shadow:var(--ptech-carousel-shadow, var(--app-shadow-sm, 0 8px 24px rgba(15, 23, 42, .08)));touch-action:pan-y;outline:none}.ptech-carousel:focus-visible{box-shadow:0 0 0 3px var(--app-primary, #3f51b5)}.ptech-carousel__viewport{overflow:hidden;width:100%;min-width:0;contain:layout paint}.ptech-carousel__track{display:flex;min-width:0;transition:transform .4s ease}@media (prefers-reduced-motion: reduce){.ptech-carousel__track{transition:none}}.ptech-carousel__slide{flex:0 0 100%;min-width:100%;position:relative}.ptech-carousel__image{width:100%;height:100%;max-height:360px;object-fit:cover;display:block}.ptech-carousel__fallback{width:100%;height:240px;display:grid;place-items:center;background:var(--app-chip-bg, rgba(0,0,0,.06));color:var(--app-text-muted, rgba(0,0,0,.4))}.ptech-carousel__fallback ptech-icon{font-size:48px}.ptech-carousel__caption{position:absolute;left:0;right:0;bottom:0;padding:var(--app-space-6, 24px);background:linear-gradient(0deg,#061326d1,#06132600);color:#fff}.ptech-carousel__caption h3{margin:0 0 8px;font-size:22px;font-weight:700}.ptech-carousel__caption p{margin:0 0 12px;font-size:15px;opacity:.9;max-width:520px}.ptech-carousel__action{display:inline-block;border:0;cursor:pointer;padding:8px 18px;border-radius:var(--app-radius-md, 8px);background:var(--app-primary, #3f51b5);color:#fff;font-weight:600;font-size:14px}.ptech-carousel__nav{position:absolute;top:50%;transform:translateY(-50%);width:40px;height:40px;border-radius:50%;border:0;background:#ffffffe6;color:#111827;display:grid;place-items:center;cursor:pointer;box-shadow:0 4px 12px #0f172a2e;z-index:2}.ptech-carousel__nav--prev{left:12px}.ptech-carousel__nav--next{right:12px}.ptech-carousel__indicators{position:absolute;left:0;right:0;bottom:12px;display:flex;justify-content:center;gap:8px;z-index:2}.ptech-carousel__dot{width:8px;height:8px;border-radius:50%;border:0;background:#ffffff8c;cursor:pointer;padding:0}.ptech-carousel__dot--active{background:#fff;width:22px;border-radius:4px}@media (max-width: 600px){.ptech-carousel__image,.ptech-carousel__fallback{max-height:220px}.ptech-carousel__caption{padding:var(--app-space-4, 16px)}.ptech-carousel__caption h3{font-size:18px}.ptech-carousel__caption p{font-size:13px}.ptech-carousel__nav{width:34px;height:34px}}\n"] }]
|
|
9810
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { items: [{
|
|
9811
|
+
type: Input
|
|
9812
|
+
}], autoPlay: [{
|
|
9813
|
+
type: Input
|
|
9814
|
+
}], interval: [{
|
|
9815
|
+
type: Input
|
|
9816
|
+
}], loop: [{
|
|
9817
|
+
type: Input
|
|
9818
|
+
}], pauseOnHover: [{
|
|
9819
|
+
type: Input
|
|
9820
|
+
}], showIndicators: [{
|
|
9821
|
+
type: Input
|
|
9822
|
+
}], showNavigation: [{
|
|
9823
|
+
type: Input
|
|
9824
|
+
}], ariaLabel: [{
|
|
9825
|
+
type: Input
|
|
9826
|
+
}], itemClick: [{
|
|
9827
|
+
type: Output
|
|
9828
|
+
}], activeIndexChange: [{
|
|
9829
|
+
type: Output
|
|
9830
|
+
}] } });
|
|
9831
|
+
|
|
9832
|
+
/**
|
|
9833
|
+
* Generic vertical timeline/activity-feed: a marker (icon in a colored dot, per
|
|
9834
|
+
* {@link PtechTimelineStatus}) connected by a line to the next item, with a default
|
|
9835
|
+
* title/subtitle/description/date layout that any consumer can override entirely via
|
|
9836
|
+
* `[itemTemplate]` (receives the item as `$implicit`). The library only renders the shape -
|
|
9837
|
+
* every piece of data (financial history, audit log, notification feed, ...) is supplied by
|
|
9838
|
+
* the consuming app.
|
|
9839
|
+
*/
|
|
9840
|
+
class PtechTimelineComponent {
|
|
9841
|
+
items = [];
|
|
9842
|
+
itemTemplate;
|
|
9843
|
+
compact = false;
|
|
9844
|
+
clickable = false;
|
|
9845
|
+
loading = false;
|
|
9846
|
+
error = false;
|
|
9847
|
+
emptyText = 'Nenhum item encontrado';
|
|
9848
|
+
errorText = 'Não foi possível carregar os itens.';
|
|
9849
|
+
itemClick = new EventEmitter();
|
|
9850
|
+
trackByItem = (_, item) => item.id ?? item.title;
|
|
9851
|
+
onItemClick(item) {
|
|
9852
|
+
if (this.clickable) {
|
|
9853
|
+
this.itemClick.emit(item);
|
|
9854
|
+
}
|
|
9855
|
+
}
|
|
9856
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PtechTimelineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9857
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: PtechTimelineComponent, isStandalone: true, selector: "ptech-timeline", inputs: { items: "items", itemTemplate: "itemTemplate", compact: "compact", clickable: "clickable", loading: "loading", error: "error", emptyText: "emptyText", errorText: "errorText" }, outputs: { itemClick: "itemClick" }, ngImport: i0, template: `
|
|
9858
|
+
<ul class="ptech-timeline" [class.ptech-timeline--compact]="compact" *ngIf="items?.length">
|
|
9859
|
+
<li class="ptech-timeline-item" *ngFor="let item of items; let last = last; trackBy: trackByItem">
|
|
9860
|
+
<div class="ptech-timeline-marker">
|
|
9861
|
+
<span class="ptech-timeline-dot" [ngClass]="'ptech-timeline-dot--' + (item.status || 'neutral')">
|
|
9862
|
+
<mat-icon *ngIf="item.icon">{{ item.icon }}</mat-icon>
|
|
9863
|
+
</span>
|
|
9864
|
+
<span class="ptech-timeline-line" *ngIf="!last"></span>
|
|
9865
|
+
</div>
|
|
9866
|
+
|
|
9867
|
+
<div
|
|
9868
|
+
class="ptech-timeline-content"
|
|
9869
|
+
[class.ptech-timeline-content--clickable]="clickable"
|
|
9870
|
+
(click)="onItemClick(item)"
|
|
9871
|
+
>
|
|
9872
|
+
<ng-container *ngIf="itemTemplate; else defaultItem" [ngTemplateOutlet]="itemTemplate"
|
|
9873
|
+
[ngTemplateOutletContext]="{ $implicit: item }"></ng-container>
|
|
9874
|
+
<ng-template #defaultItem>
|
|
9875
|
+
<div class="ptech-timeline-header">
|
|
9876
|
+
<span class="ptech-timeline-title">{{ item.title }}</span>
|
|
9877
|
+
<span class="ptech-timeline-date" *ngIf="item.date">{{ item.date | date:'dd/MM/yyyy HH:mm' }}</span>
|
|
9878
|
+
</div>
|
|
9879
|
+
<div class="ptech-timeline-subtitle" *ngIf="item.subtitle">{{ item.subtitle }}</div>
|
|
9880
|
+
<div class="ptech-timeline-description" *ngIf="item.description">{{ item.description }}</div>
|
|
9881
|
+
</ng-template>
|
|
9882
|
+
</div>
|
|
9883
|
+
</li>
|
|
9884
|
+
</ul>
|
|
9885
|
+
|
|
9886
|
+
<div class="ptech-timeline-state" *ngIf="loading">
|
|
9887
|
+
<mat-spinner diameter="28" mode="indeterminate"></mat-spinner>
|
|
9888
|
+
</div>
|
|
9889
|
+
|
|
9890
|
+
<div class="ptech-timeline-state" *ngIf="!loading && !items?.length && !error">
|
|
9891
|
+
{{ emptyText }}
|
|
9892
|
+
</div>
|
|
9893
|
+
|
|
9894
|
+
<div class="ptech-timeline-state ptech-timeline-state--error" *ngIf="!loading && error">
|
|
9895
|
+
{{ errorText }}
|
|
9896
|
+
</div>
|
|
9897
|
+
`, isInline: true, styles: [":host{display:block;width:100%}.ptech-timeline{list-style:none;margin:0;padding:0}.ptech-timeline-item{display:flex;gap:12px;align-items:stretch}.ptech-timeline-marker{display:flex;flex-direction:column;align-items:center;flex:0 0 auto}.ptech-timeline-dot{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;flex:0 0 auto;background:var(--app-chip-bg, rgba(0,0,0,.06));color:var(--app-muted, #6b7280);border:2px solid var(--app-surface, #fff);box-shadow:0 0 0 1px var(--app-border-color, rgba(0,0,0,.12))}.ptech-timeline-dot mat-icon{font-size:18px;width:18px;height:18px}.ptech-timeline-dot--success{background:var(--ptech-timeline-success-bg, color-mix(in srgb, var(--app-status-success, #15803d) 16%, transparent));color:var(--app-status-success, #15803d)}.ptech-timeline-dot--error{background:var(--ptech-timeline-error-bg, color-mix(in srgb, var(--app-status-error, #b91c1c) 16%, transparent));color:var(--app-status-error, #b91c1c)}.ptech-timeline-dot--warning{background:var(--ptech-timeline-warning-bg, color-mix(in srgb, var(--app-status-warning, #92400e) 16%, transparent));color:var(--app-status-warning, #92400e)}.ptech-timeline-dot--info{background:var(--ptech-timeline-info-bg, color-mix(in srgb, var(--app-primary, #3f51b5) 16%, transparent));color:var(--app-primary, #3f51b5)}.ptech-timeline-dot--neutral{background:var(--app-chip-bg, rgba(0,0,0,.06));color:var(--app-muted, #6b7280)}.ptech-timeline-line{flex:1 1 auto;width:2px;min-height:16px;background:var(--app-border-color, rgba(0,0,0,.12));margin:2px 0}.ptech-timeline-content{flex:1 1 auto;min-width:0;padding-bottom:20px}.ptech-timeline-content--clickable{cursor:pointer}.ptech-timeline-content--clickable:hover .ptech-timeline-title{text-decoration:underline}.ptech-timeline-header{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:8px}.ptech-timeline-title{font-weight:600;font-size:14px;color:var(--app-text, inherit)}.ptech-timeline-date{font-size:12px;color:var(--app-muted, #6b7280);white-space:nowrap}.ptech-timeline-subtitle{font-size:13px;font-weight:500;color:var(--app-text, inherit);margin-top:2px}.ptech-timeline-description{font-size:13px;color:var(--app-muted, #6b7280);margin-top:2px;line-height:1.4}.ptech-timeline--compact .ptech-timeline-content{padding-bottom:12px}.ptech-timeline--compact .ptech-timeline-dot{width:24px;height:24px}.ptech-timeline--compact .ptech-timeline-dot mat-icon{font-size:14px;width:14px;height:14px}.ptech-timeline-state{display:flex;align-items:center;justify-content:center;padding:32px 16px;color:var(--app-muted, #6b7280);font-size:13px;text-align:center}.ptech-timeline-state--error{color:var(--app-status-error, #b91c1c)}@media (max-width: 480px){.ptech-timeline-item{gap:8px}.ptech-timeline-header{flex-direction:column;align-items:flex-start;gap:2px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: CoreMaterialModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9898
|
+
}
|
|
9899
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PtechTimelineComponent, decorators: [{
|
|
9900
|
+
type: Component,
|
|
9901
|
+
args: [{ selector: 'ptech-timeline', standalone: true, imports: [CommonModule, CoreMaterialModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
9902
|
+
<ul class="ptech-timeline" [class.ptech-timeline--compact]="compact" *ngIf="items?.length">
|
|
9903
|
+
<li class="ptech-timeline-item" *ngFor="let item of items; let last = last; trackBy: trackByItem">
|
|
9904
|
+
<div class="ptech-timeline-marker">
|
|
9905
|
+
<span class="ptech-timeline-dot" [ngClass]="'ptech-timeline-dot--' + (item.status || 'neutral')">
|
|
9906
|
+
<mat-icon *ngIf="item.icon">{{ item.icon }}</mat-icon>
|
|
9907
|
+
</span>
|
|
9908
|
+
<span class="ptech-timeline-line" *ngIf="!last"></span>
|
|
9909
|
+
</div>
|
|
9910
|
+
|
|
9911
|
+
<div
|
|
9912
|
+
class="ptech-timeline-content"
|
|
9913
|
+
[class.ptech-timeline-content--clickable]="clickable"
|
|
9914
|
+
(click)="onItemClick(item)"
|
|
9915
|
+
>
|
|
9916
|
+
<ng-container *ngIf="itemTemplate; else defaultItem" [ngTemplateOutlet]="itemTemplate"
|
|
9917
|
+
[ngTemplateOutletContext]="{ $implicit: item }"></ng-container>
|
|
9918
|
+
<ng-template #defaultItem>
|
|
9919
|
+
<div class="ptech-timeline-header">
|
|
9920
|
+
<span class="ptech-timeline-title">{{ item.title }}</span>
|
|
9921
|
+
<span class="ptech-timeline-date" *ngIf="item.date">{{ item.date | date:'dd/MM/yyyy HH:mm' }}</span>
|
|
9793
9922
|
</div>
|
|
9794
|
-
|
|
9923
|
+
<div class="ptech-timeline-subtitle" *ngIf="item.subtitle">{{ item.subtitle }}</div>
|
|
9924
|
+
<div class="ptech-timeline-description" *ngIf="item.description">{{ item.description }}</div>
|
|
9925
|
+
</ng-template>
|
|
9795
9926
|
</div>
|
|
9796
|
-
</
|
|
9927
|
+
</li>
|
|
9928
|
+
</ul>
|
|
9797
9929
|
|
|
9798
|
-
|
|
9799
|
-
|
|
9800
|
-
|
|
9801
|
-
<button type="button" class="ptech-carousel__nav ptech-carousel__nav--next" (click)="next()" aria-label="Próximo slide" *ngIf="showNavigation && items.length > 1">
|
|
9802
|
-
<mat-icon>chevron_right</mat-icon>
|
|
9803
|
-
</button>
|
|
9930
|
+
<div class="ptech-timeline-state" *ngIf="loading">
|
|
9931
|
+
<mat-spinner diameter="28" mode="indeterminate"></mat-spinner>
|
|
9932
|
+
</div>
|
|
9804
9933
|
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
*ngFor="let item of items; let i = index; trackBy: trackByItem"
|
|
9808
|
-
class="ptech-carousel__dot"
|
|
9809
|
-
[class.ptech-carousel__dot--active]="i === activeIndex"
|
|
9810
|
-
(click)="goTo(i)"
|
|
9811
|
-
[attr.aria-label]="'Ir para o slide ' + (i + 1)"
|
|
9812
|
-
[attr.aria-current]="i === activeIndex"></button>
|
|
9813
|
-
</div>
|
|
9934
|
+
<div class="ptech-timeline-state" *ngIf="!loading && !items?.length && !error">
|
|
9935
|
+
{{ emptyText }}
|
|
9814
9936
|
</div>
|
|
9815
|
-
|
|
9816
|
-
|
|
9937
|
+
|
|
9938
|
+
<div class="ptech-timeline-state ptech-timeline-state--error" *ngIf="!loading && error">
|
|
9939
|
+
{{ errorText }}
|
|
9940
|
+
</div>
|
|
9941
|
+
`, styles: [":host{display:block;width:100%}.ptech-timeline{list-style:none;margin:0;padding:0}.ptech-timeline-item{display:flex;gap:12px;align-items:stretch}.ptech-timeline-marker{display:flex;flex-direction:column;align-items:center;flex:0 0 auto}.ptech-timeline-dot{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;flex:0 0 auto;background:var(--app-chip-bg, rgba(0,0,0,.06));color:var(--app-muted, #6b7280);border:2px solid var(--app-surface, #fff);box-shadow:0 0 0 1px var(--app-border-color, rgba(0,0,0,.12))}.ptech-timeline-dot mat-icon{font-size:18px;width:18px;height:18px}.ptech-timeline-dot--success{background:var(--ptech-timeline-success-bg, color-mix(in srgb, var(--app-status-success, #15803d) 16%, transparent));color:var(--app-status-success, #15803d)}.ptech-timeline-dot--error{background:var(--ptech-timeline-error-bg, color-mix(in srgb, var(--app-status-error, #b91c1c) 16%, transparent));color:var(--app-status-error, #b91c1c)}.ptech-timeline-dot--warning{background:var(--ptech-timeline-warning-bg, color-mix(in srgb, var(--app-status-warning, #92400e) 16%, transparent));color:var(--app-status-warning, #92400e)}.ptech-timeline-dot--info{background:var(--ptech-timeline-info-bg, color-mix(in srgb, var(--app-primary, #3f51b5) 16%, transparent));color:var(--app-primary, #3f51b5)}.ptech-timeline-dot--neutral{background:var(--app-chip-bg, rgba(0,0,0,.06));color:var(--app-muted, #6b7280)}.ptech-timeline-line{flex:1 1 auto;width:2px;min-height:16px;background:var(--app-border-color, rgba(0,0,0,.12));margin:2px 0}.ptech-timeline-content{flex:1 1 auto;min-width:0;padding-bottom:20px}.ptech-timeline-content--clickable{cursor:pointer}.ptech-timeline-content--clickable:hover .ptech-timeline-title{text-decoration:underline}.ptech-timeline-header{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:8px}.ptech-timeline-title{font-weight:600;font-size:14px;color:var(--app-text, inherit)}.ptech-timeline-date{font-size:12px;color:var(--app-muted, #6b7280);white-space:nowrap}.ptech-timeline-subtitle{font-size:13px;font-weight:500;color:var(--app-text, inherit);margin-top:2px}.ptech-timeline-description{font-size:13px;color:var(--app-muted, #6b7280);margin-top:2px;line-height:1.4}.ptech-timeline--compact .ptech-timeline-content{padding-bottom:12px}.ptech-timeline--compact .ptech-timeline-dot{width:24px;height:24px}.ptech-timeline--compact .ptech-timeline-dot mat-icon{font-size:14px;width:14px;height:14px}.ptech-timeline-state{display:flex;align-items:center;justify-content:center;padding:32px 16px;color:var(--app-muted, #6b7280);font-size:13px;text-align:center}.ptech-timeline-state--error{color:var(--app-status-error, #b91c1c)}@media (max-width: 480px){.ptech-timeline-item{gap:8px}.ptech-timeline-header{flex-direction:column;align-items:flex-start;gap:2px}}\n"] }]
|
|
9942
|
+
}], propDecorators: { items: [{
|
|
9817
9943
|
type: Input
|
|
9818
|
-
}],
|
|
9944
|
+
}], itemTemplate: [{
|
|
9819
9945
|
type: Input
|
|
9820
|
-
}],
|
|
9946
|
+
}], compact: [{
|
|
9821
9947
|
type: Input
|
|
9822
|
-
}],
|
|
9948
|
+
}], clickable: [{
|
|
9823
9949
|
type: Input
|
|
9824
|
-
}],
|
|
9950
|
+
}], loading: [{
|
|
9825
9951
|
type: Input
|
|
9826
|
-
}],
|
|
9952
|
+
}], error: [{
|
|
9827
9953
|
type: Input
|
|
9828
|
-
}],
|
|
9954
|
+
}], emptyText: [{
|
|
9829
9955
|
type: Input
|
|
9830
|
-
}],
|
|
9956
|
+
}], errorText: [{
|
|
9831
9957
|
type: Input
|
|
9832
9958
|
}], itemClick: [{
|
|
9833
9959
|
type: Output
|
|
9834
|
-
}], activeIndexChange: [{
|
|
9835
|
-
type: Output
|
|
9836
9960
|
}] } });
|
|
9837
9961
|
|
|
9838
9962
|
/**
|
|
9839
|
-
*
|
|
9840
|
-
*
|
|
9841
|
-
*
|
|
9842
|
-
*
|
|
9843
|
-
*
|
|
9844
|
-
* the
|
|
9963
|
+
* Renders a local clock for a given IANA zone id - purely presentational, no business rule.
|
|
9964
|
+
* It does not know what a "user" or a "preference" is: the consuming app is responsible for
|
|
9965
|
+
* resolving zoneId (from wherever its own domain keeps it) and passing it in as a plain input.
|
|
9966
|
+
* Ticks its own internal timer (1s if seconds are shown, 30s otherwise) so it works standalone
|
|
9967
|
+
* with zero external services - OnPush requires an explicit markForCheck() on each tick since
|
|
9968
|
+
* the update originates outside any zone-triggered template event.
|
|
9845
9969
|
*/
|
|
9846
|
-
class
|
|
9847
|
-
|
|
9848
|
-
|
|
9970
|
+
class PtechTimezoneClockComponent {
|
|
9971
|
+
cdr;
|
|
9972
|
+
zoneId = null;
|
|
9849
9973
|
compact = false;
|
|
9850
|
-
|
|
9851
|
-
|
|
9852
|
-
|
|
9853
|
-
|
|
9854
|
-
|
|
9855
|
-
|
|
9856
|
-
|
|
9857
|
-
|
|
9858
|
-
|
|
9859
|
-
|
|
9974
|
+
showTimezone = true;
|
|
9975
|
+
showSeconds = false;
|
|
9976
|
+
time = '';
|
|
9977
|
+
effectiveZoneId = 'UTC';
|
|
9978
|
+
tickSubscription;
|
|
9979
|
+
constructor(cdr) {
|
|
9980
|
+
this.cdr = cdr;
|
|
9981
|
+
}
|
|
9982
|
+
ngOnInit() {
|
|
9983
|
+
this.startTicking();
|
|
9984
|
+
}
|
|
9985
|
+
ngOnChanges(changes) {
|
|
9986
|
+
if (changes['zoneId'] || changes['showSeconds']) {
|
|
9987
|
+
this.tick();
|
|
9988
|
+
if (changes['showSeconds'] && !changes['showSeconds'].firstChange) {
|
|
9989
|
+
this.startTicking();
|
|
9990
|
+
}
|
|
9991
|
+
}
|
|
9992
|
+
}
|
|
9993
|
+
ngOnDestroy() {
|
|
9994
|
+
this.tickSubscription?.unsubscribe();
|
|
9995
|
+
}
|
|
9996
|
+
startTicking() {
|
|
9997
|
+
this.tickSubscription?.unsubscribe();
|
|
9998
|
+
this.tick();
|
|
9999
|
+
this.tickSubscription = interval(this.showSeconds ? 1000 : 30000).subscribe(() => this.tick());
|
|
10000
|
+
}
|
|
10001
|
+
tick() {
|
|
10002
|
+
this.effectiveZoneId = this.resolveZoneId(this.zoneId);
|
|
10003
|
+
try {
|
|
10004
|
+
this.time = new Intl.DateTimeFormat('pt-BR', {
|
|
10005
|
+
timeZone: this.effectiveZoneId,
|
|
10006
|
+
hour: '2-digit',
|
|
10007
|
+
minute: '2-digit',
|
|
10008
|
+
second: this.showSeconds ? '2-digit' : undefined,
|
|
10009
|
+
}).format(new Date());
|
|
10010
|
+
}
|
|
10011
|
+
catch {
|
|
10012
|
+
this.effectiveZoneId = 'UTC';
|
|
10013
|
+
this.time = new Intl.DateTimeFormat('pt-BR', {
|
|
10014
|
+
timeZone: this.effectiveZoneId,
|
|
10015
|
+
hour: '2-digit',
|
|
10016
|
+
minute: '2-digit',
|
|
10017
|
+
second: this.showSeconds ? '2-digit' : undefined,
|
|
10018
|
+
}).format(new Date());
|
|
10019
|
+
}
|
|
10020
|
+
this.cdr.markForCheck();
|
|
10021
|
+
}
|
|
10022
|
+
resolveZoneId(zoneId) {
|
|
10023
|
+
const candidate = (zoneId || '').trim();
|
|
10024
|
+
if (!candidate) {
|
|
10025
|
+
return 'UTC';
|
|
10026
|
+
}
|
|
10027
|
+
try {
|
|
10028
|
+
new Intl.DateTimeFormat('pt-BR', { timeZone: candidate }).format(new Date());
|
|
10029
|
+
return candidate;
|
|
10030
|
+
}
|
|
10031
|
+
catch {
|
|
10032
|
+
return 'UTC';
|
|
10033
|
+
}
|
|
10034
|
+
}
|
|
10035
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PtechTimezoneClockComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
10036
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: PtechTimezoneClockComponent, isStandalone: true, selector: "ptech-timezone-clock", inputs: { zoneId: "zoneId", compact: "compact", showTimezone: "showTimezone", showSeconds: "showSeconds" }, usesOnChanges: true, ngImport: i0, template: `
|
|
10037
|
+
<span
|
|
10038
|
+
class="ptech-timezone-clock"
|
|
10039
|
+
[class.compact]="compact"
|
|
10040
|
+
[title]="showTimezone ? effectiveZoneId : ''"
|
|
10041
|
+
>
|
|
10042
|
+
<span class="ptech-timezone-clock-time">{{ time }}</span>
|
|
10043
|
+
<span class="ptech-timezone-clock-zone" *ngIf="showTimezone"> • {{ effectiveZoneId }}</span>
|
|
10044
|
+
</span>
|
|
10045
|
+
`, isInline: true, styles: [".ptech-timezone-clock{font-size:var(--ptech-timezone-clock-font-size, 12px);color:var(--ptech-timezone-clock-color, inherit);opacity:var(--ptech-timezone-clock-opacity, .85);white-space:nowrap;font-variant-numeric:tabular-nums}@media (max-width: 599.98px){.ptech-timezone-clock.compact .ptech-timezone-clock-zone{display:none}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10046
|
+
}
|
|
10047
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PtechTimezoneClockComponent, decorators: [{
|
|
10048
|
+
type: Component,
|
|
10049
|
+
args: [{ selector: 'ptech-timezone-clock', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
10050
|
+
<span
|
|
10051
|
+
class="ptech-timezone-clock"
|
|
10052
|
+
[class.compact]="compact"
|
|
10053
|
+
[title]="showTimezone ? effectiveZoneId : ''"
|
|
10054
|
+
>
|
|
10055
|
+
<span class="ptech-timezone-clock-time">{{ time }}</span>
|
|
10056
|
+
<span class="ptech-timezone-clock-zone" *ngIf="showTimezone"> • {{ effectiveZoneId }}</span>
|
|
10057
|
+
</span>
|
|
10058
|
+
`, styles: [".ptech-timezone-clock{font-size:var(--ptech-timezone-clock-font-size, 12px);color:var(--ptech-timezone-clock-color, inherit);opacity:var(--ptech-timezone-clock-opacity, .85);white-space:nowrap;font-variant-numeric:tabular-nums}@media (max-width: 599.98px){.ptech-timezone-clock.compact .ptech-timezone-clock-zone{display:none}}\n"] }]
|
|
10059
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { zoneId: [{
|
|
10060
|
+
type: Input
|
|
10061
|
+
}], compact: [{
|
|
10062
|
+
type: Input
|
|
10063
|
+
}], showTimezone: [{
|
|
10064
|
+
type: Input
|
|
10065
|
+
}], showSeconds: [{
|
|
10066
|
+
type: Input
|
|
10067
|
+
}] } });
|
|
10068
|
+
|
|
10069
|
+
class DateUtil {
|
|
10070
|
+
static DATE_FORMAT = 'dd/MM/yyyy';
|
|
10071
|
+
static TIME_HOUR_MINUTE_FORMAT = 'HH:mm';
|
|
10072
|
+
static TIME_HOUR_MINUTE_SEC_FORMAT = 'HH:mm:ss';
|
|
10073
|
+
static DATE_TIME_FORMAT = 'dd/MM/yyyy HH:mm';
|
|
10074
|
+
static DATE_TIME_FORMAT_SLICED = 'dd/MM/yy HH:mm';
|
|
10075
|
+
static DATE_TIME_FULL_FORMAT = 'dd/MM/yyyy HH:mm:ss';
|
|
10076
|
+
static DEFAULT_TIME_ZONE = 'UTC';
|
|
10077
|
+
/**
|
|
10078
|
+
* Aceita Date | string | undefined. Retorna string formatada ou vazio.
|
|
10079
|
+
*/
|
|
10080
|
+
static format(value, format) {
|
|
10081
|
+
if (!value)
|
|
10082
|
+
return StringUtil.EMPTY;
|
|
10083
|
+
const dateObj = typeof value === 'string' ? new Date(value) : value;
|
|
10084
|
+
if (dateObj instanceof Date && !isNaN(dateObj.getTime())) {
|
|
10085
|
+
return formatDate(dateObj, format, 'pt-BR');
|
|
10086
|
+
}
|
|
10087
|
+
return StringUtil.EMPTY;
|
|
10088
|
+
}
|
|
10089
|
+
static formatDateToZone(utcDate, timezone, locale = 'pt-BR') {
|
|
10090
|
+
if (!utcDate)
|
|
10091
|
+
return StringUtil.EMPTY;
|
|
10092
|
+
const date = utcDate instanceof Date ? utcDate : new Date(utcDate);
|
|
10093
|
+
if (!this.isValid(date))
|
|
10094
|
+
return StringUtil.EMPTY;
|
|
10095
|
+
const zoneId = this.resolveZoneId(timezone);
|
|
10096
|
+
return new Intl.DateTimeFormat(locale, {
|
|
10097
|
+
timeZone: zoneId,
|
|
10098
|
+
day: '2-digit',
|
|
10099
|
+
month: '2-digit',
|
|
10100
|
+
year: 'numeric',
|
|
10101
|
+
hour: '2-digit',
|
|
10102
|
+
minute: '2-digit',
|
|
10103
|
+
hour12: false,
|
|
10104
|
+
}).format(date).replace(',', '');
|
|
10105
|
+
}
|
|
10106
|
+
static getTimeFormat(value, format) {
|
|
10107
|
+
if (!this.isValid(value))
|
|
10108
|
+
return StringUtil.EMPTY;
|
|
10109
|
+
const date = value instanceof Date ? value : new Date(value);
|
|
10110
|
+
const hour = String(date.getHours()).padStart(2, '0');
|
|
10111
|
+
const minute = String(date.getMinutes()).padStart(2, '0');
|
|
10112
|
+
const second = String(date.getSeconds()).padStart(2, '0');
|
|
10113
|
+
if (format === this.TIME_HOUR_MINUTE_FORMAT) {
|
|
10114
|
+
return `${hour}:${minute}`;
|
|
10115
|
+
}
|
|
10116
|
+
if (format === this.TIME_HOUR_MINUTE_SEC_FORMAT) {
|
|
10117
|
+
return `${hour}:${minute}:${second}`;
|
|
10118
|
+
}
|
|
10119
|
+
return StringUtil.EMPTY;
|
|
10120
|
+
}
|
|
10121
|
+
static getTotalDaysInMonth(month, year) {
|
|
10122
|
+
const date = new Date(year, month - 1, 1);
|
|
10123
|
+
date.setMonth(date.getMonth() + 1);
|
|
10124
|
+
date.setDate(date.getDate() - 1);
|
|
10125
|
+
return date.getDate();
|
|
10126
|
+
}
|
|
10127
|
+
static addMonthsToDate(date, monthsToAdd) {
|
|
10128
|
+
const resultDate = new Date(date);
|
|
10129
|
+
resultDate.setMonth(resultDate.getMonth() + monthsToAdd);
|
|
10130
|
+
return resultDate;
|
|
10131
|
+
}
|
|
10132
|
+
static addDaysToDate(days, date) {
|
|
10133
|
+
const result = new Date(date);
|
|
10134
|
+
result.setDate(result.getDate() + days);
|
|
10135
|
+
return result;
|
|
10136
|
+
}
|
|
10137
|
+
static isValid(value) {
|
|
10138
|
+
if (value === null || value === undefined)
|
|
10139
|
+
return false;
|
|
10140
|
+
const date = typeof value === 'string' ? new Date(value) : value;
|
|
10141
|
+
return date instanceof Date && !isNaN(date.getTime());
|
|
10142
|
+
}
|
|
10143
|
+
static isGreaterThan(initial, final) {
|
|
10144
|
+
const i = new Date(initial);
|
|
10145
|
+
const f = new Date(final);
|
|
10146
|
+
return this.isValid(i) && this.isValid(f) && i > f;
|
|
10147
|
+
}
|
|
10148
|
+
static isLessThan(initial, final) {
|
|
10149
|
+
const i = new Date(initial);
|
|
10150
|
+
const f = new Date(final);
|
|
10151
|
+
return this.isValid(i) && this.isValid(f) && i < f;
|
|
10152
|
+
}
|
|
10153
|
+
static isEqual(initial, final) {
|
|
10154
|
+
const i = new Date(initial);
|
|
10155
|
+
const f = new Date(final);
|
|
10156
|
+
return this.isValid(i) && this.isValid(f) && i.getTime() === f.getTime();
|
|
10157
|
+
}
|
|
10158
|
+
static isLessThanOrEqual(initial, final) {
|
|
10159
|
+
return this.isLessThan(initial, final) || this.isEqual(initial, final);
|
|
10160
|
+
}
|
|
10161
|
+
static isGreaterThanOrEqual(initial, final) {
|
|
10162
|
+
return this.isGreaterThan(initial, final) || this.isEqual(initial, final);
|
|
10163
|
+
}
|
|
10164
|
+
static isBetween(date, initial, final) {
|
|
10165
|
+
const d = new Date(date);
|
|
10166
|
+
const i = new Date(initial);
|
|
10167
|
+
const f = new Date(final);
|
|
10168
|
+
return this.isValid(d) && this.isValid(i) && this.isValid(f) && d >= i && d <= f;
|
|
10169
|
+
}
|
|
10170
|
+
static getDayOfWeek(date) {
|
|
10171
|
+
// getDay returns 0=Sunday
|
|
10172
|
+
switch (date.getDay()) {
|
|
10173
|
+
case 0:
|
|
10174
|
+
return 'SUNDAY';
|
|
10175
|
+
case 1:
|
|
10176
|
+
return 'MONDAY';
|
|
10177
|
+
case 2:
|
|
10178
|
+
return 'TUESDAY';
|
|
10179
|
+
case 3:
|
|
10180
|
+
return 'WEDNESDAY';
|
|
10181
|
+
case 4:
|
|
10182
|
+
return 'THURSDAY';
|
|
10183
|
+
case 5:
|
|
10184
|
+
return 'FRIDAY';
|
|
10185
|
+
case 6:
|
|
10186
|
+
return 'SATURDAY';
|
|
10187
|
+
}
|
|
10188
|
+
return '';
|
|
10189
|
+
}
|
|
10190
|
+
static isValidWithString(value, pattern) {
|
|
10191
|
+
if (!value || value.length < pattern.length)
|
|
10192
|
+
return false;
|
|
10193
|
+
return this.isValid(this.stringToDate(value, pattern));
|
|
10194
|
+
}
|
|
10195
|
+
static stringToDate(date, pattern, zoned = false) {
|
|
10196
|
+
const dateItems = date.replace(/[^a-zA-Z0-9]/g, '-').split('-');
|
|
10197
|
+
const formatItems = pattern.toLowerCase().replace(/[^a-zA-Z0-9]/g, '-').split('-');
|
|
10198
|
+
const yearIndex = formatItems.indexOf('yyyy');
|
|
10199
|
+
const monthIndex = formatItems.indexOf('mm');
|
|
10200
|
+
const dayIndex = formatItems.indexOf('dd');
|
|
10201
|
+
const hourIndex = formatItems.indexOf('hh');
|
|
10202
|
+
const minutesIndex = formatItems.indexOf('ii');
|
|
10203
|
+
const secondsIndex = formatItems.indexOf('ss');
|
|
10204
|
+
const year = yearIndex > -1 ? Number(dateItems[yearIndex]) : 1970;
|
|
10205
|
+
const month = monthIndex > -1 ? Number(dateItems[monthIndex]) - 1 : 0;
|
|
10206
|
+
const day = dayIndex > -1 ? Number(dateItems[dayIndex]) : 1;
|
|
10207
|
+
const hour = hourIndex > -1 ? Number(dateItems[hourIndex]) : 0;
|
|
10208
|
+
const minute = minutesIndex > -1 ? Number(dateItems[minutesIndex]) : 0;
|
|
10209
|
+
const second = secondsIndex > -1 ? Number(dateItems[secondsIndex]) : 0;
|
|
10210
|
+
if (zoned) {
|
|
10211
|
+
return new Date(Date.UTC(year, month, day, hour, minute, second));
|
|
10212
|
+
}
|
|
10213
|
+
return new Date(Date.UTC(year, month, day, hour, minute, second));
|
|
10214
|
+
}
|
|
10215
|
+
static dateAndStringHourToDate(date, hour) {
|
|
10216
|
+
if (!this.isValid(date) || !hour)
|
|
10217
|
+
return new Date(NaN);
|
|
10218
|
+
const [hours = '0', minutes = '0'] = hour.split(':');
|
|
10219
|
+
const result = new Date(date);
|
|
10220
|
+
result.setHours(Number(hours), Number(minutes), 0, 0);
|
|
10221
|
+
return result;
|
|
10222
|
+
}
|
|
10223
|
+
static stringFormattedToDate(date) {
|
|
10224
|
+
if (!date)
|
|
10225
|
+
return undefined;
|
|
10226
|
+
const parsed = this.stringToDate(date, 'dd/mm/yyyy');
|
|
10227
|
+
return this.isValid(parsed) ? parsed : undefined;
|
|
10228
|
+
}
|
|
10229
|
+
static resolveZoneId(timezone) {
|
|
10230
|
+
const candidate = (timezone || '').trim();
|
|
10231
|
+
if (candidate && this.isSupportedTimeZone(candidate)) {
|
|
10232
|
+
return candidate;
|
|
10233
|
+
}
|
|
10234
|
+
return this.DEFAULT_TIME_ZONE;
|
|
10235
|
+
}
|
|
10236
|
+
static isSupportedTimeZone(timezone) {
|
|
10237
|
+
try {
|
|
10238
|
+
new Intl.DateTimeFormat('en-US', { timeZone: timezone }).format(new Date());
|
|
10239
|
+
return true;
|
|
10240
|
+
}
|
|
10241
|
+
catch {
|
|
10242
|
+
return false;
|
|
10243
|
+
}
|
|
10244
|
+
}
|
|
10245
|
+
}
|
|
10246
|
+
|
|
10247
|
+
class PtechLogsComponent {
|
|
10248
|
+
model;
|
|
10249
|
+
updatedLabel = 'Atualizado em';
|
|
10250
|
+
atLabel = 'às';
|
|
10251
|
+
systemLabel = 'por sistema';
|
|
10252
|
+
dateFormat = 'dd/MM/yyyy';
|
|
10253
|
+
timeFormat = 'HH:mm';
|
|
10254
|
+
message = '';
|
|
10255
|
+
ngOnChanges(_) {
|
|
10256
|
+
this.message = this.buildMessage();
|
|
10257
|
+
}
|
|
10258
|
+
buildMessage() {
|
|
10259
|
+
if (!this.model) {
|
|
10260
|
+
return '';
|
|
9860
10261
|
}
|
|
10262
|
+
const date = this.model.lastUpdateDate || this.model.creationDate;
|
|
10263
|
+
if (!date) {
|
|
10264
|
+
return '';
|
|
10265
|
+
}
|
|
10266
|
+
const formattedDate = DateUtil.format(date, this.dateFormat);
|
|
10267
|
+
const formattedTime = DateUtil.format(date, this.timeFormat);
|
|
10268
|
+
if (!formattedDate || !formattedTime) {
|
|
10269
|
+
return '';
|
|
10270
|
+
}
|
|
10271
|
+
const base = `${this.updatedLabel} ${formattedDate} ${this.atLabel} ${formattedTime}`;
|
|
10272
|
+
return this.model.changedBy ? base : `${base} - ${this.systemLabel}`;
|
|
9861
10273
|
}
|
|
9862
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
9863
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type:
|
|
9864
|
-
<ul class="ptech-timeline" [class.ptech-timeline--compact]="compact" *ngIf="items?.length">
|
|
9865
|
-
<li class="ptech-timeline-item" *ngFor="let item of items; let last = last; trackBy: trackByItem">
|
|
9866
|
-
<div class="ptech-timeline-marker">
|
|
9867
|
-
<span class="ptech-timeline-dot" [ngClass]="'ptech-timeline-dot--' + (item.status || 'neutral')">
|
|
9868
|
-
<mat-icon *ngIf="item.icon">{{ item.icon }}</mat-icon>
|
|
9869
|
-
</span>
|
|
9870
|
-
<span class="ptech-timeline-line" *ngIf="!last"></span>
|
|
9871
|
-
</div>
|
|
9872
|
-
|
|
9873
|
-
<div
|
|
9874
|
-
class="ptech-timeline-content"
|
|
9875
|
-
[class.ptech-timeline-content--clickable]="clickable"
|
|
9876
|
-
(click)="onItemClick(item)"
|
|
9877
|
-
>
|
|
9878
|
-
<ng-container *ngIf="itemTemplate; else defaultItem" [ngTemplateOutlet]="itemTemplate"
|
|
9879
|
-
[ngTemplateOutletContext]="{ $implicit: item }"></ng-container>
|
|
9880
|
-
<ng-template #defaultItem>
|
|
9881
|
-
<div class="ptech-timeline-header">
|
|
9882
|
-
<span class="ptech-timeline-title">{{ item.title }}</span>
|
|
9883
|
-
<span class="ptech-timeline-date" *ngIf="item.date">{{ item.date | date:'dd/MM/yyyy HH:mm' }}</span>
|
|
9884
|
-
</div>
|
|
9885
|
-
<div class="ptech-timeline-subtitle" *ngIf="item.subtitle">{{ item.subtitle }}</div>
|
|
9886
|
-
<div class="ptech-timeline-description" *ngIf="item.description">{{ item.description }}</div>
|
|
9887
|
-
</ng-template>
|
|
9888
|
-
</div>
|
|
9889
|
-
</li>
|
|
9890
|
-
</ul>
|
|
9891
|
-
|
|
9892
|
-
<div class="ptech-timeline-state" *ngIf="loading">
|
|
9893
|
-
<mat-spinner diameter="28" mode="indeterminate"></mat-spinner>
|
|
9894
|
-
</div>
|
|
9895
|
-
|
|
9896
|
-
<div class="ptech-timeline-state" *ngIf="!loading && !items?.length && !error">
|
|
9897
|
-
{{ emptyText }}
|
|
9898
|
-
</div>
|
|
9899
|
-
|
|
9900
|
-
<div class="ptech-timeline-state ptech-timeline-state--error" *ngIf="!loading && error">
|
|
9901
|
-
{{ errorText }}
|
|
9902
|
-
</div>
|
|
9903
|
-
`, isInline: true, styles: [":host{display:block;width:100%}.ptech-timeline{list-style:none;margin:0;padding:0}.ptech-timeline-item{display:flex;gap:12px;align-items:stretch}.ptech-timeline-marker{display:flex;flex-direction:column;align-items:center;flex:0 0 auto}.ptech-timeline-dot{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;flex:0 0 auto;background:var(--app-chip-bg, rgba(0,0,0,.06));color:var(--app-muted, #6b7280);border:2px solid var(--app-surface, #fff);box-shadow:0 0 0 1px var(--app-border-color, rgba(0,0,0,.12))}.ptech-timeline-dot mat-icon{font-size:18px;width:18px;height:18px}.ptech-timeline-dot--success{background:var(--ptech-timeline-success-bg, color-mix(in srgb, var(--app-status-success, #15803d) 16%, transparent));color:var(--app-status-success, #15803d)}.ptech-timeline-dot--error{background:var(--ptech-timeline-error-bg, color-mix(in srgb, var(--app-status-error, #b91c1c) 16%, transparent));color:var(--app-status-error, #b91c1c)}.ptech-timeline-dot--warning{background:var(--ptech-timeline-warning-bg, color-mix(in srgb, var(--app-status-warning, #92400e) 16%, transparent));color:var(--app-status-warning, #92400e)}.ptech-timeline-dot--info{background:var(--ptech-timeline-info-bg, color-mix(in srgb, var(--app-primary, #3f51b5) 16%, transparent));color:var(--app-primary, #3f51b5)}.ptech-timeline-dot--neutral{background:var(--app-chip-bg, rgba(0,0,0,.06));color:var(--app-muted, #6b7280)}.ptech-timeline-line{flex:1 1 auto;width:2px;min-height:16px;background:var(--app-border-color, rgba(0,0,0,.12));margin:2px 0}.ptech-timeline-content{flex:1 1 auto;min-width:0;padding-bottom:20px}.ptech-timeline-content--clickable{cursor:pointer}.ptech-timeline-content--clickable:hover .ptech-timeline-title{text-decoration:underline}.ptech-timeline-header{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:8px}.ptech-timeline-title{font-weight:600;font-size:14px;color:var(--app-text, inherit)}.ptech-timeline-date{font-size:12px;color:var(--app-muted, #6b7280);white-space:nowrap}.ptech-timeline-subtitle{font-size:13px;font-weight:500;color:var(--app-text, inherit);margin-top:2px}.ptech-timeline-description{font-size:13px;color:var(--app-muted, #6b7280);margin-top:2px;line-height:1.4}.ptech-timeline--compact .ptech-timeline-content{padding-bottom:12px}.ptech-timeline--compact .ptech-timeline-dot{width:24px;height:24px}.ptech-timeline--compact .ptech-timeline-dot mat-icon{font-size:14px;width:14px;height:14px}.ptech-timeline-state{display:flex;align-items:center;justify-content:center;padding:32px 16px;color:var(--app-muted, #6b7280);font-size:13px;text-align:center}.ptech-timeline-state--error{color:var(--app-status-error, #b91c1c)}@media (max-width: 480px){.ptech-timeline-item{gap:8px}.ptech-timeline-header{flex-direction:column;align-items:flex-start;gap:2px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: CoreMaterialModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10274
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PtechLogsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10275
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: PtechLogsComponent, isStandalone: true, selector: "ptech-logs", inputs: { model: "model", updatedLabel: "updatedLabel", atLabel: "atLabel", systemLabel: "systemLabel", dateFormat: "dateFormat", timeFormat: "timeFormat" }, usesOnChanges: true, ngImport: i0, template: `<p class="ptech-log" *ngIf="message">{{ message }}</p>`, isInline: true, styles: [".ptech-log{font-family:var(--ptech-font-family, Poppins, \"Helvetica Neue\", sans-serif);font-size:var(--ptech-log-font-size, 11px);line-height:1.35;color:var(--ptech-log-color, rgba(137, 137, 137, .75));margin:var(--ptech-log-margin, -10px 0 0)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9904
10276
|
}
|
|
9905
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
10277
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PtechLogsComponent, decorators: [{
|
|
9906
10278
|
type: Component,
|
|
9907
|
-
args: [{ selector: 'ptech-
|
|
9908
|
-
|
|
9909
|
-
<li class="ptech-timeline-item" *ngFor="let item of items; let last = last; trackBy: trackByItem">
|
|
9910
|
-
<div class="ptech-timeline-marker">
|
|
9911
|
-
<span class="ptech-timeline-dot" [ngClass]="'ptech-timeline-dot--' + (item.status || 'neutral')">
|
|
9912
|
-
<mat-icon *ngIf="item.icon">{{ item.icon }}</mat-icon>
|
|
9913
|
-
</span>
|
|
9914
|
-
<span class="ptech-timeline-line" *ngIf="!last"></span>
|
|
9915
|
-
</div>
|
|
9916
|
-
|
|
9917
|
-
<div
|
|
9918
|
-
class="ptech-timeline-content"
|
|
9919
|
-
[class.ptech-timeline-content--clickable]="clickable"
|
|
9920
|
-
(click)="onItemClick(item)"
|
|
9921
|
-
>
|
|
9922
|
-
<ng-container *ngIf="itemTemplate; else defaultItem" [ngTemplateOutlet]="itemTemplate"
|
|
9923
|
-
[ngTemplateOutletContext]="{ $implicit: item }"></ng-container>
|
|
9924
|
-
<ng-template #defaultItem>
|
|
9925
|
-
<div class="ptech-timeline-header">
|
|
9926
|
-
<span class="ptech-timeline-title">{{ item.title }}</span>
|
|
9927
|
-
<span class="ptech-timeline-date" *ngIf="item.date">{{ item.date | date:'dd/MM/yyyy HH:mm' }}</span>
|
|
9928
|
-
</div>
|
|
9929
|
-
<div class="ptech-timeline-subtitle" *ngIf="item.subtitle">{{ item.subtitle }}</div>
|
|
9930
|
-
<div class="ptech-timeline-description" *ngIf="item.description">{{ item.description }}</div>
|
|
9931
|
-
</ng-template>
|
|
9932
|
-
</div>
|
|
9933
|
-
</li>
|
|
9934
|
-
</ul>
|
|
9935
|
-
|
|
9936
|
-
<div class="ptech-timeline-state" *ngIf="loading">
|
|
9937
|
-
<mat-spinner diameter="28" mode="indeterminate"></mat-spinner>
|
|
9938
|
-
</div>
|
|
9939
|
-
|
|
9940
|
-
<div class="ptech-timeline-state" *ngIf="!loading && !items?.length && !error">
|
|
9941
|
-
{{ emptyText }}
|
|
9942
|
-
</div>
|
|
9943
|
-
|
|
9944
|
-
<div class="ptech-timeline-state ptech-timeline-state--error" *ngIf="!loading && error">
|
|
9945
|
-
{{ errorText }}
|
|
9946
|
-
</div>
|
|
9947
|
-
`, styles: [":host{display:block;width:100%}.ptech-timeline{list-style:none;margin:0;padding:0}.ptech-timeline-item{display:flex;gap:12px;align-items:stretch}.ptech-timeline-marker{display:flex;flex-direction:column;align-items:center;flex:0 0 auto}.ptech-timeline-dot{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;flex:0 0 auto;background:var(--app-chip-bg, rgba(0,0,0,.06));color:var(--app-muted, #6b7280);border:2px solid var(--app-surface, #fff);box-shadow:0 0 0 1px var(--app-border-color, rgba(0,0,0,.12))}.ptech-timeline-dot mat-icon{font-size:18px;width:18px;height:18px}.ptech-timeline-dot--success{background:var(--ptech-timeline-success-bg, color-mix(in srgb, var(--app-status-success, #15803d) 16%, transparent));color:var(--app-status-success, #15803d)}.ptech-timeline-dot--error{background:var(--ptech-timeline-error-bg, color-mix(in srgb, var(--app-status-error, #b91c1c) 16%, transparent));color:var(--app-status-error, #b91c1c)}.ptech-timeline-dot--warning{background:var(--ptech-timeline-warning-bg, color-mix(in srgb, var(--app-status-warning, #92400e) 16%, transparent));color:var(--app-status-warning, #92400e)}.ptech-timeline-dot--info{background:var(--ptech-timeline-info-bg, color-mix(in srgb, var(--app-primary, #3f51b5) 16%, transparent));color:var(--app-primary, #3f51b5)}.ptech-timeline-dot--neutral{background:var(--app-chip-bg, rgba(0,0,0,.06));color:var(--app-muted, #6b7280)}.ptech-timeline-line{flex:1 1 auto;width:2px;min-height:16px;background:var(--app-border-color, rgba(0,0,0,.12));margin:2px 0}.ptech-timeline-content{flex:1 1 auto;min-width:0;padding-bottom:20px}.ptech-timeline-content--clickable{cursor:pointer}.ptech-timeline-content--clickable:hover .ptech-timeline-title{text-decoration:underline}.ptech-timeline-header{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:8px}.ptech-timeline-title{font-weight:600;font-size:14px;color:var(--app-text, inherit)}.ptech-timeline-date{font-size:12px;color:var(--app-muted, #6b7280);white-space:nowrap}.ptech-timeline-subtitle{font-size:13px;font-weight:500;color:var(--app-text, inherit);margin-top:2px}.ptech-timeline-description{font-size:13px;color:var(--app-muted, #6b7280);margin-top:2px;line-height:1.4}.ptech-timeline--compact .ptech-timeline-content{padding-bottom:12px}.ptech-timeline--compact .ptech-timeline-dot{width:24px;height:24px}.ptech-timeline--compact .ptech-timeline-dot mat-icon{font-size:14px;width:14px;height:14px}.ptech-timeline-state{display:flex;align-items:center;justify-content:center;padding:32px 16px;color:var(--app-muted, #6b7280);font-size:13px;text-align:center}.ptech-timeline-state--error{color:var(--app-status-error, #b91c1c)}@media (max-width: 480px){.ptech-timeline-item{gap:8px}.ptech-timeline-header{flex-direction:column;align-items:flex-start;gap:2px}}\n"] }]
|
|
9948
|
-
}], propDecorators: { items: [{
|
|
9949
|
-
type: Input
|
|
9950
|
-
}], itemTemplate: [{
|
|
9951
|
-
type: Input
|
|
9952
|
-
}], compact: [{
|
|
10279
|
+
args: [{ selector: 'ptech-logs', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `<p class="ptech-log" *ngIf="message">{{ message }}</p>`, styles: [".ptech-log{font-family:var(--ptech-font-family, Poppins, \"Helvetica Neue\", sans-serif);font-size:var(--ptech-log-font-size, 11px);line-height:1.35;color:var(--ptech-log-color, rgba(137, 137, 137, .75));margin:var(--ptech-log-margin, -10px 0 0)}\n"] }]
|
|
10280
|
+
}], propDecorators: { model: [{
|
|
9953
10281
|
type: Input
|
|
9954
|
-
}],
|
|
10282
|
+
}], updatedLabel: [{
|
|
9955
10283
|
type: Input
|
|
9956
|
-
}],
|
|
10284
|
+
}], atLabel: [{
|
|
9957
10285
|
type: Input
|
|
9958
|
-
}],
|
|
10286
|
+
}], systemLabel: [{
|
|
9959
10287
|
type: Input
|
|
9960
|
-
}],
|
|
10288
|
+
}], dateFormat: [{
|
|
9961
10289
|
type: Input
|
|
9962
|
-
}],
|
|
10290
|
+
}], timeFormat: [{
|
|
9963
10291
|
type: Input
|
|
9964
|
-
}], itemClick: [{
|
|
9965
|
-
type: Output
|
|
9966
10292
|
}] } });
|
|
9967
10293
|
|
|
9968
10294
|
class SnackbarMessageService {
|
|
@@ -10012,6 +10338,17 @@ class SnackbarMessageService {
|
|
|
10012
10338
|
duration,
|
|
10013
10339
|
});
|
|
10014
10340
|
}
|
|
10341
|
+
infoMessage(title, message, details, timestamp, duration) {
|
|
10342
|
+
this.openSnackBar({
|
|
10343
|
+
title,
|
|
10344
|
+
message,
|
|
10345
|
+
details,
|
|
10346
|
+
icon: 'info',
|
|
10347
|
+
type: 'info',
|
|
10348
|
+
timestamp,
|
|
10349
|
+
duration,
|
|
10350
|
+
});
|
|
10351
|
+
}
|
|
10015
10352
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SnackbarMessageService, deps: [{ token: i1$4.MatSnackBar }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
10016
10353
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SnackbarMessageService });
|
|
10017
10354
|
}
|
|
@@ -10071,7 +10408,9 @@ class PumpkinTechModule {
|
|
|
10071
10408
|
PtechPopoverComponent,
|
|
10072
10409
|
PtechWidgetMenuComponent,
|
|
10073
10410
|
PtechCarouselComponent,
|
|
10074
|
-
PtechTimelineComponent
|
|
10411
|
+
PtechTimelineComponent,
|
|
10412
|
+
PtechTimezoneClockComponent,
|
|
10413
|
+
PtechLogsComponent], exports: [
|
|
10075
10414
|
// reexporta tudo junto
|
|
10076
10415
|
InputComponent,
|
|
10077
10416
|
TextareaComponent,
|
|
@@ -10120,6 +10459,8 @@ class PumpkinTechModule {
|
|
|
10120
10459
|
PtechWidgetMenuComponent,
|
|
10121
10460
|
PtechCarouselComponent,
|
|
10122
10461
|
PtechTimelineComponent,
|
|
10462
|
+
PtechTimezoneClockComponent,
|
|
10463
|
+
PtechLogsComponent,
|
|
10123
10464
|
CoreMaterialModule] });
|
|
10124
10465
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PumpkinTechModule, providers: [
|
|
10125
10466
|
{
|
|
@@ -10173,7 +10514,9 @@ class PumpkinTechModule {
|
|
|
10173
10514
|
PtechPopoverComponent,
|
|
10174
10515
|
PtechWidgetMenuComponent,
|
|
10175
10516
|
PtechCarouselComponent,
|
|
10176
|
-
PtechTimelineComponent,
|
|
10517
|
+
PtechTimelineComponent,
|
|
10518
|
+
PtechTimezoneClockComponent,
|
|
10519
|
+
PtechLogsComponent, CoreMaterialModule] });
|
|
10177
10520
|
}
|
|
10178
10521
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PumpkinTechModule, decorators: [{
|
|
10179
10522
|
type: NgModule,
|
|
@@ -10228,7 +10571,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
10228
10571
|
PtechPopoverComponent,
|
|
10229
10572
|
PtechWidgetMenuComponent,
|
|
10230
10573
|
PtechCarouselComponent,
|
|
10231
|
-
PtechTimelineComponent
|
|
10574
|
+
PtechTimelineComponent,
|
|
10575
|
+
PtechTimezoneClockComponent,
|
|
10576
|
+
PtechLogsComponent
|
|
10232
10577
|
],
|
|
10233
10578
|
exports: [
|
|
10234
10579
|
// reexporta tudo junto
|
|
@@ -10279,6 +10624,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
10279
10624
|
PtechWidgetMenuComponent,
|
|
10280
10625
|
PtechCarouselComponent,
|
|
10281
10626
|
PtechTimelineComponent,
|
|
10627
|
+
PtechTimezoneClockComponent,
|
|
10628
|
+
PtechLogsComponent,
|
|
10282
10629
|
CoreMaterialModule,
|
|
10283
10630
|
],
|
|
10284
10631
|
providers: [
|
|
@@ -10715,65 +11062,184 @@ class DirectivesModule {
|
|
|
10715
11062
|
TableCellDirective] });
|
|
10716
11063
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DirectivesModule });
|
|
10717
11064
|
}
|
|
10718
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DirectivesModule, decorators: [{
|
|
10719
|
-
type: NgModule,
|
|
11065
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DirectivesModule, decorators: [{
|
|
11066
|
+
type: NgModule,
|
|
11067
|
+
args: [{
|
|
11068
|
+
imports: [
|
|
11069
|
+
UpperCaseDirective,
|
|
11070
|
+
LowerCaseDirective,
|
|
11071
|
+
RedDirective,
|
|
11072
|
+
ClickCatcherDirective,
|
|
11073
|
+
ForDirective,
|
|
11074
|
+
PhoneMaskBrazilDirective,
|
|
11075
|
+
PhoneMaskSpainDirective,
|
|
11076
|
+
SpaceDropDirective,
|
|
11077
|
+
DateMaskDirective,
|
|
11078
|
+
DynamicTabDirective,
|
|
11079
|
+
PtechGridDirective,
|
|
11080
|
+
PtechColDirective,
|
|
11081
|
+
TableCellDirective
|
|
11082
|
+
],
|
|
11083
|
+
exports: [
|
|
11084
|
+
UpperCaseDirective,
|
|
11085
|
+
LowerCaseDirective,
|
|
11086
|
+
RedDirective,
|
|
11087
|
+
ClickCatcherDirective,
|
|
11088
|
+
ForDirective,
|
|
11089
|
+
PhoneMaskBrazilDirective,
|
|
11090
|
+
PhoneMaskSpainDirective,
|
|
11091
|
+
SpaceDropDirective,
|
|
11092
|
+
DateMaskDirective,
|
|
11093
|
+
DynamicTabDirective,
|
|
11094
|
+
PtechGridDirective,
|
|
11095
|
+
PtechColDirective,
|
|
11096
|
+
TableCellDirective
|
|
11097
|
+
]
|
|
11098
|
+
}]
|
|
11099
|
+
}] });
|
|
11100
|
+
|
|
11101
|
+
class CurrencyBrlPipe {
|
|
11102
|
+
currencyPipe = inject(CurrencyPipe);
|
|
11103
|
+
transform(value, symbolDisplay = true) {
|
|
11104
|
+
if (value === null || value === undefined || value === '') {
|
|
11105
|
+
return null;
|
|
11106
|
+
}
|
|
11107
|
+
const numeric = typeof value === 'number' ? value : parseFloat(String(value).replace(',', '.'));
|
|
11108
|
+
if (isNaN(numeric)) {
|
|
11109
|
+
return null;
|
|
11110
|
+
}
|
|
11111
|
+
return this.currencyPipe.transform(numeric, 'BRL', symbolDisplay ? 'symbol' : 'code', '1.2-2', 'pt-BR');
|
|
11112
|
+
}
|
|
11113
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CurrencyBrlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
11114
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: CurrencyBrlPipe, isStandalone: true, name: "currencybrl" });
|
|
11115
|
+
}
|
|
11116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CurrencyBrlPipe, decorators: [{
|
|
11117
|
+
type: Pipe,
|
|
11118
|
+
args: [{
|
|
11119
|
+
name: 'currencybrl',
|
|
11120
|
+
standalone: true,
|
|
11121
|
+
pure: true
|
|
11122
|
+
}]
|
|
11123
|
+
}] });
|
|
11124
|
+
|
|
11125
|
+
// currency-preference.service.ts
|
|
11126
|
+
const CURRENCY_KEY = 'currency_preference';
|
|
11127
|
+
const DEFAULT_CURRENCY = 'EUR';
|
|
11128
|
+
const CURRENCY_MAP = {
|
|
11129
|
+
EUR: {
|
|
11130
|
+
symbol: '€',
|
|
11131
|
+
thousandSeparator: '.',
|
|
11132
|
+
decimalMarker: ',',
|
|
11133
|
+
placeholder: '0,00',
|
|
11134
|
+
locale: 'de-DE', // uso de padrão europeu para vírgula decimal
|
|
11135
|
+
},
|
|
11136
|
+
USD: {
|
|
11137
|
+
symbol: '$',
|
|
11138
|
+
thousandSeparator: ',',
|
|
11139
|
+
decimalMarker: '.',
|
|
11140
|
+
placeholder: '0.00',
|
|
11141
|
+
locale: 'en-US',
|
|
11142
|
+
},
|
|
11143
|
+
BRL: {
|
|
11144
|
+
symbol: 'R$',
|
|
11145
|
+
thousandSeparator: '.',
|
|
11146
|
+
decimalMarker: ',',
|
|
11147
|
+
placeholder: '0,00',
|
|
11148
|
+
locale: 'pt-BR',
|
|
11149
|
+
},
|
|
11150
|
+
};
|
|
11151
|
+
class CurrencyPreferenceService {
|
|
11152
|
+
_currency = DEFAULT_CURRENCY;
|
|
11153
|
+
_subject = new BehaviorSubject(DEFAULT_CURRENCY);
|
|
11154
|
+
currency$ = this._subject.asObservable();
|
|
11155
|
+
constructor() {
|
|
11156
|
+
this.loadInitialCurrency();
|
|
11157
|
+
}
|
|
11158
|
+
loadInitialCurrency() {
|
|
11159
|
+
const stored = localStorage.getItem(CURRENCY_KEY);
|
|
11160
|
+
if (stored && this.isSupported(stored)) {
|
|
11161
|
+
this._setCurrencyInternal(stored);
|
|
11162
|
+
}
|
|
11163
|
+
else {
|
|
11164
|
+
// opcional: inferir da locale do navegador
|
|
11165
|
+
// const inferred = navigator.language.startsWith('pt') ? 'BRL' : 'EUR';
|
|
11166
|
+
this._setCurrencyInternal(this._currency);
|
|
11167
|
+
}
|
|
11168
|
+
}
|
|
11169
|
+
isSupported(code) {
|
|
11170
|
+
return code in CURRENCY_MAP;
|
|
11171
|
+
}
|
|
11172
|
+
_setCurrencyInternal(newCurrency) {
|
|
11173
|
+
this._currency = newCurrency;
|
|
11174
|
+
this._subject.next(newCurrency);
|
|
11175
|
+
}
|
|
11176
|
+
getCurrency() {
|
|
11177
|
+
return this._currency;
|
|
11178
|
+
}
|
|
11179
|
+
setCurrency(newCurrency) {
|
|
11180
|
+
if (!this.isSupported(newCurrency)) {
|
|
11181
|
+
console.warn(`Currency ${newCurrency} not supported. Falling back to default.`);
|
|
11182
|
+
newCurrency = DEFAULT_CURRENCY;
|
|
11183
|
+
}
|
|
11184
|
+
this._setCurrencyInternal(newCurrency);
|
|
11185
|
+
localStorage.setItem(CURRENCY_KEY, newCurrency);
|
|
11186
|
+
}
|
|
11187
|
+
getCurrencySymbol() {
|
|
11188
|
+
return CURRENCY_MAP[this._currency].symbol;
|
|
11189
|
+
}
|
|
11190
|
+
getThousandSeparator() {
|
|
11191
|
+
return CURRENCY_MAP[this._currency].thousandSeparator;
|
|
11192
|
+
}
|
|
11193
|
+
getDecimalMarker() {
|
|
11194
|
+
return CURRENCY_MAP[this._currency].decimalMarker;
|
|
11195
|
+
}
|
|
11196
|
+
getPlaceholder() {
|
|
11197
|
+
return CURRENCY_MAP[this._currency].placeholder;
|
|
11198
|
+
}
|
|
11199
|
+
formatAmount(value, options) {
|
|
11200
|
+
const meta = CURRENCY_MAP[this._currency];
|
|
11201
|
+
const formatter = new Intl.NumberFormat(meta.locale, {
|
|
11202
|
+
style: 'currency',
|
|
11203
|
+
currency: this._currency === 'BRL' ? 'BRL' : this._currency, // map if codes diferem
|
|
11204
|
+
minimumFractionDigits: options?.minimumFractionDigits ?? 2,
|
|
11205
|
+
maximumFractionDigits: options?.maximumFractionDigits ?? 2,
|
|
11206
|
+
currencyDisplay: options?.useSymbol === false ? 'code' : 'symbol',
|
|
11207
|
+
});
|
|
11208
|
+
return formatter.format(value);
|
|
11209
|
+
}
|
|
11210
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CurrencyPreferenceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11211
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CurrencyPreferenceService, providedIn: 'root' });
|
|
11212
|
+
}
|
|
11213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CurrencyPreferenceService, decorators: [{
|
|
11214
|
+
type: Injectable,
|
|
10720
11215
|
args: [{
|
|
10721
|
-
|
|
10722
|
-
UpperCaseDirective,
|
|
10723
|
-
LowerCaseDirective,
|
|
10724
|
-
RedDirective,
|
|
10725
|
-
ClickCatcherDirective,
|
|
10726
|
-
ForDirective,
|
|
10727
|
-
PhoneMaskBrazilDirective,
|
|
10728
|
-
PhoneMaskSpainDirective,
|
|
10729
|
-
SpaceDropDirective,
|
|
10730
|
-
DateMaskDirective,
|
|
10731
|
-
DynamicTabDirective,
|
|
10732
|
-
PtechGridDirective,
|
|
10733
|
-
PtechColDirective,
|
|
10734
|
-
TableCellDirective
|
|
10735
|
-
],
|
|
10736
|
-
exports: [
|
|
10737
|
-
UpperCaseDirective,
|
|
10738
|
-
LowerCaseDirective,
|
|
10739
|
-
RedDirective,
|
|
10740
|
-
ClickCatcherDirective,
|
|
10741
|
-
ForDirective,
|
|
10742
|
-
PhoneMaskBrazilDirective,
|
|
10743
|
-
PhoneMaskSpainDirective,
|
|
10744
|
-
SpaceDropDirective,
|
|
10745
|
-
DateMaskDirective,
|
|
10746
|
-
DynamicTabDirective,
|
|
10747
|
-
PtechGridDirective,
|
|
10748
|
-
PtechColDirective,
|
|
10749
|
-
TableCellDirective
|
|
10750
|
-
]
|
|
11216
|
+
providedIn: 'root',
|
|
10751
11217
|
}]
|
|
10752
|
-
}] });
|
|
11218
|
+
}], ctorParameters: () => [] });
|
|
10753
11219
|
|
|
10754
|
-
class
|
|
10755
|
-
|
|
10756
|
-
|
|
10757
|
-
|
|
10758
|
-
return null;
|
|
10759
|
-
}
|
|
10760
|
-
const numeric = typeof value === 'number' ? value : parseFloat(String(value).replace(',', '.'));
|
|
10761
|
-
if (isNaN(numeric)) {
|
|
10762
|
-
return null;
|
|
10763
|
-
}
|
|
10764
|
-
return this.currencyPipe.transform(numeric, 'BRL', symbolDisplay ? 'symbol' : 'code', '1.2-2', 'pt-BR');
|
|
11220
|
+
class PtechCurrencyPipe {
|
|
11221
|
+
currencyPreferenceService;
|
|
11222
|
+
constructor(currencyPreferenceService) {
|
|
11223
|
+
this.currencyPreferenceService = currencyPreferenceService;
|
|
10765
11224
|
}
|
|
10766
|
-
|
|
10767
|
-
|
|
11225
|
+
transform(value, minimumFractionDigits = 2, maximumFractionDigits = 2, useSymbol = true) {
|
|
11226
|
+
return this.currencyPreferenceService.formatAmount(value ?? 0, {
|
|
11227
|
+
minimumFractionDigits,
|
|
11228
|
+
maximumFractionDigits,
|
|
11229
|
+
useSymbol,
|
|
11230
|
+
});
|
|
11231
|
+
}
|
|
11232
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PtechCurrencyPipe, deps: [{ token: CurrencyPreferenceService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
11233
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PtechCurrencyPipe, isStandalone: true, name: "ptechCurrency", pure: false });
|
|
10768
11234
|
}
|
|
10769
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
11235
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PtechCurrencyPipe, decorators: [{
|
|
10770
11236
|
type: Pipe,
|
|
10771
11237
|
args: [{
|
|
10772
|
-
name: '
|
|
11238
|
+
name: 'ptechCurrency',
|
|
10773
11239
|
standalone: true,
|
|
10774
|
-
pure:
|
|
11240
|
+
pure: false,
|
|
10775
11241
|
}]
|
|
10776
|
-
}] });
|
|
11242
|
+
}], ctorParameters: () => [{ type: CurrencyPreferenceService }] });
|
|
10777
11243
|
|
|
10778
11244
|
class DateAgoPipe {
|
|
10779
11245
|
intervals = {
|
|
@@ -11109,6 +11575,7 @@ class PipesModule {
|
|
|
11109
11575
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
11110
11576
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: PipesModule, imports: [CommonModule,
|
|
11111
11577
|
CurrencyBrlPipe,
|
|
11578
|
+
PtechCurrencyPipe,
|
|
11112
11579
|
DateAgoPipe,
|
|
11113
11580
|
GetFirstStringBeforeSpacePipe,
|
|
11114
11581
|
LineBreakAfterPeriodPipe,
|
|
@@ -11119,6 +11586,7 @@ class PipesModule {
|
|
|
11119
11586
|
UptimeFormatPipe,
|
|
11120
11587
|
TimeDurationPipe,
|
|
11121
11588
|
IsLongerThanPipe], exports: [CurrencyBrlPipe,
|
|
11589
|
+
PtechCurrencyPipe,
|
|
11122
11590
|
DateAgoPipe,
|
|
11123
11591
|
GetFirstStringBeforeSpacePipe,
|
|
11124
11592
|
LineBreakAfterPeriodPipe,
|
|
@@ -11137,6 +11605,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
11137
11605
|
imports: [
|
|
11138
11606
|
CommonModule,
|
|
11139
11607
|
CurrencyBrlPipe,
|
|
11608
|
+
PtechCurrencyPipe,
|
|
11140
11609
|
DateAgoPipe,
|
|
11141
11610
|
GetFirstStringBeforeSpacePipe,
|
|
11142
11611
|
LineBreakAfterPeriodPipe,
|
|
@@ -11150,6 +11619,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
11150
11619
|
],
|
|
11151
11620
|
exports: [
|
|
11152
11621
|
CurrencyBrlPipe,
|
|
11622
|
+
PtechCurrencyPipe,
|
|
11153
11623
|
DateAgoPipe,
|
|
11154
11624
|
GetFirstStringBeforeSpacePipe,
|
|
11155
11625
|
LineBreakAfterPeriodPipe,
|
|
@@ -11218,19 +11688,6 @@ class DialogService {
|
|
|
11218
11688
|
width,
|
|
11219
11689
|
});
|
|
11220
11690
|
}
|
|
11221
|
-
confirm(confirmation, width = '400px') {
|
|
11222
|
-
const ref = this.open({
|
|
11223
|
-
component: ConfirmationDialogComponent,
|
|
11224
|
-
data: confirmation,
|
|
11225
|
-
width,
|
|
11226
|
-
disableClose: true,
|
|
11227
|
-
});
|
|
11228
|
-
return ref.afterClosed().pipe(tap((isAccepted) => {
|
|
11229
|
-
if (isAccepted) {
|
|
11230
|
-
confirmation.accept();
|
|
11231
|
-
}
|
|
11232
|
-
}), map((isAccepted) => !!isAccepted));
|
|
11233
|
-
}
|
|
11234
11691
|
/**
|
|
11235
11692
|
* Abre um ActionDialog e, se houver resultado, usa o builder para criar
|
|
11236
11693
|
* o ActionResultData e abre o resultado.
|
|
@@ -11254,6 +11711,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
11254
11711
|
}]
|
|
11255
11712
|
}], ctorParameters: () => [{ type: i1$3.MatDialog }] });
|
|
11256
11713
|
|
|
11714
|
+
/**
|
|
11715
|
+
* The single entry point consuming apps use for a destructive/confirmation prompt - opens
|
|
11716
|
+
* PtechConfirmationDialogComponent (itself just ptech-dialog-shell + ptech-button) and hands
|
|
11717
|
+
* back an Observable<boolean> instead of taking an accept/cancel callback pair, so the dialog
|
|
11718
|
+
* carries no application logic and the caller reads the result the same way it would from
|
|
11719
|
+
* MatDialogRef.afterClosed().
|
|
11720
|
+
*/
|
|
11721
|
+
class PtechConfirmationService {
|
|
11722
|
+
dialog;
|
|
11723
|
+
constructor(dialog) {
|
|
11724
|
+
this.dialog = dialog;
|
|
11725
|
+
}
|
|
11726
|
+
confirm(options, width = '440px') {
|
|
11727
|
+
const ref = this.dialog.open(PtechConfirmationDialogComponent, {
|
|
11728
|
+
data: options,
|
|
11729
|
+
width,
|
|
11730
|
+
maxWidth: '96vw',
|
|
11731
|
+
panelClass: 'ptech-dialog-panel',
|
|
11732
|
+
disableClose: options.disableClose ?? false,
|
|
11733
|
+
autoFocus: false,
|
|
11734
|
+
restoreFocus: false,
|
|
11735
|
+
});
|
|
11736
|
+
return ref.afterClosed().pipe(map(confirmed => !!confirmed));
|
|
11737
|
+
}
|
|
11738
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PtechConfirmationService, deps: [{ token: i1$3.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11739
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PtechConfirmationService, providedIn: 'root' });
|
|
11740
|
+
}
|
|
11741
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PtechConfirmationService, decorators: [{
|
|
11742
|
+
type: Injectable,
|
|
11743
|
+
args: [{ providedIn: 'root' }]
|
|
11744
|
+
}], ctorParameters: () => [{ type: i1$3.MatDialog }] });
|
|
11745
|
+
|
|
11257
11746
|
class ModuleChangeService {
|
|
11258
11747
|
moduleChangedSource = new BehaviorSubject('');
|
|
11259
11748
|
moduleChanged$ = this.moduleChangedSource.asObservable();
|
|
@@ -11270,101 +11759,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
11270
11759
|
}]
|
|
11271
11760
|
}] });
|
|
11272
11761
|
|
|
11273
|
-
// currency-preference.service.ts
|
|
11274
|
-
const CURRENCY_KEY = 'currency_preference';
|
|
11275
|
-
const DEFAULT_CURRENCY = 'EUR';
|
|
11276
|
-
const CURRENCY_MAP = {
|
|
11277
|
-
EUR: {
|
|
11278
|
-
symbol: '€',
|
|
11279
|
-
thousandSeparator: '.',
|
|
11280
|
-
decimalMarker: ',',
|
|
11281
|
-
placeholder: '0,00',
|
|
11282
|
-
locale: 'de-DE', // uso de padrão europeu para vírgula decimal
|
|
11283
|
-
},
|
|
11284
|
-
USD: {
|
|
11285
|
-
symbol: '$',
|
|
11286
|
-
thousandSeparator: ',',
|
|
11287
|
-
decimalMarker: '.',
|
|
11288
|
-
placeholder: '0.00',
|
|
11289
|
-
locale: 'en-US',
|
|
11290
|
-
},
|
|
11291
|
-
BRL: {
|
|
11292
|
-
symbol: 'R$',
|
|
11293
|
-
thousandSeparator: '.',
|
|
11294
|
-
decimalMarker: ',',
|
|
11295
|
-
placeholder: '0,00',
|
|
11296
|
-
locale: 'pt-BR',
|
|
11297
|
-
},
|
|
11298
|
-
};
|
|
11299
|
-
class CurrencyPreferenceService {
|
|
11300
|
-
_currency = DEFAULT_CURRENCY;
|
|
11301
|
-
_subject = new BehaviorSubject(DEFAULT_CURRENCY);
|
|
11302
|
-
currency$ = this._subject.asObservable();
|
|
11303
|
-
constructor() {
|
|
11304
|
-
this.loadInitialCurrency();
|
|
11305
|
-
}
|
|
11306
|
-
loadInitialCurrency() {
|
|
11307
|
-
const stored = localStorage.getItem(CURRENCY_KEY);
|
|
11308
|
-
if (stored && this.isSupported(stored)) {
|
|
11309
|
-
this._setCurrencyInternal(stored);
|
|
11310
|
-
}
|
|
11311
|
-
else {
|
|
11312
|
-
// opcional: inferir da locale do navegador
|
|
11313
|
-
// const inferred = navigator.language.startsWith('pt') ? 'BRL' : 'EUR';
|
|
11314
|
-
this._setCurrencyInternal(this._currency);
|
|
11315
|
-
}
|
|
11316
|
-
}
|
|
11317
|
-
isSupported(code) {
|
|
11318
|
-
return code in CURRENCY_MAP;
|
|
11319
|
-
}
|
|
11320
|
-
_setCurrencyInternal(newCurrency) {
|
|
11321
|
-
this._currency = newCurrency;
|
|
11322
|
-
this._subject.next(newCurrency);
|
|
11323
|
-
}
|
|
11324
|
-
getCurrency() {
|
|
11325
|
-
return this._currency;
|
|
11326
|
-
}
|
|
11327
|
-
setCurrency(newCurrency) {
|
|
11328
|
-
if (!this.isSupported(newCurrency)) {
|
|
11329
|
-
console.warn(`Currency ${newCurrency} not supported. Falling back to default.`);
|
|
11330
|
-
newCurrency = DEFAULT_CURRENCY;
|
|
11331
|
-
}
|
|
11332
|
-
this._setCurrencyInternal(newCurrency);
|
|
11333
|
-
localStorage.setItem(CURRENCY_KEY, newCurrency);
|
|
11334
|
-
}
|
|
11335
|
-
getCurrencySymbol() {
|
|
11336
|
-
return CURRENCY_MAP[this._currency].symbol;
|
|
11337
|
-
}
|
|
11338
|
-
getThousandSeparator() {
|
|
11339
|
-
return CURRENCY_MAP[this._currency].thousandSeparator;
|
|
11340
|
-
}
|
|
11341
|
-
getDecimalMarker() {
|
|
11342
|
-
return CURRENCY_MAP[this._currency].decimalMarker;
|
|
11343
|
-
}
|
|
11344
|
-
getPlaceholder() {
|
|
11345
|
-
return CURRENCY_MAP[this._currency].placeholder;
|
|
11346
|
-
}
|
|
11347
|
-
formatAmount(value, options) {
|
|
11348
|
-
const meta = CURRENCY_MAP[this._currency];
|
|
11349
|
-
const formatter = new Intl.NumberFormat(meta.locale, {
|
|
11350
|
-
style: 'currency',
|
|
11351
|
-
currency: this._currency === 'BRL' ? 'BRL' : this._currency, // map if codes diferem
|
|
11352
|
-
minimumFractionDigits: options?.minimumFractionDigits ?? 2,
|
|
11353
|
-
maximumFractionDigits: options?.maximumFractionDigits ?? 2,
|
|
11354
|
-
currencyDisplay: options?.useSymbol === false ? 'code' : 'symbol',
|
|
11355
|
-
});
|
|
11356
|
-
return formatter.format(value);
|
|
11357
|
-
}
|
|
11358
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CurrencyPreferenceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11359
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CurrencyPreferenceService, providedIn: 'root' });
|
|
11360
|
-
}
|
|
11361
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CurrencyPreferenceService, decorators: [{
|
|
11362
|
-
type: Injectable,
|
|
11363
|
-
args: [{
|
|
11364
|
-
providedIn: 'root',
|
|
11365
|
-
}]
|
|
11366
|
-
}], ctorParameters: () => [] });
|
|
11367
|
-
|
|
11368
11762
|
/**
|
|
11369
11763
|
* Se o app consumidor quiser inserir dinamicamente
|
|
11370
11764
|
* o crumb de “módulo” (ou qualquer outro prefixo),
|
|
@@ -11450,84 +11844,6 @@ class NumberUtil {
|
|
|
11450
11844
|
}
|
|
11451
11845
|
}
|
|
11452
11846
|
|
|
11453
|
-
// src/lib/utils/date.util.ts
|
|
11454
|
-
class DateUtil {
|
|
11455
|
-
static DATE_FORMAT = 'dd/MM/yyyy';
|
|
11456
|
-
static DATE_TIME_FORMAT = 'dd/MM/yyyy HH:mm';
|
|
11457
|
-
static DATE_TIME_FORMAT_SLICED = 'dd/MM/yy HH:mm';
|
|
11458
|
-
static DATE_TIME_FULL_FORMAT = 'dd/MM/yyyy HH:mm:ss';
|
|
11459
|
-
/**
|
|
11460
|
-
* Aceita Date | string | undefined. Retorna string formatada ou vazio.
|
|
11461
|
-
*/
|
|
11462
|
-
static format(value, format) {
|
|
11463
|
-
if (!value)
|
|
11464
|
-
return StringUtil.EMPTY;
|
|
11465
|
-
const dateObj = typeof value === 'string' ? new Date(value) : value;
|
|
11466
|
-
if (dateObj instanceof Date && !isNaN(dateObj.getTime())) {
|
|
11467
|
-
return formatDate(dateObj, format, 'pt-BR');
|
|
11468
|
-
}
|
|
11469
|
-
return StringUtil.EMPTY;
|
|
11470
|
-
}
|
|
11471
|
-
static getTotalDaysInMonth(month, year) {
|
|
11472
|
-
const date = new Date(year, month - 1, 1);
|
|
11473
|
-
date.setMonth(date.getMonth() + 1);
|
|
11474
|
-
date.setDate(date.getDate() - 1);
|
|
11475
|
-
return date.getDate();
|
|
11476
|
-
}
|
|
11477
|
-
static addMonthsToDate(date, monthsToAdd) {
|
|
11478
|
-
const resultDate = new Date(date);
|
|
11479
|
-
resultDate.setMonth(resultDate.getMonth() + monthsToAdd);
|
|
11480
|
-
return resultDate;
|
|
11481
|
-
}
|
|
11482
|
-
static addDaysToDate(days, date) {
|
|
11483
|
-
const result = new Date(date);
|
|
11484
|
-
result.setDate(result.getDate() + days);
|
|
11485
|
-
return result;
|
|
11486
|
-
}
|
|
11487
|
-
static isValid(value) {
|
|
11488
|
-
if (value === null || value === undefined)
|
|
11489
|
-
return false;
|
|
11490
|
-
const date = typeof value === 'string' ? new Date(value) : value;
|
|
11491
|
-
return date instanceof Date && !isNaN(date.getTime());
|
|
11492
|
-
}
|
|
11493
|
-
static isGreaterThan(initial, final) {
|
|
11494
|
-
const i = new Date(initial);
|
|
11495
|
-
const f = new Date(final);
|
|
11496
|
-
return this.isValid(i) && this.isValid(f) && i > f;
|
|
11497
|
-
}
|
|
11498
|
-
static isLessThan(initial, final) {
|
|
11499
|
-
const i = new Date(initial);
|
|
11500
|
-
const f = new Date(final);
|
|
11501
|
-
return this.isValid(i) && this.isValid(f) && i < f;
|
|
11502
|
-
}
|
|
11503
|
-
static isBetween(date, initial, final) {
|
|
11504
|
-
const d = new Date(date);
|
|
11505
|
-
const i = new Date(initial);
|
|
11506
|
-
const f = new Date(final);
|
|
11507
|
-
return this.isValid(d) && this.isValid(i) && this.isValid(f) && d >= i && d <= f;
|
|
11508
|
-
}
|
|
11509
|
-
static getDayOfWeek(date) {
|
|
11510
|
-
// getDay returns 0=Sunday
|
|
11511
|
-
switch (date.getDay()) {
|
|
11512
|
-
case 0:
|
|
11513
|
-
return 'SUNDAY';
|
|
11514
|
-
case 1:
|
|
11515
|
-
return 'MONDAY';
|
|
11516
|
-
case 2:
|
|
11517
|
-
return 'TUESDAY';
|
|
11518
|
-
case 3:
|
|
11519
|
-
return 'WEDNESDAY';
|
|
11520
|
-
case 4:
|
|
11521
|
-
return 'THURSDAY';
|
|
11522
|
-
case 5:
|
|
11523
|
-
return 'FRIDAY';
|
|
11524
|
-
case 6:
|
|
11525
|
-
return 'SATURDAY';
|
|
11526
|
-
}
|
|
11527
|
-
return '';
|
|
11528
|
-
}
|
|
11529
|
-
}
|
|
11530
|
-
|
|
11531
11847
|
// src/lib/utils/currency.util.ts
|
|
11532
11848
|
class CurrencyUtil {
|
|
11533
11849
|
/**
|
|
@@ -11651,6 +11967,18 @@ class UuidUtil {
|
|
|
11651
11967
|
}
|
|
11652
11968
|
}
|
|
11653
11969
|
|
|
11970
|
+
// src/lib/utils/email.util.ts
|
|
11971
|
+
class EmailUtil {
|
|
11972
|
+
static ALLOWED_TLDS = [
|
|
11973
|
+
'org', '.com', '.br', '.net', '.pt', '.io', '.ru', '.uk', '.fr',
|
|
11974
|
+
'.de', '.tk', '.info', '.nl', '.eu', '.it', '.au',
|
|
11975
|
+
];
|
|
11976
|
+
static isValid(value) {
|
|
11977
|
+
const regex = /^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
|
|
11978
|
+
return regex.test(value) && this.ALLOWED_TLDS.some(tld => value.includes(tld));
|
|
11979
|
+
}
|
|
11980
|
+
}
|
|
11981
|
+
|
|
11654
11982
|
// src/lib/mock/fake-data.service.ts
|
|
11655
11983
|
class FakeDataService {
|
|
11656
11984
|
DEFAULT_PASSWORD_OPTIONS = {
|
|
@@ -11723,5 +12051,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
11723
12051
|
* Generated bundle index. Do not edit.
|
|
11724
12052
|
*/
|
|
11725
12053
|
|
|
11726
|
-
export { ActionDialogComponent, ActionResultDialogComponent, ActionRowComponent, AlertComponent, ArrayUtil, BREADCRUMB_PREFIX$, BadgeComponent, BadgeStackComponent, BreadcrumbComponent, BreadcrumbService, ButtonComponent, CardComponent, CheckBoxComponent, ClickCatcherDirective,
|
|
12054
|
+
export { ActionDialogComponent, ActionResultDialogComponent, ActionRowComponent, AlertComponent, ArrayUtil, BREADCRUMB_PREFIX$, BadgeComponent, BadgeStackComponent, BreadcrumbComponent, BreadcrumbService, ButtonComponent, CardComponent, CheckBoxComponent, ClickCatcherDirective, CoreMaterialModule, CurrencyBrlPipe, CurrencyPreferenceService, CurrencyUtil, DateAgoPipe, DateMaskDirective, DateUtil, DefaultConsoleMessageService, DefaultMessageService, DialogService, DialogShellComponent, DirectivesModule, DocumentUtil, DynamicTabDirective, EmailUtil, ExpansionPanelComponent, FakeDataService, FlagComponent, FooterComponent, ForDirective, GetFirstStringBeforeSpacePipe, HeaderComponent, IconComponent, InfoDetailComponent, InfoDetailDialogComponent, InputComponent, InputCurrencyComponent, InputDateComponent, InputDateRangeComponent, InputTimeComponent, IsLongerThanPipe, LineBreakAfterPeriodPipe, LineBreakAfterPipe, ListPaginationComponent, LoadingOverlayComponent, LoadingService, LowerCaseDirective, MESSAGE_SERVICE, MY_DATE_FORMATS, MemoryFormatPipe, ModuleChangeService, NavComponent, NavService, NumberUtil, ObjectUtil, PhoneBrazilPipe, PhoneMaskBrazilDirective, PhoneMaskSpainDirective, PhoneSpainPipe, PipesModule, ProfileMenuComponent, ProgressBarComponent, ProgressBarMultipleComponent, PtechAutocompleteComponent, PtechCarouselComponent, PtechColDirective, PtechConfirmationDialogComponent, PtechConfirmationService, PtechCurrencyPipe, PtechDualListboxComponent, PtechGridDirective, PtechInputFileComponent, PtechLogsComponent, PtechPopoverComponent, PtechTabComponent, PtechTableColumnBuilder, PtechTabsComponent, PtechTimelineComponent, PtechTimezoneClockComponent, PtechWidgetMenuComponent, PumpkinTechModule, QuantityItemsComponent, RadioGroupEntityComponent, RadioGroupEnumComponent, RedDirective, SelectEntityComponent, SelectEnumComponent, SelectQuantityItemsComponent, SlideToggleComponent, SnackbarMessageService, SpaceDropDirective, StringUtil, TableCellDirective, TableComponent, TextareaComponent, TimeDurationPipe, TitleComponent, UpperCaseDirective, UptimeFormatPipe, UuidUtil };
|
|
11727
12055
|
//# sourceMappingURL=pumpkin-tech-pumpkin-tech-ng.mjs.map
|