@seniorsistemas/angular-components 16.2.3 → 16.3.1

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 (41) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +258 -11
  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/profile-picture-picker/index.d.ts +3 -0
  6. package/components/profile-picture-picker/models/confirmation-texts.d.ts +6 -0
  7. package/components/profile-picture-picker/models/cropper-labels-config.d.ts +9 -0
  8. package/components/profile-picture-picker/models/file-validation-errors.d.ts +10 -0
  9. package/components/profile-picture-picker/models/index.d.ts +2 -0
  10. package/components/profile-picture-picker/profile-picture-picker.component.d.ts +42 -0
  11. package/components/profile-picture-picker/profile-picture-picker.module.d.ts +2 -0
  12. package/components/thumbnail/thumbnail.service.d.ts +0 -1
  13. package/esm2015/components/image-cropper/image-cropper.component.js +8 -6
  14. package/esm2015/components/profile-picture-picker/index.js +4 -0
  15. package/esm2015/components/profile-picture-picker/models/confirmation-texts.js +1 -0
  16. package/esm2015/components/profile-picture-picker/models/cropper-labels-config.js +1 -0
  17. package/esm2015/components/profile-picture-picker/models/file-validation-errors.js +8 -0
  18. package/esm2015/components/profile-picture-picker/models/index.js +2 -0
  19. package/esm2015/components/profile-picture-picker/profile-picture-picker.component.js +214 -0
  20. package/esm2015/components/profile-picture-picker/profile-picture-picker.module.js +31 -0
  21. package/esm2015/components/thumbnail/thumbnail.component.js +5 -4
  22. package/esm2015/components/thumbnail/thumbnail.service.js +1 -2
  23. package/esm2015/public-api.js +2 -1
  24. package/esm5/components/image-cropper/image-cropper.component.js +8 -6
  25. package/esm5/components/profile-picture-picker/index.js +4 -0
  26. package/esm5/components/profile-picture-picker/models/confirmation-texts.js +1 -0
  27. package/esm5/components/profile-picture-picker/models/cropper-labels-config.js +1 -0
  28. package/esm5/components/profile-picture-picker/models/file-validation-errors.js +8 -0
  29. package/esm5/components/profile-picture-picker/models/index.js +2 -0
  30. package/esm5/components/profile-picture-picker/profile-picture-picker.component.js +217 -0
  31. package/esm5/components/profile-picture-picker/profile-picture-picker.module.js +34 -0
  32. package/esm5/components/thumbnail/thumbnail.component.js +5 -4
  33. package/esm5/components/thumbnail/thumbnail.service.js +1 -1
  34. package/esm5/public-api.js +2 -1
  35. package/fesm2015/seniorsistemas-angular-components.js +249 -9
  36. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  37. package/fesm5/seniorsistemas-angular-components.js +255 -8
  38. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  39. package/package.json +1 -1
  40. package/public-api.d.ts +1 -0
  41. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('primeng/breadcrumb'), require('@angular/router'), require('rxjs'), require('rxjs/operators'), require('primeng/tieredmenu'), require('primeng/tooltip'), require('primeng/dom'), require('primeng/calendar'), require('@angular/animations'), require('@angular/forms'), require('@angular/common/http'), require('angular2-hotkeys'), require('bignumber.js'), require('primeng/autocomplete'), require('primeng/dialog'), require('primeng/table'), require('@seniorsistemas/ng2-currency-mask'), require('@seniorsistemas/senior-platform-data'), require('moment'), require('ngx-cookie-service'), require('ng2-currency-mask'), require('primeng/button'), require('primeng/checkbox'), require('primeng/chips'), require('primeng/dropdown'), require('primeng/fieldset'), require('primeng/inputmask'), require('primeng/inputtext'), require('primeng/inputtextarea'), require('primeng/keyfilter'), require('primeng/multiselect'), require('primeng/inputswitch'), require('primeng/panel'), require('primeng/radiobutton'), require('primeng/progressbar'), require('@angular/platform-browser'), require('@ngx-translate/core'), require('cropperjs'), require('element-resize-detector'), require('@angular/cdk/a11y'), require('primeng/scrollpanel'), require('primeng/sidebar'), require('@codemirror/view'), require('@codemirror/state'), require('@codemirror/lint'), require('@codemirror/language'), require('@lezer/generator'), require('@codemirror/highlight'), require('@codemirror/autocomplete'), require('@codemirror/tooltip'), require('@codemirror/gutter')) :
