ngx-sp-infra 6.5.0 → 6.5.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.
@@ -18,7 +18,7 @@ import * as i3 from 'ngx-pagination';
18
18
  import { NgxPaginationModule } from 'ngx-pagination';
19
19
  import { Subject, debounceTime, distinctUntilChanged, BehaviorSubject, map, takeUntil, Subscription, take, tap, firstValueFrom, filter } from 'rxjs';
20
20
  import * as i1$2 from '@angular/platform-browser';
21
- import { cloneDeep } from 'lodash';
21
+ import { cloneDeep, escapeRegExp } from 'lodash';
22
22
  import * as i2$1 from 'ngx-drag-drop';
23
23
  import { DndModule } from 'ngx-drag-drop';
24
24
  import * as i1$6 from '@angular/common/http';
@@ -9605,80 +9605,199 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
9605
9605
  type: Input
9606
9606
  }] } });
9607
9607
 
9608
+ class LibSpinnerComponent {
9609
+ // #endregion PUBLIC
9610
+ // #endregion ==========> PROPERTIES <==========
9611
+ // #region ==========> INITIALIZATION <==========
9612
+ constructor() {
9613
+ this.sizeType = "class";
9614
+ // #endregion PROTECTED
9615
+ // #region PUBLIC
9616
+ /** Tipo do spinner
9617
+ * @default "border" */
9618
+ this.type = "border";
9619
+ /** Tamanho do spinner (Padrão ou pequeno)
9620
+ * @default "default" */
9621
+ this.size = "default";
9622
+ /** Texto de ajuda, será exibido no hover em cima do spinner
9623
+ * @default "Carregando informações..." */
9624
+ this.helperText = "Carregando informações...";
9625
+ }
9626
+ ngOnChanges(changes) {
9627
+ if (changes["size"]) {
9628
+ this.getSize();
9629
+ }
9630
+ }
9631
+ // #endregion ==========> INITIALIZATION <==========
9632
+ getSize() {
9633
+ if (this.size === "small") {
9634
+ this.sizeType = "class";
9635
+ this._size = `spinner-${this.type}-sm`;
9636
+ }
9637
+ else if (this.size === "default") {
9638
+ this.sizeType = "class";
9639
+ delete this._size;
9640
+ }
9641
+ else {
9642
+ this.sizeType = "custom";
9643
+ this._size = this.size;
9644
+ }
9645
+ }
9646
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LibSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9647
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: LibSpinnerComponent, isStandalone: true, selector: "lib-spinner", inputs: { type: "type", theme: "theme", size: "size", helperText: "helperText" }, usesOnChanges: true, ngImport: i0, template: `
9648
+ @switch (sizeType) {
9649
+ @case ("class") {
9650
+ <div class="spinner-{{type}} {{theme ? 'text-'+theme : ''}} {{_size}}" role="status">
9651
+ <span class="visually-hidden">{{ helperText }}</span>
9652
+ </div>
9653
+ }
9654
+ @case ("custom") {
9655
+ <div class="spinner-{{type}} {{theme ? 'text-'+theme : ''}}" [style.height.px]="_size" [style.width.px]="_size" role="status">
9656
+ <span class="visually-hidden">{{ helperText }}</span>
9657
+ </div>
9658
+ }
9659
+ }
9660
+ `, isInline: true, styles: [""] }); }
9661
+ }
9662
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LibSpinnerComponent, decorators: [{
9663
+ type: Component,
9664
+ args: [{ selector: 'lib-spinner', template: `
9665
+ @switch (sizeType) {
9666
+ @case ("class") {
9667
+ <div class="spinner-{{type}} {{theme ? 'text-'+theme : ''}} {{_size}}" role="status">
9668
+ <span class="visually-hidden">{{ helperText }}</span>
9669
+ </div>
9670
+ }
9671
+ @case ("custom") {
9672
+ <div class="spinner-{{type}} {{theme ? 'text-'+theme : ''}}" [style.height.px]="_size" [style.width.px]="_size" role="status">
9673
+ <span class="visually-hidden">{{ helperText }}</span>
9674
+ </div>
9675
+ }
9676
+ }
9677
+ `, standalone: true }]
9678
+ }], ctorParameters: () => [], propDecorators: { type: [{
9679
+ type: Input
9680
+ }], theme: [{
9681
+ type: Input
9682
+ }], size: [{
9683
+ type: Input
9684
+ }], helperText: [{
9685
+ type: Input
9686
+ }] } });
9687
+
9608
9688
  class SearchInputComponent {
9609
- constructor(http, router) {
9610
- this.http = http;
9611
- this.router = router;
9612
- this.isVisible = false;
9689
+ get menus() { return this._menus; }
9690
+ set menus(value) {
9691
+ this._menus = value;
9692
+ this.filteredMenus = [...this._menus ?? []];
9693
+ }
9694
+ get submenus() { return this._submenus; }
9695
+ set submenus(value) {
9696
+ this._submenus = value;
9697
+ this.filteredSubmenus = [...this._submenus ?? []];
9698
+ }
9699
+ get telas() { return this._telas; }
9700
+ set telas(value) {
9701
+ this._telas = value;
9702
+ this.filteredTelas = [...this._telas ?? []];
9703
+ }
9704
+ // #endregion GETTERS & SETTERS
9705
+ // #endregion PUBLIC
9706
+ // #endregion ==========> PROPERTIES <==========
9707
+ constructor(_router) {
9708
+ this._router = _router;
9709
+ // #region ==========> PROPERTIES <==========
9710
+ // #region PRIVATE
9711
+ this._menus = [];
9712
+ this._submenus = [];
9713
+ this._telas = [];
9714
+ // #endregion PRIVATE
9715
+ // #region PUBLIC
9716
+ this.showIcons = false;
9717
+ this.onClose = new EventEmitter();
9718
+ this.onSearch = new EventEmitter();
9613
9719
  this.searchQuery = '';
9614
- this.items = [];
9615
- this.filteredItems = [...this.items];
9720
+ this.loading = false;
9721
+ // #region GETTERS & SETTERS
9722
+ this.filteredTelas = [];
9723
+ this.filteredSubmenus = [];
9724
+ this.filteredMenus = [];
9616
9725
  }
9617
9726
  ngOnInit() {
9618
- this.loadRoutes();
9727
+ //
9619
9728
  }
9620
9729
  ngAfterViewInit() {
9621
- if (this.isVisible) {
9622
- this.focusInput();
9623
- }
9624
- }
9625
- loadRoutes() {
9626
- this.http.get('assets/jsons/routes.json').subscribe(data => {
9627
- this.items = data;
9628
- }, error => {
9629
- console.error('Error loading routes:', error);
9630
- });
9730
+ this.focusInput();
9631
9731
  }
9732
+ // #region ==========> UTILS <==========
9632
9733
  onKeydown(event) {
9633
- if (event.ctrlKey && event.key === 'p') {
9634
- event.preventDefault();
9635
- this.isVisible = !this.isVisible;
9636
- if (this.isVisible) {
9637
- setTimeout(() => this.focusInput(), 0);
9638
- }
9639
- else {
9640
- this.resetSearch();
9641
- }
9734
+ if (event.key === 'Escape') {
9735
+ this.close();
9642
9736
  }
9643
- else if (this.isVisible && event.key === 'Enter') {
9644
- event.preventDefault();
9645
- if (this.filteredItems.length > 0) {
9646
- this.navigateTo(this.filteredItems[0].route);
9647
- }
9737
+ }
9738
+ navigateTo(route) {
9739
+ this._router.navigate([route]).then(() => this.close());
9740
+ }
9741
+ redirect(item) {
9742
+ if (item.RotaV6 && item.RotaV6 !== '') {
9743
+ this._router.navigate([item.RotaV6]).then(() => this.close());
9648
9744
  }
9745
+ else {
9746
+ const hostname = window.location.host.includes("localhost") ? "siscandesv6.sispro.com.br" : window.location.host;
9747
+ const baseURL = `https://${hostname}/SisproErpCloud`;
9748
+ // Se a RotaOS começar com '/', não adiciona outra '/'
9749
+ const targetRoute = `${baseURL}${item.RotaOS[0] === '/' ? '' : '/'}${item.RotaOS}`;
9750
+ window.location.replace(targetRoute);
9751
+ }
9752
+ }
9753
+ highlightList(pesquisa) {
9754
+ const list = document.querySelector('.options-list')?.querySelectorAll('li');
9755
+ const regex = new RegExp(escapeRegExp(pesquisa), 'ig');
9756
+ list?.forEach((li) => {
9757
+ const span = li.querySelector('span.tela');
9758
+ const target = span ?? li;
9759
+ const text = target.textContent ?? '';
9760
+ // substitui as ocorrências por um elemento de destaque (p.ex. <mark>)
9761
+ const highlighted = text.replace(regex, (match) => `<b style="color: #ebae00;">${match}</b>`);
9762
+ target.innerHTML = highlighted;
9763
+ });
9649
9764
  }
9650
- closeSearch() {
9651
- this.isVisible = false;
9765
+ // #region PESQUISA
9766
+ close() {
9767
+ this.onClose.emit();
9652
9768
  this.resetSearch();
9653
9769
  }
9770
+ search() {
9771
+ // TODO: Implementar o highlight mesmo com o filtro externo
9772
+ // this.highlightList(this.searchQuery.trim());
9773
+ this.onSearch.emit(this.searchQuery.trim());
9774
+ }
9654
9775
  resetSearch() {
9655
9776
  this.searchQuery = '';
9656
- this.filteredItems = [...this.items];
9657
- }
9658
- onSearch() {
9659
- if (this.searchQuery.trim()) {
9660
- this.filteredItems = this.items.filter(item => item.label.toLowerCase().includes(this.searchQuery.toLowerCase()));
9661
- }
9662
- else {
9663
- this.filteredItems = [...this.items];
9664
- }
9665
- }
9666
- navigateTo(route) {
9667
- this.router.navigate([route]);
9668
- this.closeSearch();
9777
+ this.onSearch.emit('');
9669
9778
  }
9670
9779
  focusInput() {
9671
- if (this.searchInput) {
9780
+ if (this.searchInput)
9672
9781
  this.searchInput.nativeElement.focus();
9673
- }
9674
9782
  }
9675
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SearchInputComponent, deps: [{ token: i1$6.HttpClient }, { token: i1$3.Router }], target: i0.ɵɵFactoryTarget.Component }); }
9676
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: SearchInputComponent, isStandalone: true, selector: "lib-search-input", host: { listeners: { "document:keydown": "onKeydown($event)" } }, viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }], ngImport: i0, template: "@if (isVisible) {\n<div class=\"search-overlay\">\n <div class=\"search-wrapper\">\n <div class=\"search-container\">\n <input type=\"text\" #searchInput [(ngModel)]=\"searchQuery\" (input)=\"onSearch()\"\n placeholder=\"Pesquise por telas da aplica\u00E7\u00E3o...\" class=\"form-control\" />\n <button (click)=\"closeSearch()\" class=\"btn btn-outline-primary ms-2\">Fechar</button>\n </div>\n\n @if (searchQuery !== '') {\n <div class=\"search-results\">\n <div class=\"scrollable-content\">\n <ul class=\"list-group list-group-flush\">\n @for (item of filteredItems; track $index) {\n <li (click)=\"navigateTo(item.route)\" style=\"cursor: pointer;\" class=\"list-group-item\">{{item.label}}</li>\n } \n @empty {\n <li class=\"list-group-item\">Nenhum registro encontrado</li>\n }\n </ul>\n </div>\n </div>\n \n }\n </div>\n</div>\n}", styles: [".search-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:flex;flex-direction:column;align-items:center;padding-top:10px;z-index:9999}.search-wrapper{display:flex;flex-direction:column;align-items:center;width:100%;max-width:800px}.search-container{background-color:#fff;padding:10px 20px;border-radius:8px;box-shadow:0 4px 8px #0003;display:flex;align-items:center;width:100%}.search-results{background:#fff;padding:10px;border-radius:8px;box-shadow:0 4px 8px #0003;margin-top:10px;max-width:800px;width:100%}.scrollable-content{max-height:500px;overflow-y:auto;border-radius:8px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
9783
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SearchInputComponent, deps: [{ token: i1$3.Router }], target: i0.ɵɵFactoryTarget.Component }); }
9784
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: SearchInputComponent, isStandalone: true, selector: "lib-search-input, lib-pesquisa-global", inputs: { showIcons: "showIcons" }, outputs: { onClose: "onClose", onSearch: "onSearch" }, host: { listeners: { "document:keydown": "onKeydown($event)" } }, viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }], ngImport: i0, template: "<div class=\"search-overlay position-fixed w-100 h-100 d-flex flex-column align-items-center pt-3\">\n <div class=\"search-wrapper d-flex flex-column align-items-center w-100\" style=\"--max-width: 800px\">\n <div class=\"search-container w-100 bg-white d-flex flex-column align-items-start p-3 rounded\">\n <h6>\n <p class=\"fw-bold mb-0\"> Pesquisa global de telas entre os produtos adquiridos </p>\n <span class=\"text-muted fw-bold fst-italic\" style=\"font-size: 12px;\">(para fechar clique no bot\u00E3o ao lado ou aperte ESC)</span>\n </h6>\n\n <div class=\"input-group\">\n <span class=\"input-group-text d-flex align-items-center justify-content-center\" id=\"addon-wrapping\">\n\n @if (loading) { <lib-spinner [size]=\"20\" /> }\n @else { <lib-icon iconName=\"p-lupa\" [iconSize]=\"24\" /> }\n\n </span>\n <input #searchInput type=\"text\" class=\"form-control\" [(ngModel)]=\"searchQuery\" placeholder=\"Pesquise pelo nome da tela\"\n (input)=\"search()\" />\n <button (click)=\"resetSearch()\" class=\"btn btn-outline-primary\" tooltip=\"Limpar\" > <lib-icon iconName=\"p-lixeira\" iconSize=\"medium-small\" /> </button>\n <button (click)=\"close()\" class=\"btn btn-outline-primary\" tooltip=\"Fechar\" > <lib-icon iconName=\"p-fechar\" iconSize=\"medium-small\" /> </button>\n </div>\n <span class=\"text-muted fw-bold fst-italic\" style=\"font-size: 12px;\">Digite pelo menos 3 caracteres para pesquisar...</span>\n </div>\n\n <div class=\"search-results bg-white p-3 rounded mt-3 w-100\"\n [class]=\"(!filteredMenus || !filteredSubmenus || !filteredTelas) ? 'text-center' : ''\" >\n\n @defer (when filteredMenus || filteredSubmenus || filteredTelas) {\n <div class=\"scrollable-content d-flex flex-column gap-4 overflow-y-auto rounded\" style=\"--max-scrollable-height: 650px\">\n\n <div id=\"menus\">\n <h6 class=\"fw-bold\">Menus</h6>\n <ul class=\"options-list d-flex flex-column gap-2 p-0 m-0\">\n @for (menu of filteredMenus; track menu.Projeto+menu.Titulo) {\n <li (click)=\"redirect(menu)\" class=\"glb-cursor-pointer option py-1 px-2 rounded border d-flex align-items-center gap-2\">\n @if (menu.ProjetoIcone) { <lib-icon class=\"text-primary\" [iconName]=\"menu.ProjetoIcone\" iconSize=\"medium-small\" /> }\n <span class=\"fw-bold text-primary\"> {{ menu.Projeto }} </span>\n\n <span class=\"fw-bold\">\n / {{ menu.Titulo }}\n </span>\n </li>\n }\n @empty {\n <li class=\"list-group-item\"> Nenhum menu encontrado com este nome </li>\n }\n </ul>\n </div>\n\n <div id=\"submenus\">\n <h6 class=\"fw-bold\">Submenus</h6>\n <ul class=\"options-list d-flex flex-column gap-2 p-0 m-0\">\n @for (submenu of filteredSubmenus; track submenu.Projeto+submenu.Titulo) {\n <li (click)=\"redirect(submenu)\" class=\"glb-cursor-pointer option py-1 px-2 rounded border d-flex align-items-center gap-2\">\n @if (submenu.ProjetoIcone) { <lib-icon class=\"text-primary\" [iconName]=\"submenu.ProjetoIcone\" iconSize=\"medium-small\" /> }\n <span class=\"fw-bold text-primary\"> {{ submenu.Projeto }} </span>\n\n <span class=\"fw-bold\">\n / {{ submenu.Titulo }}\n </span>\n </li>\n }\n @empty {\n <li class=\"list-group-item\"> Nenhum submenu encontrado com este nome </li>\n }\n </ul>\n </div>\n\n <div id=\"telas\">\n <h6 class=\"fw-bold\">Telas</h6>\n <ul class=\"options-list d-flex flex-column gap-2 p-0 m-0\">\n @for (tela of filteredTelas; track tela.Projeto+tela.Titulo) {\n <li (click)=\"redirect(tela)\" class=\"glb-cursor-pointer option py-1 px-2 rounded border d-flex align-items-center gap-2\">\n @if (tela.ProjetoIcone) { <lib-icon class=\"text-primary\" [iconName]=\"tela.ProjetoIcone\" iconSize=\"medium-small\" /> }\n <span class=\"fw-bold text-primary\"> {{ tela.Projeto }} </span>\n\n <span class=\"fw-bold\">\n / {{ tela.Titulo }}\n </span>\n </li>\n }\n @empty {\n <li class=\"list-group-item\"> Nenhuma tela encontrada com este nome </li>\n }\n </ul>\n </div>\n\n\n <!-- TELAS DEPRECIADA -->\n <!-- <div id=\"telas\">\n <h6 class=\"fw-bold\">Telas</h6>\n <ul class=\"options-list d-flex flex-column gap-2 p-0 m-0\">\n @for (item of filteredItems; track item.modulo+item.label) {\n <li (click)=\"navigateTo(item.route)\" class=\"glb-cursor-pointer option py-1 px-2 rounded border d-flex align-items-center gap-2\">\n @if (item.icon) { <lib-icon class=\"text-primary\" [iconName]=\"item.icon\" iconSize=\"medium-small\" /> }\n <span class=\"fw-bold text-primary\"> {{ item.modulo ? item.modulo : '' }} </span>\n\n @if (item.menu) {\n <span class=\"fw-bold text-primary menu\">\n / @if (showIcons) { <lib-icon iconName=\"p-menu-hamburguer\" iconSize=\"small\" /> } {{ item.menu }}\n </span>\n }\n\n @if (item.submenu) {\n <span class=\"fw-bold text-primary submenu\">\n / @if (showIcons) { <lib-icon iconName=\"p-link\" iconSize=\"small\" /> } {{ item.submenu }}\n </span>\n }\n\n <span class=\"tela\"> {{ item.label }} </span>\n </li>\n }\n @empty {\n <li class=\"list-group-item\"> Nenhuma tela encontrada com este nome </li>\n }\n </ul>\n </div> -->\n\n </div>\n }\n @placeholder {\n <lib-spinner />\n }\n\n </div>\n </div>\n</div>", styles: [".search-overlay{top:0;left:0;background-color:#00000080;z-index:9999}.search-overlay .search-wrapper{max-width:var(--max-width)}.search-overlay .search-wrapper .search-container{box-shadow:0 4px 8px #0003}.search-overlay .search-wrapper .search-results{box-shadow:0 4px 8px #0003;max-width:var(--max-width)}.search-overlay .search-wrapper .search-results .scrollable-content{max-height:var(--max-scrollable-height)}.search-overlay .search-wrapper .search-results .scrollable-content::-webkit-scrollbar{width:4px;background:transparent}.search-overlay .search-wrapper .search-results .scrollable-content::-webkit-scrollbar-thumb{background-color:#636363;border-radius:16px}.search-overlay .search-wrapper .search-results .scrollable-content .options-list{list-style-type:none}.search-overlay .search-wrapper .search-results .scrollable-content .options-list .option{transition:all .2s ease}.search-overlay .search-wrapper .search-results .scrollable-content .options-list .option:hover{background-color:#e5e5e5}.bg-white{background-color:#fff!important}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: LibIconsComponent, selector: "lib-icon", inputs: ["iconName", "iconColor", "iconSize", "iconFill"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i1$4.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "component", type: LibSpinnerComponent, selector: "lib-spinner", inputs: ["type", "theme", "size", "helperText"] }], deferBlockDependencies: [() => [LibIconsComponent]] }); }
9677
9785
  }
