@fluxhub/fluxhub-lib 22.0.2 → 22.0.3
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.
|
@@ -2036,6 +2036,7 @@ class FHWinSearchListComponent {
|
|
|
2036
2036
|
listMinHeight = null;
|
|
2037
2037
|
searchInput;
|
|
2038
2038
|
list;
|
|
2039
|
+
head;
|
|
2039
2040
|
/** un solo pulsante: la scelta chiude la dialog, come nel pannello di una combo */
|
|
2040
2041
|
buttons = [
|
|
2041
2042
|
{ text: 'ANNULLA', type: 'stroked', returnValue: undefined },
|
|
@@ -2056,14 +2057,17 @@ class FHWinSearchListComponent {
|
|
|
2056
2057
|
this.active = i >= 0 ? i : -1;
|
|
2057
2058
|
}
|
|
2058
2059
|
ngAfterViewInit() {
|
|
2060
|
+
// chi scrolla e' il wrapper di DialogBase (genitore di [dialog-content])
|
|
2061
|
+
const sc = this.list?.nativeElement.parentElement?.parentElement;
|
|
2062
|
+
if (sc)
|
|
2063
|
+
this.stickHead(sc);
|
|
2059
2064
|
setTimeout(() => {
|
|
2060
2065
|
this.searchInput?.nativeElement.focus();
|
|
2061
2066
|
const el = this.list?.nativeElement;
|
|
2062
2067
|
if (!el)
|
|
2063
2068
|
return;
|
|
2064
|
-
//
|
|
2065
|
-
//
|
|
2066
|
-
const sc = el.parentElement?.parentElement;
|
|
2069
|
+
// si blocca solo la parte visibile della lista, non tutta (altrimenti filtrando
|
|
2070
|
+
// resterebbe una scrollbar su spazio vuoto)
|
|
2067
2071
|
// (misure di layout, non getBoundingClientRect: la dialog sta ancora animando la scala)
|
|
2068
2072
|
if (sc) {
|
|
2069
2073
|
const overflow = Math.max(0, sc.scrollHeight - sc.clientHeight);
|
|
@@ -2072,6 +2076,22 @@ class FHWinSearchListComponent {
|
|
|
2072
2076
|
this.scrollToActive('center');
|
|
2073
2077
|
});
|
|
2074
2078
|
}
|
|
2079
|
+
/**
|
|
2080
|
+
* Incolla la ricerca al bordo del wrapper che scrolla, annullandone il padding.
|
|
2081
|
+
* Il padding si legge a runtime perche' cambia da portale a portale; inline con
|
|
2082
|
+
* !important perche' i portali forzano con !important il margin-top del primo figlio.
|
|
2083
|
+
*/
|
|
2084
|
+
stickHead(sc) {
|
|
2085
|
+
const head = this.head?.nativeElement;
|
|
2086
|
+
if (!head)
|
|
2087
|
+
return;
|
|
2088
|
+
const cs = getComputedStyle(sc);
|
|
2089
|
+
const pt = parseFloat(cs.paddingTop) || 0;
|
|
2090
|
+
const pl = parseFloat(cs.paddingLeft) || 0;
|
|
2091
|
+
const pr = parseFloat(cs.paddingRight) || 0;
|
|
2092
|
+
head.style.setProperty('margin', `${-pt}px ${-pr}px 0 ${-pl}px`, 'important');
|
|
2093
|
+
head.style.setProperty('top', `${-pt}px`, 'important');
|
|
2094
|
+
}
|
|
2075
2095
|
isSelected(r) {
|
|
2076
2096
|
const s = this.data.selected;
|
|
2077
2097
|
if (r.empty)
|
|
@@ -2159,15 +2179,15 @@ class FHWinSearchListComponent {
|
|
|
2159
2179
|
this.ref.close(valore);
|
|
2160
2180
|
}
|
|
2161
2181
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: FHWinSearchListComponent, deps: [{ token: i1$2.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
2162
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: FHWinSearchListComponent, isStandalone: true, selector: "FHWinSearchList", viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "list", first: true, predicate: ["list"], descendants: true }], ngImport: i0, template: `
|
|
2182
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: FHWinSearchListComponent, isStandalone: true, selector: "FHWinSearchList", viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "list", first: true, predicate: ["list"], descendants: true }, { propertyName: "head", first: true, predicate: ["head"], descendants: true }], ngImport: i0, template: `
|
|
2163
2183
|
<fh-dialog-base
|
|
2164
2184
|
[title]="data.title || ''"
|
|
2165
2185
|
[buttons]="buttons"
|
|
2166
2186
|
[showCloseButton]="true"
|
|
2167
2187
|
>
|
|
2168
|
-
<div dialog-content>
|
|
2188
|
+
<div dialog-content class="fh-sl-root">
|
|
2169
2189
|
<!-- sticky: chi scrolla e' il wrapper di DialogBase, la ricerca deve restare in cima -->
|
|
2170
|
-
<div class="fh-sl-head">
|
|
2190
|
+
<div class="fh-sl-head" #head>
|
|
2171
2191
|
<div class="fh-sl-search">
|
|
2172
2192
|
<mat-icon>search</mat-icon>
|
|
2173
2193
|
<input
|
|
@@ -2213,6 +2233,9 @@ class FHWinSearchListComponent {
|
|
|
2213
2233
|
(click)="choose(r.valore)"
|
|
2214
2234
|
>
|
|
2215
2235
|
<span class="fh-sl-text">
|
|
2236
|
+
@if (r.empty && !r.parts[0].t) {
|
|
2237
|
+
{{ '(nessuna selezione)' | translate }}
|
|
2238
|
+
}
|
|
2216
2239
|
@for (p of r.parts; track $index) {
|
|
2217
2240
|
@if (p.m) {
|
|
2218
2241
|
<mark>{{ p.t }}</mark>
|
|
@@ -2235,7 +2258,7 @@ class FHWinSearchListComponent {
|
|
|
2235
2258
|
</div>
|
|
2236
2259
|
</div>
|
|
2237
2260
|
</fh-dialog-base>
|
|
2238
|
-
`, isInline: true, styles: [":host{--fh-sl-accent: var(--mat-sys-primary, #3f51b5)}.fh-sl-head{position:sticky;top
|
|
2261
|
+
`, isInline: true, styles: [":host{--fh-sl-accent: var(--mat-sys-primary, #3f51b5)}.fh-sl-root{max-height:none!important;overflow:visible!important}.fh-sl-head{position:sticky;top:0;z-index:1;margin:0 -10px;padding:8px 10px;background:var(--mat-sys-surface, #fff);box-shadow:0 6px 6px -6px #0000002e}.fh-sl-search{display:flex;align-items:center;gap:8px;height:40px;border:1px solid rgba(0,0,0,.25);border-radius:8px;padding:0 6px 0 10px;transition:border-color .15s,box-shadow .15s}.fh-sl-search:focus-within{border-color:var(--fh-sl-accent);box-shadow:0 0 0 1px var(--fh-sl-accent)}.fh-sl-search input{flex:1;min-width:0;border:0;outline:0;font:inherit;font-size:14px;background:transparent;color:inherit}.fh-sl-search mat-icon{color:#00000080;font-size:20px;width:20px;height:20px}.fh-sl-search:focus-within>mat-icon{color:var(--fh-sl-accent)}.fh-sl-clear{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:0;border-radius:50%;background:transparent;cursor:pointer;padding:0}.fh-sl-clear:hover{background:#0000000f}.fh-sl-count{flex-shrink:0;font-size:12px;color:#00000080;white-space:nowrap}.fh-sl-count:last-child{padding-right:6px}.fh-sl-list{display:flex;flex-direction:column;padding-top:4px;box-sizing:border-box}.fh-sl-item{display:flex;align-items:center;gap:8px;text-align:left;border:0;border-radius:6px;background:transparent;color:inherit;padding:9px 10px;font:inherit;font-size:13px;line-height:1.4;cursor:pointer;scroll-margin-top:90px;scroll-margin-bottom:8px}.fh-sl-item+.fh-sl-item{margin-top:1px}.fh-sl-text{flex:1;min-width:0}.fh-sl-item.active{background:#0000000d}.fh-sl-item.sel{background:color-mix(in srgb,var(--fh-sl-accent) 12%,transparent);font-weight:600}.fh-sl-item.sel.active{background:color-mix(in srgb,var(--fh-sl-accent) 18%,transparent)}.fh-sl-check{flex-shrink:0;color:var(--fh-sl-accent);font-size:20px;width:20px;height:20px}.fh-sl-item--empty{font-style:italic;color:#0009}.fh-sl-item mark{background:color-mix(in srgb,#ffc107 45%,transparent);color:inherit;border-radius:2px}.fh-sl-empty{display:flex;flex-direction:column;align-items:center;gap:6px;padding:28px 6px;color:#0000008c;font-size:13px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: DialogBaseComponent, selector: "fh-dialog-base", inputs: ["title", "buttons", "showCloseButton", "canValidate", "buttonsAlignment"], outputs: ["buttonClick", "beforeClose"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
2239
2262
|
}
|
|
2240
2263
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: FHWinSearchListComponent, decorators: [{
|
|
2241
2264
|
type: Component,
|
|
@@ -2252,9 +2275,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
2252
2275
|
[buttons]="buttons"
|
|
2253
2276
|
[showCloseButton]="true"
|
|
2254
2277
|
>
|
|
2255
|
-
<div dialog-content>
|
|
2278
|
+
<div dialog-content class="fh-sl-root">
|
|
2256
2279
|
<!-- sticky: chi scrolla e' il wrapper di DialogBase, la ricerca deve restare in cima -->
|
|
2257
|
-
<div class="fh-sl-head">
|
|
2280
|
+
<div class="fh-sl-head" #head>
|
|
2258
2281
|
<div class="fh-sl-search">
|
|
2259
2282
|
<mat-icon>search</mat-icon>
|
|
2260
2283
|
<input
|
|
@@ -2300,6 +2323,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
2300
2323
|
(click)="choose(r.valore)"
|
|
2301
2324
|
>
|
|
2302
2325
|
<span class="fh-sl-text">
|
|
2326
|
+
@if (r.empty && !r.parts[0].t) {
|
|
2327
|
+
{{ '(nessuna selezione)' | translate }}
|
|
2328
|
+
}
|
|
2303
2329
|
@for (p of r.parts; track $index) {
|
|
2304
2330
|
@if (p.m) {
|
|
2305
2331
|
<mark>{{ p.t }}</mark>
|
|
@@ -2322,7 +2348,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
2322
2348
|
</div>
|
|
2323
2349
|
</div>
|
|
2324
2350
|
</fh-dialog-base>
|
|
2325
|
-
`, changeDetection: ChangeDetectionStrategy.Eager, styles: [":host{--fh-sl-accent: var(--mat-sys-primary, #3f51b5)}.fh-sl-head{position:sticky;top
|
|
2351
|
+
`, changeDetection: ChangeDetectionStrategy.Eager, styles: [":host{--fh-sl-accent: var(--mat-sys-primary, #3f51b5)}.fh-sl-root{max-height:none!important;overflow:visible!important}.fh-sl-head{position:sticky;top:0;z-index:1;margin:0 -10px;padding:8px 10px;background:var(--mat-sys-surface, #fff);box-shadow:0 6px 6px -6px #0000002e}.fh-sl-search{display:flex;align-items:center;gap:8px;height:40px;border:1px solid rgba(0,0,0,.25);border-radius:8px;padding:0 6px 0 10px;transition:border-color .15s,box-shadow .15s}.fh-sl-search:focus-within{border-color:var(--fh-sl-accent);box-shadow:0 0 0 1px var(--fh-sl-accent)}.fh-sl-search input{flex:1;min-width:0;border:0;outline:0;font:inherit;font-size:14px;background:transparent;color:inherit}.fh-sl-search mat-icon{color:#00000080;font-size:20px;width:20px;height:20px}.fh-sl-search:focus-within>mat-icon{color:var(--fh-sl-accent)}.fh-sl-clear{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:0;border-radius:50%;background:transparent;cursor:pointer;padding:0}.fh-sl-clear:hover{background:#0000000f}.fh-sl-count{flex-shrink:0;font-size:12px;color:#00000080;white-space:nowrap}.fh-sl-count:last-child{padding-right:6px}.fh-sl-list{display:flex;flex-direction:column;padding-top:4px;box-sizing:border-box}.fh-sl-item{display:flex;align-items:center;gap:8px;text-align:left;border:0;border-radius:6px;background:transparent;color:inherit;padding:9px 10px;font:inherit;font-size:13px;line-height:1.4;cursor:pointer;scroll-margin-top:90px;scroll-margin-bottom:8px}.fh-sl-item+.fh-sl-item{margin-top:1px}.fh-sl-text{flex:1;min-width:0}.fh-sl-item.active{background:#0000000d}.fh-sl-item.sel{background:color-mix(in srgb,var(--fh-sl-accent) 12%,transparent);font-weight:600}.fh-sl-item.sel.active{background:color-mix(in srgb,var(--fh-sl-accent) 18%,transparent)}.fh-sl-check{flex-shrink:0;color:var(--fh-sl-accent);font-size:20px;width:20px;height:20px}.fh-sl-item--empty{font-style:italic;color:#0009}.fh-sl-item mark{background:color-mix(in srgb,#ffc107 45%,transparent);color:inherit;border-radius:2px}.fh-sl-empty{display:flex;flex-direction:column;align-items:center;gap:6px;padding:28px 6px;color:#0000008c;font-size:13px}\n"] }]
|
|
2326
2352
|
}], ctorParameters: () => [{ type: i1$2.MatDialogRef }, { type: undefined, decorators: [{
|
|
2327
2353
|
type: Inject,
|
|
2328
2354
|
args: [MAT_DIALOG_DATA]
|
|
@@ -2332,6 +2358,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
2332
2358
|
}], list: [{
|
|
2333
2359
|
type: ViewChild,
|
|
2334
2360
|
args: ['list']
|
|
2361
|
+
}], head: [{
|
|
2362
|
+
type: ViewChild,
|
|
2363
|
+
args: ['head']
|
|
2335
2364
|
}] } });
|
|
2336
2365
|
|
|
2337
2366
|
class OdbcService {
|