3
- typeof define === 'function' && define.amd ? define('@seniorsistemas/angular-components', ['exports', '@angular/core', '@angular/common', 'primeng/breadcrumb', '@angular/router', 'rxjs', 'rxjs/operators', 'primeng/tieredmenu', 'primeng/tooltip', 'primeng/dom', 'primeng/calendar', '@angular/animations', '@angular/forms', '@angular/common/http', 'angular2-hotkeys', 'bignumber.js', 'primeng/autocomplete', 'primeng/dialog', 'primeng/table', '@seniorsistemas/ng2-currency-mask', '@seniorsistemas/senior-platform-data', 'moment', 'ngx-cookie-service', 'ng2-currency-mask', 'primeng/button', 'primeng/checkbox', 'primeng/chips', 'primeng/dropdown', 'primeng/fieldset', 'primeng/inputmask', 'primeng/inputtext', 'primeng/inputtextarea', 'primeng/keyfilter', 'primeng/multiselect', 'primeng/inputswitch', 'primeng/panel', 'primeng/radiobutton', 'primeng/progressbar', '@angular/platform-browser', '@ngx-translate/core', 'cropperjs', 'element-resize-detector', '@angular/cdk/a11y', 'primeng/scrollpanel', 'primeng/sidebar', '@codemirror/view', '@codemirror/state', '@codemirror/lint', '@codemirror/language', '@lezer/generator', '@codemirror/highlight', '@codemirror/autocomplete', '@codemirror/tooltip', '@codemirror/gutter'], factory) :
4
- (global = global || self, factory((global.seniorsistemas = global.seniorsistemas || {}, global.seniorsistemas['angular-components'] = {}), global.ng.core, global.ng.common, global.breadcrumb, global.ng.router, global.rxjs, global.rxjs.operators, global.tieredmenu, global.tooltip, global.dom, global.calendar, global.ng.animations, global.ng.forms, global.ng.common.http, global.angular2Hotkeys, global.BigNumber, global.autocomplete$1, global.dialog, global.table, global.ng2CurrencyMask, global.seniorPlatformData, global.moment_, global.ngxCookieService, global.ng2CurrencyMask$1, global.button, global.checkbox, global.chips, global.dropdown, global.fieldset, global.inputmask, global.inputtext, global.inputtextarea, global.keyfilter, global.multiselect, global.inputswitch, global.panel, global.radiobutton, global.progressbar, global.ng.platformBrowser, global.core$1, global.Cropper, global.elementResizeDetectorMaker_, global.ng.cdk.a11y, global.scrollpanel, global.sidebar, global.view, global.state, global.lint, global.language, global.generator, global.highlight, global.autocomplete$2, global.tooltip$1, global.gutter));
5
- }(this, (function (exports, core, common, breadcrumb, router, rxjs, operators, tieredmenu, tooltip, dom, calendar, animations, forms, http, angular2Hotkeys, BigNumber, autocomplete$1, dialog, table, ng2CurrencyMask, seniorPlatformData, moment_, ngxCookieService, ng2CurrencyMask$1, button, checkbox, chips, dropdown, fieldset, inputmask, inputtext, inputtextarea, keyfilter, multiselect, inputswitch, panel, radiobutton, progressbar, platformBrowser, core$1, Cropper, elementResizeDetectorMaker_, a11y, scrollpanel, sidebar, view, state, lint, language, generator, highlight, autocomplete$2, tooltip$1, gutter) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('primeng/breadcrumb'), require('@angular/router'), require('rxjs'), require('rxjs/operators'), require('primeng/tieredmenu'), require('primeng/tooltip'), require('primeng/dom'), require('primeng/calendar'), require('@angular/animations'), require('@angular/forms'), require('@angular/common/http'), require('angular2-hotkeys'), require('bignumber.js'), require('primeng/autocomplete'), require('primeng/dialog'), require('primeng/table'), require('@seniorsistemas/ng2-currency-mask'), require('@seniorsistemas/senior-platform-data'), require('moment'), require('ngx-cookie-service'), require('ng2-currency-mask'), require('primeng/button'), require('primeng/checkbox'), require('primeng/chips'), require('primeng/dropdown'), require('primeng/fieldset'), require('primeng/inputmask'), require('primeng/inputtext'), require('primeng/inputtextarea'), require('primeng/keyfilter'), require('primeng/multiselect'), require('primeng/inputswitch'), require('primeng/panel'), require('primeng/radiobutton'), require('primeng/progressbar'), require('@angular/platform-browser'), require('@ngx-translate/core'), require('cropperjs'), require('element-resize-detector'), require('@angular/cdk/a11y'), require('primeng/scrollpanel'), require('primeng/sidebar'), require('primeng/api'), require('primeng/confirmdialog'), require('@codemirror/view'), require('@codemirror/state'), require('@codemirror/lint'), require('@codemirror/language'), require('@lezer/generator'), require('@codemirror/highlight'), require('@codemirror/autocomplete'), require('@codemirror/tooltip'), require('@codemirror/gutter')) :
3
+ typeof define === 'function' && define.amd ? define('@seniorsistemas/angular-components', ['exports', '@angular/core', '@angular/common', 'primeng/breadcrumb', '@angular/router', 'rxjs', 'rxjs/operators', 'primeng/tieredmenu', 'primeng/tooltip', 'primeng/dom', 'primeng/calendar', '@angular/animations', '@angular/forms', '@angular/common/http', 'angular2-hotkeys', 'bignumber.js', 'primeng/autocomplete', 'primeng/dialog', 'primeng/table', '@seniorsistemas/ng2-currency-mask', '@seniorsistemas/senior-platform-data', 'moment', 'ngx-cookie-service', 'ng2-currency-mask', 'primeng/button', 'primeng/checkbox', 'primeng/chips', 'primeng/dropdown', 'primeng/fieldset', 'primeng/inputmask', 'primeng/inputtext', 'primeng/inputtextarea', 'primeng/keyfilter', 'primeng/multiselect', 'primeng/inputswitch', 'primeng/panel', 'primeng/radiobutton', 'primeng/progressbar', '@angular/platform-browser', '@ngx-translate/core', 'cropperjs', 'element-resize-detector', '@angular/cdk/a11y', 'primeng/scrollpanel', 'primeng/sidebar', 'primeng/api', 'primeng/confirmdialog', '@codemirror/view', '@codemirror/state', '@codemirror/lint', '@codemirror/language', '@lezer/generator', '@codemirror/highlight', '@codemirror/autocomplete', '@codemirror/tooltip', '@codemirror/gutter'], factory) :
4
+ (global = global || self, factory((global.seniorsistemas = global.seniorsistemas || {}, global.seniorsistemas['angular-components'] = {}), global.ng.core, global.ng.common, global.breadcrumb, global.ng.router, global.rxjs, global.rxjs.operators, global.tieredmenu, global.tooltip, global.dom, global.calendar, global.ng.animations, global.ng.forms, global.ng.common.http, global.angular2Hotkeys, global.BigNumber, global.autocomplete$1, global.dialog, global.table, global.ng2CurrencyMask, global.seniorPlatformData, global.moment_, global.ngxCookieService, global.ng2CurrencyMask$1, global.button, global.checkbox, global.chips, global.dropdown, global.fieldset, global.inputmask, global.inputtext, global.inputtextarea, global.keyfilter, global.multiselect, global.inputswitch, global.panel, global.radiobutton, global.progressbar, global.ng.platformBrowser, global.core$1, global.Cropper, global.elementResizeDetectorMaker_, global.ng.cdk.a11y, global.scrollpanel, global.sidebar, global.api, global.confirmdialog, global.view, global.state, global.lint, global.language, global.generator, global.highlight, global.autocomplete$2, global.tooltip$1, global.gutter));
5
+ }(this, (function (exports, core, common, breadcrumb, router, rxjs, operators, tieredmenu, tooltip, dom, calendar, animations, forms, http, angular2Hotkeys, BigNumber, autocomplete$1, dialog, table, ng2CurrencyMask, seniorPlatformData, moment_, ngxCookieService, ng2CurrencyMask$1, button, checkbox, chips, dropdown, fieldset, inputmask, inputtext, inputtextarea, keyfilter, multiselect, inputswitch, panel, radiobutton, progressbar, platformBrowser, core$1, Cropper, elementResizeDetectorMaker_, a11y, scrollpanel, sidebar, api, confirmdialog, view, state, lint, language, generator, highlight, autocomplete$2, tooltip$1, gutter) { 'use strict';
6
6
 
7
7
  var BigNumber__default = 'default' in BigNumber ? BigNumber['default'] : BigNumber;
8
8
  Cropper = Cropper && Object.prototype.hasOwnProperty.call(Cropper, 'default') ? Cropper['default'] : Cropper;
@@ -6973,9 +6973,11 @@
6973
6973
  this.croppedCanvas.emit();
6974
6974
  }
6975
6975
  else {
6976
- var croppedCanvas = this.rounded ? this.getRoundedCanvas(this.cropper.getCroppedCanvas()) : this.cropper.getCroppedCanvas();
6977
- this.croppedCanvas.emit(croppedCanvas);
6978
- this.croppedImage.emit(croppedCanvas.toDataURL());
6976
+ var _croppedCanvas = this.rounded
6977
+ ? this.getRoundedCanvas(this.cropper.getCroppedCanvas())
6978
+ : this.cropper.getCroppedCanvas();
6979
+ this.croppedCanvas.emit(_croppedCanvas);
6980
+ this.croppedImage.emit(_croppedCanvas.toDataURL());
6979
6981
  }
6980
6982
  this.visibleChange.emit(false);
6981
6983
  };
@@ -7075,9 +7077,9 @@
7075
7077
  ImageCropperComponent = ImageCropperComponent_1 = __decorate([
7076
7078
  core.Component({
7077
7079
  selector: "s-image-cropper",
7078
- template: "<div [id]=\"id\">\n <p-dialog styleClass=\"s-image-cropper {{rounded ? 's-image-cropper--rounded' : ''}}\" [header]=\"headerSection ? '' : header\"\n [visible]=\"visible\" (visibleChange)=\"onModalVisibleChange($event)\" [modal]=\"true\" [blockScroll]=\"true\"\n [draggable]=\"false\" [resizable]=\"false\" [closeOnEscape]=\"allowCancel\" [closable]=\"allowCancel\" appendTo=\"body\">\n\n <p-header *ngIf=\"headerSection\">\n <ng-content select=\"s-header\"></ng-content>\n </p-header>\n\n <s-empty-state [id]=\"id + '-empty-state'\" *ngIf=\"!imageSource\" [title]=\"emptyStateTitle\" [iconClass]=\"emptyStateIconClass\"\n [primaryActionLabel]=\"emptyStateActionLabel\" (primaryAction)=\"onChangeImage()\"></s-empty-state>\n\n <div [attr.data-hidden]=\"!imageSource\" class=\"image-container\">\n <img [id]=\"id + '-cropper'\" #image [src]=\"imageSource || ''\" />\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 [id]=\"id + '-cancel-button'\" type=\"button\" priority=\"link\" [label]=\"cancelLabel\"\n (onClick)=\"onCancel()\"></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 [id]=\"id + '-remove-button'\" type=\"button\" priority=\"secondary\" [label]=\"removeLabel\"\n (onClick)=\"onRemoveImage()\"></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 [id]=\"id + '-select-another-button'\" type=\"button\" priority=\"secondary\" [label]=\"selectAnotherLabel\"\n (onClick)=\"onChangeImage()\"></s-button>\n </div>\n\n <div class=\"ui-sm-12 ui-md-3 ui-lg-2 ui-xl-2\">\n <s-button [id]=\"id + '-crop-button'\" type=\"button\" [label]=\"cropLabel\" (onClick)=\"onCropImage()\"></s-button>\n </div>\n\n </div>\n </div>\n\n <ng-content select=\"s-footer\" *ngIf=\"footerSection\"></ng-content>\n </p-footer>\n </p-dialog>\n</div>",
7080
+ 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>",
7079
7081
  encapsulation: core.ViewEncapsulation.None,
7080
- styles: ["/*!\n * Cropper.js v1.4.1\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2018-07-15T09:54:43.167Z\n */.cropper-container{-moz-user-select:none;-ms-touch-action:none;-ms-user-select:none;-webkit-user-select:none;direction:ltr;font-size:0;line-height:0;position:relative;touch-action:none;user-select:none}.cropper-container img{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;top:10%!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{left:10%!important;width:80%!important}}@media (min-width:1200px){.s-image-cropper{left:20%!important;width:60%!important}}"]
7082
+ styles: ["/*!\n * Cropper.js v1.4.1\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2018-07-15T09:54:43.167Z\n */.cropper-container{-moz-user-select:none;-ms-touch-action:none;-ms-user-select:none;-webkit-user-select:none;direction:ltr;font-size:0;line-height:0;position:relative;touch-action:none;user-select:none}.cropper-container img{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}}"]
7081
7083
  })
7082
7084
  ], ImageCropperComponent);
7083
7085
  return ImageCropperComponent;
@@ -7250,12 +7252,13 @@
7250
7252
  };
