@konce-pt/angular 0.7.5 → 0.7.7

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.
@@ -253,6 +253,8 @@ interface KptMessages {
253
253
  dateRange: string;
254
254
  min: string;
255
255
  max: string;
256
+ /** Interpolacja: {column}. Aria-label edytowalnej komórki. */
257
+ editCell: string;
256
258
  };
257
259
  confirm: {
258
260
  header: string;
@@ -457,10 +459,53 @@ declare class KptI18n {
457
459
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<KptI18n>;
458
460
  }
459
461
 
462
+ type KptBadgeVariant = 'neutral' | 'primary' | 'success' | 'danger' | 'warning' | 'info';
463
+ type KptBadgeSize = 'sm' | 'md' | 'lg';
464
+ /**
465
+ * Znacznik (badge) — licznik lub kropka statusu. Standalone lub nałożony na treść (`overlay`).
466
+ *
467
+ * @example
468
+ * <kpt-badge [value]="3" variant="danger" />
469
+ * <kpt-badge [value]="4" size="sm" variant="success" />
470
+ * <kpt-badge [value]="128" overlay><kpt-icon name="menu" /></kpt-badge>
471
+ * <kpt-badge dot variant="success" overlay><kpt-avatar name="AK" /></kpt-badge>
472
+ */
473
+ declare class KptBadge {
474
+ readonly value: _angular_core.InputSignal<string | number | null>;
475
+ readonly variant: _angular_core.InputSignal<KptBadgeVariant>;
476
+ /** Rozmiar — `sm` mieści się w wierszu tekstu, `md` to domyślny licznik. */
477
+ readonly size: _angular_core.InputSignal<KptBadgeSize>;
478
+ readonly dot: _angular_core.InputSignalWithTransform<boolean, unknown>;
479
+ readonly overlay: _angular_core.InputSignalWithTransform<boolean, unknown>;
480
+ readonly max: _angular_core.InputSignal<number>;
481
+ protected readonly display: _angular_core.Signal<string | number>;
482
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KptBadge, never>;
483
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<KptBadge, "kpt-badge", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "dot": { "alias": "dot"; "required": false; "isSignal": true; }; "overlay": { "alias": "overlay"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
484
+ }
485
+
486
+ /** Awatar wiersza nagłówkowego — te same dane, które przyjmuje `kpt-avatar`. */
487
+ interface KptMenuItemAvatar {
488
+ src?: string;
489
+ name?: string;
490
+ icon?: string;
491
+ }
460
492
  interface KptMenuItem<T = unknown> {
461
493
  label?: string;
462
494
  value?: T;
463
495
  icon?: string;
496
+ /** Druga linia tekstu: e-mail, rola, opis akcji. */
497
+ description?: string;
498
+ /** Odznaka po prawej stronie pozycji (licznik lub krótka etykieta). */
499
+ badge?: string | number;
500
+ /** Wariant odznaki — domyślnie `primary`. */
501
+ badgeVariant?: KptBadgeVariant;
502
+ /** Awatar po lewej — typowo w wierszu nagłówka menu użytkownika. */
503
+ avatar?: KptMenuItemAvatar;
504
+ /**
505
+ * Wiersz nagłówkowy: nieklikalny blok tekstu zamiast pozycji menu. Mieści dane zalogowanego
506
+ * użytkownika (`avatar` + `label` + `description`) albo opis funkcji menu.
507
+ */
508
+ header?: boolean;
464
509
  disabled?: boolean;
465
510
  danger?: boolean;
466
511
  separator?: boolean;
@@ -543,7 +588,14 @@ declare class KptIconRegistry {
543
588
  private readonly _version;
544
589
  /** Rośnie po każdej rejestracji — pozwala `kpt-icon` reagować na późne dodanie ikon. */
545
590
  readonly version: _angular_core.Signal<number>;
546
- /** Rejestruje (lub nadpisuje) ikony: `{ nazwa: 'inner svg' }`. */
591
+ /**
592
+ * Rejestruje (lub nadpisuje) ikony: `{ nazwa: 'inner svg' }`.
593
+ *
594
+ * Treść jest sanityzowana do allowlisty geometrii SVG (`path`/`circle`/`rect`/`g`/`line`/
595
+ * `polygon`/`polyline`/`ellipse` i ich atrybutów kształtu/stylu) — mimo to `register()` wolno
596
+ * wołać wyłącznie z treścią kontrolowaną przez developera (build-time), nigdy bezpośrednio
597
+ * z danych runtime/CMS/uploadu bez własnej walidacji domenowej wyżej w stosie.
598
+ */
547
599
  register(icons: Record<string, string>): void;
548
600
  /** Zwraca wewnętrzny SVG ikony lub undefined. */
549
601
  get(name: string): string | undefined;
@@ -560,7 +612,7 @@ declare class KptIconRegistry {
560
612
  */
561
613
  declare function renderKptIconSvg(inner: string | undefined, cssClass?: string): string;
562
614
 
563
- type KptIconName = 'menu' | 'x' | 'chevron-up' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'check' | 'search' | 'grip-vertical' | 'info' | 'alert-triangle' | 'circle-check' | 'circle-x' | 'calendar' | 'copy' | 'link' | 'code' | 'bold' | 'italic' | 'underline' | 'strikethrough' | 'list' | 'list-numbers' | 'clear-formatting' | 'star' | 'plus' | 'upload' | 'dots-vertical' | 'photo' | 'trash' | 'eye' | 'eye-off' | 'minus' | 'arrow-up' | 'arrow-down' | 'zoom-in' | 'info-circle' | 'phone' | 'map-pin' | 'world' | 'clock' | 'align-left' | 'align-center' | 'align-right' | 'align-justified' | 'palette' | 'highlight' | 'clipboard' | 'clipboard-text' | 'table' | 'pencil' | 'mail' | 'share' | 'external-link' | 'crosshair';
615
+ type KptIconName = 'menu' | 'x' | 'chevron-up' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'check' | 'search' | 'grip-vertical' | 'info' | 'alert-triangle' | 'circle-check' | 'circle-x' | 'calendar' | 'copy' | 'link' | 'code' | 'bold' | 'italic' | 'underline' | 'strikethrough' | 'list' | 'list-numbers' | 'clear-formatting' | 'star' | 'plus' | 'upload' | 'dots-vertical' | 'photo' | 'trash' | 'eye' | 'eye-off' | 'minus' | 'arrow-up' | 'arrow-down' | 'zoom-in' | 'info-circle' | 'phone' | 'map-pin' | 'world' | 'clock' | 'align-left' | 'align-center' | 'align-right' | 'align-justified' | 'palette' | 'highlight' | 'clipboard' | 'clipboard-text' | 'table' | 'pencil' | 'mail' | 'share' | 'external-link' | 'crosshair' | 'adjustments-horizontal';
564
616
 
565
617
  /** Nazwa breakpointa z tokenów `--kpt-breakpoint-*` (mobile-first). */
566
618
  type KptBreakpoint = 'sm' | 'md' | 'lg' | 'xl' | '2xl';
@@ -622,26 +674,6 @@ declare class KptBreakpointObserver {
622
674
  */
623
675
  declare function provideKptI18n(config?: KptI18nConfig): EnvironmentProviders;
624
676
 
625
- type KptBadgeVariant = 'neutral' | 'primary' | 'success' | 'danger' | 'warning' | 'info';
626
- /**
627
- * Znacznik (badge) — licznik lub kropka statusu. Standalone lub nałożony na treść (`overlay`).
628
- *
629
- * @example
630
- * <kpt-badge [value]="3" variant="danger" />
631
- * <kpt-badge [value]="128" overlay><kpt-icon name="menu" /></kpt-badge>
632
- * <kpt-badge dot variant="success" overlay><kpt-avatar name="AK" /></kpt-badge>
633
- */
634
- declare class KptBadge {
635
- readonly value: _angular_core.InputSignal<string | number | null>;
636
- readonly variant: _angular_core.InputSignal<KptBadgeVariant>;
637
- readonly dot: _angular_core.InputSignalWithTransform<boolean, unknown>;
638
- readonly overlay: _angular_core.InputSignalWithTransform<boolean, unknown>;
639
- readonly max: _angular_core.InputSignal<number>;
640
- protected readonly display: _angular_core.Signal<string | number>;
641
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<KptBadge, never>;
642
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<KptBadge, "kpt-badge", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "dot": { "alias": "dot"; "required": false; "isSignal": true; }; "overlay": { "alias": "overlay"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
643
- }
644
-
645
677
  type KptChipVariant = 'neutral' | 'primary' | 'success' | 'danger' | 'warning' | 'info';
646
678
  /**
647
679
  * Chip / tag — etykieta, opcjonalnie usuwalna.
@@ -665,6 +697,11 @@ type KptAvatarShape = 'circle' | 'square';
665
697
  /**
666
698
  * Awatar — obraz, inicjały (z `name`) lub ikona.
667
699
  *
700
+ * `name` trafia do natywnego `title` (podpowiedź spod kursora — inicjały same w sobie
701
+ * nie mówią, kto to jest). Bez `src` awatar dostaje dodatkowo `role="img"` i `aria-label`,
702
+ * a same inicjały są `aria-hidden`, żeby czytnik nie przeczytał „AK" litera po literze.
703
+ * Przy `src` etykietę niesie już `alt` obrazu — nie dublujemy jej.
704
+ *
668
705
  * @example
669
706
  * <kpt-avatar src="/u/anna.jpg" />
670
707
  * <kpt-avatar name="Anna Kowalska" size="lg" />
@@ -971,10 +1008,15 @@ declare class KptSelect<T = unknown> implements FormValueControl<unknown>, KptFo
971
1008
  readonly value: _angular_core.ModelSignal<unknown>;
972
1009
  readonly touch: _angular_core.OutputEmitterRef<void>;
973
1010
  protected readonly i18n: KptI18n;
974
- protected readonly open: _angular_core.WritableSignal<boolean>;
1011
+ /**
1012
+ * Stan panelu (dwukierunkowy). Pozwala otworzyć listę z zewnątrz i — co ważniejsze — wiedzieć,
1013
+ * kiedy user skończył wybierać. `touch` się do tego nie nadaje: leci też z blur triggera.
1014
+ */
1015
+ readonly open: _angular_core.ModelSignal<boolean>;
975
1016
  protected readonly filterText: _angular_core.WritableSignal<string>;
976
1017
  protected readonly activeIndex: _angular_core.WritableSignal<number>;
977
1018
  protected readonly positions: ConnectedPosition[];
1019
+ constructor();
978
1020
  private readonly selectedValues;
979
1021
  protected readonly selectedOptions: _angular_core.Signal<KptOption<T>[]>;
980
1022
  protected readonly filteredOptions: _angular_core.Signal<KptOption<T>[]>;
@@ -993,7 +1035,7 @@ declare class KptSelect<T = unknown> implements FormValueControl<unknown>, KptFo
993
1035
  protected onTriggerKeydown(event: KeyboardEvent): void;
994
1036
  protected onPanelKeydown(event: KeyboardEvent): void;
995
1037
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<KptSelect<any>, never>;
996
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<KptSelect<any>, "kpt-select", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
1038
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<KptSelect<any>, "kpt-select", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touch": "touch"; "open": "openChange"; }, never, never, true, never>;
997
1039
  }
998
1040
 
999
1041
  interface DayCell$1 {
@@ -1051,13 +1093,18 @@ declare class KptDatepicker implements FormValueControl<string> {
1051
1093
  protected readonly i18n: KptI18n;
1052
1094
  protected readonly weekdays: _angular_core.Signal<string[]>;
1053
1095
  private readonly months;
1054
- protected readonly open: _angular_core.WritableSignal<boolean>;
1096
+ /**
1097
+ * Stan kalendarza (dwukierunkowy). Pozwala otworzyć go z zewnątrz i — co ważniejsze — wiedzieć,
1098
+ * kiedy user skończył wybierać. `touch` się do tego nie nadaje: leci też z blur triggera.
1099
+ */
1100
+ readonly open: _angular_core.ModelSignal<boolean>;
1055
1101
  private readonly today;
1056
1102
  private readonly view;
1057
1103
  protected readonly timeStr: _angular_core.WritableSignal<string>;
1058
1104
  protected readonly dtView: _angular_core.WritableSignal<"calendar" | "clock">;
1059
1105
  private readonly pendingDate;
1060
1106
  protected readonly positions: ConnectedPosition[];
1107
+ constructor();
1061
1108
  protected readonly viewYear: _angular_core.Signal<number>;
1062
1109
  protected readonly monthLabel: _angular_core.Signal<string>;
1063
1110
  protected readonly yearPageStart: _angular_core.Signal<number>;
@@ -1092,7 +1139,7 @@ declare class KptDatepicker implements FormValueControl<string> {
1092
1139
  protected nextYearPage(): void;
1093
1140
  protected clear(event: Event): void;
1094
1141
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<KptDatepicker, never>;
1095
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<KptDatepicker, "kpt-datepicker", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "displayFormat": { "alias": "displayFormat"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "monthDisplay": { "alias": "monthDisplay"; "required": false; "isSignal": true; }; "hourFormat": { "alias": "hourFormat"; "required": false; "isSignal": true; }; "minuteStep": { "alias": "minuteStep"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
1142
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<KptDatepicker, "kpt-datepicker", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "displayFormat": { "alias": "displayFormat"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "monthDisplay": { "alias": "monthDisplay"; "required": false; "isSignal": true; }; "hourFormat": { "alias": "hourFormat"; "required": false; "isSignal": true; }; "minuteStep": { "alias": "minuteStep"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touch": "touch"; "open": "openChange"; }, never, never, true, never>;
1096
1143
  }
1097
1144
 
1098
1145
  interface ClockMark {
@@ -1291,6 +1338,12 @@ declare class KptRichText implements FormValueControl<string> {
1291
1338
  private cellBeforeGridCol;
1292
1339
  protected canMerge(): boolean;
1293
1340
  protected canSplit(): boolean;
1341
+ /**
1342
+ * Waliduje URL z narzędzia „link" (blocklista jest obchodzalna, np. `javascript:`).
1343
+ * Brak schematu → dopisz `https://` (spójne z zachowaniem `normalizeUrl` w mapie); `#`/`/`
1344
+ * przechodzą bez zmian; schemat spoza `SAFE_URL_SCHEME` → `null` (link nie zostaje wstawiony).
1345
+ */
1346
+ private sanitizeUrl;
1294
1347
  private sanitizeHtml;
1295
1348
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<KptRichText, never>;
1296
1349
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<KptRichText, "kpt-rich-text", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "toolbar": { "alias": "toolbar"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
@@ -1302,8 +1355,13 @@ type KptSliderValue = number | [number, number];
1302
1355
  * Suwak wartości (slider) na Signal Forms.
1303
1356
  * W trybie `range` udostępnia dwa uchwyty, a wartość jest parą `[min, max]`.
1304
1357
  *
1358
+ * Pod `[formField]` zakres bierze się ze schematu (`min(path.volume, 0)`,
1359
+ * `max(path.volume, 100)`) — `[min]`/`[max]` obok `[formField]` to błąd kompilacji.
1360
+ * Tryb `range` (wartość `[number, number]`) łączy się więc tylko z `[(value)]`.
1361
+ *
1305
1362
  * @example
1306
- * <kpt-slider [formField]="f.volume" [min]="0" [max]="100" [step]="5" showValue />
1363
+ * <kpt-slider [formField]="f.volume" [step]="5" showValue />
1364
+ * <kpt-slider [(value)]="volume" [min]="0" [max]="100" [step]="5" showValue />
1307
1365
  * <kpt-slider range [(value)]="zakres" [min]="0" [max]="100" showValue />
1308
1366
  */
1309
1367
  declare class KptSlider implements FormValueControl<KptSliderValue> {
@@ -1339,7 +1397,7 @@ declare class KptSlider implements FormValueControl<KptSliderValue> {
1339
1397
  * Ocena gwiazdkami (rating) na Signal Forms.
1340
1398
  *
1341
1399
  * @example
1342
- * <kpt-rating [formField]="f.score" [max]="5" />
1400
+ * <kpt-rating [formField]="f.score" [count]="5" />
1343
1401
  * <kpt-rating [value]="4" readonly />
1344
1402
  */
1345
1403
  declare class KptRating implements FormValueControl<number> {
@@ -1477,8 +1535,13 @@ declare class KptDateRange implements FormValueControl<KptDateRangeValue> {
1477
1535
  * `showButtons="false"` chowa strzałki — wariant do zakresów „od–do", gdzie krokowanie
1478
1536
  * nie ma sensu, a pole ma wyglądać jak zwykłe `kpt-input` obok.
1479
1537
  *
1538
+ * Pod `[formField]` granic NIE bindujemy w szablonie — `[min]`/`[max]` obok `[formField]`
1539
+ * to błąd kompilacji. Deklaruje je schemat (`min(path.qty, 0)`, `max(path.qty, 99)`),
1540
+ * a dyrektywa `FormField` sama wstrzykuje je w wejścia `min`/`max`.
1541
+ *
1480
1542
  * @example
1481
- * <kpt-input-number [formField]="f.qty" [min]="0" [max]="99" [step]="1" />
1543
+ * <kpt-input-number [formField]="f.qty" [step]="1" />
1544
+ * <kpt-input-number [(value)]="qty" [min]="0" [max]="99" suffix=" szt." />
1482
1545
  * <kpt-input-number [formField]="f.priceFrom" [showButtons]="false" suffix=" zł" />
1483
1546
  */
1484
1547
  declare class KptInputNumber implements FormValueControl<number | null> {
@@ -1643,8 +1706,12 @@ declare class KptListbox<T = unknown> implements FormValueControl<T | T[] | null
1643
1706
  /**
1644
1707
  * Pokrętło (knob) — wybór wartości po łuku, myszką lub strzałkami. Signal Forms.
1645
1708
  *
1709
+ * Pod `[formField]` zakres bierze się ze schematu (`min(path.level, 0)`,
1710
+ * `max(path.level, 100)`) — `[min]`/`[max]` obok `[formField]` to błąd kompilacji.
1711
+ *
1646
1712
  * @example
1647
- * <kpt-knob [formField]="f.level" [min]="0" [max]="100" [step]="1" />
1713
+ * <kpt-knob [formField]="f.level" [step]="1" />
1714
+ * <kpt-knob [(value)]="level" [min]="0" [max]="100" [step]="1" />
1648
1715
  */
1649
1716
  declare class KptKnob implements FormValueControl<number> {
1650
1717
  private readonly host;
@@ -1746,15 +1813,22 @@ declare class KptToolbar {
1746
1813
  * Panel boczny (sidenav) — stylowany kontener nawigacji, zwykle umieszczany w slocie
1747
1814
  * `kptShellSidenav` komponentu `kpt-app-shell`.
1748
1815
  *
1816
+ * Treść domyślna ląduje w obszarze przewijanym. Element opatrzony atrybutem `kptSidenavFooter`
1817
+ * trafia do stopki stojącej **poza** tym obszarem, więc zostaje przyklejony do dołu panelu
1818
+ * niezależnie od długości nawigacji (blok użytkownika, wersja aplikacji, przełącznik motywu).
1819
+ *
1749
1820
  * @example
1750
1821
  * <kpt-sidenav kptShellSidenav>
1751
1822
  * <a href="#">Pulpit</a>
1752
1823
  * <a href="#">Ustawienia</a>
1824
+ * <div kptSidenavFooter>
1825
+ * <kpt-avatar name="Anna Kowalska" size="sm" />
1826
+ * </div>
1753
1827
  * </kpt-sidenav>
1754
1828
  */
1755
1829
  declare class KptSidenav {
1756
1830
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<KptSidenav, never>;
1757
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<KptSidenav, "kpt-sidenav", never, {}, {}, never, ["*"], true, never>;
1831
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<KptSidenav, "kpt-sidenav", never, {}, {}, never, ["*", "[kptSidenavFooter]"], true, never>;
1758
1832
  }
1759
1833
 
1760
1834
  /**
@@ -2204,6 +2278,18 @@ interface KptColumnFilter {
2204
2278
  /** Krok dla `type: 'slider'` (domyślnie 1). */
2205
2279
  step?: number;
2206
2280
  }
2281
+ /** Rodzaj kontrolki edycji inline komórki. */
2282
+ type KptColumnEditType = 'text' | 'number' | 'date' | 'select' | 'multiselect';
2283
+ interface KptColumnEdit {
2284
+ type: KptColumnEditType;
2285
+ /** Opcje dla `type: 'select'` / `'multiselect'`. */
2286
+ options?: KptOption<unknown>[];
2287
+ placeholder?: string;
2288
+ /** Dla `type: 'number'`. */
2289
+ min?: number;
2290
+ max?: number;
2291
+ step?: number;
2292
+ }
2207
2293
  interface KptColumn {
2208
2294
  /** Nazwa pola w wierszu. */
2209
2295
  field: string;
@@ -2219,6 +2305,18 @@ interface KptColumn {
2219
2305
  frozen?: boolean;
2220
2306
  /** Filtr kolumny w wierszu nagłówka (input/number/select/zakres dat). */
2221
2307
  filter?: KptColumnFilter;
2308
+ /** Włącza edycję inline (klik w komórkę zamienia wartość na kontrolkę tego typu). */
2309
+ edit?: KptColumnEdit;
2310
+ }
2311
+ /** Zdarzenie po zatwierdzeniu edycji komórki. */
2312
+ interface KptCellEditEvent<T> {
2313
+ /** Wiersz sprzed zmiany. */
2314
+ row: T;
2315
+ field: string;
2316
+ /** Nowa wartość. */
2317
+ value: unknown;
2318
+ /** Wiersz po scaleniu ze zmienioną wartością — gotowe body PUT/PATCH. */
2319
+ updatedRow: T;
2222
2320
  }
2223
2321
  type SortDir = 'asc' | 'desc' | null;
2224
2322
  /** Stan przekazywany w trybie lazy przy każdej zmianie sortowania/filtra/strony. */
@@ -2282,20 +2380,38 @@ declare class KptDataTable<T = Record<string, unknown>> {
2282
2380
  readonly selection: _angular_core.ModelSignal<T[]>;
2283
2381
  /** Rozwinięte wiersze (dwukierunkowo). */
2284
2382
  readonly expandedRows: _angular_core.ModelSignal<T[]>;
2383
+ /**
2384
+ * Pola (`KptColumn.field`) aktualnie ukrytych kolumn (dwukierunkowo). Sam komponent nie
2385
+ * dostarcza UI do zarządzania tym stanem — to hak do podpięcia zewnętrznego przełącznika
2386
+ * kolumn (patrz przykład „Dostosowywanie kolumn" w playground).
2387
+ */
2388
+ readonly hiddenFields: _angular_core.ModelSignal<readonly string[]>;
2285
2389
  readonly rowClick: _angular_core.OutputEmitterRef<T>;
2286
2390
  /** Emitowane w trybie lazy przy zmianie sortowania/filtra/strony. */
2287
2391
  readonly lazyLoad: _angular_core.OutputEmitterRef<KptTableLazyState>;
2392
+ /** Emitowane po zatwierdzeniu edycji komórki (tylko gdy wartość faktycznie się zmieniła). */
2393
+ readonly cellEdit: _angular_core.OutputEmitterRef<KptCellEditEvent<T>>;
2288
2394
  protected readonly i18n: KptI18n;
2289
2395
  /** Komunikat pustej tabeli (input albo domyślny z i18n). */
2290
2396
  protected readonly emptyText: _angular_core.Signal<string>;
2291
2397
  /** Kolumny w bieżącej kolejności (po ewentualnym przestawieniu). */
2292
2398
  protected readonly orderedColumns: _angular_core.WritableSignal<readonly KptColumn[]>;
2399
+ /** Kolumny w bieżącej kolejności, bez tych ukrytych przez `hiddenFields` — do renderowania i eksportu. */
2400
+ protected readonly visibleOrderedColumns: _angular_core.Signal<KptColumn[]>;
2293
2401
  private readonly scrollEl;
2294
2402
  protected readonly scrollTop: _angular_core.WritableSignal<number>;
2295
2403
  protected readonly viewportHeight: _angular_core.WritableSignal<number>;
2296
2404
  private readonly buffer;
2297
2405
  private readonly theadEl;
2298
2406
  protected readonly theadOffset: _angular_core.WritableSignal<number>;
2407
+ protected readonly editingCell: _angular_core.WritableSignal<{
2408
+ row: T;
2409
+ field: string;
2410
+ } | null>;
2411
+ protected readonly editingValue: _angular_core.WritableSignal<unknown>;
2412
+ /** Czy panel edytora overlayowego (date/select/multiselect) jest otwarty. */
2413
+ protected readonly editorPanelOpen: _angular_core.WritableSignal<boolean>;
2414
+ private readonly editorHost;
2299
2415
  constructor();
2300
2416
  protected onScroll(event: Event): void;
2301
2417
  protected readonly virtualStart: _angular_core.Signal<number>;
@@ -2303,19 +2419,47 @@ declare class KptDataTable<T = Record<string, unknown>> {
2303
2419
  protected readonly virtualRows: _angular_core.Signal<T[]>;
2304
2420
  protected readonly topPad: _angular_core.Signal<number>;
2305
2421
  protected readonly bottomPad: _angular_core.Signal<number>;
2306
- protected readonly dragIndex: _angular_core.WritableSignal<number | null>;
2422
+ /**
2423
+ * Pole przeciąganej kolumny (nie indeks — przy ukrytych kolumnach `$index` z pętli
2424
+ * `visibleOrderedColumns()` nie odpowiada pozycji w pełnej `orderedColumns()`).
2425
+ */
2426
+ protected readonly dragField: _angular_core.WritableSignal<string | null>;
2307
2427
  /** Kolumna przeciągalna tylko gdy `reorderable` i nie jest zamrożona (frozen musi zostać wiodąca). */
2308
2428
  protected isColDraggable(col: KptColumn): boolean;
2309
- /** Liczba wiodących kolumn zamrożonych — poza nie wolno upuszczać ani ich przesuwać. */
2429
+ /** Liczba wiodących widocznych kolumn zamrożonych — poza nie wolno upuszczać ani ich przesuwać. */
2310
2430
  private frozenLeadCount;
2311
- protected onColDragStart(index: number, event: DragEvent): void;
2312
- protected onColDragOver(index: number, event: DragEvent): void;
2313
- protected onColDrop(index: number, event: DragEvent): void;
2431
+ protected onColDragStart(field: string, event: DragEvent): void;
2432
+ protected onColDragOver(field: string, event: DragEvent): void;
2433
+ protected onColDrop(field: string, event: DragEvent): void;
2314
2434
  protected onColDragEnd(): void;
2315
2435
  exportCsv(): void;
2316
2436
  private readonly cellDefs;
2317
2437
  private readonly cellMap;
2318
2438
  protected cellTemplate(field: string): TemplateRef<unknown> | null;
2439
+ private readonly cellEditDefs;
2440
+ private readonly cellEditMap;
2441
+ protected cellEditTemplate(field: string): TemplateRef<unknown> | null;
2442
+ protected isEditable(col: KptColumn): boolean;
2443
+ protected isEditingCell(row: T, field: string): boolean;
2444
+ protected startEdit(row: T, col: KptColumn, event: Event): void;
2445
+ /**
2446
+ * Panel edytora zamknięty (wybór, klik poza, Esc) → zatwierdź. Celowo NIE wieszamy tego na
2447
+ * `touch`: ten leci też z blur triggera, czyli już przy naciśnięciu myszy na opcji w panelu —
2448
+ * edytor ginąłby, zanim kliknięcie zdąży wybrać wartość.
2449
+ */
2450
+ protected onEditorPanelToggle(open: boolean): void;
2451
+ /**
2452
+ * Edytory bez overlaya (text/number, własne `kptCellEdit`) zatwierdza dopiero wyjście fokusu
2453
+ * **poza cały edytor**. Nie wystarczy `touch`/blur samej kontrolki: `kpt-input-number` ma
2454
+ * fokusowalne strzałki `+`/`-` obok pola (i dodatkowo emituje `touch` w `step_()`), więc każde
2455
+ * kliknięcie strzałki zamykałoby edycję, zanim zdąży zmienić wartość.
2456
+ */
2457
+ protected onEditorFocusOut(event: FocusEvent): void;
2458
+ /** Zatwierdza bieżącą edycję — emituje `cellEdit` tylko gdy wartość faktycznie się zmieniła. */
2459
+ protected commitEdit(): void;
2460
+ /** Dla własnych szablonów (`kptCellEdit`): ustaw wartość i od razu zatwierdź. */
2461
+ protected readonly commitEditValue: (value: unknown) => void;
2462
+ protected cancelEdit(): void;
2319
2463
  private readonly rowDetailDef;
2320
2464
  protected readonly rowDetailTpl: _angular_core.Signal<TemplateRef<any> | null>;
2321
2465
  /** Kolumna z przełącznikiem widoczna, gdy włączono `expandable` i podano szablon `kptRowDetail`. */
@@ -2375,7 +2519,7 @@ declare class KptDataTable<T = Record<string, unknown>> {
2375
2519
  protected getValue(row: T, field: string): unknown;
2376
2520
  protected trackRow: (row: T) => unknown;
2377
2521
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<KptDataTable<any>, never>;
2378
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<KptDataTable<any>, "kpt-data-table", never, { "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "filterable": { "alias": "filterable"; "required": false; "isSignal": true; }; "filterRowPosition": { "alias": "filterRowPosition"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "rowKey": { "alias": "rowKey"; "required": false; "isSignal": true; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; "isSignal": true; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "reorderable": { "alias": "reorderable"; "required": false; "isSignal": true; }; "exportable": { "alias": "exportable"; "required": false; "isSignal": true; }; "exportFilename": { "alias": "exportFilename"; "required": false; "isSignal": true; }; "lazy": { "alias": "lazy"; "required": false; "isSignal": true; }; "totalRecords": { "alias": "totalRecords"; "required": false; "isSignal": true; }; "expandable": { "alias": "expandable"; "required": false; "isSignal": true; }; "multiExpand": { "alias": "multiExpand"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "expandedRows": { "alias": "expandedRows"; "required": false; "isSignal": true; }; }, { "selection": "selectionChange"; "expandedRows": "expandedRowsChange"; "rowClick": "rowClick"; "lazyLoad": "lazyLoad"; }, ["cellDefs", "rowDetailDef"], never, true, never>;
2522
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<KptDataTable<any>, "kpt-data-table", never, { "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "filterable": { "alias": "filterable"; "required": false; "isSignal": true; }; "filterRowPosition": { "alias": "filterRowPosition"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "rowKey": { "alias": "rowKey"; "required": false; "isSignal": true; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; "isSignal": true; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "reorderable": { "alias": "reorderable"; "required": false; "isSignal": true; }; "exportable": { "alias": "exportable"; "required": false; "isSignal": true; }; "exportFilename": { "alias": "exportFilename"; "required": false; "isSignal": true; }; "lazy": { "alias": "lazy"; "required": false; "isSignal": true; }; "totalRecords": { "alias": "totalRecords"; "required": false; "isSignal": true; }; "expandable": { "alias": "expandable"; "required": false; "isSignal": true; }; "multiExpand": { "alias": "multiExpand"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "expandedRows": { "alias": "expandedRows"; "required": false; "isSignal": true; }; "hiddenFields": { "alias": "hiddenFields"; "required": false; "isSignal": true; }; }, { "selection": "selectionChange"; "expandedRows": "expandedRowsChange"; "hiddenFields": "hiddenFieldsChange"; "rowClick": "rowClick"; "lazyLoad": "lazyLoad"; "cellEdit": "cellEdit"; }, ["cellDefs", "cellEditDefs", "rowDetailDef"], ["[kptPaginatorActions]"], true, never>;
2379
2523
  }
2380
2524
 
2381
2525
  /**
@@ -2397,6 +2541,26 @@ declare class KptCellDef {
2397
2541
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KptCellDef, "ng-template[kptCell]", never, { "kptCell": { "alias": "kptCell"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
2398
2542
  }
2399
2543
 
2544
+ /**
2545
+ * Własny szablon edytora komórki dla kolumny `kpt-data-table` (gdy wbudowane typy
2546
+ * `KptColumnEdit.type` nie wystarczają). Kontekst: `$implicit` = bieżąca wartość edycji,
2547
+ * `row` = wiersz, `commit(value)` = zatwierdź wartość i zamknij edytor, `cancel()` = odrzuć.
2548
+ *
2549
+ * @example
2550
+ * <kpt-data-table [columns]="cols" [data]="rows">
2551
+ * <ng-template kptCellEdit="team" let-value let-commit="commit">
2552
+ * <my-custom-picker [value]="value" (valueChange)="commit($event)" />
2553
+ * </ng-template>
2554
+ * </kpt-data-table>
2555
+ */
2556
+ declare class KptCellEditDef {
2557
+ /** Nazwa pola kolumny, dla której obowiązuje szablon edytora. */
2558
+ readonly kptCellEdit: _angular_core.InputSignal<string>;
2559
+ readonly template: TemplateRef<any>;
2560
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KptCellEditDef, never>;
2561
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KptCellEditDef, "ng-template[kptCellEdit]", never, { "kptCellEdit": { "alias": "kptCellEdit"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
2562
+ }
2563
+
2400
2564
  /**
2401
2565
  * Szablon rozwijanego wiersza (row detail) dla `kpt-data-table`. Renderowany pod
2402
2566
  * wierszem po rozwinięciu. Kontekst: `$implicit` = wiersz. Wymaga `expandable`.
@@ -2942,6 +3106,6 @@ declare class KptSpeedDial<T = unknown> {
2942
3106
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<KptSpeedDial<any>, "kpt-speed-dial", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "select": "select"; }, never, never, true, never>;
2943
3107
  }
2944
3108
 
2945
- export { KPT_BREAKPOINTS, KPT_FORM_FIELD_CONTROL, KPT_I18N_CONFIG, KPT_MESSAGES_EN, KPT_MESSAGES_PL, KptAccordion, KptAccordionPanel, KptAlert, KptAppShell, KptAutocomplete, KptAvatar, KptAvatarGroup, KptBadge, KptBottomSheet, KptBreadcrumb, KptBreakpointObserver, KptButton, KptButtonGroup, KptCard, KptCarousel, KptCellDef, KptCheckbox, KptChip, KptChipsInput, KptClock, KptColorPicker, KptConfirmContainer, KptConfirmService, KptContextMenu, KptDataTable, KptDataView, KptDateRange, KptDatepicker, KptDialog, KptDivider, KptDrawer, KptEmpty, KptFab, KptFieldset, KptFileUpload, KptFormField, KptGalleria, KptI18n, KptIcon, KptIconButton, KptIconRegistry, KptImage, KptInput, KptInputMask, KptInputNumber, KptInputOtp, KptKnob, KptListbox, KptMegamenu, KptMenu, KptMenubar, KptMeterGroup, KptOrderList, KptPaginator, KptPanel, KptPassword, KptPickList, KptPopover, KptProgress, KptRadioGroup, KptRating, KptRichText, KptRowDetailDef, KptScrollTop, KptSelect, KptShellNavToggle, KptSidenav, KptSkeleton, KptSlider, KptSpeedDial, KptSpinner, KptSplitButton, KptSplitter, KptStep, KptStepper, KptSwitch, KptSwitchGroup, KptTab, KptTabs, KptTextarea, KptTimeline, KptToastContainer, KptToastService, KptToolbar, KptTooltip, KptTree, provideKptI18n, renderKptIconSvg };
2946
- export type { DeepPartial, KptAlertVariant, KptAvatarItem, KptAvatarShape, KptAvatarSize, KptBadgeVariant, KptBreadcrumbItem, KptBreakpoint, KptButtonSize, KptButtonVariant, KptCardVariant, KptChipVariant, KptColumn, KptConfirmOptions, KptConfirmRequest, KptDateRangeValue, KptDividerOrientation, KptDrawerPosition, KptFormFieldControl, KptGalleriaItem, KptI18nConfig, KptIconName, KptInputType, KptLocale, KptMenuItem, KptMessages, KptMeterItem, KptOption, KptProgressVariant, KptRichTool, KptRichToolbar, KptSidenavMode, KptSkeletonVariant, KptSliderValue, KptSpeedDialDirection, KptSplitterOrientation, KptTableLazyState, KptTimelineItem, KptToast, KptToastOptions, KptTooltipPosition, KptTreeNode };
3109
+ export { KPT_BREAKPOINTS, KPT_FORM_FIELD_CONTROL, KPT_I18N_CONFIG, KPT_MESSAGES_EN, KPT_MESSAGES_PL, KptAccordion, KptAccordionPanel, KptAlert, KptAppShell, KptAutocomplete, KptAvatar, KptAvatarGroup, KptBadge, KptBottomSheet, KptBreadcrumb, KptBreakpointObserver, KptButton, KptButtonGroup, KptCard, KptCarousel, KptCellDef, KptCellEditDef, KptCheckbox, KptChip, KptChipsInput, KptClock, KptColorPicker, KptConfirmContainer, KptConfirmService, KptContextMenu, KptDataTable, KptDataView, KptDateRange, KptDatepicker, KptDialog, KptDivider, KptDrawer, KptEmpty, KptFab, KptFieldset, KptFileUpload, KptFormField, KptGalleria, KptI18n, KptIcon, KptIconButton, KptIconRegistry, KptImage, KptInput, KptInputMask, KptInputNumber, KptInputOtp, KptKnob, KptListbox, KptMegamenu, KptMenu, KptMenubar, KptMeterGroup, KptOrderList, KptPaginator, KptPanel, KptPassword, KptPickList, KptPopover, KptProgress, KptRadioGroup, KptRating, KptRichText, KptRowDetailDef, KptScrollTop, KptSelect, KptShellNavToggle, KptSidenav, KptSkeleton, KptSlider, KptSpeedDial, KptSpinner, KptSplitButton, KptSplitter, KptStep, KptStepper, KptSwitch, KptSwitchGroup, KptTab, KptTabs, KptTextarea, KptTimeline, KptToastContainer, KptToastService, KptToolbar, KptTooltip, KptTree, provideKptI18n, renderKptIconSvg };
3110
+ export type { DeepPartial, KptAlertVariant, KptAvatarItem, KptAvatarShape, KptAvatarSize, KptBadgeSize, KptBadgeVariant, KptBreadcrumbItem, KptBreakpoint, KptButtonSize, KptButtonVariant, KptCardVariant, KptCellEditEvent, KptChipVariant, KptColumn, KptColumnEdit, KptColumnEditType, KptConfirmOptions, KptConfirmRequest, KptDateRangeValue, KptDividerOrientation, KptDrawerPosition, KptFormFieldControl, KptGalleriaItem, KptI18nConfig, KptIconName, KptInputType, KptLocale, KptMenuItem, KptMessages, KptMeterItem, KptOption, KptProgressVariant, KptRichTool, KptRichToolbar, KptSidenavMode, KptSkeletonVariant, KptSliderValue, KptSpeedDialDirection, KptSplitterOrientation, KptTableLazyState, KptTimelineItem, KptToast, KptToastOptions, KptTooltipPosition, KptTreeNode };
2947
3111
  //# sourceMappingURL=konce-pt-angular.d.ts.map