@seniorsistemas/angular-components 16.3.0 → 16.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/seniorsistemas-angular-components.umd.js +46 -12
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/dynamic-form/components/lookup/lookup.component.d.ts +1 -0
- package/components/profile-picture-picker/models/confirmation-texts.d.ts +6 -0
- package/components/profile-picture-picker/profile-picture-picker.component.d.ts +5 -1
- package/esm2015/components/dynamic-form/components/lookup/lookup.component.js +12 -2
- package/esm2015/components/profile-picture-picker/models/confirmation-texts.js +1 -0
- package/esm2015/components/profile-picture-picker/profile-picture-picker.component.js +27 -7
- package/esm2015/components/profile-picture-picker/profile-picture-picker.module.js +8 -2
- package/esm5/components/dynamic-form/components/lookup/lookup.component.js +12 -2
- package/esm5/components/profile-picture-picker/models/confirmation-texts.js +1 -0
- package/esm5/components/profile-picture-picker/profile-picture-picker.component.js +28 -7
- package/esm5/components/profile-picture-picker/profile-picture-picker.module.js +8 -2
- package/fesm2015/seniorsistemas-angular-components.js +43 -8
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +44 -8
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- 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;
|
|
@@ -2270,8 +2270,10 @@
|
|
|
2270
2270
|
this.autocomplete.onOverlayAnimationDone = function (event) { };
|
|
2271
2271
|
};
|
|
2272
2272
|
LookupComponent.prototype.ngOnChanges = function (changes) {
|
|
2273
|
-
if (this.dialogVisible && changes.searchGridData)
|
|
2273
|
+
if (this.dialogVisible && changes.searchGridData) {
|
|
2274
2274
|
this.loading = false;
|
|
2275
|
+
}
|
|
2276
|
+
this._setFocusFilter();
|
|
2275
2277
|
};
|
|
2276
2278
|
LookupComponent.prototype.ngOnDestroy = function () {
|
|
2277
2279
|
this.ngUnsubscribe.next();
|
|
@@ -2447,6 +2449,14 @@
|
|
|
2447
2449
|
this.selected = [rowData];
|
|
2448
2450
|
this.select();
|
|
2449
2451
|
};
|
|
2452
|
+
LookupComponent.prototype._setFocusFilter = function () {
|
|
2453
|
+
if (this.dialogVisible && !this.collapsed) {
|
|
2454
|
+
var input = document.querySelector("s-dynamic-form input");
|
|
2455
|
+
if (input) {
|
|
2456
|
+
input.focus();
|
|
2457
|
+
}
|
|
2458
|
+
}
|
|
2459
|
+
};
|
|
2450
2460
|
var LookupComponent_1;
|
|
2451
2461
|
LookupComponent.nextId = 0;
|
|
2452
2462
|
LookupComponent.ctorParameters = function () { return [
|
|
@@ -8474,11 +8484,18 @@
|
|
|
8474
8484
|
})(exports.FileValidation || (exports.FileValidation = {}));
|
|
8475
8485
|
|
|
8476
8486
|
var ProfilePicturePickerComponent = /** @class */ (function () {
|
|
8477
|
-
function ProfilePicturePickerComponent(imageCropperService) {
|
|
8487
|
+
function ProfilePicturePickerComponent(imageCropperService, confirmationService) {
|
|
8478
8488
|
this.imageCropperService = imageCropperService;
|
|
8489
|
+
this.confirmationService = confirmationService;
|
|
8479
8490
|
this.aspectRatio = 1;
|
|
8480
8491
|
this.removeButtonLabel = "Remover";
|
|
8481
8492
|
this.changeButtonLabel = "Alterar foto";
|
|
8493
|
+
this.confirmationTexts = {
|
|
8494
|
+
removalHeader: "Remover foto de perfil",
|
|
8495
|
+
removalMessage: "Deseja remover sua foto de perfil? Não pode ser revertida.",
|
|
8496
|
+
removalAcceptLabel: "Remover",
|
|
8497
|
+
removalRejectLabel: "Cancelar",
|
|
8498
|
+
};
|
|
8482
8499
|
this.supportedExtensions = [];
|
|
8483
8500
|
this.changedImage = new core.EventEmitter();
|
|
8484
8501
|
this.invalidFile = new core.EventEmitter();
|
|
@@ -8524,9 +8541,18 @@
|
|
|
8524
8541
|
fileInputElement.click();
|
|
8525
8542
|
};
|
|
8526
8543
|
ProfilePicturePickerComponent.prototype.removePhoto = function () {
|
|
8527
|
-
var
|
|
8528
|
-
|
|
8529
|
-
|
|
8544
|
+
var _this = this;
|
|
8545
|
+
this.confirmationService.confirm({
|
|
8546
|
+
message: this.confirmationTexts.removalMessage,
|
|
8547
|
+
acceptLabel: this.confirmationTexts.removalAcceptLabel,
|
|
8548
|
+
rejectLabel: this.confirmationTexts.removalRejectLabel,
|
|
8549
|
+
header: this.confirmationTexts.removalHeader,
|
|
8550
|
+
accept: function () {
|
|
8551
|
+
var fileInputElement = _this.fileInput.nativeElement;
|
|
8552
|
+
fileInputElement.value = "";
|
|
8553
|
+
_this.image = "";
|
|
8554
|
+
},
|
|
8555
|
+
});
|
|
8530
8556
|
};
|
|
8531
8557
|
ProfilePicturePickerComponent.prototype.photoSelected = function (event) {
|
|
8532
8558
|
this._showImageCropper(event.srcElement.files);
|
|
@@ -8592,7 +8618,8 @@
|
|
|
8592
8618
|
return right - left;
|
|
8593
8619
|
};
|
|
8594
8620
|
ProfilePicturePickerComponent.ctorParameters = function () { return [
|
|
8595
|
-
{ type: ImageCropperService }
|
|
8621
|
+
{ type: ImageCropperService },
|
|
8622
|
+
{ type: api.ConfirmationService }
|
|
8596
8623
|
]; };
|
|
8597
8624
|
__decorate([
|
|
8598
8625
|
core.Input()
|
|
@@ -8615,6 +8642,9 @@
|
|
|
8615
8642
|
__decorate([
|
|
8616
8643
|
core.Input()
|
|
8617
8644
|
], ProfilePicturePickerComponent.prototype, "changeButtonLabel", void 0);
|
|
8645
|
+
__decorate([
|
|
8646
|
+
core.Input()
|
|
8647
|
+
], ProfilePicturePickerComponent.prototype, "confirmationTexts", void 0);
|
|
8618
8648
|
__decorate([
|
|
8619
8649
|
core.Input()
|
|
8620
8650
|
], ProfilePicturePickerComponent.prototype, "maxFileSize", void 0);
|
|
@@ -8657,7 +8687,7 @@
|
|
|
8657
8687
|
ProfilePicturePickerComponent = __decorate([
|
|
8658
8688
|
core.Component({
|
|
8659
8689
|
selector: "s-profile-picture-picker",
|
|
8660
|
-
template: "<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>",
|
|
8690
|
+
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>",
|
|
8661
8691
|
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}"]
|
|
8662
8692
|
})
|
|
8663
8693
|
], ProfilePicturePickerComponent);
|
|
@@ -8674,10 +8704,14 @@
|
|
|
8674
8704
|
ButtonModule,
|
|
8675
8705
|
ThumbnailModule,
|
|
8676
8706
|
ImageCropperModule,
|
|
8707
|
+
confirmdialog.ConfirmDialogModule,
|
|
8677
8708
|
],
|
|
8678
8709
|
declarations: [ProfilePicturePickerComponent],
|
|
8679
8710
|
exports: [ProfilePicturePickerComponent],
|
|
8680
|
-
providers: [
|
|
8711
|
+
providers: [
|
|
8712
|
+
ImageCropperService,
|
|
8713
|
+
api.ConfirmationService,
|
|
8714
|
+
],
|
|
8681
8715
|
})
|
|
8682
8716
|
], ProfilePicturePickerModule);
|
|
8683
8717
|
return ProfilePicturePickerModule;
|