@seniorsistemas/angular-components 17.8.8 → 17.8.10
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 +61 -24
- 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/dynamic-form/configurations/fields/profile-picture.d.ts +2 -2
- package/components/dynamic-form/dynamic-form.d.ts +1 -0
- package/components/dynamic-form/dynamic-form.directive.d.ts +3 -2
- package/components/file-upload/index.d.ts +1 -1
- package/components/profile-picture-picker/index.d.ts +1 -1
- package/components/profile-picture-picker/profile-picture-picker.component.d.ts +7 -4
- package/esm2015/components/country-phone-picker/country-phone-picker.component.js +1 -1
- package/esm2015/components/dynamic-form/components/fields/password/password-field.component.js +1 -1
- package/esm2015/components/dynamic-form/configurations/fields/profile-picture.js +1 -1
- package/esm2015/components/dynamic-form/dynamic-form.directive.js +5 -2
- package/esm2015/components/dynamic-form/dynamic-form.js +23 -4
- package/esm2015/components/file-upload/file-upload.component.js +2 -2
- package/esm2015/components/file-upload/index.js +2 -2
- package/esm2015/components/profile-picture-picker/index.js +1 -1
- package/esm2015/components/profile-picture-picker/profile-picture-picker.component.js +25 -14
- package/esm5/components/country-phone-picker/country-phone-picker.component.js +1 -1
- package/esm5/components/dynamic-form/components/fields/password/password-field.component.js +1 -1
- package/esm5/components/dynamic-form/configurations/fields/profile-picture.js +1 -1
- package/esm5/components/dynamic-form/dynamic-form.directive.js +5 -2
- package/esm5/components/dynamic-form/dynamic-form.js +23 -4
- package/esm5/components/file-upload/file-upload.component.js +2 -2
- package/esm5/components/file-upload/index.js +2 -2
- package/esm5/components/profile-picture-picker/index.js +1 -1
- package/esm5/components/profile-picture-picker/profile-picture-picker.component.js +29 -14
- package/fesm2015/seniorsistemas-angular-components.js +50 -17
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +54 -17
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -4506,7 +4506,7 @@
|
|
|
4506
4506
|
useExisting: core.forwardRef(function () { return CountryPhonePickerComponent_1; }),
|
|
4507
4507
|
multi: true,
|
|
4508
4508
|
}],
|
|
4509
|
-
styles: [".country-phone-picker .phone-input{background-color:#fff;border:1px solid #d8d8d8;border-radius:4px;display:-ms-flexbox;display:flex;line-height:normal}.country-phone-picker .phone-input .drop{-ms-flex-align:center;align-items:center;cursor:pointer;display:-ms-flexbox;display:flex}.country-phone-picker .phone-input .drop .drop-flag{margin-left:12px}.country-phone-picker .phone-input .drop .drop-icon{font-size:12px;margin:0 8px}.country-phone-picker .phone-input .phone-ddi{margin:8px 0}.country-phone-picker .phone-input input{border:none;-ms-flex-positive:1;flex-grow:1;font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:400;line-height:150%;margin-left:8px}.country-phone-picker .phone-input input:focus{color:#697882;outline:0}.country-phone-picker .dropdown{background-color:#fff;border-radius:4px;box-shadow:0 4px 5px #00000033;padding:4px 0;position:absolute;margin:2px 0;z-index:999999}.country-phone-picker .dropdown .search{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;padding:8px 12px}.country-phone-picker .dropdown .search .search-field{border:1px solid #d8d8d8;border-radius:4px;-ms-flex-positive:1;flex-grow:1;font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:400;height:36px;line-height:150%;padding:0 32px 0 8px}.country-phone-picker .dropdown .search .search-icon{color:#333;font-size:12px;position:relative;right:24px}.country-phone-picker .dropdown .search .search-clear{color:#333;cursor:pointer;font-size:1rem}.country-phone-picker .dropdown .select-list{list-style:none;max-height:234px;min-width:360px;max-width:100vw;overflow:scroll;padding:0}.country-phone-picker .dropdown .select-list .select-option{cursor:pointer;display:-ms-flexbox;display:flex;padding:12px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.country-phone-picker .dropdown .select-list .select-option .select-option__flag{margin-right:12px}.country-phone-picker .dropdown .select-list .select-option .select-option__name{margin-right:.5rem;max-width:100%;overflow:hidden;text-overflow:ellipsis}.country-phone-picker .dropdown .select-list .select-option .select-option__ddi{color:#697882;font-size:14px;font-family:\"Open Sans\",sans-serif;font-weight:400;line-height:150%}.country-phone-picker .dropdown .select-list .select-option--focused,.country-phone-picker .dropdown .select-list .select-option:hover{background-color:#e5eaea}"]
|
|
4509
|
+
styles: [".country-phone-picker .phone-input{background-color:#fff;border:1px solid #d8d8d8;border-radius:4px;display:-ms-flexbox;display:flex;line-height:normal;overflow:hidden}.country-phone-picker .phone-input .drop{-ms-flex-align:center;align-items:center;cursor:pointer;display:-ms-flexbox;display:flex}.country-phone-picker .phone-input .drop .drop-flag{margin-left:12px}.country-phone-picker .phone-input .drop .drop-icon{font-size:12px;margin:0 8px}.country-phone-picker .phone-input .phone-ddi{margin:8px 0}.country-phone-picker .phone-input input{border:none;-ms-flex-positive:1;flex-grow:1;font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:400;line-height:150%;margin-left:8px}.country-phone-picker .phone-input input:focus{color:#697882;outline:0}.country-phone-picker .dropdown{background-color:#fff;border-radius:4px;box-shadow:0 4px 5px #00000033;padding:4px 0;position:absolute;margin:2px 0;z-index:999999}.country-phone-picker .dropdown .search{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;padding:8px 12px}.country-phone-picker .dropdown .search .search-field{border:1px solid #d8d8d8;border-radius:4px;-ms-flex-positive:1;flex-grow:1;font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:400;height:36px;line-height:150%;padding:0 32px 0 8px}.country-phone-picker .dropdown .search .search-icon{color:#333;font-size:12px;position:relative;right:24px}.country-phone-picker .dropdown .search .search-clear{color:#333;cursor:pointer;font-size:1rem}.country-phone-picker .dropdown .select-list{list-style:none;max-height:234px;min-width:360px;max-width:100vw;overflow:scroll;padding:0}.country-phone-picker .dropdown .select-list .select-option{cursor:pointer;display:-ms-flexbox;display:flex;padding:12px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.country-phone-picker .dropdown .select-list .select-option .select-option__flag{margin-right:12px}.country-phone-picker .dropdown .select-list .select-option .select-option__name{margin-right:.5rem;max-width:100%;overflow:hidden;text-overflow:ellipsis}.country-phone-picker .dropdown .select-list .select-option .select-option__ddi{color:#697882;font-size:14px;font-family:\"Open Sans\",sans-serif;font-weight:400;line-height:150%}.country-phone-picker .dropdown .select-list .select-option--focused,.country-phone-picker .dropdown .select-list .select-option:hover{background-color:#e5eaea}"]
|
|
4510
4510
|
})
|
|
4511
4511
|
], CountryPhonePickerComponent);
|
|
4512
4512
|
return CountryPhonePickerComponent;
|
|
@@ -6382,16 +6382,16 @@
|
|
|
6382
6382
|
ValidateErrors["UNSUPPORTED_EXTENSION"] = "UNSUPPORTED_EXTENSION";
|
|
6383
6383
|
})(exports.ValidateErrors || (exports.ValidateErrors = {}));
|
|
6384
6384
|
|
|
6385
|
-
|
|
6385
|
+
|
|
6386
6386
|
(function (FileUploadPermissions) {
|
|
6387
6387
|
FileUploadPermissions["Add"] = "add";
|
|
6388
6388
|
FileUploadPermissions["Read"] = "read";
|
|
6389
6389
|
FileUploadPermissions["Remove"] = "remove";
|
|
6390
|
-
})(FileUploadPermissions || (FileUploadPermissions = {}));
|
|
6390
|
+
})(exports.FileUploadPermissions || (exports.FileUploadPermissions = {}));
|
|
6391
6391
|
var ALL_PERMISSIONS = [
|
|
6392
|
-
FileUploadPermissions.Add,
|
|
6393
|
-
FileUploadPermissions.Read,
|
|
6394
|
-
FileUploadPermissions.Remove,
|
|
6392
|
+
exports.FileUploadPermissions.Add,
|
|
6393
|
+
exports.FileUploadPermissions.Read,
|
|
6394
|
+
exports.FileUploadPermissions.Remove,
|
|
6395
6395
|
];
|
|
6396
6396
|
|
|
6397
6397
|
var moment$1 = moment_;
|
|
@@ -6400,9 +6400,9 @@
|
|
|
6400
6400
|
this.sanitizer = sanitizer;
|
|
6401
6401
|
this.fileUploadService = fileUploadService;
|
|
6402
6402
|
this.translate = translate;
|
|
6403
|
-
this.ADD_PERMISSION = FileUploadPermissions.Add;
|
|
6404
|
-
this.READ_PERMISSION = FileUploadPermissions.Read;
|
|
6405
|
-
this.REMOVE_PERMISSION = FileUploadPermissions.Remove;
|
|
6403
|
+
this.ADD_PERMISSION = exports.FileUploadPermissions.Add;
|
|
6404
|
+
this.READ_PERMISSION = exports.FileUploadPermissions.Read;
|
|
6405
|
+
this.REMOVE_PERMISSION = exports.FileUploadPermissions.Remove;
|
|
6406
6406
|
this.id = "s-file-upload-" + FileUploadComponent_1.nextId++;
|
|
6407
6407
|
this.supportedExtensions = [];
|
|
6408
6408
|
this.disabled = false;
|
|
@@ -6661,7 +6661,7 @@
|
|
|
6661
6661
|
FileUploadComponent = FileUploadComponent_1 = __decorate([
|
|
6662
6662
|
core.Component({
|
|
6663
6663
|
selector: "s-file-upload",
|
|
6664
|
-
template: "<div\n [id]=\"id\"\n class=\"s-fileupload\">\n <div class=\"s-fileupload-choose\">\n <input\n #inputUpload\n [id]=\"id+'input-upload'\"\n type=\"file\"\n name=\"file\"\n [accept]=\"accept\"\n [multiple]=\"multiple\"\n (change)=\"onFileSelect($event.dataTransfer\n ? $event.dataTransfer.files\n : $event.target.files)\"> \n <s-button\n *ngIf=\"permissions.includes(ADD_PERMISSION)\"\n [id]=\"id + 'upload-button'\"\n [label]=\"chooseLabel || 'platform.angular_components.attach_files' | translate\"\n (onClick)=\"inputUpload.click()\"\n priority=\"primary\"\n [disabled]=\"disabled || !!formGroup?.disabled\"\n [auxiliary]=\"false\">\n </s-button>\n </div>\n\n <section\n *ngIf=\"files.length\" \n [id]=\"id + 'fileupload-list'\"\n class=\"s-fileupload-list\"\n role=\"grid\">\n <ng-container *ngFor=\"let file of files; let i = index\">\n <div\n class=\"s-fileupload-list-file\"\n role=\"row\">\n <div\n [id]=\"id + '-file-' + i + '-name'\"\n class=\"s-fileupload-list-file-name\"\n role=\"gridcell\">\n <ng-container *ngTemplateOutlet=\"permissions.includes(READ_PERMISSION) && file.savedFile || file.progress === 100\n ? descriptionUrl\n : description; context: {\n $implicit: file,\n index: i\n }\">\n </ng-container>\n <span *ngIf=\"modifiedDate\" class=\"s-fileupload-list-file-name-date\">{{ modifiedDate }}</span>\n </div>\n <div\n class=\"s-fileupload-list-file-status\"\n role=\"gridcell\">\n <p-progressBar\n *ngIf=\"file.isUploading && !isSmallDevice\"\n [style]=\"{ 'width': '250px', 'background-color': '#d8d8d8', 'border-radius': '0px', 'height': '14px'}\"\n [value]=\"file.progress\"\n [showValue]=\"false\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelProgress || 'platform.angular_components.loading_file' | translate\">\n </p-progressBar>\n <span\n *ngIf=\"file.isUploading && isSmallDevice\" \n [id]=\"id + '-file-' + i + '-spin'\"\n class=\"fas fa-circle-notch fa-spin\"\n [attr.aria-label]=\"ariaLabelProgress || 'platform.angular_components.loading_file' | translate\">\n </span>\n <span\n *ngIf=\"!file.isUploading && !file.error && file.progress === 100\"\n [id]=\"id + '-file-' + i + '-check'\"\n class=\"fas fa-check\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelSuccess || successTooltip || 'platform.angular_components.file_attached_successfully' | translate\"\n [pTooltip]=\"successTooltip || 'platform.angular_components.file_attached_successfully' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\">\n </span>\n <span\n *ngIf=\"file.error?.message\" \n [id]=\"id + '-file-' + i + '-error'\"\n class=\"fas fa-times\"\n role=\"alert\"\n [pTooltip]=\"file.error?.message\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\">\n </span>\n </div>\n <div\n class=\"s-fileupload-list-file-actions\"\n role=\"gridcell\">\n <a\n *ngIf=\"file.isUploading\"\n [id]=\"id + '-file-' + i + '-cancel'\"\n class=\"s-fileupload-list-file-actions-action\"\n (click)=\"onCancelUpload(i)\">\n {{ cancelLabel || 'platform.angular_components.cancel' | translate }}\n </a>\n <a\n *ngIf=\"permissions.includes(REMOVE_PERMISSION) && !file.isUploading && !(disabled || !!formGroup?.disabled)\"\n role=\"button\"\n tabindex=\"0\"\n [id]=\"id + '-file-' + i + '-remove'\"\n class=\"s-fileupload-list-file-actions-action\"\n (click)=\"onRemoveFile(file)\"\n [attr.aria-label]=\"ariaLabelRemove || removeLabel || 'platform.angular_components.remove' | translate\">\n {{ removeLabel || 'platform.angular_components.remove' | translate }}\n </a>\n </div>\n </div>\n </ng-container>\n </section>\n</div>\n\n<ng-template\n #descriptionUrl\n let-file\n let-i = index>\n <a\n [id]=\"id + '-file-' + i + '-name-link'\"\n tabindex=\"0\"\n (click)=\"onDowloadFile(i)\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\">{{file.name}}\n </a>\n <a\n style=\"display: none;\"\n [href]=\"file.objectURL\"\n target=\"_blank\"\n download\n #anchor>\n </a>\n</ng-template>\n\n<ng-template\n #description\n let-file>\n <span\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\">\n {{file.name}}\n </span>\n</ng-template>\n",
|
|
6664
|
+
template: "<div\n [id]=\"id\"\n class=\"s-fileupload\">\n <div class=\"s-fileupload-choose\">\n <input\n #inputUpload\n [id]=\"id+'input-upload'\"\n type=\"file\"\n name=\"file\"\n [accept]=\"accept\"\n [multiple]=\"multiple\"\n (change)=\"onFileSelect($event.dataTransfer\n ? $event.dataTransfer.files\n : $event.target.files)\"> \n <s-button\n *ngIf=\"permissions.includes(ADD_PERMISSION)\"\n [id]=\"id + 'upload-button'\"\n [label]=\"chooseLabel || 'platform.angular_components.attach_files' | translate\"\n (onClick)=\"inputUpload.click()\"\n priority=\"primary\"\n [disabled]=\"disabled || !!formGroup?.disabled || fileLimit === files?.length\"\n [auxiliary]=\"false\">\n </s-button>\n </div>\n\n <section\n *ngIf=\"files.length\" \n [id]=\"id + 'fileupload-list'\"\n class=\"s-fileupload-list\"\n role=\"grid\">\n <ng-container *ngFor=\"let file of files; let i = index\">\n <div\n class=\"s-fileupload-list-file\"\n role=\"row\">\n <div\n [id]=\"id + '-file-' + i + '-name'\"\n class=\"s-fileupload-list-file-name\"\n role=\"gridcell\">\n <ng-container *ngTemplateOutlet=\"permissions.includes(READ_PERMISSION) && file.savedFile || file.progress === 100\n ? descriptionUrl\n : description; context: {\n $implicit: file,\n index: i\n }\">\n </ng-container>\n <span *ngIf=\"modifiedDate\" class=\"s-fileupload-list-file-name-date\">{{ modifiedDate }}</span>\n </div>\n <div\n class=\"s-fileupload-list-file-status\"\n role=\"gridcell\">\n <p-progressBar\n *ngIf=\"file.isUploading && !isSmallDevice\"\n [style]=\"{ 'width': '250px', 'background-color': '#d8d8d8', 'border-radius': '0px', 'height': '14px'}\"\n [value]=\"file.progress\"\n [showValue]=\"false\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelProgress || 'platform.angular_components.loading_file' | translate\">\n </p-progressBar>\n <span\n *ngIf=\"file.isUploading && isSmallDevice\" \n [id]=\"id + '-file-' + i + '-spin'\"\n class=\"fas fa-circle-notch fa-spin\"\n [attr.aria-label]=\"ariaLabelProgress || 'platform.angular_components.loading_file' | translate\">\n </span>\n <span\n *ngIf=\"!file.isUploading && !file.error && file.progress === 100\"\n [id]=\"id + '-file-' + i + '-check'\"\n class=\"fas fa-check\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelSuccess || successTooltip || 'platform.angular_components.file_attached_successfully' | translate\"\n [pTooltip]=\"successTooltip || 'platform.angular_components.file_attached_successfully' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\">\n </span>\n <span\n *ngIf=\"file.error?.message\" \n [id]=\"id + '-file-' + i + '-error'\"\n class=\"fas fa-times\"\n role=\"alert\"\n [pTooltip]=\"file.error?.message\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\">\n </span>\n </div>\n <div\n class=\"s-fileupload-list-file-actions\"\n role=\"gridcell\">\n <a\n *ngIf=\"file.isUploading\"\n [id]=\"id + '-file-' + i + '-cancel'\"\n class=\"s-fileupload-list-file-actions-action\"\n (click)=\"onCancelUpload(i)\">\n {{ cancelLabel || 'platform.angular_components.cancel' | translate }}\n </a>\n <a\n *ngIf=\"permissions.includes(REMOVE_PERMISSION) && !file.isUploading && !(disabled || !!formGroup?.disabled)\"\n role=\"button\"\n tabindex=\"0\"\n [id]=\"id + '-file-' + i + '-remove'\"\n class=\"s-fileupload-list-file-actions-action\"\n (click)=\"onRemoveFile(file)\"\n [attr.aria-label]=\"ariaLabelRemove || removeLabel || 'platform.angular_components.remove' | translate\">\n {{ removeLabel || 'platform.angular_components.remove' | translate }}\n </a>\n </div>\n </div>\n </ng-container>\n </section>\n</div>\n\n<ng-template\n #descriptionUrl\n let-file\n let-i = index>\n <a\n [id]=\"id + '-file-' + i + '-name-link'\"\n tabindex=\"0\"\n (click)=\"onDowloadFile(i)\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\">{{file.name}}\n </a>\n <a\n style=\"display: none;\"\n [href]=\"file.objectURL\"\n target=\"_blank\"\n download\n #anchor>\n </a>\n</ng-template>\n\n<ng-template\n #description\n let-file>\n <span\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\">\n {{file.name}}\n </span>\n</ng-template>\n",
|
|
6665
6665
|
styles: [".s-fileupload .s-fileupload-choose{position:relative;margin:15px 0;width:-webkit-max-content;width:max-content}.s-fileupload input[type=file]{display:none}.s-fileupload-list{border:1px solid #ccc}.s-fileupload-list-file:not(:first-child){border-top:1px solid #ccc}.s-fileupload-list .s-fileupload-list-file{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;justify-content:space-between;padding:15px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-item-align:center;align-self:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name .s-fileupload-list-file-name-date{font-size:.75rem;color:#999}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name>a{cursor:pointer;text-decoration:none}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-status{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.s-fileupload-list .s-fileupload-list-file .fas.fa-circle-notch{color:#d8d8d8;font-size:12px}.s-fileupload-list .s-fileupload-list-file .fas.fa-check{color:#0c9348;font-size:12px}.s-fileupload-list .s-fileupload-list-file .fas.fa-times{color:#c13018;font-size:12px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions{margin-top:15px;-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;width:100%}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action{text-decoration:none;color:#428bca}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action :focus,.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action :visited,.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action:hover{text-decoration:none}@media (min-width:768px){.s-fileupload-list .s-fileupload-list-file{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{width:auto;-ms-flex-positive:2;flex-grow:2}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-status{margin:0 15px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions{margin:0;width:auto}}"]
|
|
6666
6666
|
})
|
|
6667
6667
|
], FileUploadComponent);
|
|
@@ -9942,7 +9942,7 @@
|
|
|
9942
9942
|
core.Component({
|
|
9943
9943
|
template: "<div class=\"password-field\" [ngClass]=\"{ 'password-field--toggle': field.showToggle }\">\n <input\n [type]=\"passwordVisible ? 'text' : 'password'\"\n [id]=\"field.id || field.name\"\n class=\"password-input\"\n [name]=\"field.name\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n [maxLength]=\"field.maxLength\"\n pInputText\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"onFocus.next($event)\"\n (input)=\"onInput.next($event)\"\n [formControl]=\"formControl\"\n [ngStyle]=\"field.style\"\n [sPasswordStrength]=\"field.passwordStrength\"\n [psDescription]=\"field.passwordStrengthOptions?.description\"\n [psWeakTitle]=\"field.passwordStrengthOptions?.weakTitle\"\n [psMediumTitle]=\"field.passwordStrengthOptions?.mediumTitle\"\n [psStrongTitle]=\"field.passwordStrengthOptions?.strongTitle\"\n [psValidation]=\"field.passwordStrengthOptions?.validation\"\n />\n <span *ngIf=\"field.showToggle\" class=\"toggle-button\">\n <s-button\n [iconClass]=\"passwordVisible ? 'fas fa-eye-slash' : 'fas fa-eye'\"\n priority=\"default\"\n (onClick)=\"onChangeVisible()\">\n </s-button>\n </span>\n</div>\n",
|
|
9944
9944
|
encapsulation: core.ViewEncapsulation.None,
|
|
9945
|
-
styles: ["s-text-field.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-text-field.ng-dirty.ng-invalid .ui-inputtext:hover{border-color:#e44328}.password-field{display:-ms-flexbox;display:flex}.password-field--toggle .password-input{border-top-right-radius:0;border-bottom-right-radius:0}.password-field--toggle .toggle-button s-button button{border-bottom-left-radius:0;border-top-left-radius:0}"]
|
|
9945
|
+
styles: ["s-text-field.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-text-field.ng-dirty.ng-invalid .ui-inputtext:hover{border-color:#e44328}.password-field{display:-ms-flexbox;display:flex}.password-field--toggle .password-input{border-top-right-radius:0;border-bottom-right-radius:0;border-right:none}.password-field--toggle .toggle-button s-button button{border-bottom-left-radius:0;border-top-left-radius:0}"]
|
|
9946
9946
|
})
|
|
9947
9947
|
], PasswordFieldComponent);
|
|
9948
9948
|
return PasswordFieldComponent;
|
|
@@ -10044,10 +10044,29 @@
|
|
|
10044
10044
|
component.instance.field = this.field;
|
|
10045
10045
|
// Must be this way because some teams use name like "e070emp.codemp"
|
|
10046
10046
|
component.instance.formControl = this.group["controls"][this.field.name];
|
|
10047
|
+
this._switchEmptyStringToNull(component);
|
|
10047
10048
|
component.instance.errorMessages = this.errorMessages;
|
|
10048
10049
|
this.setVariablesByType(component);
|
|
10049
10050
|
return component;
|
|
10050
10051
|
};
|
|
10052
|
+
DynamicField.prototype._switchEmptyStringToNull = function (component) {
|
|
10053
|
+
switch (component.instance.field.type) {
|
|
10054
|
+
case exports.FieldType.Password:
|
|
10055
|
+
case exports.FieldType.String:
|
|
10056
|
+
case exports.FieldType.Text:
|
|
10057
|
+
case exports.FieldType.TextIA:
|
|
10058
|
+
var valueChanges$_1 = component.instance.formControl.valueChanges
|
|
10059
|
+
.subscribe(function (value) {
|
|
10060
|
+
if (value === "") {
|
|
10061
|
+
component.instance.formControl.setValue(null, { emitEvent: false });
|
|
10062
|
+
}
|
|
10063
|
+
});
|
|
10064
|
+
component.onDestroy(function () {
|
|
10065
|
+
valueChanges$_1.unsubscribe();
|
|
10066
|
+
});
|
|
10067
|
+
return;
|
|
10068
|
+
}
|
|
10069
|
+
};
|
|
10051
10070
|
DynamicField.prototype.setVariablesByType = function (component) {
|
|
10052
10071
|
if (this.field.type == exports.FieldType.Time) {
|
|
10053
10072
|
component.instance.timeOnly = true;
|
|
@@ -10229,6 +10248,9 @@
|
|
|
10229
10248
|
this.component.instance.errorMessages = this.errorMessages;
|
|
10230
10249
|
}
|
|
10231
10250
|
};
|
|
10251
|
+
DynamicFormDirective.prototype.ngOnDestroy = function () {
|
|
10252
|
+
this.component.destroy();
|
|
10253
|
+
};
|
|
10232
10254
|
DynamicFormDirective.prototype.isField = function () {
|
|
10233
10255
|
return exports.FieldType[this.config.type];
|
|
10234
10256
|
};
|
|
@@ -10924,17 +10946,25 @@
|
|
|
10924
10946
|
this.translateService = translateService;
|
|
10925
10947
|
this.aspectRatio = 1;
|
|
10926
10948
|
this.supportedExtensions = [];
|
|
10927
|
-
|
|
10949
|
+
/**
|
|
10950
|
+
* @deprecated Use imageChange instead.
|
|
10951
|
+
*/
|
|
10928
10952
|
this.changedImage = new core.EventEmitter();
|
|
10953
|
+
this.imageChange = new core.EventEmitter();
|
|
10929
10954
|
this.removedImage = new core.EventEmitter();
|
|
10930
10955
|
this.invalidFile = new core.EventEmitter();
|
|
10931
10956
|
}
|
|
10932
10957
|
ProfilePicturePickerComponent_1 = ProfilePicturePickerComponent;
|
|
10958
|
+
Object.defineProperty(ProfilePicturePickerComponent.prototype, "imageBase64", {
|
|
10959
|
+
get: function () {
|
|
10960
|
+
var _a;
|
|
10961
|
+
return typeof this.image === "string" ? this.image : (_a = this.image) === null || _a === void 0 ? void 0 : _a.base64;
|
|
10962
|
+
},
|
|
10963
|
+
enumerable: true,
|
|
10964
|
+
configurable: true
|
|
10965
|
+
});
|
|
10933
10966
|
ProfilePicturePickerComponent.prototype.writeValue = function (value) {
|
|
10934
|
-
this.
|
|
10935
|
-
if (value) {
|
|
10936
|
-
this.image = value.base64;
|
|
10937
|
-
}
|
|
10967
|
+
this.image = value;
|
|
10938
10968
|
};
|
|
10939
10969
|
ProfilePicturePickerComponent.prototype.registerOnChange = function (onChange) {
|
|
10940
10970
|
this._onChange = onChange;
|
|
@@ -11017,12 +11047,19 @@
|
|
|
11017
11047
|
fileReader.onloadend = function (fileEvent) {
|
|
11018
11048
|
_this.imageCropperService.show(__assign({ imageSource: fileEvent.target.result, croppedImage: function (image) {
|
|
11019
11049
|
var _a;
|
|
11020
|
-
var data = { source: file, base64: image };
|
|
11021
|
-
_this.image = image;
|
|
11022
|
-
_this.imageChange.emit(data);
|
|
11023
11050
|
_this.changedImage.emit(image);
|
|
11024
|
-
|
|
11025
|
-
|
|
11051
|
+
var data = { source: file, base64: image };
|
|
11052
|
+
// Se o tipo do image for string eu preciso atualizar e mandar para o imageChange uma string.
|
|
11053
|
+
// Se for ProfilePicturePickerData eu preciso mandar o data completo.
|
|
11054
|
+
if (typeof _this.image === "string") {
|
|
11055
|
+
_this.image = image;
|
|
11056
|
+
_this.imageChange.emit(image);
|
|
11057
|
+
}
|
|
11058
|
+
else {
|
|
11059
|
+
_this.image = data;
|
|
11060
|
+
_this.imageChange.emit(data);
|
|
11061
|
+
}
|
|
11062
|
+
(_a = _this._onChange) === null || _a === void 0 ? void 0 : _a.call(_this, _this.image);
|
|
11026
11063
|
}, changeImage: function () { return _this.selectPhoto(); }, allowSelectAnother: false, aspectRatio: _this.aspectRatio }, _this.cropperLabelsConfig));
|
|
11027
11064
|
};
|
|
11028
11065
|
};
|
|
@@ -11127,10 +11164,10 @@
|
|
|
11127
11164
|
], ProfilePicturePickerComponent.prototype, "fileInput", void 0);
|
|
11128
11165
|
__decorate([
|
|
11129
11166
|
core.Output()
|
|
11130
|
-
], ProfilePicturePickerComponent.prototype, "
|
|
11167
|
+
], ProfilePicturePickerComponent.prototype, "changedImage", void 0);
|
|
11131
11168
|
__decorate([
|
|
11132
11169
|
core.Output()
|
|
11133
|
-
], ProfilePicturePickerComponent.prototype, "
|
|
11170
|
+
], ProfilePicturePickerComponent.prototype, "imageChange", void 0);
|
|
11134
11171
|
__decorate([
|
|
11135
11172
|
core.Output()
|
|
11136
11173
|
], ProfilePicturePickerComponent.prototype, "removedImage", void 0);
|
|
@@ -11152,7 +11189,7 @@
|
|
|
11152
11189
|
ProfilePicturePickerComponent = ProfilePicturePickerComponent_1 = __decorate([
|
|
11153
11190
|
core.Component({
|
|
11154
11191
|
selector: "s-profile-picture-picker",
|
|
11155
|
-
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]=\"
|
|
11192
|
+
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]=\"imageBase64\"\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>",
|
|
11156
11193
|
providers: [{
|
|
11157
11194
|
provide: forms.NG_VALUE_ACCESSOR,
|
|
11158
11195
|
useExisting: core.forwardRef(function () { return ProfilePicturePickerComponent_1; }),
|