From 288a2688936964d70420d889e3f5c2f0b3ddd0c2 Mon Sep 17 00:00:00 2001 From: SoyDiego Date: Fri, 8 Sep 2023 14:05:43 +0200 Subject: [PATCH 1/2] Fixed alignment autocomplete --- .../components/autocomplete/autocomplete.css | 203 +++++++++--------- 1 file changed, 102 insertions(+), 101 deletions(-) diff --git a/src/app/components/autocomplete/autocomplete.css b/src/app/components/autocomplete/autocomplete.css index 8c2a968cfc4..4df21676a84 100755 --- a/src/app/components/autocomplete/autocomplete.css +++ b/src/app/components/autocomplete/autocomplete.css @@ -1,101 +1,102 @@ -.p-autocomplete { - display: inline-flex; - position: relative; -} - -.p-autocomplete-loader { - position: absolute; - top: 50%; - margin-top: -0.5rem; -} - -.p-autocomplete-dd .p-autocomplete-input { - flex: 1 1 auto; - width: 1%; -} - -.p-autocomplete-dd .p-autocomplete-input, -.p-autocomplete-dd .p-autocomplete-multiple-container { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} - -.p-autocomplete-dd .p-autocomplete-dropdown { - border-top-left-radius: 0; - border-bottom-left-radius: 0px; -} - -.p-autocomplete-panel { - overflow: auto; -} - -.p-autocomplete-items { - margin: 0; - padding: 0; - list-style-type: none; -} - -.p-autocomplete-item { - cursor: pointer; - white-space: nowrap; - position: relative; - overflow: hidden; -} - -.p-autocomplete-multiple-container { - margin: 0; - padding: 0; - list-style-type: none; - cursor: text; - overflow: hidden; - display: flex; - align-items: center; - flex-wrap: wrap; -} - -.p-autocomplete-token { - width: fit-content; - cursor: default; - display: inline-flex; - align-items: center; - flex: 0 0 auto; -} - -.p-autocomplete-token-icon { - cursor: pointer; -} - -.p-autocomplete-input-token { - flex: 1 1 auto; - display: inline-flex; -} - -.p-autocomplete-input-token input { - border: 0 none; - outline: 0 none; - background-color: transparent; - margin: 0; - padding: 0; - box-shadow: none; - border-radius: 0; - width: 100%; -} - -.p-fluid .p-autocomplete { - display: flex; -} - -.p-fluid .p-autocomplete-dd .p-autocomplete-input { - width: 1%; -} - -.p-autocomplete-clear-icon { - position: absolute; - top: 50%; - margin-top: -0.5rem; - cursor: pointer; -} - -.p-autocomplete-clearable { - position: relative; -} +.p-autocomplete { + display: inline-flex; + position: relative; +} + +.p-autocomplete-loader { + position: absolute; + top: 50%; + margin-top: -0.5rem; +} + +.p-autocomplete-dd .p-autocomplete-input { + flex: 1 1 auto; + width: 1%; +} + +.p-autocomplete-dd .p-autocomplete-input, +.p-autocomplete-dd .p-autocomplete-multiple-container { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.p-autocomplete-dd .p-autocomplete-dropdown { + border-top-left-radius: 0; + border-bottom-left-radius: 0px; +} + +.p-autocomplete-panel { + overflow: auto; +} + +.p-autocomplete-items { + margin: 0; + padding: 0; + list-style-type: none; +} + +.p-autocomplete-item { + cursor: pointer; + white-space: nowrap; + position: relative; + overflow: hidden; +} + +.p-autocomplete-multiple-container { + margin: 0; + padding: 0; + list-style-type: none; + cursor: text; + overflow: hidden; + display: flex; + align-items: center; + flex-wrap: wrap; +} + +.p-autocomplete-token { + width: fit-content; + cursor: default; + display: inline-flex; + align-items: center; + flex: 0 0 auto; +} + +.p-autocomplete-token-icon { + display: flex; + cursor: pointer; +} + +.p-autocomplete-input-token { + flex: 1 1 auto; + display: inline-flex; +} + +.p-autocomplete-input-token input { + border: 0 none; + outline: 0 none; + background-color: transparent; + margin: 0; + padding: 0; + box-shadow: none; + border-radius: 0; + width: 100%; +} + +.p-fluid .p-autocomplete { + display: flex; +} + +.p-fluid .p-autocomplete-dd .p-autocomplete-input { + width: 1%; +} + +.p-autocomplete-clear-icon { + position: absolute; + top: 50%; + margin-top: -0.5rem; + cursor: pointer; +} + +.p-autocomplete-clearable { + position: relative; +} From 15d0045ae352b0c092f875057c7ca113c494d077 Mon Sep 17 00:00:00 2001 From: SoyDiego Date: Fri, 8 Sep 2023 14:11:15 +0200 Subject: [PATCH 2/2] Formatted project --- src/app/components/fileupload/fileupload.ts | 4 ++-- src/app/components/menu/menu.ts | 2 +- src/app/components/tieredmenu/tieredmenu.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/components/fileupload/fileupload.ts b/src/app/components/fileupload/fileupload.ts index 89f2e018818..4915f03dd72 100755 --- a/src/app/components/fileupload/fileupload.ts +++ b/src/app/components/fileupload/fileupload.ts @@ -467,7 +467,7 @@ export class FileUpload implements AfterViewInit, AfterContentInit, OnInit, OnDe private http: HttpClient, public cd: ChangeDetectorRef, public config: PrimeNGConfig - ) { } + ) {} ngAfterContentInit() { this.templates?.forEach((item) => { @@ -901,4 +901,4 @@ export class FileUpload implements AfterViewInit, AfterContentInit, OnInit, OnDe exports: [FileUpload, SharedModule, ButtonModule, ProgressBarModule, MessagesModule], declarations: [FileUpload] }) -export class FileUploadModule { } +export class FileUploadModule {} diff --git a/src/app/components/menu/menu.ts b/src/app/components/menu/menu.ts index 2418ba21800..8699bc99323 100755 --- a/src/app/components/menu/menu.ts +++ b/src/app/components/menu/menu.ts @@ -607,7 +607,7 @@ export class Menu implements OnDestroy { changeFocusedOptionIndex(index) { const links = DomHandler.find(this.containerViewChild.nativeElement, 'li[data-pc-section="menuitem"][data-p-disabled="false"]'); - if(links.length > 0) { + if (links.length > 0) { let order = index >= links.length ? links.length - 1 : index < 0 ? 0 : index; order > -1 && this.focusedOptionIndex.set(links[order].getAttribute('id')); } diff --git a/src/app/components/tieredmenu/tieredmenu.ts b/src/app/components/tieredmenu/tieredmenu.ts index 9330fbd843e..a044a0a6e8c 100755 --- a/src/app/components/tieredmenu/tieredmenu.ts +++ b/src/app/components/tieredmenu/tieredmenu.ts @@ -222,7 +222,7 @@ export class TieredMenuSub { @ViewChild('sublist', { static: true }) sublistViewChild: ElementRef; - constructor(@Inject(DOCUMENT) private document: Document, public el: ElementRef, public renderer: Renderer2, private cd: ChangeDetectorRef,@Inject(forwardRef(() => TieredMenu)) public tieredMenu: TieredMenu) {} + constructor(@Inject(DOCUMENT) private document: Document, public el: ElementRef, public renderer: Renderer2, private cd: ChangeDetectorRef, @Inject(forwardRef(() => TieredMenu)) public tieredMenu: TieredMenu) {} positionSubmenu() { let sublist = this.sublistViewChild && this.sublistViewChild.nativeElement;