7251
7253
  ThumbnailComponent.prototype.ngAfterViewInit = function () {
7252
7254
  var _this = this;
7253
- if (this.imgEl)
7255
+ if (this.imgEl) {
7254
7256
  this.imgEl.nativeElement.addEventListener("load", function () {
7255
7257
  rxjs.from(_this.thumbnailService.getBinaryFile(_this.imgEl.nativeElement))
7256
7258
  .pipe(operators.takeUntil(_this.ngUnsubscribe))
7257
7259
  .subscribe(function (orientation) { return (_this.orientation = orientation); });
7258
7260
  });
7261
+ }
7259
7262
  };
7260
7263
  var ThumbnailComponent_1;
7261
7264
  ThumbnailComponent.nextId = 0;
@@ -7298,7 +7301,7 @@
7298
7301
  ThumbnailComponent = ThumbnailComponent_1 = __decorate([
7299
7302
  core.Component({
7300
7303
  selector: "s-thumbnail",
7301
- template: "<div [id]=\"id\" class=\"thumbnail-container thumbnail-container--{{size}}\" [ngClass]=\"{'thumbnail-container--with-action': hasAction, 'thumbnail-container--brand': isBrand}\">\n <div [id]=\"id + '-image-container'\" *ngIf=\"imageSource || imageFallback\" class=\"image-container\" [ngClass]=\"{'image-container--rounded': !isBrand}\">\n <img #img [id]=\"id + '-image'\" (error)=\"fallback = true\" [src]=\"imageSource\"\n [alt]=\"imageAlt\" *ngIf=\"!fallback\" [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 #img [id]=\"id + '-image-fallback'\" (error)=\"imageFallback = undefined\" [src]=\"imageFallback\"\n [alt]=\"imageAlt\" *ngIf=\"fallback && imageFallback\" [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 *ngIf=\"fallback && !imageFallback\" ngClass=\"far fa-image\" class=\"fallback-img-color\"></i>\n </div>\n <div [id]=\"id + '-action-icon-container'\" *ngIf=\"hasAction\" class=\"action-icon-container action-icon-container--{{size}}\">\n <span [id]=\"id + '-action-icon'\" [class]=\"actionIconClass\" aria-hidden=\"true\"></span>\n </div>\n <div [id]=\"id + '-icon-container'\" *ngIf=\"!imageSource && !imageFallback\" class=\"icon-container icon-container--{{size}}\" [ngClass]=\"{'image-container--rounded': !isBrand}\">\n <span [id]=\"id + '-icon'\" [class]=\"iconClass\" aria-hidden=\"true\"></span>\n </div>\n\n <ng-content></ng-content>\n</div>\n",
7304
+ 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",
7302
7305
  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}"]
7303
7306
  })
7304
7307
  ], ThumbnailComponent);
