@seniorsistemas/angular-components 17.8.2 → 17.8.4

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.
Files changed (44) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +1372 -1282
  2. package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
  4. package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
  5. package/components/dynamic-form/components/fields/profile-picture/profile-picture-field.component.d.ts +6 -0
  6. package/components/dynamic-form/components/fields/profile-picture/profile-picture-field.module.d.ts +2 -0
  7. package/components/dynamic-form/configurations/field-type.d.ts +2 -1
  8. package/components/dynamic-form/configurations/fields/profile-picture.d.ts +36 -0
  9. package/components/profile-picture-picker/models/index.d.ts +3 -2
  10. package/components/profile-picture-picker/models/profile-picture-picker-data.d.ts +4 -0
  11. package/components/profile-picture-picker/profile-picture-picker.component.d.ts +14 -5
  12. package/esm2015/components/dynamic-form/components/fields/profile-picture/profile-picture-field.component.js +17 -0
  13. package/esm2015/components/dynamic-form/components/fields/profile-picture/profile-picture-field.module.js +22 -0
  14. package/esm2015/components/dynamic-form/configurations/field-type.js +2 -1
  15. package/esm2015/components/dynamic-form/configurations/fields/profile-picture.js +21 -0
  16. package/esm2015/components/dynamic-form/configurations/form-field.js +4 -1
  17. package/esm2015/components/dynamic-form/dynamic-form.js +4 -1
  18. package/esm2015/components/dynamic-form/dynamic-form.module.js +3 -1
  19. package/esm2015/components/profile-picture-picker/models/index.js +1 -1
  20. package/esm2015/components/profile-picture-picker/models/profile-picture-picker-data.js +1 -0
  21. package/esm2015/components/profile-picture-picker/profile-picture-picker.component.js +35 -16
  22. package/esm2015/components/profile-picture-picker/profile-picture-picker.module.js +6 -4
  23. package/esm2015/locale/fallback.js +6 -1
  24. package/esm2015/seniorsistemas-angular-components.js +61 -59
  25. package/esm5/components/dynamic-form/components/fields/profile-picture/profile-picture-field.component.js +20 -0
  26. package/esm5/components/dynamic-form/components/fields/profile-picture/profile-picture-field.module.js +25 -0
  27. package/esm5/components/dynamic-form/configurations/field-type.js +2 -1
  28. package/esm5/components/dynamic-form/configurations/fields/profile-picture.js +26 -0
  29. package/esm5/components/dynamic-form/configurations/form-field.js +4 -1
  30. package/esm5/components/dynamic-form/dynamic-form.js +4 -1
  31. package/esm5/components/dynamic-form/dynamic-form.module.js +3 -1
  32. package/esm5/components/profile-picture-picker/models/index.js +1 -1
  33. package/esm5/components/profile-picture-picker/models/profile-picture-picker-data.js +1 -0
  34. package/esm5/components/profile-picture-picker/profile-picture-picker.component.js +35 -15
  35. package/esm5/components/profile-picture-picker/profile-picture-picker.module.js +6 -4
  36. package/esm5/locale/fallback.js +6 -1
  37. package/esm5/seniorsistemas-angular-components.js +61 -59
  38. package/fesm2015/seniorsistemas-angular-components.js +3324 -3246
  39. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  40. package/fesm5/seniorsistemas-angular-components.js +1309 -1221
  41. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  42. package/package.json +1 -1
  43. package/seniorsistemas-angular-components.d.ts +60 -58
  44. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { __decorate, __assign, __extends, __spread, __awaiter, __generator, __param, __values, __rest, __read } from 'tslib';
2
- import { EventEmitter, Input, Output, Component, ContentChildren, ViewChild, HostListener, forwardRef, NgModule, ɵɵdefineInjectable, Injectable, ElementRef, ApplicationRef, ComponentFactoryResolver, Injector, Directive, KeyValueDiffers, HostBinding, Renderer2, TemplateRef, InjectionToken, Inject, ViewEncapsulation, ViewContainerRef, ChangeDetectorRef, Pipe, ɵɵinject, Optional, ContentChild, ViewChildren } from '@angular/core';
2
+ import { EventEmitter, Input, Output, Component, ContentChildren, ViewChild, HostListener, forwardRef, NgModule, ɵɵdefineInjectable, Injectable, ElementRef, ApplicationRef, ComponentFactoryResolver, Injector, Directive, KeyValueDiffers, HostBinding, Renderer2, TemplateRef, InjectionToken, Inject, ViewEncapsulation, ViewContainerRef, ChangeDetectorRef, Pipe, ɵɵinject, ContentChild, Optional, ViewChildren } from '@angular/core';
3
3
  import { trigger, transition, style as style$7, animate, state, group, query, animateChild } from '@angular/animations';
4
4
  import { Subject, of, from, ReplaySubject, throwError, forkJoin } from 'rxjs';
5
5
  import { takeUntil, tap, map, switchMap, catchError, first, filter, take, delay, debounceTime, repeat, finalize } from 'rxjs/operators';
@@ -50,11 +50,11 @@ import { MessageService, ConfirmationService } from 'primeng/api';
50
50
  import { ProgressBarModule as ProgressBarModule$1 } from 'primeng/progressbar';
51
51
  import { DomSanitizer } from '@angular/platform-browser';
52
52
  import { Clipboard } from '@angular/cdk/clipboard';
53
- import marked from 'marked';
53
+ import { ConfirmDialogModule } from 'primeng/confirmdialog';
54
54
  import Cropper from 'cropperjs';
55
+ import marked from 'marked';
55
56
  import { moveItemInArray, transferArrayItem, DragDropModule } from '@angular/cdk/drag-drop';
56
57
  import * as elementResizeDetectorMaker_ from 'element-resize-detector';
57
- import { ConfirmDialogModule } from 'primeng/confirmdialog';
58
58
  import { FocusTrapFactory, A11yModule } from '@angular/cdk/a11y';
59
59
  import { ScrollPanelModule } from 'primeng/scrollpanel';
60
60
  import { Sidebar, SidebarModule as SidebarModule$1 } from 'primeng/sidebar';
@@ -4410,6 +4410,7 @@ var FieldType;
4410
4410
  FieldType["Text"] = "Text";
4411
4411
  FieldType["TextIA"] = "TextIA";
4412
4412
  FieldType["Time"] = "Time";
4413
+ FieldType["ProfilePicture"] = "ProfilePicture";
4413
4414
  })(FieldType || (FieldType = {}));
4414
4415
 
