keevo-components 1.8.457 → 1.8.459
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/esm2022/lib/api/base-components/base-component-dropdown.mjs +2 -3
- package/esm2022/lib/api/services/image.cutter.service.mjs +71 -455
- package/esm2022/lib/components/kv-inputs/kv-tree-multi-select/kv-tree-multi-select.component.mjs +3 -3
- package/fesm2022/keevo-components.mjs +79 -459
- package/fesm2022/keevo-components.mjs.map +1 -1
- package/package.json +3 -2
|
@@ -48,16 +48,14 @@ import * as i1$4 from '@angular/common/http';
|
|
|
48
48
|
import { HttpHeaders } from '@angular/common/http';
|
|
49
49
|
import { filter as filter$1 } from 'rxjs/operators';
|
|
50
50
|
import { DialogModule } from 'primeng/dialog';
|
|
51
|
-
import
|
|
52
|
-
import { SliderModule } from 'primeng/slider';
|
|
53
|
-
import { FileUploadModule } from 'primeng/fileupload';
|
|
51
|
+
import { ImageCropperComponent } from 'ngx-image-cropper';
|
|
54
52
|
import { AccordionModule } from 'primeng/accordion';
|
|
55
53
|
import { BadgeModule } from 'primeng/badge';
|
|
56
54
|
import * as i5$9 from 'primeng/breadcrumb';
|
|
57
55
|
import { BreadcrumbModule } from 'primeng/breadcrumb';
|
|
58
56
|
import * as i5$4 from 'primeng/calendar';
|
|
59
57
|
import { CalendarModule } from 'primeng/calendar';
|
|
60
|
-
import * as i2$
|
|
58
|
+
import * as i2$2 from 'primeng/carousel';
|
|
61
59
|
import { CarouselModule, Carousel } from 'primeng/carousel';
|
|
62
60
|
import { ChipModule } from 'primeng/chip';
|
|
63
61
|
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
@@ -65,8 +63,9 @@ import * as i7$3 from 'primeng/contextmenu';
|
|
|
65
63
|
import { ContextMenuModule } from 'primeng/contextmenu';
|
|
66
64
|
import { DataViewModule } from 'primeng/dataview';
|
|
67
65
|
import { EditorModule } from 'primeng/editor';
|
|
68
|
-
import * as i2$
|
|
66
|
+
import * as i2$4 from 'primeng/fieldset';
|
|
69
67
|
import { FieldsetModule } from 'primeng/fieldset';
|
|
68
|
+
import { FileUploadModule } from 'primeng/fileupload';
|
|
70
69
|
import { ImageModule } from 'primeng/image';
|
|
71
70
|
import * as i5$5 from 'primeng/inputmask';
|
|
72
71
|
import { InputMaskModule } from 'primeng/inputmask';
|
|
@@ -107,7 +106,7 @@ import { ToastModule } from 'primeng/toast';
|
|
|
107
106
|
import { ToolbarModule } from 'primeng/toolbar';
|
|
108
107
|
import * as i1$6 from 'primeng/tree';
|
|
109
108
|
import { TreeModule } from 'primeng/tree';
|
|
110
|
-
import * as i2$
|
|
109
|
+
import * as i2$3 from 'primeng/selectbutton';
|
|
111
110
|
import { SelectButtonModule } from 'primeng/selectbutton';
|
|
112
111
|
import * as i3$2 from 'primeng/stepper';
|
|
113
112
|
import { StepperModule } from 'primeng/stepper';
|
|
@@ -115,6 +114,7 @@ import { InputGroupModule } from 'primeng/inputgroup';
|
|
|
115
114
|
import { InputGroupAddonModule } from 'primeng/inputgroupaddon';
|
|
116
115
|
import * as i7$2 from 'primeng/treeselect';
|
|
117
116
|
import { TreeSelectModule } from 'primeng/treeselect';
|
|
117
|
+
import { SliderModule } from 'primeng/slider';
|
|
118
118
|
import * as i1$5 from 'ngx-loading';
|
|
119
119
|
import { NgxLoadingModule } from 'ngx-loading';
|
|
120
120
|
import Quill from 'quill';
|
|
@@ -2570,8 +2570,7 @@ class BaseComponentDropDown extends BaseComponentInput {
|
|
|
2570
2570
|
}
|
|
2571
2571
|
onInputFilter(event) {
|
|
2572
2572
|
if (event) {
|
|
2573
|
-
|
|
2574
|
-
this.onFilter.emit(event.filter);
|
|
2573
|
+
this.onFilter.emit(event.filter);
|
|
2575
2574
|
if (event.filter) {
|
|
2576
2575
|
if (event.filter.length > 2) {
|
|
2577
2576
|
let fil = { termoPesquisa: event.filter };
|
|
@@ -4261,158 +4260,39 @@ class ImageCutterService {
|
|
|
4261
4260
|
}
|
|
4262
4261
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: ImageCutterService, decorators: [{
|
|
4263
4262
|
type: Injectable,
|
|
4264
|
-
args: [{
|
|
4265
|
-
providedIn: 'root'
|
|
4266
|
-
}]
|
|
4263
|
+
args: [{ providedIn: 'root' }]
|
|
4267
4264
|
}], ctorParameters: () => [{ type: i1$3.DialogService }] });
|
|
4268
4265
|
class SimpleComponent {
|
|
4269
4266
|
constructor(dynamicDialogRef, dialogService) {
|
|
4270
4267
|
this.dynamicDialogRef = dynamicDialogRef;
|
|
4271
4268
|
this.dialogService = dialogService;
|
|
4272
|
-
|
|
4269
|
+
this.imageChangedEvent = null;
|
|
4270
|
+
this.croppedImage = '';
|
|
4271
|
+
//#region Variáveis de controle
|
|
4273
4272
|
this._variaviesDialog = signal(null);
|
|
4274
|
-
|
|
4275
|
-
this.canvas = signal(null);
|
|
4276
|
-
this.ctx = signal(null);
|
|
4277
|
-
this._Image = signal(new Image());
|
|
4278
|
-
//? Coordenadas iniciais e finais do desenho
|
|
4279
|
-
this.startX = 0;
|
|
4280
|
-
this.startY = 0;
|
|
4281
|
-
//? Fator de escala da imagem e zoom
|
|
4282
|
-
this.scaleFactorReadOnly = computed(() => {
|
|
4283
|
-
return Math.min(this.scaleFactor(), this.scaleFactorInicial() + 5);
|
|
4284
|
-
});
|
|
4285
|
-
this.scaleFactorInicial = signal(null);
|
|
4286
|
-
this.scaleFactor = signal(null);
|
|
4287
|
-
this.scaleFactorModel = 0;
|
|
4288
|
-
this.imageX = 0;
|
|
4289
|
-
this.imageY = 0;
|
|
4290
|
-
//#region Propriedades computadas de tamanho do canvas e da imagem
|
|
4291
|
-
//? Largura e altura do canvas baseado na tamanho da tela
|
|
4292
|
-
this.canvasWidth = computed(() => this.widthTela() * 0.5);
|
|
4293
|
-
this.canvasHeight = computed(() => this.heigthTela() * 0.5);
|
|
4294
|
-
//? Largura e altura da área de corte
|
|
4295
|
-
this.cutWidth = computed(() => {
|
|
4296
|
-
if (this._variaviesDialog()?.indCircle) {
|
|
4297
|
-
return this.radius() * 2;
|
|
4298
|
-
}
|
|
4299
|
-
else {
|
|
4300
|
-
const canvasWidth = this.canvasWidth();
|
|
4301
|
-
const maxWidth = canvasWidth * 0.8;
|
|
4302
|
-
const proportionalHeight = maxWidth * this.proporcaoImagem();
|
|
4303
|
-
return proportionalHeight > this.canvasHeight() * 0.8 ? this.canvasHeight() * 0.8 / this.proporcaoImagem() : maxWidth;
|
|
4304
|
-
}
|
|
4305
|
-
});
|
|
4306
|
-
this.cutHeight = computed(() => {
|
|
4307
|
-
if (this._variaviesDialog()?.indCircle) {
|
|
4308
|
-
return this.radius() * 2;
|
|
4309
|
-
}
|
|
4310
|
-
else {
|
|
4311
|
-
const canvasHeight = this.canvasHeight();
|
|
4312
|
-
const maxHeight = canvasHeight * 0.8;
|
|
4313
|
-
const proportionalWidth = maxHeight / this.proporcaoImagem();
|
|
4314
|
-
return proportionalWidth > this.canvasWidth() * 0.8 ? this.canvasWidth() * 0.8 * this.proporcaoImagem() : maxHeight;
|
|
4315
|
-
}
|
|
4316
|
-
});
|
|
4317
|
-
//? Largura e altura da imagem no canvas (baseado na escala) - tamanho real da imagem
|
|
4318
|
-
this.canvaImageWidth = computed(() => {
|
|
4319
|
-
return this._Image().width * this.scaleFactorReadOnly();
|
|
4320
|
-
});
|
|
4321
|
-
this.canvaImageHeight = computed(() => {
|
|
4322
|
-
return this._Image().height * this.scaleFactorReadOnly();
|
|
4323
|
-
});
|
|
4324
|
-
this.proporcaoImagem = computed(() => {
|
|
4325
|
-
return this._variaviesDialog()?.height / this._variaviesDialog()?.width;
|
|
4326
|
-
});
|
|
4327
|
-
this.radius = computed(() => {
|
|
4328
|
-
const minSize = Math.min(this.canvasHeight() * 0.8, this.canvasWidth() * 0.8);
|
|
4329
|
-
return minSize / 2;
|
|
4330
|
-
});
|
|
4331
|
-
//#endregion
|
|
4332
|
-
// #region Limites de movimentação da imagem
|
|
4333
|
-
//? Limites de movimentação da imagem
|
|
4334
|
-
this.indCircle = computed(() => {
|
|
4335
|
-
return this._variaviesDialog()?.indCircle;
|
|
4336
|
-
});
|
|
4337
|
-
this.xMin = computed(() => {
|
|
4338
|
-
return !this._variaviesDialog()?.indCircle ? (this.canvasWidth() - this.cutWidth()) / 2 : (this.canvasWidth() - (this.radius() * 2)) / 2;
|
|
4339
|
-
});
|
|
4340
|
-
this.yMin = computed(() => {
|
|
4341
|
-
return !this._variaviesDialog()?.indCircle ? (this.canvasHeight() - this.cutHeight()) / 2 : (this.canvasHeight() - (this.radius() * 2)) / 2;
|
|
4342
|
-
});
|
|
4343
|
-
this.xMax = computed(() => {
|
|
4344
|
-
return !this._variaviesDialog()?.indCircle ? -(this.canvaImageWidth() - (this.xMin()) - this.cutWidth()) : -(this.canvaImageWidth() - (this.xMin()) - (this.radius() * 2));
|
|
4345
|
-
});
|
|
4346
|
-
this.yMax = computed(() => {
|
|
4347
|
-
return !this._variaviesDialog()?.indCircle ? -(this.canvaImageHeight() - (this.yMin()) - this.cutHeight()) : -(this.canvaImageHeight() - (this.yMin()) - (this.radius() * 2));
|
|
4348
|
-
});
|
|
4349
|
-
// #endregion
|
|
4350
|
-
//? Proporção da imagem
|
|
4351
|
-
this.widthTela = signal(0);
|
|
4352
|
-
this.heigthTela = signal(0);
|
|
4353
|
-
//#endregion
|
|
4354
|
-
//#region handlers de eventos
|
|
4355
|
-
this.comparadorOnZoomChange = this.scaleFactorInicial();
|
|
4356
|
-
this.atualizaTamanhoTela();
|
|
4357
|
-
}
|
|
4358
|
-
setScaleFactorModel(valor) {
|
|
4359
|
-
this.scaleFactorModel = valor - this.scaleFactorInicial();
|
|
4360
|
-
this.scaleFactor.set(valor);
|
|
4273
|
+
this.aspectRatio = signal(1 / 1);
|
|
4361
4274
|
}
|
|
4362
|
-
|
|
4363
|
-
this.
|
|
4364
|
-
this.updateCanvasSize();
|
|
4365
|
-
this.atualizaCutBorder();
|
|
4275
|
+
fileChangeEvent(event) {
|
|
4276
|
+
this.imageChangedEvent = event;
|
|
4366
4277
|
}
|
|
4367
|
-
|
|
4368
|
-
this.
|
|
4369
|
-
this.heigthTela.set(window.innerHeight);
|
|
4278
|
+
imageCropped(event) {
|
|
4279
|
+
this.croppedImage = event.base64;
|
|
4370
4280
|
}
|
|
4371
|
-
|
|
4281
|
+
imageLoaded(image) { }
|
|
4282
|
+
cropperReady() { }
|
|
4283
|
+
loadImageFailed() { }
|
|
4284
|
+
//#endregion
|
|
4285
|
+
ngAfterContentInit() {
|
|
4372
4286
|
this.recuperarVariaviesDialog();
|
|
4373
|
-
this.
|
|
4374
|
-
this.
|
|
4375
|
-
}
|
|
4376
|
-
inciarReferencias() {
|
|
4377
|
-
this.canvas.set(this.cropCanvas.nativeElement);
|
|
4378
|
-
this.ctx.set(this.canvas().getContext('2d'));
|
|
4379
|
-
this._Image().src = this._variaviesDialog()?.imagem;
|
|
4380
|
-
}
|
|
4381
|
-
iniciarCanvas() {
|
|
4382
|
-
this._Image().onload = () => {
|
|
4383
|
-
//? Define o tamanho do canvas
|
|
4384
|
-
this.canvas().height = this.canvasHeight();
|
|
4385
|
-
this.canvas().width = this.canvasWidth();
|
|
4386
|
-
this.ajustarZommEPosicaoInicial();
|
|
4387
|
-
this.initializeImageMove(this.canvas(), this.ctx(), this._Image());
|
|
4388
|
-
this.initializeMouseWheel(this.canvas(), this.ctx(), this._Image());
|
|
4389
|
-
this.redrawCanvas(this.ctx(), this._Image());
|
|
4390
|
-
};
|
|
4287
|
+
this.recuperaInstanciaDialog();
|
|
4288
|
+
this.setAspectRatio();
|
|
4391
4289
|
}
|
|
4392
|
-
|
|
4393
|
-
const
|
|
4394
|
-
const
|
|
4395
|
-
const
|
|
4396
|
-
const
|
|
4397
|
-
|
|
4398
|
-
if (this._variaviesDialog()?.indCircle) {
|
|
4399
|
-
const scaleFactor = (this.radius() * 2) / Math.min(imageWidth, imageHeight);
|
|
4400
|
-
this.scaleFactorInicial.set(scaleFactor);
|
|
4401
|
-
this.setScaleFactorModel(scaleFactor);
|
|
4402
|
-
}
|
|
4403
|
-
else {
|
|
4404
|
-
const scaleFactor = this.cutHeight() === this.cutWidth()
|
|
4405
|
-
? this._Image().width > this._Image().height
|
|
4406
|
-
? this.cutHeight() / imageHeight
|
|
4407
|
-
: this.cutWidth() / imageWidth
|
|
4408
|
-
: this.cutHeight() > this.cutWidth()
|
|
4409
|
-
? this.cutHeight() / imageHeight
|
|
4410
|
-
: this.cutWidth() / imageWidth;
|
|
4411
|
-
this.scaleFactorInicial.set(scaleFactor);
|
|
4412
|
-
this.setScaleFactorModel(scaleFactor);
|
|
4413
|
-
}
|
|
4414
|
-
this.imageX = Math.max((this.canvas().width - imageWidth * this.scaleFactorReadOnly()) / 2, this.xMin());
|
|
4415
|
-
this.imageY = Math.max((this.canvasHeight() - imageHeight * this.scaleFactorReadOnly()) / 2, this.yMin());
|
|
4290
|
+
setAspectRatio(width = this._variaviesDialog()?.width, height = this._variaviesDialog()?.height) {
|
|
4291
|
+
const gcd = (a, b) => (b === 0 ? a : gcd(b, a % b));
|
|
4292
|
+
const divisor = gcd(width, height);
|
|
4293
|
+
const aspectWidth = width / divisor;
|
|
4294
|
+
const aspectHeight = height / divisor;
|
|
4295
|
+
this.aspectRatio.set(aspectWidth / aspectHeight);
|
|
4416
4296
|
}
|
|
4417
4297
|
//#region Métodos de recuperação de dados
|
|
4418
4298
|
recuperaInstanciaDialog() {
|
|
@@ -4428,273 +4308,13 @@ class SimpleComponent {
|
|
|
4428
4308
|
this._variaviesDialog.set(this.recuperaInstanciaDialog().data.id);
|
|
4429
4309
|
}
|
|
4430
4310
|
//#endregion
|
|
4431
|
-
//#region Métodos de atualizacao do canvas
|
|
4432
|
-
//? Atualiza o tamanho do canvas
|
|
4433
|
-
updateCanvasSize() {
|
|
4434
|
-
this.imageX = (this.canvas().width - this._Image().width * this.scaleFactorReadOnly()) / 2;
|
|
4435
|
-
this.imageY = (this.canvasHeight() / 2) - (this._Image().height * this.scaleFactorReadOnly()) / 2;
|
|
4436
|
-
this.canvas().height = this.canvasHeight();
|
|
4437
|
-
this.canvas().width = this.canvasWidth();
|
|
4438
|
-
this.redrawCanvas(this.ctx(), this._Image());
|
|
4439
|
-
}
|
|
4440
|
-
redrawCanvas(ctx, img) {
|
|
4441
|
-
if (!ctx)
|
|
4442
|
-
return;
|
|
4443
|
-
this.drawCropArea(ctx);
|
|
4444
|
-
ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
|
|
4445
|
-
ctx.filter = 'blur(5px) opacity(0.9)';
|
|
4446
|
-
ctx.drawImage(img, this.imageX, this.imageY, img.width * this.scaleFactorReadOnly(), img.height * this.scaleFactorReadOnly());
|
|
4447
|
-
ctx.filter = 'none';
|
|
4448
|
-
this.drawImageInCropArea(ctx, img);
|
|
4449
|
-
}
|
|
4450
|
-
//? Desenha a área de corte
|
|
4451
|
-
drawCropArea(ctx) {
|
|
4452
|
-
if (!ctx)
|
|
4453
|
-
return;
|
|
4454
|
-
this.atualizaCutBorder();
|
|
4455
|
-
const cropX = ctx.canvas.width / 2 - this.cutWidth() / 2;
|
|
4456
|
-
const cropY = ctx.canvas.height / 2 - this.cutHeight() / 2;
|
|
4457
|
-
const cropXCircle = ctx.canvas.width / 2 - this.radius() / 2;
|
|
4458
|
-
const cropYCircle = ctx.canvas.height / 2 - this.radius() / 2;
|
|
4459
|
-
ctx.beginPath();
|
|
4460
|
-
ctx.strokeStyle = 'transparent';
|
|
4461
|
-
ctx.lineWidth = 2;
|
|
4462
|
-
if (this._variaviesDialog()?.indCircle) {
|
|
4463
|
-
ctx.arc(cropXCircle, cropYCircle, this.radius(), 0, Math.PI * 2, true);
|
|
4464
|
-
}
|
|
4465
|
-
else {
|
|
4466
|
-
ctx.rect(cropX, cropY, this.cutWidth(), this.cutHeight());
|
|
4467
|
-
}
|
|
4468
|
-
ctx.stroke();
|
|
4469
|
-
}
|
|
4470
|
-
//? Desenha a imagem na área de corte
|
|
4471
|
-
drawImageInCropArea(ctx, img) {
|
|
4472
|
-
if (!ctx)
|
|
4473
|
-
return;
|
|
4474
|
-
const cropX = (ctx.canvas.width - this.cutWidth()) / 2;
|
|
4475
|
-
const cropY = (ctx.canvas.height - this.cutHeight()) / 2;
|
|
4476
|
-
ctx.save();
|
|
4477
|
-
ctx.beginPath();
|
|
4478
|
-
if (this._variaviesDialog()?.indCircle) {
|
|
4479
|
-
ctx.arc(ctx.canvas.width / 2, ctx.canvas.height / 2, this.radius(), 0, Math.PI * 2, true);
|
|
4480
|
-
}
|
|
4481
|
-
else {
|
|
4482
|
-
ctx.rect(cropX, cropY, this.cutWidth(), this.cutHeight());
|
|
4483
|
-
}
|
|
4484
|
-
ctx.clip();
|
|
4485
|
-
ctx.drawImage(img, this.imageX, this.imageY, img.width * this.scaleFactorReadOnly(), img.height * this.scaleFactorReadOnly());
|
|
4486
|
-
ctx.restore();
|
|
4487
|
-
}
|
|
4488
|
-
atualizaCutBorder() {
|
|
4489
|
-
if (this.cropBorder && this.cropBorder.nativeElement) {
|
|
4490
|
-
const cropBorderElement = this.cropBorder.nativeElement;
|
|
4491
|
-
if (this._variaviesDialog()?.indCircle) {
|
|
4492
|
-
cropBorderElement.style.borderRadius = this.radius() * 2 + 'px';
|
|
4493
|
-
cropBorderElement.style.width = this.radius() * 2 + 'px';
|
|
4494
|
-
cropBorderElement.style.height = this.radius() * 2 + 'px';
|
|
4495
|
-
}
|
|
4496
|
-
else {
|
|
4497
|
-
cropBorderElement.style.width = this.cutWidth() + 'px';
|
|
4498
|
-
cropBorderElement.style.height = this.cutHeight() + 'px';
|
|
4499
|
-
}
|
|
4500
|
-
}
|
|
4501
|
-
}
|
|
4502
|
-
onZoomChange(e) {
|
|
4503
|
-
const prevZoom = this.comparadorOnZoomChange;
|
|
4504
|
-
const zoomValue = e.value;
|
|
4505
|
-
this.comparadorOnZoomChange = e.value;
|
|
4506
|
-
const direction = prevZoom < zoomValue ? 'up' : 'down';
|
|
4507
|
-
this.ajustarZoom(direction, e.value);
|
|
4508
|
-
}
|
|
4509
|
-
initializeMouseWheel(canvas, ctx, img) {
|
|
4510
|
-
canvas.onwheel = (e) => {
|
|
4511
|
-
e.preventDefault();
|
|
4512
|
-
//? Recuperando os valores de zoom e delta atuais
|
|
4513
|
-
const direction = e.deltaY > 0 ? 'down' : 'up';
|
|
4514
|
-
this.ajustarZoom(direction);
|
|
4515
|
-
};
|
|
4516
|
-
}
|
|
4517
|
-
ajustarZoom(direction, value) {
|
|
4518
|
-
const prevScaleFactor = this.scaleFactorReadOnly();
|
|
4519
|
-
const delta = direction == 'down' ? -0.015 : 0.015;
|
|
4520
|
-
let scaleFactor = prevScaleFactor + (delta * 1.4);
|
|
4521
|
-
if (value)
|
|
4522
|
-
scaleFactor = value + this.scaleFactorInicial();
|
|
4523
|
-
const newHeight = this._Image().height * scaleFactor;
|
|
4524
|
-
const newWidth = this._Image().width * scaleFactor;
|
|
4525
|
-
if (this._variaviesDialog()?.indCircle) {
|
|
4526
|
-
if (newHeight < this.radius() * 2 || newWidth < this.radius() * 2) {
|
|
4527
|
-
scaleFactor = prevScaleFactor;
|
|
4528
|
-
}
|
|
4529
|
-
else {
|
|
4530
|
-
this.scaleFactor.set(scaleFactor);
|
|
4531
|
-
this.setScaleFactorModel(scaleFactor);
|
|
4532
|
-
}
|
|
4533
|
-
}
|
|
4534
|
-
else {
|
|
4535
|
-
if (newHeight < this.cutHeight() || newWidth < this.cutWidth()) {
|
|
4536
|
-
scaleFactor = prevScaleFactor;
|
|
4537
|
-
}
|
|
4538
|
-
else {
|
|
4539
|
-
this.scaleFactor.set(scaleFactor);
|
|
4540
|
-
this.setScaleFactorModel(scaleFactor);
|
|
4541
|
-
}
|
|
4542
|
-
}
|
|
4543
|
-
this.scaleFactor.set(scaleFactor);
|
|
4544
|
-
this.setScaleFactorModel(scaleFactor);
|
|
4545
|
-
const canvas = this.cropCanvas.nativeElement;
|
|
4546
|
-
const canvasWidth = canvas.offsetWidth;
|
|
4547
|
-
const canvasHeight = canvas.offsetHeight;
|
|
4548
|
-
const centerX = canvasWidth / 2;
|
|
4549
|
-
const centerY = canvasHeight / 2;
|
|
4550
|
-
const newCanvasX = centerX - (centerX - this.imageX) * (scaleFactor / prevScaleFactor);
|
|
4551
|
-
const newCanvasY = centerY - (centerY - this.imageY) * (scaleFactor / prevScaleFactor);
|
|
4552
|
-
this.imageX = newCanvasX;
|
|
4553
|
-
this.imageY = newCanvasY;
|
|
4554
|
-
if (!this.verificaImagemdentroDosLimiteXmin()) {
|
|
4555
|
-
const diffXmin = this.retornaDiffXmax();
|
|
4556
|
-
this.moveImage(this.imageX - diffXmin);
|
|
4557
|
-
}
|
|
4558
|
-
if (!this.verificaImagemdentroDosLimiteXmax()) {
|
|
4559
|
-
const diffXmax = this.retornaDiffXmin();
|
|
4560
|
-
this.moveImage(this.imageX + diffXmax);
|
|
4561
|
-
}
|
|
4562
|
-
if (!this.verificaImagemdentroDosLimiteYmax()) {
|
|
4563
|
-
const diffYmax = this.retornaDiffYmin();
|
|
4564
|
-
this.moveImage(undefined, this.imageY + diffYmax);
|
|
4565
|
-
}
|
|
4566
|
-
if (!this.verificaImagemdentroDosLimiteYmin()) {
|
|
4567
|
-
const diffYmin = this.retornaDiffYmax();
|
|
4568
|
-
this.moveImage(undefined, this.imageY - diffYmin);
|
|
4569
|
-
}
|
|
4570
|
-
this.redrawCanvas(this.ctx(), this._Image());
|
|
4571
|
-
}
|
|
4572
|
-
verificaImagemdentroDosLimiteXmin() {
|
|
4573
|
-
const newImageX = this.imageX;
|
|
4574
|
-
return newImageX < this.xMin();
|
|
4575
|
-
}
|
|
4576
|
-
verificaImagemdentroDosLimiteXmax() {
|
|
4577
|
-
const newImageX = this.imageX;
|
|
4578
|
-
return newImageX > this.xMax();
|
|
4579
|
-
}
|
|
4580
|
-
verificaImagemdentroDosLimiteYmin() {
|
|
4581
|
-
const newImageY = this.imageY;
|
|
4582
|
-
return newImageY < this.yMin();
|
|
4583
|
-
}
|
|
4584
|
-
verificaImagemdentroDosLimiteYmax() {
|
|
4585
|
-
const newImageY = this.imageY;
|
|
4586
|
-
return newImageY > this.yMax();
|
|
4587
|
-
}
|
|
4588
|
-
retornaDiffXmin() {
|
|
4589
|
-
const newImageX = this.imageX;
|
|
4590
|
-
return this.xMin() - newImageX;
|
|
4591
|
-
}
|
|
4592
|
-
retornaDiffXmax() {
|
|
4593
|
-
const newImageX = this.imageX;
|
|
4594
|
-
return newImageX - this.xMax();
|
|
4595
|
-
}
|
|
4596
|
-
retornaDiffYmin() {
|
|
4597
|
-
const newImageY = this.imageY;
|
|
4598
|
-
return this.yMin() - newImageY;
|
|
4599
|
-
}
|
|
4600
|
-
retornaDiffYmax() {
|
|
4601
|
-
const newImageY = this.imageY;
|
|
4602
|
-
return newImageY - this.yMax();
|
|
4603
|
-
}
|
|
4604
|
-
initializeImageMove(canvas, ctx, img) {
|
|
4605
|
-
let isDragging = false;
|
|
4606
|
-
canvas.style.cursor = 'grab';
|
|
4607
|
-
canvas.onmousedown = (e) => {
|
|
4608
|
-
isDragging = true;
|
|
4609
|
-
canvas.style.cursor = 'grabbing';
|
|
4610
|
-
this.startX = e.offsetX - this.imageX;
|
|
4611
|
-
this.startY = e.offsetY - this.imageY;
|
|
4612
|
-
};
|
|
4613
|
-
canvas.onmouseup = () => {
|
|
4614
|
-
isDragging = false;
|
|
4615
|
-
canvas.style.cursor = 'grab';
|
|
4616
|
-
};
|
|
4617
|
-
canvas.onmouseout = () => {
|
|
4618
|
-
isDragging = false;
|
|
4619
|
-
canvas.style.cursor = 'grab';
|
|
4620
|
-
};
|
|
4621
|
-
canvas.onmousemove = (e) => {
|
|
4622
|
-
if (isDragging) {
|
|
4623
|
-
// Calcula o novo posicionamento da imagem
|
|
4624
|
-
let newImageX = e.offsetX - this.startX;
|
|
4625
|
-
let newImageY = e.offsetY - this.startY;
|
|
4626
|
-
if (newImageX < this.xMin() && newImageX > this.xMax()) {
|
|
4627
|
-
this.moveImage(newImageX);
|
|
4628
|
-
}
|
|
4629
|
-
if (newImageY < this.yMin() && newImageY > this.yMax()) {
|
|
4630
|
-
this.moveImage(undefined, newImageY);
|
|
4631
|
-
}
|
|
4632
|
-
this.redrawCanvas(ctx, img);
|
|
4633
|
-
}
|
|
4634
|
-
};
|
|
4635
|
-
}
|
|
4636
|
-
moveImage(dx, dy) {
|
|
4637
|
-
this.imageX = (dx ?? this.imageX);
|
|
4638
|
-
this.imageY = (dy ?? this.imageY);
|
|
4639
|
-
}
|
|
4640
|
-
//#endregion
|
|
4641
4311
|
//#region Métodos de corte e fechamento do modal
|
|
4642
4312
|
cropImage() {
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
let imageData;
|
|
4649
|
-
const cropX = (ctx.canvas.width - this.cutWidth()) / 2;
|
|
4650
|
-
const cropY = (ctx.canvas.height - this.cutHeight()) / 2;
|
|
4651
|
-
if (this._variaviesDialog()?.indCircle) {
|
|
4652
|
-
// Create a new canvas with the same dimensions as the circle
|
|
4653
|
-
const circleCanvas = document.createElement('canvas');
|
|
4654
|
-
const circleCtx = circleCanvas.getContext('2d');
|
|
4655
|
-
circleCanvas.width = this.radius() * 2;
|
|
4656
|
-
circleCanvas.height = this.radius() * 2;
|
|
4657
|
-
// Draw the circle on the new canvas
|
|
4658
|
-
circleCtx.beginPath();
|
|
4659
|
-
circleCtx.arc(this.radius(), this.radius(), this.radius(), 0, 2 * Math.PI);
|
|
4660
|
-
circleCtx.fill();
|
|
4661
|
-
// Set the composite operation to 'destination-in' to cut out the circle
|
|
4662
|
-
ctx.globalCompositeOperation = 'destination-in';
|
|
4663
|
-
// Draw the image on the main canvas using the circle as a mask
|
|
4664
|
-
ctx.drawImage(circleCanvas, cropX, cropY);
|
|
4665
|
-
// Reset the composite operation to the default value
|
|
4666
|
-
ctx.globalCompositeOperation = 'source-over';
|
|
4667
|
-
// Get the image data of the cropped circle
|
|
4668
|
-
imageData = ctx.getImageData(cropX, cropY, this.radius() * 2, this.radius() * 2);
|
|
4669
|
-
}
|
|
4670
|
-
else {
|
|
4671
|
-
imageData = ctx.getImageData(cropX, cropY, this.cutWidth(), this.cutHeight());
|
|
4672
|
-
}
|
|
4673
|
-
// Obter os valores de width e height da variável _variaviesDialog
|
|
4674
|
-
const variaveisDialog = this._variaviesDialog();
|
|
4675
|
-
if (variaveisDialog) {
|
|
4676
|
-
const { width, height } = variaveisDialog;
|
|
4677
|
-
// Criar um novo canvas e contexto com os valores de width e height
|
|
4678
|
-
const newCanvas = document.createElement('canvas');
|
|
4679
|
-
const newCtx = newCanvas.getContext('2d');
|
|
4680
|
-
newCanvas.width = width;
|
|
4681
|
-
newCanvas.height = height;
|
|
4682
|
-
if (newCtx) {
|
|
4683
|
-
// Redimensionar a imagem para o tamanho especificado
|
|
4684
|
-
const tempCanvas = document.createElement('canvas');
|
|
4685
|
-
const tempCtx = tempCanvas.getContext('2d');
|
|
4686
|
-
tempCanvas.width = this.cutWidth();
|
|
4687
|
-
tempCanvas.height = this.cutHeight();
|
|
4688
|
-
tempCtx.putImageData(imageData, 0, 0);
|
|
4689
|
-
newCtx.drawImage(tempCanvas, 0, 0, width, height);
|
|
4690
|
-
window.dispatchEvent(new CustomEvent('cropImage', { detail: {
|
|
4691
|
-
result: Promise.resolve(newCanvas.toDataURL()),
|
|
4692
|
-
status: true
|
|
4693
|
-
} }));
|
|
4694
|
-
this.closeCropModal();
|
|
4695
|
-
}
|
|
4696
|
-
}
|
|
4697
|
-
}
|
|
4313
|
+
window.dispatchEvent(new CustomEvent('cropImage', { detail: {
|
|
4314
|
+
result: this.croppedImage,
|
|
4315
|
+
status: true
|
|
4316
|
+
} }));
|
|
4317
|
+
this.closeCropModal();
|
|
4698
4318
|
}
|
|
4699
4319
|
closeCropModal() {
|
|
4700
4320
|
this.dialogInstance.close();
|
|
@@ -4707,75 +4327,75 @@ class SimpleComponent {
|
|
|
4707
4327
|
this.closeCropModal();
|
|
4708
4328
|
}
|
|
4709
4329
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: SimpleComponent, deps: [{ token: i1$3.DynamicDialogRef }, { token: i1$3.DialogService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4710
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: SimpleComponent, isStandalone: true, selector: "app-simple-component",
|
|
4330
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: SimpleComponent, isStandalone: true, selector: "app-simple-component", ngImport: i0, template: `
|
|
4711
4331
|
<div class="modal-content">
|
|
4712
|
-
<div class="crop-container">
|
|
4713
|
-
<canvas #cropCanvas class="crop-canvas"></canvas>
|
|
4714
|
-
<div #cropBorder class="crop-border"></div>
|
|
4715
|
-
</div>
|
|
4716
4332
|
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4333
|
+
<image-cropper
|
|
4334
|
+
[imageBase64]="_variaviesDialog()?.imagem"
|
|
4335
|
+
(imageCropped)="imageCropped($event)"
|
|
4336
|
+
[aspectRatio]="aspectRatio()"
|
|
4337
|
+
(imageLoaded)="imageLoaded($event)"
|
|
4338
|
+
(cropperReady)="cropperReady()"
|
|
4339
|
+
(loadImageFailed)="loadImageFailed()"
|
|
4340
|
+
[roundCropper]="this._variaviesDialog()?.indCircle"
|
|
4341
|
+
[maintainAspectRatio]="true"
|
|
4342
|
+
[imageQuality]="100"
|
|
4343
|
+
format="jpeg"
|
|
4344
|
+
output='base64'
|
|
4345
|
+
alignImage="center"
|
|
4346
|
+
/>
|
|
4721
4347
|
|
|
4722
|
-
|
|
4348
|
+
|
|
4349
|
+
</div>
|
|
4350
|
+
<div class="button-container">
|
|
4723
4351
|
<kv-button label="Cancelar" severity="tertiary" icon="close" (click)="cancel()"></kv-button>
|
|
4724
4352
|
<kv-button label="Recortar" severity="primary" icon="crop" (click)="cropImage()" class="ml-2"></kv-button>
|
|
4725
4353
|
</div>
|
|
4726
4354
|
|
|
4727
|
-
</div>
|
|
4728
|
-
|
|
4729
4355
|
|
|
4730
4356
|
|
|
4731
|
-
`, isInline: true, styles: ["img{border-style:solid;border-width:2px;border-radius:50%;object-fit:cover}i{font-size:22px}.botao-alterar-foto{border-style:none;width:max-content;background-color:#002542;color:#000;font-weight:700;cursor:pointer;padding:7px 9px}.botao-alterar-foto i{color:#fff}.botao-excluir-foto{border-style:none;width:max-content;background-color:#002542;color:#000;font-weight:700;cursor:pointer;padding:7px 9px}.botao-excluir-foto i{color:#fff}.btn{position:absolute;top:87%;left:87%;transform:translate(-50%,-50%)}.image-container{display:inline-block;position:relative}.modal-content{position:relative;background-color:#fefefe;margin:1% auto;padding:20px;width:80%;max-width:fit-content;text-align:center;border-radius:12px}.crop-container{display:flex;justify-content:center;align-items:center}.crop-canvas{border:1px solid #d1d5db;border-radius:12px;width:100%;height:auto}.crop-border{position:absolute;border:2px dashed #9ca3af;pointer-events:none}.zoom-container{padding-top:20px;padding-bottom:20px}.button-container{display:flex;align-items:center;justify-content:flex-end;flex-direction:row;margin-top:24px}\n"], dependencies: [{ kind: "ngmodule", type:
|
|
4357
|
+
`, isInline: true, styles: ["img{border-style:solid;border-width:2px;border-radius:50%;object-fit:cover}i{font-size:22px}.botao-alterar-foto{border-style:none;width:max-content;background-color:#002542;color:#000;font-weight:700;cursor:pointer;padding:7px 9px}.botao-alterar-foto i{color:#fff}.botao-excluir-foto{border-style:none;width:max-content;background-color:#002542;color:#000;font-weight:700;cursor:pointer;padding:7px 9px}.botao-excluir-foto i{color:#fff}.btn{position:absolute;top:87%;left:87%;transform:translate(-50%,-50%)}.image-container{display:inline-block;position:relative}.modal-content{height:60vh;position:relative;background-color:#fefefe;margin:1% auto;padding:20px;width:80%;max-width:fit-content;text-align:center;border-radius:12px;display:flex;align-items:center;justify-content:center}.crop-container{display:flex;justify-content:center;align-items:center}.crop-canvas{border:1px solid #d1d5db;border-radius:12px;width:100%;height:auto}.crop-border{position:absolute;border:2px dashed #9ca3af;pointer-events:none}.zoom-container{padding-top:20px;padding-bottom:20px}.button-container{display:flex;align-items:center;justify-content:flex-end;flex-direction:row;margin-top:24px;position:fixed;bottom:0;background:#fff;width:90%;padding:15px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: DialogModule }, { kind: "ngmodule", type: KvModalModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: KvButtonModule }, { kind: "component", type: KvButtonComponent, selector: "kv-button", inputs: ["fullWidth", "type", "loading", "severity", "size", "icon", "label", "disabled"], outputs: ["onClick"] }, { kind: "ngmodule", type: KvLabelModule }, { kind: "component", type: ImageCropperComponent, selector: "image-cropper", inputs: ["imageChangedEvent", "imageURL", "imageBase64", "imageFile", "imageAltText", "options", "cropperFrameAriaLabel", "output", "format", "autoCrop", "cropper", "transform", "maintainAspectRatio", "aspectRatio", "resetCropOnAspectRatioChange", "resizeToWidth", "resizeToHeight", "cropperMinWidth", "cropperMinHeight", "cropperMaxHeight", "cropperMaxWidth", "cropperStaticWidth", "cropperStaticHeight", "canvasRotation", "initialStepSize", "roundCropper", "onlyScaleDown", "imageQuality", "backgroundColor", "containWithinAspectRatio", "hideResizeSquares", "allowMoveImage", "checkImageType", "alignImage", "disabled", "hidden"], outputs: ["imageCropped", "startCropImage", "imageLoaded", "cropperReady", "loadImageFailed", "transformChange", "cropperChange"] }] }); }
|
|
4732
4358
|
}
|
|
4733
4359
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: SimpleComponent, decorators: [{
|
|
4734
4360
|
type: Component,
|
|
4735
4361
|
args: [{ selector: 'app-simple-component', template: `
|
|
4736
4362
|
<div class="modal-content">
|
|
4737
|
-
<div class="crop-container">
|
|
4738
|
-
<canvas #cropCanvas class="crop-canvas"></canvas>
|
|
4739
|
-
<div #cropBorder class="crop-border"></div>
|
|
4740
|
-
</div>
|
|
4741
4363
|
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4364
|
+
<image-cropper
|
|
4365
|
+
[imageBase64]="_variaviesDialog()?.imagem"
|
|
4366
|
+
(imageCropped)="imageCropped($event)"
|
|
4367
|
+
[aspectRatio]="aspectRatio()"
|
|
4368
|
+
(imageLoaded)="imageLoaded($event)"
|
|
4369
|
+
(cropperReady)="cropperReady()"
|
|
4370
|
+
(loadImageFailed)="loadImageFailed()"
|
|
4371
|
+
[roundCropper]="this._variaviesDialog()?.indCircle"
|
|
4372
|
+
[maintainAspectRatio]="true"
|
|
4373
|
+
[imageQuality]="100"
|
|
4374
|
+
format="jpeg"
|
|
4375
|
+
output='base64'
|
|
4376
|
+
alignImage="center"
|
|
4377
|
+
/>
|
|
4746
4378
|
|
|
4747
|
-
|
|
4379
|
+
|
|
4380
|
+
</div>
|
|
4381
|
+
<div class="button-container">
|
|
4748
4382
|
<kv-button label="Cancelar" severity="tertiary" icon="close" (click)="cancel()"></kv-button>
|
|
4749
4383
|
<kv-button label="Recortar" severity="primary" icon="crop" (click)="cropImage()" class="ml-2"></kv-button>
|
|
4750
4384
|
</div>
|
|
4751
4385
|
|
|
4752
|
-
</div>
|
|
4753
|
-
|
|
4754
4386
|
|
|
4755
4387
|
|
|
4756
4388
|
`, standalone: true, imports: [
|
|
4389
|
+
CommonModule,
|
|
4757
4390
|
DialogModule,
|
|
4758
4391
|
KvModalModule,
|
|
4759
|
-
SliderModule,
|
|
4760
|
-
CommonModule,
|
|
4761
|
-
ButtonModule,
|
|
4762
|
-
FileUploadModule,
|
|
4763
|
-
SliderModule,
|
|
4764
4392
|
FormsModule,
|
|
4765
4393
|
ReactiveFormsModule,
|
|
4766
4394
|
KvButtonModule,
|
|
4767
4395
|
KvLabelModule,
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
args: ['cropCanvas']
|
|
4772
|
-
}], cropBorder: [{
|
|
4773
|
-
type: ViewChild,
|
|
4774
|
-
args: ['cropBorder']
|
|
4775
|
-
}], onWindowResize: [{
|
|
4776
|
-
type: HostListener,
|
|
4777
|
-
args: ['window:resize', ['$event']]
|
|
4778
|
-
}] } });
|
|
4396
|
+
ImageCropperComponent
|
|
4397
|
+
], styles: ["img{border-style:solid;border-width:2px;border-radius:50%;object-fit:cover}i{font-size:22px}.botao-alterar-foto{border-style:none;width:max-content;background-color:#002542;color:#000;font-weight:700;cursor:pointer;padding:7px 9px}.botao-alterar-foto i{color:#fff}.botao-excluir-foto{border-style:none;width:max-content;background-color:#002542;color:#000;font-weight:700;cursor:pointer;padding:7px 9px}.botao-excluir-foto i{color:#fff}.btn{position:absolute;top:87%;left:87%;transform:translate(-50%,-50%)}.image-container{display:inline-block;position:relative}.modal-content{height:60vh;position:relative;background-color:#fefefe;margin:1% auto;padding:20px;width:80%;max-width:fit-content;text-align:center;border-radius:12px;display:flex;align-items:center;justify-content:center}.crop-container{display:flex;justify-content:center;align-items:center}.crop-canvas{border:1px solid #d1d5db;border-radius:12px;width:100%;height:auto}.crop-border{position:absolute;border:2px dashed #9ca3af;pointer-events:none}.zoom-container{padding-top:20px;padding-bottom:20px}.button-container{display:flex;align-items:center;justify-content:flex-end;flex-direction:row;margin-top:24px;position:fixed;bottom:0;background:#fff;width:90%;padding:15px}\n"] }]
|
|
4398
|
+
}], ctorParameters: () => [{ type: i1$3.DynamicDialogRef }, { type: i1$3.DialogService }] });
|
|
4779
4399
|
|
|
4780
4400
|
class KvAvatarComponent {
|
|
4781
4401
|
constructor(imageService, notificationService, imageCutterService) {
|
|
@@ -5071,7 +4691,7 @@ class KvCarouselComponent {
|
|
|
5071
4691
|
window.open(link, '_blank');
|
|
5072
4692
|
}
|
|
5073
4693
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvCarouselComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5074
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "17.3.8", type: KvCarouselComponent, selector: "kv-carousel", inputs: { heightCarousel: { classPropertyName: "heightCarousel", publicName: "heightCarousel", isSignal: true, isRequired: false, transformFunction: null }, carouselData: { classPropertyName: "carouselData", publicName: "carouselData", isSignal: false, isRequired: false, transformFunction: null }, autoplayInterval: { classPropertyName: "autoplayInterval", publicName: "autoplayInterval", isSignal: false, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "carouselContainer", first: true, predicate: Carousel, descendants: true, isSignal: true }], ngImport: i0, template: "<p-carousel\r\n [value]=\"carouselData\"\r\n [indicatorStyleClass]=\"'carousel-indicator'\"\r\n [autoplayInterval]=\"autoplayInterval\"\r\n [showIndicators]=\"true\"\r\n [showNavigators]=\"false\"\r\n [numVisible]=\"1\"\r\n [numScroll]=\"1\"\r\n [circular]=\"true\"\r\n styleClass=\"h-full\"\r\n>\r\n >\r\n <ng-template\r\n pTemplate=\"item\"\r\n let-banner\r\n class=\"justify-content-center align-items-center\"\r\n >\r\n <img\r\n [src]=\"banner.img\"\r\n class=\"w-full border-round-banner\"\r\n [style.height.px]=\"heightComputed()\"\r\n (click)=\"navigateToLink(banner.link)\"\r\n />\r\n </ng-template>\r\n</p-carousel>\r\n", styles: ["::ng-deep .p-carousel-indicators{position:absolute;left:50%;transform:translate(-50%);bottom:-1rem}::ng-deep .carousel-indicator{width:15px!important;height:4px!important;margin:-3px!important;padding:0!important;background-color:#eeeeeed0}::ng-deep .carousel-indicator:hover{background-color:#efefef}button.p-carousel-indicator.p-link{background-color:#f0f8ff!important}::ng-deep .p-carousel .p-carousel-content{overflow:hidden!important;position:relative}::ng-deep .border-round-banner{border-radius:20px!important;max-height:500px}\n"], dependencies: [{ kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i2$
|
|
4694
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "17.3.8", type: KvCarouselComponent, selector: "kv-carousel", inputs: { heightCarousel: { classPropertyName: "heightCarousel", publicName: "heightCarousel", isSignal: true, isRequired: false, transformFunction: null }, carouselData: { classPropertyName: "carouselData", publicName: "carouselData", isSignal: false, isRequired: false, transformFunction: null }, autoplayInterval: { classPropertyName: "autoplayInterval", publicName: "autoplayInterval", isSignal: false, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "carouselContainer", first: true, predicate: Carousel, descendants: true, isSignal: true }], ngImport: i0, template: "<p-carousel\r\n [value]=\"carouselData\"\r\n [indicatorStyleClass]=\"'carousel-indicator'\"\r\n [autoplayInterval]=\"autoplayInterval\"\r\n [showIndicators]=\"true\"\r\n [showNavigators]=\"false\"\r\n [numVisible]=\"1\"\r\n [numScroll]=\"1\"\r\n [circular]=\"true\"\r\n styleClass=\"h-full\"\r\n>\r\n >\r\n <ng-template\r\n pTemplate=\"item\"\r\n let-banner\r\n class=\"justify-content-center align-items-center\"\r\n >\r\n <img\r\n [src]=\"banner.img\"\r\n class=\"w-full border-round-banner\"\r\n [style.height.px]=\"heightComputed()\"\r\n (click)=\"navigateToLink(banner.link)\"\r\n />\r\n </ng-template>\r\n</p-carousel>\r\n", styles: ["::ng-deep .p-carousel-indicators{position:absolute;left:50%;transform:translate(-50%);bottom:-1rem}::ng-deep .carousel-indicator{width:15px!important;height:4px!important;margin:-3px!important;padding:0!important;background-color:#eeeeeed0}::ng-deep .carousel-indicator:hover{background-color:#efefef}button.p-carousel-indicator.p-link{background-color:#f0f8ff!important}::ng-deep .p-carousel .p-carousel-content{overflow:hidden!important;position:relative}::ng-deep .border-round-banner{border-radius:20px!important;max-height:500px}\n"], dependencies: [{ kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i2$2.Carousel, selector: "p-carousel", inputs: ["page", "numVisible", "numScroll", "responsiveOptions", "orientation", "verticalViewPortHeight", "contentClass", "indicatorsContentClass", "indicatorsContentStyle", "indicatorStyleClass", "indicatorStyle", "value", "circular", "showIndicators", "showNavigators", "autoplayInterval", "style", "styleClass"], outputs: ["onPage"] }] }); }
|
|
5075
4695
|
}
|
|
5076
4696
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvCarouselComponent, decorators: [{
|
|
5077
4697
|
type: Component,
|
|
@@ -5749,7 +5369,7 @@ class KvSelectButtonComponent {
|
|
|
5749
5369
|
this.optionClick.emit(event);
|
|
5750
5370
|
}
|
|
5751
5371
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvSelectButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5752
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvSelectButtonComponent, selector: "kv-select-button", inputs: { formGroup: "formGroup", formControlName: "formControlName", options: "options", optionLabel: "optionLabel", optionValue: "optionValue", mutiple: "mutiple", disabled: "disabled", value: "value" }, outputs: { onSelectionChange: "onSelectionChange", optionClick: "optionClick" }, ngImport: i0, template: "@if(value) {\r\n<p-selectButton\r\n [options]=\"options\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n (onChange)=\"selectionChange($event)\"\r\n (onOptionClick)=\"onOptionClick($event)\"\r\n [multiple]=\"mutiple\"\r\n [disabled]=\"disabled\"\r\n [(ngModel)]=\"value\"\r\n/>\r\n} @else {\r\n<div [formGroup]=\"formGroup\">\r\n <p-selectButton\r\n [options]=\"options\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n (onChange)=\"selectionChange($event)\"\r\n (onOptionClick)=\"onOptionClick($event)\"\r\n [multiple]=\"mutiple\"\r\n [disabled]=\"disabled\"\r\n [formControlName]=\"formControlName\"\r\n [(ngModel)]=\"value\"\r\n />\r\n</div>\r\n}", styles: [":host ::ng-deep .p-selectbutton .p-button.p-highlight{background:#183462!important;border:#183462;box-shadow:0 4px 10px #00000008,0 0 2px #0000000f,0 2px 6px #0000001f}\n"], dependencies: [{ kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$
|
|
5372
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvSelectButtonComponent, selector: "kv-select-button", inputs: { formGroup: "formGroup", formControlName: "formControlName", options: "options", optionLabel: "optionLabel", optionValue: "optionValue", mutiple: "mutiple", disabled: "disabled", value: "value" }, outputs: { onSelectionChange: "onSelectionChange", optionClick: "optionClick" }, ngImport: i0, template: "@if(value) {\r\n<p-selectButton\r\n [options]=\"options\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n (onChange)=\"selectionChange($event)\"\r\n (onOptionClick)=\"onOptionClick($event)\"\r\n [multiple]=\"mutiple\"\r\n [disabled]=\"disabled\"\r\n [(ngModel)]=\"value\"\r\n/>\r\n} @else {\r\n<div [formGroup]=\"formGroup\">\r\n <p-selectButton\r\n [options]=\"options\"\r\n [optionLabel]=\"optionLabel\"\r\n [optionValue]=\"optionValue\"\r\n (onChange)=\"selectionChange($event)\"\r\n (onOptionClick)=\"onOptionClick($event)\"\r\n [multiple]=\"mutiple\"\r\n [disabled]=\"disabled\"\r\n [formControlName]=\"formControlName\"\r\n [(ngModel)]=\"value\"\r\n />\r\n</div>\r\n}", styles: [":host ::ng-deep .p-selectbutton .p-button.p-highlight{background:#183462!important;border:#183462;box-shadow:0 4px 10px #00000008,0 0 2px #0000000f,0 2px 6px #0000001f}\n"], dependencies: [{ kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$3.SelectButton, selector: "p-selectButton", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "unselectable", "tabindex", "multiple", "allowEmpty", "style", "styleClass", "ariaLabelledBy", "disabled", "dataKey", "autofocus"], outputs: ["onOptionClick", "onChange"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
|
|
5753
5373
|
}
|
|
5754
5374
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvSelectButtonComponent, decorators: [{
|
|
5755
5375
|
type: Component,
|
|
@@ -5840,11 +5460,11 @@ class KvTreeMultiSelectComponent extends BaseComponentMultiSelect {
|
|
|
5840
5460
|
this.handleChips();
|
|
5841
5461
|
}
|
|
5842
5462
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTreeMultiSelectComponent, deps: [{ token: ComponentService }, { token: i2$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5843
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvTreeMultiSelectComponent, selector: "kv-tree-multi-select", inputs: { appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: false, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: false, isRequired: false, transformFunction: null }, itemTemplates: { classPropertyName: "itemTemplates", publicName: "itemTemplates", isSignal: false, isRequired: false, transformFunction: null }, propagateSelectionDown: { classPropertyName: "propagateSelectionDown", publicName: "propagateSelectionDown", isSignal: true, isRequired: false, transformFunction: null }, propagateSelectionUp: { classPropertyName: "propagateSelectionUp", publicName: "propagateSelectionUp", isSignal: true, isRequired: false, transformFunction: null } }, providers: ComponentProviders(KvTreeMultiSelectComponent), usesInheritance: true, ngImport: i0, template: "<span>\r\n <kv-label\r\n [componentId]=\"componentId\"\r\n [label]=\"label && label + (showAsterisk ? '*' : '')\"\r\n />\r\n\r\n <p-treeSelect\r\n inputId=\"tree-multi-select\"\r\n [class]=\"baseInputClass\"\r\n [disabled]=\"disabled\"\r\n [options]=\"options\"\r\n [filter]=\"filter\"\r\n [showClear]=\"showClear\"\r\n [(ngModel)]=\"value\"\r\n (onNodeSelect)=\"selectionChange($event)\"\r\n (onNodeUnselect)=\"selectionChange($event)\"\r\n (onPanelHide)=\"panelHide($event)\"\r\n [appendTo]=\"appendTo\"\r\n [metaKeySelection]=\"false\"\r\n styleClass=\"inputs\"\r\n containerStyleClass=\"inputs\"\r\n selectionMode=\"checkbox\"\r\n display=\"chip\"\r\n [propagateSelectionDown]=\"propagateSelectionDown()\"\r\n [propagateSelectionUp]=\"propagateSelectionUp()\"\r\n >\r\n <ng-template let-value pTemplate=\"value\" class=\"w-full\">\r\n <div\r\n class=\"p-multiselect p-multiselect-chip p-multiselect-label w-full flex flex-nowrap\"\r\n >\r\n <div\r\n #token\r\n *ngFor=\"let chip of chips; let i = index\"\r\n class=\"p-multiselect-token\"\r\n >\r\n <span class=\"p-multiselect-token-label\">{{ chip.label }}</span>\r\n\r\n <TimesCircleIcon\r\n [styleClass]=\"'p-multiselect-token-icon'\"\r\n (click)=\"removerChip(chip, $event)\"\r\n [attr.data-pc-section]=\"'clearicon'\"\r\n [attr.aria-hidden]=\"true\"\r\n />\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n @for (templateItem of itemTemplates; track $index) {\r\n <ng-template let-node [pTemplate]=\"templateItem.type\">\r\n @if(templateItem.template) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"templateItem.template\"\r\n [ngTemplateOutletContext]=\"{ $implicit: node }\"\r\n >\r\n </ng-container>\r\n }\r\n </ng-template>\r\n\r\n }\r\n\r\n <ng-template let-node pTemplate=\"default\">\r\n {{ node.label }}\r\n </ng-template>\r\n </p-treeSelect>\r\n\r\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\r\n</span>\r\n<ng-content></ng-content>\r\n", styles: [":host ::ng-deep .disable .p-treeselect.p-treeselect-chip .p-treeselect-token .p-icon-wrapper{display:none!important}::ng-deep .p-treeselect.p-treeselect-chip .p-treeselect-token{padding:.1rem .4rem}::ng-deep .p-treeselect-label{padding:0rem;display:flex}::ng-deep .p-treeselect-item{font-size:.875rem;padding:.5rem;text-overflow:ellipsis;width:100%}::ng-deep .p-treeselect{width:100%}::ng-deep p-treeselect p-overlay .p-overlay{max-width:100%}::ng-deep .p-treeselect-items-wrapper .p-treeselect-items{padding:.75rem}::ng-deep .p-treeselect-filter{height:1.875rem}::ng-deep .p-treeselect-panel .p-treeselect-items .p-treeselect-empty-message{padding:.75rem;font-size:.875rem}::ng-deep .p-treeselect-panel .p-treeselect-header{padding:.5rem}:host ::ng-deep .p-chips .p-chips-multiple-container .p-chips-token{padding:.1rem .4rem;transform:translateY(-3px)}:host ::ng-deep .p-chips .p-chips-multiple-container{border:none}:host ::ng-deep .p-chip{background:red;padding:.1rem .4rem;font-size:.875rem;margin-right:.5rem;background:#e5e7eb;color:#4b5563;border-radius:16px;height:15px}::ng-deep .p-multiselect.p-multiselect-chip .p-multiselect-token{padding:.1rem .4rem}:host ::ng-deep .p-multiselect.p-multiselect-chip.p-multiselect-label{border:none}:host ::ng-deep .p-treeselect-label,:host ::ng-deep .p-multiselect-label{width:100%;padding:.09rem .4rem;display:flex}:host ::ng-deep .p-multiselect-token{max-width:max-content}\n", "@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0\";::ng-deep :root{--kv-primary-color: 41, 185, 45;--kv-secondary-color: 0, 37, 66;--kv-tertiary-color: 165, 165, 165}.material-symbols-outlined{font-family:Material Symbols Outlined!important}*{font-family:Inter var,Inter,sans-serif!important}::ng-deep .p-accordion,::ng-deep .p-accordion-header,::ng-deep .p-accordion-content,::ng-deep .p-badge,::ng-deep .p-overlay-badge,::ng-deep .p-breadcrumb,::ng-deep .p-breadcrumb-item,::ng-deep .p-breadcrumb-link,::ng-deep .p-button,::ng-deep .p-calendar,::ng-deep .p-card,::ng-deep .p-card-title,::ng-deep .p-card-subtitle,::ng-deep .p-card-content,::ng-deep .p-checkbox,::ng-deep .p-chip,::ng-deep .p-confirm-dialog,::ng-deep .p-confirm-dialog-message,::ng-deep .p-contextmenu,::ng-deep .p-contextmenu-item,::ng-deep .p-dataview,::ng-deep .p-dataview-content,::ng-deep .p-dialog,::ng-deep .p-dialog-title,::ng-deep .p-dialog-content,::ng-deep .p-dropdown,::ng-deep .p-dropdown-label,::ng-deep .p-dropdown-item,::ng-deep .p-dynamic-dialog,::ng-deep .p-dynamic-dialog-title,::ng-deep .p-dynamic-dialog-content,::ng-deep .p-editor,::ng-deep .p-fieldset,::ng-deep .p-fieldset-legend,::ng-deep .p-fieldset-content,::ng-deep .p-fileupload,::ng-deep .p-inputmask,::ng-deep .p-inputnumber,::ng-deep .p-inputtextarea,::ng-deep .p-inputtext,::ng-deep .p-menu,::ng-deep .p-menuitem,::ng-deep .p-menuitem-text,::ng-deep .p-message,::ng-deep .p-messages,::ng-deep .p-multiselect,::ng-deep .p-multiselect-label,::ng-deep .p-multiselect-item,::ng-deep .p-panelmenu,::ng-deep .p-panelmenu-header,::ng-deep .p-panelmenu-content,::ng-deep .p-panel,::ng-deep .p-panel-header,::ng-deep .p-panel-content,::ng-deep .p-password,::ng-deep .p-picklist,::ng-deep .p-progressbar,::ng-deep .p-radiobutton,::ng-deep .p-rating,::ng-deep .p-sidebar,::ng-deep .p-splitbutton,::ng-deep .p-steps,::ng-deep .p-step,::ng-deep .p-table,::ng-deep .p-datatable,::ng-deep .p-tabview,::ng-deep .p-tabpanel,::ng-deep .p-tag,::ng-deep .p-toast,::ng-deep .p-toolbar,::ng-deep .p-tooltip,::ng-deep .p-tree,::ng-deep .p-treetable,::ng-deep .p-selectbutton,::ng-deep .p-stepper,::ng-deep .p-inputgroup,::ng-deep .p-inputgroup-addon,::ng-deep .p-text{font-family:Inter var,Inter,sans-serif!important}:host ::ng-deep .inputs{height:1.875rem}:host ::ng-deep .inputs,.p-inputtext,.p-inputtextarea{font-size:.875rem}::ng-deep .p-dialog .p-dialog-header{color:#fff!important;background:#002542!important;display:flex!important;flex-wrap:wrap;word-wrap:break-word}::ng-deep .p-dialog .p-dialog-content{padding-top:1rem}::ng-deep .p-dialog{min-width:320px}::ng-deep .p-dialog-content{overflow-x:hidden}::ng-deep .p-dialog-content::-webkit-scrollbar{width:8px}::ng-deep .p-dialog-content::-webkit-scrollbar:hover{background-color:#dededebf}::ng-deep .p-dialog-content::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}::ng-deep .p-dialog-content:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}::ng-deep .p-dialog-content::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}::ng-deep .p-dialog-footer{display:flex;justify-content:flex-end;padding:10px;gap:10px}::ng-deep .p-dialog .p-dialog-header .p-dialog-header-icon{display:none}::ng-deep .p-tooltip{font-size:.825rem!important}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KvErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: KvLabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i7$2.TreeSelect, selector: "p-treeSelect", inputs: ["inputId", "scrollHeight", "disabled", "metaKeySelection", "variant", "display", "selectionMode", "tabindex", "ariaLabel", "ariaLabelledBy", "placeholder", "panelClass", "panelStyle", "panelStyleClass", "containerStyle", "containerStyleClass", "labelStyle", "labelStyleClass", "overlayOptions", "emptyMessage", "appendTo", "filter", "filterBy", "filterMode", "filterPlaceholder", "filterLocale", "filterInputAutoFocus", "propagateSelectionDown", "propagateSelectionUp", "showClear", "resetFilterOnHide", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autofocus", "options", "showTransitionOptions", "hideTransitionOptions", "loading"], outputs: ["onNodeExpand", "onNodeCollapse", "onShow", "onHide", "onClear", "onFilter", "onFocus", "onBlur", "onNodeUnselect", "onNodeSelect"] }, { kind: "component", type: i8$3.TimesCircleIcon, selector: "TimesCircleIcon" }] }); }
|
|
5463
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvTreeMultiSelectComponent, selector: "kv-tree-multi-select", inputs: { appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: false, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: false, isRequired: false, transformFunction: null }, itemTemplates: { classPropertyName: "itemTemplates", publicName: "itemTemplates", isSignal: false, isRequired: false, transformFunction: null }, propagateSelectionDown: { classPropertyName: "propagateSelectionDown", publicName: "propagateSelectionDown", isSignal: true, isRequired: false, transformFunction: null }, propagateSelectionUp: { classPropertyName: "propagateSelectionUp", publicName: "propagateSelectionUp", isSignal: true, isRequired: false, transformFunction: null } }, providers: ComponentProviders(KvTreeMultiSelectComponent), usesInheritance: true, ngImport: i0, template: "<span>\n <kv-label\n [componentId]=\"componentId\"\n [label]=\"label && label + (showAsterisk ? '*' : '')\"\n />\n\n <p-treeSelect\n inputId=\"tree-multi-select\"\n [class]=\"baseInputClass\"\n [disabled]=\"disabled\"\n [options]=\"options\"\n [filter]=\"filter\"\n [showClear]=\"showClear\"\n [(ngModel)]=\"value\"\n (onNodeSelect)=\"selectionChange($event)\"\n (onNodeUnselect)=\"selectionChange($event)\"\n (onPanelHide)=\"panelHide($event)\"\n [appendTo]=\"appendTo\"\n [metaKeySelection]=\"false\"\n styleClass=\"inputs\"\n containerStyleClass=\"inputs\"\n selectionMode=\"checkbox\"\n display=\"chip\"\n [propagateSelectionDown]=\"propagateSelectionDown()\"\n [propagateSelectionUp]=\"propagateSelectionUp()\"\n >\n <ng-template let-value pTemplate=\"value\" class=\"w-full\">\n <div\n class=\"p-multiselect p-multiselect-chip p-multiselect-label w-full flex flex-nowrap\"\n >\n <div\n #token\n *ngFor=\"let chip of chips; let i = index\"\n class=\"p-multiselect-token\"\n >\n <span class=\"p-multiselect-token-label\">{{ chip.label }}</span>\n\n <TimesCircleIcon\n [styleClass]=\"'p-multiselect-token-icon'\"\n (click)=\"removerChip(chip, $event)\"\n [attr.data-pc-section]=\"'clearicon'\"\n [attr.aria-hidden]=\"true\"\n />\n </div>\n </div>\n </ng-template>\n\n @for (templateItem of itemTemplates; track $index) {\n <ng-template let-node [pTemplate]=\"templateItem.type\">\n @if(templateItem.template) {\n <ng-container\n [ngTemplateOutlet]=\"templateItem.template\"\n [ngTemplateOutletContext]=\"{ $implicit: node }\"\n >\n </ng-container>\n }\n </ng-template>\n\n }\n\n <ng-template let-node pTemplate=\"default\">\n {{ node.label }}\n </ng-template>\n </p-treeSelect>\n\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\n</span>\n<ng-content></ng-content>\n", styles: [":host ::ng-deep .disable .p-treeselect.p-treeselect-chip .p-treeselect-token .p-icon-wrapper{display:none!important}::ng-deep .p-treeselect.p-treeselect-chip .p-treeselect-token{padding:.1rem .4rem}::ng-deep .p-treeselect-label{padding:0rem;display:flex}::ng-deep .p-treeselect-item{font-size:.875rem;padding:.5rem;text-overflow:ellipsis;width:100%}::ng-deep .p-treeselect{width:100%}::ng-deep p-treeselect p-overlay .p-overlay{max-width:100%}::ng-deep .p-treeselect-items-wrapper .p-treeselect-items{padding:.75rem}::ng-deep .p-treeselect-filter{height:1.875rem}::ng-deep .p-treeselect-panel .p-treeselect-items .p-treeselect-empty-message{padding:.75rem;font-size:.875rem}::ng-deep .p-treeselect-panel .p-treeselect-header{padding:.5rem}:host ::ng-deep .p-chips .p-chips-multiple-container .p-chips-token{padding:.1rem .4rem;transform:translateY(-3px)}:host ::ng-deep .p-chips .p-chips-multiple-container{border:none}:host ::ng-deep .p-chip{background:red;padding:.1rem .4rem;font-size:.875rem;margin-right:.5rem;background:#e5e7eb;color:#4b5563;border-radius:16px;height:15px}::ng-deep .p-multiselect.p-multiselect-chip .p-multiselect-token{padding:.1rem .4rem}:host ::ng-deep .p-multiselect.p-multiselect-chip.p-multiselect-label{border:none}:host ::ng-deep .p-treeselect-label,:host ::ng-deep .p-multiselect-label{width:100%;padding:.09rem .4rem;display:flex}:host ::ng-deep .p-multiselect-token{max-width:max-content}\n", "@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0\";::ng-deep :root{--kv-primary-color: 41, 185, 45;--kv-secondary-color: 0, 37, 66;--kv-tertiary-color: 165, 165, 165}.material-symbols-outlined{font-family:Material Symbols Outlined!important}*{font-family:Inter var,Inter,sans-serif!important}::ng-deep .p-accordion,::ng-deep .p-accordion-header,::ng-deep .p-accordion-content,::ng-deep .p-badge,::ng-deep .p-overlay-badge,::ng-deep .p-breadcrumb,::ng-deep .p-breadcrumb-item,::ng-deep .p-breadcrumb-link,::ng-deep .p-button,::ng-deep .p-calendar,::ng-deep .p-card,::ng-deep .p-card-title,::ng-deep .p-card-subtitle,::ng-deep .p-card-content,::ng-deep .p-checkbox,::ng-deep .p-chip,::ng-deep .p-confirm-dialog,::ng-deep .p-confirm-dialog-message,::ng-deep .p-contextmenu,::ng-deep .p-contextmenu-item,::ng-deep .p-dataview,::ng-deep .p-dataview-content,::ng-deep .p-dialog,::ng-deep .p-dialog-title,::ng-deep .p-dialog-content,::ng-deep .p-dropdown,::ng-deep .p-dropdown-label,::ng-deep .p-dropdown-item,::ng-deep .p-dynamic-dialog,::ng-deep .p-dynamic-dialog-title,::ng-deep .p-dynamic-dialog-content,::ng-deep .p-editor,::ng-deep .p-fieldset,::ng-deep .p-fieldset-legend,::ng-deep .p-fieldset-content,::ng-deep .p-fileupload,::ng-deep .p-inputmask,::ng-deep .p-inputnumber,::ng-deep .p-inputtextarea,::ng-deep .p-inputtext,::ng-deep .p-menu,::ng-deep .p-menuitem,::ng-deep .p-menuitem-text,::ng-deep .p-message,::ng-deep .p-messages,::ng-deep .p-multiselect,::ng-deep .p-multiselect-label,::ng-deep .p-multiselect-item,::ng-deep .p-panelmenu,::ng-deep .p-panelmenu-header,::ng-deep .p-panelmenu-content,::ng-deep .p-panel,::ng-deep .p-panel-header,::ng-deep .p-panel-content,::ng-deep .p-password,::ng-deep .p-picklist,::ng-deep .p-progressbar,::ng-deep .p-radiobutton,::ng-deep .p-rating,::ng-deep .p-sidebar,::ng-deep .p-splitbutton,::ng-deep .p-steps,::ng-deep .p-step,::ng-deep .p-table,::ng-deep .p-datatable,::ng-deep .p-tabview,::ng-deep .p-tabpanel,::ng-deep .p-tag,::ng-deep .p-toast,::ng-deep .p-toolbar,::ng-deep .p-tooltip,::ng-deep .p-tree,::ng-deep .p-treetable,::ng-deep .p-selectbutton,::ng-deep .p-stepper,::ng-deep .p-inputgroup,::ng-deep .p-inputgroup-addon,::ng-deep .p-text{font-family:Inter var,Inter,sans-serif!important}:host ::ng-deep .inputs{height:1.875rem}:host ::ng-deep .inputs,.p-inputtext,.p-inputtextarea{font-size:.875rem}::ng-deep .p-dialog .p-dialog-header{color:#fff!important;background:#002542!important;display:flex!important;flex-wrap:wrap;word-wrap:break-word}::ng-deep .p-dialog .p-dialog-content{padding-top:1rem}::ng-deep .p-dialog{min-width:320px}::ng-deep .p-dialog-content{overflow-x:hidden}::ng-deep .p-dialog-content::-webkit-scrollbar{width:8px}::ng-deep .p-dialog-content::-webkit-scrollbar:hover{background-color:#dededebf}::ng-deep .p-dialog-content::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}::ng-deep .p-dialog-content:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}::ng-deep .p-dialog-content::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}::ng-deep .p-dialog-footer{display:flex;justify-content:flex-end;padding:10px;gap:10px}::ng-deep .p-dialog .p-dialog-header .p-dialog-header-icon{display:none}::ng-deep .p-tooltip{font-size:.825rem!important}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: KvErrorComponent, selector: "kv-error", inputs: ["formControl", "hasError"] }, { kind: "component", type: KvLabelComponent, selector: "kv-label", inputs: ["componentId", "label"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i7$2.TreeSelect, selector: "p-treeSelect", inputs: ["inputId", "scrollHeight", "disabled", "metaKeySelection", "variant", "display", "selectionMode", "tabindex", "ariaLabel", "ariaLabelledBy", "placeholder", "panelClass", "panelStyle", "panelStyleClass", "containerStyle", "containerStyleClass", "labelStyle", "labelStyleClass", "overlayOptions", "emptyMessage", "appendTo", "filter", "filterBy", "filterMode", "filterPlaceholder", "filterLocale", "filterInputAutoFocus", "propagateSelectionDown", "propagateSelectionUp", "showClear", "resetFilterOnHide", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autofocus", "options", "showTransitionOptions", "hideTransitionOptions", "loading"], outputs: ["onNodeExpand", "onNodeCollapse", "onShow", "onHide", "onClear", "onFilter", "onFocus", "onBlur", "onNodeUnselect", "onNodeSelect"] }, { kind: "component", type: i8$3.TimesCircleIcon, selector: "TimesCircleIcon" }] }); }
|
|
5844
5464
|
}
|
|
5845
5465
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTreeMultiSelectComponent, decorators: [{
|
|
5846
5466
|
type: Component,
|
|
5847
|
-
args: [{ selector: 'kv-tree-multi-select', providers: ComponentProviders(KvTreeMultiSelectComponent), template: "<span>\
|
|
5467
|
+
args: [{ selector: 'kv-tree-multi-select', providers: ComponentProviders(KvTreeMultiSelectComponent), template: "<span>\n <kv-label\n [componentId]=\"componentId\"\n [label]=\"label && label + (showAsterisk ? '*' : '')\"\n />\n\n <p-treeSelect\n inputId=\"tree-multi-select\"\n [class]=\"baseInputClass\"\n [disabled]=\"disabled\"\n [options]=\"options\"\n [filter]=\"filter\"\n [showClear]=\"showClear\"\n [(ngModel)]=\"value\"\n (onNodeSelect)=\"selectionChange($event)\"\n (onNodeUnselect)=\"selectionChange($event)\"\n (onPanelHide)=\"panelHide($event)\"\n [appendTo]=\"appendTo\"\n [metaKeySelection]=\"false\"\n styleClass=\"inputs\"\n containerStyleClass=\"inputs\"\n selectionMode=\"checkbox\"\n display=\"chip\"\n [propagateSelectionDown]=\"propagateSelectionDown()\"\n [propagateSelectionUp]=\"propagateSelectionUp()\"\n >\n <ng-template let-value pTemplate=\"value\" class=\"w-full\">\n <div\n class=\"p-multiselect p-multiselect-chip p-multiselect-label w-full flex flex-nowrap\"\n >\n <div\n #token\n *ngFor=\"let chip of chips; let i = index\"\n class=\"p-multiselect-token\"\n >\n <span class=\"p-multiselect-token-label\">{{ chip.label }}</span>\n\n <TimesCircleIcon\n [styleClass]=\"'p-multiselect-token-icon'\"\n (click)=\"removerChip(chip, $event)\"\n [attr.data-pc-section]=\"'clearicon'\"\n [attr.aria-hidden]=\"true\"\n />\n </div>\n </div>\n </ng-template>\n\n @for (templateItem of itemTemplates; track $index) {\n <ng-template let-node [pTemplate]=\"templateItem.type\">\n @if(templateItem.template) {\n <ng-container\n [ngTemplateOutlet]=\"templateItem.template\"\n [ngTemplateOutletContext]=\"{ $implicit: node }\"\n >\n </ng-container>\n }\n </ng-template>\n\n }\n\n <ng-template let-node pTemplate=\"default\">\n {{ node.label }}\n </ng-template>\n </p-treeSelect>\n\n <kv-error [hasError]=\"hasControlError()\">{{ erroMessage() }}</kv-error>\n</span>\n<ng-content></ng-content>\n", styles: [":host ::ng-deep .disable .p-treeselect.p-treeselect-chip .p-treeselect-token .p-icon-wrapper{display:none!important}::ng-deep .p-treeselect.p-treeselect-chip .p-treeselect-token{padding:.1rem .4rem}::ng-deep .p-treeselect-label{padding:0rem;display:flex}::ng-deep .p-treeselect-item{font-size:.875rem;padding:.5rem;text-overflow:ellipsis;width:100%}::ng-deep .p-treeselect{width:100%}::ng-deep p-treeselect p-overlay .p-overlay{max-width:100%}::ng-deep .p-treeselect-items-wrapper .p-treeselect-items{padding:.75rem}::ng-deep .p-treeselect-filter{height:1.875rem}::ng-deep .p-treeselect-panel .p-treeselect-items .p-treeselect-empty-message{padding:.75rem;font-size:.875rem}::ng-deep .p-treeselect-panel .p-treeselect-header{padding:.5rem}:host ::ng-deep .p-chips .p-chips-multiple-container .p-chips-token{padding:.1rem .4rem;transform:translateY(-3px)}:host ::ng-deep .p-chips .p-chips-multiple-container{border:none}:host ::ng-deep .p-chip{background:red;padding:.1rem .4rem;font-size:.875rem;margin-right:.5rem;background:#e5e7eb;color:#4b5563;border-radius:16px;height:15px}::ng-deep .p-multiselect.p-multiselect-chip .p-multiselect-token{padding:.1rem .4rem}:host ::ng-deep .p-multiselect.p-multiselect-chip.p-multiselect-label{border:none}:host ::ng-deep .p-treeselect-label,:host ::ng-deep .p-multiselect-label{width:100%;padding:.09rem .4rem;display:flex}:host ::ng-deep .p-multiselect-token{max-width:max-content}\n", "@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap\";@import\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0\";::ng-deep :root{--kv-primary-color: 41, 185, 45;--kv-secondary-color: 0, 37, 66;--kv-tertiary-color: 165, 165, 165}.material-symbols-outlined{font-family:Material Symbols Outlined!important}*{font-family:Inter var,Inter,sans-serif!important}::ng-deep .p-accordion,::ng-deep .p-accordion-header,::ng-deep .p-accordion-content,::ng-deep .p-badge,::ng-deep .p-overlay-badge,::ng-deep .p-breadcrumb,::ng-deep .p-breadcrumb-item,::ng-deep .p-breadcrumb-link,::ng-deep .p-button,::ng-deep .p-calendar,::ng-deep .p-card,::ng-deep .p-card-title,::ng-deep .p-card-subtitle,::ng-deep .p-card-content,::ng-deep .p-checkbox,::ng-deep .p-chip,::ng-deep .p-confirm-dialog,::ng-deep .p-confirm-dialog-message,::ng-deep .p-contextmenu,::ng-deep .p-contextmenu-item,::ng-deep .p-dataview,::ng-deep .p-dataview-content,::ng-deep .p-dialog,::ng-deep .p-dialog-title,::ng-deep .p-dialog-content,::ng-deep .p-dropdown,::ng-deep .p-dropdown-label,::ng-deep .p-dropdown-item,::ng-deep .p-dynamic-dialog,::ng-deep .p-dynamic-dialog-title,::ng-deep .p-dynamic-dialog-content,::ng-deep .p-editor,::ng-deep .p-fieldset,::ng-deep .p-fieldset-legend,::ng-deep .p-fieldset-content,::ng-deep .p-fileupload,::ng-deep .p-inputmask,::ng-deep .p-inputnumber,::ng-deep .p-inputtextarea,::ng-deep .p-inputtext,::ng-deep .p-menu,::ng-deep .p-menuitem,::ng-deep .p-menuitem-text,::ng-deep .p-message,::ng-deep .p-messages,::ng-deep .p-multiselect,::ng-deep .p-multiselect-label,::ng-deep .p-multiselect-item,::ng-deep .p-panelmenu,::ng-deep .p-panelmenu-header,::ng-deep .p-panelmenu-content,::ng-deep .p-panel,::ng-deep .p-panel-header,::ng-deep .p-panel-content,::ng-deep .p-password,::ng-deep .p-picklist,::ng-deep .p-progressbar,::ng-deep .p-radiobutton,::ng-deep .p-rating,::ng-deep .p-sidebar,::ng-deep .p-splitbutton,::ng-deep .p-steps,::ng-deep .p-step,::ng-deep .p-table,::ng-deep .p-datatable,::ng-deep .p-tabview,::ng-deep .p-tabpanel,::ng-deep .p-tag,::ng-deep .p-toast,::ng-deep .p-toolbar,::ng-deep .p-tooltip,::ng-deep .p-tree,::ng-deep .p-treetable,::ng-deep .p-selectbutton,::ng-deep .p-stepper,::ng-deep .p-inputgroup,::ng-deep .p-inputgroup-addon,::ng-deep .p-text{font-family:Inter var,Inter,sans-serif!important}:host ::ng-deep .inputs{height:1.875rem}:host ::ng-deep .inputs,.p-inputtext,.p-inputtextarea{font-size:.875rem}::ng-deep .p-dialog .p-dialog-header{color:#fff!important;background:#002542!important;display:flex!important;flex-wrap:wrap;word-wrap:break-word}::ng-deep .p-dialog .p-dialog-content{padding-top:1rem}::ng-deep .p-dialog{min-width:320px}::ng-deep .p-dialog-content{overflow-x:hidden}::ng-deep .p-dialog-content::-webkit-scrollbar{width:8px}::ng-deep .p-dialog-content::-webkit-scrollbar:hover{background-color:#dededebf}::ng-deep .p-dialog-content::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}::ng-deep .p-dialog-content:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}::ng-deep .p-dialog-content::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}::ng-deep .p-dialog-footer{display:flex;justify-content:flex-end;padding:10px;gap:10px}::ng-deep .p-dialog .p-dialog-header .p-dialog-header-icon{display:none}::ng-deep .p-tooltip{font-size:.825rem!important}\n"] }]
|
|
5848
5468
|
}], ctorParameters: () => [{ type: ComponentService }, { type: i2$1.FormBuilder }], propDecorators: { appendTo: [{
|
|
5849
5469
|
type: Input
|
|
5850
5470
|
}], options: [{
|
|
@@ -8967,7 +8587,7 @@ class KvFilterFieldsetComponent {
|
|
|
8967
8587
|
this.collapsedEvent.emit(this.isCollapsed);
|
|
8968
8588
|
}
|
|
8969
8589
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvFilterFieldsetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8970
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvFilterFieldsetComponent, selector: "kv-filter-fieldset", inputs: { isExpandable: "isExpandable" }, outputs: { collapsedEvent: "collapsedEvent" }, ngImport: i0, template: "<p-fieldset styleClass=\"p-0 mb-2\">\r\n <ng-template pTemplate=\"header\">\r\n @if(isExpandable) {\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center {{\r\n isExpandable && 'cursor-pointer'\r\n }}\"\r\n (click)=\"toggleField()\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center justify-content-center mr-1\"\r\n style=\"font-size: 1.2rem\"\r\n >\r\n {{ isCollapsed ? \"remove\" : \"add\" }}\r\n </span>\r\n\r\n <span class=\"text-xs\"> Filtros </span>\r\n </div>\r\n } @if(!isExpandable) {\r\n <span class=\"text-xs\"> Filtros </span>\r\n }\r\n </ng-template>\r\n\r\n <ng-content></ng-content>\r\n</p-fieldset>\r\n", styles: ["::ng-deep .p-fieldset .p-fieldset-legend{padding:.1rem .1rem 0rem!important;margin-left:1rem}::ng-deep .p-fieldset .p-fieldset-legend{background-color:#fff;border:none}::ng-deep .p-fieldset .p-fieldset-legend:hover{background-color:#f5f5f5}::ng-deep .p-fieldset .p-fieldset-legend:active{background-color:#e0e0e0}::ng-deep .p-fieldset .p-fieldset-content{padding:0 .5rem .5rem}\n"], dependencies: [{ kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i2$
|
|
8590
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvFilterFieldsetComponent, selector: "kv-filter-fieldset", inputs: { isExpandable: "isExpandable" }, outputs: { collapsedEvent: "collapsedEvent" }, ngImport: i0, template: "<p-fieldset styleClass=\"p-0 mb-2\">\r\n <ng-template pTemplate=\"header\">\r\n @if(isExpandable) {\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center {{\r\n isExpandable && 'cursor-pointer'\r\n }}\"\r\n (click)=\"toggleField()\"\r\n >\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center justify-content-center mr-1\"\r\n style=\"font-size: 1.2rem\"\r\n >\r\n {{ isCollapsed ? \"remove\" : \"add\" }}\r\n </span>\r\n\r\n <span class=\"text-xs\"> Filtros </span>\r\n </div>\r\n } @if(!isExpandable) {\r\n <span class=\"text-xs\"> Filtros </span>\r\n }\r\n </ng-template>\r\n\r\n <ng-content></ng-content>\r\n</p-fieldset>\r\n", styles: ["::ng-deep .p-fieldset .p-fieldset-legend{padding:.1rem .1rem 0rem!important;margin-left:1rem}::ng-deep .p-fieldset .p-fieldset-legend{background-color:#fff;border:none}::ng-deep .p-fieldset .p-fieldset-legend:hover{background-color:#f5f5f5}::ng-deep .p-fieldset .p-fieldset-legend:active{background-color:#e0e0e0}::ng-deep .p-fieldset .p-fieldset-content{padding:0 .5rem .5rem}\n"], dependencies: [{ kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i2$4.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }] }); }
|
|
8971
8591
|
}
|
|
8972
8592
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvFilterFieldsetComponent, decorators: [{
|
|
8973
8593
|
type: Component,
|