@virusis/angular-ui 0.1.8 → 0.1.10
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/fesm2022/virusis-angular-ui.mjs +559 -395
- package/fesm2022/virusis-angular-ui.mjs.map +1 -1
- package/index.d.ts +61 -4
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injectable, EventEmitter, Output, Input, ChangeDetectionStrategy, Component, PLATFORM_ID, signal, DestroyRef, afterNextRender, ViewChild, HostListener, ElementRef, InjectionToken, ChangeDetectorRef, NgModule, Inject } from '@angular/core';
|
|
2
|
+
import { inject, Injectable, EventEmitter, isDevMode, Output, Input, ChangeDetectionStrategy, Component, PLATFORM_ID, signal, DestroyRef, afterNextRender, ViewChild, HostListener, ElementRef, InjectionToken, ChangeDetectorRef, NgModule, Inject } from '@angular/core';
|
|
3
3
|
import { DOCUMENT, isPlatformBrowser, NgTemplateOutlet } from '@angular/common';
|
|
4
4
|
import { buildSprite } from '@virusis/icon-set';
|
|
5
5
|
import * as i1 from 'primeng/button';
|
|
@@ -252,9 +252,16 @@ function formatCountdown(totalSeconds) {
|
|
|
252
252
|
/**
|
|
253
253
|
* Ortak durum ekrani — paket 06 · G1.
|
|
254
254
|
*
|
|
255
|
-
* 13 varyant. loading disindaki her
|
|
255
|
+
* 13 varyant. loading disindaki her durum **en az bir BAGLI cikis** sunmali;
|
|
256
256
|
* cikissiz ekran yasak.
|
|
257
257
|
*
|
|
258
|
+
* 🔴 2026-09-12 — kural ayni, uygulamasi degisti (kullanici karari). Onceki hal
|
|
259
|
+
* her varyanta varsayilan bir dugme ciziyordu; bes konsolda 42 kullanimin 26
|
|
260
|
+
* eylemi cizilmis ama hicbir seye bagli degildi — tiklaninca hicbir sey olmuyordu.
|
|
261
|
+
* Baglanmamis dugme cikis degil, cikis gibi gorunen bir cikmaz. Artik eylem
|
|
262
|
+
* yalniz tuketici ona baglandiginda (`EventEmitter.observed`) ciziliyor; bagli
|
|
263
|
+
* cikisi olmayan durum gelistirmede hata veriyor.
|
|
264
|
+
*
|
|
258
265
|
* Renk yalnizca token'dan gelir (--vp-*); ham palet sinifi kullanilmaz.
|
|
259
266
|
* Anlam renkle degil **ikon + baslik + metin** ile tasinir (WCAG 1.4.1).
|
|
260
267
|
*
|
|
@@ -313,6 +320,8 @@ class VpStateComponent {
|
|
|
313
320
|
this.primaryAction = new EventEmitter();
|
|
314
321
|
this.secondaryAction = new EventEmitter();
|
|
315
322
|
this.referenceCopied = new EventEmitter();
|
|
323
|
+
/** Ayni tur icin hatayi bir kez soyle; her degisiklik algilamada tekrar etme. */
|
|
324
|
+
this.reportedWithoutExit = null;
|
|
316
325
|
}
|
|
317
326
|
/** Aralik disi deger sessizce kabul edilmiyor: 7. seviye baslik yok. */
|
|
318
327
|
get resolvedHeadingLevel() {
|
|
@@ -321,6 +330,31 @@ class VpStateComponent {
|
|
|
321
330
|
get variant() {
|
|
322
331
|
return VP_STATE_VARIANTS[this.type];
|
|
323
332
|
}
|
|
333
|
+
/**
|
|
334
|
+
* Cizilen eylemler: varyantin eylemlerinden YALNIZ tuketicinin bagladiklari.
|
|
335
|
+
*
|
|
336
|
+
* 🔴 Baglanmamis bir dugme tiklaninca hicbir sey yapmiyor; cizmek kullaniciya
|
|
337
|
+
* olmayan bir cikis gostermek. Sablondaki `(primaryAction)` bilesen olusurken
|
|
338
|
+
* abone oluyor, yani ilk `ngOnChanges`ten once `observed` dogru okunuyor.
|
|
339
|
+
*/
|
|
340
|
+
get visibleActions() {
|
|
341
|
+
return this.variant.actions.filter((action) => action.kind === 'primary' ? this.primaryAction.observed : this.secondaryAction.observed);
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Cikissiz ekran hala yasak — ama artik sahte dugmeyle orutulmuyor.
|
|
345
|
+
* Gelistirmede HATA olarak soyleniyor; uretimde sessiz (ekran yine ciziliyor).
|
|
346
|
+
*/
|
|
347
|
+
ngOnChanges(changes) {
|
|
348
|
+
if (!('type' in changes) || this.type === 'loading')
|
|
349
|
+
return;
|
|
350
|
+
if (this.visibleActions.length > 0 || this.reportedWithoutExit === this.type)
|
|
351
|
+
return;
|
|
352
|
+
this.reportedWithoutExit = this.type;
|
|
353
|
+
if (!isDevMode())
|
|
354
|
+
return;
|
|
355
|
+
console.error('[vp-state] "' + this.type + '" durumunun bagli cikisi yok: primaryAction / ' +
|
|
356
|
+
'secondaryAction baglanmadi, eylem dugmesi cizilmedi. Kullaniciya bir cikis baglayin.');
|
|
357
|
+
}
|
|
324
358
|
get resolvedTitle() {
|
|
325
359
|
return this.title ?? this.variant.titleKey;
|
|
326
360
|
}
|
|
@@ -352,7 +386,7 @@ class VpStateComponent {
|
|
|
352
386
|
this.referenceCopied.emit(value);
|
|
353
387
|
}
|
|
354
388
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.31", ngImport: i0, type: VpStateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
355
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.31", type: VpStateComponent, isStandalone: true, selector: "vp-state", inputs: { type: "type", title: "title", description: "description", primaryLabel: "primaryLabel", secondaryLabel: "secondaryLabel", reference: "reference", remainingSeconds: "remainingSeconds", loadingLabel: "loadingLabel", countdownLabel: "countdownLabel", referenceLabel: "referenceLabel", copyLabel: "copyLabel", headingLevel: "headingLevel" }, outputs: { primaryAction: "primaryAction", secondaryAction: "secondaryAction", referenceCopied: "referenceCopied" }, host: { classAttribute: "vp-state-host" }, ngImport: i0, template: `
|
|
389
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.31", type: VpStateComponent, isStandalone: true, selector: "vp-state", inputs: { type: "type", title: "title", description: "description", primaryLabel: "primaryLabel", secondaryLabel: "secondaryLabel", reference: "reference", remainingSeconds: "remainingSeconds", loadingLabel: "loadingLabel", countdownLabel: "countdownLabel", referenceLabel: "referenceLabel", copyLabel: "copyLabel", headingLevel: "headingLevel" }, outputs: { primaryAction: "primaryAction", secondaryAction: "secondaryAction", referenceCopied: "referenceCopied" }, host: { classAttribute: "vp-state-host" }, usesOnChanges: true, ngImport: i0, template: `
|
|
356
390
|
<div
|
|
357
391
|
class="vp-state"
|
|
358
392
|
[attr.data-tone]="variant.tone"
|
|
@@ -393,7 +427,7 @@ class VpStateComponent {
|
|
|
393
427
|
}
|
|
394
428
|
|
|
395
429
|
<div class="vp-state__actions">
|
|
396
|
-
@for (action of
|
|
430
|
+
@for (action of visibleActions; track action.label) {
|
|
397
431
|
<button
|
|
398
432
|
type="button"
|
|
399
433
|
class="vp-state__action"
|
|
@@ -468,7 +502,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImpo
|
|
|
468
502
|
}
|
|
469
503
|
|
|
470
504
|
<div class="vp-state__actions">
|
|
471
|
-
@for (action of
|
|
505
|
+
@for (action of visibleActions; track action.label) {
|
|
472
506
|
<button
|
|
473
507
|
type="button"
|
|
474
508
|
class="vp-state__action"
|
|
@@ -1889,6 +1923,40 @@ class VpSidebarComponent {
|
|
|
1889
1923
|
this.collapsed = false;
|
|
1890
1924
|
this.navLabel = 'Ana menü';
|
|
1891
1925
|
this.badgeLabel = 'öğe';
|
|
1926
|
+
/**
|
|
1927
|
+
* Maddeleri gruplarina bolerek, ILK GORULDUKLERI SIRAYLA dondurur.
|
|
1928
|
+
*
|
|
1929
|
+
* ⚠️ Alfabetik siralanMIYOR: menu sirasi bir urun karari (paket 17 §6.2
|
|
1930
|
+
* bilgi mimarisi) ve alfabe onu bozardi. Grup adi olmayan maddeler tek bir
|
|
1931
|
+
* adsiz grupta, listenin basinda kalir.
|
|
1932
|
+
*
|
|
1933
|
+
* 📌 Sozlesme geriye uyumlu: hicbir madde `group` tasimazsa tek adsiz grup
|
|
1934
|
+
* olusur ve cikti eskisiyle ayni kalir.
|
|
1935
|
+
*/
|
|
1936
|
+
/**
|
|
1937
|
+
* Cizilecek cocuklar — gizliler dusuyor.
|
|
1938
|
+
*
|
|
1939
|
+
* ⚠️ Cocugun cocugu DONMUYOR: derinlik bir seviye. Daha derin bir menu kenar
|
|
1940
|
+
* cubugunda okunamaz hale gelir; sozlesme de bunu soyluyor.
|
|
1941
|
+
*/
|
|
1942
|
+
/**
|
|
1943
|
+
* Kapali kumeler — acik olanlar DEGIL.
|
|
1944
|
+
*
|
|
1945
|
+
* 🔴 Varsayilan ACIK: menu ilk acilista ne tasidigini gostermeli. Kapali
|
|
1946
|
+
* baslasaydi kullaniciya her oturumda once "nerede ne var" sorusu sorulurdu.
|
|
1947
|
+
* Istisna sozlesmeden geliyor (`VpMenuItem.collapsed`), bilesenin kendi
|
|
1948
|
+
* kararindan degil: hangi kumenin uzun oldugunu menuyu KURAN taraf bilir.
|
|
1949
|
+
*/
|
|
1950
|
+
/**
|
|
1951
|
+
* Acilir denetimin adinda kullanilan sozcuk — cevrilebilir olsun diye girdi.
|
|
1952
|
+
* "Keycloak alt maddeleri" gibi bir ad uretiyor; yalniz ikon tasiyan bir
|
|
1953
|
+
* dugme ekran okuyucu icin adsizdir.
|
|
1954
|
+
*/
|
|
1955
|
+
this.subMenuLabel = 'alt maddeleri';
|
|
1956
|
+
this.closedGroups = new Set();
|
|
1957
|
+
this.closedParents = new Set();
|
|
1958
|
+
/** Sozlesmedeki `collapsed` ipucu bir kez uygulanir; sonrasi kullanicinin. */
|
|
1959
|
+
this.seededParents = false;
|
|
1892
1960
|
/* -- Ray kipi: ucan alt menu ------------------------------------- */
|
|
1893
1961
|
this.host = inject(ElementRef);
|
|
1894
1962
|
/** Acik ucan menunun ust maddesi - kapaliyken `null`. */
|
|
@@ -1913,22 +1981,34 @@ class VpSidebarComponent {
|
|
|
1913
1981
|
return true;
|
|
1914
1982
|
});
|
|
1915
1983
|
}
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1984
|
+
seedCollapsed() {
|
|
1985
|
+
if (this.seededParents)
|
|
1986
|
+
return;
|
|
1987
|
+
this.seededParents = true;
|
|
1988
|
+
for (const item of this.items ?? []) {
|
|
1989
|
+
if (item.collapsed && item.children?.length)
|
|
1990
|
+
this.closedParents.add(item.code);
|
|
1991
|
+
}
|
|
1992
|
+
}
|
|
1993
|
+
isGroupOpen(name) {
|
|
1994
|
+
return !this.closedGroups.has(name);
|
|
1995
|
+
}
|
|
1996
|
+
toggleGroup(name) {
|
|
1997
|
+
if (this.closedGroups.has(name))
|
|
1998
|
+
this.closedGroups.delete(name);
|
|
1999
|
+
else
|
|
2000
|
+
this.closedGroups.add(name);
|
|
2001
|
+
}
|
|
2002
|
+
isParentOpen(item) {
|
|
2003
|
+
this.seedCollapsed();
|
|
2004
|
+
return !this.closedParents.has(item.code);
|
|
2005
|
+
}
|
|
2006
|
+
toggleParent(item) {
|
|
2007
|
+
if (this.closedParents.has(item.code))
|
|
2008
|
+
this.closedParents.delete(item.code);
|
|
2009
|
+
else
|
|
2010
|
+
this.closedParents.add(item.code);
|
|
2011
|
+
}
|
|
1932
2012
|
childrenOf(item) {
|
|
1933
2013
|
return (item.children ?? []).filter((child) => !child.hidden);
|
|
1934
2014
|
}
|
|
@@ -2026,383 +2106,465 @@ class VpSidebarComponent {
|
|
|
2026
2106
|
this.closeFlyout();
|
|
2027
2107
|
}
|
|
2028
2108
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.31", ngImport: i0, type: VpSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2029
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.31", type: VpSidebarComponent, isStandalone: true, selector: "vp-sidebar", inputs: { items: "items", collapsed: "collapsed", navLabel: "navLabel", badgeLabel: "badgeLabel" }, host: { listeners: { "document:keydown.escape": "onEscape()", "document:pointerdown": "onPointerDown($event)" } }, usesOnChanges: true, ngImport: i0, template: `
|
|
2030
|
-
<nav class="vp-sidebar" [attr.aria-label]="navLabel" [attr.data-collapsed]="collapsed || null">
|
|
2031
|
-
@for (group of groups; track group.name; let firstGroup = $first) {
|
|
2032
|
-
<!--
|
|
2033
|
-
Ray ayraci. Daraltilmis kipte grup BASLIGI okunmaz, ama kumenin
|
|
2034
|
-
nerede bittigi hala gorulebilir olmali: on ikon tek sutun olunca
|
|
2035
|
-
hangisinin ne oldugu yalnizca ikondan okunuyor.
|
|
2036
|
-
|
|
2037
|
-
Ilk kumenin ustunde ayrac YOK: bolecek bir sey yok.
|
|
2038
|
-
-->
|
|
2039
|
-
@if (collapsed && !firstGroup) {
|
|
2040
|
-
<hr class="vp-sidebar__rail-sep" data-vp-rail-separator aria-hidden="true" />
|
|
2041
|
-
}
|
|
2042
|
-
@if (group.name) {
|
|
2043
|
-
<!--
|
|
2044
|
-
Grup basligi. Daraltilmis kipte GIZLENIYOR ama ayirici kaliyor:
|
|
2045
|
-
ikon-rayinda metin okunmaz, ancak gruplarin nerede bittigi hala
|
|
2046
|
-
gorulebilir olmali.
|
|
2047
|
-
-->
|
|
2048
|
-
<
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
[attr.
|
|
2083
|
-
|
|
2084
|
-
<i [attr.class]="iconClass(item)" aria-hidden="true"></i>
|
|
2085
|
-
<span class="vp-sidebar__label">{{ item.titleKey }}</span>
|
|
2086
|
-
</
|
|
2087
|
-
} @else {
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
<
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2109
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.31", type: VpSidebarComponent, isStandalone: true, selector: "vp-sidebar", inputs: { items: "items", collapsed: "collapsed", navLabel: "navLabel", badgeLabel: "badgeLabel", subMenuLabel: "subMenuLabel" }, host: { listeners: { "document:keydown.escape": "onEscape()", "document:pointerdown": "onPointerDown($event)" } }, usesOnChanges: true, ngImport: i0, template: `
|
|
2110
|
+
<nav class="vp-sidebar" [attr.aria-label]="navLabel" [attr.data-collapsed]="collapsed || null">
|
|
2111
|
+
@for (group of groups; track group.name; let firstGroup = $first) {
|
|
2112
|
+
<!--
|
|
2113
|
+
Ray ayraci. Daraltilmis kipte grup BASLIGI okunmaz, ama kumenin
|
|
2114
|
+
nerede bittigi hala gorulebilir olmali: on ikon tek sutun olunca
|
|
2115
|
+
hangisinin ne oldugu yalnizca ikondan okunuyor.
|
|
2116
|
+
|
|
2117
|
+
Ilk kumenin ustunde ayrac YOK: bolecek bir sey yok.
|
|
2118
|
+
-->
|
|
2119
|
+
@if (collapsed && !firstGroup) {
|
|
2120
|
+
<hr class="vp-sidebar__rail-sep" data-vp-rail-separator aria-hidden="true" />
|
|
2121
|
+
}
|
|
2122
|
+
@if (group.name) {
|
|
2123
|
+
<!--
|
|
2124
|
+
Grup basligi. Daraltilmis kipte GIZLENIYOR ama ayirici kaliyor:
|
|
2125
|
+
ikon-rayinda metin okunmaz, ancak gruplarin nerede bittigi hala
|
|
2126
|
+
gorulebilir olmali.
|
|
2127
|
+
-->
|
|
2128
|
+
<button
|
|
2129
|
+
type="button"
|
|
2130
|
+
class="vp-sidebar__group"
|
|
2131
|
+
[attr.data-vp-menu-group]="group.name"
|
|
2132
|
+
[attr.aria-expanded]="isGroupOpen(group.name)"
|
|
2133
|
+
(click)="toggleGroup(group.name)">
|
|
2134
|
+
<span class="vp-sidebar__group-label">{{ group.name }}</span>
|
|
2135
|
+
<i class="vp-sidebar__chevron" aria-hidden="true"></i>
|
|
2136
|
+
</button>
|
|
2137
|
+
}
|
|
2138
|
+
@if (isGroupOpen(group.name)) {
|
|
2139
|
+
<ul class="vp-sidebar__list" [attr.aria-label]="group.name || null">
|
|
2140
|
+
@for (item of group.items; track item.code) {
|
|
2141
|
+
<li class="vp-sidebar__item">
|
|
2142
|
+
@if (childrenOf(item).length) {
|
|
2143
|
+
<!--
|
|
2144
|
+
Ucuncu seviye (paket 16 - G6). Yol tasimayan ust madde BAGLANTI
|
|
2145
|
+
DEGIL: tiklayinca hicbir yere gitmeyen bir baglanti bozuk bir
|
|
2146
|
+
kontroldur. Yol varsa baglanti olarak ciziliyor.
|
|
2147
|
+
-->
|
|
2148
|
+
@if (collapsed) {
|
|
2149
|
+
<!--
|
|
2150
|
+
Rayda ust madde bir DUGME: tiklayinca ucan menu aciliyor.
|
|
2151
|
+
Genis kipte ayni oge bir BASLIK, cunku cocuklar zaten
|
|
2152
|
+
akista goruluyor ve tiklanacak bir sey yok. Iki kipte iki
|
|
2153
|
+
farkli oge tipi bilerek: kontrolun sekli yaptigi isi
|
|
2154
|
+
soylemeli.
|
|
2155
|
+
-->
|
|
2156
|
+
<button
|
|
2157
|
+
type="button"
|
|
2158
|
+
class="vp-sidebar__link vp-sidebar__link--parent vp-sidebar__link--rail"
|
|
2159
|
+
[attr.data-vp-menu-parent]="item.code"
|
|
2160
|
+
[attr.title]="item.titleKey"
|
|
2161
|
+
aria-haspopup="menu"
|
|
2162
|
+
[attr.aria-expanded]="flyoutItem?.code === item.code"
|
|
2163
|
+
(click)="toggleFlyout(item, $event)">
|
|
2164
|
+
<i [attr.class]="iconClass(item)" aria-hidden="true"></i>
|
|
2165
|
+
<span class="vp-sidebar__label">{{ item.titleKey }}</span>
|
|
2166
|
+
</button>
|
|
2167
|
+
} @else if (item.path) {
|
|
2168
|
+
<!--
|
|
2169
|
+
Yol tasiyan ust madde BAGLANTI kaliyor; acmak icin yanindaki
|
|
2170
|
+
dugme. Tek tiklama hem gidemez hem acamaz.
|
|
2171
|
+
-->
|
|
2172
|
+
<span class="vp-sidebar__parent-row">
|
|
2173
|
+
<a
|
|
2174
|
+
class="vp-sidebar__link vp-sidebar__link--parent"
|
|
2175
|
+
[attr.data-vp-menu-parent]="item.code"
|
|
2176
|
+
[attr.href]="item.path"
|
|
2177
|
+
[attr.title]="item.titleKey">
|
|
2178
|
+
<i [attr.class]="iconClass(item)" aria-hidden="true"></i>
|
|
2179
|
+
<span class="vp-sidebar__label">{{ item.titleKey }}</span>
|
|
2180
|
+
</a>
|
|
2181
|
+
<button
|
|
2182
|
+
type="button"
|
|
2183
|
+
class="vp-sidebar__disclosure"
|
|
2184
|
+
[attr.data-vp-menu-toggle]="item.code"
|
|
2185
|
+
[attr.aria-label]="item.titleKey + ' ' + subMenuLabel"
|
|
2186
|
+
[attr.aria-expanded]="isParentOpen(item)"
|
|
2187
|
+
(click)="toggleParent(item)">
|
|
2188
|
+
<i class="vp-sidebar__chevron" aria-hidden="true"></i>
|
|
2189
|
+
</button>
|
|
2190
|
+
</span>
|
|
2191
|
+
} @else {
|
|
2192
|
+
<!--
|
|
2193
|
+
Genis kipte ust madde bir ACILIR dugme.
|
|
2194
|
+
Cocugu olan her sey acilir kapanir; yonetim panelinde
|
|
2195
|
+
Tanımlar 88 tablo tasiyor ve hepsi acik gelince menu
|
|
2196
|
+
taranabilir olmaktan cikip listeye donuyordu.
|
|
2197
|
+
|
|
2198
|
+
⚠️ Ust maddenin path alani geniz kipte KULLANILMIYOR: ayni
|
|
2199
|
+
tiklama hem gidemez hem acamaz. Sozlesmede zaten yolsuz
|
|
2200
|
+
(buildVpMenu ust maddeye yol vermiyor) ve dosyanin kendi
|
|
2201
|
+
yorumu bunu soyluyor: alt grup bir baslik, gidilecek bir yer
|
|
2202
|
+
degil.
|
|
2203
|
+
-->
|
|
2204
|
+
<button
|
|
2205
|
+
type="button"
|
|
2206
|
+
class="vp-sidebar__link vp-sidebar__link--parent"
|
|
2207
|
+
[attr.data-vp-menu-parent]="item.code"
|
|
2208
|
+
[attr.title]="item.titleKey"
|
|
2209
|
+
[attr.aria-expanded]="isParentOpen(item)"
|
|
2210
|
+
(click)="toggleParent(item)">
|
|
2211
|
+
<i [attr.class]="iconClass(item)" aria-hidden="true"></i>
|
|
2212
|
+
<span class="vp-sidebar__label">{{ item.titleKey }}</span>
|
|
2213
|
+
<i class="vp-sidebar__chevron" aria-hidden="true"></i>
|
|
2214
|
+
</button>
|
|
2215
|
+
}
|
|
2216
|
+
|
|
2217
|
+
<!--
|
|
2218
|
+
Rayda cocuk listesi CIZILMIYOR. Onceki halde DOM'da
|
|
2219
|
+
duruyordu ve her cocuk 44px'lik bos bir satir oluyordu:
|
|
2220
|
+
etiket gizli, cocuklarin cogunda ikon yok. Kullanici icin
|
|
2221
|
+
anlamsiz bosluk, ekran okuyucu icin adsiz baglanti. Yerini
|
|
2222
|
+
ucan menu aliyor.
|
|
2223
|
+
-->
|
|
2224
|
+
@if (!collapsed && isParentOpen(item)) {
|
|
2225
|
+
<ul class="vp-sidebar__list vp-sidebar__list--child" [attr.aria-label]="item.titleKey">
|
|
2226
|
+
@for (child of childrenOf(item); track child.code) {
|
|
2227
|
+
<li class="vp-sidebar__item">
|
|
2228
|
+
@if (child.disabledReason) {
|
|
2229
|
+
<span
|
|
2230
|
+
class="vp-sidebar__link vp-sidebar__link--disabled"
|
|
2231
|
+
[attr.data-vp-menu-item]="child.code"
|
|
2232
|
+
aria-disabled="true"
|
|
2233
|
+
[attr.title]="child.titleKey + ' — ' + child.disabledReason">
|
|
2234
|
+
<i [attr.class]="iconClass(child)" aria-hidden="true"></i>
|
|
2235
|
+
<span class="vp-sidebar__label">{{ child.titleKey }}</span>
|
|
2236
|
+
</span>
|
|
2237
|
+
<span
|
|
2238
|
+
class="vp-sidebar__reason"
|
|
2239
|
+
[attr.data-vp-menu-reason]="child.code">{{ child.disabledReason }}</span>
|
|
2240
|
+
} @else {
|
|
2241
|
+
<a
|
|
2242
|
+
class="vp-sidebar__link"
|
|
2243
|
+
[attr.data-vp-menu-item]="child.code"
|
|
2244
|
+
[attr.href]="child.path"
|
|
2245
|
+
[attr.title]="child.titleKey">
|
|
2246
|
+
<i [attr.class]="iconClass(child)" aria-hidden="true"></i>
|
|
2247
|
+
<span class="vp-sidebar__label">{{ child.titleKey }}</span>
|
|
2248
|
+
@if (hasBadge(child)) {
|
|
2249
|
+
<span
|
|
2250
|
+
class="vp-sidebar__badge"
|
|
2251
|
+
[attr.data-vp-menu-badge]="child.code"
|
|
2252
|
+
[attr.aria-label]="child.badge + ' ' + badgeLabel">{{ child.badge }}</span>
|
|
2253
|
+
}
|
|
2254
|
+
</a>
|
|
2255
|
+
}
|
|
2256
|
+
</li>
|
|
2257
|
+
}
|
|
2258
|
+
</ul>
|
|
2259
|
+
}
|
|
2260
|
+
} @else if (item.disabledReason) {
|
|
2261
|
+
<span
|
|
2262
|
+
class="vp-sidebar__link vp-sidebar__link--disabled"
|
|
2263
|
+
[attr.data-vp-menu-item]="item.code"
|
|
2264
|
+
aria-disabled="true"
|
|
2265
|
+
[attr.title]="item.titleKey + ' — ' + item.disabledReason">
|
|
2266
|
+
<i [attr.class]="iconClass(item)" aria-hidden="true"></i>
|
|
2267
|
+
<span class="vp-sidebar__label">{{ item.titleKey }}</span>
|
|
2268
|
+
</span>
|
|
2269
|
+
<span
|
|
2270
|
+
class="vp-sidebar__reason"
|
|
2271
|
+
[attr.data-vp-menu-reason]="item.code">{{ item.disabledReason }}</span>
|
|
2272
|
+
} @else {
|
|
2273
|
+
<a
|
|
2274
|
+
class="vp-sidebar__link"
|
|
2275
|
+
[attr.data-vp-menu-item]="item.code"
|
|
2276
|
+
[attr.href]="item.path"
|
|
2277
|
+
[attr.title]="item.titleKey">
|
|
2278
|
+
<i [attr.class]="iconClass(item)" aria-hidden="true"></i>
|
|
2279
|
+
<span class="vp-sidebar__label">{{ item.titleKey }}</span>
|
|
2280
|
+
@if (hasBadge(item)) {
|
|
2281
|
+
<span
|
|
2282
|
+
class="vp-sidebar__badge"
|
|
2283
|
+
[attr.data-vp-menu-badge]="item.code"
|
|
2284
|
+
[attr.aria-label]="item.badge + ' ' + badgeLabel">{{ item.badge }}</span>
|
|
2285
|
+
}
|
|
2286
|
+
</a>
|
|
2287
|
+
}
|
|
2288
|
+
</li>
|
|
2289
|
+
}
|
|
2290
|
+
</ul>
|
|
2291
|
+
}
|
|
2292
|
+
}
|
|
2293
|
+
|
|
2294
|
+
@if (flyoutItem) {
|
|
2295
|
+
<!--
|
|
2296
|
+
Ucan menu sabit konumlu (position: fixed): kenar cubugu kendi
|
|
2297
|
+
kaydirma kutusu ve mutlak konumlu bir katman kirpilirdi. Konum tiklanan dugmenin
|
|
2298
|
+
dikdortgeninden hesaplaniyor ve gorunum alanina sikistiriliyor -
|
|
2299
|
+
en alttaki kalem tiklandiginda menu ekranin altindan tasiyordu.
|
|
2300
|
+
-->
|
|
2301
|
+
<div
|
|
2302
|
+
class="vp-sidebar__flyout"
|
|
2303
|
+
data-vp-flyout
|
|
2304
|
+
role="menu"
|
|
2305
|
+
[attr.aria-label]="flyoutItem.titleKey"
|
|
2306
|
+
[style.top.px]="flyoutTop"
|
|
2307
|
+
[style.left.px]="flyoutLeft">
|
|
2308
|
+
<p class="vp-sidebar__flyout-title">{{ flyoutItem.titleKey }}</p>
|
|
2309
|
+
@for (child of childrenOf(flyoutItem); track child.code) {
|
|
2310
|
+
@if (child.disabledReason) {
|
|
2311
|
+
<span
|
|
2312
|
+
class="vp-sidebar__flyout-link vp-sidebar__link--disabled"
|
|
2313
|
+
[attr.data-vp-flyout-item]="child.code"
|
|
2314
|
+
role="menuitem"
|
|
2315
|
+
aria-disabled="true">
|
|
2316
|
+
{{ child.titleKey }}
|
|
2317
|
+
<small class="vp-sidebar__flyout-reason">{{ child.disabledReason }}</small>
|
|
2318
|
+
</span>
|
|
2319
|
+
} @else {
|
|
2320
|
+
<a
|
|
2321
|
+
class="vp-sidebar__flyout-link"
|
|
2322
|
+
[attr.data-vp-flyout-item]="child.code"
|
|
2323
|
+
role="menuitem"
|
|
2324
|
+
[attr.href]="child.path"
|
|
2325
|
+
(click)="closeFlyout()">
|
|
2326
|
+
{{ child.titleKey }}
|
|
2327
|
+
@if (hasBadge(child)) {
|
|
2328
|
+
<span class="vp-sidebar__badge">{{ child.badge }}</span>
|
|
2329
|
+
}
|
|
2330
|
+
</a>
|
|
2331
|
+
}
|
|
2332
|
+
}
|
|
2333
|
+
</div>
|
|
2334
|
+
}
|
|
2335
|
+
</nav>
|
|
2336
|
+
`, isInline: true, styles: [".vp-sidebar__group{display:flex;align-items:center;gap:var(--vp-space-2, .5rem);width:100%;min-height:var(--vp-space-6, 1.5rem);margin:var(--vp-space-4, 1rem) 0 var(--vp-space-1, .25rem);padding:var(--vp-space-1, .25rem) var(--vp-space-3, .75rem);border:0;border-radius:var(--vp-radius-sm, .25rem);background:none;font:inherit;font-size:var(--vp-font-size-xs, .75rem);font-weight:600;letter-spacing:.06em;text-transform:uppercase;text-align:left;color:var(--vp-text-muted, #8b949e);cursor:pointer}.vp-sidebar__group:hover{color:var(--vp-text-secondary, #c9d1d9)}.vp-sidebar__group-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vp-sidebar__chevron{flex:none;width:.5rem;height:.5rem;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:rotate(45deg);opacity:.55}[aria-expanded=false]>.vp-sidebar__chevron{transform:rotate(-45deg)}.vp-sidebar__parent-row{display:flex;align-items:center;gap:var(--vp-space-1, .25rem)}.vp-sidebar__parent-row>.vp-sidebar__link{flex:1 1 auto;min-width:0}.vp-sidebar__disclosure{display:grid;place-items:center;flex:none;width:var(--vp-space-6, 1.5rem);height:var(--vp-space-6, 1.5rem);padding:0;border:0;border-radius:var(--vp-radius-sm, .25rem);background:none;color:inherit;cursor:pointer}button.vp-sidebar__link--parent{width:100%;border:0;background:none;font:inherit;text-align:left;cursor:pointer}.vp-sidebar__link--parent{color:var(--vp-text-secondary);cursor:default}a.vp-sidebar__link--parent{cursor:pointer}.vp-sidebar__list--child{margin:0;padding-left:var(--vp-space-4, 1rem);list-style:none}.vp-sidebar[data-collapsed] .vp-sidebar__list--child{padding-left:0}.vp-sidebar__group:first-child{margin-top:0}.vp-sidebar[data-collapsed] .vp-sidebar__group{display:none}.vp-sidebar__rail-sep{height:1px;margin:var(--vp-space-3, .75rem) var(--vp-space-2, .5rem);border:0;background:var(--vp-border, #30363d)}:host{display:block}.vp-sidebar{padding:var(--vp-space-3)}.vp-sidebar__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--vp-space-1)}.vp-sidebar__item{margin:0}.vp-sidebar__link{display:flex;align-items:center;gap:var(--vp-space-3);min-height:var(--vp-control-height);padding:var(--vp-space-2) var(--vp-space-3);border-radius:var(--vp-radius-md);color:var(--vp-text-secondary);text-decoration:none;font-size:var(--vp-text-base)}.vp-sidebar__link:hover{background:var(--vp-surface-sunken);color:var(--vp-text-primary)}.vp-sidebar__link:focus-visible{outline:var(--vp-focus-width) solid var(--vp-focus-ring);outline-offset:var(--vp-focus-offset)}.vp-sidebar__link--disabled{color:var(--vp-text-muted);cursor:not-allowed}.vp-sidebar__link--disabled:hover{background:transparent;color:var(--vp-text-muted)}.vp-sidebar__reason{display:block;padding:0 var(--vp-space-3) var(--vp-space-2) calc(var(--vp-space-3) + 18px + var(--vp-space-3));color:var(--vp-text-muted);font-size:var(--vp-text-xs);line-height:var(--vp-leading-tight)}.vp-sidebar__icon{flex:0 0 auto;width:18px;font-size:18px;line-height:1}.vp-sidebar__label{flex:1;min-width:0}.vp-sidebar__badge{flex:0 0 auto;min-width:1.5rem;padding:0 var(--vp-space-1);border-radius:var(--vp-radius-full);background:var(--vp-surface-sunken);color:var(--vp-text-secondary);font-size:var(--vp-text-xs);text-align:center;font-variant-numeric:tabular-nums}button.vp-sidebar__link{width:100%;border:0;background:transparent;font:inherit;text-align:start;cursor:pointer}.vp-sidebar__flyout{position:fixed;z-index:40;min-width:13rem;max-width:17rem;padding:var(--vp-space-2);border:1px solid var(--vp-border);border-radius:var(--vp-radius-md);background:var(--vp-surface-raised, var(--vp-surface));box-shadow:var(--vp-shadow-lg)}.vp-sidebar__flyout-title{margin:0 0 var(--vp-space-1);padding:0 var(--vp-space-2);font-size:var(--vp-text-xs);font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--vp-text-muted)}.vp-sidebar__flyout-link{display:flex;flex-direction:column;justify-content:center;min-height:var(--vp-control-height);padding:var(--vp-space-2);border-radius:var(--vp-radius-sm);color:var(--vp-text-secondary);text-decoration:none;font-size:var(--vp-text-base)}.vp-sidebar__flyout-link:hover{background:var(--vp-surface-sunken);color:var(--vp-text-primary)}.vp-sidebar__flyout-link:focus-visible{outline:var(--vp-focus-width) solid var(--vp-focus-ring);outline-offset:var(--vp-focus-offset)}.vp-sidebar__flyout-reason{color:var(--vp-text-muted);font-size:var(--vp-text-xs);line-height:var(--vp-leading-tight)}.vp-sidebar[data-collapsed] .vp-sidebar__link .vp-sidebar__label,.vp-sidebar[data-collapsed] .vp-sidebar__link .vp-sidebar__badge,.vp-sidebar[data-collapsed] .vp-sidebar__reason{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2216
2337
|
}
|
|
2217
2338
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImport: i0, type: VpSidebarComponent, decorators: [{
|
|
2218
2339
|
type: Component,
|
|
2219
|
-
args: [{ selector: 'vp-sidebar', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
2220
|
-
<nav class="vp-sidebar" [attr.aria-label]="navLabel" [attr.data-collapsed]="collapsed || null">
|
|
2221
|
-
@for (group of groups; track group.name; let firstGroup = $first) {
|
|
2222
|
-
<!--
|
|
2223
|
-
Ray ayraci. Daraltilmis kipte grup BASLIGI okunmaz, ama kumenin
|
|
2224
|
-
nerede bittigi hala gorulebilir olmali: on ikon tek sutun olunca
|
|
2225
|
-
hangisinin ne oldugu yalnizca ikondan okunuyor.
|
|
2226
|
-
|
|
2227
|
-
Ilk kumenin ustunde ayrac YOK: bolecek bir sey yok.
|
|
2228
|
-
-->
|
|
2229
|
-
@if (collapsed && !firstGroup) {
|
|
2230
|
-
<hr class="vp-sidebar__rail-sep" data-vp-rail-separator aria-hidden="true" />
|
|
2231
|
-
}
|
|
2232
|
-
@if (group.name) {
|
|
2233
|
-
<!--
|
|
2234
|
-
Grup basligi. Daraltilmis kipte GIZLENIYOR ama ayirici kaliyor:
|
|
2235
|
-
ikon-rayinda metin okunmaz, ancak gruplarin nerede bittigi hala
|
|
2236
|
-
gorulebilir olmali.
|
|
2237
|
-
-->
|
|
2238
|
-
<
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
[attr.
|
|
2273
|
-
|
|
2274
|
-
<i [attr.class]="iconClass(item)" aria-hidden="true"></i>
|
|
2275
|
-
<span class="vp-sidebar__label">{{ item.titleKey }}</span>
|
|
2276
|
-
</
|
|
2277
|
-
} @else {
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
<
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2340
|
+
args: [{ selector: 'vp-sidebar', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
2341
|
+
<nav class="vp-sidebar" [attr.aria-label]="navLabel" [attr.data-collapsed]="collapsed || null">
|
|
2342
|
+
@for (group of groups; track group.name; let firstGroup = $first) {
|
|
2343
|
+
<!--
|
|
2344
|
+
Ray ayraci. Daraltilmis kipte grup BASLIGI okunmaz, ama kumenin
|
|
2345
|
+
nerede bittigi hala gorulebilir olmali: on ikon tek sutun olunca
|
|
2346
|
+
hangisinin ne oldugu yalnizca ikondan okunuyor.
|
|
2347
|
+
|
|
2348
|
+
Ilk kumenin ustunde ayrac YOK: bolecek bir sey yok.
|
|
2349
|
+
-->
|
|
2350
|
+
@if (collapsed && !firstGroup) {
|
|
2351
|
+
<hr class="vp-sidebar__rail-sep" data-vp-rail-separator aria-hidden="true" />
|
|
2352
|
+
}
|
|
2353
|
+
@if (group.name) {
|
|
2354
|
+
<!--
|
|
2355
|
+
Grup basligi. Daraltilmis kipte GIZLENIYOR ama ayirici kaliyor:
|
|
2356
|
+
ikon-rayinda metin okunmaz, ancak gruplarin nerede bittigi hala
|
|
2357
|
+
gorulebilir olmali.
|
|
2358
|
+
-->
|
|
2359
|
+
<button
|
|
2360
|
+
type="button"
|
|
2361
|
+
class="vp-sidebar__group"
|
|
2362
|
+
[attr.data-vp-menu-group]="group.name"
|
|
2363
|
+
[attr.aria-expanded]="isGroupOpen(group.name)"
|
|
2364
|
+
(click)="toggleGroup(group.name)">
|
|
2365
|
+
<span class="vp-sidebar__group-label">{{ group.name }}</span>
|
|
2366
|
+
<i class="vp-sidebar__chevron" aria-hidden="true"></i>
|
|
2367
|
+
</button>
|
|
2368
|
+
}
|
|
2369
|
+
@if (isGroupOpen(group.name)) {
|
|
2370
|
+
<ul class="vp-sidebar__list" [attr.aria-label]="group.name || null">
|
|
2371
|
+
@for (item of group.items; track item.code) {
|
|
2372
|
+
<li class="vp-sidebar__item">
|
|
2373
|
+
@if (childrenOf(item).length) {
|
|
2374
|
+
<!--
|
|
2375
|
+
Ucuncu seviye (paket 16 - G6). Yol tasimayan ust madde BAGLANTI
|
|
2376
|
+
DEGIL: tiklayinca hicbir yere gitmeyen bir baglanti bozuk bir
|
|
2377
|
+
kontroldur. Yol varsa baglanti olarak ciziliyor.
|
|
2378
|
+
-->
|
|
2379
|
+
@if (collapsed) {
|
|
2380
|
+
<!--
|
|
2381
|
+
Rayda ust madde bir DUGME: tiklayinca ucan menu aciliyor.
|
|
2382
|
+
Genis kipte ayni oge bir BASLIK, cunku cocuklar zaten
|
|
2383
|
+
akista goruluyor ve tiklanacak bir sey yok. Iki kipte iki
|
|
2384
|
+
farkli oge tipi bilerek: kontrolun sekli yaptigi isi
|
|
2385
|
+
soylemeli.
|
|
2386
|
+
-->
|
|
2387
|
+
<button
|
|
2388
|
+
type="button"
|
|
2389
|
+
class="vp-sidebar__link vp-sidebar__link--parent vp-sidebar__link--rail"
|
|
2390
|
+
[attr.data-vp-menu-parent]="item.code"
|
|
2391
|
+
[attr.title]="item.titleKey"
|
|
2392
|
+
aria-haspopup="menu"
|
|
2393
|
+
[attr.aria-expanded]="flyoutItem?.code === item.code"
|
|
2394
|
+
(click)="toggleFlyout(item, $event)">
|
|
2395
|
+
<i [attr.class]="iconClass(item)" aria-hidden="true"></i>
|
|
2396
|
+
<span class="vp-sidebar__label">{{ item.titleKey }}</span>
|
|
2397
|
+
</button>
|
|
2398
|
+
} @else if (item.path) {
|
|
2399
|
+
<!--
|
|
2400
|
+
Yol tasiyan ust madde BAGLANTI kaliyor; acmak icin yanindaki
|
|
2401
|
+
dugme. Tek tiklama hem gidemez hem acamaz.
|
|
2402
|
+
-->
|
|
2403
|
+
<span class="vp-sidebar__parent-row">
|
|
2404
|
+
<a
|
|
2405
|
+
class="vp-sidebar__link vp-sidebar__link--parent"
|
|
2406
|
+
[attr.data-vp-menu-parent]="item.code"
|
|
2407
|
+
[attr.href]="item.path"
|
|
2408
|
+
[attr.title]="item.titleKey">
|
|
2409
|
+
<i [attr.class]="iconClass(item)" aria-hidden="true"></i>
|
|
2410
|
+
<span class="vp-sidebar__label">{{ item.titleKey }}</span>
|
|
2411
|
+
</a>
|
|
2412
|
+
<button
|
|
2413
|
+
type="button"
|
|
2414
|
+
class="vp-sidebar__disclosure"
|
|
2415
|
+
[attr.data-vp-menu-toggle]="item.code"
|
|
2416
|
+
[attr.aria-label]="item.titleKey + ' ' + subMenuLabel"
|
|
2417
|
+
[attr.aria-expanded]="isParentOpen(item)"
|
|
2418
|
+
(click)="toggleParent(item)">
|
|
2419
|
+
<i class="vp-sidebar__chevron" aria-hidden="true"></i>
|
|
2420
|
+
</button>
|
|
2421
|
+
</span>
|
|
2422
|
+
} @else {
|
|
2423
|
+
<!--
|
|
2424
|
+
Genis kipte ust madde bir ACILIR dugme.
|
|
2425
|
+
Cocugu olan her sey acilir kapanir; yonetim panelinde
|
|
2426
|
+
Tanımlar 88 tablo tasiyor ve hepsi acik gelince menu
|
|
2427
|
+
taranabilir olmaktan cikip listeye donuyordu.
|
|
2428
|
+
|
|
2429
|
+
⚠️ Ust maddenin path alani geniz kipte KULLANILMIYOR: ayni
|
|
2430
|
+
tiklama hem gidemez hem acamaz. Sozlesmede zaten yolsuz
|
|
2431
|
+
(buildVpMenu ust maddeye yol vermiyor) ve dosyanin kendi
|
|
2432
|
+
yorumu bunu soyluyor: alt grup bir baslik, gidilecek bir yer
|
|
2433
|
+
degil.
|
|
2434
|
+
-->
|
|
2435
|
+
<button
|
|
2436
|
+
type="button"
|
|
2437
|
+
class="vp-sidebar__link vp-sidebar__link--parent"
|
|
2438
|
+
[attr.data-vp-menu-parent]="item.code"
|
|
2439
|
+
[attr.title]="item.titleKey"
|
|
2440
|
+
[attr.aria-expanded]="isParentOpen(item)"
|
|
2441
|
+
(click)="toggleParent(item)">
|
|
2442
|
+
<i [attr.class]="iconClass(item)" aria-hidden="true"></i>
|
|
2443
|
+
<span class="vp-sidebar__label">{{ item.titleKey }}</span>
|
|
2444
|
+
<i class="vp-sidebar__chevron" aria-hidden="true"></i>
|
|
2445
|
+
</button>
|
|
2446
|
+
}
|
|
2447
|
+
|
|
2448
|
+
<!--
|
|
2449
|
+
Rayda cocuk listesi CIZILMIYOR. Onceki halde DOM'da
|
|
2450
|
+
duruyordu ve her cocuk 44px'lik bos bir satir oluyordu:
|
|
2451
|
+
etiket gizli, cocuklarin cogunda ikon yok. Kullanici icin
|
|
2452
|
+
anlamsiz bosluk, ekran okuyucu icin adsiz baglanti. Yerini
|
|
2453
|
+
ucan menu aliyor.
|
|
2454
|
+
-->
|
|
2455
|
+
@if (!collapsed && isParentOpen(item)) {
|
|
2456
|
+
<ul class="vp-sidebar__list vp-sidebar__list--child" [attr.aria-label]="item.titleKey">
|
|
2457
|
+
@for (child of childrenOf(item); track child.code) {
|
|
2458
|
+
<li class="vp-sidebar__item">
|
|
2459
|
+
@if (child.disabledReason) {
|
|
2460
|
+
<span
|
|
2461
|
+
class="vp-sidebar__link vp-sidebar__link--disabled"
|
|
2462
|
+
[attr.data-vp-menu-item]="child.code"
|
|
2463
|
+
aria-disabled="true"
|
|
2464
|
+
[attr.title]="child.titleKey + ' — ' + child.disabledReason">
|
|
2465
|
+
<i [attr.class]="iconClass(child)" aria-hidden="true"></i>
|
|
2466
|
+
<span class="vp-sidebar__label">{{ child.titleKey }}</span>
|
|
2467
|
+
</span>
|
|
2468
|
+
<span
|
|
2469
|
+
class="vp-sidebar__reason"
|
|
2470
|
+
[attr.data-vp-menu-reason]="child.code">{{ child.disabledReason }}</span>
|
|
2471
|
+
} @else {
|
|
2472
|
+
<a
|
|
2473
|
+
class="vp-sidebar__link"
|
|
2474
|
+
[attr.data-vp-menu-item]="child.code"
|
|
2475
|
+
[attr.href]="child.path"
|
|
2476
|
+
[attr.title]="child.titleKey">
|
|
2477
|
+
<i [attr.class]="iconClass(child)" aria-hidden="true"></i>
|
|
2478
|
+
<span class="vp-sidebar__label">{{ child.titleKey }}</span>
|
|
2479
|
+
@if (hasBadge(child)) {
|
|
2480
|
+
<span
|
|
2481
|
+
class="vp-sidebar__badge"
|
|
2482
|
+
[attr.data-vp-menu-badge]="child.code"
|
|
2483
|
+
[attr.aria-label]="child.badge + ' ' + badgeLabel">{{ child.badge }}</span>
|
|
2484
|
+
}
|
|
2485
|
+
</a>
|
|
2486
|
+
}
|
|
2487
|
+
</li>
|
|
2488
|
+
}
|
|
2489
|
+
</ul>
|
|
2490
|
+
}
|
|
2491
|
+
} @else if (item.disabledReason) {
|
|
2492
|
+
<span
|
|
2493
|
+
class="vp-sidebar__link vp-sidebar__link--disabled"
|
|
2494
|
+
[attr.data-vp-menu-item]="item.code"
|
|
2495
|
+
aria-disabled="true"
|
|
2496
|
+
[attr.title]="item.titleKey + ' — ' + item.disabledReason">
|
|
2497
|
+
<i [attr.class]="iconClass(item)" aria-hidden="true"></i>
|
|
2498
|
+
<span class="vp-sidebar__label">{{ item.titleKey }}</span>
|
|
2499
|
+
</span>
|
|
2500
|
+
<span
|
|
2501
|
+
class="vp-sidebar__reason"
|
|
2502
|
+
[attr.data-vp-menu-reason]="item.code">{{ item.disabledReason }}</span>
|
|
2503
|
+
} @else {
|
|
2504
|
+
<a
|
|
2505
|
+
class="vp-sidebar__link"
|
|
2506
|
+
[attr.data-vp-menu-item]="item.code"
|
|
2507
|
+
[attr.href]="item.path"
|
|
2508
|
+
[attr.title]="item.titleKey">
|
|
2509
|
+
<i [attr.class]="iconClass(item)" aria-hidden="true"></i>
|
|
2510
|
+
<span class="vp-sidebar__label">{{ item.titleKey }}</span>
|
|
2511
|
+
@if (hasBadge(item)) {
|
|
2512
|
+
<span
|
|
2513
|
+
class="vp-sidebar__badge"
|
|
2514
|
+
[attr.data-vp-menu-badge]="item.code"
|
|
2515
|
+
[attr.aria-label]="item.badge + ' ' + badgeLabel">{{ item.badge }}</span>
|
|
2516
|
+
}
|
|
2517
|
+
</a>
|
|
2518
|
+
}
|
|
2519
|
+
</li>
|
|
2520
|
+
}
|
|
2521
|
+
</ul>
|
|
2522
|
+
}
|
|
2523
|
+
}
|
|
2524
|
+
|
|
2525
|
+
@if (flyoutItem) {
|
|
2526
|
+
<!--
|
|
2527
|
+
Ucan menu sabit konumlu (position: fixed): kenar cubugu kendi
|
|
2528
|
+
kaydirma kutusu ve mutlak konumlu bir katman kirpilirdi. Konum tiklanan dugmenin
|
|
2529
|
+
dikdortgeninden hesaplaniyor ve gorunum alanina sikistiriliyor -
|
|
2530
|
+
en alttaki kalem tiklandiginda menu ekranin altindan tasiyordu.
|
|
2531
|
+
-->
|
|
2532
|
+
<div
|
|
2533
|
+
class="vp-sidebar__flyout"
|
|
2534
|
+
data-vp-flyout
|
|
2535
|
+
role="menu"
|
|
2536
|
+
[attr.aria-label]="flyoutItem.titleKey"
|
|
2537
|
+
[style.top.px]="flyoutTop"
|
|
2538
|
+
[style.left.px]="flyoutLeft">
|
|
2539
|
+
<p class="vp-sidebar__flyout-title">{{ flyoutItem.titleKey }}</p>
|
|
2540
|
+
@for (child of childrenOf(flyoutItem); track child.code) {
|
|
2541
|
+
@if (child.disabledReason) {
|
|
2542
|
+
<span
|
|
2543
|
+
class="vp-sidebar__flyout-link vp-sidebar__link--disabled"
|
|
2544
|
+
[attr.data-vp-flyout-item]="child.code"
|
|
2545
|
+
role="menuitem"
|
|
2546
|
+
aria-disabled="true">
|
|
2547
|
+
{{ child.titleKey }}
|
|
2548
|
+
<small class="vp-sidebar__flyout-reason">{{ child.disabledReason }}</small>
|
|
2549
|
+
</span>
|
|
2550
|
+
} @else {
|
|
2551
|
+
<a
|
|
2552
|
+
class="vp-sidebar__flyout-link"
|
|
2553
|
+
[attr.data-vp-flyout-item]="child.code"
|
|
2554
|
+
role="menuitem"
|
|
2555
|
+
[attr.href]="child.path"
|
|
2556
|
+
(click)="closeFlyout()">
|
|
2557
|
+
{{ child.titleKey }}
|
|
2558
|
+
@if (hasBadge(child)) {
|
|
2559
|
+
<span class="vp-sidebar__badge">{{ child.badge }}</span>
|
|
2560
|
+
}
|
|
2561
|
+
</a>
|
|
2562
|
+
}
|
|
2563
|
+
}
|
|
2564
|
+
</div>
|
|
2565
|
+
}
|
|
2566
|
+
</nav>
|
|
2567
|
+
`, styles: [".vp-sidebar__group{display:flex;align-items:center;gap:var(--vp-space-2, .5rem);width:100%;min-height:var(--vp-space-6, 1.5rem);margin:var(--vp-space-4, 1rem) 0 var(--vp-space-1, .25rem);padding:var(--vp-space-1, .25rem) var(--vp-space-3, .75rem);border:0;border-radius:var(--vp-radius-sm, .25rem);background:none;font:inherit;font-size:var(--vp-font-size-xs, .75rem);font-weight:600;letter-spacing:.06em;text-transform:uppercase;text-align:left;color:var(--vp-text-muted, #8b949e);cursor:pointer}.vp-sidebar__group:hover{color:var(--vp-text-secondary, #c9d1d9)}.vp-sidebar__group-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vp-sidebar__chevron{flex:none;width:.5rem;height:.5rem;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:rotate(45deg);opacity:.55}[aria-expanded=false]>.vp-sidebar__chevron{transform:rotate(-45deg)}.vp-sidebar__parent-row{display:flex;align-items:center;gap:var(--vp-space-1, .25rem)}.vp-sidebar__parent-row>.vp-sidebar__link{flex:1 1 auto;min-width:0}.vp-sidebar__disclosure{display:grid;place-items:center;flex:none;width:var(--vp-space-6, 1.5rem);height:var(--vp-space-6, 1.5rem);padding:0;border:0;border-radius:var(--vp-radius-sm, .25rem);background:none;color:inherit;cursor:pointer}button.vp-sidebar__link--parent{width:100%;border:0;background:none;font:inherit;text-align:left;cursor:pointer}.vp-sidebar__link--parent{color:var(--vp-text-secondary);cursor:default}a.vp-sidebar__link--parent{cursor:pointer}.vp-sidebar__list--child{margin:0;padding-left:var(--vp-space-4, 1rem);list-style:none}.vp-sidebar[data-collapsed] .vp-sidebar__list--child{padding-left:0}.vp-sidebar__group:first-child{margin-top:0}.vp-sidebar[data-collapsed] .vp-sidebar__group{display:none}.vp-sidebar__rail-sep{height:1px;margin:var(--vp-space-3, .75rem) var(--vp-space-2, .5rem);border:0;background:var(--vp-border, #30363d)}:host{display:block}.vp-sidebar{padding:var(--vp-space-3)}.vp-sidebar__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--vp-space-1)}.vp-sidebar__item{margin:0}.vp-sidebar__link{display:flex;align-items:center;gap:var(--vp-space-3);min-height:var(--vp-control-height);padding:var(--vp-space-2) var(--vp-space-3);border-radius:var(--vp-radius-md);color:var(--vp-text-secondary);text-decoration:none;font-size:var(--vp-text-base)}.vp-sidebar__link:hover{background:var(--vp-surface-sunken);color:var(--vp-text-primary)}.vp-sidebar__link:focus-visible{outline:var(--vp-focus-width) solid var(--vp-focus-ring);outline-offset:var(--vp-focus-offset)}.vp-sidebar__link--disabled{color:var(--vp-text-muted);cursor:not-allowed}.vp-sidebar__link--disabled:hover{background:transparent;color:var(--vp-text-muted)}.vp-sidebar__reason{display:block;padding:0 var(--vp-space-3) var(--vp-space-2) calc(var(--vp-space-3) + 18px + var(--vp-space-3));color:var(--vp-text-muted);font-size:var(--vp-text-xs);line-height:var(--vp-leading-tight)}.vp-sidebar__icon{flex:0 0 auto;width:18px;font-size:18px;line-height:1}.vp-sidebar__label{flex:1;min-width:0}.vp-sidebar__badge{flex:0 0 auto;min-width:1.5rem;padding:0 var(--vp-space-1);border-radius:var(--vp-radius-full);background:var(--vp-surface-sunken);color:var(--vp-text-secondary);font-size:var(--vp-text-xs);text-align:center;font-variant-numeric:tabular-nums}button.vp-sidebar__link{width:100%;border:0;background:transparent;font:inherit;text-align:start;cursor:pointer}.vp-sidebar__flyout{position:fixed;z-index:40;min-width:13rem;max-width:17rem;padding:var(--vp-space-2);border:1px solid var(--vp-border);border-radius:var(--vp-radius-md);background:var(--vp-surface-raised, var(--vp-surface));box-shadow:var(--vp-shadow-lg)}.vp-sidebar__flyout-title{margin:0 0 var(--vp-space-1);padding:0 var(--vp-space-2);font-size:var(--vp-text-xs);font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--vp-text-muted)}.vp-sidebar__flyout-link{display:flex;flex-direction:column;justify-content:center;min-height:var(--vp-control-height);padding:var(--vp-space-2);border-radius:var(--vp-radius-sm);color:var(--vp-text-secondary);text-decoration:none;font-size:var(--vp-text-base)}.vp-sidebar__flyout-link:hover{background:var(--vp-surface-sunken);color:var(--vp-text-primary)}.vp-sidebar__flyout-link:focus-visible{outline:var(--vp-focus-width) solid var(--vp-focus-ring);outline-offset:var(--vp-focus-offset)}.vp-sidebar__flyout-reason{color:var(--vp-text-muted);font-size:var(--vp-text-xs);line-height:var(--vp-leading-tight)}.vp-sidebar[data-collapsed] .vp-sidebar__link .vp-sidebar__label,.vp-sidebar[data-collapsed] .vp-sidebar__link .vp-sidebar__badge,.vp-sidebar[data-collapsed] .vp-sidebar__reason{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}\n"] }]
|
|
2406
2568
|
}], propDecorators: { items: [{
|
|
2407
2569
|
type: Input,
|
|
2408
2570
|
args: [{ required: true }]
|
|
@@ -2412,6 +2574,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.31", ngImpo
|
|
|
2412
2574
|
type: Input
|
|
2413
2575
|
}], badgeLabel: [{
|
|
2414
2576
|
type: Input
|
|
2577
|
+
}], subMenuLabel: [{
|
|
2578
|
+
type: Input
|
|
2415
2579
|
}], onEscape: [{
|
|
2416
2580
|
type: HostListener,
|
|
2417
2581
|
args: ['document:keydown.escape']
|