9678
9786
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SearchInputComponent, decorators: [{
9679
9787
  type: Component,
9680
- args: [{ selector: 'lib-search-input', imports: [FormsModule], template: "@if (isVisible) {\n<div class=\"search-overlay\">\n <div class=\"search-wrapper\">\n <div class=\"search-container\">\n <input type=\"text\" #searchInput [(ngModel)]=\"searchQuery\" (input)=\"onSearch()\"\n placeholder=\"Pesquise por telas da aplica\u00E7\u00E3o...\" class=\"form-control\" />\n <button (click)=\"closeSearch()\" class=\"btn btn-outline-primary ms-2\">Fechar</button>\n </div>\n\n @if (searchQuery !== '') {\n <div class=\"search-results\">\n <div class=\"scrollable-content\">\n <ul class=\"list-group list-group-flush\">\n @for (item of filteredItems; track $index) {\n <li (click)=\"navigateTo(item.route)\" style=\"cursor: pointer;\" class=\"list-group-item\">{{item.label}}</li>\n } \n @empty {\n <li class=\"list-group-item\">Nenhum registro encontrado</li>\n }\n </ul>\n </div>\n </div>\n \n }\n </div>\n</div>\n}", styles: [".search-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:flex;flex-direction:column;align-items:center;padding-top:10px;z-index:9999}.search-wrapper{display:flex;flex-direction:column;align-items:center;width:100%;max-width:800px}.search-container{background-color:#fff;padding:10px 20px;border-radius:8px;box-shadow:0 4px 8px #0003;display:flex;align-items:center;width:100%}.search-results{background:#fff;padding:10px;border-radius:8px;box-shadow:0 4px 8px #0003;margin-top:10px;max-width:800px;width:100%}.scrollable-content{max-height:500px;overflow-y:auto;border-radius:8px}\n"] }]
9681
- }], ctorParameters: () => [{ type: i1$6.HttpClient }, { type: i1$3.Router }], propDecorators: { searchInput: [{
9788
+ args: [{ selector: 'lib-search-input, lib-pesquisa-global', imports: [
9789
+ FormsModule,
9790
+ LibIconsComponent,
9791
+ TooltipModule,
9792
+ LibSpinnerComponent
9793
+ ], template: "<div class=\"search-overlay position-fixed w-100 h-100 d-flex flex-column align-items-center pt-3\">\n <div class=\"search-wrapper d-flex flex-column align-items-center w-100\" style=\"--max-width: 800px\">\n <div class=\"search-container w-100 bg-white d-flex flex-column align-items-start p-3 rounded\">\n <h6>\n <p class=\"fw-bold mb-0\"> Pesquisa global de telas entre os produtos adquiridos </p>\n <span class=\"text-muted fw-bold fst-italic\" style=\"font-size: 12px;\">(para fechar clique no bot\u00E3o ao lado ou aperte ESC)</span>\n </h6>\n\n <div class=\"input-group\">\n <span class=\"input-group-text d-flex align-items-center justify-content-center\" id=\"addon-wrapping\">\n\n @if (loading) { <lib-spinner [size]=\"20\" /> }\n @else { <lib-icon iconName=\"p-lupa\" [iconSize]=\"24\" /> }\n\n </span>\n <input #searchInput type=\"text\" class=\"form-control\" [(ngModel)]=\"searchQuery\" placeholder=\"Pesquise pelo nome da tela\"\n (input)=\"search()\" />\n <button (click)=\"resetSearch()\" class=\"btn btn-outline-primary\" tooltip=\"Limpar\" > <lib-icon iconName=\"p-lixeira\" iconSize=\"medium-small\" /> </button>\n <button (click)=\"close()\" class=\"btn btn-outline-primary\" tooltip=\"Fechar\" > <lib-icon iconName=\"p-fechar\" iconSize=\"medium-small\" /> </button>\n </div>\n <span class=\"text-muted fw-bold fst-italic\" style=\"font-size: 12px;\">Digite pelo menos 3 caracteres para pesquisar...</span>\n </div>\n\n <div class=\"search-results bg-white p-3 rounded mt-3 w-100\"\n [class]=\"(!filteredMenus || !filteredSubmenus || !filteredTelas) ? 'text-center' : ''\" >\n\n @defer (when filteredMenus || filteredSubmenus || filteredTelas) {\n <div class=\"scrollable-content d-flex flex-column gap-4 overflow-y-auto rounded\" style=\"--max-scrollable-height: 650px\">\n\n <div id=\"menus\">\n <h6 class=\"fw-bold\">Menus</h6>\n <ul class=\"options-list d-flex flex-column gap-2 p-0 m-0\">\n @for (menu of filteredMenus; track menu.Projeto+menu.Titulo) {\n <li (click)=\"redirect(menu)\" class=\"glb-cursor-pointer option py-1 px-2 rounded border d-flex align-items-center gap-2\">\n @if (menu.ProjetoIcone) { <lib-icon class=\"text-primary\" [iconName]=\"menu.ProjetoIcone\" iconSize=\"medium-small\" /> }\n <span class=\"fw-bold text-primary\"> {{ menu.Projeto }} </span>\n\n <span class=\"fw-bold\">\n / {{ menu.Titulo }}\n </span>\n </li>\n }\n @empty {\n <li class=\"list-group-item\"> Nenhum menu encontrado com este nome </li>\n }\n </ul>\n </div>\n\n <div id=\"submenus\">\n <h6 class=\"fw-bold\">Submenus</h6>\n <ul class=\"options-list d-flex flex-column gap-2 p-0 m-0\">\n @for (submenu of filteredSubmenus; track submenu.Projeto+submenu.Titulo) {\n <li (click)=\"redirect(submenu)\" class=\"glb-cursor-pointer option py-1 px-2 rounded border d-flex align-items-center gap-2\">\n @if (submenu.ProjetoIcone) { <lib-icon class=\"text-primary\" [iconName]=\"submenu.ProjetoIcone\" iconSize=\"medium-small\" /> }\n <span class=\"fw-bold text-primary\"> {{ submenu.Projeto }} </span>\n\n <span class=\"fw-bold\">\n / {{ submenu.Titulo }}\n </span>\n </li>\n }\n @empty {\n <li class=\"list-group-item\"> Nenhum submenu encontrado com este nome </li>\n }\n </ul>\n </div>\n\n <div id=\"telas\">\n <h6 class=\"fw-bold\">Telas</h6>\n <ul class=\"options-list d-flex flex-column gap-2 p-0 m-0\">\n @for (tela of filteredTelas; track tela.Projeto+tela.Titulo) {\n <li (click)=\"redirect(tela)\" class=\"glb-cursor-pointer option py-1 px-2 rounded border d-flex align-items-center gap-2\">\n @if (tela.ProjetoIcone) { <lib-icon class=\"text-primary\" [iconName]=\"tela.ProjetoIcone\" iconSize=\"medium-small\" /> }\n <span class=\"fw-bold text-primary\"> {{ tela.Projeto }} </span>\n\n <span class=\"fw-bold\">\n / {{ tela.Titulo }}\n </span>\n </li>\n }\n @empty {\n <li class=\"list-group-item\"> Nenhuma tela encontrada com este nome </li>\n }\n </ul>\n </div>\n\n\n <!-- TELAS DEPRECIADA -->\n <!-- <div id=\"telas\">\n <h6 class=\"fw-bold\">Telas</h6>\n <ul class=\"options-list d-flex flex-column gap-2 p-0 m-0\">\n @for (item of filteredItems; track item.modulo+item.label) {\n <li (click)=\"navigateTo(item.route)\" class=\"glb-cursor-pointer option py-1 px-2 rounded border d-flex align-items-center gap-2\">\n @if (item.icon) { <lib-icon class=\"text-primary\" [iconName]=\"item.icon\" iconSize=\"medium-small\" /> }\n <span class=\"fw-bold text-primary\"> {{ item.modulo ? item.modulo : '' }} </span>\n\n @if (item.menu) {\n <span class=\"fw-bold text-primary menu\">\n / @if (showIcons) { <lib-icon iconName=\"p-menu-hamburguer\" iconSize=\"small\" /> } {{ item.menu }}\n </span>\n }\n\n @if (item.submenu) {\n <span class=\"fw-bold text-primary submenu\">\n / @if (showIcons) { <lib-icon iconName=\"p-link\" iconSize=\"small\" /> } {{ item.submenu }}\n </span>\n }\n\n <span class=\"tela\"> {{ item.label }} </span>\n </li>\n }\n @empty {\n <li class=\"list-group-item\"> Nenhuma tela encontrada com este nome </li>\n }\n </ul>\n </div> -->\n\n </div>\n }\n @placeholder {\n <lib-spinner />\n }\n\n </div>\n </div>\n</div>", styles: [".search-overlay{top:0;left:0;background-color:#00000080;z-index:9999}.search-overlay .search-wrapper{max-width:var(--max-width)}.search-overlay .search-wrapper .search-container{box-shadow:0 4px 8px #0003}.search-overlay .search-wrapper .search-results{box-shadow:0 4px 8px #0003;max-width:var(--max-width)}.search-overlay .search-wrapper .search-results .scrollable-content{max-height:var(--max-scrollable-height)}.search-overlay .search-wrapper .search-results .scrollable-content::-webkit-scrollbar{width:4px;background:transparent}.search-overlay .search-wrapper .search-results .scrollable-content::-webkit-scrollbar-thumb{background-color:#636363;border-radius:16px}.search-overlay .search-wrapper .search-results .scrollable-content .options-list{list-style-type:none}.search-overlay .search-wrapper .search-results .scrollable-content .options-list .option{transition:all .2s ease}.search-overlay .search-wrapper .search-results .scrollable-content .options-list .option:hover{background-color:#e5e5e5}.bg-white{background-color:#fff!important}\n"] }]
9794
+ }], ctorParameters: () => [{ type: i1$3.Router }], propDecorators: { showIcons: [{
9795
+ type: Input
9796
+ }], onClose: [{
9797
+ type: Output
9798
+ }], onSearch: [{
9799
+ type: Output
9800
+ }], searchInput: [{
9682
9801
  type: ViewChild,
9683
9802
  args: ['searchInput']
9684
9803
  }], onKeydown: [{
@@ -9758,86 +9877,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
9758
9877
  type: Input
9759
9878
  }] } });
