@seniorsistemas/angular-components 17.8.7 → 17.8.8
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 +19 -17
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/profile-picture-picker/models/profile-picture-picker-data.d.ts +1 -1
- package/components/profile-picture-picker/profile-picture-picker.component.d.ts +4 -3
- package/esm2015/components/dynamic-form/components/fields/profile-picture/profile-picture-field.component.js +2 -2
- package/esm2015/components/password-strength/password-strength.directive.js +1 -4
- package/esm2015/components/profile-picture-picker/index.js +1 -1
- package/esm2015/components/profile-picture-picker/models/profile-picture-picker-data.js +1 -1
- package/esm2015/components/profile-picture-picker/profile-picture-picker.component.js +19 -14
- package/esm5/components/dynamic-form/components/fields/profile-picture/profile-picture-field.component.js +2 -2
- package/esm5/components/password-strength/password-strength.directive.js +1 -4
- package/esm5/components/profile-picture-picker/index.js +1 -1
- package/esm5/components/profile-picture-picker/models/profile-picture-picker-data.js +1 -1
- package/esm5/components/profile-picture-picker/profile-picture-picker.component.js +19 -14
- package/fesm2015/seniorsistemas-angular-components.js +19 -17
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +19 -17
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -7789,9 +7789,6 @@
|
|
|
7789
7789
|
};
|
|
7790
7790
|
PasswordStrengthDirective.prototype.validateProperties = function () {
|
|
7791
7791
|
this.validation = this.validation || this.defaultValidator;
|
|
7792
|
-
if (!this.description) {
|
|
7793
|
-
throw new Error("Description is required");
|
|
7794
|
-
}
|
|
7795
7792
|
};
|
|
7796
7793
|
PasswordStrengthDirective.prototype.destroyPasswordStrength = function () {
|
|
7797
7794
|
if (this.componentRef !== null) {
|
|
@@ -10016,7 +10013,7 @@
|
|
|
10016
10013
|
], ProfilePictureFieldComponent.prototype, "formControl", void 0);
|
|
10017
10014
|
ProfilePictureFieldComponent = __decorate([
|
|
10018
10015
|
core.Component({
|
|
10019
|
-
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>"
|
|
10016
|
+
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.accept\"\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>"
|
|
10020
10017
|
})
|
|
10021
10018
|
], ProfilePictureFieldComponent);
|
|
10022
10019
|
return ProfilePictureFieldComponent;
|
|
@@ -10926,13 +10923,8 @@
|
|
|
10926
10923
|
this.confirmationService = confirmationService;
|
|
10927
10924
|
this.translateService = translateService;
|
|
10928
10925
|
this.aspectRatio = 1;
|
|
10929
|
-
this.confirmationTexts = {
|
|
10930
|
-
removalHeader: this.translateService.instant("platform.angular_components.remove_image"),
|
|
10931
|
-
removalMessage: this.translateService.instant("platform.angular_components.confirmation_remove_image"),
|
|
10932
|
-
removalAcceptLabel: this.translateService.instant("platform.angular_components.remove"),
|
|
10933
|
-
removalRejectLabel: this.translateService.instant("platform.angular_components.cancel"),
|
|
10934
|
-
};
|
|
10935
10926
|
this.supportedExtensions = [];
|
|
10927
|
+
this.imageChange = new core.EventEmitter();
|
|
10936
10928
|
this.changedImage = new core.EventEmitter();
|
|
10937
10929
|
this.removedImage = new core.EventEmitter();
|
|
10938
10930
|
this.invalidFile = new core.EventEmitter();
|
|
@@ -10940,6 +10932,9 @@
|
|
|
10940
10932
|
ProfilePicturePickerComponent_1 = ProfilePicturePickerComponent;
|
|
10941
10933
|
ProfilePicturePickerComponent.prototype.writeValue = function (value) {
|
|
10942
10934
|
this._value = value;
|
|
10935
|
+
if (value) {
|
|
10936
|
+
this.image = value.base64;
|
|
10937
|
+
}
|
|
10943
10938
|
};
|
|
10944
10939
|
ProfilePicturePickerComponent.prototype.registerOnChange = function (onChange) {
|
|
10945
10940
|
this._onChange = onChange;
|
|
@@ -10993,15 +10988,17 @@
|
|
|
10993
10988
|
};
|
|
10994
10989
|
ProfilePicturePickerComponent.prototype.removePhoto = function () {
|
|
10995
10990
|
var _this = this;
|
|
10991
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
10996
10992
|
this.confirmationService.confirm({
|
|
10997
|
-
message: this.confirmationTexts.removalMessage,
|
|
10998
|
-
acceptLabel: this.confirmationTexts.removalAcceptLabel,
|
|
10999
|
-
rejectLabel: this.confirmationTexts.removalRejectLabel,
|
|
11000
|
-
header: this.confirmationTexts.removalHeader,
|
|
10993
|
+
message: (_b = (_a = this.confirmationTexts) === null || _a === void 0 ? void 0 : _a.removalMessage) !== null && _b !== void 0 ? _b : this.translateService.instant("platform.angular_components.confirmation_remove_image"),
|
|
10994
|
+
acceptLabel: (_d = (_c = this.confirmationTexts) === null || _c === void 0 ? void 0 : _c.removalAcceptLabel) !== null && _d !== void 0 ? _d : this.translateService.instant("platform.angular_components.remove"),
|
|
10995
|
+
rejectLabel: (_f = (_e = this.confirmationTexts) === null || _e === void 0 ? void 0 : _e.removalRejectLabel) !== null && _f !== void 0 ? _f : this.translateService.instant("platform.angular_components.cancel"),
|
|
10996
|
+
header: (_h = (_g = this.confirmationTexts) === null || _g === void 0 ? void 0 : _g.removalHeader) !== null && _h !== void 0 ? _h : this.translateService.instant("platform.angular_components.remove_image"),
|
|
10997
|
+
rejectButtonStyleClass: "ui-button-secondary",
|
|
11001
10998
|
accept: function () {
|
|
11002
10999
|
var fileInputElement = _this.fileInput.nativeElement;
|
|
11003
11000
|
fileInputElement.value = "";
|
|
11004
|
-
_this.image =
|
|
11001
|
+
_this.image = null;
|
|
11005
11002
|
_this.removedImage.emit();
|
|
11006
11003
|
},
|
|
11007
11004
|
});
|
|
@@ -11020,9 +11017,11 @@
|
|
|
11020
11017
|
fileReader.onloadend = function (fileEvent) {
|
|
11021
11018
|
_this.imageCropperService.show(__assign({ imageSource: fileEvent.target.result, croppedImage: function (image) {
|
|
11022
11019
|
var _a;
|
|
11020
|
+
var data = { source: file, base64: image };
|
|
11023
11021
|
_this.image = image;
|
|
11022
|
+
_this.imageChange.emit(data);
|
|
11024
11023
|
_this.changedImage.emit(image);
|
|
11025
|
-
_this._value = {
|
|
11024
|
+
_this._value = { source: file, base64: image };
|
|
11026
11025
|
(_a = _this._onChange) === null || _a === void 0 ? void 0 : _a.call(_this, _this._value);
|
|
11027
11026
|
}, changeImage: function () { return _this.selectPhoto(); }, allowSelectAnother: false, aspectRatio: _this.aspectRatio }, _this.cropperLabelsConfig));
|
|
11028
11027
|
};
|
|
@@ -11064,7 +11063,7 @@
|
|
|
11064
11063
|
};
|
|
11065
11064
|
ProfilePicturePickerComponent.prototype._validateFileSize = function (file) {
|
|
11066
11065
|
if (this.maxFileSize) {
|
|
11067
|
-
return file.size
|
|
11066
|
+
return file.size <= this.maxFileSize;
|
|
11068
11067
|
}
|
|
11069
11068
|
return true;
|
|
11070
11069
|
};
|
|
@@ -11126,6 +11125,9 @@
|
|
|
11126
11125
|
__decorate([
|
|
11127
11126
|
core.ViewChild("fileInput", { read: core.ElementRef })
|
|
11128
11127
|
], ProfilePicturePickerComponent.prototype, "fileInput", void 0);
|
|
11128
|
+
__decorate([
|
|
11129
|
+
core.Output()
|
|
11130
|
+
], ProfilePicturePickerComponent.prototype, "imageChange", void 0);
|
|
11129
11131
|
__decorate([
|
|
11130
11132
|
core.Output()
|
|
11131
11133
|
], ProfilePicturePickerComponent.prototype, "changedImage", void 0);
|