@@ -8463,6 +8466,248 @@
8463
8466
  }());
8464
8467
 
8465
8468
 
8469
+ (function (FileValidation) {
8470
+ FileValidation["MaxFileSize"] = "maxFileSize";
8471
+ FileValidation["MaxFileLimit"] = "maxFileLimit";
8472
+ FileValidation["TypeInvalid"] = "typeInvalid";
8473
+ FileValidation["UnsupportedExtension"] = "unsupportedExtension";
8474
+ })(exports.FileValidation || (exports.FileValidation = {}));
8475
+
8476
+ var ProfilePicturePickerComponent = /** @class */ (function () {
8477
+ function ProfilePicturePickerComponent(imageCropperService, confirmationService) {
8478
+ this.imageCropperService = imageCropperService;
8479
+ this.confirmationService = confirmationService;
8480
+ this.aspectRatio = 1;
8481
+ this.removeButtonLabel = "Remover";
8482
+ this.changeButtonLabel = "Alterar foto";
8483
+ this.confirmationTexts = {
8484
+ removalHeader: "Remover foto de perfil",
8485
+ removalMessage: "Deseja remover sua foto de perfil? Não pode ser revertida.",
8486
+ removalAcceptLabel: "Remover",
8487
+ removalRejectLabel: "Cancelar",
8488
+ };
8489
+ this.supportedExtensions = [];
8490
+ this.changedImage = new core.EventEmitter();
8491
+ this.invalidFile = new core.EventEmitter();
8492
+ }
8493
+ ProfilePicturePickerComponent.prototype.ngOnInit = function () {
8494
+ this._normalizeSuportedExtensions();
8495
+ };
8496
+ ProfilePicturePickerComponent.prototype.onDragOver = function (event) {
8497
+ event.preventDefault();
8498
+ event.stopPropagation();
8499
+ };
8500
+ ProfilePicturePickerComponent.prototype.onDragLeave = function (event) {
8501
+ event.preventDefault();
8502
+ event.stopPropagation();
8503
+ };
8504
+ ProfilePicturePickerComponent.prototype.onDrop = function (event) {
8505
+ event.preventDefault();
8506
+ event.stopPropagation();
8507
+ var files = [];
8508
+ var dataTransferFiles = event.dataTransfer.files;
8509
+ for (var i = 0; i < dataTransferFiles.length; i++) {
8510
+ files.push(dataTransferFiles.item(i));
8511
+ }
8512
+ this._showImageCropper(files);
8513
+ };
8514
+ // Verificando o redimensionamento para ajustar o design para ficar responsivo.
8515
+ ProfilePicturePickerComponent.prototype.onResize = function () {
8516
+ if (this.uploadPicture && this.info && this.thumbnail) {
8517
+ var uploadPictureWidth = this._getWidthElement(this.uploadPicture);
8518
+ var infoWidth = this._getWidthElement(this.info);
8519
+ var thumbnailWidth = this._getWidthElement(this.thumbnail);
8520
+ if (thumbnailWidth + infoWidth > uploadPictureWidth) {
8521
+ this.uploadPicture.nativeElement.classList.add("upload-picture--small");
8522
+ }
8523
+ else {
8524
+ this.uploadPicture.nativeElement.classList.remove("upload-picture--small");
8525
+ }
8526
+ }
8527
+ };
8528
+ ProfilePicturePickerComponent.prototype.selectPhoto = function () {
8529
+ var fileInputElement = this.fileInput.nativeElement;
8530
+ fileInputElement.value = "";
8531
+ fileInputElement.click();
8532
+ };
8533
+ ProfilePicturePickerComponent.prototype.removePhoto = function () {
8534
+ var _this = this;
8535
+ this.confirmationService.confirm({
8536
+ message: this.confirmationTexts.removalMessage,
8537
+ acceptLabel: this.confirmationTexts.removalAcceptLabel,
8538
+ rejectLabel: this.confirmationTexts.removalRejectLabel,
8539
+ header: this.confirmationTexts.removalHeader,
8540
+ accept: function () {
8541
+ var fileInputElement = _this.fileInput.nativeElement;
8542
+ fileInputElement.value = "";
8543
+ _this.image = "";
8544
+ },
8545
+ });
8546
+ };
8547
+ ProfilePicturePickerComponent.prototype.photoSelected = function (event) {
8548
+ this._showImageCropper(event.srcElement.files);
8549
+ };
8550
+ ProfilePicturePickerComponent.prototype._showImageCropper = function (files) {
8551
+ var _this = this;
8552
+ if (!this._validateData(files)) {
8553
+ return;
8554
+ }
8555
+ var file = files[0];
8556
+ var fileReader = new FileReader();
8557
+ fileReader.readAsDataURL(file);
8558
+ fileReader.onloadend = function (fileEvent) {
8559
+ _this.imageCropperService.show(__assign({ imageSource: fileEvent.target.result, croppedImage: function (image) {
8560
+ _this.image = image;
8561
+ _this.changedImage.emit(image);
8562
+ }, changeImage: function () { return _this.selectPhoto(); }, allowSelectAnother: false, aspectRatio: _this.aspectRatio }, _this.cropperLabelsConfig));
8563
+ };
8564
+ };
8565
+ ProfilePicturePickerComponent.prototype._normalizeSuportedExtensions = function () {
8566
+ this.supportedExtensions = this.supportedExtensions
8567
+ .map(function (extension) { return extension.replace(".", "").toLocaleLowerCase(); });
8568
+ };
8569
+ ProfilePicturePickerComponent.prototype._validateData = function (files) {
8570
+ if (!files.length) {
8571
+ return false;
8572
+ }
8573
+ if (files.length > 1) {
8574
+ this.invalidFile.emit({ file: null, validation: exports.FileValidation.MaxFileLimit });
8575
+ return false;
8576
+ }
8577
+ var file = files[0];
8578
+ if (!file.type.includes("image")) {
8579
+ this.invalidFile.emit({ file: file, validation: exports.FileValidation.TypeInvalid });
8580
+ return false;
8581
+ }
8582
+ if (!this._validateFileExtension(file)) {
8583
+ this.invalidFile.emit({ file: file, validation: exports.FileValidation.UnsupportedExtension });
8584
+ return false;
8585
+ }
8586
+ if (!this._validateFileSize(file)) {
8587
+ this.invalidFile.emit({ file: file, validation: exports.FileValidation.MaxFileSize });
8588
+ return false;
8589
+ }
8590
+ return true;
8591
+ };
8592
+ ProfilePicturePickerComponent.prototype._validateFileExtension = function (file) {
8593
+ var _a;
8594
+ if ((_a = this.supportedExtensions) === null || _a === void 0 ? void 0 : _a.length) {
8595
+ var extension = file.name.split(".").pop().toLowerCase();
8596
+ return this.supportedExtensions.includes(extension);
8597
+ }
8598
+ return true;
8599
+ };
8600
+ ProfilePicturePickerComponent.prototype._validateFileSize = function (file) {
8601
+ if (this.maxFileSize) {
8602
+ return file.size > this.maxFileSize;
8603
+ }
8604
+ return true;
8605
+ };
8606
+ ProfilePicturePickerComponent.prototype._getWidthElement = function (element) {
8607
+ var _a = element.nativeElement.getBoundingClientRect(), left = _a.left, right = _a.right;
8608
+ return right - left;
8609
+ };
8610
+ ProfilePicturePickerComponent.ctorParameters = function () { return [
8611
+ { type: ImageCropperService },
8612
+ { type: api.ConfirmationService }
8613
+ ]; };
8614
+ __decorate([
8615
+ core.Input()
8616
+ ], ProfilePicturePickerComponent.prototype, "simpleTitle", void 0);
8617
+ __decorate([
8618
+ core.Input()
8619
+ ], ProfilePicturePickerComponent.prototype, "actionTitle", void 0);
8620
+ __decorate([
8621
+ core.Input()
8622
+ ], ProfilePicturePickerComponent.prototype, "subtitle", void 0);
8623
+ __decorate([
8624
+ core.Input()
8625
+ ], ProfilePicturePickerComponent.prototype, "aspectRatio", void 0);
8626
+ __decorate([
8627
+ core.Input()
8628
+ ], ProfilePicturePickerComponent.prototype, "cropperLabelsConfig", void 0);
8629
+ __decorate([
8630
+ core.Input()
8631
+ ], ProfilePicturePickerComponent.prototype, "removeButtonLabel", void 0);
8632
+ __decorate([
8633
+ core.Input()
8634
+ ], ProfilePicturePickerComponent.prototype, "changeButtonLabel", void 0);
8635
+ __decorate([
8636
+ core.Input()
8637
+ ], ProfilePicturePickerComponent.prototype, "confirmationTexts", void 0);
8638
+ __decorate([
8639
+ core.Input()
8640
+ ], ProfilePicturePickerComponent.prototype, "maxFileSize", void 0);
8641
+ __decorate([
8642
+ core.Input()
8643
+ ], ProfilePicturePickerComponent.prototype, "accept", void 0);
8644
+ __decorate([
8645
+ core.Input()
8646
+ ], ProfilePicturePickerComponent.prototype, "supportedExtensions", void 0);
8647
+ __decorate([
8648
+ core.ViewChild("uploadPicture")
8649
+ ], ProfilePicturePickerComponent.prototype, "uploadPicture", void 0);
8650
+ __decorate([
8651
+ core.ViewChild("info")
8652
+ ], ProfilePicturePickerComponent.prototype, "info", void 0);
8653
+ __decorate([
8654
+ core.ViewChild("thumbnail", { read: core.ElementRef })
8655
+ ], ProfilePicturePickerComponent.prototype, "thumbnail", void 0);
8656
+ __decorate([
8657
+ core.ViewChild("fileInput", { read: core.ElementRef })
8658
+ ], ProfilePicturePickerComponent.prototype, "fileInput", void 0);
8659
+ __decorate([
8660
+ core.Output()
8661
+ ], ProfilePicturePickerComponent.prototype, "changedImage", void 0);
8662
+ __decorate([
8663
+ core.Output()
8664
+ ], ProfilePicturePickerComponent.prototype, "invalidFile", void 0);
8665
+ __decorate([
8666
+ core.HostListener("dragover", ["$event"])
8667
+ ], ProfilePicturePickerComponent.prototype, "onDragOver", null);
8668
+ __decorate([
8669
+ core.HostListener("dragleave", ["$event"])
8670
+ ], ProfilePicturePickerComponent.prototype, "onDragLeave", null);
8671
+ __decorate([
8672
+ core.HostListener("drop", ["$event"])
8673
+ ], ProfilePicturePickerComponent.prototype, "onDrop", null);
8674
+ __decorate([
8675
+ core.HostListener("window:resize")
8676
+ ], ProfilePicturePickerComponent.prototype, "onResize", null);
8677
+ ProfilePicturePickerComponent = __decorate([
8678
+ core.Component({
8679
+ selector: "s-profile-picture-picker",
8680
+ 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>",
8681
+ styles: [".file-input{display:none}.upload-picture{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-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}"]
8682
+ })
8683
+ ], ProfilePicturePickerComponent);
8684
+ return ProfilePicturePickerComponent;
8685
+ }());
8686
+
8687
+ var ProfilePicturePickerModule = /** @class */ (function () {
8688
+ function ProfilePicturePickerModule() {
8689
+ }
8690
+ ProfilePicturePickerModule = __decorate([
8691
+ core.NgModule({
8692
+ imports: [
8693
+ common.CommonModule,
8694
+ ButtonModule,
8695
+ ThumbnailModule,
8696
+ ImageCropperModule,
8697
+ confirmdialog.ConfirmDialogModule,
8698
+ ],
8699
+ declarations: [ProfilePicturePickerComponent],
8700
+ exports: [ProfilePicturePickerComponent],
8701
+ providers: [
8702
+ ImageCropperService,
8703
+ api.ConfirmationService,
8704
+ ],
8705
+ })
8706
+ ], ProfilePicturePickerModule);
8707
+ return ProfilePicturePickerModule;
8708
+ }());
8709
+
8710
+
8466
8711
  (function (GlobalSearchSizeEnum) {
8467
8712
  GlobalSearchSizeEnum["STANDARD"] = "STANDARD";
8468
8713
  GlobalSearchSizeEnum["MEDIUM"] = "MEDIUM";
@@ -10331,6 +10576,8 @@
10331
10576
  exports.Option = Option;
10332
10577
  exports.ProductHeaderComponent = ProductHeaderComponent;
10333
10578
  exports.ProductHeaderModule = ProductHeaderModule;
10579
+ exports.ProfilePicturePickerComponent = ProfilePicturePickerComponent;
10580
+ exports.ProfilePicturePickerModule = ProfilePicturePickerModule;
10334
10581
  exports.RadioButtonField = RadioButtonField;
10335
10582
  exports.RationButtonOption = RationButtonOption;
10336
10583
  exports.RowTogllerDirective = RowTogllerDirective;