4415
4416
  var FieldSize = /** @class */ (function () {
@@ -5016,6 +5017,29 @@ var CountryPhonePickerField = /** @class */ (function (_super) {
5016
5017
  return CountryPhonePickerField;
5017
5018
  }(Field));
5018
5019
 
5020
+ var ProfilePictureField = /** @class */ (function (_super) {
5021
+ __extends(ProfilePictureField, _super);
5022
+ function ProfilePictureField(config) {
5023
+ var _this = _super.call(this, config) || this;
5024
+ _this.simpleTitle = config.simpleTitle;
5025
+ _this.actionTitle = config.actionTitle;
5026
+ _this.subtitle = config.subtitle;
5027
+ _this.aspectRatio = config.aspectRatio;
5028
+ _this.cropperLabelsConfig = config.cropperLabelsConfig;
5029
+ _this.removeButtonLabel = config.removeButtonLabel;
5030
+ _this.changeButtonLabel = config.changeButtonLabel;
5031
+ _this.confirmationTexts = config.confirmationTexts;
5032
+ _this.maxFileSize = config.maxFileSize;
5033
+ _this.accept = config.accept;
5034
+ _this.supportedExtensions = config.supportedExtensions;
5035
+ _this.onChangeImage = config.onChangeImage;
5036
+ _this.onRemovedImage = config.onRemovedImage;
5037
+ _this.onInvalidFile = config.onInvalidFile;
5038
+ return _this;
5039
+ }
5040
+ return ProfilePictureField;
5041
+ }(Field));
5042
+
5019
5043
  var FormField = /** @class */ (function () {
5020
5044
  function FormField(config) {
5021
5045
  switch (config.type) {
@@ -5059,6 +5083,8 @@ var FormField = /** @class */ (function () {
5059
5083
  return new BlobField(config);
5060
5084
  case FieldType.Slider:
5061
5085
  return new SliderField(config);
5086
+ case FieldType.ProfilePicture:
5087
+ return new ProfilePictureField(config);
5062
5088
  case FieldType.Custom:
5063
5089
  var CustomFieldClass = config.CustomFieldClass, otherConfigs = __rest(config, ["CustomFieldClass"]);
5064
5090
  return new CustomFieldClass(otherConfigs);
@@ -9812,6 +9838,23 @@ var TextFieldComponent = /** @class */ (function (_super) {
9812
9838
  return TextFieldComponent;
9813
9839
  }(BaseFieldComponent));
9814
9840
 
9841
+ var ProfilePictureFieldComponent = /** @class */ (function () {
9842
+ function ProfilePictureFieldComponent() {
9843
+ }
9844
+ __decorate([
9845
+ Input()
9846
+ ], ProfilePictureFieldComponent.prototype, "field", void 0);
9847
+ __decorate([
9848
+ Input()
9849
+ ], ProfilePictureFieldComponent.prototype, "formControl", void 0);
9850
+ ProfilePictureFieldComponent = __decorate([
9851
+ Component({
9852
+ template: "<s-profile-picture-picker\n [formControl]=\"formControl\"\n [simpleTitle]=\"field.simpleTitle\"\n [actionTitle]=\"field.actionTitle\"\n [subtitle]=\"field.subtitle\"\n [aspectRatio]=\"field.aspectRatio\"\n [cropperLabelsConfig]=\"field.cropperLabelsConfig\"\n [removeButtonLabel]=\"field.removeButtonLabel\"\n [changeButtonLabel]=\"field.changeButtonLabel\"\n [confirmationTexts]=\"field.confirmationTexts\"\n [maxFileSize]=\"field.maxFileSize\"\n [accept]=\"field\"\n [supportedExtensions]=\"field.supportedExtensions\"\n (changedImage)=\"field.onChangeImage ? field.onChangeImage($event) : null\"\n (removedImage)=\"field.onRemovedImage ? field.onRemovedImage() : null\"\n (invalidFile)=\"field.onInvalidFile ? field.onInvalidFile($event) : null\">\n</s-profile-picture-picker>"
9853
+ })
9854
+ ], ProfilePictureFieldComponent);
9855
+ return ProfilePictureFieldComponent;
9856
+ }());
9857
+
9815
9858
  var DynamicForm = /** @class */ (function () {
9816
9859
  function DynamicForm(_a) {
9817
9860
  var group = _a.group, errorMessages = _a.errorMessages;
@@ -9894,6 +9937,8 @@ var DynamicField = /** @class */ (function (_super) {
9894
9937
  return FileUploadComponent$1;
9895
9938
  case FieldType.Slider:
9896
9939
  return SliderFieldComponent;
9940
+ case FieldType.ProfilePicture:
9941
+ return ProfilePictureFieldComponent;
9897
9942
  case FieldType.Custom:
9898
9943
  return this.field.CustomFieldComponentClass;
9899
9944
  default:
@@ -10247,155 +10292,896 @@ var NumberFieldModule$1 = /** @class */ (function () {
10247
10292
  return NumberFieldModule;
10248
10293
  }());
10249
10294
 
10250
- var DynamicFormModule = /** @class */ (function () {
10251
- function DynamicFormModule() {
10295
+ var HeaderComponent = /** @class */ (function () {
10296
+ function HeaderComponent() {
10252
10297
  }
10253
- DynamicFormModule = __decorate([
10298
+ HeaderComponent = __decorate([
10299
+ Component({
10300
+ selector: "s-header",
10301
+ template: "<ng-content></ng-content>"
10302
+ })
10303
+ ], HeaderComponent);
10304
+ return HeaderComponent;
10305
+ }());
10306
+
10307
+ var FooterComponent = /** @class */ (function () {
10308
+ function FooterComponent() {
10309
+ }
10310
+ FooterComponent = __decorate([
10311
+ Component({
10312
+ selector: "s-footer",
10313
+ template: "<ng-content></ng-content>"
10314
+ })
10315
+ ], FooterComponent);
10316
+ return FooterComponent;
10317
+ }());
10318
+
10319
+ var StructureModule = /** @class */ (function () {
10320
+ function StructureModule() {
10321
+ }
10322
+ StructureModule = __decorate([
10254
10323
  NgModule({
10255
- imports: [
10256
- AutoCompleteModule,
10257
- BignumberInputModule,
10258
- ButtonModule,
10259
- CalendarMaskModule,
10260
- CalendarModule,
10261
- CheckboxModule,
10262
- ChipsModule,
10263
- CommonModule,
10264
- ControlErrorsModule,
10265
- CountryPhonePickerModule,
10266
- DialogModule,
10267
- DropdownModule,
10268
- EmptyStateModule,
10269
- FormsModule,
10270
- HotkeyModule,
10271
- InputMaskModule,
10272
- InputTextareaModule,
10273
- InputTextModule,
10274
- KeyFilterModule,
10275
- LoadingStateModule,
10276
- LocaleModule,
10277
- LocalizedNumberInputModule,
10278
- PanelModule$1,
10279
- ButtonModule$1,
10280
- TableModule$1,
10281
- MultiSelectModule,
10282
- NumberInputModule,
10283
- RadioButtonModule,
10284
- ReactiveFormsModule,
10285
- TooltipModule,
10286
- FieldsetModule,
10287
- TableHeaderCheckboxModule,
10288
- FileUploadModule,
10289
- TableModule,
10290
- InfoSignModule,
10291
- MaskFormatterModule,
10292
- HotkeyModule.forRoot(),
10293
- MouseEventsModule,
10294
- SwitchModule,
10295
- PasswordStrengthModule,
10296
- SliderModule,
10297
- TranslateModule.forChild(),
10298
- PasswordFieldModule,
10299
- TextFieldModule,
10300
- NumberFieldModule,
10301
- CurrencyFieldModule,
10302
- NumberFieldModule$1,
10303
- ],
10304
- declarations: [
10305
- AutocompleteFieldComponent,
10306
- BooleanFieldComponent,
10307
- BooleanSwitchFieldComponent,
10308
- CalendarFieldComponent,
10309
- ChipsFieldComponent,
10310
- CountryPhonePickerFieldComponent,
10311
- DynamicFieldComponent,
10312
- DynamicFormComponent,
10313
- DynamicFormDirective,
10314
- FieldsetComponent,
10315
- FileUploadComponent$1,
10316
- LookupComponent,
10317
- LookupFieldComponent,
10318
- RadioButtonComponent,
10319
- RowComponent,
10320
- SectionComponent,
10321
- SelectFieldComponent,
10322
- SliderFieldComponent,
10323
- TextAreaFieldComponent,
10324
- TextAreaIAFieldComponent,
10325
- ],
10326
- exports: [DynamicFormComponent, LookupComponent],
10327
- entryComponents: [
10328
- AutocompleteFieldComponent,
10329
- BooleanFieldComponent,
10330
- BooleanSwitchFieldComponent,
10331
- CalendarFieldComponent,
10332
- ChipsFieldComponent,
10333
- CountryPhonePickerFieldComponent,
10334
- FieldsetComponent,
10335
- FileUploadComponent$1,
10336
- LookupFieldComponent,
10337
- RadioButtonComponent,
10338
- RowComponent,
10339
- SectionComponent,
10340
- SelectFieldComponent,
10341
- SliderFieldComponent,
10342
- TextAreaFieldComponent,
10343
- TextAreaIAFieldComponent,
10344
- ],
10345
- providers: [
10346
- HotkeysService,
10347
- IAssistService,
10348
- ]
10324
+ imports: [CommonModule],
10325
+ declarations: [HeaderComponent, FooterComponent],
10326
+ exports: [HeaderComponent, FooterComponent],
10349
10327
  })
10350
- ], DynamicFormModule);
10351
- return DynamicFormModule;
10328
+ ], StructureModule);
10329
+ return StructureModule;
10352
10330
  }());
10353
10331
 
10354
- var CustomFieldsService = /** @class */ (function () {
10355
- function CustomFieldsService(http) {
10356
- this.http = http;
10332
+ var ImageCropperComponent = /** @class */ (function () {
10333
+ function ImageCropperComponent() {
10334
+ this.id = "s-image-cropper-" + ImageCropperComponent_1.nextId++;
10335
+ this.visible = false;
10336
+ this.header = "Recortar imagem";
10337
+ this.cropLabel = "Recortar";
10338
+ this.selectAnotherLabel = "Trocar";
10339
+ this.removeLabel = "Remover";
10340
+ this.cancelLabel = "Cancelar";
10341
+ this.emptyStateTitle = "Selecione uma foto, em seguida você poderá ajustá-la";
10342
+ this.emptyStateActionLabel = "Escolher imagem";
10343
+ this.emptyStateIconClass = "fa fa-picture-o";
10344
+ this.aspectRatio = NaN;
10345
+ this.rounded = false;
10346
+ this.allowSelectAnother = true;
10347
+ this.allowRemove = true;
10348
+ this.allowCancel = true;
10349
+ this.visibleChange = new EventEmitter();
10350
+ this.changeImage = new EventEmitter();
10351
+ this.croppedImage = new EventEmitter();
10352
+ this.croppedCanvas = new EventEmitter();
10353
+ this.removedImage = new EventEmitter();
10354
+ this.cancel = new EventEmitter();
10357
10355
  }
10358
- CustomFieldsService.prototype.getCustomFields = function (domain, service, entity, endpoint) {
10359
- var entityDto = { entityId: { domain_: domain, service_: service, id: entity } };
10360
- return this.http.post(endpoint, entityDto);
10356
+ ImageCropperComponent_1 = ImageCropperComponent;
10357
+ ImageCropperComponent.prototype.ngOnInit = function () {
10358
+ if (this.imageSource)
10359
+ this.initCropper();
10361
10360
  };
10362
- CustomFieldsService.prototype.getFileLocationUrl = function (dto, endpoint) {
10363
- return this.http.post(endpoint, dto);
10361
+ ImageCropperComponent.prototype.ngOnChanges = function (changes) {
10362
+ if (changes.imageSource && changes.imageSource.currentValue) {
10363
+ this.initCropper();
10364
+ }
10364
10365
  };
10365
- CustomFieldsService.prototype.uploadTempFile = function (location, file) {
10366
- return this.http.put(location, file, {
10367
- reportProgress: true,
10368
- observe: "events",
10369
- headers: { "Content-Type": file.type }
10366
+ ImageCropperComponent.prototype.initCropper = function () {
10367
+ if (this.cropper) {
10368
+ this.cropper.destroy();
10369
+ }
10370
+ this.image.nativeElement.src = this.imageSource;
10371
+ this.cropper = new Cropper(this.image.nativeElement, {
10372
+ aspectRatio: this.rounded ? 1 : this.aspectRatio,
10373
+ guides: false,
10374
+ dragMode: "move",
10375
+ minCropBoxHeight: 2,
10376
+ minCropBoxWidth: 2,
10377
+ toggleDragModeOnDblclick: false,
10370
10378
  });
10371
10379
  };
10372
- CustomFieldsService.prototype.requestAccess = function (objectId, endpoint) {
10373
- return this.http.post(endpoint, { objectId: objectId });
10380
+ ImageCropperComponent.prototype.getRoundedCanvas = function (sourceCanvas) {
10381
+ var canvas = document.createElement("canvas");
10382
+ var context = canvas.getContext("2d");
10383
+ var width = sourceCanvas.width;
10384
+ var height = sourceCanvas.height;
10385
+ canvas.width = width;
10386
+ canvas.height = height;
10387
+ context.imageSmoothingEnabled = true;
10388
+ context.drawImage(sourceCanvas, 0, 0, width, height);
10389
+ context.globalCompositeOperation = "destination-in";
10390
+ context.beginPath();
10391
+ context.arc(width / 2, height / 2, Math.min(width, height) / 2, 0, 2 * Math.PI, true);
10392
+ context.fill();
10393
+ return canvas;
10374
10394
  };
10375
- CustomFieldsService.prototype.getFile = function (permanentUrl) {
10376
- return this.http.get(permanentUrl, { responseType: "blob" });
10395
+ ImageCropperComponent.prototype.onCropImage = function () {
10396
+ if (!this.imageSource) {
10397
+ this.croppedImage.emit();
10398
+ this.croppedCanvas.emit();
10399
+ }
10400
+ else {
10401
+ var _croppedCanvas = this.rounded ? this.getRoundedCanvas(this.cropper.getCroppedCanvas()) : this.cropper.getCroppedCanvas();
10402
+ this.croppedCanvas.emit(_croppedCanvas);
10403
+ this.croppedImage.emit(_croppedCanvas.toDataURL());
10404
+ }
10405
+ this.visibleChange.emit(false);
10377
10406
  };
10378
- CustomFieldsService.ctorParameters = function () { return [
10379
- { type: HttpClient }
10380
- ]; };
10381
- CustomFieldsService = __decorate([
10382
- Injectable()
10383
- ], CustomFieldsService);
10384
- return CustomFieldsService;
10385
- }());
10386
-
10387
- var CustomFieldType;
10388
- (function (CustomFieldType) {
10389
- CustomFieldType["String"] = "String";
10390
- CustomFieldType["Boolean"] = "Boolean";
10391
- CustomFieldType["Integer"] = "Integer";
10392
- CustomFieldType["Double"] = "Double";
10393
- CustomFieldType["Date"] = "Date";
10394
- CustomFieldType["DateTime"] = "DateTime";
10395
- CustomFieldType["LocalDateTime"] = "LocalDateTime";
10396
- CustomFieldType["Time"] = "Time";
10397
- CustomFieldType["Money"] = "Money";
10398
- CustomFieldType["Blob"] = "Blob";
10407
+ ImageCropperComponent.prototype.onChangeImage = function () {
10408
+ this.changeImage.emit();
10409
+ };
10410
+ ImageCropperComponent.prototype.onRemoveImage = function () {
10411
+ this.imageSource = undefined;
10412
+ this.removedImage.emit();
10413
+ };
10414
+ ImageCropperComponent.prototype.onCancel = function () {
10415
+ this.visibleChange.emit(false);
10416
+ this.cancel.emit();
10417
+ };
10418
+ ImageCropperComponent.prototype.onModalVisibleChange = function (visible) {
10419
+ if (!visible)
10420
+ this.onCancel();
10421
+ this.visibleChange.emit(visible);
10422
+ };
10423
+ var ImageCropperComponent_1;
10424
+ ImageCropperComponent.nextId = 0;
10425
+ __decorate([
10426
+ Input()
10427
+ ], ImageCropperComponent.prototype, "id", void 0);
10428
+ __decorate([
10429
+ Input()
10430
+ ], ImageCropperComponent.prototype, "visible", void 0);
10431
+ __decorate([
10432
+ Input()
10433
+ ], ImageCropperComponent.prototype, "header", void 0);
10434
+ __decorate([
10435
+ Input()
10436
+ ], ImageCropperComponent.prototype, "cropLabel", void 0);
10437
+ __decorate([
10438
+ Input()
10439
+ ], ImageCropperComponent.prototype, "selectAnotherLabel", void 0);
10440
+ __decorate([
10441
+ Input()
10442
+ ], ImageCropperComponent.prototype, "removeLabel", void 0);
10443
+ __decorate([
10444
+ Input()
10445
+ ], ImageCropperComponent.prototype, "cancelLabel", void 0);
10446
+ __decorate([
10447
+ Input()
10448
+ ], ImageCropperComponent.prototype, "emptyStateTitle", void 0);
10449
+ __decorate([
10450
+ Input()
10451
+ ], ImageCropperComponent.prototype, "emptyStateActionLabel", void 0);
10452
+ __decorate([
10453
+ Input()
10454
+ ], ImageCropperComponent.prototype, "emptyStateIconClass", void 0);
10455
+ __decorate([
10456
+ Input()
10457
+ ], ImageCropperComponent.prototype, "aspectRatio", void 0);
10458
+ __decorate([
10459
+ Input()
10460
+ ], ImageCropperComponent.prototype, "rounded", void 0);
10461
+ __decorate([
10462
+ Input()
10463
+ ], ImageCropperComponent.prototype, "allowSelectAnother", void 0);
10464
+ __decorate([
10465
+ Input()
10466
+ ], ImageCropperComponent.prototype, "allowRemove", void 0);
10467
+ __decorate([
10468
+ Input()
10469
+ ], ImageCropperComponent.prototype, "allowCancel", void 0);
10470
+ __decorate([
10471
+ Input()
10472
+ ], ImageCropperComponent.prototype, "imageSource", void 0);
10473
+ __decorate([
10474
+ Output()
10475
+ ], ImageCropperComponent.prototype, "visibleChange", void 0);
10476
+ __decorate([
10477
+ Output()
10478
+ ], ImageCropperComponent.prototype, "changeImage", void 0);
10479
+ __decorate([
10480
+ Output()
10481
+ ], ImageCropperComponent.prototype, "croppedImage", void 0);
10482
+ __decorate([
10483
+ Output()
10484
+ ], ImageCropperComponent.prototype, "croppedCanvas", void 0);
10485
+ __decorate([
10486
+ Output()
10487
+ ], ImageCropperComponent.prototype, "removedImage", void 0);
10488
+ __decorate([
10489
+ Output()
10490
+ ], ImageCropperComponent.prototype, "cancel", void 0);
10491
+ __decorate([
10492
+ ViewChild("image", { static: true })
10493
+ ], ImageCropperComponent.prototype, "image", void 0);
10494
+ __decorate([
10495
+ ContentChild(HeaderComponent, { static: true })
10496
+ ], ImageCropperComponent.prototype, "headerSection", void 0);
10497
+ __decorate([
10498
+ ContentChild(FooterComponent, { static: true })
10499
+ ], ImageCropperComponent.prototype, "footerSection", void 0);
10500
+ ImageCropperComponent = ImageCropperComponent_1 = __decorate([
10501
+ Component({
10502
+ selector: "s-image-cropper",
10503
+ template: "<div [id]=\"id\">\n <p-dialog\n styleClass=\"s-image-cropper {{rounded ? 's-image-cropper--rounded' : ''}}\"\n [header]=\"headerSection ? '' : header\"\n [visible]=\"visible\"\n (visibleChange)=\"onModalVisibleChange($event)\"\n [modal]=\"true\"\n [blockScroll]=\"true\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n [closeOnEscape]=\"allowCancel\"\n [closable]=\"allowCancel\"\n appendTo=\"body\">\n\n <p-header *ngIf=\"headerSection\">\n <ng-content select=\"s-header\"></ng-content>\n </p-header>\n\n <s-empty-state\n [id]=\"id + '-empty-state'\"\n *ngIf=\"!imageSource\"\n [title]=\"emptyStateTitle\"\n [iconClass]=\"emptyStateIconClass\"\n [primaryActionLabel]=\"emptyStateActionLabel\"\n (primaryAction)=\"onChangeImage()\">\n </s-empty-state>\n\n <div [attr.data-hidden]=\"!imageSource\" class=\"image-container\">\n <img\n [id]=\"id + '-cropper'\"\n #image\n [src]=\"imageSource || ''\"\n alt=\"cropped image\"/>\n </div>\n\n <p-footer>\n <div class=\"ui-fluid\" *ngIf=\"!footerSection\">\n <div class=\"ui-g button-container\">\n\n <div *ngIf=\"allowCancel\" class=\"ui-sm-12 ui-md-3 ui-lg-2 ui-xl-2\">\n <s-button\n [id]=\"id + '-cancel-button'\"\n type=\"button\"\n priority=\"link\"\n [label]=\"cancelLabel\"\n (onClick)=\"onCancel()\">\n </s-button>\n </div>\n\n <div *ngIf=\"imageSource && allowRemove\" class=\"ui-sm-12 ui-md-3 ui-lg-2 ui-xl-2\">\n <s-button\n [id]=\"id + '-remove-button'\"\n type=\"button\"\n priority=\"secondary\"\n [label]=\"removeLabel\"\n (onClick)=\"onRemoveImage()\">\n </s-button>\n </div>\n\n <div *ngIf=\"imageSource && allowSelectAnother\" class=\"ui-sm-12 ui-md-3 ui-lg-2 ui-xl-2\">\n <s-button\n [id]=\"id + '-select-another-button'\"\n type=\"button\"\n priority=\"secondary\"\n [label]=\"selectAnotherLabel\"\n (onClick)=\"onChangeImage()\">\n </s-button>\n </div>\n\n <div class=\"ui-sm-12 ui-md-3 ui-lg-2 ui-xl-2\">\n <s-button\n [id]=\"id + '-crop-button'\"\n type=\"button\"\n [label]=\"cropLabel\"\n (onClick)=\"onCropImage()\">\n </s-button>\n </div>\n </div>\n </div>\n\n <ng-content select=\"s-footer\" *ngIf=\"footerSection\"></ng-content>\n </p-footer>\n </p-dialog>\n</div>",
10504
+ encapsulation: ViewEncapsulation.None,
10505
+ styles: ["/*!\n * Cropper.js v1.6.2\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2024-04-21T07:43:02.731Z\n */.cropper-container{-webkit-touch-callout:none;direction:ltr;font-size:0;line-height:0;position:relative;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.cropper-container img{-webkit-backface-visibility:hidden;backface-visibility:hidden;display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-canvas,.cropper-crop-box,.cropper-drag-box,.cropper-modal,.cropper-wrap-box{bottom:0;left:0;position:absolute;right:0;top:0}.cropper-canvas,.cropper-wrap-box{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:rgba(51,153,255,.75) solid 1px;overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:33.33333%;left:0;top:33.33333%;width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:33.33333%;top:0;width:33.33333%}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:after,.cropper-center:before{background-color:#eee;content:\" \";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width:768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width:992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width:1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:\" \";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}", ".s-image-cropper{border-radius:0!important;height:80%!important;max-width:100%!important;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:column;flex-direction:column}.s-image-cropper .ui-dialog-content{overflow:hidden;height:auto!important;-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}.s-image-cropper .ui-dialog-footer,.s-image-cropper .ui-dialog-header{-ms-flex-negative:0;flex-shrink:0;direction:ltr}.s-image-cropper .image-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:100%}.s-image-cropper img{max-width:100%;max-height:100%}.s-image-cropper .button-container{-ms-flex-flow:wrap-reverse;flex-flow:wrap-reverse;-ms-flex-pack:end;justify-content:flex-end}.s-image-cropper .cropper-view-box{outline:#fff dashed 2px}.s-image-cropper .cropper-line{opacity:0}.s-image-cropper .cropper-point{background-color:#fff;opacity:1;height:15px;width:15px;border-radius:50%}.s-image-cropper .cropper-point.point-e{right:-8.5px;top:calc(50% - 4.5px)}.s-image-cropper .cropper-point.point-n{top:-8.5px;left:calc(50% - 4.5px)}.s-image-cropper .cropper-point.point-w{left:-8.5px;top:calc(50% - 4.5px)}.s-image-cropper .cropper-point.point-s{bottom:-8.5px;left:calc(50% - 4.5px)}.s-image-cropper .cropper-point.point-ne{right:-8.5px;top:-8.5px}.s-image-cropper .cropper-point.point-nw{left:-8.5px;top:-8.5px}.s-image-cropper .cropper-point.point-sw{left:-8.5px;bottom:-8.5px}.s-image-cropper .cropper-point.point-se{right:-8.5px;bottom:-8.5px}.s-image-cropper--rounded .cropper-face,.s-image-cropper--rounded .cropper-view-box{border-radius:50%}.s-image-cropper--rounded .cropper-view-box{outline:rgba(255,255,255,.3) dashed 1px}.s-image-cropper--rounded .cropper-view-box:after{border:2px dashed #fff;border-radius:50%;content:\"\";height:100%;left:0;position:absolute;top:0;width:100%}@media (max-width:767px){.s-image-cropper{border:none!important;top:0!important;left:0!important;width:100%!important;height:100%!important}}@media (min-width:768px){.s-image-cropper{width:80%!important}}@media (min-width:1200px){.s-image-cropper{width:60%!important}}"]
10506
+ })
10507
+ ], ImageCropperComponent);
10508
+ return ImageCropperComponent;
10509
+ }());
10510
+
10511
+ var ImageCropperModule = /** @class */ (function () {
10512
+ function ImageCropperModule() {
10513
+ }
10514
+ ImageCropperModule = __decorate([
10515
+ NgModule({
10516
+ imports: [CommonModule, DialogModule, ButtonModule, EmptyStateModule, StructureModule],
10517
+ declarations: [ImageCropperComponent],
10518
+ exports: [ImageCropperComponent, StructureModule],
10519
+ entryComponents: [ImageCropperComponent],
10520
+ })
10521
+ ], ImageCropperModule);
10522
+ return ImageCropperModule;
10523
+ }());
10524
+
10525
+ var ImageCropperService = /** @class */ (function () {
10526
+ function ImageCropperService(componentFactoryResolver, appRef, injector) {
10527
+ this.componentFactoryResolver = componentFactoryResolver;
10528
+ this.appRef = appRef;
10529
+ this.injector = injector;
10530
+ }
10531
+ ImageCropperService.prototype.show = function (config) {
10532
+ var _this = this;
10533
+ if (this.activeCropper)
10534
+ this.destroy(this.activeCropper);
10535
+ var activeCropper = {
10536
+ componentRef: this.componentFactoryResolver.resolveComponentFactory(ImageCropperComponent).create(this.injector),
10537
+ ngUnsubscribe: new Subject(),
10538
+ };
10539
+ this.activeCropper = activeCropper;
10540
+ this.appRef.attachView(activeCropper.componentRef.hostView);
10541
+ var domElem = activeCropper.componentRef.hostView.rootNodes[0];
10542
+ document.body.appendChild(domElem);
10543
+ this.configureInstance(activeCropper, config);
10544
+ activeCropper.componentRef.instance.visible = true;
10545
+ activeCropper.componentRef.instance.visibleChange
10546
+ .pipe(takeUntil(this.activeCropper.ngUnsubscribe), delay(1000))
10547
+ .subscribe(function (visible) {
10548
+ if (!visible)
10549
+ _this.destroy(activeCropper);
10550
+ });
10551
+ };
10552
+ ImageCropperService.prototype.configureInstance = function (activeCropper, config) {
10553
+ var instance = activeCropper.componentRef.instance;
10554
+ if (config) {
10555
+ Object.keys(config).forEach(function (key) {
10556
+ var value = config[key];
10557
+ if (typeof value !== "function")
10558
+ instance[key] = value;
10559
+ else if (typeof value === "function") {
10560
+ instance[key].pipe(takeUntil(activeCropper.ngUnsubscribe)).subscribe(function () {
10561
+ var param = [];
10562
+ for (var _i = 0; _i < arguments.length; _i++) {
10563
+ param[_i] = arguments[_i];
10564
+ }
10565
+ return config[key].apply(config, __spread(param));
10566
+ });
10567
+ }
10568
+ });
10569
+ }
10570
+ instance.visibleChange.pipe(takeUntil(activeCropper.ngUnsubscribe)).subscribe(function (visible) { return (instance.visible = visible); });
10571
+ };
10572
+ ImageCropperService.prototype.destroy = function (activeCropper) {
10573
+ activeCropper.ngUnsubscribe.next();
10574
+ activeCropper.ngUnsubscribe.complete();
10575
+ this.appRef.detachView(activeCropper.componentRef.hostView);
10576
+ activeCropper.componentRef.destroy();
10577
+ };
10578
+ ImageCropperService.ctorParameters = function () { return [
10579
+ { type: ComponentFactoryResolver },
10580
+ { type: ApplicationRef },
10581
+ { type: Injector }
10582
+ ]; };
10583
+ ImageCropperService = __decorate([
10584
+ Injectable()
10585
+ ], ImageCropperService);
10586
+ return ImageCropperService;
10587
+ }());
10588
+
10589
+ var ThumbnailSize;
10590
+ (function (ThumbnailSize) {
10591
+ ThumbnailSize["Small"] = "small";
10592
+ ThumbnailSize["Medium"] = "medium";
10593
+ ThumbnailSize["Large"] = "large";
10594
+ })(ThumbnailSize || (ThumbnailSize = {}));
10595
+
10596
+ var ThumbnailService = /** @class */ (function () {
10597
+ function ThumbnailService() {
10598
+ }
10599
+ ThumbnailService.prototype.getBinaryFile = function (img) {
10600
+ var _this = this;
10601
+ return new Promise(function (resolve) {
10602
+ var getOrientation = _this.getOrientation.bind(_this);
10603
+ var http = new XMLHttpRequest();
10604
+ http.addEventListener("load", function () {
10605
+ if (http.readyState === 4 && (http.status == 200 || http.status === 0)) {
10606
+ var orientation_1 = getOrientation(http.response);
10607
+ http = null;
10608
+ resolve(orientation_1);
10609
+ }
10610
+ });
10611
+ http.addEventListener("error", function () {
10612
+ http = null;
10613
+ throw new Error("Não foi possível carregar a imagem");
10614
+ });
10615
+ http.open("GET", img.src, true);
10616
+ http.responseType = "arraybuffer";
10617
+ http.send(null);
10618
+ });
10619
+ };
10620
+ /**
10621
+ * Retorna a tag da orientação EXIF {-1} Não definido, {-2} Não é formato JPEG, {1, 2, 3, 4, 5, 6, 7, 8} valores da orientação.
10622
+ */
10623
+ ThumbnailService.prototype.getOrientation = function (file) {
10624
+ var view = new DataView(file);
10625
+ if (view.getUint16(0, false) != 0xffd8)
10626
+ return -2; // not jpeg
10627
+ var length = view.byteLength;
10628
+ var offset = 2;
10629
+ while (offset < length) {
10630
+ var marker = view.getUint16(offset, false);
10631
+ offset += 2;
10632
+ if (marker == 0xffe1) {
10633
+ if (view.getUint32((offset += 2), false) != 0x45786966) {
10634
+ return -1; // not defined
10635
+ }
10636
+ var little = view.getUint16((offset += 6), false) == 0x4949;
10637
+ offset += view.getUint32(offset + 4, little);
10638
+ var tags = view.getUint16(offset, little);
10639
+ offset += 2;
10640
+ for (var i = 0; i < tags; i++)
10641
+ if (view.getUint16(offset + i * 12, little) == 0x0112)
10642
+ return view.getUint16(offset + i * 12 + 8, little);
10643
+ // tslint:disable-next-line: no-bitwise
10644
+ }
10645
+ else if ((marker & 0xff00) != 0xff00)
10646
+ break;
10647
+ else
10648
+ offset += view.getUint16(offset, false);
10649
+ }
10650
+ return -1; // not defined
10651
+ };
10652
+ ThumbnailService = __decorate([
10653
+ Injectable()
10654
+ ], ThumbnailService);
10655
+ return ThumbnailService;
10656
+ }());
10657
+
10658
+ var ThumbnailComponent = /** @class */ (function () {
10659
+ function ThumbnailComponent(thumbnailService) {
10660
+ this.thumbnailService = thumbnailService;
10661
+ this.fallback = false;
10662
+ this.id = "s-thumbnail-" + ThumbnailComponent_1.nextId++;
10663
+ this.size = ThumbnailSize.Medium;
10664
+ this.iconClass = "far fa-image";
10665
+ this.hasAction = false;
10666
+ this.actionIconClass = "fas fa-camera";
10667
+ this.isTile = false;
10668
+ this.isBrand = false;
10669
+ this.ngUnsubscribe = new Subject();
10670
+ }
10671
+ ThumbnailComponent_1 = ThumbnailComponent;
10672
+ ThumbnailComponent.prototype.ngOnDestroy = function () {
10673
+ this.ngUnsubscribe.next();
10674
+ this.ngUnsubscribe.complete();
10675
+ };
10676
+ ThumbnailComponent.prototype.ngAfterViewInit = function () {
10677
+ var _this = this;
10678
+ if (this.imgEl) {
10679
+ this.imgEl.nativeElement.addEventListener("load", function () {
10680
+ from(_this.thumbnailService.getBinaryFile(_this.imgEl.nativeElement))
10681
+ .pipe(takeUntil(_this.ngUnsubscribe))
10682
+ .subscribe(function (orientation) { return (_this.orientation = orientation); });
10683
+ });
10684
+ }
10685
+ };
10686
+ var ThumbnailComponent_1;
10687
+ ThumbnailComponent.nextId = 0;
10688
+ ThumbnailComponent.ctorParameters = function () { return [
10689
+ { type: ThumbnailService }
10690
+ ]; };
10691
+ __decorate([
10692
+ ViewChild("img", { static: false })
10693
+ ], ThumbnailComponent.prototype, "imgEl", void 0);
10694
+ __decorate([
10695
+ Input()
10696
+ ], ThumbnailComponent.prototype, "id", void 0);
10697
+ __decorate([
10698
+ Input()
10699
+ ], ThumbnailComponent.prototype, "size", void 0);
10700
+ __decorate([
10701
+ Input()
10702
+ ], ThumbnailComponent.prototype, "imageSource", void 0);
10703
+ __decorate([
10704
+ Input()
10705
+ ], ThumbnailComponent.prototype, "imageFallback", void 0);
10706
+ __decorate([
10707
+ Input()
10708
+ ], ThumbnailComponent.prototype, "imageAlt", void 0);
10709
+ __decorate([
10710
+ Input()
10711
+ ], ThumbnailComponent.prototype, "iconClass", void 0);
10712
+ __decorate([
10713
+ Input()
10714
+ ], ThumbnailComponent.prototype, "hasAction", void 0);
10715
+ __decorate([
10716
+ Input()
10717
+ ], ThumbnailComponent.prototype, "actionIconClass", void 0);
10718
+ __decorate([
10719
+ Input()
10720
+ ], ThumbnailComponent.prototype, "isTile", void 0);
10721
+ __decorate([
10722
+ Input()
10723
+ ], ThumbnailComponent.prototype, "isBrand", void 0);
10724
+ ThumbnailComponent = ThumbnailComponent_1 = __decorate([
10725
+ Component({
10726
+ selector: "s-thumbnail",
10727
+ template: "<div\n [id]=\"id\"\n class=\"thumbnail-container thumbnail-container--{{size}}\"\n [ngClass]=\"{\n 'thumbnail-container--with-action': hasAction,\n 'thumbnail-container--brand': isBrand\n }\">\n <div\n [id]=\"id + '-image-container'\"\n *ngIf=\"imageSource || imageFallback\"\n class=\"image-container\"\n [ngClass]=\"{\n 'image-container--rounded': !isBrand\n }\">\n <img\n #img\n [id]=\"id + '-image'\"\n (error)=\"fallback = true\"\n [src]=\"imageSource\"\n [alt]=\"imageAlt\"\n *ngIf=\"!fallback\"\n [ngClass]=\"{\n 'smallThumbnail': isTile,\n 'exif-orientation-2': orientation == 2,\n 'exif-orientation-3': orientation == 3,\n 'exif-orientation-4': orientation == 4,\n 'exif-orientation-5': orientation == 5,\n 'exif-orientation-6': orientation == 6,\n 'exif-orientation-7': orientation == 7,\n 'exif-orientation-8': orientation == 8\n }\"/>\n\n <img\n #img\n [id]=\"id + '-image-fallback'\"\n (error)=\"imageFallback = undefined\"\n [src]=\"imageFallback\"\n [alt]=\"imageAlt\"\n *ngIf=\"fallback && imageFallback\"\n [ngClass]=\"{\n 'smallThumbnail': isTile,\n 'exif-orientation-2': orientation == 2,\n 'exif-orientation-3': orientation == 3,\n 'exif-orientation-4': orientation == 4,\n 'exif-orientation-5': orientation == 5,\n 'exif-orientation-6': orientation == 6,\n 'exif-orientation-7': orientation == 7,\n 'exif-orientation-8': orientation == 8\n }\"/>\n\n <i\n *ngIf=\"fallback && !imageFallback\"\n ngClass=\"far fa-image\"\n class=\"fallback-img-color\">\n </i>\n </div>\n <div\n [id]=\"id + '-action-icon-container'\"\n *ngIf=\"hasAction\"\n class=\"action-icon-container action-icon-container--{{size}}\">\n <span\n [id]=\"id + '-action-icon'\"\n [class]=\"actionIconClass\"\n aria-hidden=\"true\">\n </span>\n </div>\n <div\n [id]=\"id + '-icon-container'\"\n *ngIf=\"!imageSource && !imageFallback\"\n class=\"icon-container icon-container--{{size}}\"\n [ngClass]=\"{'image-container--rounded': !isBrand}\">\n <span\n [id]=\"id + '-icon'\"\n [class]=\"iconClass\"\n aria-hidden=\"true\">\n </span>\n </div>\n\n <ng-content></ng-content>\n</div>\n",
10728
+ styles: [":host{display:inline-block}.thumbnail-container{color:#fff;position:relative;text-align:center}.thumbnail-container--large{font-size:50px;height:100px;width:100px}.thumbnail-container--large.thumbnail-container--brand{width:200px}.thumbnail-container--medium{font-size:40px;height:70px;width:70px}.thumbnail-container--medium.thumbnail-container--brand{width:140px}.thumbnail-container--small{font-size:22px;height:40px;width:40px}.thumbnail-container--small.thumbnail-container--brand{width:80px}.thumbnail-container--with-action{cursor:pointer}.action-icon-container{background-color:#428bca;border-radius:50%;bottom:0;position:absolute;right:0}.action-icon-container--large,.action-icon-container--medium{font-size:10pt;height:25px;padding:3px;width:25px}.action-icon-container--small{font-size:6pt;height:16px;padding:2px;width:16px}.icon-container,.image-container{-ms-flex-align:center;align-items:center;height:100%;overflow:hidden;width:100%}.icon-container--rounded,.image-container--rounded{border-radius:50%}.smallThumbnail{height:40px!important}.icon-container{background-color:#ccc;color:#fff}.icon-container--large{line-height:98px}.icon-container--medium{line-height:68px}.icon-container--small{line-height:38px}.image-container{-ms-flex-align:center;align-items:center;background-color:#ccc;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.image-container img{width:100%}.image-container img.exif-orientation-2{transform:rotateY(180deg)}.image-container img.exif-orientation-3{transform:rotate(180deg)}.image-container img.exif-orientation-4{transform:rotate(180deg) rotateY(180deg)}.image-container img.exif-orientation-5{transform:rotate(270deg) rotateY(180deg)}.image-container img.exif-orientation-6{transform:rotate(90deg)}.image-container img.exif-orientation-7{transform:rotate(90deg) rotateY(180deg)}.image-container img.exif-orientation-8{transform:rotate(270deg)}.fallback-img-color{color:#fff}"]
10729
+ })
10730
+ ], ThumbnailComponent);
10731
+ return ThumbnailComponent;
10732
+ }());
10733
+
10734
+ var ThumbnailModule = /** @class */ (function () {
10735
+ function ThumbnailModule() {
10736
+ }
10737
+ ThumbnailModule = __decorate([
10738
+ NgModule({
10739
+ imports: [CommonModule],
10740
+ declarations: [ThumbnailComponent],
10741
+ exports: [ThumbnailComponent],
10742
+ providers: [ThumbnailService],
10743
+ })
10744
+ ], ThumbnailModule);
10745
+ return ThumbnailModule;
10746
+ }());
10747
+
10748
+ var FileValidation;
10749
+ (function (FileValidation) {
10750
+ FileValidation["MaxFileSize"] = "maxFileSize";
10751
+ FileValidation["MaxFileLimit"] = "maxFileLimit";
10752
+ FileValidation["TypeInvalid"] = "typeInvalid";
10753
+ FileValidation["UnsupportedExtension"] = "unsupportedExtension";
10754
+ })(FileValidation || (FileValidation = {}));
10755
+
10756
+ var ProfilePicturePickerComponent = /** @class */ (function () {
10757
+ function ProfilePicturePickerComponent(imageCropperService, confirmationService, translateService) {
10758
+ this.imageCropperService = imageCropperService;
10759
+ this.confirmationService = confirmationService;
10760
+ this.translateService = translateService;
10761
+ this.aspectRatio = 1;
10762
+ this.confirmationTexts = {
10763
+ removalHeader: this.translateService.instant("platform.angular_components.remove_image"),
10764
+ removalMessage: this.translateService.instant("platform.angular_components.confirmation_remove_image"),
10765
+ removalAcceptLabel: this.translateService.instant("platform.angular_components.remove"),
10766
+ removalRejectLabel: this.translateService.instant("platform.angular_components.cancel"),
10767
+ };
10768
+ this.supportedExtensions = [];
10769
+ this.changedImage = new EventEmitter();
10770
+ this.removedImage = new EventEmitter();
10771
+ this.invalidFile = new EventEmitter();
10772
+ }
10773
+ ProfilePicturePickerComponent_1 = ProfilePicturePickerComponent;
10774
+ ProfilePicturePickerComponent.prototype.writeValue = function (value) {
10775
+ this._value = value;
10776
+ };
10777
+ ProfilePicturePickerComponent.prototype.registerOnChange = function (onChange) {
10778
+ this._onChange = onChange;
10779
+ };
10780
+ ProfilePicturePickerComponent.prototype.registerOnTouched = function (onTouched) {
10781
+ this._onTouched = onTouched;
10782
+ };
10783
+ ProfilePicturePickerComponent.prototype.ngOnInit = function () {
10784
+ this._normalizeSuportedExtensions();
10785
+ };
10786
+ ProfilePicturePickerComponent.prototype.onDragOver = function (event) {
10787
+ event.preventDefault();
10788
+ event.stopPropagation();
10789
+ };
10790
+ ProfilePicturePickerComponent.prototype.onDragLeave = function (event) {
10791
+ event.preventDefault();
10792
+ event.stopPropagation();
10793
+ };
10794
+ ProfilePicturePickerComponent.prototype.onDrop = function (event) {
10795
+ event.preventDefault();
10796
+ event.stopPropagation();
10797
+ var files = [];
10798
+ var dataTransferFiles = event.dataTransfer.files;
10799
+ for (var i = 0; i < dataTransferFiles.length; i++) {
10800
+ files.push(dataTransferFiles.item(i));
10801
+ }
10802
+ this._showImageCropper(files);
10803
+ };
10804
+ // Verificando o redimensionamento para ajustar o design para ficar responsivo.
10805
+ ProfilePicturePickerComponent.prototype.onResize = function () {
10806
+ if (this.uploadPicture && this.info && this.thumbnail) {
10807
+ var uploadPictureWidth = this._getWidthElement(this.uploadPicture);
10808
+ var infoWidth = this._getWidthElement(this.info);
10809
+ var thumbnailWidth = this._getWidthElement(this.thumbnail);
10810
+ if (thumbnailWidth + infoWidth > uploadPictureWidth) {
10811
+ this.uploadPicture.nativeElement.classList.add("upload-picture--small");
10812
+ }
10813
+ else {
10814
+ this.uploadPicture.nativeElement.classList.remove("upload-picture--small");
10815
+ }
10816
+ }
10817
+ };
10818
+ ProfilePicturePickerComponent.prototype.selectPhoto = function () {
10819
+ var fileInputElement = this.fileInput.nativeElement;
10820
+ fileInputElement.value = "";
10821
+ fileInputElement.click();
10822
+ };
10823
+ ProfilePicturePickerComponent.prototype.removePhoto = function () {
10824
+ var _this = this;
10825
+ this.confirmationService.confirm({
10826
+ message: this.confirmationTexts.removalMessage,
10827
+ acceptLabel: this.confirmationTexts.removalAcceptLabel,
10828
+ rejectLabel: this.confirmationTexts.removalRejectLabel,
10829
+ header: this.confirmationTexts.removalHeader,
10830
+ accept: function () {
10831
+ var fileInputElement = _this.fileInput.nativeElement;
10832
+ fileInputElement.value = "";
10833
+ _this.image = "";
10834
+ _this.removedImage.emit();
10835
+ },
10836
+ });
10837
+ };
10838
+ ProfilePicturePickerComponent.prototype.photoSelected = function (event) {
10839
+ this._showImageCropper(event.srcElement.files);
10840
+ };
10841
+ ProfilePicturePickerComponent.prototype._showImageCropper = function (files) {
10842
+ var _this = this;
10843
+ if (!this._validateData(files)) {
10844
+ return;
10845
+ }
10846
+ var file = files[0];
10847
+ var fileReader = new FileReader();
10848
+ fileReader.readAsDataURL(file);
10849
+ fileReader.onloadend = function (fileEvent) {
10850
+ _this.imageCropperService.show(__assign({ imageSource: fileEvent.target.result, croppedImage: function (image) {
10851
+ _this.image = image;
10852
+ _this.changedImage.emit(image);
10853
+ _this._value = { sourceFile: file, base64: image };
10854
+ _this._onChange(_this._value);
10855
+ }, changeImage: function () { return _this.selectPhoto(); }, allowSelectAnother: false, aspectRatio: _this.aspectRatio }, _this.cropperLabelsConfig));
10856
+ };
10857
+ };
10858
+ ProfilePicturePickerComponent.prototype._normalizeSuportedExtensions = function () {
10859
+ var _a;
10860
+ this.supportedExtensions = (_a = this.supportedExtensions) === null || _a === void 0 ? void 0 : _a.map(function (extension) { return extension.replace(".", "").toLocaleLowerCase(); });
10861
+ };
10862
+ ProfilePicturePickerComponent.prototype._validateData = function (files) {
10863
+ if (!files.length) {
10864
+ return false;
10865
+ }
10866
+ if (files.length > 1) {
10867
+ this.invalidFile.emit({ file: null, validation: FileValidation.MaxFileLimit });
10868
+ return false;
10869
+ }
10870
+ var file = files[0];
10871
+ if (!file.type.includes("image")) {
10872
+ this.invalidFile.emit({ file: file, validation: FileValidation.TypeInvalid });
10873
+ return false;
10874
+ }
10875
+ if (!this._validateFileExtension(file)) {
10876
+ this.invalidFile.emit({ file: file, validation: FileValidation.UnsupportedExtension });
10877
+ return false;
10878
+ }
10879
+ if (!this._validateFileSize(file)) {
10880
+ this.invalidFile.emit({ file: file, validation: FileValidation.MaxFileSize });
10881
+ return false;
10882
+ }
10883
+ return true;
10884
+ };
10885
+ ProfilePicturePickerComponent.prototype._validateFileExtension = function (file) {
10886
+ var _a;
10887
+ if ((_a = this.supportedExtensions) === null || _a === void 0 ? void 0 : _a.length) {
10888
+ var extension = file.name.split(".").pop().toLowerCase();
10889
+ return this.supportedExtensions.includes(extension);
10890
+ }
10891
+ return true;
10892
+ };
10893
+ ProfilePicturePickerComponent.prototype._validateFileSize = function (file) {
10894
+ if (this.maxFileSize) {
10895
+ return file.size > this.maxFileSize;
10896
+ }
10897
+ return true;
10898
+ };
10899
+ ProfilePicturePickerComponent.prototype._getWidthElement = function (element) {
10900
+ var _a = element.nativeElement.getBoundingClientRect(), left = _a.left, right = _a.right;
10901
+ return right - left;
10902
+ };
10903
+ var ProfilePicturePickerComponent_1;
10904
+ ProfilePicturePickerComponent.ctorParameters = function () { return [
10905
+ { type: ImageCropperService },
10906
+ { type: ConfirmationService },
10907
+ { type: TranslateService }
10908
+ ]; };
10909
+ __decorate([
10910
+ Input()
10911
+ ], ProfilePicturePickerComponent.prototype, "simpleTitle", void 0);
10912
+ __decorate([
10913
+ Input()
10914
+ ], ProfilePicturePickerComponent.prototype, "actionTitle", void 0);
10915
+ __decorate([
10916
+ Input()
10917
+ ], ProfilePicturePickerComponent.prototype, "subtitle", void 0);
10918
+ __decorate([
10919
+ Input()
10920
+ ], ProfilePicturePickerComponent.prototype, "aspectRatio", void 0);
10921
+ __decorate([
10922
+ Input()
10923
+ ], ProfilePicturePickerComponent.prototype, "cropperLabelsConfig", void 0);
10924
+ __decorate([
10925
+ Input()
10926
+ ], ProfilePicturePickerComponent.prototype, "removeButtonLabel", void 0);
10927
+ __decorate([
10928
+ Input()
10929
+ ], ProfilePicturePickerComponent.prototype, "changeButtonLabel", void 0);
10930
+ __decorate([
10931
+ Input()
10932
+ ], ProfilePicturePickerComponent.prototype, "confirmationTexts", void 0);
10933
+ __decorate([
10934
+ Input()
10935
+ ], ProfilePicturePickerComponent.prototype, "maxFileSize", void 0);
10936
+ __decorate([
10937
+ Input()
10938
+ ], ProfilePicturePickerComponent.prototype, "accept", void 0);
10939
+ __decorate([
10940
+ Input()
10941
+ ], ProfilePicturePickerComponent.prototype, "supportedExtensions", void 0);
10942
+ __decorate([
10943
+ Input()
10944
+ ], ProfilePicturePickerComponent.prototype, "image", void 0);
10945
+ __decorate([
10946
+ ViewChild("uploadPicture")
10947
+ ], ProfilePicturePickerComponent.prototype, "uploadPicture", void 0);
10948
+ __decorate([
10949
+ ViewChild("info")
10950
+ ], ProfilePicturePickerComponent.prototype, "info", void 0);
10951
+ __decorate([
10952
+ ViewChild("thumbnail", { read: ElementRef })
10953
+ ], ProfilePicturePickerComponent.prototype, "thumbnail", void 0);
10954
+ __decorate([
10955
+ ViewChild("fileInput", { read: ElementRef })
10956
+ ], ProfilePicturePickerComponent.prototype, "fileInput", void 0);
10957
+ __decorate([
10958
+ Output()
10959
+ ], ProfilePicturePickerComponent.prototype, "changedImage", void 0);
10960
+ __decorate([
10961
+ Output()
10962
+ ], ProfilePicturePickerComponent.prototype, "removedImage", void 0);
10963
+ __decorate([
10964
+ Output()
10965
+ ], ProfilePicturePickerComponent.prototype, "invalidFile", void 0);
10966
+ __decorate([
10967
+ HostListener("dragover", ["$event"])
10968
+ ], ProfilePicturePickerComponent.prototype, "onDragOver", null);
10969
+ __decorate([
10970
+ HostListener("dragleave", ["$event"])
10971
+ ], ProfilePicturePickerComponent.prototype, "onDragLeave", null);
10972
+ __decorate([
10973
+ HostListener("drop", ["$event"])
10974
+ ], ProfilePicturePickerComponent.prototype, "onDrop", null);
10975
+ __decorate([
10976
+ HostListener("window:resize")
10977
+ ], ProfilePicturePickerComponent.prototype, "onResize", null);
10978
+ ProfilePicturePickerComponent = ProfilePicturePickerComponent_1 = __decorate([
10979
+ Component({
10980
+ selector: "s-profile-picture-picker",
10981
+ template: "<p-confirmDialog></p-confirmDialog>\n\n<input #fileInput [accept]=\"accept\" class=\"file-input\" type=\"file\" (change)=\"photoSelected($event)\">\n<div #uploadPicture class=\"upload-picture\">\n <s-thumbnail\n #thumbnail\n iconClass=\"far fa-user\"\n [imageSource]=\"image\"\n [hasAction]=\"!image\"\n (click)=\"selectPhoto()\">\n </s-thumbnail>\n <div #info class=\"info\">\n <ng-container *ngIf=\"image; then withImage; else noImage\"></ng-container>\n <p class=\"subtitle\">{{ subtitle }}</p>\n </div>\n</div>\n\n<ng-template #withImage>\n <div class=\"buttons\">\n <s-button\n [label]=\"changeButtonLabel || 'platform.angular_components.change_photo' | translate\"\n priority=\"primary\"\n (onClick)=\"selectPhoto()\">\n </s-button>\n <s-button\n [label]=\"removeButtonLabel || 'platform.angular_components.remove' | translate\"\n priority=\"secondary\"\n (onClick)=\"removePhoto()\">\n </s-button>\n </div>\n</ng-template>\n\n<ng-template #noImage>\n <p class=\"title\">\n {{ simpleTitle || 'platform.angular_components.drag_your_photo_or' | translate }}\n <span\n class=\"action-title\"\n (click)=\"selectPhoto()\">\n {{ actionTitle || 'platform.angular_components.select_a_file' | translate }}\n </span>\n </p>\n</ng-template>",
10982
+ providers: [{
10983
+ provide: NG_VALUE_ACCESSOR,
10984
+ useExisting: forwardRef(function () { return ProfilePicturePickerComponent_1; }),
10985
+ multi: true,
10986
+ }],
10987
+ styles: [".file-input{display:none}.upload-picture{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.upload-picture .info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:12px 20px;-ms-flex-align:start;align-items:flex-start}.upload-picture .info .title{font-family:\"Open Sans\",sans-serif;font-weight:700;font-size:.875rem;line-height:150%;color:#333}.upload-picture .info .title .action-title{cursor:pointer;color:#428bca}.upload-picture .info .buttons{display:-ms-flexbox;display:flex;gap:8px}.upload-picture .info .buttons s-button{margin:0}.upload-picture .info .subtitle{padding:6px 0;font-family:\"Open Sans\",sans-serif;font-weight:400;font-size:.75rem;line-height:150%;color:#697882;text-align:center}.upload-picture--small .info{-ms-flex-align:center;align-items:center}.upload-picture--small .info .subtitle,.upload-picture--small .info .title{text-align:center}.upload-picture--small .info .buttons{-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap}"]
10988
+ })
10989
+ ], ProfilePicturePickerComponent);
10990
+ return ProfilePicturePickerComponent;
10991
+ }());
10992
+
10993
+ var ProfilePicturePickerModule = /** @class */ (function () {
10994
+ function ProfilePicturePickerModule() {
10995
+ }
10996
+ ProfilePicturePickerModule = __decorate([
10997
+ NgModule({
10998
+ imports: [
10999
+ CommonModule,
11000
+ TranslateModule,
11001
+ ButtonModule,
11002
+ ThumbnailModule,
11003
+ ImageCropperModule,
11004
+ ConfirmDialogModule,
11005
+ ],
11006
+ declarations: [ProfilePicturePickerComponent],
11007
+ exports: [ProfilePicturePickerComponent],
11008
+ providers: [
11009
+ ImageCropperService,
11010
+ ConfirmationService,
11011
+ ],
11012
+ })
11013
+ ], ProfilePicturePickerModule);
11014
+ return ProfilePicturePickerModule;
11015
+ }());
11016
+
11017
+ var ProfilePictureModule = /** @class */ (function () {
11018
+ function ProfilePictureModule() {
11019
+ }
11020
+ ProfilePictureModule = __decorate([
11021
+ NgModule({
11022
+ imports: [
11023
+ CommonModule,
11024
+ FormsModule,
11025
+ ReactiveFormsModule,
11026
+ ProfilePicturePickerModule,
11027
+ ],
11028
+ declarations: [ProfilePictureFieldComponent],
11029
+ exports: [ProfilePictureFieldComponent],
11030
+ })
11031
+ ], ProfilePictureModule);
11032
+ return ProfilePictureModule;
11033
+ }());
11034
+
11035
+ var DynamicFormModule = /** @class */ (function () {
11036
+ function DynamicFormModule() {
11037
+ }
11038
+ DynamicFormModule = __decorate([
11039
+ NgModule({
11040
+ imports: [
11041
+ AutoCompleteModule,
11042
+ BignumberInputModule,
11043
+ ButtonModule,
11044
+ CalendarMaskModule,
11045
+ CalendarModule,
11046
+ CheckboxModule,
11047
+ ChipsModule,
11048
+ CommonModule,
11049
+ ControlErrorsModule,
11050
+ CountryPhonePickerModule,
11051
+ DialogModule,
11052
+ DropdownModule,
11053
+ EmptyStateModule,
11054
+ FormsModule,
11055
+ HotkeyModule,
11056
+ InputMaskModule,
11057
+ InputTextareaModule,
11058
+ InputTextModule,
11059
+ KeyFilterModule,
11060
+ LoadingStateModule,
11061
+ LocaleModule,
11062
+ LocalizedNumberInputModule,
11063
+ PanelModule$1,
11064
+ ButtonModule$1,
11065
+ TableModule$1,
11066
+ MultiSelectModule,
11067
+ NumberInputModule,
11068
+ RadioButtonModule,
11069
+ ReactiveFormsModule,
11070
+ TooltipModule,
11071
+ FieldsetModule,
11072
+ TableHeaderCheckboxModule,
11073
+ FileUploadModule,
11074
+ TableModule,
11075
+ InfoSignModule,
11076
+ MaskFormatterModule,
11077
+ HotkeyModule.forRoot(),
11078
+ MouseEventsModule,
11079
+ SwitchModule,
11080
+ PasswordStrengthModule,
11081
+ SliderModule,
11082
+ TranslateModule.forChild(),
11083
+ PasswordFieldModule,
11084
+ TextFieldModule,
11085
+ NumberFieldModule,
11086
+ CurrencyFieldModule,
11087
+ NumberFieldModule$1,
11088
+ ProfilePictureModule,
11089
+ ],
11090
+ declarations: [
11091
+ AutocompleteFieldComponent,
11092
+ BooleanFieldComponent,
11093
+ BooleanSwitchFieldComponent,
11094
+ CalendarFieldComponent,
11095
+ ChipsFieldComponent,
11096
+ CountryPhonePickerFieldComponent,
11097
+ DynamicFieldComponent,
11098
+ DynamicFormComponent,
11099
+ DynamicFormDirective,
11100
+ FieldsetComponent,
11101
+ FileUploadComponent$1,
11102
+ LookupComponent,
11103
+ LookupFieldComponent,
11104
+ RadioButtonComponent,
11105
+ RowComponent,
11106
+ SectionComponent,
11107
+ SelectFieldComponent,
11108
+ SliderFieldComponent,
11109
+ TextAreaFieldComponent,
11110
+ TextAreaIAFieldComponent,
11111
+ ],
11112
+ exports: [DynamicFormComponent, LookupComponent],
11113
+ entryComponents: [
11114
+ AutocompleteFieldComponent,
11115
+ BooleanFieldComponent,
11116
+ BooleanSwitchFieldComponent,
11117
+ CalendarFieldComponent,
11118
+ ChipsFieldComponent,
11119
+ CountryPhonePickerFieldComponent,
11120
+ FieldsetComponent,
11121
+ FileUploadComponent$1,
11122
+ LookupFieldComponent,
11123
+ RadioButtonComponent,
11124
+ RowComponent,
11125
+ SectionComponent,
11126
+ SelectFieldComponent,
11127
+ SliderFieldComponent,
11128
+ TextAreaFieldComponent,
11129
+ TextAreaIAFieldComponent,
11130
+ ],
11131
+ providers: [
11132
+ HotkeysService,
11133
+ IAssistService,
11134
+ ]
11135
+ })
11136
+ ], DynamicFormModule);
11137
+ return DynamicFormModule;
11138
+ }());
11139
+
11140
+ var CustomFieldsService = /** @class */ (function () {
11141
+ function CustomFieldsService(http) {
11142
+ this.http = http;
11143
+ }
11144
+ CustomFieldsService.prototype.getCustomFields = function (domain, service, entity, endpoint) {
11145
+ var entityDto = { entityId: { domain_: domain, service_: service, id: entity } };
11146
+ return this.http.post(endpoint, entityDto);
11147
+ };
11148
+ CustomFieldsService.prototype.getFileLocationUrl = function (dto, endpoint) {
11149
+ return this.http.post(endpoint, dto);
11150
+ };
11151
+ CustomFieldsService.prototype.uploadTempFile = function (location, file) {
11152
+ return this.http.put(location, file, {
11153
+ reportProgress: true,
11154
+ observe: "events",
11155
+ headers: { "Content-Type": file.type }
11156
+ });
11157
+ };
11158
+ CustomFieldsService.prototype.requestAccess = function (objectId, endpoint) {
11159
+ return this.http.post(endpoint, { objectId: objectId });
11160
+ };
11161
+ CustomFieldsService.prototype.getFile = function (permanentUrl) {
11162
+ return this.http.get(permanentUrl, { responseType: "blob" });
11163
+ };
11164
+ CustomFieldsService.ctorParameters = function () { return [
11165
+ { type: HttpClient }
11166
+ ]; };
11167
+ CustomFieldsService = __decorate([
11168
+ Injectable()
11169
+ ], CustomFieldsService);
11170
+ return CustomFieldsService;
11171
+ }());
11172
+
11173
+ var CustomFieldType;
11174
+ (function (CustomFieldType) {
11175
+ CustomFieldType["String"] = "String";
11176
+ CustomFieldType["Boolean"] = "Boolean";
11177
+ CustomFieldType["Integer"] = "Integer";
11178
+ CustomFieldType["Double"] = "Double";
11179
+ CustomFieldType["Date"] = "Date";
11180
+ CustomFieldType["DateTime"] = "DateTime";
11181
+ CustomFieldType["LocalDateTime"] = "LocalDateTime";
11182
+ CustomFieldType["Time"] = "Time";
11183
+ CustomFieldType["Money"] = "Money";
11184
+ CustomFieldType["Blob"] = "Blob";
10399
11185
  CustomFieldType["Binary"] = "Binary";
10400
11186
  CustomFieldType["Any"] = "Any";
10401
11187
  CustomFieldType["Enum"] = "Enum";
@@ -12907,175 +13693,30 @@ var SideTableComponent = /** @class */ (function () {
12907
13693
  __decorate([
12908
13694
  Input()
12909
13695
  ], SideTableComponent.prototype, "multipleTaskPerLine", void 0);
12910
- SideTableComponent = __decorate([
12911
- Component({
12912
- selector: 'gantt-side-table',
12913
- template: "<div class=\"side-table\">\n <div class=\"column-title\">\n <span>{{ columnTitle }}</span>\n </div>\n <div class=\"tasks\" >\n <div\n *ngFor=\"let task of tasks; let i = index\"\n class=\"task\"\n [ngStyle]=\"{'height.px': multipleTaskPerLine\n ? ROW_HEIGHT\n : ROW_HEIGHT * task.tasks.length}\"\n [sTooltip]=\"task.title.length > 20 || task.subtitle.length > 20 ? '<span><strong>' + task.title + ' </strong></br><span> ' + task.subtitle + ' </span></span>' : '' \"\n [escape]=\"false\">\n <div class=\"title\">\n {{ task.title }}\n </div>\n <div class=\"subtitle\">\n {{ task.subtitle }}\n </div>\n </div>\n </div>\n</div>\n",
12914
- styles: [".side-table{background:#fff;height:100%;min-width:175px}.side-table .column-title{height:106px;border:1px solid #e0e0e0;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center;padding:8px}.side-table .column-title span{font-family:\"Open Sans\" sans-serif;font-size:14px;font-weight:700;line-height:150%}.side-table .task{-ms-flex-align:center;align-items:center;background-color:#fff;border:1px solid #e0e0e0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:\"Open Sans\",sans-serif;font-weight:400;-ms-flex-pack:center;justify-content:center;line-height:150%;padding:0 5px}.side-table .task .title{color:#333;font-size:14px;max-width:300px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.side-table .task .subtitle{color:#999;font-size:12px;max-width:300px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]
12915
- })
12916
- ], SideTableComponent);
12917
- return SideTableComponent;
12918
- }());
12919
-
12920
- var GanttModule = /** @class */ (function () {
12921
- function GanttModule() {
12922
- }
12923
- GanttModule = __decorate([
12924
- NgModule({
12925
- imports: [CommonModule, TooltipModule],
12926
- declarations: [
12927
- GanttComponent,
12928
- SideTableComponent,
12929
- ],
12930
- exports: [GanttComponent],
12931
- })
12932
- ], GanttModule);
12933
- return GanttModule;
12934
- }());
12935
-
12936
- var ThumbnailSize;
12937
- (function (ThumbnailSize) {
12938
- ThumbnailSize["Small"] = "small";
12939
- ThumbnailSize["Medium"] = "medium";
12940
- ThumbnailSize["Large"] = "large";
12941
- })(ThumbnailSize || (ThumbnailSize = {}));
12942
-
12943
- var ThumbnailService = /** @class */ (function () {
12944
- function ThumbnailService() {
12945
- }
12946
- ThumbnailService.prototype.getBinaryFile = function (img) {
12947
- var _this = this;
12948
- return new Promise(function (resolve) {
12949
- var getOrientation = _this.getOrientation.bind(_this);
12950
- var http = new XMLHttpRequest();
12951
- http.addEventListener("load", function () {
12952
- if (http.readyState === 4 && (http.status == 200 || http.status === 0)) {
12953
- var orientation_1 = getOrientation(http.response);
12954
- http = null;
12955
- resolve(orientation_1);
12956
- }
12957
- });
12958
- http.addEventListener("error", function () {
12959
- http = null;
12960
- throw new Error("Não foi possível carregar a imagem");
12961
- });
12962
- http.open("GET", img.src, true);
12963
- http.responseType = "arraybuffer";
12964
- http.send(null);
12965
- });
12966
- };
12967
- /**
12968
- * Retorna a tag da orientação EXIF {-1} Não definido, {-2} Não é formato JPEG, {1, 2, 3, 4, 5, 6, 7, 8} valores da orientação.
12969
- */
12970
- ThumbnailService.prototype.getOrientation = function (file) {
12971
- var view = new DataView(file);
12972
- if (view.getUint16(0, false) != 0xffd8)
12973
- return -2; // not jpeg
12974
- var length = view.byteLength;
12975
- var offset = 2;
12976
- while (offset < length) {
12977
- var marker = view.getUint16(offset, false);
12978
- offset += 2;
12979
- if (marker == 0xffe1) {
12980
- if (view.getUint32((offset += 2), false) != 0x45786966) {
12981
- return -1; // not defined
12982
- }
12983
- var little = view.getUint16((offset += 6), false) == 0x4949;
12984
- offset += view.getUint32(offset + 4, little);
12985
- var tags = view.getUint16(offset, little);
12986
- offset += 2;
12987
- for (var i = 0; i < tags; i++)
12988
- if (view.getUint16(offset + i * 12, little) == 0x0112)
12989
- return view.getUint16(offset + i * 12 + 8, little);
12990
- // tslint:disable-next-line: no-bitwise
12991
- }
12992
- else if ((marker & 0xff00) != 0xff00)
12993
- break;
12994
- else
12995
- offset += view.getUint16(offset, false);
12996
- }
12997
- return -1; // not defined
12998
- };
12999
- ThumbnailService = __decorate([
13000
- Injectable()
13001
- ], ThumbnailService);
13002
- return ThumbnailService;
13003
- }());
13004
-
13005
- var ThumbnailComponent = /** @class */ (function () {
13006
- function ThumbnailComponent(thumbnailService) {
13007
- this.thumbnailService = thumbnailService;
13008
- this.fallback = false;
13009
- this.id = "s-thumbnail-" + ThumbnailComponent_1.nextId++;
13010
- this.size = ThumbnailSize.Medium;
13011
- this.iconClass = "far fa-image";
13012
- this.hasAction = false;
13013
- this.actionIconClass = "fas fa-camera";
13014
- this.isTile = false;
13015
- this.isBrand = false;
13016
- this.ngUnsubscribe = new Subject();
13017
- }
13018
- ThumbnailComponent_1 = ThumbnailComponent;
13019
- ThumbnailComponent.prototype.ngOnDestroy = function () {
13020
- this.ngUnsubscribe.next();
13021
- this.ngUnsubscribe.complete();
13022
- };
13023
- ThumbnailComponent.prototype.ngAfterViewInit = function () {
13024
- var _this = this;
13025
- if (this.imgEl) {
13026
- this.imgEl.nativeElement.addEventListener("load", function () {
13027
- from(_this.thumbnailService.getBinaryFile(_this.imgEl.nativeElement))
13028
- .pipe(takeUntil(_this.ngUnsubscribe))
13029
- .subscribe(function (orientation) { return (_this.orientation = orientation); });
13030
- });
13031
- }
13032
- };
13033
- var ThumbnailComponent_1;
13034
- ThumbnailComponent.nextId = 0;
13035
- ThumbnailComponent.ctorParameters = function () { return [
13036
- { type: ThumbnailService }
13037
- ]; };
13038
- __decorate([
13039
- ViewChild("img", { static: false })
13040
- ], ThumbnailComponent.prototype, "imgEl", void 0);
13041
- __decorate([
13042
- Input()
13043
- ], ThumbnailComponent.prototype, "id", void 0);
13044
- __decorate([
13045
- Input()
13046
- ], ThumbnailComponent.prototype, "size", void 0);
13047
- __decorate([
13048
- Input()
13049
- ], ThumbnailComponent.prototype, "imageSource", void 0);
13050
- __decorate([
13051
- Input()
13052
- ], ThumbnailComponent.prototype, "imageFallback", void 0);
13053
- __decorate([
13054
- Input()
13055
- ], ThumbnailComponent.prototype, "imageAlt", void 0);
13056
- __decorate([
13057
- Input()
13058
- ], ThumbnailComponent.prototype, "iconClass", void 0);
13059
- __decorate([
13060
- Input()
13061
- ], ThumbnailComponent.prototype, "hasAction", void 0);
13062
- __decorate([
13063
- Input()
13064
- ], ThumbnailComponent.prototype, "actionIconClass", void 0);
13065
- __decorate([
13066
- Input()
13067
- ], ThumbnailComponent.prototype, "isTile", void 0);
13068
- __decorate([
13069
- Input()
13070
- ], ThumbnailComponent.prototype, "isBrand", void 0);
13071
- ThumbnailComponent = ThumbnailComponent_1 = __decorate([
13072
- Component({
13073
- selector: "s-thumbnail",
13074
- template: "<div\n [id]=\"id\"\n class=\"thumbnail-container thumbnail-container--{{size}}\"\n [ngClass]=\"{\n 'thumbnail-container--with-action': hasAction,\n 'thumbnail-container--brand': isBrand\n }\">\n <div\n [id]=\"id + '-image-container'\"\n *ngIf=\"imageSource || imageFallback\"\n class=\"image-container\"\n [ngClass]=\"{\n 'image-container--rounded': !isBrand\n }\">\n <img\n #img\n [id]=\"id + '-image'\"\n (error)=\"fallback = true\"\n [src]=\"imageSource\"\n [alt]=\"imageAlt\"\n *ngIf=\"!fallback\"\n [ngClass]=\"{\n 'smallThumbnail': isTile,\n 'exif-orientation-2': orientation == 2,\n 'exif-orientation-3': orientation == 3,\n 'exif-orientation-4': orientation == 4,\n 'exif-orientation-5': orientation == 5,\n 'exif-orientation-6': orientation == 6,\n 'exif-orientation-7': orientation == 7,\n 'exif-orientation-8': orientation == 8\n }\"/>\n\n <img\n #img\n [id]=\"id + '-image-fallback'\"\n (error)=\"imageFallback = undefined\"\n [src]=\"imageFallback\"\n [alt]=\"imageAlt\"\n *ngIf=\"fallback && imageFallback\"\n [ngClass]=\"{\n 'smallThumbnail': isTile,\n 'exif-orientation-2': orientation == 2,\n 'exif-orientation-3': orientation == 3,\n 'exif-orientation-4': orientation == 4,\n 'exif-orientation-5': orientation == 5,\n 'exif-orientation-6': orientation == 6,\n 'exif-orientation-7': orientation == 7,\n 'exif-orientation-8': orientation == 8\n }\"/>\n\n <i\n *ngIf=\"fallback && !imageFallback\"\n ngClass=\"far fa-image\"\n class=\"fallback-img-color\">\n </i>\n </div>\n <div\n [id]=\"id + '-action-icon-container'\"\n *ngIf=\"hasAction\"\n class=\"action-icon-container action-icon-container--{{size}}\">\n <span\n [id]=\"id + '-action-icon'\"\n [class]=\"actionIconClass\"\n aria-hidden=\"true\">\n </span>\n </div>\n <div\n [id]=\"id + '-icon-container'\"\n *ngIf=\"!imageSource && !imageFallback\"\n class=\"icon-container icon-container--{{size}}\"\n [ngClass]=\"{'image-container--rounded': !isBrand}\">\n <span\n [id]=\"id + '-icon'\"\n [class]=\"iconClass\"\n aria-hidden=\"true\">\n </span>\n </div>\n\n <ng-content></ng-content>\n</div>\n",
13075
- styles: [":host{display:inline-block}.thumbnail-container{color:#fff;position:relative;text-align:center}.thumbnail-container--large{font-size:50px;height:100px;width:100px}.thumbnail-container--large.thumbnail-container--brand{width:200px}.thumbnail-container--medium{font-size:40px;height:70px;width:70px}.thumbnail-container--medium.thumbnail-container--brand{width:140px}.thumbnail-container--small{font-size:22px;height:40px;width:40px}.thumbnail-container--small.thumbnail-container--brand{width:80px}.thumbnail-container--with-action{cursor:pointer}.action-icon-container{background-color:#428bca;border-radius:50%;bottom:0;position:absolute;right:0}.action-icon-container--large,.action-icon-container--medium{font-size:10pt;height:25px;padding:3px;width:25px}.action-icon-container--small{font-size:6pt;height:16px;padding:2px;width:16px}.icon-container,.image-container{-ms-flex-align:center;align-items:center;height:100%;overflow:hidden;width:100%}.icon-container--rounded,.image-container--rounded{border-radius:50%}.smallThumbnail{height:40px!important}.icon-container{background-color:#ccc;color:#fff}.icon-container--large{line-height:98px}.icon-container--medium{line-height:68px}.icon-container--small{line-height:38px}.image-container{-ms-flex-align:center;align-items:center;background-color:#ccc;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.image-container img{width:100%}.image-container img.exif-orientation-2{transform:rotateY(180deg)}.image-container img.exif-orientation-3{transform:rotate(180deg)}.image-container img.exif-orientation-4{transform:rotate(180deg) rotateY(180deg)}.image-container img.exif-orientation-5{transform:rotate(270deg) rotateY(180deg)}.image-container img.exif-orientation-6{transform:rotate(90deg)}.image-container img.exif-orientation-7{transform:rotate(90deg) rotateY(180deg)}.image-container img.exif-orientation-8{transform:rotate(270deg)}.fallback-img-color{color:#fff}"]
13696
+ SideTableComponent = __decorate([
13697
+ Component({
13698
+ selector: 'gantt-side-table',
13699
+ template: "<div class=\"side-table\">\n <div class=\"column-title\">\n <span>{{ columnTitle }}</span>\n </div>\n <div class=\"tasks\" >\n <div\n *ngFor=\"let task of tasks; let i = index\"\n class=\"task\"\n [ngStyle]=\"{'height.px': multipleTaskPerLine\n ? ROW_HEIGHT\n : ROW_HEIGHT * task.tasks.length}\"\n [sTooltip]=\"task.title.length > 20 || task.subtitle.length > 20 ? '<span><strong>' + task.title + ' </strong></br><span> ' + task.subtitle + ' </span></span>' : '' \"\n [escape]=\"false\">\n <div class=\"title\">\n {{ task.title }}\n </div>\n <div class=\"subtitle\">\n {{ task.subtitle }}\n </div>\n </div>\n </div>\n</div>\n",
13700
+ styles: [".side-table{background:#fff;height:100%;min-width:175px}.side-table .column-title{height:106px;border:1px solid #e0e0e0;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center;padding:8px}.side-table .column-title span{font-family:\"Open Sans\" sans-serif;font-size:14px;font-weight:700;line-height:150%}.side-table .task{-ms-flex-align:center;align-items:center;background-color:#fff;border:1px solid #e0e0e0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:\"Open Sans\",sans-serif;font-weight:400;-ms-flex-pack:center;justify-content:center;line-height:150%;padding:0 5px}.side-table .task .title{color:#333;font-size:14px;max-width:300px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.side-table .task .subtitle{color:#999;font-size:12px;max-width:300px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]
13076
13701
  })
13077
- ], ThumbnailComponent);
13078
- return ThumbnailComponent;
13702
+ ], SideTableComponent);
13703
+ return SideTableComponent;
13704
+ }());
13705
+
13706
+ var GanttModule = /** @class */ (function () {
13707
+ function GanttModule() {
13708
+ }
13709
+ GanttModule = __decorate([
13710
+ NgModule({
13711
+ imports: [CommonModule, TooltipModule],
13712
+ declarations: [
13713
+ GanttComponent,
13714
+ SideTableComponent,
13715
+ ],
13716
+ exports: [GanttComponent],
13717
+ })
13718
+ ], GanttModule);
13719
+ return GanttModule;
13079
13720
  }());
13080
13721
 
13081
13722
  var GlobalSearchSizeEnum;
@@ -13152,770 +13793,462 @@ var GlobalSearchDropdownItemComponent = /** @class */ (function () {
13152
13793
  Component({
13153
13794
  selector: "s-global-search-dropdown-item",
13154
13795
  template: "<ng-template>\n <div class=\"{{isSmallSize() ? 'ui-g container' : 'container'}}\">\n <ng-content select=\"s-thumbnail\"></ng-content>\n <s-thumbnail [id]=\"id + '-thumbnail'\"\n *ngIf=\"!thumbnailComponent && (imageSource || iconClass) && !isSmallSize()\" [imageSource]=\"imageSource\"\n [imageAlt]=\"imageAlt || primaryLabel\" [iconClass]=\"iconClass\" [size]=\"getImageSize()\"></s-thumbnail>\n\n <div class=\"global-search-item__container {{!isSmallSize() ? 'global-search-item__container--width-60' : ''}}\">\n <div #titleTemplate>\n <ng-content select=\"[titleTemplate]\"></ng-content>\n </div>\n <s-button styleClass=\"no-padding\" class=\"{{isSmallSize() ? 'ui-g-6 no-padding' : ''}}\" [id]=\"id + '-title'\"\n *ngIf=\"!titleTemplate.children.length\" priority=\"link\" [pTooltip]=\"primaryLabel\" [label]=\"primaryLabel\"\n size=\"small\" (onClick)=\"buttonClick.emit($event)\">\n </s-button>\n\n <div #labelTemplate>\n <ng-content select=\"[labelTemplate]\"></ng-content>\n </div>\n <span [id]=\"id + '-label'\" [ngClass]=\"{'ui-g-6 global-search-item__text-align--right': isSmallSize(), 'global-search-item__italic' : !secondaryLabel}\"\n class=\"label\" *ngIf=\"!labelTemplate.children.length\"\n [pTooltip]=\"secondaryLabel\" tooltipPosition=\"top\" showDelay=\"500\">{{ secondaryLabel ? secondaryLabel : secondaryEmptyLabel }}</span>\n\n <div #descriptionTemplate>\n <ng-content select=\"[descriptionTemplate]\"></ng-content>\n </div>\n <span [id]=\"id + '-description'\" class=\"description\"\n [ngClass]=\"{'global-search-item__italic' : !secondaryLabel}\"\n *ngIf=\" !descriptionTemplate.children.length && !isMediumSize() && !isSmallSize()\"\n [pTooltip]=\"tertiaryLabel\" tooltipPosition=\"top\" showDelay=\"500\">{{ tertiaryLabel ? tertiaryLabel : tertiaryEmptyLabel }}</span>\n </div>\n <div class=\"global-search-item__container--width-40 global-search__dropdown--template\" *ngIf=\"!isSmallSize()\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n </div>\n</ng-template>\n",
13155
- styles: [".container{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;height:100%;border-bottom:1px solid #ccc;padding:15px 5px;margin:0 10px}::ng-deep .no-padding{padding:0!important;min-width:0!important}::ng-deep .s-button-with-text{min-width:0!important}.global-search-item__italic{font-style:italic}.global-search-item__container{margin-left:10px;width:100%}.global-search-item__container,.global-search-item__container span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.global-search-item__container .label{color:#333;display:block}.global-search-item__container .description{color:#999;display:block}.global-search-item__container--width-60{width:60%}.global-search-item__container--width-40{width:40%}.global-search-item__text-align--right{text-align:right;padding:2px 0 0 15px}.global-search__dropdown--template{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;text-align:right!important}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.global-search-item__container{-ms-flex:1;flex:1}}@media (max-width:767px){.global-search-item__container,.global-search-item__container span{white-space:normal}}.global-search-item__container:only-child{margin-left:0}"]
13156
- })
13157
- ], GlobalSearchDropdownItemComponent);
13158
- return GlobalSearchDropdownItemComponent;
13159
- }());
13160
-
13161
- var GlobalSearchComponent = /** @class */ (function () {
13162
- function GlobalSearchComponent(cdr) {
13163
- this.cdr = cdr;
13164
- this.id = "s-global-search-" + GlobalSearchDropdownItemComponent.nextId++;
13165
- this.delay = 500;
13166
- this.isLoading = false;
13167
- this.showFooter = true;
13168
- this.onSearch = new EventEmitter();
13169
- this.onFocus = new EventEmitter();
13170
- this.onShowMore = new EventEmitter();
13171
- this.wasSearched = false;
13172
- this.isModalLoading = false;
13173
- this.expanded = true;
13174
- }
13175
- GlobalSearchComponent.prototype.onChange = function () {
13176
- var _this = this;
13177
- var search = this.search;
13178
- setTimeout(function () {
13179
- if (_this.search === search) {
13180
- _this.canShowGlobalSearchActive();
13181
- _this.onSearch.emit(_this.search);
13182
- }
13183
- }, this.delay);
13184
- };
13185
- GlobalSearchComponent.prototype.focusIn = function () {
13186
- this.onFocus.emit(true);
13187
- };
13188
- GlobalSearchComponent.prototype.focusOut = function () {
13189
- this.onFocus.emit(false);
13190
- };
13191
- GlobalSearchComponent.prototype.showMore = function () {
13192
- this.onShowMore.emit();
13193
- };
13194
- GlobalSearchComponent.prototype.removeActiveClassByGlobalSearch = function () {
13195
- ExportUtils.removeClass(this.globalSearch, "global-search__input-active");
13196
- };
13197
- GlobalSearchComponent.prototype.close = function () {
13198
- this.search = null;
13199
- this.wasSearched = false;
13200
- this.dropdownItens = null;
13201
- this.isModalLoading = false;
13202
- this.removeActiveClassByGlobalSearch();
13203
- };
13204
- GlobalSearchComponent.prototype.canShowGlobalSearchActive = function () {
13205
- this.wasSearched = !!this.search;
13206
- if (this.search) {
13207
- ExportUtils.addClass(this.globalSearch, "global-search__input-active");
13208
- }
13209
- else {
13210
- this.removeActiveClassByGlobalSearch();
13211
- this.close();
13212
- }
13213
- this.cdr.detectChanges();
13214
- };
13215
- GlobalSearchComponent.nextId = 0;
13216
- GlobalSearchComponent.ctorParameters = function () { return [
13217
- { type: ChangeDetectorRef }
13218
- ]; };
13219
- __decorate([
13220
- ViewChild("globalSearch", { static: false })
13221
- ], GlobalSearchComponent.prototype, "globalSearch", void 0);
13222
- __decorate([
13223
- Input()
13224
- ], GlobalSearchComponent.prototype, "id", void 0);
13225
- __decorate([
13226
- Input()
13227
- ], GlobalSearchComponent.prototype, "delay", void 0);
13228
- __decorate([
13229
- Input()
13230
- ], GlobalSearchComponent.prototype, "totalItensLabel", void 0);
13231
- __decorate([
13232
- Input()
13233
- ], GlobalSearchComponent.prototype, "showMoreLabel", void 0);
13234
- __decorate([
13235
- Input()
13236
- ], GlobalSearchComponent.prototype, "placeholder", void 0);
13237
- __decorate([
13238
- Input()
13239
- ], GlobalSearchComponent.prototype, "isLoading", void 0);
13240
- __decorate([
13241
- Input()
13242
- ], GlobalSearchComponent.prototype, "totalElements", void 0);
13243
- __decorate([
13244
- Input()
13245
- ], GlobalSearchComponent.prototype, "emptyTitle", void 0);
13246
- __decorate([
13247
- Input()
13248
- ], GlobalSearchComponent.prototype, "emptyDescription", void 0);
13249
- __decorate([
13250
- Input()
13251
- ], GlobalSearchComponent.prototype, "emptyIcon", void 0);
13252
- __decorate([
13253
- Input()
13254
- ], GlobalSearchComponent.prototype, "showFooter", void 0);
13255
- __decorate([
13256
- ContentChildren(GlobalSearchDropdownItemComponent)
13257
- ], GlobalSearchComponent.prototype, "dropdownItens", void 0);
13258
- __decorate([
13259
- Output()
13260
- ], GlobalSearchComponent.prototype, "onSearch", void 0);
13261
- __decorate([
13262
- Output()
13263
- ], GlobalSearchComponent.prototype, "onFocus", void 0);
13264
- __decorate([
13265
- Output()
13266
- ], GlobalSearchComponent.prototype, "onShowMore", void 0);
13267
- GlobalSearchComponent = __decorate([
13268
- Component({
13269
- selector: "s-global-search",
13270
- template: "<div class=\"ui-inputgroup\">\n <input #globalSearch class=\"global-search__input\" [(ngModel)]=\"search\" (ngModelChange)=\"onChange()\" pInputText\n [placeholder]=\"placeholder\" (focus)=\"focusIn()\" (blur)=\"focusOut()\">\n <span class=\"ui-inputgroup-addon global-search__span\"><em class=\"fas fa-search\"></em></span>\n <div class=\"global-search__modal\" *ngIf=\"wasSearched\">\n <div *sLoadingState=\"isLoading && !isModalLoading\" class=\"global-search__loader\">\n <div class=\"global-search__container\" *ngIf=\"dropdownItens && dropdownItens.length > 0 || isLoading\">\n <div *ngIf=\"dropdownItens && dropdownItens.length > 0\">\n <div class=\"global-search__modal--total-itens-title\">\n <span class=\"ui-g-11 no-space\">{{totalItensLabel}}</span>\n <span class=\"ui-g-1 no-space global-search__modal--total-itens-title-icon\" (click)=\"close()\"><em\n class=\"fas fa-times\"></em></span>\n </div>\n <div class=\"no-space global-search__dropdown--itens\"\n [@expandableContent]=\"expanded\">\n <ng-container *ngFor=\"let item of dropdownItens\">\n <div class=\"s-object-card-field no-space global-search__dropdown--itens-container\">\n <ng-container *ngTemplateOutlet=\"item.content\"></ng-container>\n </div>\n </ng-container>\n </div>\n <div *ngIf=\"showFooter\" class=\"ui-g-12 global-search__modal--footer\">\n <s-button class=\"global-search__show-more\" (click)=\"showMore()\" priority=\"link\">\n {{showMoreLabel}}\n </s-button>\n </div>\n </div>\n </div>\n <s-empty-state *ngIf=\"(!dropdownItens || dropdownItens.length==0) && !isLoading\" [title]=\"emptyTitle\"\n [description]=\"emptyDescription\" ngClass=\"global-search__empty-state--icon\"\n [iconClass]=\"(emptyIcon ? emptyIcon : 'fas fa-search')\">\n </s-empty-state>\n </div>\n </div>\n <div *ngIf=\"wasSearched\" class=\"global-search__background\" (click)=\"close()\"></div>\n</div>\n",
13271
- animations: [
13272
- trigger("expandableContent", [
13273
- state("*", style$7({
13274
- height: "0",
13275
- })),
13276
- state("false", style$7({
13277
- height: "0",
13278
- })),
13279
- state("true", style$7({
13280
- height: "*",
13281
- })),
13282
- transition("* => true", animate("200ms ease-out")),
13283
- transition("false <=> true", animate("200ms ease-out")),
13284
- ]),
13285
- ],
13286
- styles: [".global-search__input{border-radius:20px 0 0 20px;width:136px;cursor:pointer;padding:0 0 0 15px;transition:.3s}.ui-inputtext{min-height:25px!important;height:25px!important}.global-search__span{transition:.3s;background:0 0!important;border-left:none;border-radius:0 20px 20px 0!important;padding:1px 15px 0 0!important;height:25px!important}.global-search__input:active,.global-search__input:focus{width:466px;cursor:default;transition:.3s;border-top:1px solid #428bca;border-left:1px solid #428bca;border-bottom:1px solid #428bca}.global-search__input:active,.global-search__input:focus+.global-search__span{transition:.3s;border-left:none;border-top:1px solid #428bca!important;border-right:1px solid #428bca!important;border-bottom:1px solid #428bca!important}.global-search__input-active{width:466px;cursor:default;transition:.3s}.global-search__modal{box-shadow:0 2px 8px 0 rgba(0,0,0,.4);border-radius:5px;width:500px;background:#fff;position:absolute;margin-top:60px;z-index:6;min-height:50px}::ng-deep .global-search__loader{border-radius:5px!important;width:100%}.global-search__container{min-height:50px;width:100%}.global-search__modal--total-itens-title{padding:15px;color:#333;border-bottom:1px solid #ccc;font-weight:600;height:50px}.global-search__modal--footer{height:50px;border-top:1px solid #ccc}.global-search__dropdown--itens{max-height:510px;overflow:auto}.global-search__dropdown--itens-container:hover{background:#dbe0e4}.global-search__modal--total-itens-title-icon{text-align:right;cursor:pointer}.global-search__background{background:rgba(0,0,0,.4);width:100%;height:calc(100vh - 70px);position:absolute;left:0;margin-top:50px;z-index:5;cursor:pointer}.no-space{padding:0;margin:0}.global-search__show-more{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}body .global-search__show-more--button{color:#428bca!important}.modal{position:absolute;left:1%;width:98%;height:calc(100vh - 90px)}.global-search__empty-state--icon{margin:42px 134px}::ng-deep .global-search__empty-state--icon .container .icon{font-size:40px}::ng-deep .s-button-priority-link{color:#428bca}@media all and (max-width:900px){.global-search__modal{top:20px;width:98%;left:1%}.global-search__input-active,.global-search__input:active,.global-search__input:focus{position:absolute;width:calc(100% - 70px);left:2%}body .global-search__dropdown--itens{max-height:100%;overflow:auto}}@media all and (max-width:767px){.global-search__modal{top:15px}.global-search__input-active,.global-search__input:active,.global-search__input:focus{width:calc(100% - 55px)}}@media all and (max-width:600px){.global-search__modal--itens{height:calc(100vh - 100px);background:#fff}.global-search__input-active,.global-search__input:active,.global-search__input:focus{position:absolute;width:calc(100% - 53px);left:2%}body .global-search__dropdown--itens{max-height:100%;overflow:auto}.global-search__dropdown--itens{max-height:100%;background:#fff}.global-search__modal--footer{background:#fff;height:50px}.global-search__modal{top:17px;border-radius:0;margin-top:55px;box-shadow:none;left:0;width:100%}}"]
13287
- })
13288
- ], GlobalSearchComponent);
13289
- return GlobalSearchComponent;
13290
- }());
13291
-
13292
- var ThumbnailModule = /** @class */ (function () {
13293
- function ThumbnailModule() {
13294
- }
13295
- ThumbnailModule = __decorate([
13296
- NgModule({
13297
- imports: [CommonModule],
13298
- declarations: [ThumbnailComponent],
13299
- exports: [ThumbnailComponent],
13300
- providers: [ThumbnailService],
13301
- })
13302
- ], ThumbnailModule);
13303
- return ThumbnailModule;
13304
- }());
13305
-
13306
- var InfiniteScrollDirective = /** @class */ (function () {
13307
- function InfiniteScrollDirective(el) {
13308
- this.el = el;
13309
- this.onScroll = new EventEmitter();
13310
- }
13311
- InfiniteScrollDirective.prototype.scroll = function () {
13312
- if (this.el.nativeElement.scrollTop > (this.el.nativeElement.scrollHeight - this.el.nativeElement.offsetHeight - 2)) {
13313
- this.onScroll.emit();
13314
- }
13315
- };
13316
- InfiniteScrollDirective.ctorParameters = function () { return [
13317
- { type: ElementRef }
13318
- ]; };
13319
- __decorate([
13320
- Output()
13321
- ], InfiniteScrollDirective.prototype, "onScroll", void 0);
13322
- __decorate([
13323
- HostListener("scroll")
13324
- ], InfiniteScrollDirective.prototype, "scroll", null);
13325
- InfiniteScrollDirective = __decorate([
13326
- Directive({
13327
- selector: "[sInfiniteScroll]"
13328
- })
13329
- ], InfiniteScrollDirective);
13330
- return InfiniteScrollDirective;
13331
- }());
13332
-
13333
- var InfiniteScrollModule = /** @class */ (function () {
13334
- function InfiniteScrollModule() {
13335
- }
13336
- InfiniteScrollModule = __decorate([
13337
- NgModule({
13338
- declarations: [
13339
- InfiniteScrollDirective
13340
- ],
13341
- imports: [
13342
- CommonModule
13343
- ],
13344
- exports: [
13345
- InfiniteScrollDirective
13346
- ]
13347
- })
13348
- ], InfiniteScrollModule);
13349
- return InfiniteScrollModule;
13350
- }());
13351
-
13352
- var GlobalSearchModule = /** @class */ (function () {
13353
- function GlobalSearchModule() {
13354
- }
13355
- GlobalSearchModule = __decorate([
13356
- NgModule({
13357
- declarations: [
13358
- GlobalSearchComponent,
13359
- GlobalSearchDropdownItemComponent
13360
- ],
13361
- imports: [
13362
- CommonModule,
13363
- InputTextModule,
13364
- FormsModule,
13365
- ReactiveFormsModule,
13366
- TooltipModule$1,
13367
- ThumbnailModule,
13368
- ButtonModule,
13369
- LoadingStateModule,
13370
- InfiniteScrollModule,
13371
- EmptyStateModule
13372
- ],
13373
- exports: [
13374
- GlobalSearchComponent,
13375
- GlobalSearchDropdownItemComponent,
13376
- TooltipModule$1,
13377
- ThumbnailModule,
13378
- ButtonModule,
13379
- LoadingStateModule,
13380
- EmptyStateModule
13381
- ],
13382
- entryComponents: [
13383
- GlobalSearchComponent,
13384
- GlobalSearchDropdownItemComponent
13385
- ]
13796
+ styles: [".container{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;height:100%;border-bottom:1px solid #ccc;padding:15px 5px;margin:0 10px}::ng-deep .no-padding{padding:0!important;min-width:0!important}::ng-deep .s-button-with-text{min-width:0!important}.global-search-item__italic{font-style:italic}.global-search-item__container{margin-left:10px;width:100%}.global-search-item__container,.global-search-item__container span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.global-search-item__container .label{color:#333;display:block}.global-search-item__container .description{color:#999;display:block}.global-search-item__container--width-60{width:60%}.global-search-item__container--width-40{width:40%}.global-search-item__text-align--right{text-align:right;padding:2px 0 0 15px}.global-search__dropdown--template{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;text-align:right!important}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.global-search-item__container{-ms-flex:1;flex:1}}@media (max-width:767px){.global-search-item__container,.global-search-item__container span{white-space:normal}}.global-search-item__container:only-child{margin-left:0}"]
13386
13797
  })
13387
- ], GlobalSearchModule);
13388
- return GlobalSearchModule;
13798
+ ], GlobalSearchDropdownItemComponent);
13799
+ return GlobalSearchDropdownItemComponent;
13389
13800
  }());
13390
13801
 
13391
- var IAInsightCardComponent = /** @class */ (function () {
13392
- function IAInsightCardComponent(clipboard, messageService, translateService) {
13393
- this.clipboard = clipboard;
13394
- this.messageService = messageService;
13395
- this.translateService = translateService;
13396
- this.open = false;
13802
+ var GlobalSearchComponent = /** @class */ (function () {
13803
+ function GlobalSearchComponent(cdr) {
13804
+ this.cdr = cdr;
13805
+ this.id = "s-global-search-" + GlobalSearchDropdownItemComponent.nextId++;
13806
+ this.delay = 500;
13397
13807
  this.isLoading = false;
13398
- this.likeSelected = false;
13399
- this.dislikeSelected = false;
13808
+ this.showFooter = true;
13809
+ this.onSearch = new EventEmitter();
13810
+ this.onFocus = new EventEmitter();
13811
+ this.onShowMore = new EventEmitter();
13812
+ this.wasSearched = false;
13813
+ this.isModalLoading = false;
13814
+ this.expanded = true;
13400
13815
  }
13401
- IAInsightCardComponent.prototype.toggle = function () {
13402
- this.open = !this.open;
13403
- this._requestInsight();
13816
+ GlobalSearchComponent.prototype.onChange = function () {
13817
+ var _this = this;
13818
+ var search = this.search;
13819
+ setTimeout(function () {
13820
+ if (_this.search === search) {
13821
+ _this.canShowGlobalSearchActive();
13822
+ _this.onSearch.emit(_this.search);
13823
+ }
13824
+ }, this.delay);
13404
13825
  };
13405
- IAInsightCardComponent.prototype.onLikeSelected = function () {
13406
- var _a, _b;
13407
- if (this.likeSelected) {
13408
- this.likeSelected = false;
13409
- }
13410
- else {
13411
- this.likeSelected = true;
13412
- this.dislikeSelected = false;
13413
- (_b = (_a = this.insight).onLikeSelected) === null || _b === void 0 ? void 0 : _b.call(_a);
13414
- }
13826
+ GlobalSearchComponent.prototype.focusIn = function () {
13827
+ this.onFocus.emit(true);
13415
13828
  };
13416
- IAInsightCardComponent.prototype.onDislikeSelected = function () {
13417
- var _a, _b;
13418
- if (this.dislikeSelected) {
13419
- this.dislikeSelected = false;
13420
- }
13421
- else {
13422
- this.dislikeSelected = true;
13423
- this.likeSelected = false;
13424
- (_b = (_a = this.insight).onDislikeSelected) === null || _b === void 0 ? void 0 : _b.call(_a);
13425
- }
13829
+ GlobalSearchComponent.prototype.focusOut = function () {
13830
+ this.onFocus.emit(false);
13426
13831
  };
13427
- IAInsightCardComponent.prototype.copyContent = function () {
13428
- var _a, _b;
13429
- (_b = (_a = this.insight).onCopy) === null || _b === void 0 ? void 0 : _b.call(_a, this.content);
13430
- if (this.clipboard.copy(this.content)) {
13431
- this.messageService.add({
13432
- severity: "info",
13433
- summary: this.translateService.instant("platform.angular_components.copied_to_clipboard"),
13434
- });
13435
- }
13832
+ GlobalSearchComponent.prototype.showMore = function () {
13833
+ this.onShowMore.emit();
13436
13834
  };
13437
- IAInsightCardComponent.prototype.reloadContent = function () {
13438
- this._requestInsight();
13835
+ GlobalSearchComponent.prototype.removeActiveClassByGlobalSearch = function () {
13836
+ ExportUtils.removeClass(this.globalSearch, "global-search__input-active");
13439
13837
  };
13440
- IAInsightCardComponent.prototype._requestInsight = function () {
13441
- var _this = this;
13442
- this.isLoading = true;
13443
- this.insight.request$
13444
- .pipe(first(), finalize(function () { return (_this.isLoading = false); }))
13445
- .subscribe(function (content) {
13446
- _this.content = marked.marked(content);
13447
- });
13838
+ GlobalSearchComponent.prototype.close = function () {
13839
+ this.search = null;
13840
+ this.wasSearched = false;
13841
+ this.dropdownItens = null;
13842
+ this.isModalLoading = false;
13843
+ this.removeActiveClassByGlobalSearch();
13448
13844
  };
13449
- IAInsightCardComponent.ctorParameters = function () { return [
13450
- { type: Clipboard },
13451
- { type: MessageService },
13452
- { type: TranslateService }
13845
+ GlobalSearchComponent.prototype.canShowGlobalSearchActive = function () {
13846
+ this.wasSearched = !!this.search;
13847
+ if (this.search) {
13848
+ ExportUtils.addClass(this.globalSearch, "global-search__input-active");
13849
+ }
13850
+ else {
13851
+ this.removeActiveClassByGlobalSearch();
13852
+ this.close();
13853
+ }
13854
+ this.cdr.detectChanges();
13855
+ };
13856
+ GlobalSearchComponent.nextId = 0;
13857
+ GlobalSearchComponent.ctorParameters = function () { return [
13858
+ { type: ChangeDetectorRef }
13453
13859
  ]; };
13860
+ __decorate([
13861
+ ViewChild("globalSearch", { static: false })
13862
+ ], GlobalSearchComponent.prototype, "globalSearch", void 0);
13454
13863
  __decorate([
13455
13864
  Input()
13456
- ], IAInsightCardComponent.prototype, "insight", void 0);
13457
- IAInsightCardComponent = __decorate([
13458
- Component({
13459
- selector: "s-ia-insight-card",
13460
- template: "<div class=\"ia-insight-card\" [ngClass]=\"{ 'ia-insight-card--close': !open }\">\n <div class=\"header\" (click)=\"toggle()\">\n <s-badge text=\"Insight\" iconClass=\"fal fa-lightbulb\"></s-badge>\n <span class=\"insight-title\">{{ insight.title }}</span>\n <span\n class=\"toggle-icon fas\"\n [ngClass]=\"{\n 'fa-angle-down': !open,\n 'fa-angle-up': open\n }\"\n >\n </span>\n </div>\n <div class=\"content\">\n <ng-container *ngIf=\"isLoading; then loadingBlock; else contentBlock\"></ng-container>\n <ng-template #loadingBlock>\n <s-ia-insight-card-loader></s-ia-insight-card-loader>\n </ng-template>\n <ng-template #contentBlock>\n <ng-container *ngIf=\"content; then successBlock; else errorBlock\"></ng-container>\n\n <ng-template #successBlock>\n <span class=\"text\" [innerHTML]=\"content\"></span>\n </ng-template>\n <ng-template #errorBlock>\n <span class=\"text text--error\">{{ \"platform.angular_components.error_loading_insight_alt\" | translate }}</span>\n </ng-template>\n\n <div class=\"options\">\n <button [disabled]=\"!content\" (click)=\"copyContent()\" class=\"option fal fa-copy\"></button>\n <button (click)=\"reloadContent()\" class=\"option fal fa-redo\"></button>\n <button\n *ngIf=\"insight.onLikeSelected\"\n [disabled]=\"!content\"\n (click)=\"onLikeSelected()\"\n class=\"option\"\n [ngClass]=\"{\n 'fal': !likeSelected,\n 'fas': likeSelected,\n 'fa-thumbs-up': true\n }\">\n </button>\n <button\n *ngIf=\"insight.onDislikeSelected\"\n [disabled]=\"!content\"\n (click)=\"onDislikeSelected()\"\n class=\"option\"\n [ngClass]=\"{\n 'fal': !dislikeSelected,\n 'fas': dislikeSelected,\n 'fa-thumbs-down': true\n }\">\n </button>\n </div>\n </ng-template>\n </div>\n</div>\n",
13461
- styles: [".ia-insight-card{background-color:#fff;border:1px solid #9ecad4;border-radius:4px;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden}.ia-insight-card .header{-ms-flex-align:center;align-items:center;background-color:#f1f7f8;border-bottom:1px solid #9ecad4;display:-ms-flexbox;display:flex;gap:8px;min-height:60px;padding:8px 16px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ia-insight-card .header .insight-title{color:#428bca;-ms-flex-positive:1;flex-grow:1;font-family:\"Open Sans\",sans-serif;font-size:14px;line-height:150%}.ia-insight-card .header .toggle-icon{color:#888b99;font-size:20px}.ia-insight-card .content{-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;cursor:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px;min-height:160px;padding:24px}.ia-insight-card .content .text{color:#212533;font-family:\"Open Sans\",sans-serif;font-size:14px;width:100%}.ia-insight-card .content .text--error{text-align:center}.ia-insight-card .content .options{display:-ms-flexbox;display:flex;gap:8px}.ia-insight-card .content .options .option{background-color:transparent;border:none;color:#428bca;cursor:pointer;font-size:12px}.ia-insight-card .content .options .option:disabled{color:#c1c1cc;cursor:auto}.ia-insight-card--close{border-color:#dedce5}.ia-insight-card--close .header{background-color:#fbfafc;border:#dedce5}.ia-insight-card--close .header .insight-title{color:#888b99}.ia-insight-card--close .content{display:none}"]
13462
- })
13463
- ], IAInsightCardComponent);
13464
- return IAInsightCardComponent;
13465
- }());
13466
-
13467
- var IAInsightSidebarComponent = /** @class */ (function () {
13468
- function IAInsightSidebarComponent() {
13469
- this.insights = [];
13470
- this.opened = false;
13471
- }
13472
- IAInsightSidebarComponent.prototype.toggle = function () {
13473
- this.opened = !this.opened;
13474
- };
13475
- IAInsightSidebarComponent.prototype.open = function () {
13476
- this.opened = true;
13477
- };
13478
- IAInsightSidebarComponent.prototype.close = function () {
13479
- this.opened = false;
13480
- };
13865
+ ], GlobalSearchComponent.prototype, "id", void 0);
13481
13866
  __decorate([
13482
13867
  Input()
13483
- ], IAInsightSidebarComponent.prototype, "insights", void 0);
13868
+ ], GlobalSearchComponent.prototype, "delay", void 0);
13484
13869
  __decorate([
13485
13870
  Input()
13486
- ], IAInsightSidebarComponent.prototype, "hasPermission", void 0);
13871
+ ], GlobalSearchComponent.prototype, "totalItensLabel", void 0);
13487
13872
  __decorate([
13488
13873
  Input()
13489
- ], IAInsightSidebarComponent.prototype, "introText", void 0);
13874
+ ], GlobalSearchComponent.prototype, "showMoreLabel", void 0);
13490
13875
  __decorate([
13491
13876
  Input()
13492
- ], IAInsightSidebarComponent.prototype, "introTemplate", void 0);
13877
+ ], GlobalSearchComponent.prototype, "placeholder", void 0);
13493
13878
  __decorate([
13494
13879
  Input()
13495
- ], IAInsightSidebarComponent.prototype, "emptyText", void 0);
13880
+ ], GlobalSearchComponent.prototype, "isLoading", void 0);
13496
13881
  __decorate([
13497
13882
  Input()
13498
- ], IAInsightSidebarComponent.prototype, "emptyTemplate", void 0);
13883
+ ], GlobalSearchComponent.prototype, "totalElements", void 0);
13499
13884
  __decorate([
13500
13885
  Input()
13501
- ], IAInsightSidebarComponent.prototype, "noPermissionText", void 0);
13886
+ ], GlobalSearchComponent.prototype, "emptyTitle", void 0);
13502
13887
  __decorate([
13503
13888
  Input()
13504
- ], IAInsightSidebarComponent.prototype, "noPermissionTemplate", void 0);
13505
- IAInsightSidebarComponent = __decorate([
13506
- Component({
13507
- selector: "s-ia-insight-sidebar",
13508
- template: "<div\n class=\"sidebar\"\n [class.opened]=\"opened\">\n <div class=\"header\">\n <button (click)=\"close()\" class=\"option\">\n <span class=\"far fa-chevron-double-right\"></span>\n </button>\n <div class=\"title\">\n <span><ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container></span>\n <span>Insight</span>\n </div>\n </div>\n <div class=\"intro\">\n <ng-container *ngIf=\"hasPermission; then permissionBlock; else noPermissionBlock\"></ng-container>\n\n <ng-template #permissionBlock>\n <ng-container *ngIf=\"insights?.length; then introBlock; else emptyBlock\"></ng-container>\n \n <ng-template #introBlock>\n <ng-container *ngIf=\"introTemplate; then introCustomBlock; else introTextBlock\"></ng-container>\n\n <ng-template #introCustomBlock>\n <ng-container *ngTemplateOutlet=\"introTemplate\"></ng-container>\n </ng-template>\n\n <ng-template #introTextBlock>\n <span class=\"text\">{{ introText || \"platform.angular_components.insight_intro\" | translate }}</span>\n </ng-template>\n </ng-template>\n \n <ng-template #emptyBlock>\n <ng-container *ngIf=\"emptyTemplate; then emptyCustomBlock; else emptyTextBlock\"></ng-container>\n\n <ng-template #emptyCustomBlock>\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n\n <ng-template #emptyTextBlock>\n <span class=\"text\">{{ emptyText || \"platform.angular_components.insight_empty\" | translate }}</span>\n </ng-template>\n </ng-template>\n </ng-template>\n \n <ng-template #noPermissionBlock>\n <ng-container *ngIf=\"noPermissionTemplate; then noPermissionCustomBlock; else noPermissionTextBlock\"></ng-container>\n\n <ng-template #noPermissionCustomBlock>\n <ng-container *ngTemplateOutlet=\"noPermissionTemplate\"></ng-container>\n </ng-template>\n\n <ng-template #noPermissionTextBlock>\n <span>{{ noPermissionText || \"platform.angular_components.insight_no_permission\" | translate }}</span>\n </ng-template>\n </ng-template>\n </div>\n <div class=\"insights\">\n <ng-container *ngIf=\"insights?.length\">\n <s-ia-insight-card\n *ngFor=\"let insight of insights\"\n [insight]=\"insight\">\n </s-ia-insight-card>\n </ng-container>\n </div>\n</div>\n\n<ng-template #iassistIcon>\n <div style=\"width: 28px; height: 28px;\">\n <span *sSVGFactory=\"'iassist'\"></span>\n </div>\n</ng-template>\n",
13509
- styles: [".sidebar{background-color:#fff;border-left:1px solid #dedce5;height:100%;overflow-x:hidden;position:fixed;right:-25%;transition:.5s;top:0;width:25%;z-index:1002}.sidebar .header{border-bottom:1px solid #dedce5;display:-ms-flexbox;display:flex;gap:16px;padding:12px 20px}.sidebar .header .option{background-color:transparent;border:none;color:#428bca;cursor:pointer;font-size:16px;padding:12px}.sidebar .header .title{-ms-flex-align:center;align-items:center;color:#212533;display:-ms-flexbox;display:flex;font-family:\"Open Sans\",sans-serif;font-size:16px;gap:16px;line-height:1;-webkit-user-select:none;-ms-user-select:none;user-select:none}.sidebar .intro{margin:8px 40px}.sidebar .intro .text{color:#212533;display:-ms-flexbox;display:flex;font-family:\"Open Sans\",sans-serif;font-size:14px;-ms-flex-pack:center;justify-content:center;line-height:1.5;text-align:center;-webkit-user-select:none;-ms-user-select:none;user-select:none}.sidebar.opened{right:0}.sidebar.opened .insights{padding:12px}.insights{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:12px}@media (max-width:1366px){.sidebar{right:-50%;width:50%}}@media (max-width:768px){.sidebar{right:-75%;width:75%}}@media (max-width:600px){.sidebar{right:-100%;width:100%}}"]
13510
- })
13511
- ], IAInsightSidebarComponent);
13512
- return IAInsightSidebarComponent;
13513
- }());
13514
-
13515
- var IAInsightCardLoaderComponent = /** @class */ (function () {
13516
- function IAInsightCardLoaderComponent() {
13517
- }
13518
- IAInsightCardLoaderComponent = __decorate([
13889
+ ], GlobalSearchComponent.prototype, "emptyDescription", void 0);
13890
+ __decorate([
13891
+ Input()
13892
+ ], GlobalSearchComponent.prototype, "emptyIcon", void 0);
13893
+ __decorate([
13894
+ Input()
13895
+ ], GlobalSearchComponent.prototype, "showFooter", void 0);
13896
+ __decorate([
13897
+ ContentChildren(GlobalSearchDropdownItemComponent)
13898
+ ], GlobalSearchComponent.prototype, "dropdownItens", void 0);
13899
+ __decorate([
13900
+ Output()
13901
+ ], GlobalSearchComponent.prototype, "onSearch", void 0);
13902
+ __decorate([
13903
+ Output()
13904
+ ], GlobalSearchComponent.prototype, "onFocus", void 0);
13905
+ __decorate([
13906
+ Output()
13907
+ ], GlobalSearchComponent.prototype, "onShowMore", void 0);
13908
+ GlobalSearchComponent = __decorate([
13519
13909
  Component({
13520
- selector: "s-ia-insight-card-loader",
13521
- template: "<div class=\"ia-insight-card-loader\">\n <div class=\"loader\">\n <div class=\"loader-icon\">\n <div *sSVGFactory=\"'iassist'\"></div>\n </div>\n </div>\n \n <span class=\"loader-label\">{{ \"platform.angular_components.loading_insight\" | translate }}</span>\n</div>\n",
13522
- styles: [".ia-insight-card-loader{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}.ia-insight-card-loader .loader{-ms-flex-align:center;align-items:center;animation:2s linear infinite spin;border:2px solid #f1f7f8;border-top:2px solid #0fa389;border-radius:50%;display:-ms-flexbox;display:flex;height:48px;-ms-flex-pack:center;justify-content:center;width:48px}.ia-insight-card-loader .loader .loader-icon{animation:2s linear infinite reverse spin;height:32px;transform:translate(-50%,-50%)}.ia-insight-card-loader .loader-label{color:#888b99;font-family:\"Open Sans\",sans-serif;font-size:16px}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}"]
13910
+ selector: "s-global-search",
13911
+ template: "<div class=\"ui-inputgroup\">\n <input #globalSearch class=\"global-search__input\" [(ngModel)]=\"search\" (ngModelChange)=\"onChange()\" pInputText\n [placeholder]=\"placeholder\" (focus)=\"focusIn()\" (blur)=\"focusOut()\">\n <span class=\"ui-inputgroup-addon global-search__span\"><em class=\"fas fa-search\"></em></span>\n <div class=\"global-search__modal\" *ngIf=\"wasSearched\">\n <div *sLoadingState=\"isLoading && !isModalLoading\" class=\"global-search__loader\">\n <div class=\"global-search__container\" *ngIf=\"dropdownItens && dropdownItens.length > 0 || isLoading\">\n <div *ngIf=\"dropdownItens && dropdownItens.length > 0\">\n <div class=\"global-search__modal--total-itens-title\">\n <span class=\"ui-g-11 no-space\">{{totalItensLabel}}</span>\n <span class=\"ui-g-1 no-space global-search__modal--total-itens-title-icon\" (click)=\"close()\"><em\n class=\"fas fa-times\"></em></span>\n </div>\n <div class=\"no-space global-search__dropdown--itens\"\n [@expandableContent]=\"expanded\">\n <ng-container *ngFor=\"let item of dropdownItens\">\n <div class=\"s-object-card-field no-space global-search__dropdown--itens-container\">\n <ng-container *ngTemplateOutlet=\"item.content\"></ng-container>\n </div>\n </ng-container>\n </div>\n <div *ngIf=\"showFooter\" class=\"ui-g-12 global-search__modal--footer\">\n <s-button class=\"global-search__show-more\" (click)=\"showMore()\" priority=\"link\">\n {{showMoreLabel}}\n </s-button>\n </div>\n </div>\n </div>\n <s-empty-state *ngIf=\"(!dropdownItens || dropdownItens.length==0) && !isLoading\" [title]=\"emptyTitle\"\n [description]=\"emptyDescription\" ngClass=\"global-search__empty-state--icon\"\n [iconClass]=\"(emptyIcon ? emptyIcon : 'fas fa-search')\">\n </s-empty-state>\n </div>\n </div>\n <div *ngIf=\"wasSearched\" class=\"global-search__background\" (click)=\"close()\"></div>\n</div>\n",
13912
+ animations: [
13913
+ trigger("expandableContent", [
13914
+ state("*", style$7({
13915
+ height: "0",
13916
+ })),
13917
+ state("false", style$7({
13918
+ height: "0",
13919
+ })),
13920
+ state("true", style$7({
13921
+ height: "*",
13922
+ })),
13923
+ transition("* => true", animate("200ms ease-out")),
13924
+ transition("false <=> true", animate("200ms ease-out")),
13925
+ ]),
13926
+ ],
13927
+ styles: [".global-search__input{border-radius:20px 0 0 20px;width:136px;cursor:pointer;padding:0 0 0 15px;transition:.3s}.ui-inputtext{min-height:25px!important;height:25px!important}.global-search__span{transition:.3s;background:0 0!important;border-left:none;border-radius:0 20px 20px 0!important;padding:1px 15px 0 0!important;height:25px!important}.global-search__input:active,.global-search__input:focus{width:466px;cursor:default;transition:.3s;border-top:1px solid #428bca;border-left:1px solid #428bca;border-bottom:1px solid #428bca}.global-search__input:active,.global-search__input:focus+.global-search__span{transition:.3s;border-left:none;border-top:1px solid #428bca!important;border-right:1px solid #428bca!important;border-bottom:1px solid #428bca!important}.global-search__input-active{width:466px;cursor:default;transition:.3s}.global-search__modal{box-shadow:0 2px 8px 0 rgba(0,0,0,.4);border-radius:5px;width:500px;background:#fff;position:absolute;margin-top:60px;z-index:6;min-height:50px}::ng-deep .global-search__loader{border-radius:5px!important;width:100%}.global-search__container{min-height:50px;width:100%}.global-search__modal--total-itens-title{padding:15px;color:#333;border-bottom:1px solid #ccc;font-weight:600;height:50px}.global-search__modal--footer{height:50px;border-top:1px solid #ccc}.global-search__dropdown--itens{max-height:510px;overflow:auto}.global-search__dropdown--itens-container:hover{background:#dbe0e4}.global-search__modal--total-itens-title-icon{text-align:right;cursor:pointer}.global-search__background{background:rgba(0,0,0,.4);width:100%;height:calc(100vh - 70px);position:absolute;left:0;margin-top:50px;z-index:5;cursor:pointer}.no-space{padding:0;margin:0}.global-search__show-more{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}body .global-search__show-more--button{color:#428bca!important}.modal{position:absolute;left:1%;width:98%;height:calc(100vh - 90px)}.global-search__empty-state--icon{margin:42px 134px}::ng-deep .global-search__empty-state--icon .container .icon{font-size:40px}::ng-deep .s-button-priority-link{color:#428bca}@media all and (max-width:900px){.global-search__modal{top:20px;width:98%;left:1%}.global-search__input-active,.global-search__input:active,.global-search__input:focus{position:absolute;width:calc(100% - 70px);left:2%}body .global-search__dropdown--itens{max-height:100%;overflow:auto}}@media all and (max-width:767px){.global-search__modal{top:15px}.global-search__input-active,.global-search__input:active,.global-search__input:focus{width:calc(100% - 55px)}}@media all and (max-width:600px){.global-search__modal--itens{height:calc(100vh - 100px);background:#fff}.global-search__input-active,.global-search__input:active,.global-search__input:focus{position:absolute;width:calc(100% - 53px);left:2%}body .global-search__dropdown--itens{max-height:100%;overflow:auto}.global-search__dropdown--itens{max-height:100%;background:#fff}.global-search__modal--footer{background:#fff;height:50px}.global-search__modal{top:17px;border-radius:0;margin-top:55px;box-shadow:none;left:0;width:100%}}"]
13523
13928
  })
13524
- ], IAInsightCardLoaderComponent);
13525
- return IAInsightCardLoaderComponent;
13929
+ ], GlobalSearchComponent);
13930
+ return GlobalSearchComponent;
13526
13931
  }());
13527
13932
 
13528
- var IAInsightTemplateTypes;
13529
- (function (IAInsightTemplateTypes) {
13530
- IAInsightTemplateTypes["Empty"] = "empty";
13531
- IAInsightTemplateTypes["Intro"] = "intro";
13532
- IAInsightTemplateTypes["NoPermission"] = "noPermission";
13533
- })(IAInsightTemplateTypes || (IAInsightTemplateTypes = {}));
13534
-
13535
- var IAInsightComponent = /** @class */ (function () {
13536
- function IAInsightComponent() {
13537
- this.insights = [];
13538
- this.hasPermission = true;
13933
+ var InfiniteScrollDirective = /** @class */ (function () {
13934
+ function InfiniteScrollDirective(el) {
13935
+ this.el = el;
13936
+ this.onScroll = new EventEmitter();
13539
13937
  }
13540
- IAInsightComponent.prototype.ngAfterContentInit = function () {
13541
- this._getTemplates();
13542
- };
13543
- IAInsightComponent.prototype.open = function () {
13544
- this.sidebar.open();
13545
- };
13546
- IAInsightComponent.prototype.close = function () {
13547
- this.sidebar.close();
13548
- };
13549
- IAInsightComponent.prototype.getIntroTemplate = function () {
13550
- return this._getCustomTemplate(IAInsightTemplateTypes.Intro);
13551
- };
13552
- IAInsightComponent.prototype.getNoPermissionTemplate = function () {
13553
- return this._getCustomTemplate(IAInsightTemplateTypes.NoPermission);
13554
- };
13555
- IAInsightComponent.prototype.getEmptyTemplate = function () {
13556
- return this._getCustomTemplate(IAInsightTemplateTypes.Empty);
13557
- };
13558
- IAInsightComponent.prototype._getCustomTemplate = function (type) {
13559
- var _a;
13560
- return (_a = this.templates.find(function (template) { return template.type === type; })) === null || _a === void 0 ? void 0 : _a.template;
13561
- };
13562
- IAInsightComponent.prototype._getTemplates = function () {
13563
- this.introTemplate = this.getIntroTemplate();
13564
- this.emptyTemplate = this.getEmptyTemplate();
13565
- this.noPermissionTemplate = this.getNoPermissionTemplate();
13938
+ InfiniteScrollDirective.prototype.scroll = function () {
13939
+ if (this.el.nativeElement.scrollTop > (this.el.nativeElement.scrollHeight - this.el.nativeElement.offsetHeight - 2)) {
13940
+ this.onScroll.emit();
13941
+ }
13566
13942
  };
13943
+ InfiniteScrollDirective.ctorParameters = function () { return [
13944
+ { type: ElementRef }
13945
+ ]; };
13567
13946
  __decorate([
13568
- Input()
13569
- ], IAInsightComponent.prototype, "insights", void 0);
13570
- __decorate([
13571
- Input()
13572
- ], IAInsightComponent.prototype, "hasPermission", void 0);
13573
- __decorate([
13574
- Input()
13575
- ], IAInsightComponent.prototype, "introText", void 0);
13576
- __decorate([
13577
- Input()
13578
- ], IAInsightComponent.prototype, "emptyText", void 0);
13579
- __decorate([
13580
- Input()
13581
- ], IAInsightComponent.prototype, "noPermissionText", void 0);
13582
- __decorate([
13583
- ViewChild(IAInsightSidebarComponent)
13584
- ], IAInsightComponent.prototype, "sidebar", void 0);
13947
+ Output()
13948
+ ], InfiniteScrollDirective.prototype, "onScroll", void 0);
13585
13949
  __decorate([
13586
- ContentChildren(TemplateDirective)
13587
- ], IAInsightComponent.prototype, "templates", void 0);
13588
- IAInsightComponent = __decorate([
13589
- Component({
13590
- selector: "s-ia-insight",
13591
- template: "<s-ia-insight-sidebar\n #sidebar\n [insights]=\"insights\"\n [hasPermission]=\"hasPermission\"\n [introText]=\"introText\"\n [introTemplate]=\"introTemplate\"\n [emptyText]=\"emptyText\"\n [emptyTemplate]=\"emptyTemplate\"\n [noPermissionText]=\"noPermissionText\"\n [noPermissionTemplate]=\"noPermissionTemplate\">\n</s-ia-insight-sidebar>",
13592
- styles: [""]
13950
+ HostListener("scroll")
13951
+ ], InfiniteScrollDirective.prototype, "scroll", null);
13952
+ InfiniteScrollDirective = __decorate([
13953
+ Directive({
13954
+ selector: "[sInfiniteScroll]"
13593
13955
  })
13594
- ], IAInsightComponent);
13595
- return IAInsightComponent;
13956
+ ], InfiniteScrollDirective);
13957
+ return InfiniteScrollDirective;
13596
13958
  }());
13597
13959
 
13598
- var IAInsightModule = /** @class */ (function () {
13599
- function IAInsightModule() {
13960
+ var InfiniteScrollModule = /** @class */ (function () {
13961
+ function InfiniteScrollModule() {
13600
13962
  }
13601
- IAInsightModule = __decorate([
13963
+ InfiniteScrollModule = __decorate([
13602
13964
  NgModule({
13603
- imports: [
13604
- CommonModule,
13605
- TranslateModule,
13606
- BadgeModule,
13607
- ButtonModule,
13608
- TooltipModule,
13609
- TemplateModule,
13610
- SVGFactoryModule,
13611
- ],
13612
13965
  declarations: [
13613
- IAInsightComponent,
13614
- IAInsightCardComponent,
13615
- IAInsightSidebarComponent,
13616
- IAInsightCardLoaderComponent,
13966
+ InfiniteScrollDirective
13617
13967
  ],
13618
- exports: [
13619
- IAInsightComponent,
13620
- TemplateModule,
13968
+ imports: [
13969
+ CommonModule
13621
13970
  ],
13971
+ exports: [
13972
+ InfiniteScrollDirective
13973
+ ]
13622
13974
  })
13623
- ], IAInsightModule);
13624
- return IAInsightModule;
13625
- }());
13626
-
13627
- var HeaderComponent = /** @class */ (function () {
13628
- function HeaderComponent() {
13629
- }
13630
- HeaderComponent = __decorate([
13631
- Component({
13632
- selector: "s-header",
13633
- template: "<ng-content></ng-content>"
13634
- })
13635
- ], HeaderComponent);
13636
- return HeaderComponent;
13637
- }());
13638
-
13639
- var FooterComponent = /** @class */ (function () {
13640
- function FooterComponent() {
13641
- }
13642
- FooterComponent = __decorate([
13643
- Component({
13644
- selector: "s-footer",
13645
- template: "<ng-content></ng-content>"
13646
- })
13647
- ], FooterComponent);
13648
- return FooterComponent;
13975
+ ], InfiniteScrollModule);
13976
+ return InfiniteScrollModule;
13649
13977
  }());
13650
13978
 
13651
- var StructureModule = /** @class */ (function () {
13652
- function StructureModule() {
13979
+ var GlobalSearchModule = /** @class */ (function () {
13980
+ function GlobalSearchModule() {
13653
13981
  }
13654
- StructureModule = __decorate([
13982
+ GlobalSearchModule = __decorate([
13655
13983
  NgModule({
13656
- imports: [CommonModule],
13657
- declarations: [HeaderComponent, FooterComponent],
13658
- exports: [HeaderComponent, FooterComponent],
13984
+ declarations: [
13985
+ GlobalSearchComponent,
13986
+ GlobalSearchDropdownItemComponent
13987
+ ],
13988
+ imports: [
13989
+ CommonModule,
13990
+ InputTextModule,
13991
+ FormsModule,
13992
+ ReactiveFormsModule,
13993
+ TooltipModule$1,
13994
+ ThumbnailModule,
13995
+ ButtonModule,
13996
+ LoadingStateModule,
13997
+ InfiniteScrollModule,
13998
+ EmptyStateModule
13999
+ ],
14000
+ exports: [
14001
+ GlobalSearchComponent,
14002
+ GlobalSearchDropdownItemComponent,
14003
+ TooltipModule$1,
14004
+ ThumbnailModule,
14005
+ ButtonModule,
14006
+ LoadingStateModule,
14007
+ EmptyStateModule
14008
+ ],
14009
+ entryComponents: [
14010
+ GlobalSearchComponent,
14011
+ GlobalSearchDropdownItemComponent
14012
+ ]
13659
14013
  })
13660
- ], StructureModule);
13661
- return StructureModule;
14014
+ ], GlobalSearchModule);
14015
+ return GlobalSearchModule;
13662
14016
  }());
13663
14017
 
13664
- var ImageCropperComponent = /** @class */ (function () {
13665
- function ImageCropperComponent() {
13666
- this.id = "s-image-cropper-" + ImageCropperComponent_1.nextId++;
13667
- this.visible = false;
13668
- this.header = "Recortar imagem";
13669
- this.cropLabel = "Recortar";
13670
- this.selectAnotherLabel = "Trocar";
13671
- this.removeLabel = "Remover";
13672
- this.cancelLabel = "Cancelar";
13673
- this.emptyStateTitle = "Selecione uma foto, em seguida você poderá ajustá-la";
13674
- this.emptyStateActionLabel = "Escolher imagem";
13675
- this.emptyStateIconClass = "fa fa-picture-o";
13676
- this.aspectRatio = NaN;
13677
- this.rounded = false;
13678
- this.allowSelectAnother = true;
13679
- this.allowRemove = true;
13680
- this.allowCancel = true;
13681
- this.visibleChange = new EventEmitter();
13682
- this.changeImage = new EventEmitter();
13683
- this.croppedImage = new EventEmitter();
13684
- this.croppedCanvas = new EventEmitter();
13685
- this.removedImage = new EventEmitter();
13686
- this.cancel = new EventEmitter();
14018
+ var IAInsightCardComponent = /** @class */ (function () {
14019
+ function IAInsightCardComponent(clipboard, messageService, translateService) {
14020
+ this.clipboard = clipboard;
14021
+ this.messageService = messageService;
14022
+ this.translateService = translateService;
14023
+ this.open = false;
14024
+ this.isLoading = false;
14025
+ this.likeSelected = false;
14026
+ this.dislikeSelected = false;
13687
14027
  }
13688
- ImageCropperComponent_1 = ImageCropperComponent;
13689
- ImageCropperComponent.prototype.ngOnInit = function () {
13690
- if (this.imageSource)
13691
- this.initCropper();
14028
+ IAInsightCardComponent.prototype.toggle = function () {
14029
+ this.open = !this.open;
14030
+ this._requestInsight();
13692
14031
  };
13693
- ImageCropperComponent.prototype.ngOnChanges = function (changes) {
13694
- if (changes.imageSource && changes.imageSource.currentValue) {
13695
- this.initCropper();
14032
+ IAInsightCardComponent.prototype.onLikeSelected = function () {
14033
+ var _a, _b;
14034
+ if (this.likeSelected) {
14035
+ this.likeSelected = false;
13696
14036
  }
13697
- };
13698
- ImageCropperComponent.prototype.initCropper = function () {
13699
- if (this.cropper) {
13700
- this.cropper.destroy();
14037
+ else {
14038
+ this.likeSelected = true;
14039
+ this.dislikeSelected = false;
14040
+ (_b = (_a = this.insight).onLikeSelected) === null || _b === void 0 ? void 0 : _b.call(_a);
13701
14041
  }
13702
- this.image.nativeElement.src = this.imageSource;
13703
- this.cropper = new Cropper(this.image.nativeElement, {
13704
- aspectRatio: this.rounded ? 1 : this.aspectRatio,
13705
- guides: false,
13706
- dragMode: "move",
13707
- minCropBoxHeight: 2,
13708
- minCropBoxWidth: 2,
13709
- toggleDragModeOnDblclick: false,
13710
- });
13711
- };
13712
- ImageCropperComponent.prototype.getRoundedCanvas = function (sourceCanvas) {
13713
- var canvas = document.createElement("canvas");
13714
- var context = canvas.getContext("2d");
13715
- var width = sourceCanvas.width;
13716
- var height = sourceCanvas.height;
13717
- canvas.width = width;
13718
- canvas.height = height;
13719
- context.imageSmoothingEnabled = true;
13720
- context.drawImage(sourceCanvas, 0, 0, width, height);
13721
- context.globalCompositeOperation = "destination-in";
13722
- context.beginPath();
13723
- context.arc(width / 2, height / 2, Math.min(width, height) / 2, 0, 2 * Math.PI, true);
13724
- context.fill();
13725
- return canvas;
13726
14042
  };
13727
- ImageCropperComponent.prototype.onCropImage = function () {
13728
- if (!this.imageSource) {
13729
- this.croppedImage.emit();
13730
- this.croppedCanvas.emit();
14043
+ IAInsightCardComponent.prototype.onDislikeSelected = function () {
14044
+ var _a, _b;
14045
+ if (this.dislikeSelected) {
14046
+ this.dislikeSelected = false;
13731
14047
  }
13732
14048
  else {
13733
- var _croppedCanvas = this.rounded ? this.getRoundedCanvas(this.cropper.getCroppedCanvas()) : this.cropper.getCroppedCanvas();
13734
- this.croppedCanvas.emit(_croppedCanvas);
13735
- this.croppedImage.emit(_croppedCanvas.toDataURL());
14049
+ this.dislikeSelected = true;
14050
+ this.likeSelected = false;
14051
+ (_b = (_a = this.insight).onDislikeSelected) === null || _b === void 0 ? void 0 : _b.call(_a);
13736
14052
  }
13737
- this.visibleChange.emit(false);
13738
- };
13739
- ImageCropperComponent.prototype.onChangeImage = function () {
13740
- this.changeImage.emit();
13741
14053
  };
13742
- ImageCropperComponent.prototype.onRemoveImage = function () {
13743
- this.imageSource = undefined;
13744
- this.removedImage.emit();
14054
+ IAInsightCardComponent.prototype.copyContent = function () {
14055
+ var _a, _b;
14056
+ (_b = (_a = this.insight).onCopy) === null || _b === void 0 ? void 0 : _b.call(_a, this.content);
14057
+ if (this.clipboard.copy(this.content)) {
14058
+ this.messageService.add({
14059
+ severity: "info",
14060
+ summary: this.translateService.instant("platform.angular_components.copied_to_clipboard"),
14061
+ });
14062
+ }
13745
14063
  };
13746
- ImageCropperComponent.prototype.onCancel = function () {
13747
- this.visibleChange.emit(false);
13748
- this.cancel.emit();
14064
+ IAInsightCardComponent.prototype.reloadContent = function () {
14065
+ this._requestInsight();
13749
14066
  };
13750
- ImageCropperComponent.prototype.onModalVisibleChange = function (visible) {
13751
- if (!visible)
13752
- this.onCancel();
13753
- this.visibleChange.emit(visible);
14067
+ IAInsightCardComponent.prototype._requestInsight = function () {
14068
+ var _this = this;
14069
+ this.isLoading = true;
14070
+ this.insight.request$
14071
+ .pipe(first(), finalize(function () { return (_this.isLoading = false); }))
14072
+ .subscribe(function (content) {
14073
+ _this.content = marked.marked(content);
14074
+ });
13754
14075
  };
13755
- var ImageCropperComponent_1;
13756
- ImageCropperComponent.nextId = 0;
13757
- __decorate([
13758
- Input()
13759
- ], ImageCropperComponent.prototype, "id", void 0);
13760
- __decorate([
13761
- Input()
13762
- ], ImageCropperComponent.prototype, "visible", void 0);
14076
+ IAInsightCardComponent.ctorParameters = function () { return [
14077
+ { type: Clipboard },
14078
+ { type: MessageService },
14079
+ { type: TranslateService }
14080
+ ]; };
13763
14081
  __decorate([
13764
14082
  Input()
13765
- ], ImageCropperComponent.prototype, "header", void 0);
14083
+ ], IAInsightCardComponent.prototype, "insight", void 0);
14084
+ IAInsightCardComponent = __decorate([
14085
+ Component({
14086
+ selector: "s-ia-insight-card",
14087
+ template: "<div class=\"ia-insight-card\" [ngClass]=\"{ 'ia-insight-card--close': !open }\">\n <div class=\"header\" (click)=\"toggle()\">\n <s-badge text=\"Insight\" iconClass=\"fal fa-lightbulb\"></s-badge>\n <span class=\"insight-title\">{{ insight.title }}</span>\n <span\n class=\"toggle-icon fas\"\n [ngClass]=\"{\n 'fa-angle-down': !open,\n 'fa-angle-up': open\n }\"\n >\n </span>\n </div>\n <div class=\"content\">\n <ng-container *ngIf=\"isLoading; then loadingBlock; else contentBlock\"></ng-container>\n <ng-template #loadingBlock>\n <s-ia-insight-card-loader></s-ia-insight-card-loader>\n </ng-template>\n <ng-template #contentBlock>\n <ng-container *ngIf=\"content; then successBlock; else errorBlock\"></ng-container>\n\n <ng-template #successBlock>\n <span class=\"text\" [innerHTML]=\"content\"></span>\n </ng-template>\n <ng-template #errorBlock>\n <span class=\"text text--error\">{{ \"platform.angular_components.error_loading_insight_alt\" | translate }}</span>\n </ng-template>\n\n <div class=\"options\">\n <button [disabled]=\"!content\" (click)=\"copyContent()\" class=\"option fal fa-copy\"></button>\n <button (click)=\"reloadContent()\" class=\"option fal fa-redo\"></button>\n <button\n *ngIf=\"insight.onLikeSelected\"\n [disabled]=\"!content\"\n (click)=\"onLikeSelected()\"\n class=\"option\"\n [ngClass]=\"{\n 'fal': !likeSelected,\n 'fas': likeSelected,\n 'fa-thumbs-up': true\n }\">\n </button>\n <button\n *ngIf=\"insight.onDislikeSelected\"\n [disabled]=\"!content\"\n (click)=\"onDislikeSelected()\"\n class=\"option\"\n [ngClass]=\"{\n 'fal': !dislikeSelected,\n 'fas': dislikeSelected,\n 'fa-thumbs-down': true\n }\">\n </button>\n </div>\n </ng-template>\n </div>\n</div>\n",
14088
+ styles: [".ia-insight-card{background-color:#fff;border:1px solid #9ecad4;border-radius:4px;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden}.ia-insight-card .header{-ms-flex-align:center;align-items:center;background-color:#f1f7f8;border-bottom:1px solid #9ecad4;display:-ms-flexbox;display:flex;gap:8px;min-height:60px;padding:8px 16px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ia-insight-card .header .insight-title{color:#428bca;-ms-flex-positive:1;flex-grow:1;font-family:\"Open Sans\",sans-serif;font-size:14px;line-height:150%}.ia-insight-card .header .toggle-icon{color:#888b99;font-size:20px}.ia-insight-card .content{-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;cursor:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px;min-height:160px;padding:24px}.ia-insight-card .content .text{color:#212533;font-family:\"Open Sans\",sans-serif;font-size:14px;width:100%}.ia-insight-card .content .text--error{text-align:center}.ia-insight-card .content .options{display:-ms-flexbox;display:flex;gap:8px}.ia-insight-card .content .options .option{background-color:transparent;border:none;color:#428bca;cursor:pointer;font-size:12px}.ia-insight-card .content .options .option:disabled{color:#c1c1cc;cursor:auto}.ia-insight-card--close{border-color:#dedce5}.ia-insight-card--close .header{background-color:#fbfafc;border:#dedce5}.ia-insight-card--close .header .insight-title{color:#888b99}.ia-insight-card--close .content{display:none}"]
14089
+ })
14090
+ ], IAInsightCardComponent);
14091
+ return IAInsightCardComponent;
14092
+ }());
14093
+
14094
+ var IAInsightSidebarComponent = /** @class */ (function () {
14095
+ function IAInsightSidebarComponent() {
14096
+ this.insights = [];
14097
+ this.opened = false;
14098
+ }
14099
+ IAInsightSidebarComponent.prototype.toggle = function () {
14100
+ this.opened = !this.opened;
14101
+ };
14102
+ IAInsightSidebarComponent.prototype.open = function () {
14103
+ this.opened = true;
14104
+ };
14105
+ IAInsightSidebarComponent.prototype.close = function () {
14106
+ this.opened = false;
14107
+ };
13766
14108
  __decorate([
13767
14109
  Input()
13768
- ], ImageCropperComponent.prototype, "cropLabel", void 0);
14110
+ ], IAInsightSidebarComponent.prototype, "insights", void 0);
13769
14111
  __decorate([
13770
14112
  Input()
13771
- ], ImageCropperComponent.prototype, "selectAnotherLabel", void 0);
14113
+ ], IAInsightSidebarComponent.prototype, "hasPermission", void 0);
13772
14114
  __decorate([
13773
14115
  Input()
13774
- ], ImageCropperComponent.prototype, "removeLabel", void 0);
14116
+ ], IAInsightSidebarComponent.prototype, "introText", void 0);
13775
14117
  __decorate([
13776
14118
  Input()
13777
- ], ImageCropperComponent.prototype, "cancelLabel", void 0);
14119
+ ], IAInsightSidebarComponent.prototype, "introTemplate", void 0);
13778
14120
  __decorate([
13779
14121
  Input()
13780
- ], ImageCropperComponent.prototype, "emptyStateTitle", void 0);
14122
+ ], IAInsightSidebarComponent.prototype, "emptyText", void 0);
13781
14123
  __decorate([
13782
14124
  Input()
13783
- ], ImageCropperComponent.prototype, "emptyStateActionLabel", void 0);
14125
+ ], IAInsightSidebarComponent.prototype, "emptyTemplate", void 0);
13784
14126
  __decorate([
13785
14127
  Input()
13786
- ], ImageCropperComponent.prototype, "emptyStateIconClass", void 0);
14128
+ ], IAInsightSidebarComponent.prototype, "noPermissionText", void 0);
13787
14129
  __decorate([
13788
14130
  Input()
13789
- ], ImageCropperComponent.prototype, "aspectRatio", void 0);
14131
+ ], IAInsightSidebarComponent.prototype, "noPermissionTemplate", void 0);
14132
+ IAInsightSidebarComponent = __decorate([
14133
+ Component({
14134
+ selector: "s-ia-insight-sidebar",
14135
+ template: "<div\n class=\"sidebar\"\n [class.opened]=\"opened\">\n <div class=\"header\">\n <button (click)=\"close()\" class=\"option\">\n <span class=\"far fa-chevron-double-right\"></span>\n </button>\n <div class=\"title\">\n <span><ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container></span>\n <span>Insight</span>\n </div>\n </div>\n <div class=\"intro\">\n <ng-container *ngIf=\"hasPermission; then permissionBlock; else noPermissionBlock\"></ng-container>\n\n <ng-template #permissionBlock>\n <ng-container *ngIf=\"insights?.length; then introBlock; else emptyBlock\"></ng-container>\n \n <ng-template #introBlock>\n <ng-container *ngIf=\"introTemplate; then introCustomBlock; else introTextBlock\"></ng-container>\n\n <ng-template #introCustomBlock>\n <ng-container *ngTemplateOutlet=\"introTemplate\"></ng-container>\n </ng-template>\n\n <ng-template #introTextBlock>\n <span class=\"text\">{{ introText || \"platform.angular_components.insight_intro\" | translate }}</span>\n </ng-template>\n </ng-template>\n \n <ng-template #emptyBlock>\n <ng-container *ngIf=\"emptyTemplate; then emptyCustomBlock; else emptyTextBlock\"></ng-container>\n\n <ng-template #emptyCustomBlock>\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n\n <ng-template #emptyTextBlock>\n <span class=\"text\">{{ emptyText || \"platform.angular_components.insight_empty\" | translate }}</span>\n </ng-template>\n </ng-template>\n </ng-template>\n \n <ng-template #noPermissionBlock>\n <ng-container *ngIf=\"noPermissionTemplate; then noPermissionCustomBlock; else noPermissionTextBlock\"></ng-container>\n\n <ng-template #noPermissionCustomBlock>\n <ng-container *ngTemplateOutlet=\"noPermissionTemplate\"></ng-container>\n </ng-template>\n\n <ng-template #noPermissionTextBlock>\n <span>{{ noPermissionText || \"platform.angular_components.insight_no_permission\" | translate }}</span>\n </ng-template>\n </ng-template>\n </div>\n <div class=\"insights\">\n <ng-container *ngIf=\"insights?.length\">\n <s-ia-insight-card\n *ngFor=\"let insight of insights\"\n [insight]=\"insight\">\n </s-ia-insight-card>\n </ng-container>\n </div>\n</div>\n\n<ng-template #iassistIcon>\n <div style=\"width: 28px; height: 28px;\">\n <span *sSVGFactory=\"'iassist'\"></span>\n </div>\n</ng-template>\n",
14136
+ styles: [".sidebar{background-color:#fff;border-left:1px solid #dedce5;height:100%;overflow-x:hidden;position:fixed;right:-25%;transition:.5s;top:0;width:25%;z-index:1002}.sidebar .header{border-bottom:1px solid #dedce5;display:-ms-flexbox;display:flex;gap:16px;padding:12px 20px}.sidebar .header .option{background-color:transparent;border:none;color:#428bca;cursor:pointer;font-size:16px;padding:12px}.sidebar .header .title{-ms-flex-align:center;align-items:center;color:#212533;display:-ms-flexbox;display:flex;font-family:\"Open Sans\",sans-serif;font-size:16px;gap:16px;line-height:1;-webkit-user-select:none;-ms-user-select:none;user-select:none}.sidebar .intro{margin:8px 40px}.sidebar .intro .text{color:#212533;display:-ms-flexbox;display:flex;font-family:\"Open Sans\",sans-serif;font-size:14px;-ms-flex-pack:center;justify-content:center;line-height:1.5;text-align:center;-webkit-user-select:none;-ms-user-select:none;user-select:none}.sidebar.opened{right:0}.sidebar.opened .insights{padding:12px}.insights{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:12px}@media (max-width:1366px){.sidebar{right:-50%;width:50%}}@media (max-width:768px){.sidebar{right:-75%;width:75%}}@media (max-width:600px){.sidebar{right:-100%;width:100%}}"]
14137
+ })
14138
+ ], IAInsightSidebarComponent);
14139
+ return IAInsightSidebarComponent;
14140
+ }());
14141
+
14142
+ var IAInsightCardLoaderComponent = /** @class */ (function () {
14143
+ function IAInsightCardLoaderComponent() {
14144
+ }
14145
+ IAInsightCardLoaderComponent = __decorate([
14146
+ Component({
14147
+ selector: "s-ia-insight-card-loader",
14148
+ template: "<div class=\"ia-insight-card-loader\">\n <div class=\"loader\">\n <div class=\"loader-icon\">\n <div *sSVGFactory=\"'iassist'\"></div>\n </div>\n </div>\n \n <span class=\"loader-label\">{{ \"platform.angular_components.loading_insight\" | translate }}</span>\n</div>\n",
14149
+ styles: [".ia-insight-card-loader{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}.ia-insight-card-loader .loader{-ms-flex-align:center;align-items:center;animation:2s linear infinite spin;border:2px solid #f1f7f8;border-top:2px solid #0fa389;border-radius:50%;display:-ms-flexbox;display:flex;height:48px;-ms-flex-pack:center;justify-content:center;width:48px}.ia-insight-card-loader .loader .loader-icon{animation:2s linear infinite reverse spin;height:32px;transform:translate(-50%,-50%)}.ia-insight-card-loader .loader-label{color:#888b99;font-family:\"Open Sans\",sans-serif;font-size:16px}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}"]
14150
+ })
14151
+ ], IAInsightCardLoaderComponent);
14152
+ return IAInsightCardLoaderComponent;
14153
+ }());
14154
+
14155
+ var IAInsightTemplateTypes;
14156
+ (function (IAInsightTemplateTypes) {
14157
+ IAInsightTemplateTypes["Empty"] = "empty";
14158
+ IAInsightTemplateTypes["Intro"] = "intro";
14159
+ IAInsightTemplateTypes["NoPermission"] = "noPermission";
14160
+ })(IAInsightTemplateTypes || (IAInsightTemplateTypes = {}));
14161
+
14162
+ var IAInsightComponent = /** @class */ (function () {
14163
+ function IAInsightComponent() {
14164
+ this.insights = [];
14165
+ this.hasPermission = true;
14166
+ }
14167
+ IAInsightComponent.prototype.ngAfterContentInit = function () {
14168
+ this._getTemplates();
14169
+ };
14170
+ IAInsightComponent.prototype.open = function () {
14171
+ this.sidebar.open();
14172
+ };
14173
+ IAInsightComponent.prototype.close = function () {
14174
+ this.sidebar.close();
14175
+ };
14176
+ IAInsightComponent.prototype.getIntroTemplate = function () {
14177
+ return this._getCustomTemplate(IAInsightTemplateTypes.Intro);
14178
+ };
14179
+ IAInsightComponent.prototype.getNoPermissionTemplate = function () {
14180
+ return this._getCustomTemplate(IAInsightTemplateTypes.NoPermission);
14181
+ };
14182
+ IAInsightComponent.prototype.getEmptyTemplate = function () {
14183
+ return this._getCustomTemplate(IAInsightTemplateTypes.Empty);
14184
+ };
14185
+ IAInsightComponent.prototype._getCustomTemplate = function (type) {
14186
+ var _a;
14187
+ return (_a = this.templates.find(function (template) { return template.type === type; })) === null || _a === void 0 ? void 0 : _a.template;
14188
+ };
14189
+ IAInsightComponent.prototype._getTemplates = function () {
14190
+ this.introTemplate = this.getIntroTemplate();
14191
+ this.emptyTemplate = this.getEmptyTemplate();
14192
+ this.noPermissionTemplate = this.getNoPermissionTemplate();
14193
+ };
13790
14194
  __decorate([
13791
14195
  Input()
13792
- ], ImageCropperComponent.prototype, "rounded", void 0);
14196
+ ], IAInsightComponent.prototype, "insights", void 0);
13793
14197
  __decorate([
13794
14198
  Input()
13795
- ], ImageCropperComponent.prototype, "allowSelectAnother", void 0);
14199
+ ], IAInsightComponent.prototype, "hasPermission", void 0);
13796
14200
  __decorate([
13797
14201
  Input()
13798
- ], ImageCropperComponent.prototype, "allowRemove", void 0);
14202
+ ], IAInsightComponent.prototype, "introText", void 0);
13799
14203
  __decorate([
13800
14204
  Input()
13801
- ], ImageCropperComponent.prototype, "allowCancel", void 0);
14205
+ ], IAInsightComponent.prototype, "emptyText", void 0);
13802
14206
  __decorate([
13803
14207
  Input()
13804
- ], ImageCropperComponent.prototype, "imageSource", void 0);
13805
- __decorate([
13806
- Output()
13807
- ], ImageCropperComponent.prototype, "visibleChange", void 0);
13808
- __decorate([
13809
- Output()
13810
- ], ImageCropperComponent.prototype, "changeImage", void 0);
13811
- __decorate([
13812
- Output()
13813
- ], ImageCropperComponent.prototype, "croppedImage", void 0);
13814
- __decorate([
13815
- Output()
13816
- ], ImageCropperComponent.prototype, "croppedCanvas", void 0);
13817
- __decorate([
13818
- Output()
13819
- ], ImageCropperComponent.prototype, "removedImage", void 0);
13820
- __decorate([
13821
- Output()
13822
- ], ImageCropperComponent.prototype, "cancel", void 0);
13823
- __decorate([
13824
- ViewChild("image", { static: true })
13825
- ], ImageCropperComponent.prototype, "image", void 0);
14208
+ ], IAInsightComponent.prototype, "noPermissionText", void 0);
13826
14209
  __decorate([
13827
- ContentChild(HeaderComponent, { static: true })
13828
- ], ImageCropperComponent.prototype, "headerSection", void 0);
14210
+ ViewChild(IAInsightSidebarComponent)
14211
+ ], IAInsightComponent.prototype, "sidebar", void 0);
13829
14212
  __decorate([
13830
- ContentChild(FooterComponent, { static: true })
13831
- ], ImageCropperComponent.prototype, "footerSection", void 0);
13832
- ImageCropperComponent = ImageCropperComponent_1 = __decorate([
14213
+ ContentChildren(TemplateDirective)
14214
+ ], IAInsightComponent.prototype, "templates", void 0);
14215
+ IAInsightComponent = __decorate([
13833
14216
  Component({
13834
- selector: "s-image-cropper",
13835
- template: "<div [id]=\"id\">\n <p-dialog\n styleClass=\"s-image-cropper {{rounded ? 's-image-cropper--rounded' : ''}}\"\n [header]=\"headerSection ? '' : header\"\n [visible]=\"visible\"\n (visibleChange)=\"onModalVisibleChange($event)\"\n [modal]=\"true\"\n [blockScroll]=\"true\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n [closeOnEscape]=\"allowCancel\"\n [closable]=\"allowCancel\"\n appendTo=\"body\">\n\n <p-header *ngIf=\"headerSection\">\n <ng-content select=\"s-header\"></ng-content>\n </p-header>\n\n <s-empty-state\n [id]=\"id + '-empty-state'\"\n *ngIf=\"!imageSource\"\n [title]=\"emptyStateTitle\"\n [iconClass]=\"emptyStateIconClass\"\n [primaryActionLabel]=\"emptyStateActionLabel\"\n (primaryAction)=\"onChangeImage()\">\n </s-empty-state>\n\n <div [attr.data-hidden]=\"!imageSource\" class=\"image-container\">\n <img\n [id]=\"id + '-cropper'\"\n #image\n [src]=\"imageSource || ''\"\n alt=\"cropped image\"/>\n </div>\n\n <p-footer>\n <div class=\"ui-fluid\" *ngIf=\"!footerSection\">\n <div class=\"ui-g button-container\">\n\n <div *ngIf=\"allowCancel\" class=\"ui-sm-12 ui-md-3 ui-lg-2 ui-xl-2\">\n <s-button\n [id]=\"id + '-cancel-button'\"\n type=\"button\"\n priority=\"link\"\n [label]=\"cancelLabel\"\n (onClick)=\"onCancel()\">\n </s-button>\n </div>\n\n <div *ngIf=\"imageSource && allowRemove\" class=\"ui-sm-12 ui-md-3 ui-lg-2 ui-xl-2\">\n <s-button\n [id]=\"id + '-remove-button'\"\n type=\"button\"\n priority=\"secondary\"\n [label]=\"removeLabel\"\n (onClick)=\"onRemoveImage()\">\n </s-button>\n </div>\n\n <div *ngIf=\"imageSource && allowSelectAnother\" class=\"ui-sm-12 ui-md-3 ui-lg-2 ui-xl-2\">\n <s-button\n [id]=\"id + '-select-another-button'\"\n type=\"button\"\n priority=\"secondary\"\n [label]=\"selectAnotherLabel\"\n (onClick)=\"onChangeImage()\">\n </s-button>\n </div>\n\n <div class=\"ui-sm-12 ui-md-3 ui-lg-2 ui-xl-2\">\n <s-button\n [id]=\"id + '-crop-button'\"\n type=\"button\"\n [label]=\"cropLabel\"\n (onClick)=\"onCropImage()\">\n </s-button>\n </div>\n </div>\n </div>\n\n <ng-content select=\"s-footer\" *ngIf=\"footerSection\"></ng-content>\n </p-footer>\n </p-dialog>\n</div>",
13836
- encapsulation: ViewEncapsulation.None,
13837
- styles: ["/*!\n * Cropper.js v1.6.2\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2024-04-21T07:43:02.731Z\n */.cropper-container{-webkit-touch-callout:none;direction:ltr;font-size:0;line-height:0;position:relative;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.cropper-container img{-webkit-backface-visibility:hidden;backface-visibility:hidden;display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-canvas,.cropper-crop-box,.cropper-drag-box,.cropper-modal,.cropper-wrap-box{bottom:0;left:0;position:absolute;right:0;top:0}.cropper-canvas,.cropper-wrap-box{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:rgba(51,153,255,.75) solid 1px;overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:33.33333%;left:0;top:33.33333%;width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:33.33333%;top:0;width:33.33333%}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:after,.cropper-center:before{background-color:#eee;content:\" \";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width:768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width:992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width:1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:\" \";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}", ".s-image-cropper{border-radius:0!important;height:80%!important;max-width:100%!important;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:column;flex-direction:column}.s-image-cropper .ui-dialog-content{overflow:hidden;height:auto!important;-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}.s-image-cropper .ui-dialog-footer,.s-image-cropper .ui-dialog-header{-ms-flex-negative:0;flex-shrink:0;direction:ltr}.s-image-cropper .image-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:100%}.s-image-cropper img{max-width:100%;max-height:100%}.s-image-cropper .button-container{-ms-flex-flow:wrap-reverse;flex-flow:wrap-reverse;-ms-flex-pack:end;justify-content:flex-end}.s-image-cropper .cropper-view-box{outline:#fff dashed 2px}.s-image-cropper .cropper-line{opacity:0}.s-image-cropper .cropper-point{background-color:#fff;opacity:1;height:15px;width:15px;border-radius:50%}.s-image-cropper .cropper-point.point-e{right:-8.5px;top:calc(50% - 4.5px)}.s-image-cropper .cropper-point.point-n{top:-8.5px;left:calc(50% - 4.5px)}.s-image-cropper .cropper-point.point-w{left:-8.5px;top:calc(50% - 4.5px)}.s-image-cropper .cropper-point.point-s{bottom:-8.5px;left:calc(50% - 4.5px)}.s-image-cropper .cropper-point.point-ne{right:-8.5px;top:-8.5px}.s-image-cropper .cropper-point.point-nw{left:-8.5px;top:-8.5px}.s-image-cropper .cropper-point.point-sw{left:-8.5px;bottom:-8.5px}.s-image-cropper .cropper-point.point-se{right:-8.5px;bottom:-8.5px}.s-image-cropper--rounded .cropper-face,.s-image-cropper--rounded .cropper-view-box{border-radius:50%}.s-image-cropper--rounded .cropper-view-box{outline:rgba(255,255,255,.3) dashed 1px}.s-image-cropper--rounded .cropper-view-box:after{border:2px dashed #fff;border-radius:50%;content:\"\";height:100%;left:0;position:absolute;top:0;width:100%}@media (max-width:767px){.s-image-cropper{border:none!important;top:0!important;left:0!important;width:100%!important;height:100%!important}}@media (min-width:768px){.s-image-cropper{width:80%!important}}@media (min-width:1200px){.s-image-cropper{width:60%!important}}"]
14217
+ selector: "s-ia-insight",
14218
+ template: "<s-ia-insight-sidebar\n #sidebar\n [insights]=\"insights\"\n [hasPermission]=\"hasPermission\"\n [introText]=\"introText\"\n [introTemplate]=\"introTemplate\"\n [emptyText]=\"emptyText\"\n [emptyTemplate]=\"emptyTemplate\"\n [noPermissionText]=\"noPermissionText\"\n [noPermissionTemplate]=\"noPermissionTemplate\">\n</s-ia-insight-sidebar>",
14219
+ styles: [""]
13838
14220
  })
13839
- ], ImageCropperComponent);
13840
- return ImageCropperComponent;
14221
+ ], IAInsightComponent);
14222
+ return IAInsightComponent;
13841
14223
  }());
13842
14224
 
13843
- var ImageCropperModule = /** @class */ (function () {
13844
- function ImageCropperModule() {
14225
+ var IAInsightModule = /** @class */ (function () {
14226
+ function IAInsightModule() {
13845
14227
  }
13846
- ImageCropperModule = __decorate([
14228
+ IAInsightModule = __decorate([
13847
14229
  NgModule({
13848
- imports: [CommonModule, DialogModule, ButtonModule, EmptyStateModule, StructureModule],
13849
- declarations: [ImageCropperComponent],
13850
- exports: [ImageCropperComponent, StructureModule],
13851
- entryComponents: [ImageCropperComponent],
13852
- })
13853
- ], ImageCropperModule);
13854
- return ImageCropperModule;
13855
- }());
13856
-
13857
- var ImageCropperService = /** @class */ (function () {
13858
- function ImageCropperService(componentFactoryResolver, appRef, injector) {
13859
- this.componentFactoryResolver = componentFactoryResolver;
13860
- this.appRef = appRef;
13861
- this.injector = injector;
13862
- }
13863
- ImageCropperService.prototype.show = function (config) {
13864
- var _this = this;
13865
- if (this.activeCropper)
13866
- this.destroy(this.activeCropper);
13867
- var activeCropper = {
13868
- componentRef: this.componentFactoryResolver.resolveComponentFactory(ImageCropperComponent).create(this.injector),
13869
- ngUnsubscribe: new Subject(),
13870
- };
13871
- this.activeCropper = activeCropper;
13872
- this.appRef.attachView(activeCropper.componentRef.hostView);
13873
- var domElem = activeCropper.componentRef.hostView.rootNodes[0];
13874
- document.body.appendChild(domElem);
13875
- this.configureInstance(activeCropper, config);
13876
- activeCropper.componentRef.instance.visible = true;
13877
- activeCropper.componentRef.instance.visibleChange
13878
- .pipe(takeUntil(this.activeCropper.ngUnsubscribe), delay(1000))
13879
- .subscribe(function (visible) {
13880
- if (!visible)
13881
- _this.destroy(activeCropper);
13882
- });
13883
- };
13884
- ImageCropperService.prototype.configureInstance = function (activeCropper, config) {
13885
- var instance = activeCropper.componentRef.instance;
13886
- if (config) {
13887
- Object.keys(config).forEach(function (key) {
13888
- var value = config[key];
13889
- if (typeof value !== "function")
13890
- instance[key] = value;
13891
- else if (typeof value === "function") {
13892
- instance[key].pipe(takeUntil(activeCropper.ngUnsubscribe)).subscribe(function () {
13893
- var param = [];
13894
- for (var _i = 0; _i < arguments.length; _i++) {
13895
- param[_i] = arguments[_i];
13896
- }
13897
- return config[key].apply(config, __spread(param));
13898
- });
13899
- }
13900
- });
13901
- }
13902
- instance.visibleChange.pipe(takeUntil(activeCropper.ngUnsubscribe)).subscribe(function (visible) { return (instance.visible = visible); });
13903
- };
13904
- ImageCropperService.prototype.destroy = function (activeCropper) {
13905
- activeCropper.ngUnsubscribe.next();
13906
- activeCropper.ngUnsubscribe.complete();
13907
- this.appRef.detachView(activeCropper.componentRef.hostView);
13908
- activeCropper.componentRef.destroy();
13909
- };
13910
- ImageCropperService.ctorParameters = function () { return [
13911
- { type: ComponentFactoryResolver },
13912
- { type: ApplicationRef },
13913
- { type: Injector }
13914
- ]; };
13915
- ImageCropperService = __decorate([
13916
- Injectable()
13917
- ], ImageCropperService);
13918
- return ImageCropperService;
14230
+ imports: [
14231
+ CommonModule,
14232
+ TranslateModule,
14233
+ BadgeModule,
14234
+ ButtonModule,
14235
+ TooltipModule,
14236
+ TemplateModule,
14237
+ SVGFactoryModule,
14238
+ ],
14239
+ declarations: [
14240
+ IAInsightComponent,
14241
+ IAInsightCardComponent,
14242
+ IAInsightSidebarComponent,
14243
+ IAInsightCardLoaderComponent,
14244
+ ],
14245
+ exports: [
14246
+ IAInsightComponent,
14247
+ TemplateModule,
14248
+ ],
14249
+ })
14250
+ ], IAInsightModule);
14251
+ return IAInsightModule;
13919
14252
  }());
13920
14253
 
13921
14254
  var KanbanEventService = /** @class */ (function () {
@@ -14736,256 +15069,6 @@ var ProductHeaderModule = /** @class */ (function () {
14736
15069
  return ProductHeaderModule;
14737
15070
  }());
14738
15071
 
14739
- var FileValidation;
14740
- (function (FileValidation) {
14741
- FileValidation["MaxFileSize"] = "maxFileSize";
14742
- FileValidation["MaxFileLimit"] = "maxFileLimit";
14743
- FileValidation["TypeInvalid"] = "typeInvalid";
14744
- FileValidation["UnsupportedExtension"] = "unsupportedExtension";
14745
- })(FileValidation || (FileValidation = {}));
14746
-
14747
- var ProfilePicturePickerComponent = /** @class */ (function () {
14748
- function ProfilePicturePickerComponent(imageCropperService, confirmationService) {
14749
- this.imageCropperService = imageCropperService;
14750
- this.confirmationService = confirmationService;
14751
- this.aspectRatio = 1;
14752
- this.removeButtonLabel = "Remover";
14753
- this.changeButtonLabel = "Alterar foto";
14754
- this.confirmationTexts = {
14755
- removalHeader: "Remover foto de perfil",
14756
- removalMessage: "Deseja remover sua foto de perfil? Não pode ser revertida.",
14757
- removalAcceptLabel: "Remover",
14758
- removalRejectLabel: "Cancelar",
14759
- };
14760
- this.supportedExtensions = [];
14761
- this.changedImage = new EventEmitter();
14762
- this.removedImage = new EventEmitter();
14763
- this.invalidFile = new EventEmitter();
14764
- }
14765
- ProfilePicturePickerComponent.prototype.ngOnInit = function () {
14766
- this._normalizeSuportedExtensions();
14767
- };
14768
- ProfilePicturePickerComponent.prototype.onDragOver = function (event) {
14769
- event.preventDefault();
14770
- event.stopPropagation();
14771
- };
14772
- ProfilePicturePickerComponent.prototype.onDragLeave = function (event) {
14773
- event.preventDefault();
14774
- event.stopPropagation();
14775
- };
14776
- ProfilePicturePickerComponent.prototype.onDrop = function (event) {
14777
- event.preventDefault();
14778
- event.stopPropagation();
14779
- var files = [];
14780
- var dataTransferFiles = event.dataTransfer.files;
14781
- for (var i = 0; i < dataTransferFiles.length; i++) {
14782
- files.push(dataTransferFiles.item(i));
14783
- }
14784
- this._showImageCropper(files);
14785
- };
14786
- // Verificando o redimensionamento para ajustar o design para ficar responsivo.
14787
- ProfilePicturePickerComponent.prototype.onResize = function () {
14788
- if (this.uploadPicture && this.info && this.thumbnail) {
14789
- var uploadPictureWidth = this._getWidthElement(this.uploadPicture);
14790
- var infoWidth = this._getWidthElement(this.info);
14791
- var thumbnailWidth = this._getWidthElement(this.thumbnail);
14792
- if (thumbnailWidth + infoWidth > uploadPictureWidth) {
14793
- this.uploadPicture.nativeElement.classList.add("upload-picture--small");
14794
- }
14795
- else {
14796
- this.uploadPicture.nativeElement.classList.remove("upload-picture--small");
14797
- }
14798
- }
14799
- };
14800
- ProfilePicturePickerComponent.prototype.selectPhoto = function () {
14801
- var fileInputElement = this.fileInput.nativeElement;
14802
- fileInputElement.value = "";
14803
- fileInputElement.click();
14804
- };
14805
- ProfilePicturePickerComponent.prototype.removePhoto = function () {
14806
- var _this = this;
14807
- this.confirmationService.confirm({
14808
- message: this.confirmationTexts.removalMessage,
14809
- acceptLabel: this.confirmationTexts.removalAcceptLabel,
14810
- rejectLabel: this.confirmationTexts.removalRejectLabel,
14811
- header: this.confirmationTexts.removalHeader,
14812
- accept: function () {
14813
- var fileInputElement = _this.fileInput.nativeElement;
14814
- fileInputElement.value = "";
14815
- _this.image = "";
14816
- _this.removedImage.emit();
14817
- },
14818
- });
14819
- };
14820
- ProfilePicturePickerComponent.prototype.photoSelected = function (event) {
14821
- this._showImageCropper(event.srcElement.files);
14822
- };
14823
- ProfilePicturePickerComponent.prototype._showImageCropper = function (files) {
14824
- var _this = this;
14825
- if (!this._validateData(files)) {
14826
- return;
14827
- }
14828
- var file = files[0];
14829
- var fileReader = new FileReader();
14830
- fileReader.readAsDataURL(file);
14831
- fileReader.onloadend = function (fileEvent) {
14832
- _this.imageCropperService.show(__assign({ imageSource: fileEvent.target.result, croppedImage: function (image) {
14833
- _this.image = image;
14834
- _this.changedImage.emit(image);
14835
- }, changeImage: function () { return _this.selectPhoto(); }, allowSelectAnother: false, aspectRatio: _this.aspectRatio }, _this.cropperLabelsConfig));
14836
- };
14837
- };
14838
- ProfilePicturePickerComponent.prototype._normalizeSuportedExtensions = function () {
14839
- this.supportedExtensions = this.supportedExtensions
14840
- .map(function (extension) { return extension.replace(".", "").toLocaleLowerCase(); });
14841
- };
14842
- ProfilePicturePickerComponent.prototype._validateData = function (files) {
14843
- if (!files.length) {
14844
- return false;
14845
- }
14846
- if (files.length > 1) {
14847
- this.invalidFile.emit({ file: null, validation: FileValidation.MaxFileLimit });
14848
- return false;
14849
- }
14850
- var file = files[0];
14851
- if (!file.type.includes("image")) {
14852
- this.invalidFile.emit({ file: file, validation: FileValidation.TypeInvalid });
14853
- return false;
14854
- }
14855
- if (!this._validateFileExtension(file)) {
14856
- this.invalidFile.emit({ file: file, validation: FileValidation.UnsupportedExtension });
14857
- return false;
14858
- }
14859
- if (!this._validateFileSize(file)) {
14860
- this.invalidFile.emit({ file: file, validation: FileValidation.MaxFileSize });
14861
- return false;
14862
- }
14863
- return true;
14864
- };
14865
- ProfilePicturePickerComponent.prototype._validateFileExtension = function (file) {
14866
- var _a;
14867
- if ((_a = this.supportedExtensions) === null || _a === void 0 ? void 0 : _a.length) {
14868
- var extension = file.name.split(".").pop().toLowerCase();
14869
- return this.supportedExtensions.includes(extension);
14870
- }
14871
- return true;
14872
- };
14873
- ProfilePicturePickerComponent.prototype._validateFileSize = function (file) {
14874
- if (this.maxFileSize) {
14875
- return file.size > this.maxFileSize;
14876
- }
14877
- return true;
14878
- };
14879
- ProfilePicturePickerComponent.prototype._getWidthElement = function (element) {
14880
- var _a = element.nativeElement.getBoundingClientRect(), left = _a.left, right = _a.right;
14881
- return right - left;
14882
- };
14883
- ProfilePicturePickerComponent.ctorParameters = function () { return [
14884
- { type: ImageCropperService },
14885
- { type: ConfirmationService }
14886
- ]; };
14887
- __decorate([
14888
- Input()
14889
- ], ProfilePicturePickerComponent.prototype, "simpleTitle", void 0);
14890
- __decorate([
14891
- Input()
14892
- ], ProfilePicturePickerComponent.prototype, "actionTitle", void 0);
14893
- __decorate([
14894
- Input()
14895
- ], ProfilePicturePickerComponent.prototype, "subtitle", void 0);
14896
- __decorate([
14897
- Input()
14898
- ], ProfilePicturePickerComponent.prototype, "aspectRatio", void 0);
14899
- __decorate([
14900
- Input()
14901
- ], ProfilePicturePickerComponent.prototype, "cropperLabelsConfig", void 0);
14902
- __decorate([
14903
- Input()
14904
- ], ProfilePicturePickerComponent.prototype, "removeButtonLabel", void 0);
14905
- __decorate([
14906
- Input()
14907
- ], ProfilePicturePickerComponent.prototype, "changeButtonLabel", void 0);
14908
- __decorate([
14909
- Input()
14910
- ], ProfilePicturePickerComponent.prototype, "confirmationTexts", void 0);
14911
- __decorate([
14912
- Input()
14913
- ], ProfilePicturePickerComponent.prototype, "maxFileSize", void 0);
14914
- __decorate([
14915
- Input()
14916
- ], ProfilePicturePickerComponent.prototype, "accept", void 0);
14917
- __decorate([
14918
- Input()
14919
- ], ProfilePicturePickerComponent.prototype, "supportedExtensions", void 0);
14920
- __decorate([
14921
- Input()
14922
- ], ProfilePicturePickerComponent.prototype, "image", void 0);
14923
- __decorate([
14924
- ViewChild("uploadPicture")
14925
- ], ProfilePicturePickerComponent.prototype, "uploadPicture", void 0);
14926
- __decorate([
14927
- ViewChild("info")
14928
- ], ProfilePicturePickerComponent.prototype, "info", void 0);
14929
- __decorate([
14930
- ViewChild("thumbnail", { read: ElementRef })
14931
- ], ProfilePicturePickerComponent.prototype, "thumbnail", void 0);
14932
- __decorate([
14933
- ViewChild("fileInput", { read: ElementRef })
14934
- ], ProfilePicturePickerComponent.prototype, "fileInput", void 0);
14935
- __decorate([
14936
- Output()
14937
- ], ProfilePicturePickerComponent.prototype, "changedImage", void 0);
14938
- __decorate([
14939
- Output()
14940
- ], ProfilePicturePickerComponent.prototype, "removedImage", void 0);
14941
- __decorate([
14942
- Output()
14943
- ], ProfilePicturePickerComponent.prototype, "invalidFile", void 0);
14944
- __decorate([
14945
- HostListener("dragover", ["$event"])
14946
- ], ProfilePicturePickerComponent.prototype, "onDragOver", null);
14947
- __decorate([
14948
- HostListener("dragleave", ["$event"])
14949
- ], ProfilePicturePickerComponent.prototype, "onDragLeave", null);
14950
- __decorate([
14951
- HostListener("drop", ["$event"])
14952
- ], ProfilePicturePickerComponent.prototype, "onDrop", null);
14953
- __decorate([
14954
- HostListener("window:resize")
14955
- ], ProfilePicturePickerComponent.prototype, "onResize", null);
14956
- ProfilePicturePickerComponent = __decorate([
14957
- Component({
14958
- selector: "s-profile-picture-picker",
14959
- template: "<p-confirmDialog></p-confirmDialog>\n\n<input #fileInput [accept]=\"accept\" class=\"file-input\" type=\"file\" (change)=\"photoSelected($event)\">\n<div #uploadPicture class=\"upload-picture\">\n <s-thumbnail\n #thumbnail\n iconClass=\"far fa-user\"\n [imageSource]=\"image\"\n [hasAction]=\"!image\"\n (click)=\"selectPhoto()\">\n </s-thumbnail>\n <div #info class=\"info\">\n <ng-container *ngIf=\"image; then withImage; else noImage\"></ng-container>\n <p class=\"subtitle\">{{ subtitle }}</p>\n </div>\n</div>\n\n<ng-template #withImage>\n <div class=\"buttons\">\n <s-button\n [label]=\"changeButtonLabel\"\n priority=\"primary\"\n (onClick)=\"selectPhoto()\">\n </s-button>\n <s-button\n [label]=\"removeButtonLabel\"\n priority=\"secondary\"\n (onClick)=\"removePhoto()\">\n </s-button>\n </div>\n</ng-template>\n\n<ng-template #noImage>\n <p class=\"title\">\n {{ simpleTitle }}\n <span\n class=\"action-title\"\n (click)=\"selectPhoto()\">\n {{ actionTitle }}\n </span>\n </p>\n</ng-template>",
14960
- styles: [".file-input{display:none}.upload-picture{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.upload-picture .info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:12px 20px;-ms-flex-align:start;align-items:flex-start}.upload-picture .info .title{font-family:\"Open Sans\",sans-serif;font-weight:700;font-size:.875rem;line-height:150%;color:#333}.upload-picture .info .title .action-title{cursor:pointer;color:#428bca}.upload-picture .info .buttons{display:-ms-flexbox;display:flex;gap:8px}.upload-picture .info .buttons s-button{margin:0}.upload-picture .info .subtitle{padding:6px 0;font-family:\"Open Sans\",sans-serif;font-weight:400;font-size:.75rem;line-height:150%;color:#697882;text-align:center}.upload-picture--small .info{-ms-flex-align:center;align-items:center}.upload-picture--small .info .subtitle,.upload-picture--small .info .title{text-align:center}.upload-picture--small .info .buttons{-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap}"]
14961
- })
14962
- ], ProfilePicturePickerComponent);
14963
- return ProfilePicturePickerComponent;
14964
- }());
14965
-
14966
- var ProfilePicturePickerModule = /** @class */ (function () {
14967
- function ProfilePicturePickerModule() {
14968
- }
14969
- ProfilePicturePickerModule = __decorate([
14970
- NgModule({
14971
- imports: [
14972
- CommonModule,
14973
- ButtonModule,
14974
- ThumbnailModule,
14975
- ImageCropperModule,
14976
- ConfirmDialogModule,
14977
- ],
14978
- declarations: [ProfilePicturePickerComponent],
14979
- exports: [ProfilePicturePickerComponent],
14980
- providers: [
14981
- ImageCropperService,
14982
- ConfirmationService,
14983
- ],
14984
- })
14985
- ], ProfilePicturePickerModule);
14986
- return ProfilePicturePickerModule;
14987
- }());
14988
-
14989
15072
  var ProgressBarColors;
14990
15073
  (function (ProgressBarColors) {
14991
15074
  ProgressBarColors["Blue"] = "blue";
@@ -17540,6 +17623,11 @@ var WorkspaceSwitchModule = /** @class */ (function () {
17540
17623
  }());
17541
17624
 
17542
17625
  var fallback = {
17626
+ "platform.angular_components.drag_your_photo_or": "Arraste sua foto ou",
17627
+ "platform.angular_components.select_a_file": "selecione um arquivo",
17628
+ "platform.angular_components.change_photo": "Alterar foto",
17629
+ "platform.angular_components.remove_image": "Remover imagem",
17630
+ "platform.angular_components.confirmation_remove_image": "Deseja remover a imagem? Não pode ser revertida.",
17543
17631
  "platform.angular_components.strong": "Forte",
17544
17632
  "platform.angular_components.medium": "Média",
17545
17633
  "platform.angular_components.weak": "Fraca",
@@ -17853,5 +17941,5 @@ var fallback = {
17853
17941
  * Generated bundle index. Do not edit.
17854
17942
  */
17855
17943
 
17856
- export { AccordionComponent, AccordionModule, AccordionPanelComponent, AlertComponent, AlertModule, AngularComponentsModule, AutocompleteField, BadgeColors, BadgeComponent, BadgeModule, BaseFieldComponent, BignumberField, BignumberInputDirective, BignumberInputModule, BooleanField, BooleanOptionsLabel, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ButtonComponent, ButtonModule, ButtonPriority, ButtonSize, CalendarField, CalendarLocaleOptions, CalendarMaskDirective, CalendarMaskModule, CardComponent, CardModule, CardTemplateTypes, ChipsField, CodeEditorModule, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CountryPhonePickerComponent, CountryPhonePickerModule, CurrencyField, CustomFieldsComponent, CustomFieldsModule, CustomFieldsService, DEFAULT_CALENDAR_LOCALE_OPTIONS, DEFAULT_LOCALE_OPTIONS, DEFAULT_NUMBER_LOCALE_OPTIONS, DebounceUtils, DoubleClickDirective, DynamicConfig, DynamicFormComponent, DynamicFormModule, DynamicType, EditableOverlayDirective, EditableOverlayModule, EmptyStateComponent, EmptyStateModule, EnumBadgeColors, EnumColumnFieldType, EnumSeverity, ExportUtils, Field, FieldType, Fieldset, FileUploadComponent, FileUploadModule, FileValidation, FormField, GanttComponent, GanttModule, GlobalSearchComponent, GlobalSearchDropdownItemComponent, GlobalSearchModule, GlobalSearchSizeEnum, HostProjectConfigsInjectionToken, IAInsightComponent, IAInsightModule, IAInsightTemplateTypes, ImageCropperComponent, ImageCropperModule, ImageCropperService, InfoSignDirective, InfoSignModule, KanbanComponent, KanbanModule, KanbanTemplateTypes, Languages, LoadingStateComponent, LoadingStateDirective, LoadingStateModule, LocaleModule, LocaleOptions, LocaleService, LocalizedCurrencyPipe, LocalizedCurrencyPipeOptions, LocalizedDateImpurePipe, LocalizedDatePipe, LocalizedNumberInputDirective, LocalizedNumberInputModule, LocalizedNumberPipe, LocalizedTimeImpurePipe, LocalizedTimePipe, LongPressDirective, LookupComponent, LookupField, MaskFormatterModule, MaskFormatterPipe, MouseEventsModule, NavigationDirective, NumberAlignmentOption, NumberField, NumberInputDirective, NumberInputModule, NumberLocaleOptions, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, ObjectCardModule, Option, Ordination, PanelComponent, PanelModule, PasswordField, PasswordStrengthComponent, PasswordStrengthDirective, PasswordStrengthModule, PasswordStrengthPositions, PasswordStrengths, ProductHeaderComponent, ProductHeaderModule, ProfilePicturePickerComponent, ProfilePicturePickerModule, ProgressBarColors, ProgressBarComponent, ProgressBarModule, RadioButtonField, RatingScaleComponent, RatingScaleModule, RationButtonOption, RowTogllerDirective, SVGFactoryDirective, SVGFactoryModule, Section, SelectButtonComponent, SelectButtonModule, SelectField, SelectOption, SidebarComponent, SidebarModule, SlidePanelComponent, SlidePanelModule, SplitButtonComponent, SplitButtonModule, SplitButtonType, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, SwitchComponent, SwitchModule, TableFrozenPositionDirective, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TaxCalculationLanguageConfigs, TextAreaField, TextField, Themes, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TieredMenuDirective, TieredMenuModule, TileComponent, TileModule, TimelineComponent, TimelineItem, TimelineItemSeverity, TimelineItemSize, TimelineModule, TokenListComponent, TokenListModule, TooltipModule, TooltipPosition, ValidateErrors, ViewMode, WorkspaceSwitchComponent, WorkspaceSwitchModule, countries, fallback, TooltipComponent as ɵa, TooltipDirective as ɵb, TextFieldComponent as ɵba, NumberFieldModule as ɵbb, LocalizedNumberInputModule as ɵbc, NumberInputModule as ɵbd, NumberFieldComponent as ɵbe, CurrencyFieldModule as ɵbf, CurrencyFieldComponent as ɵbg, NumberFieldModule$1 as ɵbh, BignumberInputModule as ɵbi, BignumberFieldComponent as ɵbj, AutocompleteFieldComponent as ɵbk, BooleanFieldComponent as ɵbl, BooleanSwitchFieldComponent as ɵbm, CalendarFieldComponent as ɵbn, ChipsFieldComponent as ɵbo, CountryPhonePickerFieldComponent as ɵbp, DynamicFieldComponent as ɵbq, DynamicFormDirective as ɵbr, FieldsetComponent as ɵbs, FileUploadComponent$1 as ɵbt, LookupFieldComponent as ɵbu, RadioButtonComponent as ɵbv, RowComponent as ɵbw, SectionComponent as ɵbx, SelectFieldComponent as ɵby, SliderFieldComponent as ɵbz, TemplateDirective as ɵc, TextAreaFieldComponent as ɵca, TextAreaIAFieldComponent as ɵcb, IAssistService as ɵcc, DecimalField as ɵce, SideTableComponent as ɵcf, ThumbnailService as ɵcg, InfiniteScrollModule as ɵch, InfiniteScrollDirective as ɵci, IAInsightSidebarComponent as ɵcj, IAInsightCardComponent as ɵck, IAInsightCardLoaderComponent as ɵcl, StructureModule as ɵcm, HeaderComponent as ɵcn, FooterComponent as ɵco, KanbanEventService as ɵcp, KanbanItemComponent as ɵcq, KanbanColumnComponent as ɵcr, KanbanItemDraggingComponent as ɵcs, NumberLocaleOptions as ɵct, BorderButtonModule as ɵcu, BorderButtonComponent as ɵcv, ProgressBarDeterminateComponent as ɵcw, ProgressBarIndeterminateComponent as ɵcx, SelectButtonItemComponent as ɵcy, SlidePanelService as ɵcz, TemplateModule as ɵd, TieredMenuEventService as ɵda, TieredMenuService as ɵdb, TieredMenuGlobalService as ɵdc, TieredMenuComponent as ɵdd, TieredMenuNestedComponent as ɵde, TieredMenuItemComponent as ɵdf, TieredMenuDividerComponent as ɵdg, TimelineItemModule as ɵdh, TimelineIconItemComponent as ɵdi, HorizontalTimelineModule as ɵdj, HorizontalTimelineComponent as ɵdk, VerticalTimelineModule as ɵdl, VerticalTimelineComponent as ɵdm, RangeLineComponent as ɵdn, CollapseOptionComponent as ɵdo, CollapsedItemsComponent as ɵdp, VerticalItemsComponent as ɵdq, CustomTranslationsModule as ɵe, CodeEditorComponent as ɵf, CoreFacade as ɵg, CodeMirror6Core as ɵh, CountryPhonePickerService as ɵi, LocalizedCurrencyImpurePipe as ɵj, LocalizedBignumberPipe as ɵk, LocalizedBignumberImpurePipe as ɵl, NumericPipe as ɵm, NumericService as ɵn, EmptyStateGoBackComponent as ɵo, IAssistIconComponent as ɵp, SeniorIconComponent as ɵq, DotsIndicatorComponent as ɵr, LoadingIndicatorComponent as ɵs, FileUploadService as ɵt, InfoSignComponent as ɵu, TableColumnsComponent as ɵv, TablePagingComponent as ɵw, PasswordFieldModule as ɵx, PasswordFieldComponent as ɵy, TextFieldModule as ɵz };
17944
+ export { AccordionComponent, AccordionModule, AccordionPanelComponent, AlertComponent, AlertModule, AngularComponentsModule, AutocompleteField, BadgeColors, BadgeComponent, BadgeModule, BaseFieldComponent, BignumberField, BignumberInputDirective, BignumberInputModule, BooleanField, BooleanOptionsLabel, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ButtonComponent, ButtonModule, ButtonPriority, ButtonSize, CalendarField, CalendarLocaleOptions, CalendarMaskDirective, CalendarMaskModule, CardComponent, CardModule, CardTemplateTypes, ChipsField, CodeEditorModule, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CountryPhonePickerComponent, CountryPhonePickerModule, CurrencyField, CustomFieldsComponent, CustomFieldsModule, CustomFieldsService, DEFAULT_CALENDAR_LOCALE_OPTIONS, DEFAULT_LOCALE_OPTIONS, DEFAULT_NUMBER_LOCALE_OPTIONS, DebounceUtils, DoubleClickDirective, DynamicConfig, DynamicFormComponent, DynamicFormModule, DynamicType, EditableOverlayDirective, EditableOverlayModule, EmptyStateComponent, EmptyStateModule, EnumBadgeColors, EnumColumnFieldType, EnumSeverity, ExportUtils, Field, FieldType, Fieldset, FileUploadComponent, FileUploadModule, FileValidation, FormField, GanttComponent, GanttModule, GlobalSearchComponent, GlobalSearchDropdownItemComponent, GlobalSearchModule, GlobalSearchSizeEnum, HostProjectConfigsInjectionToken, IAInsightComponent, IAInsightModule, IAInsightTemplateTypes, ImageCropperComponent, ImageCropperModule, ImageCropperService, InfoSignDirective, InfoSignModule, KanbanComponent, KanbanModule, KanbanTemplateTypes, Languages, LoadingStateComponent, LoadingStateDirective, LoadingStateModule, LocaleModule, LocaleOptions, LocaleService, LocalizedCurrencyPipe, LocalizedCurrencyPipeOptions, LocalizedDateImpurePipe, LocalizedDatePipe, LocalizedNumberInputDirective, LocalizedNumberInputModule, LocalizedNumberPipe, LocalizedTimeImpurePipe, LocalizedTimePipe, LongPressDirective, LookupComponent, LookupField, MaskFormatterModule, MaskFormatterPipe, MouseEventsModule, NavigationDirective, NumberAlignmentOption, NumberField, NumberInputDirective, NumberInputModule, NumberLocaleOptions, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, ObjectCardModule, Option, Ordination, PanelComponent, PanelModule, PasswordField, PasswordStrengthComponent, PasswordStrengthDirective, PasswordStrengthModule, PasswordStrengthPositions, PasswordStrengths, ProductHeaderComponent, ProductHeaderModule, ProfilePicturePickerComponent, ProfilePicturePickerModule, ProgressBarColors, ProgressBarComponent, ProgressBarModule, RadioButtonField, RatingScaleComponent, RatingScaleModule, RationButtonOption, RowTogllerDirective, SVGFactoryDirective, SVGFactoryModule, Section, SelectButtonComponent, SelectButtonModule, SelectField, SelectOption, SidebarComponent, SidebarModule, SlidePanelComponent, SlidePanelModule, SplitButtonComponent, SplitButtonModule, SplitButtonType, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, SwitchComponent, SwitchModule, TableFrozenPositionDirective, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TaxCalculationLanguageConfigs, TextAreaField, TextField, Themes, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TieredMenuDirective, TieredMenuModule, TileComponent, TileModule, TimelineComponent, TimelineItem, TimelineItemSeverity, TimelineItemSize, TimelineModule, TokenListComponent, TokenListModule, TooltipModule, TooltipPosition, ValidateErrors, ViewMode, WorkspaceSwitchComponent, WorkspaceSwitchModule, countries, fallback, TooltipComponent as ɵa, TooltipDirective as ɵb, TextFieldComponent as ɵba, NumberFieldModule as ɵbb, LocalizedNumberInputModule as ɵbc, NumberInputModule as ɵbd, NumberFieldComponent as ɵbe, CurrencyFieldModule as ɵbf, CurrencyFieldComponent as ɵbg, NumberFieldModule$1 as ɵbh, BignumberInputModule as ɵbi, BignumberFieldComponent as ɵbj, ProfilePictureModule as ɵbk, ThumbnailService as ɵbl, StructureModule as ɵbm, HeaderComponent as ɵbn, FooterComponent as ɵbo, ProfilePictureFieldComponent as ɵbp, AutocompleteFieldComponent as ɵbq, BooleanFieldComponent as ɵbr, BooleanSwitchFieldComponent as ɵbs, CalendarFieldComponent as ɵbt, ChipsFieldComponent as ɵbu, CountryPhonePickerFieldComponent as ɵbv, DynamicFieldComponent as ɵbw, DynamicFormDirective as ɵbx, FieldsetComponent as ɵby, FileUploadComponent$1 as ɵbz, TemplateDirective as ɵc, LookupFieldComponent as ɵca, RadioButtonComponent as ɵcb, RowComponent as ɵcc, SectionComponent as ɵcd, SelectFieldComponent as ɵce, SliderFieldComponent as ɵcf, TextAreaFieldComponent as ɵcg, TextAreaIAFieldComponent as ɵch, IAssistService as ɵci, DecimalField as ɵck, SideTableComponent as ɵcl, InfiniteScrollModule as ɵcm, InfiniteScrollDirective as ɵcn, IAInsightSidebarComponent as ɵco, IAInsightCardComponent as ɵcp, IAInsightCardLoaderComponent as ɵcq, KanbanEventService as ɵcr, KanbanItemComponent as ɵcs, KanbanColumnComponent as ɵct, KanbanItemDraggingComponent as ɵcu, NumberLocaleOptions as ɵcv, BorderButtonModule as ɵcw, BorderButtonComponent as ɵcx, ProgressBarDeterminateComponent as ɵcy, ProgressBarIndeterminateComponent as ɵcz, TemplateModule as ɵd, SelectButtonItemComponent as ɵda, SlidePanelService as ɵdb, TieredMenuEventService as ɵdc, TieredMenuService as ɵdd, TieredMenuGlobalService as ɵde, TieredMenuComponent as ɵdf, TieredMenuNestedComponent as ɵdg, TieredMenuItemComponent as ɵdh, TieredMenuDividerComponent as ɵdi, TimelineItemModule as ɵdj, TimelineIconItemComponent as ɵdk, HorizontalTimelineModule as ɵdl, HorizontalTimelineComponent as ɵdm, VerticalTimelineModule as ɵdn, VerticalTimelineComponent as ɵdo, RangeLineComponent as ɵdp, CollapseOptionComponent as ɵdq, CollapsedItemsComponent as ɵdr, VerticalItemsComponent as ɵds, CustomTranslationsModule as ɵe, CodeEditorComponent as ɵf, CoreFacade as ɵg, CodeMirror6Core as ɵh, CountryPhonePickerService as ɵi, LocalizedCurrencyImpurePipe as ɵj, LocalizedBignumberPipe as ɵk, LocalizedBignumberImpurePipe as ɵl, NumericPipe as ɵm, NumericService as ɵn, EmptyStateGoBackComponent as ɵo, IAssistIconComponent as ɵp, SeniorIconComponent as ɵq, DotsIndicatorComponent as ɵr, LoadingIndicatorComponent as ɵs, FileUploadService as ɵt, InfoSignComponent as ɵu, TableColumnsComponent as ɵv, TablePagingComponent as ɵw, PasswordFieldModule as ɵx, PasswordFieldComponent as ɵy, TextFieldModule as ɵz };
17857
17945
  //# sourceMappingURL=seniorsistemas-angular-components.js.map