@seniorsistemas/angular-components 18.0.0 → 18.0.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/badge/lib/badge/badge.component.d.ts +2 -1
- package/badge/lib/badge/badge.module.d.ts +3 -1
- package/esm2022/badge/lib/badge/badge.component.mjs +6 -4
- package/esm2022/badge/lib/badge/badge.module.mjs +6 -4
- package/esm2022/button/lib/button/button.component.mjs +2 -2
- package/esm2022/custom-fields/lib/custom-fields/custom-fields.component.mjs +10 -15
- package/esm2022/dynamic-form/lib/dynamic-form/components/lookup/lookup.component.mjs +2 -2
- package/esm2022/file-upload/lib/file-upload/file-upload.component.mjs +23 -6
- package/esm2022/file-upload/lib/file-upload/file-upload.module.mjs +7 -3
- package/esm2022/ia-insight/lib/ia-insight/components/ia-insight-card/ia-insight-card.component.mjs +1 -1
- package/esm2022/kanban/lib/kanban/components/kanban-item-dragging/kanban-item-dragging.component.mjs +1 -1
- package/esm2022/label-value/lib/label-value/label-value.component.mjs +1 -1
- package/esm2022/locale/lib/locale/locale.service.mjs +43 -20
- package/esm2022/locale/lib/locale/options/index.mjs +7 -6
- package/esm2022/locale/lib/locale/pipes/localized-date.pipe.mjs +1 -1
- package/esm2022/locale/lib/locale/pipes/localized-time.pipe.mjs +7 -7
- package/esm2022/numeric-mask/lib/numeric-mask/numeric-mask.directive.mjs +579 -0
- package/esm2022/numeric-mask/lib/numeric-mask/numeric-mask.module.mjs +16 -0
- package/esm2022/numeric-mask/public-api.mjs +3 -0
- package/esm2022/numeric-mask/seniorsistemas-angular-components-numeric-mask.mjs +5 -0
- package/esm2022/object-card/lib/object-card/elements/field/object-card-field.component.mjs +7 -4
- package/esm2022/object-card/lib/object-card/object-card.module.mjs +5 -4
- package/esm2022/table/lib/table/table-column/table-columns.component.mjs +1 -1
- package/esm2022/tooltip/lib/tooltip/tooltip.directive.mjs +26 -20
- package/fesm2022/seniorsistemas-angular-components-badge.mjs +10 -6
- package/fesm2022/seniorsistemas-angular-components-badge.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-button.mjs +1 -1
- package/fesm2022/seniorsistemas-angular-components-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-custom-fields.mjs +9 -14
- package/fesm2022/seniorsistemas-angular-components-custom-fields.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs +1 -1
- package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-file-upload.mjs +27 -6
- package/fesm2022/seniorsistemas-angular-components-file-upload.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-ia-insight.mjs +1 -1
- package/fesm2022/seniorsistemas-angular-components-ia-insight.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-kanban.mjs +1 -1
- package/fesm2022/seniorsistemas-angular-components-kanban.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-label-value.mjs +1 -1
- package/fesm2022/seniorsistemas-angular-components-label-value.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-locale.mjs +41 -17
- package/fesm2022/seniorsistemas-angular-components-locale.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-numeric-mask.mjs +599 -0
- package/fesm2022/seniorsistemas-angular-components-numeric-mask.mjs.map +1 -0
- package/fesm2022/seniorsistemas-angular-components-object-card.mjs +10 -6
- package/fesm2022/seniorsistemas-angular-components-object-card.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-table.mjs +1 -1
- package/fesm2022/seniorsistemas-angular-components-table.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-tooltip.mjs +23 -17
- package/fesm2022/seniorsistemas-angular-components-tooltip.mjs.map +1 -1
- package/file-upload/lib/file-upload/file-upload.component.d.ts +1 -0
- package/file-upload/lib/file-upload/file-upload.module.d.ts +2 -1
- package/locale/lib/locale/locale.service.d.ts +14 -4
- package/locale/lib/locale/options/index.d.ts +6 -5
- package/locale/lib/locale/pipes/localized-time.pipe.d.ts +2 -2
- package/numeric-mask/README.md +367 -0
- package/numeric-mask/index.d.ts +5 -0
- package/numeric-mask/lib/numeric-mask/numeric-mask.directive.d.ts +195 -0
- package/numeric-mask/lib/numeric-mask/numeric-mask.module.d.ts +7 -0
- package/numeric-mask/public-api.d.ts +2 -0
- package/object-card/lib/object-card/elements/field/object-card-field.component.d.ts +4 -1
- package/object-card/lib/object-card/object-card.module.d.ts +2 -1
- package/package.json +7 -1
|
@@ -15,6 +15,7 @@ import * as i6 from 'primeng/tooltip';
|
|
|
15
15
|
import { TooltipModule } from 'primeng/tooltip';
|
|
16
16
|
import * as i7 from 'primeng/progressbar';
|
|
17
17
|
import { ProgressBarModule } from 'primeng/progressbar';
|
|
18
|
+
import { LocaleModule } from '@seniorsistemas/angular-components/locale';
|
|
18
19
|
|
|
19
20
|
const ALL_PERMISSIONS = ['add', 'read', 'remove'];
|
|
20
21
|
|
|
@@ -177,6 +178,15 @@ class FileUploadComponent {
|
|
|
177
178
|
get files() {
|
|
178
179
|
return this._files;
|
|
179
180
|
}
|
|
181
|
+
formatFileSize(size) {
|
|
182
|
+
if (size === 0) {
|
|
183
|
+
return '0 Bytes';
|
|
184
|
+
}
|
|
185
|
+
const k = 1024;
|
|
186
|
+
const sizes = ['bytes', 'KB', 'MB', 'GB', 'TB'];
|
|
187
|
+
const i = Math.floor(Math.log(size) / Math.log(k));
|
|
188
|
+
return parseFloat((size / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
|
|
189
|
+
}
|
|
180
190
|
update() {
|
|
181
191
|
const windowWidth = window.innerWidth;
|
|
182
192
|
this.isSmallDevice = windowWidth <= Breakpoints.SM_MAX;
|
|
@@ -217,7 +227,9 @@ class FileUploadComponent {
|
|
|
217
227
|
if (!blobFile) {
|
|
218
228
|
return;
|
|
219
229
|
}
|
|
220
|
-
this.fileUploadService
|
|
230
|
+
this.fileUploadService
|
|
231
|
+
.getMetadataCustomField({ objectId: blobFile[0].objectId ?? '' })
|
|
232
|
+
.then((metadata) => this.setModifiedDate(metadata));
|
|
221
233
|
}
|
|
222
234
|
setModifiedDate(metadata) {
|
|
223
235
|
const hour = moment(metadata.modified).format('HH');
|
|
@@ -225,14 +237,20 @@ class FileUploadComponent {
|
|
|
225
237
|
const day = moment(metadata.modified).format('DD');
|
|
226
238
|
const month = moment(metadata.modified).format('MM');
|
|
227
239
|
const fullYear = moment(metadata.modified).format('YYYY');
|
|
228
|
-
this.modifiedDate = this.translate.instant('platform.angular_components.date_modified_custom_blob', {
|
|
240
|
+
this.modifiedDate = this.translate.instant('platform.angular_components.date_modified_custom_blob', {
|
|
241
|
+
hour,
|
|
242
|
+
minutes,
|
|
243
|
+
day,
|
|
244
|
+
month,
|
|
245
|
+
fullYear,
|
|
246
|
+
});
|
|
229
247
|
}
|
|
230
248
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileUploadComponent, deps: [{ token: i1.DomSanitizer }, { token: FileUploadService }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
231
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FileUploadComponent, selector: "s-file-upload", inputs: { id: "id", chooseLabel: "chooseLabel", removeLabel: "removeLabel", cancelLabel: "cancelLabel", successTooltip: "successTooltip", multiple: "multiple", accept: "accept", supportedExtensions: "supportedExtensions", ariaLabelFileName: "ariaLabelFileName", maxFileSize: "maxFileSize", maxCombinedFileSize: "maxCombinedFileSize", fileLimit: "fileLimit", ariaLabelProgress: "ariaLabelProgress", ariaLabelSuccess: "ariaLabelSuccess", ariaLabelError: "ariaLabelError", ariaLabelRemove: "ariaLabelRemove", formGroup: "formGroup", disabled: "disabled", showFileUploadDate: "showFileUploadDate", permissions: "permissions", files: "files" }, outputs: { uploadHandler: "uploadHandler", removeFile: "removeFile", cancelUpload: "cancelUpload", downloadFile: "downloadFile", validateErrors: "validateErrors" }, host: { listeners: { "window:resize": "onResize()" } }, viewQueries: [{ propertyName: "inputUpload", first: true, predicate: ["inputUpload"], descendants: true }, { propertyName: "anchor", first: true, predicate: ["anchor"], descendants: true }], ngImport: i0, template: "<div\n [id]=\"id\"\n class=\"s-fileupload\"\n>\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)=\"_onInputFileSelect($event)\"\n />\n <s-button\n *ngIf=\"permissions.includes(ADD_PERMISSION)\"\n [id]=\"id + 'upload-button'\"\n [label]=\"chooseLabel || 'platform.angular_components.attach_files' | translate\"\n (clicked)=\"inputUpload.click()\"\n priority=\"primary\"\n [disabled]=\"disabled || !!formGroup?.disabled || fileLimit === files.length\"\n [auxiliary]=\"false\"\n >\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 >\n <ng-container *ngFor=\"let file of files; let i = index\">\n <div\n class=\"s-fileupload-list-file\"\n role=\"row\"\n >\n <div\n [id]=\"id + '-file-' + i + '-name'\"\n class=\"s-fileupload-list-file-name\"\n role=\"gridcell\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n (permissions.includes(READ_PERMISSION) && file.savedFile) || file.progress === 100\n ? descriptionUrl\n : description;\n context: {\n $implicit: file,\n index: i,\n }\n \"\n >\n </ng-container>\n <span\n *ngIf=\"modifiedDate\"\n class=\"s-fileupload-list-file-name-date\"\n >{{ modifiedDate }}</span\n >\n </div>\n <div\n class=\"s-fileupload-list-file-status\"\n role=\"gridcell\"\n >\n <p-progressBar\n *ngIf=\"file.isUploading && !isSmallDevice\"\n [style]=\"{\n width: '250px',\n 'background-color': '#d8d8d8',\n 'border-radius': '0px',\n height: '14px',\n }\"\n [value]=\"file.progress\"\n [showValue]=\"false\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelProgress || 'platform.angular_components.loading_file' | translate\"\n >\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 >\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]=\"\n ariaLabelSuccess ||\n successTooltip ||\n 'platform.angular_components.file_attached_successfully' | translate\n \"\n [pTooltip]=\"\n successTooltip || 'platform.angular_components.file_attached_successfully' | translate\n \"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\"\n >\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 >\n </span>\n </div>\n <div\n class=\"s-fileupload-list-file-actions\"\n role=\"gridcell\"\n >\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 >\n {{ cancelLabel || 'platform.angular_components.cancel' | translate }}\n </a>\n <a\n *ngIf=\"\n permissions.includes(REMOVE_PERMISSION) &&\n !file.isUploading &&\n !(disabled || !!formGroup?.disabled)\n \"\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]=\"\n ariaLabelRemove || removeLabel || 'platform.angular_components.remove' | translate\n \"\n >\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>\n <a\n [id]=\"id + '-file-' + i + '-name-link'\"\n tabindex=\"0\"\n (click)=\"onDowloadFile(i)\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\"\n >{{ file.name }}\n </a>\n <a\n style=\"display: none\"\n [href]=\"file.objectURL\"\n target=\"_blank\"\n download\n #anchor\n >\n </a>\n</ng-template>\n\n<ng-template\n #description\n let-file\n>\n <span\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\"\n >\n {{ file.name }}\n </span>\n</ng-template>\n", styles: [".s-fileupload .s-fileupload-choose{position:relative;margin:15px 0;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:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;padding:15px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{display:flex;flex-direction:column;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{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;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:hover,.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{text-decoration:none}@media (min-width: 768px){.s-fileupload-list .s-fileupload-list-file{flex-wrap:nowrap}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{width:auto;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}}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i5.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: i7.ProgressBar, selector: "p-progressBar, p-progressbar, p-progress-bar", inputs: ["value", "showValue", "styleClass", "valueStyleClass", "style", "unit", "mode", "color"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] });
|
|
249
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FileUploadComponent, selector: "s-file-upload", inputs: { id: "id", chooseLabel: "chooseLabel", removeLabel: "removeLabel", cancelLabel: "cancelLabel", successTooltip: "successTooltip", multiple: "multiple", accept: "accept", supportedExtensions: "supportedExtensions", ariaLabelFileName: "ariaLabelFileName", maxFileSize: "maxFileSize", maxCombinedFileSize: "maxCombinedFileSize", fileLimit: "fileLimit", ariaLabelProgress: "ariaLabelProgress", ariaLabelSuccess: "ariaLabelSuccess", ariaLabelError: "ariaLabelError", ariaLabelRemove: "ariaLabelRemove", formGroup: "formGroup", disabled: "disabled", showFileUploadDate: "showFileUploadDate", permissions: "permissions", files: "files" }, outputs: { uploadHandler: "uploadHandler", removeFile: "removeFile", cancelUpload: "cancelUpload", downloadFile: "downloadFile", validateErrors: "validateErrors" }, host: { listeners: { "window:resize": "onResize()" } }, viewQueries: [{ propertyName: "inputUpload", first: true, predicate: ["inputUpload"], descendants: true }, { propertyName: "anchor", first: true, predicate: ["anchor"], descendants: true }], ngImport: i0, template: "<div\n [id]=\"id\"\n class=\"s-fileupload\"\n>\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)=\"_onInputFileSelect($event)\"\n />\n <s-button\n *ngIf=\"permissions.includes(ADD_PERMISSION)\"\n [id]=\"id + 'upload-button'\"\n [label]=\"chooseLabel || 'platform.angular_components.attach_files' | translate\"\n (clicked)=\"inputUpload.click()\"\n priority=\"primary\"\n [disabled]=\"disabled || !!formGroup?.disabled || fileLimit === files.length\"\n [auxiliary]=\"false\"\n >\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 >\n <ng-container *ngFor=\"let file of files; let i = index\">\n <div\n class=\"s-fileupload-list-file\"\n role=\"row\"\n >\n <div\n [id]=\"id + '-file-' + i + '-name'\"\n class=\"flex flex-grow items-center justify-between overflow-hidden text-ellipsis text-nowrap\"\n role=\"gridcell\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n (permissions.includes(READ_PERMISSION) && file.savedFile) || file.progress === 100\n ? descriptionUrl\n : description;\n context: {\n $implicit: file,\n index: i,\n }\n \"\n >\n </ng-container>\n\n <span>{{ formatFileSize(file.size) }}</span>\n\n <span\n *ngIf=\"modifiedDate\"\n class=\"s-fileupload-list-file-name-date\"\n >{{ modifiedDate }}</span\n >\n </div>\n <div\n class=\"s-fileupload-list-file-status\"\n role=\"gridcell\"\n >\n <p-progressBar\n *ngIf=\"file.isUploading && !isSmallDevice\"\n [style]=\"{\n width: '250px',\n 'background-color': '#d8d8d8',\n 'border-radius': '0px',\n height: '14px',\n }\"\n [value]=\"file.progress\"\n [showValue]=\"false\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelProgress || 'platform.angular_components.loading_file' | translate\"\n >\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 >\n </span>\n\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]=\"\n ariaLabelSuccess ||\n successTooltip ||\n 'platform.angular_components.file_attached_successfully' | translate\n \"\n [pTooltip]=\"\n successTooltip || 'platform.angular_components.file_attached_successfully' | translate\n \"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\"\n >\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 >\n </span>\n </div>\n <div\n class=\"s-fileupload-list-file-actions\"\n role=\"gridcell\"\n >\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 >\n {{ cancelLabel || 'platform.angular_components.cancel' | translate }}\n </a>\n <a\n *ngIf=\"\n permissions.includes(REMOVE_PERMISSION) &&\n !file.isUploading &&\n !(disabled || !!formGroup?.disabled)\n \"\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]=\"\n ariaLabelRemove || removeLabel || 'platform.angular_components.remove' | translate\n \"\n >\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>\n <div class=\"flex justify-between\">\n <div>\n <a\n [id]=\"id + '-file-' + i + '-name-link'\"\n tabindex=\"0\"\n (click)=\"onDowloadFile(i)\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\"\n class=\"break-words\"\n >{{ file.name }}\n </a>\n <a\n style=\"display: none\"\n [href]=\"file.objectURL\"\n target=\"_blank\"\n download\n #anchor\n >\n </a>\n </div>\n </div>\n</ng-template>\n\n<ng-template\n #description\n let-file\n>\n <div class=\"flex justify-between\">\n <span\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\"\n >\n {{ file.name }}\n </span>\n </div>\n</ng-template>\n\n", styles: [".s-fileupload .s-fileupload-choose{position:relative;margin:15px 0;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:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;padding:15px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{display:flex;flex-direction:column;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{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;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:hover,.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{text-decoration:none}@media (min-width: 768px){.s-fileupload-list .s-fileupload-list-file{flex-wrap:nowrap}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{width:auto;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}}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i5.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: i7.ProgressBar, selector: "p-progressBar, p-progressbar, p-progress-bar", inputs: ["value", "showValue", "styleClass", "valueStyleClass", "style", "unit", "mode", "color"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] });
|
|
232
250
|
}
|
|
233
251
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileUploadComponent, decorators: [{
|
|
234
252
|
type: Component,
|
|
235
|
-
args: [{ selector: 's-file-upload', template: "<div\n [id]=\"id\"\n class=\"s-fileupload\"\n>\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)=\"_onInputFileSelect($event)\"\n />\n <s-button\n *ngIf=\"permissions.includes(ADD_PERMISSION)\"\n [id]=\"id + 'upload-button'\"\n [label]=\"chooseLabel || 'platform.angular_components.attach_files' | translate\"\n (clicked)=\"inputUpload.click()\"\n priority=\"primary\"\n [disabled]=\"disabled || !!formGroup?.disabled || fileLimit === files.length\"\n [auxiliary]=\"false\"\n >\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 >\n <ng-container *ngFor=\"let file of files; let i = index\">\n <div\n class=\"s-fileupload-list-file\"\n role=\"row\"\n >\n <div\n [id]=\"id + '-file-' + i + '-name'\"\n class=\"
|
|
253
|
+
args: [{ selector: 's-file-upload', template: "<div\n [id]=\"id\"\n class=\"s-fileupload\"\n>\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)=\"_onInputFileSelect($event)\"\n />\n <s-button\n *ngIf=\"permissions.includes(ADD_PERMISSION)\"\n [id]=\"id + 'upload-button'\"\n [label]=\"chooseLabel || 'platform.angular_components.attach_files' | translate\"\n (clicked)=\"inputUpload.click()\"\n priority=\"primary\"\n [disabled]=\"disabled || !!formGroup?.disabled || fileLimit === files.length\"\n [auxiliary]=\"false\"\n >\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 >\n <ng-container *ngFor=\"let file of files; let i = index\">\n <div\n class=\"s-fileupload-list-file\"\n role=\"row\"\n >\n <div\n [id]=\"id + '-file-' + i + '-name'\"\n class=\"flex flex-grow items-center justify-between overflow-hidden text-ellipsis text-nowrap\"\n role=\"gridcell\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n (permissions.includes(READ_PERMISSION) && file.savedFile) || file.progress === 100\n ? descriptionUrl\n : description;\n context: {\n $implicit: file,\n index: i,\n }\n \"\n >\n </ng-container>\n\n <span>{{ formatFileSize(file.size) }}</span>\n\n <span\n *ngIf=\"modifiedDate\"\n class=\"s-fileupload-list-file-name-date\"\n >{{ modifiedDate }}</span\n >\n </div>\n <div\n class=\"s-fileupload-list-file-status\"\n role=\"gridcell\"\n >\n <p-progressBar\n *ngIf=\"file.isUploading && !isSmallDevice\"\n [style]=\"{\n width: '250px',\n 'background-color': '#d8d8d8',\n 'border-radius': '0px',\n height: '14px',\n }\"\n [value]=\"file.progress\"\n [showValue]=\"false\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelProgress || 'platform.angular_components.loading_file' | translate\"\n >\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 >\n </span>\n\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]=\"\n ariaLabelSuccess ||\n successTooltip ||\n 'platform.angular_components.file_attached_successfully' | translate\n \"\n [pTooltip]=\"\n successTooltip || 'platform.angular_components.file_attached_successfully' | translate\n \"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\"\n >\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 >\n </span>\n </div>\n <div\n class=\"s-fileupload-list-file-actions\"\n role=\"gridcell\"\n >\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 >\n {{ cancelLabel || 'platform.angular_components.cancel' | translate }}\n </a>\n <a\n *ngIf=\"\n permissions.includes(REMOVE_PERMISSION) &&\n !file.isUploading &&\n !(disabled || !!formGroup?.disabled)\n \"\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]=\"\n ariaLabelRemove || removeLabel || 'platform.angular_components.remove' | translate\n \"\n >\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>\n <div class=\"flex justify-between\">\n <div>\n <a\n [id]=\"id + '-file-' + i + '-name-link'\"\n tabindex=\"0\"\n (click)=\"onDowloadFile(i)\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\"\n class=\"break-words\"\n >{{ file.name }}\n </a>\n <a\n style=\"display: none\"\n [href]=\"file.objectURL\"\n target=\"_blank\"\n download\n #anchor\n >\n </a>\n </div>\n </div>\n</ng-template>\n\n<ng-template\n #description\n let-file\n>\n <div class=\"flex justify-between\">\n <span\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\"\n >\n {{ file.name }}\n </span>\n </div>\n</ng-template>\n\n", styles: [".s-fileupload .s-fileupload-choose{position:relative;margin:15px 0;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:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;padding:15px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{display:flex;flex-direction:column;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{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;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:hover,.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{text-decoration:none}@media (min-width: 768px){.s-fileupload-list .s-fileupload-list-file{flex-wrap:nowrap}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{width:auto;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}}\n"] }]
|
|
236
254
|
}], ctorParameters: () => [{ type: i1.DomSanitizer }, { type: FileUploadService }, { type: i3.TranslateService }], propDecorators: { inputUpload: [{
|
|
237
255
|
type: ViewChild,
|
|
238
256
|
args: ['inputUpload', { static: false }]
|
|
@@ -302,12 +320,14 @@ class FileUploadModule {
|
|
|
302
320
|
ButtonModule,
|
|
303
321
|
TooltipModule,
|
|
304
322
|
ProgressBarModule,
|
|
305
|
-
TranslateModule
|
|
323
|
+
TranslateModule,
|
|
324
|
+
LocaleModule], exports: [FileUploadComponent] });
|
|
306
325
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileUploadModule, providers: [FileUploadService], imports: [CommonModule,
|
|
307
326
|
ButtonModule,
|
|
308
327
|
TooltipModule,
|
|
309
328
|
ProgressBarModule,
|
|
310
|
-
TranslateModule
|
|
329
|
+
TranslateModule,
|
|
330
|
+
LocaleModule] });
|
|
311
331
|
}
|
|
312
332
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileUploadModule, decorators: [{
|
|
313
333
|
type: NgModule,
|
|
@@ -319,6 +339,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
319
339
|
TooltipModule,
|
|
320
340
|
ProgressBarModule,
|
|
321
341
|
TranslateModule,
|
|
342
|
+
LocaleModule,
|
|
322
343
|
],
|
|
323
344
|
providers: [FileUploadService],
|
|
324
345
|
exports: [FileUploadComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seniorsistemas-angular-components-file-upload.mjs","sources":["../../projects/angular-components/file-upload/src/lib/file-upload/models/file-upload-permissions.ts","../../projects/angular-components/file-upload/src/lib/file-upload/file-upload.service.ts","../../projects/angular-components/file-upload/src/lib/file-upload/file-upload.component.ts","../../projects/angular-components/file-upload/src/lib/file-upload/file-upload.component.html","../../projects/angular-components/file-upload/src/lib/file-upload/file-upload.module.ts","../../projects/angular-components/file-upload/src/seniorsistemas-angular-components-file-upload.ts"],"sourcesContent":["export type FileUploadPermissions = 'add' | 'read' | 'remove';\n\nexport const ALL_PERMISSIONS: FileUploadPermissions[] = ['add', 'read', 'remove'];\n","import { Injectable } from '@angular/core';\nimport { ListBlobMetadataRequest, ListBlobMetadataResponse } from './models/list-blob-metadata';\nimport { CustomHttpClient } from '@seniorsistemas/angular-components/common';\n\n@Injectable()\nexport class FileUploadService {\n private BASE_URL_FIELD_CUSTOMIZATION = 'platform/field_customization';\n private TOKEN = new AbortController();\n\n public async getMetadataCustomField<T>(request: ListBlobMetadataRequest): Promise<ListBlobMetadataResponse> {\n return CustomHttpClient.post(`${this.BASE_URL_FIELD_CUSTOMIZATION}/queries/getFileMetadata`, request, {\n signal: this.TOKEN.signal,\n });\n }\n}\n","import { AfterContentInit, Component, ElementRef, EventEmitter, HostListener, Input, OnDestroy, OnInit, Output, ViewChild } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { DomSanitizer } from '@angular/platform-browser';\n\nimport { TranslateService } from '@ngx-translate/core';\nimport { Subject } from 'rxjs';\nimport moment from 'moment';\nimport { FileUploadService } from './file-upload.service';\nimport { ListBlobMetadataResponse } from './models/list-blob-metadata';\nimport { FileDto } from './models/file-dto';\nimport { UploadError } from './models/uploadError';\nimport { FileUploadPermissions, ALL_PERMISSIONS } from './models/file-upload-permissions';\nimport { Breakpoints, isNullOrUndefined } from '@seniorsistemas/angular-components/utils';\n\n@Component({\n selector: 's-file-upload',\n templateUrl: './file-upload.component.html',\n styleUrls: ['./file-upload.component.scss'],\n})\nexport class FileUploadComponent implements OnInit, OnDestroy, AfterContentInit {\n public static nextId = 0;\n\n public ADD_PERMISSION: FileUploadPermissions = 'add';\n public READ_PERMISSION: FileUploadPermissions = 'read';\n public REMOVE_PERMISSION: FileUploadPermissions = 'remove';\n\n @ViewChild('inputUpload', { static: false })\n private readonly inputUpload: ElementRef | null = null;\n\n @ViewChild('anchor', { static: false })\n private readonly anchor: ElementRef | null = null;\n\n @Input()\n public id = `s-file-upload-${FileUploadComponent.nextId++}`;\n\n @Input()\n public chooseLabel?: string;\n\n @Input()\n public removeLabel?: string;\n\n @Input()\n public cancelLabel?: string;\n\n @Input()\n public successTooltip?: string;\n\n @Input()\n public multiple?: boolean;\n\n @Input()\n public accept?: string;\n\n @Input()\n public supportedExtensions: string[] = [];\n\n @Input()\n public ariaLabelFileName?: string;\n\n @Input()\n public maxFileSize?: number;\n\n @Input()\n public maxCombinedFileSize?: number;\n\n @Input()\n public fileLimit?: number;\n\n @Input()\n public ariaLabelProgress?: string;\n\n @Input()\n public ariaLabelSuccess?: string;\n\n @Input()\n public ariaLabelError?: string;\n\n @Input()\n public ariaLabelRemove?: string;\n\n @Input()\n public formGroup?: FormControl;\n\n @Input()\n public disabled = false;\n\n @Input()\n public showFileUploadDate: boolean = false;\n\n @Input()\n public permissions: FileUploadPermissions[] = ALL_PERMISSIONS;\n\n @Input()\n public set files(files: FileDto[]) {\n if (this.showFileUploadDate && files[0]?.objectId) {\n this.getUploadDate(files);\n }\n this._files = files.map((file) => {\n file.objectURL = this.sanitizer.bypassSecurityTrustUrl(window.URL.createObjectURL(file));\n return file;\n });\n }\n\n @Output()\n public uploadHandler: EventEmitter<{ files: FileDto[] }> = new EventEmitter();\n\n @Output()\n public removeFile: EventEmitter<{ file: File }> = new EventEmitter();\n\n @Output()\n public cancelUpload: EventEmitter<number> = new EventEmitter();\n\n @Output()\n public downloadFile: EventEmitter<{ index: number; anchor: ElementRef }> = new EventEmitter();\n\n @Output()\n public validateErrors: EventEmitter<UploadError> = new EventEmitter();\n\n private _files: FileDto[] = [];\n private readonly ngUsubscribe: Subject<void> = new Subject();\n public isSmallDevice = false;\n public inputValue = '';\n public modifiedDate?: string;\n\n constructor(\n private readonly sanitizer: DomSanitizer,\n private readonly fileUploadService: FileUploadService,\n private readonly translate: TranslateService,\n ) { }\n\n public ngOnInit(): void {\n this.supportedExtensions = this.supportedExtensions.map((extension) => extension.replace('.', '').toLowerCase());\n }\n\n public ngOnDestroy() {\n this.ngUsubscribe.next();\n this.ngUsubscribe.complete();\n }\n\n public ngAfterContentInit() {\n this.update();\n }\n\n @HostListener('window:resize')\n public onResize() {\n this.update();\n }\n\n public _onInputFileSelect($event: Event): void {\n const eventTargetFiles = ($event.target as HTMLInputElement)?.files as FileList;\n const dataTransferFiles = ($event as DragEvent).dataTransfer?.files as FileList;\n const files: FileDto[] = Array.from(dataTransferFiles ? dataTransferFiles : eventTargetFiles);\n this.onFileSelect(files)\n }\n\n public onFileSelect(files: FileDto[]): void {\n const newFiles: FileDto[] = [];\n\n if (!this.multiple) {\n this.files = [];\n }\n\n if (this.isFileLimitExceeded(files)) {\n this.validateErrors.emit({\n files,\n validation: 'maxFileLimit',\n });\n this.clearFileInput();\n return;\n }\n\n if (this.isFileCombinedSizeExceeded(files)) {\n this.validateErrors.emit({\n files: files,\n validation: 'maxCombinedFileSize',\n });\n this.clearFileInput();\n return;\n }\n\n for (const file of files) {\n if (this.isUnsupportedFileExtension(file)) {\n this.validateErrors.emit({\n files: [file],\n validation: 'unsupportedExtension',\n });\n continue;\n }\n\n if (this.isFileSizeExceeded(file)) {\n this.validateErrors.emit({\n files: [file],\n validation: 'maxFileSize',\n });\n continue;\n }\n\n newFiles.push(file);\n }\n\n if (newFiles.length) {\n this.files = this.files.concat(newFiles);\n this.uploadHandler.emit({\n files: newFiles,\n });\n }\n\n this.clearFileInput();\n }\n\n public onRemoveFile(file: FileDto): void {\n const fileIndex = this.files.indexOf(file);\n const removedFiles = this.files.splice(fileIndex, 1);\n\n if (removedFiles.length) {\n this.removeFile.emit({ file });\n }\n }\n\n public onCancelUpload(index: number) {\n const removedFiles = this.files.splice(index, 1);\n\n if (removedFiles.length) {\n this.cancelUpload.emit(index);\n }\n\n this.clearFileInput();\n }\n\n public onDowloadFile(index: number) {\n if (isNullOrUndefined(this.anchor)) return;\n\n this.downloadFile.emit({\n index,\n anchor: this.anchor,\n });\n }\n\n public get files(): FileDto[] {\n return this._files;\n }\n\n private update() {\n const windowWidth = window.innerWidth;\n this.isSmallDevice = windowWidth <= Breakpoints.SM_MAX;\n }\n\n private isFileLimitExceeded(files: FileDto[]) {\n if (!this.fileLimit) {\n return false;\n }\n return this.files.length + files.length > this.fileLimit;\n }\n\n private isFileCombinedSizeExceeded(files: File[]): boolean {\n if (!this.maxCombinedFileSize) {\n return false;\n }\n\n const filesList = [...files, ...this.files];\n\n const combinedSize = filesList.reduce((combinedSize, file) => combinedSize + file.size, 0);\n\n return combinedSize > this.maxCombinedFileSize;\n }\n\n private isFileSizeExceeded(file: File): boolean {\n if (!this.maxFileSize) {\n return false;\n }\n return file.size > this.maxFileSize;\n }\n\n private isUnsupportedFileExtension(file: File) {\n if (this.supportedExtensions?.length) {\n const extension = file.name.split('.').pop()?.toLowerCase() ?? '';\n\n return !this.supportedExtensions.includes(extension);\n }\n return false;\n }\n\n private clearFileInput() {\n if (isNullOrUndefined(this.inputUpload?.nativeElement)) return;\n\n this.inputUpload.nativeElement.value = null;\n }\n\n private getUploadDate(blobFile: FileDto[]): void {\n if (!blobFile) {\n return;\n }\n\n this.fileUploadService.getMetadataCustomField({ objectId: blobFile[0].objectId ?? '' }).then((metadata) => this.setModifiedDate(metadata));\n }\n\n private setModifiedDate(metadata: ListBlobMetadataResponse): void {\n const hour = moment(metadata.modified).format('HH');\n const minutes = moment(metadata.modified).format('mm');\n const day = moment(metadata.modified).format('DD');\n const month = moment(metadata.modified).format('MM');\n const fullYear = moment(metadata.modified).format('YYYY');\n\n this.modifiedDate = this.translate.instant('platform.angular_components.date_modified_custom_blob', { hour, minutes, day, month, fullYear });\n }\n}\n","<div\n [id]=\"id\"\n class=\"s-fileupload\"\n>\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)=\"_onInputFileSelect($event)\"\n />\n <s-button\n *ngIf=\"permissions.includes(ADD_PERMISSION)\"\n [id]=\"id + 'upload-button'\"\n [label]=\"chooseLabel || 'platform.angular_components.attach_files' | translate\"\n (clicked)=\"inputUpload.click()\"\n priority=\"primary\"\n [disabled]=\"disabled || !!formGroup?.disabled || fileLimit === files.length\"\n [auxiliary]=\"false\"\n >\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 >\n <ng-container *ngFor=\"let file of files; let i = index\">\n <div\n class=\"s-fileupload-list-file\"\n role=\"row\"\n >\n <div\n [id]=\"id + '-file-' + i + '-name'\"\n class=\"s-fileupload-list-file-name\"\n role=\"gridcell\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n (permissions.includes(READ_PERMISSION) && file.savedFile) || file.progress === 100\n ? descriptionUrl\n : description;\n context: {\n $implicit: file,\n index: i,\n }\n \"\n >\n </ng-container>\n <span\n *ngIf=\"modifiedDate\"\n class=\"s-fileupload-list-file-name-date\"\n >{{ modifiedDate }}</span\n >\n </div>\n <div\n class=\"s-fileupload-list-file-status\"\n role=\"gridcell\"\n >\n <p-progressBar\n *ngIf=\"file.isUploading && !isSmallDevice\"\n [style]=\"{\n width: '250px',\n 'background-color': '#d8d8d8',\n 'border-radius': '0px',\n height: '14px',\n }\"\n [value]=\"file.progress\"\n [showValue]=\"false\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelProgress || 'platform.angular_components.loading_file' | translate\"\n >\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 >\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]=\"\n ariaLabelSuccess ||\n successTooltip ||\n 'platform.angular_components.file_attached_successfully' | translate\n \"\n [pTooltip]=\"\n successTooltip || 'platform.angular_components.file_attached_successfully' | translate\n \"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\"\n >\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 >\n </span>\n </div>\n <div\n class=\"s-fileupload-list-file-actions\"\n role=\"gridcell\"\n >\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 >\n {{ cancelLabel || 'platform.angular_components.cancel' | translate }}\n </a>\n <a\n *ngIf=\"\n permissions.includes(REMOVE_PERMISSION) &&\n !file.isUploading &&\n !(disabled || !!formGroup?.disabled)\n \"\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]=\"\n ariaLabelRemove || removeLabel || 'platform.angular_components.remove' | translate\n \"\n >\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>\n <a\n [id]=\"id + '-file-' + i + '-name-link'\"\n tabindex=\"0\"\n (click)=\"onDowloadFile(i)\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\"\n >{{ file.name }}\n </a>\n <a\n style=\"display: none\"\n [href]=\"file.objectURL\"\n target=\"_blank\"\n download\n #anchor\n >\n </a>\n</ng-template>\n\n<ng-template\n #description\n let-file\n>\n <span\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\"\n >\n {{ file.name }}\n </span>\n</ng-template>\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { TranslateModule } from \"@ngx-translate/core\";\nimport { ProgressBarModule } from \"primeng/progressbar\";\nimport { TooltipModule } from \"primeng/tooltip\";\n\nimport { FileUploadService } from \"./file-upload.service\";\nimport { FileUploadComponent } from \"./file-upload.component\";\nimport { ButtonModule } from \"@seniorsistemas/angular-components/button\";\n\n@NgModule({\n declarations: [FileUploadComponent],\n imports: [\n CommonModule,\n ButtonModule,\n TooltipModule,\n ProgressBarModule,\n TranslateModule,\n ],\n providers: [FileUploadService],\n exports: [FileUploadComponent],\n})\nexport class FileUploadModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.FileUploadService"],"mappings":";;;;;;;;;;;;;;;;;;AAEO,MAAM,eAAe,GAA4B,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC;;MCGpE,iBAAiB,CAAA;IAClB,4BAA4B,GAAG,8BAA8B,CAAC;AAC9D,IAAA,KAAK,GAAG,IAAI,eAAe,EAAE,CAAC;IAE/B,MAAM,sBAAsB,CAAI,OAAgC,EAAA;QACnE,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAA,EAAG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B;wBACjB,eAAe;AAClB,qBAAA;oBACD,SAAS,EAAE,CAAC,iBAAiB,CAAC;oBAC9B,OAAO,EAAE,CAAC,mBAAmB,CAAC;AACjC,iBAAA,CAAA;;;ACtBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"seniorsistemas-angular-components-file-upload.mjs","sources":["../../projects/angular-components/file-upload/src/lib/file-upload/models/file-upload-permissions.ts","../../projects/angular-components/file-upload/src/lib/file-upload/file-upload.service.ts","../../projects/angular-components/file-upload/src/lib/file-upload/file-upload.component.ts","../../projects/angular-components/file-upload/src/lib/file-upload/file-upload.component.html","../../projects/angular-components/file-upload/src/lib/file-upload/file-upload.module.ts","../../projects/angular-components/file-upload/src/seniorsistemas-angular-components-file-upload.ts"],"sourcesContent":["export type FileUploadPermissions = 'add' | 'read' | 'remove';\n\nexport const ALL_PERMISSIONS: FileUploadPermissions[] = ['add', 'read', 'remove'];\n","import { Injectable } from '@angular/core';\nimport { ListBlobMetadataRequest, ListBlobMetadataResponse } from './models/list-blob-metadata';\nimport { CustomHttpClient } from '@seniorsistemas/angular-components/common';\n\n@Injectable()\nexport class FileUploadService {\n private BASE_URL_FIELD_CUSTOMIZATION = 'platform/field_customization';\n private TOKEN = new AbortController();\n\n public async getMetadataCustomField<T>(request: ListBlobMetadataRequest): Promise<ListBlobMetadataResponse> {\n return CustomHttpClient.post(`${this.BASE_URL_FIELD_CUSTOMIZATION}/queries/getFileMetadata`, request, {\n signal: this.TOKEN.signal,\n });\n }\n}\n","import {\n AfterContentInit,\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { DomSanitizer } from '@angular/platform-browser';\n\nimport { TranslateService } from '@ngx-translate/core';\nimport { Subject } from 'rxjs';\nimport moment from 'moment';\nimport { FileUploadService } from './file-upload.service';\nimport { ListBlobMetadataResponse } from './models/list-blob-metadata';\nimport { FileDto } from './models/file-dto';\nimport { UploadError } from './models/uploadError';\nimport { FileUploadPermissions, ALL_PERMISSIONS } from './models/file-upload-permissions';\nimport { Breakpoints, isNullOrUndefined } from '@seniorsistemas/angular-components/utils';\n\n@Component({\n selector: 's-file-upload',\n templateUrl: './file-upload.component.html',\n styleUrls: ['./file-upload.component.scss'],\n})\nexport class FileUploadComponent implements OnInit, OnDestroy, AfterContentInit {\n public static nextId = 0;\n\n public ADD_PERMISSION: FileUploadPermissions = 'add';\n public READ_PERMISSION: FileUploadPermissions = 'read';\n public REMOVE_PERMISSION: FileUploadPermissions = 'remove';\n\n @ViewChild('inputUpload', { static: false })\n private readonly inputUpload: ElementRef | null = null;\n\n @ViewChild('anchor', { static: false })\n private readonly anchor: ElementRef | null = null;\n\n @Input()\n public id = `s-file-upload-${FileUploadComponent.nextId++}`;\n\n @Input()\n public chooseLabel?: string;\n\n @Input()\n public removeLabel?: string;\n\n @Input()\n public cancelLabel?: string;\n\n @Input()\n public successTooltip?: string;\n\n @Input()\n public multiple?: boolean;\n\n @Input()\n public accept?: string;\n\n @Input()\n public supportedExtensions: string[] = [];\n\n @Input()\n public ariaLabelFileName?: string;\n\n @Input()\n public maxFileSize?: number;\n\n @Input()\n public maxCombinedFileSize?: number;\n\n @Input()\n public fileLimit?: number;\n\n @Input()\n public ariaLabelProgress?: string;\n\n @Input()\n public ariaLabelSuccess?: string;\n\n @Input()\n public ariaLabelError?: string;\n\n @Input()\n public ariaLabelRemove?: string;\n\n @Input()\n public formGroup?: FormControl;\n\n @Input()\n public disabled = false;\n\n @Input()\n public showFileUploadDate: boolean = false;\n\n @Input()\n public permissions: FileUploadPermissions[] = ALL_PERMISSIONS;\n\n @Input()\n public set files(files: FileDto[]) {\n if (this.showFileUploadDate && files[0]?.objectId) {\n this.getUploadDate(files);\n }\n this._files = files.map((file) => {\n file.objectURL = this.sanitizer.bypassSecurityTrustUrl(window.URL.createObjectURL(file));\n return file;\n });\n }\n\n @Output()\n public uploadHandler: EventEmitter<{ files: FileDto[] }> = new EventEmitter();\n\n @Output()\n public removeFile: EventEmitter<{ file: File }> = new EventEmitter();\n\n @Output()\n public cancelUpload: EventEmitter<number> = new EventEmitter();\n\n @Output()\n public downloadFile: EventEmitter<{ index: number; anchor: ElementRef }> = new EventEmitter();\n\n @Output()\n public validateErrors: EventEmitter<UploadError> = new EventEmitter();\n\n private _files: FileDto[] = [];\n private readonly ngUsubscribe: Subject<void> = new Subject();\n public isSmallDevice = false;\n public inputValue = '';\n public modifiedDate?: string;\n\n constructor(\n private readonly sanitizer: DomSanitizer,\n private readonly fileUploadService: FileUploadService,\n private readonly translate: TranslateService,\n ) {}\n\n public ngOnInit(): void {\n this.supportedExtensions = this.supportedExtensions.map((extension) =>\n extension.replace('.', '').toLowerCase(),\n );\n }\n\n public ngOnDestroy() {\n this.ngUsubscribe.next();\n this.ngUsubscribe.complete();\n }\n\n public ngAfterContentInit() {\n this.update();\n }\n\n @HostListener('window:resize')\n public onResize() {\n this.update();\n }\n\n public _onInputFileSelect($event: Event): void {\n const eventTargetFiles = ($event.target as HTMLInputElement)?.files as FileList;\n const dataTransferFiles = ($event as DragEvent).dataTransfer?.files as FileList;\n const files: FileDto[] = Array.from(dataTransferFiles ? dataTransferFiles : eventTargetFiles);\n this.onFileSelect(files);\n }\n\n public onFileSelect(files: FileDto[]): void {\n const newFiles: FileDto[] = [];\n\n if (!this.multiple) {\n this.files = [];\n }\n\n if (this.isFileLimitExceeded(files)) {\n this.validateErrors.emit({\n files,\n validation: 'maxFileLimit',\n });\n this.clearFileInput();\n return;\n }\n\n if (this.isFileCombinedSizeExceeded(files)) {\n this.validateErrors.emit({\n files: files,\n validation: 'maxCombinedFileSize',\n });\n this.clearFileInput();\n return;\n }\n\n for (const file of files) {\n if (this.isUnsupportedFileExtension(file)) {\n this.validateErrors.emit({\n files: [file],\n validation: 'unsupportedExtension',\n });\n continue;\n }\n\n if (this.isFileSizeExceeded(file)) {\n this.validateErrors.emit({\n files: [file],\n validation: 'maxFileSize',\n });\n continue;\n }\n\n newFiles.push(file);\n }\n\n if (newFiles.length) {\n this.files = this.files.concat(newFiles);\n this.uploadHandler.emit({\n files: newFiles,\n });\n }\n\n this.clearFileInput();\n }\n\n public onRemoveFile(file: FileDto): void {\n const fileIndex = this.files.indexOf(file);\n const removedFiles = this.files.splice(fileIndex, 1);\n\n if (removedFiles.length) {\n this.removeFile.emit({ file });\n }\n }\n\n public onCancelUpload(index: number) {\n const removedFiles = this.files.splice(index, 1);\n\n if (removedFiles.length) {\n this.cancelUpload.emit(index);\n }\n\n this.clearFileInput();\n }\n\n public onDowloadFile(index: number) {\n if (isNullOrUndefined(this.anchor)) return;\n\n this.downloadFile.emit({\n index,\n anchor: this.anchor,\n });\n }\n\n public get files(): FileDto[] {\n return this._files;\n }\n\n public formatFileSize(size: number): string {\n if (size === 0) {\n return '0 Bytes';\n }\n const k = 1024;\n const sizes = ['bytes', 'KB', 'MB', 'GB', 'TB'];\n const i = Math.floor(Math.log(size) / Math.log(k));\n return parseFloat((size / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];\n }\n\n private update() {\n const windowWidth = window.innerWidth;\n this.isSmallDevice = windowWidth <= Breakpoints.SM_MAX;\n }\n\n private isFileLimitExceeded(files: FileDto[]) {\n if (!this.fileLimit) {\n return false;\n }\n return this.files.length + files.length > this.fileLimit;\n }\n\n private isFileCombinedSizeExceeded(files: File[]): boolean {\n if (!this.maxCombinedFileSize) {\n return false;\n }\n\n const filesList = [...files, ...this.files];\n\n const combinedSize = filesList.reduce((combinedSize, file) => combinedSize + file.size, 0);\n\n return combinedSize > this.maxCombinedFileSize;\n }\n\n private isFileSizeExceeded(file: File): boolean {\n if (!this.maxFileSize) {\n return false;\n }\n return file.size > this.maxFileSize;\n }\n\n private isUnsupportedFileExtension(file: File) {\n if (this.supportedExtensions?.length) {\n const extension = file.name.split('.').pop()?.toLowerCase() ?? '';\n\n return !this.supportedExtensions.includes(extension);\n }\n return false;\n }\n\n private clearFileInput() {\n if (isNullOrUndefined(this.inputUpload?.nativeElement)) return;\n\n this.inputUpload.nativeElement.value = null;\n }\n\n private getUploadDate(blobFile: FileDto[]): void {\n if (!blobFile) {\n return;\n }\n\n this.fileUploadService\n .getMetadataCustomField({ objectId: blobFile[0].objectId ?? '' })\n .then((metadata) => this.setModifiedDate(metadata));\n }\n\n private setModifiedDate(metadata: ListBlobMetadataResponse): void {\n const hour = moment(metadata.modified).format('HH');\n const minutes = moment(metadata.modified).format('mm');\n const day = moment(metadata.modified).format('DD');\n const month = moment(metadata.modified).format('MM');\n const fullYear = moment(metadata.modified).format('YYYY');\n\n this.modifiedDate = this.translate.instant('platform.angular_components.date_modified_custom_blob', {\n hour,\n minutes,\n day,\n month,\n fullYear,\n });\n }\n}\n\n","<div\n [id]=\"id\"\n class=\"s-fileupload\"\n>\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)=\"_onInputFileSelect($event)\"\n />\n <s-button\n *ngIf=\"permissions.includes(ADD_PERMISSION)\"\n [id]=\"id + 'upload-button'\"\n [label]=\"chooseLabel || 'platform.angular_components.attach_files' | translate\"\n (clicked)=\"inputUpload.click()\"\n priority=\"primary\"\n [disabled]=\"disabled || !!formGroup?.disabled || fileLimit === files.length\"\n [auxiliary]=\"false\"\n >\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 >\n <ng-container *ngFor=\"let file of files; let i = index\">\n <div\n class=\"s-fileupload-list-file\"\n role=\"row\"\n >\n <div\n [id]=\"id + '-file-' + i + '-name'\"\n class=\"flex flex-grow items-center justify-between overflow-hidden text-ellipsis text-nowrap\"\n role=\"gridcell\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n (permissions.includes(READ_PERMISSION) && file.savedFile) || file.progress === 100\n ? descriptionUrl\n : description;\n context: {\n $implicit: file,\n index: i,\n }\n \"\n >\n </ng-container>\n\n <span>{{ formatFileSize(file.size) }}</span>\n\n <span\n *ngIf=\"modifiedDate\"\n class=\"s-fileupload-list-file-name-date\"\n >{{ modifiedDate }}</span\n >\n </div>\n <div\n class=\"s-fileupload-list-file-status\"\n role=\"gridcell\"\n >\n <p-progressBar\n *ngIf=\"file.isUploading && !isSmallDevice\"\n [style]=\"{\n width: '250px',\n 'background-color': '#d8d8d8',\n 'border-radius': '0px',\n height: '14px',\n }\"\n [value]=\"file.progress\"\n [showValue]=\"false\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelProgress || 'platform.angular_components.loading_file' | translate\"\n >\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 >\n </span>\n\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]=\"\n ariaLabelSuccess ||\n successTooltip ||\n 'platform.angular_components.file_attached_successfully' | translate\n \"\n [pTooltip]=\"\n successTooltip || 'platform.angular_components.file_attached_successfully' | translate\n \"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\"\n >\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 >\n </span>\n </div>\n <div\n class=\"s-fileupload-list-file-actions\"\n role=\"gridcell\"\n >\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 >\n {{ cancelLabel || 'platform.angular_components.cancel' | translate }}\n </a>\n <a\n *ngIf=\"\n permissions.includes(REMOVE_PERMISSION) &&\n !file.isUploading &&\n !(disabled || !!formGroup?.disabled)\n \"\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]=\"\n ariaLabelRemove || removeLabel || 'platform.angular_components.remove' | translate\n \"\n >\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>\n <div class=\"flex justify-between\">\n <div>\n <a\n [id]=\"id + '-file-' + i + '-name-link'\"\n tabindex=\"0\"\n (click)=\"onDowloadFile(i)\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\"\n class=\"break-words\"\n >{{ file.name }}\n </a>\n <a\n style=\"display: none\"\n [href]=\"file.objectURL\"\n target=\"_blank\"\n download\n #anchor\n >\n </a>\n </div>\n </div>\n</ng-template>\n\n<ng-template\n #description\n let-file\n>\n <div class=\"flex justify-between\">\n <span\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\"\n >\n {{ file.name }}\n </span>\n </div>\n</ng-template>\n\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { TranslateModule } from \"@ngx-translate/core\";\nimport { ProgressBarModule } from \"primeng/progressbar\";\nimport { TooltipModule } from \"primeng/tooltip\";\n\nimport { FileUploadService } from \"./file-upload.service\";\nimport { FileUploadComponent } from \"./file-upload.component\";\nimport { ButtonModule } from \"@seniorsistemas/angular-components/button\";\nimport { LocaleModule } from \"@seniorsistemas/angular-components/locale\";\n\n@NgModule({\n declarations: [FileUploadComponent],\n imports: [\n CommonModule,\n ButtonModule,\n TooltipModule,\n ProgressBarModule,\n TranslateModule,\n LocaleModule,\n ],\n providers: [FileUploadService],\n exports: [FileUploadComponent],\n})\nexport class FileUploadModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.FileUploadService"],"mappings":";;;;;;;;;;;;;;;;;;;AAEO,MAAM,eAAe,GAA4B,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC;;MCGpE,iBAAiB,CAAA;IAClB,4BAA4B,GAAG,8BAA8B,CAAC;AAC9D,IAAA,KAAK,GAAG,IAAI,eAAe,EAAE,CAAC;IAE/B,MAAM,sBAAsB,CAAI,OAAgC,EAAA;QACnE,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAA,EAAG,IAAI,CAAC,4BAA4B,CAAA,wBAAA,CAA0B,EAAE,OAAO,EAAE;AAClG,YAAA,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;AAC5B,SAAA,CAAC,CAAC;KACN;wGARQ,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;4GAAjB,iBAAiB,EAAA,CAAA,CAAA;;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAD7B,UAAU;;;MC0BE,mBAAmB,CAAA;AA0GP,IAAA,SAAA,CAAA;AACA,IAAA,iBAAA,CAAA;AACA,IAAA,SAAA,CAAA;AA3Gd,IAAA,OAAO,MAAM,GAAG,CAAC,CAAC;IAElB,cAAc,GAA0B,KAAK,CAAC;IAC9C,eAAe,GAA0B,MAAM,CAAC;IAChD,iBAAiB,GAA0B,QAAQ,CAAC;IAG1C,WAAW,GAAsB,IAAI,CAAC;IAGtC,MAAM,GAAsB,IAAI,CAAC;AAG3C,IAAA,EAAE,GAAG,CAAiB,cAAA,EAAA,mBAAmB,CAAC,MAAM,EAAE,EAAE,CAAC;AAGrD,IAAA,WAAW,CAAU;AAGrB,IAAA,WAAW,CAAU;AAGrB,IAAA,WAAW,CAAU;AAGrB,IAAA,cAAc,CAAU;AAGxB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
}
|
|
101
101
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IAInsightCardComponent, deps: [{ token: i1$1.Clipboard }, { token: i2.ToastService }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
102
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: IAInsightCardComponent, selector: "s-ia-insight-card", inputs: { insight: "insight" }, ngImport: i0, template: "<div\n class=\"ia-insight-card\"\n [ngClass]=\"{ 'ia-insight-card--close': !open }\"\n>\n <div\n class=\"header\"\n (click)=\"toggle()\"\n >\n <s-badge\n text=\"Insight\"\n iconClass=\"fal fa-lightbulb\"\n ></s-badge>\n <span class=\"insight-title\">{{ insight.title }}</span>\n <span class=\"toggle-icon\">\n <i\n class=\"fas\"\n [ngClass]=\"{\n 'fa-angle-down': !open,\n 'fa-angle-up': open,\n }\"\n >\n </i>\n </span>\n </div>\n <div class=\"content\">\n <ng-container *ngIf=\"isLoading; then loadingBlock; else contentBlock\"></ng-container>\n <ng-template #loadingBlock>\n <s-ia-insight-card-loader></s-ia-insight-card-loader>\n </ng-template>\n <ng-template #contentBlock>\n <ng-container *ngIf=\"content; then successBlock; else errorBlock\"></ng-container>\n\n <ng-template #successBlock>\n <span\n class=\"text\"\n [innerHTML]=\"content\"\n ></span>\n <span class=\"insight-footer\">{{ \"platform.angular_components.insight_footer\" | translate }}</span>\n\n </ng-template>\n <ng-template #errorBlock>\n <span class=\"text text--error\">{{\n 'platform.angular_components.error_loading_insight_alt' | translate\n }}</span>\n </ng-template>\n\n <div class=\"options\">\n <button\n [disabled]=\"!content\"\n (click)=\"copyContent()\"\n class=\"option\"\n >\n <i class=\"fal fa-copy\"></i>\n </button>\n <button\n (click)=\"reloadContent()\"\n class=\"option\"\n >\n <i class=\"fal fa-redo\"></i>\n </button>\n <button\n *ngIf=\"insight.onLikeSelected\"\n [disabled]=\"!content\"\n (click)=\"onLikeSelected()\"\n class=\"option\"\n >\n <i\n [ngClass]=\"{\n fal: !likeSelected,\n fas: likeSelected,\n 'fa-thumbs-up': true,\n }\"\n >\n </i>\n </button>\n <button\n *ngIf=\"insight.onDislikeSelected\"\n [disabled]=\"!content\"\n (click)=\"onDislikeSelected()\"\n class=\"option\"\n >\n <i\n [ngClass]=\"{\n fal: !dislikeSelected,\n fas: dislikeSelected,\n 'fa-thumbs-down': true,\n }\"\n ></i>\n </button>\n </div>\n </ng-template>\n </div>\n</div>\n", styles: [".ia-insight-card{background-color:#fff;border:1px solid #9ecad4;border-radius:4px;cursor:pointer;display:flex;flex-direction:column;overflow:hidden}.ia-insight-card .header{align-items:center;background-color:#f1f7f8;border-bottom:1px solid #9ecad4;display:flex;gap:8px;min-height:60px;padding:8px 16px;-webkit-user-select:none;user-select:none}.ia-insight-card .header .insight-title{color:#428bca;flex-grow:1;font-family:Open Sans,sans-serif;font-size:14px;line-height:150%}.ia-insight-card .header .toggle-icon{color:#888b99;font-size:20px}.ia-insight-card .content{align-items:center;justify-content:space-between;cursor:auto;display:flex;flex-direction:column;gap:16px;min-height:160px;padding:24px}.ia-insight-card .content .text{color:#212533;font-family:Open Sans,sans-serif;font-size:14px;width:100%}.ia-insight-card .content .text--error{text-align:center}.ia-insight-card .content .insight-footer{color:#888b99;font-family:Open Sans,sans-serif;font-size:12px;text-align:center}.ia-insight-card .content .options{display:flex;gap:8px}.ia-insight-card .content .options .option{background-color:transparent;border:none;color:#428bca;cursor:pointer;font-size:12px}.ia-insight-card .content .options .option:disabled{color:#c1c1cc;cursor:auto}.ia-insight-card--close{border-color:#dedce5}.ia-insight-card--close .header{background-color:#fbfafc;border:none;border-color:#dedce5}.ia-insight-card--close .header .insight-title{color:#888b99}.ia-insight-card--close .content{display:none}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.BadgeComponent, selector: "s-badge", inputs: ["type", "color", "title", "text", "selectable", "iconClass", "iconPosition", "infoSign"], outputs: ["selected"] }, { kind: "component", type: IAInsightCardLoaderComponent, selector: "s-ia-insight-card-loader" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] });
|
|
102
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: IAInsightCardComponent, selector: "s-ia-insight-card", inputs: { insight: "insight" }, ngImport: i0, template: "<div\n class=\"ia-insight-card\"\n [ngClass]=\"{ 'ia-insight-card--close': !open }\"\n>\n <div\n class=\"header\"\n (click)=\"toggle()\"\n >\n <s-badge\n text=\"Insight\"\n iconClass=\"fal fa-lightbulb\"\n ></s-badge>\n <span class=\"insight-title\">{{ insight.title }}</span>\n <span class=\"toggle-icon\">\n <i\n class=\"fas\"\n [ngClass]=\"{\n 'fa-angle-down': !open,\n 'fa-angle-up': open,\n }\"\n >\n </i>\n </span>\n </div>\n <div class=\"content\">\n <ng-container *ngIf=\"isLoading; then loadingBlock; else contentBlock\"></ng-container>\n <ng-template #loadingBlock>\n <s-ia-insight-card-loader></s-ia-insight-card-loader>\n </ng-template>\n <ng-template #contentBlock>\n <ng-container *ngIf=\"content; then successBlock; else errorBlock\"></ng-container>\n\n <ng-template #successBlock>\n <span\n class=\"text\"\n [innerHTML]=\"content\"\n ></span>\n <span class=\"insight-footer\">{{ \"platform.angular_components.insight_footer\" | translate }}</span>\n\n </ng-template>\n <ng-template #errorBlock>\n <span class=\"text text--error\">{{\n 'platform.angular_components.error_loading_insight_alt' | translate\n }}</span>\n </ng-template>\n\n <div class=\"options\">\n <button\n [disabled]=\"!content\"\n (click)=\"copyContent()\"\n class=\"option\"\n >\n <i class=\"fal fa-copy\"></i>\n </button>\n <button\n (click)=\"reloadContent()\"\n class=\"option\"\n >\n <i class=\"fal fa-redo\"></i>\n </button>\n <button\n *ngIf=\"insight.onLikeSelected\"\n [disabled]=\"!content\"\n (click)=\"onLikeSelected()\"\n class=\"option\"\n >\n <i\n [ngClass]=\"{\n fal: !likeSelected,\n fas: likeSelected,\n 'fa-thumbs-up': true,\n }\"\n >\n </i>\n </button>\n <button\n *ngIf=\"insight.onDislikeSelected\"\n [disabled]=\"!content\"\n (click)=\"onDislikeSelected()\"\n class=\"option\"\n >\n <i\n [ngClass]=\"{\n fal: !dislikeSelected,\n fas: dislikeSelected,\n 'fa-thumbs-down': true,\n }\"\n ></i>\n </button>\n </div>\n </ng-template>\n </div>\n</div>\n", styles: [".ia-insight-card{background-color:#fff;border:1px solid #9ecad4;border-radius:4px;cursor:pointer;display:flex;flex-direction:column;overflow:hidden}.ia-insight-card .header{align-items:center;background-color:#f1f7f8;border-bottom:1px solid #9ecad4;display:flex;gap:8px;min-height:60px;padding:8px 16px;-webkit-user-select:none;user-select:none}.ia-insight-card .header .insight-title{color:#428bca;flex-grow:1;font-family:Open Sans,sans-serif;font-size:14px;line-height:150%}.ia-insight-card .header .toggle-icon{color:#888b99;font-size:20px}.ia-insight-card .content{align-items:center;justify-content:space-between;cursor:auto;display:flex;flex-direction:column;gap:16px;min-height:160px;padding:24px}.ia-insight-card .content .text{color:#212533;font-family:Open Sans,sans-serif;font-size:14px;width:100%}.ia-insight-card .content .text--error{text-align:center}.ia-insight-card .content .insight-footer{color:#888b99;font-family:Open Sans,sans-serif;font-size:12px;text-align:center}.ia-insight-card .content .options{display:flex;gap:8px}.ia-insight-card .content .options .option{background-color:transparent;border:none;color:#428bca;cursor:pointer;font-size:12px}.ia-insight-card .content .options .option:disabled{color:#c1c1cc;cursor:auto}.ia-insight-card--close{border-color:#dedce5}.ia-insight-card--close .header{background-color:#fbfafc;border:none;border-color:#dedce5}.ia-insight-card--close .header .insight-title{color:#888b99}.ia-insight-card--close .content{display:none}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.BadgeComponent, selector: "s-badge", inputs: ["type", "color", "title", "text", "selectable", "iconClass", "iconPosition", "infoSign", "enableTruncateText"], outputs: ["selected"] }, { kind: "component", type: IAInsightCardLoaderComponent, selector: "s-ia-insight-card-loader" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] });
|
|
103
103
|
}
|
|
104
104
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IAInsightCardComponent, decorators: [{
|
|
105
105
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seniorsistemas-angular-components-ia-insight.mjs","sources":["../../projects/angular-components/ia-insight/src/lib/ia-insight/components/ia-insight-card/components/ia-insight-card-loader/ia-insight-card-loader.component.ts","../../projects/angular-components/ia-insight/src/lib/ia-insight/components/ia-insight-card/components/ia-insight-card-loader/ia-insight-card-loader.component.html","../../projects/angular-components/ia-insight/src/lib/ia-insight/components/ia-insight-card/ia-insight-card.component.ts","../../projects/angular-components/ia-insight/src/lib/ia-insight/components/ia-insight-card/ia-insight-card.component.html","../../projects/angular-components/ia-insight/src/lib/ia-insight/components/ia-insight-sidebar/ia-insight-sidebar.component.ts","../../projects/angular-components/ia-insight/src/lib/ia-insight/components/ia-insight-sidebar/ia-insight-sidebar.component.html","../../projects/angular-components/ia-insight/src/lib/ia-insight/ia-insight.component.ts","../../projects/angular-components/ia-insight/src/lib/ia-insight/ia-insight.component.html","../../projects/angular-components/ia-insight/src/lib/ia-insight/ia-insight.module.ts","../../projects/angular-components/ia-insight/src/seniorsistemas-angular-components-ia-insight.ts"],"sourcesContent":["import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"s-ia-insight-card-loader\",\n templateUrl: \"./ia-insight-card-loader.component.html\",\n styleUrls: [\"./ia-insight-card-loader.component.scss\"],\n})\nexport class IAInsightCardLoaderComponent {}\n","<div class=\"ia-insight-card-loader\">\n <div class=\"loader\">\n <div class=\"loader-icon\">\n <div *sSVGFactory=\"'iassist'\"></div>\n </div>\n </div>\n \n <span class=\"loader-label\">{{ \"platform.angular_components.loading_insight\" | translate }}</span>\n</div>\n","import { Clipboard } from '@angular/cdk/clipboard';\nimport { Component, Input } from '@angular/core';\n\nimport { TranslateService } from '@ngx-translate/core';\nimport { ToastService } from '@seniorsistemas/angular-components/toast';\nimport { finalize, first } from 'rxjs/operators';\n\nimport { marked } from 'marked';\nimport { IAInsightItem } from '../../models/ia-insight-item';\n\n@Component({\n selector: 's-ia-insight-card',\n templateUrl: './ia-insight-card.component.html',\n styleUrls: ['./ia-insight-card.component.scss'],\n})\nexport class IAInsightCardComponent {\n @Input({ required: true })\n public insight!: IAInsightItem;\n\n public open = false;\n public isLoading = false;\n public content?: string;\n\n public likeSelected = false;\n public dislikeSelected = false;\n\n constructor(\n private readonly clipboard: Clipboard,\n private readonly toastService: ToastService,\n private readonly translateService: TranslateService,\n ) {}\n\n public toggle(): void {\n const newOpenState = !this.open;\n this.open = newOpenState;\n if (newOpenState === true && this.insight.onOpenSidebar) {\n this.insight.onOpenSidebar();\n } else if (newOpenState === false && this.insight.onCloseSideBar) {\n this.insight.onCloseSideBar();\n }\n if (newOpenState === true) {\n this._requestInsight();\n }\n }\n\n public onLikeSelected(): void {\n if (this.likeSelected) {\n this.likeSelected = false;\n } else {\n this.likeSelected = true;\n this.dislikeSelected = false;\n this.insight.onLikeSelected?.();\n }\n }\n\n public onDislikeSelected(): void {\n if (this.dislikeSelected) {\n this.dislikeSelected = false;\n } else {\n this.dislikeSelected = true;\n this.likeSelected = false;\n this.insight.onDislikeSelected?.();\n }\n }\n\n public copyContent(): void {\n if (!this.content) return;\n\n this.insight.onCopy?.(this.content);\n\n if (this.clipboard.copy(this.content)) {\n this.toastService.show({\n severity: 'info',\n title: this.translateService.instant('platform.angular_components.copied_to_clipboard'),\n });\n }\n }\n\n public reloadContent(): void {\n this._requestInsight();\n }\n\n private _requestInsight(): void {\n this.isLoading = true;\n\n this.insight.request$\n .pipe(\n first(),\n finalize(() => (this.isLoading = false)),\n )\n .subscribe(async (content: string) => {\n this.content = await marked(content);\n if (this.insight.onContentLoaded) {\n this.insight.onContentLoaded();\n }\n });\n }\n}\n","<div\n class=\"ia-insight-card\"\n [ngClass]=\"{ 'ia-insight-card--close': !open }\"\n>\n <div\n class=\"header\"\n (click)=\"toggle()\"\n >\n <s-badge\n text=\"Insight\"\n iconClass=\"fal fa-lightbulb\"\n ></s-badge>\n <span class=\"insight-title\">{{ insight.title }}</span>\n <span class=\"toggle-icon\">\n <i\n class=\"fas\"\n [ngClass]=\"{\n 'fa-angle-down': !open,\n 'fa-angle-up': open,\n }\"\n >\n </i>\n </span>\n </div>\n <div class=\"content\">\n <ng-container *ngIf=\"isLoading; then loadingBlock; else contentBlock\"></ng-container>\n <ng-template #loadingBlock>\n <s-ia-insight-card-loader></s-ia-insight-card-loader>\n </ng-template>\n <ng-template #contentBlock>\n <ng-container *ngIf=\"content; then successBlock; else errorBlock\"></ng-container>\n\n <ng-template #successBlock>\n <span\n class=\"text\"\n [innerHTML]=\"content\"\n ></span>\n <span class=\"insight-footer\">{{ \"platform.angular_components.insight_footer\" | translate }}</span>\n\n </ng-template>\n <ng-template #errorBlock>\n <span class=\"text text--error\">{{\n 'platform.angular_components.error_loading_insight_alt' | translate\n }}</span>\n </ng-template>\n\n <div class=\"options\">\n <button\n [disabled]=\"!content\"\n (click)=\"copyContent()\"\n class=\"option\"\n >\n <i class=\"fal fa-copy\"></i>\n </button>\n <button\n (click)=\"reloadContent()\"\n class=\"option\"\n >\n <i class=\"fal fa-redo\"></i>\n </button>\n <button\n *ngIf=\"insight.onLikeSelected\"\n [disabled]=\"!content\"\n (click)=\"onLikeSelected()\"\n class=\"option\"\n >\n <i\n [ngClass]=\"{\n fal: !likeSelected,\n fas: likeSelected,\n 'fa-thumbs-up': true,\n }\"\n >\n </i>\n </button>\n <button\n *ngIf=\"insight.onDislikeSelected\"\n [disabled]=\"!content\"\n (click)=\"onDislikeSelected()\"\n class=\"option\"\n >\n <i\n [ngClass]=\"{\n fal: !dislikeSelected,\n fas: dislikeSelected,\n 'fa-thumbs-down': true,\n }\"\n ></i>\n </button>\n </div>\n </ng-template>\n </div>\n</div>\n","import { Component, Input, output, TemplateRef } from '@angular/core';\n\nimport { IAInsightItem } from '../../models/index';\n\n@Component({\n selector: 's-ia-insight-sidebar',\n templateUrl: './ia-insight-sidebar.component.html',\n styleUrls: ['./ia-insight-sidebar.component.scss'],\n})\nexport class IAInsightSidebarComponent {\n @Input()\n public insights: IAInsightItem[] = [];\n\n @Input()\n public hasPermission = false;\n\n @Input()\n public introText?: string;\n\n @Input()\n public introTemplate: TemplateRef<any> | null = null;\n\n @Input()\n public emptyText?: string;\n\n @Input()\n public emptyTemplate: TemplateRef<any> | null = null;\n\n @Input()\n public noPermissionText?: string;\n\n @Input()\n public noPermissionTemplate: TemplateRef<any> | null = null;\n\n public closedSidebar = output<void>();\n\n public openedSidebar = output<void>();\n\n public opened = false;\n\n public toggle(): void {\n const newState = !this.opened;\n if (newState) {\n this.open();\n } else {\n this.close();\n }\n }\n\n public open(): void {\n this.opened = true;\n this.openedSidebar.emit();\n }\n\n public close(): void {\n this.opened = false;\n this.closedSidebar.emit();\n }\n}\n","<div\n class=\"sidebar\"\n [class.opened]=\"opened\">\n <div class=\"header\">\n <button (click)=\"close()\" class=\"option\">\n <span class=\"far fa-chevron-double-right\"></span>\n </button>\n <div class=\"title\">\n <span><ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container></span>\n <span>Insight</span>\n </div>\n </div>\n <div class=\"intro\">\n <ng-container *ngIf=\"hasPermission; then permissionBlock; else noPermissionBlock\"></ng-container>\n\n <ng-template #permissionBlock>\n <ng-container *ngIf=\"insights?.length; then introBlock; else emptyBlock\"></ng-container>\n\n <ng-template #introBlock>\n <ng-container *ngIf=\"introTemplate; then introCustomBlock; else introTextBlock\"></ng-container>\n\n <ng-template #introCustomBlock>\n <ng-container *ngTemplateOutlet=\"introTemplate\"></ng-container>\n </ng-template>\n\n <ng-template #introTextBlock>\n <span class=\"text\">{{ introText || \"platform.angular_components.insight_intro\" | translate }}</span>\n </ng-template>\n </ng-template>\n\n <ng-template #emptyBlock>\n <ng-container *ngIf=\"emptyTemplate; then emptyCustomBlock; else emptyTextBlock\"></ng-container>\n\n <ng-template #emptyCustomBlock>\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n\n <ng-template #emptyTextBlock>\n <span class=\"text\">{{ emptyText || \"platform.angular_components.insight_empty\" | translate }}</span>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template #noPermissionBlock>\n <ng-container *ngIf=\"noPermissionTemplate; then noPermissionCustomBlock; else noPermissionTextBlock\"></ng-container>\n\n <ng-template #noPermissionCustomBlock>\n <ng-container *ngTemplateOutlet=\"noPermissionTemplate\"></ng-container>\n </ng-template>\n\n <ng-template #noPermissionTextBlock>\n <span>{{ noPermissionText || \"platform.angular_components.insight_no_permission\" | translate }}</span>\n </ng-template>\n </ng-template>\n </div>\n <div class=\"insights\">\n <ng-container *ngIf=\"insights?.length\">\n <s-ia-insight-card\n *ngFor=\"let insight of insights\"\n [insight]=\"insight\">\n </s-ia-insight-card>\n </ng-container>\n </div>\n</div>\n\n<ng-template #iassistIcon>\n <div style=\"width: 28px; height: 28px;\">\n <span *sSVGFactory=\"'iassist'\"></span>\n </div>\n</ng-template>\n","import {\n AfterContentInit,\n Component,\n ContentChildren,\n Input,\n output,\n QueryList,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\n\nimport { IAInsightSidebarComponent } from './components/ia-insight-sidebar/ia-insight-sidebar.component';\nimport { IAInsightItem } from './models/ia-insight-item';\nimport { IAInsightTemplateTypes } from './models/ia-insight-template-types';\nimport { TemplateDirective } from '@seniorsistemas/angular-components/template';\n\n@Component({\n selector: 's-ia-insight',\n templateUrl: './ia-insight.component.html',\n})\nexport class IAInsightComponent implements AfterContentInit {\n @Input()\n public insights: IAInsightItem[] = [];\n\n @Input()\n public hasPermission = true;\n\n @Input()\n public introText?: string;\n\n @Input()\n public emptyText?: string;\n\n @Input()\n public noPermissionText?: string;\n\n @ViewChild(IAInsightSidebarComponent)\n public sidebar: IAInsightSidebarComponent | null = null;\n\n @ContentChildren(TemplateDirective)\n public templates: QueryList<TemplateDirective> | null = null;\n\n public openIAInsight = output<void>();\n\n public closedIAInsight = output<void>();\n\n public introTemplate: TemplateRef<any> | null = null;\n public emptyTemplate: TemplateRef<any> | null = null;\n public noPermissionTemplate: TemplateRef<any> | null = null;\n\n public ngAfterContentInit(): void {\n this._getTemplates();\n }\n\n public open(): void {\n this.sidebar?.open();\n }\n\n public close(): void {\n this.sidebar?.close();\n }\n\n public getIntroTemplate(): TemplateRef<any> | null {\n return this._getCustomTemplate('intro');\n }\n\n public getNoPermissionTemplate(): TemplateRef<any> | null {\n return this._getCustomTemplate('no-permission');\n }\n\n public getEmptyTemplate(): TemplateRef<any> | null {\n return this._getCustomTemplate('empty');\n }\n\n private _getCustomTemplate(type: IAInsightTemplateTypes): TemplateRef<any> | null {\n return this.templates?.find((template: TemplateDirective) => template.type === type)?.template ?? null;\n }\n\n private _getTemplates(): void {\n this.introTemplate = this.getIntroTemplate();\n this.emptyTemplate = this.getEmptyTemplate();\n this.noPermissionTemplate = this.getNoPermissionTemplate();\n }\n}\n","<s-ia-insight-sidebar\n #sidebar\n [insights]=\"insights\"\n [hasPermission]=\"hasPermission\"\n [introText]=\"introText\"\n [introTemplate]=\"introTemplate\"\n [emptyText]=\"emptyText\"\n [emptyTemplate]=\"emptyTemplate\"\n [noPermissionText]=\"noPermissionText\"\n [noPermissionTemplate]=\"noPermissionTemplate\"\n (openedSidebar)=\"openIAInsight.emit()\"\n (closedSidebar)=\"closedIAInsight.emit()\"\n>\n</s-ia-insight-sidebar>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { TranslateModule } from '@ngx-translate/core';\nimport { BadgeModule } from '@seniorsistemas/angular-components/badge';\nimport { ButtonModule } from '@seniorsistemas/angular-components/button';\nimport { TemplateModule } from '@seniorsistemas/angular-components/template';\nimport { TooltipModule } from '@seniorsistemas/angular-components/tooltip';\n\nimport { IAInsightCardComponent } from './components/ia-insight-card/ia-insight-card.component';\nimport { IAInsightSidebarComponent } from './components/ia-insight-sidebar/ia-insight-sidebar.component';\nimport { IAInsightCardLoaderComponent } from './components/ia-insight-card/components/ia-insight-card-loader/ia-insight-card-loader.component';\nimport { IAInsightComponent } from './ia-insight.component';\nimport { SVGFactoryModule } from '@seniorsistemas/angular-components/common';\n\n@NgModule({\n imports: [\n CommonModule,\n TranslateModule,\n BadgeModule,\n ButtonModule,\n TooltipModule,\n TemplateModule,\n SVGFactoryModule,\n ],\n declarations: [IAInsightComponent, IAInsightCardComponent, IAInsightSidebarComponent, IAInsightCardLoaderComponent],\n exports: [IAInsightComponent, TemplateModule],\n})\nexport class IAInsightModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i1","i4","i6.IAInsightCardLoaderComponent","i3.IAInsightCardComponent","i1.IAInsightSidebarComponent"],"mappings":";;;;;;;;;;;;;;;;;;MAOa,4BAA4B,CAAA;wGAA5B,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA5B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,4BAA4B,gECPzC,wTASA,EAAA,MAAA,EAAA,CAAA,6lBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,aAAA,CAAA,EAAA,EAAA,EAAA,IAAA,E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EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAXpB,YAAY;YACZ,eAAe;YACf,WAAW;YACX,YAAY;YACZ,aAAa;YACb,cAAc;AACd,YAAA,gBAAgB,EAGU,cAAc,CAAA,EAAA,CAAA,CAAA;;4FAEnC,eAAe,EAAA,UAAA,EAAA,CAAA;kBAb3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,eAAe;wBACf,WAAW;wBACX,YAAY;wBACZ,aAAa;wBACb,cAAc;wBACd,gBAAgB;AACnB,qBAAA;oBACD,YAAY,EAAE,CAAC,kBAAkB,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,4BAA4B,CAAC;AACnH,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,cAAc,CAAC;AAChD,iBAAA,CAAA;;;AC3BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"seniorsistemas-angular-components-ia-insight.mjs","sources":["../../projects/angular-components/ia-insight/src/lib/ia-insight/components/ia-insight-card/components/ia-insight-card-loader/ia-insight-card-loader.component.ts","../../projects/angular-components/ia-insight/src/lib/ia-insight/components/ia-insight-card/components/ia-insight-card-loader/ia-insight-card-loader.component.html","../../projects/angular-components/ia-insight/src/lib/ia-insight/components/ia-insight-card/ia-insight-card.component.ts","../../projects/angular-components/ia-insight/src/lib/ia-insight/components/ia-insight-card/ia-insight-card.component.html","../../projects/angular-components/ia-insight/src/lib/ia-insight/components/ia-insight-sidebar/ia-insight-sidebar.component.ts","../../projects/angular-components/ia-insight/src/lib/ia-insight/components/ia-insight-sidebar/ia-insight-sidebar.component.html","../../projects/angular-components/ia-insight/src/lib/ia-insight/ia-insight.component.ts","../../projects/angular-components/ia-insight/src/lib/ia-insight/ia-insight.component.html","../../projects/angular-components/ia-insight/src/lib/ia-insight/ia-insight.module.ts","../../projects/angular-components/ia-insight/src/seniorsistemas-angular-components-ia-insight.ts"],"sourcesContent":["import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"s-ia-insight-card-loader\",\n templateUrl: \"./ia-insight-card-loader.component.html\",\n styleUrls: [\"./ia-insight-card-loader.component.scss\"],\n})\nexport class IAInsightCardLoaderComponent {}\n","<div class=\"ia-insight-card-loader\">\n <div class=\"loader\">\n <div class=\"loader-icon\">\n <div *sSVGFactory=\"'iassist'\"></div>\n </div>\n </div>\n \n <span class=\"loader-label\">{{ \"platform.angular_components.loading_insight\" | translate }}</span>\n</div>\n","import { Clipboard } from '@angular/cdk/clipboard';\nimport { Component, Input } from '@angular/core';\n\nimport { TranslateService } from '@ngx-translate/core';\nimport { ToastService } from '@seniorsistemas/angular-components/toast';\nimport { finalize, first } from 'rxjs/operators';\n\nimport { marked } from 'marked';\nimport { IAInsightItem } from '../../models/ia-insight-item';\n\n@Component({\n selector: 's-ia-insight-card',\n templateUrl: './ia-insight-card.component.html',\n styleUrls: ['./ia-insight-card.component.scss'],\n})\nexport class IAInsightCardComponent {\n @Input({ required: true })\n public insight!: IAInsightItem;\n\n public open = false;\n public isLoading = false;\n public content?: string;\n\n public likeSelected = false;\n public dislikeSelected = false;\n\n constructor(\n private readonly clipboard: Clipboard,\n private readonly toastService: ToastService,\n private readonly translateService: TranslateService,\n ) {}\n\n public toggle(): void {\n const newOpenState = !this.open;\n this.open = newOpenState;\n if (newOpenState === true && this.insight.onOpenSidebar) {\n this.insight.onOpenSidebar();\n } else if (newOpenState === false && this.insight.onCloseSideBar) {\n this.insight.onCloseSideBar();\n }\n if (newOpenState === true) {\n this._requestInsight();\n }\n }\n\n public onLikeSelected(): void {\n if (this.likeSelected) {\n this.likeSelected = false;\n } else {\n this.likeSelected = true;\n this.dislikeSelected = false;\n this.insight.onLikeSelected?.();\n }\n }\n\n public onDislikeSelected(): void {\n if (this.dislikeSelected) {\n this.dislikeSelected = false;\n } else {\n this.dislikeSelected = true;\n this.likeSelected = false;\n this.insight.onDislikeSelected?.();\n }\n }\n\n public copyContent(): void {\n if (!this.content) return;\n\n this.insight.onCopy?.(this.content);\n\n if (this.clipboard.copy(this.content)) {\n this.toastService.show({\n severity: 'info',\n title: this.translateService.instant('platform.angular_components.copied_to_clipboard'),\n });\n }\n }\n\n public reloadContent(): void {\n this._requestInsight();\n }\n\n private _requestInsight(): void {\n this.isLoading = true;\n\n this.insight.request$\n .pipe(\n first(),\n finalize(() => (this.isLoading = false)),\n )\n .subscribe(async (content: string) => {\n this.content = await marked(content);\n if (this.insight.onContentLoaded) {\n this.insight.onContentLoaded();\n }\n });\n }\n}\n","<div\n class=\"ia-insight-card\"\n [ngClass]=\"{ 'ia-insight-card--close': !open }\"\n>\n <div\n class=\"header\"\n (click)=\"toggle()\"\n >\n <s-badge\n text=\"Insight\"\n iconClass=\"fal fa-lightbulb\"\n ></s-badge>\n <span class=\"insight-title\">{{ insight.title }}</span>\n <span class=\"toggle-icon\">\n <i\n class=\"fas\"\n [ngClass]=\"{\n 'fa-angle-down': !open,\n 'fa-angle-up': open,\n }\"\n >\n </i>\n </span>\n </div>\n <div class=\"content\">\n <ng-container *ngIf=\"isLoading; then loadingBlock; else contentBlock\"></ng-container>\n <ng-template #loadingBlock>\n <s-ia-insight-card-loader></s-ia-insight-card-loader>\n </ng-template>\n <ng-template #contentBlock>\n <ng-container *ngIf=\"content; then successBlock; else errorBlock\"></ng-container>\n\n <ng-template #successBlock>\n <span\n class=\"text\"\n [innerHTML]=\"content\"\n ></span>\n <span class=\"insight-footer\">{{ \"platform.angular_components.insight_footer\" | translate }}</span>\n\n </ng-template>\n <ng-template #errorBlock>\n <span class=\"text text--error\">{{\n 'platform.angular_components.error_loading_insight_alt' | translate\n }}</span>\n </ng-template>\n\n <div class=\"options\">\n <button\n [disabled]=\"!content\"\n (click)=\"copyContent()\"\n class=\"option\"\n >\n <i class=\"fal fa-copy\"></i>\n </button>\n <button\n (click)=\"reloadContent()\"\n class=\"option\"\n >\n <i class=\"fal fa-redo\"></i>\n </button>\n <button\n *ngIf=\"insight.onLikeSelected\"\n [disabled]=\"!content\"\n (click)=\"onLikeSelected()\"\n class=\"option\"\n >\n <i\n [ngClass]=\"{\n fal: !likeSelected,\n fas: likeSelected,\n 'fa-thumbs-up': true,\n }\"\n >\n </i>\n </button>\n <button\n *ngIf=\"insight.onDislikeSelected\"\n [disabled]=\"!content\"\n (click)=\"onDislikeSelected()\"\n class=\"option\"\n >\n <i\n [ngClass]=\"{\n fal: !dislikeSelected,\n fas: dislikeSelected,\n 'fa-thumbs-down': true,\n }\"\n ></i>\n </button>\n </div>\n </ng-template>\n </div>\n</div>\n","import { Component, Input, output, TemplateRef } from '@angular/core';\n\nimport { IAInsightItem } from '../../models/index';\n\n@Component({\n selector: 's-ia-insight-sidebar',\n templateUrl: './ia-insight-sidebar.component.html',\n styleUrls: ['./ia-insight-sidebar.component.scss'],\n})\nexport class IAInsightSidebarComponent {\n @Input()\n public insights: IAInsightItem[] = [];\n\n @Input()\n public hasPermission = false;\n\n @Input()\n public introText?: string;\n\n @Input()\n public introTemplate: TemplateRef<any> | null = null;\n\n @Input()\n public emptyText?: string;\n\n @Input()\n public emptyTemplate: TemplateRef<any> | null = null;\n\n @Input()\n public noPermissionText?: string;\n\n @Input()\n public noPermissionTemplate: TemplateRef<any> | null = null;\n\n public closedSidebar = output<void>();\n\n public openedSidebar = output<void>();\n\n public opened = false;\n\n public toggle(): void {\n const newState = !this.opened;\n if (newState) {\n this.open();\n } else {\n this.close();\n }\n }\n\n public open(): void {\n this.opened = true;\n this.openedSidebar.emit();\n }\n\n public close(): void {\n this.opened = false;\n this.closedSidebar.emit();\n }\n}\n","<div\n class=\"sidebar\"\n [class.opened]=\"opened\">\n <div class=\"header\">\n <button (click)=\"close()\" class=\"option\">\n <span class=\"far fa-chevron-double-right\"></span>\n </button>\n <div class=\"title\">\n <span><ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container></span>\n <span>Insight</span>\n </div>\n </div>\n <div class=\"intro\">\n <ng-container *ngIf=\"hasPermission; then permissionBlock; else noPermissionBlock\"></ng-container>\n\n <ng-template #permissionBlock>\n <ng-container *ngIf=\"insights?.length; then introBlock; else emptyBlock\"></ng-container>\n\n <ng-template #introBlock>\n <ng-container *ngIf=\"introTemplate; then introCustomBlock; else introTextBlock\"></ng-container>\n\n <ng-template #introCustomBlock>\n <ng-container *ngTemplateOutlet=\"introTemplate\"></ng-container>\n </ng-template>\n\n <ng-template #introTextBlock>\n <span class=\"text\">{{ introText || \"platform.angular_components.insight_intro\" | translate }}</span>\n </ng-template>\n </ng-template>\n\n <ng-template #emptyBlock>\n <ng-container *ngIf=\"emptyTemplate; then emptyCustomBlock; else emptyTextBlock\"></ng-container>\n\n <ng-template #emptyCustomBlock>\n <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n </ng-template>\n\n <ng-template #emptyTextBlock>\n <span class=\"text\">{{ emptyText || \"platform.angular_components.insight_empty\" | translate }}</span>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template #noPermissionBlock>\n <ng-container *ngIf=\"noPermissionTemplate; then noPermissionCustomBlock; else noPermissionTextBlock\"></ng-container>\n\n <ng-template #noPermissionCustomBlock>\n <ng-container *ngTemplateOutlet=\"noPermissionTemplate\"></ng-container>\n </ng-template>\n\n <ng-template #noPermissionTextBlock>\n <span>{{ noPermissionText || \"platform.angular_components.insight_no_permission\" | translate }}</span>\n </ng-template>\n </ng-template>\n </div>\n <div class=\"insights\">\n <ng-container *ngIf=\"insights?.length\">\n <s-ia-insight-card\n *ngFor=\"let insight of insights\"\n [insight]=\"insight\">\n </s-ia-insight-card>\n </ng-container>\n </div>\n</div>\n\n<ng-template #iassistIcon>\n <div style=\"width: 28px; height: 28px;\">\n <span *sSVGFactory=\"'iassist'\"></span>\n </div>\n</ng-template>\n","import {\n AfterContentInit,\n Component,\n ContentChildren,\n Input,\n output,\n QueryList,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\n\nimport { IAInsightSidebarComponent } from './components/ia-insight-sidebar/ia-insight-sidebar.component';\nimport { IAInsightItem } from './models/ia-insight-item';\nimport { IAInsightTemplateTypes } from './models/ia-insight-template-types';\nimport { TemplateDirective } from '@seniorsistemas/angular-components/template';\n\n@Component({\n selector: 's-ia-insight',\n templateUrl: './ia-insight.component.html',\n})\nexport class IAInsightComponent implements AfterContentInit {\n @Input()\n public insights: IAInsightItem[] = [];\n\n @Input()\n public hasPermission = true;\n\n @Input()\n public introText?: string;\n\n @Input()\n public emptyText?: string;\n\n @Input()\n public noPermissionText?: string;\n\n @ViewChild(IAInsightSidebarComponent)\n public sidebar: IAInsightSidebarComponent | null = null;\n\n @ContentChildren(TemplateDirective)\n public templates: QueryList<TemplateDirective> | null = null;\n\n public openIAInsight = output<void>();\n\n public closedIAInsight = output<void>();\n\n public introTemplate: TemplateRef<any> | null = null;\n public emptyTemplate: TemplateRef<any> | null = null;\n public noPermissionTemplate: TemplateRef<any> | null = null;\n\n public ngAfterContentInit(): void {\n this._getTemplates();\n }\n\n public open(): void {\n this.sidebar?.open();\n }\n\n public close(): void {\n this.sidebar?.close();\n }\n\n public getIntroTemplate(): TemplateRef<any> | null {\n return this._getCustomTemplate('intro');\n }\n\n public getNoPermissionTemplate(): TemplateRef<any> | null {\n return this._getCustomTemplate('no-permission');\n }\n\n public getEmptyTemplate(): TemplateRef<any> | null {\n return this._getCustomTemplate('empty');\n }\n\n private _getCustomTemplate(type: IAInsightTemplateTypes): TemplateRef<any> | null {\n return this.templates?.find((template: TemplateDirective) => template.type === type)?.template ?? null;\n }\n\n private _getTemplates(): void {\n this.introTemplate = this.getIntroTemplate();\n this.emptyTemplate = this.getEmptyTemplate();\n this.noPermissionTemplate = this.getNoPermissionTemplate();\n }\n}\n","<s-ia-insight-sidebar\n #sidebar\n [insights]=\"insights\"\n [hasPermission]=\"hasPermission\"\n [introText]=\"introText\"\n [introTemplate]=\"introTemplate\"\n [emptyText]=\"emptyText\"\n [emptyTemplate]=\"emptyTemplate\"\n [noPermissionText]=\"noPermissionText\"\n [noPermissionTemplate]=\"noPermissionTemplate\"\n (openedSidebar)=\"openIAInsight.emit()\"\n (closedSidebar)=\"closedIAInsight.emit()\"\n>\n</s-ia-insight-sidebar>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { TranslateModule } from '@ngx-translate/core';\nimport { BadgeModule } from '@seniorsistemas/angular-components/badge';\nimport { ButtonModule } from '@seniorsistemas/angular-components/button';\nimport { TemplateModule } from '@seniorsistemas/angular-components/template';\nimport { TooltipModule } from '@seniorsistemas/angular-components/tooltip';\n\nimport { IAInsightCardComponent } from './components/ia-insight-card/ia-insight-card.component';\nimport { IAInsightSidebarComponent } from './components/ia-insight-sidebar/ia-insight-sidebar.component';\nimport { IAInsightCardLoaderComponent } from './components/ia-insight-card/components/ia-insight-card-loader/ia-insight-card-loader.component';\nimport { IAInsightComponent } from './ia-insight.component';\nimport { SVGFactoryModule } from '@seniorsistemas/angular-components/common';\n\n@NgModule({\n imports: [\n CommonModule,\n TranslateModule,\n BadgeModule,\n ButtonModule,\n TooltipModule,\n TemplateModule,\n SVGFactoryModule,\n ],\n declarations: [IAInsightComponent, IAInsightCardComponent, IAInsightSidebarComponent, IAInsightCardLoaderComponent],\n exports: [IAInsightComponent, TemplateModule],\n})\nexport class IAInsightModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i1","i4","i6.IAInsightCardLoaderComponent","i3.IAInsightCardComponent","i1.IAInsightSidebarComponent"],"mappings":";;;;;;;;;;;;;;;;;;MAOa,4BAA4B,CAAA;wGAA5B,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA5B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,4BAA4B,gECPzC,wTASA,EAAA,MAAA,EAAA,CAAA,6lBAAA,CAAA,EAAA,Y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AA,EAAA,CAGV,kBAAkB,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;AAEnC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAXpB,YAAY;YACZ,eAAe;YACf,WAAW;YACX,YAAY;YACZ,aAAa;YACb,cAAc;AACd,YAAA,gBAAgB,EAGU,cAAc,CAAA,EAAA,CAAA,CAAA;;4FAEnC,eAAe,EAAA,UAAA,EAAA,CAAA;kBAb3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,eAAe;wBACf,WAAW;wBACX,YAAY;wBACZ,aAAa;wBACb,cAAc;wBACd,gBAAgB;AACnB,qBAAA;oBACD,YAAY,EAAE,CAAC,kBAAkB,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,4BAA4B,CAAC;AACnH,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,cAAc,CAAC;AAChD,iBAAA,CAAA;;;AC3BD;;AAEG;;;;"}
|
|
@@ -192,7 +192,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
192
192
|
class KanbanItemDraggingComponent {
|
|
193
193
|
quantityItems = 0;
|
|
194
194
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KanbanItemDraggingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
195
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: KanbanItemDraggingComponent, selector: "s-kanban-item-dragging", inputs: { quantityItems: "quantityItems" }, ngImport: i0, template: "<div class=\"kanban-item-dragging-container\">\n <div\n *ngIf=\"quantityItems\"\n class=\"kanban-item-dragging\">\n </div>\n\n <div\n class=\"kanban-item-dragging\"\n [ngClass]=\"{ 'kanban-item-dragging--over': quantityItems }\">\n <div class=\"content\">\n <input type=\"checkbox\" checked />\n <s-badge\n [text]=\"'platform.angular_components.count_items_selected' | translate:{ count: quantityItems }\"\n color=\"blue\">\n </s-badge>\n </div>\n </div>\n\n</div>\n", styles: [".kanban-item-dragging-container:has(.kanban-item-dragging--over){padding-top:12px}.kanban-item-dragging{background-color:#fff;border:1px solid #428bca;border-radius:4px;box-shadow:0 1px 5px #00000040;height:52px;padding:16px;width:260px}.kanban-item-dragging .content{display:flex;gap:16px}.kanban-item-dragging--over{left:12px;position:relative;top:-64px}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.BadgeComponent, selector: "s-badge", inputs: ["type", "color", "title", "text", "selectable", "iconClass", "iconPosition", "infoSign"], outputs: ["selected"] }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] });
|
|
195
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: KanbanItemDraggingComponent, selector: "s-kanban-item-dragging", inputs: { quantityItems: "quantityItems" }, ngImport: i0, template: "<div class=\"kanban-item-dragging-container\">\n <div\n *ngIf=\"quantityItems\"\n class=\"kanban-item-dragging\">\n </div>\n\n <div\n class=\"kanban-item-dragging\"\n [ngClass]=\"{ 'kanban-item-dragging--over': quantityItems }\">\n <div class=\"content\">\n <input type=\"checkbox\" checked />\n <s-badge\n [text]=\"'platform.angular_components.count_items_selected' | translate:{ count: quantityItems }\"\n color=\"blue\">\n </s-badge>\n </div>\n </div>\n\n</div>\n", styles: [".kanban-item-dragging-container:has(.kanban-item-dragging--over){padding-top:12px}.kanban-item-dragging{background-color:#fff;border:1px solid #428bca;border-radius:4px;box-shadow:0 1px 5px #00000040;height:52px;padding:16px;width:260px}.kanban-item-dragging .content{display:flex;gap:16px}.kanban-item-dragging--over{left:12px;position:relative;top:-64px}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.BadgeComponent, selector: "s-badge", inputs: ["type", "color", "title", "text", "selectable", "iconClass", "iconPosition", "infoSign", "enableTruncateText"], outputs: ["selected"] }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] });
|
|
196
196
|
}
|
|
197
197
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KanbanItemDraggingComponent, decorators: [{
|
|
198
198
|
type: Component,
|