9760
9879
 
9761
- class LibSpinnerComponent {
9762
- // #endregion PUBLIC
9763
- // #endregion ==========> PROPERTIES <==========
9764
- // #region ==========> INITIALIZATION <==========
9765
- constructor() {
9766
- this.sizeType = "class";
9767
- // #endregion PROTECTED
9768
- // #region PUBLIC
9769
- /** Tipo do spinner
9770
- * @default "border" */
9771
- this.type = "border";
9772
- /** Tamanho do spinner (Padrão ou pequeno)
9773
- * @default "default" */
9774
- this.size = "default";
9775
- /** Texto de ajuda, será exibido no hover em cima do spinner
9776
- * @default "Carregando informações..." */
9777
- this.helperText = "Carregando informações...";
9778
- }
9779
- ngOnChanges(changes) {
9780
- if (changes["size"]) {
9781
- this.getSize();
9782
- }
9783
- }
9784
- // #endregion ==========> INITIALIZATION <==========
9785
- getSize() {
9786
- if (this.size === "small") {
9787
- this.sizeType = "class";
9788
- this._size = `spinner-${this.type}-sm`;
9789
- }
9790
- else if (this.size === "default") {
9791
- this.sizeType = "class";
9792
- delete this._size;
9793
- }
9794
- else {
9795
- this.sizeType = "custom";
9796
- this._size = this.size;
9797
- }
9798
- }
9799
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LibSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9800
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: LibSpinnerComponent, isStandalone: true, selector: "lib-spinner", inputs: { type: "type", theme: "theme", size: "size", helperText: "helperText" }, usesOnChanges: true, ngImport: i0, template: `
9801
- @switch (sizeType) {
9802
- @case ("class") {
9803
- <div class="spinner-{{type}} {{theme ? 'text-'+theme : ''}} {{_size}}" role="status">
9804
- <span class="visually-hidden">{{ helperText }}</span>
9805
- </div>
9806
- }
9807
- @case ("custom") {
9808
- <div class="spinner-{{type}} {{theme ? 'text-'+theme : ''}}" [style.height.px]="_size" [style.width.px]="_size" role="status">
9809
- <span class="visually-hidden">{{ helperText }}</span>
9810
- </div>
9811
- }
9812
- }
9813
- `, isInline: true, styles: [""] }); }
9814
- }
9815
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LibSpinnerComponent, decorators: [{
9816
- type: Component,
9817
- args: [{ selector: 'lib-spinner', template: `
9818
- @switch (sizeType) {
9819
- @case ("class") {
9820
- <div class="spinner-{{type}} {{theme ? 'text-'+theme : ''}} {{_size}}" role="status">
9821
- <span class="visually-hidden">{{ helperText }}</span>
9822
- </div>
9823
- }
9824
- @case ("custom") {
9825
- <div class="spinner-{{type}} {{theme ? 'text-'+theme : ''}}" [style.height.px]="_size" [style.width.px]="_size" role="status">
9826
- <span class="visually-hidden">{{ helperText }}</span>
9827
- </div>
9828
- }
9829
- }
9830
- `, standalone: true }]
9831
- }], ctorParameters: () => [], propDecorators: { type: [{
9832
- type: Input
9833
- }], theme: [{
9834
- type: Input
9835
- }], size: [{
9836
- type: Input
9837
- }], helperText: [{
9838
- type: Input
9839
- }] } });
9840
-
9841
9880
  class SearchTreePipe {
9842
9881
  transform(items, search) {
9843
9882
  return items.filter(node => node.label.toLocaleLowerCase().includes(search.toLocaleLowerCase()));
@@ -11483,6 +11522,14 @@ class NavigationOptions {
11483
11522
  }
11484
11523
  }
11485
11524
 
11525
+ class MenuSubmenuTela {
11526
+ constructor() {
11527
+ this.Menus = [];
11528
+ this.Submenus = [];
11529
+ this.Telas = [];
11530
+ }
11531
+ }
11532
+
11486
11533
  /**
11487
11534
  * @description
11488
11535
  *
@@ -11913,5 +11960,5 @@ class TreeItem {
11913
11960
  * Generated bundle index. Do not edit.
11914
11961
  */
11915
11962
 
11916
- export { A11yClickDirective, AlertComponent, AppliedFiltersComponent, AuditoriaButtonComponent, BasicFilters, BreadcrumbComponent, CheckUrlAndMethodService, ClickOutsideDirective, ComboboxComponent, ComboboxMultipleChoiceComponent, ConfirmComponent, ConfirmModalComponent, ContadorCaracteresComponent, ContainerTabsModel, ContentContainerComponent, CopyClipboardDirective, CpfCnpjPipe, CpfCnpjValidator, CpfCnpjValidatorDirective, CurrencyPipe, CustomAcordionComponent, CustomFormControl, DecimalCommaPipe, DialogCropperComponent, DisableControlDirective, DownloadArquivos, DropdownOptionsComponent, DynamicInputComponent, EmailAnexoRecord, EmailModel, EmpresaAbasComponent, EnderecoByCep, EstabelecimentoAbasComponent, FieldContadorMessageComponent, FieldControlErrorComponent, FieldErrorMessageComponent, FileModel, FileService, FilterByPipe, FilterMultipleChoicePipe, FiltrosAplicadosModel, FiltrosAplicadosService, FooterComponent, FormUtils, FormatByTypePipe, GenericModalComponent, GlobalLoadingService, GrupoContabilAbasComponent, HighlightDirective, IconsList, ImageCropperComponent, InfraBreadcrumbComponent, InfraBreadcrumbItemComponent, InfraEstabelecimentoFavoritoDefault, InfraModule, InfraSegConfig, InfraSegConfigRecord, InnerListComponent, InnerRowsDirective, InputTrimComponent, IpServiceService, ItemsAbasComponent, LibComboboxComponent, LibComboboxReworkComponent, LibCustomizableTableComponent, LibDateRangePickerComponent, LibDirectivesModule, LibHeaderComponent, LibIconsComponent, LibNavProdutosComponent, LibPipesModule, LibSimplifiedTableComponent, LibSpinnerComponent, LibTransferListComponent, LibWidgetsModule, LimitToPipe, LoadingBtnDirective, LoadingButtonComponent, LoadingComponent, LoadingScreenComponent, MessageService, ModalUtilsService, MultiStatusList, NavItem, NavProdutosComponent, NavigationOptions, OrderSortPipe, OrderingComponent, PageNotAuthorizedComponent, PaginationComponent, Params, PasswordPolicyComponent, PessoaAbasComponent, PhoneFormatPipe, RecordCombobox, ReportFile, RequiredDirective, RetBoolean, RetCep, RetError, RetEstabelecimentosModal, RetFeedbackMessage, RetInfraSegConfig, RetNumber, RetObjectList, RetRecordCombobox, RetRecordsCombobox, RetReportFile, RetString, RetStringList, RetTree, SaveComponent, SearchComboboxComponent, SearchFiltersComponent, SearchInputComponent, SearchTreePipe, SettingsService, SideTabsGenericComponent, SimpleSearchComponent, TableComponent, TableHeaderIcon, TableHeaderStructure, TableSelectionService, TextFilterPipe, TextTruncateDirective, TitleCasePipe, ToUrlPipe, TransferListConfig, TreeComponent, TreeItem, UsuarioAbasComponent, Utils, alertIds, alertTypes };
11963
+ export { A11yClickDirective, AlertComponent, AppliedFiltersComponent, AuditoriaButtonComponent, BasicFilters, BreadcrumbComponent, CheckUrlAndMethodService, ClickOutsideDirective, ComboboxComponent, ComboboxMultipleChoiceComponent, ConfirmComponent, ConfirmModalComponent, ContadorCaracteresComponent, ContainerTabsModel, ContentContainerComponent, CopyClipboardDirective, CpfCnpjPipe, CpfCnpjValidator, CpfCnpjValidatorDirective, CurrencyPipe, CustomAcordionComponent, CustomFormControl, DecimalCommaPipe, DialogCropperComponent, DisableControlDirective, DownloadArquivos, DropdownOptionsComponent, DynamicInputComponent, EmailAnexoRecord, EmailModel, EmpresaAbasComponent, EnderecoByCep, EstabelecimentoAbasComponent, FieldContadorMessageComponent, FieldControlErrorComponent, FieldErrorMessageComponent, FileModel, FileService, FilterByPipe, FilterMultipleChoicePipe, FiltrosAplicadosModel, FiltrosAplicadosService, FooterComponent, FormUtils, FormatByTypePipe, GenericModalComponent, GlobalLoadingService, GrupoContabilAbasComponent, HighlightDirective, IconsList, ImageCropperComponent, InfraBreadcrumbComponent, InfraBreadcrumbItemComponent, InfraEstabelecimentoFavoritoDefault, InfraModule, InfraSegConfig, InfraSegConfigRecord, InnerListComponent, InnerRowsDirective, InputTrimComponent, IpServiceService, ItemsAbasComponent, LibComboboxComponent, LibComboboxReworkComponent, LibCustomizableTableComponent, LibDateRangePickerComponent, LibDirectivesModule, LibHeaderComponent, LibIconsComponent, LibNavProdutosComponent, LibPipesModule, LibSimplifiedTableComponent, LibSpinnerComponent, LibTransferListComponent, LibWidgetsModule, LimitToPipe, LoadingBtnDirective, LoadingButtonComponent, LoadingComponent, LoadingScreenComponent, MenuSubmenuTela, MessageService, ModalUtilsService, MultiStatusList, NavItem, NavProdutosComponent, NavigationOptions, OrderSortPipe, OrderingComponent, PageNotAuthorizedComponent, PaginationComponent, Params, PasswordPolicyComponent, PessoaAbasComponent, PhoneFormatPipe, RecordCombobox, ReportFile, RequiredDirective, RetBoolean, RetCep, RetError, RetEstabelecimentosModal, RetFeedbackMessage, RetInfraSegConfig, RetNumber, RetObjectList, RetRecordCombobox, RetRecordsCombobox, RetReportFile, RetString, RetStringList, RetTree, SaveComponent, SearchComboboxComponent, SearchFiltersComponent, SearchInputComponent, SearchTreePipe, SettingsService, SideTabsGenericComponent, SimpleSearchComponent, TableComponent, TableHeaderIcon, TableHeaderStructure, TableSelectionService, TextFilterPipe, TextTruncateDirective, TitleCasePipe, ToUrlPipe, TransferListConfig, TreeComponent, TreeItem, UsuarioAbasComponent, Utils, alertIds, alertTypes };
11917
11964
  //# sourceMappingURL=ngx-sp-infra.mjs.map