keevo-components 2.0.149 → 2.0.150
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/esm2022/lib/components/kv-detailed-list/kv-detailed-list.component.mjs +175 -0
- package/esm2022/public-api.mjs +5 -1
- package/fesm2022/keevo-components.mjs +159 -1
- package/fesm2022/keevo-components.mjs.map +1 -1
- package/lib/components/kv-button/kv-button.component.d.ts +1 -1
- package/lib/components/kv-detailed-list/kv-detailed-list.component.d.ts +60 -0
- package/lib/components/kv-filter-cards/kv-filter-cards.component.d.ts +1 -1
- package/lib/components/kv-icon/kv-icon.component.d.ts +1 -1
- package/lib/components/kv-tag/kv-tag.component.d.ts +1 -1
- package/lib/components/kv-widget-card/kv-widget-card.component.d.ts +2 -2
- package/package.json +1 -1
- package/public-api.d.ts +4 -0
|
@@ -11021,6 +11021,164 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
11021
11021
|
args: ['op']
|
|
11022
11022
|
}] } });
|
|
11023
11023
|
|
|
11024
|
+
class KvDetailedListComponent {
|
|
11025
|
+
constructor(notificationService) {
|
|
11026
|
+
this.notificationService = notificationService;
|
|
11027
|
+
// #region Signals
|
|
11028
|
+
this.dataSource = input([]);
|
|
11029
|
+
this.paginaInicial = signal(1);
|
|
11030
|
+
this.arquivo = input(undefined);
|
|
11031
|
+
this.arquivoPreview = signal(undefined);
|
|
11032
|
+
this.nomeArquivo = signal('');
|
|
11033
|
+
this.type = input(undefined);
|
|
11034
|
+
this.blob = input('');
|
|
11035
|
+
this.idarquivo = signal(undefined);
|
|
11036
|
+
this.ekpContent = input(undefined);
|
|
11037
|
+
this.totalItensCarregado = computed(() => this.dataSource()?.length || 0);
|
|
11038
|
+
this.widthPage = signal(0);
|
|
11039
|
+
this.previewOn = false;
|
|
11040
|
+
this.selectedItem = {};
|
|
11041
|
+
this.totalRecords = 0;
|
|
11042
|
+
this.isLoading = false;
|
|
11043
|
+
this.displaySidebar = false;
|
|
11044
|
+
this.isSelected = false;
|
|
11045
|
+
this.visualizadorDocumentos = false;
|
|
11046
|
+
this.indvisualizado = false;
|
|
11047
|
+
this.isLoadingSkeleton = false;
|
|
11048
|
+
this.borderCardNaoVisualizado = true;
|
|
11049
|
+
this.contentForm = false;
|
|
11050
|
+
this.enableSearch = false;
|
|
11051
|
+
this.searchPlaceholder = 'Pesquisar...';
|
|
11052
|
+
this.listTitle = '';
|
|
11053
|
+
this.contentViewer = false;
|
|
11054
|
+
this.keyVisualizado = 'indvisualizado';
|
|
11055
|
+
// #endregion
|
|
11056
|
+
// #region Outputs
|
|
11057
|
+
this.onScrollHandler = new EventEmitter();
|
|
11058
|
+
this.onSelectFile = new EventEmitter();
|
|
11059
|
+
this.onSave = new EventEmitter();
|
|
11060
|
+
this.onCancel = new EventEmitter();
|
|
11061
|
+
this.onSearch = new EventEmitter();
|
|
11062
|
+
}
|
|
11063
|
+
todayDate() {
|
|
11064
|
+
const today = new Date();
|
|
11065
|
+
return today.toLocaleDateString('pt-BR', { day: '2-digit', month: '2-digit', year: 'numeric' });
|
|
11066
|
+
}
|
|
11067
|
+
// #endregion
|
|
11068
|
+
trackByFn(index, item) {
|
|
11069
|
+
return item.idarquivo;
|
|
11070
|
+
}
|
|
11071
|
+
isVisualizado(option) {
|
|
11072
|
+
return option[this.keyVisualizado] || false;
|
|
11073
|
+
}
|
|
11074
|
+
visualizarPreview(arquivo, buttonTemplate) {
|
|
11075
|
+
if (buttonTemplate) {
|
|
11076
|
+
this.contentViewer = true;
|
|
11077
|
+
}
|
|
11078
|
+
else {
|
|
11079
|
+
arquivo[this.keyVisualizado] = true;
|
|
11080
|
+
this.contentViewer = true;
|
|
11081
|
+
this.arquivoPreview.set(arquivo);
|
|
11082
|
+
}
|
|
11083
|
+
this.onSelectFile.emit(arquivo);
|
|
11084
|
+
}
|
|
11085
|
+
OnSave() {
|
|
11086
|
+
this.onSave.emit();
|
|
11087
|
+
this.contentViewer = false;
|
|
11088
|
+
this.arquivoPreview.set(undefined);
|
|
11089
|
+
}
|
|
11090
|
+
OnCancel() {
|
|
11091
|
+
this.notificationService.question({
|
|
11092
|
+
type: 'question',
|
|
11093
|
+
message: 'Você fez alterações que não foram salvas. Tem certeza que deseja cancelar?',
|
|
11094
|
+
accept: () => {
|
|
11095
|
+
this.onCancel.emit();
|
|
11096
|
+
this.contentViewer = false;
|
|
11097
|
+
this.arquivoPreview.set(undefined);
|
|
11098
|
+
},
|
|
11099
|
+
});
|
|
11100
|
+
}
|
|
11101
|
+
onGlobalFilter(event) {
|
|
11102
|
+
this.onSearch.emit(event.target.value);
|
|
11103
|
+
}
|
|
11104
|
+
ngOnInit() {
|
|
11105
|
+
this.widthPage.set(window.innerWidth);
|
|
11106
|
+
document.addEventListener('fullscreenchange', () => {
|
|
11107
|
+
const button = document.getElementById('fullscreenBtn');
|
|
11108
|
+
if (button) {
|
|
11109
|
+
if (!document.fullscreenElement) {
|
|
11110
|
+
button.textContent = 'open_in_full';
|
|
11111
|
+
}
|
|
11112
|
+
else {
|
|
11113
|
+
button.textContent = 'close_fullscreen';
|
|
11114
|
+
}
|
|
11115
|
+
}
|
|
11116
|
+
});
|
|
11117
|
+
}
|
|
11118
|
+
scrollHandler($event) {
|
|
11119
|
+
const element = $event.target;
|
|
11120
|
+
//se o escroll chegar até o final
|
|
11121
|
+
if (element.scrollHeight - element.scrollTop === element.clientHeight) {
|
|
11122
|
+
// this.buscarProximosDocumentos();
|
|
11123
|
+
this.onScrollHandler.emit($event);
|
|
11124
|
+
}
|
|
11125
|
+
}
|
|
11126
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvDetailedListComponent, deps: [{ token: NotificationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11127
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvDetailedListComponent, isStandalone: true, selector: "kv-detailed-list", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, arquivo: { classPropertyName: "arquivo", publicName: "arquivo", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, blob: { classPropertyName: "blob", publicName: "blob", isSignal: true, isRequired: false, transformFunction: null }, ekpContent: { classPropertyName: "ekpContent", publicName: "ekpContent", isSignal: true, isRequired: false, transformFunction: null }, extencaoDocumento: { classPropertyName: "extencaoDocumento", publicName: "extencaoDocumento", isSignal: false, isRequired: false, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: false, isRequired: false, transformFunction: null }, visualizadorDocumentos: { classPropertyName: "visualizadorDocumentos", publicName: "visualizadorDocumentos", isSignal: false, isRequired: false, transformFunction: null }, cardTemplate: { classPropertyName: "cardTemplate", publicName: "cardTemplate", isSignal: false, isRequired: false, transformFunction: null }, contentTemplate: { classPropertyName: "contentTemplate", publicName: "contentTemplate", isSignal: false, isRequired: false, transformFunction: null }, noDocumentSelectedTemplate: { classPropertyName: "noDocumentSelectedTemplate", publicName: "noDocumentSelectedTemplate", isSignal: false, isRequired: false, transformFunction: null }, noDocumentListTemplate: { classPropertyName: "noDocumentListTemplate", publicName: "noDocumentListTemplate", isSignal: false, isRequired: false, transformFunction: null }, buttonTemplate: { classPropertyName: "buttonTemplate", publicName: "buttonTemplate", isSignal: false, isRequired: false, transformFunction: null }, listBottomTemplate: { classPropertyName: "listBottomTemplate", publicName: "listBottomTemplate", isSignal: false, isRequired: false, transformFunction: null }, indvisualizado: { classPropertyName: "indvisualizado", publicName: "indvisualizado", isSignal: false, isRequired: false, transformFunction: null }, isLoadingSkeleton: { classPropertyName: "isLoadingSkeleton", publicName: "isLoadingSkeleton", isSignal: false, isRequired: false, transformFunction: null }, borderCardNaoVisualizado: { classPropertyName: "borderCardNaoVisualizado", publicName: "borderCardNaoVisualizado", isSignal: false, isRequired: false, transformFunction: null }, contentForm: { classPropertyName: "contentForm", publicName: "contentForm", isSignal: false, isRequired: false, transformFunction: null }, enableSearch: { classPropertyName: "enableSearch", publicName: "enableSearch", isSignal: false, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: false, isRequired: false, transformFunction: null }, listTitle: { classPropertyName: "listTitle", publicName: "listTitle", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { onScrollHandler: "onScrollHandler", onSelectFile: "onSelectFile", onSave: "onSave", onCancel: "onCancel", onSearch: "onSearch" }, ngImport: i0, template: "<div\r\n class=\"flex flex-column md:flex-row gap-2 custom-max-height \"\r\n style=\"height: 100%\"\r\n>\r\n <!-- Lista -->\r\n <div\r\n class=\"card-perfil col-12 md:col-4 lg:col-3 flex flex-column justify-content-between\"\r\n (scroll)=\"scrollHandler($event)\"\r\n [ngClass]=\"{\r\n 'overflow-y-auto': dataSource().length > 0,\r\n 'overflow-y-hidden': dataSource().length === 0\r\n }\"\r\n style=\"position: relative; height: 100%; min-height: 15rem\"\r\n >\r\n \r\n <div class=\"col-12\">\r\n <div class=\"flex align-items-center\">\r\n @if(listTitle) {\r\n <p class=\"w-full flex align-items-start font-semibold text-md\">{{listTitle}}</p>\r\n }\r\n @if(enableSearch) {\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"widthPage() > 800\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter($event)\"\r\n [placeholder]=\"searchPlaceholder\"\r\n autocomplete=\"off\"\r\n #inputField\r\n class=\"text-sm col-6\"\r\n style=\"height: 2rem;\"/>\r\n }\r\n </div>\r\n <div *ngIf=\"dataSource().length > 0; else emptyDocumentList\" class=\"mt-2\">\r\n <!-- Lista de cards -->\r\n <div\r\n *ngFor=\"let option of dataSource(); trackBy: trackByFn\"\r\n class=\"card-normal outline-none border-round-xl w-full p-2 m-1 grid p-fluid flex flex-row flex-nowrap align-items-center justify-content-center cursor-pointer\"\r\n (click)=\"visualizarPreview(option)\"\r\n [ngClass]=\"{\r\n 'card-selected': option === arquivoPreview(),\r\n 'card-normal': option !== arquivoPreview(),\r\n }\"\r\n >\r\n <div\r\n class=\"flex flex-grow-1 ml-2 flex-column gap-1 m-0 p-0 overflow-hidden text-overflow-ellipsis\"\r\n style=\"max-width: 100%\"\r\n >\r\n <ng-container *ngIf=\"cardTemplate; else defaultTemplate\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cardTemplate; context: { $implicit: option }\"\r\n ></ng-container>\r\n </ng-container>\r\n </div>\r\n\r\n <ng-template #defaultTemplate>\r\n <div class=\"card-common-style default-card\">\r\n <h1 class=\"font-bold text-base p-0 m-0\">Bem-vindo!</h1>\r\n <p class=\"text-sm mt-2\">\r\n Kv-detailed-list aguardando um template...\r\n </p>\r\n <p class=\"font-bold text-sm p-0 m-0\">Data: {{ todayDate() }}</p>\r\n </div>\r\n </ng-template>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-template #emptyDocumentList>\r\n @if(isLoadingSkeleton){\r\n <p-skeleton \r\n *ngFor=\"let i of [1, 2, 3, 4, 5, 6, 7, 8, 9]\" \r\n height=\"5rem\" \r\n [style]=\"{ 'margin-bottom': '0.25rem', 'borderRadius': '0.75rem' }\"\r\n ></p-skeleton>\r\n } @if(!noDocumentListTemplate) {\r\n <div class=\"text-center text-gray-600 mt-4 m-3\" style=\"height: 100%\">\r\n <div class=\"flex align-items-center gap-1\">\r\n <span class=\"material-symbols-outlined\"> inbox </span>\r\n <p>Nenhum documento dispon\u00EDvel.</p>\r\n </div>\r\n </div>\r\n } @else {\r\n <div class=\"text-center mt-4 m-3\" style=\"height: 100%\">\r\n <ng-container *ngTemplateOutlet=\"noDocumentListTemplate\"></ng-container>\r\n </div>\r\n }\r\n </ng-template>\r\n\r\n <!-- Contador de documentos - Fixo na parte inferior -->\r\n <div\r\n class=\"sticky-counter flex flex-column\r\n justify-content-center text-center px-2 p-2\"\r\n style=\"position: sticky; bottom: -10px; background-color: white; \"\r\n >\r\n <span>{{ totalItensCarregado() }} de {{ totalRecords }}</span>\r\n @if(listBottomTemplate) {\r\n <ng-container *ngTemplateOutlet=\"listBottomTemplate\"></ng-container>\r\n }\r\n </div>\r\n\r\n </div>\r\n\r\n <!-- Visualizador -->\r\n <div\r\n id=\"fullscreenDiv\"\r\n class=\"card-visualizador col-12 md:col-8 lg:col-9 flex-1\"\r\n style=\"position: relative;\"\r\n [ngStyle]=\"{\r\n 'overflow-y': arquivoPreview() ? 'auto' : 'hidden'\r\n }\"\r\n >\r\n @if(buttonTemplate && !contentViewer) {\r\n <div class=\"grid\">\r\n <div class=\"col\"></div>\r\n <span class=\"p-3\">\r\n <span (click)=\"visualizarPreview(null, true)\">\r\n <ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\r\n </span>\r\n </span>\r\n </div>\r\n } @if(visualizadorDocumentos) {\r\n <ng-container *ngIf=\"arquivo(); else noDocumentSelected\">\r\n @if(isLoading) {\r\n <ngx-loading\r\n [show]=\"isLoading\"\r\n [config]=\"{ backdropBorderRadius: '3px', fullScreenBackdrop: false }\"\r\n ></ngx-loading>\r\n }\r\n <kv-file-viewer-novo\r\n *ngIf=\"extencaoDocumento !== 'ekp'\"\r\n [arquivo]=\"arquivo()!\"\r\n [type]=\"type()!\"\r\n [blob]=\"blob()!\"\r\n [width]=\"'100%'\"\r\n [height]=\"'100%'\"\r\n class=\"file-viewer\"\r\n style=\"max-height: 100%\"\r\n >\r\n </kv-file-viewer-novo>\r\n\r\n <div\r\n id=\"html-content\"\r\n [innerHTML]=\"ekpContent()\"\r\n *ngIf=\"extencaoDocumento === 'ekp'\"\r\n class=\"ekp-content\"\r\n style=\"overflow-y: auto; max-height: 100%\"\r\n ></div>\r\n </ng-container>\r\n } @else {\r\n <div class=\"flex flex-column\" style=\"height: 92%;\" >\r\n <ng-container\r\n *ngIf=\"arquivoPreview() || contentViewer; else noDocumentSelected\"\r\n >\r\n <div style=\"flex: 1;\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n contentTemplate;\r\n context: { $implicit: arquivoPreview() }\r\n \"\r\n style=\"overflow-y: auto; max-height: 100%\"\r\n ></ng-container>\r\n </div>\r\n @if(contentForm) {\r\n <div class=\"grid\" style=\"position: sticky; bottom: 0; background-color: white; z-index: 10; padding: 1rem 1rem 0 1rem;\">\r\n <div class=\"col-8\">\r\n <span class=\"text-sm\">\r\n <span class=\"font-bold\">*</span> Campos obrigat\u00F3rios\r\n </span>\r\n </div>\r\n <div class=\"col-2\">\r\n <kv-button\r\n label=\"Cancelar\"\r\n icon=\"close\"\r\n class=\"w-full md:w-auto\"\r\n severity=\"tertiary\"\r\n (onClick)=\"OnCancel()\"\r\n >\r\n </kv-button>\r\n </div>\r\n <div class=\"col-2\">\r\n <kv-button\r\n label=\"Salvar\"\r\n icon=\"save\"\r\n class=\"w-full md:w-auto\"\r\n severity=\"primary\"\r\n (onClick)=\"OnSave()\"\r\n >\r\n </kv-button>\r\n </div>\r\n </div>\r\n }\r\n </ng-container>\r\n </div> \r\n }\r\n <ng-template #noDocumentSelected>\r\n @if(!noDocumentSelectedTemplate) {\r\n <div\r\n class=\"no-document-message flex flex-column align-items-center justify-content-center\"\r\n style=\"height: 100%; overflow-y: auto\"\r\n >\r\n <p class=\"text-center text-gray-500\">\r\n Selecione um arquivo para visualiza\u00E7\u00E3o\r\n </p>\r\n <img\r\n [src]=\"\r\n 'https://work-assets.keevo.com.br/img/Sem_Dados.png'\r\n \"\r\n style=\"max-height: 50%; margin-top: 2rem\"\r\n alt=\"\"\r\n />\r\n </div>\r\n } @else {\r\n <ng-container\r\n *ngTemplateOutlet=\"noDocumentSelectedTemplate\"\r\n ></ng-container>\r\n }\r\n </ng-template>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.farol-statuspublicacao{margin-right:.5rem;width:.35rem;border-radius:1rem;-webkit-border-radius:1rem;-moz-border-radius:1rem;-ms-border-radius:1rem;-o-border-radius:1rem}:host ::ng-deep .p-sidebar{border-radius:5px;position:absolute;height:var(--sidebar-height)}:host ::ng-deep .p-sidebar .p-sidebar-content{overflow:auto;border:1px solid #e5e7eb;border-radius:5px;margin-top:1rem}.card-perfil,.card-visualizador{border:1.5px solid #CBD5E1;background:#fff;border-radius:6px;max-height:100%}@media (max-width: 768px){.card-perfil{max-height:20rem;overflow-y:auto}}@media (max-width: 768px){.card-visualizador{max-height:100%;overflow-y:auto}}:host ::ng-deep .p-fieldset .p-fieldset-content{padding-bottom:0}:host ::ng-deep .p-sidebar .p-sidebar-close{display:none}.card-normal{border:1.5px solid #CBD5E1}.card-naoVisualizado{border-left:4px solid #e6671f}.parent-container{height:100%;display:flex;flex-direction:column}.file-viewer{margin:auto}.ekp-content{min-height:20rem;padding:1rem;overflow-y:auto;border-radius:5px}ngx-loading{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1000}.card{transition:all .3s ease;border:1px solid transparent}.card-normal:hover{border:1px solid #a9a9a9;box-shadow:0 4px 8px #0000001a}.card-selected{background-color:#f0f0f0;border:1px solid #c0c0c0;box-shadow:0 6px 12px #00000026;transform:scale(1.02)}.loading-spinner{display:flex;align-items:center;justify-content:center;height:100%;font-size:1.5rem;color:#666}#html-content{width:100%;height:100%;overflow-y:auto}:host ::ng-deep .list-card-button .kv-button{width:22px;height:22px}:host ::ng-deep .list-card-button .kv-button .material-symbols-outlined.only-icon.icon-normal[_ngcontent-ng-c4083184952]{font-size:1rem}.custom-max-height{height:100%}@media (max-height: 768px){.custom-max-height{height:auto;min-height:100vh}}.download-icon{font-size:20px;cursor:pointer;transition:transform .3s ease,color .3s ease}.download-icon:hover{color:#0f6cbd;transform:scale(1.2)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: PdfViewerModule }, { kind: "ngmodule", type: PrimeNgModule }, { kind: "directive", type: i5$1.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i5$3.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i12.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: KvFileViewerNovoModule }, { kind: "component", type: KvFileViewerNovoComponent, selector: "kv-file-viewer-novo", inputs: ["arquivo", "type", "blob", "width", "height"] }, { kind: "ngmodule", type: NgxLoadingModule }, { kind: "component", type: i1$5.NgxLoadingComponent, selector: "ngx-loading", inputs: ["show", "config", "template"] }, { kind: "ngmodule", type: KvButtonModule }, { kind: "component", type: KvButtonComponent, selector: "kv-button", inputs: ["fullWidth", "type", "loading", "severity", "size", "icon", "iconPosition", "label", "disabled", "items", "popup", "popupIcon"], outputs: ["iconChange", "onClick"] }, { kind: "ngmodule", type: KvButtonsModule }] }); }
|
|
11128
|
+
}
|
|
11129
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvDetailedListComponent, decorators: [{
|
|
11130
|
+
type: Component,
|
|
11131
|
+
args: [{ selector: 'kv-detailed-list', standalone: true, imports: [CommonModule,
|
|
11132
|
+
PdfViewerModule,
|
|
11133
|
+
PrimeNgModule,
|
|
11134
|
+
KvFileViewerNovoModule,
|
|
11135
|
+
NgxLoadingModule,
|
|
11136
|
+
KvButtonModule,
|
|
11137
|
+
KvButtonsModule], template: "<div\r\n class=\"flex flex-column md:flex-row gap-2 custom-max-height \"\r\n style=\"height: 100%\"\r\n>\r\n <!-- Lista -->\r\n <div\r\n class=\"card-perfil col-12 md:col-4 lg:col-3 flex flex-column justify-content-between\"\r\n (scroll)=\"scrollHandler($event)\"\r\n [ngClass]=\"{\r\n 'overflow-y-auto': dataSource().length > 0,\r\n 'overflow-y-hidden': dataSource().length === 0\r\n }\"\r\n style=\"position: relative; height: 100%; min-height: 15rem\"\r\n >\r\n \r\n <div class=\"col-12\">\r\n <div class=\"flex align-items-center\">\r\n @if(listTitle) {\r\n <p class=\"w-full flex align-items-start font-semibold text-md\">{{listTitle}}</p>\r\n }\r\n @if(enableSearch) {\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"widthPage() > 800\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter($event)\"\r\n [placeholder]=\"searchPlaceholder\"\r\n autocomplete=\"off\"\r\n #inputField\r\n class=\"text-sm col-6\"\r\n style=\"height: 2rem;\"/>\r\n }\r\n </div>\r\n <div *ngIf=\"dataSource().length > 0; else emptyDocumentList\" class=\"mt-2\">\r\n <!-- Lista de cards -->\r\n <div\r\n *ngFor=\"let option of dataSource(); trackBy: trackByFn\"\r\n class=\"card-normal outline-none border-round-xl w-full p-2 m-1 grid p-fluid flex flex-row flex-nowrap align-items-center justify-content-center cursor-pointer\"\r\n (click)=\"visualizarPreview(option)\"\r\n [ngClass]=\"{\r\n 'card-selected': option === arquivoPreview(),\r\n 'card-normal': option !== arquivoPreview(),\r\n }\"\r\n >\r\n <div\r\n class=\"flex flex-grow-1 ml-2 flex-column gap-1 m-0 p-0 overflow-hidden text-overflow-ellipsis\"\r\n style=\"max-width: 100%\"\r\n >\r\n <ng-container *ngIf=\"cardTemplate; else defaultTemplate\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cardTemplate; context: { $implicit: option }\"\r\n ></ng-container>\r\n </ng-container>\r\n </div>\r\n\r\n <ng-template #defaultTemplate>\r\n <div class=\"card-common-style default-card\">\r\n <h1 class=\"font-bold text-base p-0 m-0\">Bem-vindo!</h1>\r\n <p class=\"text-sm mt-2\">\r\n Kv-detailed-list aguardando um template...\r\n </p>\r\n <p class=\"font-bold text-sm p-0 m-0\">Data: {{ todayDate() }}</p>\r\n </div>\r\n </ng-template>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-template #emptyDocumentList>\r\n @if(isLoadingSkeleton){\r\n <p-skeleton \r\n *ngFor=\"let i of [1, 2, 3, 4, 5, 6, 7, 8, 9]\" \r\n height=\"5rem\" \r\n [style]=\"{ 'margin-bottom': '0.25rem', 'borderRadius': '0.75rem' }\"\r\n ></p-skeleton>\r\n } @if(!noDocumentListTemplate) {\r\n <div class=\"text-center text-gray-600 mt-4 m-3\" style=\"height: 100%\">\r\n <div class=\"flex align-items-center gap-1\">\r\n <span class=\"material-symbols-outlined\"> inbox </span>\r\n <p>Nenhum documento dispon\u00EDvel.</p>\r\n </div>\r\n </div>\r\n } @else {\r\n <div class=\"text-center mt-4 m-3\" style=\"height: 100%\">\r\n <ng-container *ngTemplateOutlet=\"noDocumentListTemplate\"></ng-container>\r\n </div>\r\n }\r\n </ng-template>\r\n\r\n <!-- Contador de documentos - Fixo na parte inferior -->\r\n <div\r\n class=\"sticky-counter flex flex-column\r\n justify-content-center text-center px-2 p-2\"\r\n style=\"position: sticky; bottom: -10px; background-color: white; \"\r\n >\r\n <span>{{ totalItensCarregado() }} de {{ totalRecords }}</span>\r\n @if(listBottomTemplate) {\r\n <ng-container *ngTemplateOutlet=\"listBottomTemplate\"></ng-container>\r\n }\r\n </div>\r\n\r\n </div>\r\n\r\n <!-- Visualizador -->\r\n <div\r\n id=\"fullscreenDiv\"\r\n class=\"card-visualizador col-12 md:col-8 lg:col-9 flex-1\"\r\n style=\"position: relative;\"\r\n [ngStyle]=\"{\r\n 'overflow-y': arquivoPreview() ? 'auto' : 'hidden'\r\n }\"\r\n >\r\n @if(buttonTemplate && !contentViewer) {\r\n <div class=\"grid\">\r\n <div class=\"col\"></div>\r\n <span class=\"p-3\">\r\n <span (click)=\"visualizarPreview(null, true)\">\r\n <ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\r\n </span>\r\n </span>\r\n </div>\r\n } @if(visualizadorDocumentos) {\r\n <ng-container *ngIf=\"arquivo(); else noDocumentSelected\">\r\n @if(isLoading) {\r\n <ngx-loading\r\n [show]=\"isLoading\"\r\n [config]=\"{ backdropBorderRadius: '3px', fullScreenBackdrop: false }\"\r\n ></ngx-loading>\r\n }\r\n <kv-file-viewer-novo\r\n *ngIf=\"extencaoDocumento !== 'ekp'\"\r\n [arquivo]=\"arquivo()!\"\r\n [type]=\"type()!\"\r\n [blob]=\"blob()!\"\r\n [width]=\"'100%'\"\r\n [height]=\"'100%'\"\r\n class=\"file-viewer\"\r\n style=\"max-height: 100%\"\r\n >\r\n </kv-file-viewer-novo>\r\n\r\n <div\r\n id=\"html-content\"\r\n [innerHTML]=\"ekpContent()\"\r\n *ngIf=\"extencaoDocumento === 'ekp'\"\r\n class=\"ekp-content\"\r\n style=\"overflow-y: auto; max-height: 100%\"\r\n ></div>\r\n </ng-container>\r\n } @else {\r\n <div class=\"flex flex-column\" style=\"height: 92%;\" >\r\n <ng-container\r\n *ngIf=\"arquivoPreview() || contentViewer; else noDocumentSelected\"\r\n >\r\n <div style=\"flex: 1;\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n contentTemplate;\r\n context: { $implicit: arquivoPreview() }\r\n \"\r\n style=\"overflow-y: auto; max-height: 100%\"\r\n ></ng-container>\r\n </div>\r\n @if(contentForm) {\r\n <div class=\"grid\" style=\"position: sticky; bottom: 0; background-color: white; z-index: 10; padding: 1rem 1rem 0 1rem;\">\r\n <div class=\"col-8\">\r\n <span class=\"text-sm\">\r\n <span class=\"font-bold\">*</span> Campos obrigat\u00F3rios\r\n </span>\r\n </div>\r\n <div class=\"col-2\">\r\n <kv-button\r\n label=\"Cancelar\"\r\n icon=\"close\"\r\n class=\"w-full md:w-auto\"\r\n severity=\"tertiary\"\r\n (onClick)=\"OnCancel()\"\r\n >\r\n </kv-button>\r\n </div>\r\n <div class=\"col-2\">\r\n <kv-button\r\n label=\"Salvar\"\r\n icon=\"save\"\r\n class=\"w-full md:w-auto\"\r\n severity=\"primary\"\r\n (onClick)=\"OnSave()\"\r\n >\r\n </kv-button>\r\n </div>\r\n </div>\r\n }\r\n </ng-container>\r\n </div> \r\n }\r\n <ng-template #noDocumentSelected>\r\n @if(!noDocumentSelectedTemplate) {\r\n <div\r\n class=\"no-document-message flex flex-column align-items-center justify-content-center\"\r\n style=\"height: 100%; overflow-y: auto\"\r\n >\r\n <p class=\"text-center text-gray-500\">\r\n Selecione um arquivo para visualiza\u00E7\u00E3o\r\n </p>\r\n <img\r\n [src]=\"\r\n 'https://work-assets.keevo.com.br/img/Sem_Dados.png'\r\n \"\r\n style=\"max-height: 50%; margin-top: 2rem\"\r\n alt=\"\"\r\n />\r\n </div>\r\n } @else {\r\n <ng-container\r\n *ngTemplateOutlet=\"noDocumentSelectedTemplate\"\r\n ></ng-container>\r\n }\r\n </ng-template>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.farol-statuspublicacao{margin-right:.5rem;width:.35rem;border-radius:1rem;-webkit-border-radius:1rem;-moz-border-radius:1rem;-ms-border-radius:1rem;-o-border-radius:1rem}:host ::ng-deep .p-sidebar{border-radius:5px;position:absolute;height:var(--sidebar-height)}:host ::ng-deep .p-sidebar .p-sidebar-content{overflow:auto;border:1px solid #e5e7eb;border-radius:5px;margin-top:1rem}.card-perfil,.card-visualizador{border:1.5px solid #CBD5E1;background:#fff;border-radius:6px;max-height:100%}@media (max-width: 768px){.card-perfil{max-height:20rem;overflow-y:auto}}@media (max-width: 768px){.card-visualizador{max-height:100%;overflow-y:auto}}:host ::ng-deep .p-fieldset .p-fieldset-content{padding-bottom:0}:host ::ng-deep .p-sidebar .p-sidebar-close{display:none}.card-normal{border:1.5px solid #CBD5E1}.card-naoVisualizado{border-left:4px solid #e6671f}.parent-container{height:100%;display:flex;flex-direction:column}.file-viewer{margin:auto}.ekp-content{min-height:20rem;padding:1rem;overflow-y:auto;border-radius:5px}ngx-loading{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1000}.card{transition:all .3s ease;border:1px solid transparent}.card-normal:hover{border:1px solid #a9a9a9;box-shadow:0 4px 8px #0000001a}.card-selected{background-color:#f0f0f0;border:1px solid #c0c0c0;box-shadow:0 6px 12px #00000026;transform:scale(1.02)}.loading-spinner{display:flex;align-items:center;justify-content:center;height:100%;font-size:1.5rem;color:#666}#html-content{width:100%;height:100%;overflow-y:auto}:host ::ng-deep .list-card-button .kv-button{width:22px;height:22px}:host ::ng-deep .list-card-button .kv-button .material-symbols-outlined.only-icon.icon-normal[_ngcontent-ng-c4083184952]{font-size:1rem}.custom-max-height{height:100%}@media (max-height: 768px){.custom-max-height{height:auto;min-height:100vh}}.download-icon{font-size:20px;cursor:pointer;transition:transform .3s ease,color .3s ease}.download-icon:hover{color:#0f6cbd;transform:scale(1.2)}\n"] }]
|
|
11138
|
+
}], ctorParameters: () => [{ type: NotificationService }], propDecorators: { extencaoDocumento: [{
|
|
11139
|
+
type: Input
|
|
11140
|
+
}], totalRecords: [{
|
|
11141
|
+
type: Input
|
|
11142
|
+
}], visualizadorDocumentos: [{
|
|
11143
|
+
type: Input
|
|
11144
|
+
}], cardTemplate: [{
|
|
11145
|
+
type: Input
|
|
11146
|
+
}], contentTemplate: [{
|
|
11147
|
+
type: Input
|
|
11148
|
+
}], noDocumentSelectedTemplate: [{
|
|
11149
|
+
type: Input
|
|
11150
|
+
}], noDocumentListTemplate: [{
|
|
11151
|
+
type: Input
|
|
11152
|
+
}], buttonTemplate: [{
|
|
11153
|
+
type: Input
|
|
11154
|
+
}], listBottomTemplate: [{
|
|
11155
|
+
type: Input
|
|
11156
|
+
}], indvisualizado: [{
|
|
11157
|
+
type: Input
|
|
11158
|
+
}], isLoadingSkeleton: [{
|
|
11159
|
+
type: Input
|
|
11160
|
+
}], borderCardNaoVisualizado: [{
|
|
11161
|
+
type: Input
|
|
11162
|
+
}], contentForm: [{
|
|
11163
|
+
type: Input
|
|
11164
|
+
}], enableSearch: [{
|
|
11165
|
+
type: Input
|
|
11166
|
+
}], searchPlaceholder: [{
|
|
11167
|
+
type: Input
|
|
11168
|
+
}], listTitle: [{
|
|
11169
|
+
type: Input
|
|
11170
|
+
}], onScrollHandler: [{
|
|
11171
|
+
type: Output
|
|
11172
|
+
}], onSelectFile: [{
|
|
11173
|
+
type: Output
|
|
11174
|
+
}], onSave: [{
|
|
11175
|
+
type: Output
|
|
11176
|
+
}], onCancel: [{
|
|
11177
|
+
type: Output
|
|
11178
|
+
}], onSearch: [{
|
|
11179
|
+
type: Output
|
|
11180
|
+
}] } });
|
|
11181
|
+
|
|
11024
11182
|
class KvPageStepperComponent {
|
|
11025
11183
|
// @Output() concluirCallback = new EventEmitter<void>();
|
|
11026
11184
|
onActiveStepChange(step) {
|
|
@@ -12238,5 +12396,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
12238
12396
|
* Generated bundle index. Do not edit.
|
|
12239
12397
|
*/
|
|
12240
12398
|
|
|
12241
|
-
export { BaseApiService, BaseChartComponent, BaseComponent, BaseComponentButton, BaseComponentCrud, BaseComponentCrudForm, BaseComponentCrudList, BaseComponentDropDown, BaseComponentDropDownExternal, BaseComponentInput, BaseComponentMultiSelect, BasecomponentTable, BreadcrumbsService, CDN_URLS, CUSTOM_FONTS, CapitalizePipe, ChatService, ComponentProviders, ComponentService, CpfCnpjPipe, DEBOUNCE_TIME, DEFAULT_KV_EDITOR_CONFIG, DEFAULT_QUILL_CONFIG, DocsService, DragDirective, DynamicInputDirective, ERROR_MESSAGES, FONT_SIZES, FormService, ImageCutterService, ImagensService, KeevoComponentsModule, KeevoValidators, KvAvatarComponent, KvAvatarModule, KvButtonComponent, KvButtonModule, KvButtonPersonalizeComponent, KvButtonPopupComponent, KvButtonSecondaryComponent, KvButtonSuccessComponent, KvButtonsModule, KvCardSelectionComponent, KvCardSelectionModule, KvCarouselComponent, KvCarouselModule, KvChartComponent, KvChartModule, KvCheckComponent, KvConfirmationModalComponent, KvConfirmationModalModule, KvContentViewerComponent, KvContentViewerModule, KvDropdownComponent, KvEditorComponent, KvEditorMentionService, KvEditorPdfService, KvEditorQuillService, KvEditorRelatorioService, KvErrorComponent, KvFileUploadComponent, KvFileUploadModule, KvFileViewerComponent, KvFileViewerModule, KvFileViewerNovoComponent, KvFileViewerNovoModule, KvFilterCardComponent, KvFilterCardModule, KvFilterCardsComponent, KvFilterCardsModule, KvFilterFieldsetComponent, KvFilterFieldsetModule, KvGIconComponent, KvGIconModule, KvHomeCardComponent, KvHomeCardModule, KvIconComponent, KvIconModule, KvImageUploadComponent, KvImageUploadModule, KvInputCalendarComponent, KvInputMaskComponent, KvInputNumberAddonComponent, KvInputNumberComponent, KvInputPasswordComponent, KvInputTextAddonComponent, KvInputTextCheckboxComponent, KvInputTextComponent, KvInputTextareaComponent, KvInputTimeComponent, KvInputsModule, KvLayoutComponent, KvLayoutModule, KvLoaderComponent, KvLoaderModule, KvLoaderService, KvLoginComponent, KvLoginModule, KvModalComponent, KvModalModule, KvMultiSelectComponent, KvOrgchartComponent, KvOrgchartModule, KvPageFormComponent, KvPageFormModule, KvPageStepperComponent, KvPageStepperodule, KvPickListComponent, KvPickListModule, KvProgressBarAlternativeComponent, KvProgressBarAlternativeModule, KvProgressBarModule, KvRadioGroupComponent, KvReportComponent, KvReportModule, KvSelectButtonComponent, KvSelectButtonsComponent, KvStackedBarChartComponent, KvStepperComponent, KvStepperModule, KvStepsComponent, KvSwitchComponent, KvTableComponent, KvTableEditComponent, KvTableEditModule, KvTableExpandableComponent, KvTableExpandableModule, KvTableModule, KvTableViewerComponent, KvTagComponent, KvTagModule, KvTagsComponent, KvTagsModule, KvTimelineComponent, KvTreeMultiSelectComponent, KvTreeViewComponent, KvTreetableComponent, KvTreetableModule, KvWidgetCardComponent, KvWorkspaceModule, KvtreeViewModule, MaskPipe, NotificationService, ObjectService, OrgChartService, PDF_STYLES, PeriodosChart, PipesModule, PrimeNgModule, ProgressBarComponent, TIMEOUTS, TablePaginate, TelefonePipe, TemplateDirective, TranslatePrimeng, WorkspaceComponent, getOrExecute, kvErrorModule, loading, mapToMenuItem, mapaSeverityColors };
|
|
12399
|
+
export { BaseApiService, BaseChartComponent, BaseComponent, BaseComponentButton, BaseComponentCrud, BaseComponentCrudForm, BaseComponentCrudList, BaseComponentDropDown, BaseComponentDropDownExternal, BaseComponentInput, BaseComponentMultiSelect, BasecomponentTable, BreadcrumbsService, CDN_URLS, CUSTOM_FONTS, CapitalizePipe, ChatService, ComponentProviders, ComponentService, CpfCnpjPipe, DEBOUNCE_TIME, DEFAULT_KV_EDITOR_CONFIG, DEFAULT_QUILL_CONFIG, DocsService, DragDirective, DynamicInputDirective, ERROR_MESSAGES, FONT_SIZES, FormService, ImageCutterService, ImagensService, KeevoComponentsModule, KeevoValidators, KvAvatarComponent, KvAvatarModule, KvButtonComponent, KvButtonModule, KvButtonPersonalizeComponent, KvButtonPopupComponent, KvButtonSecondaryComponent, KvButtonSuccessComponent, KvButtonsModule, KvCardSelectionComponent, KvCardSelectionModule, KvCarouselComponent, KvCarouselModule, KvChartComponent, KvChartModule, KvCheckComponent, KvConfirmationModalComponent, KvConfirmationModalModule, KvContentViewerComponent, KvContentViewerModule, KvDetailedListComponent, KvDropdownComponent, KvEditorComponent, KvEditorMentionService, KvEditorPdfService, KvEditorQuillService, KvEditorRelatorioService, KvErrorComponent, KvFileUploadComponent, KvFileUploadModule, KvFileViewerComponent, KvFileViewerModule, KvFileViewerNovoComponent, KvFileViewerNovoModule, KvFilterCardComponent, KvFilterCardModule, KvFilterCardsComponent, KvFilterCardsModule, KvFilterFieldsetComponent, KvFilterFieldsetModule, KvGIconComponent, KvGIconModule, KvHomeCardComponent, KvHomeCardModule, KvIconComponent, KvIconModule, KvImageUploadComponent, KvImageUploadModule, KvInputCalendarComponent, KvInputMaskComponent, KvInputNumberAddonComponent, KvInputNumberComponent, KvInputPasswordComponent, KvInputTextAddonComponent, KvInputTextCheckboxComponent, KvInputTextComponent, KvInputTextareaComponent, KvInputTimeComponent, KvInputsModule, KvLayoutComponent, KvLayoutModule, KvLoaderComponent, KvLoaderModule, KvLoaderService, KvLoginComponent, KvLoginModule, KvModalComponent, KvModalModule, KvMultiSelectComponent, KvOrgchartComponent, KvOrgchartModule, KvPageFormComponent, KvPageFormModule, KvPageStepperComponent, KvPageStepperodule, KvPickListComponent, KvPickListModule, KvProgressBarAlternativeComponent, KvProgressBarAlternativeModule, KvProgressBarModule, KvRadioGroupComponent, KvReportComponent, KvReportModule, KvSelectButtonComponent, KvSelectButtonsComponent, KvStackedBarChartComponent, KvStepperComponent, KvStepperModule, KvStepsComponent, KvSwitchComponent, KvTableComponent, KvTableEditComponent, KvTableEditModule, KvTableExpandableComponent, KvTableExpandableModule, KvTableModule, KvTableViewerComponent, KvTagComponent, KvTagModule, KvTagsComponent, KvTagsModule, KvTimelineComponent, KvTreeMultiSelectComponent, KvTreeViewComponent, KvTreetableComponent, KvTreetableModule, KvWidgetCardComponent, KvWorkspaceModule, KvtreeViewModule, MaskPipe, NotificationService, ObjectService, OrgChartService, PDF_STYLES, PeriodosChart, PipesModule, PrimeNgModule, ProgressBarComponent, TIMEOUTS, TablePaginate, TelefonePipe, TemplateDirective, TranslatePrimeng, WorkspaceComponent, getOrExecute, kvErrorModule, loading, mapToMenuItem, mapaSeverityColors };
|
|
12242
12400
|
//# sourceMappingURL=keevo-components.mjs.map
|